/Mk/

c2013-evolution' title='gsoc2013-evolution Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cvsignore26
-rw-r--r--AUTHORS81
-rw-r--r--COPYING340
-rw-r--r--COPYING-DOCS355
-rw-r--r--ChangeLog7069
-rw-r--r--HACKING0
-rw-r--r--INSTALL182
-rw-r--r--MAINTAINERS5
-rw-r--r--Makefile.am45
-rw-r--r--NEWS1942
-rw-r--r--README249
-rw-r--r--acconfig.h41
-rw-r--r--addressbook/.cvsignore6
-rw-r--r--addressbook/ChangeLog9136
-rw-r--r--addressbook/E-CARD-NEEDED-FIELDS9
-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/.cvsignore23
-rw-r--r--addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in29
-rw-r--r--addressbook/backend/ebook/Makefile.am185
-rw-r--r--addressbook/backend/ebook/TODO2
-rw-r--r--addressbook/backend/ebook/e-book-listener.c826
-rw-r--r--addressbook/backend/ebook/e-book-listener.h109
-rw-r--r--addressbook/backend/ebook/e-book-types.h39
-rw-r--r--addressbook/backend/ebook/e-book-util.c583
-rw-r--r--addressbook/backend/ebook/e-book-util.h79
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.c461
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.h78
-rw-r--r--addressbook/backend/ebook/e-book-view.c343
-rw-r--r--addressbook/backend/ebook/e-book-view.h60
-rw-r--r--addressbook/backend/ebook/e-book.c1358
-rw-r--r--addressbook/backend/ebook/e-book.h151
-rw-r--r--addressbook/backend/ebook/e-card-compare.c631
-rw-r--r--addressbook/backend/ebook/e-card-compare.h60
-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.c1205
-rw-r--r--addressbook/backend/ebook/e-card-simple.h225
-rw-r--r--addressbook/backend/ebook/e-card-types.h94
-rw-r--r--addressbook/backend/ebook/e-card.c4210
-rw-r--r--addressbook/backend/ebook/e-card.h209
-rw-r--r--addressbook/backend/ebook/e-destination.c1601
-rw-r--r--addressbook/backend/ebook/e-destination.h134
-rw-r--r--addressbook/backend/ebook/evolution-vcard-importer.c260
-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.c203
-rw-r--r--addressbook/backend/idl/.cvsignore6
-rw-r--r--addressbook/backend/idl/Makefile.am6
-rw-r--r--addressbook/backend/idl/addressbook.idl160
-rw-r--r--addressbook/backend/pas/.cvsignore11
-rw-r--r--addressbook/backend/pas/Makefile.am63
-rw-r--r--addressbook/backend/pas/TODO2
-rw-r--r--addressbook/backend/pas/evolutionperson.schema192
-rw-r--r--addressbook/backend/pas/pas-backend-card-sexp.c401
-rw-r--r--addressbook/backend/pas/pas-backend-card-sexp.h30
-rw-r--r--addressbook/backend/pas/pas-backend-file.c1461
-rw-r--r--addressbook/backend/pas/pas-backend-file.h32
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c2545
-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.c624
-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.c871
-rw-r--r--addressbook/backend/pas/pas-book.h114
-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.am50
-rw-r--r--addressbook/conduit/address-conduit-config.h114
-rw-r--r--addressbook/conduit/address-conduit.c1214
-rw-r--r--addressbook/conduit/address-conduit.h78
-rw-r--r--addressbook/conduit/e-address.conduit.in9
-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.in134
-rw-r--r--addressbook/gui/component/Makefile.am95
-rw-r--r--addressbook/gui/component/addressbook-component.c440
-rw-r--r--addressbook/gui/component/addressbook-component.h33
-rw-r--r--addressbook/gui/component/addressbook-config.c487
-rw-r--r--addressbook/gui/component/addressbook-config.glade857
-rw-r--r--addressbook/gui/component/addressbook-config.h32
-rw-r--r--addressbook/gui/component/addressbook-factory.c94
-rw-r--r--addressbook/gui/component/addressbook-storage.c590
-rw-r--r--addressbook/gui/component/addressbook-storage.h78
-rw-r--r--addressbook/gui/component/addressbook.c989
-rw-r--r--addressbook/gui/component/addressbook.h12
-rw-r--r--addressbook/gui/component/e-address-popup.c1216
-rw-r--r--addressbook/gui/component/e-address-popup.h88
-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.c226
-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.idl42
-rw-r--r--addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in29
-rw-r--r--addressbook/gui/component/select-names/Makefile.am85
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c439
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.h67
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c1246
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.h68
-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.c575
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.h62
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.c897
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.h91
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.c562
-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.c347
-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.c739
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.h47
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c942
-rw-r--r--addressbook/gui/component/select-names/e-select-names.h109
-rw-r--r--addressbook/gui/component/select-names/recipient.glade61
-rw-r--r--addressbook/gui/component/select-names/select-names.glade444
-rw-r--r--addressbook/gui/contact-editor/.cvsignore8
-rw-r--r--addressbook/gui/contact-editor/Makefile.am65
-rw-r--r--addressbook/gui/contact-editor/arrow.pngbin174 -> 0 bytes
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade2537
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.c253
-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.c251
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.h78
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2567
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h134
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c453
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.h41
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.c152
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.h43
-rw-r--r--addressbook/gui/contact-editor/file-exists.glade95
-rw-r--r--addressbook/gui/contact-editor/fulladdr.glade705
-rw-r--r--addressbook/gui/contact-editor/fullname.glade389
-rw-r--r--addressbook/gui/contact-editor/test-editor.c145
-rw-r--r--addressbook/gui/contact-list-editor/.cvsignore3
-rw-r--r--addressbook/gui/contact-list-editor/Makefile.am30
-rw-r--r--addressbook/gui/contact-list-editor/contact-list-editor.glade272
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c869
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.h108
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c253
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.h47
-rw-r--r--addressbook/gui/merging/.cvsignore6
-rw-r--r--addressbook/gui/merging/Makefile.am23
-rw-r--r--addressbook/gui/merging/e-card-duplicate-detected.glade255
-rw-r--r--addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade255
-rw-r--r--addressbook/gui/merging/e-card-merging.c168
-rw-r--r--addressbook/gui/merging/e-card-merging.h31
-rw-r--r--addressbook/gui/search/.cvsignore7
-rw-r--r--addressbook/gui/search/Makefile.am24
-rw-r--r--addressbook/gui/search/addresstypes.xml83
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.c180
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.h72
-rw-r--r--addressbook/gui/widgets/.cvsignore12
-rw-r--r--addressbook/gui/widgets/Makefile.am140
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c567
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h73
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c649
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.h51
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c391
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.h44
-rw-r--r--addressbook/gui/widgets/e-addressbook-util.c131
-rw-r--r--addressbook/gui/widgets/e-addressbook-util.h46
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c1566
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.h135
-rw-r--r--addressbook/gui/widgets/e-minicard-control.c336
-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.c344
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.h79
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c445
-rw-r--r--addressbook/gui/widgets/e-minicard-view.h101
-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.c957
-rw-r--r--addressbook/gui/widgets/e-minicard.h123
-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.am75
-rw-r--r--addressbook/printing/e-contact-print-envelope.c246
-rw-r--r--addressbook/printing/e-contact-print-envelope.h33
-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.c1184
-rw-r--r--addressbook/printing/e-contact-print.glade2003
-rw-r--r--addressbook/printing/e-contact-print.h37
-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/16_copy.pngbin516 -> 0 bytes
-rw-r--r--art/16_customize.pngbin266 -> 0 bytes
-rw-r--r--art/16_cut.pngbin531 -> 0 bytes
-rw-r--r--art/16_paste.pngbin626 -> 0 bytes
-rw-r--r--art/ChangeLog423
-rw-r--r--art/Makefile.am213
-rw-r--r--art/add-attachment.pngbin715 -> 0 bytes
-rw-r--r--art/add-nntp-folder-24.pngbin863 -> 0 bytes
-rw-r--r--art/add-service.pngbin1186 -> 0 bytes
-rw-r--r--art/all_contacts.xpm158
-rw-r--r--art/apply-filters-16.xpm48
-rw-r--r--art/arrow-left-24.pngbin429 -> 0 bytes
-rw-r--r--art/arrow-right-24.pngbin431 -> 0 bytes
-rw-r--r--art/attachment.xpm22
-rw-r--r--art/bcg.pngbin526 -> 0 bytes
-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.pngbin1062 -> 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/contact-is-a-list.pngbin173 -> 0 bytes
-rw-r--r--art/copy-message.pngbin863 -> 0 bytes
-rw-r--r--art/copy.pngbin918 -> 0 bytes
-rw-r--r--art/copy_16_message.xpm58
-rw-r--r--art/cut.pngbin1063 -> 0 bytes
-rw-r--r--art/dayview.xpm34
-rw-r--r--art/delete-message.pngbin1210 -> 0 bytes
-rw-r--r--art/drafts-16.pngbin539 -> 0 bytes
-rw-r--r--art/edit.xpm84
-rw-r--r--art/empty.gifbin104 -> 0 bytes
-rw-r--r--art/empty.xpm21
-rw-r--r--art/encrypt.xpm80
-rw-r--r--art/envelope.pngbin2393 -> 0 bytes
-rw-r--r--art/es-appointments.pngbin433 -> 0 bytes
-rw-r--r--art/es-weather.pngbin1002 -> 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.pngbin502 -> 0 bytes
-rw-r--r--art/evolution-calendar.pngbin2733 -> 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.pngbin2288 -> 0 bytes
-rw-r--r--art/evolution-inbox-mini.pngbin478 -> 0 bytes
-rw-r--r--art/evolution-inbox.pngbin2937 -> 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.pngbin3601 -> 0 bytes
-rw-r--r--art/evolution-today-mini.pngbin664 -> 0 bytes
-rw-r--r--art/evolution-today.pngbin3713 -> 0 bytes
-rw-r--r--art/evolution-trash-mini.pngbin723 -> 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/faq-16.pngbin639 -> 0 bytes
-rw-r--r--art/fetch-mail.pngbin1027 -> 0 bytes
-rw-r--r--art/find_contact.xpm127
-rw-r--r--art/find_message.xpm130
-rw-r--r--art/folder-copy-16.pngbin376 -> 0 bytes
-rw-r--r--art/folder-move-16.pngbin273 -> 0 bytes
-rw-r--r--art/folder.xpm73
-rw-r--r--art/forget_passwords.xpm125
-rw-r--r--art/forward.pngbin693 -> 0 bytes
-rw-r--r--art/forward.xpm51
-rw-r--r--art/globe.pngbin3328 -> 0 bytes
-rw-r--r--art/goto-16.pngbin470 -> 0 bytes
-rw-r--r--art/goto-24.pngbin679 -> 0 bytes
-rw-r--r--art/hand-16.xpm115
-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/ico-calendar.pngbin2677 -> 0 bytes
-rw-r--r--art/ico-mail.pngbin2937 -> 0 bytes
-rw-r--r--art/ico-rdf.pngbin3627 -> 0 bytes
-rw-r--r--art/ico-weather.pngbin4343 -> 0 bytes
-rw-r--r--art/imap-16.pngbin482 -> 0 bytes
-rw-r--r--art/import.pngbin2309 -> 0 bytes
-rw-r--r--art/import.xpm59
-rw-r--r--art/inbox-16.pngbin587 -> 0 bytes
-rw-r--r--art/inbox-full-16.pngbin549 -> 0 bytes
-rw-r--r--art/insert-image-24.pngbin711 -> 0 bytes
-rw-r--r--art/insert-link-24.pngbin782 -> 0 bytes
-rw-r--r--art/insert-table-24.pngbin430 -> 0 bytes
-rw-r--r--art/jump.xpm14
-rw-r--r--art/ldap-16.pngbin542 -> 0 bytes
-rw-r--r--art/local-16.pngbin342 -> 0 bytes
-rw-r--r--art/mail-config-druid-48.pngbin3529 -> 0 bytes
-rw-r--r--art/mail-config-druid-account-name.pngbin3150 -> 0 bytes
-rw-r--r--art/mail-config-druid-identity.pngbin2646 -> 0 bytes
-rw-r--r--art/mail-config-druid-receive.pngbin3551 -> 0 bytes
-rw-r--r--art/mail-config-druid-send.pngbin3379 -> 0 bytes
-rw-r--r--art/mail-config-druid.pngbin3529 -> 0 bytes
-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-as-important-16.pngbin235 -> 0 bytes
-rw-r--r--art/mark.xpm21
-rw-r--r--art/meeting-request.pngbin3520 -> 0 bytes
-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/myevo-appointments.pngbin2857 -> 0 bytes
-rw-r--r--art/myevo-mail-summary.pngbin3278 -> 0 bytes
-rw-r--r--art/myevo-post-it.pngbin3715 -> 0 bytes
-rw-r--r--art/myweather-clouds.pngbin414 -> 0 bytes
-rw-r--r--art/myweather-fog.pngbin748 -> 0 bytes
-rw-r--r--art/myweather-rain.pngbin186 -> 0 bytes
-rw-r--r--art/myweather-snow.pngbin354 -> 0 bytes
-rw-r--r--art/myweather-storm.pngbin429 -> 0 bytes
-rw-r--r--art/myweather-sun.pngbin295 -> 0 bytes
-rw-r--r--art/myweather-suncloud.pngbin469 -> 0 bytes
-rw-r--r--art/new-message.xpm38
-rw-r--r--art/new_appointment.pngbin1542 -> 0 bytes
-rw-r--r--art/new_appointment.xpm126
-rw-r--r--art/new_contact.xpm98
-rw-r--r--art/new_task-16.pngbin427 -> 0 bytes
-rw-r--r--art/new_task.pngbin1032 -> 0 bytes
-rw-r--r--art/next-message.pngbin1050 -> 0 bytes
-rw-r--r--art/offline.pngbin640 -> 0 bytes
-rw-r--r--art/online.pngbin547 -> 0 bytes
-rw-r--r--art/open-in-new-window-16.pngbin504 -> 0 bytes
-rw-r--r--art/outbox-16.pngbin575 -> 0 bytes
-rw-r--r--art/outbox-full-16.pngbin551 -> 0 bytes
-rw-r--r--art/paste.pngbin1053 -> 0 bytes
-rw-r--r--art/pattern.pngbin271 -> 0 bytes
-rw-r--r--art/pgp-signature-bad.pngbin4233 -> 0 bytes
-rw-r--r--art/pgp-signature-nokey.pngbin2907 -> 0 bytes
-rw-r--r--art/pgp-signature-ok.pngbin3140 -> 0 bytes
-rw-r--r--art/pin.pngbin354 -> 0 bytes
-rw-r--r--art/previous-message.pngbin1053 -> 0 bytes
-rw-r--r--art/print-preview-24.pngbin1035 -> 0 bytes
-rw-r--r--art/print-preview.xpm153
-rw-r--r--art/print.pngbin867 -> 0 bytes
-rw-r--r--art/print.xpm107
-rw-r--r--art/priority-high.xpm22
-rw-r--r--art/priority-low.xpm21
-rw-r--r--art/properties-16.pngbin606 -> 0 bytes
-rw-r--r--art/rdf.pngbin4372 -> 0 bytes
-rw-r--r--art/receive-24.pngbin847 -> 0 bytes
-rw-r--r--art/recur.xpm21
-rw-r--r--art/refresh-nntp-folders-24.pngbin575 -> 0 bytes
-rw-r--r--art/remove-nntp-folder-24.pngbin878 -> 0 bytes
-rw-r--r--art/reply-to-all.pngbin793 -> 0 bytes
-rw-r--r--art/reply.pngbin721 -> 0 bytes
-rw-r--r--art/reply.xpm46
-rw-r--r--art/reply_to_all.xpm52
-rw-r--r--art/save-16.pngbin540 -> 0 bytes
-rw-r--r--art/save-24.pngbin634 -> 0 bytes
-rw-r--r--art/save-as-16.pngbin667 -> 0 bytes
-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/search-16.pngbin526 -> 0 bytes
-rw-r--r--art/search-and-replace-16.pngbin638 -> 0 bytes
-rw-r--r--art/send-16.pngbin495 -> 0 bytes
-rw-r--r--art/send-24-receive.pngbin900 -> 0 bytes
-rw-r--r--art/send-24.pngbin803 -> 0 bytes
-rw-r--r--art/send-48-receive.pngbin2788 -> 0 bytes
-rw-r--r--art/send-later-16.pngbin509 -> 0 bytes
-rw-r--r--art/send-receive.xpm58
-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-1-0.pngbin46629 -> 0 bytes
-rw-r--r--art/splash.pngbin46740 -> 0 bytes
-rw-r--r--art/talking-heads.pngbin3643 -> 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.pngbin172 -> 0 bytes
-rw-r--r--art/task.xpm27
-rw-r--r--art/thankyou.pngbin4090 -> 0 bytes
-rw-r--r--art/timezone-16.xpm162
-rw-r--r--art/timezone-48.pngbin3613 -> 0 bytes
-rw-r--r--art/tree-expanded.xpm22
-rw-r--r--art/tree-unexpanded.xpm22
-rw-r--r--art/undelete_message-16.pngbin591 -> 0 bytes
-rw-r--r--art/wax-seal-broken.pngbin27264 -> 0 bytes
-rw-r--r--art/wax-seal.pngbin22433 -> 0 bytes
-rw-r--r--art/weekview.xpm34
-rw-r--r--art/work_offline.xpm33
-rw-r--r--art/work_online-16.pngbin458 -> 0 bytes
-rw-r--r--art/workweekview.xpm34
-rw-r--r--art/world_map-960.pngbin111584 -> 0 bytes
-rw-r--r--art/yearview.xpm44
-rwxr-xr-xautogen.sh10
-rw-r--r--calendar/.cvsignore6
-rw-r--r--calendar/AUTHORS7
-rw-r--r--calendar/ChangeLog13804
-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.am91
-rw-r--r--calendar/cal-client/cal-client-multi.c707
-rw-r--r--calendar/cal-client/cal-client-multi.h105
-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.c2292
-rw-r--r--calendar/cal-client/cal-client.h170
-rw-r--r--calendar/cal-client/cal-listener.c365
-rw-r--r--calendar/cal-client/cal-listener.h101
-rw-r--r--calendar/cal-client/cal-query.c406
-rw-r--r--calendar/cal-client/cal-query.h82
-rw-r--r--calendar/cal-client/client-test.c240
-rw-r--r--calendar/cal-client/query-listener.c322
-rw-r--r--calendar/cal-client/query-listener.h98
-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.c4903
-rw-r--r--calendar/cal-util/cal-component.h430
-rw-r--r--calendar/cal-util/cal-recur.c3886
-rw-r--r--calendar/cal-util/cal-recur.h66
-rw-r--r--calendar/cal-util/cal-util.c450
-rw-r--r--calendar/cal-util/cal-util.h89
-rw-r--r--calendar/cal-util/test-recur.c198
-rw-r--r--calendar/cal-util/timeutil.c585
-rw-r--r--calendar/cal-util/timeutil.h121
-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.am50
-rw-r--r--calendar/conduits/calendar/calendar-conduit-config.h120
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c1310
-rw-r--r--calendar/conduits/calendar/calendar-conduit.h82
-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.am50
-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.c1078
-rw-r--r--calendar/conduits/todo/todo-conduit.h81
-rw-r--r--calendar/gui/.cvsignore24
-rw-r--r--calendar/gui/Evolution-Composer.h352
-rw-r--r--calendar/gui/GNOME_Evolution_Calendar.oaf.in132
-rw-r--r--calendar/gui/Makefile.am207
-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.am85
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c312
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h45
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c285
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.glade206
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.h63
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c945
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.h36
-rw-r--r--calendar/gui/alarm-notify/alarm.c304
-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.c103
-rw-r--r--calendar/gui/cal-search-bar.c574
-rw-r--r--calendar/gui/cal-search-bar.h72
-rw-r--r--calendar/gui/calendar-commands.c688
-rw-r--r--calendar/gui/calendar-commands.h47
-rw-r--r--calendar/gui/calendar-component.c610
-rw-r--r--calendar/gui/calendar-component.h32
-rw-r--r--calendar/gui/calendar-config.c909
-rw-r--r--calendar/gui/calendar-config.h170
-rw-r--r--calendar/gui/calendar-model.c2403
-rw-r--r--calendar/gui/calendar-model.h99
-rw-r--r--calendar/gui/calendar-offline-handler.c282
-rw-r--r--calendar/gui/calendar-offline-handler.h70
-rw-r--r--calendar/gui/calendar-summary.c778
-rw-r--r--calendar/gui/calendar-summary.h36
-rw-r--r--calendar/gui/calendar-view-factory.c253
-rw-r--r--calendar/gui/calendar-view-factory.h66
-rw-r--r--calendar/gui/calendar-view.c317
-rw-r--r--calendar/gui/calendar-view.h68
-rw-r--r--calendar/gui/comp-editor-factory.c702
-rw-r--r--calendar/gui/comp-editor-factory.h59
-rw-r--r--calendar/gui/comp-util.c154
-rw-r--r--calendar/gui/comp-util.h39
-rw-r--r--calendar/gui/component-factory.c610
-rw-r--r--calendar/gui/component-factory.h32
-rw-r--r--calendar/gui/control-factory.c226
-rw-r--r--calendar/gui/control-factory.h31
-rw-r--r--calendar/gui/dialogs/.cvsignore7
-rw-r--r--calendar/gui/dialogs/Makefile.am106
-rw-r--r--calendar/gui/dialogs/alarm-options.c585
-rw-r--r--calendar/gui/dialogs/alarm-options.glade398
-rw-r--r--calendar/gui/dialogs/alarm-options.h29
-rw-r--r--calendar/gui/dialogs/alarm-page.c849
-rw-r--r--calendar/gui/dialogs/alarm-page.glade381
-rw-r--r--calendar/gui/dialogs/alarm-page.h62
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c666
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade984
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h77
-rw-r--r--calendar/gui/dialogs/cancel-comp.c84
-rw-r--r--calendar/gui/dialogs/cancel-comp.h30
-rw-r--r--calendar/gui/dialogs/changed-comp.c112
-rw-r--r--calendar/gui/dialogs/changed-comp.h30
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c377
-rw-r--r--calendar/gui/dialogs/comp-editor-page.h104
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c562
-rw-r--r--calendar/gui/dialogs/comp-editor-util.h55
-rw-r--r--calendar/gui/dialogs/comp-editor.c1205
-rw-r--r--calendar/gui/dialogs/comp-editor.h98
-rw-r--r--calendar/gui/dialogs/delete-comp.c155
-rw-r--r--calendar/gui/dialogs/delete-comp.h32
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c341
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.glade120
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.h74
-rw-r--r--calendar/gui/dialogs/event-editor.c412
-rw-r--r--calendar/gui/dialogs/event-editor.h61
-rw-r--r--calendar/gui/dialogs/event-page.c1373
-rw-r--r--calendar/gui/dialogs/event-page.glade544
-rw-r--r--calendar/gui/dialogs/event-page.h62
-rw-r--r--calendar/gui/dialogs/meeting-page.c965
-rw-r--r--calendar/gui/dialogs/meeting-page.etspec21
-rw-r--r--calendar/gui/dialogs/meeting-page.glade306
-rw-r--r--calendar/gui/dialogs/meeting-page.h64
-rw-r--r--calendar/gui/dialogs/recurrence-page.c2223
-rw-r--r--calendar/gui/dialogs/recurrence-page.glade602
-rw-r--r--calendar/gui/dialogs/recurrence-page.h62
-rw-r--r--calendar/gui/dialogs/save-comp.c63
-rw-r--r--calendar/gui/dialogs/save-comp.h30
-rw-r--r--calendar/gui/dialogs/schedule-page.c346
-rw-r--r--calendar/gui/dialogs/schedule-page.glade36
-rw-r--r--calendar/gui/dialogs/schedule-page.h60
-rw-r--r--calendar/gui/dialogs/send-comp.c82
-rw-r--r--calendar/gui/dialogs/send-comp.h30
-rw-r--r--calendar/gui/dialogs/task-details-page.c753
-rw-r--r--calendar/gui/dialogs/task-details-page.glade310
-rw-r--r--calendar/gui/dialogs/task-details-page.h62
-rw-r--r--calendar/gui/dialogs/task-editor.c349
-rw-r--r--calendar/gui/dialogs/task-editor.h62
-rw-r--r--calendar/gui/dialogs/task-page.c945
-rw-r--r--calendar/gui/dialogs/task-page.glade487
-rw-r--r--calendar/gui/dialogs/task-page.h61
-rw-r--r--calendar/gui/e-calendar-table.c1197
-rw-r--r--calendar/gui/e-calendar-table.etspec26
-rw-r--r--calendar/gui/e-calendar-table.h102
-rw-r--r--calendar/gui/e-day-view-layout.c353
-rw-r--r--calendar/gui/e-day-view-layout.h57
-rw-r--r--calendar/gui/e-day-view-main-item.c757
-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.c696
-rw-r--r--calendar/gui/e-day-view-top-item.h66
-rw-r--r--calendar/gui/e-day-view.c7027
-rw-r--r--calendar/gui/e-day-view.h664
-rw-r--r--calendar/gui/e-itip-control.c1412
-rw-r--r--calendar/gui/e-itip-control.glade478
-rw-r--r--calendar/gui/e-itip-control.h71
-rw-r--r--calendar/gui/e-meeting-attendee.c998
-rw-r--r--calendar/gui/e-meeting-attendee.h164
-rw-r--r--calendar/gui/e-meeting-model.c1316
-rw-r--r--calendar/gui/e-meeting-model.h91
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c1005
-rw-r--r--calendar/gui/e-meeting-time-sel-item.h79
-rw-r--r--calendar/gui/e-meeting-time-sel.c2623
-rw-r--r--calendar/gui/e-meeting-time-sel.etspec19
-rw-r--r--calendar/gui/e-meeting-time-sel.h375
-rw-r--r--calendar/gui/e-meeting-types.h79
-rw-r--r--calendar/gui/e-tasks.c631
-rw-r--r--calendar/gui/e-tasks.h82
-rw-r--r--calendar/gui/e-timezone-entry.c374
-rw-r--r--calendar/gui/e-timezone-entry.h82
-rw-r--r--calendar/gui/e-week-view-event-item.c902
-rw-r--r--calendar/gui/e-week-view-event-item.h71
-rw-r--r--calendar/gui/e-week-view-layout.c426
-rw-r--r--calendar/gui/e-week-view-layout.h70
-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.c3923
-rw-r--r--calendar/gui/e-week-view.h503
-rw-r--r--calendar/gui/gnome-cal.c2578
-rw-r--r--calendar/gui/gnome-cal.h156
-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.c257
-rw-r--r--calendar/gui/goto.h32
-rw-r--r--calendar/gui/itip-bonobo-control.c255
-rw-r--r--calendar/gui/itip-bonobo-control.h30
-rw-r--r--calendar/gui/itip-control-factory.c255
-rw-r--r--calendar/gui/itip-control-factory.h30
-rw-r--r--calendar/gui/itip-utils.c467
-rw-r--r--calendar/gui/itip-utils.h37
-rw-r--r--calendar/gui/main.c134
-rw-r--r--calendar/gui/meeting-mockup.glade488
-rw-r--r--calendar/gui/print.c2437
-rw-r--r--calendar/gui/print.h44
-rw-r--r--calendar/gui/tag-calendar.c228
-rw-r--r--calendar/gui/tag-calendar.h34
-rw-r--r--calendar/gui/tasks-control-factory.c79
-rw-r--r--calendar/gui/tasks-control-factory.h31
-rw-r--r--calendar/gui/tasks-control.c406
-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/topic.dat2
-rw-r--r--calendar/gui/weekday-picker.c575
-rw-r--r--calendar/gui/weekday-picker.h73
-rw-r--r--calendar/idl/.cvsignore2
-rw-r--r--calendar/idl/Makefile.am7
-rw-r--r--calendar/idl/evolution-calendar.idl334
-rw-r--r--calendar/pcs/.cvsignore11
-rw-r--r--calendar/pcs/Makefile.am53
-rw-r--r--calendar/pcs/cal-backend-db.c1191
-rw-r--r--calendar/pcs/cal-backend-db.h57
-rw-r--r--calendar/pcs/cal-backend-file.c1860
-rw-r--r--calendar/pcs/cal-backend-file.h63
-rw-r--r--calendar/pcs/cal-backend-util.c54
-rw-r--r--calendar/pcs/cal-backend-util.h36
-rw-r--r--calendar/pcs/cal-backend.c780
-rw-r--r--calendar/pcs/cal-backend.h177
-rw-r--r--calendar/pcs/cal-common.h42
-rw-r--r--calendar/pcs/cal-factory.c762
-rw-r--r--calendar/pcs/cal-factory.h73
-rw-r--r--calendar/pcs/cal.c838
-rw-r--r--calendar/pcs/cal.h80
-rw-r--r--calendar/pcs/job.c99
-rw-r--r--calendar/pcs/job.h36
-rw-r--r--calendar/pcs/query.c1431
-rw-r--r--calendar/pcs/query.h69
-rw-r--r--camel/.cvsignore12
-rw-r--r--camel/CODING.STYLE19
-rw-r--r--camel/ChangeLog15313
-rw-r--r--camel/Makefile.am269
-rw-r--r--camel/README63
-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.h515
-rw-r--r--camel/camel-charset-map.c447
-rw-r--r--camel/camel-charset-map.h44
-rw-r--r--camel/camel-cipher-context.c450
-rw-r--r--camel/camel-cipher-context.h125
-rw-r--r--camel/camel-cms-context.c324
-rw-r--r--camel/camel-cms-context.h128
-rw-r--r--camel/camel-data-wrapper.c302
-rw-r--r--camel/camel-data-wrapper.h99
-rw-r--r--camel/camel-digest-folder.c305
-rw-r--r--camel/camel-digest-folder.h52
-rw-r--r--camel/camel-disco-diary.c417
-rw-r--r--camel/camel-disco-diary.h100
-rw-r--r--camel/camel-disco-folder.c325
-rw-r--r--camel/camel-disco-folder.h117
-rw-r--r--camel/camel-disco-store.c342
-rw-r--r--camel/camel-disco-store.h122
-rw-r--r--camel/camel-exception-list.def37
-rw-r--r--camel/camel-exception.c296
-rw-r--r--camel/camel-exception.h88
-rw-r--r--camel/camel-file-utils.c283
-rw-r--r--camel/camel-file-utils.h55
-rw-r--r--camel/camel-filter-driver.c974
-rw-r--r--camel/camel-filter-driver.h97
-rw-r--r--camel/camel-filter-search.c519
-rw-r--r--camel/camel-filter-search.h50
-rw-r--r--camel/camel-folder-search.c983
-rw-r--r--camel/camel-folder-search.h121
-rw-r--r--camel/camel-folder-summary.c2669
-rw-r--r--camel/camel-folder-summary.h329
-rw-r--r--camel/camel-folder-thread.c784
-rw-r--r--camel/camel-folder-thread.h58
-rw-r--r--camel/camel-folder.c1920
-rw-r--r--camel/camel-folder.h313
-rw-r--r--camel/camel-html-parser.c807
-rw-r--r--camel/camel-html-parser.h78
-rw-r--r--camel/camel-internet-address.c510
-rw-r--r--camel/camel-internet-address.h55
-rw-r--r--camel/camel-lock-client.c329
-rw-r--r--camel/camel-lock-client.h42
-rw-r--r--camel/camel-lock-helper.c389
-rw-r--r--camel/camel-lock-helper.h70
-rw-r--r--camel/camel-lock.c419
-rw-r--r--camel/camel-lock.h64
-rw-r--r--camel/camel-medium.c336
-rw-r--r--camel/camel-medium.h101
-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.c248
-rw-r--r--camel/camel-mime-filter-charset.h52
-rw-r--r--camel/camel-mime-filter-crlf.c164
-rw-r--r--camel/camel-mime-filter-crlf.h63
-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.c200
-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-stripheader.c181
-rw-r--r--camel/camel-mime-filter-stripheader.h54
-rw-r--r--camel/camel-mime-filter.c256
-rw-r--r--camel/camel-mime-filter.h84
-rw-r--r--camel/camel-mime-message.c884
-rw-r--r--camel/camel-mime-message.h136
-rw-r--r--camel/camel-mime-parser.c1953
-rw-r--r--camel/camel-mime-parser.h133
-rw-r--r--camel/camel-mime-part-utils.c301
-rw-r--r--camel/camel-mime-part-utils.h45
-rw-r--r--camel/camel-mime-part.c823
-rw-r--r--camel/camel-mime-part.h133
-rw-r--r--camel/camel-mime-utils.c4044
-rw-r--r--camel/camel-mime-utils.h201
-rw-r--r--camel/camel-movemail.c544
-rw-r--r--camel/camel-movemail.h45
-rw-r--r--camel/camel-multipart.c542
-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.c1159
-rw-r--r--camel/camel-object.h147
-rw-r--r--camel/camel-operation.c660
-rw-r--r--camel/camel-operation.h69
-rw-r--r--camel/camel-pgp-context.c1369
-rw-r--r--camel/camel-pgp-context.h81
-rw-r--r--camel/camel-pgp-mime.c551
-rw-r--r--camel/camel-pgp-mime.h64
-rw-r--r--camel/camel-pkcs7-context.c691
-rw-r--r--camel/camel-pkcs7-context.h73
-rw-r--r--camel/camel-private.h192
-rw-r--r--camel/camel-provider.c155
-rw-r--r--camel/camel-provider.h173
-rw-r--r--camel/camel-remote-store.c576
-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-popb4smtp.c155
-rw-r--r--camel/camel-sasl-popb4smtp.h59
-rw-r--r--camel/camel-sasl.c261
-rw-r--r--camel/camel-sasl.h77
-rw-r--r--camel/camel-search-private.c478
-rw-r--r--camel/camel-search-private.h53
-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.c678
-rw-r--r--camel/camel-service.h141
-rw-r--r--camel/camel-session.c874
-rw-r--r--camel/camel-session.h217
-rw-r--r--camel/camel-smime-context.c953
-rw-r--r--camel/camel-smime-context.h62
-rw-r--r--camel/camel-smime-utils.c126
-rw-r--r--camel/camel-smime-utils.h43
-rw-r--r--camel/camel-store.c943
-rw-r--r--camel/camel-store.h206
-rw-r--r--camel/camel-stream-buffer.c467
-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.c92
-rw-r--r--camel/camel-stream-null.h46
-rw-r--r--camel/camel-stream.c275
-rw-r--r--camel/camel-stream.h91
-rw-r--r--camel/camel-tcp-stream-openssl.c670
-rw-r--r--camel/camel-tcp-stream-openssl.h64
-rw-r--r--camel/camel-tcp-stream-raw.c456
-rw-r--r--camel/camel-tcp-stream-raw.h64
-rw-r--r--camel/camel-tcp-stream-ssl.c482
-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.c148
-rw-r--r--camel/camel-transport.h90
-rw-r--r--camel/camel-types.h81
-rw-r--r--camel/camel-uid-cache.c240
-rw-r--r--camel/camel-uid-cache.h55
-rw-r--r--camel/camel-url.c554
-rw-r--r--camel/camel-url.h90
-rw-r--r--camel/camel-vee-folder.c1178
-rw-r--r--camel/camel-vee-folder.h72
-rw-r--r--camel/camel-vee-store.c329
-rw-r--r--camel/camel-vee-store.h51
-rw-r--r--camel/camel-vtrash-folder.c141
-rw-r--r--camel/camel-vtrash-folder.h53
-rw-r--r--camel/camel.c94
-rw-r--r--camel/camel.h91
-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/imap/.cvsignore11
-rw-r--r--camel/providers/imap/Makefile.am50
-rw-r--r--camel/providers/imap/camel-imap-command.c759
-rw-r--r--camel/providers/imap/camel-imap-command.h80
-rw-r--r--camel/providers/imap/camel-imap-folder.c2052
-rw-r--r--camel/providers/imap/camel-imap-folder.h91
-rw-r--r--camel/providers/imap/camel-imap-message-cache.c503
-rw-r--r--camel/providers/imap/camel-imap-message-cache.h107
-rw-r--r--camel/providers/imap/camel-imap-private.h95
-rw-r--r--camel/providers/imap/camel-imap-provider.c151
-rw-r--r--camel/providers/imap/camel-imap-search.c161
-rw-r--r--camel/providers/imap/camel-imap-search.h51
-rw-r--r--camel/providers/imap/camel-imap-store.c1696
-rw-r--r--camel/providers/imap/camel-imap-store.h114
-rw-r--r--camel/providers/imap/camel-imap-summary.c229
-rw-r--r--camel/providers/imap/camel-imap-summary.h76
-rw-r--r--camel/providers/imap/camel-imap-types.h40
-rw-r--r--camel/providers/imap/camel-imap-utils.c831
-rw-r--r--camel/providers/imap/camel-imap-utils.h79
-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.am64
-rw-r--r--camel/providers/local/camel-local-folder.c355
-rw-r--r--camel/providers/local/camel-local-folder.h96
-rw-r--r--camel/providers/local/camel-local-private.h74
-rw-r--r--camel/providers/local/camel-local-provider.c112
-rw-r--r--camel/providers/local/camel-local-store.c319
-rw-r--r--camel/providers/local/camel-local-store.h69
-rw-r--r--camel/providers/local/camel-local-summary.c574
-rw-r--r--camel/providers/local/camel-local-summary.h86
-rw-r--r--camel/providers/local/camel-maildir-folder.c238
-rw-r--r--camel/providers/local/camel-maildir-folder.h59
-rw-r--r--camel/providers/local/camel-maildir-store.c412
-rw-r--r--camel/providers/local/camel-maildir-store.h56
-rw-r--r--camel/providers/local/camel-maildir-summary.c765
-rw-r--r--camel/providers/local/camel-maildir-summary.h84
-rw-r--r--camel/providers/local/camel-mbox-folder.c445
-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.c224
-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/camel-spool-folder.c654
-rw-r--r--camel/providers/local/camel-spool-folder.h103
-rw-r--r--camel/providers/local/camel-spool-store.c219
-rw-r--r--camel/providers/local/camel-spool-store.h67
-rw-r--r--camel/providers/local/camel-spool-summary.c1279
-rw-r--r--camel/providers/local/camel-spool-summary.h96
-rw-r--r--camel/providers/local/libcamellocal.urls4
-rw-r--r--camel/providers/nntp/.cvsignore12
-rw-r--r--camel/providers/nntp/Makefile.am41
-rw-r--r--camel/providers/nntp/camel-nntp-auth.c93
-rw-r--r--camel/providers/nntp/camel-nntp-auth.h43
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c289
-rw-r--r--camel/providers/nntp/camel-nntp-folder.h75
-rw-r--r--camel/providers/nntp/camel-nntp-grouplist.c220
-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.c114
-rw-r--r--camel/providers/nntp/camel-nntp-resp-codes.h56
-rw-r--r--camel/providers/nntp/camel-nntp-store.c876
-rw-r--r--camel/providers/nntp/camel-nntp-store.h128
-rw-r--r--camel/providers/nntp/camel-nntp-types.h34
-rw-r--r--camel/providers/nntp/camel-nntp-utils.c301
-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.c429
-rw-r--r--camel/providers/pop3/camel-pop3-folder.h72
-rw-r--r--camel/providers/pop3/camel-pop3-provider.c116
-rw-r--r--camel/providers/pop3/camel-pop3-store.c654
-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.c65
-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.am37
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c67
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c1138
-rw-r--r--camel/providers/smtp/camel-smtp-transport.h81
-rw-r--r--camel/providers/smtp/libcamelsmtp.urls1
-rw-r--r--camel/string-utils.c233
-rw-r--r--camel/string-utils.h70
-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/.cvsignore21
-rw-r--r--camel/tests/folder/Makefile.am29
-rw-r--r--camel/tests/folder/README11
-rw-r--r--camel/tests/folder/test1.c50
-rw-r--r--camel/tests/folder/test2.c58
-rw-r--r--camel/tests/folder/test3.c335
-rw-r--r--camel/tests/folder/test4.c53
-rw-r--r--camel/tests/folder/test5.c53
-rw-r--r--camel/tests/folder/test6.c55
-rw-r--r--camel/tests/folder/test7.c55
-rw-r--r--camel/tests/folder/test8.c215
-rw-r--r--camel/tests/folder/test9.c227
-rw-r--r--camel/tests/lib/.cvsignore12
-rw-r--r--camel/tests/lib/Makefile.am14
-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.c524
-rw-r--r--camel/tests/lib/folders.h20
-rw-r--r--camel/tests/lib/messages.c154
-rw-r--r--camel/tests/lib/messages.h12
-rw-r--r--camel/tests/lib/session.c59
-rw-r--r--camel/tests/lib/session.h19
-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.c326
-rw-r--r--camel/tests/message/test3.c199
-rw-r--r--camel/tests/mime-filter/.cvsignore8
-rw-r--r--camel/tests/mime-filter/Makefile.am39
-rw-r--r--camel/tests/mime-filter/crlf-1.in19
-rw-r--r--camel/tests/mime-filter/crlf-1.out19
-rw-r--r--camel/tests/mime-filter/stripheader-1.in6
-rw-r--r--camel/tests/mime-filter/stripheader-1.out5
-rw-r--r--camel/tests/mime-filter/stripheader-2.in8
-rw-r--r--camel/tests/mime-filter/stripheader-2.out6
-rw-r--r--camel/tests/mime-filter/stripheader-3.in9
-rw-r--r--camel/tests/mime-filter/stripheader-3.out7
-rw-r--r--camel/tests/mime-filter/stripheader-4.in7
-rw-r--r--camel/tests/mime-filter/stripheader-4.out5
-rw-r--r--camel/tests/mime-filter/stripheader-5.in9
-rw-r--r--camel/tests/mime-filter/stripheader-5.out5
-rw-r--r--camel/tests/mime-filter/stripheader-6.in15
-rw-r--r--camel/tests/mime-filter/stripheader-6.out6
-rw-r--r--camel/tests/mime-filter/test-crlf.c163
-rw-r--r--camel/tests/mime-filter/test-stripheader.c131
-rw-r--r--camel/tests/misc/.cvsignore12
-rw-r--r--camel/tests/misc/Makefile.am21
-rw-r--r--camel/tests/misc/README3
-rw-r--r--camel/tests/misc/url.c108
-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.c170
-rw-r--r--camel/tests/smime/pgp.c178
-rw-r--r--camel/tests/smime/pkcs7.c178
-rw-r--r--camel/tests/stream/.cvsignore14
-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--composer/.cvsignore20
-rw-r--r--composer/ChangeLog2296
-rw-r--r--composer/Composer.idl4
-rw-r--r--composer/Evolution-Composer.idl105
-rw-r--r--composer/Makefile.am96
-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.c820
-rw-r--r--composer/e-msg-composer-attachment-bar.h76
-rw-r--r--composer/e-msg-composer-attachment.c450
-rw-r--r--composer/e-msg-composer-attachment.glade280
-rw-r--r--composer/e-msg-composer-attachment.h75
-rw-r--r--composer/e-msg-composer-hdrs.c1064
-rw-r--r--composer/e-msg-composer-hdrs.h122
-rw-r--r--composer/e-msg-composer-select-file.c229
-rw-r--r--composer/e-msg-composer-select-file.h35
-rw-r--r--composer/e-msg-composer.c3583
-rw-r--r--composer/e-msg-composer.h179
-rw-r--r--composer/evolution-composer.c370
-rw-r--r--composer/evolution-composer.h70
-rw-r--r--composer/listener.c270
-rw-r--r--composer/listener.h56
-rw-r--r--configure.in1191
-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.mime5
-rw-r--r--default_user/.cvsignore2
-rw-r--r--default_user/ChangeLog242
-rw-r--r--default_user/Makefile.am12
-rw-r--r--default_user/addressbook-sources.xml17
-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/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.am9
-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.xml108
-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/COPYING-DOCS355
-rw-r--r--doc/Camel-Classes65
-rw-r--r--doc/ChangeLog1146
-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/devel/.cvsignore5
-rw-r--r--doc/devel/ChangeLog251
-rw-r--r--doc/devel/Makefile.am178
-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/.cvsignore12
-rw-r--r--doc/devel/calendar/cal-client/Makefile.am195
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client-decl.txt339
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client-docs.sgml15
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client-sections.txt69
-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.types4
-rw-r--r--doc/devel/calendar/cal-client/tmpl/cal-client.sgml329
-rw-r--r--doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml84
-rw-r--r--doc/devel/calendar/cal-util/.cvsignore12
-rw-r--r--doc/devel/calendar/cal-util/Makefile.am196
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util-decl.txt977
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util-docs.sgml19
-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.sgml993
-rw-r--r--doc/devel/calendar/cal-util/tmpl/cal-recur.sgml44
-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.sgml288
-rw-r--r--doc/devel/calendar/cal-util/tmpl/timeutil.sgml111
-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.sgml98
-rw-r--r--doc/devel/executive-summary/.cvsignore12
-rw-r--r--doc/devel/executive-summary/Makefile.am191
-rw-r--r--doc/devel/executive-summary/evolution-services-decl.txt536
-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.hierarchy7
-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.sgml8
-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/.cvsignore10
-rw-r--r--doc/devel/importer/Makefile.am195
-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.hierarchy7
-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.sgml84
-rw-r--r--doc/devel/importer/tmpl/evolution-importer.sgml96
-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/white-papers/calendar/calendar.sgml209
-rw-r--r--doc/white-papers/mail/camel.sgml356
-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/ChangeLog1566
-rw-r--r--e-util/Makefile.am100
-rw-r--r--e-util/e-bit-array.c415
-rw-r--r--e-util/e-bit-array.h82
-rw-r--r--e-util/e-bonobo-factory-util.c54
-rw-r--r--e-util/e-bonobo-factory-util.h33
-rw-r--r--e-util/e-categories-config.c204
-rw-r--r--e-util/e-categories-config.h35
-rw-r--r--e-util/e-categories-master-list-wombat.c207
-rw-r--r--e-util/e-categories-master-list-wombat.h35
-rw-r--r--e-util/e-corba-utils.c37
-rw-r--r--e-util/e-corba-utils.h30
-rw-r--r--e-util/e-db3-utils.c185
-rw-r--r--e-util/e-db3-utils.h29
-rw-r--r--e-util/e-dbhash.c225
-rw-r--r--e-util/e-dbhash.h45
-rw-r--r--e-util/e-dialog-utils.c149
-rw-r--r--e-util/e-dialog-utils.h33
-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.c153
-rw-r--r--e-util/e-gtk-utils.h42
-rw-r--r--e-util/e-gui-utils.c66
-rw-r--r--e-util/e-gui-utils.h8
-rw-r--r--e-util/e-host-utils.c155
-rw-r--r--e-util/e-host-utils.h37
-rw-r--r--e-util/e-html-utils.c417
-rw-r--r--e-util/e-html-utils.h40
-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.c249
-rw-r--r--e-util/e-list-iterator.h45
-rw-r--r--e-util/e-list.c179
-rw-r--r--e-util/e-list.h63
-rw-r--r--e-util/e-memory.c1280
-rw-r--r--e-util/e-memory.h75
-rw-r--r--e-util/e-mktemp.c267
-rw-r--r--e-util/e-mktemp.h33
-rw-r--r--e-util/e-msgport.c868
-rw-r--r--e-util/e-msgport.h82
-rw-r--r--e-util/e-passwords.c446
-rw-r--r--e-util/e-passwords.h61
-rw-r--r--e-util/e-path.c207
-rw-r--r--e-util/e-path.h36
-rw-r--r--e-util/e-pilot-map.c305
-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-request.c105
-rw-r--r--e-util/e-request.h34
-rw-r--r--e-util/e-sexp.c1292
-rw-r--r--e-util/e-sexp.h162
-rw-r--r--e-util/e-sorter-array.c278
-rw-r--r--e-util/e-sorter-array.h56
-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.c406
-rw-r--r--e-util/e-time-utils.h53
-rw-r--r--e-util/e-unicode-i18n.c59
-rw-r--r--e-util/e-unicode-i18n.h17
-rw-r--r--e-util/e-url.c338
-rw-r--r--e-util/e-url.h57
-rw-r--r--e-util/e-util.c1180
-rw-r--r--e-util/e-util.h216
-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/ChangeLog908
-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.am88
-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.c852
-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.c1341
-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.am55
-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.am7
-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.c984
-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/ChangeLog2044
-rw-r--r--filter/Makefile.am85
-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.c153
-rw-r--r--filter/filter-context.h58
-rw-r--r--filter/filter-datespec.c763
-rw-r--r--filter/filter-datespec.h64
-rw-r--r--filter/filter-editor.c187
-rw-r--r--filter/filter-editor.h54
-rw-r--r--filter/filter-element.c312
-rw-r--r--filter/filter-element.h86
-rw-r--r--filter/filter-filter.c534
-rw-r--r--filter/filter-filter.h59
-rw-r--r--filter/filter-folder.c326
-rw-r--r--filter/filter-folder.h55
-rw-r--r--filter/filter-input.c344
-rw-r--r--filter/filter-input.h58
-rw-r--r--filter/filter-int.c229
-rw-r--r--filter/filter-int.h58
-rw-r--r--filter/filter-option.c361
-rw-r--r--filter/filter-option.h62
-rw-r--r--filter/filter-part.c501
-rw-r--r--filter/filter-part.h77
-rw-r--r--filter/filter-rule.c842
-rw-r--r--filter/filter-rule.h112
-rw-r--r--filter/filter-score.c233
-rw-r--r--filter/filter-score.h56
-rw-r--r--filter/filter-source.c366
-rw-r--r--filter/filter-source.h56
-rw-r--r--filter/filter.glade738
-rw-r--r--filter/filtertypes.xml628
-rw-r--r--filter/libfilter-i18n.h53
-rw-r--r--filter/rule-context.c516
-rw-r--r--filter/rule-context.h115
-rw-r--r--filter/rule-editor.c493
-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.c221
-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.c487
-rw-r--r--filter/vfolder-rule.h60
-rw-r--r--filter/vfoldertypes.xml360
-rw-r--r--help/.cvsignore2
-rw-r--r--help/C/.cvsignore9
-rw-r--r--help/C/Makefile.am48
-rw-r--r--help/C/POTFILES.in16
-rw-r--r--help/C/apx-authors.sgml91
-rw-r--r--help/C/apx-bugs.sgml23
-rw-r--r--help/C/apx-gloss.sgml437
-rw-r--r--help/C/config-encryption.sgml147
-rw-r--r--help/C/config-prefs.sgml769
-rw-r--r--help/C/config-sync.sgml133
-rw-r--r--help/C/evolution-C.omf14
-rw-r--r--help/C/evolution-faq.sgml973
-rw-r--r--help/C/evolution.sgml140
-rw-r--r--help/C/figures/calendar.pngbin43924 -> 0 bytes
-rw-r--r--help/C/figures/config-cal.pngbin9151 -> 0 bytes
-rw-r--r--help/C/figures/config-mail.pngbin10885 -> 0 bytes
-rw-r--r--help/C/figures/contact-editor.pngbin29672 -> 0 bytes
-rw-r--r--help/C/figures/contact.pngbin39318 -> 0 bytes
-rw-r--r--help/C/figures/filter-assist-fig.pngbin12495 -> 0 bytes
-rw-r--r--help/C/figures/filter-new-fig.pngbin8802 -> 0 bytes
-rw-r--r--help/C/figures/full-1.pngbin1218 -> 0 bytes
-rw-r--r--help/C/figures/full-2.pngbin1260 -> 0 bytes
-rw-r--r--help/C/figures/full-3.pngbin1290 -> 0 bytes
-rw-r--r--help/C/figures/full-4.pngbin1251 -> 0 bytes
-rw-r--r--help/C/figures/full-5.pngbin1293 -> 0 bytes
-rw-r--r--help/C/figures/full-6.pngbin1284 -> 0 bytes
-rw-r--r--help/C/figures/full-7.pngbin818 -> 0 bytes
-rw-r--r--help/C/figures/mail-composer.pngbin14971 -> 0 bytes
-rw-r--r--help/C/figures/mail-druid-pic.pngbin8457 -> 0 bytes
-rw-r--r--help/C/figures/mail-inbox.pngbin127593 -> 0 bytes
-rw-r--r--help/C/figures/mail-threaded.pngbin45997 -> 0 bytes
-rw-r--r--help/C/figures/mainwindow-pic.pngbin130739 -> 0 bytes
-rw-r--r--help/C/figures/newmsg.pngbin25303 -> 0 bytes
-rw-r--r--help/C/figures/print-dest.pngbin7358 -> 0 bytes
-rw-r--r--help/C/figures/print-preview.pngbin51801 -> 0 bytes
-rw-r--r--help/C/figures/replymsg.pngbin23506 -> 0 bytes
-rw-r--r--help/C/figures/vfolder-createrule-fig.pngbin11228 -> 0 bytes
-rw-r--r--help/C/menuref.sgml372
-rw-r--r--help/C/preface.sgml69
-rw-r--r--help/C/topic.dat10
-rw-r--r--help/C/usage-calendar.sgml499
-rw-r--r--help/C/usage-contact.sgml628
-rw-r--r--help/C/usage-encryption.sgml147
-rw-r--r--help/C/usage-exec-summary.sgml312
-rw-r--r--help/C/usage-mail-org.sgml794
-rw-r--r--help/C/usage-mail.sgml2004
-rw-r--r--help/C/usage-mainwindow.sgml1106
-rw-r--r--help/C/usage-notes.sgml49
-rw-r--r--help/C/usage-print.sgml115
-rw-r--r--help/C/usage-sync.sgml39
-rw-r--r--help/COPYING-DOCS355
-rw-r--r--help/ChangeLog1417
-rw-r--r--help/Makefile.am3
-rw-r--r--help/README_Translations46
-rw-r--r--help/devel/executive-summary/evolution-services.hierarchy7
-rw-r--r--help/devel/importer/evolution-shell-importer.hierarchy7
-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.po446
-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.po932
-rw-r--r--help/es.po/usage-calendar.sgml.po816
-rw-r--r--help/es.po/usage-contact.sgml.po1225
-rw-r--r--help/es.po/usage-mail.sgml.po2322
-rw-r--r--help/es.po/usage-mainwindow.sgml.po788
-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
-rw-r--r--help/no/.cvsignore9
-rw-r--r--help/no/ChangeLog5
-rw-r--r--help/no/Makefile.am49
-rw-r--r--help/no/apx-authors.sgml84
-rw-r--r--help/no/apx-bugs.sgml23
-rw-r--r--help/no/apx-gloss.sgml470
-rw-r--r--help/no/config-encryption.sgml147
-rw-r--r--help/no/config-prefs.sgml669
-rw-r--r--help/no/config-sync.sgml128
-rw-r--r--help/no/evolution-faq.sgml973
-rw-r--r--help/no/evolution-no.omf14
-rw-r--r--help/no/evolution.sgml134
-rw-r--r--help/no/figures/calendar.pngbin42615 -> 0 bytes
-rw-r--r--help/no/figures/config-cal.pngbin7338 -> 0 bytes
-rw-r--r--help/no/figures/config-mail.pngbin9210 -> 0 bytes
-rw-r--r--help/no/figures/contact-editor.pngbin37707 -> 0 bytes
-rw-r--r--help/no/figures/contact.pngbin39742 -> 0 bytes
-rw-r--r--help/no/figures/filter-assist-fig.pngbin5575 -> 0 bytes
-rw-r--r--help/no/figures/filter-new-fig.pngbin8802 -> 0 bytes
-rw-r--r--help/no/figures/full-1.pngbin1218 -> 0 bytes
-rw-r--r--help/no/figures/full-2.pngbin1260 -> 0 bytes
-rw-r--r--help/no/figures/full-3.pngbin1290 -> 0 bytes
-rw-r--r--help/no/figures/full-4.pngbin1251 -> 0 bytes
-rw-r--r--help/no/figures/full-5.pngbin1293 -> 0 bytes
-rw-r--r--help/no/figures/full-6.pngbin1284 -> 0 bytes
-rw-r--r--help/no/figures/full-7.pngbin818 -> 0 bytes
-rw-r--r--help/no/figures/mail-composer.pngbin14971 -> 0 bytes
-rw-r--r--help/no/figures/mail-druid-pic.pngbin8457 -> 0 bytes
-rw-r--r--help/no/figures/mail-inbox.pngbin127593 -> 0 bytes
-rw-r--r--help/no/figures/mainwindow-pic.pngbin130739 -> 0 bytes
-rw-r--r--help/no/figures/newmsg.pngbin14798 -> 0 bytes
-rw-r--r--help/no/figures/print-dest.pngbin7358 -> 0 bytes
-rw-r--r--help/no/figures/print-preview.pngbin51801 -> 0 bytes
-rw-r--r--help/no/figures/replymsg.pngbin19338 -> 0 bytes
-rw-r--r--help/no/figures/vfolder-createrule-fig.pngbin8321 -> 0 bytes
-rw-r--r--help/no/menuref.sgml1138
-rw-r--r--help/no/preface.sgml495
-rw-r--r--help/no/topic.dat10
-rw-r--r--help/no/usage-calendar.sgml451
-rw-r--r--help/no/usage-contact.sgml639
-rw-r--r--help/no/usage-encryption.sgml147
-rw-r--r--help/no/usage-exec-summary.sgml187
-rw-r--r--help/no/usage-mail-org.sgml801
-rw-r--r--help/no/usage-mail.sgml1447
-rw-r--r--help/no/usage-mainwindow.sgml769
-rw-r--r--help/no/usage-notes.sgml49
-rw-r--r--help/no/usage-print.sgml103
-rw-r--r--help/no/usage-sync.sgml21
-rw-r--r--help/sgmldocs.make139
-rwxr-xr-xhelp/update_po.pl212
-rwxr-xr-xhelp/update_translation.pl240
-rw-r--r--importers/.cvsignore20
-rw-r--r--importers/ChangeLog252
-rw-r--r--importers/GNOME_Evolution_Elm_Intelligent_Importer.oaf.in21
-rw-r--r--importers/GNOME_Evolution_GnomeCard_Intelligent_Importer.oaf.in21
-rw-r--r--importers/GNOME_Evolution_Netscape_Intelligent_Importer.oaf.in21
-rw-r--r--importers/GNOME_Evolution_Pine_Intelligent_Importer.oaf.in21
-rw-r--r--importers/Makefile.am90
-rw-r--r--importers/elm-importer.c626
-rw-r--r--importers/evolution-gnomecard-importer.c332
-rw-r--r--importers/netscape-importer.c1075
-rw-r--r--importers/pine-importer.c771
-rw-r--r--libibex/.cvsignore9
-rw-r--r--libibex/COPYING.LIB481
-rw-r--r--libibex/ChangeLog494
-rw-r--r--libibex/Makefile.am34
-rw-r--r--libibex/TODO61
-rw-r--r--libibex/block.c621
-rw-r--r--libibex/block.h125
-rw-r--r--libibex/diskarray.c255
-rw-r--r--libibex/disktail.c820
-rw-r--r--libibex/dumpindex.c66
-rw-r--r--libibex/hash.c857
-rw-r--r--libibex/ibex.h106
-rw-r--r--libibex/ibex_block.c602
-rw-r--r--libibex/ibex_internal.h60
-rw-r--r--libibex/index.h103
-rw-r--r--libibex/testindex.c320
-rw-r--r--libibex/wordindex.c646
-rw-r--r--libibex/wordindex.h76
-rw-r--r--libibex/wordindexmem.c902
-rw-r--r--libical/.cvsignore19
-rw-r--r--libical/AUTHORS1
-rw-r--r--libical/COPYING0
-rw-r--r--libical/ChangeLog1053
-rw-r--r--libical/INSTALL24
-rw-r--r--libical/Makefile.am12
-rw-r--r--libical/NEWS447
-rw-r--r--libical/README100
-rw-r--r--libical/TEST4
-rw-r--r--libical/THANKS54
-rw-r--r--libical/TODO39
-rw-r--r--libical/acconfig.h20
-rwxr-xr-xlibical/autogen.sh80
-rw-r--r--libical/configure.in102
-rw-r--r--libical/design-data/.cvsignore2
-rw-r--r--libical/design-data/Makefile.am6
-rw-r--r--libical/design-data/components.txt22
-rw-r--r--libical/design-data/param-c-types.txt23
-rw-r--r--libical/design-data/parameters.csv24
-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/properties.csv66
-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/design-data/value-types.csv31
-rw-r--r--libical/doc/.cvsignore2
-rw-r--r--libical/doc/Makefile.am1
-rw-r--r--libical/doc/UsingLibical.lyx2578
-rw-r--r--libical/doc/UsingLibical.ps2327
-rw-r--r--libical/doc/UsingLibical.txt1384
-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
-rw-r--r--libical/scripts/.cvsignore2
-rw-r--r--libical/scripts/Makefile.am9
-rwxr-xr-xlibical/scripts/mkderivedcomponents.pl170
-rwxr-xr-xlibical/scripts/mkderivedparameters.pl321
-rwxr-xr-xlibical/scripts/mkderivedproperties.pl239
-rwxr-xr-xlibical/scripts/mkderivedvalues.pl223
-rwxr-xr-xlibical/scripts/mkparameterrestrictions.pl85
-rwxr-xr-xlibical/scripts/mkrestrictionrecords.pl109
-rwxr-xr-xlibical/scripts/mkrestrictiontable.pl98
-rw-r--r--libical/scripts/readvaluesfile.pl130
-rw-r--r--libical/src/.cvsignore2
-rw-r--r--libical/src/Makefile.am7
-rw-r--r--libical/src/libical/.cvsignore22
-rw-r--r--libical/src/libical/Makefile.am237
-rw-r--r--libical/src/libical/icalarray.c147
-rw-r--r--libical/src/libical/icalarray.h61
-rw-r--r--libical/src/libical/icalattendee.c30
-rw-r--r--libical/src/libical/icalattendee.h68
-rw-r--r--libical/src/libical/icalcomponent.c1932
-rw-r--r--libical/src/libical/icalcomponent.h264
-rw-r--r--libical/src/libical/icalderivedparameter.c.in211
-rw-r--r--libical/src/libical/icalderivedparameter.h.in37
-rw-r--r--libical/src/libical/icalderivedproperty.c.in250
-rw-r--r--libical/src/libical/icalderivedproperty.h.in23
-rw-r--r--libical/src/libical/icalderivedvalue.c.in341
-rw-r--r--libical/src/libical/icalderivedvalue.h.in61
-rw-r--r--libical/src/libical/icalduration.c320
-rw-r--r--libical/src/libical/icalduration.h60
-rw-r--r--libical/src/libical/icalenums.c135
-rw-r--r--libical/src/libical/icalenums.h157
-rw-r--r--libical/src/libical/icalerror.c194
-rw-r--r--libical/src/libical/icalerror.h153
-rw-r--r--libical/src/libical/icallangbind.c272
-rw-r--r--libical/src/libical/icallangbind.h49
-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.c392
-rw-r--r--libical/src/libical/icalparameter.h69
-rw-r--r--libical/src/libical/icalparameterimpl.h52
-rw-r--r--libical/src/libical/icalparser.c1121
-rw-r--r--libical/src/libical/icalparser.h93
-rw-r--r--libical/src/libical/icalperiod.c174
-rw-r--r--libical/src/libical/icalperiod.h55
-rw-r--r--libical/src/libical/icalproperty.c808
-rw-r--r--libical/src/libical/icalproperty.h116
-rw-r--r--libical/src/libical/icalrecur.c2353
-rw-r--r--libical/src/libical/icalrecur.h189
-rw-r--r--libical/src/libical/icalrestriction.c.in447
-rw-r--r--libical/src/libical/icalrestriction.h64
-rw-r--r--libical/src/libical/icaltime.c714
-rw-r--r--libical/src/libical/icaltime.h156
-rw-r--r--libical/src/libical/icaltimezone.c1621
-rw-r--r--libical/src/libical/icaltimezone.h142
-rw-r--r--libical/src/libical/icaltypes.c255
-rw-r--r--libical/src/libical/icaltypes.h135
-rw-r--r--libical/src/libical/icalvalue.c1245
-rw-r--r--libical/src/libical/icalvalue.h85
-rw-r--r--libical/src/libical/icalvalueimpl.h117
-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/.cvsignore10
-rw-r--r--libical/src/libicalss/Makefile.am69
-rw-r--r--libical/src/libicalss/icalcalendar.c265
-rw-r--r--libical/src/libicalss/icalcalendar.h67
-rw-r--r--libical/src/libicalss/icalclassify.c696
-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.c116
-rw-r--r--libical/src/libicalss/icalcstp.h79
-rw-r--r--libical/src/libicalss/icalcstpclient.c343
-rw-r--r--libical/src/libicalss/icalcstpclient.h100
-rw-r--r--libical/src/libicalss/icalcstpserver.c278
-rw-r--r--libical/src/libicalss/icalcstpserver.h101
-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.c637
-rw-r--r--libical/src/libicalss/icalfileset.h105
-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.h111
-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.am29
-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/python/.cvsignore2
-rw-r--r--libical/src/python/ChangeLog109
-rw-r--r--libical/src/python/Collection.py124
-rw-r--r--libical/src/python/Component.py670
-rw-r--r--libical/src/python/DerivedProperties.py59
-rw-r--r--libical/src/python/Libical.py39
-rw-r--r--libical/src/python/LibicalWrap.i352
-rw-r--r--libical/src/python/Makefile.am42
-rw-r--r--libical/src/python/Property.py839
-rw-r--r--libical/src/python/Store.py176
-rw-r--r--libical/src/python/python-binding.txt434
-rw-r--r--libical/src/python/test.py373
-rw-r--r--libical/src/test/.cvsignore18
-rw-r--r--libical/src/test/Makefile.am25
-rw-r--r--libical/src/test/copycluster.c130
-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.c120
-rw-r--r--libical/src/test/regression.c3605
-rw-r--r--libical/src/test/storage.c459
-rw-r--r--libical/src/test/stow.c866
-rw-r--r--libical/src/test/testclassify.c156
-rw-r--r--libical/src/test/testmime.c340
-rw-r--r--libical/src/test/testvcal.c64
-rw-r--r--libical/test-data/.cvsignore2
-rw-r--r--libical/test-data/07
-rw-r--r--libical/test-data/138
-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.ics1006
-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.txt404
-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--libical/zoneinfo/.cvsignore2
-rw-r--r--libical/zoneinfo/Africa/Abidjan.ics15
-rw-r--r--libical/zoneinfo/Africa/Accra.ics41
-rw-r--r--libical/zoneinfo/Africa/Addis_Ababa.ics22
-rw-r--r--libical/zoneinfo/Africa/Algiers.ics90
-rw-r--r--libical/zoneinfo/Africa/Asmera.ics29
-rw-r--r--libical/zoneinfo/Africa/Bamako.ics29
-rw-r--r--libical/zoneinfo/Africa/Bangui.ics15
-rw-r--r--libical/zoneinfo/Africa/Banjul.ics29
-rw-r--r--libical/zoneinfo/Africa/Bissau.ics22
-rw-r--r--libical/zoneinfo/Africa/Blantyre.ics15
-rw-r--r--libical/zoneinfo/Africa/Brazzaville.ics15
-rw-r--r--libical/zoneinfo/Africa/Bujumbura.ics15
-rw-r--r--libical/zoneinfo/Africa/Cairo.ics130
-rw-r--r--libical/zoneinfo/Africa/Casablanca.ics51
-rw-r--r--libical/zoneinfo/Africa/Ceuta.ics99
-rw-r--r--libical/zoneinfo/Africa/Conakry.ics29
-rw-r--r--libical/zoneinfo/Africa/Dakar.ics22
-rw-r--r--libical/zoneinfo/Africa/Dar_es_Salaam.ics29
-rw-r--r--libical/zoneinfo/Africa/Djibouti.ics15
-rw-r--r--libical/zoneinfo/Africa/Douala.ics15
-rw-r--r--libical/zoneinfo/Africa/El_Aaiun.ics22
-rw-r--r--libical/zoneinfo/Africa/Freetown.ics81
-rw-r--r--libical/zoneinfo/Africa/Gaborone.ics29
-rw-r--r--libical/zoneinfo/Africa/Harare.ics15
-rw-r--r--libical/zoneinfo/Africa/Johannesburg.ics38
-rw-r--r--libical/zoneinfo/Africa/Kampala.ics36
-rw-r--r--libical/zoneinfo/Africa/Khartoum.ics66
-rw-r--r--libical/zoneinfo/Africa/Kigali.ics15
-rw-r--r--libical/zoneinfo/Africa/Kinshasa.ics15
-rw-r--r--libical/zoneinfo/Africa/Lagos.ics15
-rw-r--r--libical/zoneinfo/Africa/Libreville.ics15
-rw-r--r--libical/zoneinfo/Africa/Lome.ics15
-rw-r--r--libical/zoneinfo/Africa/Luanda.ics22
-rw-r--r--libical/zoneinfo/Africa/Lubumbashi.ics15
-rw-r--r--libical/zoneinfo/Africa/Lusaka.ics15
-rw-r--r--libical/zoneinfo/Africa/Malabo.ics22
-rw-r--r--libical/zoneinfo/Africa/Maputo.ics15
-rw-r--r--libical/zoneinfo/Africa/Maseru.ics29
-rw-r--r--libical/zoneinfo/Africa/Mbabane.ics15
-rw-r--r--libical/zoneinfo/Africa/Mogadishu.ics29
-rw-r--r--libical/zoneinfo/Africa/Monrovia.ics29
-rw-r--r--libical/zoneinfo/Africa/Nairobi.ics36
-rw-r--r--libical/zoneinfo/Africa/Ndjamena.ics29
-rw-r--r--libical/zoneinfo/Africa/Niamey.ics29
-rw-r--r--libical/zoneinfo/Africa/Nouakchott.ics29
-rw-r--r--libical/zoneinfo/Africa/Ouagadougou.ics15
-rw-r--r--libical/zoneinfo/Africa/Porto-Novo.ics22
-rw-r--r--libical/zoneinfo/Africa/Sao_Tome.ics22
-rw-r--r--libical/zoneinfo/Africa/Timbuktu.ics15
-rw-r--r--libical/zoneinfo/Africa/Tripoli.ics67
-rw-r--r--libical/zoneinfo/Africa/Tunis.ics58
-rw-r--r--libical/zoneinfo/Africa/Windhoek.ics64
-rw-r--r--libical/zoneinfo/America/Adak.ics130
-rw-r--r--libical/zoneinfo/America/Anchorage.ics124
-rw-r--r--libical/zoneinfo/America/Anguilla.ics15
-rw-r--r--libical/zoneinfo/America/Antigua.ics22
-rw-r--r--libical/zoneinfo/America/Araguaina.ics91
-rw-r--r--libical/zoneinfo/America/Aruba.ics22
-rw-r--r--libical/zoneinfo/America/Asuncion.ics106
-rw-r--r--libical/zoneinfo/America/Barbados.ics42
-rw-r--r--libical/zoneinfo/America/Belem.ics62
-rw-r--r--libical/zoneinfo/America/Belize.ics93
-rw-r--r--libical/zoneinfo/America/Boa_Vista.ics67
-rw-r--r--libical/zoneinfo/America/Bogota.ics36
-rw-r--r--libical/zoneinfo/America/Boise.ics114
-rw-r--r--libical/zoneinfo/America/Buenos_Aires.ics131
-rw-r--r--libical/zoneinfo/America/Cambridge_Bay.ics136
-rw-r--r--libical/zoneinfo/America/Cancun.ics83
-rw-r--r--libical/zoneinfo/America/Caracas.ics29
-rw-r--r--libical/zoneinfo/America/Catamarca.ics130
-rw-r--r--libical/zoneinfo/America/Cayenne.ics22
-rw-r--r--libical/zoneinfo/America/Cayman.ics22
-rw-r--r--libical/zoneinfo/America/Chicago.ics170
-rw-r--r--libical/zoneinfo/America/Chihuahua.ics88
-rw-r--r--libical/zoneinfo/America/Cordoba.ics126
-rw-r--r--libical/zoneinfo/America/Costa_Rica.ics42
-rw-r--r--libical/zoneinfo/America/Cuiaba.ics93
-rw-r--r--libical/zoneinfo/America/Curacao.ics22
-rw-r--r--libical/zoneinfo/America/Dawson.ics87
-rw-r--r--libical/zoneinfo/America/Dawson_Creek.ics102
-rw-r--r--libical/zoneinfo/America/Denver.ics90
-rw-r--r--libical/zoneinfo/America/Detroit.ics94
-rw-r--r--libical/zoneinfo/America/Dominica.ics15
-rw-r--r--libical/zoneinfo/America/Edmonton.ics82
-rw-r--r--libical/zoneinfo/America/Eirunepe.ics66
-rw-r--r--libical/zoneinfo/America/El_Salvador.ics31
-rw-r--r--libical/zoneinfo/America/Fortaleza.ics71
-rw-r--r--libical/zoneinfo/America/Glace_Bay.ics71
-rw-r--r--libical/zoneinfo/America/Godthab.ics58
-rw-r--r--libical/zoneinfo/America/Goose_Bay.ics221
-rw-r--r--libical/zoneinfo/America/Grand_Turk.ics50
-rw-r--r--libical/zoneinfo/America/Grenada.ics15
-rw-r--r--libical/zoneinfo/America/Guadeloupe.ics15
-rw-r--r--libical/zoneinfo/America/Guatemala.ics33
-rw-r--r--libical/zoneinfo/America/Guayaquil.ics22
-rw-r--r--libical/zoneinfo/America/Guyana.ics36
-rw-r--r--libical/zoneinfo/America/Halifax.ics155
-rw-r--r--libical/zoneinfo/America/Havana.ics128
-rw-r--r--libical/zoneinfo/America/Hermosillo.ics66
-rw-r--r--libical/zoneinfo/America/Indiana/Indianapolis.ics108
-rw-r--r--libical/zoneinfo/America/Indiana/Knox.ics147
-rw-r--r--libical/zoneinfo/America/Indiana/Marengo.ics116
-rw-r--r--libical/zoneinfo/America/Indiana/Vevay.ics81
-rw-r--r--libical/zoneinfo/America/Indianapolis.ics108
-rw-r--r--libical/zoneinfo/America/Inuvik.ics87
-rw-r--r--libical/zoneinfo/America/Iqaluit.ics127
-rw-r--r--libical/zoneinfo/America/Jamaica.ics61
-rw-r--r--libical/zoneinfo/America/Jujuy.ics148
-rw-r--r--libical/zoneinfo/America/Juneau.ics117
-rw-r--r--libical/zoneinfo/America/Kentucky/Louisville.ics153
-rw-r--r--libical/zoneinfo/America/Kentucky/Monticello.ics140
-rw-r--r--libical/zoneinfo/America/La_Paz.ics29
-rw-r--r--libical/zoneinfo/America/Lima.ics46
-rw-r--r--libical/zoneinfo/America/Los_Angeles.ics119
-rw-r--r--libical/zoneinfo/America/Louisville.ics153
-rw-r--r--libical/zoneinfo/America/Maceio.ics75
-rw-r--r--libical/zoneinfo/America/Managua.ics50
-rw-r--r--libical/zoneinfo/America/Manaus.ics60
-rw-r--r--libical/zoneinfo/America/Martinique.ics36
-rw-r--r--libical/zoneinfo/America/Mazatlan.ics77
-rw-r--r--libical/zoneinfo/America/Mendoza.ics148
-rw-r--r--libical/zoneinfo/America/Menominee.ics98
-rw-r--r--libical/zoneinfo/America/Merida.ics59
-rw-r--r--libical/zoneinfo/America/Mexico_City.ics82
-rw-r--r--libical/zoneinfo/America/Miquelon.ics55
-rw-r--r--libical/zoneinfo/America/Monterrey.ics61
-rw-r--r--libical/zoneinfo/America/Montevideo.ics133
-rw-r--r--libical/zoneinfo/America/Montreal.ics139
-rw-r--r--libical/zoneinfo/America/Montserrat.ics15
-rw-r--r--libical/zoneinfo/America/Nassau.ics58
-rw-r--r--libical/zoneinfo/America/New_York.ics164
-rw-r--r--libical/zoneinfo/America/Nipigon.ics64
-rw-r--r--libical/zoneinfo/America/Nome.ics130
-rw-r--r--libical/zoneinfo/America/Noronha.ics66
-rw-r--r--libical/zoneinfo/America/Panama.ics22
-rw-r--r--libical/zoneinfo/America/Pangnirtung.ics145
-rw-r--r--libical/zoneinfo/America/Paramaribo.ics37
-rw-r--r--libical/zoneinfo/America/Phoenix.ics51
-rw-r--r--libical/zoneinfo/America/Port-au-Prince.ics64
-rw-r--r--libical/zoneinfo/America/Port_of_Spain.ics15
-rw-r--r--libical/zoneinfo/America/Porto_Velho.ics62
-rw-r--r--libical/zoneinfo/America/Puerto_Rico.ics29
-rw-r--r--libical/zoneinfo/America/Rainy_River.ics64
-rw-r--r--libical/zoneinfo/America/Rankin_Inlet.ics123
-rw-r--r--libical/zoneinfo/America/Recife.ics71
-rw-r--r--libical/zoneinfo/America/Regina.ics92
-rw-r--r--libical/zoneinfo/America/Rio_Branco.ics62
-rw-r--r--libical/zoneinfo/America/Rosario.ics128
-rw-r--r--libical/zoneinfo/America/Santiago.ics145
-rw-r--r--libical/zoneinfo/America/Santo_Domingo.ics67
-rw-r--r--libical/zoneinfo/America/Sao_Paulo.ics100
-rw-r--r--libical/zoneinfo/America/Scoresbysund.ics71
-rw-r--r--libical/zoneinfo/America/Shiprock.ics90
-rw-r--r--libical/zoneinfo/America/St_Johns.ics222
-rw-r--r--libical/zoneinfo/America/St_Kitts.ics15
-rw-r--r--libical/zoneinfo/America/St_Lucia.ics22
-rw-r--r--libical/zoneinfo/America/St_Thomas.ics15
-rw-r--r--libical/zoneinfo/America/St_Vincent.ics22
-rw-r--r--libical/zoneinfo/America/Swift_Current.ics67
-rw-r--r--libical/zoneinfo/America/Tegucigalpa.ics31
-rw-r--r--libical/zoneinfo/America/Thule.ics29
-rw-r--r--libical/zoneinfo/America/Thunder_Bay.ics79
-rw-r--r--libical/zoneinfo/America/Tijuana.ics98
-rw-r--r--libical/zoneinfo/America/Tortola.ics15
-rw-r--r--libical/zoneinfo/America/Vancouver.ics108
-rw-r--r--libical/zoneinfo/America/Whitehorse.ics87
-rw-r--r--libical/zoneinfo/America/Winnipeg.ics129
-rw-r--r--libical/zoneinfo/America/Yakutat.ics110
-rw-r--r--libical/zoneinfo/America/Yellowknife.ics74
-rw-r--r--libical/zoneinfo/Antarctica/Casey.ics15
-rw-r--r--libical/zoneinfo/Antarctica/Davis.ics23
-rw-r--r--libical/zoneinfo/Antarctica/DumontDUrville.ics29
-rw-r--r--libical/zoneinfo/Antarctica/Mawson.ics15
-rw-r--r--libical/zoneinfo/Antarctica/McMurdo.ics72
-rw-r--r--libical/zoneinfo/Antarctica/Palmer.ics130
-rw-r--r--libical/zoneinfo/Antarctica/South_Pole.ics72
-rw-r--r--libical/zoneinfo/Antarctica/Syowa.ics15
-rw-r--r--libical/zoneinfo/Antarctica/Vostok.ics15
-rw-r--r--libical/zoneinfo/Arctic/Longyearbyen.ics89
-rw-r--r--libical/zoneinfo/Asia/Aden.ics15
-rw-r--r--libical/zoneinfo/Asia/Almaty.ics87
-rw-r--r--libical/zoneinfo/Asia/Amman.ics82
-rw-r--r--libical/zoneinfo/Asia/Anadyr.ics112
-rw-r--r--libical/zoneinfo/Asia/Aqtau.ics115
-rw-r--r--libical/zoneinfo/Asia/Aqtobe.ics99
-rw-r--r--libical/zoneinfo/Asia/Ashgabat.ics82
-rw-r--r--libical/zoneinfo/Asia/Baghdad.ics66
-rw-r--r--libical/zoneinfo/Asia/Bahrain.ics22
-rw-r--r--libical/zoneinfo/Asia/Baku.ics126
-rw-r--r--libical/zoneinfo/Asia/Bangkok.ics22
-rw-r--r--libical/zoneinfo/Asia/Beirut.ics97
-rw-r--r--libical/zoneinfo/Asia/Bishkek.ics98
-rw-r--r--libical/zoneinfo/Asia/Brunei.ics22
-rw-r--r--libical/zoneinfo/Asia/Calcutta.ics37
-rw-r--r--libical/zoneinfo/Asia/Chungking.ics46
-rw-r--r--libical/zoneinfo/Asia/Colombo.ics57
-rw-r--r--libical/zoneinfo/Asia/Damascus.ics108
-rw-r--r--libical/zoneinfo/Asia/Dhaka.ics50
-rw-r--r--libical/zoneinfo/Asia/Dili.ics43
-rw-r--r--libical/zoneinfo/Asia/Dubai.ics15
-rw-r--r--libical/zoneinfo/Asia/Dushanbe.ics68
-rw-r--r--libical/zoneinfo/Asia/Gaza.ics132
-rw-r--r--libical/zoneinfo/Asia/Harbin.ics61
-rw-r--r--libical/zoneinfo/Asia/Hong_Kong.ics95
-rw-r--r--libical/zoneinfo/Asia/Hovd.ics68
-rw-r--r--libical/zoneinfo/Asia/Irkutsk.ics95
-rw-r--r--libical/zoneinfo/Asia/Istanbul.ics161
-rw-r--r--libical/zoneinfo/Asia/Jakarta.ics64
-rw-r--r--libical/zoneinfo/Asia/Jayapura.ics29
-rw-r--r--libical/zoneinfo/Asia/Jerusalem.ics135
-rw-r--r--libical/zoneinfo/Asia/Kabul.ics22
-rw-r--r--libical/zoneinfo/Asia/Kamchatka.ics88
-rw-r--r--libical/zoneinfo/Asia/Karachi.ics43
-rw-r--r--libical/zoneinfo/Asia/Kashgar.ics53
-rw-r--r--libical/zoneinfo/Asia/Katmandu.ics22
-rw-r--r--libical/zoneinfo/Asia/Krasnoyarsk.ics88
-rw-r--r--libical/zoneinfo/Asia/Kuala_Lumpur.ics57
-rw-r--r--libical/zoneinfo/Asia/Kuching.ics69
-rw-r--r--libical/zoneinfo/Asia/Kuwait.ics15
-rw-r--r--libical/zoneinfo/Asia/Macao.ics74
-rw-r--r--libical/zoneinfo/Asia/Magadan.ics88
-rw-r--r--libical/zoneinfo/Asia/Manila.ics48
-rw-r--r--libical/zoneinfo/Asia/Muscat.ics15
-rw-r--r--libical/zoneinfo/Asia/Nicosia.ics96
-rw-r--r--libical/zoneinfo/Asia/Novosibirsk.ics102
-rw-r--r--libical/zoneinfo/Asia/Omsk.ics88
-rw-r--r--libical/zoneinfo/Asia/Phnom_Penh.ics36
-rw-r--r--libical/zoneinfo/Asia/Pontianak.ics64
-rw-r--r--libical/zoneinfo/Asia/Pyongyang.ics44
-rw-r--r--libical/zoneinfo/Asia/Qatar.ics22
-rw-r--r--libical/zoneinfo/Asia/Rangoon.ics36
-rw-r--r--libical/zoneinfo/Asia/Riyadh.ics15
-rw-r--r--libical/zoneinfo/Asia/Saigon.ics36
-rw-r--r--libical/zoneinfo/Asia/Samarkand.ics97
-rw-r--r--libical/zoneinfo/Asia/Seoul.ics69
-rw-r--r--libical/zoneinfo/Asia/Shanghai.ics50
-rw-r--r--libical/zoneinfo/Asia/Singapore.ics64
-rw-r--r--libical/zoneinfo/Asia/Taipei.ics67
-rw-r--r--libical/zoneinfo/Asia/Tashkent.ics85
-rw-r--r--libical/zoneinfo/Asia/Tbilisi.ics138
-rw-r--r--libical/zoneinfo/Asia/Tehran.ics160
-rw-r--r--libical/zoneinfo/Asia/Thimphu.ics22
-rw-r--r--libical/zoneinfo/Asia/Tokyo.ics29
-rw-r--r--libical/zoneinfo/Asia/Ujung_Pandang.ics36
-rw-r--r--libical/zoneinfo/Asia/Ulaanbaatar.ics68
-rw-r--r--libical/zoneinfo/Asia/Urumqi.ics46
-rw-r--r--libical/zoneinfo/Asia/Vientiane.ics36
-rw-r--r--libical/zoneinfo/Asia/Vladivostok.ics88
-rw-r--r--libical/zoneinfo/Asia/Yakutsk.ics88
-rw-r--r--libical/zoneinfo/Asia/Yekaterinburg.ics106
-rw-r--r--libical/zoneinfo/Asia/Yerevan.ics110
-rw-r--r--libical/zoneinfo/Atlantic/Azores.ics223
-rw-r--r--libical/zoneinfo/Atlantic/Bermuda.ics48
-rw-r--r--libical/zoneinfo/Atlantic/Canary.ics65
-rw-r--r--libical/zoneinfo/Atlantic/Cape_Verde.ics36
-rw-r--r--libical/zoneinfo/Atlantic/Faeroe.ics57
-rw-r--r--libical/zoneinfo/Atlantic/Jan_Mayen.ics89
-rw-r--r--libical/zoneinfo/Atlantic/Madeira.ics201
-rw-r--r--libical/zoneinfo/Atlantic/Reykjavik.ics103
-rw-r--r--libical/zoneinfo/Atlantic/South_Georgia.ics15
-rw-r--r--libical/zoneinfo/Atlantic/St_Helena.ics22
-rw-r--r--libical/zoneinfo/Atlantic/Stanley.ics120
-rw-r--r--libical/zoneinfo/Australia/Adelaide.ics102
-rw-r--r--libical/zoneinfo/Australia/Brisbane.ics50
-rw-r--r--libical/zoneinfo/Australia/Broken_Hill.ics116
-rw-r--r--libical/zoneinfo/Australia/Darwin.ics42
-rw-r--r--libical/zoneinfo/Australia/Hobart.ics114
-rw-r--r--libical/zoneinfo/Australia/Lindeman.ics55
-rw-r--r--libical/zoneinfo/Australia/Lord_Howe.ics94
-rw-r--r--libical/zoneinfo/Australia/Melbourne.ics109
-rw-r--r--libical/zoneinfo/Australia/Perth.ics46
-rw-r--r--libical/zoneinfo/Australia/Sydney.ics110
-rw-r--r--libical/zoneinfo/Europe/Amsterdam.ics164
-rw-r--r--libical/zoneinfo/Europe/Andorra.ics53
-rw-r--r--libical/zoneinfo/Europe/Athens.ics122
-rw-r--r--libical/zoneinfo/Europe/Belfast.ics220
-rw-r--r--libical/zoneinfo/Europe/Belgrade.ics69
-rw-r--r--libical/zoneinfo/Europe/Berlin.ics103
-rw-r--r--libical/zoneinfo/Europe/Bratislava.ics96
-rw-r--r--libical/zoneinfo/Europe/Brussels.ics158
-rw-r--r--libical/zoneinfo/Europe/Bucharest.ics109
-rw-r--r--libical/zoneinfo/Europe/Budapest.ics101
-rw-r--r--libical/zoneinfo/Europe/Chisinau.ics167
-rw-r--r--libical/zoneinfo/Europe/Copenhagen.ics88
-rw-r--r--libical/zoneinfo/Europe/Dublin.ics201
-rw-r--r--libical/zoneinfo/Europe/Gibraltar.ics171
-rw-r--r--libical/zoneinfo/Europe/Helsinki.ics72
-rw-r--r--libical/zoneinfo/Europe/Istanbul.ics161
-rw-r--r--libical/zoneinfo/Europe/Kaliningrad.ics138
-rw-r--r--libical/zoneinfo/Europe/Kiev.ics143
-rw-r--r--libical/zoneinfo/Europe/Lisbon.ics228
-rw-r--r--libical/zoneinfo/Europe/Ljubljana.ics69
-rw-r--r--libical/zoneinfo/Europe/London.ics208
-rw-r--r--libical/zoneinfo/Europe/Luxembourg.ics161
-rw-r--r--libical/zoneinfo/Europe/Madrid.ics136
-rw-r--r--libical/zoneinfo/Europe/Malta.ics117
-rw-r--r--libical/zoneinfo/Europe/Minsk.ics135
-rw-r--r--libical/zoneinfo/Europe/Monaco.ics163
-rw-r--r--libical/zoneinfo/Europe/Moscow.ics155
-rw-r--r--libical/zoneinfo/Europe/Nicosia.ics96
-rw-r--r--libical/zoneinfo/Europe/Oslo.ics89
-rw-r--r--libical/zoneinfo/Europe/Paris.ics162
-rw-r--r--libical/zoneinfo/Europe/Prague.ics96
-rw-r--r--libical/zoneinfo/Europe/Riga.ics173
-rw-r--r--libical/zoneinfo/Europe/Rome.ics125
-rw-r--r--libical/zoneinfo/Europe/Samara.ics124
-rw-r--r--libical/zoneinfo/Europe/San_Marino.ics125
-rw-r--r--libical/zoneinfo/Europe/Sarajevo.ics69
-rw-r--r--libical/zoneinfo/Europe/Simferopol.ics151
-rw-r--r--libical/zoneinfo/Europe/Skopje.ics69
-rw-r--r--libical/zoneinfo/Europe/Sofia.ics116
-rw-r--r--libical/zoneinfo/Europe/Stockholm.ics68
-rw-r--r--libical/zoneinfo/Europe/Tallinn.ics151
-rw-r--r--libical/zoneinfo/Europe/Tirane.ics85
-rw-r--r--libical/zoneinfo/Europe/Uzhgorod.ics146
-rw-r--r--libical/zoneinfo/Europe/Vaduz.ics57
-rw-r--r--libical/zoneinfo/Europe/Vatican.ics125
-rw-r--r--libical/zoneinfo/Europe/Vienna.ics85
-rw-r--r--libical/zoneinfo/Europe/Vilnius.ics155
-rw-r--r--libical/zoneinfo/Europe/Warsaw.ics157
-rw-r--r--libical/zoneinfo/Europe/Zagreb.ics69
-rw-r--r--libical/zoneinfo/Europe/Zaporozhye.ics138
-rw-r--r--libical/zoneinfo/Europe/Zurich.ics76
-rw-r--r--libical/zoneinfo/Indian/Antananarivo.ics29
-rw-r--r--libical/zoneinfo/Indian/Chagos.ics15
-rw-r--r--libical/zoneinfo/Indian/Christmas.ics15
-rw-r--r--libical/zoneinfo/Indian/Cocos.ics15
-rw-r--r--libical/zoneinfo/Indian/Comoro.ics15
-rw-r--r--libical/zoneinfo/Indian/Kerguelen.ics15
-rw-r--r--libical/zoneinfo/Indian/Mahe.ics15
-rw-r--r--libical/zoneinfo/Indian/Maldives.ics22
-rw-r--r--libical/zoneinfo/Indian/Mauritius.ics15
-rw-r--r--libical/zoneinfo/Indian/Mayotte.ics15
-rw-r--r--libical/zoneinfo/Indian/Reunion.ics15
-rw-r--r--libical/zoneinfo/Makefile.am38
-rw-r--r--libical/zoneinfo/Pacific/Apia.ics29
-rw-r--r--libical/zoneinfo/Pacific/Auckland.ics117
-rw-r--r--libical/zoneinfo/Pacific/Chatham.ics22
-rw-r--r--libical/zoneinfo/Pacific/Easter.ics133
-rw-r--r--libical/zoneinfo/Pacific/Efate.ics47
-rw-r--r--libical/zoneinfo/Pacific/Enderbury.ics29
-rw-r--r--libical/zoneinfo/Pacific/Fakaofo.ics15
-rw-r--r--libical/zoneinfo/Pacific/Fiji.ics31
-rw-r--r--libical/zoneinfo/Pacific/Funafuti.ics15
-rw-r--r--libical/zoneinfo/Pacific/Galapagos.ics22
-rw-r--r--libical/zoneinfo/Pacific/Gambier.ics15
-rw-r--r--libical/zoneinfo/Pacific/Guadalcanal.ics15
-rw-r--r--libical/zoneinfo/Pacific/Guam.ics29
-rw-r--r--libical/zoneinfo/Pacific/Honolulu.ics51
-rw-r--r--libical/zoneinfo/Pacific/Johnston.ics15
-rw-r--r--libical/zoneinfo/Pacific/Kiritimati.ics29
-rw-r--r--libical/zoneinfo/Pacific/Kosrae.ics29
-rw-r--r--libical/zoneinfo/Pacific/Kwajalein.ics29
-rw-r--r--libical/zoneinfo/Pacific/Majuro.ics22
-rw-r--r--libical/zoneinfo/Pacific/Marquesas.ics15
-rw-r--r--libical/zoneinfo/Pacific/Midway.ics29
-rw-r--r--libical/zoneinfo/Pacific/Nauru.ics36
-rw-r--r--libical/zoneinfo/Pacific/Niue.ics29
-rw-r--r--libical/zoneinfo/Pacific/Norfolk.ics22
-rw-r--r--libical/zoneinfo/Pacific/Noumea.ics33
-rw-r--r--libical/zoneinfo/Pacific/Pago_Pago.ics43
-rw-r--r--libical/zoneinfo/Pacific/Palau.ics15
-rw-r--r--libical/zoneinfo/Pacific/Pitcairn.ics22
-rw-r--r--libical/zoneinfo/Pacific/Ponape.ics15
-rw-r--r--libical/zoneinfo/Pacific/Port_Moresby.ics22
-rw-r--r--libical/zoneinfo/Pacific/Rarotonga.ics59
-rw-r--r--libical/zoneinfo/Pacific/Saipan.ics36
-rw-r--r--libical/zoneinfo/Pacific/Tahiti.ics15
-rw-r--r--libical/zoneinfo/Pacific/Tarawa.ics15
-rw-r--r--libical/zoneinfo/Pacific/Tongatapu.ics45
-rw-r--r--libical/zoneinfo/Pacific/Truk.ics15
-rw-r--r--libical/zoneinfo/Pacific/Wake.ics15
-rw-r--r--libical/zoneinfo/Pacific/Wallis.ics15
-rw-r--r--libical/zoneinfo/Pacific/Yap.ics22
-rw-r--r--libical/zoneinfo/zones.tab373
-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--libwombat/.cvsignore11
-rw-r--r--libwombat/ChangeLog22
-rw-r--r--libwombat/Makefile.am37
-rw-r--r--libwombat/wombat-client.c173
-rw-r--r--libwombat/wombat-client.h73
-rw-r--r--mail/.cvsignore19
-rw-r--r--mail/ChangeLog15871
-rw-r--r--mail/GNOME_Evolution_Mail.oaf.in141
-rw-r--r--mail/Mail.idl86
-rw-r--r--mail/Makefile.am173
-rw-r--r--mail/README.async366
-rw-r--r--mail/component-factory.c1214
-rw-r--r--mail/component-factory.h29
-rw-r--r--mail/e-attchmt.pngbin169 -> 0 bytes
-rw-r--r--mail/e-searching-tokenizer.c986
-rw-r--r--mail/e-searching-tokenizer.h74
-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.c204
-rw-r--r--mail/folder-browser-factory.h22
-rw-r--r--mail/folder-browser-ui.c587
-rw-r--r--mail/folder-browser-ui.h27
-rw-r--r--mail/folder-browser.c1995
-rw-r--r--mail/folder-browser.h160
-rw-r--r--mail/folder-info.c246
-rw-r--r--mail/importers/.cvsignore12
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in29
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in29
-rw-r--r--mail/importers/Makefile.am29
-rw-r--r--mail/importers/evolution-mbox-importer.c355
-rw-r--r--mail/importers/evolution-outlook-importer.c319
-rw-r--r--mail/local-config.glade221
-rw-r--r--mail/mail-account-editor-news.c193
-rw-r--r--mail/mail-account-editor-news.h72
-rw-r--r--mail/mail-account-editor.c196
-rw-r--r--mail/mail-account-editor.h65
-rw-r--r--mail/mail-account-gui.c1722
-rw-r--r--mail/mail-account-gui.h124
-rw-r--r--mail/mail-accounts.c948
-rw-r--r--mail/mail-accounts.h121
-rw-r--r--mail/mail-autofilter.c359
-rw-r--r--mail/mail-autofilter.h51
-rw-r--r--mail/mail-callbacks.c2271
-rw-r--r--mail/mail-callbacks.h125
-rw-r--r--mail/mail-config-druid.c916
-rw-r--r--mail/mail-config-druid.h91
-rw-r--r--mail/mail-config.c2093
-rw-r--r--mail/mail-config.glade3078
-rw-r--r--mail/mail-config.h215
-rw-r--r--mail/mail-crypto.c300
-rw-r--r--mail/mail-crypto.h73
-rw-r--r--mail/mail-display.c2015
-rw-r--r--mail/mail-display.h82
-rw-r--r--mail/mail-folder-cache.c458
-rw-r--r--mail/mail-folder-cache.h48
-rw-r--r--mail/mail-format.c2401
-rw-r--r--mail/mail-identify.c131
-rw-r--r--mail/mail-importer.c262
-rw-r--r--mail/mail-importer.h50
-rw-r--r--mail/mail-local.c1262
-rw-r--r--mail/mail-local.h38
-rw-r--r--mail/mail-mt.c992
-rw-r--r--mail/mail-mt.h88
-rw-r--r--mail/mail-offline-handler.c256
-rw-r--r--mail/mail-offline-handler.h70
-rw-r--r--mail/mail-ops.c2148
-rw-r--r--mail/mail-ops.h157
-rw-r--r--mail/mail-search-dialogue.c176
-rw-r--r--mail/mail-search-dialogue.h61
-rw-r--r--mail/mail-search.c423
-rw-r--r--mail/mail-search.h80
-rw-r--r--mail/mail-send-recv.c836
-rw-r--r--mail/mail-send-recv.h45
-rw-r--r--mail/mail-session.c513
-rw-r--r--mail/mail-session.h53
-rw-r--r--mail/mail-summary.c523
-rw-r--r--mail/mail-summary.h32
-rw-r--r--mail/mail-tools.c401
-rw-r--r--mail/mail-tools.h85
-rw-r--r--mail/mail-types.h41
-rw-r--r--mail/mail-vfolder.c783
-rw-r--r--mail/mail-vfolder.h31
-rw-r--r--mail/mail.h82
-rw-r--r--mail/main.c150
-rw-r--r--mail/message-browser.c262
-rw-r--r--mail/message-browser.h61
-rw-r--r--mail/message-list.c2540
-rw-r--r--mail/message-list.etspec17
-rw-r--r--mail/message-list.h139
-rw-r--r--mail/subscribe-dialog.c1655
-rw-r--r--mail/subscribe-dialog.etspec9
-rw-r--r--mail/subscribe-dialog.glade326
-rw-r--r--mail/subscribe-dialog.h60
-rw-r--r--my-evolution/.cvsignore12
-rw-r--r--my-evolution/ChangeLog887
-rw-r--r--my-evolution/GNOME_Evolution_Summary.oaf.in18
-rw-r--r--my-evolution/Locations3004
-rw-r--r--my-evolution/Makefile.am104
-rw-r--r--my-evolution/component-factory.c157
-rw-r--r--my-evolution/component-factory.h29
-rw-r--r--my-evolution/e-summary-calendar.c475
-rw-r--r--my-evolution/e-summary-calendar.h47
-rw-r--r--my-evolution/e-summary-factory.c158
-rw-r--r--my-evolution/e-summary-factory.h33
-rw-r--r--my-evolution/e-summary-mail.c577
-rw-r--r--my-evolution/e-summary-mail.h54
-rw-r--r--my-evolution/e-summary-offline-handler.c236
-rw-r--r--my-evolution/e-summary-offline-handler.h75
-rw-r--r--my-evolution/e-summary-preferences.c1499
-rw-r--r--my-evolution/e-summary-preferences.h38
-rw-r--r--my-evolution/e-summary-rdf.c687
-rw-r--r--my-evolution/e-summary-rdf.h36
-rw-r--r--my-evolution/e-summary-tasks.c419
-rw-r--r--my-evolution/e-summary-tasks.h36
-rw-r--r--my-evolution/e-summary-type.h29
-rw-r--r--my-evolution/e-summary-weather.c836
-rw-r--r--my-evolution/e-summary-weather.h152
-rw-r--r--my-evolution/e-summary.c877
-rw-r--r--my-evolution/e-summary.h169
-rw-r--r--my-evolution/main.c84
-rw-r--r--my-evolution/metar.c668
-rw-r--r--my-evolution/metar.h48
-rw-r--r--my-evolution/my-evolution-html.h69
-rw-r--r--my-evolution/my-evolution.glade1490
-rw-r--r--my-evolution/weather.h56
-rw-r--r--notes/.cvsignore4
-rw-r--r--notes/GNOME_Evolution_Notes.oaf.in54
-rw-r--r--notes/Makefile.am34
-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--omf-install/.cvsignore3
-rw-r--r--omf-install/Makefile.am17
-rw-r--r--po/.cvsignore10
-rw-r--r--po/ChangeLog2856
-rw-r--r--po/Makefile.i18npatch63
-rw-r--r--po/POTFILES.in328
-rw-r--r--po/POTFILES.skip10
-rw-r--r--po/az.po15640
-rw-r--r--po/bg.po14560
-rw-r--r--po/ca.po17068
-rw-r--r--po/da.po16998
-rw-r--r--po/de.po14065
-rw-r--r--po/el.po15108
-rw-r--r--po/en_GB.po13481
-rw-r--r--po/es.po13825
-rw-r--r--po/fi.po14136
-rw-r--r--po/flu-danish114
-rw-r--r--po/fr.po16417
-rwxr-xr-xpo/ga.po14156
-rw-r--r--po/gl.po14895
-rw-r--r--po/hu.po16015
-rw-r--r--po/it.po15694
-rw-r--r--po/ja.po13868
-rw-r--r--po/ko.po14770
-rw-r--r--po/lt.po15234
-rw-r--r--po/nl.po14481
-rw-r--r--po/nn.po15787
-rw-r--r--po/no.po18971
-rw-r--r--po/pl.po13883
-rw-r--r--po/pt.po15229
-rw-r--r--po/pt_BR.po13965
-rw-r--r--po/ro.po15380
-rw-r--r--po/ru.po14433
-rw-r--r--po/sk.po13763
-rw-r--r--po/sl.po16708
-rw-r--r--po/sv.po16538
-rw-r--r--po/tr.po15019
-rw-r--r--po/uk.po15278
-rwxr-xr-xpo/update.sh45
-rw-r--r--po/zh_TW.po16617
-rw-r--r--shell/.cvsignore16
-rw-r--r--shell/ChangeLog8514
-rw-r--r--shell/Evolution-Activity.idl106
-rw-r--r--shell/Evolution-Offline.idl48
-rw-r--r--shell/Evolution-Session.idl41
-rw-r--r--shell/Evolution-Shell.idl123
-rw-r--r--shell/Evolution-ShellComponent.idl119
-rw-r--r--shell/Evolution-ShellComponentDnd.idl96
-rw-r--r--shell/Evolution-ShellView.idl24
-rw-r--r--shell/Evolution-Shortcuts.idl54
-rw-r--r--shell/Evolution-Storage.idl105
-rw-r--r--shell/Evolution-StorageSetView.idl34
-rw-r--r--shell/Evolution-Wizard.idl37
-rw-r--r--shell/Evolution-common.idl32
-rw-r--r--shell/Evolution.idl25
-rw-r--r--shell/GNOME_Evolution_Shell.oaf.in15
-rw-r--r--shell/GNOME_Evolution_TestComponent.oaf15
-rw-r--r--shell/Makefile.am244
-rw-r--r--shell/README14
-rw-r--r--shell/e-activity-handler.c616
-rw-r--r--shell/e-activity-handler.h73
-rw-r--r--shell/e-component-registry.c403
-rw-r--r--shell/e-component-registry.h76
-rw-r--r--shell/e-corba-shortcuts.c331
-rw-r--r--shell/e-corba-shortcuts.h67
-rw-r--r--shell/e-corba-storage-registry.c254
-rw-r--r--shell/e-corba-storage-registry.h69
-rw-r--r--shell/e-corba-storage.c545
-rw-r--r--shell/e-corba-storage.h76
-rw-r--r--shell/e-folder-tree.c416
-rw-r--r--shell/e-folder-tree.h59
-rw-r--r--shell/e-folder-type-registry.c519
-rw-r--r--shell/e-folder-type-registry.h103
-rw-r--r--shell/e-folder.c364
-rw-r--r--shell/e-folder.h94
-rw-r--r--shell/e-gray-bar.c103
-rw-r--r--shell/e-gray-bar.h61
-rw-r--r--shell/e-local-folder.c558
-rw-r--r--shell/e-local-folder.h85
-rw-r--r--shell/e-local-storage.c1098
-rw-r--r--shell/e-local-storage.h71
-rw-r--r--shell/e-setup.c367
-rw-r--r--shell/e-setup.h31
-rw-r--r--shell/e-shell-constants.h36
-rw-r--r--shell/e-shell-folder-commands.c552
-rw-r--r--shell/e-shell-folder-commands.h41
-rw-r--r--shell/e-shell-folder-creation-dialog.c555
-rw-r--r--shell/e-shell-folder-creation-dialog.h50
-rw-r--r--shell/e-shell-folder-selection-dialog.c533
-rw-r--r--shell/e-shell-folder-selection-dialog.h87
-rw-r--r--shell/e-shell-folder-title-bar.c710
-rw-r--r--shell/e-shell-folder-title-bar.h79
-rw-r--r--shell/e-shell-importer.c1197
-rw-r--r--shell/e-shell-importer.h33
-rw-r--r--shell/e-shell-offline-handler.c827
-rw-r--r--shell/e-shell-offline-handler.h86
-rw-r--r--shell/e-shell-startup-wizard.c847
-rw-r--r--shell/e-shell-startup-wizard.h31
-rw-r--r--shell/e-shell-user-creatable-items-handler.c459
-rw-r--r--shell/e-shell-user-creatable-items-handler.h74
-rw-r--r--shell/e-shell-utils.c105
-rw-r--r--shell/e-shell-utils.h32
-rw-r--r--shell/e-shell-view-menu.c804
-rw-r--r--shell/e-shell-view-menu.h33
-rw-r--r--shell/e-shell-view.c2548
-rw-r--r--shell/e-shell-view.h117
-rw-r--r--shell/e-shell.c1711
-rw-r--r--shell/e-shell.h142
-rw-r--r--shell/e-shortcuts-view-model.c350
-rw-r--r--shell/e-shortcuts-view-model.h67
-rw-r--r--shell/e-shortcuts-view.c654
-rw-r--r--shell/e-shortcuts-view.h75
-rw-r--r--shell/e-shortcuts.c1171
-rw-r--r--shell/e-shortcuts.h147
-rw-r--r--shell/e-splash.c428
-rw-r--r--shell/e-splash.h72
-rw-r--r--shell/e-storage-set-view.c2107
-rw-r--r--shell/e-storage-set-view.etspec7
-rw-r--r--shell/e-storage-set-view.h102
-rw-r--r--shell/e-storage-set.c733
-rw-r--r--shell/e-storage-set.h117
-rw-r--r--shell/e-storage.c648
-rw-r--r--shell/e-storage.h167
-rw-r--r--shell/e-summary-storage.c127
-rw-r--r--shell/e-summary-storage.h66
-rw-r--r--shell/e-task-bar.c205
-rw-r--r--shell/e-task-bar.h72
-rw-r--r--shell/e-task-widget.c232
-rw-r--r--shell/e-task-widget.h79
-rw-r--r--shell/e-uri-schema-registry.c182
-rw-r--r--shell/e-uri-schema-registry.h71
-rw-r--r--shell/evolution-activity-client.c495
-rw-r--r--shell/evolution-activity-client.h92
-rw-r--r--shell/evolution-session.c214
-rw-r--r--shell/evolution-session.h68
-rw-r--r--shell/evolution-shell-client.c501
-rw-r--r--shell/evolution-shell-client.h82
-rw-r--r--shell/evolution-shell-component-client.c820
-rw-r--r--shell/evolution-shell-component-client.h126
-rw-r--r--shell/evolution-shell-component-dnd.c445
-rw-r--r--shell/evolution-shell-component-dnd.h129
-rw-r--r--shell/evolution-shell-component-utils.c92
-rw-r--r--shell/evolution-shell-component-utils.h48
-rw-r--r--shell/evolution-shell-component.c831
-rw-r--r--shell/evolution-shell-component.h185
-rw-r--r--shell/evolution-shell-view.c296
-rw-r--r--shell/evolution-shell-view.h75
-rw-r--r--shell/evolution-storage-listener.c355
-rw-r--r--shell/evolution-storage-listener.h86
-rw-r--r--shell/evolution-storage-set-view-factory.c62
-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.c1023
-rw-r--r--shell/evolution-storage.h149
-rw-r--r--shell/evolution-test-component.c351
-rw-r--r--shell/evolution-wizard.c392
-rw-r--r--shell/evolution-wizard.h86
-rw-r--r--shell/glade/.cvsignore4
-rw-r--r--shell/glade/Makefile.am8
-rw-r--r--shell/glade/e-active-connection-dialog.glade179
-rw-r--r--shell/glade/e-shell-folder-creation-dialog.glade169
-rw-r--r--shell/glade/evolution-startup-wizard.glade250
-rw-r--r--shell/importer/.cvsignore10
-rw-r--r--shell/importer/GNOME_Evolution_Importer.idl95
-rw-r--r--shell/importer/Makefile.am62
-rw-r--r--shell/importer/evolution-importer-client.c249
-rw-r--r--shell/importer/evolution-importer-client.h75
-rw-r--r--shell/importer/evolution-importer-listener.c226
-rw-r--r--shell/importer/evolution-importer-listener.h72
-rw-r--r--shell/importer/evolution-importer.c230
-rw-r--r--shell/importer/evolution-importer.h96
-rw-r--r--shell/importer/evolution-intelligent-importer.c198
-rw-r--r--shell/importer/evolution-intelligent-importer.h75
-rw-r--r--shell/importer/import.glade145
-rw-r--r--shell/importer/intelligent.c487
-rw-r--r--shell/importer/intelligent.h29
-rw-r--r--shell/main.c354
-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/killev66
-rwxr-xr-xtools/verify-evolution-install.sh640
-rw-r--r--ui/.cvsignore8
-rw-r--r--ui/ChangeLog1400
-rw-r--r--ui/Makefile.am24
-rw-r--r--ui/evolution-addressbook.h25
-rw-r--r--ui/evolution-addressbook.xml160
-rw-r--r--ui/evolution-calendar.xml128
-rw-r--r--ui/evolution-comp-editor.xml83
-rw-r--r--ui/evolution-contact-editor.xml96
-rw-r--r--ui/evolution-contact-list-editor.xml68
-rw-r--r--ui/evolution-event-editor.xml41
-rw-r--r--ui/evolution-executive-summary.xml12
-rw-r--r--ui/evolution-mail-global.xml144
-rw-r--r--ui/evolution-mail-list.xml122
-rw-r--r--ui/evolution-mail-message.xml329
-rw-r--r--ui/evolution-mail-messagedisplay.xml52
-rw-r--r--ui/evolution-message-composer.h53
-rw-r--r--ui/evolution-message-composer.xml153
-rw-r--r--ui/evolution-signature-editor.xml64
-rw-r--r--ui/evolution-subscribe.xml57
-rw-r--r--ui/evolution-task-editor.xml41
-rw-r--r--ui/evolution-tasks.xml73
-rw-r--r--ui/evolution.xml224
-rw-r--r--ui/my-evolution.xml41
-rw-r--r--views/.cvsignore2
-rw-r--r--views/ChangeLog48
-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/calendar/.cvsignore2
-rw-r--r--views/calendar/Makefile.am5
-rw-r--r--views/calendar/galview.xml11
-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/ChangeLog268
-rw-r--r--widgets/LICENSE1
-rw-r--r--widgets/Makefile.am5
-rw-r--r--widgets/e-timezone-dialog/.cvsignore6
-rw-r--r--widgets/e-timezone-dialog/Makefile.am19
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c681
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.glade264
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.h83
-rw-r--r--widgets/meeting-time-sel/.cvsignore8
-rw-r--r--widgets/menus/.cvsignore8
-rw-r--r--widgets/menus/Makefile.am11
-rw-r--r--widgets/menus/gal-define-views-dialog.c333
-rw-r--r--widgets/menus/gal-define-views-dialog.h75
-rw-r--r--widgets/menus/gal-define-views-model.c318
-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.c626
-rw-r--r--widgets/menus/gal-view-collection.h95
-rw-r--r--widgets/menus/gal-view-etable.c206
-rw-r--r--widgets/menus/gal-view-etable.h44
-rw-r--r--widgets/menus/gal-view-factory-etable.c129
-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.c333
-rw-r--r--widgets/menus/gal-view-menus.h36
-rw-r--r--widgets/menus/gal-view-new-dialog.c222
-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/ChangeLog726
-rw-r--r--widgets/misc/Makefile.am86
-rw-r--r--widgets/misc/e-bonobo-widget.c195
-rw-r--r--widgets/misc/e-bonobo-widget.h75
-rw-r--r--widgets/misc/e-calendar-item.c2927
-rw-r--r--widgets/misc/e-calendar-item.h339
-rw-r--r--widgets/misc/e-calendar.c604
-rw-r--r--widgets/misc/e-calendar.h102
-rw-r--r--widgets/misc/e-canvas-utils.c171
-rw-r--r--widgets/misc/e-canvas-utils.h55
-rw-r--r--widgets/misc/e-canvas-vbox.c375
-rw-r--r--widgets/misc/e-canvas-vbox.h90
-rw-r--r--widgets/misc/e-canvas.c1017
-rw-r--r--widgets/misc/e-canvas.h129
-rw-r--r--widgets/misc/e-cell-date-edit.c911
-rw-r--r--widgets/misc/e-cell-date-edit.h107
-rw-r--r--widgets/misc/e-charset-picker.c464
-rw-r--r--widgets/misc/e-charset-picker.h48
-rw-r--r--widgets/misc/e-clipped-label.c387
-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.c1905
-rw-r--r--widgets/misc/e-dateedit.h177
-rw-r--r--widgets/misc/e-dropdown-button.c251
-rw-r--r--widgets/misc/e-dropdown-button.h72
-rw-r--r--widgets/misc/e-filter-bar.c502
-rw-r--r--widgets/misc/e-filter-bar.h117
-rw-r--r--widgets/misc/e-gui-utils.c215
-rw-r--r--widgets/misc/e-gui-utils.h29
-rw-r--r--widgets/misc/e-hsv-utils.c166
-rw-r--r--widgets/misc/e-hsv-utils.h31
-rw-r--r--widgets/misc/e-map.c1783
-rw-r--r--widgets/misc/e-map.h139
-rw-r--r--widgets/misc/e-messagebox.c356
-rw-r--r--widgets/misc/e-messagebox.h85
-rw-r--r--widgets/misc/e-popup-menu.c157
-rw-r--r--widgets/misc/e-popup-menu.h37
-rw-r--r--widgets/misc/e-printable.c207
-rw-r--r--widgets/misc/e-printable.h76
-rw-r--r--widgets/misc/e-reflow-model.c288
-rw-r--r--widgets/misc/e-reflow-model.h83
-rw-r--r--widgets/misc/e-reflow.c1265
-rw-r--r--widgets/misc/e-reflow.h131
-rw-r--r--widgets/misc/e-search-bar.c945
-rw-r--r--widgets/misc/e-search-bar.h132
-rw-r--r--widgets/misc/e-selection-model-array.c469
-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.c628
-rw-r--r--widgets/misc/e-selection-model.h142
-rw-r--r--widgets/misc/e-title-bar.c407
-rw-r--r--widgets/misc/e-title-bar.h87
-rw-r--r--widgets/misc/e-unicode.c3101
-rw-r--r--widgets/misc/e-unicode.h122
-rw-r--r--widgets/misc/gal-categories.glade197
-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-charset-picker.c18
-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.c629
-rw-r--r--widgets/table/e-cell-combo.h62
-rw-r--r--widgets/table/e-cell-date.c166
-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.c227
-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.c674
-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.c2436
-rw-r--r--widgets/table/e-cell-text.h81
-rw-r--r--widgets/table/e-cell-toggle.c338
-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.c539
-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-no-group.glade1711
-rw-r--r--widgets/table/e-table-config.c820
-rw-r--r--widgets/table/e-table-config.glade1791
-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.c218
-rw-r--r--widgets/table/e-table-field-chooser-dialog.h76
-rw-r--r--widgets/table/e-table-field-chooser-item.c668
-rw-r--r--widgets/table/e-table-field-chooser-item.h53
-rw-r--r--widgets/table/e-table-field-chooser.c274
-rw-r--r--widgets/table/e-table-field-chooser.glade129
-rw-r--r--widgets/table/e-table-field-chooser.h81
-rw-r--r--widgets/table/e-table-group-container.c1428
-rw-r--r--widgets/table/e-table-group-container.h75
-rw-r--r--widgets/table/e-table-group-leaf.c604
-rw-r--r--widgets/table/e-table-group-leaf.h67
-rw-r--r--widgets/table/e-table-group.c690
-rw-r--r--widgets/table/e-table-group.glade206
-rw-r--r--widgets/table/e-table-group.h156
-rw-r--r--widgets/table/e-table-header-item.c1636
-rw-r--r--widgets/table/e-table-header-item.h85
-rw-r--r--widgets/table/e-table-header-utils.c451
-rw-r--r--widgets/table/e-table-header-utils.h65
-rw-r--r--widgets/table/e-table-header.c835
-rw-r--r--widgets/table/e-table-header.h94
-rw-r--r--widgets/table/e-table-item.c3066
-rw-r--r--widgets/table/e-table-item.h185
-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.c243
-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.c300
-rw-r--r--widgets/table/e-table-selection-model.h55
-rw-r--r--widgets/table/e-table-simple.c271
-rw-r--r--widgets/table/e-table-simple.h85
-rw-r--r--widgets/table/e-table-size-test.c287
-rw-r--r--widgets/table/e-table-sort-info.c475
-rw-r--r--widgets/table/e-table-sort-info.h88
-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.c274
-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.c381
-rw-r--r--widgets/table/e-table-specification.h67
-rw-r--r--widgets/table/e-table-state.c244
-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.c409
-rw-r--r--widgets/table/e-table-subset.h67
-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-without.c361
-rw-r--r--widgets/table/e-table-without.h68
-rw-r--r--widgets/table/e-table.c2424
-rw-r--r--widgets/table/e-table.diabin4514 -> 0 bytes
-rw-r--r--widgets/table/e-table.h304
-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.c644
-rw-r--r--widgets/table/e-tree-memory.h79
-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.c210
-rw-r--r--widgets/table/e-tree-scrolled.h54
-rw-r--r--widgets/table/e-tree-selection-model.c1236
-rw-r--r--widgets/table/e-tree-selection-model.h54
-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.c1325
-rw-r--r--widgets/table/e-tree-sorted.h65
-rw-r--r--widgets/table/e-tree-table-adapter.c1045
-rw-r--r--widgets/table/e-tree-table-adapter.h64
-rw-r--r--widgets/table/e-tree.c2589
-rw-r--r--widgets/table/e-tree.h268
-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/.cvsignore11
-rw-r--r--widgets/text/e-completion-match.c191
-rw-r--r--widgets/text/e-completion-match.h73
-rw-r--r--widgets/text/e-completion-test.c201
-rw-r--r--widgets/text/e-completion-view.c911
-rw-r--r--widgets/text/e-completion-view.h107
-rw-r--r--widgets/text/e-completion.c647
-rw-r--r--widgets/text/e-completion.h106
-rw-r--r--widgets/text/e-entry-test.c79
-rw-r--r--widgets/text/e-entry.c1238
-rw-r--r--widgets/text/e-entry.h95
-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.c629
-rw-r--r--widgets/text/e-text-model.h115
-rw-r--r--widgets/text/e-text-test.c155
-rw-r--r--widgets/text/e-text.c3917
-rw-r--r--widgets/text/e-text.h243
-rw-r--r--wombat/.cvsignore14
-rw-r--r--wombat/ChangeLog256
-rw-r--r--wombat/GNOME_Evolution_Wombat.oaf.in50
-rw-r--r--wombat/Makefile.am63
-rw-r--r--wombat/wombat-moniker.c159
-rw-r--r--wombat/wombat-moniker.h11
-rw-r--r--wombat/wombat.c262
-rw-r--r--wombat/wombat.idl19
2827 files changed, 0 insertions, 1209767 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 bfcc16497e..0000000000
--- a/AUTHORS
+++ /dev/null
@@ -1,81 +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>
- Jason Leach <jleach@ximian.com>
- Matt Loper <matt@ximian.com>
- Ettore Perazzoli <ettore@ximian.com>
- Jeff Stedfast <fejj@ximian.com>
- Jon Trowbridge <trow@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>
- Jason Leach <jleach@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>
- Hctor Garca Alvarez <hector@scouts-es.org>
- Jess 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 Anto <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 f1acb1d591..0000000000
--- a/ChangeLog
+++ /dev/null
@@ -1,7069 +0,0 @@
-2001-10-01 Aaron Weber <aaron@ximian.com>
-
- * help/C/Makefile.am: removed an extraneous tab.
-
-2001-10-01 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 0.15.99.
-
-2001-10-01 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 0.15. Require gal 0.13 and gtkhtml 0.14.
-
-2001-10-01 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Added more news.
-
-2001-09-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (nspr_libs): Order the linkline to be the same as
- the order in Mozilla (it is suggested that they be in this order).
- (nss_libs): Same.
-
->>>>>>> 1.945
-2001-09-27 Dan Winship <danw@ximian.com>
-
- * configure.in: Remove references to the "compose" program, since
- that functionality went into the shell.
- (AC_OUTPUT): Sort and remove duplicates.
-
- * cmdline/*: gone
-
-2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Added a flag to enable pedantic PGP/MIME - this is
- not recommended for end-users. It is mostly meant for testing
- purposes.
-
-2001-09-26 Chris Toshok <toshok@ximian.com>
-
- * configure.in: make sure the solaris network libs get added to
- the LDAP link line before we test for openldap. Thanks to Frank
- Belew for finding this.
-
-2001-09-22 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal to 0.12.99.0.
-
-2001-09-21 Nat Friedman <nat@ximian.com>
-
- * configure.in (EVOLUTION_MICRO_VERSION): Changed to 99.
- (VERSION): Added ".$EVOLUTION_MICRO_VERSION" suffix.
-
-2001-09-21 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version to 0.14. Depend on gal >= 0.12,
- gtkhtml >= 0.13.
-
-2001-09-21 Michael Zucchi <NotZed@Ximian.com>
-
- * NEWS (Mail): Updated.
-
-2001-09-21 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Added more NEWS items here.
-
-2001-09-19 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Remove dead directory from AC_OUTPUT
-
-2001-09-16 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Updated required version of gal to 0.11.99.4.
-
-2001-09-14 JP Rosevear <jpr@ximian.com>
-
- * configure.in: remove unneeded conditionals
-
-2001-09-13 Yanko Kaneti <yaneti@declera.com>
-
- * configure.in (ALL_LINGUAS): Added bg to ALL_LINGUAS.
-
-2001-09-13 Larry Ewing <lewing@ximian.com>
-
- * data/evolution.mime: override the gnome-vfs.mime to match .vcf
- as text/x-vcard.
-
-2001-09-11 JP Rosevear <jpr@ximian.com>
-
- * configure.in: temporarily disable zh_TW
-
-2001-09-10 Abel Cheung <maddog@linux.org.hk>
-
- * configure.in: Added "zh_TW" to ALL_LINGUAS.
-
-2001-09-07 Dan Winship <danw@ximian.com>
-
- * configure.in: one-line OpenSSL fix from Yanko Kaneti
- <yaneti@declera.com>
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- * README: Updated slightly.
-
-2001-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- [Fixes by Neil Conway <neilconway@home.com, as per #8090.]
-
- * configure.in: Fix the error message if scrollkeeper is not found.
-
- * README: A bunch of minor fixes, tweaks and cleanups.
-
-2001-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #8089, Undocumented Scrollkeeper dependency.]
-
- * README: Add scrollkeeper 0.1.4 to the list of dependencies.
-
-2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Only check for OpenSSL if we were not able to find
- Mozilla's NSS libraries.
-
-2001-09-04 Peter Williams <peterw@ximian.com>
-
- * omf-install/Makefile.am (install-data-local): Don't put
- $(srcdir) in the file path twice.
-
-2001-09-01 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped the required version of gal to 0.11.99.2.
-
-2001-08-31 Zbigniew Chyla <cyba@gnome.pl>
-
- * configure.in: Bumped required version of GAL to 0.11.3
- (for g_utf8_collate)
-
-2001-08-24 Ettore Perazzoli <ettore@ximian.com>
-
- [Patch from Nike Gerdts <michael.gerdts@usa.alcatel.com> for
- #6882, DB3_CFLAGS and DB3_LDFLAGS order messes up CPPFLAGS and
- LDFLAGS.]
-
- * configure.in: Put DB3_CFLAGS before the already-defined CPPFLAGS
- instead of after them; likewise, put DB3_LDADD before the already
- defined LDADD.
-
-2001-08-24 Dan Winship <danw@ximian.com>
-
- * configure.in: We don't need to check for both bonobo-conf 0.11
- AND bonobo-conf 0.2.
-
-2001-08-22 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: 0.13.99.
-
-2001-08-22 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump requirements to GAL 0.11, bonobo-conf 0.11,
- GtkHTML 0.12. Don't autogen
- `doc/devel/executive-summary/Makefile'. Bump version number to
- 0.13.
-
-2001-08-21 Ettore Perazzoli <ettore@ximian.com>
-
- * NEWS (Global): Added.
-
-2001-08-21 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Updated NEWS for addressbook.
-
-2001-08-21 Peter Williams <peterw@ximian.com>
-
- * NEWS (Mail): Updated some more.
-
-2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * NEWS: Updated.
-
-2001-08-20 Jon Trowbridge <trow@ximian.com>
-
- * configure.in: Require gal 0.10.99.5.
-
-2001-08-19 Aaron Weber <aaron@ximian.com>
-
- *Makefile.am: added "help" to subdirs.
-
-2001-08-19 Chris Toshok <toshok@ximian.com>
-
- * omf-install/Makefile.am (scrollkeeper_localstate_dir) use
- $(SCROLLKEEPER_LOCALSTATE_DIR), and not something based on
- evolution's local state dir. this should fix the core dumps
- during install on freebsd and solaris.
-
- * configure.in (GLIB_CONFIG): use $GLIB_CONFIG if it's set,
- otherwise default to glib-config. a cheap solution to get this
- working on freebsd (where they have glib12-config, but not
- glib-config.) also, switch all `glib-config`s to `$GLIB_CONFIG`.
- (SCROLLKEEPER_LOCALSTATE_DIR): use scrollkeeper-config to figure
- this out, and AC_SUBST so omf-install/Makefile.am can use it.
-
-2001-08-17 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Move the libical compile order.
-
-2001-08-16 "Big Iain" Holmes <iain@ximian.com>
-
- * configure.in: Add widgets/e-timezone-dialog/Makefile
-
-2001-08-16 Jason Leach <jleach@ximian.com>
-
- * AUTHORS: I know what you did last summer!
-
-2001-08-16 Jon Trowbridge <trow@ximian.com>
-
- * configure.in: Require gal 0.10.99.3.
-
-2001-08-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * README: Some info on adding --localstatedir to the configure
- options.
- * Makefile.am: Added omf-install to the build.
- * configure.in: Adjust for the move of the user docs.
-
-2001-08-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * configure.in: Addded missing dirs to the build. Add checks for
- scrollkeeper and jw to get the docs building on later Red Hat's.
- * omf-install/*: Added this for integration with scrollkeeper.
-
-2001-08-14 Dan Winship <danw@ximian.com>
-
- * configure.in (LDAP_LIBS): Remove an obvious typo reported by
- Miles
-
-2001-08-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * README: Be truthful about the versions of libs we need.
-
-2001-08-10 Chris Toshok <toshok@ximian.com>
-
- * configure.in: if libldap.la is there, default to static linking
- of openldap. if it's not, default to dynamic. also, provide
- --with-static-ldap for users that want to override these defaults.
-
-2001-08-09 Chris Toshok <toshok@ximian.com>
-
- * configure.in: link statically with OpenLDAP.
-
-2001-08-09 Jon Trowbridge <trow@ximian.com>
-
- * configure.in: Require GAL 0.10.99.2.
-
-2001-08-09 Christopher James Lahey <clahey@ximian.com>
-
- * tools/killev: Added #!/bin/sh
-
-2001-08-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Don't link to libnssckbi3 when linking to nss.
-
-2001-08-08 JP Rosevear <jpr@ximian.com>
-
- * README: Update pilot information
-
-2001-08-07 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Require gal 0.10.99.1 or greater.
-
-2001-08-05 Ettore Perazzoli <ettore@ximian.com>
-
- [Fixes #5594, "killev doesn't kill all evolution processes".]
-
- * tools/killev: Added bonobo-moniker-xmldb, gnome-gtkhtml-editor
- and gnome-spell-component.
-
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version number to 0.12.99.
-
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Ooops. We want GAL >= 0.10.0 and GtkHTML >=
- 0.11.0.
-
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Remove `$EVOLUTION_MICRO_VERSION' from `VERSION'.
- (EVO_CHECK_LIB):
-
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Bump version number to 0.12.0.
-
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * NEWS: Added info about the shell changes and slightly changed
- the formatting for the addressbook ones.
-
- * configure.in: Require GtkHTML 0.10.0 and GAL 0.9.0.
-
-2001-07-31 Christopher James Lahey <clahey@ximian.com>
-
- * NEWS (Addressbook): Updated NEWS for addressbook.
-
-2001-07-31 Larry Ewing <lewing@ximian.com>
-
- * configure.in: bump required version of gtkhtml to 0.10.99.
-
-2001-07-20 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Bump to 0.11.99
-
-2001-07-17 Dan Winship <danw@ximian.com>
-
- * configure.in: Fix up the "exactly version N" case of EVO_CHECK_LIB
-
-2001-07-16 Not Zed <NotZed@Ximian.com>
-
- * configure.in: Changed to use test -h instead of -L for checking
- /var/mail vs /var/spool/mail
-
-2001-07-13 JP Rosevear <jpr@ximian.com>
-
- * NEWS: more updates
-
-2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * NEWS (Mail): Merged mine and Peter's entries.
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * NEWS: Start new entry
-
-2001-07-11 Peter Williams <peterw@ximian.com>
-
- * acconfig.h: Add HAVE_BROKEN_SPOOL here.
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * configure.in (have_nss_includes): Fix nss include check to work.
-
-2001-07-11 Not Zed <NotZed@Ximian.com>
-
- * configure.in: Added option --with-broken-spool for solaris mbox
- spool format.
-
-2001-07-10 Marius Andreiana <mandreiana@yahoo.com>
-
- * configure.in: Added ro (Romanian) to ALL_LINGUAS
-
-2001-07-05 Peter Williams <peterw@ximian.com>
-
- * configure.in (SYSTEM_MAIL_DIR): Make sure /var/mail
- isn't a symbolic link such as on Red Hat 7.
-
-2001-07-05 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Upped the required version of gal.
-
-2001-07-03 Dietmar Maurer <dietmar@ximian.com>
-
- * *: use bonobo-conf everywhere
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * configure.in (MAILER_LIBS):
- (MAILER_CFLAGS): added bonobo_conf.
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Made evolution depend on bonobo-conf 0.2.
-
-2001-07-02 Larry Ewing <lewing@ximian.com>
-
- * configure.in: Check for gtkhtml 0.9.99.1.
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Check for libGal 0.8.99.7.
-
-2001-07-02 Peter Williams <peterw@ximian.com>
-
- * configure.in (evolution_db_version): s,AC_DEFINE,AC_DEFINE_UNQUOTED
- to make these not totally useless.
-
-2001-07-01 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (SUBDIRS): Build the composer after the addressbook,
- as it needs some CORBA stuff from the latter.
-
-2001-06-30 Federico Mena Quintero <federico@ximian.com>
-
- * tools/killev: Added evolution-alarm-notify.
-
-2001-06-29 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Require GAL 0.8.99.6.
-
-2001-06-29 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Add `camel/tests/mime-filter/Makefile' to the
- `AC_OUTPUT()' list.
-
-2001-06-27 Peter Williams <peterw@ximian.com>
-
- * configure.in (gal): Bump required gal version for new accessors
- in ETree.
-
-2001-06-24 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add addressbook/gui/contact-list-editor, and
- correct path of contact-editor.
-
-2001-06-21 Rodrigo Moya <rodrigo@gnome-db.org>
-
- * libwombat/: added new directory for the libwombat library, which
- will contain the implementation of all CORBA interfaces defined
- in the wombat.idl file
-
-2001-06-21 Dan Winship <danw@ximian.com>
-
- * configure.in: Fix the OpenLDAP check to default to "no" if you
- don't specify anything.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * docs/C/usage-sync: Reworded a little bit for more descrip.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * doc/C/usage-calendar.sgml: Documented categorizing an event.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * doc/C/usage-mail.sgml: Updated Bcc: example
-
-2001-06-20 Dan Winship <danw@ximian.com>
-
- * configure.in: Change --enable-ldap to --with-openldap, allow a
- path prefix as an argument. Add some libtooly goodness to the
- libldap check in case it depends on ssl libraries.
-
-2001-06-19 Dan Winship <danw@ximian.com>
-
- * configure.in: Tweak the db3 header check to like our RH7 build
- machine again.
-
-2001-06-19 Christopher James Lahey <clahey@ximian.com>
-
- * libversit/vcc.y (LexBuf): Changed buf to an int here.
- (lexGetQuotedPrintable): Changed cur to an int here.
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * configure.in: Add "--with-db3" to fill in both
- --with-db3-includes and --with-db3-libs. Make them get cached
- properly so you don't need to specify it every time. Simplify some
- code.
-
- * acconfig.h: Add #defines for the current supported db3 version
- so that when we change it we don't have to hunt all of them down
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * configure.in: Check the modes on $system_mail_dir and set up
- variables for camel/Makefile to make camel-lock-helper
- setuid/setgid.
-
-2001-06-11 JP Rosevear <jpr@ximian.com>
-
- * configure.in: One slight db3 check correction
-
-2001-06-11 Chris Toshok <toshok@ximian.com>
-
- * configure.in: fix typo in -ldb3 check.
-
-2001-06-11 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Update db3 configure checks for RedHat. /me beats
- a sleeping cat to death
-
-2001-06-09 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped required version of gal to 0.8.99.2.
-
-2001-06-09 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Added addressbook/gui/merging/Makefile.
-
-2001-06-08 Jason Leach <jleach@ximian.com>
-
- * my-evolution/Makefile.am (INCLUDES): builddir != srcdir fix.
-
-2001-06-08 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Byebye executive-summary, hello my-evolution
-
- * configure.in: Remove all the executive-summary Makefiles. Add the
- my-evolution.
-
-2001-06-08 Jon Trowbridge <trow@ximian.com>
-
- * AUTHORS: Vanity, thy name is trow.
-
-2001-06-05 JP Rosevear <jpr@ximian.com>
-
- * config.log: Bump version to 0.10.99
-
-2001-05-31 Christopher James Lahey <clahey@ximian.com>
-
- * README: Included information about db3.
-
- * acconfig.h: Added HAVE_DB_H and HAVE_DB3_DB_H.
-
- * configure.in: Added various checks for db3 libraries and
- includes. Of note are the new configure options
- --with-db3-includes=PREFIX and --with-db3-libs=PREFIX to specify
- the location for your db3 library.
-
-2001-05-31 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in (GTKHTML_DATADIR): Use --moddatadir to derive this.
-
-2001-05-30 Dan Winship <danw@ximian.com>
-
- * configure.in: Bump gal dependency to 0.8.99.1
-
-2001-05-29 JP Rosevear <jpr@ximian.com>
-
- * README: update version requirements
-
-2001-05-23 Dan Winship <danw@ximian.com>
-
- * README: Remove reference to verify-evolution-install.sh since it
- doesn't work any more.
-
- * configure.in (EVO_CHECK_LIB): allow this to take a max version
- too, mostly so we can bound the allowable gal versions for
- releases, but also to require libxml < 2.0.
- (OpenSSL): Fixicate to work on NetBSD (OpenSSL in /usr, no libdl).
-
-2001-05-23 Kjartan Maraas <kmaraas@gnome.org>
-
- * tools/killev: s/evolution-vcard-import/evolution-vcard-importer
-
-2001-05-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Create MAILER_CFLAGS and MAILER_LIBS so that we
- don't have the same libs multiple times in the libtool
- command-line.
-
-2001-05-20 Duncan Mak <duncan@ximian.com>
-
- * tools/killev (sysname): Add in evolution-vcard-importer as part
- of the list of processes to kill in killev.
-
-2001-05-18 Jon Trowbridge <trow@ximian.com>
-
- * Makefile.am (SUBDIRS): Changed build order. Now addressbook
- gets built before mail.
-
-2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Create CAMEL_CFLAGS and CAMEL_LIBS so that we
- don't have to link in all sorts of unnecessary garbage from GNOME
- that we don't need.
-
-2001-05-15 Chris Toshok <toshok@ximian.com>
-
- * tools/killev: add the importers.
-
-2001-05-14 Kevin Breit <battery841@mediaone.net>
-
- * doc/C/evolution-C.omf: added file for Scrollkeeper
-
-2001-05-09 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add the nspr includes to the list of includes used
- to test for NSS headers, and don't assume -lpthread in the
- nss/nspr libs - use PTHREAD_LIB.
-
-2001-05-09 Iain Holmes <iain@ximian.com>
-
- * tools/killev: Added rdf-summary killing stuff from R Burton
- (r.burton@180sw.com)
-
-2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: OpenSSL LDFLAGS also needs to include -lcrypt
-
-2001-05-08 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Add the importers subdir.
-
- * configure.in: Make the importers/Makefile
-
-2001-05-08 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped check for gal to 0.7.99.3.
-
-2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * acconfig.h: undef HAVE_SSL and HAVE_OPENSSL
-
- * configure.in: Check for OpenSSL.
-
-2001-05-05 Gediminas Paulauskas <menesis@delfi.lt>
-
- * configure.in: upped required gtkhtml version to 0.9.3, even that is
- not enough for idl changes.
- * README: you need LIB_XML_1_BRANCH. updated all version requirements
- from configure.in
-
-2001-04-26 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Don't autogen
- `executive-summary/widgets/Makefile', as that subdir doesn't get
- distributed anymore.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * README: We no longer depend on libunicode.
-
- * configure.in: Remove check for libunicode. Remove unicode cflags
- and libs from all CFLAGS and LIBS variables. Add GAL_LIBS for
- things that need to depend on just gal (for gunicode).
-
- * configure.in: Check for gethostbyname_r so e_gethostbyname_r
- will DTRT.
-
-2001-04-24 Dan Winship <danw@ximian.com>
-
- * configure.in: Bump up the gal requirement
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Don't autogen the the Makefile for the importer
- docs.
-
- * Makefile.am (SUBDIRS): Build the docs last.
-
-2001-04-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (have_nspr_libs): We need to link in more than just
- libnspr4, we also need libpthread.
- (have_nss_libs): Don't forget to add nsprlibs to the LDFLAGS.
-
-2001-04-21 Duncan Mak <duncan@ximian.com>
-
- * art/Makefile.am (images_DATA): Added in composer-message.png.
-
-2001-04-16 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: `mail/importers/Makefile' must come after
- `mail/Makefile'.
-
-2001-04-16 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (SUBDIRS): Add `doc'.
-
- * configure.in: Check for Editor.idl using `$GNOME_PATH' as well.
-
-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 Hctor Garca 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 df404ca32f..0000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,45 +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 \
- libical \
- widgets \
- shell \
- libibex \
- camel \
- filter \
- libversit \
- libwombat \
- addressbook \
- composer \
- mail \
- calendar \
- wombat \
- importers \
- my-evolution \
- art \
- ui \
- default_user \
- views \
- tools \
- doc \
- help \
- po \
- omf-install
-
diff --git a/NEWS b/NEWS
deleted file mode 100644
index 11ee375eee..0000000000
--- a/NEWS
+++ /dev/null
@@ -1,1942 +0,0 @@
-Version 0.15
-------------
-
-Shell:
-
- - Fixed a problem with shortcuts not appearing when created by the
- mailer. (Ettore)
-
- - Fixed right-click menu behavior for folders in the folder bar.
- (Ettore)
-
- - Got Rename to work again. (Ettore)
-
- - Fixed some folder copy/move/dnd bugs. (Ettore)
-
- - Added a menu item to configure the Pilot settings. (Ettore)
-
- - Fixed some other miscellaneous bugs/crashes. (Ettore)
-
- - Added ability to run the intelligent importers from the File->Import
- menu item. (iain)
-
-Mailer:
-
- - Fixed the multiple error-dialog thing. (Michael)
-
- - Fixes to PGP decrypting and verification code. (Jeff)
-
- - Made vFolders work a lot better. (Michael)
-
- - Added a confirm expunge option to the mail settings dialog.
- (Jeff)
-
- - Fixed the update-IMAP-unread-counts bug. (Jeff)
-
- - Show messages in the user's preferred charset if the message
- itself doesn't contain charset information or if the message
- charset is wrong (ie the system can't convert the text to utf-8).
- (Jeff)
-
- - Many backend fixes that users won't notice. (Michael, Jeff, Dan)
-
- - Fixed the crash that accompanied the invalid address warning. (Trow)
-
- - Properly encode the mailto: links we generate inside of displayed
- messages. (Trow)
-
- - Improve the signature editor. (iain)
-
-Calendar:
-
- - Backend improvements (JP, Rodrigo).
-
- - The alarm daemon can now re-enter properly [#10840]. (Federico)
-
- - Alarms can now have zero-time offsets [#7892]. (Federico)
-
- - Warning fixes. (Chris)
-
- - Fixed custom Glade widgets on non-Linux systems. (Dan)
-
- - Fixed crashing problems in the event/task editor. (Damon)
-
-Addressbook:
-
- - Miscellaneous bug fixes. (Trow, Chris Toshok, Chris Lahey, JP,
- Peter Williams)
-
- - Better handling of addresses containing commas or other special
- characters. (Trow)
-
- - Fixed bugs related to sending mail by left-clicking on an address
- inside a message. (Trow)
-
- - Auto-completion now matches against contact nicknames. (Trow)
-
- - Added help text and generally cleaned up the contact editor.
- (Anna)
-
- - Handle multiple wombats properly. (Chris Toshok)
-
- - Made which book to use for address completion configurable (no gui
- for this yet.) (Chris Toshok)
-
- - Made Print Preview work in addressbook. (Chris Lahey)
-
-Pilot:
-
- - Now syncs exception dates in calendar and addressbook notes. (JP)
-
- - Does not overwrite custom data on pilot. (JP)
-
- - Address completion no longer marks records as changed. (JP)
-
- - Miscellaneous other bug fixes. (JP)
-
-Summary:
-
- - Cache images instead of repeatedly reloading them (iain)
-
- - Only redraw when the summary is visible (iain)
-
- - Use the encoding specified in the RDF file (Takuo Kitame)
-
- - Leak fixes (Larry)
-
- - Show todays tasks works (iain)
-
- - Make the preferences dialog nicer. (iain)
-
-Importers:
-
- - Handle cases where the Netscape transport is nothing. (iain)
-
-Version 0.14 (Beta 4), 2001-09-21
----------------------------------
-
-General:
-
- - Lots of i18n fixes. (Zbigniew Chyla and others)
-
- - Made the splash screen use BackingStore. (Ettore)
-
- - Added a quit dialog box. (Ettore)
-
- - Fixed a shell crash that could happen when launching Evolution
- before a previously launched instance was done initializing itself.
- (Ettore)
-
- - Fixed other random shell crashes. (Ettore)
-
- - Got the shell to remember window geometries on exit. (Ettore)
-
- - Fixed some things for Automake 1.5 (unfinished). (Richard
- Boulton)
-
- - Add nice highlighting to DnD operations in the folder tree.
- (Ettore, Clahey)
-
- - Fixed several leaks. (Dan)
-
- - Fixed some problems with folder creation and deletion. (Toshok)
-
- - Made the Summary the default folder. (Ettore)
-
- - Made the title bar display the unread message count again.
- (Ettore)
-
-Mail:
-
- - Had a few beers while sitting back and relaxin'. (Jeff, Michael)
-
- - Check for valid addresses before sending. (Trow)
-
- - Use contact preferences when deciding whether or not to put the
- composer into HTML mode by default. (Trow)
-
- - Properly address mail from "hidden" contact lists. (Trow)
-
- - Redid folder unread counts/folder tree backend code
- completely. (Michael)
-
- - Implemented/fixed getfolderinfo in maildir/spool/local
- folder/vfolder, required to make unread counts work. (Michael)
-
- - Redid 'local folder' handling code completely. (Michael, Peter)
- Also fixed the properties dialogue to get the list of supported
- types dynamically, and set the right one at startup. (Michael)
-
- - Redid vfolder code in evolution-mail completely. Main visible
- change is they open at startup, and the vfolder editor works
- much better. (Michael)
-
- - Made it so fcntl(2) locking failures on filesystems (e.g. NFS)
- that dont support locking are treated as success. (Michael)
-
- - Fix imap inbox filtering, then moved it to CamelFolder, and
- partly implemented it for spool and maildir mailboxes. (Michael)
-
- - Made the vfolder UNMATCHED folder's name translatable. (Michael)
-
- - Change the way the 'not body contains' filter rule works, so that
- it runs much more efficiently, particularly on IMAP. (Michael)
-
- - Camel will not try and convert charsets of data that contain
- invalid charset data, thus data will not be tainted by
- a failed conversion process. (Michael)
-
- - A few threading scheduling changes to try to optimise the user
- experience. Also changed the way threads are terminated,
- avoiding some possible libpthread bugs. (Michael)
-
- - Changed vfolder uri's to not include the query, set it separately.
-
- - Removed a lot of special case code for vfolder/file uri's, other
- dead or newly redundant code, cleanups, etc. (Michael)
-
- - Fixed a bug in libibex that would overallocate block data and
- corrupt it and crash, also fail-back and reset the index in
- more cases. (Michael)
-
- - Fix filtering on score so the expression compiles. (Michael)
-
- - Came to visit USA at a very wrong time. (Michael)
-
- - Removed X-Evolution headers before sending messages. (Jeff)
-
- - When configuring a new default account, make sure to set it as the
- default. (Jeff)
-
- - Convert all textual parts to 8bit before saving them, this makes
- saved messages more human readable. (Jeff)
-
- - Don't cache PGP passphrases unless the user requests to do so.
- (Jeff)
-
- - Unsubscribe from folders before deleting them. (Jeff)
-
- - Fixed a number of race conditions in the subscribe dialog. (Jeff)
-
- - Save transport (SMTP) passwords if the user has asked us to. (Jeff)
-
- - Hide the S/MIME frame in the account editor, we won't be
- supporting it for 1.0. (Jeff)
-
- - Fixed it so that icons are displayed for PGP messages. (Jeff)
-
- - Give a description for each of the Source and Transport types when
- configuring an account. This makes a few things less confusing.
- (Jeff)
-
- - When performing a Send & Receive on a disconnected IMAP server, if
- the user provides a password, connect tot he IMAP server and display
- it's folders too. (Jeff)
-
- - Return a folder info for each IMAP folder created when the user
- creates a recursive directory structure. (Jeff)
-
- - Added support for more charset conversions (including all
- Windows-cp125x charsets). (Jeff)
-
- - When the disk is full, warn the user and don't crash. (Jeff)
-
- - Handle POP servers that don't support the UIDL extension. (Jeff)
-
- - Several PGP fixes. (Jeff)
-
-Addressbook:
-
- - Miscellaneous bug fixes. (Jon Trowbridge, Chris Toshok, Chris Lahey,
- Ettore Perazzoli, Iain Holmes, Zbigniew Chyla, Jacob Berkman)
-
- - Fixed race conditions associated with adding/removing contacts.
- The addressbook should be much more stable now. (Trow)
-
- - Fixed reference counting bugs in addressbook & wombat. (Trow)
-
- - Made address lookup smarter; cut & paste of address now mostly works.
- (Trow)
-
- - Plugged Trow's memory leaks. (Larry)
-
- - Name completion now works with one-word names, so it is now much
- easier to send mail to Cher. (Trow)
-
- - Better handling of contact lists in the composer entries. (Trow,
- Toshok)
-
- - SelectNames dialog fixes. (Trow)
-
- - Better handling of contact lists in the pilot conduits. (JP)
-
- - Added Free busy URL and Calendar URI info to contact editor and
- ECard. (JP)
-
- - Made it so you can select uneditable text in Contact Editor.
- (Chris Toshok)
-
- - Worked on LDAP dialog. (Chris Toshok)
-
- - General LDAP work. (Chris Toshok)
-
- - Fixed charset handling within VCard handling. (Chris Lahey)
-
- - Reworked Drag & Drop for card view.
-
-Calendar & Tasks:
-
- - Free/Busy changes. (JP, Rodrigo)
-
- - iTIP fixes (JP)
-
- - i18n fixes, particularly for printing (Zbigniew Chyla)
-
- - Added option to confirm deletions (Federico)
-
- - Improved alarm system (Federico)
-
- - Fixed crashing bug when deleting a folder (Federico)
-
- - Added option to hide completed tasks (Damon)
-
- - Timezone changes for interoperability with Outlook (Damon)
-
- - Fixed problems displaying/parsing times in locales which don't specify
- 'am' and 'pm' strings (Damon)
-
- - Added toolbar button to delete the selected calendar event (Damon)
-
- - Meeting selector integrated (JP)
-
-Summary:
-
- - Fixed bugs and leaks. (Iain)
-
- - Fixed bug with handling of the Slashot RDF files. (Iain)
-
- - Made the Addressbook and Tasks links open the editor for
- them. (Iain)
-
- - Mail summary doesn't force all folders to be opened. (Iain)
-
- - Calendar summary shows if an alarm is set for an appointment. (Iain)
-
- - Timezone fixes. (Iain, Damon)
-
-Importers:
-
- - Fixed more bugs. (Iain)
-
- - Netscape importer shouldn't crash on Movemail users anymore.
- (Iain)
-
- - Pine importer should import addressbooks better. (Iain)
-
- - VCard importer will actually import things now. (Iain)
-
-
-Version 0.13 (Beta 3), 2001-08-21
----------------------------------
-
-Global:
-
- - New startup assistant to create mail accounts, import mail and set
- your timezone. (Iain, Taylor)
-
- - Improved the appearance and behavior of the clickable title bar and
- the folder tree. (Ettore)
-
- - "Stock" folders such as Inbox have their names translated now and
- cannot be removed. (Ettore)
-
- - Moved the Summary (formerly known as "My Evolution") to be a
- normal node instead of being the toplevel node. (Ettore)
-
- - Fixed some problems with copying, moving and removing folderes.
- (Jason)
-
- - Fixed the handling of documentation files in the Help menu. It
- now integrates nicely with Nautilus and Scrollkeeper. (Aaron,
- Kjartan)
-
- - Implemented the `File -> New' menu. (Ettore)
-
- - Improved error messages on start-up. (Ettore)
-
- - Fixed various crashes and minor bugs. (Ettore, Jason)
-
- - Various UI tweaks and improvements. (Anna, Tuomas, Jakub)
-
-Mail:
-
- - Fixed creating IMAP folders. (Jeff)
-
- - Add a shortcut to the INBOX of IMAP or spool stores when
- their accounts are first created. (Peter)
-
- - Fixed Crash on Exit bugs. (Jeff)
-
- - Many more i18n fixes. (Zbigniew Chyla, Jeff and others)
-
- - Subscribe dialog UI tweaks. (Peter, Anna)
-
- - Displaying PGP signed messages now shows icons. (Jeff)
-
- - Sensitize menu items based on number of selected messages. (Peter)
-
- - Always-sign options for PGP. (Jeff)
-
- - Fixed keep-on-server for POP servers that don't support UIDL.
- (Jeff)
-
- - Several IMAP fixes. (Peter, Jeff, Danw)
-
- - Fix crash after conversion of an empty folder to another
- format. (Peter)
-
- - Ibex now limits its file descriptor usage. (Michael)
-
- - When deleting an account, remove the shortcuts that point to it. (Peter)
-
- - Several IMAP fixes. (Peter, Jeff, Danw)
-
- - Miscellaneous bugfixes all around. (Peter, Jeff, Danw, Michael, others)
-
-Calendar & Tasks:
-
- - Calendar no longer crashes when you scroll a busy month view
- (Federico).
-
- - Performance improvements throughout (Damon).
-
- - Improved search bar; now handles categories. (Jon, Federico)
-
- - The date navigator now reflects the results of the search bar.
- (Federico)
-
- - An empty task is no longer added when you have selected a
- category. (Federico)
-
- - Internationalization fixes (Zbigniew).
-
- - Timezone fixes (Damon).
-
- - Time transparency and component classification support (Damon).
-
- - Folder bar now displays the selected time range (Damon).
-
- - Improved settings dialog (Anna, Damon, Federico).
-
- - iTIP/iMIP fixes for attendees, cancellation. (JP).
-
- - Category icon drawing fixes. (Rodrigo)
-
- - Alarm fixes. (Federico)
-
- - Calendar components can be saved independently. (JP)
-
- - New icons. (Tuomas)
-
- - Contacts support. (Damon)
-
- - You can double-click on appointments to edit them. (Damon)
-
- - Share more code between the backends. (Rodrigo)
-
- - Miscellaneous fixes all over the place. (Damon, JP, Rodrigo, Federico)
-
-Addressbook:
-
- - Various fixes. (Anna Dirks, Dan Winship, Jason Leach, Jos Dehaes,
- Kjartan Maraas, Lahey, Nat Friedman, Radek Doulik, Toshok, Trow)
-
- - Made addressbook menus match the right click menus. (Lahey)
-
- - Made addressbook use camel for building email addresses. (Trow)
-
- - Fixed up phone number matching to not cause errors. (Lahey)
-
- - Made the alphabet bar change the current search. (Lahey)
-
- - Made duplicate contact matching less sensitive. (Lahey)
-
- - Changed advanced search to match behavior in mailer. (Toshok)
-
- - Redesigned LDAP server dialog. (Anna Dirks)
-
- - Work on addressbook authentication. (Toshok)
-
- - Changes to EDestination. (Trow)
-
- - Magic comma work. (Trow)
-
- - Redesigned ESelectNames dialog. (Anna Dirks)
-
- - Made LDAP changes appear in gui immediately if they're made by the
- local client. (Toshok)
-
- - Made ECard hold a link to its original EBook. (Lahey, Trow)
-
- - Adapted for new ESearchBar. (Federico, Trow)
-
- - Added the ability to create cards from anywhere in evolution.
- (Lahey)
-
- - Made searches for completion not use invalid cached data. (Trow)
-
- - Encode strings typed in by the user for use in sexps. (Toshok)
-
- - Made EContactEditor make the save button active more often.
- (Toshok)
-
- - Made ESelectNames handle LDAP storages. (Toshok)
-
- - Added full country list to addressbook full address editor.
- (Lahey)
-
- - Added the contact count to the folder bar. (Lahey)
-
- - Updated icons. (Damon, Ettore)
-
- - Worked on addressbook conduit. (JP)
-
- - Made ESelectNames only show names on the left that aren't on the
- right. (Trow)
-
- - Fixed up minicard dragging. (Toshok)
-
-My Evolution:
-
- - Miscellaneous fixes all over the place. (iain)
-
- - New icons. (Tuomas and Jakub)
-
- - Works for people whos text colour was a light colour. (iain)
-
-
-Version 0.12 (Beta 2), 2001-07-31
----------------------------------
-
-Shell:
-
- - Change the name of the local storage node from "local" to "Local
- Folders". (Jason)
-
- - Fixed a problem with invalid URIs crashing the shell. (Jason)
-
- - Hide internal folder types (like "vtrash") from user. (Ettore)
-
- - Fixed some crashes that could happen when creating folders.
- (Ettore)
-
- - Fixed the URIs for the installed manuals in the help menu.
- (Ettore)
-
- - Added a status bar to show components' tasks instead of using
- pop-up progress dialogs. (Ettore)
-
- - Other miscellaneous bug and leak fixes. (Jason, Ettore)
-
- - Initialize GConf properly when GtkHTML is built with GConf
- support. (Frederic Crozat)
-
- - Make the shortcut bar not change the current group when renaming
- it. (Jason)
-
-Mail:
-
- - Use new shell ActivityClient interface for progress reporting so
- the ongoing activities appear at the bottom of the window instead of
- using a pop-up. (Michael)
-
- - "Remember this password" check box added. (Peter, Jeff)
-
- - UI for timespan editor cleaned up. (Peter)
-
- - UTF8 issues with PGP and mail display addressed. (Jeff)
-
- - Translate some more strings. (Jeff, Zbigniew Chyla)
-
- - Fix camel_session_*_timeout functions. (Michael)
-
- - Fix application/pgp handling. (Jeff)
-
- - Fix DnD with no messages selected. (Jeff)
-
- - Respect the GTK+ theme when generating the header in the mail
- display. (Jeff)
-
- - Make the default date column smaller. (Peter)
-
- - Don't display "0 hidden" messages. (Peter)
-
- - 'q' now toggles the message (pre)view. (Peter)
-
- - Rename the "Date" column to "Sent". (Peter)
-
- - Fix saving of passwords (some passwords were being saved and
- loaded under different URI's). (Jeff)
-
- - Enter now always open the message in a new window. (Peter)
-
- - Gray out unsupported authentication mechanisms. (Jeff)
-
- - Fix saving/loading of several preferences. (Peter, Jason)
-
- - Overwrite attachment files correctly. (Jeff)
-
- - Don't lose the selection when deleting the last message. (Jason)
-
- - Improve guessing of which address to use when replying. (Jeff, Jason)
-
- - If SSL isn't supported, indicate so. (Peter)
-
- - Improve handling of NoSelect IMAP folders. (Peter)
-
- - Add a browse button for local mailboxes. (Jason)
-
- - VTrash handling improvements. (Jeff, Peter)
-
- - Display "unsent" in outbox summary. (Peter)
-
- - Only have main view folder browsers save view settings. (Peter)
-
- - Fixes to POP3 cache. (Jeff)
-
- - Handle variants of charset names. (Jeff)
-
- - Progress reporting and optimizations for IMAP. (Dan)
-
- - Progress reporting for SMTP. (Michel)
-
- - Handle unencoded eight-bit headers. (Jeff)
-
- - Miscellaneous improvements to Camel backend. (Michael, Jeff)
-
- - Several crashes fixed. (everyone)
-
-Addressbook:
-
- - Fixed some warnings. (Chris T.)
-
- - I18n fixes. (Zbigniew Chyla)
-
- - Address quoting in composer bug fixed. (Jon)
-
- - Made it so that Other Contacts doesn't show up if you don't have
- LDAP compiled in. (Jason)
-
- - Made it so that Other Contacts doesn't show up if you don't have
- any LDAP servers configured. (Jos Dehaes)
-
- - General bug fixes. (Chris T., Jon, Frederic Crozat, Jason,
- JP, Ettore, Chris L.)
-
- - Some LDAP cleanup. (Chris T.)
-
- - Crash fixes. (Jon, Dan)
-
- - Work on contact lists. (Chris T., Jon)
-
- - Made Contact Editor Save & Close button not active if nothing is
- changed. (Chris T.)
-
- - Added accelerators to a few dialogs. (Taylor Hayward)
-
- - Made evolution-vcard-importer.c load the file into the correct directory.
- (Iain)
-
-Calendar & Tasks:
-
- - Show icons for categories. (Rodrigo)
-
- - Multiple selections for cut/copy/paste in task list. (Rodrigo)
-
- - Added missing underlined shortcuts for dialogs. (Taylor)
-
- - Many timezone-related fixes. (Damon, Federico)
-
- - Alarm notification dialogs. (Federico)
-
- - iTIP and iMIP ongoing work. (JP)
-
- - Consistency & cosmetic fixes for dialogs and menus. (Damon,
- Federico)
-
- - You can now create new calendar/tasks folders in the shell.
- (Ettore)
-
- - Printing fixes. (Damon)
-
- - Added a search bar for tasks folders. (Federico)
-
- - The task pad in the day view is now filtered as well. (Federico)
-
- - Timezone support for conduits. (JP)
-
- - General bug fixes. (Federico, JP, Damon, Rodrigo)
-
-My Evolution:
-
- - Removed the wipe trackers option. (Iain)
-
- - Fix broken links in the Calendar. (Iain)
-
- - Added some more German cities. (Iain)
-
- - Fixed the New Feed button. (Iain)
-
- - Fixed the KDE and Newsforge urls. (Iain and Jason)
-
-
-Version 0.11 (Beta 1), 2001-07-12
----------------------------------
-
-Shell:
-
- - Drag and drop handling (Chris T.)
-
- - Online/Offline operation (Ettore)
-
- - Numerous code cleanups and bug fixes (Ettore & Jason)
-
-Mail:
-
- - Added ability to specify a charset in the composer and for the
- Preview Pane. (Jeff, Danw)
-
- - Auto-save messages during composition and composer
- crash-recovery. (Larry)
-
- - Better signature file handling. (Radek)
-
- - File->Insert menu. (Larry)
-
- - Address-completion in the composer. (Trow)
-
- - Much improved PGP/GPG. (Jeff)
-
- - Cut/Copy/Paste and Drag & Drop. (Jeff)
-
- - Disconnected IMAP, IMAP filtering, and other IMAP improvements. (Danw)
-
- - Empty Trash On Exit. (Jeff)
-
- - More informative Folder message counts (new/hidden/total). (Peter)
-
- - Implemented "Select Thread". (Peter)
-
- - Movemail fixes and improvements. (Michael)
-
- - Improved/Configurable Forward/Reply functionality. (Jeff, Trow, Danw)
-
- - Improved Message browser window. (Jeff, Peter)
-
- - Load HTML images Sometimes/Always/Never. (Danw)
-
- - rfc2184 conformance. (Jeff)
-
- - Online/Offline modes. (Ettore, Danw, Jeff)
-
- - HTML indexing. (Michael)
-
- - Spool providers. (Michael)
-
- - Many i18n fixes. (Jeff, Trow, Larry, Michael)
-
- - Fixed saving of html signature preferences. (Peter)
-
- - Cleaned up exiting by having remote stores sync folders (Peter)
-
- - Attached binhex files do not cause infinite loops (Peter)
-
- - Don't send BCC headers when sending via SMTP (Peter)
-
- - Let you show and hide attached message/rfc822's (Peter)
-
- - Implemented Create/Remove/Move Folder. (Jason, Jeff)
-
- - Maildir fixes and improvments, support for subdirectories. (Michael)
-
- - Progress reporting using via shell activity interface. (Michael)
-
- - Many bug fixes all around. (Michael, Jeff, Danw, Peter, Trow and others)
-
-Addressbook:
-
- - Cut/Copy/Paste (Chris T.)
-
- - Improvements to address completion, matching and merging (Jon, Chris L.)
-
- - LDAP improvements (Chris T.)
-
- - Numerous bug fixing (Jon, Chris L., Chris T.)
-
-Calendar & Tasks:
-
- - Timezone support (Damon)
-
- - Cut/Copy/Paste (Rodrigo)
-
- - Event/Task editor rewrite (Federico & JP)
-
- - Improved Printing (Damon)
-
- - Itip/Imip improvements (JP)
-
-Importers:
-
- - Fixes, bug fixes and more fixes. (Iain & Jason)
-
-General:
-
- - New graphics/icons (Jakub & Tuomas)
-
- - UI Improvements (Anna & Taylor)
-
- - 'make distcheck' should hopefully be working again (Peter)
-
- - Have 'make install' work for non-root users in Camel, albeit
- with a large and important warning message (Peter)
-
-My Evolution:
-
- - Completely new and prettier My Evolution (nee Executive Summary)
-
- - Pretty graphics (Jakub)
-
- - Mail, Calendar and Task summaries to tell you what you need to do
- today.
-
- - Weather forecasts so you don't need to look out the window (I
- dunno, hackers seem to dislike looking out the window or
- something...)
-
- - News feeds so you don't need to go to websites to see what news
- articles you don't want to read.
-
- - Printing, you can print it out and make it look like you've got
- lots of stuff to do when really you're just trying to pass the
- time by playing Aisleriot or GLine all day (Iain)
-
-
-Version 0.10 "Tasmanian Devil", 2001-04-26
-------------------------------------------
-
-Shell:
-
- - Fixed some usability bugs in the folder selection and creation
- dialogs. (Ettore)
-
- - Added a --debug option. (Dan)
-
- - Added support for drag and drop operations. (Ettore)
-
-Mail:
-
- - SSL (S/IMAP, S/POP, and S/SMTP). (Jeff)
-
- - Virtual Trash folders in each mail storage and "Empty Trash" menu
- item to expunge all folders in a store. (Jeff)
-
- - Email addresses in mail headers are now right-clickable to add
- them to the Addressbook (Jon, Radek)
-
- - Hide deleted messages is now a mode rather than a one-time
- operation. (Michael)
-
- - When sending plain text mail, use the new plain text mode of the
- GtkHTML editor (Larry)
-
- - Cancellable operations, cancellable/async dns lookup, slightly
- improved progress reporting. (Michael)
-
- - Allow per-identity Draft and Sent folders. (Dan)
-
- - Replies quoted with "> " in messages are now displayed dimmed to
- make it easier to find the new bits of text. (Radek)
-
- - Saved searches. Searches now configurable via XML with supporting
- C code. (Michael)
-
- - UNMATCHED vFolder (shows all messages that are in no other
- vFolder). (Michael)
-
- - SASL Authentication (Kerberos4, DIGEST-MD5, CRAM-MD5, PLAIN,
- LOGIN, ANONYMOUS) for IMAP and SMTP (haven't done POP yet)
- (Jeff, Dan)
-
- - Filter/vFolder on Mailing List. (Michael)
-
- - Resend sent items. (Jeff)
-
- - Allow users to turn on/off headers in the composer and added
- Reply-To header entry in the composer. (Miguel, Jeff)
-
- - Numerous OpenPGP (PGP/MIME) fixes. (Jeff)
-
- - Replying to a message chooses account based on message
- addressee's. (Jeff)
-
- - Redid Forward Inline and Forward Quoted. (Jeff)
-
- - IMAP fixes: greater configurability for faster startup/mail check
- (Dan), folders should now notice new messages when you switch to
- them (Dan), copying/moving many messages at once should be much
- faster (Jeff), better support for old IMAP servers (Dan)
-
- - IMAP message bodies are now cached to local disk to speed up
- re-access (Dan)
-
- - New config dialogs (last time!) (Anna, Dan)
-
- - Sorting by a text field in the message list no longer generates a
- random order. (Michael)
-
- - Fixed "crash when getting new mail from 2 POP servers" bug. (Dan)
-
- - Numerous bugfixes, cleanups and optimisations. (Everyone)
-
-Addressbook:
-
- - Added support for non editable sources. (Toshok)
-
- - Added address completion for use in contact entries using the
- select names system. (Jon Trowbridge)
-
- - Fixed some major crashes in the addressbook backend. (Clahey)
-
- - Updated Ximian's contact information. (Jason Leach)
-
- - Finished LDAP support. (Toshok)
-
-Calendar:
-
- - Event creation fixes. (Miguel)
-
- - Calendar loading fixes and removal of old code. (Federico)
-
- - Made the iTIP control have better spacings. (Anna)
-
- - i18n fixes. (Kjartan)
-
-Tasks:
-
- - Created a popup list item for ETable to select the Status,
- Classification, Priority, Percent & Transparencey fields. (Damon)
-
- - Created a popup date editor item for ETable to set all the dates in the
- tasks. (Damon)
-
-Importers:
-
- - Created Intelligent Importers that look for certain files on your disk
- and works out what type of data it is. Currently Intelligent Importers
- exist for Pine, Elm and Netscape. (Iain)
-
-General:
-
- - Rewrote ETree in gal. Changed evolution to support the changes in
- API. (Clahey)
-
- - Lots of Etable/ETree bug fixes. (Clahey)
-
- - Lots of i18n/l10n fixes. (Kjartan Maraas, Gedeminas Paulauskas,
- and the Evolution gang)
-
- - Fixed the shell interface so it could correctly create folders. (Iain)
-
-
-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 3ad8162399..0000000000
--- a/README
+++ /dev/null
@@ -1,249 +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 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" or "foo-dev" packages.
-
-
-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. For example:
-
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
-
- --localstatedir is needed to make the docs integrate with scrollkeeper
- and needs to point to the directory containing the scrollkeeper indices
- which are in: gnome-config --localstatedir
-
-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. For example:
-
- 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
-------------
-
-The following required 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 - latest from xml-i18n-tools-stable-1-x branch in
- GNOME CVS (0.8.2 is too old)
-
- - scrollkeeper - 0.1.4 or later (*)
-
- - 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_BRANCH".)
- (*)
-
- - gnome-print - 0.25 or later (*)
-
- - gdk-pixbuf - 0.9.0 or later (*)
-
- - ORBit - 0.5.8 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 - 1.0.0 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 - 0.14 or later
-
- - bonobo - 1.0.3 or later
-
- *** Note that bonobo must be installed with the same --prefix as
- *** either gnome-libs or evolution for the Makefiles to work
- *** properly.
-
- - gal (GNOME Application Library) - 0.11.99.2 or later
-
- - gtkhtml - later than 0.11.0
-
-Other non-GNOME Dependencies:
-
- - Berkeley's libdb - 3.1.17
-
- db3 is available from http://www.sleepycat.com. Make sure to get
- 3.1.17, it isn't the latest version.
-
-
-COMPILING BERKELEY DB
----------------------
-
-If you don't have 3.1.17 installed on your system or Evolution doesn't
-detect it for some reason, here is a way to get Evolution to link to
-it without messing up your system installation.
-
- * Get the Sleepycat tarball from:
-
- http://www.sleepycat.com/update/3.1.17/db-3.1.17.tar.gz
-
- * Install the content somewhere _other_ than the evolution source tree.
- e.g: NOT evolution/db-3.1.17
-
- * Compile according to instructions, but installing into some custom
- prefix, for example:
-
- ../dist/configure --prefix=/home/user/berkeleydb-3.1.17
-
- * Autogen Evolution specifying that it has to look for the DB
- library there, for example:
-
- ./autogen.sh --prefix=/opt/gnome
- --with-db3-includes=/home/user/berkeleydb-3.1.17/include
- --with-db3-libs=/home/user/berkeleydb-3.1.17/lib
-
-
-COMPILING PALM PILOT SUPPORT
-----------------------------
-
-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 0.9.5
-http://www.pilot-link.org
-
-2) gnome-pilot 0.1.61
-http://www.eskil.org/gnome-pilot/
-
-3) evolution
-In your evolution source directory do ./autogen.sh --prefix=<evo-prefix>
---with-pisock=<pilot-link-prefix> --enable-pilot-conduits=yes
-make
-make install
-
-
-SSL SUPPORT
------------
-
-If you want SSL support (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 directory 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.
-
-
-SOURCE TREE LAYOUT
-------------------
-
-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 9777d3b846..0000000000
--- a/acconfig.h
+++ /dev/null
@@ -1,41 +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 HAVE_SSL
-#undef HAVE_OPENSSL
-#undef MOVEMAIL_PATH
-#undef USE_DOT
-#undef USE_FCNTL
-#undef USE_FLOCK
-#undef ENABLE_NNTP
-#undef HAVE_BROKEN_SPOOL
-#undef ENABLE_PEDANTIC_PGPMIME
-
-/* db3 version */
-#undef EVOLUTION_DB_VERSION_MAJOR
-#undef EVOLUTION_DB_VERSION_MINOR
-#undef EVOLUTION_DB_VERSION_PATCH
-
-/* 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 69351c3c66..0000000000
--- a/addressbook/ChangeLog
+++ /dev/null
@@ -1,9136 +0,0 @@
-2001-10-02 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_get_textification): Made the max length of
- the textification be 2047 characters. Fixes Ximian bug #3021.
-
-2001-10-01 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): if there
- was no first name or last name, file as the company.
-
-2001-10-01 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_changes_foreach_key): if there is a db error,
- assume deletion
- (pas_backend_file_changes): write after all is done for efficiency
-
-2001-09-28 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_changes_foreach_key): g_strdup
- (pas_backend_file_changes): ditto, make sure to free all data and
- do a hash write after each add/remove
-
- * conduit/address-conduit.c (local_record_to_pilot_record): use
- the local record category
- (local_record_from_ecard): ndle the fields and category we don't
- sync by making sure we don't overwrite them
-
-2001-09-27 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_construct): do an oaf query to
- get a list of all objects implementing our BookFactory interface,
- instead of just activating the one IID. this should really be a
- global list, not a per EBook.
- (e_book_load_uri): start the iteration over our list of
- BookFactory's.
- (e_book_load_uri_from_factory): try and load the uri.
- (e_book_load_uri_open_cb): callback function for the
- BookFactory_openBook call - if it succeeds, call the user's
- callback. otherwise step to the next factory.
- (e_book_load_uri_step): go to the next factory in our list, and
- error out if there are no more.
-
-2001-09-27 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): use the old
- record (if there was one) so as not to overwrite fields we don't
- sync
- (pre_sync): store the dbi in the context and don't make it object
- data
-
-2001-09-26 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-factory.c (pas_book_factory_destroy): use
- priv->iid instead of the hardcoded string here.
- (pas_book_factory_activate): parameterize the factory's iid, as in
- the calendar server, and provide a default if iid == NULL.
-
- * backend/pas/pas-book-factory.h: add iid parameter for
- pas_book_factory_activate.
-
-2001-09-26 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_get_textrep): Use
- camel_address_format, not camel_address_encode.
-
-2001-09-26 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: Added help text (thanks
- to Aaron) and re-worded the labels, and fixed the shortcuts on the
- brand-spanking-new Collaboration tab.
-
-
-2001-09-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.h: add
- completion_book.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_new): get /Addressbook/Completion/uri, and
- if it's present, use the corresponding EBook for completing
- addresses.
- (focus_out_cb): use manager->completion_book here instead of NULL,
- which corresponds to the local addressbook.
- (completion_popup_cb): same.
- (e_select_names_manager_create_entry): same.
-
-2001-09-26 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-card-compare.c (e_card_compare_name_to_string):
- Properly handle names when the individual elements (given,
- addition, family) contain whitespace. (Bug #10502)
-
- * backend/ebook/e-destination.c (e_destination_set_name): Reset
- textrep when we change the name.
- (e_destination_set_email): Reset textrep when we change the email.
- (e_destination_get_textrep): Make sure that the textrep version of
- the address is properly quoted if it contains unsafe characters.
- (All related to bug #10796)
-
- * gui/component/select-names/e-select-names-completion.c
- (match_nickname): Fix nickname matching. (bug #9698)
- (make_match): Use e_completion_match_new when building our match,
- rather than ad hoc manipulation of the struct.
-
-2001-09-26 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_changes): set
- the last_use and use_score fields of the card to known values so
- the card doesn't register as changed when only they have changed
-
-2001-09-26 Peter Williams <peterw@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): Fix this function
- to set email addresses properly, and handle multiple occurrences of
- email addresses, home phone numbers, and business phone numbers.
-
-2001-09-25 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-component.c (user_create_new_item_cb):
- Handle creating the new contact in the current folder if it's a
- contacts folder. Fixes Ximian bug #7814.
-
-2001-09-24 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/Makefile.am (LDAP_SCHEMA): add
- evolutionperson.schema
- (EXTRA_DIST): add LDAP_SCHEMA to the dist (but don't install it).
-
-2001-09-23 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): sync the
- note the to pilot and make sure to blank fields when appropriate
- (local_record_from_ecard): sync the note to the desktop
-
-2001-09-22 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c (do_create): g_free (id) in the
- error case to plug a memory leak.
-
-2001-09-22 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (remodel): when creating the cards,
- don't display any of the subname fields (surname, given, middle,
- suffix, etc.)
-
-2001-09-22 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-card-simple.c
- (e_card_simple_get): add getters for the additional name fields.
- (field_data): move FAMILY_NAME to the end of the list, and add
- GIVEN_NAME, ADDITIONAL_NAME (middle name), and NAME_SUFFIX.
-
- * backend/ebook/e-card-simple.h: same.
-
-2001-09-21 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (print_preview_cb): Hooked up print
- preview button.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h
- (e_addressbook_view_print_preview): Added this function.
-
- * printing/e-contact-print.c, printing/e-contact-print.h
- (e_contact_print_preview): Added this function.
-
-2001-09-19 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (name_and_email_simple_query_cb):
- Use the default e-mail address if we have nothing else to go on.
- Previously we just failed, which basically meant that name-only
- searches would never work properly.
- (nickname_simple_query_cb): The logic was a bit tangled here; if
- our query status isn't SUCCESS, always give up but don't leak the
- destination. And if our nickname query fails and we try the
- name-and-email query, use the textrep for a name-only search. The
- only reason we are doing a nickname query in the first place is if
- we have an obviously invalid e-mail.
- (launch_cardify_query): Use e_destination_is_valid to determine
- if we should try a nickname query first.
- These changes basically fix bug 7728, and generally make the
- auto-cardification of addresses a lot more clever and robust.
-
- * backend/ebook/e-book-util.c (name_and_email_cb): Use
- e_card_compare_name_to_string instead of e_card_name_match_string.
- (e_book_name_and_email_query): The arguments to g_strsplit were
- in the wrong order. Doh!
-
- * backend/ebook/e-card-compare.c (e_card_compare_name_to_string):
- Added. Replaces e_card_name_match_string, and actually works.
-
- * backend/ebook/e-card.c: Removed e_card_name_match_string
- function, which didn't work particularly well.
-
-2001-09-19 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (cursor_cb): don't add to the complete
- list of cards if the card is a list
- (card_added): don't add to the list of changes if the card is a
- list
- (card_changed): ditto
- (card_removed): ditto
-
-2001-09-19 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_hookup_shell_listeners): Change the "this should
- never happen" message into a request for people to e-mail me
- directly with info if they encounter that error.
-
- * backend/ebook/e-book-util.c (e_book_name_and_email_query):
- Freeing name[i] instead of namev[i] is a bad idea. (bug #10270)
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): Properly handle our GnomeUIInfo labels so that
- they won't be leaked if they are dynamic strings, so that they
- will be i18n-correct, and so that underscores won't be interpreted
- as key accelerators. What a PITA. Also, don't leak our
- iterators. (Bug #10200.)
- (popup_menu_list): The same GnomeUIInfo tweaking as in
- popup_menu_card.
- (popup_menu_nocard): Ditto.
-
-2001-09-18 JP Rosevear <jpr@ximian.com>
-
- * backend/ebook/e-card-simple.c (field_data): add caluri field data
-
- * backend/ebook/e-card.c (e_card_get_vobject): add the caluri
- property when appropriate
- (parse_caluri): handle read caluri
- (e_card_class_init): add caluri arg
- (e_card_destroy): free the caluri
- (e_card_get_arg): return caluri arg
- (e_card_set_arg): set caluri from arg
- (e_card_init): init caluri to null
-
- * backend/ebook/e-card-simple.h: new simple field
-
- * backend/ebook/e-card.h: new member
-
- * gui/contact-editor/e-contact-editor.c (field_changed): util
- callback to change the command state
- (set_entry_changed_signal_field): hook up a change signal to above
- (set_entry_changed_signals): use above function
-
- * gui/contact-editor/e-contact-editor.glade: Add collaboration
- page and fields
-
-2001-09-18 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_build_cards_list): create a sexp and check if
- the cards match before adding them to the list
- (pas_backend_file_process_get_cursor): send extra param
-
-2001-09-18 Larry Ewing <lewing@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (book_query_process_card_list): unref the destination regardless
- of whether we get an email addresss.
-
-2001-09-17 Larry Ewing <lewing@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (name_style_query): use g_strfreev.
- (match_name): s/g_free/g_strfreev.
- (match_file_as): s/g_free/g_strfreev.
-
- * backend/ebook/e-book-util.c (e_book_name_and_email_query): fix
- the memory handling here. All there members of the vector need to
- be freed all the time.
-
- * backend/ebook/load-pine-addressbook.c (parse_line): free the
- string outside of the test that makes sure there are three
- entries.
-
- * gui/component/select-names/e-select-names-completion.c
- (match_nickname): don't malloc a match we will never use.
-
- * gui/widgets/e-addressbook-model.c (get_view): free the dup'd
- capabilities.
-
-2001-09-17 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_is_valid): We want
- to assume that a destination that comes from a card is
- automatically valid, but the right way to check that is by calling
- e_destination_from_card, not by checking if dest->priv->card !=
- NULL. (Fixed bug #10017)
-
- * gui/component/select-names/e-select-names-completion.c
- (match_name): Fixed a stupid bug was causing completion to fail
- for contacts who have only one name. (The classic example we all
- know and love is 'George <jirka@5z.com>') (bug #8353)
-
- * backend/ebook/e-card.c (e_card_list_send): Do the right thing if
- the card we are trying to send to has no valid e-mail addresses.
- (bug #10137)
-
- * gui/widgets/e-minicard.c (e_minicard_event): Code implicitly
- assumed that event->button.button is 1, 2, or 3, causing disaster
- when using a wheel-mouse. Fixed. (bug #9400)
-
-2001-09-16 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (_phone_arrow_pressed):
- use enable_widget instead of gtk_widget_set_sensitive.
- (_email_arrow_pressed): same.
- (_address_arrow_pressed): same.
- (disable_widget_foreach): same.
- (enable_writable_fields): same.
- (set_editable): same.
- (enable_widget): new function, using both gtk_widget_set_sensitive
- and *_set_editable to allow the user to select text in GtkEntry's
- and GtkText's.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_set_arg): use set_editable as well as
- set_sensitive, to allow the user to select text in GtkEntry's.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_set_arg): same.
-
-2001-09-16 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/evolutionperson.schema: fix syntax errors (which are
- broken, imo...)
-
-2001-09-16 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-storage.h: reorder the LDAP scopes so
- that they match the order of the option menus in the glade file.
-
- * gui/component/addressbook-config.c (auth_checkbutton_changed):
- new function, mostly there to house some #ifdef'ed out code.
- (option_menuitem_activated): new function, to keep track of
- changes to the ldap scope optionmenu.
- (addressbook_source_dialog_set_source): set the menu history as
- well as the dialog's copy of the scope.
- (addressbook_source_dialog_get_source): fill in the source's scope
- from the dialog's copy, and add more #if the_ui_gods_smile_on_me
- code.
- (add_activate_cb): new function, add an activate callback for the
- optionmenu's items.
- (addressbook_source_dialog): more #if the_ui_gods_smile_on_me
- code, always start the dialog on page 0, and hook up the
- scope optionmenu's items.
-
-2001-09-15 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-card-compare.c (e_card_compare_name): No
- loose name matches on family names. (#8802)
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): We can't use NULL as the
- first arg for e_addressbook_show_contact_editor anymore. Damn.
- (#8535)
-
- * backend/ebook/e-book-listener.c (e_book_listener_stop): Make
- "stop" do nothing but set the stopped flag, as in
- e-book-view-listener.c.
- (e_book_listener_destroy): Clean up our queue here, rather than in
- e_book_listener_stop.
- (response_free): Added. Move the rather lengthy bit of code
- needed to free a EBookListenerResponse into one place.
- (e_book_listener_check_queue): Properly deal with the stopped
- flag.
- (e_book_listener_queue_response): If the stopped flag is set, just
- drop the incoming response.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_stop): Make "stop" do nothing but set the
- stopped flag.
- (e_book_view_listener_destroy): Move all of the clean-up that used
- to be in e_book_view_listener_stop here. This considerably simplifies
- the logic required to avoid various race conditions.
- (e_book_view_listener_check_queue): Properly deal with the stopped flag.
- (e_book_view_listener_queue_response): Drop all incoming responses if
- we are stopped.
-
-2001-09-14 Jon Trowbridge <trow@ximian.com>
-
- * backend/pas/pas-book.c (pas_book_queue_request): Hold a
- reference to the book on behalf of our idle function.
- (pas_book_check_queue): When we are finished, drop the reference
- we've been holding on behalf of the idle function.
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_create_card): Hold a reference to the
- book_view while sending our notifications.
- (pas_backend_file_process_remove_card): Hold a reference to the
- book_view while sending our notifications.
-
- * gui/contact-editor/e-contact-quick-add.c (quick_add_unref): Remove
- debugging spew.
-
- * backend/ebook/e-book-util.c: Remove a lot of unused code that
- worked around bugs that have long since been fixed.
- (simple_query_disconnect): Added. Breaks out the part of
- simple_query_free that disconnect signals.
- (simple_query_free): Replace code w/ a call to
- simple_query_disconnect.
- (simple_query_sequence_complete_cb): Call simple_query_disconnect
- before executing the callback, so that our callbacks don't get
- triggered by any book changes that might occur during that
- callback.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): Changed to be consistent with
- e_book_listener_check_queue.
- (e_book_view_listener_queue_response): Also changed to use a
- high-frequency timeout.
-
- * backend/ebook/e-book-listener.c (e_book_listener_check_queue):
- OK, I've agonized over this stupid little function, and it should
- now be race-free.
- (e_book_listener_queue_response): We process our response queue in
- a high-frequency timeout rather than an idle. Using an idle
- function leads to some tricky race conditions and bad interactions
- with bonobo's semi-broken attempts to take over event processing.
- (e_book_view_listener_stop): Manually disable our timeout and
- clean up.
-
-2001-09-14 Ettore Perazzoli <ettore@ximian.com>
-
- [Automake 1.5 fixes pointed out by Richard Boulton
- <richard@tartarus.org>, as per #9258.]
-
- * gui/component/select-names/Makefile.am: Set CLEANFILES directly
- instead of using `+='.
-
- * backend/pas/Makefile.am: Rename `LDAP_BACKEND_SOURCES' to
- `LDAP_BACKEND_FILES'.
-
- * backend/ebook/Makefile.am: Set CLEANFILES directly instead of
- using `+='.
-
-2001-09-13 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): use
- ldap_init. ldap_open is deprecated in openldap 2.x.
-
-2001-09-12 Iain Holmes <iain@ximian.com>
-
- * backends/ebook/evolution-vcard-importer.c (check_file_is_vcard):
- Fix the check.
-
-2001-09-12 Larry Ewing <lewing@ximian.com>
-
- * backend/ebook/e-destination.c: free the values that are being
- leaked here.
-
-2001-09-12 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c (match_email):
- printf arguments were reversed by mistake. Fixed bug #9693.
-
-2001-09-09 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_list): Added. Treat right-clicks on a contact list as
- a special case.
- (e_select_names_popup): Check if we are dealing with a contact
- list.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): See
- e_book_listener_check_queue below.
- (e_book_view_listener_queue_response): See
- e_book_listener_queue_response below.
-
- * backend/ebook/e-book-listener.c (e_book_listener_check_queue):
- Explicitly prohibit reentrancy. Use gtk-unref rather than
- bobobo-unref.
- (e_book_listener_queue_response): Hold a gtk-ref to the listener
- while the idle function runs, not a bonobo-ref. As far as I can
- tell, it is impossible to avoid a race condition here when we have
- to worry about bonobo reentrancy.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): Alter a copy of the
- original EDestination, rather than just using a new one. We need
- to do this to preserve prior-card information for possible
- reversion later.
- (e_select_names_text_model_delete): Ditto.
-
- * backend/ebook/e-destination.c (e_destination_clear_card): When
- clearing a destination where ->card != NULL, store it for possible
- reversion later.
- (e_destination_revert): If we have an old card stored, go back to
- using it for the destination.
- (e_destination_is_valid): Tries to detect obviously broken
- addresses.
- (e_destination_cardify): If our destination is invalid, first try
- to cardify simply by reverting to an older card.
- (e_destination_destroy): Unref any cached old card.
- (e_destination_copy): Copy the old card information.
-
-2001-09-07 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (sync_table_and_models): Show all rows in the table, and then
- remove the rows that correspond to entries in the
- ESelectNamesModels in the children.
- (real_add_address): Freeze/thaw our ESelectNamesModel, so that we
- don't change our table while we are in the middle of iterating
- over the selection.
- (remove_address): Just delete the address from the
- ESelectNamesModel, the signal handler will do the rest.
- (selected_rows_foreach_cb): Call remove_address to do our dirty
- work.
- (e_select_names_add_section): Connect to the 'changed' signal from
- the ESelectNamesModel, and call sync_table_and_models explicitly to
- get our initial state correct.
-
- * gui/component/select-names/e-select-names-table-model.c
- (fill_in_info): Deal with EDestinations in our table that don't
- come from cards.
-
- * gui/component/select-names/e-select-names-manager.c: Added
- another ESelectNamesModel* to the ESelectNamesManagerSection
- struct. Called 'original_model', this contains a copy of the
- model as it is when we begin using the SelectNames dialog.
- (section_copy): Copy the original model.
- (section_free): Free the original model.
- (e_select_names_manager_add_section_with_limit): Initialize the
- original model.
- (e_select_names_clicked): I've changed the semantics of this
- dialog quite a bit... no UI freeze can stop me! If OK is clicked,
- we do nothing. If Cancel is clicked, we revert to the
- 'original_model' copy of our address entry state before we started
- editting. Finally, we close the dialog before any of thing. Doing
- it last caused problems, because signals were being triggered
- which had dangling pointers as their closures.
- (e_select_names_manager_activate_dialog): Copy our current state
- to the original model, and share the same ESelectNamesModel
- between the dialog and the address entry in the composer..
- (e_select_names_manager_get_cards): Removed. It had been
- #if 0/#endif-ed out for a while.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_freeze): Added.
- (e_select_names_model_thaw): Added.
- (e_select_names_model_uncardify): Added. If possible,
- "uncardifies" a specific model entry.
- (e_select_names_model_changed): Changed to pay attention
- to the freeze count.
-
- * gui/component/select-names/e-select-names-completion.c
- (clean_query_text): Strip leading/trailing whitespace from
- queries.
-
- * backend/ebook/e-destination.c (e_destination_uncardify): Added.
- Converts a card-associated destination into a text-associated
- destination w/ the e-mail address.
- (e_destination_list_to_vector): Added. A convenience routine.
- (e_destination_freev): Added. A convenience routine.
- (e_destination_touchv): Added. I'm lazy.
-
-2001-09-08 Chris Toshok <toshok@ximian.com>
-
- (make_contact_editor_cb): show the right contact editor (the list
- editor for list cards).
-
-2001-09-08 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): do the EDestination xml magic on email
- addresses we put in the popup.
-
-2001-08-27 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- For every category:
- - set .translate to FALSE (e_categories_master_list_nth returns
- translated category name)
- - convert category name in UTF-8 to locale's encoding
-
-2001-08-23 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): Fixed two bugs:
- - missing coversion of contact name to GTK+ locale,
- - passing dynamically created string (contact name) inside uiinfo struct
- to gnome-app-helper functions.
- Remember: these functions may change strings, trying to translate them!
- (popup_menu_nocard): Ditto
-
-2001-09-07 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-component.c: Removed unused factory
- variable.
-
-2001-09-06 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-storage.c (notify_listener): new
- function, notify the bonobo listener.
- (remove_ldap_folder): track change to EvolutionStorage signal.
- (create_ldap_folder): same, and make sure the type is
- "ldap-contacts".
- (load_source_data): folders that we create should have
- "ldap-contacts" as their type.
- (addressbook_storage_add_source): same.
-
- * gui/component/addressbook-component.c: (folder_types): add
- "ldap-contacts", for display of ldap servers (they get their own
- icon, and their own name in the Create New Folder dialog.
- (create_view): use IS_CONTACT_TYPE since we support two folder
- types now.
- (create_folder): same.
- (remove_folder): same.
- (xfer_folder): same.
-
-2001-09-06 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c: (pixmaps): change
- /Toolbar/ContactEditorSave to /Toolbar/ContactEditorSaveClose.
-
-2001-09-06 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (INCLUDES): add -DEVOLUTION_IMAGESDIR.
-
- * gui/widgets/e-addressbook-view.c (card_deleted_cb): remove
- status messages from here.
- (e_addressbook_view_delete_selection): same.
-
- * gui/widgets/e-addressbook-model.c (sequence_complete): emit a
- NULL status message along with the stop_state_changed. The null
- status message will clear the status bar for this view.
-
- * gui/component/addressbook.c (set_status_message): use the
- EvolutionActivityClient stuff.
-
- * backend/pas/pas-backend-ldap.c (view_destroy): remove status
- message for abandoning a search.
- (ldap_op_process_current): wrap status messages in _().
- (ldap_op_process): same.
- (create_card_handler): same, and remove the notify_status for ""
- and add a notify_complete call after the card is added.
- (remove_card_handler): same.
- (modify_card_handler): same.
- (poll_ldap): wrap status messages with _(), and remove the "Search
- Complete" message.
- (ldap_search_handler): wrap status message.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search): use
- _() on status messages, and make sure the last notify_* called is
- notify_complete.
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #958, ShellComponents should not be created by factories, for
- the addressbook.]
-
- * gui/component/addressbook-component.c
- (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_FACTORY_ID): Removed.
- (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID): New.
- (create_component): Renamed from `factory_fn'. Just register the
- thing on OAF.
- (addressbook_component_factory_init): Just call it.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Remove the
- ShellComponentFactory.
-
-2001-09-04 Iain Holmes <iain@ximian.com>
-
- * backend/ebook/evolution-vcard-importer.c (load_file_fn): Return FALSE
- if the file isn't a valid VCard file.
-
-2001-08-05 Zbigniew Chyla <cyba@gnome.pl>
-
- I18n fixes (mainly making buttons on the right side less Anglocentric :-)
-
- * backend/ebook/e-card-simple.c
- (field_data): Marked "name" and "short_name" fields for translation.
- (e_card_simple_get_name, e_card_simple_get_short_name): Return
- localized version of the name (using U_() macro).
-
- * gui/contact-editor/e-contact-editor.c (set_entry_changed_signals):
- Connect "changed" signal from "entry-web" entry to widget_changed.
- (changing this field wasn't making "Save and Close" button sensitive)
-
- * gui/widgets/Makefile.am (glade_DATA): Removed alphabet.glade.
-
- * gui/widgets/e-addressbook-view.c
- (button_labels, button_letters): New strings containing a list of
- labels and "values" of all buttons placed on the right side of the
- addressbook view (intended for localization).
- (struct LetterClosure): Changed the type of letter field to gunichar.
- (e_utf8_split): New function, similar to g_strsplit, but operates on
- UTF-8 strings.
- (jump_to_letter): Don't hardcode letters, build queries dynamically
- using UTF-8 and localized letters stored in button_letters.
- (connect_button): Removed.
- (create_alphabet): Don't use glade file, build buttons manually using
- (localized) labels from button_labels. Use (localized) values from
- button_letters when creating LetterClosure.
-
- * gui/widgets/e-minicard-view-widget.[ch]
- (e_minicard_view_widget_jump_to_letter): Changed the type of the
- second argument from char to gunichar.
-
- * gui/widgets/e-minicard-view.c
- (compare_to_utf_str): Renamed from compare_to_letter, now operates on
- UTF-8 string.
- (e_minicard_view_jump_to_letter): Changed the type of the second
- argument from char to gunichar + conversion to UTF-8 string.
-
- * gui/widgets/e-minicard-view.h
- (e_minicard_view_jump_to_letter): Changed the type of the second
- argument from char to gunichar.
-
-2001-09-02 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book.c (e_book_add_card, e_book_commit_card),
- backend/pas/pas-backend-file.c (do_create),
- backend/pas/pas-backend-ldap.c
- (create_card_handler, remove_card_handler, modify_card_handler,
- pas_backend_ldap_process_get_vcard, poll_ldap): Use
- e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here
- since all internal communications and database storage are assumed
- to be utf8.
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h
- (e_card_simple_duplicate): Simplified this function considerably.
- (e_card_simple_get_vcard_assume_utf8): Added this function.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h (e_card_new,
- e_card_load_cards_from_file, e_card_load_cards_from_string): Made
- these functions pay attention to charset attributes.
- (e_card_new_with_default_charset,
- e_card_load_cards_from_file_with_default_charset,
- e_card_load_cards_from_string_with_default_charset): New functions
- that let you change the default charset from UTF-8.
- (e_card_get_vcard): Made this write out charset attributes when
- necessary.
- (e_card_get_vcard_assume_utf8): New function that writes out a
- card without writing out charset attributes.
-
- * backend/ebook/evolution-vcard-importer.c (book_open_cb),
- backend/ebook/load-gnomecard-addressbook.c (book_open_cb),
- backend/ebook/test-card.c (main),
- gui/component/addressbook-component.c
- (destination_folder_handle_drop), gui/contact-editor/test-editor.c
- (main), gui/contact-list-editor/e-contact-list-editor.c
- (table_drag_data_received_cb), gui/widgets/e-addressbook-view.c
- (selection_received), gui/widgets/e-minicard-control.c
- (pstream_load): Changed the default charset to be used here to
- ISO-8859-1.
-
- * backend/ebook/load-gnomecard-addressbook.c (add_card_cb),
- backend/ebook/load-pine-addressbook.c (add_card_cb),
- backend/ebook/test-client-list.c (get_cursor_cb),
- backend/ebook/test-client.c (get_cursor_cb, get_card_cb): Use
- e_card_get_vcard_assume_utf8 to print out testing strings.
-
- * gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-model.h
- (e_select_names_model_contains): Changed this to be const
- EDestination *dest to fix a warning.
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
- Translate window title here.
-
-2001-08-31 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/component/addressbook-storage.c
- (addressbook_get_other_contact_storage): s/_/U_/
-
- * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_compare):
- Use g_utf8_collate.
-
- * gui/widgets/e-minicard.c (e_minicard_compare):
- Ditto.
-
- * printing/e-contact-print.c (card_compare):
- Ditto.
-
-2001-08-29 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_clicked): Use e_select_names_model_merge to
- combine the selected names with any existing ones. This causes
- you to not lose addresses typed directly into the entry while the
- SelectNames dialog is up. (Bug #8058)
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_merge): Merge the contents of one
- ESelectNamesModel into another, avoiding duplicates.
-
- * backend/ebook/e-destination.c (e_destination_equal): Added.
- Determines if two destinations appear to refer to the same
- recipient.
-
- * backend/ebook/e-card.c (e_card_list_send): Added cast to
- g_free args to silence compiler warnings.
-
- * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name):
- Paranoia. Check that name != qa->name.
- (quick_add_set_email): Check that email != qa->email.
- (ce_have_book): Store the QuickAdd data structure in object data,
- so that we can be extra-careful and avoid having a dangling
- pointer floating around out somewhere as the closure for a signal.
- Fixes bug #8155, I think.
- (card_added_cb): Clear object data to ensure single unref.
- (editor_closed_cb): Clear object data to ensure single unref.
-
- * gui/component/select-names/e-select-names-completion.c
- (book_query_score): Make sure that comp->priv->query_text isn't
- NULL. (Fixes bug #8195)
-
- * backend/ebook/e-book-listener.c (e_book_listener_check_queue):
- This function can be re-entrant during the signal emission; Added
- extra ref/unrefs and checks to avoid problems if this happens.
- This is similar to my recent changes to
- e_book_view_listener_check_queue. (Fixes bug #7400)
-
-2001-08-27 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c: Get rid of a warning by
- initializing the closing NULL element in folder_types correctly.
-
- * gui/component/select-names/e-select-names.c: Updated to match
- the studlyCapsification of attributes in shell/Evolution*.idl.
-
-2001-08-27 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (sexp_file_as): Added. Generated queries against file_as.
- (match_file_as): Added. Match results of queries against
- file_as. (Bug #8152)
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): Added ref/unref pair to make
- sure that our listener doesn't get finalized during the signal
- emission and leave us with a dangling pointer. (Bug #7661)
-
- * backend/ebook/e-card.c (e_card_list_send): Removed some debugging
- spew that I left in by mistake.
-
- * gui/widgets/e-addressbook-model.c (create_card): Removed debugging
- spew.
-
- * backend/ebook/e-card.c (e_card_list_send): Do the right thing if
- the card we are trying to send to is a contact list. (Bug #6580)
-
-2001-08-27 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- Display localized status string (added missing _()).
-
-2001-08-24 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_set_card): Put a
- freeze/thaw around our the set of operations that changes the
- internal state of our card, so 'changed' signal callbacks won't be
- invoked on a card in an intermediary state. This fixes the bug
- that was causing the e-mail addresses in cards to be blank when
- replying to a message. (An unexpected side-effect of toshok's
- change on 8/22 to make sure that priv->email != NULL).
- (e_destination_get_name): Code slightly rearranged for (IMO)
- clarity.
-
-2001-08-23 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_event): add
- BUTTON_PRESS_MASK so double clicks still work.
-
-2001-08-23 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (addressbook_query_changed): switch
- "full_name" to "x-evolution-any-field" in all the queries where we
- want to match all cards, since the backends universally handle
- this special case more efficiently.
-
-2001-08-22 Jon Trowbridge <trow@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c (extract_info):
- In the GUI, the toggle is labelled "hide addresses", not "show
- addresses" -- so we have to reverse the boolean value we read in.
- (fill_in_info): Same bug as before: since the GUI reads "hide", we
- have to initialize the toggle to '!show_addresses', not
- 'show_addresses'.
-
- * backend/ebook/e-destination.c
- (e_destination_list_show_addresses): Added.
- (e_destination_xml_encode): Encode the value of
- e_destination_list_show_addresses into the XML.
- (e_destination_xml_decode): Read and store the "show_addresses"
- flag.
-
-2001-08-22 jacob berkman <jacob@ximian.com>
-
- * gui/component/e-address-popup.c (emit_event): emit an event from
- our event source
- (contact_editor_cb): emit a destroy event so our control frame can
- be destroyed.
- (edit_contact_info_cb): emit a hide event so our control frame can
- be hidden
- (e_address_popup_cardify):
- (add_contacts_cb): emit the destroy event
- (e_address_popup_factory_new_control): don't unref our object at
- widget destroy time as that was really really broken
- (e_address_popup_factory_new_control): create an event source and
- aggregate ourself with it
-
- * gui/contact-editor/e-contact-editor.c (enable_writable_fields):
- display a nicer warning when we can't find a widget for a given
- field
- (e_contact_editor_raise): only raise if there is a window
-
- * gui/contact-editor/contact-editor.glade: name some widgets that
- got unnamed, and set the first entry as defaultable
-
- * gui/contact-editor/e-contact-editor.c: envelope printing is
- disabled in 1.0
-
-2001-08-22 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_get_email): make
- sure we don't get into a situation where priv->email == NULL.
-
-2001-08-21 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_event): if we're dragging,
- drag_button_down won't be true in the BUTTON_RELEASE case, since
- we set it to false in MOTION_NOTIFY once the threshold is reached.
- (e_minicard_drag_end): remove this function, since it was needed
- to work around a bug in gnome-canvas.
-
-2001-08-20 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_addressbook_create_ebook_table): Wrap our addressbook table
- adapter in an ETableWithout, so that we can make addresses appear
- and disappear when we remove/add them to the section lists
- (To/Cc/Bcc) on the right of the dialog.
- (real_add_address_cb): When we add an address, hide it in the main
- list.
- (e_select_names_init): Get pointer to our without table from the
- table's object data, and store it.
- (remove_address): When we remove an address, show it in the main
- list.
- (card_key): Added. Allocate a unique key from an ECard.
- (esn_get_key_fn): Added. Callback for ETableWithout.
- (esn_dup_key_fn): Added. Callback for ETableWithout.
- (esn_free_gotten_key_fn): Added. Callback for ETableWithout.
- (esn_free_duped_key_fn): Added. Callback for ETableWithout.
-
- * backend/ebook/e-card-simple.c (e_card_simple_get): Changed
- E_CARD_SIMPLE_FIELD_NAME_OR_ORG to first try the FILE_AS
- type. This allows the cards in the ESelectName dialog to
- appear in proper sort order (i.e. as 'Doe, John' rather than
- 'John Doe'). Fixes ximian #6002.
-
-2001-08-20 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (e_addressbook_reflow_adapter_class_init): fix arg info - we're
- only passing 1 GTK_TYPE_POINTER arg, not 2.
-
- * gui/widgets/e-minicard.c (e_minicard_event): lots of fixes for
- DnD. For GDK_BUTTON_PRESS, we grab immediately. For
- GDK_BUTTON_MOTION, we start the drag after a certain threshold,
- and connect to the "drag_end" signal on our canvas so we'll know
- when the drag is complete. For GDK_BUTTON_RELEASE, we release the
- grab if we were dragging and get the event.
- (e_minicard_drag_end): new function, just remove the pointer/gtk
- grabs and disconnect.
-
- * gui/widgets/e-minicard.h (struct _EMinicard): add "gint
- drag_button"
-
-2001-08-20 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_changes_foreach_key): use DB_NOTFOUND const
-
-2001-08-20 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_changes): null out card_sexp so that
- we don't crash when copying
-
-2001-08-20 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c: fix warnings, get compiling again
-
- * conduit/address-conduit-config.h: remove c/p typos
-
- * conduit/address-conduit.h: ditto
-
- * conduit/Makefile.am: link against the static camel
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c: use bigger Save icon for
- toolbar. Used Delete icon in menu.
-
- * gui/component/addressbook.c: use 'Save As' icon rather than 'Save'
- as it seems more appropriate. Also added delete icon for menu.
-
-2001-08-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c: Update the folder list to
- include a display name and a description.
-
-2001-08-19 Damon Chaplin <damon@ximian.com>
-
- * gui/component/addressbook.c: use new Cut/Copy/Paste/Save/Search
- icons.
-
-2001-08-19 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (set_folder_bar_label),
- gui/widgets/e-addressbook-model.c,
- gui/widgets/e-addressbook-model.h (update_folder_bar_message),
- gui/widgets/e-addressbook-view.c, gui/widgets/e-addressbook-view.h
- (folder_bar_message): Set the folder bar message here. Fixes
- Ximian bug #4670.
-
- * gui/component/select-names/e-select-names-model.c (SEPLEN): Use
- strlen(SEPARATOR) here so that if the separator changes the length
- will work properly.
-
-2001-08-19 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/fulladdr.glade: Added full country list.
- Fixes Ximian bug #5123.
-
-2001-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c: Hook up `delete-message.png' as the
- icon for "ContactDelete".
- * gui/contact-editor/e-contact-editor.c: Likewise.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-storage.h: add prototype for
- addressbook_get_other_contact_storage.
-
- * gui/component/addressbook-storage.c
- (addressbook_get_other_contact_storage): rename register_storage
- to this, and return the EvolutionStorage.
- (load_source_data): register_storage =>
- addressbook_get_other_contact_storage.
- (addressbook_storage_add_source): register_storage =>
- addressbook_get_other_contact_storage.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c
- (set_entry_changed_signals): connect to the "changed" signal on
- "entry-web" to update command state.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c (list_added_cb):
- call e_card_set_id on the list's card so we can continue to use
- this dialog. also, call command_state_changed if we aren't
- closing the dialog so the toolbar is properly sensitized.
- (list_deleted_cb): always close the dialog after we successfully
- delete a list.
-
- * gui/contact-editor/e-contact-editor.c (card_added_cb): call
- e_card_set_id on the card so we can continue to use this dialog
- (to modify or delete the card.)
- (card_deleted_cb): always close the dialog after we successfully
- delete a card.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (addressbook_query_changed): call
- e_sexp_encode_string on the search string the user types in so it
- doesn't break sexp parsing in the wombat.
-
-2001-08-17 Damon Chaplin <damon@ximian.com>
-
- * gui/component/addressbook.c: changed to new print icon.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c: (struct
- ESelectNamesFolder): rename physical_uri to uri, since it includes
- the addressbook.db for file: uris.
- (e_select_names_folder_free): physical_uri => uri.
- (e_select_names_option_activated): physical_uri => uri, and we
- don't need to strdup_printf "addressbook.db" onto the end anymore.
- (new_folder): if the physical_uri is a file: uri, append
- /addressbook.db onto it.
- (hookup_listener): new function, split out lots of code from
- e_select_names_hookup_shell_listener.
- (e_select_names_hookup_shell_listeners): rename
- e_select_names_hookup_shell_listener to this, and hookup both the
- local and "Other Contacts" listener, using hookup_listener.
- (e_select_names_destroy): disconnect from the
- other_contacts_listener and unref it.
-
- * gui/component/select-names/e-select-names.h (struct
- _ESelectNames): add a listener for Other Contacts, and rename
- "listener" to "local_listener."
-
-2001-08-17 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_seq_complete_cb): If we get the
- "sequence_complete" signal when we aren't searching, it means the
- addressbook changed out from under us. Clear the search cache, so
- that future completion requests won't use the out-of-date cached
- data. Also, don't unref book_view... we leave the EBookView open
- so that we can catch these addressbook changes.
- (e_select_names_completion_do_query): Don't use the book_view
- being non-NULL as a sign that another query is still running.
- (e_select_names_completion_got_book_view_cb): Properly unref any
- previous value in book_view.
-
-2001-08-17 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (e_addressbook_reflow_adapter_right_click),
- gui/widgets/e-addressbook-view.c (table_right_click): Changed the
- messages here in the right click menus.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (view_destroy): unref our
- card_sexp.
- (create_card_handler): make sure to set the id of the vcard so it
- gets properly transmitted back to the BookView, and notify all
- matching BookViews to add the created card.
- (remove_card_handler): notify all matching BookViews to remove the
- card.
- (modify_card_handler): notify all matching BookViews to modify the
- card.
- (pas_backend_ldap_process_get_book_view): init card_sexp based on
- the view's search.
-
-2001-08-17 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_book_view_copy): use card_sexp.
- (pas_backend_file_book_view_free): same.
- (vcard_matches_search): use the new pas_backend_card_sexp_match_vcard call.
- (pas_backend_file_search): use card_sexp.
- (pas_backend_file_process_get_book_view): same.
-
- * backend/pas/Makefile.am (libpas_a_SOURCES): add
- pas-backend-card-sexp.[ch].
-
-2001-08-17 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-component.c (factory_fn): Added code
- so the user can create a new contact or contact list from anywhere
- in evolution.
-
-2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/pas/evolutionperson.schema: Added a closing paren.
-
-2001-08-16 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_handle_request): Renamed from _begin to
- match changes in gal 0.10.99.3.
-
- * gui/contact-editor/e-contact-quick-add.c (e_contact_quick_add):
- Check that name != NULL before we start messing with it.
- (Fixes bug #7329)
-
-2001-08-16 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (match_nickname): Boost scoring on an exact nickname match.
- Manually addressify match.
- (match_name): Manually addressify matches.
- (book_query_score): Remove automatic addressification.
-
- * gui/component/addressbook.c (addressbook_query_changed): Minor
- tweak to avoid a crash if we have a negative subid with id
- ESB_CATEGORY. This should never happen.
- (addressbook_menu_activated): Reset the entry/option when we
- select "Clear".
- Some changes to reflect renaming in ESearchBar.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_set_property_fn): Cardify after importing destinations.
- This might fix a problem that Damon is having.
-
-2001-08-15 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.glade: set title of initial
- dialog to Addressbook Sources (bug #6704).
-
-2001-08-15 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-storage.c (create_ldap_folder): don't
- let people add subdirs in the ldap server storage - everything is
- toplevel there.
-
-2001-08-14 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_get_vcard): implement using
- search_for_dn.
-
-2001-08-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- Tell the search bar to translate the subitem texts.
-
-2001-08-14 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- Add "Any Category" option for category searches.
- (addressbook_query_changed): Do the right thing on an
- "Any Category" search.
-
-2001-08-14 Dan Winship <danw@ximian.com>
-
- * backend/pas/pas-backend-ldap.c: Fix up to match the
- pas_book_new/get_vcard changes.
-
-2001-08-14 Christopher James Lahey <clahey@ximian.com>
-
- * gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
- Got rid of an extraneous _ here.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- Changed Canceled to Cancelled here. Fixes Ximian bug #2465.
-
-2001-08-14 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-book.c (pas_book_respond_get_vcard): Oops,
- forgot to write this function.
-
-2001-08-14 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: Added focus targets
- here. Fixes part of Ximian bug #5843.
-
-2001-08-14 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
- Grab focus here. Fixes Ximian bug #2265.
-
-2001-08-14 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- (addressbook_query_changed): Fixed two const warnings here.
-
- * printing/e-contact-print-envelope.c,
- printing/e-contact-print-envelope.h: Fixed some missing includes
- here.
-
-2001-08-14 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-view.c (add_book_iterator): Call
- e_card_set_book here.
-
- * backend/ebook/e-book.c (e_book_do_response_get_vcard): Call
- e_card_set_book here.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Pulled out the
- part where the uri is made part of the uid. Made uri a separate
- field. Fixes Ximian bug #6490.
-
- * backend/ebook/e-destination.c, backend/ebook/e-destination.h:
- Change this to use ECard's split uids and uris.
-
-2001-08-13 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (add_to_supported_fields): don't
- g_strdup the stuff we're passing into e_list_append, since it does
- the copy for us.
- (check_schema_support): don't initialize supported_fields list
- here, since there's a gross case where the programmer/user can
- bring up the contact editor before the connection stuff is
- finished, and we don't want to crash.
- (pas_backend_ldap_init): move it here to we can guarantee it's
- there. (bug #6546).
-
-2001-08-13 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): don't access source->auth
- if source == NULL (bug #7086).
-
-2001-08-13 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-listener.c,
- backend/ebook/e-book-listener.h, backend/ebook/e-book.c,
- backend/ebook/e-book.h, backend/idl/addressbook.idl,
- backend/pas/pas-backend-file.c, backend/pas/pas-book.c,
- backend/pas/pas-book.h: Changed get_card to be asyncronous.
-
- * backend/ebook/e-card.c, backend/ebook/test-client.c: Changed
- these to deal with the new get_card functionality.
-
-2001-08-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/component/select-names/e-select-names.c: Mark a string for translation.
- * This fixes bug #7052
- * printing/e-contact-print.h: Add headers to make it stand on itw own.
- * printing/e-contact-print.c: Marked some strings for translation.
- * printing/e-contact-print-envelope.c: Same here.
-
-2001-08-10 Jon Trowbridge <trow@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c (e_contact_quick_add):
- Remove single- or double-quotes from names before sticking them
- into the addressbook. (Bug #6499)
-
- * gui/component/addressbook.c (addressbook_query_changed):
- Properly handle "Category is" queries by checking the search bar
- suboption.
- (addressbook_factory_new_control): Attach subitems corresponding
- to all wombat categories to the "Category is" ESearchBarItem.
-
- * gui/component/addressbook.c: Set the ESearchBarItem
- subitems explicitly to NULL.
-
-2001-08-10 Anna Marie Dirks <anna@ximian.com>
- * gui/component/select-names/select-names.glade: did a little
- packing-magic to get the two tables at bottom of this dialog
- to seem to line up.
-
- *gui/component/select-names/e-select-names.c: changed the title
- of this dialog to "Select Contacts from Addressbook".
-
-2001-08-09 Anna Marie Dirks <anna@ximian.com>
- * gui/component/select-names/select-names.glade: redesigned
- this dialog to fix bug #6815.
-
- *gui/component/select-names/e-select-names.c: connected the
- widgets (or one of them anyway. clahey did the rest) for my
- new and lovely glade file.
-
-2001-08-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c: remove passwd_cb.
-
-2001-08-09 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c
- This change is dedicated to Jacob Berkman.
- (e_select_names_text_model_insert_length): If the last character
- we inserted was a "magic comma", remember its position.
- (e_select_names_text_model_delete): If the last character we
- inserted was a "magic comma", and if the next thing we do is to
- hit backspace, delete both the comma and the extra whitespace we
- added.
- (e_select_names_text_model_init): Initialize our last magic comma
- position.
-
-2001-08-09 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_create_entry): Hook up some magic to
- (basically) cardify an entry on focus-out. (What we do is actually
- more complicated than that.)
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_set_property_fn): After we set an entry's text, try to
- cardify it. We need to do this so that (for example) reply
- e-mails get properly cardified.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_duplicate): Use e_select_names_model_append,
- rather than manipulating lists directly.
- (e_select_names_model_insert): Connect "changed" signal proxy for
- added EDestination.
- (e_select_names_model_append): Ditto.
- (e_select_names_model_replace): Ditto, and disconnect signals for
- replaced EDestination.
- (e_select_names_model_delete): Ditto on the disconnection.
- (e_select_names_model_delete_all): Ditto.
- (e_select_names_model_cardify): Added. Try to cardify a specified
- EDestination.
- (e_select_names_model_cancel_cardify): Added. Cancel the pending
- cardification of a single EDestination.
- (e_select_names_model_cardify_all): Added. Cardify all of the
- EDestinations in the model.
- (e_select_names_model_cancel_cardify_all): Added. Cancel's any
- and all pending cardifications.
-
- * backend/ebook/e-destination.c (e_destination_class_init): Added
- "changed" and "cardified" signals.
- (e_destination_freeze): Added (static).
- (e_destination_thaw): Added (static).
- (e_destination_clear_card): Reset allow_cardify and
- cannot_cardify, cancel any pending cardifications, and emit the
- "changed" signal.
- (e_destination_clear_strings): Emit the "changed" signal.
- (e_destination_clear): Do freeze/thaw to prevent multiple signal
- emissions.
- (e_destination_set_card): Check that the card we are setting is
- not equal to the current card, and emit the "changed" signal if we
- are actually changing.
- (e_destination_set_card_uri): Emit "changed" signal, if necessary.
- (e_destination_set_name): Emit "changed" signal, if necessary.
- (e_destination_set_email): Emit "changed" signal, if necessary.
- (e_destination_set_html_mail_pref): Emit "changed" signal, if
- necessary.
- (use_card_cb): If we've just loaded/set the ECard, emit the
- "changed" signal.
- (e_destination_set_raw): Emit "changed" signal, if necessary.
- (e_destination_allow_cardification): Added.
- (e_destination_set_allow_cardification): Added.
- (e_destination_cardify): Added. Tries to automatically convert
- a string-based EDestination to one based on an ECard.
- (e_destination_cardify_delayed): Added. Cardifies in a timeout.
- (e_destination_cancel_cardify): Added. Cancels any pending
- cardifications.
- (e_destination_xml_decode): Added freeze/thaw.
-
- * backend/ebook/e-book-util.c (e_book_nickname_query): Added. A
- canned simple query for nicknames.
-
- * backend/ebook/e-card.c (e_card_email_find_number): Added. Given
- a card and an string containing an email address, return the index
- number of the address inside of the card, or -1 if the address is
- not found.
-
-2001-08-09 Chris Toshok <toshok@ximian.com>
-
- [ Fixes ximian bugs #5080, #6021, #6704, #6705 ]
-
- * gui/component/addressbook.c (book_open_cb): create our own
- dialog that prompts for both the email address and the password.
- the email address is stored in the source and filled in for the
- user after the first time they enter one and press OK.
-
- * gui/component/addressbook-storage.c (create_ldap_folder): has a
- return value, not a int* parameter.
- (create_ldap_folder): new function, we can create ldap servers
- from the File->New->Folder menu item now.
- (register_storage): hook up the "create_folder" signal.
- (addressbook_storage_init_source_uri): remove the file case, we
- only build ldap uris here.
- (load_source_data): remove the file source stuff, and handle
- "emailaddr".
- (save_source_data): call ldap_source_foreach directly.
- (addressbook_source_free): remove file source stuff.
- (addressbook_source_copy): same.
-
- * gui/component/addressbook-storage.h: get rid of all the file
- source stuff from AddressbookSource, since this is only being used
- for ldap servers.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_authenticate_user): look up the ldap
- entry based on the provided email address and use the resulting
- DN/passwd to authenticate.
-
- * gui/component/addressbook-config.c: pretty much gutted to make
- it work with the new UI.
-
- * gui/component/addressbook-config.glade: new version from anna.
-
-2001-08-09 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (SPEC): Upped the minimum width
- on all addressbook columns to 75. Fixes Ximian bug #2773.
-
-2001-08-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c (ce_have_book): mark
- the dialog as changed so the save button is immediately available.
-
- * gui/contact-editor/e-contact-editor.c (card_modified_cb): once
- we save reset the change flag to false if we aren't closing the
- dialog.
- (card_added_cb): same.
- (e_contact_editor_class_init): add a "changed" arg.
- (e_contact_editor_set_arg): add setter for "changed".
- (e_contact_editor_get_arg): add getter for "changed".
-
-2001-08-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c (ce_have_book): better
- to assume that we can write to the local addressbook than that we
- can't write to it :)
-
-2001-08-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c (create_ui):
- call e_pixmap_update so we can use the same save/save-as pixmaps
- as the contact editor.
-
-2001-08-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (open_card): new
- function, used by the context menu.
- (e_addressbook_reflow_adapter_right_click): put "Open" at the top
- of the menu. also, disable "Delete" if the addressbook isn't
- writable.
-
-2001-08-08 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (rfc2254_escape): escape *, \, (,
- and ), as per rfc2254.
- (func_contains): escape the string.
- (func_is): same.
- (func_beginswith): same.
- (func_endswith): same.
-
-2001-08-08 Nat Friedman <nat@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (print_envelope): If 0'd out
- since Envelope printing is disabled for 1.0.
- * gui/widgets/e-addressbook-view.c (print_envelope): Likewise.
- * gui/contact-editor/e-contact-editor.c (print_envelope_cb): Likewise.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (e_addressbook_reflow_adapter_right_click): Removed "Print
- Envelope" menu item.
- * gui/widgets/e-addressbook-view.c (table_right_click): Likewise.
- * gui/contact-editor/e-contact-editor.c (verbs): Likewise.
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-storage.c (remove_ldap_folder): ifdef
- this HAVE_LDAP.
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): set the title of the window to
- "Advanced Search".
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (search_cb): pass view->view instead
- of the EBook.
- (addressbook_search_menu_items): remove E_FILTERBAR_ADVANCED.
- (addressbook_menu_activated): remove E_FILTERBAR_ADVANCED.
- (addressbook_search_option_items): add "Advanced..." here.
- (addressbook_query_changed): add special handling for Advanced...
-
- * gui/search/e-addressbook-search-dialog.h (struct
- _EAddressbookSearchDialog): add EAddressbookView and remove the
- model/adapter fields. Also fix prototype of
- e_addressbook_search_dialog_new.
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_class_init): get rid of
- set_arg/get_arg.
- (button_press): set the query on the EAddressbookView, and always
- close the dialog.
- (e_addressbook_search_dialog_init): get rid of the minicard view,
- and pack the other widgets accordingly.
- (e_addressbook_search_dialog_new): pass EAddressbookView instead
- of EBook.
- (e_addressbook_search_dialog_destroy): remove model/adapter stuff.
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- [ Fixes bug #5066 ]
- * gui/component/addressbook-storage.c (remove_ldap_folder): new
- function, remove the source.
- (register_storage): connect to the "remove_folder" signal so we
- know when to remove the folder.
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (build_card_from_entry): use
- g_strcasecmp since ldap attribute names are not case sensitive.
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (table_drag_data_received_cb): make sure we update the changed
- state if a successful drop happens.
-
-2001-08-07 Jason Leach <jleach@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Make the OK button the keyboard default
- instead of Cancel. Bug #4942.
-
-2001-08-06 Radek Doulik <rodo@ximian.com>
-
- * backend/ebook/e-book.c (e_book_op_free): new EBookOp destructor
- (e_book_unqueue_op): use e_book_op_free
- (e_book_do_response_create_card): ditto
- (e_book_do_response_generic): ditto
- (e_book_do_response_get_cursor): ditto
- (e_book_do_response_get_view): ditto
- (e_book_do_response_get_changes): ditto
- (e_book_do_response_open): ditto
- (e_book_do_response_get_supported_fields): ditto
-
-2001-08-05 Radek Doulik <rodo@ximian.com>
-
- * backend/ebook/e-book.c (e_book_do_response_get_view): set
- op->listener to NULL to catch possible use of freed op
- (e_book_do_response_get_changes): ditto
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): this callback could be (and
- indeed is) called from signal emited above,
- signal handler could call e_book_view_listener_stop, so we need to check
- if idle is still set and if not we don't want to unref again
-
-2001-08-04 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c (e_card_compare_name): Made it so
- that if there's one less match than possible compares are
- considered more VAGUE. Fixes Ximian bug #3400.
-
-2001-08-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_hookup_shell_listener): Check for storage != NULL
- here. This shouldn't come up unless addressbook has crashed
- previously within this session of evolution, but this is just a
- bit of insurance. Fixes Ximian bug #3699.
-
-2001-08-03 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (e_card_name_match_string): Changed the
- criteria of whether the first part of each iteration matched or
- the second one did. Before it got it wrong sometimes and caused
- the pointer to jump off the end of the array. Fixes Ximian bug
- #4674.
-
-2001-08-03 Jason Leach <jleach@ximian.com>
-
- * gui/component/addressbook-storage.c (load_source_data): Update
- for EvolutionStorage API changes.
- (addressbook_storage_add_source): Ditto.
-
-2001-08-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (jump_to_letter): Made this
- change the query based on which letter is clicked. Fixes Ximian
- bug #2202.
-
-2001-08-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- Fixed warnings here.
-
- * gui/component/select-names/e-select-names-completion.c
- (hash_cleanup_fn): Removed this unused function.
-
-2001-08-03 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c (e_card_simple_sync_card,
- fill_in_info): Made the list of E_CARD_PHONE types in
- phone_correspondences more complete by adding the new 5
- E_CARD_PHONE types. Also, made it a bit less restrictive for some
- types (E_CARD_PHONE_HOME will actually match
- E_CARD_SIMPLE_PHONE_ID_HOME now.) Made e_card_simple_sync_card
- and fill_in_info search for an exact match in the list of
- phone_correspondences and then look for a partial match. Got rid
- of not going forward when doing a remove from an EList since EList
- handles this case automatically.
-
- * backend/ebook/e-card-types.h: Added E_CARD_PHONE types for
- assistant, callback, radio, telex, and ttytdd.
-
- * backend/ebook/e-card.c (get_phone_flags, set_phone_flags):
- Handle the new E_CARD_PHONE types.
-
-2001-08-02 Jon Trowbridge <trow@ximian.com>
-
- * printing/Makefile.am (ecpsdir): Add camel dependency.
-
- * gui/component/Makefile.am: Add camel dependency.
-
- * backend/ebook/Makefile.am: Add camel dependency.
-
- * gui/component/addressbook-factory.c (main): Properly init camel.
-
- * backend/ebook/e-destination.c (e_destination_clear_strings):
- Clear ->raw.
- (e_destination_is_empty): We aren't empty if ->raw is set..
- (e_destination_set_raw): Replaces e_destination_set_string.
- (e_destination_get_name): Use camel's parser to extract the name
- from ->raw.
- (e_destination_get_email): Use camel's parser to extract the email
- address from ->raw.
- (e_destination_get_address): Use camel to produce properly quoted,
- RFC-compliant addresses. Thanks camel! (Bug #5860)
-
- * gui/component/select-names/e-select-names-completion.c
- (emailify_match): Always append an e-mail address, as long as it
- doesn't have one already at it's beginning or end. Don't limit
- self to just emailifying entries tied to cards with multiple
- addresses. (I didn't really want to do this, but people seem to
- like keeping multiple cards for the same person, and other
- solutions (like scanning all matches for duplicate names, and only
- emailifying those) just seemed like way too much work for such a
- limited payoff.)
-
- * gui/component/select-names/e-select-names-text-model.c:
- s/e_destination_set_string/e_destination_set_raw/.
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): Quote _'s in our popup menus, so that "foo_bar"
- doesn't get displayed as "foobar" w/ the 'b' underlined. (Bug
- #5558)
- (popup_menu_nocard): Ditto.
-
-2001-08-02 Jason Leach <jleach@ximian.com>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- Removed some extra padding and pack the addressbook view into a
- frame with inward shadowing, just because it looks prettier.
-
- * gui/contact-editor/e-contact-editor.c: Use the updated Save,
- Save As, and Print icons for the menus and toolbar.
-
-2001-08-02 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c: Added ContactsSaveAsVCard,
- ContactsSendContactToOther, and ContactsSendMessageToContact verbs
- here.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h (e_addressbook_view_save_as,
- e_addressbook_view_send, e_addressbook_view_send_to): New
- functions to allow outside users to cause the addressbook to save,
- send, or send a message to its selection.
-
-2001-08-01 Christopher James Lahey <clahey@ximian.com>
-
- * contact-editor/.cvsignore: Removed this file from this unused
- directory.
-
-2001-08-01 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/Makefile.am: Added file-exists.glade.
-
- * gui/contact-editor/e-contact-save-as.c (file_exists),
- gui/contact-editor/file-exists.glade: Added a dialog to ask the
- user whether to replace an already existing file. Mostly from a
- patch by Jos Dehaes. Fixes Ximian bug #2231.
-
-2001-08-01 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): Removed thrash checking code
- here since thrashing shouldn't happen now that we've cleaned this
- up some.
-
- * backend/ebook/e-book.c (e_book_do_response_get_view): Properly
- handle cases where construction fails.
-
-2001-07-30 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/evolution-vcard-importer.c: Added #include
- <e-util/e-path.h>.
-
-2001-07-23 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/component/addressbook-config.c (addressbook_source_dialog):
- Convert translated string to UTF8 before calling put_html.
-
-2001-07-30 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_do_query): Properly handle the case
- where our "cleaned" completion is the empty string. This happens,
- for example, if the query text is the string "\"". (Bug #5610).
-
- * backend/ebook/e-destination.c (e_destination_get_address_textv):
- Reassure fejj that I'm not doing something stupid here.
- (e_destination_get_address): Fix address quoting. This is a
- stop-gap measure until I can change this code to use Camel's
- superior address-handling routines. (Also Bug #5610)
-
-2001-07-30 Jason Leach <jleach@ximian.com>
-
- * gui/component/addressbook-storage.c (load_source_data): Fix a
- return value bug, to make it so if it fails to load an
- addressbook-sources.xml file (either a parse error or it doesn't
- exist for example), it deregisters the storage.
- (register_storage): Don't make a storage for users who don't have
- LDAP support built in. Bug #1950.
-
-2001-07-30 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * addressbook/gui/component/addressbook-factory.c: Fix crashes
- when gtkhtml is compiled with gconf support
-
-2001-07-27 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: Tidy ldadds
-
-2001-07-26 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c: Fixing a
- small, stupid mistake; use e_select_names_model_get_textification
- for the getter for "text".
-
- * backend/ebook/e-card.c: Removed some debugging chatter.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_create_entry): Store the completion
- handler in the entry's object data.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Added support for getting "destinations"
- and "allow_contact_lists" properties.
- (entry_set_property_fn): Added support for setting "destinations"
- and "allow_contact_lists" properties.
- (impl_SelectNames_get_entry_for_section): Added definitions for
- "destinations" and "allow_contact_lists" properties.
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_get_match_contact_lists): Added.
- (e_select_names_completion_set_match_contact_lists): Added.
- Controls whether contact lists are offered as options during
- completion.
- (book_query_process_card_list): Check if match_contact_lists
- is set before (duh!) matching on a contact list.
- (e_select_names_completion_init): Set match_contact_lists
- to TRUE by default.
-
-2001-07-25 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (func_contains): change the way
- x-evolution-any-field is converted to an ldap query. it used to
- be we'd nest queries like: (|(|(|(foo=*x*))(bar=*x*))(baz=*x*)).
- now we build it like: (|(foo=*x*)(bar=*x*)(baz=*x*)). much more
- efficient (both in the building, and on the server side no doubt).
-
-2001-07-25 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_get_name): Properly dup
- the results of e_destination_get_email.
-
- * gui/component/select-names/e-select-names-popup.c
- (e_select_names_popup): Check that our destination isn't empty
- before building our popup. (Bug #5250)
-
- * backend/ebook/e-destination.c (e_destination_is_empty): Made
- argument const.
-
-2001-07-24 Jon Trowbridge <trow@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-model.c: Added checks
- for all of the args of the exposed functions, so that
- we won't crash on bad inputs. (Related to bug #4856.)
-
-2001-07-24 Jason Leach <jleach@ximian.com>
-
- * gui/merging/e-card-duplicate-detected.glade: "_Add Anyway" to
- "Add Anyway".
-
-2001-07-24 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_get_name): Added
- fallbacks for the name in the case of an e-card, to avoid the
- "nameless contact" bug.
-
-2001-07-24 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (remodel): need the EDestination magic
- here too for when we modify an already shown card.
-
- * gui/contact-list-editor/e-contact-list-model.c: make
- parent_class static, just to be anal.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (remove_entry_cb): removing entries changes the list, so flag it.
- (table_drag_data_received_cb): restrict cards we add to lists to
- be non-list cards.
- (extract_info): clear out the email list in the card before we
- repopulate it from the contact list model.
- (fill_in_info): set the checkbox to active/inactive based on
- thecard.
-
-2001-07-24 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (wants_html_changed): call
- widget_changed.
- (phone_entry_changed): same.
- (email_entry_changed): same.
- (address_text_changed): same.
- (name_entry_changed): same.
- (company_entry_changed): same.
- (widget_changed): new function that we can either call or set as a
- signal to change the "changed" flag on the dialog.
- (set_entry_changed_signals): connect lots of "changed" signals on
- widgets to widget_changed.
- (add_lists): connect "changed" to widget_changed.
-
-2001-07-24 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_hookup_shell_listener): Check if
- evolution_shell_client_get_local_storage returns CORBA_OBJECT_NIL,
- which it should never do. If it does, print a warning in a dialog
- and try to recover w/o crashing. (Bug #5193)
-
-2001-07-24 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-book-listener.c (e_book_listener_stop): Don't
- stop the idle_queue and unref from here, since this might be
- called from inside e_book_listener_check_queue, and we don't want
- to return to that function with the listener having been
- destroyed.
- (e_book_listener_check_queue): Don't exit early if the queue is
- stopped. Proceed through the check if the queue is NULL (which is
- must be if the queue is stopped), and then reach the existing code
- to remove the idle handler. Combined with the above, this fixes
- ximian #4485 (again). This is not a plot to boost my
- showstopper-bugfixing count by fixing the same bug over and over
- again.
-
-2001-07-23 Dan Winship <danw@ximian.com>
-
- Re-fix for my 07-18 not-quite-fix.
-
- * backend/ebook/e-book-listener.c: Add a "stopped" flag like
- EBookViewListener.
- (e_book_listener_check_queue): Don't emit signals if the listener
- is stopped.
- (e_book_listener_queue_generic_response, etc): Don't queue
- responses if the listener is stopped.
- (e_book_listener_stop): Flush the queue and stop queue/emitting
- further responses.
-
- * backend/ebook/e-book.c (e_book_unload_uri): Revert the previous
- change and call e_book_listener_stop() instead.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_stop): When removing an idle handler, unref
- the listener as well, since e_book_view_listener_queue_response
- will have ref'ed it.
-
-2001-07-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (remove_folder): Add a
- @type arg. If the type is not "contacts", report an
- `UNSUPPORTED_TYPE' error through the listener. Also, remove
- `g_print()' debugging messages.
- (xfer_folder): Likewise.
-
-2001-07-21 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c: Make the "contacts"
- folders user-creatable by setting `user_creatable' to %TRUE in the
- `EvolutionShellComponentFolderType's.
-
-2001-07-18 Chris Toshok <toshok@ximian.com>
-
- [ patch contributed by Jos Dehaes <jos.dehaes@bigfoot.com> ]
-
- * gui/component/addressbook-storage.c (register_storage): new
- function, register our evolution_storage.
- (addressbook_storage_setup): remove storage registration from
- here.
- (load_source_data): register the storage here before we load
- addressbook-sources.xml, and deregister it if there are no sources
- listed.
- (addressbook_storage_remove_source): unregister the storage if the
- list of sources hits 0 length.
-
-2001-07-18 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-book.c (e_book_unload_uri): Flush the listener's
- queue before unreffing it to ensure that it doesn't emit any more
- "responses_queued" signals after the EBook is destroyed.
-
- * backend/ebook/e-book-listener.c (e_book_listener_check_queue,
- e_book_listener_queue_response, e_book_listener_new): Use
- bonobo_object_ref/unref rather than gtk_object_ref/unref.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_response, e_book_view_listener_new):
- Likewise.
-
-2001-07-18 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-card-compare.c (simple_query_cb): prune the list
- of cards that match our query using the avoid list here, instead
- of using the avoid list in the query itself, since ldap can't
- handle that.
- (use_common_book_cb): remove the block of code including the avoid
- list in the query sent to wombat.
-
-2001-07-17 Chris Toshok <toshok@ximian.com>
-
- [ Fixes bugs #4611 - crash searching in the name field at Bigfoot for "\"
- and #4554 - general ldap search crash ]
-
- * backend/pas/pas-backend-ldap.c (func_contains): the length of
- the big query string needs to take into account the length of the
- footer as well as the header - fix random memory corruption here.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_query):
- list can be NULL, specifically if there's a parsing error in the
- sexp, so deal with it.
-
-2001-07-17 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_response): Hold a reference to our
- listener while the idle function is active.
- (e_book_view_listener_check_queue): Only unref the listener when
- the idle function is finished.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_clicked): Instead of replacing section->model with
- source, copy source onto section->model with
- e_select_names_model_overwrite_copy. #if 0/#endif out all of the
- stuff related to ETextModels, because it doesn't make any sense to
- me, and everything appears to work without it.
- (Die bug #2059. Die! Die! Die!)
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_overwrite_copy): Added. Copies the contents
- of one ESelectNamesModel onto another.
-
- * backend/ebook/e-destination.c (e_destination_copy): Made the argument
- const.
-
- * backend/ebook/e-destination.c (e_destination_set_string): Removed
- old, broken code and annoying g_messages.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_response): Hold a reference to the listener
- while the idle function is active.
- (e_book_listener_check_queue): Only release our reference to the
- listener when the queue is empty. These two changes fix a race
- condition, since the listener could be unrefed while the listener
- was still active. (Seems to fix bug #4485)
-
-2001-07-17 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/contact-editor.glade,
- gui/merging/e-card-duplicate-detected.glade,
- gui/merging/e-card-merging-book-commit-duplicate-detected.glade,
- printing/e-contact-print.glade: Patch from Taylor Hayward
- <thayward@gjpc.com>. Added accelerators to a few dialogs.
-
-2001-07-16 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
- Added addSectionWithLimit to the SelectNames interface.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_SelectNames_add_section_with_limit): Added. Implements
- addSectionWithLimit.
- (e_select_names_bonobo_construct): Set up as a BonoboEventSource.
- (init): Listen for "changed" signals from our manager.
- (manager_changed_cb): Notify our listeners if we get a changed
- signal from our manager.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_class_init): Added a "changed" signal".
- (section_copy): Propogate the signal connection.
- (section_free): Disconnect the changed handler.
- (e_select_names_manager_add_section_with_limit): Connect to the
- new section's model, listening for changes.
- (e_select_names_manager_activate_dialog): Connect to the "working
- copy" model, listening for changes.
- (e_select_names_manager_add_section_with_limit): Added.
- (e_select_names_manager_add_section): Changed to just be a special
- case of e_select_names_manager_add_section_with_limit.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_set_limit): Added. Allows a max number of
- names allowed in the model.
- (e_select_names_model_get_limit): Added. Returns the limit.
- (e_select_names_model_at_limit): Added. Returns TRUE if the
- model is "full".
- (e_select_names_model_insert): Check that we aren't at the
- limit before inserting. Silently return if we are.
- (e_select_names_model_append): Check that we aren't at the
- limit before appending. Silently return if we are.
-
-2001-07-16 Chris Toshok <toshok@ximian.com>
-
- [ Fix bug #4705 - LDAP storage gets saved with corrupted binddn]
-
- * gui/component/addressbook-config.c (addressbook_dialog_apply):
- call addressbook_storage_write_sources here after we're done
- rebuilding them.
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_clear_sources): don't write the source file
- here.
- (addressbook_storage_add_source): same.
- (addressbook_storage_remove_source): same.
- (addressbook_storage_write_sources): new function, write the
- source file out.
- (addressbook_source_copy): g_strdup the binddn so we don't end up
- free'ing it multiple times thanks to copies freeing theirs.
-
- * gui/component/addressbook-storage.h: add prototype for
- address_storage_write_sources.
-
-2001-07-16 Iain Holmes <iain@ximian.com>
-
- * backend/pas/evolution-vcard-importer.c (ebook_create): Don't just
- use the default directory. Use the directory that is passed into the
- load file function.
-
-2001-07-15 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_set_string):
- Commented out some unused variables and labels.
- (e_destination_importv): Check for the xml not parsing correctly
- and just return NULL here.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_import_destinationv): Handle a NULL destv
- here.
-
-2001-07-15 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (table_drag_data_get): Added a
- call to e_table_view_to_model_row here.
- (e_addressbook_view_can_print, e_addressbook_view_can_delete,
- e_addressbook_view_can_copy): If the selection model is NULL here,
- return NULL (this was done before in a g_return_val_if_fail which
- is only conditionally included.)
-
-2001-07-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: Changed Company to
- Organization here.
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/Makefile.am: add ldap cflags
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_xml_decode):
- Oops. I introduced my own bug, accidently set `email' to a
- g_free'd pointer - eek!
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_importv): Optimized
- the same way I optimized g_strsplit. If you use a GPtrArray
- instead of a linked list, you save yourself from having to iterate
- through the list an extra 3 times.
- (e_destination_xml_decode): Do NOT, I repeat: do NOT!
- e_utf8_xml1_decode something which is already in UTF-8 or you'll
- corrupt it!! I smack thee who hath done this evil deed!
-
-2001-07-12 Iain Holmes <iain@ximian.com>
-
- * backend/e-book/evolution-vcard-importer.c (support_format_fn):
- Check for no extension. Actually same as Jason's fix below :) but
- also check the file contents.
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * gui/component/addressbook-config.glade: add accelerators,
- taylor's patch
-
-2001-07-12 Jason Leach <jleach@ximian.com>
-
- * backend/ebook/evolution-vcard-importer.c (support_format_fn):
- Crash fix because strcmp() hates NULL arguments. Bug #3777.
-
-2001-07-11 Jason Leach <jleach@ximian.com>
-
- * gui/component/select-names/e-select-names.c (remove_cb): Added
- some comments for clarity and fixed a pretty noticable bug with
- how right click "Remove" was deleting more than it should with
- consecutive runs.
-
-2001-07-10 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/evolutionperson.schema: assign OID's to the schema
- entries, and add schema support for contact lists.
-
-2001-07-10 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): Set
- bf->priv->file_db before calling do_create.
-
-2001-07-06 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-component.c (factory_fn): Fixed order
- of arguments to evolution_shell_component_new.
-
-2001-07-08 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): Check that str isn't
- the empty string before doing an insert.
-
- * backend/ebook/e-destination.c (e_destination_set_string): We were
- being too smart for our own good here, and causing problems for
- the completion code... (bug #4253, bug #4255, bug #4280)
- (e_destination_set_name): Clear any cached address.
- (e_destination_set_email): Clear any cached address.
- (e_destination_get_address): Handle the cases where the name
- contains some e-mail information.
-
-2001-07-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/contact-list-editor/e-contact-list-editor.c: Marked a
- string for translation. Also add the neccesary includes to make
- _() macros work.
-
-2001-07-07 Jon Trowbridge <trow@ximian.com>
-
- * gui/widgets/e-minicard.c (add_field): Detect the embedded
- EDestination XML, and convert it to a nice-looking e-mail address.
-
- * gui/contact-list-editor/e-contact-list-editor.c: Adjusted to
- reflect changes to EContactListModel. (Yeah, this is vague,
- but the changes are _really_ obvious and boring.)
-
- * gui/contact-list-editor/e-contact-list-model.c: Revamped
- to make everything an EDestination, rather than storing either
- cards or strings.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): Use
- e_destination_get_textrep.
-
- * gui/component/select-names/e-select-names-table-model.c
- (fill_in_info): Use e_destination_get_name and
- e_destination_get_email.
-
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): Use e_destination_get_name instead of
- e_card_name_to_string.
- (quick_add_cb): Use e_destination_get_address.
- (popup_menu_nocard): Use e_destination_get_name.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_changed): Removed obsolete debugging code.
- (e_select_names_model_get_textification): Use e_destination_get_textrep.
- (e_select_names_model_get_address_text): Use e_destination_get_address.
- (e_select_names_model_get_string): Use e_destination_get_textrep.
- (e_select_names_model_replace): Use e_destination_get_textrep.
- (e_select_names_model_name_pos): Use e_destination_get_textrep.
-
- * gui/component/select-names/e-select-names-completion.c
- (emailify_match): Match only if this isn't a contact list.
- (match_email): Match only if this isn't a contact list.
- (match_name): Do the right thing in the case of a contact list.
- (book_query_process_card_list): Don't construct a match for
- each possible e-mail address if this is a contact list.
-
- * backend/ebook/e-destination.c: Major-league de-crufting and
- rationalization, combined with lots of hacks to make things work
- properly with contact lists.
- (e_destination_copy): Copy contact list info.
- (e_destination_clear_card): Clear contact list info.
- (e_destination_is_empty): If we contain a contact list, we aren't
- empty.
- (e_destination_set_card_uri): Added. Allows us to set a
- destination by card URI.
- (e_destination_set_name): Allows the contact's name only ("Jane
- Smith") to be set.
- (e_destination_set_email): Allows the contact's e-mail only
- ("jane@assbarn.com") to be set.
- (e_destination_set_string): Takes a free-form string containing a
- contact's name and/or e-mail, and tries to do the right thing with
- it.
- (e_destination_contains_card): Renamed. Used to be
- e_destination_has_card.
- (e_destination_from_card): Added. Returns TRUE if the
- EDestination comes from either a ECard (which we presently hold)
- or is specified by an ECard URI.
- (e_destination_use_card): Allows an EDestination's ECard to be
- accessed, via a callback. If we only are holding the URI, the
- card will be loaded and stored in the EDestination.
- (e_destination_get_name): Returns the name only ("Jane Smith"), or
- NULL.
- (e_destination_get_email): Returns the email only
- ("jane@assbarn.com"), or NULL.
- (e_destination_get_address): Added. Returns a "full address" if
- both the name & e-mail are available ("Jane Smith
- <jane@assbarn.com>"), or just the e-mail if the name is unknown
- ("jane@assbarn.com>"). If the destination is a contact list,
- returns a comma-separated list of addresses.
- (e_destination_get_textrep): Added. Returns a "text
- representation" of the EDestination. This is what is now
- displayed for completed, "cardified" destinations in addressbook
- entries.
- (e_destination_is_evolution_list): Check to see if this
- destination is for a contact list.
- (e_destination_xml_encode): Added. Build an XML data structure
- representing an EDestination.
- (e_destination_xml_decode): Added. Parse an XML data structure,
- constructing an EDestination.
- (e_destination_export): Added. Returns a null-terminated string
- containing an XML representation of the EDestination, with
- newlines and excess whitespace removed.
- (e_destination_import): Added. Parses a string containing an XML
- representation of an EDestination.
- (e_destination_exportv): Added. Returns a null-terminated string
- containing an XML representation of a collection of EDestinations,
- with newlines and excess whitespace removed.
- (e_destination_importv): Added. Takes an XML representation of a
- collection of destinations, parses it, and returns a vector of
- EDestinations.
-
- * backend/ebook/e-card.c (e_card_duplicate): Copy the ->book
- pointer.
- (e_card_get_id): Check that the argument is valid.
- (e_card_set_id): Check that the argument is valid.
- (e_card_get_book): Added. Return the EBook the ECard came from.
- (e_card_get_uri): Added. Tries to returns a URI for the ECard,
- which is of the form (EBook URI)/(ECard unique ID). Returns NULL
- if the EBook URI or the ID are unknown/not set.
- (e_card_get_vobject): If we have the URI, use it as the
- VCUniqueStringProp, rather than just the ID. This is a hack to
- make DnD work properly.
- (parse_id): Detect if the unique ID we've been passed is a URI or
- just a plain card ID, and do the right thing in either case.
- (e_card_uri_extract_book_uri): Added. Convenience function for
- parsing card URIs.
- (e_card_uri_extract_card_id): Added. Convenience function for
- parsing card URIs.
- (e_card_load_uri): Added. Allows an ECard to be loaded by its
- URI.
-
- * backend/ebook/e-book-view.c: Added a EBook * to the
- _EBookViewPrivate struct. This is meant to contain the EBook the
- EBookView is associated with.
- (add_book_iterator): Added. A convenience function for attaching
- the EBook to a GList of cards (if no EBook is already stored).
- (e_book_view_do_added_event): Record the EBook in the added
- ECards.
- (e_book_view_do_modified_event): Record the EBook in the modified
- ECards.
- (e_book_view_set_book): Added. Stores a pointer to the
- EBookView's "parent" EBook.
- (e_book_view_init): Init book_view->priv->book to NULL.
- (e_book_view_destroy): Unref book_view->priv->book.
-
- * backend/ebook/e-book.c: Added a uri field to _EBookPrivate.
- (e_book_unqueue_op): Removed debugging spew.
- (e_book_do_response_get_view): Attach the current EBook to the
- created EBookView.
- (e_book_do_response_get_changes): Attach the current EBook to the
- created EBookView.
- (e_book_load_uri): Save a copy of the uri in the EBook.
- (e_book_get_uri): Added. Just returns book->priv->uri.
- (e_book_get_card): Attach a pointer to the Ebook to the
- newly-loaded ECard.
- (e_book_add_card): Attach a pointer to the EBook to the
- newly-added ECard.
- (e_book_commit_card): Attach a pointer to the EBook to the
- committed ECard.
- (e_book_init): Initialize the uri to NULL.
- (e_book_destroy): Free the uri string on destruction.
-
-2001-07-06 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (populate_context_menu):
- Removed. [It was just bogus testing code for the right-click menu
- populating interface in the shell].
- (factory_fn): Pass NULL as the PopulateContextMenuFn.
-
-2001-07-05 Anna Marie Dirks <anna@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade:
- Added some accelerators, padding, and a "memebers" frame;
- also fixed spacing and growth behaviour of this dialog.
-
-2001-07-05 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (compare_category): Fix a memory
- leak here.
-
-2001-07-05 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c (match_search_info_free): Set
- info->avoid = NULL. This shouldn't make a difference, but it
- can't hurt.
-
-2001-07-05 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_is_cell_editable): Check if the row is within our
- table and return from this function as if the card is a standard
- card, not a list.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * backend/ebook/Makefile.am (evolution_vcard_importer_LDADD):
- added $(BONOBO_CONF_LIBS) to get it to compile.
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): Added
- $(BONOBO_CONF_LIBS).
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_create_categories),
- gui/contact-editor/e-contact-editor.c (categories_clicked):
- Switched to an ECategoriesMasterListWombat instead of an
- ECategoriesMasterListArray here.
-
-2001-07-02 Peter Williams <peterw@ximian.com>
-
- * gui/contact-editor/Makefile.am (INCLUDES): srcdir !=
- builddir compile fix.
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): Same.
-
- * gui/widgets/Makefile.am (INCLUDES): Same.
-
- * gui/search/Makefile.am (INCLUDES): Same.
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (categories_clicked):
- Turned off wombatification of the categories master list here.
-
-2001-07-01 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-editor.c (fill_in_info):
- use ECARD_UID_LINK_PREFIX.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (e_contact_list_model_get_email): use ECARD_UID_LINK_PREFIX.
-
- * backend/ebook/e-destination.h: add prototype for
- e_destination_importv_list.
-
- * backend/ebook/e-destination.c (e_destination_importv_list): new
- function, take an ECard corresponding to an address list and
- resolve any linked cards, returning an EDestination vector.
-
- * backend/ebook/e-card.h (ECARD_UID_LINK_PREFIX): #define this here,
- since we need to use it in a few places.
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added
- related_contacts field.
-
- * gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-model.h
- (e_select_names_model_import_destinationv): Added this function.
-
- * gui/contact-editor/contact-editor.glade: Replaced the entry here
- for related contacts with a table which is filled in in the C code.
-
- * gui/contact-editor/e-contact-editor.c,
- gui/contact-editor/e-contact-editor.h (add_lists): Added a select
- names entry here for the related contacts field.
-
- * gui/widgets/Makefile.am: Removed all the test programs here
- since there are circular dependencies now.
-
-2001-07-01 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_get_string): Fall
- back to use the name field if all else fails (which can happen
- with imported EDestinations).
-
- * backend/ebook/e-destination.c (e_destination_is_empty): Fix for the
- "recipient not specified" bug --- we were not correctly checking
- for whether or not an EDestination was actually empty.
-
-2001-06-30 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-card.c (e_card_evolution_list): Check args.
- Somewhere in the code (somewhere in the minicard stuff) this can
- be called with a NULL arg, which was causing crashes.
- (e_card_evolution_list_show_addresses): Check args.
-
- * backend/ebook/e-destination.c (build_field): I was accidentally
- comparing characters and strings here, and didn't see the compiler
- warning. Fixed.
- (e_destination_exportv): Don't export any empty destinations.
- (bug#3825).
-
-2001-06-30 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/component/e-address-popup.c (e_address_popup_construct): Marked
- strings for translation.
-
-2001-06-30 Jon Trowbridge <trow@ximian.com>
-
- * gui/merging/e-card-merging.c (match_query_callback): Make the
- standard for considering two cards to be match stricter.
-
- * gui/component/select-names/e-select-names-completion.c
- (make_match): Use the card's use-score to set the match's
- sort_major value.
- (match_name): Removed obsolete code.
- (e_select_names_completion_begin): Added (double) cast to make
- match->score calculation come out properly.
-
- * backend/ebook/e-card.c: Added X-EVOLUTION-LAST-USE and
- X-EVOLUTION-USE-SCORE to attribute_jump_array.
- (e_card_get_today): Added. A convenience routine for getting
- today's date and putting it in a GDate.
- (e_card_get_use_score): Added. Compute the current, time-decayed,
- use-score for the card.
- (e_card_touch): Increment the use-score by one; update the last
- used date.
- (e_card_date_to_string): Added as a convenience routine, getting
- rid of some code duplication.
- (e_card_get_vobject): Add handlers for X-EVOLUTION-USE-SCORE and
- X-EVOLUTION-LAST-USE.
- (parse_last_use): Added.
- (parse_use_score): Added.
- (e_card_class_init): Added args for last-use and use-score.
- (e_card_get_arg): Added handlers for last-use and use-score.
- o
- (e_card_set_arg): Added handlers for last-use and use-score.
-
- * backend/ebook/e-destination.c: Added pending_card_id to
- EDestinationPrivate struct.
- (e_destination_copy): Copy the pending_card_id.
- (e_destination_is_empty): Check for a pending_card_id. We are
- non-empty if we have one.
- (e_destination_clear_card): Clear pending_card_id.
- (e_destination_set_card): Clear pending_card_id.
- (e_destination_has_pending_card): Added.
- (e_destination_use_card): Added. An asynchronous way to load a
- pending card and then apply a callback to it.
- (build_field): Be paranoid, map our special characters to '_'.
- (e_destination_export): Use EXPORT_MAX_FIELDS symbol rather than a
- hard-wired array size. Added the "card" entry.
- (e_destination_import): Fix bug in handling of the "name" field.
- Process the "card" field.
- (e_destination_touch): "Touch" and commit the ECard corresponding
- to the e-mail address in the destination. (A query against the
- local addressbook is actually performed, in case the destination
- isn't cardified.
-
- * backend/ebook/e-card-compare.c (e_card_compare_name): Revamp the
- way E_CARD_MATCH_FOO results are mapped to comparison results.
- Report better matches when the family name is matched.
-
-2001-06-29 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c (update_query):
- Added a search field to the query here.
- (e_select_names_init): Update the query on a number of signals here.
-
- * gui/component/select-names/e-select-names.h: Added search_entry
- here.
-
- * gui/component/select-names/select-names.glade: Added the search
- entry here. Added some labels. Removed the update button.
-
-2001-06-29 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_option_activated): Change the uri here to have
- addressbook.db at the end.
-
- * gui/component/select-names/select-names.glade: Changed the name
- of the folder option menu here to match the name used in the code.
-
-2001-06-29 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c (update_query):
- Change the query when the "Update List" button is pushed.
-
- * gui/component/select-names/e-select-names.h: Removed
- currently_selected field. Added categories_entry field.
-
- * gui/component/select-names/select-names.glade: Added "Update
- List" button.
-
-2001-06-29 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/Makefile.am (INCLUDES): add EVOLUTION_IMAGESDIR
- define.
-
- * gui/widgets/e-minicard.h (struct _EMinicard): add our pixbuf and
- pixbuf size.
-
- * gui/widgets/e-minicard.c (e_minicard_init): init the icon pixbuf
- and its size.
- (e_minicard_destroy): unref the list_icon_pixbuf.
- (e_minicard_realize): create the list_icon GnomeCanvasPixbuf.
- (e_minicard_resize_children): clip the header_text by the
- list_icon, and place the list_icon in the right spot.
- (remodel): show the list_icon if we're a list, and hide it
- otherwise.
-
-2001-06-28 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (table_double_click): pop up
- list editor for lists, contact editor otherwise.
-
- * gui/widgets/e-minicard.c (e_minicard_event): same.
-
- * gui/widgets/e-minicard.h (struct _EMinicard): change "editor" to
- GtkOjbect, since it can be either a contact editor or contact list
- editor.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_is_cell_editable): don't allow editting of any fields
- except the name and file_as for lists.
-
-2001-06-28 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): remove ancient
- e-table include, and add include for contact-editor so we can
- reuse the confirm_delete dialog.
-
- * gui/contact-list-editor/e-contact-list-editor.h (struct
- _EContactListEditor): remove prototype for
- e_contact_list_editor_close, since the function no longer exists.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (list_deleted_cb): new function, emit our "list_deleted" signal.
- (delete_cb): new function, called from the Delete toolbar item.
- (e_contact_list_editor_raise): flesh out function.
- (extract_info): "evolution_list" => "list".
- (fill_in_info): same.
-
-2001-06-28 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-card.c (e_card_get_vobject): add support for
- X-EVOLUTION-LIST and X-EVOLUTION-LIST-SHOW-ADDRESSES.
- (parse_list): new function, parse the boolean X-EVOLUTION-LIST.
- (parse_list_show_addresses): new function, parse the boolean
- X-EVOLUTION-LIST-SHOW-ADDRESSES.
- (e_card_class_init): add args for "list" and
- "list_show_addresses".
- (e_card_set_arg): add support for list and list_show_addresses.
- (e_card_get_arg): same.
- (e_card_init): init list and list_show_addresses.
-
-2001-06-27 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (factory_fn): Pass NULL as
- the @external_uri_schemas argument to
- `evolution_shell_component_new()'.
-
-2001-06-27 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_row_count): track storage change - we're only using
- 1 array now.
- (contact_list_value_at): same.
- (contact_list_model_destroy): same.
- (e_contact_list_model_init): same.
- (e_contact_list_model_add_email): same.
- (e_contact_list_model_add_card): same.
- (e_contact_list_model_remove_row): same.
- (e_contact_list_model_remove_all): new function - just free/unref
- all existing rows.
- (e_contact_list_model_get_email): new function, returns the
- alloc'ed string containing either an email address or an encoded
- ECardId.
-
- * gui/contact-list-editor/e-contact-list-model.h: remove the 2
- separate arrays for email and cards, and store them in the same
- array.
-
- * gui/contact-list-editor/e-contact-list-editor.h (struct
- _EContactListEditor): add the visible_addr_checkbutton widget.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (visible_addrs_toggled_cb): new function.
- (e_contact_list_editor_init): connect to "toggled" on
- visible_addrs_checkbutton.
- (file_save_cb): new function.
- (tb_save_and_close_cb): new function.
- (verbs): add Save and Save & Close.
- (list_added_cb): new function.
- (list_modified_cb): new function.
- (save_card): new function - we do *not* use e_card_merging_* calls
- here.
- (e_contact_list_editor_get_arg): un-#if 0 code in the "card"
- getter.
- (e_contact_list_editor_set_arg): same for the "card" setter.
- (extract_info): new function.
- (fill_in_info): new function.
-
- * gui/contact-list-editor/contact-list-editor.glade: add a
- checkbutton at the bottom to determine whether to visibly include
- mail addresses in mail sent to this list.
-
-2001-06-26 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_create_categories): Oops. Can't use the wombat
- version of the master categories list yet.
-
-2001-06-26 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-table-adapter.c (create_card): memmove
- counts were off in this function.
- (remove_card, modify_card): Moved the table notifications around a
- bit here.
-
-2001-06-26 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h,
- gui/component/select-names/select-names.glade
- (e_select_names_create_categories): Added a categories combo here.
- It's not used yet.
-
-2001-06-26 Christopher James Lahey <clahey@ximian.com>
-
- * gui/search/addresstypes.xml: Added category searching to the
- advanced search dialog here.
-
-2001-06-26 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (compare_category): Added
- category searching to the file backend.
-
- * gui/component/addressbook.c (addressbook_query_changed): Added
- category searching to the search bar.
-
-2001-06-25 Peter Williams <peterw@ximian.com>
-
- * conduit/Makefile.am (INCLUDES): Fix for srcdir != builddir.
-
-2001-06-25 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade: change layout
- slightly, the icon no longer pushes everything to the left, and
- make the buttons on the right smaller and more in line with the
- other widgets.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_value_at): return the SimpleAndString->string
- instead of querying the ecardsimple.
- (e_contact_list_model_init): initially allocate 10 of each type
- (email and simple).
- (e_contact_list_model_add_email): realloc if need be.
- (e_contact_list_model_add_card): same, and initialize the string
- displayed to be "[Name] [<email>]".
- (e_contact_list_model_remove_row): change for SimpleAndString.
- (contact_list_model_destroy): free our 2 arrays.
-
- * gui/contact-list-editor/e-contact-list-model.h: add alloc counts
- and the SimpleAndString struct.
-
- * gui/contact-list-editor/e-contact-list-editor.c: Helix Code =>
- Ximian.
- (e_contact_list_editor_init): hook up d&d destination signals, and
- un-#if 0 the delete_event signal.
- (table_drag_motion_cb): new function.
- (table_drag_drop_cb): new function.
- (table_drag_data_received_cb): new function.
- (file_close_cb): new function.
- (verbs) uncomment the close verb.
- (close_dialog): new function.
- (app_delete_event_cb): new function.
-
- * gui/contact-list-editor/e-contact-list-editor.h: Helix Code =>
- Ximian.
-
-2001-06-25 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/e-address-popup.c: Add a huge steaming pile of
- code to handle the case of single-address merging. In other
- words, if you go to "harvest" an address by right-clicking on it
- in the mail viewer, and you already have a closely-matching
- contact (w/ a different e-mail address), this gives you the
- option of editting that contact's e-mail addresses to add the
- one you just clicked on.
-
- * backend/ebook/e-card-compare.c (match_search_info_free): It is
- amazing how much better things work when you don't try to
- dereference the pointer you just freed.
-
-2001-06-24 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/Makefile.am (minicard_test_LDADD): correct path to
- libecontacteditor.a.
- (minicard_widget_test_LDADD): same.
- (INCLUDES): same, for the includes.
-
- * gui/widgets/e-minicard.h: correct e-contact-editor.h path.
-
- * gui/widgets/e-addressbook-util.h: correct path to
- e-contact-editor.h, and add e-contact-list-editor.h. Add
- prototype for e_addressbook_show_contact_list_editor.
-
- * gui/widgets/e-addressbook-util.c: remove #include
- "e-contact-editor.h" (our header includes it.)
- (added_cb): rename card_added_cb to this, and make it so it can be
- reused in both the list and card cases. remove the g_print too.
- (modified_cb): same for modified case.
- (deleted_cb): same for deleted case.
- (editor_closed_cb): change first arg to GtkObject* so we can reuse
- this for both list and card.
- (e_addressbook_show_contact_editor): use added_cb, modified_cb,
- deleted_cb, and pass FALSE as user_data.
- (e_addressbook_show_contact_list_editor): new function, same as
- above but creating a contact-list-editor, and pass TRUE as
- user_data.
-
- * gui/component/e-address-popup.c: correct path to contact-editor.
-
- * gui/component/e-address-widget.c: same.
-
- * gui/component/select-names/e-select-names-popup.c: same.
-
- * gui/component/select-names/e-select-names-text-model.c: same.
-
- * gui/component/addressbook.c (new_contact_list_cb): new function.
- (update_command_state): update ContactNewList command.
- (verbs): remove ViewAll from the toolbar from the verb list. Add
- ContactNewList.
- (pixmaps): same for pixmaps.
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): new
- path for contact-editor.
- (INCLUDES): same.
-
- * gui/contact-list-editor/e-contact-list-model.h:
- * gui/contact-list-editor/e-contact-list-model.c:
- * gui/contact-list-editor/e-contact-list-editor.h:
- * gui/contact-list-editor/e-contact-list-editor.c:
- * gui/contact-list-editor/Makefile.am: Initial contact-list editor
- commit.
-
- * gui/Makefile.am (SUBDIRS): add contact-editor.
-
- * Makefile.am: (SUBDIRS): remove contact-editor.
-
-2001-06-21 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c
- (make_contact_editor_cb): Renamed. (The old name,
- edit_contact_info_have_book_cb was a hold-over from before, when
- we weren't using e_book_use_local_address_book.)
-
- * gui/component/e-address-popup.c
- (e_address_popup_schedule_refresh): A Added. We now do the name
- refreshes in an idle function, rather than in the setters.
- (e_address_popup_set_free_form): Added. Properly handle inputs of
- the form "Foo <bar@zar.com>", extracting the name and e-mail
- address.
- (e_address_popup_set_name): Check to make sure that the free-form
- handler shouldn't be used to handle the input. Schedule a refresh
- after making any changes.
- (e_address_popup_set_email): Check to make sure that the free-form
- handler shouldn't be used to handle the input. Schedule a refresh
- after making any changes.
- (e_address_popup_name_only_matches): Temporary place-holder for
- handling name-only matches.
- (query_cb): If our initial query fails (and included e-mail
- information), do a name-only query. This is to handle the case of
- adding new e-mail addresses to existing contacts.
- (e_address_popup_query): Eliminated the "common_book" crap; using
- e_book_use_local_address_book instead.
-
- * backend/ebook/e-card-compare.c (match_search_info_free): Make
- sure that the ->avoid list gets properly freed.
-
-2001-06-20 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_supported_fields): fix a refcounting
- memleak.
-
-2001-06-20 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_get_supported_fields_response): fix memory
- leak.
-
-2001-06-20 Chris Toshok <toshok@ximian.com>
-
- * contact-editor/e-contact-editor.c: add prototype for
- close_dialog to remove warnings.
-
-2001-06-20 Dave Camp <dave@ximian.com>
-
- * backend/ebook/e-card.c (e_card_list_send): Changed attach_data
- to be a GNOME_Evolution_Composer_AttachmentData rather than a
- CORBA_char*.
-
-2001-06-19 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (table_double_click): track
- change to e_addressbook_show_contact_editor signature.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_event): same.
-
- * gui/widgets/e-minicard.c (e_minicard_event): same.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- add an entry for "Card ID already exists".
- (e_addressbook_show_contact_editor): track the change to signal
- names and e_contact_editor_new signature here.
-
- * gui/widgets/e-addressbook-util.h: change
- e_addressbook_show_contact_editor's signature to match
- e_contact_editor_new more closely.
-
- * gui/widgets/e-addressbook-table-adapter.c (unlink_model): free
- up the simple mapping to plug a potentially sizeable memory leak.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): call
- e_addressbook_show_contact_editor here.
-
- * gui/component/select-names/e-select-names-popup.c
- (edit_contact_info_have_book_cb): remove the get_supported_fields
- stuff, since the contact editor handles it for us now, and call
- e_addressbook_show_contact_editor.
-
- * gui/component/e-address-popup.c (edit_contact_info_cb): same.
-
- * gui/component/addressbook.c (new_contact_cb): track change to
- e_addressbook_show_contact_editor.
-
-2001-06-19 Chris Toshok <toshok@ximian.com>
-
- * contact-editor/e-contact-quick-add.c (ce_have_book): rename
- ce_book_found_fields to this, remove the fetching of fields (the
- contact editor code handles that now.), and change the add_card
- signal to card_added.
- (card_added_cb): copied somewhat from merge_cb above. we don't
- need to do the merge here, just call the callback.
-
- * contact-editor/e-contact-editor.c (e_contact_editor_class_init):
- track signal change. add book arg, and is_read_only -> editable.
- (wants_html_changed): if the card isn't already changed, flag it
- as such (and update the commands.)
- (phone_entry_changed): same.
- (email_entry_changed): same.
- (address_text_changed): same.
- (name_entry_changed): same.
- (company_entry_changed): same.
- (full_name_clicked): is_read_only -> editable.
- (full_addr_clicked): same.
- (card_added_cb): new function, emit our card_added signal, and
- close the dialog if we're supposed to. properly deal with error
- status here.
- (card_modified_cb): same, modulo card_added -> card_modified.
- (save_card): actually call e_card_merging_book_{add/commit}_card
- instead of using a signal. Also, add a gboolean arg to tell
- whether or not to close the dialog after saving the card.
- (card_deleted_cb): new function, just emit our "card_deleted"
- signal.
- (delete_cb): actually call e_book_remove_card here, instead of
- using a signal.
- (tb_save_and_close_cb): call save_card with TRUE for should_close.
- (e_contact_editor_init): init changed = FALSE;
- (e_contact_editor_destroy): unref our book if we have one.
- (e_contact_editor_new): new signature, set the "book" arg, and
- call e_book_get_supported_fields here.
- (supported_fields_cb): new function, show the contact editor.
- (e_contact_editor_set_arg): initialize changed to FALSE when
- setting the card (but *after*, since the changed callbacks will
- set it to TRUE.) also, call command_state_changed if editable
- changes. also handle setting "book". oh, and is_read_only ->
- editable.
- (command_state_changed): new function - set the state of the
- commands we care about.
- (e_contact_editor_get_arg): add "book" handling, and is_read_only
- -> editable.
- (_phone_arrow_pressed): is_read_only -> editable.
- (_email_arrow_pressed): same.
- (_address_arrow_pressed): same.
- (enable_writable_fields): same.
- (set_editable): rename set_read_only to this, and is_read_only ->
- editable.
-
- * contact-editor/e-contact-editor.h (struct _EContactEditor):
- is_read_only -> editable, add a "changed" flag so we can sensitize
- commands correctly, and add an EBook* arg to e_contact_editor_new
- and to the EContactEditor struct. Also, change all the signals to
- past tense, and send the EBookStatus in them.
-
- * contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_class_init): is_read_only -> editable.
- (e_contact_editor_address_set_arg): same.
- (e_contact_editor_address_get_arg): same.
-
- * contact-editor/e-contact-editor-address.h (struct
- _EContactEditorAddress): same.
-
- * contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_class_init): same.
- (e_contact_editor_fullname_set_arg): same.
- (e_contact_editor_fullname_get_arg): same.
-
- * contact-editor/e-contact-editor-fullname.h (struct
- _EContactEditorFullname): same.
-
- * contact-editor/Makefile.am: don't build contact-editor-test now,
- until contact-editor gets moved to gui/ and we can more easily
- depend on the e_card_merging_* calls.
-
- * backend/pas/pas-backend-ldap.c (ldap_error_to_response): return
- CardIdAlreadyExists for LDAP_ALREADY_EXISTS.
-
- * backend/idl/addressbook.idl: Add CardIdAlreadyExists to the
- BookListener status enum.
-
- * backend/ebook/e-book-types.h: add
- E_BOOK_STATUS_CARD_ID_ALREADY_EXISTS.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_convert_status): add support for
- CardIdAlreadyExists.
-
-2001-06-19 Jon Trowbridge <trow@ximian.com>
-
- * contact-editor/e-contact-quick-add.c: Serious de-crufting,
- removal of gtk_object_set_data() hacks, simplified by using
- some of the newer ebook convenience routines, etc.
- (ce_book_found_fields):
- s/e_contact_editor_raise/e_contact_editor_show/, to accomodate the
- small changes in the contact editor API.
-
-2001-06-18 Eskil Heyn Olsen <eskil@eskil.dk>
-
- * conduit/address-conduit.c: (check_for_slow_setting),
- (conduit_get_gpilot_conduit):
- Tweaked for some gnome-pilot api changes
-
-2001-06-15 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (search_for_dn): implement this
- properly, using base and (objectclass=*).
-
-2001-06-14 Chris Toshok <toshok@ximian.com>
-
- * contact-editor/e-contact-editor.c (delete_cb): save ourselves a
- function call - call close_dialog instead of file_close_cb.
-
-2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/component/addressbook-component.c: Set the
- "expoted_dnd_types" to NULL in the folder_types.
-
-2001-06-11 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (search_override_check): Add a workaround for an EText bug.
- (e_select_names_completion_begin): Fix up the match scoring in the
- search_override case so the lines are offered in the correct
- order.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * gui/merging/Makefile.am (glade_DATA): Added
- e-card-merging-book-commit-duplicate-detected.glade here.
-
- * gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
- Added this file. The GUI for asking whether to commit a modified
- card.
-
- * gui/merging/e-card-merging.c, gui/merging/e-card-merging.h
- (e_card_merging_book_commit_card): Added this function.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_set_value_at), gui/widgets/e-addressbook-util.c
- (commit_card_cb), gui/widgets/e-minicard.c (e_minicard_event): Use
- e_card_merging_book_commit_card instead of e_book_commit_card here.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
- Made e_card_simple_get_id return const char *.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Made
- e_card_get_id return const char *.
-
- * gui/component/e-cardlist-model.c (e_cardlist_model_add): Made id
- variable const here. Added a break to make it slightly more
- efficient.
-
- * gui/widgets/e-minicard.c, gui/widgets/e-minicard.h: Made
- e_minicard_get_card_id return const char *.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (entry_compare): Made this handle
- the "id" property in searches.
- (pas_backend_file_process_modify_card): Made id variable const
- here.
-
- * backend/pas/pas-backend-ldap.c (modify_card_handler): Made id
- variable const here.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-listener.c,
- backend/ebook/e-book-listener.h, backend/ebook/e-book.c: Rolled
- back the change 2 ago, dated 06/11/2001 01:51 in CVS, involving
- e-book-listener.[ch] and e-book.c.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book.c (e_book_load_uri,
- e_book_get_supported_fields, e_book_authenticate_user,
- e_book_remove_card_by_id, e_book_add_vcard, e_book_commit_vcard,
- e_book_get_cursor, e_book_get_book_view, e_book_get_changes): Made
- it so that all of these functions queue their ops before calling
- their CORBA functions. This way, if the response is sent back
- before the CORBA function returns there's no problem. Added
- e_book_unqueue_op so that the op could be unqueued if the CORBA
- call fails.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-listener.c, backend/ebook/e-book-listener.h
- (e_book_listener_unpop_response): Added this function to put a
- response back into the queue.
-
- * backend/ebook/e-book.c (e_book_check_listener_queue,
- e_book_queue_op): Handle the case where the op hasn't been queued
- yet when we get the response. In this case we unpop the response.
- Also, when queueing an op, we check to see if there are any
- responses waiting.
-
- * This change has been reverted.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c, backend/ebook/e-card-compare.h
- (e_card_locate_match_full): Added this function to let you do
- slightly more complicated searches.
-
- * gui/merging/e-card-merging.c (e_card_merging_book_add_card): Use
- e_card_locate_match_full to check if the card exists in the book
- it's being added to instead of in the default book.
-
-2001-06-09 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (match_name): Removed unused email variable.
-
-2001-06-09 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-compare.c (use_common_book_cb): Null
- terminate the strv here.
- (e_card_locate_match): ref here instead of unref.
-
- * backend/ebook/e-card-simple.c (e_card_simple_get): Handle a NULL
- card here.
-
- * contact-editor/Makefile.am (INCLUDES), gui/widgets/Makefile.am
- (INCLUDES): Added addressbook/gui/merging here.
-
- * contact-editor/e-contact-quick-add.c (book_ready_cb),
- gui/component/addressbook-component.c (dnd_drop_book_open_cb),
- gui/widgets/e-addressbook-table-adapter.c
- (addressbook_append_row), gui/widgets/e-addressbook-util.c
- (add_card_cb), gui/widgets/e-addressbook-view.c
- (selection_received), gui/widgets/e-minicard-control.c
- (book_open_cb): Use e_card_merging_book_add_card instead of
- e_book_add_card here.
-
- * gui/Makefile.am (SUBDIRS): Added merging.
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD),
- gui/widgets/Makefile.am (minicard_test_LDADD,
- minicard_widget_test_LDADD): Added libecardmerging.a here.
-
- * gui/merging/, gui/merging/.cvsignore, gui/merging/Makefile.am:
- New addressbook library.
-
- * gui/merging/e-card-duplicate-detected.glade: Glade file for
- duplicate detected dialog.
-
- * gui/merging/e-card-merging.c, gui/merging/e-card-merging.h: New
- files for detecting duplicates before adding and putting up a
- dialog if duplicates are found.
-
- * gui/widgets/e-minicard-view.c: Include e-addressbook-util.h
- here.
-
-2001-06-08 Chris Toshok <toshok@ximian.com>
-
- * contact-editor/e-contact-editor.c (e_contact_editor_new): remove
- the gtk_widget_show call...
- (e_contact_editor_show): and put it here.
-
- * contact-editor/e-contact-editor.h: add prototype for
- e_contact_editor_show.
-
- * gui/widgets/e-minicard.c (e_minicard_event): call
- e_addressbook_show_contact_editor.
- (card_modified_cb): call e_addressbook_error_dialog if status !=
- SUCCESS.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_event): call
- e_addressbook_show_contact_editor. also, use card_modified_cb as
- the commit_card callback.
-
- * gui/widgets/e-addressbook-view.c (table_double_click): clean
- this area up alot, call e_addressbook_show_contact_editor.
- (card_deleted_cb): call e_addressbook_error_dialog.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (card_modified_cb): new function, call e_addressbook_error_dialog
- if the status != SUCCESS.
- (addressbook_set_value_at): use card_modified_cb as the callback
- for e_book_commit_card.
-
- * gui/widgets/Makefile.am (libeminicard_a_SOURCES): add
- e-addressbook-util.[ch].
-
- * gui/component/addressbook.c (new_contact_cb): use
- e_addressbook_show_contact_editor here.
-
-2001-06-05 Christopher James Lahey <clahey@ximian.com>
-
- * contact-editor/e-contact-editor.c (categories_clicked): Remove
- references to ECategoryMasterListWombat.
-
-2001-06-05 Jason Leach <jleach@ximian.com>
-
- * gui/component/select-names/e-select-names.c (remove_cb): Make
- this work when multiple names are selected then right
- click->Remove.
-
-2001-06-05 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (e_card_set_arg): Copy dates as they come
- in.
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_changes_foreach_key, pas_backend_file_changes,
- pas_backend_file_process_remove_card,
- pas_backend_file_process_modify_card,
- pas_backend_file_build_all_cards_list, pas_backend_file_get_vcard,
- pas_backend_file_maybe_upgrade_db): memset DBTs to 0 before using
- them.
- (pas_backend_file_build_all_cards_list): Reindented.
-
- * contact-editor/contact-editor.glade: Replaced GnomeDateEdits
- with a custom widget that creates an EDateEdit.
-
- * contact-editor/e-contact-editor.c: Use an EDateEdit here instead
- of a GnomeDateEdit.
-
-2001-06-05 Jason Leach <jleach@ximian.com>
-
- (Fix bug #655: SelectNames doesn't let you remove addresses after
- you add them)
-
- * gui/component/select-names/e-select-names.c
- (section_right_click_cb): New function, provides a popup menu with
- just "Remove" in it.
- (remove_cb): New callback to do the remove.
- (e_select_names_add_section): Attach the "right_click" signal to
- the section_right_click_cb above.
-
-2001-06-05 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (completion_handler): Change the completion handler to use the
- ECompletionMatch.
-
- * gui/component/select-names/e-select-names-completion.c
- General changes to convert for ECompletionMatch use.
- (emailify_match): Use extra sort keys in ECompletionMatch to let
- us ensure that the primary email address is always the first
- option, the secondary comes second, etc. There was no nice way to
- do this previously.
- (match_name): Removed code that adjusted score based on
- similarities between the "real name" and the e-mail address. It
- seemed like a good idea at the time, but produced unexpected and
- confusing results.
-
-2001-06-04 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-card-compare.c: Added. Code for testing
- if two ECards appear to pertain to the same contact (using loose
- matching rules, as opposed to requiring exact equality) and to
- query the addressbook for the "best match" to ECard.
-
-2001-06-03 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (set_status_message): remove spew,
- and don't call the ShellView CORBA method if the interface doesn't
- exist (for whatever reason.)
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_destroy):
- unref the EAddressbookModel.
- (create_minicard_view): unref the adapter.
- (card_added_cb): call e_book_error_dialog if status != SUCCESS.
- (card_modified_cb): same.
- (card_removed_cb): new function, and same.
- (delete_card_cb): pass card_removed_cb as the callback.
- (emit_status_message): new function, just emit status_message.
- (status_message): change to call emit_status_message.
- (card_deleted_cb): emit_status_message ("Done."), and call
- e_book_error_dialog if status != SUCCESS.
- (do_remove): pass view in the closure arg.
- (e_addressbook_view_delete_selection): emit status "Removing
- cards..." before starting the removal.
- (e_book_error_dialog): new function - pop up a (possibly) helpful
- message about why an operation failed.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_new): ref the EAddressbookReflowAdapter.
- (e_minicard_view_widget_destroy): unref the adapter.
- (e_minicard_view_widget_get_selection_model): if there isn't a
- minicard view return NULL.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (e_addressbook_table_adapter_construct): ref the
- EAddressbookModel.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_finalize): rename this from addressbook_destroy, to
- reflect the method change.
- (e_addressbook_reflow_adapter_class_init): same.
- (e_addressbook_reflow_adapter_construct): ref the
- EAddressbookModel.
-
- * gui/widgets/e-addressbook-model.h: add editable_set flag.
-
- * gui/widgets/e-addressbook-model.c (writable_status): only record
- the writable state of the addressbook if the user hasn't set it.
- (e_addressbook_model_init): init editable_set to FALSE.
- (e_addressbook_model_set_arg): set editable_set to TRUE.
-
-2001-06-03 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/Makefile.am (evolution_vcard_importer_LDADD): Move
- `$(DB3_LDADD)' before libeutil.
-
-2001-06-01 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/Makefile.am (evolution_vcard_importer_LDADD): Add
- $(DB3_LDADD)'.
-
-2001-05-31 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/Makefile.am (INCLUDES): Added db3 cflags.
-
- * backend/pas/pas-backend-file.c: Updated this to use db3.
-
-2001-05-31 Federico Mena Quintero <federico@ximian.com>
-
- * gui/widgets/e-addressbook-view.h (EAddressbookView): Added
- fields for the GalViewMenus and GalViewCollection; we need to keep
- them around while the component is active.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_setup_menus): Plug leak; unref the spec.
- Unref the factories. Do not unref the collection, since we need
- it for the signal emission (okay, so the views object adds a
- reference to it, but if we are interested in it we should keep a
- reference anyways).
- (e_addressbook_view_setup_menus): Create the collection and views
- on the EAddressbookView's fields so that we can keep them around.
- (e_addressbook_view_discard_menus): New function; gets rid of the
- collection and views objects.
-
- * gui/component/addressbook.c (control_activate_cb): Call
- e_addressbook_view_discard_menus().
-
-2001-05-31 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.h (struct
- _ESelectNames): add the EAddressbookModel* and change the
- ETableModel's name to "adapter".
-
- * gui/component/select-names/e-select-names.c (set_book),
- (addressbook_model_set_uri): these two things take an
- EAddressbookModel* instead of an ETableModel now.
- (e_addressbook_create_ebook_table): don't case the
- EAddressbookModel* to ETableModel*, create an EAddressbookTableAdapter
- on the EAddressbookModel instead.
- (e_select_names_init): set e_select_names->adapter.
-
-2001-05-31 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.c (remove_card): decrement
- data_count before emitting the card_removed signal, and break
- after we've removed the matching card.
- (e_addressbook_model_class_init): change signature of
- "card_removed" signal to match what we emit (and what is
- expected.)
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init): the
- signal name is "destroy", not "destroyed".
- (do_remove): new function, actually remove the card.
- (e_addressbook_view_delete_selection): get this working for both
- view types.
-
-2001-05-31 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c: Print Preview =>
- ContactsPrintPreview. Changed peter's change so that the node
- name is more in line with "Print.."'s
-
-2001-05-30 Peter Williams <peterw@ximian.com>
-
- * gui/component/addressbook.c: Use the correct path to the print
- preview menu item.
-
-2001-05-30 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (cut_contacts_cb): new function, for
- the Cut verb.
- (copy_contacts_cb): new function, for the Copy verb.
- (paste_contacts_cb): new function, for the Paste verb.
- (select_all_contacts_cb): new function, for the Select All verb.
- (update_command_state): add handling for sensitivity of
- Cut/Copy/Paste/Select All.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init): init
- the invisible and set up selection/destroy signals.
- (get_selection_model): new function, so we can get the
- ETableSelectionModel from either view type. makes lots of the
- other functions easier, since we can get the list of selected
- cards using the same code regardless of view type.
- (invisible_destroyed): new function.
- (selection_get): new function. convert the clipboard list to
- string.
- (selection_clear_event): new function - free up the list of
- ECards.
- (selection_received): if the selection data is valid and
- well-formed, add the corresponding cards to the ebook.
- (add_to_list): new function.
- (get_selected_cards): new function.
- (e_addressbook_view_cut): new function, implement in terms of
- _copy and _delete_selection.
- (e_addressbook_view_copy): claim ownership of the CLIPBOARD
- selection after saving the list of selected ECards.
- (e_addressbook_view_paste): call gtk_selection_convert.
- (e_addressbook_view_select_all): new function, using
- e_selection_model_select_all.
- (e_addressbook_view_can_print): re-implement in terms of
- get_selection_model.
- (e_addressbook_view_can_delete): same.
- (e_addressbook_view_can_cut): new function.
- (e_addressbook_view_can_copy): new function.
- (e_addressbook_view_can_paste): new function. hmm, always return
- TRUE here.
- (e_addressbook_view_can_select_all): new function.
-
- * gui/widgets/e-addressbook-view.h (struct _EAddressbookView): add
- selection stuff - the list of selected cards, and the GtkInvisible
- selection owner, and add prototypes for
- e_addressbook_view_[can]_{cut,copy,paste,select_all}.
-
- * gui/widgets/e-minicard-view-widget.h: add a prototype for
- e_minicard_view_widget_get_selection_model.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_get_selection_model): new function.
-
-2001-05-27 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook.c: #include
- "evolution-shell-component-utils.h" rather than "e-gui-utils.h"
- for e_pixmaps_update.
-
-2001-05-25 Peter Williams <peterw@ximian.com>
-
- * gui/component/Makefile.am: Reference libeshell.la instead of
- libeshell.a.
-
-2001-05-25 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_height):
- Correct the height calculation here to not include the
- E_CARD_SIMPLE_FIELD_FAMILY_NAME since it won't be displayed.
-
- * gui/widgets/e-minicard.c (remodel): Changed this to continue to
- be more consistent and simpler.
-
-2001-05-23 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (view_destroy): fix strings such
- that ones that happening at the beginning or during an operation
- are followed by "..." and those that stop the operation are
- followed by "."
- (create_card_handler): same.
- (ldap_op_process_current): same, and also call _notify_complete if
- we can't connect to ldap server.
- (poll_ldap): same, and change "Polling for LDAP search result" to
- "Receiving LDAP search results"
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search): call
- notify_status_message at the beginning of this function, and
- whenever we call _notify_complete.
-
-2001-05-23 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.h: add sequence_complete_id to
- EAddressbookModel and stop_state_changed to
- EAddressbookModelClass. also, add prototype for
- e_addressbook_model_can_stop.
-
- * gui/widgets/e-addressbook-model.c (remove_book_view): disconnect
- from "sequence_complete", and set search_in_progress to FALSE.
- (sequence_complete): set search_in_progress to FALSE and emit
- "stop_state_changed."
- (e_addressbook_model_class_init): create the "stop_state_changed"
- signal.
- (e_addressbook_model_init): init stuff.
- (book_view_loaded): connect to "sequence_complete" signal.
- (book_view_loaded): set search_in_progress to TRUE and emit
- "stop_state_changed"
- (e_addressbook_model_stop): set search_in_progress to false, emit
- "stop_state_changed", and set our status to "Search Interrupted."
- (e_addressbook_model_can_stop): return search_in_progress.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
- connect to the stop_state_changed signal on EAddressbookModel.
- (stop_state_changed): new function.
- (e_addressbook_view_can_stop): call e_addressbook_model_can_stop.
-
- * gui/component/addressbook.c (update_command_state): use
- e_addressbook_view_can_stop to set the sensitivity of the stop
- button.
-
-2001-05-22 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-book-listener.c (e_book_listener_check_queue):
- ref the listener for the duration of this function, since emitting
- "responses_queued" may cause it to be unreffed by its EBook in
- some cases, which could cause the second response_queue check to
- look at garbage data if it got destroyed.
- (e_book_listener_destroy): Call g_source_remove if idle_id is set.
-
-2001-05-22 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c: track the change in
- evolution-addressbook.xml's bonobo ui path's.
-
-2001-05-21 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (change_view_type): update_view_type
- is gone, since the menu item is gone.
-
- * gui/widgets/e-addressbook-table-adapter.c (create_card): use
- e_table_model_rows_inserted here.
-
-2001-05-20 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_source_item_new): Removed an unused variable.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Made text here non-const.
-
- * gui/component/select-names/e-select-names-popup.c
- (edit_contact_info_cb): Cast to a gpointer here.
-
- * gui/component/select-names/e-select-names.c
- (e_addressbook_create_ebook_table): Cast to E_TABLE_MODEL here.
-
-2001-05-18 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (match_name): Do a better job constructing match strings, so we
- never try to use a segment of the name that isn't there (resulting
- in ugly (null)'s in the string). Boost our score if some part of
- the name also matches the front part of the e-mail address, so the
- name match will always trump the e-mail match.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Return the serialized EDestinations
- (rather than just a string w/ e-mail addresses) through the bonobo
- component's property bag.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_export_destinationv): Added. A convenience routine
- for serializing the model's EDestinations into a string.
-
- * gui/component/select-names/e-select-names-popup.c
- (add_html_mail): Added. Puts in a check menu item for whether or
- not the recipient wants HTML mail.
- (popup_menu_card): Add menu item for HTML mail. Enable edit
- contact info item.
- (popup_menu_nocard): Add menu item for HTML mail. Enable edit
- contact info item.
-
- * backend/ebook/e-book-util.c (e_book_use_local_address_book):
- Added. Fetches the local addressbook and caches it on the first
- call. This is meant to be an easy and efficient way to get at the
- local addressbook with the minimum of code.
- (e_book_query_address_locally): Added. Convenience code that
- does an e-mail only e_book_name_and_email_query against the
- local address book.
-
- * backend/ebook/e-destination.c
- (e_destination_set_html_mail_pref): Added. Allows the intended
- recipient's HTML mail preference to be manipulated.
- (e_destination_get_email_verbose): Added. Cleaned up to use
- e_destination_get_name.
- (e_destination_get_html_mail_pref): Added. Read the recipient's HTML mail
- preference. If the destination is linked to a card, the
- preference is taken from the card (unless it has been explicitly
- overridden by a called to e_destination_set_html_mail_pref).
- (e_destination_get_address_textv): Added. Form a unified address string
- from a NULL-terminated vector of EDestinations.
- (e_destination_export): Added. Serialize an EDestination to a string.
- (e_destination_import): Added. Unserialize a string to build an
- EDestination.
- (e_destination_exportv): Added. Serialize a NULL-terminated vector of
- EDestinations to a string.
- (e_destination_importv): Added. Unserialize a string to build a
- NULL-terminated vector of EDestinations.
-
- * gui/component/select-names/e-select-names-completion.c:
- Implemented local versions of g_strcasecmp and g_strncasecmp
- (which should really be in glib, I think...) for utf8, and used
- them to make this code utf8-safe.
-
-2001-05-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (update_command_state): no more
- ContactFind command.
-
-2001-05-17 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): add our selection_change
- signal.
- (e_minicard_view_widget_realize): connect to the ESelectionModel's
- selection_changed signal.
- (e_minicard_view_widget_selected_count): new function.
- (selection_change): new function - emit our "selection_change"
- signal.
-
- * gui/widgets/e-minicard-view-widget.h (struct
- _EMinicardViewWidgetClass): add selection_change signal. also,
- add prototype for e_minicard_view_widget_selected_count.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): add our command_state_change
- signal.
- (e_addressbook_view_init): connect to the writable_status signal
- on the EAddressbookModel.
- (minicard_selection_change): new function - calls
- command_state_change.
- (create_minicard_view): connect to selection_change on the
- minicard_view so we know when to update command state.
- (table_selection_change): new function - calls
- command_state_change.
- (writable_status): new function - calls command_state_change.
- (command_state_change): new function - emits our
- "command_state_change" signal.
- (create_table_view): connect to the selection_change signal so we
- know to update the command state.
- (change_view_type): update the command state every time we change
- view types.
- (e_addressbook_view_can_create): new function.
- (e_addressbook_view_can_print): new function.
- (e_addressbook_view_can_delete): new function.
- (e_addressbook_view_can_stop): new function.
-
- * gui/widgets/e-addressbook-view.h (struct
- _EAddressbookViewClass): add command_state_change signal, and
- prototypes of functions the component can use to test the state of
- commands.
-
- * gui/widgets/e-addressbook-model.c (addressbook_destroy): unlink
- the writable_status signal on the EBook.
- (writable_status): new function.
- (e_addressbook_model_class_init): add our writable_status signal.
- (e_addressbook_model_init): init writable_status_id.
- (e_addressbook_model_set_arg): unlink the writable_status signal
- on the old EBook, and connect it on the new one.
-
- * gui/widgets/e-addressbook-model.h: add writable_status signal.
-
- * gui/component/addressbook.c (update_command_state): new
- function, set the sensitivity of the bonobo commands.
- (control_activate): update our command state immediately upon
- activating the control.
- (addressbook_factory_new_control): register command_state_change
- to update the commands.
-
-2001-05-15 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): initialize the model and
- adapter.
- (button_press): set on the model.
- (e_addressbook_search_dialog_new): same.
- (e_addressbook_search_dialog_set_arg): same.
- (e_addressbook_search_dialog_destroy): unref the model and
- adapter.
-
- * gui/search/e-addressbook-search-dialog.h (struct
- _EAddressbookSearchDialog): add our model and reflow adapter.
-
-2001-05-16 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view.c: (e_minicard_view_destroy): Fixed
- up the lifetime of the drag_data_get signal a bit.
-
-2001-05-15 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-view.c (add_to_list): MinicardViewModel
- -> ReflowAdapter name change.
- (get_card_list): same.
- (e_minicard_view_drag_begin): same.
- (supported_fields_cb): model -> adapter.
- (adapter_changed): hook up signals and set the empty message on
- our adapter.
- (e_minicard_view_set_arg): add support for "adapter", and set
- model -> adapter.
- (e_minicard_view_get_arg): same.
- (disconnect_signals): no more status_message.
- (do_remove): track to use adapter.
- (e_minicard_view_class_init): add adapter arg, and remove
- status_message.
- (e_minicard_view_init): all the code here is in adapter_changed
- now.
-
- * gui/widgets/e-minicard-view.h (struct _EMinicardView):
- EMinicardViewModel -> EAddressbookReflowAdapter.
- (struct _EMinicardViewClass): get rid of status_message.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): remove the status_message
- signal.
- (e_minicard_view_widget_new): take the adapter as our argument,
- and store it away for when we create the view.
- (e_minicard_view_widget_realize): when we create the view just set
- the adapter field on it. also, don't connect to status_message.
-
- * gui/widgets/e-minicard-view-widget.h (struct
- _EMinicardViewWidget): add our adapter here, so we can pass it
- into the view when we create it.
- (struct _EMinicardViewWidgetClass): remove status_message.
-
- * gui/widgets/e-addressbook-view.c (status_message): new function,
- no more propagating status messages!
- (e_addressbook_view_init): create our model and conenct to its
- status_message signal.
- (book_writable_cb): set "editable" on the model, not our object.
- (e_addressbook_view_set_arg): same, but with "book" and "query" as
- well.
- (create_minicard_view): create our reflow adapter and pass it to
- the minicard view widget. also, call e_reflow_model_changed so
- it'll pick up any already present cards.
- (table_double_click): ADDRESSBOOK_MODEL -> TABLE_ADAPTER.
- (get_card_list_1): remove the cast, since we don't need it any
- longer.
- (table_right_click): ADDRESSBOOK_MODEL -> TABLE_ADAPTER.
- (table_drag_data_get): same.
- (create_table_view): create the table adapter, and use it as our
- ETableModel.
- (change_view_type): remove the status_message hook up and setting
- of query/book/editable.
- (e_addressbook_view_stop): just call e_addressbook_model_stop here
- instead of switching on the view type.
-
- * gui/widgets/e-addressbook-view.h (struct _EAddressbookView): add
- our EAddressbookModel.
-
- * gui/widgets/Makefile.am (libeminicard_a_SOURCES): add the
- adapter files, and remove e-minicard-view-model.[ch].
-
- * gui/widgets/e-minicard-view-model.[ch]: removed.
-
- * gui/widgets/e-addressbook-table-adapter.c: new file.
-
- * gui/widgets/e-addressbook-table-adapter.h: new file.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: new file.
-
- * gui/widgets/e-addressbook-reflow-adapter.h: new file.
-
- * gui/widgets/e-addressbook-model.c: rework this class to now
- subclass from ETableModel anymore. It not subclasses from
- GtkObject, and we use table and reflow adapters to get at the
- data.
-
- * gui/widgets/e-addressbook-model.h: same.
-
-2001-05-14 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view-model.c (remove_card): Fix a small
- error not decreasing the data_count here.
-
-2001-05-13 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.h: add prototype for
- addressbook_expand_uri.
-
- * gui/component/addressbook-component.c
- (destination_folder_handle_drop): create an EBook for
- @physical_uri.
- (dnd_drop_book_open_cb): actually add the dropped cards.
-
- * gui/component/addressbook.c (addressbook_expand_uri): abstract
- this code out from the set_prop method so we can use it in the
- component.
- (set_prop): call addressbook_expand_uri.
-
- * backend/ebook/e-card.c (e_card_load_cards_from_string): new
- function.
-
- * backend/ebook/e-card.h: add prototype for
- e_card_load_cards_from_string.
-
-2001-05-12 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c
- (destination_folder_handle_drop): spew the data passed to us.
- (destination_folder_handle_motion): the suggested_action is not an
- ActionSet, but an Action, so don't or together multiple actions.
-
-2001-05-11 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (addressbook_source_dialog):
- correct bug causing the Ok button to never be enabled.
-
-2001-05-11 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (populate_context_menu):
- example.
-
-2001-05-11 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_drag_data_get):
- use e_card_list_get_vcard to build up the data to send.
- (e_minicard_view_init): connect to the model's drag_begin signal.
- (e_minicard_view_drag_begin): gather the list of cards being
- dragged and call gtk_drag_begin.
- (add_to_list): new function.
- (get_card_list): same.
- (disconnect_signals): disconnect the drag_data_get signal.
- (e_minicard_view_init): connect to the drag_begin signal on our
- model.
-
- * gui/widgets/e-minicard-view.h (struct _EMinicardView): change
- drag_card to drag_list.
-
- * gui/widgets/e-minicard-view-model.c (minicard_drag_begin): new
- function, emit our drag_begin signal.
- (addressbook_incarnate): connect to the item's drag_begin signal.
- (e_minicard_view_model_class_init): init our drag_begin signal.
-
- * gui/widgets/e-minicard-view-model.h: add drag_begin signal.
-
- * gui/component/addressbook-config.c (addressbook_source_dialog):
- always loop through all source types here, making LDAP first so
- it's forces as the first notebook item.
- (addressbook_config_auth_label): remove SASL case.
- (addressbook_source_edit_changed): same.
- (addressbook_source_item_new): flag the area of code that needs to
- go into the advanced dialog (if we add one before someone
- graciously redesigns the entire addressbook gui :)
-
-
- * gui/component/addressbook-storage.c (ldap_unparse_auth): remove
- SASL case.
- (ldap_parse_auth): same.
-
- * gui/component/addressbook-storage.h: make LDAP come first in our
- source type enumeration, and remove the SASL auth type.
-
-2001-05-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (e_card_set_arg): If the name is set and
- the full_name or file_as haven't been yet, set them.
-
-2001-05-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c: Reordered the includes here.
- (string_to_dbt): The sleepycat libdb documentation suggests
- memseting the DBT to 0 so we do that here.
-
- * gui/widgets/e-minicard-view-model.c (addressbook_height): Skip
- the E_CARD_SIMPLE_FIELD_FAMILY_NAME field.
-
- * gui/widgets/e-minicard.c (remodel): Skip the
- E_CARD_SIMPLE_FIELD_FAMILY_NAME field.
-
-2001-05-11 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only
- check schema support if we've connected.
-
-2001-05-11 Chris Toshok <toshok@ximian.com>
-
- * contact-editor/e-contact-editor.c (enable_writable_fields):
- don't leak the ECard or ECardSimple.
-
-2001-05-08 Iain Holmes <iain@ximian.com>
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in:
- Renamed the GnomeCard_Importer.oaf.in to this, and change the IID.
-
- * Makefile.am: Rename all the GnomeCard to VCard.
-
- * evolution-vcard-importer.c: Make the GnomeCard a generic
- vcard importer.
-
-2001-05-08 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/Makefile.am (libebookinclude_HEADERS): Removed
- e-card-pairs.h since we're not using it.
-
- * backend/ebook/e-book-view.c (e_book_view_check_listener_queue):
- Added break; to default: case here.
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
- Added changed variable so as to avoid sync_card when possible.
- (e_card_simple_destroy): Free all the data here properly.
- (e_card_simple_get_arg): Slight simplification here.
- (fill_in_info, e_card_simple_arbitrary_foreach,
- e_card_simple_get_arbitrary): Call e_card_free_empty_lists here to
- save a bit of memory.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Fixed up
- includes a bit.
- (e_card_list_get_vcard, e_card_list_send): Added these functions
- for acting on a group of cards.
- (parse_org): Cleaned up this function a bit.
- (e_card_free_empty_lists): Added this function to delete
- unnecessary ELists and save a bit of memory.
- (e_v_object_get_child_value): Made this return NULL if not found
- instead of g_strdup("").
-
- * contact-editor/e-contact-save-as.c,
- contact-editor/e-contact-save-as.h (e_contact_list_save_as): Added
- this function to save multiple contacts.
-
- * gui/widgets/Makefile.am: Commented out reflow test.
- (libeminicard_a_SOURCES): Added e-minicard-view-model.c and
- e-minicard-view-model.h.
-
- * gui/widgets/e-minicard-view-model.c,
- gui/widgets/e-minicard-view-model.h: Model for use in
- EMinicardView.
-
- * gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h:
- Reworked this to use the new EReflow stuff.
-
- * gui/widgets/e-minicard.c (e_minicard_event): Doesn't handle
- right click menus now. Emits a signal on the parent canvas item
- instead.
-
- * printing/e-contact-print-envelope.c,
- printing/e-contact-print-envelope.h
- (e_contact_print_envelope_list_dialog_new): Added this function to
- print multiple envelopes (only prints first for now.)
-
- * printing/e-contact-print.c, printing/e-contact-print.h
- (e_contact_print_card_list_dialog_new): Added this function to
- print multiple cards. Only prints the first for now.
-
-2001-05-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (remove_folder): flesh out
- the function more. It should work now, but there's no way to
- invoke this method from the ui at the moment, heh.
-
-2001-05-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (book_open_cb): Use a different
- error message in the ldap support/no ldap support/file cases.
-
-2001-05-07 Gediminas Paulauskas <menesis@delfi.lt>
-
- * gui/component/addressbook.c: use define from
- widgets/misc/e-filter-bar.h instead of own enumeration and search menu
- names.
-
- * gui/component/Makefile.am, gui/component/select-names/Makefile.am:
- removed EVOLUTION_VERSION.
-
-2001-05-04 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (remove_folder): un-#if 0
- this.
- (xfer_folder): add skeleton code to validate xfer request. always
- notifies with PERMISSION_DENIED at present.
- (populate_context_menu): un-#if 0 this.
- (get_dnd_selection): same.
- (destination_folder_handle_motion): new function.
- (destination_folder_handle_drop): new function.
- (factory_fn): create a EvolutionShellComponentDndDestinationFolder
- interface, and add it to our shell component.
-
-2001-05-04 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_book_view): init change_id to NULL
-
-2001-05-02 JP Rosevear <jpr@ximian.com>
-
- * gui/component/addressbook.c (addressbook_view_free): unref the
- book if the view is being destroyed
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_book_view): unref the book_view when
- we are finished, it is only interesting if someone else has reffed
- it now (weak reference)
- (pas_backend_file_add_client): unref the book for the same reason
- as above
-
- * Fixes bug #2255
-
-2001-04-30 JP Rosevear <jpr@ximian.com>
-
- * backend/pas/pas-backend-file.c (vcard_matches_search): if the
- view does not contain a search context, the result is by default
- false fixes #2470
-
-2001-04-25 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-factory.c (main): Remove call to
- unicode_init.
-
-2001-04-23 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/e-address-popup.c: Lots of code has been
- simplified here.
- (e_address_popup_factory_new_control): Rather than directly pop
- our control up in a window (via the e_address_popup_popup
- function, which is now gone), just return the widget and let the
- caller do the popping. This works better, since it means we don't
- have to work around the vagaries of bonobo focus & event handling.
- (e_address_popup_set_name): Refresh when both name & email have
- been set, rather than checking a stupid counter.
- (e_address_popup_set_email): Ditto.
-
-2001-04-22 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_clear_sources): Added save_source_data here.
-
-2001-04-21 Jon Trowbridge <trow@ximian.com>
-
- * contact-editor/e-contact-quick-add.c (clicked_cb): Properly
- convert to utf8. (Bug #2256)
- (build_quick_add_dialog): Properly convert from utf8. (Bug #2256)
-
-2001-04-16 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-destination.c (e_destination_get_name): Added.
-
- * gui/component/select-names/e-select-names.c
- (real_add_address_cb): Use e_select_names_model_append. It's
- nicer.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_append): Added.
-
- * gui/component/select-names/e-select-names-completion.c
- (book_query_process_card_list): Filter out completion matches that
- don't have an associated e-mail address.
- (book_query_score): Give a bonus to the primary address, so that
- it always comes up first in the completion results.
-
- * gui/component/e-address-popup.c (e_address_popup_refresh_names):
- Convert utf8 strings into gtk strings before displaying.
-
-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/E-CARD-NEEDED-FIELDS b/addressbook/E-CARD-NEEDED-FIELDS
deleted file mode 100644
index e227d1b130..0000000000
--- a/addressbook/E-CARD-NEEDED-FIELDS
+++ /dev/null
@@ -1,9 +0,0 @@
-I will add these fields as I get a chance to.
-
-Thanks,
- Chris Lahey
-
-X-EVOLUTION-LIST boolean if this is a mailing list.
-X-EVOLUTION-LIST-SHOW-ADDRESSES boolean whether to list all email addresses in the To: line or to treat the list kind of like a BCC.
-X-EVOLUTION-RELATED-CONTACTS EDestionationList of related contacts.
-REV last changed date. \ No newline at end of file
diff --git a/addressbook/Makefile.am b/addressbook/Makefile.am
deleted file mode 100644
index 9aad9c1b30..0000000000
--- a/addressbook/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-if ENABLE_PILOT_CONDUITS
-CONDUIT_SUBDIR=conduit
-endif
-
-SUBDIRS = \
- backend printing 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 f1eef28fc4..0000000000
--- a/addressbook/backend/ebook/.cvsignore
+++ /dev/null
@@ -1,23 +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-vcard-importer
-evolution-gnomecard-importer
-Evolution-Composer-stubs.c
-Evolution-Composer-skels.c
-Evolution-Composer-common.c
-Evolution-Composer.h
-GNOME_Evolution_Addressbook_VCard_Importer.oaf
diff --git a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in b/addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in
deleted file mode 100644
index 9cd4699633..0000000000
--- a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_VCard_ImporterFactory"
- type="exe"
- location="evolution-vcard-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 VCard files into Evolution."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_VCard_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_VCard_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="VCard (.vcf, .gcrd)"/>
- <oaf_attribute name="description" type="string"
- _value="Imports VCard 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 c2bcbe7c75..0000000000
--- a/addressbook/backend/ebook/Makefile.am
+++ /dev/null
@@ -1,185 +0,0 @@
-noinst_PROGRAMS = test-card test-client test-client-list
-
-bin_PROGRAMS = evolution-vcard-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)/camel \
- -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-card-compare.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-simple.h \
- e-card-types.h \
- e-card.h \
- e-card-compare.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_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(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_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(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_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la
-
-evolution_vcard_importer_SOURCES = \
- evolution-vcard-importer.c
-evolution_vcard_importer_LDADD = \
- libebook.la \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(DB3_LDADD) \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la
-
-load_pine_addressbook_SOURCES = \
- load-pine-addressbook.c
-
-load_pine_addressbook_LDADD = \
- libebook.la \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(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_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(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_VCard_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 a66701847d..0000000000
--- a/addressbook/backend/ebook/e-book-listener.c
+++ /dev/null
@@ -1,826 +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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 timeout_id;
-
- guint timeout_lock : 1;
- guint stopped : 1;
-};
-
-static void
-response_free (EBookListenerResponse *resp)
-{
- if (resp == NULL)
- return;
-
- 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);
-}
-
-static gboolean
-e_book_listener_check_queue (EBookListener *listener)
-{
- if (listener->priv->timeout_lock)
- return TRUE;
-
- listener->priv->timeout_lock = TRUE;
-
- if (listener->priv->response_queue != NULL && !listener->priv->stopped) {
- gtk_signal_emit (GTK_OBJECT (listener), e_book_listener_signals [RESPONSES_QUEUED]);
- }
-
- if (listener->priv->response_queue == NULL || listener->priv->stopped) {
- listener->priv->timeout_id = 0;
- listener->priv->timeout_lock = FALSE;
- bonobo_object_unref (BONOBO_OBJECT (listener)); /* release the timeout's reference */
- return FALSE;
- }
-
- listener->priv->timeout_lock = FALSE;
- return TRUE;
-}
-
-static void
-e_book_listener_queue_response (EBookListener *listener,
- EBookListenerResponse *response)
-{
- if (response == NULL)
- return;
-
- if (listener->priv->stopped) {
- response_free (response);
- return;
- }
-
- listener->priv->response_queue = g_list_append (listener->priv->response_queue, response);
-
- if (listener->priv->timeout_id == 0) {
-
- /* 20 == an arbitrary small integer */
- listener->priv->timeout_id = g_timeout_add (20, (GSourceFunc) e_book_listener_check_queue, listener);
-
- /* Hold a reference on behalf of the timeout */
- bonobo_object_ref (BONOBO_OBJECT (listener));
-
- }
-}
-
-/* Add, Remove, Modify */
-static void
-e_book_listener_queue_generic_response (EBookListener *listener,
- EBookListenerOperation op,
- EBookStatus status)
-{
- EBookListenerResponse *resp;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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_vcard_response (EBookListener *listener,
- EBookStatus status,
- const char *vcard)
-{
- EBookListenerResponse *resp;
-
- if (listener->priv->stopped)
- return;
-
- resp = g_new0 (EBookListenerResponse, 1);
-
- resp->op = GetCardResponse;
- resp->status = status;
- resp->vcard = g_strdup (vcard);
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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;
-
- if (listener->priv->stopped)
- return;
-
- 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, 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_vcard (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_VCard card,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
-
- e_book_listener_queue_get_vcard_response (
- listener,
- e_book_listener_convert_status (status),
- g_strdup (card));
-}
-
-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_CardIdAlreadyExists:
- return E_BOOK_STATUS_CARD_ID_ALREADY_EXISTS;
- 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");
- bonobo_object_unref (BONOBO_OBJECT (listener));
- return NULL;
- }
-
- return retval;
-}
-
-static void
-e_book_listener_init (EBookListener *listener)
-{
- listener->priv = g_new0 (EBookListenerPrivate, 1);
-}
-
-void
-e_book_listener_stop (EBookListener *listener)
-{
- g_return_if_fail (E_IS_BOOK_LISTENER (listener));
-
- listener->priv->stopped = TRUE;
-}
-
-static void
-e_book_listener_destroy (GtkObject *object)
-{
- EBookListener *listener = E_BOOK_LISTENER (object);
- GList *l;
-
- /* Remove our response queue handler: In theory, this can never happen since we
- always hold a reference to the listener while the timeout is running. */
- if (listener->priv->timeout_id) {
- g_source_remove (listener->priv->timeout_id);
- }
-
- /* Clean up anything still sitting in response_queue */
- for (l = listener->priv->response_queue; l != NULL; l = l->next) {
- EBookListenerResponse *resp = l->data;
-
- response_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->notifyCardRequested = impl_BookListener_respond_get_vcard;
- 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 f546c9a029..0000000000
--- a/addressbook/backend/ebook/e-book-listener.h
+++ /dev/null
@@ -1,109 +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@ximian.com)
- *
- * Copyright 2000, Ximian, 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,
- GetCardResponse,
- 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;
- char *vcard;
-} 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);
-void e_book_listener_stop (EBookListener *listener);
-
-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 0a477678eb..0000000000
--- a/addressbook/backend/ebook/e-book-types.h
+++ /dev/null
@@ -1,39 +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@ximian.com)
- *
- * Copyright 2000, Ximian, 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_CARD_ID_ALREADY_EXISTS,
- 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 1468274230..0000000000
--- a/addressbook/backend/ebook/e-book-util.c
+++ /dev/null
@@ -1,583 +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 "e-book-util.h"
-
-#include <gtk/gtkobject.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include "e-card-compare.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);
-
- if (!rv) {
- g_warning ("Couldn't load local addressbook %s", uri);
- }
-
- g_free (filename);
- g_free (uri);
-
- return rv;
-}
-
-static EBook *common_local_book = NULL;
-
-typedef struct _CommonBookInfo CommonBookInfo;
-struct _CommonBookInfo {
- EBookCommonCallback cb;
- gpointer closure;
-};
-
-static void
-got_local_book_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- CommonBookInfo *info = (CommonBookInfo *) closure;
-
- if (status == E_BOOK_STATUS_SUCCESS) {
-
- /* We try not to leak in a race condition where the
- local book got loaded twice. */
-
- if (common_local_book) {
- gtk_object_unref (GTK_OBJECT (book));
- book = common_local_book;
- }
-
- info->cb (book, info->closure);
-
- if (common_local_book == NULL) {
- common_local_book = book;
- }
-
- } else {
-
- info->cb (NULL, info->closure);
-
- }
- g_free (info);
-}
-
-void
-e_book_use_local_address_book (EBookCommonCallback cb, gpointer closure)
-{
- EBook *book;
- CommonBookInfo *info;
-
- g_return_if_fail (cb != NULL);
-
- if (common_local_book != NULL) {
- cb (common_local_book, closure);
- return;
- }
-
- info = g_new0 (CommonBookInfo, 1);
- info->cb = cb;
- info->closure = closure;
-
- book = e_book_new ();
- if (! e_book_load_local_address_book (book, got_local_book_cb, info)) {
- gtk_object_unref (GTK_OBJECT (book));
- g_free (info);
- }
-}
-
-/*
- *
- * 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;
-}
-
-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);
-
- return sq;
-}
-
-static void
-simple_query_disconnect (SimpleQueryInfo *sq)
-{
- if (sq->add_tag) {
- gtk_signal_disconnect (GTK_OBJECT (sq->view), sq->add_tag);
- sq->add_tag = 0;
- }
-
- if (sq->seq_complete_tag) {
- gtk_signal_disconnect (GTK_OBJECT (sq->view), sq->seq_complete_tag);
- sq->seq_complete_tag = 0;
- }
-
- if (sq->view) {
- gtk_object_unref (GTK_OBJECT (sq->view));
- sq->view = NULL;
- }
-}
-
-static void
-simple_query_free (SimpleQueryInfo *sq)
-{
- /* Remove ourselves from the EBook's pending list. */
- book_remove_simple_query (sq->book, sq);
-
- g_free (sq->query);
-
- simple_query_disconnect (sq);
-
- 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;
-
- /* Disconnect signals, so that we don't pick up any changes to the book that occur
- in our callback */
- simple_query_disconnect (sq);
- 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);
-}
-
-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);
- e_book_get_book_view (book, (gchar *) query, simple_query_book_view_cb, sq);
-
- 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_compare_name_to_string (card, info->name) >= E_CARD_MATCH_VAGUE)
- && (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]) {
- char *str = namev[i];
-
- namev[i] = g_strdup_printf ("(contains \"file_as\" \"%s\")", namev[i]);
- ++count;
-
- g_free (str);
- }
- }
-
- 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);
- g_strfreev (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;
-}
-
-/*
- * Simple nickname query
- */
-
-typedef struct _NicknameQueryInfo NicknameQueryInfo;
-struct _NicknameQueryInfo {
- gchar *nickname;
- EBookSimpleQueryCallback cb;
- gpointer closure;
-};
-
-static void
-nickname_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- NicknameQueryInfo *info = closure;
-
- if (info->cb)
- info->cb (book, status, cards, info->closure);
-
- g_free (info->nickname);
- g_free (info);
-}
-
-guint
-e_book_nickname_query (EBook *book,
- const char *nickname,
- EBookSimpleQueryCallback cb,
- gpointer closure)
-{
- NicknameQueryInfo *info;
- gchar *query;
- guint retval;
-
- g_return_val_if_fail (E_IS_BOOK (book), 0);
- g_return_val_if_fail (nickname && *nickname, 0);
-
- info = g_new0 (NicknameQueryInfo, 1);
- info->nickname = g_strdup (nickname);
- info->cb = cb;
- info->closure = closure;
-
- query = g_strdup_printf ("(is \"nickname\" \"%s\")", info->nickname);
-
- retval = e_book_simple_query (book, query, nickname_cb, info);
-
- g_free (query);
-
- return retval;
-}
-
-/*
- * Convenience routine to check for addresses in the local address book.
- */
-
-typedef struct _HaveAddressInfo HaveAddressInfo;
-struct _HaveAddressInfo {
- gchar *email;
- EBookHaveAddressCallback cb;
- gpointer closure;
-};
-
-static void
-have_address_query_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- HaveAddressInfo *info = (HaveAddressInfo *) closure;
-
-
- info->cb (book,
- info->email,
- cards && (status == E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS) ? E_CARD (cards->data) : NULL,
- info->closure);
-
- g_free (info->email);
- g_free (info);
-}
-
-static void
-have_address_book_open_cb (EBook *book, gpointer closure)
-{
- HaveAddressInfo *info = (HaveAddressInfo *) closure;
-
- if (book) {
-
- e_book_name_and_email_query (book, NULL, info->email, have_address_query_cb, info);
-
- } else {
-
- info->cb (NULL, info->email, NULL, info->closure);
-
- g_free (info->email);
- g_free (info);
-
- }
-}
-
-void
-e_book_query_address_locally (const gchar *email,
- EBookHaveAddressCallback cb,
- gpointer closure)
-{
- HaveAddressInfo *info;
-
- g_return_if_fail (email != NULL);
- g_return_if_fail (cb != NULL);
-
- info = g_new0 (HaveAddressInfo, 1);
- info->email = g_strdup (email);
- info->cb = cb;
- info->closure = closure;
-
- e_book_use_local_address_book (have_address_book_open_cb, info);
-}
diff --git a/addressbook/backend/ebook/e-book-util.h b/addressbook/backend/ebook/e-book-util.h
deleted file mode 100644
index 69965c8363..0000000000
--- a/addressbook/backend/ebook/e-book-util.h
+++ /dev/null
@@ -1,79 +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 (*EBookCommonCallback) (EBook *book, gpointer closure);
-typedef void (*EBookSimpleQueryCallback) (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure);
-typedef void (*EBookHaveAddressCallback) (EBook *book, const gchar *addr, ECard *card, gpointer closure);
-
-gboolean e_book_load_local_address_book (EBook *book,
- EBookCallback open_response,
- gpointer closure);
-
-void e_book_use_local_address_book (EBookCommonCallback cb, 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);
-
-guint e_book_nickname_query (EBook *book,
- const char *nickname,
- EBookSimpleQueryCallback cb,
- gpointer closure);
-
-/* Returns the ECard associated to email in the callback,
- or NULL if no match is found in the local address book. */
-void e_book_query_address_locally (const gchar *email,
- EBookHaveAddressCallback 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 40e467ef93..0000000000
--- a/addressbook/backend/ebook/e-book-view-listener.c
+++ /dev/null
@@ -1,461 +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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 timeout_id;
-
- guint timeout_lock : 1;
- guint stopped : 1;
-};
-
-static gboolean
-e_book_view_listener_check_queue (EBookViewListener *listener)
-{
- if (listener->priv->timeout_lock)
- return TRUE;
-
- listener->priv->timeout_lock = TRUE;
-
- if (listener->priv->response_queue != NULL && !listener->priv->stopped) {
- gtk_signal_emit (GTK_OBJECT (listener), e_book_view_listener_signals [RESPONSES_QUEUED]);
- }
-
- if (listener->priv->response_queue == NULL || listener->priv->stopped) {
- listener->priv->timeout_id = 0;
- listener->priv->timeout_lock = FALSE;
- bonobo_object_unref (BONOBO_OBJECT (listener));
- return FALSE;
- }
-
- listener->priv->timeout_lock = FALSE;
- return TRUE;
-}
-
-static void
-e_book_view_listener_queue_response (EBookViewListener *listener,
- EBookViewListenerResponse *response)
-{
- if (response == NULL)
- return;
-
- if (listener->priv->stopped) {
- /* Free response and return */
- g_free (response->id);
- g_list_foreach (response->cards, (GFunc) gtk_object_unref, NULL);
- g_list_free (response->cards);
- g_free (response->message);
- g_free (response);
- return;
- }
-
- listener->priv->response_queue = g_list_append (listener->priv->response_queue, response);
-
- if (listener->priv->timeout_id == 0) {
-
- /* Here, 20 == an arbitrary small number */
- listener->priv->timeout_id = g_timeout_add (20, (GSourceFunc) e_book_view_listener_check_queue, listener);
-
- /* Hold a reference to the listener on behalf of the timeout */
- bonobo_object_ref (BONOBO_OBJECT (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");
- bonobo_object_unref (BONOBO_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->timeout_id = 0;
- listener->priv->timeout_lock = FALSE;
- listener->priv->stopped = FALSE;
-}
-
-void
-e_book_view_listener_stop (EBookViewListener *listener)
-{
- g_return_if_fail (E_IS_BOOK_VIEW_LISTENER (listener));
- listener->priv->stopped = TRUE;
-}
-
-static void
-e_book_view_listener_destroy (GtkObject *object)
-{
- EBookViewListener *listener = E_BOOK_VIEW_LISTENER (object);
- GList *l;
-
- /* Remove our response queue handler: In theory, this can never happen since we
- always hold a reference to the listener while the timeout is running. */
- if (listener->priv->timeout_id) {
- g_source_remove (listener->priv->timeout_id);
- }
-
- /* Clear out the queue */
- 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);
- resp->cards = NULL;
-
- g_free (resp->message);
- resp->message = NULL;
-
- g_free (resp);
- }
- g_list_free (listener->priv->response_queue);
-
- g_free (listener->priv);
- listener->priv = NULL;
-
- 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 d373872ad0..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 e56c7e90bc..0000000000
--- a/addressbook/backend/ebook/e-book-view.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * The Evolution addressbook client object.
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 1999, 2000, Ximian, 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"
-#include "e-book.h"
-
-GtkObjectClass *e_book_view_parent_class;
-
-struct _EBookViewPrivate {
- GNOME_Evolution_Addressbook_BookView corba_book_view;
-
- EBook *book;
-
- 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
-add_book_iterator (gpointer data, gpointer closure)
-{
- ECard *card = E_CARD (data);
- EBook *book = E_BOOK (closure);
-
- e_card_set_book (card, book);
-}
-
-static void
-e_book_view_do_added_event (EBookView *book_view,
- EBookViewListenerResponse *resp)
-{
- if (book_view->priv->book)
- g_list_foreach (resp->cards, add_book_iterator, book_view->priv->book);
-
- 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)
-{
- if (book_view->priv->book)
- g_list_foreach (resp->cards, add_book_iterator, book_view->priv->book);
-
- 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);
- break;
- }
-
- 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;
- 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);
-
- bonobo_object_ref(BONOBO_OBJECT(book_view->priv->listener));
-
- 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;
-}
-
-void
-e_book_view_set_book (EBookView *book_view, EBook *book)
-{
- g_return_if_fail (book_view && E_IS_BOOK_VIEW (book_view));
- g_return_if_fail (book && E_IS_BOOK (book));
- g_return_if_fail (book_view->priv->book == NULL);
-
- book_view->priv->book = book;
- gtk_object_ref (GTK_OBJECT (book));
-}
-
-static void
-e_book_view_init (EBookView *book_view)
-{
- book_view->priv = g_new0 (EBookViewPrivate, 1);
- book_view->priv->book = NULL;
- 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->book) {
- gtk_object_unref (GTK_OBJECT (book_view->priv->book));
- }
-
- 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 5e576d6642..0000000000
--- a/addressbook/backend/ebook/e-book-view.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * The Evolution addressbook client object.
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 1999, 2000, Ximian, 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 _EBook; /* Forward reference */
-
-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_set_book (EBookView *book_view, struct _EBook *book);
-
-#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 7c7738835c..0000000000
--- a/addressbook/backend/ebook/e-book.c
+++ /dev/null
@@ -1,1358 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * The Evolution addressbook client object.
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 1999, 2000, Ximian, 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;
-
- gchar *uri;
-};
-
-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 void
-e_book_op_free (EBookOp *op)
-{
- if (op->listener) {
- bonobo_object_unref (BONOBO_OBJECT (op->listener));
- op->listener = NULL;
- }
- g_free (op);
-}
-
-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;
-
- if (op->listener)
- bonobo_object_ref (BONOBO_OBJECT (op->listener));
-
- book->priv->pending_ops =
- g_list_append (book->priv->pending_ops, op);
-
- return op->tag;
-}
-
-/*
- * Local response queue management.
- */
-static void
-e_book_unqueue_op (EBook *book)
-{
- EBookOp *op;
- GList *removed;
-
- removed = g_list_last (book->priv->pending_ops);
-
- if (removed) {
- book->priv->pending_ops = g_list_remove_link (book->priv->pending_ops,
- removed);
- op = removed->data;
- e_book_op_free (op);
- g_list_free_1 (removed);
- book->priv->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);
- e_book_op_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);
-
- e_book_op_free (op);
-}
-
-static void
-e_book_do_response_get_vcard (EBook *book,
- EBookListenerResponse *resp)
-{
- EBookOp *op;
- ECard *card;
-
- op = e_book_pop_op (book);
-
- if (op == NULL) {
- g_warning ("e_book_do_response_get_vcard: Cannot find operation "
- "in local op queue!\n");
- return;
- }
- if (resp->vcard != NULL) {
-
- card = e_card_new(resp->vcard);
-
- if (card != NULL) {
- e_card_set_book (card, book);
- if (op->cb) {
- if (op->active)
- ((EBookCardCallback) op->cb) (book, resp->status, card, op->closure);
- else
- ((EBookCardCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- gtk_object_unref(GTK_OBJECT(card));
- } else {
- ((EBookCursorCallback) op->cb) (book, resp->status, NULL, op->closure);
- }
- } else {
- ((EBookCardCallback) op->cb) (book, resp->status, NULL, op->closure);
- }
-
- g_free (resp->vcard);
- e_book_op_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 (cursor != NULL) {
- 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));
- } else {
- ((EBookCursorCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- e_book_op_free (op);
-}
-
-static void
-e_book_do_response_get_view (EBook *book,
- EBookListenerResponse *resp)
-{
- CORBA_Environment ev;
- EBookOp *op;
- EBookView *book_view;
-
- op = e_book_pop_op (book);
-
- if (op == NULL) {
- g_warning ("e_book_do_response_get_view: Cannot find operation "
- "in local op queue!\n");
- return;
- }
-
- book_view = e_book_view_new (resp->book_view, op->listener);
-
- if (book_view != NULL) {
- e_book_view_set_book (book_view, book);
-
- /* 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));
- } else {
- e_book_view_listener_stop (op->listener);
- ((EBookBookViewCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- e_book_op_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 (book_view != NULL) {
- e_book_view_set_book (book_view, book);
-
- 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));
- } else {
- e_book_view_listener_stop (op->listener);
- ((EBookBookViewCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- e_book_op_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);
- e_book_op_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);
- }
-
- e_book_op_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 GetCardResponse:
- e_book_do_response_get_vcard (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;
- }
-
- g_free (book->priv->uri);
- book->priv->uri = g_strdup (uri);
-
- /*
- * 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);
-
- e_book_queue_op (book, open_response, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- book->priv->load_state = URILoading;
-
- /* 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);
-
- e_book_listener_stop (book->priv->listener);
- bonobo_object_unref (BONOBO_OBJECT (book->priv->listener));
-
- book->priv->listener = NULL;
- book->priv->load_state = URINotLoaded;
-}
-
-const char *
-e_book_get_uri (EBook *book)
-{
- g_return_val_if_fail (book && E_IS_BOOK (book), NULL);
-
- return book->priv->uri;
-}
-
-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;
- guint tag;
-
- CORBA_exception_init (&ev);
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_unload_uri: No URI is loaded!\n");
- return 0;
- }
-
- tag = e_book_queue_op (book, cb, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return tag;
-}
-
-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);
-
- e_book_queue_op (book, cb, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return;
- }
-
- CORBA_exception_free (&ev);
-}
-
-/* Fetching cards */
-
-/**
- * e_book_get_card:
- */
-guint
-e_book_get_card (EBook *book,
- const char *id,
- EBookCardCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
- guint tag;
-
- 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_card: No URI loaded!\n");
- return 0;
- }
-
- CORBA_exception_init (&ev);
-
- tag = e_book_queue_op (book, cb, closure, NULL);
-
- GNOME_Evolution_Addressbook_Book_getVCard (book->priv->corba_book, (const GNOME_Evolution_Addressbook_VCard) id, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_get_card: Exception "
- "getting card!\n");
- CORBA_exception_free (&ev);
- e_book_unqueue_op (book);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return tag;
-}
-
-/* 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);
-
- e_book_queue_op (book, cb, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- 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_assume_utf8 (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);
-
- if (card->book && card->book != book)
- gtk_object_unref (GTK_OBJECT (card->book));
- card->book = book;
- gtk_object_ref (GTK_OBJECT (card->book));
-
- 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);
-
- e_book_queue_op (book, (EBookCallback) cb, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- 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_assume_utf8 (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);
-
- if (card->book && card->book != book)
- gtk_object_unref (GTK_OBJECT (card->book));
- card->book = book;
- gtk_object_ref (GTK_OBJECT (card->book));
-
- 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);
-
- e_book_queue_op (book, cb, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- 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;
- guint tag;
-
- 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);
-
- tag = e_book_queue_op (book, cb, closure, NULL);
-
- 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);
- e_book_unqueue_op (book);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return tag;
-}
-
-guint
-e_book_get_book_view (EBook *book,
- const gchar *query,
- EBookBookViewCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
- EBookViewListener *listener;
- guint tag;
-
- 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);
-
- tag = e_book_queue_op (book, cb, closure, listener);
-
- 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);
- e_book_unqueue_op (book);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return tag;
-}
-
-guint
-e_book_get_changes (EBook *book,
- gchar *changeid,
- EBookBookViewCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
- EBookViewListener *listener;
- guint tag;
-
- 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);
-
- tag = e_book_queue_op (book, cb, closure, listener);
-
- 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);
- e_book_unqueue_op (book);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return tag;
-}
-
-/**
- * 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;
- book->priv->uri = NULL;
-}
-
-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->uri);
-
- 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 cf90c8c57d..0000000000
--- a/addressbook/backend/ebook/e-book.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * The Evolution addressbook client object.
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 1999, 2000, Ximian, 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 (*EBookCardCallback) (EBook *book, EBookStatus status, ECard *card, 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);
-
-const char *e_book_get_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. */
-guint e_book_get_card (EBook *book,
- const char *id,
- EBookCardCallback cb,
- gpointer closure);
-
-/* 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-compare.c b/addressbook/backend/ebook/e-card-compare.c
deleted file mode 100644
index 5cdc745dba..0000000000
--- a/addressbook/backend/ebook/e-card-compare.c
+++ /dev/null
@@ -1,631 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-card-compare.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 <gal/unicode/gunicode.h>
-#include "e-book-util.h"
-#include "e-card-compare.h"
-
-/* This is an "optimistic" combiner: the best of the two outcomes is
- selected. */
-static ECardMatchType
-combine_comparisons (ECardMatchType prev,
- ECardMatchType new_info)
-{
- if (new_info == E_CARD_MATCH_NOT_APPLICABLE)
- return prev;
- return (ECardMatchType) MAX ((gint) prev, (gint) new_info);
-}
-
-
-/*** Name comparisons ***/
-
-/* 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. */
-static gchar *name_synonyms[][2] = {
- { "jon", "john" }, /* Ah, the hacker's perogative */
- { "joseph", "joe" },
- { "robert", "bob" },
- { "richard", "dick" },
- { "william", "bill" },
- { "anthony", "tony" },
- { "michael", "mike" },
- { "eric", "erik" },
- { "elizabeth", "liz" },
- { "jeff", "geoff" },
- { "jeff", "geoffrey" },
- { "tom", "thomas" },
- { "dave", "david" },
- { "jim", "james" },
- { "abigal", "abby" },
- { "amanda", "amy" },
- { "amanda", "manda" },
- { "jennifer", "jenny" },
- { "rebecca", "becca" },
- { "rebecca", "becky" },
- { "anderson", "andersen" },
- /* We could go on and on... */
- { NULL, NULL }
-};
-
-static gboolean
-name_fragment_match (const gchar *a, const gchar *b)
-{
- gint i, len_a, len_b;
-
- /* This will cause "Chris" and "Christopher" to match. */
- len_a = g_utf8_strlen (a, -1);
- len_b = g_utf8_strlen (b, -1);
- if (!g_utf8_strncasecmp (a, b, MIN (len_a, len_b)))
- return TRUE;
-
- /* Check for nicknames. Yes, the linear search blows. */
- for (i=0; name_synonyms[i][0]; ++i) {
-
- if (!g_utf8_strcasecmp (name_synonyms[i][0], a)
- && !g_utf8_strcasecmp (name_synonyms[i][1], b))
- return TRUE;
-
- if (!g_utf8_strcasecmp (name_synonyms[i][0], b)
- && !g_utf8_strcasecmp (name_synonyms[i][1], a))
- return TRUE;
- }
-
- return FALSE;
-}
-
-ECardMatchType
-e_card_compare_name_to_string (ECard *card, const gchar *str)
-{
- gchar **namev, **givenv = NULL, **addv = NULL, **familyv = NULL;
- gboolean matched_given = FALSE, matched_additional = FALSE, matched_family = FALSE, mismatch = FALSE;
- ECardMatchType match_type;
- gint match_count = 0;
- gint i, j;
- gchar *str_cpy, *s;
-
- g_return_val_if_fail (E_IS_CARD (card), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (card->name != NULL, E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (str != NULL, E_CARD_MATCH_NOT_APPLICABLE);
-
- /* FIXME: utf-8 */
- str_cpy = s = g_strdup (str);
- while (*s) {
- if (*s == ',' || *s == '"')
- *s = ' ';
- ++s;
- }
- namev = g_strsplit (str_cpy, " ", 0);
- g_free (str_cpy);
-
- if (card->name->given)
- givenv = g_strsplit (card->name->given, " ", 0);
- if (card->name->additional)
- addv = g_strsplit (card->name->additional, " ", 0);
- if (card->name->family)
- familyv = g_strsplit (card->name->family, " ", 0);
-
- for (i = 0; namev[i] && !mismatch; ++i) {
-
- if (*namev[i]) {
-
- mismatch = TRUE;
-
- if (mismatch && givenv) {
- for (j = 0; givenv[j]; ++j) {
- if (name_fragment_match (givenv[j], namev[i])) {
- matched_given = TRUE;
- mismatch = FALSE;
- ++match_count;
- break;
- }
- }
- }
-
- if (mismatch && addv) {
- for (j = 0; addv[j]; ++j) {
- if (name_fragment_match (addv[j], namev[i])) {
- matched_additional = TRUE;
- mismatch = FALSE;
- ++match_count;
- break;
- }
- }
- }
-
- if (mismatch && familyv) {
- for (j = 0; familyv[j]; ++j) {
- if (!g_utf8_strcasecmp (familyv[j], namev[i])) {
- matched_family = TRUE;
- mismatch = FALSE;
- ++match_count;
- break;
- }
- }
- }
-
- }
- }
-
-
- match_type = E_CARD_MATCH_NONE;
- if (! mismatch) {
-
- switch ( (matched_family ? 1 : 0) + (matched_additional ? 1 : 0) + (matched_given ? 1 : 0)) {
-
- case 0:
- match_type = E_CARD_MATCH_NONE;
- break;
- case 1:
- match_type = E_CARD_MATCH_VAGUE;
- break;
- case 2:
- case 3:
- match_type = E_CARD_MATCH_PARTIAL;
- break;
- }
- }
-
- g_strfreev (namev);
- g_strfreev (givenv);
- g_strfreev (addv);
- g_strfreev (familyv);
-
- return match_type;
-}
-
-ECardMatchType
-e_card_compare_name (ECard *card1, ECard *card2)
-{
- ECardName *a, *b;
- gint matches=0, possible=0;
- gboolean given_match = FALSE, additional_match = FALSE, family_match = FALSE;
-
- g_return_val_if_fail (E_IS_CARD (card1), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (E_IS_CARD (card2), E_CARD_MATCH_NOT_APPLICABLE);
-
- a = card1->name;
- b = card2->name;
-
- if (a == NULL || b == NULL)
- return E_CARD_MATCH_NOT_APPLICABLE;
-
- if (a->given && b->given) {
- ++possible;
- if (name_fragment_match (a->given, b->given)) {
- ++matches;
- given_match = TRUE;
- }
- }
-
- if (a->additional && b->additional) {
- ++possible;
- if (name_fragment_match (a->additional, b->additional)) {
- ++matches;
- additional_match = TRUE;
- }
- }
-
- if (a->family && b->family) {
- ++possible;
- /* We don't allow "loose matching" (i.e. John vs. Jon) on family names */
- if (! g_utf8_strcasecmp (a->family, b->family)) {
- ++matches;
- family_match = TRUE;
- }
- }
-
- /* Now look at the # of matches and try to intelligently map
- an E_CARD_MATCH_* type to it. Special consideration is given
- to family-name matches. */
-
- if (possible == 0)
- return E_CARD_MATCH_NOT_APPLICABLE;
-
- if (possible == 1)
- return family_match ? E_CARD_MATCH_VAGUE : E_CARD_MATCH_NONE;
-
- if (possible == matches)
- return family_match ? E_CARD_MATCH_EXACT : E_CARD_MATCH_PARTIAL;
-
- if (possible == matches+1)
- return family_match ? E_CARD_MATCH_VAGUE : E_CARD_MATCH_NONE;
-
- return E_CARD_MATCH_NONE;
-}
-
-
-/*** Nickname Comparisons ***/
-
-ECardMatchType
-e_card_compare_nickname (ECard *card1, ECard *card2)
-{
- g_return_val_if_fail (card1 && E_IS_CARD (card1), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (card2 && E_IS_CARD (card2), E_CARD_MATCH_NOT_APPLICABLE);
-
- return E_CARD_MATCH_NOT_APPLICABLE;
-}
-
-
-
-/*** E-mail Comparisons ***/
-
-static gboolean
-match_email_username (const gchar *addr1, const gchar *addr2)
-{
- gint c1, c2;
- if (addr1 == NULL || addr2 == NULL)
- return FALSE;
-
- while (*addr1 && *addr2 && *addr1 != '@' && *addr2 != '@') {
- c1 = isupper (*addr1) ? tolower (*addr1) : *addr1;
- c2 = isupper (*addr2) ? tolower (*addr2) : *addr2;
- if (c1 != c2)
- return FALSE;
- ++addr1;
- ++addr2;
- }
-
- return *addr1 == *addr2;
-}
-
-static gboolean
-match_email_hostname (const gchar *addr1, const gchar *addr2)
-{
- gint c1, c2;
- gboolean seen_at1, seen_at2;
- if (addr1 == NULL || addr2 == NULL)
- return FALSE;
-
- /* Walk to the end of each string. */
- seen_at1 = FALSE;
- if (*addr1) {
- while (*addr1) {
- if (*addr1 == '@')
- seen_at1 = TRUE;
- ++addr1;
- }
- --addr1;
- }
-
- seen_at2 = FALSE;
- if (*addr2) {
- while (*addr2) {
- if (*addr2 == '@')
- seen_at2 = TRUE;
- ++addr2;
- }
- --addr2;
- }
-
- if (!seen_at1 && !seen_at2)
- return TRUE;
- if (!seen_at1 || !seen_at2)
- return FALSE;
-
- while (*addr1 != '@' && *addr2 != '@') {
- c1 = isupper (*addr1) ? tolower (*addr1) : *addr1;
- c2 = isupper (*addr2) ? tolower (*addr2) : *addr2;
- if (c1 != c2)
- return FALSE;
- --addr1;
- --addr2;
- }
-
- /* This will match bob@foo.ximian.com and bob@ximian.com */
- return *addr1 == '.' || *addr2 == '.';
-}
-
-static ECardMatchType
-compare_email_addresses (const gchar *addr1, const gchar *addr2)
-{
- if (addr1 == NULL || addr2 == NULL)
- return E_CARD_MATCH_NOT_APPLICABLE;
-
- if (match_email_username (addr1, addr2))
- return match_email_hostname (addr1, addr2) ? E_CARD_MATCH_EXACT : E_CARD_MATCH_PARTIAL;
-
- return E_CARD_MATCH_NONE;
-}
-
-ECardMatchType
-e_card_compare_email (ECard *card1, ECard *card2)
-{
- EIterator *i1, *i2;
- ECardMatchType match = E_CARD_MATCH_NOT_APPLICABLE;
-
- g_return_val_if_fail (card1 && E_IS_CARD (card1), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (card2 && E_IS_CARD (card2), E_CARD_MATCH_NOT_APPLICABLE);
-
- if (card1->email == NULL || card2->email == NULL)
- return E_CARD_MATCH_NOT_APPLICABLE;
-
- i1 = e_list_get_iterator (card1->email);
- i2 = e_list_get_iterator (card2->email);
-
- /* Do pairwise-comparisons on all of the e-mail addresses. If
- we find an exact match, there is no reason to keep
- checking. */
- e_iterator_reset (i1);
- while (e_iterator_is_valid (i1) && match != E_CARD_MATCH_EXACT) {
- const gchar *addr1 = (const gchar *) e_iterator_get (i1);
-
- e_iterator_reset (i2);
- while (e_iterator_is_valid (i2) && match != E_CARD_MATCH_EXACT) {
- const gchar *addr2 = (const gchar *) e_iterator_get (i2);
-
- match = combine_comparisons (match, compare_email_addresses (addr1, addr2));
-
- e_iterator_next (i2);
- }
-
- e_iterator_next (i1);
- }
-
- gtk_object_unref (GTK_OBJECT (i1));
- gtk_object_unref (GTK_OBJECT (i2));
-
- return match;
-}
-
-ECardMatchType
-e_card_compare_address (ECard *card1, ECard *card2)
-{
- g_return_val_if_fail (card1 && E_IS_CARD (card1), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (card2 && E_IS_CARD (card2), E_CARD_MATCH_NOT_APPLICABLE);
-
- /* Unimplemented */
-
- return E_CARD_MATCH_NOT_APPLICABLE;
-}
-
-ECardMatchType
-e_card_compare_telephone (ECard *card1, ECard *card2)
-{
- g_return_val_if_fail (card1 && E_IS_CARD (card1), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (card2 && E_IS_CARD (card2), E_CARD_MATCH_NOT_APPLICABLE);
-
- /* Unimplemented */
-
- return E_CARD_MATCH_NOT_APPLICABLE;
-}
-
-ECardMatchType
-e_card_compare (ECard *card1, ECard *card2)
-{
- ECardMatchType result;
-
- g_return_val_if_fail (card1 && E_IS_CARD (card1), E_CARD_MATCH_NOT_APPLICABLE);
- g_return_val_if_fail (card2 && E_IS_CARD (card2), E_CARD_MATCH_NOT_APPLICABLE);
-
- result = E_CARD_MATCH_NONE;
- result = combine_comparisons (result, e_card_compare_name (card1, card2));
- result = combine_comparisons (result, e_card_compare_nickname (card1, card2));
- result = combine_comparisons (result, e_card_compare_email (card1, card2));
- result = combine_comparisons (result, e_card_compare_address (card1, card2));
- result = combine_comparisons (result, e_card_compare_telephone (card1, card2));
-
- return result;
-}
-
-typedef struct _MatchSearchInfo MatchSearchInfo;
-struct _MatchSearchInfo {
- ECard *card;
- GList *avoid;
- ECardMatchQueryCallback cb;
- gpointer closure;
-};
-
-static void
-match_search_info_free (MatchSearchInfo *info)
-{
- if (info) {
- gtk_object_unref (GTK_OBJECT (info->card));
-
- /* This should already have been deallocated, but just in case... */
- if (info->avoid) {
- g_list_foreach (info->avoid, (GFunc) gtk_object_unref, NULL);
- g_list_free (info->avoid);
- info->avoid = NULL;
- }
-
- g_free (info);
- }
-}
-
-static void
-simple_query_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- MatchSearchInfo *info = (MatchSearchInfo *) closure;
- ECardMatchType best_match = E_CARD_MATCH_NONE;
- ECard *best_card = NULL;
- GList *remaining_cards = NULL;
- const GList *i;
-
- if (status != E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS) {
- info->cb (info->card, NULL, E_CARD_MATCH_NONE, info->closure);
- match_search_info_free (info);
- return;
- }
-
- /* remove the cards we're to avoid from the list, if they're present */
- for (i = cards; i != NULL; i = g_list_next (i)) {
- ECard *this_card = E_CARD (i->data);
- GList *iterator;
- gboolean avoid = FALSE;
- for (iterator = info->avoid; iterator; iterator = iterator->next) {
- if (!strcmp (e_card_get_id (iterator->data), e_card_get_id (this_card))) {
- avoid = TRUE;
- break;
- }
- }
- if (!avoid)
- remaining_cards = g_list_prepend (remaining_cards, this_card);
- }
-
- remaining_cards = g_list_reverse (remaining_cards);
-
- for (i = remaining_cards; i != NULL; i = g_list_next (i)) {
- ECard *this_card = E_CARD (i->data);
- ECardMatchType this_match = e_card_compare (info->card, this_card);
- if ((gint)this_match > (gint)best_match) {
- best_match = this_match;
- best_card = this_card;
- }
- }
-
- g_list_free (remaining_cards);
-
- info->cb (info->card, best_card, best_match, info->closure);
- match_search_info_free (info);
-}
-
-#define MAX_QUERY_PARTS 10
-static void
-use_common_book_cb (EBook *book, gpointer closure)
-{
- MatchSearchInfo *info = (MatchSearchInfo *) closure;
- ECard *card = info->card;
- gchar *query_parts[MAX_QUERY_PARTS];
- gint p=0;
- gchar *query, *qj;
- int i;
-
- if (book == NULL) {
- info->cb (info->card, NULL, E_CARD_MATCH_NONE, info->closure);
- match_search_info_free (info);
- return;
- }
-
- if (card->nickname)
- query_parts[p++] = g_strdup_printf ("(beginswith \"nickname\" \"%s\")", card->nickname);
-
-
- if (card->name->given && strlen (card->name->given) > 1)
- query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", card->name->given);
-
- if (card->name->additional && strlen (card->name->additional) > 1)
- query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", card->name->additional);
-
- if (card->name->family && strlen (card->name->family) > 1)
- query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", card->name->family);
-
-
- if (card->email) {
- EIterator *iter = e_list_get_iterator (card->email);
- while (e_iterator_is_valid (iter) && p < MAX_QUERY_PARTS) {
- gchar *addr = g_strdup (e_iterator_get (iter));
- if (addr) {
- gchar *s = addr;
- while (*s) {
- if (*s == '@') {
- *s = '\0';
- break;
- }
- ++s;
- }
- query_parts[p++] = g_strdup_printf ("(beginswith \"email\" \"%s\")", addr);
- g_free (addr);
- }
- e_iterator_next (iter);
- }
- }
-
-
-
- /* Build up our full query from the parts. */
- query_parts[p] = NULL;
- qj = g_strjoinv (" ", query_parts);
- for(i = 0; query_parts[i] != NULL; i++)
- g_free(query_parts[i]);
- if (p > 0) {
- query = g_strdup_printf ("(or %s)", qj);
- g_free (qj);
- } else {
- query = qj;
- }
-
- e_book_simple_query (book, query, simple_query_cb, info);
-
- g_free (query);
-}
-
-void
-e_card_locate_match (ECard *card, ECardMatchQueryCallback cb, gpointer closure)
-{
- MatchSearchInfo *info;
-
- g_return_if_fail (card && E_IS_CARD (card));
- g_return_if_fail (cb != NULL);
-
- info = g_new (MatchSearchInfo, 1);
- info->card = card;
- gtk_object_ref (GTK_OBJECT (card));
- info->cb = cb;
- info->closure = closure;
- info->avoid = NULL;
-
- e_book_use_local_address_book (use_common_book_cb, info);
-}
-
-/**
- * e_card_locate_match_full:
- * @book: The book to look in. If this is NULL, use the main local
- * addressbook.
- * @card: The card to compare to.
- * @avoid: A list of cards to not match. These will not show up in the search.
- * @cb: The function to call.
- * @closure: The closure to add to the call.
- *
- * Look for the best match and return it using the ECardMatchQueryCallback.
- **/
-void
-e_card_locate_match_full (EBook *book, ECard *card, GList *avoid, ECardMatchQueryCallback cb, gpointer closure)
-{
- MatchSearchInfo *info;
-
- g_return_if_fail (card && E_IS_CARD (card));
- g_return_if_fail (cb != NULL);
-
- info = g_new (MatchSearchInfo, 1);
- info->card = card;
- gtk_object_ref (GTK_OBJECT (card));
- info->cb = cb;
- info->closure = closure;
- info->avoid = g_list_copy (avoid);
- g_list_foreach (info->avoid, (GFunc) gtk_object_ref, NULL);
-
- if (book)
- use_common_book_cb (book, info);
- else
- e_book_use_local_address_book (use_common_book_cb, info);
-}
-
diff --git a/addressbook/backend/ebook/e-card-compare.h b/addressbook/backend/ebook/e-card-compare.h
deleted file mode 100644
index 56d7b6e1f5..0000000000
--- a/addressbook/backend/ebook/e-card-compare.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-card-compare.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_CARD_COMPARE_H__
-#define __E_CARD_COMPARE_H__
-
-#include "e-book.h"
-#include "e-card.h"
-
-typedef enum {
- E_CARD_MATCH_NOT_APPLICABLE = 0,
- E_CARD_MATCH_NONE = 1,
- E_CARD_MATCH_VAGUE = 2,
- E_CARD_MATCH_PARTIAL = 3,
- E_CARD_MATCH_EXACT = 4
-} ECardMatchType;
-
-typedef void (*ECardMatchQueryCallback) (ECard *card, ECard *match, ECardMatchType type, gpointer closure);
-
-ECardMatchType e_card_compare_name_to_string (ECard *card, const gchar *str);
-
-ECardMatchType e_card_compare_name (ECard *card1, ECard *card2);
-ECardMatchType e_card_compare_nickname (ECard *card1, ECard *card2);
-ECardMatchType e_card_compare_email (ECard *card1, ECard *card2);
-ECardMatchType e_card_compare_address (ECard *card1, ECard *card2);
-ECardMatchType e_card_compare_telephone (ECard *card1, ECard *card2);
-
-ECardMatchType e_card_compare (ECard *card1, ECard *card2);
-
-void e_card_locate_match (ECard *card, ECardMatchQueryCallback cb, gpointer closure);
-void e_card_locate_match_full (EBook *book, ECard *card, GList *avoid, ECardMatchQueryCallback cb, gpointer closure);
-
-
-
-#endif /* __E_CARD_COMPARE_H__ */
-
diff --git a/addressbook/backend/ebook/e-card-cursor.c b/addressbook/backend/ebook/e-card-cursor.c
deleted file mode 100644
index 171f83d736..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@ximian.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 e042268635..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 1dac48d86d..0000000000
--- a/addressbook/backend/ebook/e-card-simple.c
+++ /dev/null
@@ -1,1205 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Arturo Espinosa (arturo@nuclecu.unam.mx)
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright (C) 2000 Ximian, 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 <e-util/e-unicode-i18n.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", N_("File As"), "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", N_("Name"), N_("Name"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_EMAIL, "email", N_("Email"), N_("Email"), E_CARD_SIMPLE_EMAIL_ID_EMAIL, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL },
- { E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "primary_phone", N_("Primary"), N_("Prim"), E_CARD_SIMPLE_PHONE_ID_PRIMARY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT, "assistant_phone", N_("Assistant"), N_("Assistant"),E_CARD_SIMPLE_PHONE_ID_ASSISTANT, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "business_phone", N_("Business"), N_("Bus"), E_CARD_SIMPLE_PHONE_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_CALLBACK, "callback_phone", N_("Callback"), N_("Callback"), E_CARD_SIMPLE_PHONE_ID_CALLBACK, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_COMPANY, "company_phone", N_("Company"), N_("Comp"), E_CARD_SIMPLE_PHONE_ID_COMPANY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_HOME, "home_phone", N_("Home"), N_("Home"), E_CARD_SIMPLE_PHONE_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_ORG, "org", N_("Organization"), N_("Org"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "business_address",N_("Business"), N_("Bus"), E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "home_address", N_("Home"), N_("Home"), E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "mobile_phone", N_("Mobile"), N_("Mobile"), E_CARD_SIMPLE_PHONE_ID_MOBILE, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_CAR, "car_phone", N_("Car"), N_("Car"), E_CARD_SIMPLE_PHONE_ID_CAR, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "business_fax", N_("Business Fax"), N_("Bus Fax"), E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, "home_fax", N_("Home Fax"), N_("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",N_("Business 2"), N_("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", N_("Home 2"), N_("Home 2"), E_CARD_SIMPLE_PHONE_ID_HOME_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_ISDN, "isdn", N_("ISDN"), N_("ISDN"), E_CARD_SIMPLE_PHONE_ID_ISDN, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_OTHER, "other_phone", N_("Other"), N_("Other"), E_CARD_SIMPLE_PHONE_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_OTHER_FAX, "other_fax", N_("Other Fax"), N_("Other Fax"), E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_PAGER, "pager", N_("Pager"), N_("Pager"), E_CARD_SIMPLE_PHONE_ID_PAGER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_RADIO, "radio", N_("Radio"), N_("Radio"), E_CARD_SIMPLE_PHONE_ID_RADIO, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_TELEX, "telex", N_("Telex"), N_("Telex"), E_CARD_SIMPLE_PHONE_ID_TELEX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_TTYTTD, "tty", N_("TTY"), N_("TTY"), E_CARD_SIMPLE_PHONE_ID_TTYTTD, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, "other_address", N_("Other"), N_("Other"), E_CARD_SIMPLE_ADDRESS_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_EMAIL_2, "email_2", N_("Email 2"), N_("Email 2"), E_CARD_SIMPLE_EMAIL_ID_EMAIL_2, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL },
- { E_CARD_SIMPLE_FIELD_EMAIL_3, "email_3", N_("Email 3"), N_("Email 3"), E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL },
- { E_CARD_SIMPLE_FIELD_URL, "url", N_("Web Site"), N_("Url"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_ORG_UNIT, "org_unit", N_("Department"), N_("Dep"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_OFFICE, "office", N_("Office"), N_("Off"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_TITLE, "title", N_("Title"), N_("Title"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_ROLE, "role", N_("Profession"), N_("Prof"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_MANAGER, "manager", N_("Manager"), N_("Man"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_ASSISTANT, "assistant", N_("Assistant"), N_("Ass"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_NICKNAME, "nickname", N_("Nickname"), N_("Nick"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_SPOUSE, "spouse", N_("Spouse"), N_("Spouse"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_NOTE, "note", N_("Note"), N_("Note"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_CALURI, "caluri", N_("Calendar URI"), N_("CALUri"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_FBURL, "fburl", N_("Free-busy URL"), N_("FBUrl"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_ANNIVERSARY, "anniversary", N_("Anniversary"), N_("Anniv"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE },
- { E_CARD_SIMPLE_FIELD_BIRTH_DATE, "birth_date", N_("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", N_("Categories"), N_("Categories"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
- { E_CARD_SIMPLE_FIELD_FAMILY_NAME, "family_name", N_("Family Name"), N_("Family Name"), 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
- { E_CARD_SIMPLE_FIELD_GIVEN_NAME, "given_name", "Given Name", "Given Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
- { E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME, "additional_name", "Additional Name", "Additional Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
- { E_CARD_SIMPLE_FIELD_NAME_SUFFIX, "name_suffix", "Name Suffix", "Name Suffix", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
-};
-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[] = {
- E_CARD_PHONE_ASSISTANT, /* 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, */
- E_CARD_PHONE_CALLBACK, /* E_CARD_SIMPLE_PHONE_ID_CALLBACK, */
- E_CARD_PHONE_CAR, /* E_CARD_SIMPLE_PHONE_ID_CAR, */
- E_CARD_PHONE_WORK, /* E_CARD_SIMPLE_PHONE_ID_COMPANY, */
- E_CARD_PHONE_HOME, /* E_CARD_SIMPLE_PHONE_ID_HOME, */
- E_CARD_PHONE_HOME, /* 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_SIMPLE_PHONE_ID_MOBILE, */
- E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_OTHER, */
- E_CARD_PHONE_FAX, /* E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, */
- E_CARD_PHONE_PAGER, /* E_CARD_SIMPLE_PHONE_ID_PAGER, */
- E_CARD_PHONE_PREF, /* E_CARD_SIMPLE_PHONE_ID_PRIMARY, */
- E_CARD_PHONE_RADIO, /* E_CARD_SIMPLE_PHONE_ID_RADIO, */
- E_CARD_PHONE_TELEX, /* E_CARD_SIMPLE_PHONE_ID_TELEX, */
- E_CARD_PHONE_TTYTDD, /* 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)
-{
- ECard *card = simple->card ? e_card_duplicate (simple->card) : e_card_new ("");
- ECardSimple *new_simple = e_card_simple_new(card);
- 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.
- */
-const 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("");
-}
-
-/**
- * e_card_simple_get_vcard_assume_utf8:
- * @simple: an #ECardSimple
- *
- * Returns: a string in vcard format, which is wrapped by the @simple.
- */
-char *
-e_card_simple_get_vcard_assume_utf8 (ECardSimple *simple)
-{
- if (simple->card)
- return e_card_get_vcard_assume_utf8(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++)
- e_card_phone_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++)
- e_card_address_label_free(simple->address[i]);
- for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++)
- e_card_delivery_address_free(simple->delivery[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);
- GTK_VALUE_OBJECT (*arg) = (GtkObject *) simple->card;
- 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;
-
- simple->changed = TRUE;
-}
-
-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)) {
- gboolean found = FALSE;
- phone = e_iterator_get(iterator);
- for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) {
- if ((phone->flags == phone_correspondences[i]) && (simple->phone[i] == NULL)) {
- simple->phone[i] = e_card_phone_copy(phone);
- found = TRUE;
- break;
- }
- }
- if (found)
- continue;
- 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));
- e_card_free_empty_lists (card);
- }
-}
-
-void
-e_card_simple_sync_card(ECardSimple *simple)
-{
- ECard *card = simple->card;
- if (card && simple->changed) {
- 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;
-
- 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); e_iterator_next(iterator) ) {
- int i;
- gboolean found = FALSE;
- phone = e_iterator_get(iterator);
- for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) {
- if (phone->flags == 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);
- }
- e_card_phone_free(simple->phone[i]);
- simple->phone[i] = NULL;
- found = TRUE;
- break;
- }
- }
- }
- if (found)
- continue;
- 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);
- }
- 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); e_iterator_next(iterator) ) {
- int i;
- email = e_iterator_get(iterator);
- 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);
- }
- 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); e_iterator_next(iterator) ) {
- int i;
- 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]) {
- 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);
- }
- 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); e_iterator_next(iterator) ) {
- int i;
- 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]) {
- 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);
- }
- 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);
- e_card_free_empty_lists (card);
- }
-
- simple->changed = FALSE;
-}
-
-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);
- simple->changed = TRUE;
-}
-
-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);
- simple->changed = TRUE;
-}
-
-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]);
- simple->changed = TRUE;
-}
-
-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);
- simple->changed = TRUE;
-}
-
-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:
- if (simple->card) {
- gtk_object_get(GTK_OBJECT(simple->card),
- field_data[field].ecard_field, &string,
- NULL);
- return g_strdup(string);
- } else
- return NULL;
- case E_CARD_SIMPLE_INTERNAL_TYPE_DATE:
- if (simple->card) {
- gtk_object_get(GTK_OBJECT(simple->card),
- field_data[field].ecard_field, &date,
- NULL);
- return NULL; /* FIXME!!!! */
- } else
- return NULL;
- 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:
- if (simple->card) {
- gtk_object_get(GTK_OBJECT(simple->card),
- "file_as", &string,
- NULL);
- if (string && *string)
- return g_strdup(string);
- 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);
- } else
- return NULL;
- case E_CARD_SIMPLE_FIELD_FAMILY_NAME:
- if (simple->card) {
- gtk_object_get (GTK_OBJECT(simple->card),
- "name", &name,
- NULL);
- return g_strdup (name->family);
- } else
- return NULL;
- case E_CARD_SIMPLE_FIELD_GIVEN_NAME:
- if (simple->card) {
- gtk_object_get (GTK_OBJECT(simple->card),
- "name", &name,
- NULL);
- return g_strdup (name->given);
- } else
- return NULL;
- case E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME:
- if (simple->card) {
- gtk_object_get (GTK_OBJECT(simple->card),
- "name", &name,
- NULL);
- return g_strdup (name->additional);
- } else
- return NULL;
- case E_CARD_SIMPLE_FIELD_NAME_SUFFIX:
- if (simple->card) {
- gtk_object_get (GTK_OBJECT(simple->card),
- "name", &name,
- NULL);
- return g_strdup (name->suffix);
- } else
- return NULL;
- 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;
- simple->changed = TRUE;
- 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 U_(field_data[field].name);
-}
-
-const char *e_card_simple_get_short_name (ECardSimple *simple,
- ECardSimpleField field)
-{
- return U_(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);
- }
- e_card_free_empty_lists (simple->card);
- }
-}
-
-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;
- }
- e_card_free_empty_lists (simple->card);
- }
- 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;
-
- simple->changed = TRUE;
- 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 0d353f00da..0000000000
--- a/addressbook/backend/ebook/e-card-simple.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Arturo Espinosa
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright (C) 2000 Ximian, 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_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_CALURI,
- 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_FAMILY_NAME,
- E_CARD_SIMPLE_FIELD_GIVEN_NAME,
- E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME,
- E_CARD_SIMPLE_FIELD_NAME_SUFFIX,
- 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];
-
- gboolean changed;
-};
-
-struct _ECardSimpleClass {
- GtkObjectClass parent_class;
-};
-
-typedef void (*ECardSimpleArbitraryCallback) (const ECardArbitrary *arbitrary, gpointer closure);
-ECardSimple *e_card_simple_new (ECard *card);
-const 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);
-char *e_card_simple_get_vcard_assume_utf8 (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 13854c30e7..0000000000
--- a/addressbook/backend/ebook/e-card-types.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Arturo Espinosa
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright (C) 2000 Ximian, 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,
- E_CARD_PHONE_ASSISTANT = 1 << 13,
- E_CARD_PHONE_CALLBACK = 1 << 14,
- E_CARD_PHONE_RADIO = 1 << 15,
- E_CARD_PHONE_TELEX = 1 << 16,
- E_CARD_PHONE_TTYTDD = 1 << 17,
-} 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 1b3ef694b6..0000000000
--- a/addressbook/backend/ebook/e-card.c
+++ /dev/null
@@ -1,4210 +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@ximian.com)
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#include <config.h>
-
-#include "e-card.h"
-
-#include <gal/util/e-i18n.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <math.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-book.h"
-#include "e-destination.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"
-#define XEV_LIST "X-EVOLUTION-LIST"
-#define XEV_LIST_SHOW_ADDRESSES "X-EVOLUTION-LIST-SHOW_ADDRESSES"
-#define XEV_RELATED_CONTACTS "X-EVOLUTION-RELATED_CONTACTS"
-
-/* 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_CALURI,
- ARG_FBURL,
- ARG_NOTE,
- ARG_RELATED_CONTACTS,
- ARG_CATEGORIES,
- ARG_CATEGORY_LIST,
- ARG_WANTS_HTML,
- ARG_WANTS_HTML_SET,
- ARG_EVOLUTION_LIST,
- ARG_EVOLUTION_LIST_SHOW_ADDRESSES,
- ARG_ARBITRARY,
- ARG_ID,
- ARG_LAST_USE,
- ARG_USE_SCORE,
-};
-
-#if 0
-static VObject *card_convert_to_vobject (ECard *crd);
-#endif
-static void parse(ECard *card, VObject *vobj, char *default_charset);
-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 *default_charset, char **string);
-
-char *e_v_object_get_child_value(VObject *vobj, char *name, char *default_charset);
-static ECardDate e_card_date_from_string (char *str);
-
-static void parse_bday(ECard *card, VObject *object, char *default_charset);
-static void parse_full_name(ECard *card, VObject *object, char *default_charset);
-static void parse_file_as(ECard *card, VObject *object, char *default_charset);
-static void parse_name(ECard *card, VObject *object, char *default_charset);
-static void parse_email(ECard *card, VObject *object, char *default_charset);
-static void parse_phone(ECard *card, VObject *object, char *default_charset);
-static void parse_address(ECard *card, VObject *object, char *default_charset);
-static void parse_address_label(ECard *card, VObject *object, char *default_charset);
-static void parse_url(ECard *card, VObject *object, char *default_charset);
-static void parse_org(ECard *card, VObject *object, char *default_charset);
-static void parse_office(ECard *card, VObject *object, char *default_charset);
-static void parse_title(ECard *card, VObject *object, char *default_charset);
-static void parse_role(ECard *card, VObject *object, char *default_charset);
-static void parse_manager(ECard *card, VObject *object, char *default_charset);
-static void parse_assistant(ECard *card, VObject *object, char *default_charset);
-static void parse_nickname(ECard *card, VObject *object, char *default_charset);
-static void parse_spouse(ECard *card, VObject *object, char *default_charset);
-static void parse_anniversary(ECard *card, VObject *object, char *default_charset);
-static void parse_mailer(ECard *card, VObject *object, char *default_charset);
-static void parse_caluri(ECard *card, VObject *object, char *default_charset);
-static void parse_fburl(ECard *card, VObject *object, char *default_charset);
-static void parse_note(ECard *card, VObject *object, char *default_charset);
-static void parse_related_contacts(ECard *card, VObject *object, char *default_charset);
-static void parse_categories(ECard *card, VObject *object, char *default_charset);
-static void parse_wants_html(ECard *card, VObject *object, char *default_charset);
-static void parse_list(ECard *card, VObject *object, char *default_charset);
-static void parse_list_show_addresses(ECard *card, VObject *object, char *default_charset);
-static void parse_arbitrary(ECard *card, VObject *object, char *default_charset);
-static void parse_id(ECard *card, VObject *object, char *default_charset);
-static void parse_last_use(ECard *card, VObject *object, char *default_charset);
-static void parse_use_score(ECard *card, VObject *object, char *default_charset);
-
-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, char *default_charset);
-
-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 },
- { "CALURI", parse_caluri },
- { "FBURL", parse_fburl },
- { VCNoteProp, parse_note },
- { XEV_RELATED_CONTACTS, parse_related_contacts },
- { "CATEGORIES", parse_categories },
- { XEV_WANTS_HTML, parse_wants_html },
- { XEV_ARBITRARY, parse_arbitrary },
- { VCUniqueStringProp, parse_id },
- { "X-EVOLUTION-LAST-USE", parse_last_use },
- { "X-EVOLUTION-USE-SCORE", parse_use_score },
- { XEV_LIST, parse_list },
- { XEV_LIST_SHOW_ADDRESSES, parse_list_show_addresses },
- { 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;
-}
-
-ECard *
-e_card_new_with_default_charset (char *vcard, char *default_charset)
-{
- 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, default_charset);
- 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;
-}
-
-/**
- * e_card_new:
- * @vcard: a string in vCard format
- *
- * Returns: a new #ECard that wraps the @vcard.
- */
-ECard *
-e_card_new (char *vcard)
-{
- return e_card_new_with_default_charset (vcard, "UTF-8");
-}
-
-ECard *
-e_card_duplicate(ECard *card)
-{
- char *vcard = e_card_get_vcard_assume_utf8(card);
- ECard *new_card = e_card_new(vcard);
- g_free (vcard);
-
- if (card->book) {
- new_card->book = card->book;
- gtk_object_ref (GTK_OBJECT (new_card->book));
- }
-
- return new_card;
-}
-
-static void
-e_card_get_today (GDate *dt)
-{
- time_t now;
- struct tm *now_tm;
- if (dt == NULL)
- return;
-
- time (&now);
- now_tm = localtime (&now);
-
- g_date_set_dmy (dt, now_tm->tm_mday, now_tm->tm_mon + 1, now_tm->tm_year + 1900);
-}
-
-float
-e_card_get_use_score(ECard *card)
-{
- GDate today, last_use;
- gint days_since_last_use;
-
- g_return_val_if_fail (card != NULL && E_IS_CARD (card), 0);
-
- if (card->last_use == NULL)
- return 0.0;
-
- e_card_get_today (&today);
- g_date_set_dmy (&last_use, card->last_use->day, card->last_use->month, card->last_use->year);
-
- days_since_last_use = g_date_julian (&today) - g_date_julian (&last_use);
-
- /* Apply a seven-day "grace period" to the use score decay. */
- days_since_last_use -= 7;
- if (days_since_last_use < 0)
- days_since_last_use = 0;
-
- return MAX (card->raw_use_score, 0) * exp (- days_since_last_use / 30.0);
-}
-
-void
-e_card_touch(ECard *card)
-{
- GDate today;
- double use_score;
-
- g_return_if_fail (card != NULL && E_IS_CARD (card));
-
- e_card_get_today (&today);
- use_score = e_card_get_use_score (card);
-
- if (card->last_use == NULL)
- card->last_use = g_new (ECardDate, 1);
-
- card->last_use->day = g_date_day (&today);
- card->last_use->month = g_date_month (&today);
- card->last_use->year = g_date_year (&today);
-
- card->raw_use_score = use_score + 1.0;
-}
-
-/**
- * e_card_get_id:
- * @card: an #ECard
- *
- * Returns: a string representing the id of the card, which is unique
- * within its book.
- */
-const char *
-e_card_get_id (ECard *card)
-{
- g_return_val_if_fail (card && E_IS_CARD (card), NULL);
-
- 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)
-{
- g_return_if_fail (card && E_IS_CARD (card));
-
- if ( card->id )
- g_free(card->id);
- card->id = g_strdup(id);
-}
-
-EBook *
-e_card_get_book (ECard *card)
-{
- g_return_val_if_fail (card && E_IS_CARD (card), NULL);
-
- return card->book;
-}
-
-void
-e_card_set_book (ECard *card, EBook *book)
-{
- g_return_if_fail (card && E_IS_CARD (card));
-
- if (card->book)
- gtk_object_unref (GTK_OBJECT (card->book));
- card->book = book;
- if (card->book)
- gtk_object_ref (GTK_OBJECT (card->book));
-}
-
-static gchar *
-e_card_date_to_string (ECardDate *dt)
-{
- if (dt)
- return g_strdup_printf ("%04d-%02d-%02d",
- CLAMP(dt->year, 1000, 9999),
- CLAMP(dt->month, 1, 12),
- CLAMP(dt->day, 1, 31));
- else
- return NULL;
-}
-
-static VObject *
-addPropValueUTF8(VObject *o, const char *p, const char *v)
-{
- VObject *prop = addPropValue (o, p, v);
- if (!e_utf8_is_ascii (v))
- addPropValue (prop, "CHARSET", "UTF-8");
- return prop;
-}
-
-#define ADD_PROP_VALUE(o, p, v) (assumeUTF8 ? (addPropValue ((o), (p), (v))) : addPropValueUTF8 ((o), (p), (v)))
-#define ADD_PROP_VALUE_SET_IS_ASCII(o, p, v) (addPropValue ((o), (p), (v)), is_ascii = is_ascii && e_utf8_is_ascii ((v)))
-
-static VObject *
-e_card_get_vobject (ECard *card, gboolean assumeUTF8)
-{
- VObject *vobj;
-
- vobj = newVObject (VCCardProp);
-
- if ( card->file_as && *card->file_as )
- ADD_PROP_VALUE(vobj, "X-EVOLUTION-FILE-AS", card->file_as);
- else if (card->file_as)
- addProp(vobj, "X-EVOLUTION-FILE_AS");
-
- if ( card->fname )
- ADD_PROP_VALUE(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;
- gboolean is_ascii = TRUE;
- nameprop = addProp(vobj, VCNameProp);
- if ( card->name->prefix )
- ADD_PROP_VALUE_SET_IS_ASCII(nameprop, VCNamePrefixesProp, card->name->prefix);
- if ( card->name->given )
- ADD_PROP_VALUE_SET_IS_ASCII(nameprop, VCGivenNameProp, card->name->given);
- if ( card->name->additional )
- ADD_PROP_VALUE_SET_IS_ASCII(nameprop, VCAdditionalNamesProp, card->name->additional);
- if ( card->name->family )
- ADD_PROP_VALUE_SET_IS_ASCII(nameprop, VCFamilyNameProp, card->name->family);
- if ( card->name->suffix )
- ADD_PROP_VALUE_SET_IS_ASCII(nameprop, VCNameSuffixesProp, card->name->suffix);
- if (!(is_ascii || assumeUTF8))
- addPropValue (nameprop, "CHARSET", "UTF-8");
- }
- 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);
- gboolean is_ascii = TRUE;
-
- addressprop = addProp(vobj, VCAdrProp);
-
- set_address_flags (addressprop, address->flags);
- if ( address->po )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCPostalBoxProp, address->po);
- if ( address->ext )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCExtAddressProp, address->ext);
- if ( address->street )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCStreetAddressProp, address->street);
- if ( address->city )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCCityProp, address->city);
- if ( address->region )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCRegionProp, address->region);
- if ( address->code )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCPostalCodeProp, address->code);
- if ( address->country )
- ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCCountryNameProp, address->country);
- addProp(addressprop, VCQuotedPrintableProp);
- if (!(is_ascii || assumeUTF8))
- addPropValue (addressprop, "CHARSET", "UTF-8");
- }
- 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 = ADD_PROP_VALUE(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 = ADD_PROP_VALUE(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 = ADD_PROP_VALUE(vobj, VCEmailAddressProp, (char *) e_iterator_get(iterator));
- addProp (emailprop, VCInternetProp);
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- }
-
- if ( card->bday ) {
- char *value;
- value = e_card_date_to_string (card->bday);
- ADD_PROP_VALUE(vobj, VCBirthDateProp, value);
- g_free(value);
- }
-
- if (card->url)
- ADD_PROP_VALUE(vobj, VCURLProp, card->url);
-
- if (card->org || card->org_unit) {
- VObject *orgprop;
- gboolean is_ascii = TRUE;
- orgprop = addProp(vobj, VCOrgProp);
-
- if (card->org)
- ADD_PROP_VALUE_SET_IS_ASCII(orgprop, VCOrgNameProp, card->org);
- if (card->org_unit)
- ADD_PROP_VALUE_SET_IS_ASCII(orgprop, VCOrgUnitProp, card->org_unit);
- if (!(is_ascii || assumeUTF8))
- addPropValue (orgprop, "CHARSET", "UTF-8");
- }
-
- if (card->office)
- ADD_PROP_VALUE(vobj, "X-EVOLUTION-OFFICE", card->office);
-
- if (card->title)
- ADD_PROP_VALUE(vobj, VCTitleProp, card->title);
-
- if (card->role)
- ADD_PROP_VALUE(vobj, VCBusinessRoleProp, card->role);
-
- if (card->manager)
- ADD_PROP_VALUE(vobj, "X-EVOLUTION-MANAGER", card->manager);
-
- if (card->assistant)
- ADD_PROP_VALUE(vobj, "X-EVOLUTION-ASSISTANT", card->assistant);
-
- if (card->nickname)
- ADD_PROP_VALUE(vobj, "NICKNAME", card->nickname);
-
- if (card->spouse)
- ADD_PROP_VALUE(vobj, "X-EVOLUTION-SPOUSE", card->spouse);
-
- if ( card->anniversary ) {
- char *value;
- value = e_card_date_to_string (card->anniversary);
- ADD_PROP_VALUE(vobj, "X-EVOLUTION-ANNIVERSARY", value);
- g_free(value);
- }
-
- if (card->mailer) {
- ADD_PROP_VALUE(vobj, VCMailerProp, card->mailer);
- }
-
- if (card->caluri)
- addPropValue(vobj, "CALURI", card->caluri);
-
- if (card->fburl)
- ADD_PROP_VALUE(vobj, "FBURL", card->fburl);
-
- if (card->note) {
- VObject *noteprop;
-
- noteprop = ADD_PROP_VALUE(vobj, VCNoteProp, card->note);
- addProp(noteprop, VCQuotedPrintableProp);
- }
-
- if (card->last_use) {
- char *value;
- value = e_card_date_to_string (card->last_use);
- ADD_PROP_VALUE (vobj, "X-EVOLUTION-LAST-USE", value);
- g_free (value);
- }
-
- if (card->raw_use_score > 0) {
- char *value;
- value = g_strdup_printf ("%f", card->raw_use_score);
- ADD_PROP_VALUE (vobj, "X-EVOLUTION-USE-SCORE", value);
- g_free (value);
- }
-
- if (card->related_contacts && *card->related_contacts) {
- ADD_PROP_VALUE(vobj, XEV_RELATED_CONTACTS, card->related_contacts);
- }
-
- 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;
- }
- ADD_PROP_VALUE (vobj, "CATEGORIES", string);
- g_free(string);
- }
-
- if (card->wants_html_set) {
- ADD_PROP_VALUE (vobj, XEV_WANTS_HTML, card->wants_html ? "TRUE" : "FALSE");
- }
-
- if (card->list) {
- ADD_PROP_VALUE (vobj, XEV_LIST, "TRUE");
- ADD_PROP_VALUE (vobj, XEV_LIST_SHOW_ADDRESSES, card->list_show_addresses ? "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 = ADD_PROP_VALUE (vobj, XEV_ARBITRARY, arbitrary->value);
- } else {
- arb_object = addProp (vobj, XEV_ARBITRARY);
- }
- if (arbitrary->type) {
- ADD_PROP_VALUE (arb_object, "TYPE", arbitrary->type);
- }
- if (arbitrary->key) {
- addProp (arb_object, arbitrary->key);
- }
- }
- }
-
- ADD_PROP_VALUE (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;
- ADD_PROP_VALUE (vobj, xp->name, xp->data);
- add_CardProperty (vobj, &xp->prop);
- }
- }
-
- if (crd->timezn.prop.used) {
- char *str;
-
- str = card_timezn_str (crd->timezn);
- vprop = ADD_PROP_VALUE (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 = ADD_PROP_VALUE (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 = ADD_PROP_VALUE (vobj, VCPronunciationProp,
- crd->sound.data);
-
- add_SoundType (vprop, crd->sound.type);
- add_CardProperty (vprop, &crd->sound.prop);
- }
-
- if (crd->key.prop.used) {
- vprop = ADD_PROP_VALUE (vobj, VCPublicKeyProp, crd->key.data);
- add_KeyType (vprop, crd->key.type);
- add_CardProperty (vprop, &crd->key.prop);
- }
-#endif
- return vobj;
-}
-
-/**
- * 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;
- char *temp, *ret_val;
-
- vobj = e_card_get_vobject (card, FALSE);
- temp = writeMemVObject(NULL, NULL, vobj);
- ret_val = g_strdup(temp);
- free(temp);
- cleanVObject(vobj);
- return ret_val;
-}
-
-char *
-e_card_get_vcard_assume_utf8 (ECard *card)
-{
- VObject *vobj;
- char *temp, *ret_val;
-
- vobj = e_card_get_vobject (card, TRUE);
- temp = writeMemVObject(NULL, NULL, vobj);
- ret_val = g_strdup(temp);
- free(temp);
- cleanVObject(vobj);
- return ret_val;
-}
-
-/**
- * e_card_list_get_vcard:
- * @list: a list of #ECards
- *
- * Returns: a string in vCard format.
- */
-char *
-e_card_list_get_vcard (GList *list)
-{
- VObject *vobj;
-
- char *temp, *ret_val;
-
- vobj = NULL;
-
- for (; list; list = list->next) {
- VObject *tempvobj;
- ECard *card = list->data;
-
- tempvobj = e_card_get_vobject (card, FALSE);
- addList (&vobj, tempvobj);
- }
- temp = writeMemVObjects(NULL, NULL, vobj);
- ret_val = g_strdup(temp);
- free(temp);
- cleanVObjects(vobj);
- return ret_val;
-}
-
-static void
-parse_file_as(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->file_as )
- g_free(card->file_as);
- assign_string(vobj, default_charset, &(card->file_as));
-}
-
-static void
-parse_name(ECard *card, VObject *vobj, char *default_charset)
-{
- 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, default_charset);
- card->name->given = e_v_object_get_child_value (vobj, VCGivenNameProp, default_charset);
- card->name->additional = e_v_object_get_child_value (vobj, VCAdditionalNamesProp, default_charset);
- card->name->prefix = e_v_object_get_child_value (vobj, VCNamePrefixesProp, default_charset);
- card->name->suffix = e_v_object_get_child_value (vobj, VCNameSuffixesProp, default_charset);
-}
-
-static void
-parse_full_name(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->fname )
- g_free(card->fname);
- assign_string(vobj, default_charset, &(card->fname));
-}
-
-static void
-parse_email(ECard *card, VObject *vobj, char *default_charset)
-{
- char *next_email;
- EList *list;
-
- assign_string(vobj, default_charset, &next_email);
- gtk_object_get(GTK_OBJECT(card),
- "email", &list,
- NULL);
- e_list_append(list, next_email);
- g_free (next_email);
-}
-
-/* Deal with charset */
-static void
-parse_bday(ECard *card, VObject *vobj, char *default_charset)
-{
- 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, char *default_charset)
-{
- ECardPhone *next_phone = g_new(ECardPhone, 1);
- EList *list;
-
- assign_string(vobj, default_charset, &(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, char *default_charset)
-{
- 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, default_charset);
- next_addr->ext = e_v_object_get_child_value (vobj, VCExtAddressProp, default_charset);
- next_addr->street = e_v_object_get_child_value (vobj, VCStreetAddressProp, default_charset);
- next_addr->city = e_v_object_get_child_value (vobj, VCCityProp, default_charset);
- next_addr->region = e_v_object_get_child_value (vobj, VCRegionProp, default_charset);
- next_addr->code = e_v_object_get_child_value (vobj, VCPostalCodeProp, default_charset);
- next_addr->country = e_v_object_get_child_value (vobj, VCCountryNameProp, default_charset);
-
- 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, char *default_charset)
-{
- ECardAddrLabel *next_addr = g_new(ECardAddrLabel, 1);
- EList *list;
-
- next_addr->flags = get_address_flags (vobj);
- assign_string(vobj, default_charset, &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, char *default_charset)
-{
- if (card->url)
- g_free(card->url);
- assign_string(vobj, default_charset, &(card->url));
-}
-
-static void
-parse_org(ECard *card, VObject *vobj, char *default_charset)
-{
- char *temp;
-
- temp = e_v_object_get_child_value(vobj, VCOrgNameProp, default_charset);
- g_free(card->org);
- card->org = temp;
-
- temp = e_v_object_get_child_value(vobj, VCOrgUnitProp, default_charset);
- g_free(card->org_unit);
- card->org_unit = temp;
-}
-
-static void
-parse_office(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->office )
- g_free(card->office);
- assign_string(vobj, default_charset, &(card->office));
-}
-
-static void
-parse_title(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->title )
- g_free(card->title);
- assign_string(vobj, default_charset, &(card->title));
-}
-
-static void
-parse_role(ECard *card, VObject *vobj, char *default_charset)
-{
- if (card->role)
- g_free(card->role);
- assign_string(vobj, default_charset, &(card->role));
-}
-
-static void
-parse_manager(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->manager )
- g_free(card->manager);
- assign_string(vobj, default_charset, &(card->manager));
-}
-
-static void
-parse_assistant(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->assistant )
- g_free(card->assistant);
- assign_string(vobj, default_charset, &(card->assistant));
-}
-
-static void
-parse_nickname(ECard *card, VObject *vobj, char *default_charset)
-{
- if (card->nickname)
- g_free(card->nickname);
- assign_string(vobj, default_charset, &(card->nickname));
-}
-
-static void
-parse_spouse(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( card->spouse )
- g_free(card->spouse);
- assign_string(vobj, default_charset, &(card->spouse));
-}
-
-/* Deal with charset */
-static void
-parse_anniversary(ECard *card, VObject *vobj, char *default_charset)
-{
- 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, char *default_charset)
-{
- if ( card->mailer )
- g_free(card->mailer);
- assign_string(vobj, default_charset, &(card->mailer));
-}
-
-static void
-parse_caluri(ECard *card, VObject *vobj, char *default_charset)
-{
- g_free(card->caluri);
- assign_string(vobj, default_charset, &(card->caluri));
-}
-
-static void
-parse_fburl(ECard *card, VObject *vobj, char *default_charset)
-{
- g_free(card->fburl);
- assign_string(vobj, default_charset, &(card->fburl));
-}
-
-static void
-parse_note(ECard *card, VObject *vobj, char *default_charset)
-{
- g_free(card->note);
- assign_string(vobj, default_charset, &(card->note));
-}
-
-static void
-parse_related_contacts(ECard *card, VObject *vobj, char *default_charset)
-{
- g_free(card->related_contacts);
- assign_string(vobj, default_charset, &(card->related_contacts));
-}
-
-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);
-}
-
-/* Deal with charset */
-static void
-parse_categories(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( vObjectValueType (vobj) ) {
- char *str = fakeCString (vObjectUStringZValue (vobj));
- do_parse_categories(card, str);
- free(str);
- }
-}
-
-/* Deal with charset */
-static void
-parse_wants_html(ECard *card, VObject *vobj, char *default_charset)
-{
- 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);
- }
-}
-
-/* Deal with charset */
-static void
-parse_list(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( vObjectValueType (vobj) ) {
- char *str = fakeCString (vObjectUStringZValue (vobj));
- if (!strcasecmp(str, "true")) {
- card->list = TRUE;
- }
- if (!strcasecmp(str, "false")) {
- card->list = FALSE;
- }
- free(str);
- }
-}
-
-/* Deal with charset */
-static void
-parse_list_show_addresses(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( vObjectValueType (vobj) ) {
- char *str = fakeCString (vObjectUStringZValue (vobj));
- if (!strcasecmp(str, "true")) {
- card->list_show_addresses = TRUE;
- }
- if (!strcasecmp(str, "false")) {
- card->list_show_addresses = FALSE;
- }
- 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, char *default_charset)
-{
- 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, default_charset, &(arbitrary->type));
- } else {
- g_free(arbitrary->key);
- arbitrary->key = g_strdup(name);
- }
- }
-
- assign_string(vobj, default_charset, &(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, char *default_charset)
-{
- g_free(card->id);
- assign_string(vobj, default_charset, &(card->id));
-}
-
-/* Deal with charset */
-static void
-parse_last_use(ECard *card, VObject *vobj, char *default_charset)
-{
- if ( vObjectValueType (vobj) ) {
- char *str = fakeCString (vObjectUStringZValue (vobj));
- if ( card->last_use )
- g_free(card->last_use);
- card->last_use = g_new(ECardDate, 1);
- *(card->last_use) = e_card_date_from_string(str);
- free(str);
- }
-}
-
-/* Deal with charset */
-static void
-parse_use_score(ECard *card, VObject *vobj, char *default_charset)
-{
- card->raw_use_score = 0;
-
- if ( vObjectValueType (vobj) ) {
- char *str = fakeCString (vObjectUStringZValue (vobj));
- card->raw_use_score = MAX(0, atof (str));
- free (str);
- }
-}
-
-static void
-parse_attribute(ECard *card, VObject *vobj, char *default_charset)
-{
- ParsePropertyFunc function = g_hash_table_lookup(E_CARD_CLASS(GTK_OBJECT(card)->klass)->attribute_jump_table, vObjectName(vobj));
- if ( function )
- function(card, vobj, default_charset);
-}
-
-static void
-parse(ECard *card, VObject *vobj, char *default_charset)
-{
- VObjectIterator iterator;
- initPropIterator(&iterator, vobj);
- while(moreIteration (&iterator)) {
- parse_attribute(card, nextVObject(&iterator), default_charset);
- }
- 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::caluri",
- GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_CALURI);
- 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::related_contacts",
- GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_RELATED_CONTACTS);
- 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::list",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EVOLUTION_LIST);
- gtk_object_add_arg_type ("ECard::list_show_addresses",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EVOLUTION_LIST_SHOW_ADDRESSES);
- 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);
- gtk_object_add_arg_type ("ECard::last_use",
- GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_LAST_USE);
- gtk_object_add_arg_type ("ECard::use_score",
- GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_USE_SCORE);
-
-
- 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;
-}
-
-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;
-}
-
-gint
-e_card_email_find_number (const ECard *card, const gchar *email)
-{
- EIterator *iter;
- gint count = 0;
-
- g_return_val_if_fail (E_IS_CARD (card), -1);
- g_return_val_if_fail (email != NULL, -1);
-
- iter = e_list_get_iterator (card->email);
- for (e_iterator_reset (iter); e_iterator_is_valid (iter); e_iterator_next (iter)) {
- if (!strcmp (e_iterator_get (iter), email))
- goto finished;
- ++count;
- }
- count = -1;
-
- finished:
- gtk_object_unref (GTK_OBJECT (iter));
-
- return count;
-}
-
-/*
- * ECard lifecycle management and vCard loading/saving.
- */
-
-static void
-e_card_destroy (GtkObject *object)
-{
- ECard *card = E_CARD(object);
- g_free(card->id);
- if (card->book)
- gtk_object_unref (GTK_OBJECT (card->book));
- 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->caluri);
- g_free(card->fburl);
- g_free(card->note);
- g_free(card->related_contacts);
-
- 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));
- if (card->name == NULL)
- card->name = e_card_name_new();
- if (card->fname == NULL) {
- card->fname = e_card_name_to_string(card->name);
- }
- if (card->file_as == NULL) {
- 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;
- }
- 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);
- if (GTK_VALUE_POINTER (*arg)) {
- card->bday = g_new (ECardDate, 1);
- memcpy (card->bday, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
- } else {
- card->bday = NULL;
- }
- 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);
- if (GTK_VALUE_POINTER (*arg)) {
- card->anniversary = g_new (ECardDate, 1);
- memcpy (card->anniversary, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
- } else {
- card->anniversary = NULL;
- }
- break;
- case ARG_MAILER:
- g_free(card->mailer);
- card->mailer = g_strdup(GTK_VALUE_STRING(*arg));
- break;
- case ARG_CALURI:
- g_free(card->caluri);
- card->caluri = 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_RELATED_CONTACTS:
- g_free (card->related_contacts);
- card->related_contacts = 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;
- case ARG_LAST_USE:
- g_free(card->last_use);
- if (GTK_VALUE_POINTER (*arg)) {
- card->last_use = g_new (ECardDate, 1);
- memcpy (card->last_use, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
- } else {
- card->last_use = NULL;
- }
- break;
- case ARG_USE_SCORE:
- card->raw_use_score = GTK_VALUE_FLOAT(*arg);
- break;
- case ARG_EVOLUTION_LIST:
- card->list = GTK_VALUE_BOOL(*arg);
- break;
- case ARG_EVOLUTION_LIST_SHOW_ADDRESSES:
- card->list_show_addresses = GTK_VALUE_BOOL(*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_CALURI:
- GTK_VALUE_STRING(*arg) = card->caluri;
- break;
- case ARG_FBURL:
- GTK_VALUE_STRING(*arg) = card->fburl;
- break;
- case ARG_NOTE:
- GTK_VALUE_STRING(*arg) = card->note;
- break;
- case ARG_RELATED_CONTACTS:
- GTK_VALUE_STRING(*arg) = card->related_contacts;
- 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;
- case ARG_LAST_USE:
- GTK_VALUE_POINTER(*arg) = card->last_use;
- break;
-
- case ARG_USE_SCORE:
- GTK_VALUE_FLOAT(*arg) = e_card_get_use_score (card);
- break;
- case ARG_EVOLUTION_LIST:
- GTK_VALUE_BOOL(*arg) = card->list;
- break;
- case ARG_EVOLUTION_LIST_SHOW_ADDRESSES:
- GTK_VALUE_BOOL(*arg) = card->list_show_addresses;
- 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->caluri = NULL;
- card->fburl = NULL;
- card->note = NULL;
- card->related_contacts = NULL;
- card->categories = NULL;
- card->wants_html = FALSE;
- card->wants_html_set = FALSE;
- card->list = FALSE;
- card->list_show_addresses = FALSE;
- card->arbitrary = NULL;
- card->last_use = NULL;
- card->raw_use_score = 0;
-#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_with_default_charset(const char *filename, char *default_charset)
-{
- 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, default_charset);
- next = nextVObjectInList(vobj);
- cleanVObject(vobj);
- vobj = next;
- list = g_list_prepend(list, card);
- }
- list = g_list_reverse(list);
- return list;
-}
-
-GList *
-e_card_load_cards_from_file(const char *filename)
-{
- return e_card_load_cards_from_file_with_default_charset (filename, "UTF-8");
-}
-
-GList *
-e_card_load_cards_from_string_with_default_charset(const char *str, char *default_charset)
-{
- VObject *vobj = Parse_MIME(str, strlen (str));
- GList *list = NULL;
- while(vobj) {
- VObject *next;
- ECard *card = E_CARD(gtk_type_new(e_card_get_type()));
- parse(card, vobj, default_charset);
- next = nextVObjectInList(vobj);
- cleanVObject(vobj);
- vobj = next;
- list = g_list_prepend(list, card);
- }
- list = g_list_reverse(list);
- return list;
-}
-
-GList *
-e_card_load_cards_from_string(const char *str)
-{
- return e_card_load_cards_from_string_with_default_charset (str, "UTF-8");
-}
-
-void
-e_card_free_empty_lists (ECard *card)
-{
- if (card->address && e_list_length (card->address) == 0) {
- gtk_object_unref (GTK_OBJECT (card->address));
- card->address = NULL;
- }
-
- if (card->address_label && e_list_length (card->address_label) == 0) {
- gtk_object_unref (GTK_OBJECT (card->address_label));
- card->address_label = NULL;
- }
-
- if (card->phone && e_list_length (card->phone) == 0) {
- gtk_object_unref (GTK_OBJECT (card->phone));
- card->phone = NULL;
- }
-
- if (card->email && e_list_length (card->email) == 0) {
- gtk_object_unref (GTK_OBJECT (card->email));
- card->email = NULL;
- }
-
- if (card->categories && e_list_length (card->categories) == 0) {
- gtk_object_unref (GTK_OBJECT (card->categories));
- card->categories = NULL;
- }
-
- if (card->arbitrary && e_list_length (card->arbitrary) == 0) {
- gtk_object_unref (GTK_OBJECT (card->arbitrary));
- card->arbitrary = NULL;
- }
-}
-
-static void
-assign_string(VObject *vobj, char *default_charset, char **string)
-{
- int type = vObjectValueType(vobj);
- char *str;
- char *charset = default_charset;
- gboolean free_charset = FALSE;
- VObject *charset_obj;
-
- if ((charset_obj = isAPropertyOf (vobj, "CHARSET"))) {
- switch (vObjectValueType (charset_obj)) {
- case VCVT_STRINGZ:
- charset = (char *) vObjectStringZValue(charset_obj);
- break;
- case VCVT_USTRINGZ:
- charset = fakeCString (vObjectUStringZValue (charset_obj));
- free_charset = TRUE;
- break;
- }
- }
-
- switch(type) {
- case VCVT_STRINGZ:
- if (strcmp (charset, "UTF-8"))
- *string = e_utf8_from_charset_string (charset, vObjectStringZValue(vobj));
- else
- *string = g_strdup(vObjectStringZValue(vobj));
- break;
- case VCVT_USTRINGZ:
- str = fakeCString (vObjectUStringZValue (vobj));
- if (strcmp (charset, "UTF-8"))
- *string = e_utf8_from_charset_string (charset, str);
- else
- *string = g_strdup(str);
- free(str);
- break;
- default:
- *string = g_strdup("");
- break;
- }
-
- if (free_charset) {
- free (charset);
- }
-}
-
-#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 *default_charset)
-{
- char *ret_val;
- VObjectIterator iterator;
- gboolean free_charset = FALSE;
- VObject *charset_obj;
-
- if ((charset_obj = isAPropertyOf (vobj, "CHARSET"))) {
- switch (vObjectValueType (charset_obj)) {
- case VCVT_STRINGZ:
- default_charset = (char *) vObjectStringZValue(charset_obj);
- break;
- case VCVT_USTRINGZ:
- default_charset = fakeCString (vObjectUStringZValue (charset_obj));
- free_charset = TRUE;
- break;
- }
- }
-
- initPropIterator(&iterator, vobj);
- while(moreIteration (&iterator)) {
- VObject *attribute = nextVObject(&iterator);
- const char *id = vObjectName(attribute);
- if ( ! strcmp(id, name) ) {
- assign_string(attribute, default_charset, &ret_val);
- return ret_val;
- }
- }
- if (free_charset)
- free (default_charset);
-
- return NULL;
-}
-
-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 },
- { "X-EVOLUTION-ASSISTANT", E_CARD_PHONE_ASSISTANT },
- { "X-EVOLUTION-CALLBACK", E_CARD_PHONE_CALLBACK },
- { "X-EVOLUTION-RADIO", E_CARD_PHONE_RADIO },
- { "X-EVOLUTION-TELEX", E_CARD_PHONE_TELEX },
- { "X-EVOLUTION-TTYTDD", E_CARD_PHONE_TTYTDD },
- };
-
- 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 },
- { "X-EVOLUTION-ASSISTANT", E_CARD_PHONE_ASSISTANT },
- { "X-EVOLUTION-CALLBACK", E_CARD_PHONE_CALLBACK },
- { "X-EVOLUTION-RADIO", E_CARD_PHONE_RADIO },
- { "X-EVOLUTION-TELEX", E_CARD_PHONE_TELEX },
- { "X-EVOLUTION-TTYTDD", E_CARD_PHONE_TTYTDD },
- };
-
- 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_list_send (GList *cards, ECardDisposition disposition)
-{
- BonoboObjectClient *bonobo_server;
- GNOME_Evolution_Composer composer_server;
- CORBA_Environment ev;
-
- if (cards == NULL)
- return;
-
- /* 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;
- int to_i, bcc_i;
- GList *iter;
- gint to_length = 0, bcc_length = 0;
-
- /* Figure out how many addresses of each kind we have. */
- for (iter = cards; iter != NULL; iter = g_list_next (iter)) {
- ECard *card = E_CARD (iter->data);
- if (e_card_evolution_list (card)) {
- gint len = card->email ? e_list_length (card->email) : 0;
- if (e_card_evolution_list_show_addresses (card))
- to_length += len;
- else
- bcc_length += len;
- } else {
- if (card->email != NULL)
- ++to_length;
- }
- }
-
- /* Now I have to make a CORBA sequences that represents a recipient list with
- the right number of entries, for the cards. */
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = to_length;
- to_list->_length = to_length;
- if (to_length > 0) {
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (to_length);
- }
-
- 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_length;
- bcc_list->_length = bcc_length;
- if (bcc_length > 0) {
- bcc_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (bcc_length);
- }
-
- to_i = 0;
- bcc_i = 0;
- while (cards != NULL) {
- ECard *card = cards->data;
- EIterator *iterator;
- gchar *name, *addr;
- gboolean is_list, is_hidden, free_name_addr;
- GNOME_Evolution_Composer_Recipient *recipient;
-
- if (card->email != NULL) {
-
- is_list = e_card_evolution_list (card);
- is_hidden = is_list && !e_card_evolution_list_show_addresses (card);
-
- for (iterator = e_list_get_iterator (card->email); e_iterator_is_valid (iterator); e_iterator_next (iterator)) {
-
- if (is_hidden) {
- recipient = &(bcc_list->_buffer[bcc_i]);
- ++bcc_i;
- } else {
- recipient = &(to_list->_buffer[to_i]);
- ++to_i;
- }
-
- name = "";
- addr = "";
- free_name_addr = FALSE;
- if (e_iterator_is_valid (iterator)) {
-
- if (is_list) {
- /* We need to decode the list entries, which are XMLified EDestinations. */
- EDestination *dest = e_destination_import (e_iterator_get (iterator));
- if (dest != NULL) {
- name = g_strdup (e_destination_get_name (dest));
- addr = g_strdup (e_destination_get_email (dest));
- free_name_addr = TRUE;
- gtk_object_unref (GTK_OBJECT (dest));
- }
-
- } else { /* is just a plain old card */
- if (card->name)
- name = e_card_name_to_string (card->name);
- addr = g_strdup ((char *) e_iterator_get (iterator));
- free_name_addr = TRUE;
- }
- }
-
- recipient->name = CORBA_string_dup (name ? name : "");
- recipient->address = CORBA_string_dup (addr ? addr : "");
-
- if (free_name_addr) {
- g_free ((gchar *) name);
- g_free ((gchar *) addr);
- }
-
- /* If this isn't a list, we quit after the first (i.e. the default) address. */
- if (!is_list)
- break;
-
- }
- gtk_object_unref (GTK_OBJECT (iterator));
- }
-
- cards = g_list_next (cards);
- }
-
-
- 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;
- }
-
- 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;
- GNOME_Evolution_Composer_AttachmentData *attach_data;
- CORBA_boolean show_inline;
- char *tempstr;
-
- content_type = CORBA_string_dup ("text/x-vcard");
- filename = CORBA_string_dup ("");
-
- if (cards->next) {
- description = CORBA_string_dup (_("Multiple VCards"));
- } else {
- char *file_as;
-
- gtk_object_get(GTK_OBJECT(cards->data),
- "file_as", &file_as,
- NULL);
-
- tempstr = g_strdup_printf (_("VCard for %s"), file_as);
- description = CORBA_string_dup (tempstr);
- g_free (tempstr);
- }
-
- show_inline = FALSE;
-
- tempstr = e_card_list_get_vcard (cards);
- attach_data = GNOME_Evolution_Composer_AttachmentData__alloc();
- attach_data->_maximum = attach_data->_length = strlen (tempstr);
- attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
- strcpy (attach_data->_buffer, 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);
-}
-
-void
-e_card_send (ECard *card, ECardDisposition disposition)
-{
- GList *list;
- list = g_list_prepend (NULL, card);
- e_card_list_send (list, disposition);
- g_list_free (list);
-}
-
-gboolean
-e_card_evolution_list (ECard *card)
-{
- g_return_val_if_fail (card && E_IS_CARD (card), FALSE);
- return card->list;
-}
-
-gboolean
-e_card_evolution_list_show_addresses (ECard *card)
-{
- g_return_val_if_fail (card && E_IS_CARD (card), FALSE);
- return card->list_show_addresses;
-}
-
-typedef struct _CardLoadData CardLoadData;
-struct _CardLoadData {
- gchar *card_id;
- ECardCallback cb;
- gpointer closure;
-};
-
-static void
-get_card_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure)
-{
- CardLoadData *data = (CardLoadData *) closure;
-
- if (data->cb != NULL) {
- if (status == E_BOOK_STATUS_SUCCESS)
- data->cb (card, data->closure);
- else
- data->cb (NULL, data->closure);
- }
-
- g_free (data->card_id);
- g_free (data);
-}
-
-static void
-card_load_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- CardLoadData *data = (CardLoadData *) closure;
-
- if (status == E_BOOK_STATUS_SUCCESS)
- e_book_get_card (book, data->card_id, get_card_cb, closure);
- else {
- data->cb (NULL, data->closure);
- g_free (data->card_id);
- g_free (data);
- }
-}
-
-void
-e_card_load_uri (const gchar *book_uri, const gchar *uid, ECardCallback cb, gpointer closure)
-{
- CardLoadData *data;
- EBook *book;
-
- data = g_new (CardLoadData, 1);
- data->card_id = g_strdup (uid);
- data->cb = cb;
- data->closure = closure;
-
- book = e_book_new ();
- e_book_load_uri (book, book_uri, card_load_cb, data);
-}
diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h
deleted file mode 100644
index 3f2334023b..0000000000
--- a/addressbook/backend/ebook/e-card.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Arturo Espinosa
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright (C) 2000 Ximian, 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 _EBook; /* Forward reference */
-
-struct _ECard {
- GtkObject object;
- char *id;
-
- struct _EBook *book; /* The EBook this card is from. */
-
- 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 *caluri; /* Calendar URI */
- char *fburl; /* Free Busy URL */
-
- gint timezone; /* number of minutes from UTC as an int */
-
- ECardDate *last_use;
- float raw_use_score;
-
- char *related_contacts; /* EDestinationV (serialized) of related contacts. */
-
- EList *categories; /* Categories. */
-
- EList *arbitrary; /* Arbitrary fields. */
-
-
-
- guint32 wants_html : 1; /* Wants html mail. */
- guint32 wants_html_set : 1; /* Wants html mail. */
- guint32 list : 1; /* If the card corresponds to a contact list */
- guint32 list_show_addresses : 1; /* Whether to show the addresses
- in the To: or Bcc: field */
-
-#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. */
-
- 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); /* Assumes utf8 */
-ECard *e_card_new_with_default_charset (char *vcard,
- char *default_charset);
-const char *e_card_get_id (ECard *card);
-void e_card_set_id (ECard *card,
- const char *character);
-
-struct _EBook *e_card_get_book (ECard *card);
-void e_card_set_book (ECard *card,
- struct _EBook *book);
-char *e_card_get_vcard (ECard *card);
-char *e_card_get_vcard_assume_utf8 (ECard *card);
-char *e_card_list_get_vcard (GList *list);
-ECard *e_card_duplicate (ECard *card);
-float e_card_get_use_score (ECard *card);
-void e_card_touch (ECard *card);
-
-/* Evolution List convenience functions */
-/* used for encoding uids in email addresses */
-gboolean e_card_evolution_list (ECard *card);
-gboolean e_card_evolution_list_show_addresses (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);
-
-/* 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);
-gint e_card_email_find_number (const ECard *card,
- const gchar *email);
-
-/* Specialized functionality */
-GList *e_card_load_cards_from_file (const char *filename);
-GList *e_card_load_cards_from_file_with_default_charset (const char *filename,
- char *default_charset);
-GList *e_card_load_cards_from_string (const char *str);
-GList *e_card_load_cards_from_string_with_default_charset (const char *str,
- char *default_charset);
-void e_card_free_empty_lists (ECard *card);
-
-enum _ECardDisposition {
- E_CARD_DISPOSITION_AS_ATTACHMENT,
- E_CARD_DISPOSITION_AS_TO,
-};
-typedef enum _ECardDisposition ECardDisposition;
-void e_card_send (ECard *card,
- ECardDisposition disposition);
-void e_card_list_send (GList *cards,
- ECardDisposition disposition);
-
-/* Getting ECards via their URIs */
-typedef void (*ECardCallback) (ECard *card, gpointer closure);
-void e_card_load_uri (const gchar *book_uri,
- const gchar *uid,
- ECardCallback cb,
- gpointer closure);
-
-
-/* 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 ecbda7b497..0000000000
--- a/addressbook/backend/ebook/e-destination.c
+++ /dev/null
@@ -1,1601 +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 "e-destination.h"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-book.h"
-#include "e-book-util.h"
-#include <gal/widgets/e-unicode.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include <camel/camel-internet-address.h>
-
-enum {
- CHANGED,
- CARDIFIED,
- LAST_SIGNAL
-};
-
-guint e_destination_signals[LAST_SIGNAL] = { 0 };
-
-struct _EDestinationPrivate {
-
- gchar *raw;
-
- gchar *book_uri;
- gchar *card_uid;
- ECard *card;
- gint card_email_num;
-
- ECard *old_card;
- gint old_card_email_num;
-
- gchar *name;
- gchar *email;
- gchar *addr;
- gchar *textrep;
-
- gboolean html_mail_override;
- gboolean wants_html_mail;
-
- GList *list_dests;
- gboolean show_addresses;
-
- gboolean has_been_cardified;
- gboolean allow_cardify;
- gboolean cannot_cardify;
- guint pending_cardification;
- EBook *cardify_book;
-
- gint freeze_count;
- gboolean pending_change;
-};
-
-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 (dest);
-
- if (dest->priv->old_card)
- gtk_object_unref (GTK_OBJECT (dest->priv->old_card));
-
- if (dest->priv->cardify_book)
- gtk_object_unref (GTK_OBJECT (dest->priv->cardify_book));
-
- 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;
-
- e_destination_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EDestinationClass, changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- e_destination_signals[CARDIFIED] =
- gtk_signal_new ("cardified",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EDestinationClass, cardified),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_destination_signals, LAST_SIGNAL);
-}
-
-static void
-e_destination_init (EDestination *dest)
-{
- dest->priv = g_new0 (struct _EDestinationPrivate, 1);
-
- dest->priv->allow_cardify = TRUE;
- dest->priv->cannot_cardify = FALSE;
- dest->priv->pending_cardification = 0;
-}
-
-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));
-}
-
-static void
-e_destination_freeze (EDestination *dest)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
- g_return_if_fail (dest->priv->freeze_count >= 0);
- ++dest->priv->freeze_count;
-}
-
-static void
-e_destination_thaw (EDestination *dest)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
- g_return_if_fail (dest->priv->freeze_count > 0);
- --dest->priv->freeze_count;
- if (dest->priv->freeze_count == 0 && dest->priv->pending_change)
- e_destination_changed (dest);
-}
-
-void
-e_destination_changed (EDestination *dest)
-{
- if (dest->priv->freeze_count == 0) {
- gtk_signal_emit (GTK_OBJECT (dest), e_destination_signals[CHANGED]);
- dest->priv->pending_change = FALSE;
- dest->priv->cannot_cardify = FALSE;
-
- } else {
- dest->priv->pending_change = TRUE;
- }
-}
-
-EDestination *
-e_destination_copy (const EDestination *dest)
-{
- EDestination *new_dest;
- GList *iter;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- new_dest = e_destination_new ();
-
- new_dest->priv->book_uri = g_strdup (dest->priv->book_uri);
- new_dest->priv->card_uid = g_strdup (dest->priv->card_uid);
- new_dest->priv->name = g_strdup (dest->priv->name);
- new_dest->priv->email = g_strdup (dest->priv->email);
- new_dest->priv->addr = g_strdup (dest->priv->addr);
- new_dest->priv->card_email_num = dest->priv->card_email_num;
- new_dest->priv->old_card_email_num = dest->priv->old_card_email_num;
-
- new_dest->priv->card = dest->priv->card;
- if (new_dest->priv->card)
- gtk_object_ref (GTK_OBJECT (new_dest->priv->card));
-
- new_dest->priv->old_card = dest->priv->old_card;
- if (new_dest->priv->old_card)
- gtk_object_ref (GTK_OBJECT (new_dest->priv->old_card));
-
- new_dest->priv->html_mail_override = dest->priv->html_mail_override;
- new_dest->priv->wants_html_mail = dest->priv->wants_html_mail;
-
- for (iter = dest->priv->list_dests; iter != NULL; iter = g_list_next (iter)) {
- new_dest->priv->list_dests = g_list_append (new_dest->priv->list_dests,
- e_destination_copy (E_DESTINATION (iter->data)));
- }
-
- return new_dest;
-}
-
-static void
-e_destination_clear_card (EDestination *dest)
-{
- g_free (dest->priv->book_uri);
- dest->priv->book_uri = NULL;
- g_free (dest->priv->card_uid);
- dest->priv->card_uid = NULL;
-
- if (dest->priv->card) {
-
- if (dest->priv->old_card)
- gtk_object_unref (GTK_OBJECT (dest->priv->old_card));
-
- dest->priv->old_card = dest->priv->card;
- dest->priv->old_card_email_num = dest->priv->card_email_num;
- }
-
- dest->priv->card = NULL;
- dest->priv->card_email_num = -1;
-
- g_list_foreach (dest->priv->list_dests, (GFunc) gtk_object_unref, NULL);
- g_list_free (dest->priv->list_dests);
- dest->priv->list_dests = NULL;
-
- dest->priv->allow_cardify = TRUE;
- dest->priv->cannot_cardify = FALSE;
-
- e_destination_cancel_cardify (dest);
-
- e_destination_changed (dest);
-}
-
-static void
-e_destination_clear_strings (EDestination *dest)
-{
- g_free (dest->priv->raw);
- dest->priv->raw = NULL;
-
- g_free (dest->priv->name);
- dest->priv->name = NULL;
-
- g_free (dest->priv->email);
- dest->priv->email = NULL;
-
- g_free (dest->priv->addr);
- dest->priv->addr = NULL;
-
- g_free (dest->priv->textrep);
- dest->priv->textrep = NULL;
-
- e_destination_changed (dest);
-}
-
-void
-e_destination_clear (EDestination *dest)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- e_destination_freeze (dest);
-
- e_destination_clear_card (dest);
- e_destination_clear_strings (dest);
-
- e_destination_thaw (dest);
-}
-
-gboolean
-e_destination_is_empty (const EDestination *dest)
-{
- struct _EDestinationPrivate *p;
- g_return_val_if_fail (E_IS_DESTINATION (dest), TRUE);
- p = dest->priv;
-
- return !(p->card != NULL
- || (p->book_uri && *p->book_uri)
- || (p->card_uid && *p->card_uid)
- || (p->raw && *p->raw)
- || (p->name && *p->name)
- || (p->email && *p->email)
- || (p->addr && *p->addr)
- || (p->list_dests != NULL));
-}
-
-gboolean
-e_destination_is_valid (const EDestination *dest)
-{
- const gchar *email;
-
- g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
-
- if (e_destination_from_card (dest))
- return TRUE;
-
- email = e_destination_get_email (dest);
- return email && *email && strchr (email, '@');
-}
-
-gboolean
-e_destination_equal (const EDestination *a, const EDestination *b)
-{
- const struct _EDestinationPrivate *pa, *pb;
- const gchar *na, *nb;
-
- g_return_val_if_fail (E_IS_DESTINATION (a), FALSE);
- g_return_val_if_fail (E_IS_DESTINATION (b), FALSE);
-
- if (a == b)
- return TRUE;
-
- pa = a->priv;
- pb = b->priv;
-
- /* Check equality of cards. */
- if (pa->card || pb->card) {
- if (! (pa->card && pb->card))
- return FALSE;
-
- if (pa->card == pb->card || !strcmp (e_card_get_id (pa->card), e_card_get_id (pb->card)))
- return TRUE;
-
- return FALSE;
- }
-
- /* Just in case name returns NULL */
- na = e_destination_get_name (a);
- nb = e_destination_get_name (b);
- if ((na || nb) && !(na && nb && !strcmp (na, nb)))
- return FALSE;
-
- if (!strcmp (e_destination_get_email (a), e_destination_get_email (b)))
- return TRUE;
-
- return FALSE;
-}
-
-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 || dest->priv->card_email_num != email_num) {
-
- /* We have to freeze/thaw around these operations so that the 'changed'
- signals don't cause the EDestination's internal state to be altered
- before we can finish setting ->card && ->card_email_num. */
- e_destination_freeze (dest);
- e_destination_clear (dest);
-
- dest->priv->card = card;
- gtk_object_ref (GTK_OBJECT (dest->priv->card));
-
- dest->priv->card_email_num = email_num;
-
- e_destination_changed (dest);
- e_destination_thaw (dest);
- }
-}
-
-void
-e_destination_set_book_uri (EDestination *dest, const gchar *uri)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
- g_return_if_fail (uri != NULL);
-
- if (dest->priv->book_uri == NULL
- || strcmp (dest->priv->book_uri, uri)) {
-
- g_free (dest->priv->book_uri);
- dest->priv->book_uri = g_strdup (uri);
-
- /* If we already have a card, remove it unless it's uri matches the one
- we just set. */
- if (dest->priv->card) {
- EBook *book = e_card_get_book (dest->priv->card);
- if ((!book) || strcmp (uri, e_book_get_uri (book))) {
- gtk_object_unref (GTK_OBJECT (dest->priv->card));
- dest->priv->card = NULL;
- }
- }
-
- e_destination_changed (dest);
- }
-}
-
-void
-e_destination_set_card_uid (EDestination *dest, const gchar *uid, gint email_num)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
- g_return_if_fail (uid != NULL);
-
- if (dest->priv->card_uid == NULL
- || strcmp (dest->priv->card_uid, uid)
- || dest->priv->card_email_num != email_num) {
-
- g_free (dest->priv->card_uid);
- dest->priv->card_uid = g_strdup (uid);
- dest->priv->card_email_num = email_num;
-
- /* If we already have a card, remove it unless it's uri matches the one
- we just set. */
- if (dest->priv->card && strcmp (uid, e_card_get_id (dest->priv->card))) {
- gtk_object_unref (GTK_OBJECT (dest->priv->card));
- dest->priv->card = NULL;
- }
-
- e_destination_changed (dest);
- }
-}
-
-void
-e_destination_set_name (EDestination *dest, const gchar *name)
-{
- gboolean changed = FALSE;
-
- g_return_if_fail (E_IS_DESTINATION (dest));
-
- if (name == NULL) {
- if (dest->priv->name != NULL) {
- g_free (dest->priv->name);
- dest->priv->name = NULL;
- changed = TRUE;
- }
- } else if (dest->priv->name == NULL || strcmp (dest->priv->name, name)) {
- g_free (dest->priv->name);
- dest->priv->name = g_strdup (name);
- changed = TRUE;
- }
-
- if (changed) {
- g_free (dest->priv->addr);
- dest->priv->addr = NULL;
- g_free (dest->priv->textrep);
- dest->priv->textrep = NULL;
- e_destination_changed (dest);
- }
-}
-
-void
-e_destination_set_email (EDestination *dest, const gchar *email)
-{
- gboolean changed = FALSE;
-
- g_return_if_fail (E_IS_DESTINATION (dest));
-
- if (email == NULL) {
- if (dest->priv->email != NULL) {
- g_free (dest->priv->addr);
- dest->priv->addr = NULL;
- changed = TRUE;
- }
- } else if (dest->priv->email == NULL || strcmp (dest->priv->email, email)) {
-
- g_free (dest->priv->email);
- dest->priv->email = g_strdup (email);
- changed = TRUE;
- }
-
-
- if (changed) {
- g_free (dest->priv->addr);
- dest->priv->addr = NULL;
- g_free (dest->priv->textrep);
- dest->priv->textrep = NULL;
- e_destination_changed (dest);
- }
-}
-
-void
-e_destination_set_html_mail_pref (EDestination *dest, gboolean x)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- dest->priv->html_mail_override = TRUE;
- if (dest->priv->wants_html_mail != x) {
- dest->priv->wants_html_mail = x;
- e_destination_changed (dest);
- }
-}
-
-gboolean
-e_destination_contains_card (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), FALSE);
- return dest->priv->card != NULL;
-}
-
-gboolean
-e_destination_from_card (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), FALSE);
- return dest->priv->card != NULL || dest->priv->book_uri != NULL || dest->priv->card_uid != NULL;
-}
-
-
-typedef struct _UseCard UseCard;
-struct _UseCard {
- EDestination *dest;
- EDestinationCardCallback cb;
- gpointer closure;
-};
-
-static void
-use_card_cb (ECard *card, gpointer closure)
-{
- UseCard *uc = (UseCard *) closure;
-
- if (card != NULL && uc->dest->priv->card == NULL) {
-
- uc->dest->priv->card = card;
- gtk_object_ref (GTK_OBJECT (uc->dest->priv->card));
- e_destination_changed (uc->dest);
-
- }
-
- if (uc->cb) {
- uc->cb (uc->dest, uc->dest->priv->card, uc->closure);
- }
-
- /* We held a copy of the destination during the callback. */
- gtk_object_unref (GTK_OBJECT (uc->dest));
- g_free (uc);
-}
-
-void
-e_destination_use_card (EDestination *dest, EDestinationCardCallback cb, gpointer closure)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- if (dest->priv->card != NULL) {
-
- if (cb) {
- cb (dest, dest->priv->card, closure);
- }
-
- } else if (dest->priv->book_uri != NULL && dest->priv->card_uid != NULL) {
-
- UseCard *uc = g_new (UseCard, 1);
- uc->dest = dest;
- /* Hold a reference to the destination during the callback. */
- gtk_object_ref (GTK_OBJECT (uc->dest));
- uc->cb = cb;
- uc->closure = closure;
- e_card_load_uri (dest->priv->book_uri, dest->priv->card_uid, use_card_cb, uc);
- }
-}
-
-ECard *
-e_destination_get_card (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- return dest->priv->card;
-}
-
-const gchar *
-e_destination_get_card_uid (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- if (dest->priv->card_uid)
- return dest->priv->card_uid;
-
- if (dest->priv->card)
- return e_card_get_id (dest->priv->card);
-
- return NULL;
-}
-
-const gchar *
-e_destination_get_book_uri (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- if (dest->priv->book_uri)
- return dest->priv->book_uri;
-
- if (dest->priv->card) {
- EBook *book = e_card_get_book (dest->priv->card);
- if (book) {
- return e_book_get_uri (book);
- }
- }
-
- return NULL;
-}
-
-gint
-e_destination_get_email_num (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), -1);
-
- if (dest->priv->card == NULL && (dest->priv->book_uri == NULL || dest->priv->card_uid == NULL))
- return -1;
-
- return dest->priv->card_email_num;
-}
-
-const gchar *
-e_destination_get_name (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->name == NULL) {
-
- if (priv->card != NULL) {
-
- priv->name = e_card_name_to_string (priv->card->name);
-
- if (priv->name == NULL || *priv->name == '\0') {
- g_free (priv->name);
- priv->name = g_strdup (priv->card->file_as);
- }
-
- if (priv->name == NULL || *priv->name == '\0') {
- g_free (priv->name);
- priv->name = g_strdup (e_destination_get_email (dest));
- }
-
- } else if (priv->raw != NULL) {
-
- CamelInternetAddress *addr = camel_internet_address_new ();
-
- if (camel_address_unformat (CAMEL_ADDRESS (addr), priv->raw)) {
- const gchar *camel_name = NULL;
- camel_internet_address_get (addr, 0, &camel_name, NULL);
- priv->name = g_strdup (camel_name);
- }
-
- camel_object_unref (CAMEL_OBJECT (addr));
- }
- }
-
- return priv->name;
-
-}
-
-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->email == NULL) {
-
- if (priv->card != NULL) { /* Pull the address out of the card. */
-
- if (priv->card->email) {
- 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->email = g_strdup ((gchar *) ptr);
- }
- }
-
- }
-
- } else if (priv->raw != NULL) {
-
- CamelInternetAddress *addr = camel_internet_address_new ();
-
- if (camel_address_unformat (CAMEL_ADDRESS (addr), priv->raw)) {
- const gchar *camel_email = NULL;
- camel_internet_address_get (addr, 0, NULL, &camel_email);
- priv->email = g_strdup (camel_email);
- }
-
- camel_object_unref (CAMEL_OBJECT (addr));
- }
-
- /* Force e-mail to be non-null... */
- if (priv->email == NULL) {
- priv->email = g_strdup ("");
- }
- }
-
- return priv->email;
-}
-
-const gchar *
-e_destination_get_address (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->addr == NULL) {
- CamelInternetAddress *addr = camel_internet_address_new ();
-
- if (e_destination_is_evolution_list (dest)) {
- GList *iter = dest->priv->list_dests;
-
- while (iter) {
- EDestination *list_dest = E_DESTINATION (iter->data);
- if (!e_destination_is_empty (list_dest)) {
- camel_internet_address_add (addr,
- e_destination_get_name (list_dest),
- e_destination_get_email (list_dest));
- }
- iter = g_list_next (iter);
- }
-
- priv->addr = camel_address_encode (CAMEL_ADDRESS (addr));
-
- } else if (priv->raw) {
-
- if (camel_address_unformat (CAMEL_ADDRESS (addr), priv->raw)) {
- priv->addr = camel_address_encode (CAMEL_ADDRESS (addr));
- }
-
- } else {
-
- camel_internet_address_add (addr,
- e_destination_get_name (dest),
- e_destination_get_email (dest));
-
- priv->addr = camel_address_encode (CAMEL_ADDRESS (addr));
- }
-
- camel_object_unref (CAMEL_OBJECT (addr));
- }
-
- return priv->addr;
-}
-
-void
-e_destination_set_raw (EDestination *dest, const gchar *raw)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
- g_return_if_fail (raw != NULL);
-
- if (dest->priv->raw == NULL || strcmp (dest->priv->raw, raw)) {
-
- e_destination_freeze (dest);
-
- e_destination_clear (dest);
- dest->priv->raw = g_strdup (raw);
- e_destination_changed (dest);
-
- e_destination_thaw (dest);
- }
-}
-
-const gchar *
-e_destination_get_textrep (const EDestination *dest)
-{
- const gchar *name, *email;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- if (dest->priv->raw)
- return dest->priv->raw;
-
- name = e_destination_get_name (dest);
- email = e_destination_get_email (dest);
-
- if (e_destination_from_card (dest) && name != NULL)
- return name;
-
- /* Make sure that our address gets quoted properly */
- if (name && email && dest->priv->textrep == NULL) {
- CamelInternetAddress *addr = camel_internet_address_new ();
- camel_internet_address_add (addr, name, email);
- g_free (dest->priv->textrep);
- dest->priv->textrep = camel_address_format (CAMEL_ADDRESS (addr));
- camel_object_unref (CAMEL_OBJECT (addr));
- }
-
- if (dest->priv->textrep != NULL)
- return dest->priv->textrep;
-
- if (email)
- return email;
-
- return "";
-}
-
-gboolean
-e_destination_is_evolution_list (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->list_dests == NULL
- && dest->priv->card != NULL
- && dest->priv->card->email != NULL
- && e_card_evolution_list (dest->priv->card)) {
-
- EIterator *iter = e_list_get_iterator (dest->priv->card->email);
- e_iterator_reset (iter);
- while (e_iterator_is_valid (iter)) {
- const gchar *dest_xml = (const gchar *) e_iterator_get (iter);
- EDestination *list_dest = e_destination_import (dest_xml);
- if (list_dest)
- dest->priv->list_dests = g_list_append (dest->priv->list_dests, list_dest);
- e_iterator_next (iter);
- }
- }
-
- return dest->priv->list_dests != NULL;
-}
-
-gboolean
-e_destination_list_show_addresses (const EDestination *dest)
-{
- g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->card != NULL)
- return e_card_evolution_list_show_addresses (dest->priv->card);
-
- return dest->priv->show_addresses;
-}
-
-gboolean
-e_destination_get_html_mail_pref (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->html_mail_override || dest->priv->card == NULL)
- return dest->priv->wants_html_mail;
-
- return dest->priv->card->wants_html;
-}
-
-gboolean
-e_destination_allow_cardification (const EDestination *dest)
-{
- g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
-
- return dest->priv->allow_cardify;
-}
-
-void
-e_destination_set_allow_cardification (EDestination *dest, gboolean x)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
-
- dest->priv->allow_cardify = x;
-}
-
-static void
-set_cardify_book (EDestination *dest, EBook *book)
-{
- if (dest->priv->cardify_book && dest->priv->cardify_book != book) {
- gtk_object_unref (GTK_OBJECT (dest->priv->cardify_book));
- }
-
- dest->priv->cardify_book = book;
-
- if (book)
- gtk_object_ref (GTK_OBJECT (book));
-}
-
-static void
-name_and_email_simple_query_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- EDestination *dest = E_DESTINATION (closure);
-
- if (status == E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS && g_list_length ((GList *) cards) == 1) {
- ECard *card = E_CARD (cards->data);
- const gchar *email = e_destination_get_email (dest);
- gint email_num = 0;
-
- if (e_destination_is_valid (dest) && email && *email) {
- email_num = e_card_email_find_number (card, e_destination_get_email (dest));
- }
-
- if (email_num >= 0) {
- dest->priv->has_been_cardified = TRUE;
- e_destination_set_card (dest, card, email_num);
- gtk_signal_emit (GTK_OBJECT (dest), e_destination_signals[CARDIFIED]);
- }
- }
-
- if (!dest->priv->has_been_cardified) {
- dest->priv->cannot_cardify = TRUE;
- }
-
- gtk_object_unref (GTK_OBJECT (dest)); /* drop the reference held by the query */
-}
-
-
-static void
-nickname_simple_query_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- EDestination *dest = E_DESTINATION (closure);
-
- if (status == E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS) {
-
- if (g_list_length ((GList *) cards) == 1) {
- dest->priv->has_been_cardified = TRUE;
- e_destination_set_card (dest, E_CARD (cards->data), 0); /* Uses primary e-mail by default. */
- gtk_signal_emit (GTK_OBJECT (dest), e_destination_signals[CARDIFIED]);
-
- gtk_object_unref (GTK_OBJECT (dest)); /* drop the reference held by the query */
-
- } else {
-
- /* We can only end up here if we don't look at all like an e-mail address, so
- we do a name-only query on the textrep */
-
- e_book_name_and_email_query (book,
- e_destination_get_textrep (dest),
- NULL,
- name_and_email_simple_query_cb,
- dest);
- }
- } else {
- /* Something went wrong with the query: drop our ref to the destination and return. */
- gtk_object_unref (GTK_OBJECT (dest));
- }
-}
-
-static void
-launch_cardify_query (EDestination *dest)
-{
- if (! e_destination_is_valid (dest)) {
-
- /* If it doesn't look like an e-mail address, see if it is a nickname. */
- e_book_nickname_query (dest->priv->cardify_book,
- e_destination_get_textrep (dest),
- nickname_simple_query_cb,
- dest);
-
- } else {
-
- e_book_name_and_email_query (dest->priv->cardify_book,
- e_destination_get_name (dest),
- e_destination_get_email (dest),
- name_and_email_simple_query_cb,
- dest);
- }
-}
-
-static void
-use_local_book_cb (EBook *book, gpointer closure)
-{
- EDestination *dest = E_DESTINATION (closure);
- if (dest->priv->cardify_book == NULL) {
- dest->priv->cardify_book = book;
- gtk_object_ref (GTK_OBJECT (book));
- }
-
- launch_cardify_query (dest);
-}
-
-
-void
-e_destination_cardify (EDestination *dest, EBook *book)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
- g_return_if_fail (book == NULL || E_IS_BOOK (book));
-
- if (e_destination_is_evolution_list (dest))
- return;
-
- if (e_destination_contains_card (dest))
- return;
-
- if (!dest->priv->allow_cardify)
- return;
-
- if (dest->priv->cannot_cardify)
- return;
-
- e_destination_cancel_cardify (dest);
-
- /* In some cases, we can revert to the previous card. */
- if (!e_destination_is_valid (dest) && e_destination_revert (dest)) {
- return;
- }
-
- set_cardify_book (dest, book);
-
- /* Handle the case of an EDestination containing a card URL */
- if (e_destination_contains_card (dest)) {
- e_destination_use_card (dest, NULL, NULL);
- return;
- }
-
- /* If we have a book ready, proceed. We hold a reference to ourselves
- until our query is complete. */
- gtk_object_ref (GTK_OBJECT (dest));
- if (dest->priv->cardify_book != NULL) {
- launch_cardify_query (dest);
- } else {
- e_book_use_local_address_book (use_local_book_cb, dest);
- }
-}
-
-static gint
-do_cardify_delayed (gpointer ptr)
-{
- EDestination *dest = E_DESTINATION (ptr);
- e_destination_cardify (dest, dest->priv->cardify_book);
- return FALSE;
-}
-
-void
-e_destination_cardify_delayed (EDestination *dest, EBook *book, gint delay)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
- g_return_if_fail (book == NULL || E_IS_BOOK (book));
-
- if (delay < 0)
- delay = 500;
-
- e_destination_cancel_cardify (dest);
-
- set_cardify_book (dest, book);
-
- dest->priv->pending_cardification = gtk_timeout_add (delay, do_cardify_delayed, dest);
-}
-
-void
-e_destination_cancel_cardify (EDestination *dest)
-{
- g_return_if_fail (E_IS_DESTINATION (dest));
-
- if (dest->priv->pending_cardification) {
- gtk_timeout_remove (dest->priv->pending_cardification);
- dest->priv->pending_cardification = 0;
- }
-}
-
-gboolean
-e_destination_uncardify (EDestination *dest)
-{
- gchar *email;
-
- g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
-
- if (! e_destination_contains_card (dest))
- return FALSE;
-
- email = g_strdup (e_destination_get_email (dest));
-
- if (email == NULL)
- return FALSE;
-
- e_destination_freeze (dest);
- e_destination_clear (dest);
- e_destination_set_raw (dest, email);
- g_free (email);
- e_destination_thaw (dest);
-
- return TRUE;
-}
-
-gboolean
-e_destination_revert (EDestination *dest)
-{
- g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
-
- if (dest->priv->old_card) {
- ECard *card;
- gint card_email_num;
-
- card = dest->priv->old_card;
- card_email_num = dest->priv->old_card_email_num;
-
- dest->priv->old_card = NULL;
-
- e_destination_freeze (dest);
- e_destination_clear (dest);
- e_destination_set_card (dest, card, card_email_num);
- e_destination_thaw (dest);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-/*
- * Destination import/export
- */
-
-gchar *
-e_destination_get_address_textv (EDestination **destv)
-{
- gint i, j, len = 0;
- gchar **strv;
- gchar *str;
-
- g_return_val_if_fail (destv, NULL);
-
- /* Q: Please tell me this is only for assertion
- reasons. If this is considered to be ok behavior then you
- shouldn't use g_return's. Just a reminder ;-)
-
- A: Yes, this is just an assertion. (Though it does find the
- length of the vector in the process...)
- */
- while (destv[len]) {
- g_return_val_if_fail (E_IS_DESTINATION (destv[len]), NULL);
- ++len;
- }
-
- strv = g_new0 (gchar *, len+1);
- for (i = 0, j = 0; destv[i]; i++) {
- if (!e_destination_is_empty (destv[i])) {
- const gchar *addr = e_destination_get_address (destv[i]);
- strv[j++] = addr ? (gchar *) addr : "";
- }
- }
-
- str = g_strjoinv (", ", strv);
-
- g_free (strv);
-
- return str;
-}
-
-xmlNodePtr
-e_destination_xml_encode (const EDestination *dest)
-{
- xmlNodePtr dest_node;
- const gchar *str;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- dest_node = xmlNewNode (NULL, "destination");
-
- str = e_destination_get_name (dest);
- if (str)
- xmlNewTextChild (dest_node, NULL, "name", str);
-
- if (! e_destination_is_evolution_list (dest)) {
- str = e_destination_get_email (dest);
- if (str)
- xmlNewTextChild (dest_node, NULL, "email", str);
- } else {
- GList *iter = dest->priv->list_dests;
-
- while (iter) {
- EDestination *list_dest = E_DESTINATION (iter->data);
- xmlNodePtr list_node = xmlNewNode (NULL, "list_entry");
-
- str = e_destination_get_name (list_dest);
- if (str)
- xmlNewTextChild (list_node, NULL, "name", str);
-
- str = e_destination_get_email (list_dest);
- if (str)
- xmlNewTextChild (list_node, NULL, "email", str);
-
- xmlAddChild (dest_node, list_node);
-
- iter = g_list_next (iter);
- }
-
- xmlNewProp (dest_node, "is_list", "yes");
- xmlNewProp (dest_node, "show_addresses",
- e_destination_list_show_addresses (dest) ? "yes" : "no");
- }
-
- str = e_destination_get_book_uri (dest);
- if (str) {
- xmlNewTextChild (dest_node, NULL, "book_uri", str);
- }
-
- str = e_destination_get_card_uid (dest);
- if (str) {
- gchar buf[16];
- xmlNodePtr uri_node = xmlNewTextChild (dest_node, NULL, "card_uid", str);
- g_snprintf (buf, 16, "%d", e_destination_get_email_num (dest));
- xmlNewProp (uri_node, "email_num", buf);
- }
-
- xmlNewProp (dest_node, "html_mail", e_destination_get_html_mail_pref (dest) ? "yes" : "no");
-
- return dest_node;
-}
-
-gboolean
-e_destination_xml_decode (EDestination *dest, xmlNodePtr node)
-{
- gchar *name = NULL, *email = NULL, *book_uri = NULL, *card_uid = NULL;
- gint email_num = -1;
- gboolean html_mail = FALSE;
- gboolean is_list = FALSE, show_addr = FALSE;
- gchar *tmp;
- GList *list_dests = NULL;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), FALSE);
- g_return_val_if_fail (node != NULL, FALSE);
-
- if (strcmp (node->name, "destination"))
- return FALSE;
-
- tmp = xmlGetProp (node, "html_mail");
- if (tmp) {
- html_mail = !strcmp (tmp, "yes");
- xmlFree (tmp);
- }
-
- tmp = xmlGetProp (node, "is_list");
- if (tmp) {
- is_list = !strcmp (tmp, "yes");
- xmlFree (tmp);
- }
-
- tmp = xmlGetProp (node, "show_addresses");
- if (tmp) {
- show_addr = !strcmp (tmp, "yes");
- xmlFree (tmp);
- }
-
- node = node->xmlChildrenNode;
- while (node) {
- if (!strcmp (node->name, "name")) {
- tmp = xmlNodeGetContent (node);
- g_free (name);
- name = g_strdup (tmp);
- xmlFree (tmp);
- } else if (!is_list && !strcmp (node->name, "email")) {
- tmp = xmlNodeGetContent (node);
- g_free (email);
- email = g_strdup (tmp);
- xmlFree (tmp);
- } else if (is_list && !strcmp (node->name, "list_entry")) {
- xmlNodePtr subnode = node->xmlChildrenNode;
- gchar *list_name = NULL, *list_email = NULL;
-
- while (subnode) {
- if (!strcmp (subnode->name, "name")) {
- tmp = xmlNodeGetContent (subnode);
- g_free (list_name);
- list_name = g_strdup (tmp);
- xmlFree (tmp);
- } else if (!strcmp (subnode->name, "email")) {
- tmp = xmlNodeGetContent (subnode);
- g_free (list_email);
- list_email = g_strdup (tmp);
- xmlFree (tmp);
- }
-
- subnode = subnode->next;
- }
-
- if (list_name || list_email) {
- EDestination *list_dest = e_destination_new ();
- if (list_name)
- e_destination_set_name (list_dest, list_name);
- if (list_email)
- e_destination_set_email (list_dest, list_email);
-
- g_free (list_name);
- g_free (list_email);
-
- list_dests = g_list_append (list_dests, list_dest);
- }
- } else if (!strcmp (node->name, "book_uri")) {
- tmp = xmlNodeGetContent (node);
- g_free (book_uri);
- book_uri = g_strdup (tmp);
- xmlFree (tmp);
- } else if (!strcmp (node->name, "card_uid")) {
- tmp = xmlNodeGetContent (node);
- g_free (card_uid);
- card_uid = g_strdup (tmp);
- xmlFree (tmp);
-
- tmp = xmlGetProp (node, "email_num");
- email_num = atoi (tmp);
- xmlFree (tmp);
- }
-
- node = node->next;
- }
-
- e_destination_freeze (dest);
-
- e_destination_clear (dest);
-
- if (name) {
- e_destination_set_name (dest, name);
- g_free (name);
- }
- if (email) {
- e_destination_set_email (dest, email);
- g_free (email);
- }
- if (book_uri) {
- e_destination_set_book_uri (dest, book_uri);
- g_free (book_uri);
- }
- if (card_uid) {
- e_destination_set_card_uid (dest, card_uid, email_num);
- g_free (card_uid);
- }
- if (list_dests)
- dest->priv->list_dests = list_dests;
-
- dest->priv->html_mail_override = TRUE;
- dest->priv->wants_html_mail = html_mail;
-
- dest->priv->show_addresses = show_addr;
-
- e_destination_thaw (dest);
-
- return TRUE;
-}
-
-/* FIXME: Make utf-8 safe */
-static gchar *
-null_terminate_and_remove_extra_whitespace (xmlChar *xml_in, gint size)
-{
- gchar *xml;
- gchar *r, *w;
- gboolean skip_white = FALSE;
-
- if (xml_in == NULL || size <= 0)
- return NULL;
-
- xml = g_strndup (xml_in, size);
- r = w = xml;
-
- while (*r) {
- if (*r == '\n' || *r == '\r') {
- skip_white = TRUE;
- } else {
- gboolean is_space = isspace (*r);
-
- *w = *r;
-
- if (! (skip_white && is_space))
- ++w;
- if (! is_space)
- skip_white = FALSE;
- }
- ++r;
- }
-
- *w = '\0';
-
- return xml;
-}
-
-gchar *
-e_destination_export (const EDestination *dest)
-{
- xmlNodePtr dest_node;
- xmlDocPtr dest_doc;
- xmlChar *buffer = NULL;
- gint size = -1;
- gchar *str;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- dest_node = e_destination_xml_encode (dest);
- if (dest_node == NULL)
- return NULL;
-
- dest_doc = xmlNewDoc (XML_DEFAULT_VERSION);
- xmlDocSetRootElement (dest_doc, dest_node);
-
- xmlDocDumpMemory (dest_doc, &buffer, &size);
- xmlFreeDoc (dest_doc);
-
- str = null_terminate_and_remove_extra_whitespace (buffer, size);
- xmlFree (buffer);
-
- return str;
-}
-
-EDestination *
-e_destination_import (const gchar *str)
-{
- EDestination *dest = NULL;
- xmlDocPtr dest_doc;
-
- if (! (str && *str))
- return NULL;
-
- dest_doc = xmlParseMemory ((gchar *) str, strlen (str));
- if (dest_doc && dest_doc->xmlRootNode) {
- dest = e_destination_new ();
- if (! e_destination_xml_decode (dest, dest_doc->xmlRootNode)) {
- gtk_object_unref (GTK_OBJECT (dest));
- dest = NULL;
- }
- }
- xmlFreeDoc (dest_doc);
-
- return dest;
-}
-
-gchar *
-e_destination_exportv (EDestination **destv)
-{
- xmlDocPtr destv_doc;
- xmlNodePtr destv_node;
- xmlChar *buffer = NULL;
- gint size = -1;
- gchar *str;
- gint i;
-
- if (destv == NULL || *destv == NULL)
- return NULL;
-
- destv_doc = xmlNewDoc (XML_DEFAULT_VERSION);
- destv_node = xmlNewNode (NULL, "destinations");
- xmlDocSetRootElement (destv_doc, destv_node);
-
- for (i=0; destv[i]; ++i) {
- if (! e_destination_is_empty (destv[i])) {
- xmlNodePtr dest_node = e_destination_xml_encode (destv[i]);
- if (dest_node)
- xmlAddChild (destv_node, dest_node);
- }
- }
-
- xmlDocDumpMemory (destv_doc, &buffer, &size);
- xmlFreeDoc (destv_doc);
-
- str = null_terminate_and_remove_extra_whitespace (buffer, size);
- xmlFree (buffer);
-
- return str;
-}
-
-EDestination **
-e_destination_importv (const gchar *str)
-{
- GPtrArray *dest_array = NULL;
- xmlDocPtr destv_doc;
- xmlNodePtr node;
- EDestination **destv = NULL;
-
- if (!(str && *str))
- return NULL;
-
- destv_doc = xmlParseMemory ((gchar *)str, strlen (str));
- if (destv_doc == NULL)
- return NULL;
-
- node = destv_doc->xmlRootNode;
-
- if (strcmp (node->name, "destinations"))
- goto finished;
-
- node = node->xmlChildrenNode;
-
- dest_array = g_ptr_array_new ();
-
- while (node) {
- EDestination *dest;
-
- dest = e_destination_new ();
- if (e_destination_xml_decode (dest, node)) {
- g_ptr_array_add (dest_array, dest);
- } else {
- gtk_object_unref (GTK_OBJECT (dest));
- }
-
- node = node->next;
- }
-
- /* we need destv to be NULL terminated */
- g_ptr_array_add (dest_array, NULL);
-
- destv = (EDestination **) dest_array->pdata;
- g_ptr_array_free (dest_array, FALSE);
-
- finished:
- xmlFreeDoc (destv_doc);
-
- return destv;
-}
-
-EDestination **
-e_destination_list_to_vector (GList *list)
-{
- gint N = g_list_length (list);
- EDestination **destv;
- gint i = 0;
-
- if (N == 0)
- return NULL;
-
- destv = g_new (EDestination *, N+1);
- while (list != NULL) {
- destv[i] = E_DESTINATION (list->data);
- list->data = NULL;
- ++i;
- list = g_list_next (list);
- }
- destv[N] = NULL;
-
- return destv;
-}
-
-void
-e_destination_freev (EDestination **destv)
-{
- gint i;
-
- if (destv) {
- for (i = 0; destv[i] != NULL; ++i) {
- gtk_object_unref (GTK_OBJECT (destv[i]));
- }
- g_free (destv);
- }
-
-}
-
-static void
-touch_cb (EBook *book, const gchar *addr, ECard *card, gpointer closure)
-{
- if (book != NULL && card != NULL) {
- e_card_touch (card);
- g_message ("Use score for \"%s\" is now %f", addr, e_card_get_use_score (card));
- e_book_commit_card (book, card, NULL, NULL);
- }
-}
-
-void
-e_destination_touch (EDestination *dest)
-{
- const gchar *email;
-
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- email = e_destination_get_email (dest);
-
- if (email) {
- e_book_query_address_locally (email, touch_cb, NULL);
- }
-}
-
-void
-e_destination_touchv (EDestination **destv)
-{
- gint i;
-
- g_return_if_fail (destv != NULL);
-
- for (i = 0; destv[i] != NULL; ++i) {
- e_destination_touch (destv[i]);
- }
-}
diff --git a/addressbook/backend/ebook/e-destination.h b/addressbook/backend/ebook/e-destination.h
deleted file mode 100644
index 807ab51b8e..0000000000
--- a/addressbook/backend/ebook/e-destination.h
+++ /dev/null
@@ -1,134 +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>
-#include <addressbook/backend/ebook/e-book.h>
-#include <gnome-xml/tree.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;
-
-typedef void (*EDestinationCardCallback) (EDestination *dest, ECard *card, gpointer closure);
-
-struct _EDestinationPrivate;
-
-struct _EDestination {
- GtkObject object;
-
- struct _EDestinationPrivate *priv;
-};
-
-struct _EDestinationClass {
- GtkObjectClass parent_class;
-
- void (*changed) (EDestination *dest);
- void (*cardified) (EDestination *dest);
-};
-
-GtkType e_destination_get_type (void);
-
-
-EDestination *e_destination_new (void);
-void e_destination_changed (EDestination *);
-EDestination *e_destination_copy (const EDestination *);
-void e_destination_clear (EDestination *);
-
-gboolean e_destination_is_empty (const EDestination *);
-gboolean e_destination_is_valid (const EDestination *);
-gboolean e_destination_equal (const EDestination *a, const EDestination *b);
-
-void e_destination_set_card (EDestination *, ECard *card, gint email_num);
-void e_destination_set_book_uri (EDestination *, const gchar *uri);
-void e_destination_set_card_uid (EDestination *, const gchar *uid, gint email_num);
-
-void e_destination_set_name (EDestination *, const gchar *name);
-void e_destination_set_email (EDestination *, const gchar *email);
-
-void e_destination_set_html_mail_pref (EDestination *, gboolean);
-
-gboolean e_destination_contains_card (const EDestination *);
-gboolean e_destination_from_card (const EDestination *);
-
-void e_destination_use_card (EDestination *, EDestinationCardCallback cb, gpointer closure);
-
-ECard *e_destination_get_card (const EDestination *);
-const gchar *e_destination_get_book_uri (const EDestination *);
-const gchar *e_destination_get_card_uid (const EDestination *);
-gint e_destination_get_email_num (const EDestination *);
-
-const gchar *e_destination_get_name (const EDestination *); /* "Jane Smith" */
-const gchar *e_destination_get_email (const EDestination *); /* "jane@assbarn.com" */
-const gchar *e_destination_get_address (const EDestination *); /* "Jane Smith <jane@assbarn.com>" (or a comma-sep set of such for a list) */
-
-void e_destination_set_raw (EDestination *, const gchar *free_form_string);
-const gchar *e_destination_get_textrep (const EDestination *); /* "Jane Smith" or "jane@assbarn.com" */
-
-gboolean e_destination_is_evolution_list (const EDestination *);
-gboolean e_destination_list_show_addresses (const EDestination *);
-
-/* If true, they want HTML mail. */
-gboolean e_destination_get_html_mail_pref (const EDestination *);
-
-gboolean e_destination_allow_cardification (const EDestination *);
-void e_destination_set_allow_cardification (EDestination *, gboolean);
-void e_destination_cardify (EDestination *, EBook *);
-void e_destination_cardify_delayed (EDestination *, EBook *, gint delay); /* delay < 0: "default" */
-void e_destination_cancel_cardify (EDestination *);
-gboolean e_destination_uncardify (EDestination *);
-
-gboolean e_destination_revert (EDestination *);
-
-gchar *e_destination_get_address_textv (EDestination **);
-
-xmlNodePtr e_destination_xml_encode (const EDestination *dest);
-gboolean e_destination_xml_decode (EDestination *dest, xmlNodePtr node);
-
-gchar *e_destination_export (const EDestination *);
-EDestination *e_destination_import (const gchar *str);
-
-gchar *e_destination_exportv (EDestination **);
-EDestination **e_destination_importv (const gchar *str);
-
-EDestination **e_destination_list_to_vector (GList *);
-void e_destination_freev (EDestination **);
-
-void e_destination_touch (EDestination *);
-void e_destination_touchv (EDestination **);
-
-
-#endif /* __E_DESTINATION_H__ */
-
diff --git a/addressbook/backend/ebook/evolution-vcard-importer.c b/addressbook/backend/ebook/evolution-vcard-importer.c
deleted file mode 100644
index e32593b4fb..0000000000
--- a/addressbook/backend/ebook/evolution-vcard-importer.c
+++ /dev/null
@@ -1,260 +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>
-
-#include <e-util/e-path.h>
-
-#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Addressbook_VCard_ImporterFactory"
-
-static BonoboGenericFactory *factory = NULL;
-
-typedef struct {
- char *filename;
- char *folderpath;
- GList *cardlist;
- GList *iterator;
- EBook *book;
- gboolean ready;
-} VCardImporter;
-
-static void
-add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure)
-{
- ECard *card = E_CARD(closure);
- gtk_object_unref(GTK_OBJECT(card));
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- VCardImporter *gci = (VCardImporter *) closure;
-
- gci->cardlist = e_card_load_cards_from_file_with_default_charset(gci->filename, "ISO-8859-1");
- gci->ready = TRUE;
-}
-
-static void
-ebook_create (VCardImporter *gci)
-{
- gchar *path, *uri;
- gchar *epath;
-
- 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");
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- epath = e_path_to_physical (uri, gci->folderpath);
- g_free (uri);
- uri = g_strdup_printf ("%s/addressbook.db", epath);
- g_free (epath);
-
- 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)
-{
- VCardImporter *gci = (VCardImporter *) 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
-};
-
-/* Actually check the contents of this file */
-static gboolean
-check_file_is_vcard (const char *filename)
-{
- FILE *handle;
- char line[4096];
- gboolean result;
-
- handle = fopen (filename, "r");
- if (handle == NULL) {
- g_print ("\n");
- return FALSE;
- }
-
- fgets (line, 4096, handle);
- if (line == NULL) {
- fclose (handle);
- g_print ("\n");
- return FALSE;
- }
-
- if (strncmp (line, "BEGIN:VCARD", 11) == 0) {
- result = TRUE;
- } else {
- result = FALSE;
- }
-
- fclose (handle);
- return result;
-}
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- char *ext;
- int i;
-
- ext = strrchr (filename, '.');
- if (ext == NULL) {
- return check_file_is_vcard (filename);
- }
- for (i = 0; supported_extensions[i] != NULL; i++) {
- if (strcmp (supported_extensions[i], ext) == 0)
- return check_file_is_vcard (filename);
- }
-
- return FALSE;
-}
-
-static void
-importer_destroy_cb (GtkObject *object,
- VCardImporter *gci)
-{
- gtk_main_quit ();
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *importer,
- const char *filename,
- const char *folderpath,
- void *closure)
-{
- VCardImporter *gci;
-
- if (check_file_is_vcard (filename) == FALSE) {
- return FALSE;
- }
-
- gci = (VCardImporter *) closure;
- gci->filename = g_strdup (filename);
- gci->folderpath = g_strdup (folderpath);
- gci->cardlist = NULL;
- gci->iterator = NULL;
- gci->ready = FALSE;
- ebook_create (gci);
-
- return TRUE;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionImporter *importer;
- VCardImporter *gci;
-
- gci = g_new (VCardImporter, 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-VCard-Importer",
- PACKAGE, 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 6f592a4664..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_assume_utf8(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_with_default_charset("gnomecard.vcf", "ISO-8859-1");
- 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 c1d58a88bf..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_assume_utf8(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]);
- e_book_add_card(book, card, add_card_cb, card);
- }
- g_strfreev(strings);
-}
-
-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 dd591d6c51..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:Ximian, 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@ximian.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_with_default_charset (cardstr, "ISO-8859-1");
- 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_assume_utf8(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 8a38ccf4e1..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_assume_utf8(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 44b20ebdde..0000000000
--- a/addressbook/backend/ebook/test-client.c
+++ /dev/null
@@ -1,203 +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@ximian.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_assume_utf8(card);
- printf("Get all cards callback: [%s]\n", vcard);
- g_free(vcard);
- gtk_object_unref(GTK_OBJECT(card));
- }
-}
-
-static void
-get_card_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure)
-{
- char *vcard;
-
- vcard = e_card_get_vcard_assume_utf8(card);
- 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
-add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure)
-{
- GTimer *timer;
-
- printf ("Status: %d\n", status);
-
- printf ("Id: %s\n", id);
-
- timer = g_timer_new ();
- g_timer_start (timer);
- e_book_get_card (book, id, get_card_cb, closure);
- g_timer_stop (timer);
- printf ("%g\n", g_timer_elapsed (timer, NULL));
-}
-
-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 342482d573..0000000000
--- a/addressbook/backend/idl/addressbook.idl
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 2000, Ximian, 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.
- */
- void getVCard (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,
- CardIdAlreadyExists,
- 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 notifyCardRequested (in CallStatus status, in VCard card);
-
- 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 ea150597c9..0000000000
--- a/addressbook/backend/pas/Makefile.am
+++ /dev/null
@@ -1,63 +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 = \
- $(DB3_CFLAGS) \
- $(LDAP_CFLAGS) \
- -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_SCHEMA = \
- evolutionperson.schema
-
-LDAP_BACKEND_FILES = pas-backend-ldap.c pas-backend-ldap.h
-
-if ENABLE_LDAP
-LDAP_BACKEND = $(LDAP_BACKEND_FILES)
-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-card-sexp.c \
- pas-backend-card-sexp.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_FILES) $(LDAP_SCHEMA)
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 76a975330e..0000000000
--- a/addressbook/backend/pas/evolutionperson.schema
+++ /dev/null
@@ -1,192 +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)
-#
-# OIDs are broken up into the following:
-# 1.3.6.1.4.1.8506.1.?
-# .1 Syntaxes
-# .2 Attributes
-# .3 Objectclasses
-
-# primaryPhone
-attributetype ( 1.3.6.1.4.1.8506.1.2.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 ( 1.3.6.1.4.1.8506.1.2.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 ( 1.3.6.1.4.1.8506.1.2.3
- NAME ( 'homeFacsimileTelephoneNumber' 'homeFax' )
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.22 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.4
- NAME 'otherPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.5
- NAME 'businessRole'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.6
- NAME 'managerName'
- SUP name )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.7
- NAME 'assistantName'
- SUP name )
-
-# spouseName
-# single valued (/me smirks)
-attributetype ( 1.3.6.1.4.1.8506.1.2.8
- NAME 'spouseName'
- SUP name
- SINGLE-VALUE )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.9
- NAME 'otherPostalAddress'
- EQUALITY caseIgnoreListMatch
- SUBSTR caseIgnoreListSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.10
- NAME ( 'mailer' 'mua' )
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32} )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.11
- NAME ( 'birthDate' 'dob' )
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.12
- NAME 'anniversary'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.13
- NAME 'note'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.14
- NAME 'evolutionArbitrary'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} )
- )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.15
- NAME 'fileAs'
- SUP name )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.16
- NAME 'assistantPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.17
- NAME 'companyPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.18
- NAME 'callbackPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.19
- NAME ( 'otherFacsimileTelephoneNumber' 'otherFax' )
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.20
- NAME 'radio'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.21
- NAME 'telex'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.22
- NAME 'tty'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.23
- NAME 'categories'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.24
- NAME 'contact'
- EQUALITY distinguishedNameMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
-
-attributetype ( 1.3.6.1.4.1.8506.1.2.25
- NAME 'listName'
- SUP name
- SINGLE-VALUE )
-
-# evolutionPerson
-objectclass ( 1.3.6.1.4.1.8506.1.3.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 )
- )
-
-# evolutionPersonList
-objectclass ( 1.3.6.1.4.1.8506.1.3.2
- NAME 'evolutionPersonList'
- DESC 'Objectclass geared to Evolution Contact Lists'
- SUP top
- STRUCTURAL
- MUST (
- listName $ mail $ contact )
- )
diff --git a/addressbook/backend/pas/pas-backend-card-sexp.c b/addressbook/backend/pas/pas-backend-card-sexp.c
deleted file mode 100644
index a1b1fb6d35..0000000000
--- a/addressbook/backend/pas/pas-backend-card-sexp.c
+++ /dev/null
@@ -1,401 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include "pas-backend-card-sexp.h"
-
-#include <string.h>
-#include <e-util/e-sexp.h>
-#include <ebook/e-card-simple.h>
-#include <gal/widgets/e-unicode.h>
-
-static GtkObjectClass *parent_class;
-
-typedef struct _SearchContext SearchContext;
-
-struct _PASBackendCardSExpPrivate {
- ESExp *search_sexp;
- SearchContext *search_context;
-};
-
-struct _SearchContext {
- ECardSimple *card;
-};
-
-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 gboolean
-compare_category (ECardSimple *card, const char *str,
- char *(*compare)(const char*, const char*))
-{
- EList *categories;
- EIterator *iterator;
- ECard *ecard;
- gboolean ret_val = FALSE;
-
- gtk_object_get (GTK_OBJECT (card),
- "card", &ecard,
- NULL);
- gtk_object_get (GTK_OBJECT (ecard),
- "category_list", &categories,
- NULL);
-
- for (iterator = e_list_get_iterator(categories); e_iterator_is_valid (iterator); e_iterator_next (iterator)) {
- const char *category = e_iterator_get (iterator);
-
- if (compare(category, str)) {
- ret_val = TRUE;
- break;
- }
- }
-
- gtk_object_unref (GTK_OBJECT (iterator));
- e_card_free_empty_lists (ecard);
- return ret_val;
-}
-
-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
-#define PROP_TYPE_ID 0x04
- 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 ID_PROP {0, "id", NULL, PROP_TYPE_ID, 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"),
- ID_PROP,
- LIST_PROP ( "email", "email", compare_email ),
- LIST_PROP ( "phone", "phone", compare_phone ),
- LIST_PROP ( "address", "address", compare_address ),
- LIST_PROP ( "category", "category", compare_category ),
-};
-static int num_prop_infos = sizeof(prop_info_table) / sizeof(prop_info_table[0]);
-
-static ESExpResult *
-entry_compare(SearchContext *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;
- }
- g_free (prop);
- } 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);
- } else if (info->prop_type == PROP_TYPE_ID) {
- const char *prop = NULL;
- /* searches where the query's property
- maps directly to an ecard property */
-
- prop = e_card_get_id (ctx->card->card);
-
- if (prop && compare(prop, argv[1]->value.string)) {
- truth = TRUE;
- }
- if ((!prop) && compare("", argv[1]->value.string)) {
- truth = TRUE;
- }
- }
-
- /* 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)
-{
- SearchContext *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)
-{
- SearchContext *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)
-{
- SearchContext *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)
-{
- SearchContext *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 },
-};
-
-gboolean
-pas_backend_card_sexp_match_vcard (PASBackendCardSExp *sexp, const char *vcard)
-{
- ECard *card;
- ESExpResult *r;
- gboolean retval;
-
- card = e_card_new ((char*)vcard);
- sexp->priv->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 (!sexp->priv->search_context->card)
- return FALSE;
-
- r = e_sexp_eval(sexp->priv->search_sexp);
-
- retval = (r && r->type == ESEXP_RES_BOOL && r->value.bool);
-
- gtk_object_unref(GTK_OBJECT(sexp->priv->search_context->card));
-
- e_sexp_result_free(sexp->priv->search_sexp, r);
-
- return retval;
-}
-
-
-
-/**
- * pas_backend_card_sexp_new:
- */
-PASBackendCardSExp *
-pas_backend_card_sexp_new (const char *text)
-{
- PASBackendCardSExp *sexp = gtk_type_new (pas_backend_card_sexp_get_type ());
- int esexp_error;
- int i;
-
- sexp->priv->search_sexp = e_sexp_new();
-
- for(i=0;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction(sexp->priv->search_sexp, 0, symbols[i].name,
- (ESExpIFunc *)symbols[i].func, sexp->priv->search_context);
- } else {
- e_sexp_add_function(sexp->priv->search_sexp, 0, symbols[i].name,
- symbols[i].func, sexp->priv->search_context);
- }
- }
-
- e_sexp_input_text(sexp->priv->search_sexp, text, strlen(text));
- esexp_error = e_sexp_parse(sexp->priv->search_sexp);
-
- if (esexp_error == -1) {
- gtk_object_unref (GTK_OBJECT (sexp));
- sexp = NULL;
- }
-
- return sexp;
-}
-
-static void
-pas_backend_card_sexp_destroy (GtkObject *object)
-{
- PASBackendCardSExp *sexp = PAS_BACKEND_CARD_SEXP (object);
- e_sexp_unref(sexp->priv->search_sexp);
-
- g_free (sexp->priv->search_context);
- g_free (sexp->priv);
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
-pas_backend_card_sexp_class_init (PASBackendCardSExpClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
-
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- /* Set the virtual methods. */
-
- object_class->destroy = pas_backend_card_sexp_destroy;
-}
-
-static void
-pas_backend_card_sexp_init (PASBackendCardSExp *sexp)
-{
- PASBackendCardSExpPrivate *priv;
-
- priv = g_new0 (PASBackendCardSExpPrivate, 1);
-
- sexp->priv = priv;
- priv->search_context = g_new (SearchContext, 1);
-}
-
-/**
- * pas_backend_card_sexp_get_type:
- */
-GtkType
-pas_backend_card_sexp_get_type (void)
-{
- static GtkType type = 0;
-
- if (! type) {
- GtkTypeInfo info = {
- "PASBackendCardSExp",
- sizeof (PASBackendCardSExp),
- sizeof (PASBackendCardSExpClass),
- (GtkClassInitFunc) pas_backend_card_sexp_class_init,
- (GtkObjectInitFunc) pas_backend_card_sexp_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-card-sexp.h b/addressbook/backend/pas/pas-backend-card-sexp.h
deleted file mode 100644
index e1cb75c77d..0000000000
--- a/addressbook/backend/pas/pas-backend-card-sexp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#ifndef __PAS_BACKEND_CARD_SEXP_H__
-#define __PAS_BACKEND_CARD_SEXP_H__
-
-#include <gtk/gtk.h>
-
-typedef struct _PASBackendCardSExpPrivate PASBackendCardSExpPrivate;
-
-typedef struct {
- GtkObject parent_object;
- PASBackendCardSExpPrivate *priv;
-} PASBackendCardSExp;
-
-typedef struct {
- GtkObjectClass parent_class;
-} PASBackendCardSExpClass;
-
-PASBackendCardSExp *pas_backend_card_sexp_new (const char *text);
-GtkType pas_backend_card_sexp_get_type (void);
-
-gboolean pas_backend_card_sexp_match_vcard (PASBackendCardSExp *sexp, const char *vcard);
-
-#define PAS_BACKEND_CARD_SEXP_TYPE (pas_backend_card_sexp_get_type ())
-#define PAS_BACKEND_CARD_SEXP(o) (GTK_CHECK_CAST ((o), PAS_BACKEND_CARD_SEXP_TYPE, PASBackendCardSExp))
-#define PAS_BACKEND_CARD_SEXP_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BACKEND_TYPE, PASBackendCardSExpClass))
-#define PAS_IS_BACKEND_CARD_SEXP(o) (GTK_CHECK_TYPE ((o), PAS_BACKEND_CARD_SEXP_TYPE))
-#define PAS_IS_BACKEND_CARD_SEXP_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BACKEND_CARD_SEXP_TYPE))
-
-#endif /* __PAS_BACKEND_CARD_SEXP_H__ */
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
deleted file mode 100644
index 56c6485e7f..0000000000
--- a/addressbook/backend/pas/pas-backend-file.c
+++ /dev/null
@@ -1,1461 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 2000, Ximian, Inc.
- */
-
-#include "config.h"
-#include "pas-backend-file.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-#include <db.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <e-util/e-db3-utils.h>
-
-#if DB_VERSION_MAJOR != 3 || \
- DB_VERSION_MINOR != 1 || \
- DB_VERSION_PATCH != 17
-#error Including wrong DB3. Need libdb 3.1.17.
-#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-dbhash.h>
-#include <e-util/e-db3-utils.h>
-#include "pas-book.h"
-#include "pas-card-cursor.h"
-#include "pas-backend-card-sexp.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;
- PASBackendCardSExp *card_sexp;
- gchar *change_id;
- PASBackendFileChangeContext *change_context;
-};
-
-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->card_sexp = book_view->card_sexp;
- if (new_book_view->card_sexp)
- gtk_object_ref(GTK_OBJECT(new_book_view->card_sexp));
-
- 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->card_sexp)
- gtk_object_unref (GTK_OBJECT(book_view->card_sexp));
-
- 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)
-{
- memset (dbt, 0, sizeof (*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
-vcard_matches_search (const PASBackendFileBookView *view, char *vcard_string)
-{
- /* If this is not a search context view, it doesn't match be default */
- if (view->card_sexp == NULL)
- return FALSE;
-
- return pas_backend_card_sexp_match_vcard (view->card_sexp, vcard_string);
-}
-
-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 = 1000;
- DB *db = bf->priv->file_db;
- DBC *dbc;
- DBT id_dbt, vcard_dbt;
- int file_version_name_len;
- PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview;
- gboolean search_needed;
-
- if (!bf->priv->loaded)
- return;
-
- search_needed = TRUE;
-
- if ( ! strcmp (view->search, "(contains \"x-evolution-any-field\" \"\")"))
- search_needed = FALSE;
-
- if (search_needed)
- pas_book_view_notify_status_message (view->book_view, _("Searching..."));
- else
- pas_book_view_notify_status_message (view->book_view, _("Loading..."));
-
- if (view->card_sexp)
- gtk_object_unref (GTK_OBJECT(view->card_sexp));
-
- view->card_sexp = pas_backend_card_sexp_new (view->search);
-
- if (!view->card_sexp) {
- /* need a different error message here. */
- pas_book_view_notify_status_message (view->book_view, _("Error in search expression."));
- pas_book_view_notify_complete (view->book_view);
- return;
- }
-
- file_version_name_len = strlen (PAS_BACKEND_FILE_VERSION_NAME);
-
- db_error = db->cursor (db, NULL, &dbc, 0);
-
- memset (&id_dbt, 0, sizeof (id_dbt));
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
-
- if (db_error != 0) {
- g_warning ("pas_backend_file_search: error building list\n");
- } else {
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_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 ((!search_needed) || vcard_matches_search (view, vcard_string)) {
- cards = g_list_prepend (cards, g_strdup (vcard_string));
- }
-
- card_count ++;
-
- /* If we've accumulated a number of checks, pass them off to the client. */
- if (card_count >= card_threshold) {
- cards = g_list_reverse (cards);
- 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 overly complicated. But I like it. */
- if (card_threshold < card_threshold_max) {
- card_threshold = MIN (2*card_threshold, card_threshold_max);
- }
- }
- }
-
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
- }
- dbc->c_close (dbc);
-
- if (db_error != DB_NOTFOUND) {
- 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);
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
- db_error = db->get (db, NULL, &id_dbt, &vcard_dbt, 0);
-
- if (db_error != 0) {
- char *id = id_dbt.data;
-
- ctx->del_ids = g_list_append (ctx->del_ids, g_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;
- DBC *dbc;
- PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview;
- PASBackendFileChangeContext *ctx = cnstview->change_context;
-
- memset (&id_dbt, 0, sizeof (id_dbt));
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
-
- 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->cursor (db, NULL, &dbc, 0);
-
- if (db_error != 0) {
- g_warning ("pas_backend_file_changes: error building list\n");
- } else {
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_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)) {
- ECard *card;
- char *id = id_dbt.data;
- char *vcard_string;
-
- /* Remove fields the user can't change
- * and can change without the rest of the
- * card changing
- */
- card = e_card_new (vcard_dbt.data);
- gtk_object_set (GTK_OBJECT (card), "last_use", NULL, "use_score", 0.0, NULL);
- vcard_string = e_card_get_vcard_assume_utf8 (card);
- gtk_object_unref (GTK_OBJECT (card));
-
- /* 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,
- g_strdup(vcard_string));
- ctx->add_ids = g_list_append (ctx->add_ids, g_strdup(id));
- break;
- case E_DBHASH_STATUS_DIFFERENT:
- ctx->mod_cards = g_list_append (ctx->mod_cards,
- g_strdup(vcard_string));
- ctx->mod_ids = g_list_append (ctx->mod_ids, g_strdup(id));
- break;
- }
- }
-
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
- }
- dbc->c_close (dbc);
- }
-
- e_dbhash_foreach_key (ehash, (EDbHashFunc)pas_backend_file_changes_foreach_key, view->change_context);
-
- /* Send the changes */
- if (db_error != DB_NOTFOUND) {
- 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);
- }
-
- /* 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);
- g_free (i->data);
- g_free (v->data);
- }
- 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);
- g_free (i->data);
- g_free (v->data);
- }
- for (i = ctx->del_ids; i != NULL; i = i->next){
- char *id = i->data;
-
- e_dbhash_remove (ehash, id);
- g_free (i->data);
- }
-
- e_dbhash_write (ehash);
- e_dbhash_destroy (ehash);
-}
-
-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_assume_utf8(card);
-
- string_to_dbt (vcard, &vcard_dbt);
-
- db_error = db->put (db, NULL, &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)) {
- bonobo_object_ref (BONOBO_OBJECT (view->book_view));
- pas_book_view_notify_add_1 (view->book_view, vcard);
- pas_book_view_notify_complete (view->book_view);
- bonobo_object_unref (BONOBO_OBJECT (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);
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
-
- db_error = db->get (db, NULL, &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, NULL, &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)) {
- bonobo_object_ref (BONOBO_OBJECT (view->book_view));
- pas_book_view_notify_remove (view->book_view, req->id);
- pas_book_view_notify_complete (view->book_view);
- bonobo_object_unref (BONOBO_OBJECT (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;
- const 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);
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
-
- /* get the old ecard - the one that's presently in the db */
- db_error = db->get (db, NULL, &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, NULL, &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_cards_list(PASBackend *backend,
- PASBackendFileCursorPrivate *cursor_data,
- char *search)
-{
- PASBackendFile *bf = PAS_BACKEND_FILE (backend);
- DB *db = bf->priv->file_db;
- DBC *dbc;
- int db_error;
- DBT id_dbt, vcard_dbt;
- PASBackendCardSExp *card_sexp = NULL;
- gboolean search_needed;
-
- cursor_data->elements = NULL;
-
- search_needed = TRUE;
-
- if (!strcmp (search, "(contains \"x-evolution-any-field\" \"\")"))
- search_needed = FALSE;
-
- card_sexp = pas_backend_card_sexp_new (search);
-
- if (!card_sexp)
- g_warning ("pas_backend_file_build_all_cards_list: error building list\n");
-
- db_error = db->cursor (db, NULL, &dbc, 0);
-
- if (db_error != 0) {
- g_warning ("pas_backend_file_build_all_cards_list: error building list\n");
- }
-
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
- memset (&id_dbt, 0, sizeof (id_dbt));
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_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)) {
-
- if ((!search_needed) || (card_sexp != NULL && pas_backend_card_sexp_match_vcard (card_sexp, vcard_dbt.data))) {
- cursor_data->elements = g_list_prepend (cursor_data->elements, g_strdup (vcard_dbt.data));
- }
- }
-
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
-
- }
-
- if (db_error != DB_NOTFOUND) {
- g_warning ("pas_backend_file_build_all_cards_list: error building list\n");
- }
- else {
- cursor_data->num_elements = g_list_length (cursor_data->elements);
- cursor_data->elements = g_list_reverse (cursor_data->elements);
- }
-}
-
-static void
-pas_backend_file_process_get_vcard (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- PASBackendFile *bf;
- DB *db;
- DBT id_dbt, vcard_dbt;
- int db_error = 0;
- char *card;
- GNOME_Evolution_Addressbook_BookListener_CallStatus status;
-
- bf = PAS_BACKEND_FILE (pas_book_get_backend (book));
- db = bf->priv->file_db;
-
- string_to_dbt (req->id, &id_dbt);
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
-
- db_error = db->get (db, NULL, &id_dbt, &vcard_dbt, 0);
-
- if (db_error == 0) {
- card = vcard_dbt.data;
- status = GNOME_Evolution_Addressbook_BookListener_Success;
- } else {
- card = NULL;
- status = GNOME_Evolution_Addressbook_BookListener_CardNotFound;
- }
-
- pas_book_respond_get_vcard (book,
- status,
- card);
-}
-
-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_cards_list(backend, cursor_data, req->search);
-
- 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;
- 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.card_sexp = NULL;
- view.change_id = NULL;
- view.change_context = 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_unref (BONOBO_OBJECT (book_view));
- 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.card_sexp = 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 *simple;
- ECard *card;
- int i;
-
- /* we support everything, so instantiate an e-card, and loop
- through all fields, adding their ecard_fields. */
-
- card = e_card_new ("");
- simple = e_card_simple_new (card);
-
- for (i = 0; i < E_CARD_SIMPLE_FIELD_LAST; i ++)
- e_list_append (fields, e_card_simple_get_ecard_field (simple, i));
-
- gtk_object_unref (GTK_OBJECT (card));
- gtk_object_unref (GTK_OBJECT (simple));
-
- pas_book_respond_get_supported_fields (book,
- GNOME_Evolution_Addressbook_BookListener_Success,
- fields);
-}
-
-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 GetVCard:
- pas_backend_file_process_get_vcard (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 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, NULL, &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);
- memset (&version_dbt, 0, sizeof (version_dbt));
-
- db_error = db->get (db, NULL, &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: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;
- int db_error;
- DB *db;
- int major, minor, patch;
-
- g_assert (bf->priv->loaded == FALSE);
-
- db_version (&major, &minor, &patch);
-
- if (major != 3 ||
- minor != 1 ||
- patch != 17) {
- g_warning ("Wrong version of libdb.");
- return FALSE;
- }
-
- filename = pas_backend_file_extract_path_from_uri (uri);
-
- db_error = e_db3_utils_maybe_recover (filename);
- if (db_error != 0)
- return FALSE;
-
- db_error = db_create (&db, NULL, 0);
- if (db_error != 0)
- return FALSE;
-
- db_error = db->open (db, filename, NULL, DB_HASH, 0, 0666);
-
- if (db_error == DB_OLD_VERSION) {
- db_error = e_db3_utils_upgrade_format (filename);
-
- if (db_error != 0)
- return FALSE;
-
- db_error = db->open (db, filename, NULL, DB_HASH, 0, 0666);
- }
-
- bf->priv->file_db = db;
-
- if (db_error == 0) {
- writable = TRUE;
- } else {
- db_error = db->open (db, filename, NULL, DB_HASH, DB_RDONLY, 0666);
-
- if (db_error != 0) {
- db_error = db->open (db, filename, NULL, DB_HASH, DB_CREATE, 0666);
-
- if (db_error == 0) {
- 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 (db_error != 0) {
- bf->priv->file_db = NULL;
- return FALSE;
- }
-
- bf->priv->writable = writable;
-
- if (pas_backend_file_maybe_upgrade_db (bf))
- bf->priv->loaded = TRUE;
- else {
- db->close (db, 0);
- bf->priv->file_db = NULL;
- bf->priv->writable = FALSE;
- return FALSE;
- }
-
- g_free(bf->priv->uri);
- bf->priv->uri = g_strdup (uri);
-
- /* 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);
- }
-
- 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);
-
- 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);
- }
-
- bonobo_object_unref (BONOBO_OBJECT (book));
-
- 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 6c29c8b7a2..0000000000
--- a/addressbook/backend/pas/pas-backend-file.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2000, Ximian, 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 5cc587f8bd..0000000000
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ /dev/null
@@ -1,2545 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Chris Toshok (toshok@ximian.com)
- *
- * Copyright 2000, Ximian, Inc.
- */
-
-#define DEBUG
-
-#include "config.h"
-#include <fcntl.h>
-#include <time.h>
-#include <lber.h>
-#include <gtk/gtksignal.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.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
-
-#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-backend-card-sexp.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;
- PASBackendCardSExp *card_sexp;
- 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);
- 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);
- gtk_object_unref (GTK_OBJECT (view->card_sexp));
- 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, query_prop);
-
- /* handle the list attributes here */
- if (!strcmp (query_prop, "email")) {
- e_list_append (bl->priv->supported_fields, "email_2");
- e_list_append (bl->priv->supported_fields, "email_3");
- }
- else if (!strcmp (query_prop, "business_phone")) {
- e_list_append (bl->priv->supported_fields, "business_phone_2");
- }
- else if (!strcmp (query_prop, "home_phone")) {
- e_list_append (bl->priv->supported_fields, "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;
-
- 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_init (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;
-
- /* 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);
- }
- 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;
- }
-
-}
-
-static ECardSimple *
-search_for_dn (PASBackendLDAP *bl, const char *dn)
-{
- LDAP *ldap = bl->priv->ldap;
- LDAPMessage *res, *e;
- ECardSimple *result = NULL;
-
- if (ldap_search_s (ldap,
- dn,
- LDAP_SCOPE_BASE,
- "(objectclass=*)",
- 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);
- }
-
- return result;
-}
-
-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."));
- pas_book_view_notify_complete (op->view);
- }
-
- 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 if (ldap_error == LDAP_ALREADY_EXISTS)
- return GNOME_Evolution_Addressbook_BookListener_CardIdAlreadyExists;
- 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);
- e_card_simple_set_id (new_card, dn); /* for the notification code below */
-
- 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 (ldap_error == LDAP_SUCCESS) {
- /* the card was created, let's let the views know about it */
- GList *l;
- for (l = bl->priv->book_views; l; l = l->next) {
- CORBA_Environment ev;
- gboolean match;
- PASBackendLDAPBookView *view = l->data;
-
- CORBA_exception_init(&ev);
-
- bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
-
- match = pas_backend_card_sexp_match_vcard (view->card_sexp,
- e_card_simple_get_vcard_assume_utf8 (new_card));
- if (match)
- pas_book_view_notify_add_1 (view->book_view, e_card_simple_get_vcard_assume_utf8 (new_card));
- pas_book_view_notify_complete (view->book_view);
-
- bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
- }
- }
- else {
- ldap_perror (ldap, "ldap_add_s");
- }
-
- if (op->view)
- pas_book_view_notify_complete (op->view);
-
- /* 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;
- ECardSimple *simple;
-
- if (op->view)
- pas_book_view_notify_status_message (op->view, _("Removing card from LDAP server..."));
-
- simple = search_for_dn (bl, remove_op->id);
-
- if (simple) {
- ldap_error = ldap_delete_s (bl->priv->ldap, remove_op->id);
-
- if (ldap_error == LDAP_SUCCESS) {
- /* the card was removed, let's let the views know about it */
- GList *l;
- for (l = bl->priv->book_views; l; l = l->next) {
- CORBA_Environment ev;
- gboolean match;
- PASBackendLDAPBookView *view = l->data;
-
- CORBA_exception_init(&ev);
-
- bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
-
- match = pas_backend_card_sexp_match_vcard (view->card_sexp,
- e_card_simple_get_vcard_assume_utf8 (simple));
- if (match)
- pas_book_view_notify_remove (view->book_view, remove_op->id);
- pas_book_view_notify_complete (view->book_view);
-
- bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
- }
- }
- else {
- ldap_perror (bl->priv->ldap, "ldap_delete_s");
- }
-
- response = ldap_error_to_response (ldap_error);
- }
- else
- response = GNOME_Evolution_Addressbook_BookListener_CardNotFound;
-
- pas_book_respond_remove (remove_op->op.book,
- response);
-
- if (op->view)
- pas_book_view_notify_complete (op->view);
-
- /* 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 gboolean
-modify_card_handler (PASBackend *backend, LDAPOp *op)
-{
- LDAPModifyOp *modify_op = (LDAPModifyOp*)op;
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- ECard *new_ecard;
- const 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;
-
- if (op->view)
- pas_book_view_notify_status_message (op->view, _("Modifying card from LDAP server..."));
-
- 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) {
-
- /* the card was modified, let's let the views know about it */
- GList *l;
- for (l = bl->priv->book_views; l; l = l->next) {
- CORBA_Environment ev;
- gboolean old_match, new_match;
- PASBackendLDAPBookView *view = l->data;
-
- CORBA_exception_init(&ev);
-
- bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
-
- old_match = pas_backend_card_sexp_match_vcard (view->card_sexp,
- e_card_simple_get_vcard_assume_utf8 (current_card));
- new_match = pas_backend_card_sexp_match_vcard (view->card_sexp,
- modify_op->vcard);
- if (old_match && new_match)
- pas_book_view_notify_change_1 (view->book_view, modify_op->vcard);
- else if (new_match)
- pas_book_view_notify_add_1 (view->book_view, modify_op->vcard);
- else /* if (old_match) */
- pas_book_view_notify_remove (view->book_view, e_card_simple_get_id (new_card));
- pas_book_view_notify_complete (view->book_view);
-
- bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
- }
- }
- else {
- 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);
-
- if (op->view)
- pas_book_view_notify_complete (op->view);
-
- /* 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);
-}
-
-
-static void
-pas_backend_ldap_process_get_vcard (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- PASBackendLDAP *bl;
- ECardSimple *simple;
-
- bl = PAS_BACKEND_LDAP (pas_book_get_backend (book));
-
- simple = search_for_dn (bl, req->id);
-
- if (simple) {
- pas_book_respond_get_vcard (book,
- GNOME_Evolution_Addressbook_BookListener_Success,
- e_card_simple_get_vcard_assume_utf8 (simple));
- gtk_object_unref (GTK_OBJECT (simple));
- }
- else {
- pas_book_respond_get_vcard (book,
- GNOME_Evolution_Addressbook_BookListener_CardNotFound,
- "");
- }
-}
-
-
-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;
-}
-
-#define IS_RFC2254_CHAR(c) ((c) == '*' || (c) =='\\' || (c) == '(' || (c) == ')' || (c) == '\0')
-static char hex[] = "0123456789abcdef";
-static char *
-rfc2254_escape(char *str)
-{
- int i;
- int len = strlen(str);
- int newlen = 0;
-
- for (i = 0; i < len; i ++) {
- if (IS_RFC2254_CHAR(str[i]))
- newlen += 3;
- else
- newlen ++;
- }
-
- if (len == newlen) {
- return g_strdup (str);
- }
- else {
- char *newstr = g_malloc0 (newlen + 1);
- int j = 0;
- for (i = 0; i < len; i ++) {
- if (IS_RFC2254_CHAR(str[i])) {
- newstr[j++] = '\\';
- newstr[j++] = hex[(str[i]&0xf0) >> 4];
- newstr[j++] = hex[str[i]&0x0f];
- }
- else {
- newstr[j++] = str[i];
- }
- }
- return newstr;
- }
-
-}
-
-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 = rfc2254_escape(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 *match_str;
-
- match_str = g_strdup_printf("=*%s%s)",
- str, one_star ? "" : "*");
-
- query_length = 3; /* strlen ("(|") + strlen (")") */
-
- for (i = 0; i < num_prop_infos; i ++) {
- query_length += 1 /* strlen ("(") */ + strlen(prop_info[i].ldap_attr) + strlen (match_str);
- }
-
- big_query = g_malloc0(query_length + 1);
- strcat (big_query, "(|");
- 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, ")");
-
- *list = g_list_prepend(*list, big_query);
-
- g_free (match_str);
- }
- 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 ? "" : "*"));
- }
-
- g_free (str);
- }
-
- 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 = rfc2254_escape(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));
- else {
- g_warning ("unknown query property\n");
- /* we want something that'll always be false */
- *list = g_list_prepend(*list,
- g_strdup("objectClass=MyBarnIsBiggerThanYourBarn"));
- }
-
- g_free (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 = rfc2254_escape(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));
- g_free (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 = rfc2254_escape(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));
- g_free (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) {
- 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;
- }
- }
- else {
- g_warning ("conversion to ldap query string failed");
- retval = NULL;
- }
-
- 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 (!g_strcasecmp (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, _("Receiving LDAP search results..."));
-
- 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;
- 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_assume_utf8 (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->card_sexp = pas_backend_card_sexp_new (view->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;
- char *query;
- LDAPMessage *res, *e;
-
- query = g_strdup_printf ("(mail=%s)", req->user);
-
- if (ldap_search_s (bl->priv->ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- query,
- NULL, 0, &res) != -1) {
- char *dn;
-
- e = ldap_first_entry (bl->priv->ldap, res);
- dn = ldap_get_dn (bl->priv->ldap, e);
-
- printf ("authenticating as %s\n", dn);
-
- ldap_error = ldap_simple_bind_s(bl->priv->ldap,
- dn,
- req->passwd);
-
- pas_book_respond_authenticate_user (book,
- ldap_error_to_response (ldap_error));
-
- bl->priv->writable = (ldap_error == LDAP_SUCCESS);
-
- if (!bl->priv->evolutionPersonChecked)
- check_schema_support (bl);
-
- ldap_msgfree (res);
- }
- else {
- pas_book_respond_authenticate_user (book, GNOME_Evolution_Addressbook_BookListener_PermissionDenied);
- }
-
- pas_book_report_writable (book, bl->priv->writable);
-
- g_free (query);
-}
-
-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 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 GetVCard:
- pas_backend_ldap_process_get_vcard (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 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);
-
- 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);
-
- priv->supported_fields = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL);
-
- backend->priv = priv;
-}
-
-/**
- * pas_backend_ldap_get_type:
- */
-GtkType
-pas_backend_ldap_get_type (void)
-{
- static GtkType type = 0;
-
- if (! type) {
- GtkTypeInfo info = {
- "PASBackendLDAP",
- sizeof (PASBackendLDAP),
- sizeof (PASBackendLDAPClass),
- (GtkClassInitFunc) pas_backend_ldap_class_init,
- (GtkObjectInitFunc) pas_backend_ldap_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (pas_backend_get_type (), &info);
- }
-
- return type;
-}
diff --git a/addressbook/backend/pas/pas-backend-ldap.h b/addressbook/backend/pas/pas-backend-ldap.h
deleted file mode 100644
index 9f32c58bbf..0000000000
--- a/addressbook/backend/pas/pas-backend-ldap.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2000, Ximian, 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 593ed624d2..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 bd9a12c2a0..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 cb7b291a9e..0000000000
--- a/addressbook/backend/pas/pas-book-factory.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 2000, Ximian, Inc.
- */
-
-#include <config.h>
-#include <ctype.h>
-
-#include <gtk/gtksignal.h>
-#include <liboaf/liboaf.h>
-#include "addressbook.h"
-#include "pas-book-factory.h"
-
-#define DEFAULT_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;
-
- /* OAFIID of the factory */
- char *iid;
-
- /* 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, const char *iid)
-{
- PASBookFactoryPrivate *priv;
- CORBA_Object obj;
- OAF_RegistrationResult result;
- char *tmp_iid;
-
- 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);
-
- /* if iid is NULL, use the default factory OAFIID */
- if (iid)
- tmp_iid = g_strdup (iid);
- else
- tmp_iid = g_strdup (DEFAULT_PAS_BOOK_FACTORY_OAF_ID);
-
- obj = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
-
- result = oaf_active_server_register (tmp_iid, obj);
-
- switch (result) {
- case OAF_REG_SUCCESS:
- priv->registered = TRUE;
- priv->iid = tmp_iid;
- return TRUE;
- case OAF_REG_NOT_LISTED:
- g_message ("Error registering the PAS factory: not listed");
- break;
- case OAF_REG_ALREADY_ACTIVE:
- g_message ("Error registering the PAS factory: already active");
- break;
- case OAF_REG_ERROR:
- default:
- g_message ("Error registering the PAS factory: generic error");
- break;
- }
-
- g_free (tmp_iid);
- 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 (factory->priv->iid, obj);
- factory->priv->registered = FALSE;
- }
-
- g_free (factory->priv->iid);
-
- 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 22d4a87b3e..0000000000
--- a/addressbook/backend/pas/pas-book-factory.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2000, Ximian, 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, const char *iid);
-
-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 b5266a6b35..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, Ximian, 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 26bf360f17..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 306d7e5f39..0000000000
--- a/addressbook/backend/pas/pas-book.c
+++ /dev/null
@@ -1,871 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * pas-book.c
- *
- * Copyright 2000, Ximian, 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;
-
- 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;
- gtk_object_unref (GTK_OBJECT (book));
- 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) {
- gtk_object_ref (GTK_OBJECT (book));
- book->priv->idle_id = g_idle_add ((GSourceFunc) pas_book_check_queue, book);
- }
-}
-
-static void
-pas_book_queue_create_card (PASBook *book, const char *vcard)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = CreateCard;
- req->vcard = g_strdup (vcard);
-
- pas_book_queue_request (book, req);
-}
-
-static void
-pas_book_queue_remove_card (PASBook *book, const char *id)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = RemoveCard;
- req->id = g_strdup (id);
-
- pas_book_queue_request (book, req);
-}
-
-static void
-pas_book_queue_modify_card (PASBook *book, const char *vcard)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = ModifyCard;
- req->vcard = g_strdup (vcard);
-
- pas_book_queue_request (book, req);
-}
-
-static void
-pas_book_queue_get_cursor (PASBook *book, const char *search)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = GetCursor;
- req->search = g_strdup(search);
-
- pas_book_queue_request (book, req);
-}
-
-static void
-pas_book_queue_get_vcard (PASBook *book, const char *id)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = GetVCard;
- req->id = g_strdup(id);
-
- 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 void
-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));
-
- pas_book_queue_get_vcard (book, id);
-}
-
-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_vcard (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- char *vcard)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookListener_notifyCardRequested (
- book->priv->listener, status, vcard, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_respond_get_card: 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)
-{
- 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);
-
- 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->backend = backend;
-
- return TRUE;
-}
-
-/**
- * pas_book_new:
- */
-PASBook *
-pas_book_new (PASBackend *backend,
- GNOME_Evolution_Addressbook_BookListener listener)
-{
- PASBook *book;
-
- g_return_val_if_fail (listener != CORBA_OBJECT_NIL, NULL);
-
- book = gtk_type_new (pas_book_get_type ());
-
- if (! pas_book_construct (book, backend, listener)) {
- 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->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 6f5832d914..0000000000
--- a/addressbook/backend/pas/pas-book.h
+++ /dev/null
@@ -1,114 +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@ximian.com)
- *
- * Copyright 2000, Ximian, 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,
- GetVCard,
- 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 gboolean (*PASBookCanWriteFn) (PASBook *book);
-typedef gboolean (*PASBookCanWriteCardFn) (PASBook *book, const char *id);
-
-PASBook *pas_book_new (PASBackend *backend,
- GNOME_Evolution_Addressbook_BookListener listener);
-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_vcard (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- char *vcard);
-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);
-
-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 572f63f46e..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@ximian.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 70ecb5e718..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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 d382736b46..0000000000
--- a/addressbook/conduit/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_srcdir)/e-util \
- -I$(top_builddir)/e-util \
- $(PISOCK_CFLAGS) \
- $(GNOME_PILOT_CFLAGS) \
- $(BONOBO_GNOME_CFLAGS) \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\"
-
-# 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/ename/libename-static.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeconduit-static.la \
- $(top_builddir)/camel/libcamel-static.la \
- $(top_builddir)/libibex/libibex.la \
- $(PISOCK_LIBS) \
- $(GNOME_PILOT_LIBS) \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_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 d227bbc6d4..0000000000
--- a/addressbook/conduit/address-conduit-config.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Addressbook Conduit Configuration
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 __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-address-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-address-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 3cc22559e3..0000000000
--- a/addressbook/conduit/address-conduit.c
+++ /dev/null
@@ -1,1214 +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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 <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.2"
-#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);
-
- if (e_card_evolution_list (card))
- continue;
-
- 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 = local->local.category;
- 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);
-
- /* Handle the fields and category we don't sync by making sure
- * we don't overwrite them
- */
- if (local->local.ID != 0) {
- char record[0xffff];
- int cat = 0;
-
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
- ctxt->dbi->db_handle,
- local->local.ID, &record,
- NULL, NULL, NULL, &cat) > 0) {
- local->local.category = cat;
- unpack_Address (local->addr, record, 0xffff);
- }
- }
-
- 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);
- }
-
- /* Phone numbers */
- 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;
-
- /* Note */
- local->addr->entry[entryNote] = e_pilot_utf8_to_pchar (ecard->note);
-
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-local_record_from_uid (EAddrLocalRecord *local,
- const char *uid,
- EAddrConduitContext *ctxt)
-{
- ECard *ecard = NULL;
- GList *l;
-
- g_assert (local != NULL);
-
- for (l = ctxt->cards; l != NULL; l = l->next) {
- ecard = l->data;
-
- if (ecard->id && !strcmp (ecard->id, uid))
- break;
-
- ecard = NULL;
- }
-
- 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 *txt;
- char *stringparts[3];
- int i;
- ECardSimpleEmailId last_email;
- ECardSimpleField last_business, last_home;
-
- 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;
-
- txt = g_strjoinv (" ", stringparts);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_FULL_NAME, e_pilot_utf8_from_pchar (txt));
- g_free (txt);
-
- txt = get_entry_text (address, entryTitle);
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_TITLE, txt);
- g_free (txt);
-
- txt = get_entry_text (address, entryCompany);
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_ORG, txt);
- if (i == 0)
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_FILE_AS, txt);
- g_free (txt);
-
- /* Address */
- memset (&delivery, 0, sizeof (ECardDeliveryAddress));
- delivery.flags = E_CARD_ADDR_WORK;
- delivery.street = get_entry_text (address, entryAddress);
- delivery.city = get_entry_text (address, entryCity);
- delivery.region = get_entry_text (address, entryState);
- delivery.country = get_entry_text (address, entryCountry);
- 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);
-
- last_email = E_CARD_SIMPLE_EMAIL_ID_EMAIL;
- last_business = E_CARD_SIMPLE_FIELD_PHONE_BUSINESS;
- last_home = E_CARD_SIMPLE_FIELD_PHONE_HOME;
-
- /* 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_email(simple, last_email, phonenum);
-
- switch (last_email) {
- case E_CARD_SIMPLE_EMAIL_ID_EMAIL:
- last_email = E_CARD_SIMPLE_EMAIL_ID_EMAIL_2;
- break;
- case E_CARD_SIMPLE_EMAIL_ID_EMAIL_2:
- last_email = E_CARD_SIMPLE_EMAIL_ID_EMAIL_3;
- break;
- default:
- WARN ("ran out of email fields in ecard_from_remote_record!");
- }
- } else if (!strcmp (phonelabel, "Home")) {
- e_card_simple_set(simple, last_home, phonenum);
-
- switch (last_home) {
- case E_CARD_SIMPLE_FIELD_PHONE_HOME:
- last_home = E_CARD_SIMPLE_FIELD_PHONE_HOME_2;
- break;
- default:
- WARN ("ran out of home phone fields in ecard_from_remote_record!");
- }
- } else if (!strcmp (phonelabel, "Work")) {
- e_card_simple_set(simple, last_business, phonenum);
-
- switch (last_business) {
- case E_CARD_SIMPLE_FIELD_PHONE_BUSINESS:
- last_business = E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2;
- break;
- default:
- WARN ("ran out of home phone fields in ecard_from_remote_record!");
- }
- } 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);
- }
-
- /* Note */
- txt = get_entry_text (address, entryNote);
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_NOTE, txt);
- g_free (txt);
-
- 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, TRUE);
- } 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) {
- ECard *card = E_CARD (l->data);
- CardObjectChange *coc;
-
- if (e_card_evolution_list (card))
- continue;
-
- coc = g_new0 (CardObjectChange, 1);
- coc->card = card;
- 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, (gpointer)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) {
- ECard *card = E_CARD (l->data);
- CardObjectChange *coc;
-
- if (e_card_evolution_list (card))
- continue;
-
- 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, (gpointer)e_card_get_id (coc->card), coc);
- }
-}
-
-
-static void
-card_removed (EBookView *book_view, const char *id, EAddrConduitContext *ctxt)
-{
- CardObjectChange *coc;
-
- /* If its deleted but not in the map its probably a list */
- if (e_pilot_map_lookup_pid (ctxt->map, id) == 0)
- return;
-
- 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, (gpointer)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->dbi = dbi;
- 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); */
-
- 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, (gpointer)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)
-{
- 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 (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);
-
- 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 0b9cc5e551..0000000000
--- a/addressbook/conduit/address-conduit.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Addressbook Conduit Capplet
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 __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 Addressbook 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 address 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;
- GnomePilotDBInfo *dbi;
-
- 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/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 6b0850da5d..0000000000
--- a/addressbook/gui/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = contact-editor contact-list-editor merging 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 b050e8ebb8..0000000000
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
+++ /dev/null
@@ -1,134 +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_ShellComponent"
- type="exe"
- location="evolution-addressbook">
-
- <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 68138c8390..0000000000
--- a/addressbook/gui/component/Makefile.am
+++ /dev/null
@@ -1,95 +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/contact-editor \
- -I$(top_srcdir)/addressbook/gui/contact-list-editor \
- -I$(top_srcdir)/addressbook/gui/minicard \
- -I$(top_srcdir)/addressbook/gui/widgets \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- $(BONOBO_HTML_GNOME_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(datadir)"/images/evolution\"
-
-
-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.la \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_HTML_GNOME_LIBS) \
- $(BONOBO_CONF_LIBS) \
- $(top_builddir)/addressbook/gui/widgets/libeminicard.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.a \
- $(top_builddir)/addressbook/gui/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)/addressbook/gui/merging/libecardmerging.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 3e414f86f9..0000000000
--- a/addressbook/gui/component/addressbook-component.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* addressbook-component.c
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <bonobo/bonobo-generic-factory.h>
-
-#include "evolution-shell-component.h"
-#include "evolution-shell-component-dnd.h"
-#include "evolution-storage.h"
-
-#include "ebook/e-book.h"
-#include "ebook/e-card.h"
-#include "ebook/e-book-util.h"
-
-#include "addressbook-storage.h"
-#include "addressbook-component.h"
-#include "addressbook.h"
-#include "addressbook/gui/merging/e-card-merging.h"
-#include "addressbook/gui/widgets/e-addressbook-util.h"
-
-
-
-#define GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID "OAFIID:GNOME_Evolution_Addressbook_ShellComponent"
-
-EvolutionShellClient *global_shell_client;
-
-EvolutionShellClient *
-addressbook_component_get_shell_client (void)
-{
- return global_shell_client;
-}
-
-static char *accepted_dnd_types[] = {
- "text/x-vcard",
- NULL
-};
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "contacts", "evolution-contacts.png", N_("Contacts"), N_("Folder containing contact information"),
- TRUE, accepted_dnd_types, NULL },
- { "ldap-contacts", "ldap-16.png", N_("LDAP Server"), N_("LDAP server containing contact information"),
- TRUE, accepted_dnd_types, NULL },
- { NULL }
-};
-
-#define IS_CONTACT_TYPE(x) (g_strcasecmp((x), "contacts") == 0 || g_strcasecmp ((x), "ldap-contacts") == 0)
-
-/* 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 (!IS_CONTACT_TYPE (type))
- 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 (!IS_CONTACT_TYPE (type))
- 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);
-}
-
-static void
-remove_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
- char *addressbook_db_path, *subdir_path;
- struct stat sb;
- int rv;
-
- CORBA_exception_init(&ev);
-
- if (!IS_CONTACT_TYPE (type)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
-
- if (!strncmp (physical_uri, "ldap://", 7)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
- if (strncmp (physical_uri, "file://", 7)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
-
- subdir_path = g_concat_dir_and_file (physical_uri + 7, "subfolders");
- rv = stat (subdir_path, &sb);
- g_free (subdir_path);
- if (rv != -1) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_HAS_SUBFOLDERS,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
-
- addressbook_db_path = g_concat_dir_and_file (physical_uri + 7, "addressbook.db");
- rv = unlink (addressbook_db_path);
- g_free (addressbook_db_path);
- if (rv == 0) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_OK,
- &ev);
- }
- else {
- if (errno == EACCES || errno == EPERM)
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- else
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI, /*XXX*/
- &ev);
- }
- CORBA_exception_free(&ev);
-}
-
-static void
-xfer_folder (EvolutionShellComponent *shell_component,
- const char *source_physical_uri,
- const char *destination_physical_uri,
- const char *type,
- gboolean remove_source,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
- char *source_path;
- char *destination_path;
-
- if (!IS_CONTACT_TYPE (type)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
-
- if (!strncmp (source_physical_uri, "ldap://", 7)
- || !strncmp (destination_physical_uri, "ldap://", 7)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
- if (strncmp (source_physical_uri, "file://", 7)
- || strncmp (destination_physical_uri, "file://", 7)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- CORBA_exception_free(&ev);
- return;
- }
-
- /* strip the 'file://' from the beginning of each uri and add addressbook.db */
- source_path = g_concat_dir_and_file (source_physical_uri + 7, "addressbook.db");
- destination_path = g_concat_dir_and_file (destination_physical_uri + 7, "addressbook.db");
-
- CORBA_exception_init (&ev);
-
- /* XXX always fail for now, until the above stuff is written */
- GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED, &ev);
-
- g_free (source_path);
- g_free (destination_path);
- CORBA_exception_free (&ev);
-}
-
-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)
-{
- g_print ("should get dnd selection for %s\n", physical_uri);
- return NULL;
-}
-
-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();
-}
-
-/* FIXME We should perhaps take the time to figure out if the book is editable. */
-static void
-local_addressbook_cb (EBook *book, gpointer closure)
-{
- gboolean is_list = GPOINTER_TO_INT (closure);
- if (book == NULL)
- return;
- if (is_list)
- e_addressbook_show_contact_list_editor (book, e_card_new(""), TRUE, TRUE);
- else
- e_addressbook_show_contact_editor (book, e_card_new(""), TRUE, TRUE);
-}
-
-static void
-nonlocal_addressbook_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- if (status == E_BOOK_STATUS_SUCCESS)
- local_addressbook_cb (book, closure);
- else
- local_addressbook_cb (NULL, closure);
-}
-
-static void
-user_create_new_item_cb (EvolutionShellComponent *shell_component,
- const char *id,
- const char *parent_folder_physical_uri,
- const char *parent_folder_type,
- gpointer data)
-{
- gboolean is_contact_list;
- if (!strcmp (id, "contact")) {
- is_contact_list = FALSE;
- } else if (!strcmp (id, "contact_list")) {
- is_contact_list = TRUE;
- } else {
- g_warning ("Don't know how to create item of type \"%s\"", id);
- return;
- }
- if (IS_CONTACT_TYPE (parent_folder_type)) {
- EBook *book;
- gchar *uri;
-
- book = e_book_new ();
- uri = g_strdup_printf ("%s/addressbook.db", parent_folder_physical_uri);
-
- if (e_book_load_uri (book, uri, nonlocal_addressbook_cb, GINT_TO_POINTER (is_contact_list)) == 0)
- g_warning ("Couldn't load addressbook %s", uri);
-
- g_free (uri);
- } else {
- e_book_use_local_address_book (local_addressbook_cb, GINT_TO_POINTER (is_contact_list));
- }
-}
-
-
-/* Destination side DnD */
-
-static CORBA_boolean
-destination_folder_handle_motion (EvolutionShellComponentDndDestinationFolder *folder,
- const char *physical_uri,
- const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context * destination_context,
- GNOME_Evolution_ShellComponentDnd_Action * suggested_action_return,
- gpointer user_data)
-{
- g_print ("in destination_folder_handle_motion (%s)\n", physical_uri);
- *suggested_action_return = GNOME_Evolution_ShellComponentDnd_ACTION_MOVE;
- return TRUE;
-}
-
-static void
-dnd_drop_book_open_cb (EBook *book, EBookStatus status, GList *card_list)
-{
- GList *l;
-
- for (l = card_list; l; l = l->next) {
- ECard *card = l->data;
-
- e_card_merging_book_add_card (book, card, NULL /* XXX */, NULL);
- }
-}
-
-static CORBA_boolean
-destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *folder,
- const char *physical_uri,
- const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context * destination_context,
- const GNOME_Evolution_ShellComponentDnd_Action action,
- const GNOME_Evolution_ShellComponentDnd_Data * data,
- gpointer user_data)
-{
- EBook *book;
- GList *card_list;
- char *expanded_uri;
-
- if (action == GNOME_Evolution_ShellComponentDnd_ACTION_LINK)
- return FALSE; /* we can't create links in our addressbook format */
-
- g_print ("in destination_folder_handle_drop (%s)\n", physical_uri);
-
- card_list = e_card_load_cards_from_string_with_default_charset (data->bytes._buffer, "ISO-8859-1");
-
- expanded_uri = addressbook_expand_uri (physical_uri);
-
- book = e_book_new ();
- e_book_load_uri (book, expanded_uri,
- (EBookCallback)dnd_drop_book_open_cb, card_list);
-
- g_free (expanded_uri);
-
- return TRUE;
-}
-
-
-/* The factory function. */
-
-static BonoboObject *
-create_component (void)
-{
- EvolutionShellComponent *shell_component;
- EvolutionShellComponentDndDestinationFolder *destination_interface;
-
- shell_component = evolution_shell_component_new (folder_types, NULL,
- create_view, create_folder,
- remove_folder, xfer_folder,
- NULL,
- get_dnd_selection,
- NULL);
-
- destination_interface = evolution_shell_component_dnd_destination_folder_new (destination_folder_handle_motion,
- destination_folder_handle_drop,
- shell_component);
-
- bonobo_object_add_interface (BONOBO_OBJECT (shell_component),
- BONOBO_OBJECT (destination_interface));
-
- evolution_shell_component_add_user_creatable_item (shell_component, "contact", _("New Contact"), _("New _Contact"), 'c');
- evolution_shell_component_add_user_creatable_item (shell_component, "contact_list", _("New Contact List"), _("New Contact _List"), 'l');
-
- 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);
- gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
- GTK_SIGNAL_FUNC (user_create_new_item_cb), NULL);
-
- return BONOBO_OBJECT (shell_component);
-}
-
-
-/* FIXME this should probably be renamed as we don't use factories anymore. */
-void
-addressbook_component_factory_init (void)
-{
- BonoboObject *object;
- int result;
-
- object = create_component ();
-
- /* FIXME: Handle errors better? */
-
- result = oaf_active_server_register (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID,
- bonobo_object_corba_objref (object));
- if (result == OAF_REG_ERROR)
- g_error ("Cannot register -- %s", GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID);
-}
diff --git a/addressbook/gui/component/addressbook-component.h b/addressbook/gui/component/addressbook-component.h
deleted file mode 100644
index e5dc74e17e..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 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 _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 6c5d4c9d99..0000000000
--- a/addressbook/gui/component/addressbook-config.c
+++ /dev/null
@@ -1,487 +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-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"
-
-typedef struct _AddressbookSourceDialog AddressbookSourceDialog;
-typedef struct _AddressbookSourcePageItem AddressbookSourcePageItem;
-
-struct _AddressbookSourceDialog {
- GladeXML *gui;
-
- GtkWidget *dialog;
-
- GtkWidget *notebook;
- GtkWidget *basic_notebook;
- GtkWidget *advanced_notebook;
-
- GtkWidget *name;
- GtkWidget *host;
-
- GtkWidget *port;
- GtkWidget *rootdn;
- GtkWidget *scope_optionmenu;
- AddressbookLDAPScopeType ldap_scope;
- GtkWidget *auth_checkbutton;
-#if the_ui_gods_smile_upon_me
- GtkWidget *remember_checkbutton;
-#endif
-
- gint id; /* button we closed the dialog with */
-
- AddressbookSource *source; /* our result if the Ok button was clicked */
-};
-
-static void
-addressbook_source_edit_changed (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- char *data;
- gboolean complete = TRUE;
-
- 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 (complete) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (dialog->host), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- g_free (data);
- }
-
- if (complete) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (dialog->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
-auth_checkbutton_changed (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- /* make sure the change is reflected by the state of the dialog's OK button */
- addressbook_source_edit_changed (item, dialog);
-
-#if the_ui_gods_smile_upon_me
- gtk_widget_set_sensitive (dialog->remember_checkbutton,
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton)));
-#endif
-}
-
-static void
-option_menuitem_activated (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- /* make sure the change is reflected by the state of the dialog's OK button */
- addressbook_source_edit_changed (item, dialog);
-
- dialog->ldap_scope = g_list_index (gtk_container_children (GTK_CONTAINER (item->parent)),
- item);
-}
-
-typedef struct {
- GtkWidget *notebook;
- int page_num;
-} FocusHelpClosure;
-
-static void
-focus_help (GtkWidget *w, GdkEventFocus *event, FocusHelpClosure *closure)
-{
- gtk_notebook_set_page (GTK_NOTEBOOK(closure->notebook), closure->page_num);
-}
-
-static void
-add_focus_handler (GtkWidget *widget, GtkWidget *notebook, int page_num)
-{
- FocusHelpClosure *focus_closure = g_new0 (FocusHelpClosure, 1);
- focus_closure->notebook = notebook;
- focus_closure->page_num = page_num;
-
- gtk_signal_connect_full (GTK_OBJECT (widget),
- "focus_in_event" /* XXX */,
- (GtkSignalFunc) focus_help, NULL,
- focus_closure,
- (GtkDestroyNotify) g_free,
- FALSE, FALSE);
-}
-
-static void
-addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, AddressbookSource *source)
-{
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->name), source ? source->name : "");
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->host), source ? source->host : "");
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->port), source ? source->port : "389");
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->rootdn), source ? source->rootdn : "");
-
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->scope_optionmenu), source ? source->scope : ADDRESSBOOK_LDAP_SCOPE_ONELEVEL);
- dialog->ldap_scope = source ? source->scope : ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton), source && source->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE);
-#if the_ui_gods_smile_upon_me
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->remember_checkbutton), source && source->remember_passwd);
-#endif
-}
-
-static AddressbookSource *
-addressbook_source_dialog_get_source (AddressbookSourceDialog *dialog)
-{
- AddressbookSource *source = g_new0 (AddressbookSource, 1);
-
- source->name = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->name));
- source->host = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->host));
- source->port = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->port));
- source->rootdn = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->rootdn));
- source->scope = dialog->ldap_scope;
- source->auth = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->auth_checkbutton)) ? ADDRESSBOOK_LDAP_AUTH_SIMPLE : ADDRESSBOOK_LDAP_AUTH_NONE;
-#if the_ui_gods_smile_upon_me
- source->remember_passwd = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->remember_checkbutton));
-#endif
-
- 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
-add_activate_cb (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (option_menuitem_activated), dialog);
-}
-
-static AddressbookSourceDialog*
-addressbook_source_dialog (GladeXML *gui, AddressbookSource *source, GtkWidget *parent)
-{
- AddressbookSourceDialog *dialog = g_new0 (AddressbookSourceDialog, 1);
- GtkWidget *menu;
-
- dialog->gui = gui;
-
- dialog->dialog = glade_xml_get_widget (gui, "add_addressbook");
-
- if (source)
- gtk_window_set_title (GTK_WINDOW (dialog->dialog), _("Edit Addressbook"));
-
- gtk_window_set_modal (GTK_WINDOW (dialog->dialog), TRUE);
- gtk_window_set_policy (GTK_WINDOW (dialog->dialog),
- FALSE, TRUE, FALSE);
-
- gnome_dialog_set_parent (GNOME_DIALOG (dialog->dialog),
- GTK_WINDOW (parent));
-
- dialog->notebook = glade_xml_get_widget (gui, "add-addressbook-notebook");
- dialog->basic_notebook = glade_xml_get_widget (gui, "basic-notebook");
- dialog->advanced_notebook = glade_xml_get_widget (gui, "advanced-notebook");
-
- /* BASIC STUFF */
- dialog->name = glade_xml_get_widget (gui, "account-name-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->name), "changed",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog);
- add_focus_handler (dialog->name, dialog->basic_notebook, 0);
-
- dialog->host = glade_xml_get_widget (gui, "server-name-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->host), "changed",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog);
- add_focus_handler (dialog->host, dialog->basic_notebook, 1);
-
- dialog->auth_checkbutton = glade_xml_get_widget (gui, "auth-checkbutton");
- add_focus_handler (dialog->auth_checkbutton, dialog->basic_notebook, 2);
- gtk_signal_connect (GTK_OBJECT (dialog->auth_checkbutton), "toggled",
- GTK_SIGNAL_FUNC (auth_checkbutton_changed), dialog);
-
-#if the_ui_gods_smile_upon_me
- dialog->remember_checkbutton = glade_xml_get_widget (gui, "remember-checkbutton");
- add_focus_handler (dialog->auth_checkbutton, dialog->basic_notebook, 3);
- gtk_signal_connect (GTK_OBJECT (dialog->remember_checkbutton), "toggled",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog);
- gtk_widget_set_sensitive (dialog->remember_checkbutton,
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton)));
-#endif
-
- /* ADVANCED STUFF */
- dialog->port = glade_xml_get_widget (gui, "port-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->port), "changed",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog);
- add_focus_handler (dialog->port, dialog->advanced_notebook, 0);
-
- dialog->rootdn = glade_xml_get_widget (gui, "rootdn-entry");
- gtk_signal_connect (GTK_OBJECT (dialog->rootdn), "changed",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog);
- add_focus_handler (dialog->rootdn, dialog->advanced_notebook, 1);
-
- dialog->scope_optionmenu = glade_xml_get_widget (gui, "scope-optionmenu");
- add_focus_handler (dialog->scope_optionmenu, dialog->advanced_notebook, 2);
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU(dialog->scope_optionmenu));
- gtk_container_foreach (GTK_CONTAINER (menu), (GtkCallback)add_activate_cb, dialog);
-
- /* fill in source info if there is some */
- addressbook_source_dialog_set_source (dialog, source);
-
- /* always start out on the first page. */
- gtk_notebook_set_page (GTK_NOTEBOOK (dialog->notebook), 0);
-
- 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_with_gui (GladeXML *gui, AddressbookSource *source, GtkWidget *parent)
-{
- AddressbookSourceDialog* dialog;
-
- dialog = addressbook_source_dialog (gui, source, parent);
-
- gnome_dialog_close_hides (GNOME_DIALOG(dialog->dialog), TRUE);
-
- dialog->id = gnome_dialog_run_and_close (GNOME_DIALOG (dialog->dialog));
-
- return dialog;
-}
-
-void
-addressbook_create_new_source (char *new_source, GtkWidget *parent)
-{
- AddressbookSourceDialog *dialog;
- GladeXML *gui;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/addressbook-config.glade", NULL);
-
- dialog = addressbook_source_dialog (gui, NULL, parent);
-
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->name), new_source);
-
- gnome_dialog_close_hides (GNOME_DIALOG(dialog->dialog), TRUE);
-
- dialog->id = gnome_dialog_run_and_close (GNOME_DIALOG (dialog->dialog));
-
- gtk_object_unref (GTK_OBJECT (dialog->gui));
-
- if (dialog->id == 0) {
- /* Ok was clicked */
- addressbook_storage_add_source (addressbook_source_copy(dialog->source));
- addressbook_storage_write_sources();
- }
-}
-
-
-
-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_with_gui (dialog->gui, 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->host;
-
- 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_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 0, TRUE);
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 1, TRUE);
- update_sensitivity (dialog);
- }
-}
-
-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_with_gui (dialog->gui, 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->host);
- gtk_clist_set_row_data (GTK_CLIST (dialog->clistSources), dialog->source_row, source);
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 0, TRUE);
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 1, TRUE);
- update_sensitivity (dialog);
- }
-}
-
-static void
-delete_source_clicked (GtkWidget *widget, AddressbookDialog *dialog)
-{
- gtk_clist_remove (GTK_CLIST (dialog->clistSources), dialog->source_row);
- dialog->source_row = -1;
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 0, TRUE);
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 1, TRUE);
- 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_close (GtkWidget *w, AddressbookDialog *dialog)
-{
- gtk_widget_destroy (dialog->dialog);
- gtk_object_unref (GTK_OBJECT (dialog->gui));
- g_free (dialog);
-}
-
-static void
-addressbook_dialog_apply (GtkWidget *w, AddressbookDialog *dialog)
-{
- int i;
-
- 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));
- }
-
- addressbook_storage_write_sources();
-
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 0, FALSE);
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 1, FALSE);
-}
-
-static void
-addressbook_dialog_ok (GtkWidget *w, AddressbookDialog *dialog)
-{
- addressbook_dialog_apply(w, dialog);
- addressbook_dialog_close(w, 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, "addressbook_sources");
-
- 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);
-
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 0, FALSE);
- gnome_dialog_set_sensitive (GNOME_DIALOG(dialog->dialog), 1, FALSE);
- 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->host;
-
- 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);
-
- gnome_dialog_button_connect (GNOME_DIALOG(dialog->dialog),
- 0 /* OK */, addressbook_dialog_ok, dialog);
-
- gnome_dialog_button_connect (GNOME_DIALOG(dialog->dialog),
- 1 /* APPLY */, addressbook_dialog_apply, dialog);
-
- gnome_dialog_button_connect (GNOME_DIALOG(dialog->dialog),
- 2 /* CLOSE */, addressbook_dialog_close, dialog);
-
- gnome_dialog_run (GNOME_DIALOG(dialog->dialog));
-}
diff --git a/addressbook/gui/component/addressbook-config.glade b/addressbook/gui/component/addressbook-config.glade
deleted file mode 100644
index 3e34388548..0000000000
--- a/addressbook/gui/component/addressbook-config.glade
+++ /dev/null
@@ -1,857 +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>GnomeDialog</class>
- <name>add_addressbook</name>
- <visible>False</visible>
- <title>Add Addressbook</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <default_width>417</default_width>
- <default_height>332</default_height>
- <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>GtkNotebook</class>
- <name>notebook2</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>vbox1</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label29</name>
- <label>The information below is required in order to add an addressbook. </label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</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>GtkTable</class>
- <name>table1</name>
- <border_width>3</border_width>
- <rows>3</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>3</row_spacing>
- <column_spacing>3</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label15</name>
- <label>_Account name:</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>account-name-entry</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>account-name-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>
- <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>GtkLabel</class>
- <name>label16</name>
- <label>_Server name:</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>server-name-entry</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>server-name-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>
- <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>GtkCheckButton</class>
- <name>auth-checkbutton</name>
- <can_focus>True</can_focus>
- <label>_My server requires authentication</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</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>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>basic-notebook</name>
- <show_tabs>False</show_tabs>
- <show_border>False</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>GtkLabel</class>
- <name>label28</name>
- <label>This name will be used to identify your account. It is for display purposes only.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label18</name>
- <label>label18</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>
- <name>label31</name>
- <label>This is the name of the server where your addressbook is located.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label19</name>
- <label>label19</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>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label12</name>
- <label>Basic</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>vbox2</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label30</name>
- <label>This information is not required for most ldap servers. </label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</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>GtkTable</class>
- <name>table2</name>
- <border_width>3</border_width>
- <rows>3</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>3</row_spacing>
- <column_spacing>3</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label22</name>
- <label>_Port:</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>port-entry</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>port-entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text>389</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>GtkLabel</class>
- <name>label23</name>
- <label>Search _base:</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>rootdn-entry</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>rootdn-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>
- <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>label24</name>
- <label>Search s_cope: </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>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>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>7.45058e-09</xalign>
- <yalign>7.45058e-09</yalign>
- <xscale>0</xscale>
- <yscale>1</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>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>scope-optionmenu</name>
- <can_focus>True</can_focus>
- <items>One
-Base
-Sub
-</items>
- <initial_choice>0</initial_choice>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>advanced-notebook</name>
- <show_tabs>False</show_tabs>
- <show_border>False</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>GtkLabel</class>
- <name>label35</name>
- <label>This is the port that your ldap server uses.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label25</name>
- <label>label18</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>
- <name>label36</name>
- <label>This is the base node for all your searches on the ldap server. Contact your server administrator for more information.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label26</name>
- <label>label19</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>
- <name>label37</name>
- <label>This information is used by your ldap server to specify which nodes are used in a search. Contact your server administrator for more information.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label27</name>
- <label>label20</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>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label13</name>
- <label>Advanced</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>GnomeDialog</class>
- <name>addressbook_sources</name>
- <visible>False</visible>
- <title>Addressbook Sources</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <default_width>355</default_width>
- <default_height>285</default_height>
- <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>dialog-vbox2</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_area2</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>button7</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>button8</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>button9</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <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>
- <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>100,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>label43</name>
- <label>Account 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>label44</name>
- <label>Server 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>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label45</name>
- <label>
-</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>GtkVButtonBox</class>
- <name>vbuttonbox3</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>0</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>True</expand>
- <fill>True</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>De_lete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </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 980fe2e5eb..0000000000
--- a/addressbook/gui/component/addressbook-config.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* addressbook-storage.h
- *
- * 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: Chris Toshok
- */
-
-#ifndef __ADDRESSBOOK_CONFIG_H__
-#define __ADDRESSBOOK_CONFIG_H__
-
-#include "addressbook-storage.h"
-
-void addressbook_config (GNOME_Evolution_Shell shell);
-void addressbook_create_new_source (char *new_source, GtkWidget *parent);
-
-#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 305751aefd..0000000000
--- a/addressbook/gui/component/addressbook-factory.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * sample-control-factory.c
- *
- * Copyright 1999, Ximian, 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 <camel/camel.h>
-
-#ifdef GTKHTML_HAVE_GCONF
-#include <gconf/gconf.h>
-#endif
-
-#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"));
-
-#ifdef GTKHTML_HAVE_GCONF
- gconf_init (argc, argv, NULL);
-#endif
-
- 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();
-
-#if 0
- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
-#endif
-
- g_thread_init (NULL);
- camel_type_init ();
-
- 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 6154969b14..0000000000
--- a/addressbook/gui/component/addressbook-storage.c
+++ /dev/null
@@ -1,590 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-ldap-storage.c
- *
- * 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: Chris Toshok
- */
-
-/* The addressbook-sources.xml file goes like this:
-
- <?xml version="1.0"?>
- <addressbooks>
- <contactserver>
- <name>LDAP Server</name>
- <host>ldap.server.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <authmethod>simple</authmethod>
- <emailaddr>toshok@blubag.com</emailaddr>
- <rememberpass/>
- </contactserver>
- </addressbooks>
- */
-
-#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 <gtk/gtk.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.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 "e-util/e-unicode-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 (const char *file_path);
-static gboolean save_source_data (const char *file_path);
-static void deregister_storage (void);
-
-static GList *sources;
-static EvolutionStorage *storage;
-static char *storage_path;
-static GNOME_Evolution_Shell corba_shell;
-
-void
-addressbook_storage_setup (EvolutionShellComponent *shell_component,
- const char *evolution_homedir)
-{
- EvolutionShellClient *shell_client;
-
- 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));
-
- sources = NULL;
-
- if (storage_path)
- g_free (storage_path);
- storage_path = g_concat_dir_and_file (evolution_homedir, ADDRESSBOOK_SOURCES_XML);
- if (!load_source_data (storage_path))
- deregister_storage ();
-}
-
-#ifdef HAVE_LDAP
-static void
-notify_listener (const Bonobo_Listener listener,
- GNOME_Evolution_Storage_Result corba_result)
-{
- CORBA_any any;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- any._type = TC_GNOME_Evolution_Storage_Result;
- any._value = &corba_result;
-
- Bonobo_Listener_event (listener, "result", &any, &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static void
-remove_ldap_folder (EvolutionStorage *storage, const Bonobo_Listener listener,
- const CORBA_char *path, const CORBA_char *physical_uri,
- gpointer data)
-{
-
- addressbook_storage_remove_source (path + 1);
- addressbook_storage_write_sources();
-
- notify_listener (listener, GNOME_Evolution_Storage_OK);
-}
-
-static void
-create_ldap_folder (EvolutionStorage *storage, const Bonobo_Listener listener,
- const CORBA_char *path, const CORBA_char *type,
- const CORBA_char *description, const CORBA_char *parent_physical_uri,
- gpointer data)
-{
- if (strcmp (type, "ldap-contacts")) {
- notify_listener (listener, GNOME_Evolution_Storage_UNSUPPORTED_TYPE);
- return;
- }
-
- if (strcmp (parent_physical_uri, "")) {/* ldap servers can't have subfolders */
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
- addressbook_create_new_source (path + 1, NULL);
-
- notify_listener (listener, GNOME_Evolution_Storage_OK);
-}
-#endif
-
-
-EvolutionStorage *
-addressbook_get_other_contact_storage (void)
-{
-#ifdef HAVE_LDAP
- EvolutionStorageResult result;
-
- if (storage == NULL) {
- storage = evolution_storage_new (U_("Other Contacts"), NULL, NULL);
- gtk_signal_connect (GTK_OBJECT (storage),
- "remove_folder",
- GTK_SIGNAL_FUNC(remove_ldap_folder), NULL);
- gtk_signal_connect (GTK_OBJECT (storage),
- "create_folder",
- GTK_SIGNAL_FUNC(create_ldap_folder), NULL);
- result = evolution_storage_register_on_shell (storage, corba_shell);
- switch (result) {
- case EVOLUTION_STORAGE_OK:
- break;
- case EVOLUTION_STORAGE_ERROR_GENERIC :
- g_warning("register_storage: generic error");
- break;
- case EVOLUTION_STORAGE_ERROR_CORBA :
- g_warning("register_storage: corba error");
- break;
- case EVOLUTION_STORAGE_ERROR_ALREADYREGISTERED :
- g_warning("register_storage: already registered error");
- break;
- case EVOLUTION_STORAGE_ERROR_EXISTS :
- g_warning("register_storage: already exists error");
- break;
- default:
- g_warning("register_storage: other error");
- break;
- }
- }
-#endif
-
- return storage;
-}
-
-static void
-deregister_storage (void)
-{
- if (evolution_storage_deregister_on_shell (storage, corba_shell) !=
- EVOLUTION_STORAGE_OK) {
- g_warning("couldn't deregister storage");
- }
-
- storage = NULL;
-}
-
-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";
- 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
- 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);
-
- source->uri = g_strdup_printf ("ldap://%s:%s/%s??%s",
- source->host, source->port,
- source->rootdn, ldap_unparse_scope(source->scope));
-}
-
-static gboolean
-load_source_data (const char *file_path)
-{
- xmlDoc *doc;
- xmlNode *root;
- xmlNode *child;
-
- addressbook_get_other_contact_storage();
-
- tryagain:
- doc = xmlParseFile (file_path);
- if (doc == NULL) {
- /* Check to see if a addressbook-sources.xml.new file
- exists. If it does, rename it and try loading 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 (rv < 0) {
- g_error ("Failed to rename %s: %s\n",
- ADDRESSBOOK_SOURCES_XML,
- strerror(errno));
- return FALSE;
- } else
- goto tryagain;
- }
-
- g_free (new_path);
- return FALSE;
- }
-
- 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->port = get_string_value (child, "port");
- source->host = get_string_value (child, "host");
- source->rootdn = get_string_value (child, "rootdn");
- source->scope = ldap_parse_scope (get_string_value (child, "scope"));
- source->auth = ldap_parse_auth (get_string_value (child, "authmethod"));
- source->email_addr = get_string_value (child, "emailaddr");
- }
- 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,
- "ldap-contacts", source->uri,
- source->description, 0);
-
- sources = g_list_append (sources, source);
-
- g_free (path);
- }
-
- if (g_list_length (sources) == 0)
- deregister_storage();
-
- 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->port);
- xmlNewChild (source_root, NULL, (xmlChar *) "host",
- (xmlChar *) source->host);
- xmlNewChild (source_root, NULL, (xmlChar *) "rootdn",
- (xmlChar *) source->rootdn);
- xmlNewChild (source_root, NULL, (xmlChar *) "scope",
- (xmlChar *) ldap_unparse_scope(source->scope));
- xmlNewChild (source_root, NULL, (xmlChar *) "authmethod",
- (xmlChar *) ldap_unparse_auth(source->auth));
- if (source->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- xmlNewChild (source_root, NULL, (xmlChar *) "emailaddr",
- (xmlChar *) source->email_addr);
- if (source->remember_passwd)
- xmlNewChild (source_root, NULL, (xmlChar *) "rememberpass",
- NULL);
- }
-}
-
-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, (GFunc)ldap_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 */
- addressbook_get_other_contact_storage();
- path = g_strdup_printf ("/%s", source->name);
- evolution_storage_new_folder (storage, path, source->name, "ldap-contacts",
- source->uri, source->description, 0);
-
- g_free (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);
-
- if (g_list_length (sources) == 0)
- deregister_storage ();
-
- g_free (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);
- g_free (source->host);
- g_free (source->port);
- g_free (source->rootdn);
- g_free (source->email_addr);
-
- 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 (void)
-{
- g_list_foreach (sources, (GFunc)addressbook_source_foreach, NULL);
- g_list_free (sources);
- deregister_storage ();
- sources = NULL;
-}
-
-void
-addressbook_storage_write_sources (void)
-{
- save_source_data (storage_path);
-}
-
-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);
-
- copy->host = g_strdup (source->host);
- copy->port = g_strdup (source->port);
- copy->rootdn = g_strdup (source->rootdn);
- copy->scope = source->scope;
- copy->auth = source->auth;
- copy->email_addr = g_strdup (source->email_addr);
- copy->remember_passwd = source->remember_passwd;
-
- return copy;
-}
diff --git a/addressbook/gui/component/addressbook-storage.h b/addressbook/gui/component/addressbook-storage.h
deleted file mode 100644
index d4a918fe50..0000000000
--- a/addressbook/gui/component/addressbook-storage.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* addressbook-storage.h
- *
- * 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: Chris Toshok
- */
-
-#ifndef __ADDRESSBOOK_STORAGE_H__
-#define __ADDRESSBOOK_STORAGE_H__
-
-#include "evolution-shell-component.h"
-#include "evolution-storage.h"
-
-typedef enum {
- ADDRESSBOOK_SOURCE_LDAP,
- ADDRESSBOOK_SOURCE_FILE,
- ADDRESSBOOK_SOURCE_LAST
-} AddressbookSourceType;
-
-typedef enum {
- ADDRESSBOOK_LDAP_AUTH_NONE,
- ADDRESSBOOK_LDAP_AUTH_SIMPLE,
- ADDRESSBOOK_LDAP_AUTH_LAST
-} AddressbookLDAPAuthType;
-
-typedef enum {
- ADDRESSBOOK_LDAP_SCOPE_ONELEVEL,
- ADDRESSBOOK_LDAP_SCOPE_BASE,
- ADDRESSBOOK_LDAP_SCOPE_SUBTREE,
- ADDRESSBOOK_LDAP_SCOPE_LAST
-} AddressbookLDAPScopeType;
-
-typedef struct {
- AddressbookSourceType type;
- char *name;
- char *description;
- char *host;
- char *port;
- char *rootdn;
- AddressbookLDAPScopeType scope;
- AddressbookLDAPAuthType auth;
- char *email_addr; /* used in AUTH_SIMPLE */
- gboolean remember_passwd;
- char *uri; /* filled in from the above */
-} AddressbookSource;
-
-void addressbook_storage_setup (EvolutionShellComponent *shell_component,
- const char *evolution_homedir);
-
-EvolutionStorage *addressbook_get_other_contact_storage (void);
-GList *addressbook_storage_get_sources (void);
-AddressbookSource *addressbook_storage_get_source_by_uri (const char *uri);
-void addressbook_storage_clear_sources (void);
-void addressbook_storage_write_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 eb7cd4afb5..0000000000
--- a/addressbook/gui/component/addressbook.c
+++ /dev/null
@@ -1,989 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * addressbook.c:
- *
- * Author:
- * Chris Lahey (clahey@ximian.com)
- *
- * (C) 2000 Ximian, 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 <bonobo/bonobo-exception.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "e-util/e-categories-master-list-wombat.h"
-#include "e-util/e-sexp.h"
-#include "select-names/e-select-names.h"
-#include "select-names/e-select-names-manager.h"
-
-#include "evolution-shell-component-utils.h"
-#include "evolution-activity-client.h"
-#include "e-contact-editor.h"
-#include "e-contact-save-as.h"
-#include "addressbook-config.h"
-#include "addressbook.h"
-#include "addressbook-component.h"
-#include "addressbook/gui/search/e-addressbook-search-dialog.h"
-#include "addressbook/gui/widgets/e-addressbook-view.h"
-#include "addressbook/gui/widgets/e-addressbook-util.h"
-#include "addressbook/printing/e-contact-print.h"
-
-#include <ebook/e-book.h>
-#include <widgets/misc/e-search-bar.h>
-#include <widgets/misc/e-filter-bar.h>
-
-/* This is used for the addressbook status bar */
-#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "evolution-contacts-mini.png"
-static GdkPixbuf *progress_icon[2] = { NULL, NULL };
-
-#define d(x)
-
-#define PROPERTY_FOLDER_URI "folder_uri"
-
-#define PROPERTY_FOLDER_URI_IDX 1
-
-typedef struct {
- EAddressbookView *view;
- ESearchBar *search;
- GtkWidget *vbox;
- EvolutionActivityClient *activity;
- BonoboControl *control;
- BonoboPropertyBag *properties;
- char *uri;
- char *passwd;
-} AddressbookView;
-
-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_addressbook_show_contact_editor (book, e_card_new(""), TRUE, e_addressbook_view_can_create(view->view));
-}
-
-static void
-new_contact_list_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_addressbook_show_contact_list_editor (book, e_card_new(""), TRUE, e_addressbook_view_can_create(view->view));
-}
-
-static void
-save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_save_as(view->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)
-{
- AddressbookView *view = (AddressbookView *) user_data;
-
- gtk_widget_show(e_addressbook_search_dialog_new(view->view));
-}
-
-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
-print_preview_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_print_preview(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
-cut_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_cut(view->view);
-}
-
-static void
-copy_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_copy(view->view);
-}
-
-static void
-paste_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_paste(view->view);
-}
-
-static void
-select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_select_all (view->view);
-}
-
-static void
-send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_send(view->view);
-}
-
-static void
-send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_send_to(view->view);
-}
-
-static void
-update_command_state (EAddressbookView *eav, AddressbookView *view)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (view->control);
-
- /* New Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactNew",
- "sensitive",
- e_addressbook_view_can_create (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactNewList",
- "sensitive",
- e_addressbook_view_can_create (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSaveAsVCard",
- "sensitive",
- e_addressbook_view_can_save_as (view->view) ? "1" : "0", NULL);
-
- /* Print Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPrint",
- "sensitive",
- e_addressbook_view_can_print (view->view) ? "1" : "0", NULL);
-
- /* Print Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPrintPreview",
- "sensitive",
- e_addressbook_view_can_print (view->view) ? "1" : "0", NULL);
-
- /* Delete Contact */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactDelete",
- "sensitive",
- e_addressbook_view_can_delete (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCut",
- "sensitive",
- e_addressbook_view_can_cut (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsCopy",
- "sensitive",
- e_addressbook_view_can_copy (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsPaste",
- "sensitive",
- e_addressbook_view_can_paste (view->view) ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSelectAll",
- "sensitive",
- e_addressbook_view_can_select_all (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSendContactToOther",
- "sensitive",
- e_addressbook_view_can_send (view->view) ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactsSendMessageToContact",
- "sensitive",
- e_addressbook_view_can_send_to (view->view) ? "1" : "0", NULL);
-
-
- /* Stop */
- bonobo_ui_component_set_prop (uic,
- "/commands/ContactStop",
- "sensitive",
- e_addressbook_view_can_stop (view->view) ? "1" : "0", NULL);
-}
-
-static void
-change_view_type (AddressbookView *view, EAddressbookViewType view_type)
-{
- gtk_object_set (GTK_OBJECT (view->view), "type", view_type, NULL);
-}
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ContactsPrint", print_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsPrintPreview", print_preview_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsSaveAsVCard", save_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 ("ContactNewList", new_contact_list_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactDelete", delete_contact_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactStop", stop_loading_cb),
-
- BONOBO_UI_UNSAFE_VERB ("ContactsCut", cut_contacts_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsCopy", copy_contacts_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsPaste", paste_contacts_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsSelectAll", select_all_contacts_cb),
-
- BONOBO_UI_UNSAFE_VERB ("ContactsSendContactToOther", send_contact_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactsSendMessageToContact", send_contact_to_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/menu/File/New/NewFirstItem/ContactNew", "evolution-contacts-mini.png"),
- E_PIXMAP ("/menu/File/FileOps/ContactsSaveAsVCard", "save-as-16.png"),
- E_PIXMAP ("/menu/File/Print/ContactsPrint", "print.xpm"),
- E_PIXMAP ("/menu/File/Print/ContactsPrintPreview", "print-preview.xpm"),
-
- E_PIXMAP ("/menu/Edit/ContactsCut", "16_cut.png"),
- E_PIXMAP ("/menu/Edit/ContactsCopy", "16_copy.png"),
- E_PIXMAP ("/menu/Edit/ContactsPaste", "16_paste.png"),
- E_PIXMAP ("/menu/Edit/ContactDelete", "evolution-trash-mini.png"),
-
- E_PIXMAP ("/menu/Tools/ComponentPlaceholder/ToolSearch", "search-16.png"),
- E_PIXMAP ("/menu/Tools/ComponentPlaceholder/AddressbookConfig", "configure_16_addressbook.xpm"),
-
- E_PIXMAP ("/Toolbar/ContactNew", "new_contact.xpm"),
- E_PIXMAP ("/Toolbar/ContactNewList", "all_contacts.xpm"),
- E_PIXMAP ("/Toolbar/ContactsPrint", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/ContactDelete", "buttons/delete-message.png"),
-
- 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);
-
- e_pixmaps_update (uic, pixmaps);
-
- bonobo_ui_component_thaw (uic, NULL);
-
- update_command_state (view->view, view);
-}
-
-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);
- e_addressbook_view_discard_menus (view->view);
- }
-}
-
-static void
-addressbook_view_free(AddressbookView *view)
-{
- EBook *book;
-
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
- if (view->uri)
- gtk_object_unref (GTK_OBJECT (book));
-
- 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
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- AddressbookView *view = closure;
- AddressbookSource *source;
- source = addressbook_storage_get_source_by_uri (view->uri);
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- /* check if the addressbook needs authentication */
-
- if (source &&
- source->type == ADDRESSBOOK_SOURCE_LDAP &&
- source->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- int button;
- char *msg = g_strdup_printf (_("Please enter your email address and password for access to %s"), source->name);
- GtkWidget *dialog;
- GtkWidget *hbox;
- GtkWidget *table;
- GtkWidget *label;
- GtkWidget *email_entry;
- GtkWidget *password_entry;
-
- dialog = gnome_dialog_new (_("LDAP Authentication"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- label = gtk_label_new (msg);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG(dialog)->vbox), label, FALSE, FALSE, 0);
- g_free (msg);
-
- table = gtk_table_new (2, 2, FALSE);
- label = gtk_label_new (_("Email Address:"));
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1,
- 0, 1,
- 0, 0, 0, 3);
- email_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), email_entry,
- 1, 2,
- 0, 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 3);
-
- hbox = gtk_hbox_new (FALSE, 2);
- label = gtk_label_new (_("Password:"));
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1,
- 1, 2,
- GTK_FILL, 0, 0, 3);
- password_entry = gtk_entry_new ();
- gtk_entry_set_visibility (GTK_ENTRY(password_entry), FALSE);
- gtk_table_attach (GTK_TABLE (table), password_entry,
- 1, 2,
- 1, 2,
- GTK_EXPAND | GTK_FILL, 0, 0, 3);
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG(dialog)->vbox), table, TRUE, TRUE, 0);
-
- gtk_widget_show_all (GNOME_DIALOG(dialog)->vbox);
-
- /* fill in the saved email address for this source if there is one */
- if (source->email_addr && *source->email_addr) {
- e_utf8_gtk_entry_set_text (GTK_ENTRY(email_entry),
- source->email_addr);
- gtk_window_set_focus (GTK_WINDOW (dialog),
- password_entry);
- }
- else {
- gtk_window_set_focus (GTK_WINDOW (dialog),
- email_entry);
- }
-
- /* run the dialog */
- gnome_dialog_close_hides (GNOME_DIALOG(dialog), TRUE);
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- /* and get out the information if the user clicks ok */
- if (button == 0) {
- g_free (source->email_addr);
- source->email_addr = e_utf8_gtk_entry_get_text (GTK_ENTRY(email_entry));
- addressbook_storage_write_sources();
- view->passwd = e_utf8_gtk_entry_get_text (GTK_ENTRY(password_entry));
- e_book_authenticate_user (book, source->email_addr, view->passwd,
- book_auth_cb, closure);
- memset (view->passwd, 0, strlen (view->passwd)); /* clear out the passwd */
- g_free (view->passwd);
- view->passwd = NULL;
- gtk_widget_destroy (dialog);
- return;
- }
- else {
- gtk_widget_destroy (dialog);
- }
- }
-
-
- /* 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;
- warning_dialog = gnome_dialog_new (
- _("Unable to open addressbook"),
- GNOME_STOCK_BUTTON_CLOSE,
- NULL);
-
- if (source->type == ADDRESSBOOK_SOURCE_LDAP) {
-#if HAVE_LDAP
- label = gtk_label_new (
- _("We were unable to open this addressbook. This either\n"
- "means you have entered an incorrect URI, or the LDAP server\n"
- "is down"));
-#else
- label = gtk_label_new (
- _("This version of Evolution does not have LDAP support\n"
- "compiled in to it. If you want to use LDAP in Evolution\n"
- "you must compile the program from the CVS sources after\n"
- "retrieving OpenLDAP from the link below.\n"));
-#endif
- }
- else {
- label = gtk_label_new (
- _("We were unable to open this addressbook. Please check that the\n"
- "path exists and that you have permission to access it."));
- }
-
- 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);
-
-#ifndef HAVE_LDAP
- if (source->type == ADDRESSBOOK_SOURCE_LDAP) {
- GtkWidget *href;
- 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);
- }
-#endif
- 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);
- }
-}
-
-char *
-addressbook_expand_uri (const char *uri)
-{
- char *new_uri;
-
- if (!strncmp (uri, "file:", 5)) {
- if (strlen (uri + 7) > 3
- && !strcmp (uri + strlen(uri) - 3, ".db")) {
- /* it's a .db file */
- new_uri = g_strdup (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(uri + 7, "addressbook.db");
- new_uri = g_strdup_printf("file://%s", file_name);
- g_free(file_name);
- }
- }
- else {
- new_uri = g_strdup (uri);
- }
-
- return new_uri;
-}
-
-
-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));
-
- uri_data = addressbook_expand_uri (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;
- }
-}
-
-static ESearchBarItem addressbook_search_menu_items[] = {
- E_FILTERBAR_RESET,
- { NULL, -1, NULL },
-};
-
-enum {
- ESB_ANY,
- ESB_FULL_NAME,
- ESB_EMAIL,
- ESB_CATEGORY,
- ESB_ADVANCED
-};
-
-static ESearchBarItem addressbook_search_option_items[] = {
- { N_("Any field contains"), ESB_ANY, NULL },
- { N_("Name contains"), ESB_FULL_NAME, NULL },
- { N_("Email contains"), ESB_EMAIL, NULL },
- { N_("Category is"), ESB_CATEGORY, NULL }, /* We attach subitems below */
- { N_("Advanced..."), ESB_ADVANCED, NULL },
- { NULL, -1, NULL }
-};
-
-static void
-addressbook_menu_activated (ESearchBar *esb, int id, AddressbookView *view)
-{
- switch (id) {
- case E_FILTERBAR_RESET_ID:
- /* e_addressbook_view_show_all(view->view); */
-
- /* Fix option menu if we are using "Category is" */
- if (e_search_bar_get_item_id (esb) == ESB_CATEGORY) {
-
- e_search_bar_set_subitem_id (esb, G_MAXINT);
-
- } else {
-
- e_search_bar_set_text (esb, "");
-
- }
-
- break;
- }
-}
-
-static ECategoriesMasterList *
-get_master_list (void)
-{
- static ECategoriesMasterList *category_list = NULL;
-
- if (category_list == NULL)
- category_list = e_categories_master_list_wombat_new ();
- return category_list;
-}
-
-static void
-addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
-{
- ECategoriesMasterList *master_list;
- char *search_word, *search_query;
- const char *category_name;
- int search_type, subid;
-
- gtk_object_get(GTK_OBJECT(esb),
- "text", &search_word,
- "item_id", &search_type,
- NULL);
-
- if (search_type == ESB_ADVANCED) {
- gtk_widget_show(e_addressbook_search_dialog_new(view->view));
- }
- else {
- if ((search_word && strlen (search_word)) || search_type == ESB_CATEGORY) {
- GString *s = g_string_new ("");
- e_sexp_encode_string (s, search_word);
- switch (search_type) {
- case ESB_ANY:
- search_query = g_strdup_printf ("(contains \"x-evolution-any-field\" %s)",
- s->str);
- break;
- case ESB_FULL_NAME:
- search_query = g_strdup_printf ("(contains \"full_name\" %s)",
- s->str);
- break;
- case ESB_EMAIL:
- search_query = g_strdup_printf ("(contains \"email\" %s)",
- s->str);
- break;
- case ESB_CATEGORY:
- subid = e_search_bar_get_subitem_id (esb);
-
- if (subid < 0 || subid == G_MAXINT) {
- /* match everything */
- search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")");
- } else {
- master_list = get_master_list ();
- category_name = e_categories_master_list_nth (master_list, subid);
- search_query = g_strdup_printf ("(contains \"category\" \"%s\")", category_name);
- }
- break;
- default:
- search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")");
- break;
- }
- g_string_free (s, TRUE);
- } else
- search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")");
-
- if (search_query)
- 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)
-{
-
- if (!message || !*message) {
- if (view->activity) {
- gtk_object_unref (GTK_OBJECT (view->activity));
- view->activity = NULL;
- }
- }
- else if (!view->activity) {
- int display;
- char *clientid = g_strdup_printf ("%p", view);
-
- if (progress_icon[0] == NULL)
- progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CONTACTS_PROGRESS_IMAGE);
-
- view->activity = evolution_activity_client_new (addressbook_component_get_shell_client(), clientid,
- progress_icon, message, TRUE, &display);
-
- g_free (clientid);
- }
- else {
- evolution_activity_client_update (view->activity, message, -1.0);
- }
-
-}
-
-static void
-set_folder_bar_label (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 (!shell_view_interface) {
- CORBA_exception_free (&ev);
- return;
- }
-
- d(g_message("Updating via ShellView"));
-
- if (message == NULL || message[0] == 0) {
- GNOME_Evolution_ShellView_setFolderBarLabel (shell_view_interface,
- "",
- &ev);
- }
- else {
- GNOME_Evolution_ShellView_setFolderBarLabel (shell_view_interface,
- message,
- &ev);
- }
-
- if (BONOBO_EX (&ev))
- g_warning ("Exception in label update: %s",
- bonobo_exception_get_text (&ev));
-
- CORBA_exception_free (&ev);
-}
-
-
-
-BonoboControl *
-addressbook_factory_new_control (void)
-{
- AddressbookView *view;
- GtkWidget *frame;
-
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
-
- view = g_new0 (AddressbookView, 1);
-
- view->vbox = gtk_vbox_new (FALSE, 0);
-
- gtk_signal_connect (GTK_OBJECT (view->vbox), "destroy",
- GTK_SIGNAL_FUNC (destroy_callback),
- (gpointer) view);
-
- /* Create the control. */
- view->control = bonobo_control_new (view->vbox);
-
- /* We attach subitems to the "Category is" item, so that we get an option menu of categories. */
- if (addressbook_search_option_items[ESB_CATEGORY].subitems == NULL) {
- ESearchBarSubitem *subitems;
- ECategoriesMasterList *master_list;
- gint i, N;
-
- g_assert (addressbook_search_option_items[ESB_CATEGORY].id == ESB_CATEGORY); /* sanity check */
-
- master_list = get_master_list ();
- N = e_categories_master_list_count (master_list);
- addressbook_search_option_items[ESB_CATEGORY].subitems = subitems = g_new (ESearchBarSubitem, N+2);
-
- subitems[0].id = G_MAXINT;
- subitems[0].text = g_strdup (_("Any Category"));
- subitems[0].translate = FALSE;
-
- for (i=0; i<N; ++i) {
- char *category;
-
- subitems[i+1].id = i;
- category = (char *) e_categories_master_list_nth (master_list, i);
- subitems[i+1].text = e_utf8_to_locale_string (category);
- g_free (category);
- subitems[i+1].translate = FALSE;
- }
- subitems[N+1].id = -1;
- subitems[N+1].text = NULL;
- }
-
- 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_container_add (GTK_CONTAINER (frame), GTK_WIDGET (view->view));
- gtk_box_pack_start (GTK_BOX (view->vbox), frame,
- TRUE, TRUE, 0);
-
- /* create the initial view */
- change_view_type (view, E_ADDRESSBOOK_VIEW_MINICARD);
-
- gtk_widget_show (frame);
- 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);
-
- gtk_signal_connect (GTK_OBJECT (view->view),
- "folder_bar_message",
- GTK_SIGNAL_FUNC(set_folder_bar_label),
- view);
-
- gtk_signal_connect (GTK_OBJECT (view->view),
- "command_state_change",
- GTK_SIGNAL_FUNC(update_command_state),
- 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 717b40e150..0000000000
--- a/addressbook/gui/component/addressbook.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __ADDRESSBOOK_H__
-#define __ADDRESSBOOK_H__
-
-#include <bonobo/bonobo-control.h>
-
-/* expand file:///foo/foo/ to file:///foo/foo/addressbook.db */
-char * addressbook_expand_uri (const char *uri);
-
-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 362eee4250..0000000000
--- a/addressbook/gui/component/e-address-popup.c
+++ /dev/null
@@ -1,1216 +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.
- */
-
-/*
- * This file is too big and this widget is too complicated. Forgive me.
- */
-
-#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 <gal/widgets/e-unicode.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/gui/contact-editor/e-contact-editor.h>
-#include <addressbook/gui/contact-editor/e-contact-quick-add.h>
-#include <addressbook/gui/widgets/e-minicard-widget.h>
-#include <addressbook/gui/widgets/e-addressbook-util.h>
-
-/*
- * Some general scaffolding for our widgets. Think of this as a really, really
- * lame implementation of a wizard (...which is still somewhat more general that
- * we really need it to be).
- */
-
-typedef struct _MiniWizard MiniWizard;
-struct _MiniWizard {
- GtkWidget *body;
-
- GtkWidget *vbox;
- GtkWidget *ok_button;
- GtkWidget *cancel_button;
-
- void (*ok_cb) (MiniWizard *, gpointer);
- void (*cleanup_cb) (gpointer);
- gpointer closure;
-
- void (*destroy_cb) (MiniWizard *, gpointer);
- gpointer destroy_closure;
-};
-
-static void
-mini_wizard_container_add (MiniWizard *wiz, GtkWidget *w)
-{
- GList *iter = gtk_container_children (GTK_CONTAINER (wiz->vbox));
- while (iter != NULL) {
- GtkWidget *oldw = (GtkWidget *) iter->data;
- iter = g_list_next (iter);
- gtk_container_remove (GTK_CONTAINER (wiz->vbox), oldw);
- gtk_widget_destroy (oldw);
- }
- gtk_container_add (GTK_CONTAINER (wiz->vbox), w);
-}
-
-static void
-mini_wizard_destroy (MiniWizard *wiz)
-{
- if (wiz->cleanup_cb)
- wiz->cleanup_cb (wiz->closure);
- wiz->cleanup_cb = NULL;
-
- if (wiz->destroy_cb)
- wiz->destroy_cb (wiz, wiz->destroy_closure);
-}
-
-static void
-mini_wizard_ok_cb (GtkWidget *b, gpointer closure)
-{
- MiniWizard *wiz = (MiniWizard *) closure;
-
- gpointer old_closure = wiz->closure;
- void (*old_cleanup) (gpointer) = wiz->cleanup_cb;
-
- wiz->cleanup_cb = NULL;
-
- if (wiz->ok_cb)
- wiz->ok_cb (wiz, wiz->closure);
-
- if (old_cleanup)
- old_cleanup (old_closure);
-
-}
-
-static void
-mini_wizard_cancel_cb (GtkWidget *b, gpointer closure)
-{
- mini_wizard_destroy ((MiniWizard *) closure);
-}
-
-static void
-mini_wizard_destroy_cb (GtkWidget *w, gpointer closure)
-{
- MiniWizard *wiz = (MiniWizard *) closure;
- if (wiz->cleanup_cb)
- wiz->cleanup_cb (wiz->closure);
- g_free (wiz);
-}
-
-static MiniWizard *
-mini_wizard_new (void)
-{
- MiniWizard *wiz = g_new (MiniWizard, 1);
- GtkWidget *hbox;
-
- wiz->body = gtk_vbox_new (FALSE, 2);
- wiz->vbox = gtk_vbox_new (FALSE, 2);
- wiz->ok_button = gnome_stock_button (GNOME_STOCK_BUTTON_OK);
- wiz->cancel_button = gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
-
- wiz->ok_cb = NULL;
- wiz->cleanup_cb = NULL;
- wiz->closure = NULL;
-
- wiz->destroy_cb = NULL;
- wiz->destroy_closure = NULL;
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_box_pack_start (GTK_BOX (hbox), wiz->ok_button, TRUE, FALSE, 2);
- gtk_box_pack_start (GTK_BOX (hbox), wiz->cancel_button, TRUE, FALSE, 2);
-
- gtk_box_pack_start (GTK_BOX (wiz->body), wiz->vbox, TRUE, TRUE, 2);
- gtk_box_pack_start (GTK_BOX (wiz->body), gtk_hseparator_new (), FALSE, TRUE, 2);
- gtk_box_pack_start (GTK_BOX (wiz->body), hbox, FALSE, TRUE, 2);
-
- gtk_widget_show_all (wiz->body);
-
- gtk_signal_connect (GTK_OBJECT (wiz->ok_button),
- "clicked",
- GTK_SIGNAL_FUNC (mini_wizard_ok_cb),
- wiz);
- gtk_signal_connect (GTK_OBJECT (wiz->cancel_button),
- "clicked",
- GTK_SIGNAL_FUNC (mini_wizard_cancel_cb),
- wiz);
- gtk_signal_connect (GTK_OBJECT (wiz->body),
- "destroy",
- GTK_SIGNAL_FUNC (mini_wizard_destroy_cb),
- wiz);
-
- return wiz;
-
-}
-
-
-
-/*
- * This is the code for the UI thingie that lets you manipulate the e-mail
- * addresses (and *only* the e-mail addresses) associated with an existing
- * card.
- */
-
-#define EMPTY_ENTRY N_("(none)")
-
-typedef struct _EMailMenu EMailMenu;
-struct _EMailMenu {
- GtkWidget *option_menu;
- GList *options;
- gchar *current_selection;
-};
-
-static void
-email_menu_free (EMailMenu *menu)
-{
- if (menu == NULL)
- return;
-
- g_list_foreach (menu->options, (GFunc) g_free, NULL);
- g_list_free (menu->options);
- g_free (menu);
-}
-
-static EMailMenu *
-email_menu_new (void)
-{
- EMailMenu *menu = g_new (EMailMenu, 1);
-
- menu->option_menu = gtk_option_menu_new ();
- menu->options = NULL;
- menu->current_selection = NULL;
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (menu->option_menu), gtk_menu_new ());
-
- return menu;
-}
-
-static void
-menu_activate_cb (GtkWidget *w, gpointer closure)
-{
- EMailMenu *menu = (EMailMenu *) closure;
- gchar *addr = (gchar *) gtk_object_get_data (GTK_OBJECT (w), "addr");
-
- menu->current_selection = addr;
-}
-
-static void
-email_menu_add_option (EMailMenu *menu, const gchar *addr)
-{
- GtkWidget *menu_item;
- gchar *addr_cpy;
-
- g_return_if_fail (menu != NULL);
- if (addr == NULL)
- return;
-
- addr_cpy = g_strdup (addr);
- menu->options = g_list_append (menu->options, addr_cpy);
-
- menu_item = gtk_menu_item_new_with_label (addr);
- gtk_object_set_data (GTK_OBJECT (menu_item), "addr", addr_cpy);
- gtk_widget_show_all (menu_item);
- gtk_menu_append (GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (menu->option_menu))), menu_item);
-
- gtk_signal_connect (GTK_OBJECT (menu_item),
- "activate",
- menu_activate_cb,
- menu);
-}
-
-static void
-email_menu_add_options_from_card (EMailMenu *menu, ECard *card, const gchar *extra_addr)
-{
- ECardSimple *simple;
-
- g_return_if_fail (card && E_IS_CARD (card));
-
- simple = e_card_simple_new (card);
-
- /* If any of these three e-mail fields are NULL, email_menu_add_option will just
- return without doing anything. */
- email_menu_add_option (menu, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL));
- email_menu_add_option (menu, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_2));
- email_menu_add_option (menu, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_3));
- email_menu_add_option (menu, extra_addr);
- email_menu_add_option (menu, EMPTY_ENTRY);
-
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-email_menu_set_option (EMailMenu *menu, const gchar *addr)
-{
- guint count = 0;
- GList *iter;
-
- g_return_if_fail (menu != NULL);
-
- if (addr == NULL) {
- email_menu_set_option (menu, EMPTY_ENTRY);
- return;
- }
-
- iter = menu->options;
- while (iter && strcmp (addr, (gchar *) iter->data)) {
- ++count;
- iter = g_list_next (iter);
- }
-
- if (iter) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (menu->option_menu), count);
- menu->current_selection = (gchar *) iter->data;
- }
-}
-
-#ifdef UNDEFINED_FUNCTIONS_SHOULD_PLEASE_BE_INCLUDED
-static void
-email_menu_unset_option (EMailMenu *menu, const gchar *addr)
-{
- GList *iter;
-
- g_return_if_fail (menu != NULL);
- g_return_if_fail (addr != NULL);
-
- if (menu->current_selection == NULL || strcmp (addr, menu->current_selection))
- return;
-
- iter = menu->options;
- while (iter && strcmp (addr, (gchar *) iter->data)) {
- iter = g_list_next (iter);
- }
- if (iter) {
- iter = g_list_next (iter);
- if (iter) {
- email_menu_set_option (menu, (gchar *) iter->data);
- } else {
- email_menu_set_option (menu, EMPTY_ENTRY);
- }
- }
-}
-#endif
-
-
-
-typedef struct _EMailTable EMailTable;
-struct _EMailTable {
- GtkWidget *table;
- ECard *card;
- EMailMenu *primary;
- EMailMenu *email2;
- EMailMenu *email3;
-};
-
-static void
-email_table_cleanup_cb (gpointer closure)
-{
- EMailTable *et = (EMailTable *) closure;
-
- if (et == NULL)
- return;
-
- gtk_object_unref (GTK_OBJECT (et->card));
- email_menu_free (et->primary);
- email_menu_free (et->email2);
- email_menu_free (et->email3);
-
- g_free (et);
-}
-
-static void
-email_table_from_card (EMailTable *et)
-{
- ECardSimple *simple;
-
- g_return_if_fail (et != NULL);
-
- simple = e_card_simple_new (et->card);
- email_menu_set_option (et->primary, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL));
- email_menu_set_option (et->email2, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_2));
- email_menu_set_option (et->email3, e_card_simple_get_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_3));
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-email_table_to_card (EMailTable *et)
-{
- ECardSimple *simple;
- gchar *curr;
-
- g_return_if_fail (et != NULL);
-
- simple = e_card_simple_new (et->card);
-
- curr = et->primary->current_selection;
- if (curr && !strcmp (curr, _(EMPTY_ENTRY)))
- curr = NULL;
- e_card_simple_set_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL, curr);
-
- curr = et->email2->current_selection;
- if (curr && !strcmp (curr, _(EMPTY_ENTRY)))
- curr = NULL;
- e_card_simple_set_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_2, curr);
-
- curr = et->email3->current_selection;
- if (curr && !strcmp (curr, _(EMPTY_ENTRY)))
- curr = NULL;
- e_card_simple_set_email (simple, E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, curr);
-
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-email_table_save_card_cb (EBook *book, gpointer closure)
-{
- ECard *card = E_CARD (closure);
-
- if (book) {
- e_book_commit_card (book, card, NULL, NULL);
- }
- gtk_object_unref (GTK_OBJECT (card));
-}
-
-/*
- * We have to do this in an idle function because of what might be a
- * re-entrancy problems with EBook.
- */
-static gint
-add_card_idle_cb (gpointer closure)
-{
- e_book_use_local_address_book (email_table_save_card_cb, closure);
- return 0;
-}
-
-static void
-email_table_ok_cb (MiniWizard *wiz, gpointer closure)
-{
- EMailTable *et = (EMailTable *) closure;
-
- email_table_to_card (et);
-
- gtk_object_ref (GTK_OBJECT (et->card));
- gtk_idle_add (add_card_idle_cb, et->card);
-
- mini_wizard_destroy (wiz);
-}
-
-static void
-email_table_init (MiniWizard *wiz, ECard *card, const gchar *extra_address)
-{
- EMailTable *et;
-
- gchar *name_str;
- gint xpad, ypad;
- GtkAttachOptions label_x_opts, label_y_opts;
- GtkAttachOptions menu_x_opts, menu_y_opts;
-
- g_return_if_fail (card && E_IS_CARD (card));
-
- et = g_new (EMailTable, 1);
-
- et->card = card;
- gtk_object_ref (GTK_OBJECT (et->card));
-
- et->table = gtk_table_new (4, 2, FALSE);
-
- et->primary = email_menu_new ();
- et->email2 = email_menu_new ();
- et->email3 = email_menu_new ();
-
- email_menu_add_options_from_card (et->primary, et->card, extra_address);
- email_menu_add_options_from_card (et->email2, et->card, extra_address);
- email_menu_add_options_from_card (et->email3, et->card, extra_address);
-
- email_table_from_card (et);
-
- label_x_opts = GTK_FILL;
- label_y_opts = GTK_FILL;
- menu_x_opts = GTK_EXPAND | GTK_FILL;
- menu_y_opts = GTK_EXPAND | GTK_FILL;
- xpad = 3;
- ypad = 3;
-
- name_str = e_card_name_to_string (et->card->name);
- gtk_table_attach (GTK_TABLE (et->table),
- gtk_label_new (name_str),
- 0, 2, 0, 1,
- label_x_opts, label_y_opts, xpad, ypad);
- g_free (name_str);
-
- gtk_table_attach (GTK_TABLE (et->table),
- gtk_label_new (_("Primary Email")),
- 0, 1, 1, 2,
- label_x_opts, label_y_opts, xpad, ypad);
-
- gtk_table_attach (GTK_TABLE (et->table),
- et->primary->option_menu,
- 1, 2, 1, 2,
- menu_x_opts, menu_y_opts, xpad, ypad);
-
- gtk_table_attach (GTK_TABLE (et->table),
- gtk_label_new (_("Email 2")),
- 0, 1, 2, 3,
- label_x_opts, label_y_opts, xpad, ypad);
-
- gtk_table_attach (GTK_TABLE (et->table),
- et->email2->option_menu,
- 1, 2, 2, 3,
- menu_x_opts, menu_y_opts, xpad, ypad);
-
- gtk_table_attach (GTK_TABLE (et->table),
- gtk_label_new (_("Email 3")),
- 0, 1, 3, 4,
- label_x_opts, label_y_opts, xpad, ypad);
-
- gtk_table_attach (GTK_TABLE (et->table),
- et->email3->option_menu,
- 1, 2, 3, 4,
- menu_x_opts, menu_y_opts, xpad, ypad);
-
- gtk_widget_show_all (et->primary->option_menu);
- gtk_widget_show_all (et->email2->option_menu);
- gtk_widget_show_all (et->email3->option_menu);
-
- gtk_widget_show_all (et->table);
- mini_wizard_container_add (wiz, et->table);
- wiz->ok_cb = email_table_ok_cb;
- wiz->cleanup_cb = email_table_cleanup_cb;
- wiz->closure = et;
-}
-
-/*
- * This code is for the little UI thing that lets you pick from a set of cards
- * and decide which one you want to add the e-mail address to.
- */
-
-typedef struct _CardPicker CardPicker;
-struct _CardPicker {
- GtkWidget *body;
- GtkWidget *clist;
- GList *cards;
- gchar *new_name;
- gchar *new_email;
-
- gint current_row;
-};
-
-static void
-card_picker_row_select_cb (GtkCList *clist, gint row, gint col, GdkEventButton *ev, gpointer closure)
-{
- MiniWizard *wiz = (MiniWizard *) closure;
- CardPicker *pick = (CardPicker *) wiz->closure;
- pick->current_row = row;
- gtk_widget_set_sensitive (wiz->ok_button, TRUE);
-}
-
-static void
-card_picker_row_unselect_cb (GtkCList *clist, gint row, gint col, GdkEventButton *ev, gpointer closure)
-{
- MiniWizard *wiz = (MiniWizard *) closure;
- CardPicker *pick = (CardPicker *) wiz->closure;
- pick->current_row = -1;
- gtk_widget_set_sensitive (wiz->ok_button, FALSE);
-}
-
-static void
-card_picker_ok_cb (MiniWizard *wiz, gpointer closure)
-{
- CardPicker *pick = (CardPicker *) closure;
- g_return_if_fail (pick->current_row >= 0);
-
- if (pick->current_row == 0) {
- e_contact_quick_add (pick->new_name, pick->new_email, NULL, NULL);
- mini_wizard_destroy (wiz);
- } else {
- ECard *card = (ECard *) g_list_nth_data (pick->cards, pick->current_row-1);
- email_table_init (wiz, card, pick->new_email);
- }
-}
-
-static void
-card_picker_cleanup_cb (gpointer closure)
-{
- CardPicker *pick = (CardPicker *) closure;
-
- g_list_foreach (pick->cards, (GFunc) gtk_object_unref, NULL);
- g_list_free (pick->cards);
-
- g_free (pick->new_name);
- g_free (pick->new_email);
-}
-
-static void
-card_picker_init (MiniWizard *wiz, const GList *cards, const gchar *new_name, const gchar *new_email)
-{
- CardPicker *pick;
- gchar *str;
- GtkWidget *w, *swin;
-
- pick = g_new (CardPicker, 1);
-
- pick->body = gtk_vbox_new (FALSE, 2);
-
- pick->clist = gtk_clist_new (1);
- gtk_clist_set_column_title (GTK_CLIST (pick->clist), 0, _("Select an Action"));
- gtk_clist_column_titles_show (GTK_CLIST (pick->clist));
- gtk_clist_set_selection_mode (GTK_CLIST (pick->clist), GTK_SELECTION_SINGLE);
-
- gtk_clist_freeze (GTK_CLIST (pick->clist));
-
- str = g_strdup_printf (_("Create a new contact \"%s\""), new_name);
- gtk_clist_append (GTK_CLIST (pick->clist), &str);
- g_free (str);
-
- pick->cards = NULL;
- while (cards) {
- ECard *card = (ECard *) cards->data;
- gchar *name_str = e_card_name_to_string (card->name);
-
- pick->cards = g_list_append (pick->cards, card);
- gtk_object_ref (GTK_OBJECT (card));
-
- str = g_strdup_printf (_("Add address to existing contact \"%s\""), name_str);
- gtk_clist_append (GTK_CLIST (pick->clist), &str);
- g_free (name_str);
- g_free (str);
-
- cards = g_list_next (cards);
- }
-
- gtk_clist_thaw (GTK_CLIST (pick->clist));
-
- pick->new_name = g_strdup (new_name);
- pick->new_email = g_strdup (new_email);
-
- pick->current_row = -1;
- gtk_widget_set_sensitive (wiz->ok_button, FALSE);
-
- /* Connect some signals & callbacks */
-
- wiz->ok_cb = card_picker_ok_cb;
- wiz->cleanup_cb = card_picker_cleanup_cb;
-
- gtk_signal_connect (GTK_OBJECT (pick->clist),
- "select-row",
- GTK_SIGNAL_FUNC (card_picker_row_select_cb),
- wiz);
- gtk_signal_connect (GTK_OBJECT (pick->clist),
- "unselect-row",
- GTK_SIGNAL_FUNC (card_picker_row_unselect_cb),
- wiz);
-
- /* Build our widget */
-
- w = gtk_label_new (new_email);
- gtk_box_pack_start (GTK_BOX (pick->body), w, FALSE, TRUE, 3);
-
- swin = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), pick->clist);
-
- gtk_box_pack_start (GTK_BOX (pick->body), swin, TRUE, TRUE, 2);
- gtk_widget_show_all (pick->body);
-
-
- /* Put it in our mini-wizard */
-
- wiz->closure = pick;
- mini_wizard_container_add (wiz, pick->body);
-}
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-/*
- * The code for the actual EAddressPopup widget begins here.
- */
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-
-static GtkObjectClass *parent_class;
-
-static void e_address_popup_destroy (GtkObject *);
-static void e_address_popup_query (EAddressPopup *);
-
-
-static void
-e_address_popup_class_init (EAddressPopupClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
-
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
-
- object_class->destroy = e_address_popup_destroy;
-}
-
-static void
-e_address_popup_init (EAddressPopup *pop)
-{
- pop->transitory = TRUE;
-}
-
-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->scheduled_refresh)
- gtk_idle_remove (pop->scheduled_refresh);
-
- g_free (pop->name);
- g_free (pop->email);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-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) {
- gchar *s = e_utf8_to_gtk_string (pop->name_widget, pop->name);
- gtk_label_set_text (GTK_LABEL (pop->name_widget), s);
- g_free (s);
- gtk_widget_show (pop->name_widget);
- } else {
- gtk_widget_hide (pop->name_widget);
- }
- }
-
- if (pop->email_widget) {
- if (pop->email && *pop->email) {
- gchar *s = e_utf8_to_gtk_string (pop->email_widget, pop->email);
- gtk_label_set_text (GTK_LABEL (pop->email_widget), s);
- g_free (s);
- gtk_widget_show (pop->email_widget);
- } else {
- gtk_widget_hide (pop->email_widget);
- }
- }
-
- e_address_popup_query (pop);
-}
-
-static gint
-refresh_idle_cb (gpointer ptr)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (ptr);
- e_address_popup_refresh_names (pop);
- pop->scheduled_refresh = 0;
- return 0;
-}
-
-static void
-e_address_popup_schedule_refresh (EAddressPopup *pop)
-{
- if (pop->scheduled_refresh == 0)
- pop->scheduled_refresh = gtk_idle_add (refresh_idle_cb, pop);
-}
-
-/* If we are handed something of the form "Foo <bar@bar.com>",
- do the right thing. */
-static gboolean
-e_address_popup_set_free_form (EAddressPopup *pop, const gchar *txt)
-{
- gchar *lt, *gt = NULL;
-
- g_return_val_if_fail (pop && E_IS_ADDRESS_POPUP (pop), FALSE);
-
- if (txt == NULL)
- return FALSE;
-
- lt = strchr (txt, '<');
- if (lt)
- gt = strchr (txt, '>');
-
- if (lt && gt && lt+1 < gt) {
- gchar *name = g_strndup (txt, lt-txt);
- gchar *email = g_strndup (lt+1, gt-lt-1);
- e_address_popup_set_name (pop, name);
- e_address_popup_set_email (pop, email);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-void
-e_address_popup_set_name (EAddressPopup *pop, const gchar *name)
-{
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- /* We only allow the name to be set once. */
- if (pop->name)
- return;
-
- if (!e_address_popup_set_free_form (pop, name)) {
- pop->name = g_strdup (name);
- if (pop->name)
- g_strstrip (pop->name);
- }
-
- e_address_popup_schedule_refresh (pop);
-}
-
-void
-e_address_popup_set_email (EAddressPopup *pop, const gchar *email)
-{
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- /* We only allow the e-mail to be set once. */
- if (pop->email)
- return;
-
- if (!e_address_popup_set_free_form (pop, email)) {
- pop->email = g_strdup (email);
- if (pop->email)
- g_strstrip (pop->email);
- }
-
- e_address_popup_schedule_refresh (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 void
-emit_event (EAddressPopup *pop, const char *event)
-{
- if (pop->es) {
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_BOOLEAN);
- BONOBO_ARG_SET_BOOLEAN (arg, TRUE);
- bonobo_event_source_notify_listeners_full (pop->es,
- "GNOME/Evolution/Addressbook/AddressPopup",
- "Event",
- event,
- arg, NULL);
- bonobo_arg_release (arg);
- }
-}
-
-static void
-contact_editor_cb (EBook *book, gpointer closure)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (closure);
- EContactEditor *ce = e_addressbook_show_contact_editor (book, pop->card, FALSE, TRUE);
- emit_event (pop, "Destroy");
- e_contact_editor_raise (ce);
-}
-
-static void
-edit_contact_info_cb (EAddressPopup *pop)
-{
- emit_event (pop, "Hide");
- e_book_use_local_address_book (contact_editor_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)
-{
- if (pop->email && *pop->email) {
- if (pop->name && *pop->name)
- e_contact_quick_add (pop->name, pop->email, NULL, NULL);
- else
- e_contact_quick_add_free_form (pop->email, NULL, NULL);
-
- }
- emit_event (pop, "Destroy");
-}
-
-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
-wizard_destroy_cb (MiniWizard *wiz, gpointer closure)
-{
- gtk_widget_destroy (GTK_WIDGET (closure));
-}
-
-static void
-popup_size_allocate_cb (GtkWidget *widget, GtkAllocation *alloc, gpointer user_data)
-{
- gint x, y, w, h, xmax, ymax;
-
- xmax = gdk_screen_width ();
- ymax = gdk_screen_height ();
-
- if (gtk_object_get_data (GTK_OBJECT (widget), "size_allocate") == NULL) {
- gdk_window_get_pointer (NULL, &x, &y, NULL);
- w = alloc->width;
- h = alloc->height;
- x = CLAMP (x - w/2, 0, xmax - w);
- y = CLAMP (y - h/2, 0, ymax - h);
- gtk_widget_set_uposition (widget, x, y);
- gtk_object_set_data (GTK_OBJECT (widget), "size_allocate", widget);
- }
-}
-
-static void
-e_address_popup_ambiguous_email_add (EAddressPopup *pop, const GList *cards)
-{
- MiniWizard *wiz = mini_wizard_new ();
- GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- wiz->destroy_cb = wizard_destroy_cb;
- wiz->destroy_closure = win;
-
- gtk_window_set_title (GTK_WINDOW (win), _("Merge E-Mail Address"));
- gtk_signal_connect (GTK_OBJECT (win),
- "size_allocate",
- GTK_SIGNAL_FUNC (popup_size_allocate_cb),
- NULL);
-
- /* FIXME: This hard-wired size is evil. */
- gtk_widget_set_usize (win, 275, 170);
-
- card_picker_init (wiz, cards, pop->name, pop->email);
-
- emit_event (pop, "Destroy");
-
- gtk_container_add (GTK_CONTAINER (win), wiz->body);
- gtk_widget_show_all (win);
-}
-
-static void
-e_address_popup_multiple_matches (EAddressPopup *pop, const GList *cards)
-{
- pop->multiple_matches = TRUE;
-
- e_address_popup_ambiguous_email_add (pop, cards);
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-/*
- * Addressbook Query Fun
- */
-
-static void
-name_only_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->query_tag = 0;
-
- if (cards == NULL) {
- e_address_popup_no_matches (pop);
- } else {
- e_address_popup_ambiguous_email_add (pop, cards);
- }
-}
-
-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->query_tag = 0;
- gtk_widget_hide (pop->query_msg);
-
- if (cards == NULL) {
-
- /* Do a name-only query if:
- (1) The name is non-empty.
- (2) The e-mail is also non-empty (so that the query we just did wasn't actually a name-only query.
- */
- if (pop->name && *pop->name && pop->email && *pop->email) {
- pop->query_tag = e_book_name_and_email_query (book, pop->name, NULL, name_only_query_cb, pop);
- } else {
- 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, cards);
- }
-}
-
-static void
-start_query (EBook *book, gpointer closure)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (closure);
-
- if (pop->query_tag)
- e_book_simple_query_cancel (book, pop->query_tag);
-
- pop->query_tag = e_book_name_and_email_query (book, pop->name, pop->email, query_cb, pop);
-}
-
-static void
-e_address_popup_query (EAddressPopup *pop)
-{
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- e_book_use_local_address_book (start_query, pop);
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-enum {
- PROPERTY_NAME,
- PROPERTY_EMAIL,
- PROPERTY_TRANSITORY
-};
-
-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 void
-get_prop (BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environment *ev, gpointer user_data)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (user_data);
-
- switch (arg_id) {
-
- case PROPERTY_NAME:
- BONOBO_ARG_SET_STRING (arg, pop->name);
- break;
-
- case PROPERTY_EMAIL:
- BONOBO_ARG_SET_STRING (arg, pop->email);
- break;
-
- case PROPERTY_TRANSITORY:
- BONOBO_ARG_SET_BOOLEAN (arg, pop->transitory);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-static BonoboControl *
-e_address_popup_factory_new_control (void)
-{
- BonoboControl *control;
- BonoboPropertyBag *bag;
- EAddressPopup *addy;
- GtkWidget *w;
-
- w = e_address_popup_new ();
- addy = E_ADDRESS_POPUP (w);
-
- control = bonobo_control_new (w);
- gtk_widget_show (w);
-
- bag = bonobo_property_bag_new (get_prop, set_prop, w);
- bonobo_property_bag_add (bag, "name", PROPERTY_NAME,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_WRITEABLE | BONOBO_PROPERTY_READABLE);
-
- bonobo_property_bag_add (bag, "email", PROPERTY_EMAIL,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_WRITEABLE | BONOBO_PROPERTY_READABLE);
-
- bonobo_property_bag_add (bag, "transitory", PROPERTY_TRANSITORY,
- BONOBO_ARG_BOOLEAN, NULL, NULL,
- BONOBO_PROPERTY_READABLE);
-
- bonobo_control_set_properties (control, bag);
- bonobo_object_unref (BONOBO_OBJECT (bag));
-
- addy->es = bonobo_event_source_new ();
- bonobo_object_add_interface (BONOBO_OBJECT (control),
- BONOBO_OBJECT (addy->es));
-
- 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 ef51437551..0000000000
--- a/addressbook/gui/component/e-address-popup.h
+++ /dev/null
@@ -1,88 +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>
-#include <bonobo/bonobo-event-source.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;
-
- gchar *name;
- gchar *email;
-
- GtkWidget *name_widget;
- GtkWidget *email_widget;
- GtkWidget *query_msg;
-
- GtkWidget *main_vbox;
- GtkWidget *generic_view;
- GtkWidget *minicard_view;
-
- gboolean transitory;
-
- guint scheduled_refresh;
- guint query_tag;
- gboolean multiple_matches;
- ECard *card;
-
- BonoboEventSource *es;
-};
-
-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 2f81c70b36..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/gui/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 dfdafeda58..0000000000
--- a/addressbook/gui/component/e-cardlist-model.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * (C) 1999 Ximian, 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;
- const 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;
- break;
- }
- }
- 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 244799deb2..0000000000
--- a/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
+++ /dev/null
@@ -1,42 +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@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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);
- void addSectionWithLimit (in string id, in string title, in short limit)
- 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 6c3ed1674e..0000000000
--- a/addressbook/gui/component/select-names/Makefile.am
+++ /dev/null
@@ -1,85 +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_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 3130d1c9c9..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-select-names-bonobo.c
- *
- * 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
- */
-
-#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 <bonobo/bonobo-event-source.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"
-#include "e-select-names-completion.h"
-
-
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _ESelectNamesBonoboPrivate {
- ESelectNamesManager *manager;
- BonoboEventSource *event_source;
-};
-
-enum _EntryPropertyID {
- ENTRY_PROPERTY_ID_TEXT,
- ENTRY_PROPERTY_ID_DESTINATIONS,
- ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS,
- 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;
-
- w = GTK_WIDGET (user_data);
-
- switch (arg_id) {
- case ENTRY_PROPERTY_ID_TEXT:
- {
- ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
- g_assert (model != NULL);
-
- BONOBO_ARG_SET_STRING (arg, e_select_names_model_get_textification (model));
- break;
- }
-
- case ENTRY_PROPERTY_ID_DESTINATIONS:
- {
- ESelectNamesModel *model;
- char *text;
-
- model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
- g_assert (model != NULL);
-
- text = e_select_names_model_export_destinationv (model);
- BONOBO_ARG_SET_STRING (arg, text);
- g_free (text);
- }
- break;
-
- case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
- {
- ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (gtk_object_get_data (GTK_OBJECT (w), "completion_handler"));
- g_assert (comp != NULL);
-
- BONOBO_ARG_SET_BOOLEAN (arg, e_select_names_completion_get_match_contact_lists (comp));
- break;
- }
-
- case ENTRY_PROPERTY_ID_ENTRY_CHANGED:
- /* This is a read-only property. */
- g_assert_not_reached ();
- break;
-
- default:
- break;
- }
-}
-
-static void
-entry_set_property_fn (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GtkWidget *w;
-
- w = GTK_WIDGET (user_data);
-
- switch (arg_id) {
-
- case ENTRY_PROPERTY_ID_TEXT:
- {
- ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
- g_assert (model != NULL);
-
- e_entry_set_text (E_ENTRY (w), BONOBO_ARG_GET_STRING (arg));
- e_select_names_model_cardify_all (model, NULL, 0);
- break;
- }
-
- case ENTRY_PROPERTY_ID_DESTINATIONS:
- {
- ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
- g_assert (model != NULL);
-
- e_select_names_model_import_destinationv (model, BONOBO_ARG_GET_STRING (arg));
- e_select_names_model_cardify_all (model, NULL, 0);
- break;
- }
-
- case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
- {
- ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (gtk_object_get_data (GTK_OBJECT (w), "completion_handler"));
- g_assert (comp != NULL);
-
- e_select_names_completion_set_match_contact_lists (comp, BONOBO_ARG_GET_BOOLEAN (arg));
- break;
- }
-
- case ENTRY_PROPERTY_ID_ENTRY_CHANGED:
- gtk_object_set_data (GTK_OBJECT (w), "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
-impl_SelectNames_add_section_with_limit (PortableServer_Servant servant,
- const CORBA_char *id,
- const CORBA_char *title,
- CORBA_short limit,
- 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_with_limit (priv->manager, id, title, limit);
-}
-
-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, "destinations", ENTRY_PROPERTY_ID_DESTINATIONS,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE);
- bonobo_property_bag_add (property_bag, "allow_contact_lists", ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS,
- BONOBO_ARG_BOOLEAN, 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->addSectionWithLimit = impl_SelectNames_add_section_with_limit;
- 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
-manager_changed_cb (ESelectNamesManager *manager, const gchar *section_id, gint changed_working_copy, gpointer closure)
-{
- ESelectNamesBonobo *select_names = E_SELECT_NAMES_BONOBO (closure);
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
- BONOBO_ARG_SET_STRING (arg, section_id);
-
- bonobo_event_source_notify_listeners_full (select_names->priv->event_source,
- "GNOME/Evolution",
- "changed",
- changed_working_copy ? "working_copy" : "model",
- arg, NULL);
-
- bonobo_arg_release (arg);
-}
-
-static void
-init (ESelectNamesBonobo *select_names)
-{
- ESelectNamesBonoboPrivate *priv;
-
- priv = g_new (ESelectNamesBonoboPrivate, 1);
-
- priv->manager = e_select_names_manager_new ();
- priv->event_source = NULL;
-
- gtk_signal_connect (GTK_OBJECT (priv->manager),
- "changed",
- GTK_SIGNAL_FUNC (manager_changed_cb),
- select_names);
-
- 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);
-
- g_assert (select_names->priv->event_source == NULL);
- select_names->priv->event_source = bonobo_event_source_new ();
- bonobo_object_add_interface (BONOBO_OBJECT (select_names), BONOBO_OBJECT (select_names->priv->event_source));
-}
-
-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 c06e8fa0e0..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-select-names-bonobo.h
- *
- * 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
- */
-
-#ifndef __E_SELECT_NAMES_BONOBO_H__
-#define __E_SELECT_NAMES_BONOBO_H__
-
-#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 ((klass), 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 1e9027e8fc..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ /dev/null
@@ -1,1246 +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 "e-select-names-completion.h"
-
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-
-#include <gal/unicode/gunicode.h>
-
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/backend/ebook/e-destination.h>
-#include <addressbook/backend/ebook/e-card-simple.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 match_contact_lists;
- 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_handle_request (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 ECompletionMatch *(*BookQueryMatchTester) (ESelectNamesCompletion *, EDestination *);
-
-static void
-our_match_destroy (ECompletionMatch *match)
-{
- gtk_object_unref (GTK_OBJECT (match->user_data));
-}
-
-static ECompletionMatch *
-make_match (EDestination *dest, const gchar *menu_form, double score)
-{
- ECompletionMatch *match;
- ECard *card = e_destination_get_card (dest);
-
- match = e_completion_match_new (e_destination_get_name (dest), menu_form, score);
-
- e_completion_match_set_text (match, e_destination_get_name (dest), menu_form);
- match->sort_major = card ? floor (e_card_get_use_score (card)) : 0;
- match->sort_minor = e_destination_get_email_num (dest);
-
- match->user_data = dest;
- gtk_object_ref (GTK_OBJECT (dest));
-
- match->destroy = our_match_destroy;
-
- return match;
-}
-
-/*
- * Nickname query
- */
-
-static gchar *
-sexp_nickname (ESelectNamesCompletion *comp)
-{
- gchar *query = g_strdup_printf ("(beginswith \"nickname\" \"%s\")", comp->priv->query_text);
-
- return query;
-}
-
-static ECompletionMatch *
-match_nickname (ESelectNamesCompletion *comp, EDestination *dest)
-{
- ECompletionMatch *match = NULL;
- gint len;
- ECard *card = e_destination_get_card (dest);
- double score;
-
- if (card->nickname == NULL)
- return NULL;
-
- len = MIN (strlen (card->nickname), strlen (comp->priv->query_text));
-
- if (card->nickname && !g_utf8_strncasecmp (comp->priv->query_text, card->nickname, len)) {
- const gchar *name;
- gchar *str;
-
- score = len * 2; /* nickname gives 2 points per matching character */
-
- if (len == strlen (card->nickname)) /* boost score on an exact match */
- score *= 10;
-
- name = e_destination_get_name (dest);
- if (name && *name)
- str = g_strdup_printf ("'%s' %s <%s>", card->nickname, name, e_destination_get_email (dest));
- else
- str = g_strdup_printf ("'%s' <%s>", card->nickname, e_destination_get_email (dest));
-
- match = make_match (dest, str, score);
- g_free (str);
- }
-
- return match;
-}
-
-/*
- * E-Mail Query
- */
-
-static gchar *
-sexp_email (ESelectNamesCompletion *comp)
-{
- return g_strdup_printf ("(beginswith \"email\" \"%s\")", comp->priv->query_text);
-}
-
-static ECompletionMatch *
-match_email (ESelectNamesCompletion *comp, EDestination *dest)
-{
- ECompletionMatch *match;
- gint len = strlen (comp->priv->query_text);
- const gchar *name = e_destination_get_name (dest);
- const gchar *email = e_destination_get_email (dest);
- double score;
-
- if (email
- && !g_utf8_strncasecmp (comp->priv->query_text, email, len)
- && !e_destination_is_evolution_list (dest)) {
-
- gchar *str;
-
- score = len * 2; /* 2 points for each matching character */
-
- if (name && *name)
- str = g_strdup_printf ("<%s> %s", email, name);
- else
- str = g_strdup (email);
-
- match = make_match (dest, str, score);
-
- g_free (str);
-
- return match;
- }
-
- return NULL;
-}
-
-/*
- * Name Query
- */
-
-static gchar *
-name_style_query (ESelectNamesCompletion *comp, const gchar *field)
-{
- 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 \"%s\" \"%s\")", field, 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);
- }
-
- g_free (cpy);
- g_strfreev (strv);
-
- return query;
- }
-
- return NULL;
-}
-
-static gchar *
-sexp_name (ESelectNamesCompletion *comp)
-{
- return name_style_query (comp, "full_name");
-}
-
-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_utf8_strncasecmp (fragment, txt, len))
- return TRUE;
-
- while (*fragment && !isspace ((gint) *fragment))
- ++fragment;
- while (*fragment && isspace ((gint) *fragment))
- ++fragment;
- }
-
- return FALSE;
-}
-
-static ECompletionMatch *
-match_name (ESelectNamesCompletion *comp, EDestination *dest)
-{
- ECompletionMatch *final_match = NULL;
- gchar *menu_text = NULL;
- ECard *card;
- const gchar *email;
- gchar *cpy, **strv;
- gint len, i, match_len = 0;
- gint match = MATCHED_NOTHING, first_match = MATCHED_NOTHING;
- double score = 0;
- gboolean have_given, have_additional, have_family;
-
- card = e_destination_get_card (dest);
-
- if (card->name == NULL)
- return NULL;
-
- email = e_destination_get_email (dest);
-
- cpy = g_strdup (comp->priv->query_text);
- strv = g_strsplit (cpy, " ", 0);
-
- for (i=0; strv[i] != NULL; ++i) {
- gint this_match = MATCHED_NOTHING;
-
- g_strstrip (strv[i]);
- len = strlen (strv[i]);
-
- if (card->name->given
- && *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
- && *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
- && *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 (i == 0)
- first_match = this_match;
- } else {
- match = first_match = MATCHED_NOTHING;
- break;
- }
-
- }
-
- g_free (cpy);
- g_strfreev (strv);
-
- 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_utf8_strncasecmp (card->name->given, card->nickname, MIN (strlen (card->name->given), len)))
- || (card->name->family && !g_utf8_strncasecmp (card->name->family, card->nickname, MIN (strlen (card->name->family), len)))
- || (card->name->additional && !g_utf8_strncasecmp (card->name->additional, card->nickname, MIN (strlen (card->name->additional), len))))
- score *= 100;
- }
-
- have_given = card->name->given && *card->name->given;
- have_additional = card->name->additional && *card->name->additional;
- have_family = card->name->family && *card->name->family;
-
- if (first_match != MATCHED_NOTHING && e_card_evolution_list (card)) {
-
- menu_text = e_card_name_to_string (card->name);
-
- } else if (first_match == MATCHED_GIVEN_NAME) {
-
- if (have_family)
- menu_text = g_strdup_printf ("%s %s <%s>", card->name->given, card->name->family, email);
- else
- menu_text = g_strdup_printf ("%s <%s>", card->name->given, email);
-
- } else if (first_match == MATCHED_ADDITIONAL_NAME) {
-
- if (have_family) {
-
- menu_text = g_strdup_printf ("%s, %s%s%s <%s>",
- card->name->family,
- have_given ? card->name->given : "",
- have_given ? " " : "",
- card->name->additional,
- email);
-
- } else {
-
- menu_text = g_strdup_printf ("%s%s%s <%s>",
- have_given ? card->name->given : "",
- have_given ? " " : "",
- card->name->additional,
- email);
-
- }
-
- } else if (first_match == MATCHED_FAMILY_NAME) {
-
- if (have_given)
- menu_text = g_strdup_printf ("%s, %s%s%s <%s>",
- card->name->family,
- card->name->given,
- have_additional ? " " : "",
- have_additional ? card->name->additional : "",
- email);
- else
- menu_text = g_strdup_printf ("%s <%s>", card->name->family, email);
- }
-
- if (menu_text) {
- g_strstrip (menu_text);
- final_match = make_match (dest, menu_text, score);
- g_free (menu_text);
- }
-
- return final_match;
-}
-
-/*
- * File As Query
- */
-
-static gchar *
-sexp_file_as (ESelectNamesCompletion *comp)
-{
- return name_style_query (comp, "file_as");
-}
-
-static ECompletionMatch *
-match_file_as (ESelectNamesCompletion *comp, EDestination *dest)
-{
- const gchar *name;
- const gchar *email;
- gchar *cpy, **strv, *menu_text;
- gint i;
- gboolean matched;
- double score = 0;
- ECompletionMatch *match;
-
- name = e_destination_get_name (dest);
- email = e_destination_get_email (dest);
-
- if (!(name && *name))
- return NULL;
-
- cpy = g_strdup (comp->priv->query_text);
- strv = g_strsplit (cpy, " ", 0);
-
- matched = FALSE;
- for (i=0; strv[i] && !matched; ++i) {
- matched = match_name_fragment (name, strv[i]);
- if (matched)
- score = strlen (strv[i]); /* one point per character of the match */
- }
-
- g_free (cpy);
- g_strfreev (strv);
-
- if (!matched)
- return NULL;
-
- menu_text = g_strdup_printf ("%s <%s>", name, email);
- g_strstrip (menu_text);
- match = make_match (dest, menu_text, score);
- g_free (menu_text);
-
- return match;
-}
-
-/*
- * Initials Query
- */
-
-static gchar *
-sexp_initials (ESelectNamesCompletion *comp)
-{
- return NULL;
-}
-
-static ECompletionMatch *
-match_initials (ESelectNamesCompletion *comp, EDestination *dest)
-{
- 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 },
- { TRUE, sexp_file_as, match_file_as },
- { 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 ECompletionMatch *
-book_query_score (ESelectNamesCompletion *comp, EDestination *dest)
-{
- ECompletionMatch *best_match = NULL;
- gint i;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp), NULL);
- g_return_val_if_fail (E_IS_DESTINATION (dest), NULL);
-
- if (! (comp->priv->query_text && *comp->priv->query_text))
- return NULL;
-
- for (i=0; i<book_query_count; ++i) {
-
- ECompletionMatch *this_match = NULL;
-
- if (book_queries[i].primary || !comp->priv->primary_only) {
- if (book_queries[i].tester && e_destination_get_card (dest)) {
- this_match = book_queries[i].tester (comp, dest);
- }
-
- if (this_match) {
- if (best_match == NULL || this_match->score > best_match->score) {
- e_completion_match_unref (best_match);
- best_match = this_match;
- } else {
- e_completion_match_unref (this_match);
- }
- }
- }
- }
-
- return best_match;
-}
-
-static void
-book_query_process_card_list (ESelectNamesCompletion *comp, const GList *cards)
-{
- while (cards) {
- ECard *card = E_CARD (cards->data);
-
- if (e_card_evolution_list (card)) {
-
- if (comp->priv->match_contact_lists) {
-
- EDestination *dest = e_destination_new ();
- ECompletionMatch *match;
- e_destination_set_card (dest, card, 0);
- match = book_query_score (comp, dest);
- if (match && match->score > 0) {
- e_completion_found_match (E_COMPLETION (comp), match);
- } else {
- e_completion_match_unref (match);
- }
- gtk_object_unref (GTK_OBJECT (dest));
-
- }
-
- } else if (card->email) {
- gint i;
- for (i=0; i<e_list_length (card->email); ++i) {
- EDestination *dest = e_destination_new ();
- const gchar *email;
- ECompletionMatch *match;
-
- e_destination_set_card (dest, card, i);
- email = e_destination_get_email (dest);
-
- if (email && *email) {
-
- match = book_query_score (comp, dest);
- if (match && match->score > 0) {
- e_completion_found_match (E_COMPLETION (comp), match);
- } else {
- e_completion_match_unref (match);
- }
- }
-
- gtk_object_unref (GTK_OBJECT (dest));
- }
- }
-
- 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->request_completion = e_select_names_completion_handle_request;
- 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);
- comp->priv->match_contact_lists = TRUE;
-}
-
-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';
-
- g_strstrip (q);
-
- 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;
-
- if (comp->priv->book_view)
- gtk_object_unref (GTK_OBJECT (comp->priv->book_view));
- 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);
-
- /*
- * We aren't searching, but the addressbook has changed -- clear our card cache so that
- * future completion requests will take the changes into account.
- */
- if (! e_completion_searching (E_COMPLETION (comp))) {
- e_select_names_completion_clear_cache (comp);
- return;
- }
-
- g_free (comp->priv->query_text);
- comp->priv->query_text = NULL;
-
- if (out)
- fprintf (out, "ending search\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);
- comp->priv->query_text = NULL;
- }
- 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));
-
- clean = clean_query_text (query_text);
- if (! (clean && *clean)) {
- g_free (clean);
- e_completion_end_search (E_COMPLETION (comp));
- return;
- }
-
- query_is_still_running = comp->priv->book_view_tag;
-
- 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_utf8_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-Ova
- *
- */
-
-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)
-{
- /* The g_utf8_validate is needed because as of 2001-06-11,
- * EText doesn't translate from locale->UTF8 when you paste
- * into it.
- */
- if (over == NULL || text == NULL || !g_utf8_validate (text, -1, NULL))
- return FALSE;
-
- return !g_utf8_strcasecmp (over->trigger, text);
-}
-
-
-/*
- *
- * Completion Callbacks
- *
- */
-
-static void
-e_select_names_completion_handle_request (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) {
- ECompletionMatch *match = g_new (ECompletionMatch, 1);
- e_completion_match_construct (match);
- e_completion_match_set_text (match, text, override[j].text[k]);
- match->score = 1 / (double) (k + 1);
- e_completion_found_match (comp, match);
- }
-
- 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 (E_IS_BOOK (book));
- 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);
-}
-
-gboolean
-e_select_names_completion_get_match_contact_lists (ESelectNamesCompletion *comp)
-{
- g_return_val_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp), FALSE);
- return comp->priv->match_contact_lists;
-}
-
-
-void
-e_select_names_completion_set_match_contact_lists (ESelectNamesCompletion *comp, gboolean x)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp));
- comp->priv->match_contact_lists = x;
-}
-
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 cfa496ca69..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-completion.h
+++ /dev/null
@@ -1,68 +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 *);
-
-gboolean e_select_names_completion_get_match_contact_lists (ESelectNamesCompletion *);
-void e_select_names_completion_set_match_contact_lists (ESelectNamesCompletion *, gboolean);
-
-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 7f65110c2a..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 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
- */
-
-#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 dbdec8a182..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 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_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 ffb88aa499..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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>
-#include <bonobo-conf/bonobo-config-database.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-moniker-util.h>
-
-/* Object argument IDs */
-enum {
- ARG_0,
- ARG_CARD,
-};
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-static guint e_select_names_manager_signals[LAST_SIGNAL] = { 0 };
-
-
-typedef struct {
- char *id;
- char *title;
- ESelectNamesModel *model;
- ESelectNamesModel *original_model;
- ESelectNamesManager *manager;
- guint changed_handler;
-} 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;
-}
-
-static void
-open_book_cb (EBook *book, EBookStatus status, ESelectNamesManager *manager)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- gtk_object_unref (GTK_OBJECT (book));
- manager->completion_book = NULL;
- }
-
- gtk_object_unref (GTK_OBJECT (manager)); /* unref ourself (matches ref before the load_uri call below) */
-}
-
-/**
- * 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()));
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- char *val;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- val = bonobo_config_get_string (db, "/Addressbook/Completion/uri", &ev);
-
- CORBA_exception_free (&ev);
-
- if (val) {
- manager->completion_book = e_book_new ();
- gtk_object_ref (GTK_OBJECT (manager)); /* ref ourself before our async call */
- e_book_load_uri (manager->completion_book, val, (EBookCallback)open_book_cb, manager);
- g_free (val);
- }
- else
- manager->completion_book = NULL;
-
- bonobo_object_unref (BONOBO_OBJECT (db));
-
- 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;
-
- e_select_names_manager_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESelectNamesManagerClass, changed),
- gtk_marshal_NONE__POINTER_INT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
- GTK_TYPE_INT);
- gtk_object_class_add_signals (object_class, e_select_names_manager_signals, LAST_SIGNAL);
-}
-
-/*
- * 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;
-
- static void section_model_changed_cb (ESelectNamesModel *, gpointer);
-
- newsec = g_new(ESelectNamesManagerSection, 1);
- newsec->id = g_strdup(section->id);
- newsec->title = g_strdup(section->title);
- newsec->model = section->model;
- newsec->original_model = section->original_model;
- newsec->manager = section->manager;
- newsec->changed_handler = gtk_signal_connect (GTK_OBJECT (newsec->model),
- "changed",
- GTK_SIGNAL_FUNC (section_model_changed_cb),
- newsec);
-
- if (newsec->model)
- gtk_object_ref(GTK_OBJECT(newsec->model));
- if (newsec->original_model)
- gtk_object_ref(GTK_OBJECT(newsec->original_model));
-
- return newsec;
-}
-
-static void
-section_free(void *sec, void *data)
-{
- ESelectNamesManagerSection *section = sec;
- if (section->manager && section->changed_handler) {
- gtk_signal_disconnect (GTK_OBJECT (section->model), section->changed_handler);
- }
- g_free(section->id);
- g_free(section->title);
- if (section->model)
- gtk_object_unref (GTK_OBJECT(section->model));
- if (section->original_model)
- gtk_object_unref (GTK_OBJECT (section->original_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);
-}
-
-static void
-section_model_changed_cb (ESelectNamesModel *model, gpointer closure)
-{
- ESelectNamesManagerSection *section = closure;
- gtk_signal_emit (GTK_OBJECT (section->manager),
- e_select_names_manager_signals[CHANGED],
- section->id,
- FALSE);
-}
-
-static void
-section_model_working_copy_changed_cb (ESelectNamesModel *model, gpointer closure)
-{
- ESelectNamesManagerSection *section = closure;
- gtk_signal_emit (GTK_OBJECT (section->manager),
- e_select_names_manager_signals[CHANGED],
- section->id,
- TRUE);
-}
-
-void
-e_select_names_manager_add_section (ESelectNamesManager *manager,
- const char *id,
- const char *title)
-{
- e_select_names_manager_add_section_with_limit (manager, id, title, -1);
-}
-
-void
-e_select_names_manager_add_section_with_limit (ESelectNamesManager *manager,
- const char *id,
- const char *title,
- gint limit)
-{
- 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_select_names_model_set_limit (section->model, limit);
-
- section->original_model = NULL;
-
- section->manager = manager;
-
- section->changed_handler = gtk_signal_connect (GTK_OBJECT (section->model),
- "changed",
- GTK_SIGNAL_FUNC (section_model_changed_cb),
- section);
-
- 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, ECompletionMatch *match)
-{
- ESelectNamesModel *snm;
- EDestination *dest;
- gint i, pos, start_pos, len;
-
- if (match == NULL || match->user_data == NULL)
- return;
-
-
- snm = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (entry), "select_names_model"));
- dest = E_DESTINATION (match->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);
-}
-
-static gint
-focus_in_cb (GtkWidget *w, GdkEventFocus *ev, gpointer user_data)
-{
- EEntry *entry = E_ENTRY (user_data);
- ESelectNamesModel *model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (entry), "select_names_model"));
-
- e_select_names_model_cancel_cardify_all (model);
-
- return FALSE;
-}
-
-static gint
-focus_out_cb (GtkWidget *w, GdkEventFocus *ev, gpointer user_data)
-{
- EEntry *entry = E_ENTRY (user_data);
- ESelectNamesModel *model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (entry), "select_names_model"));
- ESelectNamesManager *manager = E_SELECT_NAMES_MANAGER (gtk_object_get_data (GTK_OBJECT (entry), "select_names_manager"));
-
- if (!e_entry_completion_popup_is_visible (entry))
- e_select_names_model_cardify_all (model, manager->completion_book, 0);
-
- return FALSE;
-}
-
-static void
-completion_popup_cb (EEntry *entry, gint visible, gpointer user_data)
-{
- ESelectNamesModel *model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (entry), "select_names_model"));
- ESelectNamesManager *manager = E_SELECT_NAMES_MANAGER (gtk_object_get_data (GTK_OBJECT (entry), "select_names_manager"));
-
- if (!visible && !GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (entry->canvas)))
- e_select_names_model_cardify_all (model, manager->completion_book, 0);
-}
-
-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_object_set_data (GTK_OBJECT (eentry), "select_names_manager", manager);
-
- gtk_signal_connect (GTK_OBJECT (eentry),
- "popup",
- GTK_SIGNAL_FUNC (popup_cb),
- section->model);
-
- gtk_signal_connect (GTK_OBJECT (eentry->canvas),
- "focus_in_event",
- GTK_SIGNAL_FUNC (focus_in_cb),
- eentry);
- gtk_signal_connect (GTK_OBJECT (eentry->canvas),
- "focus_out_event",
- GTK_SIGNAL_FUNC (focus_out_cb),
- eentry);
- gtk_signal_connect (GTK_OBJECT (eentry),
- "completion_popup",
- GTK_SIGNAL_FUNC (completion_popup_cb),
- NULL);
-
- 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 (manager->completion_book, section->model);
- e_entry_enable_completion_full (eentry, comp, 50, completion_handler);
-
- gtk_object_set_data (GTK_OBJECT (eentry), "completion_handler", comp);
-
- 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)
-{
- gnome_dialog_close(GNOME_DIALOG(dialog));
-
- switch(button) {
- case 0:
- /* We don't need to do anything if they click on OK */
- break;
-
- case 1: {
- 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);
- e_select_names_model_overwrite_copy (section->model, section->original_model);
- }
-
- gtk_object_unref(GTK_OBJECT(iterator));
- break;
- }
- }
-}
-
-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)) {
- ESelectNamesManagerSection *section = (ESelectNamesManagerSection *) e_iterator_get(iterator);
- if (section->original_model != NULL)
- gtk_object_unref (GTK_OBJECT (section->original_model));
- section->original_model = e_select_names_model_duplicate (section->model);
- e_select_names_add_section (manager->names, section->id, section->title, section->model);
- gtk_signal_connect (GTK_OBJECT (section->model),
- "changed",
- GTK_SIGNAL_FUNC (section_model_working_copy_changed_cb),
- (gpointer)section); /* casting out const to avoid compiler warning */
- }
- 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));
- }
-}
-
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 99f01cb818..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-manager.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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;
-
- EBook *completion_book;
-};
-
-struct _ESelectNamesManagerClass {
- GtkObjectClass parent_class;
-
- void (*changed) (ESelectNamesManager *, const gchar *section_id, gint changed_working_copy);
-};
-
-ESelectNamesManager *e_select_names_manager_new (void);
-void e_select_names_manager_add_section (ESelectNamesManager *manager,
- const char *id,
- const char *title);
-void e_select_names_manager_add_section_with_limit (ESelectNamesManager *manager,
- const char *id,
- const char *title,
- gint limit);
-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);
-
-/* 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 138b0d73ad..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-model.c
+++ /dev/null
@@ -1,897 +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 (strlen(SEPARATOR))
-
-#define MAX_LENGTH 2047
-
-
-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;
-
- gint limit;
-
- gint freeze_count;
- gboolean pending_changed;
-};
-
-
-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);
-
- model->priv->limit = -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;
- }
-}
-
-
-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;
-
- if (model->priv->freeze_count > 0) {
- model->priv->pending_changed = TRUE;
- } else {
- gtk_signal_emit (GTK_OBJECT(model), e_select_names_model_signals[E_SELECT_NAMES_MODEL_CHANGED]);
- model->priv->pending_changed = FALSE;
- }
-}
-
-static void
-destination_changed_proxy (EDestination *dest, gpointer closure)
-{
- e_select_names_model_changed (E_SELECT_NAMES_MODEL (closure));
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-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));
- e_select_names_model_append (model, dup);
- }
-
- model->priv->limit = old->priv->limit;
-
- 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_textrep (dest);
- ++i;
- iter = g_list_next (iter);
- }
-
- model->priv->text = g_strjoinv (SEPARATOR, strv);
-
- if (strlen(model->priv->text) > MAX_LENGTH) {
- model->priv->text[MAX_LENGTH] = 0;
- g_realloc (model->priv->text, MAX_LENGTH + 1);
- }
-
- 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_address (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);
-}
-
-gint
-e_select_names_model_get_limit (ESelectNamesModel *model)
-{
- g_return_val_if_fail (model != NULL, 0);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), 0);
-
- return model->priv->limit;
-}
-
-void
-e_select_names_model_set_limit (ESelectNamesModel *model, gint limit)
-{
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
-
- model->priv->limit = MAX (limit, -1);
-}
-
-gboolean
-e_select_names_model_at_limit (ESelectNamesModel *model)
-{
- g_return_val_if_fail (model != NULL, TRUE);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), TRUE);
-
- return model->priv->limit >= 0 && g_list_length (model->priv->data) >= model->priv->limit;
-}
-
-const EDestination *
-e_select_names_model_get_destination (ESelectNamesModel *model, gint index)
-{
- 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);
-
- return E_DESTINATION (g_list_nth_data (model->priv->data, index));
-}
-
-gchar *
-e_select_names_model_export_destinationv (ESelectNamesModel *model)
-{
- EDestination **destv;
- gchar *str;
- gint i, len = 0;
- GList *j;
- g_return_val_if_fail (model && E_IS_SELECT_NAMES_MODEL (model), NULL);
-
- len = g_list_length (model->priv->data);
- destv = g_new0 (EDestination *, len+1);
-
- for (i=0, j = model->priv->data; j != NULL; j = g_list_next (j)) {
- EDestination *dest = E_DESTINATION (j->data);
-
- if (dest)
- destv[i++] = dest;
- }
-
- str = e_destination_exportv (destv);
- g_free (destv);
-
- return str;
-}
-
-static
-void send_changed (EDestination *dest, ECard *card, gpointer closure)
-{
- ESelectNamesModel *model = closure;
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_import_destinationv (ESelectNamesModel *model,
- gchar *destinationv)
-{
- EDestination **destv;
- gint i;
-
- g_return_if_fail (model && E_IS_SELECT_NAMES_MODEL (model));
-
- destv = e_destination_importv (destinationv);
-
- e_select_names_model_delete_all (model);
-
- if (destv == NULL)
- return;
-
- for (i = 0; destv[i]; i++) {
- e_destination_use_card (destv[i], send_changed, model);
- e_select_names_model_append (model, destv[i]);
- }
- g_free (destv);
-}
-
-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_textrep (dest) : "";
-}
-
-static void
-connect_destination (ESelectNamesModel *model, EDestination *dest)
-{
- gtk_signal_connect (GTK_OBJECT (dest),
- "changed",
- destination_changed_proxy,
- model);
-}
-
-static void
-disconnect_destination (ESelectNamesModel *model, EDestination *dest)
-{
- gtk_signal_disconnect_by_func (GTK_OBJECT (dest), destination_changed_proxy, model);
-}
-
-gboolean
-e_select_names_model_contains (ESelectNamesModel *model, const EDestination *dest)
-{
- GList *iter;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), FALSE);
- g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
-
- for (iter = model->priv->data; iter != NULL; iter = g_list_next (iter)) {
- if (iter->data != NULL && e_destination_equal (dest, E_DESTINATION (iter->data)))
- return TRUE;
- }
-
- return FALSE;
-}
-
-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));
-
- if (e_select_names_model_at_limit (model)) {
- /* FIXME: This is bad. */
- gtk_object_unref (GTK_OBJECT (dest));
- return;
- }
-
- connect_destination (model, 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_append (ESelectNamesModel *model, EDestination *dest)
-{
- g_return_if_fail (model && E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- if (e_select_names_model_at_limit (model)) {
- /* FIXME: This is bad. */
- gtk_object_unref (GTK_OBJECT (dest));
- return;
- }
-
- connect_destination (model, dest);
-
- model->priv->data = g_list_append (model->priv->data, dest);
-
- 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;
- const gchar *new_str, *old_str;
- 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_str = e_destination_get_textrep (dest);
- new_strlen = new_str ? strlen (new_str) : 0;
-
- if (model->priv->data == NULL) {
-
- connect_destination (model, dest);
-
- 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) {
-
- disconnect_destination (model, E_DESTINATION (node->data));
- connect_destination (model, dest);
-
- old_str = e_destination_get_textrep (E_DESTINATION (node->data));
- old_strlen = old_str ? strlen (old_str) : 0;
-
- 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;
- 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));
-
- node = g_list_nth (model->priv->data, index);
- dest = E_DESTINATION (node->data);
-
- disconnect_destination (model, dest);
- gtk_object_unref (GTK_OBJECT (dest));
-
- 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) {
- disconnect_destination (model, 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);
-}
-
-static void
-delete_all_iter (gpointer data, gpointer closure)
-{
- disconnect_destination (E_SELECT_NAMES_MODEL (closure), E_DESTINATION (data));
- gtk_object_unref (GTK_OBJECT (data));
-}
-
-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, delete_all_iter, model);
- g_list_free (model->priv->data);
- model->priv->data = NULL;
-
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_overwrite_copy (ESelectNamesModel *dest, ESelectNamesModel *src)
-{
- gint i, len;
-
- g_return_if_fail (dest && E_IS_SELECT_NAMES_MODEL (dest));
- g_return_if_fail (src && E_IS_SELECT_NAMES_MODEL (src));
-
- if (src == dest)
- return;
-
- e_select_names_model_delete_all (dest);
- len = e_select_names_model_count (src);
- for (i = 0; i < len; ++i) {
- const EDestination *d = e_select_names_model_get_destination (src, i);
- if (d)
- e_select_names_model_append (dest, e_destination_copy (d));
- }
-}
-
-void
-e_select_names_model_merge (ESelectNamesModel *dest, ESelectNamesModel *src)
-{
- gint i, len;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (dest));
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (src));
-
- if (src == dest)
- return;
-
- len = e_select_names_model_count (src);
- for (i = 0; i < len; ++i) {
- const EDestination *d = e_select_names_model_get_destination (src, i);
- if (d && !e_select_names_model_contains (dest, d))
- e_select_names_model_append (dest, e_destination_copy (d));
- }
-}
-
-void
-e_select_names_model_name_pos (ESelectNamesModel *model, gint index, gint *pos, gint *length)
-{
- gint rp = 0, i, len = 0;
- GList *iter;
- const gchar *str;
-
- 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);
- str = e_destination_get_textrep (E_DESTINATION (iter->data));
- len = str ? strlen (str) : 0;
- ++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;
- const gchar *str;
- 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) {
- str = e_destination_get_textrep (E_DESTINATION (iter->data));
- len = str ? strlen (str) : 0;
-
- 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) {
-#if 0
- g_print ("text_pos ended NULL\n");
-#endif
- i = -1;
- sp = -1;
- len = 0;
- } else {
-#if 0
- g_print ("text_pos got index %d\n", i);
-#endif
- }
-
- if (index)
- *index = i;
- if (start_pos)
- *start_pos = sp;
- if (length)
- *length = len;
-}
-
-void
-e_select_names_model_cardify (ESelectNamesModel *model, EBook *book, gint index, gint delay)
-{
- EDestination *dest;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (book == NULL || E_IS_BOOK (book));
- g_return_if_fail (0 <= index && index < g_list_length (model->priv->data));
-
- dest = E_DESTINATION (g_list_nth_data (model->priv->data, index));
-
- if (!e_destination_is_empty (dest)) {
-
- if (delay > 0)
- e_destination_cardify_delayed (dest, book, delay);
- else
- e_destination_cardify (dest, book);
- }
-}
-
-gboolean
-e_select_names_model_uncardify (ESelectNamesModel *model, gint index)
-{
- EDestination *dest;
- gboolean rv = FALSE;
-
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), FALSE);
- g_return_val_if_fail (0 <= index && index < g_list_length (model->priv->data), FALSE);
-
- dest = E_DESTINATION (g_list_nth_data (model->priv->data, index));
-
- if (!e_destination_is_empty (dest)) {
- EDestination *cpy_dest = e_destination_copy (dest);
-
- rv = e_destination_uncardify (cpy_dest);
-
- if (rv) {
- e_select_names_model_replace (model, index, cpy_dest);
- }
-
- }
-
- return rv;
-}
-
-void
-e_select_names_model_cancel_cardify (ESelectNamesModel *model, gint index)
-{
- EDestination *dest;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (0 <= index && index < g_list_length (model->priv->data));
-
- dest = E_DESTINATION (g_list_nth_data (model->priv->data, index));
-
- e_destination_cancel_cardify (dest);
-}
-
-void
-e_select_names_model_cardify_all (ESelectNamesModel *model, EBook *book, gint delay)
-{
- GList *iter;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (book == NULL || E_IS_BOOK (book));
-
- for (iter = model->priv->data; iter != NULL; iter = g_list_next (iter)) {
- EDestination *dest = E_DESTINATION (iter->data);
- if (!e_destination_is_empty (dest)) {
-
- if (delay > 0)
- e_destination_cardify_delayed (dest, book, delay);
- else
- e_destination_cardify (dest, book);
- }
- }
-}
-
-void
-e_select_names_model_cancel_cardify_all (ESelectNamesModel *model)
-{
- GList *iter;
-
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
-
- for (iter = model->priv->data; iter != NULL; iter = g_list_next (iter)) {
- EDestination *dest = E_DESTINATION (iter->data);
- e_destination_cancel_cardify (dest);
- }
-}
-
-void
-e_select_names_model_freeze (ESelectNamesModel *model)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
-
- ++model->priv->freeze_count;
-}
-
-void
-e_select_names_model_thaw (ESelectNamesModel *model)
-{
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (model->priv->freeze_count > 0);
-
- --model->priv->freeze_count;
- if (model->priv->pending_changed)
- e_select_names_model_changed (model);
-}
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 b7fa04d6cd..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-model.h
+++ /dev/null
@@ -1,91 +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);
-gint e_select_names_model_get_limit (ESelectNamesModel *model);
-void e_select_names_model_set_limit (ESelectNamesModel *model, gint limit);
-gboolean e_select_names_model_at_limit (ESelectNamesModel *model);
-
-const EDestination *e_select_names_model_get_destination (ESelectNamesModel *model, gint index);
-gchar *e_select_names_model_export_destinationv (ESelectNamesModel *model);
-void e_select_names_model_import_destinationv (ESelectNamesModel *model,
- gchar *destinationv);
-ECard *e_select_names_model_get_card (ESelectNamesModel *model, gint index);
-const gchar *e_select_names_model_get_string (ESelectNamesModel *model, gint index);
-
-gboolean e_select_names_model_contains (ESelectNamesModel *model, const EDestination *dest);
-
-void e_select_names_model_insert (ESelectNamesModel *model, gint index, EDestination *dest);
-void e_select_names_model_append (ESelectNamesModel *model, 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_overwrite_copy (ESelectNamesModel *dest, ESelectNamesModel *src);
-void e_select_names_model_merge (ESelectNamesModel *dest, ESelectNamesModel *src);
-
-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);
-
-void e_select_names_model_cardify (ESelectNamesModel *model, EBook *book, gint index, gint delay);
-gboolean e_select_names_model_uncardify (ESelectNamesModel *model, gint index);
-void e_select_names_model_cancel_cardify (ESelectNamesModel *model, gint index);
-void e_select_names_model_cardify_all (ESelectNamesModel *model, EBook *book, gint delay);
-void e_select_names_model_cancel_cardify_all (ESelectNamesModel *model);
-
-/* This is a mildly annoying freeze/thaw pair, in that it only applies to the 'changed'
- signal and not to 'resized'. This could cause unexpected results in some cases. */
-void e_select_names_model_freeze (ESelectNamesModel *model);
-void e_select_names_model_thaw (ESelectNamesModel *model);
-
-
-#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 4b34ff2d01..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-popup.c
+++ /dev/null
@@ -1,562 +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 <gal/widgets/e-unicode.h>
-
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/gui/contact-editor/e-contact-editor.h>
-#include <addressbook/gui/contact-editor/e-contact-quick-add.h>
-#include "e-addressbook-util.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);
-}
-
-/* You are in a maze of twisty little callbacks, all alike... */
-
-static void
-make_contact_editor_cb (EBook *book, gpointer user_data)
-{
- if (book) {
- EDestination *dest = E_DESTINATION (user_data);
- ECard *card;
-
- card = (ECard *) e_destination_get_card (dest);
- if (e_card_evolution_list (card)) {
- EContactListEditor *ce;
- ce = e_addressbook_show_contact_list_editor (book, card, FALSE, TRUE);
- e_contact_list_editor_raise (ce);
- }
- else {
- EContactEditor *ce;
- ce = e_addressbook_show_contact_editor (book, card, FALSE, TRUE);
- e_contact_editor_raise (ce);
- }
- gtk_object_unref (GTK_OBJECT (dest));
- }
-}
-
-static void
-edit_contact_info_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- if (info == NULL)
- return;
-
- gtk_object_ref (GTK_OBJECT (info->dest));
- e_book_use_local_address_book (make_contact_editor_cb, (gpointer) info->dest);
-}
-
-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;
-}
-
-static void
-toggle_html_mail_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- GtkCheckMenuItem *item = GTK_CHECK_MENU_ITEM (w);
- const EDestination *dest;
-
- if (info == NULL)
- return;
-
- dest = info->dest;
-
- item = GTK_CHECK_MENU_ITEM (item);
- e_destination_set_html_mail_pref ((EDestination *) dest, item->active);
-}
-
-static void
-add_html_mail (GnomeUIInfo *uiinfo, PopupInfo *info)
-{
- uiinfo->type = GNOME_APP_UI_TOGGLEITEM;
- uiinfo->label = _("Send HTML Mail?");
- uiinfo->moreinfo = toggle_html_mail_cb;
-}
-
-static void
-init_html_mail (GnomeUIInfo *uiinfo, PopupInfo *info)
-{
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (uiinfo->widget),
- e_destination_get_html_mail_pref (info->dest));
- gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (uiinfo->widget), TRUE);
-
-}
-
-static void
-set_uiinfo_label (GnomeUIInfo *uiinfo, const gchar *str)
-{
- GtkWidget *label;
- gchar *label_txt;
- GList *item_children;
-
- label_txt = e_utf8_to_locale_string (str);
- item_children = gtk_container_children (GTK_CONTAINER (uiinfo->widget));
- label = item_children->data;
- g_list_free (item_children);
- gtk_label_set_text (GTK_LABEL (label), label_txt);
- g_free (label_txt);
-}
-
-#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;
- gint html_toggle;
- gint mail_label = -1;
- const gchar *mail_label_str = NULL;
-
- /*
- * Build up our GnomeUIInfo array.
- */
-
- memset (uiinfo, 0, sizeof (uiinfo));
- memset (radioinfo, 0, sizeof (radioinfo));
-
- card = e_destination_get_card (info->dest);
-
- /* Use an empty label for now, we'll fill it later.
- If we set uiinfo label to contact name here, gnome_popup_menu_new
- could screw it up trying make a "translation". */
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = "";
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- if (card->email) {
-
- 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)) {
- gchar *label = (gchar *)e_iterator_get (iterator);
- if (label && *label) {
- radioinfo[j].label = "";
- radioinfo[j].type = GNOME_APP_UI_ITEM;
- radioinfo[j].moreinfo = change_email_num_cb;
- ++j;
- }
- }
- gtk_object_unref (GTK_OBJECT (iterator));
-
- 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 = "";
- mail_label_str = e_destination_get_email (info->dest);
- mail_label = i;
- ++i;
- }
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
- }
-
- add_html_mail (&(uiinfo[i]), info);
- html_toggle = i;
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = N_("Edit Contact Info");
- uiinfo[i].moreinfo = edit_contact_info_cb;
- ++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);
-
- init_html_mail (&(uiinfo[html_toggle]), info);
-
- /* Properly handle the names & e-mail addresses so that they don't get leaked and so that
- underscores are interpreted as key accelerators. This sucks. */
-
- set_uiinfo_label (&(uiinfo[0]), e_destination_get_name (info->dest));
-
- if (mail_label >= 0) {
- set_uiinfo_label (&(uiinfo[mail_label]), e_destination_get_email (info->dest));
- }
-
- if (using_radio) {
- gint n = e_destination_get_email_num (info->dest);
- gint j = 0;
- iterator = e_list_get_iterator (card->email);
- for (e_iterator_reset (iterator); e_iterator_is_valid (iterator); e_iterator_next (iterator)) {
- gchar *label = (gchar *)e_iterator_get (iterator);
- if (label && *label) {
- set_uiinfo_label (&(radioinfo[j]), label);
-
- 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);
-
- ++j;
- }
- }
- gtk_object_unref (GTK_OBJECT (iterator));
- }
-
- return pop;
-}
-
-static GtkWidget *
-popup_menu_list (PopupInfo *info)
-{
- GnomeUIInfo uiinfo[ARBITRARY_UIINFO_LIMIT];
- GtkWidget *pop;
- const gchar *str;
- gchar *gs;
- gint i = 0, subcount = 0, max_subcount = 10;
- ECard *card;
- EIterator *iterator;
-
- memset (uiinfo, 0, sizeof (uiinfo));
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = "";
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- card = e_destination_get_card (info->dest);
-
- if (card->email) {
-
- iterator = e_list_get_iterator (card->email);
- for (e_iterator_reset (iterator); e_iterator_is_valid (iterator) && subcount < max_subcount; e_iterator_next (iterator)) {
- gchar *label = (gchar *) e_iterator_get (iterator);
- if (label && *label) {
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = "";
- ++i;
- ++subcount;
- }
- }
- if (e_iterator_is_valid (iterator)) {
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = "";
- ++i;
- }
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- gtk_object_unref (GTK_OBJECT (iterator));
- }
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = N_("Edit Contact List");
- uiinfo[i].moreinfo = edit_contact_info_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);
-
- /* Now set labels properly. */
-
- str = e_destination_get_name (info->dest);
- if (!(str && *str))
- str = _("Unnamed Contact List");
- set_uiinfo_label (&(uiinfo[0]), str);
-
- if (card->email) {
-
- iterator = e_list_get_iterator (card->email);
- i = 2;
- for (e_iterator_reset (iterator); e_iterator_is_valid (iterator) && subcount < max_subcount; e_iterator_next (iterator)) {
- gchar *label = (gchar *) e_iterator_get (iterator);
- if (label && *label) {
- EDestination *subdest = e_destination_import (label);
- set_uiinfo_label (&(uiinfo[i]), e_destination_get_address (subdest));
- ++i;
- gtk_object_unref (GTK_OBJECT (subdest));
- }
- }
- if (e_iterator_is_valid (iterator)) {
- gs = g_strdup_printf (N_("(%d not shown)"), e_list_length (card->email) - max_subcount);
- set_uiinfo_label (&(uiinfo[i]), gs);
- g_free (gs);
- }
-
- gtk_object_unref (GTK_OBJECT (iterator));
- }
-
-
- 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_address (info->dest), NULL, NULL);
-}
-
-static GtkWidget *
-popup_menu_nocard (PopupInfo *info)
-{
- GnomeUIInfo uiinfo[ARBITRARY_UIINFO_LIMIT];
- gint i=0;
- GtkWidget *pop;
- const gchar *str;
- gint html_toggle;
-
- memset (uiinfo, 0, sizeof (uiinfo));
-
- /* Use an empty label for now, we'll fill it later.
- If we set uiinfo label to contact name here, gnome_popup_menu_new
- could screw it up trying make a "translation". */
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = "";
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- add_html_mail (&(uiinfo[i]), info);
- html_toggle = i;
- ++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);
-
- init_html_mail (&(uiinfo[html_toggle]), info);
-
- /* Now set label of the first item to contact name */
- str = e_destination_get_name (info->dest);
- if (! (str && *str))
- str = e_destination_get_email (info->dest);
- if (! (str && *str))
- str = _("Unnamed Contact");
-
- set_uiinfo_label (&(uiinfo[0]), str);
-
- 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);
- if (e_destination_is_empty (dest))
- return;
-
- card = e_destination_get_card (dest);
-
- info = popup_info_new (model, dest, pos, index);
-
- if (e_destination_contains_card (dest)) {
- if (e_destination_is_evolution_list (dest))
- popup = popup_menu_list (info);
- else
- popup = popup_menu_card (info);
- } else {
- popup = 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 84c7754020..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-table-model.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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 {
- const gchar *name = e_destination_get_name (dest);
- const gchar *email = e_destination_get_email (dest);
-
- model->data[i].name = g_strdup (name && *name ? name : email);
- model->data[i].email = g_strdup (email);
- }
- }
- } 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 f917ff17d8..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@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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 d2e77d6316..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-text-model.c
+++ /dev/null
@@ -1,739 +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/gui/contact-editor/e-contact-editor.h>
-#include "e-select-names-text-model.h"
-#include "e-addressbook-util.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)
-{
- model->last_magic_comma_pos = -1;
-}
-
-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;
-
- E_SELECT_NAMES_TEXT_MODEL (model)->last_magic_comma_pos = -1;
-
- 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_textrep (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_raw (d1, str1);
- e_destination_set_raw (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;
- }
-
- E_SELECT_NAMES_TEXT_MODEL (model)->last_magic_comma_pos = pos;
-
- } 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 && *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;
- dest = index >= 0 ? e_destination_copy (e_select_names_model_get_destination (source, index)) : e_destination_new ();
- e_destination_set_raw (dest, new_str);
- e_select_names_model_replace (source, index, dest);
-
- /* 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;
-
- if (E_SELECT_NAMES_TEXT_MODEL (model)->last_magic_comma_pos == pos+1
- && length == 1) {
- --pos;
- if (pos >= 0)
- ++length;
- E_SELECT_NAMES_TEXT_MODEL (model)->last_magic_comma_pos = -1;
- }
-
- 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_raw (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 = index >= 0 ? e_destination_copy (e_select_names_model_get_destination (source, index)) : e_destination_new ();
- e_destination_set_raw (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:
- E_SELECT_NAMES_TEXT_MODEL (model)->last_magic_comma_pos = -1;
- 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 != NULL);
-
- /* present read-only contact editor when someone double clicks from here */
- contact_editor = e_addressbook_show_contact_editor (e_card_get_book (card), card, FALSE, FALSE);
- 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 fa6ab11a63..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-text-model.h
+++ /dev/null
@@ -1,47 +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;
-
- gint last_magic_comma_pos;
-};
-
-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 5a7b2705d0..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ /dev/null
@@ -1,942 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-select-names.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-table-without.h>
-#include <gal/widgets/e-font.h>
-#include <gal/widgets/e-popup-menu.h>
-
-#include <addressbook/gui/widgets/e-addressbook-model.h>
-#include <addressbook/gui/widgets/e-addressbook-table-adapter.h>
-#include <addressbook/gui/component/e-cardlist-model.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/gui/component/addressbook-component.h>
-#include <addressbook/gui/component/addressbook-storage.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"
-#include <gal/widgets/e-categories-master-list-combo.h>
-#include <e-util/e-categories-master-list-wombat.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, EAddressbookModel *model)
-{
- gtk_object_set(GTK_OBJECT(model),
- "book", book,
- NULL);
- gtk_object_unref(GTK_OBJECT(book));
- gtk_object_unref(GTK_OBJECT(model));
-}
-
-static void
-addressbook_model_set_uri(EAddressbookModel *model, char *uri)
-{
- EBook *book;
- book = e_book_new();
- gtk_object_ref(GTK_OBJECT(model));
- e_book_load_uri(book, uri, (EBookCallback) set_book, model);
-}
-
-static void *
-card_key (ECard *card)
-{
- EBook *book;
- const gchar *book_uri;
-
- if (card == NULL)
- return NULL;
-
- g_assert (E_IS_CARD (card));
-
- book = e_card_get_book (card);
- book_uri = book ? e_book_get_uri (book) : "NoBook";
- return g_strdup_printf ("%s|%s", book_uri ? book_uri : "NoURI", e_card_get_id (card));
-}
-
-static void
-sync_one_model (gpointer k, gpointer val, gpointer closure)
-{
- ETableWithout *etw = E_TABLE_WITHOUT (closure);
- ESelectNamesChild *child = val;
- ESelectNamesModel *model = child->source;
- gint i, count;
- ECard *card;
- void *key;
-
- count = e_select_names_model_count (model);
- for (i = 0; i < count; ++i) {
- card = e_select_names_model_get_card (model, i);
- if (card) {
- key = card_key (card);
- e_table_without_hide (etw, key);
- g_free (key);
- }
- }
-}
-
-static void
-sync_table_and_models (ESelectNamesModel *triggering_model, ESelectNames *esl)
-{
- e_table_without_show_all (E_TABLE_WITHOUT (esl->without));
- g_hash_table_foreach (esl->children, sync_one_model, esl->without);
-}
-
-static void
-real_add_address_cb (int model_row, gpointer closure)
-{
- ESelectNamesChild *child = closure;
- ESelectNames *names = child->names;
- ECard *card;
- EDestination *dest = e_destination_new ();
- gint mapped_row;
-
- mapped_row = e_table_subset_view_to_model_row (E_TABLE_SUBSET (names->without), model_row);
-
- card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(names->model), mapped_row);
-
-
- e_destination_set_card (dest, card, 0);
-
- e_select_names_model_append (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_select_names_model_freeze (child->source);
- e_table_selected_row_foreach(e_table_scrolled_get_table(names->table),
- real_add_address_cb, child);
- e_select_names_model_thaw (child->source);
-}
-
-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);
- }
-}
-
-static void *
-esn_get_key_fn (ETableModel *source, int row, void *closure)
-{
- EAddressbookModel *model = E_ADDRESSBOOK_MODEL (closure);
- ECard *card = e_addressbook_model_get_card (model, row);
- void *key = card_key (card);
- return key;
-}
-
-static void *
-esn_dup_key_fn (const void *key, void *closure)
-{
- void *dup = (void *) g_strdup ((const gchar *) key);
- return dup;
-}
-
-static void
-esn_free_gotten_key_fn (void *key, void *closure)
-{
- g_free (key);
-}
-
-static void
-esn_free_duped_key_fn (void *key, void *closure)
-{
- g_free (key);
-}
-
-GtkWidget *
-e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2)
-{
- ETableModel *adapter;
- ETableModel *without;
- EAddressbookModel *model;
- GtkWidget *table;
- char *filename;
- char *uri;
- char *spec;
-
- model = e_addressbook_model_new ();
- adapter = E_TABLE_MODEL (e_addressbook_table_adapter_new (model));
-
- 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);
-
- gtk_object_set(GTK_OBJECT(model),
- "editable", FALSE,
- "query", "(contains \"email\" \"\")",
- NULL);
-
- without = e_table_without_new (adapter,
- g_str_hash,
- g_str_equal,
- esn_get_key_fn,
- esn_dup_key_fn,
- esn_free_gotten_key_fn,
- esn_free_duped_key_fn,
- model);
-
- spec = g_strdup_printf(SPEC, E_CARD_SIMPLE_FIELD_NAME_OR_ORG);
- table = e_table_scrolled_new (without, NULL, spec, NULL);
- g_free(spec);
-
- gtk_object_set_data(GTK_OBJECT(table), "adapter", adapter);
- gtk_object_set_data(GTK_OBJECT(table), "without", without);
- gtk_object_set_data(GTK_OBJECT(table), "model", model);
-
- return table;
-}
-
-typedef struct {
- char *description;
- char *display_name;
- char *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->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->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->displayName);
- if (!strncmp (folder->physicalUri, "file:", 5))
- e_folder->uri = g_strdup_printf ("%s/addressbook.db", folder->physicalUri);
- else
- e_folder->uri = g_strdup(folder->physicalUri);
- 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
-update_query (GtkWidget *button, ESelectNames *e_select_names)
-{
- char *category = "";
- char *search = "";
- char *query;
- char *q_array[4];
- int i;
- if (e_select_names->categories_entry) {
- category = gtk_entry_get_text (GTK_ENTRY (e_select_names->categories_entry));
- }
- if (e_select_names->search_entry) {
- search = gtk_entry_get_text (GTK_ENTRY (e_select_names->search_entry));
- }
- i = 0;
- q_array[i++] = "(contains \"email\" \"\")";
- if (category && *category)
- q_array[i++] = g_strdup_printf ("(is \"category\" \"%s\")", category);
- if (search && *search)
- q_array[i++] = g_strdup_printf ("(contains \"x-evolution-any-field\" \"%s\")", search);
- q_array[i++] = NULL;
- if (i > 2) {
- char *temp = g_strjoinv (" ", q_array);
- query = g_strdup_printf ("(and %s)", temp);
- g_free (temp);
- } else {
- query = g_strdup (q_array[0]);
- }
- gtk_object_set (GTK_OBJECT (e_select_names->model),
- "query", query,
- NULL);
- for (i = 1; q_array[i]; i++) {
- g_free (q_array[i]);
- }
- g_free (query);
-}
-
-static void
-hookup_listener (ESelectNames *e_select_names,
- GNOME_Evolution_Storage storage,
- EvolutionStorageListener *listener,
- CORBA_Environment *ev)
-{
- GNOME_Evolution_StorageListener corba_listener;
-
- g_return_if_fail (storage != CORBA_OBJECT_NIL);
-
- corba_listener = evolution_storage_listener_corba_objref(listener);
-
- gtk_signal_connect(GTK_OBJECT(listener), "new_folder",
- GTK_SIGNAL_FUNC(new_folder), e_select_names);
- gtk_signal_connect(GTK_OBJECT(listener), "update_folder",
- GTK_SIGNAL_FUNC(update_folder), e_select_names);
- gtk_signal_connect(GTK_OBJECT(listener), "removed_folder",
- GTK_SIGNAL_FUNC(removed_folder), e_select_names);
-
- GNOME_Evolution_Storage_addListener(storage, corba_listener, ev);
-
- if (ev->_major != CORBA_NO_EXCEPTION) {
- g_warning ("e_select_names_init: Exception adding listener to "
- "remote GNOME_Evolution_Storage interface.\n");
- return;
- }
-}
-
-static void
-e_select_names_hookup_shell_listeners (ESelectNames *e_select_names)
-{
- EvolutionStorage *other_contact_storage;
- GNOME_Evolution_Storage storage;
- 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->local_listener = evolution_storage_listener_new();
-
- /* This should really never happen, but a bug report (ximian #5193) came in w/ a backtrace suggesting that it did in
- fact happen to someone, so the best we can do is try to avoid crashing in this case. */
- if (storage == CORBA_OBJECT_NIL) {
- GtkWidget *oh_shit;
-
- oh_shit = gnome_error_dialog (_("Evolution is unable to get the addressbook local storage. "
- "This may have been caused by the evolution-addressbook component crashing. "
- "To help us better understand and ultimately resolve this problem, "
- "please send an e-mail to Jon Trowbridge <trow@ximian.com> with a detailed description of "
- "the circumstances under which this error occurred. Thank you."));
- gtk_widget_show (oh_shit);
- return;
- }
- else {
- hookup_listener (e_select_names, storage, e_select_names->local_listener, &ev);
- 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;
- }
- }
-
- other_contact_storage = addressbook_get_other_contact_storage ();
- if (other_contact_storage) {
- storage = bonobo_object_corba_objref (BONOBO_OBJECT (other_contact_storage));
- e_select_names->other_contacts_listener = evolution_storage_listener_new();
-
- hookup_listener (e_select_names, storage, e_select_names->other_contacts_listener, &ev);
- }
-
- CORBA_exception_free(&ev);
-}
-
-GtkWidget *e_select_names_create_categories (gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-e_select_names_create_categories (gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- ECategoriesMasterList *ecml;
- GtkWidget *combo;
-
- ecml = e_categories_master_list_wombat_new ();
- combo = e_categories_master_list_combo_new (ecml);
- gtk_object_unref (GTK_OBJECT (ecml));
-
- return combo;
-}
-
-static void
-e_select_names_init (ESelectNames *e_select_names)
-{
- GladeXML *gui;
- GtkWidget *widget, *button;
-
- 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);
- gnome_dialog_set_default(GNOME_DIALOG(e_select_names), 0);
-
- gtk_window_set_title(GTK_WINDOW(e_select_names), _("Select Contacts from Addressbook"));
- 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->adapter = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "adapter");
- e_select_names->without = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "without");
-
- e_select_names->categories = glade_xml_get_widget (gui, "custom-categories");
- if (e_select_names->categories && !GTK_IS_COMBO (e_select_names->categories))
- e_select_names->categories = NULL;
- if (e_select_names->categories) {
- e_select_names->categories_entry = GTK_COMBO (e_select_names->categories)->entry;
- } else
- e_select_names->categories_entry = NULL;
- e_select_names->search_entry = glade_xml_get_widget (gui, "entry-find");
- if (e_select_names->search_entry && !GTK_IS_ENTRY (e_select_names->search_entry))
- e_select_names->search_entry = NULL;
- if (e_select_names->search_entry)
- gtk_signal_connect(GTK_OBJECT(e_select_names->search_entry), "activate",
- GTK_SIGNAL_FUNC(update_query), e_select_names);
- if (e_select_names->categories_entry)
- gtk_signal_connect(GTK_OBJECT(e_select_names->categories_entry), "changed",
- GTK_SIGNAL_FUNC(update_query), e_select_names);
-
- button = glade_xml_get_widget (gui, "button-find");
- if (button)
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(update_query), e_select_names);
-
- e_select_names->folders = g_hash_table_new(g_str_hash, g_str_equal);
-
- e_select_names_hookup_shell_listeners (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)
-{
- gtk_signal_disconnect_by_func (GTK_OBJECT (child->source), GTK_SIGNAL_FUNC (sync_table_and_models), 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->local_listener), e_select_names);
- gtk_object_unref(GTK_OBJECT(e_select_names->local_listener));
- gtk_signal_disconnect_by_data(GTK_OBJECT(e_select_names->other_contacts_listener), e_select_names);
- gtk_object_unref(GTK_OBJECT(e_select_names->other_contacts_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)
-{
- g_message ("remove row %d", row);
- e_select_names_model_delete (child->source, row);
-}
-
-struct _RightClickData {
- ETable *table;
- ESelectNamesChild *child;
-};
-typedef struct _RightClickData RightClickData;
-
-static GSList *selected_rows = NULL;
-
-static void
-etable_selection_foreach_cb (int row, void *data)
-{
- /* Build a list of rows in reverse order, then remove them,
- necessary because otherwise it'll start trying to delete
- rows out of index in ETableModel */
- selected_rows = g_slist_prepend (selected_rows,
- GINT_TO_POINTER (row));
-}
-
-static void
-selected_rows_foreach_cb (void *row, void *data)
-{
- ESelectNamesChild *child = data;
-
- remove_address (NULL, GPOINTER_TO_INT (row), 0, NULL, child);
-}
-
-static void
-remove_cb (GtkWidget *widget, void *data)
-{
- RightClickData *rcdata = (RightClickData *)data;
-
- e_select_names_model_freeze (rcdata->child->source);
-
- /* Build a list of selected rows */
- e_table_selected_row_foreach (rcdata->table,
- etable_selection_foreach_cb,
- rcdata->child);
-
- /* Now process the list we made, removing each selected row */
- g_slist_foreach (selected_rows,
- (GFunc)selected_rows_foreach_cb,
- rcdata->child);
-
- e_select_names_model_thaw (rcdata->child->source);
-
- /* Free everything we've created */
- g_free (rcdata);
- g_slist_free (selected_rows);
- selected_rows = NULL;
-}
-
-static void
-section_right_click_cb (ETable *table, gint row, gint col, GdkEvent *event, ESelectNamesChild *child)
-{
- EPopupMenu right_click_menu[] = {
- { N_("Remove"), NULL,
- GTK_SIGNAL_FUNC (remove_cb), NULL, 0 },
- { NULL, NULL, NULL, 0 }
- };
-
- RightClickData *rcdata = g_new0 (RightClickData, 1);
- rcdata->table = table;
- rcdata->child = child;
-
- e_popup_menu_run (right_click_menu, event, 0, 0,
- rcdata);
-}
-
-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))), "right_click",
- GTK_SIGNAL_FUNC(section_right_click_cb), child);
- 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_signal_connect (GTK_OBJECT (child->source),
- "changed",
- GTK_SIGNAL_FUNC (sync_table_and_models),
- e_select_names);
-
- 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);
-
- sync_table_and_models (child->source, e_select_names);
-}
-
-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 d4da9c9892..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-select-names.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <addressbook/gui/widgets/e-addressbook-model.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 *adapter;
- ETableModel *without;
- EAddressbookModel *model;
- GtkWidget *categories;
- GtkWidget *categories_entry;
- GtkWidget *search_entry;
- EvolutionStorageListener *local_listener;
- EvolutionStorageListener *other_contacts_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 dbfd36f86f..0000000000
--- a/addressbook/gui/component/select-names/select-names.glade
+++ /dev/null
@@ -1,444 +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>
- <default_width>417</default_width>
- <default_height>332</default_height>
- <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>button4</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>button5</name>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-top</name>
- <rows>2</rows>
- <columns>1</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <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>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <rows>2</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>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>0</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>label20</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>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox6</name>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <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>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label22</name>
- <label>Co_ntacts:</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>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>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>dialog-vbox1</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>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>Show contacts matching the following criteria:</label>
- <justify>GTK_JUSTIFY_LEFT</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>hbox1</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Folder:</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>optionmenu-folder</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>optionmenu-folder</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>_Category:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>custom-categories</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom-categories</name>
- <can_focus>True</can_focus>
- <creation_function>e_select_names_create_categories</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Wed, 27 Jun 2001 01:47:01 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>C_ontaining:</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>entry-find</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-find</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>GtkHButtonBox</class>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>0</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>button-find</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>F_ind</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>8</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </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 19598eeb7b..0000000000
--- a/addressbook/gui/contact-editor/Makefile.am
+++ /dev/null
@@ -1,65 +0,0 @@
-INCLUDES = \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/ \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_srcdir)/addressbook/gui/merging \
- -I$(top_srcdir)/widgets/e-table \
- -I$(top_builddir)/shell \
- -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 \
- file-exists.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 54fea0864a..0000000000
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ /dev/null
@@ -1,2537 +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>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog2</name>
- <border_width>2</border_width>
- <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>
- <homogeneous>False</homogeneous>
- <spacing>4</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_area2</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>button28</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>button29</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>button30</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>table2</name>
- <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>
- <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>
- <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>
- <can_focus>True</can_focus>
- <label>_Add</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button32</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <height>200</height>
- <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>
- <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>
- <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>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-add-phone</name>
- <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>
- <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>button43</name>
- <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>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame-add-phone</name>
- <border_width>4</border_width>
- <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>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-add-phone</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>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeApp</class>
- <name>contact editor</name>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <can_focus>True</can_focus>
- <label>_Full Name...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>GtkAlignment</class>
- <name>alignment3</name>
- <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>
- <relief>GTK_RELIEF_NORMAL</relief>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment5</name>
- <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>
- <relief>GTK_RELIEF_NORMAL</relief>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment7</name>
- <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>
- <relief>GTK_RELIEF_NORMAL</relief>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment8</name>
- <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>
- <relief>GTK_RELIEF_NORMAL</relief>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator4</name>
- <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>
- <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>
- <relief>GTK_RELIEF_NORMAL</relief>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-fullname</name>
- <can_default>True</can_default>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <label>Wants to receive _HTML mail</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment4</name>
- <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>
- <relief>GTK_RELIEF_NORMAL</relief>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox1</name>
- <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>
- <label>_Business</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-phone1</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox2</name>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <can_focus>True</can_focus>
- <label>_Contacts...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment15</name>
- <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>
- <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>
- <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>
- <can_focus>True</can_focus>
- <label>Ca_tegories...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox7</name>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <label>Organi_zation:</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>
- <can_focus>True</can_focus>
- <label>_Address...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>
- <class>GtkAlignment</class>
- <name>alignment17</name>
- <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>GtkTable</class>
- <name>table-contacts</name>
- <rows>1</rows>
- <columns>1</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>accellabel-fileas</name>
- <label>File A_s:</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-file-as</focus_target>
- <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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>accellabel-web</name>
- <label>_Web page address:</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-web</focus_target>
- <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>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label15</name>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <label>_Birthday:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>dateedit-birthday</focus_target>
- <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>
- <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>
- <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>
- <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>
- <focus_target>dateedit-anniversary</focus_target>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>GtkEntry</class>
- <name>entry-assistant</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>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>
- <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>
- <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>
- <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>
- <focus_target>text-comments</focus_target>
- <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>
- <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>
- <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>
- <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>
- <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>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom9</name>
- <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>
- <class>Custom</class>
- <name>dateedit-birthday</name>
- <can_focus>True</can_focus>
- <creation_function>e_contact_editor_create_date</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 05 Jun 2001 02:36:27 GMT</last_modification_time>
- <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>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>dateedit-anniversary</name>
- <can_focus>True</can_focus>
- <creation_function>e_contact_editor_create_date</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 05 Jun 2001 02:36:32 GMT</last_modification_time>
- <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>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label16</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>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <border_width>7</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Custom</class>
- <name>custom12</name>
- <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:13 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label24</name>
- <label>If this person publishes free/busy or other calendar information on the Internet, enter the address
-of that information here.</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment18</name>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>0.75</xscale>
- <yscale>1</yscale>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table-contact-editor-collaboration</name>
- <border_width>7</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label22</name>
- <label>_Public Calendar URL:</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-caluri</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>label23</name>
- <label>F_ree/Busy URL:</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-fburl</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-caluri</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>
- <class>GtkEntry</class>
- <name>entry-fburl</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>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label21</name>
- <label>Collaboration</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>
- <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 919fb63acb..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-address.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-editor-address.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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>
-#include <gtk/gtkcombo.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::editable", 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->editable = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- GtkWidget *w = glade_xml_get_widget(e_contact_editor_address->gui, entry_names[i]);
- if (GTK_IS_ENTRY (w)) {
- gtk_entry_set_editable (GTK_ENTRY (w),
- e_contact_editor_address->editable);
- }
- else if (GTK_IS_COMBO (w)) {
- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (w)->entry),
- e_contact_editor_address->editable);
- gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_address->editable);
- }
- }
- 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->editable ? 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 f4031bea2f..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 editable : 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 0af0de3236..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-editor-fullname.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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"
-#include <gtk/gtkcombo.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::editable", 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->editable = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- GtkWidget *w = glade_xml_get_widget(e_contact_editor_fullname->gui, entry_names[i]);
- if (GTK_IS_ENTRY (w)) {
- gtk_entry_set_editable (GTK_ENTRY (w),
- e_contact_editor_fullname->editable);
- }
- else if (GTK_IS_COMBO (w)) {
- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (w)->entry),
- e_contact_editor_fullname->editable);
- gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_fullname->editable);
- }
- }
- 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->editable ? 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 82411c0606..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 editable : 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 d34d1589b3..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ /dev/null
@@ -1,2567 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-editor.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <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 <gal/e-text/e-entry.h>
-
-#include <e-util/e-categories-master-list-wombat.h>
-
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-#include "e-util/e-gui-utils.h"
-#include "widgets/misc/e-dateedit.h"
-#include "shell/evolution-shell-component-utils.h"
-
-#include "e-card-merging.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 {
- CARD_ADDED,
- CARD_MODIFIED,
- CARD_DELETED,
- 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_editable(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 void command_state_changed (EContactEditor *ce);
-static void widget_changed (GtkWidget *widget, EContactEditor *editor);
-static void close_dialog (EContactEditor *ce);
-static void enable_widget (GtkWidget *widget, gboolean enabled);
-
-static GtkObjectClass *parent_class = NULL;
-
-static guint contact_editor_signals[LAST_SIGNAL];
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_CARD,
- ARG_IS_NEW_CARD,
- ARG_EDITABLE,
- ARG_CHANGED,
- 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;
-}
-
-typedef void (*GtkSignal_NONE__INT_OBJECT) (GtkObject * object,
- gint arg1,
- GtkObject *arg2,
- gpointer user_data);
-
-static void
-e_marshal_NONE__INT_OBJECT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_OBJECT rfunc;
- rfunc = (GtkSignal_NONE__INT_OBJECT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_OBJECT (args[1]),
- func_data);
-}
-
-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::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
- 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::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
- gtk_object_add_arg_type ("EContactEditor::changed", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_CHANGED);
-
- contact_editor_signals[CARD_ADDED] =
- gtk_signal_new ("card_added",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, card_added),
- e_marshal_NONE__INT_OBJECT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT, GTK_TYPE_OBJECT);
-
- contact_editor_signals[CARD_MODIFIED] =
- gtk_signal_new ("card_modified",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, card_modified),
- e_marshal_NONE__INT_OBJECT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT, GTK_TYPE_OBJECT);
-
- contact_editor_signals[CARD_DELETED] =
- gtk_signal_new ("card_deleted",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, card_deleted),
- e_marshal_NONE__INT_OBJECT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT, 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);
-
- widget_changed (widget, editor);
-}
-
-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);
-
- widget_changed (widget, 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);
-
- widget_changed (widget, editor);
-}
-
-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);
-
- widget_changed (widget, editor);
-}
-
-/* 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);
-
- widget_changed (widget, editor);
-}
-
-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);
-
- widget_changed (widget, editor);
-}
-
-static void
-field_changed (GtkWidget *widget, EContactEditor *editor)
-{
- if (!editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-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
-widget_changed (GtkWidget *widget, EContactEditor *editor)
-{
- if (!editor->editable) {
- g_warning ("non-editable contact editor has an editable field in it.");
- return;
- }
-
- if (!editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-static void
-set_entry_changed_signal_field(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",
- field_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);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-web");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-categories");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-jobtitle");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-file-as");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-manager");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-assistant");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-office");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-department");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-profession");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-nickname");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-spouse");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "text-comments");
- if (widget && GTK_IS_TEXT(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "dateedit-birthday");
- if (widget && E_IS_DATE_EDIT(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary");
- if (widget && E_IS_DATE_EDIT(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_changed, editor);
- }
- widget = glade_xml_get_widget(editor->gui, "entry-web");
- if (widget && GTK_IS_ENTRY(widget)) {
- gtk_signal_connect(GTK_OBJECT(widget), "changed",
- widget_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),
- "editable", editor->editable,
- 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),
- "editable", editor->editable,
- 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 = NULL;
- GnomeDialog *dialog;
- int result;
- GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
- ECategoriesMasterList *ecml;
- 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));
- ecml = e_categories_master_list_wombat_new ();
- gtk_object_set(GTK_OBJECT(dialog),
- "header", _("This contact belongs to these categories:"),
- "ecml", ecml,
- NULL);
- gtk_object_unref (GTK_OBJECT (ecml));
- 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));
-}
-
-static void
-ensure_select_names_contact (EContactEditor *editor)
-{
- if (editor->select_names_contacts == NULL) {
- editor->select_names_contacts = e_select_names_manager_new ();
- e_select_names_manager_add_section (editor->select_names_contacts,
- "contacts",
- "Related Contacts");
- }
-
- set_entry_changed_signal_field(editor, "entry-caluri");
- set_entry_changed_signal_field(editor, "entry-fburl");
-}
-
-static void
-contacts_clicked (GtkWidget *button, EContactEditor *editor)
-{
- ensure_select_names_contact (editor);
- e_select_names_manager_activate_dialog (editor->select_names_contacts,
- "contacts");
-}
-
-static void
-add_lists (EContactEditor *editor)
-{
- GtkWidget *table = glade_xml_get_widget (editor->gui, "table-contacts");
- if (table && GTK_IS_TABLE (table)) {
- GtkWidget *entry;
-
- ensure_select_names_contact (editor);
- entry = e_select_names_manager_create_entry (editor->select_names_contacts,
- "contacts");
- gtk_signal_connect(GTK_OBJECT(entry), "changed",
- widget_changed, editor);
- gtk_table_attach_defaults (GTK_TABLE (table), entry, 0, 1, 0, 1);
- gtk_widget_show (entry);
- }
-}
-
-
-typedef struct {
- EContactEditor *ce;
- gboolean should_close;
-} EditorCloseStruct;
-
-static void
-card_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruct *ecs)
-{
- EContactEditor *ce = ecs->ce;
- gboolean should_close = ecs->should_close;
-
- g_free (ecs);
-
- e_card_set_id (ce->card, id);
-
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[CARD_ADDED],
- status, ce->card);
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- ce->is_new_card = FALSE;
-
- if (should_close) {
- close_dialog (ce);
- }
- else {
- ce->changed = FALSE;
- command_state_changed (ce);
- }
- }
-}
-
-static void
-card_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs)
-{
- EContactEditor *ce = ecs->ce;
- gboolean should_close = ecs->should_close;
-
- g_free (ecs);
-
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[CARD_MODIFIED],
- status, ce->card);
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- if (should_close) {
- close_dialog (ce);
- }
- else {
- ce->changed = FALSE;
- command_state_changed (ce);
- }
- }
-}
-
-/* Emits the signal to request saving a card */
-static void
-save_card (EContactEditor *ce, gboolean should_close)
-{
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- if (ce->book) {
- EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1);
-
- ecs->ce = ce;
- ecs->should_close = should_close;
-
- if (ce->is_new_card)
- e_card_merging_book_add_card (ce->book, ce->card, GTK_SIGNAL_FUNC(card_added_cb), ecs);
- else
- e_card_merging_book_commit_card (ce->book, ce->card, GTK_SIGNAL_FUNC(card_modified_cb), ecs);
- }
-}
-
-/* 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, FALSE);
-}
-
-/* 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
-card_deleted_cb (EBook *book, EBookStatus status, EContactEditor *ce)
-{
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[CARD_DELETED],
- status, ce->card);
-
- /* always close the dialog after we successfully delete a card */
- if (status == E_BOOK_STATUS_SUCCESS)
- close_dialog (ce);
-}
-
-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 && ce->book)
- e_book_remove_card (ce->book, card, GTK_SIGNAL_FUNC(card_deleted_cb), ce);
- }
-
- 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));
-}
-
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
-/* 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));
-}
-#endif
-
-/* 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, TRUE);
-}
-
-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),
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- BONOBO_UI_UNSAFE_VERB ("ContactEditorPrintEnvelope", print_envelope_cb),
-#endif
- /* BONOBO_UI_UNSAFE_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
- BONOBO_UI_UNSAFE_VERB ("ContactEditorClose", file_close_cb),
-
- BONOBO_UI_VERB_END
-};
-
-EPixmap pixmaps[] = {
- E_PIXMAP ("/commands/ContactEditorSave", "save-16.png"),
- E_PIXMAP ("/commands/ContactEditorSaveAs", "save-as-16.png"),
- E_PIXMAP ("/commands/ContactEditorDelete", "evolution-trash-mini.png"),
- E_PIXMAP ("/commands/ContactEditorPrint", "print.xpm"),
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- E_PIXMAP ("/commands/ContactEditorPrintEnvelope", "print.xpm"),
-#endif
- E_PIXMAP ("/Toolbar/ContactEditorSaveClose", "buttons/save-24.png"),
- E_PIXMAP ("/Toolbar/ContactEditorDelete", "buttons/delete-message.png"),
- E_PIXMAP ("/Toolbar/ContactEditorPrint", "buttons/print.png"),
-
- E_PIXMAP_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");
-
- e_pixmaps_update (ce->uic, pixmaps);
-}
-
-/* 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;
- e_contact_editor->changed = FALSE;
- e_contact_editor->editable = TRUE;
-
- 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);
- add_lists (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);
-
- widget = glade_xml_get_widget(e_contact_editor->gui, "button-contacts");
- if (widget && GTK_IS_BUTTON(widget))
- gtk_signal_connect(GTK_OBJECT(widget), "clicked",
- contacts_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);
-
- widget = glade_xml_get_widget(e_contact_editor->gui, "entry-fullname");
- if (widget)
- gtk_widget_grab_focus (widget);
-
- /* 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->book)
- gtk_object_unref(GTK_OBJECT(e_contact_editor->book));
-
- 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));
-}
-
-static void
-command_state_changed (EContactEditor *ce)
-{
- bonobo_ui_component_set_prop (ce->uic,
- "/commands/ContactEditorSaveClose",
- "sensitive",
- ce->changed ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (ce->uic,
- "/commands/ContactEditorSave",
- "sensitive",
- ce->changed ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (ce->uic,
- "/commands/ContactEditorDelete",
- "sensitive",
- (ce->editable && !ce->is_new_card) ? "1" : "0", NULL);
-}
-
-static void
-supported_fields_cb (EBook *book, EBookStatus status,
- EList *fields, EContactEditor *ce)
-{
- gtk_object_set (GTK_OBJECT (ce),
- "writable_fields", fields,
- NULL);
-
- e_contact_editor_show (ce);
-
- command_state_changed (ce);
-}
-
-EContactEditor *
-e_contact_editor_new (EBook *book,
- ECard *card,
- gboolean is_new_card,
- gboolean editable)
-{
- EContactEditor *ce;
-
- g_return_val_if_fail (E_IS_BOOK (book), NULL);
- g_return_val_if_fail (E_IS_CARD (card), NULL);
-
- ce = E_CONTACT_EDITOR (gtk_type_new (E_CONTACT_EDITOR_TYPE));
-
- gtk_object_set (GTK_OBJECT (ce),
- "book", book,
- "card", card,
- "is_new_card", is_new_card,
- "editable", editable,
- NULL);
-
- if (book)
- e_book_get_supported_fields (book, (EBookFieldsCallback)supported_fields_cb, ce);
-
- 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_BOOK:
- if (editor->book)
- gtk_object_unref(GTK_OBJECT(editor->book));
- editor->book = E_BOOK(GTK_VALUE_OBJECT (*arg));
- gtk_object_ref (GTK_OBJECT (editor->book));
- /* XXX more here about editable/etc. */
- break;
- 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);
- editor->changed = FALSE;
- break;
-
- case ARG_IS_NEW_CARD:
- editor->is_new_card = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- break;
-
- case ARG_EDITABLE: {
- gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- gboolean changed = (editor->editable != new_value);
-
- editor->editable = new_value;
-
- if (changed) {
- set_editable (editor);
- command_state_changed (editor);
- }
- break;
- }
-
- case ARG_CHANGED: {
- gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- gboolean changed = (editor->changed != new_value);
-
- editor->changed = new_value;
-
- if (changed)
- command_state_changed (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_BOOK:
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_contact_editor->book);
- break;
-
- 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_EDITABLE:
- GTK_VALUE_BOOL (*arg) = e_contact_editor->editable ? TRUE : FALSE;
- break;
-
- case ARG_CHANGED:
- GTK_VALUE_BOOL (*arg) = e_contact_editor->changed ? 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);
- enable_widget (glade_xml_get_widget (editor->gui, label), TRUE);
- enable_widget (glade_xml_get_widget (editor->gui, entry), editor->editable);
- }
-
- 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 */
- enable_widget (glade_xml_get_widget (editor->gui, "label-email1"), TRUE);
- enable_widget (glade_xml_get_widget (editor->gui, "entry-email1"), editor->editable);
- enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), editor->editable);
- }
-}
-
-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 */
- enable_widget (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- enable_widget (glade_xml_get_widget (editor->gui, "text-address"), editor->editable);
- }
-}
-
-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",
- "entry-caluri",
- "entry-fburl",
- 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));
- }
- }
-}
-
-static 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" },
- { "entry-caluri", "caluri" },
- { "entry-fburl", "fburl" },
-};
-
-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)
-{
- enable_widget (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 },
-
- { "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 },
-
- { "entry-caluri", E_CARD_SIMPLE_FIELD_CALURI, TRUE },
- { "entry-fburl", E_CARD_SIMPLE_FIELD_FBURL, 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 *simple;
- ECard *card;
- char *widget_name;
-
- if (!fields)
- return;
-
- card = e_card_new ("");
- simple = e_card_simple_new (card);
-
- 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(simple, 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(simple, 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(simple, 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);
- enable_widget (glade_xml_get_widget (editor->gui, widget_name), FALSE);
- g_free (widget_name);
- widget_name = g_strdup_printf ("entry-phone%d", i+1);
- enable_widget (glade_xml_get_widget (editor->gui, widget_name), FALSE);
- g_free (widget_name);
- }
- enable_widget (glade_xml_get_widget (editor->gui, "label-email1"), FALSE);
- enable_widget (glade_xml_get_widget (editor->gui, "entry-email1"), FALSE);
- enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), FALSE);
- enable_widget (glade_xml_get_widget (editor->gui, "label-address"), FALSE);
- enable_widget (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) {
- enable_widget (widget, editor->editable);
- }
- 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 (simple, e_card_simple_map_email_to_field(editor->email_choice)))) {
- enable_widget (glade_xml_get_widget (editor->gui, "label-email1"), TRUE);
- enable_widget (glade_xml_get_widget (editor->gui, "entry-email1"), editor->editable);
- enable_widget (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), editor->editable);
- }
- else if (!strcmp (field, e_card_simple_get_ecard_field (simple, e_card_simple_map_address_to_field(editor->address_choice)))) {
- enable_widget (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- enable_widget (glade_xml_get_widget (editor->gui, "text-address"), editor->editable);
- }
- else for (i = 0; i < 4; i ++) {
- if (!strcmp (field, e_card_simple_get_ecard_field (simple, e_card_simple_map_phone_to_field(editor->phone_choice[i])))) {
- widget_name = g_strdup_printf ("label-phone%d", i+1);
- enable_widget (glade_xml_get_widget (editor->gui, widget_name), TRUE);
- g_free (widget_name);
- widget_name = g_strdup_printf ("entry-phone%d", i+1);
- enable_widget (glade_xml_get_widget (editor->gui, widget_name), editor->editable);
- g_free (widget_name);
- }
- }
- }
-
- /* handle the label next to the dropdown widgets */
-
- for (i = 0; i < num_widget_field_mappings; i ++) {
- gboolean enabled;
- GtkWidget *w;
- const char *field;
-
- w = glade_xml_get_widget(editor->gui, widget_field_mappings[i].widget_name);
- if (!w) {
- g_warning (_("Could not find widget for a field: `%s'"),
- widget_field_mappings[i].widget_name);
- continue;
- }
- if (!GTK_IS_LABEL (w))
- continue;
- field = e_card_simple_get_ecard_field (simple,
- widget_field_mappings[i].field_id);
-
- enabled = (g_hash_table_lookup (supported_hash, field) != NULL);
-
- enable_widget (w, enabled);
- }
-
- g_hash_table_destroy (dropdown_hash);
- g_hash_table_destroy (supported_hash);
- gtk_object_unref (GTK_OBJECT(simple));
- gtk_object_unref (GTK_OBJECT(card));
-}
-
-static void
-set_editable (EContactEditor *editor)
-{
- int i;
- char *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) {
- GtkWidget *widget = glade_xml_get_widget(editor->gui, widget_field_mappings[i].widget_name);
- enable_widget (widget, editor->editable);
- }
- }
-
- /* handle the phone dropdown entries */
- for (i = 0; i < 4; i ++) {
- entry = g_strdup_printf ("entry-phone%d", i+1);
-
- enable_widget (glade_xml_get_widget(editor->gui, entry),
- editor->editable);
-
- g_free (entry);
- }
-
- /* handle the email dropdown entry */
- entry = "entry-email1";
- enable_widget (glade_xml_get_widget(editor->gui, entry),
- editor->editable);
- enable_widget (glade_xml_get_widget(editor->gui, "checkbutton-htmlmail"),
- editor->editable);
-
- /* handle the address dropdown entry */
- entry = "text-address";
- enable_widget (glade_xml_get_widget(editor->gui, entry),
- editor->editable);
-}
-
-static void
-fill_in_info(EContactEditor *editor)
-{
- ECard *card = editor->card;
- if (card) {
- char *file_as;
- char *related_contacts;
- 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,
- "related_contacts", &related_contacts,
- "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 (widget && E_IS_DATE_EDIT(widget)) {
- EDateEdit *dateedit;
- dateedit = E_DATE_EDIT(widget);
- if (anniversary)
- e_date_edit_set_date (dateedit,
- anniversary->year,
- anniversary->month,
- anniversary->day);
- else
- e_date_edit_set_time (dateedit, -1);
- }
-
- widget = glade_xml_get_widget(editor->gui, "dateedit-birthday");
- if (widget && E_IS_DATE_EDIT(widget)) {
- EDateEdit *dateedit;
- dateedit = E_DATE_EDIT(widget);
- if (bday)
- e_date_edit_set_date (dateedit,
- bday->year,
- bday->month,
- bday->day);
- else
- e_date_edit_set_time (dateedit, -1);
- }
-
- if (editor->select_names_contacts && related_contacts && *related_contacts) {
- ESelectNamesModel *model = e_select_names_manager_get_source (editor->select_names_contacts,
- "contacts");
- e_select_names_model_import_destinationv (model, related_contacts);
- }
-
- 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;
- 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->select_names_contacts) {
- ESelectNamesModel *model = e_select_names_manager_get_source (editor->select_names_contacts,
- "contacts");
- char *string = e_select_names_model_export_destinationv (model);
- if (string && *string)
- gtk_object_set (GTK_OBJECT (card),
- "related_contacts", string,
- NULL);
- else
- gtk_object_set (GTK_OBJECT (card),
- "related_contacts", NULL,
- NULL);
- g_free (string);
- }
-
- if (editor->name)
- gtk_object_set(GTK_OBJECT(card),
- "name", editor->name,
- NULL);
-
- widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary");
- if (widget && E_IS_DATE_EDIT(widget)) {
- if (e_date_edit_get_date (E_DATE_EDIT (widget),
- &anniversary.year,
- &anniversary.month,
- &anniversary.day)) {
- g_print ("%d %d %d\n", anniversary.year, anniversary.month, anniversary.day);
- gtk_object_set(GTK_OBJECT(card),
- "anniversary", &anniversary,
- NULL);
- } else
- gtk_object_set(GTK_OBJECT(card),
- "anniversary", NULL,
- NULL);
- }
-
- widget = glade_xml_get_widget(editor->gui, "dateedit-birthday");
- if (widget && E_IS_DATE_EDIT(widget)) {
- if (e_date_edit_get_date (E_DATE_EDIT (widget),
- &bday.year,
- &bday.month,
- &bday.day)) {
- g_print ("%d %d %d\n", bday.year, bday.month, bday.day);
- gtk_object_set(GTK_OBJECT(card),
- "birth_date", &bday,
- NULL);
- } else
- gtk_object_set(GTK_OBJECT(card),
- "birth_date", NULL,
- NULL);
- }
- }
-}
-
-/**
- * e_contact_editor_raise:
- * @config: The %EContactEditor object.
- *
- * Raises the dialog associated with this %EContactEditor object.
- */
-void
-e_contact_editor_raise (EContactEditor *editor)
-{
- /* FIXME: perhaps we should raise at realize time */
- if (GTK_WIDGET (editor->app)->window)
- gdk_window_raise (GTK_WIDGET (editor->app)->window);
-}
-
-/**
- * e_contact_editor_show:
- * @ce: The %EContactEditor object.
- *
- * Shows the dialog associated with this %EContactEditor object.
- */
-void
-e_contact_editor_show (EContactEditor *ce)
-{
- gtk_widget_show (ce->app);
-}
-
-GtkWidget *
-e_contact_editor_create_date(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-e_contact_editor_create_date(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- GtkWidget *widget = e_date_edit_new ();
- e_date_edit_set_allow_no_date_set (E_DATE_EDIT (widget),
- TRUE);
- e_date_edit_set_show_time (E_DATE_EDIT (widget), FALSE);
- e_date_edit_set_time (E_DATE_EDIT (widget), -1);
- return widget;
-}
-
-static void
-enable_widget (GtkWidget *widget, gboolean enabled)
-{
- if (GTK_IS_ENTRY (widget)) {
- gtk_entry_set_editable (GTK_ENTRY (widget), enabled);
- }
- else if (GTK_IS_TEXT (widget)) {
- gtk_text_set_editable (GTK_TEXT (widget), enabled);
- }
- else if (GTK_IS_COMBO (widget)) {
- gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (widget)->entry),
- enabled);
- gtk_widget_set_sensitive (GTK_COMBO (widget)->button, enabled);
- }
- else if (E_IS_DATE_EDIT (widget)) {
- e_date_edit_set_editable (E_DATE_EDIT (widget), enabled);
- }
- else
- gtk_widget_set_sensitive (widget, enabled);
-}
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 5f9ac77435..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-editor.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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/gui/component/select-names/e-select-names-manager.h"
-#include "addressbook/backend/ebook/e-book.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 */
- EBook *book;
- 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;
-
- ESelectNamesManager *select_names_contacts;
-
- 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 card has been changed since bringing up the contact editor */
- guint changed : 1;
-
- /* Whether the contact editor will accept modifications */
- guint editable : 1;
-
- EList *writable_fields;
-};
-
-struct _EContactEditorClass
-{
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* card_added) (EContactEditor *ce, EBookStatus status, ECard *card);
- void (* card_modified) (EContactEditor *ce, EBookStatus status, ECard *card);
- void (* card_deleted) (EContactEditor *ce, EBookStatus status, ECard *card);
- void (* editor_closed) (EContactEditor *ce);
-};
-
-EContactEditor *e_contact_editor_new (EBook *book,
- ECard *card,
- gboolean is_new_card,
- gboolean editable);
-GtkType e_contact_editor_get_type (void);
-void e_contact_editor_show (EContactEditor *editor);
-void e_contact_editor_close (EContactEditor *editor);
-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 9559add2ee..0000000000
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ /dev/null
@@ -1,453 +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 <gal/widgets/e-unicode.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"
-#include "e-card-merging.h"
-
-typedef struct _QuickAdd QuickAdd;
-struct _QuickAdd {
- gchar *name;
- gchar *email;
- ECard *card;
-
- EContactQuickAddCallback cb;
- gpointer closure;
-
- GtkWidget *name_entry;
- GtkWidget *email_entry;
-
- gint refs;
-
-};
-
-static QuickAdd *
-quick_add_new (void)
-{
- QuickAdd *qa = g_new0 (QuickAdd, 1);
- qa->card = e_card_new ("");
- qa->refs = 1;
- return qa;
-}
-
-static void
-quick_add_ref (QuickAdd *qa)
-{
- if (qa) {
- ++qa->refs;
- }
-}
-
-static void
-quick_add_unref (QuickAdd *qa)
-{
- if (qa) {
- --qa->refs;
- if (qa->refs == 0) {
- g_free (qa->name);
- g_free (qa->email);
- gtk_object_unref (GTK_OBJECT (qa->card));
- g_free (qa);
- }
- }
-}
-
-static void
-quick_add_set_name (QuickAdd *qa, const gchar *name)
-{
- ECardSimple *simple;
-
- if (name == qa->name)
- return;
-
- g_free (qa->name);
- qa->name = g_strdup (name);
-
- simple = e_card_simple_new (qa->card);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_FULL_NAME, name);
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-quick_add_set_email (QuickAdd *qa, const gchar *email)
-{
- ECardSimple *simple;
-
- if (email == qa->email)
- return;
-
- g_free (qa->email);
- qa->email = g_strdup (email);
-
- simple = e_card_simple_new (qa->card);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_EMAIL, email);
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-merge_cb (EBook *book, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) closure;
-
- if (book != NULL) {
- e_card_merging_book_add_card (book, qa->card, NULL, NULL);
- if (qa->cb)
- qa->cb (qa->card, qa->closure);
- } else {
- /* Something went wrong. */
- if (qa->cb)
- qa->cb (NULL, qa->closure);
- }
-
- quick_add_unref (qa);
-}
-
-static void
-quick_add_merge_card (QuickAdd *qa)
-{
- quick_add_ref (qa);
- e_book_use_local_address_book (merge_cb, qa);
-}
-
-
-/*
- * Raise a contact editor with all fields editable, and hook up all signals accordingly.
- */
-
-static void
-card_added_cb (EContactEditor *ce, EBookStatus status, ECard *card, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) gtk_object_get_data (GTK_OBJECT (ce), "quick_add");
-
- if (qa) {
-
- if (qa->cb)
- qa->cb (qa->card, qa->closure);
-
- quick_add_unref (qa);
- gtk_object_set_data (GTK_OBJECT (ce), "quick_add", NULL);
- }
-}
-
-static void
-editor_closed_cb (GtkWidget *w, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) gtk_object_get_data (GTK_OBJECT (w), "quick_add");
-
- if (qa) {
- quick_add_unref (qa);
- gtk_object_set_data (GTK_OBJECT (w), "quick_add", NULL);
- gtk_object_unref (GTK_OBJECT (w));
- }
-}
-
-static void
-ce_have_book (EBook *book, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) closure;
-
- if (book == NULL) {
- g_warning ("Couldn't open local address book.");
- quick_add_unref (qa);
- } else {
- EContactEditor *contact_editor = e_contact_editor_new (book, qa->card, TRUE, TRUE /* XXX */);
-
- /* mark it as changed so the Save buttons are enabled when we bring up the dialog. */
- gtk_object_set (GTK_OBJECT(contact_editor),
- "changed", TRUE,
- NULL);
-
- /* We pass this via object data, so that we don't get a dangling pointer referenced if both
- the "card_added" and "editor_closed" get emitted. (Which, based on a backtrace in bugzilla,
- I think can happen and cause a crash. */
- gtk_object_set_data_full (GTK_OBJECT (contact_editor), "quick_add", qa,
- (GtkDestroyNotify) quick_add_unref);
-
- gtk_signal_connect (GTK_OBJECT (contact_editor),
- "card_added",
- GTK_SIGNAL_FUNC (card_added_cb),
- NULL);
- gtk_signal_connect (GTK_OBJECT (contact_editor),
- "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb),
- NULL);
- }
-}
-
-static void
-edit_card (QuickAdd *qa)
-{
- e_book_use_local_address_book (ce_have_book, qa);
-}
-
-static void
-clicked_cb (GtkWidget *w, gint button, gpointer closure)
-{
- QuickAdd *qa = (QuickAdd *) closure;
-
- /* Get data out of entries. */
- if (button == 0 || button == 1) {
- gchar *name = NULL;
- gchar *email = NULL;
-
- if (qa->name_entry) {
- gchar *tmp;
- tmp = gtk_editable_get_chars (GTK_EDITABLE (qa->name_entry), 0, -1);
- name = e_utf8_from_gtk_string (qa->name_entry, tmp);
- g_free (tmp);
- }
-
- if (qa->email_entry) {
- gchar *tmp;
- tmp = gtk_editable_get_chars (GTK_EDITABLE (qa->email_entry), 0, -1);
- email = e_utf8_from_gtk_string (qa->email_entry, tmp);
- g_free (tmp);
- }
-
- quick_add_set_name (qa, name);
- quick_add_set_email (qa, email);
-
- g_free (name);
- g_free (email);
- }
-
- gtk_widget_destroy (w);
-
- if (button == 0) {
-
- /* OK */
- quick_add_merge_card (qa);
-
- } else if (button == 1) {
-
- /* EDIT FULL */
- edit_card (qa);
-
- } else {
- /* CANCEL */
- quick_add_unref (qa);
- }
-
-}
-
-static GtkWidget *
-build_quick_add_dialog (QuickAdd *qa)
-{
- GtkWidget *dialog;
- GtkTable *table;
- const gint xpad=1, ypad=1;
-
- g_return_val_if_fail (qa != NULL, 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,
- qa);
-
- qa->name_entry = gtk_entry_new ();
- if (qa->name) {
- gchar *str = e_utf8_to_gtk_string (qa->name_entry, qa->name);
- gtk_entry_set_text (GTK_ENTRY (qa->name_entry), str);
- g_free (str);
- }
-
-
- qa->email_entry = gtk_entry_new ();
- if (qa->email) {
- gchar *str = e_utf8_to_gtk_string (qa->email_entry, qa->email);
- gtk_entry_set_text (GTK_ENTRY (qa->email_entry), str);
- g_free (str);
- }
-
- 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, qa->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, qa->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 *in_name, const gchar *email,
- EContactQuickAddCallback cb, gpointer closure)
-{
- QuickAdd *qa;
- GtkWidget *dialog;
- gchar *name = NULL;
- gint len;
-
- /* We need to have *something* to work with. */
- if (in_name == NULL && email == NULL) {
- if (cb)
- cb (NULL, closure);
- return;
- }
-
- if (in_name) {
- name = g_strdup (in_name);
-
- /* Remove extra whitespace and the quotes some mailers put around names. */
- g_strstrip (name);
- len = strlen (name);
- if ((name[0] == '\'' && name[len-1] == '\'') || (name[0] == '"' && name[len-1] == '"')) {
- name[0] = ' ';
- name[len-1] = ' ';
- }
- g_strstrip (name);
- }
-
- qa = quick_add_new ();
- qa->cb = cb;
- qa->closure = closure;
- if (name)
- quick_add_set_name (qa, name);
- if (email)
- quick_add_set_email (qa, email);
-
- dialog = build_quick_add_dialog (qa);
- gtk_widget_show_all (dialog);
-
- g_free (name);
-}
-
-void
-e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure)
-{
- gchar *name=NULL, *email=NULL;
- const gchar *last_at, *s;
- gboolean in_quote;
-
- if (text == NULL) {
- e_contact_quick_add (NULL, NULL, cb, closure);
- 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 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, closure);
- 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 e01256a163..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 closure);
-
-void e_contact_quick_add (const gchar *name, const gchar *email,
- EContactQuickAddCallback cb, gpointer closure);
-
-void e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure);
-
-#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 35247edbfc..0000000000
--- a/addressbook/gui/contact-editor/e-contact-save-as.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-editor.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <gtk/gtk.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <gal/util/e-util.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-contact-save-as.h"
-#include <errno.h>
-
-static int file_exists(GtkFileSelection *filesel, const char *filename);
-
-typedef struct {
- GtkFileSelection *filesel;
- char *vcard;
-} SaveAsInfo;
-
-static void
-save_it(GtkWidget *widget, SaveAsInfo *info)
-{
- gint error = 0;
- gint response = 0;
-
- const char *filename = gtk_file_selection_get_filename (info->filesel);
-
- error = e_write_file (filename, info->vcard, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC);
-
- if (error == EEXIST) {
- response = file_exists(info->filesel, filename);
- switch (response) {
- case 0 : /* Overwrite */
- e_write_file(filename, info->vcard, O_WRONLY | O_CREAT | O_TRUNC);
- break;
- case 1 : /* cancel */
- break;
- }
- }
-
- g_free (info->vcard);
- gtk_widget_destroy(GTK_WIDGET(info->filesel));
- g_free(info);
-}
-
-static void
-close_it(GtkWidget *widget, SaveAsInfo *info)
-{
- g_free (info->vcard);
- gtk_widget_destroy (GTK_WIDGET (info->filesel));
- g_free (info);
-}
-
-static void
-delete_it(GtkWidget *widget, SaveAsInfo *info)
-{
- g_free (info->vcard);
- 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->vcard = e_card_get_vcard(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));
-}
-
-void
-e_contact_list_save_as(char *title, GList *list)
-{
- GtkFileSelection *filesel;
- SaveAsInfo *info = g_new(SaveAsInfo, 1);
-
- filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title));
-
- info->filesel = filesel;
- info->vcard = e_card_list_get_vcard (list);
-
- 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));
-}
-
-static int
-file_exists(GtkFileSelection *filesel, const char *filename)
-{
- GnomeDialog *dialog = NULL;
- GtkWidget *label;
- GladeXML *gui = NULL;
- int result = 0;
- char *string;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/file-exists.glade", NULL);
- dialog = GNOME_DIALOG(glade_xml_get_widget(gui, "dialog-exists"));
- gtk_widget_ref(GTK_WIDGET(dialog));
-
- label = glade_xml_get_widget (gui, "label-exists");
- if (GTK_IS_LABEL (label)) {
- string = g_strdup_printf (_("%s already exists\nDo you want to overwrite it?"), filename);
- gtk_label_set_text (GTK_LABEL (label), string);
- g_free (string);
- }
-
- gnome_dialog_set_parent(dialog, GTK_WINDOW(filesel));
-
- gtk_widget_show (GTK_WIDGET (dialog));
- result = gnome_dialog_run_and_close(dialog);
-
- gtk_widget_unref(GTK_WIDGET(dialog));
- gtk_widget_destroy(GTK_WIDGET(dialog));
- g_free(gui);
-
- return result;
-}
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 75bd6ce957..0000000000
--- a/addressbook/gui/contact-editor/e-contact-save-as.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-save-as.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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);
-void
-e_contact_list_save_as(gchar *title, GList *list);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_EDITOR_H__ */
diff --git a/addressbook/gui/contact-editor/file-exists.glade b/addressbook/gui/contact-editor/file-exists.glade
deleted file mode 100644
index 7c457cb892..0000000000
--- a/addressbook/gui/contact-editor/file-exists.glade
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>File_exists.glade</name>
- <program_name>file_exists.glade</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>dialog-exists</name>
- <visible>False</visible>
- <title>Confirm Overwrite</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>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Overwrite</label>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-exists</name>
- <label>Don't bother translating this string. It's not used.</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>
-
-</GTK-Interface>
diff --git a/addressbook/gui/contact-editor/fulladdr.glade b/addressbook/gui/contact-editor/fulladdr.glade
deleted file mode 100644
index 57eb14a64b..0000000000
--- a/addressbook/gui/contact-editor/fulladdr.glade
+++ /dev/null
@@ -1,705 +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>United States
-Afghanistan
-Albania
-Algeria
-American Samoa
-Andorra
-Angola
-Anguilla
-Antarctica
-Antigua And Barbuda
-Argentina
-Armenia
-Aruba
-Australia
-Austria
-Azerbaijan
-Bahamas
-Bahrain
-Bangladesh
-Barbados
-Belarus
-Belgium
-Belize
-Benin
-Bermuda
-Bhutan
-Bolivia
-Bosnia And Herzegowina
-Botswana
-Bouvet Island
-Brazil
-British Indian Ocean Territory
-Brunei Darussalam
-Bulgaria
-Burkina Faso
-Burundi
-Cambodia
-Cameroon
-Canada
-Cape Verde
-Cayman Islands
-Central African Republic
-Chad
-Chile
-China
-Christmas Island
-Cocos (Keeling) Islands
-Colombia
-Comoros
-Congo
-Congo
-Cook Islands
-Costa Rica
-Cote d'Ivoire
-Croatia
-Cuba
-Cyprus
-Czech Republic
-Denmark
-Djibouti
-Dominica
-Dominican Republic
-East Timor
-Ecuador
-Egypt
-El Salvador
-Equatorial Guinea
-Eritrea
-Estonia
-Ethiopia
-Falkland Islands
-Faroe Islands
-Fiji
-Finland
-France
-French Guiana
-French Polynesia
-French Southern Territories
-Gabon
-Gambia
-Georgia
-Germany
-Ghana
-Gibraltar
-Greece
-Greenland
-Grenada
-Guadeloupe
-Guam
-Guatemala
-Guinea
-Guinea-bissau
-Guyana
-Haiti
-Heard And McDonald Islands
-Holy See
-Honduras
-Hong Kong
-Hungary
-Iceland
-India
-Indonesia
-Ireland
-Israel
-Italy
-Jamaica
-Japan
-Jordan
-Kazakhstan
-Kenya
-Kiribati
-Republic Of Korea
-Kuwait
-Kyrgyzstan
-Laos
-Latvia
-Lebanon
-Lesotho
-Liberia
-Liechtenstein
-Lithuania
-Luxembourg
-Macau
-Macedonia
-Madagascar
-Malawi
-Malaysia
-Maldives
-Mali
-Malta
-Marshall Islands
-Martinique
-Mauritania
-Mauritius
-Mayotte
-Mexico
-Micronesia
-Republic Of Moldova
-Monaco
-Mongolia
-Montserrat
-Morocco
-Mozambique
-Myanmar
-Namibia
-Nauru
-Nepal
-Netherlands
-Netherlands Antilles
-New Caledonia
-New Zealand
-Nicaragua
-Niger
-Nigeria
-Niue
-Norfolk Island
-Northern Mariana Islands
-Norway
-Oman
-Pakistan
-Palau
-Panama
-Papua New Guinea
-Paraguay
-Peru
-Philippines
-Pitcairn
-Poland
-Portugal
-Puerto Rico
-Qatar
-Reunion
-Romania
-Russian Federation
-Rwanda
-Saint Kitts And Nevis
-Saint Lucia
-Saint Vincent And The Grena-dines
-Samoa
-San Marino
-Sao Tome And Principe
-Saudi Arabia
-Senegal
-Seychelles
-Sierra Leone
-Singapore
-Slovakia
-Slovenia
-Solomon Islands
-Somalia
-South Africa
-South Georgia And The South Sandwich Islands
-Spain
-Sri Lanka
-St. Helena
-St. Pierre And Miquelon
-Sudan
-Suriname
-Svalbard And Jan Mayen Islands
-Swaziland
-Sweden
-Switzerland
-Taiwan
-Tajikistan
-United Republic Of Tanzania
-Thailand
-Togo
-Tokelau
-Tonga
-Trinidad And Tobago
-Tunisia
-Turkey
-Turkmenistan
-Turks And Caicos Islands
-Tuvalu
-Uganda
-Ukraine
-United Arab Emirates
-United Kingdom
-United States Minor Outlying Islands
-Uruguay
-Uzbekistan
-Vanuatu
-Venezuela
-Viet Nam
-British Virgin Islands
-U.S. Virgin Islands
-Wallis And Futuna Islands
-Western Sahara
-Yemen
-Yugoslavia
-Zambia
-Zimbabwe
-</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 c45f6c2720..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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@ximian.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, Ximian, 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_with_default_charset (cardstr, "ISO-8859-1"), 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_with_default_charset (cardstr, "ISO-8859-1"), 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/contact-list-editor/.cvsignore b/addressbook/gui/contact-list-editor/.cvsignore
deleted file mode 100644
index e440fafdac..0000000000
--- a/addressbook/gui/contact-list-editor/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile.in
-Makefile
-.deps
diff --git a/addressbook/gui/contact-list-editor/Makefile.am b/addressbook/gui/contact-list-editor/Makefile.am
deleted file mode 100644
index 1164f2c594..0000000000
--- a/addressbook/gui/contact-list-editor/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-INCLUDES = \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/ \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_srcdir)/addressbook/gui/merging \
- -I$(top_srcdir)/addressbook/gui/contact-editor \
- -I$(top_builddir)/shell \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTIONDIR=\""$(evolutiondir)"\" \
- -DG_LOG_DOMAIN=\"contact-list-editor\"
-
-noinst_LIBRARIES = \
- libecontactlisteditor.a
-
-libecontactlisteditor_a_SOURCES = \
- e-contact-list-editor.c \
- e-contact-list-editor.h \
- e-contact-list-model.c \
- e-contact-list-model.h
-
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA = \
- contact-list-editor.glade
-
-EXTRA_DIST = $(glade_DATA)
diff --git a/addressbook/gui/contact-list-editor/contact-list-editor.glade b/addressbook/gui/contact-list-editor/contact-list-editor.glade
deleted file mode 100644
index 92c6aa013f..0000000000
--- a/addressbook/gui/contact-list-editor/contact-list-editor.glade
+++ /dev/null
@@ -1,272 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>contact-list-editor</name>
- <program_name>contact-list-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>
-</project>
-
-<widget>
- <class>GnomeApp</class>
- <name>contact list editor</name>
- <title>contact-list-editor</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <default_width>426</default_width>
- <default_height>304</default_height>
- <allow_shrink>True</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>
- <allow_floating>True</allow_floating>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDock:contents</child_name>
- <name>vbox8</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>List _name:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>list-name-entry</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>list-name-entry</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>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom7</name>
- <creation_function>e_create_image_widget</creation_function>
- <string1>evolution-contacts-plain.png</string1>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sat, 23 Jun 2001 05:59:21 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame3</name>
- <border_width>3</border_width>
- <label>Members</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>hbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox9</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label11</name>
- <label>Type an email address or drag a contact into the list below:</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>email-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>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>contact-list-table</name>
- <creation_function>e_contact_list_editor_create_table</creation_function>
- <string1></string1>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sat, 23 Jun 2001 06:00:16 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>visible-addrs-checkbutton</name>
- <can_focus>True</can_focus>
- <label>_Hide addresses when sending mail to this list</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox10</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>
-</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>GtkVButtonBox</class>
- <name>vbuttonbox4</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>0</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>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>add-email-button</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>remove-button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Remove</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
deleted file mode 100644
index 92919c402e..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ /dev/null
@@ -1,869 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-list-editor.c
- * Copyright (C) 2001 Ximian, Inc.
- * Author: Chris Toshok <toshok@ximian.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 <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/widgets/e-unicode.h>
-#include "shell/evolution-shell-component-utils.h"
-
-#include "e-contact-editor.h"
-#include "e-contact-list-editor.h"
-#include "e-contact-list-model.h"
-
-/* Signal IDs */
-enum {
- LIST_ADDED,
- LIST_MODIFIED,
- LIST_DELETED,
- EDITOR_CLOSED,
- LAST_SIGNAL
-};
-
-static void e_contact_list_editor_init (EContactListEditor *editor);
-static void e_contact_list_editor_class_init (EContactListEditorClass *klass);
-static void e_contact_list_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_contact_list_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_contact_list_editor_destroy (GtkObject *object);
-
-static void create_ui (EContactListEditor *ce);
-static void set_editable (EContactListEditor *editor);
-static void command_state_changed (EContactListEditor *editor);
-static void close_dialog (EContactListEditor *cle);
-static void extract_info(EContactListEditor *editor);
-static void fill_in_info(EContactListEditor *editor);
-
-static void add_email_cb (GtkWidget *w, EContactListEditor *editor);
-static void remove_entry_cb (GtkWidget *w, EContactListEditor *editor);
-static void list_name_changed_cb (GtkWidget *w, EContactListEditor *editor);
-static void visible_addrs_toggled_cb (GtkWidget *w, EContactListEditor *editor);
-
-static gint app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
-static gboolean table_drag_drop_cb (ETable *table, int row, int col, GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor);
-static gboolean table_drag_motion_cb (ETable *table, int row, int col, GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor);
-static void table_drag_data_received_cb (ETable *table, int row, int col,
- GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data, guint info, guint time,
- EContactListEditor *editor);
-
-static GtkObjectClass *parent_class = NULL;
-
-static guint contact_list_editor_signals[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]);
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_CARD,
- ARG_IS_NEW_LIST,
- ARG_EDITABLE
-};
-
-GtkType
-e_contact_list_editor_get_type (void)
-{
- static GtkType contact_list_editor_type = 0;
-
- if (!contact_list_editor_type)
- {
- static const GtkTypeInfo contact_list_editor_info =
- {
- "EContactListEditor",
- sizeof (EContactListEditor),
- sizeof (EContactListEditorClass),
- (GtkClassInitFunc) e_contact_list_editor_class_init,
- (GtkObjectInitFunc) e_contact_list_editor_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- contact_list_editor_type = gtk_type_unique (GTK_TYPE_OBJECT, &contact_list_editor_info);
- }
-
- return contact_list_editor_type;
-}
-
-
-typedef void (*GtkSignal_NONE__INT_OBJECT) (GtkObject * object,
- gint arg1,
- GtkObject *arg2,
- gpointer user_data);
-
-static void
-e_marshal_NONE__INT_OBJECT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_OBJECT rfunc;
- rfunc = (GtkSignal_NONE__INT_OBJECT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_OBJECT (args[1]),
- func_data);
-}
-
-static void
-e_contact_list_editor_class_init (EContactListEditorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- gtk_object_add_arg_type ("EContactListEditor::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
- gtk_object_add_arg_type ("EContactListEditor::card", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_CARD);
- gtk_object_add_arg_type ("EContactListEditor::is_new_list", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_NEW_LIST);
- gtk_object_add_arg_type ("EContactListEditor::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
-
- contact_list_editor_signals[LIST_ADDED] =
- gtk_signal_new ("list_added",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactListEditorClass, list_added),
- e_marshal_NONE__INT_OBJECT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT, GTK_TYPE_OBJECT);
-
- contact_list_editor_signals[LIST_MODIFIED] =
- gtk_signal_new ("list_modified",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactListEditorClass, list_modified),
- e_marshal_NONE__INT_OBJECT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT, GTK_TYPE_OBJECT);
-
- contact_list_editor_signals[LIST_DELETED] =
- gtk_signal_new ("list_deleted",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactListEditorClass, list_deleted),
- e_marshal_NONE__INT_OBJECT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT, GTK_TYPE_OBJECT);
-
- contact_list_editor_signals[EDITOR_CLOSED] =
- gtk_signal_new ("editor_closed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactListEditorClass, editor_closed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, contact_list_editor_signals, LAST_SIGNAL);
-
- object_class->set_arg = e_contact_list_editor_set_arg;
- object_class->get_arg = e_contact_list_editor_get_arg;
- object_class->destroy = e_contact_list_editor_destroy;
-}
-
-static void
-e_contact_list_editor_init (EContactListEditor *editor)
-{
- GladeXML *gui;
- GtkWidget *bonobo_win;
- BonoboUIContainer *container;
-
- editor->card = NULL;
- editor->changed = FALSE;
- editor->editable = TRUE;
- editor->is_new_list = FALSE;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-list-editor.glade", NULL);
- editor->gui = gui;
-
- editor->app = glade_xml_get_widget (gui, "contact list editor");
-
- editor->table = glade_xml_get_widget (gui, "contact-list-table");
- editor->model = gtk_object_get_data (GTK_OBJECT(editor->table), "model");
-
- editor->add_button = glade_xml_get_widget (editor->gui, "add-email-button");
- editor->remove_button = glade_xml_get_widget (editor->gui, "remove-button");
-
- editor->email_entry = glade_xml_get_widget (gui, "email-entry");
- editor->list_name_entry = glade_xml_get_widget (gui, "list-name-entry");
-
- editor->visible_addrs_checkbutton = glade_xml_get_widget (gui, "visible-addrs-checkbutton");
-
- /* Construct the app */
- bonobo_win = bonobo_window_new ("contact-list-editor", _("Contact List Editor"));
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = gnome_dock_get_client_area (
- GNOME_DOCK (GNOME_APP (editor->app)->dock));
- if (!contents) {
- g_message ("contact_list_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 (editor->app);
- editor->app = bonobo_win;
- }
-
- /* Build the menu and toolbar */
-
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (editor->app));
-
- editor->uic = bonobo_ui_component_new_default ();
- if (!editor->uic) {
- g_message ("e_contact_list_editor_init(): eeeeek, could not create the UI handler!");
- return;
- }
- bonobo_ui_component_set_container (editor->uic,
- bonobo_object_corba_objref (
- BONOBO_OBJECT (container)));
-
- create_ui (editor);
-
- /* connect signals */
- gtk_signal_connect (GTK_OBJECT(editor->add_button),
- "clicked", GTK_SIGNAL_FUNC(add_email_cb), editor);
- gtk_signal_connect (GTK_OBJECT(editor->email_entry),
- "activate", GTK_SIGNAL_FUNC(add_email_cb), editor);
- gtk_signal_connect (GTK_OBJECT(editor->remove_button),
- "clicked", GTK_SIGNAL_FUNC(remove_entry_cb), editor);
- gtk_signal_connect (GTK_OBJECT(editor->list_name_entry),
- "changed", GTK_SIGNAL_FUNC(list_name_changed_cb), editor);
- gtk_signal_connect (GTK_OBJECT(editor->visible_addrs_checkbutton),
- "toggled", GTK_SIGNAL_FUNC(visible_addrs_toggled_cb), editor);
-
- e_table_drag_dest_set (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)),
- 0, drag_types, num_drag_types, GDK_ACTION_LINK);
-
- gtk_signal_connect (GTK_OBJECT(e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table))),
- "table_drag_motion", GTK_SIGNAL_FUNC(table_drag_motion_cb), editor);
- gtk_signal_connect (GTK_OBJECT(e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table))),
- "table_drag_drop", GTK_SIGNAL_FUNC(table_drag_drop_cb), editor);
- gtk_signal_connect (GTK_OBJECT(e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table))),
- "table_drag_data_received", GTK_SIGNAL_FUNC(table_drag_data_received_cb), editor);
-
- command_state_changed (editor);
-
- /* Connect to the deletion of the dialog */
-
- gtk_signal_connect (GTK_OBJECT (editor->app), "delete_event",
- GTK_SIGNAL_FUNC (app_delete_event_cb), editor);
-}
-
-static void
-e_contact_list_editor_destroy (GtkObject *object)
-{
-}
-
-typedef struct {
- EContactListEditor *cle;
- gboolean should_close;
-} EditorCloseStruct;
-
-static void
-list_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruct *ecs)
-{
- EContactListEditor *cle = ecs->cle;
- gboolean should_close = ecs->should_close;
-
- g_free (ecs);
-
- e_card_set_id (cle->card, id);
-
- gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[LIST_ADDED],
- status, cle->card);
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- cle->is_new_list = FALSE;
-
- if (should_close)
- close_dialog (cle);
- else
- command_state_changed (cle);
- }
-}
-
-static void
-list_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs)
-{
- EContactListEditor *cle = ecs->cle;
- gboolean should_close = ecs->should_close;
-
- g_free (ecs);
-
- gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[LIST_MODIFIED],
- status, cle->card);
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- if (should_close)
- close_dialog (cle);
- }
-}
-
-static void
-save_card (EContactListEditor *cle, gboolean should_close)
-{
- extract_info (cle);
-
- if (cle->book) {
- EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1);
-
- ecs->cle = cle;
- ecs->should_close = should_close;
-
- if (cle->is_new_list)
- e_book_add_card (cle->book, cle->card, GTK_SIGNAL_FUNC(list_added_cb), ecs);
- else
- e_book_commit_card (cle->book, cle->card, GTK_SIGNAL_FUNC(list_modified_cb), ecs);
- }
-}
-
-static void
-file_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- close_dialog (cle);
-}
-
-static void
-file_save_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
-
- save_card (cle, FALSE);
-}
-
-static void
-tb_save_and_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
- save_card (cle, TRUE);
-}
-
-static void
-list_deleted_cb (EBook *book, EBookStatus status, EContactListEditor *cle)
-{
- gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[LIST_DELETED],
- status, cle->card);
-
- /* always close the dialog after we successfully delete a list */
- if (status == E_BOOK_STATUS_SUCCESS)
- close_dialog (cle);
-}
-
-static void
-delete_cb (GtkWidget *widget, gpointer data)
-{
- EContactListEditor *cle = E_CONTACT_LIST_EDITOR (data);
- ECard *card = cle->card;
-
- gtk_object_ref(GTK_OBJECT(card));
-
- if (e_contact_editor_confirm_delete(GTK_WINDOW(cle->app))) {
-
- extract_info (cle);
-
- if (!cle->is_new_list)
- e_book_remove_card (cle->book, card, GTK_SIGNAL_FUNC(list_deleted_cb), cle);
- }
-
- gtk_object_unref(GTK_OBJECT(card));
-}
-
-static
-BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorSave", file_save_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorSaveClose", tb_save_and_close_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorDelete", delete_cb),
-#if 0
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveAs", file_save_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSendAs", file_send_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSendTo", file_send_to_cb),
-#endif
- BONOBO_UI_UNSAFE_VERB ("ContactListEditorClose", file_close_cb),
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps[] = {
- E_PIXMAP ("/commands/ContactListEditorSave", "save-16.png"),
- E_PIXMAP ("/commands/ContactListEditorSaveAs", "save-as-16.png"),
-
- E_PIXMAP_END
-};
-
-static void
-create_ui (EContactListEditor *ce)
-{
- bonobo_ui_component_add_verb_list_with_data (
- ce->uic, verbs, ce);
-
- bonobo_ui_util_set_ui (ce->uic, EVOLUTION_DATADIR,
- "evolution-contact-list-editor.xml",
- "evolution-contact-list-editor");
-
- e_pixmaps_update (ce->uic, pixmaps);
-}
-
-EContactListEditor *
-e_contact_list_editor_new (EBook *book,
- ECard *list_card,
- gboolean is_new_list,
- gboolean editable)
-{
- EContactListEditor *ce;
-
- ce = E_CONTACT_LIST_EDITOR (gtk_type_new (E_CONTACT_LIST_EDITOR_TYPE));
-
- gtk_object_set (GTK_OBJECT (ce),
- "book", book,
- "card", list_card,
- "is_new_list", is_new_list,
- "editable", editable,
- NULL);
-
- return ce;
-}
-
-static void
-e_contact_list_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EContactListEditor *editor;
-
- editor = E_CONTACT_LIST_EDITOR (o);
-
- switch (arg_id){
- case ARG_BOOK:
- if (editor->book)
- gtk_object_unref(GTK_OBJECT(editor->book));
- editor->book = E_BOOK(GTK_VALUE_OBJECT (*arg));
- gtk_object_ref (GTK_OBJECT (editor->book));
- /* XXX more here about editable/etc. */
- break;
- case ARG_CARD:
- if (editor->card)
- gtk_object_unref(GTK_OBJECT(editor->card));
- editor->card = e_card_duplicate(E_CARD(GTK_VALUE_OBJECT (*arg)));
- fill_in_info(editor);
- editor->changed = FALSE;
- command_state_changed (editor);
- break;
-
- case ARG_IS_NEW_LIST: {
- gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- gboolean changed = (editor->is_new_list != new_value);
-
- editor->is_new_list = new_value;
-
- if (changed)
- command_state_changed (editor);
- break;
- }
-
- case ARG_EDITABLE: {
- gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- gboolean changed = (editor->editable != new_value);
-
- editor->editable = new_value;
-
- if (changed) {
- set_editable (editor);
- command_state_changed (editor);
- }
- break;
- }
-
- }
-}
-
-static void
-e_contact_list_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EContactListEditor *editor;
-
- editor = E_CONTACT_LIST_EDITOR (object);
-
- switch (arg_id) {
- case ARG_BOOK:
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(editor->book);
- break;
-
- case ARG_CARD:
- extract_info(editor);
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(editor->card);
- break;
-
- case ARG_IS_NEW_LIST:
- GTK_VALUE_BOOL (*arg) = editor->is_new_list ? TRUE : FALSE;
- break;
-
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = editor->editable ? TRUE : FALSE;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-void
-e_contact_list_editor_show (EContactListEditor *editor)
-{
- gtk_widget_show (editor->app);
-}
-
-void
-e_contact_list_editor_raise (EContactListEditor *editor)
-{
- gdk_window_raise (GTK_WIDGET (editor->app)->window);
-}
-
-#define SPEC "<ETableSpecification no-headers=\"true\" cursor-mode=\"line\" selection-mode=\"single\"> \
- <ETableColumn model_col= \"0\" _title=\"Contact\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\" /> \
- <ETableState> \
- <column source=\"0\"/> \
- <grouping> </grouping> \
- </ETableState> \
-</ETableSpecification>"
-
-GtkWidget *
-e_contact_list_editor_create_table(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-e_contact_list_editor_create_table(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
-
- ETableModel *model;
- GtkWidget *table;
-
- model = e_contact_list_model_new ();
-
- table = e_table_scrolled_new (model, NULL, SPEC, NULL);
-
- gtk_object_set_data(GTK_OBJECT(table), "model", model);
-
- return table;
-}
-
-static void
-add_email_cb (GtkWidget *w, EContactListEditor *editor)
-{
- char *text = gtk_entry_get_text (GTK_ENTRY(editor->email_entry));
-
- if (text && *text)
- e_contact_list_model_add_email (E_CONTACT_LIST_MODEL(editor->model), text);
-
- gtk_entry_set_text (GTK_ENTRY(editor->email_entry), "");
-
- if (!editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-static void
-remove_row (int model_row, EContactListEditor *editor)
-{
- e_contact_list_model_remove_row (E_CONTACT_LIST_MODEL (editor->model), model_row);
-}
-
-static void
-remove_entry_cb (GtkWidget *w, EContactListEditor *editor)
-{
- e_table_selected_row_foreach (e_table_scrolled_get_table(E_TABLE_SCROLLED(editor->table)),
- (EForeachFunc)remove_row, editor);
- if (!editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-static void
-list_name_changed_cb (GtkWidget *w, EContactListEditor *editor)
-{
- if (!editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-static void
-visible_addrs_toggled_cb (GtkWidget *w, EContactListEditor *editor)
-{
- if (!editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-static void
-set_editable (EContactListEditor *editor)
-{
- gtk_widget_set_sensitive (editor->email_entry, editor->editable);
- gtk_widget_set_sensitive (editor->list_name_entry, editor->editable);
- gtk_widget_set_sensitive (editor->add_button, editor->editable);
- gtk_widget_set_sensitive (editor->remove_button, editor->editable);
- gtk_widget_set_sensitive (editor->table, editor->editable);
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (EContactListEditor *cle)
-{
- g_assert (cle->app != NULL);
-
- gtk_widget_destroy (cle->app);
- cle->app = NULL;
-
- gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[EDITOR_CLOSED]);
-}
-
-/* Callback used when the editor is destroyed */
-static gint
-app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- EContactListEditor *ce;
-
- ce = E_CONTACT_LIST_EDITOR (data);
-
- close_dialog (ce);
- return TRUE;
-}
-
-static gboolean
-table_drag_motion_cb (ETable *table, int row, int col,
- GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor)
-{
- GList *p;
-
- for (p = context->targets; p != NULL; p = p->next) {
- char *possible_type;
-
- possible_type = gdk_atom_name ((GdkAtom) p->data);
- if (!strcmp (possible_type, VCARD_TYPE)) {
- g_free (possible_type);
- gdk_drag_status (context, GDK_ACTION_LINK, time);
- return TRUE;
- }
-
- g_free (possible_type);
- }
-
- return FALSE;
-}
-
-static gboolean
-table_drag_drop_cb (ETable *table, int row, int col,
- GdkDragContext *context,
- gint x, gint y, guint time, EContactListEditor *editor)
-{
- if (context->targets != NULL) {
- gtk_drag_get_data (GTK_WIDGET (table), context,
- GPOINTER_TO_INT (context->targets->data),
- time);
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-table_drag_data_received_cb (ETable *table, int row, int col,
- GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info, guint time, EContactListEditor *editor)
-{
- char *target_type;
- gboolean changed = FALSE;
-
- target_type = gdk_atom_name (selection_data->target);
-
- if (!strcmp (target_type, VCARD_TYPE)) {
- GList *card_list = e_card_load_cards_from_string_with_default_charset (selection_data->data, "ISO-8859-1");
- GList *c;
-
- for (c = card_list; c; c = c->next) {
- ECard *ecard = c->data;
-
- if (!e_card_evolution_list (ecard)) {
- ECardSimple *simple = e_card_simple_new (ecard);
-
- e_contact_list_model_add_card (E_CONTACT_LIST_MODEL (editor->model),
- simple);
-
- gtk_object_unref (GTK_OBJECT (simple));
-
- changed = TRUE;
- }
- }
- g_list_foreach (card_list, (GFunc)gtk_object_unref, NULL);
- g_list_free (card_list);
- }
-
- if (changed && !editor->changed) {
- editor->changed = TRUE;
- command_state_changed (editor);
- }
-}
-
-static void
-command_state_changed (EContactListEditor *editor)
-{
- bonobo_ui_component_set_prop (editor->uic,
- "/commands/ContactListEditorSaveClose",
- "sensitive",
- editor->changed && editor->editable ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (editor->uic,
- "/commands/ContactListEditorSave",
- "sensitive",
- editor->changed && editor->editable ? "1" : "0", NULL);
-
- bonobo_ui_component_set_prop (editor->uic,
- "/commands/ContactListEditorDelete",
- "sensitive",
- editor->editable && !editor->is_new_list ? "1" : "0", NULL);
-}
-
-static void
-extract_info(EContactListEditor *editor)
-{
- ECard *card = editor->card;
- if (card) {
- int i;
- EList *email_list;
- EIterator *email_iter;
- char *string = e_utf8_gtk_editable_get_chars(GTK_EDITABLE (editor->list_name_entry), 0, -1);
-
- if (string && *string)
- gtk_object_set(GTK_OBJECT(card),
- "file_as", string,
- "full_name", string,
- NULL);
-
- g_free (string);
-
-
- gtk_object_set (GTK_OBJECT(card),
- "list", GINT_TO_POINTER (TRUE),
- "list_show_addresses",
- GINT_TO_POINTER (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->visible_addrs_checkbutton))),
- NULL);
-
- gtk_object_get (GTK_OBJECT(card),
- "email", &email_list,
- NULL);
-
- /* clear the email list */
- email_iter = e_list_get_iterator (email_list);
- e_iterator_last (email_iter);
- while (e_iterator_is_valid (E_ITERATOR (email_iter))) {
- e_iterator_delete (E_ITERATOR (email_iter));
- }
- gtk_object_unref (GTK_OBJECT (email_iter));
-
- /* then refill it from the contact list model */
- for (i = 0; i < e_table_model_row_count (editor->model); i ++) {
- const EDestination *dest = e_contact_list_model_get_destination (E_CONTACT_LIST_MODEL (editor->model), i);
- gchar *dest_xml = e_destination_export (dest);
- if (dest_xml) {
- e_list_append (email_list, dest_xml);
- }
- g_free (dest_xml);
- }
- }
-}
-
-static void
-fill_in_info(EContactListEditor *editor)
-{
- if (editor->card) {
- char *file_as;
- gboolean show_addresses = FALSE;
- gboolean is_evolution_list = FALSE;
- EList *email_list;
- EIterator *email_iter;
-
- gtk_object_get (GTK_OBJECT (editor->card),
- "file_as", &file_as,
- "email", &email_list,
- "list", &is_evolution_list,
- "list_show_addresses", &show_addresses,
- NULL);
-
- gtk_editable_delete_text (GTK_EDITABLE (editor->list_name_entry), 0, -1);
- if (file_as) {
- int position = 0;
- gchar *u = e_utf8_to_gtk_string (editor->list_name_entry, file_as);
- gtk_editable_insert_text (GTK_EDITABLE (editor->list_name_entry), u, strlen (u), &position);
- g_free (u);
- }
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(editor->visible_addrs_checkbutton), !show_addresses);
-
- e_contact_list_model_remove_all (E_CONTACT_LIST_MODEL (editor->model));
-
- email_iter = e_list_get_iterator (email_list);
-
- while (e_iterator_is_valid (email_iter)) {
- const char *dest_xml = e_iterator_get (email_iter);
- EDestination *dest;
-
- g_message ("incoming xml: [%s]", dest_xml);
- dest = e_destination_import (dest_xml);
-
- if (dest != NULL) {
- e_contact_list_model_add_destination (E_CONTACT_LIST_MODEL (editor->model), dest);
- }
-
- e_iterator_next (email_iter);
- }
- }
-}
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.h b/addressbook/gui/contact-list-editor/e-contact-list-editor.h
deleted file mode 100644
index 6c67fc6468..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-list-editor.h
- * Copyright (C) 2001 Ximian, Inc.
- * Author: Chris Toshok <toshok@ximian.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_LIST_EDITOR_H__
-#define __E_CONTACT_LIST_EDITOR_H__
-
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <glade/glade.h>
-#include <gal/e-table/e-table-model.h>
-
-#include "addressbook/backend/ebook/e-book.h"
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_CONTACT_LIST_EDITOR_TYPE (e_contact_list_editor_get_type ())
-#define E_CONTACT_LIST_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_LIST_EDITOR_TYPE, EContactListEditor))
-#define E_CONTACT_LIST_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_LIST_EDITOR_TYPE, EContactListEditorClass))
-#define E_IS_CONTACT_LIST_EDITOR(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_LIST_EDITOR_TYPE))
-#define E_IS_CONTACT_LIST_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_LIST_EDITOR_TYPE))
-
-
-typedef struct _EContactListEditor EContactListEditor;
-typedef struct _EContactListEditorClass EContactListEditorClass;
-
-struct _EContactListEditor
-{
- GtkObject object;
-
- /* item specific fields */
- EBook *book;
- ECard *card;
-
- /* UI handler */
- BonoboUIComponent *uic;
-
- GladeXML *gui;
- GtkWidget *app;
-
- GtkWidget *table;
- ETableModel *model;
- GtkWidget *email_entry;
- GtkWidget *list_name_entry;
- GtkWidget *add_button;
- GtkWidget *remove_button;
- GtkWidget *visible_addrs_checkbutton;
-
- /* Whether we are editing a new card or an existing one */
- guint is_new_list : 1;
-
- /* Whether the card has been changed since bringing up the contact editor */
- guint changed : 1;
-
- /* Whether the contact editor will accept modifications */
- guint editable : 1;
-};
-
-struct _EContactListEditorClass
-{
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* list_added) (EContactListEditor *cle, EBookStatus status, ECard *card);
- void (* list_modified) (EContactListEditor *cle, EBookStatus status, ECard *card);
- void (* list_deleted) (EContactListEditor *cle, EBookStatus status, ECard *card);
- void (* editor_closed) (EContactListEditor *cle);
-};
-
-EContactListEditor *e_contact_list_editor_new (EBook *book,
- ECard *list_card,
- gboolean is_new_list,
- gboolean editable);
-GtkType e_contact_list_editor_get_type (void);
-void e_contact_list_editor_show (EContactListEditor *editor);
-void e_contact_list_editor_raise (EContactListEditor *editor);
-
-gboolean e_contact_list_editor_confirm_delete (GtkWindow *parent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_LIST_EDITOR_H__ */
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c
deleted file mode 100644
index c4321c2820..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-#include "e-contact-list-model.h"
-
-#define PARENT_TYPE e_table_model_get_type()
-static ETableModelClass *parent_class;
-
-#define COLS 1
-
-/* This function returns the number of columns in our ETableModel. */
-static int
-contact_list_col_count (ETableModel *etc)
-{
- return COLS;
-}
-
-/* This function returns the number of rows in our ETableModel. */
-static int
-contact_list_row_count (ETableModel *etc)
-{
- EContactListModel *model = E_CONTACT_LIST_MODEL (etc);
- return model->data_count;
-}
-
-/* This function returns the value at a particular point in our ETableModel. */
-static void *
-contact_list_value_at (ETableModel *etc, int col, int row)
-{
- EContactListModel *model = E_CONTACT_LIST_MODEL (etc);
-
- return (void *) e_destination_get_address (model->data[row]);
-}
-
-/* This function sets the value at a particular point in our ETableModel. */
-static void
-contact_list_set_value_at (ETableModel *etc, int col, int row, const void *val)
-{
- /* nothing */
-}
-
-/* This function returns whether a particular cell is editable. */
-static gboolean
-contact_list_is_cell_editable (ETableModel *etc, int col, int row)
-{
- return FALSE;
-}
-
-/* This function duplicates the value passed to it. */
-static void *
-contact_list_duplicate_value (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-/* This function frees the value passed to it. */
-static void
-contact_list_free_value (ETableModel *etc, int col, void *value)
-{
- g_free(value);
-}
-
-static void *
-contact_list_initialize_value (ETableModel *etc, int col)
-{
- return g_strdup("");
-}
-
-static gboolean
-contact_list_value_is_empty (ETableModel *etc, int col, const void *value)
-{
- return !(value && *(char *)value);
-}
-
-static char *
-contact_list_value_to_string (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-static void
-contact_list_model_destroy (GtkObject *o)
-{
- EContactListModel *model = E_CONTACT_LIST_MODEL (o);
- int i;
-
- for (i = 0; i < model->data_count; i ++) {
- gtk_object_unref (GTK_OBJECT (model->data[i]));
- }
- g_free (model->data);
-
- model->data_count = 0;
- model->data_alloc = 0;
-}
-
-static void
-e_contact_list_model_class_init (GtkObjectClass *object_class)
-{
- ETableModelClass *model_class = (ETableModelClass *) object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = contact_list_model_destroy;
-
- model_class->column_count = contact_list_col_count;
- model_class->row_count = contact_list_row_count;
- model_class->value_at = contact_list_value_at;
- model_class->set_value_at = contact_list_set_value_at;
- model_class->is_cell_editable = contact_list_is_cell_editable;
- model_class->duplicate_value = contact_list_duplicate_value;
- model_class->free_value = contact_list_free_value;
- model_class->initialize_value = contact_list_initialize_value;
- model_class->value_is_empty = contact_list_value_is_empty;
- model_class->value_to_string = contact_list_value_to_string;
-}
-
-static void
-e_contact_list_model_init (GtkObject *object)
-{
- EContactListModel *model = E_CONTACT_LIST_MODEL(object);
-
- model->data_alloc = 10;
- model->data_count = 0;
- model->data = g_new (EDestination*, model->data_alloc);
-}
-
-GtkType
-e_contact_list_model_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "EContactListModel",
- sizeof (EContactListModel),
- sizeof (EContactListModelClass),
- (GtkClassInitFunc) e_contact_list_model_class_init,
- (GtkObjectInitFunc) e_contact_list_model_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-void
-e_contact_list_model_construct (EContactListModel *model)
-{
-}
-
-ETableModel *
-e_contact_list_model_new ()
-{
- EContactListModel *model;
-
- model = gtk_type_new (e_contact_list_model_get_type ());
-
- e_contact_list_model_construct (model);
-
- return E_TABLE_MODEL(model);
-}
-
-void
-e_contact_list_model_add_destination (EContactListModel *model, EDestination *dest)
-{
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (E_IS_DESTINATION (dest));
-
- if (model->data_count + 1 >= model->data_alloc) {
- model->data_alloc *= 2;
- model->data = g_renew (EDestination*, model->data, model->data_alloc);
- }
-
- model->data[model->data_count ++] = dest;
- gtk_object_ref (GTK_OBJECT (dest));
- gtk_object_sink (GTK_OBJECT (dest));
-
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-void
-e_contact_list_model_add_email (EContactListModel *model,
- const char *email)
-{
- EDestination *new_dest;
-
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (email != NULL);
-
- new_dest = e_destination_new ();
- e_destination_set_email (new_dest, email);
-
- e_contact_list_model_add_destination (model, new_dest);
-}
-
-void
-e_contact_list_model_add_card (EContactListModel *model,
- ECardSimple *simple)
-{
- EDestination *new_dest;
-
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (E_IS_CARD_SIMPLE (simple));
-
- new_dest = e_destination_new ();
- e_destination_set_card (new_dest, simple->card, 0); /* Hard-wired for default e-mail */
-
- e_contact_list_model_add_destination (model, new_dest);
-}
-
-void
-e_contact_list_model_remove_row (EContactListModel *model, int row)
-{
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
- g_return_if_fail (0 <= row && row < model->data_count);
-
- gtk_object_unref (GTK_OBJECT (model->data[row]));
- memmove (model->data + row, model->data + row + 1, sizeof (EDestination*) * (model->data_count - row - 1));
- model->data_count --;
-
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-void
-e_contact_list_model_remove_all (EContactListModel *model)
-{
- int i;
-
- g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
-
- for (i = 0; i < model->data_count; i ++) {
- gtk_object_unref (GTK_OBJECT (model->data[i]));
- model->data[i] = NULL;
- }
-
- model->data_count = 0;
-
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-
-const EDestination *
-e_contact_list_model_get_destination (EContactListModel *model, int row)
-{
- g_return_val_if_fail (E_IS_CONTACT_LIST_MODEL (model), NULL);
- g_return_val_if_fail (0 <= row && row < model->data_count, NULL);
-
- return model->data[row];
-}
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.h b/addressbook/gui/contact-list-editor/e-contact-list-model.h
deleted file mode 100644
index 1c2d6ac8d0..0000000000
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_CONTACT_LIST_MODEL_H_
-#define _E_CONTACT_LIST_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"
-#include "addressbook/backend/ebook/e-destination.h"
-
-#define E_CONTACT_LIST_MODEL_TYPE (e_contact_list_model_get_type ())
-#define E_CONTACT_LIST_MODEL(o) (GTK_CHECK_CAST ((o), E_CONTACT_LIST_MODEL_TYPE, EContactListModel))
-#define E_CONTACT_LIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CONTACT_LIST_MODEL_TYPE, EContactListModelClass))
-#define E_IS_CONTACT_LIST_MODEL(o) (GTK_CHECK_TYPE ((o), E_CONTACT_LIST_MODEL_TYPE))
-#define E_IS_CONTACT_LIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CONTACT_LIST_MODEL_TYPE))
-
-typedef struct _EContactListModel EContactListModel;
-typedef struct _EContactListModelClass EContactListModelClass;
-
-struct _EContactListModel {
- ETableModel parent;
-
- EDestination **data;
- int data_count;
- int data_alloc;
-};
-
-
-struct _EContactListModelClass {
- ETableModelClass parent_class;
-};
-
-
-GtkType e_contact_list_model_get_type (void);
-void e_contact_list_model_construct (EContactListModel *model);
-ETableModel *e_contact_list_model_new (void);
-
-void e_contact_list_model_add_destination (EContactListModel *model, EDestination *dest);
-void e_contact_list_model_add_email (EContactListModel *model, const char *email);
-void e_contact_list_model_add_card (EContactListModel *model, ECardSimple *simple);
-
-void e_contact_list_model_remove_row (EContactListModel *model, int row);
-void e_contact_list_model_remove_all (EContactListModel *model);
-
-const EDestination *e_contact_list_model_get_destination (EContactListModel *model, int row);
-
-#endif /* _E_CONTACT_LIST_MODEL_H_ */
diff --git a/addressbook/gui/merging/.cvsignore b/addressbook/gui/merging/.cvsignore
deleted file mode 100644
index 09980ae6ba..0000000000
--- a/addressbook/gui/merging/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
diff --git a/addressbook/gui/merging/Makefile.am b/addressbook/gui/merging/Makefile.am
deleted file mode 100644
index 5a00726f26..0000000000
--- a/addressbook/gui/merging/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-INCLUDES = \
- -DG_LOG_DOMAIN=\"e-card-gui\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/backend/ebook \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-noinst_LIBRARIES = \
- libecardmerging.a
-
-libecardmerging_a_SOURCES = \
- e-card-merging.c \
- e-card-merging.h
-
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = e-card-duplicate-detected.glade \
- e-card-merging-book-commit-duplicate-detected.glade
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/addressbook/gui/merging/e-card-duplicate-detected.glade b/addressbook/gui/merging/e-card-duplicate-detected.glade
deleted file mode 100644
index bc6624e8fd..0000000000
--- a/addressbook/gui/merging/e-card-duplicate-detected.glade
+++ /dev/null
@@ -1,255 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-card-duplicate-detected</name>
- <program_name>e-card-duplicate-detected</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>GnomeDialog</class>
- <name>dialog-duplicate-contact</name>
- <title>Duplicate Contact Detected</title>
- <type>GTK_WINDOW_POPUP</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>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add Anyway</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button4</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>table1</name>
- <rows>5</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>Custom</class>
- <name>custom-old-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>The name or email address of this contact already exists
-in this folder. Would you like to add it anyway?</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>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>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Original Contact:</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>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>GtkLabel</class>
- <name>label4</name>
- <label>New Contact:</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>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>Custom</class>
- <name>custom-new-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0.5</xalign>
- <yalign>0</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>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>
- <class>Custom</class>
- <name>custom2</name>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 00:18:39 GMT</last_modification_time>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade b/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade
deleted file mode 100644
index 0bc60ba13a..0000000000
--- a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade
+++ /dev/null
@@ -1,255 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-card-merging-book-commit-duplicate-detected</name>
- <program_name>e-card-merging-book-commit-duplicate-detected</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>GnomeDialog</class>
- <name>dialog-duplicate-contact</name>
- <title>Duplicate Contact Detected</title>
- <type>GTK_WINDOW_POPUP</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>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Change Anyway</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button4</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>table1</name>
- <rows>5</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>Custom</class>
- <name>custom-old-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>The changed email or name of this contact already
-exists in this folder. Would you like to add it anyway?</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>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>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Conflicting Contact:</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>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>GtkLabel</class>
- <name>label4</name>
- <label>Changed Contact:</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>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>Custom</class>
- <name>custom-new-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0.5</xalign>
- <yalign>0</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>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>
- <class>Custom</class>
- <name>custom2</name>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 00:18:39 GMT</last_modification_time>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/merging/e-card-merging.c b/addressbook/gui/merging/e-card-merging.c
deleted file mode 100644
index b9aacabde7..0000000000
--- a/addressbook/gui/merging/e-card-merging.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Code for checking for duplicates when doing ECard work.
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright 2001, Ximian, Inc.
- */
-
-#include <config.h>
-
-#include "e-card-merging.h"
-#include <libgnomeui/gnome-dialog.h>
-#include "e-card-compare.h"
-#include <glade/glade.h>
-#include <gtk/gtksignal.h>
-#include "addressbook/gui/widgets/e-minicard-widget.h"
-
-typedef enum {
- E_CARD_MERGING_ADD,
- E_CARD_MERGING_COMMIT
-} ECardMergingOpType;
-
-typedef struct {
- ECardMergingOpType op;
- EBook *book;
- ECard *card;
- EBookIdCallback id_cb;
- EBookCallback cb;
- gpointer closure;
-} ECardMergingLookup;
-
-static void
-doit (ECardMergingLookup *lookup)
-{
- if (lookup->op == E_CARD_MERGING_ADD)
- e_book_add_card (lookup->book, lookup->card, lookup->id_cb, lookup->closure);
- else if (lookup->op == E_CARD_MERGING_COMMIT)
- e_book_commit_card (lookup->book, lookup->card, lookup->cb, lookup->closure);
-}
-
-static void
-cancelit (ECardMergingLookup *lookup)
-{
- if (lookup->op == E_CARD_MERGING_ADD) {
- if (lookup->id_cb)
- lookup->id_cb (lookup->book, E_BOOK_STATUS_CANCELLED, NULL, lookup->closure);
- } else if (lookup->op == E_CARD_MERGING_COMMIT) {
- if (lookup->cb)
- lookup->cb (lookup->book, E_BOOK_STATUS_CANCELLED, lookup->closure);
- }
-}
-
-static void
-clicked (GnomeDialog *dialog, int button, ECardMergingLookup *lookup)
-{
- switch (button) {
- case 0:
- doit (lookup);
- break;
- case 1:
- cancelit (lookup);
- break;
- }
- g_free (lookup);
- gnome_dialog_close (dialog);
-}
-
-static void
-match_query_callback (ECard *card, ECard *match, ECardMatchType type, gpointer closure)
-{
- ECardMergingLookup *lookup = closure;
-
- if ((gint) type <= (gint) E_CARD_MATCH_VAGUE) {
- doit (lookup);
- g_free (lookup);
- } else {
- GladeXML *ui;
-
- GtkWidget *widget;
-
- if (lookup->op == E_CARD_MERGING_ADD)
- ui = glade_xml_new (EVOLUTION_GLADEDIR "/e-card-duplicate-detected.glade", NULL);
- else if (lookup->op == E_CARD_MERGING_COMMIT)
- ui = glade_xml_new (EVOLUTION_GLADEDIR "/e-card-merging-book-commit-duplicate-detected.glade", NULL);
- else {
- doit (lookup);
- g_free (lookup);
- return;
- }
-
- widget = glade_xml_get_widget (ui, "custom-old-card");
- gtk_object_set (GTK_OBJECT (widget),
- "card", match,
- NULL);
-
- widget = glade_xml_get_widget (ui, "custom-new-card");
- gtk_object_set (GTK_OBJECT (widget),
- "card", card,
- NULL);
-
- widget = glade_xml_get_widget (ui, "dialog-duplicate-contact");
-
- gtk_signal_connect (GTK_OBJECT (widget), "clicked",
- GTK_SIGNAL_FUNC (clicked), lookup);
- }
-}
-
-gboolean
-e_card_merging_book_add_card (EBook *book,
- ECard *card,
- EBookIdCallback cb,
- gpointer closure)
-{
- ECardMergingLookup *lookup;
-
- lookup = g_new (ECardMergingLookup, 1);
-
- lookup->op = E_CARD_MERGING_ADD;
- lookup->book = book;
- lookup->card = card;
- lookup->id_cb = cb;
- lookup->closure = closure;
-
- e_card_locate_match_full (book, card, NULL, match_query_callback, lookup);
-
- return TRUE;
-}
-
-gboolean
-e_card_merging_book_commit_card (EBook *book,
- ECard *card,
- EBookCallback cb,
- gpointer closure)
-{
- ECardMergingLookup *lookup;
- GList *avoid;
-
- lookup = g_new (ECardMergingLookup, 1);
-
- lookup->op = E_CARD_MERGING_COMMIT;
- lookup->book = book;
- lookup->card = card;
- lookup->cb = cb;
- lookup->closure = closure;
-
- avoid = g_list_append (NULL, card);
-
- e_card_locate_match_full (book, card, avoid, match_query_callback, lookup);
-
- g_list_free (avoid);
-
- return TRUE;
-}
-
-GtkWidget *
-e_card_merging_create_old_card(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-e_card_merging_create_old_card(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- return e_minicard_widget_new ();
-}
diff --git a/addressbook/gui/merging/e-card-merging.h b/addressbook/gui/merging/e-card-merging.h
deleted file mode 100644
index c4d9483beb..0000000000
--- a/addressbook/gui/merging/e-card-merging.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * The Evolution addressbook client object.
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright 2001, Ximian, Inc.
- */
-
-#ifndef __E_CARD_MERGING_H__
-#define __E_CARD_MERGING_H__
-
-#include <libgnome/gnome-defs.h>
-
-#include <addressbook/backend/ebook/e-book.h>
-
-BEGIN_GNOME_DECLS
-
-gboolean e_card_merging_book_add_card (EBook *book,
- ECard *card,
- EBookIdCallback cb,
- gpointer closure);
-gboolean e_card_merging_book_commit_card (EBook *book,
- ECard *card,
- EBookCallback cb,
- gpointer closure);
-
-END_GNOME_DECLS
-
-#endif /* ! __E_CARD_MERGING_H__ */
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 d5f3602bbb..0000000000
--- a/addressbook/gui/search/Makefile.am
+++ /dev/null
@@ -1,24 +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 \
- -I$(top_builddir)/shell \
- -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 4ee23af613..0000000000
--- a/addressbook/gui/search/addresstypes.xml
+++ /dev/null
@@ -1,83 +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="category">
- <title>Category</title>
- <input type="optionlist" name="category-type">
- <option value="contains">
- <title>contains</title>
- <code>(contains "category" ${category})</code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>(not (contains "category" ${category}))</code>
- </option>
- <option value="is">
- <title>is</title>
- <code>(is "category" ${category})</code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>(not (is "category" ${category}))</code>
- </option>
- </input>
- <input type="string" name="category"/>
- </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 955ddd322d..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-addressbook-search-dialog.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 "e-addressbook-search-dialog.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_destroy (GtkObject *object);
-
-static GnomeDialog *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->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);
- }
-
- 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);
- gtk_window_set_default_size (GTK_WINDOW (view), 500, 400);
- gtk_window_set_title(GTK_WINDOW(view), _("Advanced Search"));
- view->search = get_widget(view);
- gtk_box_pack_start(GTK_BOX(dialog->vbox), view->search, TRUE, TRUE, 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);
-}
-
-GtkWidget *
-e_addressbook_search_dialog_new (EAddressbookView *addr_view)
-{
- EAddressbookSearchDialog *view = gtk_type_new (e_addressbook_search_dialog_get_type ());
- view->view = addr_view;
- return GTK_WIDGET(view);
-}
-
-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 86b30056d3..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-minicard-view-widget.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 "addressbook/gui/widgets/e-addressbook-view.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;
-
- EAddressbookView *view;
-
- RuleContext *context;
- FilterRule *rule;
-};
-
-struct _EAddressbookSearchDialogClass
-{
- GnomeDialogClass parent_class;
-};
-
-GtkType e_addressbook_search_dialog_get_type (void);
-
-GtkWidget *e_addressbook_search_dialog_new (EAddressbookView *view);
-
-#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 39da68797c..0000000000
--- a/addressbook/gui/widgets/Makefile.am
+++ /dev/null
@@ -1,140 +0,0 @@
-INCLUDES = \
- -DG_LOG_DOMAIN=\"e-minicard\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(datadir)"/images/evolution\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/backend/ebook \
- -I$(top_srcdir)/addressbook/gui/contact-editor \
- -I$(top_srcdir)/addressbook/gui/merging \
- -I$(top_srcdir)/widgets/misc \
- -I$(top_builddir)/shell \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-noinst_LIBRARIES = \
- libeminicard.a
-
-libeminicard_a_SOURCES = \
- e-addressbook-reflow-adapter.c \
- e-addressbook-reflow-adapter.h \
- e-addressbook-table-adapter.c \
- e-addressbook-table-adapter.h \
- e-addressbook-model.c \
- e-addressbook-model.h \
- e-addressbook-util.c \
- e-addressbook-util.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/gui/contact-editor/libecontacteditor.a \
-# $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.a \
-# $(top_builddir)/addressbook/printing/libecontactprint.a \
-# $(top_builddir)/addressbook/gui/merging/libecardmerging.a \
-# $(top_builddir)/widgets/misc/libemiscwidgets.a \
-# $(top_builddir)/addressbook/gui/component/select-names/libeselectnames.la \
-# $(top_builddir)/e-util/libeutil.la \
-# $(EXTRA_GNOME_LIBS) \
-# $(BONOBO_GNOME_LIBS) \
-# $(GNOME_PRINT_LIBS) \
-# libeminicard.a
-#
-#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/gui/contact-editor/libecontacteditor.a \
-# $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.a \
-# $(top_builddir)/addressbook/gui/component/select-names/libeselectnames.la \
-# $(top_builddir)/addressbook/printing/libecontactprint.a \
-# $(top_builddir)/widgets/misc/libemiscwidgets.a \
-# $(top_builddir)/e-util/libeutil.la \
-# $(top_builddir)/addressbook/gui/merging/libecardmerging.a \
-# $(EXTRA_GNOME_LIBS) \
-# $(BONOBO_GNOME_LIBS) \
-# $(GNOME_PRINT_LIBS)
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA =
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
deleted file mode 100644
index d3c59fbcfd..0000000000
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * (C) 1999 Ximian, 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 gtk_object_get_type()
-GtkObjectClass *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 {
- WRITABLE_STATUS,
- STATUS_MESSAGE,
- FOLDER_BAR_MESSAGE,
- CARD_ADDED,
- CARD_REMOVED,
- CARD_CHANGED,
- MODEL_CHANGED,
- STOP_STATE_CHANGED,
- 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);
- if (model->book_view && model->sequence_complete_id)
- gtk_signal_disconnect(GTK_OBJECT (model->book_view),
- model->sequence_complete_id);
-
- model->create_card_id = 0;
- model->remove_card_id = 0;
- model->modify_card_id = 0;
- model->status_message_id = 0;
- model->sequence_complete_id = 0;
-
- model->search_in_progress = FALSE;
-
- 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) {
- if (model->writable_status_id)
- gtk_signal_disconnect(GTK_OBJECT (model->book),
- model->writable_status_id);
-
- model->writable_status_id = 0;
-
- 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);
-}
-
-static void
-update_folder_bar_message (EAddressbookModel *model)
-{
- int count;
- char *message;
-
- count = model->data_count;
-
- switch (count) {
- case 0:
- message = g_strdup (_("No cards"));
- break;
- case 1:
- message = g_strdup (_("1 card"));
- break;
- default:
- message = g_strdup_printf (_("%d cards"), count);
- break;
- }
-
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [FOLDER_BAR_MESSAGE],
- message);
-
- g_free (message);
-}
-
-static void
-create_card(EBookView *book_view,
- const GList *cards,
- EAddressbookModel *model)
-{
- int old_count = model->data_count;
- int length = g_list_length ((GList *)cards);
-
- if (model->data_count + length > model->allocated_count) {
- while (model->data_count + length > model->allocated_count)
- model->allocated_count += 256;
- model->data = g_renew(ECard *, model->data, model->allocated_count);
- }
-
- for ( ; cards; cards = cards->next) {
- char *file_as;
-
- model->data[model->data_count++] = cards->data;
- gtk_object_ref (cards->data);
- gtk_object_get (GTK_OBJECT (cards->data),
- "file_as", &file_as,
- NULL);
- }
-
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [CARD_ADDED],
- old_count, model->data_count - old_count);
-
- update_folder_bar_message (model);
-}
-
-static void
-remove_card(EBookView *book_view,
- const char *id,
- EAddressbookModel *model)
-{
- int i;
-
- for ( i = 0; i < model->data_count; i++) {
- if ( !strcmp(e_card_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 *));
- model->data_count--;
-
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [CARD_REMOVED],
- i);
- update_folder_bar_message (model);
- break;
- }
- }
-}
-
-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_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_duplicate(E_CARD(cards->data));
- gtk_object_ref(GTK_OBJECT(model->data[i]));
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [CARD_CHANGED],
- 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
-sequence_complete (EBookView *book_view,
- EAddressbookModel *model)
-{
- model->search_in_progress = FALSE;
- status_message (book_view, NULL, model);
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [STOP_STATE_CHANGED]);
-}
-
-static void
-writable_status (EBook *book,
- gboolean writable,
- EAddressbookModel *model)
-{
- if (!model->editable_set) {
- model->editable = writable;
-
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [WRITABLE_STATUS],
- writable);
- }
-}
-
-static void
-e_addressbook_model_class_init (GtkObjectClass *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 [WRITABLE_STATUS] =
- gtk_signal_new ("writable_status",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, writable_status),
- gtk_marshal_NONE__BOOL,
- GTK_TYPE_NONE, 1, GTK_TYPE_BOOL);
-
- 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);
-
- e_addressbook_model_signals [FOLDER_BAR_MESSAGE] =
- gtk_signal_new ("folder_bar_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, folder_bar_message),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- e_addressbook_model_signals [CARD_ADDED] =
- gtk_signal_new ("card_added",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, card_added),
- gtk_marshal_NONE__INT_INT,
- GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
-
- e_addressbook_model_signals [CARD_REMOVED] =
- gtk_signal_new ("card_removed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, card_removed),
- gtk_marshal_NONE__INT,
- GTK_TYPE_NONE, 1, GTK_TYPE_INT);
-
- e_addressbook_model_signals [CARD_CHANGED] =
- gtk_signal_new ("card_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, card_changed),
- gtk_marshal_NONE__INT,
- GTK_TYPE_NONE, 1, GTK_TYPE_INT);
-
- e_addressbook_model_signals [MODEL_CHANGED] =
- gtk_signal_new ("model_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, model_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- e_addressbook_model_signals [STOP_STATE_CHANGED] =
- gtk_signal_new ("stop_state_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, stop_state_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_addressbook_model_signals, LAST_SIGNAL);
-}
-
-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->writable_status_id = 0;
- model->sequence_complete_id = 0;
- model->data = NULL;
- model->data_count = 0;
- model->allocated_count = 0;
- model->search_in_progress = FALSE;
- model->editable = FALSE;
- model->editable_set = 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);
- model->sequence_complete_id = gtk_signal_connect(GTK_OBJECT(model->book_view),
- "sequence_complete",
- GTK_SIGNAL_FUNC(sequence_complete),
- model);
-
- for ( i = 0; i < model->data_count; i++ ) {
- gtk_object_unref(GTK_OBJECT(model->data[i]));
- }
-
- g_free(model->data);
- model->data = NULL;
- model->data_count = 0;
- model->allocated_count = 0;
- model->search_in_progress = TRUE;
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [MODEL_CHANGED]);
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [STOP_STATE_CHANGED]);
-}
-
-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;
- g_free (capabilities);
- }
- 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;
- card = e_card_duplicate (model->data[row]);
- 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) {
- if (model->writable_status_id)
- gtk_signal_disconnect(GTK_OBJECT (model->book),
- model->writable_status_id);
-
- model->writable_status_id = 0;
-
- 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);
- gtk_signal_connect (GTK_OBJECT(model->book),
- "writable_status",
- writable_status, 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);
- model->editable_set = TRUE;
- 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;
-}
-
-EAddressbookModel*
-e_addressbook_model_new (void)
-{
- EAddressbookModel *et;
-
- et = gtk_type_new (e_addressbook_model_get_type ());
-
- return et;
-}
-
-void e_addressbook_model_stop (EAddressbookModel *model)
-{
- remove_book_view(model);
- model->search_in_progress = FALSE;
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [STOP_STATE_CHANGED]);
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [STATUS_MESSAGE],
- "Search Interrupted.");
-}
-
-gboolean
-e_addressbook_model_can_stop (EAddressbookModel *model)
-{
- return model->search_in_progress;
-}
-
-int
-e_addressbook_model_card_count (EAddressbookModel *model)
-{
- return model->data_count;
-}
-
-ECard *
-e_addressbook_model_card_at (EAddressbookModel *model, int index)
-{
- return model->data[index];
-}
-
-gboolean
-e_addressbook_model_editable (EAddressbookModel *model)
-{
- return model->editable;
-}
-
-EBook *
-e_addressbook_model_get_ebook (EAddressbookModel *model)
-{
- return model->book;
-}
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
deleted file mode 100644
index 3bd66ca46f..0000000000
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ /dev/null
@@ -1,73 +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 "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))
-
-typedef struct _EAddressbookModel EAddressbookModel;
-typedef struct _EAddressbookModelClass EAddressbookModelClass;
-
-struct _EAddressbookModel {
- GtkObject parent;
-
- /* item specific fields */
- EBook *book;
- char *query;
- EBookView *book_view;
-
- int get_view_idle;
-
- ECard **data;
- int data_count;
- int allocated_count;
-
- int create_card_id, remove_card_id, modify_card_id, status_message_id, writable_status_id, sequence_complete_id;
-
- guint search_in_progress : 1;
- guint editable : 1;
- guint editable_set : 1;
- guint first_get_view : 1;
-};
-
-
-struct _EAddressbookModelClass {
- GtkObjectClass parent_class;
-
- /*
- * Signals
- */
- void (*writable_status) (EAddressbookModel *model, gboolean writable);
- void (*status_message) (EAddressbookModel *model, const gchar *message);
- void (*folder_bar_message) (EAddressbookModel *model, const gchar *message);
- void (*card_added) (EAddressbookModel *model, gint index, gint count);
- void (*card_removed) (EAddressbookModel *model, gint index);
- void (*card_changed) (EAddressbookModel *model, gint index);
- void (*model_changed) (EAddressbookModel *model);
- void (*stop_state_changed) (EAddressbookModel *model);
-};
-
-
-GtkType e_addressbook_model_get_type (void);
-EAddressbookModel *e_addressbook_model_new (void);
-
-/* Returns object with ref count of 1. */
-ECard *e_addressbook_model_get_card (EAddressbookModel *model,
- int row);
-EBook *e_addressbook_model_get_ebook (EAddressbookModel *model);
-
-void e_addressbook_model_stop (EAddressbookModel *model);
-gboolean e_addressbook_model_can_stop (EAddressbookModel *model);
-
-int e_addressbook_model_card_count (EAddressbookModel *model);
-ECard *e_addressbook_model_card_at (EAddressbookModel *model, int index);
-gboolean e_addressbook_model_editable (EAddressbookModel *model);
-
-#endif /* _E_ADDRESSBOOK_MODEL_H_ */
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
deleted file mode 100644
index b4092605ed..0000000000
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ /dev/null
@@ -1,649 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-
-#include <config.h>
-
-#include "e-addressbook-reflow-adapter.h"
-#include "e-addressbook-model.h"
-#include "e-addressbook-util.h"
-
-#include <gal/util/e-i18n.h>
-
-#include "e-minicard.h"
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-font.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/unicode/gunicode.h>
-#include "e-contact-save-as.h"
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-
-
-struct _EAddressbookReflowAdapterPrivate {
- EAddressbookModel *model;
-
- int create_card_id, remove_card_id, modify_card_id, model_changed_id;
-};
-
-#define PARENT_TYPE e_reflow_model_get_type()
-EReflowModel *parent_class;
-
-#define d(x)
-
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_EDITABLE,
-};
-
-enum {
- DRAG_BEGIN,
- LAST_SIGNAL
-};
-
-static guint e_addressbook_reflow_adapter_signals [LAST_SIGNAL] = {0, };
-
-static void
-unlink_model(EAddressbookReflowAdapter *adapter)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->create_card_id);
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->remove_card_id);
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->modify_card_id);
-
- priv->create_card_id = 0;
- priv->remove_card_id = 0;
- priv->modify_card_id = 0;
-
- gtk_object_unref(GTK_OBJECT(priv->model));
-
- priv->model = NULL;
-}
-
-
-static int
-count_lines (const gchar *text)
-{
- int num_lines = 1;
- gunichar unival;
-
- for (text = e_unicode_get_utf8 (text, &unival); (unival && text); text = e_unicode_get_utf8 (text, &unival)) {
- if (unival == '\n') {
- num_lines ++;
- }
- }
-
- return num_lines;
-}
-
-static int
-text_height (GnomeCanvas *canvas, const gchar *text)
-{
- EFont *font = e_font_from_gdk_font (((GtkWidget *) canvas)->style->font);
- gint height = e_font_height (font) * count_lines (text) / canvas->pixels_per_unit;
-
- e_font_unref (font);
- return height;
-}
-
-typedef struct {
- EAddressbookReflowAdapter *adapter;
- ESelectionModel *selection;
-} ModelAndSelection;
-
-static void
-model_and_selection_free (ModelAndSelection *mns)
-{
- gtk_object_unref(GTK_OBJECT(mns->adapter));
- gtk_object_unref(GTK_OBJECT(mns->selection));
- g_free(mns);
-}
-
-static void
-add_to_list (int model_row, gpointer closure)
-{
- GList **list = closure;
- *list = g_list_prepend (*list, GINT_TO_POINTER (model_row));
-}
-
-static GList *
-get_card_list (ModelAndSelection *mns)
-{
- EAddressbookReflowAdapterPrivate *priv = mns->adapter->priv;
- GList *list;
- GList *iterator;
-
- list = NULL;
- e_selection_model_foreach (mns->selection, add_to_list, &list);
-
- for (iterator = list; iterator; iterator = iterator->next) {
- iterator->data = e_addressbook_model_card_at (priv->model, GPOINTER_TO_INT (iterator->data));
- }
- list = g_list_reverse (list);
- return list;
-}
-
-static void
-save_as (GtkWidget *widget, ModelAndSelection *mns)
-{
- GList *list;
-
- list = get_card_list (mns);
- if (list)
- e_contact_list_save_as (_("Save as VCard"), list);
- g_list_free (list);
- model_and_selection_free (mns);
-}
-
-static void
-send_as (GtkWidget *widget, ModelAndSelection *mns)
-{
- GList *list;
-
- list = get_card_list (mns);
- if (list)
- e_card_list_send (list, E_CARD_DISPOSITION_AS_ATTACHMENT);
- g_list_free (list);
- model_and_selection_free (mns);
-}
-
-static void
-send_to (GtkWidget *widget, ModelAndSelection *mns)
-{
- GList *list;
-
- list = get_card_list (mns);
- if (list)
- e_card_list_send (list, E_CARD_DISPOSITION_AS_TO);
- g_list_free (list);
- model_and_selection_free (mns);
-}
-
-static void
-print (GtkWidget *widget, ModelAndSelection *mns)
-{
- GList *list;
-
- list = get_card_list (mns);
- if (list)
- gtk_widget_show (e_contact_print_card_list_dialog_new (list));
- g_list_free (list);
- model_and_selection_free (mns);
-}
-
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
-static void
-print_envelope (GtkWidget *widget, ModelAndSelection *mns)
-{
- GList *list;
-
- list = get_card_list (mns);
- if (list)
- gtk_widget_show (e_contact_print_envelope_list_dialog_new (list));
- g_list_free (list);
- model_and_selection_free (mns);
-}
-#endif
-
-static void
-card_changed_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- d(g_print ("%s: %s(): a card was changed with status %d\n", __FILE__, __FUNCTION__, status));
-}
-
-static void
-delete (GtkWidget *widget, ModelAndSelection *mns)
-{
- EAddressbookReflowAdapterPrivate *priv = mns->adapter->priv;
- GList *list;
-
- list = get_card_list (mns);
- if (list) {
-
- if (e_contact_editor_confirm_delete(NULL)) { /*FIXME: Give a GtkWindow here. */
- GList *iterator;
- EBook *book = e_addressbook_model_get_ebook(priv->model);
-
- for (iterator = list; iterator; iterator = iterator->next) {
- ECard *card = iterator->data;
-
- gtk_object_ref(GTK_OBJECT(card));
-
- e_book_remove_card (book,
- card,
- card_changed_cb,
- NULL);
-
- gtk_object_unref(GTK_OBJECT(card));
- }
- }
- }
-
- g_list_free (list);
- model_and_selection_free (mns);
-}
-
-static void
-open_card (GtkWidget *widget, ModelAndSelection *mns)
-{
- EAddressbookReflowAdapterPrivate *priv = mns->adapter->priv;
- GList *list;
-
- list = get_card_list (mns);
- if (list) {
- GList *iterator;
- EBook *book = e_addressbook_model_get_ebook(priv->model);
-
- for (iterator = list; iterator; iterator = iterator->next) {
- ECard *card = iterator->data;
-
- if (e_card_evolution_list (card)) {
- e_addressbook_show_contact_list_editor (book, card,
- FALSE, e_addressbook_model_editable (priv->model));
- }
- else {
- e_addressbook_show_contact_editor (book, card,
- FALSE, e_addressbook_model_editable (priv->model));
- }
- }
- }
-
- g_list_free (list);
- model_and_selection_free (mns);
-}
-
-#define POPUP_READONLY_MASK 0x01
-gint
-e_addressbook_reflow_adapter_right_click (EAddressbookReflowAdapter *adapter, GdkEvent *event, ESelectionModel *selection)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- ModelAndSelection *mns = g_new(ModelAndSelection, 1);
- EPopupMenu menu[] = { {N_("Open"), NULL, GTK_SIGNAL_FUNC(open_card), NULL, 0},
- {N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, 0},
- {N_("Forward Contact"), 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},
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- {N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, 0},
-#endif
- {N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, POPUP_READONLY_MASK},
- {NULL, NULL, NULL, 0}};
-
- mns->adapter = adapter;
- mns->selection = selection;
- gtk_object_ref(GTK_OBJECT(mns->adapter));
- gtk_object_ref(GTK_OBJECT(mns->selection));
- e_popup_menu_run (menu, event, e_addressbook_model_editable(priv->model) ? 0 : POPUP_READONLY_MASK, 0, mns);
- return TRUE;
-}
-
-static void
-addressbook_finalize(GtkObject *object)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
-
- unlink_model (adapter);
-}
-
-static void
-addressbook_set_width (EReflowModel *erm, int width)
-{
-}
-
-/* This function returns the number of items in our EReflowModel. */
-static int
-addressbook_count (EReflowModel *erm)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- return e_addressbook_model_card_count (priv->model);
-}
-
-/* This function returns the number of items in our EReflowModel. */
-static int
-addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- /* FIXME */
- ECardSimpleField field;
- int count = 0;
- int height;
- char *string;
- ECardSimple *simple = e_card_simple_new (e_addressbook_model_card_at (priv->model, i));
-
- string = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FILE_AS);
- height = text_height (GNOME_CANVAS_ITEM (parent)->canvas, string ? string : "") + 10.0;
- g_free(string);
-
- for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST - 2 && count < 5; field++) {
-
- if (field == E_CARD_SIMPLE_FIELD_FAMILY_NAME)
- continue;
-
- string = e_card_simple_get(simple, field);
- if (string && *string) {
- int this_height;
- int field_text_height;
-
- this_height = text_height (GNOME_CANVAS_ITEM (parent)->canvas, e_card_simple_get_name(simple, field));
-
- field_text_height = text_height (GNOME_CANVAS_ITEM (parent)->canvas, string);
- if (this_height < field_text_height)
- this_height = field_text_height;
-
- this_height += 3;
-
- height += this_height;
- count ++;
- }
- g_free (string);
- }
- height += 2;
-
- gtk_object_unref (GTK_OBJECT (simple));
-
- return height;
-}
-
-static int
-addressbook_compare (EReflowModel *erm, int n1, int n2)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- ECard *card1, *card2;
-
- card1 = e_addressbook_model_card_at (priv->model, n1);
- card2 = e_addressbook_model_card_at (priv->model, n2);
-
- if (card1 && card2) {
- char *file_as1, *file_as2;
- file_as1 = card1->file_as;
- file_as2 = card2->file_as;
- if (file_as1 && file_as2)
- return g_utf8_collate(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));
- }
- if (card1)
- return -1;
- if (card2)
- return 1;
- return 0;
-}
-
-static int
-adapter_drag_begin (EMinicard *card, GdkEvent *event, EAddressbookReflowAdapter *adapter)
-{
- gint ret_val = 0;
-
- gtk_signal_emit (GTK_OBJECT(adapter),
- e_addressbook_reflow_adapter_signals[DRAG_BEGIN],
- event, &ret_val);
-
- return ret_val;
-}
-
-static GnomeCanvasItem *
-addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- GnomeCanvasItem *item;
-
- item = gnome_canvas_item_new(parent,
- e_minicard_get_type(),
- "card", e_addressbook_model_card_at (priv->model, i),
- "editable", e_addressbook_model_editable (priv->model),
- NULL);
-
-#if 0
- gtk_signal_connect (GTK_OBJECT (item), "selected",
- GTK_SIGNAL_FUNC(card_selected), emvm);
-#endif
-
- gtk_signal_connect (GTK_OBJECT (item), "drag_begin",
- GTK_SIGNAL_FUNC(adapter_drag_begin), adapter);
-
- return item;
-}
-
-static void
-addressbook_reincarnate (EReflowModel *erm, int i, GnomeCanvasItem *item)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- gnome_canvas_item_set(item,
- "card", e_addressbook_model_card_at (priv->model, i),
- NULL);
-}
-
-
-
-static void
-create_card(EAddressbookModel *model,
- gint index, gint count,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_items_inserted (E_REFLOW_MODEL (adapter),
- index,
- count);
-}
-
-static void
-remove_card(EAddressbookModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_changed (E_REFLOW_MODEL (adapter));
-}
-
-static void
-modify_card(EAddressbookModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_item_changed (E_REFLOW_MODEL (adapter), index);
-}
-
-static void
-model_changed(EAddressbookModel *model,
- EAddressbookReflowAdapter *adapter)
-{
- e_reflow_model_changed (E_REFLOW_MODEL (adapter));
-}
-
-static void
-addressbook_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(o);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- switch (arg_id){
- case ARG_BOOK:
- gtk_object_set (GTK_OBJECT (priv->model),
- "book", GTK_VALUE_OBJECT (*arg),
- NULL);
- break;
- case ARG_QUERY:
- gtk_object_set (GTK_OBJECT (priv->model),
- "query", GTK_VALUE_STRING (*arg),
- NULL);
- break;
- case ARG_EDITABLE:
- gtk_object_set (GTK_OBJECT (priv->model),
- "editable", GTK_VALUE_BOOL (*arg),
- NULL);
- break;
- }
-}
-
-static void
-addressbook_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(o);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- switch (arg_id) {
- case ARG_BOOK: {
- EBook *book;
- gtk_object_get (GTK_OBJECT (priv->model),
- "book", &book,
- NULL);
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(book);
- break;
- }
- case ARG_QUERY: {
- char *query;
- gtk_object_get (GTK_OBJECT (priv->model),
- "query", &query,
- NULL);
- GTK_VALUE_STRING (*arg) = query;
- break;
- }
- case ARG_EDITABLE: {
- gboolean editable;
- gtk_object_get (GTK_OBJECT (priv->model),
- "editable", &editable,
- NULL);
- GTK_VALUE_BOOL (*arg) = editable;
- break;
- }
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-e_addressbook_reflow_adapter_class_init (GtkObjectClass *object_class)
-{
- EReflowModelClass *model_class = (EReflowModelClass *) object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->set_arg = addressbook_set_arg;
- object_class->get_arg = addressbook_get_arg;
- object_class->finalize = addressbook_finalize;
-
- gtk_object_add_arg_type ("EAddressbookReflowAdapter::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
- gtk_object_add_arg_type ("EAddressbookReflowAdapter::query", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_QUERY);
- gtk_object_add_arg_type ("EAddressbookReflowAdapter::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
-
- e_addressbook_reflow_adapter_signals [DRAG_BEGIN] =
- gtk_signal_new ("drag_begin",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookReflowAdapterClass, drag_begin),
- gtk_marshal_INT__POINTER,
- GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
-
-
- gtk_object_class_add_signals (object_class, e_addressbook_reflow_adapter_signals, LAST_SIGNAL);
-
- model_class->set_width = addressbook_set_width;
- model_class->count = addressbook_count;
- model_class->height = addressbook_height;
- model_class->compare = addressbook_compare;
- model_class->incarnate = addressbook_incarnate;
- model_class->reincarnate = addressbook_reincarnate;
-}
-
-static void
-e_addressbook_reflow_adapter_init (GtkObject *object)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
- EAddressbookReflowAdapterPrivate *priv;
-
- priv = adapter->priv = g_new0 (EAddressbookReflowAdapterPrivate, 1);
-
- priv->create_card_id = 0;
- priv->remove_card_id = 0;
- priv->modify_card_id = 0;
- priv->model_changed_id = 0;
-}
-
-GtkType
-e_addressbook_reflow_adapter_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "EAddressbookReflowAdapter",
- sizeof (EAddressbookReflowAdapter),
- sizeof (EAddressbookReflowAdapterClass),
- (GtkClassInitFunc) e_addressbook_reflow_adapter_class_init,
- (GtkObjectInitFunc) e_addressbook_reflow_adapter_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-void
-e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
- EAddressbookModel *model)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- priv->model = model;
- gtk_object_ref (GTK_OBJECT (priv->model));
-
- priv->create_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "card_added",
- GTK_SIGNAL_FUNC(create_card),
- adapter);
- priv->remove_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "card_removed",
- GTK_SIGNAL_FUNC(remove_card),
- adapter);
- priv->modify_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "card_changed",
- GTK_SIGNAL_FUNC(modify_card),
- adapter);
- priv->model_changed_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "model_changed",
- GTK_SIGNAL_FUNC(model_changed),
- adapter);
-}
-
-EReflowModel *
-e_addressbook_reflow_adapter_new (EAddressbookModel *model)
-{
- EAddressbookReflowAdapter *et;
-
- et = gtk_type_new (e_addressbook_reflow_adapter_get_type ());
-
- e_addressbook_reflow_adapter_construct (et, model);
-
- return E_REFLOW_MODEL(et);
-}
-
-
-ECard *
-e_addressbook_reflow_adapter_get_card (EAddressbookReflowAdapter *adapter,
- int index)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- return e_addressbook_model_get_card (priv->model, index);
-}
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.h b/addressbook/gui/widgets/e-addressbook-reflow-adapter.h
deleted file mode 100644
index 1614a65064..0000000000
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_ADDRESSBOOK_REFLOW_ADAPTER_H_
-#define _E_ADDRESSBOOK_REFLOW_ADAPTER_H_
-
-#include <gal/widgets/e-reflow-model.h>
-#include <gal/widgets/e-selection-model.h>
-#include "e-addressbook-model.h"
-#include "addressbook/backend/ebook/e-book.h"
-#include "addressbook/backend/ebook/e-book-view.h"
-#include "addressbook/backend/ebook/e-card.h"
-
-#define E_ADDRESSBOOK_REFLOW_ADAPTER_TYPE (e_addressbook_reflow_adapter_get_type ())
-#define E_ADDRESSBOOK_REFLOW_ADAPTER(o) (GTK_CHECK_CAST ((o), E_ADDRESSBOOK_REFLOW_ADAPTER_TYPE, EAddressbookReflowAdapter))
-#define E_ADDRESSBOOK_REFLOW_ADAPTER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_ADDRESSBOOK_REFLOW_ADAPTER_TYPE, EAddressbookReflowAdapterClass))
-#define E_IS_ADDRESSBOOK_REFLOW_ADAPTER(o) (GTK_CHECK_TYPE ((o), E_ADDRESSBOOK_REFLOW_ADAPTER_TYPE))
-#define E_IS_ADDRESSBOOK_REFLOW_ADAPTER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESSBOOK_REFLOW_ADAPTER_TYPE))
-
-typedef struct _EAddressbookReflowAdapter EAddressbookReflowAdapter;
-typedef struct _EAddressbookReflowAdapterPrivate EAddressbookReflowAdapterPrivate;
-typedef struct _EAddressbookReflowAdapterClass EAddressbookReflowAdapterClass;
-
-struct _EAddressbookReflowAdapter {
- EReflowModel parent;
-
- EAddressbookReflowAdapterPrivate *priv;
-};
-
-
-struct _EAddressbookReflowAdapterClass {
- EReflowModelClass parent_class;
-
- /*
- * Signals
- */
- gint (* drag_begin) (EAddressbookReflowAdapter *adapter, GdkEvent *event);
-};
-
-
-GtkType e_addressbook_reflow_adapter_get_type (void);
-void e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
- EAddressbookModel *model);
-EReflowModel *e_addressbook_reflow_adapter_new (EAddressbookModel *model);
-
-/* Returns object with ref count of 1. */
-ECard *e_addressbook_reflow_adapter_get_card (EAddressbookReflowAdapter *adapter,
- int index);
-gint e_addressbook_reflow_adapter_right_click (EAddressbookReflowAdapter *emvm,
- GdkEvent *event,
- ESelectionModel *selection);
-
-#endif /* _E_ADDRESSBOOK_REFLOW_ADAPTER_H_ */
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
deleted file mode 100644
index 3fa92d2300..0000000000
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-#include "e-addressbook-model.h"
-#include "e-addressbook-table-adapter.h"
-#include "e-card-merging.h"
-#include "e-addressbook-util.h"
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include <gnome.h>
-
-struct _EAddressbookTableAdapterPrivate {
- EAddressbookModel *model;
-
- ECardSimple **simples;
- int count;
-
- int create_card_id, remove_card_id, modify_card_id, model_changed_id;
-};
-
-#define PARENT_TYPE e_table_model_get_type()
-ETableModelClass *parent_class;
-
-#define COLS (E_CARD_SIMPLE_FIELD_LAST)
-
-static void
-unlink_model(EAddressbookTableAdapter *adapter)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- int i;
-
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->create_card_id);
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->remove_card_id);
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->modify_card_id);
- gtk_signal_disconnect(GTK_OBJECT (priv->model),
- priv->model_changed_id);
-
- priv->create_card_id = 0;
- priv->remove_card_id = 0;
- priv->modify_card_id = 0;
- priv->model_changed_id = 0;
-
- /* free up the existing mapping if there is one */
- if (priv->simples) {
- for (i = 0; i < priv->count; i ++)
- gtk_object_unref (GTK_OBJECT (priv->simples[i]));
- g_free (priv->simples);
- priv->simples = NULL;
- }
-
- gtk_object_unref(GTK_OBJECT(priv->model));
-
- priv->model = NULL;
-}
-
-static void
-build_simple_mapping(EAddressbookTableAdapter *adapter)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- int i;
-
- /* free up the existing mapping if there is one */
- if (priv->simples) {
- for (i = 0; i < priv->count; i ++)
- gtk_object_unref (GTK_OBJECT (priv->simples[i]));
- g_free (priv->simples);
- }
-
- /* build up our mapping to ECardSimple*'s */
- priv->count = e_addressbook_model_card_count (priv->model);
- priv->simples = g_new (ECardSimple*, priv->count);
- for (i = 0; i < priv->count; i ++) {
- priv->simples[i] = e_card_simple_new (e_addressbook_model_card_at (priv->model, i));
- gtk_object_ref (GTK_OBJECT (priv->simples[i]));
- }
-}
-
-static void
-addressbook_destroy(GtkObject *object)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(object);
-
- unlink_model(adapter);
-}
-
-/* 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)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- return e_addressbook_model_card_count (priv->model);
-}
-
-/* This function returns the value at a particular point in our ETableModel. */
-static void *
-addressbook_value_at (ETableModel *etc, int col, int row)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- const char *value;
- if ( col >= COLS || row >= e_addressbook_model_card_count (priv->model) )
- return NULL;
-
- value = e_card_simple_get_const(priv->simples[row], col);
- return (void *)(value ? value : "");
-}
-
-/* This function sets the value at a particular point in our ETableModel. */
-static void
-card_modified_cb (EBook* book, EBookStatus status,
- gpointer user_data)
-{
- g_print ("%s: %s(): a card was modified\n", __FILE__, __FUNCTION__);
- if (status != E_BOOK_STATUS_SUCCESS)
- e_addressbook_error_dialog (_("Error modifying card"), status);
-}
-static void
-addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- if (e_addressbook_model_editable (priv->model)) {
- ECard *card;
-
- if ( col >= COLS|| row >= e_addressbook_model_card_count (priv->model) )
- return;
-
- e_card_simple_set(priv->simples[row],
- col,
- val);
- gtk_object_get(GTK_OBJECT(priv->simples[row]),
- "card", &card,
- NULL);
-
- e_card_merging_book_commit_card(e_addressbook_model_get_ebook(priv->model),
- card, card_modified_cb, NULL);
-
- /* XXX do we need this? shouldn't the commit_card generate a changed signal? */
- 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)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- ECard *card;
-
- if (row >= 0 && row < e_addressbook_model_card_count (priv->model))
- card = e_addressbook_model_card_at (priv->model, row);
- else
- card = NULL;
-
- if (!e_addressbook_model_editable(priv->model))
- return FALSE;
- else if (card && e_card_evolution_list (card))
- /* we only allow editing of the name and file as for
- lists */
- return col == E_CARD_SIMPLE_FIELD_FULL_NAME || col == E_CARD_SIMPLE_FIELD_FILE_AS;
- else
- return col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING;
-}
-
-static void
-addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etm);
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- ECard *card;
- ECardSimple *simple;
- 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_card_merging_book_add_card (e_addressbook_model_get_ebook (priv->model), 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
-e_addressbook_table_adapter_class_init (GtkObjectClass *object_class)
-{
- ETableModelClass *model_class = (ETableModelClass *) object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = addressbook_destroy;
-
- 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_table_adapter_init (GtkObject *object)
-{
- EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(object);
- EAddressbookTableAdapterPrivate *priv;
-
- priv = adapter->priv = g_new0 (EAddressbookTableAdapterPrivate, 1);
-
- priv->create_card_id = 0;
- priv->remove_card_id = 0;
- priv->modify_card_id = 0;
- priv->model_changed_id = 0;
- priv->simples = NULL;
- priv->count = 0;
-}
-
-
-static void
-create_card (EAddressbookModel *model,
- gint index, gint count,
- EAddressbookTableAdapter *adapter)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
- int i;
-
- priv->count += count;
- priv->simples = g_renew(ECardSimple *, priv->simples, priv->count);
- memmove (priv->simples + index + count, priv->simples + index, (priv->count - index - count) * sizeof (ECardSimple *));
-
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
- for (i = 0; i < count; i ++) {
- priv->simples[index + i] = e_card_simple_new (e_addressbook_model_card_at (priv->model, index + i));
- }
- e_table_model_rows_inserted (E_TABLE_MODEL (adapter), index, count);
-}
-
-static void
-remove_card (EAddressbookModel *model,
- gint index,
- EAddressbookTableAdapter *adapter)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
-
- gtk_object_unref (GTK_OBJECT (priv->simples[index]));
- memmove (priv->simples + index, priv->simples + index + 1, (priv->count - index - 1) * sizeof (ECardSimple *));
- priv->count --;
- e_table_model_rows_deleted (E_TABLE_MODEL (adapter), index, 1);
-}
-
-static void
-modify_card (EAddressbookModel *model,
- gint index,
- EAddressbookTableAdapter *adapter)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- e_table_model_pre_change (E_TABLE_MODEL (adapter));
-
- gtk_object_unref (GTK_OBJECT (priv->simples[index]));
- priv->simples[index] = e_card_simple_new (e_addressbook_model_card_at (priv->model, index));
- gtk_object_ref (GTK_OBJECT (priv->simples[index]));
- e_table_model_row_changed (E_TABLE_MODEL (adapter), index);
-}
-
-static void
-model_changed (EAddressbookModel *model,
- EAddressbookTableAdapter *adapter)
-{
- build_simple_mapping (adapter);
- e_table_model_changed (E_TABLE_MODEL (adapter));
-}
-
-GtkType
-e_addressbook_table_adapter_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "EAddressbookTableAdapter",
- sizeof (EAddressbookTableAdapter),
- sizeof (EAddressbookTableAdapterClass),
- (GtkClassInitFunc) e_addressbook_table_adapter_class_init,
- (GtkObjectInitFunc) e_addressbook_table_adapter_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-void
-e_addressbook_table_adapter_construct (EAddressbookTableAdapter *adapter,
- EAddressbookModel *model)
-{
- EAddressbookTableAdapterPrivate *priv = adapter->priv;
-
- priv->model = model;
- gtk_object_ref (GTK_OBJECT (priv->model));
-
- priv->create_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "card_added",
- GTK_SIGNAL_FUNC(create_card),
- adapter);
- priv->remove_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "card_removed",
- GTK_SIGNAL_FUNC(remove_card),
- adapter);
- priv->modify_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "card_changed",
- GTK_SIGNAL_FUNC(modify_card),
- adapter);
- priv->model_changed_id = gtk_signal_connect(GTK_OBJECT(priv->model),
- "model_changed",
- GTK_SIGNAL_FUNC(model_changed),
- adapter);
-
- build_simple_mapping (adapter);
-}
-
-ETableModel *
-e_addressbook_table_adapter_new (EAddressbookModel *model)
-{
- EAddressbookTableAdapter *et;
-
- et = gtk_type_new (e_addressbook_table_adapter_get_type ());
-
- e_addressbook_table_adapter_construct (et, model);
-
- return E_TABLE_MODEL(et);
-}
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.h b/addressbook/gui/widgets/e-addressbook-table-adapter.h
deleted file mode 100644
index d76434e80a..0000000000
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_ADDRESSBOOK_TABLE_ADAPTER_H_
-#define _E_ADDRESSBOOK_TABLE_ADAPTER_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_TABLE_ADAPTER_TYPE (e_addressbook_table_adapter_get_type ())
-#define E_ADDRESSBOOK_TABLE_ADAPTER(o) (GTK_CHECK_CAST ((o), E_ADDRESSBOOK_TABLE_ADAPTER_TYPE, EAddressbookTableAdapter))
-#define E_ADDRESSBOOK_TABLE_ADAPTER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_ADDRESSBOOK_TABLE_ADAPTER_TYPE, EAddressbookTableAdapterClass))
-#define E_IS_ADDRESSBOOK_TABLE_ADAPTER(o) (GTK_CHECK_TYPE ((o), E_ADDRESSBOOK_TABLE_ADAPTER_TYPE))
-#define E_IS_ADDRESSBOOK_TABLE_ADAPTER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESSBOOK_TABLE_ADAPTER_TYPE))
-
-/* Virtual Column list:
- 0 Email
- 1 Full Name
- 2 Street
- 3 Phone
-*/
-
-typedef struct _EAddressbookTableAdapter EAddressbookTableAdapter;
-typedef struct _EAddressbookTableAdapterPrivate EAddressbookTableAdapterPrivate;
-typedef struct _EAddressbookTableAdapterClass EAddressbookTableAdapterClass;
-
-struct _EAddressbookTableAdapter {
- ETableModel parent;
-
- EAddressbookTableAdapterPrivate *priv;
-};
-
-
-struct _EAddressbookTableAdapterClass {
- ETableModelClass parent_class;
-};
-
-
-GtkType e_addressbook_table_adapter_get_type (void);
-void e_addressbook_table_adapter_construct (EAddressbookTableAdapter *adapter,
- EAddressbookModel *model);
-ETableModel *e_addressbook_table_adapter_new (EAddressbookModel *model);
-
-#endif /* _E_ADDRESSBOOK_TABLE_ADAPTER_H_ */
diff --git a/addressbook/gui/widgets/e-addressbook-util.c b/addressbook/gui/widgets/e-addressbook-util.c
deleted file mode 100644
index 6ecf00cbf5..0000000000
--- a/addressbook/gui/widgets/e-addressbook-util.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-table-field-chooser.c
- * Copyright (C) 2001 Ximian, Inc.
- * Author: Chris Toshok <toshok@ximian.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 <gnome.h>
-
-#include "e-addressbook-util.h"
-#include "e-card-merging.h"
-
-void
-e_addressbook_error_dialog (const gchar *msg, EBookStatus status)
-{
- static char *status_to_string[] = {
- N_("Success"),
- N_("Unknown error"),
- N_("Repository offline"),
- N_("Permission denied"),
- N_("Card not found"),
- N_("Card ID already exists"),
- N_("Protocol not supported"),
- N_("Cancelled"),
- N_("Other error")
- };
- char *error_msg;
-
- error_msg = g_strdup_printf ("%s: %s", msg, _(status_to_string [status]));
-
- gtk_widget_show (gnome_error_dialog (error_msg));
-
- g_free (error_msg);
-}
-
-
-static void
-added_cb (EBook* book, EBookStatus status, const char *id,
- gboolean is_list)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- e_addressbook_error_dialog (is_list ? _("Error adding list") : _("Error adding card"), status);
- }
-}
-
-static void
-modified_cb (EBook* book, EBookStatus status,
- gboolean is_list)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- e_addressbook_error_dialog (is_list ? _("Error modifying list") : _("Error modifying card"),
- status);
- }
-}
-
-static void
-deleted_cb (EBook* book, EBookStatus status,
- gboolean is_list)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- e_addressbook_error_dialog (is_list ? _("Error removing list") : _("Error removing card"),
- status);
- }
-}
-
-static void
-editor_closed_cb (GtkObject *editor, gpointer data)
-{
- gtk_object_unref (editor);
-}
-
-EContactEditor *
-e_addressbook_show_contact_editor (EBook *book, ECard *card,
- gboolean is_new_card,
- gboolean editable)
-{
- EContactEditor *ce;
-
- ce = e_contact_editor_new (book, card, is_new_card, editable);
-
- gtk_signal_connect (GTK_OBJECT (ce), "card_added",
- GTK_SIGNAL_FUNC (added_cb), GINT_TO_POINTER (FALSE));
- gtk_signal_connect (GTK_OBJECT (ce), "card_modified",
- GTK_SIGNAL_FUNC (modified_cb), GINT_TO_POINTER (FALSE));
- gtk_signal_connect (GTK_OBJECT (ce), "card_deleted",
- GTK_SIGNAL_FUNC (deleted_cb), GINT_TO_POINTER (FALSE));
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- return ce;
-}
-
-EContactListEditor *
-e_addressbook_show_contact_list_editor (EBook *book, ECard *card,
- gboolean is_new_card,
- gboolean editable)
-{
- EContactListEditor *ce;
-
- ce = e_contact_list_editor_new (book, card, is_new_card, editable);
-
- gtk_signal_connect (GTK_OBJECT (ce), "list_added",
- GTK_SIGNAL_FUNC (added_cb), GINT_TO_POINTER (TRUE));
- gtk_signal_connect (GTK_OBJECT (ce), "list_modified",
- GTK_SIGNAL_FUNC (modified_cb), GINT_TO_POINTER (TRUE));
- gtk_signal_connect (GTK_OBJECT (ce), "list_deleted",
- GTK_SIGNAL_FUNC (deleted_cb), GINT_TO_POINTER (TRUE));
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), GINT_TO_POINTER (TRUE));
-
- e_contact_list_editor_show (ce);
-
- return ce;
-}
diff --git a/addressbook/gui/widgets/e-addressbook-util.h b/addressbook/gui/widgets/e-addressbook-util.h
deleted file mode 100644
index 1f3ffe074d..0000000000
--- a/addressbook/gui/widgets/e-addressbook-util.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-addressbook-util.h
- * Copyright (C) 2001 Ximian, Inc.
- * Author: Chris Toshok <toshok@ximian.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_UTIL_H__
-#define __E_ADDRESSBOOK_UTIL_H__
-
-#include "addressbook/backend/ebook/e-book.h"
-#include "addressbook/gui/contact-editor/e-contact-editor.h"
-#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-void e_addressbook_error_dialog (const gchar *msg,
- EBookStatus status);
-EContactEditor* e_addressbook_show_contact_editor (EBook *book, ECard *card,
- gboolean is_new_card,
- gboolean editable);
-EContactListEditor * e_addressbook_show_contact_list_editor (EBook *book, ECard *card,
- gboolean is_new_card,
- gboolean editable);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_ADDRESSBOOK_UTIL_H__ */
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
deleted file mode 100644
index 095f1dbf48..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ /dev/null
@@ -1,1566 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-table-field-chooser.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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/gtkinvisible.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/widgets/e-unicode.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-#include <gal/unicode/gunicode.h>
-#include <libgnomeui/gnome-dialog-util.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 <e-util/e-unicode-i18n.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-addressbook-util.h"
-#include "e-addressbook-table-adapter.h"
-#include "e-addressbook-reflow-adapter.h"
-#include "e-minicard-view-widget.h"
-#include "e-contact-save-as.h"
-#include "e-card-merging.h"
-
-#include "e-contact-editor.h"
-#include <gdk/gdkkeysyms.h>
-#include <ctype.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 gint e_addressbook_view_key_press_event (GtkWidget *widget,
- GdkEventKey *event);
-static void change_view_type (EAddressbookView *view, EAddressbookViewType view_type);
-
-static void status_message (GtkObject *object, const gchar *status, EAddressbookView *eav);
-static void folder_bar_message (GtkObject *object, const gchar *status, EAddressbookView *eav);
-static void stop_state_changed (GtkObject *object, EAddressbookView *eav);
-static void writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav);
-static void command_state_change (EAddressbookView *eav);
-
-static void selection_clear_event (GtkWidget *invisible, GdkEventSelection *event,
- EAddressbookView *view);
-static void selection_received (GtkWidget *invisible, GtkSelectionData *selection_data,
- guint time, EAddressbookView *view);
-static void selection_get (GtkWidget *invisible, GtkSelectionData *selection_data,
- guint info, guint time_stamp, EAddressbookView *view);
-static void invisible_destroyed (GtkWidget *invisible, EAddressbookView *view);
-
-static GtkTableClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_TYPE,
-};
-
-enum {
- STATUS_MESSAGE,
- FOLDER_BAR_MESSAGE,
- COMMAND_STATE_CHANGE,
- 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, };
-
-static GdkAtom clipboard_atom = GDK_NONE;
-
-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;
- GtkWidgetClass *widget_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
- widget_class = GTK_WIDGET_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;
-
- widget_class->key_press_event = e_addressbook_view_key_press_event;
-
- 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);
-
- e_addressbook_view_signals [FOLDER_BAR_MESSAGE] =
- gtk_signal_new ("folder_bar_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookViewClass, folder_bar_message),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- e_addressbook_view_signals [COMMAND_STATE_CHANGE] =
- gtk_signal_new ("command_state_change",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookViewClass, command_state_change),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_addressbook_view_signals, LAST_SIGNAL);
-
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-}
-
-static void
-e_addressbook_view_init (EAddressbookView *eav)
-{
- eav->view_type = E_ADDRESSBOOK_VIEW_NONE;
-
- eav->model = e_addressbook_model_new ();
-
- gtk_signal_connect (GTK_OBJECT(eav->model),
- "status_message",
- GTK_SIGNAL_FUNC (status_message),
- eav);
-
- gtk_signal_connect (GTK_OBJECT(eav->model),
- "folder_bar_message",
- GTK_SIGNAL_FUNC (folder_bar_message),
- eav);
-
- gtk_signal_connect (GTK_OBJECT(eav->model),
- "stop_state_changed",
- GTK_SIGNAL_FUNC (stop_state_changed),
- eav);
-
- gtk_signal_connect (GTK_OBJECT(eav->model),
- "writable_status",
- GTK_SIGNAL_FUNC (writable_status),
- eav);
-
- eav->editable = FALSE;
- eav->book = NULL;
- eav->query = g_strdup("(contains \"x-evolution-any-field\" \"\")");
-
- eav->object = NULL;
- eav->widget = NULL;
-
- eav->view_collection = NULL;
- eav->view_menus = NULL;
-
- eav->invisible = gtk_invisible_new ();
-
- gtk_selection_add_target (eav->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- 0);
-
- gtk_signal_connect (GTK_OBJECT(eav->invisible), "selection_get",
- GTK_SIGNAL_FUNC (selection_get),
- eav);
- gtk_signal_connect (GTK_OBJECT(eav->invisible), "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear_event),
- eav);
- gtk_signal_connect (GTK_OBJECT(eav->invisible), "selection_received",
- GTK_SIGNAL_FUNC (selection_received),
- eav);
- gtk_signal_connect (GTK_OBJECT(eav->invisible), "destroy",
- GTK_SIGNAL_FUNC (invisible_destroyed),
- eav);
-}
-
-static void
-e_addressbook_view_destroy (GtkObject *object)
-{
- EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
-
- if (eav->model)
- gtk_object_unref(GTK_OBJECT(eav->model));
-
- if (eav->book)
- gtk_object_unref(GTK_OBJECT(eav->book));
- g_free(eav->query);
-
- if (eav->view_collection) {
- gtk_object_unref (GTK_OBJECT (eav->view_collection));
- eav->view_collection = NULL;
- }
-
- if (eav->view_menus) {
- gtk_object_unref (GTK_OBJECT (eav->view_menus));
- eav->view_menus = NULL;
- }
-
- if (eav->clipboard_cards) {
- g_list_foreach (eav->clipboard_cards, (GFunc)gtk_object_unref, NULL);
- g_list_free (eav->clipboard_cards);
- eav->clipboard_cards = NULL;
- }
-
- if (eav->invisible)
- gtk_widget_destroy (eav->invisible);
-
- if (GTK_OBJECT_CLASS(parent_class)->destroy)
- GTK_OBJECT_CLASS(parent_class)->destroy(object);
-}
-
-static gint
-e_addressbook_view_key_press_event (GtkWidget *widget,
- GdkEventKey *event)
-{
- EAddressbookView *view = E_ADDRESSBOOK_VIEW (widget);
- guint return_val = 0;
-
- if (GTK_WIDGET_CLASS (parent_class)->key_press_event) {
- return_val = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
- if (return_val != 0)
- return return_val;
- }
-
- if ((event->keyval == GDK_Delete ||
- event->keyval == GDK_KP_Delete) &&
- event->state == 0) {
- e_addressbook_view_delete_selection(view);
- return_val = TRUE;
- }
-
- return return_val;
-}
-
-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;
- gtk_object_set (GTK_OBJECT (eav->model),
- "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;
- gtk_object_set(GTK_OBJECT(eav->model),
- "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\" \"\")");
- gtk_object_set(GTK_OBJECT(eav->model),
- "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;
- }
-}
-
-
-/* Translators: put here a list of labels you want to see on buttons in
- addressbook. You may use any character to separate labels but it must
- also be placed at the begining ot the string */
-const char *button_labels = N_(",123,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");
-/* Translators: put here a list of characters that correspond to buttons
- in addressbook. You may use any character to separate labels but it
- must also be placed at the begining ot the string.
- Use lower case letters if possible. */
-const char *button_letters = N_(",0,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");
-
-typedef struct {
- EAddressbookView *view;
- gunichar letter;
-} LetterClosure;
-
-static char **
-e_utf8_split (const char *utf8_str, gunichar delim)
-{
- GSList *str_list = NULL, *sl;
- int n = 0;
- const char *str, *s;
- char **str_array;
-
- g_return_val_if_fail (utf8_str != NULL, NULL);
-
- str = utf8_str;
- while (*str != '\0') {
- int len;
- char *new_str;
-
- for (s = str; *s != '\0' && g_utf8_get_char (s) != delim; s = g_utf8_next_char (s))
- ;
- len = s - str;
- new_str = g_new (char, len + 1);
- if (len > 0) {
- memcpy (new_str, str, len);
- }
- new_str[len] = '\0';
- str_list = g_slist_prepend (str_list, new_str);
- n++;
- if (*s != '\0') {
- str = g_utf8_next_char (s);
- } else {
- str = s;
- }
- }
-
- str_array = g_new (char *, n + 1);
- str_array[n--] = NULL;
- for (sl = str_list; sl != NULL; sl = sl->next) {
- str_array[n--] = sl->data;
- }
- g_slist_free (str_list);
-
- return str_array;
-}
-
-static void
-jump_to_letter(GtkWidget *button, LetterClosure *closure)
-{
- char *query;
-
- if (g_unichar_isdigit (closure->letter)) {
- const char *letters = U_(button_letters);
- char **letter_v;
- GString *gstr;
- char **p;
-
- letter_v = e_utf8_split (g_utf8_next_char (letters),
- g_utf8_get_char (letters));
- g_assert (letter_v != NULL && letter_v[0] != NULL);
- gstr = g_string_new ("(not (or ");
- for (p = letter_v + 1; *p != NULL; p++) {
- char s[7];
-
- g_string_sprintfa (gstr, "(beginswith \"file_as\" \"%s\")", *p);
- s[g_unichar_to_utf8 (g_unichar_toupper (g_utf8_get_char (*p)), s)] = '\0';
- g_string_sprintfa (gstr, "(beginswith \"file_as\" \"%s\")", s);
- }
- g_string_append (gstr, "))");
- query = gstr->str;
- g_string_free (gstr, FALSE);
- } else {
- char s1[6 + 1], s2[6 + 1];
-
- s1 [g_unichar_to_utf8 (closure->letter, s1)] = '\0';
- s2 [g_unichar_to_utf8 (g_unichar_toupper (closure->letter), s2)] = '\0';
- query = g_strdup_printf ("(or "
- "(beginswith \"file_as\" \"%s\")"
- "(beginswith \"file_as\" \"%s\")"
- ")", s1, s2);
- }
- gtk_object_set (GTK_OBJECT (closure->view),
- "query", query,
- NULL);
- g_free (query);
-}
-
-static void
-free_closure(GtkWidget *button, LetterClosure *closure)
-{
- g_free(closure);
-}
-
-static GtkWidget *
-create_alphabet (EAddressbookView *view)
-{
- GtkWidget *widget, *viewport, *vbox;
- const char *labels, *letters;
- char **label_v, **letter_v;
- char **pl, **pc;
- gunichar sep;
-
- widget = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget),
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-
- viewport = gtk_viewport_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (widget), viewport);
- gtk_container_set_border_width (GTK_CONTAINER (viewport), 4);
- gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
-
- vbox = gtk_vbox_new (FALSE, 4);
- gtk_container_add (GTK_CONTAINER (viewport), vbox);
- gtk_widget_set_usize (vbox, 27, 0);
-
- labels = U_(button_labels);
- sep = g_utf8_get_char (labels);
- label_v = e_utf8_split (g_utf8_next_char (labels), sep);
- letters = U_(button_letters);
- sep = g_utf8_get_char (letters);
- letter_v = e_utf8_split (g_utf8_next_char (letters), sep);
- g_assert (label_v != NULL && letter_v != NULL);
- for (pl = label_v, pc = letter_v; *pl != NULL && *pc != NULL; pl++, pc++) {
- GtkWidget *button;
- LetterClosure *closure;
- char *label;
-
- label = e_utf8_to_locale_string (*pl);
- button = gtk_button_new_with_label (label);
- g_free (label);
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-
- closure = g_new (LetterClosure, 1);
- closure->view = view;
- closure->letter = g_utf8_get_char (*pc);
- 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);
-
- }
- g_strfreev (label_v);
- g_strfreev (letter_v);
-
- gtk_widget_show_all (widget);
-
- return widget;
-}
-
-static void
-minicard_selection_change (EMinicardViewWidget *widget, EAddressbookView *view)
-{
- command_state_change (view);
-}
-
-static void
-create_minicard_view (EAddressbookView *view)
-{
- GtkWidget *scrollframe;
- GtkWidget *alphabet;
- GtkWidget *minicard_view;
- GtkWidget *minicard_hbox;
- EAddressbookReflowAdapter *adapter;
-
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- minicard_hbox = gtk_hbox_new(FALSE, 0);
-
- adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(e_addressbook_reflow_adapter_new (view->model));
- minicard_view = e_minicard_view_widget_new(adapter);
-
- gtk_signal_connect(GTK_OBJECT(minicard_view), "selection_change",
- GTK_SIGNAL_FUNC(minicard_selection_change), view);
-
-
- 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 ();
-
- e_reflow_model_changed (E_REFLOW_MODEL (adapter));
-
- gtk_object_unref (GTK_OBJECT (adapter));
-}
-
-static void
-table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EAddressbookView *view)
-{
- if (E_IS_ADDRESSBOOK_TABLE_ADAPTER(view->object)) {
- EAddressbookModel *model = view->model;
- ECard *card = e_addressbook_model_get_card(model, row);
- EBook *book;
-
- gtk_object_get(GTK_OBJECT(model),
- "book", &book,
- NULL);
-
- g_assert (E_IS_BOOK (book));
-
- if (e_card_evolution_list (card))
- e_addressbook_show_contact_list_editor (book, card, FALSE, view->editable);
- else
- e_addressbook_show_contact_editor (book, card, FALSE, view->editable);
- }
-}
-
-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(view->model, 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);
-}
-
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
-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);
-}
-#endif
-
-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_TABLE_ADAPTER(view->object)) {
- EAddressbookModel *model = view->model;
- CardAndBook *card_and_book;
-
- EPopupMenu menu[] = {
- {N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, 0},
- {N_("Forward Contact"), 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},
-#if 0 /* Envelope printing is disabled for Evolution 1.0. */
- {N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, 0},
-#endif
- {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_selection_change(ETableScrolled *table, EAddressbookView *view)
-{
- command_state_change (view);
-}
-
-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;
-
- if (!E_IS_ADDRESSBOOK_TABLE_ADAPTER(view->object))
- return;
-
- switch (info) {
- case DND_TARGET_TYPE_VCARD: {
- char *value;
-
- row = e_table_view_to_model_row (table, row);
- value = e_card_get_vcard(view->model->data[row]);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-}
-
-static void
-emit_status_message (EAddressbookView *eav, const gchar *status)
-{
- gtk_signal_emit (GTK_OBJECT (eav),
- e_addressbook_view_signals [STATUS_MESSAGE],
- status);
-}
-
-static void
-emit_folder_bar_message (EAddressbookView *eav, const gchar *message)
-{
- gtk_signal_emit (GTK_OBJECT (eav),
- e_addressbook_view_signals [FOLDER_BAR_MESSAGE],
- message);
-}
-
-static void
-status_message (GtkObject *object, const gchar *status, EAddressbookView *eav)
-{
- emit_status_message (eav, status);
-}
-
-static void
-folder_bar_message (GtkObject *object, const gchar *status, EAddressbookView *eav)
-{
- emit_folder_bar_message (eav, status);
-}
-
-static void
-stop_state_changed (GtkObject *object, EAddressbookView *eav)
-{
- command_state_change (eav);
-}
-
-static void
-writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav)
-{
- command_state_change (eav);
-}
-
-static void
-command_state_change (EAddressbookView *eav)
-{
- gtk_signal_emit (GTK_OBJECT (eav),
- e_addressbook_view_signals [COMMAND_STATE_CHANGE]);
-}
-
-#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=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"1\" _title=\"Full Name\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"3\" _title=\"Email\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"4\" _title=\"Primary Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"5\" _title=\"Assistant Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"6\" _title=\"Business Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"7\" _title=\"Callback Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"8\" _title=\"Company Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"9\" _title=\"Home Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"10\" _title=\"Organization\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"11\" _title=\"Business Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"12\" _title=\"Home Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"13\" _title=\"Mobile Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"14\" _title=\"Car Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"15\" _title=\"Business Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"16\" _title=\"Home Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"17\" _title=\"Business Phone 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"18\" _title=\"Home Phone 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"19\" _title=\"ISDN\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"20\" _title=\"Other Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"21\" _title=\"Other Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"22\" _title=\"Pager\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"23\" _title=\"Radio\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"24\" _title=\"Telex\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"25\" _title=\"TTY\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"26\" _title=\"Other Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"27\" _title=\"Email 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"28\" _title=\"Email 3\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"29\" _title=\"Web Site\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"30\" _title=\"Department\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"31\" _title=\"Office\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"32\" _title=\"Title\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"33\" _title=\"Profession\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"34\" _title=\"Manager\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"35\" _title=\"Assistant\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"36\" _title=\"Nickname\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"37\" _title=\"Spouse\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"38\" _title=\"Note\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"39\" _title=\"Free-busy URL\" expansion=\"1.0\" minimum_width=\"75\" 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 *adapter;
- ECardSimple *simple;
- GtkWidget *table;
-
- simple = e_card_simple_new(NULL);
-
- adapter = e_addressbook_table_adapter_new(view->model);
-
- /* 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 (adapter, NULL, SPEC, NULL);
-
- view->object = GTK_OBJECT(adapter);
- 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);
- gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(table))), "selection_change",
- GTK_SIGNAL_FUNC(table_selection_change), 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;
-
- command_state_change (view);
-}
-
-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)
-{
- GalViewFactory *factory;
- ETableSpecification *spec;
- char *galview;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (view));
- g_return_if_fail (uic != NULL);
- g_return_if_fail (BONOBO_IS_UI_COMPONENT (uic));
- g_return_if_fail (view->view_collection == NULL);
-
- g_assert (view->view_collection == NULL);
- g_assert (view->view_menus == NULL);
-
- view->view_collection = gal_view_collection_new();
-
- galview = gnome_util_prepend_user_home("/evolution/views/addressbook/");
- gal_view_collection_set_storage_directories(view->view_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);
- gtk_object_unref (GTK_OBJECT (spec));
- gal_view_collection_add_factory (view->view_collection, factory);
- gtk_object_unref (GTK_OBJECT (factory));
-
- factory = gal_view_factory_minicard_new ();
- gal_view_collection_add_factory (view->view_collection, factory);
- gtk_object_unref (GTK_OBJECT (factory));
-
- gal_view_collection_load(view->view_collection);
-
- view->view_menus = gal_view_menus_new(view->view_collection);
- gal_view_menus_apply(view->view_menus, uic, NULL);
- gtk_signal_connect(GTK_OBJECT(view->view_collection), "display_view",
- display_view, view);
-}
-
-/**
- * e_addressbook_view_discard_menus:
- * @view: An addressbook view.
- *
- * Makes an addressbook view discard its GAL view menus and its views collection
- * objects. This should be called when the corresponding Bonobo component is
- * deactivated.
- **/
-void
-e_addressbook_view_discard_menus (EAddressbookView *view)
-{
- g_return_if_fail (view != NULL);
- g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (view));
- g_return_if_fail (view->view_collection);
-
- g_assert (view->view_collection != NULL);
- g_assert (view->view_menus != NULL);
-
- gtk_object_unref (GTK_OBJECT (view->view_collection));
- view->view_collection = NULL;
-
- gtk_object_unref (GTK_OBJECT (view->view_menus));
- view->view_menus = NULL;
-}
-
-static ESelectionModel*
-get_selection_model (EAddressbookView *view)
-{
- if (view->view_type == E_ADDRESSBOOK_VIEW_MINICARD)
- return e_minicard_view_widget_get_selection_model (E_MINICARD_VIEW_WIDGET(view->object));
- else
- return E_SELECTION_MODEL(E_TABLE_SCROLLED(view->widget)->table->selection);
-}
-
-void
-e_addressbook_view_print(EAddressbookView *view)
-{
- if (view->view_type == E_ADDRESSBOOK_VIEW_MINICARD) {
- char *query;
- EBook *book;
- GtkWidget *print;
-
- gtk_object_get (GTK_OBJECT(view->model),
- "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);
- }
-}
-
-void
-e_addressbook_view_print_preview(EAddressbookView *view)
-{
- if (view->view_type == E_ADDRESSBOOK_VIEW_MINICARD) {
- char *query;
- EBook *book;
-
- gtk_object_get (GTK_OBJECT(view->model),
- "query", &query,
- "book", &book,
- NULL);
- e_contact_print_preview(book, query);
- g_free(query);
- } else if (view->view_type == E_ADDRESSBOOK_VIEW_TABLE) {
- EPrintable *printable;
- ETable *etable;
- GnomePrintMaster *master;
- GnomePrintContext *pc;
- GtkWidget *preview;
-
- gtk_object_get(GTK_OBJECT(view->widget), "table", &etable, NULL);
- printable = e_table_get_printable(etable);
-
- master = gnome_print_master_new();
- gnome_print_master_set_copies (master, 1, FALSE);
- 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));
- gtk_object_unref(GTK_OBJECT(printable));
- }
-}
-
-static void
-card_deleted_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- e_addressbook_error_dialog (_("Error removing card"), status);
- }
-}
-
-static void
-do_remove (int i, gpointer user_data)
-{
- EBook *book;
- ECard *card;
- EAddressbookView *view = user_data;
-
- gtk_object_get (GTK_OBJECT(view->model),
- "book", &book,
- NULL);
-
- card = e_addressbook_model_get_card (view->model, i);
-
- e_book_remove_card(book, card, card_deleted_cb, view);
-
- gtk_object_unref (GTK_OBJECT (card));
-}
-
-void
-e_addressbook_view_delete_selection(EAddressbookView *view)
-{
- ESelectionModel *model = get_selection_model (view);
-
- g_return_if_fail (model);
-
- e_selection_model_foreach (model,
- do_remove,
- view);
-}
-
-static void
-invisible_destroyed (GtkWidget *invisible, EAddressbookView *view)
-{
- view->invisible = NULL;
-}
-
-static void
-selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- EAddressbookView *view)
-{
- char *value;
-
- value = e_card_list_get_vcard(view->clipboard_cards);
-
- gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING,
- 8, value, strlen (value));
-
-}
-
-static void
-selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- EAddressbookView *view)
-{
- if (view->clipboard_cards) {
- g_list_foreach (view->clipboard_cards, (GFunc)gtk_object_unref, NULL);
- g_list_free (view->clipboard_cards);
- view->clipboard_cards = NULL;
- }
-}
-
-static void
-selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- EAddressbookView *view)
-{
- if (selection_data->length < 0 || selection_data->type != GDK_SELECTION_TYPE_STRING) {
- return;
- }
- else {
- /* XXX make sure selection_data->data = \0 terminated */
- GList *card_list = e_card_load_cards_from_string_with_default_charset (selection_data->data, "ISO-8859-1");
- GList *l;
-
- if (!card_list /* it wasn't a vcard list */)
- return;
-
- for (l = card_list; l; l = l->next) {
- ECard *card = l->data;
-
- e_card_merging_book_add_card (view->book, card, NULL /* XXX */, NULL);
- }
-
- g_list_foreach (card_list, (GFunc)gtk_object_unref, NULL);
- g_list_free (card_list);
- }
-}
-
-static void
-add_to_list (int model_row, gpointer closure)
-{
- GList **list = closure;
- *list = g_list_prepend (*list, GINT_TO_POINTER (model_row));
-}
-
-static GList *
-get_selected_cards (EAddressbookView *view)
-{
- GList *list;
- GList *iterator;
- ESelectionModel *selection = get_selection_model (view);
-
- list = NULL;
- e_selection_model_foreach (selection, add_to_list, &list);
-
- for (iterator = list; iterator; iterator = iterator->next) {
- iterator->data = e_addressbook_model_card_at (view->model, GPOINTER_TO_INT (iterator->data));
- }
- list = g_list_reverse (list);
- return list;
-}
-
-void
-e_addressbook_view_save_as (EAddressbookView *view)
-{
- GList *list = get_selected_cards (view);
- if (list)
- e_contact_list_save_as (_("Save as VCard"), list);
- g_list_free (list);
-}
-
-void
-e_addressbook_view_send (EAddressbookView *view)
-{
- GList *list = get_selected_cards (view);
- if (list)
- e_card_list_send (list, E_CARD_DISPOSITION_AS_ATTACHMENT);
- g_list_free (list);
-}
-
-void
-e_addressbook_view_send_to (EAddressbookView *view)
-{
- GList *list = get_selected_cards (view);
- if (list)
- e_card_list_send (list, E_CARD_DISPOSITION_AS_TO);
- g_list_free (list);
-}
-
-void
-e_addressbook_view_cut (EAddressbookView *view)
-{
- e_addressbook_view_copy (view);
- e_addressbook_view_delete_selection (view);
-}
-
-void
-e_addressbook_view_copy (EAddressbookView *view)
-{
- view->clipboard_cards = get_selected_cards (view);
-
- gtk_selection_owner_set (view->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-void
-e_addressbook_view_paste (EAddressbookView *view)
-{
- gtk_selection_convert (view->invisible, clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-void
-e_addressbook_view_select_all (EAddressbookView *view)
-{
- ESelectionModel *model = get_selection_model (view);
-
- g_return_if_fail (model);
-
- e_selection_model_select_all (model);
-}
-
-void
-e_addressbook_view_show_all(EAddressbookView *view)
-{
- gtk_object_set(GTK_OBJECT(view),
- "query", NULL,
- NULL);
-}
-
-void
-e_addressbook_view_stop(EAddressbookView *view)
-{
- e_addressbook_model_stop (view->model);
-}
-
-static gboolean
-e_addressbook_view_selection_nonempty (EAddressbookView *view)
-{
- ESelectionModel *selection_model;
-
- selection_model = get_selection_model (view);
- if (selection_model == NULL)
- return FALSE;
-
- return e_selection_model_selected_count (selection_model) != 0;
-}
-
-gboolean
-e_addressbook_view_can_create (EAddressbookView *view)
-{
- return e_addressbook_model_editable (view->model);
-}
-
-gboolean
-e_addressbook_view_can_print (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view);
-}
-
-gboolean
-e_addressbook_view_can_save_as (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view);
-}
-
-gboolean e_addressbook_view_can_send (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view);
-}
-
-gboolean e_addressbook_view_can_send_to (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view);
-}
-
-gboolean
-e_addressbook_view_can_delete (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view) && e_addressbook_model_editable (view->model);
-}
-
-gboolean
-e_addressbook_view_can_cut (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view) && e_addressbook_model_editable (view->model);
-}
-
-gboolean
-e_addressbook_view_can_copy (EAddressbookView *view)
-{
- return e_addressbook_view_selection_nonempty (view);
-}
-
-gboolean
-e_addressbook_view_can_paste (EAddressbookView *view)
-{
- return e_addressbook_model_editable (view->model);
-}
-
-gboolean
-e_addressbook_view_can_select_all (EAddressbookView *view)
-{
- return e_addressbook_model_card_count (view->model) != 0;
-}
-
-gboolean
-e_addressbook_view_can_stop (EAddressbookView *view)
-{
- return e_addressbook_model_can_stop (view->model);
-}
-
diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h
deleted file mode 100644
index c2fe0588b4..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-addressbook-view.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <gal/menus/gal-view-collection.h>
-#include "e-addressbook-model.h"
-#include "widgets/menus/gal-view-menus.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;
-
- EAddressbookModel *model;
-
- GtkWidget *invisible;
- GList *clipboard_cards;
-
- EBook *book;
- char *query;
- guint editable : 1;
-
- GtkObject *object;
- GtkWidget *widget;
-
- GtkWidget *vbox;
-
- /* Menus handler and the view collection */
- GalViewCollection *view_collection;
- GalViewMenus *view_menus;
-};
-
-struct _EAddressbookViewClass
-{
- GtkTableClass parent_class;
-
- /*
- * Signals
- */
- void (*status_message) (EAddressbookView *view, const gchar *message);
- void (*folder_bar_message) (EAddressbookView *view, const gchar *message);
- void (*command_state_change) (EAddressbookView *view);
-};
-
-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_discard_menus (EAddressbookView *view);
-
-void e_addressbook_view_save_as (EAddressbookView *view);
-void e_addressbook_view_send (EAddressbookView *view);
-void e_addressbook_view_send_to (EAddressbookView *view);
-void e_addressbook_view_print (EAddressbookView *view);
-void e_addressbook_view_print_preview (EAddressbookView *view);
-void e_addressbook_view_delete_selection (EAddressbookView *view);
-void e_addressbook_view_cut (EAddressbookView *view);
-void e_addressbook_view_copy (EAddressbookView *view);
-void e_addressbook_view_paste (EAddressbookView *view);
-void e_addressbook_view_select_all (EAddressbookView *view);
-void e_addressbook_view_show_all (EAddressbookView *view);
-void e_addressbook_view_stop (EAddressbookView *view);
-
-gboolean e_addressbook_view_can_create (EAddressbookView *view);
-gboolean e_addressbook_view_can_print (EAddressbookView *view);
-gboolean e_addressbook_view_can_save_as (EAddressbookView *view);
-gboolean e_addressbook_view_can_send (EAddressbookView *view);
-gboolean e_addressbook_view_can_send_to (EAddressbookView *view);
-gboolean e_addressbook_view_can_delete (EAddressbookView *view);
-gboolean e_addressbook_view_can_cut (EAddressbookView *view);
-gboolean e_addressbook_view_can_copy (EAddressbookView *view);
-gboolean e_addressbook_view_can_paste (EAddressbookView *view);
-gboolean e_addressbook_view_can_select_all (EAddressbookView *view);
-gboolean e_addressbook_view_can_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 ff3e5489e1..0000000000
--- a/addressbook/gui/widgets/e-minicard-control.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-minicard-control.c
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright 1999, 2000, Ximian, 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"
-#include "e-card-merging.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_with_default_charset(vcard, "ISO-8859-1");
- 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_card_merging_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 cdb16ef68d..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 eed6e1da21..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 73d76ade73..0000000000
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-minicard-view-widget.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 void selection_change (ESelectionModel *esm, EMinicardViewWidget *widget);
-
-static ECanvasClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_EDITABLE
-};
-
-enum {
- SELECTION_CHANGE,
- 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 [SELECTION_CHANGE] =
- gtk_signal_new ("selection_change",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMinicardViewWidgetClass, selection_change),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- 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 (EAddressbookReflowAdapter *adapter)
-{
- EMinicardViewWidget *widget = E_MINICARD_VIEW_WIDGET (gtk_type_new (e_minicard_view_widget_get_type ()));
-
- widget->adapter = adapter;
- gtk_object_ref (GTK_OBJECT (widget->adapter));
-
- return GTK_WIDGET (widget);
-}
-
-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_unref (GTK_OBJECT (view->adapter));
-
- GTK_OBJECT_CLASS(parent_class)->destroy (object);
-}
-
-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_object_set(GTK_OBJECT(view->emv),
- "adapter", view->adapter,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (E_REFLOW(view->emv)->selection),
- "selection_changed",
- selection_change, view);
-
- 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 );
-}
-
-static void
-selection_change (ESelectionModel *esm, EMinicardViewWidget *widget)
-{
- gtk_signal_emit (GTK_OBJECT(widget),
- e_minicard_view_widget_signals [SELECTION_CHANGE], widget);
-}
-
-gint
-e_minicard_view_widget_selected_count (EMinicardViewWidget *view)
-{
- if (!view->emv)
- return 0;
- else
- return e_selection_model_selected_count (E_REFLOW (view->emv)->selection);
-}
-
-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,
- gunichar letter)
-{
- if (view->emv)
- e_minicard_view_jump_to_letter(E_MINICARD_VIEW(view->emv), letter);
-}
-
-ESelectionModel *
-e_minicard_view_widget_get_selection_model (EMinicardViewWidget *view)
-{
- if (view->emv)
- return E_SELECTION_MODEL (E_REFLOW (view->emv)->selection);
- else
- return NULL;
-}
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 2d94f15ec5..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <gal/unicode/gunicode.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;
-
- EAddressbookReflowAdapter *adapter;
-
- EBook *book;
- char *query;
- guint editable : 1;
-};
-
-struct _EMinicardViewWidgetClass
-{
- ECanvasClass parent_class;
- void (*selection_change) (EMinicardViewWidget*);
-};
-
-GtkType e_minicard_view_widget_get_type (void);
-gint e_minicard_view_widget_selected_count (EMinicardViewWidget *view);
-void e_minicard_view_widget_remove_selection (EMinicardViewWidget *view,
- EBookCallback cb,
- gpointer closure);
-void e_minicard_view_widget_jump_to_letter (EMinicardViewWidget *view,
- gunichar letter);
-GtkWidget *e_minicard_view_widget_new (EAddressbookReflowAdapter *adapter);
-
-ESelectionModel *e_minicard_view_widget_get_selection_model (EMinicardViewWidget *view);
-
-#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 fe3cf42206..0000000000
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-minicard-view.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 "e-minicard-view.h"
-
-#include "e-addressbook-util.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>
-
-static void e_minicard_view_drag_data_get(GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EMinicardView *view);
-
-static EReflowClass *parent_class = NULL;
-#define PARENT_TYPE (E_REFLOW_TYPE)
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_ADAPTER,
- ARG_BOOK,
- ARG_QUERY,
- ARG_EDITABLE
-};
-
-enum DndTargetType {
- DND_TARGET_TYPE_VCARD_LIST,
-};
-#define VCARD_LIST_TYPE "text/x-vcard"
-static GtkTargetEntry drag_types[] = {
- { VCARD_LIST_TYPE, 0, DND_TARGET_TYPE_VCARD_LIST }
-};
-static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
-
-static void
-e_minicard_view_drag_data_get(GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EMinicardView *view)
-{
- if (!E_IS_MINICARD_VIEW(view))
- return;
-
- switch (info) {
- case DND_TARGET_TYPE_VCARD_LIST: {
- char *value;
-
- value = e_card_list_get_vcard(view->drag_list);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-
- g_list_foreach (view->drag_list, (GFunc)gtk_object_unref, NULL);
- g_list_free (view->drag_list);
- view->drag_list = NULL;
-}
-
-typedef struct {
- GList *list;
- EAddressbookReflowAdapter *adapter;
-} ModelAndList;
-
-static void
-add_to_list (int index, gpointer closure)
-{
- ModelAndList *mal = closure;
- mal->list = g_list_prepend (mal->list, e_addressbook_reflow_adapter_get_card (mal->adapter, index));
-}
-
-static GList *
-get_card_list (EAddressbookReflowAdapter *adapter, ESelectionModel *selection)
-{
- ModelAndList mal;
-
- mal.adapter = adapter;
- mal.list = NULL;
-
- e_selection_model_foreach (selection, add_to_list, &mal);
-
- mal.list = g_list_reverse (mal.list);
- return mal.list;
-}
-
-static int
-e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, EMinicardView *view)
-{
- GdkDragContext *context;
- GtkTargetList *target_list;
- GdkDragAction actions = GDK_ACTION_MOVE;
-
- view->drag_list = get_card_list (adapter, E_REFLOW (view)->selection);
-
- g_print ("dragging %d card(s)\n", g_list_length (view->drag_list));
-
- 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);
-
- 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);
-
- gtk_drag_set_icon_default (context);
-
- return TRUE;
-}
-
-static void
-adapter_changed (EMinicardView *view)
-{
- char *empty_message;
-
- 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);
-
- gtk_signal_connect (GTK_OBJECT (view->adapter), "drag_begin",
- GTK_SIGNAL_FUNC (e_minicard_view_drag_begin), view);
-
- g_free (empty_message);
-}
-
-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_ADAPTER:
- if (view->adapter)
- gtk_object_unref (GTK_OBJECT(view->adapter));
- view->adapter = GTK_VALUE_POINTER (*arg);
- gtk_object_ref (GTK_OBJECT (view->adapter));
- adapter_changed (view);
- gtk_object_set (GTK_OBJECT (view),
- "model", view->adapter,
- NULL);
- break;
- case ARG_BOOK:
- gtk_object_set (GTK_OBJECT (view->adapter),
- "book", GTK_VALUE_OBJECT (*arg),
- NULL);
- break;
- case ARG_QUERY:
- gtk_object_set (GTK_OBJECT (view->adapter),
- "query", GTK_VALUE_STRING (*arg),
- NULL);
- break;
- case ARG_EDITABLE:
- gtk_object_set (GTK_OBJECT (view->adapter),
- "editable", GTK_VALUE_BOOL (*arg),
- NULL);
- break;
- }
-}
-
-static void
-e_minicard_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EMinicardView *view;
-
- view = E_MINICARD_VIEW (object);
-
- switch (arg_id) {
- case ARG_ADAPTER:
- GTK_VALUE_POINTER (*arg) = view->adapter;
- break;
- case ARG_BOOK:
- gtk_object_get (GTK_OBJECT (view->adapter),
- "book", &GTK_VALUE_OBJECT (*arg),
- NULL);
- break;
- case ARG_QUERY:
- gtk_object_get (GTK_OBJECT (view->adapter),
- "query", &GTK_VALUE_STRING (*arg),
- NULL);
- break;
- case ARG_EDITABLE:
- gtk_object_get (GTK_OBJECT (view->adapter),
- "editable", &GTK_VALUE_BOOL (*arg),
- NULL);
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-e_minicard_view_destroy (GtkObject *object)
-{
- EMinicardView *view = E_MINICARD_VIEW(object);
-
- if (view->canvas_drag_data_get_id) {
- gtk_signal_disconnect (GTK_OBJECT (GNOME_CANVAS_ITEM (view)->canvas),
- view->canvas_drag_data_get_id);
- }
- gtk_object_unref (GTK_OBJECT (view->adapter));
-
- GTK_OBJECT_CLASS(parent_class)->destroy (object);
-}
-
-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;
- gboolean editable;
-
- gtk_object_get(GTK_OBJECT(view), "book", &book, NULL);
- gtk_object_get(GTK_OBJECT(view->adapter), "editable", &editable, NULL);
-
- g_assert (E_IS_BOOK (book));
-
- e_addressbook_show_contact_editor (book, e_card_new(""), TRUE, editable);
- }
- 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 gint
-e_minicard_view_selection_event (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event)
-{
- EMinicardView *view;
- int return_val = FALSE;
-
- view = E_MINICARD_VIEW (reflow);
- if (parent_class->selection_event) {
- return_val = parent_class->selection_event (reflow, item, event);
- }
-
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- if (event->button.button == 3) {
- return_val = e_addressbook_reflow_adapter_right_click (view->adapter, event, reflow->selection);
- }
- break;
- default:
- break;
- }
- return return_val;
-}
-
-typedef struct {
- EMinicardView *view;
- EBookCallback cb;
- gpointer closure;
-} ViewCbClosure;
-
-static void
-do_remove (int i, gpointer user_data)
-{
- EBook *book;
- ECard *card;
- ViewCbClosure *viewcbclosure = user_data;
- EMinicardView *view = viewcbclosure->view;
- EBookCallback cb = viewcbclosure->cb;
- gpointer closure = viewcbclosure->closure;
-
- gtk_object_get (GTK_OBJECT(view->adapter),
- "book", &book,
- NULL);
-
- card = e_addressbook_reflow_adapter_get_card (view->adapter, i);
-
- e_book_remove_card(book, card, cb, closure);
-
- gtk_object_unref (GTK_OBJECT (card));
-}
-
-void
-e_minicard_view_remove_selection(EMinicardView *view,
- EBookCallback cb,
- gpointer closure)
-{
- ViewCbClosure viewcbclosure;
- viewcbclosure.view = view;
- viewcbclosure.cb = cb;
- viewcbclosure.closure = closure;
-
- e_selection_model_foreach (E_REFLOW (view)->selection,
- do_remove,
- &viewcbclosure);
-}
-
-#if 0
-static int
-compare_to_utf_str (EMinicard *card, const char *utf_str)
-{
- g_return_val_if_fail(card != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(card), 0);
-
- if (g_unichar_isdigit (g_utf8_get_char (utf_str))) {
- return 1;
- }
-
- if (card->card) {
- char *file_as;
- gtk_object_get(GTK_OBJECT(card->card),
- "file_as", &file_as,
- NULL);
- if (file_as)
- return g_utf8_strcasecmp (file_as, utf_str);
- else
- return 0;
- } else {
- return 0;
- }
-}
-#endif
-
-
-
-void
-e_minicard_view_jump_to_letter (EMinicardView *view,
- gunichar letter)
-{
-#if 0
- char uft_str[6 + 1];
-
- utf_str [g_unichar_to_utf8 (letter, utf_str)] = '\0';
- e_reflow_sorted_jump (E_REFLOW_SORTED (view),
- (GCompareFunc) compare_to_utf_str,
- utf_str);
-#endif
-}
-
-static void
-e_minicard_view_class_init (EMinicardViewClass *klass)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
- EReflowClass *reflow_class;
-
- object_class = (GtkObjectClass*) klass;
- item_class = (GnomeCanvasItemClass *) klass;
- reflow_class = (EReflowClass *) klass;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- gtk_object_add_arg_type ("EMinicardView::adapter", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_ADAPTER);
- 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);
-
- 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;
-
- reflow_class->selection_event = e_minicard_view_selection_event;
- /* GnomeCanvasItem method overrides */
-}
-
-static void
-e_minicard_view_init (EMinicardView *view)
-{
- view->adapter = NULL;
- view->canvas_drag_data_get_id = 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 (PARENT_TYPE, &reflow_info);
- }
-
- return reflow_type;
-}
diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h
deleted file mode 100644
index b735cc1ea7..0000000000
--- a/addressbook/gui/widgets/e-minicard-view.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-minicard-view.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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.h>
-#include <gal/widgets/e-selection-model-simple.h>
-#include <gal/unicode/gunicode.h>
-#include "addressbook/backend/ebook/e-book.h"
-#include "e-addressbook-reflow-adapter.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
-{
- EReflow parent;
-
- EAddressbookReflowAdapter *adapter;
-
- /* item specific fields */
-
- ESelectionModelSimple *selection;
-
- GList *drag_list;
-
- int canvas_destroy_id;
- int canvas_drag_data_get_id;
-
- int status_message_id;
-};
-
-struct _EMinicardViewClass
-{
- EReflowClass parent_class;
-};
-
-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,
- gunichar letter);
-
-#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 603f86b556..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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:Ximian, 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@ximian.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, Ximian, 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 1a8912e19d..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 6daf7f6fa3..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 d6887fc202..0000000000
--- a/addressbook/gui/widgets/e-minicard.c
+++ /dev/null
@@ -1,957 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-minicard.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <gdk-pixbuf/gnome-canvas-pixbuf.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/unicode/gunicode.h>
-#include "addressbook/backend/ebook/e-book.h"
-#include "e-addressbook-util.h"
-#include "e-minicard.h"
-#include "e-minicard-label.h"
-#include "e-minicard-view.h"
-#include "e-contact-editor.h"
-#include "e-card-merging.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 LIST_ICON_FILENAME "contact-is-a-list.png"
-
-#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->list_icon_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME);
- minicard->list_icon_size = gdk_pixbuf_get_height (minicard->list_icon_pixbuf);
-
- 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);
-
- gdk_pixbuf_unref (e_minicard->list_icon_pixbuf);
-
- 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);
-
- e_minicard->list_icon =
- gnome_canvas_item_new ( group,
- gnome_canvas_pixbuf_get_type(),
- "pixbuf", e_minicard->list_icon_pixbuf,
- NULL);
-
- 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_modified_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- g_print ("%s: %s(): a card was modified\n", __FILE__, __FUNCTION__);
- if (status != E_BOOK_STATUS_SUCCESS)
- e_addressbook_error_dialog (_("Error modifying card"), status);
-}
-
-/* Callback used when the contact editor is closed */
-static void
-editor_closed_cb (GtkObject *editor, gpointer data)
-{
- EMinicard *minicard = data;
- gtk_object_unref (GTK_OBJECT (editor));
- minicard->editor = NULL;
-}
-
-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_card_merging_book_commit_card (book,
- e_minicard->card,
- card_modified_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 (1 <= event->button.button && event->button.button <= 3) {
- int ret_val = e_minicard_selected(e_minicard, event);
- GdkEventMask mask = ((1 << (4 + event->button.button)) |
- GDK_POINTER_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK);
-
- e_canvas_item_grab_focus(item, TRUE);
-
- if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (e_minicard),
- mask, NULL, event->button.time)) {
- return FALSE;
- }
- gtk_grab_add (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas));
- e_minicard->button_x = event->button.x;
- e_minicard->button_y = event->button.y;
- e_minicard->drag_button = event->button.button;
- e_minicard->drag_button_down = TRUE;
- return ret_val;
- }
- break;
- }
- case GDK_BUTTON_RELEASE:
- if (e_minicard->drag_button == event->button.button) {
- e_minicard->drag_button = 0;
- e_minicard->drag_button_down = FALSE;
- e_minicard->button_x = -1;
- e_minicard->button_y = -1;
-
- if (GTK_WIDGET_HAS_GRAB (GNOME_CANVAS_ITEM (e_minicard)->canvas)) {
- gtk_grab_remove (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas));
- gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (e_minicard), event->button.time);
- }
- }
- break;
- case GDK_MOTION_NOTIFY:
- 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;
-
- ret_val = e_minicard_drag_begin(e_minicard, event);
-
- 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) {
- if (e_card_evolution_list (e_minicard->card))
- e_contact_list_editor_raise (E_CONTACT_LIST_EDITOR(e_minicard->editor));
- else
- e_contact_editor_raise(E_CONTACT_EDITOR(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) {
- if (e_card_evolution_list (e_minicard->card)) {
- EContactListEditor *editor = e_addressbook_show_contact_list_editor (book, e_minicard->card,
- FALSE, e_minicard->editable);
- e_minicard->editor = GTK_OBJECT (editor);
- }
- else {
- EContactEditor *editor = e_addressbook_show_contact_editor (book, e_minicard->card,
- FALSE, e_minicard->editable);
- e_minicard->editor = GTK_OBJECT (editor);
- }
- gtk_object_ref (e_minicard->editor);
-
- gtk_signal_connect (e_minicard->editor, "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_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
- - (e_card_evolution_list (e_minicard->card) ? e_minicard->list_icon_size : 0.0)),
- NULL );
- }
- if (e_minicard->list_icon) {
- e_canvas_item_move_absolute(e_minicard->list_icon,
- e_minicard->width - e_minicard->list_icon_size - 3,
- 3);
- }
- 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);
-
- /* Magically convert embedded XML into an address. */
- if (!strncmp (string, "<?xml", 4)) {
- EDestination *dest = e_destination_import (string);
- if (dest != NULL) {
- gchar *new_string = g_strdup (e_destination_get_address (dest));
- g_free (string);
- string = new_string;
- gtk_object_unref (GTK_OBJECT (dest));
- }
- }
-
- 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);
- }
-
- if ( e_card_evolution_list (e_minicard->card) ) {
- gnome_canvas_item_show (e_minicard->list_icon);
- }
- else {
- gnome_canvas_item_hide (e_minicard->list_icon);
- }
-
- list = e_minicard->fields;
- e_minicard->fields = NULL;
-
- for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST - 6 && count < 5; field++) {
- EMinicardField *minicard_field = NULL;
-
- if (field == E_CARD_SIMPLE_FIELD_FAMILY_NAME)
- continue;
-
- 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) {
- /* Magically convert embedded XML into an address. */
- if (!strncmp (string, "<?xml", 4)) {
- EDestination *dest = e_destination_import (string);
- if (dest != NULL) {
- gchar *new_string = g_strdup (e_destination_get_address (dest));
- g_free (string);
- string = new_string;
- gtk_object_unref (GTK_OBJECT (dest));
- }
- }
-
- 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);
- }
-}
-
-const 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 g_utf8_collate(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;
- GnomeCanvasItem *item = GNOME_CANVAS_ITEM (minicard);
- if (item->parent) {
- guint signal_id = gtk_signal_lookup ("selection_event", GTK_OBJECT_TYPE (item->parent));
- /* We should probably check the signature here, but I
- * don't think it's worth the time required to code
- * it.
- */
- if (signal_id != 0) {
- gtk_signal_emit(GTK_OBJECT(item->parent),
- signal_id,
- item, 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 bd74a24c09..0000000000
--- a/addressbook/gui/widgets/e-minicard.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-minicard.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <gdk-pixbuf/gdk-pixbuf.h>
-#include "addressbook/gui/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;
- GnomeCanvasItem *list_icon;
-
- GdkPixbuf *list_icon_pixbuf;
- double list_icon_size;
-
- GtkObject *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 drag_button;
-
- 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);
-const 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 90a6ed5f34..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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, Ximian, 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 e327190987..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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, Ximian, 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 362c3fddef..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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, Ximian, 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 0a3f34235d..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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@ximian.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, Ximian, 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 dc1fb510a7..0000000000
--- a/addressbook/printing/Makefile.am
+++ /dev/null
@@ -1,75 +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)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- libecontactprint.a \
- $(BONOBO_CONF_LIBS) \
- $(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)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- libecontactprint.a \
- $(BONOBO_CONF_LIBS) \
- $(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 057ae63b9e..0000000000
--- a/addressbook/printing/e-contact-print-envelope.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-envelope.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 "addressbook/printing/e-contact-print-envelope.h"
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#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"
-
-#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;
-}
-
-/* FIXME: Print all the contacts selected. */
-GtkWidget *
-e_contact_print_envelope_list_dialog_new(GList *list)
-{
- GtkWidget *dialog;
- ECard *card;
-
- if (list == NULL)
- return NULL;
-
- dialog = gnome_print_dialog_new(_("Print envelope"), GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(list->data);
- 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 9197d4452d..0000000000
--- a/addressbook/printing/e-contact-print-envelope.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-envelope.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <gtk/gtkwidget.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_envelope_dialog_new(ECard *card);
-GtkWidget *e_contact_print_envelope_list_dialog_new(GList *list);
-
-#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 adb974607c..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 987c4edbf3..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 c0f76da818..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 c4118e0dbf..0000000000
--- a/addressbook/printing/e-contact-print.c
+++ /dev/null
@@ -1,1184 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 "e-contact-print.h"
-
-#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-util.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.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 <gal/unicode/gunicode.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-card-simple.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_SIMPLE_STRING; 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_SIMPLE_STRING; 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 g_utf8_collate(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_SIMPLE_STRING; 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;
-}
-
-void
-e_contact_print_preview(EBook *book, char *query)
-{
- EContactPrintContext *ctxt = g_new(EContactPrintContext, 1);
- EContactPrintStyle *style = g_new(EContactPrintStyle, 1);
- GnomePrintMaster *master;
- GnomePrintContext *pc;
- gdouble font_size;
-
- master = gnome_print_master_new();
- gnome_print_master_set_copies (master, 1, FALSE);
- 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);
- ctxt->cards = NULL;
- gtk_object_ref(GTK_OBJECT(book));
- e_contact_do_print(book, ctxt->query, ctxt);
-}
-
-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;
-}
-
-/* FIXME: Print all the contacts selected. */
-GtkWidget *
-e_contact_print_card_list_dialog_new(GList *list)
-{
- GtkWidget *dialog;
- ECard *card;
-
- if (list == NULL)
- return NULL;
-
- dialog = gnome_print_dialog_new(_("Print card"), GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(list->data);
- 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 292fc8cc85..0000000000
--- a/addressbook/printing/e-contact-print.glade
+++ /dev/null
@@ -1,2003 +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>
- <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>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>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>
- <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>F_ont...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </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>
- <relief>GTK_RELIEF_NORMAL</relief>
- </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>F_ont...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </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>
- <relief>GTK_RELIEF_NORMAL</relief>
- </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>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h
deleted file mode 100644
index 9918248b3a..0000000000
--- a/addressbook/printing/e-contact-print.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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 <glib.h>
-#include <gtk/gtkwidget.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_dialog_new(EBook *book, char *query);
-void e_contact_print_preview(EBook *book, char *query);
-GtkWidget *e_contact_print_card_dialog_new(ECard *card);
-GtkWidget *e_contact_print_card_list_dialog_new(GList *list);
-
-#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 0a27e91d20..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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, Ximian, 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 1cb5bb0905..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 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.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, Ximian, 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/16_copy.png b/art/16_copy.png
deleted file mode 100644
index 31ede839ea..0000000000
--- a/art/16_copy.png
+++ /dev/null
Binary files differ
diff --git a/art/16_customize.png b/art/16_customize.png
deleted file mode 100644
index 1a0e15ad4e..0000000000
--- a/art/16_customize.png
+++ /dev/null
Binary files differ
diff --git a/art/16_cut.png b/art/16_cut.png
deleted file mode 100644
index 5860a9c56f..0000000000
--- a/art/16_cut.png
+++ /dev/null
Binary files differ
diff --git a/art/16_paste.png b/art/16_paste.png
deleted file mode 100644
index 56f15c5cc3..0000000000
--- a/art/16_paste.png
+++ /dev/null
Binary files differ
diff --git a/art/ChangeLog b/art/ChangeLog
deleted file mode 100644
index 71edd5cdb3..0000000000
--- a/art/ChangeLog
+++ /dev/null
@@ -1,423 +0,0 @@
-2001-09-25 Iain Holmes <iain@ximian.com>
-
- * add task.png
-
-2001-09-21 Iain Holmes <iain@ximian.com>
-
- * remove timezone.png...dunno where it came from.
-
-2001-09-21 Iain Holmes <iain@ximian.com>
-
- * install timezone-16.xpm
-
-2001-09-21 Jakub Steiner <jimmac@ximian.com>
-
- * splash.png: beta4
-
-2001-09-08 Jakub Steiner <jimmac@ximian.com>
-
- * pgp-signature-*: for the pgp signature checking
- * Makefile.am (images_DATA): add the icon files
-
-2001-09-06 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (images_DATA): add ldap-16.png.
-
-2001-09-05 Jakub Steiner <jimmac@ximian.com>
-
- * meeting-request.png: for the inline .ics stuff
- * Makefile.am (images_DATA): add the icon file
-
-2001-09-04 Jakub Steiner <jimmac@ximian.com>
-
- * timezone-48.png: for the timezone configuration step in the
- first-time-druid
- * Makefile.am (images_DATA): add the icon file
-
-2001-08-20 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: install new file
-
- * talking-heads.png: new graphic for meeting requests
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (images_DATA): added goto-16.png & new_task-16.png.
- (buttons_DATA): added save-24.png.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (buttons_DATA): added cut.png, copy.png & paste.png,
- so we can use them for the tasks toolbar.
-
-2001-08-18 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (images_DATA): added 16_copy.png, 16_customize.png,
- 16_cut.png & 16_paste.png.
- (buttons_DATA): added new_task.png, which I made from scaling up the
- smaller task.xpm icon.
-
-2001-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (buttons_DATA): Added `delete-message.png'.
-
-2001-08-17 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (images_DATA): moved task.xpm here, so it gets installed,
- so we can use it for the menus. Note that we don't have an icon to
- use in the toolbar for a new task, and we need one. Jakub?
-
-2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * wax-seal.png: Added.
-
- * wax-seal-broken.png: Added.
-
-2001-08-17 Jakub Steiner <jimmac@ximian.com>
-
- * splash.png: marketing spoils the fun. boring splash again.
-
-2001-08-17 Jakub Steiner <jimmac@ximian.com>
-
- * splash.png: Ruperzilla splash
-
- * splash-1-0.png: 1.0 candidate
-
-2001-08-16 Jakub Steiner <jimmac@ximian.com>
-
- * {next,previous}-message.png: use new document template. maybe
- still a bit dark.
-
-2001-08-15 Jakub Steiner <jimmac@ximian.com>
-
- * add-attachment.png: get rid of the yellow
-
- * compose-message.png: the old one seemed too dark to me. This one
- shares the same document base as the new stuff.
-
-2001-08-15 Jakub Steiner <jimmac@ximian.com>
-
- * all_contacts.xpm, new_contact.xpm: Nat wanted something bigger
- that would match the new button style. The filename of
- all_contacts.xpm is crap, maybe you guys can fix it to be
- "new_list.xpm" or something. Didn't want to break things.
-
-2001-08-15 Jakub Steiner <jimmac@ximian.com>
-
- * save-16.png, save-as-16.png: fix bottom. Tuomas didn't like too
- much detail.
-
-2001-08-15 Tuomas Kuosmanen <tigert@ximian.com>
-
- * goto-24.png: Icon for "Goto date.." -button. Someone could add
- this into the code?
-
-2001-08-14 Tuomas Kuosmanen <tigert@ximian.com>
-
- * arrow-[left,right]-24.png: new arrow icons for calendar
- toolbar..
-
-2001-08-14 Jakub Steiner <jimmac@ximian.com>
-
- * evolution-today-mini.png: new summary tree view icon.
-
-2001-08-10 Rodrigo Moya <rodrigo@ximian.com>
-
- * 16_category_*: removed these files, which are now in gal
-
-2001-08-09 Tuomas Kuosmanen <tigert@ximian.com>
-
- * send-receive.xpm: Updated this to have the yellow/green arrows
- so it matches the style of other icons. Noticed that tasklist
- scales 16x16 icons larger, so they generally look Bad(tm). (fixes
- #6475)
-
-2001-08-07 Damon Chaplin <damon@ximian.com>
-
- * timezone-16.xpm: copied from the international category icon.
- It would be better to have 2 different icons for these, but I had
- to get rid of that square timezone icon!
-
-2001-08-07 Jakub Steiner <jimmac@ximian.com>
-
- * evolution-trash-mini.png: scaled down Tuomas' trash icon.
- tweaked a bit. looks a lot better than the previous one.
-
-2001-08-07 Jakub Steiner <jimmac@ximian.com>
-
- * inbox-*, outbox-*: tree view icons * filters.xpm, edit-16.xpm,
- marlboro_filters.xpm: remove unused * vfolder-16.xpm,
- delete-message.xpm, undelete-message.xpm: let's not use xpms *
- evolution-trash-mini.png: new version for edit>delete message,
- tree view and everything * undelete_message-16.png,
- folder-move-16.png, open-in-new-window-16.png, folder-copy-16.png:
- tree view icons * faq-16.png, mark-as-important-16.png: menu icons
- * Makefile.am (images_DATA): add new icons, change some xpms to
- pngs
-
-
-2001-08-03 Jakub Steiner <jimmac@ximian.com>
-
- * ldap-16.png, imap-16.png, local-16.png: tree view icons for
- imap, ldap and local folders.
-
-2001-08-02 Jakub Steiner <jimmac@ximian.com>
-
- * myevo-mail-summary.png, myevo-post-it.png, *
- myevo-appointments.png: icons for My Evolution -- mail summary,
- tasks, appointments. These are _NOT_TO_ replace the shortcut
- icons, but solely for My Evolution.
-
-2001-08-02 Tuomas Kuosmanen <tigert@ximian.com>
-
- * receive-24.png: Icon for the send/receive dialog at least.
-
-2001-07-31 Jakub Steiner <jimmac@ximian.com>
-
- * splash.png: beta2 splash
-
-2001-07-31 Tuomas Kuosmanen <tigert@ximian.com>
-
- * send-24-receive.png: New version, looks more consistent with the
- other icons.
-
-2001-07-30 Jakub Steiner <jimmac@ximian.com>
-
- * search-16.png, search-and-replace-16.png: menu versions for
- shell and editor. * properties-16.png: properties for shel
- (maybe other places too) * send-16.png, send-later-16.png:
- editor, shell menu. * work_online-16.png: to accompany work
- online menu toggle. * save-16.png, save-as-16.png:
- everywhere. (based on Tuomas new gnome stock panel icon)
-
-2001-07-27 <tigert@ximian.com>
-
- * new_appointment.[xpm,png]: New version, fixes bug #4704
- hopefully.
-
-2001-07-25 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (images_DATA): added print-preview-24.png.
-
-2001-07-25 Jakub Steiner <jimmac@ximian.com>
-
- * print-preview-24.png: toolbar icon for calendar's appointment
- dialog (now using the menu version)
-
-2001-07-20 JP Rosevear <jpr@ximian.com>
-
- * Pull in new splash screen
-
-2001-07-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: install 2 new category icons
- (16_category_suppliers.png and 16_category_time-and-expenses.png)
-
-2001-07-20 <tigert@ximian.com>
-
- * 16_category_time-and-expenses.png: Icon for "Time & Expenses"
- category..
-
- * 16_category_suppliers.png: Icon for "Suppliers" category..
-
- * evolution-calendar.png, evolution-contacts.png,
- evolution-inbox.png, evolution-tasks.png, evolution-today.png:
- Took out the colored background circles from the icons, apparently
- people found them confusing rather than useful, especially on
- small icons -mode of the shortcutbar.
-
-2001-07-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: install the 2 new category icons
-
-2001-07-19 <tigert@ximian.com>
-
- * 16_category_strategies.png, 16_category_status.png: New category
- icons.
-
-2001-07-19 Jakub Steiner <jimmac@ximian.com>
-
- * insert-link-24.png, insert-table-24.png, insert-image-24.png:
- toolbar icons for message editor.
-
-2001-07-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: install category icons
-
-2001-07-17 Tuomas Kuosmanen <tigert@ximian.com>
-
- * 16_category_holiday-cards.png 16_category_hot-contacts.png
- 16_category_ideas.png: new category icons..
-
-2001-07-16 Tuomas Kuosmanen <tigert@ximian.com>
-
- * 16_category_favorites.png 16_category_gifts.png
- 16_category_goals.png: New additions for the category stuff..
- still more to do..
-
-2001-07-13 Tuomas Kuosmanen <tigert@ximian.com>
-
- * 16_category_*.png: Some category icons for calendar/tasks, to
- match the different category types for events. Still many to do,
- but I wanted to commit them so you people can start hacking on the
- code already. More to follow shortly.
-
- * 16_customize.png: Icon for "Customize toolbars" or whatever menu
- item that deals with customizing stuff (the icon is a wrench)
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: extra dist another xpm
-
-2001-07-12 <tigert@ximian.com>
-
- * delete_message.[png,xpm]: New versions for the trashcan icon. I
- am wondering if we should do some filename cleanup here, all menu
- icons should really be 16_foo.png, whereas the toolbar ones should
- be foo.png. Currently we are mixing PNG and XPM here with some
- files having otherwise same names (like this one)..
-
-2001-07-11 <tigert@ximian.com>
-
- * new_appointment.[png,xpm]: New versions
-
-2001-07-10 Tuomas Kuosmanen <tigert@ximian.com>
-
- * new_appointment.png: New appointment icon. *
- new_appointment.xpm: Small version.. (should we change this to
- 16_new_appointment.png btw?
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Install the myweather-* icons.
-
-2001-07-07 <tigert@ximian.com>
-
- * 16_[cut,copy,paste].png: New icons for the
- Edit->[Cut,Copy,Paste] entries, the current gnome-stock ones start
- to look bad when scaled down, so these are already 16x16 pixels.
-
-2001-07-05 Jakub Steiner <jimmac@ximian.com>
-
- * myweather-*: weather status icons for My Evolution
-
-2001-07-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * Makefile.am: install apply-filters-16.xpm
-
-2001-07-03 Tuomas Kuosmanen <tigert@ximian.com>
-
- * cut.png, copy.png, paste.png: icons for cut/copy/paste to fit
- the general style.
-
-2001-07-01 Jakub Steiner <jimmac@ximian.com>
-
- * print.xpm, print-preview.xpm: nat didn't like the jaggy
- version. This one is based on tuomas 48x48 print icon.
-
-2001-06-30 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (buttons_DATA): Add `print.png', `next-message.png',
- `previous-message.png'.
-
-2001-06-29 Jakub Steiner <jimmac@ximian.com>
-
- * remove-nntp-folder-24.png, add-nntp-folder-24.png,
- refresh-nntp-folders-24.png: manage subscriptions toolbar icons
-
-2001-06-29 Tuomas Kuosmanen <tigert@ximian.com>
-
- * print.png: Icon for print message.
-
- * next-message.png, previous-message.png: New icons to replace the
- < > arrows in the mailer.
-
-2001-06-29 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (images_DATA): add contact-is-a-list.png
-
-2001-06-29 Tuomas Kuosmanen <tigert@ximian.com>
-
- * contact-is-a-list.png: icon for toshok, for contact lists.
-
-2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Install the add-attachment.png icon.
-
-2001-06-27 Tuomas Kuosmanen <tigert@ximian.com>
-
- * evolution-calendar-mini.png: New version of the folder tree's
- calendar icon. Doesnt look too much like the contacts icon.
-
-2001-06-19 Damon Chaplin <damon@ximian.com>
-
- * world_map-960.png: world map picture used for selecting
- timezones. * Makefile.am (images_DATA): added world_map-960.png
- for timezones.
-
-2001-06-14 Jakub Steiner <jimmac@ximian.com>
-
- * apply-filters-16.xpm: for mailer menu. * vfolder-16.xpm:
- vfolder icon for menu items * hand-16.xpm: originally ment for
- customize toolbars. might not work * edit-16.xpm: edit message
- (message open)
-
-2001-06-13 Jakub Steiner <jimmac@ximian.com>
-
- * rdf.png, ico-rdf.png: ximianize those
-
-2001-06-13 Jakub Steiner <jimmac@ximian.com>
-
- * splash-1-0.png: Initial mockup for the final splash. Didn't
- wan't to overwrite the unstable splash.png.
-
-2001-06-07 Iain Holmes <iain@ximian.com>
-
- * empty.gif: es-weather.png es-appointments.png ico-calendar.png
- ico-mail.png ico-rdf.png ico-weather.png bcg.png rdf.png
- pattern.png: Added all these for the new My Evolution
-
-2001-06-04 Jakub Steiner <jimmac@ximian.com>
-
- * timezone-16.xpm: for events in a diffrent timezone
-
-2001-05-22 Jakub Steiner <jimmac@ximian.com>
-
- * evolution-inbox-mini.png: fixed the shadow
-
-2001-05-17 Dan Winship <danw@ximian.com>
-
- * Makefile.am (images_DATA): Install Jakub's new icons
-
-2001-05-16 Jakub Steiner <jimmac@ximian.com>
-
- * mail-config-druid-48.png, mail-config-druid-identity.png,
- mail-config-druid-account-name.png,
- mail-config-druid-receive.png, mail-config-druid-send.png,
- thankyou.png: config druid icons
-
- thankyou.png can be used for the last step in every evo
- druid (like the import one)
-
-2001-05-16 Jakub Steiner <jimmac@ximian.com>
-
- * evolution-calendar.png, evolution-contacts.png,
- evolution-inbox.png, evolution-today.png, evolution-tasks.png:
- fixed bug #2862. Also changed the envelope icon Oh and we use
- #b39169 for calendar now
-
-2001-05-16 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (images_DATA): Added `online.png' and `offline.png'.
-
- * online.png: New icon by Tuomas. * offline.png: New icon by
- Tuomas.
-
-2001-05-14 Duncan Mak <duncan@ximian.com>
-
- * Makefile.am (images_DATA): add in the new find_message.xpm
-
-2001-05-14 Jakub Steiner <jimmac@ximian.com>
-
- * find_message.xpm: Duncan requested this
-
diff --git a/art/Makefile.am b/art/Makefile.am
deleted file mode 100644
index d0bd7995dc..0000000000
--- a/art/Makefile.am
+++ /dev/null
@@ -1,213 +0,0 @@
-imagesdir = $(datadir)/images/evolution
-images_DATA = \
- 16_copy.png \
- 16_customize.png \
- 16_cut.png \
- 16_paste.png \
- apply-filters-16.xpm \
- bcg.png \
- configure_16_addressbook.xpm \
- configure_16_calendar.xpm \
- configure_16_folder.xpm \
- configure_16_mail.xpm \
- contact-is-a-list.png \
- copy_16_message.xpm \
- edit.xpm \
- empty.gif \
- encrypt.xpm \
- es-appointments.png \
- es-weather.png \
- folder.xpm \
- forward.xpm \
- goto-16.png \
- ico-calendar.png \
- ico-mail.png \
- ico-rdf.png \
- ico-weather.png \
- import.png \
- import.xpm \
- inbox-16.png \
- inbox-full-16.png \
- meeting-request.png \
- move_message.xpm \
- offline.png \
- online.png \
- open-in-new-window-16.png \
- outbox-16.png \
- outbox-full-16.png \
- pattern.png \
- pgp-signature-bad.png \
- pgp-signature-nokey.png \
- pgp-signature-ok.png \
- print.xpm \
- print-preview.xpm \
- rdf.png \
- reply.xpm \
- reply_to_all.xpm \
- save.xpm \
- all_contacts.xpm \
- find_contact.xpm \
- find_message.xpm \
- briefcase.png \
- butterfly.png \
- cellphone.png \
- compose-message.png \
- 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 \
- faq-16.png \
- fetch-mail.png \
- folder-copy-16.png \
- folder-move-16.png \
- globe.png \
- hide_deleted_messages.xpm \
- hide_read_messages.xpm \
- hide_selected_messages.xpm \
- house.png \
- ldap-16.png \
- malehead.png \
- mail-config-druid.png \
- mail-config-druid-identity.png \
- mail-config-druid-receive.png \
- mail-config-druid-send.png \
- mail-config-druid-account-name.png \
- mark-as-important-16.png \
- myevo-appointments.png \
- myevo-mail-summary.png \
- myevo-post-it.png \
- myweather-rain.png \
- myweather-snow.png \
- myweather-storm.png \
- myweather-fog.png \
- myweather-sun.png \
- myweather-suncloud.png \
- myweather-clouds.png \
- new_appointment.xpm \
- new_contact.xpm \
- new-message.xpm \
- new_task-16.png \
- save-16.png \
- save-as-16.png \
- search-16.png \
- search-and-replace-16.png \
- send-16.png \
- send-later-16.png \
- 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 \
- talking-heads.png \
- task.xpm \
- task.png \
- thankyou.png \
- timezone-16.xpm \
- timezone-48.png \
- undelete_message-16.png \
- wax-seal.png \
- wax-seal-broken.png \
- work_offline.xpm \
- work_online-16.png \
- world_map-960.png
-
-buttonsdir = $(datadir)/images/evolution/buttons
-buttons_DATA = \
- arrow-right-24.png \
- arrow-left-24.png \
- add-attachment.png \
- add-service.png \
- compose-message.png \
- copy-message.png \
- copy.png \
- cut.png \
- dayview.xpm \
- delete-message.png \
- fetch-mail.png \
- forward.png \
- goto-24.png \
- monthview.xpm \
- move-message.png \
- next-message.png \
- new_appointment.png \
- new_task.png \
- paste.png \
- previous-message.png \
- print.png \
- print-preview-24.png \
- reply.png \
- reply-to-all.png \
- receive-24.png \
- save-24.png \
- send-24-receive.png \
- send-24.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 \
- timezone-16.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 adbec9900b..0000000000
--- a/art/add-attachment.png
+++ /dev/null
Binary files differ
diff --git a/art/add-nntp-folder-24.png b/art/add-nntp-folder-24.png
deleted file mode 100644
index 4941fe9250..0000000000
--- a/art/add-nntp-folder-24.png
+++ /dev/null
Binary files differ
diff --git a/art/add-service.png b/art/add-service.png
deleted file mode 100644
index eb20f4e068..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 817bff7649..0000000000
--- a/art/all_contacts.xpm
+++ /dev/null
@@ -1,158 +0,0 @@
-/* XPM */
-static char * all_contacts_xpm[] = {
-"24 24 131 2",
-" c None",
-". c #000000",
-"+ c #FDFDFD",
-"@ c #F5F5F5",
-"# c #F6F6F6",
-"$ c #D0D0D0",
-"% c #C1C1C1",
-"& c #C3C3C3",
-"* c #C6C6C6",
-"= c #C8C8C8",
-"- c #8D8D8D",
-"; c #CACACA",
-"> c #919191",
-", c #EFEFEF",
-"' c #878787",
-") c #8A8A8A",
-"! c #5C5C5C",
-"~ c #F8F8F8",
-"{ c #EAEAEA",
-"] c #CCCCCC",
-"^ c #CECECE",
-"/ c #979797",
-"( c #D2D2D2",
-"_ c #9A9A9A",
-": c #646464",
-"< c #939393",
-"[ c #9D9D9D",
-"} c #6B6B6B",
-"| c #BDBDBD",
-"1 c #FFFFFF",
-"2 c #A1A1A1",
-"3 c #D9D9D9",
-"4 c #E3E3E3",
-"5 c #EDEDED",
-"6 c #EEEEEE",
-"7 c #C9B49B",
-"8 c #8E7151",
-"9 c #876E51",
-"0 c #BAB1A5",
-"a c #FBFBFB",
-"b c #FEFEFE",
-"c c #DEDCD7",
-"d c #9E9E9E",
-"e c #BABABA",
-"f c #D1D1D1",
-"g c #A3A3A3",
-"h c #F3F3F3",
-"i c #A88D6E",
-"j c #DFD0BF",
-"k c #5E432B",
-"l c #7E6C5B",
-"m c #313131",
-"n c #575757",
-"o c #FCFCFC",
-"p c #555555",
-"q c #D5D3CF",
-"r c #868686",
-"s c #A6A6A6",
-"t c #CDCDCD",
-"u c #DBDBDB",
-"v c #EEDFCC",
-"w c #F4EEE6",
-"x c #765E45",
-"y c #736251",
-"z c #D9D7D2",
-"A c #606060",
-"B c #7D7D7D",
-"C c #9C9C9C",
-"D c #A5A5A5",
-"E c #7C7C7C",
-"F c #FAFAFA",
-"G c #7590AE",
-"H c #C1665A",
-"I c #445B71",
-"J c #D7D6D3",
-"K c #ADADAD",
-"L c #9B9B9B",
-"M c #B6B6B6",
-"N c #E6E6E6",
-"O c #F1F1F1",
-"P c #A8A8A8",
-"Q c #4B6983",
-"R c #9DB8D2",
-"S c #486481",
-"T c #314E6C",
-"U c #667A8D",
-"V c #D4D3CE",
-"W c #787878",
-"X c #D3D3D3",
-"Y c #E1E1E1",
-"Z c #ABABAB",
-"` c #5F7C96",
-" . c #5D7A95",
-".. c #4D6B87",
-"+. c #3B556D",
-"@. c #344A60",
-"#. c #999999",
-"$. c #C7C7C7",
-"%. c #DDDBD6",
-"&. c #DADADA",
-"*. c #E2E2E2",
-"=. c #898989",
-"-. c #A9A9A9",
-";. c #B0B0B0",
-">. c #5D5D5D",
-",. c #CBC9C2",
-"'. c #BBBBBB",
-"). c #ECECEC",
-"!. c #EAE8E3",
-"~. c #DAD8D3",
-"{. c #D3D2CD",
-"]. c #CECCC8",
-"^. c #CCCAC6",
-"/. c #D1CFCA",
-"(. c #D2D0CB",
-"_. c #C8C5BF",
-":. c #737169",
-"<. c #8F8F8F",
-"[. c #B3B3B3",
-"}. c #DCDCDC",
-"|. c #E8E8E8",
-"1. c #B5B5B5",
-"2. c #565656",
-"3. c #A0A0A0",
-"4. c #C2C2C2",
-"5. c #848484",
-"6. c #838383",
-"7. c #7B7B7B",
-"8. c #8B8B8B",
-"9. c #B2B2B2",
-"0. c #B8B8B8",
-" ",
-" ",
-" . . . . . . . . . . . . . . . . . . . . ",
-" . + @ @ @ @ @ @ @ # # # # # # # # # $ . ",
-" . @ % % % & & & & * * * * * = = = = - . ",
-" . # & & & * * * * = = = = = ; ; ; ; > . ",
-" . , ' ' ' ) ) ) ) - - - - - > > > > ! . ",
-" . ~ { { { { { { { { { { { { { { { { ; . ",
-" . # ; ; ; ] ] ] ] ] ^ ^ ^ ^ $ $ $ $ / . ",
-" . # ] ] ] ^ ^ ^ ^ ^ $ & ^ $ ( ( ( ( _ . ",
-" . . . . . . . . . . . . . . : < / [ [ [ [ } . ",
-". | 1 1 1 1 1 1 1 1 1 1 1 1 2 . 3 4 5 6 6 6 * . ",
-". 1 ~ 7 8 9 0 1 + 1 a 1 1 b c . d e f 3 3 3 g . ",
-". 1 h i j k l 1 m n o p + 1 q . r s t u u u g . ",
-". 1 h v w x y 1 1 1 1 1 1 1 z . A B C D D D E . ",
-". 1 F G H I J 1 K 1 L K 1 1 q . ) M N O O , P . ",
-". 1 Q R S T U 1 1 1 1 1 1 1 V . W D X Y Y Y Z . ",
-". 1 ` ...+.@.1 #.L 5 $.1 1 %.. E K &.*.*.*.K . ",
-". 1 1 1 1 1 1 1 1 1 1 1 1 1 c . A =.-.;.;.;.[ . ",
-". 1 1 >.1 >.1 W 1 L 1 * o F ,.. =.'.).@ @ @ $ . ",
-". g !.!.!.~.~.~.{.].^./.(._.:.. <.[.}.N |.|.1.. ",
-" . . . . . . . . . . . . . . 2.3.% Y N |.|.1.. ",
-" . 4.< - =.' 5.) r 6.7.E 8.2 9.1.0.0.e . ",
-" . . . . . . . . . . . . . . . . . . . . "};
diff --git a/art/apply-filters-16.xpm b/art/apply-filters-16.xpm
deleted file mode 100644
index 28410fe30b..0000000000
--- a/art/apply-filters-16.xpm
+++ /dev/null
@@ -1,48 +0,0 @@
-/* XPM */
-static char * apply_filers_16_xpm[] = {
-"16 16 29 1",
-" c None",
-". c #161616",
-"+ c #EDEAE8",
-"@ c #CDC1BA",
-"# c #6A4E3D",
-"$ c #C6B8AF",
-"% c #333333",
-"& c #F3F1EE",
-"* c #5E4537",
-"= c #D6CCC5",
-"- c #916C56",
-"; c #5A4235",
-"> c #BBA9A0",
-", c #C3B3AC",
-"' c #CEC1BB",
-") c #BBAAA0",
-"! c #A1897A",
-"~ c #664B3B",
-"{ c #383838",
-"] c #856B60",
-"^ c #C2B3A9",
-"/ c #E9E3E0",
-"( c #EEE9E7",
-"_ c #7B5A46",
-": c #F5F4F2",
-"< c #B8A69B",
-"[ c #AE998D",
-"} c #553E32",
-"| c #725442",
-" ",
-" .+. ",
-" .@. .# ",
-" .$. %&* ",
-" .$.......=-; ",
-" .$>$$$$$,'--. ",
-" .$.......)-* ",
-" .$. .!* ",
-" .$. .~ ",
-" .$. {] ",
-" .^. ./~ ",
-" .(.......,-# ",
-" _$:,$$$$$<--. ",
-" ~.......[-} ",
-" .!# ",
-" .| "};
diff --git a/art/arrow-left-24.png b/art/arrow-left-24.png
deleted file mode 100644
index a977b3fb1a..0000000000
--- a/art/arrow-left-24.png
+++ /dev/null
Binary files differ
diff --git a/art/arrow-right-24.png b/art/arrow-right-24.png
deleted file mode 100644
index 393b0dca3e..0000000000
--- a/art/arrow-right-24.png
+++ /dev/null
Binary files differ
diff --git a/art/attachment.xpm b/art/attachment.xpm
deleted file mode 100644
index 21f2ecdb0e..0000000000
--- a/art/attachment.xpm
+++ /dev/null
@@ -1,22 +0,0 @@
-/* XPM */
-static char * attachment_xpm[] = {
-"16 16 3 1",
-" c None",
-". c #FFFFFF",
-"+ c #000000",
-" ",
-" ... ",
-" .+++. . ",
-" .+...+.+. ",
-" .+.+.+.+. ",
-" .+.+.+.+. ",
-" .+.+.+.+. ",
-" .+.+.+.+. ",
-" .+.+.+.+. ",
-" .+.+.+.+. ",
-" .+.+.+.+. ",
-" .+..+..+. ",
-" .+.....+. ",
-" .+...+. ",
-" .+++. ",
-" ... "};
diff --git a/art/bcg.png b/art/bcg.png
deleted file mode 100644
index ec03f8ab6e..0000000000
--- a/art/bcg.png
+++ /dev/null
Binary files differ
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 0be2101b6f..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/contact-is-a-list.png b/art/contact-is-a-list.png
deleted file mode 100644
index 3a7bc1c143..0000000000
--- a/art/contact-is-a-list.png
+++ /dev/null
Binary files differ
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.png b/art/copy.png
deleted file mode 100644
index 23a6db32e3..0000000000
--- a/art/copy.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/cut.png b/art/cut.png
deleted file mode 100644
index 7ffb512043..0000000000
--- a/art/cut.png
+++ /dev/null
Binary files differ
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.png b/art/delete-message.png
deleted file mode 100644
index 1bec6baac7..0000000000
--- a/art/delete-message.png
+++ /dev/null
Binary files differ
diff --git a/art/drafts-16.png b/art/drafts-16.png
deleted file mode 100644
index 285646f60b..0000000000
--- a/art/drafts-16.png
+++ /dev/null
Binary files differ
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.gif b/art/empty.gif
deleted file mode 100644
index 0be4006193..0000000000
--- a/art/empty.gif
+++ /dev/null
Binary files differ
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/es-appointments.png b/art/es-appointments.png
deleted file mode 100644
index e194232051..0000000000
--- a/art/es-appointments.png
+++ /dev/null
Binary files differ
diff --git a/art/es-weather.png b/art/es-weather.png
deleted file mode 100644
index 3d31469e78..0000000000
--- a/art/es-weather.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 cddb0396dc..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 76afca6b6f..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 0d2cfb7e5f..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 66a4ba89cd..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 a3771c23eb..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 6039b15e82..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 010bcb8cc7..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 56a8daa51f..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/faq-16.png b/art/faq-16.png
deleted file mode 100644
index fcf71658da..0000000000
--- a/art/faq-16.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/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/find_message.xpm b/art/find_message.xpm
deleted file mode 100644
index 04465b4ff8..0000000000
--- a/art/find_message.xpm
+++ /dev/null
@@ -1,130 +0,0 @@
-/* XPM */
-static char * find_message_xpm[] = {
-"24 24 103 2",
-" c None",
-". c #000000",
-"+ c #E9E9E9",
-"@ c #E2E2E2",
-"# c #D7D7D7",
-"$ c #FDFDFD",
-"% c #FCFCFC",
-"& c #FBFBFB",
-"* c #D8D8D8",
-"= c #FEFEFE",
-"- c #E4E4E4",
-"; c #BABABA",
-"> c #E0E0E0",
-", c #FAFAFA",
-"' c #F9F9F9",
-") c #EAEAEA",
-"! c #F8F8F8",
-"~ c #CECECE",
-"{ c #BDBDBD",
-"] c #E6E6E6",
-"^ c #E7E7E7",
-"/ c #FFFFFF",
-"( c #C2C2C2",
-"_ c #E5E5E5",
-": c #47473F",
-"< c #0A0A09",
-"[ c #4B4B43",
-"} c #8E8E8E",
-"| c #AFAFAF",
-"1 c #34342E",
-"2 c #9D9D8D",
-"3 c #CFCFB9",
-"4 c #C4C4AF",
-"5 c #8D8D7F",
-"6 c #353530",
-"7 c #848484",
-"8 c #BFBFBF",
-"9 c #F7F7F7",
-"0 c #F5F5F5",
-"a c #46463F",
-"b c #9C9C8C",
-"c c #E2E2D0",
-"d c #EDEDE7",
-"e c #C0C0AC",
-"f c #B2B29F",
-"g c #828274",
-"h c #45453D",
-"i c #A7A7A7",
-"j c #D2D2D2",
-"k c #D5D5D5",
-"l c #090908",
-"m c #D5D5BF",
-"n c #FBFBFA",
-"o c #C3C3AE",
-"p c #B5B5A2",
-"q c #A6A695",
-"r c #959586",
-"s c #080807",
-"t c #979797",
-"u c #F4F4F4",
-"v c #090909",
-"w c #CACAB5",
-"x c #DDDDD0",
-"y c #B7B7A4",
-"z c #AAAA98",
-"A c #9B9B8B",
-"B c #8C8C7D",
-"C c #929292",
-"D c #CBCBCB",
-"E c #D3D3D3",
-"F c #474740",
-"G c #929283",
-"H c #BABAA7",
-"I c #ADAD9B",
-"J c #9F9F8E",
-"K c #909081",
-"L c #727266",
-"M c #4C4C45",
-"N c #A6A6A6",
-"O c #DFDFDF",
-"P c #34342F",
-"Q c #878779",
-"R c #A0A090",
-"S c #737367",
-"T c #010101",
-"U c #919191",
-"V c #C1C1C1",
-"W c #D1D1D1",
-"X c #414141",
-"Y c #4B4B4B",
-"Z c #131313",
-"` c #646464",
-" . c #8B8B8B",
-".. c #AEAEAE",
-"+. c #5E5E5E",
-"@. c #6E6E6E",
-"#. c #575757",
-"$. c #595959",
-"%. c #585858",
-"&. c #C4C4C4",
-"*. c #DDDDDD",
-"=. c #797979",
-"-. c #2F2F2F",
-" ",
-" ",
-" . . ",
-" . . + @ . ",
-" . . # $ % & . ",
-" . . * = = = = & - . ",
-" . ; = = = = > > , ' . . . ",
-" . ) = = > > = = = ! . . + @ . ",
-" . $ = = = = ~ . . # $ % & . ",
-" . % & = { . . * = = = = & - . ",
-" . . . , ] . * ^ ^ ^ = > > , ' . ",
-" . / = . ( _ : < < [ } | ^ = = ! - . ",
-" . # = = . 1 2 3 4 5 6 7 8 > > 9 0 . ",
-" . $ = a b c d e f g h i j = = 0 - . ",
-" . k & l m n o p q r s t j > > 0 u . ",
-" . , v w x y z A B < C D = = = = - . ",
-" . E F G H I J K L M N j = = = O O . ",
-" . ! P Q R G S T T U V ^ O O . . ",
-" . W = [ < < X Y Z ` .... . ",
-" . = = > O +.@.#.T $.%. ",
-" . &.*.. . =.. T -. ",
-" . . T T T ",
-" T T ",
-" "};
diff --git a/art/folder-copy-16.png b/art/folder-copy-16.png
deleted file mode 100644
index 5c0a3c9dbd..0000000000
--- a/art/folder-copy-16.png
+++ /dev/null
Binary files differ
diff --git a/art/folder-move-16.png b/art/folder-move-16.png
deleted file mode 100644
index 4a94499f1c..0000000000
--- a/art/folder-move-16.png
+++ /dev/null
Binary files differ
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 bbce8ad3c7..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/goto-16.png b/art/goto-16.png
deleted file mode 100644
index 800db10e41..0000000000
--- a/art/goto-16.png
+++ /dev/null
Binary files differ
diff --git a/art/goto-24.png b/art/goto-24.png
deleted file mode 100644
index b6fc82fd73..0000000000
--- a/art/goto-24.png
+++ /dev/null
Binary files differ
diff --git a/art/hand-16.xpm b/art/hand-16.xpm
deleted file mode 100644
index d925e2d968..0000000000
--- a/art/hand-16.xpm
+++ /dev/null
@@ -1,115 +0,0 @@
-/* XPM */
-static char * hand_16_xpm[] = {
-"16 16 96 2",
-" c None",
-". c #010100",
-"+ c #010000",
-"@ c #090600",
-"# c #030000",
-"$ c #E8E6E1",
-"% c #A3A09C",
-"& c #080000",
-"* c #D6D2CD",
-"= c #8F8A84",
-"- c #FFFAF7",
-"; c #98938D",
-"> c #F1EDE9",
-", c #88827E",
-"' c #181510",
-") c #F8EEE4",
-"! c #F8ECE0",
-"~ c #F8ECDE",
-"{ c #0D0600",
-"] c #F8EBDE",
-"^ c #F6E7D7",
-"/ c #D5C5B6",
-"( c #070000",
-"_ c #F6E5D3",
-": c #F7E9D9",
-"< c #050200",
-"[ c #080300",
-"} c #312722",
-"| c #EFE7E0",
-"1 c #F6F2EF",
-"2 c #F6F1EE",
-"3 c #EDE4DB",
-"4 c #F1E4D6",
-"5 c #9D9790",
-"6 c #12110D",
-"7 c #958E88",
-"8 c #DDCFC2",
-"9 c #F6E8D9",
-"0 c #F6F1EC",
-"a c #F5F1EE",
-"b c #E5D7CB",
-"c c #F7E8D8",
-"d c #EEDFD3",
-"e c #CAC0B6",
-"f c #645951",
-"g c #E7D9CA",
-"h c #F6E6D5",
-"i c #F7EBDE",
-"j c #E9DCD2",
-"k c #040000",
-"l c #F7EFE7",
-"m c #EDDECF",
-"n c #D6C8BA",
-"o c #CBB9AC",
-"p c #D2C8BC",
-"q c #F8EEE3",
-"r c #F5EEE8",
-"s c #EFE3D7",
-"t c #B8A99D",
-"u c #060100",
-"v c #D7CFC7",
-"w c #F9F2E9",
-"x c #F3E3D4",
-"y c #F1DFCF",
-"z c #E6D7C7",
-"A c #F8F2ED",
-"B c #EDE1D4",
-"C c #0A0300",
-"D c #D7CFC9",
-"E c #FAF2EC",
-"F c #F1E0D1",
-"G c #F6EEE8",
-"H c #000000",
-"I c #171111",
-"J c #A79D9D",
-"K c #C8BDBC",
-"L c #A59D9A",
-"M c #ABA8A3",
-"N c #BFB7B5",
-"O c #060000",
-"P c #0E0403",
-"Q c #0A0000",
-"R c #0A0200",
-"S c #080401",
-"T c #FCF4F2",
-"U c #F9F1EF",
-"V c #F8F0EE",
-"W c #F2EDEA",
-"X c #DDD9D6",
-"Y c #E5E4E0",
-"Z c #030400",
-"` c #0B0505",
-" . c #050000",
-".. c #14100F",
-"+. c #090806",
-"@. c #000100",
-" . + ",
-" @ # $ % + + ",
-" & * = - ; > , ' ",
-" & ) ; ! ; ~ ; { ",
-" & ] ; ^ ; ] ; / ( ",
-" & _ ; _ ; : ; / ( ",
-" < [ } | 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 p q r s t ( ",
-" u v w x y z A B _ t ( ",
-" C D E _ F G _ / H ",
-" I J K _ _ L M & ",
-" N O P Q R k S ",
-" k T U V W X Y Z ",
-" k ` ...# +.H @. "};
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/ico-calendar.png b/art/ico-calendar.png
deleted file mode 100644
index 3010528d7f..0000000000
--- a/art/ico-calendar.png
+++ /dev/null
Binary files differ
diff --git a/art/ico-mail.png b/art/ico-mail.png
deleted file mode 100644
index 66a4ba89cd..0000000000
--- a/art/ico-mail.png
+++ /dev/null
Binary files differ
diff --git a/art/ico-rdf.png b/art/ico-rdf.png
deleted file mode 100644
index 0e39037b95..0000000000
--- a/art/ico-rdf.png
+++ /dev/null
Binary files differ
diff --git a/art/ico-weather.png b/art/ico-weather.png
deleted file mode 100644
index 25eb161f8c..0000000000
--- a/art/ico-weather.png
+++ /dev/null
Binary files differ
diff --git a/art/imap-16.png b/art/imap-16.png
deleted file mode 100644
index 1e2932a728..0000000000
--- a/art/imap-16.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/inbox-16.png b/art/inbox-16.png
deleted file mode 100644
index 88071fa91e..0000000000
--- a/art/inbox-16.png
+++ /dev/null
Binary files differ
diff --git a/art/inbox-full-16.png b/art/inbox-full-16.png
deleted file mode 100644
index 289335eaa2..0000000000
--- a/art/inbox-full-16.png
+++ /dev/null
Binary files differ
diff --git a/art/insert-image-24.png b/art/insert-image-24.png
deleted file mode 100644
index 4b2fd4ffae..0000000000
--- a/art/insert-image-24.png
+++ /dev/null
Binary files differ
diff --git a/art/insert-link-24.png b/art/insert-link-24.png
deleted file mode 100644
index 9824bc8ae6..0000000000
--- a/art/insert-link-24.png
+++ /dev/null
Binary files differ
diff --git a/art/insert-table-24.png b/art/insert-table-24.png
deleted file mode 100644
index 21344caea6..0000000000
--- a/art/insert-table-24.png
+++ /dev/null
Binary files differ
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/ldap-16.png b/art/ldap-16.png
deleted file mode 100644
index 85c4dc0cf7..0000000000
--- a/art/ldap-16.png
+++ /dev/null
Binary files differ
diff --git a/art/local-16.png b/art/local-16.png
deleted file mode 100644
index 1fc929bbf7..0000000000
--- a/art/local-16.png
+++ /dev/null
Binary files differ
diff --git a/art/mail-config-druid-48.png b/art/mail-config-druid-48.png
deleted file mode 100644
index 35b452b4e9..0000000000
--- a/art/mail-config-druid-48.png
+++ /dev/null
Binary files differ
diff --git a/art/mail-config-druid-account-name.png b/art/mail-config-druid-account-name.png
deleted file mode 100644
index 2cad5eb941..0000000000
--- a/art/mail-config-druid-account-name.png
+++ /dev/null
Binary files differ
diff --git a/art/mail-config-druid-identity.png b/art/mail-config-druid-identity.png
deleted file mode 100644
index f895a1e168..0000000000
--- a/art/mail-config-druid-identity.png
+++ /dev/null
Binary files differ
diff --git a/art/mail-config-druid-receive.png b/art/mail-config-druid-receive.png
deleted file mode 100644
index df75812db3..0000000000
--- a/art/mail-config-druid-receive.png
+++ /dev/null
Binary files differ
diff --git a/art/mail-config-druid-send.png b/art/mail-config-druid-send.png
deleted file mode 100644
index 1bf501ddb2..0000000000
--- a/art/mail-config-druid-send.png
+++ /dev/null
Binary files differ
diff --git a/art/mail-config-druid.png b/art/mail-config-druid.png
deleted file mode 100644
index 35b452b4e9..0000000000
--- a/art/mail-config-druid.png
+++ /dev/null
Binary files differ
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-as-important-16.png b/art/mark-as-important-16.png
deleted file mode 100644
index 393d86e77c..0000000000
--- a/art/mark-as-important-16.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/meeting-request.png b/art/meeting-request.png
deleted file mode 100644
index 0fba577bfe..0000000000
--- a/art/meeting-request.png
+++ /dev/null
Binary files differ
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/myevo-appointments.png b/art/myevo-appointments.png
deleted file mode 100644
index 873528a964..0000000000
--- a/art/myevo-appointments.png
+++ /dev/null
Binary files differ
diff --git a/art/myevo-mail-summary.png b/art/myevo-mail-summary.png
deleted file mode 100644
index 453f9938ac..0000000000
--- a/art/myevo-mail-summary.png
+++ /dev/null
Binary files differ
diff --git a/art/myevo-post-it.png b/art/myevo-post-it.png
deleted file mode 100644
index f0ef421549..0000000000
--- a/art/myevo-post-it.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-clouds.png b/art/myweather-clouds.png
deleted file mode 100644
index fa1fa4b80f..0000000000
--- a/art/myweather-clouds.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-fog.png b/art/myweather-fog.png
deleted file mode 100644
index 60db197df7..0000000000
--- a/art/myweather-fog.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-rain.png b/art/myweather-rain.png
deleted file mode 100644
index 3ce291f788..0000000000
--- a/art/myweather-rain.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-snow.png b/art/myweather-snow.png
deleted file mode 100644
index 8a45248692..0000000000
--- a/art/myweather-snow.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-storm.png b/art/myweather-storm.png
deleted file mode 100644
index cef334a43c..0000000000
--- a/art/myweather-storm.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-sun.png b/art/myweather-sun.png
deleted file mode 100644
index 26349305bf..0000000000
--- a/art/myweather-sun.png
+++ /dev/null
Binary files differ
diff --git a/art/myweather-suncloud.png b/art/myweather-suncloud.png
deleted file mode 100644
index a2058e77b0..0000000000
--- a/art/myweather-suncloud.png
+++ /dev/null
Binary files differ
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 5dc61801da..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 d55eb396e8..0000000000
--- a/art/new_appointment.xpm
+++ /dev/null
@@ -1,126 +0,0 @@
-/* XPM */
-static char * new_appointment_xpm[] = {
-"16 16 107 2",
-" c None",
-". c #000000",
-"+ c #FEFEFE",
-"@ c #FDFDFD",
-"# c #E0E0E0",
-"$ c #C1C1C1",
-"% c #F1F1F1",
-"& c #C3C3C3",
-"* c #FBFBFB",
-"= c #A8A8A8",
-"- c #525252",
-"; c #141414",
-"> c #111111",
-", c #383838",
-"' c #6E6E6E",
-") c #ADADAD",
-"! c #717171",
-"~ c #5D5D5D",
-"{ c #404040",
-"] c #BA8D31",
-"^ c #EAB23D",
-"/ c #403011",
-"( c #E5E5E5",
-"_ c #B4B4B4",
-": c #606060",
-"< c #DADADA",
-"[ c #777777",
-"} c #4B4B49",
-"| c #161616",
-"1 c #EFB63E",
-"2 c #F6D591",
-"3 c #F3B840",
-"4 c #916D26",
-"5 c #F8F8F8",
-"6 c #F3F3F3",
-"7 c #E7E7E7",
-"8 c #B5B5B5",
-"9 c #A1A1A1",
-"0 c #919191",
-"a c #EEB53E",
-"b c #FAE7BC",
-"c c #FCD584",
-"d c #FEC142",
-"e c #FFC243",
-"f c #FFFFFF",
-"g c #CECECE",
-"h c #0B0B0B",
-"i c #B9B9B9",
-"j c #E4E4E4",
-"k c #B88B30",
-"l c #F9E2B2",
-"m c #FDD789",
-"n c #D0D0D0",
-"o c #373737",
-"p c #898989",
-"q c #ABABAB",
-"r c #33332D",
-"s c #CFCFB9",
-"t c #E7AF3C",
-"u c #F9DDA4",
-"v c #FECA5E",
-"w c #D09E36",
-"x c #8B8B8B",
-"y c #F6F6F6",
-"z c #131313",
-"A c #3A2B0F",
-"B c #8F6C25",
-"C c #FDC042",
-"D c #2D220C",
-"E c #6F6F6F",
-"F c #8F8F8F",
-"G c #353535",
-"H c #C3C3AE",
-"I c #DFDFDF",
-"J c #F0F0F0",
-"K c #FCFCFC",
-"L c #363636",
-"M c #AAAAAA",
-"N c #C8C8C8",
-"O c #A9A9A9",
-"P c #E1E1E1",
-"Q c #4A4A4A",
-"R c #FAFAFA",
-"S c #C4C4C4",
-"T c #3C3C36",
-"U c #ADAD9B",
-"V c #CCCCCC",
-"W c #D6D6D6",
-"X c #F4F4F4",
-"Y c #F7F7F7",
-"Z c #BABABA",
-"` c #BFBFBF",
-" . c #C9C9C9",
-".. c #767676",
-"+. c #CBCBCB",
-"@. c #ACACAC",
-"#. c #B3B3B3",
-"$. c #5C5C5C",
-"%. c #C5C5C5",
-"&. c #A0A0A0",
-"*. c #444444",
-"=. c #A7A7A7",
-"-. c #989898",
-";. c #4B4B4B",
-">. c #9C9C9C",
-",. c #A2A2A2",
-"'. c #BBBBBB",
-" . . . . . . . . . ",
-" . + + + + + + @ # $ . ",
-" . + % % % % % % & * = . ",
-" . - ; . > , ' % ) ! ~ { . ",
-" . . ] ^ / ( _ . : < [ } | . ",
-" . . 1 2 3 4 5 6 7 . : 8 9 0 . ",
-" . a b c d e f g h i . 9 j 0 . ",
-". k l m e e e n o p % q r s 0 . ",
-". t u v e e w o x + y < z j 0 . ",
-". A B C e e D E f + F G . H 0 . ",
-". I J K f f n L M @ J N z j 0 . ",
-". O P y + + f n Q R S 9 T U 0 . ",
-" . V W X R K * Y V Z . 9 j 0 . ",
-" . . ` Z ...+.@.#.. $.%.j 0 . ",
-" . . &.@.*.=.-.. ;.>.,.'.&.. ",
-" . . . . . . . . . . . . "};
diff --git a/art/new_contact.xpm b/art/new_contact.xpm
deleted file mode 100644
index 9b7e778102..0000000000
--- a/art/new_contact.xpm
+++ /dev/null
@@ -1,98 +0,0 @@
-/* XPM */
-static char * new_contact_xpm[] = {
-"24 24 71 1",
-" c None",
-". c #000000",
-"+ c #BABABA",
-"@ c #FDFDFD",
-"# c #FCFCFC",
-"$ c #959595",
-"% c #FBFBFB",
-"& c #FAFAFA",
-"* c #F9F9F9",
-"= c #F8F8F8",
-"- c #F7F7F7",
-"; c #E3E3E3",
-"> c #BDBDBD",
-", c #9D9C9A",
-"' c #999896",
-") c #A4A4A3",
-"! c #391414",
-"~ c #B1B1B1",
-"{ c #D4D4D4",
-"] c #E2E2E2",
-"^ c #DCD4C7",
-"/ c #C1B8A6",
-"( c #878682",
-"_ c #BFBFBF",
-": c #7C7C7C",
-"< c #909090",
-"[ c #747474",
-"} c #818181",
-"| c #A8A8A8",
-"1 c #B6B6B6",
-"2 c #F6F6F6",
-"3 c #7F742E",
-"4 c #E1E1E1",
-"5 c #959FA4",
-"6 c #678690",
-"7 c #9A9891",
-"8 c #959490",
-"9 c #F5F5F5",
-"0 c #2B6776",
-"a c #294E70",
-"b c #294770",
-"c c #284D6F",
-"d c #232362",
-"e c #B1B3B4",
-"f c #979797",
-"g c #B0B0B0",
-"h c #AFAFAF",
-"i c #D3D3D3",
-"j c #E0E0E0",
-"k c #27276C",
-"l c #28286D",
-"m c #282A6F",
-"n c #2A5A73",
-"o c #DFDFDF",
-"p c #A2A2A2",
-"q c #B5B5B5",
-"r c #727272",
-"s c #BCBCBC",
-"t c #F4F4F4",
-"u c #DEDEDE",
-"v c #D5D5D5",
-"w c #DDDDDD",
-"x c #BEBEBE",
-"y c #D1D1D1",
-"z c #F3F3F3",
-"A c #DCDCDC",
-"B c #E7E7E7",
-"C c #E6E6E6",
-"D c #E5E5E5",
-"E c #E4E4E4",
-"F c #686868",
-" ",
-" ",
-" ",
-" ",
-" ..................... ",
-" .+@@@@@@@@@@@@@@@@@@#$.",
-" .@%%%%%&&&&*****===--;.",
-" .@%>>,')>&*****==----;.",
-" .@%>>!..,***~={=>----].",
-" .@%>>^/.(**_:<[<}|1-2].",
-" .@%>>^3.'**={=----2224.",
-" .@&>567.8*===----22294.",
-" .@&0abcde==1<f{ghi>99j.",
-" .@&akklmn==----222999o.",
-" .@*****===-pg|qiprs9tu.",
-" .@*vvv=1>----222999ttw.",
-" .@*vxf=p---gi2h$syytzw.",
-" .@*===-----22999tttzzA.",
-" .hBBCDDE;]]]44joouwwAF.",
-" ..................... ",
-" ",
-" ",
-" ",
-" "};
diff --git a/art/new_task-16.png b/art/new_task-16.png
deleted file mode 100644
index 7937d8d53b..0000000000
--- a/art/new_task-16.png
+++ /dev/null
Binary files differ
diff --git a/art/new_task.png b/art/new_task.png
deleted file mode 100644
index 16a1c94b6b..0000000000
--- a/art/new_task.png
+++ /dev/null
Binary files differ
diff --git a/art/next-message.png b/art/next-message.png
deleted file mode 100644
index 80de893ecf..0000000000
--- a/art/next-message.png
+++ /dev/null
Binary files differ
diff --git a/art/offline.png b/art/offline.png
deleted file mode 100644
index 57bdd27be2..0000000000
--- a/art/offline.png
+++ /dev/null
Binary files differ
diff --git a/art/online.png b/art/online.png
deleted file mode 100644
index 9a6a3980c2..0000000000
--- a/art/online.png
+++ /dev/null
Binary files differ
diff --git a/art/open-in-new-window-16.png b/art/open-in-new-window-16.png
deleted file mode 100644
index 07496e8b81..0000000000
--- a/art/open-in-new-window-16.png
+++ /dev/null
Binary files differ
diff --git a/art/outbox-16.png b/art/outbox-16.png
deleted file mode 100644
index e52e00a7f3..0000000000
--- a/art/outbox-16.png
+++ /dev/null
Binary files differ
diff --git a/art/outbox-full-16.png b/art/outbox-full-16.png
deleted file mode 100644
index cb138fa2b3..0000000000
--- a/art/outbox-full-16.png
+++ /dev/null
Binary files differ
diff --git a/art/paste.png b/art/paste.png
deleted file mode 100644
index 736900531a..0000000000
--- a/art/paste.png
+++ /dev/null
Binary files differ
diff --git a/art/pattern.png b/art/pattern.png
deleted file mode 100644
index 33abc187ef..0000000000
--- a/art/pattern.png
+++ /dev/null
Binary files differ
diff --git a/art/pgp-signature-bad.png b/art/pgp-signature-bad.png
deleted file mode 100644
index 82318fbb4d..0000000000
--- a/art/pgp-signature-bad.png
+++ /dev/null
Binary files differ
diff --git a/art/pgp-signature-nokey.png b/art/pgp-signature-nokey.png
deleted file mode 100644
index 00250e090c..0000000000
--- a/art/pgp-signature-nokey.png
+++ /dev/null
Binary files differ
diff --git a/art/pgp-signature-ok.png b/art/pgp-signature-ok.png
deleted file mode 100644
index 51782b0e40..0000000000
--- a/art/pgp-signature-ok.png
+++ /dev/null
Binary files differ
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/previous-message.png b/art/previous-message.png
deleted file mode 100644
index 17c3dcadb6..0000000000
--- a/art/previous-message.png
+++ /dev/null
Binary files differ
diff --git a/art/print-preview-24.png b/art/print-preview-24.png
deleted file mode 100644
index cd6b90e6bd..0000000000
--- a/art/print-preview-24.png
+++ /dev/null
Binary files differ
diff --git a/art/print-preview.xpm b/art/print-preview.xpm
deleted file mode 100644
index a4b36d639d..0000000000
--- a/art/print-preview.xpm
+++ /dev/null
@@ -1,153 +0,0 @@
-/* XPM */
-static char * print_preview_xpm[] = {
-"16 16 134 2",
-" c None",
-". c #000000",
-"+ c #9D9D8D",
-"@ c #CFCFB9",
-"# c #C4C4AF",
-"$ c #8D8D7F",
-"% c #353530",
-"& c #828282",
-"* c #9C9C8C",
-"= c #E2E2D0",
-"- c #EDEDE7",
-"; c #C0C0AC",
-"> c #B2B29F",
-", c #828274",
-"' c #4C4C44",
-") c #FFFFFF",
-"! c #EFEFEF",
-"~ c #ECECEC",
-"{ c #090908",
-"] c #D5D5BF",
-"^ c #FBFBFA",
-"/ c #C3C3AE",
-"( c #B5B5A2",
-"_ c #A6A695",
-": c #959586",
-"< c #080807",
-"[ c #E3E3E3",
-"} c #CDCDCD",
-"| c #D7D7D7",
-"1 c #090909",
-"2 c #CACAB5",
-"3 c #DDDDD0",
-"4 c #B7B7A4",
-"5 c #AAAA98",
-"6 c #9B9B8B",
-"7 c #8C8C7D",
-"8 c #0A0A09",
-"9 c #E9E9E9",
-"0 c #EBEBEB",
-"a c #DBDBDB",
-"b c #929283",
-"c c #BABAA7",
-"d c #ADAD9B",
-"e c #9F9F8E",
-"f c #909081",
-"g c #727266",
-"h c #52524C",
-"i c #A4A4A4",
-"j c #34342F",
-"k c #878779",
-"l c #A0A090",
-"m c #737367",
-"n c #010101",
-"o c #575757",
-"p c #A6A6A6",
-"q c #4B4B43",
-"r c #414141",
-"s c #777777",
-"t c #979797",
-"u c #BCBBBB",
-"v c #D4D4D3",
-"w c #878787",
-"x c #323232",
-"y c #A5A5A5",
-"z c #D0D0CF",
-"A c #B5B5B5",
-"B c #C2C2C2",
-"C c #FBFBFB",
-"D c #FAFAFA",
-"E c #999999",
-"F c #363636",
-"G c #9E9E9E",
-"H c #ECECEB",
-"I c #AEADAB",
-"J c #F7F7F7",
-"K c #E5E5E4",
-"L c #8D8D8D",
-"M c #F1F1F1",
-"N c #A0A0A0",
-"O c #E2E2E2",
-"P c #D9D9D8",
-"Q c #898988",
-"R c #0C0C0C",
-"S c #302F2F",
-"T c #A4A3A1",
-"U c #CCCAC6",
-"V c #1B1B1B",
-"W c #969594",
-"X c #D6D4D2",
-"Y c #DDDBDA",
-"Z c #DCDCDB",
-"` c #DEDDDD",
-" . c #DFDEDD",
-".. c #DDDCDB",
-"+. c #DBDBD9",
-"@. c #7E7E7D",
-"#. c #383838",
-"$. c #555453",
-"%. c #9F9E9A",
-"&. c #A8A7A6",
-"*. c #9E9D9C",
-"=. c #615E59",
-"-. c #54514E",
-";. c #54524E",
-">. c #514F4B",
-",. c #52504C",
-"'. c #504D49",
-"). c #4D4B47",
-"!. c #4F4D49",
-"~. c #514F4C",
-"{. c #535251",
-"]. c #8E8D8A",
-"^. c #B4B3B1",
-"/. c #C0BFBC",
-"(. c #B9B8B5",
-"_. c #B3B1AF",
-":. c #B1B1AE",
-"<. c #AFAEAC",
-"[. c #B0AEAC",
-"}. c #ACACA9",
-"|. c #A6A6A4",
-"1. c #ABAAA7",
-"2. c #AEADAA",
-"3. c #AAA9A6",
-"4. c #201F1E",
-"5. c #403F3D",
-"6. c #444341",
-"7. c #454542",
-"8. c #42423F",
-"9. c #3F3E3C",
-"0. c #3A3936",
-"a. c #393835",
-"b. c #31302D",
-"c. c #1E1D1B",
-" . . . . ",
-" . + @ # $ % & . . . . ",
-" . * = - ; > , ' ) ! ~ . ",
-" { ] ^ / ( _ : < [ } | . ",
-" 1 2 3 4 5 6 7 8 9 0 a . ",
-" . b c d e f g h . i a . ",
-" j k l b m n o p 0 a . ",
-" q 8 8 r s n . t a . . ",
-" . u v ) 9 9 w n x y z A . ",
-" . B C ) D ) D C E n F G H I . ",
-" . D J K L M N O P Q R S T U V ",
-" . W X Y Z ` ...P +.@.#.$.%.. ",
-" . &.*.=.-.;.>.,.'.).!.~.{.].. ",
-" . ^./.(._.:.<.[.}.|.1.2.<.3.. ",
-" . 4.5.6.7.7.7.8.5.9.0.a.b.c.. ",
-" . . . . . . . . . . . . . "};
diff --git a/art/print.png b/art/print.png
deleted file mode 100644
index f223a1146d..0000000000
--- a/art/print.png
+++ /dev/null
Binary files differ
diff --git a/art/print.xpm b/art/print.xpm
deleted file mode 100644
index da46eb0157..0000000000
--- a/art/print.xpm
+++ /dev/null
@@ -1,107 +0,0 @@
-/* XPM */
-static char * print_xpm[] = {
-"16 16 88 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #ECECEC",
-"# c #353535",
-"$ c #D3D3D3",
-"% c #131313",
-"& c #C7C7C7",
-"* c #D7D7D7",
-"= c #EBEBEB",
-"- c #E9E9E9",
-"; c #DBDBDB",
-"> c #4D4D4D",
-", c #A4A4A4",
-"' c #414141",
-") c #8C8C8C",
-"! c #979797",
-"~ c #BCBBBB",
-"{ c #D4D4D3",
-"] c #D0D0CF",
-"^ c #B5B5B5",
-"/ c #C2C2C2",
-"( c #FBFBFB",
-"_ c #FAFAFA",
-": c #F8F8F8",
-"< c #F4F4F3",
-"[ c #ECECEB",
-"} c #AEADAB",
-"| c #F7F7F7",
-"1 c #E5E5E4",
-"2 c #8D8D8D",
-"3 c #F1F1F1",
-"4 c #A0A0A0",
-"5 c #E2E2E2",
-"6 c #D9D9D8",
-"7 c #DEDDDC",
-"8 c #DCDCDA",
-"9 c #D8D7D4",
-"0 c #B3B2B0",
-"a c #CCCAC6",
-"b c #1B1B1B",
-"c c #969594",
-"d c #D6D4D2",
-"e c #DDDBDA",
-"f c #DCDCDB",
-"g c #DEDDDD",
-"h c #DFDEDD",
-"i c #DDDCDB",
-"j c #DBDBD9",
-"k c #DAD9D7",
-"l c #D9D8D6",
-"m c #81807E",
-"n c #9F9E9A",
-"o c #A8A7A6",
-"p c #9E9D9C",
-"q c #615E59",
-"r c #54514E",
-"s c #54524E",
-"t c #514F4B",
-"u c #52504C",
-"v c #504D49",
-"w c #4D4B47",
-"x c #4F4D49",
-"y c #514F4C",
-"z c #939291",
-"A c #9B9A97",
-"B c #B4B3B1",
-"C c #C0BFBC",
-"D c #B9B8B5",
-"E c #B3B1AF",
-"F c #B1B1AE",
-"G c #AFAEAC",
-"H c #B0AEAC",
-"I c #ACACA9",
-"J c #A6A6A4",
-"K c #ABAAA7",
-"L c #AEADAA",
-"M c #AAA9A6",
-"N c #201F1E",
-"O c #403F3D",
-"P c #444341",
-"Q c #454542",
-"R c #42423F",
-"S c #3F3E3C",
-"T c #3A3936",
-"U c #393835",
-"V c #31302D",
-"W c #1E1D1B",
-" ",
-" ......... ",
-" .++++++@. ",
-" .+#$.%&*. ",
-" .+=---=;. ",
-" .+>.=.,;. ",
-" .+=====;. ",
-" ..+'=).!;.. ",
-" .~{+------]^. ",
-" ./(+_+_((_:<[}.",
-" ._|1234567890ab",
-" .cdefghi6jklmn.",
-" .opqrstuvwxyzA.",
-" .BCDEFGHIJKLGM.",
-" .NOPQQQROSTUVW.",
-" ............. "};
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/properties-16.png b/art/properties-16.png
deleted file mode 100644
index 7586e3ab27..0000000000
--- a/art/properties-16.png
+++ /dev/null
Binary files differ
diff --git a/art/rdf.png b/art/rdf.png
deleted file mode 100644
index b4bdbafa99..0000000000
--- a/art/rdf.png
+++ /dev/null
Binary files differ
diff --git a/art/receive-24.png b/art/receive-24.png
deleted file mode 100644
index bfa7d972bc..0000000000
--- a/art/receive-24.png
+++ /dev/null
Binary files differ
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/refresh-nntp-folders-24.png b/art/refresh-nntp-folders-24.png
deleted file mode 100644
index b1c339a973..0000000000
--- a/art/refresh-nntp-folders-24.png
+++ /dev/null
Binary files differ
diff --git a/art/remove-nntp-folder-24.png b/art/remove-nntp-folder-24.png
deleted file mode 100644
index 5500bdec23..0000000000
--- a/art/remove-nntp-folder-24.png
+++ /dev/null
Binary files differ
diff --git a/art/reply-to-all.png b/art/reply-to-all.png
deleted file mode 100644
index fa64fdeecf..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 70ee66b8eb..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-16.png b/art/save-16.png
deleted file mode 100644
index 20a27ca2a1..0000000000
--- a/art/save-16.png
+++ /dev/null
Binary files differ
diff --git a/art/save-24.png b/art/save-24.png
deleted file mode 100644
index 51375a3f40..0000000000
--- a/art/save-24.png
+++ /dev/null
Binary files differ
diff --git a/art/save-as-16.png b/art/save-as-16.png
deleted file mode 100644
index 3b9612efdf..0000000000
--- a/art/save-as-16.png
+++ /dev/null
Binary files differ
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/search-16.png b/art/search-16.png
deleted file mode 100644
index 6e9837d8ee..0000000000
--- a/art/search-16.png
+++ /dev/null
Binary files differ
diff --git a/art/search-and-replace-16.png b/art/search-and-replace-16.png
deleted file mode 100644
index 5daa4c39a0..0000000000
--- a/art/search-and-replace-16.png
+++ /dev/null
Binary files differ
diff --git a/art/send-16.png b/art/send-16.png
deleted file mode 100644
index 4cf96ead39..0000000000
--- a/art/send-16.png
+++ /dev/null
Binary files differ
diff --git a/art/send-24-receive.png b/art/send-24-receive.png
deleted file mode 100644
index 1d3d4df420..0000000000
--- a/art/send-24-receive.png
+++ /dev/null
Binary files differ
diff --git a/art/send-24.png b/art/send-24.png
deleted file mode 100644
index 5c7e4a261e..0000000000
--- a/art/send-24.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-later-16.png b/art/send-later-16.png
deleted file mode 100644
index 3b2bb791d4..0000000000
--- a/art/send-later-16.png
+++ /dev/null
Binary files differ
diff --git a/art/send-receive.xpm b/art/send-receive.xpm
deleted file mode 100644
index f9ba82e5c8..0000000000
--- a/art/send-receive.xpm
+++ /dev/null
@@ -1,58 +0,0 @@
-/* XPM */
-static char * send_receive_xpm[] = {
-"16 16 39 1",
-" c None",
-". c #000000",
-"+ c #F7EFD0",
-"@ c #F7EFD1",
-"# c #EED680",
-"$ c #C38909",
-"% c #F6ECC9",
-"& c #D1940C",
-"* c #B98208",
-"= c #A59458",
-"- c #D1BC70",
-"; c #E9D17B",
-"> c #B07C08",
-", c #916608",
-"' c #F3E3A8",
-") c #AE7B0A",
-"! c #F4E4AD",
-"~ c #F5E9BC",
-"{ c #D8E6D2",
-"] c #B9C9B1",
-"^ c #6F9059",
-"/ c #C6B26A",
-"( c #D7E5D0",
-"_ c #AECCA1",
-": c #557C3B",
-"< c #D3E3CB",
-"[ c #D0E1C9",
-"} c #DBE7D6",
-"| c #B9C3B5",
-"1 c #BDCEB6",
-"2 c #A9C79C",
-"3 c #65894C",
-"4 c #748C64",
-"5 c #668154",
-"6 c #669447",
-"7 c #58833C",
-"8 c #E1EBDC",
-"9 c #5E8A41",
-"0 c #E0EADB",
-" . ",
-" .+. ",
-" .@#$. ",
-" .%##&*. ",
-".%=-;>,,. ",
-"...'#)... ",
-" .!#). ..... ",
-" .~#). .{]^. ",
-" .#/). .(_:. ",
-" ..... .<_:. ",
-" ...[_:...",
-" .}|12345.",
-" .}__67. ",
-" .8_9. ",
-" .0. ",
-" . "};
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-1-0.png b/art/splash-1-0.png
deleted file mode 100644
index deea7ec27a..0000000000
--- a/art/splash-1-0.png
+++ /dev/null
Binary files differ
diff --git a/art/splash.png b/art/splash.png
deleted file mode 100644
index 600e705015..0000000000
--- a/art/splash.png
+++ /dev/null
Binary files differ
diff --git a/art/talking-heads.png b/art/talking-heads.png
deleted file mode 100644
index 1c2ba5b040..0000000000
--- a/art/talking-heads.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.png b/art/task.png
deleted file mode 100644
index 5b3c7b7534..0000000000
--- a/art/task.png
+++ /dev/null
Binary files differ
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/thankyou.png b/art/thankyou.png
deleted file mode 100644
index f08f553cc3..0000000000
--- a/art/thankyou.png
+++ /dev/null
Binary files differ
diff --git a/art/timezone-16.xpm b/art/timezone-16.xpm
deleted file mode 100644
index 6f3094a395..0000000000
--- a/art/timezone-16.xpm
+++ /dev/null
@@ -1,162 +0,0 @@
-/* XPM */
-static char * timezone_16_xpm[] = {
-"16 16 143 2",
-" c None",
-". c #000000",
-"+ c #2A2B2B",
-"@ c #020203",
-"# c #050709",
-"$ c #020202",
-"% c #7490B2",
-"& c #A6BDD4",
-"* c #C0D3E5",
-"= c #E6E7E6",
-"- c #C7CCC5",
-"; c #9BAC9F",
-"> c #030304",
-", c #010101",
-"' c #82848E",
-") c #80846B",
-"! c #7FA59B",
-"~ c #AECFE0",
-"{ c #C0D8EF",
-"] c #B4C4C2",
-"^ c #6A8B6C",
-"/ c #699678",
-"( c #51826F",
-"_ c #2D535E",
-": c #1C492A",
-"< c #5EA66A",
-"[ c #7BC280",
-"} c #67BA7A",
-"| c #7AC7A7",
-"1 c #B1D1EC",
-"2 c #94ADAF",
-"3 c #719177",
-"4 c #609996",
-"5 c #5B9583",
-"6 c #537762",
-"7 c #6E9874",
-"8 c #64A970",
-"9 c #6DBD77",
-"0 c #5FB565",
-"a c #5DAD6B",
-"b c #89BFF1",
-"c c #89BFF5",
-"d c #4C9DAB",
-"e c #459D82",
-"f c #55A395",
-"g c #557A5C",
-"h c #1A304E",
-"i c #74B678",
-"j c #5EB666",
-"k c #49A54F",
-"l c #4CA34F",
-"m c #90C4E4",
-"n c #7BB8F8",
-"o c #7FBCF8",
-"p c #49A09A",
-"q c #389B6F",
-"r c #81ACBF",
-"s c #617B65",
-"t c #5B735E",
-"u c #010202",
-"v c #7AAD6E",
-"w c #438C3D",
-"x c #6AA8A1",
-"y c #92C5F1",
-"z c #77B8F6",
-"A c #77B7F7",
-"B c #7BB7F2",
-"C c #5DA9BA",
-"D c #56A4A1",
-"E c #85B1D9",
-"F c #637679",
-"G c #586D86",
-"H c #040506",
-"I c #6B975F",
-"J c #749486",
-"K c #85BDD9",
-"L c #8FBFEF",
-"M c #82BBF4",
-"N c #82BAF2",
-"O c #84B9EE",
-"P c #71AFEE",
-"Q c #96ABBF",
-"R c #8AB7D4",
-"S c #668B77",
-"T c #557E74",
-"U c #040406",
-"V c #649D69",
-"W c #508B52",
-"X c #508074",
-"Y c #7EAEDD",
-"Z c #81BBF4",
-"` c #81B9F2",
-" . c #83B8EE",
-".. c #80ACD5",
-"+. c #908466",
-"@. c #64825C",
-"#. c #5C7F5A",
-"$. c #627F5C",
-"%. c #5C7677",
-"&. c #5C9D67",
-"*. c #5D9071",
-"=. c #617576",
-"-. c #7DB2E8",
-";. c #7EB4EA",
-">. c #7BB0E6",
-",. c #7698B8",
-"'. c #66855E",
-"). c #53885E",
-"!. c #51845C",
-"~. c #61825D",
-"{. c #3D362D",
-"]. c #0A1C14",
-"^. c #609D73",
-"/. c #68A879",
-"(. c #628E77",
-"_. c #7AAEE4",
-":. c #70A4DB",
-"<. c #72A7DD",
-"[. c #6997C6",
-"}. c #598860",
-"|. c #51835C",
-"1. c #638860",
-"2. c #07090A",
-"3. c #50716C",
-"4. c #6FA779",
-"5. c #5D8976",
-"6. c #7AA7D4",
-"7. c #73A5D7",
-"8. c #6495C7",
-"9. c #557FAB",
-"0. c #65855F",
-"a. c #5A875F",
-"b. c #558462",
-"c. c #778383",
-"d. c #7B98B4",
-"e. c #7CA0C3",
-"f. c #7397BD",
-"g. c #7D8FA0",
-"h. c #809980",
-"i. c #143325",
-"j. c #597658",
-"k. c #030505",
-"l. c #030404",
-" ",
-" . . + @ @ # ",
-" . $ % & * = - ; > , ",
-" . ' ) ! ~ { ] ^ / ( _ , ",
-" : < [ } | 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 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 ` ...+.@.#.$.H ",
-" u %.&.*.=.-.;.>.,.'.).!.~.{. ",
-" ].^./.(._.:.<.[.}.|.1.2. ",
-" @ 3.4.5.6.7.8.9.0.a.b.> ",
-" @ H c.d.e.f.g.h.i.j. ",
-" u u k.> l.> ",
-" "};
diff --git a/art/timezone-48.png b/art/timezone-48.png
deleted file mode 100644
index 2222e6f903..0000000000
--- a/art/timezone-48.png
+++ /dev/null
Binary files differ
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-16.png b/art/undelete_message-16.png
deleted file mode 100644
index 066cbfc99c..0000000000
--- a/art/undelete_message-16.png
+++ /dev/null
Binary files differ
diff --git a/art/wax-seal-broken.png b/art/wax-seal-broken.png
deleted file mode 100644
index 951f062dcc..0000000000
--- a/art/wax-seal-broken.png
+++ /dev/null
Binary files differ
diff --git a/art/wax-seal.png b/art/wax-seal.png
deleted file mode 100644
index 5b0ba63bff..0000000000
--- a/art/wax-seal.png
+++ /dev/null
Binary files differ
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/work_online-16.png b/art/work_online-16.png
deleted file mode 100644
index b11d36d277..0000000000
--- a/art/work_online-16.png
+++ /dev/null
Binary files differ
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/world_map-960.png b/art/world_map-960.png
deleted file mode 100644
index 0512d20115..0000000000
--- a/art/world_map-960.png
+++ /dev/null
Binary files differ
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 e4fda3d3bc..0000000000
--- a/calendar/AUTHORS
+++ /dev/null
@@ -1,7 +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>
-JP Rosevear <jpr@ximian.com>
-Damon Chaplin <damon@ximian.com>
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
deleted file mode 100644
index 76ca1ddc75..0000000000
--- a/calendar/ChangeLog
+++ /dev/null
@@ -1,13804 +0,0 @@
-2001-10-02 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/comp-editor.c (setup_widgets): Use
- `bonobo_ui_component_new_default()', not
- `bonobo_ui_component_new()'.
-
-2001-10-02 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-query.c: use bonobo-exception to tidy
-
-2001-10-02 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (nth_weekday): handle -1 as
- well
- (comp_from_remote_record): fix monthly by day recurrences and
- handle "last" day type
-
-2001-10-01 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (comp_editor_destroy): unref the page
- objects here, instead of in close_dialog(). (This was fixed a while
- ago, but accidentally reverted.) Fixes bug #7543.
-
-2001-10-01 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-notify-dialog.c (alarm_notify_dialog):
- Set the window state to sticky. Thanks to Peter Teichman for the
- suggestion.
-
-2001-10-01 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- Convert the comp exceptions to the pilot record
- (comp_from_remote_record): record exceptions on the desktop and
- use time zone stuff on recurrence end date
-
-2001-10-01 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_compute_changes):
- strdup the uid to avoid double free, write out only after
- everything is done
-
-2001-10-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): don't use
- gnome_vfs_uri_is_local on URIs created with
- gnome_vfs_uri_new_private
-
-2001-09-28 Damon Chaplin <damon@ximian.com>
-
- * gui/print.c (print_comp_item): use bound_text to print the summary,
- so it wraps instead of being clipped to 1 line. Fixes part 3 of bug
- #10285, I think.
-
- * gui/dialogs/alarm-page.glade: left-aligned the Date/Time label.
- Also set the width of the Summary & Date/Time labels to 10, and set
- expand to TRUE, to make sure that the dialog doesn't keep getting
- wider as the summary text on the main page gets longer. Could possibly
- use an EClippedLabel here instead, so we get a '...' at the end if it
- is clipped.
-
- * gui/dialogs/recurrence-page.glade: changed Summary & Date/Time
- widths as above.
-
- * gui/print.c (print_calendar): use landscape mode for the month
- preview.
- (print_border_with_triangles): use EPSILON to account for floating
- point errors. Hopefully fixes part 2b of bug #10285.
-
-2001-09-28 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- Handle the fields and category we don't sync by making sure we
- don't overwrite them
- (local_record_to_pilot_record): use local record category
- (pre_sync): track db info
-
- * conduits/calendar/calendar-conduit.h: db info field
-
- * conduits/todo/todo-conduit.[hc]: same as above
-
- * pcs/cal-backend-file.c
- (cal_backend_file_compute_changes_foreach_key): create a dummy
- component of the right type and strdup the uid
- (cal_backend_file_compute_changes): sync the db hash after each
- change and free the uid
-
-2001-09-28 JP Rosevear <jpr@ximian.com>
-
- * cal-client/cal-client.c (cal_client_open_calendar): init the
- execption rather than freeing it
-
-2001-09-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (cal_client_construct): use bonobo-exception
- for exceptions
- (cal_client_open_calendar): likewise
-
-2001-09-27 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/calendar-commands.c (pixmaps): Update pixmap menu paths;
- /menu/ComponentToolsPlaceholder/Tools ->
- /menu/Tools/ComponentPlaceholder .
- * gui/tasks-control.c: Likewise.
-
-2001-09-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added InvalidURI and UnsupportedMethod
- exceptions to the CalFactory interface
-
- * pcs/cal-factory.c (impl_CalFactory_open): raise InvalidURI exception on
- URI errors and UnsupportedMethod when we don't support the method for
- a given URI
-
-2001-09-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c: added support for using multiple calendar
- factories
- (cal_client_uri_list): use the list of factories loaded for this
- CalClient
-
-2001-09-26 Damon Chaplin <damon@ximian.com>
-
- * gui/e-calendar-table.c (date_compare_cb):
- (percent_compare_cb):
- (priority_compare_cb): added comparison functions for these special
- cell types. But the date and percent ones don't work yet due to the
- use of static text buffers for return cell values.
- (e_calendar_table_init): added the comparison functions to the
- ETableExtras. NOTE: task_compare_cb() never seems to be called.
- I'm not sure why it is there.
-
- * gui/e-calendar-table.etspec: set the comparison function names for
- the date/percent/priority fields.
-
- * cal-util/cal-util.c (cal_util_priority_to_string):
- (cal_util_priority_from_string): new utility functions.
-
- * gui/calendar-model.c (get_priority):
- (set_priority): used above utility functions, and removed the warning
- dialog which isn't useful now that the field isn't editable.
-
- * gui/dialogs/event-page.c (times_updated): handle timezones and for
- all-day events make sure it stays an all-day event after adjusting.
- Fixes bugs #5945 and #10222.
-
- * gui/calendar-commands.c (pixmaps): fixed the E_PIXMAP paths - the
- edit items were moved beneath 'EditPlaceholder'. This gets rid of
- those long Bonobo warnings! (and we get the icons back)
-
- * gui/dialogs/comp-editor.c (pixmaps): removed the PrintPreview toolbar
- icon, since it doesn't appear in the xml file. Gets rid of warning.
-
- * gui/dialogs/event-page.c (notify_dates_changed): new function to
- emit the notification signal when the dates are changed. It also
- handles timezones now.
-
- * gui/dialogs/comp-editor-page.h (CompEditorPageDates): used
- CalComponentDateTime for start/end/due so we have the timezone as well
- as the time.
-
- * gui/dialogs/comp-editor-util.c (comp_editor_dates): updated to get
- the timezones as well as the times.
- (comp_editor_free_dates): new function needed to free all the structs.
-
- * gui/dialogs/recurrence-page.c (recurrence_page_set_dates): added call
- to preview_recur() to make sure the preview gets updated.
-
- * gui/dialogs/alarm-page.c (alarm_page_fill_widgets): free the
- CompEditorPageDates struct after use.
-
- * gui/tag-calendar.c (tag_calendar_by_comp): added 'comp_is_on_server'
- argument. If FALSE, we try to use builtin timezones first. This is
- needed for the recurrence page of the event editor, because the
- timezones may not have been added to the server yet. This and the
- changes to the notification stuff should fix bug #5034.
-
- * gui/gnome-cal.c (dn_query_obj_updated_cb): call above
- tag_calendar_by_comp() with TRUE since the events will be on the
- server in this case.
-
- * gui/e-day-view-layout.c:
- * gui/e-day-view.c: made sure an event always takes up at least one
- row, even when the start & end times are the same. Fixes bug #5944.
- I don't know if we should try to also handle events with the end time
- before the start time.
-
- * gui/e-week-view.c (e_week_view_style_set): check that the small font
- is actually smaller than the normal font. If it isn't, don't use it.
- Hopefully fixes bug #6876.
- (e_week_view_on_new_appointment): if only one day is selected, then
- we set the initial time of the event to 1/2-hour from the start of the
- working day, to differentiate 'New Appointment' from 'New All Day
- Event'. Fixes bug #8892.
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): do the same as the
- above.
-
-2001-09-26 Federico Mena Quintero <federico@ximian.com>
-
- Fixes the GUI part of bug #7892.
-
- * gui/dialogs/alarm-page.c (get_alarm_duration_string): Return
- NULL if the duration is zero.
- (get_alarm_string): Handle duration of zero. Also, hopefully
- make the strings be more l10n-friendly.
-
- * gui/alarm-notify/alarm.c (alarm_ready_cb): I am a moron. Fix
- reversed test.
-
-2001-09-26 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (comp_editor_destroy): disconnect
- signals first thing
-
-2001-09-26 Dan Winship <danw@ximian.com>
-
- * gui/Makefile.am (evolution_calendar_LDFLAGS): Add
- -export-dynamic to make glade custom widgets work on non-Linux.
-
-2001-09-26 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.h: added CAL_MODE_INVALID to CalMode enum
-
-2001-09-26 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.h: new proto
-
- * pcs/cal.c (impl_Cal_set_mode): implement set mode method
- (cal_class_init): set setMode function in epv
- (cal_notify_mode): notify listener of mode change
-
- * pcs/cal-factory.c (add_uri): deal with UriType renaming
-
- * pcs/cal-backend.h: add new virtual methods and protos
-
- * pcs/cal-backend.c (cal_backend_class_init): init new virtual
- methods to null
- (cal_backend_set_mode): sets mode
- (cal_backend_get_mode): gets mode
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): overide
- get_mode and set_mode methods
- (cal_backend_file_get_mode): return mode
- (notify_mode): have listeners notified of the set mode call
- (cal_backend_file_set_mode): set the mode by indicating not
- supported
-
- * cal-client/cal-listener.h: update proto
-
- * cal-client/cal-listener.c (impl_notifyCalSetMode): implement set
- mode callback
- (cal_listener_construct): take set mode callback
- (cal_listener_new): ditto
-
- * cal-client/cal-client.h: update protos, add signal proto
-
- * cal-client/cal-client.c (cal_client_class_init): add
- cal_set_mode signal
- (cal_set_mode_cb): handle set mode callback from listener
- (cal_client_open_calendar): pass additional param to cal_listener_new
- (cal_client_set_mode): wrapper to set the calendar mode
-
- * idl/evolution-calendar.idl: make UriType into CalMode, add
- SetModeStatus enum and notifyCalSetMode method to the listener
-
- * gui/calendar-offline-handler.c (create_connection_list): fetch
- the uri list ourselves
- (impl_prepareForOffline): reflect param change of
- create_connect_list
- (update_offline): ditto
- (backend_cal_set_mode): set mode call back
- (backend_cal_opened): cal opened call back, set mode to local
- (impl_goOffline): reflect UriType renaming
-
- * cal-util/cal-util.h: rename UriType to CalMode
-
-2001-09-25 Federico Mena Quintero <federico@ximian.com>
-
- Warning fixes courtesy of Chris Lahey <clahey@ximian.com>.
-
- * gui/e-itip-control.c (write_html): Warning fixes. Also, don't
- strdup() more than necessary.
-
- * gui/e-meeting-time-sel.c (e_meeting_time_selector_refresh_cb):
- Warning fixes.
-
- * gui/itip-utils.c (itip_addresses_get): Warning fixes.
-
- * gui/print.c (print_day_background): Warning fixes.
-
- * gui/dialogs/alarm-options.c (alarm_to_aalarm_widgets): Warning
- fixes.
- (alarm_to_palarm_widgets): Likewise.
-
- * gui/dialogs/delete-comp.c: #include "../calendar-config.h"
-
-2001-09-25 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm.c (alarm_ready_cb): Check that the
- timeout is not set up before we create a new one; the alarm_fn
- callback may cause the alarm system to re-enter and add a new
- alarm. Fixes bug #10840.
- (pop_alarm): Assert that there is at least one alarm in the queue.
-
-2001-09-25 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal.c: use bonobo-exception stuff to clean code
-
- * pcs/cal-factory.c (add_uri): add uri to the list if the type
- matches
- (impl_CalFactory_uriList): implement uriList method
-
- * pcs/cal-backend.h: new virtual function member
-
- * pcs/cal-backend.c (cal_backend_is_remote): call virtual function
-
- * pcs/cal-backend-file.c (cal_backend_file_class_init): override
- virtual function
- (cal_backend_file_is_remote): new virtual function, always return
- FALSE
-
- * idl/evolution-calendar.idl: uriList factory call, with flags for
- types to get
-
- * gui/dialogs/comp-editor.c (comp_editor_destroy): cast to remove
- warning
-
- * gui/e-itip-control.c (write_label_piece): kill warnings by take
- const char *
-
- * gui/component-factory.c (create_object): aggregate offline
- interface
-
- * gui/Makefile.am: compile new files
-
- * calobj.[hc]: Remove obsolete files
-
- * cal-util/cal-util.h: enum URI types for uriList call
-
- * cal-client/cal-client.c (build_uri_list): build list from string
- sequence
- (cal_client_uri_list): factory call to get uri list
-
- * cal-client/cal-client.h: new proto
-
- * cal-client/cal-client.c: use bonobo exception stuff to clean
- code
-
- * gui/calendar-offline-handler.[hc]: Start some skeleton routines
- for online/offline handling
-
- * pcs/cal-factory.c (launch_backend_for_uri): use accessor and
- remove FIXME
-
-2001-09-23 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (set_date_label): base text on component
- type
-
-2001-09-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/component-factory.c: don't use gnome_vfs_uri_new_private
- (fixes Ximian #10544)
-
-2001-09-20 Federico Mena Quintero <federico@ximian.com>
-
- * gui/component-factory.c: #include a few files we were missing
- from libgnomevfs.
-
-2001-09-20 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (load_db): gets a config db
- (cal_backend_file_destroy): release config db
- (cal_backend_file_init): use load_db
- (mail_account_get): gets a mail account by number
- (mail_account_get_default): gets the default mail account
- (mail_account_is_valid): looks to see if any accounts have the
- given address
- (create_user_free_busy): modularize so we can call multiple times
- if necessary, set organizer
- (cal_backend_file_get_free_busy): if the list of users is null,
- use the default account otherwise get the same info for each
- address that is an identity in the mailer
-
- * gui/itip-utils.c (itip_addresses_get): s/gint/glong/ for bonobo
- conf returns
-
- * gui/calendar-commands.c (publish_freebusy_cmd): fix problems
- from a merge so that we publish 6 weeks of free/busy information
- again
-
-2001-09-20 Larry Ewing <lewing@ximian.com>
-
- * gui/dialogs/recurrence-page.c (recurrence_page_destroy): make
- sure to release the ref on priv->comp.
-
- * gui/dialogs/comp-editor.c (real_edit_comp): make sure to release
- the ref on priv->comp.
-
-2001-09-19 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (audio_notification): Display a
- notification message always, in addition to playing the sound.
- (procedure_notification): Present a confirmation dialog before
- actually running the alarm's program.
- (procedure_notification): Use gnome_execute_shell() instead of
- gnome_execute_async() so that we handle multiple arguments
- properly. Plus, it is most likely what the user expects.
- (mail_notification): Display a message about unsupported email
- reminders instead of blindly dropping the alarm.
-
- * gui/dialogs/alarm-options.glade: Added an explanatory message
- about mail alarms not being supported.
-
- * gui/dialogs/alarm-page.glade: Removed the "Send an email"
- option.
-
- * gui/dialogs/alarm-page.c (action_map): Removed CAL_ALARM_EMAIL.
-
-2001-09-19 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor.c (init_widgets): listen for model
- changes
- (task_editor_edit_comp): add the attendees to the model and notify
- of need send
- (row_count_changed_cb): mark as changed when row added/deleted
- (model_row_changed_cb): mark as changed when row changes
-
- * gui/dialogs/event-editor.c (init_widgets): listen for model
- changes
- (event_editor_init): flip page order
- (event_editor_edit_comp): set needs send value
- (schedule_meeting_cmd): flip page order
- (row_count_changed_cb): mark as changed when row added/deleted
- (model_row_changed_cb): mark as changed when row changes
-
- * gui/dialogs/schedule-page.c: remove model change notification
- stuff
- (schedule_page_fill_widgets): no need to do the needs_send here
- because the editor handles this since it owns the model
-
- * gui/dialogs/event-editor.c (init_widgets): listen for model
- changes
- (event_editor_init): flip page order
- (event_editor_edit_comp): set needs send value
- (schedule_meeting_cmd): flip page order
- (row_count_changed_cb): mark as changed when row added/deleted
- (model_row_changed_cb): mark as changed when row changes
-
- * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): no need
- to do the needs_send here because the editor handles this since it
- owns the model
- (invite_entry_changed): ditto
-
- * gui/dialogs/comp-editor.c (comp_editor_set_changed): new
- accessor
- (comp_editor_get_changed): ditto
- (comp_editor_set_needs_send): ditto
- (comp_editor_get_needs_send): ditto
-
- * gui/dialogs/comp-editor.h: new protos
-
- * gui/itip-utils.c (itip_addresses_get): reflect configuration
- path changes in the mailer
-
- * gui/e-meeting-model.c: remove commented out code, ifdef one
- section for later
-
-2001-09-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-factory.c (cal_factory_oaf_register): add a new parameter
- (const char *iid) to specify the OAFIID of the factory being
- registered
-
-2001-09-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-model.c (e_meeting_model_refresh_busy_periods):
- remove silly debug #if 0
-
- * gui/calendar-commands.c (publish_freebusy_cmd): g_list_free
- rather than g_free
-
- * gui/e-itip-control.c (write_html): eliminate code path that
- caused double freed memory
-
-2001-09-18 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/schedule-page.*: A page that shows the meeting time
- selector and free/busy data for attendees
-
- * gui/dialogs/meeting-page.c: use the meeting model to track/edit
- attendees, remove table value conversion routines and simple table
- routines
- (set_attendees): take a pointer array
- (meeting_page_destroy): destroy the pointer array, save state
- (meeting_page_init): new pointer array
- (meeting_page_fill_widgets): don't null the deleted attendees
- field
- (popup_delegate_cb): array add
- (popup_delete_cb): array add
- (cleanup_attendees): iterate over the array to unref now
- (meeting_page_fill_widgets): don't null out fields, no need to add
- attendees here
- (invite_entry_changed): use e_meeting_attendee routines
- (popup_delegate_cb): ditto
- (popup_delete_cb): ditto
- (meeting_page_new): take new arg and pass it to construct
- (meeting_page_construct): take new arg, use e-meeting-model
- routines to construct table
-
- * gui/dialogs/task-editor.c (task_editor_init): new meeting model
- (task_editor_destroy): unref the model
-
- * gui/dialogs/event-editor.c (event_editor_init): make new model
- and pass it to meeting and schedule pages
- (event_editor_set_cal_client): virtual function, set meeting model
- client
- (event_editor_edit_comp): add the attendees to the model
- (event_editor_destroy): unref model
-
- * gui/dialogs/comp-editor.h: add virtual function
- * gui/dialogs/comp-editor.c (comp_editor_set_cal_client): make
- set_cal_client a virutal function
-
- * gui/e-meeting-types.h: generally useful type defines
-
- * gui/e-meeting-time-sel*.[hc]: Move here and use an e-table for
- the attendee list and extract display information from the new
- meeting model and attendees
-
- * gui/e-meeting-time-sel.etspec: spec for the table
-
- * gui/e-meeting-attendee.[hc]: meeting attendees for the model,
- with to/from conversions for CalComponentAttendee structure, emits
- changed signal and allows getting and setting of free busy
- periods
-
- * gui/e-meeting-model.[hc]: move the model out on its own
-
- * gui/e-itip-control.c (write_error_html): clean up warnings
-
-2001-09-18 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #6350.
-
- * gui/component-factory.c (remove_folder): Use a simplified method
- for removing our folder data; we just need to remove calendar.ics
- or tasks.ics and the corresponding backup files.
-
-2001-09-18 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #2830.
-
- * gui/calendar-config.c (calendar_config_get_confirm_delete): New
- function.
- (calendar_config_set_confirm_delete): New function.
- (config_read): Get the default value for the ConfirmDelete option.
- (calendar_config_write): Set the value of ConfirmDelete.
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Handle the
- configuration option for confirmation.
-
- * gui/dialogs/cal-prefs-dialog.c (CalPrefsDialogPrivate): Added
- the fields for the Other page.
- (get_widgets): Handle the new widgets.
- (cal_prefs_dialog_show_config): Likewise.
- (cal_prefs_dialog_update_config): Likewise.
-
-2001-09-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client-multi.[ch]: new class for managing multiple
- calendars, with an API very similar to the CalClient one,
- for ease of transition from one to the other
-
- * gui/component-factory.c (xfer_folder, remove_folder, create_folder):
- reworked to be able to manage folders for any calendar backend, and
- not only the file: one
-
-2001-09-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: changed signature for the getFreeBusy
- method, to return a sequence of CalObj's, and added sequence of users
- as a new parameter to that method
-
- * cal-client/cal-client.c (cal_client_get_free_busy): adapted to new
- IDL method signature, by adding a new "GList *users" parameter, for
- callers to be able to specify a list of users
-
- * pcs/cal-backend.[ch] (cal_backend_get_free_busy):
- * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): add the
- "GList *users" parameter. In cal_backend_file_get_free_busy, call
- lookup_component to get the CalComponent for each uid, instead
- of calling cal_backend_get_object, which meant converting the
- component to a string and then parsing it again.
-
- * cal-client/client-test.c (cal_opened_cb):
- * gui/e-itip-control.c (send_freebusy):
- * gui/calendar-commands.c (publish_freebusy_cmd): adapted to
- new getFreeBusy method signature
-
-2001-09-17 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-model.c: added a timeout to refresh the list every
- 10 minutes. Not ideal, as the user may be editing a task when it gets
- refreshed.
- (adjust_query_sexp): use the 'completed-before?' operator to filter
- out tasks according to the config settings.
-
- * gui/dialogs/task-details-page.c (task_details_page_fill_widgets):
- added support for the 'Completed' date. This code must have got lost
- somewhere, as it used to work.
- (date_changed_cb): set the priv->updating flag while updating the other
- widgets.
-
- * pcs/cal-backend-file.c (cal_backend_file_update_objects): made sure
- we freed the components.
-
- * pcs/query.c (func_completed_before): added 'completed-before?'
- operator.
-
- * gui/calendar-config.c (calendar_config_configure_e_cell_date_edit):
- don't set the lower & upper hour. Use 0-24 like the EDateEdit does.
-
- * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_show_config): set
- the 12/24-hour time format options sensitive only if we support both.
-
- * gui/calendar-config.c (config_read): if the locale doesn't define
- 'am' and 'pm' strings then we must use 24-hour format.
-
- * gui/calendar-commands.c (calendar_set_folder_bar_label): don't
- translate the '%d' as it doesn't make much sense. Resolves bug #8027.
-
-2001-09-17 Federico Mena Quintero <federico@ximian.com>
-
- * gui/component-factory.c (owner_set_cb): Do not call
- calendar_config_init() here.
-
- * gui/main.c (main): Call calendar_config_init() here.
-
-2001-09-17 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm.c (queue_alarm): Duh, only setup the
- timeout if the list was empty.
- (alarm_ready_cb): Notify with the ID of the original alarm.
- (alarm_remove): Likewise.
-
-2001-09-17 Federico Mena Quintero <federico@ximian.com>
-
- Switch the alarm system from using SIGALRM to normal glib timers.
- Also, use a more robust de-queueing mechanism.
-
- * gui/alarm-notify/alarm.c (alarm_init): Removed.
- (alarm_done): Remove the glib timeout instead of closing the pipes
- and the signal handler.
- (alarm_add): Allow adding alarms that happen before right now.
- (queue_alarm): Use a glib timer instead of a signal.
- (alarm_remove): Adjust the timeout as appropriate.
-
- * gui/alarm-notify/notify-main.c (main): There is no need to
- initialize the alarm system now.
-
- * gui/main.c (main): Likewise.
-
-2001-09-17 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-model.c (calendar_model_init): get itip addresses
- (calendar_model_destroy): destroy same
- (calendar_model_value_at): do more thorough checking on whether to
- use recurring, assigned, assigned to or regular task icons
-
-2001-09-17 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (for_each_remove_all_alarms): for each
- call back, removes the alarms
- (cal_component_remove_all_alarms): remove all alarms from the
- component
-
- * cal-util/cal-component.h: new proto
-
- * gui/e-itip-control.c (write_error_html): writes error messages
- rather than normal html
-
- * gui/itip-utils.c (itip_send_comp): remove all alarms if the
- method warrants it
-
-2001-09-16 Christopher James Lahey <clahey@ximian.com>
-
- * gui/dialogs/meeting-page.c (build_etable): Updated this to match
- the new ETableSimple interface.
-
-2001-09-14 Ettore Perazzoli <ettore@ximian.com>
-
- [Automake 1.5 fixes pointed out by Richard Boulton
- <richard@tartarus.org>, as per #9258.]
-
- * cal-client/Makefile.am: Set CLEANFILES directly instead of using
- `+='.
- * gui/Makefile.am: Likewise.
- * gui/alarm-notify/Makefile.am: Likewise.
- * pcs/Makefile.am: Likewise.
-
-2001-09-14 Damon Chaplin <damon@ximian.com>
-
- * gui/e-itip-control.c (ok_clicked_cb): added space after 'identities'
- in the message. Fixes bug #9896.
-
-2001-09-14 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/e-calendar.conduit.in: remove translation
- marker for now
-
-2001-09-13 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.h: use ical partstat, role, cutypes
- directly
-
- * cal-util/cal-component.c: ditto
-
- * gui/e-itip-control.c (find_my_address): set my addresses if the
- addresses match
- (find_attendee): strstr returns non-null on a match
- (write_html): use new icon, select the name displayed (organizer
- or attendee) based on method,
- (ok_clicked_cb): when rsvp'ing strip off all but the attendee
- being replied for as is specified in the spec
- (find_attendee_partstat): new util function to extract the
- partstat of an attendee
- (update_attendee_status): updates the partstat of a specific
- attendee in the reply message
-
- * gui/dialogs/meeting-page.c: use ical partstat, role, cutypes
- directly
- (popup_delegate_cb): if we delegate, notify of needs send and
- changed
- (popup_delete_cb): notify of needs send and changed for each
- deletion
-
-2001-09-12 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-commands.c (publish_freebusy_cmd): send 6 weeks of
- free busy info starting with the UTC start of day
-
- * gui/itip-utils.c (get_label): create a text representation of
- the given icaltime
- (itip_send_comp): if the summary is empty, set the subject based
- on the type of component, put the right extension on free/busy
- components and base descriptions on type of component, include
- start/end for free/busy info
-
-2001-09-11 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (display_notification): Added an
- use_description argument so that other alarms can fall back to
- this type.
- (audio_notification): Implemented.
- (remove_comp): Call remove_queued_alarm() here; there is no longer
- a destroy notification function for alarms so must we do this
- manually.
- (alarm_trigger_cb): Do not pass the alarm to the notification
- functions so that we can free it ourselves before all the alarms
- in the component get freed.
- (display_notification): Get the alarm here instead of getting it
- as an argument.
- (procedure_notification): Implemented.
-
-2001-09-11 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (invite_entry_changed): free the
- destination vector when we finish with it, if we actually add
- anyone, notify listeners of the needs send and changed info. Fixes
- bug #8632.
-
-2001-09-10 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/print.c
- (format_date): Convert string generated by strftime to UTF-8.
- (print_week_view_background): Ditto.
- (print_month_summary): Ditto.
- (print_month_small): Use U_() instead of _().
- (print_day_background): Ditto.
- (print_todo_details): Ditto.
- (print_date_label): Convert generated string to UTF-8.
-
-2001-09-10 Federico Mena Quintero <federico@ximian.com>
-
- * cal-util/cal-component.c (cal_component_alarm_get_attach):
- Handle the new icalattach type instead of struct icalattachtype.
- (cal_component_alarm_set_attach): Likewise.
-
- * gui/dialogs/alarm-options.c (alarm_to_aalarm_widgets): Likewise.
- (alarm_to_palarm_widgets): Likewise.
- (aalarm_widgets_to_alarm): Likewise.
- (palarm_widgets_to_alarm): Likewise.
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #958, ShellComponents should not be created by factories, for
- the calendar.]
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Remove the
- ShellComponentFactory.
-
- * gui/component-factory.c (create_object): Renamed from
- `component_fn'. Don't get any args.
- (component_factory_init): Create the component using
- `create_object()' and register it into OAF.
- (COMPONENT_FACTORY_ID): Removed.
- (COMPONENT_ID): New.
-
-2001-09-04 Federico Mena Quintero <federico@ximian.com>
-
- * gui/component-factory.c (sc_user_create_new_item_cb):
- Implemented.
-
- * gui/main.c (component_editor_factory_init): New function to
- create the factory for the comp_editor_factory.
-
- * gui/comp-editor-factory.c: Finished implementation.
-
- * gui/alarm-notify/alarm-queue.c (edit_component): Implemented the
- Edit command.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- comp-editor-factory.[ch] to the list of sources.
-
-2001-09-03 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-commands.c (calendar_control_activate):
- * gui/tasks-control.c (tasks_control_activate): don't call
- calendar_config_check_timezone_set() now, since the startup wizard
- handles that.
-
- * gui/e-tasks.c (e_tasks_class_init): changed selection_changed signal
- to GTK_RUN_LAST. It has no reason to be GTK_RUN_FIRST.
-
- * gui/gnome-cal.c:
- * gui/e-week-view.c:
- * gui/e-day-view.c: added "selection_changed" signal,
- XX_delete_event() and XX_get_num_events_selected().
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw): fix the shadow
- around the dates at the top - it was 1 pixel off.
-
- * gui/calendar-commands.c: added sensitize_commands(), similar to in
- tasks-control.c, so we only make Cut/Copy/Delete sensitive when an
- event is selected. Also added delete_event_cmd().
-
- * gui/dialogs/task-page.c (task_page_set_summary):
- * gui/dialogs/event-page.c (event_page_set_summary): do nothing,
- since the summary only gets changed on the main event/task page now.
- Fixes bug #6939.
-
- * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received):
- (e_day_view_on_top_canvas_drag_data_received): check that we are
- dragging an event from the same EDayView. We currently don't support
- DnD from other widgets.
- (e_day_view_update_top_canvas_drag): only get the summary if we
- actually have an event. Fixes bug #5162.
-
- * gui/e-day-view.c (e_day_view_on_editing_stopped): if the text hasn't
- changed we need to call e_day_view_update_event_label() to show the
- times again if necessary. Fixes bug #1813.
-
- * gui/dialogs/comp-editor.c (comp_editor_destroy): destroy the
- CompEditorPage objects here rather than in close_dialog(), after the
- widgets have been destroyed. We do this because the widgets have lots
- of signal handlers connected with the CompEditorPage objects as the
- signal data, so we want to ensure that the data pointer is always
- valid. (Alternatively we could disconnect all the handlers when the
- CompEditorPage objects are destroyed, or use connect_while_alive()).
- Fixes bug #7543.
-
- Note: there is still a small bug in that if you type in a time and
- then hit 'Save and Close', the time won't be saved. I'm not sure
- where this should be fixed - should the actions which close the
- dialog grab the focus to the toplevel, so any widgets currently
- being edited finish the edit and emit 'changed'?
-
- * gui/dialogs/recurrence-page.c (append_exception): use
- gtk_clist_set_row_data_full() so freeing is handled automatically by
- the GtkClist. This helps avoid problems at destroy-time.
- (exception_delete_cb): just call gtk_clist_remove() now. No need to
- free the row data as GtkCList now handles it.
- (recurrence_page_destroy): no need to free the data in the clist.
-
- * gui/dialogs/alarm-page.c: ditto.
-
- * gui/dialogs/meeting-page.c: ditto.
- (etable_destroy_cb): save the ETable state in this new handler cb
- rather than in the destroy method, since the widget will already be
- destroyed by then.
-
-2001-08-31 Damon Chaplin <damon@ximian.com>
-
- * gui/e-itip-control.c: changed 3 occurrences of 'Replyed' to 'replied'
-
-2001-08-31 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/e-itip-control.c (write_html):
- Marked strings for translation (with U_).
-
- * gui/itip-utils.c (itip_send_comp):
- Ditto.
-
-2001-08-31 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor-util.c (comp_editor_contacts_to_widget):
- (comp_editor_contacts_to_component): fix debugging messages so they
- use "" rather than NULL. Fixes bug #8559.
-
-2001-08-29 Federico Mena Quintero <federico@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_remove_object): See if
- the set of categories changed by using the removed_categories hash
- table.
- (cal_backend_file_init): Create a table of removed categories.
- This allows us to notify if and only if the set of category
- changes when an object is updated/removed, instead of
- unconditionally notifying if an object is updated.
- (cal_backend_file_update_objects): Only notify if the set of
- categories really changed.
- (update_categories_from_comp): Shuffle the categories between the
- priv->categories and priv->removed_categories lists.
-
-2001-08-28 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #7879, a query may receive an update notification from
- the backend before the query itself gets populated.
-
- * pcs/query.c (ensure_sexp): New function; ensures that the esexp
- is created and notifies of parse errors. It is the bulk of
- start_query_cb() but put in a separate function so that we can
- share it elsewhere.
- (start_query_cb): Use ensure_sexp().
- (process_component_cb): Oops, notify of a successfully finished
- query.
- (match_component): Call ensure_sexp(). This function can be
- called by the backend notification callbacks before the query is
- populated, so we need to make sure the esexp exists here.
-
-2001-08-22 Federico Mena Quintero <federico@ximian.com>
-
- * gui/cal-search-bar.c (cal_search_bar_construct): Set the
- "category is" criterion as the default for the calendar and tasks.
-
-2001-08-22 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/recurrence-page.c (recurrence_page_fill_widgets):
- Unset the priv->updating flag before returning in the case the
- component has no recurrence information. Fixes bug #6850.
-
-2001-08-22 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (QueuedAlarm): Added a snooze
- flag to differentiate snoozed alarms from real occurrences.
- (add_component_alarms): Do not specify a destroy function for the
- alarm trigger. We handle this in the callbacks now.
- (alarm_trigger_cb): Just remove the alarms for the unimplemented
- notification types.
- (create_snooze): Implemented snooze.
- (notify_dialog_cb): Snooze as appropriate.
-
-2001-08-22 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (foreach_tzid_callback): call back to add
- timezones to the top level
- (itip_send_comp): call icalcomponent_foreach_tzid
-
-2001-08-22 Dan Winship <danw@ximian.com>
-
- * gui/gnome-cal.c: #include <libgnomevfs/gnome-vfs-types.h> so
- this will compile against gnome-vfs 1.0.1.
-
-2001-08-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_open): open the tasks folder
- associated with the calendar being opened, and not always the local
- tasks.ics file
-
- * pcs/cal-factory.c (open_fn): use gnome_vfs_uri_new_private when
- parsing the URI to allow non-registered URIs
-
-2001-08-21 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-options.c (alarm_to_palarm_widgets): Handle
- the case where there is no attachment. Fixes bug #7257.
-
-2001-08-21 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (write_html): strip the mailto bit for the
- email address if we display it
-
-2001-08-21 Damon Chaplin <damon@ximian.com>
-
- * pcs/query.c (func_is_completed): added new e-sexp operator. We
- don't currently use it though.
-
- * gui/dialogs/cal-prefs-dialog.glade: Changed '_Overdue' to 'O_verdue'
- since we have an '_Other' notebook tab. Added '_Hide' accel.
-
- * gui/dialogs/cal-prefs-dialog.c: hooked up config options to dialog.
-
- * gui/calendar-config.c: added config options for hiding completed
- tasks.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw):
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- * gui/e-day-view.c (e_day_view_reshape_long_event): added 2 pixels
- extra space between icons and text for long events, and 1 pixel space
- between icons in all events.
- (e_day_view_realize): changed the background color to match the
- EGrayBar in the shell.
-
-2001-08-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-util.[ch]: new files to contain utility functions
- for calendar backends
-
- * pcs/cal-backend.c (cal_backend_add_cal): implement it here, and not in
- the calendar backends. Add a "cal_added" signal, so that backends are
- notified when a new Cal is added, if they need to
- (cal_backend_get_type_by_uid): implement it here
-
- * pcs/cal-backend-file.c (fill_alarm_instances_seq): moved to
- cal-backend-util.c
- (cal_backend_file_add_cal): removed
- (cal_backend_file_init): connect to the "cal_added" signal in the
- CalBackend class so that we can update categories when a new Cal is
- added
- (cal_backend_file_get_type_by_uid): removed
-
- * pcs/cal-backend-db.c (fill_alarm_instances_seq): moved to
- cal-backend-util.c
- (cal_backend_db_add_cal): removed
- (cal_backend_db_get_type_by_uid): removed
-
- * AUTHORS: added JP and Damon to list of authors
-
-2001-08-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-util/cal-util.[ch] (cal_util_generate_alarms_for_list):
- (cal_util_generate_alarms_for_comp):
- new functions moved from the CalBackendFile, to allow its use outside
- of it. The signature has changed a little bit, since these functions
- need a way to get the timezones from the callers, so a callback
- function to resolve the timezones has been added to the list of
- parameters
-
- * pcs/cal-backend-file.c (generate_alarms_for_list):
- (generate_alarms_for_comp): moved to cal-util, with all their related
- functions/structures
-
- * pcs/cal-backend-db.c: removed functions that were moved to cal-util
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (pixmaps): use Delete icon in menu, and
- change to bigger Save icon in toolbar.
-
- * gui/tasks-control.c:
- * gui/calendar-commands.c (pixmaps): used new_task-16.png and
- goto-16.png.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-commands.c (pixmaps): added delete icons for menu
- and toolbar.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * gui/tasks-control.c: added Cut/Copy/Paste icons for toolbar.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * gui/tasks-control.c: uses new delete icons in menu & toolbar.
-
-2001-08-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c: Update the folder list to include a
- display name and a description.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (pixmaps): use new delete icon for toolbar.
-
-2001-08-19 Damon Chaplin <damon@ximian.com>
-
- * gui/e-itip-control.c: fixed typo, 'send' -> 'sent'. Bug #7621.
-
-2001-08-18 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: added option to hide completed
- tasks after a given number of minutes/hours/days. Unfinished.
-
- * gui/dialogs/event-page.c (event_page_fill_component): initialize
- zone to NULL to avoid a warning.
- (contacts_clicked_cb): work around a bug in SelectNames by notifying
- that the page has changed when you click the 'Contacts' button.
- Otherwise it is easy to lose changes.
-
- * gui/dialogs/task-page.c (contacts_clicked_cb): ditto.
-
-2001-08-18 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (pixmaps): used new Save/Save As icons.
-
- * gui/tasks-control.c:
- * gui/calendar-commands.c (pixmaps): added new Cut/Copy/Paste icons,
- and changed the 'New Task' icon to use the bigger one I made.
-
-2001-08-05 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/dialogs/task-page.c (summary_changed_cb):
- Use e_dialog_editable_get instead of gtk_editable_get_chars (we need
- UTF-8 string).
-
-2001-08-18 Zbigniew Chyla <cyba@gnome.pl>
-
- * gui/calendar-config.c (locale_uses_24h_time_format): New.
- (config_read): Use locale's setting as default for
- /Calendar/Display/Use24HourFormat so that Europeans don't have to
- switch to 24-hour format manually.
-
-2001-08-17 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (destroy): destroy the addresses
- (clean_up): don't free the addresses, we need them
-
-2001-08-17 Damon Chaplin <damon@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_new_task): new function to open the
- task editor to add a new task.
-
- * gui/calendar-commands.c: added new_task_cb() to create a new task
- in the calendar folder, and added menu commands for it, and a toolbar
- button (I think that is what Ettore wanted. Maybe he just meant menu
- commands. Anyway, it is easy to take out.) Note that we don't have a
- decent icon for 'New Task' for the toolbar.
- Also added the new Goto button (but we don't have a similar one for
- the menu command).
-
-2001-08-16 Iain Holmes <iain@ximian.com>
-
- * gui/Makefile.am: Add the libetimezonedialog.a lib link
-
- * gui/calendar-config.c: Change the #include for the timezone dialog
-
- * gui/e-timezone-entry.c: Ditto.
-
- * gui/dialogs/Makefile.am: Remove the e-timezone-dialog stuff.
-
-2001-08-16 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/event-page.c: hide the timezone fields for all-day
- events. We will use DATE values for these eventually, and these
- don't have timezones associated with them. Currently we just use the
- default timezone for all-day events, as a workaround until we have
- DATE values working.
-
- * gui/dialogs/comp-editor-util.c (comp_editor_new_date_edit): added
- make_time_insensitive flag. Though we may not use it.
-
- * gui/dialogs/event-page.glade: made the 'All day event' toggle
- right-aligned, so it doesn't move when the other widgets are shown
- and hidden.
-
- * gui/e-timezone-entry.c (e_timezone_entry_set_default_timezone): new
- function to set the default timezone of the widget. If the current
- timezone setting matches the default then the entry field is hidden.
- Most people won't use timezones so this makes the GUI simpler.
-
- * gui/dialogs/event-page.c (init_widgets):
- * gui/dialogs/task-page.c (init_widgets): set the default timezone
- using the above function.
-
- * gui/dialogs/task-page.c (task_page_fill_widgets): if the start date
- or due date is not set, we use the default timezone, so the user
- doesn't have to set this each time they set the date.
-
-2001-08-16 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-page.c (alarm_page_fill_widgets): If the
- component has no alarms remember to set the priv->updating flag to
- FALSE before returning.
-
-2001-08-16 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/e-delegate-dialog.c
- (e_delegate_dialog_get_delegate_name): get the destinations
- property, not the text property
-
-2001-08-16 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-page.c (clear_widgets): Set the default-to-add
- notification to be display a message 15 minutes before the start
- of the appointment. Fixes bug #7175.
-
-2001-08-16 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/comp-editor-util.c (comp_editor_strip_categories):
- New function to strip surrounding whitespace from a string of
- categories entered by the user.
-
- * gui/dialogs/task-page.c (task_page_fill_component): Use
- comp_editor_strip_categories().
-
- * gui/dialogs/event-page.c (event_page_fill_component): Likewise.
-
-2001-08-16 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-config.c (calendar_config_configure_e_date_edit):
- Do not set the time popup range. We also want to be able to
- create appointments that are not within nine-to-five! Think of
- going to the movies! Fixes bug #7436.
-
- * gui/dialogs/cal-prefs-dialog.glade: "am/pm" is now "AM/PM".
- Fixes bug #7367.
-
-2001-08-16 Jon Trowbridge <trow@ximian.com>
-
- * gui/cal-search-bar.c: Changed to reflect my renaming of some of
- the more hideously-named functions in the ESearchBar API.
-
-2001-08-15 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (save_comp): only fill the component
- and save it if something has changed
- (save_comp_with_send): only try to send if something has changed
- and the editor needs a send
-
-2001-08-15 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: OK, re-added the default
- alarm options. Way too many people are asking for them.
-
-2001-08-15 Federico Mena Quintero <federico@ximian.com>
-
- * gui/component-factory.c (factory_fn): Add the user creatable
- items. The callback is not actually implemented yet; this is just
- to finalize the GUI.
-
- * gui/dialogs/cal-prefs-dialog.glade: Added an option to ask for
- confirmation when deleting items. Added underlined shortcuts
- (they may not all work currently).
-
-2001-08-14 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/task-page.c:
- * gui/dialogs/event-page.c: added support for the Contacts field.
- Note that I'm not sure what we should put in the iCalendar CONTACT
- properties. Currently we put "name <email>", but it isn't recognized
- as a contact when we reopen the dialog, so we may need more info here.
- Also we currently use a simple parser to parse the above format, and
- we should maybe use some camel function.
-
- * gui/dialogs/task-page.glade:
- * gui/dialogs/event-page.glade: replaced the GtkEntry fields for the
- Contacts with a GtkEventBox which we put the BonoboControl in at
- runtime.
-
- * gui/dialogs/meeting-page.c (invite_entry_changed): added FIXMEs
- since it doesn't seem to be freeing the EDestination stuff. JP?
-
- * gui/dialogs/comp-editor-util.c: added bunch of utility functions to
- handle the Contacts field in the main Event and Task pages.
-
- * gui/gnome-cal.c: added visible_start and visible_end fields, so we
- only emit the 'dates-shown-changed' signal when really necessary.
- Currently changing the folder title bar label results in a complete
- redraw of the Evolution window (silly GtkLabel queueing a resize),
- so we want to avoid that as much as possible.
- (gnome_calendar_new_appointment_for): only move the event's end time
- to the end of the day if it is not already 00:00:00.
-
- * gui/e-week-view-event-item.c:
- * gui/e-week-view.c:
- * gui/e-day-view.c: added support for double-clicking on an event to
- open it, and for double-clicking on the background to create a new
- event. There is still a minor problem to sort out, but it basically
- works.
-
- * cal-util/cal-component.c: added support for CONTACT properties,
- mainly by copying the code for COMMENT properties which are exactly
- the same type.
-
- * gui/e-day-view.c (e_day_view_realize): use the same color for the
- top canvas background as the shortcut bar, to make it look a little
- nicer (I think). Although we still have the theme problem with
- hard-coded colors.
-
-2001-08-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-calendar-table.etspec: Made the click-to-add message
- shorter. Fixes bug #7177.
-
-2001-08-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-commands.c (pixmaps): Added Tigert's new icons for
- Prev and Next.
-
-2001-08-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/cal-search-bar.c (make_suboptions): Make the "Any Category"
- item consistent with the one in the addressbook. Also, free the
- items correctly.
-
-2001-08-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/cal-search-bar.c (get_current_category): Handle an array of
- categories in the CalSearchBar instead of our own menu items.
- (notify_query_contains): Fetch the text from the search bar here
- instead of in regen_query().
- (regen_query): Handle category searches.
- (notify_category_is): New function.
- (cal_search_bar_construct): Do not create an option menu.
- (make_suboptions): New function to create the suboption items from
- the list of categories.
- (notify_query_contains): Do not include a category sexp here.
-
-2001-08-13 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (update_item): add dialog for feedback
- (remove_item): ditto
- (send_item): ditto
- (send_freebusy): ditto
-
-2001-08-13 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c: rewrite the gui to use gtkhtml
-
- * gui/Makefile.am: define the icon dir
-
-2001-08-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/e-itip-control.h: Remove #include <config.h> from here.
- * gui/itip-utilss.h: Same here.
-
-2001-08-11 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/tasks-control.c: Update the paths of the Tools menu
- according to the changes in the XML [i.e. things are moved to the
- ComponentToolsPlaceholder].
-
- * gui/calendar-commands.c: Likewise.
-
-2001-08-11 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/event-page.c (init_widgets):
- * gui/dialogs/task-page.c (init_widgets): turn on word-wrap for the
- description fields. Fixes bug #6821.
-
-2001-08-10 Jon Trowbridge <trow@ximian.com>
-
- * gui/cal-search-bar.c: Where we have ESearchBarItems, set their
- subitems to NULL.
-
-2001-08-09 Damon Chaplin <damon@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_get_object_component): added new
- backend method to get the component given a UID.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_object_component):
- added implementation of above virtual method.
-
- * pcs/query.c (match_component): use the new backend function to get
- the CalComponent rather than the string. This avoids converting all
- the calendar components to strings and parsing them back into
- components for every query! (That wasn't a good idea, was it ;)
-
- * gui/e-week-view.c:
- * gui/e-day-view.c: use a timeout handler to layout the events,
- to avoid doing a layout for each event we get from a query.
-
- * gui/print.c (print_day_add_event):
- * gui/e-day-view.c (e_day_view_add_event): set start_row_or_col and
- num_columns to 0. They are guint8's.
-
- * gui/e-week-view.c (e_week_view_free_events): hide all the jump
- buttons. Fixes bug #5946.
-
- * gui/calendar-commands.c (calendar_set_folder_bar_label): added the
- day numbers for the month view.
-
- * gui/dialogs/recurrence-page.glade: changed "_Delete" to "_Remove",
- since it clashed with "_Add". Also added underlined accelerators for
- the recurrence radio buttons. Note that none of these accelerators
- actually work at present, due to the way we are using .glade files
- for each notebook page. I need to add a bug about this.
- Also, the "_Action" menu doesn't popup when I press Alt+A, even though
- the "_File" menu does popup when I press Alt+F. Strange.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_timezone_object):
- removed debug msgs.
-
-2001-08-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * 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-week-view-event-item.c (e_week_view_event_item_draw_icons):
- unref the GdkPixmap and GdkBitmap returned by the function
- e_categories_config_get_icon_for ()
-
-2001-08-09 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-page.*: Remove progress frame
-
- * gui/dialogs/task-details-page.*: Put in progress frame, remove
- basics frame
-
- * gui/dialogs/task-editor.c (set_menu_sens): util function to set
- menu sensitivity based on state
- (task_editor_init): add meeting page
- (task_editor_edit_comp): show page if necessary
- (task_editor_destroy): unref meeting page
- (assign_task_cmd): bring up meeting page
- (refresh_task_cmd): save before sending
- (forward_cmd): ditto
-
- * gui/dialogs/comp-editor.c (save_cmd): implement new save command
-
-2001-08-09 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-itip-control.c (destroy): Chain to the destroy handler in
- the parent class!
-
- * gui/dialogs/comp-editor-page.c (comp_editor_page_destroy):
- Likewise. Sigh.
-
- * gui/cal-search-bar.c (cal_search_bar_destroy): Whoops, added a
- destroy handler.
-
-2001-08-08 Damon Chaplin <damon@ximian.com>
-
- * gui/goto-dialog.glade: removed underlined accelerator key from
- "_Go To Today" button. GnomeDialog doesn't actually support underlined
- accelerator keys for buttons. We could hack it, like Glade does, if
- we really need to. Fixes bug #6418.
-
-2001-08-08 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-day-view.c (update_query): Stop editing any event. Fixes
- bug #5949.
-
-2001-08-08 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-page.c (alarm_page_fill_component): Duuuh, set
- the alarm_copy on the component, not the original alarm. Fixes
- bug #5214.
-
-2001-08-08 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (set_attendees): set the attendees of
- a component
- (meeting_page_fill_component): use above
- (meeting_page_get_cancel_comp): return a comp with the attendees
- to be cancelled
-
- * gui/dialogs/meeting-page.h: get a component that will be sent as
- a cancellation
-
- * gui/dialogs/event-editor.c (event_editor_class_init): override
- send_comp class method
- (event_editor_send_comp): send cancellation notices to deleted
- attendees
- (refresh_meeting_cmd): save before send
- (forward_cmd): ditto
-
- * gui/dialogs/comp-editor.c (comp_editor_class_init): set default
- send_comp method
- (real_send_comp): do the real work
- (comp_editor_send_comp): call class method
- (save_comp): don't do any sending
- (save_comp_with_send): save and send here
- (prompt_to_save_changes): use above
- (save_close_cmd): ditto
-
- * gui/dialogs/comp-editor.h: add virtual function
-
-2001-08-08 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-week-view-event-item.c
- (e_week_view_event_item_draw_icons): don't use a NULL mask in the
- call to gdk_gc_set_clip_mask
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- ditto
-
- * gui/e-day-view-main-item.c
- (e_day_view_main_item_draw_day_event): ditto
-
-2001-08-08 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit-config.h: fix pre-processor
- macros
-
- * conduits/calendar/calendar-conduit.h: ditto
-
- * conduits/todo/todo-conduit-config.h: fix pre-processor macros
-
- * conduits/todo/todo-conduit.h: ditto
-
-2001-08-07 Federico Mena Quintero <federico@ximian.com>
-
- * cal-client/cal-listener.c (cal_listener_stop_notification): New
- function to stop further notification from happening.
- (impl_notifyCalOpened): Do not notify if requested.
- (impl_notifyObjUpdated): Likewise.
- (impl_notifyObjRemoved): Likewise.
- (impl_notifyCategoriesChanged): Likewise.
- (CalListenerPrivate): Do not keep a reference to the server-side
- Cal. This would create a circular reference since the server
- keeps a reference to the listener.
- (cal_listener_destroy): Likewise.
- (impl_notifyCalOpened): Likewise.
-
- * pcs/cal.c (cal_destroy): bonobo_object_release_unref() the listener.
-
- * cal-client/cal-client.c (cal_client_destroy): Ask the listener
- to stop notifications. Also, do not unref it as the server does
- that itself when we unref the Cal.
-
-2001-08-07 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-model.c (calendar_model_free_value): Only unref the
- FIELD_COMPONENT if it is non-NULL. We return a NULL for that
- field from ::initialize_value(), after all. Fixes bug #6098.
-
-2001-08-07 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): Make calendar.ics the
- suggested name when attaching the ical object
-
-2001-08-06 Damon Chaplin <damon@ximian.com>
-
- * gui/e-week-view.h:
- * gui/e-day-view.h: added 'different_timezone' fields to EDayViewEvent
- and EWeekViewEvent, to note that the event is in a different timezone.
- We now compute this once when we add the event to the array, rather
- than each time we draw the event. If it is set, we will draw the
- timezone icon next to the event.
-
- * gui/e-day-view-main-item.c: take transparency into account when
- drawing the blue vertical bars to represent busy time.
-
- * gui/tag-calendar.c: take transparency into account when tagging
- the mini calendar.
-
- * gui/e-calendar-table.c (e_calendar_table_init): removed the "None"
- options for transparency and classification, since these properties
- have defaults anyway, so we may as well use those to keep it simple.
- Also use "Free" and "Busy" for transparency, rather than "Transparent"
- and "Opaque".
-
- * gui/calendar-model.c: updated classification & transparency code
- as above.
-
- * gui/e-calendar-table.etspec: changed "Transparency" to "Show Time As"
- since people have a chance of understanding that.
-
- * gui/e-week-view.c:
- * gui/e-day-view.c:
- * gui/gnome-cal.c: added functions to get the visible time range.
-
- * gui/calendar-commands.c: finished stuff to set the folder bar
- label to the dates currently displayed.
-
- * gui/control-factory.c (control_factory_new_control): connected
- signal to update the folder title bar label when the dates shown
- are changed. I had to connect it here since we need the BonoboControl
- in the callback, and I don't know how to get the control from the
- widget.
-
- * gui/tasks-control.c (tasks_control_activate): clear the folder bar
- label. We could display something here at some point.
-
- * gui/dialogs/recurrence-page.glade: changed "_Add" to "A_dd", since
- we have an "_Actions" menu. (These also use Alt+key, right?)
-
- * gui/dialogs/event-page.glade:
- * gui/dialogs/event-page.c: added 'Show Time As' field, which is
- really the TRANSP property but with a better name!
- Also changed one of the "_Confidential" to "Con_fidential" since we
- already have "_Contacts" using the same 'C' key.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): skip
- events that are TRANSPARENT. Also added comment as this code looks
- inefficient.
-
- * cal-util/cal-component.c: removed stuff for comparing timezones.
-
- * gui/comp-util.c (cal_comp_util_compare_event_timezones): moved the
- above function here, and updated it to compare the UTC offsets of the
- times as well as the TZIDs.
-
-2001-08-06 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: In process of fixing bug
- #6005. The "Calendar" page is now "Display", and it has no
- frames. The "Task list" page has colons between the labels and
- the color pickers, and it has no frame.
-
-2001-08-06 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.c (destroy_wombat_client): added check for
- NULL pointers. Maybe fixes #5203 (I can't reproduce it, so I'm not
- sure)
-
-2001-08-03 Federico Mena Quintero <federico@ximian.com>
-
- * cal-client/query-listener.c (query_listener_stop_notification):
- New function; stops further notification from happening. This is
- needed since the listener is destroyed asynchronously from the
- Wombat and the corresponding CalQuery may already have died.
- (impl_notifyObjUpdated): Do not notify if requested.
- (impl_notifyObjRemoved): Likewise.
- (impl_notifyQueryDone): Likewise.
- (impl_notifyEvalError): Likewise.
-
- * cal-client/cal-query.c (cal_query_destroy): Use
- query_listener_stop_notification().
-
- * cal-client/cal-listener.c (cal_listener_destroy): Nullify the
- pointers to the callback functions.
-
- * gui/e-day-view.c (update_query): Commit our state of no longer
- having a query before unrefing it. We may reenter from the ORBit
- main loop and we *really* want this information to be committed.
-
- * gui/e-week-view.c (update_query): Likewise.
-
- * gui/calendar-model.c (update_query): Likewise.
-
- * gui/tag-calendar.c (tag_calendar_by_comp): Added a "clear_first"
- argument that indicates whether the ECalendar should be cleared of
- any marks first.
-
- * gui/calendar-commands.c (calendar_control_activate): Removed
- ifdefed-out view buttons code from the Gnomecal days.
-
- * gui/gnome-cal.c (client_categories_changed_cb): Merge the
- categories of the calendar and tasks clients so that we can
- display the categories in both sets.
- (gnome_calendar_construct): Connect to "categories_changed" on
- both clients.
- (gnome_calendar_on_date_navigator_selection_changed): Removed call
- to gnome_calendar_update_view_buttons().
- (gnome_calendar_update_view_buttons): Removed. We cannot have
- this until Bonobo supports radio toolbar items.
- (gnome_calendar_set_view_buttons): Removed.
- (gnome_calendar_dayjump): Do not use priv->day_button.
- (GnomeCalendarPrivate): Removed the {day,work_week,week,month}_button
- fields.
- (gnome_calendar_set_query): Start a retagging process of the date
- navigator so that it reflects the current query.
- (update_query): New function to restart a query for the date navigator.
- (initial_load): Use update_query() instead of tagging the date
- navigator directly.
- (gnome_calendar_on_date_navigator_date_range_changed): Likewise.
- (client_cal_opened_cb): Use update_query() instead of initial_load().
- (initial_load): Removed.
- (client_obj_updated_cb): Removed.
- (client_obj_removed_cb): Removed.
- (gnome_calendar_new_appointment_for): Set the default category of
- the new component.
- (search_bar_category_changed_cb): Set the default category for the
- calendar views.
-
- * gui/cal-search-bar.c (cal_search_bar_set_categories): Sort the
- categories before creating the menu.
-
- * gui/e-day-view.c (adjust_query_sexp): Return NULL instead of
- "#f" if the time range is not set yet.
- (update_query): Do not start a query if the time range is not set.
- (e_day_view_set_default_category): New function.
- (e_day_view_key_press): Set the default category on the new
- component.
-
- * gui/e-week-view.c (adjust_query_sexp): Analogous to the above.
- (update_query): Analogous to the above.
- (e_week_view_set_default_category): Analogous to the above.
- (e_week_view_key_press): Analogous to the above.
-
-2001-08-03 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #1407.
-
- * gui/dialogs/cal-prefs-dialog.glade: Removed the alarm
- preferences page, since we decided it was unnecessary.
-
-2001-08-03 Zbigniew Chyla <cyba@gnome.pl>
-
- I18n fixes.
-
- * gui/dialogs/event-page.c (summary_changed_cb):
- Use e_dialog_editable_get instead of gtk_editable_get_chars (we need
- UTF-8 string).
-
- * gui/itip-utils.c:
- Added missing #include <config.h>
-
-2001-08-02 Jon Trowbridge <trow@ximian.com>
-
- * gui/Makefile.am: Added camel dependency (now needed by ebook).
-
-2001-08-01 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-model.c (calendar_model_value_is_empty): If the
- default category is the same as the value passed in to this
- function, return TRUE. This could be a hack or not, but it
- prevents two items from being added to the table if a category is
- selected.
-
- * gui/e-tasks.c (setup_widgets): Allow the search bar to shrink
- horizontally.
-
- * gui/dialogs/task-page.c (clear_widgets): Pass valid values to
- e_dialog_option_menu_set(); these need to come from the status map.
-
-2001-08-01 Damon Chaplin <damon@ximian.com>
-
- * cal-client/cal-client.c: removed debugging messages.
-
-2001-08-01 Federico Mena Quintero <federico@ximian.com>
-
- The calendar search bar widget now includes a drop-down menu of
- available categories.
-
- * pcs/query.c (func_has_categories): Handle one and only one #f
- value as meaning "unfiled", for components that have no categories
- at all.
-
- * pcs/cal-backend-file.c (open_cal): Duh, do not notify here about
- changed categories since at this point we don't have any clients
- bound to us yet.
- (create_cal): Likewise.
- (cal_backend_file_add_cal): Notify here.
-
- * gui/cal-search-bar.h (CalSearchBarClass): New signal
- "category_changed".
-
- * gui/cal-search-bar.c (cal_search_bar_construct): Add a drop-down
- menu for the list of categories.
- (search_option_items): Removed the "Has category" option, since we
- now have the drop-down menu instad and it would be confusing to
- have both options.
- (regen_query): Likewise. Also, this function is now the old
- cal_search_bar_query_changed() and is shared by that very function
- and by the callback from the drop-down menu.
- (notify_query_contains): Include the sub-sexp for the categories.
- (cal_search_bar_set_categories): New function.
- (cal_search_bar_get_category): New function.
- (categories_selection_done_cb): Emit the "category_changed" signal.
-
- * gui/e-tasks.c (obj_updated_cb): Removed function since it did
- not do anything; all updates are handled by the CalendarModel.
- (obj_removed_cb): Likewise.
- (ETasksPrivate): Removed the fields for the categories option
- menu, since now it is in the ESearchBar.
- (search_bar_sexp_changed_cb): Use calendar_model_set_query()
- directly here, as we do not need to frob the sexp anymore.
- (update_query): Removed.
- (client_categories_changed_cb): New callback.
- (search_bar_category_changed_cb): New callback.
- (e_tasks_new_task): Set the default category on the component to
- the one that is selected in the search bar.
- (e_tasks_on_filter_selected): Removed.
- (e_tasks_on_categories_changed): Removed.
- (e_tasks_rebuild_categories_menu): Removed.
- (e_tasks_add_menu_item): Removed.
- (e_tasks_setup_view_menus): Sanitized not to sink objects wildly.
- (e_tasks_discard_view_menus): New function.
-
- * gui/calendar-model.h (CalendarModelClass): Removed the
- "categories_changed" signal since this is handled in the Wombat
- now.
-
- * gui/calendar-model.c (calendar_model_get_categories): Removed.
- (calendar_model_set_value_at): Do not collect the categories.
- (query_obj_updated_cb): Likewise.
- (calendar_model_collect_categories): Removed.
- (calendar_model_set_default_category): Constify.
-
- * gui/tasks-control.c (tasks_control_deactivate): Call
- e_tasks_discard_view_menus().
-
- * gui/gnome-cal.c (search_bar_category_changed_cb): Set the
- default category for the task pad's model.
-
-2001-07-31 Federico Mena Quintero <federico@ximian.com>
-
- The Wombat now keeps track of which categories are present in the
- objects of a calendar. It will notify the clients of changes in
- this set. This is to make the category drop-down menus in the
- calendar/tasks views be always up to date.
-
- * idl/evolution-calendar.idl (Listener): Added a
- notifyCategoriesChanged() method. The Wombat now keeps track of
- the categories within a calendar.
-
- * cal-client/cal-listener.[ch]: Switched it to use BonoboXObject.
- Also added the notifyCategoriesChanged implementation.
-
- * cal-client/cal-client.[ch]: Added a "categories_changed" signal.
-
- * pcs/cal-backend-file.c: Maintain a list of the live categories.
- (update_categories_from_comp): New function to maintain the set of
- live categories.
- (add_component): Update the set of categories.
- (remove_component): Likewise.
- (open_cal): Notify about changes in the set of categories.
- (create_cal): Likewise.
- (cal_backend_file_update_objects): Likewise.
- (cal_backend_file_remove_object): Likewise.
- (notify_categories_changed): New function to notify the clients
- about the current set of categories.
-
- * pcs/cal.c (cal_notify_categories_changed): New function.
-
-2001-07-31 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (selection_received):
- * gui/e-week-view.c (selection_received): yes, set the end date, but
- correctly calculated, not by using the component's duration, which
- may not exist. Now really fixes #5836
-
-2001-07-31 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (selection_received):
- * gui/e-week-view.c (selection_received): don't set the end date
- for the pasted components, since it will be recalculated when the start
- date is set, thus keeping the same duration than the original
- cut/copied component. Fixes #5836
-
-2001-07-30 Damon Chaplin <damon@ximian.com>
-
- * gui/gnome-cal.c:
- * gui/calendar-commands.c (clear_folder_bar_label): started some code
- to show the currently displayed dates in the folder title bar.
- Unfinished.
-
- * gui/e-itip-control.c (set_date_label):
- * conduits/todo/todo-conduit.c (local_record_from_comp):
- * conduits/calendar/calendar-conduit.c (local_record_from_comp): free
- the CalComponentDateTimes. (Note the iTIP control needs updating for
- timezone support.)
-
- * cal-util/cal-component.c: Changed CalComponentDateTime so that the
- TZID is malloc'ed and freed rather than being a pointer to a static
- string. This was causing problems as sometimes we were freeing the
- string that was being pointed to, so we got corrupted TZIDs.
-
- * gui/comp-util.c (cal_comp_util_add_exdate): set TZID to NULL.
- DATE values do not have timezones.
-
- * gui/e-week-view.c:
- * gui/e-day-view.c: Moved 'Paste' after the New Appointment commands,
- since I think they are more commonly-used. Also added underlined
- accelerator keys.
-
- * gui/e-calendar-table.c: changed 'Edit this task' to 'Open' in the
- popup menu to be consistent with other folders, and separated from the
- clipboard commands. Also changed to use EPopupMenu so the accelerators
- work, and the masks may be useful at some point.
-
- * gui/dialogs/recurrence-page.c: use DATE values for UNTIL, since
- that makes it simpler. Fixes bug #5034.
-
- * gui/calendar-config.c (calendar_config_set_timezone): strdup the
- location string. Fixes bug #4990.
-
- * gui/tag-calendar.c (tag_calendar_cb): take 1 off iend as the times
- don't include the end time.
-
- * gui/e-week-view-layout.c (e_week_view_layout_event): fixed
- days_shown. Fixes bug #5709.
-
- * cal-client/cal-client.c (cal_client_get_timezone): took out some
- debugging messages.
-
-2001-07-30 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.glade: added Help button. Though of
- course it doesn't do anything yet.
-
-2001-07-30 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c: Mark strings for translation
-
-2001-07-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/client-test.c (cal_opened_cb): call
- cal_client_get_free_busy for testing the new method
-
- * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): implemented
-
-2001-07-28 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #5352.
-
- * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_show): Added a
- `page' argument so that we can select which page to show when
- popping up the dialog.
- (cal_prefs_dialog_construct): Added the `page' argument as well.
- (cal_prefs_dialog_new): Likewise.
-
- * gui/calendar-commands.c (settings_cmd): Set the page to the main
- calendar settings one.
-
- * gui/tasks-control.c (tasks_control_settings_cmd): Implemented
- callback for the "Task Settings" command.
- (verbs): Added the "TasksSettings" verb.
- (pixmaps): Added an icon for the tasks settings command.
-
-2001-07-27 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- recur is always in UTC
-
-2001-07-27 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c: handle timezones
- everywhere
- (get_timezone): new function to get a timezone based
- on a tzid
- (get_default_timezone): get default timezone
-
- * conduits/calendar/calendar-conduit.h: time zone field for the
- context
-
- * conduits/calendar/Makefile.am: link to bonobo conf
-
- * conduits/todo/todo-conduit.c: handle timezones
- everywhere
- (get_timezone): new function to get a timezone based
- on a tzid
- (get_default_timezone): get default timezone
-
- * conduits/todo/todo-conduit.h: time zone field for the
- context
-
- * conduits/todo/Makefile.am: link to bonobo conf
-
-2001-07-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw_icons):
- initialize to NULL some pointers
-
- * e-calendar-table.c (selection_received): deal correctly with
- VCALENDAR objects
- (e_calendar_table_copy_clipboard): g_strdup the value returned by
- icalcomponent_get_as_ical_string
-
-2001-07-27 Federico Mena Quintero <federico@ximian.com>
-
- * gui/gnome-cal.c (gnome_calendar_set_query): Constify and set the
- query sexp on the task pad's model as well.
-
-2001-07-27 Federico Mena Quintero <federico@ximian.com>
-
- * gui/cal-search-bar.[ch]: New files with a derivative of
- ESearchBar that generates sexps for calendar queries directly.
-
- * gui/gnome-cal.c (setup_widgets): Use CalSearchBar instead of
- ESearchBar.
-
- * gui/e-calendar-table.h (ECalendarTable): Removed the ->colors
- array since it is handled by ETableExtras now.
-
- * gui/e-calendar-table.[ch]: Removed the subset_model. Now we use
- the live query facility to filter tasks. Removed the filter
- function stuff as well.
-
- * gui/e-tasks.c (e_tasks_construct): Use
- calendar_model_set_cal_client() directly instead of
- e_calendar_table_set_model().
- (setup_widgets): Create a calendar search bar for the tasks
- component.
- (search_bar_sexp_changed_cb): Set the query sexp on the table model.
- (e_tasks_on_filter_selected): Regenerate the query from the
- selected category and the current sexp.
- (update_query): New convenience function to recompute the real
- query sexp.
-
- * gui/gnome-cal.c (gnome_calendar_construct): Likewise.
-
- * gui/e-calendar-table.c (e_calendar_table_set_cal_client):
- Removed function; people are now supposed to get the model from
- the calendar table and operate on it.
-
- * gui/calendar-commands.c (verbs): Consistency fixes with the XML
- file.
- (pixmaps): Likewise.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- cal-search-bar.[ch] to the list of sources.
-
-2001-07-20 Federico Mena Quintero <federico@ximian.com>
-
- * idl/evolution-calendar.idl (CompEditorFactory): New interface to
- a centralized factory for calendar component editors. Has
- editExisting() and editNew() methods to edit an existing component
- from a URI/UID pair, and to create a new component in a calendar
- that is in a particular URI, respectively.
-
- * gui/comp-editor-factory.[ch]: Implementation files for the
- component editor factory.
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Added the CompEditorFactory
- stuff.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- comp-editor-factory.[ch] to the list of sources.
-
-2001-07-26 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (invite_entry_changed): when an entry
- has changed, iterate over the elements of the entry and add them
- to the list if need be
- (get_select_name_dialog): add a Chair Persons section
-
- * gui/itip-utils.c (itip_send_comp): send the empty string as
- subject if there is no summary
-
-2001-07-26 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): send the empty string as
- subject if there is no summary
-
- * gui/dialogs/meeting-page.c (cleanup_attendees): free a list of
- attendees
- (meeting_page_fill_widgets): clean up attendee lists and fix typo
- (find_match): add ability to return pos of match
- (popup_delete_cb): if deletion happens, make sure to tidy up
- delegation chain
-
- * gui/dialogs/e-delegate-dialog.c (e_delegate_dialog_construct):
- use the destination rather than text property
- (e_delegate_dialog_get_delegate): ditto
- (e_delegate_dialog_new): take name/address pair for dialog default
-
- * gui/dialogs/e-delegate-dialog.h: update protos
-
- * gui/e-itip-control.c (clean_up): only unref the object if we
- have one
-
- * gui/itip-control-factory.c (stream_read): make sure we null
- terminate the final buffer
-
- * gui/itip-utils.c (itip_send_comp): strip the mailto: from the
- organizer address if necessary
-
-2001-07-26 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/recurrence-page.c (exception_select_row_cb): check that
- the row passed in is valid. Sometimes we get the "row-selected"
- signal for row 0 when there are no rows in the list. Fixes bug #4266.
-
- * cal-client/cal-client.c (cal_client_get_object): prefetch all the
- timezone data needed by the object, to try to avoid making Corba
- calls all over the place. They can cause problems because they call
- the GTK+ main loop recursively. This currently leads to an assertion
- failure in the GnomeCanvas occasionally.
-
-2001-07-25 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (e_itip_control_set_data): gracefully
- handle the lack of a method
-
-2001-07-25 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (selection_received_cb): check type of component
- before actually pasting.
- Deal with VCALENDAR components also (fixes bug #5140)
-
- * gui/e-week-view.c (selection_received_cb): ditto
-
- * cal-client/cal-client.c (cal_client_update_object): check the return
- value from cal_component_get_as_string and don't call
- GNOME_Evolution_Calendar_Cal_updateObjects if NULL
-
-2001-07-25 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (pixmaps): used the new print preview icon.
-
- * gui/print.c (range_selector_new): changed the 'Current day/week...'
- strings to 'Selected day/week...' to make a little less confusing.
- Fixes bug #5451.
-
-2001-07-25 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (is_duplicate): see if the address is
- already in the list of attendees
- (duplicate_error): throw up an error dialog
- (popup_delegate_cb): if the attendee has already delegated, delete
- the old delegatee
- (value_at): cast to kill warnings
- (append_row): don't add the new attendee if they are already in
- the list
-
-2001-07-24 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/recurrence-page.c (get_exception_string): calculate
- tmp_tm.tm_wday ourselves. strftime has a habit of crashing if you
- have weird values here. I think this fixes bug #4574.
-
-2001-07-24 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (value_at): stip the delto and
- delfrom
- (popup_delegate_cb): show a delegate dialog and add the new
- delegatee and update the delegator
- (add_section): listen for changes in a more direct manner
- (get_select_name_dialog): add_section now takes a limit argument
-
- * gui/dialogs/e-delegate-dialog.[hc]: New dialog to query the user
- for a person to delegate to
-
- * gui/dialogs/Makefile.am: build/install new files
-
- * gui/Makefile.am: add ldadd line for ebook
-
-2001-07-21 Damon Chaplin <damon@ximian.com>
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw): fixed
- the test to see whether we should draw the icons.
-
-2001-07-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (get_local_file_name_for_folder_type):
- New helper function.
- (remove_folder): Add a @type arg and handle it, by deleting
- "tasks.ics" instead of "calendar.ics" if the type is "tasks". If
- the type is not "tasks" or "calendar", report an
- `UNSUPPORTED_TYPE' error.
- (xfer_folder): Likewise.
-
-2001-07-21 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c: Make folders of type "calendar" and
- "tasks" user-creatable by setting `user_creatable' to %TRUE in the
- `EvolutionShellComponentFolderType's.
-
-2001-07-19 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/event-editor.h (event_editor_update_widgets):
- Removed unused prototype.
-
- * gui/dialogs/task-editor.h (task_editor_update_widgets):
- Likewise.
-
-2001-07-19 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (clean_up): free various data related
- settings
- (destroy): use cleanup and unref the clients
- (e_itip_control_set_data): clean up before setting the data and
- store the timezones in a top level component
- (update_item): use cal_client_update_objects and our top level
- (including the timezones)
-
-2001-07-19 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/comp-editor.c (pixmaps):
- * gui/calendar-commands.c (pixmaps): updated to use new print icon.
-
-2001-07-17 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/recurrence-page.c (init_widgets): don't show the time
- in the EDateEdit widget for adding EXDATEs.
-
- * cal-util/cal-component.c (cal_component_alarm_set_trigger): don't
- set t.time.is_date to -1. It is a boolean flag, 0 or 1. We probably
- don't want a date value, so we leave it at 0.
-
-2001-07-18 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- do not discard drawing icon if mask is NULL
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- ditto
-
-2001-07-17 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (get_next): find the next displayable
- component
- (get_prev): find the previous displayable component
- (e_itip_control_set_data): use above
- (prev_clicked_cb): ditto
- (next_clicked_cb): ditto
-
-2001-07-17 Federico Mena Quintero <federico@ximian.com>
-
- Really fixes #4380. The previous fix was necessary but not
- sufficient; it worked for me because my system timezone happens to
- match the Evolution timezone --- if they don't match, the bug
- would persist. Not matching is *not* an error; it is just a
- matter of Unix sucking a lot and XST not being finished :)
-
- * cal-util/timeutil.c (time_to_gdate_with_zone): New function. We
- cannot use g_date_set_time() anymore because it does not take
- timezones into account.
-
- * gui/gnome-cal.c (get_days_shown): Use the function above.
-
- * gui/e-day-view.c (e_day_view_find_work_week_start): Likewise.
-
- * gui/e-week-view.c (e_week_view_set_selected_time_range): Likewise.
-
-2001-07-17 Jon Trowbridge <trow@ximian.com>
-
- * gui/dialogs/meeting-page.c (invite_entry_changed): Print
- a g_message when the list of invited people changes
- in the SelectNames control.
- (add_section): #if 0/#endif out some (broken?) code.
- (get_select_name_dialog): Listen for changes in the
- SelectNames control.
-
-2001-07-17 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/e-timezone-dialog.c (e_timezone_dialog_destroy): destroy
- the dialog widget here. Fixes bug #4198.
-
-2001-07-16 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/task-page.c (task_page_fill_widgets):
- * gui/dialogs/event-page.c (event_page_fill_widgets): try to use
- builtin timezones before getting them from the server. When creating
- new events/tasks the timezones may not be on the server.
-
- * gui/dialogs/event-page.c (event_page_fill_widgets): for all-day
- events we subtract a day from the end date rather than add it.
-
- * gui/dialogs/e-timezone-dialog.c (on_map_leave): ignore the event
- if it isn't a GDK_CROSSING_NORMAL event. For some reason we are getting
- leave events when the button is pressed, which meant that selecting
- timezones in the map didn't work.
-
- * gui/dialogs/comp-editor-util.c (comp_editor_dates):
- * gui/print.c (print_date_label): only free icaltimetype if not NULL.
-
-2001-07-12 Taylor Hayward <taylorhayward@yahoo.com>
-
- * gui/goto-dialog.glade:
- * gui/meeting-mockup.glade:
- * gui/alarm-notifylarm-notify.glade:
- * gui/dialogs/alarm-page.glade:
- * gui/dialogs/meeting-page.glade:
- * gui/dialogs/recurrence-page.glade: Added missing underlined
- shortcuts.
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-util.h: new proto
-
- * cal-util/cal-util.c (cal_util_new_top_level): standard place to
- get your top level calendar component
-
- * pcs/cal-backend-file.c (create_cal): use it
-
- * gui/itip-utils.c (itip_send_comp): ditto
-
- * gui/e-calendar-table.c (e_calendar_table_copy_clipboard): ditto
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * gui/e-calendar-table.c (e_calendar_table_copy_clipboard): fix
- typo breaking compilation
-
- * gui/dialogs/meeting-page.c: fix include
-
- * gui/dialogs/Makefile.am: build select names idl here
-
- * gui/Makefile.am: remove select names compilation from here
-
-2001-07-12 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-details-page.c (task_details_page_set_dates):
- guard against infinite loops with the updating boolean, fixes 4270
-
-2001-07-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar-table.c: added support for multiple selections in
- cut/copy/paste. Also, it's now ready for the
- s/update_object/update_objects change (I think)
-
-2001-07-11 Damon Chaplin <damon@ximian.com>
-
- * idl/evolution-calendar.idl: renamed updateObject to updateObjects
- and removed the UID argument, since it can add/update multiple objects
- at once. (It can't yet, but it will!)
-
- * pcs/cal.c:
- * pcs/cal-backend.[hc]:
- * pcs/cal-backend-file.c: renamed update_object to update_objects and
- got rid of the UID arg.
-
- * cal-client/cal-client.c (cal_client_update_objects): new function to
- add/update multiple objects in one go, i.e for iTIP and for importing
- calendars.
-
- * gui/print.c (print_date_label): fixed type bug.
-
- * gui/e-week-view.[hc]:
- * gui/e-week-view-event-item.c: draw the timezone icons if the event's
- DTSTART or DTEND is in a different timezone to the current one.
- Note that we may want to change this so it compares the UTC offsets
- rather than the TZIDs, since currently it will draw the icons for all
- events coming from iTIP requests from other clients.
-
-2001-07-11 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #4380 as well as some leftovers from the days of struct
- tm and some uninitialized values.
-
- * gui/gnome-cal.c
- (gnome_calendar_on_date_navigator_selection_changed): Initialize
- the icaltimetype structures completely.
- (gnome_calendar_init): Do not reset priv->zone to NULL here, since
- it was set by gnome_calendar_update_config_settings() from
- setup_widgets().
-
- * gui/calendar-model.c (set_completed): Do not set is_daylight.
-
- * gui/e-day-view.c (e_day_view_convert_grid_position_to_time):
- Likewise.
-
- * gui/e-week-view.c (e_week_view_set_timezone): Likewise.
-
- * cal-util/cal-recur.c (generate_instances_for_chunk): Likewise,
- and initialize start_tt and end_tt completely.
-
- * cal-util/timeutil.c (time_year_begin_with_zone): Likewise.
- (time_month_begin_with_zone): Likewise.
- (time_week_begin_with_zone): Likewise.
- (time_day_begin_with_zone): Likewise.
- (time_day_end_with_zone): Likewise.
- (time_from_isodate): Likewise.
-
- * gui/dialogs/task-page.c (task_page_fill_component): Initialize
- icaltime before using it.
-
- * gui/dialogs/event-page.c (event_page_fill_component): Likewise.
-
- * gui/dialogs/recurrence-page.c (simple_recur_to_comp): Removed an
- unused icaltimetype.
-
- * gui/dialogs/task-details-page.c
- (task_details_page_fill_component): Initialize icaltime before
- using it.
-
-2001-07-11 JP Rosevear <jpr@ximian.com>
-
- * gui/component-factory.c: fix the calendar not exiting with a
- gross hack because i don't have time to fix the ref counting right
- now
-
-2001-07-11 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c: be careful about adding and
- stripping MAILTO:'s properly
-
- * gui/dialogs/meeting-page.etspec: add missing columns
-
- * gui/itip-utils.c (itip_strip_mailto): point to the real start of
- the email address
-
- * gui/itip-utils.h: add proto
-
- * gui/itip-control-factory.c: get rid of the my address property
-
- * gui/e-itip-control.c: use the users real identity to figure out
- which attendee they are
- (find_my_address): figure out who the user is among the attendees
-
- * gui/e-itip-control.h: remove protos
-
- * gui/dialogs/Makefile.am: extra dist etspecs
-
- * gui/Makefile.am: ditto
-
-2001-07-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/e-calendar-table.c: Added a hack to get the last
- string translated since xml-i18n-tools doesn't recognize
- _click-to-add-message="Click here to add a task".
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * gui/Makefile.am (BUILT_SOURCES): Move this higher so that
- Makefile properly depends on us. Fixes distcheck.
-
-2001-07-11 Jason Leach <jleach@ximian.com>
-
- [Fix bug #4389: ETableSpecification still in e-calendar-table.c
- file]
-
- * gui/e-calendar-table.etspec: New file containing the spec that
- was in e-calendar-table.c as a big string.
-
- * gui/e-calendar-table.c (e_calendar_table_init): Use the spec
- file instead of a string.
- (e_calendar_table_get_spec): Removed this function, we don't need
- it anymore.
-
- * gui/e-tasks.c (e_tasks_setup_menus): Don't load from string,
- from file instead.
-
- * gui/Makefile.am: Necessary changes to get the new .etspec file
- installed.
-
-2001-07-10 Jason Leach <jleach@ximian.com>
-
- [Fix bug #4388: ETableSpecification still in meeting-page.c file]
-
- * gui/dialogs/meeting-page.etspec: New file containing the spec
- that was previously in meeting-page.c as a string.
-
- * gui/dialogs/meeting-page.c: One line change to get it to use
- this spec file instead of a string.
-
- * gui/dialogs/Makefile.am: Necessary changes to get the new
- meeting-page.etspec installed.
-
-2001-07-10 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-model.c:
- * gui/e-calendar-table.c:
- * gui/e-day-view-main-item.c:
- * gui/e-day-view-top-item.c:
- * gui/e-day-view.[hc]:
- * gui/e-week-view.c:
- * gui/gnome-cal.c:
- * gui/print.c:
- * gui/dialogs/cal-prefs-dialog.c:
- * gui/dialogs/comp-editor-util.c:
- * gui/dialogs/event-page.c:
- * pcs/cal-backend-file.c:
- * pcs/query.c:
- * cal-util/cal-component.[hc]:
- * cal-util/cal-recur.c:
- * cal-util/timeutil.[hc]:
- * cal-client/cal-client.[hc]: more timezone updates. I'm pretty much
- done with the calendar code now, except for alarms and conduits,
- which Federico and JP know more about. And there are a couple of
- other minor things to fix. But it is still pretty buggy.
-
-2001-07-10 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c: Add popup support so you can delete
- users from the list
-
- * gui/dialogs/comp-editor.c (setup_widgets): fix typo
-
-2001-07-10 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-queue.c (alarm_trigger_cb): Handle the
- different alarm actions.
- (display_notification): Do the alarm notification dialog here.
-
- * gui/alarm-notify/alarm-notify-dialog.c (make_heading): Take in a
- CalComponentVType, not a whole component.
- (alarm_notify_dialog): Take in a CalComponentVType and the final
- message instead of generating it ourselves.
-
-2001-07-09 Federico Mena Quintero <federico@ximian.com>
-
- * pcs/cal-backend-file.c (generate_alarms_for_comp): Pass the
- parent vCalendar component as the timezone closure of
- cal_recur_generate_instances().
-
- * gui/dialogs/alarm-page.c (get_alarm_string): Make the string
- consistent with the option menu text.
- (get_alarm_string): Removed extra spaces from the last part of the
- alarm string.
-
-2001-07-09 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-day-view.c (e_day_view_key_press): Use
- e_utf8_from_gtk_event_key() so that we can input utf8 text
- properly.
- (e_day_view_cut_clipboard): Constify.
- (e_day_view_on_cut): Constify.
- (e_day_view_reshape_long_event): Remove unused variable.
-
- * gui/e-week-view.c (e_week_view_key_press): Use
- e_utf8_from_gtk_event_key() so that we can input utf8 text
- properly.
- (e_week_view_cut_clipboard): Constify.
- (e_week_view_on_cut): Constify.
-
- * cal-client/cal-client.c (cal_client_resolve_tzid_cb): Fix the
- prototype so that this matches CalRecurResolveTimezoneFn. Also
- renamed it so that it is clear that it is supposed to be a
- callback.
-
-2001-07-06 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (init_widgets): connect to the entry
- not the combo
-
- * gui/dialogs/event-editor.c (set_menu_sens): set menu
- sensitivities based on whether or not the meeting page is shown
- (event_editor_init): call above
- (event_editor_edit_comp): ditto
- (schedule_meeting_cmd): ditto
-
- * gui/dialogs/comp-editor.h: new proto
-
- * gui/dialogs/comp-editor.c (comp_editor_set_ui_prop): new
- function to allow for set of ui props (esp. "sensitive")
-
-2001-07-06 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c (clear_widgets): actually clear some
- widgets and hide/show widgets in the default setup
- (meeting_page_destroy): destroy the address lists
- (meeting_page_fill_widgets): allow the user to select among their
- identities as a new organizer, or show the existing organizer as
- label
- (meeting_page_fill_component): set the "MAILTO:" bit of the
- organizer to match spec, set CN properly if we know it
- (get_widgets): load new widgets
- (other_clicked_cb): handle "Other Organizer" click
- (change_clicked_cb): handle "Change Organizer" click
- (init_widgets): listen for clicks on new buttons
-
- * gui/dialogs/comp-editor.c (comp_editor_remove_page): remove the
- page from our internal list and unref it
-
- * gui/itip-utils.c (itip_addresses_get): get the configure mail
- identities
- (itip_addresses_free): free a list of identities returned by
- itip_addresses_get
-
- * gui/itip-utils.h: remove obsolete protos, and new protos
-
- * gui/gnome-cal.html: Remove ancient file
-
-2001-07-04 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #4018 and what would be the analogous bugs for the other
- component editors.
-
- * gui/dialogs/comp-editor-page.h (CompEditorPageClass): New
- virtual method "::focus_main_widget()".
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_focus_main_widget): New function.
-
- * gui/dialogs/comp-editor.c (comp_editor_append_page): If we are
- inserting the main page, ask it to focus its main widget.
-
- * gui/dialogs/alarm-page.c (alarm_page_focus_main_widget):
- Implemented.
-
- * gui/dialogs/event-page.c (event_page_focus_main_widget):
- Implemented.
- #include "e-util/e-categories-config.h".
-
- * gui/dialogs/meeting-page.c (meeting_page_focus_main_widget):
- Implemented.
-
- * gui/dialogs/recurrence-page.c
- (recurrence_page_focus_main_widget): Implemented.
-
- * gui/dialogs/task-details-page.c
- (task_details_page_focus_main_widget): Implemented.
-
- * gui/dialogs/task-page.c (task_page_focus_main_widget):
- Implemented.
-
-2001-07-04 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-commands.c (clear_folder_bar_label): New function.
- (calendar_control_activate): Clear the folder bar label; we really
- don't have anything interesting to display.
-
-2001-07-03 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/meeting-page.c: Add new columns for information
- specification
- (meeting_page_destroy): save the table state
- (build_etable): load new table state
-
- * gui/dialogs/task-editor.c (task_editor_destroy): unref pages
-
- * gui/dialogs/event-editor.c (event_editor_destroy): unref pages
-
- * gui/dialogs/comp-editor.c (setup_widgets): kill warning
- (comp_editor_append_page): ref page passed in
- (close_dialog): unref pages
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * gui/e-day-view.c (query_obj_updated_cb): fix warning, and added
- some debug messages.
-
- * gui/dialogs/comp-editor-util.c (write_label_piece):
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw): call mktime()
- to set the weekday, though this is a temporary fix.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * pcs/cal-backend.[hc]: added virtual method to get a VTIMEZONE
- component given a TZID. We need this to resolve TZIDs when expanding
- an event using cal_recur_generate_instances() in query.c.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_timezone): implemented
- virtual method.
- (cal_backend_file_update_object): fixed bug, kind -> child_kind.
-
- * pcs/query.c (func_occur_in_time_range): use the virtual method for
- resolving TZIDs. The other way didn't work anyway, as we didn't have
- the entire VCALENDAR with VTIMEZONEs in it.
-
- * gui/dialogs/recurrence-page.c (init_widgets):
- (make_ending_until_special): moved the call to
- e_date_edit_set_get_time_callback() from init_widgets to
- make_ending_until_special(), since that is where the widget gets
- created.
-
- * gui/e-timezone-entry.c (e_timezone_entry_set_timezone): handle zone
- being NULL.
-
-2001-07-02 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/alarm-options.[ch]: New files with the alarm options
- dialog; this configures the repeat/duration properties and the
- options specific to each alarm action type.
-
- * gui/dialogs/alarm-page.c (AlarmPagePrivate): Added the alarm
- options button. Also, keep an alarm structure which we are
- editing and an alarm options dialog.
- (init_widgets): Connect to the options button.
- (add_clicked_cb): Clone the component we are editing instead of
- creating a new one so that we preserve the data from the alarm
- options dialog.
- (button_options_clicked_cb): Pop up the alarm options dialog.
-
- * cal-util/cal-component.c (cal_component_alarm_new): Doh,
- initialize the other fields in the new alarm.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * cal-client/cal-client.[hc]
- * cal-util/cal-component.c
- * cal-util/cal-recur.[hc]
- * cal-util/test-recur.c
- * cal-util/timeutil.c
- * gui/calendar-config.c
- * gui/calendar-model.[hc]
- * gui/comp-util.[hc]
- * gui/e-calendar-table.c
- * gui/e-day-view-main-item.c
- * gui/e-day-view-top-item.c
- * gui/e-day-view.[hc]
- * gui/e-itip-control.c
- * gui/e-timezone-entry.[hc]
- * gui/e-week-view.[hc]
- * gui/gnome-cal.[hc]
- * gui/goto.c
- * gui/tag-calendar.[hc]
- * gui/dialogs/cal-prefs-dialog.c
- * gui/dialogs/comp-editor-page.[hc]
- * gui/dialogs/comp-editor-util.[hc]
- * gui/dialogs/comp-editor.c
- * gui/dialogs/e-timezone-dialog.[hc]
- * gui/dialogs/event-page.c
- * gui/dialogs/meeting-page.c
- * gui/dialogs/recurrence-page.c
- * gui/dialogs/task-details-page.c
- * gui/dialogs/task-details-page.glade
- * gui/dialogs/task-page.c
- * idl/evolution-calendar.idl
- * pcs/cal-backend-file.c
- * pcs/cal-backend.c
- * pcs/cal-backend.h
- * pcs/cal.c
- * pcs/query.c: timezone changes everywhere. There's still quite a
- few things to update, and its not working well at present.
-
-2001-07-02 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-commands.c (publish_freebusy_cmd): publish
- free/busy information for the currently viewed time range
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * gui/Makefile.am (INCLUDES): Added $(BONOBO_CONF_CFLAGS).
- (evolution_calendar_LDADD): Added $(BONOBO_CONF_LIBS).
-
-2001-07-02 Federico Mena Quintero <federico@ximian.com>
-
- Support for ATTACH, DESCRIPTION properties in alarm components.
-
- * cal-util/cal-component.c (scan_alarm_property): Deal with
- ATTACH, DESCRIPTION properties.
- (cal_component_alarm_get_attach): New function. Libical is
- actually bogus; supposedly icalattachtype structures are
- refcounted but the property functions return them by value.
- (cal_copmonent_alarm_set_attach): New function.
- (cal_component_alarm_get_description): New function.
- (cal_component_alarm_set_description): New function.
-
-2001-07-02 Federico Mena Quintero <federico@ximian.com>
-
- Support for repeat/duration properties in alarm components.
-
- * cal-util/cal-component.h (CalAlarmRepeat): New structure that
- pairs the repeat/duration values of an alarm component, which must
- be set both together or not set at all.
-
- * cal-util/cal-component.c (CalComponentAlarm): Added fields for
- the repeat and duration properties.
- (scan_alarm_property): Scan the DURATION and REPEAT properties.
- (make_alarm): Nullify/initialize all the fields in the alarm.
- (cal_component_alarm_get_repeat): New function.
- (cal_component_alarm_set_repeat): New function.
-
- * gui/dialogs/alarm-page.glade: Changed the label of display
- alarms from "Show a dialog" to "Display a message".
-
-2001-07-02 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-details-page.c
- (task_details_page_fill_widgets): fill in delegated from field
-
-2001-07-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/dialogs/task-page.c (categories_clicked_cb):
- * gui/dialogs/event-page.c (categories_clicked_cb): use the new
- self-contained e_categories_config_open_dialog_for_entry() function
-
- * gui/e-week-view-event-item.c (e_week_view_item_draw_icons):
- * gui/e-day-view-top-item.c (e_day_view_reshape_long_event):
- (e_day_view_reshape_day_event): ditto
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- use e_categories_config_get_icon_for() to retrieve the icon
- associated with each category
-
-2001-07-02 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (send_freebusy): implement
-
- * cal-util/cal-component.c (set_attendee_list): add the delto
- property rather than the delfrom property twice
-
- * gui/dialogs/task-editor.c (task_editor_edit_comp): show
- delegation info if appropriate
- (delegate_task_cmd): delegate command
- (cancel_task_cmd): cancel command
- (refresh_task_cmd): refresh command
-
- * gui/dialogs/task-details-page.c: Load new widgets
- (task_details_page_show_delegation): show/hide delegation info widgets
-
- * gui/dialogs/task-details-page.h: new proto
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): free
- attendee list when finished
-
- * gui/dialogs/comp-editor.c (setup_widgets): explicitly show the
- widgets, update pixmaps after the verbs have been added
- (comp_editor_focus): don't do a show all
-
-2001-07-02 Federico Mena Quintero <federico@ximian.com>
-
- Fixes bug #1406.
-
- * gui/calendar-config.c (config_read): Handle the options for the
- task list colors.
- (calendar_config_write): Ditto.
- (calendar_config_get_tasks_due_today_color): New function.
- (calendar_config_set_tasks_due_today_color): New function.
- (calendar_config_get_tasks_overdue_color): New function.
- (calendar_config_set_tasks_overdue_color): New function.
- (calendar_config_configure_e_calendar_table): Use
- e_table_model_changed() for the colors.
-
- * gui/dialogs/cal-prefs-dialog.glade: Updated the options for the
- task list and alarms.
-
- * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_show_config):
- Update the task list settings.
- (cal_prefs_dialog_update_config): Ditto.
-
- * gui/calendar-model.c (get_color): Deal with tasks for today as
- well as overdue tasks. Make it cleaner, even though we have to
- duplicate a chunk of is_overdue().
-
- * gui/calendar-commands.c (preferences_cmd): Renamed from
- properties_cmd().
-
-2001-07-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view-main-item.c
- (e_day_view_main_item_draw_day_event): draw icons per category
-
- * gui/e-day-view-top-item.c
- (e_day_view_top_item_draw_long_event): draw icons per category
-
- * gui/e-day-view.c
- (e_day_view_reshape_long_event):
- (e_day_view_reshape_day_event): calculate space for category icons
-
- * gui/e-week-view-event-item.c
- (e_week_view_event_item_draw_icons): draw icons per category
-
- * gui/e-week-view.c
- (e_week_view_reshape_event_span): calculate space for category icons
-
-2001-07-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (e_day_view_*_clipboard): fixed clibpoard
- command activation from the menu entries. CTRL-C and CTRL-X don't
- work though, since it seems the key presses are being captured by
- the text item
-
- gui/e-week-view.c (e_week_view_*_clipboard): ditto
-
-2001-06-30 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-week-view-event-item.c
- (e_week_view_event_item_button_press): Only set the
- pressed_event_num and pressed_span_num if button 1 was pressed.
- Fix up return values a bit. This fixes bug #3780.
-
- * gui/gnome-cal.c
- (gnome_calendar_on_date_navigator_selection_changed): Doh, the
- call for the day view was supposed to be
- gnome_calendar_set_view(), not set_view(). Fixes bug #3779.
-
-2001-06-30 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/tasks-control.c (tasks_control_cut_cmd): call
- e_calendar_table_cut_clipboard with the correct object
-
- (tasks_control_copy_cmd): ditto
-
- (sensitize_commands): sensitize clipboard commands based on the
- number of selected tasks
-
-2001-06-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar-table.[ch] (e_calendar_table_cut_clipboard),
- (e_calendar_table_copy_clipboard),
- (e_calendar_table_paste_clipboard): new functions for allowing the
- execution of clipboard-related commands
-
- * gui/tasks-control.c (tasks_control_cut_cmd),
- (tasks_control_copy_cmd), (tasks_control_paste_cmd): added
- callbacks for the new clipboard-related menu entries
-
-2001-06-28 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/component-factory.c: removed not-uses-anymore parameter in
- call to evolution_shell_component_new
-
- * gui/gnome-cal.[ch] (gnome_calendar_cut_clipboard),
- (gnome_calendar_copy_clipboard), (gnome_calendar_paste_clipboard):
- new functions for allowing execution of clipboard-related commands
-
- * gui/e-day-view.[ch] (e_day_view_cut_clipboard),
- (e_day_view_copy_clipboard), (e_day_view_paste_clipboard): ditto
-
- * gui/e-week-view.[ch] (e_week_view_cut_clipboard),
- (e_week_view_copy_clipboard), (e_week_view_paste_clipboard): ditto
-
-2001-06-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/calendar-commands.c (cut_event_cmd),
- (copy_event_cmd), (paste_event_cmd): added callbacks for the new
- clipboard-related menu entries
-
-2001-06-27 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (factory_fn): Pass NULL as the
- @external_uri_schemas argument to
- `evolution_shell_component_new()'.
-
-2001-06-27 Peter Williams <peterw@ximian.com>
-
- * conduits/*/Makefile.am (INCLUDES): More srcdir != builddir
- fixes.
-
-2001-06-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar-table.c (selection_received): fixed
- (e_calendar_table_on_copy): fixed
-
-2001-06-26 Federico Mena Quintero <federico@ximian.com>
-
- * idl/evolution-calendar.idl (CalAlarmInstance): Renamed the occur
- field to occur_start; added an occur_end field. This way we can
- present the complete times for the occurrence from the server.
-
- * cal-util/cal-component.h (CalAlarmInstance): Likewise.
-
- * pcs/cal-backend-file.c (add_alarm_occurrences_cb): Fill the new
- fields appropriately.
- (generate_absolute_triggers): Likewise; we use -1 in case the
- component has no DTSTART or DTEND because there are no meaningful
- occurrence dates here.
- (fill_alarm_instances_seq): Fill in the new fields.
-
- * cal-client/cal-client.c (build_alarm_instance_list): Likewise.
-
- * gui/alarm-notify/alarm-notify-dialog.c (alarm_notify_dialog):
- Take in both the occur_start and occur_end times.
-
- * gui/goto.c (goto_dialog): Free the dlg structure on the bail-out
- cases.
-
- * gui/dialogs/event-page.c (get_widgets): Do not assert if we
- cannot find the main widget; just return FALSE.
-
- * gui/dialogs/alarm-page.c (get_widgets): Likewise.
-
- * gui/dialogs/task-page.c (get_widgets): Likewise.
-
- * gui/dialogs/task-details-page.c (get_widgets): Likewise.
-
- * gui/dialogs/meeting-page.c (get_widgets): Likewise.
-
-2001-06-25 Peter Williams <peterw@ximian.com>
-
- * conduits/calendar/Makefile.am (INCLUDES): Fixes for
- srcdir != builddir. Link to the static libwombat.
-
- * conduits/todo/Makefile.am (INCLUDES): Here too.
-
-2001-06-24 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/notify-main.c (main): Initialize libglade.
-
- * pcs/cal-backend-file.c (compute_alarm_range):
- icaldurationtype_as_int() will now return a negative value if
- dur->is_neg is true, so we need to flip the sign of some
- operations here.
- (add_alarm_occurrences_cb): Likewise.
-
- * pcs/cal-backend-db.c (compute_alarm_range): Likewise.
- (add_alarm_occurrences_cb): Likewise.
-
-2001-06-24 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c: Converted to use BonoboXObject.
-
- * gui/gnome-cal.c (gnome_calendar_open): Ask the alarm
- notification service to add the calendar and tasks URIs.
- (add_alarms): New function.
-
- * gui/alarm-notify/notify-main.c (main): Doh, fixed typo in the
- OAFIID.
- (main): Initialize and shut down gnome-vfs.
-
- * gui/Makefile.am (IDLS): Added evolution-calendar.idl, sigh.
- (evolution_calendar_SOURCES): Added the files generated from the IDL.
-
- * gui/alarm-notify/alarm-queue.c (alarm_trigger_cb): New function
- used when an alarm is triggered.
-
- * gui/dialogs/Makefile.am: Removed the alarm-notify-dialog files;
- they are now in gui/alarm-notify.
-
- * gui/alarm-notify/Makefile.am: Added the alarm-notify-dialog
- files.
-
- * pcs/cal.c (cal_forget_password): This was incorrectly named
- cal_client_forget_password(); renamed it.
-
- * gui/main.c (main): Initialize and shut down gnome-vfs.
-
-2001-06-23 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-calendar-table.c (task_compare_cb): New function to
- compare tasks like the Pilot task list.
-
- * cal-util/cal-component.h (CalComponentField): Added a
- semi-hackish CAL_COMPONENT_FIELD_COMPONENT. In the ETable model,
- it is intended to return a pointer to the component itself.
-
- * gui/calendar-model.c (calendar_model_value_at): Return the
- component itself for CAL_COMPONENT_FIELD_COMPONENT. Be more
- paranoid about invalid columns.
- (calendar_model_set_value_at): Be more paranoid about invalid
- columns.
- (calendar_model_duplicate_value): Ref the component field.
- (calendar_model_initialize_value): Deal with the component field.
- (calendar_model_value_is_empty): Likewise.
- (calendar_model_value_to_string): Likewise.
-
-2001-06-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/Makefile.am: Added itip-control-factory.* to the build.
-
-2001-06-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal.[ch] (cal_get_password): new function for the backends to
- be able to call the getPassword method on the associated
- WombatClient
- (cal_forget_password): ditto for the forgetPassword method
-
-2001-06-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: changed getFreeBusy method to return
- a CalObj instead of a sequence
-
- * cal-client/cal-client.[ch] (cal_client_get_free_busy): changed it to
- work like the cal_client_get_object function, that is, it does not
- return anymore a list of UIDs, but a CalClientGetStatus code, and
- added a new parameter for the caller to get the component back when
- this function returns
- (cal_client_open): aggregate WombatClient interface to the CalListener
- being used
-
- * pcs/cal-backend-db.c, pcs/cal-backend-file.c (..get_free_busy): set
- return value to "char *" as it will be returning a FreeBusy object,
- and not a list of UIDs
-
- * pcs/cal-backend.[ch] (cal_backend_get_free_busy): ditto
-
- * pcs/cal.c (cal_construct): queryInterface on the listener to obtain
- the WombatClient interface
-
-2001-06-21 JP Rosevear <jpr@ximian.com>
-
- * gui/main.c (main): update to new call
-
- * gui/e-itip-control.[hc]: break the widget bits out on their own
- into a proper object, basic stuff seems to be working again
-
- * gui/itip-control-factory.c: put the control specific bits here
- from e-itip-control.c
-
- * gui/itip-control-factory.h: new header
-
-2001-06-21 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/Makefile.am (gladedir): add include path
-
- * gui/dialogs/comp-editor.c (setup_widgets): remove buttons and
- use evolution's standard ui config
-
- * gui/print.c (print_comp_item): print description text
-
-2001-06-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * cal-client/cal-client.[ch]:
- (cal_client_init): create a WombatClient when creating a CalClient
- object, so that we can receive authentication notifications from
- the wombat
- (cal_client_destroy): destroy the WombatClient object when dying
- (cal_client_set_auth_func): new function to set the authentication
- function to be called when a password is required by the calendar
- server (through the WombatClient object)
- (cal_client_get_free_busy): new function for calling the new IDL
- method Cal::getFreeBusy
-
- * gui/alarm-notify/Makefile.am: add libwombat to LDADD
-
- * gui/Makefile.am: add libwombat to LDADD
-
-2001-06-20 Dave Camp <dave@ximian.com>
-
- * gui/itip-utils.c (itip_send_comp): Changed attach_data
- to be a GNOME_Evolution_Composer_AttachmentData rather than a
- CORBA_char*.
-
-2001-06-20 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor.c (print_cmd): print menu command
- (print_preview_cmd): ditto for print preview
- (print_setup_cmd): ditto for print setup
- (comp_editor_set_cal_client): listen for updated and removed
- signals
- (obj_updated_cb): if the item changes else where, query the user
- for the course of action
- (obj_removed_cb): ditto for removal
-
- * gui/print.c (print_setup): rudimentary page setup support
- (print_comp): rudimentary individual event/task printing support
-
- * gui/print.h: new protos
-
- * gui/dialogs/changed-comp.[hc]: dialog to query the user about
- what to do when a item is changed elsewhere
-
- * gui/dialogs/Makefile.am: build new files
-
- * gui/dialogs/send-comp.c (send_component_dialog): remove useless
- assignment
-
-2001-06-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * idl/evolution-calendar.idl: added getFreeBusy method
-
- * pcs/cal.c (impl_Cal_get_free_busy): implementation of the new
- getFreeBusy added method
-
- * pcs/cal-backend.[ch]: added new virtual method to the CalBackend
- class (get_free_busy)
-
- * pcs/cal-backend-db.c (cal_backend_db_get_free_busy): new function,
- not implemented yet
-
- * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): new funtion,
- not implemented yet
-
-2001-06-20 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-config.[hc]:
- * gui/gnome-cal.[hc]:
- * gui/tasks-control.c (tasks_control_activate):
- * gui/calendar-commands.c (calendar_control_activate): moved the
- function to check for a default timezone to calendar-config.c, and
- also used it in the tasks control.
-
- * gui/dialogs/e-timezone-dialog.h: #include <gtk/gtkwidget.h> fix.
-
-2001-06-20 Damon Chaplin <damon@ximian.com>
-
- * gui/calendar-commands.c (calendar_control_activate):
- * gui/gnome-cal.[hc]: added code to show the timezone dialog if the
- user hasn't set a default timezone yet.
-
- * gui/dialogs/e-timezone-dialog.c (e_timezone_dialog_add_timezones):
- set the "None" item string before adding it to the combo, to stop the
- combo putting "None" in the entry initially.
-
-2001-06-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-calendar-table.[ch]: added cut/copy/paste support. It works
- with single selections (a single component selected) and with
- multiple ones (several components selected)
-
-2001-06-19 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/event-page.c: if the timezones of the start and end of
- the event are the same, then if the start timezone is changed we
- change the end timezone as well, since that is what most users will
- want.
-
-2001-06-19 Damon Chaplin <damon@ximian.com>
-
- * pcs/cal.c:
- * idl/evolution-calendar.idl:
- * cal-client/cal-client.[hc]: removed stuff to get builtin timezone
- info from the server.
-
-2001-06-19 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/cal-prefs-dialog.c: added a 'Time zone' setting. Also
- rearranged a little, adding a new 'General' page, since we had too
- many settings on the 'Calendar' page.
-
- * gui/e-timezone-entry.[hc]:
- * gui/dialogs/e-timezone-dialog.[hc]:
- * gui/dialogs/comp-editor.c:
- * gui/dialogs/comp-editor-page.[hc]:
- * gui/dialogs/event-page.c:
- * gui/dialogs/task-details-page.c:
- * gui/dialogs/task-page.c: removed CalClient stuff. The timezone dialog
- now uses the timezone data directly from the client's libical library.
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor.c (task_editor_init): add ui
- (forward_cmd): implement forward command
-
- * gui/dialogs/comp-editor.c (save_as_ok): bug fix, seems to work
- now
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * gui/control-factory.c (control_factory_init): add auto exit unref
-
- * gui/component-factory.c (destroy_cb): destroy our selves if we
- have no more shells
- (component_factory_init): add auto exit unref
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * gui/Makefile.am: don't compile or install the old meeting edit
- stuff
-
- * gui/e-week-view.c: ditto
-
- * gui/e-day-view.c: Remove scheduling menu option
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * gui/itip-utils.c: add some needed commas
- (itip_send_comp): if publishing, don't set the to list and show
- the message. unless publishing, just send the email
-
- * gui/Makefile.am: remove typo
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/send-comp.c: itip/imip send dialog
-
- * gui/dialogs/send-comp.h: new proto
-
- * gui/dialogs/recurrence-page.c (recurrence_page_set_dates): only
- use the weekday picker if visible
-
- * gui/dialogs/meeting-page.c: just show the meeting list
-
- * gui/dialogs/event-editor.c (event_editor_edit_comp): remove the
- meeting page if no attendees
- (schedule_meeting_cmd): schedule a meeting menu item
- (refresh_meeting_cmd): refresh meeting request menu item
- (cancel_meeting_cmd): ditto for cancel
- (forward_cmd): send as attachment
-
- * gui/dialogs/comp-editor.c (comp_editor_remove_page): remove page
- from dialog
- (comp_editor_show_page): show a given page
- (comp_editor_get_current_comp): return a cal component
- representing the current widget state
- (comp_editor_save_comp): save the cal component
- (comp_editor_delete_comp): delete the cal component
- (comp_editor_send_comp): send the cal component
- (comp_editor_merge_ui): merge xml in to the bonobo gui
- (setup_widgets): use a bonobo window instead of a gtk window, add menus again
- (save_as_cmd): save to file on disk - still broken
- (save_close_cmd): close menu command
- (save_close_cmd): save and close menu command
-
- * gui/dialogs/comp-editor.h: new protos
-
- * gui/dialogs/cancel-comp.c (cancel_component_dialog): itip/imip
- cancellation dialog
-
- * gui/dialogs/cancel-comp.h: new proto
-
- * gui/dialogs/Makefile.am: build new files
-
- * gui/dialogs/comp-editor-page.c
- (comp_editor_page_notify_needs_send): emit needs_send signal
-
- * gui/dialogs/comp-editor-page.h: new signal protos
-
- * gui/itip-utils.c (itip_send_comp): new function to send cal
- components
-
- * gui/itip-utils.h: new proto
-
- * gui/e-itip-control.c (pstream_load): trim using cal-component
- wrapper stuff
- (accept_button_clicked_cb): use itip_send_comp
- (tentative_button_clicked_cb): ditto
- (decline_button_clicked_cb): ditto
-
- * gui/Makefile.am: compile select name idl stuff
-
- * cal-util/cal-component.c (cal_component_get_organizer): get the organizer
- (cal_component_set_organizer): set the organizer
- (cal_component_get_recurid): get the recurrence id
- (cal_component_set_recurid): set the recurrence id
- (set_attendee_list): actually set the attendee list
- (get_attendee_list): build the attendee list
-
- * cal-util/cal-component.h: new protos
-
-2001-06-19 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/task-details-page.glade:
- * gui/dialogs/task-page.glade:
- * gui/dialogs/event-page.glade: added timezone fields. Also moved the
- 'All Day' flag into an alignment so it doesn't mess up the height of
- the other widgets.
-
- * gui/dialogs/task-details-page.c:
- * gui/dialogs/task-page.c:
- * gui/dialogs/event-page.c: added code to handle the timezone fields.
- This still needs to be hooked up when the libical code is finished.
-
- * gui/dialogs/e-timezone-dialog.c (on_map_leave): new function to
- clear the preview label and turn off the highlighted point on the
- map when you move the mouse outside it.
- (find_selected_point): new function to try to find the point
- corresponding to the text in the combo.
- (on_combo_changed): call the above function to update the selected
- point.
- (on_map_leave): turn off the preview point & label when the mouse
- leaves the map.
- (e_timezone_dialog_set_cal_client): changed it so that selecting "None"
- clears the entry.
-
- * gui/dialogs/comp-editor-page.[hc]: added set_cal_client() virtual
- method since some pages need to access the CalClient to get timezone
- information. Also added comp_editor_page_set_cal_client() to call
- the virtual method.
-
- * gui/dialogs/comp-editor.c (comp_editor_set_cal_client): called
- comp_editor_page_set_cal_client() on each page.
-
- * gui/calendar-config.c: added functions to get & set the timezone.
-
-2001-06-18 Eskil Heyn Olsen <eskil@eskil.dk>
-
- * conduits/calendar/calendar-conduit.c: (comp_from_remote_record),
- (check_for_slow_setting), (conduit_get_gpilot_conduit):
- * conduits/todo/todo-conduit.c: (check_for_slow_setting),
- (conduit_get_gpilot_conduit):
- Tweaked for some gnome-pilot api changes
-
-2001-06-15 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-view.[ch]: New files with the generic calendar view
- object. It sucks that we have to implement at least two classes
- to define a GalView and its factory.
-
- * gui/calendar-view-factory.[ch]: New files; factory for calendar
- views.
-
- * gui/gnome-cal.h (GnomeCalendarViewType): Moved from gnome-cal.c
- and renamed from ViewType. We no longer use strings to identify
- the view types.
-
- * gui/gnome-cal.c (gnome_calendar_get_view_type): New function.
- (set_view): Renamed from gnome_calendar_set_view_internal().
- (gnome_calendar_set_query): Made public; renamed from set_query().
- (gnome_calendar_setup_view_menus): New function to set up the view
- collection and the GalViewMenus.
- (gnome_calendar_discard_view_menus): New function to discard them.
-
- * gui/calendar-commands.c (calendar_control_activate): Set up the
- GalView menus.
- (calendar_control_deactivate): Discard the GalView menus.
-
- * gui/e-day-view.c: #include <gtk/gtkinvisible.h>
-
- * gui/dialogs/comp-editor.c (comp_editor_get_type): The type info
- structure should be static.
-
-2001-06-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (selection_received): generate a new UID
- when pasting
-
- * gui/e-week-view.c (selection_received): ditto
-
-2001-06-15 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.c (selection_received): finished implementation
- of Paste stuff
-
- * gui/e-week-view.c (selection_received): ditto
-
-2001-06-14 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.[ch]: added popup menu items for cut/copy/paste
-
- * gui/e-week-view.[ch]: ditto
-
-2001-06-14 Damon Chaplin <damon@ximian.com>
-
- * gui/e-timezone-entry.[hc]: new widget to enter a timezone.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): added the above.
- * gui/Makefile.am (evolution_calendar_LDADD): had to move
- libcal-dialogs.a above libmiscwidgets.a to get it to compile.
-
-2001-06-14 Damon Chaplin <damon@ximian.com>
-
- * gui/dialogs/e-timezone-dialog.[hc]:
- * gui/dialogs/e-timezone-dialog.glade: new dialog for setting the
- time zone.
-
- * gui/dialogs/Makefile.am: added timezone dialog files.
-
- * idl/evolution-calendar.idl: added CalTimezoneInfo struct and seq,
- and getBuiltinTimezoneInfo method.
-
- * pcs/cal.c (impl_Cal_get_builtin_timezone_info): implemented method.
- (cal_class_init): added method to epv.
-
- * cal-client/cal-client.c (struct CalClientPrivate): added
- timezone_info array to contain cached info on builtin timezone city
- names and coordinates.
- (cal_client_get_builtin_timezone_info): new function to get the info
- about builtin timezones.
-
- * cal-client/cal-client.h: added CalTimezoneInfo struct, to contain
- the city names and coords of the builtin timezones.
-
-2001-06-13 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor-util.c (comp_editor_date_label): remove
- unnecessary space
-
- * gui/dialogs/task-page.c (task_page_set_summary): indicate we are
- updating, Fixes #3307
-
-2001-06-13 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-details-page.c (task_details_page_set_dates):
- set the completed time in the date editor if appropriate
-
- * gui/dialogs/task-page.c (task_page_set_dates): if we are
- updating, return
- (complete_date_changed): don't returns if we are updating - the
- guards are done in the calling function
- (status_changed): indicate when we are updating and when we are
- finished, round the completion time to the nearest minute
- (percent_complete_changed): indicate when are updating and when we
- are finished
- (percent_complete_changed): notify of the date change after the
- option menu is updated
-
-2001-06-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/e-day-view.[ch]: added cut&paste support, by using a GtkInvisible
- widget to manage the clipboard selections.
-
- * gui/e-week-view.[ch]: ditto
-
-2001-06-08 Iain Holmes <iain@ximian.com>
-
- * gui/component-factory.c: Removed the executive-summary includes.
- (component_factory_init): Don't init the summary factory.
-
- * gui/calendar-summary.[ch]: Removed.
-
- * gui/Makefile.am: Remove executive-summary stuff, move some libs
- around a bit.
-
-2001-06-04 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/recurrence-page.c (recurrence_page_set_dates):
- update the blocked/selected days if the starting day of the
- appointment changes, fixes #2188
-
- * gui/dialogs/task-details-page.h: tidy proto
-
-2001-06-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/e-itip-control.c: #include <bonobo/bonobo-context.h> instead
- of <bonobo/bonobo-running-context.h>.
- * gui/tasks-control-factory.c: Likewise.
-
- * gui/Makefile.am (evolution_calendar_LDADD): Move `$(DB3_LDADD)'
- before libeutil.
-
-2001-06-01 JP Rosevear <jpr@ximian.com>
-
- * gui/Makefile.am: no longer build widget-util.*, the code has
- been moved
-
-2001-06-01 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/event-page.c (make_date_edit): use new func
-
- * gui/dialogs/task-details-page.c
- (task_details_page_create_date_edit): ditto
-
- * gui/dialogs/recurrence-page.c (make_ending_until_special): ditto
-
- * gui/dialogs/comp-editor-util.c (comp_editor_new_date_edit):
- rename date_edit_new function
-
- * gui/dialogs/comp-editor-util.h: new proto
-
- * gui/dialogs/task-page.c (task_page_set_summary): no longer any
- need to block/unblock the handler
- (task_page_create_date_edit): use new func
-
-2001-06-01 JP Rosevear <jpr@ximian.com>
-
- * gui/.cvsignore: Update
-
- * gui/evolution-calendar-control.c: Remove dead file
-
- * gui/*.vcf: Remove dead files
-
-2001-06-01 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/comp-editor-page.[hc]: renamed from editor-page for
- consistency, more complete implementation
-
- * gui/dialogs/comp-editor.[hc]: More complete implementation
-
- * gui/dialogs/*-page.*: The various pages needed to construct the
- event and task dialogs
-
- * gui/dialogs/comp-editor-util.[hc]: useful utility functions for the
- component editor pages to use
-
- * gui/dialogs/Makefile.am: Build and install new files
-
- * gui/event-editor*: Remove, obsoleted by the new comp-editor
- stuff
-
- * gui/dialogs/task-editor-dialog.glade: ditto
-
- * gui/e-calendar-table.c (open_task): update to use comp editor
- stuff
-
- * gui/e-tasks.c (e_tasks_new_task): ditto
-
- * gui/gnome-cal.c (gnome_calendar_edit_object): ditto
-
- * gui/Makefile.am: don't build non-existent files nor try to
- install them
-
-2001-06-01 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (e_itip_control_factory_init): ditto
-
- * gui/tasks-control-factory.c (tasks_control_factory_init):
- auto_exit_unref the factory
-
-2001-06-01 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/Makefile.am (evolution_calendar_LDADD): Add `$(DB3_LDADD)'.
-
-2001-05-29 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-tasks.c (e_tasks_get_calendar_table): New function.
-
- * gui/tasks-control.c (tasks_control_activate): Connect to the
- "selection_changed" signal of the tasks widget here, not in
- tasks_control_new(). Also, update the sensitivity of the commands
- here for the first time.
- (tasks_control_deactivate): Disconnect from the signal here since
- it only makes sense to monitor selection changes while the control
- is active.
- (selection_changed_cb): Removed hack that tested the presence of
- the remote UI container.
- (sensitize_commands): New function.
-
-2001-05-28 Damon Chaplin <damon@ximian.com>
-
- * gui/e-week-view-layout.[hc]:
- * gui/e-day-view-layout.[hc]: new files to contain layout code split
- off from EDayView an EWeekView, so we can use it for printing.
-
- * gui/print.c: rewritten to use the same layout code as the EDayView
- and EWeekView widgets.
-
- * gui/gnome-cal.c (gnome_calendar_get_task_pad_cal_client): added
- function so we can get the CalClient used for the TaskPad for printing.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): added
- e-day-view-layout.[hc] amd e-week-view-layout.[hc].
-
- * cal-util/timeutil.c (time_week_begin):
- (time_week_end): added week_start_day argument.
-
- * cal-util/cal-recur.c: added comments describing problems in it.
-
-2001-05-27 Rodrigo Moya <rodrigo@ximian.com>
-
- * gui/component-factory.c (remove_folder): implemented the
- 'remove_folder' function for the calendar shell component
- (xfer_folder): ditto for 'xfer_folder'
-
-2001-05-27 Dan Winship <danw@ximian.com>
-
- * gui/calendar-commands.c: #include
- "evolution-shell-component-utils.h" rather than "e-gui-utils.h"
- for e_pixmaps_update.
-
- * gui/tasks-control.c: Likewise.
-
-2001-05-25 Peter Williams <peterw@ximian.com>
-
- * gui/Makefile.am: Reference libeshell.la instead of libeshell.a.
-
-2001-05-23 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/recurrence-page.c: Finished porting from the old
- event-editor.c. Made it store a clone of the component for when
- we need to expand the recurrence set.
-
- * gui/dialogs/event-page.c (event_page_get_dates): New function.
-
- * gui/dialogs/editor-page.c (editor_page_set_dates): Renamed from
- editor_page_set_dtstart(); now sets both DTSTART and DTEND.
-
- * gui/dialogs/alarm-page.c (alarm_page_set_dates): Ahem, it is a
- label, not an entry.
-
-2001-05-21 Federico Mena Quintero <federico@ximian.com>
-
- Fix bug #2831; the tasks toolbar and menu now have a button to
- delete the selected tasks.
-
- * gui/e-calendar-table.c (e_calendar_table_delete_selected): New
- function.
- (delete_cb): Use e_calendar_table_delete_selected().
- (e_calendar_table_get_table): New function.
-
- * gui/tasks-control.c (tasks_control_new_task_cmd): Handle the
- delete command.
- (selection_changed_cb): Change the sensitivity of the TasksDelete
- command when the selection in the table changes.
-
- * gui/e-tasks.c (table_selection_change_cb): Notify upstream when
- the ETable selection changes.
-
-2001-05-18 Federico Mena Quintero <federico@ximian.com>
-
- Fix bug #2829.
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Allow the
- caller to specify whether just one or many components are to be
- deleted.
-
- * gui/e-calendar-table.c (tasks_popup_one): Popup menu definition
- for when one and only one task is selected.
- (tasks_popup_many): Likewise, for more than one task.
- (e_calendar_table_on_right_click): Do not create a structure for
- the closure data; we can simply pass the cal_table. Use a
- different menu depending on the number of selected tasks.
- (mark_as_complete_cb): Renamed; now iterates over the selected
- rows.
- (delete_selected_components): New function to delete all the
- selected components.
- (delete_cb): Adjusted for delete_component_dialog().
- (open_task): New function, simply open a CalComponent in the task
- editor.
- (open_task_by_row): Renamed; use open_task().
-
- * gui/e-week-view.c (e_week_view_on_delete_appointment): Updated
- for delete_component_dialog().
-
- * gui/e-day-view.c (e_day_view_on_delete_appointment): Likewise.
-
-2001-05-16 Duncan Mak <duncan@ximian.com>
-
- * gui/Makefile.am (evolution_calendar_SOURCES): removed
- editor-page.[ch] because they've now moved dialogs.
-
-2001-05-16 Federico Mena Quintero <federico@ximian.com>
-
- Split the event and task editors into different objects for the
- separate pages; this way they can be shared by both editors.
-
- * gui/dialogs/editor-page.[ch]: New abstract class for a page in a
- calendar component editor.
-
- * gui/dialogs/event-page.[ch]: Main page of an event editor.
-
- * gui/dialogs/alarm-page.[ch]: Alarm page of a calendar component
- editor.
-
- * gui/dialogs/recurrence-page.[ch]: Recurrence page of a calendar
- component editor.
-
- * gui/dialogs/event-page.c (event_page_fill_widgets): Eeek, this
- was missing a bunch of break statements.
- (event_page_fill_component): Use a temporary variable rather than
- allocating a struct icaltimetype.
-
- * gui/dialogs/alarm-page.c (get_alarm_string): Do not use
- fixed-size buffers.
- (alarm_page_fill_widgets): Use cal_obj_uid_list_free().
- (append_reminder): Now the list stores the plain CalComponentAlarm
- structures in the row data. We do *NOT* want to be frobbing the
- component's data directly. Rather, we clone the alarms from the
- component and maintain them on our own.
- (alarm_page_fill_component): Clone the alarms before adding them
- to the component so that we maintain the invariant that the alarm
- structures in the list did *not* come from the component.
-
- * cal-util/cal-component.c (cal_component_add_alarm): Added
- documentation.
- (cal_component_remove_alarm): Added documentation.
- (cal_component_remove_alarm): Do a lookup in our hash table of
- alarms instead of scanning the whole component.
- (CalComponentAlarm): Removed the `parent' field, since it was
- unused.
- (cal_component_free_alarm_uids): Removed function, since
- cal_component_get_alarm_uids() is documented so that the user will
- know that he must use cal_obj_uid_list_free().
- (cal_component_alarm_clone): New function.
-
-2001-05-09 Federico Mena Quintero <federico@ximian.com>
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- editor-page.[ch] to the list of sources.
-
-2001-05-09 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor.c (reminder_add_cb): switch on the correct
- widget and map
-
-2001-05-08 JP Rosevear <jpr@ximian.com>
-
- * gui/e-itip-control.c (e_itip_control_factory): unref the
- property bag when we finish with it
-
- * gui/evolution-calendar-control.c (calendar_properties_init): ditto
-
- * gui/control-factory.c (calendar_properties_init): ditto
-
- * gui/calendar-summary.c (create_summary_view): ditto
-
-2001-05-08 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (cal_component_alarm_free):
- (cal_component_alarm_free): free the alarm component if it doesn't
- have a parent, rather than if it does
-
- * gui/Makefile.am: sanitize LD_ADDS and CFLAGS so the libtool
- lines are shorter (fixes problem on solaries due to sed)
-
-2001-05-07 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-factory.[hc]: Convert to bonobo xobject
-
- * pcs/cal.[hc]: Convert to bonobo xobject
-
-2001-05-07 Gediminas Paulauskas <menesis@delfi.lt>
-
- * gui/event-editor.c (make_title_from_comp): conversion summary
- from utf8 here, use translated strings as is.
- (set_title_from_comp): reflect this, simplify.
-
- * gui/dialogs/task-editor.c: updated copies of above functions here.
-
- * gui/gnome-cal.c: use defines from widgets/misc/e-filter-bar.h for
- consistency in "Show all".
-
-2001-05-04 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-model.c (calendar_model_append_row): unref the
- calcomponent when we're done with it
-
- * cal-util/cal-component.c (cal_component_gen_uid): free the iso
- date string when we finish with it
-
-2001-04-27 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-edit.c (put_property_in_list): remove hardcoded
- values
- (edit_attendee): ditto, and there are only 4 roles now
-
- * gui/e-meeting-dialog.glade: tweak
-
- * gui/itip-utils.c: There shouldn't be an "other" role
-
-2001-04-26 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-edit.c (edit_attendee): use enums not hard code
- values
-
-2001-04-26 JP Rosevear <jpr@ximian.com>
-
- * gui/e-meeting-edit.c (add_button_clicked_cb):
- icalparameter_new_rsvp now takes an enum
-
-2001-04-26 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (cal_component_alarm_set_trigger): the
- value type should be inited with ICAL_VALUE_* rather than
- ICAL_*_VALUE because it is a param argument.
-
-2001-04-26 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-model.c (get_is_overdue): Replace "<" by "<=" in
- the comparison for due dates against the current time. This makes
- tasks appear immediately as red when you click Now in the due date
- popup field.
-
- This is not a complete solution to the more general problem of
- tasks staying the same color even if they become overdue while the
- task list remains the same on the screen. This has been logged as
- bug #2399.
-
-2001-04-26 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/Makefile.am (INCLUDES): Add `$(EXTRA_GNOME_CFLAGS)'.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * conduits/todo/Makefile.am (libetodo_conduit_la_LIBADD): Remove
- UNICODE_LIBS
-
- * cal-client/Makefile.am (client_test_LDADD): Remove -lunicode
-
-2001-04-24 Duncan Mak <duncan@ximian.com>
-
- * gui/alarm-notify/notify-main.c (funny_trigger_cb): Fixed
- Strftime so it uses the locale prefered way to display date/time.
- ("%x %X" instead of "%Y/%m/%d %H:%M:%S")
-
-2001-04-21 Gediminas Paulauskas <menesis@delfi.lt>
-
- * gui/calendar-summary.c: translate "Things to do" etc. and convert them
- to utf8. Changed some link from helixcode to ximian.
-
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/dialogs/Makefile.am (INCLUDES): Add
- `-I$(top_srcdir)/calendar/cal-client',
- `-I$(top_builddir)/calendar/cal-client'.
- * gui/Makefile.am (INCLUDES): Likewise.
-
- * cal-client/cal-query.h: #include "evolution-calendar.h".
-
-2001-04-17 Federico Mena Quintero <federico@ximian.com>
-
- * gui/event-editor.c (init_widgets): Connect to the "changed"
- signal of the categories entry so that they will be applied
- correctly.
- (EventEditorPrivate): Added fields for the contacts button and
- entry.
- (init_widgets): Disable the contacts widgets as we do not support
- them yet.
- (get_widgets): Get the contacts widgets.
-
- * gui/dialogs/task-editor.c (get_widgets): Get the contacts
- button, which was missing.
- (init_widgets): Disable the contacts widgets as we do not support
- them yet.
-
- * pcs/query.c (matches_text_list): Use e_utf8_strstrcasedecomp()
- instead of plain e_utf8_strstrcase().
- (matches_summary): Likewise.
-
-2001-04-17 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (cal_component_alarm_set_action): the
- libical action stuff uses enums rather than strings to enumerate
- the various actions now
- (cal_component_alarm_get_action): ditto
-
-2001-04-17 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/alarm-notify/Makefile.am (evolution_alarm_notify_SOURCES):
- Add `$(CORBA_GENERATED)'.
-
-2001-04-16 Dan Winship <danw@ximian.com>
-
- * pcs/Makefile.am (INCLUDES): Add EXTRA_GNOME_CFLAGS, for gal.
-
-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 Norbck <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 28bab236ae..0000000000
--- a/calendar/cal-client/Makefile.am
+++ /dev/null
@@ -1,91 +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 \
- -I$(top_builddir)/libwombat \
- -I$(top_srcdir)/libwombat \
- $(BONOBO_GNOME_CFLAGS)
-
-lib_LTLIBRARIES = libcal-client.la
-
-libcal_clientincludedir = $(includedir)/evolution/cal-client
-
-libcal_client_la_SOURCES = \
- $(CORBA_GENERATED) \
- cal-client-multi.c \
- 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-multi.h \
- 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) \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(top_builddir)/libwombat/libwombat.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-multi.c b/calendar/cal-client/cal-client-multi.c
deleted file mode 100644
index c351d6cbd6..0000000000
--- a/calendar/cal-client/cal-client-multi.c
+++ /dev/null
@@ -1,707 +0,0 @@
-/* Evolution calendar client
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <gtk/gtksignal.h>
-#include "cal-client-multi.h"
-
-/* Private part of the CalClientMulti structure */
-struct _CalClientMultiPrivate {
- GHashTable *calendars;
- GList *uris;
-};
-
-static void cal_client_multi_class_init (CalClientMultiClass *klass);
-static void cal_client_multi_init (CalClientMulti *multi);
-static void cal_client_multi_destroy (GtkObject *object);
-
-/* signal IDs */
-enum {
- CAL_OPENED,
- OBJ_UPDATED,
- OBJ_REMOVED,
- CATEGORIES_CHANGED,
- FORGET_PASSWORD,
- LAST_SIGNAL
-};
-
-static guint cal_multi_signals[LAST_SIGNAL];
-static GtkObjectClass *parent_class = NULL;
-
-/*
- * Private functions
- */
-
-/**
- * cal_client_multi_get_type
- *
- * Registers the #CalClientMulti class if necessary, and returns the type ID
- * assigned to it.
- *
- * Returns: The type ID of the #CalClientMulti class
- */
-GtkType
-cal_client_multi_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GtkTypeInfo info = {
- "CalClientMulti",
- sizeof (CalClientMulti),
- sizeof (CalClientMultiClass),
- (GtkClassInitFunc) cal_client_multi_class_init,
- (GtkObjectInitFunc) cal_client_multi_init,
- NULL,
- NULL,
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (GTK_TYPE_OBJECT, &info);
- }
-
- return type;
-}
-
-/* class initialization function for the multi calendar client */
-static void
-cal_client_multi_class_init (CalClientMultiClass *klass)
-{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- cal_multi_signals[CAL_OPENED] =
- gtk_signal_new ("cal_opened",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientMultiClass, cal_opened),
- gtk_marshal_NONE__POINTER_INT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER, GTK_TYPE_ENUM);
- cal_multi_signals[OBJ_UPDATED] =
- gtk_signal_new ("obj_updated",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientMultiClass, obj_updated),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER, GTK_TYPE_STRING);
- cal_multi_signals[OBJ_REMOVED] =
- gtk_signal_new ("obj_removed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientMultiClass, obj_removed),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER, GTK_TYPE_STRING);
- cal_multi_signals[CATEGORIES_CHANGED] =
- gtk_signal_new ("categories_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientMultiClass, categories_changed),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER, GTK_TYPE_POINTER);
- cal_multi_signals[FORGET_PASSWORD] =
- gtk_signal_new ("forget_password",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientMultiClass, forget_password),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_STRING, GTK_TYPE_STRING);
-
- object_class->destroy = cal_client_multi_destroy;
-}
-
-/* object initialization function for the multi calendar client */
-static void
-cal_client_multi_init (CalClientMulti *multi)
-{
- multi->priv = g_new0 (CalClientMultiPrivate, 1);
- multi->priv->calendars = g_hash_table_new (g_str_hash, g_str_equal);
- multi->priv->uris = NULL;
-}
-
-static void
-free_calendar (gpointer key, gpointer value, gpointer data)
-{
- CalClientMulti *multi = (CalClientMulti *) data;
-
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- multi->priv->uris = g_list_remove (multi->priv->uris, key);
-
- g_free (key);
- gtk_object_unref (GTK_OBJECT (value));
-}
-
-/* destroy handler for the multi calendar client */
-static void
-cal_client_multi_destroy (GtkObject *object)
-{
- CalClientMulti *multi = (CalClientMulti *) object;
-
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- /* free memory */
- g_hash_table_foreach (multi->priv->calendars, free_calendar, multi);
- g_hash_table_destroy (multi->priv->calendars);
- g_list_free (multi->priv->uris);
-
- g_free (multi->priv);
- multi->priv = NULL;
-
- /* chain to parent class' destroy handler */
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/**
- * cal_client_multi_new
- *
- * Creates a new multi-calendar client. This allows you to merge several
- * #CalClient objects into one entity, making it easier to manage
- * multiple calendars.
- *
- * Returns: A newly-created multi-calendar client.
- */
-CalClientMulti *
-cal_client_multi_new (void)
-{
- CalClientMulti *multi;
-
- multi = gtk_type_new (CAL_CLIENT_MULTI_TYPE);
- return multi;
-}
-
-/* CalClient's signal handlers */
-static void
-client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer user_data)
-{
- CalClientMulti *multi = (CalClientMulti *) user_data;
-
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- gtk_signal_emit (GTK_OBJECT (multi),
- cal_multi_signals[CAL_OPENED],
- client, status);
-}
-
-static void
-client_obj_updated_cb (CalClient *client, const char *uid, gpointer user_data)
-{
- CalClientMulti *multi = (CalClientMulti *) user_data;
-
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- gtk_signal_emit (GTK_OBJECT (multi),
- cal_multi_signals[OBJ_UPDATED],
- client, uid);
-}
-
-static void
-client_obj_removed_cb (CalClient *client, const char *uid, gpointer user_data)
-{
- CalClientMulti *multi = (CalClientMulti *) user_data;
-
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- gtk_signal_emit (GTK_OBJECT (multi),
- cal_multi_signals[OBJ_REMOVED],
- client, uid);
-}
-
-static void
-client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer user_data)
-{
- CalClientMulti *multi = (CalClientMulti *) user_data;
-
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- gtk_signal_emit (GTK_OBJECT (multi),
- cal_multi_signals[CATEGORIES_CHANGED],
- client, categories);
-}
-
-static void
-client_forget_password_cb (CalClient *client, const char *key, gpointer user_data)
-{
- CalClientMulti *multi = (CalClientMulti *) user_data;
-
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- gtk_signal_emit (GTK_OBJECT (multi),
- cal_multi_signals[FORGET_PASSWORD],
- client, key);
-}
-/**
- * cal_client_multi_add_client
- * @multi: A #CalClientMulti object.
- * @client: The #CalClient object to be added.
- *
- * Aggregates the given #CalClient to a #CalClientMulti object,
- * thus adding it to the list of managed calendars.
- */
-void
-cal_client_multi_add_client (CalClientMulti *multi, CalClient *client)
-{
- char *uri;
- CalClient *old_client;
-
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- uri = g_strdup (cal_client_get_uri (client));
- old_client = g_hash_table_lookup (multi->priv->calendars, uri);
- if (old_client) {
- g_free (uri);
- return;
- }
-
- gtk_object_ref (GTK_OBJECT (client));
- multi->priv->uris = g_list_append (multi->priv->uris, uri);
- g_hash_table_insert (multi->priv->calendars, uri, client);
-
- /* set up CalClient's signal handlers */
- gtk_signal_disconnect_by_data (GTK_OBJECT (client), multi);
- gtk_signal_connect (GTK_OBJECT (client),
- "cal_opened",
- GTK_SIGNAL_FUNC (client_cal_opened_cb),
- multi);
- gtk_signal_connect (GTK_OBJECT (client),
- "obj_updated",
- GTK_SIGNAL_FUNC (client_obj_updated_cb),
- multi);
- gtk_signal_connect (GTK_OBJECT (client),
- "obj_removed",
- GTK_SIGNAL_FUNC (client_obj_removed_cb),
- multi);
- gtk_signal_connect (GTK_OBJECT (client),
- "categories_changed",
- GTK_SIGNAL_FUNC (client_categories_changed_cb),
- multi);
- gtk_signal_connect (GTK_OBJECT (client),
- "forget_password",
- GTK_SIGNAL_FUNC (client_forget_password_cb),
- multi);
-}
-
-typedef struct {
- CalClientAuthFunc func;
- gpointer user_data;
-} AuthFuncData;
-
-static void
-set_auth_func (gpointer key, gpointer value, gpointer user_data)
-{
- AuthFuncData *cb_data = (AuthFuncData *) user_data;
- CalClient *client = (CalClient *) value;
-
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (cb_data != NULL);
-
- cal_client_set_auth_func (client, cb_data->func, cb_data->user_data);
-}
-
-/**
- * cal_client_multi_set_auth_func
- * @multi: A #CalClientMulti object.
- * @func: The authentication function.
- * @user_data: Data to be passed to the authentication function.
- *
- * Sets the authentication function for all the clients in the
- * given #CalClientMulti.
- */
-void
-cal_client_multi_set_auth_func (CalClientMulti *multi,
- CalClientAuthFunc func,
- gpointer user_data)
-{
- AuthFuncData *cb_data;
-
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- cb_data = g_new0 (AuthFuncData, 1);
- cb_data->func = func;
- cb_data->user_data = user_data;
- g_hash_table_foreach (multi->priv->calendars, set_auth_func, cb_data);
-
- g_free (cb_data);
-}
-
-/**
- * cal_client_multi_open_calendar
- * @multi: A #CalClientMulti object.
- * @str_uri: The URI of the calendar to be open
- * @only_if_exists:
- *
- * Open a new calendar in the given #CalClientMulti object.
- *
- * Returns: a pointer to the new #CalClient
- */
-CalClient *
-cal_client_multi_open_calendar (CalClientMulti *multi,
- const char *str_uri,
- gboolean only_if_exists)
-{
- CalClient *client;
- gboolean result;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), FALSE);
-
- client = cal_client_new ();
-
- result = cal_client_open_calendar (client, str_uri, only_if_exists);
- if (result) {
- cal_client_multi_add_client (multi, client);
- gtk_object_unref (GTK_OBJECT (client));
- return client;
- }
-
- gtk_object_unref (GTK_OBJECT (client));
-
- return NULL;
-}
-
-/**
- * cal_client_multi_get_client_for_uri
- * @multi: A #CalClientMulti object.
- * @uri: The URI for the client.
- *
- * Returns the #CalClient object associated with the given
- * @uri for the given #CalClientMulti object.
- *
- * Returns: a pointer to the client or NULL if no client is
- * associated with that URI.
- */
-CalClient *
-cal_client_multi_get_client_for_uri (CalClientMulti *multi, const char *uri)
-{
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), NULL);
- g_return_val_if_fail (uri != NULL, NULL);
-
- return g_hash_table_lookup (multi->priv->calendars, uri);
-}
-
-/**
- * cal_client_multi_get_n_objects
- * @multi: A #CalClientMulti object.
- * @type: Type for objects
- *
- * Get the count of objects of the given type(s) for a #CalClientMulti
- * object.
- *
- * Returns: The count of objects of the given type(s).
- */
-int
-cal_client_multi_get_n_objects (CalClientMulti *multi,
- CalObjType type)
-{
- CalClient *client;
- GList *l;
- int count = 0;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), -1);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client))
- count += cal_client_get_n_objects (client, type);
- }
-
- return count;
-}
-
-/**
- * cal_client_multi_get_object
- */
-CalClientGetStatus
-cal_client_multi_get_object (CalClientMulti *multi,
- const char *uid,
- CalComponent **comp)
-{
- CalClient *client;
- GList *l;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), CAL_CLIENT_GET_NOT_FOUND);
- g_return_val_if_fail (uid != NULL, CAL_CLIENT_GET_NOT_FOUND);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- CalClientGetStatus status;
-
- status = cal_client_get_object (client, uid, comp);
- if (status == CAL_CLIENT_GET_SUCCESS)
- return status;
- }
- }
-
- return CAL_CLIENT_GET_NOT_FOUND;
-}
-
-/**
- * cal_client_multi_get_timezone
- * @multi: A #CalClientMulti object.
- * @tzid: ID for the timezone to be retrieved.
- * @zone: A pointer to where the icaltimezone object will be copied.
- */
-CalClientGetStatus
-cal_client_multi_get_timezone (CalClientMulti *multi,
- const char *tzid,
- icaltimezone **zone)
-{
- CalClient *client;
- GList *l;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), CAL_CLIENT_GET_NOT_FOUND);
- g_return_val_if_fail (tzid != NULL, CAL_CLIENT_GET_NOT_FOUND);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- CalClientGetStatus status;
-
- status = cal_client_get_timezone (client, tzid, zone);
- if (status == CAL_CLIENT_GET_SUCCESS)
- return status;
- }
- }
-
- return CAL_CLIENT_GET_NOT_FOUND;
-}
-
-/**
- * cal_client_multi_get_uids
- * @multi: A #CalClientMulti object.
- * @type: Type of objects whose IDs will be returned.
- *
- * Returns a list of UIDs for all the objects of the given
- * type(s) that are in the calendars managed by a
- * #CalClientMulti object
- *
- * Returns: a GList of UIDs.
- */
-GList *
-cal_client_multi_get_uids (CalClientMulti *multi, CalObjType type)
-{
- CalClient *client;
- GList *l;
- GList *result = NULL;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), NULL);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- GList *tmp;
-
- tmp = cal_client_get_uids (client, type);
- if (tmp)
- result = g_list_concat (result, tmp);
- }
- }
-
- return result;
-}
-
-/**
- * cal_client_multi_get_changes
- * @multi: A #CalClientMulti object.
- * @type: Object type.
- * @change_id: Change ID.
- *
- * Returns a list of changes for the given #CalClientMulti
- * object.
- */
-GList *
-cal_client_multi_get_changes (CalClientMulti *multi,
- CalObjType type,
- const char *change_id)
-{
- CalClient *client;
- GList *l;
- GList *result = NULL;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), NULL);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- GList *tmp;
-
- tmp = cal_client_get_changes (client, type, change_id);
- if (tmp)
- result = g_list_concat (result, tmp);
- }
- }
-
- return result;
-}
-
-/**
- * cal_client_multi_get_objects_in_range
- * @multi: A #CalClientMulti object.
- * @type: Type for objects.
- * @start: Start time.
- * @end: End time.
- *
- * Retrieves a list of all calendar components that are
- * scheduled within the given time range. The information is
- * retrieved from all the calendars being managed by the
- * given #CalClientMulti object.
- *
- * Returns: A list of UID strings. This should be freed using the
- * #cal_obj_uid_list_free() function.
- **/
-GList *
-cal_client_multi_get_objects_in_range (CalClientMulti *multi,
- CalObjType type,
- time_t start,
- time_t end)
-{
- CalClient *client;
- GList *l;
- GList *result = NULL;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), NULL);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- GList *tmp;
-
- tmp = cal_client_get_objects_in_range (client, type, start, end);
- if (tmp)
- result = g_list_concat (result, tmp);
- }
- }
-
- return result;
-}
-
-/**
- * cal_client_multi_get_free_busy
- * @multi: A #CalClientMulti object.
- * @users: List of users to retrieve F/B information for.
- * @start: Start time.
- * @end: End time.
- *
- * Retrieves Free/Busy information for the given users in all
- * the calendars being managed by the given #CalClient multi
- * object.
- *
- * Returns: A GList of VFREEBUSY CalComponents
- */
-GList *
-cal_client_multi_get_free_busy (CalClientMulti *multi,
- GList *users,
- time_t start,
- time_t end)
-{
- CalClient *client;
- GList *l;
- GList *result = NULL;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), NULL);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- GList *tmp;
-
- tmp = cal_client_get_free_busy (client, users, start, end);
- if (tmp)
- result = g_list_concat (result, tmp);
- }
- }
-
- return result;
-}
-
-/**
- * cal_client_multi_generate_instances
- */
-void
-cal_client_multi_generate_instances (CalClientMulti *multi,
- CalObjType type,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data)
-{
- CalClient *client;
- GList *l;
-
- g_return_if_fail (IS_CAL_CLIENT_MULTI (multi));
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- cal_client_generate_instances (
- client, type, start, end, cb, cb_data);
- }
- }
-}
-
-/**
- * cal_client_multi_get_alarms_in_range
- */
-GSList *
-cal_client_multi_get_alarms_in_range (CalClientMulti *multi, time_t start, time_t end)
-{
- CalClient *client;
- GList *l;
- GSList *result = NULL;
-
- g_return_val_if_fail (IS_CAL_CLIENT_MULTI (multi), NULL);
-
- for (l = multi->priv->uris; l; l = l->next) {
- client = cal_client_multi_get_client_for_uri (multi,
- (const char *) l->data);
- if (IS_CAL_CLIENT (client)) {
- GSList *tmp;
-
- tmp = cal_client_get_alarms_in_range (client, start, end);
- if (tmp)
- result = g_slist_concat (result, tmp);
- }
- }
-
- return result;
-}
diff --git a/calendar/cal-client/cal-client-multi.h b/calendar/cal-client/cal-client-multi.h
deleted file mode 100644
index 0b7eec40e4..0000000000
--- a/calendar/cal-client/cal-client-multi.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Evolution calendar client
- *
- * 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_CLIENT_MULTI_H
-#define CAL_CLIENT_MULTI_H
-
-#include <cal-client/cal-client.h>
-
-BEGIN_GNOME_DECLS
-
-#define CAL_CLIENT_MULTI_TYPE (cal_client_multi_get_type ())
-#define CAL_CLIENT_MULTI(obj) (GTK_CHECK_CAST ((obj), CAL_CLIENT_MULTI_TYPE, CalClientMulti))
-#define CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_MULTI_TYPE, CalClientMultiClass))
-#define IS_CAL_CLIENT_MULTI(obj) (GTK_CHECK_TYPE ((obj), CAL_CLIENT_MULTI_TYPE))
-#define IS_CAL_CLIENT_MULTI_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_MULTI_TYPE))
-
-typedef struct _CalClientMulti CalClientMulti;
-typedef struct _CalClientMultiClass CalClientMultiClass;
-typedef struct _CalClientMultiPrivate CalClientMultiPrivate;
-
-struct _CalClientMulti {
- GtkObject object;
-
- /* Private data */
- CalClientMultiPrivate *priv;
-};
-
-struct _CalClientMultiClass {
- GtkObjectClass parent_class;
-
- /* notification signals */
- void (* cal_opened) (CalClientMulti *multi, CalClient *client, CalClientOpenStatus status);
-
- void (* obj_updated) (CalClientMulti *multi, CalClient *client, const char *uid);
- void (* obj_removed) (CalClientMulti *multi, CalClient *client, const char *uid);
-
- void (* categories_changed) (CalClientMulti *multi, CalClient *client, GPtrArray *categories);
-
- void (* forget_password) (CalClientMulti *multi, CalClient *client, const char *key);
-};
-
-GtkType cal_client_multi_get_type (void);
-
-CalClientMulti *cal_client_multi_new (void);
-
-void cal_client_multi_add_client (CalClientMulti *multi, CalClient *client);
-void cal_client_multi_set_auth_func (CalClientMulti *multi,
- CalClientAuthFunc func,
- gpointer user_data);
-
-CalClient *cal_client_multi_open_calendar (CalClientMulti *multi,
- const char *str_uri,
- gboolean only_if_exists);
-CalClient *cal_client_multi_get_client_for_uri (CalClientMulti *multi,
- const char *uri);
-
-int cal_client_multi_get_n_objects (CalClientMulti *multi, CalObjType type);
-CalClientGetStatus cal_client_multi_get_object (CalClientMulti *multi,
- const char *uid,
- CalComponent **comp);
-CalClientGetStatus cal_client_multi_get_timezone (CalClientMulti *multi,
- const char *tzid,
- icaltimezone **zone);
-GList *cal_client_multi_get_uids (CalClientMulti *multi, CalObjType type);
-GList *cal_client_multi_get_changes (CalClientMulti *multi,
- CalObjType type,
- const char *change_id);
-GList *cal_client_multi_get_objects_in_range (CalClientMulti *multi,
- CalObjType type,
- time_t start,
- time_t end);
-GList *cal_client_multi_get_free_busy (CalClientMulti *multi,
- GList *users,
- time_t start,
- time_t end);
-void cal_client_multi_generate_instances (CalClientMulti *multi,
- CalObjType type,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data);
-GSList *cal_client_multi_get_alarms_in_range (CalClientMulti *multi,
- time_t start, time_t end);
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/cal-client/cal-client-types.c b/calendar/cal-client/cal-client-types.c
deleted file mode 100644
index 5a31ed4530..0000000000
--- a/calendar/cal-client/cal-client-types.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Ximian, 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 4819d551be..0000000000
--- a/calendar/cal-client/cal-client-types.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Ximian, 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 bea4ed6eea..0000000000
--- a/calendar/cal-client/cal-client.c
+++ /dev/null
@@ -1,2292 +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 <bonobo/bonobo-exception.h>
-
-#include "cal-client-types.h"
-#include "cal-client.h"
-#include "cal-listener.h"
-#include "wombat-client.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 factories we are contacting */
- GList *factories;
-
- /* Our calendar listener implementation */
- CalListener *listener;
-
- /* The calendar client interface object we are contacting */
- GNOME_Evolution_Calendar_Cal cal;
-
- /* The authentication function */
- CalClientAuthFunc auth_func;
- gpointer auth_user_data;
-
- /* The WombatClient */
- WombatClient *w_client;
-
- /* A cache of timezones retrieved from the server, to avoid getting
- them repeatedly for each get_object() call. */
- GHashTable *timezones;
-};
-
-
-
-/* Signal IDs */
-enum {
- CAL_OPENED,
- CAL_SET_MODE,
- OBJ_UPDATED,
- OBJ_REMOVED,
- CATEGORIES_CHANGED,
- FORGET_PASSWORD,
- 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 char *client_get_password_cb (WombatClient *w_client,
- const gchar *prompt,
- const gchar *key,
- gpointer user_data);
-static void client_forget_password_cb (WombatClient *w_client,
- const gchar *key,
- gpointer user_data);
-static void cal_client_get_object_timezones_cb (icalparameter *param,
- void *data);
-
-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;
-}
-
-#define marshal_NONE__ENUM_ENUM gtk_marshal_NONE__INT_INT
-
-/* 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[CAL_SET_MODE] =
- gtk_signal_new ("cal_set_mode",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientClass, cal_set_mode),
- marshal_NONE__ENUM_ENUM,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_ENUM,
- 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);
- cal_client_signals[CATEGORIES_CHANGED] =
- gtk_signal_new ("categories_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientClass, categories_changed),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
- cal_client_signals[FORGET_PASSWORD] =
- gtk_signal_new ("forget_password",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientClass, forget_password),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, cal_client_signals, LAST_SIGNAL);
-
- class->cal_opened = NULL;
- class->obj_updated = NULL;
- class->obj_removed = NULL;
- class->categories_changed = NULL;
- class->forget_password = NULL;
-
- 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->factories = NULL;
- priv->timezones = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* create the WombatClient */
- priv->w_client = wombat_client_new (
- (WombatClientGetPasswordFn) client_get_password_cb,
- (WombatClientForgetPasswordFn) client_forget_password_cb,
- (gpointer) client);
-}
-
-/* Gets rid of the WombatClient that a client knows about */
-static void
-destroy_wombat_client (CalClient *client)
-{
- CalClientPrivate *priv;
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- priv = client->priv;
-
- if (!priv->w_client)
- return;
-
- bonobo_object_unref (BONOBO_OBJECT (priv->w_client));
- priv->w_client = NULL;
-}
-
-/* Gets rid of the factories that a client knows about */
-static void
-destroy_factories (CalClient *client)
-{
- CalClientPrivate *priv;
- CORBA_Object factory;
- CORBA_Environment ev;
- int result;
- GList *f;
-
- priv = client->priv;
-
- CORBA_exception_init (&ev);
-
- for (f = priv->factories; f; f = f->next) {
- factory = f->data;
-
- result = CORBA_Object_is_nil (factory, &ev);
- if (BONOBO_EX (&ev)) {
- g_message ("destroy_factories(): could not see if a factory was nil");
- CORBA_exception_free (&ev);
-
- continue;
- }
-
- if (result)
- continue;
-
- CORBA_Object_release (factory, &ev);
- if (BONOBO_EX (&ev)) {
- g_message ("destroy_factories(): could not release a factory");
- CORBA_exception_free (&ev);
- }
- }
-
- g_list_free (priv->factories);
- priv->factories = 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 (BONOBO_EX (&ev)) {
- 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 (BONOBO_EX (&ev))
- 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 (BONOBO_EX (&ev))
- g_message ("destroy_cal(): could not release the calendar client interface object");
-
- CORBA_exception_free (&ev);
- priv->cal = CORBA_OBJECT_NIL;
-
-}
-
-static void
-free_timezone (gpointer key, gpointer value, gpointer data)
-{
- /* Note that the key comes from within the icaltimezone value, so we
- don't free that. */
- icaltimezone_free (value, TRUE);
-}
-
-/* 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;
-
- /* The server unrefs the query listener, so we just NULL it out here */
- if (priv->listener) {
- cal_listener_stop_notification (priv->listener);
- priv->listener = NULL;
- }
-
- destroy_wombat_client (client);
- destroy_factories (client);
- destroy_cal (client);
-
- priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
-
- if (priv->uri) {
- g_free (priv->uri);
- priv->uri = NULL;
- }
-
- g_hash_table_foreach (priv->timezones, free_timezone, NULL);
- g_hash_table_destroy (priv->timezones);
- priv->timezones = 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 (BONOBO_EX (&ev)) {
- 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 cal_set_mode notification from the listener */
-static void
-cal_set_mode_cb (CalListener *listener,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode,
- gpointer data)
-{
- CalClient *client;
- CalClientPrivate *priv;
- CalClientSetModeStatus 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_MODE_SET:
- client_status = CAL_CLIENT_SET_MODE_SUCCESS;
- break;
- case GNOME_Evolution_Calendar_Listener_MODE_NOT_SET:
- client_status = CAL_CLIENT_SET_MODE_ERROR;
- break;
- case GNOME_Evolution_Calendar_Listener_MODE_NOT_SUPPORTED:
- client_status = CAL_CLIENT_SET_MODE_NOT_SUPPORTED;
- break;
- default:
- g_assert_not_reached ();
- }
-
- /* 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_SET_MODE],
- client_status, mode);
-
- 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);
-}
-
-/* Handle the categories_changed signal from the listener */
-static void
-categories_changed_cb (CalListener *listener, const GNOME_Evolution_Calendar_StringSeq *categories,
- gpointer data)
-{
- CalClient *client;
- GPtrArray *cats;
- int i;
-
- client = CAL_CLIENT (data);
-
- cats = g_ptr_array_new ();
- g_ptr_array_set_size (cats, categories->_length);
-
- for (i = 0; i < categories->_length; i++)
- cats->pdata[i] = categories->_buffer[i];
-
- gtk_signal_emit (GTK_OBJECT (client), cal_client_signals[CATEGORIES_CHANGED], cats);
-
- g_ptr_array_free (cats, TRUE);
-}
-
-
-/* Handle the get_password signal from the Wombatclient */
-static gchar *
-client_get_password_cb (WombatClient *w_client,
- const gchar *prompt,
- const gchar *key,
- gpointer user_data)
-{
- CalClient *client;
-
- client = CAL_CLIENT (user_data);
- g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
-
- if (client->priv->auth_func)
- return client->priv->auth_func (client, prompt, key, client->priv->auth_user_data);
-
- return NULL;
-}
-
-/* Handle the forget_password signal from the WombatClient */
-static void
-client_forget_password_cb (WombatClient *w_client,
- const gchar *key,
- gpointer user_data)
-{
- CalClient *client;
-
- client = CAL_CLIENT (user_data);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- gtk_signal_emit (GTK_OBJECT (client),
- cal_client_signals [FORGET_PASSWORD],
- key);
-}
-
-
-
-/**
- * cal_client_construct:
- * @client: A calendar client.
- *
- * Constructs a calendar client object by contacting all available
- * calendar factories.
- *
- * 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;
- OAF_ServerInfoList *servers;
- CORBA_Environment ev;
- int i;
-
- 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);
-
- servers = oaf_query ("repo_ids.has ('IDL:GNOME/Evolution/Calendar/CalFactory:1.0')", NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("Cannot perform OAF query for Calendar servers.");
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- if (servers->_length == 0)
- g_warning ("No Calendar servers installed.");
-
- for (i = 0; i < servers->_length; i++) {
- const OAF_ServerInfo *info;
-
- info = servers->_buffer + i;
-
- factory = (GNOME_Evolution_Calendar_CalFactory)
- oaf_activate_from_id (info->iid, 0, NULL, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("cal_client_construct: Could not activate calendar server %s", info->iid);
- CORBA_free (servers);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- priv->factories = g_list_prepend (priv->factories, factory);
- }
-
- CORBA_free (servers);
-
- CORBA_exception_free (&ev);
- 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_set_auth_func
- * @client: A calendar client.
- * @func: The authentication function
- * @data: User data to be used when calling the authentication function
- *
- * Associates the given authentication function with a calendar client. This
- * function will be called any time the calendar server needs a password
- * from the client. So, calendar clients should provide such authentication
- * function, which, when called, should act accordingly (by showing a dialog
- * box, for example, to ask the user for the password).
- *
- * The authentication function must have the following form:
- * char * auth_func (CalClient *client,
- * const gchar *prompt,
- * const gchar *key,
- * gpointer user_data)
- */
-void
-cal_client_set_auth_func (CalClient *client, CalClientAuthFunc func, gpointer data)
-{
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- client->priv->auth_func = func;
- client->priv->auth_user_data = data;
-}
-
-/**
- * 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;
- GList *f;
-
- 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,
- cal_set_mode_cb,
- obj_updated_cb,
- obj_removed_cb,
- categories_changed_cb,
- client);
- if (!priv->listener) {
- g_message ("cal_client_open_calendar(): could not create the listener");
- return FALSE;
- }
-
- bonobo_object_add_interface (BONOBO_OBJECT (priv->listener),
- BONOBO_OBJECT (priv->w_client));
-
- corba_listener = (GNOME_Evolution_Calendar_Listener) (BONOBO_OBJREF (priv->listener));
-
- priv->load_state = CAL_CLIENT_LOAD_LOADING;
- priv->uri = g_strdup (str_uri);
-
- for (f = priv->factories; f; f = f->next) {
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_CalFactory_open (f->data, str_uri,
- only_if_exists,
- corba_listener, &ev);
- if (!BONOBO_EX (&ev))
- break;
-
- CORBA_exception_free (&ev);
- }
-
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
-
- if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_CalFactory_InvalidURI))
- g_message ("cal_client_open_calendar: invalid URI");
- else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_CalFactory_UnsupportedMethod))
- g_message ("cal_client_open_calendar: unsupported method");
- else
- 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;
-}
-
-/* Builds an URI list out of a CORBA string sequence */
-static GList *
-build_uri_list (GNOME_Evolution_Calendar_StringSeq *seq)
-{
- GList *uris = NULL;
- int i;
-
- for (i = 0; i < seq->_length; i++)
- uris = g_list_prepend (uris, g_strdup (seq->_buffer[i]));
-
- return uris;
-}
-
-/**
- * cal_client_uri_list:
- * @client: A calendar client
- * @type: type of uri's to get
- *
- *
- * Return value: A list of URI's open on the wombat
- **/
-GList *
-cal_client_uri_list (CalClient *client, CalMode mode)
-{
- CalClientPrivate *priv;
- GNOME_Evolution_Calendar_StringSeq *uri_seq;
- GList *uris = NULL;
- CORBA_Environment ev;
- GList *f;
-
- g_return_val_if_fail (client != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
-
- priv = client->priv;
-
- for (f = priv->factories; f; f = f->next) {
- CORBA_exception_init (&ev);
- uri_seq = GNOME_Evolution_Calendar_CalFactory_uriList (f->data, mode, &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("cal_client_uri_list(): request failed");
-
- /* free memory and return */
- g_list_foreach (uris, (GFunc) g_free, NULL);
- g_list_free (uris);
- uris = NULL;
- break;
- }
- else
- uris = g_list_concat (uris, build_uri_list (uri_seq));
-
- CORBA_exception_free (&ev);
- }
-
- return uris;
-}
-
-/**
- * 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));
-}
-
-gboolean
-cal_client_set_mode (CalClient *client, CalMode mode)
-{
- CalClientPrivate *priv;
- gboolean retval = TRUE;
- CORBA_Environment ev;
-
- 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);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_setMode (priv->cal, mode, &ev);
-
- if (BONOBO_EX (&ev))
- retval = FALSE;
-
- CORBA_exception_free (&ev);
-
- return retval;
-}
-
-/**
- * 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 (BONOBO_EX (&ev)) {
- 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;
-}
-
-
-/* This is used in the callback which fetches all the timezones needed for an
- object. */
-typedef struct _CalClientGetTimezonesData CalClientGetTimezonesData;
-struct _CalClientGetTimezonesData {
- CalClient *client;
-
- /* This starts out at CAL_CLIENT_GET_SUCCESS. If an error occurs this
- contains the last error. */
- CalClientGetStatus status;
-};
-
-
-/**
- * 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;
- CalClientGetTimezonesData cb_data;
-
- 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 (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_NotFound))
- goto out;
- else if (BONOBO_EX (&ev)) {
- 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;
- }
-
- /* Now make sure we have all timezones needed for this object.
- We do this to try to avoid any problems caused by getting a timezone
- in the middle of other code. Any calls to ORBit result in a
- recursive call of the GTK+ main loop, which can cause problems for
- code that doesn't expect it. Currently GnomeCanvas has problems if
- we try to get a timezone in the middle of a redraw, and there is a
- resize pending, which leads to an assert failure and an abort. */
- cb_data.client = client;
- cb_data.status = CAL_CLIENT_GET_SUCCESS;
- icalcomponent_foreach_tzid (icalcomp,
- cal_client_get_object_timezones_cb,
- &cb_data);
-
- retval = cb_data.status;
-
- out:
-
- CORBA_exception_free (&ev);
- return retval;
-}
-
-
-static void
-cal_client_get_object_timezones_cb (icalparameter *param,
- void *data)
-{
- CalClientGetTimezonesData *cb_data = data;
- const char *tzid;
- icaltimezone *zone;
- CalClientGetStatus status;
-
- tzid = icalparameter_get_tzid (param);
- if (!tzid) {
- cb_data->status = CAL_CLIENT_GET_SYNTAX_ERROR;
- return;
- }
-
- status = cal_client_get_timezone (cb_data->client, tzid, &zone);
- if (status != CAL_CLIENT_GET_SUCCESS)
- cb_data->status = status;
-}
-
-
-CalClientGetStatus
-cal_client_get_timezone (CalClient *client,
- const char *tzid,
- icaltimezone **zone)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObj comp_str;
- CalClientGetStatus retval;
- icalcomponent *icalcomp;
- icaltimezone *tmp_zone;
-
- 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 (zone != NULL, CAL_CLIENT_GET_NOT_FOUND);
-
- /* If tzid is NULL or "" we return NULL, since it is a 'local time'. */
- if (!tzid || !tzid[0]) {
- *zone = NULL;
- return CAL_CLIENT_GET_SUCCESS;
- }
-
- /* If it is UTC, we return the special UTC timezone. */
- if (!strcmp (tzid, "UTC")) {
- *zone = icaltimezone_get_utc_timezone ();
- return CAL_CLIENT_GET_SUCCESS;
- }
-
- /* See if we already have it in the cache. */
- tmp_zone = g_hash_table_lookup (priv->timezones, tzid);
- if (tmp_zone) {
- *zone = tmp_zone;
- return CAL_CLIENT_GET_SUCCESS;
- }
-
- retval = CAL_CLIENT_GET_NOT_FOUND;
- *zone = NULL;
-
- /* We don't already have it, so we try to get it from the server. */
- CORBA_exception_init (&ev);
- comp_str = GNOME_Evolution_Calendar_Cal_getTimezoneObject (priv->cal, (char *) tzid, &ev);
-
- if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_NotFound))
- goto out;
- else if (BONOBO_EX (&ev)) {
- g_message ("cal_client_get_timezone(): 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;
- }
-
- tmp_zone = icaltimezone_new ();
- if (!tmp_zone) {
- /* FIXME: Needs better error code - out of memory. Or just
- abort like GTK+ does? */
- retval = CAL_CLIENT_GET_NOT_FOUND;
- goto out;
- }
-
- if (!icaltimezone_set_component (tmp_zone, icalcomp)) {
- retval = CAL_CLIENT_GET_SYNTAX_ERROR;
- goto out;
- }
-
- /* Now add it to the cache, to avoid the server call in future. */
- g_hash_table_insert (priv->timezones, icaltimezone_get_tzid (tmp_zone),
- tmp_zone);
-
- *zone = tmp_zone;
- retval = CAL_CLIENT_GET_SUCCESS;
-
- out:
-
- CORBA_exception_free (&ev);
- return retval;
-}
-
-/* Resolves TZIDs for the recurrence generator. */
-icaltimezone*
-cal_client_resolve_tzid_cb (const char *tzid, gpointer data)
-{
- CalClient *client;
- icaltimezone *zone = NULL;
- CalClientGetStatus status;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (IS_CAL_CLIENT (data), NULL);
-
- client = CAL_CLIENT (data);
-
- /* FIXME: Handle errors. */
- status = cal_client_get_timezone (client, tzid, &zone);
-
- return zone;
-}
-
-
-/* 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 (BONOBO_EX (&ev)) {
- 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 (BONOBO_EX (&ev)) {
- 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 (BONOBO_EX (&ev)) {
- 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;
-}
-
-/**
- * cal_client_get_free_busy
- * @client:: A calendar client.
- * @users: List of users to retrieve free/busy information for.
- * @start: Start time for query.
- * @end: End time for query.
- *
- * Gets free/busy information from the calendar server.
- *
- * Returns: a GList of VFREEBUSY CalComponents
- */
-GList *
-cal_client_get_free_busy (CalClient *client, GList *users,
- time_t start, time_t end)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_UserList *corba_list;
- GNOME_Evolution_Calendar_CalObjSeq *calobj_list;
- GList *l;
- GList *comp_list = NULL;
- int len, i;
-
- g_return_val_if_fail (client != NULL, NULL);
- g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
-
- priv = client->priv;
- g_return_val_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED, NULL);
-
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
-
- /* create the CORBA user list to be passed to the backend */
- len = g_list_length (users);
-
- corba_list = GNOME_Evolution_Calendar_UserList__alloc ();
- CORBA_sequence_set_release (corba_list, TRUE);
- corba_list->_length = len;
- corba_list->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_User_allocbuf (len);
-
- for (l = g_list_first (users), i = 0; l; l = l->next, i++)
- corba_list->_buffer[i] = CORBA_string_dup ((CORBA_char *) l->data);
-
- /* call the method on the backend */
- CORBA_exception_init (&ev);
-
- calobj_list = GNOME_Evolution_Calendar_Cal_getFreeBusy (priv->cal, corba_list,
- start, end, &ev);
- CORBA_free (corba_list);
- if (BONOBO_EX (&ev) || !calobj_list) {
- g_message ("cal_client_get_free_busy(): could not get the objects");
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- for (i = 0; i < calobj_list->_length; i++) {
- CalComponent *comp;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
-
- icalcomp = icalparser_parse_string (calobj_list->_buffer[i]);
- if (!icalcomp)
- continue;
-
- kind = icalcomponent_isa (icalcomp);
- if (kind == ICAL_VFREEBUSY_COMPONENT) {
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
- icalcomponent_free (icalcomp);
- gtk_object_unref (GTK_OBJECT (comp));
- continue;
- }
-
- comp_list = g_list_append (comp_list, comp);
- }
- else
- icalcomponent_free (icalcomp);
- }
-
- CORBA_exception_free (&ev);
- CORBA_free (calobj_list);
-
- return comp_list;
-}
-
-/* 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,
- cal_client_resolve_tzid_cb, client);
- 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_start = corba_instance->occur_start;
- instance->occur_end = corba_instance->occur_end;
-
- 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 (BONOBO_EX (&ev)) {
- 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 (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_NotFound))
- goto out;
- else if (BONOBO_EX (&ev)) {
- 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;
-}
-
-typedef struct _ForeachTZIDCallbackData ForeachTZIDCallbackData;
-struct _ForeachTZIDCallbackData {
- CalClient *client;
- GHashTable *timezone_hash;
-};
-
-/* This adds the VTIMEZONE given by the TZID parameter to the GHashTable in
- data. */
-static void
-foreach_tzid_callback (icalparameter *param, void *cbdata)
-{
- ForeachTZIDCallbackData *data = cbdata;
- CalClientPrivate *priv;
- const char *tzid;
- icaltimezone *zone;
- icalcomponent *vtimezone_comp;
- char *vtimezone_as_string;
-
- priv = data->client->priv;
-
- /* Get the TZID string from the parameter. */
- tzid = icalparameter_get_tzid (param);
- if (!tzid)
- return;
-
- /* Check if it is in our cache. If it is, it must already be on the
- server so return. */
- if (g_hash_table_lookup (priv->timezones, tzid))
- return;
-
- /* Check if we've already added it to the GHashTable. */
- if (g_hash_table_lookup (data->timezone_hash, tzid))
- return;
-
- /* Check if it is a builtin timezone. If it isn't, return. */
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (!zone)
- return;
-
- /* Convert it to a string and add it to the hash. */
- vtimezone_comp = icaltimezone_get_component (zone);
- if (!vtimezone_comp)
- return;
-
- vtimezone_as_string = icalcomponent_as_ical_string (vtimezone_comp);
-
- g_hash_table_insert (data->timezone_hash, (char*) tzid,
- g_strdup (vtimezone_as_string));
-}
-
-/* This appends the value string to the GString given in data. */
-static void
-append_timezone_string (gpointer key, gpointer value, gpointer data)
-{
- GString *vcal_string = data;
-
- g_string_append (vcal_string, value);
- g_free (value);
-}
-
-
-/* This converts the VEVENT/VTODO to a string. It checks if we need to send
- any builtin timezones to the server along with the object.
- To do that we check every TZID in the component to see if it is a builtin
- timezone. If it is, we see if it it in our cache. If it is in our cache,
- then we know the server already has it and we don't need to send it.
- If it isn't in our cache, then we need to send it to the server.
- If we need to send any timezones to the server, then we have to create a
- complete VCALENDAR object, otherwise we can just send a single VEVENT/VTODO
- as before. */
-static char*
-cal_client_get_component_as_string (CalClient *client,
- CalComponent *comp)
-{
- GHashTable *timezone_hash;
- GString *vcal_string;
- int initial_vcal_string_len;
- ForeachTZIDCallbackData cbdata;
- char *obj_string;
-
- CalClientPrivate *priv;
-
- priv = client->priv;
-
- timezone_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* Add any builtin timezones needed to the hash. We use a hash since
- we only want to add each timezone once at most. */
- cbdata.client = client;
- cbdata.timezone_hash = timezone_hash;
- icalcomponent_foreach_tzid (cal_component_get_icalcomponent (comp),
- foreach_tzid_callback, &cbdata);
-
- /* Create the start of a VCALENDAR, to add the VTIMEZONES to,
- and remember its length so we know if any VTIMEZONEs get added. */
- vcal_string = g_string_new (NULL);
- g_string_append (vcal_string,
- "BEGIN:VCALENDAR\n"
- "PRODID:-//Ximian//NONSGML Evolution Calendar//EN\n"
- "VERSION:2.0\n");
- initial_vcal_string_len = vcal_string->len;
-
- /* Now concatenate all the timezone strings. This also frees the
- timezone strings as it goes. */
- g_hash_table_foreach (timezone_hash, append_timezone_string,
- vcal_string);
-
- /* Get the string for the VEVENT/VTODO. */
- obj_string = cal_component_get_as_string (comp);
-
- /* If there were any timezones to send, create a complete VCALENDAR,
- else just send the VEVENT/VTODO string. */
- if (vcal_string->len == initial_vcal_string_len) {
- g_string_free (vcal_string, TRUE);
- } else {
- g_string_append (vcal_string, obj_string);
- g_string_append (vcal_string, "END:VCALENDAR\n");
- g_free (obj_string);
- obj_string = vcal_string->str;
- g_string_free (vcal_string, FALSE);
- }
-
- g_hash_table_destroy (timezone_hash);
-
- return obj_string;
-}
-
-/**
- * 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;
-
- 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_client_get_component_as_string (client, comp);
- if (obj_string == NULL)
- return FALSE;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, &ev);
- g_free (obj_string);
-
- if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
- goto out;
- else if (BONOBO_EX (&ev)) {
- g_message ("cal_client_update_object(): could not update the object");
- goto out;
- }
-
- retval = TRUE;
-
- out:
- CORBA_exception_free (&ev);
- return retval;
-}
-
-/**
- * cal_client_update_objects:
- * @client: A calendar client.
- * @icalcomp: A toplevel VCALENDAR libical component.
- *
- * Asks a calendar to add or update one or more components, possibly including
- * VTIMEZONE data. Any existing components with the same UIDs will be
- * replaced. The VTIMEZONE data will be compared to existing VTIMEZONEs in
- * the calendar, and the VTIMEZONEs may possibly be renamed, as well as all
- * references to them throughout the VCALENDAR.
- *
- * The client program should not assume that the objects are 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_objects (CalClient *client, icalcomponent *icalcomp)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- gboolean retval;
- char *obj_string;
-
- 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 (icalcomp != NULL, FALSE);
-
- retval = FALSE;
-
- /* Libical owns this memory, using one of its temporary buffers. */
- obj_string = icalcomponent_as_ical_string (icalcomp);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, &ev);
-
- if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
- goto out;
- else if (BONOBO_EX (&ev)) {
- g_message ("cal_client_update_objects(): could not update the objects");
- 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 (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_NotFound))
- goto out;
- else if (BONOBO_EX (&ev)) {
- 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 10614ef83f..0000000000
--- a/calendar/cal-client/cal-client.h
+++ /dev/null
@@ -1,170 +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;
-
-/* Set mode status for the cal_client_set_mode function */
-typedef enum {
- CAL_CLIENT_SET_MODE_SUCCESS,
- CAL_CLIENT_SET_MODE_ERROR,
- CAL_CLIENT_SET_MODE_NOT_SUPPORTED
-} CalClientSetModeStatus;
-
-/* 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 (* cal_set_mode) (CalClient *client, CalClientSetModeStatus status, CalMode mode);
-
- void (* obj_updated) (CalClient *client, const char *uid);
- void (* obj_removed) (CalClient *client, const char *uid);
-
- void (* categories_changed) (CalClient *client, GPtrArray *categories);
-
- void (* forget_password) (CalClient *client, const char *key);
-};
-
-typedef gchar * (* CalClientAuthFunc) (CalClient *client,
- const gchar *prompt,
- const gchar *key,
- gpointer user_data);
-
-GtkType cal_client_get_type (void);
-
-CalClient *cal_client_construct (CalClient *client);
-
-CalClient *cal_client_new (void);
-
-void cal_client_set_auth_func (CalClient *client, CalClientAuthFunc func, gpointer data);
-
-gboolean cal_client_open_calendar (CalClient *client, const char *str_uri, gboolean only_if_exists);
-GList *cal_client_uri_list (CalClient *client, CalMode mode);
-
-CalClientLoadState cal_client_get_load_state (CalClient *client);
-
-const char *cal_client_get_uri (CalClient *client);
-
-gboolean cal_client_set_mode (CalClient *client, CalMode mode);
-
-int cal_client_get_n_objects (CalClient *client, CalObjType type);
-
-CalClientGetStatus cal_client_get_object (CalClient *client,
- const char *uid,
- CalComponent **comp);
-
-CalClientGetStatus cal_client_get_timezone (CalClient *client,
- const char *tzid,
- icaltimezone **zone);
-
-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);
-
-GList *cal_client_get_free_busy (CalClient *client, GList *users,
- 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);
-
-/* Add or update a single object. When adding an object only builtin timezones
- are allowed. To use external VTIMEZONE data call update_objects() instead.*/
-gboolean cal_client_update_object (CalClient *client, CalComponent *comp);
-
-/* Add or update multiple objects, possibly including VTIMEZONE data. */
-gboolean cal_client_update_objects (CalClient *client, icalcomponent *icalcomp);
-
-gboolean cal_client_remove_object (CalClient *client, const char *uid);
-
-CalQuery *cal_client_get_query (CalClient *client, const char *sexp);
-
-/* Resolves TZIDs for the recurrence generator. */
-icaltimezone *cal_client_resolve_tzid_cb (const char *tzid, gpointer data);
-
-
-
-
-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 2623575151..0000000000
--- a/calendar/cal-client/cal-listener.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/* Evolution calendar listener
- *
- * 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.
- */
-
-#include <config.h>
-#include "cal-listener.h"
-
-
-
-/* Private part of the CalListener structure */
-struct CalListenerPrivate {
- /* Notification functions and their closure data */
- CalListenerCalOpenedFn cal_opened_fn;
- CalListenerCalSetModeFn cal_set_mode_fn;
- CalListenerObjUpdatedFn obj_updated_fn;
- CalListenerObjRemovedFn obj_removed_fn;
- CalListenerCategoriesChangedFn categories_changed_fn;
- gpointer fn_data;
-
- /* Whether notification is desired */
- gboolean notify : 1;
-};
-
-
-
-static void cal_listener_class_init (CalListenerClass *class);
-static void cal_listener_init (CalListener *listener);
-static void cal_listener_destroy (GtkObject *object);
-
-static void impl_notifyCalOpened (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_Listener_OpenStatus status,
- GNOME_Evolution_Calendar_Cal cal,
- CORBA_Environment *ev);
-static void impl_notifyCalSetMode (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode,
- CORBA_Environment *ev);
-static void impl_notifyObjUpdated (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev);
-static void impl_notifyObjRemoved (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev);
-static void impl_notifyCategoriesChanged (PortableServer_Servant servant,
- const GNOME_Evolution_Calendar_StringSeq *categories,
- CORBA_Environment *ev);
-
-static BonoboXObjectClass *parent_class;
-
-
-
-BONOBO_X_TYPE_FUNC_FULL (CalListener,
- GNOME_Evolution_Calendar_Listener,
- BONOBO_X_OBJECT_TYPE,
- cal_listener);
-
-/* 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_X_OBJECT_TYPE);
-
- class->epv.notifyCalOpened = impl_notifyCalOpened;
- class->epv.notifyCalSetMode = impl_notifyCalSetMode;
- class->epv.notifyObjUpdated = impl_notifyObjUpdated;
- class->epv.notifyObjRemoved = impl_notifyObjRemoved;
- class->epv.notifyCategoriesChanged = impl_notifyCategoriesChanged;
-
- object_class->destroy = cal_listener_destroy;
-}
-
-/* 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_opened_fn = NULL;
- priv->obj_updated_fn = NULL;
- priv->obj_removed_fn = NULL;
- priv->categories_changed_fn = NULL;
-
- priv->notify = TRUE;
-}
-
-/* Destroy handler for the calendar listener */
-static void
-cal_listener_destroy (GtkObject *object)
-{
- CalListener *listener;
- CalListenerPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CAL_LISTENER (object));
-
- listener = CAL_LISTENER (object);
- priv = listener->priv;
-
- priv->cal_opened_fn = NULL;
- priv->obj_updated_fn = NULL;
- priv->obj_removed_fn = NULL;
- priv->categories_changed_fn = NULL;
- priv->fn_data = NULL;
-
- priv->notify = FALSE;
-
- g_free (priv);
- listener->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* CORBA servant implementation */
-
-/* ::notifyCalOpened method */
-static void
-impl_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->notify)
- 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);
-
- g_assert (priv->cal_opened_fn != NULL);
- (* priv->cal_opened_fn) (listener, status, cal, priv->fn_data);
-}
-
-/* ::notifyCalSetMode method */
-static void
-impl_notifyCalSetMode (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode,
- CORBA_Environment *ev)
-{
- CalListener *listener;
- CalListenerPrivate *priv;
-
- listener = CAL_LISTENER (bonobo_object_from_servant (servant));
- priv = listener->priv;
-
- if (!priv->notify)
- return;
-
- g_assert (priv->cal_set_mode_fn != NULL);
- (* priv->cal_set_mode_fn) (listener, status, mode, priv->fn_data);
-}
-
-/* ::notifyObjUpdated method */
-static void
-impl_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;
-
- if (!priv->notify)
- return;
-
- g_assert (priv->obj_updated_fn != NULL);
- (* priv->obj_updated_fn) (listener, uid, priv->fn_data);
-}
-
-/* ::notifyObjRemoved method */
-static void
-impl_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;
-
- if (!priv->notify)
- return;
-
- g_assert (priv->obj_removed_fn != NULL);
- (* priv->obj_removed_fn) (listener, uid, priv->fn_data);
-}
-
-/* ::notifyCategoriesChanged method */
-static void
-impl_notifyCategoriesChanged (PortableServer_Servant servant,
- const GNOME_Evolution_Calendar_StringSeq *categories,
- CORBA_Environment *ev)
-{
- CalListener *listener;
- CalListenerPrivate *priv;
-
- listener = CAL_LISTENER (bonobo_object_from_servant (servant));
- priv = listener->priv;
-
- if (!priv->notify)
- return;
-
- g_assert (priv->categories_changed_fn != NULL);
- (* priv->categories_changed_fn) (listener, categories, priv->fn_data);
-}
-
-
-
-/**
- * cal_listener_construct:
- * @listener: A 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.
- * @categories_changed_fn: Function that will be called to notify that the list
- * of categories that are present in the calendar's objects has changed.
- * @fn_data: Closure data pointer that will be passed to the notification
- * functions.
- *
- * Constructs a calendar listener by setting the callbacks that it will use for
- * notification from the calendar server.
- *
- * Return value: the same object as the @listener argument.
- **/
-CalListener *
-cal_listener_construct (CalListener *listener,
- CalListenerCalOpenedFn cal_opened_fn,
- CalListenerCalSetModeFn cal_set_mode_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- CalListenerCategoriesChangedFn categories_changed_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 (cal_set_mode_fn != NULL, 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 (categories_changed_fn != NULL, NULL);
-
- priv = listener->priv;
-
- priv->cal_opened_fn = cal_opened_fn;
- priv->cal_set_mode_fn = cal_set_mode_fn;
- priv->obj_updated_fn = obj_updated_fn;
- priv->obj_removed_fn = obj_removed_fn;
- priv->categories_changed_fn = categories_changed_fn;
- priv->fn_data = fn_data;
-
- return listener;
-}
-
-/**
- * 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.
- * @categories_changed_fn: Function that will be called to notify that the list
- * of categories that are present in the calendar's objects has changed.
- * @fn_data: Closure data pointer that will be passed to the notification
- * functions.
- *
- * Creates a new #CalListener object.
- *
- * Return value: A newly-created #CalListener object.
- **/
-CalListener *
-cal_listener_new (CalListenerCalOpenedFn cal_opened_fn,
- CalListenerCalSetModeFn cal_set_mode_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- CalListenerCategoriesChangedFn categories_changed_fn,
- gpointer fn_data)
-{
- CalListener *listener;
-
- 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);
- g_return_val_if_fail (categories_changed_fn != NULL, NULL);
-
- listener = gtk_type_new (CAL_LISTENER_TYPE);
- return cal_listener_construct (listener,
- cal_opened_fn,
- cal_set_mode_fn,
- obj_updated_fn,
- obj_removed_fn,
- categories_changed_fn,
- fn_data);
-}
-
-/**
- * cal_listener_stop_notification:
- * @listener: A calendar listener.
- *
- * Informs a calendar listener that no further notification is desired. The
- * callbacks specified when the listener was created will no longer be invoked
- * after this function is called.
- **/
-void
-cal_listener_stop_notification (CalListener *listener)
-{
- CalListenerPrivate *priv;
-
- g_return_if_fail (listener != NULL);
- g_return_if_fail (IS_CAL_LISTENER (listener));
-
- priv = listener->priv;
- g_return_if_fail (priv->notify != FALSE);
-
- priv->notify = FALSE;
-}
diff --git a/calendar/cal-client/cal-listener.h b/calendar/cal-client/cal-listener.h
deleted file mode 100644
index 350eafff15..0000000000
--- a/calendar/cal-client/cal-listener.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Evolution calendar listener
- *
- * 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_LISTENER_H
-#define CAL_LISTENER_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-xobject.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 CalListenerPrivate CalListenerPrivate;
-
-typedef struct {
- BonoboXObject xobject;
-
- /* Private data */
- CalListenerPrivate *priv;
-} CalListener;
-
-typedef struct {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_Listener__epv epv;
-} CalListenerClass;
-
-/* Notification functions */
-typedef void (* CalListenerCalOpenedFn) (CalListener *listener,
- GNOME_Evolution_Calendar_Listener_OpenStatus status,
- GNOME_Evolution_Calendar_Cal cal,
- gpointer data);
-
-typedef void (* CalListenerCalSetModeFn) (CalListener *listener,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode,
- 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);
-
-typedef void (* CalListenerCategoriesChangedFn) (CalListener *listener,
- const GNOME_Evolution_Calendar_StringSeq *categories,
- gpointer data);
-
-
-GtkType cal_listener_get_type (void);
-
-CalListener *cal_listener_construct (CalListener *listener,
- CalListenerCalOpenedFn cal_opened_fn,
- CalListenerCalSetModeFn cal_set_mode_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- CalListenerCategoriesChangedFn categories_changed_fn,
- gpointer fn_data);
-
-CalListener *cal_listener_new (CalListenerCalOpenedFn cal_opened_fn,
- CalListenerCalSetModeFn cal_set_mode_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- CalListenerCategoriesChangedFn categories_changed_fn,
- gpointer fn_data);
-
-void cal_listener_stop_notification (CalListener *listener);
-
-
-
-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 d1c29fbb9a..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 <bonobo/bonobo-exception.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 */
- query_listener_stop_notification (priv->ql);
- 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 (BONOBO_EX (&ev))
- 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 (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate)) {
- g_message ("cal_query_construct(): The server could not create the query");
- goto error;
- } else if (BONOBO_EX (&ev)) {
- 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 53bc7382da..0000000000
--- a/calendar/cal-client/cal-query.h
+++ /dev/null
@@ -1,82 +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 "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 42d933f881..0000000000
--- a/calendar/cal-client/client-test.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/* Evolution calendar client - test program
- *
- * Copyright (C) 2000 Ximian, 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"
-#include "cal-util/cal-component.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) {
- GList *comp_list;
-
- /* get free/busy information */
- comp_list = cal_client_get_free_busy (client, NULL, 0, time (NULL));
- if (comp_list) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- char *comp_str;
-
- comp_str = cal_component_get_as_string (CAL_COMPONENT (l->data));
- gtk_object_unref (GTK_OBJECT (l->data));
- cl_printf (client, "Free/Busy -> %s\n", comp_str);
- g_free (comp_str);
- }
- g_list_free (comp_list);
- }
-
- 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)
-{
- char *dir;
-
- 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);
- }
-
- dir = g_strdup_printf ("%s/evolution/local/Calendar/calendar.ics", g_get_home_dir ());
- create_client (&client1, dir, FALSE);
- g_free (dir);
- 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 51563fd9b0..0000000000
--- a/calendar/cal-client/query-listener.c
+++ /dev/null
@@ -1,322 +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;
-
- /* Whether notification is desired */
- gboolean notify : 1;
-};
-
-
-
-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;
-
- priv->notify = TRUE;
-}
-
-/* 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;
-
- priv->notify = FALSE;
-
- 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;
-
- if (!priv->notify)
- return;
-
- 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;
-
- if (!priv->notify)
- return;
-
- 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;
-
- if (!priv->notify)
- return;
-
- 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;
-
- if (!priv->notify)
- return;
-
- 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);
-}
-
-/**
- * query_listener_stop_notification:
- * @ql: A query listener.
- *
- * Informs a query listener that no further notification is desired. The
- * callbacks specified when the listener was created will no longer be invoked
- * after this function is called.
- **/
-void
-query_listener_stop_notification (QueryListener *ql)
-{
- QueryListenerPrivate *priv;
-
- g_return_if_fail (ql != NULL);
- g_return_if_fail (IS_QUERY_LISTENER (ql));
-
- priv = ql->priv;
- g_return_if_fail (priv->notify != FALSE);
-
- priv->notify = FALSE;
-}
diff --git a/calendar/cal-client/query-listener.h b/calendar/cal-client/query-listener.h
deleted file mode 100644
index 1330216260..0000000000
--- a/calendar/cal-client/query-listener.h
+++ /dev/null
@@ -1,98 +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);
-
-void query_listener_stop_notification (QueryListener *ql);
-
-
-
-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 b4784c6124..0000000000
--- a/calendar/cal-util/cal-component.c
+++ /dev/null
@@ -1,4903 +0,0 @@
-/* Evolution calendar - iCalendar component object
- *
- * Copyright (C) 2000 Ximian, 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;
-
- struct attendee {
- icalproperty *prop;
- icalparameter *cutype_param;
- icalparameter *member_param;
- icalparameter *role_param;
- icalparameter *partstat_param;
- icalparameter *rsvp_param;
- icalparameter *delto_param;
- icalparameter *delfrom_param;
- icalparameter *sentby_param;
- icalparameter *cn_param;
- icalparameter *language_param;
- };
-
- GSList *attendee_list;
-
- icalproperty *categories;
-
- icalproperty *classification;
-
- struct text {
- icalproperty *prop;
- icalparameter *altrep_param;
- };
-
- GSList *comment_list; /* list of struct text */
-
- icalproperty *completed;
-
- GSList *contact_list; /* list of struct text */
-
- 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 */
-
- struct organizer {
- icalproperty *prop;
- icalparameter *sentby_param;
- icalparameter *cn_param;
- icalparameter *language_param;
- };
-
- struct organizer organizer;
-
- icalproperty *geo;
- icalproperty *last_modified;
- icalproperty *percent;
- icalproperty *priority;
-
- struct period {
- icalproperty *prop;
- icalparameter *value_param;
- };
-
- struct recur_id {
- struct datetime recur_time;
-
- icalparameter *range_param;
- };
-
- struct recur_id recur_id;
-
- 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 {
- /* Alarm icalcomponent we wrap */
- icalcomponent *icalcomp;
-
- /* Our extension UID property */
- icalproperty *uid;
-
- /* Properties */
-
- icalproperty *action;
- icalproperty *attach; /* FIXME: see scan_alarm_property() below */
-
- struct {
- icalproperty *prop;
- icalparameter *altrep_param;
- } description;
-
- icalproperty *duration;
- icalproperty *repeat;
- 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->contact_list = 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)
-{
- char *iso, *ret;
- 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";
- }
-
- iso = isodate_from_time_t (t);
- ret = g_strdup_printf ("%s-%d-%d-%d-%d@%s",
- iso,
- getpid (),
- getgid (),
- getppid (),
- serial++,
- hostname);
- g_free (iso);
-
- return ret;
-}
-
-/**
- * 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 an attendee property */
-static void
-scan_attendee (CalComponent *comp, GSList **attendee_list, icalproperty *prop)
-{
- struct attendee *attendee;
-
- attendee = g_new (struct attendee, 1);
- attendee->prop = prop;
-
- attendee->cutype_param = icalproperty_get_first_parameter (prop, ICAL_CUTYPE_PARAMETER);
- attendee->member_param = icalproperty_get_first_parameter (prop, ICAL_MEMBER_PARAMETER);
- attendee->role_param = icalproperty_get_first_parameter (prop, ICAL_ROLE_PARAMETER);
- attendee->partstat_param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- attendee->rsvp_param = icalproperty_get_first_parameter (prop, ICAL_RSVP_PARAMETER);
- attendee->delto_param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDTO_PARAMETER);
- attendee->delfrom_param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER);
- attendee->sentby_param = icalproperty_get_first_parameter (prop, ICAL_SENTBY_PARAMETER);
- attendee->cn_param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER);
- attendee->language_param = icalproperty_get_first_parameter (prop, ICAL_LANGUAGE_PARAMETER);
-
- *attendee_list = g_slist_append (*attendee_list, attendee);
-}
-
-/* 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 and attendee property */
-static void
-scan_organizer (CalComponent *comp, struct organizer *organizer, icalproperty *prop)
-{
- organizer->prop = prop;
-
- organizer->sentby_param = icalproperty_get_first_parameter (prop, ICAL_SENTBY_PARAMETER);
- organizer->cn_param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER);
- organizer->language_param = icalproperty_get_first_parameter (prop, ICAL_LANGUAGE_PARAMETER);
-}
-
-/* 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_id (CalComponent *comp, struct recur_id *recur_id, icalproperty *prop)
-{
- scan_datetime (comp, &recur_id->recur_time, prop);
-
- recur_id->range_param = icalproperty_get_first_parameter (prop, ICAL_RANGE_PARAMETER);
-}
-
-/* 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_ATTENDEE_PROPERTY:
- scan_attendee (comp, &priv->attendee_list, 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_CONTACT_PROPERTY:
- scan_text (comp, &priv->contact_list, 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_ORGANIZER_PROPERTY:
- scan_organizer (comp, &priv->organizer, prop);
- break;
-
- case ICAL_PERCENTCOMPLETE_PROPERTY:
- priv->percent = prop;
- break;
-
- case ICAL_PRIORITY_PROPERTY:
- priv->priority = prop;
- break;
-
- case ICAL_RECURRENCEID_PROPERTY:
- scan_recur_id (comp, &priv->recur_id, 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;
-}
-
-/* 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_with_zone (tim, FALSE, icaltimezone_get_utc_timezone ());
-
- 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);
-}
-
-/**
- * cal_component_get_contact_list:
- * @comp: A calendar component object.
- * @text_list: Return value for the contact properties and their parameters, as
- * a list of #CalComponentText structures. This should be freed using the
- * cal_component_free_text_list() function.
- *
- * Queries the contact of a calendar component object. The contact property can
- * appear several times inside a calendar component, and so a list of
- * #CalComponentText is returned.
- **/
-void
-cal_component_get_contact_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->contact_list, icalproperty_get_contact, text_list);
-}
-
-/**
- * cal_component_set_contact_list:
- * @comp: A calendar component object.
- * @text_list: List of #CalComponentText structures.
- *
- * Sets the contact of a calendar component object. The contact property can
- * appear several times inside a calendar component, and so a list of
- * #CalComponentText structures is used.
- **/
-void
-cal_component_set_contact_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_contact, &priv->contact_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 the icaltimetype has is_utc set, we set "UTC" as the TZID.
- This makes the timezone code simpler. */
- if (datetime->tzid_param)
- dt->tzid = g_strdup (icalparameter_get_tzid (datetime->tzid_param));
- else if (dt->value && dt->value->is_utc)
- dt->tzid = g_strdup ("UTC");
- 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 the TZID is set to "UTC", we set the is_utc flag. */
- if (dt->tzid && !strcmp (dt->tzid, "UTC"))
- dt->value->is_utc = 1;
-
- 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 the TZID is set to "UTC", we don't want to save the TZID. */
- if (dt->tzid && strcmp (dt->tzid, "UTC")) {
- 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: A 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 = g_strdup (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;
-
- /* Removing the DATE or DATE-TIME property will also remove
- any TZID parameter. */
- 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_organizer:
- * @comp: A calendar component object
- * @organizer: A value for the organizer
- *
- * Queries the organizer property of a calendar component object
- **/
-void
-cal_component_get_organizer (CalComponent *comp, CalComponentOrganizer *organizer)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (organizer != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->organizer.prop)
- organizer->value = icalproperty_get_organizer (priv->organizer.prop);
- else
- organizer->value = NULL;
-
- if (priv->organizer.sentby_param)
- organizer->sentby = icalparameter_get_sentby (priv->organizer.sentby_param);
- else
- organizer->sentby = NULL;
-
- if (priv->organizer.cn_param)
- organizer->cn = icalparameter_get_sentby (priv->organizer.cn_param);
- else
- organizer->cn = NULL;
-
- if (priv->organizer.language_param)
- organizer->language = icalparameter_get_sentby (priv->organizer.language_param);
- else
- organizer->language = NULL;
-
-}
-
-/**
- * cal_component_set_organizer:
- * @comp: A calendar component object.
- * @organizer: Value for the organizer property
- *
- * Sets the organizer of a calendar component object
- **/
-void
-cal_component_set_organizer (CalComponent *comp, CalComponentOrganizer *organizer)
-{
- 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 (!organizer) {
- if (priv->organizer.prop) {
- icalcomponent_remove_property (priv->icalcomp, priv->organizer.prop);
- icalproperty_free (priv->organizer.prop);
-
- priv->organizer.prop = NULL;
- priv->organizer.sentby_param = NULL;
- priv->organizer.cn_param = NULL;
- priv->organizer.language_param = NULL;
- }
-
- return;
- }
-
- g_return_if_fail (organizer->value != NULL);
-
- if (priv->organizer.prop)
- icalproperty_set_organizer (priv->organizer.prop, (char *) organizer->value);
- else {
- priv->organizer.prop = icalproperty_new_organizer ((char *) organizer->value);
- icalcomponent_add_property (priv->icalcomp, priv->organizer.prop);
- }
-
- if (organizer->sentby) {
- g_assert (priv->organizer.prop != NULL);
-
- if (priv->organizer.sentby_param)
- icalparameter_set_sentby (priv->organizer.sentby_param,
- (char *) organizer->sentby);
- else {
- priv->organizer.sentby_param = icalparameter_new_sentby (
- (char *) organizer->sentby);
- icalproperty_add_parameter (priv->organizer.prop,
- priv->organizer.sentby_param);
- }
- } else if (priv->organizer.sentby_param) {
- icalproperty_remove_parameter (priv->organizer.prop, ICAL_SENTBY_PARAMETER);
- icalparameter_free (priv->organizer.sentby_param);
- priv->organizer.sentby_param = NULL;
- }
-
- if (organizer->cn) {
- g_assert (priv->organizer.prop != NULL);
-
- if (priv->organizer.cn_param)
- icalparameter_set_cn (priv->organizer.cn_param,
- (char *) organizer->cn);
- else {
- priv->organizer.cn_param = icalparameter_new_cn (
- (char *) organizer->cn);
- icalproperty_add_parameter (priv->organizer.prop,
- priv->organizer.cn_param);
- }
- } else if (priv->organizer.cn_param) {
- icalproperty_remove_parameter (priv->organizer.prop, ICAL_CN_PARAMETER);
- icalparameter_free (priv->organizer.cn_param);
- priv->organizer.cn_param = NULL;
- }
-
- if (organizer->language) {
- g_assert (priv->organizer.prop != NULL);
-
- if (priv->organizer.language_param)
- icalparameter_set_language (priv->organizer.language_param,
- (char *) organizer->language);
- else {
- priv->organizer.language_param = icalparameter_new_language (
- (char *) organizer->language);
- icalproperty_add_parameter (priv->organizer.prop,
- priv->organizer.language_param);
- }
- } else if (priv->organizer.language_param) {
- icalproperty_remove_parameter (priv->organizer.prop, ICAL_LANGUAGE_PARAMETER);
- icalparameter_free (priv->organizer.language_param);
- priv->organizer.language_param = NULL;
- }
-
-
-}
-
-/**
- * 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_recurid:
- * @comp: A calendar component object.
- * @recur_id: Return value for the recurrence id property
- *
- * Queries the recurrence id property of a calendar component object
- **/
-void
-cal_component_get_recurid (CalComponent *comp, CalComponentRange **recur_id)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (recur_id != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_datetime (&priv->recur_id.recur_time,
- icalproperty_get_recurrenceid,
- (*recur_id)->datetime);
-}
-
-/**
- * cal_component_set_recurid:
- * @comp: A calendar component object.
- * @recur_id: Value for the recurrence id property.
- *
- * Sets the recurrence id property of a calendar component object.
- **/
-void
-cal_component_set_recurid (CalComponent *comp, CalComponentRange *recur_id)
-{
- 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->recur_id.recur_time,
- icalproperty_new_recurrenceid,
- icalproperty_set_recurrenceid,
- recur_id->datetime);
-}
-
-/**
- * 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);
- }
-}
-
-/* Gets a text list value */
-static void
-get_attendee_list (GSList *attendee_list, GSList **al)
-{
- GSList *l;
-
- *al = NULL;
-
- if (!attendee_list)
- return;
-
- for (l = attendee_list; l; l = l->next) {
- struct attendee *attendee;
- CalComponentAttendee *a;
-
- attendee = l->data;
- g_assert (attendee->prop != NULL);
-
- a = g_new0 (CalComponentAttendee, 1);
- a->value = icalproperty_get_attendee (attendee->prop);
-
- if (attendee->member_param)
- a->member = icalparameter_get_member (attendee->member_param);
- if (attendee->cutype_param)
- a->cutype = icalparameter_get_cutype (attendee->cutype_param);
- if (attendee->role_param)
- a->role = icalparameter_get_role (attendee->role_param);
- if (attendee->partstat_param)
- a->status = icalparameter_get_role (attendee->partstat_param);
- if (attendee->rsvp_param && icalparameter_get_rsvp (attendee->rsvp_param) == ICAL_RSVP_TRUE)
- a->rsvp = TRUE;
- else
- a->rsvp = FALSE;
- if (attendee->delfrom_param)
- a->delfrom = icalparameter_get_sentby (attendee->delfrom_param);
- if (attendee->delto_param)
- a->delto = icalparameter_get_sentby (attendee->delto_param);
- if (attendee->sentby_param)
- a->sentby = icalparameter_get_sentby (attendee->sentby_param);
- if (attendee->cn_param)
- a->cn = icalparameter_get_sentby (attendee->cn_param);
- if (attendee->language_param)
- a->language = icalparameter_get_sentby (attendee->language_param);
-
- *al = g_slist_prepend (*al, a);
- }
-
- *al = g_slist_reverse (*al);
-}
-
-
-/* Sets a text list value */
-static void
-set_attendee_list (CalComponent *comp,
- GSList **attendee_list,
- GSList *al)
-{
- CalComponentPrivate *priv;
- GSList *l;
-
- priv = comp->priv;
-
- /* Remove old attendees */
-
- for (l = *attendee_list; l; l = l->next) {
- struct attendee *attendee;
-
- attendee = l->data;
- g_assert (attendee->prop != NULL);
-
- icalcomponent_remove_property (priv->icalcomp, attendee->prop);
- icalproperty_free (attendee->prop);
- g_free (attendee);
- }
-
- g_slist_free (*attendee_list);
- *attendee_list = NULL;
-
- /* Add in new attendees */
-
- for (l = al; l; l = l->next) {
- CalComponentAttendee *a;
- struct attendee *attendee;
-
- a = l->data;
- g_return_if_fail (a->value != NULL);
-
- attendee = g_new0 (struct attendee, 1);
-
- attendee->prop = icalproperty_new_attendee (a->value);
- icalcomponent_add_property (priv->icalcomp, attendee->prop);
-
- if (a->member) {
- attendee->member_param = icalparameter_new_member (a->member);
- icalproperty_add_parameter (attendee->prop, attendee->member_param);
- }
-
- attendee->cutype_param = icalparameter_new_cutype (a->cutype);
- icalproperty_add_parameter (attendee->prop, attendee->cutype_param);
-
- attendee->role_param = icalparameter_new_role (a->role);
- icalproperty_add_parameter (attendee->prop, attendee->role_param);
-
- attendee->partstat_param = icalparameter_new_partstat (a->status);
- icalproperty_add_parameter (attendee->prop, attendee->partstat_param);
-
- if (a->rsvp)
- attendee->rsvp_param = icalparameter_new_rsvp (ICAL_RSVP_TRUE);
- else
- attendee->rsvp_param = icalparameter_new_rsvp (ICAL_RSVP_FALSE);
- icalproperty_add_parameter (attendee->prop, attendee->rsvp_param);
-
- if (a->delfrom) {
- attendee->delfrom_param = icalparameter_new_delegatedfrom (a->delfrom);
- icalproperty_add_parameter (attendee->prop, attendee->delfrom_param);
- }
- if (a->delto) {
- attendee->delto_param = icalparameter_new_delegatedto (a->delto);
- icalproperty_add_parameter (attendee->prop, attendee->delto_param);
- }
- if (a->sentby) {
- attendee->sentby_param = icalparameter_new_sentby (a->sentby);
- icalproperty_add_parameter (attendee->prop, attendee->sentby_param);
- }
- if (a->cn) {
- attendee->cn_param = icalparameter_new_cn (a->cn);
- icalproperty_add_parameter (attendee->prop, attendee->cn_param);
- }
- if (a->language) {
- attendee->language_param = icalparameter_new_language (a->language);
- icalproperty_add_parameter (attendee->prop, attendee->language_param);
- }
-
- *attendee_list = g_slist_prepend (*attendee_list, attendee);
- }
-
- *attendee_list = g_slist_reverse (*attendee_list);
-}
-
-/**
- * cal_component_get_attendee_list:
- * @comp: A calendar component object.
- * @attendee_list: Return value for the attendee property.
- * This should be freed using the cal_component_free_attendee_list ()
- * function.
- *
- * Queries the attendee properties of the calendar component object
- **/
-void
-cal_component_get_attendee_list (CalComponent *comp, GSList **attendee_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (attendee_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_attendee_list (priv->attendee_list, attendee_list);
-}
-
-/**
- * cal_component_set_attendee_list:
- * @comp: A calendar component object.
- * @attendee_list: Values for attendee properties
- *
- * Sets the attendees of a calendar component object
- **/
-void
-cal_component_set_attendee_list (CalComponent *comp, GSList *attendee_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_attendee_list (comp, &priv->attendee_list, attendee_list);
-}
-
-
-
-
-/**
- * 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);
-
- g_free (dt->value);
- g_free ((char*)dt->tzid);
-}
-
-/**
- * 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 ((char*)cdt->tzid);
-
- 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_free_attendee_list:
- * @attendee_list:
- *
- *
- **/
-void
-cal_component_free_attendee_list (GSList *attendee_list)
-{
- GSList *l;
-
- for (l = attendee_list; l; l = l->next) {
- CalComponentAttendee *attendee;
-
- g_assert (l->data != NULL);
-
- attendee = l->data;
- g_return_if_fail (attendee != NULL);
- g_free (attendee);
- }
-
- g_slist_free (attendee_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;
-}
-
-/**
- * cal_component_add_alarm:
- * @comp: A calendar component.
- * @alarm: An alarm.
- *
- * Adds an alarm subcomponent to a calendar component. You should have created
- * the @alarm by using cal_component_alarm_new(); it is invalid to use a
- * #CalComponentAlarm structure that came from cal_component_get_alarm(). After
- * adding the alarm, the @alarm structure is no longer valid because the
- * internal structures may change and you should get rid of it by using
- * cal_component_alarm_free().
- **/
-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;
-
- add_alarm (comp, alarm->icalcomp, icalproperty_get_x (alarm->uid));
- icalcomponent_add_component (priv->icalcomp, alarm->icalcomp);
-}
-
-/**
- * cal_component_remove_alarm:
- * @comp: A calendar component.
- * @auid: UID of the alarm to remove.
- *
- * Removes an alarm subcomponent from a calendar component. If the alarm that
- * corresponds to the specified @auid had been fetched with
- * cal_component_get_alarm(), then those alarm structures will be invalid; you
- * should get rid of them with cal_component_alarm_free() before using this
- * function.
- **/
-void
-cal_component_remove_alarm (CalComponent *comp, const char *auid)
-{
- CalComponentPrivate *priv;
- icalcomponent *alarm;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (auid != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- alarm = g_hash_table_lookup (priv->alarm_uid_hash, auid);
- if (!alarm)
- return;
-
- g_hash_table_remove (priv->alarm_uid_hash, auid);
- icalcomponent_remove_component (priv->icalcomp, alarm);
- icalcomponent_free (alarm);
-}
-
-static gboolean
-for_each_remove_all_alarms (gpointer key, gpointer value, gpointer data)
-{
- CalComponent *comp = CAL_COMPONENT (data);
- CalComponentPrivate *priv;
- icalcomponent *alarm = value;
-
- priv = comp->priv;
-
- icalcomponent_remove_component (priv->icalcomp, alarm);
- icalcomponent_free (alarm);
-
- return TRUE;
-}
-
-/**
- * cal_component_remove_all_alarms:
- * @comp: A calendar component
- *
- * Remove all alarms from the calendar component
- **/
-void
-cal_component_remove_all_alarms (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);
-
- g_hash_table_foreach_remove (priv->alarm_uid_hash, for_each_remove_all_alarms, comp);
-}
-
-
-/* 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_ATTACH_PROPERTY:
- /* FIXME: mail alarms may have any number of these, not just one */
- alarm->attach = prop;
- break;
-
- case ICAL_DESCRIPTION_PROPERTY:
- alarm->description.prop = prop;
- alarm->description.altrep_param = icalproperty_get_first_parameter (
- prop, ICAL_ALTREP_PARAMETER);
- break;
-
- case ICAL_DURATION_PROPERTY:
- alarm->duration = prop;
- break;
-
- case ICAL_REPEAT_PROPERTY:
- alarm->repeat = 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 (icalcomponent *subcomp)
-{
- CalComponentAlarm *alarm;
- icalproperty *prop;
-
- alarm = g_new (CalComponentAlarm, 1);
-
- alarm->icalcomp = subcomp;
- alarm->uid = NULL;
-
- alarm->action = NULL;
- alarm->attach = NULL;
- alarm->description.prop = NULL;
- alarm->description.altrep_param = NULL;
- alarm->duration = NULL;
- alarm->repeat = NULL;
- alarm->trigger = 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 (alarm);
- else
- return 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;
- char *new_auid ;
-
- alarm = g_new (CalComponentAlarm, 1);
-
- 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);
-
- alarm->action = NULL;
- alarm->attach = NULL;
- alarm->description.prop = NULL;
- alarm->description.altrep_param = NULL;
- alarm->duration = NULL;
- alarm->repeat = NULL;
- alarm->trigger = NULL;
-
- return alarm;
-}
-
-/**
- * cal_component_alarm_clone:
- * @alarm: An alarm subcomponent.
- *
- * Creates a new alarm subcomponent by copying the information from another one.
- *
- * Return value: A newly-created alarm subcomponent with the same values as the
- * original one. Should be freed with cal_component_alarm_free().
- **/
-CalComponentAlarm *
-cal_component_alarm_clone (CalComponentAlarm *alarm)
-{
- icalcomponent *icalcomp;
-
- g_return_val_if_fail (alarm != NULL, NULL);
-
- icalcomp = icalcomponent_new_clone (alarm->icalcomp);
- return make_alarm (icalcomp);
-}
-
-/**
- * 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->uid = NULL;
- alarm->action = NULL;
- alarm->attach = NULL;
- alarm->description.prop = NULL;
- alarm->description.altrep_param = NULL;
- alarm->duration = NULL;
- alarm->repeat = NULL;
- alarm->trigger = NULL;
-
- g_free (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)
-{
- enum icalproperty_action ipa;
-
- 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;
- }
-
- ipa = icalproperty_get_action (alarm->action);
-
- switch (ipa) {
- case ICAL_ACTION_AUDIO:
- *action = CAL_ALARM_AUDIO;
- break;
-
- case ICAL_ACTION_DISPLAY:
- *action = CAL_ALARM_DISPLAY;
- break;
-
- case ICAL_ACTION_EMAIL:
- *action = CAL_ALARM_EMAIL;
- break;
-
- case ICAL_ACTION_PROCEDURE:
- *action = CAL_ALARM_PROCEDURE;
- break;
-
- case ICAL_ACTION_NONE:
- *action = CAL_ALARM_NONE;
- break;
-
- default:
- *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)
-{
- enum icalproperty_action ipa;
-
- 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:
- ipa = ICAL_ACTION_AUDIO;
- break;
-
- case CAL_ALARM_DISPLAY:
- ipa = ICAL_ACTION_DISPLAY;
- break;
-
- case CAL_ALARM_EMAIL:
- ipa = ICAL_ACTION_EMAIL;
- break;
-
- case CAL_ALARM_PROCEDURE:
- ipa = ICAL_ACTION_PROCEDURE;
- break;
-
- default:
- g_assert_not_reached ();
- ipa = ICAL_ACTION_NONE;
- }
-
- if (alarm->action)
- icalproperty_set_action (alarm->action, ipa);
- else {
- alarm->action = icalproperty_new_action (ipa);
- icalcomponent_add_property (alarm->icalcomp, alarm->action);
- }
-}
-
-/**
- * cal_component_alarm_get_attach:
- * @alarm: An alarm.
- * @attach: Return value for the attachment; should be freed using icalattach_unref().
- *
- * Queries the attachment property of an alarm.
- **/
-void
-cal_component_alarm_get_attach (CalComponentAlarm *alarm, icalattach **attach)
-{
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (attach != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (alarm->attach) {
- *attach = icalproperty_get_attach (alarm->attach);
- icalattach_ref (*attach);
- } else
- *attach = NULL;
-}
-
-/**
- * cal_component_alarm_set_attach:
- * @alarm: An alarm.
- * @attach: Attachment property or NULL to remove an existing property.
- *
- * Sets the attachment property of an alarm.
- **/
-void
-cal_component_alarm_set_attach (CalComponentAlarm *alarm, icalattach *attach)
-{
- g_return_if_fail (alarm != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (alarm->attach) {
- icalcomponent_remove_property (alarm->icalcomp, alarm->attach);
- icalproperty_free (alarm->attach);
- alarm->attach = NULL;
- }
-
- if (attach) {
- alarm->attach = icalproperty_new_attach (attach);
- icalcomponent_add_property (alarm->icalcomp, alarm->attach);
- }
-}
-
-/**
- * cal_component_alarm_get_description:
- * @alarm: An alarm.
- * @description: Return value for the description property and its parameters.
- *
- * Queries the description property of an alarm.
- **/
-void
-cal_component_alarm_get_description (CalComponentAlarm *alarm, CalComponentText *description)
-{
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (description != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (alarm->description.prop)
- description->value = icalproperty_get_description (alarm->description.prop);
- else
- description->value = NULL;
-
- if (alarm->description.altrep_param)
- description->altrep = icalparameter_get_altrep (alarm->description.altrep_param);
- else
- description->altrep = NULL;
-}
-
-/**
- * cal_component_alarm_set_description:
- * @alarm: An alarm.
- * @description: Description property and its parameters, or NULL for no description.
- *
- * Sets the description property of an alarm.
- **/
-void
-cal_component_alarm_set_description (CalComponentAlarm *alarm, CalComponentText *description)
-{
- g_return_if_fail (alarm != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (alarm->description.prop) {
- icalcomponent_remove_property (alarm->icalcomp, alarm->description.prop);
- icalproperty_free (alarm->description.prop);
-
- alarm->description.prop = NULL;
- alarm->description.altrep_param = NULL;
- }
-
- if (!description)
- return;
-
- g_return_if_fail (description->value != NULL);
-
- alarm->description.prop = icalproperty_new_description (description->value);
- icalcomponent_add_property (alarm->icalcomp, alarm->description.prop);
-
- if (description->altrep) {
- alarm->description.altrep_param = icalparameter_new_altrep (
- (char *) description->altrep);
- icalproperty_add_parameter (alarm->description.prop,
- alarm->description.altrep_param);
- }
-}
-
-/**
- * cal_component_alarm_get_repeat:
- * @alarm: An alarm.
- * @repeat: Return value for the repeat/duration properties.
- *
- * Queries the repeat/duration properties of an alarm.
- **/
-void
-cal_component_alarm_get_repeat (CalComponentAlarm *alarm, CalAlarmRepeat *repeat)
-{
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (repeat != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (!(alarm->repeat && alarm->duration)) {
- repeat->repetitions = 0;
- memset (&repeat->duration, 0, sizeof (repeat->duration));
- return;
- }
-
- repeat->repetitions = icalproperty_get_repeat (alarm->repeat);
- repeat->duration = icalproperty_get_duration (alarm->duration);
-}
-
-/**
- * cal_component_alarm_set_repeat:
- * @alarm: An alarm.
- * @repeat: Repeat/duration values. To remove any repetitions from the alarm,
- * set the @repeat.repetitions to 0.
- *
- * Sets the repeat/duration values for an alarm.
- **/
-void
-cal_component_alarm_set_repeat (CalComponentAlarm *alarm, CalAlarmRepeat repeat)
-{
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (repeat.repetitions >= 0);
-
- g_assert (alarm->icalcomp != NULL);
-
- /* Delete old properties */
-
- if (alarm->repeat) {
- icalcomponent_remove_property (alarm->icalcomp, alarm->repeat);
- icalproperty_free (alarm->repeat);
- alarm->repeat = NULL;
- }
-
- if (alarm->duration) {
- icalcomponent_remove_property (alarm->icalcomp, alarm->duration);
- icalproperty_free (alarm->duration);
- alarm->duration = NULL;
- }
-
- /* Set the new properties */
-
- if (repeat.repetitions == 0)
- return; /* For zero extra repetitions the properties should not exist */
-
- alarm->repeat = icalproperty_new_repeat (repeat.repetitions);
- icalcomponent_add_property (alarm->icalcomp, alarm->repeat);
-
- alarm->duration = icalproperty_new_duration (repeat.duration);
- icalcomponent_add_property (alarm->icalcomp, alarm->duration);
-}
-
-/**
- * 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;
- value_type = ICAL_VALUE_DURATION;
- related = ICAL_RELATED_START;
- break;
-
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- t.duration = trigger.u.rel_duration;
- value_type = ICAL_VALUE_DURATION;
- related = ICAL_RELATED_END;
- break;
-
- case CAL_ALARM_TRIGGER_ABSOLUTE:
- t.time = trigger.u.abs_time;
- value_type = ICAL_VALUE_DATETIME;
- 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);
- }
- }
-}
-
-/* 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 801cdc51f0..0000000000
--- a/calendar/cal-util/cal-component.h
+++ /dev/null
@@ -1,430 +0,0 @@
-/* Evolution calendar - iCalendar component object
- *
- * Copyright (C) 2000 Ximian, 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_COMPONENT, /* not a real field */
- 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;
-
-/* The type of range */
-typedef enum {
- CAL_COMPONENT_RANGE_SINGLE,
- CAL_COMPONENT_RANGE_THISPRIOR,
- CAL_COMPONENT_RANGE_THISFUTURE,
-} CalComponentRangeType;
-
-typedef struct {
- CalComponentRangeType type;
-
- CalComponentDateTime *datetime;
-} CalComponentRange;
-
-/* 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;
-
-/* Organizer & Attendee */
-typedef struct {
- const char *value;
-
- const char *member;
- icalparameter_cutype cutype;
- icalparameter_role role;
- icalparameter_partstat status;
- gboolean rsvp;
-
- const char *delto;
- const char *delfrom;
- const char *sentby;
- const char *cn;
- const char *language;
-} CalComponentAttendee;
-
-typedef struct {
- const char *value;
- const char *sentby;
- const char *cn;
- const char *language;
-} CalComponentOrganizer;
-
-/* 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_contact_list (CalComponent *comp, GSList **text_list);
-void cal_component_set_contact_list (CalComponent *comp, GSList *text_list);
-
-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_organizer (CalComponent *comp, CalComponentOrganizer *organizer);
-void cal_component_set_organizer (CalComponent *comp, CalComponentOrganizer *organizer);
-
-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_recurid (CalComponent *comp, CalComponentRange **recur_id);
-void cal_component_set_recurid (CalComponent *comp, CalComponentRange *recur_id);
-
-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);
-
-void cal_component_get_attendee_list (CalComponent *comp, GSList **attendee_list);
-void cal_component_set_attendee_list (CalComponent *comp, GSList *attendee_list);
-
-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);
-void cal_component_free_attendee_list (GSList *attendee_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_start;
- time_t occur_end;
-} 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;
-
-typedef struct {
- /* Number of extra repetitions, zero for none */
- int repetitions;
-
- /* Interval between repetitions */
- struct icaldurationtype duration;
-} CalAlarmRepeat;
-
-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);
-void cal_component_remove_all_alarms (CalComponent *comp);
-
-GList *cal_component_get_alarm_uids (CalComponent *comp);
-CalComponentAlarm *cal_component_get_alarm (CalComponent *comp, const char *auid);
-
-void cal_component_alarms_free (CalComponentAlarms *alarms);
-
-/* CalComponentAlarms */
-CalComponentAlarm *cal_component_alarm_new (void);
-CalComponentAlarm *cal_component_alarm_clone (CalComponentAlarm *alarm);
-void cal_component_alarm_free (CalComponentAlarm *alarm);
-
-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_attach (CalComponentAlarm *alarm, icalattach **attach);
-void cal_component_alarm_set_attach (CalComponentAlarm *alarm, icalattach *attach);
-
-void cal_component_alarm_get_description (CalComponentAlarm *alarm, CalComponentText *description);
-void cal_component_alarm_set_description (CalComponentAlarm *alarm, CalComponentText *description);
-
-void cal_component_alarm_get_repeat (CalComponentAlarm *alarm, CalAlarmRepeat *repeat);
-void cal_component_alarm_set_repeat (CalComponentAlarm *alarm, CalAlarmRepeat repeat);
-
-void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger);
-void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger);
-
-
-
-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 9afcee9784..0000000000
--- a/calendar/cal-util/cal-recur.c
+++ /dev/null
@@ -1,3886 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Evolution calendar recurrence rule functions
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Damon Chaplin <damon@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 <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.
- *
- *
- * FIXME: I think there are a few errors in this code:
- *
- * 1) I'm not sure it should be generating events in parallel like it says
- * above. That needs to be checked.
- *
- * 2) I didn't think about timezone changes when implementing this. I just
- * assumed all the occurrences of the event would be in local time.
- * But when clocks go back or forwards due to daylight-saving time, some
- * special handling may be needed, especially for the shorter frequencies.
- * e.g. for a MINUTELY frequency it should probably iterate over all the
- * minutes before and after clocks go back (i.e. some may be the same local
- * time but have different UTC offsets). For longer frequencies, if an
- * occurrence lands on the overlapping or non-existant time when clocks
- * go back/forward, then it may need to choose which of the times to use
- * or move the time forward or something. I'm not sure this is clear in the
- * spec.
- */
-
-/* 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, inclusive. 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 flags; /* The meaning of this depends on where the
- CalObjTime is used. In most cases this is
- set to TRUE to indicate that this is an
- RDATE with an end or a duration set.
- In the exceptions code, this is set to TRUE
- to indicate that this is an EXDATE with a
- DATE value. */
-};
-
-/* 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,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data);
-
-static CalRecurrence * cal_recur_from_icalproperty (icalproperty *prop,
- gboolean exception,
- icaltimezone *zone);
-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,
- icaltimezone *zone,
- 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,
- icaltimezone *zone,
- 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,
- icaltimezone *zone);
-static gint cal_obj_date_only_compare_func (const void *arg1,
- const void *arg2);
-
-
-
-static gboolean cal_recur_ensure_end_dates (CalComponent *comp,
- gboolean refresh,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data);
-static gboolean cal_recur_ensure_rule_end_date (CalComponent *comp,
- icalproperty *prop,
- gboolean exception,
- gboolean refresh,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data);
-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,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_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, tz_cb, tz_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,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_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;
- icaltimezone *start_zone = NULL, *end_zone = NULL;
-
- 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;
- }
-
- /* FIXME: All floating times, including those from recurrence rules,
- should be converted to the current timezone, otherwise the time_t
- values may be outside the given range. This may also mean that
- we need to add a timezone argument to the IDL method. */
-
- if (dtstart.tzid && tz_cb)
- start_zone = (*tz_cb) (dtstart.tzid, tz_cb_data);
- if (dtend.tzid && tz_cb)
- end_zone = (*tz_cb) (dtend.tzid, tz_cb_data);
-
- dtstart_time = icaltime_as_timet_with_zone (*dtstart.value,
- start_zone);
- if (start == -1)
- start = dtstart_time;
-
- /* FIXME: DURATION could be used instead, couldn't it? - Damon */
- if (!dtend.value) {
- *dtend.value = *dtstart.value;
- dtend.value->hour = 0;
- dtend.value->minute = 0;
- dtend.value->second = 0;
- icaltime_adjust (dtend.value, 1, 0, 0, 0);
- }
- dtend_time = icaltime_as_timet_with_zone (*dtend.value, end_zone);
-
- /* 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, tz_cb, tz_cb_data);
-
- 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. We do all calculation
- in the timezone of the DTSTART. */
- cal_object_time_from_time (&interval_start, start, start_zone);
- if (end != -1)
- cal_object_time_from_time (&interval_end, end - 1, start_zone);
-
- cal_object_time_from_time (&event_start, dtstart_time, start_zone);
- cal_object_time_from_time (&event_end, dtend_time, start_zone);
-
- /* 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.flags = FALSE;
- }
-
- if (!generate_instances_for_chunk (comp, dtstart_time,
- start_zone,
- 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.
- * @zone: The DTSTART timezone, used for converting the UNTIL property if it
- * is given as a DATE value.
- *
- * 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,
- icaltimezone *zone)
-{
- 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) {
- /* If COUNT is set, we use the pre-calculated enddate. */
- r->enddate = cal_recur_get_rule_end_date (prop);
- } else {
- if (icaltime_is_null_time (ir.until)) {
- /* If neither COUNT or UNTIL is set, the event
- recurs forever. */
- r->enddate = 0;
- } else if (ir.until.is_date) {
- /* If UNTIL is a DATE, we stop at the end of
- the day, in local time (with the DTSTART timezone).
- Note that UNTIL is inclusive so we stop before
- midnight. */
- ir.until.hour = 23;
- ir.until.minute = 59;
- ir.until.second = 59;
-
- r->enddate = icaltime_as_timet_with_zone (ir.until,
- zone);
- } else {
- /* If UNTIL is a DATE-TIME, it must be in UTC. */
- icaltimezone *utc_zone;
- utc_zone = icaltimezone_get_utc_timezone ();
- r->enddate = icaltime_as_timet_with_zone (ir.until,
- utc_zone);
- }
- }
-
- 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,
- icaltimezone *zone,
- 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 icaltimetype start_tt, end_tt;
- 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, zone);
-
- tmp_occs = cal_obj_expand_recurrence (event_start, zone, 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 RDATE occurrence dates. If they have an end time
- or duration set, flag them as RDATEs, and store a pointer to the
- period in the rdate_periods array. Otherwise we can just treat them
- as normal occurrences. */
- for (elem = rdates; elem; elem = elem->next) {
- CalComponentPeriod *p;
- CalObjRecurrenceDate rdate;
-
- p = elem->data;
-
- /* FIXME: We currently assume RDATEs are in the same timezone
- as DTSTART. We should get the RDATE timezone and convert
- to the DTSTART timezone first. */
- cotime.year = p->start.year;
- cotime.month = p->start.month - 1;
- cotime.day = p->start.day;
- cotime.hour = p->start.hour;
- cotime.minute = p->start.minute;
- cotime.second = p->start.second;
- cotime.flags = FALSE;
-
- /* 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)
- FIXME. */
- if (p->type != CAL_COMPONENT_PERIOD_DATETIME
- || p->u.end.second != -1) {
- cotime.flags = 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, zone);
-
- tmp_occs = cal_obj_expand_recurrence (event_start, zone, 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;
-
- cdt = elem->data;
-
- /* FIXME: We currently assume EXDATEs are in the same timezone
- as DTSTART. We should get the EXDATE timezone and convert
- to the DTSTART timezone first. */
- cotime.year = cdt->value->year;
- cotime.month = cdt->value->month - 1;
- cotime.day = cdt->value->day;
-
- /* If the EXDATE has a DATE value, set the time to the start
- of the day and set flags to TRUE so we know to skip all
- occurrences on that date. */
- if (cdt->value->is_date) {
- cotime.hour = 0;
- cotime.minute = 0;
- cotime.second = 0;
- cotime.flags = TRUE;
- } else {
- cotime.hour = cdt->value->hour;
- cotime.minute = cdt->value->minute;
- cotime.second = cdt->value->second;
- cotime.flags = FALSE;
- }
-
- 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_tt = icaltime_null_time ();
- start_tt.year = occ->year;
- start_tt.month = occ->month + 1;
- start_tt.day = occ->day;
- start_tt.hour = occ->hour;
- start_tt.minute = occ->minute;
- start_tt.second = occ->second;
- start_time = icaltime_as_timet_with_zone (start_tt, zone);
-
- if (start_time == -1) {
- g_warning ("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->flags) {
- /* If it is an RDATE, we see if the end date or
- duration was set. If not, we use the same duration
- as the original occurrence. */
- 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_tt = icaltime_null_time ();
- end_tt.year = occ->year;
- end_tt.month = occ->month + 1;
- end_tt.day = occ->day;
- end_tt.hour = occ->hour;
- end_tt.minute = occ->minute;
- end_tt.second = occ->second;
- end_time = icaltime_as_timet_with_zone (end_tt, zone);
-
- if (end_time == -1) {
- g_warning ("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;
-
- 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) {
- /* FIXME: We currently assume RDATEs are in the same timezone
- as DTSTART. We should get the RDATE timezone and convert
- to the DTSTART timezone first. */
- occ->year = p->u.end.year;
- occ->month = p->u.end.month - 1;
- occ->day = p->u.end.day;
- occ->hour = p->u.end.hour;
- occ->minute = p->u.end.minute;
- occ->second = p->u.end.second;
- occ->flags = FALSE;
- } 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,
- icaltimezone *zone,
- 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, zone);
- 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 frequency");
- 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 with an end or
- duration set, 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->flags && !current_time_is_exception) {
- last_occ_kept = &g_array_index (occs,
- CalObjTime,
- j - 1);
- last_occ_kept->flags = 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) {
- /* If the exception is an EXDATE with
- a DATE value, we only have to
- compare the date. */
- if (ex_occ->flags)
- cmp = cal_obj_date_only_compare_func (ex_occ, occ);
- else
- cmp = cal_obj_time_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) {
- /* We are keeping this occurrence, so we move it to
- the next free space, unless its position hasn't
- changed (i.e. all previous occurrences were also
- kept). */
- 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;
-}
-
-
-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;
-}
-
-
-/* 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,
- icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- tt = icaltime_from_timet_with_zone (t, FALSE, zone);
-
- cotime->year = tt.year;
- cotime->month = tt.month - 1;
- cotime->day = tt.day;
- cotime->hour = tt.hour;
- cotime->minute = tt.minute;
- cotime->second = tt.second;
- cotime->flags = 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,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data)
-{
- 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,
- tz_cb, tz_cb_data);
- }
-
- /* 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,
- tz_cb, tz_cb_data);
- }
-
- 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,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data)
-{
- 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, tz_cb, tz_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;
- icaltimezone *utc_zone;
-
- 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);
-
- utc_zone = icaltimezone_get_utc_timezone ();
- return icaltime_as_timet_with_zone (icaltime,
- utc_zone);
- }
- }
-
- 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;
- icaltimezone *utc_zone;
- struct icaltimetype icaltime;
- const char *end_date_string, *xname;
-
- /* We save the value as a UTC DATE-TIME. */
- utc_zone = icaltimezone_get_utc_timezone ();
- icaltime = icaltime_from_timet_with_zone (end_date, FALSE, utc_zone);
- 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 921a230de4..0000000000
--- a/calendar/cal-util/cal-recur.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Evolution calendar recurrence rule functions
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Damon Chaplin <damon@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_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);
-
-typedef icaltimezone* (* CalRecurResolveTimezoneFn) (const char *tzid,
- 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.
- *
- * The tz_cb is used to resolve references to timezones. It is passed a TZID
- * and should return the icaltimezone* corresponding to that TZID. We need to
- * do this as we access timezones in different ways on the client & server.
- */
-void cal_recur_generate_instances (CalComponent *comp,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data,
- CalRecurResolveTimezoneFn tz_cb,
- gpointer tz_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 774b9aca11..0000000000
--- a/calendar/cal-util/cal-util.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Ximian, 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.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);
-}
-
-icalcomponent *
-cal_util_new_top_level (void)
-{
- icalcomponent *icalcomp;
- icalproperty *prop;
-
- icalcomp = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-
- /* RFC 2445, section 4.7.1 */
- prop = icalproperty_new_calscale ("GREGORIAN");
- icalcomponent_add_property (icalcomp, prop);
-
- /* RFC 2445, section 4.7.3 */
- prop = icalproperty_new_prodid ("-//Ximian//NONSGML Evolution Calendar//EN");
- icalcomponent_add_property (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 (icalcomp, prop);
-
- return icalcomp;
-}
-
-/* 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)
- /* If the duration is negative then dur_time
- * will be negative as well; that is why we
- * subtract to expand the range.
- */
- *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 is true then dur_time will already be
- * negative. So we do not need to test for dur->is_neg here; we
- * can simply add the dur_time value to the occur_time and get
- * the correct result.
- */
-
- 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_start = start;
- instance->occur_end = end;
-
- 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;
- CalComponentDateTime dt_start, dt_end;
-
- cal_component_get_dtstart (comp, &dt_start);
- cal_component_get_dtend (comp, &dt_end);
-
- 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;
-
- /* No particular occurrence, so just use the times from the component */
-
- if (dt_start.value)
- instance->occur_start = icaltime_as_timet (*dt_start.value);
- else
- instance->occur_start = -1;
-
- if (dt_end.value)
- instance->occur_end = icaltime_as_timet (*dt_end.value);
- else
- instance->occur_end = -1;
-
- aod->triggers = g_slist_prepend (aod->triggers, instance);
- aod->n_triggers++;
- }
-
- cal_component_free_datetime (&dt_start);
- cal_component_free_datetime (&dt_end);
-}
-
-/* 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;
-}
-
-/**
- * cal_util_generate_alarms_for_comp
- * @comp: the CalComponent to generate alarms from
- * @start: start time
- * @end: end time
- * @resolve_tzid: callback for resolving timezones
- * @user_data: data to be passed to the resolve_tzid callback
- *
- * Generates alarm instances for a calendar component. Returns the instances
- * structure, or NULL if no alarm instances occurred in the specified time
- * range.
- */
-CalComponentAlarms *
-cal_util_generate_alarms_for_comp (CalComponent *comp,
- time_t start,
- time_t end,
- CalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data)
-{
- 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,
- resolve_tzid, user_data);
-
- /* 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;
-}
-
-/**
- * cal_util_generate_alarms_for_list
- * @comps: list of CalComponent's
- * @start: start time
- * @end: end time
- * @comp_alarms: list to be returned
- * @resolve_tzid: callback for resolving timezones
- * @user_data: data to be passed to the resolve_tzid callback
- *
- * 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.
- */
-int
-cal_util_generate_alarms_for_list (GList *comps,
- time_t start,
- time_t end,
- GSList **comp_alarms,
- CalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data)
-{
- GList *l;
- int n;
-
- n = 0;
-
- for (l = comps; l; l = l->next) {
- CalComponent *comp;
- CalComponentAlarms *alarms;
-
- comp = CAL_COMPONENT (l->data);
- alarms = cal_util_generate_alarms_for_comp (comp, start, end, resolve_tzid, user_data);
-
- if (alarms) {
- *comp_alarms = g_slist_prepend (*comp_alarms, alarms);
- n++;
- }
- }
-
- return n;
-}
-
-
-/* Converts an iCalendar PRIORITY value to a translated string. Any unknown
- priority value (i.e. not 0-9) will be returned as "" (undefined). */
-char *
-cal_util_priority_to_string (int priority)
-{
- char *retval;
-
- if (priority <= 0)
- retval = "";
- else if (priority <= 4)
- retval = _("High");
- else if (priority == 5)
- retval = _("Normal");
- else if (priority <= 9)
- retval = _("Low");
- else
- retval = "";
-
- return retval;
-}
-
-
-/* Converts a translated priority string to an iCalendar priority value.
- Returns -1 if the priority string is not valid. */
-int
-cal_util_priority_from_string (const char *string)
-{
- int priority;
-
- /* An empty string is the same as 'None'. */
- if (!string || !string[0] || !g_strcasecmp (string, _("Undefined")))
- priority = 0;
- else if (!g_strcasecmp (string, _("High")))
- priority = 3;
- else if (!g_strcasecmp (string, _("Normal")))
- priority = 5;
- else if (!g_strcasecmp (string, _("Low")))
- priority = 7;
- else
- priority = -1;
-
- return priority;
-}
diff --git a/calendar/cal-util/cal-util.h b/calendar/cal-util/cal-util.h
deleted file mode 100644
index 9e7c7ce5e4..0000000000
--- a/calendar/cal-util/cal-util.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Ximian, 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 <ical.h>
-#include <time.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/cal-recur.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;
-
-/* Used for mode stuff */
-typedef enum {
- CAL_MODE_INVALID = -1,
- CAL_MODE_LOCAL = 1 << 0,
- CAL_MODE_REMOTE = 1 << 1,
- CAL_MODE_ANY = 0x07
-} CalMode;
-
-void cal_obj_uid_list_free (GList *list);
-
-icalcomponent *cal_util_new_top_level (void);
-
-CalComponentAlarms *cal_util_generate_alarms_for_comp (CalComponent *comp,
- time_t start,
- time_t end,
- CalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data);
-int cal_util_generate_alarms_for_list (GList *comps,
- time_t start,
- time_t end,
- GSList **comp_alarms,
- CalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data);
-
-icaltimezone *cal_util_resolve_tzid (const char *tzid, gpointer data);
-
-char *cal_util_priority_to_string (int priority);
-int cal_util_priority_from_string (const char *string);
-
-
-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 213017ea0e..0000000000
--- a/calendar/cal-util/test-recur.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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
- */
-
-/*
- * 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,
- NULL, NULL);
-#else
- cal_recur_generate_instances (comp, -1, -1,
- occurrence_cb, &occurrences,
- NULL, NULL);
-#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 f66d851399..0000000000
--- a/calendar/cal-util/timeutil.c
+++ /dev/null
@@ -1,585 +0,0 @@
-/* Miscellaneous time-related utilities
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Damon Chaplin <damon@ximian.com>
- */
-
-#include <string.h>
-#include <ctype.h>
-#include <glib.h>
-#include <ical.h>
-#include "timeutil.h"
-
-
-
-#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 */
-
-
-/* Number of days in a month, using 0 (Jan) to 11 (Dec). For leap years,
- add 1 to February (month 1). */
-static const int days_in_month[12] = {
- 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
-};
-
-
-
-/**************************************************************************
- * time_t manipulation functions.
- *
- * NOTE: these use the Unix timezone functions like mktime() and localtime()
- * and so should not be used in Evolution. New Evolution code should use
- * icaltimetype values rather than time_t values wherever possible.
- **************************************************************************/
-
-static 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);
-}
-
-/* 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;
-
- 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;
- }
-
- 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_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_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);
-}
-
-/* Returns the start of the week. week_start_day should use the same values
- as mktime(), i.e. 0 (Sun) to 6 (Sat). */
-time_t
-time_week_begin (time_t t, int week_start_day)
-{
- struct tm tm;
- int offset;
-
- tm = *localtime (&t);
-
- /* Calculate the current offset from the week start day. */
- offset = (tm.tm_wday + 7 - week_start_day) % 7;
-
- tm.tm_hour = 0;
- tm.tm_min = 0;
- tm.tm_sec = 0;
- tm.tm_mday -= offset;
- 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);
-}
-
-
-/**************************************************************************
- * time_t manipulation functions, using timezones in libical.
- *
- * NOTE: these are only here to make the transition to the timezone
- * functions easier. New code should use icaltimetype values rather than
- * time_t values wherever possible.
- **************************************************************************/
-
-
-/* Adds or subtracts a number of days to/from the given time_t value, using
- the given timezone.
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_add_day_with_zone (time_t time, int days, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Add/subtract the number of days. */
- icaltime_adjust (&tt, days, 0, 0, 0);
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-
-/* Adds or subtracts a number of weeks to/from the given time_t value, using
- the given timezone.
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_add_week_with_zone (time_t time, int weeks, icaltimezone *zone)
-{
- return time_add_day_with_zone (time, weeks * 7, zone);
-}
-
-
-/* Adds or subtracts a number of months to/from the given time_t value, using
- the given timezone.
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_add_month_with_zone (time_t time, int months, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Add on the number of months. */
- tt.month += months;
-
- /* Normalize it, fixing any overflow. */
- tt = icaltime_normalize (tt);
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-
-/* Returns the start of the year containing the given time_t, using the given
- timezone.
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_year_begin_with_zone (time_t time, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Set it to the start of the year. */
- tt.month = 1;
- tt.day = 1;
- tt.hour = 0;
- tt.minute = 0;
- tt.second = 0;
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-
-/* Returns the start of the month containing the given time_t, using the given
- timezone.
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_month_begin_with_zone (time_t time, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Set it to the start of the month. */
- tt.day = 1;
- tt.hour = 0;
- tt.minute = 0;
- tt.second = 0;
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-
-/* Returns the start of the week containing the given time_t, using the given
- timezone. week_start_day should use the same values as mktime(),
- i.e. 0 (Sun) to 6 (Sat).
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_week_begin_with_zone (time_t time, int week_start_day, icaltimezone *zone)
-{
- struct icaltimetype tt;
- int weekday, offset;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Get the weekday. */
- weekday = time_day_of_week (tt.day, tt.month - 1, tt.year);
-
- /* Calculate the current offset from the week start day. */
- offset = (weekday + 7 - week_start_day) % 7;
-
- /* Set it to the start of the month. */
- tt.day -= offset;
- tt.hour = 0;
- tt.minute = 0;
- tt.second = 0;
-
- /* Normalize it, to fix any overflow. */
- tt = icaltime_normalize (tt);
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-
-/* Returns the start of the day containing the given time_t, using the given
- timezone.
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_day_begin_with_zone (time_t time, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Set it to the start of the day. */
- tt.hour = 0;
- tt.minute = 0;
- tt.second = 0;
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-
-/* Returns the end of the day containing the given time_t, using the given
- timezone. (The end of the day is the start of the next day.)
- NOTE: this function is only here to make the transition to the timezone
- functions easier. New code should use icaltimetype values and
- icaltime_adjust() to add or subtract days, hours, minutes & seconds. */
-time_t
-time_day_end_with_zone (time_t time, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- /* Convert to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Set it to the start of the next day. */
- tt.day++;
- tt.hour = 0;
- tt.minute = 0;
- tt.second = 0;
-
- /* Normalize it, to fix any overflow. */
- tt = icaltime_normalize (tt);
-
- /* Convert back to a time_t. */
- return icaltime_as_timet_with_zone (tt, zone);
-}
-
-/**
- * time_to_gdate_with_zone:
- * @date: Destination #GDate value.
- * @time: A time value.
- * @zone: Desired timezone for destination @date, or NULL if the UTC timezone
- * is desired.
- *
- * Converts a time_t value to a #GDate structure using the specified timezone.
- * This is analogous to g_date_set_time() but takes the timezone into account.
- **/
-void
-time_to_gdate_with_zone (GDate *date, time_t time, icaltimezone *zone)
-{
- struct icaltimetype tt;
-
- g_return_if_fail (date != NULL);
- g_return_if_fail (time != -1);
-
- tt = icaltime_from_timet_with_zone (time, FALSE,
- zone ? zone : icaltimezone_get_utc_timezone ());
-
- g_date_set_dmy (date, tt.day, tt.month, tt.year);
-}
-
-
-/**************************************************************************
- * General time functions.
- **************************************************************************/
-
-
-/* Returns the number of days in the month. Year is the normal year, e.g. 2001.
- Month is 0 (Jan) to 11 (Dec). */
-int
-time_days_in_month (int year, int month)
-{
- int days;
-
- g_return_val_if_fail (year >= 1900, 0);
- g_return_val_if_fail ((month >= 0) && (month < 12), 0);
-
- days = days_in_month[month];
- if (month == 1 && time_is_leap_year (year))
- days++;
-
- return days;
-}
-
-
-/* Returns the 1-based day number within the year of the specified date.
- Year is the normal year, e.g. 2001. Month is 0 to 11. */
-int
-time_day_of_year (int day, int month, int year)
-{
- int i;
-
- for (i = 0; i < month; i++) {
- day += days_in_month[i];
-
- if (month == 1 && time_is_leap_year (year))
- day++;
- }
-
- return day;
-}
-
-
-/* Returns the day of the week for the specified date, 0 (Sun) to 6 (Sat).
- For the days that were removed on the Gregorian reformation, it returns
- Thursday. Year is the normal year, e.g. 2001. Month is 0 to 11. */
-int
-time_day_of_week (int day, int month, int year)
-{
- int n;
-
- n = (year - 1) * 365 + time_leap_years_up_to (year - 1)
- + time_day_of_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;
-}
-
-
-/* Returns whether the specified year is a leap year. Year is the normal year,
- e.g. 2001. */
-gboolean
-time_is_leap_year (int year)
-{
- if (year <= 1752)
- return !(year % 4);
- else
- return (!(year % 4) && (year % 100)) || !(year % 400);
-}
-
-
-/* Returns the number of leap years since year 1 up to (but not including) the
- specified year. Year is the normal year, e.g. 2001. */
-int
-time_leap_years_up_to (int year)
-{
- /* There is normally a leap year every 4 years, except at the turn of
- centuries since 1700. But there is a leap year on centuries since 1700
- which are divisible by 400. */
- return (year / 4
- - ((year > 1700) ? (year / 100 - 17) : 0)
- + ((year > 1600) ? ((year - 1600) / 400) : 0));
-}
-
-
-/**
- * isodate_from_time_t:
- * @t: A time value.
- *
- * Creates an ISO 8601 UTC representation from a time value.
- *
- * Return value: String with the ISO 8601 representation of the UTC time.
- **/
-char *
-isodate_from_time_t (time_t t)
-{
- struct tm *tm;
- char isotime[40];
-
- tm = gmtime (&t);
- strftime (isotime, sizeof (isotime)-1, "%Y%m%dT%H%M%SZ", tm);
- return g_strdup (isotime);
-}
-
-/**
- * time_from_isodate:
- * @str: Date/time value in ISO 8601 format.
- *
- * Converts an ISO 8601 UTC time string into a time_t value.
- *
- * Return value: Time_t corresponding to the specified ISO string.
- * Note that we only allow UTC times at present.
- **/
-time_t
-time_from_isodate (const char *str)
-{
- struct icaltimetype tt = icaltime_null_time ();
- icaltimezone *utc_zone;
- int len, 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;
-
-#define digit_at(x,y) (x[y] - '0')
-
- tt.year = digit_at (str, 0) * 1000
- + digit_at (str, 1) * 100
- + digit_at (str, 2) * 10
- + digit_at (str, 3);
-
- tt.month = digit_at (str, 4) * 10
- + digit_at (str, 5);
-
- tt.day = digit_at (str, 6) * 10
- + digit_at (str, 7);
-
- if (len > 8) {
- tt.hour = digit_at (str, 9) * 10
- + digit_at (str, 10);
- tt.minute = digit_at (str, 11) * 10
- + digit_at (str, 12);
- tt.second = digit_at (str, 13) * 10
- + digit_at (str, 14);
- }
-
- utc_zone = icaltimezone_get_utc_timezone ();
-
- return icaltime_as_timet_with_zone (tt, utc_zone);
-}
-
diff --git a/calendar/cal-util/timeutil.h b/calendar/cal-util/timeutil.h
deleted file mode 100644
index 0e2795b287..0000000000
--- a/calendar/cal-util/timeutil.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Miscellaneous time-related utilities
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Damon Chaplin <damon@ximian.com>
- */
-
-#ifndef TIMEUTIL_H
-#define TIMEUTIL_H
-
-
-#include <time.h>
-#include <ical.h>
-#include <glib.h>
-
-
-/**************************************************************************
- * General time functions.
- **************************************************************************/
-
-/* Returns the number of days in the month. Year is the normal year, e.g. 2001.
- Month is 0 (Jan) to 11 (Dec). */
-int time_days_in_month (int year, int month);
-
-/* Returns the 1-based day number within the year of the specified date.
- Year is the normal year, e.g. 2001. Month is 0 to 11. */
-int time_day_of_year (int day, int month, int year);
-
-/* Returns the day of the week for the specified date, 0 (Sun) to 6 (Sat).
- For the days that were removed on the Gregorian reformation, it returns
- Thursday. Year is the normal year, e.g. 2001. Month is 0 to 11. */
-int time_day_of_week (int day, int month, int year);
-
-/* Returns whether the specified year is a leap year. Year is the normal year,
- e.g. 2001. */
-gboolean time_is_leap_year (int year);
-
-/* Returns the number of leap years since year 1 up to (but not including) the
- specified year. Year is the normal year, e.g. 2001. */
-int time_leap_years_up_to (int year);
-
-/* Convert to or from an ISO 8601 representation of a time, in UTC,
- e.g. "20010708T183000Z". */
-char *isodate_from_time_t (time_t t);
-time_t time_from_isodate (const char *str);
-
-
-/**************************************************************************
- * time_t manipulation functions.
- *
- * NOTE: these use the Unix timezone functions like mktime() and localtime()
- * and so should not be used in Evolution. New Evolution code should use
- * icaltimetype values rather than time_t values wherever possible.
- **************************************************************************/
-
-/* Add or subtract a number of days, weeks or months. */
-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);
-
-/* Returns the beginning of the year or month. */
-time_t time_year_begin (time_t t);
-time_t time_month_begin (time_t t);
-
-/* Returns the beginning of the week. week_start_day should use the same values
- as mktime(), i.e. 0 (Sun) to 6 (Sat). */
-time_t time_week_begin (time_t t, int week_start_day);
-
-/* Returns the beginning or end of the day. */
-time_t time_day_begin (time_t t);
-time_t time_day_end (time_t t);
-
-
-/**************************************************************************
- * time_t manipulation functions, using timezones in libical.
- *
- * NOTE: these are only here to make the transition to the timezone
- * functions easier. New code should use icaltimetype values rather than
- * time_t values wherever possible.
- **************************************************************************/
-
-/* Adds or subtracts a number of days to/from the given time_t value, using
- the given timezone. */
-time_t time_add_day_with_zone (time_t time, int days, icaltimezone *zone);
-
-/* Adds or subtracts a number of weeks to/from the given time_t value, using
- the given timezone. */
-time_t time_add_week_with_zone (time_t time, int weeks, icaltimezone *zone);
-
-/* Adds or subtracts a number of months to/from the given time_t value, using
- the given timezone. */
-time_t time_add_month_with_zone (time_t time, int months, icaltimezone *zone);
-
-/* Returns the start of the year containing the given time_t, using the given
- timezone. */
-time_t time_year_begin_with_zone (time_t time, icaltimezone *zone);
-
-/* Returns the start of the month containing the given time_t, using the given
- timezone. */
-time_t time_month_begin_with_zone (time_t time, icaltimezone *zone);
-
-/* Returns the start of the week containing the given time_t, using the given
- timezone. week_start_day should use the same values as mktime(),
- i.e. 0 (Sun) to 6 (Sat). */
-time_t time_week_begin_with_zone (time_t time, int week_start_day,
- icaltimezone *zone);
-
-/* Returns the start of the day containing the given time_t, using the given
- timezone. */
-time_t time_day_begin_with_zone (time_t time, icaltimezone *zone);
-
-/* Returns the end of the day containing the given time_t, using the given
- timezone. (The end of the day is the start of the next day.) */
-time_t time_day_end_with_zone (time_t time, icaltimezone *zone);
-
-void time_to_gdate_with_zone (GDate *date, time_t time, icaltimezone *zone);
-
-#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 2b9b8053a8..0000000000
--- a/calendar/conduits/calendar/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/e-util \
- -I$(top_builddir)/e-util \
- $(BONOBO_GNOME_CFLAGS) \
- $(BONOBO_CONF_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)/libwombat/libwombat-static.la \
- $(top_builddir)/e-util/libeconduit-static.la \
- $(BONOBO_GNOME_LIBS) \
- $(BONOBO_CONF_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 e624552cda..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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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_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 676d65462c..0000000000
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ /dev/null
@@ -1,1310 +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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 <liboaf/liboaf.h>
-#include <bonobo.h>
-#include <bonobo-conf/bonobo-config-database.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.6"
-#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 icaltimezone *
-get_timezone (CalClient *client, const char *tzid)
-{
- icaltimezone *timezone = NULL;
-
- timezone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (timezone == NULL)
- cal_client_get_timezone (client, tzid, &timezone);
-
- return timezone;
-}
-
-static icaltimezone *
-get_default_timezone (void)
-{
- Bonobo_ConfigDatabase db;
- icaltimezone *timezone = NULL;
- char *location;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- location = bonobo_config_get_string (db, "/Calendar/Display/Timezone", NULL);
- if (location == NULL)
- goto cleanup;
-
- timezone = icaltimezone_get_builtin_timezone (location);
- g_free (location);
-
- cleanup:
- bonobo_object_release_unref (db, NULL);
-
- return timezone;
-}
-
-
-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) || (pos == -1));
-
- return ((abs (pos) * 8) + weekday) * (pos < 0 ? -1 : 1);
-}
-
-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 = local->local.category;
- 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, *edl = NULL, *l;
- CalComponentText *description;
- CalComponentDateTime dt;
- CalComponentClassification classif;
- time_t dt_time;
- 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);
-
- /* Handle the fields and category we don't sync by making sure
- * we don't overwrite them
- */
- if (local->local.ID != 0) {
- char record[0xffff];
- int cat = 0;
-
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
- ctxt->dbi->db_handle,
- local->local.ID, &record,
- NULL, NULL, NULL, &cat) > 0) {
- local->local.category = cat;
- unpack_Appointment (local->appt, record, 0xffff);
- }
- }
-
- /* 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_with_zone (*dt.value, get_timezone (ctxt->client, dt.tzid));
-
- local->appt->begin = *localtime (&dt_time);
- }
- cal_component_free_datetime (&dt);
-
- cal_component_get_dtend (comp, &dt);
- if (dt.value && time_add_day (dt_time, 1) != icaltime_as_timet_with_zone (*dt.value, get_timezone (ctxt->client, dt.tzid))) {
- dt_time = icaltime_as_timet_with_zone (*dt.value, get_timezone (ctxt->client, dt.tzid));
-
- local->appt->end = *localtime (&dt_time);
- local->appt->event = 0;
- } else {
- local->appt->event = 1;
- }
- cal_component_free_datetime (&dt);
-
- /* 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_with_zone (recur->until, get_timezone (ctxt->client, dt.tzid));
- local->appt->repeatEnd = *localtime (&dt_time);
- }
-
- cal_component_free_recur_list (list);
- }
-
- /* Exceptions */
- cal_component_get_exdate_list (comp, &edl);
- local->appt->exceptions = g_slist_length (edl);
- local->appt->exception = g_new0 (struct tm, local->appt->exceptions);
- for (l = edl, i = 0; l != NULL; l = l->next, i++) {
- CalComponentDateTime *dt = l->data;
-
- if (dt->value->is_date) {
- local->appt->exception[i].tm_mday = dt->value->day;
- local->appt->exception[i].tm_mon = dt->value->month - 1;
- local->appt->exception[i].tm_year = dt->value->year - 1900;
- } else {
- dt_time = icaltime_as_timet_with_zone (*dt->value, get_timezone (ctxt->client, dt->tzid));
- local->appt->exception[i] = *localtime (&dt_time);
- }
- }
- cal_component_free_exdate_list (edl);
-
- 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,
- icaltimezone *timezone)
-{
- CalComponent *comp;
- struct Appointment appt;
- struct icaltimetype now = icaltime_from_timet_with_zone (time (NULL), FALSE, timezone), it;
- struct icalrecurrencetype recur;
- CalComponentText summary = {NULL, NULL};
- CalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)};
- GSList *edl = NULL;
- char *txt;
- int pos, i;
-
- 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_description_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_with_zone (mktime (&appt.begin), FALSE, timezone);
- 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_with_zone (t, FALSE, timezone);
- dt.value = &it;
- cal_component_set_dtend (comp, &dt);
- } else if (!is_empty_time (appt.end)) {
- it = icaltime_from_timet_with_zone (mktime (&appt.end), FALSE, timezone);
- 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;
- if (appt.repeatDay < domLastSun)
- recur.by_day[0] = nth_weekday ((appt.repeatDay / 7) + 1,
- get_ical_day (appt.repeatDay % 7));
- else
- recur.by_day[0] = nth_weekday (-1, get_ical_day (appt.repeatDay % 7));
- 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_with_zone (t, FALSE, timezone);
- }
-
- 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);
- }
-
- /* Exceptions */
- for (i = 0; i < appt.exceptions; i++) {
- struct tm ex;
- CalComponentDateTime *dt = g_new0 (CalComponentDateTime, 1);
-
- dt->value = g_new0 (struct icaltimetype, 1);
- dt->tzid = NULL;
-
- ex = appt.exception[i];
- *dt->value = icaltime_from_timet_with_zone (mktime (&ex), TRUE, timezone);
-
- edl = g_slist_prepend (edl, dt);
-
- INFO ("%d %d %d %d %d %d %d %d %d",
- ex.tm_sec, ex.tm_min,
- ex.tm_hour, ex.tm_mday,
- ex.tm_mon, ex.tm_year,
- ex.tm_wday, ex.tm_yday,
- ex.tm_isdst);
- }
- cal_component_set_exdate_list (comp, edl);
- cal_component_free_exdate_list (edl);
-
- 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, TRUE);
- } 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);
-
- ctxt->dbi = dbi;
- 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;
- }
-
- /* Get the timezone */
- ctxt->timezone = get_default_timezone ();
- if (ctxt->timezone == NULL)
- return -1;
- LOG (" Using timezone: %s", icaltimezone_get_tzid (ctxt->timezone));
-
- /* 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_EVENT);
- 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);
-
- 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);
-
- 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);
-
- LOG ("---------------------------------------------------------\n");
-
- 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, -1);
-
- 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, ctxt->timezone);
- 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, ctxt->timezone);
- 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);
-
- 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 244a022c00..0000000000
--- a/calendar/conduits/calendar/calendar-conduit.h
+++ /dev/null
@@ -1,82 +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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 __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 <libical/src/libical/icaltime.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;
- GnomePilotDBInfo *dbi;
-
- struct AppointmentAppInfo ai;
-
- CalClient *client;
- char *calendar_file;
- gboolean calendar_open_success;
-
- icaltimezone *timezone;
- 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 86cfbeecba..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 a9f4e73eee..0000000000
--- a/calendar/conduits/todo/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/e-util \
- -I$(top_builddir)/e-util \
- $(BONOBO_GNOME_CFLAGS) \
- $(BONOBO_CONF_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)/libwombat/libwombat-static.la \
- $(top_builddir)/e-util/libeconduit-static.la \
- $(BONOBO_GNOME_LIBS) \
- $(BONOBO_CONF_LIBS) \
- $(PISOCK_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 ca9f7c9cca..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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 __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 c073b22eb0..0000000000
--- a/calendar/conduits/todo/todo-conduit.c
+++ /dev/null
@@ -1,1078 +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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 <liboaf/liboaf.h>
-#include <bonobo.h>
-#include <bonobo-conf/bonobo-config-database.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 icaltimezone *
-get_timezone (CalClient *client, const char *tzid)
-{
- icaltimezone *timezone = NULL;
-
- timezone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (timezone == NULL)
- cal_client_get_timezone (client, tzid, &timezone);
-
- return timezone;
-}
-
-static icaltimezone *
-get_default_timezone (void)
-{
- Bonobo_ConfigDatabase db;
- icaltimezone *timezone = NULL;
- char *location;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- location = bonobo_config_get_string (db, "/Calendar/Display/Timezone", NULL);
- if (location == NULL)
- goto cleanup;
-
- timezone = icaltimezone_get_builtin_timezone (location);
- g_free (location);
-
- cleanup:
- bonobo_object_release_unref (db, NULL);
-
- return timezone;
-}
-
-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 = local->local.category;
- 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);
-
- /* Handle the fields and category we don't sync by making sure
- * we don't overwrite them
- */
- if (local->local.ID != 0) {
- char record[0xffff];
- int cat = 0;
-
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
- ctxt->dbi->db_handle,
- local->local.ID, &record,
- NULL, NULL, NULL, &cat) > 0) {
- local->local.category = cat;
- unpack_ToDo (local->todo, record, 0xffff);
- }
- }
-
- /* 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_with_zone (*due.value, get_timezone (ctxt->client, due.tzid));
-
- local->todo->due = *localtime (&due_time);
- local->todo->indefinite = 0;
- } else {
- local->todo->indefinite = 1;
- }
- cal_component_free_datetime (&due);
-
- 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,
- icaltimezone *timezone)
-{
- CalComponent *comp;
- struct ToDo todo;
- struct icaltimetype now = icaltime_from_timet_with_zone (time (NULL), FALSE, timezone);
- CalComponentText summary = {NULL, NULL};
- CalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)};
- 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_with_zone (mktime (&todo.due), FALSE, timezone);
- 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, TRUE);
- } 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->dbi = dbi;
- 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;
- }
-
- /* Get the timezone */
- ctxt->timezone = get_default_timezone ();
- if (ctxt->timezone == NULL)
- return -1;
- LOG (" Using timezone: %s", icaltimezone_get_tzid (ctxt->timezone));
-
- /* 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);
-
- 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);
-
- 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);
-
- LOG ("---------------------------------------------------------\n");
-
- 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, ctxt->timezone);
- 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, ctxt->timezone);
- 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);
-
- 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 8e365ce78f..0000000000
--- a/calendar/conduits/todo/todo-conduit.h
+++ /dev/null
@@ -1,81 +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 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * 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 __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 <libical/src/libical/icaltime.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;
- GnomePilotDBInfo *dbi;
-
- struct ToDoAppInfo ai;
-
- CalClient *client;
- char *calendar_file;
- gboolean calendar_open_success;
-
- icaltimezone *timezone;
- 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 cd98cc234e..0000000000
--- a/calendar/gui/.cvsignore
+++ /dev/null
@@ -1,24 +0,0 @@
-Makefile.in
-Makefile
-.deps
-_libs
-.libs
-.pure
-evolution-calendar
-evolution-calendar.pure
-evolution-calendar.h
-evolution-calendar-common.c
-evolution-calendar-skels.c
-evolution-calendar-stubs.c
-*.lo
-Evolution-Addressbook-SelectNames-common.c
-Evolution-Addressbook-SelectNames-skels.c
-Evolution-Addressbook-SelectNames-stubs.c
-Evolution-Addressbook-SelectNames.h
-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 bd61419d04..0000000000
--- a/calendar/gui/Evolution-Composer.h
+++ /dev/null
@@ -1,352 +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>
-#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 640a28d6a1..0000000000
--- a/calendar/gui/GNOME_Evolution_Calendar.oaf.in
+++ /dev/null
@@ -1,132 +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_ShellComponent"
- type="exe"
- location="evolution-calendar">
-
- <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:ObjectFactory: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_server iid="OAFIID:GNOME_Evolution_Calendar_CompEditorFactory_Factory"
- 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 to create a component editor factory"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_CompEditorFactory"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_CompEditorFactory_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Calendar/CompEditorFactory:1.0"/>
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory to centralize calendar component editor dialogs"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
deleted file mode 100644
index 45403cd69c..0000000000
--- a/calendar/gui/Makefile.am
+++ /dev/null
@@ -1,207 +0,0 @@
-## CORBA stuff
-
-IDLS = \
- $(top_srcdir)/composer/Evolution-Composer.idl \
- $(top_srcdir)/calendar/idl/evolution-calendar.idl
-
-IDL_GENERATED = \
- Evolution-Composer.h \
- Evolution-Composer-common.c \
- Evolution-Composer-skels.c \
- Evolution-Composer-stubs.c \
- evolution-calendar.h \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-
-$(IDL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(srcdir)/../../composer/Evolution-Composer.idl
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(top_srcdir)/calendar/idl/evolution-calendar.idl
-
-BUILT_SOURCES = $(IDL_GENERATED)
-
-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)/calendar/cal-client \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/addressbook/backend/ebook \
- -I$(top_builddir)/addressbook/backend/ebook \
- -I$(top_srcdir)/widgets \
- -I$(includedir) \
- $(BONOBO_HTML_GNOME_CFLAGS) \
- $(GNOME_VFS_CFLAGS) \
- $(GAL_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\"
-
-iconsdir = $(datadir)/images/evolution
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = \
- e-itip-control.glade \
- goto-dialog.glade
-
-etspecdir = $(datadir)/evolution/etspec/
-etspec_DATA = e-calendar-table.etspec e-meeting-time-sel.etspec
-
-evolution_calendar_SOURCES = \
- $(IDL_GENERATED) \
- cal-search-bar.c \
- cal-search-bar.h \
- calendar-config.c \
- calendar-config.h \
- calendar-commands.c \
- calendar-commands.h \
- calendar-model.c \
- calendar-model.h \
- calendar-offline-handler.c \
- calendar-offline-handler.h \
- calendar-view.c \
- calendar-view.h \
- calendar-view-factory.c \
- calendar-view-factory.h \
- comp-editor-factory.c \
- comp-editor-factory.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-layout.c \
- e-day-view-layout.h \
- e-day-view-main-item.c \
- e-day-view-main-item.h \
- e-day-view-time-item.c \
- e-day-view-time-item.h \
- e-day-view-top-item.c \
- e-day-view-top-item.h \
- e-day-view.c \
- e-day-view.h \
- e-itip-control.h \
- e-itip-control.c \
- e-meeting-attendee.c \
- e-meeting-attendee.h \
- e-meeting-model.c \
- e-meeting-model.h \
- e-meeting-time-sel.c \
- e-meeting-time-sel.h \
- e-meeting-time-sel-item.c \
- e-meeting-time-sel-item.h \
- e-meeting-types.h \
- e-week-view-event-item.c \
- e-week-view-event-item.h \
- e-week-view-layout.c \
- e-week-view-layout.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 \
- e-timezone-entry.c \
- e-timezone-entry.h \
- gnome-cal.c \
- gnome-cal.h \
- goto.c \
- goto.h \
- itip-control-factory.c \
- itip-control-factory.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
-
-evolution_calendar_LDADD = \
- alarm-notify/libalarm.a \
- $(DB3_LDADD) \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/calendar/cal-client/libcal-client.la \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(top_builddir)/libwombat/libwombat.la \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- dialogs/libcal-dialogs.a \
- $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.a \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_HTML_GNOME_LIBS) \
- $(GNOME_VFS_LIBS) \
- $(BONOBO_CONF_LIBS) \
- $(GAL_LIBS) \
- $(INTLLIBS)
-
-evolution_calendar_LDFLAGS = -export-dynamic
-
-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) \
- $(etspec_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
-
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
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 eef2e6abcc..0000000000
--- a/calendar/gui/alarm-notify/Makefile.am
+++ /dev/null
@@ -1,85 +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_builddir)/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
-
-glade_DATA = \
- alarm-notify.glade
-
-evolution_alarm_notify_SOURCES = \
- $(CORBA_GENERATED) \
- alarm-notify.c \
- alarm-notify.h \
- alarm-notify-dialog.c \
- alarm-notify-dialog.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 \
- $(top_builddir)/libwombat/libwombat.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) \
- $(glade_DATA)
-
-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 665419241f..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Ximian, 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 <libgnomeui/gnome-winhints.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.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 *message;
- 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);
-}
-
-/* Creates a heading for the alarm notification dialog */
-static char *
-make_heading (CalComponentVType vtype, time_t occur_start, time_t occur_end)
-{
- char *buf;
- char s[128], e[128];
-
- if (occur_start != -1) {
- struct tm tm;
-
- tm = *localtime (&occur_start);
- strftime (s, sizeof (s), "%A %b %d %Y %H:%M", &tm);
- }
-
- if (occur_end != -1) {
- struct tm tm;
-
- tm = *localtime (&occur_end);
- strftime (e, sizeof (e), "%A %b %d %Y %H:%M", &tm);
- }
-
- /* I love combinatorial explosion */
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- if (occur_start != -1) {
- if (occur_end != -1)
- buf = g_strdup_printf (_("Notification about your appointment "
- "starting on %s and ending on %s"),
- s, e);
- else
- buf = g_strdup_printf (_("Notification about your appointment "
- "starting on %s"),
- s);
- } else {
- if (occur_end != -1)
- buf = g_strdup_printf (_("Notification about your appointment "
- "ending on %s"),
- e);
- else
- buf = g_strdup_printf (_("Notification about your appointment"));
- }
- break;
-
- case CAL_COMPONENT_TODO:
- if (occur_start != -1) {
- if (occur_end != -1)
- buf = g_strdup_printf (_("Notification about your task "
- "starting on %s and ending on %s"),
- s, e);
- else
- buf = g_strdup_printf (_("Notification about your task "
- "starting on %s"),
- s);
- } else {
- if (occur_end != -1)
- buf = g_strdup_printf (_("Notification about your task "
- "ending on %s"),
- e);
- else
- buf = g_strdup_printf (_("Notification about your task"));
- }
- break;
-
- default:
- /* Only VEVENTs and VTODOs can have alarms */
- g_assert_not_reached ();
- buf = NULL;
- break;
- }
-
- return buf;
-}
-
-/**
- * alarm_notify_dialog:
- * @trigger: Trigger time for the alarm.
- * @occur_start: Start of occurrence time for the event.
- * @occur_end: End of occurrence time for the event.
- * @vtype: Type of the component which corresponds to the alarm.
- * @message; Message to display in the dialog; usually comes from the component.
- * @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_start, time_t occur_end,
- CalComponentVType vtype, const char *message,
- AlarmNotifyFunc func, gpointer func_data)
-{
- AlarmNotify *an;
- char buf[256];
- char *heading;
- char *msg;
- struct tm tm_trigger;
-
- g_return_val_if_fail (trigger != -1, FALSE);
-
- /* Only VEVENTs or VTODOs can have alarms */
- g_return_val_if_fail (vtype == CAL_COMPONENT_EVENT || vtype == CAL_COMPONENT_TODO, FALSE);
- g_return_val_if_fail (message != NULL, FALSE);
- g_return_val_if_fail (func != NULL, FALSE);
-
- an = g_new0 (AlarmNotify, 1);
-
- an->func = func;
- an->func_data = func_data;
-
- an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL);
- if (!an->xml) {
- g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
- g_free (an);
- return FALSE;
- }
-
- an->dialog = glade_xml_get_widget (an->xml, "alarm-notify");
- an->close = glade_xml_get_widget (an->xml, "close");
- an->snooze = glade_xml_get_widget (an->xml, "snooze");
- an->edit = glade_xml_get_widget (an->xml, "edit");
- an->heading = glade_xml_get_widget (an->xml, "heading");
- an->message = glade_xml_get_widget (an->xml, "message");
- an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time");
-
- if (!(an->dialog && an->close && an->snooze && an->edit && an->heading && an->message
- && 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 */
-
- 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 */
-
- heading = make_heading (vtype, occur_start, occur_end);
- gtk_label_set_text (GTK_LABEL (an->heading), heading);
- g_free (heading);
-
- /* Message */
-
- msg = e_utf8_to_gtk_string (an->message, message);
- if (msg) {
- gtk_label_set_text (GTK_LABEL (an->message), msg);
- g_free (msg);
- } else
- g_message ("Could not convert the alarm message from UTF8");
-
- /* 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! */
-
- if (!GTK_WIDGET_REALIZED (an->dialog))
- gtk_widget_realize (an->dialog);
-
- gnome_win_hints_set_state (an->dialog, WIN_STATE_STICKY);
-
- 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 2eebbf1796..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * 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 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_start, time_t occur_end,
- CalComponentVType vtype, const char *message,
- 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 88d25dafbc..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/* Evolution calendar - Alarm notification service 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 <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 void AlarmNotify_addCalendar (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- CORBA_Environment *ev);
-static void AlarmNotify_removeCalendar (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- CORBA_Environment *ev);
-static void AlarmNotify_die (PortableServer_Servant servant,
- CORBA_Environment *ev);
-
-
-static BonoboXObjectClass *parent_class;
-
-
-
-BONOBO_X_TYPE_FUNC_FULL (AlarmNotify,
- GNOME_Evolution_Calendar_AlarmNotify,
- BONOBO_X_OBJECT_TYPE,
- alarm_notify);
-
-/* 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_X_OBJECT_TYPE);
-
- class->epv.addCalendar = AlarmNotify_addCalendar;
- class->epv.removeCalendar = AlarmNotify_removeCalendar;
- class->epv.die = AlarmNotify_die;
-
- object_class->destroy = alarm_notify_destroy;
-}
-
-/* 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_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;
-
- an = gtk_type_new (TYPE_ALARM_NOTIFY);
- return an;
-}
diff --git a/calendar/gui/alarm-notify/alarm-notify.glade b/calendar/gui/alarm-notify/alarm-notify.glade
deleted file mode 100644
index 19af18f010..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.glade
+++ /dev/null
@@ -1,206 +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>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>alarm-notify</name>
- <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>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>heading</name>
- <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>message</name>
- <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>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>close</name>
- <can_focus>True</can_focus>
- <label>C_lose</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>snooze</name>
- <can_focus>True</can_focus>
- <label>Snoo_ze</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit</name>
- <can_focus>True</can_focus>
- <label>_Edit appointment</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <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>
- <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 4122b269fa..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Evolution calendar - Alarm notification service object
- *
- * Copyright (C) 2000 Ximian, 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-xobject.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 {
- BonoboXObject xobject;
-
- /* Private data */
- AlarmNotifyPrivate *priv;
-};
-
-struct _AlarmNotifyClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_AlarmNotify__epv epv;
-};
-
-GtkType alarm_notify_get_type (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 c73f1a760b..0000000000
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ /dev/null
@@ -1,945 +0,0 @@
-/* Evolution calendar - Alarm queueing engine
- *
- * Copyright (C) 2000 Ximian, 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtksignal.h>
-#include <liboaf/liboaf.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnome/gnome-sound.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <bonobo/bonobo-object.h>
-#include <cal-util/timeutil.h>
-#include "alarm.h"
-#include "alarm-notify-dialog.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 CompQueuedAlarms->alarms->alarms list */
- CalAlarmInstance *instance;
-
- /* Whether this is a snoozed queued alarm or a normal one */
- guint snooze : 1;
-} QueuedAlarm;
-
-/* Alarm ID for the midnight refresh function */
-static gpointer midnight_refresh_id = NULL;
-
-static void display_notification (time_t trigger, CompQueuedAlarms *cqa,
- gpointer alarm_id, gboolean use_description);
-static void audio_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
-static void mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
-static void procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
-
-
-
-/* Alarm queue engine */
-
-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);
-}
-
-/* Looks up a queued alarm based on its alarm ID */
-static QueuedAlarm *
-lookup_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id)
-{
- GSList *l;
- QueuedAlarm *qa;
-
- qa = NULL;
-
- for (l = cqa->queued_alarms; l; l = l->next) {
- qa = l->data;
- if (qa->alarm_id == alarm_id)
- break;
- }
-
- g_assert (l != NULL);
- return qa;
-}
-
-/* Removes an alarm from the list of alarms of a component. If the alarm was
- * the last one listed for the component, it removes the component itself.
- */
-static void
-remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id)
-{
- QueuedAlarm *qa;
- const char *uid;
- GSList *l;
-
- qa = NULL;
-
- for (l = cqa->queued_alarms; l; l = l->next) {
- qa = l->data;
- if (qa->alarm_id == alarm_id)
- break;
- }
-
- g_assert (l != NULL);
-
- 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);
-}
-
-/* Callback used when an alarm triggers */
-static void
-alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- CompQueuedAlarms *cqa;
- CalComponent *comp;
- QueuedAlarm *qa;
- CalComponentAlarm *alarm;
- CalAlarmAction action;
-
- cqa = data;
- comp = cqa->alarms->comp;
-
- qa = lookup_queued_alarm (cqa, alarm_id);
-
- /* Decide what to do based on the alarm action. We use the trigger that
- * is passed to us instead of the one from the instance structure
- * because this may be a snoozed alarm instead of an original
- * occurrence.
- */
-
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_action (alarm, &action);
- cal_component_alarm_free (alarm);
-
- switch (action) {
- case CAL_ALARM_AUDIO:
- audio_notification (trigger, cqa, alarm_id);
- break;
-
- case CAL_ALARM_DISPLAY:
- display_notification (trigger, cqa, alarm_id, TRUE);
- break;
-
- case CAL_ALARM_EMAIL:
- mail_notification (trigger, cqa, alarm_id);
- break;
-
- case CAL_ALARM_PROCEDURE:
- procedure_notification (trigger, cqa, alarm_id);
- break;
-
- default:
- g_assert_not_reached ();
- break;
- }
-}
-
-/* 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, NULL);
- 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;
- qa->snooze = FALSE;
-
- 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 in remove_queued_alarm(). The qa will be freed there as
- * well.
- */
- l = l->next;
-
- alarm_remove (qa->alarm_id);
- remove_queued_alarm (cqa, 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);
-}
-
-
-
-/* Notification functions */
-
-/* Creates a snooze alarm based on an existing one. The snooze offset is
- * compued with respect to the current time.
- */
-static void
-create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, int snooze_mins)
-{
- QueuedAlarm *orig_qa, *qa;
- CalAlarmInstance *instance;
- time_t t;
- gpointer new_id;
-
- orig_qa = lookup_queued_alarm (cqa, alarm_id);
-
- t = time (NULL);
- t += snooze_mins * 60;
-
- new_id = alarm_add (t, alarm_trigger_cb, cqa, NULL);
- if (!new_id) {
- g_message ("create_snooze(): Could not schedule a trigger for "
- "%ld, discarding...", (long) t);
- return;
- }
-
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = orig_qa->instance->auid;
- instance->trigger = t;
- instance->occur_start = orig_qa->instance->occur_start;
- instance->occur_end = orig_qa->instance->occur_end;
-
- cqa->alarms->alarms = g_slist_prepend (cqa->alarms->alarms, instance);
-
- qa = g_new (QueuedAlarm, 1);
- qa->alarm_id = new_id;
- qa->instance = instance;
- qa->snooze = TRUE;
-
- cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
-}
-
-/* Launches a component editor for a component */
-static void
-edit_component (CompQueuedAlarms *cqa)
-{
- CalComponent *comp;
- const char *uid;
- const char *uri;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CompEditorFactory factory;
-
- comp = cqa->alarms->comp;
- cal_component_get_uid (comp, &uid);
-
- uri = cal_client_get_uri (cqa->parent_client->client);
-
- /* Get the factory */
-
- CORBA_exception_init (&ev);
- factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory",
- 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("edit_component(): Could not activate the component editor factory");
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
-
- /* Edit the component */
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (char *) uid, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("edit_component(): Exception while editing the component");
-
- CORBA_exception_free (&ev);
-
- /* Get rid of the factory */
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (factory, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("edit_component(): Could not unref the calendar component factory");
-
- CORBA_exception_free (&ev);
-}
-
-struct notify_dialog_closure {
- CompQueuedAlarms *cqa;
- gpointer alarm_id;
-};
-
-/* Callback used from the alarm notify dialog */
-static void
-notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
-{
- struct notify_dialog_closure *c;
-
- c = data;
-
- switch (result) {
- case ALARM_NOTIFY_SNOOZE:
- create_snooze (c->cqa, c->alarm_id, snooze_mins);
- break;
-
- case ALARM_NOTIFY_EDIT:
- edit_component (c->cqa);
- break;
-
- case ALARM_NOTIFY_CLOSE:
- /* Do nothing */
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- remove_queued_alarm (c->cqa, c->alarm_id);
- g_free (c);
-}
-
-/* Performs notification of a display alarm */
-static void
-display_notification (time_t trigger, CompQueuedAlarms *cqa,
- gpointer alarm_id, gboolean use_description)
-{
- CalComponent *comp;
- CalComponentVType vtype;
- CalComponentText text;
- QueuedAlarm *qa;
- const char *message;
- struct notify_dialog_closure *c;
- gboolean use_summary;
-
- comp = cqa->alarms->comp;
- qa = lookup_queued_alarm (cqa, alarm_id);
- g_assert (qa != NULL);
-
- vtype = cal_component_get_vtype (comp);
-
- /* Pick a sensible notification message. First we try the DESCRIPTION
- * from the alarm, then the SUMMARY of the component.
- */
-
- use_summary = TRUE;
- message = NULL;
-
- if (use_description) {
- CalComponentAlarm *alarm;
-
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_description (alarm, &text);
- cal_component_alarm_free (alarm);
-
- if (text.value) {
- message = text.value;
- use_summary = FALSE;
- }
- }
-
- if (use_summary) {
- cal_component_get_summary (comp, &text);
- if (text.value)
- message = text.value;
- else
- message = _("No description available.");
- }
-
- c = g_new (struct notify_dialog_closure, 1);
- c->cqa = cqa;
- c->alarm_id = alarm_id;
-
- if (!alarm_notify_dialog (trigger,
- qa->instance->occur_start, qa->instance->occur_end,
- vtype, message,
- notify_dialog_cb, c))
- g_message ("display_notification(): Could not create the alarm notify dialog");
-}
-
-/* Performs notification of an audio alarm */
-static void
-audio_notification (time_t trigger, CompQueuedAlarms *cqa,
- gpointer alarm_id)
-{
- QueuedAlarm *qa;
- CalComponent *comp;
- CalComponentAlarm *alarm;
- icalattach *attach;
-
- comp = cqa->alarms->comp;
- qa = lookup_queued_alarm (cqa, alarm_id);
- g_assert (qa != NULL);
-
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_attach (alarm, &attach);
- cal_component_alarm_free (alarm);
-
- if (attach && icalattach_get_is_url (attach)) {
- const char *url;
-
- url = icalattach_get_url (attach);
- g_assert (url != NULL);
-
- gnome_sound_play (url); /* this sucks */
- }
-
- if (attach)
- icalattach_unref (attach);
-
- /* We present a notification message in addition to playing the sound */
- display_notification (trigger, cqa, alarm_id, FALSE);
-}
-
-/* Performs notification of a mail alarm */
-static void
-mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
-{
- GtkWidget *dialog;
-
- /* FIXME */
-
- display_notification (trigger, cqa, alarm_id, FALSE);
-
- dialog = gnome_warning_dialog (_("Evolution does not support calendar reminders with\n"
- "email notifications yet, but this reminder was\n"
- "configured to send an email. Evolution will display\n"
- "a normal reminder dialog box instead."));
- gnome_dialog_run (GNOME_DIALOG (dialog));
-}
-
-/* Performs notification of a procedure alarm */
-static void
-procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
-{
- QueuedAlarm *qa;
- CalComponent *comp;
- CalComponentAlarm *alarm;
- CalComponentText description;
- icalattach *attach;
- const char *url;
- char *cmd, *str;
- GtkWidget *dialog;
- int result;
-
- comp = cqa->alarms->comp;
- qa = lookup_queued_alarm (cqa, alarm_id);
- g_assert (qa != NULL);
-
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_attach (alarm, &attach);
- cal_component_alarm_get_description (alarm, &description);
- cal_component_alarm_free (alarm);
-
- /* If the alarm has no attachment, simply display a notification dialog. */
- if (!attach)
- goto fallback;
-
- if (!icalattach_get_is_url (attach)) {
- icalattach_unref (attach);
- goto fallback;
- }
-
- url = icalattach_get_url (attach);
- g_assert (url != NULL);
-
- /* Ask for confirmation before executing the stuff */
-
- if (description.value)
- cmd = g_strconcat (url, " ", description.value, NULL);
- else
- cmd = (char *) url;
-
- str = g_strdup_printf (_("An Evolution Calendar reminder is about to trigger.\n"
- "This reminder is configured to run the following program:\n\n"
- " %s\n\n"
- "Are you sure you want to run this program?"),
- cmd);
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
- g_free (str);
-
- result = 0;
- if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
- result = gnome_execute_shell (NULL, cmd);
-
- if (cmd != (char *) url)
- g_free (cmd);
-
- icalattach_unref (attach);
-
- /* Fall back to display notification if we got an error */
- if (result < 0)
- goto fallback;
-
- remove_queued_alarm (cqa, alarm_id);
- return;
-
- fallback:
-
- display_notification (trigger, cqa, alarm_id, FALSE);
-}
-
-
-
-/**
- * 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);
-}
diff --git a/calendar/gui/alarm-notify/alarm-queue.h b/calendar/gui/alarm-notify/alarm-queue.h
deleted file mode 100644
index cd2e9444b1..0000000000
--- a/calendar/gui/alarm-notify/alarm-queue.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Evolution calendar - Alarm queueing engine
- *
- * Copyright (C) 2000 Ximian, 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 f750ed515c..0000000000
--- a/calendar/gui/alarm-notify/alarm.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/* Evolution calendar - Low-level alarm timer mechanism
- *
- * Copyright (C) 2000 Ximian, 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"
-
-
-
-/* Our glib timeout */
-static guint timeout_id;
-
-/* The list of pending alarms */
-static GList *alarms = NULL;
-
-/* A queued alarm structure */
-typedef struct {
- time_t trigger;
- AlarmFunction alarm_fn;
- gpointer data;
- AlarmDestroyNotify destroy_notify_fn;
-} AlarmRecord;
-
-static void setup_timeout (time_t now);
-
-
-
-/* Removes the head alarm from the queue. Does not touch the timeout_id. */
-static void
-pop_alarm (void)
-{
- AlarmRecord *ar;
- GList *l;
-
- g_assert (alarms != NULL);
-
- ar = alarms->data;
-
- l = alarms;
- alarms = g_list_remove_link (alarms, l);
- g_list_free_1 (l);
-
- g_free (ar);
-}
-
-/* Callback from the alarm timeout */
-static gboolean
-alarm_ready_cb (gpointer data)
-{
- time_t now;
-
- g_assert (alarms != NULL);
- timeout_id = 0;
-
- now = time (NULL);
-
- while (alarms) {
- AlarmRecord *notify_id, *ar;
- AlarmRecord ar_copy;
-
- ar = alarms->data;
-
- if (ar->trigger > now)
- break;
-
- notify_id = ar;
-
- ar_copy = *ar;
- ar = &ar_copy;
-
- pop_alarm (); /* This will free the original AlarmRecord; that's why we copy it */
-
- (* ar->alarm_fn) (notify_id, ar->trigger, ar->data);
-
- if (ar->destroy_notify_fn)
- (* ar->destroy_notify_fn) (notify_id, ar->data);
- }
-
- if (alarms) {
- /* We need this check because one of the alarm_fn above may have
- * re-entered and added an alarm of its own, so the timer will
- * already be set up.
- */
- if (timeout_id == 0)
- setup_timeout (now);
- } else
- g_assert (timeout_id == 0);
-
- return FALSE;
-}
-
-/* Sets up a timeout for the next minute */
-static void
-setup_timeout (time_t now)
-{
- time_t next, diff;
- struct tm tm;
-
- g_assert (timeout_id == 0);
- g_assert (alarms != NULL);
-
- tm = *localtime (&now);
- tm.tm_sec = 0;
- tm.tm_min++; /* next minute */
-
- next = mktime (&tm);
- g_assert (next != -1);
-
- diff = next - now;
-
- g_assert (diff >= 0);
- timeout_id = g_timeout_add (diff * 1000, alarm_ready_cb, NULL);
-}
-
-/* Used from g_list_insert_sorted(); compares the trigger times of two AlarmRecord structures. */
-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 void
-queue_alarm (AlarmRecord *ar)
-{
- time_t now;
- AlarmRecord *old_head;
-
- if (alarms) {
- g_assert (timeout_id != 0);
-
- old_head = alarms->data;
- } else {
- g_assert (timeout_id == 0);
-
- old_head = NULL;
- }
-
- alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time);
-
- if (old_head == alarms->data)
- return;
-
- /* Set the timer for removal upon activation */
-
- if (!old_head) {
- now = time (NULL);
- setup_timeout (now);
- }
-}
-
-
-
-/**
- * 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)
-{
- AlarmRecord *ar;
-
- g_return_val_if_fail (trigger != -1, NULL);
- g_return_val_if_fail (alarm_fn != NULL, NULL);
-
- ar = g_new (AlarmRecord, 1);
- ar->trigger = trigger;
- ar->alarm_fn = alarm_fn;
- ar->data = data;
- ar->destroy_notify_fn = destroy_notify_fn;
-
- queue_alarm (ar);
-
- return ar;
-}
-
-/**
- * alarm_remove:
- * @alarm: A queued alarm identifier.
- *
- * Removes an alarm from the alarm queue.
- **/
-void
-alarm_remove (gpointer alarm)
-{
- AlarmRecord *notify_id, *ar;
- AlarmRecord ar_copy;
- AlarmRecord *old_head;
- GList *l;
-
- 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;
-
- notify_id = ar;
-
- if (old_head == ar) {
- ar_copy = *ar;
- ar = &ar_copy;
- pop_alarm (); /* This will free the original AlarmRecord; that's why we copy it */
- } else {
- alarms = g_list_remove_link (alarms, l);
- g_list_free_1 (l);
- }
-
- /* Reset the timeout */
-
- g_assert (timeout_id != 0);
-
- if (!alarms) {
- g_source_remove (timeout_id);
- timeout_id = 0;
- }
-
- /* Notify about destructiono of the alarm */
-
- if (ar->destroy_notify_fn)
- (* ar->destroy_notify_fn) (notify_id, ar->data);
-
-}
-
-/**
- * alarm_done:
- *
- * Terminates the alarm timer mechanism. This should be called at the end of
- * the program.
- **/
-void
-alarm_done (void)
-{
- GList *l;
-
- if (timeout_id == 0) {
- g_assert (alarms == NULL);
- return;
- }
-
- g_assert (alarms != NULL);
-
- g_source_remove (timeout_id);
- timeout_id = 0;
-
- 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;
-}
diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h
deleted file mode 100644
index b5d57cbe49..0000000000
--- a/calendar/gui/alarm-notify/alarm.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Evolution calendar - Low-level alarm timer mechanism
- *
- * Copyright (C) 2000 Ximian, 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 5134aae0b7..0000000000
--- a/calendar/gui/alarm-notify/notify-main.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Evolution calendar - Alarm notification service main file
- *
- * Copyright (C) 2000 Ximian, 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 <libgnomevfs/gnome-vfs-init.h>
-#include <glade/glade.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;
-
-
-/* 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)
-{
- free (malloc (8));
-
- 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"));
-
- if (!gnome_vfs_init ())
- g_error (_("Could not initialize gnome-vfs"));
-
- glade_gnome_init ();
-
- alarm_queue_init ();
-
- factory = bonobo_generic_factory_new ("OAFIID: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 ();
-
- gnome_vfs_shutdown ();
-
- return 0;
-}
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
deleted file mode 100644
index cca017ee8d..0000000000
--- a/calendar/gui/cal-search-bar.c
+++ /dev/null
@@ -1,574 +0,0 @@
-/* Evolution calendar - Search bar widget for calendar views
- *
- * 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 <stdlib.h>
-#include <glib.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-unicode.h>
-#include "cal-search-bar.h"
-
-
-
-/* Menu items for the ESearchBar */
-static ESearchBarItem search_menu_items[] = {
- E_FILTERBAR_RESET,
- { NULL, -1, NULL }
-};
-
-/* IDs and option items for the ESearchBar */
-enum {
- SEARCH_ANY_FIELD_CONTAINS,
- SEARCH_SUMMARY_CONTAINS,
- SEARCH_DESCRIPTION_CONTAINS,
- SEARCH_COMMENT_CONTAINS,
- SEARCH_CATEGORY_IS,
-};
-
-static ESearchBarItem search_option_items[] = {
- { N_("Any field contains"), SEARCH_ANY_FIELD_CONTAINS, NULL },
- { N_("Summary contains"), SEARCH_SUMMARY_CONTAINS, NULL },
- { N_("Description contains"), SEARCH_DESCRIPTION_CONTAINS, NULL },
- { N_("Comment contains"), SEARCH_COMMENT_CONTAINS, NULL },
- { N_("Category is"), SEARCH_CATEGORY_IS, NULL },
- { NULL, -1, NULL }
-};
-
-/* IDs for the categories suboptions */
-#define CATEGORIES_ALL 0
-#define CATEGORIES_UNMATCHED 1
-#define CATEGORIES_OFFSET 3
-
-/* Private part of the CalSearchBar structure */
-struct CalSearchBarPrivate {
- /* Array of categories */
- GPtrArray *categories;
-};
-
-
-
-static void cal_search_bar_class_init (CalSearchBarClass *class);
-static void cal_search_bar_init (CalSearchBar *cal_search);
-static void cal_search_bar_destroy (GtkObject *object);
-
-static void cal_search_bar_query_changed (ESearchBar *search);
-static void cal_search_bar_menu_activated (ESearchBar *search, int item);
-
-static ESearchBarClass *parent_class = NULL;
-
-/* Signal IDs */
-enum {
- SEXP_CHANGED,
- CATEGORY_CHANGED,
- LAST_SIGNAL
-};
-
-static guint cal_search_bar_signals[LAST_SIGNAL] = { 0 };
-
-
-
-/**
- * cal_search_bar_get_type:
- *
- * Registers the #CalSearchBar class if necessary and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CalSearchBar class.
- **/
-GtkType
-cal_search_bar_get_type (void)
-{
- static GtkType cal_search_bar_type = 0;
-
- if (!cal_search_bar_type) {
- static const GtkTypeInfo cal_search_bar_info = {
- "CalSearchBar",
- sizeof (CalSearchBar),
- sizeof (CalSearchBarClass),
- (GtkClassInitFunc) cal_search_bar_class_init,
- (GtkObjectInitFunc) cal_search_bar_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- cal_search_bar_type = gtk_type_unique (E_SEARCH_BAR_TYPE, &cal_search_bar_info);
- }
-
- return cal_search_bar_type;
-}
-
-/* Class initialization function for the calendar search bar */
-static void
-cal_search_bar_class_init (CalSearchBarClass *class)
-{
- ESearchBarClass *e_search_bar_class;
- GtkObjectClass *object_class;
-
- e_search_bar_class = (ESearchBarClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (E_SEARCH_BAR_TYPE);
-
- cal_search_bar_signals[SEXP_CHANGED] =
- gtk_signal_new ("sexp_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalSearchBarClass, sexp_changed),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- cal_search_bar_signals[CATEGORY_CHANGED] =
- gtk_signal_new ("category_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalSearchBarClass, category_changed),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, cal_search_bar_signals, LAST_SIGNAL);
-
- class->sexp_changed = NULL;
- class->category_changed = NULL;
-
- e_search_bar_class->query_changed = cal_search_bar_query_changed;
- e_search_bar_class->menu_activated = cal_search_bar_menu_activated;
-
- object_class->destroy = cal_search_bar_destroy;
-}
-
-/* Object initialization function for the calendar search bar */
-static void
-cal_search_bar_init (CalSearchBar *cal_search)
-{
- CalSearchBarPrivate *priv;
-
- priv = g_new (CalSearchBarPrivate, 1);
- cal_search->priv = priv;
-
- priv->categories = g_ptr_array_new ();
- g_ptr_array_set_size (priv->categories, 0);
-}
-
-/* Frees an array of categories */
-static void
-free_categories (GPtrArray *categories)
-{
- int i;
-
- for (i = 0; i < categories->len; i++) {
- g_assert (categories->pdata[i] != NULL);
- g_free (categories->pdata[i]);
- }
-
- g_ptr_array_free (categories, TRUE);
-}
-
-/* Destroy handler for the calendar search bar */
-static void
-cal_search_bar_destroy (GtkObject *object)
-{
- CalSearchBar *cal_search;
- CalSearchBarPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CAL_SEARCH_BAR (object));
-
- cal_search = CAL_SEARCH_BAR (object);
- priv = cal_search->priv;
-
- if (priv->categories) {
- free_categories (priv->categories);
- priv->categories = NULL;
- }
-
- g_free (priv);
- cal_search->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Emits the "sexp_changed" signal for the calendar search bar */
-static void
-notify_sexp_changed (CalSearchBar *cal_search, const char *sexp)
-{
- gtk_signal_emit (GTK_OBJECT (cal_search), cal_search_bar_signals[SEXP_CHANGED],
- sexp);
-}
-
-/* Returns the string of the currently selected category, NULL for "Unmatched",
- * or (const char *) 1 for "All".
- */
-static const char *
-get_current_category (CalSearchBar *cal_search)
-{
- CalSearchBarPrivate *priv;
- int id, subid;
-
- priv = cal_search->priv;
-
- g_assert (priv->categories != NULL);
-
- id = e_search_bar_get_item_id (E_SEARCH_BAR (cal_search));
- if (id != SEARCH_CATEGORY_IS)
- return NULL;
-
- subid = e_search_bar_get_subitem_id (E_SEARCH_BAR (cal_search));
- if (subid == CATEGORIES_ALL)
- return (const char *) 1;
- else if (subid == CATEGORIES_UNMATCHED)
- return NULL;
- else {
- int i;
-
- i = subid - CATEGORIES_OFFSET;
- g_assert (i >= 0 && i < priv->categories->len);
-
- return priv->categories->pdata[i];
- }
-}
-
-/* Sets the query string to be (contains? "field" "text") */
-static void
-notify_query_contains (CalSearchBar *cal_search, const char *field)
-{
- char *text;
- char *sexp;
-
- text = e_search_bar_get_text (E_SEARCH_BAR (cal_search));
- if (!text)
- return; /* This is an error in the UTF8 conversion, not an empty string! */
-
- sexp = g_strdup_printf ("(contains? \"%s\" \"%s\")", field, text);
- g_free (text);
-
- notify_sexp_changed (cal_search, sexp);
- g_free (sexp);
-}
-
-/* Returns a sexp for the selected category in the drop-down menu. The "All"
- * option is returned as (const char *) 1, and the "Unfiled" option is returned
- * as NULL.
- */
-static char *
-get_category_sexp (CalSearchBar *cal_search)
-{
- const char *category;
-
- category = get_current_category (cal_search);
-
- if (category == NULL)
- return g_strdup ("(has-categories? #f)"); /* Unfiled items */
- else if (category == (const char *) 1)
- return NULL; /* All items */
- else
- return g_strdup_printf ("(has-categories? \"%s\")", category); /* Specific category */
-}
-
-/* Sets the query string to the appropriate match for categories */
-static void
-notify_category_is (CalSearchBar *cal_search)
-{
- char *sexp;
-
- sexp = get_category_sexp (cal_search);
- if (!sexp)
- notify_sexp_changed (cal_search, "#t"); /* Match all */
- else
- notify_sexp_changed (cal_search, sexp);
-
- if (sexp)
- g_free (sexp);
-}
-
-/* Creates a new query from the values in the widgets and notifies upstream */
-static void
-regen_query (CalSearchBar *cal_search)
-{
- CalSearchBarPrivate *priv;
- int id;
- const char *category;
-
- priv = cal_search->priv;
-
- /* Fetch the data from the ESearchBar's entry widgets */
-
- id = e_search_bar_get_item_id (E_SEARCH_BAR (cal_search));
-
- /* Generate the different types of queries */
-
- switch (id) {
- case SEARCH_ANY_FIELD_CONTAINS:
- notify_query_contains (cal_search, "any");
- break;
-
- case SEARCH_SUMMARY_CONTAINS:
- notify_query_contains (cal_search, "summary");
- break;
-
- case SEARCH_DESCRIPTION_CONTAINS:
- notify_query_contains (cal_search, "description");
- break;
-
- case SEARCH_COMMENT_CONTAINS:
- notify_query_contains (cal_search, "comment");
- break;
-
- case SEARCH_CATEGORY_IS:
- notify_category_is (cal_search);
-
- category = cal_search_bar_get_category (cal_search);
- gtk_signal_emit (GTK_OBJECT (cal_search), cal_search_bar_signals[CATEGORY_CHANGED],
- category);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* query_changed handler for the calendar search bar */
-static void
-cal_search_bar_query_changed (ESearchBar *search)
-{
- CalSearchBar *cal_search;
-
- cal_search = CAL_SEARCH_BAR (search);
- regen_query (cal_search);
-}
-
-/* menu_activated handler for the calendar search bar */
-static void
-cal_search_bar_menu_activated (ESearchBar *search, int item)
-{
- CalSearchBar *cal_search;
-
- cal_search = CAL_SEARCH_BAR (search);
-
- switch (item) {
- case E_FILTERBAR_RESET_ID:
- notify_sexp_changed (cal_search, "#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 ();
- }
-}
-
-
-
-/* Creates the suboptions menu for the ESearchBar with the list of categories */
-static void
-make_suboptions (CalSearchBar *cal_search)
-{
- CalSearchBarPrivate *priv;
- ESearchBarSubitem *subitems;
- int i;
-
- priv = cal_search->priv;
-
- g_assert (priv->categories != NULL);
-
- /* Categories plus "all", "unmatched", separator, terminator */
- subitems = g_new (ESearchBarSubitem, priv->categories->len + 3 + 1);
-
- /* All, unmatched, separator */
-
- subitems[0].text = _("Any Category");
- subitems[0].id = CATEGORIES_ALL;
- subitems[0].translate = FALSE;
-
- subitems[1].text = _("Unmatched");
- subitems[1].id = CATEGORIES_UNMATCHED;
- subitems[1].translate = FALSE;
-
- /* All the other items */
-
- if (priv->categories->len > 0) {
- subitems[2].text = NULL; /* separator */
- subitems[2].id = 0;
-
- for (i = 0; i < priv->categories->len; i++) {
- const char *category;
- char *str;
-
- category = priv->categories->pdata[i];
- str = e_utf8_to_gtk_string (GTK_WIDGET (cal_search), category);
- if (!str)
- str = g_strdup ("");
-
- subitems[i + CATEGORIES_OFFSET].text = str;
- subitems[i + CATEGORIES_OFFSET].id = i + CATEGORIES_OFFSET;
- subitems[i + CATEGORIES_OFFSET].translate = FALSE;
- }
-
- subitems[i + CATEGORIES_OFFSET].id = -1; /* terminator */
- } else
- subitems[2].id = -1; /* terminator */
-
- e_search_bar_set_suboption (E_SEARCH_BAR (cal_search), SEARCH_CATEGORY_IS, subitems);
-
- /* Free the strings */
- for (i = 0; i < priv->categories->len; i++)
- g_free (subitems[i + CATEGORIES_OFFSET].text);
-
- g_free (subitems);
-}
-
-/**
- * cal_search_bar_construct:
- * @cal_search: A calendar search bar.
- *
- * Constructs a calendar search bar by binding its menu and option items.
- *
- * Return value: The same value as @cal_search.
- **/
-CalSearchBar *
-cal_search_bar_construct (CalSearchBar *cal_search)
-{
- g_return_val_if_fail (cal_search != NULL, NULL);
- g_return_val_if_fail (IS_CAL_SEARCH_BAR (cal_search), NULL);
-
- e_search_bar_construct (E_SEARCH_BAR (cal_search), search_menu_items, search_option_items);
- make_suboptions (cal_search);
-
- e_search_bar_set_ids (E_SEARCH_BAR (cal_search), SEARCH_CATEGORY_IS, CATEGORIES_ALL);
-
- return cal_search;
-}
-
-/**
- * cal_search_bar_new:
- *
- * Creates a new calendar search bar.
- *
- * Return value: A newly-created calendar search bar. You should connect to the
- * "sexp_changed" signal to monitor changes in the generated sexps.
- **/
-GtkWidget *
-cal_search_bar_new (void)
-{
- CalSearchBar *cal_search;
-
- cal_search = gtk_type_new (TYPE_CAL_SEARCH_BAR);
- return GTK_WIDGET (cal_search_bar_construct (cal_search));
-}
-
-/* Used from qsort() */
-static int
-compare_categories_cb (const void *a, const void *b)
-{
- const char **ca, **cb;
-
- ca = (const char **) a;
- cb = (const char **) b;
-
- /* FIXME: should use some utf8 strcoll() thingy */
- return strcmp (*ca, *cb);
-}
-
-/* Creates a sorted array of categories based on the original one; copies the
- * string values.
- */
-static GPtrArray *
-sort_categories (GPtrArray *categories)
-{
- GPtrArray *c;
- int i;
-
- c = g_ptr_array_new ();
- g_ptr_array_set_size (c, categories->len);
-
- for (i = 0; i < categories->len; i++)
- c->pdata[i] = g_strdup (categories->pdata[i]);
-
- qsort (c->pdata, c->len, sizeof (gpointer), compare_categories_cb);
-
- return c;
-}
-
-/**
- * cal_search_bar_set_categories:
- * @cal_search: A calendar search bar.
- * @categories: Array of pointers to strings for the category names.
- *
- * Sets the list of categories that are to be shown in the drop-down list
- * of a calendar search bar. The search bar will automatically add an item
- * for "unfiled" components, that is, those that have no categories assigned
- * to them.
- **/
-void
-cal_search_bar_set_categories (CalSearchBar *cal_search, GPtrArray *categories)
-{
- CalSearchBarPrivate *priv;
-
- g_return_if_fail (cal_search != NULL);
- g_return_if_fail (IS_CAL_SEARCH_BAR (cal_search));
- g_return_if_fail (categories != NULL);
-
- priv = cal_search->priv;
-
- g_assert (priv->categories != NULL);
- free_categories (priv->categories);
-
- priv->categories = sort_categories (categories);
- make_suboptions (cal_search);
-}
-
-/**
- * cal_search_bar_get_category:
- * @cal_search: A calendar search bar.
- *
- * Queries the currently selected category name in a calendar search bar.
- * If "All" or "Unfiled" are selected, this function will return NULL.
- *
- * Return value: Name of the selected category, or NULL if there is no
- * selected category.
- **/
-const char *
-cal_search_bar_get_category (CalSearchBar *cal_search)
-{
- const char *category;
-
- category = get_current_category (cal_search);
-
- if (!category || category == (const char *) 1)
- return NULL;
- else
- return category;
-}
diff --git a/calendar/gui/cal-search-bar.h b/calendar/gui/cal-search-bar.h
deleted file mode 100644
index 3142952482..0000000000
--- a/calendar/gui/cal-search-bar.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Evolution calendar - Search bar widget for calendar views
- *
- * 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_SEARCH_BAR_H
-#define CAL_SEARCH_BAR_H
-
-#include <libgnome/gnome-defs.h>
-#include "widgets/misc/e-search-bar.h"
-#include "widgets/misc/e-filter-bar.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_CAL_SEARCH_BAR (cal_search_bar_get_type ())
-#define CAL_SEARCH_BAR(obj) (GTK_CHECK_CAST ((obj), TYPE_CAL_SEARCH_BAR, CalSearchBar))
-#define CAL_SEARCH_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_CAL_SEARCH_BAR, \
- CalSearchBarClass))
-#define IS_CAL_SEARCH_BAR(obj) (GTK_CHECK_TYPE ((obj), TYPE_CAL_SEARCH_BAR))
-#define IS_CAL_SEARCH_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_CAL_SEARCH_BAR))
-
-typedef struct CalSearchBarPrivate CalSearchBarPrivate;
-
-typedef struct {
- ESearchBar search_bar;
-
- /* Private data */
- CalSearchBarPrivate *priv;
-} CalSearchBar;
-
-typedef struct {
- ESearchBarClass parent_class;
-
- /* Notification signals */
-
- void (* sexp_changed) (CalSearchBar *cal_search, const char *sexp);
- void (* category_changed) (CalSearchBar *cal_search, const char *category);
-} CalSearchBarClass;
-
-GtkType cal_search_bar_get_type (void);
-
-CalSearchBar *cal_search_bar_construct (CalSearchBar *cal_search);
-
-GtkWidget *cal_search_bar_new (void);
-
-void cal_search_bar_set_categories (CalSearchBar *cal_search, GPtrArray *categories);
-
-const char *cal_search_bar_get_category (CalSearchBar *cal_search);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
deleted file mode 100644
index 1f3e5b26f4..0000000000
--- a/calendar/gui/calendar-commands.c
+++ /dev/null
@@ -1,688 +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 Ximian, 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 "shell/Evolution.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "gnome-cal.h"
-#include "goto.h"
-#include "print.h"
-#include "dialogs/cal-prefs-dialog.h"
-#include "itip-utils.h"
-#include "evolution-shell-component-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);
-}
-
-static void
-new_task_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- gnome_calendar_new_task (gcal);
-}
-
-/* Prints the calendar at its current view and time range */
-static void
-print (GnomeCalendar *gcal, gboolean preview)
-{
- time_t start;
- GnomeCalendarViewType view_type;
- PrintView print_view;
-
- gnome_calendar_get_current_time_range (gcal, &start, NULL);
- view_type = gnome_calendar_get_view (gcal);
-
- switch (view_type) {
- case GNOME_CAL_DAY_VIEW:
- print_view = PRINT_VIEW_DAY;
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- case GNOME_CAL_WEEK_VIEW:
- print_view = PRINT_VIEW_WEEK;
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- print_view = PRINT_VIEW_MONTH;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- 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, GNOME_CAL_DAY_VIEW, 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, GNOME_CAL_WORK_WEEK_VIEW, 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, GNOME_CAL_WEEK_VIEW, 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, GNOME_CAL_MONTH_VIEW, FALSE, TRUE);
-}
-
-
-
-static void
-settings_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- if (!preferences_dialog)
- preferences_dialog = cal_prefs_dialog_new (CAL_PREFS_DIALOG_PAGE_CALENDAR);
- else
- cal_prefs_dialog_show (preferences_dialog, CAL_PREFS_DIALOG_PAGE_CALENDAR);
-}
-
-static void
-cut_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- set_clock_cursor (gcal);
- gnome_calendar_cut_clipboard (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-copy_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_copy_clipboard (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-paste_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_paste_clipboard (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-delete_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_delete_event (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- GnomeCalendar *gcal;
- CalClient *client;
- GList *comp_list;
- icaltimezone *utc;
- time_t start = time (NULL), end;
-
- gcal = GNOME_CALENDAR (data);
-
- utc = icaltimezone_get_utc_timezone ();
- start = time_day_begin_with_zone (start, utc);
- end = time_add_week_with_zone (start, 6, utc);
-
- client = gnome_calendar_get_cal_client (gcal);
- comp_list = cal_client_get_free_busy (client, NULL, start, end);
- if (comp_list) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- CalComponent *comp = CAL_COMPONENT (l->data);
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp);
-
- gtk_object_unref (GTK_OBJECT (comp));
- }
-
- g_list_free (comp_list);
- }
-}
-
-/* Does a queryInterface on the control's parent control frame for the ShellView interface */
-static GNOME_Evolution_ShellView
-get_shell_view_interface (BonoboControl *control)
-{
- Bonobo_ControlFrame control_frame;
- GNOME_Evolution_ShellView shell_view;
- CORBA_Environment ev;
-
- control_frame = bonobo_control_get_control_frame (control);
-
- g_assert (control_frame != CORBA_OBJECT_NIL);
-
- CORBA_exception_init (&ev);
- shell_view = Bonobo_Unknown_queryInterface (control_frame,
- "IDL:GNOME/Evolution/ShellView:1.0",
- &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("get_shell_view_interface(): "
- "Could not queryInterface() on the control frame");
- shell_view = CORBA_OBJECT_NIL;
- goto out;
- }
-
- CORBA_exception_free (&ev);
-
- out:
-
- return shell_view;
-}
-
-/* Displays the currently displayed time range in the folder bar label on the
- shell view, according to which view we are showing. */
-void
-calendar_set_folder_bar_label (GnomeCalendar *gcal, BonoboControl *control)
-{
- icaltimezone *zone;
- struct icaltimetype start_tt, end_tt;
- time_t start_time, end_time;
- struct tm start_tm, end_tm;
- char buffer[512], end_buffer[256];
- GnomeCalendarViewType view;
-
- gnome_calendar_get_visible_time_range (gcal, &start_time, &end_time);
- zone = gnome_calendar_get_timezone (gcal);
-
- start_tt = icaltime_from_timet_with_zone (start_time, FALSE, zone);
- start_tm.tm_year = start_tt.year - 1900;
- start_tm.tm_mon = start_tt.month - 1;
- start_tm.tm_mday = start_tt.day;
- start_tm.tm_hour = start_tt.hour;
- start_tm.tm_min = start_tt.minute;
- start_tm.tm_sec = start_tt.second;
- start_tm.tm_isdst = -1;
- start_tm.tm_wday = time_day_of_week (start_tt.day, start_tt.month - 1,
- start_tt.year);
-
- /* Take one off end_time so we don't get an extra day. */
- end_tt = icaltime_from_timet_with_zone (end_time - 1, FALSE, zone);
- end_tm.tm_year = end_tt.year - 1900;
- end_tm.tm_mon = end_tt.month - 1;
- end_tm.tm_mday = end_tt.day;
- end_tm.tm_hour = end_tt.hour;
- end_tm.tm_min = end_tt.minute;
- end_tm.tm_sec = end_tt.second;
- end_tm.tm_isdst = -1;
- end_tm.tm_wday = time_day_of_week (end_tt.day, end_tt.month - 1,
- end_tt.year);
-
- view = gnome_calendar_get_view (gcal);
-
- switch (view) {
- case GNOME_CAL_DAY_VIEW:
- case GNOME_CAL_WORK_WEEK_VIEW:
- case GNOME_CAL_WEEK_VIEW:
- if (start_tm.tm_year == end_tm.tm_year
- && start_tm.tm_mon == end_tm.tm_mon
- && start_tm.tm_mday == end_tm.tm_mday) {
- strftime (buffer, sizeof (buffer),
- _("%A %d %B %Y"), &start_tm);
- } else if (start_tm.tm_year == end_tm.tm_year) {
- strftime (buffer, sizeof (buffer),
- _("%a %d %b"), &start_tm);
- strftime (end_buffer, sizeof (end_buffer),
- _("%a %d %b %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- } else {
- strftime (buffer, sizeof (buffer),
- _("%a %d %b %Y"), &start_tm);
- strftime (end_buffer, sizeof (end_buffer),
- _("%a %d %b %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- }
- break;
- case GNOME_CAL_MONTH_VIEW:
- if (start_tm.tm_year == end_tm.tm_year) {
- if (start_tm.tm_mon == end_tm.tm_mon) {
- strftime (buffer, sizeof (buffer),
- "%d", &start_tm);
- strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- } else {
- strftime (buffer, sizeof (buffer),
- _("%d %B"), &start_tm);
- strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- }
- } else {
- strftime (buffer, sizeof (buffer),
- _("%d %B %Y"), &start_tm);
- strftime (end_buffer, sizeof (end_buffer),
- _("%d %B %Y"), &end_tm);
- strcat (buffer, " - ");
- strcat (buffer, end_buffer);
- }
- break;
- default:
- g_assert_not_reached ();
- }
-
- control_util_set_folder_bar_label (control, buffer);
-}
-
-void
-control_util_set_folder_bar_label (BonoboControl *control, char *label)
-{
- GNOME_Evolution_ShellView shell_view;
- CORBA_Environment ev;
-
- shell_view = get_shell_view_interface (control);
- if (shell_view == CORBA_OBJECT_NIL)
- return;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_setFolderBarLabel (shell_view, label, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("control_util_set_folder_bar_label(): Could not set the folder bar label");
-
- CORBA_exception_free (&ev);
-}
-
-/* Sensitizes the UI Component menu/toolbar commands based on the number of
- * selected events. (This will always be 0 or 1 currently.)
- */
-static void
-sensitize_commands (GnomeCalendar *gcal, BonoboControl *control)
-{
- BonoboUIComponent *uic;
- int n_selected;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- n_selected = gnome_calendar_get_num_events_selected (gcal);
-
- bonobo_ui_component_set_prop (uic, "/commands/CutEvent", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/CopyEvent", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/DeleteEvent", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
-}
-
-/* Callback used when the selection in the calendar views changes */
-static void
-selection_changed_cb (GnomeCalendar *gcal, gpointer data)
-{
- BonoboControl *control;
-
- control = BONOBO_CONTROL (data);
-
- sensitize_commands (gcal, control);
-}
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
- BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb),
-
- BONOBO_UI_VERB ("CalendarNewAppointment", new_appointment_cb),
- BONOBO_UI_VERB ("CalendarNewEvent", new_event_cb),
- BONOBO_UI_VERB ("CalendarNewTask", new_task_cb),
-
- BONOBO_UI_VERB ("CalendarSettings", settings_cmd),
-
- BONOBO_UI_VERB ("CutEvent", cut_event_cmd),
- BONOBO_UI_VERB ("CopyEvent", copy_event_cmd),
- BONOBO_UI_VERB ("PasteEvent", paste_event_cmd),
- BONOBO_UI_VERB ("DeleteEvent", delete_event_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 ("PublishFreeBusy", publish_freebusy_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] =
-{
- E_PIXMAP ("/menu/File/New/NewFirstItem/NewAppointment", "new_appointment.xpm"),
- E_PIXMAP ("/menu/File/New/NewFirstItem/NewTask", "new_task-16.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/CutEvent", "16_cut.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/CopyEvent", "16_copy.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/PasteEvent", "16_paste.png"),
- E_PIXMAP ("/menu/EditPlaceholder/Edit/DeleteEvent", "evolution-trash-mini.png"),
- E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
- E_PIXMAP ("/menu/File/Print/PrintPreview", "print-preview.xpm"),
- E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewAppointment", "new_appointment.xpm"),
- E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewEvent", "new_appointment.xpm"),
- E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewTask", "new_task-16.png"),
- E_PIXMAP ("/menu/Tools/ComponentPlaceholder/CalendarSettings", "configure_16_calendar.xpm"),
- E_PIXMAP ("/menu/View/ViewBegin/Goto", "goto-16.png"),
-
- E_PIXMAP ("/Toolbar/New", "buttons/new_appointment.png"),
- E_PIXMAP ("/Toolbar/NewTask", "buttons/new_task.png"),
- E_PIXMAP ("/Toolbar/Print", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/Delete", "buttons/delete-message.png"),
- E_PIXMAP ("/Toolbar/Prev", "buttons/arrow-left-24.png"),
- E_PIXMAP ("/Toolbar/Next", "buttons/arrow-right-24.png"),
- E_PIXMAP ("/Toolbar/Goto", "buttons/goto-24.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 *gcal)
-{
- 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, gcal);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR,
- "evolution-calendar.xml",
- "evolution-calendar");
-
- e_pixmaps_update (uic, pixmaps);
-
- gnome_calendar_setup_view_menus (gcal, uic);
-
- gtk_signal_connect (GTK_OBJECT (gcal), "selection_changed",
- GTK_SIGNAL_FUNC (selection_changed_cb), control);
-
- sensitize_commands (gcal, control);
-
- bonobo_ui_component_thaw (uic, NULL);
-
- /* Show the dialog for setting the timezone if the user hasn't chosen
- a default timezone already. This is done in the startup wizard now,
- so we don't do it here. */
-#if 0
- calendar_config_check_timezone_set ();
-#endif
-
- calendar_set_folder_bar_label (gcal, control);
-}
-
-void
-calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- gnome_calendar_discard_view_menus (gcal);
-
- /* Stop monitoring the "selection_changed" signal */
- gtk_signal_disconnect_by_data (GTK_OBJECT (gcal), control);
-
- 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 fd3658853b..0000000000
--- a/calendar/gui/calendar-commands.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Evolution calendar - Commands for the calendar GUI control
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Ximian, 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 *gcal);
-void calendar_control_deactivate (BonoboControl *control, GnomeCalendar *gcal);
-
-void calendar_goto_today (GnomeCalendar *gcal);
-
-void calendar_set_folder_bar_label (GnomeCalendar *gcal, BonoboControl *control);
-
-/* Used by calendar and tasks control to set the folder title bar label. */
-void control_util_set_folder_bar_label (BonoboControl *control, char *label);
-
-#endif /* CALENDAR_COMMANDS_H */
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
deleted file mode 100644
index e13a3f8a50..0000000000
--- a/calendar/gui/calendar-component.c
+++ /dev/null
@@ -1,610 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Copyright (C) 2000 Ximian, 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 <errno.h>
-#include <libgnomevfs/gnome-vfs-types.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-directory.h>
-#include <libgnomevfs/gnome-vfs-file-info.h>
-
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include "evolution-shell-component.h"
-#include "calendar-offline-handler.h"
-#include "component-factory.h"
-#include "tasks-control-factory.h"
-#include "control-factory.h"
-#include "calendar-config.h"
-#include "tasks-control.h"
-#include "tasks-migrate.h"
-
-
-
-/* OAFIID for the component. */
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponent"
-
-/* Folder type IDs */
-#define FOLDER_CALENDAR "calendar"
-#define FOLDER_TASKS "tasks"
-
-/* IDs for user creatable items */
-#define CREATE_EVENT_ID "event"
-#define CREATE_TASK_ID "task"
-
-char *evolution_dir;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { FOLDER_CALENDAR,
- "evolution-calendar.png",
- N_("Calendar"),
- N_("Folder containing appointments and events"),
- TRUE, NULL, NULL },
- { FOLDER_TASKS,
- "evolution-tasks.png",
- N_("Tasks"),
- N_("Folder containing to-do items"),
- TRUE, 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, "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;
- GnomeVFSURI *uri;
-
- CORBA_exception_init (&ev);
-
- if (strcmp (type, FOLDER_CALENDAR) && strcmp (type, FOLDER_TASKS)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- uri = gnome_vfs_uri_new (physical_uri);
- if (uri) {
- /* we don't need to do anything */
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_OK, &ev);
- gnome_vfs_uri_unref (uri);
- }
- else {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- }
-
- CORBA_exception_free (&ev);
-}
-
-static void
-remove_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- GnomeVFSURI *dir_uri, *data_uri, *backup_uri;
- GnomeVFSResult data_result, backup_result;
-
- /* check type */
- if (strcmp (type, FOLDER_CALENDAR) && strcmp (type, FOLDER_TASKS)) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener of "
- "an unsupported folder type");
-
- CORBA_exception_free (&ev);
- return;
- }
-
- /* check URI */
- dir_uri = gnome_vfs_uri_new (physical_uri);
- if (!dir_uri) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- /* Compute the URIs of the appropriate files */
-
- if (strcmp (type, FOLDER_CALENDAR) == 0) {
- data_uri = gnome_vfs_uri_append_file_name (dir_uri, "calendar.ics");
- backup_uri = gnome_vfs_uri_append_file_name (dir_uri, "calendar.ics~");
- } else if (strcmp (type, FOLDER_TASKS) == 0) {
- data_uri = gnome_vfs_uri_append_file_name (dir_uri, "tasks.ics");
- backup_uri = gnome_vfs_uri_append_file_name (dir_uri, "tasks.ics~");
- } else {
- g_assert_not_reached ();
- return;
- }
-
- if (!data_uri || !backup_uri) {
- CORBA_Environment ev;
-
- g_message ("remove_folder(): Could not generate the data/backup URIs");
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener "
- "of an invalid URI");
-
- CORBA_exception_free (&ev);
-
- goto out;
- }
-
- /* Delete the data and backup files; the shell will take care of the rest */
-
- data_result = gnome_vfs_unlink_from_uri (data_uri);
- backup_result = gnome_vfs_unlink_from_uri (backup_uri);
-
- if ((data_result == GNOME_VFS_OK || data_result == GNOME_VFS_ERROR_NOT_FOUND)
- && (backup_result == GNOME_VFS_OK || backup_result == GNOME_VFS_ERROR_NOT_FOUND)) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_OK,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener about success");
-
- CORBA_exception_free (&ev);
- } else {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener about failure");
-
- CORBA_exception_free (&ev);
- }
-
- out:
-
- gnome_vfs_uri_unref (dir_uri);
-
- if (data_uri)
- gnome_vfs_uri_unref (data_uri);
-
- if (backup_uri)
- gnome_vfs_uri_unref (backup_uri);
-}
-
-static void
-xfer_folder (EvolutionShellComponent *shell_component,
- const char *source_physical_uri,
- const char *destination_physical_uri,
- const char *type,
- gboolean remove_source,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
- GnomeVFSURI *src_uri;
- GnomeVFSURI *dest_uri;
- GnomeVFSResult result;
- GList *file_list;
- GList *l;
- gboolean success = TRUE;
-
- CORBA_exception_init (&ev);
-
- /* check type */
- if (strcmp (type, FOLDER_CALENDAR) && strcmp (type, FOLDER_TASKS)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- /* check URIs */
- src_uri = gnome_vfs_uri_new (source_physical_uri);
- dest_uri = gnome_vfs_uri_new (destination_physical_uri);
- if (!src_uri || ! dest_uri) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- gnome_vfs_uri_unref (src_uri);
- gnome_vfs_uri_unref (dest_uri);
- CORBA_exception_free (&ev);
- return;
- }
-
- gnome_vfs_uri_unref (src_uri);
- gnome_vfs_uri_unref (dest_uri);
-
- /* remove all files in that directory */
- result = gnome_vfs_directory_list_load (&file_list, source_physical_uri, 0, NULL);
- if (result != GNOME_VFS_OK) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- for (l = file_list; l; l = l->next) {
- GnomeVFSFileInfo *file_info;
- GnomeVFSHandle *hin;
- GnomeVFSHandle *hout;
- gpointer buffer;
- GnomeVFSFileSize size;
-
- file_info = (GnomeVFSFileInfo *) l->data;
- if (!file_info || file_info->name[0] == '.')
- continue;
-
- /* open source and destination files */
- src_uri = gnome_vfs_uri_new (source_physical_uri);
- src_uri = gnome_vfs_uri_append_file_name (src_uri, file_info->name);
-
- result = gnome_vfs_open_uri (&hin, src_uri, GNOME_VFS_OPEN_READ);
- gnome_vfs_uri_unref (src_uri);
- if (result != GNOME_VFS_OK) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
-
- dest_uri = gnome_vfs_uri_new (destination_physical_uri);
- dest_uri = gnome_vfs_uri_append_file_name (dest_uri, file_info->name);
-
- result = gnome_vfs_create_uri (&hout, dest_uri, GNOME_VFS_OPEN_WRITE, FALSE, 0);
- gnome_vfs_uri_unref (dest_uri);
- if (result != GNOME_VFS_OK) {
- gnome_vfs_close (hin);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
-
- /* write source file to destination file */
- buffer = g_malloc (file_info->size);
- result = gnome_vfs_read (hin, buffer, file_info->size, &size);
- if (result != GNOME_VFS_OK) {
- gnome_vfs_close (hin);
- gnome_vfs_close (hout);
- g_free (buffer);
-
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
- result = gnome_vfs_write (hout, buffer, file_info->size, &size);
- if (result != GNOME_VFS_OK) {
- gnome_vfs_close (hin);
- gnome_vfs_close (hout);
- g_free (buffer);
-
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
-
- /* free memory */
- gnome_vfs_close (hin);
- gnome_vfs_close (hout);
- g_free (buffer);
- }
-
- if (success) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_OK,
- &ev);
- }
-
- /* free memory */
- gnome_vfs_file_info_list_free (file_list);
- CORBA_exception_free (&ev);
-}
-
-static GList *shells = NULL;
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- static gboolean migrated = FALSE;
-
- evolution_dir = g_strdup (evolution_homedir);
-
- if (!migrated) {
- tasks_migrate ();
- migrated = TRUE;
- }
-
- shells = g_list_append (shells, shell_component);
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- gpointer user_data)
-{
- shells = g_list_remove (shells, shell_component);
-
- if (g_list_length (shells) == 0)
- gtk_main_quit ();
-}
-
-/* Computes the final URI for a calendar component */
-static char *
-get_data_uri (const char *uri, CalComponentVType vtype)
-{
- if (uri) {
- if (vtype == CAL_COMPONENT_EVENT)
- return g_concat_dir_and_file (uri, "calendar.ics");
- else if (vtype == CAL_COMPONENT_TODO)
- return g_concat_dir_and_file (uri, "tasks.ics");
- else
- g_assert_not_reached ();
- } else {
- if (vtype == CAL_COMPONENT_EVENT)
- return g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Calendar/calendar.ics");
- else if (vtype == CAL_COMPONENT_TODO)
- return g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Tasks/tasks.ics");
- else
- g_assert_not_reached ();
- }
-
- return NULL;
-}
-
-/* Creates a calendar component at a specified URI. If the URI is NULL then it
- * uses the default folder for that type of component.
- */
-static void
-create_component (const char *uri, CalComponentVType vtype)
-{
- char *real_uri;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjType corba_type;
- GNOME_Evolution_Calendar_CompEditorFactory factory;
-
- real_uri = get_data_uri (uri, vtype);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- corba_type = GNOME_Evolution_Calendar_TYPE_EVENT;
- break;
-
- case CAL_COMPONENT_TODO:
- corba_type = GNOME_Evolution_Calendar_TYPE_TODO;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- /* Get the factory */
-
- CORBA_exception_init (&ev);
- factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory",
- 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("create_component(): Could not activate the component editor factory");
- CORBA_exception_free (&ev);
- g_free (real_uri);
- return;
- }
- CORBA_exception_free (&ev);
-
- /* Create the item */
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_CompEditorFactory_editNew (factory, real_uri, corba_type, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("create_component(): Exception while creating the component");
-
- CORBA_exception_free (&ev);
- g_free (real_uri);
-
- /* Get rid of the factory */
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (factory, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("create_component(): Could not unref the calendar component factory");
-
- CORBA_exception_free (&ev);
-}
-
-/* Callback used when we must create a user-creatable item */
-static void
-sc_user_create_new_item_cb (EvolutionShellComponent *shell_component,
- const char *id,
- const char *parent_folder_physical_uri,
- const char *parent_folder_type)
-{
- if (strcmp (id, CREATE_EVENT_ID) == 0) {
- if (strcmp (parent_folder_type, FOLDER_CALENDAR) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_EVENT);
- else
- create_component (NULL, CAL_COMPONENT_EVENT);
- } else if (strcmp (id, CREATE_TASK_ID) == 0) {
- if (strcmp (parent_folder_type, FOLDER_TASKS) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_TODO);
- else
- create_component (NULL, CAL_COMPONENT_TODO);
- } else
- g_assert_not_reached ();
-}
-
-
-/* The factory function. */
-
-static BonoboObject *
-create_object (void)
-{
- EvolutionShellComponent *shell_component;
- CalendarOfflineHandler *offline_handler;
-
- shell_component = evolution_shell_component_new (folder_types,
- NULL,
- create_view,
- create_folder,
- remove_folder,
- xfer_folder,
- NULL, /* populate_folder_context_menu_fn */
- NULL, /* get_dnd_selection_fn */
- NULL /* closure */);
-
- /* Offline handler */
- offline_handler = calendar_offline_handler_new ();
- bonobo_object_add_interface (BONOBO_OBJECT (shell_component),
- BONOBO_OBJECT (offline_handler));
-
- 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);
-
- /* User creatable items */
-
- evolution_shell_component_add_user_creatable_item (shell_component,
- CREATE_EVENT_ID,
- _("Create a new appointment"),
- _("New _Appointment"),
- 'a');
-
- evolution_shell_component_add_user_creatable_item (shell_component,
- CREATE_TASK_ID,
- _("Create a new task"),
- _("New _Task"),
- 't');
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
- GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL);
-
- return BONOBO_OBJECT (shell_component);
-}
-
-
-void
-component_factory_init (void)
-{
- BonoboObject *object;
- int result;
-
- object = create_object ();
-
- result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object));
-
- if (result == OAF_REG_ERROR)
- g_error ("Cannot initialize Evolution's calendar component.");
-}
diff --git a/calendar/gui/calendar-component.h b/calendar/gui/calendar-component.h
deleted file mode 100644
index b0d295bc16..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 Ximian, 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 995eac2fb3..0000000000
--- a/calendar/gui/calendar-config.c
+++ /dev/null
@@ -1,909 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Ximian, 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 <time.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-config.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
-#include "component-factory.h"
-#include "calendar-commands.h"
-#include "e-tasks.h"
-#include "calendar-config.h"
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-typedef struct
-{
- gchar *timezone;
- 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;
- char *tasks_due_today_color;
- char *tasks_overdue_color;
- gboolean hide_completed_tasks;
- CalUnits hide_completed_tasks_units;
- gint hide_completed_tasks_value;
- gboolean confirm_delete;
-} CalendarConfig;
-
-
-static CalendarConfig *config = NULL;
-
-static void config_read (void);
-
-static void on_timezone_set (GnomeDialog *dialog,
- int button,
- ETimezoneDialog *etd);
-static gboolean on_timezone_dialog_delete_event (GnomeDialog *dialog,
- GdkEvent *event,
- ETimezoneDialog *etd);
-
-void
-calendar_config_init (void)
-{
- if (config)
- return;
-
- config = g_new0 (CalendarConfig, 1);
-
- config_read ();
-}
-
-/* Returns TRUE if the locale has 'am' and 'pm' strings defined, in which
- case the user can choose between 12 and 24-hour time formats. */
-gboolean
-calendar_config_locale_supports_12_hour_format (void)
-{
- char s[16];
- time_t t = 0;
-
- strftime (s, sizeof s, "%p", gmtime (&t));
- return s[0] != '\0';
-}
-
-static void
-config_read (void)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- char *units;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- config->timezone = bonobo_config_get_string (db,
- "/Calendar/Display/Timezone", NULL);
-
- config->working_days = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/WorkingDays", CAL_MONDAY | CAL_TUESDAY |
- CAL_WEDNESDAY | CAL_THURSDAY | CAL_FRIDAY, NULL);
-
- config->week_start_day = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/WeekStartDay", 1, NULL);
-
- /* If the locale defines 'am' and 'pm' strings then the user has the
- choice of 12-hour or 24-hour time format, with 12-hour as the
- default. If the locale doesn't have 'am' and 'pm' strings we have
- to use 24-hour format, or strftime()/strptime() won't work. */
- if (calendar_config_locale_supports_12_hour_format ()) {
- config->use_24_hour_format = bonobo_config_get_boolean_with_default (db, "/Calendar/Display/Use24HourFormat", FALSE, NULL);
- } else {
- config->use_24_hour_format = TRUE;
- }
-
- config->week_start_day = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/WeekStartDay", 1, NULL);
-
- config->day_start_hour = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/DayStartHour", 9, NULL);
-
- config->day_start_minute = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/DayStartMinute", 0, NULL);
-
- config->day_end_hour = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/DayEndHour", 17, NULL);
-
- config->day_end_minute = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/DayEndMinute", 0, NULL);
-
- config->time_divisions = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/TimeDivisions", 30, NULL);
-
- config->view = bonobo_config_get_long_with_default (db,
- "/Calendar/Display/View", 0, NULL);
-
- config->hpane_pos = bonobo_config_get_float_with_default (db,
- "/Calendar/Display/HPanePosition", 1.0, NULL);
-
- config->vpane_pos = bonobo_config_get_float_with_default (db,
- "/Calendar/Display/VPanePosition", 1.0, NULL);
-
- config->month_hpane_pos = bonobo_config_get_float_with_default (db,
- "/Calendar/Display/MonthHPanePosition", 0.0, NULL);
-
- config->month_vpane_pos = bonobo_config_get_float_with_default (db,
- "/Calendar/Display/MonthVPanePosition", 1.0, NULL);
-
- config->compress_weekend = bonobo_config_get_boolean_with_default (db,
- "/Calendar/Display/CompressWeekend", TRUE, NULL);
-
- config->show_event_end = bonobo_config_get_boolean_with_default (db,
- "/Calendar/Display/ShowEventEndTime", TRUE, NULL);
-
- /* 'DateNavigator' settings. */
-
- config->dnav_show_week_no = bonobo_config_get_boolean_with_default (db,
- "/Calendar/DateNavigator/ShowWeekNumbers", FALSE, NULL);
-
- /* Task list settings */
-
- config->tasks_due_today_color = bonobo_config_get_string_with_default (
- db, "/Calendar/Tasks/Colors/TasksDueToday", "blue", NULL);
-
- config->tasks_overdue_color = bonobo_config_get_string_with_default (
- db, "/Calendar/Tasks/Colors/TasksOverdue", "red", NULL);
-
- config->hide_completed_tasks = bonobo_config_get_boolean_with_default (
- db, "/Calendar/Tasks/HideCompletedTasks", FALSE, NULL);
-
- units = bonobo_config_get_string_with_default (db,
- "/Calendar/Tasks/HideCompletedTasksUnits", "days", NULL);
-
- if (!strcmp (units, "minutes"))
- config->hide_completed_tasks_units = CAL_MINUTES;
- else if (!strcmp (units, "hours"))
- config->hide_completed_tasks_units = CAL_HOURS;
- else
- config->hide_completed_tasks_units = CAL_DAYS;
-
- config->hide_completed_tasks_value = bonobo_config_get_long_with_default (
- db, "/Calendar/Tasks/HideCompletedTasksValue", 1, NULL);
-
- config->confirm_delete = bonobo_config_get_boolean_with_default (
- db, "/Calendar/Other/ConfirmDelete", TRUE, NULL);
-
- bonobo_object_release_unref (db, NULL);
-}
-
-
-void
-calendar_config_write (void)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- char *units;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return;
- }
-
- if (config->timezone)
- bonobo_config_set_string (db, "/Calendar/Display/Timezone",
- config->timezone, NULL);
-
- bonobo_config_set_long (db, "/Calendar/Display/WorkingDays",
- config->working_days, NULL);
- bonobo_config_set_boolean (db, "/Calendar/Display/Use24HourFormat",
- config->use_24_hour_format, NULL);
- bonobo_config_set_long (db, "/Calendar/Display/WeekStartDay",
- config->week_start_day, NULL);
- bonobo_config_set_long (db, "/Calendar/Display/DayStartHour",
- config->day_start_hour, NULL);
- bonobo_config_set_long (db, "/Calendar/Display/DayStartMinute",
- config->day_start_minute, NULL);
- bonobo_config_set_long (db, "/Calendar/Display/DayEndHour",
- config->day_end_hour, NULL);
- bonobo_config_set_long (db, "/Calendar/Display/DayEndMinute",
- config->day_end_minute, NULL);
- bonobo_config_set_boolean (db, "/Calendar/Display/CompressWeekend",
- config->compress_weekend, NULL);
- bonobo_config_set_boolean (db, "/Calendar/Display/ShowEventEndTime",
- config->show_event_end, NULL);
-
- bonobo_config_set_boolean (db,
- "/Calendar/DateNavigator/ShowWeekNumbers",
- config->dnav_show_week_no, NULL);
-
- bonobo_config_set_string (db, "/Calendar/Tasks/Colors/TasksDueToday",
- config->tasks_due_today_color, NULL);
-
- bonobo_config_set_string (db, "/Calendar/Tasks/Colors/TasksOverdue",
- config->tasks_overdue_color, NULL);
-
- bonobo_config_set_boolean (db, "/Calendar/Tasks/HideCompletedTasks",
- config->hide_completed_tasks, NULL);
-
- if (config->hide_completed_tasks_units == CAL_MINUTES)
- units = "minutes";
- else if (config->hide_completed_tasks_units == CAL_HOURS)
- units = "hours";
- else
- units = "days";
- bonobo_config_set_string (db,
- "/Calendar/Tasks/HideCompletedTasksUnits",
- units, NULL);
- bonobo_config_set_long (db,
- "/Calendar/Tasks/HideCompletedTasksValue",
- config->hide_completed_tasks_value, NULL);
-
- bonobo_config_set_boolean (db, "/Calendar/Other/ConfirmDelete", config->confirm_delete, NULL);
-
- Bonobo_ConfigDatabase_sync (db, &ev);
-
- bonobo_object_release_unref (db, NULL);
-
- CORBA_exception_free (&ev);
-}
-
-void
-calendar_config_write_on_exit (void)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return;
- }
-
- bonobo_config_set_long (db, "/Calendar/Display/View",
- config->view, NULL);
- bonobo_config_set_long (db, "/Calendar/Display/TimeDivisions",
- config->time_divisions, NULL);
- bonobo_config_set_float (db, "/Calendar/Display/HPanePosition",
- config->hpane_pos, NULL);
- bonobo_config_set_float (db, "/Calendar/Display/VPanePosition",
- config->vpane_pos, NULL);
- bonobo_config_set_float (db, "/Calendar/Display/MonthHPanePosition",
- config->month_hpane_pos, NULL);
- bonobo_config_set_float (db, "/Calendar/Display/MonthVPanePosition",
- config->month_vpane_pos, NULL);
-
- Bonobo_ConfigDatabase_sync (db, &ev);
-
- bonobo_object_release_unref (db, NULL);
-
- CORBA_exception_free (&ev);
-}
-
-
-/*
- * Calendar Settings.
- */
-
-/* The current timezone, e.g. "Europe/London". It may be NULL, in which case
- you should assume UTC (though Evolution will show the timezone-setting
- dialog the next time a calendar or task folder is selected). */
-gchar*
-calendar_config_get_timezone (void)
-{
- return config->timezone;
-}
-
-
-/* Sets the timezone. You shouldn't really set it to the empty string or NULL,
- as this means that Evolution will show the timezone-setting dialog to ask
- the user for the timezone. It copies the string. */
-void
-calendar_config_set_timezone (gchar *timezone)
-{
- g_free (config->timezone);
-
- if (timezone && timezone[0])
- config->timezone = g_strdup (timezone);
- else
- config->timezone = NULL;
-}
-
-
-/* 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;
-}
-
-
-/* Settings to hide completed tasks. */
-gboolean
-calendar_config_get_hide_completed_tasks (void)
-{
- return config->hide_completed_tasks;
-}
-
-
-void
-calendar_config_set_hide_completed_tasks (gboolean hide)
-{
- config->hide_completed_tasks = hide;
-}
-
-
-CalUnits
-calendar_config_get_hide_completed_tasks_units (void)
-{
- return config->hide_completed_tasks_units;
-}
-
-
-void
-calendar_config_set_hide_completed_tasks_units (CalUnits units)
-{
- config->hide_completed_tasks_units = units;
-}
-
-
-gint
-calendar_config_get_hide_completed_tasks_value (void)
-{
- return config->hide_completed_tasks_value;
-}
-
-
-void
-calendar_config_set_hide_completed_tasks_value (gint value)
-{
- config->hide_completed_tasks_value = value;
-}
-
-/**
- * calendar_config_get_confirm_delete:
- *
- * Queries the configuration value for whether a confirmation dialog is
- * presented when deleting calendar/tasks items.
- *
- * Return value: Whether confirmation is required when deleting items.
- **/
-gboolean
-calendar_config_get_confirm_delete (void)
-{
- return config->confirm_delete;
-}
-
-/**
- * calendar_config_set_confirm_delete:
- * @confirm: Whether confirmation is required when deleting items.
- *
- * Sets the configuration value for whether a confirmation dialog is presented
- * when deleting calendar/tasks items.
- **/
-void
-calendar_config_set_confirm_delete (gboolean confirm)
-{
- config->confirm_delete = confirm;
-}
-
-
-/* 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, and whether we
- use 24 hour format. */
-void
-calendar_config_configure_e_date_edit (EDateEdit *dedit)
-{
- gboolean dnav_show_week_no, use_24_hour;
- gint week_start_day;
-
- 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 ();
-
- 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);
-}
-
-
-/* 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++;
-
- e_cell_date_edit_freeze (ecde);
- gtk_object_set (GTK_OBJECT (ecde),
- "use_24_hour_format", use_24_hour,
-#if 0
- /* We use the default 0 - 24 now. */
- "lower_hour", start_hour,
- "upper_hour", end_hour,
-#endif
- 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;
- char *location;
- icaltimezone *zone;
-
- 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);
-
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- calendar_model_set_timezone (model, zone);
-
- calendar_config_configure_e_cell_date_edit (cal_table->dates_cell);
-
- /* Reload the event/tasks, since the 'Hide Completed Tasks' option
- may have been changed, so the query needs to be updated. */
- calendar_model_refresh (model);
-
- /* This is for changing the colors of the text; they will be re-fetched
- * by ECellText when the table is redrawn.
- */
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-
-
-void
-calendar_config_check_timezone_set ()
-{
- ETimezoneDialog *timezone_dialog;
- GtkWidget *dialog;
- GList *elem;
- char *zone;
-
- zone = calendar_config_get_timezone ();
- if (zone && zone[0])
- return;
-
- /* Show timezone dialog. */
- timezone_dialog = e_timezone_dialog_new ();
- dialog = e_timezone_dialog_get_toplevel (timezone_dialog);
-
- /* Hide the cancel button, which is the 2nd button. */
- elem = g_list_nth (GNOME_DIALOG (dialog)->buttons, 1);
- gtk_widget_hide (elem->data);
-
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked",
- GTK_SIGNAL_FUNC (on_timezone_set),
- timezone_dialog);
- gtk_signal_connect (GTK_OBJECT (dialog), "delete-event",
- GTK_SIGNAL_FUNC (on_timezone_dialog_delete_event),
- timezone_dialog);
-
- gtk_widget_show (dialog);
-}
-
-
-static void
-on_timezone_set (GnomeDialog *dialog,
- int button,
- ETimezoneDialog *etd)
-{
- char *display_name;
-
- e_timezone_dialog_get_timezone (etd, &display_name);
-
- g_print ("Location: %s\n", display_name ? display_name : "");
-
- if (display_name && display_name[0]) {
- calendar_config_set_timezone (display_name);
-
- calendar_config_write ();
- update_all_config_settings ();
- e_tasks_update_all_config_settings ();
- }
-
- gtk_object_unref (GTK_OBJECT (etd));
-}
-
-
-static gboolean
-on_timezone_dialog_delete_event (GnomeDialog *dialog,
- GdkEvent *event,
- ETimezoneDialog *etd)
-{
- gtk_object_unref (GTK_OBJECT (etd));
- return TRUE;
-}
-
-
-/**
- * calendar_config_get_tasks_due_today_color:
- *
- * Queries the color to be used to display tasks that are due today.
- *
- * Return value: An X color specification.
- **/
-const char *
-calendar_config_get_tasks_due_today_color (void)
-{
- g_assert (config->tasks_due_today_color != NULL);
- return config->tasks_due_today_color;
-}
-
-/**
- * calendar_config_set_tasks_due_today_color:
- * @color: X color specification
- *
- * Sets the color to be used to display tasks that are due today.
- **/
-void
-calendar_config_set_tasks_due_today_color (const char *color)
-{
- g_return_if_fail (color != NULL);
-
- g_assert (config->tasks_due_today_color != NULL);
-
- g_free (config->tasks_due_today_color);
- config->tasks_due_today_color = g_strdup (color);
-}
-
-/**
- * calendar_config_get_tasks_overdue_color:
- *
- * Queries the color to be used to display overdue tasks.
- *
- * Return value: An X color specification.
- **/
-const char *
-calendar_config_get_tasks_overdue_color (void)
-{
- g_assert (config->tasks_overdue_color != NULL);
- return config->tasks_overdue_color;
-}
-
-/**
- * calendar_config_set_tasks_overdue_color:
- * @color: X color specification
- *
- * Sets the color to be used to display overdue tasks.
- **/
-void
-calendar_config_set_tasks_overdue_color (const char *color)
-{
- g_return_if_fail (color != NULL);
-
- g_assert (config->tasks_overdue_color != NULL);
-
- g_free (config->tasks_overdue_color);
- config->tasks_overdue_color = g_strdup (color);
-}
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
deleted file mode 100644
index dac55611d1..0000000000
--- a/calendar/gui/calendar-config.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Ximian, 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;
-
-
-/* Units for settings. */
-typedef enum
-{
- CAL_DAYS,
- CAL_HOURS,
- CAL_MINUTES
-} CalUnits;
-
-
-void calendar_config_init (void);
-void calendar_config_write (void);
-void calendar_config_write_on_exit (void);
-
-
-/*
- * Calendar Settings.
- */
-
-/* The current timezone, e.g. "Europe/London". */
-gchar* calendar_config_get_timezone (void);
-void calendar_config_set_timezone (gchar *timezone);
-
-/* 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);
-
-/* Colors for the task list */
-const char *calendar_config_get_tasks_due_today_color (void);
-void calendar_config_set_tasks_due_today_color (const char *color);
-
-const char *calendar_config_get_tasks_overdue_color (void);
-void calendar_config_set_tasks_overdue_color (const char *color);
-
-/* Settings to hide completed tasks. */
-gboolean calendar_config_get_hide_completed_tasks (void);
-void calendar_config_set_hide_completed_tasks (gboolean hide);
-
-CalUnits calendar_config_get_hide_completed_tasks_units(void);
-void calendar_config_set_hide_completed_tasks_units(CalUnits units);
-
-gint calendar_config_get_hide_completed_tasks_value(void);
-void calendar_config_set_hide_completed_tasks_value(gint value);
-
-/* Confirmation options */
-gboolean calendar_config_get_confirm_delete (void);
-void calendar_config_set_confirm_delete (gboolean confirm);
-
-
-/* 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);
-
-/* Shows the timezone dialog if the user hasn't set a default timezone. */
-void calendar_config_check_timezone_set (void);
-
-/* Returns TRUE if the locale has 'am' and 'pm' strings defined, i.e. it
- supports 12-hour time format. */
-gboolean calendar_config_locale_supports_12_hour_format(void);
-
-#endif /* _CALENDAR_CONFIG_H_ */
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
deleted file mode 100644
index c83d29d04d..0000000000
--- a/calendar/gui/calendar-model.c
+++ /dev/null
@@ -1,2403 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, 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>
-
-#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-commands.h"
-#include "calendar-config.h"
-#include "itip-utils.h"
-#include "calendar-model.h"
-
-/* This specifies how often we refresh the list, so that completed tasks are
- hidden according to the config setting, and overdue tasks change color etc.
- It is in milliseconds, so this is 10 minutes.
- Note that if the user is editing an item in the list, they will probably
- lose their edit, so this isn't ideal. */
-#define CALENDAR_MODEL_REFRESH_TIMEOUT 1000 * 60 * 10
-
-/* Private part of the ECalendarModel structure */
-struct _CalendarModelPrivate {
- /* Calendar client we are using */
- CalClient *client;
-
- /* Types of objects we are dealing with */
- CalObjType type;
-
- /* S-expression for query and the query object */
- char *sexp;
- CalQuery *query;
-
- /* 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;
-
- /* Addresses for determining icons */
- GList *addresses;
-
- /* The current timezone. */
- icaltimezone *zone;
-
- /* The id of our timeout function for refreshing the list. */
- gint timeout_id;
-};
-
-
-
-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 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 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);
-
- 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;
-}
-
-
-static gboolean
-calendar_model_timeout_cb (gpointer data)
-{
- CalendarModel *model;
-
- g_return_val_if_fail (IS_CALENDAR_MODEL (data), FALSE);
-
- model = CALENDAR_MODEL (data);
-
- GDK_THREADS_ENTER ();
-
- calendar_model_refresh (model);
-
- GDK_THREADS_LEAVE ();
- return TRUE;
-}
-
-
-/* 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->sexp = g_strdup ("#t"); /* match all by default */
- priv->query = NULL;
-
- 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->timeout_id = g_timeout_add (CALENDAR_MODEL_REFRESH_TIMEOUT,
- calendar_model_timeout_cb, model);
-
- priv->addresses = itip_addresses_get ();
-
- priv->zone = NULL;
-}
-
-/* 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;
-
- if (priv->timeout_id) {
- g_source_remove (priv->timeout_id);
- priv->timeout_id = 0;
- }
-
- /* 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;
- }
-
- if (priv->sexp) {
- g_free (priv->sexp);
- priv->sexp = NULL;
- }
-
- if (priv->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->query), model);
- gtk_object_unref (GTK_OBJECT (priv->query));
- priv->query = 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);
-
- itip_addresses_free (priv->addresses);
-
- /* 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;
- struct icaltimetype tt;
-
- if (*t <= 0) {
- buffer[0] = '\0';
- } else {
- /* Note that although the property may be in a different
- timezone, we convert it to the current timezone to display
- it in the table. If the user actually edits the value,
- it will be set to the current timezone. See set_datetime. */
- tt = icaltime_from_timet_with_zone (*t, FALSE,
- model->priv->zone);
- tmp_tm.tm_year = tt.year - 1900;
- tmp_tm.tm_mon = tt.month - 1;
- tmp_tm.tm_mday = tt.day;
- tmp_tm.tm_hour = tt.hour;
- tmp_tm.tm_min = tt.minute;
- tmp_tm.tm_sec = tt.second;
- tmp_tm.tm_isdst = -1;
-
- tmp_tm.tm_wday = time_day_of_week (tt.day, tt.month - 1,
- tt.year);
-
- 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_PRIVATE:
- return _("Private");
-
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- return _("Confidential");
-
- default:
- return _("Public");
- }
-}
-
-/* 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 {
- /* Note that COMPLETED is stored in UTC, though we show it in
- the current timezone. */
- t = icaltime_as_timet_with_zone (*completed, icaltimezone_get_utc_timezone ());
- 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 {
- CalClientGetStatus status;
- icaltimezone *zone;
-
- /* FIXME: TIMEZONES: Handle error. */
- status = cal_client_get_timezone (model->priv->client, dt.tzid,
- &zone);
- t = icaltime_as_timet_with_zone (*dt.value, zone);
- }
-
- 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) {
- retval = cal_util_priority_to_string (*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);
-
- if (transp == CAL_COMPONENT_TRANSP_TRANSPARENT)
- return _("Free");
- else
- return _("Busy");
-}
-
-/* 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
-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 component is overdue. Sigh, this is very similar to
- * get_color() below.
- */
-static gboolean
-is_overdue (CalendarModel *model, 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 {
- struct icaltimetype now_tt;
- CalClientGetStatus status;
- icaltimezone *zone;
-
- /* Second, is it already completed? */
-
- if (is_complete (comp)) {
- retval = FALSE;
- goto out;
- }
-
- /* Third, are we overdue as of right now? */
-
- /* Get the current time in the same timezone as the DUE date.*/
- /* FIXME: TIMEZONES: Handle error. */
- status = cal_client_get_timezone (model->priv->client, dt.tzid,
- &zone);
- now_tt = icaltime_current_time_with_zone (zone);
-
- if (icaltime_compare (*dt.value, now_tt) <= 0)
- retval = TRUE;
- else
- retval = FALSE;
- }
-
- out:
-
- cal_component_free_datetime (&dt);
-
- return retval;
-}
-
-/* Computes the color to be used to display a component */
-static const char *
-get_color (CalendarModel *model, CalComponent *comp)
-{
- CalComponentDateTime dt;
- const char *retval;
-
- cal_component_get_due (comp, &dt);
-
- /* First, do we have a due date? */
-
- if (!dt.value)
- retval = NULL;
- else {
- struct icaltimetype now_tt;
- CalClientGetStatus status;
- icaltimezone *zone;
-
- /* Second, is it already completed? */
-
- if (is_complete (comp)) {
- retval = NULL;
- goto out;
- }
-
- /* Third, is it due today? */
-
- /* Get the current time in the same timezone as the DUE date.*/
- /* FIXME: TIMEZONES: Handle error. */
- status = cal_client_get_timezone (model->priv->client, dt.tzid,
- &zone);
- now_tt = icaltime_current_time_with_zone (zone);
-
- if (icaltime_compare_date_only (*dt.value, now_tt) == 0) {
- retval = calendar_config_get_tasks_due_today_color ();
- goto out;
- }
-
- /* Fourth, are we overdue as of right now? We use <= in the
- * comparison below so that the table entries change color
- * immediately.
- */
-
- if (icaltime_compare (*dt.value, now_tt) <= 0)
- retval = calendar_config_get_tasks_overdue_color ();
- else
- retval = NULL;
- }
-
- 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:
- {
- ItipAddress *ia;
- CalComponentOrganizer organizer;
- GSList *attendees = NULL, *sl;
- gint retval = 0;
-
- if (cal_component_has_recurrences (comp))
- return GINT_TO_POINTER (1);
-
- cal_component_get_organizer (comp, &organizer);
- if (organizer.value != NULL) {
- GList *l;
- const char *text = itip_strip_mailto (organizer.value);
-
- for (l = priv->addresses; l != NULL; l = l->next) {
- ia = l->data;
-
- if (!strcmp (text, ia->address)) {
- retval = 3;
- goto cleanup;
- }
- }
- }
-
- cal_component_get_attendee_list (comp, &attendees);
- for (sl = attendees; sl != NULL; sl = sl->next) {
- CalComponentAttendee *ca = sl->data;
- const char *text;
- GList *l;
-
- text = itip_strip_mailto (ca->value);
- for (l = priv->addresses; l != NULL; l = l->next) {
- ia = l->data;
-
- if (!strcmp (text, ia->address)) {
- if (ca->delto != NULL)
- retval = 3;
- else
- retval = 2;
- goto cleanup;
- }
- }
- }
-
- cleanup:
- cal_component_free_attendee_list (attendees);
- return GINT_TO_POINTER (retval);
- break;
- }
- case CAL_COMPONENT_FIELD_COMPLETE:
- return GINT_TO_POINTER (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 (is_overdue (model, comp));
-
- case CAL_COMPONENT_FIELD_COLOR:
- return (void *) get_color (model, comp);
-
- case CAL_COMPONENT_FIELD_STATUS:
- return get_status (comp);
-
- case CAL_COMPONENT_FIELD_COMPONENT:
- return comp;
-
- default:
- g_message ("calendar_model_value_at(): Requested invalid column %d", col);
- g_assert_not_reached ();
- 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);
- /* We are only using this as an example, so the timezone doesn't
- matter. */
- 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);
-}
-
-
-static void
-set_classification (CalComponent *comp,
- const char *value)
-{
- CalComponentClassification classif;
-
- if (!g_strcasecmp (value, _("Private")))
- classif = CAL_COMPONENT_CLASS_PRIVATE;
- else if (!g_strcasecmp (value, _("Confidential")))
- classif = CAL_COMPONENT_CLASS_CONFIDENTIAL;
- else
- classif = CAL_COMPONENT_CLASS_PUBLIC;
-
- 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 {
- struct icaltimetype itt = icaltime_null_time ();
-
- itt.year = tmp_tm.tm_year + 1900;
- itt.month = tmp_tm.tm_mon + 1;
- itt.day = tmp_tm.tm_mday;
- itt.hour = tmp_tm.tm_hour;
- itt.minute = tmp_tm.tm_min;
- itt.second = tmp_tm.tm_sec;
-
- /* We assume that COMPLETED is entered in the current timezone,
- even though it gets stored in UTC. */
- t = icaltime_as_timet_with_zone (itt, model->priv->zone);
-
- 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;
-
- 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 = icaltime_null_time ();
-
- itt.year = tmp_tm.tm_year + 1900;
- itt.month = tmp_tm.tm_mon + 1;
- itt.day = tmp_tm.tm_mday;
- itt.hour = tmp_tm.tm_hour;
- itt.minute = tmp_tm.tm_min;
- itt.second = tmp_tm.tm_sec;
-
- dt.value = &itt;
- /* FIXME: We assume it is being set to the current timezone.
- Is that OK? */
- dt.tzid = icaltimezone_get_tzid (model->priv->zone);
-
- (* 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);
-}
-
-/* Sets the priority of a calendar component */
-static void
-set_priority (CalComponent *comp, const char *value)
-{
- int priority;
-
- priority = cal_util_priority_from_string (value);
- /* If the priority is invalid (which should never happen) output a
- warning and set it to undefined. */
- if (priority == -1) {
- g_warning ("Invalid priority");
- priority = 0;
- }
-
- 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);
-}
-
-/* Sets the transparency of a calendar component */
-static void
-set_transparency (CalComponent *comp, const char *value)
-{
- CalComponentTransparency transp;
-
- if (!g_strcasecmp (value, _("Free")))
- transp = CAL_COMPONENT_TRANSP_TRANSPARENT;
- else
- transp = CAL_COMPONENT_TRANSP_OPAQUE;
-
- 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);
- 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);
- g_assert_not_reached ();
- return;
- }
-
- 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!");
- }
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* 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;
-
- case CAL_COMPONENT_FIELD_COMPONENT: {
- CalComponent *comp;
-
- comp = CAL_COMPONENT (value);
- gtk_object_ref (GTK_OBJECT (comp));
- return comp;
- }
-
- 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:
- if (value)
- g_free (value);
- break;
-
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- break;
-
- 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:
- if (value)
- g_free (value);
- break;
-
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- break;
-
- case CAL_COMPONENT_FIELD_URL:
- if (value)
- g_free (value);
- break;
-
- 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:
- break;
-
- case CAL_COMPONENT_FIELD_COMPONENT:
- if (value)
- gtk_object_unref (GTK_OBJECT (value));
- break;
-
- default:
- g_message ("calendar_model_free_value(): Requested invalid column %d", col);
- }
-}
-
-/* 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:
- case CAL_COMPONENT_FIELD_COMPONENT:
- 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)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
-
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, TRUE);
-
- model = CALENDAR_MODEL (etm);
- priv = model->priv;
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- /* This could be a hack or not. If the categories field only
- * contains the default category, then it possibly means that
- * the user has not entered anything at all in the click-to-add;
- * the category is in the value because we put it there in
- * calendar_model_initialize_value().
- */
- if (priv->default_category && value && strcmp (priv->default_category, value) == 0)
- return TRUE;
- else
- return string_is_empty (value);
-
- 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:
- case CAL_COMPONENT_FIELD_COMPONENT:
- 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;
-
- case CAL_COMPONENT_FIELD_COMPONENT:
- 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 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)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
- int orig_idx;
- CalComponent *new_comp;
- const char *new_comp_uid;
- int *new_idx;
- CalClientGetStatus status;
-
- 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:
- /* 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);
- }
-
- 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 ();
- }
-}
-
-/* Callback used when a component is removed from the live query */
-static void
-query_obj_removed_cb (CalQuery *query, 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);
-}
-
-/* Callback used when a query ends */
-static void
-query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *error_str, gpointer data)
-{
- CalendarModel *model;
-
- model = CALENDAR_MODEL (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)
-{
- CalendarModel *model;
-
- model = CALENDAR_MODEL (data);
-
- /* FIXME */
-
- fprintf (stderr, "eval error: %s\n", error_str);
-}
-
-/* Builds a complete query sexp for the calendar model by adding the predicates
- * to filter only for the type of objects that the model supports, and
- * whether we want completed tasks.
- */
-static char *
-adjust_query_sexp (CalendarModel *model, const char *sexp)
-{
- CalendarModelPrivate *priv;
- CalObjType type;
- char *type_sexp;
- char *completed_sexp = "";
- gboolean free_completed_sexp = FALSE;
- char *new_sexp;
-
- priv = model->priv;
-
- type = priv->type;
-
- if (!(type & CALOBJ_TYPE_ANY))
- type_sexp = g_strdup ("#t");
- else
- type_sexp = g_strdup_printf (
- "(or %s %s %s)",
- (type & CALOBJ_TYPE_EVENT) ? "(= (get-vtype) \"VEVENT\")" : "",
- (type & CALOBJ_TYPE_TODO) ? "(= (get-vtype) \"VTODO\")" : "",
- (type & CALOBJ_TYPE_JOURNAL) ? "(= (get-vtype) \"VJOURNAL\")" : "");
-
- /* Create a sub-expression for filtering out completed tasks, based on
- the config settings. */
- if (calendar_config_get_hide_completed_tasks ()) {
- CalUnits units;
- gint value;
-
- units = calendar_config_get_hide_completed_tasks_units ();
- value = calendar_config_get_hide_completed_tasks_value ();
-
- if (value == 0) {
- /* If the value is 0, we want to hide completed tasks
- immediately, so we filter out all completed tasks.*/
- completed_sexp = "(not is-completed?)";
- } else {
- char *location, *isodate;
- icaltimezone *zone;
- struct icaltimetype tt;
- time_t t;
-
- /* Get the current time, and subtract the appropriate
- number of days/hours/minutes. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- tt = icaltime_current_time_with_zone (zone);
-
- switch (units) {
- case CAL_DAYS:
- icaltime_adjust (&tt, -value, 0, 0, 0);
- break;
- case CAL_HOURS:
- icaltime_adjust (&tt, 0, -value, 0, 0);
- break;
- case CAL_MINUTES:
- icaltime_adjust (&tt, 0, 0, -value, 0);
- break;
- default:
- g_assert_not_reached ();
- }
-
- t = icaltime_as_timet_with_zone (tt, zone);
-
- /* Convert the time to an ISO date string, and build
- the query sub-expression. */
- isodate = isodate_from_time_t (t);
- completed_sexp = g_strdup_printf ("(not (completed-before? (make-time \"%s\")))", isodate);
- free_completed_sexp = TRUE;
- }
- }
-
- new_sexp = g_strdup_printf ("(and %s %s %s)", type_sexp,
- completed_sexp, sexp);
- g_free (type_sexp);
- if (free_completed_sexp)
- g_free (completed_sexp);
-
-#if 0
- g_print ("Calendar model sexp:\n%s\n", new_sexp);
-#endif
-
- return new_sexp;
-}
-
-/* Restarts a query */
-static void
-update_query (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
- CalQuery *old_query;
- char *real_sexp;
-
- priv = model->priv;
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
- free_objects (model);
- e_table_model_changed (E_TABLE_MODEL (model));
-
- if (!(priv->client
- && cal_client_get_load_state (priv->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- old_query = priv->query;
- priv->query = NULL;
-
- if (old_query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), model);
- gtk_object_unref (GTK_OBJECT (old_query));
- }
-
- g_assert (priv->sexp != NULL);
- real_sexp = adjust_query_sexp (model, priv->sexp);
-
- priv->query = cal_client_get_query (priv->client, real_sexp);
- g_free (real_sexp);
-
- if (!priv->query) {
- g_message ("update_query(): Could not create the query");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (priv->query), "obj_updated",
- GTK_SIGNAL_FUNC (query_obj_updated_cb), model);
- gtk_signal_connect (GTK_OBJECT (priv->query), "obj_removed",
- GTK_SIGNAL_FUNC (query_obj_removed_cb), model);
- gtk_signal_connect (GTK_OBJECT (priv->query), "query_done",
- GTK_SIGNAL_FUNC (query_query_done_cb), model);
- gtk_signal_connect (GTK_OBJECT (priv->query), "eval_error",
- GTK_SIGNAL_FUNC (query_eval_error_cb), 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);
-
- if (status != CAL_CLIENT_OPEN_SUCCESS)
- return;
-
- update_query (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;
-}
-
-/**
- * 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;
-
- 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));
- }
-
- priv->client = client;
- priv->type = type;
-
- if (priv->client) {
- if (cal_client_get_load_state (priv->client) == CAL_CLIENT_LOAD_LOADED)
- update_query (model);
- else
- gtk_signal_connect (GTK_OBJECT (priv->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), model);
- }
-}
-
-/**
- * calendar_model_set_query:
- * @model: A calendar model.
- * @sexp: Sexp that defines the query.
- *
- * Sets the query sexp that a calendar model will use to filter its contents.
- **/
-void
-calendar_model_set_query (CalendarModel *model, const char *sexp)
-{
- CalendarModelPrivate *priv;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_CALENDAR_MODEL (model));
- g_return_if_fail (sexp != NULL);
-
- priv = model->priv;
-
- if (priv->sexp)
- g_free (priv->sexp);
-
- priv->sexp = g_strdup (sexp);
-
- update_query (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 server. */
-static void
-ensure_task_complete (CalComponent *comp,
- time_t completed_date)
-{
- struct icaltimetype *old_completed = NULL;
- 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) {
- icaltimezone *utc_zone;
- struct icaltimetype new_completed;
-
- /* COMPLETED is stored in UTC. */
- utc_zone = icaltimezone_get_utc_timezone ();
- new_completed = icaltime_from_timet_with_zone (completed_date,
- FALSE,
- utc_zone);
- 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,
- const char *default_category)
-{
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- g_free (model->priv->default_category);
- model->priv->default_category = g_strdup (default_category);
-}
-
-
-
-/* The current timezone. */
-icaltimezone*
-calendar_model_get_timezone (CalendarModel *model)
-{
- g_return_val_if_fail (IS_CALENDAR_MODEL (model), NULL);
-
- return model->priv->zone;
-}
-
-
-void
-calendar_model_set_timezone (CalendarModel *model,
- icaltimezone *zone)
-{
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- if (model->priv->zone != zone) {
- model->priv->zone = zone;
-
- /* The timezone affects the times shown for COMPLETED and
- maybe other fields, so we need to redisplay everything. */
- e_table_model_changed (E_TABLE_MODEL (model));
- }
-}
-
-
-/**
- * calendar_model_refresh:
- * @model: A calendar model.
- *
- * Refreshes the calendar model, reloading the events/tasks from the server.
- * Be careful about doing this when the user is editing an event/task.
- **/
-void
-calendar_model_refresh (CalendarModel *model)
-{
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- update_query (model);
-}
diff --git a/calendar/gui/calendar-model.h b/calendar/gui/calendar-model.h
deleted file mode 100644
index 6bda61f49d..0000000000
--- a/calendar/gui/calendar-model.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Ximian, 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;
-};
-
-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_query (CalendarModel *model,
- const char *sexp);
-
-void calendar_model_refresh (CalendarModel *model);
-
-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);
-
-/* The current timezone. */
-icaltimezone* calendar_model_get_timezone (CalendarModel *model);
-void calendar_model_set_timezone (CalendarModel *model,
- icaltimezone *zone);
-
-void calendar_model_set_default_category (CalendarModel *model,
- const char *default_category);
-
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c
deleted file mode 100644
index e804bc8040..0000000000
--- a/calendar/gui/calendar-offline-handler.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-offline-handler.c
- *
- * 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:
- * Ettore Perazzoli <ettore@ximian.com>
- * Dan Winship <danw@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <bonobo/bonobo-exception.h>
-#include <libgnomevfs/gnome-vfs-types.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
-#include <gal/util/e-util.h>
-#include <cal-client/cal-client.h>
-#include "calendar-offline-handler.h"
-
-#define PARENT_TYPE bonobo_x_object_get_type ()
-static BonoboXObjectClass *parent_class = NULL;
-
-struct _CalendarOfflineHandlerPrivate {
- CalClient *client;
-
- GNOME_Evolution_OfflineProgressListener listener_interface;
-
- gboolean is_offline;
-};
-
-static void
-add_connection (gpointer data, gpointer user_data)
-{
- GnomeVFSURI *uri = gnome_vfs_uri_new (data);
- GNOME_Evolution_ConnectionList *list = user_data;
-
- g_return_if_fail (uri != NULL);
-
- list->_buffer[list->_length].hostName
- = CORBA_string_dup (gnome_vfs_uri_get_host_name (uri));
- list->_buffer[list->_length].type
- = CORBA_string_dup (gnome_vfs_uri_get_scheme (uri));
- list->_length++;
-
- gnome_vfs_uri_unref (uri);
-}
-
-static GNOME_Evolution_ConnectionList *
-create_connection_list (CalendarOfflineHandler *offline_handler)
-{
- CalendarOfflineHandlerPrivate *priv;
- GNOME_Evolution_ConnectionList *list;
- GList *uris;
-
- priv = offline_handler->priv;
-
- uris = cal_client_uri_list (priv->client, CAL_MODE_REMOTE);
-
- list = GNOME_Evolution_ConnectionList__alloc ();
- list->_length = 0;
- list->_maximum = g_list_length (uris);
- list->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (list->_maximum);
-
- g_list_foreach (uris, add_connection, list);
-
- return list;
-}
-
-/* GNOME::Evolution::Offline methods. */
-static CORBA_boolean
-impl__get_isOffline (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- return priv->is_offline;
-}
-
-static void
-impl_prepareForOffline (PortableServer_Servant servant,
- GNOME_Evolution_ConnectionList **active_connection_list,
- CORBA_Environment *ev)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- *active_connection_list = create_connection_list (offline_handler);
-}
-
-static void
-update_offline (CalendarOfflineHandler *offline_handler)
-{
- CalendarOfflineHandlerPrivate *priv;
- GNOME_Evolution_ConnectionList *connection_list;
- CORBA_Environment ev;
-
- priv = offline_handler->priv;
-
- connection_list = create_connection_list (offline_handler);
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface,
- connection_list, &ev);
-
- if (BONOBO_EX (&ev))
- g_warning ("Error updating offline progress");
-
- CORBA_exception_free (&ev);
-}
-
-static void
-backend_cal_set_mode (CalClient *client, CalClientSetModeStatus status, CalMode mode, gpointer data)
-{
- CalendarOfflineHandler *offline_handler = data;
-
- update_offline (offline_handler);
-}
-
-static void
-backend_cal_opened (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- CalendarOfflineHandler *offline_handler = data;
-
- if (status != CAL_CLIENT_OPEN_SUCCESS) {
- update_offline (offline_handler);
- gtk_object_unref (GTK_OBJECT (client));
- return;
- }
-
- cal_client_set_mode (client, CAL_MODE_LOCAL);
-
- gtk_signal_connect (GTK_OBJECT (client), "cal_mode_set",
- backend_cal_set_mode, offline_handler);
-}
-
-static void
-backend_go_offline (gpointer data, gpointer user_data)
-{
- CalendarOfflineHandler *offline_handler = user_data;
- char *uri = data;
- CalClient *client;
- gboolean success;
-
- client = cal_client_new ();
- success = cal_client_open_calendar (client, uri, TRUE);
- if (!success) {
- update_offline (offline_handler);
- gtk_object_unref (GTK_OBJECT (client));
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (client), "cal_opened",
- backend_cal_opened, offline_handler);
-}
-
-static void
-impl_goOffline (PortableServer_Servant servant,
- const GNOME_Evolution_OfflineProgressListener progress_listener,
- CORBA_Environment *ev)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
- GList *uris;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- /* To update the status */
- priv->listener_interface = CORBA_Object_duplicate (progress_listener, ev);
-
- uris = cal_client_uri_list (priv->client, CAL_MODE_REMOTE);
-
- g_list_foreach (uris, backend_go_offline, offline_handler);
-}
-
-static void
-impl_goOnline (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-}
-
-/* GtkObject methods. */
-
-static void
-impl_destroy (GtkObject *object)
-{
- CalendarOfflineHandler *offline_handler;
- CalendarOfflineHandlerPrivate *priv;
-
- offline_handler = CALENDAR_OFFLINE_HANDLER (object);
- priv = offline_handler->priv;
-
- if (priv->listener_interface != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- CORBA_Object_release (priv->listener_interface, &ev);
- CORBA_exception_free (&ev);
- }
-
- g_free (priv);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/* GTK+ type initialization. */
-
-static void
-calendar_offline_handler_class_init (CalendarOfflineHandlerClass *klass)
-{
- GtkObjectClass *object_class;
- POA_GNOME_Evolution_Offline__epv *epv;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = impl_destroy;
-
- epv = & klass->epv;
- epv->_get_isOffline = impl__get_isOffline;
- epv->prepareForOffline = impl_prepareForOffline;
- epv->goOffline = impl_goOffline;
- epv->goOnline = impl_goOnline;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-calendar_offline_handler_init (CalendarOfflineHandler *offline_handler)
-{
- CalendarOfflineHandlerPrivate *priv;
-
- priv = g_new (CalendarOfflineHandlerPrivate, 1);
- offline_handler->priv = priv;
-
- priv->client = cal_client_new ();
- priv->listener_interface = CORBA_OBJECT_NIL;
- priv->is_offline = FALSE;
-}
-
-CalendarOfflineHandler *
-calendar_offline_handler_new (void)
-{
- CalendarOfflineHandler *new;
-
- new = gtk_type_new (calendar_offline_handler_get_type ());
-
- return new;
-}
-
-BONOBO_X_TYPE_FUNC_FULL (CalendarOfflineHandler, GNOME_Evolution_Offline, PARENT_TYPE, calendar_offline_handler);
diff --git a/calendar/gui/calendar-offline-handler.h b/calendar/gui/calendar-offline-handler.h
deleted file mode 100644
index e1becb1979..0000000000
--- a/calendar/gui/calendar-offline-handler.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-offline-handler.h
- *
- * 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.
- *
- * Author: Ettore Perazzoli <ettore@ximian.com>
- */
-
-#ifndef _CALENDAR_OFFLINE_HANDLER_H_
-#define _CALENDAR_OFFLINE_HANDLER_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-xobject.h>
-#include "Evolution.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CALENDAR_TYPE_OFFLINE_HANDLER (calendar_offline_handler_get_type ())
-#define CALENDAR_OFFLINE_HANDLER(obj) (GTK_CHECK_CAST ((obj), CALENDAR_TYPE_OFFLINE_HANDLER, CalendarOfflineHandler))
-#define CALENDAR_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CALENDAR_TYPE_OFFLINE_HANDLER, CalendarOfflineHandlerClass))
-#define CALENDAR_IS_OFFLINE_HANDLER(obj) (GTK_CHECK_TYPE ((obj), CALENDAR_TYPE_OFFLINE_HANDLER))
-#define CALENDAR_IS_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), CALENDAR_TYPE_OFFLINE_HANDLER))
-
-
-typedef struct _CalendarOfflineHandler CalendarOfflineHandler;
-typedef struct _CalendarOfflineHandlerPrivate CalendarOfflineHandlerPrivate;
-typedef struct _CalendarOfflineHandlerClass CalendarOfflineHandlerClass;
-
-struct _CalendarOfflineHandler {
- BonoboXObject parent;
-
- CalendarOfflineHandlerPrivate *priv;
-};
-
-struct _CalendarOfflineHandlerClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Offline__epv epv;
-};
-
-
-GtkType calendar_offline_handler_get_type (void);
-CalendarOfflineHandler *calendar_offline_handler_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _CALENDAR_OFFLINE_HANDLER_H_ */
diff --git a/calendar/gui/calendar-summary.c b/calendar/gui/calendar-summary.c
deleted file mode 100644
index 447b72f8e0..0000000000
--- a/calendar/gui/calendar-summary.c
+++ /dev/null
@@ -1,778 +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 Ximian, 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 <gal/widgets/e-unicode.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, *datestr;
- char *tmp, *tmp2;
-
- 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);
- tmp = g_strdup_printf ("<b>%s</b>", datestr);
- ret_html = e_utf8_from_locale_string (tmp);
- g_free (tmp);
- g_free (datestr);
-
- if (summary->appointments) {
- tmp = ret_html;
- tmp2 = e_utf8_from_locale_string (_("Appointments"));
- ret_html = g_strconcat (tmp, "<p align=\"center\">",
- tmp2, "</p><hr><ul>", NULL);
- g_free (tmp);
- g_free (tmp2);
-
- 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;
-
- 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;
- tmp2 = e_utf8_from_locale_string (_("Tasks"));
- ret_html = g_strconcat (tmp, "<p align=\"center\">",
- tmp2, "</p><hr><ul>", NULL);
- g_free (tmp);
- g_free (tmp2);
-
- /* 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;
-
- 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, "www.ximian.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 = e_utf8_from_locale_string (_("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 initialize 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 b15bbb0bb3..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 Ximian, 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/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
deleted file mode 100644
index 23cad04f9c..0000000000
--- a/calendar/gui/calendar-view-factory.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* Evolution calendar - Generic view factory for calendar views
- *
- * 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include "calendar-view-factory.h"
-#include "calendar-view.h"
-
-
-
-/* Private part of the CalendarViewFactory structure */
-struct _CalendarViewFactoryPrivate {
- /* Type of views created by this factory */
- GnomeCalendarViewType view_type;
-};
-
-
-
-static void calendar_view_factory_class_init (CalendarViewFactoryClass *class);
-static void calendar_view_factory_init (CalendarViewFactory *cal_view_factory);
-static void calendar_view_factory_destroy (GtkObject *object);
-
-static const char *calendar_view_factory_get_title (GalViewFactory *factory);
-static const char *calendar_view_factory_get_type_code (GalViewFactory *factory);
-static GalView *calendar_view_factory_new_view (GalViewFactory *factory, const char *name);
-
-static GalViewFactoryClass *parent_class = NULL;
-
-
-
-/**
- * calendar_view_factory_get_type:
- *
- * Registers the #CalendarViewFactory class if necessary, and returns the type
- * ID associated to it.
- *
- * Return value: The type ID of the #CalendarViewFactory class.
- **/
-GtkType
-calendar_view_factory_get_type (void)
-{
- static GtkType calendar_view_factory_type;
-
- if (!calendar_view_factory_type) {
- static const GtkTypeInfo calendar_view_factory_info = {
- "CalendarViewFactory",
- sizeof (CalendarViewFactory),
- sizeof (CalendarViewFactoryClass),
- (GtkClassInitFunc) calendar_view_factory_class_init,
- (GtkObjectInitFunc) calendar_view_factory_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- calendar_view_factory_type = gtk_type_unique (GAL_VIEW_FACTORY_TYPE,
- &calendar_view_factory_info);
- }
-
- return calendar_view_factory_type;
-}
-
-/* Class initialization function for the calendar view factory */
-static void
-calendar_view_factory_class_init (CalendarViewFactoryClass *class)
-{
- GalViewFactoryClass *gal_view_factory_class;
- GtkObjectClass *object_class;
-
- parent_class = gtk_type_class (GAL_VIEW_FACTORY_TYPE);
-
- gal_view_factory_class = (GalViewFactoryClass *) class;
- object_class = (GtkObjectClass *) class;
-
- gal_view_factory_class->get_title = calendar_view_factory_get_title;
- gal_view_factory_class->get_type_code = calendar_view_factory_get_type_code;
- gal_view_factory_class->new_view = calendar_view_factory_new_view;
-
- object_class->destroy = calendar_view_factory_destroy;
-}
-
-/* Object initialization class for the calendar view factory */
-static void
-calendar_view_factory_init (CalendarViewFactory *cal_view_factory)
-{
- CalendarViewFactoryPrivate *priv;
-
- priv = g_new0 (CalendarViewFactoryPrivate, 1);
- cal_view_factory->priv = priv;
-}
-
-/* Destroy method for the calendar view factory */
-static void
-calendar_view_factory_destroy (GtkObject *object)
-{
- CalendarViewFactory *cal_view_factory;
- CalendarViewFactoryPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CALENDAR_VIEW_FACTORY (object));
-
- cal_view_factory = CALENDAR_VIEW_FACTORY (object);
- priv = cal_view_factory->priv;
-
- g_free (priv);
- cal_view_factory->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_title method for the calendar view factory */
-static const char *
-calendar_view_factory_get_title (GalViewFactory *factory)
-{
- CalendarViewFactory *cal_view_factory;
- CalendarViewFactoryPrivate *priv;
-
- cal_view_factory = CALENDAR_VIEW_FACTORY (factory);
- priv = cal_view_factory->priv;
-
- switch (priv->view_type) {
- case GNOME_CAL_DAY_VIEW:
- return _("Day View");
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- return _("Work Week View");
-
- case GNOME_CAL_WEEK_VIEW:
- return _("Week View");
-
- case GNOME_CAL_MONTH_VIEW:
- return _("Month View");
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* get_type_code method for the calendar view factory */
-static const char *
-calendar_view_factory_get_type_code (GalViewFactory *factory)
-{
- CalendarViewFactory *cal_view_factory;
- CalendarViewFactoryPrivate *priv;
-
- cal_view_factory = CALENDAR_VIEW_FACTORY (factory);
- priv = cal_view_factory->priv;
-
- switch (priv->view_type) {
- case GNOME_CAL_DAY_VIEW:
- return "day_view";
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- return "work_week_view";
-
- case GNOME_CAL_WEEK_VIEW:
- return "week_view";
-
- case GNOME_CAL_MONTH_VIEW:
- return "month_view";
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* new_view method for the calendar view factory */
-static GalView *
-calendar_view_factory_new_view (GalViewFactory *factory, const char *name)
-{
- CalendarViewFactory *cal_view_factory;
- CalendarViewFactoryPrivate *priv;
- CalendarView *cal_view;
-
- cal_view_factory = CALENDAR_VIEW_FACTORY (factory);
- priv = cal_view_factory->priv;
-
- cal_view = calendar_view_new (priv->view_type, name);
- return GAL_VIEW (cal_view);
-}
-
-
-
-/**
- * calendar_view_factory_construct:
- * @cal_view_factory: A calendar view factory.
- * @view_type: Type of calendar views that the factory will create.
- *
- * Constructs a calendar view factory by setting the type of views it will
- * create.
- *
- * Return value: The same value as @cal_view_factory.
- **/
-CalendarViewFactory *
-calendar_view_factory_construct (CalendarViewFactory *cal_view_factory,
- GnomeCalendarViewType view_type)
-{
- CalendarViewFactoryPrivate *priv;
-
- g_return_val_if_fail (cal_view_factory != NULL, NULL);
- g_return_val_if_fail (IS_CALENDAR_VIEW_FACTORY (cal_view_factory), NULL);
-
- priv = cal_view_factory->priv;
-
- priv->view_type = view_type;
-
- return cal_view_factory;
-}
-
-/**
- * calendar_view_factory_new:
- * @view_type: Type of calendar views that the factory will create.
- *
- * Creates a new factory for calendar views.
- *
- * Return value: A newly-created calendar view factory.
- **/
-CalendarViewFactory *
-calendar_view_factory_new (GnomeCalendarViewType view_type)
-{
- CalendarViewFactory *cal_view_factory;
-
- cal_view_factory = gtk_type_new (TYPE_CALENDAR_VIEW_FACTORY);
- return calendar_view_factory_construct (cal_view_factory, view_type);
-}
diff --git a/calendar/gui/calendar-view-factory.h b/calendar/gui/calendar-view-factory.h
deleted file mode 100644
index fb87a90dda..0000000000
--- a/calendar/gui/calendar-view-factory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Evolution calendar - Generic view factory for calendar views
- *
- * 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 CALENDAR_VIEW_FACTORY_H
-#define CALENDAR_VIEW_FACTORY_H
-
-#include <libgnome/gnome-defs.h>
-#include <gal/menus/gal-view-factory.h>
-#include "gnome-cal.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_CALENDAR_VIEW_FACTORY (calendar_view_factory_get_type ())
-#define CALENDAR_VIEW_FACTORY(obj) (GTK_CHECK_CAST ((obj), TYPE_CALENDAR_VIEW_FACTORY, \
- CalendarViewFactory))
-#define CALENDAR_VIEW_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
- TYPE_CALENDAR_VIEW_FACTORY, CalendarViewClass))
-#define IS_CALENDAR_VIEW_FACTORY(obj) (GTK_CHECK_TYPE ((obj), TYPE_CALENDAR_VIEW_FACTORY))
-#define IS_CALENDAR_VIEW_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
- TYPE_CALENDAR_VIEW_FACTORY))
-
-typedef struct _CalendarViewFactoryPrivate CalendarViewFactoryPrivate;
-
-typedef struct {
- GalViewFactory factory;
-
- /* Private data */
- CalendarViewFactoryPrivate *priv;
-} CalendarViewFactory;
-
-typedef struct {
- GalViewFactoryClass parent_class;
-} CalendarViewFactoryClass;
-
-GtkType calendar_view_factory_get_type (void);
-
-CalendarViewFactory *calendar_view_factory_construct (CalendarViewFactory *cal_view_factory,
- GnomeCalendarViewType view_type);
-
-CalendarViewFactory *calendar_view_factory_new (GnomeCalendarViewType view_type);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
deleted file mode 100644
index 7a3a2b3fd1..0000000000
--- a/calendar/gui/calendar-view.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/* Evolution calendar - Generic view object for calendar views
- *
- * 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 "calendar-view.h"
-
-
-
-/* Private part of the CalendarView structure */
-struct _CalendarViewPrivate {
- /* Type of the view */
- GnomeCalendarViewType view_type;
-
- /* Title of the view */
- char *title;
-};
-
-
-
-static void calendar_view_class_init (CalendarViewClass *class);
-static void calendar_view_init (CalendarView *cview);
-static void calendar_view_destroy (GtkObject *object);
-
-static void calendar_view_edit (GalView *view);
-static void calendar_view_load (GalView *view, const char *filename);
-static void calendar_view_save (GalView *view, const char *filename);
-static const char *calendar_view_get_title (GalView *view);
-static void calendar_view_set_title (GalView *view, const char *title);
-static const char *calendar_view_get_type_code (GalView *view);
-static GalView *calendar_view_clone (GalView *view);
-
-static GalViewClass *parent_class = NULL;
-
-
-
-/**
- * calendar_view_get_type:
- *
- * Registers the #CalendarView class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CalendarView class.
- **/
-GtkType
-calendar_view_get_type (void)
-{
- static GtkType calendar_view_type;
-
- if (!calendar_view_type) {
- static const GtkTypeInfo calendar_view_info = {
- "CalendarView",
- sizeof (CalendarView),
- sizeof (CalendarViewClass),
- (GtkClassInitFunc) calendar_view_class_init,
- (GtkObjectInitFunc) calendar_view_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- calendar_view_type = gtk_type_unique (GAL_VIEW_TYPE, &calendar_view_info);
- }
-
- return calendar_view_type;
-}
-
-/* Class initialization function for the calendar view */
-static void
-calendar_view_class_init (CalendarViewClass *class)
-{
- GalViewClass *gal_view_class;
- GtkObjectClass *object_class;
-
- parent_class = gtk_type_class (GAL_VIEW_TYPE);
-
- gal_view_class = (GalViewClass *) class;
- object_class = (GtkObjectClass *) class;
-
- gal_view_class->edit = calendar_view_edit;
- gal_view_class->load = calendar_view_load;
- gal_view_class->save = calendar_view_save;
- gal_view_class->get_title = calendar_view_get_title;
- gal_view_class->set_title = calendar_view_set_title;
- gal_view_class->get_type_code = calendar_view_get_type_code;
- gal_view_class->clone = calendar_view_clone;
-
- object_class->destroy = calendar_view_destroy;
-}
-
-/* Object initialization function for the calendar view */
-static void
-calendar_view_init (CalendarView *cal_view)
-{
- CalendarViewPrivate *priv;
-
- priv = g_new0 (CalendarViewPrivate, 1);
- cal_view->priv = priv;
-
- priv->title = NULL;
-}
-
-/* Destroy method for the calendar view */
-static void
-calendar_view_destroy (GtkObject *object)
-{
- CalendarView *cal_view;
- CalendarViewPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CALENDAR_VIEW (object));
-
- cal_view = CALENDAR_VIEW (object);
- priv = cal_view->priv;
-
- if (priv->title) {
- g_free (priv->title);
- priv->title = NULL;
- }
-
- g_free (priv);
- cal_view->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* edit method of the calendar view */
-static void
-calendar_view_edit (GalView *view)
-{
- /* nothing */
-}
-
-/* load method of the calendar view */
-static void
-calendar_view_load (GalView *view, const char *filename)
-{
- /* nothing */
-}
-
-/* save method of the calendar view */
-static void
-calendar_view_save (GalView *view, const char *filename)
-{
- /* nothing */
-}
-
-/* get_title method of the calendar view */
-static const char *
-calendar_view_get_title (GalView *view)
-{
- CalendarView *cal_view;
- CalendarViewPrivate *priv;
-
- cal_view = CALENDAR_VIEW (view);
- priv = cal_view->priv;
-
- return priv->title;
-}
-
-/* set_title method of the calendar view */
-static void
-calendar_view_set_title (GalView *view, const char *title)
-{
- CalendarView *cal_view;
- CalendarViewPrivate *priv;
-
- cal_view = CALENDAR_VIEW (view);
- priv = cal_view->priv;
-
- if (priv->title)
- g_free (priv->title);
-
- priv->title = g_strdup (title);
-}
-
-/* get_type_code method for the calendar view */
-static const char *
-calendar_view_get_type_code (GalView *view)
-{
- CalendarView *cal_view;
- CalendarViewPrivate *priv;
-
- cal_view = CALENDAR_VIEW (view);
- priv = cal_view->priv;
-
- switch (priv->view_type) {
- case GNOME_CAL_DAY_VIEW:
- return "day_view";
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- return "work_week_view";
-
- case GNOME_CAL_WEEK_VIEW:
- return "week_view";
-
- case GNOME_CAL_MONTH_VIEW:
- return "month_view";
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* clone method for the calendar view */
-static GalView *
-calendar_view_clone (GalView *view)
-{
- CalendarView *cal_view;
- CalendarViewPrivate *priv;
- CalendarView *new_view;
- CalendarViewPrivate *new_priv;
-
- cal_view = CALENDAR_VIEW (view);
- priv = cal_view->priv;
-
- new_view = gtk_type_new (TYPE_CALENDAR_VIEW);
- new_priv = new_view->priv;
-
- new_priv->view_type = priv->view_type;
- new_priv->title = g_strdup (priv->title);
-
- return GAL_VIEW (new_view);
-}
-
-
-
-/**
- * calendar_view_construct:
- * @cal_view: A calendar view.
- * @view_type: The type of calendar view that this object will represent.
- * @title: Title for the view.
- *
- * Constructs a calendar view by setting its view type and title.
- *
- * Return value: The same value as @cal_view.
- **/
-CalendarView *
-calendar_view_construct (CalendarView *cal_view,
- GnomeCalendarViewType view_type,
- const char *title)
-{
- CalendarViewPrivate *priv;
-
- g_return_val_if_fail (cal_view != NULL, NULL);
- g_return_val_if_fail (IS_CALENDAR_VIEW (cal_view), NULL);
- g_return_val_if_fail (title != NULL, NULL);
-
- priv = cal_view->priv;
-
- priv->view_type = view_type;
- priv->title = g_strdup (title);
-
- return cal_view;
-}
-
-/**
- * calendar_view_new:
- * @view_type: The type of calendar view that this object will represent.
- * @title: Title for the view.
- *
- * Creates a new calendar view object.
- *
- * Return value: A newly-created calendar view.
- **/
-CalendarView *
-calendar_view_new (GnomeCalendarViewType view_type, const char *title)
-{
- CalendarView *cal_view;
-
- cal_view = gtk_type_new (TYPE_CALENDAR_VIEW);
- return calendar_view_construct (cal_view, view_type, title);
-}
-
-/**
- * calendar_view_get_view_type:
- * @cal_view: A calendar view.
- *
- * Queries the calendar view type of a calendar view.
- *
- * Return value: Type of calendar view.
- **/
-GnomeCalendarViewType
-calendar_view_get_view_type (CalendarView *cal_view)
-{
- CalendarViewPrivate *priv;
-
- g_return_val_if_fail (cal_view != NULL, GNOME_CAL_DAY_VIEW);
- g_return_val_if_fail (IS_CALENDAR_VIEW (cal_view), GNOME_CAL_DAY_VIEW);
-
- priv = cal_view->priv;
- return priv->view_type;
-}
diff --git a/calendar/gui/calendar-view.h b/calendar/gui/calendar-view.h
deleted file mode 100644
index f0bf0bcbfd..0000000000
--- a/calendar/gui/calendar-view.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Evolution calendar - Generic view object for calendar views
- *
- * 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 CALENDAR_VIEW_H
-#define CALENDAR_VIEW_H
-
-#include <libgnome/gnome-defs.h>
-#include <gal/menus/gal-view.h>
-#include "gnome-cal.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_CALENDAR_VIEW (calendar_view_get_type ())
-#define CALENDAR_VIEW(obj) (GTK_CHECK_CAST ((obj), TYPE_CALENDAR_VIEW, CalendarView))
-#define CALENDAR_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_CALENDAR_VIEW, \
- CalendarViewClass))
-#define IS_CALENDAR_VIEW(obj) (GTK_CHECK_TYPE ((obj), TYPE_CALENDAR_VIEW))
-#define IS_CALENDAR_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_CALENDAR_VIEW))
-
-typedef struct _CalendarViewPrivate CalendarViewPrivate;
-
-typedef struct {
- GalView view;
-
- /* Private data */
- CalendarViewPrivate *priv;
-} CalendarView;
-
-typedef struct {
- GalViewClass parent_class;
-} CalendarViewClass;
-
-GtkType calendar_view_get_type (void);
-
-CalendarView *calendar_view_construct (CalendarView *cal_view,
- GnomeCalendarViewType view_type,
- const char *title);
-
-CalendarView *calendar_view_new (GnomeCalendarViewType view_type,
- const char *title);
-
-GnomeCalendarViewType calendar_view_get_view_type (CalendarView *cal_view);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
deleted file mode 100644
index 7d1bfaff2d..0000000000
--- a/calendar/gui/comp-editor-factory.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/* Evolution calendar - Component editor factory object
- *
- * 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 <libgnomevfs/gnome-vfs.h>
-#include <cal-client/cal-client.h>
-#include "calendar-config.h"
-#include "comp-editor-factory.h"
-#include "dialogs/event-editor.h"
-#include "dialogs/task-editor.h"
-
-
-
-/* A pending request */
-
-typedef enum {
- REQUEST_EXISTING,
- REQUEST_NEW
-} RequestType;
-
-typedef struct {
- RequestType type;
-
- union {
- struct {
- char *uid;
- } existing;
-
- struct {
- CalComponentVType vtype;
- } new;
- } u;
-} Request;
-
-/* A client we have open */
-typedef struct {
- /* Our parent CompEditorFactory */
- CompEditorFactory *factory;
-
- /* Uri of the calendar, used as key in the clients hash table */
- GnomeVFSURI *uri;
-
- /* Client of the calendar */
- CalClient *client;
-
- /* Hash table of Component structures that belong to this client */
- GHashTable *uid_comp_hash;
-
- /* Pending requests; they are pending if the client is still being opened */
- GSList *pending;
-
- /* Whether this is open or still waiting */
- guint open : 1;
-} OpenClient;
-
-/* A component that is being edited */
-typedef struct {
- /* Our parent client */
- OpenClient *parent;
-
- /* UID of the component we are editing, used as the key in the hash table */
- const char *uid;
-
- /* Component we are editing */
- CalComponent *comp;
-
- /* Component editor that is open */
- CompEditor *editor;
-} Component;
-
-/* Private part of the CompEditorFactory structure */
-struct CompEditorFactoryPrivate {
- /* Hash table of URI->OpenClient */
- GHashTable *uri_client_hash;
-};
-
-
-
-static void comp_editor_factory_class_init (CompEditorFactoryClass *class);
-static void comp_editor_factory_init (CompEditorFactory *factory);
-static void comp_editor_factory_destroy (GtkObject *object);
-
-static void impl_editExisting (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev);
-static void impl_editNew (PortableServer_Servant servant,
- const CORBA_char *uri,
- const GNOME_Evolution_Calendar_CalObjType type,
- CORBA_Environment *ev);
-
-static BonoboXObjectClass *parent_class = NULL;
-
-
-
-BONOBO_X_TYPE_FUNC_FULL (CompEditorFactory,
- GNOME_Evolution_Calendar_CompEditorFactory,
- BONOBO_X_OBJECT_TYPE,
- comp_editor_factory);
-
-/* Class initialization function for the component editor factory */
-static void
-comp_editor_factory_class_init (CompEditorFactoryClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (BONOBO_X_OBJECT_TYPE);
-
- class->epv.editExisting = impl_editExisting;
- class->epv.editNew = impl_editNew;
-
- object_class->destroy = comp_editor_factory_destroy;
-}
-
-/* Object initialization function for the component editor factory */
-static void
-comp_editor_factory_init (CompEditorFactory *factory)
-{
- CompEditorFactoryPrivate *priv;
-
- priv = g_new (CompEditorFactoryPrivate, 1);
- factory->priv = priv;
-
- priv->uri_client_hash = g_hash_table_new (gnome_vfs_uri_hash, gnome_vfs_uri_hequal);
-}
-
-/* Used from g_hash_table_foreach(); frees a component structure */
-static void
-free_component_cb (gpointer key, gpointer value, gpointer data)
-{
- Component *c;
-
- c = value;
-
- c->parent = NULL;
- c->uid = NULL;
-
- gtk_object_unref (GTK_OBJECT (c->comp));
- c->comp = NULL;
-
- g_free (c);
-}
-
-/* Frees a Request structure */
-static void
-free_request (Request *r)
-{
- if (r->type == REQUEST_EXISTING) {
- g_assert (r->u.existing.uid != NULL);
- g_free (r->u.existing.uid);
- }
-
- g_free (r);
-}
-
-/* Frees an OpenClient structure */
-static void
-free_client (OpenClient *oc)
-{
- GSList *l;
-
- gnome_vfs_uri_unref (oc->uri);
- oc->uri = NULL;
-
- gtk_object_unref (GTK_OBJECT (oc->client));
- oc->client = NULL;
-
- g_hash_table_foreach (oc->uid_comp_hash, free_component_cb, NULL);
- g_hash_table_destroy (oc->uid_comp_hash);
- oc->uid_comp_hash = NULL;
-
- for (l = oc->pending; l; l = l->next) {
- Request *r;
-
- r = l->data;
- free_request (r);
- }
- g_slist_free (oc->pending);
- oc->pending = NULL;
-
- g_free (oc);
-}
-
-/* Used from g_hash_table_foreach(); frees a client structure */
-static void
-free_client_cb (gpointer key, gpointer value, gpointer data)
-{
- OpenClient *oc;
-
- oc = value;
- free_client (oc);
-}
-
-/* Destroy handler for the component editor factory */
-static void
-comp_editor_factory_destroy (GtkObject *object)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_COMP_EDITOR_FACTORY (object));
-
- factory = COMP_EDITOR_FACTORY (object);
- priv = factory->priv;
-
- g_hash_table_foreach (priv->uri_client_hash, free_client_cb, NULL);
- g_hash_table_destroy (priv->uri_client_hash);
- priv->uri_client_hash = NULL;
-
- g_free (priv);
- factory->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Callback used when a component editor gets destroyed */
-static void
-editor_destroy_cb (GtkObject *object, gpointer data)
-{
- Component *c;
- OpenClient *oc;
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
-
- c = data;
- oc = c->parent;
- factory = oc->factory;
- priv = factory->priv;
-
- /* Free the Component */
-
- g_hash_table_remove (oc->uid_comp_hash, c->uid);
- gtk_object_unref (GTK_OBJECT (c->comp));
- g_free (c);
-
- /* See if we need to free the client */
-
- g_assert (oc->pending == NULL);
-
- if (g_hash_table_size (oc->uid_comp_hash) != 0)
- return;
-
- g_hash_table_remove (priv->uri_client_hash, oc->uri);
- free_client (oc);
-}
-
-/* Starts editing an existing component on a client that is already open */
-static void
-edit_existing (OpenClient *oc, const char *uid)
-{
- CalComponent *comp;
- CalClientGetStatus status;
- CompEditor *editor;
- Component *c;
- CalComponentVType vtype;
-
- g_assert (oc->open);
-
- /* Get the object */
-
- status = cal_client_get_object (oc->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* see below */
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object disappeared from the server */
- return;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("edit_exiting(): Syntax error while getting component `%s'", uid);
- return;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- /* Create the appropriate type of editor */
-
- vtype = cal_component_get_vtype (comp);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- editor = COMP_EDITOR (event_editor_new ());
- break;
-
- case CAL_COMPONENT_TODO:
- editor = COMP_EDITOR (task_editor_new ());
- break;
-
- default:
- g_message ("edit_exiting(): Unsupported object type %d", (int) vtype);
- gtk_object_unref (GTK_OBJECT (comp));
- return;
- }
-
- /* Set the client/object on the editor */
-
- c = g_new (Component, 1);
- c->parent = oc;
- cal_component_get_uid (comp, &c->uid);
- c->comp = comp;
- c->editor = editor;
-
- g_hash_table_insert (oc->uid_comp_hash, (char *) c->uid, c);
-
- gtk_signal_connect (GTK_OBJECT (editor), "destroy",
- GTK_SIGNAL_FUNC (editor_destroy_cb), c);
-
- comp_editor_set_cal_client (editor, oc->client);
- comp_editor_edit_comp (editor, comp);
- comp_editor_focus (editor);
-}
-
-/* Creates a component with the appropriate defaults for the specified component
- * type.
- */
-static CalComponent *
-get_default_component (CalComponentVType vtype)
-{
- CalComponent *comp;
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, vtype);
-
- if (vtype == CAL_COMPONENT_EVENT) {
- struct icaltimetype itt;
- CalComponentDateTime dt;
-
- itt = icaltime_today ();
-
- dt.value = &itt;
- dt.tzid = calendar_config_get_timezone ();
-
- cal_component_set_dtstart (comp, &dt);
- cal_component_set_dtend (comp, &dt);
-
- cal_component_commit_sequence (comp);
- }
-
- return comp;
-}
-
-/* Edits a new object in the context of a client */
-static void
-edit_new (OpenClient *oc, CalComponentVType vtype)
-{
- CalComponent *comp;
- Component *c;
- CompEditor *editor;
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- editor = COMP_EDITOR (event_editor_new ());
- break;
-
- case CAL_COMPONENT_TODO:
- editor = COMP_EDITOR (task_editor_new ());
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- comp = get_default_component (vtype);
-
- c = g_new (Component, 1);
- c->parent = oc;
- cal_component_get_uid (comp, &c->uid);
- c->comp = comp;
-
- c->editor = editor;
-
- g_hash_table_insert (oc->uid_comp_hash, (char *) c->uid, c);
-
- gtk_signal_connect (GTK_OBJECT (editor), "destroy",
- GTK_SIGNAL_FUNC (editor_destroy_cb), c);
-
- comp_editor_set_cal_client (editor, oc->client);
- comp_editor_edit_comp (editor, comp);
- comp_editor_focus (editor);
-}
-
-/* Resolves all the pending requests for a client */
-static void
-resolve_pending_requests (OpenClient *oc)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- GSList *l;
-
- factory = oc->factory;
- priv = factory->priv;
-
- g_assert (oc->pending != NULL);
-
- for (l = oc->pending; l; l = l->next) {
- Request *request;
-
- request = l->data;
-
- switch (request->type) {
- case REQUEST_EXISTING:
- edit_existing (oc, request->u.existing.uid);
- break;
-
- case REQUEST_NEW:
- edit_new (oc, request->u.new.vtype);
- break;
- }
-
- free_request (request);
- }
-
- g_slist_free (oc->pending);
- oc->pending = NULL;
-}
-
-/* Callback used when a client is finished opening. We resolve all the pending
- * requests.
- */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- OpenClient *oc;
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
-
- oc = data;
- factory = oc->factory;
- priv = factory->priv;
-
- switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
- oc->open = TRUE;
- resolve_pending_requests (oc);
- return;
-
- case CAL_CLIENT_OPEN_ERROR:
- g_message ("cal_opened_cb(): Error while opening the calendar");
- break;
-
- case CAL_CLIENT_OPEN_NOT_FOUND:
- /* bullshit; we specified only_if_exists = FALSE */
- g_assert_not_reached ();
- return;
-
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- g_message ("cal_opened_cb(): Method not supported when opening the calendar");
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- g_hash_table_remove (priv->uri_client_hash, oc->uri);
- free_client (oc);
-}
-
-/* Creates a new OpenClient structure and queues the component editing/creation
- * process until the client is open. Returns NULL if it could not issue the
- * open request.
- */
-static OpenClient *
-open_client (CompEditorFactory *factory, GnomeVFSURI *uri)
-{
- CompEditorFactoryPrivate *priv;
- CalClient *client;
- OpenClient *oc;
- char *str_uri;
-
- priv = factory->priv;
-
- client = cal_client_new ();
- if (!client)
- return NULL;
-
- oc = g_new (OpenClient, 1);
- oc->factory = factory;
-
- gnome_vfs_uri_ref (uri);
- oc->uri = uri;
-
- oc->client = client;
- oc->uid_comp_hash = g_hash_table_new (g_str_hash, g_str_equal);
- oc->pending = NULL;
- oc->open = FALSE;
-
- gtk_signal_connect (GTK_OBJECT (oc->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), oc);
-
- str_uri = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE);
-
- if (!cal_client_open_calendar (oc->client, str_uri, FALSE)) {
- g_free (str_uri);
- gnome_vfs_uri_unref (oc->uri);
- gtk_object_unref (GTK_OBJECT (oc->client));
- g_hash_table_destroy (oc->uid_comp_hash);
- g_free (oc);
-
- return NULL;
- }
- g_free (str_uri);
-
- g_hash_table_insert (priv->uri_client_hash, oc->uri, oc);
-
- return oc;
-}
-
-/* Looks up an open client or queues it for being opened. Returns the client or
- * NULL on failure; in the latter case it sets the ev exception.
- */
-static OpenClient *
-lookup_open_client (CompEditorFactory *factory, const char *str_uri, CORBA_Environment *ev)
-{
- CompEditorFactoryPrivate *priv;
- GnomeVFSURI *uri;
- OpenClient *oc;
-
- priv = factory->priv;
-
- /* Look up the client */
-
- uri = gnome_vfs_uri_new (str_uri);
- if (!uri) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CompEditorFactory_InvalidURI,
- NULL);
- return NULL;
- }
-
- oc = g_hash_table_lookup (priv->uri_client_hash, uri);
- if (!oc) {
- oc = open_client (factory, uri);
- if (!oc) {
- gnome_vfs_uri_unref (uri);
-
- CORBA_exception_set (
- ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CompEditorFactory_BackendContactError,
- NULL);
- return NULL;
- }
- }
-
- gnome_vfs_uri_unref (uri);
-
- return oc;
-}
-
-/* Queues a request for editing an existing object */
-static void
-queue_edit_existing (OpenClient *oc, const char *uid)
-{
- Request *request;
-
- g_assert (!oc->open);
-
- request = g_new (Request, 1);
- request->type = REQUEST_EXISTING;
- request->u.existing.uid = g_strdup (uid);
-
- oc->pending = g_slist_append (oc->pending, request);
-}
-
-/* ::editExisting() method implementation */
-static void
-impl_editExisting (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- OpenClient *oc;
- Component *c;
-
- factory = COMP_EDITOR_FACTORY (bonobo_object_from_servant (servant));
- priv = factory->priv;
-
- oc = lookup_open_client (factory, str_uri, ev);
- if (!oc)
- return;
-
- if (!oc->open) {
- queue_edit_existing (oc, uid);
- return;
- }
-
- /* Look up the component */
-
- c = g_hash_table_lookup (oc->uid_comp_hash, uid);
- if (!c)
- edit_existing (oc, uid);
- else {
- g_assert (c->editor != NULL);
- comp_editor_focus (c->editor);
- }
-}
-
-/* Queues a request for creating a new object */
-static void
-queue_edit_new (OpenClient *oc, CalComponentVType vtype)
-{
- Request *request;
-
- g_assert (!oc->open);
-
- request = g_new (Request, 1);
- request->type = REQUEST_NEW;
- request->u.new.vtype = vtype;
-
- oc->pending = g_slist_append (oc->pending, request);
-}
-
-/* ::editNew() method implementation */
-static void
-impl_editNew (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- const GNOME_Evolution_Calendar_CalObjType corba_type,
- CORBA_Environment *ev)
-{
- CompEditorFactory *factory;
- CompEditorFactoryPrivate *priv;
- OpenClient *oc;
- CalComponentVType vtype;
-
- factory = COMP_EDITOR_FACTORY (bonobo_object_from_servant (servant));
- priv = factory->priv;
-
- oc = lookup_open_client (factory, str_uri, ev);
- if (!oc)
- return;
-
- switch (corba_type) {
- case GNOME_Evolution_Calendar_TYPE_EVENT:
- vtype = CAL_COMPONENT_EVENT;
- break;
-
- case GNOME_Evolution_Calendar_TYPE_TODO:
- vtype = CAL_COMPONENT_TODO;
- break;
-
- default:
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CompEditorFactory_UnsupportedType,
- NULL);
- return;
- }
-
- if (!oc->open)
- queue_edit_new (oc, vtype);
- else
- edit_new (oc, vtype);
-}
-
-
-
-/**
- * comp_editor_factory_new:
- *
- * Creates a new calendar component editor factory.
- *
- * Return value: A newly-created component editor factory.
- **/
-CompEditorFactory *
-comp_editor_factory_new (void)
-{
- return gtk_type_new (TYPE_COMP_EDITOR_FACTORY);
-}
diff --git a/calendar/gui/comp-editor-factory.h b/calendar/gui/comp-editor-factory.h
deleted file mode 100644
index 3e8387d6a7..0000000000
--- a/calendar/gui/comp-editor-factory.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Evolution calendar - Component editor factory object
- *
- * 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 COMP_EDITOR_FACTORY_H
-#define COMP_EDITOR_FACTORY_H
-
-#include <bonobo/bonobo-xobject.h>
-#include "evolution-calendar.h"
-
-
-
-#define TYPE_COMP_EDITOR_FACTORY (comp_editor_factory_get_type ())
-#define COMP_EDITOR_FACTORY(obj) (GTK_CHECK_CAST ((obj), TYPE_COMP_EDITOR_FACTORY, \
- CompEditorFactory))
-#define COMP_EDITOR_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
- TYPE_COMP_EDITOR_FACTORY, CompEditorFactoryClass))
-#define IS_COMP_EDITOR_FACTORY(obj) (GTK_CHECK_TYPE ((obj), TYPE_COMP_EDITOR_FACTORY))
-#define IS_COMP_EDITOR_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_COMP_EDITOR_FACTORY))
-
-typedef struct CompEditorFactoryPrivate CompEditorFactoryPrivate;
-
-typedef struct {
- BonoboXObject xobject;
-
- /* Private data */
- CompEditorFactoryPrivate *priv;
-} CompEditorFactory;
-
-typedef struct {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_CompEditorFactory__epv epv;
-} CompEditorFactoryClass;
-
-GtkType comp_editor_factory_get_type (void);
-
-CompEditorFactory *comp_editor_factory_new (void);
-
-
-
-#endif
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
deleted file mode 100644
index f0376e2a99..0000000000
--- a/calendar/gui/comp-util.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Evolution calendar - Utilities for manipulating CalComponent objects
- *
- * Copyright (C) 2000 Ximian, 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, time_t t, icaltimezone *zone)
-{
- 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 = icaltime_from_timet_with_zone (t, TRUE, zone);
- cdt->tzid = g_strdup (icaltimezone_get_tzid (zone));
-
- list = g_slist_append (list, cdt);
- cal_component_set_exdate_list (comp, list);
- cal_component_free_exdate_list (list);
-}
-
-
-
-/* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */
-static gboolean
-cal_component_compare_tzid (const char *tzid1, const char *tzid2)
-{
- gboolean retval = TRUE;
-
- if (tzid1) {
- if (!tzid2 || strcmp (tzid1, tzid2))
- retval = FALSE;
- } else {
- if (tzid2)
- retval = FALSE;
- }
-
- return retval;
-}
-
-/**
- * cal_comp_util_compare_event_timezones:
- * @comp: A calendar component object.
- * @client: A #CalClient.
- *
- * Checks if the component uses the given timezone for both the start and
- * the end time, or if the UTC offsets of the start and end times are the same
- * as in the given zone.
- *
- * Returns: TRUE if the component's start and end time are at the same UTC
- * offset in the given timezone.
- **/
-gboolean
-cal_comp_util_compare_event_timezones (CalComponent *comp,
- CalClient *client,
- icaltimezone *zone)
-{
- CalClientGetStatus status;
- CalComponentDateTime start_datetime, end_datetime;
- const char *tzid;
- gboolean retval = FALSE;
- icaltimezone *start_zone, *end_zone;
- int offset1, offset2;
-
- tzid = icaltimezone_get_tzid (zone);
-
- cal_component_get_dtstart (comp, &start_datetime);
- cal_component_get_dtend (comp, &end_datetime);
-
- /* FIXME: DURATION may be used instead. */
- if (cal_component_compare_tzid (tzid, start_datetime.tzid)
- && cal_component_compare_tzid (tzid, end_datetime.tzid)) {
- /* If both TZIDs are the same as the given zone's TZID, then
- we know the timezones are the same so we return TRUE. */
- retval = TRUE;
- } else {
- /* If the TZIDs differ, we have to compare the UTC offsets
- of the start and end times, using their own timezones and
- the given timezone. */
- status = cal_client_get_timezone (client,
- start_datetime.tzid,
- &start_zone);
- if (status != CAL_CLIENT_GET_SUCCESS)
- goto out;
-
- offset1 = icaltimezone_get_utc_offset (start_zone,
- start_datetime.value,
- NULL);
- offset2 = icaltimezone_get_utc_offset (zone,
- start_datetime.value,
- NULL);
- if (offset1 == offset2) {
- status = cal_client_get_timezone (client,
- end_datetime.tzid,
- &end_zone);
- if (status != CAL_CLIENT_GET_SUCCESS)
- goto out;
-
- offset1 = icaltimezone_get_utc_offset (end_zone,
- end_datetime.value,
- NULL);
- offset2 = icaltimezone_get_utc_offset (zone,
- end_datetime.value,
- NULL);
- if (offset1 == offset2)
- retval = TRUE;
- }
- }
-
- out:
-
- cal_component_free_datetime (&start_datetime);
- cal_component_free_datetime (&end_datetime);
-
- return retval;
-}
diff --git a/calendar/gui/comp-util.h b/calendar/gui/comp-util.h
deleted file mode 100644
index efc09a8fe9..0000000000
--- a/calendar/gui/comp-util.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Evolution calendar - Utilities for manipulating CalComponent objects
- *
- * Copyright (C) 2000 Ximian, 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>
-#include <cal-client/cal-client.h>
-
-void cal_comp_util_add_exdate (CalComponent *comp, time_t t, icaltimezone *zone);
-
-
-/* Returns TRUE if the component uses the given timezone for both DTSTART
- and DTEND, or if the UTC offsets of the start and end times are the same
- as in the given zone. */
-gboolean cal_comp_util_compare_event_timezones (CalComponent *comp,
- CalClient *client,
- icaltimezone *zone);
-
-#endif
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
deleted file mode 100644
index e13a3f8a50..0000000000
--- a/calendar/gui/component-factory.c
+++ /dev/null
@@ -1,610 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Copyright (C) 2000 Ximian, 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 <errno.h>
-#include <libgnomevfs/gnome-vfs-types.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-directory.h>
-#include <libgnomevfs/gnome-vfs-file-info.h>
-
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include "evolution-shell-component.h"
-#include "calendar-offline-handler.h"
-#include "component-factory.h"
-#include "tasks-control-factory.h"
-#include "control-factory.h"
-#include "calendar-config.h"
-#include "tasks-control.h"
-#include "tasks-migrate.h"
-
-
-
-/* OAFIID for the component. */
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponent"
-
-/* Folder type IDs */
-#define FOLDER_CALENDAR "calendar"
-#define FOLDER_TASKS "tasks"
-
-/* IDs for user creatable items */
-#define CREATE_EVENT_ID "event"
-#define CREATE_TASK_ID "task"
-
-char *evolution_dir;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { FOLDER_CALENDAR,
- "evolution-calendar.png",
- N_("Calendar"),
- N_("Folder containing appointments and events"),
- TRUE, NULL, NULL },
- { FOLDER_TASKS,
- "evolution-tasks.png",
- N_("Tasks"),
- N_("Folder containing to-do items"),
- TRUE, 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, "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;
- GnomeVFSURI *uri;
-
- CORBA_exception_init (&ev);
-
- if (strcmp (type, FOLDER_CALENDAR) && strcmp (type, FOLDER_TASKS)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- uri = gnome_vfs_uri_new (physical_uri);
- if (uri) {
- /* we don't need to do anything */
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_OK, &ev);
- gnome_vfs_uri_unref (uri);
- }
- else {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- }
-
- CORBA_exception_free (&ev);
-}
-
-static void
-remove_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- GnomeVFSURI *dir_uri, *data_uri, *backup_uri;
- GnomeVFSResult data_result, backup_result;
-
- /* check type */
- if (strcmp (type, FOLDER_CALENDAR) && strcmp (type, FOLDER_TASKS)) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener of "
- "an unsupported folder type");
-
- CORBA_exception_free (&ev);
- return;
- }
-
- /* check URI */
- dir_uri = gnome_vfs_uri_new (physical_uri);
- if (!dir_uri) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- /* Compute the URIs of the appropriate files */
-
- if (strcmp (type, FOLDER_CALENDAR) == 0) {
- data_uri = gnome_vfs_uri_append_file_name (dir_uri, "calendar.ics");
- backup_uri = gnome_vfs_uri_append_file_name (dir_uri, "calendar.ics~");
- } else if (strcmp (type, FOLDER_TASKS) == 0) {
- data_uri = gnome_vfs_uri_append_file_name (dir_uri, "tasks.ics");
- backup_uri = gnome_vfs_uri_append_file_name (dir_uri, "tasks.ics~");
- } else {
- g_assert_not_reached ();
- return;
- }
-
- if (!data_uri || !backup_uri) {
- CORBA_Environment ev;
-
- g_message ("remove_folder(): Could not generate the data/backup URIs");
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener "
- "of an invalid URI");
-
- CORBA_exception_free (&ev);
-
- goto out;
- }
-
- /* Delete the data and backup files; the shell will take care of the rest */
-
- data_result = gnome_vfs_unlink_from_uri (data_uri);
- backup_result = gnome_vfs_unlink_from_uri (backup_uri);
-
- if ((data_result == GNOME_VFS_OK || data_result == GNOME_VFS_ERROR_NOT_FOUND)
- && (backup_result == GNOME_VFS_OK || backup_result == GNOME_VFS_ERROR_NOT_FOUND)) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_OK,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener about success");
-
- CORBA_exception_free (&ev);
- } else {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_folder(): Could not notify the listener about failure");
-
- CORBA_exception_free (&ev);
- }
-
- out:
-
- gnome_vfs_uri_unref (dir_uri);
-
- if (data_uri)
- gnome_vfs_uri_unref (data_uri);
-
- if (backup_uri)
- gnome_vfs_uri_unref (backup_uri);
-}
-
-static void
-xfer_folder (EvolutionShellComponent *shell_component,
- const char *source_physical_uri,
- const char *destination_physical_uri,
- const char *type,
- gboolean remove_source,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
- GnomeVFSURI *src_uri;
- GnomeVFSURI *dest_uri;
- GnomeVFSResult result;
- GList *file_list;
- GList *l;
- gboolean success = TRUE;
-
- CORBA_exception_init (&ev);
-
- /* check type */
- if (strcmp (type, FOLDER_CALENDAR) && strcmp (type, FOLDER_TASKS)) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- /* check URIs */
- src_uri = gnome_vfs_uri_new (source_physical_uri);
- dest_uri = gnome_vfs_uri_new (destination_physical_uri);
- if (!src_uri || ! dest_uri) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- gnome_vfs_uri_unref (src_uri);
- gnome_vfs_uri_unref (dest_uri);
- CORBA_exception_free (&ev);
- return;
- }
-
- gnome_vfs_uri_unref (src_uri);
- gnome_vfs_uri_unref (dest_uri);
-
- /* remove all files in that directory */
- result = gnome_vfs_directory_list_load (&file_list, source_physical_uri, 0, NULL);
- if (result != GNOME_VFS_OK) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_INVALID_URI,
- &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- for (l = file_list; l; l = l->next) {
- GnomeVFSFileInfo *file_info;
- GnomeVFSHandle *hin;
- GnomeVFSHandle *hout;
- gpointer buffer;
- GnomeVFSFileSize size;
-
- file_info = (GnomeVFSFileInfo *) l->data;
- if (!file_info || file_info->name[0] == '.')
- continue;
-
- /* open source and destination files */
- src_uri = gnome_vfs_uri_new (source_physical_uri);
- src_uri = gnome_vfs_uri_append_file_name (src_uri, file_info->name);
-
- result = gnome_vfs_open_uri (&hin, src_uri, GNOME_VFS_OPEN_READ);
- gnome_vfs_uri_unref (src_uri);
- if (result != GNOME_VFS_OK) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
-
- dest_uri = gnome_vfs_uri_new (destination_physical_uri);
- dest_uri = gnome_vfs_uri_append_file_name (dest_uri, file_info->name);
-
- result = gnome_vfs_create_uri (&hout, dest_uri, GNOME_VFS_OPEN_WRITE, FALSE, 0);
- gnome_vfs_uri_unref (dest_uri);
- if (result != GNOME_VFS_OK) {
- gnome_vfs_close (hin);
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
-
- /* write source file to destination file */
- buffer = g_malloc (file_info->size);
- result = gnome_vfs_read (hin, buffer, file_info->size, &size);
- if (result != GNOME_VFS_OK) {
- gnome_vfs_close (hin);
- gnome_vfs_close (hout);
- g_free (buffer);
-
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
- result = gnome_vfs_write (hout, buffer, file_info->size, &size);
- if (result != GNOME_VFS_OK) {
- gnome_vfs_close (hin);
- gnome_vfs_close (hout);
- g_free (buffer);
-
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
- success = FALSE;
- break;
- }
-
- /* free memory */
- gnome_vfs_close (hin);
- gnome_vfs_close (hout);
- g_free (buffer);
- }
-
- if (success) {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener,
- GNOME_Evolution_ShellComponentListener_OK,
- &ev);
- }
-
- /* free memory */
- gnome_vfs_file_info_list_free (file_list);
- CORBA_exception_free (&ev);
-}
-
-static GList *shells = NULL;
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- static gboolean migrated = FALSE;
-
- evolution_dir = g_strdup (evolution_homedir);
-
- if (!migrated) {
- tasks_migrate ();
- migrated = TRUE;
- }
-
- shells = g_list_append (shells, shell_component);
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- gpointer user_data)
-{
- shells = g_list_remove (shells, shell_component);
-
- if (g_list_length (shells) == 0)
- gtk_main_quit ();
-}
-
-/* Computes the final URI for a calendar component */
-static char *
-get_data_uri (const char *uri, CalComponentVType vtype)
-{
- if (uri) {
- if (vtype == CAL_COMPONENT_EVENT)
- return g_concat_dir_and_file (uri, "calendar.ics");
- else if (vtype == CAL_COMPONENT_TODO)
- return g_concat_dir_and_file (uri, "tasks.ics");
- else
- g_assert_not_reached ();
- } else {
- if (vtype == CAL_COMPONENT_EVENT)
- return g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Calendar/calendar.ics");
- else if (vtype == CAL_COMPONENT_TODO)
- return g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Tasks/tasks.ics");
- else
- g_assert_not_reached ();
- }
-
- return NULL;
-}
-
-/* Creates a calendar component at a specified URI. If the URI is NULL then it
- * uses the default folder for that type of component.
- */
-static void
-create_component (const char *uri, CalComponentVType vtype)
-{
- char *real_uri;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjType corba_type;
- GNOME_Evolution_Calendar_CompEditorFactory factory;
-
- real_uri = get_data_uri (uri, vtype);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- corba_type = GNOME_Evolution_Calendar_TYPE_EVENT;
- break;
-
- case CAL_COMPONENT_TODO:
- corba_type = GNOME_Evolution_Calendar_TYPE_TODO;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- /* Get the factory */
-
- CORBA_exception_init (&ev);
- factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory",
- 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("create_component(): Could not activate the component editor factory");
- CORBA_exception_free (&ev);
- g_free (real_uri);
- return;
- }
- CORBA_exception_free (&ev);
-
- /* Create the item */
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_CompEditorFactory_editNew (factory, real_uri, corba_type, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("create_component(): Exception while creating the component");
-
- CORBA_exception_free (&ev);
- g_free (real_uri);
-
- /* Get rid of the factory */
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (factory, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("create_component(): Could not unref the calendar component factory");
-
- CORBA_exception_free (&ev);
-}
-
-/* Callback used when we must create a user-creatable item */
-static void
-sc_user_create_new_item_cb (EvolutionShellComponent *shell_component,
- const char *id,
- const char *parent_folder_physical_uri,
- const char *parent_folder_type)
-{
- if (strcmp (id, CREATE_EVENT_ID) == 0) {
- if (strcmp (parent_folder_type, FOLDER_CALENDAR) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_EVENT);
- else
- create_component (NULL, CAL_COMPONENT_EVENT);
- } else if (strcmp (id, CREATE_TASK_ID) == 0) {
- if (strcmp (parent_folder_type, FOLDER_TASKS) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_TODO);
- else
- create_component (NULL, CAL_COMPONENT_TODO);
- } else
- g_assert_not_reached ();
-}
-
-
-/* The factory function. */
-
-static BonoboObject *
-create_object (void)
-{
- EvolutionShellComponent *shell_component;
- CalendarOfflineHandler *offline_handler;
-
- shell_component = evolution_shell_component_new (folder_types,
- NULL,
- create_view,
- create_folder,
- remove_folder,
- xfer_folder,
- NULL, /* populate_folder_context_menu_fn */
- NULL, /* get_dnd_selection_fn */
- NULL /* closure */);
-
- /* Offline handler */
- offline_handler = calendar_offline_handler_new ();
- bonobo_object_add_interface (BONOBO_OBJECT (shell_component),
- BONOBO_OBJECT (offline_handler));
-
- 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);
-
- /* User creatable items */
-
- evolution_shell_component_add_user_creatable_item (shell_component,
- CREATE_EVENT_ID,
- _("Create a new appointment"),
- _("New _Appointment"),
- 'a');
-
- evolution_shell_component_add_user_creatable_item (shell_component,
- CREATE_TASK_ID,
- _("Create a new task"),
- _("New _Task"),
- 't');
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
- GTK_SIGNAL_FUNC (sc_user_create_new_item_cb), NULL);
-
- return BONOBO_OBJECT (shell_component);
-}
-
-
-void
-component_factory_init (void)
-{
- BonoboObject *object;
- int result;
-
- object = create_object ();
-
- result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object));
-
- if (result == OAF_REG_ERROR)
- g_error ("Cannot initialize Evolution's calendar component.");
-}
diff --git a/calendar/gui/component-factory.h b/calendar/gui/component-factory.h
deleted file mode 100644
index b0d295bc16..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 Ximian, 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 928b8e45ab..0000000000
--- a/calendar/gui/control-factory.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* control-factory.c
- *
- * Copyright (C) 2000 Ximian, 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 <bonobo/bonobo-context.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 data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- if (activate)
- calendar_control_activate (control, gcal);
- else
- calendar_control_deactivate (control, gcal);
-}
-
-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);
- bonobo_object_unref (BONOBO_OBJECT (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);
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-
- 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));
-}
-
-static void
-on_calendar_dates_shown_changed (GnomeCalendar *gcal, BonoboControl *control)
-{
- calendar_set_folder_bar_label (gcal, control);
-}
-
-
-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);
- gtk_signal_connect (GTK_OBJECT (gcal), "dates_shown_changed",
- GTK_SIGNAL_FUNC (on_calendar_dates_shown_changed),
- control);
-
- return control;
-}
diff --git a/calendar/gui/control-factory.h b/calendar/gui/control-factory.h
deleted file mode 100644
index 947255b0d4..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 Ximian, 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 3b97f6881d..0000000000
--- a/calendar/gui/dialogs/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-Evolution-Addressbook-SelectNames.h
-Evolution-Addressbook-SelectNames-stubs.c
-Evolution-Addressbook-SelectNames-skels.c
-Evolution-Addressbook-SelectNames-common.c
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
deleted file mode 100644
index c0c410a565..0000000000
--- a/calendar/gui/dialogs/Makefile.am
+++ /dev/null
@@ -1,106 +0,0 @@
-## CORBA stuff
-
-IDLS = \
- $(top_srcdir)/addressbook/gui/component/select-names/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
-
-$(IDL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
-
-BUILT_SOURCES = $(IDL_GENERATED)
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"calendar-gui\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/calendar/cal-client \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/addressbook/backend/ebook \
- -I$(top_builddir)/addressbook/backend/ebook \
- -I$(includedir) \
- $(EXTRA_GNOME_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- -DGNOMELOCALEDIR=\""$(localedir)"\"
-
-noinst_LIBRARIES = libcal-dialogs.a
-
-libcal_dialogs_a_SOURCES = \
- $(IDL_GENERATED) \
- alarm-options.c \
- alarm-options.h \
- alarm-page.c \
- alarm-page.h \
- cal-prefs-dialog.c \
- cal-prefs-dialog.h \
- cancel-comp.c \
- cancel-comp.h \
- changed-comp.c \
- changed-comp.h \
- comp-editor.c \
- comp-editor.h \
- comp-editor-page.c \
- comp-editor-page.h \
- comp-editor-util.c \
- comp-editor-util.h \
- delete-comp.c \
- delete-comp.h \
- e-delegate-dialog.c \
- e-delegate-dialog.h \
- event-editor.c \
- event-editor.h \
- event-page.c \
- event-page.h \
- meeting-page.c \
- meeting-page.h \
- recurrence-page.c \
- recurrence-page.h \
- save-comp.c \
- save-comp.h \
- schedule-page.c \
- schedule-page.h \
- send-comp.c \
- send-comp.h \
- task-editor.c \
- task-editor.h \
- task-details-page.c \
- task-details-page.h \
- task-page.c \
- task-page.h
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = \
- alarm-options.glade \
- alarm-page.glade \
- cal-prefs-dialog.glade \
- e-delegate-dialog.glade \
- event-page.glade \
- meeting-page.glade \
- recurrence-page.glade \
- schedule-page.glade \
- task-details-page.glade \
- task-page.glade
-
-etspecdir = $(datadir)/evolution/etspec/
-etspec_DATA = meeting-page.etspec
-
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(etspec_DATA)
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
deleted file mode 100644
index 27e2f681bc..0000000000
--- a/calendar/gui/dialogs/alarm-options.c
+++ /dev/null
@@ -1,585 +0,0 @@
-/* Evolution calendar - Alarm options dialog
- *
- * 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <glade/glade.h>
-#include "e-util/e-dialog-widgets.h"
-#include "alarm-options.h"
-
-
-
-typedef struct {
- /* Whether the dialog was accepted or canceled */
- gboolean canceled;
-
- /* Glade XML data */
- GladeXML *xml;
-
- /* Toplevel */
- GtkWidget *toplevel;
-
- /* Buttons */
- GtkWidget *button_ok;
- GtkWidget *button_cancel;
-
- /* Alarm repeat widgets */
- GtkWidget *repeat_toggle;
- GtkWidget *repeat_group;
- GtkWidget *repeat_quantity;
- GtkWidget *repeat_value;
- GtkWidget *repeat_unit;
-
- /* Display alarm widgets */
- GtkWidget *dalarm_group;
- GtkWidget *dalarm_description;
-
- /* Audio alarm widgets */
- GtkWidget *aalarm_group;
- GtkWidget *aalarm_attach;
-
- /* FIXME: Mail alarm widgets */
- GtkWidget *malarm_group;
-
- /* Procedure alarm widgets */
- GtkWidget *palarm_group;
- GtkWidget *palarm_program;
- GtkWidget *palarm_args;
-} Dialog;
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (Dialog *dialog)
-{
-#define GW(name) glade_xml_get_widget (dialog->xml, name)
-
- dialog->toplevel = GW ("alarm-options-toplevel");
-
- dialog->button_ok = GW ("button-ok");
- dialog->button_cancel = GW ("button-cancel");
-
- dialog->repeat_toggle = GW ("repeat-toggle");
- dialog->repeat_group = GW ("repeat-group");
- dialog->repeat_quantity = GW ("repeat-quantity");
- dialog->repeat_value = GW ("repeat-value");
- dialog->repeat_unit = GW ("repeat-unit");
-
- dialog->dalarm_group = GW ("dalarm-group");
- dialog->dalarm_description = GW ("dalarm-description");
-
- dialog->aalarm_group = GW ("aalarm-group");
- dialog->aalarm_attach = GW ("aalarm-attach");
-
- dialog->malarm_group = GW ("malarm-group");
-
- dialog->palarm_group = GW ("palarm-group");
- dialog->palarm_program = GW ("palarm-program");
- dialog->palarm_args = GW ("palarm-args");
-
- return (dialog->toplevel
- && dialog->button_ok
- && dialog->button_cancel
- && dialog->repeat_toggle
- && dialog->repeat_group
- && dialog->repeat_quantity
- && dialog->repeat_value
- && dialog->repeat_unit
- && dialog->dalarm_group
- && dialog->dalarm_description
- && dialog->aalarm_group
- && dialog->aalarm_attach
- && dialog->malarm_group
- && dialog->palarm_group
- && dialog->palarm_program
- && dialog->palarm_args);
-}
-
-/* Closes the dialog by terminating its main loop */
-static void
-close_dialog (Dialog *dialog, gboolean canceled)
-{
- dialog->canceled = canceled;
- gtk_main_quit ();
-}
-
-/* Callback used when the toplevel window is deleted */
-static guint
-toplevel_delete_event_cb (GtkWidget *widget, GdkEventAny *event, gpointer data)
-{
- Dialog *dialog;
-
- dialog = data;
- close_dialog (dialog, TRUE);
- return TRUE;
-}
-
-/* Callback used when the OK button is clicked */
-static void
-button_ok_clicked_cb (GtkWidget *button, gpointer data)
-{
- Dialog *dialog;
-
- dialog = data;
- close_dialog (dialog, FALSE);
-}
-
-/* Callback used when the Cancel button is clicked */
-static void
-button_cancel_clicked_cb (GtkWidget *button, gpointer data)
-{
- Dialog *dialog;
-
- dialog = data;
- close_dialog (dialog, TRUE);
-}
-
-/* Callback used when the repeat toggle button is toggled. We sensitize the
- * repeat group options as appropriate.
- */
-static void
-repeat_toggle_toggled_cb (GtkToggleButton *toggle, gpointer data)
-{
- Dialog *dialog;
- gboolean active;
-
- dialog = data;
-
- active = gtk_toggle_button_get_active (toggle);
-
- gtk_widget_set_sensitive (dialog->repeat_group, active);
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (Dialog *dialog)
-{
- /* Toplevel, buttons */
-
- dialog->canceled = TRUE;
-
- gtk_signal_connect (GTK_OBJECT (dialog->toplevel), "delete_event",
- GTK_SIGNAL_FUNC (toplevel_delete_event_cb), dialog);
-
- gtk_signal_connect (GTK_OBJECT (dialog->button_ok), "clicked",
- GTK_SIGNAL_FUNC (button_ok_clicked_cb), dialog);
-
- gtk_signal_connect (GTK_OBJECT (dialog->button_cancel), "clicked",
- GTK_SIGNAL_FUNC (button_cancel_clicked_cb), dialog);
-
- /* Alarm repeat */
-
- gtk_signal_connect (GTK_OBJECT (dialog->repeat_toggle), "toggled",
- GTK_SIGNAL_FUNC (repeat_toggle_toggled_cb), dialog);
-}
-
-/* Fills the audio alarm widgets with the values from the alarm component */
-static void
-alarm_to_aalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
-{
- icalattach *attach;
- const char *url;
-
- cal_component_alarm_get_attach (alarm, &attach);
-
- if (!attach) {
- e_dialog_editable_set (dialog->aalarm_attach, NULL);
- return;
- }
-
- /* FIXME: this does not support inline data */
-
- url = NULL;
-
- if (icalattach_get_is_url (attach))
- url = icalattach_get_url (attach);
- else
- g_message ("alarm_to_aalarm_widgets(): FIXME: we don't support inline data yet");
-
- e_dialog_editable_set (dialog->aalarm_attach, url);
-
- icalattach_unref (attach);
-}
-
-/* Fills the display alarm widgets with the values from the alarm component */
-static void
-alarm_to_dalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
-{
- CalComponentText description;
-
- cal_component_alarm_get_description (alarm, &description);
-
- e_dialog_editable_set (dialog->dalarm_description, description.value);
-}
-
-/* Fills the mail alarm widgets with the values from the alarm component */
-static void
-alarm_to_malarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
-{
- /* FIXME: nothing for now; we don't support mail alarms */
-}
-
-/* Fills the procedure alarm widgets with the values from the alarm component */
-static void
-alarm_to_palarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
-{
- icalattach *attach;
- CalComponentText description;
-
- cal_component_alarm_get_attach (alarm, &attach);
- cal_component_alarm_get_description (alarm, &description);
-
- if (attach) {
- const char *url;
-
- if (icalattach_get_is_url (attach)) {
- url = icalattach_get_url (attach);
- e_dialog_editable_set (dialog->palarm_program, url);
- } else
- g_message ("alarm_to_palarm_widgets(): Don't know what to do with non-URL "
- "attachments");
-
- icalattach_unref (attach);
- }
-
- e_dialog_editable_set (dialog->palarm_args, description.value);
-}
-
-enum duration_units {
- DUR_MINUTES,
- DUR_HOURS,
- DUR_DAYS
-};
-
-static const int duration_units_map[] = {
- DUR_MINUTES,
- DUR_HOURS,
- DUR_DAYS,
- -1
-};
-
-/* Sigh. Takes an overcomplicated duration value and reduces it to its lowest
- * common denominator.
- */
-static void
-normalize_duration (struct icaldurationtype dur, int *value, enum duration_units *units)
-{
- if (dur.seconds != 0 || dur.minutes != 0) {
- *value = ((((dur.weeks * 7 + dur.days) * 24 + dur.hours) * 60) + dur.minutes
- + dur.seconds / 60 + ((dur.seconds % 60) >= 30 ? 1 : 0));
- *units = DUR_MINUTES;
- } else if (dur.hours) {
- *value = ((dur.weeks * 7) + dur.days) * 24 + dur.hours;
- *units = DUR_HOURS;
- } else if (dur.days != 0 || dur.weeks != 0) {
- *value = dur.weeks * 7 + dur.days;
- *units = DUR_DAYS;
- } else {
- *value = 0;
- *units = DUR_MINUTES;
- }
-}
-
-/* Fills the repeat widgets with the values from the alarm component */
-static void
-alarm_to_repeat_widgets (Dialog *dialog, CalComponentAlarm *alarm)
-{
- CalAlarmRepeat repeat;
- int value;
- enum duration_units units;
-
- cal_component_alarm_get_repeat (alarm, &repeat);
-
- /* Sensitivity */
-
- if (repeat.repetitions == 0) {
- gtk_widget_set_sensitive (dialog->repeat_group, FALSE);
- e_dialog_toggle_set (dialog->repeat_toggle, FALSE);
- return;
- }
-
- gtk_widget_set_sensitive (dialog->repeat_group, TRUE);
- e_dialog_toggle_set (dialog->repeat_toggle, TRUE);
-
- /* Repetitions */
- e_dialog_spin_set (dialog->repeat_quantity, repeat.repetitions);
-
- /* Duration */
-
- normalize_duration (repeat.duration, &value, &units);
-
- e_dialog_spin_set (dialog->repeat_value, value);
- e_dialog_option_menu_set (dialog->repeat_unit, units, duration_units_map);
-}
-
-/* Fills the widgets with the values from the alarm component */
-static void
-alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
-{
- CalAlarmAction action;
-
- alarm_to_repeat_widgets (dialog, alarm);
-
- cal_component_alarm_get_action (alarm, &action);
-
- switch (action) {
- case CAL_ALARM_NONE:
- g_assert_not_reached ();
- return;
-
- case CAL_ALARM_AUDIO:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Audio Alarm Options"));
- gtk_widget_show (dialog->aalarm_group);
- gtk_widget_hide (dialog->dalarm_group);
- gtk_widget_hide (dialog->malarm_group);
- gtk_widget_hide (dialog->palarm_group);
- alarm_to_aalarm_widgets (dialog, alarm);
- break;
-
- case CAL_ALARM_DISPLAY:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Message Alarm Options"));
- gtk_widget_hide (dialog->aalarm_group);
- gtk_widget_show (dialog->dalarm_group);
- gtk_widget_hide (dialog->malarm_group);
- gtk_widget_hide (dialog->palarm_group);
- alarm_to_dalarm_widgets (dialog, alarm);
- break;
-
- case CAL_ALARM_EMAIL:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Mail Alarm Options"));
- gtk_widget_hide (dialog->aalarm_group);
- gtk_widget_hide (dialog->dalarm_group);
- gtk_widget_show (dialog->malarm_group);
- gtk_widget_hide (dialog->palarm_group);
- alarm_to_malarm_widgets (dialog, alarm);
- break;
-
- case CAL_ALARM_PROCEDURE:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Program Alarm Options"));
- gtk_widget_hide (dialog->aalarm_group);
- gtk_widget_hide (dialog->dalarm_group);
- gtk_widget_hide (dialog->malarm_group);
- gtk_widget_show (dialog->palarm_group);
- alarm_to_palarm_widgets (dialog, alarm);
- break;
-
- case CAL_ALARM_UNKNOWN:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Unknown Alarm Options"));
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-}
-
-
-
-/* Fills the alarm data with the values from the repeat/duration widgets */
-static void
-repeat_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
-{
- CalAlarmRepeat repeat;
-
- if (!e_dialog_toggle_get (dialog->repeat_toggle)) {
- repeat.repetitions = 0;
-
- cal_component_alarm_set_repeat (alarm, repeat);
- return;
- }
-
- repeat.repetitions = e_dialog_spin_get_int (dialog->repeat_quantity);
-
- memset (&repeat.duration, 0, sizeof (repeat.duration));
- switch (e_dialog_option_menu_get (dialog->repeat_unit, duration_units_map)) {
- case DUR_MINUTES:
- repeat.duration.minutes = e_dialog_spin_get_int (dialog->repeat_value);
- break;
-
- case DUR_HOURS:
- repeat.duration.hours = e_dialog_spin_get_int (dialog->repeat_value);
- break;
-
- case DUR_DAYS:
- repeat.duration.days = e_dialog_spin_get_int (dialog->repeat_value);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- cal_component_alarm_set_repeat (alarm, repeat);
-
-}
-
-/* Fills the audio alarm data with the values from the widgets */
-static void
-aalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
-{
- char *url;
- icalattach *attach;
-
- url = e_dialog_editable_get (dialog->aalarm_attach);
- attach = icalattach_new_from_url (url ? url : "");
- g_free (url);
-
- cal_component_alarm_set_attach (alarm, attach);
- icalattach_unref (attach);
-}
-
-/* Fills the display alarm data with the values from the widgets */
-static void
-dalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
-{
- char *str;
- CalComponentText description;
-
- str = e_dialog_editable_get (dialog->dalarm_description);
- description.value = str;
- description.altrep = NULL;
-
- cal_component_alarm_set_description (alarm, &description);
- g_free (str);
-}
-
-/* Fills the mail alarm data with the values from the widgets */
-static void
-malarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
-{
- /* FIXME: nothing for now; we don't support mail alarms */
-}
-
-/* Fills the procedure alarm data with the values from the widgets */
-static void
-palarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
-{
- char *program;
- icalattach *attach;
- char *str;
- CalComponentText description;
-
- program = e_dialog_editable_get (dialog->palarm_program);
- attach = icalattach_new_from_url (program ? program : "");
- g_free (program);
-
- cal_component_alarm_set_attach (alarm, attach);
- icalattach_unref (attach);
-
- str = e_dialog_editable_get (dialog->palarm_args);
- description.value = str;
- description.altrep = NULL;
-
- cal_component_alarm_set_description (alarm, &description);
- g_free (str);
-}
-
-/* Fills the alarm data with the values from the widgets */
-static void
-dialog_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
-{
- CalAlarmAction action;
-
- repeat_widgets_to_alarm (dialog, alarm);
-
- cal_component_alarm_get_action (alarm, &action);
-
- switch (action) {
- case CAL_ALARM_NONE:
- g_assert_not_reached ();
- break;
-
- case CAL_ALARM_AUDIO:
- aalarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case CAL_ALARM_DISPLAY:
- dalarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case CAL_ALARM_EMAIL:
- malarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case CAL_ALARM_PROCEDURE:
- palarm_widgets_to_alarm (dialog, alarm);
- break;
-
- case CAL_ALARM_UNKNOWN:
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-
-
-/**
- * alarm_options_dialog_run:
- * @alarm: Alarm that is to be edited.
- *
- * Runs an alarm options dialog modally.
- *
- * Return value: TRUE if the dialog could be created, FALSE otherwise.
- **/
-gboolean
-alarm_options_dialog_run (CalComponentAlarm *alarm)
-{
- Dialog dialog;
-
- g_return_val_if_fail (alarm != NULL, FALSE);
-
- dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-options.glade", NULL);
- if (!dialog.xml) {
- g_message ("alarm_options_dialog_new(): Could not load the Glade XML file!");
- return FALSE;
- }
-
- if (!get_widgets (&dialog)) {
- gtk_object_unref (GTK_OBJECT (dialog.xml));
- return FALSE;
- }
-
- init_widgets (&dialog);
-
- alarm_to_dialog (&dialog, alarm);
-
- gtk_widget_show (dialog.toplevel);
- gtk_main ();
-
- if (!dialog.canceled)
- dialog_to_alarm (&dialog, alarm);
-
- gtk_widget_destroy (dialog.toplevel);
- gtk_object_unref (GTK_OBJECT (dialog.xml));
-
- return TRUE;
-}
diff --git a/calendar/gui/dialogs/alarm-options.glade b/calendar/gui/dialogs/alarm-options.glade
deleted file mode 100644
index 02c5d3f953..0000000000
--- a/calendar/gui/dialogs/alarm-options.glade
+++ /dev/null
@@ -1,398 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Dialogs</name>
- <program_name>dialogs</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>alarm-options-toplevel</name>
- <title></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>True</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame1</name>
- <label>Alarm Repeat</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>hbox1</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>repeat-toggle</name>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <label>Repeat the alarm</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>repeat-group</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>repeat-quantity</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>999</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>label1</name>
- <label>extra times every</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>GtkSpinButton</class>
- <name>repeat-value</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>999</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>GtkOptionMenu</class>
- <name>repeat-unit</name>
- <can_focus>True</can_focus>
- <items>minutes
-hours
-days
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>dalarm-group</name>
- <visible>False</visible>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>Message to Display</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_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>dalarm-description</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>aalarm-group</name>
- <visible>False</visible>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Play sound:</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>GnomeFileEntry</class>
- <name>file-entry1</name>
- <max_saved>10</max_saved>
- <directory>False</directory>
- <modal>False</modal>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>aalarm-attach</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>
- <class>GtkLabel</class>
- <name>malarm-group</name>
- <visible>False</visible>
- <label>This is an email reminder, but Evolution does not yet support this kind of reminders. You will not be able to edit the options for this reminder.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>True</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>GtkHBox</class>
- <name>palarm-group</name>
- <visible>False</visible>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>Run program:</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>palarm-program</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>GtkLabel</class>
- <name>label6</name>
- <label>With these arguments:</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>palarm-args</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>GtkHButtonBox</class>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>30</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>button-ok</name>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-cancel</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/alarm-options.h b/calendar/gui/dialogs/alarm-options.h
deleted file mode 100644
index 36f945f684..0000000000
--- a/calendar/gui/dialogs/alarm-options.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Evolution calendar - Alarm options dialog
- *
- * 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 ALARM_OPTIONS_H
-#define ALARM_OPTIONS_H
-
-#include <cal-util/cal-component.h>
-
-gboolean alarm_options_dialog_run (CalComponentAlarm *alarm);
-
-#endif
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
deleted file mode 100644
index 649a86f025..0000000000
--- a/calendar/gui/dialogs/alarm-page.c
+++ /dev/null
@@ -1,849 +0,0 @@
-/* Evolution calendar - Alarm page of the calendar component dialogs
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#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 <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include "e-util/e-dialog-widgets.h"
-#include "cal-util/cal-util.h"
-#include "comp-editor-util.h"
-#include "alarm-options.h"
-#include "alarm-page.h"
-
-
-
-/* Private part of the AlarmPage structure */
-struct _AlarmPagePrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
-
- GtkWidget *main;
-
- GtkWidget *summary;
- GtkWidget *date_time;
-
- GtkWidget *list;
- GtkWidget *add;
- GtkWidget *delete;
-
- GtkWidget *action;
- GtkWidget *interval_value;
- GtkWidget *value_units;
- GtkWidget *relative;
- GtkWidget *time;
-
- GtkWidget *button_options;
-
- /* Alarm options dialog and the alarm we maintain */
- CalComponentAlarm *alarm;
-
- gboolean updating;
-};
-
-/* "relative" types */
-enum {
- BEFORE,
- AFTER
-};
-
-/* Time units */
-enum {
- MINUTES,
- HOURS,
- DAYS
-};
-
-/* Option menu maps */
-static const int action_map[] = {
- CAL_ALARM_DISPLAY,
- CAL_ALARM_AUDIO,
- CAL_ALARM_PROCEDURE,
- -1
-};
-
-static const int value_map[] = {
- MINUTES,
- HOURS,
- DAYS,
- -1
-};
-
-static const int relative_map[] = {
- BEFORE,
- AFTER,
- -1
-};
-
-static const int time_map[] = {
- CAL_ALARM_TRIGGER_RELATIVE_START,
- CAL_ALARM_TRIGGER_RELATIVE_END,
- -1
-};
-
-
-
-static void alarm_page_class_init (AlarmPageClass *class);
-static void alarm_page_init (AlarmPage *apage);
-static void alarm_page_destroy (GtkObject *object);
-
-static GtkWidget *alarm_page_get_widget (CompEditorPage *page);
-static void alarm_page_focus_main_widget (CompEditorPage *page);
-static void alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void alarm_page_fill_component (CompEditorPage *page, CalComponent *comp);
-static void alarm_page_set_summary (CompEditorPage *page, const char *summary);
-static void alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * alarm_page_get_type:
- *
- * Registers the #AlarmPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #AlarmPage class.
- **/
-GtkType
-alarm_page_get_type (void)
-{
- static GtkType alarm_page_type;
-
- if (!alarm_page_type) {
- static const GtkTypeInfo alarm_page_info = {
- "AlarmPage",
- sizeof (AlarmPage),
- sizeof (AlarmPageClass),
- (GtkClassInitFunc) alarm_page_class_init,
- (GtkObjectInitFunc) alarm_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- alarm_page_type = gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &alarm_page_info);
- }
-
- return alarm_page_type;
-}
-
-/* Class initialization function for the alarm page */
-static void
-alarm_page_class_init (AlarmPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = alarm_page_get_widget;
- editor_page_class->focus_main_widget = alarm_page_focus_main_widget;
- editor_page_class->fill_widgets = alarm_page_fill_widgets;
- editor_page_class->fill_component = alarm_page_fill_component;
- editor_page_class->set_summary = alarm_page_set_summary;
- editor_page_class->set_dates = alarm_page_set_dates;
-
- object_class->destroy = alarm_page_destroy;
-}
-
-/* Object initialization function for the alarm page */
-static void
-alarm_page_init (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = g_new0 (AlarmPagePrivate, 1);
- apage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
- priv->summary = NULL;
- priv->date_time = NULL;
- priv->list = NULL;
- priv->add = NULL;
- priv->delete = NULL;
- priv->action = NULL;
- priv->interval_value = NULL;
- priv->value_units = NULL;
- priv->relative = NULL;
- priv->time = NULL;
- priv->button_options = NULL;
-
- priv->alarm = cal_component_alarm_new ();
-
- priv->updating = FALSE;
-}
-
-/* Destroy handler for the alarm page */
-static void
-alarm_page_destroy (GtkObject *object)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ALARM_PAGE (object));
-
- apage = ALARM_PAGE (object);
- priv = apage->priv;
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- if (priv->alarm) {
- cal_component_alarm_free (priv->alarm);
- priv->alarm = NULL;
- }
-
- g_free (priv);
- apage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_widget handler for the alarm page */
-static GtkWidget *
-alarm_page_get_widget (CompEditorPage *page)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the alarm page */
-static void
-alarm_page_focus_main_widget (CompEditorPage *page)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- gtk_widget_grab_focus (priv->action);
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = apage->priv;
-
- /* Summary */
- gtk_label_set_text (GTK_LABEL (priv->summary), "");
-
- /* Start date */
- gtk_label_set_text (GTK_LABEL (priv->date_time), "");
-
- /* Sane defaults */
- e_dialog_option_menu_set (priv->action, CAL_ALARM_DISPLAY, action_map);
- e_dialog_spin_set (priv->interval_value, 15);
- e_dialog_option_menu_set (priv->value_units, MINUTES, value_map);
- e_dialog_option_menu_set (priv->relative, BEFORE, relative_map);
- e_dialog_option_menu_set (priv->time, CAL_ALARM_TRIGGER_RELATIVE_START, time_map);
-
- /* List data */
- gtk_clist_clear (GTK_CLIST (priv->list));
-}
-
-/* Builds a string for the duration of the alarm. If the duration is zero, returns NULL. */
-static char *
-get_alarm_duration_string (struct icaldurationtype *duration)
-{
- GString *string = g_string_new (NULL);
- char *ret;
- gboolean have_something;
-
- have_something = FALSE;
-
- if (duration->days > 1) {
- g_string_sprintf (string, _("%d days"), duration->days);
- have_something = TRUE;
- } else if (duration->days == 1) {
- g_string_append (string, _("1 day"));
- have_something = TRUE;
- }
-
- if (duration->weeks > 1) {
- g_string_sprintf (string, _("%d weeks"), duration->weeks);
- have_something = TRUE;
- } else if (duration->weeks == 1) {
- g_string_append (string, _("1 week"));
- have_something = TRUE;
- }
-
- if (duration->hours > 1) {
- g_string_sprintf (string, _("%d hours"), duration->hours);
- have_something = TRUE;
- } else if (duration->hours == 1) {
- g_string_append (string, _("1 hour"));
- have_something = TRUE;
- }
-
- if (duration->minutes > 1) {
- g_string_sprintf (string, _("%d minutes"), duration->minutes);
- have_something = TRUE;
- } else if (duration->minutes == 1) {
- g_string_append (string, _("1 minute"));
- have_something = TRUE;
- }
-
- if (duration->seconds > 1) {
- g_string_sprintf (string, _("%d seconds"), duration->seconds);
- have_something = TRUE;
- } else if (duration->seconds == 1) {
- g_string_append (string, _("1 second"));
- have_something = TRUE;
- }
-
- if (have_something) {
- ret = string->str;
- g_string_free (string, FALSE);
- return ret;
- } else {
- g_string_free (string, TRUE);
- return NULL;
- }
-}
-
-static char *
-get_alarm_string (CalComponentAlarm *alarm)
-{
- CalAlarmAction action;
- CalAlarmTrigger trigger;
- char string[256];
- char *base;
- char *str;
- 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:
- base = _("Play a sound");
- break;
-
- case CAL_ALARM_DISPLAY:
- base = _("Display a message");
- break;
-
- case CAL_ALARM_EMAIL:
- base = _("Send an email");
- break;
-
- case CAL_ALARM_PROCEDURE:
- base = _("Run a program");
- break;
-
- case CAL_ALARM_NONE:
- case CAL_ALARM_UNKNOWN:
- default:
- base = _("Unknown action to be performed");
- break;
- }
-
- /* FIXME: This does not look like it will localize correctly. */
-
- switch (trigger.type) {
- case CAL_ALARM_TRIGGER_RELATIVE_START:
- dur = get_alarm_duration_string (&trigger.u.rel_duration);
-
- if (dur) {
- if (trigger.u.rel_duration.is_neg)
- str = g_strdup_printf (_("%s %s before the start of the appointment"),
- base, dur);
- else
- str = g_strdup_printf (_("%s %s after the start of the appointment"),
- base, dur);
-
- g_free (dur);
- } else
- str = g_strdup_printf (_("%s at the start of the appointment"), base);
-
- break;
-
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- dur = get_alarm_duration_string (&trigger.u.rel_duration);
-
- if (dur) {
- if (trigger.u.rel_duration.is_neg)
- str = g_strdup_printf (_("%s %s before the end of the appointment"),
- base, dur);
- else
- str = g_strdup_printf (_("%s %s after the end of the appointment"),
- base, dur);
-
- g_free (dur);
- } else
- str = g_strdup_printf (_("%s at the end of the appointment"), base);
-
- break;
-
- case CAL_ALARM_TRIGGER_ABSOLUTE: {
- time_t t;
- struct tm tm;
- char *date;
-
- t = icaltime_as_timet (trigger.u.abs_time);
- if (t == -1)
- date = g_strdup_printf (_("%s at an unknown time"), base);
- else {
- char buf[256];
-
- tm = *localtime (&t);
- strftime (buf, sizeof (buf), "%A %b %d %Y %H:%M", &tm);
- date = g_strdup_printf (_("%s at %s"), base, buf);
- }
-
- break; }
-
- case CAL_ALARM_TRIGGER_NONE:
- default:
- str = g_strdup_printf (_("%s for an unknown trigger type"), base);
- break;
- }
-
- return str;
-}
-
-/* Appends an alarm to the list */
-static void
-append_reminder (AlarmPage *apage, CalComponentAlarm *alarm)
-{
- AlarmPagePrivate *priv;
- GtkCList *clist;
- char *c[1];
- int i;
-
- priv = apage->priv;
-
- clist = GTK_CLIST (priv->list);
-
- c[0] = get_alarm_string (alarm);
- i = gtk_clist_append (clist, c);
-
- gtk_clist_set_row_data_full (clist, i, alarm, (GtkDestroyNotify) cal_component_alarm_free);
- gtk_clist_select_row (clist, i, 0);
- g_free (c[0]);
-
- gtk_widget_set_sensitive (priv->delete, TRUE);
-}
-
-/* fill_widgets handler for the alarm page */
-static void
-alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- CalComponentText text;
- GList *alarms, *l;
- GtkCList *clist;
- CompEditorPageDates dates;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- /* Don't send off changes during this time */
- priv->updating = TRUE;
-
- /* Clean the page */
- clear_widgets (apage);
-
- /* Summary */
- cal_component_get_summary (comp, &text);
- alarm_page_set_summary (page, text.value);
-
- /* Dates */
- comp_editor_dates (&dates, comp);
- alarm_page_set_dates (page, &dates);
- comp_editor_free_dates (&dates);
-
- /* List */
- if (!cal_component_has_alarms (comp))
- goto out;
-
- alarms = cal_component_get_alarm_uids (comp);
-
- clist = GTK_CLIST (priv->list);
- for (l = alarms; l != NULL; l = l->next) {
- CalComponentAlarm *ca, *ca_copy;
- const char *auid;
-
- auid = l->data;
- ca = cal_component_get_alarm (comp, auid);
- g_assert (ca != NULL);
-
- ca_copy = cal_component_alarm_clone (ca);
- cal_component_alarm_free (ca);
-
- append_reminder (apage, ca_copy);
- }
- cal_obj_uid_list_free (alarms);
-
- out:
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the alarm page */
-static void
-alarm_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GList *list, *l;
- GtkCList *clist;
- int i;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- /* Remove all the alarms from the component */
-
- list = cal_component_get_alarm_uids (comp);
- for (l = list; l; l = l->next) {
- const char *auid;
-
- auid = l->data;
- cal_component_remove_alarm (comp, auid);
- }
- cal_obj_uid_list_free (list);
-
- /* Add the new alarms */
-
- clist = GTK_CLIST (priv->list);
- for (i = 0; i < clist->rows; i++) {
- CalComponentAlarm *alarm, *alarm_copy;
-
- alarm = gtk_clist_get_row_data (clist, i);
- g_assert (alarm != NULL);
-
- /* We clone the alarm to maintain the invariant that the alarm
- * structures in the list did *not* come from the component.
- */
-
- alarm_copy = cal_component_alarm_clone (alarm);
- cal_component_add_alarm (comp, alarm_copy);
- cal_component_alarm_free (alarm_copy);
- }
-}
-
-/* set_summary handler for the alarm page */
-static void
-alarm_page_set_summary (CompEditorPage *page, const char *summary)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- gchar *s;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- s = e_utf8_to_gtk_string (priv->summary, summary);
- gtk_label_set_text (GTK_LABEL (priv->summary), s);
- g_free (s);
-}
-
-/* set_dates handler for the alarm page */
-static void
-alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- comp_editor_date_label (dates, priv->date_time);
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = apage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("alarm-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
- priv->summary = GW ("summary");
- priv->date_time = GW ("date-time");
-
- priv->list = GW ("list");
- priv->add = GW ("add");
- priv->delete = GW ("delete");
-
- priv->action = GW ("action");
- priv->interval_value = GW ("interval-value");
- priv->value_units = GW ("value-units");
- priv->relative = GW ("relative");
- priv->time = GW ("time");
-
- priv->button_options = GW ("button-options");
-
-#undef GW
-
- return (priv->summary
- && priv->date_time
- && priv->list
- && priv->add
- && priv->delete
- && priv->action
- && priv->interval_value
- && priv->value_units
- && priv->relative
- && priv->time
- && priv->button_options);
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed_cb (GtkWidget *widget, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (apage));
-}
-
-/* Callback used for the "add reminder" button */
-static void
-add_clicked_cb (GtkButton *button, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- alarm = cal_component_alarm_clone (priv->alarm);
-
- memset (&trigger, 0, sizeof (CalAlarmTrigger));
- trigger.type = e_dialog_option_menu_get (priv->time, time_map);
- if (e_dialog_option_menu_get (priv->relative, 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->value_units, value_map)) {
- case MINUTES:
- trigger.u.rel_duration.minutes =
- e_dialog_spin_get_int (priv->interval_value);
- break;
-
- case HOURS:
- trigger.u.rel_duration.hours =
- e_dialog_spin_get_int (priv->interval_value);
- break;
-
- case DAYS:
- trigger.u.rel_duration.days =
- e_dialog_spin_get_int (priv->interval_value);
- break;
-
- default:
- g_assert_not_reached ();
- }
- cal_component_alarm_set_trigger (alarm, trigger);
-
- cal_component_alarm_set_action (alarm, e_dialog_option_menu_get (priv->action, action_map));
-
- append_reminder (apage, alarm);
-}
-
-/* Callback used for the "delete reminder" button */
-static void
-delete_clicked_cb (GtkButton *button, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkCList *clist;
- int sel;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- clist = GTK_CLIST (priv->list);
- if (!clist->selection)
- return;
-
- sel = GPOINTER_TO_INT (clist->selection->data);
-
- 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->delete, FALSE);
-}
-
-/* Callback used when the alarm options button is clicked */
-static void
-button_options_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- cal_component_alarm_set_action (priv->alarm,
- e_dialog_option_menu_get (priv->action, action_map));
-
- if (!alarm_options_dialog_run (priv->alarm))
- g_message ("button_options_clicked_cb(): Could not create the alarm options dialog");
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = apage->priv;
-
- /* Reminder buttons */
- gtk_signal_connect (GTK_OBJECT (priv->add), "clicked",
- GTK_SIGNAL_FUNC (add_clicked_cb), apage);
- gtk_signal_connect (GTK_OBJECT (priv->delete), "clicked",
- GTK_SIGNAL_FUNC (delete_clicked_cb), apage);
-
- /* Connect the default signal handler to use to make sure we notify
- * upstream of changes to the widget values.
- */
- gtk_signal_connect (GTK_OBJECT (priv->add), "clicked",
- GTK_SIGNAL_FUNC (field_changed_cb), apage);
- gtk_signal_connect (GTK_OBJECT (priv->delete), "clicked",
- GTK_SIGNAL_FUNC (field_changed_cb), apage);
-
- /* Options button */
- gtk_signal_connect (GTK_OBJECT (priv->button_options), "clicked",
- GTK_SIGNAL_FUNC (button_options_clicked_cb), apage);
-}
-
-
-
-/**
- * alarm_page_construct:
- * @apage: An alarm page.
- *
- * Constructs an alarm page by loading its Glade data.
- *
- * Return value: The same object as @apage, or NULL if the widgets could not be
- * created.
- **/
-AlarmPage *
-alarm_page_construct (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = apage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-page.glade",
- NULL);
- if (!priv->xml) {
- g_message ("alarm_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (apage)) {
- g_message ("alarm_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- init_widgets (apage);
-
- return apage;
-}
-
-/**
- * alarm_page_new:
- *
- * Creates a new alarm page.
- *
- * Return value: A newly-created alarm page, or NULL if the page could not be
- * created.
- **/
-AlarmPage *
-alarm_page_new (void)
-{
- AlarmPage *apage;
-
- apage = gtk_type_new (TYPE_ALARM_PAGE);
- if (!alarm_page_construct (apage)) {
- gtk_object_unref (GTK_OBJECT (apage));
- return NULL;
- }
-
- return apage;
-}
diff --git a/calendar/gui/dialogs/alarm-page.glade b/calendar/gui/dialogs/alarm-page.glade
deleted file mode 100644
index 56c6f6ada1..0000000000
--- a/calendar/gui/dialogs/alarm-page.glade
+++ /dev/null
@@ -1,381 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>alarm-page</name>
- <program_name>alarm-page</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>GtkWindow</class>
- <name>alarm-toplevel</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>GtkVBox</class>
- <name>alarm-page</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame33</name>
- <label>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>Summary:</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>label63</name>
- <label>Date/Time:</label>
- <justify>GTK_JUSTIFY_CENTER</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>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>summary</name>
- <width>10</width>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>4</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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>date-time</name>
- <width>10</width>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- <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>
- </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>action</name>
- <can_focus>True</can_focus>
- <items>Display a message
-Play a sound
-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>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>999</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>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>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>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>button-options</name>
- <can_focus>True</can_focus>
- <label>_Options...</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>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>add</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Add</label>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>delete</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/alarm-page.h b/calendar/gui/dialogs/alarm-page.h
deleted file mode 100644
index 97c1361f4d..0000000000
--- a/calendar/gui/dialogs/alarm-page.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Evolution calendar - Alarm page of the calendar component dialogs
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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 ALARM_PAGE_H
-#define ALARM_PAGE_H
-
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_ALARM_PAGE (alarm_page_get_type ())
-#define ALARM_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_ALARM_PAGE, AlarmPage))
-#define ALARM_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_ALARM_PAGE, AlarmPageClass))
-#define IS_ALARM_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_ALARM_PAGE))
-#define IS_ALARM_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_ALARM_PAGE))
-
-typedef struct _AlarmPagePrivate AlarmPagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- AlarmPagePrivate *priv;
-} AlarmPage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} AlarmPageClass;
-
-
-GtkType alarm_page_get_type (void);
-AlarmPage *alarm_page_construct (AlarmPage *apage);
-AlarmPage *alarm_page_new (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
deleted file mode 100644
index 2cd3872881..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ /dev/null
@@ -1,666 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Ximian, 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 <libgnomeui/gnome-color-picker.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 "../e-timezone-entry.h"
-#include "cal-prefs-dialog.h"
-#include "../calendar-config.h"
-#include "../calendar-commands.h"
-#include "../e-tasks.h"
-
-
-struct _CalPrefsDialogPrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- GtkWidget *dialog;
-
- GtkWidget *toplevel_notebook;
-
- GtkWidget *timezone;
- 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;
-
- /* Widgets for the task list options */
- GtkWidget *tasks_due_today_color;
- GtkWidget *tasks_overdue_color;
-
- GtkWidget *tasks_hide_completed_checkbutton;
- GtkWidget *tasks_hide_completed_spinbutton;
- GtkWidget *tasks_hide_completed_optionmenu;
-
- /* Other page options */
- GtkWidget *confirm_delete;
- GtkWidget *default_reminder;
- GtkWidget *default_reminder_interval;
- GtkWidget *default_reminder_units;
-};
-
-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 const int hide_completed_units_map[] = {
- CAL_MINUTES, CAL_HOURS, CAL_DAYS, -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_hide_completed_tasks_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:
- * @page: Page to show when the dialog is popped up.
- *
- * Creates a new #CalPrefsDialog.
- *
- * Return value: a new #CalPrefsDialog.
- **/
-CalPrefsDialog *
-cal_prefs_dialog_new (CalPrefsDialogPage page)
-{
- CalPrefsDialog *prefs;
-
- prefs = CAL_PREFS_DIALOG (gtk_type_new (cal_prefs_dialog_get_type ()));
- return cal_prefs_dialog_construct (prefs, page);
-}
-
-
-/**
- * cal_prefs_dialog_construct:
- * @prefs: A #CalPrefsDialog.
- * @page: Page to show when the dialog is popped up.
- *
- * 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, CalPrefsDialogPage page)
-{
- 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);
-
- cal_prefs_dialog_show (prefs, page);
-
- 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");
-
- priv->toplevel_notebook = GW ("toplevel-notebook");
-
- /* The indices must be 0 (Sun) to 6 (Sat). */
- 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->timezone = GW ("timezone");
- 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");
-
- priv->tasks_due_today_color = GW ("tasks_due_today_color");
- priv->tasks_overdue_color = GW ("tasks_overdue_color");
-
- priv->tasks_hide_completed_checkbutton = GW ("tasks-hide-completed-checkbutton");
- priv->tasks_hide_completed_spinbutton = GW ("tasks-hide-completed-spinbutton");
- priv->tasks_hide_completed_optionmenu = GW ("tasks-hide-completed-optionmenu");
-
- priv->confirm_delete = GW ("confirm-delete");
- priv->default_reminder = GW ("default-reminder");
- priv->default_reminder_interval = GW ("default-reminder-interval");
- priv->default_reminder_units = GW ("default-reminder-units");
-
-#undef GW
-
- return (priv->dialog
- && priv->toplevel_notebook
- && priv->timezone
- && 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
- && priv->tasks_due_today_color
- && priv->tasks_overdue_color
- && priv->tasks_hide_completed_checkbutton
- && priv->tasks_hide_completed_spinbutton
- && priv->tasks_hide_completed_optionmenu
- && priv->confirm_delete
- && priv->default_reminder
- && priv->default_reminder_interval
- && priv->default_reminder_units);
-}
-
-
-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, CalPrefsDialogPage page)
-{
- CalPrefsDialogPrivate *priv;
- int page_num;
-
- 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);
- }
-
- switch (page) {
- case CAL_PREFS_DIALOG_PAGE_CALENDAR:
- page_num = 0;
- break;
-
- case CAL_PREFS_DIALOG_PAGE_TASKS:
- page_num = 2;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->toplevel_notebook), page_num);
-}
-
-
-/* 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);
-
- gtk_signal_connect (GTK_OBJECT (priv->tasks_hide_completed_checkbutton),
- "toggled",
- GTK_SIGNAL_FUNC (cal_prefs_dialog_hide_completed_tasks_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);
-
- /* FIXME: Handle button 3 (Help). */
-
-}
-
-
-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);
-}
-
-static void
-cal_prefs_dialog_hide_completed_tasks_toggled (GtkWidget *button,
- CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- gboolean hide_completed_tasks;
-
- priv = prefs->priv;
-
- hide_completed_tasks = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->tasks_hide_completed_checkbutton));
-
- gtk_widget_set_sensitive (priv->tasks_hide_completed_spinbutton,
- hide_completed_tasks);
- gtk_widget_set_sensitive (priv->tasks_hide_completed_optionmenu,
- hide_completed_tasks);
-}
-
-/* Sets the color in a color picker from an X color spec */
-static void
-set_color_picker (GtkWidget *picker, const char *spec)
-{
- GdkColor color;
-
- g_assert (spec != NULL);
-
- if (!gdk_color_parse (spec, &color)) {
- color.red = color.green = color.blue = 0;
- return;
- }
-
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (picker),
- color.red,
- color.green,
- color.blue,
- 65535);
-}
-
-/* Shows the current task list settings in the dialog */
-static void
-show_task_list_config (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- CalUnits units;
- gboolean hide_completed_tasks;
-
- priv = prefs->priv;
-
- set_color_picker (priv->tasks_due_today_color, calendar_config_get_tasks_due_today_color ());
- set_color_picker (priv->tasks_overdue_color, calendar_config_get_tasks_overdue_color ());
-
- /* Hide Completed Tasks. */
- hide_completed_tasks = calendar_config_get_hide_completed_tasks ();
- e_dialog_toggle_set (priv->tasks_hide_completed_checkbutton,
- hide_completed_tasks);
-
- /* Hide Completed Tasks Units. */
- units = calendar_config_get_hide_completed_tasks_units ();
- e_dialog_option_menu_set (priv->tasks_hide_completed_optionmenu,
- units, hide_completed_units_map);
-
- /* Hide Completed Tasks Value. */
- e_dialog_spin_set (priv->tasks_hide_completed_spinbutton,
- calendar_config_get_hide_completed_tasks_value ());
-
- gtk_widget_set_sensitive (priv->tasks_hide_completed_spinbutton,
- hide_completed_tasks);
- gtk_widget_set_sensitive (priv->tasks_hide_completed_optionmenu,
- hide_completed_tasks);
-}
-
-/* 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;
- char *zone_name;
- icaltimezone *zone;
- gboolean sensitive;
-
- priv = prefs->priv;
-
- /* Timezone. */
- zone_name = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (zone_name);
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->timezone),
- zone);
-
- /* Working Days. */
- working_days = calendar_config_get_working_days ();
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- e_dialog_toggle_set (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 ())
- e_dialog_toggle_set (priv->use_24_hour, TRUE);
- else
- e_dialog_toggle_set (priv->use_12_hour, TRUE);
-
- sensitive = calendar_config_locale_supports_12_hour_format ();
- gtk_widget_set_sensitive (priv->use_12_hour, sensitive);
- gtk_widget_set_sensitive (priv->use_24_hour, sensitive);
-
-
- /* 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. */
- e_dialog_toggle_set (priv->show_end_times, calendar_config_get_show_event_end ());
-
- /* Compress Weekend. */
- e_dialog_toggle_set (priv->compress_weekend, calendar_config_get_compress_weekend ());
-
- /* Date Navigator - Show Week Numbers. */
- e_dialog_toggle_set (priv->dnav_show_week_no, calendar_config_get_dnav_show_week_no ());
-
- /* Task list */
-
- show_task_list_config (prefs);
-
- /* Other page */
-
- e_dialog_toggle_set (priv->confirm_delete, calendar_config_get_confirm_delete ());
-}
-
-/* Returns a pointer to a static string with an X color spec for the current
- * value of a color picker.
- */
-static const char *
-spec_from_picker (GtkWidget *picker)
-{
- static char spec[8];
- guint8 r, g, b;
-
- gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (picker), &r, &g, &b, NULL);
- g_snprintf (spec, sizeof (spec), "#%02x%02x%02x", r, g, b);
-
- return spec;
-}
-
-/* Updates the task list config values from the settings in the dialog */
-static void
-update_task_list_config (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = prefs->priv;
-
- calendar_config_set_tasks_due_today_color (spec_from_picker (priv->tasks_due_today_color));
- calendar_config_set_tasks_overdue_color (spec_from_picker (priv->tasks_overdue_color));
-
- calendar_config_set_hide_completed_tasks (e_dialog_toggle_get (priv->tasks_hide_completed_checkbutton));
- calendar_config_set_hide_completed_tasks_units (e_dialog_option_menu_get (priv->tasks_hide_completed_optionmenu, hide_completed_units_map));
- calendar_config_set_hide_completed_tasks_value (e_dialog_spin_get_int (priv->tasks_hide_completed_spinbutton));
-}
-
-/* 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;
- icaltimezone *zone;
-
- priv = prefs->priv;
-
- /* Timezone. */
- zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->timezone));
- calendar_config_set_timezone (icaltimezone_get_location (zone));
-
- /* Working Days. */
- working_days = 0;
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- if (e_dialog_toggle_get (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 (e_dialog_toggle_get (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 (e_dialog_toggle_get (priv->show_end_times));
-
- /* Compress Weekend. */
- calendar_config_set_compress_weekend (e_dialog_toggle_get (priv->compress_weekend));
-
- /* Date Navigator - Show Week Numbers. */
- calendar_config_set_dnav_show_week_no (e_dialog_toggle_get (priv->dnav_show_week_no));
-
- /* Task list */
- update_task_list_config (prefs);
-
- /* Other page */
-
- calendar_config_set_confirm_delete (e_dialog_toggle_get (priv->confirm_delete));
-
- /* Done */
-
- 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 a6eb2ceb66..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ /dev/null
@@ -1,984 +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 and Tasks Settings</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>
- <class>GtkButton</class>
- <name>button4</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>toplevel-notebook</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>vbox10</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame12</name>
- <label>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>GtkTable</class>
- <name>table5</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label22</name>
- <label>Time _zone:</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>timezone</name>
- <creation_function>make_timezone_entry</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Wed, 20 Jun 2001 02:22:46 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>True</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>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>GtkHBox</class>
- <name>hbox10</name>
- <homogeneous>True</homogeneous>
- <spacing>4</spacing>
- <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>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>
- </widget>
-
- <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>T_ue</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>T_hu</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>Su_n</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 wee_k:</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>first_day_of_week</default_focus_target>
- <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>Sta_rt 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>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label21</name>
- <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>GtkVBox</class>
- <name>vbox8</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox12</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label25</name>
- <label>Time di_visions:</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>time_divisions</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <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>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>show_end_times</name>
- <can_focus>True</can_focus>
- <label>Show appointment _end times in week and month views</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>compress_weekend</name>
- <can_focus>True</can_focus>
- <label>_Compress weekends in month view</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>dnav_show_week_no</name>
- <can_focus>True</can_focus>
- <label>Show week _numbers in date navigator</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>label7</name>
- <label>_Display</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>8</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table6</name>
- <rows>2</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>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label23</name>
- <label>Tas_ks due today:</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>tasks_due_today_color</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>label24</name>
- <label>O_verdue tasks:</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>tasks_overdue_color</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>tasks_due_today_color</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Color for tasks due today</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>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>tasks_overdue_color</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Color for overdue tasks</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>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox14</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>tasks-hide-completed-checkbutton</name>
- <can_focus>True</can_focus>
- <label>_Hide completed tasks 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>tasks-hide-completed-spinbutton</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>0</value>
- <lower>0</lower>
- <upper>9999</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>tasks-hide-completed-optionmenu</name>
- <can_focus>True</can_focus>
- <items>Minutes
-Hours
-Days
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label11</name>
- <label>_Task List</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>vbox11</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>confirm-delete</name>
- <can_focus>True</can_focus>
- <label>_Ask for confirmation when deleting 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>default-reminder</name>
- <can_focus>True</can_focus>
- <label>Create new appointments with a default _reminder</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox13</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <width>17</width>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>default-reminder-interval</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>0</value>
- <lower>0</lower>
- <upper>9999</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>default-reminder-units</name>
- <can_focus>True</can_focus>
- <items>Minutes
-Hours
-Days
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label27</name>
- <label>before the start of the appointment</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>
- <child_name>Notebook:tab</child_name>
- <name>label26</name>
- <label>_Other</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 88d3b10249..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Ximian, 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;
-
-typedef struct _CalPrefsDialogPrivate CalPrefsDialogPrivate;
-
-typedef enum {
- CAL_PREFS_DIALOG_PAGE_CALENDAR,
- CAL_PREFS_DIALOG_PAGE_TASKS
-} CalPrefsDialogPage;
-
-struct _CalPrefsDialog
-{
- GtkObject object;
-
- /*< private >*/
- CalPrefsDialogPrivate *priv;
-};
-
-struct _CalPrefsDialogClass
-{
- GtkObjectClass parent_class;
-};
-
-
-GtkType cal_prefs_dialog_get_type (void);
-CalPrefsDialog* cal_prefs_dialog_construct (CalPrefsDialog *prefs, CalPrefsDialogPage page);
-CalPrefsDialog* cal_prefs_dialog_new (CalPrefsDialogPage page);
-
-void cal_prefs_dialog_show (CalPrefsDialog *prefs, CalPrefsDialogPage page);
-
-END_GNOME_DECLS
-
-#endif /* _CAL_PREFS_DIALOG_H_ */
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
deleted file mode 100644
index 4362f9da7f..0000000000
--- a/calendar/gui/dialogs/cancel-comp.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Evolution calendar - Send calendar component dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: 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.
- */
-
-#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 "cancel-comp.h"
-
-
-
-/**
- * cancel_component_dialog:
- *
- * Pops up a dialog box asking the user whether he wants to send a
- * cancel and delete an iTip/iMip message
- *
- * Return value: TRUE if the user clicked Yes, FALSE otherwise.
- **/
-gboolean
-cancel_component_dialog (CalComponent *comp)
-{
- GtkWidget *dialog;
- CalComponentVType vtype;
- char *str;
-
- str = _("The meeting status has changed. Send an updated version?");
-
- vtype = cal_component_get_vtype (comp);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this meeting?"));
- break;
-
- case CAL_COMPONENT_TODO:
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this task?"));
- break;
-
- case CAL_COMPONENT_JOURNAL:
- str = g_strdup_printf (_("Are you sure you want to cancel "
- "and delete this journal entry?"));
- break;
-
- default:
- g_message ("send_component_dialog(): "
- "Cannot handle object of type %d", vtype);
- return FALSE;
- }
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
-
- if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
- return TRUE;
- else
- return FALSE;
-}
diff --git a/calendar/gui/dialogs/cancel-comp.h b/calendar/gui/dialogs/cancel-comp.h
deleted file mode 100644
index 04f1768e3d..0000000000
--- a/calendar/gui/dialogs/cancel-comp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Send calendar component dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: 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 CANCEL_COMP_H
-#define CANCEL_COMP_H
-
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-gboolean cancel_component_dialog (CalComponent *comp);
-
-#endif
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
deleted file mode 100644
index a9be39c008..0000000000
--- a/calendar/gui/dialogs/changed-comp.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Evolution calendar - Send calendar component dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: 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.
- */
-
-#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 "changed-comp.h"
-
-
-
-/**
- * changed_component_dialog:
- * @comp: A calendar component
- * @deleted: Whether the object is being deleted or updated
- * @changed: Whether or not the user has made changes
- *
- * Pops up a dialog box asking the user whether changes made (if any)
- * should be thrown away because the item has been updated elsewhere
- *
- * Return value: TRUE if the user clicked Yes, FALSE otherwise.
- **/
-gboolean
-changed_component_dialog (CalComponent *comp, gboolean deleted, gboolean changed)
-{
- GtkWidget *dialog;
- CalComponentVType vtype;
- char *str;
-
- vtype = cal_component_get_vtype (comp);
-
- if (deleted) {
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- str = _("This event has been deleted.");
- break;
-
- case CAL_COMPONENT_TODO:
- str = _("This task has been deleted.");
- break;
-
- case CAL_COMPONENT_JOURNAL:
- str = _("This journal entry has been deleted.");
- break;
-
- default:
- g_message ("changed_component_dialog(): "
- "Cannot handle object of type %d", vtype);
- return FALSE;
- }
- if (changed)
- str = g_strdup_printf (_("%s You have made changes. Forget those changes and close the editor?"), str);
- else
- str = g_strdup_printf (_("%s You have made no changes, close the editor?"), str);
-
- } else {
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- str = _("This event has been changed.");
- break;
-
- case CAL_COMPONENT_TODO:
- str = _("This task has been changed.");
- break;
-
- case CAL_COMPONENT_JOURNAL:
- str = _("This journal entry has been changed.");
- break;
-
- default:
- g_message ("changed_component_dialog(): "
- "Cannot handle object of type %d", vtype);
- return FALSE;
- }
- if (changed)
- str = g_strdup_printf (_("%s You have made changes. Forget those changes and update the editor?"), str);
- else
- str = g_strdup_printf (_("%s You have made no changes, update the editor?"), str);
- }
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
-
- if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
- return TRUE;
- else
- return FALSE;
-}
diff --git a/calendar/gui/dialogs/changed-comp.h b/calendar/gui/dialogs/changed-comp.h
deleted file mode 100644
index 7a1cb3e151..0000000000
--- a/calendar/gui/dialogs/changed-comp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Changed calendar component dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: 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 CHANGED_COMP_H
-#define CHANGED_COMP_H
-
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-gboolean changed_component_dialog (CalComponent *comp, gboolean deleted, gboolean changed);
-
-#endif
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
deleted file mode 100644
index 27f4041d3a..0000000000
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/* Evolution calendar - Base class for calendar component editor pages
- *
- * 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/gtksignal.h>
-#include "comp-editor-page.h"
-
-
-
-static void comp_editor_page_class_init (CompEditorPageClass *class);
-static void comp_editor_page_init (CompEditorPage *page);
-static void comp_editor_page_destroy (GtkObject *object);
-
-static GtkObjectClass *parent_class = NULL;
-
-/* Signal IDs */
-
-enum {
- CHANGED,
- NEEDS_SEND,
- SUMMARY_CHANGED,
- DATES_CHANGED,
- LAST_SIGNAL
-};
-
-static guint comp_editor_page_signals[LAST_SIGNAL];
-
-#define CLASS(page) (COMP_EDITOR_PAGE_CLASS (GTK_OBJECT (page)->klass))
-
-
-
-/**
- * comp_editor_page_get_type:
- *
- * Registers the #CompEditorPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CompEditorPage class.
- **/
-GtkType
-comp_editor_page_get_type (void)
-{
- static GtkType comp_editor_page_type = 0;
-
- if (!comp_editor_page_type) {
- static const GtkTypeInfo comp_editor_page_info = {
- "CompEditorPage",
- sizeof (CompEditorPage),
- sizeof (CompEditorPageClass),
- (GtkClassInitFunc) comp_editor_page_class_init,
- (GtkObjectInitFunc) comp_editor_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- comp_editor_page_type =
- gtk_type_unique (GTK_TYPE_OBJECT,
- &comp_editor_page_info);
- }
-
- return comp_editor_page_type;
-}
-
-/* Class initialization function for the abstract editor page */
-static void
-comp_editor_page_class_init (CompEditorPageClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- comp_editor_page_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CompEditorPageClass,
- changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- comp_editor_page_signals[NEEDS_SEND] =
- gtk_signal_new ("needs_send",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CompEditorPageClass,
- needs_send),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- comp_editor_page_signals[SUMMARY_CHANGED] =
- gtk_signal_new ("summary_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CompEditorPageClass,
- summary_changed),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- comp_editor_page_signals[DATES_CHANGED] =
- gtk_signal_new ("dates_changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CompEditorPageClass,
- dates_changed),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class,
- comp_editor_page_signals,
- LAST_SIGNAL);
-
- class->changed = NULL;
- class->summary_changed = NULL;
- class->dates_changed = NULL;
-
- class->get_widget = NULL;
- class->focus_main_widget = NULL;
- class->fill_widgets = NULL;
- class->fill_component = NULL;
- class->set_summary = NULL;
- class->set_dates = NULL;
-
- object_class->destroy = comp_editor_page_destroy;
-}
-
-
-
-static void
-comp_editor_page_init (CompEditorPage *page)
-{
- page->client = NULL;
-}
-
-
-static void
-comp_editor_page_destroy (GtkObject *object)
-{
- CompEditorPage *page;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (object));
-
- page = COMP_EDITOR_PAGE (object);
-
- if (page->client) {
- gtk_object_ref (GTK_OBJECT (page->client));
- page->client = NULL;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/**
- * comp_editor_page_get_widget:
- * @page: An editor page.
- *
- * Queries the main widget of an editor page.
- *
- * Return value: The widget that is the page's upper container. It should
- * normally be inserted in a notebook widget.
- **/
-GtkWidget *
-comp_editor_page_get_widget (CompEditorPage *page)
-{
- g_return_val_if_fail (page != NULL, NULL);
- g_return_val_if_fail (IS_COMP_EDITOR_PAGE (page), NULL);
-
- g_assert (CLASS (page)->get_widget != NULL);
- return (* CLASS (page)->get_widget) (page);
-}
-
-/**
- * comp_editor_page_focus_main_widget:
- * @page: An editor page.
- *
- * Makes an editor page focus its main widget. This is used by the component
- * editor when it first pops up so that it can focus the main widget in the
- * first page.
- **/
-void
-comp_editor_page_focus_main_widget (CompEditorPage *page)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- g_assert (CLASS (page)->focus_main_widget != NULL);
- (* CLASS (page)->focus_main_widget) (page);
-}
-
-/**
- * comp_editor_page_fill_widgets:
- * @page: An editor page.
- * @comp: A calendar component.
- *
- * Fills the widgets of an editor page with the data from a calendar component.
- **/
-void
-comp_editor_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- g_return_if_fail (comp != NULL);
-
- g_assert (CLASS (page)->fill_widgets != NULL);
- (* CLASS (page)->fill_widgets) (page, comp);
-}
-
-/**
- * comp_editor_page_fill_component:
- * @page: An editor page.
- * @comp: A calendar component.
- *
- * Takes the data from the widgets of an editor page and sets it on a calendar
- * component, replacing the contents of the properties that the editor page
- * knows how to manipulate.
- **/
-void
-comp_editor_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- g_return_if_fail (comp != NULL);
-
- if (CLASS (page)->fill_component != NULL)
- (* CLASS (page)->fill_component) (page, comp);
-}
-
-/**
- * comp_editor_page_set_cal_client:
- * @page: An editor page
- * @client: A #CalClient object
- *
- * Sets the #CalClient for the dialog page to use.
- **/
-void
-comp_editor_page_set_cal_client (CompEditorPage *page, CalClient *client)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- if (page->client)
- gtk_object_unref (GTK_OBJECT (client));
-
- page->client = client;
- if (page->client)
- gtk_object_ref (GTK_OBJECT (client));
-}
-
-/**
- * comp_editor_page_set_summary:
- * @page: An editor page
- * @summary: The text of the new summary value
- *
- * Sets the summary value for this group of widgets
- **/
-void
-comp_editor_page_set_summary (CompEditorPage *page, const char *summary)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- if (CLASS (page)->set_summary != NULL)
- (* CLASS (page)->set_summary) (page, summary);
-}
-
-/**
- * comp_editor_page_set_dates:
- * @page: An editor page
- * @dates: A collection of various dates in time_t format
- *
- * Sets the date values for this group of widgets
- **/
-void
-comp_editor_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- if (CLASS (page)->set_dates != NULL)
- (* CLASS (page)->set_dates) (page, dates);
-}
-
-/**
- * comp_editor_page_notify_changed:
- * @page: An editor page.
- *
- * Makes an editor page emit the "changed" signal. This is meant to be
- * used only by page implementations.
- **/
-void
-comp_editor_page_notify_changed (CompEditorPage *page)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[CHANGED]);
-}
-
-/**
- * comp_editor_page_notify_needs_send:
- * @page:
- *
- *
- **/
-void
-comp_editor_page_notify_needs_send (CompEditorPage *page)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[NEEDS_SEND]);
-}
-
-/**
- * comp_editor_page_notify_summary_changed:
- * @page: An editor page.
- *
- * Makes an editor page emit the "summary_changed" signal. This is meant to be
- * used only by page implementations.
- **/
-void
-comp_editor_page_notify_summary_changed (CompEditorPage *page,
- const char *summary)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
-
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[SUMMARY_CHANGED],
- summary);
-}
-
-/**
- * comp_editor_page_notify_dates_changed:
- * @page: An editor page.
- *
- * Makes an editor page emit the "dates_changed" signal. This is meant to be
- * used only by page implementations.
- **/
-void
-comp_editor_page_notify_dates_changed (CompEditorPage *page,
- CompEditorPageDates *dates)
-{
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- gtk_signal_emit (GTK_OBJECT (page),
- comp_editor_page_signals[DATES_CHANGED],
- dates);
-}
diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h
deleted file mode 100644
index af8fe1f389..0000000000
--- a/calendar/gui/dialogs/comp-editor-page.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Evolution calendar - Base class for calendar component editor pages
- *
- * 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 COMP_EDITOR_PAGE_H
-#define COMP_EDITOR_PAGE_H
-
-#include <time.h>
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
-#include "cal-client.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_COMP_EDITOR_PAGE (comp_editor_page_get_type ())
-#define COMP_EDITOR_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPage))
-#define COMP_EDITOR_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_COMP_EDITOR_PAGE, CompEditorPageClass))
-#define IS_COMP_EDITOR_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_COMP_EDITOR_PAGE))
-#define IS_COMP_EDITOR_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_COMP_EDITOR_PAGE))
-
-typedef struct {
- CalComponentDateTime *start;
- CalComponentDateTime *end;
- CalComponentDateTime *due;
- struct icaltimetype *complete;
-} CompEditorPageDates;
-
-typedef struct {
- GtkObject object;
-
- /* Some of the pages need the CalClient to access timezone data. */
- CalClient *client;
-} CompEditorPage;
-
-typedef struct {
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* changed) (CompEditorPage *page);
- void (* needs_send) (CompEditorPage *page);
-
- void (* summary_changed) (CompEditorPage *page, const char *summary);
- void (* dates_changed) (CompEditorPage *page, const char *dates);
-
- /* Virtual methods */
-
- GtkWidget *(* get_widget) (CompEditorPage *page);
- void (* focus_main_widget) (CompEditorPage *page);
-
- void (* fill_widgets) (CompEditorPage *page, CalComponent *comp);
- void (* fill_component) (CompEditorPage *page, CalComponent *comp);
-
- void (* set_summary) (CompEditorPage *page, const char *summary);
- void (* set_dates) (CompEditorPage *page, CompEditorPageDates *dates);
-} CompEditorPageClass;
-
-
-GtkType comp_editor_page_get_type (void);
-GtkWidget *comp_editor_page_get_widget (CompEditorPage *page);
-void comp_editor_page_focus_main_widget (CompEditorPage *page);
-void comp_editor_page_fill_widgets (CompEditorPage *page,
- CalComponent *comp);
-void comp_editor_page_fill_component (CompEditorPage *page,
- CalComponent *comp);
-void comp_editor_page_set_cal_client (CompEditorPage *page,
- CalClient *client);
-void comp_editor_page_set_summary (CompEditorPage *page,
- const char *summary);
-void comp_editor_page_set_dates (CompEditorPage *page,
- CompEditorPageDates *dates);
-void comp_editor_page_notify_changed (CompEditorPage *page);
-void comp_editor_page_notify_needs_send (CompEditorPage *page);
-void comp_editor_page_notify_summary_changed (CompEditorPage *page,
- const char *summary);
-void comp_editor_page_notify_dates_changed (CompEditorPage *page,
- CompEditorPageDates *dates);
-
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
deleted file mode 100644
index 5d10942a5e..0000000000
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/* Evolution calendar - Widget utilities
- *
- * 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 <ctype.h>
-#include <string.h>
-#include <ical.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <e-destination.h>
-#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
-#include "../calendar-config.h"
-#include "comp-editor-util.h"
-
-
-
-/**
- * comp_editor_dates:
- * @dates: A structure to be filled out with dates of a component
- * @comp: The component to extract the dates from
- *
- * Extracts the dates from the calendar component into the
- * CompEditorPageDates structure. Call comp_editor_free_dates() to free the
- * results.
- **/
-void
-comp_editor_dates (CompEditorPageDates *dates, CalComponent *comp)
-{
- CalComponentDateTime dt;
-
- dates->start = NULL;
- dates->end = NULL;
- dates->due = NULL;
- dates->complete = NULL;
-
- cal_component_get_dtstart (comp, &dt);
- if (dt.value) {
- dates->start = g_new (CalComponentDateTime, 1);
- *dates->start = dt;
- }
-
- cal_component_get_dtend (comp, &dt);
- if (dt.value) {
- dates->end = g_new (CalComponentDateTime, 1);
- *dates->end = dt;
- }
-
- cal_component_get_due (comp, &dt);
- if (dt.value) {
- dates->due = g_new (CalComponentDateTime, 1);
- *dates->due = dt;
- }
-
- cal_component_get_completed (comp, &dates->complete);
-}
-
-
-/* This frees the dates in the CompEditorPageDates struct. But it doesn't free
- * the struct (as that is usually static).
- */
-void
-comp_editor_free_dates (CompEditorPageDates *dates)
-{
- if (dates->start)
- cal_component_free_datetime (dates->start);
-
- if (dates->end)
- cal_component_free_datetime (dates->end);
-
- if (dates->due)
- cal_component_free_datetime (dates->due);
-
- if (dates->complete)
- cal_component_free_icaltimetype (dates->complete);
-}
-
-
-static void
-write_label_piece (struct icaltimetype *tt, char *buffer, int size,
- char *stext, char *etext)
-{
- struct tm tmp_tm = { 0 };
- int len;
-
- /* FIXME: May want to convert the time to an appropriate zone. */
-
- if (stext != NULL)
- strcat (buffer, stext);
-
- tmp_tm.tm_year = tt->year - 1900;
- tmp_tm.tm_mon = tt->month - 1;
- tmp_tm.tm_mday = tt->day;
- tmp_tm.tm_hour = tt->hour;
- tmp_tm.tm_min = tt->minute;
- tmp_tm.tm_sec = tt->second;
- tmp_tm.tm_isdst = -1;
-
- tmp_tm.tm_wday = time_day_of_week (tt->day, tt->month - 1, tt->year);
-
- len = strlen (buffer);
- e_time_format_date_and_time (&tmp_tm,
- calendar_config_get_24_hour_format (),
- FALSE, FALSE,
- &buffer[len], size - len);
- if (etext != NULL)
- strcat (buffer, etext);
-}
-
-/**
- * comp_editor_date_label:
- * @dates: The dates to use in constructing a label
- * @label: The label whose text is to be set
- *
- * Set the text of a label based on the dates available and the user's
- * formatting preferences
- **/
-void
-comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label)
-{
- char buffer[1024];
- gboolean start_set = FALSE, end_set = FALSE;
- gboolean complete_set = FALSE, due_set = FALSE;
-
- buffer[0] = '\0';
-
- if (dates->start && !icaltime_is_null_time (*dates->start->value))
- start_set = TRUE;
- if (dates->end && !icaltime_is_null_time (*dates->end->value))
- end_set = TRUE;
- if (dates->complete && !icaltime_is_null_time (*dates->complete))
- complete_set = TRUE;
- if (dates->due && !icaltime_is_null_time (*dates->due->value))
- due_set = TRUE;
-
- if (start_set)
- write_label_piece (dates->start->value, buffer, 1024,
- NULL, NULL);
-
- if (start_set && end_set)
- write_label_piece (dates->end->value, buffer, 1024,
- _(" to "), NULL);
-
- if (complete_set) {
- if (start_set)
- write_label_piece (dates->complete, buffer, 1024, _(" (Completed "), ")");
- else
- write_label_piece (dates->complete, buffer, 1024, _("Completed "), NULL);
- }
-
- if (due_set && dates->complete == NULL) {
- if (start_set)
- write_label_piece (dates->due->value, buffer, 1024, _(" (Due "), ")");
- else
- write_label_piece (dates->due->value, buffer, 1024, _("Due "), NULL);
- }
-
- gtk_label_set_text (GTK_LABEL (label), buffer);
-}
-
-/**
- * comp_editor_new_date_edit:
- * @show_date: Whether to show a date picker in the widget.
- * @show_time: Whether to show a time picker in the widget.
- * @make_time_insensitive: Whether the time field is made insensitive rather
- * than hiding it. This is useful if you want to preserve the layout of the
- * widgets.
- *
- * Creates a new #EDateEdit widget, configured using the calendar's preferences.
- *
- * Return value: A newly-created #EDateEdit widget.
- **/
-GtkWidget *
-comp_editor_new_date_edit (gboolean show_date, gboolean show_time,
- gboolean make_time_insensitive)
-{
- 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);
-#if 0
- e_date_edit_set_make_time_insensitive (dedit, make_time_insensitive);
-#else
- e_date_edit_set_make_time_insensitive (dedit, FALSE);
-#endif
- calendar_config_configure_e_date_edit (dedit);
-
- return GTK_WIDGET (dedit);
-}
-
-
-/* Returns the current time, for EDateEdit widgets and ECalendar items in the
- dialogs.
- FIXME: Should probably use the timezone from somewhere in the component
- rather than the current timezone. */
-struct tm
-comp_editor_get_current_time (GtkObject *object, gpointer data)
-{
- char *location;
- icaltimezone *zone;
- struct icaltimetype tt;
- struct tm tmp_tm = { 0 };
-
- /* Get the current timezone. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
-
- tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone);
-
- /* Now copy it to the struct tm and return it. */
- tmp_tm.tm_year = tt.year - 1900;
- tmp_tm.tm_mon = tt.month - 1;
- tmp_tm.tm_mday = tt.day;
- tmp_tm.tm_hour = tt.hour;
- tmp_tm.tm_min = tt.minute;
- tmp_tm.tm_sec = tt.second;
- tmp_tm.tm_isdst = -1;
-
- return tmp_tm;
-}
-
-
-
-/*
- * These are utility functions to handle the SelectNames control we use
- * for the contacts field, and its related dialog.
- */
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames"
-
-GNOME_Evolution_Addressbook_SelectNames
-comp_editor_create_contacts_component (void)
-{
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- 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
- || corba_select_names == CORBA_OBJECT_NIL) {
- g_warning ("Cannot activate -- %s", SELECT_NAMES_OAFID);
- CORBA_exception_free (&ev);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
-
- return corba_select_names;
-}
-
-
-GtkWidget *
-comp_editor_create_contacts_control (GNOME_Evolution_Addressbook_SelectNames corba_select_names)
-{
- Bonobo_Control corba_control;
- GtkWidget *control_widget;
- CORBA_Environment ev;
- char *name = _("Contacts");
-
- 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);
-
- gtk_widget_show (control_widget);
-
- return control_widget;
-}
-
-
-Bonobo_EventSource_ListenerId
-comp_editor_connect_contacts_changed (GtkWidget *contacts_entry,
- BonoboListenerCallbackFn changed_cb,
- gpointer changed_cb_data)
-{
- BonoboControlFrame *cf;
- Bonobo_PropertyBag pb = CORBA_OBJECT_NIL;
-
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (contacts_entry));
- pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
-
- return bonobo_event_source_client_add_listener (
- pb, changed_cb,
- "Bonobo/Property:change:entry_changed",
- NULL, changed_cb_data);
-}
-
-
-void
-comp_editor_show_contacts_dialog (GNOME_Evolution_Addressbook_SelectNames corba_select_names)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (
- corba_select_names, _("Contacts"), &ev);
- CORBA_exception_free (&ev);
-}
-
-
-/* A simple 'name <email>' parser. Input should be UTF8.
- FIXME: Should probably use camel functions or something.
- Also note that this is broken wrt UTF8 - can't use strchr etc. */
-static void
-parse_contact_string (const char *value, char **name, char **email)
-{
- char *lbracket, *rbracket, *name_end, *tmp_name, *tmp_email;
-
- if (!value) {
- *name = g_strdup ("");
- *email = g_strdup ("");
- return;
- }
-
- lbracket = strchr (value, '<');
- rbracket = strchr (value, '>');
-
- if (!lbracket || !rbracket || rbracket < lbracket) {
- *name = g_strdup (value);
- *email = g_strdup ("");
- return;
- }
-
- name_end = lbracket - 1;
- while (name_end > value && isspace (*name_end))
- name_end--;
-
- tmp_name = g_malloc (name_end - value + 2);
- strncpy (tmp_name, value, name_end - value + 1);
- tmp_name[name_end - value + 1] = '\0';
- *name = tmp_name;
-
- tmp_email = g_malloc (rbracket - lbracket);
- strncpy (tmp_email, lbracket + 1, rbracket - lbracket - 1);
- tmp_email[rbracket - lbracket - 1] = '\0';
- *email = tmp_email;
-
- g_print ("Parsed: %s\n Name:'%s'\nEmail:'%s'\n",
- value, *name, *email);
-}
-
-
-void
-comp_editor_contacts_to_widget (GtkWidget *contacts_entry,
- CalComponent *comp)
-{
- GPtrArray *dest_array;
- EDestination *dest;
- GSList *contact_list, *elem;
- char *contacts_string;
- int i;
-
- cal_component_get_contact_list (comp, &contact_list);
- dest_array = g_ptr_array_new ();
- for (elem = contact_list; elem; elem = elem->next) {
- CalComponentText *t = elem->data;
- char *name, *email;
-
- parse_contact_string (t->value, &name, &email);
-
- dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, email);
- g_ptr_array_add (dest_array, dest);
- g_free (name);
- g_free (email);
- }
- cal_component_free_text_list (contact_list);
-
- /* we need destv to be NULL terminated */
- g_ptr_array_add (dest_array, NULL);
-
- contacts_string = e_destination_exportv ((EDestination**) dest_array->pdata);
- g_print ("Destinations: %s\n", contacts_string ? contacts_string : "");
-
- bonobo_widget_set_property (BONOBO_WIDGET (contacts_entry),
- "destinations", contacts_string, NULL);
-
- g_free (contacts_string);
-
- /* We free all dest_array except the last NULL we added. */
- for (i = 0; i < dest_array->len - 1; i++) {
- dest = g_ptr_array_index (dest_array, i);
- gtk_object_unref (GTK_OBJECT (dest));
- }
- g_ptr_array_free (dest_array, TRUE);
-}
-
-
-void
-comp_editor_contacts_to_component (GtkWidget *contacts_entry,
- CalComponent *comp)
-{
- EDestination **contact_destv;
- GSList *contact_list = NULL, *elem;
- char *contacts_string = NULL;
- CalComponentText *t;
- const char *name, *email;
- int i;
-
- bonobo_widget_get_property (BONOBO_WIDGET (contacts_entry),
- "destinations", &contacts_string, NULL);
- g_print ("Contacts string: %s\n", contacts_string ? contacts_string : "");
-
- contact_destv = e_destination_importv (contacts_string);
- if (contact_destv) {
- for (i = 0; contact_destv[i] != NULL; i++) {
- name = e_destination_get_name (contact_destv[i]);
- email = e_destination_get_email (contact_destv[i]);
-
- t = g_new0 (CalComponentText, 1);
- t->altrep = NULL;
-
- /* If both name and email are given, use the standard
- 'name <email>' form, otherwise use just the name
- or the email address.
- FIXME: I'm not sure this is correct syntax etc. */
- if (name && name[0] && email && email[0])
- t->value = g_strdup_printf ("%s <%s>",
- name, email);
- else if (name && name[0])
- t->value = g_strdup (name);
- else
- t->value = g_strdup (email);
-
- contact_list = g_slist_prepend (contact_list, t);
-
- gtk_object_unref (GTK_OBJECT (contact_destv[i]));
- }
- }
- g_free (contact_destv);
-
- contact_list = g_slist_reverse (contact_list);
- cal_component_set_contact_list (comp, contact_list);
-
- for (elem = contact_list; elem; elem = elem->next) {
- t = elem->data;
- g_free ((char*)t->value);
- g_free (t);
- }
- g_slist_free (contact_list);
-}
-
-/**
- * comp_editor_strip_categories:
- * @categories: A string of category names entered by the user.
- *
- * Takes a string of the form "categ, categ, categ, ..." and removes the
- * whitespace between categories to result in "categ,categ,categ,..."
- *
- * Return value: The category names stripped of surrounding whitespace
- * and separated with commas.
- **/
-char *
-comp_editor_strip_categories (const char *categories)
-{
- char *new_categories;
- const char *start, *end;
- const char *p;
- char *new_p;
-
- if (!categories)
- return NULL;
-
- new_categories = g_new (char, strlen (categories) + 1);
-
- start = end = NULL;
- new_p = new_categories;
-
- for (p = categories; *p; p++) {
- int c;
-
- c = *p;
-
- if (isspace (c))
- continue;
- else if (c == ',') {
- int len;
-
- if (!start)
- continue;
-
- g_assert (start <= end);
-
- len = end - start + 1;
- strncpy (new_p, start, len);
- new_p[len] = ',';
- new_p += len + 1;
-
- start = end = NULL;
- } else {
- if (!start) {
- start = p;
- end = p;
- } else
- end = p;
- }
- }
-
- if (start) {
- int len;
-
- g_assert (start <= end);
-
- len = end - start + 1;
- strncpy (new_p, start, len);
- new_p += len;
- }
-
- *new_p = '\0';
-
- return new_categories;
-}
diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h
deleted file mode 100644
index 37c1c0d5f7..0000000000
--- a/calendar/gui/dialogs/comp-editor-util.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Evolution calendar - Widget utilities
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: 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 _COMP_EDITOR_UTIL_H_
-#define _COMP_EDITOR_UTIL_H_
-
-#include <gtk/gtkwidget.h>
-#include <bonobo/bonobo-control.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "comp-editor-page.h"
-
-void comp_editor_dates (CompEditorPageDates *date, CalComponent *comp);
-void comp_editor_free_dates (CompEditorPageDates *dates);
-
-void comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label);
-
-GtkWidget *comp_editor_new_date_edit (gboolean show_date, gboolean show_time,
- gboolean make_time_insensitive);
-
-struct tm comp_editor_get_current_time (GtkObject *object, gpointer data);
-
-
-GNOME_Evolution_Addressbook_SelectNames comp_editor_create_contacts_component (void);
-GtkWidget * comp_editor_create_contacts_control (GNOME_Evolution_Addressbook_SelectNames corba_select_names);
-Bonobo_EventSource_ListenerId comp_editor_connect_contacts_changed (GtkWidget *contacts_entry,
- BonoboListenerCallbackFn changed_cb,
- gpointer changed_cb_data);
-void comp_editor_show_contacts_dialog (GNOME_Evolution_Addressbook_SelectNames corba_select_names);
-
-void comp_editor_contacts_to_widget (GtkWidget *contacts_entry,
- CalComponent *comp);
-void comp_editor_contacts_to_component (GtkWidget *contacts_entry,
- CalComponent *comp);
-
-char *comp_editor_strip_categories (const char *categories);
-
-#endif
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
deleted file mode 100644
index f039c51745..0000000000
--- a/calendar/gui/dialogs/comp-editor.c
+++ /dev/null
@@ -1,1205 +0,0 @@
-/* Evolution calendar - Framework for a calendar component editor dialog
- *
- * 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 <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <gnome.h>
-#include <bonobo/bonobo-win.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <gal/widgets/e-unicode.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <evolution-shell-component-utils.h>
-#include "../print.h"
-#include "save-comp.h"
-#include "delete-comp.h"
-#include "send-comp.h"
-#include "changed-comp.h"
-#include "comp-editor.h"
-
-
-
-/* Private part of the CompEditor structure */
-struct _CompEditorPrivate {
- /* Client to use */
- CalClient *client;
-
- /* Calendar object/uid we are editing; this is an internal copy */
- CalComponent *comp;
-
- /* The pages we have */
- GList *pages;
-
- /* Toplevel window for the dialog */
- GtkWidget *window;
- BonoboUIComponent *uic;
-
- /* Notebook to hold the pages */
- GtkNotebook *notebook;
-
- GtkWidget *filesel;
-
- gboolean changed;
- gboolean needs_send;
- gboolean updating;
-};
-
-
-
-static void comp_editor_class_init (CompEditorClass *class);
-static void comp_editor_init (CompEditor *editor);
-static void comp_editor_destroy (GtkObject *object);
-
-static void real_set_cal_client (CompEditor *editor, CalClient *client);
-static void real_edit_comp (CompEditor *editor, CalComponent *comp);
-static void real_send_comp (CompEditor *editor, CalComponentItipMethod method);
-static void save_comp (CompEditor *editor);
-static void save_comp_with_send (CompEditor *editor);
-static void delete_comp (CompEditor *editor);
-static void close_dialog (CompEditor *editor);
-
-static void page_changed_cb (GtkWidget *widget, gpointer data);
-static void page_needs_send_cb (GtkWidget *widget, gpointer data);
-static void page_summary_changed_cb (GtkWidget *widget, const char *summary, gpointer data);
-static void page_dates_changed_cb (GtkWidget *widget, CompEditorPageDates *dates, 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 void save_cmd (GtkWidget *widget, gpointer data);
-static void save_close_cmd (GtkWidget *widget, gpointer data);
-static void save_as_cmd (GtkWidget *widget, gpointer data);
-static void delete_cmd (GtkWidget *widget, gpointer data);
-static void print_cmd (GtkWidget *widget, gpointer data);
-static void print_preview_cmd (GtkWidget *widget, gpointer data);
-static void print_setup_cmd (GtkWidget *widget, gpointer data);
-static void close_cmd (GtkWidget *widget, gpointer data);
-
-static gint delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
-
-static EPixmap pixmaps [] =
-{
- E_PIXMAP ("/menu/File/FileSave", "save-16.png"),
- E_PIXMAP ("/menu/File/FileSaveAndClose", "save-16.png"),
- E_PIXMAP ("/menu/File/FileSaveAs", "save-as-16.png"),
-
- E_PIXMAP ("/menu/File/FileDelete", "evolution-trash-mini.png"),
-
- E_PIXMAP ("/menu/File/FilePrint", "print.xpm"),
- E_PIXMAP ("/menu/File/FilePrintPreview", "print-preview.xpm"),
-
- E_PIXMAP ("/Toolbar/FileSaveAndClose", "buttons/save-24.png"),
- E_PIXMAP ("/Toolbar/FilePrint", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/FileDelete", "buttons/delete-message.png"),
-
- E_PIXMAP_END
-};
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("FileSave", save_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileSaveAndClose", save_close_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileSaveAs", save_as_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileDelete", delete_cmd),
- BONOBO_UI_UNSAFE_VERB ("FilePrint", print_cmd),
- BONOBO_UI_UNSAFE_VERB ("FilePrintPreview", print_preview_cmd),
- BONOBO_UI_UNSAFE_VERB ("FilePrintSetup", print_setup_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileClose", close_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-#define CLASS(page) (COMP_EDITOR_CLASS (GTK_OBJECT (page)->klass))
-
-static GtkObjectClass *parent_class;
-
-
-
-GtkType
-comp_editor_get_type (void)
-{
- static GtkType comp_editor_type = 0;
-
- if (!comp_editor_type) {
- static const GtkTypeInfo comp_editor_info = {
- "CompEditor",
- sizeof (CompEditor),
- sizeof (CompEditorClass),
- (GtkClassInitFunc) comp_editor_class_init,
- (GtkObjectInitFunc) comp_editor_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- comp_editor_type = gtk_type_unique (GTK_TYPE_OBJECT,
- &comp_editor_info);
- }
-
- return comp_editor_type;
-}
-
-/* Class initialization function for the calendar component editor */
-static void
-comp_editor_class_init (CompEditorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) klass;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- klass->set_cal_client = real_set_cal_client;
- klass->edit_comp = real_edit_comp;
- klass->send_comp = real_send_comp;
-
- object_class->destroy = comp_editor_destroy;
-}
-
-/* Creates the basic in the editor */
-static void
-setup_widgets (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- BonoboUIContainer *container;
- GtkWidget *vbox;
-
- priv = editor->priv;
-
- /* Window and basic vbox */
- priv->window = bonobo_window_new ("event-editor", "iCalendar Editor");
- gtk_signal_connect (GTK_OBJECT (priv->window), "delete_event",
- GTK_SIGNAL_FUNC (delete_event_cb), editor);
-
- priv->uic = bonobo_ui_component_new_default ();
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (priv->window));
- bonobo_ui_component_set_container (priv->uic, BONOBO_OBJREF (container));
- bonobo_ui_engine_config_set_path (bonobo_window_get_ui_engine (BONOBO_WINDOW (priv->window)),
- "/evolution/UIConf/kvps");
-
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
- bonobo_ui_util_set_ui (priv->uic, EVOLUTION_DATADIR,
- "evolution-comp-editor.xml",
- "evolution-calendar");
- e_pixmaps_update (priv->uic, pixmaps);
-
- vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_widget_show (vbox);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL);
- bonobo_window_set_contents (BONOBO_WINDOW (priv->window), vbox);
-
- /* Notebook */
- priv->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
- gtk_widget_show (GTK_WIDGET (priv->notebook));
- gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->notebook),
- TRUE, TRUE, 0);
-}
-
-/* Object initialization function for the calendar component editor */
-static void
-comp_editor_init (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = g_new0 (CompEditorPrivate, 1);
- editor->priv = priv;
-
- setup_widgets (editor);
-
- priv->pages = NULL;
- priv->changed = FALSE;
- priv->needs_send = FALSE;
-}
-
-/* Destroy handler for the calendar component editor */
-static void
-comp_editor_destroy (GtkObject *object)
-{
- CompEditor *editor;
- CompEditorPrivate *priv;
- GList *l;
-
- editor = COMP_EDITOR (object);
- priv = editor->priv;
-
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), editor);
-
- if (priv->window) {
- gtk_widget_destroy (priv->window);
- priv->window = NULL;
- }
-
- /* We want to destroy the pages after the widgets get destroyed,
- since they have lots of signal handlers connected to the widgets
- with the pages as the data. */
- for (l = priv->pages; l != NULL; l = l->next)
- gtk_object_unref (GTK_OBJECT (l->data));
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- g_free (priv);
- editor->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/**
- * comp_editor_set_changed:
- * @editor: A component editor
- * @changed: Value to set the changed state to
- *
- * Set the dialog changed state to the given value
- **/
-void
-comp_editor_set_changed (CompEditor *editor, gboolean changed)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- priv->changed = changed;
-}
-
-/**
- * comp_editor_get_changed:
- * @editor: A component editor
- *
- * Gets the changed state of the dialog
- *
- * Return value: A boolean indicating if the dialog is in a changed
- * state
- **/
-gboolean
-comp_editor_get_changed (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- return priv->changed;
-}
-
-/**
- * comp_editor_set_needs_send:
- * @editor: A component editor
- * @needs_send: Value to set the needs send state to
- *
- * Set the dialog needs send state to the given value
- **/
-void
-comp_editor_set_needs_send (CompEditor *editor, gboolean needs_send)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- priv->needs_send = needs_send;
-}
-
-/**
- * comp_editor_get_needs_send:
- * @editor: A component editor
- *
- * Gets the needs send state of the dialog
- *
- * Return value: A boolean indicating if the dialog is in a needs send
- * state
- **/
-gboolean
-comp_editor_get_needs_send (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- return priv->needs_send;
-}
-
-/**
- * comp_editor_append_page:
- * @editor: A component editor
- * @page: A component editor page
- * @label: Label of the page
- *
- * Appends a page to the editor notebook with the given label
- **/
-void
-comp_editor_append_page (CompEditor *editor,
- CompEditorPage *page,
- const char *label)
-{
- CompEditorPrivate *priv;
- GtkWidget *page_widget;
- GtkWidget *label_widget;
- gboolean is_first_page;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- g_return_if_fail (label != NULL);
-
- priv = editor->priv;
-
- gtk_object_ref (GTK_OBJECT (page));
-
- /* If we are editing something, fill the widgets with current info */
- if (priv->comp != NULL) {
- CalComponent *comp;
-
- comp = comp_editor_get_current_comp (editor);
- comp_editor_page_fill_widgets (page, comp);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-
- page_widget = comp_editor_page_get_widget (page);
- g_assert (page_widget != NULL);
-
- label_widget = gtk_label_new (label);
-
- is_first_page = (priv->pages == NULL);
-
- priv->pages = g_list_append (priv->pages, page);
- gtk_notebook_append_page (priv->notebook, page_widget, label_widget);
-
- /* Listen for things happening on the page */
- gtk_signal_connect (GTK_OBJECT (page), "needs_send",
- GTK_SIGNAL_FUNC (page_needs_send_cb), editor);
- gtk_signal_connect (GTK_OBJECT (page), "changed",
- GTK_SIGNAL_FUNC (page_changed_cb), editor);
- gtk_signal_connect (GTK_OBJECT (page), "summary_changed",
- GTK_SIGNAL_FUNC (page_summary_changed_cb), editor);
- gtk_signal_connect (GTK_OBJECT (page), "dates_changed",
- GTK_SIGNAL_FUNC (page_dates_changed_cb), editor);
-
- /* The first page is the main page of the editor, so we ask it to focus
- * its main widget.
- */
- if (is_first_page)
- comp_editor_page_focus_main_widget (page);
-}
-
-/**
- * comp_editor_remove_page:
- * @editor: A component editor
- * @page: A component editor page
- *
- * Removes the page from the component editor
- **/
-void
-comp_editor_remove_page (CompEditor *editor, CompEditorPage *page)
-{
- CompEditorPrivate *priv;
- GtkWidget *page_widget;
- gint page_num;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- priv = editor->priv;
-
- page_widget = comp_editor_page_get_widget (page);
- page_num = gtk_notebook_page_num (priv->notebook, page_widget);
- gtk_notebook_remove_page (priv->notebook, page_num);
-
- priv->pages = g_list_remove (priv->pages, page);
- gtk_object_unref (GTK_OBJECT (page));
-}
-
-/**
- * comp_editor_show_page:
- * @editor:
- * @page:
- *
- *
- **/
-void
-comp_editor_show_page (CompEditor *editor, CompEditorPage *page)
-{
- CompEditorPrivate *priv;
- GtkWidget *page_widget;
- gint page_num;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
- g_return_if_fail (page != NULL);
- g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
- priv = editor->priv;
-
- page_widget = comp_editor_page_get_widget (page);
- page_num = gtk_notebook_page_num (priv->notebook, page_widget);
- gtk_notebook_set_page (priv->notebook, page_num);
-}
-
-/**
- * comp_editor_set_cal_client:
- * @editor: A component editor
- * @client: The calendar client to use
- *
- * Sets the calendar client used by the editor to update components
- **/
-void
-comp_editor_set_cal_client (CompEditor *editor, CalClient *client)
-{
- CompEditorClass *klass;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- klass = COMP_EDITOR_CLASS (GTK_OBJECT (editor)->klass);
-
- if (klass->set_cal_client)
- klass->set_cal_client (editor, client);
-}
-
-/**
- * comp_editor_get_cal_client:
- * @editor: A component editor
- *
- * Returns the calendar client of the editor
- *
- * Return value: The calendar client of the editor
- **/
-CalClient *
-comp_editor_get_cal_client (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- g_return_val_if_fail (editor != NULL, NULL);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), NULL);
-
- priv = editor->priv;
-
- return priv->client;
-}
-
-/* Creates an appropriate title for the event editor dialog */
-static char *
-make_title_from_comp (CalComponent *comp)
-{
- char *title;
- const char *type_string;
- CalComponentVType type;
- CalComponentText text;
-
- if (!comp)
- return g_strdup (_("Edit Appointment"));
-
- type = cal_component_get_vtype (comp);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- type_string = _("Appointment - %s");
- break;
- case CAL_COMPONENT_TODO:
- type_string = _("Task - %s");
- break;
- case CAL_COMPONENT_JOURNAL:
- type_string = _("Journal entry - %s");
- break;
- default:
- g_message ("make_title_from_comp(): Cannot handle object of type %d", type);
- return NULL;
- }
-
- cal_component_get_summary (comp, &text);
- if (text.value) {
- char *summary;
- summary = e_utf8_to_locale_string (text.value);
- title = g_strdup_printf (type_string, summary);
- g_free (summary);
- } else
- title = g_strdup_printf (type_string, _("No summary"));
-
- return title;
-}
-
-/* Sets the event editor's window title from a calendar component */
-static void
-set_title_from_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- char *title;
-
- priv = editor->priv;
- title = make_title_from_comp (priv->comp);
- gtk_window_set_title (GTK_WINDOW (priv->window), title);
- g_free (title);
-}
-
-static void
-fill_widgets (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- GList *l;
-
- priv = editor->priv;
-
- for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_fill_widgets (l->data, priv->comp);
-}
-
-static void
-real_set_cal_client (CompEditor *editor, CalClient *client)
-{
- CompEditorPrivate *priv;
- GList *elem;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- if (client == priv->client)
- return;
-
- if (client) {
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (cal_client_get_load_state (client) ==
- CAL_CLIENT_LOAD_LOADED);
- gtk_object_ref (GTK_OBJECT (client));
- }
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client),
- editor);
- gtk_object_unref (GTK_OBJECT (priv->client));
- }
-
- priv->client = client;
-
- /* Pass the client to any pages that need it. */
- for (elem = priv->pages; elem; elem = elem->next)
- comp_editor_page_set_cal_client (elem->data, client);
-
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), editor);
-}
-
-static void
-real_edit_comp (CompEditor *editor, CalComponent *comp)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->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 (editor);
- fill_widgets (editor);
-}
-
-
-static void
-real_send_comp (CompEditor *editor, CalComponentItipMethod method)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- itip_send_comp (method, priv->comp);
-}
-
-
-/**
- * comp_editor_edit_comp:
- * @editor: A component editor
- * @comp: A calendar component
- *
- * Starts the editor editing the given component
- **/
-void
-comp_editor_edit_comp (CompEditor *editor, CalComponent *comp)
-{
- CompEditorClass *klass;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- klass = COMP_EDITOR_CLASS (GTK_OBJECT (editor)->klass);
-
- if (klass->edit_comp)
- klass->edit_comp (editor, comp);
-}
-
-CalComponent *
-comp_editor_get_current_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- CalComponent *comp;
- GList *l;
-
- g_return_val_if_fail (editor != NULL, NULL);
- g_return_val_if_fail (IS_COMP_EDITOR (editor), NULL);
-
- priv = editor->priv;
-
- comp = cal_component_clone (priv->comp);
- for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_fill_component (l->data, comp);
-
- return comp;
-}
-
-/**
- * comp_editor_save_comp:
- * @editor:
- *
- *
- **/
-void
-comp_editor_save_comp (CompEditor *editor)
-{
- save_comp (editor);
-}
-
-/**
- * comp_editor_delete_comp:
- * @editor:
- *
- *
- **/
-void
-comp_editor_delete_comp (CompEditor *editor)
-{
- delete_comp (editor);
-}
-
-/**
- * comp_editor_send_comp:
- * @editor:
- * @method:
- *
- *
- **/
-void
-comp_editor_send_comp (CompEditor *editor, CalComponentItipMethod method)
-{
- CompEditorClass *klass;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- klass = COMP_EDITOR_CLASS (GTK_OBJECT (editor)->klass);
-
- if (klass->send_comp)
- klass->send_comp (editor, method);
-}
-
-/**
- * comp_editor_merge_ui:
- * @editor:
- * @filename:
- * @verbs:
- *
- *
- **/
-void
-comp_editor_merge_ui (CompEditor *editor, const char *filename, BonoboUIVerb *verbs)
-{
- CompEditorPrivate *priv;
- BonoboUIEngine *engine;
- BonoboUINode *node;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- engine = bonobo_window_get_ui_engine (BONOBO_WINDOW (priv->window));
- node = bonobo_ui_util_new_ui (priv->uic, filename, "",
- "evolution-calendar");
- g_assert (node != NULL);
-
- bonobo_ui_engine_xml_merge_tree (engine, "/", node, "comp-editor");
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
-}
-
-/**
- * comp_editor_set_ui_prop:
- * @editor:
- * @path:
- * @attr:
- * @val:
- *
- *
- **/
-void
-comp_editor_set_ui_prop (CompEditor *editor,
- const char *path,
- const char *attr,
- const char *val)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- bonobo_ui_component_set_prop (priv->uic, path, attr, val, NULL);
-}
-
-
-/* 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);
-}
-
-/**
- * comp_editor_focus:
- * @editor: A component editor
- *
- * Brings the editor window to the front and gives it focus
- **/
-void
-comp_editor_focus (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- gtk_widget_show (priv->window);
- raise_and_focus (priv->window);
-}
-
-static void
-save_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- GList *l;
-
- priv = editor->priv;
-
- if (!priv->changed)
- return;
-
- for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_fill_component (l->data, priv->comp);
- cal_component_commit_sequence (priv->comp);
-
- priv->updating = TRUE;
-
- if (!cal_client_update_object (priv->client, priv->comp))
- g_message ("save_comp (): Could not update the object!");
- else
- priv->changed = FALSE;
-
- priv->updating = FALSE;
-}
-
-static void
-save_comp_with_send (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- gboolean send;
-
- priv = editor->priv;
-
- send = priv->changed && priv->needs_send;
-
- save_comp (editor);
-
- if (send && send_component_dialog (priv->comp))
- comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST);
-}
-
-static void
-delete_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- const char *uid;
-
- priv = editor->priv;
-
- cal_component_get_uid (priv->comp, &uid);
- priv->updating = TRUE;
- cal_client_remove_object (priv->client, uid);
- priv->updating = FALSE;
- close_dialog (editor);
-}
-
-static gboolean
-prompt_to_save_changes (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- if (!priv->changed)
- return TRUE;
-
- switch (save_component_dialog (GTK_WINDOW (priv->window))) {
- case 0: /* Save */
- /* FIXME: If an error occurs here, we should popup a dialog
- and then return FALSE. */
- save_comp_with_send (editor);
- return TRUE;
- case 1: /* Discard */
- return TRUE;
- case 2: /* Cancel */
- default:
- return FALSE;
- }
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- g_assert (priv->window != NULL);
-
- gtk_object_destroy (GTK_OBJECT (editor));
-}
-
-/* Menu Commands */
-static void
-save_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
-
- save_comp_with_send (editor);
-}
-
-static void
-save_close_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
-
- save_comp_with_send (editor);
- close_dialog (editor);
-}
-
-static void
-save_as_ok (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- struct stat s;
- char *path;
- int ret = 0;
-
- priv = editor->priv;
-
- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (priv->filesel));
-
- if (stat (path, &s) == 0) {
- GtkWidget *dlg;
- GtkWidget *text;
-
- dlg = gnome_dialog_new (_("Overwrite file?"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
- text = gtk_label_new (_("A file by that name already exists.\nOverwrite it?"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), text, TRUE, TRUE, 4);
- gtk_window_set_policy (GTK_WINDOW (dlg), FALSE, TRUE, FALSE);
- gtk_widget_show (text);
-
- ret = gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- }
-
- if (ret == 0) {
- FILE *file;
- gchar *ical_string;
-
- icalcomponent *top_level;
- icalcomponent *icalcomp;
- icalproperty *prop;
-
- top_level = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-
- /* RFC 2445, section 4.7.1 */
- prop = icalproperty_new_calscale ("GREGORIAN");
- icalcomponent_add_property (top_level, prop);
-
- /* RFC 2445, section 4.7.3 */
- prop = icalproperty_new_prodid ("-//Ximian//NONSGML Evolution Calendar//EN");
- icalcomponent_add_property (top_level, 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 (top_level, prop);
-
- icalcomp = cal_component_get_icalcomponent (priv->comp);
- g_assert (icalcomp != NULL);
-
- icalcomponent_add_component (top_level, icalcomp);
-
- ical_string = icalcomponent_as_ical_string (top_level);
-
- file = fopen (path, "w");
- if (file == NULL) {
- g_warning ("Couldn't save item");
- gtk_main_quit ();
- return;
- }
-
- fprintf (file, ical_string);
- fclose (file);
-
- gtk_main_quit ();
- }
-}
-
-static void
-save_as_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- GtkFileSelection *fs;
- char *path;
-
- priv = editor->priv;
-
- fs = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save As...")));
- path = g_strdup_printf ("%s/", g_get_home_dir ());
- gtk_file_selection_set_filename (fs, path);
- g_free (path);
-
- gtk_signal_connect (GTK_OBJECT (fs->ok_button), "clicked",
- GTK_SIGNAL_FUNC (save_as_ok), editor);
- gtk_signal_connect (GTK_OBJECT (fs->cancel_button), "clicked",
- GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
-
- priv->filesel = GTK_WIDGET (fs);
- gtk_widget_show (priv->filesel);
- gtk_grab_add (priv->filesel);
- gtk_main ();
-
- gtk_widget_destroy (priv->filesel);
- priv->filesel = NULL;
-}
-
-static void
-delete_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- CalComponentVType vtype;
-
- priv = editor->priv;
-
- vtype = cal_component_get_vtype (priv->comp);
-
- if (delete_component_dialog (priv->comp, 1, vtype, priv->window))
- delete_comp (editor);
-}
-
-static void
-print_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CalComponent *comp;
-
- comp = comp_editor_get_current_comp (editor);
- print_comp (comp, FALSE);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-static void
-print_preview_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CalComponent *comp;
-
- comp = comp_editor_get_current_comp (editor);
- print_comp (comp, TRUE);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-static void
-print_setup_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- print_setup ();
-}
-
-static void
-close_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
-
- if (prompt_to_save_changes (editor))
- close_dialog (editor);
-}
-
-static void
-page_changed_cb (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- priv->changed = TRUE;
-}
-
-static void
-page_needs_send_cb (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- priv->needs_send = TRUE;
-}
-
-/* Page signal callbacks */
-static void
-page_summary_changed_cb (GtkWidget *widget, const char *summary, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- GList *l;
-
- priv = editor->priv;
-
- for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_set_summary (l->data, summary);
-
- priv->changed = TRUE;
-}
-
-static void
-page_dates_changed_cb (GtkWidget *widget,
- CompEditorPageDates *dates,
- gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- GList *l;
-
- priv = editor->priv;
-
- for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_set_dates (l->data, dates);
-
- priv->changed = TRUE;
-}
-
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- CalComponent *comp = NULL;
- CalClientGetStatus status;
- const char *edit_uid;
-
- priv = editor->priv;
-
- cal_component_get_uid (priv->comp, &edit_uid);
-
- if (!strcmp (uid, edit_uid) && !priv->updating) {
- if (changed_component_dialog (priv->comp, FALSE, priv->changed)) {
- status = cal_client_get_object (priv->client, uid, &comp);
- if (status == CAL_CLIENT_GET_SUCCESS) {
- comp_editor_edit_comp (editor, comp);
- gtk_object_unref (GTK_OBJECT (comp));
- } else {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog (_("Unable to obtain current version!"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- }
- }
- }
-}
-
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- const char *edit_uid;
-
- priv = editor->priv;
-
- cal_component_get_uid (priv->comp, &edit_uid);
-
- if (!strcmp (uid, edit_uid) && !priv->updating) {
- if (changed_component_dialog (priv->comp, TRUE, priv->changed))
- close_dialog (editor);
- }
-}
-
-static gint
-delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
-
- if (prompt_to_save_changes (editor))
- close_dialog (editor);
-
- return TRUE;
-}
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
deleted file mode 100644
index f19ac706b6..0000000000
--- a/calendar/gui/dialogs/comp-editor.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Evolution calendar - Framework for a calendar component editor dialog
- *
- * 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 COMP_EDITOR_H
-#define COMP_EDITOR_H
-
-#include <gtk/gtk.h>
-#include <bonobo/bonobo-ui-engine.h>
-#include <bonobo/bonobo-ui-component.h>
-#include "cal-client.h"
-#include "../itip-utils.h"
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_COMP_EDITOR (comp_editor_get_type ())
-#define COMP_EDITOR(obj) (GTK_CHECK_CAST ((obj), TYPE_COMP_EDITOR, CompEditor))
-#define COMP_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_COMP_EDITOR, CompEditorClass))
-#define IS_COMP_EDITOR(obj) (GTK_CHECK_TYPE ((obj), TYPE_COMP_EDITOR))
-#define IS_COMP_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_COMP_EDITOR))
-
-typedef struct _CompEditorPrivate CompEditorPrivate;
-
-typedef struct {
- GtkObject object;
-
- /* Private data */
- CompEditorPrivate *priv;
-} CompEditor;
-
-typedef struct {
- GtkObjectClass parent_class;
-
- /* Virtual functions */
- void (* set_cal_client) (CompEditor *page, CalClient *client);
- void (* edit_comp) (CompEditor *page, CalComponent *comp);
- void (* send_comp) (CompEditor *page, CalComponentItipMethod method);
-} CompEditorClass;
-
-GtkType comp_editor_get_type (void);
-void comp_editor_set_changed (CompEditor *editor,
- gboolean changed);
-gboolean comp_editor_get_changed (CompEditor *editor);
-void comp_editor_set_needs_send (CompEditor *editor,
- gboolean needs_send);
-gboolean comp_editor_get_needs_send (CompEditor *editor);
-void comp_editor_append_page (CompEditor *editor,
- CompEditorPage *page,
- const char *label);
-void comp_editor_remove_page (CompEditor *editor,
- CompEditorPage *page);
-void comp_editor_show_page (CompEditor *editor,
- CompEditorPage *page);
-void comp_editor_set_cal_client (CompEditor *editor,
- CalClient *client);
-CalClient *comp_editor_get_cal_client (CompEditor *editor);
-void comp_editor_edit_comp (CompEditor *ee,
- CalComponent *comp);
-CalComponent *comp_editor_get_current_comp (CompEditor *editor);
-void comp_editor_save_comp (CompEditor *editor);
-void comp_editor_delete_comp (CompEditor *editor);
-void comp_editor_send_comp (CompEditor *editor,
- CalComponentItipMethod method);
-void comp_editor_merge_ui (CompEditor *editor,
- const char *filename,
- BonoboUIVerb *verbs);
-void comp_editor_set_ui_prop (CompEditor *editor,
- const char *path,
- const char *attr,
- const char *val);
-void comp_editor_focus (CompEditor *editor);
-
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
deleted file mode 100644
index 5114e0af92..0000000000
--- a/calendar/gui/dialogs/delete-comp.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * 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 <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 "../calendar-config.h"
-#include "delete-comp.h"
-
-
-
-/**
- * delete_component_dialog:
- * @comp: A calendar component if a single component is to be deleted, or NULL
- * if more that one component is to be deleted.
- * @n_comps: Number of components that are to be deleted.
- * @vtype: Type of the components that are to be deleted. This is ignored
- * if only one component is to be deleted, and the vtype is extracted from
- * the component instead.
- * @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 number of
- * calendar components. The dialog will not appear, however, if the
- * configuration option for confirmation is turned off.
- *
- * Return value: TRUE if the user clicked Yes, FALSE otherwise. If the
- * configuration option for confirmation is turned off, this function will
- * unconditionally return TRUE.
- **/
-gboolean
-delete_component_dialog (CalComponent *comp,
- int n_comps, CalComponentVType vtype,
- GtkWidget *widget)
-{
- char *str;
- GtkWidget *dialog;
-
- if (comp) {
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (n_comps == 1, FALSE);
- } else {
- g_return_val_if_fail (n_comps > 1, FALSE);
- g_return_val_if_fail (vtype != CAL_COMPONENT_NO_TYPE, FALSE);
- }
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-
- if (!calendar_config_get_confirm_delete ())
- return TRUE;
-
- if (comp) {
- CalComponentText summary;
- char *tmp;
-
- 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);
- g_free (tmp);
- return FALSE;
- }
-
- g_free (tmp);
- } else {
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- str = g_strdup_printf (_("Are you sure you want to delete "
- "%d appointments?"), n_comps);
- break;
-
- case CAL_COMPONENT_TODO:
- str = g_strdup_printf (_("Are you sure you want to delete "
- "%d tasks?"), n_comps);
- break;
-
- case CAL_COMPONENT_JOURNAL:
- str = g_strdup_printf (_("Are you sure you want to delete "
- "%d journal entries?"), n_comps);
- break;
-
- default:
- g_message ("delete_component_dialog(): Cannot handle objects of type %d",
- vtype);
- return FALSE;
- }
- }
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
- 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 3b728a3f7e..0000000000
--- a/calendar/gui/dialogs/delete-comp.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * 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 DELETE_COMP_H
-#define DELETE_COMP_H
-
-#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
-
-gboolean delete_component_dialog (CalComponent *comp,
- int n_comps, CalComponentVType vtype,
- GtkWidget *widget);
-
-#endif
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
deleted file mode 100644
index 93c3e773d7..0000000000
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Delegate selector dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Damon Chaplin <damon@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 <liboaf/liboaf.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-widget.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gnome.h>
-#include <ical.h>
-#include <glade/glade.h>
-#include <widgets/misc/e-map.h>
-#include <e-destination.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "e-delegate-dialog.h"
-
-struct _EDelegateDialogPrivate {
- char *name;
- char *address;
-
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
- GtkWidget *app;
- GtkWidget *hbox;
- GtkWidget *addressbook;
-
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
- GtkWidget *entry;
-};
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames"
-static const char *section_name = "Delegate To";
-
-static void e_delegate_dialog_class_init (EDelegateDialogClass *class);
-static void e_delegate_dialog_init (EDelegateDialog *edd);
-static void e_delegate_dialog_destroy (GtkObject *object);
-
-static gboolean get_widgets (EDelegateDialog *edd);
-static void addressbook_clicked_cb (GtkWidget *widget, gpointer data);
-
-static GtkObjectClass *parent_class;
-
-
-GtkType
-e_delegate_dialog_get_type (void)
-{
- static GtkType e_delegate_dialog_type = 0;
-
- if (!e_delegate_dialog_type) {
- static const GtkTypeInfo e_delegate_dialog_info = {
- "EDelegateDialog",
- sizeof (EDelegateDialog),
- sizeof (EDelegateDialogClass),
- (GtkClassInitFunc) e_delegate_dialog_class_init,
- (GtkObjectInitFunc) e_delegate_dialog_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- e_delegate_dialog_type = gtk_type_unique (GTK_TYPE_OBJECT,
- &e_delegate_dialog_info);
- }
-
- return e_delegate_dialog_type;
-}
-
-/* Class initialization function for the event editor */
-static void
-e_delegate_dialog_class_init (EDelegateDialogClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- object_class->destroy = e_delegate_dialog_destroy;
-}
-
-/* Object initialization function for the event editor */
-static void
-e_delegate_dialog_init (EDelegateDialog *edd)
-{
- EDelegateDialogPrivate *priv;
-
- priv = g_new0 (EDelegateDialogPrivate, 1);
- edd->priv = priv;
-
- priv->address = NULL;
-}
-
-/* Destroy handler for the event editor */
-static void
-e_delegate_dialog_destroy (GtkObject *object)
-{
- EDelegateDialog *edd;
- EDelegateDialogPrivate *priv;
- GtkWidget *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (E_IS_DELEGATE_DIALOG (object));
-
- edd = E_DELEGATE_DIALOG (object);
- priv = edd->priv;
-
- /* Destroy the actual dialog. */
- dialog = e_delegate_dialog_get_toplevel (edd);
- gtk_widget_destroy (dialog);
-
- g_free (priv->address);
- priv->address = NULL;
-
- g_free (priv);
- edd->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-EDelegateDialog *
-e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char *address)
-{
- EDelegateDialogPrivate *priv;
- EDestination *dest;
- EDestination *destv[2] = {NULL, NULL};
- Bonobo_Control corba_control;
- CORBA_Environment ev;
-
- g_return_val_if_fail (edd != NULL, NULL);
- g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
-
- priv = edd->priv;
-
- /* Load the content widgets */
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-delegate-dialog.glade",
- NULL);
- if (!priv->xml) {
- g_message ("e_delegate_dialog_construct(): Could not load the Glade XML file!");
- goto error;
- }
-
- if (!get_widgets (edd)) {
- g_message ("e_delegate_dialog_construct(): Could not find all widgets in the XML file!");
- goto error;
- }
-
- CORBA_exception_init (&ev);
-
- priv->corba_select_names = oaf_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
- GNOME_Evolution_Addressbook_SelectNames_addSectionWithLimit (priv->corba_select_names,
- section_name,
- section_name,
- 1, &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("e_delegate_dialog_construct(): Unable to add section!");
- goto error;
- }
-
- corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (priv->corba_select_names,
- section_name, &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("e_delegate_dialog_construct(): Unable to get addressbook entry!");
- goto error;
- }
-
- CORBA_exception_free (&ev);
-
- priv->entry = bonobo_widget_new_control_from_objref (corba_control, CORBA_OBJECT_NIL);
- gtk_widget_show (priv->entry);
- gtk_box_pack_start (GTK_BOX (priv->hbox), priv->entry, TRUE, TRUE, 0);
-
- dest = e_destination_new ();
- destv[0] = dest;
- if (name != NULL && *name)
- e_destination_set_name (dest, name);
- if (address != NULL && *address)
- e_destination_set_email (dest, address);
- bonobo_widget_set_property (BONOBO_WIDGET (priv->entry), "destinations", e_destination_exportv (destv), NULL);
- gtk_object_unref (GTK_OBJECT (dest));
-
- gtk_signal_connect (GTK_OBJECT (priv->addressbook), "clicked",
- GTK_SIGNAL_FUNC (addressbook_clicked_cb), edd);
-
- return edd;
-
- error:
-
- gtk_object_unref (GTK_OBJECT (edd));
- return NULL;
-}
-
-static gboolean
-get_widgets (EDelegateDialog *edd)
-{
- EDelegateDialogPrivate *priv;
-
- priv = edd->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->app = GW ("delegate-dialog");
- priv->hbox = GW ("delegate-hbox");
- priv->addressbook = GW ("addressbook");
-
- return (priv->app
- && priv->hbox
- && priv->addressbook);
-}
-
-static void
-addressbook_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EDelegateDialog *edd = data;
- EDelegateDialogPrivate *priv;
- CORBA_Environment ev;
-
- priv = edd->priv;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (priv->corba_select_names, section_name, &ev);
-
- CORBA_exception_free (&ev);
-}
-
-
-/**
- * e_delegate_dialog_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.
- **/
-EDelegateDialog *
-e_delegate_dialog_new (const char *name, const char *address)
-{
- EDelegateDialog *edd;
-
- edd = E_DELEGATE_DIALOG (gtk_type_new (E_TYPE_DELEGATE_DIALOG));
- return e_delegate_dialog_construct (E_DELEGATE_DIALOG (edd), name, address);
-}
-
-char *
-e_delegate_dialog_get_delegate (EDelegateDialog *edd)
-{
- EDelegateDialogPrivate *priv;
- EDestination **destv;
- char *string = NULL;
-
- g_return_val_if_fail (edd != NULL, NULL);
- g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
-
- priv = edd->priv;
-
- bonobo_widget_get_property (BONOBO_WIDGET (priv->entry), "destinations", &string, NULL);
- destv = e_destination_importv (string);
-
- if (destv && destv[0] != NULL) {
- g_free (priv->address);
- priv->address = g_strdup (e_destination_get_email (destv[0]));
- g_free (destv);
- }
-
- g_free (string);
-
- return g_strdup (priv->address);
-}
-
-
-char *
-e_delegate_dialog_get_delegate_name (EDelegateDialog *edd)
-{
- EDelegateDialogPrivate *priv;
- EDestination **destv;
- char *string = NULL;
-
- g_return_val_if_fail (edd != NULL, NULL);
- g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
-
- priv = edd->priv;
-
- bonobo_widget_get_property (BONOBO_WIDGET (priv->entry), "destinations", &string, NULL);
- destv = e_destination_importv (string);
-
- g_message ("importv: [%s]", string);
-
- if (destv && destv[0] != NULL) {
- g_free (priv->name);
- priv->name = g_strdup (e_destination_get_name (destv[0]));
- g_free (destv);
- }
-
- g_free (string);
-
- return g_strdup (priv->name);
-}
-
-GtkWidget*
-e_delegate_dialog_get_toplevel (EDelegateDialog *edd)
-{
- EDelegateDialogPrivate *priv;
-
- g_return_val_if_fail (edd != NULL, NULL);
- g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
-
- priv = edd->priv;
-
- return priv->app;
-}
-
diff --git a/calendar/gui/dialogs/e-delegate-dialog.glade b/calendar/gui/dialogs/e-delegate-dialog.glade
deleted file mode 100644
index 394c191682..0000000000
--- a/calendar/gui/dialogs/e-delegate-dialog.glade
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>timezone-dialog</name>
- <program_name>timezone-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>GnomeDialog</class>
- <name>delegate-dialog</name>
- <visible>False</visible>
- <title>Enter Delegate</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>True</auto_close>
- <hide_on_close>True</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>ok-button</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>cancel-button</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>delegate-hbox</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Delegate To:</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>GtkButton</class>
- <name>addressbook</name>
- <can_focus>True</can_focus>
- <label>Addressbook...</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h
deleted file mode 100644
index fd083ec2ca..0000000000
--- a/calendar/gui/dialogs/e-delegate-dialog.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Evolution calendar - Delegate selector dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: 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 __E_DELEGATE_DIALOG_H__
-#define __E_DELEGATE_DIALOG_H__
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkwidget.h>
-
-
-
-#define E_TYPE_DELEGATE_DIALOG (e_delegate_dialog_get_type ())
-#define E_DELEGATE_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_TYPE_DELEGATE_DIALOG, EDelegateDialog))
-#define E_DELEGATE_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_DELEGATE_DIALOG, \
- EDelegateDialogClass))
-#define E_IS_DELEGATE_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_DELEGATE_DIALOG))
-#define E_IS_DELEGATE_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_DELEGATE_DIALOG))
-
-
-typedef struct _EDelegateDialog EDelegateDialog;
-typedef struct _EDelegateDialogClass EDelegateDialogClass;
-typedef struct _EDelegateDialogPrivate EDelegateDialogPrivate;
-
-struct _EDelegateDialog {
- GtkObject object;
-
- /* Private data */
- EDelegateDialogPrivate *priv;
-};
-
-struct _EDelegateDialogClass {
- GtkObjectClass parent_class;
-};
-
-GtkType e_delegate_dialog_get_type (void);
-
-EDelegateDialog* e_delegate_dialog_construct (EDelegateDialog *etd,
- const char *name,
- const char *address);
-
-EDelegateDialog* e_delegate_dialog_new (const char *name,
- const char *address);
-
-char* e_delegate_dialog_get_delegate (EDelegateDialog *etd);
-
-char* e_delegate_dialog_get_delegate_name (EDelegateDialog *etd);
-
-void e_delegate_dialog_set_delegate (EDelegateDialog *etd,
- const char *address);
-
-GtkWidget* e_delegate_dialog_get_toplevel (EDelegateDialog *etd);
-
-
-
-
-#endif /* __E_DELEGATE_DIALOG_H__ */
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
deleted file mode 100644
index ea73ba2abf..0000000000
--- a/calendar/gui/dialogs/event-editor.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Event editor dialog
- *
- * Copyright (C) 2000 Ximian, 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 <libgnome/gnome-i18n.h>
-#include <widgets/misc/e-dateedit.h>
-
-#include "event-page.h"
-#include "alarm-page.h"
-#include "recurrence-page.h"
-#include "meeting-page.h"
-#include "schedule-page.h"
-#include "cancel-comp.h"
-#include "event-editor.h"
-
-struct _EventEditorPrivate {
- EventPage *event_page;
- AlarmPage *alarm_page;
- RecurrencePage *recur_page;
- MeetingPage *meet_page;
- SchedulePage *sched_page;
-
- EMeetingModel *model;
-
- gboolean meeting_shown;
- gboolean updating;
-};
-
-
-
-static void event_editor_class_init (EventEditorClass *class);
-static void event_editor_init (EventEditor *ee);
-static void event_editor_set_cal_client (CompEditor *editor, CalClient *client);
-static void event_editor_edit_comp (CompEditor *editor, CalComponent *comp);
-static void event_editor_send_comp (CompEditor *editor, CalComponentItipMethod method);
-static void event_editor_destroy (GtkObject *object);
-
-static void schedule_meeting_cmd (GtkWidget *widget, gpointer data);
-static void refresh_meeting_cmd (GtkWidget *widget, gpointer data);
-static void cancel_meeting_cmd (GtkWidget *widget, gpointer data);
-static void forward_cmd (GtkWidget *widget, gpointer data);
-
-static void model_row_changed_cb (ETableModel *etm, int row, gpointer data);
-static void row_count_changed_cb (ETableModel *etm, int row, int count, gpointer data);
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ActionScheduleMeeting", schedule_meeting_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionRefreshMeeting", refresh_meeting_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionCancelMeeting", cancel_meeting_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionForward", forward_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-static CompEditorClass *parent_class;
-
-
-
-/**
- * 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 (TYPE_COMP_EDITOR,
- &event_editor_info);
- }
-
- return event_editor_type;
-}
-
-/* Class initialization function for the event editor */
-static void
-event_editor_class_init (EventEditorClass *klass)
-{
- GtkObjectClass *object_class;
- CompEditorClass *editor_class;
-
- object_class = (GtkObjectClass *) klass;
- editor_class = (CompEditorClass *) klass;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR);
-
- editor_class->set_cal_client = event_editor_set_cal_client;
- editor_class->edit_comp = event_editor_edit_comp;
- editor_class->send_comp = event_editor_send_comp;
-
- object_class->destroy = event_editor_destroy;
-}
-
-static void
-set_menu_sens (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionScheduleMeeting",
- "sensitive", priv->meeting_shown ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionRefreshMeeting",
- "sensitive", priv->meeting_shown ? "1" : "0");
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionCancelMeeting",
- "sensitive", priv->meeting_shown ? "1" : "0");
-}
-
-static void
-init_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- gtk_signal_connect (GTK_OBJECT (priv->model), "model_row_changed",
- GTK_SIGNAL_FUNC (model_row_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->model), "model_rows_inserted",
- GTK_SIGNAL_FUNC (row_count_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->model), "model_rows_deleted",
- GTK_SIGNAL_FUNC (row_count_changed_cb), ee);
-}
-
-/* Object initialization function for the event editor */
-static void
-event_editor_init (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = g_new0 (EventEditorPrivate, 1);
- ee->priv = priv;
-
- priv->event_page = event_page_new ();
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->event_page),
- _("Appointment"));
-
- priv->alarm_page = alarm_page_new ();
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->alarm_page),
- _("Reminder"));
-
- priv->recur_page = recurrence_page_new ();
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->recur_page),
- _("Recurrence"));
-
- priv->model = E_MEETING_MODEL (e_meeting_model_new ());
-
- priv->sched_page = schedule_page_new (priv->model);
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
-
- priv->meet_page = meeting_page_new (priv->model);
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Meeting"));
-
- comp_editor_merge_ui (COMP_EDITOR (ee), EVOLUTION_DATADIR
- "/gnome/ui/evolution-event-editor.xml",
- verbs);
-
- priv->meeting_shown = TRUE;
- priv->updating = FALSE;
-
- init_widgets (ee);
- set_menu_sens (ee);
-}
-
-static void
-event_editor_set_cal_client (CompEditor *editor, CalClient *client)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
-
- ee = EVENT_EDITOR (editor);
- priv = ee->priv;
-
- e_meeting_model_set_cal_client (priv->model, client);
-
- if (parent_class->set_cal_client)
- parent_class->set_cal_client (editor, client);
-}
-
-static void
-event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
- GSList *attendees = NULL;
-
- ee = EVENT_EDITOR (editor);
- priv = ee->priv;
-
- priv->updating = TRUE;
-
- cal_component_get_attendee_list (comp, &attendees);
- if (attendees == NULL) {
- comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page));
- comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->sched_page));
- e_meeting_model_remove_all_attendees (priv->model);
- priv->meeting_shown = FALSE;
- } else {
- GSList *l;
-
- for (l = attendees; l != NULL; l = l->next) {
- CalComponentAttendee *ca = l->data;
- EMeetingAttendee *ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
-
- e_meeting_model_add_attendee (priv->model, ia);
- gtk_object_unref (GTK_OBJECT (ia));
- }
- priv->meeting_shown = TRUE;
- }
- cal_component_free_attendee_list (attendees);
-
- set_menu_sens (ee);
- comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown);
-
- priv->updating = FALSE;
-
- if (parent_class->edit_comp)
- parent_class->edit_comp (editor, comp);
-}
-
-static void
-event_editor_send_comp (CompEditor *editor, CalComponentItipMethod method)
-{
- EventEditor *ee = EVENT_EDITOR (editor);
- EventEditorPrivate *priv;
- CalComponent *comp = NULL;
-
- priv = ee->priv;
-
- /* Don't cancel more than once */
- if (method == CAL_COMPONENT_METHOD_CANCEL)
- return;
-
- comp = meeting_page_get_cancel_comp (priv->meet_page);
- if (comp != NULL) {
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-
- if (parent_class->send_comp)
- parent_class->send_comp (editor, method);
-}
-
-/* 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;
-
- gtk_object_unref (GTK_OBJECT (priv->event_page));
- gtk_object_unref (GTK_OBJECT (priv->alarm_page));
- gtk_object_unref (GTK_OBJECT (priv->recur_page));
- gtk_object_unref (GTK_OBJECT (priv->meet_page));
- gtk_object_unref (GTK_OBJECT (priv->sched_page));
-
- gtk_object_unref (GTK_OBJECT (priv->model));
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/**
- * 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)
-{
- return EVENT_EDITOR (gtk_type_new (TYPE_EVENT_EDITOR));
-}
-
-static void
-schedule_meeting_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- if (!priv->meeting_shown) {
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->sched_page),
- _("Scheduling"));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Meeting"));
- priv->meeting_shown = TRUE;
-
- set_menu_sens (ee);
- comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown);
- }
-
- comp_editor_show_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->meet_page));
-}
-
-static void
-refresh_meeting_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
-
- comp_editor_save_comp (COMP_EDITOR (ee));
- comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_REFRESH);
-}
-
-static void
-cancel_meeting_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
- CalComponent *comp;
-
- comp = comp_editor_get_current_comp (COMP_EDITOR (ee));
- if (cancel_component_dialog (comp)) {
- comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_CANCEL);
- comp_editor_delete_comp (COMP_EDITOR (ee));
- }
-}
-
-static void
-forward_cmd (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
-
- comp_editor_save_comp (COMP_EDITOR (ee));
- comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_PUBLISH);
-}
-
-static void
-model_row_changed_cb (ETableModel *etm, int row, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- if (!priv->updating)
- comp_editor_set_changed (COMP_EDITOR (ee), TRUE);
-}
-
-static void
-row_count_changed_cb (ETableModel *etm, int row, int count, gpointer data)
-{
- EventEditor *ee = EVENT_EDITOR (data);
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- if (!priv->updating)
- comp_editor_set_changed (COMP_EDITOR (ee), TRUE);
-}
diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h
deleted file mode 100644
index 8ab343521c..0000000000
--- a/calendar/gui/dialogs/event-editor.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Evolution calendar - Event editor dialog
- *
- * Copyright (C) 2000 Ximian, 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_H__
-#define __EVENT_EDITOR_H__
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkobject.h>
-#include "comp-editor.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 {
- CompEditor parent;
-
- /* Private data */
- EventEditorPrivate *priv;
-};
-
-struct _EventEditorClass {
- CompEditorClass parent_class;
-};
-
-GtkType event_editor_get_type (void);
-EventEditor *event_editor_construct (EventEditor *ee);
-EventEditor *event_editor_new (void);
-
-
-
-#endif /* __EVENT_EDITOR_H__ */
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
deleted file mode 100644
index 8a1415b9d2..0000000000
--- a/calendar/gui/dialogs/event-page.c
+++ /dev/null
@@ -1,1373 +0,0 @@
-/* Evolution calendar - Main page of the event editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <gtk/gtktogglebutton.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-categories.h>
-#include "e-util/e-categories-config.h"
-#include "e-util/e-dialog-widgets.h"
-#include "widgets/misc/e-dateedit.h"
-#include "cal-util/timeutil.h"
-#include "../calendar-config.h"
-#include "../e-timezone-entry.h"
-#include "comp-editor-util.h"
-#include "event-page.h"
-
-
-
-/* Private part of the EventPage structure */
-struct _EventPagePrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
-
- GtkWidget *main;
-
- GtkWidget *summary;
-
- GtkWidget *start_time;
- GtkWidget *end_time;
- GtkWidget *start_timezone;
- GtkWidget *end_timezone;
- GtkWidget *all_day_event;
-
- GtkWidget *description;
-
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
-
- GtkWidget *show_time_as_free;
- GtkWidget *show_time_as_busy;
-
- GtkWidget *contacts_btn;
- GtkWidget *contacts_box;
-
- GtkWidget *categories_btn;
- GtkWidget *categories;
-
- gboolean updating;
-
- /* This is TRUE if both the start & end timezone are the same. If the
- start timezone is then changed, we updated the end timezone to the
- same value, since 99% of events start and end in one timezone. */
- gboolean sync_timezones;
-
- /* The Corba component for selecting contacts, and the entry field
- which we place in the dialog. */
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
- GtkWidget *contacts_entry;
-};
-
-
-
-static void event_page_class_init (EventPageClass *class);
-static void event_page_init (EventPage *epage);
-static void event_page_destroy (GtkObject *object);
-
-static GtkWidget *event_page_get_widget (CompEditorPage *page);
-static void event_page_focus_main_widget (CompEditorPage *page);
-static void event_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void event_page_fill_component (CompEditorPage *page, CalComponent *comp);
-static void event_page_set_summary (CompEditorPage *page, const char *summary);
-static void event_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * event_page_get_type:
- *
- * Registers the #EventPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #EventPage class.
- **/
-GtkType
-event_page_get_type (void)
-{
- static GtkType event_page_type;
-
- if (!event_page_type) {
- static const GtkTypeInfo event_page_info = {
- "EventPage",
- sizeof (EventPage),
- sizeof (EventPageClass),
- (GtkClassInitFunc) event_page_class_init,
- (GtkObjectInitFunc) event_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- event_page_type = gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &event_page_info);
- }
-
- return event_page_type;
-}
-
-/* Class initialization function for the event page */
-static void
-event_page_class_init (EventPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = event_page_get_widget;
- editor_page_class->focus_main_widget = event_page_focus_main_widget;
- editor_page_class->fill_widgets = event_page_fill_widgets;
- editor_page_class->fill_component = event_page_fill_component;
- editor_page_class->set_summary = event_page_set_summary;
- editor_page_class->set_dates = event_page_set_dates;
-
- object_class->destroy = event_page_destroy;
-}
-
-/* Object initialization function for the event page */
-static void
-event_page_init (EventPage *epage)
-{
- EventPagePrivate *priv;
-
- priv = g_new0 (EventPagePrivate, 1);
- epage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
- priv->summary = NULL;
- priv->start_time = NULL;
- priv->end_time = NULL;
- priv->start_timezone = NULL;
- priv->end_timezone = NULL;
- priv->all_day_event = NULL;
- priv->description = NULL;
- priv->classification_public = NULL;
- priv->classification_private = NULL;
- priv->classification_confidential = NULL;
- priv->show_time_as_free = NULL;
- priv->show_time_as_busy = NULL;
- priv->contacts_btn = NULL;
- priv->contacts_box = NULL;
- priv->categories_btn = NULL;
- priv->categories = NULL;
-
- priv->updating = FALSE;
- priv->sync_timezones = FALSE;
-
- priv->corba_select_names = CORBA_OBJECT_NIL;
- priv->contacts_entry = NULL;
-}
-
-/* Destroy handler for the event page */
-static void
-event_page_destroy (GtkObject *object)
-{
- EventPage *epage;
- EventPagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_EVENT_PAGE (object));
-
- epage = EVENT_PAGE (object);
- priv = epage->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);
- }
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- epage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-static const int transparency_map[] = {
- CAL_COMPONENT_TRANSP_TRANSPARENT,
- CAL_COMPONENT_TRANSP_OPAQUE,
- -1
-};
-
-/* get_widget handler for the event page */
-static GtkWidget *
-event_page_get_widget (CompEditorPage *page)
-{
- EventPage *epage;
- EventPagePrivate *priv;
-
- epage = EVENT_PAGE (page);
- priv = epage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the event page */
-static void
-event_page_focus_main_widget (CompEditorPage *page)
-{
- EventPage *epage;
- EventPagePrivate *priv;
-
- epage = EVENT_PAGE (page);
- priv = epage->priv;
-
- gtk_widget_grab_focus (priv->summary);
-}
-
-/* Checks if the event's time starts and ends at midnight, and sets the
- *"all day event" box accordingly.
- */
-static void
-check_all_day (EventPage *epage)
-{
- EventPagePrivate *priv;
- gboolean all_day = FALSE, start_set, end_set;
- gint start_hour, start_minute, end_hour, end_minute;
-
- priv = epage->priv;
-
- start_set = e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_hour, &start_minute);
-
- end_set = e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_hour, &end_minute);
-
- /* all day event checkbox */
- if ((!start_set || (start_hour == 0 && start_minute == 0))
- && (!end_set || (end_hour == 0 && end_minute == 0)))
- all_day = TRUE;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->all_day_event),
- epage);
- e_dialog_toggle_set (priv->all_day_event, all_day);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->all_day_event),
- epage);
-
- 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);
-
- /* We will use DATE values for all-day events eventually, in which
- case timezones can't be used. */
- if (all_day) {
- gtk_widget_hide (priv->start_timezone);
- gtk_widget_hide (priv->end_timezone);
- } else {
- gtk_widget_show (priv->start_timezone);
- gtk_widget_show (priv->end_timezone);
- }
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (EventPage *epage)
-{
- EventPagePrivate *priv;
-
- priv = epage->priv;
-
- /* Summary, description */
- e_dialog_editable_set (priv->summary, NULL);
- e_dialog_editable_set (priv->description, NULL);
-
- /* Start and end times */
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time),
- epage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), epage);
-
- e_date_edit_set_time (E_DATE_EDIT (priv->start_time), 0);
- e_date_edit_set_time (E_DATE_EDIT (priv->end_time), 0);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time),
- epage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time),
- epage);
-
- check_all_day (epage);
-
- /* Classification */
- e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE, classification_map);
-
- /* Show Time As (Transparency) */
- e_dialog_radio_set (priv->show_time_as_free,
- CAL_COMPONENT_TRANSP_OPAQUE, transparency_map);
-
- /* Categories */
- e_dialog_editable_set (priv->categories, NULL);
-}
-
-
-static void
-contacts_changed_cb (BonoboListener *listener,
- char *event_name,
- CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- g_print ("In contacts_changed_cb\n");
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (epage));
-}
-
-
-/* fill_widgets handler for the event page */
-static void
-event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- CalComponentText text;
- CalComponentClassification cl;
- CalComponentTransparency transparency;
- CalComponentDateTime start_date, end_date;
- GSList *l;
- const char *categories;
- CalClientGetStatus status;
- struct icaltimetype *start_tt, *end_tt;
- icaltimezone *start_zone = NULL, *end_zone = NULL;
-
- g_return_if_fail (page->client != NULL);
-
- epage = EVENT_PAGE (page);
- priv = epage->priv;
-
- /* Don't send off changes during this time */
- priv->updating = TRUE;
-
- /* Clean the page */
- clear_widgets (epage);
-
- /* Summary, description(s) */
-
- cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
-
- cal_component_get_description_list (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 */
-
- cal_component_get_dtstart (comp, &start_date);
-
- /* Note that if we are creating a new event, the timezones may not be
- on the server, so we try to get the builtin timezone with the TZID
- first. */
- start_zone = icaltimezone_get_builtin_timezone_from_tzid (start_date.tzid);
- if (!start_zone) {
- status = cal_client_get_timezone (page->client,
- start_date.tzid,
- &start_zone);
- /* FIXME: Handle error better. */
- if (status != CAL_CLIENT_GET_SUCCESS)
- g_warning ("Couldn't get timezone from server: %s",
- start_date.tzid ? start_date.tzid : "");
- }
-
- cal_component_get_dtend (comp, &end_date);
- end_zone = icaltimezone_get_builtin_timezone_from_tzid (end_date.tzid);
- if (!end_zone) {
- status = cal_client_get_timezone (page->client,
- end_date.tzid,
- &end_zone);
- /* FIXME: Handle error better. */
- if (status != CAL_CLIENT_GET_SUCCESS)
- g_warning ("Couldn't get timezone from server: %s",
- end_date.tzid ? end_date.tzid : "");
- }
-
- /* 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. */
- start_tt = start_date.value;
- end_tt = end_date.value;
- if (start_tt->hour == 0 && start_tt->minute == 0 && start_tt->second == 0
- && end_tt->hour == 0 && end_tt->minute == 0 && end_tt->second == 0)
- icaltime_adjust (end_tt, -1, 0, 0, 0);
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time),
- epage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), epage);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->start_time), start_tt->year,
- start_tt->month, start_tt->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_time),
- start_tt->hour, start_tt->minute);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->end_time), end_tt->year,
- end_tt->month, end_tt->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time),
- end_tt->hour, end_tt->minute);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time),
- epage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time),
- epage);
-
- cal_component_free_datetime (&start_date);
- cal_component_free_datetime (&end_date);
-
- check_all_day (epage);
-
- /* Set the timezones, and set sync_timezones to TRUE if both timezones
- are the same. */
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone),
- start_zone);
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->end_timezone),
- end_zone);
- priv->sync_timezones = (start_zone == end_zone) ? TRUE : FALSE;
-
-
- /* Classification */
-
- cal_component_get_classification (comp, &cl);
-
- switch (cl) {
- case CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
-
- case CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- break;
-
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
- break;
-
- default:
- /* What do do? We can't g_assert_not_reached() since it is a
- * value from an external file.
- */
- }
-
-
- /* Show Time As (Transparency) */
- cal_component_get_transparency (comp, &transparency);
- switch (transparency) {
- case CAL_COMPONENT_TRANSP_TRANSPARENT:
- e_dialog_radio_set (priv->show_time_as_free,
- CAL_COMPONENT_TRANSP_TRANSPARENT,
- transparency_map);
- break;
-
- default:
- e_dialog_radio_set (priv->show_time_as_free,
- CAL_COMPONENT_TRANSP_OPAQUE,
- transparency_map);
- break;
- }
-
-
-
- /* Categories */
- cal_component_get_categories (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
- /* Contacts */
- comp_editor_contacts_to_widget (priv->contacts_entry, comp);
-
- /* We connect the contacts changed signal here, as we have to be a bit
- more careful with it due to the use or Corba. The priv->updating
- flag won't work as we won't get the changed event immediately.
- FIXME: Unfortunately this doesn't work either. We never get the
- changed event now. */
- comp_editor_connect_contacts_changed (priv->contacts_entry,
- contacts_changed_cb, epage);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the event page */
-static void
-event_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- CalComponentDateTime date;
- struct icaltimetype icaltime;
- gboolean all_day_event, date_set;
- char *cat, *str;
- CalComponentClassification classif;
- CalComponentTransparency transparency;
- icaltimezone *start_zone, *end_zone;
-
- epage = EVENT_PAGE (page);
- priv = epage->priv;
-
- /* 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 */
-
- icaltime = icaltime_null_time ();
-
- date.value = &icaltime;
- date.tzid = NULL;
-
- /* FIXME: We should use is_date at some point. */
-
- /* If the all_day toggle is set, the end date is inclusive of the
- entire day on which it points to. Also, we will use DATE values
- eventually, which can't have timezones. So for now we just use
- the default timezone. */
- all_day_event = e_dialog_toggle_get (priv->all_day_event);
-
- if (all_day_event) {
- char *location = calendar_config_get_timezone ();
- start_zone = end_zone = icaltimezone_get_builtin_timezone (location);
- } else {
- start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- end_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->end_timezone));
- }
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &icaltime.hour,
- &icaltime.minute);
- g_assert (date_set);
- date.tzid = icaltimezone_get_tzid (start_zone);
- cal_component_set_dtstart (comp, &date);
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &icaltime.hour,
- &icaltime.minute);
- g_assert (date_set);
-
- if (all_day_event) {
- icaltime.hour = 0;
- icaltime.minute = 0;
- icaltime.second = 0;
- icaltime_adjust (&icaltime, 1, 0, 0, 0);
- }
-
- date.tzid = icaltimezone_get_tzid (end_zone);
- cal_component_set_dtend (comp, &date);
-
-
- /* Categories */
-
- cat = e_dialog_editable_get (priv->categories);
- str = comp_editor_strip_categories (cat);
- if (cat)
- g_free (cat);
-
- cal_component_set_categories (comp, str);
-
- if (str)
- g_free (str);
-
- /* Classification */
-
- classif = e_dialog_radio_get (priv->classification_public,
- classification_map);
- cal_component_set_classification (comp, classif);
-
- /* Show Time As (Transparency) */
-
- transparency = e_dialog_radio_get (priv->show_time_as_free,
- transparency_map);
- cal_component_set_transparency (comp, transparency);
-
- /* Contacts */
-
- comp_editor_contacts_to_component (priv->contacts_entry, comp);
-}
-
-/* set_summary handler for the event page */
-static void
-event_page_set_summary (CompEditorPage *page, const char *summary)
-{
- /* nothing */
-}
-
-static void
-event_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- /* nothing */
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (EventPage *epage)
-{
- EventPagePrivate *priv;
-
- priv = epage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("event-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
- priv->summary = GW ("general-summary");
-
- priv->start_time = GW ("start-time");
- priv->end_time = GW ("end-time");
- priv->start_timezone = GW ("start-timezone");
- priv->end_timezone = GW ("end-timezone");
- 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->show_time_as_free = GW ("show-time-as-free");
- priv->show_time_as_busy = GW ("show-time-as-busy");
-
- priv->contacts_btn = GW ("contacts-button");
- priv->contacts_box = GW ("contacts-box");
-
- priv->categories_btn = GW ("categories-button");
- priv->categories = GW ("categories");
-
-#undef GW
-
- return (priv->summary
- && priv->start_time
- && priv->end_time
- && priv->start_timezone
- && priv->end_timezone
- && priv->all_day_event
- && priv->description
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
- && priv->show_time_as_free
- && priv->show_time_as_busy
- && priv->contacts_btn
- && priv->contacts_box
- && priv->categories_btn
- && priv->categories);
-}
-
-/* Callback used when the summary changes; we emit the notification signal. */
-static void
-summary_changed_cb (GtkEditable *editable, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- gchar *summary;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- if (priv->updating)
- return;
-
- summary = e_dialog_editable_get (GTK_WIDGET (editable));
- comp_editor_page_notify_summary_changed (COMP_EDITOR_PAGE (epage),
- summary);
- g_free (summary);
-}
-
-
-static void
-notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
- struct icaltimetype *end_tt)
-{
- EventPagePrivate *priv;
- CompEditorPageDates dates;
- CalComponentDateTime start_dt, end_dt;
- gboolean all_day_event;
- icaltimezone *start_zone, *end_zone;
-
- priv = epage->priv;
-
- all_day_event = e_dialog_toggle_get (priv->all_day_event);
-
- start_dt.value = start_tt;
- end_dt.value = end_tt;
-
- if (all_day_event) {
- /* FIXME: When we switch to using DATE values we'll set the
- TZIDs to NULL. */
- char *location;
-
- location = calendar_config_get_timezone ();
- start_zone = end_zone = icaltimezone_get_builtin_timezone (location);
- } else {
- start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- end_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->end_timezone));
- }
-
- start_dt.tzid = start_zone ? icaltimezone_get_tzid (start_zone) : NULL;
- end_dt.tzid = end_zone ? icaltimezone_get_tzid (end_zone) : NULL;
-
- dates.start = &start_dt;
- dates.end = &end_dt;
-
- dates.due = NULL;
- dates.complete = NULL;
- comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (epage),
- &dates);
-}
-
-
-/*
- * This is called whenever the start or end dates or timezones is changed.
- * It makes sure that the start date < end date, and currently sets the
- * "all day event" checkbox as appropriate (but won't when we use DATE values).
- * It also emits the notification signals so the other event editor pages
- * update their labels etc.
- *
- * If adjust_end_time is TRUE, if the start time < end time it will adjust
- * the end time. If FALSE it will adjust the start time. If the user sets the
- * start or end time, the other time is adjusted to make it valid.
- */
-static void
-times_updated (EventPage *epage, gboolean adjust_end_time)
-{
- EventPagePrivate *priv;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype end_tt = icaltime_null_time();
- struct icaltimetype end_tt_copy;
- int cmp;
- gboolean date_set, all_day_event;
- icaltimezone *start_zone, *end_zone;
-
- priv = epage->priv;
-
- if (priv->updating)
- return;
-
- /* Fetch the start and end times and timezones from the widgets. */
- all_day_event = e_dialog_toggle_get (priv->all_day_event);
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
- g_assert (date_set);
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
- g_assert (date_set);
-
- if (all_day_event) {
- char *location = calendar_config_get_timezone ();
- start_zone = end_zone = icaltimezone_get_builtin_timezone (location);
- } else {
- start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- end_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->end_timezone));
- }
-
-
- /* Convert the end time to the same timezone as the start time. */
- end_tt_copy = end_tt;
- icaltimezone_convert_time (&end_tt_copy, end_zone, start_zone);
-
- /* Now check if the start time is after the end time. If it is, we need
- to modify one of the times. */
- cmp = icaltime_compare (start_tt, end_tt_copy);
- if (cmp > 0) {
- if (adjust_end_time) {
- /* Modify the end time, to be the start + 1 hour,
- or the same as the start time for all-day events.
- We copy the start time, add on one hour, then
- convert it to the original end timezone. */
- end_tt = start_tt;
- if (!all_day_event) {
- icaltime_adjust (&end_tt, 0, 1, 0, 0);
- icaltimezone_convert_time (&end_tt, start_zone,
- end_zone);
- }
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), epage);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->end_time),
- end_tt.year,
- end_tt.month,
- end_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time),
- end_tt.hour,
- end_tt.minute);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), epage);
- } else {
- /* Modify the start time, to be the end - 1 hour,
- or the same as the start time for all-day events.
- We copy the end time, subtract one hour, then
- convert it to the original start timezone. */
- start_tt = end_tt;
- if (!all_day_event) {
- icaltime_adjust (&start_tt, 0, -1, 0, 0);
- icaltimezone_convert_time (&start_tt, end_zone,
- start_zone);
- }
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), epage);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->start_time),
- start_tt.year,
- start_tt.month,
- start_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_time),
- start_tt.hour,
- start_tt.minute);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), epage);
- }
- }
-
- /* Set the "all day event" button as appropriate */
- check_all_day (epage);
-
- /* Notify upstream */
- notify_dates_changed (epage, &start_tt, &end_tt);
-}
-
-/* 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 (GtkWidget *dedit, gpointer data)
-{
- EventPage *epage;
-
- epage = EVENT_PAGE (data);
-
- times_updated (epage, dedit == epage->priv->start_time);
-}
-
-
-/* Callback used when the start timezone is changed. If sync_timezones is set,
- * we set the end timezone to the same value. It also updates the start time
- * labels on the other notebook pages.
- */
-static void
-start_timezone_changed_cb (GtkWidget *widget, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- icaltimezone *zone;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- if (priv->sync_timezones) {
- zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- priv->updating = TRUE;
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->end_timezone), zone);
- priv->updating = FALSE;
- }
-
- times_updated (epage, TRUE);
-}
-
-
-/* Callback used when the end timezone is changed. It checks if the end
- * timezone is the same as the start timezone and sets sync_timezones if so.
- */
-static void
-end_timezone_changed_cb (GtkWidget *widget, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- icaltimezone *start_zone, *end_zone;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- end_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->end_timezone));
-
- priv->sync_timezones = (start_zone == end_zone) ? TRUE : FALSE;
-
- times_updated (epage, TRUE);
-}
-
-/* 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
-all_day_event_toggled_cb (GtkWidget *toggle, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- gboolean all_day;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype end_tt = icaltime_null_time();
- gboolean date_set;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- /* 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.
- */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
- g_assert (date_set);
-
- if (all_day) {
- /* Round down to the start of the day. */
- start_tt.hour = 0;
- start_tt.minute = 0;
- start_tt.second = 0;
- } else {
- /* Set to the start of the working day. */
- start_tt.hour = calendar_config_get_day_start_hour ();
- start_tt.minute = calendar_config_get_day_start_minute ();
- start_tt.second = 0;
- }
-
- /*
- * End time.
- */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
- g_assert (date_set);
-
- if (all_day) {
- /* Round down to the start of the day. */
- end_tt.hour = 0;
- end_tt.minute = 0;
- end_tt.second = 0;
- } else {
- /* If the event end is now on or before the event start day,
- * make it end one hour after the start. */
- if (end_tt.year < start_tt.year
- || (end_tt.year == start_tt.year
- && end_tt.month < start_tt.month)
- || (end_tt.year == start_tt.year
- && end_tt.month == start_tt.month
- && end_tt.day <= start_tt.day)) {
- end_tt.year = start_tt.year;
- end_tt.month = start_tt.month;
- end_tt.day = start_tt.day;
- end_tt.hour = start_tt.hour;
- icaltime_adjust (&end_tt, 0, 1, 0, 0);
- }
- }
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time),
- epage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time),
- epage);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->start_time), start_tt.year,
- start_tt.month, start_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_time),
- start_tt.hour, start_tt.minute);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->end_time), end_tt.year,
- end_tt.month, end_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time),
- end_tt.hour, end_tt.minute);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time),
- epage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time),
- epage);
-
- 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);
-
- /* We will use DATE values for all-day events eventually, in which
- case timezones can't be used. */
- if (all_day) {
- gtk_widget_hide (priv->start_timezone);
- gtk_widget_hide (priv->end_timezone);
- } else {
- gtk_widget_show (priv->start_timezone);
- gtk_widget_show (priv->end_timezone);
- }
-
- /* Notify upstream */
- notify_dates_changed (epage, &start_tt, &end_tt);
-}
-
-/* Callback used when the contacts button is clicked; we must bring up the
- * contact list dialog.
- */
-static void
-contacts_clicked_cb (GtkWidget *button, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- g_print ("In contacts_clicked_cb\n");
- comp_editor_show_contacts_dialog (priv->corba_select_names);
-
- /* FIXME: Currently we aren't getting the changed event from the
- SelectNames component correctly, so we aren't saving the event
- if just the contacts are changed. To work around that, we assume
- that if the contacts button is clicked it is changed. */
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (epage));
-}
-
-/* Callback used when the categories button is clicked; we must bring up the
- * category list dialog.
- */
-static void
-categories_clicked_cb (GtkWidget *button, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
- GtkWidget *entry;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- entry = priv->categories;
- e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry));
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed_cb (GtkWidget *widget, gpointer data)
-{
- EventPage *epage;
- EventPagePrivate *priv;
-
- epage = EVENT_PAGE (data);
- priv = epage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (epage));
-}
-
-/* Hooks the widget signals */
-static gboolean
-init_widgets (EventPage *epage)
-{
- EventPagePrivate *priv;
- char *location;
- icaltimezone *zone;
-
- priv = epage->priv;
-
- /* Make sure the EDateEdit widgets use our timezones to get the
- current time. */
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->start_time),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- epage, NULL);
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->end_time),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- epage, NULL);
-
- /* Summary */
- gtk_signal_connect (GTK_OBJECT (priv->summary), "changed",
- GTK_SIGNAL_FUNC (summary_changed_cb), epage);
-
- /* Description - turn on word wrap. */
- gtk_text_set_word_wrap (GTK_TEXT (priv->description), TRUE);
-
- /* Start and end times */
- gtk_signal_connect (GTK_OBJECT (priv->start_time), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->end_time), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), epage);
-
- gtk_signal_connect (GTK_OBJECT (priv->start_timezone), "changed",
- GTK_SIGNAL_FUNC (start_timezone_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->end_timezone), "changed",
- GTK_SIGNAL_FUNC (end_timezone_changed_cb), epage);
-
- gtk_signal_connect (GTK_OBJECT (priv->all_day_event), "toggled",
- GTK_SIGNAL_FUNC (all_day_event_toggled_cb), epage);
-
- /* Contacts button */
- gtk_signal_connect (GTK_OBJECT (priv->contacts_btn), "clicked",
- GTK_SIGNAL_FUNC (contacts_clicked_cb), epage);
-
- /* Categories button */
- gtk_signal_connect (GTK_OBJECT (priv->categories_btn), "clicked",
- GTK_SIGNAL_FUNC (categories_clicked_cb), epage);
-
- /* Connect the default signal handler to use to make sure we notify
- * upstream of changes to the widget values.
- */
-
- gtk_signal_connect (GTK_OBJECT (priv->summary), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->start_time), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->end_time), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->start_timezone), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->end_timezone), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->all_day_event), "toggled",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
- gtk_signal_connect (GTK_OBJECT (priv->classification_public),
- "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
- epage);
- gtk_signal_connect (GTK_OBJECT (priv->classification_private),
- "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
- epage);
- gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
- "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
- epage);
- gtk_signal_connect (GTK_OBJECT (priv->show_time_as_free),
- "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
- epage);
- gtk_signal_connect (GTK_OBJECT (priv->show_time_as_busy),
- "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
- epage);
- gtk_signal_connect (GTK_OBJECT (priv->categories), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), epage);
-
- /* Create the contacts entry, a corba control from the address book. */
- priv->corba_select_names = comp_editor_create_contacts_component ();
- if (priv->corba_select_names == CORBA_OBJECT_NIL)
- return FALSE;
-
- priv->contacts_entry = comp_editor_create_contacts_control (priv->corba_select_names);
- if (priv->contacts_entry == NULL)
- return FALSE;
-
- gtk_container_add (GTK_CONTAINER (priv->contacts_box),
- priv->contacts_entry);
-
- /* Set the default timezone, so the timezone entry may be hidden. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), zone);
- e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->end_timezone), zone);
-
- return TRUE;
-}
-
-
-
-/**
- * event_page_construct:
- * @epage: An event page.
- *
- * Constructs an event page by loading its Glade data.
- *
- * Return value: The same object as @epage, or NULL if the widgets could not be
- * created.
- **/
-EventPage *
-event_page_construct (EventPage *epage)
-{
- EventPagePrivate *priv;
-
- priv = epage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/event-page.glade",
- NULL);
- if (!priv->xml) {
- g_message ("event_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (epage)) {
- g_message ("event_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- if (!init_widgets (epage)) {
- g_message ("event_page_construct(): "
- "Could not initialize the widgets!");
- return NULL;
- }
-
- return epage;
-}
-
-/**
- * event_page_new:
- *
- * Creates a new event page.
- *
- * Return value: A newly-created event page, or NULL if the page could
- * not be created.
- **/
-EventPage *
-event_page_new (void)
-{
- EventPage *epage;
-
- epage = gtk_type_new (TYPE_EVENT_PAGE);
- if (!event_page_construct (epage)) {
- gtk_object_unref (GTK_OBJECT (epage));
- return NULL;
- }
-
- return epage;
-}
-
-GtkWidget *make_date_edit (void);
-
-GtkWidget *
-make_date_edit (void)
-{
- return comp_editor_new_date_edit (TRUE, TRUE, TRUE);
-}
-
-GtkWidget *make_timezone_entry (void);
-
-GtkWidget *
-make_timezone_entry (void)
-{
- return e_timezone_entry_new ();
-}
diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade
deleted file mode 100644
index e90490dd03..0000000000
--- a/calendar/gui/dialogs/event-page.glade
+++ /dev/null
@@ -1,544 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>event-page</name>
- <program_name>event-page</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>GtkWindow</class>
- <name>event-toplevel</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>GtkVBox</class>
- <name>event-page</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>4</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>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>
- <class>Custom</class>
- <name>end-timezone</name>
- <creation_function>make_timezone_entry</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Mon, 18 Jun 2001 23:51:40 GMT</last_modification_time>
- <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>False</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-timezone</name>
- <creation_function>make_timezone_entry</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Mon, 18 Jun 2001 23:51:34 GMT</last_modification_time>
- <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>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>1</xalign>
- <yalign>7.45058e-09</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</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>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>
- </widget>
- </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>GtkHBox</class>
- <name>hbox54</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <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>True</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>True</expand>
- <fill>True</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>Con_fidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame33</name>
- <label>Show Time As</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>hbox55</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>show-time-as-free</name>
- <can_focus>True</can_focus>
- <label>F_ree</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>show_time_as_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>show-time-as-busy</name>
- <can_focus>True</can_focus>
- <label>B_usy</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>show_time_as_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </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>GtkEventBox</class>
- <name>contacts-box</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </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>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
deleted file mode 100644
index 232455e491..0000000000
--- a/calendar/gui/dialogs/event-page.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Evolution calendar - Main page of the event editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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 EVENT_PAGE_H
-#define EVENT_PAGE_H
-
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_EVENT_PAGE (event_page_get_type ())
-#define EVENT_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_EVENT_PAGE, EventPage))
-#define EVENT_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_EVENT_PAGE, EventPageClass))
-#define IS_EVENT_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_EVENT_PAGE))
-#define IS_EVENT_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_EVENT_PAGE))
-
-typedef struct _EventPagePrivate EventPagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- EventPagePrivate *priv;
-} EventPage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} EventPageClass;
-
-
-GtkType event_page_get_type (void);
-EventPage *event_page_construct (EventPage *epage);
-EventPage *event_page_new (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
deleted file mode 100644
index 3b20831093..0000000000
--- a/calendar/gui/dialogs/meeting-page.c
+++ /dev/null
@@ -1,965 +0,0 @@
-/* Evolution calendar - Main page of the task editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-exception.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <glade/glade.h>
-#include <gal/e-table/e-cell-combo.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <widgets/misc/e-dateedit.h>
-#include <e-util/e-dialog-widgets.h>
-#include <e-destination.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "../component-factory.h"
-#include "../e-meeting-attendee.h"
-#include "../e-meeting-model.h"
-#include "../itip-utils.h"
-#include "comp-editor-util.h"
-#include "e-delegate-dialog.h"
-#include "meeting-page.h"
-
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames"
-
-enum columns {
- MEETING_ATTENDEE_COL,
- MEETING_MEMBER_COL,
- MEETING_TYPE_COL,
- MEETING_ROLE_COL,
- MEETING_RSVP_COL,
- MEETING_DELTO_COL,
- MEETING_DELFROM_COL,
- MEETING_STATUS_COL,
- MEETING_CN_COL,
- MEETING_LANG_COL,
- MEETING_COLUMN_COUNT
-};
-
-/* Private part of the MeetingPage structure */
-struct _MeetingPagePrivate {
- /* Lists of attendees */
- GPtrArray *deleted_attendees;
-
- /* To use in case of cancellation */
- CalComponent *comp;
-
- /* List of identities */
- GList *addresses;
- GList *address_strings;
- gchar *default_address;
-
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
- GtkWidget *main;
- GtkWidget *organizer_table;
- GtkWidget *organizer;
- GtkWidget *organizer_lbl;
- GtkWidget *other_organizer;
- GtkWidget *other_organizer_lbl;
- GtkWidget *other_organizer_btn;
- GtkWidget *existing_organizer_table;
- GtkWidget *existing_organizer;
- GtkWidget *existing_organizer_btn;
- GtkWidget *invite;
-
- /* E Table stuff */
- EMeetingModel *model;
- ETableScrolled *etable;
- gint row;
-
- /* For handling who the organizer is */
- gboolean other;
- gboolean existing;
- gboolean updating;
-
- /* For handling the invite button */
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
-};
-
-
-
-static void meeting_page_class_init (MeetingPageClass *class);
-static void meeting_page_init (MeetingPage *mpage);
-static void meeting_page_destroy (GtkObject *object);
-
-static GtkWidget *meeting_page_get_widget (CompEditorPage *page);
-static void meeting_page_focus_main_widget (CompEditorPage *page);
-static void meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void meeting_page_fill_component (CompEditorPage *page, CalComponent *comp);
-
-static gint right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer data);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * meeting_page_get_type:
- *
- * Registers the #MeetingPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #MeetingPage class.
- **/
-GtkType
-meeting_page_get_type (void)
-{
- static GtkType meeting_page_type;
-
- if (!meeting_page_type) {
- static const GtkTypeInfo meeting_page_info = {
- "MeetingPage",
- sizeof (MeetingPage),
- sizeof (MeetingPageClass),
- (GtkClassInitFunc) meeting_page_class_init,
- (GtkObjectInitFunc) meeting_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- meeting_page_type =
- gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &meeting_page_info);
- }
-
- return meeting_page_type;
-}
-
-/* Class initialization function for the task page */
-static void
-meeting_page_class_init (MeetingPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = meeting_page_get_widget;
- editor_page_class->focus_main_widget = meeting_page_focus_main_widget;
- editor_page_class->fill_widgets = meeting_page_fill_widgets;
- editor_page_class->fill_component = meeting_page_fill_component;
- editor_page_class->set_summary = NULL;
- editor_page_class->set_dates = NULL;
-
- object_class->destroy = meeting_page_destroy;
-}
-
-/* Object initialization function for the task page */
-static void
-meeting_page_init (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
-
- priv = g_new0 (MeetingPagePrivate, 1);
- mpage->priv = priv;
-
- priv->deleted_attendees = g_ptr_array_new ();
-
- priv->comp = NULL;
-
- priv->xml = NULL;
- priv->main = NULL;
- priv->invite = NULL;
-
- priv->model = NULL;
- priv->etable = NULL;
-
- priv->updating = FALSE;
-}
-
-static void
-set_attendees (CalComponent *comp, const GPtrArray *attendees)
-{
- GSList *comp_attendees = NULL, *l;
- int i;
-
- for (i = 0; i < attendees->len; i++) {
- EMeetingAttendee *ia = g_ptr_array_index (attendees, i);
- CalComponentAttendee *ca;
-
- ca = e_meeting_attendee_as_cal_component_attendee (ia);
-
- comp_attendees = g_slist_prepend (comp_attendees, ca);
-
- }
- comp_attendees = g_slist_reverse (comp_attendees);
- cal_component_set_attendee_list (comp, comp_attendees);
-
- for (l = comp_attendees; l != NULL; l = l->next)
- g_free (l->data);
- g_slist_free (comp_attendees);
-}
-
-static void
-cleanup_attendees (GPtrArray *attendees)
-{
- int i;
-
- for (i = 0; i < attendees->len; i++)
- gtk_object_unref (GTK_OBJECT (g_ptr_array_index (attendees, i)));
-}
-
-/* Destroy handler for the task page */
-static void
-meeting_page_destroy (GtkObject *object)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
- ETable *real_table;
- char *filename;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MEETING_PAGE (object));
-
- mpage = MEETING_PAGE (object);
- priv = mpage->priv;
-
- if (priv->comp != NULL)
- gtk_object_unref (GTK_OBJECT (priv->comp));
-
- cleanup_attendees (priv->deleted_attendees);
- g_ptr_array_free (priv->deleted_attendees, FALSE);
-
- itip_addresses_free (priv->addresses);
- g_list_free (priv->address_strings);
-
- gtk_object_unref (GTK_OBJECT (priv->model));
-
- /* Save state */
- filename = g_strdup_printf ("%s/config/et-header-meeting-page",
- evolution_dir);
- real_table = e_table_scrolled_get_table (priv->etable);
- e_table_save_state (real_table, filename);
- g_free (filename);
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- mpage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_widget handler for the task page */
-static GtkWidget *
-meeting_page_get_widget (CompEditorPage *page)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (page);
- priv = mpage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the task page */
-static void
-meeting_page_focus_main_widget (CompEditorPage *page)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (page);
- priv = mpage->priv;
-
- gtk_widget_grab_focus (priv->organizer);
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
-
- priv = mpage->priv;
-
- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), "");
- gtk_entry_set_text (GTK_ENTRY (priv->other_organizer), "");
- gtk_label_set_text (GTK_LABEL (priv->existing_organizer), _("None"));
-
- gtk_widget_show (priv->organizer_table);
- gtk_widget_hide (priv->existing_organizer_table);
-
- gtk_widget_hide (priv->other_organizer_lbl);
- gtk_widget_hide (priv->other_organizer);
-
- priv->existing = FALSE;
- priv->other = FALSE;
-}
-
-/* fill_widgets handler for the meeting page */
-static void
-meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
- CalComponentOrganizer organizer;
- GList *l;
-
- mpage = MEETING_PAGE (page);
- priv = mpage->priv;
-
- priv->updating = TRUE;
-
- /* Clean out old data */
- if (priv->comp != NULL)
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
-
- cleanup_attendees (priv->deleted_attendees);
-
- /* Clean the screen */
- clear_widgets (mpage);
-
- /* Component for cancellation */
- priv->comp = cal_component_clone (comp);
-
- /* Organizer */
- cal_component_get_organizer (comp, &organizer);
- priv->addresses = itip_addresses_get ();
- for (l = priv->addresses; l != NULL; l = l->next) {
- ItipAddress *a = l->data;
-
- priv->address_strings = g_list_append (priv->address_strings, a->full);
- if (a->default_address)
- priv->default_address = a->full;
- }
- gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), priv->address_strings);
-
- if (organizer.value != NULL) {
- const gchar *strip = itip_strip_mailto (organizer.value);
- gchar *s = e_utf8_to_gtk_string (priv->existing_organizer, strip);
-
- gtk_widget_hide (priv->organizer_table);
- gtk_widget_show (priv->existing_organizer_table);
- gtk_widget_hide (priv->invite);
-
- gtk_label_set_text (GTK_LABEL (priv->existing_organizer), s);
- g_free (s);
-
- priv->existing = TRUE;
- } else {
- gtk_widget_hide (priv->other_organizer_lbl);
- gtk_widget_hide (priv->other_organizer);
-
- e_dialog_editable_set (GTK_COMBO (priv->organizer)->entry, priv->default_address);
- }
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the meeting page */
-static void
-meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
- CalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
-
- mpage = MEETING_PAGE (page);
- priv = mpage->priv;
-
- if (!priv->existing) {
- gchar *addr = NULL, *cn = NULL;
- GList *l;
-
- if (priv->other) {
- addr = e_dialog_editable_get (priv->other_organizer);
- } else {
- gchar *str = e_dialog_editable_get (GTK_COMBO (priv->organizer)->entry);
- for (l = priv->addresses; l != NULL; l = l->next) {
- ItipAddress *a = l->data;
-
- if (!strcmp (a->full, str)) {
- addr = g_strdup (a->address);
- cn = g_strdup (a->name);
- }
- }
- g_free (str);
- }
-
- if (addr == NULL || strlen (addr) == 0) {
- g_free (addr);
- g_free (cn);
- return;
- } else {
- gchar *tmp;
-
- tmp = addr;
- addr = g_strdup_printf ("MAILTO:%s", addr);
- g_free (tmp);
- }
-
- organizer.value = addr;
- organizer.cn = cn;
- cal_component_set_organizer (comp, &organizer);
- g_free (addr);
- g_free (cn);
- }
-
- set_attendees (comp, e_meeting_model_get_attendees (priv->model));
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
-
- priv = mpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("meeting-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
- priv->organizer_table = GW ("organizer-table");
- priv->organizer = GW ("organizer");
- priv->organizer_lbl = GW ("organizer-label");
- priv->other_organizer = GW ("other-organizer");
- priv->other_organizer_lbl = GW ("other-organizer-label");
- priv->other_organizer_btn = GW ("other-organizer-button");
- priv->existing_organizer_table = GW ("existing-organizer-table");
- priv->existing_organizer = GW ("existing-organizer");
- priv->existing_organizer_btn = GW ("existing-organizer-button");
- priv->invite = GW ("invite");
-
-#undef GW
-
- return (priv->invite
- && priv->organizer_table
- && priv->organizer
- && priv->organizer_lbl
- && priv->other_organizer
- && priv->other_organizer_lbl
- && priv->other_organizer_btn
- && priv->existing_organizer_table
- && priv->existing_organizer
- && priv->existing_organizer_btn);
-}
-
-static void
-duplicate_error (void)
-{
- GtkWidget *dlg = gnome_error_dialog (_("That person is already attending the meeting!"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
-}
-
-static void
-invite_entry_changed (BonoboListener *listener,
- char *event_name,
- CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer data)
-{
- MeetingPage *mpage = data;
- MeetingPagePrivate *priv;
- Bonobo_Control corba_control;
- GtkWidget *control_widget;
- EDestination **destv;
- char *string = NULL, *section;
- int i;
-
- priv = mpage->priv;
-
- section = BONOBO_ARG_GET_STRING (arg);
-
- g_message ("event: \"%s\", section \"%s\"", event_name, section);
-
- corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (priv->corba_select_names, section, ev);
- control_widget = bonobo_widget_new_control_from_objref (corba_control, CORBA_OBJECT_NIL);
-
- bonobo_widget_get_property (BONOBO_WIDGET (control_widget), "destinations", &string, NULL);
- destv = e_destination_importv (string);
- if (destv == NULL)
- return;
-
- for (i = 0; destv[i] != NULL; i++) {
- EMeetingAttendee *ia;
- const char *name, *address;
-
- name = e_destination_get_name (destv[i]);
- address = e_destination_get_email (destv[i]);
-
- if (e_meeting_model_find_attendee (priv->model, address, NULL) == NULL) {
- ia = e_meeting_model_add_attendee_with_defaults (priv->model);
-
- e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", address));
- if (!strcmp (section, _("Chair Persons")))
- e_meeting_attendee_set_role (ia, ICAL_ROLE_CHAIR);
- else if (!strcmp (section, _("Required Participants")))
- e_meeting_attendee_set_role (ia, ICAL_ROLE_REQPARTICIPANT);
- else if (!strcmp (section, _("Optional Participants")))
- e_meeting_attendee_set_role (ia, ICAL_ROLE_OPTPARTICIPANT);
- else if (!strcmp (section, _("Non-Participants")))
- e_meeting_attendee_set_role (ia, ICAL_ROLE_NONPARTICIPANT);
- e_meeting_attendee_set_cn (ia, g_strdup (name));
- }
- }
- e_destination_freev (destv);
-}
-
-static void
-add_section (GNOME_Evolution_Addressbook_SelectNames corba_select_names, const char *name, int limit)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- if (limit != 0)
- GNOME_Evolution_Addressbook_SelectNames_addSectionWithLimit (corba_select_names,
- name, name, limit, &ev);
- else
- GNOME_Evolution_Addressbook_SelectNames_addSection (corba_select_names,
- name, name, &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-get_select_name_dialog (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
- const char *sections[] = {_("Chair Persons"), _("Required Participants"), _("Optional Participants"), _("Non-Participants")};
- CORBA_Environment ev;
-
- priv = mpage->priv;
-
- if (priv->corba_select_names != CORBA_OBJECT_NIL) {
- Bonobo_Control corba_control;
- GtkWidget *control_widget;
- int i;
-
- CORBA_exception_init (&ev);
- for (i = 0; i < 4; i++) {
- corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (priv->corba_select_names, sections[i], &ev);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- control_widget = bonobo_widget_new_control_from_objref (corba_control, CORBA_OBJECT_NIL);
-
- bonobo_widget_set_property (BONOBO_WIDGET (control_widget), "text", "", NULL);
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
- }
-
- CORBA_exception_init (&ev);
-
- priv->corba_select_names = oaf_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
-
- add_section (priv->corba_select_names, sections[0], 0);
- add_section (priv->corba_select_names, sections[1], 0);
- add_section (priv->corba_select_names, sections[2], 0);
- add_section (priv->corba_select_names, sections[3], 0);
-
- bonobo_event_source_client_add_listener (priv->corba_select_names,
- invite_entry_changed,
- "GNOME/Evolution:changed:model",
- NULL, mpage);
-
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (data);
- priv = mpage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (mpage));
-}
-
-/* Function called to make the organizer other than the user */
-static void
-other_clicked_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (data);
- priv = mpage->priv;
-
- gtk_widget_show (priv->other_organizer_lbl);
- gtk_widget_show (priv->other_organizer);
-
- gtk_label_set_text (GTK_LABEL (priv->organizer_lbl), _("Sent By:"));
-
- priv->other = TRUE;
-}
-
-/* Function called to change the organizer */
-static void
-change_clicked_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
-
- mpage = MEETING_PAGE (data);
- priv = mpage->priv;
-
- gtk_widget_show (priv->organizer_table);
- gtk_widget_hide (priv->existing_organizer_table);
- gtk_widget_show (priv->invite);
-
- gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), priv->address_strings);
- e_dialog_editable_set (GTK_COMBO (priv->organizer)->entry, priv->default_address);
-
- priv->existing = FALSE;
-}
-
-/* Function called to invite more people */
-static void
-invite_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage;
- MeetingPagePrivate *priv;
- CORBA_Environment ev;
-
- mpage = MEETING_PAGE (data);
- priv = mpage->priv;
-
- if (!get_select_name_dialog (mpage))
- return;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (
- priv->corba_select_names, _("Required Participants"), &ev);
-
- CORBA_exception_free (&ev);
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
-
- priv = mpage->priv;
-
- /* Organizer */
- gtk_signal_connect (GTK_OBJECT (GTK_COMBO (priv->organizer)->entry), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), mpage);
-
- gtk_signal_connect (GTK_OBJECT (priv->other_organizer_btn), "clicked",
- GTK_SIGNAL_FUNC (other_clicked_cb), mpage);
- gtk_signal_connect (GTK_OBJECT (priv->existing_organizer_btn), "clicked",
- GTK_SIGNAL_FUNC (change_clicked_cb), mpage);
-
- /* Invite button */
- gtk_signal_connect (GTK_OBJECT (priv->invite), "clicked",
- GTK_SIGNAL_FUNC (invite_cb), mpage);
-}
-
-static void
-popup_delegate_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage = MEETING_PAGE (data);
- MeetingPagePrivate *priv;
- EDelegateDialog *edd;
- GtkWidget *dialog;
- EMeetingAttendee *ia;
- char *address = NULL, *name = NULL;
-
- priv = mpage->priv;
-
- ia = e_meeting_model_find_attendee_at_row (priv->model, priv->row);
-
- /* Show dialog. */
- edd = e_delegate_dialog_new (NULL, itip_strip_mailto (e_meeting_attendee_get_delto (ia)));
- dialog = e_delegate_dialog_get_toplevel (edd);
-
- if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == 0){
- EMeetingAttendee *ic;
-
- name = e_delegate_dialog_get_delegate_name (edd);
- address = e_delegate_dialog_get_delegate (edd);
-
- /* Make sure we can add the new delegatee person */
- if (e_meeting_model_find_attendee (priv->model, address, NULL) != NULL) {
- duplicate_error ();
- goto cleanup;
- }
-
- /* Update information for attendee */
- if (e_meeting_attendee_is_set_delto (ia)) {
- EMeetingAttendee *ib;
-
- ib = e_meeting_model_find_attendee (priv->model, itip_strip_mailto (e_meeting_attendee_get_delto (ia)), NULL);
- if (ib != NULL) {
- gtk_object_ref (GTK_OBJECT (ib));
- g_ptr_array_add (priv->deleted_attendees, ib);
-
- e_meeting_model_remove_attendee (priv->model, ib);
- }
- }
- e_meeting_attendee_set_delto (ia, g_strdup_printf ("MAILTO:%s", address));
-
- /* Construct delegatee information */
- ic = e_meeting_model_add_attendee_with_defaults (priv->model);
-
- e_meeting_attendee_set_address (ic, g_strdup_printf ("MAILTO:%s", address));
- e_meeting_attendee_set_delfrom (ic, g_strdup (e_meeting_attendee_get_address (ia)));
- e_meeting_attendee_set_cn (ic, g_strdup (name));
- }
-
- cleanup:
- g_free (name);
- g_free (address);
- gtk_object_unref (GTK_OBJECT (edd));
-}
-
-static void
-popup_delete_cb (GtkWidget *widget, gpointer data)
-{
- MeetingPage *mpage = MEETING_PAGE (data);
- MeetingPagePrivate *priv;
- EMeetingAttendee *ia;
- int pos = 0;
-
- priv = mpage->priv;
-
- ia = e_meeting_model_find_attendee_at_row (priv->model, priv->row);
-
- /* If this was a delegatee, no longer delegate */
- if (e_meeting_attendee_is_set_delfrom (ia)) {
- EMeetingAttendee *ib;
-
- ib = e_meeting_model_find_attendee (priv->model, e_meeting_attendee_get_delfrom (ia), &pos);
- if (ib != NULL)
- e_meeting_attendee_set_delto (ib, NULL);
- }
-
- /* Handle deleting all attendees in the delegation chain */
- while (ia != NULL) {
- EMeetingAttendee *ib = NULL;
-
- gtk_object_ref (GTK_OBJECT (ia));
- g_ptr_array_add (priv->deleted_attendees, ia);
- e_meeting_model_remove_attendee (priv->model, ia);
-
- if (e_meeting_attendee_get_delto (ia) != NULL)
- ib = e_meeting_model_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
- ia = ib;
- }
-}
-
-enum {
- CAN_DELEGATE = 2,
- CAN_DELETE = 4
-};
-
-static EPopupMenu context_menu[] = {
- { N_("_Delegate To..."), NULL,
- GTK_SIGNAL_FUNC (popup_delegate_cb),NULL, CAN_DELEGATE },
-
- E_POPUP_SEPARATOR,
-
- { N_("_Delete"), GNOME_STOCK_MENU_TRASH,
- GTK_SIGNAL_FUNC (popup_delete_cb), NULL, CAN_DELETE },
-
- E_POPUP_TERMINATOR
-};
-
-/* handle context menu over message-list */
-static gint
-right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer data)
-{
- MeetingPage *mpage = MEETING_PAGE (data);
- MeetingPagePrivate *priv;
- GtkMenu *menu;
- int enable_mask = 0, hide_mask = 0;
-
- priv = mpage->priv;
-
- priv->row = row;
-
- menu = e_popup_menu_create (context_menu, enable_mask, hide_mask, data);
- e_auto_kill_popup_menu_on_hide (menu);
-
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
- event->button.button, event->button.time);
-
- return TRUE;
-}
-
-
-
-/**
- * meeting_page_construct:
- * @mpage: An task details page.
- *
- * Constructs an task page by loading its Glade data.
- *
- * Return value: The same object as @mpage, or NULL if the widgets could not
- * be created.
- **/
-MeetingPage *
-meeting_page_construct (MeetingPage *mpage, EMeetingModel *emm)
-{
- MeetingPagePrivate *priv;
- ETable *real_table;
- gchar *filename;
-
- priv = mpage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/meeting-page.glade", NULL);
- if (!priv->xml) {
- g_message ("meeting_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (mpage)) {
- g_message ("meeting_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- /* The etable displaying attendees and their status */
- gtk_object_ref (GTK_OBJECT (emm));
- priv->model = emm;
-
- filename = g_strdup_printf ("%s/config/et-header-meeting-page", evolution_dir);
- priv->etable = e_meeting_model_etable_from_model (priv->model,
- EVOLUTION_ETSPECDIR "/meeting-page.etspec",
- filename);
- g_free (filename);
-
- real_table = e_table_scrolled_get_table (priv->etable);
- gtk_signal_connect (GTK_OBJECT (real_table),
- "right_click", GTK_SIGNAL_FUNC (right_click_cb), mpage);
-
- gtk_widget_show (GTK_WIDGET (priv->etable));
- gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->etable), TRUE, TRUE, 2);
-
- /* Init the widget signals */
- init_widgets (mpage);
-
- return mpage;
-}
-
-/**
- * meeting_page_new:
- *
- * Creates a new task details page.
- *
- * Return value: A newly-created task details page, or NULL if the page could
- * not be created.
- **/
-MeetingPage *
-meeting_page_new (EMeetingModel *emm)
-{
- MeetingPage *mpage;
-
- mpage = gtk_type_new (TYPE_MEETING_PAGE);
- if (!meeting_page_construct (mpage, emm)) {
- gtk_object_unref (GTK_OBJECT (mpage));
- return NULL;
- }
-
- return mpage;
-}
-
-/**
- * meeting_page_get_cancel_comp:
- * @mpage:
- *
- *
- *
- * Return value:
- **/
-CalComponent *
-meeting_page_get_cancel_comp (MeetingPage *mpage)
-{
- MeetingPagePrivate *priv;
-
- g_return_val_if_fail (mpage != NULL, NULL);
- g_return_val_if_fail (IS_MEETING_PAGE (mpage), NULL);
-
- priv = mpage->priv;
-
- if (priv->deleted_attendees == NULL)
- return NULL;
-
- set_attendees (priv->comp, priv->deleted_attendees);
-
- return cal_component_clone (priv->comp);
-}
diff --git a/calendar/gui/dialogs/meeting-page.etspec b/calendar/gui/dialogs/meeting-page.etspec
deleted file mode 100644
index 96bc480fe9..0000000000
--- a/calendar/gui/dialogs/meeting-page.etspec
+++ /dev/null
@@ -1,21 +0,0 @@
-<ETableSpecification click-to-add="true" click-to-add-end="true" _click-to-add-message="Click here to add an attendee" draw-grid="true">
- <ETableColumn model_col= "0" _title="Attendee" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "1" _title="Member" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "2" _title="Type" expansion="1.0" minimum_width="10" resizable="true" cell="typeedit" compare="string"/>
- <ETableColumn model_col= "3" _title="Role" expansion="1.0" minimum_width="10" resizable="true" cell="roleedit" compare="string"/>
- <ETableColumn model_col= "4" _title="RSVP" expansion="1.0" minimum_width="10" resizable="true" cell="rsvpedit" compare="string"/>
- <ETableColumn model_col= "5" _title="Delegated To" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "6" _title="Delegated From" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "7" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="statusedit" compare="string"/>
- <ETableColumn model_col= "8" _title="Common Name" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "9" _title="Language" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
-
- <ETableState>
- <column source="0"/>
- <column source="2"/>
- <column source="3"/>
- <column source="4"/>
- <column source="7"/>
- <grouping></grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/calendar/gui/dialogs/meeting-page.glade b/calendar/gui/dialogs/meeting-page.glade
deleted file mode 100644
index 3aabf95102..0000000000
--- a/calendar/gui/dialogs/meeting-page.glade
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-details-page</name>
- <program_name>task-details-page</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-toplevel</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>GtkVBox</class>
- <name>meeting-page</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>organizer-table</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCombo</class>
- <name>organizer</name>
- <value_in_list>True</value_in_list>
- <ok_if_empty>False</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items></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>entry2</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>GtkButton</class>
- <name>other-organizer-button</name>
- <can_focus>True</can_focus>
- <label>_Other Organizer</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>other-organizer</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>GtkLabel</class>
- <name>organizer-label</name>
- <label>Organizer:</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>other-organizer-label</name>
- <label>Organizer:</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>
-
- <widget>
- <class>GtkTable</class>
- <name>existing-organizer-table</name>
- <border_width>4</border_width>
- <rows>1</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>Organizer:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</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>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>existing-organizer-button</name>
- <can_focus>True</can_focus>
- <label>_Change Organizer</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>existing-organizer</name>
- <label>None</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>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>invite</name>
- <can_focus>True</can_focus>
- <label>_Invite Others</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/meeting-page.h b/calendar/gui/dialogs/meeting-page.h
deleted file mode 100644
index 206ee90bb8..0000000000
--- a/calendar/gui/dialogs/meeting-page.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Evolution calendar - Main page of the task editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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 MEETING_PAGE_H
-#define MEETING_PAGE_H
-
-#include "../e-meeting-model.h"
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_MEETING_PAGE (meeting_page_get_type ())
-#define MEETING_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_MEETING_PAGE, MeetingPage))
-#define MEETING_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_MEETING_PAGE, MeetingPageClass))
-#define IS_MEETING_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_MEETING_PAGE))
-#define IS_MEETING_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_MEETING_PAGE))
-
-typedef struct _MeetingPagePrivate MeetingPagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- MeetingPagePrivate *priv;
-} MeetingPage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} MeetingPageClass;
-
-
-GtkType meeting_page_get_type (void);
-MeetingPage *meeting_page_construct (MeetingPage *mpage, EMeetingModel *emm);
-MeetingPage *meeting_page_new (EMeetingModel *emm);
-CalComponent *meeting_page_get_cancel_comp (MeetingPage *mpage);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
deleted file mode 100644
index 10946805ed..0000000000
--- a/calendar/gui/dialogs/recurrence-page.c
+++ /dev/null
@@ -1,2223 +0,0 @@
-/* Evolution calendar - Recurrence page of the calendar component dialogs
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include "e-util/e-dialog-widgets.h"
-#include "widgets/misc/e-dateedit.h"
-#include <cal-util/timeutil.h>
-#include "../calendar-config.h"
-#include "../tag-calendar.h"
-#include "../weekday-picker.h"
-#include "comp-editor-util.h"
-#include "recurrence-page.h"
-
-
-
-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
-};
-
-enum recur_type {
- RECUR_NONE,
- RECUR_SIMPLE,
- RECUR_CUSTOM
-};
-
-static const int type_map[] = {
- RECUR_NONE,
- RECUR_SIMPLE,
- RECUR_CUSTOM,
- -1
-};
-
-static const int freq_map[] = {
- ICAL_DAILY_RECURRENCE,
- ICAL_WEEKLY_RECURRENCE,
- ICAL_MONTHLY_RECURRENCE,
- ICAL_YEARLY_RECURRENCE,
- -1
-};
-
-enum ending_type {
- ENDING_FOR,
- ENDING_UNTIL,
- ENDING_FOREVER
-};
-
-static const int ending_types_map[] = {
- ENDING_FOR,
- ENDING_UNTIL,
- ENDING_FOREVER,
- -1
-};
-
-/* Private part of the RecurrencePage structure */
-struct _RecurrencePagePrivate {
- /* Component we use to expand the recurrence rules for the preview */
- CalComponent *comp;
-
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
-
- GtkWidget *main;
-
- GtkWidget *summary;
- GtkWidget *date_time;
-
- GtkWidget *none;
- GtkWidget *simple;
- GtkWidget *custom;
-
- GtkWidget *params;
- GtkWidget *interval_value;
- GtkWidget *interval_unit;
- GtkWidget *special;
- GtkWidget *ending_menu;
- GtkWidget *ending_special;
- GtkWidget *custom_warning_bin;
-
- /* For weekly recurrences, created by hand */
- GtkWidget *weekday_picker;
- guint8 weekday_day_mask;
- guint8 weekday_blocked_day_mask;
-
- /* For monthly recurrences, created by hand */
- GtkWidget *month_index_spin;
- int month_index;
-
- GtkWidget *month_day_menu;
- enum month_day_options month_day;
-
- /* For ending date, created by hand */
- GtkWidget *ending_date_edit;
- struct icaltimetype ending_date_tt;
-
- /* For ending count of occurrences, created by hand */
- GtkWidget *ending_count_spin;
- int ending_count;
-
- /* More widgets from the Glade file */
-
- GtkWidget *exception_date;
- GtkWidget *exception_list;
- GtkWidget *exception_add;
- GtkWidget *exception_modify;
- GtkWidget *exception_delete;
-
- GtkWidget *preview_bin;
-
- /* For the recurrence preview, the actual widget */
- GtkWidget *preview_calendar;
-
- gboolean updating;
-};
-
-
-
-static void recurrence_page_class_init (RecurrencePageClass *class);
-static void recurrence_page_init (RecurrencePage *rpage);
-static void recurrence_page_destroy (GtkObject *object);
-
-static GtkWidget *recurrence_page_get_widget (CompEditorPage *page);
-static void recurrence_page_focus_main_widget (CompEditorPage *page);
-static void recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void recurrence_page_fill_component (CompEditorPage *page, CalComponent *comp);
-static void recurrence_page_set_summary (CompEditorPage *page, const char *summary);
-static void recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
-
-static void field_changed (RecurrencePage *apage);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * recurrence_page_get_type:
- *
- * Registers the #RecurrencePage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #RecurrencePage class.
- **/
-GtkType
-recurrence_page_get_type (void)
-{
- static GtkType recurrence_page_type;
-
- if (!recurrence_page_type) {
- static const GtkTypeInfo recurrence_page_info = {
- "RecurrencePage",
- sizeof (RecurrencePage),
- sizeof (RecurrencePageClass),
- (GtkClassInitFunc) recurrence_page_class_init,
- (GtkObjectInitFunc) recurrence_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- recurrence_page_type = gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &recurrence_page_info);
- }
-
- return recurrence_page_type;
-}
-
-/* Class initialization function for the recurrence page */
-static void
-recurrence_page_class_init (RecurrencePageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = recurrence_page_get_widget;
- editor_page_class->focus_main_widget = recurrence_page_focus_main_widget;
- editor_page_class->fill_widgets = recurrence_page_fill_widgets;
- editor_page_class->fill_component = recurrence_page_fill_component;
- editor_page_class->set_summary = recurrence_page_set_summary;
- editor_page_class->set_dates = recurrence_page_set_dates;
-
- object_class->destroy = recurrence_page_destroy;
-}
-
-/* Object initialization function for the recurrence page */
-static void
-recurrence_page_init (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
-
- priv = g_new0 (RecurrencePagePrivate, 1);
- rpage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
- priv->summary = NULL;
- priv->date_time = NULL;
- priv->none = NULL;
- priv->simple = NULL;
- priv->custom = NULL;
- priv->params = NULL;
- priv->interval_value = NULL;
- priv->interval_unit = NULL;
- priv->special = NULL;
- priv->ending_menu = NULL;
- priv->ending_special = NULL;
- priv->custom_warning_bin = NULL;
- priv->weekday_picker = NULL;
- priv->month_index_spin = NULL;
- priv->month_day_menu = NULL;
- priv->ending_date_edit = NULL;
- priv->ending_count_spin = NULL;
- priv->exception_date = NULL;
- priv->exception_list = NULL;
- priv->exception_add = NULL;
- priv->exception_modify = NULL;
- priv->exception_delete = NULL;
- priv->preview_bin = NULL;
- priv->preview_calendar = NULL;
-
- priv->comp = NULL;
-}
-
-/* Frees the CalComponentDateTime stored in the GtkCList */
-static void
-free_exception_date_time (CalComponentDateTime *dt)
-{
- g_free (dt->value);
- g_free ((char*)dt->tzid);
- g_free (dt);
-}
-
-/* Destroy handler for the recurrence page */
-static void
-recurrence_page_destroy (GtkObject *object)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_RECURRENCE_PAGE (object));
-
- rpage = RECURRENCE_PAGE (object);
- priv = rpage->priv;
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- g_free (priv);
- rpage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_widget handler for the recurrence page */
-static GtkWidget *
-recurrence_page_get_widget (CompEditorPage *page)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the recurrence page */
-static void
-recurrence_page_focus_main_widget (CompEditorPage *page)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- if (e_dialog_toggle_get (priv->none))
- gtk_widget_grab_focus (priv->none);
- else if (e_dialog_toggle_get (priv->simple))
- gtk_widget_grab_focus (priv->simple);
- else if (e_dialog_toggle_get (priv->custom))
- gtk_widget_grab_focus (priv->custom);
- else
- g_assert_not_reached ();
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- GtkAdjustment *adj;
- GtkWidget *menu;
-
- priv = rpage->priv;
-
- priv->weekday_day_mask = 0;
-
- priv->month_index = 1;
- priv->month_day = MONTH_DAY_NTH;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->none), rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->simple), rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->custom), rpage);
- e_dialog_radio_set (priv->none, RECUR_NONE, type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->none), rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->simple), rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->custom), rpage);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
- gtk_signal_handler_block_by_data (GTK_OBJECT (adj), rpage);
- e_dialog_spin_set (priv->interval_value, 1);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (adj), rpage);
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_DAILY_RECURRENCE,
- freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
-
- priv->ending_date_tt = icaltime_today ();
- priv->ending_count = 1;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
- e_dialog_option_menu_set (priv->ending_menu,
- ENDING_FOREVER,
- ending_types_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
-
- /* Exceptions list */
- gtk_clist_clear (GTK_CLIST (priv->exception_list));
-}
-
-/* Builds a static string out of an exception date */
-static char *
-get_exception_string (CalComponentDateTime *dt)
-{
- static char buf[256];
- struct tm tmp_tm;
-
- tmp_tm.tm_year = dt->value->year - 1900;
- tmp_tm.tm_mon = dt->value->month - 1;
- tmp_tm.tm_mday = dt->value->day;
- tmp_tm.tm_hour = dt->value->hour;
- tmp_tm.tm_min = dt->value->minute;
- tmp_tm.tm_sec = dt->value->second;
- tmp_tm.tm_isdst = -1;
-
- tmp_tm.tm_wday = time_day_of_week (dt->value->day,
- dt->value->month - 1,
- dt->value->year);
-
- strftime (buf, sizeof (buf), _("%a %b %d %Y"), &tmp_tm);
- return buf;
-}
-
-/* Appends an exception date to the list */
-static void
-append_exception (RecurrencePage *rpage, CalComponentDateTime *datetime)
-{
- RecurrencePagePrivate *priv;
- CalComponentDateTime *dt;
- char *c[1];
- int i;
- GtkCList *clist;
- struct icaltimetype *tt;
-
- priv = rpage->priv;
-
- dt = g_new (CalComponentDateTime, 1);
- dt->value = g_new (struct icaltimetype, 1);
- *dt->value = *datetime->value;
- dt->tzid = g_strdup (datetime->tzid);
-
- clist = GTK_CLIST (priv->exception_list);
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (clist), rpage);
-
- c[0] = get_exception_string (dt);
- i = gtk_clist_append (clist, c);
-
- gtk_clist_set_row_data_full (clist, i, dt, (GtkDestroyNotify) free_exception_date_time);
-
- gtk_clist_select_row (clist, i, 0);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (clist), rpage);
-
- tt = dt->value;
- e_date_edit_set_date (E_DATE_EDIT (priv->exception_date),
- tt->year, tt->month, tt->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->exception_date),
- tt->hour, tt->minute);
-
- gtk_widget_set_sensitive (priv->exception_modify, TRUE);
- gtk_widget_set_sensitive (priv->exception_delete, TRUE);
-}
-
-/* Fills in the exception widgets with the data from the calendar component */
-static void
-fill_exception_widgets (RecurrencePage *rpage, CalComponent *comp)
-{
- RecurrencePagePrivate *priv;
- GSList *list, *l;
- gboolean added;
-
- priv = rpage->priv;
-
- cal_component_get_exdate_list (comp, &list);
-
- added = FALSE;
-
- for (l = list; l; l = l->next) {
- CalComponentDateTime *cdt;
-
- added = TRUE;
-
- cdt = l->data;
- append_exception (rpage, cdt);
- }
-
- cal_component_free_exdate_list (list);
-
- if (added)
- gtk_clist_select_row (GTK_CLIST (priv->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) {
- short weekday;
-
- weekday = icaltime_day_of_week (*dt.value);
- retval = 0x1 << (weekday - 1);
- } 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_special_defaults (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- guint8 mask;
-
- priv = rpage->priv;
-
- mask = get_start_weekday_mask (priv->comp);
-
- priv->weekday_day_mask = mask;
- priv->weekday_blocked_day_mask = mask;
-}
-
-/* Sensitizes the recurrence widgets based on the state of the recurrence type
- * radio group.
- */
-static void
-sensitize_recur_widgets (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- enum recur_type type;
- GtkWidget *label;
-
- priv = rpage->priv;
-
- type = e_dialog_radio_get (priv->none, type_map);
-
- if (GTK_BIN (priv->custom_warning_bin)->child)
- gtk_widget_destroy (GTK_BIN (priv->custom_warning_bin)->child);
-
- switch (type) {
- case RECUR_NONE:
- gtk_widget_set_sensitive (priv->params, FALSE);
- gtk_widget_show (priv->params);
- gtk_widget_hide (priv->custom_warning_bin);
- break;
-
- case RECUR_SIMPLE:
- gtk_widget_set_sensitive (priv->params, TRUE);
- gtk_widget_show (priv->params);
- gtk_widget_hide (priv->custom_warning_bin);
- break;
-
- case RECUR_CUSTOM:
- gtk_widget_set_sensitive (priv->params, FALSE);
- gtk_widget_hide (priv->params);
-
- label = gtk_label_new (_("This appointment contains "
- "recurrences that Evolution "
- "cannot edit."));
- gtk_container_add (GTK_CONTAINER (priv->custom_warning_bin),
- label);
- gtk_widget_show_all (priv->custom_warning_bin);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* 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;
-}
-
-/* Gets the simple recurrence data from the recurrence widgets and stores it in
- * the calendar component.
- */
-static void
-simple_recur_to_comp (RecurrencePage *rpage, CalComponent *comp)
-{
- RecurrencePagePrivate *priv;
- struct icalrecurrencetype r;
- GSList l;
- enum ending_type ending_type;
- gboolean date_set;
-
- priv = rpage->priv;
-
- icalrecurrencetype_clear (&r);
-
- /* Frequency, interval, week start */
-
- r.freq = e_dialog_option_menu_get (priv->interval_unit, freq_map);
- r.interval = e_dialog_spin_get_int (priv->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->special)->child != NULL);
- g_assert (priv->weekday_picker != NULL);
- g_assert (IS_WEEKDAY_PICKER (priv->weekday_picker));
-
- day_mask = weekday_picker_get_days (WEEKDAY_PICKER (priv->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->special)->child != NULL);
- g_assert (priv->month_index_spin != NULL);
- g_assert (GTK_IS_SPIN_BUTTON (priv->month_index_spin));
- g_assert (priv->month_day_menu != NULL);
- g_assert (GTK_IS_OPTION_MENU (priv->month_day_menu));
-
- day_index = e_dialog_spin_get_int (priv->month_index_spin);
- month_day = e_dialog_option_menu_get (priv->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->ending_menu,
- ending_types_map);
-
- switch (ending_type) {
- case ENDING_FOR:
- g_assert (priv->ending_count_spin != NULL);
- g_assert (GTK_IS_SPIN_BUTTON (priv->ending_count_spin));
-
- r.count = e_dialog_spin_get_int (priv->ending_count_spin);
- break;
-
- case ENDING_UNTIL:
- g_assert (priv->ending_date_edit != NULL);
- g_assert (E_IS_DATE_EDIT (priv->ending_date_edit));
-
- /* We only allow a DATE value to be set for the UNTIL property,
- since we don't support sub-day recurrences. */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->ending_date_edit),
- &r.until.year,
- &r.until.month,
- &r.until.day);
- g_assert (date_set);
-
- r.until.is_date = 1;
-
- 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);
-}
-
-/* Fills a component with the data from the recurrence page; in the case of a
- * custom recurrence, it leaves it intact.
- */
-static void
-fill_component (RecurrencePage *rpage, CalComponent *comp)
-{
- RecurrencePagePrivate *priv;
- enum recur_type recur_type;
- GtkCList *exception_list;
- GSList *list;
- int i;
-
- priv = rpage->priv;
-
- recur_type = e_dialog_radio_get (priv->none, 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 (rpage, 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->exception_list);
- for (i = 0; i < exception_list->rows; i++) {
- CalComponentDateTime *cdt, *dt;
-
- cdt = g_new (CalComponentDateTime, 1);
- cdt->value = g_new (struct icaltimetype, 1);
-
- dt = gtk_clist_get_row_data (exception_list, i);
- g_assert (dt != NULL);
-
- *cdt->value = *dt->value;
- cdt->tzid = g_strdup (dt->tzid);
-
- g_print ("Adding exception is_date: %i\n", cdt->value->is_date);
-
- list = g_slist_prepend (list, cdt);
- }
-
- cal_component_set_exdate_list (comp, list);
- cal_component_free_exdate_list (list);
-}
-
-/* Re-tags the recurrence preview calendar based on the current information of
- * the widgets in the recurrence page.
- */
-static void
-preview_recur (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- CalComponent *comp;
- CalComponentDateTime cdt;
- GSList *l;
-
- priv = rpage->priv;
-
- /* If our component has not been set yet through ::fill_widgets(), we
- * cannot preview the recurrence.
- */
- if (!priv->comp)
- return;
-
- /* Create a scratch component with the start/end and
- * recurrence/exception 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);
-
- fill_component (rpage, comp);
-
- tag_calendar_by_comp (E_CALENDAR (priv->preview_calendar), comp,
- COMP_EDITOR_PAGE (rpage)->client, TRUE, FALSE);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* Callback used when the recurrence weekday picker changes */
-static void
-weekday_picker_changed_cb (WeekdayPicker *wp, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* Creates the special contents for weekly recurrences */
-static void
-make_weekly_special (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- GtkWidget *hbox;
- GtkWidget *label;
- WeekdayPicker *wp;
-
- priv = rpage->priv;
-
- g_assert (GTK_BIN (priv->special)->child == NULL);
- g_assert (priv->weekday_picker == NULL);
-
- /* Create the widgets */
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (priv->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->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->weekday_day_mask);
- weekday_picker_set_blocked_days (wp, priv->weekday_blocked_day_mask);
-
- gtk_signal_connect (GTK_OBJECT (wp), "changed",
- GTK_SIGNAL_FUNC (weekday_picker_changed_cb),
- rpage);
-}
-
-/* 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 (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- GtkAdjustment *adj;
- enum month_day_options month_day;
-
- priv = rpage->priv;
-
- g_assert (priv->month_day_menu != NULL);
- g_assert (GTK_IS_OPTION_MENU (priv->month_day_menu));
- g_assert (priv->month_index_spin != NULL);
- g_assert (GTK_IS_SPIN_BUTTON (priv->month_index_spin));
-
- month_day = e_dialog_option_menu_get (priv->month_day_menu,
- month_day_options_map);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->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)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- adjust_day_index_spin (rpage);
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* Callback used when the month index value changes. */
-static void
-month_index_value_changed_cb (GtkAdjustment *adj, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* Creates the special contents for monthly recurrences */
-static void
-make_monthly_special (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkAdjustment *adj;
- GtkWidget *menu;
-
- priv = rpage->priv;
-
- g_assert (GTK_BIN (priv->special)->child == NULL);
- g_assert (priv->month_index_spin == NULL);
- g_assert (priv->month_day_menu == NULL);
-
- /* Create the widgets */
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (priv->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->month_index_spin = gtk_spin_button_new (adj, 1, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->month_index_spin,
- FALSE, FALSE, 0);
-
- label = gtk_label_new (_("th"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- priv->month_day_menu = make_recur_month_menu ();
- gtk_box_pack_start (GTK_BOX (hbox), priv->month_day_menu,
- FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
-
- /* Set the options */
-
- e_dialog_spin_set (priv->month_index_spin, priv->month_index);
- e_dialog_option_menu_set (priv->month_day_menu,
- priv->month_day,
- month_day_options_map);
- adjust_day_index_spin (rpage);
-
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (month_index_value_changed_cb),
- rpage);
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->month_day_menu));
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (month_day_menu_selection_done_cb),
- rpage);
-}
-
-/* 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 (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- icalrecurrencetype_frequency frequency;
-
- priv = rpage->priv;
-
- if (GTK_BIN (priv->special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->special)->child);
-
- priv->weekday_picker = NULL;
- priv->month_index_spin = NULL;
- priv->month_day_menu = NULL;
- }
-
- frequency = e_dialog_option_menu_get (priv->interval_unit, freq_map);
-
- switch (frequency) {
- case ICAL_DAILY_RECURRENCE:
- gtk_widget_hide (priv->special);
- break;
-
- case ICAL_WEEKLY_RECURRENCE:
- make_weekly_special (rpage);
- gtk_widget_show (priv->special);
- break;
-
- case ICAL_MONTHLY_RECURRENCE:
- make_monthly_special (rpage);
- gtk_widget_show (priv->special);
- break;
-
- case ICAL_YEARLY_RECURRENCE:
- gtk_widget_hide (priv->special);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* Counts the 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;
-}
-
-/* Callback used when the ending-until date editor changes */
-static void
-ending_until_changed_cb (EDateEdit *de, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* Creates the special contents for "ending until" (end date) recurrences */
-static void
-make_ending_until_special (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- EDateEdit *de;
-
- priv = rpage->priv;
-
- g_assert (GTK_BIN (priv->ending_special)->child == NULL);
- g_assert (priv->ending_date_edit == NULL);
-
- /* Create the widget */
-
- priv->ending_date_edit = comp_editor_new_date_edit (TRUE, FALSE,
- FALSE);
- de = E_DATE_EDIT (priv->ending_date_edit);
-
- gtk_container_add (GTK_CONTAINER (priv->ending_special),
- GTK_WIDGET (de));
- gtk_widget_show_all (GTK_WIDGET (de));
-
- /* Set the value */
-
- e_date_edit_set_date (de, priv->ending_date_tt.year,
- priv->ending_date_tt.month,
- priv->ending_date_tt.day);
-
- gtk_signal_connect (GTK_OBJECT (de), "changed",
- GTK_SIGNAL_FUNC (ending_until_changed_cb), rpage);
-
- /* Make sure the EDateEdit widget uses our timezones to get the
- current time. */
- e_date_edit_set_get_time_callback (de,
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- rpage, NULL);
-}
-
-/* Callback used when the ending-count value changes */
-static void
-ending_count_value_changed_cb (GtkAdjustment *adj, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* Creates the special contents for the occurrence count case */
-static void
-make_ending_count_special (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkAdjustment *adj;
-
- priv = rpage->priv;
-
- g_assert (GTK_BIN (priv->ending_special)->child == NULL);
- g_assert (priv->ending_count_spin == NULL);
-
- /* Create the widgets */
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (priv->ending_special), hbox);
-
- adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 10000, 1, 10, 10));
- priv->ending_count_spin = gtk_spin_button_new (adj, 1, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->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->ending_count_spin, priv->ending_count);
-
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (ending_count_value_changed_cb),
- rpage);
-}
-
-/* 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_ending_special (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- enum ending_type ending_type;
-
- priv = rpage->priv;
-
- if (GTK_BIN (priv->ending_special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->ending_special)->child);
-
- priv->ending_date_edit = NULL;
- priv->ending_count_spin = NULL;
- }
-
- ending_type = e_dialog_option_menu_get (priv->ending_menu,
- ending_types_map);
-
- switch (ending_type) {
- case ENDING_FOR:
- make_ending_count_special (rpage);
- gtk_widget_show (priv->ending_special);
- break;
-
- case ENDING_UNTIL:
- make_ending_until_special (rpage);
- gtk_widget_show (priv->ending_special);
- break;
-
- case ENDING_FOREVER:
- gtk_widget_hide (priv->ending_special);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* Fills the recurrence ending date widgets with the values from the calendar
- * component.
- */
-static void
-fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
-{
- RecurrencePagePrivate *priv;
- GtkWidget *menu;
-
- priv = rpage->priv;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
-
- if (r->count == 0) {
- if (r->until.year == 0) {
- /* Forever */
-
- e_dialog_option_menu_set (priv->ending_menu,
- ENDING_FOREVER,
- ending_types_map);
- } else {
- /* Ending date */
-
- priv->ending_date_tt = r->until;
- e_dialog_option_menu_set (priv->ending_menu,
- ENDING_UNTIL,
- ending_types_map);
- }
- } else {
- /* Count of occurrences */
-
- priv->ending_count = r->count;
- e_dialog_option_menu_set (priv->ending_menu,
- ENDING_FOR,
- ending_types_map);
- }
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
-
- make_ending_special (rpage);
-}
-
-/* fill_widgets handler for the recurrence page. 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
-recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- CalComponentText text;
- CompEditorPageDates dates;
- 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;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- /* Keep a copy of the component so that we can expand the recurrence
- * set for the preview.
- */
-
- if (priv->comp)
- gtk_object_unref (GTK_OBJECT (priv->comp));
-
- priv->comp = cal_component_clone (comp);
-
- /* Don't send off changes during this time */
- priv->updating = TRUE;
-
- /* Clean the page */
- clear_widgets (rpage);
-
- /* Summary */
- cal_component_get_summary (comp, &text);
- recurrence_page_set_summary (page, text.value);
-
- /* Dates */
- comp_editor_dates (&dates, comp);
- recurrence_page_set_dates (page, &dates);
- comp_editor_free_dates (&dates);
-
- /* Exceptions */
- fill_exception_widgets (rpage, comp);
-
- /* Set up defaults for the special widgets */
- set_special_defaults (rpage);
-
- /* No recurrences? */
-
- if (!cal_component_has_rdates (comp)
- && !cal_component_has_rrules (comp)
- && !cal_component_has_exrules (comp)) {
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->none),
- rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->simple),
- rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->custom),
- rpage);
- e_dialog_radio_set (priv->none, RECUR_NONE, type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->none),
- rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->simple),
- rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->custom),
- rpage);
-
- gtk_widget_set_sensitive (priv->custom, FALSE);
-
- sensitize_recur_widgets (rpage);
- preview_recur (rpage);
-
- priv->updating = FALSE;
- return;
- }
-
- /* See if it is a custom set we don't support */
-
- cal_component_get_rrule_list (comp, &rrule_list);
- len = g_slist_length (rrule_list);
- if (len > 1
- || cal_component_has_rdates (comp)
- || cal_component_has_exrules (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->interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_DAILY_RECURRENCE,
- freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
- 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->weekday_day_mask = day_mask;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_WEEKLY_RECURRENCE,
- freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
- 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->month_index = nth;
- priv->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->month_index = pos;
- priv->month_day = month_day;
- } else
- goto custom;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_MONTHLY_RECURRENCE,
- freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
- 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->interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), rpage);
- e_dialog_option_menu_set (priv->interval_unit,
- ICAL_YEARLY_RECURRENCE,
- freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), rpage);
- break;
-
- default:
- goto custom;
- }
-
- /* If we got here it means it is a simple recurrence */
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->none), rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->simple), rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->custom), rpage);
- e_dialog_radio_set (priv->simple, RECUR_SIMPLE, type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->none), rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->simple), rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->custom), rpage);
-
- gtk_widget_set_sensitive (priv->custom, FALSE);
-
- sensitize_recur_widgets (rpage);
- make_recurrence_special (rpage);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
- gtk_signal_handler_block_by_data (GTK_OBJECT (adj), rpage);
- e_dialog_spin_set (priv->interval_value, r->interval);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (adj), rpage);
-
- fill_ending_date (rpage, r);
-
- goto out;
-
- custom:
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->none), rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->simple), rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->custom), rpage);
- e_dialog_radio_set (priv->custom, RECUR_CUSTOM, type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->none), rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->simple), rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->custom), rpage);
-
- gtk_widget_set_sensitive (priv->custom, TRUE);
- sensitize_recur_widgets (rpage);
-
- out:
-
- cal_component_free_recur_list (rrule_list);
- preview_recur (rpage);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the recurrence page */
-static void
-recurrence_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (page);
- fill_component (rpage, comp);
-}
-
-/* set_summary handler for the recurrence page */
-static void
-recurrence_page_set_summary (CompEditorPage *page, const char *summary)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- gchar *s;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- s = e_utf8_to_gtk_string (priv->summary, summary);
- gtk_label_set_text (GTK_LABEL (priv->summary), s);
- g_free (s);
-}
-
-/* set_dates handler for the recurrence page */
-static void
-recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- CalComponentDateTime dt;
- struct icaltimetype icaltime;
- guint8 mask;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- comp_editor_date_label (dates, priv->date_time);
-
- /* Copy the dates to our component */
-
- if (!priv->comp)
- return;
-
- dt.value = &icaltime;
-
- if (dates->start) {
- icaltime = *dates->start->value;
- dt.tzid = dates->start->tzid;
- cal_component_set_dtstart (priv->comp, &dt);
- }
-
- if (dates->end) {
- icaltime = *dates->end->value;
- dt.tzid = dates->end->tzid;
- cal_component_set_dtend (priv->comp, &dt);
- }
-
- /* Update the weekday picker if necessary */
- mask = get_start_weekday_mask (priv->comp);
- if (mask == priv->weekday_blocked_day_mask)
- return;
-
- priv->weekday_day_mask = priv->weekday_day_mask | mask;
- priv->weekday_blocked_day_mask = mask;
-
- if (priv->weekday_picker != NULL) {
- weekday_picker_set_days (WEEKDAY_PICKER (priv->weekday_picker),
- priv->weekday_day_mask);
- weekday_picker_set_blocked_days (WEEKDAY_PICKER (priv->weekday_picker),
- priv->weekday_blocked_day_mask);
- }
-
- /* Make sure the preview gets updated. */
- preview_recur (rpage);
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
-
- priv = rpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("recurrence-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
- priv->summary = GW ("summary");
- priv->date_time = GW ("date-time");
-
- priv->none = GW ("none");
- priv->simple = GW ("simple");
- priv->custom = GW ("custom");
- priv->params = GW ("params");
-
- priv->interval_value = GW ("interval-value");
- priv->interval_unit = GW ("interval-unit");
- priv->special = GW ("special");
- priv->ending_menu = GW ("ending-menu");
- priv->ending_special = GW ("ending-special");
- priv->custom_warning_bin = GW ("custom-warning-bin");
-
- priv->exception_date = GW ("exception-date");
- priv->exception_list = GW ("exception-list");
- priv->exception_add = GW ("exception-add");
- priv->exception_modify = GW ("exception-modify");
- priv->exception_delete = GW ("exception-delete");
-
- priv->preview_bin = GW ("preview-bin");
-
-#undef GW
-
- return (priv->summary
- && priv->date_time
- && priv->none
- && priv->simple
- && priv->custom
- && priv->params
- && priv->interval_value
- && priv->interval_unit
- && priv->special
- && priv->ending_menu
- && priv->ending_special
- && priv->custom_warning_bin
- && priv->exception_date
- && priv->exception_list
- && priv->exception_add
- && priv->exception_modify
- && priv->exception_delete
- && priv->preview_bin);
-}
-
-/* Callback used when the displayed date range in the recurrence preview
- * calendar changes.
- */
-static void
-preview_date_range_changed_cb (ECalendarItem *item, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
- preview_recur (rpage);
-}
-
-/* Callback used when one of the recurrence type radio buttons is toggled. We
- * enable or disable the recurrence parameters.
- */
-static void
-type_toggled_cb (GtkToggleButton *toggle, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- field_changed (rpage);
-
- if (toggle->active) {
- sensitize_recur_widgets (rpage);
- preview_recur (rpage);
- }
-}
-
-/* Callback used when the recurrence interval value spin button changes. */
-static void
-interval_value_changed_cb (GtkAdjustment *adj, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- field_changed (rpage);
- preview_recur (rpage);
-}
-
-/* Callback used when the recurrence interval option menu changes. We need to
- * change the contents of the recurrence special widget.
- */
-static void
-interval_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- field_changed (rpage);
- make_recurrence_special (rpage);
- preview_recur (rpage);
-}
-
-/* Callback used when the recurrence ending option menu changes. We need to
- * change the contents of the ending special widget.
- */
-static void
-ending_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- RecurrencePage *rpage;
-
- rpage = RECURRENCE_PAGE (data);
-
- field_changed (rpage);
- make_ending_special (rpage);
- preview_recur (rpage);
-}
-
-/* Callback for the "add exception" button */
-static void
-exception_add_cb (GtkWidget *widget, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- CalComponentDateTime dt;
- struct icaltimetype icaltime = icaltime_null_time ();
- gboolean date_set;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- field_changed (rpage);
-
- dt.value = &icaltime;
-
- /* We use DATE values for exceptions, so we don't need a TZID. */
- dt.tzid = NULL;
- icaltime.is_date = 1;
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->exception_date),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- g_assert (date_set);
-
- append_exception (rpage, &dt);
- preview_recur (rpage);
-}
-
-/* Callback for the "modify exception" button */
-static void
-exception_modify_cb (GtkWidget *widget, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- GtkCList *clist;
- CalComponentDateTime *dt;
- struct icaltimetype *tt;
- int sel;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- clist = GTK_CLIST (priv->exception_list);
- if (!clist->selection)
- return;
-
- field_changed (rpage);
-
- sel = GPOINTER_TO_INT (clist->selection->data);
-
- dt = gtk_clist_get_row_data (clist, sel);
- tt = dt->value;
- e_date_edit_get_date (E_DATE_EDIT (priv->exception_date),
- &tt->year, &tt->month, &tt->day);
- tt->hour = 0;
- tt->minute = 0;
- tt->second = 0;
- tt->is_date = 1;
-
- /* We get rid of any old TZID, since we are using a DATE value now. */
- g_free ((char*)dt->tzid);
- dt->tzid = NULL;
-
- gtk_clist_set_text (clist, sel, 0, get_exception_string (dt));
-
- preview_recur (rpage);
-}
-
-/* Callback for the "delete exception" button */
-static void
-exception_delete_cb (GtkWidget *widget, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- GtkCList *clist;
- int sel;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- clist = GTK_CLIST (priv->exception_list);
- if (!clist->selection)
- return;
-
- field_changed (rpage);
-
- sel = GPOINTER_TO_INT (clist->selection->data);
-
- 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->exception_modify, FALSE);
- gtk_widget_set_sensitive (priv->exception_delete, FALSE);
- }
-
- preview_recur (rpage);
-}
-
-/* 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
-exception_select_row_cb (GtkCList *clist, gint row, gint col,
- GdkEvent *event, gpointer data)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
- CalComponentDateTime *dt;
- struct icaltimetype *t;
-
- rpage = RECURRENCE_PAGE (data);
- priv = rpage->priv;
-
- /* Sometimes GtkCList emits a 'row-selected' signal for row 0 when
- there are 0 rows in the list (after you delete the last row).
- So we check that the row is valid here. */
- if (row >= clist->rows)
- return;
-
- dt = gtk_clist_get_row_data (clist, row);
- g_assert (dt != NULL);
-
- t = dt->value;
-
- e_date_edit_set_date (E_DATE_EDIT (priv->exception_date),
- t->year, t->month, t->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->exception_date),
- t->hour, t->minute);
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
-
- priv = rpage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (rpage));
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
- ECalendar *ecal;
- GtkAdjustment *adj;
- GtkWidget *menu;
-
- priv = rpage->priv;
-
- /* Recurrence preview */
-
- priv->preview_calendar = e_calendar_new ();
- ecal = E_CALENDAR (priv->preview_calendar);
- gtk_signal_connect (GTK_OBJECT (ecal->calitem), "date_range_changed",
- GTK_SIGNAL_FUNC (preview_date_range_changed_cb),
- rpage);
- calendar_config_configure_e_calendar (ecal);
- e_calendar_item_set_max_days_sel (ecal->calitem, 0);
- gtk_container_add (GTK_CONTAINER (priv->preview_bin),
- priv->preview_calendar);
- gtk_widget_show (priv->preview_calendar);
-
- /* Make sure the EDateEdit widgets and ECalendarItem use our timezones
- to get the current time. */
- e_date_edit_set_show_time (E_DATE_EDIT (priv->exception_date), FALSE);
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->exception_date),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- rpage, NULL);
- e_calendar_item_set_get_time_callback (ecal->calitem,
- (ECalendarItemGetTimeCallback) comp_editor_get_current_time,
- rpage, NULL);
-
- /* Recurrence types */
-
- gtk_signal_connect (GTK_OBJECT (priv->none), "toggled",
- GTK_SIGNAL_FUNC (type_toggled_cb), rpage);
- gtk_signal_connect (GTK_OBJECT (priv->simple), "toggled",
- GTK_SIGNAL_FUNC (type_toggled_cb), rpage);
- gtk_signal_connect (GTK_OBJECT (priv->custom), "toggled",
- GTK_SIGNAL_FUNC (type_toggled_cb), rpage);
-
- /* Recurrence interval */
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (interval_value_changed_cb),
- rpage);
-
- /* Recurrence units */
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->interval_unit));
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (interval_selection_done_cb),
- rpage);
-
- /* Recurrence ending */
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu));
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (ending_selection_done_cb), rpage);
-
- /* Exception buttons */
-
- gtk_signal_connect (GTK_OBJECT (priv->exception_add), "clicked",
- GTK_SIGNAL_FUNC (exception_add_cb), rpage);
- gtk_signal_connect (GTK_OBJECT (priv->exception_modify), "clicked",
- GTK_SIGNAL_FUNC (exception_modify_cb), rpage);
- gtk_signal_connect (GTK_OBJECT (priv->exception_delete), "clicked",
- GTK_SIGNAL_FUNC (exception_delete_cb), rpage);
-
- /* Selections in the exceptions list */
-
- gtk_signal_connect (GTK_OBJECT (priv->exception_list), "select_row",
- GTK_SIGNAL_FUNC (exception_select_row_cb), rpage);
-}
-
-
-
-/**
- * recurrence_page_construct:
- * @rpage: A recurrence page.
- *
- * Constructs a recurrence page by loading its Glade data.
- *
- * Return value: The same object as @rpage, or NULL if the widgets could not be
- * created.
- **/
-RecurrencePage *
-recurrence_page_construct (RecurrencePage *rpage)
-{
- RecurrencePagePrivate *priv;
-
- priv = rpage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/recurrence-page.glade", NULL);
- if (!priv->xml) {
- g_message ("recurrence_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (rpage)) {
- g_message ("recurrence_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- init_widgets (rpage);
-
- return rpage;
-}
-
-/**
- * recurrence_page_new:
- *
- * Creates a new recurrence page.
- *
- * Return value: A newly-created recurrence page, or NULL if the page could not
- * be created.
- **/
-RecurrencePage *
-recurrence_page_new (void)
-{
- RecurrencePage *rpage;
-
- rpage = gtk_type_new (TYPE_RECURRENCE_PAGE);
- if (!recurrence_page_construct (rpage)) {
- gtk_object_unref (GTK_OBJECT (rpage));
- return NULL;
- }
-
- return rpage;
-}
-
-
-GtkWidget *make_exdate_date_edit (void);
-
-GtkWidget *
-make_exdate_date_edit (void)
-{
- return comp_editor_new_date_edit (TRUE, TRUE, FALSE);
-}
-
diff --git a/calendar/gui/dialogs/recurrence-page.glade b/calendar/gui/dialogs/recurrence-page.glade
deleted file mode 100644
index a044a771aa..0000000000
--- a/calendar/gui/dialogs/recurrence-page.glade
+++ /dev/null
@@ -1,602 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>recurrence-page</name>
- <program_name>recurrence-page</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>GtkWindow</class>
- <name>recurrence-toplevel</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>GtkVBox</class>
- <name>recurrence-page</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame35</name>
- <label>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>Summary:</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>label67</name>
- <label>Date/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>GtkLabel</class>
- <name>summary</name>
- <width>10</width>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>4</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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>date-time</name>
- <width>10</width>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- <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>
- <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>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>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>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>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>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>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>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>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>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>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>exception-add</name>
- <can_focus>True</can_focus>
- <label>A_dd</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>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>exception-delete</name>
- <can_focus>True</can_focus>
- <label>_Remove</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>exception-date</name>
- <creation_function>make_exdate_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>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>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>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/recurrence-page.h b/calendar/gui/dialogs/recurrence-page.h
deleted file mode 100644
index aba59003f7..0000000000
--- a/calendar/gui/dialogs/recurrence-page.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Evolution calendar - Recurrence page of the calendar component dialogs
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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 RECURRENCE_PAGE_H
-#define RECURRENCE_PAGE_H
-
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_RECURRENCE_PAGE (recurrence_page_get_type ())
-#define RECURRENCE_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_RECURRENCE_PAGE, RecurrencePage))
-#define RECURRENCE_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_RECURRENCE_PAGE, RecurrencePageClass))
-#define IS_RECURRENCE_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_RECURRENCE_PAGE))
-#define IS_RECURRENCE_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_RECURRENCE_PAGE))
-
-typedef struct _RecurrencePagePrivate RecurrencePagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- RecurrencePagePrivate *priv;
-} RecurrencePage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} RecurrencePageClass;
-
-
-GtkType recurrence_page_get_type (void);
-RecurrencePage *recurrence_page_construct (RecurrencePage *rpage);
-RecurrencePage *recurrence_page_new (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
deleted file mode 100644
index d8ee62164a..0000000000
--- a/calendar/gui/dialogs/save-comp.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Ximian, 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 17b449291c..0000000000
--- a/calendar/gui/dialogs/save-comp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Ximian, 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/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
deleted file mode 100644
index 37d94c76b7..0000000000
--- a/calendar/gui/dialogs/schedule-page.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/* Evolution calendar - Scheduling page
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-exception.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <glade/glade.h>
-#include <gal/e-table/e-cell-combo.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <widgets/misc/e-dateedit.h>
-#include <e-util/e-dialog-widgets.h>
-#include <e-destination.h>
-#include "Evolution-Addressbook-SelectNames.h"
-#include "../e-meeting-time-sel.h"
-#include "../itip-utils.h"
-#include "comp-editor-util.h"
-#include "e-delegate-dialog.h"
-#include "schedule-page.h"
-
-
-
-/* Private part of the SchedulePage structure */
-struct _SchedulePagePrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
- GtkWidget *main;
-
- /* Model */
- EMeetingModel *model;
-
- /* Selector */
- EMeetingTimeSelector *sel;
-
- gboolean updating;
-};
-
-
-
-static void schedule_page_class_init (SchedulePageClass *class);
-static void schedule_page_init (SchedulePage *spage);
-static void schedule_page_destroy (GtkObject *object);
-
-static GtkWidget *schedule_page_get_widget (CompEditorPage *page);
-static void schedule_page_focus_main_widget (CompEditorPage *page);
-static void schedule_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void schedule_page_fill_component (CompEditorPage *page, CalComponent *comp);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * schedule_page_get_type:
- *
- * Registers the #SchedulePage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #SchedulePage class.
- **/
-GtkType
-schedule_page_get_type (void)
-{
- static GtkType schedule_page_type;
-
- if (!schedule_page_type) {
- static const GtkTypeInfo schedule_page_info = {
- "SchedulePage",
- sizeof (SchedulePage),
- sizeof (SchedulePageClass),
- (GtkClassInitFunc) schedule_page_class_init,
- (GtkObjectInitFunc) schedule_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- schedule_page_type =
- gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &schedule_page_info);
- }
-
- return schedule_page_type;
-}
-
-/* Class initialization function for the schedule page */
-static void
-schedule_page_class_init (SchedulePageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = schedule_page_get_widget;
- editor_page_class->focus_main_widget = schedule_page_focus_main_widget;
- editor_page_class->fill_widgets = schedule_page_fill_widgets;
- editor_page_class->fill_component = schedule_page_fill_component;
- editor_page_class->set_summary = NULL;
- editor_page_class->set_dates = NULL;
-
- object_class->destroy = schedule_page_destroy;
-}
-
-/* Object initialization function for the schedule page */
-static void
-schedule_page_init (SchedulePage *spage)
-{
- SchedulePagePrivate *priv;
-
- priv = g_new0 (SchedulePagePrivate, 1);
- spage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
-
- priv->updating = FALSE;
-}
-
-/* Destroy handler for the schedule page */
-static void
-schedule_page_destroy (GtkObject *object)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_SCHEDULE_PAGE (object));
-
- spage = SCHEDULE_PAGE (object);
- priv = spage->priv;
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- gtk_object_unref (GTK_OBJECT (priv->model));
-
- g_free (priv);
- spage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_widget handler for the schedule page */
-static GtkWidget *
-schedule_page_get_widget (CompEditorPage *page)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the schedule page */
-static void
-schedule_page_focus_main_widget (CompEditorPage *page)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-
- gtk_widget_grab_focus (GTK_WIDGET (priv->sel));
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (SchedulePage *spage)
-{
- SchedulePagePrivate *priv;
-
- priv = spage->priv;
-}
-
-/* fill_widgets handler for the schedule page */
-static void
-schedule_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-
- priv->updating = TRUE;
-
- /* Clean the screen */
- clear_widgets (spage);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the schedule page */
-static void
-schedule_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- SchedulePage *spage;
- SchedulePagePrivate *priv;
-
- spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (SchedulePage *spage)
-{
- SchedulePagePrivate *priv;
-
- priv = spage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("schedule-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
-#undef GW
-
- return TRUE;
-}
-
-
-
-/**
- * schedule_page_construct:
- * @spage: An schedule page.
- *
- * Constructs an schedule page by loading its Glade data.
- *
- * Return value: The same object as @spage, or NULL if the widgets could not
- * be created.
- **/
-SchedulePage *
-schedule_page_construct (SchedulePage *spage, EMeetingModel *emm)
-{
- SchedulePagePrivate *priv;
-
- priv = spage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/schedule-page.glade", NULL);
- if (!priv->xml) {
- g_message ("schedule_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (spage)) {
- g_message ("schedule_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- /* Model */
- gtk_object_ref (GTK_OBJECT (emm));
- priv->model = emm;
-
- /* Selector */
- priv->sel = E_MEETING_TIME_SELECTOR (e_meeting_time_selector_new (emm));
- gtk_widget_show (GTK_WIDGET (priv->sel));
- gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->sel), TRUE, TRUE, 2);
-
- return spage;
-}
-
-/**
- * schedule_page_new:
- *
- * Creates a new schedule page.
- *
- * Return value: A newly-created schedule page, or NULL if the page could
- * not be created.
- **/
-SchedulePage *
-schedule_page_new (EMeetingModel *emm)
-{
- SchedulePage *spage;
-
- spage = gtk_type_new (TYPE_SCHEDULE_PAGE);
- if (!schedule_page_construct (spage, emm)) {
- gtk_object_unref (GTK_OBJECT (spage));
- return NULL;
- }
-
- return spage;
-}
diff --git a/calendar/gui/dialogs/schedule-page.glade b/calendar/gui/dialogs/schedule-page.glade
deleted file mode 100644
index 95a2147659..0000000000
--- a/calendar/gui/dialogs/schedule-page.glade
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-details-page</name>
- <program_name>task-details-page</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>schedule-toplevel</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>GtkVBox</class>
- <name>schedule-page</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/schedule-page.h b/calendar/gui/dialogs/schedule-page.h
deleted file mode 100644
index b9a136e86c..0000000000
--- a/calendar/gui/dialogs/schedule-page.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Evolution calendar - Scheduling page
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: 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 SCHEDULE_PAGE_H
-#define SCHEDULE_PAGE_H
-
-#include "../e-meeting-model.h"
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_SCHEDULE_PAGE (schedule_page_get_type ())
-#define SCHEDULE_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_SCHEDULE_PAGE, SchedulePage))
-#define SCHEDULE_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_SCHEDULE_PAGE, SchedulePageClass))
-#define IS_SCHEDULE_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_SCHEDULE_PAGE))
-#define IS_SCHEDULE_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_SCHEDULE_PAGE))
-
-typedef struct _SchedulePagePrivate SchedulePagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- SchedulePagePrivate *priv;
-} SchedulePage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} SchedulePageClass;
-
-
-GtkType schedule_page_get_type (void);
-SchedulePage *schedule_page_construct (SchedulePage *mpage, EMeetingModel *emm);
-SchedulePage *schedule_page_new (EMeetingModel *emm);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
deleted file mode 100644
index 7f7874fa41..0000000000
--- a/calendar/gui/dialogs/send-comp.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Evolution calendar - Send calendar component dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: 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.
- */
-
-#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 "send-comp.h"
-
-
-
-/**
- * send_component_dialog:
- *
- * Pops up a dialog box asking the user whether he wants to send a
- * iTip/iMip message
- *
- * Return value: TRUE if the user clicked Yes, FALSE otherwise.
- **/
-gboolean
-send_component_dialog (CalComponent *comp)
-{
- GtkWidget *dialog;
- CalComponentVType vtype;
- char *str;
-
- vtype = cal_component_get_vtype (comp);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- str = g_strdup_printf (_("The meeting information has changed. "
- "Send an updated version?"));
- break;
-
- case CAL_COMPONENT_TODO:
- str = g_strdup_printf (_("The task information has changed. "
- "Send an updated version?"));
- break;
-
- case CAL_COMPONENT_JOURNAL:
- str = g_strdup_printf (_("The journal entry has changed. "
- "Send an updated version?"));
- break;
-
- default:
- g_message ("send_component_dialog(): "
- "Cannot handle object of type %d", vtype);
- return FALSE;
- }
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
-
- if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
- return TRUE;
- else
- return FALSE;
-}
diff --git a/calendar/gui/dialogs/send-comp.h b/calendar/gui/dialogs/send-comp.h
deleted file mode 100644
index f60ab947aa..0000000000
--- a/calendar/gui/dialogs/send-comp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Send calendar component dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: 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 SEND_COMP_H
-#define SEND_COMP_H
-
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-gboolean send_component_dialog (CalComponent *comp);
-
-#endif
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
deleted file mode 100644
index 3196994bd1..0000000000
--- a/calendar/gui/dialogs/task-details-page.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/* Evolution calendar - task details page
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <gtk/gtktogglebutton.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include <widgets/misc/e-dateedit.h>
-#include "e-util/e-dialog-widgets.h"
-#include "../calendar-config.h"
-#include "../e-timezone-entry.h"
-#include "comp-editor-util.h"
-#include "task-details-page.h"
-
-
-
-/* Private part of the TaskDetailsPage structure */
-struct _TaskDetailsPagePrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
- GtkWidget *main;
-
- GtkWidget *status;
- GtkWidget *priority;
- GtkWidget *percent_complete;
-
- GtkWidget *completed_date;
-
- GtkWidget *url;
-
- gboolean updating;
-};
-
-/* 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 void task_details_page_class_init (TaskDetailsPageClass *class);
-static void task_details_page_init (TaskDetailsPage *tdpage);
-static void task_details_page_destroy (GtkObject *object);
-
-static GtkWidget *task_details_page_get_widget (CompEditorPage *page);
-static void task_details_page_focus_main_widget (CompEditorPage *page);
-static void task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void task_details_page_fill_component (CompEditorPage *page, CalComponent *comp);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * task_details_page_get_type:
- *
- * Registers the #TaskDetailsPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #TaskDetailsPage class.
- **/
-GtkType
-task_details_page_get_type (void)
-{
- static GtkType task_details_page_type;
-
- if (!task_details_page_type) {
- static const GtkTypeInfo task_details_page_info = {
- "TaskDetailsPage",
- sizeof (TaskDetailsPage),
- sizeof (TaskDetailsPageClass),
- (GtkClassInitFunc) task_details_page_class_init,
- (GtkObjectInitFunc) task_details_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- task_details_page_type =
- gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &task_details_page_info);
- }
-
- return task_details_page_type;
-}
-
-/* Class initialization function for the task page */
-static void
-task_details_page_class_init (TaskDetailsPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = task_details_page_get_widget;
- editor_page_class->focus_main_widget = task_details_page_focus_main_widget;
- editor_page_class->fill_widgets = task_details_page_fill_widgets;
- editor_page_class->fill_component = task_details_page_fill_component;
-
- object_class->destroy = task_details_page_destroy;
-}
-
-/* Object initialization function for the task page */
-static void
-task_details_page_init (TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
-
- priv = g_new0 (TaskDetailsPagePrivate, 1);
- tdpage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
-
- priv->status = NULL;
- priv->priority = NULL;
- priv->percent_complete = NULL;
-
- priv->completed_date = NULL;
- priv->url = NULL;
-
- priv->updating = FALSE;
-}
-
-/* Destroy handler for the task page */
-static void
-task_details_page_destroy (GtkObject *object)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_TASK_DETAILS_PAGE (object));
-
- tdpage = TASK_DETAILS_PAGE (object);
- priv = tdpage->priv;
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- tdpage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_widget handler for the task page */
-static GtkWidget *
-task_details_page_get_widget (CompEditorPage *page)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
-
- tdpage = TASK_DETAILS_PAGE (page);
- priv = tdpage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the task page */
-static void
-task_details_page_focus_main_widget (CompEditorPage *page)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
-
- tdpage = TASK_DETAILS_PAGE (page);
- priv = tdpage->priv;
-
- gtk_widget_grab_focus (priv->status);
-}
-
-
-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;
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
-
- priv = tdpage->priv;
-
- /* Date completed */
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), -1);
-
- /* URL */
- e_dialog_editable_set (priv->url, NULL);
-}
-
-/* fill_widgets handler for the task page */
-static void
-task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
- int *priority_value, *percent;
- TaskEditorPriority priority;
- icalproperty_status status;
- const char *url;
- struct icaltimetype *completed = NULL;
-
- tdpage = TASK_DETAILS_PAGE (page);
- priv = tdpage->priv;
-
- priv->updating = TRUE;
-
- /* Clean the screen */
- clear_widgets (tdpage);
-
- /* Percent Complete. */
- cal_component_get_percent (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 (comp, &status);
- if (status == ICAL_STATUS_NONE) {
- /* Try to use 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);
-
- /* Completed Date. */
- cal_component_get_completed (comp, &completed);
- if (completed) {
- icaltimezone *utc_zone, *zone;
- char *location;
-
- /* Completed is in UTC, but that would confuse the user, so
- we convert it to local time. */
- utc_zone = icaltimezone_get_utc_timezone ();
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
-
- icaltimezone_convert_time (completed, utc_zone, zone);
-
- e_date_edit_set_date (E_DATE_EDIT (priv->completed_date),
- completed->year, completed->month,
- completed->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->completed_date),
- completed->hour,
- completed->minute);
-
- cal_component_free_icaltimetype (completed);
- }
-
- /* Priority. */
- cal_component_get_priority (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);
-
- /* URL */
- cal_component_get_url (comp, &url);
- e_dialog_editable_set (priv->url, url);
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the task page */
-static void
-task_details_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
- struct icaltimetype icaltime;
- icalproperty_status status;
- TaskEditorPriority priority;
- int priority_value, percent;
- char *url;
- gboolean date_set;
-
- tdpage = TASK_DETAILS_PAGE (page);
- priv = tdpage->priv;
-
- /* 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);
-
- icaltime = icaltime_null_time ();
-
- /* COMPLETED must be in UTC. */
- icaltime.is_utc = 1;
-
- /* Completed Date. */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->completed_date),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->completed_date),
- &icaltime.hour,
- &icaltime.minute);
- if (date_set) {
- /* COMPLETED must be in UTC, so we assume that the date in the
- dialog is in the current timezone, and we now convert it
- to UTC. FIXME: We should really use one timezone for the
- entire time the dialog is shown. Otherwise if the user
- changes the timezone, the COMPLETED date may get changed
- as well. */
- char *location = calendar_config_get_timezone ();
- icaltimezone *zone = icaltimezone_get_builtin_timezone (location);
- icaltimezone_convert_time (&icaltime, zone,
- icaltimezone_get_utc_timezone ());
- cal_component_set_completed (comp, &icaltime);
- } else {
- cal_component_set_completed (comp, NULL);
- }
-
- /* URL. */
- url = e_dialog_editable_get (priv->url);
- cal_component_set_url (comp, url);
- if (url)
- g_free (url);
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
-
- priv = tdpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("task-details-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
- priv->status = GW ("status");
- priv->priority = GW ("priority");
- priv->percent_complete = GW ("percent-complete");
-
- priv->completed_date = GW ("completed-date");
-
- priv->url = GW ("url");
-
-#undef GW
-
- return (priv->status
- && priv->priority
- && priv->percent_complete
- && priv->completed_date
- && priv->url);
-}
-
-
-static void
-complete_date_changed (TaskDetailsPage *tdpage, time_t ctime, gboolean complete)
-{
- TaskDetailsPagePrivate *priv;
- CompEditorPageDates dates = {NULL, NULL, NULL, NULL};
- icaltimezone *zone;
- struct icaltimetype completed_tt = icaltime_null_time();
-
- priv = tdpage->priv;
-
- /* Get the current time in UTC. */
- zone = icaltimezone_get_utc_timezone ();
- completed_tt = icaltime_from_timet_with_zone (ctime, FALSE, zone);
- completed_tt.is_utc = TRUE;
-
- dates.start = NULL;
- dates.end = NULL;
- dates.due = NULL;
- if (complete)
- dates.complete = &completed_tt;
-
- /* Notify upstream */
- comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (tdpage),
- &dates);
-}
-
-static void
-date_changed_cb (EDateEdit *dedit, gpointer data)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
- CompEditorPageDates dates = {NULL, NULL, NULL, NULL};
- struct icaltimetype completed_tt;
- icalproperty_status status;
- gboolean date_set;
-
- tdpage = TASK_DETAILS_PAGE (data);
- priv = tdpage->priv;
-
- if (priv->updating)
- return;
-
- priv->updating = TRUE;
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->completed_date),
- &completed_tt.year,
- &completed_tt.month,
- &completed_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->completed_date),
- &completed_tt.hour,
- &completed_tt.minute);
-
- status = e_dialog_option_menu_get (priv->status, status_map);
-
- if (!date_set) {
- completed_tt = icaltime_null_time ();
- if (status == ICAL_STATUS_COMPLETED) {
- e_dialog_option_menu_set (priv->status,
- ICAL_STATUS_NEEDSACTION,
- status_map);
- e_dialog_spin_set (priv->percent_complete, 0);
- }
- } else {
- if (status != ICAL_STATUS_COMPLETED) {
- e_dialog_option_menu_set (priv->status,
- ICAL_STATUS_COMPLETED,
- status_map);
- }
- e_dialog_spin_set (priv->percent_complete, 100);
- }
-
- priv->updating = FALSE;
-
- /* Notify upstream */
- dates.complete = &completed_tt;
- comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (tdpage), &dates);
-}
-
-static void
-status_changed (GtkMenu *menu, TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
- icalproperty_status status;
- time_t ctime = -1;
-
- priv = tdpage->priv;
-
- if (priv->updating)
- return;
-
- priv->updating = TRUE;
-
- status = e_dialog_option_menu_get (priv->status, status_map);
- if (status == ICAL_STATUS_NEEDSACTION) {
- e_dialog_spin_set (priv->percent_complete, 0);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
- complete_date_changed (tdpage, 0, FALSE);
- } else if (status == ICAL_STATUS_INPROCESS) {
- e_dialog_spin_set (priv->percent_complete, 50);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
- complete_date_changed (tdpage, 0, FALSE);
- } else if (status == ICAL_STATUS_COMPLETED) {
- e_dialog_spin_set (priv->percent_complete, 100);
- ctime = time (NULL);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
- complete_date_changed (tdpage, ctime, TRUE);
- }
-
- priv->updating = FALSE;
-
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tdpage));
-}
-
-static void
-percent_complete_changed (GtkAdjustment *adj, TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
- gint percent;
- icalproperty_status status;
- gboolean complete;
- time_t ctime = -1;
-
- priv = tdpage->priv;
-
- if (priv->updating)
- return;
-
- priv->updating = TRUE;
-
- percent = e_dialog_spin_get_int (priv->percent_complete);
- if (percent == 100) {
- complete = TRUE;
- ctime = time (NULL);
- status = ICAL_STATUS_COMPLETED;
- } else {
- complete = FALSE;
-
- if (percent == 0)
- status = ICAL_STATUS_NEEDSACTION;
- else
- status = ICAL_STATUS_INPROCESS;
- }
-
- e_dialog_option_menu_set (priv->status, status, status_map);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
- complete_date_changed (tdpage, ctime, complete);
-
- priv->updating = FALSE;
-
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tdpage));
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed_cb (GtkWidget *widget, gpointer data)
-{
- TaskDetailsPage *tdpage;
- TaskDetailsPagePrivate *priv;
-
- tdpage = TASK_DETAILS_PAGE (data);
- priv = tdpage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tdpage));
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
-
- priv = tdpage->priv;
-
- /* Make sure the EDateEdit widgets use our timezones to get the
- current time. */
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->completed_date),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- tdpage, NULL);
-
- /* 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 (GTK_OPTION_MENU (priv->status)->menu),
- "deactivate",
- GTK_SIGNAL_FUNC (status_changed), tdpage);
-
- gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (priv->percent_complete)->adjustment),
- "value_changed",
- GTK_SIGNAL_FUNC (percent_complete_changed), tdpage);
-
- /* Priority */
- gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->priority)->menu),
- "deactivate",
- GTK_SIGNAL_FUNC (field_changed_cb), tdpage);
-
- /* Completed Date */
- gtk_signal_connect (GTK_OBJECT (priv->completed_date), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), tdpage);
-
- /* URL */
- gtk_signal_connect (GTK_OBJECT (priv->url), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), tdpage);
-}
-
-
-
-/**
- * task_details_page_construct:
- * @tdpage: An task details page.
- *
- * Constructs an task page by loading its Glade data.
- *
- * Return value: The same object as @tdpage, or NULL if the widgets could not
- * be created.
- **/
-TaskDetailsPage *
-task_details_page_construct (TaskDetailsPage *tdpage)
-{
- TaskDetailsPagePrivate *priv;
-
- priv = tdpage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/task-details-page.glade", NULL);
- if (!priv->xml) {
- g_message ("task_details_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (tdpage)) {
- g_message ("task_details_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- init_widgets (tdpage);
-
- return tdpage;
-}
-
-/**
- * task_details_page_new:
- *
- * Creates a new task details page.
- *
- * Return value: A newly-created task details page, or NULL if the page could
- * not be created.
- **/
-TaskDetailsPage *
-task_details_page_new (void)
-{
- TaskDetailsPage *tdpage;
-
- tdpage = gtk_type_new (TYPE_TASK_DETAILS_PAGE);
- if (!task_details_page_construct (tdpage)) {
- gtk_object_unref (GTK_OBJECT (tdpage));
- return NULL;
- }
-
- return tdpage;
-}
-
-GtkWidget *task_details_page_create_date_edit (void);
-
-GtkWidget *
-task_details_page_create_date_edit (void)
-{
- GtkWidget *dedit;
-
- dedit = comp_editor_new_date_edit (TRUE, TRUE, FALSE);
- e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE);
-
- return dedit;
-}
diff --git a/calendar/gui/dialogs/task-details-page.glade b/calendar/gui/dialogs/task-details-page.glade
deleted file mode 100644
index 54ba5d35b5..0000000000
--- a/calendar/gui/dialogs/task-details-page.glade
+++ /dev/null
@@ -1,310 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-details-page</name>
- <program_name>task-details-page</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>task-details-toplevel</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>GtkVBox</class>
- <name>task-details-page</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame2</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>False</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <border_width>4</border_width>
- <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>_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>label18</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>label19</name>
- <label>% Complete</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>GtkSpinButton</class>
- <name>percent-complete</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>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>4</border_width>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <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>Custom</class>
- <name>completed-date</name>
- <creation_function>task_details_page_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 01 Jun 2001 18:58:51 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>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table2</name>
- <border_width>4</border_width>
- <rows>1</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>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>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>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>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>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/task-details-page.h b/calendar/gui/dialogs/task-details-page.h
deleted file mode 100644
index 1821f00cec..0000000000
--- a/calendar/gui/dialogs/task-details-page.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Evolution calendar - Main page of the task editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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 TASK_DETAILS_PAGE_H
-#define TASK_DETAILS_PAGE_H
-
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_TASK_DETAILS_PAGE (task_details_page_get_type ())
-#define TASK_DETAILS_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_TASK_DETAILS_PAGE, TaskDetailsPage))
-#define TASK_DETAILS_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_TASK_DETAILS_PAGE, TaskDetailsPageClass))
-#define IS_TASK_DETAILS_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_TASK_DETAILS_PAGE))
-#define IS_TASK_DETAILS_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_TASK_DETAILS_PAGE))
-
-typedef struct _TaskDetailsPagePrivate TaskDetailsPagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- TaskDetailsPagePrivate *priv;
-} TaskDetailsPage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} TaskDetailsPageClass;
-
-
-GtkType task_details_page_get_type (void);
-TaskDetailsPage *task_details_page_construct (TaskDetailsPage *tdpage);
-TaskDetailsPage *task_details_page_new (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
deleted file mode 100644
index 3c09dece79..0000000000
--- a/calendar/gui/dialogs/task-editor.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Task editor dialog
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 <string.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "task-page.h"
-#include "task-details-page.h"
-#include "meeting-page.h"
-#include "cancel-comp.h"
-#include "task-editor.h"
-
-struct _TaskEditorPrivate {
- TaskPage *task_page;
- TaskDetailsPage *task_details_page;
- MeetingPage *meet_page;
-
- EMeetingModel *model;
-
- gboolean meeting_shown;
- gboolean updating;
-};
-
-
-
-static void task_editor_class_init (TaskEditorClass *class);
-static void task_editor_init (TaskEditor *te);
-static void task_editor_edit_comp (CompEditor *editor, CalComponent *comp);
-static void task_editor_destroy (GtkObject *object);
-
-static void assign_task_cmd (GtkWidget *widget, gpointer data);
-static void refresh_task_cmd (GtkWidget *widget, gpointer data);
-static void cancel_task_cmd (GtkWidget *widget, gpointer data);
-static void forward_cmd (GtkWidget *widget, gpointer data);
-
-static void model_row_changed_cb (ETableModel *etm, int row, gpointer data);
-static void row_count_changed_cb (ETableModel *etm, int row, int count, gpointer data);
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ActionAssignTask", assign_task_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionRefreshTask", refresh_task_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionCancelTask", cancel_task_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionForward", forward_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-static CompEditorClass *parent_class;
-
-
-
-/**
- * task_editor_get_type:
- *
- * Registers the #TaskEditor class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #TaskEditor class.
- **/
-GtkType
-task_editor_get_type (void)
-{
- static GtkType task_editor_type = 0;
-
- if (!task_editor_type) {
- static const GtkTypeInfo task_editor_info = {
- "TaskEditor",
- sizeof (TaskEditor),
- sizeof (TaskEditorClass),
- (GtkClassInitFunc) task_editor_class_init,
- (GtkObjectInitFunc) task_editor_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- task_editor_type = gtk_type_unique (TYPE_COMP_EDITOR,
- &task_editor_info);
- }
-
- return task_editor_type;
-}
-
-/* Class initialization function for the event editor */
-static void
-task_editor_class_init (TaskEditorClass *klass)
-{
- GtkObjectClass *object_class;
- CompEditorClass *editor_class;
-
- object_class = (GtkObjectClass *) klass;
- editor_class = (CompEditorClass *) klass;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR);
-
- editor_class->edit_comp = task_editor_edit_comp;
-
- object_class->destroy = task_editor_destroy;
-}
-
-static void
-set_menu_sens (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionAssignTask",
- "sensitive", priv->meeting_shown ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionRefreshTask",
- "sensitive", priv->meeting_shown ? "1" : "0");
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionCancelTask",
- "sensitive", priv->meeting_shown ? "1" : "0");
-}
-
-static void
-init_widgets (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- gtk_signal_connect (GTK_OBJECT (priv->model), "model_row_changed",
- GTK_SIGNAL_FUNC (model_row_changed_cb), te);
- gtk_signal_connect (GTK_OBJECT (priv->model), "model_rows_inserted",
- GTK_SIGNAL_FUNC (row_count_changed_cb), te);
- gtk_signal_connect (GTK_OBJECT (priv->model), "model_rows_deleted",
- GTK_SIGNAL_FUNC (row_count_changed_cb), te);
-}
-
-/* Object initialization function for the task editor */
-static void
-task_editor_init (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
-
- priv = g_new0 (TaskEditorPrivate, 1);
- te->priv = priv;
-
- priv->task_page = task_page_new ();
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->task_page),
- _("Basic"));
-
- priv->task_details_page = task_details_page_new ();
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->task_details_page),
- _("Details"));
-
- priv->model = E_MEETING_MODEL (e_meeting_model_new ());
-
- priv->meet_page = meeting_page_new (priv->model);
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
-
- comp_editor_merge_ui (COMP_EDITOR (te), EVOLUTION_DATADIR
- "/gnome/ui/evolution-task-editor.xml",
- verbs);
-
- priv->meeting_shown = TRUE;
- priv->updating = FALSE;
-
- init_widgets (te);
- set_menu_sens (te);
-}
-
-static void
-task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
-{
- TaskEditor *te;
- TaskEditorPrivate *priv;
- GSList *attendees = NULL;
-
- te = TASK_EDITOR (editor);
- priv = te->priv;
-
- priv->updating = TRUE;
-
- cal_component_get_attendee_list (comp, &attendees);
- if (attendees == NULL) {
- comp_editor_remove_page (editor, COMP_EDITOR_PAGE (priv->meet_page));
- priv->meeting_shown = FALSE;
- set_menu_sens (te);
- } else {
- GSList *l;
-
- for (l = attendees; l != NULL; l = l->next) {
- CalComponentAttendee *ca = l->data;
- EMeetingAttendee *ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
-
- e_meeting_model_add_attendee (priv->model, ia);
- gtk_object_unref (GTK_OBJECT (ia));
- }
- priv->meeting_shown = TRUE;
- }
- cal_component_free_attendee_list (attendees);
-
- set_menu_sens (te);
- comp_editor_set_needs_send (COMP_EDITOR (te), priv->meeting_shown);
-
- priv->updating = FALSE;
-
- if (parent_class->edit_comp)
- parent_class->edit_comp (editor, comp);
-}
-
-/* Destroy handler for the event editor */
-static void
-task_editor_destroy (GtkObject *object)
-{
- TaskEditor *te;
- TaskEditorPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_TASK_EDITOR (object));
-
- te = TASK_EDITOR (object);
- priv = te->priv;
-
- gtk_object_unref (GTK_OBJECT (priv->task_page));
- gtk_object_unref (GTK_OBJECT (priv->task_details_page));
- gtk_object_unref (GTK_OBJECT (priv->meet_page));
-
- gtk_object_unref (GTK_OBJECT (priv->model));
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/**
- * task_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.
- **/
-TaskEditor *
-task_editor_new (void)
-{
- return TASK_EDITOR (gtk_type_new (TYPE_TASK_EDITOR));
-}
-
-static void
-assign_task_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- if (!priv->meeting_shown) {
- comp_editor_append_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page),
- _("Assignment"));
- priv->meeting_shown = TRUE;
-
- set_menu_sens (te);
- comp_editor_set_needs_send (COMP_EDITOR (te), priv->meeting_shown);
- }
-
- comp_editor_show_page (COMP_EDITOR (te),
- COMP_EDITOR_PAGE (priv->meet_page));
-}
-
-static void
-refresh_task_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
-
- comp_editor_save_comp (COMP_EDITOR (te));
- comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_REFRESH);
-}
-
-static void
-cancel_task_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
- CalComponent *comp;
-
- comp = comp_editor_get_current_comp (COMP_EDITOR (te));
- if (cancel_component_dialog (comp)) {
- comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_CANCEL);
- comp_editor_delete_comp (COMP_EDITOR (te));
- }
-}
-
-static void
-forward_cmd (GtkWidget *widget, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
-
- comp_editor_save_comp (COMP_EDITOR (te));
- comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_PUBLISH);
-}
-
-static void
-model_row_changed_cb (ETableModel *etm, int row, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- if (!priv->updating)
- comp_editor_set_changed (COMP_EDITOR (te), TRUE);
-}
-
-static void
-row_count_changed_cb (ETableModel *etm, int row, int count, gpointer data)
-{
- TaskEditor *te = TASK_EDITOR (data);
- TaskEditorPrivate *priv;
-
- priv = te->priv;
-
- if (!priv->updating)
- comp_editor_set_changed (COMP_EDITOR (te), TRUE);
-}
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
deleted file mode 100644
index 47644f482f..0000000000
--- a/calendar/gui/dialogs/task-editor.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Evolution calendar - Task editor dialog
- *
- * Copyright (C) 2000 Ximian, 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 __TASK_EDITOR_H__
-#define __TASK_EDITOR_H__
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkobject.h>
-#include "comp-editor.h"
-
-
-
-#define TYPE_TASK_EDITOR (task_editor_get_type ())
-#define TASK_EDITOR(obj) (GTK_CHECK_CAST ((obj), TYPE_TASK_EDITOR, TaskEditor))
-#define TASK_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_TASK_EDITOR, \
- TaskEditorClass))
-#define IS_TASK_EDITOR(obj) (GTK_CHECK_TYPE ((obj), TYPE_TASK_EDITOR))
-#define IS_TASK_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_TASK_EDITOR))
-
-typedef struct _TaskEditor TaskEditor;
-typedef struct _TaskEditorClass TaskEditorClass;
-typedef struct _TaskEditorPrivate TaskEditorPrivate;
-
-struct _TaskEditor {
- CompEditor parent;
-
- /* Private data */
- TaskEditorPrivate *priv;
-};
-
-struct _TaskEditorClass {
- CompEditorClass parent_class;
-};
-
-GtkType task_editor_get_type (void);
-TaskEditor *task_editor_construct (TaskEditor *ee);
-TaskEditor *task_editor_new (void);
-
-
-
-#endif /* __TASK_EDITOR_H__ */
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
deleted file mode 100644
index 2c3f8d18ec..0000000000
--- a/calendar/gui/dialogs/task-page.c
+++ /dev/null
@@ -1,945 +0,0 @@
-/* Evolution calendar - Main page of the task editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktext.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtkoptionmenu.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-categories.h>
-#include <widgets/misc/e-dateedit.h>
-#include "e-util/e-dialog-widgets.h"
-#include "e-util/e-categories-config.h"
-#include "../e-timezone-entry.h"
-#include "../calendar-config.h"
-#include "comp-editor-util.h"
-#include "task-page.h"
-
-
-
-/* Private part of the TaskPage structure */
-struct _TaskPagePrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
- GtkWidget *main;
-
- GtkWidget *summary;
-
- GtkWidget *due_date;
- GtkWidget *start_date;
- GtkWidget *due_timezone;
- GtkWidget *start_timezone;
-
- GtkWidget *description;
-
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
-
- GtkWidget *contacts_btn;
- GtkWidget *contacts_box;
-
- GtkWidget *categories_btn;
- GtkWidget *categories;
-
- gboolean updating;
-
- /* The Corba component for selecting contacts, and the entry field
- which we place in the dialog. */
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
- GtkWidget *contacts_entry;
-};
-
-static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-
-
-static void task_page_class_init (TaskPageClass *class);
-static void task_page_init (TaskPage *tpage);
-static void task_page_destroy (GtkObject *object);
-
-static GtkWidget *task_page_get_widget (CompEditorPage *page);
-static void task_page_focus_main_widget (CompEditorPage *page);
-static void task_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void task_page_fill_component (CompEditorPage *page, CalComponent *comp);
-static void task_page_set_summary (CompEditorPage *page, const char *summary);
-static void task_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * task_page_get_type:
- *
- * Registers the #TaskPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #TaskPage class.
- **/
-GtkType
-task_page_get_type (void)
-{
- static GtkType task_page_type;
-
- if (!task_page_type) {
- static const GtkTypeInfo task_page_info = {
- "TaskPage",
- sizeof (TaskPage),
- sizeof (TaskPageClass),
- (GtkClassInitFunc) task_page_class_init,
- (GtkObjectInitFunc) task_page_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- task_page_type = gtk_type_unique (TYPE_COMP_EDITOR_PAGE,
- &task_page_info);
- }
-
- return task_page_type;
-}
-
-/* Class initialization function for the task page */
-static void
-task_page_class_init (TaskPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GtkObjectClass *object_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = task_page_get_widget;
- editor_page_class->focus_main_widget = task_page_focus_main_widget;
- editor_page_class->fill_widgets = task_page_fill_widgets;
- editor_page_class->fill_component = task_page_fill_component;
- editor_page_class->set_summary = task_page_set_summary;
- editor_page_class->set_dates = task_page_set_dates;
-
- object_class->destroy = task_page_destroy;
-}
-
-/* Object initialization function for the task page */
-static void
-task_page_init (TaskPage *tpage)
-{
- TaskPagePrivate *priv;
-
- priv = g_new0 (TaskPagePrivate, 1);
- tpage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
- priv->summary = NULL;
- priv->due_date = NULL;
- priv->start_date = NULL;
- priv->due_timezone = NULL;
- priv->start_timezone = NULL;
- priv->description = NULL;
- priv->classification_public = NULL;
- priv->classification_private = NULL;
- priv->classification_confidential = NULL;
- priv->contacts_btn = NULL;
- priv->contacts_box = NULL;
- priv->categories_btn = NULL;
- priv->categories = NULL;
-
- priv->updating = FALSE;
-
- priv->corba_select_names = CORBA_OBJECT_NIL;
- priv->contacts_entry = NULL;
-}
-
-/* Destroy handler for the task page */
-static void
-task_page_destroy (GtkObject *object)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_TASK_PAGE (object));
-
- tpage = TASK_PAGE (object);
- priv = tpage->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);
- }
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- tpage->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* get_widget handler for the task page */
-static GtkWidget *
-task_page_get_widget (CompEditorPage *page)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the task page */
-static void
-task_page_focus_main_widget (CompEditorPage *page)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
-
- gtk_widget_grab_focus (priv->summary);
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (TaskPage *tpage)
-{
- TaskPagePrivate *priv;
-
- priv = tpage->priv;
-
- /* Summary, description */
- e_dialog_editable_set (priv->summary, NULL);
- e_dialog_editable_set (priv->description, NULL);
-
- /* Start, due times */
- e_date_edit_set_time (E_DATE_EDIT (priv->start_date), 0);
- e_date_edit_set_time (E_DATE_EDIT (priv->due_date), 0);
-
- /* Classification */
- e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE, classification_map);
-
- /* Categories */
- e_dialog_editable_set (priv->categories, NULL);
-}
-
-/* Decode the radio button group for classifications */
-static CalComponentClassification
-classification_get (GtkWidget *widget)
-{
- return e_dialog_radio_get (widget, classification_map);
-}
-
-static void
-contacts_changed_cb (BonoboListener *listener,
- char *event_name,
- CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- tpage = TASK_PAGE (data);
- priv = tpage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
-}
-
-/* fill_widgets handler for the task page */
-static void
-task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- CalComponentText text;
- CalComponentDateTime d;
- CalComponentClassification cl;
- CalClientGetStatus get_tz_status;
- GSList *l;
- const char *categories;
- icaltimezone *zone;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
-
- priv->updating = TRUE;
-
- /* Clean the screen */
- clear_widgets (tpage);
-
- /* Summary, description(s) */
- cal_component_get_summary (comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
-
- cal_component_get_description_list (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 (comp, &d);
- zone = NULL;
- if (d.value) {
- struct icaltimetype *due_tt = d.value;
- e_date_edit_set_date (E_DATE_EDIT (priv->due_date),
- due_tt->year, due_tt->month,
- due_tt->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->due_date),
- due_tt->hour, due_tt->minute);
- } else {
- char *location;
-
- e_date_edit_set_time (E_DATE_EDIT (priv->due_date), -1);
-
- /* If no time is set, we use the default timezone, so the
- user usually doesn't have to set this when they set the
- date. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- }
-
- /* Note that if we are creating a new task, the timezones may not be
- on the server, so we try to get the builtin timezone with the TZID
- first. */
- if (!zone)
- zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid);
- if (!zone) {
- get_tz_status = cal_client_get_timezone (page->client, d.tzid,
- &zone);
- /* FIXME: Handle error better. */
- if (get_tz_status != CAL_CLIENT_GET_SUCCESS)
- g_warning ("Couldn't get timezone from server: %s",
- d.tzid ? d.tzid : "");
- }
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->due_timezone),
- zone);
-
- cal_component_free_datetime (&d);
-
-
- /* Start Date. */
- cal_component_get_dtstart (comp, &d);
- zone = NULL;
- if (d.value) {
- struct icaltimetype *start_tt = d.value;
- e_date_edit_set_date (E_DATE_EDIT (priv->start_date),
- start_tt->year, start_tt->month,
- start_tt->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_date),
- start_tt->hour, start_tt->minute);
- } else {
- char *location;
-
- e_date_edit_set_time (E_DATE_EDIT (priv->start_date), -1);
-
- /* If no time is set, we use the default timezone, so the
- user usually doesn't have to set this when they set the
- date. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- }
-
- if (!zone)
- zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid);
- if (!zone) {
- get_tz_status = cal_client_get_timezone (page->client, d.tzid,
- &zone);
- /* FIXME: Handle error better. */
- if (get_tz_status != CAL_CLIENT_GET_SUCCESS)
- g_warning ("Couldn't get timezone from server: %s",
- d.tzid ? d.tzid : "");
- }
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone),
- zone);
-
- cal_component_free_datetime (&d);
-
- /* Classification. */
- cal_component_get_classification (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 (comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
-
- /* Contacts */
- comp_editor_contacts_to_widget (priv->contacts_entry, comp);
-
- /* We connect the contacts changed signal here, as we have to be a bit
- more careful with it due to the use or Corba. The priv->updating
- flag won't work as we won't get the changed event immediately.
- FIXME: Unfortunately this doesn't work either. We never get the
- changed event now. */
- comp_editor_connect_contacts_changed (priv->contacts_entry,
- contacts_changed_cb, tpage);
-
-
- priv->updating = FALSE;
-}
-
-/* fill_component handler for the task page */
-static void
-task_page_fill_component (CompEditorPage *page, CalComponent *comp)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- CalComponentDateTime date;
- struct icaltimetype icaltime;
- char *cat, *str;
- gboolean date_set;
- icaltimezone *zone;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
-
- /* 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 */
-
- icaltime = icaltime_null_time ();
-
- date.value = &icaltime;
- date.tzid = NULL;
-
- /* FIXME: We should use is_date at some point. */
-
- /* Due Date. */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->due_date),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->due_date),
- &icaltime.hour,
- &icaltime.minute);
- if (date_set) {
- zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->due_timezone));
- if (zone)
- date.tzid = icaltimezone_get_tzid (zone);
- cal_component_set_due (comp, &date);
- } else {
- cal_component_set_due (comp, NULL);
- }
-
- /* Start Date. */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_date),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_date),
- &icaltime.hour,
- &icaltime.minute);
- if (date_set) {
- zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- if (zone)
- date.tzid = icaltimezone_get_tzid (zone);
- cal_component_set_dtstart (comp, &date);
- } else {
- cal_component_set_dtstart (comp, NULL);
- }
-
- /* Classification. */
- cal_component_set_classification (comp, classification_get (priv->classification_public));
-
- /* Categories */
- cat = e_dialog_editable_get (priv->categories);
- str = comp_editor_strip_categories (cat);
- if (cat)
- g_free (cat);
-
- cal_component_set_categories (comp, str);
-
- if (str)
- g_free (str);
-
- /* Contacts */
- comp_editor_contacts_to_component (priv->contacts_entry, comp);
-}
-
-/* set_summary handler for the task page */
-static void
-task_page_set_summary (CompEditorPage *page, const char *summary)
-{
- /* nothing */
-}
-
-static void
-task_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- tpage = TASK_PAGE (page);
- priv = tpage->priv;
-
- if (priv->updating)
- return;
-
- priv->updating = TRUE;
-
- priv->updating = FALSE;
-}
-
-
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (TaskPage *tpage)
-{
- TaskPagePrivate *priv;
-
- priv = tpage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("task-page");
- if (!priv->main)
- return FALSE;
-
- gtk_widget_ref (priv->main);
- gtk_widget_unparent (priv->main);
-
- priv->summary = GW ("summary");
-
- priv->due_date = GW ("due-date");
- priv->start_date = GW ("start-date");
- priv->due_timezone = GW ("due-timezone");
- priv->start_timezone = GW ("start-timezone");
-
- priv->description = GW ("description");
-
- priv->classification_public = GW ("classification-public");
- priv->classification_private = GW ("classification-private");
- priv->classification_confidential = GW ("classification-confidential");
-
- priv->contacts_btn = GW ("contacts-button");
- priv->contacts_box = GW ("contacts-box");
-
- priv->categories_btn = GW ("categories-button");
- priv->categories = GW ("categories");
-
-#undef GW
-
- return (priv->summary
- && priv->due_date
- && priv->start_date
- && priv->due_timezone
- && priv->start_timezone
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
- && priv->description
- && priv->contacts_btn
- && priv->contacts_box
- && priv->categories_btn
- && priv->categories);
-}
-
-/* Callback used when the summary changes; we emit the notification signal. */
-static void
-summary_changed_cb (GtkEditable *editable, gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- gchar *summary;
-
- tpage = TASK_PAGE (data);
- priv = tpage->priv;
-
- if (priv->updating)
- return;
-
- summary = e_dialog_editable_get (GTK_WIDGET (editable));
- comp_editor_page_notify_summary_changed (COMP_EDITOR_PAGE (tpage),
- summary);
- g_free (summary);
-}
-
-/* Callback used when the start or end date widgets change. We check that the
- * start date < end date and we set the "all day task" button as appropriate.
- */
-static void
-date_changed_cb (EDateEdit *dedit, gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- CompEditorPageDates dates;
- gboolean date_set;
- CalComponentDateTime start_dt, due_dt;
- struct icaltimetype start_tt = icaltime_null_time();
- struct icaltimetype due_tt = icaltime_null_time();
-
- tpage = TASK_PAGE (data);
- priv = tpage->priv;
-
- if (priv->updating)
- return;
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_date),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_date),
- &start_tt.hour,
- &start_tt.minute);
- if (date_set) {
- icaltimezone *zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
- start_dt.tzid = icaltimezone_get_tzid (zone);
- } else {
- start_tt = icaltime_null_time ();
- start_dt.tzid = NULL;
- }
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->due_date),
- &due_tt.year,
- &due_tt.month,
- &due_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->due_date),
- &due_tt.hour,
- &due_tt.minute);
- if (date_set) {
- icaltimezone *zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->due_timezone));
- due_dt.tzid = icaltimezone_get_tzid (zone);
- } else {
- due_tt = icaltime_null_time ();
- due_dt.tzid = NULL;
- }
-
- start_dt.value = &start_tt;
- dates.start = &start_dt;
- dates.end = NULL;
- due_dt.value = &due_tt;
- dates.due = &due_dt;
- dates.complete = NULL;
-
- /* Notify upstream */
- comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (tpage),
- &dates);
-}
-
-/* Callback used when the contacts button is clicked; we must bring up the
- * contact list dialog.
- */
-static void
-contacts_clicked_cb (GtkWidget *button, gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- tpage = TASK_PAGE (data);
- priv = tpage->priv;
-
- g_print ("In contacts_clicked_cb\n");
- comp_editor_show_contacts_dialog (priv->corba_select_names);
-
- /* FIXME: Currently we aren't getting the changed event from the
- SelectNames component correctly, so we aren't saving the event
- if just the contacts are changed. To work around that, we assume
- that if the contacts button is clicked it is changed. */
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
-}
-
-/* Callback used when the categories button is clicked; we must bring up the
- * category list dialog.
- */
-static void
-categories_clicked_cb (GtkWidget *button, gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
- GtkWidget *entry;
-
- tpage = TASK_PAGE (data);
- priv = tpage->priv;
-
- entry = priv->categories;
- e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry));
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed_cb (GtkWidget *widget, gpointer data)
-{
- TaskPage *tpage;
- TaskPagePrivate *priv;
-
- tpage = TASK_PAGE (data);
- priv = tpage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
-}
-
-/* Hooks the widget signals */
-static gboolean
-init_widgets (TaskPage *tpage)
-{
- TaskPagePrivate *priv;
- char *location;
- icaltimezone *zone;
-
- priv = tpage->priv;
-
- /* Make sure the EDateEdit widgets use our timezones to get the
- current time. */
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->start_date),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- tpage, NULL);
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->due_date),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- tpage, NULL);
-
- /* Summary */
- gtk_signal_connect (GTK_OBJECT (priv->summary), "changed",
- GTK_SIGNAL_FUNC (summary_changed_cb), tpage);
-
- /* Description - turn on word wrap. */
- gtk_text_set_word_wrap (GTK_TEXT (priv->description), TRUE);
-
- /* Dates */
- gtk_signal_connect (GTK_OBJECT (priv->start_date), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), tpage);
- gtk_signal_connect (GTK_OBJECT (priv->due_date), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), tpage);
-
- gtk_signal_connect (GTK_OBJECT (priv->due_timezone), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
- gtk_signal_connect (GTK_OBJECT (priv->start_timezone), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
-
- /* Classification */
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
- gtk_signal_connect (GTK_OBJECT (priv->classification_public),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
- gtk_signal_connect (GTK_OBJECT (priv->classification_private),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
- gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
-
- /* 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->description), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
- gtk_signal_connect (GTK_OBJECT (priv->categories), "changed",
- GTK_SIGNAL_FUNC (field_changed_cb), tpage);
-
- /* Contacts button */
- gtk_signal_connect (GTK_OBJECT (priv->contacts_btn), "clicked",
- GTK_SIGNAL_FUNC (contacts_clicked_cb), tpage);
-
- /* Categories button */
- gtk_signal_connect (GTK_OBJECT (priv->categories_btn), "clicked",
- GTK_SIGNAL_FUNC (categories_clicked_cb), tpage);
-
-
- /* Create the contacts entry, a corba control from the address book. */
- priv->corba_select_names = comp_editor_create_contacts_component ();
- if (priv->corba_select_names == CORBA_OBJECT_NIL)
- return FALSE;
-
- priv->contacts_entry = comp_editor_create_contacts_control (priv->corba_select_names);
- if (priv->contacts_entry == NULL)
- return FALSE;
-
- gtk_container_add (GTK_CONTAINER (priv->contacts_box),
- priv->contacts_entry);
-
- /* Set the default timezone, so the timezone entry may be hidden. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
- e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), zone);
- e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->due_timezone), zone);
-
- return TRUE;
-}
-
-
-
-/**
- * task_page_construct:
- * @tpage: An task page.
- *
- * Constructs an task page by loading its Glade data.
- *
- * Return value: The same object as @tpage, or NULL if the widgets could not be
- * created.
- **/
-TaskPage *
-task_page_construct (TaskPage *tpage)
-{
- TaskPagePrivate *priv;
-
- priv = tpage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/task-page.glade",
- NULL);
- if (!priv->xml) {
- g_message ("task_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (tpage)) {
- g_message ("task_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- if (!init_widgets (tpage)) {
- g_message ("event_page_construct(): "
- "Could not initialize the widgets!");
- return NULL;
- }
-
- return tpage;
-}
-
-/**
- * task_page_new:
- *
- * Creates a new task page.
- *
- * Return value: A newly-created task page, or NULL if the page could
- * not be created.
- **/
-TaskPage *
-task_page_new (void)
-{
- TaskPage *tpage;
-
- tpage = gtk_type_new (TYPE_TASK_PAGE);
- if (!task_page_construct (tpage)) {
- gtk_object_unref (GTK_OBJECT (tpage));
- return NULL;
- }
-
- return tpage;
-}
-
-GtkWidget *task_page_create_date_edit (void);
-
-GtkWidget *
-task_page_create_date_edit (void)
-{
- GtkWidget *dedit;
-
- dedit = comp_editor_new_date_edit (TRUE, TRUE, TRUE);
- e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE);
-
- return dedit;
-}
diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade
deleted file mode 100644
index 10e0180eff..0000000000
--- a/calendar/gui/dialogs/task-page.glade
+++ /dev/null
@@ -1,487 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-page</name>
- <program_name>task-page</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>task-toplevel</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>GtkVBox</class>
- <name>task-page</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>3</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_page_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 01 Jun 2001 18:59:52 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_page_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 01 Jun 2001 18:59:57 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>
- <class>Custom</class>
- <name>due-timezone</name>
- <creation_function>make_timezone_entry</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 19 Jun 2001 04:43:54 GMT</last_modification_time>
- <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>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-timezone</name>
- <creation_function>make_timezone_entry</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 19 Jun 2001 04:43:46 GMT</last_modification_time>
- <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>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label18</name>
- <label>Description:</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_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>
- <height>80</height>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </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>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>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>GtkEventBox</class>
- <name>contacts-box</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </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>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/task-page.h b/calendar/gui/dialogs/task-page.h
deleted file mode 100644
index cc56892c5b..0000000000
--- a/calendar/gui/dialogs/task-page.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Evolution calendar - Main page of the task editor dialog
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.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 TASK_PAGE_H
-#define TASK_PAGE_H
-
-#include "comp-editor-page.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_TASK_PAGE (task_page_get_type ())
-#define TASK_PAGE(obj) (GTK_CHECK_CAST ((obj), TYPE_TASK_PAGE, TaskPage))
-#define TASK_PAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_TASK_PAGE, TaskPageClass))
-#define IS_TASK_PAGE(obj) (GTK_CHECK_TYPE ((obj), TYPE_TASK_PAGE))
-#define IS_TASK_PAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), TYPE_TASK_PAGE))
-
-typedef struct _TaskPagePrivate TaskPagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- TaskPagePrivate *priv;
-} TaskPage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} TaskPageClass;
-
-GtkType task_page_get_type (void);
-TaskPage *task_page_construct (TaskPage *epage);
-TaskPage *task_page_new (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
deleted file mode 100644
index 8d8856ed2a..0000000000
--- a/calendar/gui/e-calendar-table.c
+++ /dev/null
@@ -1,1197 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors :
- * Damon Chaplin <damon@ximian.com>
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2000, Ximian, 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 <gnome.h>
-#include <gtk/gtkinvisible.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 <gal/widgets/e-popup-menu.h>
-#include <widgets/misc/e-cell-date-edit.h>
-#include "e-calendar-table.h"
-#include "calendar-config.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_cut (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_copy (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_paste (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 selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- ECalendarTable *cal_table);
-static void selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- ECalendarTable *cal_table);
-static void selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- ECalendarTable *cal_table);
-static void invisible_destroyed (GtkWidget *invisible,
- ECalendarTable *cal_table);
-static struct tm e_calendar_table_get_current_time (ECellDateEdit *ecde,
- gpointer data);
-
-
-/* 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;
-static GdkAtom clipboard_atom = GDK_NONE;
-
-
-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
-
- /* clipboard atom */
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-}
-
-/* Compares two priority values, which may not exist */
-static int
-compare_priorities (int *a, int *b)
-{
- if (a && b) {
- if (*a < *b)
- return -1;
- else if (*a > *b)
- return 1;
- else
- return 0;
- } else if (a)
- return -1;
- else if (b)
- return 1;
- else
- return 0;
-}
-
-/* Comparison function for the task-sort column. Sorts by due date and then by
- * priority.
- *
- * FIXME: Does this ever get called?? It doesn't seem to.
- * I specified that the table should be sorted by this column, but it still
- * never calls this function.
- * Also, this assumes it is passed pointers to CalComponents, but I think it
- * may just be passed pointers to the 2 cell values.
- */
-static gint
-task_compare_cb (gconstpointer a, gconstpointer b)
-{
- CalComponent *ca, *cb;
- CalComponentDateTime due_a, due_b;
- int *prio_a, *prio_b;
- int retval;
-
- g_print ("In task_compare_cb\n");
-
- ca = CAL_COMPONENT (a);
- cb = CAL_COMPONENT (b);
-
- cal_component_get_due (ca, &due_a);
- cal_component_get_due (cb, &due_b);
- cal_component_get_priority (ca, &prio_a);
- cal_component_get_priority (cb, &prio_b);
-
- if (due_a.value && due_b.value) {
- int v;
-
- /* FIXME: TIMEZONES. But currently we have no way to get the
- CalClient, so we can't get the timezone. */
- v = icaltime_compare (*due_a.value, *due_b.value);
-
- if (v == 0)
- retval = compare_priorities (prio_a, prio_b);
- else
- retval = v;
- } else if (due_a.value)
- retval = -1;
- else if (due_b.value)
- retval = 1;
- else
- retval = compare_priorities (prio_a, prio_b);
-
- cal_component_free_datetime (&due_a);
- cal_component_free_datetime (&due_b);
-
- if (prio_a)
- cal_component_free_priority (prio_a);
-
- if (prio_b)
- cal_component_free_priority (prio_b);
-
- return retval;
-}
-
-static gint
-date_compare_cb (gconstpointer a, gconstpointer b)
-{
- const char *value1 = a, *value2 = b;
-
- g_print ("In date_compare_cb '%s' '%s'\n", value1, value2);
-
- return 0;
-}
-
-static gint
-percent_compare_cb (gconstpointer a, gconstpointer b)
-{
- const char *value1 = a, *value2 = b;
-
- /* FIXME: Currently this isn't working as the ETableSorter caches
- all the values in the table before sorting, but our get_value()
- function returns a pointer to a static buffer. So all the cached
- pointers point to the same buffer. */
-
- g_print ("In percent_compare_cb '%s' '%s'\n", value1, value2);
-
- return 0;
-}
-
-static gint
-priority_compare_cb (gconstpointer a, gconstpointer b)
-{
- int priority1, priority2;
-
- priority1 = cal_util_priority_from_string ((const char*) a);
- priority2 = cal_util_priority_from_string ((const char*) b);
-
- /* We change undefined priorities so they appear after 'Low'. */
- if (priority1 <= 0)
- priority1 = 10;
- if (priority2 <= 0)
- priority2 = 10;
-
- /* We'll just use the ordering of the priority values. */
- if (priority1 < priority2)
- return -1;
- else if (priority1 > priority2)
- return 1;
- else
- return 0;
-}
-
-static void
-e_calendar_table_init (ECalendarTable *cal_table)
-{
- GtkWidget *table;
- ETable *e_table;
- ECell *cell, *popup_cell;
- ETableExtras *extras;
- gint i;
- GdkPixbuf *pixbuf;
- GList *strings;
-
- /* Create the model */
-
- cal_table->model = calendar_model_new ();
-
- /* 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);
-
- e_cell_date_edit_set_get_time_callback (E_CELL_DATE_EDIT (popup_cell),
- e_calendar_table_get_current_time,
- cal_table, NULL);
-
-
- /*
- * 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, _("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, _("Free"));
- strings = g_list_append (strings, _("Busy"));
- 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);
-
- /* Task sorting field */
- /* FIXME: This column should not be displayed, but ETableExtras requires
- * its shit to be visible columns listed in the XML spec.
- */
- e_table_extras_add_compare (extras, "task-sort", task_compare_cb);
-
- e_table_extras_add_compare (extras, "date-compare",
- date_compare_cb);
- e_table_extras_add_compare (extras, "percent-compare",
- percent_compare_cb);
- e_table_extras_add_compare (extras, "priority-compare",
- priority_compare_cb);
-
- /* 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_from_spec_file (E_TABLE_MODEL (cal_table->model),
- extras,
- EVOLUTION_ETSPECDIR "/e-calendar-table.etspec",
- 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);
-
- /* Set up the invisible widget for the clipboard selections */
- cal_table->invisible = gtk_invisible_new ();
- gtk_selection_add_target (cal_table->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- 0);
- gtk_signal_connect (GTK_OBJECT (cal_table->invisible),
- "selection_get",
- GTK_SIGNAL_FUNC (selection_get),
- (gpointer) cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->invisible),
- "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear_event),
- (gpointer) cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->invisible),
- "selection_received",
- GTK_SIGNAL_FUNC (selection_received),
- (gpointer) cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->invisible),
- "destroy",
- GTK_SIGNAL_FUNC (invisible_destroyed),
- (gpointer) cal_table);
- cal_table->clipboard_selection = NULL;
-}
-
-
-/**
- * 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;
-
- if (cal_table->invisible)
- gtk_widget_destroy (cal_table->invisible);
- if (cal_table->clipboard_selection) {
- g_free (cal_table->clipboard_selection);
- cal_table->clipboard_selection = NULL;
- }
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-/**
- * e_calendar_table_get_table:
- * @cal_table: A calendar table.
- *
- * Queries the #ETable widget that the calendar table is using.
- *
- * Return value: The #ETable widget that the calendar table uses to display its
- * data.
- **/
-ETable *
-e_calendar_table_get_table (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 e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
-}
-
-/* Used from e_table_selected_row_foreach(); puts the selected row number in an
- * int pointed to by the closure data.
- */
-static void
-get_selected_row_cb (int model_row, gpointer data)
-{
- int *row;
-
- row = data;
- *row = model_row;
-}
-
-/* Returns the component that is selected in the table; only works if there is
- * one and only one selected row.
- */
-static CalComponent *
-get_selected_comp (ECalendarTable *cal_table)
-{
- ETable *etable;
- int row;
-
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
- g_assert (e_table_selected_count (etable) == 1);
-
- row = -1;
- e_table_selected_row_foreach (etable,
- get_selected_row_cb,
- &row);
- g_assert (row != -1);
-
- return calendar_model_get_component (cal_table->model, row);
-}
-
-struct get_selected_uids_closure {
- ECalendarTable *cal_table;
- GSList *uids;
-};
-
-/* Used from e_table_selected_row_foreach(), builds a list of the selected UIDs */
-static void
-add_uid_cb (int model_row, gpointer data)
-{
- struct get_selected_uids_closure *closure;
- CalComponent *comp;
- const char *uid;
-
- closure = data;
-
- comp = calendar_model_get_component (closure->cal_table->model, model_row);
- cal_component_get_uid (comp, &uid);
-
- closure->uids = g_slist_prepend (closure->uids, (char *) uid);
-}
-
-static GSList *
-get_selected_uids (ECalendarTable *cal_table)
-{
- struct get_selected_uids_closure closure;
- ETable *etable;
-
- closure.cal_table = cal_table;
- closure.uids = NULL;
-
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
- e_table_selected_row_foreach (etable, add_uid_cb, &closure);
-
- return closure.uids;
-}
-
-/* Deletes all of the selected components in the table */
-static void
-delete_selected_components (ECalendarTable *cal_table)
-{
- CalClient *client;
- GSList *uids, *l;
-
- uids = get_selected_uids (cal_table);
-
- client = calendar_model_get_cal_client (cal_table->model);
-
- for (l = uids; l; l = l->next) {
- const char *uid;
-
- uid = l->data;
-
- /* We don't check the return value; FALSE can mean the object
- * was not in the server anyways.
- */
- cal_client_remove_object (client, uid);
- }
-
- g_slist_free (uids);
-}
-
-/**
- * e_calendar_table_delete_selected:
- * @cal_table: A calendar table.
- *
- * Deletes the selected components in the table; asks the user first.
- **/
-void
-e_calendar_table_delete_selected (ECalendarTable *cal_table)
-{
- ETable *etable;
- int n_selected;
- CalComponent *comp;
-
- g_return_if_fail (cal_table != NULL);
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
-
- n_selected = e_table_selected_count (etable);
- g_assert (n_selected > 0);
-
- if (n_selected == 1)
- comp = get_selected_comp (cal_table);
- else
- comp = NULL;
-
- /* FIXME: this may be something other than a TODO component */
-
- if (delete_component_dialog (comp, n_selected, CAL_COMPONENT_TODO, GTK_WIDGET (cal_table)))
- delete_selected_components (cal_table);
-}
-
-/**
- * e_calendar_table_cut_clipboard:
- * @cal_table: A calendar table.
- *
- * Cuts selected tasks in the given calendar table
- */
-void
-e_calendar_table_cut_clipboard (ECalendarTable *cal_table)
-{
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- e_calendar_table_copy_clipboard (cal_table);
- delete_selected_components (cal_table);
-}
-
-/* callback for e_table_selected_row_foreach */
-static void
-copy_row_cb (int model_row, gpointer data)
-{
- ECalendarTable *cal_table;
- CalComponent *comp;
- gchar *comp_str;
- icalcomponent *child;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- g_return_if_fail (cal_table->tmp_vcal != NULL);
-
- comp = calendar_model_get_component (cal_table->model, model_row);
- if (!comp)
- return;
-
- /* add the new component to the VCALENDAR component */
- comp_str = cal_component_get_as_string (comp);
- child = icalparser_parse_string (comp_str);
- if (child) {
- icalcomponent_add_component (cal_table->tmp_vcal,
- icalcomponent_new_clone (child));
- icalcomponent_free (child);
- }
-
- g_free (comp_str);
-}
-
-/**
- * e_calendar_table_copy_clipboard:
- * @cal_table: A calendar table.
- *
- * Copies selected tasks into the clipboard
- */
-void
-e_calendar_table_copy_clipboard (ECalendarTable *cal_table)
-{
- ETable *etable;
- char *comp_str;
-
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- if (cal_table->clipboard_selection) {
- g_free (cal_table->clipboard_selection);
- cal_table->clipboard_selection = NULL;
- }
-
- /* create temporary VCALENDAR object */
- cal_table->tmp_vcal = cal_util_new_top_level ();
-
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
- e_table_selected_row_foreach (etable, copy_row_cb, cal_table);
-
- comp_str = icalcomponent_as_ical_string (cal_table->tmp_vcal);
- cal_table->clipboard_selection = g_strdup (comp_str);
- icalcomponent_free (cal_table->tmp_vcal);
- cal_table->tmp_vcal = NULL;
-
- gtk_selection_owner_set (cal_table->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-/**
- * e_calendar_table_paste_clipboard:
- * @cal_table: A calendar table.
- *
- * Pastes tasks currently in the clipboard into the given calendar table
- */
-void
-e_calendar_table_paste_clipboard (ECalendarTable *cal_table)
-{
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- gtk_selection_convert (cal_table->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-/* Opens a task in the task editor */
-static void
-open_task (ECalendarTable *cal_table, CalComponent *comp)
-{
- TaskEditor *tedit;
-
- tedit = task_editor_new ();
- comp_editor_set_cal_client (COMP_EDITOR (tedit), calendar_model_get_cal_client (cal_table->model));
- comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- comp_editor_focus (COMP_EDITOR (tedit));
-}
-
-/* Opens the task in the specified row */
-static void
-open_task_by_row (ECalendarTable *cal_table, int row)
-{
- CalComponent *comp;
-
- comp = calendar_model_get_component (cal_table->model, row);
- open_task (cal_table, comp);
-}
-
-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");
- open_task_by_row (cal_table, row);
-}
-
-/* Used from e_table_selected_row_foreach() */
-static void
-mark_row_complete_cb (int model_row, gpointer data)
-{
- ECalendarTable *cal_table;
-
- cal_table = E_CALENDAR_TABLE (data);
- calendar_model_mark_task_complete (cal_table->model, model_row);
-}
-
-/* Callback used for the "mark tasks as complete" menu item */
-static void
-mark_as_complete_cb (GtkWidget *menuitem, gpointer data)
-{
- ECalendarTable *cal_table;
- ETable *etable;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
- e_table_selected_row_foreach (etable, mark_row_complete_cb, cal_table);
-}
-
-/* Callback for the "delete tasks" menu item */
-static void
-delete_cb (GtkWidget *menuitem, gpointer data)
-{
- ECalendarTable *cal_table;
-
- cal_table = E_CALENDAR_TABLE (data);
- e_calendar_table_delete_selected (cal_table);
-}
-
-
-enum {
- MASK_SINGLE = 1 << 0, /* For commands that work on 1 task. */
- MASK_MULTIPLE = 1 << 1, /* For commands for multiple tasks. */
-};
-
-
-static EPopupMenu tasks_popup_menu [] = {
- { N_("_Open"), NULL,
- e_calendar_table_on_open_task, NULL, MASK_SINGLE },
- { "", NULL, NULL, NULL, MASK_SINGLE },
-
- { N_("C_ut"), NULL,
- e_calendar_table_on_cut, NULL, 0 },
- { N_("_Copy"), NULL,
- e_calendar_table_on_copy, NULL, 0 },
- { N_("_Paste"), NULL,
- e_calendar_table_on_paste, NULL, 0 },
-
- { "", NULL, NULL, NULL, 0 },
-
- { N_("_Mark as Complete"), NULL,
- mark_as_complete_cb, NULL, MASK_SINGLE },
- { N_("_Delete this Task"), NULL,
- delete_cb, NULL, MASK_SINGLE },
-
- { N_("_Mark Tasks as Complete"), NULL,
- mark_as_complete_cb, NULL, MASK_MULTIPLE },
- { N_("_Delete Selected Tasks"), NULL,
- delete_cb, NULL, MASK_MULTIPLE },
-
- { NULL, NULL, NULL, NULL, 0 }
-};
-
-static gint
-e_calendar_table_on_right_click (ETable *table,
- gint row,
- gint col,
- GdkEventButton *event,
- ECalendarTable *cal_table)
-{
- int n_selected;
- int hide_mask = 0;
- int disable_mask = 0;
-
- n_selected = e_table_selected_count (table);
- g_assert (n_selected > 0);
-
- if (n_selected == 1)
- hide_mask = MASK_MULTIPLE;
- else
- hide_mask = MASK_SINGLE;
-
- e_popup_menu_run (tasks_popup_menu, (GdkEvent *) event,
- disable_mask, hide_mask, cal_table);
-
- return TRUE;
-}
-
-
-static void
-e_calendar_table_on_open_task (GtkWidget *menuitem,
- gpointer data)
-{
- ECalendarTable *cal_table;
- CalComponent *comp;
-
- cal_table = E_CALENDAR_TABLE (data);
-
- comp = get_selected_comp (cal_table);
- open_task (cal_table, comp);
-}
-
-static void
-e_calendar_table_on_cut (GtkWidget *menuitem, gpointer data)
-{
- ECalendarTable *cal_table;
-
- cal_table = E_CALENDAR_TABLE (data);
- e_calendar_table_cut_clipboard (cal_table);
-}
-
-static void
-e_calendar_table_on_copy (GtkWidget *menuitem, gpointer data)
-{
- ECalendarTable *cal_table;
-
- cal_table = E_CALENDAR_TABLE (data);
- e_calendar_table_copy_clipboard (cal_table);
-}
-
-static void
-e_calendar_table_on_paste (GtkWidget *menuitem, gpointer data)
-{
- ECalendarTable *cal_table;
-
- cal_table = E_CALENDAR_TABLE (data);
- e_calendar_table_paste_clipboard (cal_table);
-}
-
-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_cb (NULL, cal_table);
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* 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);
-}
-
-
-static void
-invisible_destroyed (GtkWidget *invisible, ECalendarTable *cal_table)
-{
- cal_table->invisible = NULL;
-}
-
-static void
-selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- ECalendarTable *cal_table)
-{
- if (cal_table->clipboard_selection != NULL) {
- gtk_selection_data_set (selection_data,
- GDK_SELECTION_TYPE_STRING,
- 8,
- cal_table->clipboard_selection,
- strlen (cal_table->clipboard_selection));
- }
-}
-
-static void
-selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- ECalendarTable *cal_table)
-{
- if (cal_table->clipboard_selection != NULL) {
- g_free (cal_table->clipboard_selection);
- cal_table->clipboard_selection = NULL;
- }
-}
-
-static void
-selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- ECalendarTable *cal_table)
-{
- char *comp_str;
- icalcomponent *icalcomp;
- char *uid;
- CalComponent *comp;
- icalcomponent_kind kind;
-
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- if (selection_data->length < 0 ||
- selection_data->type != GDK_SELECTION_TYPE_STRING) {
- return;
- }
-
- comp_str = (char *) selection_data->data;
- icalcomp = icalparser_parse_string ((const char *) comp_str);
- if (!icalcomp)
- return;
-
- /* check the type of the component */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT &&
- kind != ICAL_VEVENT_COMPONENT &&
- kind != ICAL_VTODO_COMPONENT &&
- kind != ICAL_VJOURNAL_COMPONENT) {
- return;
- }
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- icalcomponent_kind child_kind;
- icalcomponent *subcomp;
- icalcomponent *vcal_comp;
-
- vcal_comp = icalcomp;
- subcomp = icalcomponent_get_first_component (
- vcal_comp, ICAL_ANY_COMPONENT);
- while (subcomp) {
- child_kind = icalcomponent_isa (subcomp);
- if (child_kind == ICAL_VEVENT_COMPONENT ||
- child_kind == ICAL_VTODO_COMPONENT ||
- child_kind == ICAL_VJOURNAL_COMPONENT) {
- CalComponent *tmp_comp;
-
- uid = cal_component_gen_uid ();
- tmp_comp = cal_component_new ();
- cal_component_set_icalcomponent (
- tmp_comp, icalcomponent_new_clone (subcomp));
- cal_component_set_uid (tmp_comp, uid);
-
- cal_client_update_object (
- calendar_model_get_cal_client (cal_table->model),
- tmp_comp);
- free (uid);
- gtk_object_unref (GTK_OBJECT (tmp_comp));
- }
- subcomp = icalcomponent_get_next_component (
- vcal_comp, ICAL_ANY_COMPONENT);
- }
- }
- else {
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
- uid = cal_component_gen_uid ();
- cal_component_set_uid (comp, (const char *) uid);
- free (uid);
-
- cal_client_update_object (
- calendar_model_get_cal_client (cal_table->model),
- comp);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-}
-
-
-/* Returns the current time, for the ECellDateEdit items.
- FIXME: Should probably use the timezone of the item rather than the
- current timezone, though that may be difficult to get from here. */
-static struct tm
-e_calendar_table_get_current_time (ECellDateEdit *ecde, gpointer data)
-{
- char *location;
- icaltimezone *zone;
- struct tm tmp_tm = { 0 };
- struct icaltimetype tt;
-
- /* Get the current timezone. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
-
- tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone);
-
- /* Now copy it to the struct tm and return it. */
- tmp_tm.tm_year = tt.year - 1900;
- tmp_tm.tm_mon = tt.month - 1;
- tmp_tm.tm_mday = tt.day;
- tmp_tm.tm_hour = tt.hour;
- tmp_tm.tm_min = tt.minute;
- tmp_tm.tm_sec = tt.second;
- tmp_tm.tm_isdst = -1;
-
- return tmp_tm;
-}
-
-
-#ifdef TRANSLATORS_ONLY
-
-static char *test[] = {
- N_("Click to add a task")
-};
-
-#endif
diff --git a/calendar/gui/e-calendar-table.etspec b/calendar/gui/e-calendar-table.etspec
deleted file mode 100644
index f0f717c006..0000000000
--- a/calendar/gui/e-calendar-table.etspec
+++ /dev/null
@@ -1,26 +0,0 @@
-<ETableSpecification click-to-add="true" _click-to-add-message="Click 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="date-compare"/>
- <ETableColumn model_col= "3" _title="End Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare"/>
- <ETableColumn model_col= "4" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare"/>
- <ETableColumn model_col= "5" _title="Due Date" expansion="2.0" minimum_width="10" resizable="true" cell="dateedit" compare="date-compare"/>
- <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="percent-compare"/>
- <ETableColumn model_col= "8" _title="Priority" expansion="1.0" minimum_width="10" resizable="true" cell="priority" compare="priority-compare"/>
- <ETableColumn model_col= "9" _title="Summary" expansion="3.0" minimum_width="10" resizable="true" cell="calstring" compare="string"/>
- <ETableColumn model_col="10" _title="Show Time As" 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"/>
- <ETableColumn model_col="19" _title="Task sort" cell="task-sort" compare="task-sort"/>
-
- <ETableState>
- <column source="13"/>
- <column source="14"/>
- <column source= "9"/>
- <grouping></grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/calendar/gui/e-calendar-table.h b/calendar/gui/e-calendar-table.h
deleted file mode 100644
index c7e83e5d80..0000000000
--- a/calendar/gui/e-calendar-table.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Ximian, 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 <gal/e-table/e-table-scrolled.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.
- */
-
-
-#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;
-
-
-struct _ECalendarTable
-{
- GtkTable table;
-
- /* The model that we use */
- CalendarModel *model;
-
- GtkWidget *etable;
-
- /* The ECell used to view & edit dates. */
- ECellDateEdit *dates_cell;
-
- /* The invisible widget used for cut/copy/paste */
- GtkWidget *invisible;
- gchar *clipboard_selection;
- icalcomponent *tmp_vcal;
-};
-
-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);
-
-ETable *e_calendar_table_get_table (ECalendarTable *cal_table);
-
-void e_calendar_table_delete_selected (ECalendarTable *cal_table);
-
-/* Clipboard related functions */
-void e_calendar_table_cut_clipboard (ECalendarTable *cal_table);
-void e_calendar_table_copy_clipboard (ECalendarTable *cal_table);
-void e_calendar_table_paste_clipboard (ECalendarTable *cal_table);
-
-/* 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);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_CALENDAR_TABLE_H_ */
diff --git a/calendar/gui/e-day-view-layout.c b/calendar/gui/e-day-view-layout.c
deleted file mode 100644
index 67527b0feb..0000000000
--- a/calendar/gui/e-day-view-layout.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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
- */
-
-/*
- * Lays out events for the Day & Work-Week views of the calendar. It is also
- * used for printing.
- */
-
-#include <config.h>
-
-#include "e-day-view-layout.h"
-
-static void e_day_view_layout_long_event (EDayViewEvent *event,
- guint8 *grid,
- gint days_shown,
- time_t *day_starts,
- gint *rows_in_top_display);
-
-static void e_day_view_layout_day_event (EDayViewEvent *event,
- guint8 *grid,
- guint16 *group_starts,
- gint8 *cols_per_row,
- gint rows,
- gint mins_per_row);
-static void e_day_view_expand_day_event (EDayViewEvent *event,
- guint8 *grid,
- gint8 *cols_per_row,
- gint mins_per_row);
-static void e_day_view_recalc_cols_per_row (gint rows,
- gint8 *cols_per_row,
- guint16 *group_starts);
-
-
-void
-e_day_view_layout_long_events (GArray *events,
- gint days_shown,
- time_t *day_starts,
- gint *rows_in_top_display)
-{
- EDayViewEvent *event;
- gint event_num;
- 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, 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. */
- *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 < events->len; event_num++) {
- event = &g_array_index (events, EDayViewEvent, event_num);
- e_day_view_layout_long_event (event, grid,
- days_shown, day_starts,
- rows_in_top_display);
- }
-
- /* Free the grid. */
- g_free (grid);
-}
-
-
-static void
-e_day_view_layout_long_event (EDayViewEvent *event,
- guint8 *grid,
- gint days_shown,
- time_t *day_starts,
- gint *rows_in_top_display)
-{
- gint start_day, end_day, free_row, day, row;
-
- event->num_columns = 0;
-
- if (!e_day_view_find_long_event_days (event,
- days_shown, day_starts,
- &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. */
- *rows_in_top_display = MAX (*rows_in_top_display, free_row + 1);
-}
-
-
-void
-e_day_view_layout_day_events (GArray *events,
- gint rows,
- gint mins_per_row,
- gint8 *cols_per_row)
-{
- 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 < rows; row++) {
- cols_per_row[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, 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 < events->len; event_num++) {
- event = &g_array_index (events, EDayViewEvent, event_num);
-
- e_day_view_layout_day_event (event, grid, group_starts,
- cols_per_row, rows, mins_per_row);
- }
-
- /* Recalculate the number of columns needed in each row. */
- e_day_view_recalc_cols_per_row (rows, cols_per_row, group_starts);
-
- /* Iterate over the events again, trying to expand events horizontally
- if there is enough space. */
- for (event_num = 0; event_num < events->len; event_num++) {
- event = &g_array_index (events, EDayViewEvent, event_num);
- e_day_view_expand_day_event (event, grid, cols_per_row,
- mins_per_row);
- }
-
- /* 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 (EDayViewEvent *event,
- guint8 *grid,
- guint16 *group_starts,
- gint8 *cols_per_row,
- gint rows,
- gint mins_per_row)
-{
- gint start_row, end_row, free_col, col, row, group_start;
-
- start_row = event->start_minute / mins_per_row;
- end_row = (event->end_minute - 1) / mins_per_row;
- if (end_row < start_row)
- end_row = start_row;
-
- event->num_columns = 0;
-
- /* If the event can't currently be seen, just return. */
- if (start_row >= rows || end_row < 0)
- return;
-
- /* Make sure we don't go outside the visible times. */
- start_row = CLAMP (start_row, 0, rows - 1);
- end_row = CLAMP (end_row, 0, 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;
- cols_per_row[row]++;
- group_starts[row] = group_start;
- }
-
- /* If any following rows should be in the same group, add them. */
- for (row = end_row + 1; row < 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 (gint rows,
- gint8 *cols_per_row,
- guint16 *group_starts)
-{
- gint start_row = 0, row, next_start_row, max_events;
-
- while (start_row < rows) {
- max_events = 0;
- for (row = start_row; row < rows && group_starts[row] == start_row; row++)
- max_events = MAX (max_events, cols_per_row[row]);
-
- next_start_row = row;
-
- for (row = start_row; row < next_start_row; row++)
- cols_per_row[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 (EDayViewEvent *event,
- guint8 *grid,
- gint8 *cols_per_row,
- gint mins_per_row)
-{
- gint start_row, end_row, col, row;
- gboolean clashed;
-
- start_row = event->start_minute / mins_per_row;
- end_row = (event->end_minute - 1) / mins_per_row;
- if (end_row < start_row)
- end_row = start_row;
-
- /* Try each column until we find a free one. */
- clashed = FALSE;
- for (col = event->start_row_or_col + 1; col < cols_per_row[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++;
- }
-}
-
-
-/* Find the start and end days for the event. */
-gboolean
-e_day_view_find_long_event_days (EDayViewEvent *event,
- gint days_shown,
- time_t *day_starts,
- gint *start_day_return,
- gint *end_day_return)
-{
- gint day, start_day, end_day;
-
- start_day = -1;
- end_day = -1;
-
- for (day = 0; day < days_shown; day++) {
- if (start_day == -1
- && event->start < day_starts[day + 1])
- start_day = day;
- if (event->end > day_starts[day])
- end_day = day;
- }
-
- /* Sanity check. */
- if (start_day < 0 || start_day >= days_shown
- || end_day < 0 || end_day >= 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;
-}
-
-
diff --git a/calendar/gui/e-day-view-layout.h b/calendar/gui/e-day-view-layout.h
deleted file mode 100644
index 353d024e3c..0000000000
--- a/calendar/gui/e-day-view-layout.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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_DAY_VIEW_LAYOUT_H_
-#define _E_DAY_VIEW_LAYOUT_H_
-
-#include "e-day-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* I've split these functions away from EDayView so we can use them for
- printing. */
-
-void e_day_view_layout_long_events (GArray *events,
- gint days_shown,
- time_t *day_starts,
- gint *rows_in_top_display);
-
-
-void e_day_view_layout_day_events (GArray *events,
- gint rows,
- gint mins_per_row,
- gint8 *cols_per_row);
-
-gboolean e_day_view_find_long_event_days (EDayViewEvent *event,
- gint days_shown,
- time_t *day_starts,
- gint *start_day,
- gint *end_day);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_DAY_VIEW_LAYOUT_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 eb27595bee..0000000000
--- a/calendar/gui/e-day-view-main-item.c
+++ /dev/null
@@ -1,757 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Ximian, 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-util/e-categories-config.h"
-#include "e-day-view-layout.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 icaltimetype day_start_tt;
- gint weekday;
-
-#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_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE, day_view->zone);
- weekday = icaltime_day_of_week (day_start_tt) - 1;
-
- work_day = day_view->working_days & (1 << weekday);
-
- 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;
- CalComponentTransparency transparency;
-
- 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);
-
- /* If the event is TRANSPARENT, skip it. */
- cal_component_get_transparency (event->comp, &transparency);
- if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT)
- continue;
-
- /* 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;
- CalComponentTransparency transparency;
-
- 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 the event is TRANSPARENT, skip it. */
- cal_component_get_transparency (event->comp, &transparency);
- if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT)
- continue;
-
- if (!e_day_view_find_long_event_days (event,
- day_view->days_shown,
- day_view->day_starts,
- &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, draw_timezone_icon;
- GSList *categories_list, *elem;
- CalComponentTransparency transparency;
-
- 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 1
- 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;
- }
-
- /* Only fill it in if the event isn't TRANSPARENT. */
- cal_component_get_transparency (event->comp, &transparency);
- if (transparency != CAL_COMPONENT_TRANSP_TRANSPARENT) {
- 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;
- draw_timezone_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 the DTSTART or DTEND are in a different timezone to our current
- timezone, we display the timezone icon. */
- if (event->different_timezone) {
- draw_timezone_icon = TRUE;
- num_icons++;
- }
-
-
- cal_component_get_categories_list (comp, &categories_list);
- num_icons += g_slist_length (categories_list);
-
- 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));
-
- icon_x += icon_x_inc;
- icon_y += icon_y_inc;
- }
-
- if (draw_timezone_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->timezone_mask);
- gdk_draw_pixmap (drawable, gc,
- day_view->timezone_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;
- }
-
- /* draw categories icons */
- for (elem = categories_list; elem; elem = elem->next) {
- char *category;
- GdkPixmap *pixmap = NULL;
- GdkBitmap *mask = NULL;
-
- category = (char *) elem->data;
- e_categories_config_get_icon_for (category, &pixmap, &mask);
- if (pixmap == NULL)
- continue;
-
- 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);
- if (mask != NULL)
- gdk_gc_set_clip_mask (gc, mask);
- gdk_draw_pixmap (drawable, gc,
- pixmap,
- 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_pixmap_unref (pixmap);
- if (mask != NULL)
- gdk_bitmap_unref (mask);
-
- icon_x += icon_x_inc;
- icon_y += icon_y_inc;
- }
-
- gdk_gc_set_clip_mask (gc, NULL);
- }
-
- /* free memory */
- cal_component_free_categories_list (categories_list);
-}
-
-
-/* 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 9a57392870..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, Ximian, 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 62afbf2407..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, Ximian, 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 54b5a14f4c..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, Ximian, 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 f2b9379829..0000000000
--- a/calendar/gui/e-day-view-top-item.c
+++ /dev/null
@@ -1,696 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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
- */
-
-/*
- * 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-util/e-categories-config.h"
-#include "cal-util/timeutil.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 = { 0 };
- struct icaltimetype day_start_tt;
-
-#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 - x, 1 - y,
- canvas_width - 2 - x, 1 - y);
- gdk_draw_line (drawable, light_gc,
- left_edge - x, 2 - y,
- left_edge - x, item_height - 2 - y);
- gdk_draw_line (drawable, dark_gc,
- left_edge - 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_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE, day_view->zone);
- day_start.tm_year = day_start_tt.year - 1900;
- day_start.tm_mon = day_start_tt.month - 1;
- day_start.tm_mday = day_start_tt.day;
- day_start.tm_isdst = -1;
-
- day_start.tm_wday = time_day_of_week (day_start_tt.day,
- day_start_tt.month - 1,
- day_start_tt.year);
-
- 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;
- GSList *categories_list, *elem;
-
- 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 - E_DAY_VIEW_LONG_EVENT_ICON_R_PAD
- - 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;
- }
-
- /* draw categories icons */
- cal_component_get_categories_list (comp, &categories_list);
- for (elem = categories_list; elem; elem = elem->next) {
- char *category;
- GdkPixmap *pixmap = NULL;
- GdkBitmap *mask = NULL;
-
- category = (char *) elem->data;
- e_categories_config_get_icon_for (category, &pixmap, &mask);
- if (pixmap == NULL)
- continue;
-
- if (icon_x <= max_icon_x) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- if (mask != NULL)
- gdk_gc_set_clip_mask (gc, mask);
- gdk_draw_pixmap (drawable, gc,
- pixmap,
- 0, 0, icon_x, icon_y,
- E_DAY_VIEW_ICON_WIDTH,
- E_DAY_VIEW_ICON_HEIGHT);
- icon_x -= icon_x_inc;
- }
-
- gdk_pixmap_unref (pixmap);
- if (mask != NULL)
- gdk_bitmap_unref (mask);
- }
-
- cal_component_free_categories_list (categories_list);
-
- 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 3fed29aebb..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, Ximian, 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 77343b4763..0000000000
--- a/calendar/gui/e-day-view.c
+++ /dev/null
@@ -1,7027 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors :
- * Damon Chaplin <damon@ximian.com>
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * 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
- */
-
-/*
- * 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/gtkinvisible.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 <gal/widgets/e-unicode.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-day-view-time-item.h"
-#include "e-day-view-top-item.h"
-#include "e-day-view-layout.h"
-#include "e-day-view-main-item.h"
-
-/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/timezone-16.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
-
-/* The timeout before we do a layout, so we don't do a layout for each event
- we get from the server. */
-#define E_DAY_VIEW_LAYOUT_TIMEOUT 100
-
-
-/* Signal IDs */
-enum {
- SELECTION_CHANGED,
- LAST_SIGNAL
-};
-static guint e_day_view_signals[LAST_SIGNAL] = { 0 };
-
-
-/* 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_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_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 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_cut (GtkWidget *widget, gpointer data);
-static void e_day_view_on_copy (GtkWidget *widget, gpointer data);
-static void e_day_view_on_paste (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 void selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- EDayView *day_view);
-static void selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- EDayView *day_view);
-static void selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- EDayView *day_view);
-static void invisible_destroyed (GtkWidget *invisible, EDayView *day_view);
-
-static void e_day_view_queue_layout (EDayView *day_view);
-static void e_day_view_cancel_layout (EDayView *day_view);
-static gboolean e_day_view_layout_timeout_cb (gpointer data);
-
-
-static GtkTableClass *parent_class;
-static GdkAtom clipboard_atom = GDK_NONE;
-
-
-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;
-
- e_day_view_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EDayViewClass, selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_day_view_signals, LAST_SIGNAL);
-
- /* 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;
-
- class->selection_changed = NULL;
-
- /* clipboard atom */
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-}
-
-
-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;
-
- day_view->layout_timeout_id = 0;
-
- 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->zone = NULL;
-
- 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;
-
- day_view->default_category = NULL;
-
- /* 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 | GDK_ACTION_ASK);
- gtk_drag_dest_set (day_view->main_canvas,
- GTK_DEST_DEFAULT_ALL,
- target_table, n_targets,
- GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
-
- /* Set up the invisible widget for the clipboard selections */
- day_view->invisible = gtk_invisible_new ();
- gtk_selection_add_target (day_view->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- 0);
- gtk_signal_connect (GTK_OBJECT (day_view->invisible),
- "selection_get",
- GTK_SIGNAL_FUNC (selection_get),
- (gpointer) day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->invisible),
- "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear_event),
- (gpointer) day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->invisible),
- "selection_received",
- GTK_SIGNAL_FUNC (selection_received),
- (gpointer) day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->invisible),
- "destroy",
- GTK_SIGNAL_FUNC (invisible_destroyed),
- (gpointer) day_view);
- day_view->clipboard_selection = NULL;
-}
-
-
-/* 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_cancel_layout (day_view);
-
- 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);
- day_view->large_font = NULL;
- }
-
- if (day_view->default_category) {
- g_free (day_view->default_category);
- day_view->default_category = NULL;
- }
-
- 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);
- day_view->long_events = NULL;
- for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
- g_array_free (day_view->events[day], TRUE);
- day_view->events[day] = NULL;
- }
-
- if (day_view->invisible)
- gtk_widget_destroy (day_view->invisible);
- if (day_view->clipboard_selection)
- g_free (day_view->clipboard_selection);
-
- 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 = 0x8000;
- day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].green = 0x8000;
- day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].blue = 0x8000;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS].red = 0x8000;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS].green = 0x8000;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS].blue = 0x8000;
-
- 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);
- day_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->timezone_mask, NULL, timezone_16_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);
-
- g_assert (GTK_WIDGET_REALIZED (day_view->main_canvas));
- if (E_CANVAS (day_view->main_canvas)->ic)
- gdk_im_begin (E_CANVAS (day_view->main_canvas)->ic,
- GTK_LAYOUT (day_view->main_canvas)->bin_window);
-
- 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);
-
- g_assert (GTK_WIDGET_REALIZED (day_view->main_canvas));
- if (E_CANVAS (day_view->main_canvas)->ic)
- gdk_im_end ();
-
- 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,
- cal_client_resolve_tzid_cb, day_view->client);
- gtk_object_unref (GTK_OBJECT (comp));
-
- e_day_view_queue_layout (day_view);
-}
-
-/* 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 NULL;
-
- 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)
-{
- CalQuery *old_query;
- char *real_sexp;
-
- e_day_view_stop_editing_event (day_view);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
- e_day_view_free_events (day_view);
- e_day_view_queue_layout (day_view);
-
- if (!(day_view->client
- && cal_client_get_load_state (day_view->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- old_query = day_view->query;
- day_view->query = NULL;
-
- if (old_query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), day_view);
- gtk_object_unref (GTK_OBJECT (old_query));
- }
-
- g_assert (day_view->sexp != NULL);
-
- real_sexp = adjust_query_sexp (day_view, day_view->sexp);
- if (!real_sexp)
- return; /* No time range is set, so don't start a query */
-
- 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);
-}
-
-
-/**
- * e_day_view_set_default_category:
- * @day_view: A day view.
- * @category: Default category name or NULL for no category.
- *
- * Sets the default category that will be used when creating new calendar
- * components from the day view.
- **/
-void
-e_day_view_set_default_category (EDayView *day_view, const char *category)
-{
- g_return_if_fail (day_view != NULL);
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->default_category)
- g_free (day_view->default_category);
-
- day_view->default_category = g_strdup (category);
-}
-
-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_day 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_with_zone (start_time, day_view->zone);
- } 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;
- struct icaltimetype tt = icaltime_null_time ();
-
- time_to_gdate_with_zone (&date, start_time, day_view->zone);
-
- /* 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);
-
- tt.year = g_date_year (&date);
- tt.month = g_date_month (&date);
- tt.day = g_date_day (&date);
-
- return icaltime_as_timet_with_zone (tt, day_view->zone);
-}
-
-
-/* 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_with_zone (day_view->day_starts[day - 1], 1, day_view->zone);
- }
-
-#if 0
- for (day = 0; day <= day_view->days_shown; day++)
- g_print ("Day Starts %i: %s", day, ctime (&day_view->day_starts[day]));
-#endif
-
- 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);
- }
-}
-
-
-/* The current timezone. */
-icaltimezone*
-e_day_view_get_timezone (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), NULL);
-
- return day_view->zone;
-}
-
-
-void
-e_day_view_set_timezone (EDayView *day_view,
- icaltimezone *zone)
-{
- icaltimezone *old_zone;
- struct icaltimetype tt;
- time_t lower;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- old_zone = day_view->zone;
- if (old_zone == zone)
- return;
-
- day_view->zone = zone;
-
- /* If our time hasn't been set yet, just return. */
- if (day_view->lower == 0 && day_view->upper == 0)
- return;
-
- /* Recalculate the new start of the first day. We just use exactly
- the same time, but with the new timezone. */
- tt = icaltime_from_timet_with_zone (day_view->lower, FALSE,
- old_zone);
-
- lower = icaltime_as_timet_with_zone (tt, zone);
-
- e_day_view_recalc_day_starts (day_view, lower);
- update_query (day_view);
-}
-
-
-/* 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 EDayViewEvent *
-get_current_event (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), NULL);
-
- if (day_view->editing_event_day == -1)
- return NULL;
-
- if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT)
- return &g_array_index (day_view->long_events,
- EDayViewEvent,
- day_view->editing_event_num);
- else
- return &g_array_index (day_view->events[day_view->editing_event_day],
- EDayViewEvent,
- day_view->editing_event_num);
-}
-
-void
-e_day_view_cut_clipboard (EDayView *day_view)
-{
- EDayViewEvent *event;
- const char *uid;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- event = get_current_event (day_view);
- if (event == NULL)
- return;
-
- e_day_view_copy_clipboard (day_view);
- cal_component_get_uid (event->comp, &uid);
- cal_client_remove_object (day_view->client, uid);
-}
-
-void
-e_day_view_copy_clipboard (EDayView *day_view)
-{
- EDayViewEvent *event;
- char *comp_str;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- event = get_current_event (day_view);
- if (event == NULL)
- return;
-
- comp_str = cal_component_get_as_string (event->comp);
- if (day_view->clipboard_selection != NULL)
- g_free (day_view->clipboard_selection);
- day_view->clipboard_selection = comp_str;
- gtk_selection_owner_set (day_view->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-void
-e_day_view_paste_clipboard (EDayView *day_view)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- gtk_selection_convert (day_view->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-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 (event->type == GDK_2BUTTON_PRESS) {
- 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);
- return TRUE;
- }
-
- 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;
-
- g_print ("In e_day_view_on_main_canvas_button_press\n");
-
- /* 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 (event->type == GDK_2BUTTON_PRESS) {
- 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);
- return TRUE;
- }
-
- 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);
- gtk_signal_emit_stop_by_name (GTK_OBJECT (day_view->top_canvas),
- "button_press_event");
- 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);
- gtk_signal_emit_stop_by_name (GTK_OBJECT (day_view->main_canvas),
- "button_press_event");
- 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 (event,
- day_view->days_shown,
- day_view->day_starts,
- &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;
- if (day_view->resize_end_row < day_view->resize_start_row)
- day_view->resize_end_row = day_view->resize_start_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)
-{
- EDayViewEvent *event;
-
- if (day == -1)
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
- else
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
-
- e_day_view_stop_editing_event (day_view);
-
- if (day_view->calendar)
- gnome_calendar_edit_object (day_view->calendar, event->comp);
- else
- g_warning ("Calendar not set");
-}
-
-enum {
- /*
- * This is used to "flag" events that can not be edited
- */
- 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_("_Paste"), NULL,
- e_day_view_on_paste, 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 },
-
- /* Only show this separator if one of the above is shown. */
- { "", NULL, NULL, NULL, MASK_EDITABLE | MASK_EDITING },
-
-
- { N_("C_ut"), NULL,
- e_day_view_on_cut, NULL, MASK_EDITABLE | MASK_EDITING },
- { N_("_Copy"), NULL,
- e_day_view_on_copy, NULL, 0 },
- { N_("_Paste"), NULL,
- e_day_view_on_paste, NULL, 0 },
-
-
- /*
- * The following are only shown if this is a recurring event
- */
- { "", NULL, NULL, NULL, MASK_RECURRING | MASK_EDITING },
- { 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;
- struct icaltimetype itt;
-
- /* Edit a new event. If only one day is selected in the top canvas,
- we set the time to the first 1/2-hour of the working day. */
- if (day_view->selection_in_top_canvas
- && day_view->selection_start_day != -1
- && day_view->selection_start_day == day_view->selection_end_day) {
- dtstart = day_view->day_starts[day_view->selection_start_day];
- itt = icaltime_from_timet_with_zone (dtstart, FALSE,
- day_view->zone);
- itt.hour = calendar_config_get_day_start_hour ();
- itt.minute = calendar_config_get_day_start_minute ();
- dtstart = icaltime_as_timet_with_zone (itt, day_view->zone);
-
- icaltime_adjust (&itt, 0, 0, 30, 0);
- dtend = icaltime_as_timet_with_zone (itt, day_view->zone);
- } else {
- 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, event->start, day_view->zone);
-
- 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_delete_event_internal (EDayView *day_view, EDayViewEvent *event)
-{
- CalComponentVType vtype;
-
- vtype = cal_component_get_vtype (event->comp);
-
- if (delete_component_dialog (event->comp, 1, vtype,
- GTK_WIDGET (day_view))) {
- 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_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);
-
- e_day_view_delete_event_internal (day_view, event);
-}
-
-void
-e_day_view_delete_event (EDayView *day_view)
-{
- EDayViewEvent *event;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->editing_event_day == -1)
- return;
-
- if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT)
- event = &g_array_index (day_view->long_events,
- EDayViewEvent,
- day_view->editing_event_num);
- else
- event = &g_array_index (day_view->events[day_view->editing_event_day],
- EDayViewEvent,
- day_view->editing_event_num);
-
- e_day_view_delete_event_internal (day_view, event);
-}
-
-
-static void
-e_day_view_on_cut (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view;
- EDayViewEvent *event;
- const char *uid;
-
- day_view = E_DAY_VIEW (data);
-
- event = e_day_view_get_popup_menu_event (day_view);
- if (event == NULL)
- return;
-
- e_day_view_on_copy (widget, data);
-
- cal_component_get_uid (event->comp, &uid);
- cal_client_remove_object (day_view->client, uid);
-}
-
-static void
-e_day_view_on_copy (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view;
- EDayViewEvent *event;
- char *comp_str;
-
- day_view = E_DAY_VIEW (data);
-
- event = e_day_view_get_popup_menu_event (day_view);
- if (event == NULL)
- return;
-
- comp_str = cal_component_get_as_string (event->comp);
- if (day_view->clipboard_selection)
- g_free (day_view->clipboard_selection);
- day_view->clipboard_selection = comp_str;
-
- gtk_selection_owner_set (day_view->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-static void
-e_day_view_on_paste (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view = E_DAY_VIEW (data);
-
- gtk_selection_convert (day_view->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-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, event->start, day_view->zone);
-
- /* 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 = icaltimezone_get_tzid (day_view->zone);
-
- *date.value = icaltime_from_timet_with_zone (event->start, FALSE,
- day_view->zone);
- cal_component_set_dtstart (new_comp, &date);
- *date.value = icaltime_from_timet_with_zone (event->end, FALSE,
- day_view->zone);
- 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)
-{
- g_print ("In e_day_view_on_main_canvas_button_release\n");
-
- 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;
- /* FIXME: Should probably keep the timezone of the original start
- and end times. */
- date.tzid = icaltimezone_get_tzid (day_view->zone);
-
- 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_with_zone (dt, FALSE,
- day_view->zone);
- cal_component_set_dtstart (comp, &date);
- } else {
- dt = day_view->day_starts[day_view->resize_end_row + 1];
- *date.value = icaltime_from_timet_with_zone (dt, FALSE,
- day_view->zone);
- 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;
- /* FIXME: Should probably keep the timezone of the original start
- and end times. */
- date.tzid = icaltimezone_get_tzid (day_view->zone);
-
- 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_with_zone (dt, FALSE,
- day_view->zone);
- 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_with_zone (dt, FALSE,
- day_view->zone);
- 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 icaltimetype start_tt, end_tt;
-
- 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_tt = icaltime_from_timet_with_zone (start, FALSE,
- day_view->zone);
- end_tt = icaltime_from_timet_with_zone (end, FALSE,
- day_view->zone);
-
- 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_tt.hour * 60 + start_tt.minute - offset;
- event.end_minute = end_tt.hour * 60 + end_tt.minute - offset;
-
- event.start_row_or_col = 0;
- event.num_columns = 0;
-
- event.different_timezone = FALSE;
- if (!cal_comp_util_compare_event_timezones (comp, day_view->client,
- day_view->zone))
- event.different_timezone = TRUE;
-
- /* 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, rows_in_top_display, top_canvas_height, top_rows;
-
- /* 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->events[day],
- day_view->rows,
- day_view->mins_per_row,
- day_view->cols_per_row[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->long_events,
- day_view->days_shown,
- day_view->day_starts,
- &rows_in_top_display);
-
- /* 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 != rows_in_top_display) {
- day_view->rows_in_top_display = rows_in_top_display;
- top_rows = MAX (1, 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);
- }
- }
-
-
- 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_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) {
- GSList *categories_list;
-
- if (cal_component_has_alarms (comp))
- num_icons++;
- if (cal_component_has_recurrences (comp))
- num_icons++;
- if (event->different_timezone)
- num_icons++;
-
- cal_component_get_categories_list (comp, &categories_list);
- num_icons += g_slist_length (categories_list);
- cal_component_free_categories_list (categories_list);
- }
-
- 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 + E_DAY_VIEW_LONG_EVENT_ICON_R_PAD;
- 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);
-}
-
-
-/* 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) {
- GSList *categories_list;
-
- if (cal_component_has_alarms (comp))
- num_icons++;
- if (cal_component_has_recurrences (comp))
- num_icons++;
- if (event->different_timezone)
- num_icons++;
-
- cal_component_get_categories_list (comp, &categories_list);
- num_icons += g_slist_length (categories_list);
- cal_component_free_categories_list (categories_list);
- }
-
- 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;
- }
- }
-}
-
-
-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 = e_utf8_from_gtk_event_key (widget, event->keyval, 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 = icaltimezone_get_tzid (day_view->zone);
-
- *dt.value = icaltime_from_timet_with_zone (dtstart, FALSE,
- day_view->zone);
- cal_component_set_dtstart (comp, &dt);
-
- *dt.value = icaltime_from_timet_with_zone (dtend, FALSE,
- day_view->zone);
- cal_component_set_dtend (comp, &dt);
-
- cal_component_set_categories (comp, day_view->default_category);
-
- /* We add the event locally and start editing it. We don't send it
- to the server until the user finishes editing it. */
- 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");
- }
-
- if (initial_text)
- g_free (initial_text);
-
- 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_2BUTTON_PRESS:
- g_print ("Item got double-click\n");
- 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);
- }
-
- gtk_signal_emit (GTK_OBJECT (day_view),
- e_day_view_signals[SELECTION_CHANGED]);
-}
-
-
-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);
- g_assert (text != NULL);
-
- /* Only update the summary if necessary. */
- cal_component_get_summary (event->comp, &summary);
- if (summary.value && !strcmp (text, summary.value)) {
- if (day == E_DAY_VIEW_LONG_EVENT)
- e_day_view_reshape_long_event (day_view, event_num);
- else
- e_day_view_update_event_label (day_view, day,
- event_num);
- } else {
- summary.value = text;
- summary.altrep = NULL;
- cal_component_set_summary (event->comp, &summary);
-
- if (!cal_client_update_object (day_view->client, event->comp))
- g_message ("e_day_view_on_editing_stopped(): Could not update the object!");
- }
-
- g_free (text);
-
- gtk_signal_emit (GTK_OBJECT (day_view),
- e_day_view_signals[SELECTION_CHANGED]);
-}
-
-
-/* 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 icaltimetype tt;
- 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];
-
- /* Create an icaltimetype and convert to a time_t. */
- tt = icaltime_from_timet_with_zone (day_view->day_starts[col],
- FALSE, day_view->zone);
- tt.hour = minutes / 60;
- tt.minute = minutes % 60;
- tt.second = 0;
-
- val = icaltime_as_timet_with_zone (tt, day_view->zone);
- return val;
-}
-
-
-static gboolean
-e_day_view_convert_time_to_grid_position (EDayView *day_view,
- time_t time,
- gint *col,
- gint *row)
-{
- struct icaltimetype tt;
- 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 an icaltimetype,
- calculate the offset in minutes from the top of the display and
- divide it by the mins per row setting. */
- tt = icaltime_from_timet_with_zone (time, FALSE, day_view->zone);
-
- minutes = tt.hour * 60 + tt.minute;
- 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;
- if (end_row < start_row)
- end_row = start_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 (event,
- day_view->days_shown,
- day_view->day_starts,
- 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 (event,
- day_view->days_shown,
- day_view->day_starts,
- &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;
-
- 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;
- if (end_row < start_row)
- end_row = start_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;
-
- /* Note that we only support DnD within the EDayView at present. */
- if ((data->length >= 0) && (data->format == 8)
- && (day_view->drag_event_day != -1)) {
- 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 (event,
- day_view->days_shown,
- day_view->day_starts,
- &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 {
- 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;
- /* FIXME: Should probably keep the timezone of the
- original start and end times. */
- date.tzid = icaltimezone_get_tzid (day_view->zone);
-
- dt = day_view->day_starts[day] + start_offset * 60;
- *date.value = icaltime_from_timet_with_zone (dt, FALSE,
- day_view->zone);
- 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_with_zone (dt, FALSE,
- day_view->zone);
- 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;
-
- /* Note that we only support DnD within the EDayView at present. */
- if ((data->length >= 0) && (data->format == 8)
- && (day_view->drag_event_day != -1)) {
- 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 {
- 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;
- if (end_row < start_row)
- end_row = start_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 = icaltimezone_get_tzid (day_view->zone);
-
- dt = e_day_view_convert_grid_position_to_time (day_view, day, row) + start_offset * 60;
- *date.value = icaltime_from_timet_with_zone (dt, FALSE,
- day_view->zone);
- 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_with_zone (dt, FALSE,
- day_view->zone);
- 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;
-}
-
-static void
-invisible_destroyed (GtkWidget *invisible, EDayView *day_view)
-{
- day_view->invisible = NULL;
-}
-
-static void
-selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- EDayView *day_view)
-{
- if (day_view->clipboard_selection != NULL) {
- gtk_selection_data_set (selection_data,
- GDK_SELECTION_TYPE_STRING,
- 8,
- day_view->clipboard_selection,
- strlen (day_view->clipboard_selection));
- }
-}
-
-static void
-selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- EDayView *day_view)
-{
- if (day_view->clipboard_selection != NULL) {
- g_free (day_view->clipboard_selection);
- day_view->clipboard_selection = NULL;
- }
-}
-
-static void
-selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- EDayView *day_view)
-{
- char *comp_str;
- icalcomponent *icalcomp;
- time_t dtstart, dtend;
- struct icaltimetype itime;
- icalcomponent_kind kind;
- CalComponent *comp;
- char *uid;
- time_t tt_start, tt_end;
- struct icaldurationtype ic_dur;
-
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (selection_data->length < 0 ||
- selection_data->type != GDK_SELECTION_TYPE_STRING) {
- return;
- }
-
- comp_str = (char *) selection_data->data;
- icalcomp = icalparser_parse_string ((const char *) comp_str);
- if (!icalcomp)
- return;
-
- /* check the type of the component */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT &&
- kind != ICAL_VEVENT_COMPONENT &&
- kind != ICAL_VTODO_COMPONENT &&
- kind != ICAL_VJOURNAL_COMPONENT) {
- return;
- }
-
- e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- int num_found = 0;
- icalcomponent_kind child_kind;
- icalcomponent *subcomp;
-
- subcomp = icalcomponent_get_first_component (
- icalcomp, ICAL_ANY_COMPONENT);
- while (subcomp) {
- child_kind = icalcomponent_isa (subcomp);
- if (child_kind == ICAL_VEVENT_COMPONENT ||
- child_kind == ICAL_VTODO_COMPONENT ||
- child_kind == ICAL_VJOURNAL_COMPONENT) {
- CalComponent *tmp_comp;
-
- tt_start = icaltime_as_timet (icalcomponent_get_dtstart (subcomp));
- tt_end = icaltime_as_timet (icalcomponent_get_dtend (subcomp));
- ic_dur = icaldurationtype_from_int (tt_end - tt_start);
- itime = icaltime_from_timet_with_zone (dtstart, FALSE, day_view->zone);
- /* FIXME: Need to set TZID. */
- icalcomponent_set_dtstart (subcomp, itime);
- itime = icaltime_add (itime, ic_dur);
- icalcomponent_set_dtend (subcomp, itime);
-
- uid = cal_component_gen_uid ();
- tmp_comp = cal_component_new ();
- cal_component_set_icalcomponent (
- tmp_comp, icalcomponent_new_clone (subcomp));
- cal_component_set_uid (tmp_comp, uid);
-
- free (uid);
- gtk_object_unref (GTK_OBJECT (tmp_comp));
-
- num_found++;
- }
- subcomp = icalcomponent_get_next_component (
- icalcomp, ICAL_ANY_COMPONENT);
- }
-
- if (num_found) {
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
-
- cal_client_update_object (day_view->client, comp);
-
- gtk_object_unref (GTK_OBJECT (comp));
- }
- }
- else {
- tt_start = icaltime_as_timet (icalcomponent_get_dtstart (icalcomp));
- tt_end = icaltime_as_timet (icalcomponent_get_dtend (icalcomp));
- ic_dur = icaldurationtype_from_int (tt_end - tt_start);
- itime = icaltime_from_timet_with_zone (dtstart, FALSE, day_view->zone);
- /* FIXME: Need to set TZID. */
- icalcomponent_set_dtstart (icalcomp, itime);
- itime = icaltime_add (itime, ic_dur);
- icalcomponent_set_dtend (icalcomp, itime);
-
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
-
- uid = cal_component_gen_uid ();
- cal_component_set_uid (comp, (const char *) uid);
- free (uid);
-
- cal_client_update_object (day_view->client, comp);
-
- gtk_object_unref (GTK_OBJECT (comp));
- }
-}
-
-
-/* Gets the visible time range. Returns FALSE if no time range has been set. */
-gboolean
-e_day_view_get_visible_time_range (EDayView *day_view,
- time_t *start_time,
- time_t *end_time)
-{
- /* If the date isn't set, return FALSE. */
- if (day_view->lower == 0 && day_view->upper == 0)
- return FALSE;
-
- *start_time = day_view->day_starts[0];
- *end_time = day_view->day_starts[day_view->days_shown];
-
- return TRUE;
-}
-
-
-/* Queues a layout, unless one is already queued. */
-static void
-e_day_view_queue_layout (EDayView *day_view)
-{
- if (day_view->layout_timeout_id == 0) {
- day_view->layout_timeout_id = g_timeout_add (E_DAY_VIEW_LAYOUT_TIMEOUT, e_day_view_layout_timeout_cb, day_view);
- }
-}
-
-
-/* Removes any queued layout. */
-static void
-e_day_view_cancel_layout (EDayView *day_view)
-{
- if (day_view->layout_timeout_id != 0) {
- gtk_timeout_remove (day_view->layout_timeout_id);
- day_view->layout_timeout_id = 0;
- }
-}
-
-
-static gboolean
-e_day_view_layout_timeout_cb (gpointer data)
-{
- EDayView *day_view = E_DAY_VIEW (data);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
- e_day_view_check_layout (day_view);
-
- day_view->layout_timeout_id = 0;
- return FALSE;
-}
-
-
-/* Returns the number of selected events (0 or 1 at present). */
-gint
-e_day_view_get_num_events_selected (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), 0);
-
- return (day_view->editing_event_day != -1) ? 1 : 0;
-}
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
deleted file mode 100644
index 4b57a2e155..0000000000
--- a/calendar/gui/e-day-view.h
+++ /dev/null
@@ -1,664 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Ximian, 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 1
-#define E_DAY_VIEW_ICON_Y_PAD 1
-
-/* The space between the icons and the long event text. */
-#define E_DAY_VIEW_LONG_EVENT_ICON_R_PAD 1
-
-/* 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;
-
- /* TRUE if the event is at a different UTC offset than our current
- timezone, i.e. it is in a different timezone. */
- guint different_timezone : 1;
-
- /* 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];
-
- /* The timezone. */
- icaltimezone *zone;
-
- /* 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 ID of the timeout function for doing a new layout. */
- gint layout_timeout_id;
-
- /* 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;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_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;
-
- /* the invisible widget to manage the clipboard selections */
- GtkWidget *invisible;
- gchar *clipboard_selection;
-
- /* The default category for new events */
- char *default_category;
-};
-
-struct _EDayViewClass
-{
- GtkTableClass parent_class;
-
- /* Notification signals */
- void (* selection_changed) (EDayView *day_view);
-};
-
-
-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);
-
-void e_day_view_set_default_category (EDayView *day_view,
- const char *category);
-
-/* 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);
-
-/* Gets the visible time range. Returns FALSE if no time range has been set. */
-gboolean e_day_view_get_visible_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);
-
-/* The current timezone. */
-icaltimezone* e_day_view_get_timezone (EDayView *day_view);
-void e_day_view_set_timezone (EDayView *day_view,
- icaltimezone *zone);
-
-
-/* Clipboard-related functions */
-void e_day_view_cut_clipboard (EDayView *day_view);
-void e_day_view_copy_clipboard (EDayView *day_view);
-void e_day_view_paste_clipboard (EDayView *day_view);
-
-void e_day_view_delete_event (EDayView *day_view);
-
-
-/* Returns the number of selected events (0 or 1 at present). */
-gint e_day_view_get_num_events_selected (EDayView *day_view);
-
-
-/*
- * 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);
-
-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);
-
-
-gint e_day_view_event_sort_func (const void *arg1,
- const void *arg2);
-
-#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 20e17d7eac..0000000000
--- a/calendar/gui/e-itip-control.c
+++ /dev/null
@@ -1,1412 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-itip-control.c
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <glib.h>
-#include <gtk/gtkmisc.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <gtkhtml/gtkhtml.h>
-#include <ical.h>
-#include <cal-util/cal-component.h>
-#include <cal-client/cal-client.h>
-#include <e-util/e-time-utils.h>
-#include <e-util/e-dialog-widgets.h>
-#include <e-util/e-unicode-i18n.h>
-#include "calendar-config.h"
-#include "itip-utils.h"
-#include "e-itip-control.h"
-
-struct _EItipControlPrivate {
- GtkWidget *html;
-
- GtkWidget *count;
- GtkWidget *next;
- GtkWidget *prev;
-
- CalClient *event_client;
- CalClient *task_client;
-
- char *vcalendar;
- CalComponent *comp;
- icalcomponent *main_comp;
- icalcomponent *ical_comp;
- icalcomponent *top_level;
- icalcompiter iter;
- icalproperty_method method;
-
- int current;
- int total;
-
- GList *addresses;
- gchar *from_address;
- gchar *my_address;
-};
-
-/* HTML Strings */
-#define HTML_HEADER "<html><head><title>iCalendar Information</title></head>"
-#define HTML_BODY_START "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#336699\">"
-#define HTML_SEP "<hr color=#336699 align=\"left\" width=450>"
-#define HTML_BODY_END "</body>"
-#define HTML_FOOTER "</html>"
-
-#define PUBLISH_OPTIONS "<form><b>Choose an action:</b>&nbsp<select NAME=\"action\" SIZE=\"1\"> \
-<option VALUE=\"U\">Update</option></select>&nbsp &nbsp \
-<input TYPE=Submit name=\"ok\" value=\"OK\"></form>"
-
-#define REQUEST_OPTIONS "<form><b>Choose an action:</b>&nbsp<select NAME=\"action\" SIZE=\"1\"> \
-<option VALUE=\"A\">Accept</option> \
-<option VALUE=\"T\">Tentatively accept</option> \
-<option VALUE=\"D\">Decline</option></select>&nbsp \
-<input TYPE=\"checkbox\" name=\"rsvp\" value=\"1\" checked>RSVP&nbsp&nbsp\
-<input TYPE=\"submit\" name=\"ok\" value=\"OK\"><br> \
-</form>"
-
-#define REQUEST_FB_OPTIONS "<form><b>Choose an action:</b><select NAME=\"action\" SIZE=\"1\"> \
-<option VALUE=\"F\">Send Free/Busy Information</option></select>&nbsp &nbsp \
-<input TYPE=Submit name=\"ok\" value=\"OK\"></form>"
-
-#define REPLY_OPTIONS "<form><b>Choose an action:</b><select NAME=\"action\" SIZE=\"1\"> \
-<option VALUE=\"R\">Update respondent status</option></select>&nbsp &nbsp \
-<input TYPE=Submit name=\"ok\" value=\"OK\"></form>"
-
-#define REFRESH_OPTIONS "<form><b>Choose an action:</b><select NAME=\"action\" SIZE=\"1\"> \
-<option VALUE=\"S\">Send Latest Information</option></select>&nbsp &nbsp \
-<input TYPE=Submit name=\"ok\" value=\"OK\"></form>"
-
-#define CANCEL_OPTIONS "<form><b>Choose an action:</b><select NAME=\"action\" SIZE=\"1\"> \
-<option VALUE=\"C\">Cancel</option></select>&nbsp &nbsp \
-<input TYPE=Submit name=\"ok\" value=\"OK\"></form>"
-
-
-static void class_init (EItipControlClass *klass);
-static void init (EItipControl *itip);
-static void destroy (GtkObject *obj);
-
-static void prev_clicked_cb (GtkWidget *widget, gpointer data);
-static void next_clicked_cb (GtkWidget *widget, gpointer data);
-static void url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data);
-static void ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar *encoding, gpointer data);
-
-static GtkVBoxClass *parent_class = NULL;
-
-
-GtkType
-e_itip_control_get_type (void)
-{
- static GtkType type = 0;
-
- if (type == 0) {
- static const GtkTypeInfo info =
- {
- "EItipControl",
- sizeof (EItipControl),
- sizeof (EItipControlClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (gtk_vbox_get_type (), &info);
- }
-
- return type;
-}
-
-static void
-class_init (EItipControlClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = gtk_type_class (gtk_vbox_get_type ());
-
- object_class->destroy = destroy;
-}
-
-
-/* Calendar Server routines */
-static void
-start_calendar_server_cb (CalClient *cal_client,
- CalClientOpenStatus status,
- gpointer data)
-{
- gboolean *success = data;
-
- if (status == CAL_CLIENT_OPEN_SUCCESS)
- *success = TRUE;
- else
- *success = FALSE;
-
- gtk_main_quit (); /* end the sub event loop */
-}
-
-static CalClient *
-start_calendar_server (gchar *uri)
-{
- CalClient *client;
- gchar *filename;
- gboolean success;
-
- client = cal_client_new ();
-
- /* FIX ME */
- filename = g_concat_dir_and_file (g_get_home_dir (), uri);
-
- gtk_signal_connect (GTK_OBJECT (client), "cal_opened",
- start_calendar_server_cb, &success);
-
- if (!cal_client_open_calendar (client, filename, FALSE))
- return NULL;
-
- /* run a sub event loop to turn cal-client's async load
- notification into a synchronous call */
- gtk_main ();
-
- if (success)
- return client;
-
- return NULL;
-}
-
-static void
-init (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- GtkWidget *hbox, *scrolled_window;
-
- priv = g_new0 (EItipControlPrivate, 1);
-
- itip->priv = priv;
-
- /* Addresses */
- priv->addresses = itip_addresses_get ();
-
- /* Header */
- priv->prev = gnome_stock_button (GNOME_STOCK_BUTTON_PREV);
- gtk_widget_show (priv->prev);
- priv->next = gnome_stock_button (GNOME_STOCK_BUTTON_NEXT);
- gtk_widget_show (priv->next);
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->prev, FALSE, FALSE, 4);
- gtk_box_pack_start (GTK_BOX (hbox), priv->count, TRUE, TRUE, 4);
- gtk_box_pack_start (GTK_BOX (hbox), priv->next, FALSE, FALSE, 4);
- gtk_widget_show (hbox);
-
- gtk_signal_connect (GTK_OBJECT (priv->prev), "clicked",
- GTK_SIGNAL_FUNC (prev_clicked_cb), itip);
- gtk_signal_connect (GTK_OBJECT (priv->next), "clicked",
- GTK_SIGNAL_FUNC (next_clicked_cb), itip);
-
- /* Get the cal clients */
- priv->event_client = start_calendar_server ("evolution/local/Calendar/calendar.ics");
- if (priv->event_client == NULL)
- g_warning ("Unable to start calendar client");
- priv->task_client = start_calendar_server ("evolution/local/Tasks/tasks.ics");
- if (priv->task_client == NULL)
- g_warning ("Unable to start calendar client");
-
- /* Html Widget */
- priv->html = gtk_html_new ();
- gtk_widget_show (priv->html);
-
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- gtk_widget_show (scrolled_window);
-
- gtk_container_add (GTK_CONTAINER (scrolled_window), priv->html);
- gtk_widget_set_usize (scrolled_window, 600, 400);
- gtk_box_pack_start (GTK_BOX (itip), scrolled_window, FALSE, FALSE, 4);
-
- gtk_signal_connect (GTK_OBJECT (priv->html), "url_requested",
- url_requested_cb, itip);
- gtk_signal_connect (GTK_OBJECT (priv->html), "submit",
- ok_clicked_cb, itip);
-
-}
-
-static void
-clean_up (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- g_free (priv->vcalendar);
- priv->vcalendar = NULL;
-
- if (priv->comp)
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
-
- icalcomponent_free (priv->top_level);
- priv->top_level = NULL;
- icalcomponent_free (priv->main_comp);
- priv->main_comp = NULL;
- priv->ical_comp = NULL;
-
- priv->current = 0;
- priv->total = 0;
-
- priv->my_address = NULL;
- g_free (priv->from_address);
- priv->from_address = NULL;
-}
-
-static void
-destroy (GtkObject *obj)
-{
- EItipControl *itip = E_ITIP_CONTROL (obj);
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- clean_up (itip);
-
- itip_addresses_free (priv->addresses);
- priv->addresses = NULL;
-
- gtk_object_unref (GTK_OBJECT (priv->event_client));
- gtk_object_unref (GTK_OBJECT (priv->task_client));
-
- g_free (priv);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj);
-}
-
-GtkWidget *
-e_itip_control_new (void)
-{
- return gtk_type_new (E_TYPE_ITIP_CONTROL);
-}
-
-static void
-find_my_address (EItipControl *itip, icalcomponent *ical_comp)
-{
- EItipControlPrivate *priv;
- icalproperty *prop;
- const char *attendee, *text;
- icalvalue *value;
-
- priv = itip->priv;
-
- for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
- {
- GList *l;
-
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- text = itip_strip_mailto (attendee);
- for (l = priv->addresses; l != NULL; l = l->next) {
- ItipAddress *a = l->data;
-
- if (!strcmp (a->address, text)) {
- priv->my_address = a->address;
- return;
- }
- }
- }
-}
-
-static icalproperty *
-find_attendee (icalcomponent *ical_comp, const char *address)
-{
- icalproperty *prop;
- const char *attendee, *text;
- icalvalue *value;
-
- g_return_val_if_fail (address != NULL, NULL);
-
- for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
- {
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- text = itip_strip_mailto (attendee);
- if (strstr (text, address))
- break;
- }
-
- return prop;
-}
-
-static icalparameter_partstat
-find_attendee_partstat (icalcomponent *ical_comp, const char *address)
-{
- icalproperty *prop;
-
- prop = find_attendee (ical_comp, address);
- if (prop != NULL) {
- icalparameter *param;
-
- param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- if (param != NULL)
- return icalparameter_get_partstat (param);
- }
-
- return ICAL_PARTSTAT_NONE;
-}
-
-static void
-set_label (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- gchar *text;
-
- priv = itip->priv;
-
- text = g_strdup_printf ("%d of %d", priv->current, priv->total);
- gtk_label_set_text (GTK_LABEL (priv->count), text);
-
-}
-
-static void
-set_button_status (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- if (priv->current == priv->total)
- gtk_widget_set_sensitive (priv->next, FALSE);
- else
- gtk_widget_set_sensitive (priv->next, TRUE);
-
- if (priv->current == 1)
- gtk_widget_set_sensitive (priv->prev, FALSE);
- else
- gtk_widget_set_sensitive (priv->prev, TRUE);
-}
-
-static void
-write_label_piece (time_t t, char *buffer, int size, const char *stext, const char *etext)
-{
- struct tm *tmp_tm;
- int len;
-
- /* FIXME: Convert to an appropriate timezone. */
- tmp_tm = localtime (&t);
- if (stext != NULL)
- strcat (buffer, stext);
-
- len = strlen (buffer);
- e_time_format_date_and_time (tmp_tm,
- calendar_config_get_24_hour_format (),
- FALSE, FALSE,
- &buffer[len], size - len);
- if (etext != NULL)
- strcat (buffer, etext);
-}
-
-static void
-set_date_label (GtkHTML *html, GtkHTMLStream *html_stream, CalComponent *comp)
-{
- CalComponentDateTime datetime;
- time_t start = 0, end = 0, complete = 0, due = 0;
- static char buffer[1024];
- gboolean wrote = FALSE;
- CalComponentVType type;
-
- type = cal_component_get_vtype (comp);
-
- /* FIXME: timezones. */
- buffer[0] = '\0';
- cal_component_get_dtstart (comp, &datetime);
- if (datetime.value) {
- start = icaltime_as_timet (*datetime.value);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- write_label_piece (start, buffer, 1024,
- U_("Meeting begins: <b>"),
- "</b><br>");
- break;
- case CAL_COMPONENT_TODO:
- write_label_piece (start, buffer, 1024,
- U_("Task begins: <b>"),
- "</b><br>");
- break;
- case CAL_COMPONENT_FREEBUSY:
- write_label_piece (start, buffer, 1024,
- U_("Free/Busy info begins: <b>"),
- "</b><br>");
- break;
- default:
- write_label_piece (start, buffer, 1024, U_("Begins: <b>"), "</b><br>");
- }
- gtk_html_write (html, html_stream, buffer, strlen(buffer));
- wrote = TRUE;
- }
- cal_component_free_datetime (&datetime);
-
- buffer[0] = '\0';
- cal_component_get_dtend (comp, &datetime);
- if (datetime.value){
- end = icaltime_as_timet (*datetime.value);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- write_label_piece (end, buffer, 1024, "Meeting ends: <b>", "</b><br>");
- break;
- case CAL_COMPONENT_FREEBUSY:
- write_label_piece (start, buffer, 1024, "Free/Busy info ends: <b>",
- "</b><br>");
- break;
- default:
- write_label_piece (start, buffer, 1024, "Ends: <b>", "</b><br>");
- }
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- }
- cal_component_free_datetime (&datetime);
-
- buffer[0] = '\0';
- datetime.tzid = NULL;
- cal_component_get_completed (comp, &datetime.value);
- if (type == CAL_COMPONENT_TODO && datetime.value) {
- complete = icaltime_as_timet (*datetime.value);
- write_label_piece (complete, buffer, 1024, "Task Completed: <b>", "</b><br>");
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- }
- cal_component_free_datetime (&datetime);
-
- buffer[0] = '\0';
- cal_component_get_due (comp, &datetime);
- if (type == CAL_COMPONENT_TODO && complete == 0 && datetime.value) {
- due = icaltime_as_timet (*datetime.value);
- write_label_piece (due, buffer, 1024, "Task Due: <b>", "</b><br>");
- gtk_html_write (html, html_stream, buffer, strlen (buffer));
- wrote = TRUE;
- }
- cal_component_free_datetime (&datetime);
-
- if (wrote)
- gtk_html_write (html, html_stream, "<br>", 8);
-}
-
-static void
-set_message (GtkHTML *html, GtkHTMLStream *html_stream, gchar *message, gboolean err)
-{
- char *buffer;
-
- if (message == NULL)
- return;
-
- if (err) {
- buffer = g_strdup_printf ("<b><font color=\"#ff0000\">%s</font></b><br><br>", message);
- } else {
- buffer = g_strdup_printf ("<b>%s</b><br><br>", message);
- }
- gtk_html_write (GTK_HTML (html), html_stream, buffer, strlen (buffer));
- g_free (buffer);
-}
-
-static void
-write_error_html (EItipControl *itip, gchar *itip_err)
-{
- EItipControlPrivate *priv;
- GtkHTMLStream *html_stream;
- gchar *html;
-
- priv = itip->priv;
-
- /* Html widget */
- html_stream = gtk_html_begin (GTK_HTML (priv->html));
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_HEADER, strlen(HTML_HEADER));
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_BODY_START, strlen(HTML_BODY_START));
-
- /* The table */
- html = g_strdup ("<table width=450 cellspacing=\"0\" cellpadding=\"4\" border=\"0\">");
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- /* The column for the image */
- html = g_strdup ("<tr><td width=48 align=\"center\" valign=\"top\" rowspan=\"8\">");
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- /* The image */
- html = g_strdup ("<img src=\"/meeting-request.png\"></td>");
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- html = g_strdup ("<td align=\"left\" valign=\"top\">");
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- /* Title */
- set_message (GTK_HTML (priv->html), html_stream, "iCalendar Error", TRUE);
-
- /* Error */
- gtk_html_write (GTK_HTML (priv->html), html_stream, itip_err, strlen(itip_err));
-
- /* Clean up */
- html = g_strdup ("</td></tr></table>");
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_BODY_END, strlen(HTML_BODY_END));
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_FOOTER, strlen(HTML_FOOTER));
-
- gtk_html_end (GTK_HTML (priv->html), html_stream, GTK_HTML_STREAM_OK);
-}
-
-static void
-write_html (EItipControl *itip, gchar *itip_desc, gchar *itip_title, gchar *options)
-{
- EItipControlPrivate *priv;
- GtkHTMLStream *html_stream;
- CalComponentText text;
- CalComponentOrganizer organizer;
- CalComponentAttendee *attendee;
- GSList *attendees, *l = NULL;
- gchar *html;
- const gchar *const_html;
-
- priv = itip->priv;
-
- /* Html widget */
- html_stream = gtk_html_begin (GTK_HTML (priv->html));
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_HEADER, strlen(HTML_HEADER));
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_BODY_START, strlen(HTML_BODY_START));
-
- /* The table */
- const_html = "<table width=450 cellspacing=\"0\" cellpadding=\"4\" border=\"0\">";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
-
- /* The column for the image */
- const_html = "<tr><td width=48 align=\"center\" valign=\"top\" rowspan=\"8\">";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
-
- /* The image */
- const_html = "<img src=\"/meeting-request.png\"></td>";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
-
- const_html = "<td align=\"left\" valign=\"top\">";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
-
- switch (priv->method) {
- case ICAL_METHOD_REFRESH:
- case ICAL_METHOD_REPLY:
- /* An attendee sent this */
- cal_component_get_attendee_list (priv->comp, &attendees);
- if (attendees != NULL) {
- attendee = attendees->data;
- html = g_strdup_printf (itip_desc,
- attendee->cn ?
- attendee->cn :
- itip_strip_mailto (attendee->value));
- } else {
- html = g_strdup_printf (itip_desc, "An unknown person");
- }
- break;
- case ICAL_METHOD_PUBLISH:
- case ICAL_METHOD_REQUEST:
- case ICAL_METHOD_ADD:
- case ICAL_METHOD_CANCEL:
- default:
- /* The organizer sent this */
- cal_component_get_organizer (priv->comp, &organizer);
- if (organizer.value != NULL)
- html = g_strdup_printf (itip_desc,
- organizer.cn ?
- organizer.cn :
- itip_strip_mailto (organizer.value));
- else
- html = g_strdup_printf (itip_desc, "An unknown person");
- break;
- }
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- /* Describe what the user can do */
- const_html = U_("<br> Please review the following information, "
- "and then select an action from the menu below.");
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
-
- /* Separator */
- gtk_html_write (GTK_HTML (priv->html), html_stream, HTML_SEP, strlen (HTML_SEP));
-
- /* Title */
- set_message (GTK_HTML (priv->html), html_stream, itip_title, FALSE);
-
- /* Date information */
- set_date_label (GTK_HTML (priv->html), html_stream, priv->comp);
-
- /* Summary */
- cal_component_get_summary (priv->comp, &text);
- html = g_strdup_printf (U_("<b>Summary:</b> %s<br><br>"), text.value ? text.value : U_("<i>None</i>"));
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
-
- /* Description */
- cal_component_get_description_list (priv->comp, &l);
- if (l)
- text = *((CalComponentText *)l->data);
-
- if (l && text.value) {
- html = g_strdup_printf (U_("<b>Description:</b> %s"), text.value);
- gtk_html_write (GTK_HTML (priv->html), html_stream, html, strlen(html));
- g_free (html);
- }
- cal_component_free_text_list (l);
-
- /* Separator */
- gtk_html_write (GTK_HTML (priv->html), html_stream, HTML_SEP, strlen (HTML_SEP));
-
- /* Options */
- if (options != NULL)
- gtk_html_write (GTK_HTML (priv->html), html_stream, options, strlen (options));
-
- const_html = "</td></tr></table>";
- gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
-
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_BODY_END, strlen(HTML_BODY_END));
- gtk_html_write (GTK_HTML (priv->html), html_stream,
- HTML_FOOTER, strlen(HTML_FOOTER));
-
- gtk_html_end (GTK_HTML (priv->html), html_stream, GTK_HTML_STREAM_OK);
-}
-
-
-static void
-show_current_event (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- gchar *itip_title, *itip_desc, *options;
-
- priv = itip->priv;
-
- switch (priv->method) {
- case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published meeting information.");
- itip_title = _("Meeting Information");
- options = PUBLISH_OPTIONS;
- break;
- case ICAL_METHOD_REQUEST:
- itip_desc = _("<b>%s</b> requests your presence at a meeting.");
- itip_title = _("Meeting Proposal");
- options = REQUEST_OPTIONS;
- break;
- case ICAL_METHOD_ADD:
- itip_desc = _("<b>%s</b> wishes to add to an existing meeting.");
- itip_title = _("Meeting Update");
- options = PUBLISH_OPTIONS;
- break;
- case ICAL_METHOD_REFRESH:
- itip_desc = _("<b>%s</b> wishes to receive the latest meeting information.");
- itip_title = _("Meeting Update Request");
- options = PUBLISH_OPTIONS;
- break;
- case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a meeting request.");
- itip_title = _("Meeting Reply");
- options = REPLY_OPTIONS;
- break;
- case ICAL_METHOD_CANCEL:
- itip_desc = _("<b>%s</b> has cancelled a meeting.");
- itip_title = _("Meeting Cancellation");
- options = CANCEL_OPTIONS;
- break;
- default:
- itip_desc = _("<b>%s</b> has sent an unintelligible message.");
- itip_title = _("Bad Meeting Message");
- options = NULL;
- }
-
- write_html (itip, itip_desc, itip_title, options);
-}
-
-static void
-show_current_todo (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- gchar *itip_title, *itip_desc, *options;
-
- priv = itip->priv;
-
- switch (priv->method) {
- case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published task information.");
- itip_title = _("Task Information");
- options = PUBLISH_OPTIONS;
- break;
- case ICAL_METHOD_REQUEST:
- itip_desc = _("<b>%s</b> requests you perform a task.");
- itip_title = _("Task Proposal");
- options = REQUEST_OPTIONS;
- break;
- case ICAL_METHOD_ADD:
- itip_desc = _("<b>%s</b> wishes to add to an existing task.");
- itip_title = _("Task Update");
- options = PUBLISH_OPTIONS;
- break;
- case ICAL_METHOD_REFRESH:
- itip_desc = _("<b>%s</b> wishes to receive the latest task information.");
- itip_title = _("Task Update Request");
- options = PUBLISH_OPTIONS;
- break;
- case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a task assignment.");
- itip_title = _("Task Reply");
- options = REPLY_OPTIONS;
- break;
- case ICAL_METHOD_CANCEL:
- itip_desc = _("<b>%s</b> has cancelled a task.");
- itip_title = _("Task Cancellation");
- options = CANCEL_OPTIONS;
- break;
- default:
- itip_desc = _("<b>%s</b> has sent an unintelligible message.");
- itip_title = _("Bad Task Message");
- options = NULL;
- }
-
- write_html (itip, itip_desc, itip_title, options);
-}
-
-static void
-show_current_freebusy (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- gchar *itip_title, *itip_desc, *options;
-
- priv = itip->priv;
-
- switch (priv->method) {
- case ICAL_METHOD_PUBLISH:
- itip_desc = _("<b>%s</b> has published free/busy information.");
- itip_title = _("Free/Busy Information");
- options = NULL;
- break;
- case ICAL_METHOD_REQUEST:
- itip_desc = _("<b>%s</b> requests your free/busy information.");
- itip_title = _("Free/Busy Request");
- options = REQUEST_FB_OPTIONS;
- break;
- case ICAL_METHOD_REPLY:
- itip_desc = _("<b>%s</b> has replied to a free/busy request.");
- itip_title = _("Free/Busy Reply");
- options = NULL;
- break;
- default:
- itip_desc = _("<b>%s</b> has sent an unintelligible message.");
- itip_title = _("Bad Free/Busy Message");
- options = NULL;
- }
-
- write_html (itip, itip_desc, itip_title, options);
-}
-
-static icalcomponent *
-get_next (icalcompiter *iter)
-{
- icalcomponent *ret = NULL;
- icalcomponent_kind kind = ICAL_NO_COMPONENT;
-
- while (kind != ICAL_VEVENT_COMPONENT
- && kind != ICAL_VTODO_COMPONENT
- && kind != ICAL_VFREEBUSY_COMPONENT) {
- icalcompiter_next (iter);
- ret = icalcompiter_deref (iter);
- kind = icalcomponent_isa (ret);
- }
-
- return ret;
-}
-
-static icalcomponent *
-get_prev (icalcompiter *iter)
-{
- icalcomponent *ret = NULL;
- icalcomponent_kind kind = ICAL_NO_COMPONENT;
-
- while (kind != ICAL_VEVENT_COMPONENT
- && kind != ICAL_VTODO_COMPONENT
- && kind != ICAL_VFREEBUSY_COMPONENT) {
- icalcompiter_prior (iter);
- ret = icalcompiter_deref (iter);
- kind = icalcomponent_isa (ret);
- }
-
- return ret;
-}
-
-static void
-show_current (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- CalComponentVType type;
- icalcomponent *alarm_comp;
- icalcompiter alarm_iter;
-
- priv = itip->priv;
-
- set_label (itip);
- set_button_status (itip);
-
- if (priv->comp)
- gtk_object_unref (GTK_OBJECT (priv->comp));
-
- /* Strip out alarms for security purposes */
- alarm_iter = icalcomponent_begin_component (priv->ical_comp, ICAL_VALARM_COMPONENT);
- while ((alarm_comp = icalcompiter_deref (&alarm_iter)) != NULL) {
- icalcomponent_remove_component (priv->ical_comp, alarm_comp);
-
- icalcompiter_next (&alarm_iter);
- }
-
- priv->comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (priv->comp, priv->ical_comp)) {
- write_error_html (itip, _("The message does not appear to be properly formed"));
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- return;
- };
-
- type = cal_component_get_vtype (priv->comp);
-
- switch (type) {
- case CAL_COMPONENT_EVENT:
- show_current_event (itip);
- break;
- case CAL_COMPONENT_TODO:
- show_current_todo (itip);
- break;
- case CAL_COMPONENT_FREEBUSY:
- show_current_freebusy (itip);
- break;
- default:
- write_error_html (itip, _("The message contains only unsupported requests."));
- }
-
- find_my_address (itip, priv->ical_comp);
-}
-
-void
-e_itip_control_set_data (EItipControl *itip, const gchar *text)
-{
- EItipControlPrivate *priv;
- icalproperty *prop;
- icalcomponent_kind kind = ICAL_NO_COMPONENT;
- icalcomponent *tz_comp;
- icalcompiter tz_iter;
-
- priv = itip->priv;
-
- clean_up (itip);
-
- priv->comp = NULL;
- priv->total = 0;
- priv->current = 0;
-
- priv->vcalendar = g_strdup (text);
- priv->top_level = cal_util_new_top_level ();
-
- priv->main_comp = icalparser_parse_string (priv->vcalendar);
- if (priv->main_comp == NULL) {
- write_error_html (itip, _("The attachment does not contain a valid calendar message"));
- return;
- }
-
- prop = icalcomponent_get_first_property (priv->main_comp, ICAL_METHOD_PROPERTY);
- if (prop == NULL) {
- write_error_html (itip, _("The attachment does not contain a valid calendar message"));
- return;
- }
-
- priv->method = icalproperty_get_method (prop);
-
- tz_iter = icalcomponent_begin_component (priv->main_comp, ICAL_VTIMEZONE_COMPONENT);
- while ((tz_comp = icalcompiter_deref (&tz_iter)) != NULL) {
- icalcomponent *clone;
-
- clone = icalcomponent_new_clone (tz_comp);
- icalcomponent_add_component (priv->top_level, clone);
-
- icalcompiter_next (&tz_iter);
- }
-
- priv->iter = icalcomponent_begin_component (priv->main_comp, ICAL_ANY_COMPONENT);
- priv->ical_comp = icalcompiter_deref (&priv->iter);
- kind = icalcomponent_isa (priv->ical_comp);
- if (kind != ICAL_VEVENT_COMPONENT
- && kind != ICAL_VTODO_COMPONENT
- && kind != ICAL_VFREEBUSY_COMPONENT)
- priv->ical_comp = get_next (&priv->iter);
-
- priv->total = icalcomponent_count_components (priv->main_comp, ICAL_VEVENT_COMPONENT);
- priv->total += icalcomponent_count_components (priv->main_comp, ICAL_VTODO_COMPONENT);
- priv->total += icalcomponent_count_components (priv->main_comp, ICAL_VFREEBUSY_COMPONENT);
-
- if (priv->total > 0)
- priv->current = 1;
- else
- priv->current = 0;
-
- show_current (itip);
-}
-
-gchar *
-e_itip_control_get_data (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- return g_strdup (priv->vcalendar);
-}
-
-gint
-e_itip_control_get_data_size (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- if (priv->vcalendar == NULL)
- return 0;
-
- return strlen (priv->vcalendar);
-}
-
-void
-e_itip_control_set_from_address (EItipControl *itip, const gchar *address)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- if (priv->from_address)
- g_free (priv->from_address);
-
- priv->from_address = g_strdup (address);
-}
-
-const gchar *
-e_itip_control_get_from_address (EItipControl *itip)
-{
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- return priv->from_address;
-}
-
-
-static void
-change_status (icalcomponent *ical_comp, const char *address, icalparameter_partstat status)
-{
- icalproperty *prop;
-
- prop = find_attendee (ical_comp, address);
- if (prop) {
- icalparameter *param;
-
- icalproperty_remove_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- param = icalparameter_new_partstat (status);
- icalproperty_add_parameter (prop, param);
- }
-}
-
-static void
-update_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- icalcomponent *clone;
- CalClient *client;
- CalComponentVType type;
- GtkWidget *dialog;
-
- priv = itip->priv;
-
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
- client = priv->task_client;
- else
- client = priv->event_client;
-
- clone = icalcomponent_new_clone (priv->ical_comp);
- icalcomponent_add_component (priv->top_level, clone);
-
- if (!cal_client_update_objects (client, priv->top_level))
- dialog = gnome_warning_dialog (_("Calendar file could not be updated!\n"));
- else
- dialog = gnome_ok_dialog (_("Update complete\n"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- icalcomponent_remove_component (priv->top_level, clone);
-}
-
-static void
-update_attendee_status (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- CalClient *client;
- CalClientGetStatus status;
- CalComponent *comp;
- CalComponentVType type;
- const char *uid;
- GtkWidget *dialog;
-
- priv = itip->priv;
-
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
- client = priv->task_client;
- else
- client = priv->event_client;
-
- /* Obtain our version */
- cal_component_get_uid (priv->comp, &uid);
- status = cal_client_get_object (client, uid, &comp);
-
- if (status == CAL_CLIENT_GET_SUCCESS) {
- GSList *attendees;
-
- cal_component_get_attendee_list (priv->comp, &attendees);
- if (attendees != NULL) {
- CalComponentAttendee *a = attendees->data;
- icalparameter_partstat partstat;
-
- partstat = find_attendee_partstat (priv->ical_comp, itip_strip_mailto (a->value));
-
- if (partstat != ICAL_PARTSTAT_NONE) {
- change_status (cal_component_get_icalcomponent (comp),
- itip_strip_mailto (a->value),
- partstat);
- } else {
- dialog = gnome_warning_dialog (_("Attendee status could "
- "not be updated because "
- "of an invalid status!\n"));
- goto cleanup;
- }
- }
-
- if (!cal_client_update_object (client, comp))
- dialog = gnome_warning_dialog (_("Attendee status ould not be updated!\n"));
- else
- dialog = gnome_ok_dialog (_("Attendee status updated\n"));
- } else {
- dialog = gnome_warning_dialog (_("Attendee status can not be updated "
- "because the item no longer exists"));
- }
-
- cleanup:
- gtk_object_unref (GTK_OBJECT (comp));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
-
-static void
-remove_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- CalClient *client;
- CalComponentVType type;
- const char *uid;
- GtkWidget *dialog;
-
- priv = itip->priv;
-
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
- client = priv->task_client;
- else
- client = priv->event_client;
-
- cal_component_get_uid (priv->comp, &uid);
- if (!cal_client_remove_object (client, uid))
- dialog = gnome_warning_dialog (_("I couldn't remove the item from your calendar file!\n"));
- else
- dialog = gnome_ok_dialog (_("Removal Complete"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
-
-static void
-send_item (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- CalComponent *comp;
- CalComponentVType type;
- const char *uid;
- CalClientGetStatus status;
- GtkWidget *dialog;
-
- priv = itip->priv;
-
- type = cal_component_get_vtype (priv->comp);
- cal_component_get_uid (priv->comp, &uid);
-
- switch (type) {
- case CAL_COMPONENT_EVENT:
- status = cal_client_get_object (priv->event_client, uid, &comp);
- break;
- case CAL_COMPONENT_TODO:
- status = cal_client_get_object (priv->task_client, uid, &comp);
- break;
- default:
- status = CAL_CLIENT_GET_NOT_FOUND;
- }
-
- if (status == CAL_CLIENT_GET_SUCCESS) {
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp);
- dialog = gnome_ok_dialog (_("Item sent!\n"));
- } else {
- dialog = gnome_warning_dialog (_("The item could not be sent!\n"));
- }
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
-
-static void
-send_freebusy (EItipControl *itip)
-{
- EItipControlPrivate *priv;
- CalComponentDateTime datetime;
- time_t start, end;
- GtkWidget *dialog;
- GList *comp_list;
-
- priv = itip->priv;
-
- /* FIXME: timezones and free these. */
- cal_component_get_dtstart (priv->comp, &datetime);
- start = icaltime_as_timet (*datetime.value);
- cal_component_get_dtend (priv->comp, &datetime);
- end = icaltime_as_timet (*datetime.value);
- comp_list = cal_client_get_free_busy (priv->event_client, NULL, start, end);
-
- if (comp_list) {
- GList *l;
-
- for (l = comp_list; l; l = l->next) {
- CalComponent *comp = CAL_COMPONENT (l->data);
- itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp);
-
- gtk_object_unref (GTK_OBJECT (comp));
- }
- dialog = gnome_ok_dialog (_("Item sent!\n"));
-
- g_list_free (comp_list);
- } else {
- dialog = gnome_warning_dialog (_("The item could not be sent!\n"));
- }
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
-
-static void
-prev_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EItipControl *itip = E_ITIP_CONTROL (data);
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- priv->current--;
- priv->ical_comp = get_prev (&priv->iter);
-
- show_current (itip);
-}
-
-static void
-next_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EItipControl *itip = E_ITIP_CONTROL (data);
- EItipControlPrivate *priv;
-
- priv = itip->priv;
-
- priv->current++;
- priv->ical_comp = get_next (&priv->iter);
-
- show_current (itip);
-}
-
-static void
-url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data)
-{ unsigned char buffer[4096];
- int len, fd;
- char *path;
-
- path = g_strdup_printf ("%s/%s", EVOLUTION_ICONSDIR, url);
-
- if ((fd = open (path, O_RDONLY)) == -1) {
- g_warning ("%s", g_strerror (errno));
- goto cleanup;
- }
-
- while ((len = read (fd, buffer, 4096)) > 0) {
- gtk_html_write (html, handle, buffer, len);
- }
-
- if (len < 0) {
- /* check to see if we stopped because of an error */
- gtk_html_end (html, handle, GTK_HTML_STREAM_ERROR);
- g_warning ("%s", g_strerror (errno));
- goto cleanup;
- }
- /* done with no errors */
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
- close (fd);
-
- cleanup:
- g_free (path);
-}
-
-static void
-ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar *encoding, gpointer data)
-{
- EItipControl *itip = E_ITIP_CONTROL (data);
- EItipControlPrivate *priv;
- gchar **fields;
- gboolean rsvp = FALSE;
- int i;
-
- priv = itip->priv;
-
- fields = g_strsplit (encoding, "&", -1);
- for (i = 0; fields[i] != NULL; i++) {
- gchar **key_value;
-
- key_value = g_strsplit (fields[i], "=", 2);
-
- if (key_value[0] != NULL && !strcmp (key_value[0], "action")) {
- if (key_value[1] == NULL)
- break;
-
- switch (key_value[1][0]) {
- case 'U':
- update_item (itip);
- break;
- case 'A':
- change_status (priv->ical_comp, priv->my_address, ICAL_PARTSTAT_ACCEPTED);
- update_item (itip);
- break;
- case 'T':
- change_status (priv->ical_comp, priv->my_address, ICAL_PARTSTAT_TENTATIVE);
- update_item (itip);
- break;
- case 'D':
- change_status (priv->ical_comp, priv->my_address, ICAL_PARTSTAT_DECLINED);
- update_item (itip);
- break;
- case 'F':
- send_freebusy (itip);
- break;
- case 'R':
- update_attendee_status (itip);
- break;
- case 'S':
- send_item (itip);
- break;
- case 'C':
- remove_item (itip);
- break;
- }
- }
-
- if (key_value[0] != NULL && !strcmp (key_value[0], "rsvp"))
- if (*key_value[1] == '1')
- rsvp = TRUE;
-
- g_strfreev (key_value);
-
- }
- g_strfreev (fields);
-
- if (rsvp) {
- CalComponent *comp = NULL;
-
- comp = cal_component_clone (priv->comp);
- if (comp == NULL)
- return;
-
- if (priv->my_address != NULL) {
- icalcomponent *ical_comp;
- icalproperty *prop;
- const char *attendee, *text;
- icalvalue *value;
-
- ical_comp = cal_component_get_icalcomponent (comp);
-
- for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
- {
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
- text = itip_strip_mailto (attendee);
-
- if (!strstr (text, priv->my_address)) {
- icalcomponent_remove_property (ical_comp, prop);
- icalproperty_free (prop);
- }
- }
- itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp);
- } else {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog (_("Unable to find any of your identities "
- "in the attendees list!\n"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- }
- gtk_object_unref (GTK_OBJECT (comp));
- }
-}
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 46b0aee846..0000000000
--- a/calendar/gui/e-itip-control.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-itip-control.h
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifndef _E_ITIP_CONTROL_H_
-#define _E_ITIP_CONTROL_H_
-
-#include <gtk/gtk.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_ITIP_CONTROL (e_itip_control_get_type ())
-#define E_ITIP_CONTROL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_ITIP_CONTROL, EItipControl))
-#define E_ITIP_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_ITIP_CONTROL, EItipControlClass))
-#define E_IS_ITIP_CONTROL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_ITIP_CONTROL))
-#define E_IS_ITIP_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_ITIP_CONTROL))
-
-
-typedef struct _EItipControl EItipControl;
-typedef struct _EItipControlPrivate EItipControlPrivate;
-typedef struct _EItipControlClass EItipControlClass;
-
-struct _EItipControl {
- GtkVBox parent;
-
- EItipControlPrivate *priv;
-};
-
-struct _EItipControlClass {
- GtkVBoxClass parent_class;
-};
-
-
-
-GtkType e_itip_control_get_type (void);
-GtkWidget * e_itip_control_new (void);
-void e_itip_control_set_data (EItipControl *itip,
- const gchar *text);
-gchar * e_itip_control_get_data (EItipControl *itip);
-gint e_itip_control_get_data_size (EItipControl *itip);
-void e_itip_control_set_from_address (EItipControl *itip,
- const gchar *address);
-const gchar *e_itip_control_get_from_address (EItipControl *itip);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_ITIP_CONTROL_H_ */
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
deleted file mode 100644
index 08ec9a1152..0000000000
--- a/calendar/gui/e-meeting-attendee.c
+++ /dev/null
@@ -1,998 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-attendee.c
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <gtk/gtk.h>
-#include "e-meeting-attendee.h"
-
-struct _EMeetingAttendeePrivate {
- EMeetingAttendeeType type;
-
- gchar *address;
- gchar *member;
-
- icalparameter_cutype cutype;
- icalparameter_role role;
-
- gboolean rsvp;
-
- gchar *delto;
- gchar *delfrom;
-
- icalparameter_partstat status;
-
- gchar *sentby;
- gchar *cn;
- gchar *language;
-
- gboolean has_calendar_info;
-
- GArray *busy_periods;
- gboolean busy_periods_sorted;
-
- EMeetingTime busy_periods_start;
- EMeetingTime busy_periods_end;
- gboolean start_busy_range_set;
- gboolean end_busy_range_set;
-
- gint longest_period_in_days;
-};
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL];
-
-static void class_init (EMeetingAttendeeClass *klass);
-static void init (EMeetingAttendee *ia);
-static void destroy (GtkObject *obj);
-
-
-static GtkObjectClass *parent_class = NULL;
-
-
-GtkType
-e_meeting_attendee_get_type (void)
-{
- static GtkType type = 0;
-
- if (type == 0)
- {
- static const GtkTypeInfo info =
- {
- "EMeetingAttendee",
- sizeof (EMeetingAttendee),
- sizeof (EMeetingAttendeeClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (gtk_object_get_type (), &info);
- }
-
- return type;
-}
-
-static void
-class_init (EMeetingAttendeeClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMeetingAttendeeClass, changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
- object_class->destroy = destroy;
-}
-
-static gchar *
-string_test (gchar *string)
-{
- return string != NULL ? string : g_strdup ("");
-}
-
-static gboolean
-string_is_set (gchar *string)
-{
- if (string != NULL && *string != '\0')
- return TRUE;
-
- return FALSE;
-}
-
-static void
-notify_changed (EMeetingAttendee *ia)
-{
- gtk_signal_emit (GTK_OBJECT (ia), signals[CHANGED]);
-}
-
-static void
-init (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = g_new0 (EMeetingAttendeePrivate, 1);
-
- ia->priv = priv;
-
- priv->type = E_MEETING_ATTENDEE_REQUIRED_PERSON;
-
- priv->address = string_test (NULL);
- priv->member = string_test (NULL);
-
- priv->cutype = ICAL_CUTYPE_NONE;
- priv->role = ICAL_ROLE_NONE;
-
- priv->rsvp = FALSE;
-
- priv->delto = string_test (NULL);
- priv->delfrom = string_test (NULL);
-
- priv->status = ICAL_PARTSTAT_NONE;
-
- priv->sentby = string_test (NULL);
- priv->cn = string_test (NULL);
- priv->language = string_test (NULL);
-
- priv->has_calendar_info = FALSE;
-
- priv->busy_periods = g_array_new (FALSE, FALSE, sizeof (EMeetingFreeBusyPeriod));
- priv->busy_periods_sorted = FALSE;
-
- g_date_clear (&priv->busy_periods_start.date, 1);
- priv->busy_periods_start.hour = 0;
- priv->busy_periods_start.minute = 0;
-
- g_date_clear (&priv->busy_periods_end.date, 1);
- priv->busy_periods_end.hour = 0;
- priv->busy_periods_end.minute = 0;
-
- priv->start_busy_range_set = FALSE;
- priv->end_busy_range_set = FALSE;
-
- priv->longest_period_in_days = 0;
-}
-
-
-static void
-destroy (GtkObject *obj)
-{
- EMeetingAttendee *ia = E_MEETING_ATTENDEE (obj);
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- g_free (priv->address);
- g_free (priv->member);
-
- g_free (priv->delto);
- g_free (priv->delfrom);
-
- g_free (priv->sentby);
- g_free (priv->cn);
- g_free (priv->language);
-
- g_array_free (priv->busy_periods, TRUE);
-
- g_free (priv);
-}
-
-GtkObject *
-e_meeting_attendee_new (void)
-{
- return gtk_type_new (E_TYPE_MEETING_ATTENDEE);
-}
-
-GtkObject *
-e_meeting_attendee_new_from_cal_component_attendee (CalComponentAttendee *ca)
-{
- EMeetingAttendee *ia;
-
- ia = E_MEETING_ATTENDEE (gtk_type_new (E_TYPE_MEETING_ATTENDEE));
-
- e_meeting_attendee_set_address (ia, g_strdup (ca->value));
- e_meeting_attendee_set_member (ia, g_strdup (ca->member));
- e_meeting_attendee_set_cutype (ia, ca->cutype);
- e_meeting_attendee_set_role (ia, ca->role);
- e_meeting_attendee_set_status (ia, ca->status);
- e_meeting_attendee_set_rsvp (ia, ca->rsvp);
- e_meeting_attendee_set_delto (ia, g_strdup (ca->delto));
- e_meeting_attendee_set_delfrom (ia, g_strdup (ca->delfrom));
- e_meeting_attendee_set_sentby (ia, g_strdup (ca->sentby));
- e_meeting_attendee_set_cn (ia, g_strdup (ca->cn));
- e_meeting_attendee_set_language (ia, g_strdup (ca->language));
-
- return GTK_OBJECT (ia);
-}
-
-CalComponentAttendee *
-e_meeting_attendee_as_cal_component_attendee (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
- CalComponentAttendee *ca;
-
- priv = ia->priv;
-
- ca = g_new0 (CalComponentAttendee, 1);
-
- ca->value = priv->address;
- ca->member = string_is_set (priv->member) ? priv->member : NULL;
- ca->cutype= priv->cutype;
- ca->role = priv->role;
- ca->status = priv->status;
- ca->rsvp = priv->rsvp;
- ca->delto = string_is_set (priv->delto) ? priv->delto : NULL;
- ca->delfrom = string_is_set (priv->delfrom) ? priv->delfrom : NULL;
- ca->sentby = string_is_set (priv->sentby) ? priv->sentby : NULL;
- ca->cn = string_is_set (priv->cn) ? priv->cn : NULL;
- ca->language = string_is_set (priv->language) ? priv->language : NULL;
-
- return ca;
-}
-
-
-const gchar *
-e_meeting_attendee_get_address (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->address;
-}
-
-void
-e_meeting_attendee_set_address (EMeetingAttendee *ia, gchar *address)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->address != NULL)
- g_free (priv->address);
-
- priv->address = string_test (address);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_address (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->address);
-}
-
-const gchar *
-e_meeting_attendee_get_member (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->member;
-}
-
-void
-e_meeting_attendee_set_member (EMeetingAttendee *ia, gchar *member)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->member != NULL)
- g_free (priv->member);
-
- priv->member = string_test (member);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_member (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->member);
-}
-
-icalparameter_cutype
-e_meeting_attendee_get_cutype (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->cutype;
-}
-
-void
-e_meeting_attendee_set_cutype (EMeetingAttendee *ia, icalparameter_cutype cutype)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- priv->cutype = cutype;
-
- notify_changed (ia);
-}
-
-icalparameter_role
-e_meeting_attendee_get_role (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->role;
-}
-
-void
-e_meeting_attendee_set_role (EMeetingAttendee *ia, icalparameter_role role)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- priv->role = role;
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_get_rsvp (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->rsvp;
-}
-
-void
-e_meeting_attendee_set_rsvp (EMeetingAttendee *ia, gboolean rsvp)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- priv->rsvp = rsvp;
-
- notify_changed (ia);
-}
-
-const gchar *
-e_meeting_attendee_get_delto (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->delto;
-}
-
-void
-e_meeting_attendee_set_delto (EMeetingAttendee *ia, gchar *delto)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->delto != NULL)
- g_free (priv->delto);
-
- priv->delto = string_test (delto);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_delto (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->delto);
-}
-
-const gchar *
-e_meeting_attendee_get_delfrom (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->delfrom;
-}
-
-void
-e_meeting_attendee_set_delfrom (EMeetingAttendee *ia, gchar *delfrom)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->delfrom != NULL)
- g_free (priv->delfrom);
-
- priv->delfrom = string_test (delfrom);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_delfrom (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->delfrom);
-}
-
-icalparameter_partstat
-e_meeting_attendee_get_status (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->status;
-}
-
-void
-e_meeting_attendee_set_status (EMeetingAttendee *ia, icalparameter_partstat status)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- priv->status = status;
-
- notify_changed (ia);
-}
-
-const gchar *
-e_meeting_attendee_get_sentby (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->sentby;
-}
-
-void
-e_meeting_attendee_set_sentby (EMeetingAttendee *ia, gchar *sentby)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->sentby != NULL)
- g_free (priv->sentby);
-
- priv->sentby = string_test (sentby);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_sentby (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->sentby);
-}
-
-const gchar *
-e_meeting_attendee_get_cn (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->cn;
-}
-
-void
-e_meeting_attendee_set_cn (EMeetingAttendee *ia, gchar *cn)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->cn != NULL)
- g_free (priv->cn);
-
- priv->cn = string_test (cn);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_cn (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->cn);
-}
-
-const gchar *
-e_meeting_attendee_get_language (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->language;
-}
-
-void
-e_meeting_attendee_set_language (EMeetingAttendee *ia, gchar *language)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->language != NULL)
- g_free (priv->language);
-
- priv->language = string_test (language);
-
- notify_changed (ia);
-}
-
-gboolean
-e_meeting_attendee_is_set_language (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return string_is_set (priv->language);
-}
-
-EMeetingAttendeeType
-e_meeting_attendee_get_atype (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->type;
-}
-
-void
-e_meeting_attendee_set_atype (EMeetingAttendee *ia, EMeetingAttendeeType type)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- priv->type = type;
-}
-
-
-static gint
-compare_times (EMeetingTime *time1,
- EMeetingTime *time2)
-{
- gint day_comparison;
-
- day_comparison = g_date_compare (&time1->date,
- &time2->date);
- if (day_comparison != 0)
- return day_comparison;
-
- if (time1->hour < time2->hour)
- return -1;
- if (time1->hour > time2->hour)
- return 1;
-
- if (time1->minute < time2->minute)
- return -1;
- if (time1->minute > time2->minute)
- return 1;
-
- /* The start times are exactly the same. */
- return 0;
-}
-
-static gint
-compare_period_starts (const void *arg1,
- const void *arg2)
-{
- EMeetingFreeBusyPeriod *period1, *period2;
-
- period1 = (EMeetingFreeBusyPeriod *) arg1;
- period2 = (EMeetingFreeBusyPeriod *) arg2;
-
- return compare_times (&period1->start, &period2->start);
-}
-
-static void
-ensure_periods_sorted (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- if (priv->busy_periods_sorted)
- return;
-
- qsort (priv->busy_periods->data, priv->busy_periods->len,
- sizeof (EMeetingFreeBusyPeriod),
- compare_period_starts);
-
- priv->busy_periods_sorted = TRUE;
-}
-
-gboolean
-e_meeting_attendee_get_has_calendar_info (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->has_calendar_info;
-}
-
-void
-e_meeting_attendee_set_has_calendar_info (EMeetingAttendee *ia, gboolean has_calendar_info)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- priv->has_calendar_info = has_calendar_info;
-}
-
-const GArray *
-e_meeting_attendee_get_busy_periods (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- ensure_periods_sorted (ia);
-
- return priv->busy_periods;
-}
-
-gint
-e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
-{
- EMeetingAttendeePrivate *priv;
- EMeetingFreeBusyPeriod *period;
- gint lower, upper, middle = 0, cmp = 0;
- GDate tmp_date;
-
- priv = ia->priv;
-
- /* Make sure the busy periods have been sorted. */
- ensure_periods_sorted (ia);
-
- /* Calculate the first day which could have a busy period which
- continues onto our given date. */
- tmp_date = *date;
- g_date_subtract_days (&tmp_date, priv->longest_period_in_days);
-
- /* We want the first busy period which starts on tmp_date. */
- lower = 0;
- upper = priv->busy_periods->len;
-
- if (upper == 0)
- return -1;
-
- while (lower < upper) {
- middle = (lower + upper) >> 1;
-
- period = &g_array_index (priv->busy_periods,
- EMeetingFreeBusyPeriod, middle);
-
- cmp = g_date_compare (&tmp_date, &period->start.date);
-
- if (cmp == 0)
- break;
- else if (cmp < 0)
- upper = middle;
- else
- lower = middle + 1;
- }
-
- /* There may be several busy periods on the same day so we step
- backwards to the first one. */
- if (cmp == 0) {
- while (middle > 0) {
- period = &g_array_index (priv->busy_periods,
- EMeetingFreeBusyPeriod, middle - 1);
- if (g_date_compare (&tmp_date, &period->start.date) != 0)
- break;
- middle--;
- }
- } else if (cmp > 0) {
- /* This means we couldn't find a period on the given day, and
- the last one we looked at was before it, so if there are
- any more periods after this one we return it. */
- middle++;
- if (priv->busy_periods->len <= middle)
- return -1;
- }
-
- return middle;
-}
-
-gboolean
-e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute,
- EMeetingFreeBusyType busy_type)
-{
- EMeetingAttendeePrivate *priv;
- EMeetingFreeBusyPeriod period;
- gint period_in_days;
-
- g_return_val_if_fail (ia != NULL, FALSE);
- g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), FALSE);
- g_return_val_if_fail (busy_type >= 0, FALSE);
- g_return_val_if_fail (busy_type < E_MEETING_FREE_BUSY_LAST, FALSE);
-
- priv = ia->priv;
-
- /* Check the dates are valid. */
- if (!g_date_valid_dmy (start_day, start_month, start_year))
- return FALSE;
- if (!g_date_valid_dmy (end_day, end_month, end_year))
- return FALSE;
- if (start_hour < 0 || start_hour > 23)
- return FALSE;
- if (end_hour < 0 || end_hour > 23)
- return FALSE;
- if (start_minute < 0 || start_minute > 59)
- return FALSE;
- if (end_minute < 0 || end_minute > 59)
- return FALSE;
-
- g_date_clear (&period.start.date, 1);
- g_date_clear (&period.end.date, 1);
- g_date_set_dmy (&period.start.date, start_day, start_month, start_year);
- g_date_set_dmy (&period.end.date, end_day, end_month, end_year);
- period.start.hour = start_hour;
- period.start.minute = start_minute;
- period.end.hour = end_hour;
- period.end.minute = end_minute;
- period.busy_type = busy_type;
-
- /* Check that the start time is before or equal to the end time. */
- if (compare_times (&period.start, &period.end) > 0)
- return FALSE;
-
- /* If the busy range is not set elsewhere, track it as best we can */
- if (!priv->start_busy_range_set) {
- if (!g_date_valid (&priv->busy_periods_start.date)) {
- priv->busy_periods_start.date = period.start.date;
- priv->busy_periods_start.hour = period.start.hour;
- priv->busy_periods_start.minute = period.start.minute;
- } else {
- switch (g_date_compare (&period.start.date, &priv->busy_periods_start.date)) {
- case -1:
- priv->busy_periods_start.date = period.start.date;
- priv->busy_periods_start.hour = period.start.hour;
- priv->busy_periods_start.minute = period.start.minute;
- break;
- case 0:
- if (period.start.hour < priv->busy_periods_start.hour
- || (period.start.hour == priv->busy_periods_start.hour
- && period.start.minute < priv->busy_periods_start.minute)) {
- priv->busy_periods_start.date = period.start.date;
- priv->busy_periods_start.hour = period.start.hour;
- priv->busy_periods_start.minute = period.start.minute;
- break;
- }
- break;
- }
- }
- }
- if (!priv->end_busy_range_set) {
- if (!g_date_valid (&priv->busy_periods_end.date)) {
- priv->busy_periods_end.date = period.end.date;
- priv->busy_periods_end.hour = period.end.hour;
- priv->busy_periods_end.minute = period.end.minute;
- } else {
- switch (g_date_compare (&period.end.date, &priv->busy_periods_end.date)) {
- case 0:
- if (period.end.hour > priv->busy_periods_end.hour
- || (period.end.hour == priv->busy_periods_end.hour
- && period.end.minute > priv->busy_periods_end.minute)) {
- priv->busy_periods_end.date = period.end.date;
- priv->busy_periods_end.hour = period.end.hour;
- priv->busy_periods_end.minute = period.end.minute;
- break;
- }
- break;
- case 1:
- priv->busy_periods_end.date = period.end.date;
- priv->busy_periods_end.hour = period.end.hour;
- priv->busy_periods_end.minute = period.end.minute;
- break;
- }
- }
- }
-
- g_array_append_val (priv->busy_periods, period);
- priv->has_calendar_info = TRUE;
- priv->busy_periods_sorted = FALSE;
-
- period_in_days = g_date_julian (&period.end.date) - g_date_julian (&period.start.date) + 1;
- priv->longest_period_in_days = MAX (priv->longest_period_in_days, period_in_days);
-
- return TRUE;
-}
-
-EMeetingTime
-e_meeting_attendee_get_start_busy_range (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->busy_periods_start;
-}
-
-EMeetingTime
-e_meeting_attendee_get_end_busy_range (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- priv = ia->priv;
-
- return priv->busy_periods_end;
-}
-
-gboolean
-e_meeting_attendee_set_start_busy_range (EMeetingAttendee *ia,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute)
-{
- EMeetingAttendeePrivate *priv;
-
- g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), FALSE);
-
- priv = ia->priv;
-
- /* Check the dates are valid. */
- if (!g_date_valid_dmy (start_day, start_month, start_year))
- return FALSE;
- if (start_hour < 0 || start_hour > 23)
- return FALSE;
- if (start_minute < 0 || start_minute > 59)
- return FALSE;
-
- g_date_clear (&priv->busy_periods_start.date, 1);
- g_date_set_dmy (&priv->busy_periods_start.date,
- start_day, start_month, start_year);
- priv->busy_periods_start.hour = start_hour;
- priv->busy_periods_start.minute = start_minute;
-
- priv->start_busy_range_set = TRUE;
-
- return TRUE;
-}
-
-gboolean
-e_meeting_attendee_set_end_busy_range (EMeetingAttendee *ia,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute)
-{
- EMeetingAttendeePrivate *priv;
-
- g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), FALSE);
-
- priv = ia->priv;
-
- /* Check the dates are valid. */
- if (!g_date_valid_dmy (end_day, end_month, end_year))
- return FALSE;
- if (end_hour < 0 || end_hour > 23)
- return FALSE;
- if (end_minute < 0 || end_minute > 59)
- return FALSE;
-
- g_date_clear (&priv->busy_periods_end.date, 1);
- g_date_set_dmy (&priv->busy_periods_end.date,
- end_day, end_month, end_year);
- priv->busy_periods_end.hour = end_hour;
- priv->busy_periods_end.minute = end_minute;
-
- priv->end_busy_range_set = TRUE;
-
- return TRUE;
-}
-
-/* Clears all busy times for the given attendee. */
-void
-e_meeting_attendee_clear_busy_periods (EMeetingAttendee *ia)
-{
- EMeetingAttendeePrivate *priv;
-
- g_return_if_fail (E_IS_MEETING_ATTENDEE (ia));
-
- priv = ia->priv;
-
- g_array_set_size (priv->busy_periods, 0);
- priv->busy_periods_sorted = TRUE;
-
- g_date_clear (&priv->busy_periods_start.date, 1);
- priv->busy_periods_start.hour = 0;
- priv->busy_periods_start.minute = 0;
-
- g_date_clear (&priv->busy_periods_end.date, 1);
- priv->busy_periods_end.hour = 0;
- priv->busy_periods_end.minute = 0;
-
- priv->longest_period_in_days = 0;
-}
diff --git a/calendar/gui/e-meeting-attendee.h b/calendar/gui/e-meeting-attendee.h
deleted file mode 100644
index 97de14f8e9..0000000000
--- a/calendar/gui/e-meeting-attendee.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-meeting_attendee.h
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifndef _E_MEETING_ATTENDEE_H_
-#define _E_MEETING_ATTENDEE_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <cal-util/cal-component.h>
-#include "e-meeting-types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_MEETING_ATTENDEE (e_meeting_attendee_get_type ())
-#define E_MEETING_ATTENDEE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MEETING_ATTENDEE, EMeetingAttendee))
-#define E_MEETING_ATTENDEE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MEETING_ATTENDEE, EMeetingAttendeeClass))
-#define E_IS_MEETING_ATTENDEE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_MEETING_ATTENDEE))
-#define E_IS_MEETING_ATTENDEE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MEETING_ATTENDEE))
-
-
-typedef struct _EMeetingAttendee EMeetingAttendee;
-typedef struct _EMeetingAttendeePrivate EMeetingAttendeePrivate;
-typedef struct _EMeetingAttendeeClass EMeetingAttendeeClass;
-
-/* These specify the type of attendee. Either a person or a resource (e.g. a
- meeting room). These are used for the Autopick options, where the user can
- ask for a time when, for example, all people and one resource are free.
- The default is E_MEETING_ATTENDEE_REQUIRED_PERSON. */
-typedef enum
-{
- E_MEETING_ATTENDEE_REQUIRED_PERSON,
- E_MEETING_ATTENDEE_OPTIONAL_PERSON,
- E_MEETING_ATTENDEE_RESOURCE
-} EMeetingAttendeeType;
-
-struct _EMeetingAttendee {
- GtkObject parent;
-
- EMeetingAttendeePrivate *priv;
-};
-
-struct _EMeetingAttendeeClass {
- GtkObjectClass parent_class;
-
- void (* changed) (EMeetingAttendee *ia);
-};
-
-
-GtkType e_meeting_attendee_get_type (void);
-GtkObject *e_meeting_attendee_new (void);
-GtkObject *e_meeting_attendee_new_from_cal_component_attendee (CalComponentAttendee *ca);
-
-CalComponentAttendee *e_meeting_attendee_as_cal_component_attendee (EMeetingAttendee *ia);
-
-const gchar *e_meeting_attendee_get_address (EMeetingAttendee *ia);
-void e_meeting_attendee_set_address (EMeetingAttendee *ia, gchar *address);
-gboolean e_meeting_attendee_is_set_address (EMeetingAttendee *ia);
-
-const gchar *e_meeting_attendee_get_member (EMeetingAttendee *ia);
-void e_meeting_attendee_set_member (EMeetingAttendee *ia, gchar *member);
-gboolean e_meeting_attendee_is_set_member (EMeetingAttendee *ia);
-
-icalparameter_cutype e_meeting_attendee_get_cutype (EMeetingAttendee *ia);
-void e_meeting_attendee_set_cutype (EMeetingAttendee *ia, icalparameter_cutype cutype);
-
-icalparameter_role e_meeting_attendee_get_role (EMeetingAttendee *ia);
-void e_meeting_attendee_set_role (EMeetingAttendee *ia, icalparameter_role role);
-
-gboolean e_meeting_attendee_get_rsvp (EMeetingAttendee *ia);
-void e_meeting_attendee_set_rsvp (EMeetingAttendee *ia, gboolean rsvp);
-
-const gchar *e_meeting_attendee_get_delto (EMeetingAttendee *ia);
-void e_meeting_attendee_set_delto (EMeetingAttendee *ia, gchar *delto);
-gboolean e_meeting_attendee_is_set_delto (EMeetingAttendee *ia);
-
-const gchar *e_meeting_attendee_get_delfrom (EMeetingAttendee *ia);
-void e_meeting_attendee_set_delfrom (EMeetingAttendee *ia, gchar *delfrom);
-gboolean e_meeting_attendee_is_set_delfrom (EMeetingAttendee *ia);
-
-icalparameter_partstat e_meeting_attendee_get_status (EMeetingAttendee *ia);
-void e_meeting_attendee_set_status (EMeetingAttendee *ia, icalparameter_partstat status);
-
-const gchar *e_meeting_attendee_get_sentby (EMeetingAttendee *ia);
-void e_meeting_attendee_set_sentby (EMeetingAttendee *ia, gchar *sentby);
-gboolean e_meeting_attendee_is_set_sentby (EMeetingAttendee *ia);
-
-const gchar *e_meeting_attendee_get_cn (EMeetingAttendee *ia);
-void e_meeting_attendee_set_cn (EMeetingAttendee *ia, gchar *cn);
-gboolean e_meeting_attendee_is_set_cn (EMeetingAttendee *ia);
-
-const gchar *e_meeting_attendee_get_language (EMeetingAttendee *ia);
-void e_meeting_attendee_set_language (EMeetingAttendee *ia, gchar *language);
-gboolean e_meeting_attendee_is_set_language (EMeetingAttendee *ia);
-
-EMeetingAttendeeType e_meeting_attendee_get_atype (EMeetingAttendee *ia);
-void e_meeting_attendee_set_atype (EMeetingAttendee *ia, EMeetingAttendeeType type);
-
-gboolean e_meeting_attendee_get_has_calendar_info (EMeetingAttendee *ia);
-void e_meeting_attendee_set_has_calendar_info (EMeetingAttendee *ia, gboolean has_calendar_info);
-
-const GArray *e_meeting_attendee_get_busy_periods (EMeetingAttendee *ia);
-gint e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date);
-gboolean e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute,
- EMeetingFreeBusyType busy_type);
-
-EMeetingTime e_meeting_attendee_get_start_busy_range (EMeetingAttendee *ia);
-EMeetingTime e_meeting_attendee_get_end_busy_range (EMeetingAttendee *ia);
-
-gboolean e_meeting_attendee_set_start_busy_range (EMeetingAttendee *ia,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute);
-gboolean e_meeting_attendee_set_end_busy_range (EMeetingAttendee *ia,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute);
-
-void e_meeting_attendee_clear_busy_periods (EMeetingAttendee *ia);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_MEETING_ATTENDEE_H_ */
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
deleted file mode 100644
index a545c0bbf9..0000000000
--- a/calendar/gui/e-meeting-model.c
+++ /dev/null
@@ -1,1316 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* itip-model.c
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-cell-popup.h>
-#include <gal/e-table/e-cell-combo.h>
-#include <e-book.h>
-#include <e-card-types.h>
-#include <e-card-cursor.h>
-#include <e-card.h>
-#include <e-card-simple.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/cal-util.h>
-#include <cal-util/timeutil.h>
-#include "calendar-config.h"
-#include "itip-utils.h"
-#include "e-meeting-attendee.h"
-#include "e-meeting-model.h"
-
-enum columns {
- ITIP_ADDRESS_COL,
- ITIP_MEMBER_COL,
- ITIP_TYPE_COL,
- ITIP_ROLE_COL,
- ITIP_RSVP_COL,
- ITIP_DELTO_COL,
- ITIP_DELFROM_COL,
- ITIP_STATUS_COL,
- ITIP_CN_COL,
- ITIP_LANGUAGE_COL,
- ITIP_COLUMN_COUNT
-};
-
-struct _EMeetingModelPrivate
-{
- GPtrArray *attendees;
-
- CalClient *client;
-
- EBook *ebook;
- gboolean book_loaded;
- gboolean book_load_wait;
-
- GList *refresh_callbacks;
- GList *refresh_data;
- gint refresh_count;
- gboolean refreshing;
-};
-
-#define BUF_SIZE 1024
-
-typedef struct _EMeetingModelAttendeeRefreshData EMeetingModelAttendeeRefreshData;
-struct _EMeetingModelAttendeeRefreshData {
- char buffer[BUF_SIZE];
- GString *string;
-
- EMeetingAttendee *ia;
-};
-
-typedef struct _EMeetingModelRefreshData EMeetingModelRefreshData;
-struct _EMeetingModelRefreshData {
- EMeetingModel *im;
-
- EMeetingModelAttendeeRefreshData attendee_data;
-};
-
-
-static void class_init (EMeetingModelClass *klass);
-static void init (EMeetingModel *model);
-static void destroy (GtkObject *obj);
-
-static void attendee_changed_cb (EMeetingAttendee *ia, gpointer data);
-
-static ETableModelClass *parent_class = NULL;
-
-
-GtkType
-e_meeting_model_get_type (void)
-{
- static GtkType type = 0;
-
- if (type == 0)
- {
- static const GtkTypeInfo info =
- {
- "EMeetingModel",
- sizeof (EMeetingModel),
- sizeof (EMeetingModelClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (e_table_model_get_type (), &info);
- }
-
- return type;
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- if (status == E_BOOK_STATUS_SUCCESS)
- priv->book_loaded = TRUE;
- else
- g_warning ("Book not loaded");
-
- if (priv->book_load_wait) {
- priv->book_load_wait = FALSE;
- gtk_main_quit ();
- }
-}
-
-static int
-start_addressbook_server (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
- gchar *uri, *path;
-
- priv = im->priv;
-
- priv->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 (priv->ebook, uri, book_open_cb, im);
-
- g_free (uri);
-}
-
-static EMeetingAttendee *
-find_match (EMeetingModel *im, const char *address, int *pos)
-{
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
- const gchar *ia_address;
- int i;
-
- priv = im->priv;
-
- if (address == NULL)
- return NULL;
-
- /* Make sure we can add the new delegatee person */
- for (i = 0; i < priv->attendees->len; i++) {
- ia = g_ptr_array_index (priv->attendees, i);
-
- ia_address = e_meeting_attendee_get_address (ia);
- if (ia_address != NULL && !g_strcasecmp (itip_strip_mailto (ia_address), itip_strip_mailto (address))) {
- if (pos != NULL)
- *pos = i;
- return ia;
- }
- }
-
- return NULL;
-}
-
-static icalparameter_cutype
-text_to_type (const char *type)
-{
- if (!g_strcasecmp (type, _("Individual")))
- return ICAL_CUTYPE_INDIVIDUAL;
- else if (!g_strcasecmp (type, _("Group")))
- return ICAL_CUTYPE_GROUP;
- else if (!g_strcasecmp (type, _("Resource")))
- return ICAL_CUTYPE_RESOURCE;
- else if (!g_strcasecmp (type, _("Room")))
- return ICAL_CUTYPE_ROOM;
- else
- return ICAL_CUTYPE_NONE;
-}
-
-static char *
-type_to_text (icalparameter_cutype type)
-{
- switch (type) {
- case ICAL_CUTYPE_INDIVIDUAL:
- return _("Individual");
- case ICAL_CUTYPE_GROUP:
- return _("Group");
- case ICAL_CUTYPE_RESOURCE:
- return _("Resource");
- case ICAL_CUTYPE_ROOM:
- return _("Room");
- default:
- return _("Unknown");
- }
-
- return NULL;
-
-}
-
-static icalparameter_role
-text_to_role (const char *role)
-{
- if (!g_strcasecmp (role, _("Chair")))
- return ICAL_ROLE_CHAIR;
- else if (!g_strcasecmp (role, _("Required Participant")))
- return ICAL_ROLE_REQPARTICIPANT;
- else if (!g_strcasecmp (role, _("Optional Participant")))
- return ICAL_ROLE_OPTPARTICIPANT;
- else if (!g_strcasecmp (role, _("Non-Participant")))
- return ICAL_ROLE_NONPARTICIPANT;
- else
- return ICAL_ROLE_NONE;
-}
-
-static char *
-role_to_text (icalparameter_role role)
-{
- switch (role) {
- case ICAL_ROLE_CHAIR:
- return _("Chair");
- case ICAL_ROLE_REQPARTICIPANT:
- return _("Required Participant");
- case ICAL_ROLE_OPTPARTICIPANT:
- return _("Optional Participant");
- case ICAL_ROLE_NONPARTICIPANT:
- return _("Non-Participant");
- default:
- return _("Unknown");
- }
-
- return NULL;
-}
-
-static gboolean
-text_to_boolean (const char *role)
-{
- if (!g_strcasecmp (role, _("Yes")))
- return TRUE;
- else
- return FALSE;
-}
-
-static char *
-boolean_to_text (gboolean b)
-{
- if (b)
- return _("Yes");
- else
- return _("No");
-}
-
-static icalparameter_partstat
-text_to_partstat (const char *partstat)
-{
- if (!g_strcasecmp (partstat, _("Needs Action")))
- return ICAL_PARTSTAT_NEEDSACTION;
- else if (!g_strcasecmp (partstat, _("Accepted")))
- return ICAL_PARTSTAT_ACCEPTED;
- else if (!g_strcasecmp (partstat, _("Declined")))
- return ICAL_PARTSTAT_DECLINED;
- else if (!g_strcasecmp (partstat, _("Tentative")))
- return ICAL_PARTSTAT_TENTATIVE;
- else if (!g_strcasecmp (partstat, _("Delegated")))
- return ICAL_PARTSTAT_DELEGATED;
- else if (!g_strcasecmp (partstat, _("Completed")))
- return ICAL_PARTSTAT_COMPLETED;
- else if (!g_strcasecmp (partstat, _("In Process")))
- return ICAL_PARTSTAT_INPROCESS;
- else
- return ICAL_PARTSTAT_NONE;
-}
-
-static char *
-partstat_to_text (icalparameter_partstat partstat)
-{
- switch (partstat) {
- case ICAL_PARTSTAT_NEEDSACTION:
- return _("Needs Action");
- case ICAL_PARTSTAT_ACCEPTED:
- return _("Accepted");
- case ICAL_PARTSTAT_DECLINED:
- return _("Declined");
- case ICAL_PARTSTAT_TENTATIVE:
- return _("Tentative");
- case ICAL_PARTSTAT_DELEGATED:
- return _("Delegated");
- case ICAL_PARTSTAT_COMPLETED:
- return _("Completed");
- case ICAL_PARTSTAT_INPROCESS:
- return _("In Process");
- case ICAL_PARTSTAT_NONE:
- default:
- return _("Unknown");
- }
-
- return NULL;
-}
-
-static int
-column_count (ETableModel *etm)
-{
- return ITIP_COLUMN_COUNT;
-}
-
-static int
-row_count (ETableModel *etm)
-{
- EMeetingModel *im;
- EMeetingModelPrivate *priv;
-
- im = E_MEETING_MODEL (etm);
- priv = im->priv;
-
- return (priv->attendees->len);
-}
-
-static void
-append_row (ETableModel *etm, ETableModel *source, int row)
-{
- EMeetingModel *im;
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
- char *address;
-
- im = E_MEETING_MODEL (etm);
- priv = im->priv;
-
- address = (char *) e_table_model_value_at (source, ITIP_ADDRESS_COL, row);
- if (find_match (im, address, NULL) != NULL) {
-// duplicate_error ();
- return;
- }
-
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new ());
-
- e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", address));
- e_meeting_attendee_set_member (ia, g_strdup (e_table_model_value_at (source, ITIP_MEMBER_COL, row)));
- e_meeting_attendee_set_cutype (ia, text_to_type (e_table_model_value_at (source, ITIP_TYPE_COL, row)));
- e_meeting_attendee_set_role (ia, text_to_role (e_table_model_value_at (source, ITIP_ROLE_COL, row)));
- e_meeting_attendee_set_rsvp (ia, text_to_boolean (e_table_model_value_at (source, ITIP_RSVP_COL, row)));
- e_meeting_attendee_set_delto (ia, g_strdup (e_table_model_value_at (source, ITIP_DELTO_COL, row)));
- e_meeting_attendee_set_delfrom (ia, g_strdup (e_table_model_value_at (source, ITIP_DELFROM_COL, row)));
- e_meeting_attendee_set_status (ia, text_to_partstat (e_table_model_value_at (source, ITIP_STATUS_COL, row)));
- e_meeting_attendee_set_cn (ia, g_strdup (e_table_model_value_at (source, ITIP_CN_COL, row)));
- e_meeting_attendee_set_language (ia, g_strdup (e_table_model_value_at (source, ITIP_LANGUAGE_COL, row)));
-
- e_meeting_model_add_attendee (E_MEETING_MODEL (etm), ia);
-}
-
-static void *
-value_at (ETableModel *etm, int col, int row)
-{
- EMeetingModel *im;
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
-
- im = E_MEETING_MODEL (etm);
- priv = im->priv;
-
- ia = g_ptr_array_index (priv->attendees, row);
-
- switch (col) {
- case ITIP_ADDRESS_COL:
- return (void *)itip_strip_mailto (e_meeting_attendee_get_address (ia));
- case ITIP_MEMBER_COL:
- return (void *)e_meeting_attendee_get_member (ia);
- case ITIP_TYPE_COL:
- return type_to_text (e_meeting_attendee_get_cutype (ia));
- case ITIP_ROLE_COL:
- return role_to_text (e_meeting_attendee_get_role (ia));
- case ITIP_RSVP_COL:
- return boolean_to_text (e_meeting_attendee_get_rsvp (ia));
- case ITIP_DELTO_COL:
- return (void *)itip_strip_mailto (e_meeting_attendee_get_delto (ia));
- case ITIP_DELFROM_COL:
- return (void *)itip_strip_mailto (e_meeting_attendee_get_delfrom (ia));
- case ITIP_STATUS_COL:
- return partstat_to_text (e_meeting_attendee_get_status (ia));
- case ITIP_CN_COL:
- return (void *)e_meeting_attendee_get_cn (ia);
- case ITIP_LANGUAGE_COL:
- return (void *)e_meeting_attendee_get_language (ia);
- }
-
- return NULL;
-}
-
-static void
-set_value_at (ETableModel *etm, int col, int row, const void *val)
-{
- EMeetingModel *im;
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
-
- im = E_MEETING_MODEL (etm);
- priv = im->priv;
-
- ia = g_ptr_array_index (priv->attendees, row);
-
- switch (col) {
- case ITIP_ADDRESS_COL:
- e_meeting_attendee_set_address (ia, g_strdup_printf ("MAILTO:%s", (char *) val));
- break;
- case ITIP_MEMBER_COL:
- e_meeting_attendee_set_member (ia, g_strdup (val));
- break;
- case ITIP_TYPE_COL:
- e_meeting_attendee_set_cutype (ia, text_to_type (val));
- break;
- case ITIP_ROLE_COL:
- e_meeting_attendee_set_role (ia, text_to_role (val));
- break;
- case ITIP_RSVP_COL:
- e_meeting_attendee_set_rsvp (ia, text_to_boolean (val));
- break;
- case ITIP_DELTO_COL:
- e_meeting_attendee_set_delto (ia, g_strdup (val));
- break;
- case ITIP_DELFROM_COL:
- e_meeting_attendee_set_delfrom (ia, g_strdup (val));
- break;
- case ITIP_STATUS_COL:
- e_meeting_attendee_set_status (ia, text_to_partstat (val));
- break;
- case ITIP_CN_COL:
- e_meeting_attendee_set_cn (ia, g_strdup (val));
- break;
- case ITIP_LANGUAGE_COL:
- e_meeting_attendee_set_language (ia, g_strdup (val));
- break;
- }
-}
-
-static gboolean
-is_cell_editable (ETableModel *etm, int col, int row)
-{
- switch (col) {
- case ITIP_DELTO_COL:
- case ITIP_DELFROM_COL:
- return FALSE;
-
- default:
- }
-
- return TRUE;
-}
-
-static void *
-duplicate_value (ETableModel *etm, int col, const void *val)
-{
- return g_strdup (val);
-}
-
-static void
-free_value (ETableModel *etm, int col, void *val)
-{
- g_free (val);
-}
-
-static void *
-init_value (ETableModel *etm, int col)
-{
- switch (col) {
- case ITIP_ADDRESS_COL:
- return g_strdup ("");
- case ITIP_MEMBER_COL:
- return g_strdup ("");
- case ITIP_TYPE_COL:
- return g_strdup (_("Individual"));
- case ITIP_ROLE_COL:
- return g_strdup (_("Required Participant"));
- case ITIP_RSVP_COL:
- return g_strdup (_("Yes"));
- case ITIP_DELTO_COL:
- return g_strdup ("");
- case ITIP_DELFROM_COL:
- return g_strdup ("");
- case ITIP_STATUS_COL:
- return g_strdup (_("Needs Action"));
- case ITIP_CN_COL:
- return g_strdup ("");
- case ITIP_LANGUAGE_COL:
- return g_strdup ("en");
- }
-
- return g_strdup ("");
-}
-
-static gboolean
-value_is_empty (ETableModel *etm, int col, const void *val)
-{
-
- switch (col) {
- case ITIP_ADDRESS_COL:
- case ITIP_MEMBER_COL:
- case ITIP_DELTO_COL:
- case ITIP_DELFROM_COL:
- case ITIP_CN_COL:
- if (val && !g_strcasecmp (val, ""))
- return TRUE;
- else
- return FALSE;
- default:
- }
-
- return TRUE;
-}
-
-static char *
-value_to_string (ETableModel *etm, int col, const void *val)
-{
- return g_strdup (val);
-}
-
-
-static void
-class_init (EMeetingModelClass *klass)
-{
- GtkObjectClass *object_class;
- ETableModelClass *etm_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- etm_class = E_TABLE_MODEL_CLASS (klass);
-
- parent_class = gtk_type_class (E_TABLE_MODEL_TYPE);
-
- object_class->destroy = destroy;
-
- etm_class->column_count = column_count;
- etm_class->row_count = row_count;
- etm_class->value_at = value_at;
- etm_class->set_value_at = set_value_at;
- etm_class->is_cell_editable = is_cell_editable;
- etm_class->append_row = append_row;
- etm_class->duplicate_value = duplicate_value;
- etm_class->free_value = free_value;
- etm_class->initialize_value = init_value;
- etm_class->value_is_empty = value_is_empty;
- etm_class->value_to_string = value_to_string;
-}
-
-
-static void
-init (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- priv = g_new0 (EMeetingModelPrivate, 1);
-
- im->priv = priv;
-
- priv->attendees = g_ptr_array_new ();
-
- priv->client = NULL;
-
- priv->ebook = NULL;
- priv->book_loaded = FALSE;
- priv->book_load_wait = FALSE;
-
- priv->refreshing = FALSE;
-
- start_addressbook_server (im);
-}
-
-static void
-destroy (GtkObject *obj)
-{
- EMeetingModel *model = E_MEETING_MODEL (obj);
- EMeetingModelPrivate *priv;
- gint i;
-
- priv = model->priv;
-
- for (i = 0; i < priv->attendees->len; i++)
- gtk_object_unref (GTK_OBJECT (g_ptr_array_index(priv->attendees, i)));
- g_ptr_array_free (priv->attendees, FALSE);
-
- if (priv->client != NULL)
- gtk_object_unref (GTK_OBJECT (priv->client));
-
- if (priv->ebook != NULL)
- gtk_object_unref (GTK_OBJECT (priv->ebook));
-
- g_free (priv);
-}
-
-GtkObject *
-e_meeting_model_new (void)
-{
- return gtk_type_new (E_TYPE_MEETING_MODEL);
-}
-
-
-CalClient *
-e_meeting_model_get_cal_client (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- return priv->client;
-}
-
-void
-e_meeting_model_set_cal_client (EMeetingModel *im, CalClient *client)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- if (priv->client != NULL)
- gtk_object_unref (GTK_OBJECT (priv->client));
-
- if (client != NULL)
- gtk_object_ref (GTK_OBJECT (client));
- priv->client = client;
-}
-
-static ETableScrolled *
-build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_file)
-{
- GtkWidget *etable;
- ETable *real_table;
- ETableExtras *extras;
- GList *strings;
- ECell *popup_cell, *cell;
-
- extras = e_table_extras_new ();
-
- /* For type */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- 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, _("Individual"));
- strings = g_list_append (strings, _("Group"));
- strings = g_list_append (strings, _("Resource"));
- strings = g_list_append (strings, _("Room"));
- strings = g_list_append (strings, _("Unknown"));
-
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings);
- e_table_extras_add_cell (extras, "typeedit", popup_cell);
-
- /* For role */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- 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, _("Chair"));
- strings = g_list_append (strings, _("Required Participant"));
- strings = g_list_append (strings, _("Optional Participant"));
- strings = g_list_append (strings, _("Non-Participant"));
- strings = g_list_append (strings, _("Unknown"));
-
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings);
- e_table_extras_add_cell (extras, "roleedit", popup_cell);
-
- /* For rsvp */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- 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, _("Yes"));
- strings = g_list_append (strings, _("No"));
-
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings);
- e_table_extras_add_cell (extras, "rsvpedit", popup_cell);
-
- /* For status */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- 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, _("Needs Action"));
- strings = g_list_append (strings, _("Accepted"));
- strings = g_list_append (strings, _("Declined"));
- strings = g_list_append (strings, _("Tentative"));
- strings = g_list_append (strings, _("Delegated"));
-
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings);
- e_table_extras_add_cell (extras, "statusedit", popup_cell);
-
-
- etable = e_table_scrolled_new_from_spec_file (model, extras, spec_file, NULL);
-
- real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (etable));
- e_scroll_frame_set_policy (E_SCROLL_FRAME (etable), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
- e_scroll_frame_set_scrollbar_spacing (E_SCROLL_FRAME (etable), 0);
- e_table_load_state (real_table, state_file);
-
-#if 0
- gtk_signal_connect (GTK_OBJECT (real_table),
- "right_click", GTK_SIGNAL_FUNC (right_click_cb), mpage);
- gtk_signal_connect (GTK_OBJECT (real_table->sort_info),
- "sort_info_changed", GTK_SIGNAL_FUNC (sort_info_changed_cb), mts);
-#endif
-
- gtk_object_unref (GTK_OBJECT (extras));
-
- return E_TABLE_SCROLLED (etable);
-}
-
-void
-e_meeting_model_add_attendee (EMeetingModel *im, EMeetingAttendee *ia)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- gtk_object_ref (GTK_OBJECT (ia));
- g_ptr_array_add (priv->attendees, ia);
-
- gtk_signal_connect (GTK_OBJECT (ia), "changed",
- GTK_SIGNAL_FUNC (attendee_changed_cb), im);
-
- e_table_model_row_inserted (E_TABLE_MODEL (im), row_count (E_TABLE_MODEL (im)) - 1);
-}
-
-EMeetingAttendee *
-e_meeting_model_add_attendee_with_defaults (EMeetingModel *im)
-{
- EMeetingAttendee *ia;
- char *str;
-
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new ());
-
- e_meeting_attendee_set_address (ia, init_value (E_TABLE_MODEL (im), ITIP_ADDRESS_COL));
- e_meeting_attendee_set_member (ia, init_value (E_TABLE_MODEL (im), ITIP_MEMBER_COL));
-
- str = init_value (E_TABLE_MODEL (im), ITIP_TYPE_COL);
- e_meeting_attendee_set_cutype (ia, text_to_type (str));
- g_free (str);
- str = init_value (E_TABLE_MODEL (im), ITIP_ROLE_COL);
- e_meeting_attendee_set_role (ia, text_to_role (str));
- g_free (str);
- str = init_value (E_TABLE_MODEL (im), ITIP_RSVP_COL);
- e_meeting_attendee_set_role (ia, text_to_boolean (str));
- g_free (str);
-
- e_meeting_attendee_set_delto (ia, init_value (E_TABLE_MODEL (im), ITIP_DELTO_COL));
- e_meeting_attendee_set_delfrom (ia, init_value (E_TABLE_MODEL (im), ITIP_DELFROM_COL));
-
- str = init_value (E_TABLE_MODEL (im), ITIP_STATUS_COL);
- e_meeting_attendee_set_status (ia, text_to_partstat (str));
- g_free (str);
-
- e_meeting_attendee_set_cn (ia, init_value (E_TABLE_MODEL (im), ITIP_CN_COL));
- e_meeting_attendee_set_language (ia, init_value (E_TABLE_MODEL (im), ITIP_LANGUAGE_COL));
-
- e_meeting_model_add_attendee (im, ia);
-
- return ia;
-}
-
-void
-e_meeting_model_remove_attendee (EMeetingModel *im, EMeetingAttendee *ia)
-{
- EMeetingModelPrivate *priv;
- gint i, row = -1;
-
- priv = im->priv;
-
- for (i = 0; i < priv->attendees->len; i++) {
- if (ia == g_ptr_array_index (priv->attendees, i)) {
- row = i;
- break;
- }
- }
-
- if (row != -1) {
- g_ptr_array_remove_index (priv->attendees, row);
- gtk_object_unref (GTK_OBJECT (ia));
-
- e_table_model_row_deleted (E_TABLE_MODEL (im), row);
- }
-}
-
-void
-e_meeting_model_remove_all_attendees (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
- gint i;
-
- priv = im->priv;
-
- for (i = 0; i < priv->attendees->len; i++) {
- EMeetingAttendee *ia = g_ptr_array_index (priv->attendees, i);
- gtk_object_unref (GTK_OBJECT (ia));
- }
-
- e_table_model_rows_deleted (E_TABLE_MODEL (im), 0, priv->attendees->len);
- g_ptr_array_set_size (priv->attendees, 0);
-}
-
-EMeetingAttendee *
-e_meeting_model_find_attendee (EMeetingModel *im, const gchar *address, gint *row)
-{
- EMeetingModelPrivate *priv;
- EMeetingAttendee *ia;
- int i;
-
- priv = im->priv;
-
- if (address == NULL)
- return NULL;
-
- for (i = 0; i < priv->attendees->len; i++) {
- const gchar *ia_address;
-
- ia = g_ptr_array_index (priv->attendees, i);
-
- ia_address = e_meeting_attendee_get_address (ia);
- if (ia_address && !g_strcasecmp (itip_strip_mailto (ia_address), itip_strip_mailto (address))) {
- if (row != NULL)
- *row = i;
-
- return ia;
- }
- }
-
- return NULL;
-}
-
-EMeetingAttendee *
-e_meeting_model_find_attendee_at_row (EMeetingModel *im, gint row)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- return g_ptr_array_index (priv->attendees, row);
-}
-
-gint
-e_meeting_model_count_attendees (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- return priv->attendees->len;
-}
-
-const GPtrArray *
-e_meeting_model_get_attendees (EMeetingModel *im)
-{
- EMeetingModelPrivate *priv;
-
- priv = im->priv;
-
- return priv->attendees;
-}
-
-static icaltimezone *
-find_zone (icalproperty *ip, icalcomponent *tz_top_level)
-{
- icalparameter *param;
- icalcomponent *sub_comp;
- const char *tzid;
- icalcompiter iter;
-
- if (tz_top_level == NULL)
- return NULL;
-
- param = icalproperty_get_first_parameter (ip, ICAL_TZID_PARAMETER);
- tzid = icalparameter_get_tzid (param);
-
- iter = icalcomponent_begin_component (tz_top_level, ICAL_VTIMEZONE_COMPONENT);
- while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
- icalcomponent *clone;
- const char *tz_tzid;
-
- tz_tzid = icalproperty_get_tzid (sub_comp);
- if (!strcmp (tzid, tz_tzid)) {
- icaltimezone *zone;
-
- zone = icaltimezone_new ();
- clone = icalcomponent_new_clone (sub_comp);
- icaltimezone_set_component (zone, clone);
-
- return zone;
- }
-
- icalcompiter_next (&iter);
- }
-
- return NULL;
-}
-
-static struct icaltimetype
-convert_time (struct icaltimetype itt, icaltimezone *from, icaltimezone *to)
-{
- if (from == NULL)
- from = icaltimezone_get_utc_timezone ();
-
- icaltimezone_convert_time (&itt, from, to);
-
- return itt;
-}
-
-static void
-process_free_busy_comp (EMeetingAttendee *ia, icalcomponent *fb_comp, icalcomponent *tz_top_level)
-{
- icalproperty *ip;
- icaltimezone *view_zone;
-
- view_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
-
- ip = icalcomponent_get_first_property (fb_comp, ICAL_DTSTART_PROPERTY);
- if (ip != NULL) {
- struct icaltimetype dtstart;
- icaltimezone *ds_zone = NULL;
-
- dtstart = icalproperty_get_dtstart (ip);
- if (!dtstart.is_utc) {
- ds_zone = find_zone (ip, tz_top_level);
- if (ds_zone != NULL)
- dtstart = convert_time (dtstart, ds_zone, view_zone);
- }
-
- e_meeting_attendee_set_start_busy_range (ia,
- dtstart.year,
- dtstart.month,
- dtstart.day,
- dtstart.hour,
- dtstart.minute);
- }
-
- ip = icalcomponent_get_first_property (fb_comp, ICAL_DTEND_PROPERTY);
- if (ip != NULL) {
- struct icaltimetype dtend;
- icaltimezone *de_zone = NULL;
-
- dtend = icalproperty_get_dtend (ip);
- if (!dtend.is_utc) {
- de_zone = find_zone (ip, tz_top_level);
- if (de_zone != NULL)
- dtend = convert_time (dtend, de_zone, view_zone);
- }
-
- e_meeting_attendee_set_end_busy_range (ia,
- dtend.year,
- dtend.month,
- dtend.day,
- dtend.hour,
- dtend.minute);
- }
-
- ip = icalcomponent_get_first_property (fb_comp, ICAL_FREEBUSY_PROPERTY);
- while (ip != NULL) {
- icalparameter *param;
- struct icalperiodtype fb;
- EMeetingFreeBusyType busy_type = E_MEETING_FREE_BUSY_LAST;
- icalparameter_fbtype fbtype = ICAL_FBTYPE_BUSY;
-
- fb = icalproperty_get_freebusy (ip);
- param = icalproperty_get_first_parameter (ip, ICAL_FBTYPE_PARAMETER);
- if (param != NULL)
- fbtype = icalparameter_get_fbtype (param);
-
- switch (fbtype) {
- case ICAL_FBTYPE_BUSY:
- busy_type = E_MEETING_FREE_BUSY_BUSY;
- break;
-
- case ICAL_FBTYPE_BUSYUNAVAILABLE:
- busy_type = E_MEETING_FREE_BUSY_OUT_OF_OFFICE;
- break;
-
- case ICAL_FBTYPE_BUSYTENTATIVE:
- busy_type = E_MEETING_FREE_BUSY_TENTATIVE;
- break;
-
- default:
- }
-
- if (fbtype != E_MEETING_FREE_BUSY_LAST) {
- fb.start = convert_time (fb.start, NULL, view_zone);
- fb.end = convert_time (fb.end, NULL, view_zone);
- e_meeting_attendee_add_busy_period (ia,
- fb.start.year,
- fb.start.month,
- fb.start.day,
- fb.start.hour,
- fb.start.minute,
- fb.end.year,
- fb.end.month,
- fb.end.day,
- fb.end.hour,
- fb.end.minute,
- busy_type);
- }
-
- ip = icalcomponent_get_next_property (fb_comp, ICAL_FREEBUSY_PROPERTY);
- }
-}
-
-static void
-process_free_busy (EMeetingModel *im, EMeetingAttendee *ia, char *text)
-{
- EMeetingModelPrivate *priv;
- icalcomponent *main_comp;
- icalcomponent_kind kind = ICAL_NO_COMPONENT;
-
- priv = im->priv;
-
- main_comp = icalparser_parse_string (text);
- if (main_comp == NULL)
- return;
-
- kind = icalcomponent_isa (main_comp);
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- icalcompiter iter;
- icalcomponent *tz_top_level, *sub_comp;
-
- tz_top_level = cal_util_new_top_level ();
-
- iter = icalcomponent_begin_component (main_comp, ICAL_VTIMEZONE_COMPONENT);
- while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
- icalcomponent *clone;
-
- clone = icalcomponent_new_clone (sub_comp);
- icalcomponent_add_component (tz_top_level, clone);
-
- icalcompiter_next (&iter);
- }
-
- iter = icalcomponent_begin_component (main_comp, ICAL_VFREEBUSY_COMPONENT);
- while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
- process_free_busy_comp (ia, sub_comp, tz_top_level);
-
- icalcompiter_next (&iter);
- }
- icalcomponent_free (tz_top_level);
- } else if (kind == ICAL_VFREEBUSY_COMPONENT) {
- process_free_busy_comp (ia, main_comp, NULL);
- } else {
- return;
- }
-
- icalcomponent_free (main_comp);
-}
-
-static void
-async_close (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- EMeetingModelRefreshData *r_data = data;
- EMeetingModelPrivate *priv;
-
- process_free_busy (r_data->im, r_data->attendee_data.ia, r_data->attendee_data.string->str);
-
- priv = r_data->im->priv;
-
- priv->refresh_count--;
-
- if (priv->refresh_count == 0) {
- GList *l, *m;
-
- for (l = priv->refresh_callbacks, m = priv->refresh_data; l != NULL; l = l->next, m = m->next) {
- EMeetingModelRefreshCallback cb = l->data;
-
- cb (m->data);
- }
-
- priv->refreshing = FALSE;
- }
-}
-
-static void
-async_read (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize requested,
- GnomeVFSFileSize read,
- gpointer data)
-{
- EMeetingModelRefreshData *r_data = data;
- GnomeVFSFileSize buf_size = BUF_SIZE - 1;
-
- if (result != GNOME_VFS_OK) {
- gnome_vfs_async_close (handle, async_close, r_data);
- return;
- }
-
- ((char *)buffer)[read] = '\0';
- r_data->attendee_data.string = g_string_append (r_data->attendee_data.string, buffer);
-
- if (read < requested) {
- gnome_vfs_async_close (handle, async_close, r_data);
- return;
- }
-
- gnome_vfs_async_read (handle, r_data->attendee_data.buffer, buf_size, async_read, r_data);
-}
-
-static void
-async_open (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- EMeetingModelRefreshData *r_data = data;
- GnomeVFSFileSize buf_size = BUF_SIZE - 1;
-
- gnome_vfs_async_read (handle, r_data->attendee_data.buffer, buf_size, async_read, r_data);
-}
-
-static void
-cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
- int length, i, j;
-
- if (status != E_BOOK_STATUS_SUCCESS)
- return;
-
- priv = im->priv;
-
- length = e_card_cursor_get_length (cursor);
- priv->refresh_count = 0;
-
- for (i = 0; i < length; i ++) {
- GnomeVFSAsyncHandle *handle;
- ECard *card = e_card_cursor_get_nth (cursor, i);
- EMeetingModelRefreshData *r_data = g_new0 (EMeetingModelRefreshData, 1);
- EMeetingAttendee *ia = NULL;
-
- if (card->fburl == NULL)
- continue;
-
- for (j = 0; j < priv->attendees->len; j++) {
- ia = g_ptr_array_index (priv->attendees, j);
- if (e_card_email_match_string (card, itip_strip_mailto (e_meeting_attendee_get_address (ia))))
- break;
- }
- if (ia == NULL)
- continue;
-
- r_data->im = im;
- r_data->attendee_data.string = g_string_new (NULL);
- r_data->attendee_data.ia = ia;
-
- priv->refresh_count++;
-
- /* Read in free/busy data from the url */
- gnome_vfs_async_open (&handle, card->fburl, GNOME_VFS_OPEN_READ, async_open, r_data);
- }
-}
-
-void
-e_meeting_model_refresh_busy_periods (EMeetingModel *im, EMeetingModelRefreshCallback call_back, gpointer data)
-{
- EMeetingModelPrivate *priv;
- GPtrArray *not_found;
- GString *string;
- int i;
-
- priv = im->priv;
-
- priv->refresh_callbacks = g_list_append (priv->refresh_callbacks, call_back);
- priv->refresh_data = g_list_append (priv->refresh_data, data);
-
- if (priv->refreshing)
- return;
-
- priv->refreshing = TRUE;
-
- /* To track what we don't find on the server */
- not_found = g_ptr_array_new ();
- g_ptr_array_set_size (not_found, priv->attendees->len);
- for (i = 0; i < priv->attendees->len; i++)
- g_ptr_array_index (not_found, i) = g_ptr_array_index (priv->attendees, i);
-
- /* Check the server for free busy data */
- if (priv->client) {
- GList *fb_data, *users = NULL, *l;
- time_t start, end, now = time (NULL);
-
- start = now - 60 * 60 * 24;
- end = time_add_week (now, 6);
-
- for (i = 0; i < priv->attendees->len; i++) {
- EMeetingAttendee *ia = g_ptr_array_index (priv->attendees, i);
- const char *user;
-
- user = itip_strip_mailto (e_meeting_attendee_get_address (ia));
- users = g_list_append (users, g_strdup (user));
- }
-
- fb_data = cal_client_get_free_busy (priv->client, users, start, end);
-
- g_list_foreach (users, (GFunc)g_free, NULL);
- g_list_free (users);
-
- for (l = fb_data; l != NULL; l = l->next) {
- CalComponent *comp = l->data;
- EMeetingAttendee *ia = NULL;
- CalComponentOrganizer org;
-
- /* Process the data for any attendees found */
- cal_component_get_organizer (comp, &org);
- for (i = 0; i < priv->attendees->len; i++) {
- ia = g_ptr_array_index (priv->attendees, i);
- if (org.value && !strcmp (org.value, e_meeting_attendee_get_address (ia))) {
- g_ptr_array_remove_fast (not_found, ia);
- break;
- }
- ia = NULL;
- }
-
- if (ia != NULL)
- process_free_busy (im, ia, cal_component_get_as_string (comp));
- }
- }
-
- /* Look for fburl's of attendee with no free busy info on server */
- if (!priv->book_loaded) {
- priv->book_load_wait = TRUE;
- gtk_main ();
- }
-
- string = g_string_new ("(or ");
- for (i = 0; i < not_found->len; i++) {
- EMeetingAttendee *ia = g_ptr_array_index (not_found, i);
- char *query;
-
- if (!e_meeting_attendee_is_set_address (ia))
- continue;
-
- e_meeting_attendee_clear_busy_periods (ia);
-
- query = g_strdup_printf ("(contains \"email\" \"%s\")", itip_strip_mailto (e_meeting_attendee_get_address (ia)));
- g_string_append (string, query);
- g_free (query);
- }
- g_string_append_c (string, ')');
-
- e_book_get_cursor (priv->ebook, string->str, cursor_cb, im);
-
- g_ptr_array_free (not_found, FALSE);
- g_string_free (string, TRUE);
-}
-
-ETableScrolled *
-e_meeting_model_etable_from_model (EMeetingModel *im, const gchar *spec_file, const gchar *state_file)
-{
- g_return_val_if_fail (im != NULL, NULL);
- g_return_val_if_fail (E_IS_MEETING_MODEL (im), NULL);
-
- return build_etable (E_TABLE_MODEL (im), spec_file, state_file);
-}
-
-static void
-attendee_changed_cb (EMeetingAttendee *ia, gpointer data)
-{
- EMeetingModel *im = E_MEETING_MODEL (data);
- EMeetingModelPrivate *priv;
- gint row = -1, i;
-
- priv = im->priv;
-
- for (i = 0; i < priv->attendees->len; i++) {
- if (ia == g_ptr_array_index (priv->attendees, i)) {
- row = 1;
- break;
- }
- }
-
- if (row == -1)
- return;
-
- e_table_model_row_changed (E_TABLE_MODEL (im), row);
-}
diff --git a/calendar/gui/e-meeting-model.h b/calendar/gui/e-meeting-model.h
deleted file mode 100644
index 2b90ea1d7b..0000000000
--- a/calendar/gui/e-meeting-model.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-model.h
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifndef _E_MODEL_H_
-#define _E_MODEL_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/e-table/e-table-model.h>
-#include <cal-client/cal-client.h>
-#include "e-meeting-attendee.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_MEETING_MODEL (e_meeting_model_get_type ())
-#define E_MEETING_MODEL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MEETING_MODEL, EMeetingModel))
-#define E_MEETING_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MEETING_MODEL, EMeetingModelClass))
-#define E_IS_MEETING_MODEL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_MEETING_MODEL))
-#define E_IS_MEETING_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MEETING_MODEL))
-
-
-typedef struct _EMeetingModel EMeetingModel;
-typedef struct _EMeetingModelPrivate EMeetingModelPrivate;
-typedef struct _EMeetingModelClass EMeetingModelClass;
-
-struct _EMeetingModel {
- ETableModel parent;
-
- EMeetingModelPrivate *priv;
-};
-
-struct _EMeetingModelClass {
- ETableModelClass parent_class;
-};
-
-typedef void (* EMeetingModelRefreshCallback) (gpointer data);
-
-
-GtkType e_meeting_model_get_type (void);
-GtkObject *e_meeting_model_new (void);
-
-CalClient *e_meeting_model_get_cal_client (EMeetingModel *im);
-void e_meeting_model_set_cal_client (EMeetingModel *im, CalClient *client);
-
-void e_meeting_model_add_attendee (EMeetingModel *im, EMeetingAttendee *ia);
-EMeetingAttendee *e_meeting_model_add_attendee_with_defaults (EMeetingModel *im);
-
-void e_meeting_model_remove_attendee (EMeetingModel *im, EMeetingAttendee *ia);
-void e_meeting_model_remove_all_attendees (EMeetingModel *im);
-
-EMeetingAttendee *e_meeting_model_find_attendee (EMeetingModel *im, const gchar *address, gint *row);
-EMeetingAttendee *e_meeting_model_find_attendee_at_row (EMeetingModel *im, gint row);
-
-gint e_meeting_model_count_attendees (EMeetingModel *im);
-const GPtrArray *e_meeting_model_get_attendees (EMeetingModel *im);
-void e_meeting_model_refresh_busy_periods (EMeetingModel *im, EMeetingModelRefreshCallback call_back, gpointer data);
-
-ETableScrolled *e_meeting_model_etable_from_model (EMeetingModel *im, const gchar *spec_file, const gchar *state_file);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_MEETING_MODEL_H_ */
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
deleted file mode 100644
index 3cc89dc5a2..0000000000
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ /dev/null
@@ -1,1005 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@gtk.org>
- *
- * 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
- */
-
-/*
- * EMeetingTimeSelectorItem - A GnomeCanvasItem which is used for both the main
- * display canvas and the top display (with the dates, times & All Attendees).
- * I didn't make these separate GnomeCanvasItems since they share a lot of
- * code.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <time.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-meeting-time-sel-item.h"
-#include "e-meeting-time-sel.h"
-
-/* Initially the grid lines were drawn at the bottom of cells, but this didn't
- line up well with the GtkEntry widgets, which in the default theme draw a
- black shadow line across the top. So I've switched our code to draw the
- lines across the top of cells. */
-#define E_MEETING_TIME_SELECTOR_DRAW_GRID_LINES_AT_BOTTOM 0
-
-static void e_meeting_time_selector_item_class_init (EMeetingTimeSelectorItemClass *mts_item_class);
-static void e_meeting_time_selector_item_init (EMeetingTimeSelectorItem *mts_item);
-static void e_meeting_time_selector_item_destroy (GtkObject *object);
-
-static void e_meeting_time_selector_item_set_arg (GtkObject *o, GtkArg *arg,
- guint arg_id);
-static void e_meeting_time_selector_item_realize (GnomeCanvasItem *item);
-static void e_meeting_time_selector_item_unrealize (GnomeCanvasItem *item);
-static void e_meeting_time_selector_item_update (GnomeCanvasItem *item,
- double *affine,
- ArtSVP *clip_path, int flags);
-static void e_meeting_time_selector_item_draw (GnomeCanvasItem *item,
- GdkDrawable *drawable,
- int x, int y,
- int width, int height);
-static double e_meeting_time_selector_item_point (GnomeCanvasItem *item,
- double x, double y,
- int cx, int cy,
- GnomeCanvasItem **actual_item);
-static gint e_meeting_time_selector_item_event (GnomeCanvasItem *item,
- GdkEvent *event);
-static gint e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event);
-static gint e_meeting_time_selector_item_button_release (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event);
-static gint e_meeting_time_selector_item_motion_notify (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event);
-
-static void e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item,
- GdkDrawable *drawable,
- GDate *date,
- int x, int scroll_y,
- int width, int height);
-static void e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int y, int width, int height);
-static void e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item,
- GdkDrawable *drawable,
- GDate *date,
- int x, int scroll_y,
- int width, int height);
-static void e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int scroll_y, int width, int height);
-static gint e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *mts_item, GDate *date, gint row);
-static void e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, int row, int x, int y, int width, int first_period, EMeetingFreeBusyType busy_type);
-
-static EMeetingTimeSelectorPosition e_meeting_time_selector_item_get_drag_position (EMeetingTimeSelectorItem *mts_item, gint x, gint y);
-static gboolean e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts,
- gint row,
- gint x,
- gint width,
- gint *start_x,
- gint *end_x);
-
-static GnomeCanvasItemClass *parent_class;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_MEETING_TIME_SELECTOR
-};
-
-
-GtkType
-e_meeting_time_selector_item_get_type (void)
-{
- static GtkType e_meeting_time_selector_item_type = 0;
-
- if (!e_meeting_time_selector_item_type) {
- GtkTypeInfo e_meeting_time_selector_item_info = {
- "EMeetingTimeSelectorItem",
- sizeof (EMeetingTimeSelectorItem),
- sizeof (EMeetingTimeSelectorItemClass),
- (GtkClassInitFunc) e_meeting_time_selector_item_class_init,
- (GtkObjectInitFunc) e_meeting_time_selector_item_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- e_meeting_time_selector_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_meeting_time_selector_item_info);
- }
-
- return e_meeting_time_selector_item_type;
-}
-
-
-static void
-e_meeting_time_selector_item_class_init (EMeetingTimeSelectorItemClass *mts_item_class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- parent_class = gtk_type_class (gnome_canvas_item_get_type());
-
- object_class = (GtkObjectClass *) mts_item_class;
- item_class = (GnomeCanvasItemClass *) mts_item_class;
-
- gtk_object_add_arg_type ("EMeetingTimeSelectorItem::meeting_time_selector",
- GTK_TYPE_POINTER, GTK_ARG_WRITABLE,
- ARG_MEETING_TIME_SELECTOR);
-
- object_class->destroy = e_meeting_time_selector_item_destroy;
- object_class->set_arg = e_meeting_time_selector_item_set_arg;
-
- /* GnomeCanvasItem method overrides */
- item_class->realize = e_meeting_time_selector_item_realize;
- item_class->unrealize = e_meeting_time_selector_item_unrealize;
- item_class->update = e_meeting_time_selector_item_update;
- item_class->draw = e_meeting_time_selector_item_draw;
- item_class->point = e_meeting_time_selector_item_point;
- item_class->event = e_meeting_time_selector_item_event;
-}
-
-
-static void
-e_meeting_time_selector_item_init (EMeetingTimeSelectorItem *mts_item)
-{
- GnomeCanvasItem *item = GNOME_CANVAS_ITEM (mts_item);
-
- mts_item->mts = NULL;
-
- mts_item->main_gc = NULL;
- mts_item->stipple_gc = NULL;
-
- /* Create the cursors. */
- mts_item->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR);
- mts_item->resize_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
- mts_item->last_cursor_set = NULL;
-
- item->x1 = 0;
- item->y1 = 0;
- item->x2 = 0;
- item->y2 = 0;
-}
-
-
-static void
-e_meeting_time_selector_item_destroy (GtkObject *object)
-{
- EMeetingTimeSelectorItem *mts_item;
-
- mts_item = E_MEETING_TIME_SELECTOR_ITEM (object);
-
- gdk_cursor_destroy (mts_item->normal_cursor);
- gdk_cursor_destroy (mts_item->resize_cursor);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (*GTK_OBJECT_CLASS (parent_class)->destroy)(object);
-}
-
-
-static void
-e_meeting_time_selector_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- GnomeCanvasItem *item;
- EMeetingTimeSelectorItem *mts_item;
-
- item = GNOME_CANVAS_ITEM (o);
- mts_item = E_MEETING_TIME_SELECTOR_ITEM (o);
-
- switch (arg_id){
- case ARG_MEETING_TIME_SELECTOR:
- mts_item->mts = GTK_VALUE_POINTER (*arg);
- break;
- }
-}
-
-
-static void
-e_meeting_time_selector_item_realize (GnomeCanvasItem *item)
-{
- GnomeCanvas *canvas;
- GdkWindow *window;
- EMeetingTimeSelectorItem *mts_item;
-
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)
- (*GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)(item);
-
- mts_item = E_MEETING_TIME_SELECTOR_ITEM (item);
-
- canvas = item->canvas;
- window = GTK_WIDGET (canvas)->window;
-
- mts_item->main_gc = gdk_gc_new (window);
- mts_item->stipple_gc = gdk_gc_new (window);
-}
-
-
-static void
-e_meeting_time_selector_item_unrealize (GnomeCanvasItem *item)
-{
- EMeetingTimeSelectorItem *mts_item;
-
- mts_item = E_MEETING_TIME_SELECTOR_ITEM (item);
-
- gdk_gc_unref (mts_item->main_gc);
- mts_item->main_gc = NULL;
- gdk_gc_unref (mts_item->stipple_gc);
- mts_item->stipple_gc = NULL;
-
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
- (*GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)(item);
-}
-
-
-static void
-e_meeting_time_selector_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 grid 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_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height)
-{
- EMeetingTimeSelector *mts;
- EMeetingTimeSelectorItem *mts_item;
- EMeetingAttendee *ia;
- gint day_x, meeting_start_x, meeting_end_x, bar_y, bar_height;
- gint row, row_y, start_x, end_x;
- GDate date, last_date, current_date;
- gboolean is_display_top, show_meeting_time;
- GdkGC *gc, *stipple_gc;
-
- mts_item = E_MEETING_TIME_SELECTOR_ITEM (item);
- mts = mts_item->mts;
- g_return_if_fail (mts != NULL);
- gc = mts_item->main_gc;
- stipple_gc = mts_item->stipple_gc;
-
- is_display_top = (GTK_WIDGET (item->canvas) == mts->display_top)
- ? TRUE : FALSE;
-
- /* Calculate the first and last visible days and positions. */
- e_meeting_time_selector_calculate_day_and_position (mts, x,
- &date, &day_x);
- e_meeting_time_selector_calculate_day_and_position (mts, x + width,
- &last_date, NULL);
-
- /* For the top display draw the 'All Attendees' row background. */
- if (is_display_top) {
- gdk_gc_set_foreground (gc, &mts->all_attendees_bg_color);
- gdk_draw_rectangle (drawable, gc, TRUE,
- 0, mts->row_height * 2 - y,
- width, mts->row_height);
- } else {
- gdk_gc_set_foreground (gc, &mts->bg_color);
- gdk_draw_rectangle (drawable, gc, TRUE, 0, 0, width, height);
- }
-
- /* Calculate the x coordinates of the meeting time. */
- show_meeting_time = e_meeting_time_selector_get_meeting_time_positions (mts, &meeting_start_x, &meeting_end_x);
-
- /* Draw the meeting time background. */
- if (show_meeting_time
- && (meeting_end_x - 1 >= x) && (meeting_start_x + 1 < x + width)
- && (meeting_end_x - meeting_start_x > 2)) {
- gdk_gc_set_foreground (gc, &mts->meeting_time_bg_color);
- if (is_display_top)
- gdk_draw_rectangle (drawable, gc, TRUE,
- meeting_start_x + 1 - x, mts->row_height * 2 - y,
- meeting_end_x - meeting_start_x - 2, mts->row_height);
- else
- gdk_draw_rectangle (drawable, gc, TRUE,
- meeting_start_x + 1 - x, 0,
- meeting_end_x - meeting_start_x - 2, height);
- }
-
- /* For the main display draw the stipple background for attendee's
- that have no calendar information. */
- if (!is_display_top) {
- gdk_gc_set_foreground (gc, &mts->grid_color);
- gdk_gc_set_foreground (stipple_gc, &mts->grid_color);
- gdk_gc_set_background (stipple_gc, &mts->stipple_bg_color);
- gdk_gc_set_stipple (stipple_gc, mts->stipple);
- gnome_canvas_set_stipple_origin (item->canvas, stipple_gc);
- gdk_gc_set_fill (stipple_gc, GDK_OPAQUE_STIPPLED);
- row = y / mts->row_height;
- row_y = row * mts->row_height - y;
- while (row < e_meeting_model_count_attendees (mts->model) && row_y < height) {
- ETable *real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (mts->etable));
- gint model_row = e_table_view_to_model_row (real_table, row);
-
- ia = e_meeting_model_find_attendee_at_row (mts->model, model_row);
-
- if (e_meeting_attendee_get_has_calendar_info (ia)) {
- if (e_meeting_time_selector_item_calculate_busy_range (mts, model_row, x, width, &start_x, &end_x)) {
- if (start_x >= width || end_x <= 0) {
- gdk_draw_rectangle (drawable, stipple_gc, TRUE, 0, row_y, width, mts->row_height);
- } else {
- if (start_x >= 0) {
- gdk_draw_rectangle (drawable, stipple_gc, TRUE, 0, row_y, start_x, mts->row_height);
- gdk_draw_line (drawable, gc, start_x, row_y, start_x, row_y + mts->row_height);
- }
- if (end_x <= width) {
- gdk_draw_rectangle (drawable, stipple_gc, TRUE, end_x, row_y, width - end_x, mts->row_height);
- gdk_draw_line (drawable, gc, end_x, row_y, end_x, row_y + mts->row_height);
- }
- }
- }
- } else {
- gdk_draw_rectangle (drawable, stipple_gc, TRUE,
- 0, row_y,
- width, mts->row_height);
- }
- row++;
- row_y += mts->row_height;
- }
- gdk_gc_set_fill (gc, GDK_SOLID);
- }
-
- /* Now paint the visible days one by one. */
- current_date = date;
- for (;;) {
- /* Currently we use the same GnomeCanvasItem class for the
- top display and the main display. We may use separate
- classes in future if necessary. */
- if (is_display_top)
- e_meeting_time_selector_item_paint_day_top (mts_item, drawable, &current_date, day_x, y, width, height);
- else
- e_meeting_time_selector_item_paint_day (mts_item, drawable, &current_date, day_x, y, width, height);
-
- day_x += mts_item->mts->day_width;
- if (g_date_compare (&current_date, &last_date) == 0)
- break;
- g_date_add_days (&current_date, 1);
- }
-
- /* Draw the busy periods. */
- if (is_display_top)
- e_meeting_time_selector_item_paint_all_attendees_busy_periods (mts_item, drawable, &date, x, y, width, height);
- else
- e_meeting_time_selector_item_paint_busy_periods (mts_item, drawable, &date, x, y, width, height);
-
-
- /* Draw the currently-selected meeting time vertical bars. */
- if (show_meeting_time) {
- if (is_display_top) {
- bar_y = mts->row_height * 2 - y;
- bar_height = mts->row_height;
- } else {
- bar_y = 0;
- bar_height = height;
- }
-
- gdk_gc_set_foreground (gc, &mts->grid_color);
-
- if ((meeting_start_x + 2 >= x)
- && (meeting_start_x - 2 < x + width)) {
- gdk_draw_rectangle (drawable, gc, TRUE,
- meeting_start_x - 2 - x, bar_y,
- 5, bar_height);
- }
-
- if ((meeting_end_x + 2 >= x)
- && (meeting_end_x - 2 < x + width)) {
- gdk_draw_rectangle (drawable, gc, TRUE,
- meeting_end_x - 2 - x, bar_y,
- 5, bar_height);
- }
- }
-}
-
-
-static void
-e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item,
- GdkDrawable *drawable, GDate *date,
- int x, int scroll_y,
- int width, int height)
-{
- EMeetingTimeSelector *mts;
- GdkGC *gc;
- GdkFont *font;
- gint y, grid_x;
- gchar buffer[128], *format;
- gint hour, hour_x, hour_y;
- GdkRectangle clip_rect;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- gdk_gc_set_foreground (gc, &mts->grid_color);
-
- /* Draw the horizontal lines. */
- y = mts->row_height - 1 - scroll_y;
- gdk_draw_line (drawable, gc, x, y, x + mts->day_width - 1, y);
- gdk_gc_set_foreground (gc, &mts->grid_shadow_color);
- gdk_draw_line (drawable, gc, x, y + 1, x + mts->day_width - 1, y + 1);
- gdk_gc_set_foreground (gc, &mts->grid_color);
- y += mts->row_height;
- gdk_draw_line (drawable, gc, x, y, x + mts->day_width - 1, y);
- y += mts->row_height;
- gdk_draw_line (drawable, gc, x, y, x + mts->day_width - 1, y);
-
-
- /* Draw the vertical grid lines. */
- for (grid_x = mts->col_width - 1;
- grid_x < mts->day_width - mts->col_width;
- grid_x += mts->col_width) {
- gdk_draw_line (drawable, gc,
- x + grid_x, mts->row_height * 2 - 4 - scroll_y,
- x + grid_x, height);
- }
- grid_x = mts->day_width - 2;
- gdk_draw_line (drawable, gc, x + grid_x, 0, x + grid_x, height);
- grid_x++;
- gdk_draw_line (drawable, gc, x + grid_x, 0, x + grid_x, height);
-
- /* Draw the date. Set a clipping rectangle so we don't draw over the
- next day. */
- font = GTK_WIDGET (mts)->style->font;
- if (mts->date_format == E_MEETING_TIME_SELECTOR_DATE_FULL)
- /* This is a strftime() format string %A = full weekday name,
- %B = full month name, %d = month day, %Y = full year. */
- format = _("%A, %B %d, %Y");
- else if (mts->date_format == E_MEETING_TIME_SELECTOR_DATE_ABBREVIATED_DAY)
- /* This is a strftime() format string %a = abbreviated weekday
- name, %m = month number, %d = month day, %Y = full year. */
- format = _("%a %m/%d/%Y");
- else
- /* This is a strftime() format string %m = month number,
- %d = month day, %Y = full year. */
- format = _("%m/%d/%Y");
-
- g_date_strftime (buffer, sizeof (buffer), format, date);
-
- clip_rect.x = x;
- clip_rect.y = -scroll_y;
- clip_rect.width = mts->day_width - 2;
- clip_rect.height = mts->row_height - 2;
- gdk_gc_set_clip_rectangle (gc, &clip_rect);
- gdk_draw_string (drawable, font, gc,
- x + 4, 4 + font->ascent - scroll_y, buffer);
- gdk_gc_set_clip_rectangle (gc, NULL);
-
- /* Draw the hours. */
- hour = mts->first_hour_shown + (mts->zoomed_out ? 3 : 1);
- hour_x = x + mts->col_width;
- hour_y = mts->row_height + 4 + font->ascent - scroll_y;
- while (hour < mts->last_hour_shown) {
- gdk_draw_string (drawable, font, gc,
- hour_x - (mts->hour_widths[hour] / 2),
- hour_y, EMeetingTimeSelectorHours[hour]);
-
- hour += mts->zoomed_out ? 3 : 1;
- hour_x += mts->col_width;
- }
-}
-
-
-/* This paints the colored bars representing busy periods for the combined
- list of attendees. For now we just paint the bars for each attendee of
- each other. If we want to speed it up we could optimise it later. */
-static void
-e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int scroll_y, int width, int height)
-{
- EMeetingTimeSelector *mts;
- EMeetingAttendee *ia;
- EMeetingFreeBusyType busy_type;
- gint row, y;
- GdkGC *gc;
- gint *first_periods;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- /* Calculate the y coordinate to paint the row at in the drawable. */
- y = 2 * mts->row_height - scroll_y - 1;
-
- /* Get the first visible busy periods for all the attendees. */
- first_periods = g_new (gint, e_meeting_model_count_attendees (mts->model));
- for (row = 0; row < e_meeting_model_count_attendees (mts->model); row++) {
- ia = e_meeting_model_find_attendee_at_row (mts->model, row);
- first_periods[row] = e_meeting_time_selector_item_find_first_busy_period (mts_item, date, row);
- }
-
- for (busy_type = 0;
- busy_type < E_MEETING_FREE_BUSY_LAST;
- busy_type++) {
- gdk_gc_set_foreground (gc, &mts->busy_colors[busy_type]);
- for (row = 0; row < e_meeting_model_count_attendees (mts->model); row++) {
- if (first_periods[row] == -1)
- continue;
- e_meeting_time_selector_item_paint_attendee_busy_periods (mts_item, drawable, x, y, width, row, first_periods[row], busy_type);
- }
- }
-
- g_free (first_periods);
-}
-
-
-static void
-e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item,
- GdkDrawable *drawable, GDate *date,
- int x, int scroll_y,
- int width, int height)
-{
- EMeetingTimeSelector *mts;
- GdkGC *gc;
- gint grid_x, grid_y, attendee_index, unused_y;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- /* Draw the grid lines. The grid lines around unused rows are drawn in
- a different color. */
-
- /* Draw the horizontal grid lines. */
- attendee_index = scroll_y / mts->row_height;
-#if E_MEETING_TIME_SELECTOR_DRAW_GRID_LINES_AT_BOTTOM
- for (grid_y = mts->row_height - 1 - (scroll_y % mts->row_height);
-#else
- for (grid_y = - (scroll_y % mts->row_height);
-#endif
- grid_y < height;
- grid_y += mts->row_height)
- {
- if (attendee_index <= e_meeting_model_count_attendees (mts->model)) {
- gdk_gc_set_foreground (gc, &mts->grid_color);
- gdk_draw_line (drawable, gc, 0, grid_y,
- width, grid_y);
- } else {
- gdk_gc_set_foreground (gc, &mts->grid_unused_color);
- gdk_draw_line (drawable, gc, 0, grid_y,
- width, grid_y);
- }
- attendee_index++;
- }
-
- /* Draw the vertical grid lines. */
- unused_y = (e_meeting_model_count_attendees (mts->model) * mts->row_height) - scroll_y;
- if (unused_y >= 0) {
- gdk_gc_set_foreground (gc, &mts->grid_color);
- for (grid_x = mts->col_width - 1;
- grid_x < mts->day_width - mts->col_width;
- grid_x += mts->col_width)
- {
- gdk_draw_line (drawable, gc,
- x + grid_x, 0,
- x + grid_x, unused_y - 1);
- }
- gdk_draw_rectangle (drawable, gc, TRUE,
- x + mts->day_width - 2, 0,
- 2, unused_y);
- }
-
- if (unused_y < height) {
- gdk_gc_set_foreground (gc, &mts->grid_unused_color);
- for (grid_x = mts->col_width - 1;
- grid_x < mts->day_width - mts->col_width;
- grid_x += mts->col_width)
- {
- gdk_draw_line (drawable, gc,
- x + grid_x, unused_y,
- x + grid_x, height);
- }
- gdk_draw_rectangle (drawable, gc, TRUE,
- x + mts->day_width - 2, unused_y,
- 2, height - unused_y);
- }
-
-
-}
-
-
-/* This paints the colored bars representing busy periods for the individual
- attendees. */
-static void
-e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int scroll_y, int width, int height)
-{
- EMeetingTimeSelector *mts;
- EMeetingFreeBusyType busy_type;
- ETable *real_table;
- gint row, model_row, y, first_period;
- GdkGC *gc;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (mts->etable));
-
- /* Calculate the first visible attendee row. */
- row = scroll_y / mts->row_height;
-
- /* Calculate the y coordinate to paint the row at in the drawable. */
- y = row * mts->row_height - scroll_y;
-
- /* Step through the attendees painting the busy periods. */
- while (y < height && row < e_meeting_model_count_attendees (mts->model)) {
- model_row = e_table_view_to_model_row (real_table, row);
-
- /* Find the first visible busy period. */
- first_period = e_meeting_time_selector_item_find_first_busy_period (mts_item, date, model_row);
- if (first_period != -1) {
- /* Paint the different types of busy periods, in
- reverse order of precedence, so the highest
- precedences are displayed. */
- for (busy_type = 0;
- busy_type < E_MEETING_FREE_BUSY_LAST;
- busy_type++) {
- gdk_gc_set_foreground (gc, &mts->busy_colors[busy_type]);
- e_meeting_time_selector_item_paint_attendee_busy_periods (mts_item, drawable, x, y, width, model_row, first_period, busy_type);
- }
- }
- y += mts->row_height;
- row++;
- }
-}
-
-
-/* This subtracts the attendees longest_period_in_days from the given date,
- and does a binary search of the attendee's busy periods array to find the
- first one which could possible end on the given day or later.
- If none are found it returns -1. */
-static gint
-e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *mts_item, GDate *date, gint row)
-{
- EMeetingTimeSelector *mts;
- EMeetingAttendee *ia;
- const GArray *busy_periods;
- EMeetingFreeBusyPeriod *period;
- gint period_num;
-
- mts = mts_item->mts;
-
- ia = e_meeting_model_find_attendee_at_row (mts->model, row);
-
- period_num = e_meeting_attendee_find_first_busy_period (ia, date);
- if (period_num == -1)
- return -1;
-
- /* Check if the period starts after the end of the current canvas
- scroll area. */
- busy_periods = e_meeting_attendee_get_busy_periods (ia);
- period = &g_array_index (busy_periods, EMeetingFreeBusyPeriod, period_num);
- if (g_date_compare (&mts->last_date_shown, &period->start.date) < 0)
- return -1;
-
- return period_num;
-}
-
-
-/* This paints the visible busy periods for one attendee which are of a certain
- busy type, e.g out of office. It is passed the index of the first visible
- busy period of the attendee and continues until it runs off the screen. */
-static void
-e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, int x, int y, int width, int row, int first_period, EMeetingFreeBusyType busy_type)
-{
- EMeetingTimeSelector *mts;
- EMeetingAttendee *ia;
- const GArray *busy_periods;
- EMeetingFreeBusyPeriod *period;
- GdkGC *gc;
- gint period_num, x1, x2, x2_within_day, x2_within_col;
-
- mts = mts_item->mts;
- gc = mts_item->main_gc;
-
- ia = e_meeting_model_find_attendee_at_row (mts->model, row);
-
- busy_periods = e_meeting_attendee_get_busy_periods (ia);
- for (period_num = first_period;
- period_num < busy_periods->len;
- period_num++) {
- period = &g_array_index (busy_periods, EMeetingFreeBusyPeriod, period_num);
-
- if (period->busy_type != busy_type)
- continue;
-
- /* Convert the period start and end times to x coordinates. */
- x1 = e_meeting_time_selector_calculate_time_position (mts, &period->start);
- /* If the period is off the right of the area being drawn, we
- are finished. */
- if (x1 >= x + width)
- return;
-
- x2 = e_meeting_time_selector_calculate_time_position (mts, &period->end);
- /* If the period is off the left edge of the area skip it. */
- if (x2 <= x)
- continue;
-
- /* We paint from x1 to x2 - 1, so that for example a time
- from 5:00-6:00 is distinct from 6:00-7:00.
- We never finish on a grid line separating days, and we only
- ever paint on a normal vertical grid line if the period is
- only 1 pixel wide. */
- x2_within_day = x2 % mts->day_width;
- if (x2_within_day == 0) {
- x2 -= 2;
- } else if (x2_within_day == mts->day_width - 1) {
- x2 -= 1;
- } else {
- x2_within_col = x2_within_day % mts->col_width;
- if (x2_within_col == 0 && x2 > x1 + 1)
- x2 -= 1;
- }
-
- /* Paint the rectangle. We leave a gap of 2 pixels at the
- top and bottom, remembering that the grid is painted along
- the top/bottom line of each row. */
- if (x2 - x1 > 0) {
-#if E_MEETING_TIME_SELECTOR_DRAW_GRID_LINES_AT_BOTTOM
- gdk_draw_rectangle (drawable, gc, TRUE,
- x1 - x, y + 2,
- x2 - x1, mts->row_height - 5);
-#else
- gdk_draw_rectangle (drawable, gc, TRUE,
- x1 - x, y + 3,
- x2 - x1, mts->row_height - 5);
-#endif
- }
- }
-}
-
-
-/*
- * CANVAS ITEM ROUTINES - functions to be a GnomeCanvasItem.
- */
-
-/* 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_meeting_time_selector_item_point (GnomeCanvasItem *item, double x, double y,
- int cx, int cy,
- GnomeCanvasItem **actual_item)
-{
- *actual_item = item;
- return 0.0;
-}
-
-
-static gint
-e_meeting_time_selector_item_event (GnomeCanvasItem *item, GdkEvent *event)
-{
- EMeetingTimeSelectorItem *mts_item;
-
- mts_item = E_MEETING_TIME_SELECTOR_ITEM (item);
-
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- return e_meeting_time_selector_item_button_press (mts_item,
- event);
- case GDK_BUTTON_RELEASE:
- return e_meeting_time_selector_item_button_release (mts_item,
- event);
- case GDK_MOTION_NOTIFY:
- return e_meeting_time_selector_item_motion_notify (mts_item,
- event);
- default:
- break;
- }
-
- return FALSE;
-}
-
-
-/* This handles all button press events for the item. If the cursor is over
- one of the meeting time vertical bars we start a drag. If not we set the
- meeting time to the nearest half-hour interval.
- Note that GnomeCanvas converts the event coords to world coords,
- i.e. relative to the entire canvas scroll area. */
-static gint
-e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event)
-{
- EMeetingTimeSelector *mts;
- EMeetingTime start_time, end_time;
- EMeetingTimeSelectorPosition position;
- GDate *start_date, *end_date;
- gint x, y;
-
- mts = mts_item->mts;
- x = (gint) event->button.x;
- y = (gint) event->button.y;
-
- /* Check if we are starting a drag of the vertical meeting time bars.*/
- position = e_meeting_time_selector_item_get_drag_position (mts_item,
- x, y);
- if (position != E_MEETING_TIME_SELECTOR_POS_NONE) {
- if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (mts_item),
- GDK_POINTER_MOTION_MASK
- | GDK_BUTTON_RELEASE_MASK,
- mts_item->resize_cursor,
- event->button.time) == 0 /*Success*/) {
- mts->dragging_position = position;
- return TRUE;
- }
- }
-
- /* Convert the x coordinate into a EMeetingTimeSelectorTime. */
- e_meeting_time_selector_calculate_time (mts, x, &start_time);
- start_date = &start_time.date;
- end_date = &end_time.date;
-
- /* Find the nearest half-hour or hour interval, depending on whether
- zoomed_out is set. */
- if (mts->zoomed_out) {
- start_time.minute = 0;
- end_time = start_time;
- end_time.hour += 1;
- } else {
- start_time.minute -= start_time.minute % 30;
- end_time = start_time;
- end_time.minute += 30;
- }
-
- /* Fix any overflows. */
- e_meeting_time_selector_fix_time_overflows (&end_time);
-
- /* Set the new meeting time. */
- e_meeting_time_selector_set_meeting_time (mts_item->mts,
- g_date_year (start_date),
- g_date_month (start_date),
- g_date_day (start_date),
- start_time.hour,
- start_time.minute,
- g_date_year (end_date),
- g_date_month (end_date),
- g_date_day (end_date),
- end_time.hour,
- end_time.minute);
-
-
- return FALSE;
-}
-
-
-/* This handles all button release events for the item. If we were dragging,
- we finish the drag. */
-static gint
-e_meeting_time_selector_item_button_release (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event)
-{
- EMeetingTimeSelector *mts;
-
- mts = mts_item->mts;
-
- /* Reset any drag. */
- if (mts->dragging_position != E_MEETING_TIME_SELECTOR_POS_NONE) {
- mts->dragging_position = E_MEETING_TIME_SELECTOR_POS_NONE;
- e_meeting_time_selector_remove_timeout (mts);
- gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (mts_item),
- event->button.time);
- }
-
- return FALSE;
-}
-
-
-/* This handles all motion notify events for the item. If button1 is pressed
- we check if a drag is in progress. If not, we set the cursor if we are over
- the meeting time vertical bars. Note that GnomeCanvas doesn't use motion
- hints, which may affect performance. */
-static gint
-e_meeting_time_selector_item_motion_notify (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event)
-{
- EMeetingTimeSelector *mts;
- EMeetingTimeSelectorPosition position;
- GdkCursor *cursor;
- gint x, y;
-
- mts = mts_item->mts;
- x = (gint) event->motion.x;
- y = (gint) event->motion.y;
-
- if (mts->dragging_position != E_MEETING_TIME_SELECTOR_POS_NONE) {
- e_meeting_time_selector_drag_meeting_time (mts, x);
- return TRUE;
- }
-
- position = e_meeting_time_selector_item_get_drag_position (mts_item,
- x, y);
-
- /* Determine which cursor should be used. */
- if (position == E_MEETING_TIME_SELECTOR_POS_NONE)
- cursor = mts_item->normal_cursor;
- else
- cursor = mts_item->resize_cursor;
-
- /* Only set the cursor if it is different to the last one we set. */
- if (mts_item->last_cursor_set != cursor) {
- mts_item->last_cursor_set = cursor;
- gdk_window_set_cursor (GTK_WIDGET (GNOME_CANVAS_ITEM (mts_item)->canvas)->window, cursor);
- }
-
- return FALSE;
-}
-
-
-static EMeetingTimeSelectorPosition
-e_meeting_time_selector_item_get_drag_position (EMeetingTimeSelectorItem *mts_item,
- gint x, gint y)
-{
- EMeetingTimeSelector *mts;
- gboolean is_display_top;
- gint meeting_start_x, meeting_end_x;
-
- mts = mts_item->mts;
-
- is_display_top = (GTK_WIDGET (GNOME_CANVAS_ITEM (mts_item)->canvas) == mts->display_top) ? TRUE : FALSE;
-
- if (is_display_top && y < mts->row_height * 2)
- return E_MEETING_TIME_SELECTOR_POS_NONE;
-
- if (!e_meeting_time_selector_get_meeting_time_positions (mts, &meeting_start_x, &meeting_end_x))
- return E_MEETING_TIME_SELECTOR_POS_NONE;
-
- if (x >= meeting_end_x - 2 && x <= meeting_end_x + 2)
- return E_MEETING_TIME_SELECTOR_POS_END;
-
- if (x >= meeting_start_x - 2 && x <= meeting_start_x + 2)
- return E_MEETING_TIME_SELECTOR_POS_START;
-
- return E_MEETING_TIME_SELECTOR_POS_NONE;
-}
-
-
-static gboolean
-e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts,
- gint row,
- gint x,
- gint width,
- gint *start_x,
- gint *end_x)
-{
- EMeetingAttendee *ia;
- EMeetingTime busy_periods_start;
- EMeetingTime busy_periods_end;
-
- ia = e_meeting_model_find_attendee_at_row (mts->model, row);
- busy_periods_start = e_meeting_attendee_get_start_busy_range (ia);
- busy_periods_end = e_meeting_attendee_get_end_busy_range (ia);
-
- *start_x = -1;
- *end_x = -1;
-
- if (!g_date_valid (&busy_periods_start.date)
- || !g_date_valid (&busy_periods_end.date))
- return FALSE;
-
- *start_x = e_meeting_time_selector_calculate_time_position (mts, &busy_periods_start) - x - 1;
-
- *end_x = e_meeting_time_selector_calculate_time_position (mts, &busy_periods_end) - x;
-
- return TRUE;
-}
diff --git a/calendar/gui/e-meeting-time-sel-item.h b/calendar/gui/e-meeting-time-sel-item.h
deleted file mode 100644
index 7ad1f232b2..0000000000
--- a/calendar/gui/e-meeting-time-sel-item.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@gtk.org>
- *
- * 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
- */
-
-/*
- * MeetingTimeSelectorItem - A GnomeCanvasItem which is used for both the main
- * display canvas and the top display (with the dates, times & All Attendees).
- * I didn't make these separate GnomeCanvasItems since they share a lot of
- * code.
- */
-
-#ifndef _E_MEETING_TIME_SELECTOR_ITEM_H_
-#define _E_MEETING_TIME_SELECTOR_ITEM_H_
-
-#include "e-meeting-time-sel.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#define E_MEETING_TIME_SELECTOR_ITEM(obj) (GTK_CHECK_CAST((obj), e_meeting_time_selector_item_get_type (), EMeetingTimeSelectorItem))
-#define E_MEETING_TIME_SELECTOR_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), e_meeting_time_selector_item_get_type (), EMeetingTimeSelectorItemClass))
-#define IS_E_MEETING_TIME_SELECTOR_ITEM(o) (GTK_CHECK_TYPE((o), e_meeting_time_selector_item_get_type ()))
-
-
-typedef struct _EMeetingTimeSelectorItem EMeetingTimeSelectorItem;
-typedef struct _EMeetingTimeSelectorItemClass EMeetingTimeSelectorItemClass;
-
-struct _EMeetingTimeSelectorItem
-{
- GnomeCanvasItem canvas_item;
-
- /* The parent EMeetingTimeSelector widget. */
- EMeetingTimeSelector *mts;
-
- /* This GC is used for most of the drawing. The fg/bg colors are
- changed for each bit. */
- GdkGC *main_gc;
- GdkGC *stipple_gc;
-
- /* The normal & resize cursors. */
- GdkCursor *normal_cursor;
- GdkCursor *resize_cursor;
-
- /* This remembers the last cursor set on the window. */
- GdkCursor *last_cursor_set;
-};
-
-
-struct _EMeetingTimeSelectorItemClass
-{
- GnomeCanvasItemClass parent_class;
-};
-
-GtkType e_meeting_time_selector_item_get_type (void);
-
-
-#endif /* _E_MEETING_TIME_SELECTOR_ITEM_H_ */
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
deleted file mode 100644
index f97471aa28..0000000000
--- a/calendar/gui/e-meeting-time-sel.c
+++ /dev/null
@@ -1,2623 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@gtk.org>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-meeting-time-sel.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <glib.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkalignment.h>
-#include <gtk/gtkarrow.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkdrawingarea.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkfixed.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkhscrollbar.h>
-#include <gtk/gtkhseparator.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkradiomenuitem.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkvscrollbar.h>
-#include <libgnomeui/gnome-dateedit.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-canvas-widget.h>
-
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <gal/e-table/e-cell-combo.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-table-scrolled.h>
-
-#include <widgets/misc/e-dateedit.h>
-#include "component-factory.h"
-#include "calendar-config.h"
-#include "e-meeting-time-sel-item.h"
-
-/* An array of hour strings, "0:00" .. "23:00". */
-const gchar *EMeetingTimeSelectorHours[24] = {
- "0:00", "1:00", "2:00", "3:00", "4:00", "5:00", "6:00", "7:00",
- "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00",
- "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00"
-};
-
-/* The number of days shown in the entire canvas. */
-#define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 365
-
-/* This is the number of pixels between the mouse has to move before the
- scroll speed is incremented. */
-#define E_MEETING_TIME_SELECTOR_SCROLL_INCREMENT_WIDTH 10
-
-/* This is the maximum scrolling speed. */
-#define E_MEETING_TIME_SELECTOR_MAX_SCROLL_SPEED 4
-
-
-static void e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass);
-static void e_meeting_time_selector_init (EMeetingTimeSelector * mts);
-static void e_meeting_time_selector_destroy (GtkObject *object);
-static void e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
- const char *name, GdkColor *c);
-static void e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts,
- GtkWidget *hbox,
- gchar *label_text,
- GdkColor *color);
-static gint e_meeting_time_selector_expose_key_color (GtkWidget *darea,
- GdkEventExpose *event,
- GdkColor *color);
-static void e_meeting_time_selector_options_menu_detacher (GtkWidget *widget,
- GtkMenu *menu);
-static void e_meeting_time_selector_autopick_menu_detacher (GtkWidget *widget,
- GtkMenu *menu);
-static void e_meeting_time_selector_realize (GtkWidget *widget);
-static void e_meeting_time_selector_unrealize (GtkWidget *widget);
-static gint e_meeting_time_selector_expose_event (GtkWidget *widget,
- GdkEventExpose *event);
-static void e_meeting_time_selector_draw (GtkWidget *widget,
- GdkRectangle *area);
-static void e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustment,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
- EMeetingTimeSelector *mts);
-
-static void e_meeting_time_selector_on_canvas_realized (GtkWidget *widget,
- EMeetingTimeSelector *mts);
-
-static gint e_meeting_time_selector_compare_times (EMeetingTime*time1,
- EMeetingTime*time2);
-static void e_meeting_time_selector_on_options_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu,
- gint *x,
- gint *y,
- gpointer user_data);
-static void e_meeting_time_selector_on_zoomed_out_toggled (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_working_hours_toggled (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_invite_others_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_update_free_busy (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_autopick_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu,
- gint *x,
- gint *y,
- gpointer user_data);
-static void e_meeting_time_selector_on_autopick_option_toggled (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_prev_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_next_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
- gboolean forward);
-static void e_meeting_time_selector_calculate_time_difference (EMeetingTime*start,
- EMeetingTime*end,
- gint *days,
- gint *hours,
- gint *minutes);
-static void e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
- EMeetingTime*start_time,
- EMeetingTime*end_time,
- gint days, gint hours, gint mins);
-static void e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mts,
- EMeetingTime *start_time,
- EMeetingTime *end_time,
- gint days, gint hours, gint mins);
-static void e_meeting_time_selector_adjust_time (EMeetingTime*mtstime,
- gint days, gint hours, gint minutes);
-static EMeetingFreeBusyPeriod* e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
- EMeetingAttendee *attendee,
- EMeetingTime *start_time,
- EMeetingTime *end_time);
-
-
-static void e_meeting_time_selector_recalc_grid (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_save_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime);
-static void e_meeting_time_selector_restore_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime);
-static void e_meeting_time_selector_on_start_time_changed (GtkWidget *widget,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_update_date_popup_menus (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_on_canvas_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_update_main_canvas_scroll_region (EMeetingTimeSelector *mts);
-static gboolean e_meeting_time_selector_timeout_handler (gpointer data);
-static void e_meeting_time_selector_update_start_date_edit (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_update_end_date_edit (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts);
-static void e_meeting_time_selector_update_dates_shown (EMeetingTimeSelector *mts);
-
-static void row_count_changed_cb (ETableModel *etm, int row, int count, gpointer data);
-static void sort_info_changed_cb (ETableSortInfo *info, gpointer data);
-
-static GtkTableClass *parent_class;
-
-
-GtkType
-e_meeting_time_selector_get_type (void)
-{
- static guint e_meeting_time_selector_type = 0;
-
- if (!e_meeting_time_selector_type) {
- GtkTypeInfo e_meeting_time_selector_info =
- {
- "EMeetingTimeSelector",
- sizeof (EMeetingTimeSelector),
- sizeof (EMeetingTimeSelectorClass),
- (GtkClassInitFunc) e_meeting_time_selector_class_init,
- (GtkObjectInitFunc) e_meeting_time_selector_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- e_meeting_time_selector_type = gtk_type_unique (GTK_TYPE_TABLE,
- &e_meeting_time_selector_info);
- }
- return e_meeting_time_selector_type;
-}
-
-
-static void
-e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- parent_class = gtk_type_class (gtk_table_get_type());
-
- object_class = (GtkObjectClass *) klass;
- widget_class = (GtkWidgetClass *) klass;
-
- object_class->destroy = e_meeting_time_selector_destroy;
-
- widget_class->realize = e_meeting_time_selector_realize;
- widget_class->unrealize = e_meeting_time_selector_unrealize;
- widget_class->expose_event = e_meeting_time_selector_expose_event;
- widget_class->draw = e_meeting_time_selector_draw;
-}
-
-
-static void
-e_meeting_time_selector_init (EMeetingTimeSelector * mts)
-{
- /* The shadow is drawn in the border so it must be >= 2 pixels. */
- gtk_container_set_border_width (GTK_CONTAINER (mts), 2);
-
- mts->accel_group = gtk_accel_group_new ();
-
- mts->working_hours_only = TRUE;
- mts->day_start_hour = 9;
- mts->day_start_minute = 0;
- mts->day_end_hour = 18;
- mts->day_end_minute = 0;
- mts->zoomed_out = TRUE;
- mts->dragging_position = E_MEETING_TIME_SELECTOR_POS_NONE;
-
- mts->etable = NULL;
-}
-
-
-void
-e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingModel *emm)
-{
- GtkWidget *hbox, *vbox, *separator, *button, *label, *table;
- GtkWidget *alignment, *child_hbox, *child_vbox, *arrow, *menuitem;
- GSList *group;
- GdkVisual *visual;
- GdkColormap *colormap;
- guint accel_key;
- GtkAccelGroup *menu_accel_group;
- time_t meeting_start_time;
- struct tm *meeting_start_tm;
- char *filename;
- ETable *real_table;
- guchar stipple_bits[] = {
- 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
- };
-
- /* The default meeting time is the nearest half-hour interval in the
- future, in working hours. */
- meeting_start_time = time (NULL);
- g_date_clear (&mts->meeting_start_time.date, 1);
- g_date_set_time (&mts->meeting_start_time.date, meeting_start_time);
- meeting_start_tm = localtime (&meeting_start_time);
- mts->meeting_start_time.hour = meeting_start_tm->tm_hour;
- mts->meeting_start_time.minute = meeting_start_tm->tm_min;
-
- e_meeting_time_selector_find_nearest_interval (mts, &mts->meeting_start_time,
- &mts->meeting_end_time,
- 0, 0, 30);
-
- e_meeting_time_selector_update_dates_shown (mts);
-
- mts->meeting_positions_valid = FALSE;
-
- mts->row_height = 19;
- mts->col_width = 50;
- mts->day_width = 50 * 24 + 1;
-
- mts->auto_scroll_timeout_id = 0;
-
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_table_attach (GTK_TABLE (mts),
- vbox, 0, 1, 0, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (vbox);
-
- child_vbox = gtk_vbox_new (FALSE, 0);
- gtk_widget_set_usize (child_vbox, 1, mts->row_height * 2 - 6);
- gtk_box_pack_start (GTK_BOX (vbox), child_vbox, FALSE, FALSE, 0);
- gtk_widget_show (child_vbox);
-
- mts->attendees_vbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), mts->attendees_vbox, TRUE, TRUE, 0);
- gtk_widget_show (mts->attendees_vbox);
-
- /* build the etable */
- filename = g_strdup_printf ("%s/config/et-header-meeting-time-sel", evolution_dir);
- mts->model = emm;
-
- gtk_signal_connect (GTK_OBJECT (mts->model), "model_rows_inserted",
- GTK_SIGNAL_FUNC (row_count_changed_cb), mts);
- gtk_signal_connect (GTK_OBJECT (mts->model), "model_rows_deleted",
- GTK_SIGNAL_FUNC (row_count_changed_cb), mts);
-
- mts->etable = GTK_WIDGET (e_meeting_model_etable_from_model (mts->model,
- EVOLUTION_ETSPECDIR "/e-meeting-time-sel.etspec",
- filename));
-
- real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (mts->etable));
- gtk_signal_connect (GTK_OBJECT (real_table->sort_info), "sort_info_changed",
- GTK_SIGNAL_FUNC (sort_info_changed_cb), mts);
-
- gtk_box_pack_start (GTK_BOX (mts->attendees_vbox), mts->etable, TRUE, TRUE, 2);
- gtk_widget_show (mts->etable);
- g_free (filename);
-
- /* The free/busy information */
- mts->display_top = gnome_canvas_new ();
- gtk_widget_set_usize (mts->display_top, -1, mts->row_height * 3);
- gnome_canvas_set_scroll_region (GNOME_CANVAS (mts->display_top),
- 0, 0,
- mts->day_width * E_MEETING_TIME_SELECTOR_DAYS_SHOWN,
- mts->row_height * 3);
- /* Add some horizontal padding for the shadow around the display. */
- gtk_table_attach (GTK_TABLE (mts), mts->display_top,
- 1, 4, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
- gtk_widget_show (mts->display_top);
- gtk_signal_connect (GTK_OBJECT (mts->display_top), "realize",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_canvas_realized), mts);
-
- mts->display_main = gnome_canvas_new ();
- e_meeting_time_selector_update_main_canvas_scroll_region (mts);
- /* Add some horizontal padding for the shadow around the display. */
- gtk_table_attach (GTK_TABLE (mts), mts->display_main,
- 1, 4, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- gtk_widget_show (mts->display_main);
- gtk_signal_connect (GTK_OBJECT (mts->display_main), "realize",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_canvas_realized), mts);
- gtk_signal_connect (GTK_OBJECT (mts->display_main), "size_allocate",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_canvas_size_allocate), mts);
-
- mts->hscrollbar = gtk_hscrollbar_new (GTK_LAYOUT (mts->display_main)->hadjustment);
- GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->col_width;
- gtk_table_attach (GTK_TABLE (mts), mts->hscrollbar,
- 1, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
- gtk_widget_show (mts->hscrollbar);
-
- mts->vscrollbar = gtk_vscrollbar_new (GTK_LAYOUT (mts->display_main)->vadjustment);
- GTK_LAYOUT (mts->display_main)->vadjustment->step_increment = mts->row_height;
- gtk_table_attach (GTK_TABLE (mts), mts->vscrollbar,
- 4, 5, 1, 2, 0, GTK_EXPAND | GTK_FILL, 0, 0);
- gtk_widget_show (mts->vscrollbar);
-
- /* Create the item in the top canvas. */
- gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (mts->display_top)->root),
- e_meeting_time_selector_item_get_type (),
- "EMeetingTimeSelectorItem::meeting_time_selector", mts,
- NULL);
-
- /* Create the item in the main canvas. */
- gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (mts->display_main)->root),
- e_meeting_time_selector_item_get_type (),
- "EMeetingTimeSelectorItem::meeting_time_selector", mts,
- NULL);
-
- /* Create the hbox containing the color key. */
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_table_attach (GTK_TABLE (mts), hbox,
- 1, 4, 3, 4, GTK_FILL, 0, 0, 8);
- gtk_widget_show (hbox);
-
- e_meeting_time_selector_add_key_color (mts, hbox, _("Tentative"), &mts->busy_colors[E_MEETING_FREE_BUSY_TENTATIVE]);
- e_meeting_time_selector_add_key_color (mts, hbox, _("Busy"), &mts->busy_colors[E_MEETING_FREE_BUSY_BUSY]);
- e_meeting_time_selector_add_key_color (mts, hbox, _("Out of Office"), &mts->busy_colors[E_MEETING_FREE_BUSY_OUT_OF_OFFICE]);
- e_meeting_time_selector_add_key_color (mts, hbox, _("No Information"),
- NULL);
-
- separator = gtk_hseparator_new ();
- gtk_table_attach (GTK_TABLE (mts), separator,
- 0, 5, 4, 5, GTK_FILL, 0, 0, 0);
- gtk_widget_show (separator);
-
- /* Create the Invite Others & Options buttons on the left. */
- hbox = gtk_hbox_new (FALSE, 4);
- gtk_table_attach (GTK_TABLE (mts), hbox,
- 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
- gtk_widget_show (hbox);
-
- button = gtk_button_new_with_label ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (button)->child),
- _("_Invite Others..."));
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- gtk_widget_show (button);
- gtk_widget_add_accelerator (button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_invite_others_button_clicked), mts);
-
- mts->options_button = gtk_button_new ();
- gtk_box_pack_start (GTK_BOX (hbox), mts->options_button, TRUE, TRUE, 0);
- gtk_widget_show (mts->options_button);
-
- gtk_signal_connect (GTK_OBJECT (mts->options_button), "clicked",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_options_button_clicked), mts);
-
- child_hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (mts->options_button), child_hbox);
- gtk_widget_show (child_hbox);
-
- label = gtk_label_new ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (label), _("_Options"));
- gtk_box_pack_start (GTK_BOX (child_hbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_widget_add_accelerator (mts->options_button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK, 0);
-
- arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
- gtk_box_pack_start (GTK_BOX (child_hbox), arrow, FALSE, FALSE, 2);
- gtk_widget_show (arrow);
-
- /* Create the Options menu. */
- mts->options_menu = gtk_menu_new ();
- gtk_menu_attach_to_widget (GTK_MENU (mts->options_menu), mts->options_button,
- e_meeting_time_selector_options_menu_detacher);
- menu_accel_group = gtk_menu_ensure_uline_accel_group (GTK_MENU (mts->options_menu));
-
- menuitem = gtk_check_menu_item_new_with_label ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("Show _Only Working Hours"));
- gtk_menu_append (GTK_MENU (mts->options_menu), menuitem);
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem),
- mts->working_hours_only);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "toggled",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_working_hours_toggled), mts);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_check_menu_item_new_with_label ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("Show _Zoomed Out"));
- gtk_menu_append (GTK_MENU (mts->options_menu), menuitem);
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem),
- mts->zoomed_out);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "toggled",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_zoomed_out_toggled), mts);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_menu_item_new ();
- gtk_menu_append (GTK_MENU (mts->options_menu), menuitem);
- gtk_widget_set_sensitive (menuitem, FALSE);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_menu_item_new_with_label ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("_Update Free/Busy"));
- gtk_menu_append (GTK_MENU (mts->options_menu), menuitem);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_update_free_busy), mts);
- gtk_widget_show (menuitem);
-
- /* Create the 3 AutoPick buttons on the left. */
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_table_attach (GTK_TABLE (mts), hbox,
- 0, 1, 5, 6, GTK_FILL, 0, 0, 0);
- gtk_widget_show (hbox);
-
- button = gtk_button_new_with_label ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (button)->child),
- _("_<<"));
- gtk_widget_add_accelerator (button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK | GDK_SHIFT_MASK, 0);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- gtk_widget_show (button);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_prev_button_clicked), mts);
-
- mts->autopick_button = gtk_button_new ();
- gtk_box_pack_start (GTK_BOX (hbox), mts->autopick_button, TRUE, TRUE, 0);
- gtk_widget_show (mts->autopick_button);
-
- child_hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (mts->autopick_button), child_hbox);
- gtk_widget_show (child_hbox);
-
- label = gtk_label_new ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (label), _("_Autopick"));
- gtk_box_pack_start (GTK_BOX (child_hbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_widget_add_accelerator (mts->autopick_button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (mts->autopick_button), "clicked",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_autopick_button_clicked), mts);
-
- arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
- gtk_box_pack_start (GTK_BOX (child_hbox), arrow, FALSE, FALSE, 2);
- gtk_widget_show (arrow);
-
- button = gtk_button_new_with_label ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (button)->child),
- _(">_>"));
- gtk_widget_add_accelerator (button, "clicked", mts->accel_group,
- accel_key, GDK_MOD1_MASK | GDK_SHIFT_MASK, 0);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- gtk_widget_show (button);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_next_button_clicked), mts);
-
- /* Create the Autopick menu. */
- mts->autopick_menu = gtk_menu_new ();
- gtk_menu_attach_to_widget (GTK_MENU (mts->autopick_menu), mts->autopick_button,
- e_meeting_time_selector_autopick_menu_detacher);
- menu_accel_group = gtk_menu_ensure_uline_accel_group (GTK_MENU (mts->autopick_menu));
-
- menuitem = gtk_radio_menu_item_new_with_label (NULL, "");
- mts->autopick_all_item = menuitem;
- group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("_All People and Resources"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "toggled",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_autopick_option_toggled), mts);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_radio_menu_item_new_with_label (group, "");
- mts->autopick_all_people_one_resource_item = menuitem;
- group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("All _People and One Resource"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "toggled",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_autopick_option_toggled), mts);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_radio_menu_item_new_with_label (group, "");
- mts->autopick_required_people_item = menuitem;
- group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("_Required People"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_autopick_option_toggled), mts);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_radio_menu_item_new_with_label (group, "");
- mts->autopick_required_people_one_resource_item = menuitem;
- group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
- accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child), _("Required People and _One Resource"));
- gtk_menu_append (GTK_MENU (mts->autopick_menu), menuitem);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, 0, 0);
- gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
- accel_key, GDK_MOD1_MASK, 0);
- gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_autopick_option_toggled), mts);
- gtk_widget_show (menuitem);
-
- /* Create the date entry fields on the right. */
- alignment = gtk_alignment_new (0.5, 0.5, 0, 0);
- gtk_table_attach (GTK_TABLE (mts), alignment,
- 1, 4, 5, 6, GTK_FILL, 0, 0, 0);
- gtk_widget_show (alignment);
-
- table = gtk_table_new (2, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- gtk_container_add (GTK_CONTAINER (alignment), table);
- gtk_widget_show (table);
-
- label = gtk_label_new ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (label),
- _("Meeting _start time:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 0, 1, GTK_FILL, 0, 4, 0);
- gtk_widget_show (label);
-
- mts->start_date_edit = e_date_edit_new ();
- e_date_edit_set_show_time (E_DATE_EDIT (mts->start_date_edit), TRUE);
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (mts->start_date_edit),
- calendar_config_get_24_hour_format ());
-
- gtk_table_attach (GTK_TABLE (table), mts->start_date_edit,
- 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
- gtk_widget_show (mts->start_date_edit);
- gtk_signal_connect (GTK_OBJECT (mts->start_date_edit), "changed",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_start_time_changed), mts);
-
- label = gtk_label_new ("");
- accel_key = gtk_label_parse_uline (GTK_LABEL (label),
- _("Meeting _end time:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 1, 2, GTK_FILL, 0, 4, 0);
- gtk_widget_show (label);
-
- mts->end_date_edit = e_date_edit_new ();
- e_date_edit_set_show_time (E_DATE_EDIT (mts->end_date_edit), TRUE);
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (mts->end_date_edit),
- calendar_config_get_24_hour_format ());
-
- gtk_table_attach (GTK_TABLE (table), mts->end_date_edit,
- 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
- gtk_widget_show (mts->end_date_edit);
- gtk_signal_connect (GTK_OBJECT (mts->end_date_edit), "changed",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_on_end_time_changed), mts);
-
- gtk_table_set_col_spacing (GTK_TABLE (mts), 0, 4);
- gtk_table_set_row_spacing (GTK_TABLE (mts), 4, 12);
-
- /* Allocate the colors. */
- visual = gtk_widget_get_visual (GTK_WIDGET (mts));
- colormap = gtk_widget_get_colormap (GTK_WIDGET (mts));
- mts->color_context = gdk_color_context_new (visual, colormap);
- e_meeting_time_selector_alloc_named_color (mts, "gray75", &mts->bg_color);
- e_meeting_time_selector_alloc_named_color (mts, "gray50", &mts->all_attendees_bg_color);
- gdk_color_black (colormap, &mts->grid_color);
- gdk_color_white (colormap, &mts->grid_shadow_color);
- e_meeting_time_selector_alloc_named_color (mts, "gray50", &mts->grid_unused_color);
- gdk_color_white (colormap, &mts->meeting_time_bg_color);
- gdk_color_white (colormap, &mts->stipple_bg_color);
- gdk_color_white (colormap, &mts->attendee_list_bg_color);
-
- e_meeting_time_selector_alloc_named_color (mts, "LightSkyBlue2", &mts->busy_colors[E_MEETING_FREE_BUSY_TENTATIVE]);
- e_meeting_time_selector_alloc_named_color (mts, "blue", &mts->busy_colors[E_MEETING_FREE_BUSY_BUSY]);
- e_meeting_time_selector_alloc_named_color (mts, "HotPink3", &mts->busy_colors[E_MEETING_FREE_BUSY_OUT_OF_OFFICE]);
-
- /* Create the stipple, for attendees with no data. */
- mts->stipple = gdk_bitmap_create_from_data (NULL, (gchar*)stipple_bits,
- 8, 8);
-
- /* Connect handlers to the adjustments in the main canvas, so we can
- scroll the other 2 canvases. */
- gtk_signal_connect (GTK_OBJECT (GTK_LAYOUT (mts->display_main)->hadjustment), "value_changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_hadjustment_changed), mts);
- gtk_signal_connect (GTK_OBJECT (GTK_LAYOUT (mts->display_main)->vadjustment), "value_changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_vadjustment_changed), mts);
- gtk_signal_connect (GTK_OBJECT (GTK_LAYOUT (mts->display_main)->vadjustment), "changed", GTK_SIGNAL_FUNC (e_meeting_time_selector_vadjustment_changed), mts);
-
- e_meeting_time_selector_recalc_grid (mts);
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
- e_meeting_time_selector_update_start_date_edit (mts);
- e_meeting_time_selector_update_end_date_edit (mts);
- e_meeting_time_selector_update_date_popup_menus (mts);
-}
-
-
-/* This adds a color to the color key beneath the main display. If color is
- NULL, it displays the No Info stipple instead. */
-static void
-e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts,
- GtkWidget *hbox,
- gchar *label_text, GdkColor *color)
-{
- GtkWidget *child_hbox, *darea, *label;
-
- child_hbox = gtk_hbox_new (FALSE, 4);
- gtk_box_pack_start (GTK_BOX (hbox), child_hbox, TRUE, TRUE, 0);
- gtk_widget_show (child_hbox);
-
- darea = gtk_drawing_area_new ();
- gtk_box_pack_start (GTK_BOX (child_hbox), darea, FALSE, FALSE, 0);
- gtk_object_set_user_data (GTK_OBJECT (darea), mts);
- gtk_widget_set_usize (darea, 14, 14);
- gtk_widget_show (darea);
-
- label = gtk_label_new (label_text);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_box_pack_start (GTK_BOX (child_hbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
-
- gtk_signal_connect (GTK_OBJECT (darea), "expose_event",
- GTK_SIGNAL_FUNC (e_meeting_time_selector_expose_key_color),
- color);
-}
-
-static gint
-e_meeting_time_selector_expose_key_color (GtkWidget *darea,
- GdkEventExpose *event,
- GdkColor *color)
-{
- EMeetingTimeSelector * mts;
- GdkGC *gc;
- gint width, height;
-
- mts = gtk_object_get_user_data (GTK_OBJECT (darea));
- gc = mts->color_key_gc;
- width = darea->allocation.width;
- height = darea->allocation.height;
-
- gtk_draw_shadow (darea->style, darea->window, GTK_STATE_NORMAL,
- GTK_SHADOW_IN, 0, 0, width, height);
-
- if (color) {
- gdk_gc_set_foreground (gc, color);
- gdk_draw_rectangle (darea->window, gc, TRUE, 1, 1,
- width - 2, height - 2);
- } else {
- gdk_gc_set_foreground (gc, &mts->grid_color);
- gdk_gc_set_background (gc, &mts->stipple_bg_color);
- gdk_gc_set_stipple (gc, mts->stipple);
- gdk_gc_set_fill (gc, GDK_OPAQUE_STIPPLED);
- gdk_draw_rectangle (darea->window, gc, TRUE, 1, 1,
- width - 2, height - 2);
- gdk_gc_set_fill (gc, GDK_SOLID);
- }
-
- return TRUE;
-}
-
-
-static void
-e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
- const char *name, GdkColor *c)
-{
- int failed;
-
- g_return_if_fail (name != NULL);
- g_return_if_fail (c != NULL);
-
- gdk_color_parse (name, c);
- c->pixel = 0;
- c->pixel = gdk_color_context_get_pixel (mts->color_context,
- c->red, c->green, c->blue,
- &failed);
- if (failed)
- g_warning ("Failed to allocate color: %s\n", name);
-}
-
-
-static void
-e_meeting_time_selector_options_menu_detacher (GtkWidget *widget,
- GtkMenu *menu)
-{
- EMeetingTimeSelector *mts;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (widget));
-
- mts = E_MEETING_TIME_SELECTOR (widget);
- g_return_if_fail (mts->options_menu == (GtkWidget*) menu);
-
- mts->options_menu = NULL;
-}
-
-
-static void
-e_meeting_time_selector_autopick_menu_detacher (GtkWidget *widget,
- GtkMenu *menu)
-{
- EMeetingTimeSelector *mts;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (widget));
-
- mts = E_MEETING_TIME_SELECTOR (widget);
- g_return_if_fail (mts->autopick_menu == (GtkWidget*) menu);
-
- mts->autopick_menu = NULL;
-}
-
-
-GtkWidget *
-e_meeting_time_selector_new (EMeetingModel *emm)
-{
- GtkWidget *mts;
-
- mts = GTK_WIDGET (gtk_type_new (e_meeting_time_selector_get_type ()));
-
- e_meeting_time_selector_construct (E_MEETING_TIME_SELECTOR (mts), emm);
-
- return mts;
-}
-
-
-static void
-e_meeting_time_selector_destroy (GtkObject *object)
-{
- EMeetingTimeSelector *mts;
- ETable *real_table;
- char *filename;
-
- mts = E_MEETING_TIME_SELECTOR (object);
-
- e_meeting_time_selector_remove_timeout (mts);
-
- gdk_color_context_free (mts->color_context);
- gdk_bitmap_unref (mts->stipple);
-
- filename = g_strdup_printf ("%s/config/et-header-meeting-time-sel",
- evolution_dir);
- real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (mts->etable));
- e_table_save_state (real_table, filename);
- g_free (filename);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (*GTK_OBJECT_CLASS (parent_class)->destroy)(object);
-}
-
-
-static void
-e_meeting_time_selector_realize (GtkWidget *widget)
-{
- EMeetingTimeSelector *mts;
-
- if (GTK_WIDGET_CLASS (parent_class)->realize)
- (*GTK_WIDGET_CLASS (parent_class)->realize)(widget);
-
- mts = E_MEETING_TIME_SELECTOR (widget);
-
- mts->color_key_gc = gdk_gc_new (widget->window);
-}
-
-
-static void
-e_meeting_time_selector_unrealize (GtkWidget *widget)
-{
- EMeetingTimeSelector *mts;
-
- mts = E_MEETING_TIME_SELECTOR (widget);
-
- gdk_gc_unref (mts->color_key_gc);
- mts->color_key_gc = NULL;
-
- if (GTK_WIDGET_CLASS (parent_class)->unrealize)
- (*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget);
-}
-
-/* This draws a shadow around the top display and main display. */
-static gint
-e_meeting_time_selector_expose_event (GtkWidget *widget,
- GdkEventExpose *event)
-{
- EMeetingTimeSelector *mts;
-
- mts = E_MEETING_TIME_SELECTOR (widget);
-
- e_meeting_time_selector_draw_shadow (mts);
-
- if (GTK_WIDGET_CLASS (parent_class)->expose_event)
- (*GTK_WIDGET_CLASS (parent_class)->expose_event)(widget, event);
-
- return FALSE;
-}
-
-
-static void
-e_meeting_time_selector_draw (GtkWidget *widget,
- GdkRectangle *area)
-{
- EMeetingTimeSelector *mts;
-
- mts = E_MEETING_TIME_SELECTOR (widget);
-
- e_meeting_time_selector_draw_shadow (mts);
-
- if (GTK_WIDGET_CLASS (parent_class)->draw)
- (*GTK_WIDGET_CLASS (parent_class)->draw)(widget, area);
-}
-
-
-static void
-e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts)
-{
- GtkWidget *widget;
- gint x, y, w, h;
-
- widget = GTK_WIDGET (mts);
-
- /* Draw the shadow around the graphical displays. */
- x = mts->display_top->allocation.x - 2;
- y = mts->display_top->allocation.y - 2;
- w = mts->display_top->allocation.width + 4;
- h = mts->display_top->allocation.height + mts->display_main->allocation.height + 4;
-
- gtk_draw_shadow (widget->style, widget->window, GTK_STATE_NORMAL,
- GTK_SHADOW_IN, x, y, w, h);
-}
-
-
-/* When the main canvas scrolls, we scroll the other canvases. */
-static void
-e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustment,
- EMeetingTimeSelector *mts)
-{
- GtkAdjustment *adj;
-
- adj = GTK_LAYOUT (mts->display_top)->hadjustment;
- if (adj->value != adjustment->value) {
- adj->value = adjustment->value;
- gtk_adjustment_value_changed (adj);
- }
-}
-
-
-static void
-e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
- EMeetingTimeSelector *mts)
-{
- GtkAdjustment *adj;
-
- adj = e_scroll_frame_get_vadjustment (E_SCROLL_FRAME (mts->etable));
- if (adj->value != adjustment->value) {
- adj->value = adjustment->value;
- gtk_adjustment_value_changed (adj);
- }
-}
-
-
-void
-e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts,
- gint *start_year,
- gint *start_month,
- gint *start_day,
- gint *start_hour,
- gint *start_minute,
- gint *end_year,
- gint *end_month,
- gint *end_day,
- gint *end_hour,
- gint *end_minute)
-{
- *start_year = g_date_year (&mts->meeting_start_time.date);
- *start_month = g_date_month (&mts->meeting_start_time.date);
- *start_day = g_date_day (&mts->meeting_start_time.date);
- *start_hour = mts->meeting_start_time.hour;
- *start_minute = mts->meeting_start_time.minute;
-
- *end_year = g_date_year (&mts->meeting_end_time.date);
- *end_month = g_date_month (&mts->meeting_end_time.date);
- *end_day = g_date_day (&mts->meeting_end_time.date);
- *end_hour = mts->meeting_end_time.hour;
- *end_minute = mts->meeting_end_time.minute;
-}
-
-
-gboolean
-e_meeting_time_selector_set_meeting_time (EMeetingTimeSelector *mts,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute)
-{
- g_return_val_if_fail (IS_E_MEETING_TIME_SELECTOR (mts), FALSE);
-
- /* Check the dates are valid. */
- if (!g_date_valid_dmy (start_day, start_month, start_year)
- || !g_date_valid_dmy (end_day, end_month, end_year)
- || start_hour < 0 || start_hour > 23
- || end_hour < 0 || end_hour > 23
- || start_minute < 0 || start_minute > 59
- || end_minute < 0 || end_minute > 59)
- return FALSE;
-
- g_date_set_dmy (&mts->meeting_start_time.date, start_day, start_month,
- start_year);
- mts->meeting_start_time.hour = start_hour;
- mts->meeting_start_time.minute = start_minute;
- g_date_set_dmy (&mts->meeting_end_time.date, end_day, end_month,
- end_year);
- mts->meeting_end_time.hour = end_hour;
- mts->meeting_end_time.minute = end_minute;
-
- mts->meeting_positions_valid = FALSE;
-
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-
- /* Set the times in the GnomeDateEdit widgets. */
- e_meeting_time_selector_update_start_date_edit (mts);
- e_meeting_time_selector_update_end_date_edit (mts);
-
- return TRUE;
-}
-
-
-void
-e_meeting_time_selector_set_working_hours_only (EMeetingTimeSelector *mts,
- gboolean working_hours_only)
-{
- EMeetingTime saved_time;
-
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
-
- if (mts->working_hours_only == working_hours_only)
- return;
-
- mts->working_hours_only = working_hours_only;
-
- e_meeting_time_selector_save_position (mts, &saved_time);
- e_meeting_time_selector_recalc_grid (mts);
- e_meeting_time_selector_restore_position (mts, &saved_time);
-
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
- e_meeting_time_selector_update_date_popup_menus (mts);
-}
-
-
-void
-e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts,
- gint day_start_hour,
- gint day_start_minute,
- gint day_end_hour,
- gint day_end_minute)
-{
- EMeetingTime saved_time;
-
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
-
- if (mts->day_start_hour == day_start_hour
- && mts->day_start_minute == day_start_minute
- && mts->day_end_hour == day_end_hour
- && mts->day_end_minute == day_end_minute)
- return;
-
- mts->day_start_hour = day_start_hour;
- mts->day_start_minute = day_start_minute;
- mts->day_end_hour = day_end_hour;
- mts->day_end_minute = day_end_minute;
-
- e_meeting_time_selector_save_position (mts, &saved_time);
- e_meeting_time_selector_recalc_grid (mts);
- e_meeting_time_selector_restore_position (mts, &saved_time);
-
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
- e_meeting_time_selector_update_date_popup_menus (mts);
-}
-
-
-void
-e_meeting_time_selector_set_zoomed_out (EMeetingTimeSelector *mts,
- gboolean zoomed_out)
-{
- EMeetingTime saved_time;
-
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
-
- if (mts->zoomed_out == zoomed_out)
- return;
-
- mts->zoomed_out = zoomed_out;
-
- e_meeting_time_selector_save_position (mts, &saved_time);
- e_meeting_time_selector_recalc_grid (mts);
- e_meeting_time_selector_restore_position (mts, &saved_time);
-
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-}
-
-
-EMeetingTimeSelectorAutopickOption
-e_meeting_time_selector_get_autopick_option (EMeetingTimeSelector *mts)
-{
- if (GTK_CHECK_MENU_ITEM (mts->autopick_all_item)->active)
- return E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_RESOURCES;
- if (GTK_CHECK_MENU_ITEM (mts->autopick_all_people_one_resource_item)->active)
- return E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_ONE_RESOURCE;
- if (GTK_CHECK_MENU_ITEM (mts->autopick_required_people_item)->active)
- return E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE;
- return E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE_AND_ONE_RESOURCE;
-}
-
-
-void
-e_meeting_time_selector_set_autopick_option (EMeetingTimeSelector *mts,
- EMeetingTimeSelectorAutopickOption autopick_option)
-{
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
-
- switch (autopick_option) {
- case E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_RESOURCES:
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mts->autopick_all_item), TRUE);
- break;
- case E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_ONE_RESOURCE:
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mts->autopick_all_people_one_resource_item), TRUE);
- break;
- case E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE:
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mts->autopick_required_people_item), TRUE);
- break;
- case E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE_AND_ONE_RESOURCE:
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mts->autopick_required_people_one_resource_item), TRUE);
- break;
- }
-}
-#if 0
-void
-e_meeting_time_selector_attendee_set_send_meeting_to (EMeetingTimeSelector *mts,
- gint row,
- gboolean send_meeting_to)
-{
- EMeetingTimeSelectorAttendee *attendee;
-
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
- g_return_if_fail (row >= 0);
- g_return_if_fail (row < mts->attendees->len);
-
- attendee = &g_array_index (mts->attendees,
- EMeetingTimeSelectorAttendee, row);
- attendee->send_meeting_to = send_meeting_to;
-}
-#endif
-
-static gint
-e_meeting_time_selector_compare_times (EMeetingTime*time1,
- EMeetingTime*time2)
-{
- gint day_comparison;
-
- day_comparison = g_date_compare (&time1->date,
- &time2->date);
- if (day_comparison != 0)
- return day_comparison;
-
- if (time1->hour < time2->hour)
- return -1;
- if (time1->hour > time2->hour)
- return 1;
-
- if (time1->minute < time2->minute)
- return -1;
- if (time1->minute > time2->minute)
- return 1;
-
- /* The start times are exactly the same. */
- return 0;
-}
-
-
-/*
- * DEBUGGING ROUTINES - functions to output various bits of data.
- */
-
-#ifdef E_MEETING_TIME_SELECTOR_DEBUG
-
-/* Debugging function to dump information on all attendees. */
-void
-e_meeting_time_selector_dump (EMeetingTimeSelector *mts)
-{
- EMeetingTimeSelectorAttendee *attendee;
- EMeetingTimeSelectorPeriod *period;
- gint row, period_num;
- gchar buffer[128];
-
- g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
-
- g_print ("\n\nAttendee Information:\n");
-
- for (row = 0; row < mts->attendees->len; row++) {
- attendee = &g_array_index (mts->attendees,
- EMeetingTimeSelectorAttendee, row);
- g_print ("Attendee: %s\n", attendee->name);
- g_print (" Longest Busy Period: %i days\n",
- attendee->longest_period_in_days);
-
- e_meeting_time_selector_attendee_ensure_periods_sorted (mts, attendee);
-#if 1
- for (period_num = 0;
- period_num < attendee->busy_periods->len;
- period_num++) {
- period = &g_array_index (attendee->busy_periods,
- EMeetingTimeSelectorPeriod,
- period_num);
-
- /* These are just for debugging so don't need i18n. */
- g_date_strftime (buffer, sizeof (buffer),
- "%A, %B %d, %Y", &period->start.date);
- g_print (" Start: %s %i:%02i\n", buffer,
- period->start.hour, period->start.minute);
-
- g_date_strftime (buffer, sizeof (buffer),
- "%A, %B %d, %Y", &period->end.date);
- g_print (" End : %s %i:%02i\n", buffer,
- period->end.hour, period->end.minute);
- }
-#endif
- }
-
-}
-
-
-/* This formats a EMeetingTimein a string and returns it.
- Note that it uses a static buffer. */
-gchar*
-e_meeting_time_selector_dump_time (EMeetingTime*mtstime)
-{
- static gchar buffer[128];
-
- gchar buffer2[128];
-
- /* This is just for debugging so doesn't need i18n. */
- g_date_strftime (buffer, sizeof (buffer), "%A, %B %d, %Y",
- &mtstime->date);
- sprintf (buffer2, " at %i:%02i", (gint) mtstime->hour,
- (gint) mtstime->minute);
- strcat (buffer, buffer2);
-
- return buffer;
-}
-
-
-/* This formats a GDate in a string and returns it.
- Note that it uses a static buffer. */
-gchar*
-e_meeting_time_selector_dump_date (GDate *date)
-{
- static gchar buffer[128];
-
- /* This is just for debugging so doesn't need i18n. */
- g_date_strftime (buffer, sizeof (buffer), "%A, %B %d, %Y", date);
- return buffer;
-}
-
-#endif /* E_MEETING_TIME_SELECTOR_DEBUG */
-
-
-static void
-e_meeting_time_selector_on_invite_others_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
-
-
-}
-
-
-static void
-e_meeting_time_selector_on_options_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
- gtk_menu_popup (GTK_MENU (mts->options_menu), NULL, NULL,
- e_meeting_time_selector_options_menu_position_callback,
- mts, 1, GDK_CURRENT_TIME);
-}
-
-
-static void
-e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu,
- gint *x,
- gint *y,
- gpointer user_data)
-{
- EMeetingTimeSelector *mts;
- GtkRequisition menu_requisition;
- gint max_x, max_y;
-
- mts = E_MEETING_TIME_SELECTOR (user_data);
-
- /* Calculate our preferred position. */
- gdk_window_get_origin (mts->options_button->window, x, y);
- *y += mts->options_button->allocation.height;
-
- /* Now make sure we are on the screen. */
- gtk_widget_size_request (mts->options_menu, &menu_requisition);
- max_x = MAX (0, gdk_screen_width () - menu_requisition.width);
- max_y = MAX (0, gdk_screen_height () - menu_requisition.height);
- *x = CLAMP (*x, 0, max_x);
- *y = CLAMP (*y, 0, max_y);
-}
-
-static void
-e_meeting_time_selector_refresh_cb (gpointer data)
-{
- EMeetingTimeSelector *mts = data;
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-}
-
-static void
-e_meeting_time_selector_on_update_free_busy (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
-
- /* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
- if (GTK_WIDGET_VISIBLE (mts->options_menu))
- gtk_menu_popdown (GTK_MENU (mts->options_menu));
-
- e_meeting_model_refresh_busy_periods (mts->model, e_meeting_time_selector_refresh_cb, mts);
-}
-
-
-static void
-e_meeting_time_selector_on_autopick_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
- gtk_menu_popup (GTK_MENU (mts->autopick_menu), NULL, NULL,
- e_meeting_time_selector_autopick_menu_position_callback,
- mts, 1, GDK_CURRENT_TIME);
-}
-
-
-static void
-e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu,
- gint *x,
- gint *y,
- gpointer user_data)
-{
- EMeetingTimeSelector *mts;
- GtkRequisition menu_requisition;
- gint max_x, max_y;
-
- mts = E_MEETING_TIME_SELECTOR (user_data);
-
- /* Calculate our preferred position. */
- gdk_window_get_origin (mts->autopick_button->window, x, y);
- *y += mts->autopick_button->allocation.height;
-
- /* Now make sure we are on the screen. */
- gtk_widget_size_request (mts->autopick_menu, &menu_requisition);
- max_x = MAX (0, gdk_screen_width () - menu_requisition.width);
- max_y = MAX (0, gdk_screen_height () - menu_requisition.height);
- *x = CLAMP (*x, 0, max_x);
- *y = CLAMP (*y, 0, max_y);
-}
-
-
-static void
-e_meeting_time_selector_on_autopick_option_toggled (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
- /* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
- if (GTK_WIDGET_VISIBLE (mts->autopick_menu))
- gtk_menu_popdown (GTK_MENU (mts->autopick_menu));
-}
-
-
-static void
-e_meeting_time_selector_on_prev_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
- e_meeting_time_selector_autopick (mts, FALSE);
-}
-
-
-static void
-e_meeting_time_selector_on_next_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
-{
- e_meeting_time_selector_autopick (mts, TRUE);
-}
-
-
-/* This tries to find the previous or next meeting time for which all
- attendees will be available. */
-static void
-e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
- gboolean forward)
-{
- EMeetingTime start_time, end_time, *resource_free;
- EMeetingAttendee *attendee;
- EMeetingFreeBusyPeriod *period;
- EMeetingTimeSelectorAutopickOption autopick_option;
- gint duration_days, duration_hours, duration_minutes, row;
- gboolean meeting_time_ok, skip_optional = FALSE;
- gboolean need_one_resource = FALSE, found_resource;
-
- /* Get the current meeting duration in days + hours + minutes. */
- e_meeting_time_selector_calculate_time_difference (&mts->meeting_start_time, &mts->meeting_end_time, &duration_days, &duration_hours, &duration_minutes);
-
- /* Find the first appropriate start time. */
- start_time = mts->meeting_start_time;
- if (forward)
- e_meeting_time_selector_find_nearest_interval (mts, &start_time, &end_time, duration_days, duration_hours, duration_minutes);
- else
- e_meeting_time_selector_find_nearest_interval_backward (mts, &start_time, &end_time, duration_days, duration_hours, duration_minutes);
-
- /* Determine if we can skip optional people and if we only need one
- resource based on the autopick option. */
- autopick_option = e_meeting_time_selector_get_autopick_option (mts);
- if (autopick_option == E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE
- || autopick_option == E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE_AND_ONE_RESOURCE)
- skip_optional = TRUE;
- if (autopick_option == E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_ONE_RESOURCE
- || autopick_option == E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE_AND_ONE_RESOURCE)
- need_one_resource = TRUE;
-
- /* Keep moving forward or backward until we find a possible meeting
- time. */
- for (;;) {
- meeting_time_ok = TRUE;
- found_resource = FALSE;
- resource_free = NULL;
-
- /* Step through each attendee, checking if the meeting time
- intersects one of the attendees busy periods. */
- for (row = 0; row < e_meeting_model_count_attendees (mts->model); row++) {
- attendee = e_meeting_model_find_attendee_at_row (mts->model, row);
-
- /* Skip optional people if they don't matter. */
- if (skip_optional && e_meeting_attendee_get_atype (attendee) == E_MEETING_ATTENDEE_OPTIONAL_PERSON)
- continue;
-
- period = e_meeting_time_selector_find_time_clash (mts, attendee, &start_time, &end_time);
-
- if (need_one_resource && e_meeting_attendee_get_atype (attendee) == E_MEETING_ATTENDEE_RESOURCE) {
- if (period) {
- /* We want to remember the closest
- prev/next time that one resource is
- available, in case we don't find any
- free resources. */
- if (forward) {
- if (!resource_free || e_meeting_time_selector_compare_times (resource_free, &period->end) > 0)
- resource_free = &period->end;
- } else {
- if (!resource_free || e_meeting_time_selector_compare_times (resource_free, &period->start) < 0)
- resource_free = &period->start;
- }
-
- } else {
- found_resource = TRUE;
- }
- } else if (period) {
- /* Skip the period which clashed. */
- if (forward) {
- start_time = period->end;
- } else {
- start_time = period->start;
- e_meeting_time_selector_adjust_time (&start_time, -duration_days, -duration_hours, -duration_minutes);
- }
- meeting_time_ok = FALSE;
- break;
- }
- }
-
- /* Check that we found one resource if necessary. If not, skip
- to the closest time that a resource is free. Note that if
- there are no resources, resource_free will never get set,
- so we assume the meeting time is OK. */
- if (meeting_time_ok && need_one_resource && !found_resource
- && resource_free) {
- if (forward) {
- start_time = *resource_free;
- } else {
- start_time = *resource_free;
- e_meeting_time_selector_adjust_time (&start_time, -duration_days, -duration_hours, -duration_minutes);
- }
- meeting_time_ok = FALSE;
- }
-
- if (meeting_time_ok) {
- mts->meeting_start_time = start_time;
- mts->meeting_end_time = end_time;
- mts->meeting_positions_valid = FALSE;
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-
- /* Make sure the time is shown. */
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
-
- /* Set the times in the GnomeDateEdit widgets. */
- e_meeting_time_selector_update_start_date_edit (mts);
- e_meeting_time_selector_update_end_date_edit (mts);
- return;
- }
-
- /* Move forward to the next possible interval. */
- if (forward)
- e_meeting_time_selector_find_nearest_interval (mts, &start_time, &end_time, duration_days, duration_hours, duration_minutes);
- else
- e_meeting_time_selector_find_nearest_interval_backward (mts, &start_time, &end_time, duration_days, duration_hours, duration_minutes);
- }
-}
-
-
-static void
-e_meeting_time_selector_calculate_time_difference (EMeetingTime*start,
- EMeetingTime*end,
- gint *days,
- gint *hours,
- gint *minutes)
-{
- *days = g_date_julian (&end->date) - g_date_julian (&start->date);
- *hours = end->hour - start->hour;
- *minutes = end->minute - start->minute;
- if (*minutes < 0) {
- *minutes += 60;
- *hours = *hours - 1;
- }
- if (*hours < 0) {
- *hours += 24;
- *days = *days - 1;
- }
-}
-
-
-/* This moves the given time forward to the next suitable start of a meeting.
- If zoomed_out is set, this means every hour. If not every half-hour. */
-static void
-e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
- EMeetingTime*start_time,
- EMeetingTime*end_time,
- gint days, gint hours, gint mins)
-{
- gint minutes_shown;
- gboolean set_to_start_of_working_day = FALSE;
-
- if (mts->zoomed_out) {
- start_time->hour++;
- start_time->minute = 0;
- } else {
- start_time->minute += 30;
- start_time->minute -= start_time->minute % 30;
- }
- e_meeting_time_selector_fix_time_overflows (start_time);
-
- *end_time = *start_time;
- e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
-
- /* Check if the interval is less than a day as seen in the display.
- If it isn't we don't worry about the working day. */
- if (!mts->working_hours_only || days > 0)
- return;
- minutes_shown = (mts->day_end_hour - mts->day_start_hour) * 60;
- minutes_shown += mts->day_end_minute - mts->day_start_minute;
- if (hours * 60 + mins > minutes_shown)
- return;
-
- /* If the meeting time finishes past the end of the working day, move
- onto the start of the next working day. If the meeting time starts
- before the working day, move it on as well. */
- if (start_time->hour > mts->day_end_hour
- || (start_time->hour == mts->day_end_hour
- && start_time->minute > mts->day_end_minute)
- || end_time->hour > mts->day_end_hour
- || (end_time->hour == mts->day_end_hour
- && end_time->minute > mts->day_end_minute)) {
- g_date_add_days (&start_time->date, 1);
- set_to_start_of_working_day = TRUE;
- } else if (start_time->hour < mts->day_start_hour
- || (start_time->hour == mts->day_start_hour
- && start_time->minute < mts->day_start_minute)) {
- set_to_start_of_working_day = TRUE;
- }
-
- if (set_to_start_of_working_day) {
- start_time->hour = mts->day_start_hour;
- start_time->minute = mts->day_start_minute;
-
- if (mts->zoomed_out) {
- if (start_time->minute > 0) {
- start_time->hour++;
- start_time->minute = 0;
- }
- } else {
- start_time->minute += 29;
- start_time->minute -= start_time->minute % 30;
- }
- e_meeting_time_selector_fix_time_overflows (start_time);
-
- *end_time = *start_time;
- e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
- }
-}
-
-
-/* This moves the given time backward to the next suitable start of a meeting.
- If zoomed_out is set, this means every hour. If not every half-hour. */
-static void
-e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mts,
- EMeetingTime*start_time,
- EMeetingTime*end_time,
- gint days, gint hours, gint mins)
-{
- gint new_hour, minutes_shown;
- gboolean set_to_end_of_working_day = FALSE;
-
- new_hour = start_time->hour;
- if (mts->zoomed_out) {
- if (start_time->minute == 0)
- new_hour--;
- start_time->minute = 0;
- } else {
- if (start_time->minute == 0) {
- start_time->minute = 30;
- new_hour--;
- } else if (start_time->minute <= 30)
- start_time->minute = 0;
- else
- start_time->minute = 30;
- }
- if (new_hour < 0) {
- new_hour += 24;
- g_date_subtract_days (&start_time->date, 1);
- }
- start_time->hour = new_hour;
-
- *end_time = *start_time;
- e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
-
- /* Check if the interval is less than a day as seen in the display.
- If it isn't we don't worry about the working day. */
- if (!mts->working_hours_only || days > 0)
- return;
- minutes_shown = (mts->day_end_hour - mts->day_start_hour) * 60;
- minutes_shown += mts->day_end_minute - mts->day_start_minute;
- if (hours * 60 + mins > minutes_shown)
- return;
-
- /* If the meeting time finishes past the end of the working day, move
- back to the end of the working day. If the meeting time starts
- before the working day, move it back to the end of the previous
- working day. */
- if (start_time->hour > mts->day_end_hour
- || (start_time->hour == mts->day_end_hour
- && start_time->minute > mts->day_end_minute)
- || end_time->hour > mts->day_end_hour
- || (end_time->hour == mts->day_end_hour
- && end_time->minute > mts->day_end_minute)) {
- set_to_end_of_working_day = TRUE;
- } else if (start_time->hour < mts->day_start_hour
- || (start_time->hour == mts->day_start_hour
- && start_time->minute < mts->day_start_minute)) {
- g_date_subtract_days (&end_time->date, 1);
- set_to_end_of_working_day = TRUE;
- }
-
- if (set_to_end_of_working_day) {
- end_time->hour = mts->day_end_hour;
- end_time->minute = mts->day_end_minute;
- *start_time = *end_time;
- e_meeting_time_selector_adjust_time (start_time, -days, -hours, -mins);
-
- if (mts->zoomed_out) {
- start_time->minute = 0;
- } else {
- start_time->minute -= start_time->minute % 30;
- }
-
- *end_time = *start_time;
- e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
- }
-}
-
-
-/* This adds on the given days, hours & minutes to a EMeetingTimeSelectorTime.
- It is used to calculate the end of a period given a start & duration.
- Days, hours & minutes can be negative, to move backwards, but they should
- be within normal ranges, e.g. hours should be between -23 and 23. */
-static void
-e_meeting_time_selector_adjust_time (EMeetingTime*mtstime,
- gint days, gint hours, gint minutes)
-{
- gint new_hours, new_minutes;
-
- /* We have to handle negative values for hous and minutes here, since
- EMeetingTimeuses guint8s to store them. */
- new_minutes = mtstime->minute + minutes;
- if (new_minutes < 0) {
- new_minutes += 60;
- hours -= 1;
- }
-
- new_hours = mtstime->hour + hours;
- if (new_hours < 0) {
- new_hours += 24;
- days -= 1;
- }
-
- g_date_add_days (&mtstime->date, days);
- mtstime->hour = new_hours;
- mtstime->minute = new_minutes;
-
- e_meeting_time_selector_fix_time_overflows (mtstime);
-}
-
-
-/* This looks for any busy period of the given attendee which clashes with
- the start and end time. It uses a binary search. */
-static EMeetingFreeBusyPeriod *
-e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
- EMeetingAttendee *attendee,
- EMeetingTime*start_time,
- EMeetingTime*end_time)
-{
- EMeetingFreeBusyPeriod *period;
- const GArray *busy_periods;
- gint period_num;
-
- busy_periods = e_meeting_attendee_get_busy_periods (attendee);
- period_num = e_meeting_attendee_find_first_busy_period (attendee, &start_time->date);
-
- if (period_num == -1)
- return NULL;
-
- /* Step forward through the busy periods until we find a clash or we
- go past the end_time. */
- while (period_num < busy_periods->len) {
- period = &g_array_index (busy_periods, EMeetingFreeBusyPeriod, period_num);
-
- /* If the period starts at or after the end time, there is no
- clash and we are finished. The busy periods are sorted by
- their start times, so all the rest will be later. */
- if (e_meeting_time_selector_compare_times (&period->start, end_time) >= 0)
- return NULL;
-
- /* If the period ends after the start time, we have found a
- clash. From the above test we already know the busy period
- isn't completely after the meeting time. */
- if (e_meeting_time_selector_compare_times (&period->end, start_time) > 0)
- return period;
-
- period_num++;
- }
-
- return NULL;
-}
-
-static void
-e_meeting_time_selector_on_zoomed_out_toggled (GtkWidget *menuitem,
- EMeetingTimeSelector *mts)
-{
- /* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
- if (GTK_WIDGET_VISIBLE (mts->options_menu))
- gtk_menu_popdown (GTK_MENU (mts->options_menu));
-
- e_meeting_time_selector_set_zoomed_out (mts, GTK_CHECK_MENU_ITEM (menuitem)->active);
-}
-
-
-static void
-e_meeting_time_selector_on_working_hours_toggled (GtkWidget *menuitem,
- EMeetingTimeSelector *mts)
-{
- /* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
- if (GTK_WIDGET_VISIBLE (mts->options_menu))
- gtk_menu_popdown (GTK_MENU (mts->options_menu));
-
- e_meeting_time_selector_set_working_hours_only (mts, GTK_CHECK_MENU_ITEM (menuitem)->active);
-}
-
-
-/* This recalculates day_width, first_hour_shown and last_hour_shown. */
-static void
-e_meeting_time_selector_recalc_grid (EMeetingTimeSelector *mts)
-{
- if (mts->working_hours_only) {
- mts->first_hour_shown = mts->day_start_hour;
- mts->last_hour_shown = mts->day_end_hour;
- if (mts->day_end_minute != 0)
- mts->last_hour_shown += 1;
- } else {
- mts->first_hour_shown = 0;
- mts->last_hour_shown = 24;
- }
-
- /* In the brief view we use the nearest hours divisible by 3. */
- if (mts->zoomed_out) {
- mts->first_hour_shown -= mts->first_hour_shown % 3;
- mts->last_hour_shown += 2;
- mts->last_hour_shown -= mts->last_hour_shown % 3;
- }
-
- mts->day_width = mts->col_width * (mts->last_hour_shown - mts->first_hour_shown);
- if (mts->zoomed_out)
- mts->day_width /= 3;
-
- /* Add one pixel for the extra vertical grid line. */
- mts->day_width++;
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS (mts->display_top),
- 0, 0,
- mts->day_width * E_MEETING_TIME_SELECTOR_DAYS_SHOWN,
- mts->row_height * 3);
- e_meeting_time_selector_update_main_canvas_scroll_region (mts);
-
- e_meeting_time_selector_recalc_date_format (mts);
- mts->meeting_positions_valid = FALSE;
-}
-
-
-/* This saves the first visible time in the given EMeetingTimeSelectorTime. */
-static void
-e_meeting_time_selector_save_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime)
-{
- gint scroll_x, scroll_y;
-
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
- &scroll_x, &scroll_y);
- e_meeting_time_selector_calculate_time (mts, scroll_x, mtstime);
-}
-
-
-/* This restores a saved position. */
-static void
-e_meeting_time_selector_restore_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime)
-{
- gint scroll_x, scroll_y, new_scroll_x;
-
- new_scroll_x = e_meeting_time_selector_calculate_time_position (mts,
- mtstime);
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
- &scroll_x, &scroll_y);
- gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_main),
- new_scroll_x, scroll_y);
-}
-
-
-/* This returns the x pixel coords of the meeting time in the entire scroll
- region. It recalculates them if they have been marked as invalid.
- If it returns FALSE then no meeting time is set or the meeting time is
- not visible in the current scroll area. */
-gboolean
-e_meeting_time_selector_get_meeting_time_positions (EMeetingTimeSelector *mts,
- gint *start_x,
- gint *end_x)
-{
- if (mts->meeting_positions_valid) {
- if (mts->meeting_positions_in_scroll_area) {
- *start_x = mts->meeting_start_x;
- *end_x = mts->meeting_end_x;
- return TRUE;
- } else {
- return FALSE;
- }
- }
-
- mts->meeting_positions_valid = TRUE;
-
- /* Check if the days aren't in our current range. */
- if (g_date_compare (&mts->meeting_start_time.date, &mts->last_date_shown) > 0
- || g_date_compare (&mts->meeting_end_time.date, &mts->first_date_shown) < 0) {
- mts->meeting_positions_in_scroll_area = FALSE;
- return FALSE;
- }
-
- mts->meeting_positions_in_scroll_area = TRUE;
- *start_x = mts->meeting_start_x = e_meeting_time_selector_calculate_time_position (mts, &mts->meeting_start_time);
- *end_x = mts->meeting_end_x = e_meeting_time_selector_calculate_time_position (mts, &mts->meeting_end_time);
-
- return TRUE;
-}
-
-
-/* This recalculates the date format to used, by computing the width of the
- longest date strings in the widget's font and seeing if they fit. */
-static void
-e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts)
-{
- /* 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 };
- GDate date;
- gint max_date_width, longest_weekday_width, longest_month_width, width;
- gint day, longest_weekday, month, longest_month;
- gchar buffer[128];
- GdkFont *font;
-
- font = GTK_WIDGET (mts)->style->font;
-
- /* Calculate the maximum date width we can fit into the display. */
- max_date_width = mts->day_width - 2;
-
- /* Find the biggest full weekday name. We start on a particular
- Monday and go through seven days. */
- g_date_clear (&date, 1);
- g_date_set_dmy (&date, 3, 1, 2000); /* Monday 3rd Jan 2000. */
- longest_weekday_width = 0;
- longest_weekday = G_DATE_MONDAY;
- for (day = G_DATE_MONDAY; day <= G_DATE_SUNDAY; day++) {
- g_date_strftime (buffer, sizeof (buffer), "%A", &date);
- width = gdk_string_width (font, buffer);
- if (width > longest_weekday_width) {
- longest_weekday = day;
- longest_weekday_width = width;
- }
- g_date_add_days (&date, 1);
- }
-
- /* Now find the biggest month name. */
- longest_month_width = 0;
- longest_month = G_DATE_JANUARY;
- for (month = G_DATE_JANUARY; month <= G_DATE_DECEMBER; month++) {
- g_date_set_month (&date, month);
- g_date_strftime (buffer, sizeof (buffer), "%B", &date);
- width = gdk_string_width (font, buffer);
- if (width > longest_month_width) {
- longest_month = month;
- longest_month_width = width;
- }
- }
-
- /* See if we can use the full date. We want to use a date with a
- month day > 20 and also the longest weekday. We use a
- pre-calculated array of days for each month and add on the
- weekday (which is 1 (Mon) to 7 (Sun). */
- g_date_set_dmy (&date, days[longest_month - 1] + longest_weekday,
- longest_month, 2000);
- /* This is a strftime() format string %A = full weekday name,
- %B = full month name, %d = month day, %Y = full year. */
- g_date_strftime (buffer, sizeof (buffer), _("%A, %B %d, %Y"), &date);
-
- g_print ("longest_month: %i longest_weekday: %i date: %s\n",
- longest_month, longest_weekday, buffer);
-
- if (gdk_string_width (font, buffer) < max_date_width) {
- mts->date_format = E_MEETING_TIME_SELECTOR_DATE_FULL;
- return;
- }
-
- /* Now try it with abbreviated weekday names. */
- longest_weekday_width = 0;
- longest_weekday = G_DATE_MONDAY;
- g_date_set_dmy (&date, 3, 1, 2000); /* Monday 3rd Jan 2000. */
- for (day = G_DATE_MONDAY; day <= G_DATE_SUNDAY; day++) {
- g_date_strftime (buffer, sizeof (buffer), "%a", &date);
- width = gdk_string_width (font, buffer);
- if (width > longest_weekday_width) {
- longest_weekday = day;
- longest_weekday_width = width;
- }
- g_date_add_days (&date, 1);
- }
-
- g_date_set_dmy (&date, days[longest_month - 1] + longest_weekday,
- longest_month, 2000);
- /* This is a strftime() format string %a = abbreviated weekday name,
- %m = month number, %d = month day, %Y = full year. */
- g_date_strftime (buffer, sizeof (buffer), _("%a %m/%d/%Y"), &date);
-
- g_print ("longest_month: %i longest_weekday: %i date: %s\n",
- longest_month, longest_weekday, buffer);
-
- if (gdk_string_width (font, buffer) < max_date_width)
- mts->date_format = E_MEETING_TIME_SELECTOR_DATE_ABBREVIATED_DAY;
- else
- mts->date_format = E_MEETING_TIME_SELECTOR_DATE_SHORT;
-}
-
-
-/* Turn off the background of the canvas windows. This reduces flicker
- considerably when scrolling. (Why isn't it in GnomeCanvas?). */
-static void
-e_meeting_time_selector_on_canvas_realized (GtkWidget *widget,
- EMeetingTimeSelector *mts)
-{
- gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window,
- NULL, FALSE);
-}
-
-
-/* This is called when the meeting start time GnomeDateEdit is changed,
- either via the "date_changed". "time_changed" or "activate" signals on one
- of the GtkEntry widgets. So don't use the widget parameter since it may be
- one of the child GtkEntry widgets. */
-static void
-e_meeting_time_selector_on_start_time_changed (GtkWidget *widget,
- EMeetingTimeSelector *mts)
-{
- gint duration_days, duration_hours, duration_minutes;
- EMeetingTime mtstime;
- time_t newtime;
- struct tm *newtime_tm;
-
- newtime = e_date_edit_get_time (E_DATE_EDIT (mts->start_date_edit));
- newtime_tm = localtime (&newtime);
- g_date_clear (&mtstime.date, 1);
- g_date_set_time (&mtstime.date, newtime);
- mtstime.hour = newtime_tm->tm_hour;
- mtstime.minute = newtime_tm->tm_min;
-
- /* If the time hasn't changed, just return. */
- if (e_meeting_time_selector_compare_times (&mtstime, &mts->meeting_start_time) == 0)
- return;
-
- /* Calculate the current meeting duration. */
- e_meeting_time_selector_calculate_time_difference (&mts->meeting_start_time, &mts->meeting_end_time, &duration_days, &duration_hours, &duration_minutes);
-
- /* Set the new start time. */
- mts->meeting_start_time = mtstime;
-
- /* Update the end time so the meeting duration stays the same. */
- mts->meeting_end_time = mts->meeting_start_time;
- e_meeting_time_selector_adjust_time (&mts->meeting_end_time, duration_days, duration_hours, duration_minutes);
- e_meeting_time_selector_update_end_date_edit (mts);
-
- mts->meeting_positions_valid = FALSE;
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-}
-
-
-/* This is called when the meeting end time GnomeDateEdit is changed,
- either via the "date_changed", "time_changed" or "activate" signals on one
- of the GtkEntry widgets. So don't use the widget parameter since it may be
- one of the child GtkEntry widgets. */
-static void
-e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
- EMeetingTimeSelector *mts)
-{
- EMeetingTime mtstime;
- time_t newtime;
- struct tm *newtime_tm;
-
- newtime = e_date_edit_get_time (E_DATE_EDIT (mts->end_date_edit));
- newtime_tm = localtime (&newtime);
- g_date_clear (&mtstime.date, 1);
- g_date_set_time (&mtstime.date, newtime);
- mtstime.hour = newtime_tm->tm_hour;
- mtstime.minute = newtime_tm->tm_min;
-
- /* If the time hasn't changed, just return. */
- if (e_meeting_time_selector_compare_times (&mtstime, &mts->meeting_end_time) == 0)
- return;
-
- /* Set the new end time. */
- mts->meeting_end_time = mtstime;
-
- /* If the start time is after the end time, set it to the same time. */
- if (e_meeting_time_selector_compare_times (&mtstime, &mts->meeting_start_time) < 0) {
- /* We set it first, before updating the widget, so the signal
- handler will just return. */
- mts->meeting_start_time = mtstime;
- e_meeting_time_selector_update_start_date_edit (mts);
- }
-
- mts->meeting_positions_valid = FALSE;
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-}
-
-
-/* This updates the ranges shown in the GnomeDateEdit popup menus, according
- to working_hours_only etc. */
-static void
-e_meeting_time_selector_update_date_popup_menus (EMeetingTimeSelector *mts)
-{
- EDateEdit *start_edit, *end_edit;
- gint low_hour, high_hour;
-
- start_edit = E_DATE_EDIT (mts->start_date_edit);
- end_edit = E_DATE_EDIT (mts->end_date_edit);
-
- if (mts->working_hours_only) {
- low_hour = mts->day_start_hour;
- high_hour = mts->day_end_hour;
- } else {
- low_hour = 0;
- high_hour = 23;
- }
-
- e_date_edit_set_time_popup_range (start_edit, low_hour, high_hour);
- e_date_edit_set_time_popup_range (end_edit, low_hour, high_hour);
-}
-
-
-static void
-e_meeting_time_selector_on_canvas_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- EMeetingTimeSelector *mts)
-{
- e_meeting_time_selector_update_main_canvas_scroll_region (mts);
-
- e_meeting_time_selector_ensure_meeting_time_shown (mts);
-}
-
-/* This updates the canvas scroll regions according to the number of attendees.
- If the total height needed is less than the height of the canvas, we must
- use the height of the canvas, or it causes problems. */
-static void
-e_meeting_time_selector_update_main_canvas_scroll_region (EMeetingTimeSelector *mts)
-{
- gint height, canvas_height;
-
- height = mts->row_height * (e_meeting_model_count_attendees (mts->model) + 1);
- canvas_height = GTK_WIDGET (mts->display_main)->allocation.height;
-
- height = MAX (height, canvas_height);
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS (mts->display_main),
- 0, 0,
- mts->day_width * E_MEETING_TIME_SELECTOR_DAYS_SHOWN,
- height);
-}
-
-
-/* This changes the meeting time based on the given x coordinate and whether
- we are dragging the start or end bar. It returns the new position, which
- will be swapped if the start bar is dragged past the end bar or vice versa.
- It make sure the meeting time is never dragged outside the visible canvas
- area. */
-void
-e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
- gint x)
-{
- EMeetingTime first_time, last_time, drag_time, *time_to_set;
- gint scroll_x, scroll_y, canvas_width;
- gboolean set_both_times = FALSE;
-
- /* Get the x coords of visible part of the canvas. */
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
- &scroll_x, &scroll_y);
- canvas_width = mts->display_main->allocation.width;
-
- /* Save the x coordinate for the timeout handler. */
- mts->last_drag_x = (x < scroll_x) ? x - scroll_x
- : x - scroll_x - canvas_width + 1;
-
- /* Check if the mouse is off the edge of the canvas. */
- if (x < scroll_x || x > scroll_x + canvas_width) {
- /* If we haven't added a timeout function, add one. */
- if (mts->auto_scroll_timeout_id == 0) {
- mts->auto_scroll_timeout_id = g_timeout_add (60, e_meeting_time_selector_timeout_handler, mts);
- mts->scroll_count = 0;
-
- /* Call the handler to start scrolling now. */
- e_meeting_time_selector_timeout_handler (mts);
- return;
- }
- } else {
- e_meeting_time_selector_remove_timeout (mts);
- }
-
- /* Calculate the minimum & maximum times we can use, based on the
- scroll offsets and whether zoomed_out is set. */
- e_meeting_time_selector_calculate_time (mts, scroll_x, &first_time);
- e_meeting_time_selector_calculate_time (mts, scroll_x + canvas_width - 1,
- &last_time);
- if (mts->zoomed_out) {
- if (first_time.minute > 30)
- first_time.hour++;
- first_time.minute = 0;
- last_time.minute = 0;
- } else {
- first_time.minute += 15;
- first_time.minute -= first_time.minute % 30;
- last_time.minute -= last_time.minute % 30;
- }
- e_meeting_time_selector_fix_time_overflows (&first_time);
- e_meeting_time_selector_fix_time_overflows (&last_time);
-
- /* Calculate the time from x coordinate. */
- e_meeting_time_selector_calculate_time (mts, x, &drag_time);
-
- /* Calculate the nearest half-hour or hour, depending on whether
- zoomed_out is set. */
- if (mts->zoomed_out) {
- if (drag_time.minute > 30)
- drag_time.hour++;
- drag_time.minute = 0;
- } else {
- drag_time.minute += 15;
- drag_time.minute -= drag_time.minute % 30;
- }
- e_meeting_time_selector_fix_time_overflows (&drag_time);
-
- /* Now make sure we are between first_time & last_time. */
- if (e_meeting_time_selector_compare_times (&drag_time, &first_time) < 0)
- drag_time = first_time;
- if (e_meeting_time_selector_compare_times (&drag_time, &last_time) > 0)
- drag_time = last_time;
-
- /* Set the meeting start or end time to drag_time. */
- if (mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- time_to_set = &mts->meeting_start_time;
- else
- time_to_set = &mts->meeting_end_time;
-
- /* If the time is unchanged, just return. */
- if (e_meeting_time_selector_compare_times (time_to_set, &drag_time) == 0)
- return;
-
- *time_to_set = drag_time;
-
- /* Check if the start time and end time need to be switched. */
- if (e_meeting_time_selector_compare_times (&mts->meeting_start_time,
- &mts->meeting_end_time) > 0) {
- drag_time = mts->meeting_start_time;
- mts->meeting_start_time = mts->meeting_end_time;
- mts->meeting_end_time = drag_time;
-
- if (mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- mts->dragging_position = E_MEETING_TIME_SELECTOR_POS_END;
- else
- mts->dragging_position = E_MEETING_TIME_SELECTOR_POS_START;
-
- set_both_times = TRUE;
- }
-
- /* Mark the calculated positions as invalid. */
- mts->meeting_positions_valid = FALSE;
-
- /* Redraw the canvases. */
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-
- /* Set the times in the GnomeDateEdit widgets. */
- if (set_both_times
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- e_meeting_time_selector_update_start_date_edit (mts);
-
- if (set_both_times
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END)
- e_meeting_time_selector_update_end_date_edit (mts);
-}
-
-
-/* This is the timeout function which handles auto-scrolling when the user is
- dragging one of the meeting time vertical bars outside the left or right
- edge of the canvas. */
-static gboolean
-e_meeting_time_selector_timeout_handler (gpointer data)
-{
- EMeetingTimeSelector *mts;
- EMeetingTime drag_time, *time_to_set;
- gint scroll_x, max_scroll_x, scroll_y, canvas_width;
- gint scroll_speed, scroll_offset;
- gboolean set_both_times = FALSE;
-
- mts = E_MEETING_TIME_SELECTOR (data);
-
- GDK_THREADS_ENTER ();
-
- /* Return if we don't need to scroll yet. */
- if (mts->scroll_count-- > 0) {
- GDK_THREADS_LEAVE ();
- return TRUE;
- }
-
- /* Get the x coords of visible part of the canvas. */
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
- &scroll_x, &scroll_y);
- canvas_width = mts->display_main->allocation.width;
-
- /* Calculate the scroll delay, between 0 and MAX_SCROLL_SPEED. */
- scroll_speed = abs (mts->last_drag_x / E_MEETING_TIME_SELECTOR_SCROLL_INCREMENT_WIDTH);
- scroll_speed = MIN (scroll_speed,
- E_MEETING_TIME_SELECTOR_MAX_SCROLL_SPEED);
-
- /* Reset the scroll count. */
- mts->scroll_count = E_MEETING_TIME_SELECTOR_MAX_SCROLL_SPEED - scroll_speed;
-
- /* Calculate how much we need to scroll. */
- if (mts->last_drag_x >= 0)
- scroll_offset = mts->col_width;
- else
- scroll_offset = -mts->col_width;
-
- scroll_x += scroll_offset;
- max_scroll_x = (mts->day_width * E_MEETING_TIME_SELECTOR_DAYS_SHOWN)
- - canvas_width;
- scroll_x = CLAMP (scroll_x, 0, max_scroll_x);
-
- /* Calculate the minimum or maximum visible time in the canvas, which
- we will now set the dragged time to. */
- if (scroll_offset > 0) {
- e_meeting_time_selector_calculate_time (mts,
- scroll_x + canvas_width - 1,
- &drag_time);
- if (mts->zoomed_out) {
- drag_time.minute = 0;
- } else {
- drag_time.minute -= drag_time.minute % 30;
- }
- } else {
- e_meeting_time_selector_calculate_time (mts, scroll_x,
- &drag_time);
- if (mts->zoomed_out) {
- if (drag_time.minute > 30)
- drag_time.hour++;
- drag_time.minute = 0;
- } else {
- drag_time.minute += 15;
- drag_time.minute -= drag_time.minute % 30;
- }
- }
- e_meeting_time_selector_fix_time_overflows (&drag_time);
-
- /* Set the meeting start or end time to drag_time. */
- if (mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- time_to_set = &mts->meeting_start_time;
- else
- time_to_set = &mts->meeting_end_time;
-
- /* If the time is unchanged, just return. */
- if (e_meeting_time_selector_compare_times (time_to_set, &drag_time) == 0) {
- GDK_THREADS_LEAVE ();
- return TRUE;
- }
-
- *time_to_set = drag_time;
-
- /* Check if the start time and end time need to be switched. */
- if (e_meeting_time_selector_compare_times (&mts->meeting_start_time, &mts->meeting_end_time) > 0) {
- drag_time = mts->meeting_start_time;
- mts->meeting_start_time = mts->meeting_end_time;
- mts->meeting_end_time = drag_time;
-
- if (mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- mts->dragging_position = E_MEETING_TIME_SELECTOR_POS_END;
- else
- mts->dragging_position = E_MEETING_TIME_SELECTOR_POS_START;
-
- set_both_times = TRUE;
- }
-
- /* Mark the calculated positions as invalid. */
- mts->meeting_positions_valid = FALSE;
-
- /* Set the times in the GnomeDateEdit widgets. */
- if (set_both_times
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_START)
- e_meeting_time_selector_update_start_date_edit (mts);
-
- if (set_both_times
- || mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END)
- e_meeting_time_selector_update_end_date_edit (mts);
-
- /* Redraw the canvases. We freeze and thaw the layouts so that they
- get redrawn completely. Otherwise the pixels get scrolled left or
- right which is not good for us (since our vertical bars have been
- moved) and causes flicker. */
- gtk_layout_freeze (GTK_LAYOUT (mts->display_main));
- gtk_layout_freeze (GTK_LAYOUT (mts->display_top));
- gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_main),
- scroll_x, scroll_y);
- gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_top),
- scroll_x, scroll_y);
- gtk_layout_thaw (GTK_LAYOUT (mts->display_main));
- gtk_layout_thaw (GTK_LAYOUT (mts->display_top));
-
- GDK_THREADS_LEAVE ();
- return TRUE;
-}
-
-
-/* This removes our auto-scroll timeout function, if we have one installed. */
-void
-e_meeting_time_selector_remove_timeout (EMeetingTimeSelector *mts)
-{
- if (mts->auto_scroll_timeout_id) {
- g_source_remove (mts->auto_scroll_timeout_id);
- mts->auto_scroll_timeout_id = 0;
- }
-}
-
-
-/* This updates the GnomeDateEdit widget displaying the meeting start time. */
-static void
-e_meeting_time_selector_update_start_date_edit (EMeetingTimeSelector *mts)
-{
- struct tm start_tm;
- time_t start_time_t;
-
- g_date_to_struct_tm (&mts->meeting_start_time.date, &start_tm);
- start_tm.tm_hour = mts->meeting_start_time.hour;
- start_tm.tm_min = mts->meeting_start_time.minute;
- start_time_t = mktime (&start_tm);
- e_date_edit_set_time (E_DATE_EDIT (mts->start_date_edit),
- start_time_t);
-}
-
-
-/* This updates the GnomeDateEdit widget displaying the meeting end time. */
-static void
-e_meeting_time_selector_update_end_date_edit (EMeetingTimeSelector *mts)
-{
- struct tm end_tm;
- time_t end_time_t;
-
- g_date_to_struct_tm (&mts->meeting_end_time.date, &end_tm);
- end_tm.tm_hour = mts->meeting_end_time.hour;
- end_tm.tm_min = mts->meeting_end_time.minute;
- end_time_t = mktime (&end_tm);
- e_date_edit_set_time (E_DATE_EDIT (mts->end_date_edit),
- end_time_t);
-}
-
-
-/* This ensures that the meeting time is shown on screen, by scrolling the
- canvas and possibly by changing the range of dates shown in the canvas. */
-static void
-e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts)
-{
- gint start_x, end_x, scroll_x, scroll_y, canvas_width;
- gint new_scroll_x;
- gboolean fits_in_canvas;
-
- /* Check if we need to change the range of dates shown. */
- if (g_date_compare (&mts->meeting_start_time.date,
- &mts->first_date_shown) < 0
- || g_date_compare (&mts->meeting_end_time.date,
- &mts->last_date_shown) > 0) {
- e_meeting_time_selector_update_dates_shown (mts);
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
- }
-
- /* If all of the meeting time is visible, just return. */
- e_meeting_time_selector_get_meeting_time_positions (mts, &start_x,
- &end_x);
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
- &scroll_x, &scroll_y);
- canvas_width = mts->display_main->allocation.width;
- if (start_x > scroll_x && end_x <= scroll_x + canvas_width)
- return;
-
- fits_in_canvas = end_x - start_x < canvas_width ? TRUE : FALSE;
-
- /* If the meeting is not entirely visible, either center it if it is
- smaller than the canvas, or show the start of it if it is big. */
- if (fits_in_canvas) {
- new_scroll_x = (start_x + end_x - canvas_width) / 2;
- } else {
- new_scroll_x = start_x;
- }
- gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_main),
- new_scroll_x, scroll_y);
-}
-
-
-/* This updates the range of dates shown in the canvas, to make sure that the
- currently selected meeting time is in the range. */
-static void
-e_meeting_time_selector_update_dates_shown (EMeetingTimeSelector *mts)
-{
- mts->first_date_shown = mts->meeting_start_time.date;
- g_date_subtract_days (&mts->first_date_shown, 60);
-
- mts->last_date_shown = mts->first_date_shown;
- g_date_add_days (&mts->last_date_shown, E_MEETING_TIME_SELECTOR_DAYS_SHOWN - 1);
-}
-
-
-/* This checks if the time's hour is over 24 or its minute is over 60 and if
- so it updates the day/hour appropriately. Note that hours and minutes are
- stored in guint8's so they can't overflow by much. */
-void
-e_meeting_time_selector_fix_time_overflows (EMeetingTime*mtstime)
-{
- gint hours_to_add, days_to_add;
-
- hours_to_add = mtstime->minute / 60;
- if (hours_to_add > 0) {
- mtstime->minute -= hours_to_add * 60;
- mtstime->hour += hours_to_add;
- }
-
- days_to_add = mtstime->hour / 24;
- if (days_to_add > 0) {
- mtstime->hour -= days_to_add * 24;
- g_date_add_days (&mtstime->date, days_to_add);
- }
-}
-
-/*
- * CONVERSION ROUTINES - functions to convert between different coordinate
- * spaces and dates.
- */
-
-/* This takes an x pixel coordinate within the entire canvas scroll region and
- returns the date in which it falls. If day_position is not NULL it also
- returns the x coordinate within the date, relative to the visible part of
- the canvas. It is used when painting the days in the item_draw function.
- Note that it must handle negative x coordinates in case we are dragging off
- the edge of the canvas. */
-void
-e_meeting_time_selector_calculate_day_and_position (EMeetingTimeSelector *mts,
- gint x,
- GDate *date,
- gint *day_position)
-{
- gint days_from_first_shown;
-
- *date = mts->first_date_shown;
-
- if (x >= 0) {
- days_from_first_shown = x / mts->day_width;
- g_date_add_days (date, days_from_first_shown);
- if (day_position)
- *day_position = - x % mts->day_width;
- } else {
- days_from_first_shown = -x / mts->day_width + 1;
- g_date_subtract_days (date, days_from_first_shown);
- if (day_position)
- *day_position = -mts->day_width - x % mts->day_width;
- }
-}
-
-
-/* This takes an x pixel coordinate within a day, and converts it to hours
- and minutes, depending on working_hours_only and zoomed_out. */
-void
-e_meeting_time_selector_convert_day_position_to_hours_and_mins (EMeetingTimeSelector *mts, gint day_position, guint8 *hours, guint8 *minutes)
-{
- if (mts->zoomed_out)
- day_position *= 3;
-
- /* Calculate the hours & minutes from the first displayed. */
- *hours = day_position / mts->col_width;
- *minutes = (day_position % mts->col_width) * 60 / mts->col_width;
-
- /* Now add on the first hour shown. */
- *hours += mts->first_hour_shown;
-}
-
-
-/* This takes an x pixel coordinate within the entire canvas scroll region and
- returns the time in which it falls. Note that it won't be extremely
- accurate since hours may only be a few pixels wide in the display.
- With zoomed_out set each pixel may represent 5 minutes or more, depending
- on how small the font is. */
-void
-e_meeting_time_selector_calculate_time (EMeetingTimeSelector *mts,
- gint x,
- EMeetingTime*time)
-{
- gint day_position;
-
- /* First get the day and the x position within the day. */
- e_meeting_time_selector_calculate_day_and_position (mts, x, &time->date,
- NULL);
-
- /* Now convert the day_position into an hour and minute. */
- if (x >= 0)
- day_position = x % mts->day_width;
- else
- day_position = mts->day_width + x % mts->day_width;
-
- e_meeting_time_selector_convert_day_position_to_hours_and_mins (mts, day_position, &time->hour, &time->minute);
-}
-
-
-/* This takes a EMeetingTime and calculates the x pixel coordinate
- within the entire canvas scroll region. It is used to draw the selected
- meeting time and all the busy periods. */
-gint
-e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts,
- EMeetingTime *mtstime)
-{
- gint x, date_offset, day_offset;
-
- /* Calculate the number of days since the first date shown in the
- entire canvas scroll region. */
- date_offset = g_date_julian (&mtstime->date) - g_date_julian (&mts->first_date_shown);
-
- /* Calculate the x pixel coordinate of the start of the day. */
- x = date_offset * mts->day_width;
-
- /* Add on the hours and minutes, depending on whether zoomed_out and
- working_hours_only are set. */
- day_offset = (mtstime->hour - mts->first_hour_shown) * 60
- + mtstime->minute;
- /* The day width includes an extra vertical grid line so subtract 1. */
- day_offset *= (mts->day_width - 1);
- day_offset /= (mts->last_hour_shown - mts->first_hour_shown) * 60;
-
- /* Clamp the day_offset in case the time isn't actually visible. */
- x += CLAMP (day_offset, 0, mts->day_width);
-
- return x;
-}
-
-static void
-row_count_changed_cb (ETableModel *etm, int row, int count, gpointer data)
-{
- EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
-
- /* Update the scroll region. */
- e_meeting_time_selector_update_main_canvas_scroll_region (mts);
-
- /* Redraw */
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-}
-
-static void
-sort_info_changed_cb (ETableSortInfo *info, gpointer data)
-{
- EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
-
- /* Redraw */
- gtk_widget_queue_draw (mts->display_top);
- gtk_widget_queue_draw (mts->display_main);
-}
diff --git a/calendar/gui/e-meeting-time-sel.etspec b/calendar/gui/e-meeting-time-sel.etspec
deleted file mode 100644
index c0b5c721dd..0000000000
--- a/calendar/gui/e-meeting-time-sel.etspec
+++ /dev/null
@@ -1,19 +0,0 @@
-<ETableSpecification click-to-add="true" click-to-add-end="true" _click-to-add-message="Click here to add an attendee" draw-grid="true">
- <ETableColumn model_col= "0" _title="Attendee" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "1" _title="Member" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "2" _title="Type" expansion="1.0" minimum_width="10" resizable="true" cell="typeedit" compare="string"/>
- <ETableColumn model_col= "3" _title="Role" expansion="1.0" minimum_width="10" resizable="true" cell="roleedit" compare="string"/>
- <ETableColumn model_col= "4" _title="RSVP" expansion="1.0" minimum_width="10" resizable="true" cell="rsvpedit" compare="string"/>
- <ETableColumn model_col= "5" _title="Delegated To" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "6" _title="Delegated From" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "7" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="statusedit" compare="string"/>
- <ETableColumn model_col= "8" _title="Common Name" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
- <ETableColumn model_col= "9" _title="Language" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="string"/>
-
- <ETableState>
- <column source="0"/>
- <column source="2"/>
- <column source="7"/>
- <grouping></grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h
deleted file mode 100644
index a0a3cd7434..0000000000
--- a/calendar/gui/e-meeting-time-sel.h
+++ /dev/null
@@ -1,375 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@gtk.org>
- *
- * 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_MEETING_TIME_SELECTOR_H_
-#define _E_MEETING_TIME_SELECTOR_H_
-
-#include <glib.h>
-#include <gtk/gtkaccelgroup.h>
-#include <gtk/gtktable.h>
-#include <gtk/gtkwidget.h>
-#include <libgnomeui/gnome-canvas.h>
-#include <gal/e-text/e-text.h>
-#include <gal/e-table/e-table-model.h>
-#include <gal/e-table/e-table.h>
-#include "e-meeting-model.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * EMeetingTimeSelector displays a list of attendees for a meeting and a
- * graphical summary of the times which they are free and busy, allowing the
- * user to select an appropriate time for a meeting.
- */
-
-/* Define this to include the debugging functions. */
-#undef E_MEETING_TIME_SELECTOR_DEBUG
-
-/* This is the width of the icon column in the attendees list. */
-#define E_MEETING_TIME_SELECTOR_ICON_COLUMN_WIDTH 24
-
-#define E_MEETING_TIME_SELECTOR_TEXT_Y_PAD 3
-#define E_MEETING_TIME_SELECTOR_TEXT_X_PAD 2
-
-
-/* This is used to specify the format used when displaying the dates.
- The full format is like 'Sunday, September 12, 1999'. The abbreviated format
- is like 'Sun 12/9/99'. The short format is like '12/9/99'. The actual
- format used is determined in e_meeting_time_selector_style_set(), once we
- know the font being used. */
-typedef enum
-{
- E_MEETING_TIME_SELECTOR_DATE_FULL,
- E_MEETING_TIME_SELECTOR_DATE_ABBREVIATED_DAY,
- E_MEETING_TIME_SELECTOR_DATE_SHORT
-} EMeetingTimeSelectorDateFormat;
-
-
-/* This is used to specify a position regarding the vertical bars around the
- current meeting time, so we know which one is being dragged. */
-typedef enum
-{
- E_MEETING_TIME_SELECTOR_POS_NONE,
- E_MEETING_TIME_SELECTOR_POS_START,
- E_MEETING_TIME_SELECTOR_POS_END
-} EMeetingTimeSelectorPosition;
-
-
-/* This is used to specify the autopick option, which determines how we choose
- the previous/next appropriate meeting time. */
-typedef enum
-{
- E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_RESOURCES,
- E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_ONE_RESOURCE,
- E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE,
- E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE_AND_ONE_RESOURCE
-} EMeetingTimeSelectorAutopickOption;
-
-/* An array of hour strings, "0:00" .. "23:00". */
-extern const gchar *EMeetingTimeSelectorHours[24];
-
-
-#define E_MEETING_TIME_SELECTOR(obj) GTK_CHECK_CAST (obj, e_meeting_time_selector_get_type (), EMeetingTimeSelector)
-#define E_MEETING_TIME_SELECTOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_meeting_time_selector_get_type (), EMeetingTimeSelectorClass)
-#define IS_E_MEETING_TIME_SELECTOR(obj) GTK_CHECK_TYPE (obj, e_meeting_time_selector_get_type ())
-
-
-typedef struct _EMeetingTimeSelector EMeetingTimeSelector;
-typedef struct _EMeetingTimeSelectorClass EMeetingTimeSelectorClass;
-
-struct _EMeetingTimeSelector
-{
- /* We subclass a GtkTable which makes it easy to add extra widgets
- if neccesary. */
- GtkTable table;
-
- /*
- * User Interface stuff - widgets, colors etc.
- */
-
- /* This contains our keyboard accelerators, which need to be added to
- the toplevel window. */
- GtkAccelGroup *accel_group;
-
- /* The vbox in the top-left corner, containing the 'All Attendees'
- title bar packed at the end. Extra widgets can be added here
- with PACK_START if necessary. */
- GtkWidget *attendees_vbox;
-
- /* The etable and model */
- EMeetingModel *model;
- GtkWidget *etable;
-
- /* The canvas displaying the dates, times, and the summary
- 'All Attendees' free/busy display. */
- GtkWidget *display_top;
-
- /* The canvas containing the free/busy displays of individual
- attendees. This is separate from display_top since it also scrolls
- vertically. */
- GtkWidget *display_main;
-
- /* This is the 'Options' button & menu. */
- GtkWidget *options_button;
- GtkWidget *options_menu;
-
- /* This is the 'Autopick' button, menu & radio menu items. */
- GtkWidget *autopick_button;
- GtkWidget *autopick_menu;
- GtkWidget *autopick_all_item;
- GtkWidget *autopick_all_people_one_resource_item;
- GtkWidget *autopick_required_people_item;
- GtkWidget *autopick_required_people_one_resource_item;
-
- /* The horizontal scrollbar which scrolls display_top & display_main.*/
- GtkWidget *hscrollbar;
-
- /* The vertical scrollbar which scrolls attendees & display_main. */
- GtkWidget *vscrollbar;
-
- /* The 2 GnomeDateEdit widgets for the meeting start & end times. */
- GtkWidget *start_date_edit;
- GtkWidget *end_date_edit;
-
- /* Colors. */
- GdkColorContext *color_context;
- GdkColor bg_color;
- GdkColor all_attendees_bg_color;
- GdkColor meeting_time_bg_color;
- GdkColor stipple_bg_color;
- GdkColor attendee_list_bg_color;
- GdkColor grid_color;
- GdkColor grid_shadow_color;
- GdkColor grid_unused_color;
- GdkColor busy_colors[E_MEETING_FREE_BUSY_LAST];
-
- /* The stipple used for attendees with no data. */
- GdkPixmap *stipple;
-
- /* GC for drawing the color key. */
- GdkGC *color_key_gc;
-
- /* Width of the hours strings (e.g. "1:00") in the current font. */
- gint hour_widths[24];
-
- /* Whether we are using the full, abbreviated or short date format. */
- EMeetingTimeSelectorDateFormat date_format;
-
- /*
- * Option Settings.
- */
-
- /* If this is TRUE we only show hours between day_start_hour and
- day_end_hour, defaults to TRUE (9am-6pm). */
- gboolean working_hours_only;
- gint day_start_hour;
- gint day_start_minute;
- gint day_end_hour;
- gint day_end_minute;
-
- /* If TRUE, view is compressed, with one cell for every 3 hours rather
- than every hour. Defaults to FALSE. */
- gboolean zoomed_out;
-
-
- /*
- * Internal Data.
- */
-
- /* These are the first & last dates shown in the current scroll area.
- We show E_MEETING_TIME_SELECTOR_DAYS_SHOWN days at a time. */
- GDate first_date_shown;
- GDate last_date_shown;
-
- /* This is the current selection of the meeting time. */
- EMeetingTime meeting_start_time;
- EMeetingTime meeting_end_time;
-
- /* These are the x pixel coordinates in the entire scroll region of
- the start and end times. Set to meeting_positions_valid to FALSE to
- invalidate. They will then be recomputed when needed. Always access
- with e_meeting_time_selector_get_meeting_time_positions(). */
- gint meeting_positions_valid;
- gint meeting_positions_in_scroll_area;
- gint meeting_start_x;
- gint meeting_end_x;
-
- /* These are the width and height of the cells, including the grid
- lines which are displayed on the right and top or bottom of cells.*/
- gint row_height;
- gint col_width;
-
- /* This is the width of a day in the display, which depends on
- col_width, working_hours_only and zoomed_out. */
- gint day_width;
-
- /* These are the first and last hour of each day we display, depending
- on working_hours_only and zoomed_out. */
- gint first_hour_shown;
- gint last_hour_shown;
-
- /* The id of the source function for auto-scroll timeouts. */
- guint auto_scroll_timeout_id;
-
- /* This specifies if we are dragging one of the vertical bars around
- the meeting time. */
- EMeetingTimeSelectorPosition dragging_position;
-
- /* The last x coordinate of the mouse, relative to either the left or
- right edge of the canvas. Used in the auto_scroll_timeout function
- to determine which way to scroll and how fast. */
- gint last_drag_x;
-
- /* This is used to determine the delay between scrolls. */
- gint scroll_count;
-};
-
-
-struct _EMeetingTimeSelectorClass
-{
- GtkTableClass parent_class;
-};
-
-
-/*
- * PUBLIC INTERFACE - note that this interface will probably change, when I
- * know where the data is coming from. This is mainly just for testing for now.
- */
-
-GtkType e_meeting_time_selector_get_type (void);
-GtkWidget* e_meeting_time_selector_new (EMeetingModel *emm);
-void e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingModel *emm);
-
-/* This returns the currently selected meeting time.
- Note that months are 1-12 and days are 1-31. The start time is guaranteed to
- be before or equal to the end time. You may want to check if they are equal
- if that if it is a problem. */
-void e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts,
- gint *start_year,
- gint *start_month,
- gint *start_day,
- gint *start_hour,
- gint *start_minute,
- gint *end_year,
- gint *end_month,
- gint *end_day,
- gint *end_hour,
- gint *end_minute);
-
-/* This sets the meeting time, returning TRUE if it is valid. */
-gboolean e_meeting_time_selector_set_meeting_time (EMeetingTimeSelector *mts,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute);
-
-void e_meeting_time_selector_set_working_hours_only (EMeetingTimeSelector *mts,
- gboolean working_hours_only);
-void e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts,
- gint day_start_hour,
- gint day_start_minute,
- gint day_end_hour,
- gint day_end_minute);
-
-void e_meeting_time_selector_set_zoomed_out (EMeetingTimeSelector *mts,
- gboolean zoomed_out);
-
-EMeetingTimeSelectorAutopickOption e_meeting_time_selector_get_autopick_option (EMeetingTimeSelector *mts);
-void e_meeting_time_selector_set_autopick_option (EMeetingTimeSelector *mts,
- EMeetingTimeSelectorAutopickOption autopick_option);
-
-void e_meeting_time_selector_attendee_set_send_meeting_to (EMeetingTimeSelector *mts,
- gint row,
- gboolean send_meeting_to);
-
-/* Clears all busy times for the given attendee. */
-void e_meeting_time_selector_attendee_clear_busy_periods (EMeetingTimeSelector *mts,
- gint row);
-/* Adds one busy time for the given attendee. */
-gboolean e_meeting_time_selector_attendee_add_busy_period (EMeetingTimeSelector *mts,
- gint row,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute,
- EMeetingFreeBusyType busy_type);
-
-
-
-/*
- * INTERNAL ROUTINES - functions to communicate with the canvas items within
- * the EMeetingTimeSelector.
- */
-
-/* This returns the x pixel coordinates of the meeting start and end times,
- in the entire canvas scroll area. If it returns FALSE, then the meeting
- time isn't in the current scroll area (which shouldn't really happen). */
-gboolean e_meeting_time_selector_get_meeting_time_positions (EMeetingTimeSelector *mts,
- gint *start_x,
- gint *end_x);
-
-void e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
- gint x);
-
-void e_meeting_time_selector_remove_timeout (EMeetingTimeSelector *mts);
-
-void e_meeting_time_selector_fix_time_overflows (EMeetingTime*mtstime);
-
-void e_meeting_time_selector_calculate_day_and_position (EMeetingTimeSelector *mts,
- gint x,
- GDate *date,
- gint *day_position);
-void e_meeting_time_selector_convert_day_position_to_hours_and_mins (EMeetingTimeSelector *mts, gint day_position, guint8 *hours, guint8 *minutes);
-void e_meeting_time_selector_calculate_time (EMeetingTimeSelector *mts,
- gint x,
- EMeetingTime*time);
-gint e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts,
- EMeetingTime *mtstime);
-
-/* Debugging function to dump information on all attendees. */
-#ifdef E_MEETING_TIME_SELECTOR_DEBUG
-void e_meeting_time_selector_dump (EMeetingTimeSelector *mts);
-gchar* e_meeting_time_selector_dump_time (EMeetingTime*mtstime);
-gchar* e_meeting_time_selector_dump_date (GDate *date);
-#endif /* E_MEETING_TIME_SELECTOR_DEBUG */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_MEETING_TIME_SELECTOR_H_ */
diff --git a/calendar/gui/e-meeting-types.h b/calendar/gui/e-meeting-types.h
deleted file mode 100644
index 667252cc95..0000000000
--- a/calendar/gui/e-meeting-types.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* itip-attendee.h
- *
- * 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.
- *
- * Author: JP Rosevear
- */
-
-#ifndef _E_MEETING_TYPES_H_
-#define _E_MEETING_TYPES_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include "e-meeting-types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-
-typedef struct _EMeetingTime EMeetingTime;
-typedef struct _EMeetingFreeBusyPeriod EMeetingFreeBusyPeriod;
-
-/* These are used to specify whether an attendee is free or busy at a
- particular time. We'll probably replace this with a global calendar type.
- These should be ordered in increasing order of preference. Higher precedence
- busy periods will be painted over lower precedence ones. These are also
- used as for loop counters, so they should start at 0 and be ordered. */
-typedef enum
-{
- E_MEETING_FREE_BUSY_TENTATIVE = 0,
- E_MEETING_FREE_BUSY_OUT_OF_OFFICE = 1,
- E_MEETING_FREE_BUSY_BUSY = 2,
-
- E_MEETING_FREE_BUSY_LAST = 3
-} EMeetingFreeBusyType;
-
-/* This is our representation of a time. We use a GDate to store the day,
- and guint8s for the hours and minutes. */
-struct _EMeetingTime
-{
- GDate date;
- guint8 hour;
- guint8 minute;
-};
-
-/* This represents a busy period. */
-struct _EMeetingFreeBusyPeriod
-{
- EMeetingTime start;
- EMeetingTime end;
- EMeetingFreeBusyType busy_type;
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_MEETING_TYPES_H_ */
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
deleted file mode 100644
index d79ae1cb90..0000000000
--- a/calendar/gui/e-tasks.c
+++ /dev/null
@@ -1,631 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-tasks.c
- *
- * Copyright (C) 2001 Ximian, 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 <gnome.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 "cal-search-bar.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;
-
- /* Calendar search bar for tasks */
- GtkWidget *search_bar;
-
- /* View collection and the view menus handler */
- GalViewCollection *view_collection;
- GalViewMenus *view_menus;
-};
-
-
-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 char* e_tasks_get_config_filename (ETasks *tasks);
-
-/* Signal IDs */
-enum {
- SELECTION_CHANGED,
- LAST_SIGNAL
-};
-
-static GtkTableClass *parent_class;
-static guint e_tasks_signals[LAST_SIGNAL] = { 0 };
-
-
-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);
-
- e_tasks_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ETasksClass, selection_changed),
- gtk_marshal_NONE__INT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_INT);
-
- gtk_object_class_add_signals (object_class, e_tasks_signals, LAST_SIGNAL);
-
- object_class->destroy = e_tasks_destroy;
-
- class->selection_changed = NULL;
-}
-
-
-/* Object initialization function for the gnome calendar */
-static void
-e_tasks_init (ETasks *tasks)
-{
- ETasksPrivate *priv;
-
- priv = g_new0 (ETasksPrivate, 1);
- tasks->priv = priv;
-
- priv->view_collection = NULL;
- priv->view_menus = NULL;
-
- setup_widgets (tasks);
-}
-
-/* Callback used when the selection changes in the table. */
-static void
-table_selection_change_cb (ETable *etable, gpointer data)
-{
- ETasks *tasks;
- int n_selected;
-
- tasks = E_TASKS (data);
-
- n_selected = e_table_selected_count (etable);
- gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SELECTION_CHANGED],
- n_selected);
-}
-
-/* Callback used when the sexp in the search bar changes */
-static void
-search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
- CalendarModel *model;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- calendar_model_set_query (model, sexp);
-}
-
-/* Callback used when the selected category in the search bar changes */
-static void
-search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category, gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
- CalendarModel *model;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- calendar_model_set_default_category (model, category);
-}
-
-#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;
- CalendarModel *model;
-
- priv = tasks->priv;
-
- priv->search_bar = cal_search_bar_new ();
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "sexp_changed",
- GTK_SIGNAL_FUNC (search_bar_sexp_changed_cb), tasks);
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "category_changed",
- GTK_SIGNAL_FUNC (search_bar_category_changed_cb), tasks);
-
- gtk_table_attach (GTK_TABLE (tasks), priv->search_bar, 0, 1, 0, 1,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0);
- gtk_widget_show (priv->search_bar);
-
- 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 (etable), "selection_change",
- GTK_SIGNAL_FUNC (table_selection_change_cb), tasks);
-}
-
-/* Callback used when the set of categories changes in the calendar client */
-static void
-client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- cal_search_bar_set_categories (CAL_SEARCH_BAR (priv->search_bar), categories);
-}
-
-GtkWidget *
-e_tasks_construct (ETasks *tasks)
-{
- ETasksPrivate *priv;
- CalendarModel *model;
-
- 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), "categories_changed",
- GTK_SIGNAL_FUNC (client_categories_changed_cb), tasks);
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- g_assert (model != NULL);
-
- calendar_model_set_cal_client (model, priv->client, CALOBJ_TYPE_TODO);
-
- 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) {
- 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 ();
- }
-}
-
-
-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;
- const char *category;
-
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- tedit = task_editor_new ();
- comp_editor_set_cal_client (COMP_EDITOR (tedit), priv->client);
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
-
- category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
- cal_component_set_categories (comp, category);
-
- comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- gtk_object_unref (GTK_OBJECT (comp));
-
- comp_editor_focus (COMP_EDITOR (tedit));
-}
-
-/**
- * e_tasks_delete_selected:
- * @tasks: A tasks control widget.
- *
- * Deletes the selected tasks in the task list.
- **/
-void
-e_tasks_delete_selected (ETasks *tasks)
-{
- ETasksPrivate *priv;
- ECalendarTable *cal_table;
-
- g_return_if_fail (tasks != NULL);
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- cal_table = E_CALENDAR_TABLE (priv->tasks_view);
- e_calendar_table_delete_selected (cal_table);
-}
-
-/* Callback used from the view collection when we need to display a new view */
-static void
-display_view_cb (GalViewCollection *collection, GalView *view, gpointer data)
-{
- ETasks *tasks;
-
- tasks = E_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);
- }
-}
-
-/**
- * e_tasks_setup_view_menus:
- * @tasks: A tasks widget.
- * @uic: UI controller to use for the menus.
- *
- * Sets up the #GalView menus for a tasks control. This function should be
- * called from the Bonobo control activation callback for this tasks control.
- * Also, the menus should be discarded using e_tasks_discard_view_menus().
- **/
-void
-e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
-{
- ETasksPrivate *priv;
- GalViewFactory *factory;
- ETableSpecification *spec;
- char *dir;
-
- g_return_if_fail (tasks != NULL);
- g_return_if_fail (E_IS_TASKS (tasks));
- g_return_if_fail (uic != NULL);
- g_return_if_fail (BONOBO_IS_UI_COMPONENT (uic));
-
- priv = tasks->priv;
-
- g_return_if_fail (priv->view_collection == NULL);
-
- g_assert (priv->view_collection == NULL);
- g_assert (priv->view_menus == NULL);
-
- /* Create the view collection */
-
- priv->view_collection = gal_view_collection_new ();
-
- dir = gnome_util_prepend_user_home ("/evolution/views/tasks/");
- gal_view_collection_set_storage_directories (priv->view_collection,
- EVOLUTION_DATADIR "/evolution/views/tasks/",
- dir);
- g_free (dir);
-
- /* Create the views */
-
- spec = e_table_specification_new ();
- e_table_specification_load_from_file (spec,
- EVOLUTION_ETSPECDIR "/e-calendar-table.etspec");
-
- factory = gal_view_factory_etable_new (spec);
- gtk_object_unref (GTK_OBJECT (spec));
- gal_view_collection_add_factory (priv->view_collection, factory);
- gtk_object_unref (GTK_OBJECT (factory));
-
- /* Load the collection and create the menus */
-
- gal_view_collection_load (priv->view_collection);
-
- priv->view_menus = gal_view_menus_new (priv->view_collection);
- gal_view_menus_apply (priv->view_menus, uic, NULL);
- gtk_signal_connect (GTK_OBJECT (priv->view_collection), "display_view",
- GTK_SIGNAL_FUNC (display_view_cb), tasks);
-}
-
-/**
- * e_tasks_discard_view_menus:
- * @tasks: A tasks widget.
- *
- * Discards the #GalView menus used by a tasks control. This function should be
- * called from the Bonobo control deactivation callback for this tasks control.
- * The menus should have been set up with e_tasks_setup_view_menus().
- **/
-void
-e_tasks_discard_view_menus (ETasks *tasks)
-{
- ETasksPrivate *priv;
-
- g_return_if_fail (tasks != NULL);
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- g_return_if_fail (priv->view_collection != NULL);
-
- g_assert (priv->view_collection != NULL);
- g_assert (priv->view_menus != NULL);
-
- gtk_object_unref (GTK_OBJECT (priv->view_collection));
- priv->view_collection = NULL;
-
- gtk_object_unref (GTK_OBJECT (priv->view_menus));
- priv->view_menus = NULL;
-}
-
-/**
- * e_tasks_get_calendar_table:
- * @tasks: A tasks widget.
- *
- * Queries the #ECalendarTable contained in a tasks widget.
- *
- * Return value: The #ECalendarTable that the tasks widget uses to display its
- * information.
- **/
-ECalendarTable *
-e_tasks_get_calendar_table (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;
- return E_CALENDAR_TABLE (priv->tasks_view);
-}
-
-/* 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 274425d780..0000000000
--- a/calendar/gui/e-tasks.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-tasks.h
- *
- * Copyright (C) 2001 Ximian, 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>
-#include "e-calendar-table.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;
-
- /* Notification signals */
- void (* selection_changed) (ETasks *tasks, int n_selected);
-};
-
-
-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_delete_selected (ETasks *tasks);
-
-
-void e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic);
-void e_tasks_discard_view_menus (ETasks *tasks);
-
-ECalendarTable *e_tasks_get_calendar_table (ETasks *tasks);
-
-/* 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-timezone-entry.c b/calendar/gui/e-timezone-entry.c
deleted file mode 100644
index dc3e982b2e..0000000000
--- a/calendar/gui/e-timezone-entry.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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
- */
-
-/*
- * ETimezoneEntry - a field for setting a timezone. It shows the timezone in
- * a GtkEntry with a '...' button beside it which shows a dialog for changing
- * the timezone. The dialog contains a map of the world with a point for each
- * timezone, and an option menu as an alternative way of selecting the
- * timezone.
- */
-
-#include <config.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtksignal.h>
-#include <gnome.h>
-#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
-#include "e-timezone-entry.h"
-
-/* The timezone icon for the button. */
-#include "art/timezone-16.xpm"
-
-struct _ETimezoneEntryPrivate {
- /* This is the timezone set in e_timezone_entry_set_timezone().
- Note that we don't copy it or use a ref count - we assume it is
- never destroyed for the lifetime of this widget. */
- icaltimezone *zone;
-
- /* This is TRUE if the timezone has been changed since being set.
- If it hasn't, we can just return zone, If it has, we return the
- builtin timezone with tzid. (It can only be changed to a builtin
- timezone, or to 'local time', i.e. no timezone.) */
- gboolean changed;
-
- GtkWidget *entry;
- GtkWidget *button;
-
- /* This can be set to the default timezone. If the current timezone
- setting in the ETimezoneEntry matches this, then the entry field
- is hidden. This makes the user interface simpler. */
- icaltimezone *default_zone;
-};
-
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-
-static void e_timezone_entry_class_init (ETimezoneEntryClass *class);
-static void e_timezone_entry_init (ETimezoneEntry *tentry);
-static void e_timezone_entry_destroy (GtkObject *object);
-
-static void on_entry_changed (GtkEntry *entry,
- ETimezoneEntry *tentry);
-static void on_button_clicked (GtkWidget *widget,
- ETimezoneEntry *tentry);
-
-static char* e_timezone_entry_get_display_name (icaltimezone *zone);
-
-static void e_timezone_entry_set_entry_visibility (ETimezoneEntry *tentry);
-
-
-static GtkHBoxClass *parent_class;
-static guint timezone_entry_signals[LAST_SIGNAL] = { 0 };
-
-
-/**
- * e_timezone_entry_get_type:
- *
- * Returns the GtkType for the ETimezoneEntry widget
- */
-guint
-e_timezone_entry_get_type (void)
-{
- static guint timezone_entry_type = 0;
-
- if (!timezone_entry_type){
- GtkTypeInfo timezone_entry_info = {
- "ETimezoneEntry",
- sizeof (ETimezoneEntry),
- sizeof (ETimezoneEntryClass),
- (GtkClassInitFunc) e_timezone_entry_class_init,
- (GtkObjectInitFunc) e_timezone_entry_init,
- NULL,
- NULL,
- };
-
- timezone_entry_type = gtk_type_unique (gtk_hbox_get_type (), &timezone_entry_info);
- }
-
- return timezone_entry_type;
-}
-
-
-static void
-e_timezone_entry_class_init (ETimezoneEntryClass *class)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) class;
-
- object_class = (GtkObjectClass*) class;
-
- parent_class = gtk_type_class (gtk_hbox_get_type ());
-
- timezone_entry_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ETimezoneEntryClass,
- changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, timezone_entry_signals,
- LAST_SIGNAL);
-
- object_class->destroy = e_timezone_entry_destroy;
-
- class->changed = NULL;
-}
-
-
-static void
-e_timezone_entry_init (ETimezoneEntry *tentry)
-{
- ETimezoneEntryPrivate *priv;
- GdkColormap *colormap;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_mask;
- GtkWidget *pixmap;
-
- tentry->priv = priv = g_new0 (ETimezoneEntryPrivate, 1);
-
- priv->zone = NULL;
- priv->changed = FALSE;
- priv->default_zone = NULL;
-
- priv->entry = gtk_entry_new ();
- gtk_entry_set_editable (GTK_ENTRY (priv->entry), FALSE);
- /*gtk_widget_set_usize (priv->date_entry, 90, 0);*/
- gtk_box_pack_start (GTK_BOX (tentry), priv->entry, TRUE, TRUE, 0);
- gtk_widget_show (priv->entry);
- gtk_signal_connect (GTK_OBJECT (priv->entry), "changed",
- GTK_SIGNAL_FUNC (on_entry_changed), tentry);
-
- priv->button = gtk_button_new ();
- gtk_signal_connect (GTK_OBJECT (priv->button), "clicked",
- GTK_SIGNAL_FUNC (on_button_clicked), tentry);
- gtk_box_pack_start (GTK_BOX (tentry), priv->button, FALSE, FALSE, 0);
- gtk_widget_show (priv->button);
-
- colormap = gtk_widget_get_colormap (priv->button);
- timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &timezone_mask, NULL, timezone_16_xpm);
-
- pixmap = gtk_pixmap_new (timezone_icon, timezone_mask);
- gtk_container_add (GTK_CONTAINER (priv->button), pixmap);
- gtk_widget_show (pixmap);
-}
-
-
-/**
- * e_timezone_entry_new:
- *
- * Description: Creates a new #ETimezoneEntry widget which can be used
- * to provide an easy to use way for entering dates and times.
- *
- * Returns: a new #ETimezoneEntry widget.
- */
-GtkWidget *
-e_timezone_entry_new (void)
-{
- ETimezoneEntry *tentry;
-
- tentry = gtk_type_new (e_timezone_entry_get_type ());
-
- return GTK_WIDGET (tentry);
-}
-
-
-static void
-e_timezone_entry_destroy (GtkObject *object)
-{
- ETimezoneEntry *tentry;
- ETimezoneEntryPrivate *priv;
-
- g_return_if_fail (E_IS_TIMEZONE_ENTRY (object));
-
- tentry = E_TIMEZONE_ENTRY (object);
- priv = tentry->priv;
-
- g_free (tentry->priv);
- tentry->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* The arrow button beside the date field has been clicked, so we show the
- popup with the ECalendar in. */
-static void
-on_button_clicked (GtkWidget *widget,
- ETimezoneEntry *tentry)
-{
- ETimezoneEntryPrivate *priv;
- ETimezoneDialog *timezone_dialog;
- GtkWidget *dialog;
- char *tzid = NULL, *display_name, *old_display_name;
-
- priv = tentry->priv;
-
- display_name = gtk_entry_get_text (GTK_ENTRY (priv->entry));
-
- if (priv->zone)
- tzid = icaltimezone_get_tzid (priv->zone);
-
- timezone_dialog = e_timezone_dialog_new ();
- e_timezone_dialog_set_timezone (timezone_dialog, tzid, display_name);
-
- dialog = e_timezone_dialog_get_toplevel (timezone_dialog);
-
- if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == 0) {
- tzid = e_timezone_dialog_get_timezone (E_TIMEZONE_DIALOG (timezone_dialog), &display_name);
- old_display_name = gtk_entry_get_text (GTK_ENTRY (priv->entry));
- /* See if the timezone has been changed. It can only have been
- changed to a builtin timezone, in which case the returned
- TZID will be NULL. */
- if (strcmp (old_display_name, display_name)
- || (!tzid && priv->zone)) {
- priv->changed = TRUE;
- priv->zone = NULL;
- }
-
- gtk_entry_set_text (GTK_ENTRY (priv->entry), display_name);
- e_timezone_entry_set_entry_visibility (tentry);
- }
-
- gtk_object_unref (GTK_OBJECT (timezone_dialog));
-}
-
-
-static void
-on_entry_changed (GtkEntry *entry,
- ETimezoneEntry *tentry)
-{
- gtk_signal_emit (GTK_OBJECT (tentry), timezone_entry_signals[CHANGED]);
-}
-
-
-icaltimezone*
-e_timezone_entry_get_timezone (ETimezoneEntry *tentry)
-{
- ETimezoneEntryPrivate *priv;
- char *display_name;
-
- g_return_val_if_fail (E_IS_TIMEZONE_ENTRY (tentry), NULL);
-
- priv = tentry->priv;
-
- /* If the timezone hasn't been change, we can just return the same
- zone we were passed in. */
- if (!priv->changed)
- return priv->zone;
-
- /* If the timezone has changed, it can only have been changed to a
- builtin timezone or 'local time' (i.e. no timezone). */
- display_name = gtk_entry_get_text (GTK_ENTRY (priv->entry));
-
- if (display_name && display_name[0])
- return icaltimezone_get_builtin_timezone (display_name);
- return NULL;
-}
-
-
-void
-e_timezone_entry_set_timezone (ETimezoneEntry *tentry,
- icaltimezone *zone)
-{
- ETimezoneEntryPrivate *priv;
-
- g_return_if_fail (E_IS_TIMEZONE_ENTRY (tentry));
-
- priv = tentry->priv;
-
- priv->zone = zone;
- priv->changed = FALSE;
-
- gtk_entry_set_text (GTK_ENTRY (priv->entry),
- zone ? e_timezone_entry_get_display_name (zone) : "");
-
- e_timezone_entry_set_entry_visibility (tentry);
-}
-
-
-/* Returns the timezone name to display to the user. . We prefer to use the
- Olson city name, but fall back on the TZNAME, or finally the TZID. We don't
- want to use "" as it may be wrongly interpreted as a 'local time'. */
-static char*
-e_timezone_entry_get_display_name (icaltimezone *zone)
-{
- char *display_name;
-
- display_name = icaltimezone_get_location (zone);
- if (!display_name)
- display_name = icaltimezone_get_tznames (zone);
- if (!display_name)
- display_name = icaltimezone_get_tzid (zone);
-
- return display_name;
-}
-
-
-/* Sets the default timezone. If the current timezone matches this, then the
- entry field is hidden. This is useful since most people do not use timezones
- so it makes the user interface simpler. */
-void
-e_timezone_entry_set_default_timezone (ETimezoneEntry *tentry,
- icaltimezone *zone)
-{
- ETimezoneEntryPrivate *priv;
-
- g_return_if_fail (E_IS_TIMEZONE_ENTRY (tentry));
-
- priv = tentry->priv;
-
- priv->default_zone = zone;
-
- e_timezone_entry_set_entry_visibility (tentry);
-}
-
-
-static void
-e_timezone_entry_set_entry_visibility (ETimezoneEntry *tentry)
-{
- ETimezoneEntryPrivate *priv;
- icaltimezone *zone;
- gboolean show_entry = TRUE;
-
- priv = tentry->priv;
-
- if (priv->default_zone) {
- zone = e_timezone_entry_get_timezone (tentry);
- if (zone == priv->default_zone)
- show_entry = FALSE;
- }
-
- if (show_entry)
- gtk_widget_show (priv->entry);
- else
- gtk_widget_hide (priv->entry);
-}
-
diff --git a/calendar/gui/e-timezone-entry.h b/calendar/gui/e-timezone-entry.h
deleted file mode 100644
index 61bae2b7b4..0000000000
--- a/calendar/gui/e-timezone-entry.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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
- */
-
-/*
- * ETimezoneEntry - a field for setting a timezone. It shows the timezone in
- * a GtkEntry with a '...' button beside it which shows a dialog for changing
- * the timezone. The dialog contains a map of the world with a point for each
- * timezone, and an option menu as an alternative way of selecting the
- * timezone.
- */
-
-#ifndef __E_TIMEZONE_ENTRY_H_
-#define __E_TIMEZONE_ENTRY_H_
-
-#include <gtk/gtkhbox.h>
-#include <libgnome/gnome-defs.h>
-#include <cal-client/cal-client.h>
-
-BEGIN_GNOME_DECLS
-
-
-#define E_TYPE_TIMEZONE_ENTRY (e_timezone_entry_get_type ())
-#define E_TIMEZONE_ENTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntry))
-#define E_TIMEZONE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryClass))
-#define E_IS_TIMEZONE_ENTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TIMEZONE_ENTRY))
-#define E_IS_TIMEZONE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_TIMEZONE_ENTRY))
-
-
-typedef struct _ETimezoneEntry ETimezoneEntry;
-typedef struct _ETimezoneEntryPrivate ETimezoneEntryPrivate;
-typedef struct _ETimezoneEntryClass ETimezoneEntryClass;
-
-struct _ETimezoneEntry {
- GtkHBox hbox;
-
- /*< private >*/
- ETimezoneEntryPrivate *priv;
-};
-
-struct _ETimezoneEntryClass {
- GtkHBoxClass parent_class;
-
- void (* changed) (ETimezoneEntry *tentry);
-};
-
-guint e_timezone_entry_get_type (void);
-GtkWidget* e_timezone_entry_new (void);
-
-icaltimezone* e_timezone_entry_get_timezone (ETimezoneEntry *tentry);
-void e_timezone_entry_set_timezone (ETimezoneEntry *tentry,
- icaltimezone *zone);
-
-/* Sets the default timezone. If the current timezone matches this, then the
- entry field is hidden. This is useful since most people do not use timezones
- so it makes the user interface simpler. */
-void e_timezone_entry_set_default_timezone(ETimezoneEntry *tentry,
- icaltimezone *zone);
-
-END_GNOME_DECLS
-
-#endif /* __E_TIMEZONE_ENTRY_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 09bacec50a..0000000000
--- a/calendar/gui/e-week-view-event-item.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Ximian, 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-util/e-categories-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 gboolean e_week_view_event_item_double_click (EWeekViewEventItem *wveitem,
- GdkEvent *bevent);
-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 - E_WEEK_VIEW_ICON_R_PAD - 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;
- gboolean draw_timezone_icon = FALSE;
- GSList *categories_list, *elem;
-
- 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++;
- }
-
- if (event->different_timezone) {
- draw_timezone_icon = TRUE;
- num_icons++;
- }
-
- cal_component_get_categories_list (comp, &categories_list);
- num_icons += g_slist_length (categories_list);
-
- 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;
- }
-
- if (draw_timezone_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->timezone_mask);
- gdk_draw_pixmap (drawable, gc,
- week_view->timezone_icon,
- 0, 0, icon_x, icon_y,
- E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
- icon_x += icon_x_inc;
- }
-
- /* draw categories icons */
- for (elem = categories_list; elem; elem = elem->next) {
- char *category;
- GdkPixmap *pixmap = NULL;
- GdkBitmap *mask = NULL;
-
- category = (char *) elem->data;
- e_categories_config_get_icon_for (category, &pixmap, &mask);
- if (pixmap == NULL)
- continue;
-
- if (icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
- gdk_gc_set_clip_origin (gc, icon_x, icon_y);
- if (mask != NULL)
- gdk_gc_set_clip_mask (gc, mask);
- gdk_draw_pixmap (drawable, gc,
- pixmap,
- 0, 0, icon_x, icon_y,
- E_WEEK_VIEW_ICON_WIDTH,
- E_WEEK_VIEW_ICON_HEIGHT);
- icon_x += icon_x_inc;
- }
- gdk_pixmap_unref (pixmap);
- if (mask != NULL)
- gdk_bitmap_unref (mask);
- }
-
- cal_component_free_categories_list (categories_list);
-
- 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_2BUTTON_PRESS:
- return e_week_view_event_item_double_click (wveitem, event);
- 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;
-
- if (bevent->button.button == 1) {
- week_view->pressed_event_num = wveitem->event_num;
- week_view->pressed_span_num = wveitem->span_num;
-
- /* Ignore clicks on the event while editing. */
- if (E_TEXT (span->text_item)->editing)
- return FALSE;
-
- /* 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.
- */
-
- return TRUE;
- } 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;
- }
-
- return FALSE;
-}
-
-
-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 1
- 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 gboolean
-e_week_view_event_item_double_click (EWeekViewEventItem *wveitem,
- GdkEvent *bevent)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- 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);
-
- e_week_view_stop_editing_event (week_view);
-
- if (week_view->calendar)
- gnome_calendar_edit_object (week_view->calendar, event->comp);
- else
- g_warning ("Calendar not set");
-
- return TRUE;
-}
-
-
-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 33076cd88c..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, Ximian, 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-layout.c b/calendar/gui/e-week-view-layout.c
deleted file mode 100644
index 5e8331c76c..0000000000
--- a/calendar/gui/e-week-view-layout.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * 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
- */
-
-/*
- * Lays out events for the Week & Month views of the calendar. It is also
- * used for printing.
- */
-
-#include <config.h>
-
-#include "e-week-view-layout.h"
-
-
-static void e_week_view_layout_event (EWeekViewEvent *event,
- guint8 *grid,
- GArray *spans,
- GArray *old_spans,
- gboolean multi_week_view,
- gint weeks_shown,
- gboolean compress_weekend,
- gint start_weekday,
- time_t *day_starts,
- gint *rows_per_day);
-static gint e_week_view_find_day (time_t time_to_find,
- gboolean include_midnight_in_prev_day,
- gint days_shown,
- time_t *day_starts);
-static gint e_week_view_find_span_end (gboolean multi_week_view,
- gboolean compress_weekend,
- gint display_start_day,
- gint day);
-
-
-GArray*
-e_week_view_layout_events (GArray *events,
- GArray *old_spans,
- gboolean multi_week_view,
- gint weeks_shown,
- gboolean compress_weekend,
- gint start_weekday,
- time_t *day_starts,
- gint *rows_per_day)
-{
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
- gint num_days, day, event_num, span_num;
- guint8 *grid;
- GArray *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 = multi_week_view ? weeks_shown * 7 : 7;
- for (day = 0; day <= num_days; day++) {
- 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 < events->len; event_num++) {
- event = &g_array_index (events, EWeekViewEvent, event_num);
- e_week_view_layout_event (event, grid, spans, old_spans,
- multi_week_view,
- weeks_shown, compress_weekend,
- start_weekday, day_starts,
- rows_per_day);
- }
-
- /* Free the grid. */
- g_free (grid);
-
- /* 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);
- }
-
- return spans;
-}
-
-
-static void
-e_week_view_layout_event (EWeekViewEvent *event,
- guint8 *grid,
- GArray *spans,
- GArray *old_spans,
- gboolean multi_week_view,
- gint weeks_shown,
- gboolean compress_weekend,
- gint start_weekday,
- time_t *day_starts,
- gint *rows_per_day)
-{
- 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, days_shown;
- EWeekViewEventSpan span, *old_span;
-
- days_shown = multi_week_view ? weeks_shown * 7 : 7;
- start_day = e_week_view_find_day (event->start, FALSE, days_shown,
- day_starts);
- end_day = e_week_view_find_day (event->end, TRUE, days_shown,
- day_starts);
- start_day = CLAMP (start_day, 0, days_shown - 1);
- end_day = CLAMP (end_day, 0, days_shown - 1);
-
-#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 (multi_week_view,
- compress_weekend,
- start_weekday,
- 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;
- rows_per_day[day] = MAX (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 (old_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;
-}
-
-
-/* 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 (time_t time_to_find,
- gboolean include_midnight_in_prev_day,
- gint days_shown,
- time_t *day_starts)
-{
- gint day;
-
- if (time_to_find < day_starts[0])
- return -1;
- if (time_to_find > day_starts[days_shown])
- return days_shown;
-
- for (day = 1; day <= days_shown; 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 days_shown;
-}
-
-
-/* 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 (gboolean multi_week_view,
- gboolean compress_weekend,
- gint display_start_day,
- gint day)
-{
- gint week, col, sat_col, end_col;
-
- if (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 (compress_weekend) {
- sat_col = (5 + 7 - 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;
- }
-}
-
-
-void
-e_week_view_layout_get_day_position (gint day,
- gboolean multi_week_view,
- gint weeks_shown,
- gint display_start_day,
- gboolean compress_weekend,
- gint *day_x,
- gint *day_y,
- gint *rows)
-{
- gint week, day_of_week, row, col, weekend_col, box, weekend_box;
-
- *day_x = *day_y = *rows = 0;
- g_return_if_fail (day >= 0);
-
- if (multi_week_view) {
- g_return_if_fail (day < weeks_shown * 7);
-
- week = day / 7;
- col = day % 7;
- day_of_week = (display_start_day + day) % 7;
- if (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 * 2;
- *rows = 1;
- } else {
- *day_y = week * 2 + 1;
- *rows = 1;
- col--;
- }
- /* Both Saturday and Sunday are in the same column. */
- *day_x = col;
- } else {
- /* If the weekend is compressed and the day is after
- the weekend we have to move back a column. */
- if (compress_weekend) {
- /* Calculate where the weekend column is.
- Note that 5 is Saturday. */
- weekend_col = (5 + 7 - display_start_day) % 7;
- if (col > weekend_col)
- col--;
- }
-
- *day_y = week * 2;
- *rows = 2;
- *day_x = 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 = (display_start_day + day) % 7;
- weekend_box = (5 + 7 - display_start_day) % 7;
- if (box > weekend_box)
- box--;
-
- if (box < 3)
- *day_x = 0;
- else
- *day_x = 1;
-
- row = (box % 3) * 2;
- if (day_of_week < 5) {
- *day_y = row;
- *rows = 2;
- } else if (day_of_week == 5) {
- /* Saturday. */
- *day_y = row;
- *rows = 1;
-
- } else {
- /* Sunday. */
- *day_y = row + 1;
- *rows = 1;
- }
- }
-}
-
-
-/* Returns TRUE if the event span is visible or FALSE if it isn't.
- It also returns the number of days of the span that are visible.
- Usually this can easily be determined by the start & end days and row of
- the span, which are set in e_week_view_layout_event(). Though we need a
- special case for the weekends when they are compressed, since the span may
- not fit. */
-gboolean
-e_week_view_layout_get_span_position (EWeekViewEvent *event,
- EWeekViewEventSpan *span,
- gint rows_per_cell,
- gint rows_per_compressed_cell,
- gint display_start_day,
- gboolean multi_week_view,
- gboolean compress_weekend,
- gint *span_num_days)
-{
- gint end_day_of_week;
-
- if (span->row >= rows_per_cell)
- return FALSE;
-
- end_day_of_week = (display_start_day + span->start_day
- + span->num_days - 1) % 7;
- *span_num_days = span->num_days;
- /* Check if the row will not be visible in compressed cells. */
- if (span->row >= rows_per_compressed_cell) {
- if (multi_week_view) {
- if (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 (*span_num_days == 1) {
- return FALSE;
- } else {
- (*span_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;
- }
- }
-
- return TRUE;
-}
diff --git a/calendar/gui/e-week-view-layout.h b/calendar/gui/e-week-view-layout.h
deleted file mode 100644
index e4d679e793..0000000000
--- a/calendar/gui/e-week-view-layout.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 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_LAYOUT_H_
-#define _E_WEEK_VIEW_LAYOUT_H_
-
-#include "e-week-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* I've split these functions away from EWeekView so we can use them for
- printing. */
-
-GArray* e_week_view_layout_events (GArray *events,
- GArray *old_spans,
- gboolean multi_week_view,
- gint weeks_shown,
- gboolean compress_weekend,
- gint start_weekday,
- time_t *day_starts,
- gint *rows_per_day);
-
-/* Returns which 'cell' in the table the day appears in. Note that most days
- have a height of 2 rows, but Sat/Sun are sometimes compressed so they have
- a height of only 1 row. */
-void e_week_view_layout_get_day_position(gint day,
- gboolean multi_week_view,
- gint weeks_shown,
- gint display_start_day,
- gboolean compress_weekend,
- gint *cell_x,
- gint *cell_y,
- gint *rows);
-
-gboolean e_week_view_layout_get_span_position (EWeekViewEvent *event,
- EWeekViewEventSpan *span,
- gint rows_per_cell,
- gint rows_per_compressed_cell,
- gint display_start_day,
- gboolean multi_week_view,
- gboolean compress_weekend,
- gint *span_num_days);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_WEEK_VIEW_LAYOUT_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 2d0489d3fc..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@ximian.com>
- *
- * 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
- */
-
-/*
- * 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 d9211afd8d..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, Ximian, 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 2f93383cce..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@ximian.com>
- *
- * 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
- */
-
-/*
- * 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 d2420afec7..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, Ximian, 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 22f776b557..0000000000
--- a/calendar/gui/e-week-view.c
+++ /dev/null
@@ -1,3923 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors :
- * Damon Chaplin <damon@ximian.com>
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 1999, Ximian, 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/gtkinvisible.h>
-#include <gtk/gtkselection.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkmain.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 <gal/widgets/e-unicode.h>
-#include "dialogs/delete-comp.h"
-#include "comp-util.h"
-#include "cal-util/timeutil.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "goto.h"
-#include "e-week-view-event-item.h"
-#include "e-week-view-layout.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/timezone-16.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-*"
-
-#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
-
-/* The timeout before we do a layout, so we don't do a layout for each event
- we get from the server. */
-#define E_WEEK_VIEW_LAYOUT_TIMEOUT 100
-
-
-/* Signal IDs */
-enum {
- SELECTION_CHANGED,
- LAST_SIGNAL
-};
-static guint e_week_view_signals[LAST_SIGNAL] = { 0 };
-
-
-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_ensure_events_sorted (EWeekView *week_view);
-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 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_cut (GtkWidget *widget, gpointer data);
-static void e_week_view_on_copy (GtkWidget *widget, gpointer data);
-static void e_week_view_on_paste (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 void invisible_destroyed (GtkWidget *invisible, EWeekView *week_view);
-static void selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- EWeekView *week_view);
-static void selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- EWeekView *week_view);
-static void selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- EWeekView *week_view);
-
-static void e_week_view_queue_layout (EWeekView *week_view);
-static void e_week_view_cancel_layout (EWeekView *week_view);
-static gboolean e_week_view_layout_timeout_cb (gpointer data);
-
-
-static GtkTableClass *parent_class;
-static GdkAtom clipboard_atom = GDK_NONE;
-
-
-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;
-
- e_week_view_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EWeekViewClass, selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_week_view_signals, LAST_SIGNAL);
-
- /* 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;
-
- class->selection_changed = NULL;
-
- /* clipboard atom */
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-}
-
-
-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->layout_timeout_id = 0;
-
- week_view->spans = NULL;
-
- week_view->zone = 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;
-
- week_view->default_category = 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;
-
- /* Set up the inivisible widget for the clipboard selections */
- week_view->invisible = gtk_invisible_new ();
- gtk_selection_add_target (week_view->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- 0);
- gtk_signal_connect (GTK_OBJECT (week_view->invisible),
- "selection_get",
- GTK_SIGNAL_FUNC (selection_get),
- (gpointer) week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->invisible),
- "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear_event),
- (gpointer) week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->invisible),
- "selection_received",
- GTK_SIGNAL_FUNC (selection_received),
- (gpointer) week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->invisible),
- "destroy",
- GTK_SIGNAL_FUNC (invisible_destroyed),
- (gpointer) week_view);
- week_view->clipboard_selection = 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_cancel_layout (week_view);
-
- e_week_view_free_events (week_view);
- g_array_free (week_view->events, TRUE);
- week_view->events = NULL;
-
- 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);
- week_view->small_font = NULL;
- }
-
- if (week_view->default_category) {
- g_free (week_view->default_category);
- week_view->default_category = NULL;
- }
-
- gdk_cursor_destroy (week_view->normal_cursor);
- gdk_cursor_destroy (week_view->move_cursor);
- gdk_cursor_destroy (week_view->resize_width_cursor);
-
- if (week_view->invisible)
- gtk_widget_destroy (week_view->invisible);
- if (week_view->clipboard_selection)
- g_free (week_view->clipboard_selection);
-
- 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 = 0xe0e0;
- week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS].green = 0xe0e0;
- week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS].blue = 0xe0e0;
-
- 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 = 213 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green = 213 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].blue = 213 * 257;
-
- 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);
- week_view->timezone_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->timezone_mask, NULL, timezone_16_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);
-
- /* Check that the small font is smaller than the default font.
- If it isn't, we won't use it. */
- if (week_view->small_font) {
- if (font->ascent + font->descent <= week_view->small_font->ascent + week_view->small_font->descent)
- week_view->use_small_font = FALSE;
- }
-
- /* 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,
- cal_client_resolve_tzid_cb, week_view->client);
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- e_week_view_queue_layout (week_view);
-}
-
-/* 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);
-
- gtk_widget_queue_draw (week_view->main_canvas);
- e_week_view_check_layout (week_view);
-}
-
-/* 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);
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-/* 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);
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-/* 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 NULL;
-
- 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)
-{
- CalQuery *old_query;
- char *real_sexp;
-
- gtk_widget_queue_draw (week_view->main_canvas);
- e_week_view_free_events (week_view);
- e_week_view_queue_layout (week_view);
-
- if (!(week_view->client
- && cal_client_get_load_state (week_view->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- old_query = week_view->query;
- week_view->query = NULL;
-
- if (old_query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), week_view);
- gtk_object_unref (GTK_OBJECT (old_query));
- }
-
- g_assert (week_view->sexp != NULL);
-
- real_sexp = adjust_query_sexp (week_view, week_view->sexp);
- if (!real_sexp) {
- return; /* No time range is set, so don't start a query */
- }
-
- 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);
-}
-
-
-/**
- * e_week_view_set_default_category:
- * @week_view: A week view.
- * @category: Default category name or NULL for no category.
- *
- * Sets the default category that will be used when creating new calendar
- * components from the week view.
- **/
-void
-e_week_view_set_default_category (EWeekView *week_view, const char *category)
-{
- g_return_if_fail (week_view != NULL);
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->default_category)
- g_free (week_view->default_category);
-
- week_view->default_category = g_strdup (category);
-}
-
-
-/* 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));
-
- time_to_gdate_with_zone (&date, start_time, week_view->zone);
-
- 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_with_zone (start_time, -day_offset,
- week_view->zone);
- start_time = time_day_begin_with_zone (start_time,
- week_view->zone);
- 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_with_zone (start_time, 1,
- week_view->zone))
- week_view->selection_end_day = week_view->selection_start_day;
- else {
- time_to_gdate_with_zone (&end_date, end_time - 60, week_view->zone);
- 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 icaltimetype start_tt = icaltime_null_time ();
- 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;
-
- start_tt.year = g_date_year (&base_date);
- start_tt.month = g_date_month (&base_date);
- start_tt.day = g_date_day (&base_date);
-
- start_time = icaltime_as_timet_with_zone (start_tt,
- week_view->zone);
-
- 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_with_zone (tmp_time, 1,
- week_view->zone);
- 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);
-}
-
-
-/* The current timezone. */
-icaltimezone*
-e_week_view_get_timezone (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), NULL);
-
- return week_view->zone;
-}
-
-
-void
-e_week_view_set_timezone (EWeekView *week_view,
- icaltimezone *zone)
-{
- icaltimezone *old_zone;
- struct icaltimetype tt = icaltime_null_time ();
- time_t lower;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- old_zone = week_view->zone;
- if (old_zone == zone)
- return;
-
- week_view->zone = zone;
-
- /* If we don't have a valid date set yet, just return. */
- if (!g_date_valid (&week_view->first_day_shown))
- return;
-
- /* Recalculate the new start of the first week. We just use exactly
- the same time, but with the new timezone. */
- tt.year = g_date_year (&week_view->first_day_shown);
- tt.month = g_date_month (&week_view->first_day_shown);
- tt.day = g_date_day (&week_view->first_day_shown);
-
- lower = icaltime_as_timet_with_zone (tt, zone);
-
- e_week_view_recalc_day_starts (week_view, lower);
- update_query (week_view);
-}
-
-
-void
-e_week_view_cut_clipboard (EWeekView *week_view)
-{
- EWeekViewEvent *event;
- const char *uid;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->editing_event_num == -1)
- return;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- week_view->editing_event_num);
- if (event == NULL)
- return;
-
- e_week_view_copy_clipboard (week_view);
- cal_component_get_uid (event->comp, &uid);
- cal_client_remove_object (week_view->client, uid);
-}
-
-void
-e_week_view_copy_clipboard (EWeekView *week_view)
-{
- EWeekViewEvent *event;
- char *comp_str;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- week_view->editing_event_num);
- if (event == NULL)
- return;
-
- comp_str = cal_component_get_as_string (event->comp);
- if (week_view->clipboard_selection != NULL)
- g_free (week_view->clipboard_selection);
- week_view->clipboard_selection = comp_str;
- gtk_selection_owner_set (week_view->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-void
-e_week_view_paste_clipboard (EWeekView *week_view)
-{
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- gtk_selection_convert (week_view->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-
-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 cell_x, cell_y, cell_h;
-
- e_week_view_layout_get_day_position (day,
- week_view->multi_week_view,
- week_view->weeks_shown,
- week_view->display_start_day,
- week_view->compress_weekend,
- &cell_x, &cell_y, &cell_h);
-
- *day_x = week_view->col_offsets[cell_x];
- *day_y = week_view->row_offsets[cell_y];
-
- *day_w = week_view->col_widths[cell_x];
- *day_h = week_view->row_heights[cell_y];
- if (cell_h == 2)
- *day_h += week_view->row_heights[cell_y + 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 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 (!e_week_view_layout_get_span_position (event, span,
- week_view->rows_per_cell,
- week_view->rows_per_compressed_cell,
- week_view->display_start_day,
- week_view->multi_week_view,
- week_view->compress_weekend,
- &num_days)) {
- 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 1
- g_print ("In e_week_view_on_button_press\n");
- if (event->type == GDK_2BUTTON_PRESS)
- g_print (" is a double-click\n");
- if (week_view->pressed_event_num != -1)
- g_print (" item is pressed\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;
- }
-
- /* 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;
-
- /* If an event is pressed just return. */
- if (week_view->pressed_event_num != -1)
- return FALSE;
-
- if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
- time_t dtstart, dtend;
-
- g_print (" got double-click\n");
-
- dtstart = week_view->day_starts[day];
- dtend = week_view->day_starts[day + 1];
- gnome_calendar_new_appointment_for (week_view->calendar,
- dtstart, dtend,
- TRUE);
- return TRUE;
- }
-
- if (event->button == 1) {
- /* Start the selection drag. */
- 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;
- }
-
- /* Hide all the jump buttons. */
- for (day = 0; day < E_WEEK_VIEW_MAX_WEEKS * 7; day++) {
- gnome_canvas_item_hide (week_view->jump_buttons[day]);
- }
-}
-
-
-/* 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 icaltimetype start_tt, end_tt;
-
- 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_tt = icaltime_from_timet_with_zone (start, FALSE,
- week_view->zone);
- end_tt = icaltime_from_timet_with_zone (end, FALSE,
- week_view->zone);
-
- 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_tt.hour * 60 + start_tt.minute;
- event.end_minute = end_tt.hour * 60 + end_tt.minute;
- if (event.end_minute == 0 && start != end)
- event.end_minute = 24 * 60;
-
- event.different_timezone = FALSE;
- if (!cal_comp_util_compare_event_timezones (comp, week_view->client,
- week_view->zone))
- event.different_timezone = TRUE;
-
- 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)
- week_view->spans = e_week_view_layout_events
- (week_view->events, week_view->spans,
- week_view->multi_week_view,
- week_view->weeks_shown,
- week_view->compress_weekend,
- week_view->display_start_day,
- week_view->day_starts,
- week_view->rows_per_day);
-
- 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_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;
- }
-}
-
-
-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) {
- GSList *categories_list;
-
- if (cal_component_has_alarms (comp))
- num_icons++;
- if (cal_component_has_recurrences (comp))
- num_icons++;
- if (event->different_timezone)
- num_icons++;
-
- cal_component_get_categories_list (comp, &categories_list);
- num_icons += g_slist_length (categories_list);
-
- cal_component_free_categories_list (categories_list);
- }
-
- /* 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);
-}
-
-
-static void
-e_week_view_on_adjustment_changed (GtkAdjustment *adjustment,
- EWeekView *week_view)
-{
- GDate date;
- gint week_offset;
- struct icaltimetype start_tt = icaltime_null_time ();
- 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. */
- start_tt.year = g_date_year (&date);
- start_tt.month = g_date_month (&date);
- start_tt.day = g_date_day (&date);
-
- lower = icaltime_as_timet_with_zone (start_tt, week_view->zone);
-
- 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);
- }
-}
-
-
-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 *gdkevent,
- EWeekView *week_view)
-{
- EWeekViewEvent *event;
- gint event_num, span_num;
-
-#if 0
- g_print ("In e_week_view_on_text_item_event\n");
-#endif
-
- switch (gdkevent->type) {
- case GDK_KEY_PRESS:
- if (gdkevent && gdkevent->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_2BUTTON_PRESS:
- if (!e_week_view_find_event_from_item (week_view, item,
- &event_num, &span_num))
- return FALSE;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- if (week_view->calendar)
- gnome_calendar_edit_object (week_view->calendar,
- event->comp);
- else
- g_warning ("Calendar not set");
-
- gtk_signal_emit_stop_by_name (GTK_OBJECT (item), "event");
- return TRUE;
- case GDK_BUTTON_PRESS:
- if (!e_week_view_find_event_from_item (week_view, item,
- &event_num, &span_num))
- return FALSE;
-
- if (gdkevent->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*) gdkevent,
- 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 (gdkevent) {
- week_view->drag_event_x = gdkevent->button.x;
- week_view->drag_event_y = gdkevent->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 (gdkevent->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);
- }
-
- gtk_signal_emit (GTK_OBJECT (week_view),
- e_week_view_signals[SELECTION_CHANGED]);
-}
-
-
-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);
- g_assert (text != NULL);
-
- /* Only update the summary if necessary. */
- cal_component_get_summary (event->comp, &summary);
- if (summary.value && !strcmp (text, summary.value)) {
- if (!e_week_view_is_one_day_event (week_view, event_num))
- e_week_view_reshape_event_span (week_view, event_num,
- span_num);
- } else {
- summary.value = text;
- summary.altrep = NULL;
- cal_component_set_summary (event->comp, &summary);
-
- if (!cal_client_update_object (week_view->client, event->comp))
- g_message ("e_week_view_on_editing_stopped(): Could not update the object!");
- }
-
- g_free (text);
-
- gtk_signal_emit (GTK_OBJECT (week_view),
- e_week_view_signals[SELECTION_CHANGED]);
-}
-
-
-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 = e_utf8_from_gtk_event_key (widget, event->keyval, 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 = icaltimezone_get_tzid (week_view->zone);
-
- *date.value = icaltime_from_timet_with_zone (dtstart, FALSE,
- week_view->zone);
- cal_component_set_dtstart (comp, &date);
- *date.value = icaltime_from_timet_with_zone (dtend, FALSE,
- week_view->zone);
- cal_component_set_dtend (comp, &date);
-
- cal_component_set_categories (comp, week_view->default_category);
-
- /* We add the event locally and start editing it. We don't send it
- to the server until the user finishes editing it. */
- 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");
- }
-
- if (initial_text)
- g_free (initial_text);
-
- 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_("_Paste"), NULL,
- e_week_view_on_paste, 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 },
-
- /* Only show this separator if one of the above is shown. */
- { "", NULL, NULL, NULL, MASK_EDITABLE | MASK_EDITING },
-
-
- { N_("C_ut"), NULL,
- e_week_view_on_cut, NULL, MASK_EDITING | MASK_EDITABLE },
- { N_("_Copy"), NULL,
- e_week_view_on_copy, NULL, MASK_EDITING | MASK_EDITABLE },
- { N_("_Paste"), NULL,
- e_week_view_on_paste, NULL, 0 },
-
- { "", 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;
- struct icaltimetype itt;
-
- /* Edit a new event. If only one day is selected we set the time to
- the first 1/2-hour of the working day. */
- if (week_view->selection_start_day == week_view->selection_end_day) {
- dtstart = week_view->day_starts[week_view->selection_start_day];
- itt = icaltime_from_timet_with_zone (dtstart, FALSE,
- week_view->zone);
- itt.hour = calendar_config_get_day_start_hour ();
- itt.minute = calendar_config_get_day_start_minute ();
- dtstart = icaltime_as_timet_with_zone (itt, week_view->zone);
-
- icaltime_adjust (&itt, 0, 0, 30, 0);
- dtend = icaltime_as_timet_with_zone (itt, week_view->zone);
- } else {
- 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, event->start, week_view->zone);
-
- 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_delete_event_internal (EWeekView *week_view, gint event_num)
-{
- CalComponentVType vtype;
- EWeekViewEvent *event;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- vtype = cal_component_get_vtype (event->comp);
-
- if (delete_component_dialog (event->comp, 1, vtype,
- GTK_WIDGET (week_view))) {
- 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_delete_appointment (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- if (week_view->popup_event_num == -1)
- return;
-
- e_week_view_delete_event_internal (week_view,
- week_view->popup_event_num);
-}
-
-
-void
-e_week_view_delete_event (EWeekView *week_view)
-{
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->editing_event_num == -1)
- return;
-
- e_week_view_delete_event_internal (week_view,
- week_view->editing_event_num);
-}
-
-
-static void
-e_week_view_on_cut (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- const char *uid;
-
- week_view = E_WEEK_VIEW (data);
-
- e_week_view_on_copy (widget, data);
-
- if (week_view->popup_event_num == -1)
- return;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- week_view->popup_event_num);
-
- cal_component_get_uid (event->comp, &uid);
- cal_client_remove_object (week_view->client, uid);
-}
-
-static void
-e_week_view_on_copy (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- char *comp_str;
-
- 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);
-
- comp_str = cal_component_get_as_string (event->comp);
- if (week_view->clipboard_selection)
- g_free (week_view->clipboard_selection);
- week_view->clipboard_selection = comp_str;
-
- gtk_selection_owner_set (week_view->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-static void
-e_week_view_on_paste (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view = E_WEEK_VIEW (data);
-
- gtk_selection_convert (week_view->invisible,
- clipboard_atom,
- GDK_SELECTION_TYPE_STRING,
- GDK_CURRENT_TIME);
-}
-
-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, event->start, week_view->zone);
-
- /* 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 = icaltimezone_get_tzid (week_view->zone);
-
- *date.value = icaltime_from_timet_with_zone (event->start, FALSE,
- week_view->zone);
- cal_component_set_dtstart (new_comp, &date);
- *date.value = icaltime_from_timet_with_zone (event->end, FALSE,
- week_view->zone);
- 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;
-}
-
-static void
-invisible_destroyed (GtkWidget *invisible, EWeekView *week_view)
-{
- week_view->invisible = NULL;
-}
-
-static void
-selection_get (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint info,
- guint time_stamp,
- EWeekView *week_view)
-{
- if (week_view->clipboard_selection != NULL) {
- gtk_selection_data_set (selection_data,
- GDK_SELECTION_TYPE_STRING,
- 8,
- week_view->clipboard_selection,
- strlen (week_view->clipboard_selection));
- }
-}
-
-static void
-selection_clear_event (GtkWidget *invisible,
- GdkEventSelection *event,
- EWeekView *week_view)
-{
- if (week_view->clipboard_selection != NULL) {
- g_free (week_view->clipboard_selection);
- week_view->clipboard_selection = NULL;
- }
-}
-
-static void
-selection_received (GtkWidget *invisible,
- GtkSelectionData *selection_data,
- guint time,
- EWeekView *week_view)
-{
- char *comp_str;
- icalcomponent *icalcomp;
- time_t dtstart;
- struct icaltimetype itime;
- icalcomponent_kind kind;
- CalComponent *comp;
- char *uid;
- time_t tt_start, tt_end;
- struct icaldurationtype ic_dur;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (selection_data->length < 0 ||
- selection_data->type != GDK_SELECTION_TYPE_STRING) {
- return;
- }
-
- comp_str = (char *) selection_data->data;
- icalcomp = icalparser_parse_string ((const char *) comp_str);
- if (!icalcomp)
- return;
-
- /* check the type of the component */
- kind = icalcomponent_isa (icalcomp);
- if (kind != ICAL_VCALENDAR_COMPONENT &&
- kind != ICAL_VEVENT_COMPONENT &&
- kind != ICAL_VTODO_COMPONENT &&
- kind != ICAL_VJOURNAL_COMPONENT) {
- return;
- }
-
- dtstart = week_view->day_starts[week_view->selection_start_day];
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- int num_found = 0;
- icalcomponent_kind child_kind;
- icalcomponent *subcomp;
-
- subcomp = icalcomponent_get_first_component (
- icalcomp, ICAL_ANY_COMPONENT);
- while (subcomp) {
- child_kind = icalcomponent_isa (subcomp);
- if (child_kind == ICAL_VEVENT_COMPONENT ||
- child_kind == ICAL_VTODO_COMPONENT ||
- child_kind == ICAL_VJOURNAL_COMPONENT) {
- CalComponent *tmp_comp;
-
- tt_start = icaltime_as_timet (icalcomponent_get_dtstart (subcomp));
- tt_end = icaltime_as_timet (icalcomponent_get_dtend (subcomp));
- ic_dur = icaldurationtype_from_int (tt_end - tt_start);
- itime = icaltime_from_timet_with_zone (dtstart, FALSE, week_view->zone);
- /* FIXME: Need to set TZID. */
- icalcomponent_set_dtstart (icalcomp, itime);
- itime = icaltime_add (itime, ic_dur);
- icalcomponent_set_dtend (icalcomp, itime);
-
- uid = cal_component_gen_uid ();
- tmp_comp = cal_component_new ();
- cal_component_set_icalcomponent (
- tmp_comp, icalcomponent_new_clone (subcomp));
- cal_component_set_uid (tmp_comp, uid);
-
- free (uid);
- gtk_object_unref (GTK_OBJECT (tmp_comp));
-
- num_found++;
- }
- subcomp = icalcomponent_get_next_component (
- icalcomp, ICAL_ANY_COMPONENT);
- }
-
- if (num_found) {
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
-
- cal_client_update_object (week_view->client, comp);
-
- gtk_object_unref (GTK_OBJECT (comp));
- }
- }
- else {
- tt_start = icaltime_as_timet (icalcomponent_get_dtstart (icalcomp));
- tt_end = icaltime_as_timet (icalcomponent_get_dtend (icalcomp));
- ic_dur = icaldurationtype_from_int (tt_end - tt_start);
- itime = icaltime_from_timet_with_zone (dtstart, FALSE, week_view->zone);
- /* FIXME: need to set TZID */
- icalcomponent_set_dtstart (icalcomp, itime);
- itime = icaltime_add (itime, ic_dur);
- icalcomponent_set_dtend (icalcomp, itime);
-
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
- uid = cal_component_gen_uid ();
- cal_component_set_uid (comp, (const char *) uid);
- free (uid);
-
- cal_client_update_object (week_view->client, comp);
-
- gtk_object_unref (GTK_OBJECT (comp));
- }
-}
-
-
-/* Gets the visible time range. Returns FALSE if no time range has been set. */
-gboolean
-e_week_view_get_visible_time_range (EWeekView *week_view,
- time_t *start_time,
- time_t *end_time)
-{
- gint num_days;
-
- /* If we don't have a valid date set yet, return FALSE. */
- if (!g_date_valid (&week_view->first_day_shown))
- return FALSE;
-
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
- *start_time = week_view->day_starts[0];
- *end_time = week_view->day_starts[num_days];
-
- return TRUE;
-}
-
-
-/* Queues a layout, unless one is already queued. */
-static void
-e_week_view_queue_layout (EWeekView *week_view)
-{
- if (week_view->layout_timeout_id == 0) {
- week_view->layout_timeout_id = g_timeout_add (E_WEEK_VIEW_LAYOUT_TIMEOUT, e_week_view_layout_timeout_cb, week_view);
- }
-}
-
-
-/* Removes any queued layout. */
-static void
-e_week_view_cancel_layout (EWeekView *week_view)
-{
- if (week_view->layout_timeout_id != 0) {
- gtk_timeout_remove (week_view->layout_timeout_id);
- week_view->layout_timeout_id = 0;
- }
-}
-
-
-static gboolean
-e_week_view_layout_timeout_cb (gpointer data)
-{
- EWeekView *week_view = E_WEEK_VIEW (data);
-
- gtk_widget_queue_draw (week_view->main_canvas);
- e_week_view_check_layout (week_view);
-
- week_view->layout_timeout_id = 0;
- return FALSE;
-}
-
-
-/* Returns the number of selected events (0 or 1 at present). */
-gint
-e_week_view_get_num_events_selected (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), 0);
-
- return (week_view->editing_event_num != -1) ? 1 : 0;
-}
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
deleted file mode 100644
index 9b4d4c817b..0000000000
--- a/calendar/gui/e-week-view.h
+++ /dev/null
@@ -1,503 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Ximian, 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 1
-#define E_WEEK_VIEW_ICON_Y_PAD 1
-#define E_WEEK_VIEW_ICON_R_PAD 1
-
-/* 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
-
-/* 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
-
-/* 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;
- guint8 num_spans;
-
- /* TRUE if the event is at a different UTC offset than our current
- timezone, i.e. it is in a different timezone. */
- guint different_timezone : 1;
-};
-
-
-#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;
-
- /* The ID of the timeout function for doing a new layout. */
- gint layout_timeout_id;
-
- /* 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 timezone. */
- icaltimezone *zone;
-
- /* 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;
- GdkPixmap *timezone_icon;
- GdkBitmap *timezone_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;
-
- /* the invisible widget to manage the clipboard selections */
- GtkWidget *invisible;
- gchar *clipboard_selection;
-
- /* The default category for new events */
- char *default_category;
-};
-
-struct _EWeekViewClass
-{
- GtkTableClass parent_class;
-
- /* Notification signals */
- void (* selection_changed) (EWeekView *week_view);
-};
-
-
-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);
-
-void e_week_view_set_default_category (EWeekView *week_view,
- const char *category);
-
-/* 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);
-
-/* Gets the visible time range. Returns FALSE if no time range has been set. */
-gboolean e_week_view_get_visible_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);
-
-/* The current timezone. */
-icaltimezone* e_week_view_get_timezone (EWeekView *week_view);
-void e_week_view_set_timezone (EWeekView *week_view,
- icaltimezone *zone);
-
-/* Clipboard related functions */
-void e_week_view_cut_clipboard (EWeekView *week_view);
-void e_week_view_copy_clipboard (EWeekView *week_view);
-void e_week_view_paste_clipboard (EWeekView *week_view);
-
-void e_week_view_delete_event (EWeekView *week_view);
-
-/* Returns the number of selected events (0 or 1 at present). */
-gint e_week_view_get_num_events_selected (EWeekView *week_view);
-
-/*
- * 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);
-
-gint e_week_view_event_sort_func (const void *arg1,
- const void *arg2);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_WEEK_VIEW_H_ */
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
deleted file mode 100644
index 44bf54ec61..0000000000
--- a/calendar/gui/gnome-cal.c
+++ /dev/null
@@ -1,2578 +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 Ximian, 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 <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomevfs/gnome-vfs-types.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
-#include <liboaf/liboaf.h>
-#include <gal/e-paned/e-hpaned.h>
-#include <gal/e-paned/e-vpaned.h>
-#include <cal-util/timeutil.h>
-#include "widgets/menus/gal-view-menus.h"
-#include "dialogs/event-editor.h"
-#include "dialogs/task-editor.h"
-#include "e-calendar-table.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-#include "evolution-calendar.h"
-#include "gnome-cal.h"
-#include "component-factory.h"
-#include "cal-search-bar.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "calendar-view.h"
-#include "calendar-view-factory.h"
-#include "tag-calendar.h"
-
-
-
-/* Private part of the GnomeCalendar structure */
-struct _GnomeCalendarPrivate {
- /*
- * The Calendar Folder.
- */
-
- /* The calendar client object we monitor */
- CalClient *client;
-
- /* Set of categories from the calendar client */
- GPtrArray *cal_categories;
-
- /*
- * The TaskPad Folder.
- */
-
- /* The calendar client object we monitor */
- CalClient *task_pad_client;
-
- /* Set of categories from the tasks client */
- GPtrArray *tasks_categories;
-
- /*
- * 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;
-
- /* Calendar query for the date navigator */
- CalQuery *dn_query;
- char *sexp;
-
- /* 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. */
- GnomeCalendarViewType 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;
-
- /* View collection and menus for the control */
- GalViewCollection *view_collection;
- GalViewMenus *view_menus;
-
- /* Whether we are being destroyed and should not mess with the object
- * editor hash table.
- */
- guint in_destroy : 1;
-
- /* Our current timezone. */
- icaltimezone *zone;
-
- /* The dates currently shown. If they are -1 then we have no dates
- shown. We only use these to check if we need to emit a
- 'dates-shown-changed' signal.*/
- time_t visible_start;
- time_t visible_end;
-};
-
-/* Signal IDs */
-
-enum {
- DATES_SHOWN_CHANGED,
- SELECTION_CHANGED,
- LAST_SIGNAL
-};
-
-static guint gnome_calendar_signals[LAST_SIGNAL];
-
-
-
-
-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_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 void gnome_calendar_notify_dates_shown_changed (GnomeCalendar *gcal);
-
-static void update_query (GnomeCalendar *gcal);
-
-
-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);
-
- gnome_calendar_signals[DATES_SHOWN_CHANGED] =
- gtk_signal_new ("dates_shown_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (GnomeCalendarClass,
- dates_shown_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gnome_calendar_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (GnomeCalendarClass,
- selection_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class,
- gnome_calendar_signals,
- LAST_SIGNAL);
-
- object_class->destroy = gnome_calendar_destroy;
-
- class->dates_shown_changed = NULL;
- class->selection_changed = NULL;
-}
-
-/* Callback used when the calendar query reports of an updated object */
-static void
-dn_query_obj_updated_cb (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total,
- gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- CalComponent *comp;
- CalClientGetStatus status;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- 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 ("dn_query_obj_updated_cb(): Syntax error while getting object `%s'", uid);
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object is no longer in the server, so do nothing */
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- tag_calendar_by_comp (priv->date_navigator, comp, priv->client, FALSE,
- TRUE);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* Callback used when the calendar query reports of a removed object */
-static void
-dn_query_obj_removed_cb (CalQuery *query, const char *uid, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- /* Just retag the whole thing */
- update_query (gcal);
-}
-
-/* Callback used when the calendar query is done */
-static void
-dn_query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *error_str,
- gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- /* FIXME */
-
- if (status != CAL_QUERY_DONE_SUCCESS)
- fprintf (stderr, "query done: %s\n", error_str);
-}
-
-/* Callback used when the calendar query reports an evaluation error */
-static void
-dn_query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- /* FIXME */
-
- fprintf (stderr, "eval error: %s\n", error_str);
-}
-
-/* Returns the current view widget, a EDayView or EWeekView. */
-static GtkWidget*
-gnome_calendar_get_current_view_widget (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *retval = NULL;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- retval = priv->day_view;
- break;
- case GNOME_CAL_WORK_WEEK_VIEW:
- retval = priv->work_week_view;
- break;
- case GNOME_CAL_WEEK_VIEW:
- retval = priv->week_view;
- break;
- case GNOME_CAL_MONTH_VIEW:
- retval = priv->month_view;
- break;
- default:
- g_assert_not_reached ();
- }
-
- return retval;
-}
-
-/* Computes the range of time that the date navigator is showing */
-static void
-get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_time)
-{
- GnomeCalendarPrivate *priv;
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- struct icaltimetype start_tt;
- struct icaltimetype end_tt;
-
- priv = gcal->priv;
-
- start_tt = icaltime_null_time ();
- end_tt = icaltime_null_time ();
-
- if (!e_calendar_item_get_date_range (priv->date_navigator->calitem,
- &start_year, &start_month, &start_day,
- &end_year, &end_month, &end_day)) {
- *start_time = -1;
- *end_time = -1;
- return;
- }
-
- start_tt.year = start_year;
- start_tt.month = start_month + 1;
- start_tt.day = start_day;
-
- end_tt.year = end_year;
- end_tt.month = end_month + 1;
- end_tt.day = end_day;
-
- icaltime_adjust (&end_tt, 1, 0, 0, 0);
-
- *start_time = icaltime_as_timet_with_zone (start_tt, priv->zone);
- *end_time = icaltime_as_timet_with_zone (end_tt, priv->zone);
-}
-
-/* Adjusts a given query sexp with the time range of the date navigator */
-static char *
-adjust_query_sexp (GnomeCalendar *gcal, const char *sexp)
-{
- time_t start_time, end_time;
- char *start, *end;
- char *new_sexp;
-
- get_date_navigator_range (gcal, &start_time, &end_time);
- if (start_time == -1 || end_time == -1)
- return NULL;
-
- start = isodate_from_time_t (start_time);
- end = isodate_from_time_t (end_time);
-
- 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 date navigator in the calendar */
-static void
-update_query (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- CalQuery *old_query;
- char *real_sexp;
-
- priv = gcal->priv;
-
- e_calendar_item_clear_marks (priv->date_navigator->calitem);
-
- if (!(priv->client
- && cal_client_get_load_state (priv->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- old_query = priv->dn_query;
- priv->dn_query = NULL;
-
- if (old_query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (old_query), gcal);
- gtk_object_unref (GTK_OBJECT (old_query));
- }
-
- g_assert (priv->sexp != NULL);
-
- real_sexp = adjust_query_sexp (gcal, priv->sexp);
- if (!real_sexp)
- return; /* No time range is set, so don't start a query */
-
- priv->dn_query = cal_client_get_query (priv->client, real_sexp);
- g_free (real_sexp);
-
- if (!priv->dn_query) {
- g_message ("update_query(): Could not create the query");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (priv->dn_query), "obj_updated",
- GTK_SIGNAL_FUNC (dn_query_obj_updated_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->dn_query), "obj_removed",
- GTK_SIGNAL_FUNC (dn_query_obj_removed_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->dn_query), "query_done",
- GTK_SIGNAL_FUNC (dn_query_query_done_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->dn_query), "eval_error",
- GTK_SIGNAL_FUNC (dn_query_eval_error_cb), gcal);
-}
-
-/**
- * gnome_calendar_set_query:
- * @gcal: A calendar.
- * @sexp: Sexp that defines the query.
- *
- * Sets the query sexp for all the views in a calendar.
- **/
-void
-gnome_calendar_set_query (GnomeCalendar *gcal, const char *sexp)
-{
- GnomeCalendarPrivate *priv;
- CalendarModel *model;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (sexp != NULL);
-
- priv = gcal->priv;
-
- /* Set the query on the date navigator */
-
- if (priv->sexp)
- g_free (priv->sexp);
-
- priv->sexp = g_strdup (sexp);
-
- update_query (gcal);
-
- /* Set the query on the main view */
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- e_day_view_set_query (E_DAY_VIEW (priv->day_view), sexp);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- e_day_view_set_query (E_DAY_VIEW (priv->work_week_view), sexp);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- e_week_view_set_query (E_WEEK_VIEW (priv->week_view), sexp);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- e_week_view_set_query (E_WEEK_VIEW (priv->month_view), sexp);
- break;
-
- default:
- g_warning ("A penguin bit my hand!");
- g_assert_not_reached ();
- }
-
- /* Set the query on the task pad */
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- calendar_model_set_query (model, sexp);
-}
-
-/* Returns the current time, for the ECalendarItem. */
-static struct tm
-get_current_time (ECalendarItem *calitem, gpointer data)
-{
- GnomeCalendar *cal = data;
- struct tm tmp_tm = { 0 };
- struct icaltimetype tt;
-
- g_return_val_if_fail (cal != NULL, tmp_tm);
- g_return_val_if_fail (GNOME_IS_CALENDAR (cal), tmp_tm);
-
- tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
- cal->priv->zone);
-
- /* Now copy it to the struct tm and return it. */
- tmp_tm.tm_year = tt.year - 1900;
- tmp_tm.tm_mon = tt.month - 1;
- tmp_tm.tm_mday = tt.day;
- tmp_tm.tm_hour = tt.hour;
- tmp_tm.tm_min = tt.minute;
- tmp_tm.tm_sec = tt.second;
- tmp_tm.tm_isdst = -1;
-
- return tmp_tm;
-}
-
-/* Callback used when the sexp changes in the calendar search bar */
-static void
-search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- gnome_calendar_set_query (gcal, sexp);
-}
-
-/* Callback used when the selected category in the search bar changes */
-static void
-search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- CalendarModel *model;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- e_day_view_set_default_category (E_DAY_VIEW (priv->day_view), category);
- e_day_view_set_default_category (E_DAY_VIEW (priv->work_week_view), category);
- e_week_view_set_default_category (E_WEEK_VIEW (priv->week_view), category);
- e_week_view_set_default_category (E_WEEK_VIEW (priv->month_view), category);
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- calendar_model_set_default_category (model, category);
-}
-
-static void
-view_selection_changed_cb (GtkWidget *view, GnomeCalendar *gcal)
-{
- g_print ("In view_selection_changed_cb\n");
-
- gtk_signal_emit (GTK_OBJECT (gcal),
- gnome_calendar_signals[SELECTION_CHANGED]);
-}
-
-
-static void
-setup_widgets (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *w;
- gchar *filename;
- CalendarModel *model;
-
- priv = gcal->priv;
-
- priv->search_bar = cal_search_bar_new ();
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "sexp_changed",
- GTK_SIGNAL_FUNC (search_bar_sexp_changed_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "category_changed",
- GTK_SIGNAL_FUNC (search_bar_category_changed_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_calendar_item_set_get_time_callback (priv->date_navigator->calitem,
- (ECalendarItemGetTimeCallback) get_current_time,
- gcal, NULL);
-
- 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 (""));
- gtk_signal_connect (GTK_OBJECT (priv->day_view), "selection_changed",
- GTK_SIGNAL_FUNC (view_selection_changed_cb), gcal);
-
- /* 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 (""));
- gtk_signal_connect (GTK_OBJECT (priv->work_week_view), "selection_changed",
- GTK_SIGNAL_FUNC (view_selection_changed_cb), gcal);
-
- /* 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 (""));
- gtk_signal_connect (GTK_OBJECT (priv->week_view), "selection_changed",
- GTK_SIGNAL_FUNC (view_selection_changed_cb), gcal);
-
- /* 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 (""));
- gtk_signal_connect (GTK_OBJECT (priv->month_view), "selection_changed",
- GTK_SIGNAL_FUNC (view_selection_changed_cb), gcal);
-
- 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->cal_categories = NULL;
- priv->tasks_categories = NULL;
-
- priv->object_editor_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- priv->current_view_type = GNOME_CAL_DAY_VIEW;
- priv->range_selected = FALSE;
-
- setup_widgets (gcal);
- priv->dn_query = NULL;
- priv->sexp = g_strdup ("#t"); /* Match all */
-
- priv->selection_start_time = time_day_begin_with_zone (time (NULL),
- priv->zone);
- priv->selection_end_time = time_add_day_with_zone (priv->selection_start_time, 1, priv->zone);
-
- priv->view_collection = NULL;
- priv->view_menus = NULL;
-
- priv->visible_start = -1;
- priv->visible_end = -1;
-}
-
-/* Frees a set of categories */
-static void
-free_categories (GPtrArray *categories)
-{
- int i;
-
- if (!categories)
- return;
-
- for (i = 0; i < categories->len; i++)
- g_free (categories->pdata[i]);
-
- g_ptr_array_free (categories, TRUE);
-}
-
-/* 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;
-
- free_categories (priv->cal_categories);
- priv->cal_categories = NULL;
-
- free_categories (priv->tasks_categories);
- priv->tasks_categories = NULL;
-
- /* 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->dn_query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->dn_query), gcal);
- gtk_object_unref (GTK_OBJECT (priv->dn_query));
- priv->dn_query = NULL;
- }
-
- if (priv->sexp) {
- g_free (priv->sexp);
- priv->sexp = NULL;
- }
-
- if (priv->client) {
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- if (priv->task_pad_client) {
- 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;
-
- if (priv->view_collection) {
- gtk_object_unref (GTK_OBJECT (priv->view_collection));
- priv->view_collection = NULL;
- }
-
- if (priv->view_menus) {
- gtk_object_unref (GTK_OBJECT (priv->view_menus));
- priv->view_menus = NULL;
- }
-
- g_free (priv);
- gcal->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-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_with_zone (new_time,
- priv->zone);
- priv->selection_end_time = time_add_day_with_zone (priv->selection_start_time, 1, priv->zone);
-
- gnome_calendar_update_view_times (gcal);
- gnome_calendar_update_date_navigator (gcal);
- gnome_calendar_notify_dates_shown_changed (gcal);
-}
-
-
-static void
-gnome_calendar_update_view_times (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- e_day_view_set_selected_time_range (E_DAY_VIEW (priv->day_view),
- priv->selection_start_time,
- priv->selection_end_time);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- e_day_view_set_selected_time_range (E_DAY_VIEW (priv->work_week_view),
- priv->selection_start_time,
- priv->selection_end_time);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- e_week_view_set_selected_time_range (E_WEEK_VIEW (priv->week_view),
- priv->selection_start_time,
- priv->selection_end_time);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- e_week_view_set_selected_time_range (E_WEEK_VIEW (priv->month_view),
- priv->selection_start_time,
- priv->selection_end_time);
- break;
-
- default:
- g_warning ("My penguin is gone!");
- g_assert_not_reached ();
- }
-}
-
-static void
-gnome_calendar_direction (GnomeCalendar *gcal, int direction)
-{
- GnomeCalendarPrivate *priv;
- time_t start_time, end_time;
-
- priv = gcal->priv;
-
- start_time = priv->selection_start_time;
- end_time = priv->selection_end_time;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- start_time = time_add_day_with_zone (start_time, direction,
- priv->zone);
- end_time = time_add_day_with_zone (end_time, direction,
- priv->zone);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- start_time = time_add_week_with_zone (start_time, direction,
- priv->zone);
- end_time = time_add_week_with_zone (end_time, direction,
- priv->zone);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- start_time = time_add_week_with_zone (start_time, direction,
- priv->zone);
- end_time = time_add_week_with_zone (end_time, direction,
- priv->zone);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- start_time = time_add_month_with_zone (start_time, direction,
- priv->zone);
- end_time = time_add_month_with_zone (end_time, direction,
- priv->zone);
- break;
-
- default:
- 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);
- gnome_calendar_notify_dates_shown_changed (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_with_zone (time,
- priv->zone);
- priv->selection_end_time = time_add_day_with_zone (priv->selection_start_time, 1, priv->zone);
-
- gnome_calendar_set_view (gcal, GNOME_CAL_DAY_VIEW, FALSE, TRUE);
-}
-
-static void
-focus_current_view (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- gtk_widget_grab_focus (priv->day_view);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- gtk_widget_grab_focus (priv->work_week_view);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- gtk_widget_grab_focus (priv->week_view);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- gtk_widget_grab_focus (priv->month_view);
- break;
-
- default:
- g_warning ("A penguin fell on its face!");
- g_assert_not_reached ();
- }
-}
-
-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));
- focus_current_view (gcal);
-}
-
-/**
- * gnome_calendar_get_view:
- * @gcal: A calendar.
- *
- * Queries the type of the view that is being shown in a calendar.
- *
- * Return value: Type of the view that is currently shown.
- **/
-GnomeCalendarViewType
-gnome_calendar_get_view (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_val_if_fail (gcal != NULL, GNOME_CAL_DAY_VIEW);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), GNOME_CAL_DAY_VIEW);
-
- priv = gcal->priv;
- return priv->current_view_type;
-}
-
-/* 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
-set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type,
- gboolean range_selected, gboolean grab_focus)
-{
- GnomeCalendarPrivate *priv;
- gboolean round_selection;
- GtkWidget *focus_widget;
-
- priv = gcal->priv;
-
- round_selection = FALSE;
- focus_widget = NULL;
-
- switch (view_type) {
- case GNOME_CAL_DAY_VIEW:
- focus_widget = priv->day_view;
-
- if (!range_selected)
- e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), 1);
-
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- focus_widget = priv->work_week_view;
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- focus_widget = priv->week_view;
- round_selection = TRUE;
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- focus_widget = priv->month_view;
-
- if (!range_selected)
- e_week_view_set_weeks_shown (E_WEEK_VIEW (priv->month_view), 5);
-
- round_selection = TRUE;
- break;
-
- default:
- g_warning ("A penguin is loose!");
- g_assert_not_reached ();
- return;
- }
-
- priv->current_view_type = view_type;
- priv->range_selected = range_selected;
-
- g_assert (focus_widget != NULL);
-
- calendar_config_set_default_view (view_type);
-
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), (int) view_type);
-
- if (grab_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);
-}
-
-/**
- * gnome_calendar_set_view:
- * @gcal: A calendar.
- * @view_type: Type of view to show.
- * @range_selected: If false, the range of days/weeks shown will be reset to the
- * default value (1 for day view, 5 for week view, respectively). If true, the
- * currently displayed range will be kept.
- * @grab_focus: Whether the view widget should grab the focus.
- *
- * Sets the view that should be shown in a calendar. If @reset_range is true,
- * this function will automatically set the number of days or weeks shown in
- * the view; otherwise the last configuration will be kept.
- **/
-void
-gnome_calendar_set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type,
- gboolean range_selected, gboolean grab_focus)
-{
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- set_view (gcal, view_type, range_selected, grab_focus);
- gnome_calendar_update_view_times (gcal);
- gnome_calendar_update_date_navigator (gcal);
- gnome_calendar_notify_dates_shown_changed (gcal);
-}
-
-/* Callback used when the view collection asks us to display a particular view */
-static void
-display_view_cb (GalViewCollection *view_collection, GalView *view, gpointer data)
-{
- GnomeCalendar *gcal;
- CalendarView *cal_view;
-
- gcal = GNOME_CALENDAR (data);
-
- if (!IS_CALENDAR_VIEW (view))
- g_error ("display_view_cb(): Unknown type of view for GnomeCalendar");
-
- cal_view = CALENDAR_VIEW (view);
-
- gnome_calendar_set_view (gcal, calendar_view_get_view_type (cal_view), FALSE, TRUE);
-}
-
-/**
- * gnome_calendar_setup_view_menus:
- * @gcal: A calendar.
- * @uic: UI controller to use for the menus.
- *
- * Sets up the #GalView menus for a calendar. This function should be called
- * from the Bonobo control activation callback for this calendar. Also, the
- * menus should be discarded using gnome_calendar_discard_view_menus().
- **/
-void
-gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
-{
- GnomeCalendarPrivate *priv;
- char *path;
- CalendarViewFactory *factory;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (uic != NULL);
- g_return_if_fail (BONOBO_IS_UI_COMPONENT (uic));
-
- priv = gcal->priv;
-
- g_return_if_fail (priv->view_collection == NULL);
-
- g_assert (priv->view_collection == NULL);
- g_assert (priv->view_menus == NULL);
-
- /* Create the view collection */
-
- priv->view_collection = gal_view_collection_new ();
-
- path = gnome_util_prepend_user_home ("/evolution/views/calendar/");
- gal_view_collection_set_storage_directories (priv->view_collection,
- EVOLUTION_DATADIR "/evolution/views/calendar/",
- path);
- g_free (path);
-
- /* Create the views */
-
- factory = calendar_view_factory_new (GNOME_CAL_DAY_VIEW);
- gal_view_collection_add_factory (priv->view_collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
-
- factory = calendar_view_factory_new (GNOME_CAL_WORK_WEEK_VIEW);
- gal_view_collection_add_factory (priv->view_collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
-
- factory = calendar_view_factory_new (GNOME_CAL_WEEK_VIEW);
- gal_view_collection_add_factory (priv->view_collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
-
- factory = calendar_view_factory_new (GNOME_CAL_MONTH_VIEW);
- gal_view_collection_add_factory (priv->view_collection, GAL_VIEW_FACTORY (factory));
- gtk_object_unref (GTK_OBJECT (factory));
-
- /* Load the collection and create the menus */
-
- gal_view_collection_load (priv->view_collection);
-
- priv->view_menus = gal_view_menus_new (priv->view_collection);
- gal_view_menus_apply (priv->view_menus, uic, NULL);
- gtk_signal_connect (GTK_OBJECT (priv->view_collection), "display_view",
- GTK_SIGNAL_FUNC (display_view_cb), gcal);
-}
-
-/**
- * gnome_calendar_discard_view_menus:
- * @gcal: A calendar.
- *
- * Discards the #GalView menus used by a calendar. This function should be
- * called from the Bonobo control deactivation callback for this calendar. The
- * menus should have been set up with gnome_calendar_setup_view_menus().
- **/
-void
-gnome_calendar_discard_view_menus (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_if_fail (gcal != NULL);
-
- priv = gcal->priv;
-
- g_return_if_fail (priv->view_collection != NULL);
-
- g_assert (priv->view_collection != NULL);
- g_assert (priv->view_menus != NULL);
-
- gtk_object_unref (GTK_OBJECT (priv->view_collection));
- priv->view_collection = NULL;
-
- gtk_object_unref (GTK_OBJECT (priv->view_menus));
- priv->view_menus = 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 == GNOME_CAL_MONTH_VIEW && !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);
-}
-
-/* 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
-client_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)
- update_query (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;
- }
-}
-
-/* Duplicates an array of categories */
-static GPtrArray *
-copy_categories (GPtrArray *categories)
-{
- GPtrArray *c;
- int i;
-
- c = g_ptr_array_new ();
- g_ptr_array_set_size (c, categories->len);
-
- for (i = 0; i < categories->len; i++)
- c->pdata[i] = g_strdup (categories->pdata[i]);
-
- return c;
-}
-
-/* Adds the categories from an array to a hash table if they don't exist there
- * already.
- */
-static void
-add_categories (GHashTable *categories, GPtrArray *c)
-{
- int i;
-
- if (!c)
- return;
-
- for (i = 0; i < c->len; i++) {
- const char *cat;
- const char *str;
-
- cat = c->pdata[i];
- str = g_hash_table_lookup (categories, cat);
-
- if (!str)
- g_hash_table_insert (categories, (char *) cat, NULL);
- }
-}
-
-/* Used to append categories from a hash table to an array */
-struct append_category_closure {
- GPtrArray *c;
-
- int i;
-};
-
-/* Appends a category from the hash table to the array */
-static void
-append_category_cb (gpointer key, gpointer value, gpointer data)
-{
- struct append_category_closure *closure;
- const char *category;
-
- category = key;
- closure = data;
-
- closure->c->pdata[closure->i] = g_strdup (category);
- closure->i++;
-}
-
-/* Creates the union of two sets of categories */
-static GPtrArray *
-merge_categories (GPtrArray *a, GPtrArray *b)
-{
- GHashTable *categories;
- int n;
- GPtrArray *c;
- struct append_category_closure closure;
-
- categories = g_hash_table_new (g_str_hash, g_str_equal);
-
- add_categories (categories, a);
- add_categories (categories, b);
-
- n = g_hash_table_size (categories);
-
- c = g_ptr_array_new ();
- g_ptr_array_set_size (c, n);
-
- closure.c = c;
- closure.i = 0;
- g_hash_table_foreach (categories, append_category_cb, &closure);
- g_hash_table_destroy (categories);
-
- return c;
-}
-
-/* Callback from the calendar client when the set of categories changes. We
- * have to merge the categories of the calendar and tasks clients.
- */
-static void
-client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- GPtrArray *merged;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- if (client == priv->client) {
- free_categories (priv->cal_categories);
- priv->cal_categories = copy_categories (categories);
- } else if (client == priv->task_pad_client) {
- free_categories (priv->tasks_categories);
- priv->tasks_categories = copy_categories (categories);
- } else
- g_assert_not_reached ();
-
- merged = merge_categories (priv->cal_categories, priv->tasks_categories);
- cal_search_bar_set_categories (CAL_SEARCH_BAR (priv->search_bar), merged);
- free_categories (merged);
-}
-
-GtkWidget *
-gnome_calendar_construct (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GnomeCalendarViewType view_type;
- CalendarModel *model;
-
- 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 (client_cal_opened_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->client), "categories_changed",
- GTK_SIGNAL_FUNC (client_categories_changed_cb), gcal);
-
- 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 (client_cal_opened_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->task_pad_client), "categories_changed",
- GTK_SIGNAL_FUNC (client_categories_changed_cb), gcal);
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- g_assert (model != NULL);
-
- calendar_model_set_cal_client (model, priv->task_pad_client, CALOBJ_TYPE_TODO);
-
- /* Get the default view to show. */
- view_type = calendar_config_get_default_view ();
- if (view_type < GNOME_CAL_DAY_VIEW || view_type > GNOME_CAL_MONTH_VIEW)
- view_type = GNOME_CAL_DAY_VIEW;
-
- gnome_calendar_set_view (gcal, view_type, 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;
-}
-
-/**
- * gnome_calendar_get_task_pad_cal_client:
- * @gcal: A calendar view.
- *
- * Queries the calendar client interface object that a calendar view is using
- * for the Task Pad.
- *
- * Return value: A calendar client interface object.
- **/
-CalClient *
-gnome_calendar_get_task_pad_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->task_pad_client;
-}
-
-/* Adds the specified URI to the alarm notification service */
-static void
-add_alarms (const char *uri)
-{
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_AlarmNotify an;
-
- /* Activate the alarm notification service */
-
- CORBA_exception_init (&ev);
- an = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("add_alarms(): Could not activate the alarm notification service");
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
-
- /* Ask the service to load the URI */
-
- 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");
- 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");
- } else if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("add_calendar(): Could not issue the addCalendar request");
-
- CORBA_exception_free (&ev);
-
- /* Get rid of the service */
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (an, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("add_alarms(): Could not unref the alarm notification service");
-
- CORBA_exception_free (&ev);
-}
-
-gboolean
-gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri)
-{
- GnomeCalendarPrivate *priv;
- char *tasks_uri;
- gboolean success;
- GnomeVFSURI *uri;
-
- 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;
- }
-
- add_alarms (str_uri);
-
- /* Open the appropriate Tasks folder to show in the TaskPad */
-
- uri = gnome_vfs_uri_new_private (str_uri, TRUE, TRUE, TRUE);
- if (!uri) {
- tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir);
- success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE);
-
- add_alarms (tasks_uri);
- g_free (tasks_uri);
- }
- else {
- if (!g_strcasecmp (uri->method_string, "file")) {
- tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir);
- success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE);
-
- add_alarms (tasks_uri);
- g_free (tasks_uri);
- }
- else {
- CalendarModel *model;
-
- /* we use the same CalClient for tasks than for events */
- gtk_object_unref (GTK_OBJECT (priv->task_pad_client));
- gtk_object_ref (GTK_OBJECT (priv->client));
- priv->task_pad_client = priv->client;
-
- gtk_signal_connect (GTK_OBJECT (priv->task_pad_client), "cal_opened",
- GTK_SIGNAL_FUNC (client_cal_opened_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->task_pad_client), "categories_changed",
- GTK_SIGNAL_FUNC (client_categories_changed_cb), gcal);
-
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- g_assert (model != NULL);
-
- calendar_model_set_cal_client (model, priv->task_pad_client, CALOBJ_TYPE_TODO);
-
- success = TRUE;
- }
-
- gnome_vfs_uri_unref (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;
- char *location;
-
- 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));
-
- location = calendar_config_get_timezone ();
- priv->zone = icaltimezone_get_builtin_timezone (location);
-
- e_day_view_set_timezone (E_DAY_VIEW (priv->day_view), priv->zone);
- e_day_view_set_timezone (E_DAY_VIEW (priv->work_week_view), priv->zone);
- e_week_view_set_timezone (E_WEEK_VIEW (priv->week_view), priv->zone);
- e_week_view_set_timezone (E_WEEK_VIEW (priv->month_view), priv->zone);
-
- 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);
- gnome_calendar_notify_dates_shown_changed (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_notify_dates_shown_changed (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);
-
- comp_editor_set_cal_client (COMP_EDITOR (ee), priv->client);
- comp_editor_edit_comp (COMP_EDITOR (ee), comp);
- }
-
- comp_editor_focus (COMP_EDITOR (ee));
-}
-
-/**
- * gnome_calendar_new_appointment_for:
- * @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, and the event is set to TRANSPARENT.
- *
- * 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)
-{
- GnomeCalendarPrivate *priv;
- struct icaltimetype itt;
- CalComponentDateTime dt;
- CalComponent *comp;
- CalComponentTransparency transparency;
- const char *category;
-
- g_return_if_fail (cal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (cal));
-
- priv = cal->priv;
-
- dt.value = &itt;
- dt.tzid = icaltimezone_get_tzid (priv->zone);
-
- /* Component type */
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
-
- /* DTSTART, DTEND */
-
- itt = icaltime_from_timet_with_zone (dtstart, FALSE, priv->zone);
- if (all_day)
- itt.hour = itt.minute = itt.second = 0;
- cal_component_set_dtstart (comp, &dt);
-
- itt = icaltime_from_timet_with_zone (dtend, FALSE, priv->zone);
- if (all_day) {
- /* If we want an all-day event and the end time isn't on a
- day boundary, we move it to the end of the day it is in. */
- if (itt.hour != 0 || itt.minute != 0 || itt.second != 0) {
- itt.hour = itt.minute = itt.second = 0;
- icaltime_adjust (&itt, 1, 0, 0, 0);
- }
- }
- cal_component_set_dtend (comp, &dt);
-
- transparency = all_day ? CAL_COMPONENT_TRANSP_TRANSPARENT
- : CAL_COMPONENT_TRANSP_OPAQUE;
- cal_component_set_transparency (comp, transparency);
-
-
- /* Category */
-
- category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
- cal_component_set_categories (comp, category);
-
- /* Edit! */
-
- 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);
-}
-
-/**
- * gnome_calendar_new_task:
- * @gcal: An Evolution calendar.
- *
- * Opens a task editor dialog for a new task.
- **/
-void
-gnome_calendar_new_task (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- TaskEditor *tedit;
- CalComponent *comp;
-
- g_print ("In gnome_calendar_new_task\n");
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- tedit = task_editor_new ();
- comp_editor_set_cal_client (COMP_EDITOR (tedit), priv->task_pad_client);
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
-
- comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
- gtk_object_unref (GTK_OBJECT (comp));
-
- comp_editor_focus (COMP_EDITOR (tedit));
-}
-
-
-/* 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;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- e_day_view_get_selected_time_range (E_DAY_VIEW (priv->day_view),
- start_time, end_time);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- e_day_view_get_selected_time_range (E_DAY_VIEW (priv->work_week_view),
- start_time, end_time);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- e_week_view_get_selected_time_range (E_WEEK_VIEW (priv->week_view),
- start_time, end_time);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- e_week_view_get_selected_time_range (E_WEEK_VIEW (priv->month_view),
- start_time, end_time);
- break;
-
- default:
- g_message ("My penguin is gone!");
- g_assert_not_reached ();
- }
-}
-
-
-/* Gets the visible time range for the current view. Returns FALSE if no
- time range has been set yet. */
-gboolean
-gnome_calendar_get_visible_time_range (GnomeCalendar *gcal,
- time_t *start_time,
- time_t *end_time)
-{
- GnomeCalendarPrivate *priv;
- gboolean retval = FALSE;
-
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- retval = e_day_view_get_visible_time_range (E_DAY_VIEW (priv->day_view), start_time, end_time);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- retval = e_day_view_get_visible_time_range (E_DAY_VIEW (priv->work_week_view), start_time, end_time);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- retval = e_week_view_get_visible_time_range (E_WEEK_VIEW (priv->week_view), start_time, end_time);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- retval = e_week_view_get_visible_time_range (E_WEEK_VIEW (priv->month_view), start_time, end_time);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- return retval;
-}
-
-
-
-static void
-get_days_shown (GnomeCalendar *gcal, GDate *start_date, gint *days_shown)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- time_to_gdate_with_zone (start_date,
- E_DAY_VIEW (priv->day_view)->lower,
- priv->zone);
- *days_shown = e_day_view_get_days_shown (E_DAY_VIEW (priv->day_view));
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- time_to_gdate_with_zone (start_date,
- E_DAY_VIEW (priv->work_week_view)->lower,
- priv->zone);
- *days_shown = e_day_view_get_days_shown (E_DAY_VIEW (priv->work_week_view));
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- *start_date = E_WEEK_VIEW (priv->week_view)->first_day_shown;
- if (e_week_view_get_multi_week_view (E_WEEK_VIEW (priv->week_view)))
- *days_shown = e_week_view_get_weeks_shown (
- E_WEEK_VIEW (priv->week_view)) * 7;
- else
- *days_shown = 7;
-
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- *start_date = E_WEEK_VIEW (priv->month_view)->first_day_shown;
- if (e_week_view_get_multi_week_view (E_WEEK_VIEW (priv->month_view)))
- *days_shown = e_week_view_get_weeks_shown (
- E_WEEK_VIEW (priv->month_view)) * 7;
- else
- *days_shown = 7;
-
- break;
-
- default:
- 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;
-
- get_days_shown (gcal, &start_date, &days_shown);
-
- end_date = start_date;
- g_date_add_days (&end_date, days_shown - 1);
-
- g_print ("Updating date navigator selection\n");
- e_calendar_item_set_selection (priv->date_navigator->calitem,
- &start_date, &end_date);
-}
-
-
-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;
- gboolean starts_on_week_start_day;
-
- priv = gcal->priv;
-
- starts_on_week_start_day = FALSE;
-
- get_days_shown (gcal, &start_date, &days_shown);
-
- 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);
-
- set_view (gcal, GNOME_CAL_MONTH_VIEW, TRUE, FALSE);
- gnome_calendar_update_date_navigator (gcal);
- gnome_calendar_notify_dates_shown_changed (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);
-
- set_view (gcal, GNOME_CAL_WEEK_VIEW, TRUE, FALSE);
- gnome_calendar_update_date_navigator (gcal);
- gnome_calendar_notify_dates_shown_changed (gcal);
- } else {
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- struct icaltimetype tt;
-
- start_year = g_date_year (&new_start_date);
- start_month = g_date_month (&new_start_date);
- start_day = g_date_day (&new_start_date);
- end_year = g_date_year (&new_end_date);
- end_month = g_date_month (&new_end_date);
- end_day = g_date_day (&new_end_date);
-
- tt = icaltime_null_time ();
- tt.year = start_year;
- tt.month = start_month;
- tt.day = start_day;
- priv->selection_start_time = icaltime_as_timet_with_zone (tt, priv->zone);
-
- tt = icaltime_null_time ();
- tt.year = end_year;
- tt.month = end_month;
- tt.day = end_day;
- icaltime_adjust (&tt, 1, 0, 0, 0);
- priv->selection_end_time = icaltime_as_timet_with_zone (tt, priv->zone);
-
- e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), new_days_shown);
- gnome_calendar_set_view (gcal, GNOME_CAL_DAY_VIEW, TRUE, FALSE);
- }
-
- focus_current_view (gcal);
-}
-
-
-static void
-gnome_calendar_on_date_navigator_date_range_changed (ECalendarItem *calitem,
- GnomeCalendar *gcal)
-{
- g_print ("In gnome_calendar_on_date_navigator_date_range_changed\n");
- update_query (gcal);
-}
-
-
-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;
-
- 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
- set_view(). */
- 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 == GNOME_CAL_MONTH_VIEW && !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_cut_clipboard (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW :
- e_day_view_cut_clipboard (E_DAY_VIEW (priv->day_view));
- break;
- case GNOME_CAL_WORK_WEEK_VIEW :
- e_day_view_cut_clipboard (E_DAY_VIEW (priv->work_week_view));
- break;
- case GNOME_CAL_WEEK_VIEW :
- e_week_view_cut_clipboard (E_WEEK_VIEW (priv->week_view));
- break;
- case GNOME_CAL_MONTH_VIEW :
- e_week_view_cut_clipboard (E_WEEK_VIEW (priv->month_view));
- break;
- default:
- g_assert_not_reached ();
- }
-}
-
-void
-gnome_calendar_copy_clipboard (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW :
- e_day_view_copy_clipboard (E_DAY_VIEW (priv->day_view));
- break;
- case GNOME_CAL_WORK_WEEK_VIEW :
- e_day_view_copy_clipboard (E_DAY_VIEW (priv->work_week_view));
- break;
- case GNOME_CAL_WEEK_VIEW :
- e_week_view_copy_clipboard (E_WEEK_VIEW (priv->week_view));
- break;
- case GNOME_CAL_MONTH_VIEW :
- e_week_view_copy_clipboard (E_WEEK_VIEW (priv->month_view));
- break;
- default:
- g_assert_not_reached ();
- }
-}
-
-void
-gnome_calendar_paste_clipboard (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW :
- e_day_view_paste_clipboard (E_DAY_VIEW (priv->day_view));
- break;
- case GNOME_CAL_WORK_WEEK_VIEW :
- e_day_view_paste_clipboard (E_DAY_VIEW (priv->work_week_view));
- break;
- case GNOME_CAL_WEEK_VIEW :
- e_week_view_paste_clipboard (E_WEEK_VIEW (priv->week_view));
- break;
- case GNOME_CAL_MONTH_VIEW :
- e_week_view_paste_clipboard (E_WEEK_VIEW (priv->month_view));
- break;
- }
-}
-
-
-/* Get the current timezone. */
-icaltimezone*
-gnome_calendar_get_timezone (GnomeCalendar *gcal)
-{
- g_return_val_if_fail (gcal != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- return gcal->priv->zone;
-}
-
-
-static void
-gnome_calendar_notify_dates_shown_changed (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- time_t start_time, end_time;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- gnome_calendar_get_visible_time_range (gcal, &start_time, &end_time);
-
- /* We check if the visible date range has changed, and only emit the
- signal if it has. (This makes sure we only change the folder title
- bar label in the shell when we need to.) */
- if (priv->visible_start != start_time
- || priv->visible_end != end_time) {
- priv->visible_start = start_time;
- priv->visible_end = end_time;
-
- gtk_signal_emit (GTK_OBJECT (gcal),
- gnome_calendar_signals[DATES_SHOWN_CHANGED]);
- }
-}
-
-
-/* Returns the number of selected events (0 or 1 at present). */
-gint
-gnome_calendar_get_num_events_selected (GnomeCalendar *gcal)
-{
- GtkWidget *view;
- gint retval = 0;
-
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), 0);
-
- view = gnome_calendar_get_current_view_widget (gcal);
- if (E_IS_DAY_VIEW (view))
- retval = e_day_view_get_num_events_selected (E_DAY_VIEW (view));
- else
- retval = e_week_view_get_num_events_selected (E_WEEK_VIEW (view));
-
- return retval;
-}
-
-
-void
-gnome_calendar_delete_event (GnomeCalendar *gcal)
-{
- GtkWidget *view;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- view = gnome_calendar_get_current_view_widget (gcal);
- if (E_IS_DAY_VIEW (view))
- e_day_view_delete_event (E_DAY_VIEW (view));
- else
- e_week_view_delete_event (E_WEEK_VIEW (view));
-}
-
-
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
deleted file mode 100644
index e142ebec3c..0000000000
--- a/calendar/gui/gnome-cal.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Evolution calendar - Main calendar view widget
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Ximian, 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 <bonobo/bonobo-ui-component.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;
-
-/* View types */
-typedef enum {
- GNOME_CAL_DAY_VIEW,
- GNOME_CAL_WORK_WEEK_VIEW,
- GNOME_CAL_WEEK_VIEW,
- GNOME_CAL_MONTH_VIEW
-} GnomeCalendarViewType;
-
-struct _GnomeCalendar {
- GtkVBox vbox;
-
- /* Private data */
- GnomeCalendarPrivate *priv;
-};
-
-struct _GnomeCalendarClass {
- GtkVBoxClass parent_class;
-
- /* Notification signals */
- void (* dates_shown_changed) (GnomeCalendar *gcal);
- void (* selection_changed) (GnomeCalendar *gcal);
-};
-
-
-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);
-CalClient *gnome_calendar_get_task_pad_cal_client(GnomeCalendar *gcal);
-
-gboolean gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri);
-
-void gnome_calendar_set_query (GnomeCalendar *gcal, const char *sexp);
-
-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);
-
-GnomeCalendarViewType gnome_calendar_get_view (GnomeCalendar *gcal);
-void gnome_calendar_set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type,
- gboolean range_selected, gboolean grab_focus);
-
-void gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic);
-void gnome_calendar_discard_view_menus (GnomeCalendar *gcal);
-
-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);
-
-void gnome_calendar_new_task (GnomeCalendar *gcal);
-
-/* Returns the selected time range for the current view. Note that this may be
- different from the fields in the GnomeCalendar, since the view may clip
- this or choose a more appropriate time. */
-void gnome_calendar_get_current_time_range (GnomeCalendar *gcal,
- time_t *start_time,
- time_t *end_time);
-
-/* Gets the visible time range for the current view. Returns FALSE if no
- time range has been set yet. */
-gboolean gnome_calendar_get_visible_time_range (GnomeCalendar *gcal,
- time_t *start_time,
- time_t *end_time);
-
-/* Returns the number of selected events (0 or 1 at present). */
-gint gnome_calendar_get_num_events_selected (GnomeCalendar *gcal);
-
-/* 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);
-
-/* Get the current timezone. */
-icaltimezone *gnome_calendar_get_timezone (GnomeCalendar *gcal);
-
-
-/* Clipboard operations */
-void gnome_calendar_cut_clipboard (GnomeCalendar *gcal);
-void gnome_calendar_copy_clipboard (GnomeCalendar *gcal);
-void gnome_calendar_paste_clipboard (GnomeCalendar *gcal);
-
-void gnome_calendar_delete_event (GnomeCalendar *gcal);
-
-
-
-END_GNOME_DECLS
-
-#endif
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 06250a1a70..0000000000
--- a/calendar/gui/goto.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/* Go to date dialog for Evolution
- *
- * Copyright (C) 1998 Red Hat, Inc.
- * Copyright (C) 2000 Ximian, 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 "calendar-config.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 icaltimetype tt = icaltime_null_time ();
- time_t et;
-
- e_calendar_item_get_selection (calitem, &start_date, &end_date);
-
- tt.year = g_date_year (&start_date);
- tt.month = g_date_month (&start_date);
- tt.day = g_date_day (&start_date);
-
- et = icaltime_as_timet_with_zone (tt, gnome_calendar_get_timezone (dlg->gcal));
-
- gnome_calendar_goto (dlg->gcal, et);
-
- gnome_dialog_close (GNOME_DIALOG (dlg->dialog));
-}
-
-/* Returns the current time, for the ECalendarItem. */
-static struct tm
-get_current_time (ECalendarItem *calitem, gpointer data)
-{
- char *location;
- icaltimezone *zone;
- struct tm tmp_tm = { 0 };
- struct icaltimetype tt;
-
- /* Get the current timezone. */
- location = calendar_config_get_timezone ();
- zone = icaltimezone_get_builtin_timezone (location);
-
- tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone);
-
- /* Now copy it to the struct tm and return it. */
- tmp_tm.tm_year = tt.year - 1900;
- tmp_tm.tm_mon = tt.month - 1;
- tmp_tm.tm_mday = tt.day;
- tmp_tm.tm_hour = tt.hour;
- tmp_tm.tm_min = tt.minute;
- tmp_tm.tm_sec = tt.second;
- tmp_tm.tm_isdst = -1;
-
- return tmp_tm;
-}
-
-/* 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);
- e_calendar_item_set_get_time_callback (calitem,
- get_current_time,
- dlg, NULL);
-
- 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 icaltimetype tt;
- 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!");
- g_free (dlg);
- return;
- }
-
- if (!get_widgets (dlg)) {
- g_message ("goto_dialog(): Could not find all widgets in the XML file!");
- g_free (dlg);
- return;
- }
- dlg->gcal = gcal;
-
- gnome_calendar_get_selected_time_range (dlg->gcal, &start_time, NULL);
- tt = icaltime_from_timet_with_zone (start_time, FALSE, gnome_calendar_get_timezone (gcal));
- dlg->year_val = tt.year;
- dlg->month_val = tt.month - 1;
- dlg->day_val = tt.day;
-
- 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 fded1caf80..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 Ximian, 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-bonobo-control.c b/calendar/gui/itip-bonobo-control.c
deleted file mode 100644
index 1fca85f10d..0000000000
--- a/calendar/gui/itip-bonobo-control.c
+++ /dev/null
@@ -1,255 +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 Ximian, 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 <glib.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-stream-client.h>
-#include <bonobo/bonobo-context.h>
-#include <ical.h>
-
-#include "e-itip-control.h"
-#include "itip-control-factory.h"
-
-extern gchar *evolution_dir;
-
-enum E_ITIP_BONOBO_ARGS {
- FROM_ADDRESS_ARG_ID,
-};
-
-/*
- * 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 + 1);
- memcpy (data + length, buffer->_buffer, buffer->_length);
- length += buffer->_length;
- data[length] = '\0';
-
- CORBA_free (buffer);
-#undef READ_CHUNK_SIZE
- } 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)
-{
- EItipControl *itip = data;
- gchar *text;
-
- 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 ((text = stream_read (stream)) == NULL) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_FileNotFound, NULL);
- return;
- }
-
- e_itip_control_set_data (itip, text);
- g_free (text);
-}
-/*
- * 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)
-{
- EItipControl *itip = data;
- gchar *text;
- gint len;
-
- 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;
- }
-
- text = e_itip_control_get_data (itip);
- len = e_itip_control_get_data_size (itip);
-
- bonobo_stream_client_write (stream, text, len, ev);
- g_free (text);
-} /* pstream_save */
-
-static CORBA_long
-pstream_get_max_size (BonoboPersistStream *ps, void *data,
- CORBA_Environment *ev)
-{
- EItipControl *itip = data;
- gint len;
-
- len = e_itip_control_get_data_size (itip);
-
- if (len > 0)
- return len;
-
- 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)
-{
- EItipControl *itip = user_data;
-
- switch (arg_id) {
- case FROM_ADDRESS_ARG_ID:
- BONOBO_ARG_SET_STRING (arg, e_itip_control_get_from_address (itip));
- break;
- }
-}
-
-static void
-set_prop ( BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- EItipControl *itip = user_data;
-
- switch (arg_id) {
- case FROM_ADDRESS_ARG_ID:
- e_itip_control_set_from_address (itip, BONOBO_ARG_GET_STRING (arg));
- break;
- }
-}
-
-
-static BonoboObject *
-itip_control_factory (BonoboGenericFactory *Factory, void *closure)
-{
- BonoboControl *control;
- BonoboPropertyBag *prop_bag;
- BonoboPersistStream *stream;
- GtkWidget *itip;
-
- itip = e_itip_control_new ();
- gtk_widget_show (itip);
- control = bonobo_control_new (itip);
-
- /* create a property bag */
- prop_bag = bonobo_property_bag_new (get_prop, set_prop, itip);
- bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL,
- "from_address", 0 );
-
- bonobo_control_set_properties (control, prop_bag);
- bonobo_object_unref (BONOBO_OBJECT (prop_bag));
-
- bonobo_control_set_automerge (control, TRUE);
-
- stream = bonobo_persist_stream_new (pstream_load, pstream_save,
- pstream_get_max_size,
- pstream_get_content_types,
- itip);
-
- 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
-itip_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (
- "OAFIID:GNOME_Evolution_Calendar_iTip_ControlFactory",
- itip_control_factory, NULL);
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));;
-
- if (factory == NULL)
- g_error ("I could not register an iTip control factory.");
-}
-
diff --git a/calendar/gui/itip-bonobo-control.h b/calendar/gui/itip-bonobo-control.h
deleted file mode 100644
index 799e65ca7a..0000000000
--- a/calendar/gui/itip-bonobo-control.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Control for displaying iTIP mail messages
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors:
- * Jesse Pavel <jpavel@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 __ITIP_CONTROL_FACTORY_H__
-#define __ITIP_CONTROL_FACTORY_H__
-
-void itip_control_factory_init (void);
-
-#endif /* __ITIP_CONTROL_H__ */
diff --git a/calendar/gui/itip-control-factory.c b/calendar/gui/itip-control-factory.c
deleted file mode 100644
index 1fca85f10d..0000000000
--- a/calendar/gui/itip-control-factory.c
+++ /dev/null
@@ -1,255 +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 Ximian, 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 <glib.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-stream-client.h>
-#include <bonobo/bonobo-context.h>
-#include <ical.h>
-
-#include "e-itip-control.h"
-#include "itip-control-factory.h"
-
-extern gchar *evolution_dir;
-
-enum E_ITIP_BONOBO_ARGS {
- FROM_ADDRESS_ARG_ID,
-};
-
-/*
- * 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 + 1);
- memcpy (data + length, buffer->_buffer, buffer->_length);
- length += buffer->_length;
- data[length] = '\0';
-
- CORBA_free (buffer);
-#undef READ_CHUNK_SIZE
- } 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)
-{
- EItipControl *itip = data;
- gchar *text;
-
- 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 ((text = stream_read (stream)) == NULL) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_FileNotFound, NULL);
- return;
- }
-
- e_itip_control_set_data (itip, text);
- g_free (text);
-}
-/*
- * 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)
-{
- EItipControl *itip = data;
- gchar *text;
- gint len;
-
- 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;
- }
-
- text = e_itip_control_get_data (itip);
- len = e_itip_control_get_data_size (itip);
-
- bonobo_stream_client_write (stream, text, len, ev);
- g_free (text);
-} /* pstream_save */
-
-static CORBA_long
-pstream_get_max_size (BonoboPersistStream *ps, void *data,
- CORBA_Environment *ev)
-{
- EItipControl *itip = data;
- gint len;
-
- len = e_itip_control_get_data_size (itip);
-
- if (len > 0)
- return len;
-
- 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)
-{
- EItipControl *itip = user_data;
-
- switch (arg_id) {
- case FROM_ADDRESS_ARG_ID:
- BONOBO_ARG_SET_STRING (arg, e_itip_control_get_from_address (itip));
- break;
- }
-}
-
-static void
-set_prop ( BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- EItipControl *itip = user_data;
-
- switch (arg_id) {
- case FROM_ADDRESS_ARG_ID:
- e_itip_control_set_from_address (itip, BONOBO_ARG_GET_STRING (arg));
- break;
- }
-}
-
-
-static BonoboObject *
-itip_control_factory (BonoboGenericFactory *Factory, void *closure)
-{
- BonoboControl *control;
- BonoboPropertyBag *prop_bag;
- BonoboPersistStream *stream;
- GtkWidget *itip;
-
- itip = e_itip_control_new ();
- gtk_widget_show (itip);
- control = bonobo_control_new (itip);
-
- /* create a property bag */
- prop_bag = bonobo_property_bag_new (get_prop, set_prop, itip);
- bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL,
- "from_address", 0 );
-
- bonobo_control_set_properties (control, prop_bag);
- bonobo_object_unref (BONOBO_OBJECT (prop_bag));
-
- bonobo_control_set_automerge (control, TRUE);
-
- stream = bonobo_persist_stream_new (pstream_load, pstream_save,
- pstream_get_max_size,
- pstream_get_content_types,
- itip);
-
- 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
-itip_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (
- "OAFIID:GNOME_Evolution_Calendar_iTip_ControlFactory",
- itip_control_factory, NULL);
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));;
-
- if (factory == NULL)
- g_error ("I could not register an iTip control factory.");
-}
-
diff --git a/calendar/gui/itip-control-factory.h b/calendar/gui/itip-control-factory.h
deleted file mode 100644
index 799e65ca7a..0000000000
--- a/calendar/gui/itip-control-factory.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Control for displaying iTIP mail messages
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors:
- * Jesse Pavel <jpavel@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 __ITIP_CONTROL_FACTORY_H__
-#define __ITIP_CONTROL_FACTORY_H__
-
-void itip_control_factory_init (void);
-
-#endif /* __ITIP_CONTROL_H__ */
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
deleted file mode 100644
index 092adeb541..0000000000
--- a/calendar/gui/itip-utils.c
+++ /dev/null
@@ -1,467 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * JP Rosevear <jpr@ximian.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-object-client.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <gtk/gtkwidget.h>
-#include <gal/util/e-util.h>
-#include <e-util/e-unicode-i18n.h>
-#include <ical.h>
-#include <Evolution-Composer.h>
-#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
-#include <cal-util/cal-util.h>
-#include "calendar-config.h"
-#include "itip-utils.h"
-
-#define GNOME_EVOLUTION_COMPOSER_OAFIID "OAFIID:GNOME_Evolution_Mail_Composer"
-
-static gchar *itip_methods[] = {
- "PUBLISH",
- "REQUEST",
- "REPLY",
- "ADD",
- "CANCEL",
- "RERESH",
- "COUNTER",
- "DECLINECOUNTER"
-};
-
-static icalproperty_method itip_methods_enum[] = {
- ICAL_METHOD_PUBLISH,
- ICAL_METHOD_REQUEST,
- ICAL_METHOD_REPLY,
- ICAL_METHOD_ADD,
- ICAL_METHOD_CANCEL,
- ICAL_METHOD_REFRESH,
- ICAL_METHOD_COUNTER,
- ICAL_METHOD_DECLINECOUNTER,
-};
-
-static void
-error_dialog (gchar *str)
-{
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog (str);
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
-}
-
-GList *
-itip_addresses_get (void)
-{
- static Bonobo_ConfigDatabase db = NULL;
- CORBA_Environment ev;
- GList *addresses = NULL;
- glong len, def, i;
-
- if (db == NULL) {
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:",
- "Bonobo/ConfigDatabase",
- &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
- }
-
- len = bonobo_config_get_long_with_default (db, "/Mail/Accounts/num", 0, NULL);
- def = bonobo_config_get_long_with_default (db, "/Mail/Accounts/default_account", 0, NULL);
-
- for (i = 0; i < len; i++) {
- ItipAddress *a;
- gchar *path;
-
- a = g_new0 (ItipAddress, 1);
-
- /* get the identity info */
- path = g_strdup_printf ("/Mail/Accounts/identity_name_%ld", i);
- a->name = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_address_%ld", i);
- a->address = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-
- if (i == def)
- a->default_address = TRUE;
-
- a->full = g_strdup_printf ("%s <%s>", a->name, a->address);
- addresses = g_list_append (addresses, a);
- }
-
- return addresses;
-}
-
-void
-itip_addresses_free (GList *addresses)
-{
- GList *l;
-
- for (l = addresses; l != NULL; l = l->next) {
- ItipAddress *a = l->data;
-
- g_free (a->name);
- g_free (a->address);
- g_free (a->full);
- g_free (a);
- }
- g_list_free (addresses);
-}
-
-const gchar *
-itip_strip_mailto (const gchar *address)
-{
- const gchar *text;
-
- if (address == NULL)
- return NULL;
-
- text = e_strstrcase (address, "mailto:");
- if (text != NULL && strlen (address) > 7)
- address += 7;
-
- return address;
-}
-
-static char *
-get_label (struct icaltimetype *tt)
-{
- char buffer[1000];
- struct tm tmp_tm = { 0 };
-
- tmp_tm.tm_year = tt->year - 1900;
- tmp_tm.tm_mon = tt->month - 1;
- tmp_tm.tm_mday = tt->day;
- tmp_tm.tm_hour = tt->hour;
- tmp_tm.tm_min = tt->minute;
- tmp_tm.tm_sec = tt->second;
- tmp_tm.tm_isdst = -1;
-
- tmp_tm.tm_wday = time_day_of_week (tt->day, tt->month - 1, tt->year);
-
- e_time_format_date_and_time (&tmp_tm,
- calendar_config_get_24_hour_format (),
- FALSE, FALSE,
- buffer, 1000);
-
- return g_strdup (buffer);
-}
-
-static void
-foreach_tzid_callback (icalparameter *param, gpointer data)
-{
- icalcomponent *icomp = data;
- const char *tzid;
- icaltimezone *zone;
- icalcomponent *vtimezone_comp;
-
- /* Get the TZID string from the parameter. */
- tzid = icalparameter_get_tzid (param);
- if (!tzid)
- return;
-
- /* Check if it is a builtin timezone. If it isn't, return. */
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (!zone)
- return;
-
- /* Convert it to a string and add it to the hash. */
- vtimezone_comp = icaltimezone_get_component (zone);
- if (!vtimezone_comp)
- return;
-
- icalcomponent_add_component (icomp, icalcomponent_new_clone (vtimezone_comp));
-}
-
-void
-itip_send_comp (CalComponentItipMethod method, CalComponent *comp)
-{
- BonoboObjectClient *bonobo_server;
- GNOME_Evolution_Composer composer_server;
- CORBA_Environment ev;
- GSList *attendees, *l;
- GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
- GNOME_Evolution_Composer_Recipient *recipient;
- CORBA_char *subject;
- gint cntr, len;
- CalComponentVType type;
- CalComponentText caltext;
- CalComponentOrganizer organizer;
- CORBA_char *content_type, *filename, *description;
- GNOME_Evolution_Composer_AttachmentData *attach_data;
- CORBA_boolean show_inline;
- char tempstr[200];
-
- CORBA_exception_init (&ev);
-
- /* Obtain an object reference for the Composer. */
- bonobo_server = bonobo_object_activate (GNOME_EVOLUTION_COMPOSER_OAFIID, 0);
- g_return_if_fail (bonobo_server != NULL);
-
- composer_server = BONOBO_OBJREF (bonobo_server);
-
- /* Type for later use */
- type = cal_component_get_vtype (comp);
-
- /* Create list of recipients */
- switch (method) {
- case CAL_COMPONENT_METHOD_REQUEST:
- case CAL_COMPONENT_METHOD_CANCEL:
- cal_component_get_attendee_list (comp, &attendees);
- len = g_slist_length (attendees);
-
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = len;
- to_list->_length = len;
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (len);
-
- for (cntr = 0, l = attendees; cntr < len; cntr++, l = l->next) {
- CalComponentAttendee *att = l->data;
-
- recipient = &(to_list->_buffer[cntr]);
- if (att->cn)
- recipient->name = CORBA_string_dup (att->cn);
- else
- recipient->name = CORBA_string_dup ("");
- recipient->address = CORBA_string_dup (itip_strip_mailto (att->value));
- }
- break;
-
- case CAL_COMPONENT_METHOD_REPLY:
- case CAL_COMPONENT_METHOD_ADD:
- case CAL_COMPONENT_METHOD_REFRESH:
- case CAL_COMPONENT_METHOD_COUNTER:
- case CAL_COMPONENT_METHOD_DECLINECOUNTER:
- cal_component_get_organizer (comp, &organizer);
- if (organizer.value == NULL) {
- error_dialog (_("An organizer must be set."));
- return;
- }
-
- len = 1;
-
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = len;
- to_list->_length = len;
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (len);
- recipient = &(to_list->_buffer[0]);
-
- if (organizer.cn != NULL)
- recipient->name = CORBA_string_dup (organizer.cn);
- else
- recipient->name = CORBA_string_dup ("");
- recipient->address = CORBA_string_dup (itip_strip_mailto (organizer.value));
- break;
-
- default:
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = to_list->_length = 0;
- break;
- }
-
- 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 information */
- cal_component_get_summary (comp, &caltext);
- if (caltext.value != NULL) {
- subject = CORBA_string_dup (caltext.value);
- } else {
- switch (type) {
- case CAL_COMPONENT_EVENT:
- subject = CORBA_string_dup ("Event information");
- break;
- case CAL_COMPONENT_TODO:
- subject = CORBA_string_dup ("Task information");
- break;
- case CAL_COMPONENT_JOURNAL:
- subject = CORBA_string_dup ("Journal information");
- break;
- case CAL_COMPONENT_FREEBUSY:
- subject = CORBA_string_dup ("Free/Busy information");
- break;
- default:
- subject = CORBA_string_dup ("Calendar information");
- }
- }
-
- /* Set recipients, subject */
- GNOME_Evolution_Composer_setHeaders (composer_server, to_list, cc_list, bcc_list, subject, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Unable to set composer headers while sending iTip message");
- CORBA_exception_free (&ev);
- return;
- }
-
- /* Content type, suggested file name, description */
- sprintf (tempstr, "text/calendar;METHOD=%s", itip_methods[method]);
- content_type = CORBA_string_dup (tempstr);
- if (type == CAL_COMPONENT_FREEBUSY)
- filename = CORBA_string_dup ("freebusy.ifb");
- else
- filename = CORBA_string_dup ("calendar.ics");
- switch (type) {
- case CAL_COMPONENT_EVENT:
- description = CORBA_string_dup ("Event information");
- break;
- case CAL_COMPONENT_TODO:
- description = CORBA_string_dup ("Task information");
- break;
- case CAL_COMPONENT_JOURNAL:
- description = CORBA_string_dup ("Journal information");
- break;
- case CAL_COMPONENT_FREEBUSY:
- {
- CalComponentDateTime dt;
- char *start = NULL, *end = NULL;
-
- cal_component_get_dtstart (comp, &dt);
- if (dt.value) {
- start = get_label (dt.value);
- cal_component_get_dtend (comp, &dt);
- if (dt.value)
- end = get_label (dt.value);
- }
- if (start != NULL && end != NULL) {
- snprintf (tempstr, 200, "Free/Busy information (%s to %s)", start, end);
- description = CORBA_string_dup (tempstr);
- g_free (start);
- g_free (end);
- } else {
- description = CORBA_string_dup ("Free/Busy information");
- }
- }
- break;
- default:
- description = CORBA_string_dup ("iCalendar information");
- }
- show_inline = FALSE;
-
- /* Create a top level component, and add our component */
- {
- CalComponent *clone;
- icalcomponent *icomp, *iclone;
- icalproperty *prop;
- icalvalue *value;
- gchar *ical_string;
-
- icomp = cal_util_new_top_level ();
-
- prop = icalproperty_new (ICAL_METHOD_PROPERTY);
- value = icalvalue_new_method (itip_methods_enum[method]);
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (icomp, prop);
-
- /* Strip alarms if necessary */
- clone = cal_component_clone (comp);
- if (method == CAL_COMPONENT_METHOD_REPLY
- || method == CAL_COMPONENT_METHOD_CANCEL
- || method == CAL_COMPONENT_METHOD_REFRESH
- || method == CAL_COMPONENT_METHOD_DECLINECOUNTER)
- cal_component_remove_all_alarms (clone);
-
- iclone = cal_component_get_icalcomponent (clone);
- icalcomponent_add_component (icomp, iclone);
-
- icalcomponent_foreach_tzid (iclone, foreach_tzid_callback, icomp);
-
- ical_string = icalcomponent_as_ical_string (icomp);
- attach_data = GNOME_Evolution_Composer_AttachmentData__alloc ();
- attach_data->_maximum = attach_data->_length = strlen (ical_string);
- attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
- strcpy (attach_data->_buffer, ical_string);
-
- icalcomponent_free (icomp);
- }
-
- GNOME_Evolution_Composer_attachData (composer_server,
- content_type, filename, description,
- show_inline, attach_data,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Unable to attach data to the composer while sending iTip message");
- CORBA_exception_free (&ev);
- return;
- }
-
- if (method == CAL_COMPONENT_METHOD_PUBLISH)
- GNOME_Evolution_Composer_show (composer_server, &ev);
- else
- GNOME_Evolution_Composer_send (composer_server, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Unable to show the composer while sending iTip message");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- /* 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)); */
-}
-
diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h
deleted file mode 100644
index 06108a4481..0000000000
--- a/calendar/gui/itip-utils.h
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#ifndef ITIP_UTILS_HEADER
-#define ITIP_UTILS_HEADER
-
-#include <ical.h>
-#include <string.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-typedef enum {
- CAL_COMPONENT_METHOD_PUBLISH,
- CAL_COMPONENT_METHOD_REQUEST,
- CAL_COMPONENT_METHOD_REPLY,
- CAL_COMPONENT_METHOD_ADD,
- CAL_COMPONENT_METHOD_CANCEL,
- CAL_COMPONENT_METHOD_REFRESH,
- CAL_COMPONENT_METHOD_COUNTER,
- CAL_COMPONENT_METHOD_DECLINECOUNTER
-} CalComponentItipMethod;
-
-typedef struct {
- gchar *name;
- gchar *address;
- gchar *full;
-
- gboolean default_address;
-} ItipAddress;
-
-GList *itip_addresses_get (void);
-void itip_addresses_free (GList *addresses);
-
-const gchar *itip_strip_mailto (const gchar *address);
-
-void itip_send_comp (CalComponentItipMethod method, CalComponent *comp);
-
-
-#endif
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
deleted file mode 100644
index 56b8550621..0000000000
--- a/calendar/gui/main.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* control-factory.c
- *
- * 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
- */
-
-#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 <libgnomevfs/gnome-vfs-init.h>
-#include <glade/glade.h>
-
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-generic-factory.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 "comp-editor-factory.h"
-#include "control-factory.h"
-#include "itip-control-factory.h"
-#include "tasks-control-factory.h"
-
-/* The component editor factory */
-static CompEditorFactory *comp_editor_factory = NULL;
-
-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"));
-}
-
-/* Factory function for the calendar component factory; just creates and
- * references a singleton service object.
- */
-static BonoboObject *
-comp_editor_factory_fn (BonoboGenericFactory *factory, void *data)
-{
- if (!comp_editor_factory) {
- comp_editor_factory = comp_editor_factory_new ();
- if (!comp_editor_factory)
- return NULL;
- }
-
- bonobo_object_ref (BONOBO_OBJECT (comp_editor_factory));
- return BONOBO_OBJECT (comp_editor_factory);
-}
-
-/* Creates and registers the component editor factory */
-static void
-component_editor_factory_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (
- "OAFIID:GNOME_Evolution_Calendar_CompEditorFactory_Factory",
- comp_editor_factory_fn, NULL);
- if (!factory)
- g_error (_("Could not create the component editor factory"));
-}
-
-int
-main (int argc, char **argv)
-{
- free (malloc (8));
-
- bindtextdomain(PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(PACKAGE);
-
- init_bonobo (argc, argv);
-
- if (!gnome_vfs_init ())
- g_error (_("Could not initialize gnome-vfs"));
-
- glade_gnome_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
-
- calendar_config_init ();
-
- control_factory_init ();
- component_factory_init ();
- itip_control_factory_init ();
- tasks_control_factory_init ();
- component_editor_factory_init ();
-
- bonobo_main ();
-
- alarm_done ();
- calendar_config_write_on_exit ();
-
- gnome_vfs_shutdown ();
-
- return 0;
-}
diff --git a/calendar/gui/meeting-mockup.glade b/calendar/gui/meeting-mockup.glade
deleted file mode 100644
index 09f93af99f..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>Atten_dees</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 f5b0dad825..0000000000
--- a/calendar/gui/print.c
+++ /dev/null
@@ -1,2437 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Print support
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Damon Chaplin <damon@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 <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 <libgnomeui/gnome-paper-selector.h>
-#include <libgnomeui/gnome-stock.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 <e-util/e-time-utils.h>
-#include <e-util/e-unicode-i18n.h>
-#include <gal/widgets/e-unicode.h>
-#include <cal-util/timeutil.h>
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "e-day-view.h"
-#include "e-day-view-layout.h"
-#include "e-week-view.h"
-#include "e-week-view-layout.h"
-#include "gnome-cal.h"
-#include "print.h"
-
-
-
-/*
- * Note that most dimensions are in points (1/72 of an inch) since that is
- * what gnome-print uses.
- */
-
-/* The font size to use for normal text. */
-#define DAY_NORMAL_FONT_SIZE 12
-#define WEEK_NORMAL_FONT_SIZE 12
-#define MONTH_NORMAL_FONT_SIZE 8
-
-/* The height of the header bar across the top of the Day, Week & Month views,
- which contains the dates shown and the 2 small calendar months. */
-#define HEADER_HEIGHT 80
-
-/* The width of the small calendar months, the space from the right edge of
- the header rectangle, and the space between the months. */
-#define SMALL_MONTH_WIDTH 80
-#define SMALL_MONTH_PAD 4
-#define SMALL_MONTH_SPACING 12
-
-/* The minimum number of rows we leave space for for the long events in the
- day view. */
-#define DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY 2
-
-/* The row height for long events in the day view. */
-#define DAY_VIEW_ROW_HEIGHT 20
-
-/* The minutes per row in the day view printout. */
-#define DAY_VIEW_MINS_PER_ROW 30
-
-#define DAY_VIEW_ROWS ((60 / DAY_VIEW_MINS_PER_ROW) * 24)
-
-/* The width of the column with all the times in it. */
-#define DAY_VIEW_TIME_COLUMN_WIDTH 36
-
-/* The space on the right of each event. */
-#define DAY_VIEW_EVENT_X_PAD 8
-
-/* Allowance for small errors in floating point comparisons. */
-#define EPSILON 0.01
-
-/* 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 SEPT_1752_START 2 /* Start day within month */
-#define SEPT_1752_END 20 /* End day within month */
-
-
-struct pdinfo
-{
- gint days_shown;
- time_t day_starts[E_DAY_VIEW_MAX_DAYS + 1];
-
- GArray *long_events;
- GArray *events[E_DAY_VIEW_MAX_DAYS];
-
- gint start_hour;
- gint end_hour;
- gint start_minute_offset;
- gint end_minute_offset;
- gint rows;
- gint mins_per_row;
- gint8 cols_per_row[DAY_VIEW_ROWS];
- gboolean use_24_hour_format;
-};
-
-struct psinfo
-{
- gint days_shown;
- time_t day_starts[E_WEEK_VIEW_MAX_WEEKS * 7 + 1];
-
- GArray *events;
-
- int rows_per_cell;
- int rows_per_compressed_cell;
- int display_start_weekday;
- gboolean multi_week_view;
- int weeks_shown;
- int month;
- gboolean compress_weekend;
- gboolean use_24_hour_format;
- double row_height;
- double header_row_height;
-};
-
-struct ptinfo
-{
- GList *todos;
-};
-
-struct einfo
-{
- char *text;
- time_t start;
- time_t end;
- int count;
-};
-
-static const GnomePaper *paper_info = NULL;
-
-
-/* Convenience function to help the transition to timezone functions.
- It returns the current timezone. */
-static icaltimezone*
-get_timezone (void)
-{
- char *location = calendar_config_get_timezone ();
- return icaltimezone_get_builtin_timezone (location);
-}
-
-
-/* Convenience function to help the transition to timezone functions.
- It converts a time_t to a struct tm. */
-static struct tm*
-convert_timet_to_struct_tm (time_t time, icaltimezone *zone)
-{
- static struct tm my_tm;
- struct icaltimetype tt;
-
- /* Convert it to an icaltimetype. */
- tt = icaltime_from_timet_with_zone (time, FALSE, zone);
-
- /* Fill in the struct tm. */
- my_tm.tm_year = tt.year - 1900;
- my_tm.tm_mon = tt.month - 1;
- my_tm.tm_mday = tt.day;
- my_tm.tm_hour = tt.hour;
- my_tm.tm_min = tt.minute;
- my_tm.tm_sec = tt.second;
- my_tm.tm_isdst = tt.is_daylight;
-
- my_tm.tm_wday = time_day_of_week (tt.day, tt.month - 1, tt.year);
-
- return &my_tm;
-}
-
-
-/* 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 *days, int *start, int *end)
-{
- int i;
- int d_month, d_week, week_start_day;
-
- /* 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 = time_days_in_month (year, month);
- /* Get the start weekday in the month, 0=Sun to 6=Sat. */
- d_week = time_day_of_week (1, month, year);
-
- /* Get the configuration setting specifying which weekday we put on
- the left column, 0=Sun to 6=Sat. */
- week_start_day = calendar_config_get_week_start_day ();
-
- /* Figure out which square we want to put the 1 in. */
- d_week = (d_week + 7 - week_start_day) % 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_CENTER,
- ALIGN_BORDER= 1<<8
-};
-
-
-/* Prints a rectangle, with or without a border, filled or outline, and
- possibly with triangular arrows at one or both horizontal edges.
- width = width of border, -ve means no border.
- fillcolor = shade of fill, -ve means no fill.
- left_triangle_width, right_triangle_width = width from edge of rectangle to
- point of triangle, or -ve for no triangle. */
-static void
-print_border_with_triangles (GnomePrintContext *pc,
- double l, double r, double t, double b,
- double width, double fillcolor,
- double left_triangle_width,
- double right_triangle_width)
-{
- gnome_print_gsave (pc);
-
- /* Fill in the interior of the rectangle, if desired. */
- if (fillcolor >= -EPSILON) {
- gnome_print_moveto (pc, l, t);
- if (left_triangle_width > 0.0)
- gnome_print_lineto (pc, l - left_triangle_width,
- (t + b) / 2);
- gnome_print_lineto (pc, l, b);
- gnome_print_lineto (pc, r, b);
- if (right_triangle_width > 0.0)
- gnome_print_lineto (pc, r + right_triangle_width,
- (t + b) / 2);
- gnome_print_lineto (pc, r, t);
- gnome_print_closepath (pc);
- gnome_print_setrgbcolor (pc, fillcolor, fillcolor,
- fillcolor);
- gnome_print_fill (pc);
- }
-
- /* Draw the outline, if desired. */
- if (width >= -EPSILON) {
- gnome_print_moveto (pc, l, t);
- if (left_triangle_width > 0.0)
- gnome_print_lineto (pc, l - left_triangle_width,
- (t + b) / 2);
- gnome_print_lineto (pc, l, b);
- gnome_print_lineto (pc, r, b);
- if (right_triangle_width > 0.0)
- gnome_print_lineto (pc, r + right_triangle_width,
- (t + b) / 2);
- gnome_print_lineto (pc, r, t);
- gnome_print_closepath (pc);
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- gnome_print_setlinewidth (pc, width);
- gnome_print_stroke (pc);
- }
-
- gnome_print_grestore (pc);
-}
-
-
-/* Prints a rectangle, with or without a border, and filled or outline.
- width = width of border, -ve means no border.
- fillcolor = shade of fill, -ve means no fill. */
-static void
-print_border (GnomePrintContext *pc,
- double l, double r, double t, double b,
- double width, double fillcolor)
-{
- print_border_with_triangles (pc, l, r, t, b, width, fillcolor,
- -1.0, -1.0);
-}
-
-
-/* Prints 1 line of aligned text in a box. It is centered vertically, and
- the horizontal alignment can be either ALIGN_LEFT, ALIGN_RIGHT, or
- ALIGN_CENTER. */
-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, y;
-
- gnome_print_gsave (pc);
-
- w = gnome_font_get_width_string (font, text);
-
- switch (align & 3) {
- case ALIGN_LEFT:
- default:
- x = l;
- break;
- case ALIGN_RIGHT:
- x = r - w;
- break;
- case ALIGN_CENTER:
- x = l + ((r - l) - w) / 2;
- break;
- }
-
- /* Make sure we don't go off the left edge. */
- x = MAX (l, x);
-
- /* Calculate the top of where the text should be. */
- y = (t + b + gnome_font_get_size (font)) / 2;
-
- /* Now calculate the baseline. */
- y -= gnome_font_get_ascender (font) + 1;
-
- /* Set a clipping rectangle. */
- gnome_print_moveto (pc, l, t);
- gnome_print_lineto (pc, r, t);
- gnome_print_lineto (pc, r, b);
- gnome_print_lineto (pc, l, b);
- gnome_print_closepath (pc);
- gnome_print_clip (pc);
-
- gnome_print_newpath (pc);
- gnome_print_moveto (pc, x, y);
- 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)
-{
- double size;
-
- size = gnome_font_get_size (font);
-
- if (align & ALIGN_BORDER) {
- print_border (pc, *l, *r, *t, *t - size * 1.4,
- linewidth, 0.9);
- print_border (pc, *l, *r, *t - size * 1.4, *b,
- linewidth, -1.0);
-
- *l += 2;
- *r -= 2;
- *b += 2;
- }
-
- print_text (pc, font, text, align, *l, *r, *t, *t - size * 1.4);
- *t -= size * 1.4;
-}
-
-enum datefmt {
- DATE_MONTH = 1 << 0,
- DATE_DAY = 1 << 1,
- DATE_DAYNAME = 1 << 2,
- DATE_YEAR = 1 << 3
-};
-
-static char *days[] = {
- N_("1st"), N_("2nd"), N_("3rd"), N_("4th"), N_("5th"),
- N_("6th"), N_("7th"), N_("8th"), N_("9th"), N_("10th"),
- N_("11th"), N_("12th"), N_("13th"), N_("14th"), N_("15th"),
- N_("16th"), N_("17th"), N_("18th"), N_("19th"), N_("20th"),
- N_("21st"), N_("22nd"), N_("23rd"), N_("24th"), N_("25th"),
- N_("26th"), N_("27th"), N_("28th"), N_("29th"), N_("30th"),
- N_("31st")
-};
-
-/*
- format the date 'nicely' and consistently for various headers
-*/
-static char *
-format_date(time_t time, int flags, char *buffer, int bufflen)
-{
- icaltimezone *zone = get_timezone ();
- char fmt[64];
- struct tm tm;
- char *utf_str;
-
- tm = *convert_timet_to_struct_tm (time, zone);
-
- 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);
- utf_str = e_utf8_from_locale_string (buffer);
- strncpy (buffer, utf_str, bufflen - 1);
- buffer[bufflen - 1] = '\0';
- g_free (utf_str);
- 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)
-{
- icaltimezone *zone = get_timezone ();
- CalClient *client;
- GnomeFont *font, *font_bold, *font_normal;
- time_t now, next;
- int x, y;
- int days[42];
- int day, weekday, week_start_day;
- char buf[100];
- struct tm tm;
- double font_size, max_font_size;
- double header_size, col_width, row_height, text_xpad, w;
- double cell_top, cell_bottom, cell_left, cell_right, text_right;
- char *daynames[] = { N_("Su"), N_("Mo"), N_("Tu"), N_("We"),
- N_("Th"), N_("Fr"), N_("Sa") };
-
- /* Print the title, e.g. 'June 2001', in the top 16% of the area. */
- format_date (month, titleflags, buf, 100);
- header_size = (top - bottom) * 0.16;
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, FALSE,
- header_size * 0.8);
- if (bordertitle) {
- print_border (pc, left, right, top, top - header_size,
- 1.0, 0.9);
- }
- print_text (pc, font, buf, ALIGN_CENTER, left, right,
- top - header_size * 0.1, top - header_size);
- gtk_object_unref (GTK_OBJECT (font));
-
- top -= header_size;
-
- client = gnome_calendar_get_cal_client (gcal);
-
- col_width = (right - left) / 7;
-
- /* The top row with the day abbreviations gets an extra bit of
- vertical space around it. */
- row_height = (top - bottom) / 7.4;
-
- /* First we need to calculate a reasonable font size. We start with a
- rough guess of just under the height of each row. */
- font_size = row_height * 0.9;
-
- /* Check that it isn't going to be too wide. The characters are about
- twice as high as they are wide, but we need to fit two characters
- into each cell, so we don't want to go over col_width. */
- max_font_size = col_width * 0.65;
-
- font_size = MIN (font_size, max_font_size);
-
-
- /* get month days */
- tm = *convert_timet_to_struct_tm (month, zone);
- build_month (tm.tm_mon, tm.tm_year + 1900, days, 0, 0);
-
- font_normal = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0,
- font_size);
- font_bold = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0,
- font_size);
-
- /* Get a reasonable estimate of the largest number we will need,
- and use it to calculate the offset from the right edge of the
- cell that we should put the numbers. */
- w = gnome_font_get_width_string (font_bold, "23");
- text_xpad = (col_width - w) / 2;
-
- gnome_print_setrgbcolor (pc, 0, 0, 0);
-
- /* Print the abbreviated day names across the top in bold. */
- week_start_day = calendar_config_get_week_start_day ();
- weekday = week_start_day;
- for (x = 0; x < 7; x++) {
- print_text (pc, font_bold, U_(daynames[weekday]), ALIGN_CENTER,
- left + x * col_width, left + (x + 1) * col_width,
- top, top - row_height * 1.4);
- weekday = (weekday + 1) % 7;
- }
-
- top -= row_height * 1.4;
-
- now = time_month_begin_with_zone (month, zone);
- for (y = 0; y < 6; y++) {
-
- cell_top = top - y * row_height;
- cell_bottom = cell_top - row_height;
-
- for (x = 0; x < 7; x++) {
-
- cell_left = left + x * col_width;
- /* We add a 0.05 to make sure the cells meet up with
- each other. Otherwise you sometimes get lines
- between them which looks bad. Maybe I'm not using
- coords in the way gnome-print expects. */
- cell_right = cell_left + col_width + 0.05;
- text_right = cell_right - text_xpad;
-
- 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_with_zone (now, zone));
- font = uids ? font_bold : font_normal;
- cal_obj_uid_list_free (uids);
-
- next = time_add_day_with_zone (now, 1, zone);
- if ((now >= greystart && now < greyend)
- || (greystart >= now && greystart < next)) {
- print_border (pc,
- cell_left, cell_right,
- cell_top, cell_bottom,
- -1.0, 0.75);
- }
- print_text (pc, font, buf, ALIGN_RIGHT,
- cell_left, text_right,
- cell_top, cell_bottom);
-
- 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;
-}
-
-
-/* Draw the borders, lines, and times down the left of the day view. */
-static void
-print_day_background (GnomePrintContext *pc, GnomeCalendar *gcal,
- time_t whence, struct pdinfo *pdi,
- double left, double right, double top, double bottom)
-{
- GnomeFont *font_hour, *font_minute;
- double yinc, y;
- double width = DAY_VIEW_TIME_COLUMN_WIDTH;
- double font_size, max_font_size, hour_font_size, minute_font_size;
- char buf[20];
- const char *minute;
- gboolean use_24_hour;
- int i, hour, row;
-
- /* Fill the time column in light-gray. */
- print_border (pc, left, left + width, top, bottom, -1.0, 0.9);
-
- /* Draw the border around the entire view. */
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- print_border (pc, left, right, top, bottom, 1.0, -1.0);
-
- /* Draw the vertical line on the right of the time column. */
- gnome_print_setlinewidth (pc, 0.0);
- gnome_print_moveto (pc, left + width, bottom);
- gnome_print_lineto (pc, left + width, top);
- gnome_print_stroke (pc);
-
- /* Calculate the row height. */
- yinc = (top - bottom) / (pdi->end_hour - pdi->start_hour);
-
- /* Get the 2 fonts we need. */
- font_size = yinc * 0.6;
- max_font_size = width * 0.5;
- font_size = MIN (font_size, max_font_size);
- font_hour = gnome_font_new_closest ("Times", GNOME_FONT_BOLD,
- 0, font_size);
- hour_font_size = gnome_font_get_size (font_hour);
-
- font_size = yinc * 0.33;
- max_font_size = width * 0.25;
- font_size = MIN (font_size, max_font_size);
- font_minute = gnome_font_new_closest ("Times", GNOME_FONT_BOOK,
- 0, font_size);
- minute_font_size = gnome_font_get_size (font_minute);
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- row = 0;
- for (i = pdi->start_hour; i < pdi->end_hour; i++) {
- y = top - yinc * (row + 1);
- gnome_print_setrgbcolor (pc, 0, 0, 0);
-
- if (use_24_hour) {
- hour = i;
- minute = "00";
- } else {
- if (i < 12)
- minute = U_("am");
- else
- minute = U_("pm");
-
- hour = i % 12;
- if (hour == 0)
- hour = 12;
- }
-
- /* the hour label/minute */
- sprintf (buf, "%d", hour);
- print_text (pc, font_hour, buf, ALIGN_RIGHT,
- left, left + width * 0.58,
- y + yinc - 4, y + yinc - 4 - hour_font_size);
- print_text (pc, font_minute, minute, ALIGN_RIGHT,
- left, left + width - 3,
- y + yinc - 3, y + yinc - 3 - minute_font_size);
-
- /* Draw the horizontal line between hours, across the entire
- width of the day view. */
- gnome_print_moveto (pc, left, y);
- gnome_print_lineto (pc, right, y);
- gnome_print_stroke (pc);
-
- /* Draw the horizontal line for the 1/2-hours, across the
- entire width except for part of the time column. */
- gnome_print_moveto (pc, left + width * 0.6, y + yinc / 2);
- gnome_print_lineto (pc, right, y + yinc / 2);
- gnome_print_stroke (pc);
-
- row++;
- }
-
- gtk_object_unref (GTK_OBJECT (font_hour));
- gtk_object_unref (GTK_OBJECT (font_minute));
-}
-
-
-/* This adds one event to the view, adding it to the appropriate array. */
-static gint
-print_day_add_event (CalComponent *comp,
- time_t start,
- time_t end,
- gint days_shown,
- time_t *day_starts,
- GArray *long_events,
- GArray **events)
-
-{
- icaltimezone *zone = get_timezone ();
- EDayViewEvent event;
- gint day, offset;
- struct icaltimetype start_tt, end_tt;
-
-#if 0
- g_print ("Day view lower: %s", ctime (&day_starts[0]));
- g_print ("Day view upper: %s", ctime (&day_starts[days_shown]));
- 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, -1);
- g_return_val_if_fail (start < day_starts[days_shown], -1);
- g_return_val_if_fail (end > day_starts[0], -1);
-
- start_tt = icaltime_from_timet_with_zone (start, FALSE, zone);
- end_tt = icaltime_from_timet_with_zone (end, FALSE, zone);
-
- 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;*/
- offset = 0;
- event.start_minute = start_tt.hour * 60 + start_tt.minute - offset;
- event.end_minute = end_tt.hour * 60 + end_tt.minute - offset;
-
- event.start_row_or_col = 0;
- event.num_columns = 0;
-
- /* Find out which array to add the event to. */
- for (day = 0; day < days_shown; day++) {
- if (start >= day_starts[day] && end <= day_starts[day + 1]) {
-
- /* Special case for when the appointment ends at
- midnight, i.e. the start of the next day. */
- if (end == 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_starts[day])
- break;
-
- event.end_minute = 24 * 60;
- }
-
- g_array_append_val (events[day], event);
- return day;
- }
- }
-
- /* 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 (long_events, event);
- return E_DAY_VIEW_LONG_EVENT;
-}
-
-
-static gboolean
-print_day_details_cb (CalComponent *comp, time_t istart, time_t iend,
- gpointer data)
-{
- struct pdinfo *pdi = (struct pdinfo *)data;
-
- print_day_add_event (comp, istart, iend,
- pdi->days_shown, pdi->day_starts,
- pdi->long_events, pdi->events);
-
- return TRUE;
-}
-
-
-static void
-free_event_array (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);
-}
-
-
-static void
-print_day_long_event (GnomePrintContext *pc, GnomeFont *font,
- double left, double right, double top, double bottom,
- double row_height, EDayViewEvent *event,
- struct pdinfo *pdi)
-{
- CalComponentText summary;
- double x1, x2, y1, y2;
- double left_triangle_width = -1.0, right_triangle_width = -1.0;
- char *text;
- char buffer[32];
- struct tm date_tm;
-
- /* If the event starts before the first day being printed, draw a
- triangle. (Note that I am assuming we are just showing 1 day at
- the moment.) */
- if (event->start < pdi->day_starts[0])
- left_triangle_width = 4;
-
- /* If the event ends after the last day being printed, draw a
- triangle. */
- if (event->end > pdi->day_starts[1])
- right_triangle_width = 4;
-
- x1 = left + 10;
- x2 = right - 10;
- y1 = top - event->start_row_or_col * row_height - 4;
- y2 = y1 - row_height + 4;
- print_border_with_triangles (pc, x1, x2, y1, y2, 0.5, 0.95,
- left_triangle_width,
- right_triangle_width);
-
- /* If the event starts after the first day being printed, we need to
- print the start time. */
- if (event->start > pdi->day_starts[0]) {
- date_tm.tm_year = 2001;
- date_tm.tm_mon = 0;
- date_tm.tm_mday = 1;
- date_tm.tm_hour = event->start_minute / 60;
- date_tm.tm_min = event->start_minute % 60;
- date_tm.tm_sec = 0;
- date_tm.tm_isdst = -1;
-
- e_time_format_time (&date_tm, pdi->use_24_hour_format, FALSE,
- buffer, sizeof (buffer));
-
- x1 += 4;
- print_text (pc, font, buffer, ALIGN_LEFT, x1, x2, y1, y2);
- x1 += gnome_font_get_width_string (font, buffer);
- }
-
- /* If the event ends before the end of the last day being printed,
- we need to print the end time. */
- if (event->end < pdi->day_starts[1]) {
- date_tm.tm_year = 2001;
- date_tm.tm_mon = 0;
- date_tm.tm_mday = 1;
- date_tm.tm_hour = event->end_minute / 60;
- date_tm.tm_min = event->end_minute % 60;
- date_tm.tm_sec = 0;
- date_tm.tm_isdst = -1;
-
- e_time_format_time (&date_tm, pdi->use_24_hour_format, FALSE,
- buffer, sizeof (buffer));
-
- x2 -= 4;
- print_text (pc, font, buffer, ALIGN_RIGHT, x1, x2, y1, y2);
- x2 -= gnome_font_get_width_string (font, buffer);
- }
-
- /* Print the text. */
- cal_component_get_summary (event->comp, &summary);
- text = summary.value ? (char*) summary.value : "";
-
- x1 += 4;
- x2 -= 4;
- print_text (pc, font, text, ALIGN_CENTER, x1, x2, y1, y2);
-}
-
-
-static void
-print_day_event (GnomePrintContext *pc, GnomeFont *font,
- double left, double right, double top, double bottom,
- EDayViewEvent *event, struct pdinfo *pdi)
-{
- CalComponentText summary;
- double x1, x2, y1, y2, col_width, row_height;
- int start_offset, end_offset, start_row, end_row;
- char *text, start_buffer[32], end_buffer[32];
- gboolean display_times = FALSE, free_text = FALSE;
- struct tm date_tm;
-
- if ((event->start_minute >= pdi->end_minute_offset)
- || (event->end_minute <= pdi->start_minute_offset))
- return;
-
- start_offset = event->start_minute - pdi->start_minute_offset;
- end_offset = event->end_minute - pdi->start_minute_offset;
-
- start_row = start_offset / pdi->mins_per_row;
- start_row = MAX (0, start_row);
- end_row = (end_offset - 1) / pdi->mins_per_row;
- end_row = MIN (pdi->rows - 1, end_row);
- col_width = (right - left) / pdi->cols_per_row[event->start_minute / pdi->mins_per_row];
-
- if (start_offset != start_row * pdi->mins_per_row
- || end_offset != (end_row + 1) * pdi->mins_per_row)
- display_times = TRUE;
-
- x1 = left + event->start_row_or_col * col_width;
- x2 = x1 + event->num_columns * col_width - DAY_VIEW_EVENT_X_PAD;
-
- row_height = (top - bottom) / pdi->rows;
- y1 = top - start_row * row_height;
- y2 = top - (end_row + 1) * row_height;
-
-#if 0
- g_print ("Event: %g,%g %g,%g\n row_height: %g start_row: %i top: %g rows: %i\n",
- x1, y1, x2, y2, row_height, start_row, top, pdi->rows);
-#endif
-
- print_border (pc, x1, x2, y1, y2, 1.0, 0.95);
-
- cal_component_get_summary (event->comp, &summary);
- text = summary.value ? (char*) summary.value : "";
-
-
- if (display_times) {
- date_tm.tm_year = 2001;
- date_tm.tm_mon = 0;
- date_tm.tm_mday = 1;
- date_tm.tm_hour = event->start_minute / 60;
- date_tm.tm_min = event->start_minute % 60;
- date_tm.tm_sec = 0;
- date_tm.tm_isdst = -1;
-
- e_time_format_time (&date_tm, pdi->use_24_hour_format, FALSE,
- start_buffer, sizeof (start_buffer));
-
- date_tm.tm_hour = event->end_minute / 60;
- date_tm.tm_min = event->end_minute % 60;
-
- e_time_format_time (&date_tm, pdi->use_24_hour_format, FALSE,
- end_buffer, sizeof (end_buffer));
-
- text = g_strdup_printf ("%s - %s %s ", start_buffer,
- end_buffer, text);
-
- free_text = TRUE;
- }
-
- bound_text (pc, font, text, x1 + 2, x2 - 2, y1, y2, 0);
-
- if (free_text)
- g_free (text);
-}
-
-
-static void
-print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- CalClient *client;
- EDayViewEvent *event;
- GnomeFont *font;
- time_t start, end;
- struct pdinfo pdi;
- gint rows_in_top_display, i;
- double font_size, max_font_size;
-
- start = time_day_begin_with_zone (whence, zone);
- end = time_day_end_with_zone (start, zone);
-
- pdi.days_shown = 1;
- pdi.day_starts[0] = start;
- pdi.day_starts[1] = end;
- pdi.long_events = g_array_new (FALSE, FALSE, sizeof (EDayViewEvent));
- pdi.events[0] = g_array_new (FALSE, FALSE, sizeof (EDayViewEvent));
- pdi.start_hour = calendar_config_get_day_start_hour ();
- pdi.end_hour = calendar_config_get_day_end_hour ();
- if (calendar_config_get_day_end_minute () != 0)
- pdi.end_hour++;
- pdi.rows = (pdi.end_hour - pdi.start_hour) * 2;
- pdi.mins_per_row = 30;
- pdi.start_minute_offset = pdi.start_hour * 60;
- pdi.end_minute_offset = pdi.end_hour * 60;
- pdi.use_24_hour_format = calendar_config_get_24_hour_format ();
-
- /* Get the events from the server. */
- client = gnome_calendar_get_cal_client (gcal);
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT, start, end,
- print_day_details_cb, &pdi);
- qsort (pdi.long_events->data, pdi.long_events->len,
- sizeof (EDayViewEvent), e_day_view_event_sort_func);
- qsort (pdi.events[0]->data, pdi.events[0]->len,
- sizeof (EDayViewEvent), e_day_view_event_sort_func);
-
- /* Lay them out the long events, across the top of the page. */
- e_day_view_layout_long_events (pdi.long_events, pdi.days_shown,
- pdi.day_starts, &rows_in_top_display);
-
- /* Print the long events. */
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, 12);
- for (i = 0; i < pdi.long_events->len; i++) {
- event = &g_array_index (pdi.long_events, EDayViewEvent, i);
- print_day_long_event (pc, font, left, right, top, bottom,
- DAY_VIEW_ROW_HEIGHT, event, &pdi);
- }
- gtk_object_unref (GTK_OBJECT (font));
-
- /* We always leave space for DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY in the
- top display, but we may have more rows than that, in which case
- the main display area will be compressed. */
- rows_in_top_display = MAX (rows_in_top_display,
- DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY);
-
- /* Draw the border around the long events. */
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- print_border (pc, left, right,
- top, top - rows_in_top_display * DAY_VIEW_ROW_HEIGHT - 4,
- 1.0, -1.0);
-
- /* Adjust the area containing the main display. */
- top -= rows_in_top_display * DAY_VIEW_ROW_HEIGHT + 4;
-
- /* Draw the borders, lines, and times down the left. */
- print_day_background (pc, gcal, whence, &pdi,
- left, right, top, bottom);
-
- /* Now adjust to get rid of the time column. */
- left += DAY_VIEW_TIME_COLUMN_WIDTH;
-
- /* Lay out the short events, within the day. */
- e_day_view_layout_day_events (pdi.events[0], DAY_VIEW_ROWS,
- DAY_VIEW_MINS_PER_ROW, pdi.cols_per_row);
-
- /* Print the short events. */
- max_font_size = ((top - bottom) / pdi.rows) - 4;
- font_size = MIN (DAY_NORMAL_FONT_SIZE, max_font_size);
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, font_size);
- for (i = 0; i < pdi.events[0]->len; i++) {
- event = &g_array_index (pdi.events[0], EDayViewEvent, i);
- print_day_event (pc, font, left, right, top, bottom,
- event, &pdi);
- }
- gtk_object_unref (GTK_OBJECT (font));
-
- /* Free everything. */
- free_event_array (pdi.long_events);
- g_array_free (pdi.long_events, TRUE);
- free_event_array (pdi.events[0]);
- g_array_free (pdi.events[0], TRUE);
-}
-
-
-/* This adds one event to the view, adding it to the appropriate array. */
-static gboolean
-print_week_summary_cb (CalComponent *comp,
- time_t start,
- time_t end,
- gpointer data)
-
-{
- icaltimezone *zone = get_timezone ();
- EWeekViewEvent event;
- struct icaltimetype start_tt, end_tt;
-
- struct psinfo *psi = (struct psinfo *)data;
-
- /* Check that the event times are valid. */
-
-#if 0
- g_print ("View start:%li end:%li Event start:%li end:%li\n",
- psi->day_starts[0], psi->day_starts[psi->days_shown],
- start, end);
-#endif
-
- g_return_val_if_fail (start <= end, TRUE);
- g_return_val_if_fail (start < psi->day_starts[psi->days_shown], TRUE);
- g_return_val_if_fail (end > psi->day_starts[0], TRUE);
-
- start_tt = icaltime_from_timet_with_zone (start, FALSE, zone);
- end_tt = icaltime_from_timet_with_zone (end, FALSE, zone);
-
- 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_tt.hour * 60 + start_tt.minute;
- event.end_minute = end_tt.hour * 60 + end_tt.minute;
- if (event.end_minute == 0 && start != end)
- event.end_minute = 24 * 60;
-
- g_array_append_val (psi->events, event);
-
- return TRUE;
-}
-
-
-/* Returns TRUE if the event is a one-day event (i.e. not a long event). */
-static gboolean
-print_is_one_day_week_event (EWeekViewEvent *event,
- EWeekViewEventSpan *span,
- time_t *day_starts)
-{
- if (event->start == day_starts[span->start_day]
- && event->end == day_starts[span->start_day + 1])
- return FALSE;
-
- if (span->num_days == 1
- && event->start >= day_starts[span->start_day]
- && event->end <= day_starts[span->start_day + 1])
- return TRUE;
-
- return FALSE;
-}
-
-
-static void
-print_week_long_event (GnomePrintContext *pc, GnomeFont *font,
- struct psinfo *psi,
- double x1, double x2, double y1, double y2,
- EWeekViewEvent *event, EWeekViewEventSpan *span,
- char *text)
-{
- double left_triangle_width = -1.0, right_triangle_width = -1.0;
- struct tm date_tm;
- char buffer[32];
-
- /* If the event starts before the first day of the span, draw a
- triangle to indicate it continues. */
- if (event->start < psi->day_starts[span->start_day])
- left_triangle_width = 4;
-
- /* If the event ends after the last day of the span, draw a
- triangle. */
- if (event->end > psi->day_starts[span->start_day + span->num_days])
- right_triangle_width = 4;
-
- print_border_with_triangles (pc, x1, x2, y1, y2, 0.5, 0.9,
- left_triangle_width,
- right_triangle_width);
-
- /* If the event starts after the first day being printed, we need to
- print the start time. */
- if (event->start > psi->day_starts[span->start_day]) {
- date_tm.tm_year = 2001;
- date_tm.tm_mon = 0;
- date_tm.tm_mday = 1;
- date_tm.tm_hour = event->start_minute / 60;
- date_tm.tm_min = event->start_minute % 60;
- date_tm.tm_sec = 0;
- date_tm.tm_isdst = -1;
-
- e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE,
- buffer, sizeof (buffer));
-
- x1 += 4;
- print_text (pc, font, buffer, ALIGN_LEFT, x1, x2, y1, y2);
- x1 += gnome_font_get_width_string (font, buffer);
- }
-
- /* If the event ends before the end of the last day being printed,
- we need to print the end time. */
- if (event->end < psi->day_starts[span->start_day + span->num_days]) {
- date_tm.tm_year = 2001;
- date_tm.tm_mon = 0;
- date_tm.tm_mday = 1;
- date_tm.tm_hour = event->end_minute / 60;
- date_tm.tm_min = event->end_minute % 60;
- date_tm.tm_sec = 0;
- date_tm.tm_isdst = -1;
-
- e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE,
- buffer, sizeof (buffer));
-
- x2 -= 4;
- print_text (pc, font, buffer, ALIGN_RIGHT, x1, x2, y1, y2);
- x2 -= gnome_font_get_width_string (font, buffer);
- }
-
- x1 += 4;
- x2 -= 4;
- print_text (pc, font, text, ALIGN_CENTER, x1, x2, y1, y2);
-}
-
-
-static void
-print_week_day_event (GnomePrintContext *pc, GnomeFont *font,
- struct psinfo *psi,
- double x1, double x2, double y1, double y2,
- EWeekViewEvent *event, EWeekViewEventSpan *span,
- char *text)
-{
- struct tm date_tm;
- char buffer[32];
-
- date_tm.tm_year = 2001;
- date_tm.tm_mon = 0;
- date_tm.tm_mday = 1;
- date_tm.tm_hour = event->start_minute / 60;
- date_tm.tm_min = event->start_minute % 60;
- date_tm.tm_sec = 0;
- date_tm.tm_isdst = -1;
-
- e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE,
- buffer, sizeof (buffer));
-
- print_text (pc, font, buffer, ALIGN_LEFT, x1, x2, y1, y2);
- x1 += gnome_font_get_width_string (font, buffer);
-
- x1 += 4;
- print_text (pc, font, text, ALIGN_LEFT, x1, x2, y1, y2);
-}
-
-
-static void
-print_week_event (GnomePrintContext *pc, GnomeFont *font,
- struct psinfo *psi,
- double left, double top,
- double cell_width, double cell_height,
- EWeekViewEvent *event, GArray *spans)
-{
- EWeekViewEventSpan *span;
- gint span_num;
- CalComponentText summary;
- char *text;
- int num_days, start_x, start_y, start_h, end_x, end_y, end_h;
- double x1, x2, y1, y2;
-
- cal_component_get_summary (event->comp, &summary);
- text = summary.value ? (char*) summary.value : "";
-
- for (span_num = 0; span_num < event->num_spans; span_num++) {
- span = &g_array_index (spans, EWeekViewEventSpan,
- event->spans_index + span_num);
-
- if (e_week_view_layout_get_span_position
- (event, span,
- psi->rows_per_cell,
- psi->rows_per_compressed_cell,
- psi->display_start_weekday,
- psi->multi_week_view,
- psi->compress_weekend,
- &num_days)) {
-
- e_week_view_layout_get_day_position
- (span->start_day,
- psi->multi_week_view,
- psi->weeks_shown,
- psi->display_start_weekday,
- psi->compress_weekend,
- &start_x, &start_y, &start_h);
-
- if (num_days == 1) {
- end_x = start_x;
- end_y = start_y;
- end_h = start_h;
- } else {
- e_week_view_layout_get_day_position
- (span->start_day + num_days - 1,
- psi->multi_week_view,
- psi->weeks_shown,
- psi->display_start_weekday,
- psi->compress_weekend,
- &end_x, &end_y, &end_h);
- }
-
- x1 = left + start_x * cell_width + 6;
- x2 = left + (end_x + 1) * cell_width - 6;
- y1 = top - start_y * cell_height
- - psi->header_row_height
- - span->row * psi->row_height;
- y2 = y1 - psi->row_height * 0.9;
-
- if (print_is_one_day_week_event (event, span,
- psi->day_starts)) {
- print_week_day_event (pc, font, psi,
- x1, x2, y1, y2,
- event, span, text);
- } else {
- print_week_long_event (pc, font, psi,
- x1, x2, y1, y2,
- event, span, text);
- }
- }
- }
-}
-
-
-static void
-print_week_view_background (GnomePrintContext *pc, GnomeFont *font,
- struct psinfo *psi,
- double left, double top,
- double cell_width, double cell_height)
-{
- icaltimezone *zone = get_timezone ();
- int day, day_x, day_y, day_h;
- double x1, x2, y1, y2, font_size, fillcolor;
- struct tm tm;
- char *format_string, buffer[128], *utf_str;
-
- font_size = gnome_font_get_size (font);
-
- for (day = 0; day < psi->days_shown; day++) {
- e_week_view_layout_get_day_position
- (day, psi->multi_week_view, psi->weeks_shown,
- psi->display_start_weekday, psi->compress_weekend,
- &day_x, &day_y, &day_h);
-
- x1 = left + day_x * cell_width;
- x2 = left + (day_x + 1) * cell_width;
- y1 = top - day_y * cell_height;
- y2 = y1 - day_h * cell_height;
-
- tm = *convert_timet_to_struct_tm (psi->day_starts[day], zone);
-
- /* In the month view we draw a grey background for the end
- of the previous month and the start of the following. */
- fillcolor = -1.0;
- if (psi->multi_week_view && (tm.tm_mon != psi->month))
- fillcolor = 0.9;
-
- print_border (pc, x1, x2, y1, y2, 1.0, fillcolor);
-
- if (psi->multi_week_view) {
- if (tm.tm_mday == 1)
- format_string = _("%d %B");
- else
- format_string = "%d";
- } else {
- gnome_print_moveto (pc, x1 + 0.1 * cell_width,
- y1 - psi->header_row_height + 3);
- gnome_print_lineto (pc, x2,
- y1 - psi->header_row_height + 3);
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- gnome_print_setlinewidth (pc, 0.5);
- gnome_print_stroke (pc);
-
- /* 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");
-
- }
-
- strftime (buffer, sizeof (buffer), format_string, &tm);
- utf_str = e_utf8_from_locale_string (buffer);
- print_text (pc, font, utf_str, ALIGN_RIGHT,
- x1, x2 - 4, y1 - 2, y1 - 2 - font_size);
- g_free (utf_str);
- }
-}
-
-
-
-static void
-print_week_summary (GnomePrintContext *pc, GnomeCalendar *gcal,
- time_t whence, gboolean multi_week_view, int weeks_shown,
- int month, double font_size,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- CalClient *client;
- EWeekViewEvent *event;
- struct psinfo psi;
- time_t day_start;
- gint rows_per_day[E_WEEK_VIEW_MAX_WEEKS * 7], day, event_num;
- GArray *spans;
- GnomeFont *font;
- double cell_width, cell_height;
-
- psi.days_shown = weeks_shown * 7;
- psi.events = g_array_new (FALSE, FALSE, sizeof (EWeekViewEvent));
- psi.multi_week_view = multi_week_view;
- psi.weeks_shown = weeks_shown;
- psi.month = month;
-
- /* Get a few config settings. */
- psi.compress_weekend = calendar_config_get_compress_weekend ();
- psi.use_24_hour_format = calendar_config_get_24_hour_format ();
-
- /* We convert this from (0 = Sun, 6 = Sat) to (0 = Mon, 6 = Sun). */
- psi.display_start_weekday = calendar_config_get_week_start_day ();
- psi.display_start_weekday = (psi.display_start_weekday + 6) % 7;
-
- /* If weekends are compressed then we can't start on a Sunday. */
- if (psi.compress_weekend && psi.display_start_weekday == 6)
- psi.display_start_weekday = 5;
-
- day_start = time_day_begin_with_zone (whence, zone);
- for (day = 0; day <= psi.days_shown; day++) {
- psi.day_starts[day] = day_start;
- day_start = time_add_day_with_zone (day_start, 1, zone);
- }
-
- /* Get the events from the server. */
- client = gnome_calendar_get_cal_client (gcal);
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT,
- psi.day_starts[0],
- psi.day_starts[psi.days_shown],
- print_week_summary_cb, &psi);
- qsort (psi.events->data, psi.events->len,
- sizeof (EWeekViewEvent), e_week_view_event_sort_func);
-
- /* Layout the events. */
- spans = e_week_view_layout_events (psi.events, NULL,
- psi.multi_week_view,
- psi.weeks_shown,
- psi.compress_weekend,
- psi.display_start_weekday,
- psi.day_starts, rows_per_day);
-
- /* Calculate the size of the cells. */
- if (multi_week_view) {
- cell_width = (right - left) / (psi.compress_weekend ? 6 : 7);
- cell_height = (top - bottom) / (weeks_shown * 2);
- } else {
- cell_width = (right - left) / 2;
- cell_height = (top - bottom) / 6;
- }
-
- /* Calculate the row height, using the normal font and with room for
- space or a rectangle around it. */
- psi.row_height = font_size * 1.2;
- psi.header_row_height = font_size * 1.5;
-
- /* Calculate how many rows we can fit into each type of cell. */
- psi.rows_per_cell = ((cell_height * 2) - psi.header_row_height)
- / psi.row_height;
- psi.rows_per_compressed_cell = (cell_height - psi.header_row_height)
- / psi.row_height;
-
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, font_size);
-
- /* Draw the grid and the day names/numbers. */
- print_week_view_background (pc, font, &psi, left, top,
- cell_width, cell_height);
-
- /* Print the events. */
- for (event_num = 0; event_num < psi.events->len; event_num++) {
- event = &g_array_index (psi.events, EWeekViewEvent, event_num);
- print_week_event (pc, font, &psi, left, top,
- cell_width, cell_height, event, spans);
- }
-
- gtk_object_unref (GTK_OBJECT (font));
-
- /* Free everything. */
- for (event_num = 0; event_num < psi.events->len; event_num++) {
- event = &g_array_index (psi.events, EWeekViewEvent, event_num);
- gtk_object_unref (GTK_OBJECT (event->comp));
- }
- g_array_free (psi.events, TRUE);
- g_array_free (spans, TRUE);
-}
-
-
-static void
-print_year_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
- double left, double right, double top, double bottom,
- int morerows)
-{
- icaltimezone *zone = get_timezone ();
- double row_height, col_width, l, r, t, b;
- time_t now;
- int col, row, rows, cols;
-
- l = left;
- t = top;
-
- /* If morerows is set we do 4 rows and 3 columns instead of 3 rows and
- 4 columns. This is useful if we switch paper orientation. */
- if (morerows) {
- rows = 4;
- cols = 3;
- } else {
- rows = 3;
- cols = 4;
- }
-
- row_height = (top - bottom) / rows;
- col_width = (right - left) / cols;
- r = l + col_width;
- b = top - row_height;
- now = time_year_begin_with_zone (whence, zone);
-
- for (row = 0; row < rows; row++) {
- t = top - row_height * row;
- b = t - row_height;
- for (col = 0; col < cols; col++) {
- l = left + col_width * col;
- r = l + col_width;
- print_month_small (pc, gcal, now,
- l + 8, r - 8, t - 8, b + 8,
- DATE_MONTH, 0, 0, TRUE);
- now = time_add_month_with_zone (now, 1, zone);
- }
- }
-}
-
-static void
-print_month_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- time_t date;
- struct tm tm;
- struct icaltimetype tt;
- char buffer[100];
- GnomeFont *font;
- gboolean compress_weekend;
- int columns, col, weekday, len, month;
- double font_size, cell_width, x1, x2, y1, y2;
-
- weekday = calendar_config_get_week_start_day ();
- compress_weekend = calendar_config_get_compress_weekend ();
-
- /* Remember which month we want. */
- tt = icaltime_from_timet_with_zone (whence, FALSE, zone);
- month = tt.month - 1;
-
- /* Find the start of the month, and then the start of the week on
- or before that day. */
- date = time_month_begin_with_zone (whence, zone);
- date = time_week_begin_with_zone (date, weekday, zone);
-
- /* If weekends are compressed then we can't start on a Sunday. */
- if (compress_weekend && weekday == 0)
- date = time_add_day_with_zone (date, -1, zone);
-
- /* do day names ... */
-
- /* We are only interested in outputting the weekday here, but we want
- to be able to step through the week without worrying about
- overflows making strftime choke, so we move near to the start of
- the month. */
- tm = *convert_timet_to_struct_tm (date, zone);
- tm.tm_mday = (tm.tm_mday % 7) + 7;
-
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0,
- MONTH_NORMAL_FONT_SIZE);
- font_size = gnome_font_get_size (font);
- gnome_print_setfont (pc, font);
-
- columns = compress_weekend ? 6 : 7;
- cell_width = (right - left) / columns;
- y1 = top;
- y2 = top - font_size * 1.5;
-
- for (col = 0; col < columns; col++) {
- char *utf_str;
-
- if (tm.tm_wday == 6 && compress_weekend) {
- strftime (buffer, sizeof (buffer), "%a/", &tm);
- len = strlen (buffer);
- tm.tm_mday++;
- tm.tm_wday = (tm.tm_wday + 1) % 7;
- strftime (buffer + len, sizeof (buffer) - len,
- "%a", &tm);
- } else {
- strftime (buffer, sizeof (buffer), "%A", &tm);
- }
-
- x1 = left + cell_width * col;
- x2 = x1 + cell_width;
-
- print_border (pc, x1, x2, y1, y2, 1.0, -1.0);
- utf_str = e_utf8_from_locale_string (buffer);
- print_text (pc, font, utf_str, ALIGN_CENTER, x1, x2, y1, y2);
- g_free (utf_str);
-
- tm.tm_mday++;
- tm.tm_wday = (tm.tm_wday + 1) % 7;
- }
- gtk_object_unref (GTK_OBJECT (font));
-
- top = y2;
- print_week_summary (pc, gcal, date, TRUE, 6, month,
- MONTH_NORMAL_FONT_SIZE,
- left, right, top, bottom);
-}
-
-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;
- struct icaltimetype *tt;
-
- client = gnome_calendar_get_task_pad_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, U_("Tasks"), font_summary, ALIGN_CENTER | 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;
-
- /* Print the box to put the tick in. */
- print_border (pc, x + 2, x + 8, y - 3, y - 11, 0.1, -1.0);
-
- /* If the task is complete, print a tick in the box. */
- cal_component_get_completed (comp, &tt);
- if (tt) {
- cal_component_free_icaltimetype (tt);
-
- gnome_print_setrgbcolor (pc, 0, 0, 0);
- gnome_print_setlinewidth (pc, 1.0);
- gnome_print_moveto (pc, x + 3, y - 8);
- gnome_print_lineto (pc, x + 5, y - 10);
- gnome_print_lineto (pc, x + 7, y - 3.5);
- gnome_print_stroke (pc);
- }
-
- y = bound_text (pc, font_summary, summary.value,
- x + 10, xend, y, yend, 0);
- y += gnome_font_get_size (font_summary) - 6;
- gnome_print_moveto (pc, x, y);
- gnome_print_lineto (pc, xend, y);
- gnome_print_stroke (pc);
- y -= 3;
- }
-
- cal_obj_uid_list_free (uids);
-
- gtk_object_unref (GTK_OBJECT (font_summary));
-}
-
-
-/* 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)
-{
- icaltimezone *zone = get_timezone ();
- 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;
- gint week_start_day;
-
- box = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
-
- tm = *convert_timet_to_struct_tm (at, zone);
-
- /* Day */
-
- strftime (text, sizeof (text), _("Selected 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_start_day = calendar_config_get_week_start_day ();
- week_begin = time_week_begin_with_zone (at, week_start_day, zone);
- /* If the week starts on a Sunday, we have to show the Saturday first,
- since the weekend is compressed. */
- if (week_start_day == 0)
- week_begin = time_add_day_with_zone (week_begin, -1, zone);
- week_end = time_add_day_with_zone (week_begin, 6, zone);
-
- week_begin_tm = *convert_timet_to_struct_tm (week_begin, zone);
- week_end_tm = *convert_timet_to_struct_tm (week_end, zone);
-
- 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), _("Selected 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), _("Selected 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), _("Selected 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;
-}
-
-
-static void
-print_day_view (GnomePrintContext *pc, GnomeCalendar *gcal, time_t date,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- int i, days = 1;
- double todo, header, l;
- char buf[100];
-
- for (i = 0; i < days; i++) {
- todo = (right - left) * 0.75 + left;
- header = top - HEADER_HEIGHT;
-
- /* FIXME: What is the name supposed to be for? */
- gnome_print_beginpage (pc, "Calendar Day View");
-
- /* Print the main view with all the events in. */
- print_day_details (pc, gcal, date,
- left, todo - 2.0, header, bottom);
-
- /* Print the TaskPad down the right. */
- print_todo_details (pc, gcal, 0, INT_MAX,
- todo, right, header, bottom);
-
- /* Print the filled border around the header. */
- print_border (pc, left, right, top, header + 2.0, 1.0, 0.9);
-
- /* Print the 2 mini calendar-months. */
- l = right - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2
- - SMALL_MONTH_SPACING;
- print_month_small (pc, gcal, date,
- l, l + SMALL_MONTH_WIDTH,
- top - 4, header + 4,
- DATE_MONTH | DATE_YEAR, date, date, FALSE);
-
- l += SMALL_MONTH_SPACING + SMALL_MONTH_WIDTH;
- print_month_small (pc, gcal,
- time_add_month_with_zone (date, 1, zone),
- l, l + SMALL_MONTH_WIDTH,
- top - 4, header + 4,
- DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
-
- /* Print the date, e.g. '8th May, 2001'. */
- format_date (date, DATE_DAY | DATE_MONTH | DATE_YEAR,
- buf, 100);
- print_text_size (pc, 24, buf, ALIGN_LEFT,
- left + 4, todo, top - 4, top - 4 - 24);
-
- /* Print the day, e.g. 'Tuesday'. */
- format_date (date, DATE_DAYNAME, buf, 100);
- print_text_size (pc, 18, buf, ALIGN_LEFT,
- left + 4, todo, top - 32, top - 32 - 18);
-
- gnome_print_showpage (pc);
- date = time_add_day_with_zone (date, 1, zone);
- }
-}
-
-
-static void
-print_week_view (GnomePrintContext *pc, GnomeCalendar *gcal, time_t date,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- double header, l;
- char buf[100];
- time_t when;
- gint week_start_day;
-
- header = top - HEADER_HEIGHT;
-
- /* FIXME: What is the name supposed to be for? */
- gnome_print_beginpage (pc, "Calendar Week View");
-
- week_start_day = calendar_config_get_week_start_day ();
- when = time_week_begin_with_zone (date, week_start_day, zone);
- /* If the week starts on a Sunday, we have to show the Saturday first,
- since the weekend is compressed. */
- if (week_start_day == 0)
- when = time_add_day_with_zone (when, -1, zone);
-
- /* Print the main week view. */
- print_week_summary (pc, gcal, when, FALSE, 1, 0,
- WEEK_NORMAL_FONT_SIZE,
- left, right, header, bottom);
-
- /* Print the border around the main view. */
- print_border (pc, left, right, header, bottom, 1.0, -1.0);
-
- /* Print the border around the header area. */
- print_border (pc, left, right, top, header + 2.0, 1.0, 0.9);
-
- /* Print the 2 mini calendar-months. */
- l = right - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2
- - SMALL_MONTH_SPACING;
- print_month_small (pc, gcal, when,
- l, l + SMALL_MONTH_WIDTH,
- top - 4, header + 4,
- DATE_MONTH | DATE_YEAR, when,
- time_add_week_with_zone (when, 1, zone), FALSE);
-
- l += SMALL_MONTH_SPACING + SMALL_MONTH_WIDTH;
- print_month_small (pc, gcal,
- time_add_month_with_zone (when, 1, zone),
- l, l + SMALL_MONTH_WIDTH,
- top - 4, header + 4,
- DATE_MONTH | DATE_YEAR, when,
- time_add_week_with_zone (when, 1, zone), FALSE);
-
- /* Print the start day of the week, e.g. '7th May 2001'. */
- format_date (when, DATE_DAY | DATE_MONTH | DATE_YEAR, buf, 100);
- print_text_size (pc, 24, buf, ALIGN_LEFT,
- left + 3, right, top - 4, top - 4 - 24);
-
- /* Print the end day of the week, e.g. '13th May 2001'. */
- when = time_add_day_with_zone (when, 6, zone);
- format_date (when, DATE_DAY | DATE_MONTH | DATE_YEAR, buf, 100);
- print_text_size (pc, 24, buf, ALIGN_LEFT,
- left + 3, right, top - 24 - 3, top - 24 - 3 - 24);
-
- gnome_print_showpage (pc);
-}
-
-
-static void
-print_month_view (GnomePrintContext *pc, GnomeCalendar *gcal, time_t date,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- double header;
- char buf[100];
-
- header = top - HEADER_HEIGHT;
-
- /* FIXME: What is the name supposed to be for? */
- gnome_print_beginpage (pc, "Calendar Month View");
-
- /* Print the main month view. */
- print_month_summary (pc, gcal, date, left, right, header, bottom);
-
- /* Print the border around the header. */
- print_border (pc, left, right, top, header, 1.0, 0.9);
-
- /* Print the 2 mini calendar-months. */
- print_month_small (pc, gcal,
- time_add_month_with_zone (date, 1, zone),
- right - (right - left) / 7 + 2, right - 8,
- top - 4, header,
- DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
- print_month_small (pc, gcal,
- time_add_month_with_zone (date, -1, zone),
- left + 8, left + (right - left) / 7 - 2,
- top - 4, header,
- DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
-
- /* Print the month, e.g. 'May 2001'. */
- format_date (date, DATE_MONTH | DATE_YEAR, buf, 100);
- print_text_size (pc, 24, buf, ALIGN_CENTER,
- left + 3, right - 3, top - 3, top - 3 - 24);
-
- gnome_print_showpage (pc);
-}
-
-
-static void
-print_year_view (GnomePrintContext *pc, GnomeCalendar *gcal, time_t date,
- double left, double right, double top, double bottom)
-{
- char buf[100];
-
- /* FIXME: What is the name supposed to be for? */
- gnome_print_beginpage (pc, "Calendar Year View");
-
- print_year_summary (pc, gcal, date, left, right, top - 50, bottom,
- TRUE);
-
- /* centered title */
- format_date (date, DATE_YEAR, buf, 100);
- print_text_size (pc, 24, buf, ALIGN_CENTER,
- left+3, right, top-3, top - 27);
-
- gnome_print_showpage (pc);
-}
-
-static void
-write_label_piece (time_t t, char *buffer, int size, char *stext, char *etext)
-{
- icaltimezone *zone = get_timezone ();
- struct tm *tmp_tm;
- int len;
-
- tmp_tm = convert_timet_to_struct_tm (t, zone);
-
- if (stext != NULL)
- strcat (buffer, stext);
-
- len = strlen (buffer);
- e_time_format_date_and_time (tmp_tm,
- calendar_config_get_24_hour_format (),
- FALSE, FALSE,
- &buffer[len], size - len);
- if (etext != NULL)
- strcat (buffer, etext);
-}
-
-static void
-print_date_label (GnomePrintContext *pc, CalComponent *comp,
- double left, double right, double top, double bottom)
-{
- icaltimezone *zone = get_timezone ();
- CalComponentDateTime datetime;
- time_t start = 0, end = 0, complete = 0, due = 0;
- static char buffer[1024], *utf_text;
-
- cal_component_get_dtstart (comp, &datetime);
- if (datetime.value)
- start = icaltime_as_timet_with_zone (*datetime.value, zone);
- cal_component_free_datetime (&datetime);
-
- cal_component_get_dtend (comp, &datetime);
- if (datetime.value)
- end = icaltime_as_timet_with_zone (*datetime.value, zone);
- cal_component_free_datetime (&datetime);
-
- cal_component_get_due (comp, &datetime);
- if (datetime.value)
- due = icaltime_as_timet_with_zone (*datetime.value, zone);
- cal_component_free_datetime (&datetime);
-
- cal_component_get_completed (comp, &datetime.value);
- if (datetime.value) {
- complete = icaltime_as_timet_with_zone (*datetime.value, zone);
- cal_component_free_icaltimetype (datetime.value);
- }
-
- buffer[0] = '\0';
-
- if (start > 0)
- write_label_piece (start, buffer, 1024, NULL, NULL);
-
- if (end > 0 && start > 0)
- write_label_piece (end, buffer, 1024, _(" to "), NULL);
-
- if (complete > 0) {
- if (start > 0)
- write_label_piece (complete, buffer, 1024, _(" (Completed "), ")");
- else
- write_label_piece (complete, buffer, 1024, _("Completed "), NULL);
- }
-
- if (due > 0 && complete == 0) {
- if (start > 0)
- write_label_piece (due, buffer, 1024, _(" (Due "), ")");
- else
- write_label_piece (due, buffer, 1024, _("Due "), NULL);
- }
-
- utf_text = e_utf8_from_locale_string (buffer);
- print_text_size (pc, 12, utf_text, ALIGN_LEFT,
- left, right, top, top - 15);
- g_free (utf_text);
-}
-
-static void
-print_comp_item (GnomePrintContext *pc, CalComponent *comp,
- double left, double right, double top, double bottom)
-{
- GnomeFont *font;
- CalComponentVType vtype;
- CalComponentText text;
- GSList *desc, *l;
-
- vtype = cal_component_get_vtype (comp);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- case CAL_COMPONENT_TODO:
- /* Summary */
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, FALSE,
- 18);
- cal_component_get_summary (comp, &text);
- top = bound_text (pc, font, text.value, left, right,
- top - 3, bottom, 0);
- gtk_object_unref (GTK_OBJECT (font));
-
- /* Date information */
- print_date_label (pc, comp, left, right, top-3, top - 15);
- top -= 30;
-
- /* Description */
- font = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, FALSE, 12);
- cal_component_get_description_list (comp, &desc);
- for (l = desc; l != NULL; l = l->next) {
- CalComponentText *text = l->data;
-
- if (text->value != NULL)
- top = bound_text (pc, font, text->value, left, right, top-3, bottom, 0);
- }
- cal_component_free_text_list (desc);
- gtk_object_unref (GTK_OBJECT (font));
-
- break;
- default:
- }
-
- gnome_print_showpage (pc);
-}
-
-void
-print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date,
- PrintView default_view)
-{
- GnomePrinter *printer;
- GnomePrintMaster *gpm;
- GnomePrintContext *pc;
- int copies, collate;
- double l, r, t, b;
-
- 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, date, &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 ();
-
- if (paper_info == NULL)
- 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:
- print_day_view (pc, gcal, date, l, r, t, b);
- break;
- case PRINT_VIEW_WEEK:
- print_week_view (pc, gcal, date, l, r, t, b);
- break;
- case PRINT_VIEW_MONTH:
- gnome_print_rotate (pc, 90);
- gnome_print_translate (pc, 0,
- -gnome_paper_pswidth (paper_info));
- print_month_view (pc, gcal, date, b, t, r, l);
- break;
- case PRINT_VIEW_YEAR:
- print_year_view (pc, gcal, date, l, r, t, b);
- break;
- default:
- g_assert_not_reached ();
- }
-
- gnome_print_master_close (gpm);
-
- if (preview) {
- GnomePrintMasterPreview *gpmp;
- gboolean landscape = FALSE;
-
- if (default_view == PRINT_VIEW_MONTH)
- landscape = TRUE;
-
- gpmp = gnome_print_master_preview_new_with_orientation (gpm, _("Print Preview"), landscape);
- gtk_widget_show (GTK_WIDGET (gpmp));
- } else {
- gnome_print_master_print (gpm);
- }
-
- gtk_object_unref (GTK_OBJECT (gpm));
-}
-
-
-void
-print_comp (CalComponent *comp, gboolean preview)
-{
- GnomePrinter *printer;
- GnomePrintMaster *gpm;
- GnomePrintContext *pc;
- int copies, collate;
- double l, r, t, b;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- printer = NULL;
- copies = 1;
- collate = FALSE;
-
- if (!preview) {
- GtkWidget *gpd;
-
- gpd = gnome_print_dialog_new (_("Print Item"),
- GNOME_PRINT_DIALOG_COPIES);
-
- 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);
-
- 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 ();
-
- if (paper_info == NULL)
- 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);
-
- print_comp_item (pc, comp, l, r, t, b);
-
- 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));
-}
-
-void
-print_setup (void)
-{
- GtkWidget *dlg, *ps;
- gint btn;
-
- ps = gnome_paper_selector_new ();
- gtk_widget_show (ps);
-
- dlg = gnome_dialog_new (_("Print Setup"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), ps, TRUE, TRUE, 2);
-
- btn = gnome_dialog_run (GNOME_DIALOG (dlg));
- if (btn == 0) {
- gchar *name;
-
- name = gnome_paper_selector_get_name (GNOME_PAPER_SELECTOR (ps));
- paper_info = gnome_paper_with_name (name);
- }
-
- gnome_dialog_close (GNOME_DIALOG (dlg));
-}
diff --git a/calendar/gui/print.h b/calendar/gui/print.h
deleted file mode 100644
index b2b537b063..0000000000
--- a/calendar/gui/print.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Evolution calendar - Print support
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@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 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);
-void print_comp (CalComponent *comp, gboolean preview);
-
-void print_setup (void);
-
-
-
-#endif
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
deleted file mode 100644
index 08a2636ec0..0000000000
--- a/calendar/gui/tag-calendar.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Evolution calendar - Utilities for tagging ECalendar widgets
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Damon Chaplin <damon@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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cal-util/timeutil.h>
-#include "calendar-config.h"
-#include "tag-calendar.h"
-
-
-
-struct calendar_tag_closure {
- ECalendarItem *calitem;
- icaltimezone *zone;
- time_t start_time;
- time_t end_time;
-
- gboolean skip_transparent_events;
-};
-
-/* 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, gboolean clear_first)
-{
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- struct icaltimetype start_tt = icaltime_null_time ();
- struct icaltimetype end_tt = icaltime_null_time ();
- char *location;
-
- if (clear_first)
- 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_tt.year = start_year;
- start_tt.month = start_month + 1;
- start_tt.day = start_day;
-
- end_tt.year = end_year;
- end_tt.month = end_month + 1;
- end_tt.day = end_day;
-
- icaltime_adjust (&end_tt, 1, 0, 0, 0);
-
- c->calitem = ecal->calitem;
-
- /* FIXME. It may be better if the timezone is passed in. */
- location = calendar_config_get_timezone ();
- c->zone = icaltimezone_get_builtin_timezone (location);
-
- c->start_time = icaltime_as_timet_with_zone (start_tt, c->zone);
- c->end_time = icaltime_as_timet_with_zone (end_tt, c->zone);
-
- 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;
- struct icaltimetype start_tt, end_tt;
- CalComponentTransparency transparency;
-
- /* If we are skipping TRANSPARENT events, return if the event is
- transparent. */
- if (c->skip_transparent_events) {
- cal_component_get_transparency (comp, &transparency);
- if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT)
- return TRUE;
- }
-
- start_tt = icaltime_from_timet_with_zone (istart, FALSE, c->zone);
- end_tt = icaltime_from_timet_with_zone (iend - 1, FALSE, c->zone);
- e_calendar_item_mark_days (c->calitem,
- start_tt.year, start_tt.month - 1,
- start_tt.day,
- end_tt.year, end_tt.month - 1,
- end_tt.day,
- E_CALENDAR_ITEM_MARK_BOLD);
-
- 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, TRUE))
- return;
-
- c.skip_transparent_events = TRUE;
-
-#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);
-}
-
-/* Resolves TZIDs for the recurrence generator, for when the comp is not on
- the server. We need to try to use builtin timezones first, as they may not
- be added to the server yet. */
-icaltimezone*
-resolve_tzid_cb (const char *tzid, gpointer data)
-{
- CalClient *client;
- icaltimezone *zone = NULL;
- CalClientGetStatus status;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (IS_CAL_CLIENT (data), NULL);
-
- client = CAL_CLIENT (data);
-
- /* Try to find the builtin timezone first. */
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
-
- if (!zone) {
- /* FIXME: Handle errors. */
- status = cal_client_get_timezone (client, tzid, &zone);
- }
-
- return zone;
-}
-
-/**
- * tag_calendar_by_comp:
- * @ecal: Calendar widget to tag.
- * @comp: A calendar component object.
- * @clear_first: Whether the #ECalendar should be cleared of any marks first.
- *
- * Tags an #ECalendar widget with any occurrences of a specific calendar
- * component that occur within the calendar's current time range.
- * Note that TRANSPARENT events are also tagged here.
- *
- * If comp_is_on_server is FALSE, it will try to resolve TZIDs using builtin
- * timezones first, before querying the server, since the timezones may not
- * have been added to the calendar on the server yet.
- **/
-void
-tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp, CalClient *client, gboolean clear_first, gboolean comp_is_on_server)
-{
- 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, clear_first))
- return;
-
- c.skip_transparent_events = FALSE;
-
-#if 0
- g_print ("DateNavigator generating instances\n");
-#endif
- if (comp_is_on_server) {
- cal_recur_generate_instances (comp, c.start_time, c.end_time,
- tag_calendar_cb, &c,
- cal_client_resolve_tzid_cb,
- client);
- } else {
- cal_recur_generate_instances (comp, c.start_time, c.end_time,
- tag_calendar_cb, &c,
- resolve_tzid_cb,
- client);
- }
-}
diff --git a/calendar/gui/tag-calendar.h b/calendar/gui/tag-calendar.h
deleted file mode 100644
index 4b5ede9267..0000000000
--- a/calendar/gui/tag-calendar.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Evolution calendar - Utilities for tagging ECalendar widgets
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Damon Chaplin <damon@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 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,
- CalClient *client, gboolean clear_first,
- gboolean comp_is_on_server);
-
-#endif
diff --git a/calendar/gui/tasks-control-factory.c b/calendar/gui/tasks-control-factory.c
deleted file mode 100644
index 7435fbe740..0000000000
--- a/calendar/gui/tasks-control-factory.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control-factory.c
- *
- * 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.
- *
- * Authors: Ettore Perazzoli
- * Damon Chaplin <damon@ximian.com>
- */
-
-#include <config.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.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);
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-
- 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 e0ab93bac3..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 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 _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 5aba50c81c..0000000000
--- a/calendar/gui/tasks-control.c
+++ /dev/null
@@ -1,406 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control.c
- *
- * 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.
- *
- * Authors: Damon Chaplin <damon@ximian.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 "dialogs/cal-prefs-dialog.h"
-#include "calendar-config.h"
-#include "calendar-commands.h"
-#include "e-tasks.h"
-#include "tasks-control.h"
-#include "evolution-shell-component-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,
- ETasks *tasks);
-
-static void tasks_control_new_task_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-static void tasks_control_cut_cmd (BonoboUIComponent *uic,
- gpointer data,
- const gchar *path);
-static void tasks_control_copy_cmd (BonoboUIComponent *uic,
- gpointer data,
- const gchar *path);
-static void tasks_control_paste_cmd (BonoboUIComponent *uic,
- gpointer data,
- const gchar *path);
-static void tasks_control_delete_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-static void tasks_control_settings_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);
- bonobo_object_unref (BONOBO_OBJECT (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)
-{
- ETasks *tasks;
-
- tasks = E_TASKS (user_data);
-
- if (activate)
- tasks_control_activate (control, tasks);
- else
- tasks_control_deactivate (control, tasks);
-}
-
-/* Sensitizes the UI Component menu/toolbar commands based on the number of
- * selected tasks.
- */
-static void
-sensitize_commands (ETasks *tasks, BonoboControl *control, int n_selected)
-{
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- bonobo_ui_component_set_prop (uic, "/commands/TasksCut", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/TasksCopy", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
- bonobo_ui_component_set_prop (uic, "/commands/TasksDelete", "sensitive",
- n_selected == 0 ? "0" : "1",
- NULL);
-}
-
-/* Callback used when the selection in the table changes */
-static void
-selection_changed_cb (ETasks *tasks, int n_selected, gpointer data)
-{
- BonoboControl *control;
-
- control = BONOBO_CONTROL (data);
-
- sensitize_commands (tasks, control, n_selected);
-}
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("TasksNewTask", tasks_control_new_task_cmd),
- BONOBO_UI_VERB ("TasksCut", tasks_control_cut_cmd),
- BONOBO_UI_VERB ("TasksCopy", tasks_control_copy_cmd),
- BONOBO_UI_VERB ("TasksPaste", tasks_control_paste_cmd),
- BONOBO_UI_VERB ("TasksDelete", tasks_control_delete_cmd),
- BONOBO_UI_VERB ("TasksSettings", tasks_control_settings_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/menu/File/New/NewFirstItem/NewTask", "new_task-16.png"),
- E_PIXMAP ("/menu/Edit/Cut", "16_cut.png"),
- E_PIXMAP ("/menu/Edit/Copy", "16_copy.png"),
- E_PIXMAP ("/menu/Edit/Paste", "16_paste.png"),
- E_PIXMAP ("/menu/Edit/Delete", "evolution-trash-mini.png"),
- E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
- E_PIXMAP ("/menu/File/Print/Print Preview", "print-preview.xpm"),
- E_PIXMAP ("/menu/Tools/ComponentPlaceholder/TasksSettings", "configure_16_calendar.xpm"),
- E_PIXMAP ("/Toolbar/New", "buttons/new_task.png"),
- E_PIXMAP ("/Toolbar/Cut", "buttons/cut.png"),
- E_PIXMAP ("/Toolbar/Copy", "buttons/copy.png"),
- E_PIXMAP ("/Toolbar/Paste", "buttons/paste.png"),
- E_PIXMAP ("/Toolbar/Delete", "buttons/delete-message.png"),
- E_PIXMAP_END
-};
-
-static void
-tasks_control_activate (BonoboControl *control, ETasks *tasks)
-{
- Bonobo_UIContainer remote_uih;
- BonoboUIComponent *uic;
- int n_selected;
- ECalendarTable *cal_table;
- ETable *etable;
-
- 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_pixmaps_update (uic, pixmaps);
-
- e_tasks_setup_view_menus (tasks, uic);
-
- /* Signals from the tasks widget; also sensitize the menu items as appropriate */
-
- gtk_signal_connect (GTK_OBJECT (tasks), "selection_changed",
- GTK_SIGNAL_FUNC (selection_changed_cb), control);
-
- cal_table = e_tasks_get_calendar_table (tasks);
- etable = e_calendar_table_get_table (cal_table);
- n_selected = e_table_selected_count (etable);
-
- sensitize_commands (tasks, control, n_selected);
-
- bonobo_ui_component_thaw (uic, NULL);
-
- /* Show the dialog for setting the timezone if the user hasn't chosen
- a default timezone already. This is done in the startup wizard now,
- so we don't do it here. */
-#if 0
- calendar_config_check_timezone_set ();
-#endif
-
- control_util_set_folder_bar_label (control, "");
-}
-
-
-static void
-tasks_control_deactivate (BonoboControl *control, ETasks *tasks)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- e_tasks_discard_view_menus (tasks);
-
- /* Stop monitoring the "selection_changed" signal */
- gtk_signal_disconnect_by_data (GTK_OBJECT (tasks), control);
-
- 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;
-
- tasks = E_TASKS (data);
- e_tasks_new_task (tasks);
-}
-
-static void
-tasks_control_cut_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
- ECalendarTable *cal_table;
-
- tasks = E_TASKS (data);
- cal_table = e_tasks_get_calendar_table (tasks);
- e_calendar_table_cut_clipboard (cal_table);
-}
-
-static void
-tasks_control_copy_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
- ECalendarTable *cal_table;
-
- tasks = E_TASKS (data);
- cal_table = e_tasks_get_calendar_table (tasks);
- e_calendar_table_copy_clipboard (cal_table);
-}
-
-static void
-tasks_control_paste_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
- ECalendarTable *cal_table;
-
- tasks = E_TASKS (data);
- cal_table = e_tasks_get_calendar_table (tasks);
- e_calendar_table_paste_clipboard (cal_table);
-}
-
-static void
-tasks_control_delete_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks;
-
- tasks = E_TASKS (data);
- e_tasks_delete_selected (tasks);
-}
-
-/* Callback used for the tasks settings command */
-static void
-tasks_control_settings_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- ETasks *tasks;
- static CalPrefsDialog *prefs_dialog = NULL;
-
- tasks = E_TASKS (data);
-
- if (!prefs_dialog)
- prefs_dialog = cal_prefs_dialog_new (CAL_PREFS_DIALOG_PAGE_TASKS);
- else
- cal_prefs_dialog_show (prefs_dialog, CAL_PREFS_DIALOG_PAGE_TASKS);
-}
diff --git a/calendar/gui/tasks-control.h b/calendar/gui/tasks-control.h
deleted file mode 100644
index 39ecc8d1de..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 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 _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/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 7eac5b6f80..0000000000
--- a/calendar/gui/weekday-picker.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/* Evolution calendar - Week day picker widget
- *
- * 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 <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 c4cf9d774a..0000000000
--- a/calendar/gui/weekday-picker.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Evolution calendar - Week day picker widget
- *
- * 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 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/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 fe3c710cbc..0000000000
--- a/calendar/idl/evolution-calendar.idl
+++ /dev/null
@@ -1,334 +0,0 @@
-/* Evolution calendar interface
- *
- * Copyright (C) 2000 Eskil Heyn Olsen
- * Copyright (C) 2000 Ximian, 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;
- typedef sequence<CalObj> CalObjSeq;
-
- /* A unique identifier for a calendar component */
- typedef string CalObjUID;
-
- /* Simple sequence of strings */
- typedef sequence<string> StringSeq;
-
- /* Sequence of unique identifiers */
- typedef sequence<CalObjUID> CalObjUIDSeq;
-
- /* A VTIMEZONE component, represented as an iCalendar string. */
- typedef string CalTimezoneObj;
-
- /* A unique identifier for a VTIMEZONE component, i.e. its TZID. */
- typedef string CalTimezoneObjUID;
-
- /* 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;
-
- /* Flags for getting URI sequences */
- typedef long CalMode;
- const CalMode MODE_LOCAL = 1 << 0;
- const CalMode MODE_REMOTE = 1 << 1;
- const CalMode MODE_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_start;
- Time_t occur_end;
- };
-
- /* 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;
-
- /* Used to represent users and lists of users */
- typedef string User;
- typedef sequence<User> UserList;
-
- 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;
-
- /* For going online/offline */
- void setMode (in CalMode mode);
-
- /* 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 VTIMEZONE component based on its TZID */
- CalTimezoneObj getTimezoneObject (in CalTimezoneObjUID tzid)
- 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);
-
- /* Returns free/busy objects for the given interval */
- CalObjSeq getFreeBusy (in UserList users, in Time_t start, in Time_t end);
-
- /* 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. This can be a simple VEVENT/VTODO
- * object if no timezone data is needed for the component or
- * it hasn't changed. To add or change the associated VTIMEZONE
- * data the calobj should be a VCALENDAR component with
- * VTIMEZONE and VEVENT/VTODO subcomponents. The VTIMEZONE data
- * will be merged into the calendar, possibly by renaming TZIDs
- * (though not for builtin VTIMEZONEs), so don't rely on the
- * TZIDs being the same in the new object on the server.
- * The client should probably immediately free its copy of the
- * object after this call, and call getObject to get the
- * updated version.
- */
- void updateObjects (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 */
- };
-
- /* Return status when setting calendar mode */
- enum SetModeStatus {
- MODE_SET, /* All OK */
- MODE_NOT_SET, /* Generic error */
- MODE_NOT_SUPPORTED /* Mode not supported */
- };
-
- /* 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 the mode is changed */
- void notifyCalSetMode (in SetModeStatus status, in CalMode mode);
-
- /* 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);
-
- /* Called from a Calendar when the list of categories changes */
- void notifyCategoriesChanged (in StringSeq categories);
- };
-
- /* 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 {};
- exception InvalidURI {};
- exception UnsupportedMethod {};
-
- /* Open a calendar from an URI */
- void open (in string uri, in boolean only_if_exists, in Listener listener)
- raises (NilListener);
-
- /* List of open URI's */
- StringSeq uriList (in CalMode mode);
- };
-
- /* 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 ();
- };
-
- /* Factory to centralize calendar component editor dialogs */
- interface CompEditorFactory : Bonobo::Unknown {
- exception InvalidURI {};
- exception BackendContactError {};
- exception UnsupportedType {};
-
- /* Loads a calendar and opens an editor for the specified object */
- void editExisting (in string uri, in CalObjUID uid)
- raises (InvalidURI, BackendContactError);
-
- /* Loads a calendar and creates a new component of the specified type */
- void editNew (in string uri, in CalObjType type)
- raises (InvalidURI, BackendContactError, UnsupportedType);
- };
-};
-
-};
-};
-
-#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 4db9b0cca3..0000000000
--- a/calendar/pcs/Makefile.am
+++ /dev/null
@@ -1,53 +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 \
- -I$(top_srcdir)/libwombat \
- -I$(top_builddir)/libwombat \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- $(EXTRA_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-backend-util.c \
- cal-backend-util.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 bb2a22a7f2..0000000000
--- a/calendar/pcs/cal-backend-db.c
+++ /dev/null
@@ -1,1191 +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 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 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 char *cal_backend_db_get_free_busy (CalBackend *backend,
- 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->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_uids = cal_backend_db_get_uids;
- backend_class->get_objects_in_range = cal_backend_db_get_objects_in_range;
- backend_class->get_free_busy = cal_backend_db_get_free_busy;
- 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));
- }
-}
-
-/* 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;
-}
-
-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_free_busy handler for the DB backend */
-static char *
-cal_backend_db_get_free_busy (CalBackend *backend, time_t start, time_t end)
-{
- return NULL;
-}
-
-/* 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;
-}
-
-/* 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)
- continue;
-
- /* 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 = cal_util_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;
-}
-
-/* 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);
-
- cal_backend_util_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) {
- cal_backend_util_fill_alarm_instances_seq (&corba_alarms->alarms,
- alarms->alarms);
- cal_component_alarms_free(alarms);
- }
- else
- cal_backend_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 3f0c73dc99..0000000000
--- a/calendar/pcs/cal-backend-file.c
+++ /dev/null
@@ -1,1860 +0,0 @@
-/* Evolution calendar - iCalendar file backend
- *
- * Copyright (C) 2000 Ximian, 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 <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-#include "e-util/e-dbhash.h"
-#include "cal-util/cal-recur.h"
-#include "cal-util/cal-util.h"
-#include "cal-backend-file.h"
-#include "cal-backend-util.h"
-
-
-
-/* A category that exists in some of the objects of the calendar */
-typedef struct {
- /* Category name, also used as the key in the categories hash table */
- char *name;
-
- /* Number of objects that have this category */
- int refcount;
-} Category;
-
-/* 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;
-
- /* Hash table of live categories, and a temporary hash of removed categories */
- GHashTable *categories;
- GHashTable *removed_categories;
-
- /* Config database handle for free/busy organizer information */
- Bonobo_ConfigDatabase db;
-
- /* 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 CalBackendOpenStatus cal_backend_file_open (CalBackend *backend, GnomeVFSURI *uri,
- gboolean only_if_exists);
-static gboolean cal_backend_file_is_loaded (CalBackend *backend);
-
-static CalMode cal_backend_file_get_mode (CalBackend *backend);
-static void cal_backend_file_set_mode (CalBackend *backend, CalMode mode);
-
-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 CalComponent *cal_backend_file_get_object_component (CalBackend *backend, const char *uid);
-static char *cal_backend_file_get_timezone_object (CalBackend *backend, const char *tzid);
-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 GList *cal_backend_file_get_free_busy (CalBackend *backend, GList *users, 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_objects (CalBackend *backend, const char *calobj);
-static gboolean cal_backend_file_remove_object (CalBackend *backend, const char *uid);
-
-static icaltimezone* cal_backend_file_get_timezone (CalBackend *backend, const char *tzid);
-
-static void notify_categories_changed (CalBackendFile *cbfile);
-
-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->open = cal_backend_file_open;
- backend_class->is_loaded = cal_backend_file_is_loaded;
- backend_class->get_mode = cal_backend_file_get_mode;
- backend_class->set_mode = cal_backend_file_set_mode;
- backend_class->get_n_objects = cal_backend_file_get_n_objects;
- backend_class->get_object = cal_backend_file_get_object;
- backend_class->get_object_component = cal_backend_file_get_object_component;
- backend_class->get_timezone_object = cal_backend_file_get_timezone_object;
- 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_free_busy = cal_backend_file_get_free_busy;
- 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_objects = cal_backend_file_update_objects;
- backend_class->remove_object = cal_backend_file_remove_object;
-
- backend_class->get_timezone = cal_backend_file_get_timezone;
-}
-
-static Bonobo_ConfigDatabase
-load_db (void)
-{
- Bonobo_ConfigDatabase db = CORBA_OBJECT_NIL;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev))
- db = CORBA_OBJECT_NIL;
-
- CORBA_exception_free (&ev);
-
- return db;
-}
-
-static void
-cal_added_cb (CalBackend *backend, gpointer user_data)
-{
- notify_categories_changed (CAL_BACKEND_FILE (backend));
-}
-
-/* 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->icalcomp = NULL;
- priv->comp_uid_hash = NULL;
- priv->events = NULL;
- priv->todos = NULL;
- priv->journals = NULL;
-
- priv->categories = g_hash_table_new (g_str_hash, g_str_equal);
- priv->removed_categories = g_hash_table_new (g_str_hash, g_str_equal);
-
- priv->db = load_db ();
-
- gtk_signal_connect (GTK_OBJECT (cbfile), "cal_added",
- GTK_SIGNAL_FUNC (cal_added_cb), 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;
-}
-
-/* Used from g_hash_table_foreach(), frees a Category structure */
-static void
-free_category_cb (gpointer key, gpointer value, gpointer data)
-{
- Category *c;
-
- c = value;
- g_free (c->name);
- g_free (c);
-}
-
-/* Destroy handler for the file backend */
-static void
-cal_backend_file_destroy (GtkObject *object)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- GList *clients;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CAL_BACKEND_FILE (object));
-
- cbfile = CAL_BACKEND_FILE (object);
- priv = cbfile->priv;
-
- clients = CAL_BACKEND (cbfile)->clients;
- g_assert (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;
-
- g_hash_table_foreach (priv->categories, free_category_cb, NULL);
- g_hash_table_destroy (priv->categories);
- priv->categories = NULL;
-
- g_hash_table_foreach (priv->removed_categories, free_category_cb, NULL);
- g_hash_table_destroy (priv->removed_categories);
- priv->removed_categories = NULL;
-
- if (priv->icalcomp) {
- icalcomponent_free (priv->icalcomp);
- priv->icalcomp = NULL;
- }
-
- bonobo_object_release_unref (priv->db, NULL);
- priv->db = CORBA_OBJECT_NIL;
-
- 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;
-}
-
-/* Used from g_hash_table_foreach(), adds a category name to the sequence */
-static void
-add_category_cb (gpointer key, gpointer value, gpointer data)
-{
- Category *c;
- GNOME_Evolution_Calendar_StringSeq *seq;
-
- c = value;
- seq = data;
-
- seq->_buffer[seq->_length] = CORBA_string_dup (c->name);
- seq->_length++;
-}
-
-/* Notifies the clients with the current list of categories */
-static void
-notify_categories_changed (CalBackendFile *cbfile)
-{
- CalBackendFilePrivate *priv;
- GNOME_Evolution_Calendar_StringSeq *seq;
- GList *l;
-
- priv = cbfile->priv;
-
- /* Build the sequence of category names */
-
- seq = GNOME_Evolution_Calendar_StringSeq__alloc ();
- seq->_length = 0;
- seq->_maximum = g_hash_table_size (priv->categories);
- seq->_buffer = CORBA_sequence_CORBA_string_allocbuf (seq->_maximum);
- CORBA_sequence_set_release (seq, TRUE);
-
- g_hash_table_foreach (priv->categories, add_category_cb, seq);
- g_assert (seq->_length == seq->_maximum);
-
- /* Notify the clients */
-
- for (l = CAL_BACKEND (cbfile)->clients; l; l = l->next) {
- Cal *cal;
-
- cal = CAL (l->data);
- cal_notify_categories_changed (cal, seq);
- }
-
- CORBA_free (seq);
-}
-
-/* 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);
-}
-
-/* Updates the hash table of categories by adding or removing those in the
- * component.
- */
-static void
-update_categories_from_comp (CalBackendFile *cbfile, CalComponent *comp, gboolean add)
-{
- CalBackendFilePrivate *priv;
- GSList *categories, *l;
-
- priv = cbfile->priv;
-
- cal_component_get_categories_list (comp, &categories);
-
- for (l = categories; l; l = l->next) {
- const char *name;
- Category *c;
-
- name = l->data;
- c = g_hash_table_lookup (priv->categories, name);
-
- if (add) {
- /* Add the category to the set */
- if (c)
- c->refcount++;
- else {
- /* See if it was in the removed categories */
-
- c = g_hash_table_lookup (priv->removed_categories, name);
- if (c) {
- /* Move it to the set of live categories */
- g_assert (c->refcount == 0);
- g_hash_table_remove (priv->removed_categories, c->name);
-
- c->refcount = 1;
- g_hash_table_insert (priv->categories, c->name, c);
- } else {
- /* Create a new category */
- c = g_new (Category, 1);
- c->name = g_strdup (name);
- c->refcount = 1;
-
- g_hash_table_insert (priv->categories, c->name, c);
- }
- }
- } else {
- /* Remove the category from the set --- it *must* have existed */
-
- g_assert (c != NULL);
- g_assert (c->refcount > 0);
-
- c->refcount--;
-
- if (c->refcount == 0) {
- g_hash_table_remove (priv->categories, c->name);
- g_hash_table_insert (priv->removed_categories, c->name, c);
- }
- }
- }
-
- cal_component_free_categories_list (categories);
-}
-
-/* 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);
- }
-
- /* Update the set of categories */
-
- update_categories_from_comp (cbfile, comp, TRUE);
-}
-
-/* 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);
-
- /* Update the set of categories */
-
- update_categories_from_comp (cbfile, comp, FALSE);
-
- 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;
-
- priv = cbfile->priv;
-
- /* Create the new calendar information */
- priv->icalcomp = cal_util_new_top_level ();
-
- /* 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);
-}
-
-/* is_remote handler for the file backend */
-static CalMode
-cal_backend_file_get_mode (CalBackend *backend)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- return CAL_MODE_LOCAL;
-}
-
-static void
-notify_mode (CalBackendFile *cbfile,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode)
-{
- CalBackendFilePrivate *priv;
- GList *l;
-
- priv = cbfile->priv;
-
- for (l = CAL_BACKEND (cbfile)->clients; l; l = l->next) {
- Cal *cal;
-
- cal = CAL (l->data);
- cal_notify_mode (cal, status, mode);
- }
-}
-
-/* Set_mode handler for the file backend */
-static void
-cal_backend_file_set_mode (CalBackend *backend, CalMode mode)
-{
- notify_mode (CAL_BACKEND_FILE (backend),
- GNOME_Evolution_Calendar_Listener_MODE_NOT_SUPPORTED,
- GNOME_Evolution_Calendar_MODE_LOCAL);
-
-}
-
-/* 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);
-}
-
-/* Get_object handler for the file backend */
-static CalComponent *
-cal_backend_file_get_object_component (CalBackend *backend, const char *uid)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- 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);
-
- return lookup_component (cbfile, uid);
-}
-
-/* Get_object handler for the file backend */
-static char *
-cal_backend_file_get_timezone_object (CalBackend *backend, const char *tzid)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- icaltimezone *icaltz;
- icalcomponent *icalcomp;
- char *ical_string;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (tzid != NULL, NULL);
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
- g_assert (priv->comp_uid_hash != NULL);
-
- icaltz = icalcomponent_get_timezone (priv->icalcomp, tzid);
- if (!icaltz)
- return NULL;
-
- icalcomp = icaltimezone_get_component (icaltz);
- if (!icalcomp)
- return NULL;
-
- ical_string = icalcomponent_as_ical_string (icalcomp);
- /* We dup the string; libical owns that memory. */
- if (ical_string)
- return g_strdup (ical_string);
- else
- return NULL;
-}
-
-/* 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;
-}
-
-/* function to resolve timezones */
-static icaltimezone *
-resolve_tzid (const char *tzid, gpointer user_data)
-{
- icalcomponent *vcalendar_comp = user_data;
-
- if (!tzid || !tzid[0])
- return NULL;
- else if (!strcmp (tzid, "UTC"))
- return icaltimezone_get_utc_timezone ();
-
- return icalcomponent_get_timezone (vcalendar_comp, tzid);
-}
-
-/* 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;
- icalcomponent *icalcomp, *vcalendar_comp;
-
- comp = CAL_COMPONENT (l->data);
-
- /* Get the parent VCALENDAR component, so we can resolve
- TZIDs. */
- icalcomp = cal_component_get_icalcomponent (comp);
- vcalendar_comp = icalcomponent_get_parent (icalcomp);
- g_assert (vcalendar_comp != NULL);
-
- cal_recur_generate_instances (comp, start, end, add_instance, uid_hash, resolve_tzid, vcalendar_comp);
- }
-}
-
-/* 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;
-}
-
-static void
-mail_account_get (Bonobo_ConfigDatabase db, gint def, char **address, char **name)
-{
- gchar *path;
-
- *address = NULL;
- *name = NULL;
-
- /* get the identity info */
- path = g_strdup_printf ("/Mail/Accounts/identity_name_%d", def);
- *name = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_address_%d", def);
- *address = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-}
-
-static gboolean
-mail_account_get_default (Bonobo_ConfigDatabase db, char **address, char **name)
-{
- glong def, len;
-
- *address = NULL;
- *name = NULL;
-
- len = bonobo_config_get_long_with_default (db, "/Mail/Accounts/num", 0, NULL);
- def = bonobo_config_get_long_with_default (db, "/Mail/Accounts/default_account", 0, NULL);
-
- if (def < len)
- mail_account_get (db, def, address, name);
- else
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-mail_account_is_valid (Bonobo_ConfigDatabase db, char *user, char **name)
-{
- gchar *address;
- glong len, i;
-
- len = bonobo_config_get_long_with_default (db, "/Mail/Accounts/num", 0, NULL);
-
- for (i = 0; i < len; i++) {
- mail_account_get (db, i, &address, name);
- if (address != NULL && !strcmp (address, user)) {
- g_free (address);
- return TRUE;
- }
- g_free (address);
- g_free (*name);
- }
-
- return FALSE;
-}
-
-static icalcomponent *
-create_user_free_busy (CalBackendFile *cbfile, const char *address, const char *cn,
- time_t start, time_t end)
-{
- CalBackendFilePrivate *priv;
- GList *uids;
- GList *l;
- icalcomponent *vfb;
-
- priv = cbfile->priv;
-
- /* create the (unique) VFREEBUSY object that we'll return */
- vfb = icalcomponent_new_vfreebusy ();
- if (address != NULL) {
- icalproperty *prop;
- icalparameter *param;
-
- prop = icalproperty_new_organizer (address);
- if (prop != NULL && cn != NULL) {
- param = icalparameter_new_cn (cn);
- icalproperty_add_parameter (prop, param);
- }
- if (prop != NULL)
- icalcomponent_add_property (vfb, prop);
- }
- icalcomponent_set_dtstart (vfb, icaltime_from_timet (start, 1));
- icalcomponent_set_dtend (vfb, icaltime_from_timet (end, 1));
-
- /* add all objects in the given interval */
- uids = cal_backend_get_objects_in_range (CAL_BACKEND (cbfile),
- CALOBJ_TYPE_ANY, start, end);
- for (l = uids; l != NULL; l = l->next) {
- CalComponent *comp;
- icalcomponent *icalcomp;
- icalparameter *param;
- icalproperty *prop;
- struct icalperiodtype ipt;
- char *uid = (char *) l->data;
-
- /* get the component from our internal list */
- comp = lookup_component (cbfile, uid);
- if (!comp)
- continue;
-
- icalcomp = cal_component_get_icalcomponent (comp);
- if (!icalcomp)
- continue;
-
- /* If the event is TRANSPARENT, skip it. */
- prop = icalcomponent_get_first_property (icalcomp,
- ICAL_TRANSP_PROPERTY);
- if (prop) {
- const char *transp_val = icalproperty_get_transp (prop);
- if (transp_val
- && !strcasecmp (transp_val, "TRANSPARENT"))
- continue;
- }
-
- ipt.start = icalcomponent_get_dtstart (icalcomp);
- ipt.end = icalcomponent_get_dtend (icalcomp);
- ipt.duration = icalcomponent_get_duration (icalcomp);
-
- /* add busy information to the vfb component */
- prop = icalproperty_new (ICAL_FREEBUSY_PROPERTY);
- icalproperty_set_freebusy (prop, ipt);
-
- param = icalparameter_new_fbtype (ICAL_FBTYPE_BUSY);
- icalproperty_add_parameter (prop, param);
-
- icalcomponent_add_property (vfb, prop);
- }
- cal_obj_uid_list_free (uids);
-
- return vfb;
-}
-
-/* Get_free_busy handler for the file backend */
-static GList *
-cal_backend_file_get_free_busy (CalBackend *backend, GList *users, time_t start, time_t end)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- gchar *address, *name;
- icalcomponent *vfb;
- char *calobj;
- GList *obj_list = NULL;
- GList *l;
-
- 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);
-
- if (users == NULL) {
- if (mail_account_get_default (priv->db, &address, &name)) {
- vfb = create_user_free_busy (cbfile, address, name, start, end);
- calobj = icalcomponent_as_ical_string (vfb);
- obj_list = g_list_append (obj_list, g_strdup (calobj));
- icalcomponent_free (vfb);
- g_free (address);
- g_free (name);
- }
- } else {
- for (l = users; l != NULL; l = l->next ) {
- address = l->data;
- if (mail_account_is_valid (priv->db, address, &name)) {
- vfb = create_user_free_busy (cbfile, address, name, start, end);
- calobj = icalcomponent_as_ical_string (vfb);
- obj_list = g_list_append (obj_list, g_strdup (calobj));
- icalcomponent_free (vfb);
- g_free (name);
- }
- }
- }
-
- return obj_list;
-}
-
-typedef struct
-{
- CalBackend *backend;
- CalObjType type;
- 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 ();
- if (be_data->type == GNOME_Evolution_Calendar_TYPE_TODO)
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
- else
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
- 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, g_strdup (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, g_strdup (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, g_strdup (uid));
- break;
- }
- }
-
- /* Calculate deletions */
- be_data.backend = backend;
- be_data.type = type;
- 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);
- g_free (uid);
- }
- 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);
-}
-
-/* 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 += cal_util_generate_alarms_for_list (priv->events, start, end,
- &comp_alarms, resolve_tzid,
- priv->icalcomp);
- n_comp_alarms += cal_util_generate_alarms_for_list (priv->todos, start, end,
- &comp_alarms, resolve_tzid,
- priv->icalcomp);
-
- 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);
-
- cal_backend_util_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 = cal_util_generate_alarms_for_comp (comp, start, end, resolve_tzid, priv->icalcomp);
- if (alarms) {
- cal_backend_util_fill_alarm_instances_seq (&corba_alarms->alarms, alarms->alarms);
- cal_component_alarms_free (alarms);
- } else
- cal_backend_util_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 = CAL_BACKEND (cbfile)->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 = CAL_BACKEND (cbfile)->clients; l; l = l->next) {
- Cal *cal;
-
- cal = CAL (l->data);
- cal_notify_remove (cal, uid);
- }
-}
-
-/* Used from g_hash_table_foreach_remove(); removes and frees a category */
-static gboolean
-remove_category_cb (gpointer key, gpointer value, gpointer data)
-{
- Category *c;
-
- c = value;
- g_free (c->name);
- g_free (c);
-
- return TRUE;
-}
-
-/* Clears the table of removed categories */
-static void
-clean_removed_categories (CalBackendFile *cbfile)
-{
- CalBackendFilePrivate *priv;
-
- priv = cbfile->priv;
-
- g_hash_table_foreach_remove (priv->removed_categories,
- remove_category_cb,
- NULL);
-}
-
-/* Update_objects handler for the file backend. */
-static gboolean
-cal_backend_file_update_objects (CalBackend *backend, const char *calobj)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- icalcomponent *toplevel_comp, *icalcomp = NULL;
- icalcomponent_kind kind;
- CalComponent *old_comp;
- CalComponent *comp;
- const char *comp_uid;
- int old_n_categories, new_n_categories;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- g_return_val_if_fail (calobj != NULL, FALSE);
-
- /* Pull the component from the string and ensure that it is sane */
-
- toplevel_comp = icalparser_parse_string ((char *) calobj);
-
- if (!toplevel_comp)
- return FALSE;
-
- kind = icalcomponent_isa (toplevel_comp);
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- int num_found = 0;
- icalcomponent_kind child_kind;
- icalcomponent *subcomp;
-
- /* We have a VCALENDAR containing the VEVENT/VTODO and the
- related timezone data, so we have to step through it to
- find the actual VEVENT/VTODO component. */
- subcomp = icalcomponent_get_first_component (toplevel_comp,
- ICAL_ANY_COMPONENT);
- while (subcomp) {
- child_kind = icalcomponent_isa (subcomp);
- if (child_kind == ICAL_VEVENT_COMPONENT
- || child_kind == ICAL_VTODO_COMPONENT
- || child_kind == ICAL_VJOURNAL_COMPONENT) {
- icalcomp = subcomp;
- num_found++;
- }
- subcomp = icalcomponent_get_next_component (toplevel_comp,
- ICAL_ANY_COMPONENT);
- }
-
- /* If we didn't find exactly 1 VEVENT/VTODO it is an error. */
- if (num_found != 1) {
- icalcomponent_free (toplevel_comp);
- return FALSE;
- }
-
- } else if (kind == ICAL_VEVENT_COMPONENT
- || kind == ICAL_VTODO_COMPONENT
- || kind == ICAL_VJOURNAL_COMPONENT) {
- icalcomp = toplevel_comp;
- } else {
- /* We don't support this type of component */
- icalcomponent_free (toplevel_comp);
- return FALSE;
- }
-
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
- gtk_object_unref (GTK_OBJECT (comp));
- icalcomponent_free (toplevel_comp);
- return FALSE;
- }
-
- /* Get the UID, and check it isn't empty. */
-
- cal_component_get_uid (comp, &comp_uid);
-
- if (!comp_uid || !comp_uid[0]) {
- gtk_object_unref (GTK_OBJECT (comp));
- if (kind == ICAL_VCALENDAR_COMPONENT)
- icalcomponent_free (toplevel_comp);
- return FALSE;
- }
-
- /* The list of removed categories must be empty because we are about to
- * start a new scanning process.
- */
- g_assert (g_hash_table_size (priv->removed_categories) == 0);
-
- old_n_categories = g_hash_table_size (priv->categories);
-
- /* Update the component */
-
- old_comp = lookup_component (cbfile, comp_uid);
-
- if (old_comp)
- remove_component (cbfile, old_comp);
-
- if (kind == ICAL_VCALENDAR_COMPONENT) {
- /* If we have a VCALENDAR component with child VTIMEZONEs and
- the VEVENT/VTODO, we have to merge it into the existing
- VCALENDAR, resolving any conflicting TZIDs. */
- icalcomponent_merge_component (priv->icalcomp, toplevel_comp);
-
- /* Now we add the component to our local cache, but we pass
- FALSE as the last argument, since we have already added
- the libical component when merging above.*/
- add_component (cbfile, comp, FALSE);
- } else {
- add_component (cbfile, comp, TRUE);
- }
-
- new_n_categories = g_hash_table_size (priv->categories);
-
- mark_dirty (cbfile);
-
- notify_update (cbfile, comp_uid);
-
- if (old_n_categories != new_n_categories ||
- g_hash_table_size (priv->removed_categories) != 0) {
- clean_removed_categories (cbfile);
- notify_categories_changed (cbfile);
- }
-
- 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;
-
- /* The list of removed categories must be empty because we are about to
- * start a new scanning process.
- */
- g_assert (g_hash_table_size (priv->removed_categories) == 0);
-
- remove_component (cbfile, comp);
-
- mark_dirty (cbfile);
-
- notify_remove (cbfile, uid);
-
- if (g_hash_table_size (priv->removed_categories) != 0) {
- clean_removed_categories (cbfile);
- notify_categories_changed (cbfile);
- }
-
- return TRUE;
-}
-
-
-static icaltimezone*
-cal_backend_file_get_timezone (CalBackend *backend, const char *tzid)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- if (!strcmp (tzid, "UTC"))
- return icaltimezone_get_utc_timezone ();
- else
- return icalcomponent_get_timezone (priv->icalcomp, tzid);
-}
-
diff --git a/calendar/pcs/cal-backend-file.h b/calendar/pcs/cal-backend-file.h
deleted file mode 100644
index 16ac6b4c64..0000000000
--- a/calendar/pcs/cal-backend-file.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Evolution calendar - iCalendar file backend
- *
- * Copyright (C) 2000 Ximian, 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-util.c b/calendar/pcs/cal-backend-util.c
deleted file mode 100644
index e2d138e372..0000000000
--- a/calendar/pcs/cal-backend-util.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - generic backend class
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: 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 "cal-backend-util.h"
-
-void
-cal_backend_util_fill_alarm_instances_seq (GNOME_Evolution_Calendar_CalAlarmInstanceSeq *seq,
- GSList *alarms)
-{
- int n_alarms;
- GSList *l;
- int i;
-
- g_return_if_fail (seq != NULL);
-
- 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_start = (long) instance->occur_start;
- corba_instance->occur_end = (long) instance->occur_end;
- }
-}
diff --git a/calendar/pcs/cal-backend-util.h b/calendar/pcs/cal-backend-util.h
deleted file mode 100644
index 2d9c9bd554..0000000000
--- a/calendar/pcs/cal-backend-util.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - generic backend class
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: 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_UTIL_H
-#define CAL_BACKEND_UTIL_H
-
-#include <cal-backend.h>
-
-BEGIN_GNOME_DECLS
-
-void cal_backend_util_fill_alarm_instances_seq (
- GNOME_Evolution_Calendar_CalAlarmInstanceSeq *seq, GSList *alarms);
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
deleted file mode 100644
index ae2bd328eb..0000000000
--- a/calendar/pcs/cal-backend.c
+++ /dev/null
@@ -1,780 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - generic backend class
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * JP Rosevear <jpr@ximian.com>
- * 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/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,
- CAL_ADDED,
- 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[CAL_ADDED] =
- gtk_signal_new ("cal_added",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalBackendClass, cal_added),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
- 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->open = NULL;
- class->is_loaded = NULL;
- class->get_mode = NULL;
- class->set_mode = NULL;
- class->get_n_objects = NULL;
- class->get_object = NULL;
- class->get_object_component = NULL;
- class->get_timezone_object = NULL;
- class->get_uids = NULL;
- class->get_objects_in_range = NULL;
- class->get_free_busy = NULL;
- class->get_changes = NULL;
- class->get_alarms_in_range = NULL;
- class->get_alarms_for_object = NULL;
- class->update_objects = 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);
-}
-
-/* Callback used when a Cal is destroyed */
-static void
-cal_destroy_cb (GtkObject *object, gpointer data)
-{
- Cal *cal;
- Cal *lcal;
- CalBackend *backend;
- GList *l;
-
- cal = CAL (object);
-
- backend = CAL_BACKEND (data);
-
- /* Find the cal in the list of clients */
-
- for (l = backend->clients; l; l = l->next) {
- lcal = CAL (l->data);
-
- if (lcal == cal)
- break;
- }
-
- g_assert (l != NULL);
-
- /* Disconnect */
-
- backend->clients = g_list_remove_link (backend->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 (!backend->clients)
- cal_backend_last_client_gone (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_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);
-
- backend->clients = g_list_prepend (backend->clients, cal);
-
- /* notify backend that a new Cal has been added */
- gtk_signal_emit (GTK_OBJECT (backend),
- cal_backend_signals[CAL_ADDED],
- 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_mode:
- * @backend: A calendar backend.
- *
- * Queries whether a calendar backend is connected remotely.
- *
- * Return value: The current mode the calendar is in
- **/
-CalMode
-cal_backend_get_mode (CalBackend *backend)
-{
- CalMode result;
-
- g_return_val_if_fail (backend != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE);
-
- g_assert (CLASS (backend)->get_mode != NULL);
- result = (* CLASS (backend)->get_mode) (backend);
-
- return result;
-}
-
-
-/**
- * cal_backend_set_mode:
- * @backend: A calendar backend
- * @mode: Mode to change to
- *
- * Sets the mode of the calendar
- *
- **/
-void
-cal_backend_set_mode (CalBackend *backend, CalMode mode)
-{
- g_return_if_fail (backend != NULL);
- g_return_if_fail (IS_CAL_BACKEND (backend));
-
- g_assert (CLASS (backend)->set_mode != NULL);
- (* CLASS (backend)->set_mode) (backend, mode);
-}
-
-/**
- * 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.
- **/
-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_object_component:
- * @backend: A calendar backend.
- * @uid: Unique identifier for a calendar object.
- *
- * Queries a calendar backend for a calendar object based on its unique
- * identifier. It returns the CalComponent rather than the string
- * representation.
- *
- * Return value: The CalComponent of the sought object, or NULL if no object
- * had the specified UID.
- **/
-CalComponent *
-cal_backend_get_object_component (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_component != NULL);
- return (* CLASS (backend)->get_object_component) (backend, uid);
-}
-
-/**
- * cal_backend_get_timezone_object:
- * @backend: A calendar backend.
- * @tzid: Unique identifier for a calendar VTIMEZONE object.
- *
- * Queries a calendar backend for a VTIMEZONE calendar object based on its
- * unique TZID identifier.
- *
- * Return value: The string representation of a VTIMEZONE component, or NULL
- * if no VTIMEZONE object had the specified TZID.
- **/
-char *
-cal_backend_get_timezone_object (CalBackend *backend, const char *tzid)
-{
- g_return_val_if_fail (backend != NULL, NULL);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
- g_return_val_if_fail (tzid != NULL, NULL);
-
- g_assert (CLASS (backend)->get_timezone_object != NULL);
- return (* CLASS (backend)->get_timezone_object) (backend, tzid);
-}
-
-/**
- * cal_backend_get_type_by_uid
- * @backend: A calendar backend.
- * @uid: Unique identifier for a Calendar object.
- *
- * Returns the type of the object identified by the @uid argument
- */
-CalObjType
-cal_backend_get_type_by_uid (CalBackend *backend, const char *uid)
-{
- icalcomponent *icalcomp;
- char *comp_str;
- CalObjType type = CAL_COMPONENT_NO_TYPE;
-
- g_return_val_if_fail (IS_CAL_BACKEND (backend), CAL_COMPONENT_NO_TYPE);
- g_return_val_if_fail (uid != NULL, CAL_COMPONENT_NO_TYPE);
-
- comp_str = cal_backend_get_object (backend, uid);
- if (!comp_str)
- return CAL_COMPONENT_NO_TYPE;
-
- icalcomp = icalparser_parse_string (comp_str);
- if (icalcomp) {
- 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);
- }
-
- g_free (comp_str);
-
- return type;
-}
-
-/**
- * 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_free_busy:
- * @backend: A calendar backend.
- * @users: List of users to get free/busy information for.
- * @start: Start time for query.
- * @end: End time for query.
- *
- * Gets a free/busy object for the given time interval
- *
- * Return value: a list of CalObj's
- **/
-GList *
-cal_backend_get_free_busy (CalBackend *backend, GList *users, 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_free_busy != NULL);
- return (* CLASS (backend)->get_free_busy) (backend, users, 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_objects:
- * @backend: A calendar backend.
- * @calobj: String representation of the new calendar object(s).
- *
- * 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_objects (CalBackend *backend, 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 (calobj != NULL, FALSE);
-
- g_assert (CLASS (backend)->update_objects != NULL);
- return (* CLASS (backend)->update_objects) (backend, 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);
-}
-
-
-/**
- * cal_backend_get_timezone:
- * @backend: A calendar backend.
- * @tzid: Unique identifier of a VTIMEZONE object. Note that this must not be
- * NULL.
- *
- * Returns the icaltimezone* corresponding to the TZID, or NULL if the TZID
- * can't be found.
- *
- * Return value: TRUE on success, FALSE on being passed an UID for an object
- * that does not exist in the backend.
- **/
-icaltimezone*
-cal_backend_get_timezone (CalBackend *backend, const char *tzid)
-{
- g_return_val_if_fail (backend != NULL, NULL);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
- g_return_val_if_fail (tzid != NULL, NULL);
-
- g_assert (CLASS (backend)->get_timezone != NULL);
- return (* CLASS (backend)->get_timezone) (backend, tzid);
-}
-
diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h
deleted file mode 100644
index ff5d31d0dd..0000000000
--- a/calendar/pcs/cal-backend.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - generic backend class
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * 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_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;
- GList *clients;
-};
-
-struct _CalBackendClass {
- GtkObjectClass parent_class;
-
- /* Notification signals */
- void (* last_client_gone) (CalBackend *backend);
- void (* cal_added) (CalBackend *backend, Cal *cal);
-
- 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);
-
- CalBackendOpenStatus (* open) (CalBackend *backend, GnomeVFSURI *uri,
- gboolean only_if_exists);
-
- gboolean (* is_loaded) (CalBackend *backend);
-
- /* Mode relate virtual methods */
- CalMode (* get_mode) (CalBackend *backend);
- void (* set_mode) (CalBackend *backend, CalMode mode);
-
- /* General object acquirement and information related virtual methods */
- int (* get_n_objects) (CalBackend *backend, CalObjType type);
- char *(* get_object) (CalBackend *backend, const char *uid);
- CalComponent *(* get_object_component) (CalBackend *backend, const char *uid);
- char *(* get_timezone_object) (CalBackend *backend, const char *tzid);
- GList *(* get_uids) (CalBackend *backend, CalObjType type);
-
- GList *(* get_objects_in_range) (CalBackend *backend, CalObjType type,
- time_t start, time_t end);
- GList *(* get_free_busy) (CalBackend *backend, GList *users, 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_objects) (CalBackend *backend, const char *calobj);
- gboolean (* remove_object) (CalBackend *backend, const char *uid);
-
- /* Timezone related virtual methods */
- icaltimezone *(* get_timezone) (CalBackend *backend, const char *tzid);
-};
-
-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);
-
-CalMode cal_backend_get_mode (CalBackend *backend);
-void cal_backend_set_mode (CalBackend *backend, CalMode mode);
-
-int cal_backend_get_n_objects (CalBackend *backend, CalObjType type);
-
-char *cal_backend_get_object (CalBackend *backend, const char *uid);
-
-CalComponent *cal_backend_get_object_component (CalBackend *backend, const char *uid);
-
-char *cal_backend_get_timezone_object (CalBackend *backend, const char *tzid);
-
-CalObjType cal_backend_get_type_by_uid (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);
-
-GList *cal_backend_get_free_busy (CalBackend *backend, GList *users, 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_objects (CalBackend *backend, const char *calobj);
-
-gboolean cal_backend_remove_object (CalBackend *backend, const char *uid);
-
-icaltimezone* cal_backend_get_timezone (CalBackend *backend, const char *tzid);
-
-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 eaaab55cb2..0000000000
--- a/calendar/pcs/cal-common.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Evolution calendar server - common declarations
- *
- * Copyright (C) 2000 Ximian, 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 32786861bd..0000000000
--- a/calendar/pcs/cal-factory.c
+++ /dev/null
@@ -1,762 +0,0 @@
-/* Evolution calendar factory
- *
- * Copyright (C) 2000 Ximian, 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 "evolution-calendar.h"
-#include "cal.h"
-#include "cal-backend.h"
-#include "cal-factory.h"
-#include "job.h"
-
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
-#define DEFAULT_CAL_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_CalendarFactory"
-
-static BonoboXObjectClass *parent_class;
-
-/* 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;
-
- /* OAFIID of the factory */
- char *iid;
-
- /* Whether we have been registered with OAF yet */
- guint registered : 1;
-};
-
-typedef struct
-{
- CalFactory *factory;
- GNOME_Evolution_Calendar_CalMode mode;
- GNOME_Evolution_Calendar_StringSeq *list;
-} CalFactoryUriData;
-
-/* Signal IDs */
-enum SIGNALS {
- LAST_CALENDAR_GONE,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL];
-
-/* 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));
-}
-
-/* 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), 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;
- const char *method;
- GtkType *type;
- CalBackend *backend;
-
- priv = factory->priv;
-
- method = gnome_vfs_uri_get_scheme (uri);
- 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_OBJREF (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);
-}
-
-/* Add a uri to a string list */
-static void
-add_uri (gpointer key, gpointer value, gpointer data)
-{
- CalFactoryUriData *cfud = data;
- CalFactory *factory = cfud->factory;
- GNOME_Evolution_Calendar_StringSeq *list = cfud->list;
- GNOME_Evolution_Calendar_CalMode mode = cfud->mode;
- char *uri_string = key;
- CalBackend *backend;
- GnomeVFSURI *uri;
-
- switch (mode) {
- case GNOME_Evolution_Calendar_MODE_LOCAL:
- uri = gnome_vfs_uri_new_private (uri_string, TRUE, TRUE, TRUE);
- backend = lookup_backend (factory, uri);
- gnome_vfs_uri_unref (uri);
- if (backend == NULL && cal_backend_get_mode (backend) == CAL_MODE_LOCAL)
- return;
- break;
- case GNOME_Evolution_Calendar_MODE_REMOTE:
- uri = gnome_vfs_uri_new_private (uri_string, TRUE, TRUE, TRUE);
- backend = lookup_backend (factory, uri);
- gnome_vfs_uri_unref (uri);
- if (backend == NULL && cal_backend_get_mode (backend) == CAL_MODE_REMOTE)
- return;
- break;
- case GNOME_Evolution_Calendar_MODE_ANY:
- break;
- }
-
- list->_buffer[list->_length] = CORBA_string_dup (uri_string);
- list->_length++;
-}
-
-/* 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_private (jd->uri, TRUE, TRUE, TRUE);
- 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);
-}
-
-
-
-static void
-impl_CalFactory_open (PortableServer_Servant servant,
- const CORBA_char *str_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;
- GnomeVFSURI *uri;
- const char *method_str;
- GtkType type;
-
- factory = CAL_FACTORY (bonobo_object_from_servant (servant));
- priv = factory->priv;
-
- /* check URI to see if we support it */
-
- uri = gnome_vfs_uri_new_private (str_uri, TRUE, TRUE, TRUE);
- if (!uri) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CalFactory_InvalidURI,
- NULL);
- return;
- }
-
- method_str = gnome_vfs_uri_get_scheme (uri);
- type = g_hash_table_lookup (priv->methods, method_str);
-
- gnome_vfs_uri_unref (uri);
- if (!type) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CalFactory_UnsupportedMethod,
- NULL);
- return;
- }
-
- /* duplicate the listener object */
- 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);
-
- /* add new asynchronous job */
- jd = g_new (OpenJobData, 1);
- jd->factory = factory;
- jd->uri = g_strdup (str_uri);
- jd->only_if_exists = only_if_exists;
- jd->listener = listener_copy;
-
- job_add (open_fn, jd);
-}
-
-static GNOME_Evolution_Calendar_StringSeq *
-impl_CalFactory_uriList (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalMode mode,
- CORBA_Environment *ev)
-{
- CalFactory *factory;
- CalFactoryPrivate *priv;
- CalFactoryUriData cfud;
- GNOME_Evolution_Calendar_StringSeq *list;
-
- factory = CAL_FACTORY (bonobo_object_from_servant (servant));
- priv = factory->priv;
-
- list = GNOME_Evolution_Calendar_StringSeq__alloc ();
- list->_length = 0;
- list->_maximum = g_hash_table_size (priv->backends);
- list->_buffer = CORBA_sequence_CORBA_string_allocbuf (list->_maximum);
-
- cfud.factory = factory;
- cfud.mode = mode;
- cfud.list = list;
- g_hash_table_foreach (priv->backends, add_uri, &cfud);
-
- return list;
-
-}
-
-
-
-/**
- * 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;
-
- factory = gtk_type_new (CAL_FACTORY_TYPE);
-
- return factory;
-}
-
-/* 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) {
- oaf_active_server_unregister (priv->iid, BONOBO_OBJREF (factory));
- priv->registered = FALSE;
- }
- g_free (priv->iid);
-
- g_free (priv);
- factory->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/* Class initialization function for the calendar factory */
-static void
-cal_factory_class_init (CalFactoryClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
- POA_GNOME_Evolution_Calendar_CalFactory__epv *epv = &klass->epv;
-
- parent_class = gtk_type_class (bonobo_object_get_type ());
-
- 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, signals, LAST_SIGNAL);
-
- /* Class method overrides */
- object_class->destroy = cal_factory_destroy;
-
- /* Epv methods */
- epv->open = impl_CalFactory_open;
- epv->uriList = impl_CalFactory_uriList;
-}
-
-/* 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;
-}
-
-BONOBO_X_TYPE_FUNC_FULL (CalFactory,
- GNOME_Evolution_Calendar_CalFactory,
- PARENT_TYPE,
- cal_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.
- * @iid: OAFIID for the factory to be registered.
- *
- * 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, const char *iid)
-{
- CalFactoryPrivate *priv;
- OAF_RegistrationResult result;
- char *tmp_iid;
-
- 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);
-
- /* if iid is NULL, use the default factory OAFIID */
- if (iid)
- tmp_iid = g_strdup (iid);
- else
- tmp_iid = g_strdup (DEFAULT_CAL_FACTORY_OAF_ID);
-
- result = oaf_active_server_register (tmp_iid, BONOBO_OBJREF (factory));
-
- switch (result) {
- case OAF_REG_SUCCESS:
- priv->registered = TRUE;
- priv->iid = tmp_iid;
- 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;
- }
-
- g_free (tmp_iid);
-
- 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 434cb56f81..0000000000
--- a/calendar/pcs/cal-factory.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Evolution calendar factory
- *
- * 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-xobject.h>
-
-#include "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 {
- BonoboXObject object;
-
- /* Private data */
- CalFactoryPrivate *priv;
-};
-
-struct _CalFactoryClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_CalFactory__epv epv;
-
- /* Notification signals */
- void (* last_calendar_gone) (CalFactory *factory);
-};
-
-GtkType cal_factory_get_type (void);
-CalFactory *cal_factory_new (void);
-
-gboolean cal_factory_oaf_register (CalFactory *factory, const char *iid);
-void cal_factory_register_method (CalFactory *factory,
- const char *method,
- GtkType backend_type);
-int cal_factory_get_n_backends (CalFactory *factory);
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
deleted file mode 100644
index 7a21aed95e..0000000000
--- a/calendar/pcs/cal.c
+++ /dev/null
@@ -1,838 +0,0 @@
-/* Evolution calendar client interface object
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * 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 <ical.h>
-#include <bonobo/bonobo-exception.h>
-#include "cal.h"
-#include "query.h"
-#include "wombat.h"
-
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
-
-static BonoboXObjectClass *parent_class;
-
-/* Private part of the Cal structure */
-struct _CalPrivate {
- /* Our backend */
- CalBackend *backend;
-
- /* Listener on the client we notify */
- GNOME_Evolution_Calendar_Listener listener;
-
- /* and a reference to the WombatClient interface */
- GNOME_Evolution_WombatClient wombat_client;
-};
-
-
-/* Cal::get_uri method */
-static CORBA_char *
-impl_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));
-}
-
-static void
-impl_Cal_set_mode (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalMode mode,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- cal_backend_set_mode (priv->backend, mode);
-}
-
-/* Cal::get_n_objects method */
-static CORBA_long
-impl_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
-impl_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 {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
-
- 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 *
-impl_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 *
-impl_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 *
-impl_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) {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidRange);
- 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_free_busy method */
-static GNOME_Evolution_Calendar_CalObjSeq *
-impl_Cal_get_free_busy (PortableServer_Servant servant,
- const GNOME_Evolution_Calendar_UserList *user_list,
- const GNOME_Evolution_Calendar_Time_t start,
- const GNOME_Evolution_Calendar_Time_t end,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- time_t t_start, t_end;
- GList *users = NULL;
- GList *obj_list;
- GNOME_Evolution_Calendar_CalObjSeq *seq;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t_start = (time_t) start;
- t_end = (time_t) end;
-
- if (t_start > t_end || t_start == -1 || t_end == -1) {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidRange);
- return NULL;
- }
-
- /* convert the CORBA user list to a GList */
- if (user_list) {
- int i;
-
- for (i = 0; i < user_list->_length; i++)
- users = g_list_append (users, user_list->_buffer[i]);
- }
-
- /* call the backend's get_free_busy method */
- obj_list = cal_backend_get_free_busy (priv->backend, users, t_start, t_end);
- g_list_free (users);
- if (obj_list) {
- GList *l;
- gint count;
- gint n;
-
- count = g_list_length (obj_list);
-
- seq = GNOME_Evolution_Calendar_CalObjSeq__alloc ();
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = count;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalObj_allocbuf (count);
-
- for (l = obj_list, n = 0; l; l = l->next, n++) {
- gchar *calobj = (gchar *) l->data;
-
- seq->_buffer[n] = CORBA_string_dup (calobj);
- g_free (calobj);
- }
-
- g_list_free (obj_list);
-
- return seq;
- }
-
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
-
- return NULL;
-}
-
-/* Cal::get_alarms_in_range method */
-static GNOME_Evolution_Calendar_CalComponentAlarmsSeq *
-impl_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) {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidRange);
- return NULL;
- }
-
- return seq;
-}
-
-/* Cal::get_alarms_for_object method */
-static GNOME_Evolution_Calendar_CalComponentAlarms *
-impl_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:
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
- return NULL;
-
- case CAL_BACKEND_GET_ALARMS_INVALID_RANGE:
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidRange);
- return NULL;
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* Cal::update_objects method */
-static void
-impl_Cal_update_objects (PortableServer_Servant servant,
- 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_objects (priv->backend, calobj))
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject);
-}
-
-/* Cal::remove_object method */
-static void
-impl_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))
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
-}
-
-/* Cal::getQuery implementation */
-static GNOME_Evolution_Calendar_Query
-impl_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) {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_init (&ev2);
- query_copy = CORBA_Object_duplicate (BONOBO_OBJREF (query), &ev2);
- if (BONOBO_EX (&ev2)) {
- CORBA_exception_free (&ev2);
- g_message ("Cal_get_query(): Could not duplicate the query reference");
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev2);
-
- return query_copy;
-}
-
-/* Cal::get_timezone_object method */
-static GNOME_Evolution_Calendar_CalObj
-impl_Cal_get_timezone_object (PortableServer_Servant servant,
- const GNOME_Evolution_Calendar_CalTimezoneObjUID tzid,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- char *calobj;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- calobj = cal_backend_get_timezone_object (priv->backend, tzid);
-
- if (calobj) {
- CORBA_char *calobj_copy;
-
- calobj_copy = CORBA_string_dup (calobj);
- g_free (calobj);
- return calobj_copy;
- } else {
- bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound);
- return NULL;
- }
-}
-
-/**
- * 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,
- 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 (BONOBO_EX (&ev)) {
- g_message ("cal_construct: could not duplicate the listener");
- priv->listener = CORBA_OBJECT_NIL;
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- /* obtain the WombatClient interface */
- priv->wombat_client = Bonobo_Unknown_queryInterface (
- priv->listener,
- "IDL:GNOME/Evolution/WombatClient:1.0",
- &ev);
- if (BONOBO_EX (&ev)) {
- g_message ("cal_construct: could not get the WombatClient interface");
- priv->wombat_client = CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
-
- priv->backend = backend;
-
- return cal;
-}
-
-/**
- * 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;
-
- 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));
-
- retval = cal_construct (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;
-}
-
-/* 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);
- bonobo_object_release_unref (priv->listener, &ev);
- if (BONOBO_EX (&ev))
- g_message ("cal_destroy(): could not release the listener");
-
- priv->listener = NULL;
- CORBA_exception_free (&ev);
-
- g_free (priv);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Class initialization function for the calendar */
-static void
-cal_class_init (CalClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
- POA_GNOME_Evolution_Calendar_Cal__epv *epv = &klass->epv;
-
- parent_class = gtk_type_class (BONOBO_OBJECT_TYPE);
-
- /* Class method overrides */
- object_class->destroy = cal_destroy;
-
- /* Epv methods */
- epv->_get_uri = impl_Cal_get_uri;
- epv->setMode = impl_Cal_set_mode;
- epv->countObjects = impl_Cal_get_n_objects;
- epv->getObject = impl_Cal_get_object;
- epv->getTimezoneObject = impl_Cal_get_timezone_object;
- epv->getUIDs = impl_Cal_get_uids;
- epv->getChanges = impl_Cal_get_changes;
- epv->getObjectsInRange = impl_Cal_get_objects_in_range;
- epv->getFreeBusy = impl_Cal_get_free_busy;
- epv->getAlarmsInRange = impl_Cal_get_alarms_in_range;
- epv->getAlarmsForObject = impl_Cal_get_alarms_for_object;
- epv->updateObjects = impl_Cal_update_objects;
- epv->removeObject = impl_Cal_remove_object;
- epv->getQuery = impl_Cal_get_query;
-}
-
-
-/* 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;
-}
-
-BONOBO_X_TYPE_FUNC_FULL (Cal, GNOME_Evolution_Calendar_Cal, PARENT_TYPE, cal);
-
-/**
- * cal_notify_mode:
- * @cal: A calendar client interface.
- * @status: Status of the mode set.
- * @mode: The current mode.
- *
- * Notifys the listener of the results of a setMode call.
- **/
-void
-cal_notify_mode (Cal *cal,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode)
-{
- CalPrivate *priv;
- CORBA_Environment ev;
-
- g_return_if_fail (cal != NULL);
- g_return_if_fail (IS_CAL (cal));
-
- priv = cal->priv;
- g_return_if_fail (priv->listener != CORBA_OBJECT_NIL);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyCalSetMode (priv->listener, status, mode, &ev);
-
- if (BONOBO_EX (&ev))
- g_message ("cal_notify_mode(): could not notify the listener "
- "about a mode change");
-
- CORBA_exception_free (&ev);
-}
-
-/**
- * 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 (BONOBO_EX (&ev))
- 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 (BONOBO_EX (&ev))
- g_message ("cal_notify_remove(): could not notify the listener "
- "about a removed object");
-
- CORBA_exception_free (&ev);
-}
-
-/**
- * cal_notify_categories_changed:
- * @cal: A calendar client interface.
- * @categories: List of categories.
- *
- * Notifies a listener attached to a calendar client interface object about the
- * current set of categories in a calendar backend.
- **/
-void
-cal_notify_categories_changed (Cal *cal, GNOME_Evolution_Calendar_StringSeq *categories)
-{
- CalPrivate *priv;
- CORBA_Environment ev;
-
- g_return_if_fail (cal != NULL);
- g_return_if_fail (IS_CAL (cal));
- g_return_if_fail (categories != NULL);
-
- priv = cal->priv;
- g_return_if_fail (priv->listener != CORBA_OBJECT_NIL);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyCategoriesChanged (priv->listener, categories, &ev);
-
- if (BONOBO_EX (&ev))
- g_message ("cal_notify_categories_changed(): Could not notify the listener "
- "about the current set of categories");
-
- CORBA_exception_free (&ev);
-}
-
-/**
- * cal_get_password:
- * @cal: A calendar client interface.
- * @prompt: The message to show to the user when asking for the password.
- * @key: A key associated with the password being asked.
- *
- * Gets a password from the calendar client this Cal knows about. It does
- * so by using the WombatClient interface being used by the corresponding
- * CalClient.
- *
- * Returns: a password entered by the user.
- */
-char *
-cal_get_password (Cal *cal, const char *prompt, const char *key)
-{
- CalPrivate *priv;
- CORBA_Environment ev;
- CORBA_char *pwd;
-
- g_return_val_if_fail (cal != NULL, NULL);
- g_return_val_if_fail (IS_CAL (cal), NULL);
-
- priv = cal->priv;
- g_return_val_if_fail (priv->wombat_client != CORBA_OBJECT_NIL, NULL);
-
- CORBA_exception_init (&ev);
- pwd = GNOME_Evolution_WombatClient_getPassword (
- priv->wombat_client,
- (const CORBA_char *) prompt,
- (const CORBA_char *) key,
- &ev);
- if (BONOBO_EX (&ev)) {
- g_message ("cal_get_password: could not get password from associated WombatClient");
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- return pwd;
-}
-
-/**
- * cal_forget_password:
- * @cal: A calendar client interface.
- * @key: A key associated with the password to be forgotten.
- *
- * Notifies the associated calendar client that it should forget
- * about the password identified by @key, so that next time the backend
- * asks the client about it, the client would ask again the user for it.
- * This is done in cases where the password supplied the first time
- * was not a valid password and the backend needs the user to enter
- * a new one.
- */
-void
-cal_forget_password (Cal *cal, const char *key)
-{
- CalPrivate *priv;
- CORBA_Environment ev;
-
- g_return_if_fail (cal != NULL);
- g_return_if_fail (IS_CAL (cal));
-
- priv = cal->priv;
- g_return_if_fail (priv->wombat_client != CORBA_OBJECT_NIL);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_WombatClient_forgetPassword (
- priv->wombat_client,
- (const CORBA_char *) key,
- &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("cal_forget_password: could not notify WombatClient about "
- "password to be forgotten");
- }
-
- CORBA_exception_free (&ev);
-}
diff --git a/calendar/pcs/cal.h b/calendar/pcs/cal.h
deleted file mode 100644
index d9302309b9..0000000000
--- a/calendar/pcs/cal.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Evolution calendar client interface object
- *
- * Copyright (C) 2000 Ximian, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * 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_H
-#define CAL_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-xobject.h>
-#include "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 {
- BonoboXObject object;
-
- /* Private data */
- CalPrivate *priv;
-};
-
-struct _CalClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_Cal__epv epv;
-};
-
-GtkType cal_get_type (void);
-
-Cal *cal_construct (Cal *cal,
- CalBackend *backend,
- GNOME_Evolution_Calendar_Listener listener);
-
-Cal *cal_new (CalBackend *backend, GNOME_Evolution_Calendar_Listener listener);
-
-void cal_notify_mode (Cal *cal,
- GNOME_Evolution_Calendar_Listener_SetModeStatus status,
- GNOME_Evolution_Calendar_CalMode mode);
-void cal_notify_update (Cal *cal, const char *uid);
-void cal_notify_remove (Cal *cal, const char *uid);
-
-void cal_notify_categories_changed (Cal *cal, GNOME_Evolution_Calendar_StringSeq *categories);
-
-char *cal_get_password (Cal *cal, const char *prompt, const char *key);
-void cal_forget_password (Cal *cal, const char *key);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/pcs/job.c b/calendar/pcs/job.c
deleted file mode 100644
index 6519db8d4a..0000000000
--- a/calendar/pcs/job.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* GNOME personal calendar server - job manager
- *
- * Copyright (C) 2000 Ximian, 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 4e5eadad4e..0000000000
--- a/calendar/pcs/job.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* GNOME personal calendar server - job manager
- *
- * Copyright (C) 2000 Ximian, 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 3efd2bde50..0000000000
--- a/calendar/pcs/query.c
+++ /dev/null
@@ -1,1431 +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"
-
-
-
-/* States of a query */
-typedef enum {
- QUERY_START_PENDING, /* the query is not populated yet */
- QUERY_IN_PROGRESS, /* the query is populated; components are still being processed */
- QUERY_DONE, /* the query is done, but still accepts object changes */
- QUERY_PARSE_ERROR /* a parse error occurred when initially creating the ESexp */
-} QueryState;
-
-/* 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 and the current state */
- guint idle_id;
- QueryState state;
-
- /* 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->idle_id = 0;
- priv->state = QUERY_START_PENDING;
-
- 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.
- *
- * FIXME: TIMEZONES - need to use a timezone or daylight saving changes will
- * make the result incorrect.
- */
-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.
- *
- * FIXME: TIMEZONES - this uses the current Unix timezone.
- */
-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.
- *
- * FIXME: TIMEZONES - this uses the current Unix timezone.
- */
-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;
-}
-
-/* Call the backend function to get a timezone from a TZID. */
-static icaltimezone*
-resolve_tzid (const char *tzid, gpointer data)
-{
- Query *query = data;
-
- if (!tzid || !tzid[0])
- return NULL;
- else
- return cal_backend_get_timezone (query->priv->backend, tzid);
-}
-
-
-/* (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,
- resolve_tzid, query);
-
- 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_strstrcasedecomp (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_strstrcasedecomp (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+)
- * (has-categories? #f)
- *
- * STR - At least one string specifying a category
- * Or you can specify a single #f (boolean false) value for components
- * that have no categories assigned to them ("unfiled").
- *
- * 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;
- gboolean unfiled;
- 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;
- }
-
- if (argc == 1 && argv[0]->type == ESEXP_RES_BOOL)
- unfiled = TRUE;
- else
- unfiled = FALSE;
-
- if (!unfiled)
- 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 or one and only one "
- "argument to be a boolean false (#f)"));
- return NULL;
- }
-
- /* Search categories. First, if there are no categories we return
- * whether unfiled components are supposed to match.
- */
-
- cal_component_get_categories_list (comp, &categories);
- if (!categories) {
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = unfiled;
-
- return result;
- }
-
- /* Otherwise, we *do* have categories but unfiled components were
- * requested, so this component does not match.
- */
- if (unfiled) {
- 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;
-}
-
-/* (is-completed?)
- *
- * Returns a boolean indicating whether the component is completed (i.e. has
- * a COMPLETED property. This is really only useful for TODO components.
- */
-static ESExpResult *
-func_is_completed (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- Query *query;
- QueryPrivate *priv;
- CalComponent *comp;
- ESExpResult *result;
- struct icaltimetype *t;
- gboolean complete = FALSE;
-
- 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, _("is-completed? expects 0 arguments"));
- return NULL;
- }
-
- cal_component_get_completed (comp, &t);
- if (t) {
- complete = TRUE;
- cal_component_free_icaltimetype (t);
- }
-
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = complete;
-
- return result;
-}
-
-/* (completed-before? TIME)
- *
- * TIME - time_t
- *
- * Returns a boolean indicating whether the component was completed on or
- * before the given time (i.e. it checks the COMPLETED property).
- * This is really only useful for TODO components.
- */
-static ESExpResult *
-func_completed_before (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- Query *query;
- QueryPrivate *priv;
- CalComponent *comp;
- ESExpResult *result;
- struct icaltimetype *tt;
- icaltimezone *zone;
- gboolean retval = FALSE;
- time_t before_time, completed_time;
-
- 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, _("completed-before? expects 1 argument"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("completed-before? expects argument 1 "
- "to be a time_t"));
- return NULL;
- }
- before_time = argv[0]->value.time;
-
- cal_component_get_completed (comp, &tt);
- if (tt) {
- /* COMPLETED must be in UTC. */
- zone = icaltimezone_get_utc_timezone ();
- completed_time = icaltime_as_timet_with_zone (*tt, zone);
-
-#if 0
- g_print ("Query Time : %s", ctime (&before_time));
- g_print ("Completed Time: %s", ctime (&completed_time));
-#endif
-
- /* We want to return TRUE if before_time is after
- completed_time. */
- if (difftime (before_time, completed_time) > 0) {
-#if 0
- g_print (" Returning TRUE\n");
-#endif
- retval = TRUE;
- }
-
- cal_component_free_icaltimetype (tt);
- }
-
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = retval;
-
- 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 },
- { "is-completed?", func_is_completed },
- { "completed-before?", func_completed_before }
-};
-
-/* 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;
-}
-
-/* Ensures that the sexp has been parsed and the ESexp has been created. If a
- * parse error occurs, it sets the query state to QUERY_PARSE_ERROR and returns
- * FALSE.
- */
-static gboolean
-ensure_sexp (Query *query)
-{
- QueryPrivate *priv;
-
- priv = query->priv;
-
- if (priv->state == QUERY_PARSE_ERROR)
- g_assert_not_reached (); /* we should already have terminated everything */
-
- if (priv->esexp)
- return TRUE;
-
- /* Compile the query string */
-
- priv->esexp = create_sexp (query);
-
- 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;
- CORBA_Environment ev;
-
- /* Change the state and disconnect from any notifications */
-
- priv->state = QUERY_PARSE_ERROR;
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->backend), query);
-
- /* Report the error to the listener */
-
- 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 ("ensure_sexp(): Could not notify the listener of "
- "a parse error");
-
- CORBA_exception_free (&ev);
-
- e_sexp_unref (priv->esexp);
- priv->esexp = NULL;
-
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* 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;
- CalComponent *comp;
- ESExpResult *result;
-
- priv = query->priv;
-
- g_assert (priv->state != QUERY_PARSE_ERROR);
-
- if (!ensure_sexp (query))
- return;
-
- comp = cal_backend_get_object_component (priv->backend, uid);
- g_assert (comp != NULL);
- gtk_object_ref (GTK_OBJECT (comp));
-
- /* 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) {
- CORBA_Environment ev;
-
- g_assert (priv->n_pending == 0);
-
- priv->idle_id = 0;
- priv->state = QUERY_DONE;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_QueryListener_notifyQueryDone (
- priv->ql,
- GNOME_Evolution_Calendar_QueryListener_SUCCESS,
- "",
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("process_component_cb(): Could not notify the listener of "
- "a finished query");
-
- CORBA_exception_free (&ev);
-
- 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);
- g_assert (priv->state == QUERY_START_PENDING);
-
- 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);
- priv->state = QUERY_IN_PROGRESS;
-}
-
-/* Idle handler for starting a query */
-static gboolean
-start_query_cb (gpointer data)
-{
- Query *query;
- QueryPrivate *priv;
-
- query = QUERY (data);
- priv = query->priv;
-
- priv->idle_id = 0;
-
- if (!ensure_sexp (query))
- 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 e332b20150..0000000000
--- a/camel/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
-camel-lock-helper
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 eb27d0fe62..0000000000
--- a/camel/ChangeLog
+++ /dev/null
@@ -1,15313 +0,0 @@
-2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (delete_folder): Remove any
- cached messages that belonged to the deleted folder.
- (subscribe_folder): Don't ever let the info->name be NULL and
- don't use the stupid concat kludge to generate the URL, just use a
- CamelURL to do it. This way we don't risk breaking stuff by having
- a url like imap://fejj@imap//folder
-
- * camel-charset-map.c (camel_charset_to_iconv): If the charset is
- x-unknown, return the locale_charset.
-
-2001-10-01 Dan Winship <danw@ximian.com>
-
- * camel-provider.h: Fix up the provider flags to specify things
- more completely so we don't have to hardcode provider names in the
- mailer.
-
- * providers/local/camel-local-provider.c: MH, mbox, and Maildir
- are LOCAL. MH and mbox are no longer STORAGE by the new
- definition.
-
- * camel-session.c (vee_provider): The vfolder store is a STORAGE.
-
-2001-10-01 Dan Winship <danw@ximian.com>
-
- * providers/local/camel-local-store.c (construct): Don't munge the
- URL; CamelSession's caching relies on it not changing. Instead,
- add a toplevel_dir field to CamelLocalStore, and set that to the
- path, but always ending with /.
- (camel_local_store_finalize): Free toplevel_dir
- (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
- than url->path.
-
- * providers/local/*: Lots of s/url->path/toplevel_dir/
-
- * providers/local/camel-spool-store.c (construct): Likewise, don't
- try to strip a trailing / from url->path here, but I didn't make
- the corresponding toplevel_dir change, because there's no good
- reason someone should expect "/var/spool/mail/danw/" to work since
- that's not a directory.
-
- * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
- returns 0, don't bother sending UIDL. Speeds things up slightly
- and also works around a bug in a particular random POP server.
- (ximian bug 11369).
-
-2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
- --no-greeting to the gpg command-line options.
- (pgp_clearsign): Same.
- (pgp_verify): Here too.
- (pgp_encrypt): And here.
- (pgp_decrypt): And finally here.
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-search.c (get_source): Same here.
-
- * camel-mime-message.c (camel_mime_message_set_source): Don't use
- the e_url_shroud hack, use CamelURL functions instead.
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/nntp/camel-nntp-provider.c
- (camel_provider_module_init): Init the nntp url hash and url_equal
- functions.
-
- * providers/sendmail/camel-sendmail-provider.c
- (camel_provider_module_init): Init the sendmail url hash and
- url_equal functions.
-
- * providers/smtp/camel-smtp-provider.c
- (camel_provider_module_init): Init the smtp url hash and url_equal
- functions.
-
- * providers/pop3/camel-pop3-provider.c
- (camel_provider_module_init): Init the pop3 url hash and url_equal
- functions.
-
- * providers/imap/camel-imap-provider.c
- (camel_provider_module_init): Init the imap url hash and url_equal
- functions.
-
- * providers/local/camel-local-provider.c
- (camel_provider_module_init): Init the local url hash and
- url_equal functions.
-
- * camel-session.c (camel_session_class_init): Init the vfolder url
- hash and url_equal functions.
-
- * camel-provider.h: Added url_hash and url_equal function pointers
- to the structure.
-
- * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
- CamelFolder is not a CamelFolderClass.
-
-2001-09-28 Dan Winship <danw@ximian.com>
-
- * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
- an SSL * instead of a CamelTcpStreamSSL *, since it can get called
- from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
- right yet. Fixes a crash on connection failure.
-
-2001-09-27 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c
- (camel_imap_folder_fetch_data): Grab the store's command_lock
- before grabbing the folder's cache_lock to prevent deadlock if
- another thread is processing an EXPUNGE response.
-
- * providers/imap/camel-imap-folder.c
- (imap_expunge_uids_resyncing): Fix a compiler warning that might
- point out a real bug...
-
- * providers/imap/camel-imap-folder.c (get_content): and one that
- doesn't
-
-2001-09-27 <NotZed@Ximian.com>
-
- * camel-service.c (camel_service_connect): Dont re-register the
- connect_op if we got it by calling 'operation_registered', which
- returns an already-registered one.
- (camel_service_disconnect): Likewise here. This removes all the
- re-registered warnings.
-
- * camel-object.c (camel_object_unref): Fill the finalised data
- with nonsense, rather than 0's - more easily detect bad data.
- (camel_object_new): Clear instance data when we retrieve it off
- the list.
-
- * camel-object.h (_CamelObject): Added an event lock pointer for
- uh, locking event stuff. Also change the hooklist hashtable into
- a list. Changed all the code to handle it. Result: thread-safe
- events, event-hooks, and save memory too, and SHOULD FINALLY FIX
- THAT UNREAD COUNT PROBLEM.
-
-2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
- stream before parsing it into a MIME part. This fixes bug #10521.
-
- * camel-store.c: Remove the old folder from the vTrash folder.
-
-2001-09-27 Dan Winship <danw@ximian.com>
-
- * camel-service.c: Change "gboolean connected" to
- "CamelServiceConnectionStatus status", which can be disconnected,
- connecting, connected, or disconnecting.
- (camel_service_init, camel_service_finalize): create/destroy the
- connect_op_lock. Refer to service->status rather than
- service->connected.
- (camel_service_connect): When connecting, note the current
- operation (and create a new one if there's none registered) and
- mark the connection "connecting" until we succeed or fail.
- (camel_service_disconnect): Likewise in reverse.
- (camel_service_cancel_connect): New function to cancel a
- connection attempt.
- (cancel_connect): Default implementation: Call
- camel_operation_cancel on the connect_op.
-
- * camel-disco-store.c (disco_connect): Only call
- CamelRemoteStore's connect func if we're online.
- (disco_cancel_connect): Fall back to offline if a connection gets
- cancelled.
- (disco_get_folder_info): Kludge: call connect explicitly before
- deciding whether to do the online or offline version, so if the
- connect fails, we fall back correctly.
-
- * camel-session.c (camel_session_get_service_connected):
- s/svc->connected/svc->status/
-
- * camel-remote-store.c (camel_remote_store_finalise):
- Change service->connected check to service->status check.
- (remote_connect): Don't set service->connected here:
- camel_service_connect() itself does that.
-
- * camel-operation.c (camel_operation_registered): Deal with the
- possibility that there's no registered op.
-
-2001-09-26 <NotZed@Ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message): If
- we get a search error, just abort, dont try and fall back and copy
- to inbox.
- (camel_filter_driver_filter_message): Make sure we ALWAYS use
- exceptions for important things - like moving messages to inbox!
- (camel_filter_driver_filter_message): If we have the source
- folder, use camel_folder_set_message_flags rather then poking the
- info directly, which skips changed events. This means filtering
- immediate doesn't lose changed events.
- (do_flag): Same here.
- (do_colour): Same thing but using set_tag.
- (do_score): Same again.
- (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
- set_flags, just saves typing.
- (open_folder): We cache folders that we couldn't open as well as
- those ones we could. Use magic token FOLDER_INVALID =
- (void *)~0 as the marker.
- (close_folder): Handle FOLDER_INVALID case properly.
-
-2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-message.c
- (camel_mime_message_get_part_by_content_id): New function to
- convenience Larry ;-)
- (check_content_id): Oops, return !found instead of found. This
- callback has to return whether or not to keep searching, not
- whether or not it found what it's looking for. Do'h!
-
- * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
- some code if ENABLE_PEDANTIC_PGPMIME is not defined.
-
-2001-09-26 <NotZed@Ximian.com>
-
- * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
-
- * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
- changed list separately.
- (camel_vee_folder_remove_folder): "
- (camel_vee_folder_set_folders): Use changed_lock for changed list.
- (vee_refresh_info): Use changed_lock, also just grab the list,
- reset it in the lock, and do the work unlocked.
- (vee_sync): Use changed lock for changed list.
- (folder_changed): ". All this kills a deadlock with sync/expunge.
-
- * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
- the folders-changed list.
- (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
- thanks to a pedantic.
-
-2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Fix Ettore's fix.
-
-2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
- remember argument.
- (pgp_sign): Only uncache the passphrase on failure.
- (pgp_clearsign): Same.
- (pgp_encrypt): Here too.
- (pgp_decrypt): And here.
- (pass_free): New function to zero the passphrase before freeing
- it.
-
-2001-09-25 Ettore Perazzoli <ettore@ximian.com>
-
- [Patch for Automake 1.5 compatibility pointed out by Richard
- Boulton <richard@tartarus.org>, as per #9258.]
-
- * providers/nntp/Makefile.am: Remove some commented parts that
- make Automake 1.5 choke.
-
- * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
- compatibility.
-
-2001-09-25 <NotZed@Ximian.com>
-
- * camel-folder.c (get_unread_message_count): Only unref info if we
- got it.
-
- * camel-operation.c (camel_operation_unref): Fix for !threads
- enabled not ccompiling.
- (camel_operation_ref): Assert refcount > 0.
- (struct _CamelOperation): Removed the lock. On further
- investigation, I dont think this will always work, the
- registration operations assume that a lookup in the
- operation_active table will return a ref, that will remain valid
- until we ref it, which needn't be the case. So now i'm using a
- single global lock, since we'd need to do that for unref anyway,
- and every operation is fast & memory-bound. Changed all the code
- to handle this.
- (camel_operation_progress_count): Since the code is identical,
- just call progress() for now.
- (camel_operation_register): No longer refcount, use unref to
- check/clear the active table.
- (camel_operation_unregister): Same here.
- (camel_operation_unref): Check if operation is in active table, if
- so, warn, remove.
-
-2001-09-25 Dan Winship <danw@ximian.com>
-
- * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
- SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
- there's a perfectly good reason that the API works this way. No,
- really.
- (stream_read, stream_write): use my_SSL_read and my_SSL_write.
- Fixes at least ximian 8593, and probably 6024 and maybe 10366,
- at least for OpenSSL. There may be a parallel NSS bug?
-
-2001-09-25 <NotZed@Ximian.com>
-
- * camel-stream-buffer.c (stream_write_all): A "safe write"
- function that always writes out all data asked of it, till
- finished.
- (stream_write): Rewritten. What was i on when i wrote that
- originally, how did it ever work with tcp streams ...
-
-2001-09-24 <NotZed@Ximian.com>
-
- * camel-folder.c (append_message): Set the exception to
- FOLDER_INVALID rather than making out it worked. A fix for #7025.
- (search_by_expression): Here too.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): In the
- 'lose' case, free messages, not fetch_data twice!
-
- * camel-filter-search.c (check_header): If the type is encoded,
- get the fallback charset from the message content-type.
-
- * camel-mime-part-utils.c (check_html_charset): Dont check for
- charset==null before calling charset_to_iconv.
- (simple_data_wrapper_construct_from_parser): "
-
- * camel-mime-message.c (process_header): Try use content-type
- charset param as the fallback charset.
-
- * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
- NULL, return NULL.
-
- * camel-folder-summary.c (camel_folder_summary_format_address):
- (camel_folder_summary_format_string): Made private again, removed
- #warning about it. Renamed to s/camel_folder//.
- (summary_format_string): Take default charset param.
- (camel_message_info_new_from_header, message_info_new): Decode
- content-type field to get the charset parameter to use as the
- default charset for decoding strings.
-
- * camel-search-private.c (camel_search_header_match): Pass NULL as
- the charset, the locale charset is always tried.
- (camel_search_header_match): Supply a default_charset parameter to
- be used with TYPE_ENCODED params.
-
- * camel-mime-utils.c
- (header_param): get rid of the g_strcasecmp crap.
- (header_set_param): Same here.
- (header_decode_param_list): And here.
- (header_decode_text): Totally rewritten. 30% of its size. If the
- word is not rfc2047 encoded, always try default_charset if
- supplied, if that fails, try locale charset if it exists, if that
- fails then assume latin1/7 bit ascii.
- (append_8bit): Changed to return FALSE if we can't convert for
- whatever reason, and dont append anything.
-
- * camel-mime-part.h (struct _CamelMimePart): Move content_type and
- headers out of the 'private' section.
-
- * camel-mime-part.c (get_headers): Dont do any conversion on the
- header.
- (process_header): Get the content-type charset as the fallback
- charset for decode_string.
- (construct_from_parser): IF we have a content-type header, process
- it before doing anything else, so we have access to a fallback
- charset for invalid headers.
-
-2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
- the user if the session isn't interactive.
- (errlib_error_to_errno): Make the default errno EINTR so that we
- act just like CamelTcpStreamSSL.
-
- * camel-pgp-context.c (pgp_sign): When the password is not
- provided, set the exception to USER_CANCEL.
- (pgp_clearsign): Same.
- (pgp_encrypt): And here.
- (pgp_decrypt): Here too.
-
-2001-09-21 <NotZed@Ximian.com>
-
- * camel-store.c (create_folder): Set the exception if
- create_folder isn't implemented.
-
-2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (create_folder): Go back to
- not using camel_folder_info_build() here because this seems to
- break folder creation (returning nodes from the root path when it
- shouldn't be?).
-
-2001-09-21 <NotZed@Ximian.com>
-
- * camel-vee-store.c (vee_get_folder_info): Force a refresh of
- vfolders before storing their count. This essentially makes
- 'get_folderinfo' refresh all vfolders, so that get-mail works as
- expected.
-
- * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
- (folder_changed): If we're not autoupdating the folder, then
- add this folder to the list of 'changed' folders for this vfolder.
- (camel_vee_folder_set_expression): Reset the folders_changed list.
- (camel_vee_folder_remove_folder): Remove the folder from the
- folders_changed list.
- (camel_vee_folder_set_folders): If we have a folder already, but
- its changed, use this opportunity to update it.
- (vee_sync): Remove any synced folders from the folders_changed
- list.
- (vee_refresh_info): Refresh folder, re-run queries on any changed
- folders.
-
-2001-09-20 <NotZed@Ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_header_load): New
- function to just load the summary. Not much use yet, until unread
- counts are stored in the summary (which now looks like too much
- work!).
-
- * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
- stupid mailers. If we get 'name b. name <foo>' then treat it as
- '"name b. name" <foo>'. See 8147.
- (header_decode_mailbox): Another fix for really broken mailers
- that have things that look like addresses followed by <address>
- bits.
- (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
- about trigraphs.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Setup unread count properly, and
- also setup the url properly.
-
- * providers/local/camel-maildir-store.c (camel_folder_info_new):
- Build the path on the folderinfo.
- (scan_dir): Dont include empty host part in url for folder.
- (scan_dir): Lookup folder counts for any folders we currenty have
- open.
- (scan_dir): If we dont have the folder open, then scan the 'new'
- and 'cur' folders for new and unread messages to count instead.
-
- * providers/local/camel-spool-store.c (get_folder_info): If we
- have this folder open, then set unread from the folder itself.
- (get_folder_info): Change the INBOX path to not include the
- leading /.
-
- * providers/local/camel-spool-folder.c
- (camel_spool_folder_construct): Fix path.
- (camel_spool_folder_construct): Properly setup the url field when
- we say we've got a new folder created.
-
- * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
- path on folderinfo.
-
- * camel-store.c (camel_folder_info_build_path): Prepend / to path.
-
- * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
- unmatched folder name.
- (camel_vee_folder_new): "
-
- * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
- folder name.
- (vee_delete_folder): "
- (vee_rename_folder): "
- (vee_get_folder): Prepend / onto path.
- (vee_delete_folder): Setup path in folderinfo.
- (vee_get_folder_info): Fix path in folderinfo.
-
- * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
- unmatched (internal) name.
-
-2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-spool-folder.c
- (camel_spool_folder_construct): And finally here.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): And here.
-
- * camel-vee-store.c (vee_get_folder): ANd here too.
- (vee_get_folder_info): And here.
-
- * providers/imap/camel-imap-store.c (create_folder): Use
- camel_folder_info_build() and do better error checking.
- (subscribe_folder): Set the path on the folder info.
-
- * camel-store.c (camel_folder_info_build): Set the folder-info
- path if it hasn't already been set by the caller.
- (camel_folder_info_free): Free the path.
-
- * camel-store.h: Added a path member to the FolderInfo type.
-
-2001-09-20 Dan Winship <danw@ximian.com>
-
- * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
-
-2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c: Updated exception strings to be more clear.
-
- * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
- mistake, fixes bug #9975.
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
- `data' isn't a CamelService...cuz it's not supposed to be! It's a
- CamelTcpStreamSSL object...doh!
-
-2001-09-19 <NotZed@Ximian.com>
-
- * General cleanup of camel debug printfs.
-
- * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
- the error indicates file locking isn't supported on this
- filesystem. Still return a warning just incase (if its the first
- time). Might fix a lot of reported bugs.
-
- * providers/local/camel-spool-store.c (get_folder_info): Dont
- include the empty // host part in the uri. This 'breaks' the
- service lookup.
-
-2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: Match mailing-list header List-Owner.
-
-2001-09-18 <NotZed@Ximian.com>
-
- * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
- the folderinfo for the folder_created event.
-
- * camel-store.h: Added 'total' to CamelFolderInfo.
-
-2000-09-18 <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-folder.c
- (camel_maildir_folder_new): If filter inbox is set on the store,
- and we're opening inbox '', then enable filtering on new messages.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): After loading the summary, check
- it, and only abort if that fails. Also maintain the changes
- count.
-
- * providers/local/camel-local-summary.c
- (camel_local_summary_load): Remove summary_check code from here.
- (camel_local_summary_check): Sync index/summary here, if we were
- successful.
-
- * providers/local/camel-spool-folder.c
- (camel_spool_folder_new): If we have filter-new-messages-on-inbox
- set and we just opened inbox, turn on filtering on this folder.
- (camel_spool_folder_construct): Keep track of changes for the
- folder, so that filter-new-messages works right (?)
-
- * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
- as the folder name, not the path.
-
- * camel-folder-search.c (search_not): Modified patch from
- <peterw@ximian.com> since the summary is messageinfo's, not
- strings.
-
- ** Ok so the problem with the stuff below is that maildir/spool
- 'summary_load' throws away all events, including recents, joy eh?
-
- * providers/local/camel-maildir-summary.c (maildir_summary_check):
- Add new messages to the recent changeinfo.
-
- * providers/local/camel-spool-summary.c: Mark 'new' message as
- recent, for later processing if required (i.e. 'filter new
- messages').
-
- * camel-store.c (construct): new function, cascade up construct
- method and check for 'filter' param, and set accordingly for any
- one that might want it.
-
- * providers/imap/camel-imap-store.c (construct): map the
- param_filter_inbox flag to the store->flags as
- CAMEL_STORE_FILTER_INBOX.
-
- * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
- filter inbox.
-
- * providers/imap/camel-imap-folder.h: Removed do_filtering flag
- from CamelImapFolder.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
- the 'recents' parameter, use the 'changes' parameter instead to
- convey this info.
- (camel_imap_folder_changed): Changed for update_summary api
- change. Now always just emit the changed event if we have any
- changes to report, filtering code removed, handled upstream.
- (filter_proc):
- (filter_free): Removed old filtering code.
- (camel_imap_folder_new): Set the filter_recent flag on the folder
- if we're the inbox and filtering of inbox is enabled.
-
- * camel-folder.c (folder_changed): If we have 'recent' messages,
- and are set to filter recents, then freeze the folder and launch a
- thread to do the processing (or similar if threading not enabled).
- (thaw): Make sure we emit the changed signal outside of owning the
- lock and if things have changed. Also, no longer bother
- downgrading folder_changed events to message_changed events.
-
- * camel-folder.h (struct _CamelFolder): Added filter_recent flag
- -> signifies all recent messages in folder should be filtered.
-
- * camel-session.c: (camel_session_thread_msg_new,
- camel_session_thread_msg_free, camel_session_thread_queue,
- camel_session_thread_wait): code to handle async operations as
- part of camel processing.
- (camel_session_finalise): free thread_lock, destroy thread, active
- hash, etc.
- (camel_session_init): init thread, active hash, etc.
- (camel_session_class_init): Init virtual functions.
- (session_thread_msg_new, session_thread_msg_free,
- session_thread_destroy, session_thread_received,
- session_thread_queue, session_thread_wait): default implementation
- of session threads stuff.
-
-2001-09-17 <NotZed@Ximian.com>
-
- * camel-folder.c (camel_folder_change_info_recent_uid): New
- function to add a 'recent' uid to the change info.
- (camel_folder_change_info_clear): Clear recent list.
- (camel_folder_change_info_free): Free recent list.
- (camel_folder_change_info_new): Setup recent list.
-
- * camel-folder.h: Added a uid_recent item to the folder_changed
- event data.
-
- * providers/local/camel-maildir-store.c (scan_dir): Free new in
- the right block.
-
- * providers/local/camel-local-provider.c: Add local config entries
- to filter on new messages in spool and maildir provider.
-
- * camel-vee-folder.c (vee_folder_construct): Remove the assertion
- which stops ? in names from being allowed.
-
-2001-09-18 Dan Winship <danw@ximian.com>
-
- * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
- this.
-
- * camel-medium.c (is_offline): A medium is offline if its content
- object is offline.
-
- * camel-multipart.c (is_offline): A multipart is offline if any of
- its subparts are offline.
-
-2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c: Added korean charset conversion.
-
-2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (delete_folder): Don't process
- the ImapResponse data, we don't want to block forever on data we
- don't care about...
- (create_folder): Use get_folders_online() instead of
- get_folder_info_online().
-
- * camel-folder.c: Reverted previous changes.
-
-2001-09-17 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Helpful install-exec-hook debugging output
-
-2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.c (camel_folder_get_uri): New function to get the
- URI of a folder.
- (get_uri): Default implementation.
-
-2001-09-14 <NotZed@Ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
- set the complete list of folders on a vfolder, all at once.
- (camel_vee_folder_set_expression): If we set the query to be the
- same thing, dont do anything.
-
- * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
- this store.
-
- * camel-store.c (camel_store_init): Enable vtrash by default via
- flags.
- (camel_store_get_trash): REturn NULL if the store doesn't support
- vtrash.
- (init_trash): Dont init if store doesn't support vtrash.
-
- * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
- supports vtrash.
-
-2001-09-13 <NotZed@Ximian.com>
-
- * camel-vee-store.c (vee_get_folder_info): Implement.
- (build_info): Used to build a folder record from the folders
- hashtable.
- (vee_delete_folder): Implemented, remove folder from hashtable.
- (vee_rename_folder): Implemented, remove old folder from
- hashtable, add new one and rename its guts too.
-
- * camel-store.c (camel_store_rename_folder): Do nothing if we're
- not asked to actually change names. Also dont do the renamed
- cache check till after we've called the subclass.
- (camel_store_delete_folder): Call the subclass delete firs,t then
- make sure the cache is right.
-
- * camel-vee-folder.c (vee_folder_construct): Remove support for
- name?query syntax to setup vfolder. Abort if such syntax is used.
- (camel_vee_folder_new): Removed code that handles ? syntax, etc.
- (vee_folder_build_folder): Handle unset expression, treat it as an
- empty search.
- (camel_vee_folder_set_expression): Oops, actually set the
- expression.
-
- * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
- name?query syntax to setup vfolder, but set the expression
- directly. Also fixes a small memleak.
-
-2001-09-12 <NotZed@Ximian.com>
-
- * camel-store.c (camel_store_delete_folder): Fixed warnings with a
- cast.
- (camel_store_rename_folder): "
-
-2001-09-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
- so that the data will be free'd when we clear the list.
-
-2001-09-14 Dan Winship <danw@ximian.com>
-
- * camel-file-utils.c (camel_file_util_encode_string,
- camel_file_util_decode_string): Don't claim failure when
- reading/writing the empty string.
-
-2001-09-14 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: use install hook instead of install rule to
- guarantee we run after installation
-
-2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
- reuse the exception if it has already been set.
- (camel_filter_driver_filter_message): Same here. Also use the new
- return value from camel_filter_search_match().
-
- * camel-filter-search.c (camel_filter_search_match): Return an
- integer (matched, no-match, or error).
-
- * providers/local/camel-mbox-folder.c (mbox_append_message): Do
- error-checking based on function return values rather than
- exceptions as it's possible for them to be NULL.
- (mbox_get_message): Same.
-
- * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
- an exception to the cache.
- (imap_append_online): Same.
- (imap_append_resyncing): Here too.
- (imap_copy_offline): And here.
- (handle_copyuid): Pass NULL as the exception here...
- (parse_fetch_response): And finally here.
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_insert):
- (insert_setup):
- (camel_imap_message_cache_insert_stream):
- (camel_imap_message_cache_insert_wrapper):
- (camel_imap_message_cache_copy): Take an exception argument and
- set it on error.
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Convert the charset
- to the iconv-friendly name.
-
- * camel-charset-map.c (camel_charset_to_iconv): Add code to
- convert windows-[cp]#### charsets to their iconv-friendly format
- of cp####.
-
- * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
- failure.
-
-2001-09-12 Larry Ewing <lewing@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
- the source url in the nonfailure case.
-
-2001-09-12 <NotZed@Ximian.com>
-
- * camel-folder-search.h: Change the 'not' virtual method from an
- immediate e-sexp function to a non-immediate one, which is what it
- should be.
-
- * camel-folder-search.c (search_not): Implement a 'not' function
- ourselves. If 'not' on a vector value, then not over all items
- in the summary.
- (builtings[]): Change the 'not' builtin to be a non-immediate
- function.
-
-2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
- the message info.
-
-2001-09-10 <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-store.c (get_folder_info): Pass in
- a hashtalbe used for finding visited nodes.
- (inode_hash):
- (inode_equal):
- (inode_free): Helper functions for visited node checks, hashes on
- inode + device number.
- (scan_dir): Dont re-visited directories we've already visited, use
- inodes + device number.
- Also, if the folder doesn't contain cur/tmp/new, mark it as
- noselect, but continue to recurse folders, if asked.
-
- * camel-folder.c (move_messages_to): Progress reporting while
- moving messages.
-
- * camel-store.c (camel_store_delete_folder): Make sure we remove
- the folder from our vtrash, if we have it in our opened set, and
- also remove it from our hashtable.
- (camel_store_rename_folder): Remove the old folder name from the
- folder cahce, if it is there.
-
-2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
- g_warning, we no longer really need that.
-
-2001-09-10 <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
- to return the newly allocated msg.
-
-2001-09-08 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-summary.c (spool_summary_sync_full):
- Likewise.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
- Fix the wording.
-
- * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
- call in cancellable read case. Also, loop while we get EINTR.
- This might fix some weird reconnect behaviour with pop.
- (stream_write): "
-
-2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
- was hopefully going to fix bug #5325 because the functions I used
- seem to have been deprecated. *sigh*.
-
- * camel-remote-store.c (camel_remote_store_finalise): Disconnect
- from the service here otherwise the locks will be destroyed and by
- the time CamelService finalizes we'll crash or hang.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
- unref the mime filters when we finish with them.
-
-2001-09-07 Ettore Perazzoli <ettore@ximian.com>
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
- s/Synchronising/Synchronizing/.
- (mbox_summary_sync_quick): Likewise.
- (summary_rebuild): s/Summarising/Summarizing/.
-
-2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-multipart.c (camel_multipart_set_boundary): Take a const
- char * instead of a char *.
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Reuse the
- original boundary instead of generating our own.
-
-2001-09-06 <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (filter_proc): Thread
- function to perform filtering.
- (filter_free): Free the filter object.
- (camel_imap_folder_changed): If we have threads enabled, then
- queue up a request to perform filtering. For bug #4422.
-
- * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
- new 'imap msg'.
- (camel_imap_msg_queue): Queue an 'imap msg'.
- (async_received): Handle receiving of imap msg in async thread.
- (async_destroy): Handle destroying of imap msg.
- (camel_imap_store_finalize): Destroy thread when done.
- (camel_imap_store_init): Setup thread.
-
- * providers/imap/camel-imap-store.h: Added an ethread to the
- store, for async processing.
-
-2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-remote-store.c (remote_recv_line): Use
- camel_stream_buffer_read_line() instead of duplicationing the
- functionality. Also, the previous way was broken anyway. What if a
- line was the same length as our buffer? Then we'd go and read a
- second line and a third and so on until they weren't the same
- length, leaving \r's in the middle of the buffer.
-
-2001-09-06 Dan Winship <danw@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
- to always set an exception if it returns POP3_FAIL, as documented.
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
- Revert.
-
-2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
- Set an exception on POP3_FAIL as well.
-
-2001-09-06 Dan Winship <danw@ximian.com>
-
- * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
- after N days" option in pop3_conf_entries, since it won't be done
- for 1.0.
-
-2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-remote-store.c (remote_disconnect): Too late to sync the
- folders here... if this is gonna happen at all it should be done
- in the provider.
-
- * camel-service.c (camel_service_finalize): Do a clean disconnect.
-
-2001-08-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-spool-store.c (get_inbox): Return the
- default folder (ie. INBOX) rather than saying we don't support an
- inbox.
-
- * camel-tcp-stream-ssl.c: #include pk11func.h.
- (ssl_bad_cert): Use CERT_GetDefaultCertDB.
-
-2001-08-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c (smime_sign_prepare): Do the same here as
- what we did in the pgp code a moment ago.
- (smime_sign_restore): And again here.
- (smime_sign): And update thise code to pass in the address of the
- encodings list when restoring parts.
-
- * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
- message/rfc822 mime parts - don't set an encoding on these,
- instead traverse into their subparts and set the encodings for
- those.
- (pgp_mime_part_sign_restore_part): Reverse any operations done to
- message/rfc822 parts in the above prepare_part() function and also
- take a pointer to a GSList of encodings instead of just a GSList
- so we can properly keep track of which encoding we are on.
- (camel_pgp_mime_part_sign): Pass in the address to the encodings
- list when restoring parts.
-
-2001-08-29 Not Zed <NotZed@Ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
- reporting to deleting messages. Dont change the calculation to a
- bloody float. Bug #6189.
-
-2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
- and diag_buf to NULL, hopefully this fixes the crash if the
- select() times out.
- (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
- as an argument, instead use "-r" and "recipient" as 2 separate
- arguments to pgp. This might fix the "gpg only encrypts to my
- private key" bug?
-
-2001-08-28 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-store.c (create_folder): Whoops.
- Double-free and FMR = bad.
-
- * camel-remote-store.c (remote_send_string): Don't reveal the
- user's IMAP password if their server supports LITERALPLUS. Also
- add some more dashes to make it line up nicely :-)
-
-2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
- certificate, add it to the database as a trusted CA.
-
-2001-08-28 Peter Williams <peterw@ximian.com>
-
- * camel-object.c (camel_object_unref): Make the locking more
- fine-grained on destruction; specifically, don't hold the
- type lock while calling the finalize functions.
-
-2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-provider.c: Changed the
- description/names of some of the local providers to try and
- clarify the meanings.
-
- * providers/pop3/camel-pop3-provider.c: Simplify the POP
- description - we want short but sweet.
-
- * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
-
-2001-08-27 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
- page, and treat the return value properly. It returns the number
- of non-reversible conversions performed, not the number of output
- characters, sigh.
- (check_html_charset): Changed to just take a buffer of data, and
- not the mime parser.
- (simple_data_wrapper_construct_from_parser): Since we dont need
- the charset till we have all the data, search for the charset
- after we've read the data, if we have html data with no charset in
- the header.
- (simple_data_wrapper_construct_from_parser): Remove the
- seekable_source stuff.
-
- * Re-apply patches from before.
-
-2001-08-25 Not Zed <NotZed@Ximian.com>
-
- ["Summarising" and "Synchronising" are spelt with a "s" in
- ENGLISH]
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
- s/Synchronizing/Synchronising/.
-
- * providers/local/camel-mbox-summary.c (summary_rebuild):
- s/Summarizing/Summarising/
-
-2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
- instead of fseeko since we want to be portable and use ftell
- rather than ftello for the same reason.
- (camel_disco_diary_empty): Same here.
-
-2001-08-24 Peter Williams <peterw@ximian.com>
-
- * Revert Not Zed's previous commits as they apparently can cause
- serious data loss for POP3 users.
-
-2001-08-24 Ettore Perazzoli <ettore@ximian.com>
-
- ["Summarizing" and "Synchronizing" are spelt with a "z" in the
- default locale, that happens to be "en_US".]
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
- s/Synchronising/Synchronizing/.
-
- * providers/local/camel-mbox-summary.c (summary_rebuild):
- s/Summarising/Summarizing/
-
-2001-08-24 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part-utils.c (convert_buffer): Limit the maximum
- output buffer size. iconv bugs? returns E2BIG forever on some
- (valid) data?
-
- * providers/local/camel-spool-summary.c (summary_rebuild):
- Likewise.
-
- * providers/local/camel-mbox-summary.c (summary_rebuild):
- Summarising is spelt with an s.
-
-2001-08-23 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part.c (write_to_stream): If we have rawtext, then
- dont do any charset conversion, only encoding/crlf conversion.
-
- * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
- member, says the character encoding is raw, not utf8.
-
- * providers/local/camel-spool-summary.c
- (spool_summary_sync_quick): Synchronising is spelt with an s, not
- a z.
- (spool_summary_sync_full): "
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
- No, synchronising is spelt with an s.
- (mbox_summary_sync_quick): "
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Remove the
- warnings which aren't going anywhere fast.
- (convert_buffer): Function to convert a bytearray of textual
- content from one charset to another. If the charset doesn't exist
- or fails, then do no conversion.
- (simple_data_wrapper_construct_from_parser): First, read in data,
- then try and convert it using the specified charset if supplied.
- If that fails, then dont do any conversion, and leave as raw.
- Also, if we have any x-* charsets, then dont do any processing.
-
-2001-08-23 Peter Williams <peterw@ximian.com>
-
- * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
- missing \n to the end of a printf.
-
- * providers/local/camel-spool-summary.c (summary_rebuild): Same.
-
-2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
- Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
- g_ptr_array_add will assume `size' elements have already been
- initialized and will start appending on to the end.
-
-2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
- gpg keyserver lookups.
- (pgp_decrypt): Disable keyserver lookups if we are disconnected.
-
-2001-08-21 Dan Winship <danw@ximian.com>
-
- * camel-folder-thread.c
- (camel_folder_thread_messages_new_summary): Fix the duplicate
- message check so it doesn't mess up threading when a reply appears
- in the folder before the message it's a reply to. Fixes bug #3357.
- (camel_folder_thread_messages_new): Likewise, although I don't
- think this function is used any more.
-
-2001-08-20 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: build a static camel for the addressbook conduit
-
-2001-08-20 Ettore Perazzoli <ettore@ximian.com>
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
- s/Synchronising/Synchronizing/.
- (mbox_summary_sync_quick): Likewise. *
- providers/local/camel-spool-summary.c (spool_summary_sync_full):
- Likewise.
- (spool_summary_sync_quick): Likewise.
-
-2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (create_folder): Get the
- entire directory structure for the folder we just created, meaning
- if we created a folder named "test.mailbox" where test didn't
- previously exist, get the listing for "test" and "test.mailbox".
-
- * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
- function.
-
-2001-08-19 Chris Toshok <toshok@ximian.com>
-
- * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
-
-2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
- sure the generated UID is non-NULL before appending it to the
- array of UIDs. How would this even happen? I have no clue...
-
-2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Start
- scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
- I'm missing the logic, but anyways...this might fix bug #5348.
-
-2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_keepalive): If we are
- online and message flags have changed in the current folder, sync
- the flags else do a NOOP. This fixes bug #4666. Also lock around
- the NOOP command.
-
- * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
- ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
- this (and maybe others too?) so what we'll do instead is to send
- "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
- all the flags (since this is in essence what we want to do
- anyway).
-
-2001-08-16 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_connect_online): Fix
- this again. Sigh. Problem of namespace = "" may not yet be
- completely solved.
-
-2001-08-15 Peter Williams <peterw@ximian.com>
-
- * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
- function. Try to approximate the SSL error into errno.
- (errlib_error_to_errno): New function, try to approximate
- OpenSSl's error library's error (ERR_*) into errno.
- (stream_read): Try to set errno using ssl_error_to_errno.
- (stream_write): Same.
- (open_ssl_connection): Same.
-
- * providers/imap/camel-imap-store.c (imap_connect_online): Oh
- crap, huge killer typo.
-
-2001-08-14 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_connect_online):
- Canonicalize store->namespace to end in store->dir_sep, once both
- values are known. The %F-related code makes this
- assumption. Probably fixes a bug reported on the mailing list.
-
-2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_get_folder): After talking to NotZed,
- it turns out I was wrong after all.
- (store_sync): Create a copy of the folder-cache that owns a ref on
- each of the folders so that if one of the folders get's finalized
- inside store_sync(), we don't run into any locking issues. This is
- mostly meant to solve a problem in IMAP (#6089).
-
-2001-08-13 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
-
- * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
- handle when namespace = NULL (can happen upon initial open of mailbox.)
-
- * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
- Don't crash when %F'ing with an empty folder name and NULL namespace.
-
-2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_get_folder): We need to be ref'ing
- the folder if/when we add it to the hash. This may fix bug #6089?
- (camel_store_get_folder): Nevermind, reverted the fix.
- (camel_store_get_folder): No, I wasn't on crack before after
- all...if we don't ref here, then we're open to a race condition
- later.
-
-2001-08-11 Ettore Perazzoli <ettore@ximian.com>
-
- * providers/local/camel-spool-summary.c (summary_rebuild):
- s/summarising/summarizing/.
- (summary_rebuild): Likewise.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
- s/summarise/summarize/.
- (mbox_summary_sync_quick): Likewise.
- (summary_rebuild): Likewise.
- (mbox_summary_check): Likewise.
-
-2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
- assert - at this point a backtrace would be more useful than a
- transaction log for debugging.
-
- * providers/imap/camel-imap-command.c (imap_command_start): Return
- FALSE here, not NULL.
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Don't
- g_strdup() the uid into the trigger_event call.
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
- Set the total bytes expected to 0 if the response is empty too.
- (pop3_refresh_info): Return of there was an error generating pop3
- uids.
-
- * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
- pattern before continue'ing. This was showing up quite a bit under
- purify.
-
-2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
- quoted string cannot contain \n's so check for those as well.
- (imap_atom_specials): Update this to fix bug #6553.
-
-2001-08-08 Jon Trowbridge <trow@ximian.com>
-
- * camel-filter-search.c (get_source): Remove trailing stuff from
- URLs before returning. (Done in an evil way, not in the good way
- suggested by fejj. :)) (Bug #4876)
-
-2001-08-08 jacob berkman <jacob@ximian.com>
-
- * camel-search-private.c (camel_search_header_match): check for
- NULL name and addr (fixes a bug i was about to report)
-
-2001-08-08 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c (check_header): Properly determine match
- type to pass to header_match.
- (address_matches_exactly): Removed, effectively added to
- camel_search_header_match.
-
- * camel-folder-search.c (check_header): Properly determine the
- match type to pass to header_match.
-
- * camel-search-private.c (camel_search_header_match): Add a new
- parameter 'type' which is the type of header we're matching
- against. ASIS means utf8 format, ADDRESS means an internet
- address ('formatted'), ADDRESS_ENCODED means a raw address header,
- ENCODED means rfc 2047 encoded text.
- (header_match): Move original logic here, have search_header_match
- call it as appropriate for the 'type' of match.
-
-2001-08-07 Not Zed <NotZed@Ximian.com>
-
- * camel-session.c (camel_session_class_init): Only init the vee
- provider struct once (if we're subclassed this will get called
- multiple times).
-
- * camel-object.c (obj_finalize): Removed a bit of a debug that
- crept in with jacob's poolv patch (?).
-
-2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-search.c (address_matches_exactly): New function to
- do danw's address "is" comparison (as specified in bug #5886.
- (check_header): Special-case address-type headers when we are
- doing an exact match to use the address_matches_exactly function.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
- Modify to take a headers_only argument which will then only fetch
- message headers.
- (pop3_generate_uids): Pass in TRUE for headers_only.
- (pop3_get_message): Pass in FALSE for headers_only and move the
- camel_operation() stuff out of get_message_stream and in to here
- instead.
- (pop3_generate_uids): We also need to be using i+ 1 as the id
- since we are starting at 0.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
- New internal function to get a message stream by message sequence
- id (so that we can share code between pop3_get_message and
- pop3_generate_uids).
- (pop3_get_message): Use pop3_get_message_stream.
- (pop3_generate_uids): New function to generate UIDs based on the
- message - this fixes bug #1256.
- (pop3_refresh_info): If the server doesn't support UIDL, call
- pop3_generate_uids to get our list of UIDs.
-
- * providers/imap/camel-imap-store.c (get_folder_info_online):
- Don't strstr for noselect=yes, that's just plain broken.
-
-2001-08-06 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
- error in cleaning up deleted messages at the end of the folder.
- Fixes bug #5585 and maybe others.
-
- * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
- refresh_info on the selected folder before looking at its unread
- count. Should fix bug #4944.
-
-2001-08-06 Peter Williams <peterw@ximian.com>
-
- Completely hide the namespace from everything external to the IMAP
- code, which Dan W says is the way it should be.
-
- * providers/imap/camel-imap-command.c
- (imap_command_strdup_vprintf): Add a new %F argument, which is like
- %S but will add the namespace (for folder names).
- (camel_imap_command): Use %F here.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Changed to strip out the namespec when returning *folder. In order
- to do this we need to be passed the CamelImapStore.
- (imap_concat): Move to here from camel-imap-store.c, un-static
- (imap_namespace_concat): New function, adds the namespace to the
- folder name, unless it's INBOX.
-
- * providers/imap/camel-imap-utils.h: Prototypes.
-
- * providers/imap/camel-imap-store.c (imap_connect_online): Extra
- arg to imap_parse_list_response.
- (imap_connect_offline): Here too.
- (get_folder_status): Use %F.
- (get_folder_online): Here too.
- (delete_folder): Here too.
- (create_folder): Here too, and arg to imap_parse_list_response.
- (parse_list_response_as_folder_info): Arg to i_p_l_r.
- (get_subscribed_folders_by_hand): Use %F.
- (get_folders_online): Here too.
- (get_folder_info_online): Instead of checking for NULL @name, check
- for name = NULL or "", and set to "" instead of namespace. Pass ""
- instead of namespace to camel_folder_info_build.
- (subscribe_folder): Use %F.
- (unsubscribe_folder): Here too.
-
- * providers/imap/camel-imap-folder.c (imap_get_full_name): This
- now just returns folder->full_name.
- (do_append): Use %F
- (do_copy): Here too.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
-
-2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
- code so that it does the check in the return value of iconv() just
- like the code in camel-mime-utils.c in case this fixes Bo Rosen's
- gpg bugs (but I doubt this will change anything?).
-
-2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): First
- check to make sure that service->url->authmech is non-NULL before
- passing it into strcmp to avoid a segfault.
-
- * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
- means that the key is bad but it did succeede in decrypting the
- block so to make users happy (even though I find this a
- questionable action) we are going to ignore the error and show it
- to the user anyway. This fixes bug #6136.
-
-2001-08-03 Not Zed <NotZed@Ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): special
- case popb4smtp auth before we try and connect, and do the magic
- here first.
-
-2001-08-02 Not Zed <NotZed@Ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
- POPB4SMTP separate to the esmtp auth list.
- (smtp_auth): If creating the sasl object means it is
- already authenticated, then exit early. Sort of 'clean hack' to
- help popb4smtp work.
- (smtp_auth): Unref the sasl object, clean up a memleak i think.
-
- * providers/smtp/camel-smtp-provider.c
- (camel_provider_module_init): Added POPB4SMTP auth type.
-
- * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
-
- * camel-sasl-popb4smtp.c: New file for pop before smtp
- 'authentication'.
-
- * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
- camel-sasl-popb4smtp.[ch].
-
-2001-08-01 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
- get the lock, make sure we close our locking fd, and reset it.
- Fixes the crash part of 5095.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Slightly re-arranged filter/change notification logic. If we;re
- filtering, freeze the folder till we're finished to smooth the ui
- for new mail.
-
-2001-07-31 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (camel_folder_init): Chagned mutexes to
- e_mutexes, folder lock recursive. This fixes the imap filtering
- bug, or at least some cases of it.
- (camel_folder_finalize): Free mutexes.
-
- * camel-private.h (CamelFolderPrivate): Changed mutexes to
- e_mutexes.
-
-2001-07-25 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (camel_folder_change_info_*): Change the
- return if fail's into asserts.
- (camel_folder_change_info_free): Don't let it accept a NULL
- argument. This isn't g_lib so we dont have to.
-
-2001-07-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
- broken mailer behavior. We want to make sure that the user's
- locale charset is non-NULL before we pass it off to
- iconv_open(). If it *is* NULL, we want to use iso-8859-1.
-
-2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-url.c (camel_url_free): Allow the url to be NULL just like
- the libc free convention.
-
-2001-07-26 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_command_start):
- Send an IMAP command, but don't wait for responses.
- (camel_imap_command_response): Read a single line of response from
- the server.
- (camel_imap_command, etc): Reimplement in terms of the new code.
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Use
- camel_imap_command_start and camel_imap_command_response, and
- call camel_operation_progress after each line read from the
- server.
- (imap_update_summary): Likewise, although with more fudging on the
- precentages... Also, fix this so that if none of the new messages
- are cached, it only does a single FETCH, and if some of them are
- cached, it does two FETCHes (one to get the UIDs, FLAGS, and
- SIZEs, and another to get the bodies of all of the messages that
- aren't cached now that it knows the relevant UIDs). This should
- speed up startup a bunch (especially if you have high bandwidth
- but also high latency to the IMAP server).
-
-2001-07-25 Dan Winship <danw@ximian.com>
-
- * camel-mime-utils.c (mail_mlist_magic): Add another Sender
- pattern.
-
-2001-07-24 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Change the break into a continue, we should process as many as we
- can find.
-
- * camel-folder.c (camel_folder_move_messages_to): If we have no
- uid's to copy, exit here before going any further. Some code
- internally [imap] assumes there are uids to copy otherwise it can
- segfault.
- (camel_folder_copy_messages_to): Same.
-
-2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_param): Handle broken mailers
- that send unencoded 8bit header params. And there was much
- rejoicing. Rah.
-
- * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
- much rejoicing. Rah.
-
-2001-07-24 Not Zed <NotZed@Ximian.com>
-
- * camel-operation.c (camel_operation_register, unregister): Added
- some warnings for bad cases.
-
-2001-07-23 Not Zed <NotZed@Ximian.com>
-
- * camel-operation.c (camel_operation_register): Only insert a hash
- entry if we haven't already.
- (camel_operation_unregister): Only remove the has entry if the id
- is a real thread.
-
-2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_move): Slight fix for when source ==
- destination (we don't want to do this action because on-demand
- filtering would then delete the messages it supposedly "moved").
-
-2001-07-23 Not Zed <NotZed@Ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
- send_to): Added some operation progress reporting. Actual data
- transfer is 'tricky' because of the layers used.
- (smtp_auth): Instead of checking exception_is_set, use
- challenge==NULL to test if sasl_challenge_base64 failed.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
- peters changes below and put in a better fix. These functions
- already return -1 on error, just use that, and not worry about
- building our own exception redundantly.
-
- * camel-service.c (camel_get_host_byname): Turn the progress into
- a transient event.
-
-2001-07-20 Peter Williams <peterw@ximian.com>
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
- usage fixes for CamelException. Check our own exception for
- summary_update and xfer it out if an error occurred.
-
-2001-07-20 JP Rosevear <jpr@ximian.com>
-
- * Pull up test fixes to get them building again
-
-2001-07-20 Not Zed <NotZed@Ximian.com>
-
- * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
- renamed to camel_charset_to_iconv() to make it just a little more
- consistent and not so long & fixed callers.
-
-2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-filter-charset.c
- (camel_mime_filter_charset_new_convert): Convert to the
- iconv-friendly charset names.
-
- * providers/imap/camel-imap-store.c (create_folder): Fixed a
- compiler warning about returning without a value in a non-void
- function. Blah.
-
- * camel-mime-part.c (process_header): Pass the locale charset as
- the default_charset to header_decode_string().
-
- * camel-folder-summary.c (camel_folder_summary_format_string):
- Pass the locale charset as the default_charset to
- header_decode_string().
- (content_info_new): Same.
-
- * camel-mime-message.c (process_header): Pass the locale charset
- as the default_charset to header_decode_string().
-
- * camel-mime-utils.c (append_8bit): New helper function who's
- purpose is similar to append_latin1() but for 8bit text that we
- are assuming is not latin1.
- (header_decode_text): Now takes a default_charset parameter and
- calls append_8bit when appropriate.
- (header_decode_string): Also takes a default_charset parameter
- now.
- (header_decode_mailbox): Pass NULL as the default_charset to
- header_decode_string().
-
-2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Modified to treat the return
- value from camel_charset_locale_name() as a const char*.
-
- * camel-sasl-digest-md5.c (digest_response): Modified to treat the
- return value from camel_charset_locale_name() as a const char*.
-
- * camel-charset-map.c (camel_charset_locale_name): Modify to
- return const char* by returning the static locale_charset which is
- created inside of camel_charset_map_init().
- (camel_charset_map_init): Find the locale charset here and set the
- static variable.
-
-2001-07-19 Peter Williams <peterw@ximian.com>
-
- Policy change: NULL url's are no longer allowed in
- CamelFolderInfos. They used to signify that the folder was, in
- IMAP jargon, NoSelect; now the same effect is achieved by adding a
- "noselect=yes" parameter to the end of the URL. As far as I know,
- IMAP is the only affected provider.
-
- * providers/imap/camel-imap-store.c (delete_folder): New
- function. Implement folder deletion.
- (camel_imap_store_class_init): Set the delete_folder class
- function here.
- (get_folder_status): New function. Utility wrapper around the
- STATUS command.
- (create_folder): If the parent folder is NoSelect but is empty,
- delete it and recreate it as a a subfolder-containing folder. If
- it is NoSelect but contains messages, set an exception.
- (parse_list_response_as_folder_info): Always set the FolderInfo's
- URL, but add a NoSelect parameter if it isn't selectable.
- (get_folder_info_online): Change logic of removing the namespace
- to reflect URL change. Same for logic of checking unread counts.
- (get_folder_info_online): Use get_folder_status to simplify this.
-
- * camel-store.c (camel_folder_info_build): When creating dummy
- parents, copy the child's URL and set the NoSelect parameter.
-
-2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): No need for
- `acharset' anymore.
- (check_html_charset): Return a const char* and also use
- camel_charset_get_iconv_friendly_name() internally.
-
- * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
- iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
- instead.
- (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
-
- * camel.c (camel_init): Call camel_charset_map_init().
-
- * camel-charset-map.c (camel_charset_map_init): New function to
- initialize the charset-equivalent lookup table. To be called by
- camel_init().
- (camel_charset_get_iconv_friendly_name): New function to try and
- convert a charset into something that iconv is more likely to
- accept.
-
-2001-07-19 Peter Williams <peterw@ximian.com>
-
- * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's
- request.
-
-2001-07-17 Peter Williams <peterw@ximian.com>
-
- Clean up some exception misusage.
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Use
- our own internal exception for sending the string and transfer it
- to @ex if anything goes wrong.
- (imap_read_response): Use our own internal exception for reading
- the untagged responses and blah blah blah.
-
- * camel-session.c (get_service): Use our own internal exception
- when constructing the service and transfer it to @ex if anything
- goes wrong.
-
- * camel-remote-store.c (remote_recv_line): Instead of having
- gboolean exception, use our own internal exception and copy
- it to @ex if anything goes wrong.
-
- * camel-store.c (store_sync): Create an internal exception
- because sync_folder() checks it for validity. Transfer it to
- @ex when done.
-
- * camel-exception.c (camel_exception_get_description): If @ex is
- NULL, complain - passing NULL exceptions to Camel is okay, but
- there should be no circumstances under which they're then
- examined.
- (camel_exception_get_id): Same here,
- (camel_exception_xfer): NULL-protect and warn if transferring from
- a NULL exception.
-
-2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
-
- * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
-
-2001-07-16 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_response_free):
- Given:
- * 4 EXISTS
- * 1 EXPUNGE
- We have to pass 3, not 4 to camel_imap_folder_changed for the
- exists count. Fixes ximian bug #2112 (finally!).
-
-2001-07-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- If the message info for an expunged message is NULL, then just
- break out - maybe a message was expunged that we were never
- notified even existed?
-
-2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
- convert charsets in the format iso8859-1 to iso-8859-1 because it
- seems to be more iconv friendly. It has been reported that on some
- systems, iconv doesn't know about iso8859-1 while it *does* know
- about iso-8859-1. See bug #4530.
-
-2001-07-13 Peter Williams <peterw@ximian.com>
-
- * Makefile.am (install-exec-local): Let people install as
- non-root, but give them a bigass warning so they're not allowed to
- complain when it doesn't work right.
-
- * camel-remote-store.c (sync_remote_folder): New function: hash
- table callback.
- (remote_disconnect): If cleanly disconnecting, sync our
- folders. Fixes deadlocks on exit (folders syncing after store
- disconnects) and also makes sense.
-
-2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
- as the bucket data rather than just a cache level so set the save
- state to TRUE.
- (maybe_write_uid): We only save the uid if the cache levels are
- the same *and* if the save state is TRUE.
- (free_uid): Free the state value.
- (camel_uid_cache_get_new_uids): New uids that get added to the
- cache start with a save state of FALSE.
- (camel_uid_cache_save_uid): Set the save state of the uid to
- TRUE. What should we do if the uid isn't already in the cache?
- Currently I make it add the uid, but maybe it shouldn't?
-
- * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
- to reflect CamelFilterDriver API changes.
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
- a cache argument so we can tell the cache whether or not the uid
- should be saved (meaning we have successfully filtered it).
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message):
- Okay, I've decided that that user is just on crack. We don't want
- to allow filtering of deleted messages or we could get some
- unexpected behavior.
- (do_move): Oops. My last fix needs to be after the if-statement,
- not inside it.
- (do_copy): And here too.
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_move): Only set p->copied and
- p->deleted if the messages are copied without an exception.
- (do_copy): Same - but obviously we don't set the p->deleted here
- at all.
- (camel_filter_driver_filter_message): Since users complained that
- they couldn't filter deleted messages for "safe keeping" (WTF?
- safe keeping? why were they deleted in the first place then??), I
- have taken out the code that optimized filtering by not allowing
- deleted messages to be filtered. This fixes bug #4473.
-
- Note: Users have a warped sense of logic.
-
-2001-07-12 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part-utils.c (extract_metatag_charset): Removed.
- (check_html_charset): Replaced with this.
- (simple_data_wrapper_construct_from_parser): Call
- check_html_charset if we dont have a charset on the content-type,
- and we have text/html data.
- (check_html_charset): We also need to do qp/base64 decoding
- ourselves, sigh.
-
- * camel-mime-utils.c (html_meta_param_list_decode): Removed. This
- was very wrong, the rules for mail headers vastly different from
- rules for decoding html elements.
- (rfc2184_decode): Move the malloc inside the iconv_open worked,
- otherwise we have a memleak.
-
- * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
- run, reset): Changed to use camelhtmlparser, and fixed a tiny
- memleak.
-
- * camel-html-parser.c: Made the html indexer tokeniser re-usable.
- ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
- (tokenise_step): Slight fix to non-quoted values.
-
- * camel-folder-summary.c
- (camel_folder_summary_info_new_from_message): Removed some code i
- wasn't supposed to commit.
-
- * providers/local/camel-local-summary.c (local_summary_add): Only
- set info->size if it is not zero.
- (local_summary_add): If we dont get a size from the info passed
- in, calculate it using a null stream write. Should do #4392.
-
-2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c (extract_metatag_charset): New function
- to extract a meta-tag charset value if it exists.
- (simple_data_wrapper_construct_from_parser): Along the same lines
- as the code I previously ripped out, but this time use the
- mime-parser's seek ability to help us along. Currently I read up
- to a 2k buffer size - this is probably overkill, 1k is probably
- plenty.
-
- * camel-mime-utils.c (html_meta_param_list_decode): When we get to
- an `=', we must skip past it before trying to grab the param
- value. duh.
-
-2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Ripped out my code
- since it was never being used since the mime parser is not using a
- seekable stream (ever?) which pretty much means my code needs to
- be done someplace else.
-
-2001-07-11 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Run the filter in its own thread to prevent locking issues.
- (imap_filter_timeout): New function that does the filtering called
- as a CamelSession timeout.
-
-2001-07-11 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
- the messageinfo itself, so we can properly set the size.
-
- * camel-movemail.c (camel_movemail_solaris): Write out the from
- line between each message.
-
-2001-07-10 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-summary.c (local_summary_add): Copy
- the size across from the source message info if supplied.
-
- * camel-stream-null.c: Added a 'written' member which keeps track
- of how much has been written to the stream.
-
- * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
- defined, then use the solaris movemail to quote from lines that
- sendmail didn't.
- (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
-
-2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (html_meta_param_list_decode): New function
- to parse an HTML meta-tag.
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): If the Content-Type
- did not contain a charset parameter and it's also a text/html
- part, we have 1 last place to look - in the META html tags. *sigh*
-
- * camel-mime-message.c (camel_mime_message_get_source):
- s/gint/unsigned since that's what it should be.
-
-2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
- user has set that option.
- (pgp_clearsign): Same.
- (pgp_encrypt): And here...
- (pgp_decrypt): And finally here.
- (camel_pgp_context_new): Take a `remember' argument.
-
-2001-07-09 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-summary.c (maildir_summary_sync):
- Oops, e_poolv_set free's it for us, so dont double-free here.
-
-2001-07-06 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
- dont have the list changing under us, just going to the next node
- before we call a function that might change the list is
- potentially dangerous (slight mod of peters fix). Hmm, i think it
- would've double-unref'd it too(?)
-
-2001-07-08 Chris Toshok <toshok@ximian.com>
-
- * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
- openssl_table is gone. we now store/get the stream from the
- SSL_CTX's app_data.
- (stream_read): rework the non-blocking case to account for SSL
- possibly buffering data (in which case select will block even
- though data is ready to be read), and to account for FreeBSD's
- strange behavior of returning -1/EAGAIN even though select said
- the fd was ready to be read.
- (ssl_verify): openssl_table is gone.
- (open_ssl_connection): set the SSL_CTX's app_data to be the
- stream, remove the openssl_table code.
-
-2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_encode_param): Don't allow in to be
- NULL, so instead of doing if (in == NULL) return;, make it a
- g_return_val_if_fail and later we can make it an assert or
- something.
-
- * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
- #1138.
-
- * providers/local/camel-mbox-summary.c
- (camel_mbox_summary_build_from): Make the `day-of-month' digit
- take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
- like Pine.
-
- * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
- to nonblocking.
-
-2001-07-06 Peter Williams <peterw@ximian.com>
-
- * camel-object.c (camel_object_unref): Make sure that after the
- finalization event has happened and the finalization functions
- have been called that the object still has a zero refcount.
-
-2001-07-06 Joe Shaw <joe@ximian.com>
-
- * providers/nntp/camel-nntp-grouplist.c: Add locking to
- camel_nntp_get_grouplist_from_server().
-
- * providers/nntp/camel-nntp-resp-codes.h: Added
- NNTP_EXTENSIONS_SUPPORTED (202).
-
- * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
- Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
- a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
- out of this, but that's what was already there...) Also, put some
- locking around it.
- (finalize): e_mutex_destroy() the command lock
- (camel_nntp_store_init): e_mutex_new() the command lock.
-
- * providers/nntp/camel-nntp-store.h: Add locking macros.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (camel_message_info_string): Added an
- assert to make sure that `mi' isn't NULL.
- (camel_message_info_set_string): Same.
-
- * providers/imap/camel-imap-command.c (camel_imap_response_free):
- Create and use a temporary CamelException for use with
- camel_imap_folder_changed.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Send the
- --no-auto-key-retrieve argument to gpg if we are in offline mode
- so that we don't have to worry about gpg hanging if it can't
- connect to the key servers, because now it shouldn't even attempt
- to.
-
-2001-07-05 Chris Toshok <toshok@ximian.com>
-
- * camel-tcp-stream-openssl.c (ssl_verify): use
- X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
- X509_STORE_CTX to look up our stream, since it's not what we used
- to insert our stream into the hashtable.
- (open_ssl_connection): insert the stream into the hashtable before
- calling SSL_connect, as this can cause ssl_verify to be called,
- and we need to look up the stream there. remove the stream from
- the hashtable if there's an error connecting.
- (stream_connect): pass the CamelTcpStreamOpenSSL* to
- open_ssl_connection since it handles the hashtable stuff. remove
- hashtable stuff from here.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.c (camel_folder_copy_messages_to): if source ==
- dest, just no-op.
-
-2001-07-05 Peter Williams <peterw@ximian.com>
-
- * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
- camel_vee_folder_remove_folder because that function modifies p->folders
- messing up our iteration.
- (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
- does this.
-
- * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
-
- * camel-object.c (obj_init): Clear 'destroying'.
- (camel_object_unref): If 'destroying' then do not send the finalize
- event and do not call finalize functions. Otherwise, set destroying
- so just in case we get refed (eg event code) we don't get doubly
- finalized.
-
-2001-07-05 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
- if we have a little bit of input the output size could be larger,
- since we store upto 3 chars in the state.
-
- * camel-folder-summary.c
- (camel_folder_summary_info_new_from_message): When indexing a new
- record, create a pseudo word 'ibexindexed' so we can always tell
- that a message has already been idnexed, even if it contains no
- words of its own. Things like maildir use this check to see if
- its already been processed, and it matters if it is incorrect in
- this case (not just wasted cycles).
- (camel_message_info_dup_to): Assign the to->strings from the
- e_poolv_cpy() call, since it may allocaote a new poolv if the
- lengths do not match.
-
- (camel_folder_summary_info_new_from_parser): And same here.
-
- * providers/local/camel-maildir-summary.c (maildir_summary_sync):
- Changed the logicfor epoolv code to be different, we dont need to
- update hash references or any tricky stuff.
- (maildir_summary_check): Samehere.
-
- * camel-folder-summary.h: Removed include of e-memory.h.
-
-2001-07-03 Joe Shaw <joe@ximian.com>
-
- * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
- (502) to the list of response codes.
-
- * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
- receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
- to reconnect, get extensions, etc. Just give up and return FALSE.
-
-2001-07-03 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_clear): Doh. Don't remove things from
- the hash table while foreach'ing it. (And can't use foreach_remove
- either because we have to remove them in a weird order). Fixes
- #3618.
-
- * providers/imap/camel-imap-folder.c (imap_get_message): If the
- server returns OK from the FETCH BODY, but there's no parseable
- BODY response, it's probably because there's an UN-parseable BODY
- response, implying the message is badly formatted, MIMEwise. In
- that case, fall back to fetching the message as a single part.
-
-2001-07-02 Sam Creasey <sammy@oh.verio.com>
-
- * providers/nntp/camel-nntp-folder.c: Implemented
- nntp_folder_search_by_expression and
- nntp_folder_search_free. Basic search functionality e.g. unread
- marking now works for NNTP folders.
-
- * camel_filter_search.c (get_size): Added get-size sexp directive
- to get the size of a message for filters.
-
- * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
- Always check with the NNTP server after summary load -- this
- function now always expires old summary entries and syncs with
- the news server.
-
- * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
- Only fetch headers for articles not already logged in
- the summary file.
-
- * providers/nntp/camel-nntp-grouplist.c
- (camel_nntp_get_grouplist_from_*): change from g_list_append()
- to g_list_prepend() + g_list_reverse. Traversing 40,000
- element linked lists sucks.
-
- * providers/nntp/camel-nntp-store.c (camel_nntp_command):
- Should the NNTP connection die with
- CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
- attempt. Timing out the NNTP link is less painful this way.
-
-2001-07-02 Peter Williams <peterw@ximian.com>
-
- * README (Introduction): Add comment noting that Camel actually
- exists now :-)
-
-2001-07-02 Dan Winship <danw@ximian.com>
-
- * camel-session.c (camel_session_get_filter_driver): new method to
- get an application-initialized filter driver.
-
- * camel-filter-driver.c (camel_filter_driver_new): Remove the
- get_folder function and data args from here...
- (camel_filter_driver_set_folder_func): ...and add this function to
- set/change them.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
- this folder is INBOX and we're filtering INBOX, set a flag on the
- folder for later.
- (imap_update_summary): Add another argument (GPtrArray *recents),
- and if it's non-NULL, add the uids of any \Recent new messages to
- it.
- (camel_imap_folder_changed): If doing filtering in this folder,
- create a recents array and pass it to imap_update_summary. Then
- get a filter driver and use it to filter the recent messages.
-
- * providers/imap/camel-imap-summary.h:
- * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
- support for the \Recent flag.
-
- * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
- the "filter" option.
-
- * camel-types.h: add CamelFilterDriver typedef here
-
-2001-07-02 Not Zed <NotZed@Ximian.com>
-
- * camel-lock-client.c (camel_lock_helper_init): properly return
- error if we can't create pipes.
-
- * camel-folder-summary.c (summary_build_content_info): re-enable
- html indexing.
-
- * camel-mime-filter-html.c: Completely re-implemented using a
- custom parser.
-
-2001-07-02 Dan Winship <danw@ximian.com>
-
- * tests/misc/url.c (main): Change a camel_exception_clear to
- camel_exception_init to fix a sometimes-crash
-
-2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: Added Originator: header as a header to look
- for when looking for the mailing list.
-
- * tests/mime-filter/Makefile.am: Build the test-crlf test program.
-
- * tests/mime-filter/test-crlf.c: New test suite for the crlf
- filter.
-
- * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
- decode dots.
-
-2001-06-28 Peter Williams <peterw@ximian.com>
-
- * camel-mime-filter-stripheader.c: New file. Filter that strips a
- header from mime output.
-
- * camel-mime-filter-stripheader.h: New file. Header for the above.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
- stripheader filter to remove the "Bcc" header.
-
- * Makefile.am: Add the stripheader files.
-
- * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
-
- * tests/mime-filter/test-stripheader.c: New file. Test suite for
- the CamelMimeFilterStripHeader.
-
- * tests/mime-filter/Makefile.am: New test section: mime filters.
-
-2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_param_list): Fix a memory
- leak. Also if the decoded value is NULL, that means it wasn't
- encoded so we don't want to toss the old value.
- (header_param_list_format_append): Correctly wrap long parameter
- values according to rfc2184.
-
-2001-06-28 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
- folder is frozen, don't refresh, just record that we need to do it
- later.
- (imap_append_online): If the APPEND doesn't trigger an immediate
- EXISTS response (because the folder isn't the selected folder, or
- because the server doesn't do that until the next command), call
- imap_refresh_info on the folder.
- (imap_copy_online): Likewise. (Replacing the unconditional NOOP
- that was there before, which absolutely killed filter performance
- by forcing the IMAP provider to switch back and forth between
- folders after every copy or move.)
- (imap_thaw): If the folder needs a refresh, do it.
-
- * camel-folder.c (camel_folder_is_frozen): New method
-
-2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-transport.c (camel_transport_init): Initialize the private
- send_lock.
- (camel_transport_finalize): Free the private send_lock.
- (camel_transport_get_type): Set the init and finalize functions.
- (camel_transport_send): Lock the transport.
- (camel_transport_send_to): Same.
-
- * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
-
-2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/folder/test9.c (main): Updated to match the current API.
-
- * tests/folder/test3.c: #include <gtk/gtk.h> since we use
- gtk_init().
-
- * camel-internet-address.c
- (camel_internet_address_encode_address): Use the new
- header_address_fold.
-
- * camel-mime-utils.c: Removed some old #if 0'd code of mine.
- (rfc2047_encode_word): If enclen is 0, don't write an encoded word
- token (=?iso-8859-7?Q??= would be an invalid token).
- (header_address_fold): New function to wrap address headers -
- header_fold() was force-wrapping rfc2047 encoded words which was
- making the test suite fail. The *real* solution, however, is to
- not create rfc2047 encoded words longer than 72 chars.
-
-2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (open_folder): Since we want an error
- opening a folder to result in the message being copied to Inbox
- (assuming no other filters get a chance to `move` it), don't
- record any exceptions that may occur in this function.
-
-2001-06-26 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
- imap_append_offline, imap_append_online,
- camel_imap_folder_changed): lock the cache around accesses
-
- * providers/imap/camel-imap-store.c (get_folder_online): ref the
- newly-created folder (as current_folder) before calling
- camel_imap_folder_selected, in case that needs to do something
- that causes another folder to become current...
-
- * camel-service.c (camel_service_get_url): D'oh.
- s/FALSE/CAMEL_URL_HIDE_PASSWORD/
-
-2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-search.c (get_source): g_strdup() the message
- source here or we will have problems later when we go to free the
- result ;-)
-
-2001-06-25 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
- doesn't allow an extra argument to AUTHENTICATE to avoid a useless
- round trip like some other SASL bindings do.
-
- * providers/imap/camel-imap-command.c (imap_read_response): Deal
- with IMAP servers that (incorrectly) return "+\r\n" rather than
- "+ \r\n" for an empty continuation response.
- (camel_imap_response_extract_continuation): Likewise.
-
-2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (word_types_compatable): New function that
- decides if 2 word types are mergeable. An atom and a qstring are
- mergeable; 2 qstrings are mergeable; and 2 encoded words are
- mergeable.
- (header_encode_phrase_merge_words): If 2 words are merged, the new
- word type is the MAX of the combined types. This means that if we
- merge a qstring and an atom, the resulting word type is a
- qstring.
-
- * camel-internet-address.c (internet_format):
- s/g_string_sprintfa/g_string_append since this makes more sense in
- this particular case.
- (internet_encode): Same here.
-
-2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_send): Use
- camel_address_length() rather than casting and accessing data
- members.
-
-2001-06-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_raw_check_mailing_list): If the first
- char of the mailing-list name is '<', chop it off to make Ettore
- happy. Fixes bug #2153.
-
-2001-06-19 Not Zed <NotZed@Ximian.com>
-
- * camel-lock-helper.c (unlock_id): Fixed a bug when not running
- setuid it wouldn't unlock.
-
- * camel-movemail.c (camel_movemail): use new
- locking daemon, also return an error code.
-
-2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
-
- Note: Except for the info_free(), the NULL checks are
- g_return's. I felt that since g_free() handles NULL that our
- _free() functions should also.
-
- * camel-folder.c (camel_folder_change_info_free): Check to make
- sure that the info pointer isn't NULL.
- (camel_folder_change_info_change_uid): Same.
- (camel_folder_change_info_changed): Same.
- (camel_folder_change_info_remove_uid): Same.
- (camel_folder_change_info_add_uid): Same.
- (camel_folder_change_info_build_diff): Same.
- (camel_folder_change_info_cat): Same.
- (camel_folder_change_info_add_source): Same.
- (camel_folder_change_info_add_source_list): Same.
- (camel_folder_change_info_add_update): Same.
- (camel_folder_change_info_add_update_list): Same.
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * tests/stream/Makefile.am (LDADD):
- * tests/smime/Makefile.am (LDADD):
- * tests/misc/Makefile.am (LDADD):
- * tests/message/Makefile.am (LDADD):
- * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
-
- * Makefile.am (install-exec-local): Set camel-lock-help setgid or
- setuid as needed
-
-2001-06-18 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c
- (camel_folder_summary_info_new_from_parser): Only create a missing
- uid if we have indexing turned on.
-
- * camel-lock-helper.c (setup_process): Function to setup
- process/sanity/security checks. Change to the real uid as soon as
- we can.
- (lock_path): First try to lock as the real uid, if that fails, try
- the root uid.
- (unlock_id): Unlock as the uid we created the lock as.
-
- * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
- location.
-
- * providers/local/camel-spool-folder.c (spool_lock): Implemented,
- using lock helper locking. Need to work out if the locking
- requires a root created lock?
- (spool_unlock): Likewise.
-
-2001-06-15 Not Zed <NotZed@Ximian.com>
-
- * camel-lock-helper.c: Setuid Lock helper process. Creates and manages
- .locks, keeping them active, removing them, etc. What real perms it
- needs is a little system dependent.
-
-2001-06-14 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-store.c (get_folder_info): Implement.
- (scan_dir): Does the work of scanning for maildir directories.
-
-2001-06-13 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-store.c (get_folder_info):
- Implemented, just returns a hardcoded INBOX folder.
- (free_folder_info): implemented, free's the 1 possible level of
- folder info.
-
- * providers/local/camel-spool-folder.c
- (camel_spool_folder_construct): Set the real unread message
- count on the folder_created thing.
-
-2001-06-15 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_max_uid): Return the largest real UID in
- the cache (as an integer). Eventually to be used for an
- optimization in the new-message fetch code.
- (cache_put): Keep track of max_uid.
-
-2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: Added Mailing-List header regex so that we
- can do mlist magic on that header.
-
-2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_param): Properly handle
- correct and incorrect (for the common case, ie Outlook and
- Netscape/Mozilla) rfc2184 values.
- (header_decode_rfc2184_param): Get the param name and see if we
- should expect a rfc2184 parameter value.
- (rfc2184_decode): Decode a rfc2184 value.
- (hex_decode): hex decode a string.
- (header_decode_param_list): Handle rfc2184 encoded parameters (ie
- parameters that have been split and perhaps encoded).
- (header_param_list_format_append): Encode the value before seeing
- if it will fit on the line. If the value does get encoded, be sure
- to put a '*' before the equal-sign.
- (header_encode_param): New function to rfc2184 encode a parameter
- value (maybe it should be renamed?)
-
-2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (init_header_name_table): Don't try to format
- the Reply-To header - we don't want to wrap the reply-to address.
-
-2001-06-12 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-spool-*.[ch]: A new provider, for spool
- mailboxes. Mostly a cut and paste of the mbox code, but not a
- subclass CamelLocal*. Not tested a lot, doesn't lock yet, use
- with extreme caution.
-
- * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
- spool folders can't be deleted, renamed, etc.
- (test_folder_basic): Same.
-
- * tests/folder/test2.c (main): Added checks for spool type.
-
- * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
- Added db3 flags, so make check compiles, doesn't run though.
-
-2001-05-24 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-local-provider.c
- (camel_provider_module_init): Added spool provider.
-
-2001-06-07 Jon Trowbridge <trow@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
- separator between the service url and the folder name, if needed.
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
- an argument, so that the original source URI of the mbox can be
- passed in. This is needed because this function is called
- post-movemail, so we are never reading from the original mbox
- anymore. Without the original mbox URI, the X-Evolution-Source
- tag gets set incorrectly and filter-on-source will fail to work.
- (camel_filter_driver_filter_message): Also take an extra arg
- for the original source URI. It is the original URI, not the
- source URI, that is used for filtering and for setting the
- X-Evolution-Source tag.
-
-2001-06-05 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
- the UID and FLAGS of messages we don't know about yet, since
- they'll just get discarded.
-
-2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/smime/pgp.c: Fix to not get into a recursive loop in
- get_type().
-
- * tests/smime/pgp-mime.c: Same.
-
-2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c: Numerous fixes to get it to compile.
-
- * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
- camel-smime-context.h, and camel-smime-utils.h
-
- * camel-cms-context.[c,h]: New virtual class for manipulating
- cryptographic message syntax messages (like S/MIME).
-
- * camel-smime-context.[c,h]: Modified to inherit from the
- CamelCMSContext class rather than the CamelCipherContext class.
-
- * camel-smime.[c,h]: Removed - just use camel-smime-context
- directly.
-
- * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
- functions from camel-smime.[c,h] into here.
-
-2001-05-30 Dan Winship <danw@ximian.com>
-
- * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
- libunicode. Now it only generates a map of "popular" 8bit
- encodings. (It's not worthwhile to support obscure encodings,
- because any mailer that supports them will support UTF8 too. And
- Chinese and Japanese use mostly the same UTF8 characters so you
- need to decide between those encodings based on the locale or
- the charset of the message you're replying to or the input
- method you used. So this is sufficient for camel_charset_best's
- use.)
-
- * camel-charset-map-private.h: Regenerated.
-
- * camel.c (camel_shutdown): Move #ifdefs around to prevent a
- warning.
-
-2001-05-29 Dan Winship <danw@ximian.com>
-
- * camel-disco-diary.c: Code for logging and replaying offline
- operations.
-
- * camel-disco-store.c (disco_construct): Set disco->status here
- (where we can base it on the session's offline status) rather than
- at init time.
- (disco_connect): If we connect online and have a non-empty diary,
- switch to RESYNCING mode and replay the diary to the server.
- (disco_get_folder, disco_get_folder_info): Add _resyncing
- variants.
-
- * camel-disco-folder.c (disco_sync, disco_expunge_uids,
- disco_append_message, disco_copy_messages_to,
- disco_move_messages_to): Add _resyncing variants to switches.
- (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
- disco_move_messages_to): Remove #ifdef'ed out diary code: let the
- provider do it.
- (disco_append_message): Redo the append methods to no longer
- return the UID, since we're no longer doing the logging from here.
-
- * providers/imap/camel-imap-store.c (imap_connect_online,
- imap_connect_offline): Create a CamelDiscoDiary.
- (imap_disconnect_offline): And free it.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- If RESYNCING, don't do any sort of checking that the remote folder
- matches the summary, beyond making sure that the UIDVALIDITY is
- correct.
- (imap_rescan): Add a missing camel_folder_summary_info_free when
- removing a UID from the summary.
- (imap_expunge_uids_offline): Implement. Fairly simple.
- (imap_expunge_uids_resyncing): Implement. If the store supports
- UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
- to temporarily undelete any messages marked deleted on the server
- that aren't supposed to get expunged.
- (imap_append_offline): Implement, using cache and summary
- operations, and triggering the folder_changed event by hand.
- (imap_append_resyncing): Implement. Redo imap_append_online a bit
- in the process to make them able to share more code.
- (imap_copy_offline): Implement.
- (imap_copy_online): Move parts of this out into a helper.
- (imap_copy_resyncing): Implement. In most cases this is just like
- imap_copy_online, but if you are copying a message that was itself
- copied or appended into the folder, and the server doesn't do
- UIDPLUS, it will be necessary to replace at least part of the copy
- operation with one or more appends.
-
- * providers/imap/camel-imap-command.c (imap_read_response): Don't
- record the current folder in the response when in RESYNCING mode.
- (This means that EXISTS and EXPUNGE responses won't be processed,
- which is needed because the summary may not match the folder at
- this point.)
- (imap_read_response): On error, call
- camel_imap_response_free_without_processing, not
- camel_imap_response_free.
-
- * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
- this work better when operating on UIDs that aren't in the summary.
-
- * providers/imap/camel-imap-summary.c
- (camel_imap_summary_add_offline): New routine used by
- imap_append_offline and imap_copy_offline to create new summary
- entries.
-
-2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
- because some systems don't have strcasecmp(). Also, when removing
- a param, make sure to free the param->name too.
-
-2001-05-27 Dan Winship <danw@ximian.com>
-
- * tests/lib/messages.c (test_message_read_file): Fix an fd leak
-
- * tests/lib/session.c, tests/lib/session.h: a CamelSession
- subclass for the test programs.
-
- * tests/lib/Makefile.am: include session.[ch]
-
- * tests/folder/test*.c: Use a CamelTestSession from libcameltest
- instead of cut+pasting everywhere.
-
- * tests/misc/url.c (main): Update for a camel_url_new change at
- some point.
-
- * tests/*/.cvsignore: Add stuff.
-
- * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
- mixup.
-
-2001-05-26 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
- saying if we want to rescan the entire folder for flag changes
- next time it's selected.
- (camel_imap_folder_init): Set need_rescan TRUE.
- (camel_imap_folder_selected): If need_rescan is TRUE, call
- imap_rescan.
- (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
- Otherwise just do a NOOP, making this a MUCH more lightweight
- operation. Also, don't call imap_rescan directly if the folder
- isn't selected, since that could end up causing the folder to be
- scanned *twice* (imap_rescan -> camel_imap_command ->
- camel_imap_folder_selected -> imap_rescan).
- (imap_rescan): Set need_rescan FALSE.
- (imap_sync_online): Don't NOOP if no changes were pushed: the
- caller will call refresh_info if it wants to poll for changes.
- Fixes evolution-mail doing lots of unnecessary extra work at
- quit time.
-
- * providers/imap/camel-imap-store.c (refresh_folder_info): Set
- need_rescan on each folder before calling refresh_info.
-
-2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
- strNcmp to make sure the response begins with a 334 code, not a
- strcmp. Duh.
-
- * providers/local/camel-maildir-folder.c (maildir_append_message):
- remove the summary info so we are not out-of-sync with the maildir
- folder.
-
- * providers/local/camel-mh-folder.c (mh_append_message): remove
- the summary info so we are not out-of-sync with the mh folder.
-
- * providers/local/camel-mbox-folder.c (mbox_append_message):
- remove the summary info so we are not out-of-sync with the mbox.
-
-2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
- the get-default-db function name wrong.
-
-2001-05-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): s/folder_deleted/folder_created -
- result of a bad copy/paste.
-
- * providers/imap/camel-imap-search.c (imap_body_contains):
- Optimize the match "" case.
-
-2001-05-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info_online):
- Store the CamelFolderInfo tree that was returned from
- camel_folder_info_build() in a new variable, 'tree', rather than
- 'fi' since we later use 'fi' when syncing folders. Not only does
- this fix a memory leak, but it also fixes the bug where the user
- would only see the last folder in the folder list and/or it's
- subfolders.
-
-2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-session.c (camel_session_forget_password): The service can
- be NULL here too, thanks to Wayne Davis for pointing this out.
-
- * camel-smime-context.c (camel_smime_context_new): We don't need
- to be passed the certdb path anymore.
-
-2001-05-16 Dan Winship <danw@ximian.com>
-
- * camel-medium.c (camel_medium_get_headers): New function to
- return an array of all headers.
- (camel_medium_free_headers): And free them.
-
- * camel-mime-part.c (get_headers, free_headers): Implement this
- for CamelMimePart. (Works for CamelMimeMessage too.)
-
-2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c (camel_smime_context_finalise): Don't
- close or free (it wasn't allocated) the certdb.
- (camel_smime_context_new): If we get a NULL certdb handle, then
- don't bother trying to create a new certdb handle since NSS_Init*
- should have done that.
-
-2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
- variables so we don't link in tons of extra cruft that we don't
- need.
-
- * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
- pkcs7 functions.
-
-2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c: Lots of fixes to get this to compile.
-
- * camel-smime.c (camel_smime_part_verify): Updated to pass in a
- hash argument to camel_smime_verify().
-
- * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
- to the changes in the context API.
-
- * camel-pgp-context.c (pgp_verify): Updated to take a
- CamelCipherHash argument.
-
- * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
- argument since the S/MIME code needs this.
-
- * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
- to the build.
-
- * camel-smime.[c,h]: New source files for manipulating S/MIME
- message parts.
-
-2001-05-14 Jon Trowbridge <trow@ximian.com>
-
- * camel-search-private.c (utf8_get): Replicate the semantics of
- the libunicode utf8 functions by returning NULL in the arg
- on invalid utf8.
-
- * camel-pgp-context.c (pgp_verify): Check for valid utf8,
- terminate loop if something looks wrong.
-
- * camel-mime-utils.c (header_encode_phrase_get_words): Properly
- check for invalid utf8.
- (header_encode_string): Properly check for invalid utf8.
-
- * camel-charset-map.c (camel_charset_step): Properly check for
- invalid utf8.
-
-2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/folder/test9.c:
- * tests/folder/test8.c:
- * tests/folder/test7.c:
- * tests/folder/test6.c:
- * tests/folder/test5.c:
- * tests/folder/test4.c:
- * tests/folder/test3.c:
- * tests/folder/test2.c:
- * tests/folder/test1.c:
- * tests/smime/pgp-mime.c:
- * tests/smime/pgp.c: Subclass CamelSession since we can no longer
- specify the passwd callback any other way and update code
- accordingly.
-
-2001-05-11 Dan Winship <danw@ximian.com>
-
- * camel-mime-utils.c (header_location_decode): Decode
- Content-Location, either correctly or Netscape-generated-brokenly.
-
- * camel-mime-part.c (camel_mime_part_set_content_location,
- camel_mime_part_get_content_location, etc): Deal with
- Content-Location header.
-
-2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
- the initial auth response until we get into the while-loop
- otherwise we have problems if the SASL mechanism supported a
- client initiated challenge (like PLAIN and LOGIN do).
-
-2001-05-11 Dan Winship <danw@ximian.com>
-
- * camel-stream-null.c (camel_stream_null_new): Make this return
- CamelStream * (like the other stream new functions) instead of
- CamelStreamNull *
-
-2001-05-10 Chris Toshok <toshok@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
- the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts
- during the connect.
-
-2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-session.c (camel_session_get_password): Don't abort if the
- Service is NULL, this is perfectly valid for cipher contexts.
-
-2001-05-09 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
- appropriate parameters to CF_CLASS and add comment explaining why
- my initial attempt at a solution didn't work.
-
-2001-05-09 Dan Winship <danw@ximian.com>
-
- * camel-disco-store.c (camel_disco_set_status): Set the
- disconnected status.
- (camel_disco_store_can_work_offline): Return whether or not a
- given CamelDiscoStore can work offline or not.
-
- * camel-disco-folder.c (camel_disco_folder_cache_message):
- Explicitly tell a folder to cache a message. (Better than using
- get_message, because for IMAP that doesn't guarantee you'll get
- all the message parts.)
- (camel_disco_folder_prepare_for_offline): Prepare a folder for
- offline use by caching all messages meeting given search criteria
- (and doing anything else the particular folder implementation
- needs).
-
- * camel-session.c (camel_session_set_online,
- camel_session_is_online): A session-wide online/offline toggle.
- (camel_session_init): Set online to TRUE.
-
- * providers/imap/camel-imap-store.c (can_work_offline):
- Implementation of CamelDiscoStore::can_work_offline. (Checks that
- the store has been used online at least once.)
- (imap_get_folder_online, imap_get_folder_offline): Deal with
- request for "inbox" properly. ("Don't you mean... 'INBOX'?").
-
- * providers/imap/camel-imap-folder.c (imap_cache_message):
- Implementation of CamelDiscoFolder::cache_message.
-
- * camel.h: Add camel-disco-store.h and camel-disco-folder.h
-
-2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
- content-id with <>'s.
-
-2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
- support for using OpenSSL.
-
- * camel-remote-store.c (remote_connect): Add support for using the
- OpenSSL implementation.
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
- NULL as the last argument to alert_user - prototype doesn't take
- that argument anymore?
-
- * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
- (ssl_verify): Use a global hash table to try and lookup the
- CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
- doesn't think one needs to pass data around, we should all be
- living in a world of global variables, duh!
-
-2001-05-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libcamelinclude_HEADERS): Fix another build
- problem. (Um, anyone else could have done this...)
-
-2001-05-04 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_online): Fix up
- refcounting on current_folder.
-
- * camel-disco-folder.c, camel-disco-store.h: Remove
- CamelDiscoDiary refs that weren't supposed to escape yet.
-
-2001-05-03 Dan Winship <danw@ximian.com>
-
- * camel-disco-store.c: new abstract class for disconnectable
- remote stores
-
- * camel-disco-folder.c: new abstract class for folders on
- disconnectable stores.
-
- * Makefile.am: Add camel-disco-folder.[ch] and
- camel-disco-store.[ch].
-
- * providers/imap/camel-imap-store.c: Make this a subclass of
- CamelDiscoStore, and fix up the offline interfaces for the changes
- since they were first written (particularly the fact that some
- IMAP stores don't just use subscribed folders).
-
- * providers/imap/camel-imap-folder.c: Make this a subclass of
- CamelDiscoFolder, although most ops still fail in disconnected
- mode.
-
- * camel-store.c (camel_store_get_folder_info): Change gboolean,
- gboolean, gboolean to guint32 in the prototype for this function.
-
- * providers/local/camel-local-store.c (get_folder_info): Update
- for prototype change.
-
-2001-05-02 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
- "tag_prefix" member. Move "useful_lsub" into capabilities.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init):
- Initialize the tag_prefix, based on a static variable.
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Use
- the store's tag_prefix character rather than "A" at the start of
- the tag. Makes the verbose debug output easier to parse when
- connected to multiple IMAP servers. (Well, unless you're connected
- to more than 26 servers...)
-
- * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
- this up... it was losing count in some cases and giving a more
- verbose answer than it needed to.
-
- * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
- rot.
-
-2001-05-01 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Redo
- command locking. Since command_lock is recursive, we can just get
- a lock here, and release it either on error, or when the caller
- frees the response data. (This simplifies a lot of stuff, and
- fixes some problems with camel_imap_folder_changed being called
- without the command_lock locked because of the 2001-03-22 change.)
-
- (camel_imap_response_free):
- (camel_imap_response_free_without_processing):
- (camel_imap_response_extract):
- (camel_imap_response_extract_continuation): These all take a
- CamelImapStore now as well, to deal with locking.
-
- * providers/imap/camel-imap-private.h: Add
- CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
- be made to call e_mutex_assert_locked.
-
- * providers/imap/camel-imap-folder.c, camel-imap-search.c,
- camel-imap-store.c: Simplify using new locking stuff. Add a few
- CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
-
-2001-05-01 Dan Winship <danw@ximian.com>
-
- Support the IMAP UIDPLUS extension (RFC 2359), which lets you
- resync after disconnected operation more efficiently, but also
- makes it possible to do appends and moves/copies more efficiently
- now.
-
- * providers/imap/camel-imap-folder.c (imap_append_message): If the
- server supports UIDPLUS, grab the APPENDUID response and cache the
- message into the folder's message cache.
- (imap_copy_messages_to): Likewise, for COPYUID, copy any message
- parts we have cached between the source and destination folder
- caches.
- (imap_get_message): If the entire message is already in the cache,
- just return that rather than building it from parts.
- (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
- the new messages first, then only fetch the headers for messages
- where we don't already have the headers cached.
-
- * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
- (cache_put): Fix refcounting stuff here.
- (camel_imap_message_cache_insert_stream,
- camel_imap_message_cache_insert_wrapper): New.
- (camel_imap_message_cache_get): Fix a bug here so the memory
- caching actually works.
- (camel_imap_message_cache_copy): New routine, used by
- imap_copy_messages_to.
-
- * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
- Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
- response.
-
-2001-04-30 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
- New-and-improved version of get_uid_set() from
- camel-imap-folder.c. Looks at the summary as it goes so that if
- you ask for messages 5, 6, 8, and 9, and there is no message 7,
- then you get "5:9" instead of "5:6,8:9"
-
- * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
- imap_uid_array_to_set() rather than get_uid_set().
- (get_uid_set): Gone
-
-2001-04-27 Dan Winship <danw@ximian.com>
-
- * camel-session.c: Redo this a lot so that instead of having a
- class full of callbacks, we have a subclassable class. Also,
- replace the increasingly horrifying
- camel_session_query_authenticator with three new routines,
- camel_session_get_password, camel_session_forget_password, and
- camel_session_alert_user.
-
- * camel-pgp-context.c:
- * camel-pkcs7-context.c:
- * camel-smime-context.c:
- * providers/imap/camel-imap-store.c:
- * providers/pop3/camel-pop3-store.c:
- * providers/smtp/camel-smtp-transport.c:
- Use camel_session_get_password / camel_session_forget_password.
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
- camel_session_alert_user.
-
-2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.c (camel_init): Automagically call camel_shutdown()
- atexit() ;-)
- (camel_init): Also initialize NSS databases as read/write for
- S/MIME and if NSS fails to init, try initializing with volatile
- databases.
-
- * camel-file-utils.h: #include <sys/types.h> for off_t.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * camel-file-utils.c: New file, with the int, string, time_t, and
- off_t encode/decode routines from camel-folder-summary.c moved
- here and renamed, for the enjoyment of non-CamelFolderSummary
- subclasses.
-
- * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
- (libcamelinclude_HEADERS): and camel-file-utils.h
-
- * camel-folder-summary.c: Remove functions that were moved to
- camel-file-utils.c, update uses of them for the new names.
- (camel_folder_summary_{en,de}code_token are still here.)
-
- * providers/local/camel-mbox-summary.c: Use camel_file_util_*
- names
-
- * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
-
- * providers/imap/camel-imap-store.c (imap_store_setup_online,
- imap_store_setup_offline): Use camel_file_util_* names, which
- makes much more sense since this isn't folder summary stuff.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
- stuff that's redundant with EXTRA_GNOME_CFLAGS)
- (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
-
- * camel-search-private.c:
- * camel-pgp-context.c:
- * camel-mime-utils.c: Use gunicode interfaces rather than
- libunicode.
-
- * camel-charset-map.c: Use gunicode rather than libunicode. (The
- charmap-regen code still depends on libunicode though.)
-
- * camel-mime-filter-charset.h:
- * tests/message/test2.c (convert): Use iconv rather than
- unicode_iconv.
-
- * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
- * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
- * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
- UNICODE_LIBS.
-
- * camel.c (camel_init): Remove call to unicode_init.
-
- * camel-mime-parser.c: Remove unused unicode.h include.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * camel-service.c (get_host): Use e_gethostbyname_r.
- (camel_service_gethost): Remove unused var.
-
-2001-04-26 Not Zed <NotZed@Ximian.com>
-
- * Applied jacob's patches for e-poolv stuff.
-
-2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
-
- * camel-digest-folder.[c,h]: New class that can be used to browse
- a multipart/digest message as if it were a CamelFolder.
-
-2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (pgp_verify): Oops, don't use the return
- value of iconv() as a string length, it only tells us the number
- of non-reversable character conversions. This fixes it so we
- actually see the gpg output in the message viewer.
-
-2001-04-23 Mikael Hallendal <micke@codefactory.se>
-
- * providers/nntp/Makefile.am (INCLUDES):
- Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
-
-2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-smime-context.c (smime_sign): Implemented using the
- secmime.h convenience functions.
- (smime_clearsign): We just error our here, there is no clearsign
- for smime.
- (smime_verify): Copied code over from the pkcs7 verify - same
- state, ugly and unknown :-)
- (smime_encrypt): Implemented using the secmime.h convenience
- functions.
- (smime_decrypt): Same as the code in pkcs7-context.
-
-2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pkcs7-context.c (pkcs7_sign): Implemented.
- (pkcs7_clearsign): Implemented.
- (get_zero_len_passwd): Convenience function to try a 0-length key
- on the certificate db - if this works then there is no need to
- prompt the user.
- (get_password): Callback to get the password.
- (camel_cipher_hash_to_nss): Convenience function to convert a
- CamelCipherHash to an NSS HASH_HashType.
- (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
- (pkcs7_digest): Digest function for use with pkcs7_sign().
- (sign_encode_cb): Callback to write the signed data to the output
- stream.
- (pkcs7_verify): Hacked on a bit more but am still a bit on the
- confused side. This might work but I wouldn't hold my breath. The
- sign/clearsign should be close if not correct, but this one...god
- only knows.
- (pkcs7_decrypt): Implemented.
- (pkcs7_encrypt): Implemented (mostly, still need to handle when
- 'sign' is TRUE).
-
-2001-04-18 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
- Free base_url and storage_path.
-
- * providers/pop3/camel-pop3-store.c (finalize): Free the
- implementation string.
- (camel_pop3_command): Clarify documentation to mention that
- @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
- (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
-
- * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
- pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
-
-2001-04-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
- encryption, decryption, signing, and verifying. Not yet
- complete. I'm sensing this is going to take a while seeing as how
- NSS is just so well documented.
-
-2001-04-17 Dan Winship <danw@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
- a memory leak in the error case.
-
-2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
- want to tell where we are by using the start of the message? I
- think this should be using camel_mime_parser_tell_start_from()
- instead. Also divide by the size *before* multiplying by 100 so
- that we don't overflow the int which was giving us negative values
- for our progress status (oops).
-
-2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-operation.c: Added a prototype for stamp().
-
- * camel-charset-map.c (camel_charset_locale_name): #include
- string.h so we don't get a warning about strchr being undefined
- and also init charset to NULL.
-
- * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
- conversion by hand so that we don't depend on gal.
-
- * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
-
- * camel-store.c (camel_mkdir_hier): Convenience function that it
- seems a number of camel-store implementations used gal for.
-
- * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
- not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
- instead.
-
- * providers/nntp/camel-imap-store.c: Lets not depend on gal for
- just e_mkdir_hier() - use camel_mkdir_hier() instead.
-
- * camel-session.c (camel_session_get_storage_path): Don't depend
- on e_mkdir_heir() anymore, use the CamelStore version.
-
- * camel-folder-search.h: Removed gal dependency, why was this even
- there in the first place?
-
- * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
- here, so remove it.
-
- * string-utils.c (strstrcase): New function, well more like old
- function brought back to life so we don't have to depend on gal.
-
- * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
- strstrcase rather than e_strstrcase so we don't depend on gal.
- (get_unread_online): Same here.
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
- strstrcase.
-
-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 Anto 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 277c736235..0000000000
--- a/camel/Makefile.am
+++ /dev/null
@@ -1,269 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = providers tests
-
-libcamelincludedir = $(includedir)/camel
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-
-sbin_PROGRAMS = camel-lock-helper
-
-lib_LTLIBRARIES = libcamel.la
-noinst_LTLIBRARIES = libcamel-static.la
-
-INCLUDES = -I.. -I$(srcdir)/.. \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- $(CAMEL_CFLAGS) \
- $(KRB4_CFLAGS) \
- $(NSPR_CFLAGS) \
- $(NSS_CFLAGS) \
- $(OPENSSL_CFLAGS) \
- -DCAMEL_SBINDIR=\""$(sbindir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
- -DG_LOG_DOMAIN=\"camel\"
-
-libcamel_la_SOURCES = \
- broken-date-parser.c \
- camel-address.c \
- camel-cipher-context.c \
- camel-cms-context.c \
- camel-data-wrapper.c \
- camel-digest-folder.c \
- camel-disco-diary.c \
- camel-disco-folder.c \
- camel-disco-store.c \
- camel-exception.c \
- camel-file-utils.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-html-parser.c \
- camel-internet-address.c \
- camel-lock.c \
- camel-lock-client.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-stripheader.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-smime-context.c \
- camel-smime-utils.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-sasl-popb4smtp.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-cms-context.h \
- camel-data-wrapper.h \
- camel-digest-folder.h \
- camel-disco-diary.h \
- camel-disco-folder.h \
- camel-disco-store.h \
- camel-exception-list.def \
- camel-exception.h \
- camel-file-utils.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-lock-client.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-stripheader.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-smime-context.h \
- camel-smime-utils.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-sasl-popb4smtp.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 \
- $(CAMEL_LIBS) \
- $(KRB4_LDFLAGS) \
- $(NSPR_LDFLAGS) \
- $(NSS_LDFLAGS) \
- $(OPENSSL_LDFLAGS)
-
-libcamel_static_la_SOURCES = $(libcamel_la_SOURCES)
-libcamel_static_la_LIBADD = $(libcamel_la_LIBADD)
-libcamel_static_la_LDFLAGS = --all-static
-
-camel_lock_helper_SOURCES = \
- camel-lock-helper.c \
- camel-lock-helper.h \
- camel-lock.c \
- camel-lock.h
-
-install-exec-hook:
- @if test -n "$(CAMEL_LOCK_HELPER_USER)"; then \
- if test `whoami` = root ; then \
- chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper ; \
- chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper ; \
- else \
- echo '*** WARNING ***' ; \
- echo "Camel will not be able to open mbox files until you perform the following steps:" ; \
- echo " 1. Become root" ; \
- echo " 2. chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
- echo " 3. chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
- echo '*** WARNING ***' ; \
- fi \
- else \
- echo "No user to chown to"; \
- fi
- @if test -n "$(CAMEL_LOCK_HELPER_GROUP)"; then \
- if test `whoami` = root ; then \
- chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper ; \
- chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper ; \
- else \
- echo '*** WARNING ***' ; \
- echo "Camel will not be able to open mbox files until you perform the following steps:" ; \
- echo " 1. Become root" ; \
- echo " 2. chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
- echo " 3. chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
- echo '*** WARNING ***' ; \
- fi \
- else \
- echo "No user to chown to"; \
- fi
-
-noinst_HEADERS = \
- camel-charset-map-private.h \
- camel-private.h \
- camel-search-private.h \
- camel-html-parser.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 7449ae7cf6..0000000000
--- a/camel/README
+++ /dev/null
@@ -1,63 +0,0 @@
-
- CAMEL
-
-
- A generic Messaging Library
-
-
- ----
-
-
-Introduction:
--------------
-
-[ NB. Camel has been written now. Please convert future tense to
-present tense. Thank you.
-
- -- Peter Williams <peterw@ximian.com> 7/2/2001
-]
-
-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 b63103bba6..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@ximian.com>
- *
- * Copyright 2000 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 <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@ximian.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@ximian.com *
- *****************************************************************************/
diff --git a/camel/broken-date-parser.h b/camel/broken-date-parser.h
deleted file mode 100644
index 6cb91aa6ea..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@ximian.com>
- *
- * Copyright 2000 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 <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 4215cea15e..0000000000
--- a/camel/camel-address.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 fe133c8825..0000000000
--- a/camel/camel-address.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 a795fbfd94..0000000000
--- a/camel/camel-charset-map-private.h
+++ /dev/null
@@ -1,515 +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, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x6f,
- 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
- 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
- 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
- 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
- 0xff, 0x00, 0x01, 0x81, 0x17, 0x00, 0x91, 0xd7,
- 0x86, 0xb9, 0x00, 0x91, 0x91, 0xd7, 0x11, 0x02,
- 0xbf, 0x91, 0xa9, 0x81, 0x06, 0x11, 0x11, 0xb9,
- 0x06, 0x01, 0x00, 0x91, 0x01, 0x81, 0x01, 0x00,
- 0x00, 0x06, 0x06, 0x02, 0x07, 0x03, 0x03, 0x04,
- 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00,
- 0x00, 0x00, 0x00, 0x05, 0x06, 0x03, 0x07, 0x07,
- 0x03, 0x00, 0x06, 0x02, 0x07, 0x04, 0x00, 0x07,
- 0x00, 0x06, 0x06, 0x02, 0x07, 0x03, 0x03, 0x04,
- 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00,
- 0x00, 0x00, 0x00, 0x05, 0x06, 0x03, 0x07, 0x2f,
- 0x03, 0x00, 0x06, 0x02, 0x07, 0x04, 0x00, 0x00,
-};
-
-static unsigned char m001[256] = {
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x01, 0x03,
- 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03,
- 0x01, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03,
-};
-
-static unsigned char m010[256] = {
- 0x03, 0x03, 0x04, 0x04, 0x07, 0x07, 0x05, 0x05,
- 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x04, 0x04,
- 0x06, 0x06, 0x03, 0x03, 0x00, 0x00, 0x03, 0x03,
- 0x07, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x02, 0x03, 0x03, 0x00, 0x00, 0x03, 0x03,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03,
- 0x02, 0x04, 0x04, 0x03, 0x03, 0x04, 0x04, 0x00,
- 0x00, 0x05, 0x05, 0x05, 0x05, 0x03, 0x03, 0x04,
- 0x04, 0x00, 0x02, 0x02, 0x03, 0x03, 0x00, 0x00,
- 0x04, 0x04, 0x00, 0x00, 0x04, 0x04, 0x03, 0x03,
- 0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x04, 0x04,
- 0x07, 0x07, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02,
- 0x02, 0x02, 0x03, 0x03, 0x00, 0x00, 0x04, 0x04,
- 0x04, 0x04, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x05, 0x05, 0x05, 0x05, 0x07, 0x07, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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,
- 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, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x02, 0x00, 0x00, 0x00, 0x00, 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,
-};
-
-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,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x06, 0x00, 0x06, 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,
-};
-
-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, 0x80, 0x80, 0x80, 0x00,
- 0x80, 0x80, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 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, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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, 0x78, 0x50, 0x50, 0x70, 0x50, 0x70, 0x70,
- 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x50, 0x50,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
- 0x00, 0x78, 0x50, 0x50, 0x70, 0x50, 0x70, 0x70,
- 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x50, 0x50,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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 m200[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x10, 0x10, 0x80, 0x00, 0x00,
- 0x90, 0x91, 0x10, 0x00, 0x11, 0x11, 0x11, 0x00,
- 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 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, 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,
-};
-
-static unsigned char m201[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, 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,
-};
-
-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, 0x50, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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 m220[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, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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 m230[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,
- 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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 m250[256] = {
- 0x28, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x28, 0x28, 0x08, 0x28, 0x08, 0x08, 0x28,
- 0x28, 0x28, 0x28, 0x28, 0x08, 0x28, 0x28, 0x28,
- 0x28, 0x28, 0x08, 0x28, 0x08, 0x08, 0x28, 0x28,
- 0x28, 0x28, 0x28, 0x08, 0x28, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
- 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 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;
-} camel_charmap[256] = {
- { m000, m001, }, { m010, m011, }, { m020, 0, }, { m030, 0, }, { m040, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { m200, m201, }, { m210, 0, }, { m220, 0, }, { m230, 0, }, { 0, 0, }, { m250, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
- { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, },
-};
-
-struct {
- const char *name;
- unsigned int bit;
-} camel_charinfo[] = {
- { "iso-8859-13", 0x0001 },
- { "iso-8859-4", 0x0002 },
- { "iso-8859-2", 0x0004 },
- { "koi8-r", 0x0008 },
- { "windows-1251", 0x0010 },
- { "koi8-u", 0x0020 },
- { "iso-8859-5", 0x0040 },
- { "iso-8859-7", 0x0080 },
- { "iso-8859-9", 0x0100 },
- { "iso-8859-15", 0x0200 },
-};
-
-#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)
-
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
deleted file mode 100644
index 02ea31a44c..0000000000
--- a/camel/camel-charset-map.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-
-/*
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2000, 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 <stdio.h>
-
-/*
- if you want to build the charset map, compile this with something like:
- gcc -DBUILD_MAP camel-charset-map.c `glib-config --cflags`
- (plus any -I/-L/-l flags you need for iconv), then run it as
- ./a.out > camel-charset-map-private.h
-
- Note that the big-endian variant isn't tested...
-
- 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 <iconv.h>
-#include <glib.h>
-
-static struct {
- char *name;
- unsigned int bit; /* assigned bit */
-} tables[] = {
- /* These are the 8bit character sets (other than iso-8859-1,
- * which is special-cased) which are supported by both other
- * mailers and the GNOME environment. Note that the order
- * they're listed in is the order they'll be tried in, so put
- * the more-popular ones first.
- */
- { "iso-8859-2", 0 }, /* Central/Eastern European */
- { "iso-8859-4", 0 }, /* Baltic */
- { "koi8-r", 0 }, /* Russian */
- { "windows-1251", 0 }, /* Russian */
- { "koi8-u", 0 }, /* Ukranian */
- { "iso-8859-5", 0 }, /* Least-popular Russian encoding */
- { "iso-8859-7", 0 }, /* Greek */
- { "iso-8859-9", 0 }, /* Turkish */
- { "iso-8859-13", 0 }, /* Baltic again */
- { "iso-8859-15", 0 }, /* New-and-improved iso-8859-1, but most
- * programs that support this support UTF8
- */
- { 0, 0 }
-};
-
-unsigned int encoding_map[256 * 256];
-
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-#define UCS "UCS-4BE"
-#else
-#define UCS "UCS-4LE"
-#endif
-
-void main(void)
-{
- int i, j;
- int max, min;
- int bit = 0x01;
- int k;
- int bytes;
- iconv_t cd;
- char in[128];
- guint32 out[128];
- char *inptr, *outptr;
- size_t inlen, outlen;
-
- /* dont count the terminator */
- bytes = ((sizeof(tables)/sizeof(tables[0]))+7-1)/8;
-
- for (i = 0; i < 128; i++)
- in[i] = i + 128;
-
- for (j = 0; tables[j].name; j++) {
- cd = iconv_open (UCS, tables[j].name);
- inptr = in;
- outptr = (char *)(out);
- inlen = sizeof (in);
- outlen = sizeof (out);
- while (iconv (cd, &inptr, &inlen, &outptr, &outlen) == -1) {
- if (errno == EILSEQ) {
- inptr++;
- inlen--;
- } else {
- printf ("%s\n", strerror (errno));
- exit (1);
- }
- }
- iconv_close (cd);
-
- for (i = 0; i < 128 - outlen / 4; i++) {
- encoding_map[i] |= bit;
- encoding_map[out[i]] |= bit;
- }
-
- 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].name;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 "hash-table-utils.h"
-#include <gal/unicode/gunicode.h>
-#include <locale.h>
-#include <string.h>
-#include <ctype.h>
-#include <glib.h>
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-
-#ifdef ENABLE_THREADS
-static pthread_mutex_t iconv_charsets_lock = PTHREAD_MUTEX_INITIALIZER;
-#define ICONV_CHARSETS_LOCK() pthread_mutex_lock (&iconv_charsets_lock)
-#define ICONV_CHARSETS_UNLOCK() pthread_mutex_unlock (&iconv_charsets_lock)
-#else
-#define ICONV_CHARSETS_LOCK()
-#define ICONV_CHARSETS_UNLOCK()
-#endif /* ENABLE_THREADS */
-
-static GHashTable *iconv_charsets = NULL;
-static char *locale_charset = NULL;
-
-struct {
- char *charset;
- char *iconv_name;
-} known_iconv_charsets[] = {
- /* charset name, iconv-friendly charset name */
- { "iso-8859-1", "iso-8859-1" },
- { "iso8859-1", "iso-8859-1" },
- /* the above mostly serves as an example for iso-style charsets,
- but we have code that will populate the iso-*'s if/when they
- show up in camel_charset_map_to_iconv() so I'm
- not going to bother putting them all in here... */
- { "windows-cp1251", "cp1251" },
- { "windows-1251", "cp1251" },
- { "cp1251", "cp1251" },
- /* the above mostly serves as an example for windows-style
- charsets, but we have code that will parse and convert them
- to their cp#### equivalents if/when they show up in
- camel_charset_map_to_iconv() so I'm not going to bother
- putting them all in here... */
- { "ks_c_5601-1987", "euc-kr" },
- { NULL, NULL }
-};
-
-
-static void
-shutdown_foreach (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (value);
-}
-
-static void
-camel_charset_map_shutdown (void)
-{
- g_hash_table_foreach (iconv_charsets, shutdown_foreach, NULL);
- g_hash_table_destroy (iconv_charsets);
- g_free (locale_charset);
-}
-
-void
-camel_charset_map_init (void)
-{
- char *locale;
- int i;
-
- if (iconv_charsets)
- return;
-
- iconv_charsets = g_hash_table_new (g_strcase_hash, g_strcase_equal);
- for (i = 0; known_iconv_charsets[i].charset != NULL; i++) {
- g_hash_table_insert (iconv_charsets, g_strdup (known_iconv_charsets[i].charset),
- g_strdup (known_iconv_charsets[i].iconv_name));
- }
-
- 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.
- */
-
- locale_charset = 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, '.'))) {
- locale_charset = g_strndup (p + 1, len - (p - locale) + 1);
- g_strdown (locale_charset);
- }
- }
-
- g_atexit (camel_charset_map_shutdown);
-}
-
-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) {
- gunichar c;
- const char *newinptr;
- newinptr = g_utf8_next_char(inptr);
- c = g_utf8_get_char(inptr);
- if (newinptr == NULL || !g_unichar_validate (c)) {
- 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);
-}
-
-const char *
-camel_charset_locale_name (void)
-{
- return locale_charset;
-}
-
-const char *
-camel_charset_to_iconv (const char *name)
-{
- const char *charset;
-
- if (name == NULL)
- return NULL;
-
- /* special-case hack... */
- if (!g_strcasecmp (name, "x-unknown"))
- return locale_charset ? locale_charset : "iso-8859-1";
-
- ICONV_CHARSETS_LOCK ();
- charset = g_hash_table_lookup (iconv_charsets, name);
- if (!charset) {
- /* Attempt to friendlyify the charset */
- char *new_charset, *p;
- int len;
-
- if (!g_strncasecmp (name, "iso", 3) && name[3] != '-' && name[3] != '_') {
- /* Hack to convert charsets like ISO8859-1 to iconv-friendly ISO-8859-1 */
- len = strlen (name);
- new_charset = g_malloc (len + 2);
- memcpy (new_charset, name, 3);
- new_charset[3] = '-';
- memcpy (new_charset + 4, name + 3, len - 3);
- new_charset[len + 1] = '\0';
- } else if (!g_strncasecmp (name, "windows-", 8)) {
- /* Convert charsets like windows-1251 and windows-cp1251 to iconv-friendly cp1251 */
- new_charset = (char *) name + 8;
- if (!g_strncasecmp (new_charset, "cp", 2))
- new_charset += 2;
-
- for (p = new_charset; *p && isdigit ((unsigned) *p); p++);
- if (*p == '\0')
- new_charset = g_strdup_printf ("cp%s", new_charset);
- else
- new_charset = g_strdup (name);
- } else {
- /* *shrug* - add it to the hash table just the way it is? */
- new_charset = g_strdup (name);
- }
-
- g_hash_table_insert (iconv_charsets, g_strdup (name), new_charset);
- charset = new_charset;
- }
- ICONV_CHARSETS_UNLOCK ();
-
- return charset;
-}
-
-#endif /* !BUILD_MAP */
-
diff --git a/camel/camel-charset-map.h b/camel/camel-charset-map.h
deleted file mode 100644
index 0bf2c706c5..0000000000
--- a/camel/camel-charset-map.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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_map_init (void);
-
-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);
-
-const char *camel_charset_locale_name (void);
-
-const char *camel_charset_to_iconv (const char *name);
-
-#endif /* ! _CAMEL_CHARSET_MAP_H */
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
deleted file mode 100644
index 68ead9d01b..0000000000
--- a/camel/camel-cipher-context.c
+++ /dev/null
@@ -1,450 +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, CamelCipherHash hash,
- 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, CamelCipherHash hash, 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, CamelCipherHash hash, 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, hash, 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 06846e5840..0000000000
--- a/camel/camel-cipher-context.h
+++ /dev/null
@@ -1,125 +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_MD2,
- 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, CamelCipherHash hash,
- 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, CamelCipherHash hash,
- 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-cms-context.c b/camel/camel-cms-context.c
deleted file mode 100644
index dea3951877..0000000000
--- a/camel/camel-cms-context.c
+++ /dev/null
@@ -1,324 +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-cms-context.h"
-
-#include <glib.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#define CMS_LOCK(ctx) g_mutex_lock (((CamelCMSContext *) ctx)->priv->lock)
-#define CMS_UNLOCK(ctx) g_mutex_unlock (((CamelCMSContext *) ctx)->priv->lock);
-#else
-#define CMS_LOCK(ctx)
-#define CMS_UNLOCK(ctx)
-#endif
-
-#define d(x)
-
-#define CCC_CLASS(o) CAMEL_CMS_CONTEXT_CLASS(CAMEL_OBJECT_GET_CLASS(o))
-
-struct _CamelCMSContextPrivate {
-#ifdef ENABLE_THREADS
- GMutex *lock;
-#endif
-};
-
-static CamelMimeMessage *cms_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex);
-
-static CamelMimeMessage *cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-static CamelMimeMessage *cms_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-static CamelMimeMessage *cms_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-static CamelMimeMessage *cms_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex);
-
-static CamelObjectClass *parent_class;
-
-static void
-camel_cms_context_init (CamelCMSContext *context)
-{
- context->priv = g_new0 (struct _CamelCMSContextPrivate, 1);
-#ifdef ENABLE_THREADS
- context->priv->lock = g_mutex_new ();
-#endif
-}
-
-static void
-camel_cms_context_finalise (CamelObject *o)
-{
- CamelCMSContext *context = (CamelCMSContext *)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_cms_context_class_init (CamelCMSContextClass *camel_cms_context_class)
-{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- camel_cms_context_class->sign = cms_sign;
- camel_cms_context_class->certsonly = cms_certsonly;
- camel_cms_context_class->encrypt = cms_encrypt;
- camel_cms_context_class->envelope = cms_envelope;
- camel_cms_context_class->decode = cms_decode;
-}
-
-CamelType
-camel_cms_context_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (),
- "CamelCMSContext",
- sizeof (CamelCMSContext),
- sizeof (CamelCMSContextClass),
- (CamelObjectClassInitFunc) camel_cms_context_class_init,
- NULL,
- (CamelObjectInitFunc) camel_cms_context_init,
- (CamelObjectFinalizeFunc) camel_cms_context_finalise);
- }
-
- return type;
-}
-
-
-/**
- * camel_cms_context_new:
- * @session: CamelSession
- * @encryption_key: preferred encryption key nickname
- *
- * This creates a new CamelCMSContext object which is used to sign,
- * encrypt, envelope and decode CMS messages.
- *
- * Return value: the new CamelCMSContext
- **/
-CamelCMSContext *
-camel_cms_context_new (CamelSession *session)
-{
- CamelCMSContext *context;
-
- g_return_val_if_fail (session != NULL, NULL);
- g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
-
- context = CAMEL_CMS_CONTEXT (camel_object_new (CAMEL_CMS_CONTEXT_TYPE));
-
- camel_object_ref (CAMEL_OBJECT (session));
- context->session = session;
-
- return context;
-}
-
-
-/**
- * camel_cms_context_construct:
- * @context: CMS Context
- * @session: CamelSession
- *
- * Construct the CMS Context.
- **/
-void
-camel_cms_context_construct (CamelCMSContext *context, CamelSession *session)
-{
- g_return_if_fail (CAMEL_IS_CMS_CONTEXT (context));
- g_return_if_fail (CAMEL_IS_SESSION (session));
-
- camel_object_ref (CAMEL_OBJECT (session));
- context->session = session;
-}
-
-
-static CamelMimeMessage *
-cms_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex)
-{
- g_warning ("Using default CamelCMSContext::sign() method.");
-
- return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
- g_return_val_if_fail (userid != NULL, NULL);
-
- return CCC_CLASS (ctx)->sign (ctx, message, userid, signing_time, detached, ex);
-}
-
-
-static CamelMimeMessage *
-cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- g_warning ("Using default CamelCMSContext::certsonly() method.");
-
- return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
- g_return_val_if_fail (userid != NULL, NULL);
- g_return_val_if_fail (recipients != NULL, NULL);
-
- return CCC_CLASS (ctx)->certsonly (ctx, message, userid, recipients, ex);
-}
-
-
-static CamelMimeMessage *
-cms_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- g_warning ("Using default CamelCMSContext::envelope() method.");
-
- return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
- g_return_val_if_fail (userid != NULL, NULL);
- g_return_val_if_fail (recipients != NULL, NULL);
-
- return CCC_CLASS (ctx)->envelope (ctx, message, userid, recipients, ex);
-}
-
-
-static CamelMimeMessage *
-cms_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- g_warning ("Using default CamelCMSContext::encrypt() method.");
-
- return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
- g_return_val_if_fail (userid != NULL, NULL);
- g_return_val_if_fail (recipients != NULL, NULL);
-
- return CCC_CLASS (ctx)->encrypt (ctx, message, userid, recipients, ex);
-}
-
-
-static CamelMimeMessage *
-cms_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex)
-{
- g_warning ("Using default CamelCMSContext::decode() method.");
-
- return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-
- return CCC_CLASS (ctx)->decode (ctx, message, info, ex);
-}
-
-
-void
-camel_cms_signer_free (CamelCMSSigner *signer)
-{
- CamelCMSSigner *next;
-
- if (!signer)
- return;
-
- while (signer) {
- next = signer->next;
- g_free (signer->signercn);
- g_free (signer->status);
- g_free (signer);
- signer = next;
- }
-}
-
-
-void
-camel_cms_validity_info_free (CamelCMSValidityInfo *info)
-{
- CamelCMSValidityInfo *next;
-
- if (!info)
- return;
-
- while (info) {
- next = info->next;
- if (info->type == CAMEL_CMS_TYPE_SIGNED)
- camel_cms_signer_free (info->signers);
- g_free (info);
- info = next;
- }
-}
diff --git a/camel/camel-cms-context.h b/camel/camel-cms-context.h
deleted file mode 100644
index b68547e8b0..0000000000
--- a/camel/camel-cms-context.h
+++ /dev/null
@@ -1,128 +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_CMS_CONTEXT_H
-#define CAMEL_CMS_CONTEXT_H
-
-#include <camel/camel-session.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-mime-message.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CAMEL_CMS_CONTEXT_TYPE (camel_cms_context_get_type ())
-#define CAMEL_CMS_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CMS_CONTEXT_TYPE, CamelCMSContext))
-#define CAMEL_CMS_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CMS_CONTEXT_TYPE, CamelCMSContextClass))
-#define CAMEL_IS_CMS_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_CMS_CONTEXT_TYPE))
-
-typedef enum {
- CAMEL_CMS_TYPE_DATA,
- CAMEL_CMS_TYPE_SIGNED,
- CAMEL_CMS_TYPE_ENVELOPED,
- CAMEL_CMS_TYPE_ENCRYPTED
-} CamelCMSType;
-
-typedef struct _CamelCMSSigner {
- struct _CamelCMSSigner *next;
- char *signercn;
- char *status;
-} CamelCMSSigner;
-
-typedef struct _CamelCMSValidityInfo {
- struct _CamelCMSValidityInfo *next;
- CamelCMSType type;
- CamelCMSSigner *signers;
-} CamelCMSValidityInfo;
-
-
-typedef struct _CamelCMSContext {
- CamelObject parent_object;
-
- struct _CamelCMSContextPrivate *priv;
-
- CamelSession *session;
-} CamelCMSContext;
-
-typedef struct _CamelCMSContextClass {
- CamelObjectClass parent_class;
-
- CamelMimeMessage *(*sign) (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex);
-
- CamelMimeMessage *(*certsonly) (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
- CamelMimeMessage *(*encrypt) (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
- CamelMimeMessage *(*envelope) (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
- CamelMimeMessage *(*decode) (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex);
-
-} CamelCMSContextClass;
-
-CamelType camel_cms_context_get_type (void);
-
-CamelCMSContext *camel_cms_context_new (CamelSession *session);
-
-void camel_cms_context_construct (CamelCMSContext *context, CamelSession *session);
-
-/* cms routines */
-CamelMimeMessage *camel_cms_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex);
-
-CamelMimeMessage *camel_cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-CamelMimeMessage *camel_cms_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-CamelMimeMessage *camel_cms_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-CamelMimeMessage *camel_cms_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex);
-
-
-void camel_cms_signer_free (CamelCMSSigner *signer);
-
-void camel_cms_validity_info_free (CamelCMSValidityInfo *info);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CMS_CONTEXT_H */
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
deleted file mode 100644
index a549f6bed9..0000000000
--- a/camel/camel-data-wrapper.c
+++ /dev/null
@@ -1,302 +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 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 <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 gboolean is_offline (CamelDataWrapper *data_wrapper);
-
-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;
- camel_data_wrapper_class->is_offline = is_offline;
-}
-
-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;
- camel_data_wrapper->rawtext = 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);
-}
-
-
-static gboolean
-is_offline (CamelDataWrapper *data_wrapper)
-{
- return data_wrapper->offline;
-}
-
-/**
- * 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 CDW_CLASS (data_wrapper)->is_offline (data_wrapper);
-}
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
deleted file mode 100644
index 2d1e44c1fd..0000000000
--- a/camel/camel-data-wrapper.h
+++ /dev/null
@@ -1,99 +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 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_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;
-
- unsigned int offline:1;
- unsigned int rawtext:1;
-};
-
-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 *);
-
- gboolean (*is_offline) (CamelDataWrapper *data_wrapper);
-
-} 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-digest-folder.c b/camel/camel-digest-folder.c
deleted file mode 100644
index 42d238ade4..0000000000
--- a/camel/camel-digest-folder.c
+++ /dev/null
@@ -1,305 +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-digest-folder.h"
-
-#include "camel-exception.h"
-#include "camel-multipart.h"
-#include "camel-mime-message.h"
-#include "camel-folder-summary.h"
-
-#define d(x)
-
-#define _PRIVATE(o) (((CamelDigestFolder *)(o))->priv)
-
-struct _CamelDigestFolderPrivate {
- CamelMimeMessage *message;
- GHashTable *info_hash;
- GPtrArray *summary;
- GPtrArray *uids;
-};
-
-static CamelFolderClass *parent_class = NULL;
-
-static void digest_refresh_info (CamelFolder *folder, CamelException *ex);
-static void digest_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static const char *digest_get_full_name (CamelFolder *folder);
-static void digest_expunge (CamelFolder *folder, CamelException *ex);
-
-static GPtrArray *digest_get_uids (CamelFolder *folder);
-static void digest_free_uids (CamelFolder *folder, GPtrArray *uids);
-static CamelMessageInfo *digest_get_message_info (CamelFolder *folder, const char *uid);
-
-/* message manipulation */
-static CamelMimeMessage *digest_get_message (CamelFolder *folder, const gchar *uid,
- CamelException *ex);
-static void digest_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-static void digest_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-static void digest_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-
-
-static void
-camel_digest_folder_class_init (CamelDigestFolderClass *camel_digest_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_digest_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 = digest_refresh_info;
- camel_folder_class->sync = digest_sync;
- camel_folder_class->expunge = digest_expunge;
- camel_folder_class->get_full_name = digest_get_full_name;
-
- camel_folder_class->get_uids = digest_get_uids;
- camel_folder_class->free_uids = digest_free_uids;
- camel_folder_class->get_message_info = digest_get_message_info;
-
- camel_folder_class->get_message = digest_get_message;
- camel_folder_class->append_message = digest_append_message;
- camel_folder_class->copy_messages_to = digest_copy_messages_to;
- camel_folder_class->move_messages_to = digest_move_messages_to;
-}
-
-static void
-camel_digest_folder_init (gpointer object, gpointer klass)
-{
- CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (object);
- CamelFolder *folder = CAMEL_FOLDER (object);
-
- folder->has_summary_capability = TRUE;
- folder->has_search_capability = FALSE;
-
- digest_folder->priv = g_new0 (struct _CamelDigestFolderPrivate, 1);
- digest_folder->priv->info_hash = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-digest_finalize (CamelObject *object)
-{
- CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (object);
- GPtrArray *summary;
-
- camel_object_unref (CAMEL_OBJECT (digest_folder->priv->message));
-
- g_hash_table_destroy (digest_folder->priv->info_hash);
-
- summary = digest_folder->priv->summary;
- if (summary) {
- int i;
-
- for (i = 0; i < summary->len; i++)
- camel_message_info_free (summary->pdata[i]);
-
- g_ptr_array_free (summary, TRUE);
- }
-
- if (digest_folder->priv->uids)
- g_ptr_array_free (digest_folder->priv->uids, TRUE);
-
- g_free (digest_folder->priv);
-}
-
-CamelType
-camel_digest_folder_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_FOLDER_TYPE,
- "CamelDigestFolder",
- sizeof (CamelDigestFolder),
- sizeof (CamelDigestFolderClass),
- (CamelObjectClassInitFunc) camel_digest_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_digest_folder_init,
- (CamelObjectFinalizeFunc) digest_finalize);
- }
-
- return type;
-}
-
-CamelFolder *
-camel_digest_folder_new (CamelMimeMessage *message)
-{
- CamelDigestFolder *digest_folder;
- CamelDataWrapper *wrapper;
- CamelFolder *folder;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- if (!wrapper || !CAMEL_IS_MULTIPART (wrapper))
- return NULL;
-
- if (!header_content_type_is (CAMEL_MIME_PART (message)->content_type, "multipart", "digest")) {
- int i, parts;
-
- /* Make sure we have a multipart of message/rfc822 attachments... */
- parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
- for (i = 0; i < parts; i++) {
- CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
-
- if (!header_content_type_is (part->content_type, "message", "rfc822"))
- return NULL;
- }
- }
-
- folder = CAMEL_FOLDER (camel_object_new (camel_digest_folder_get_type ()));
- digest_folder = CAMEL_DIGEST_FOLDER (folder);
-
- camel_folder_construct (folder, NULL, "folder_name", "short_name");
-
- camel_object_ref (CAMEL_OBJECT (message));
- digest_folder->priv->message = message;
-
- return folder;
-}
-
-static void
-digest_refresh_info (CamelFolder *folder, CamelException *ex)
-{
-
-}
-
-static void
-digest_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-
-}
-
-static void
-digest_expunge (CamelFolder *folder, CamelException *ex)
-{
-
-}
-
-static GPtrArray *
-digest_get_uids (CamelFolder *folder)
-{
- CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (folder);
- CamelDataWrapper *wrapper;
- GHashTable *info_hash;
- GPtrArray *summary;
- GPtrArray *uids;
- int parts, i;
-
- if (digest_folder->priv->uids)
- return digest_folder->priv->uids;
-
- uids = g_ptr_array_new ();
- summary = g_ptr_array_new ();
- info_hash = digest_folder->priv->info_hash;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (digest_folder->priv->message));
- parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
- for (i = 0; i < parts; i++) {
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- CamelMimePart *part;
- char *uid;
-
- uid = g_strdup_printf ("%d", i + 1);
-
- part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
- message = CAMEL_MIME_MESSAGE (part);
-
- info = camel_message_info_new_from_header (CAMEL_MIME_PART (message)->headers);
- camel_message_info_set_uid (info, uid);
-
- g_ptr_array_add (uids, uid);
- g_ptr_array_add (summary, info);
- g_hash_table_insert (info_hash, uid, info);
- }
-
- digest_folder->priv->uids = uids;
- digest_folder->priv->summary = summary;
-
- return uids;
-}
-
-static void
-digest_free_uids (CamelFolder *folder, GPtrArray *uids)
-{
- /* no-op */
-}
-
-static CamelMessageInfo *
-digest_get_message_info (CamelFolder *folder, const char *uid)
-{
- CamelDigestFolder *digest = CAMEL_DIGEST_FOLDER (folder);
-
- return g_hash_table_lookup (digest->priv->info_hash, uid);
-}
-
-static const char *
-digest_get_full_name (CamelFolder *folder)
-{
- return folder->full_name;
-}
-
-static void
-digest_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- /* no-op */
-}
-
-static void
-digest_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- /* no-op */
-}
-
-static void
-digest_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- /* no-op */
-}
-
-static CamelMimeMessage *
-digest_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelDigestFolder *digest = CAMEL_DIGEST_FOLDER (folder);
- CamelDataWrapper *wrapper;
- CamelMimeMessage *message;
- CamelMimePart *part;
- int id;
-
- id = atoi (uid) - 1;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (digest->priv->message));
- part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), id);
- message = CAMEL_MIME_MESSAGE (part);
- camel_object_ref (CAMEL_OBJECT (message));
-
- return message;
-}
diff --git a/camel/camel-digest-folder.h b/camel/camel-digest-folder.h
deleted file mode 100644
index 792182a653..0000000000
--- a/camel/camel-digest-folder.h
+++ /dev/null
@@ -1,52 +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_DIGEST_FOLDER_H
-#define _CAMEL_DIGEST_FOLDER_H
-
-#include <glib.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-mime-message.h>
-
-#define CAMEL_DIGEST_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_digest_folder_get_type (), CamelDigestFolder)
-#define CAMEL_DIGEST_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_folder_get_type (), CamelDigestFolderClass)
-#define CAMEL_IS_DIGEST_FOLDER(obj) CAMEL_CHECK_TYPE (obj, camel_digest_folder_get_type ())
-
-typedef struct _CamelDigestFolder CamelDigestFolder;
-typedef struct _CamelDigestFolderClass CamelDigestFolderClass;
-
-struct _CamelDigestFolder {
- CamelFolder parent;
-
- struct _CamelDigestFolderPrivate *priv;
-};
-
-struct _CamelDigestFolderClass {
- CamelFolderClass parent_class;
-
-};
-
-CamelType camel_digest_folder_get_type (void);
-
-CamelFolder *camel_digest_folder_new (CamelMimeMessage *message);
-
-#endif /* ! _CAMEL_DIGEST_FOLDER_H */
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
deleted file mode 100644
index 7bbceb1ee0..0000000000
--- a/camel/camel-disco-diary.c
+++ /dev/null
@@ -1,417 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-diary.c: class for a disconnected operation log */
-
-/*
- * Authors: Dan Winship <danw@ximian.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-disco-diary.h"
-#include "camel-disco-folder.h"
-#include "camel-disco-store.h"
-#include "camel-exception.h"
-#include "camel-file-utils.h"
-#include "camel-folder.h"
-#include "camel-operation.h"
-#include "camel-session.h"
-#include "camel-store.h"
-
-#include <errno.h>
-
-
-static void
-camel_disco_diary_class_init (CamelDiscoDiaryClass *camel_disco_diary_class)
-{
- /* virtual method definition */
-}
-
-static void
-camel_disco_diary_init (CamelDiscoDiary *diary)
-{
- diary->folders = g_hash_table_new (g_str_hash, g_str_equal);
- diary->uidmap = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-unref_folder (gpointer key, gpointer value, gpointer data)
-{
- camel_object_unref (value);
-}
-
-static void
-free_uid (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (value);
-}
-
-static void
-camel_disco_diary_finalize (CamelDiscoDiary *diary)
-{
- if (diary->file)
- fclose (diary->file);
- if (diary->folders) {
- g_hash_table_foreach (diary->folders, unref_folder, NULL);
- g_hash_table_destroy (diary->folders);
- }
- if (diary->uidmap) {
- g_hash_table_foreach (diary->uidmap, free_uid, NULL);
- g_hash_table_destroy (diary->uidmap);
- }
-}
-
-CamelType
-camel_disco_diary_get_type (void)
-{
- static CamelType camel_disco_diary_type = CAMEL_INVALID_TYPE;
-
- if (camel_disco_diary_type == CAMEL_INVALID_TYPE) {
- camel_disco_diary_type = camel_type_register (
- CAMEL_OBJECT_TYPE, "CamelDiscoDiary",
- sizeof (CamelDiscoDiary),
- sizeof (CamelDiscoDiaryClass),
- (CamelObjectClassInitFunc) camel_disco_diary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_disco_diary_init,
- (CamelObjectFinalizeFunc) camel_disco_diary_finalize);
- }
-
- return camel_disco_diary_type;
-}
-
-
-static int
-diary_encode_uids (CamelDiscoDiary *diary, GPtrArray *uids)
-{
- int i, status;
-
- status = camel_file_util_encode_uint32 (diary->file, uids->len);
- for (i = 0; status != -1 && i < uids->len; i++)
- status = camel_file_util_encode_string (diary->file, uids->pdata[i]);
- return status;
-}
-
-void
-camel_disco_diary_log (CamelDiscoDiary *diary, CamelDiscoDiaryAction action,
- ...)
-{
- va_list ap;
- int status;
-
- /* You may already be a loser. */
- if (!diary->file)
- return;
-
- status = camel_file_util_encode_uint32 (diary->file, action);
- if (status == -1)
- goto lose;
-
- va_start (ap, action);
- switch (action) {
- case CAMEL_DISCO_DIARY_FOLDER_EXPUNGE:
- {
- CamelFolder *folder = va_arg (ap, CamelFolder *);
- GPtrArray *uids = va_arg (ap, GPtrArray *);
-
- status = camel_file_util_encode_string (diary->file, folder->full_name);
- if (status != -1)
- status = diary_encode_uids (diary, uids);
- break;
- }
-
- case CAMEL_DISCO_DIARY_FOLDER_APPEND:
- {
- CamelFolder *folder = va_arg (ap, CamelFolder *);
- char *uid = va_arg (ap, char *);
-
- status = camel_file_util_encode_string (diary->file, folder->full_name);
- if (status != -1)
- status = camel_file_util_encode_string (diary->file, uid);
- break;
- }
-
- case CAMEL_DISCO_DIARY_FOLDER_MOVE:
- case CAMEL_DISCO_DIARY_FOLDER_COPY:
- {
- CamelFolder *source = va_arg (ap, CamelFolder *);
- CamelFolder *destination = va_arg (ap, CamelFolder *);
- GPtrArray *uids = va_arg (ap, GPtrArray *);
-
- status = camel_file_util_encode_string (diary->file, source->full_name);
- if (status == -1)
- break;
- status = camel_file_util_encode_string (diary->file, destination->full_name);
- if (status == -1)
- break;
- status = diary_encode_uids (diary, uids);
- break;
- }
-
- default:
- g_assert_not_reached ();
- break;
- }
-
- va_end (ap);
-
- lose:
- if (status == -1) {
- char *msg;
-
- msg = g_strdup_printf (_("Could not write log entry: %s\n"
- "Further operations on this server "
- "will not be replayed when you\n"
- "reconnect to the network."),
- g_strerror (errno));
- camel_session_alert_user (camel_service_get_session (CAMEL_SERVICE (diary->store)),
- CAMEL_SESSION_ALERT_ERROR,
- msg, FALSE);
- g_free (msg);
-
- fclose (diary->file);
- diary->file = NULL;
- }
-}
-
-static void
-free_uids (GPtrArray *array)
-{
- while (array->len--)
- g_free (array->pdata[array->len]);
- g_ptr_array_free (array, TRUE);
-}
-
-static GPtrArray *
-diary_decode_uids (CamelDiscoDiary *diary)
-{
- GPtrArray *uids;
- char *uid;
- guint32 i;
-
- if (camel_file_util_decode_uint32 (diary->file, &i) == -1)
- return NULL;
- uids = g_ptr_array_new ();
- while (i--) {
- if (camel_file_util_decode_string (diary->file, &uid) == -1) {
- free_uids (uids);
- return NULL;
- }
- g_ptr_array_add (uids, uid);
- }
-
- return uids;
-}
-
-static CamelFolder *
-diary_decode_folder (CamelDiscoDiary *diary)
-{
- CamelFolder *folder;
- char *name;
-
- if (camel_file_util_decode_string (diary->file, &name) == -1)
- return NULL;
- folder = g_hash_table_lookup (diary->folders, name);
- if (!folder) {
- CamelException ex;
- char *msg;
-
- camel_exception_init (&ex);
- folder = camel_store_get_folder (CAMEL_STORE (diary->store),
- name, 0, &ex);
- if (folder)
- g_hash_table_insert (diary->folders, name, folder);
- else {
- msg = g_strdup_printf (_("Could not open `%s':\n%s\nChanges made to this folder will not be resynchronized."),
- name, camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- camel_session_alert_user (camel_service_get_session (CAMEL_SERVICE (diary->store)),
- CAMEL_SESSION_ALERT_WARNING,
- msg, FALSE);
- g_free (msg);
- g_free (name);
- }
- } else
- g_free (name);
- return folder;
-}
-
-static void
-close_folder (gpointer name, gpointer folder, gpointer data)
-{
- g_free (name);
- camel_folder_sync (folder, FALSE, NULL);
- camel_object_unref (folder);
-}
-
-void
-camel_disco_diary_replay (CamelDiscoDiary *diary, CamelException *ex)
-{
- guint32 action;
- off_t size;
- double pc;
-
- fseek (diary->file, 0, SEEK_END);
- size = ftell (diary->file);
- g_return_if_fail (size != 0);
- rewind (diary->file);
-
- camel_operation_start (NULL, _("Resynchronizing with server"));
- while (!camel_exception_is_set (ex)) {
- pc = ftell (diary->file) / size;
- camel_operation_progress (NULL, pc * 100);
-
- if (camel_file_util_decode_uint32 (diary->file, &action) == -1)
- break;
- if (action == CAMEL_DISCO_DIARY_END)
- break;
-
- switch (action) {
- case CAMEL_DISCO_DIARY_FOLDER_EXPUNGE:
- {
- CamelFolder *folder;
- GPtrArray *uids;
-
- folder = diary_decode_folder (diary);
- uids = diary_decode_uids (diary);
- if (!uids)
- goto lose;
-
- if (folder)
- camel_disco_folder_expunge_uids (folder, uids, ex);
- free_uids (uids);
- break;
- }
-
- case CAMEL_DISCO_DIARY_FOLDER_APPEND:
- {
- CamelFolder *folder;
- char *uid;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
-
- folder = diary_decode_folder (diary);
- if (camel_file_util_decode_string (diary->file, &uid) == -1)
- goto lose;
-
- if (!folder) {
- g_free (uid);
- continue;
- }
-
- message = camel_folder_get_message (folder, uid, NULL);
- if (!message) {
- /* The message was appended and then deleted. */
- g_free (uid);
- continue;
- }
- info = camel_folder_get_message_info (folder, uid);
-
- camel_folder_append_message (folder, message, info, ex);
- g_free (uid);
- camel_folder_free_message_info (folder, info);
-
- break;
- }
-
- case CAMEL_DISCO_DIARY_FOLDER_COPY:
- case CAMEL_DISCO_DIARY_FOLDER_MOVE:
- {
- CamelFolder *source, *destination;
- GPtrArray *uids;
-
- source = diary_decode_folder (diary);
- destination = diary_decode_folder (diary);
- uids = diary_decode_uids (diary);
- if (!uids)
- goto lose;
-
- if (!source || !destination) {
- free_uids (uids);
- continue;
- }
-
- if (action == CAMEL_DISCO_DIARY_FOLDER_COPY)
- camel_folder_copy_messages_to (source, uids, destination, ex);
- else
- camel_folder_move_messages_to (source, uids, destination, ex);
- free_uids (uids);
- break;
- }
-
- }
- }
-
- lose:
- camel_operation_end (NULL);
-
- /* Close folders */
- g_hash_table_foreach (diary->folders, close_folder, diary);
- g_hash_table_destroy (diary->folders);
- diary->folders = NULL;
-
- /* Truncate the log */
- ftruncate (fileno (diary->file), 0);
-}
-
-CamelDiscoDiary *
-camel_disco_diary_new (CamelDiscoStore *store, const char *filename, CamelException *ex)
-{
- CamelDiscoDiary *diary;
-
- g_return_val_if_fail (CAMEL_IS_DISCO_STORE (store), NULL);
- g_return_val_if_fail (filename != NULL, NULL);
-
- diary = CAMEL_DISCO_DIARY (camel_object_new (CAMEL_DISCO_DIARY_TYPE));
- diary->store = store;
-
- diary->file = fopen (filename, "a+");
- if (!diary->file) {
- camel_object_unref (CAMEL_OBJECT (diary));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not open journal file: %s",
- g_strerror (errno));
- return NULL;
- }
-
- return diary;
-}
-
-gboolean
-camel_disco_diary_empty (CamelDiscoDiary *diary)
-{
- return ftell (diary->file) == 0;
-}
-
-void
-camel_disco_diary_uidmap_add (CamelDiscoDiary *diary, const char *old_uid,
- const char *new_uid)
-{
- g_hash_table_insert (diary->uidmap, g_strdup (old_uid),
- g_strdup (new_uid));
-}
-
-const char *
-camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary, const char *uid)
-{
- return g_hash_table_lookup (diary->uidmap, uid);
-}
diff --git a/camel/camel-disco-diary.h b/camel/camel-disco-diary.h
deleted file mode 100644
index 8d2e8708e4..0000000000
--- a/camel/camel-disco-diary.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * camel-disco-diary.h: class for logging disconnected operation
- *
- * Authors: Dan Winship <danw@ximian.com>
- *
- * 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 CAMEL_DISCO_DIARY_H
-#define CAMEL_DISCO_DIARY_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-object.h"
-#include <stdarg.h>
-#include <stdio.h>
-
-#define CAMEL_DISCO_DIARY_TYPE (camel_disco_diary_get_type ())
-#define CAMEL_DISCO_DIARY(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiary))
-#define CAMEL_DISCO_DIARY_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiaryClass))
-#define CAMEL_IS_DISCO_DIARY(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_DIARY_TYPE))
-
-typedef enum {
- CAMEL_DISCO_DIARY_END = 0,
-
- CAMEL_DISCO_DIARY_FOLDER_EXPUNGE,
- CAMEL_DISCO_DIARY_FOLDER_APPEND,
- CAMEL_DISCO_DIARY_FOLDER_MOVE,
- CAMEL_DISCO_DIARY_FOLDER_COPY
-} CamelDiscoDiaryAction;
-
-typedef enum {
- CAMEL_DISCO_DIARY_ARG_NONE = 0,
-
- CAMEL_DISCO_DIARY_ARG_FOLDER,
- CAMEL_DISCO_DIARY_ARG_UID,
- CAMEL_DISCO_DIARY_ARG_UID_LIST
-} CamelDiscoDiaryArgType;
-
-struct _CamelDiscoDiary {
- CamelObject parent_object;
-
- CamelDiscoStore *store;
- FILE *file;
- GHashTable *folders, *uidmap;
-};
-
-typedef struct {
- CamelObjectClass parent_class;
-
-} CamelDiscoDiaryClass;
-
-
-/* public methods */
-CamelDiscoDiary *camel_disco_diary_new (CamelDiscoStore *store,
- const char *filename,
- CamelException *ex);
-
-gboolean camel_disco_diary_empty (CamelDiscoDiary *diary);
-
-void camel_disco_diary_log (CamelDiscoDiary *diary,
- CamelDiscoDiaryAction action,
- ...);
-void camel_disco_diary_replay (CamelDiscoDiary *diary,
- CamelException *ex);
-
-/* Temporary->Permanent UID map stuff */
-void camel_disco_diary_uidmap_add (CamelDiscoDiary *diary,
- const char *old_uid,
- const char *new_uid);
-const char *camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary,
- const char *uid);
-
-/* Standard Camel function */
-CamelType camel_disco_diary_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DISCO_DIARY_H */
diff --git a/camel/camel-disco-folder.c b/camel/camel-disco-folder.c
deleted file mode 100644
index f3581bce19..0000000000
--- a/camel/camel-disco-folder.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-folder.c: abstract class for a disconnectable folder */
-
-/*
- * Authors: Dan Winship <danw@ximian.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-disco-folder.h"
-#include "camel-disco-store.h"
-#include "camel-exception.h"
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
-#define CDF_CLASS(o) (CAMEL_DISCO_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
-
-static CamelFolderClass *parent_class = NULL;
-
-static void disco_refresh_info (CamelFolder *folder, CamelException *ex);
-static void disco_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static void disco_expunge (CamelFolder *folder, CamelException *ex);
-
-static void disco_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-static void disco_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-static void disco_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-
-static void disco_cache_message (CamelDiscoFolder *disco_folder,
- const char *uid, CamelException *ex);
-static void disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
- const char *expression,
- CamelException *ex);
-
-static void
-camel_disco_folder_class_init (CamelDiscoFolderClass *camel_disco_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_disco_folder_class);
-
- parent_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- /* virtual method definition */
- camel_disco_folder_class->cache_message = disco_cache_message;
- camel_disco_folder_class->prepare_for_offline = disco_prepare_for_offline;
-
- /* virtual method overload */
- camel_folder_class->refresh_info = disco_refresh_info;
- camel_folder_class->sync = disco_sync;
- camel_folder_class->expunge = disco_expunge;
-
- camel_folder_class->append_message = disco_append_message;
- camel_folder_class->copy_messages_to = disco_copy_messages_to;
- camel_folder_class->move_messages_to = disco_move_messages_to;
-}
-
-CamelType
-camel_disco_folder_get_type (void)
-{
- static CamelType camel_disco_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_disco_folder_type == CAMEL_INVALID_TYPE) {
- camel_disco_folder_type = camel_type_register (
- CAMEL_FOLDER_TYPE, "CamelDiscoFolder",
- sizeof (CamelDiscoFolder),
- sizeof (CamelDiscoFolderClass),
- (CamelObjectClassInitFunc) camel_disco_folder_class_init,
- NULL, NULL, NULL);
- }
-
- return camel_disco_folder_type;
-}
-
-
-static void
-disco_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- if (camel_disco_store_status (CAMEL_DISCO_STORE (folder->parent_store)) != CAMEL_DISCO_STORE_ONLINE)
- return;
- CDF_CLASS (folder)->refresh_info_online (folder, ex);
-}
-
-static void
-disco_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- if (expunge) {
- disco_expunge (folder, ex);
- if (camel_exception_is_set (ex))
- return;
- }
-
- switch (camel_disco_store_status (CAMEL_DISCO_STORE (folder->parent_store))) {
- case CAMEL_DISCO_STORE_ONLINE:
- CDF_CLASS (folder)->sync_online (folder, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (folder)->sync_offline (folder, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (folder)->sync_resyncing (folder, ex);
- break;
- }
-}
-
-static void
-disco_expunge_uids (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (folder->parent_store);
-
- if (uids->len == 0)
- return;
-
- switch (camel_disco_store_status (disco)) {
- case CAMEL_DISCO_STORE_ONLINE:
- CDF_CLASS (folder)->expunge_uids_online (folder, uids, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (folder)->expunge_uids_offline (folder, uids, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (folder)->expunge_uids_resyncing (folder, uids, ex);
- break;
- }
-}
-
-static void
-disco_expunge (CamelFolder *folder, CamelException *ex)
-{
- GPtrArray *uids;
- int i, count;
- CamelMessageInfo *info;
-
- uids = g_ptr_array_new ();
- count = camel_folder_summary_count (folder->summary);
- for (i = 0; i < count; i++) {
- info = camel_folder_summary_index (folder->summary, i);
- if (info->flags & CAMEL_MESSAGE_DELETED)
- g_ptr_array_add (uids, g_strdup (camel_message_info_uid (info)));
- camel_folder_summary_info_free (folder->summary, info);
- }
-
- disco_expunge_uids (folder, uids, ex);
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
-}
-
-static void
-disco_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (folder->parent_store);
-
- switch (camel_disco_store_status (disco)) {
- case CAMEL_DISCO_STORE_ONLINE:
- CDF_CLASS (folder)->append_online (folder, message, info, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (folder)->append_offline (folder, message, info, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (folder)->append_resyncing (folder, message, info, ex);
- break;
- }
-}
-
-static void
-disco_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (source->parent_store);
-
- switch (camel_disco_store_status (disco)) {
- case CAMEL_DISCO_STORE_ONLINE:
- CDF_CLASS (source)->copy_online (source, uids, destination, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (source)->copy_offline (source, uids, destination, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (source)->copy_resyncing (source, uids, destination, ex);
- break;
- }
-}
-
-static void
-disco_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (source->parent_store);
-
- switch (camel_disco_store_status (disco)) {
- case CAMEL_DISCO_STORE_ONLINE:
- CDF_CLASS (source)->move_online (source, uids, destination, ex);
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- CDF_CLASS (source)->move_offline (source, uids, destination, ex);
- break;
-
- case CAMEL_DISCO_STORE_RESYNCING:
- CDF_CLASS (source)->move_resyncing (source, uids, destination, ex);
- break;
- }
-}
-
-
-/**
- * camel_disco_folder_expunge_uids:
- * @folder: a (disconnectable) folder
- * @uids: array of UIDs to expunge
- * @ex: a CamelException
- *
- * This expunges the messages in @uids from @folder. It should take
- * whatever steps are needed to avoid expunging any other messages,
- * although in some cases it may not be possible to avoid expunging
- * messages that are marked deleted by another client at the same time
- * as the expunge_uids call is running.
- **/
-void
-camel_disco_folder_expunge_uids (CamelFolder *folder, GPtrArray *uids,
- CamelException *ex)
-{
- disco_expunge_uids (folder, uids, ex);
-}
-
-
-static void
-disco_cache_message (CamelDiscoFolder *disco_folder, const char *uid,
- CamelException *ex)
-{
- g_warning ("CamelDiscoFolder::cache_message not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (disco_folder)));
-}
-
-/**
- * camel_disco_folder_cache_message:
- * @disco_folder: the folder
- * @uid: the UID of the message to cache
- * @ex: a CamelException
- *
- * Requests that @disco_folder cache message @uid to disk.
- **/
-void
-camel_disco_folder_cache_message (CamelDiscoFolder *disco_folder,
- const char *uid, CamelException *ex)
-{
- CDF_CLASS (disco_folder)->cache_message (disco_folder, uid, ex);
-}
-
-
-static void
-disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
- const char *expression,
- CamelException *ex)
-{
- CamelFolder *folder = CAMEL_FOLDER (disco_folder);
- GPtrArray *uids;
- int i;
-
- if (expression)
- uids = camel_folder_search_by_expression (folder, expression, ex);
- else
- uids = camel_folder_get_uids (folder);
- if (!uids)
- return;
- for (i = 0; i < uids->len; i++) {
- camel_disco_folder_cache_message (disco_folder, uids->pdata[i], ex);
- if (camel_exception_is_set (ex))
- break;
- }
- if (expression)
- camel_folder_search_free (folder, uids);
- else
- camel_folder_free_uids (folder, uids);
-}
-
-/**
- * camel_disco_folder_prepare_for_offline:
- * @disco_folder: the folder
- * @expression: an expression describing messages to synchronize, or %NULL
- * if all messages should be sync'ed.
- * @ex: a CamelException
- *
- * This prepares @disco_folder for offline operation, by downloading
- * the bodies of all messages described by @expression (using the
- * same syntax as camel_folder_search_by_expression() ).
- **/
-void
-camel_disco_folder_prepare_for_offline (CamelDiscoFolder *disco_folder,
- const char *expression,
- CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_DISCO_FOLDER (disco_folder));
-
- CDF_CLASS (disco_folder)->prepare_for_offline (disco_folder, expression, ex);
-}
diff --git a/camel/camel-disco-folder.h b/camel/camel-disco-folder.h
deleted file mode 100644
index 7b0186ffc3..0000000000
--- a/camel/camel-disco-folder.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * camel-disco-folder.h: Abstract class for a disconnectable folder
- *
- * Authors: Dan Winship <danw@ximian.com>
- *
- * 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 CAMEL_DISCO_FOLDER_H
-#define CAMEL_DISCO_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-folder.h"
-
-#define CAMEL_DISCO_FOLDER_TYPE (camel_disco_folder_get_type ())
-#define CAMEL_DISCO_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolder))
-#define CAMEL_DISCO_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolderClass))
-#define CAMEL_IS_DISCO_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_FOLDER_TYPE))
-
-struct _CamelDiscoFolder {
- CamelFolder parent_object;
-
-};
-
-typedef struct {
- CamelFolderClass parent_class;
-
- void (*refresh_info_online) (CamelFolder *folder, CamelException *ex);
-
- void (*sync_online) (CamelFolder *folder, CamelException *ex);
- void (*sync_offline) (CamelFolder *folder, CamelException *ex);
- void (*sync_resyncing) (CamelFolder *folder, CamelException *ex);
-
- void (*expunge_uids_online) (CamelFolder *folder, GPtrArray *uids,
- CamelException *ex);
- void (*expunge_uids_offline) (CamelFolder *folder, GPtrArray *uids,
- CamelException *ex);
- void (*expunge_uids_resyncing) (CamelFolder *folder, GPtrArray *uids,
- CamelException *ex);
-
- void (*append_online) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- CamelException *ex);
- void (*append_offline) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- CamelException *ex);
- void (*append_resyncing) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- CamelException *ex);
-
- void (*copy_online) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
- void (*copy_offline) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
- void (*copy_resyncing) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-
- void (*move_online) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
- void (*move_offline) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
- void (*move_resyncing) (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-
- void (*cache_message) (CamelDiscoFolder *disco_folder,
- const char *uid, CamelException *ex);
- void (*prepare_for_offline) (CamelDiscoFolder *disco_folder,
- const char *expression,
- CamelException *ex);
-
- void (*update_uid) (CamelFolder *folder, const char *old_uid,
- const char *new_uid);
-} CamelDiscoFolderClass;
-
-
-/* public methods */
-void camel_disco_folder_expunge_uids (CamelFolder *folder, GPtrArray *uids,
- CamelException *ex);
-
-void camel_disco_folder_cache_message (CamelDiscoFolder *disco_folder,
- const char *uid,
- CamelException *ex);
-void camel_disco_folder_prepare_for_offline (CamelDiscoFolder *disco_folder,
- const char *expression,
- CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_disco_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DISCO_FOLDER_H */
diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
deleted file mode 100644
index 145636f58d..0000000000
--- a/camel/camel-disco-store.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-store.c: abstract class for a disconnectable remote store */
-
-/*
- * Authors: Dan Winship <danw@ximian.com>
- *
- * 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-disco-store.h"
-#include "camel-disco-diary.h"
-#include "camel-exception.h"
-#include "camel-session.h"
-
-#define CDS_CLASS(o) (CAMEL_DISCO_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
-
-static CamelRemoteStoreClass *remote_store_class = NULL;
-
-static void disco_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-static gboolean disco_connect (CamelService *service, CamelException *ex);
-static void disco_cancel_connect (CamelService *service);
-static gboolean disco_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static CamelFolder *disco_get_folder (CamelStore *store, const char *name,
- guint32 flags, CamelException *ex);
-static CamelFolderInfo *disco_get_folder_info (CamelStore *store,
- const char *top, guint32 flags,
- CamelException *ex);
-static void set_status (CamelDiscoStore *disco_store,
- CamelDiscoStoreStatus status,
- CamelException *ex);
-static gboolean can_work_offline (CamelDiscoStore *disco_store);
-
-static void
-camel_disco_store_class_init (CamelDiscoStoreClass *camel_disco_store_class)
-{
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_disco_store_class);
- CamelStoreClass *camel_store_class =
- CAMEL_STORE_CLASS (camel_disco_store_class);
-
- remote_store_class = CAMEL_REMOTE_STORE_CLASS (camel_type_get_global_classfuncs (camel_remote_store_get_type ()));
-
- /* virtual method definition */
- camel_disco_store_class->set_status = set_status;
- camel_disco_store_class->can_work_offline = can_work_offline;
-
- /* virtual method overload */
- camel_service_class->construct = disco_construct;
- camel_service_class->connect = disco_connect;
- camel_service_class->disconnect = disco_disconnect;
- camel_service_class->cancel_connect = disco_cancel_connect;
-
- camel_store_class->get_folder = disco_get_folder;
- camel_store_class->get_folder_info = disco_get_folder_info;
-}
-
-CamelType
-camel_disco_store_get_type (void)
-{
- static CamelType camel_disco_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_disco_store_type == CAMEL_INVALID_TYPE) {
- camel_disco_store_type = camel_type_register (
- CAMEL_REMOTE_STORE_TYPE, "CamelDiscoStore",
- sizeof (CamelDiscoStore),
- sizeof (CamelDiscoStoreClass),
- (CamelObjectClassInitFunc) camel_disco_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_disco_store_type;
-}
-
-static void
-disco_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (service);
-
- CAMEL_SERVICE_CLASS (remote_store_class)->construct (service, session, provider, url, ex);
- if (camel_exception_is_set (ex))
- return;
-
- disco->status = camel_session_is_online (session) ?
- CAMEL_DISCO_STORE_ONLINE : CAMEL_DISCO_STORE_OFFLINE;
-}
-
-static gboolean
-disco_connect (CamelService *service, CamelException *ex)
-{
- CamelDiscoStore *store = CAMEL_DISCO_STORE (service);
- CamelDiscoStoreStatus status;
-
- status = camel_disco_store_status (store);
- if (status != CAMEL_DISCO_STORE_OFFLINE) {
- if (!CAMEL_SERVICE_CLASS (remote_store_class)->connect (service, ex)) {
- status = camel_disco_store_status (store);
- if (status != CAMEL_DISCO_STORE_OFFLINE)
- return FALSE;
- camel_exception_clear (ex);
- }
- }
-
- switch (status) {
- case CAMEL_DISCO_STORE_ONLINE:
- case CAMEL_DISCO_STORE_RESYNCING:
- if (!CDS_CLASS (service)->connect_online (service, ex))
- return FALSE;
- if (camel_disco_diary_empty (store->diary))
- return TRUE;
-
- /* Need to resync */
- store->status = CAMEL_DISCO_STORE_RESYNCING;
- camel_disco_diary_replay (store->diary, ex);
- store->status = CAMEL_DISCO_STORE_ONLINE;
- if (camel_exception_is_set (ex))
- return FALSE;
-
- if (!camel_service_disconnect (service, TRUE, ex))
- return FALSE;
- return camel_service_connect (service, ex);
-
- case CAMEL_DISCO_STORE_OFFLINE:
- return CDS_CLASS (service)->connect_offline (service, ex);
- }
-
- g_assert_not_reached ();
- return FALSE;
-}
-
-static void
-disco_cancel_connect (CamelService *service)
-{
- CamelDiscoStore *store = CAMEL_DISCO_STORE (service);
-
- /* Fall back */
- store->status = CAMEL_DISCO_STORE_OFFLINE;
-
- CAMEL_SERVICE_CLASS (remote_store_class)->cancel_connect (service);
-}
-
-static gboolean
-disco_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelDiscoStore *store = CAMEL_DISCO_STORE (service);
-
- switch (camel_disco_store_status (store)) {
- case CAMEL_DISCO_STORE_ONLINE:
- case CAMEL_DISCO_STORE_RESYNCING:
- if (!CDS_CLASS (service)->disconnect_online (service, clean, ex))
- return FALSE;
- break;
-
- case CAMEL_DISCO_STORE_OFFLINE:
- if (!CDS_CLASS (service)->disconnect_offline (service, clean, ex))
- return FALSE;
- break;
-
- }
-
- return CAMEL_SERVICE_CLASS (remote_store_class)->disconnect (service, clean, ex);
-}
-
-static CamelFolder *
-disco_get_folder (CamelStore *store, const char *name,
- guint32 flags, CamelException *ex)
-{
- CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (store);
-
- switch (camel_disco_store_status (disco_store)) {
- case CAMEL_DISCO_STORE_ONLINE:
- return CDS_CLASS (store)->get_folder_online (store, name, flags, ex);
-
- case CAMEL_DISCO_STORE_OFFLINE:
- return CDS_CLASS (store)->get_folder_offline (store, name, flags, ex);
-
- case CAMEL_DISCO_STORE_RESYNCING:
- return CDS_CLASS (store)->get_folder_resyncing (store, name, flags, ex);
- }
-
- g_assert_not_reached ();
- return NULL;
-}
-
-static CamelFolderInfo *
-disco_get_folder_info (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
-{
- CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (store);
-
- /* Do this first so if we get forced offline, we'll switch to
- * the correct branch below. (FIXME: This only works because
- * we know that get_folder_info is the first call that the
- * mailer makes on a store.)
- */
- if (CAMEL_SERVICE (store)->status == CAMEL_SERVICE_DISCONNECTED) {
- if (!camel_service_connect (CAMEL_SERVICE (store), ex))
- return NULL;
- }
-
- switch (camel_disco_store_status (disco_store)) {
- case CAMEL_DISCO_STORE_ONLINE:
- return CDS_CLASS (store)->get_folder_info_online (store, top, flags, ex);
-
- case CAMEL_DISCO_STORE_OFFLINE:
- /* Can't edit subscriptions while offline */
- if ((store->flags & CAMEL_STORE_SUBSCRIPTIONS) &&
- !(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)) {
- camel_disco_store_check_online (disco_store, ex);
- return NULL;
- }
-
- return CDS_CLASS (store)->get_folder_info_offline (store, top, flags, ex);
-
- case CAMEL_DISCO_STORE_RESYNCING:
- return CDS_CLASS (store)->get_folder_info_resyncing (store, top, flags, ex);
- }
-
- g_assert_not_reached ();
- return NULL;
-}
-
-
-/**
- * camel_disco_store_status:
- * @store: a disconnectable store
- *
- * Return value: the current online/offline status of @store.
- **/
-CamelDiscoStoreStatus
-camel_disco_store_status (CamelDiscoStore *store)
-{
- g_return_val_if_fail (CAMEL_IS_DISCO_STORE (store), CAMEL_DISCO_STORE_ONLINE);
-
- return store->status;
-}
-
-
-static void
-set_status (CamelDiscoStore *disco_store, CamelDiscoStoreStatus status,
- CamelException *ex)
-{
- if (disco_store->status == status)
- return;
-
- camel_store_sync (CAMEL_STORE (disco_store), ex);
- if (camel_exception_is_set (ex))
- return;
- if (!camel_service_disconnect (CAMEL_SERVICE (disco_store), TRUE, ex))
- return;
-
- disco_store->status = status;
- camel_service_connect (CAMEL_SERVICE (disco_store), ex);
-}
-
-/**
- * camel_disco_store_set_status:
- * @store: a disconnectable store
- * @status: the new status
- * @ex: a CamelException
- *
- * Sets @store to @status. If an error occurrs and the status cannot
- * be set to @status, @ex will be set.
- **/
-void
-camel_disco_store_set_status (CamelDiscoStore *store,
- CamelDiscoStoreStatus status,
- CamelException *ex)
-{
- CDS_CLASS (store)->set_status (store, status, ex);
-}
-
-
-static gboolean
-can_work_offline (CamelDiscoStore *disco_store)
-{
- g_warning ("CamelDiscoStore::can_work_offline not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (disco_store)));
- return FALSE;
-}
-
-/**
- * camel_disco_store_can_work_offline:
- * @store: a disconnectable store
- *
- * Return value: whether or not @store can be used offline. (Will be
- * %FALSE if the store is not caching data to local disk, for example.)
- **/
-gboolean
-camel_disco_store_can_work_offline (CamelDiscoStore *store)
-{
- return CDS_CLASS (store)->can_work_offline (store);
-}
-
-
-/**
- * camel_disco_store_check_online:
- * @store: a disconnectable store
- * @ex: a CamelException
- *
- * This checks that @store is online, and sets @ex if it is not. This
- * can be used as a simple way to set a generic error message in @ex
- * for operations that won't work offline.
- *
- * Return value: whether or not @store is online.
- **/
-gboolean
-camel_disco_store_check_online (CamelDiscoStore *store, CamelException *ex)
-{
- if (camel_disco_store_status (store) != CAMEL_DISCO_STORE_ONLINE) {
- 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/camel-disco-store.h b/camel/camel-disco-store.h
deleted file mode 100644
index 73ba677c34..0000000000
--- a/camel/camel-disco-store.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-store.h: abstruct class for a disconnectable store */
-
-/*
- * Authors: Dan Winship <danw@ximian.com>
- *
- * 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
- */
-
-
-#ifndef CAMEL_DISCO_STORE_H
-#define CAMEL_DISCO_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-remote-store.h"
-
-#define CAMEL_DISCO_STORE_TYPE (camel_disco_store_get_type ())
-#define CAMEL_DISCO_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_STORE_TYPE, CamelDiscoStore))
-#define CAMEL_DISCO_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_STORE_TYPE, CamelDiscoStoreClass))
-#define CAMEL_IS_DISCO_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_STORE_TYPE))
-
-typedef enum {
- CAMEL_DISCO_STORE_ONLINE,
- CAMEL_DISCO_STORE_OFFLINE,
- CAMEL_DISCO_STORE_RESYNCING
-} CamelDiscoStoreStatus;
-
-struct _CamelDiscoStore {
- CamelRemoteStore parent_object;
-
- CamelDiscoStoreStatus status;
- CamelDiscoDiary *diary;
-};
-
-
-typedef struct {
- CamelRemoteStoreClass parent_class;
-
- void (*set_status) (CamelDiscoStore *,
- CamelDiscoStoreStatus,
- CamelException *);
- gboolean (*can_work_offline) (CamelDiscoStore *);
-
-
- gboolean (*connect_online) (CamelService *,
- CamelException *);
- gboolean (*connect_offline) (CamelService *,
- CamelException *);
-
- gboolean (*disconnect_online) (CamelService *, gboolean,
- CamelException *);
- gboolean (*disconnect_offline) (CamelService *, gboolean,
- CamelException *);
-
- CamelFolder * (*get_folder_online) (CamelStore *store,
- const char *name,
- guint32 flags,
- CamelException *ex);
- CamelFolder * (*get_folder_offline) (CamelStore *store,
- const char *name,
- guint32 flags,
- CamelException *ex);
- CamelFolder * (*get_folder_resyncing) (CamelStore *store,
- const char *name,
- guint32 flags,
- CamelException *ex);
-
- CamelFolderInfo * (*get_folder_info_online) (CamelStore *store,
- const char *top,
- guint32 flags,
- CamelException *ex);
- CamelFolderInfo * (*get_folder_info_offline) (CamelStore *store,
- const char *top,
- guint32 flags,
- CamelException *ex);
- CamelFolderInfo * (*get_folder_info_resyncing) (CamelStore *store,
- const char *top,
- guint32 flags,
- CamelException *ex);
-
-} CamelDiscoStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_disco_store_get_type (void);
-
-/* Public methods */
-CamelDiscoStoreStatus camel_disco_store_status (CamelDiscoStore *);
-void camel_disco_store_set_status (CamelDiscoStore *,
- CamelDiscoStoreStatus,
- CamelException *);
-gboolean camel_disco_store_can_work_offline (CamelDiscoStore *);
-
-
-/* Convenience functions */
-gboolean camel_disco_store_check_online (CamelDiscoStore *store, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DISCO_STORE_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 3ae8d74f77..0000000000
--- a/camel/camel-exception.c
+++ /dev/null
@@ -1,296 +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 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 <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)
-{
- if (ex_src == NULL) {
- g_warning ("camel_exception_xfer: trying to transfer NULL exception to %p\n", ex_dst);
- return;
- }
-
- if (ex_dst == NULL) {
- /* must have same side-effects */
- camel_exception_clear (ex_src);
- return;
- }
-
- 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 {
- g_warning ("camel_exception_get_id called with NULL parameter.");
- 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;
- else
- g_warning ("camel_exception_get_description called with NULL parameter.");
-
- return ret;
-}
diff --git a/camel/camel-exception.h b/camel/camel-exception.h
deleted file mode 100644
index 5ee23444da..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 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_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-file-utils.c b/camel/camel-file-utils.c
deleted file mode 100644
index 1411873cc4..0000000000
--- a/camel/camel-file-utils.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright (C) 2000, 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
- */
-
-
-#include "camel-file-utils.h"
-
-#include <netinet/in.h>
-
-/**
- * camel_file_util_encode_uint32:
- * @out: file to output to
- * @value: value to output
- *
- * Utility function to save an uint32 to a file.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_uint32 (FILE *out, guint32 value)
-{
- int i;
-
- 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_file_util_decode_uint32:
- * @in: file to read from
- * @dest: pointer to a variable to store the value in
- *
- * Retrieve an encoded uint32 from a file.
- *
- * Return value: 0 on success, -1 on error. @*dest will contain the
- * decoded value.
- **/
-int
-camel_file_util_decode_uint32 (FILE *in, guint32 *dest)
-{
- guint32 value = 0;
- int 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);
-
- return 0;
-}
-
-/**
- * camel_file_util_encode_fixed_int32:
- * @out: file to output to
- * @value: value to output
- *
- * Encode a gint32, performing no compression, but converting
- * to network order.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_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_file_util_decode_fixed_int32:
- * @in: file to read from
- * @dest: pointer to a variable to store the value in
- *
- * Retrieve a gint32.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_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_file_util_encode_time_t:
- * @out: file to output to
- * @value: value to output
- *
- * Encode a time_t value to the file.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_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_file_util_decode_time_t:
- * @in: file to read from
- * @dest: pointer to a variable to store the value in
- *
- * Decode a time_t value.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_decode_time_t (FILE *in, time_t *dest)
-{
- time_t save = 0;
- int v, i = sizeof (time_t) - 1;
-
- while (i >= 0 && (v = fgetc (in)) != EOF) {
- save |= ((time_t)v) << (i * 8);
- i--;
- }
- *dest = save;
- if (v == EOF)
- return -1;
- return 0;
-}
-
-/**
- * camel_file_util_encode_off_t:
- * @out: file to output to
- * @value: value to output
- *
- * Encode an off_t type.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_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_file_util_decode_off_t:
- * @in: file to read from
- * @dest: pointer to a variable to put the value in
- *
- * Decode an off_t type.
- *
- * Return value: 0 on success, -1 on failure.
- **/
-int
-camel_file_util_decode_off_t (FILE *in, off_t *dest)
-{
- off_t save = 0;
- int v, i = sizeof(off_t) - 1;
-
- while (i >= 0 && (v = fgetc (in)) != EOF) {
- save |= ((off_t)v) << (i * 8);
- i--;
- }
- *dest = save;
- if (v == EOF)
- return -1;
- return 0;
-}
-
-/**
- * camel_file_util_encode_string:
- * @out: file to output to
- * @str: value to output
- *
- * Encode a normal string and save it in the output file.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_string (FILE *out, const char *str)
-{
- register int len;
-
- if (str == NULL)
- return camel_file_util_encode_uint32 (out, 0);
-
- len = strlen (str);
- if (camel_file_util_encode_uint32 (out, len+1) == -1)
- return -1;
- if (len == 0 || fwrite (str, len, 1, out) == 1)
- return 0;
- return -1;
-}
-
-/**
- * camel_file_util_decode_string:
- * @in: file to read from
- * @str: pointer to a variable to store the value in
- *
- * Decode a normal string from the input file.
- *
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_decode_string (FILE *in, char **str)
-{
- guint32 len;
- register char *ret;
-
- if (camel_file_util_decode_uint32 (in, &len) == -1) {
- *str = NULL;
- return -1;
- }
-
- len--;
- if (len > 65536) {
- *str = NULL;
- return -1;
- }
-
- ret = g_malloc (len+1);
- if (len > 0 && fread (ret, len, 1, in) != 1) {
- g_free (ret);
- *str = NULL;
- return -1;
- }
-
- ret[len] = 0;
- *str = ret;
- return 0;
-}
-
-
diff --git a/camel/camel-file-utils.h b/camel/camel-file-utils.h
deleted file mode 100644
index 4138b8b7df..0000000000
--- a/camel/camel-file-utils.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright (C) 2000, 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 CAMEL_FILE_UTILS_H
-#define CAMEL_FILE_UTILS_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <time.h>
-
-int camel_file_util_encode_fixed_int32 (FILE *out, gint32);
-int camel_file_util_decode_fixed_int32 (FILE *in, gint32 *);
-int camel_file_util_encode_uint32 (FILE *out, guint32);
-int camel_file_util_decode_uint32 (FILE *in, guint32 *);
-int camel_file_util_encode_time_t (FILE *out, time_t);
-int camel_file_util_decode_time_t (FILE *in, time_t *);
-int camel_file_util_encode_off_t (FILE *out, off_t);
-int camel_file_util_decode_off_t (FILE *in, off_t *);
-int camel_file_util_encode_string (FILE *out, const char *);
-int camel_file_util_decode_string (FILE *in, char **);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FILE_UTILS_H */
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
deleted file mode 100644
index d90798eb76..0000000000
--- a/camel/camel-filter-driver.c
+++ /dev/null
@@ -1,974 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@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 <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)
-
-/* an invalid pointer */
-#define FOLDER_INVALID ((void *)~0)
-
-/* 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:
- *
- * Return value: A new CamelFilterDriver object
- **/
-CamelFilterDriver *
-camel_filter_driver_new (void)
-{
- return CAMEL_FILTER_DRIVER (camel_object_new(camel_filter_driver_get_type ()));
-}
-
-void
-camel_filter_driver_set_folder_func (CamelFilterDriver *d, CamelFilterGetFolderFunc get_folder, void *data)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- p->get_folder = get_folder;
- p->data = data;
-}
-
-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;
- CamelFolder *outbox;
-
- outbox = open_folder (driver, folder);
- if (!outbox)
- break;
-
- 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);
-
- if (!camel_exception_is_set (p->ex))
- p->copied = TRUE;
-
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to folder %s",
- folder);
- }
- }
-
- 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;
- CamelFolder *outbox;
-
- outbox = open_folder (driver, folder);
- if (!outbox)
- break;
-
- if (outbox == p->source)
- break;
-
- 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);
-
- if (!camel_exception_is_set (p->ex)) {
- /* a 'move' is a copy & delete */
- p->copied = TRUE;
- p->deleted = TRUE;
- }
-
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s",
- folder);
- }
- }
-
- 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) {
- if (p->source && p->uid)
- camel_folder_set_message_user_tag(p->source, p->uid, "colour", argv[0]->value.string);
- else
- 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);
- if (p->source && p->uid)
- camel_folder_set_message_user_tag(p->source, p->uid, "score", value);
- else
- 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) {
- if (p->source && p->uid)
- camel_folder_set_message_flags(p->source, p->uid, camel_system_flag(argv[0]->value.string), ~0);
- else
- 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;
- CamelException ex;
-
- /* we have a lookup table of currently open folders */
- camelfolder = g_hash_table_lookup (p->folders, folder_url);
- if (camelfolder)
- return camelfolder == FOLDER_INVALID?NULL:camelfolder;
-
- camel_exception_init (&ex);
- camelfolder = p->get_folder (driver, folder_url, p->data, &ex);
- camel_exception_clear (&ex);
-
- if (camelfolder) {
- g_hash_table_insert (p->folders, g_strdup (folder_url), camelfolder);
- camel_folder_freeze (camelfolder);
- } else {
- g_hash_table_insert (p->folders, g_strdup (folder_url), FOLDER_INVALID);
- }
-
- 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);
-
- if (folder != FOLDER_INVALID) {
- 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, const char *original_source_url, 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;
- off_t last = 0;
-
- 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) {
- CamelMessageInfo *info;
- 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 on message %d"), i);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
- camel_object_unref (CAMEL_OBJECT (msg));
- goto fail;
- }
-
- info = camel_message_info_new_from_header(((CamelMimePart *)msg)->headers);
- info->size = camel_mime_parser_tell(mp) - last;
- last = camel_mime_parser_tell(mp);
- status = camel_filter_driver_filter_message (driver, msg, info, NULL, NULL, source_url,
- original_source_url ? original_source_url : 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 on message %d"), i);
- camel_message_info_free (info);
- goto fail;
- }
-
- i++;
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
-
- camel_message_info_free (info);
- }
-
- 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"));
-
- g_free (source_url);
- 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
- * @cache: UID cache (needed for POP folders)
- * @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, CamelUIDCache *cache,
- 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;
- const char *folder_name;
- int status = 0;
- int need_sep = 0;
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder)));
- folder_name = camel_folder_get_full_name (folder);
-
- /* Add a separator unless the first char of folder_name or the last char of service_url is '/' */
- need_sep = (folder_name && *folder_name != '/');
- if (service_url && *service_url && !need_sep) {
- need_sep = (service_url[strlen (service_url)-1] != '/');
- }
- source_url = g_strdup_printf ("%s%s%s",
- service_url,
- need_sep ? "/" : "",
- folder_name);
- 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, 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, ~0);
-
- if (cache)
- camel_uid_cache_save_uid (cache, uids->pdata[i]);
-
- 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, camel_exception_is_set (ex) ? NULL : 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
- * @original_source_url: url of original source folder (pre-movemail) 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,
- const char *original_source_url,
- CamelException *ex)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- struct _filter_rule *node;
- gboolean freeinfo = FALSE;
- gboolean filtered = FALSE;
- ESExpResult *r;
- int result;
-
- 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 (original_source_url && camel_mime_message_get_source (message) == NULL)
- camel_mime_message_set_source (message, original_source_url);
-
- node = (struct _filter_rule *)p->rules.head;
- result = CAMEL_SEARCH_NOMATCH;
- while (node->next && !p->terminated) {
- d(fprintf (stderr, "applying rule %s\naction %s\n", node->match, node->action));
-
- result = camel_filter_search_match (p->message, p->info,
- original_source_url ? original_source_url : source_url,
- node->match, p->ex);
-
- switch (result) {
- case CAMEL_SEARCH_ERROR:
- goto error;
- case CAMEL_SEARCH_MATCHED:
- 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);
- default:
- break;
- }
-
- node = node->next;
- }
-
- /* *Now* we can set the DELETED flag... */
- if (p->deleted) {
- if (p->source && p->uid)
- camel_folder_set_message_flags(p->source, p->uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
- else
- info->flags |= CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FOLDER_FLAGGED;
- }
-
- /* 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);
- }
- }
-
- if (freeinfo)
- camel_message_info_free (info);
-
- 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 ff7028a890..0000000000
--- a/camel/camel-filter-driver.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@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_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>
-#include <camel/camel-uid-cache.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 _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 (void);
-
-/* modifiers */
-void camel_filter_driver_set_folder_func (CamelFilterDriver *d, CamelFilterGetFolderFunc fetcher, void *data);
-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,
- const char *original_source_url, CamelException *ex);
-
-int camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox,
- const char *original_source_url, CamelException *ex);
-
-int camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folder, CamelUIDCache *cache,
- 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 49ece8704a..0000000000
--- a/camel/camel-filter-search.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2000 Ximian, Inc. (www.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
-
-/* (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 "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"
-
-#include "camel-url.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);
-static ESExpResult *get_size (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 },
- { "get-size", (ESExpFunc *) get_size, 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;
- camel_search_t type = CAMEL_SEARCH_TYPE_ENCODED;
- CamelContentType *ct;
- const char *charset = NULL;
-
- if (strcasecmp(name, "x-camel-mlist") == 0) {
- header = camel_message_info_mlist(fms->info);
- type = CAMEL_SEARCH_TYPE_ASIS;
- } else {
- header = camel_medium_get_header(CAMEL_MEDIUM(fms->message), argv[0]->value.string);
- if (strcasecmp("to", name) == 0 || strcasecmp("cc", name) == 0 || strcasecmp("from", name) == 0)
- type = CAMEL_SEARCH_TYPE_ADDRESS_ENCODED;
- else {
- ct = camel_mime_part_get_content_type(CAMEL_MIME_PART(fms->message));
- if (ct)
- charset = camel_charset_to_iconv(header_content_type_param(ct, "charset"));
- }
- }
-
- if (header) {
- for (i=1; i<argc && !matched; i++) {
- if (argv[i]->type == ESEXP_RES_STRING)
- matched = camel_search_header_match(header, argv[i]->value.string,
- how, type, charset);
- }
- }
- }
-
- 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;
- char *src = NULL;
- char *tmp;
-
- r = e_sexp_result_new (f, ESEXP_RES_STRING);
- if (fms->source) {
- CamelURL *url;
-
- url = camel_url_new (fms->source, NULL);
- if (url) {
- src = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (url);
- }
- } else {
- src = g_strdup (camel_mime_message_get_source (fms->message));
- }
-
- /* This is an abusive hack */
- if ( src && (tmp = strstr (src, "://")) ) {
- tmp += 3;
- tmp = strchr (tmp, '/');
- if (tmp)
- *tmp = '\0';
- }
-
- r->value.string = src;
-
- return r;
-}
-
-/* remember, the size comparisons are done at Kbytes */
-static ESExpResult *
-get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = fms->info->size / 1024;
-
- return r;
-}
-
-
-/**
- * camel_filter_search_match:
- * @message:
- * @info:
- * @source:
- * @expression:
- * @ex:
- *
- * Returns one of CAMEL_SEARCH_MATCHED, CAMEL_SEARCH_NOMATCH, or CAMEL_SEARCH_ERROR.
- **/
-int
-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 ? CAMEL_SEARCH_MATCHED : CAMEL_SEARCH_NOMATCH;
- else
- retval = CAMEL_SEARCH_NOMATCH;
-
- e_sexp_result_free (sexp, result);
- e_sexp_unref (sexp);
-
- return retval;
-
-error:
- e_sexp_unref (sexp);
- return CAMEL_SEARCH_ERROR;
-}
diff --git a/camel/camel-filter-search.h b/camel/camel-filter-search.h
deleted file mode 100644
index eb1ad2e47d..0000000000
--- a/camel/camel-filter-search.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2000 Ximian, Inc. (www.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_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>
-
-enum {
- CAMEL_SEARCH_ERROR = -1,
- CAMEL_SEARCH_NOMATCH = 0,
- CAMEL_SEARCH_MATCHED = 1,
-};
-
-int 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 cca04d3248..0000000000
--- a/camel/camel-folder-search.c
+++ /dev/null
@@ -1,983 +0,0 @@
-/*
- * Copyright (C) 2000,2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-/* 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_not(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-
-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->not = search_not;
-
- 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 },
- /* we need to override this one though to implement an 'array not' */
- { "not", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, not), 0 },
- { "<", 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 parses, 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 {
- d(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;
-}
-
-/* impelemnt an 'array not', i.e. everything in the summary, not in the supplied array */
-static ESExpResult *
-search_not(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- ESExpResult *r;
- int i;
-
- if (argc>0) {
- if (argv[0]->type == ESEXP_RES_ARRAY_PTR) {
- GPtrArray *v = argv[0]->value.ptrarray;
- const char *uid;
-
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
-
- /* not against a single message?*/
- if (search->match1 || search->current) {
- int found = FALSE;
-
- if (search->match1)
- uid = camel_message_info_uid(search->match1);
- else
- uid = camel_message_info_uid(search->current);
-
- for (i=0;!found && i<v->len;i++) {
- if (strcmp(uid, v->pdata[i]) == 0)
- found = TRUE;
- }
-
- if (!found)
- g_ptr_array_add(r->value.ptrarray, (char *)uid);
- } else if (search->summary == NULL) {
- g_warning("No summary set, 'not' against an array requires a summary");
- } else {
- /* 'not' against the whole summary */
- GHashTable *have = g_hash_table_new(g_str_hash, g_str_equal);
- char **s;
- CamelMessageInfo **m;
-
- s = (char **)v->pdata;
- for (i=0;i<v->len;i++)
- g_hash_table_insert(have, s[i], s[i]);
-
- v = search->summary;
- m = (CamelMessageInfo **)v->pdata;
- for (i=0;i<v->len;i++) {
- char *uid = (char *)camel_message_info_uid(m[i]);
-
- if (g_hash_table_lookup(have, uid) == NULL)
- g_ptr_array_add(r->value.ptrarray, uid);
- }
- g_hash_table_destroy(have);
- }
- } else {
- int res = TRUE;
-
- if (argv[0]->type == ESEXP_RES_BOOL)
- res = ! argv[0]->value.bool;
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = res;
- }
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = TRUE;
- }
-
- 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;
- camel_search_t type = CAMEL_SEARCH_TYPE_ASIS;
-
- /* 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);
- type = CAMEL_SEARCH_TYPE_ADDRESS;
- } else if (!strcasecmp(headername, "to")) {
- header = camel_message_info_to(search->current);
- type = CAMEL_SEARCH_TYPE_ADDRESS;
- } else if (!strcasecmp(headername, "cc")) {
- header = camel_message_info_cc(search->current);
- type = CAMEL_SEARCH_TYPE_ADDRESS;
- } 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)
- truth = camel_search_header_match(header, argv[i]->value.string,
- how, type, NULL);
- }
- }
- }
- /* 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 3455de13d8..0000000000
--- a/camel/camel-folder-search.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_FOLDER_SEARCH_H
-#define _CAMEL_FOLDER_SEARCH_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 _ESExpResult **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 45c2fadae4..0000000000
--- a/camel/camel-folder-summary.c
+++ /dev/null
@@ -1,2669 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <unistd.h>
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "camel-folder-summary.h"
-
-#include <camel/camel-file-utils.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-multipart.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;
-
-#if defined (DOESTRV) || defined (DOEPOOLV)
- 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_file_util_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_file_util_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;
-}
-
-/**
- * camel_folder_summary_header_load:
- * @s: Summary object.
- *
- * Only load the header information from the summary,
- * keep the rest on disk. This should only be done on
- * a fresh summary object.
- *
- * Return value: -1 on error.
- **/
-int camel_folder_summary_header_load(CamelFolderSummary *s)
-{
- FILE *in;
- int ret;
-
- g_assert(s->summary_path);
-
- in = fopen(s->summary_path, "r");
- if (in == NULL)
- return -1;
-
- CAMEL_SUMMARY_LOCK(s, io_lock);
- ret = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_load(s, in);
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
-
- fclose(in);
- s->flags &= ~CAMEL_SUMMARY_DIRTY;
- return ret;
-}
-
-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);
-
-/* unnecessary for pooled vectors */
-#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 none will be assigned.
-
- * If indexing is enabled, and the parser cannot determine a new uid, then
- * 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 */
- if (p->index)
- 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));
- ibex_index_buffer(p->index, (char *)camel_message_info_uid(info), "ibexindexed", strlen("ibexindexed"), NULL);
- }
-
- /* 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));
- ibex_index_buffer(p->index, (char *)camel_message_info_uid(info), "ibexindexed", strlen("ibexindexed"), NULL);
- }
-
- info->content = summary_build_content_info_message(s, info, (CamelMimePart *)msg);
-
- 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);
- }
-}
-
-/* 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_file_util_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_file_util_encode_uint32(out, token+1);
- } else {
- if (camel_file_util_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_file_util_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;
-}
-
-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_file_util_decode_fixed_int32(in, &version) == -1
- || camel_file_util_decode_fixed_int32(in, &flags) == -1
- || camel_file_util_decode_fixed_int32(in, &nextuid) == -1
- || camel_file_util_decode_time_t(in, &time) == -1
- || camel_file_util_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_file_util_encode_fixed_int32(out, s->version);
- camel_file_util_encode_fixed_int32(out, s->flags);
- camel_file_util_encode_fixed_int32(out, s->nextuid);
- camel_file_util_encode_time_t(out, s->time);
- return camel_file_util_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;
-}
-
-static char *
-summary_format_address(struct _header_raw *h, const char *name)
-{
- struct _header_address *addr;
- const char *text;
- char *ret;
-
- text = header_raw_find (&h, name, NULL);
- addr = header_address_decode (text);
- if (addr) {
- ret = header_address_list_format (addr);
- header_address_list_clear (&addr);
- } else {
- ret = g_strdup (text);
- }
-
- return ret;
-}
-
-static char *
-summary_format_string (struct _header_raw *h, const char *name, const char *charset)
-{
- const char *text;
-
- text = header_raw_find (&h, name, NULL);
- if (text) {
- while (isspace ((unsigned) *text))
- text++;
- return header_decode_string (text, charset);
- } 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 DOEPOOLV
- mi->strings = e_poolv_new (s->message_info_strings);
-#endif
-#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;
- char *subject, *from, *to, *cc, *mlist;
- struct _header_content_type *ct = NULL;
- const char *content, *charset = NULL;
-
- mi = camel_folder_summary_info_new(s);
-
- if ((content = header_raw_find(&h, "Content-Type", NULL))
- && (ct = header_content_type_decode(content))
- && (charset = header_content_type_param(ct, "charset"))
- && (strcasecmp(charset, "us-ascii") == 0))
- charset = NULL;
-
- charset = camel_charset_to_iconv(charset);
-
- subject = summary_format_string(h, "subject", charset);
- from = summary_format_address(h, "from");
- to = summary_format_address(h, "to");
- cc = summary_format_address(h, "cc");
- mlist = header_raw_check_mailing_list(&h);
-
- if (ct)
- header_content_type_unref(ct);
-
-#ifdef DOEPOOLV
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_FROM, from, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_TO, to, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_CC, cc, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist, TRUE);
-#elif defined (DOESTRV)
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, from);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, to);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, cc);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist);
-#else
- mi->subject = subject;
- mi->from = from;
- mi->to = to;
- mi->cc = cc;
- mi->mlist = mlist;
-#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;
- char *subject, *from, *to, *cc, *mlist, *uid;;
-
- mi = camel_folder_summary_info_new(s);
-
- io(printf("Loading message info\n"));
-
- camel_file_util_decode_string(in, &uid);
- camel_file_util_decode_uint32(in, &mi->flags);
- camel_file_util_decode_uint32(in, &mi->size);
- camel_file_util_decode_time_t(in, &mi->date_sent);
- camel_file_util_decode_time_t(in, &mi->date_received);
- camel_file_util_decode_string(in, &subject);
- camel_file_util_decode_string(in, &from);
- camel_file_util_decode_string(in, &to);
- camel_file_util_decode_string(in, &cc);
- camel_file_util_decode_string(in, &mlist);
-
-#ifdef DOEPOOLV
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_UID, uid, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_FROM, from, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_TO, to, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_CC, cc, TRUE);
- e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist, TRUE);
-#elif defined (DOESTRV)
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_UID, uid);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, from);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, to);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, cc);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist);
-#else
- mi->uid = uid;
- mi->subject = subject;
- mi->from = from;
- mi->to = to;
- mi->cc = cc;
- mi->mlist = mlist;
-#endif
-
- mi->content = NULL;
-
- camel_file_util_decode_fixed_int32(in, &mi->message_id.id.part.hi);
- camel_file_util_decode_fixed_int32(in, &mi->message_id.id.part.lo);
-
- if (camel_file_util_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_file_util_decode_fixed_int32(in, &mi->references->references[i].id.part.hi);
- camel_file_util_decode_fixed_int32(in, &mi->references->references[i].id.part.lo);
- }
- }
-
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
- goto error;
-
- for (i=0;i<count;i++) {
- char *name;
- camel_file_util_decode_string(in, &name);
- camel_flag_set(&mi->user_flags, name, TRUE);
- g_free(name);
- }
-
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
- goto error;
-
- for (i=0;i<count;i++) {
- char *name, *value;
- camel_file_util_decode_string(in, &name);
- camel_file_util_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_file_util_encode_string(out, camel_message_info_uid(mi));
- camel_file_util_encode_uint32(out, mi->flags);
- camel_file_util_encode_uint32(out, mi->size);
- camel_file_util_encode_time_t(out, mi->date_sent);
- camel_file_util_encode_time_t(out, mi->date_received);
- camel_file_util_encode_string(out, camel_message_info_subject(mi));
- camel_file_util_encode_string(out, camel_message_info_from(mi));
- camel_file_util_encode_string(out, camel_message_info_to(mi));
- camel_file_util_encode_string(out, camel_message_info_cc(mi));
- camel_file_util_encode_string(out, camel_message_info_mlist(mi));
-
- camel_file_util_encode_fixed_int32(out, mi->message_id.id.part.hi);
- camel_file_util_encode_fixed_int32(out, mi->message_id.id.part.lo);
-
- if (mi->references) {
- camel_file_util_encode_uint32(out, mi->references->size);
- for (i=0;i<mi->references->size;i++) {
- camel_file_util_encode_fixed_int32(out, mi->references->references[i].id.part.hi);
- camel_file_util_encode_fixed_int32(out, mi->references->references[i].id.part.lo);
- }
- } else {
- camel_file_util_encode_uint32(out, 0);
- }
-
- count = camel_flag_list_size(&mi->user_flags);
- camel_file_util_encode_uint32(out, count);
- flag = mi->user_flags;
- while (flag) {
- camel_file_util_encode_string(out, flag->name);
- flag = flag->next;
- }
-
- count = camel_tag_list_size(&mi->user_tags);
- camel_file_util_encode_uint32(out, count);
- tag = mi->user_tags;
- while (tag) {
- camel_file_util_encode_string(out, tag->name);
- camel_file_util_encode_string(out, tag->value);
- tag = tag->next;
- }
-
- return ferror(out);
-}
-
-static void
-message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-#ifdef DOEPOOLV
- e_poolv_destroy(mi->strings);
-#elif defined (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;
- const char *charset;
-
- ci = camel_folder_summary_content_info_new (s);
-
- charset = camel_charset_locale_name ();
- ci->id = header_msgid_decode (header_raw_find (&h, "content-id", NULL));
- ci->description = header_decode_string (header_raw_find (&h, "content-description", NULL), 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_file_util_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_file_util_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_file_util_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_file_util_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_file_util_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);
- }
- }
-
- /* we do charset conversions before this filter, which isn't strictly correct,
- but works in most cases */
- 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);
- }
-
- /* 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 DOEPOOLV
- info->strings = e_poolv_new(CAMEL_MESSAGE_INFO_LAST);
-#endif
-#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;
- struct _header_content_type *ct = NULL;
- const char *content, *charset = NULL;
-
- if ((content = header_raw_find(&header, "Content-Type", NULL))
- && (ct = header_content_type_decode(content))
- && (charset = header_content_type_param(ct, "charset"))
- && (strcasecmp(charset, "us-ascii") == 0))
- charset = NULL;
-
- charset = camel_charset_to_iconv(charset);
-
- subject = summary_format_string(header, "subject", charset);
- from = summary_format_address(header, "from");
- to = summary_format_address(header, "to");
- cc = summary_format_address(header, "cc");
- mlist = header_raw_check_mailing_list(&header);
-
- if (ct)
- header_content_type_unref(ct);
-
- 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 DOEPOOLV
- to->strings = e_poolv_cpy (to->strings, from->strings);
-#elif defined (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 DOEPOOLV
- e_poolv_destroy(mi->strings);
-#elif defined (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);
-}
-
-#if defined (DOEPOOLV) || defined (DOESTRV)
-const char *
-camel_message_info_string (const CamelMessageInfo *mi, int type)
-{
- g_assert (mi != NULL);
-
- if (mi->strings == NULL)
- return "";
-#ifdef DOEPOOLV
- return e_poolv_get (mi->strings, type);
-#else
- return e_strv_get (mi->strings, type);
-#endif
-}
-
-void
-camel_message_info_set_string (CamelMessageInfo *mi, int type, char *str)
-{
- g_assert (mi != NULL);
- g_assert (mi->strings != NULL);
-#ifdef DOEPOOLV
- e_poolv_set (mi->strings, type, str, TRUE);
-#else
- mi->strings = e_strv_set_ref_free (mi->strings, type, str);
-#endif
-}
-#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 fddba046b2..0000000000
--- a/camel/camel-folder-summary.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 */
-#define DOEPOOLV
-
-#if defined (DOEPOOLV) || defined (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 DOEPOOLV
- struct _EPoolv *strings;
-#elif defined (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 /* DOEPOOLV */
- 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;
-
-#if defined (DOEPOOLV) || defined (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 *);
-
-/* only load the header */
-int camel_folder_summary_header_load(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);
-
-/* 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 */
-#if defined (DOEPOOLV) || defined (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 2d61938f08..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 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-/* 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 && c->order) {
- /* 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 if (!c) {
- 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 && c->order) {
- /* 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 if (!c) {
- 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 692991751b..0000000000
--- a/camel/camel-folder-thread.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 ead3e969be..0000000000
--- a/camel/camel-folder.c
+++ /dev/null
@@ -1,1920 +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 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 <string.h>
-#include "camel-folder.h"
-#include "camel-exception.h"
-#include "camel-store.h"
-#include "camel-mime-message.h"
-#include "string-utils.h"
-#include "e-util/e-memory.h"
-#include "camel-operation.h"
-
-#include "camel-session.h"
-#include "camel-filter-driver.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 is_frozen (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;
- camel_folder_class->is_frozen = is_frozen;
-
- /* 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 = e_mutex_new(E_MUTEX_REC);
- folder->priv->change_lock = e_mutex_new(E_MUTEX_SIMPLE);
-#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
- e_mutex_destroy(camel_folder->priv->lock);
- e_mutex_destroy(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;
- if (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) {
- if (!(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)
-{
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID,
- _("Unsupported operation: append message: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-
- 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)
-{
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID,
- _("Unsupported operation: search by expression: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-
- 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);
-
- if (source == dest || uids->len == 0) {
- /* source and destination folders are the same, or no work to do, do nothing. */
- return;
- }
-
- 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;
-
- camel_operation_start(NULL, _("Moving messages"));
-
- for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++) {
- move_message_to (source, uids->pdata[i], dest, ex);
- camel_operation_progress(NULL, i * 100 / uids->len);
- }
-
- camel_operation_end(NULL);
-}
-
-/**
- * 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 || uids->len == 0) {
- /* source and destination folders are the same, or no work to do, 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 '%s') = %d\n", folder, folder->full_name, 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)
-{
- CamelFolderChangeInfo *info = NULL;
-
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- folder->priv->frozen--;
-
- d(printf ("thaw(%p '%s') = %d\n", folder, folder->full_name, folder->priv->frozen));
-
- if (folder->priv->frozen == 0
- && camel_folder_change_info_changed(folder->priv->changed_frozen)) {
- info = folder->priv->changed_frozen;
- folder->priv->changed_frozen = camel_folder_change_info_new();
- }
-
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
-
- if (info) {
- camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", info);
- camel_folder_change_info_free(info);
- }
-}
-
-/**
- * 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);
-}
-
-static gboolean
-is_frozen (CamelFolder *folder)
-{
- return folder->priv->frozen != 0;
-}
-
-/**
- * camel_folder_is_frozen:
- * @folder: a folder
- *
- * Return value: whether or not the folder is frozen.
- **/
-gboolean
-camel_folder_is_frozen (CamelFolder *folder)
-{
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
- return CF_CLASS (folder)->is_frozen (folder);
-}
-
-#ifdef ENABLE_THREADS
-struct _folder_filter_msg {
- CamelSessionThreadMsg msg;
-
- GPtrArray *recents;
- CamelFolder *folder;
- CamelFilterDriver *driver;
- CamelException ex;
-};
-
-static void
-filter_filter(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- struct _folder_filter_msg *m = (struct _folder_filter_msg *)msg;
-
- camel_filter_driver_filter_folder(m->driver, m->folder, NULL, m->recents, FALSE, &m->ex);
-}
-
-static void
-filter_free(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- struct _folder_filter_msg *m = (struct _folder_filter_msg *)msg;
- int i;
-
- camel_folder_thaw(m->folder);
- camel_object_unref((CamelObject *)m->folder);
- camel_object_unref((CamelObject *)m->driver);
- for (i=0;i<m->recents->len;i++)
- g_free(m->recents->pdata[i]);
- g_ptr_array_free(m->recents, TRUE);
-}
-
-static CamelSessionThreadOps filter_ops = {
- filter_filter,
- filter_free,
-};
-#endif
-
-/* 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));
- d(printf(" added %d remoded %d changed %d recent %d\n",
- changed->uid_added->len, changed->uid_removed->len,
- changed->uid_changed->len, changed->uid_recent->len));
-
- if (changed != NULL) {
- CamelSession *session = ((CamelService *)folder->parent_store)->session;
- CamelFilterDriver *driver;
-
- CAMEL_FOLDER_LOCK(folder, change_lock);
- if (folder->filter_recent
- && changed->uid_recent->len>0
- && (driver = camel_session_get_filter_driver(session, "incoming", NULL))) {
-#ifdef ENABLE_THREADS
- GPtrArray *recents = g_ptr_array_new();
- int i;
- struct _folder_filter_msg *msg;
-
- d(printf("** Have '%d' recent messages, launching thread to process them\n", changed->uid_recent->len));
-
- folder->priv->frozen++;
- msg = camel_session_thread_msg_new(session, &filter_ops, sizeof(*msg));
- for (i=0;i<changed->uid_recent->len;i++)
- g_ptr_array_add(recents, g_strdup(changed->uid_recent->pdata[i]));
- msg->recents = recents;
- msg->folder = folder;
- camel_object_ref((CamelObject *)folder);
- msg->driver = driver;
- camel_exception_init(&msg->ex);
- camel_session_thread_queue(session, &msg->msg, 0);
-#else
- d(printf("Have '%d' recent messages, filtering\n", changed->recent->len));
- folder->priv->frozen++;
- camel_filter_driver_filter_folder(driver, folder, NULL, changed->recent, FALSE, NULL);
- camel_object_unref((CamelObject *)driver);
- folder->priv->frozen--;
-#endif
- /* zero out the recent list so we dont reprocess */
- /* this pokes past abstraction, but changeinfo is our structure anyway */
- /* the only other alternative is to recognise when trigger is called from
- thaw(), but thats a pita */
- g_ptr_array_set_size(changed->uid_recent, 0);
- }
- if (folder->priv->frozen) {
- camel_folder_change_info_cat(folder->priv->changed_frozen, changed);
- ret = FALSE;
- }
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
- } else {
- g_warning("Class %s is passing NULL to folder_changed event",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
- }
-
- 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->uid_recent = 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;
-
- g_assert(info != NULL);
-
- 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)
-{
- struct _CamelFolderChangeInfoPrivate *p;
- int i;
-
- g_assert(info != NULL);
- g_assert(list != NULL);
-
- 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)
-{
- struct _CamelFolderChangeInfoPrivate *p;
- char *key;
- int value;
-
- g_assert(info != NULL);
-
- 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;
-
- g_assert(info != NULL);
- g_assert(list != NULL);
-
- 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;
-
- g_assert(info != NULL);
-
- 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)
-{
- g_assert(info != NULL);
- g_assert(source != NULL);
-
- 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);
- change_info_cat(info, source->uid_recent, camel_folder_change_info_recent_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;
- GPtrArray *olduids;
- char *olduid;
-
- g_assert(info != NULL);
-
- p = info->priv;
-
- 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;
- GPtrArray *olduids;
- char *olduid;
-
- g_assert(info != NULL);
-
- p = info->priv;
-
- 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;
- GPtrArray *olduids;
- char *olduid;
-
- g_assert(info != NULL);
-
- p = info->priv;
-
- 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);
-}
-
-void
-camel_folder_change_info_recent_uid(CamelFolderChangeInfo *info, const char *uid)
-{
- struct _CamelFolderChangeInfoPrivate *p;
- GPtrArray *olduids;
- char *olduid;
-
- g_assert(info != NULL);
-
- p = info->priv;
-
- /* always add to recent, but dont let anyone else know */
- if (!g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
- olduid = e_mempool_strdup(p->uid_pool, uid);
- }
- g_ptr_array_add(info->uid_recent, olduid);
-}
-
-/**
- * camel_folder_change_info_changed:
- * @info:
- *
- * Return true if the changeset contains any changes.
- *
- * Return Value:
- **/
-gboolean
-camel_folder_change_info_changed(CamelFolderChangeInfo *info)
-{
- g_assert(info != NULL);
-
- return (info->uid_added->len || info->uid_removed->len || info->uid_changed->len || info->uid_recent->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;
-
- g_assert(info != NULL);
-
- 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);
- g_ptr_array_set_size(info->uid_recent, 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;
-
- g_assert(info != NULL);
-
- 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_ptr_array_free(info->uid_recent, TRUE);
- g_free(info);
-}
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
deleted file mode 100644
index 0ff542afb9..0000000000
--- a/camel/camel-folder.h
+++ /dev/null
@@ -1,313 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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;
- GPtrArray *uid_recent;
-
- 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;
- gboolean filter_recent: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);
- gboolean (*is_frozen) (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);
-gboolean camel_folder_is_frozen (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);
-void camel_folder_change_info_recent_uid (CamelFolderChangeInfo *info, const char *uid);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FOLDER_H */
-
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
deleted file mode 100644
index 9169f97318..0000000000
--- a/camel/camel-html-parser.c
+++ /dev/null
@@ -1,807 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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.
- */
-
-/** WARNING
- **
- ** DO NOT USE THIS CODE OUTSIDE OF CAMEL
- **
- ** IT IS SUBJECT TO CHANGE OR MAY VANISH AT ANY TIME
- **/
-
-#include "camel-html-parser.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include <gal/unicode/gunicode.h>
-#include <ctype.h>
-
-/* if defined, must also compile in dump_tag() below somewhere */
-#define d(x)
-
-static void camel_html_parser_class_init (CamelHTMLParserClass *klass);
-static void camel_html_parser_init (CamelObject *o);
-static void camel_html_parser_finalize (CamelObject *o);
-
-static CamelObjectClass *camel_html_parser_parent;
-
-/* Parser definitions, see below object code for details */
-
-typedef struct _CamelHTMLParserPrivate CamelHTMLParserPrivate;
-
-struct _CamelHTMLParserPrivate {
- char *inbuf,
- *inptr,
- *inend,
- *start;
- enum _camel_html_parser_t state;
- char *charset;
- int eof;
- GString *tag;
- GString *ent;
- char ent_utf8[8];
- int attr;
- GPtrArray *attrs;
- GPtrArray *values;
- int quote;
-};
-
-static void tokenise_setup(void);
-static CamelHTMLParserPrivate *tokenise_init(void);
-static void tokenise_free(CamelHTMLParserPrivate *p);
-static int tokenise_step(CamelHTMLParserPrivate *p, char **datap, int *lenp);
-
-/* ********************************************************************** */
-
-CamelType
-camel_html_parser_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (), "CamelHTMLParser",
- sizeof (CamelHTMLParser),
- sizeof (CamelHTMLParserClass),
- (CamelObjectClassInitFunc) camel_html_parser_class_init,
- NULL,
- (CamelObjectInitFunc) camel_html_parser_init,
- (CamelObjectFinalizeFunc) camel_html_parser_finalize);
- }
-
- return type;
-}
-
-static void
-camel_html_parser_finalize(CamelObject *o)
-{
- CamelHTMLParser *f = (CamelHTMLParser *)o;
-
- tokenise_free(f->priv);
-}
-
-static void
-camel_html_parser_init (CamelObject *o)
-{
- CamelHTMLParser *f = (CamelHTMLParser *)o;
-
- f->priv = tokenise_init();
-}
-
-static void
-camel_html_parser_class_init (CamelHTMLParserClass *klass)
-{
- camel_html_parser_parent = CAMEL_OBJECT_CLASS (camel_type_get_global_classfuncs (camel_object_get_type ()));
-
- tokenise_setup();
-}
-
-/**
- * camel_html_parser_new:
- *
- * Create a new CamelHTMLParser object.
- *
- * Return value: A new CamelHTMLParser widget.
- **/
-CamelHTMLParser *
-camel_html_parser_new (void)
-{
- CamelHTMLParser *new = CAMEL_HTML_PARSER ( camel_object_new (camel_html_parser_get_type ()));
- return new;
-}
-
-
-void camel_html_parser_set_data(CamelHTMLParser *hp, const char *start, int len, int last)
-{
- CamelHTMLParserPrivate *p = hp->priv;
-
- p->inptr = p->inbuf = (char *)start;
- p->inend = (char *)start+len;
- p->eof = last;
-}
-
-camel_html_parser_t camel_html_parser_step(CamelHTMLParser *hp, const char **datap, int *lenp)
-{
- return tokenise_step(hp->priv, (char **)datap, lenp);
-}
-
-const char *camel_html_parser_left(CamelHTMLParser *hp, int *lenp)
-{
- CamelHTMLParserPrivate *p = hp->priv;
-
- if (lenp)
- *lenp = p->inend - p->inptr;
-
- return p->inptr;
-}
-
-const char *camel_html_parser_tag(CamelHTMLParser *hp)
-{
- return hp->priv->tag->str;
-}
-
-const char *camel_html_parser_attr(CamelHTMLParser *hp, const char *name)
-{
- int i;
- CamelHTMLParserPrivate *p = hp->priv;
-
- for (i=0;i<p->attrs->len;i++) {
- if (!strcasecmp(((GString *)p->attrs->pdata[i])->str, name)) {
- return ((GString *)p->values->pdata[i])->str;
- }
- }
-
- return NULL;
-}
-
-const GPtrArray *camel_html_parser_attr_list(CamelHTMLParser *hp, const GPtrArray **values)
-{
- if (values)
- *values = hp->priv->values;
-
- return hp->priv->attrs;
-}
-
-/* this map taken out of libxml */
-static struct {
- unsigned int val;
- const char *name;
-} entity_map[] = {
-/*
- * the 4 absolute ones,
- */
- { 34, "quot", /* quotation mark = APL quote, U+0022 ISOnum */ },
- { 38, "amp", /* ampersand, U+0026 ISOnum */ },
- { 60, "lt", /* less-than sign, U+003C ISOnum */ },
- { 62, "gt", /* greater-than sign, U+003E ISOnum */ },
-
-/*
- * A bunch still in the 128-255 range
- * Replacing them depend really on the charset used.
- */
- { 39, "apos", /* single quote */ },
- { 160, "nbsp", /* no-break space = non-breaking space, U+00A0 ISOnum */ },
- { 161, "iexcl",/* inverted exclamation mark, U+00A1 ISOnum */ },
- { 162, "cent", /* cent sign, U+00A2 ISOnum */ },
- { 163, "pound",/* pound sign, U+00A3 ISOnum */ },
- { 164, "curren",/* currency sign, U+00A4 ISOnum */ },
- { 165, "yen", /* yen sign = yuan sign, U+00A5 ISOnum */ },
- { 166, "brvbar",/* broken bar = broken vertical bar, U+00A6 ISOnum */ },
- { 167, "sect", /* section sign, U+00A7 ISOnum */ },
- { 168, "uml", /* diaeresis = spacing diaeresis, U+00A8 ISOdia */ },
- { 169, "copy", /* copyright sign, U+00A9 ISOnum */ },
- { 170, "ordf", /* feminine ordinal indicator, U+00AA ISOnum */ },
- { 171, "laquo",/* left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum */ },
- { 172, "not", /* not sign, U+00AC ISOnum */ },
- { 173, "shy", /* soft hyphen = discretionary hyphen, U+00AD ISOnum */ },
- { 174, "reg", /* registered sign = registered trade mark sign, U+00AE ISOnum */ },
- { 175, "macr", /* macron = spacing macron = overline = APL overbar, U+00AF ISOdia */ },
- { 176, "deg", /* degree sign, U+00B0 ISOnum */ },
- { 177, "plusmn",/* plus-minus sign = plus-or-minus sign, U+00B1 ISOnum */ },
- { 178, "sup2", /* superscript two = superscript digit two = squared, U+00B2 ISOnum */ },
- { 179, "sup3", /* superscript three = superscript digit three = cubed, U+00B3 ISOnum */ },
- { 180, "acute",/* acute accent = spacing acute, U+00B4 ISOdia */ },
- { 181, "micro",/* micro sign, U+00B5 ISOnum */ },
- { 182, "para", /* pilcrow sign = paragraph sign, U+00B6 ISOnum */ },
- { 183, "middot",/* middle dot = Georgian comma Greek middle dot, U+00B7 ISOnum */ },
- { 184, "cedil",/* cedilla = spacing cedilla, U+00B8 ISOdia */ },
- { 185, "sup1", /* superscript one = superscript digit one, U+00B9 ISOnum */ },
- { 186, "ordm", /* masculine ordinal indicator, U+00BA ISOnum */ },
- { 187, "raquo",/* right-pointing double angle quotation mark right pointing guillemet, U+00BB ISOnum */ },
- { 188, "frac14",/* vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum */ },
- { 189, "frac12",/* vulgar fraction one half = fraction one half, U+00BD ISOnum */ },
- { 190, "frac34",/* vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum */ },
- { 191, "iquest",/* inverted question mark = turned question mark, U+00BF ISOnum */ },
- { 192, "Agrave",/* latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1 */ },
- { 193, "Aacute",/* latin capital letter A with acute, U+00C1 ISOlat1 */ },
- { 194, "Acirc",/* latin capital letter A with circumflex, U+00C2 ISOlat1 */ },
- { 195, "Atilde",/* latin capital letter A with tilde, U+00C3 ISOlat1 */ },
- { 196, "Auml", /* latin capital letter A with diaeresis, U+00C4 ISOlat1 */ },
- { 197, "Aring",/* latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1 */ },
- { 198, "AElig",/* latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 */ },
- { 199, "Ccedil",/* latin capital letter C with cedilla, U+00C7 ISOlat1 */ },
- { 200, "Egrave",/* latin capital letter E with grave, U+00C8 ISOlat1 */ },
- { 201, "Eacute",/* latin capital letter E with acute, U+00C9 ISOlat1 */ },
- { 202, "Ecirc",/* latin capital letter E with circumflex, U+00CA ISOlat1 */ },
- { 203, "Euml", /* latin capital letter E with diaeresis, U+00CB ISOlat1 */ },
- { 204, "Igrave",/* latin capital letter I with grave, U+00CC ISOlat1 */ },
- { 205, "Iacute",/* latin capital letter I with acute, U+00CD ISOlat1 */ },
- { 206, "Icirc",/* latin capital letter I with circumflex, U+00CE ISOlat1 */ },
- { 207, "Iuml", /* latin capital letter I with diaeresis, U+00CF ISOlat1 */ },
- { 208, "ETH", /* latin capital letter ETH, U+00D0 ISOlat1 */ },
- { 209, "Ntilde",/* latin capital letter N with tilde, U+00D1 ISOlat1 */ },
- { 210, "Ograve",/* latin capital letter O with grave, U+00D2 ISOlat1 */ },
- { 211, "Oacute",/* latin capital letter O with acute, U+00D3 ISOlat1 */ },
- { 212, "Ocirc",/* latin capital letter O with circumflex, U+00D4 ISOlat1 */ },
- { 213, "Otilde",/* latin capital letter O with tilde, U+00D5 ISOlat1 */ },
- { 214, "Ouml", /* latin capital letter O with diaeresis, U+00D6 ISOlat1 */ },
- { 215, "times",/* multiplication sign, U+00D7 ISOnum */ },
- { 216, "Oslash",/* latin capital letter O with stroke latin capital letter O slash, U+00D8 ISOlat1 */ },
- { 217, "Ugrave",/* latin capital letter U with grave, U+00D9 ISOlat1 */ },
- { 218, "Uacute",/* latin capital letter U with acute, U+00DA ISOlat1 */ },
- { 219, "Ucirc",/* latin capital letter U with circumflex, U+00DB ISOlat1 */ },
- { 220, "Uuml", /* latin capital letter U with diaeresis, U+00DC ISOlat1 */ },
- { 221, "Yacute",/* latin capital letter Y with acute, U+00DD ISOlat1 */ },
- { 222, "THORN",/* latin capital letter THORN, U+00DE ISOlat1 */ },
- { 223, "szlig",/* latin small letter sharp s = ess-zed, U+00DF ISOlat1 */ },
- { 224, "agrave",/* latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1 */ },
- { 225, "aacute",/* latin small letter a with acute, U+00E1 ISOlat1 */ },
- { 226, "acirc",/* latin small letter a with circumflex, U+00E2 ISOlat1 */ },
- { 227, "atilde",/* latin small letter a with tilde, U+00E3 ISOlat1 */ },
- { 228, "auml", /* latin small letter a with diaeresis, U+00E4 ISOlat1 */ },
- { 229, "aring",/* latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1 */ },
- { 230, "aelig",/* latin small letter ae = latin small ligature ae, U+00E6 ISOlat1 */ },
- { 231, "ccedil",/* latin small letter c with cedilla, U+00E7 ISOlat1 */ },
- { 232, "egrave",/* latin small letter e with grave, U+00E8 ISOlat1 */ },
- { 233, "eacute",/* latin small letter e with acute, U+00E9 ISOlat1 */ },
- { 234, "ecirc",/* latin small letter e with circumflex, U+00EA ISOlat1 */ },
- { 235, "euml", /* latin small letter e with diaeresis, U+00EB ISOlat1 */ },
- { 236, "igrave",/* latin small letter i with grave, U+00EC ISOlat1 */ },
- { 237, "iacute",/* latin small letter i with acute, U+00ED ISOlat1 */ },
- { 238, "icirc",/* latin small letter i with circumflex, U+00EE ISOlat1 */ },
- { 239, "iuml", /* latin small letter i with diaeresis, U+00EF ISOlat1 */ },
- { 240, "eth", /* latin small letter eth, U+00F0 ISOlat1 */ },
- { 241, "ntilde",/* latin small letter n with tilde, U+00F1 ISOlat1 */ },
- { 242, "ograve",/* latin small letter o with grave, U+00F2 ISOlat1 */ },
- { 243, "oacute",/* latin small letter o with acute, U+00F3 ISOlat1 */ },
- { 244, "ocirc",/* latin small letter o with circumflex, U+00F4 ISOlat1 */ },
- { 245, "otilde",/* latin small letter o with tilde, U+00F5 ISOlat1 */ },
- { 246, "ouml", /* latin small letter o with diaeresis, U+00F6 ISOlat1 */ },
- { 247, "divide",/* division sign, U+00F7 ISOnum */ },
- { 248, "oslash",/* latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1 */ },
- { 249, "ugrave",/* latin small letter u with grave, U+00F9 ISOlat1 */ },
- { 250, "uacute",/* latin small letter u with acute, U+00FA ISOlat1 */ },
- { 251, "ucirc",/* latin small letter u with circumflex, U+00FB ISOlat1 */ },
- { 252, "uuml", /* latin small letter u with diaeresis, U+00FC ISOlat1 */ },
- { 253, "yacute",/* latin small letter y with acute, U+00FD ISOlat1 */ },
- { 254, "thorn",/* latin small letter thorn with, U+00FE ISOlat1 */ },
- { 255, "yuml", /* latin small letter y with diaeresis, U+00FF ISOlat1 */ },
-
-/*
- * Anything below should really be kept as entities references
- */
- { 402, "fnof", /* latin small f with hook = function = florin, U+0192 ISOtech */ },
-
- { 913, "Alpha",/* greek capital letter alpha, U+0391 */ },
- { 914, "Beta", /* greek capital letter beta, U+0392 */ },
- { 915, "Gamma",/* greek capital letter gamma, U+0393 ISOgrk3 */ },
- { 916, "Delta",/* greek capital letter delta, U+0394 ISOgrk3 */ },
- { 917, "Epsilon",/* greek capital letter epsilon, U+0395 */ },
- { 918, "Zeta", /* greek capital letter zeta, U+0396 */ },
- { 919, "Eta", /* greek capital letter eta, U+0397 */ },
- { 920, "Theta",/* greek capital letter theta, U+0398 ISOgrk3 */ },
- { 921, "Iota", /* greek capital letter iota, U+0399 */ },
- { 922, "Kappa",/* greek capital letter kappa, U+039A */ },
- { 923, "Lambda"/* greek capital letter lambda, U+039B ISOgrk3 */ },
- { 924, "Mu", /* greek capital letter mu, U+039C */ },
- { 925, "Nu", /* greek capital letter nu, U+039D */ },
- { 926, "Xi", /* greek capital letter xi, U+039E ISOgrk3 */ },
- { 927, "Omicron",/* greek capital letter omicron, U+039F */ },
- { 928, "Pi", /* greek capital letter pi, U+03A0 ISOgrk3 */ },
- { 929, "Rho", /* greek capital letter rho, U+03A1 */ },
- { 931, "Sigma",/* greek capital letter sigma, U+03A3 ISOgrk3 */ },
- { 932, "Tau", /* greek capital letter tau, U+03A4 */ },
- { 933, "Upsilon",/* greek capital letter upsilon, U+03A5 ISOgrk3 */ },
- { 934, "Phi", /* greek capital letter phi, U+03A6 ISOgrk3 */ },
- { 935, "Chi", /* greek capital letter chi, U+03A7 */ },
- { 936, "Psi", /* greek capital letter psi, U+03A8 ISOgrk3 */ },
- { 937, "Omega",/* greek capital letter omega, U+03A9 ISOgrk3 */ },
-
- { 945, "alpha",/* greek small letter alpha, U+03B1 ISOgrk3 */ },
- { 946, "beta", /* greek small letter beta, U+03B2 ISOgrk3 */ },
- { 947, "gamma",/* greek small letter gamma, U+03B3 ISOgrk3 */ },
- { 948, "delta",/* greek small letter delta, U+03B4 ISOgrk3 */ },
- { 949, "epsilon",/* greek small letter epsilon, U+03B5 ISOgrk3 */ },
- { 950, "zeta", /* greek small letter zeta, U+03B6 ISOgrk3 */ },
- { 951, "eta", /* greek small letter eta, U+03B7 ISOgrk3 */ },
- { 952, "theta",/* greek small letter theta, U+03B8 ISOgrk3 */ },
- { 953, "iota", /* greek small letter iota, U+03B9 ISOgrk3 */ },
- { 954, "kappa",/* greek small letter kappa, U+03BA ISOgrk3 */ },
- { 955, "lambda",/* greek small letter lambda, U+03BB ISOgrk3 */ },
- { 956, "mu", /* greek small letter mu, U+03BC ISOgrk3 */ },
- { 957, "nu", /* greek small letter nu, U+03BD ISOgrk3 */ },
- { 958, "xi", /* greek small letter xi, U+03BE ISOgrk3 */ },
- { 959, "omicron",/* greek small letter omicron, U+03BF NEW */ },
- { 960, "pi", /* greek small letter pi, U+03C0 ISOgrk3 */ },
- { 961, "rho", /* greek small letter rho, U+03C1 ISOgrk3 */ },
- { 962, "sigmaf",/* greek small letter final sigma, U+03C2 ISOgrk3 */ },
- { 963, "sigma",/* greek small letter sigma, U+03C3 ISOgrk3 */ },
- { 964, "tau", /* greek small letter tau, U+03C4 ISOgrk3 */ },
- { 965, "upsilon",/* greek small letter upsilon, U+03C5 ISOgrk3 */ },
- { 966, "phi", /* greek small letter phi, U+03C6 ISOgrk3 */ },
- { 967, "chi", /* greek small letter chi, U+03C7 ISOgrk3 */ },
- { 968, "psi", /* greek small letter psi, U+03C8 ISOgrk3 */ },
- { 969, "omega",/* greek small letter omega, U+03C9 ISOgrk3 */ },
- { 977, "thetasym",/* greek small letter theta symbol, U+03D1 NEW */ },
- { 978, "upsih",/* greek upsilon with hook symbol, U+03D2 NEW */ },
- { 982, "piv", /* greek pi symbol, U+03D6 ISOgrk3 */ },
-
- { 8226, "bull", /* bullet = black small circle, U+2022 ISOpub */ },
- { 8230, "hellip",/* horizontal ellipsis = three dot leader, U+2026 ISOpub */ },
- { 8242, "prime",/* prime = minutes = feet, U+2032 ISOtech */ },
- { 8243, "Prime",/* double prime = seconds = inches, U+2033 ISOtech */ },
- { 8254, "oline",/* overline = spacing overscore, U+203E NEW */ },
- { 8260, "frasl",/* fraction slash, U+2044 NEW */ },
-
- { 8472, "weierp",/* script capital P = power set = Weierstrass p, U+2118 ISOamso */ },
- { 8465, "image",/* blackletter capital I = imaginary part, U+2111 ISOamso */ },
- { 8476, "real", /* blackletter capital R = real part symbol, U+211C ISOamso */ },
- { 8482, "trade",/* trade mark sign, U+2122 ISOnum */ },
- { 8501, "alefsym",/* alef symbol = first transfinite cardinal, U+2135 NEW */ },
- { 8592, "larr", /* leftwards arrow, U+2190 ISOnum */ },
- { 8593, "uarr", /* upwards arrow, U+2191 ISOnum */ },
- { 8594, "rarr", /* rightwards arrow, U+2192 ISOnum */ },
- { 8595, "darr", /* downwards arrow, U+2193 ISOnum */ },
- { 8596, "harr", /* left right arrow, U+2194 ISOamsa */ },
- { 8629, "crarr",/* downwards arrow with corner leftwards = carriage return, U+21B5 NEW */ },
- { 8656, "lArr", /* leftwards double arrow, U+21D0 ISOtech */ },
- { 8657, "uArr", /* upwards double arrow, U+21D1 ISOamsa */ },
- { 8658, "rArr", /* rightwards double arrow, U+21D2 ISOtech */ },
- { 8659, "dArr", /* downwards double arrow, U+21D3 ISOamsa */ },
- { 8660, "hArr", /* left right double arrow, U+21D4 ISOamsa */ },
-
-
- { 8704, "forall",/* for all, U+2200 ISOtech */ },
- { 8706, "part", /* partial differential, U+2202 ISOtech */ },
- { 8707, "exist",/* there exists, U+2203 ISOtech */ },
- { 8709, "empty",/* empty set = null set = diameter, U+2205 ISOamso */ },
- { 8711, "nabla",/* nabla = backward difference, U+2207 ISOtech */ },
- { 8712, "isin", /* element of, U+2208 ISOtech */ },
- { 8713, "notin",/* not an element of, U+2209 ISOtech */ },
- { 8715, "ni", /* contains as member, U+220B ISOtech */ },
- { 8719, "prod", /* n-ary product = product sign, U+220F ISOamsb */ },
- { 8721, "sum", /* n-ary sumation, U+2211 ISOamsb */ },
- { 8722, "minus",/* minus sign, U+2212 ISOtech */ },
- { 8727, "lowast",/* asterisk operator, U+2217 ISOtech */ },
- { 8730, "radic",/* square root = radical sign, U+221A ISOtech */ },
- { 8733, "prop", /* proportional to, U+221D ISOtech */ },
- { 8734, "infin",/* infinity, U+221E ISOtech */ },
- { 8736, "ang", /* angle, U+2220 ISOamso */ },
- { 8743, "and", /* logical and = wedge, U+2227 ISOtech */ },
- { 8744, "or", /* logical or = vee, U+2228 ISOtech */ },
- { 8745, "cap", /* intersection = cap, U+2229 ISOtech */ },
- { 8746, "cup", /* union = cup, U+222A ISOtech */ },
- { 8747, "int", /* integral, U+222B ISOtech */ },
- { 8756, "there4",/* therefore, U+2234 ISOtech */ },
- { 8764, "sim", /* tilde operator = varies with = similar to, U+223C ISOtech */ },
- { 8773, "cong", /* approximately equal to, U+2245 ISOtech */ },
- { 8776, "asymp",/* almost equal to = asymptotic to, U+2248 ISOamsr */ },
- { 8800, "ne", /* not equal to, U+2260 ISOtech */ },
- { 8801, "equiv",/* identical to, U+2261 ISOtech */ },
- { 8804, "le", /* less-than or equal to, U+2264 ISOtech */ },
- { 8805, "ge", /* greater-than or equal to, U+2265 ISOtech */ },
- { 8834, "sub", /* subset of, U+2282 ISOtech */ },
- { 8835, "sup", /* superset of, U+2283 ISOtech */ },
- { 8836, "nsub", /* not a subset of, U+2284 ISOamsn */ },
- { 8838, "sube", /* subset of or equal to, U+2286 ISOtech */ },
- { 8839, "supe", /* superset of or equal to, U+2287 ISOtech */ },
- { 8853, "oplus",/* circled plus = direct sum, U+2295 ISOamsb */ },
- { 8855, "otimes",/* circled times = vector product, U+2297 ISOamsb */ },
- { 8869, "perp", /* up tack = orthogonal to = perpendicular, U+22A5 ISOtech */ },
- { 8901, "sdot", /* dot operator, U+22C5 ISOamsb */ },
- { 8968, "lceil",/* left ceiling = apl upstile, U+2308 ISOamsc */ },
- { 8969, "rceil",/* right ceiling, U+2309 ISOamsc */ },
- { 8970, "lfloor",/* left floor = apl downstile, U+230A ISOamsc */ },
- { 8971, "rfloor",/* right floor, U+230B ISOamsc */ },
- { 9001, "lang", /* left-pointing angle bracket = bra, U+2329 ISOtech */ },
- { 9002, "rang", /* right-pointing angle bracket = ket, U+232A ISOtech */ },
- { 9674, "loz", /* lozenge, U+25CA ISOpub */ },
-
- { 9824, "spades",/* black spade suit, U+2660 ISOpub */ },
- { 9827, "clubs",/* black club suit = shamrock, U+2663 ISOpub */ },
- { 9829, "hearts",/* black heart suit = valentine, U+2665 ISOpub */ },
- { 9830, "diams",/* black diamond suit, U+2666 ISOpub */ },
-
- { 338, "OElig",/* latin capital ligature OE, U+0152 ISOlat2 */ },
- { 339, "oelig",/* latin small ligature oe, U+0153 ISOlat2 */ },
- { 352, "Scaron",/* latin capital letter S with caron, U+0160 ISOlat2 */ },
- { 353, "scaron",/* latin small letter s with caron, U+0161 ISOlat2 */ },
- { 376, "Yuml", /* latin capital letter Y with diaeresis, U+0178 ISOlat2 */ },
- { 710, "circ", /* modifier letter circumflex accent, U+02C6 ISOpub */ },
- { 732, "tilde",/* small tilde, U+02DC ISOdia */ },
-
- { 8194, "ensp", /* en space, U+2002 ISOpub */ },
- { 8195, "emsp", /* em space, U+2003 ISOpub */ },
- { 8201, "thinsp",/* thin space, U+2009 ISOpub */ },
- { 8204, "zwnj", /* zero width non-joiner, U+200C NEW RFC 2070 */ },
- { 8205, "zwj", /* zero width joiner, U+200D NEW RFC 2070 */ },
- { 8206, "lrm", /* left-to-right mark, U+200E NEW RFC 2070 */ },
- { 8207, "rlm", /* right-to-left mark, U+200F NEW RFC 2070 */ },
- { 8211, "ndash",/* en dash, U+2013 ISOpub */ },
- { 8212, "mdash",/* em dash, U+2014 ISOpub */ },
- { 8216, "lsquo",/* left single quotation mark, U+2018 ISOnum */ },
- { 8217, "rsquo",/* right single quotation mark, U+2019 ISOnum */ },
- { 8218, "sbquo",/* single low-9 quotation mark, U+201A NEW */ },
- { 8220, "ldquo",/* left double quotation mark, U+201C ISOnum */ },
- { 8221, "rdquo",/* right double quotation mark, U+201D ISOnum */ },
- { 8222, "bdquo",/* double low-9 quotation mark, U+201E NEW */ },
- { 8224, "dagger",/* dagger, U+2020 ISOpub */ },
- { 8225, "Dagger",/* double dagger, U+2021 ISOpub */ },
- { 8240, "permil",/* per mille sign, U+2030 ISOtech */ },
- { 8249, "lsaquo",/* single left-pointing angle quotation mark, U+2039 ISO proposed */ },
- { 8250, "rsaquo",/* single right-pointing angle quotation mark, U+203A ISO proposed */ },
- { 8364, "euro", /* euro sign, U+20AC NEW */ }
-};
-
-static GHashTable *entities;
-
-/* this cannot be called in a thread context */
-static void tokenise_setup(void)
-{
- int i;
-
- if (entities == NULL) {
- entities = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<sizeof(entity_map)/sizeof(entity_map[0]);i++) {
- g_hash_table_insert(entities, (char *)entity_map[i].name, (void *)entity_map[i].val);
- }
- }
-}
-
-static CamelHTMLParserPrivate *tokenise_init(void)
-{
- CamelHTMLParserPrivate *p;
-
- p = g_malloc(sizeof(*p));
- p->state = CAMEL_HTML_PARSER_DATA;
-
- p->attr = 0;
- p->attrs = g_ptr_array_new();
- p->values = g_ptr_array_new();
- p->tag = g_string_new("");
- p->ent = g_string_new("");
- p->charset = NULL;
-
- if (entities == NULL)
- tokenise_setup();
-
- return p;
-}
-
-static void tokenise_free(CamelHTMLParserPrivate *p)
-{
- int i;
-
- g_string_free(p->tag, TRUE);
- g_string_free(p->ent, TRUE);
- g_free(p->charset);
-
- for (i=0;i<p->attrs->len;i++)
- g_string_free(p->attrs->pdata[i], TRUE);
-
- for (i=0;i<p->values->len;i++)
- g_string_free(p->values->pdata[i], TRUE);
-
- g_free(p);
-}
-
-static int convert_entity(const char *e, char *ent)
-{
- unsigned int val;
-
- if (e[0] == '#')
- return g_unichar_to_utf8(atoi(e+1), ent);
-
- val = (unsigned int)g_hash_table_lookup(entities, e);
- if (ent)
- return g_unichar_to_utf8(val, ent);
- else
- return 0;
-}
-
-#if 0
-static void dump_tag(CamelHTMLParserPrivate *p)
-{
- int i;
-
- printf("got tag: %s\n", p->tag->str);
- printf("%d attributes:\n", p->attr);
- for (i=0;i<p->attr;i++) {
- printf(" %s = '%s'\n", ((GString *)p->attrs->pdata[i])->str, ((GString *)p->values->pdata[i])->str);
- }
-}
-#endif
-
-static int tokenise_step(CamelHTMLParserPrivate *p, char **datap, int *lenp)
-{
- char *in = p->inptr;
- char *inend = p->inend;
- char c;
- int state = p->state, ret, len;
- char *start = p->inptr;
-
- d(printf("Tokenise step\n"));
-
- while (in < inend) {
- c = *in++;
- switch (state) {
- case CAMEL_HTML_PARSER_DATA:
- if (c == '<') {
- ret = state;
- state = CAMEL_HTML_PARSER_TAG;
- p->attr = 0;
- g_string_truncate(p->tag, 0);
- d(printf("got data '%.*s'\n", in-start-1, start));
- *datap = start;
- *lenp = in-start-1;
- goto done;
- } else if (c=='&') {
- ret = state;
- state = CAMEL_HTML_PARSER_ENT;
- g_string_truncate(p->ent, 0);
- g_string_append_c(p->ent, c);
- d(printf("got data '%.*s'\n", in-start-1, start));
- *datap = start;
- *lenp = in-start-1;
- goto done;
- }
- break;
- case CAMEL_HTML_PARSER_ENT:
- if (c==';') {
- len = convert_entity(p->ent->str+1, p->ent_utf8);
- if (len == 0) {
- /* handle broken entity */
- g_string_append_c(p->ent, c);
- ret = state = CAMEL_HTML_PARSER_DATA;
- *datap = p->ent->str;
- *lenp = p->ent->len;
- goto done;
- } else {
- d(printf("got entity: %s = %s\n", p->ent->str, p->ent_utf8));
- ret = state;
- state = CAMEL_HTML_PARSER_DATA;
- *datap = p->ent_utf8;
- *lenp = len;
- goto done;
- }
- } else if (isalnum(c) || c=='#') { /* FIXME: right type */
- g_string_append_c(p->ent, c);
- } else {
- /* handle broken entity */
- g_string_append_c(p->ent, c);
- ret = state = CAMEL_HTML_PARSER_DATA;
- *datap = p->ent->str;
- *lenp = p->ent->len;
- goto done;
- }
- break;
- case CAMEL_HTML_PARSER_TAG:
- if (c == '!') {
- state = CAMEL_HTML_PARSER_COMMENT0;
- g_string_append_c(p->tag, c);
- } else if (c == '>') {
- d(dump_tag(p));
- ret = CAMEL_HTML_PARSER_ELEMENT;
- state = CAMEL_HTML_PARSER_DATA;
- goto done;
- } else if (c == ' ' || c=='\n' || c=='\t') {
- state = CAMEL_HTML_PARSER_ATTR0;
- } else {
- g_string_append_c(p->tag, c);
- }
- break;
- /* check for <!-- */
- case CAMEL_HTML_PARSER_COMMENT0:
- if (c == '-') {
- g_string_append_c(p->tag, c);
- if (p->tag->len == 3) {
- g_string_truncate(p->tag, 0);
- state = CAMEL_HTML_PARSER_COMMENT;
- }
- } else {
- /* got something else, probbly dtd entity */
- state = CAMEL_HTML_PARSER_DTDENT;
- }
- break;
- case CAMEL_HTML_PARSER_DTDENT:
- if (c == '>') {
- ret = CAMEL_HTML_PARSER_DTDENT;
- state = CAMEL_HTML_PARSER_DATA;
- *datap = start;
- *lenp = in-start-1;
- goto done;
- }
- break;
- case CAMEL_HTML_PARSER_COMMENT:
- if (c == '>' && p->tag->len == 2) {
- ret = CAMEL_HTML_PARSER_COMMENT;
- state = CAMEL_HTML_PARSER_DATA;
- *datap = start;
- *lenp = in-start-1;
- goto done;
- } else if (c=='-') {
- /* we dont care if we get 'n' --'s before the > */
- if (p->tag->len < 2)
- g_string_append_c(p->tag, c);
- } else {
- g_string_truncate(p->tag, 0);
- }
- break;
- case CAMEL_HTML_PARSER_ATTR0: /* pre-attribute whitespace */
- if (c == '>') {
- d(dump_tag(p));
- ret = CAMEL_HTML_PARSER_ELEMENT;
- state = CAMEL_HTML_PARSER_DATA;
- goto done;
- } else if (c == ' ' || c=='\n' || c=='\t') {
- } else {
- if (p->attrs->len <= p->attr) {
- g_ptr_array_add(p->attrs, g_string_new(""));
- g_ptr_array_add(p->values, g_string_new(""));
- } else {
- g_string_truncate(p->attrs->pdata[p->attr], 0);
- g_string_truncate(p->values->pdata[p->attr], 0);
- }
- g_string_append_c(p->attrs->pdata[p->attr], c);
- state = CAMEL_HTML_PARSER_ATTR;
- }
- break;
- case CAMEL_HTML_PARSER_ATTR:
- if (c == '>') {
- d(dump_tag(p));
- ret = CAMEL_HTML_PARSER_ELEMENT;
- state = CAMEL_HTML_PARSER_DATA;
- goto done;
- } else if (c == '=') {
- state = CAMEL_HTML_PARSER_VAL0;
- } else if (c == ' ' || c=='\n' || c=='\t') {
- state = CAMEL_HTML_PARSER_ATTR0;
- p->attr++;
- } else {
- g_string_append_c(p->attrs->pdata[p->attr], c);
- }
- break;
- case CAMEL_HTML_PARSER_VAL0:
- if (c == '>') {
- d(printf("value truncated\n"));
- d(dump_tag(p));
- ret = CAMEL_HTML_PARSER_ELEMENT;
- state = CAMEL_HTML_PARSER_DATA;
- goto done;
- } else if (c == '\'' || c == '\"') {
- p->quote = c;
- state = CAMEL_HTML_PARSER_VAL;
- } else if (c == ' ' || c=='\n' || c=='\t') {
- } else {
- g_string_append_c(p->values->pdata[p->attr], c);
- p->quote = 0;
- state = CAMEL_HTML_PARSER_VAL;
- }
- break;
- case CAMEL_HTML_PARSER_VAL:
- do_val:
- if (p->quote) {
- if (c == '>') {
- d(printf("value truncated\n"));
- d(dump_tag(p));
- ret = CAMEL_HTML_PARSER_ELEMENT;
- state = CAMEL_HTML_PARSER_DATA;
- p->attr++;
- goto done;
- } else if (c == p->quote) {
- state = CAMEL_HTML_PARSER_ATTR0;
- p->attr++;
- } else if (c=='&') {
- state = CAMEL_HTML_PARSER_VAL_ENT;
- g_string_truncate(p->ent, 0);
- } else {
- g_string_append_c(p->values->pdata[p->attr], c);
- }
- } else if (c == '>') {
- d(dump_tag(p));
- ret = CAMEL_HTML_PARSER_ELEMENT;
- state = CAMEL_HTML_PARSER_DATA;
- p->attr++;
- goto done;
- } else if (c == ' ' || c=='\n' || c=='\t') {
- state = CAMEL_HTML_PARSER_ATTR0;
- p->attr++;
- } else if (c=='&') {
- state = CAMEL_HTML_PARSER_VAL_ENT;
- g_string_truncate(p->ent, 0);
- } else {
- g_string_append_c(p->values->pdata[p->attr], c);
- }
- break;
- case CAMEL_HTML_PARSER_VAL_ENT:
- if (c==';') {
- state = CAMEL_HTML_PARSER_VAL;
- len = convert_entity(p->ent->str+1, p->ent_utf8);
- if (len == 0) {
- /* fallback; broken entity, just output it and see why we ended */
- g_string_append(p->values->pdata[p->attr], p->ent->str);
- g_string_append_c(p->values->pdata[p->attr], ';');
- } else {
- d(printf("got entity: %s = %s\n", p->ent->str, p->ent_utf8));
- g_string_append(p->values->pdata[p->attr], p->ent_utf8);
- }
- } else if (isalnum(c) || c=='#') { /* FIXME: right type */
- g_string_append_c(p->ent, c);
- } else {
- /* fallback; broken entity, just output it and see why we ended */
- g_string_append(p->values->pdata[p->attr], p->ent->str);
- goto do_val;
- }
- break;
- }
- }
-
- if (p->eof) {
- /* FIXME: what about other truncated states? */
- switch (state) {
- case CAMEL_HTML_PARSER_DATA:
- case CAMEL_HTML_PARSER_COMMENT:
- if (in > start) {
- ret = state;
- *datap = start;
- *lenp = in-start-1;
- } else {
- ret = CAMEL_HTML_PARSER_EOF;
- state = CAMEL_HTML_PARSER_EOF;
- }
- break;
- default:
- ret = CAMEL_HTML_PARSER_EOF;
- state = CAMEL_HTML_PARSER_EOF;
- }
- } else {
- /* we only care about remaining data for this buffer, everything else has its own copy */
- switch (state) {
- case CAMEL_HTML_PARSER_DATA:
- case CAMEL_HTML_PARSER_COMMENT:
- if (in > start) {
- ret = state;
- *datap = start;
- *lenp = in-start-1;
- } else {
- ret = CAMEL_HTML_PARSER_EOD;
- }
- break;
- default:
- ret = CAMEL_HTML_PARSER_EOD;
- }
- }
-
-done:
- p->start = start;
- p->state = state;
- p->inptr = in;
-
- return ret;
-}
diff --git a/camel/camel-html-parser.h b/camel/camel-html-parser.h
deleted file mode 100644
index 41ac2ac9ec..0000000000
--- a/camel/camel-html-parser.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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.
- */
-
-/** WARNING
- **
- ** DO NOT USE THIS CODE OUTSIDE OF CAMEL
- **
- ** IT IS SUBJECT TO CHANGE OR MAY VANISH AT ANY TIME
- **/
-
-#ifndef _CAMEL_HTML_PARSER_H
-#define _CAMEL_HTML_PARSER_H
-
-#include <camel/camel-object.h>
-
-#define CAMEL_HTML_PARSER(obj) CAMEL_CHECK_CAST (obj, camel_html_parser_get_type (), CamelHTMLParser)
-#define CAMEL_HTML_PARSER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_html_parser_get_type (), CamelHTMLParserClass)
-#define CAMEL_IS_HTML_PARSER(obj) CAMEL_CHECK_TYPE (obj, camel_html_parser_get_type ())
-
-typedef struct _CamelHTMLParserClass CamelHTMLParserClass;
-typedef struct _CamelHTMLParser CamelHTMLParser;
-
-/* Parser/tokeniser states */
-typedef enum _camel_html_parser_t {
- CAMEL_HTML_PARSER_DATA, /* raw data */
- CAMEL_HTML_PARSER_ENT, /* entity in data */
- CAMEL_HTML_PARSER_ELEMENT, /* element (tag + attributes scanned) */
- CAMEL_HTML_PARSER_TAG, /* tag */
- CAMEL_HTML_PARSER_DTDENT, /* dtd entity? <! blah blah > */
- CAMEL_HTML_PARSER_COMMENT0, /* start of comment */
- CAMEL_HTML_PARSER_COMMENT, /* body of comment */
- CAMEL_HTML_PARSER_ATTR0, /* start of attribute */
- CAMEL_HTML_PARSER_ATTR, /* attribute */
- CAMEL_HTML_PARSER_VAL0, /* start of value */
- CAMEL_HTML_PARSER_VAL, /* value */
- CAMEL_HTML_PARSER_VAL_ENT, /* entity in value */
- CAMEL_HTML_PARSER_EOD, /* end of current data */
- CAMEL_HTML_PARSER_EOF, /* end of file */
-} camel_html_parser_t;
-
-struct _CamelHTMLParser {
- CamelObject parent;
-
- struct _CamelHTMLParserPrivate *priv;
-};
-
-struct _CamelHTMLParserClass {
- CamelObjectClass parent_class;
-};
-
-guint camel_html_parser_get_type (void);
-CamelHTMLParser *camel_html_parser_new (void);
-
-void camel_html_parser_set_data(CamelHTMLParser *hp, const char *start, int len, int last);
-camel_html_parser_t camel_html_parser_step(CamelHTMLParser *hp, const char **datap, int *lenp);
-const char *camel_html_parser_left(CamelHTMLParser *hp, int *lenp);
-const char *camel_html_parser_tag(CamelHTMLParser *hp);
-const char *camel_html_parser_attr(CamelHTMLParser *hp, const char *name);
-const GPtrArray *camel_html_parser_attr_list(CamelHTMLParser *hp, const GPtrArray **values);
-
-#endif /* ! _CAMEL_HTML_PARSER_H */
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
deleted file mode 100644
index c1ca4f8430..0000000000
--- a/camel/camel-internet-address.c
+++ /dev/null
@@ -1,510 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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_append(out, 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_append(out, 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_address_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 20cdd44a60..0000000000
--- a/camel/camel-internet-address.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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-client.c b/camel/camel-lock-client.c
deleted file mode 100644
index a2dc1e591a..0000000000
--- a/camel/camel-lock-client.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <stdio.h>
-#include <stdlib.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <unistd.h>
-#include <fcntl.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-#include "camel-exception.h"
-#include "camel-lock-helper.h"
-#include "camel-lock-client.h"
-
-#define d(x)
-
-/* dunno where this fucking thing is got from */
-/* see also camel-lock.c */
-#define _(x) (x)
-
-#ifdef ENABLE_THREADS
-static pthread_mutex_t lock_lock = PTHREAD_MUTEX_INITIALIZER;
-#define LOCK() pthread_mutex_lock(&lock_lock)
-#define UNLOCK() pthread_mutex_unlock(&lock_lock)
-#else
-#define LOCK()
-#define UNLOCK()
-#endif
-
-static int lock_sequence;
-static int lock_helper_pid = -1;
-static int lock_stdin_pipe[2], lock_stdout_pipe[2];
-
-static int read_n(int fd, void *buffer, int inlen)
-{
- char *p = buffer;
- int len, left = inlen;
-
- do {
- len = read(fd, p, left);
- if (len == -1) {
- if (errno != EINTR)
- return -1;
- } else {
- left -= len;
- p += len;
- }
- } while (left > 0 && len != 0);
-
- return inlen - left;
-}
-
-static int write_n(int fd, void *buffer, int inlen)
-{
- char *p = buffer;
- int len, left = inlen;
-
- do {
- len = write(fd, p, left);
- if (len == -1) {
- if (errno != EINTR)
- return -1;
- } else {
- left -= len;
- p += len;
- }
- } while (left > 0);
-
- return inlen;
-}
-
-static int camel_lock_helper_init(CamelException *ex)
-{
- if (pipe(lock_stdin_pipe) == -1
- || pipe(lock_stdout_pipe) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot build locking helper pipe: %s"),
- strerror(errno));
- return -1;
- }
-
- lock_helper_pid = fork();
- switch(lock_helper_pid) {
- case -1:
- close(lock_stdin_pipe[0]);
- close(lock_stdin_pipe[1]);
- close(lock_stdout_pipe[0]);
- close(lock_stdout_pipe[1]);
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot fork locking helper: %s"),
- strerror(errno));
- return -1;
- case 0:
- close(STDIN_FILENO);
- dup(lock_stdin_pipe[0]);
- close(STDOUT_FILENO);
- dup(lock_stdout_pipe[1]);
- close(lock_stdin_pipe[0]);
- close(lock_stdin_pipe[1]);
- close(lock_stdout_pipe[0]);
- close(lock_stdout_pipe[1]);
- execl(CAMEL_SBINDIR "/camel-lock-helper", "camel-lock-helper", NULL);
- d(fprintf(stderr, "shit, couldn't exec lock helper!\n"));
- /* it'll pick this up when it tries to use us */
- exit(255);
- default:
- close(lock_stdin_pipe[0]);
- close(lock_stdout_pipe[1]);
-
- /* so the child knows when we vanish */
- fcntl(lock_stdin_pipe[1], F_SETFD, FD_CLOEXEC);
- fcntl(lock_stdout_pipe[0], F_SETFD, FD_CLOEXEC);
- }
-
- return 0;
-}
-
-int camel_lock_helper_lock(const char *path, CamelException *ex)
-{
- struct _CamelLockHelperMsg *msg;
- int len = strlen(path);
- int res = -1;
- int retry = 3;
-
- LOCK();
-
- if (lock_helper_pid == -1) {
- if (camel_lock_helper_init(ex) == -1) {
- UNLOCK();
- return -1;
- }
- }
-
- msg = alloca(len + sizeof(*msg));
-again:
- msg->magic = CAMEL_LOCK_HELPER_MAGIC;
- msg->seq = lock_sequence;
- msg->id = CAMEL_LOCK_HELPER_LOCK;
- msg->data = len;
- memcpy(msg+1, path, len);
-
- write_n(lock_stdin_pipe[1], msg, len+sizeof(*msg));
-
- do {
- /* should also have a timeout here? cancellation? */
- len = read_n(lock_stdout_pipe[0], msg, sizeof(*msg));
- if (len == 0) {
- /* child quit, do we try ressurect it? */
- res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
- /* if the child exited, this should get it, waidpid returns 0 if the child hasn't */
- if (waitpid(lock_helper_pid, NULL, WNOHANG) > 0) {
- lock_helper_pid = -1;
- close(lock_stdout_pipe[0]);
- close(lock_stdin_pipe[1]);
- lock_stdout_pipe[0] = -1;
- lock_stdin_pipe[1] = -1;
- }
- goto fail;
- }
-
- if (msg->magic != CAMEL_LOCK_HELPER_RETURN_MAGIC
- || msg->seq > lock_sequence) {
- res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
- d(printf("lock child protocol error\n"));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not lock '%s': protocol error with lock-helper"), path);
- goto fail;
- }
- } while (msg->seq < lock_sequence);
-
- if (msg->seq == lock_sequence) {
- switch(msg->id) {
- case CAMEL_LOCK_HELPER_STATUS_OK:
- d(printf("lock child locked ok, id is %d\n", msg->data));
- res = msg->data;
- break;
- default:
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not lock '%s'"), path);
- d(printf("locking failed ! status = %d\n", msg->id));
- break;
- }
- } else if (retry > 0) {
- d(printf("sequence failure, lost message? retry?\n"));
- retry--;
- goto again;
- } else {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not lock '%s': protocol error with lock-helper"), path);
- }
-
-fail:
- lock_sequence++;
-
- UNLOCK();
-
- return res;
-}
-
-int camel_lock_helper_unlock(int lockid)
-{
- struct _CamelLockHelperMsg *msg;
- int res = -1;
- int retry = 3;
- int len;
-
- d(printf("unlocking lock id %d\n", lockid));
-
- LOCK();
-
- /* impossible to unlock if we haven't locked yet */
- if (lock_helper_pid == -1) {
- UNLOCK();
- return -1;
- }
-
- msg = alloca(sizeof(*msg));
-again:
- msg->magic = CAMEL_LOCK_HELPER_MAGIC;
- msg->seq = lock_sequence;
- msg->id = CAMEL_LOCK_HELPER_UNLOCK;
- msg->data = lockid;
-
- write_n(lock_stdin_pipe[1], msg, sizeof(*msg));
-
- do {
- /* should also have a timeout here? cancellation? */
- len = read_n(lock_stdout_pipe[0], msg, sizeof(*msg));
- if (len == 0) {
- /* child quit, do we try ressurect it? */
- res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
- if (waitpid(lock_helper_pid, NULL, WNOHANG) > 0) {
- lock_helper_pid = -1;
- close(lock_stdout_pipe[0]);
- close(lock_stdin_pipe[1]);
- lock_stdout_pipe[0] = -1;
- lock_stdin_pipe[1] = -1;
- }
- goto fail;
- }
-
- if (msg->magic != CAMEL_LOCK_HELPER_RETURN_MAGIC
- || msg->seq > lock_sequence) {
- goto fail;
- }
- } while (msg->seq < lock_sequence);
-
- if (msg->seq == lock_sequence) {
- switch(msg->id) {
- case CAMEL_LOCK_HELPER_STATUS_OK:
- d(printf("lock child unlocked ok\n"));
- res = 0;
- break;
- default:
- d(printf("locking failed ! \n"));
- break;
- }
- } else if (retry > 0) {
- d(printf("sequence failure, lost message? retry?\n"));
- lock_sequence++;
- retry--;
- goto again;
- }
-
-fail:
- lock_sequence++;
-
- UNLOCK();
-
- return res;
-}
-
-#if 0
-int main(int argc, char **argv)
-{
- int id1, id2;
-
- d(printf("locking started\n"));
- camel_lock_helper_init();
-
- id1 = camel_lock_helper_lock("1 path 1");
- if (id1 != -1) {
- d(printf("lock ok, unlock\n"));
- camel_lock_helper_unlock(id1);
- }
-
- id1 = camel_lock_helper_lock("2 path 1");
- id2 = camel_lock_helper_lock("2 path 2");
- camel_lock_helper_unlock(id2);
- camel_lock_helper_unlock(id1);
-
- id1 = camel_lock_helper_lock("3 path 1");
- id2 = camel_lock_helper_lock("3 path 2");
- camel_lock_helper_unlock(id1);
-}
-#endif
diff --git a/camel/camel-lock-client.h b/camel/camel-lock-client.h
deleted file mode 100644
index 45509706cb..0000000000
--- a/camel/camel-lock-client.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@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
- */
-
-/* defines protocol for lock helper process ipc */
-
-#ifndef _CAMEL_LOCK_CLIENT_H
-#define _CAMEL_LOCK_CLIENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-exception.h>
-
-int camel_lock_helper_lock(const char *path , CamelException *ex);
-int camel_lock_helper_unlock(int lockid);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* !_CAMEL_LOCK_HELPER_H */
diff --git a/camel/camel-lock-helper.c b/camel/camel-lock-helper.c
deleted file mode 100644
index 7cb381eae0..0000000000
--- a/camel/camel-lock-helper.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-/* lock helper process */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <errno.h>
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <signal.h>
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <utime.h>
-
-#include <time.h>
-
-#define SETEUID_SAVES (1)
-
-/* we try and include as little as possible */
-
-#include "camel-lock-helper.h"
-#include "camel-lock.h"
-
-#define d(x)
-
-/* keeps track of open locks */
-struct _lock_info {
- struct _lock_info *next;
- uid_t uid;
- int id;
- int depth;
- time_t stamp; /* when last updated */
- char path[1];
-};
-
-static int lock_id = 0;
-static struct _lock_info *lock_info_list;
-static uid_t lock_root_uid = -1;
-static uid_t lock_real_uid = -1;
-
-/* utility functions */
-
-static int read_n(int fd, void *buffer, int inlen)
-{
- char *p = buffer;
- int len, left = inlen;
-
- do {
- len = read(fd, p, left);
- if (len == -1) {
- if (errno != EINTR)
- return -1;
- } else {
- left -= len;
- p += len;
- }
- } while (left > 0 && len != 0);
-
- return inlen - left;
-}
-
-static int write_n(int fd, void *buffer, int inlen)
-{
- char *p = buffer;
- int len, left = inlen;
-
- do {
- len = write(fd, p, left);
- if (len == -1) {
- if (errno != EINTR)
- return -1;
- } else {
- left -= len;
- p += len;
- }
- } while (left > 0);
-
- return inlen;
-}
-
-void
-camel_exception_setv (CamelException *ex, ExceptionId id, const char *format, ...)
-{
- ;
-}
-
-void
-camel_exception_clear (CamelException *exception)
-{
- ;
-}
-
-char *gettext (const char *msgid);
-
-char *
-gettext (const char *msgid)
-{
- return NULL;
-}
-
-static int lock_path(const char *path, guint32 *lockid)
-{
- struct _lock_info *info = NULL;
- int res = CAMEL_LOCK_HELPER_STATUS_OK;
- struct stat st;
-
- d(fprintf(stderr, "locking path '%s' id = %d\n", path, lock_id));
-
- /* check to see if we have it locked already, make the lock 'recursive' */
- /* we could also error i suppose, but why bother */
- info = lock_info_list;
- while (info) {
- if (!strcmp(info->path, path)) {
- info->depth++;
- return CAMEL_LOCK_HELPER_STATUS_OK;
- }
- info = info->next;
- }
-
- /* check we are allowed to lock it, we must own it, be able to write to it, and it has to exist */
- if (stat(path, &st) == -1
- || st.st_uid != getuid()
- || !S_ISREG(st.st_mode)
- || (st.st_mode & 0400) == 0) {
- return CAMEL_LOCK_HELPER_STATUS_INVALID;
- }
-
- info = malloc(sizeof(*info) + strlen(path));
- if (info == NULL) {
- res = CAMEL_LOCK_HELPER_STATUS_NOMEM;
- goto fail;
- }
-
- /* we try the real uid first, and if that fails, try the 'root id' */
- if (camel_lock_dot(path, NULL) == -1) {
-#ifdef SETEUID_SAVES
- if (lock_real_uid != lock_root_uid) {
- if (seteuid(lock_root_uid) != -1) {
- if (camel_lock_dot(path, NULL) == -1) {
- seteuid(lock_real_uid);
- res = CAMEL_LOCK_HELPER_STATUS_SYSTEM;
- goto fail;
- }
- seteuid(lock_real_uid);
- } else {
- res = CAMEL_LOCK_HELPER_STATUS_SYSTEM;
- goto fail;
- }
- } else {
- res = CAMEL_LOCK_HELPER_STATUS_SYSTEM;
- goto fail;
- }
-#else
- res = CAMEL_LOCK_HELPER_STATUS_SYSTEM;
- goto fail;
-#endif
- } else {
- info->uid = lock_real_uid;
- }
-
- strcpy(info->path, path);
- info->id = lock_id;
- info->depth = 1;
- info->next = lock_info_list;
- info->stamp = time(0);
- lock_info_list = info;
-
- if (lockid)
- *lockid = lock_id;
-
- lock_id++;
-
- d(fprintf(stderr, "lock ok\n"));
-
- return res;
-fail:
- d(fprintf(stderr, "lock failed\n"));
-
- if (info)
- free(info);
-
- return res;
-}
-
-static int unlock_id(guint32 lockid)
-{
- struct _lock_info *info, *p;
-
- d(fprintf(stderr, "unlocking id '%d'\n", lockid));
-
- p = (struct _lock_info *)&lock_info_list;
- info = p->next;
- while (info) {
- if (info->id == lockid) {
- d(fprintf(stderr, "found id %d path '%s'\n", lockid, info->path));
- info->depth--;
- if (info->depth <= 0) {
-#ifdef SETEUID_SAVES
- if (info->uid != lock_real_uid) {
- seteuid(lock_root_uid);
- camel_unlock_dot(info->path);
- seteuid(lock_real_uid);
- } else
-#endif
- camel_unlock_dot(info->path);
-
- p->next = info->next;
- free(info);
- }
-
- return CAMEL_LOCK_HELPER_STATUS_OK;
- }
- p = info;
- info = info->next;
- }
-
- d(fprintf(stderr, "unknown id asked to be unlocked %d\n", lockid));
- return CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
-}
-
-static void lock_touch(const char *path)
-{
- char *name;
-
- /* we could also check that we haven't had our lock stolen from us here */
-
- name = alloca(strlen(path) + 10);
- sprintf(name, "%s.lock", path);
-
- d(fprintf(stderr, "Updating lock %s\n", name));
- utime(name, NULL);
-}
-
-static void setup_process(void)
-{
- struct sigaction sa;
- sigset_t sigset;
-
- /* ignore sigint/sigio */
- sa.sa_handler = SIG_IGN;
- sigemptyset (&sa.sa_mask);
- sa.sa_flags = 0;
-
- sigemptyset(&sigset);
- sigaddset(&sigset, SIGIO);
- sigaddset(&sigset, SIGINT);
- sigprocmask(SIG_UNBLOCK, &sigset, NULL);
-
- sigaction (SIGIO, &sa, NULL);
- sigaction (SIGINT, &sa, NULL);
-
- /* FIXME: add more sanity checks/setup here */
-
-#ifdef SETEUID_SAVES
- /* here we change to the real user id, this is probably not particularly
- portable so may need configure checks */
- lock_real_uid = getuid();
- lock_root_uid = geteuid();
- if (lock_real_uid != lock_root_uid)
- seteuid(lock_real_uid);
-#endif
-}
-
-int main(int argc, char **argv)
-{
- struct _CamelLockHelperMsg msg;
- int len;
- int res;
- char *path;
- fd_set rset;
- struct timeval tv;
- struct _lock_info *info;
-
- setup_process();
-
- do {
- /* do a poll/etc, so we can refresh the .locks as required ... */
- FD_ZERO(&rset);
- FD_SET(STDIN_FILENO, &rset);
-
- /* check the minimum timeout we need to refresh the next oldest lock */
- if (lock_info_list) {
- time_t now = time(0);
- time_t left;
- time_t delay = CAMEL_DOT_LOCK_REFRESH;
-
- info = lock_info_list;
- while (info) {
- left = CAMEL_DOT_LOCK_REFRESH - (now - info->stamp);
- left = MAX(left, 0);
- delay = MIN(left, delay);
- info = info->next;
- }
-
- tv.tv_sec = delay;
- tv.tv_usec = 0;
- }
-
- d(fprintf(stderr, "lock helper waiting for input\n"));
- if (select(STDIN_FILENO+1, &rset, NULL, NULL, lock_info_list?&tv:NULL) == -1) {
- if (errno == EINTR)
- break;
-
- continue;
- }
-
- /* did we get a timeout? scan for any locks that need updating */
- if (!FD_ISSET(STDIN_FILENO, &rset)) {
- time_t now = time(0);
- time_t left;
-
- d(fprintf(stderr, "Got a timeout, checking locks\n"));
-
- info = lock_info_list;
- while (info) {
- left = (now - info->stamp);
- if (left >= CAMEL_DOT_LOCK_REFRESH) {
- lock_touch(info->path);
- info->stamp = now;
- }
- info = info->next;
- }
-
- continue;
- }
-
-
- len = read_n(STDIN_FILENO, &msg, sizeof(msg));
- if (len == 0)
- break;
-
- res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
- if (len == sizeof(msg) && msg.magic == CAMEL_LOCK_HELPER_MAGIC) {
- switch(msg.id) {
- case CAMEL_LOCK_HELPER_LOCK:
- res = CAMEL_LOCK_HELPER_STATUS_NOMEM;
- path = malloc(msg.data+1);
- if (path != NULL) {
- res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
- len = read_n(STDIN_FILENO, path, msg.data);
- if (len == msg.data) {
- path[len] = 0;
- res = lock_path(path, &msg.data);
- }
- free(path);
- }
- break;
- case CAMEL_LOCK_HELPER_UNLOCK:
- res = unlock_id(msg.data);
- break;
- }
- }
- d(fprintf(stderr, "returning result %d\n", res));
- msg.id = res;
- msg.magic = CAMEL_LOCK_HELPER_RETURN_MAGIC;
- write_n(STDOUT_FILENO, &msg, sizeof(msg));
- } while (1);
-
- d(fprintf(stderr, "parent exited, clsoing down remaining id's\n"));
- while (lock_info_list)
- unlock_id(lock_info_list->id);
-
- return 0;
-}
diff --git a/camel/camel-lock-helper.h b/camel/camel-lock-helper.h
deleted file mode 100644
index 1dc970745c..0000000000
--- a/camel/camel-lock-helper.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 1999 Ximian (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
- */
-
-/* defines protocol for lock helper process ipc */
-
-#ifndef _CAMEL_LOCK_HELPER_H
-#define _CAMEL_LOCK_HELPER_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-
-struct _CamelLockHelperMsg {
- guint32 magic;
- guint32 seq;
- guint32 id;
- guint32 data;
-};
-
-/* magic values */
-enum {
- CAMEL_LOCK_HELPER_MAGIC = 0xABADF00D,
- CAMEL_LOCK_HELPER_RETURN_MAGIC = 0xDEADBEEF
-};
-
-/* return status */
-enum {
- CAMEL_LOCK_HELPER_STATUS_OK = 0,
- CAMEL_LOCK_HELPER_STATUS_PROTOCOL,
- CAMEL_LOCK_HELPER_STATUS_NOMEM,
- CAMEL_LOCK_HELPER_STATUS_SYSTEM,
- CAMEL_LOCK_HELPER_STATUS_INVALID, /* not allowed to lock/doesn't exist etc */
-};
-
-/* commands */
-enum {
- CAMEL_LOCK_HELPER_LOCK = 0xf0f,
- CAMEL_LOCK_HELPER_UNLOCK = 0xf0f0,
-};
-
-/* seconds between lock refreshes */
-#define CAMEL_DOT_LOCK_REFRESH (30)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* !_CAMEL_LOCK_HELPER_H */
diff --git a/camel/camel-lock.c b/camel/camel-lock.c
deleted file mode 100644
index d8064d5eff..0000000000
--- a/camel/camel-lock.c
+++ /dev/null
@@ -1,419 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 1999 Ximian (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 <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) {
- /* If we get a 'locking not vailable' type error,
- we assume the filesystem doesn't support fcntl() locking */
- /* this is somewhat system-dependent */
- if (errno != EINVAL && errno != ENOLCK) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to get lock using fcntl(2): %s"),
- strerror(errno));
- return -1;
- } else {
- static int failed = 0;
-
- if (failed == 0)
- fprintf(stderr, "fcntl(2) locking appears not to work on this filesystem");
- failed++;
- }
- }
-#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 52b51d74ce..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@ximian.com>
- *
- * Copyright (C) 1999 Ximian (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_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 95480754a0..0000000000
--- a/camel/camel-medium.c
+++ /dev/null
@@ -1,336 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 <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 gboolean is_offline (CamelDataWrapper *data_wrapper);
-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 GArray *get_headers (CamelMedium *medium);
-static void free_headers (CamelMedium *medium, GArray *headers);
-
-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 overload */
- camel_data_wrapper_class->is_offline = is_offline;
-
- /* 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->get_headers = get_headers;
- camel_medium_class->free_headers = free_headers;
-
- 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 gboolean
-is_offline (CamelDataWrapper *data_wrapper)
-{
- return parent_class->is_offline (data_wrapper) ||
- camel_data_wrapper_is_offline (CAMEL_MEDIUM (data_wrapper)->content);
-}
-
-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 GArray *
-get_headers(CamelMedium *medium)
-{
- g_warning("No %s::get_headers implemented", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)));
- return NULL;
-}
-
-/**
- * camel_medium_get_headers:
- * @medium: a medium
- *
- * Returns an array of all header name/value pairs (as
- * CamelMediumHeader structures). The values will be decoded
- * to UTF-8 for any headers that are recognized by Camel. The
- * caller should not modify the returned data.
- *
- * Return value: the array of headers, which must be freed with
- * camel_medium_free_headers().
- **/
-GArray *
-camel_medium_get_headers(CamelMedium *medium)
-{
- g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
-
- return CM_CLASS (medium)->get_headers (medium);
-}
-
-static void
-free_headers (CamelMedium *medium, GArray *headers)
-{
- g_warning("No %s::free_headers implemented", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)));
-}
-
-/**
- * camel_medium_free_headers:
- * @medium: a medium
- * @headers: an array of headers returned from camel_medium_get_headers()
- *
- * Frees @headers
- **/
-void
-camel_medium_free_headers (CamelMedium *medium, GArray *headers)
-{
- g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (headers != NULL);
-
- CM_CLASS (medium)->free_headers (medium, headers);
-}
-
-
-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 b4254e3be6..0000000000
--- a/camel/camel-medium.h
+++ /dev/null
@@ -1,101 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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))
-
-
-typedef struct {
- const char *name;
- const char *value;
-} CamelMediumHeader;
-
-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);
-
- GArray * (*get_headers) (CamelMedium *medium);
- void (*free_headers) (CamelMedium *medium, GArray *headers);
-
- 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);
-
-GArray *camel_medium_get_headers (CamelMedium *medium);
-void camel_medium_free_headers (CamelMedium *medium, GArray *headers);
-
-/* 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 056110695c..0000000000
--- a/camel/camel-mime-filter-basic.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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+3, FALSE);
- newlen = base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len+3);
- 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 f466f3a488..0000000000
--- a/camel/camel-mime-filter-basic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 eccd5111a8..0000000000
--- a/camel/camel-mime-filter-bestenc.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 eb18d9e09f..0000000000
--- a/camel/camel-mime-filter-bestenc.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 4e59478683..0000000000
--- a/camel/camel-mime-filter-charset.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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"
-#include "camel-charset-map.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 ()));
-
- from_charset = camel_charset_to_iconv (from_charset);
- to_charset = camel_charset_to_iconv (to_charset);
-
- 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 ce8b967d3b..0000000000
--- a/camel/camel-mime-filter-charset.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 <iconv.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;
-
- 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 6977b04878..0000000000
--- a/camel/camel-mime-filter-crlf.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.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') {
- crlf->saw_lf = TRUE;
- *q++ = '\r';
- } else {
- if (do_dots && *p == '.' && crlf->saw_lf)
- *q++ = '.';
-
- crlf->saw_lf = FALSE;
- }
-
- *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) {
- crlf->saw_cr = FALSE;
-
- if (*p == '\n') {
- crlf->saw_lf = TRUE;
- *q++ = *p++;
- continue;
- } else
- *q++ = '\r';
- }
-
- *q++ = *p;
- }
-
- if (do_dots && *p == '.') {
- if (crlf->saw_lf) {
- crlf->saw_dot = TRUE;
- crlf->saw_lf = FALSE;
- p++;
- } else if (crlf->saw_dot) {
- crlf->saw_dot = FALSE;
- }
- }
-
- crlf->saw_lf = FALSE;
-
- 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;
- crlf->saw_lf = TRUE;
- crlf->saw_dot = 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;
- crlf->saw_lf = TRUE;
- crlf->saw_dot = 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 7b19f914bc..0000000000
--- a/camel/camel-mime-filter-crlf.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.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_lf;
- 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 0cd7462e24..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 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <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 e271ade3fb..0000000000
--- a/camel/camel-mime-filter-from.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 311b85a652..0000000000
--- a/camel/camel-mime-filter-html.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 <stdarg.h>
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "camel-mime-filter-html.h"
-#include "camel-html-parser.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 {
- CamelHTMLParser *ctxt;
-};
-
-/* ********************************************************************** */
-
-#if 0
-
-/* well we odnt use this stuff yet */
-
-#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" },
-};
-#endif
-
-
-/* ********************************************************************** */
-
-
-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;
-
- camel_object_unref((CamelObject *)f->priv->ctxt);
- g_free(f->priv);
-}
-
-static void
-camel_mime_filter_html_init (CamelObject *o)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)o;
-
- f->priv = g_malloc0(sizeof(*f->priv));
- f->priv->ctxt = camel_html_parser_new();
-}
-
-static void
-run(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace, int last)
-{
- camel_html_parser_t state;
- char *outp;
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)mf;
-
- d(printf("converting html:\n%.*s\n", (int)len, in));
-
- /* We should generally shrink the data, but this'll do */
- camel_mime_filter_set_size(mf, len*2+256, FALSE);
- outp = mf->outbuf;
-
- camel_html_parser_set_data(f->priv->ctxt, in, len, last);
- do {
- const char *data;
- int len;
-
- state = camel_html_parser_step(f->priv->ctxt, &data, &len);
-
- switch(state) {
- case CAMEL_HTML_PARSER_DATA:
- case CAMEL_HTML_PARSER_ENT:
- memcpy(outp, data, len);
- outp += len;
- break;
- case CAMEL_HTML_PARSER_ELEMENT:
- /* FIXME: do some whitespace processing here */
- break;
- default:
- /* ignore everything else */
- break;
- }
- } while (state != CAMEL_HTML_PARSER_EOF && state != CAMEL_HTML_PARSER_EOD);
-
- *out = mf->outbuf;
- *outlenptr = outp - mf->outbuf;
- *outprespace = mf->outbuf - mf->outreal;
-
- d(printf("converted html end:\n%.*s\n", (int)*outlenptr, *out));
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
- run(mf, in, len, prespace, out, outlenptr, outprespace, TRUE);
-}
-
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
- run(mf, in, len, prespace, out, outlenptr, outprespace, FALSE);
-}
-
-static void
-reset(CamelMimeFilter *mf)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)mf;
-
- camel_object_unref((CamelObject *)f->priv->ctxt);
- f->priv->ctxt = camel_html_parser_new();
-}
-
-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 44495effca..0000000000
--- a/camel/camel-mime-filter-html.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 afecb7571a..0000000000
--- a/camel/camel-mime-filter-index.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 58e1d34b33..0000000000
--- a/camel/camel-mime-filter-index.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 95bab894fa..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 Ximian, Inc.
- *
- * Authors: Jeffrey Stedfast <fejj@ximian.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 b927bd6d40..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 Ximian Inc.
- *
- * Authors: Jeffrey Stedfast <fejj@ximian.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 3caee1ea95..0000000000
--- a/camel/camel-mime-filter-save.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 7398e9fbe7..0000000000
--- a/camel/camel-mime-filter-save.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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-stripheader.c b/camel/camel-mime-filter-stripheader.c
deleted file mode 100644
index 5c78bf459c..0000000000
--- a/camel/camel-mime-filter-stripheader.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Peter Williams <peterw@ximian.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 <string.h>
-
-#include "camel-mime-filter-stripheader.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_stripheader_init (CamelMimeFilterStripHeader *cmf)
-{
- cmf->seen_eoh = FALSE;
- cmf->in_header = FALSE;
- cmf->header = NULL;
- cmf->header_len = 0;
-}
-
-static void
-camel_mime_filter_stripheader_finalize (CamelMimeFilterStripHeader *cmf)
-{
- g_free (cmf->header);
-}
-
-static void
-camel_mime_filter_stripheader_class_init (CamelMimeFilterStripHeaderClass *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_stripheader_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterStripHeader",
- sizeof (CamelMimeFilterStripHeader),
- sizeof (CamelMimeFilterStripHeaderClass),
- (CamelObjectClassInitFunc) camel_mime_filter_stripheader_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_stripheader_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_stripheader_finalize);
- }
-
- return type;
-}
-
-static void
-filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterStripHeader *sh = (CamelMimeFilterStripHeader *)f;
- char *p, *q;
- int left;
-
- /* all done? */
- if (sh->seen_eoh) {
- *out = in;
- *outlen = len;
- *outprespace = prespace;
- return;
- }
-
- /* nope */
-
- camel_mime_filter_set_size (f, len, FALSE);
-
- p = in;
- q = f->outbuf;
-
- while (p < (in + len)) {
- if (*p == '\n') {
- left = in + len - p;
-
- /* Not enough left to do anything useful. */
- if (left < (sh->header_len + 3)) {
- camel_mime_filter_backup (f, p, left);
- break;
- }
-
- /* MIME-ese for 'end of headers'. Our work here is done, */
- if (!strncmp (p, "\n\n", 2)) {
-
- if (sh->in_header) {
- /* we've already got a \n */
- p++;
- left--;
- }
-
- sh->seen_eoh = TRUE;
- memcpy (q, p, left);
- q += left;
- break;
- }
-
- /* (Maybe) Grab this \n */
- if (!sh->in_header)
- *q++ = *p;
- p++;
-
- if (!strncmp (p, sh->header, sh->header_len) && p[sh->header_len] == ':')
- /* ok it seems we /are/ in the header */
- sh->in_header = TRUE;
- else if (!isspace ((int)(*p)))
- /* if we were in a header and we are on a space
- * in_header will remain true...*/
- sh->in_header = FALSE;
-
- }
-
- /* ok then */
- if (!sh->in_header)
- *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)
-{
- CamelMimeFilterStripHeader *sh = (CamelMimeFilterStripHeader *)f;
-
- sh->seen_eoh = FALSE;
- sh->in_header = FALSE;
-}
-
-CamelMimeFilter *
-camel_mime_filter_stripheader_new (const gchar *header)
-{
- CamelMimeFilterStripHeader *sh = CAMEL_MIME_FILTER_STRIPHEADER(camel_object_new (CAMEL_MIME_FILTER_STRIPHEADER_TYPE));
-
- sh->header = g_strdup (header);
- sh->header_len = strlen (header);
-
- return (CamelMimeFilter *)sh;
-}
diff --git a/camel/camel-mime-filter-stripheader.h b/camel/camel-mime-filter-stripheader.h
deleted file mode 100644
index 1a22dece2d..0000000000
--- a/camel/camel-mime-filter-stripheader.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Peter Williams <peterw@ximian.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_STRIPHEADER_H
-#define _CAMEL_MIME_FILTER_STRIPHEADER_H
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_STRIPHEADER_TYPE (camel_mime_filter_stripheader_get_type ())
-#define CAMEL_MIME_FILTER_STRIPHEADER(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_STRIPHEADER_TYPE, CamelMimeFilterStripHeader)
-#define CAMEL_MIME_FILTER_STRIPHEADER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_STRIPHEADER_TYPE, CamelMimeFilterStripHeaderClass)
-#define CAMEL_IS_MIME_FILTER_STRIPHEADER(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_STRIPHEADER_TYPE)
-
-typedef struct _CamelMimeFilterStripHeader CamelMimeFilterStripHeader;
-typedef struct _CamelMimeFilterStripHeaderClass CamelMimeFilterStripHeaderClass;
-
-struct _CamelMimeFilterStripHeader {
- CamelMimeFilter parent;
-
- gchar *header;
- int header_len;
- gboolean seen_eoh; /* end of headers */
- gboolean in_header;
-};
-
-struct _CamelMimeFilterStripHeaderClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_stripheader_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_stripheader_new (const gchar *header);
-
-#endif /* ! _CAMEL_MIME_FILTER_STRIPHEADER_H */
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
deleted file mode 100644
index 2887cbbd1e..0000000000
--- a/camel/camel-mime-filter.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 7b1c73b2b0..0000000000
--- a/camel/camel-mime-filter.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 53edc4f53b..0000000000
--- a/camel/camel-mime-message.c
+++ /dev/null
@@ -1,884 +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@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999, 2000 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 <stdio.h>
-#include <string.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-url.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)
-{
- CamelURL *url;
- char *uri;
-
- g_assert (mime_message);
-
- url = camel_url_new (src, NULL);
- if (url) {
- uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_medium_add_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source", uri);
- g_free (uri);
- camel_url_free (url);
- }
-}
-
-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 ((unsigned) *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;
- const char *charset;
-
- header_type = (CamelHeaderType)g_hash_table_lookup (header_name_table, header_name);
- switch (header_type) {
- case HEADER_FROM:
- if (message->from)
- camel_object_unref (CAMEL_OBJECT (message->from));
- message->from = camel_internet_address_new ();
- camel_address_decode (CAMEL_ADDRESS (message->from), header_value);
- break;
- case HEADER_REPLY_TO:
- if (message->reply_to)
- camel_object_unref (CAMEL_OBJECT (message->reply_to));
- message->reply_to = camel_internet_address_new ();
- camel_address_decode (CAMEL_ADDRESS (message->reply_to), header_value);
- break;
- case HEADER_SUBJECT:
- g_free (message->subject);
- if (((CamelMimePart *)message)->content_type)
- charset = camel_charset_to_iconv(header_content_type_param(((CamelMimePart *)message)->content_type, "charset"));
- else
- charset = NULL;
- message->subject = g_strstrip (header_decode_string (header_value, charset));
- 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 ? charsetin : "(null)"));
-
- /* 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);
-}
-
-
-struct _check_content_id {
- CamelMimePart *part;
- const char *content_id;
-};
-
-static gboolean
-check_content_id (CamelMimeMessage *message, CamelMimePart *part, void *data)
-{
- struct _check_content_id *check = (struct _check_content_id *) data;
- const char *content_id;
- gboolean found;
-
- content_id = camel_mime_part_get_content_id (part);
-
- found = content_id && !strcmp (content_id, check->content_id) ? TRUE : FALSE;
- if (found) {
- check->part = part;
- camel_object_ref (CAMEL_OBJECT (part));
- }
-
- return !found;
-}
-
-CamelMimePart *
-camel_mime_message_get_part_by_content_id (CamelMimeMessage *message, const char *id)
-{
- struct _check_content_id check;
-
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-
- if (id == NULL)
- return NULL;
-
- check.content_id = id;
- check.part = NULL;
-
- camel_mime_message_foreach_part (message, check_content_id, &check);
-
- return check.part;
-}
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
deleted file mode 100644
index 7d65dd6af3..0000000000
--- a/camel/camel-mime-message.h
+++ /dev/null
@@ -1,136 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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);
-
-CamelMimePart *camel_mime_part_get_part_by_content_id (CamelMimeMessage *message, const char *content_id);
-
-#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 c45b93fb38..0000000000
--- a/camel/camel-mime-parser.c
+++ /dev/null
@@ -1,1953 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 <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 0f637e3a90..0000000000
--- a/camel/camel-mime-parser.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 ba9bf07d5f..0000000000
--- a/camel/camel-mime-part-utils.c
+++ /dev/null
@@ -1,301 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.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-fs.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"
-#include "camel-html-parser.h"
-#include "camel-charset-map.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-/* example: <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> */
-
-static const char *
-check_html_charset(char *buffer, int length)
-{
- CamelHTMLParser *hp;
- const char *charset = NULL;
- camel_html_parser_t state;
- struct _header_content_type *ct;
-
- /* if we need to first base64/qp decode, do this here, sigh */
- hp = camel_html_parser_new();
- camel_html_parser_set_data(hp, buffer, length, TRUE);
-
- do {
- const char *data;
- int len;
- const char *val;
-
- state = camel_html_parser_step(hp, &data, &len);
-
- /* example: <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> */
-
- switch(state) {
- case CAMEL_HTML_PARSER_ELEMENT:
- val = camel_html_parser_tag(hp);
- d(printf("Got tag: %s\n", val));
- if (g_strcasecmp(val, "meta") == 0
- && (val = camel_html_parser_attr(hp, "http-equiv"))
- && g_strcasecmp(val, "content-type") == 0
- && (val = camel_html_parser_attr(hp, "content"))
- && (ct = header_content_type_decode(val))) {
- charset = header_content_type_param(ct, "charset");
- charset = camel_charset_to_iconv (charset);
- header_content_type_unref(ct);
- }
- break;
- default:
- /* ignore everything else */
- break;
- }
- } while (charset == NULL && state != CAMEL_HTML_PARSER_EOF);
-
- camel_object_unref((CamelObject *)hp);
-
- return charset;
-}
-
-static GByteArray *convert_buffer(GByteArray *in, const char *to, const char *from)
-{
- iconv_t ic;
- int inlen, outlen, i=2;
- char *inbuf, *outbuf;
- char *buffer;
- GByteArray *out = NULL;
-
- d(printf("converting buffer from %s to %s: '%.*s'\n", from, to, (int)in->len, in->data));
-
- ic = iconv_open(to, from);
- if (ic == (iconv_t) -1) {
- g_warning("Cannot convert from '%s' to '%s': %s", from, to, strerror(errno));
- return NULL;
- }
-
- do {
- /* make plenty of space? */
- outlen = in->len * i + 16;
- buffer = g_malloc(outlen);
-
- inbuf = in->data;
- inlen = in->len;
- outbuf = buffer;
-
- if (iconv(ic, (const char **)&inbuf, &inlen, &outbuf, &outlen) == -1) {
- g_free(buffer);
- g_warning("conversion failed: %s", strerror(errno));
- /* we didn't have enough space */
- if (errno == E2BIG && i<6) {
- i++;
- continue;
- }
- break;
- }
-
- out = g_byte_array_new();
- g_byte_array_append(out, buffer, (in->len*i+16) - outlen);
-
- /* close off the conversion */
- outbuf = buffer;
- outlen = in->len * i + 16;
- if (iconv(ic, NULL, 0, &outbuf, &outlen) != -1)
- g_byte_array_append(out, buffer, (in->len*i+16) - outlen);
- g_free(buffer);
-
- d(printf("converted: '%.*s'\n", (int)out->len, out->data));
-
- break;
- } while (1);
-
- iconv_close(ic);
-
- return out;
-}
-
-/* simple data wrapper */
-static void
-simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser *mp)
-{
- CamelMimeFilter *fdec = NULL, *fcrlf = NULL;
- int len, decid = -1, crlfid = -1;
- struct _header_content_type *ct;
- GByteArray *buffer;
- char *encoding, *buf;
- const char *charset = NULL;
- CamelMimeFilterBasicType enctype = 0;
- CamelStream *mem;
-
- d(printf("constructing data-wrapper\n"));
-
- /* 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"));
- enctype = CAMEL_MIME_FILTER_BASIC_BASE64_DEC;
- } else if (!strcasecmp(encoding, "quoted-printable")) {
- d(printf("Adding quoted-printable decoder ...\n"));
- enctype = CAMEL_MIME_FILTER_BASIC_QP_DEC;
- }
- g_free (encoding);
-
- if (enctype != 0) {
- fdec = (CamelMimeFilter *)camel_mime_filter_basic_new_type(enctype);
- decid = camel_mime_parser_filter_add (mp, fdec);
- }
- }
-
- /* 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", "*")) {
- charset = header_content_type_param(ct, "charset");
- charset = camel_charset_to_iconv (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);
- }
- }
-
- /* read in the entire content */
- buffer = g_byte_array_new();
- while (camel_mime_parser_step(mp, &buf, &len) != HSCAN_BODY_END) {
- d(printf("appending o/p data: %d: %.*s\n", len, len, buf));
- g_byte_array_append(buffer, buf, len);
- }
-
- /* Possible Lame Mailer Alert... check the META tags for a charset */
- if (!charset && header_content_type_is (ct, "text", "html"))
- charset = check_html_charset(buffer->data, buffer->len);
-
- /* if we need to do charset conversion, see if we can/it works/etc */
- if (charset && !(strcasecmp(charset, "us-ascii") == 0
- || strcasecmp(charset, "utf-8") == 0
- || strncasecmp(charset, "x-", 2) == 0)) {
- GByteArray *out;
-
- out = convert_buffer(buffer, "UTF-8", charset);
- if (out) {
- /* converted ok, use this data instead */
- g_byte_array_free(buffer, TRUE);
- buffer = out;
- } else {
- g_warning("Storing text as raw, unknown charset '%s' or invalid format", charset);
- /* else failed to convert, leave as raw? */
- dw->rawtext = TRUE;
- /* should we change the content-type header? */
- }
- }
-
- d(printf("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);
-
- camel_mime_parser_filter_remove(mp, decid);
- camel_mime_parser_filter_remove(mp, crlfid);
-
- if (fdec)
- camel_object_unref((CamelObject *)fdec);
- if (fcrlf)
- camel_object_unref((CamelObject *)fcrlf);
-}
-
-/* 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: {
- struct _header_content_type *content_type;
- CamelDataWrapper *bodypart;
-
- /* FIXME: we should use a came-mime-mutlipart, not jsut a camel-multipart, but who cares */
- d(printf("Creating multi-part\n"));
- content = (CamelDataWrapper *)camel_multipart_new ();
-
- content_type = camel_mime_parser_content_type (mp);
- camel_multipart_set_boundary ((CamelMultipart *)content,
- header_content_type_param (content_type, "boundary"));
-
- 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) {
- /* 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 a5b21dab53..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 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_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 5e6d6b3b09..0000000000
--- a/camel/camel-mime-part.c
+++ /dev/null
@@ -1,823 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 <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 "camel-charset-map.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_LOCATION,
- 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 GArray *get_headers (CamelMedium *medium);
-static void free_headers (CamelMedium *medium, GArray *headers);
-
-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-Location", (gpointer)HEADER_CONTENT_LOCATION);
- 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, "Reply-To", (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->get_headers = get_headers;
- camel_medium_class->free_headers = free_headers;
- 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_location = 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);
- g_free (mime_part->content_location);
- 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;
- const char *charset;
- 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 */
- g_free (mime_part->description);
- if (mime_part->content_type)
- charset = camel_charset_to_iconv(header_content_type_param(mime_part->content_type, "charset"));
- else
- charset = NULL;
- mime_part->description = g_strstrip (header_decode_string (header_value, charset));
- break;
- case HEADER_DISPOSITION:
- set_disposition (mime_part, header_value);
- break;
- case HEADER_CONTENT_ID:
- g_free (mime_part->content_id);
- mime_part->content_id = header_msgid_decode (header_value);
- 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_LOCATION:
- g_free (mime_part->content_location);
- mime_part->content_location = header_location_decode (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);
-}
-
-static GArray *
-get_headers (CamelMedium *medium)
-{
- CamelMimePart *part = (CamelMimePart *)medium;
- GArray *headers;
- CamelMediumHeader header;
- struct _header_raw *h;
-
- headers = g_array_new (FALSE, FALSE, sizeof (CamelMediumHeader));
- for (h = part->headers; h; h = h->next) {
- header.name = h->name;
- header.value = h->value;
- g_array_append_val (headers, header);
- }
-
- return headers;
-}
-
-static void
-free_headers (CamelMedium *medium, GArray *gheaders)
-{
- CamelMediumHeader *headers = (CamelMediumHeader *)gheaders->data;
- int i;
-
- for (i = 0; i < gheaders->len; i++)
- g_free ((gpointer)headers[i].value);
- g_array_free (gheaders, TRUE);
-}
-
-/* **** 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)
-{
- char *cid, *id;
-
- if (contentid)
- id = g_strstrip (g_strdup (contentid));
- else
- id = header_msgid_generate ();
-
- cid = g_strdup_printf ("<%s>", id);
- g_free (id);
- camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-ID", cid);
- g_free (cid);
-}
-
-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-MD5: */
-
-void
-camel_mime_part_set_content_location (CamelMimePart *mime_part, const char *location)
-{
- camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-Location", location);
-}
-
-const gchar *
-camel_mime_part_get_content_location (CamelMimePart *mime_part)
-{
- return mime_part->content_location;
-}
-
-/* **** 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 (!data_wrapper->rawtext && header_content_type_is(mp->content_type, "text", "*")) {
- charset = header_content_type_param(mp->content_type, "charset");
- if (charset && !(!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;
- const char *content;
- 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);
-
- /* if content-type exists, process it first, set for fallback charset in headers */
- content = header_raw_find(&headers, "content-type", NULL);
- if (content)
- process_header((CamelMedium *)dw, "content-type", content);
-
- 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 4bbcddaf15..0000000000
--- a/camel/camel-mime-part.h
+++ /dev/null
@@ -1,133 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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;
-
- CamelContentType *content_type;
- struct _header_raw *headers; /* mime headers */
-
- /* All fields here are -** PRIVATE **- */
- char *description;
- CamelMimeDisposition *disposition;
- char *content_id;
- char *content_MD5;
- char *content_location;
- GList *content_languages;
- CamelMimePartEncodingType encoding;
-};
-
-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_content_location (CamelMimePart *mime_part, const char *);
-const gchar *camel_mime_part_get_content_location (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 3498a9fd74..0000000000
--- a/camel/camel-mime-utils.c
+++ /dev/null
@@ -1,4044 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.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 <iconv.h>
-
-#include <time.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <regex.h>
-
-#include <glib.h>
-#include <gal/unicode/gunicode.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.. `gnome-config --cflags --libs gal` -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;
- const char *inbuf;
- const char *charset;
- 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);
- memcpy (encname, in + 2, tmplen);
- encname[tmplen] = '\0';
-
- charset = camel_charset_to_iconv (encname);
-
- inbuf = decword;
-
- outlen = inlen * 6 + 16;
- outbase = alloca (outlen);
- outbuf = outbase;
-
- /* TODO: Should this cache iconv converters? */
- ic = iconv_open ("UTF-8", charset);
- 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",
- charset, g_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;
-}
-
-static int
-append_8bit (GString *out, const char *inbuf, int inlen, const char *charset)
-{
- char *outbase, *outbuf;
- int outlen;
- iconv_t ic;
-
- ic = iconv_open ("UTF-8", charset);
- if (ic == (iconv_t) -1)
- return FALSE;
-
- outlen = inlen * 6 + 16;
- outbuf = outbase = g_malloc(outlen);
-
- if (iconv(ic, &inbuf, &inlen, &outbuf, &outlen) == -1) {
- w(g_warning("Conversion to '%s' failed: %s", charset, strerror(errno)));
- g_free(outbase);
- return FALSE;
- }
-
- *outbuf = 0;
- g_string_append(out, outbase);
- g_free(outbase);
- iconv_close(ic);
-
- return TRUE;
-
-}
-
-/* decodes a simple text, rfc822 + rfc2047 */
-static char *
-header_decode_text (const char *in, int inlen, const char *default_charset)
-{
- GString *out;
- const char *inptr, *inend, *start, *locale_charset;
- char *dword = NULL;
-
- locale_charset = camel_charset_locale_name();
-
- out = g_string_new("");
- inptr = in;
- inend = inptr + inlen;
-
- while (inptr < inend) {
- start = inptr;
- while (inptr < inend && is_lwsp(*inptr))
- inptr++;
-
- if (inptr == inend) {
- g_string_append_len(out, start, inptr-start);
- break;
- } else if (dword == NULL)
- g_string_append_len(out, start, inptr-start);
-
- start = inptr;
- while (inptr < inend && !is_lwsp(*inptr))
- inptr++;
-
- dword = rfc2047_decode_word(start, inptr-start);
- if (dword) {
- g_string_append(out, dword);
- g_free(dword);
- } else if ((default_charset == NULL
- || !append_8bit(out, start, inptr-start, default_charset))
- && (locale_charset == NULL
- || !append_8bit(out, start, inptr-start, locale_charset))) {
- append_latin1(out, start, inptr-start);
- }
- }
-
- dword = out->str;
- g_string_free (out, FALSE);
-
- return dword;
-}
-
-char *
-header_decode_string (const char *in, const char *default_charset)
-{
- if (in == NULL)
- return NULL;
- return header_decode_text (in, strlen (in), default_charset);
-}
-
-/* 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;
- const 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 = 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;
-
- if (enclen) {
- /* 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;
-
- g_return_val_if_fail (g_utf8_validate (in, -1, NULL), NULL);
-
- 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) {
- gunichar c;
- const char *newinptr;
-
- newinptr = g_utf8_next_char (inptr);
- c = g_utf8_get_char (inptr);
- if (newinptr == NULL || !g_unichar_validate (c)) {
- w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
- (inptr-in), inptr[0], in));
- inptr++;
- continue;
- }
-
-
- if (g_unichar_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 (!g_unichar_isspace (c)) {
- last_was_space = FALSE;
- }
-
- if (!g_unichar_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;
-};
-
-static gboolean
-word_types_compatable (enum _phrase_word_t type1, enum _phrase_word_t type2)
-{
- switch (type1) {
- case WORD_ATOM:
- return type2 == WORD_QSTRING;
- case WORD_QSTRING:
- return type2 != WORD_2047;
- case WORD_2047:
- return type2 == WORD_2047;
- default:
- return FALSE;
- }
-}
-
-/* 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) {
- gunichar c;
- const char *newinptr;
-
- newinptr = g_utf8_next_char (inptr);
- c = g_utf8_get_char (inptr);
-
- if (!g_unichar_validate (c)) {
- w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
- (inptr - in), inptr[0], in));
- inptr++;
- continue;
- }
-
- inptr = newinptr;
- if (g_unichar_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 gboolean
-header_encode_phrase_merge_words (GList **wordsp)
-{
- GList *wordl, *nextl, *words = *wordsp;
- struct _phrase_word *word, *next;
- gboolean merged = FALSE;
-
- /* scan the list, checking for words of similar types that can be merged */
- wordl = words;
- while (wordl) {
- word = wordl->data;
- 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_types_compatable (word->type, next->type)) {
- if (next->end - word->start < CAMEL_FOLD_PREENCODED) {
- /* the resulting word type is the MAX of the 2 types */
- word->type = MAX(word->type, next->type);
-
- word->end = next->end;
- words = g_list_remove_link (words, nextl);
- g_free (next);
- nextl = g_list_next (wordl);
-
- merged = TRUE;
- } 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;
-
- return merged;
-}
-
-/* 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;
-
- while (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;
-}
-
-#define HEXVAL(c) (isdigit (c) ? (c) - '0' : tolower (c) - 'a' + 10)
-
-static char *
-hex_decode (const char *in, int len)
-{
- const guchar *inend = (const guchar *) in + len;
- guchar *inptr, *outptr;
- char *outbuf;
-
- outptr = outbuf = g_malloc (len);
-
- inptr = (guchar *) in;
- while (inptr < inend) {
- if (*inptr == '%') {
- if (isxdigit (inptr[1]) && isxdigit (inptr[2])) {
- *outptr++ = HEXVAL (inptr[1]) * 16 + HEXVAL (inptr[2]);
- inptr += 3;
- } else
- *outptr++ = *inptr++;
- } else
- *outptr++ = *inptr++;
- }
-
- *outptr = '\0';
-
- return outbuf;
-}
-
-/* an rfc2184 encoded string looks something like:
- * us-ascii'en'This%20is%20even%20more%20
- */
-
-static char *
-rfc2184_decode (const char *in, int len)
-{
- const char *inptr = in;
- const char *inend = in + len;
- const char *charset;
- char *decoded = NULL;
- char *encoding;
-
- inptr = memchr (inptr, '\'', len);
- if (!inptr)
- return NULL;
-
- encoding = g_strndup (in, inptr - in);
- charset = camel_charset_to_iconv (encoding);
- g_free (encoding);
-
- inptr = memchr (inptr + 1, '\'', inend - inptr - 1);
- if (!inptr)
- return NULL;
-
- inptr++;
- if (inptr < inend) {
- char *decword, *outbase, *outbuf;
- const char *inbuf;
- int inlen, outlen;
- iconv_t ic;
-
- inbuf = decword = hex_decode (inptr, inend - inptr);
- inlen = strlen (inbuf);
-
- ic = iconv_open ("UTF-8", charset);
- if (ic != (iconv_t) -1) {
- int ret;
-
- outlen = inlen * 6 + 16;
- outbuf = outbase = g_malloc (outlen);
-
- ret = iconv (ic, &inbuf, &inlen, &outbuf, &outlen);
- if (ret >= 0) {
- iconv (ic, NULL, 0, &outbuf, &outlen);
- *outbuf = '\0';
- g_free (decoded);
- decoded = outbase;
- }
-
- iconv_close (ic);
- } else {
- decoded = decword;
- }
- }
-
- return decoded;
-}
-
-/* This function is basically the same as decode_token()
- * except that it will not accept *'s which have a special
- * meaning for rfc2184 params */
-static char *
-decode_param_token (const char **in)
-{
- const char *inptr = *in;
- const char *start;
-
- header_decode_lwsp (&inptr);
- start = inptr;
- while (is_ttoken (*inptr) && *inptr != '*')
- inptr++;
- if (inptr > start) {
- *in = inptr;
- return g_strndup (start, inptr-start);
- } else {
- return NULL;
- }
-}
-
-static gboolean
-header_decode_rfc2184_param (const char **in, char **paramp, int *part, gboolean *value_is_encoded)
-{
- gboolean is_rfc2184 = FALSE;
- const char *inptr = *in;
- char *param;
-
- *value_is_encoded = FALSE;
- *part = -1;
-
- param = decode_param_token (&inptr);
- header_decode_lwsp (&inptr);
-
- if (*inptr == '*') {
- is_rfc2184 = TRUE;
- inptr++;
- header_decode_lwsp (&inptr);
- if (*inptr == '=') {
- /* form := param*=value */
- if (value_is_encoded)
- *value_is_encoded = TRUE;
- } else {
- /* form := param*#=value or param*#*=value */
- *part = header_decode_int (&inptr);
- header_decode_lwsp (&inptr);
- if (*inptr == '*') {
- /* form := param*#*=value */
- if (value_is_encoded)
- *value_is_encoded = TRUE;
- inptr++;
- header_decode_lwsp (&inptr);
- }
- }
- }
-
- if (paramp)
- *paramp = param;
-
- if (param)
- *in = inptr;
-
- return is_rfc2184;
-}
-
-static int
-header_decode_param (const char **in, char **paramp, char **valuep, int *is_rfc2184_param)
-{
- gboolean is_rfc2184_encoded = FALSE;
- gboolean is_rfc2184 = FALSE;
- const char *inptr = *in;
- char *param, *value = NULL;
- int rfc2184_part = -1;
-
- *is_rfc2184_param = FALSE;
-
- is_rfc2184 = header_decode_rfc2184_param (&inptr, &param, &rfc2184_part,
- &is_rfc2184_encoded);
-
- if (*inptr == '=') {
- inptr++;
- value = header_decode_value (&inptr);
- if (is_rfc2184) {
- /* We have ourselves an rfc2184 parameter */
-
- if (rfc2184_part == -1) {
- /* rfc2184 allows the value to be broken into
- * multiple parts - this isn't one of them so
- * it is safe to decode it.
- */
- char *val;
-
- val = rfc2184_decode (value, strlen (value));
- if (val) {
- g_free (value);
- value = val;
- }
- } else {
- /* Since we are expecting to find the rest of
- * this paramter value later, let our caller know.
- */
- *is_rfc2184_param = TRUE;
- }
- } else if (value && !strcmp (value, "=?")) {
- /* We have a broken param value that is rfc2047 encoded.
- * Since both Outlook and Netscape/Mozilla do this, we
- * should handle this case.
- */
- char *val;
-
- val = rfc2047_decode_word (value, strlen (value));
- if (val) {
- g_free (value);
- value = val;
- }
- }
- }
-
- if (value && !g_utf8_validate (value, -1, NULL)) {
- /* The (broken) mailer sent us an unencoded 8bit value
- * attempt to save it by assuming it's in the user's
- * locale and converting to utf8 */
- char *outbase, *outbuf, *p;
- const char *charset, *inbuf;
- int inlen, outlen;
- iconv_t ic;
-
- inbuf = value;
- inlen = strlen (inbuf);
-
- charset = camel_charset_locale_name ();
- ic = iconv_open ("UTF-8", charset ? charset : "ISO-8859-1");
- if (ic != (iconv_t) -1) {
- int ret;
-
- outlen = inlen * 6 + 16;
- outbuf = outbase = g_malloc (outlen);
-
- ret = iconv (ic, &inbuf, &inlen, &outbuf, &outlen);
- if (ret >= 0) {
- iconv (ic, NULL, 0, &outbuf, &outlen);
- *outbuf = '\0';
- }
-
- iconv_close (ic);
-
- g_free (value);
- value = outbase;
- } else {
- /* Okay, so now what? I guess we convert invalid chars to _'s? */
- for (p = value; *p; p++)
- if (!isascii ((unsigned) *p))
- *p = '_';
- }
- }
-
- 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->name);
- 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, NULL);
- 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, ' ');
- }
- } else {
- /* Fix for stupidly-broken-mailers that like to put '.''s in names unquoted */
- /* see bug #8147 */
- if (*inptr && *inptr != '<') {
- g_warning("Working around stupid mailer bug #5: unescaped characters in names");
- name = g_string_append_c(name, *inptr++);
- pre = header_decode_word(&inptr);
- }
- }
- g_free(last);
- }
- header_decode_lwsp(&inptr);
- if (*inptr == '<') {
- closeme = TRUE;
- try_address_again:
- 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 {
- /* If we get a <, the address was probably a name part, lets try again shall we? */
- /* Another fix for seriously-broken-mailers */
- if (name == NULL && *inptr == '<') {
- name = addr;
- addr = g_string_new("");
- closeme = TRUE;
- goto try_address_again;
- }
- 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, NULL);
- 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;
- gboolean last_was_rfc2184 = FALSE;
- gboolean is_rfc2184 = FALSE;
-
- header_decode_lwsp (&inptr);
-
- while (*inptr == ';') {
- struct _header_param *param;
- char *name, *value;
-
- inptr++;
- /* invalid format? */
- if (header_decode_param (&inptr, &name, &value, &is_rfc2184) != 0)
- break;
-
- if (is_rfc2184 && tail && !strcasecmp (name, tail->name)) {
- /* rfc2184 allows a parameter to be broken into multiple parts
- * and it looks like we've found one. Append this value to the
- * last value.
- */
- GString *gvalue;
-
- gvalue = g_string_new (tail->value);
- g_string_append (gvalue, value);
- g_free (tail->value);
- g_free (value);
- g_free (name);
-
- tail->value = gvalue->str;
- g_string_free (gvalue, FALSE);
- } else {
- if (last_was_rfc2184) {
- /* We've finished gathering the values for the last param
- * so it is now safe to decode it.
- */
- char *val;
-
- val = rfc2184_decode (tail->value, strlen (tail->value));
- if (val) {
- g_free (tail->value);
- tail->value = val;
- }
- }
-
- param = g_malloc (sizeof (struct _header_param));
- param->name = name;
- param->value = value;
- param->next = NULL;
- if (head == NULL)
- head = param;
- if (tail)
- tail->next = param;
- tail = param;
- }
-
- last_was_rfc2184 = is_rfc2184;
-
- header_decode_lwsp (&inptr);
- }
-
- if (last_was_rfc2184) {
- /* We've finished gathering the values for the last param
- * so it is now safe to decode it.
- */
- char *val;
-
- val = rfc2184_decode (tail->value, strlen (tail->value));
- if (val) {
- g_free (tail->value);
- tail->value = val;
- }
- }
-
- *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);
-}
-
-/* FIXME: I wrote this in a quick & dirty fasion - it may not be 100% correct */
-static char *
-header_encode_param (const unsigned char *in, gboolean *encoded)
-{
- const unsigned char *inptr = in;
- char *outstr, *charset;
- int encoding;
- GString *out;
-
- *encoded = FALSE;
-
- g_return_val_if_fail (in != NULL, NULL);
- g_return_val_if_fail (g_utf8_validate (in, -1, NULL), NULL);
-
- /* do a quick us-ascii check (the common case?) */
- while (*inptr) {
- if (*inptr > 127)
- break;
- inptr++;
- }
-
- if (*inptr == '\0')
- return g_strdup (in);
-
- out = g_string_new ("");
- inptr = in;
- encoding = 0;
- while (inptr && *inptr) {
- gunichar c;
- const char *newinptr;
-
- newinptr = g_utf8_next_char (inptr);
- c = g_utf8_get_char (inptr);
- if (newinptr == NULL || !g_unichar_validate (c)) {
- w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
- (inptr-in), inptr[0], in));
- inptr++;
- continue;
- }
-
- if (c > 127 && c < 256) {
- encoding = MAX (encoding, 1);
- g_string_sprintfa (out, "%%%c%c", tohex[(c >> 4) & 0xf], tohex[c & 0xf]);
- } else if (c >= 256) {
- encoding = MAX (encoding, 2);
- g_string_sprintfa (out, "%%%c%c", tohex[(c >> 4) & 0xf], tohex[c & 0xf]);
- } else if (is_lwsp (c) || camel_mime_special_table[c] & IS_ESAFE) {
- g_string_sprintfa (out, "%%%c%c", tohex[(c >> 4) & 0xf], tohex[c & 0xf]);
- } else {
- g_string_append_c (out, c);
- }
-
- inptr = newinptr;
- }
-
- switch (encoding) {
- default:
- g_string_prepend (out, "iso-8859-1''");
- break;
- case 2:
- charset = g_strdup_printf ("%s''", camel_charset_best (in, inptr - in));
- g_string_prepend (out, charset);
- g_free (charset);
- break;
- }
-
- outstr = out->str;
- g_string_free (out, FALSE);
- *encoded = TRUE;
-
- return outstr;
-}
-
-void
-header_param_list_format_append (GString *out, struct _header_param *p)
-{
- int used = out->len;
-
- while (p) {
- gboolean encoded = FALSE;
- gboolean quote = FALSE;
- int here = out->len;
- int nlen, vlen;
- char *value;
-
- if (!p->value) {
- p = p->next;
- continue;
- }
-
- value = header_encode_param (p->value, &encoded);
- if (!value) {
- g_warning ("appending parameter %s=%s violates rfc2184", p->name, p->value);
- value = g_strdup (p->value);
- }
-
- if (!encoded) {
- char *ch;
-
- for (ch = value; *ch; ch++) {
- if (is_tspecial (*ch) || is_lwsp (*ch))
- break;
- }
-
- quote = ch && *ch;
- }
-
- nlen = strlen (p->name);
- vlen = strlen (value);
-
- if (used + nlen + vlen > CAMEL_FOLD_SIZE - 8) {
- out = g_string_append (out, ";\n\t");
- here = out->len;
- used = 0;
- } else
- out = g_string_append (out, "; ");
-
- if (nlen + vlen > CAMEL_FOLD_SIZE - 8) {
- /* we need to do special rfc2184 parameter wrapping */
- int maxlen = CAMEL_FOLD_SIZE - (nlen + 8);
- char *inptr, *inend;
- int i = 0;
-
- inptr = value;
- inend = value + vlen;
-
- while (inptr < inend) {
- char *ptr = inptr + MIN (inend - inptr, maxlen);
-
- if (encoded && ptr < inend) {
- /* be careful not to break an encoded char (ie %20) */
- char *q = ptr;
- int j = 2;
-
- for ( ; j > 0 && q > inptr && *q != '%'; j--, q--);
- if (*q == '%')
- ptr = q;
- }
-
- if (i != 0) {
- g_string_append (out, ";\n\t");
- here = out->len;
- used = 0;
- }
-
- g_string_sprintfa (out, "%s*%d%s=", p->name, i++, encoded ? "*" : "");
- if (encoded || !quote)
- g_string_append_len (out, inptr, ptr - inptr);
- else
- quote_word (out, TRUE, inptr, ptr - inptr);
-
- d(printf ("wrote: %s\n", out->str + here));
-
- used += (out->len - here);
-
- inptr = ptr;
- }
- } else {
- g_string_sprintfa (out, "%s%s=", p->name, encoded ? "*" : "");
-
- if (encoded || !quote)
- g_string_append (out, value);
- else
- quote_word (out, TRUE, value, vlen);
-
- used += (out->len - here);
- }
-
- g_free (value);
-
- 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;
-}
-
-char *
-header_location_decode(const char *in)
-{
- const char *p;
-
- /* Sigh. RFC2557 says:
- * content-location = "Content-Location:" [CFWS] URI [CFWS]
- * where URI is restricted to the syntax for URLs as
- * defined in Uniform Resource Locators [URL] until
- * IETF specifies other kinds of URIs.
- *
- * But Netscape puts quotes around the URI when sending web
- * pages.
- */
-
- header_decode_lwsp(&in);
- if (*in == '"')
- return header_decode_quoted_string(&in);
- else {
- for (p = in; *p && !is_lwsp(*p); p++)
- ;
- return g_strndup(in, p - in);
- }
-}
-
-
-/* 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-([^@]+)" },
- { "Sender", " *([^@]+)-owner" },
- { "Return-Path", " *owner-([^@]+)" },
- { "X-BeenThere", " *([^@]+)" },
- { "Delivered-To", " *mailing list ([^@]+)" },
- { "X-Mailing-List", " *([^@]+)" },
- { "X-Loop", " *([^@]+)" },
- { "List-Id", " *([^<]+)" },
- { "List-Post", " *<mailto:([^@]+)" },
- { "Mailing-List", " *list ([^@]+)" },
- { "Originator", " *([^@]+)" },
-};
-
-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);
- regfree (&pattern);
-
- 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) {
- const char *mlist, *mlend;
-
- regfree (&pattern);
- mlist = v + match[1].rm_so;
- mlend = v + match[1].rm_eo;
- if (*mlist == '<')
- mlist++;
-
- return g_strndup (mlist, mlend - mlist);
- }
- 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;
-}
-
-char *
-header_address_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;
- }
-
- 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;
-}
-
-/* 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 = "Draen Kaar";
- 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 Koczko";
- 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 899fffbae5..0000000000
--- a/camel/camel-mime-utils.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.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_address_fold (const char *in, int headerlen);
-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, const char *default_charset);
-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 content-location */
-char *header_location_decode(const char *in);
-
-/* decode the mime-type header */
-void header_mime_decode(const char *in, int *maj, int *min);
-
-/* do incremental base64/quoted-printable (de/en)coding */
-int base64_decode_step(unsigned char *in, int len, unsigned char *out, int *state, unsigned int *save);
-
-int base64_encode_step(unsigned char *in, int len, 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 35918105aa..0000000000
--- a/camel/camel-movemail.c
+++ /dev/null
@@ -1,544 +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@ximian.com>
- *
- * Copyright 2000 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 <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"
-
-#include "camel-lock-client.h"
-
-#define d(x)
-
-#ifdef MOVEMAIL_PATH
-#include <sys/wait.h>
-
-static void movemail_external (const char *source, const char *dest,
- CamelException *ex);
-#endif
-
-#ifdef HAVE_BROKEN_SPOOL
-static int camel_movemail_copy_filter(int fromfd, int tofd, off_t start, size_t bytes, CamelMimeFilter *filter);
-static int camel_movemail_solaris (int oldsfd, int dfd, CamelException *ex);
-#else
-/* these could probably be exposed as a utility? (but only mbox needs it) */
-static int camel_movemail_copy_file(int sfd, int dfd, CamelException *ex);
-#endif
-
-#if 0
-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).
- *
- * Return Value: Returns -1 on error.
- **/
-int
-camel_movemail(const char *source, const char *dest, CamelException *ex)
-{
- int lockid = -1;
- int res = -1;
- int sfd, dfd;
- struct stat st;
-
- 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,
- strerror (errno));
- }
- return -1;
- }
-
- if (st.st_size == 0)
- return 0;
-
- /* open files */
- sfd = open (source, O_RDWR);
- if (sfd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open mail file %s: %s"),
- source, strerror (errno));
- return -1;
- }
-
- dfd = open (dest, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
- if (dfd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open temporary mail "
- "file %s: %s"), dest,
- strerror (errno));
- close (sfd);
- return -1;
- }
-
- /* lock our source mailbox */
- lockid = camel_lock_helper_lock(source, ex);
- if (lockid == -1) {
- close(sfd);
- close(dfd);
- return -1;
- }
-
-#ifdef HAVE_BROKEN_SPOOL
- res = camel_movemail_solaris(sfd, dfd, ex);
-#else
- res = camel_movemail_copy_file(sfd, dfd, ex);
-#endif
-
- /* If no errors occurred copying the data, and we successfully
- * close the destination file, then truncate the source file.
- */
- if (res != -1) {
- 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,
- strerror(errno));
- res = -1;
- }
- } else
- close (dfd);
- close (sfd);
-
- camel_lock_helper_unlock(lockid);
-
- return res;
-}
-
-#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"),
- 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"),
- 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
-
-#ifndef HAVE_BROKEN_SPOOL
-static int
-camel_movemail_copy_file(int sfd, int dfd, CamelException *ex)
-{
- int nread, nwrote;
- char buf[4096];
-
- 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"),
- strerror (errno));
- return -1;
- }
-
- 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"),
- strerror (errno));
- return -1;
- }
- written += nwrote;
- nread -= nwrote;
- }
- }
-
- return 0;
-}
-#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)
-
-#ifdef HAVE_BROKEN_SPOOL
-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;
-
- d(printf("read %d unfiltered bytes\n", towrite));
-
- /* 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;
- }
-
- d(printf("writing %d filtered bytes\n", towrite));
-
- 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 oldsfd, int dfd, CamelException *ex)
-{
- CamelMimeParser *mp;
- char *buffer;
- int len;
- int sfd;
- CamelMimeFilterFrom *ffrom;
- int ret = 1;
- char *from = NULL;
-
- /* need to dup as the mime parser will close on finish */
- sfd = dup(oldsfd);
- if (sfd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error copying mail temp file: %s"),
- strerror (errno));
- return -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) {
- g_assert(camel_mime_parser_from_line(mp));
- from = g_strdup(camel_mime_parser_from_line(mp));
- 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);
-
- if (write(dfd, from, strlen(from)) != strlen(from))
- goto fail;
-
- /* write out headers, but NOT content-length header */
- if (solaris_header_write(dfd, camel_mime_parser_headers_raw(mp)) == -1)
- goto fail;
-
- 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));
- }
- g_free(from);
- }
-
- camel_object_unref((CamelObject *)mp);
- camel_object_unref((CamelObject *)ffrom);
-
- return ret;
-
-fail:
- g_free(from);
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error copying mail temp file: %s"),
- strerror (errno));
-
-
- camel_object_unref((CamelObject *)mp);
- camel_object_unref((CamelObject *)ffrom);
-
- return -1;
-}
-#endif /* HAVE_BROKEN_SPOOL */
-
diff --git a/camel/camel-movemail.h b/camel/camel-movemail.h
deleted file mode 100644
index e66acdde18..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@ximian.com>
- *
- * Copyright 2000 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_MOVEMAIL_H
-#define CAMEL_MOVEMAIL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-exception.h>
-
-int camel_movemail (const char *source, const char *dest, CamelException *ex);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MOVEMAIL_H */
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
deleted file mode 100644
index 076ec3af76..0000000000
--- a/camel/camel-multipart.c
+++ /dev/null
@@ -1,542 +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 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 <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 gboolean is_offline (CamelDataWrapper *data_wrapper);
-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,
- const char *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;
- camel_data_wrapper_class->is_offline = is_offline;
-}
-
-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, const char *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, const char *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);
-}
-
-static gboolean
-is_offline (CamelDataWrapper *data_wrapper)
-{
- CamelMultipart *multipart = CAMEL_MULTIPART (data_wrapper);
- GList *node;
- CamelDataWrapper *part;
-
- if (parent_class->is_offline (data_wrapper))
- return TRUE;
- for (node = multipart->parts; node; node = node->next) {
- part = node->data;
- if (camel_data_wrapper_is_offline (part))
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* 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 a96a01f6ef..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 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_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, const char *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,
- const char *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 ba8752f514..0000000000
--- a/camel/camel-news-address.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 b0aad4ac96..0000000000
--- a/camel/camel-news-address.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 fde35f3be1..0000000000
--- a/camel/camel-object.c
+++ /dev/null
@@ -1,1159 +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@ximian.com>
- *
- * Copyright 2000 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 <string.h>
-#include "camel-object.h"
-
-/* FIXME: Make the code so this isn't necessary, its just the hook locking thats the problem */
-#ifndef ENABLE_THREADS
-#error "Threads must be enabled to compile this version of camel"
-#endif
-
-#include <pthread.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;
-
-/* A 'locked' hooklist, that is only allocated on demand */
-typedef struct _CamelHookList {
- pthread_mutex_t lock;
-
- struct _CamelHookPair *list;
-} CamelHookList;
-
-/* a 'hook pair', actually a hook tuple, we just store all hooked events in the same list,
- and just comapre as we go, rather than storing separate lists for each hook type
-
- the name field just points directly to the key field in the class's preplist hashtable.
- This way we can just use a direct pointer compare when scanning it, and also saves
- copying the string */
-typedef struct _CamelHookPair
-{
- struct _CamelHookPair *next; /* next MUST be the first member */
-
- const char *name; /* points to the key field in the classes preplist, static memory */
- CamelObjectEventHookFunc func;
- void *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);
-
-static void camel_object_free_hooks(CamelObject *o);
-
-/* ************************************************************************ */
-
-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->hooks = NULL;
- obj->in_event = 0;
- obj->destroying = 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;
-
- camel_object_free_hooks(obj);
-}
-
-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) {
- /* FIXME: This leaks the preplist slist entries */
- 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);
- memset (instance, 0, type_info->instance_size);
- } 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);
-
- /* If the object already had its last unref, do not begin the
- * destruction process again. This can happen if, for example,
- * the object sends an event in its finalize handler (vfolders
- * do this).
- */
-
- if (obj->destroying)
- return;
-
- obj->destroying = 1;
-
- /* Send the finalize event */
-
- camel_object_trigger_event (obj, "finalize", NULL);
-
- /* 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));
- }
-
- /* ok, done with the type stuff, and our data pointers
- * won't go bad. */
- camel_type_lock_down ();
-
- 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);
-
- /* Sanity check */
-
- if (obj->ref_count != 0)
- g_warning ("camel_object_unref: destroyed object %s at %p somehow got"
- " referenced in destruction chain.",
- camel_type_to_name (obj->s.type),
- obj);
-
- /* 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. Fill it with gunk to help detect
- * other invalid ref's of it.
- */
-
- memset (obj, 0xEB, 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 */
-
- camel_type_lock_up ();
-
- 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);
-}
-
-/* free hook data */
-static void camel_object_free_hooks(CamelObject *o)
-{
- CamelHookPair *pair, *next;
-
- if (o->hooks) {
- pair = o->hooks->list;
- while (pair) {
- next = pair->next;
- g_free(pair);
- pair = next;
- }
- g_free(o->hooks);
- o->hooks = NULL;
- }
-}
-
-/* return (allocate if required) the object's hook list, locking at the same time */
-static CamelHookList *camel_object_get_hooks(CamelObject *o)
-{
-#ifdef ENABLE_THREADS
- static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-#endif
- CamelHookList *hooks;
-
- /* if we have it, we dont have to do any other locking,
- otherwise use a global lock to setup the object's hook data */
-#ifdef ENABLE_THREADS
- if (o->hooks == NULL) {
- pthread_mutex_lock(&lock);
-#endif
- if (o->hooks == NULL) {
- hooks = g_malloc(sizeof(*o->hooks));
-#ifdef ENABLE_THREADS
- pthread_mutex_init(&hooks->lock, NULL);
-#endif
- hooks->list = NULL;
- o->hooks = hooks;
- }
-#ifdef ENABLE_THREADS
- pthread_mutex_unlock(&lock);
- }
-#endif
-
-#ifdef ENABLE_THREADS
- pthread_mutex_lock(&o->hooks->lock);
-#endif
- return o->hooks;
-}
-
-/* unlock object hooks' list */
-#ifdef ENABLE_THREADS
-#define camel_object_unget_hooks(o) (pthread_mutex_unlock(&(CAMEL_OBJECT(o)->hooks->lock)))
-#else
-#define camel_object_unget_hooks(o)
-#endif
-
-void
-camel_object_hook_event (CamelObject * obj, const char * name,
- CamelObjectEventHookFunc func, void *data)
-{
- CamelHookPair *pair;
- const char *prepname;
- CamelObjectEventPrepFunc prep;
- CamelHookList *hooks;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name != NULL);
- g_return_if_fail (func != NULL);
-
- /* first, does this event exist? */
- if (obj->classfuncs->event_to_preplist == NULL
- || !g_hash_table_lookup_extended(obj->classfuncs->event_to_preplist, name,
- (void **)&prepname, (void **)&prep)) {
- g_warning("camel_object_hook_event: trying to hook event `%s' in class `%s' with no defined events.",
- name, camel_type_to_name (obj->s.type));
- return;
- }
-
- /* setup hook pair */
- pair = g_malloc(sizeof(*pair));
- pair->name = prepname; /* effectively static! */
- pair->func = func;
- pair->data = data;
-
- /* get the hook list object, locked, link in new event hook, unlock */
- hooks = camel_object_get_hooks(obj);
- pair->next = hooks->list;
- hooks->list = pair;
- camel_object_unget_hooks(obj);
-
-#if 0
- 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);
- }
-#endif
-}
-
-void
-camel_object_unhook_event (CamelObject * obj, const char * name,
- CamelObjectEventHookFunc func, void *data)
-{
-#if 0
- GSList *hooklist;
- GSList *head;
-#endif
- char *prepname;
- CamelObjectEventPrepFunc prep;
- CamelHookList *hooks;
- CamelHookPair *pair, *parent;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name != NULL);
- g_return_if_fail (func != NULL);
-
- if (obj->hooks == NULL) {
- g_warning("camel_object_unhook_event: trying to unhook `%s` from an instance of `%s' with no hooks",
- name, camel_type_to_name(obj->s.type));
- return;
- }
-
- /* get event name static pointer */
- if (obj->classfuncs->event_to_preplist == NULL
- || !g_hash_table_lookup_extended(obj->classfuncs->event_to_preplist, name,
- (void **)&prepname, (void **)&prep)) {
- g_warning("camel_object_hook_event: trying to hook event `%s' in class `%s' with no defined events.",
- name, camel_type_to_name (obj->s.type));
- return;
- }
-
- /* scan hooks for this event, remove it */
- hooks = camel_object_get_hooks(obj);
- parent = (CamelHookPair *)&hooks->list;
- pair = parent->next;
- while (pair) {
- if (pair->name == prepname && pair->func == func && pair->data == data) {
- parent->next = pair->next;
- g_free(pair);
- camel_object_unget_hooks(obj);
- return;
- }
- parent = pair;
- pair = pair->next;
- }
- camel_object_unget_hooks(obj);
-
- g_warning("camel_object_unhook_event: cannot find hook/data pair %p/%p in an instance of `%s' attached to `%s'",
- func, data, camel_type_to_name (obj->s.type), name);
-
-#if 0
- 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);
-#endif
-}
-
-void
-camel_object_trigger_event (CamelObject * obj, const char * name, void *event_data)
-{
- CamelHookPair *pair;
- CamelObjectEventPrepFunc prep;
- const char *prepname;
- CamelHookList *hooks;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name);
-
- /* no hooks, dont bother going anywhere */
- if (obj->hooks == NULL)
- return;
-
- /* get event name static pointer/prep func */
- if (obj->classfuncs->event_to_preplist == NULL
- || !g_hash_table_lookup_extended(obj->classfuncs->event_to_preplist, name,
- (void **)&prepname, (void **)&prep)) {
- g_warning("camel_object_hook_event: trying to hook event `%s' in class `%s' with no defined events.",
- name, camel_type_to_name (obj->s.type));
- return;
- }
-
- /* lock the object for hook emission */
- camel_object_ref(obj);
- hooks = camel_object_get_hooks(obj);
-
- if (prep == NULL_PREP_VALUE || prep(obj, event_data)) {
- pair = hooks->list;
- while (pair) {
- if (pair->name == prepname)
- (pair->func) (obj, event_data, pair->data);
-
- pair = pair->next;
- }
- }
-
- camel_object_unget_hooks(obj);
- camel_object_unref(obj);
-
-#if 0
- 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);
-#endif
-}
-
-/* ** 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 ec0416d4f4..0000000000
--- a/camel/camel-object.h
+++ /dev/null
@@ -1,147 +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@ximian.com>
- *
- * Copyright 2000 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_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;
- CamelObjectClass *classfuncs;
- struct _CamelHookList *hooks;
- guint32 ref_count:30;
- guint32 in_event:1;
- guint32 destroying:1;
-}
-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 1358cc15ab..0000000000
--- a/camel/camel-operation.c
+++ /dev/null
@@ -1,660 +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;
-#endif
-};
-
-#define CAMEL_OPERATION_CANCELLED (1<<0)
-#define CAMEL_OPERATION_TRANSIENT (1<<1)
-
-#ifdef ENABLE_THREADS
-#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_ACTIVE_LOCK()
-#define CAMEL_ACTIVE_UNLOCK()
-#endif
-
-static unsigned int stamp (void);
-
-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);
-#endif
-
- return cc;
-}
-
-/* return the registered operation, or NULL if none registered */
-/* need to unref when done with it */
-CamelOperation *camel_operation_registered(void)
-{
- CamelOperation *cc = NULL;
-
- CAMEL_ACTIVE_LOCK();
- if (operation_active != NULL
- && (cc = g_hash_table_lookup(operation_active, (void *)pthread_self()))) {
- g_assert(cc->refcount > 0);
- cc->refcount++;
- }
- CAMEL_ACTIVE_UNLOCK();
-
- 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)
-{
- g_assert(cc->refcount > 0);
-
- CAMEL_ACTIVE_LOCK();
- cc->refcount++;
- CAMEL_ACTIVE_UNLOCK();
-}
-
-/**
- * camel_operation_unref:
- * @cc:
- *
- * Unref and potentially free @cc.
- **/
-void camel_operation_unref(CamelOperation *cc)
-{
- GSList *n;
-
- g_assert(cc->refcount > 0);
-
- CAMEL_ACTIVE_LOCK();
- if (cc->refcount == 1) {
-#ifdef ENABLE_THREADS
- CamelOperationMsg *msg;
-
- while ((msg = (CamelOperationMsg *)e_msgport_get(cc->cancel_port)))
- g_free(msg);
-
- e_msgport_destroy(cc->cancel_port);
-#endif
-
- if (cc->id != (~0)) {
- g_warning("Unreffing operation status which was still registered: %p\n", cc);
- g_hash_table_remove(operation_active, (void *)cc->id);
- }
-
- 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 {
- cc->refcount--;
- }
- CAMEL_ACTIVE_UNLOCK();
-}
-
-/**
- * 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());
-
- if (cc)
- cc->blocked++;
- CAMEL_ACTIVE_UNLOCK();
-}
-
-/**
- * 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());
-
- if (cc)
- cc->blocked--;
- CAMEL_ACTIVE_UNLOCK();
-}
-
-static void
-cancel_thread(void *key, CamelOperation *cc, void *data)
-{
- CamelOperationMsg *msg;
-
- if (cc) {
- d(printf("cancelling thread %d\n", cc->id));
-
- msg = g_malloc0(sizeof(*msg));
- e_msgport_put(cc->cancel_port, (EMsg *)msg);
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- }
-}
-
-/**
- * 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;
-
- CAMEL_ACTIVE_LOCK();
-
- if (cc == NULL) {
- if (operation_active) {
- g_hash_table_foreach(operation_active, (GHFunc)cancel_thread, NULL);
- }
- } else if ((cc->flags & CAMEL_OPERATION_CANCELLED) == 0) {
- d(printf("cancelling thread %d\n", cc->id));
-
- msg = g_malloc0(sizeof(*msg));
- e_msgport_put(cc->cancel_port, (EMsg *)msg);
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- }
-
- CAMEL_ACTIVE_UNLOCK();
-}
-
-/**
- * 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);
- }
- }
-
- if (cc->id == (~0)) {
- cc->id = id;
- g_hash_table_insert(operation_active, (void *)id, cc);
- } else {
- g_warning("Re-registering thread %lu for cancellation as thread %lu", cc->id, id);
- }
-
- d(printf("registering thread %ld for cancellation\n", id));
-
- CAMEL_ACTIVE_UNLOCK();
-}
-
-/**
- * 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) {
- if (cc->id != (~0)) {
- g_hash_table_remove(operation_active, (void *)cc->id);
- cc->id = ~0;
- } else {
- g_warning("Unregistering an operation that was already unregistered");
- }
- }
-
- CAMEL_ACTIVE_UNLOCK();
-
- d({if (cc) printf("unregistering thread %d for cancellation\n", cc->id);});
-}
-
-/**
- * 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;
- int cancelled;
-
- d(printf("checking for cancel in thread %d\n", pthread_self()));
-
- CAMEL_ACTIVE_LOCK();
-
- if (cc == NULL && operation_active)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
-
- if (cc == NULL || cc->blocked > 0) {
- d(printf("ahah! cancellation is blocked\n"));
- cancelled = FALSE;
- } else if (cc->flags & CAMEL_OPERATION_CANCELLED) {
- d(printf("previously cancelled\n"));
- cancelled = TRUE;
- } else if ((msg = (CamelOperationMsg *)e_msgport_get(cc->cancel_port))) {
- d(printf("Got cancellation message\n"));
- g_free(msg);
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- cancelled = TRUE;
- } else
- cancelled = FALSE;
-
- CAMEL_ACTIVE_UNLOCK();
-
- return cancelled;
-}
-
-/**
- * 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 && 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;
-
- CAMEL_ACTIVE_LOCK();
-
- if (cc == NULL)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
-
- if (cc == NULL || cc->status == NULL) {
- CAMEL_ACTIVE_UNLOCK();
- return;
- }
-
- va_start(ap, what);
- msg = g_strdup_vprintf(what, ap);
- va_end(ap);
- 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);
-
- CAMEL_ACTIVE_UNLOCK();
-
- cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);
-
- 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;
-
- CAMEL_ACTIVE_LOCK();
-
- if (cc == NULL)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
-
- if (cc == NULL || cc->status == NULL) {
- CAMEL_ACTIVE_UNLOCK();
- return;
- }
-
- va_start(ap, what);
- msg = g_strdup_vprintf(what, ap);
- va_end(ap);
- 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));
-
- CAMEL_ACTIVE_UNLOCK();
-
- /* we dont report it yet */
- /*cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);*/
-}
-
-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;
- char *msg = NULL;
-
- if (operation_active == NULL)
- return;
-
- CAMEL_ACTIVE_LOCK();
-
- if (cc == NULL)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
-
- if (cc == NULL || cc->status == NULL || cc->status_stack == NULL) {
- CAMEL_ACTIVE_UNLOCK();
- return;
- }
-
- s = cc->status_stack->data;
- s->pc = pc;
-
- now = stamp();
- if (cc->status_update != now
- && s->flags & CAMEL_OPERATION_TRANSIENT
- && s->stamp/16 > now/16)
- cc = NULL;
- else {
- s->stamp = cc->status_update = now;
- cc->lastreport = s;
- msg = g_strdup(s->msg);
- }
-
- CAMEL_ACTIVE_UNLOCK();
-
- if (cc) {
- cc->status(cc, msg, pc, cc->status_data);
- g_free(msg);
- }
-}
-
-void camel_operation_progress_count(CamelOperation *cc, int sofar)
-{
- camel_operation_progress(cc, sofar);
-}
-
-/**
- * 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;
- char *msg = NULL;
- int pc = 0;
-
- if (operation_active == NULL)
- return;
-
- CAMEL_ACTIVE_LOCK();
-
- if (cc == NULL)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
-
- if (cc == NULL || cc->status == NULL || cc->status_stack == NULL) {
- CAMEL_ACTIVE_UNLOCK();
- 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) {
- msg = g_strdup(p->msg);
- pc = p->pc;
- cc->lastreport = p;
- break;
- }
- } else {
- msg = g_strdup(p->msg);
- pc = p->pc;
- cc->lastreport = p;
- break;
- }
- l = l->next;
- }
- }
- g_free(s->msg);
- } else {
- msg = s->msg;
- pc = CAMEL_OPERATION_END;
- cc->lastreport = s;
- }
- g_free(s);
- cc->status_stack = g_slist_remove_link(cc->status_stack, cc->status_stack);
-
- CAMEL_ACTIVE_UNLOCK();
-
- if (msg) {
- cc->status(cc, msg, pc, cc->status_data);
- g_free(msg);
- }
-}
diff --git a/camel/camel-operation.h b/camel/camel-operation.h
deleted file mode 100644
index 25bd77e408..0000000000
--- a/camel/camel-operation.h
+++ /dev/null
@@ -1,69 +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. (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);
-/* return the registered operation for this thread, if there is one */
-CamelOperation *camel_operation_registered(void);
-
-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 9a5fa74e0e..0000000000
--- a/camel/camel-pgp-context.c
+++ /dev/null
@@ -1,1369 +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 "camel-charset-map.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>
-
-#include <iconv.h>
-#include <gal/unicode/gunicode.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, CamelCipherHash hash,
- 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
- * @remember: Remember the pgp passphrase
- *
- * 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);
-
- if (type == CAMEL_PGP_TYPE_NONE || !path || !*path)
- return 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_get_password (session, prompt, TRUE,
- NULL, userid ? userid : 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_forget_password (session, NULL, userid ? userid : type, NULL);
-}
-
-static void
-pass_free (char *passphrase)
-{
- if (passphrase) {
- memset (passphrase, 0, strlen (passphrase));
- g_free (passphrase);
- }
-}
-
-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)
-{
- gboolean eof_seen, diag_eof_seen, passwd_eof_seen, input_eof_seen;
- size_t passwd_remaining, passwd_incr, input_remaining, input_incr;
- size_t size, alloc_size, diag_size, diag_alloc_size;
- int select_result, read_len, write_len;
- int ip_fds[2], op_fds[2], diag_fds[2];
- const char *passwd_next, *input_next;
- char *buf = NULL, *diag_buf = NULL;
- fd_set fdset, write_fdset;
- struct timeval timeout;
- size_t tmp_len;
- pid_t child;
-
-
- 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 -1;
- }
-
- 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 -1;
- }
-
- /* Parent */
- close (ip_fds[0]);
- close (op_fds[1]);
- close (diag_fds[1]);
- close (passwd_fds[0]);
-
- fcntl (ip_fds[1], F_SETFL, O_NONBLOCK);
- fcntl (op_fds[0], F_SETFL, O_NONBLOCK);
- fcntl (diag_fds[0], F_SETFL, O_NONBLOCK);
-
- 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,
- _("Cannot sign this message: 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_USER_CANCEL,
- _("Cannot sign this message: no password provided"));
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot sign this message: 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++] = "--no-secmem-warning";
- argv[i++] = "--no-greeting";
- 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);
- pass_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);
- pass_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,
- _("Cannot sign this message: 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_USER_CANCEL,
- _("Cannot sign this message: no password provided"));
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot sign this message: 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++] = "--no-secmem-warning";
- argv[i++] = "--no-greeting";
- 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);
- pass_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);
- pass_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, CamelCipherHash hash, 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,
- _("Cannot verify this message: no plaintext to verify"));
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot verify this message: 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,
- _("Cannot verify this message: 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++] = "--verbose";
- argv[i++] = "--no-secmem-warning";
- argv[i++] = "--no-greeting";
- argv[i++] = "--yes";
- argv[i++] = "--batch";
-
- argv[i++] = "--verify";
-
- argv[i++] = "--no-tty";
-
- if (!camel_session_is_online (ctx->session))
- argv[i++] = "--no-auto-key-retrieve";
-
- 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) {
- const char *locale;
- char *desc, *outbuf;
- size_t inlen, outlen;
- iconv_t cd;
-
- inlen = strlen (diagnostics);
- outlen = inlen * 4;
-
- desc = outbuf = g_new (unsigned char, outlen + 1);
-
- locale = camel_charset_locale_name ();
- if (!locale)
- locale = "iso-8859-1";
-
- cd = iconv_open ("UTF-8", locale);
- if (cd != (iconv_t) -1) {
- const char *inbuf;
- int ret;
-
- inbuf = diagnostics;
- ret = iconv (cd, &inbuf, &inlen, &outbuf, &outlen);
- if (ret >= 0) {
- iconv (cd, NULL, 0, &outbuf, &outlen);
- }
- iconv_close (cd);
-
- *outbuf = '\0';
- } else {
- const char *inptr, *inend;
-
- g_warning ("CamelPgpContext::pgp_verify: cannot convert from %s to UTF-8", locale);
-
- inptr = diagnostics;
- inend = inptr + inlen;
-
- while (inptr && inptr < inend && g_unichar_validate (g_utf8_get_char (inptr))) {
- *outbuf++ = g_utf8_get_char (inptr) & 0xff;
- inptr = g_utf8_next_char (inptr);
- }
-
- *outbuf = '\0';
- }
-
- 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);
- 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,
- _("Cannot encrypt this message: 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_USER_CANCEL,
- _("Cannot encrypt this message: no password provided"));
- goto exception;
- }
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot encrypt this message: 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,
- _("Cannot encrypt this message: no recipients specified"));
-
- goto exception;
- }
-
- argv = g_ptr_array_new ();
-
- switch (context->priv->type) {
- case CAMEL_PGP_TYPE_GPG:
- g_ptr_array_add (argv, "gpg");
-
- g_ptr_array_add (argv, "--verbose");
- g_ptr_array_add (argv, "--no-secmem-warning");
- g_ptr_array_add (argv, "--no-greeting");
- g_ptr_array_add (argv, "--yes");
- g_ptr_array_add (argv, "--batch");
-
- g_ptr_array_add (argv, "--armor");
-
- for (r = 0; r < recipients->len; r++) {
- g_ptr_array_add (argv, "-r");
- g_ptr_array_add (argv, recipients->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:
- g_ptr_array_add (argv, "pgpe");
-
- for (r = 0; r < recipients->len; r++) {
- g_ptr_array_add (argv, "-r");
- g_ptr_array_add (argv, recipients->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:
- 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 < recipients->len; r++)
- g_ptr_array_add (argv, recipients->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);
-
- pass_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) {
- pass_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;
-
- /* 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,
- _("Cannot decrypt this message: no ciphertext to decrypt"));
-
- goto exception;
- }
-
- passphrase = pgp_get_passphrase (ctx->session, context->priv->type, NULL);
- if (!passphrase) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Cannot decrypt this message: no password provided"));
-
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot decrypt this message: 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++] = "--no-secmem-warning";
- argv[i++] = "--no-greeting";
- argv[i++] = "--yes";
- argv[i++] = "--batch";
-
- if (!camel_session_is_online (ctx->session))
- argv[i++] = "--no-auto-key-retrieve";
-
- 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);
- pass_free (passphrase);
-
- /* gpg returns '1' if it succeedes in decrypting but can't verify the signature */
- if (retval != 0 || (context->priv->type == CAMEL_PGP_TYPE_GPG && retval == 1) || !*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);
- pass_free (passphrase);
- }
-
- return -1;
-}
diff --git a/camel/camel-pgp-context.h b/camel/camel-pgp-context.h
deleted file mode 100644
index 4cf72b6174..0000000000
--- a/camel/camel-pgp-context.h
+++ /dev/null
@@ -1,81 +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), CAMEL_CIPHER_HASH_DEFAULT, 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 fb17256528..0000000000
--- a/camel/camel-pgp-mime.c
+++ /dev/null
@@ -1,551 +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-message.h"
-#include "camel-mime-filter-from.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-fs.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define PGPMIME_DEBUG
-
-#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;
-#ifdef ENABLE_PEDANTIC_PGPMIME
- const char *param, *micalg;
-#endif
- 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;
-
-#ifdef ENABLE_PEDANTIC_PGPMIME
- /* check that we have a protocol param with the value: "application/pgp-signature" */
- 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;
-#endif /* ENABLE_PEDANTIC_PGPMIME */
-
- /* 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;
-#ifdef ENABLE_PEDANTIC_PGPMIME
- const char *param;
-#endif
- 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;
-
-#ifdef ENABLE_PEDANTIC_PGPMIME
- /* 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;
-#endif /* ENABLE_PEDANTIC_PGPMIME */
-
- /* 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);
- }
- } else {
- CamelMimePartEncodingType encoding;
-
- if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- /* restore the message parts' subparts */
- pgp_mime_part_sign_restore_part (CAMEL_MIME_PART (wrapper), encodings);
- } else {
- encoding = GPOINTER_TO_INT ((*encodings)->data);
-
- camel_mime_part_set_encoding (mime_part, encoding);
-
- *encodings = (*encodings)->next;
- }
- }
-}
-
-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;
-
- if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- /* prepare the message parts' subparts */
- pgp_mime_part_sign_prepare_part (CAMEL_MIME_PART (wrapper), encodings);
- } else {
- 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 ();
-
- 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;
- }
-
- /* get the signature */
- if (camel_pgp_sign (context, userid, hash, stream, sigstream, ex) == -1) {
- GSList *list;
-
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (sigstream));
-
- /* restore the original encoding */
- list = encodings;
- pgp_mime_part_sign_restore_part (part, &list);
- 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 */
- 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;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlf_filter;
-
- 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 ();
-
- crlf_filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlf_filter));
- camel_object_unref (CAMEL_OBJECT (crlf_filter));
-
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (part), CAMEL_STREAM (filtered_stream));
-
- camel_object_unref (CAMEL_OBJECT (filtered_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-pkcs7-context.c b/camel/camel-pkcs7-context.c
deleted file mode 100644
index 185ae09ccc..0000000000
--- a/camel/camel-pkcs7-context.c
+++ /dev/null
@@ -1,691 +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-pkcs7-context.h"
-
-#include "camel-stream-fs.h"
-#include "camel-stream-mem.h"
-
-#include <nss.h>
-#include <cert.h>
-#include <secpkcs7.h>
-
-#include <gtk/gtk.h> /* for _() macro */
-
-#define d(x)
-
-struct _CamelPkcs7ContextPrivate {
- CERTCertDBHandle *certdb;
-};
-
-
-static int pkcs7_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-static int pkcs7_clearsign (CamelCipherContext *context, const char *userid,
- CamelCipherHash hash, CamelStream *istream,
- CamelStream *ostream, CamelException *ex);
-static CamelCipherValidity *pkcs7_verify (CamelCipherContext *context, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex);
-static int pkcs7_encrypt (CamelCipherContext *context, gboolean sign, const char *userid,
- GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-static int pkcs7_decrypt (CamelCipherContext *context, CamelStream *istream,
- CamelStream *ostream, CamelException *ex);
-
-
-static CamelCipherContextClass *parent_class;
-
-static void
-camel_pkcs7_context_init (CamelPkcs7Context *context)
-{
- context->priv = g_new0 (struct _CamelPkcs7ContextPrivate, 1);
-}
-
-static void
-camel_pkcs7_context_finalise (CamelObject *o)
-{
- CamelPkcs7Context *context = (CamelPkcs7Context *)o;
-
- CERT_ClosePermCertDB (context->priv->certdb);
- g_free (context->priv->certdb);
-
- g_free (context->priv);
-}
-
-static void
-camel_pkcs7_context_class_init (CamelPkcs7ContextClass *camel_pkcs7_context_class)
-{
- CamelCipherContextClass *camel_cipher_context_class =
- CAMEL_CIPHER_CONTEXT_CLASS (camel_pkcs7_context_class);
-
- parent_class = CAMEL_CIPHER_CONTEXT_CLASS (camel_type_get_global_classfuncs (camel_cipher_context_get_type ()));
-
- camel_cipher_context_class->sign = pkcs7_sign;
- camel_cipher_context_class->clearsign = pkcs7_clearsign;
- camel_cipher_context_class->verify = pkcs7_verify;
- camel_cipher_context_class->encrypt = pkcs7_encrypt;
- camel_cipher_context_class->decrypt = pkcs7_decrypt;
-}
-
-CamelType
-camel_pkcs7_context_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_cipher_context_get_type (),
- "CamelPkcs7Context",
- sizeof (CamelPkcs7Context),
- sizeof (CamelPkcs7ContextClass),
- (CamelObjectClassInitFunc) camel_pkcs7_context_class_init,
- NULL,
- (CamelObjectInitFunc) camel_pkcs7_context_init,
- (CamelObjectFinalizeFunc) camel_pkcs7_context_finalise);
- }
-
- return type;
-}
-
-
-/**
- * camel_pkcs7_context_new:
- * @session: CamelSession
- * @certdb: certificate db
- *
- * This creates a new CamelPkcs7Context object which is used to sign,
- * verify, encrypt and decrypt streams.
- *
- * Return value: the new CamelPkcs7Context
- **/
-CamelPkcs7Context *
-camel_pkcs7_context_new (CamelSession *session, const char *certdb)
-{
- CamelPkcs7Context *context;
- CERTCertDBHandle *handle;
-
- g_return_val_if_fail (session != NULL, NULL);
-
- context = CAMEL_PKCS7_CONTEXT (camel_object_new (CAMEL_PKCS7_CONTEXT_TYPE));
-
- camel_cipher_construct (CAMEL_CIPHER_CONTEXT (context), session);
-
- handle = g_new0 (CERTCertDBHandle, 1);
- if (certdb) {
- if (!CERT_OpenCertDBFilename (handle, certdb, FALSE)) {
- g_free (handle);
- return NULL;
- }
- } else {
- if (!CERT_OpenVolatileCertDB (handle)) {
- g_free (handle);
- return NULL;
- }
- }
-
- context->priv->certdb = handle;
-
- return context;
-}
-
-/*----------------------------------------------------------------------*
- * Public crypto functions
- *----------------------------------------------------------------------*/
-
-struct _GetPasswdData {
- CamelSession *session;
- CamelException *ex;
- const char *userid;
-};
-
-static SECItem *
-get_zero_len_passwd (SECKEYKeyDBHandle *handle)
-{
- SECItem *pwitem;
- SECStatus rv;
-
- /* hash the empty string as a password */
- pwitem = SECKEY_DeriveKeyDBPassword (handle, "");
- if (pwitem == NULL)
- return NULL;
-
- /* check to see if this is the right password */
- rv = SECKEY_CheckKeyDBPassword (handle, pwitem);
- if (rv == SECFailure)
- return NULL;
-
- return pwitem;
-}
-
-static SECItem *
-get_password (void *arg, SECKEYKeyDBHandle *handle)
-{
- CamelSession *session = ((struct _GetPasswdData *) arg)->session;
- CamelException *ex = ((struct _GetPasswdData *) arg)->ex;
- const char *userid = ((struct _GetPasswdData *) arg)->userid;
- char *prompt, *passwd = NULL;
- SECItem *pwitem;
- SECStatus rv;
-
- /* Check to see if zero length password or not */
- pwitem = get_zero_len_passwd (handle);
- if (pwitem)
- return pwitem;
-
- prompt = g_strdup_printf (_("Please enter your password for %s"), userid);
- passwd = camel_session_get_password (session, prompt, TRUE,
- NULL, userid, NULL);
- g_free (prompt);
-
- /* hash the password */
- pwitem = SECKEY_DeriveKeyDBPassword (handle, passwd ? passwd : "");
-
- /* clear out the password strings */
- if (passwd) {
- memset (passwd, 0, strlen (passwd));
- g_free (passwd);
- }
-
- if (pwitem == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error hashing password."));
-
- return NULL;
- }
-
- /* confirm the password */
- rv = SECKEY_CheckKeyDBPassword (handle, pwitem);
- if (rv) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Invalid password."));
-
- SECITEM_ZfreeItem (pwitem, PR_TRUE);
-
- return NULL;
- }
-
- return pwitem;
-}
-
-static HASH_HashType
-camel_cipher_hash_to_nss (CamelCipherHash hash)
-{
- switch (hash) {
- case CAMEL_CIPHER_HASH_DEFAULT:
- return HASH_AlgSHA1;
- case CAMEL_CIPHER_HASH_MD2:
- return HASH_AlgMD2;
- case CAMEL_CIPHER_HASH_MD5:
- return HASH_AlgMD5;
- case CAMEL_CIPHER_HASH_SHA1:
- return HASH_AlgSHA1;
- }
-
- return HASH_AlgNULL;
-}
-
-static SECOidTag
-nss_hash_to_sec_oid (HASH_HashType hash)
-{
- switch (hash) {
- case HASH_AlgMD2:
- return SEC_OID_MD2;
- case HASH_AlgMD5:
- return SEC_OID_MD5;
- case Hash_AlgSHA1:
- return SEC_OID_SHA1;
- default:
- g_assert_not_reached ();
- return 0;
- }
-}
-
-static int
-pkcs7_digest (SECItem *data, char *digestdata, unsigned int *len, unsigned int maxlen, HASH_HashType hash)
-{
- SECHashObject *hashObj;
- void *hashcx;
-
- hashObj = &SECHashObjects[hash];
-
- hashcx = (* hashObj->create)();
- if (hashcx == NULL)
- return -1;
-
- (* hashObj->begin)(hashcx);
- (* hashObj->update)(hashcx, data->data, data->len);
- (* hashObj->end)(hashcx, (unsigned char *)digestdata, len, maxlen);
- (* hashObj->destroy)(hashcx, PR_TRUE);
-
- return 0;
-}
-
-static void
-sec_output_cb (void *arg, const char *buf, unsigned long len)
-{
- CamelStream *stream;
-
- stream = CAMEL_STREAM (arg);
- camel_stream_write (stream, buf, len);
-}
-
-static int
-pkcs7_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- CamelPkcs7Context *context = CAMEL_PKCS7_CONTEXT (ctx);
- struct _GetPasswdData *data;
- SEC_PKCS7ContentInfo *cinfo;
- SECItem data2sign, digest;
- HASH_HashType hash_type;
- CERTCertificate *cert;
- guchar digestdata[32];
- CamelStream *stream;
- GByteArray *buf;
- guint len;
-
- g_return_val_if_fail (userid != NULL, -1);
- g_return_val_if_fail (istream != NULL, -1);
- g_return_val_if_fail (ostream != NULL, -1);
-
- stream = camel_stream_mem_new ();
- camel_stream_write_to_stream (istream, stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
- data2sign.data = buf->data;
- data2sign.len = buf->len;
-
- hash_type = camel_cipher_hash_to_nss (hash);
- pkcs7_digest (&data2sign, digestdata, &len, 32, hash_type);
- digest.data = (unsigned char *)digestdata;
- digest.len = len;
-
- camel_object_unref (CAMEL_OBJECT (stream));
-
- cert = CERT_FindCertByNickname (context->priv->certdb, userid);
- if (!cert) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sign: certificate not found for \"%s\"."),
- userid);
- return -1;
- }
-
- cinfo = SEC_PKCS7CreateSignedData (cert, certUsageEmailSigner, NULL,
- nss_hash_to_sec_oid (hash_type),
- &digest, NULL, NULL);
-
- SEC_PKCS7IncludeCertChain (cinfo, NULL);
-
- data = g_new (struct _GetPasswdData, 1);
- data->session = ctx->session;
- data->userid = userid;
- data->ex = ex;
-
- SEC_PKCS7Encode (cinfo, sec_output_cb, ostream, NULL, get_password, data);
-
- g_free (data);
-
- SEC_PKCS7DestroyContentInfo (cinfo);
-
- return 0;
-}
-
-
-static int
-pkcs7_clearsign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- CamelPkcs7Context *context = CAMEL_PKCS7_CONTEXT (ctx);
- struct _GetPasswdData *data;
- SEC_PKCS7ContentInfo *cinfo;
- HASH_HashType hash_type;
- CERTCertificate *cert;
- CamelStream *stream;
- SECItem data2sign;
- GByteArray *buf;
-
- g_return_val_if_fail (userid != NULL, -1);
- g_return_val_if_fail (istream != NULL, -1);
- g_return_val_if_fail (ostream != NULL, -1);
-
- hash_type = camel_cipher_hash_to_nss (hash);
-
- cert = CERT_FindCertByNickname (context->priv->certdb, userid);
- if (!cert) {
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not clearsign: certificate not found for \"%s\"."),
- userid);
- return -1;
- }
-
- cinfo = SEC_PKCS7CreateSignedData (cert, certUsageEmailSigner, NULL,
- nss_hash_to_sec_oid (hash_type),
- NULL, NULL, NULL);
-
- stream = camel_stream_mem_new ();
- camel_stream_write_to_stream (istream, stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
- data2sign.data = buf->data;
- data2sign.len = buf->len;
- SEC_PKCS7SetContent (cinfo, (char *)data2sign.data, data2sign.len);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- SEC_PKCS7IncludeCertChain (cinfo, NULL);
-
- data = g_new (struct _GetPasswdData, 1);
- data->session = ctx->session;
- data->userid = userid;
- data->ex = ex;
-
- SEC_PKCS7Encode (cinfo, sec_output_cb, ostream, NULL, get_password, data);
-
- g_free (data);
-
- SEC_PKCS7DestroyContentInfo (cinfo);
-
- return 0;
-}
-
-#if 0
-/* this is just meant as a reference so I can see what the valid enums are */
-typedef enum {
- certUsageSSLClient,
- certUsageSSLServer,
- certUsageSSLServerWithStepUp,
- certUsageSSLCA,
- certUsageEmailSigner,
- certUsageEmailRecipient,
- certUsageObjectSigner,
- certUsageUserCertImport,
- certUsageVerifyCA,
- certUsageProtectedObjectSigner,
- certUsageStatusResponder,
- certUsageAnyCA
-} SECCertUsage;
-#endif
-
-#if 0
-static HASH_HashType
-AlgorithmToHashType (SECAlgorithmID *digestAlgorithms)
-{
- SECOidTag tag;
-
- tag = SECOID_GetAlgorithmTag (digestAlgorithms);
-
- switch (tag) {
- case SEC_OID_MD2:
- return HASH_AlgMD2;
- case SEC_OID_MD5:
- return HASH_AlgMD5;
- case SEC_OID_SHA1:
- return HASH_AlgSHA1;
- default:
- g_assert_not_reached ();
- return HASH_AlgNULL;
- }
-}
-#endif
-
-/* FIXME: god knows if this code works, NSS "docs" are so not helpful at all */
-static CamelCipherValidity *
-pkcs7_verify (CamelCipherContext *ctx, CamelCipherHash hash, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex)
-{
- CamelPkcs7Context *context = CAMEL_PKCS7_CONTEXT (ctx);
- CamelCipherValidity *valid = NULL;
- SEC_PKCS7ContentInfo *cinfo;
- SECCertUsage usage;
- GByteArray *plaintext;
- CamelStream *stream;
-
- /* create our ContentInfo object */
- stream = camel_stream_mem_new ();
- camel_stream_write_to_stream (istream, stream);
- plaintext = CAMEL_STREAM_MEM (stream)->buffer;
- cinfo = SEC_PKCS7CreateData ();
- SEC_PKCS7SetContent (cinfo, plaintext->data, plaintext->len);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- usage = certUsageEmailSigner; /* just a guess. or maybe certUsageVerifyCA?? */
-
- valid = camel_cipher_validity_new ();
-
- if (sigstream) {
- HASH_HashType digest_type;
- GByteArray *signature;
- SECItem digest;
-
- /* create our digest object */
- stream = camel_stream_mem_new ();
- camel_stream_write_to_stream (sigstream, stream);
- signature = CAMEL_STREAM_MEM (stream)->buffer;
- digest.data = signature->data;
- digest.len = signature->len;
-
- switch (hash) {
- default:
- case CAMEL_CIPHER_HASH_DEFAULT:
- digest_type = HASH_AlgNULL;
- break;
- case CAMEL_CIPHER_HASH_MD2:
- digest_type = HASH_AlgMD2;
- break;
- case CAMEL_CIPHER_HASH_MD5:
- digest_type = HASH_AlgMD5;
- break;
- case CAMEL_CIPHER_HASH_SHA1:
- digest_type = HASH_AlgSHA1;
- break;
- }
-
- valid->valid = SEC_PKCS7VerifyDetachedSignature (cinfo, usage, &digest, digest_type, PR_FALSE);
- camel_object_unref (CAMEL_OBJECT (stream));
- } else {
- valid->valid = SEC_PKCS7VerifySignature (cinfo, usage, PR_FALSE);
- }
-
- SEC_PKCS7DestroyContentInfo (cinfo);
-
- /* FIXME: set a meaningful description...in UTF8 */
- camel_cipher_validity_set_description (valid, "");
-
- return valid;
-}
-
-/* FIXME: we need to respect the 'sign' argument... */
-static int
-pkcs7_encrypt (CamelCipherContext *ctx, gboolean sign, const char *userid, GPtrArray *recipients,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- CamelPkcs7Context *context = CAMEL_PKCS7_CONTEXT (ctx);
- const char *invalid_userkey = NULL;
- SEC_PKCS7ContentInfo *cinfo = NULL;
- CERTCertificate *cert, *usercert;
- SEC_PKCS7EncoderContext *ecx;
- struct _GetPasswdData *data;
- CamelStream *stream = NULL;
- SECItem secdata;
- GByteArray *buf;
- int i = 0;
-
- g_return_val_if_fail (userid != NULL, -1);
- g_return_val_if_fail (recipients != NULL, -1);
- g_return_val_if_fail (recipients->len != 0, -1);
- g_return_val_if_fail (istream != NULL, -1);
- g_return_val_if_fail (ostream != NULL, -1);
-
-#if 0
- /* this isn't needed until we respect the 'sign' argument... */
- usercert = CERT_FindCertByNickname (context->priv->certdb, userid);
- if (!usercert) {
- invalid_userkey = userid;
- goto exception;
- }
-#endif
-
- cert = CERT_FindCertByNickname (context->priv->certdb, recipients->pdata[i]);
- if (!cert) {
- invalid_userkey = recipients->pdata[i];
- goto exception;
- }
-
- data = g_new (struct _GetPasswdData, 1);
- data->session = session;
- data->userid = userid;
- data->ex = ex;
-
- /* FIXME: extend CamelCipherContext to allow selecting an encryption algorithm?? */
- cinfo = SEC_PKCS7CreateEncryptedData (SEC_OID_DES_EDE3_CBC, 0,
- get_password, data);
-
- g_free (data);
-
- if (!cinfo) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not encrypt: failed to create enveloped data."));
- goto exception;
- }
-
- for (i++; i < recipients->len; i++) {
- SECStatus retval;
-
- cert = CERT_FindCertByNickname (context->priv->certdb, recipients->pdata[i]);
- if (!cert) {
- invalid_userkey = recipients->pdata[i];
- goto exception;
- }
-
- retval = SEC_PKCS7AddRecipient (cinfo, cert, certUsageEmailRecipient, NULL);
- if (retval != SECSuccess) {
- invalid_userkey = recipients->pdata[i];
- goto exception;
- }
- }
-
- ecx = SEC_PKCS7EncoderStart (cinfo, sec_output_cb, ostream, NULL);
- if (ecx == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not encrypt: failed to create encryption context."));
- goto exception;
- }
-
- stream = camel_stream_mem_new ();
- camel_stream_write_to_stream (istream, stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
- if (SEC_PKCS7EncoderUpdate (ecx, buf->data, buf->len) != SECSuccess)
- goto exception;
-
- camel_object_unref (CAMEL_OBJECT (stream));
- stream = NULL;
-
- if (SEC_PKCS7EncoderFinish (ecx, NULL, NULL) != SECSuccess)
- goto exception;
-
- SEC_PKCS7DestroyContentInfo (cinfo);
-
- return 0;
-
- exception:
-
- if (stream)
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (cinfo)
- SEC_PKCS7DestroyContentInfo (cinfo);
-
- if (invalid_userkey) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not encrypt data: invalid user key: \"%s\"."),
- invalid_userkey);
- }
-
- if (!camel_exception_is_set (ex)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not encrypt: encoding failed."));
- }
-
- return -1;
-}
-
-static PRBool
-decryption_allowed (SECAlgorithmID *algid, PK11SymKey *key)
-{
- return PR_TRUE;
-}
-
-static int
-pkcs7_decrypt (CamelCipherContext *ctx, CamelStream *istream,
- CamelStream *ostream, CamelException *ex)
-{
- CamelPkcs7Context *context = CAMEL_PKCS7_CONTEXT (ctx);
- struct _GetPasswdData *data;
- SEC_PKCS7DecoderContext *dcx;
- SEC_PKCS7ContentInfo *cinfo;
- CamelStream *stream = NULL;
- SECItem secdata;
- GByteArray *buf;
-
- g_return_val_if_fail (istream != NULL, -1);
- g_return_val_if_fail (ostream != NULL, -1);
-
- stream = camel_stream_mem_new ();
- camel_stream_write_to_stream (istream, stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
- secdata.data = buf->data;
- secdata.len = buf->len;
-
- data = g_new (struct _GetPasswdData, 1);
- data->session = ctx->session;
- data->userid = NULL;
- data->ex = ex;
-
- dcx = SEC_PKCS7DecoderStart (sec_output_cb, ostream, get_password, data,
- NULL, NULL, decryption_allowed);
- if (dcx == NULL)
- goto exception;
-
- SEC_PKCS7DecoderUpdate (dcx, secdata.data, secdata.len);
- cinfo = SEC_PKCS7DecoderFinish (dcx);
-
- camel_object_unref (CAMEL_OBJECT (stream));
- g_free (data);
-
- if (cinfo == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to decrypt: Unknown"));
- return -1;
- }
-
- SEC_PKCS7DestroyContentInfo (cinfo);
-
- return 0;
-
- exception:
-
- if (stream)
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return -1;
-}
diff --git a/camel/camel-pkcs7-context.h b/camel/camel-pkcs7-context.h
deleted file mode 100644
index 200ba527a0..0000000000
--- a/camel/camel-pkcs7-context.h
+++ /dev/null
@@ -1,73 +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_PKCS7_CONTEXT_H
-#define CAMEL_PKCS7_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_PKCS7_CONTEXT_TYPE (camel_pkcs7_context_get_type ())
-#define CAMEL_PKCS7_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_PKCS7_CONTEXT_TYPE, CamelPkcs7Context))
-#define CAMEL_PKCS7_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_PKCS7_CONTEXT_TYPE, CamelPkcs7ContextClass))
-#define CAMEL_IS_PKCS7_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_PKCS7_CONTEXT_TYPE))
-
-typedef struct _CamelPkcs7Context {
- CamelCipherContext parent_object;
-
- struct _CamelPkcs7ContextPrivate *priv;
-
-} CamelPkcs7Context;
-
-typedef struct _CamelPkcs7ContextClass {
- CamelCipherContextClass parent_class;
-
-} CamelPkcs7ContextClass;
-
-
-CamelType camel_pkcs7_context_get_type (void);
-
-CamelPkcs7Context *camel_pkcs7_context_new (CamelSession *session, const char *certdb_path);
-
-/* PKCS7 routines */
-#define camel_pkcs7_sign(c, u, h, i, o, e) camel_cipher_sign (CAMEL_CIPHER_CONTEXT (c), u, h, i, o, e)
-
-#define camel_pkcs7_clearsign(c, u, h, i, o, e) camel_cipher_clearsign (CAMEL_CIPHER_CONTEXT (c), u, h, i, o, e)
-
-#define camel_pkcs7_verify(c, i, s, e) camel_cipher_verify (CAMEL_CIPHER_CONTEXT (c), i, s, e)
-
-#define camel_pkcs7_encrypt(c, s, u, r, i, o, e) camel_cipher_encrypt (CAMEL_CIPHER_CONTEXT (c), s, u, r, i, o, e)
-
-#define camel_pkcs7_decrypt(c, i, o, e) camel_cipher_decrypt (CAMEL_CIPHER_CONTEXT (c), i, o, e)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_PKCS7_CONTEXT_H */
diff --git a/camel/camel-private.h b/camel/camel-private.h
deleted file mode 100644
index 73a1b7bfc3..0000000000
--- a/camel/camel-private.h
+++ /dev/null
@@ -1,192 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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
- EMutex *lock;
- EMutex *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) (e_mutex_lock(((CamelFolder *)f)->priv->l))
-#define CAMEL_FOLDER_UNLOCK(f, l) (e_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 _CamelTransportPrivate {
-#ifdef ENABLE_THREADS
- GMutex *send_lock; /* for locking send operations */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_TRANSPORT_LOCK(f, l) (g_mutex_lock(((CamelTransport *)f)->priv->l))
-#define CAMEL_TRANSPORT_UNLOCK(f, l) (g_mutex_unlock(((CamelTransport *)f)->priv->l))
-#else
-#define CAMEL_TRANSPORT_LOCK(f, l)
-#define CAMEL_TRANSPORT_UNLOCK(f, l)
-#endif
-
-struct _CamelServicePrivate {
-#ifdef ENABLE_THREADS
- EMutex *connect_lock; /* for locking connection operations */
- EMutex *connect_op_lock;/* for locking the connection_op */
-#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 */
- GMutex *thread_lock; /* locking threads */
-
- int thread_id;
- GHashTable *thread_active;
- EThread *thread_queue;
-#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 _CamelVeeFolderPrivate {
- GList *folders; /* lock using subfolder_lock before changing/accessing */
- GList *folders_changed; /* for list of folders that have changed between updates */
-
-#ifdef ENABLE_THREADS
- GMutex *summary_lock; /* for locking vfolder summary */
- GMutex *subfolder_lock; /* for locking the subfolder list */
- GMutex *changed_lock; /* for locking the folders-changed 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 3461a530d0..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@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999, 2000 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
- */
-
-
-/* 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 c995b29229..0000000000
--- a/camel/camel-provider.h
+++ /dev/null
@@ -1,173 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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];
-
-/* Provider flags:
- *
- * _IS_REMOTE the provider works with remote data
- * _IS_LOCAL it can be used as a backend for local folder
- * tree folders. (*Not* just the opposite of _IS_REMOTE)
- * _IS_SOURCE mail arrives there, so it should be offered as an
- * option in the mail config dialog.
- * _IS_STORAGE mail is stored there. it will appear in the folder tree.
- * _IS_EXTERNAL it appears in the folder tree but is not created by
- * the mail component.
- */
-#define CAMEL_PROVIDER_IS_REMOTE (1 << 0)
-#define CAMEL_PROVIDER_IS_LOCAL (1 << 1)
-#define CAMEL_PROVIDER_IS_EXTERNAL (1 << 2)
-#define CAMEL_PROVIDER_IS_SOURCE (1 << 3)
-#define CAMEL_PROVIDER_IS_STORAGE (1 << 4)
-#define CAMEL_PROVIDER_SUPPORTS_SSL (1 << 5)
-
-
-/* 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;
-
- GHashFunc url_hash;
- GCompareFunc url_equal;
-} 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 e1818e47c0..0000000000
--- a/camel/camel-remote-store.c
+++ /dev/null
@@ -1,576 +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@ximian.com>
- * based on camel-imap-provider.c
- *
- * Copyright 2000 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/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"
-
-#ifdef HAVE_NSS
-#include "camel-tcp-stream-ssl.h"
-#endif
-
-#ifdef HAVE_OPENSSL
-#include "camel-tcp-stream-openssl.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);
- CamelService *service = CAMEL_SERVICE (object);
-
- if (service->status == CAMEL_SERVICE_CONNECTED) {
- CamelException ex;
-
- camel_exception_init (&ex);
- camel_service_disconnect (service, TRUE, &ex);
- if (camel_exception_is_set (&ex)) {
- g_warning ("camel_remote_store_finalize: silent disconnect failure: %s",
- camel_exception_get_description (&ex));
- }
- }
-
-#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;
-
-#if defined(HAVE_NSS) || defined(HAVE_OPENSSL)
- if (store->use_ssl) {
-#ifdef HAVE_NSS
- /* this is the preferred SSL implementation */
- tcp_stream = camel_tcp_stream_ssl_new (service, service->url->host);
-#else
- /* use openssl... */
- tcp_stream = camel_tcp_stream_openssl_new (service, service->url->host);
-#endif /* HAVE_NSS */
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-#else
- tcp_stream = camel_tcp_stream_raw_new ();
-#endif /* HAVE_NSS || HAVE_OPENSSL */
-
- 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);
-
- /* 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 void
-sync_remote_folder (gpointer key, gpointer value, gpointer data)
-{
- CamelFolder *folder = CAMEL_FOLDER (value);
-
- if (!camel_exception_is_set ((CamelException *) data))
- camel_folder_sync (folder, FALSE, (CamelException *) data);
-}
-
-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 if (strstr (cmdbuf, "LOGIN {"))
- fprintf (stderr, "sending : ------ LOGIN {N+} ....\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;
- CamelException internal_ex;
- char *buf;
-
- *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);
-
- buf = camel_stream_buffer_read_line (stream);
-
- camel_exception_init (&internal_ex);
- if (buf == NULL) {
- if (errno == EINTR)
- camel_exception_set (&internal_ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- else
- camel_exception_setv (&internal_ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Server unexpectedly disconnected: %s"),
- g_strerror (errno));
- }
-
- if (camel_exception_is_set (&internal_ex)) {
- camel_exception_xfer (ex, &internal_ex);
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- return -1;
- }
-
- *dest = buf;
-
-#if d(!)0
- if (camel_verbose_debug)
- fprintf (stderr, "received: %s\n", *dest);
-#endif
-
- return strlen (*dest);
-}
-
-/**
- * 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 2419692e98..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@ximian.com>
- *
- * 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 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 106414fa2c..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 *username, *outbuf;
- const char *charset;
- size_t len, outlen;
- const char *buf;
- iconv_t cd;
-
- charset = camel_charset_locale_name ();
- if (!charset)
- charset = "iso-8859-1";
-
- cd = iconv_open (resp->charset, 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-popb4smtp.c b/camel/camel-sasl-popb4smtp.c
deleted file mode 100644
index 7acd8e385c..0000000000
--- a/camel/camel-sasl-popb4smtp.c
+++ /dev/null
@@ -1,155 +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. (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 <time.h>
-#include "camel-sasl-popb4smtp.h"
-#include "camel-service.h"
-#include "camel-session.h"
-
-CamelServiceAuthType camel_sasl_popb4smtp_authtype = {
- N_("POP before SMTP"),
-
- N_("This option will authorise a POP connection before attempting SMTP"),
-
- "POPB4SMTP",
- FALSE,
-};
-
-/* last time the pop was accessed (through the auth method anyway), *time_t */
-static GHashTable *poplast;
-
-/* use 1 hour as our pop timeout */
-#define POPB4SMTP_TIMEOUT (60*60)
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-#define POPB4SMTP_LOCK(l) pthread_mutex_lock(&l)
-#define POPB4SMTP_UNLOCK(l) pthread_mutex_unlock(&l)
-#else
-#define POPB4SMTP_LOCK(l)
-#define POPB4SMTP_UNLOCK(l)
-#endif
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslPOPB4SMTP */
-#define CSP_CLASS(so) CAMEL_SASL_POPB4SMTP_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *popb4smtp_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-static void
-camel_sasl_popb4smtp_class_init (CamelSaslPOPB4SMTPClass *camel_sasl_popb4smtp_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_popb4smtp_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = popb4smtp_challenge;
-
- poplast = g_hash_table_new(g_str_hash, g_str_equal);
-}
-
-CamelType
-camel_sasl_popb4smtp_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslPOPB4SMTP",
- sizeof (CamelSaslPOPB4SMTP),
- sizeof (CamelSaslPOPB4SMTPClass),
- (CamelObjectClassInitFunc) camel_sasl_popb4smtp_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-static GByteArray *
-popb4smtp_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- char *popuri;
- CamelSession *session = sasl->service->session;
- CamelStore *store;
- time_t now, *timep;
-
- sasl->authenticated = FALSE;
-
- popuri = camel_session_get_password(session, _("POP Source URI"), FALSE,
- sasl->service, "popb4smtp_uri", ex);
-
- if (popuri == NULL) {
- camel_exception_setv(ex, 1, _("POP Before SMTP auth using an unknown transport"));
- return NULL;
- }
-
- if (strncasecmp(popuri, "pop:", 4) != 0) {
- camel_exception_setv(ex, 1, _("POP Before SMTP auth using a non-pop source"));
- return NULL;
- }
-
- /* check if we've done it before recently in this session */
- now = time(0);
-
- /* need to lock around the whole thing until finished with timep */
-
- POPB4SMTP_LOCK(lock);
- timep = g_hash_table_lookup(poplast, popuri);
- if (timep) {
- if ((*timep + POPB4SMTP_TIMEOUT) > now) {
- sasl->authenticated = TRUE;
- POPB4SMTP_UNLOCK(lock);
- g_free(popuri);
- return NULL;
- }
- } else {
- timep = g_malloc0(sizeof(*timep));
- g_hash_table_insert(poplast, g_strdup(popuri), timep);
- }
-
- /* connect to pop session */
- store = camel_session_get_store(session, popuri, ex);
- if (store) {
- sasl->authenticated = TRUE;
- camel_object_unref((CamelObject *)store);
- *timep = now;
- } else {
- sasl->authenticated = FALSE;
- *timep = 0;
- }
-
- POPB4SMTP_UNLOCK(lock);
-
- g_free(popuri);
-
- return NULL;
-}
diff --git a/camel/camel-sasl-popb4smtp.h b/camel/camel-sasl-popb4smtp.h
deleted file mode 100644
index 187789a4df..0000000000
--- a/camel/camel-sasl-popb4smtp.h
+++ /dev/null
@@ -1,59 +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. (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_POPB4SMTP_H
-#define CAMEL_SASL_POPB4SMTP_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_POPB4SMTP_TYPE (camel_sasl_popb4smtp_get_type ())
-#define CAMEL_SASL_POPB4SMTP(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_POPB4SMTP_TYPE, CamelSaslPOPB4SMTP))
-#define CAMEL_SASL_POPB4SMTP_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_POPB4SMTP_TYPE, CamelSaslPOPB4SMTPClass))
-#define CAMEL_IS_SASL_POPB4SMTP(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_POPB4SMTP_TYPE))
-
-typedef struct _CamelSaslPOPB4SMTP {
- CamelSasl parent_object;
-
-} CamelSaslPOPB4SMTP;
-
-
-typedef struct _CamelSaslPOPB4SMTPClass {
- CamelSaslClass parent_class;
-
-} CamelSaslPOPB4SMTPClass;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_popb4smtp_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_popb4smtp_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_POPB4SMTP_H */
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
deleted file mode 100644
index c70a52d8a8..0000000000
--- a/camel/camel-sasl.c
+++ /dev/null
@@ -1,261 +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"
-#include "camel-sasl-popb4smtp.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 if (!strcmp (mechanism, "POPB4SMTP"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_POPB4SMTP_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 if (!strcmp(mechanism, "POPB4SMTP"))
- return &camel_sasl_popb4smtp_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 759ca7cf3e..0000000000
--- a/camel/camel-search-private.c
+++ /dev/null
@@ -1,478 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- * Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2000 Ximian, Inc. (www.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.
- *
- */
-
-/* (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 "camel-search-private.h"
-
-#include <gal/unicode/gunicode.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;
-}
-
-static gunichar
-utf8_get (const char **inp)
-{
- const unsigned char *p = *inp;
- gunichar c;
-
- g_return_val_if_fail (p != NULL, 0);
-
- c = g_utf8_get_char (p);
- *inp = g_unichar_validate (c) ? g_utf8_next_char (p) : NULL;
-
- return c;
-}
-
-static const char *
-camel_ustrstrcase (const char *haystack, const char *needle)
-{
- gunichar *nuni, *puni;
- gunichar 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 (gunichar) * strlen (needle));
-
- p = needle;
- while ((u = utf8_get (&p)))
- *puni++ = g_unichar_tolower (u);
-
- /* NULL means there was illegal utf-8 sequence */
- if (!p)
- return NULL;
-
- p = haystack;
- while ((u = utf8_get (&p))) {
- gunichar c;
-
- c = g_unichar_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 = g_unichar_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)
-{
- gunichar u1, u2 = 0;
-
- CAMEL_SEARCH_COMPARE (s1, s2, NULL);
-
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
- while (u1 && u2) {
- u1 = g_unichar_tolower (u1);
- u2 = g_unichar_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)
-{
- gunichar u1, u2 = 0;
-
- CAMEL_SEARCH_COMPARE (s1, s2, NULL);
-
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
- while (len > 0 && u1 && u2) {
- u1 = g_unichar_tolower (u1);
- u2 = g_unichar_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;
-}
-
-/* value is the match value suitable for exact match if required */
-static int
-header_match(const char *value, const char *match, camel_search_match_t how)
-{
- const char *p;
- int vlen, mlen;
-
- 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;
-}
-
-/* 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, camel_search_t type, const char *default_charset)
-{
- const char *name, *addr;
- int truth = FALSE;
- CamelInternetAddress *cia;
- char *v;
-
- while (*value && isspace (*value))
- value++;
-
- switch(type) {
- case CAMEL_SEARCH_TYPE_ENCODED:
- v = header_decode_string(value, default_charset); /* FIXME: Find header charset */
- truth = header_match(v, match, how);
- g_free(v);
- break;
- case CAMEL_SEARCH_TYPE_ASIS:
- truth = header_match(value, match, how);
- break;
- case CAMEL_SEARCH_TYPE_ADDRESS_ENCODED:
- case CAMEL_SEARCH_TYPE_ADDRESS:
- /* possible simple case to save some work if we can */
- if (header_match(value, match, how))
- return TRUE;
-
- /* Now we decode any addresses, and try asis matches on name and address parts */
- cia = camel_internet_address_new();
- if (type == CAMEL_SEARCH_TYPE_ADDRESS_ENCODED)
- camel_address_decode((CamelAddress *)cia, value);
- else
- camel_address_unformat((CamelAddress *)cia, value);
-
- if (camel_address_length((CamelAddress *)cia) == 1) {
- camel_internet_address_get(cia, 0, &name, &addr);
- truth = (name && header_match(name, match, how))
- || (addr && header_match(addr, match, how));
- }
- camel_object_unref((CamelObject *)cia);
- break;
- }
-
- return truth;
-}
-
-/* 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, CAMEL_STREAM (mem));
- camel_stream_write (CAMEL_STREAM (mem), "", 1);
- truth = regexec (pattern, mem->buffer->data, 0, NULL, 0) == 0;
- camel_object_unref (CAMEL_OBJECT (mem));
- }
-
- return truth;
-}
-
diff --git a/camel/camel-search-private.h b/camel/camel-search-private.h
deleted file mode 100644
index ac88dd7257..0000000000
--- a/camel/camel-search-private.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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;
-
-typedef enum {
- CAMEL_SEARCH_TYPE_ASIS,
- CAMEL_SEARCH_TYPE_ENCODED,
- CAMEL_SEARCH_TYPE_ADDRESS,
- CAMEL_SEARCH_TYPE_ADDRESS_ENCODED,
-} camel_search_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, camel_search_t type, const char *default_charset);
-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 e9fe14902d..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 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 "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 6fcb5c05c5..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 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_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 a04a97fe83..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@ximian.com>
- *
- * Copyright 1999, 2000 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 "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 0b275b4ca2..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 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_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 fed8945008..0000000000
--- a/camel/camel-service.c
+++ /dev/null
@@ -1,678 +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 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 <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#include "e-util/e-msgport.h"
-#endif
-
-#include "e-util/e-host-utils.h"
-
-#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 void cancel_connect (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->cancel_connect = cancel_connect;
- 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);
- service->priv->connect_op_lock = e_mutex_new(E_MUTEX_SIMPLE);
-#endif
-}
-
-static void
-camel_service_finalize (CamelObject *object)
-{
- CamelService *service = CAMEL_SERVICE (object);
-
- if (service->status == CAMEL_SERVICE_CONNECTED) {
- CamelException ex;
-
- camel_exception_init (&ex);
- CSERV_CLASS (service)->disconnect (service, TRUE, &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 (service->url)
- camel_url_free (service->url);
- if (service->session)
- camel_object_unref (CAMEL_OBJECT (service->session));
-
-#ifdef ENABLE_THREADS
- e_mutex_destroy (service->priv->connect_lock);
- e_mutex_destroy (service->priv->connect_op_lock);
-#endif
- g_free (service->priv);
-}
-
-
-
-CamelType
-camel_service_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- 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 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->status = CAMEL_SERVICE_DISCONNECTED;
-}
-
-/**
- * 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->status == CAMEL_SERVICE_CONNECTED) {
- CAMEL_SERVICE_UNLOCK (service, connect_lock);
- return TRUE;
- }
-
- /* Register a separate operation for connecting, so that
- * the offline code can cancel it.
- */
- CAMEL_SERVICE_LOCK (service, connect_op_lock);
- service->connect_op = camel_operation_registered ();
- if (!service->connect_op) {
- service->connect_op = camel_operation_new (NULL, NULL);
- camel_operation_register (service->connect_op);
- }
- CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
-
- service->status = CAMEL_SERVICE_CONNECTING;
- ret = CSERV_CLASS (service)->connect (service, ex);
- service->status = ret ? CAMEL_SERVICE_CONNECTED : CAMEL_SERVICE_DISCONNECTED;
-
- CAMEL_SERVICE_LOCK (service, connect_op_lock);
- camel_operation_unref (service->connect_op);
- service->connect_op = NULL;
- CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
-
- 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->status == CAMEL_SERVICE_CONNECTED) {
- CAMEL_SERVICE_LOCK (service, connect_op_lock);
- service->connect_op = camel_operation_registered ();
- if (!service->connect_op) {
- service->connect_op = camel_operation_new (NULL, NULL);
- camel_operation_register (service->connect_op);
- }
- CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
-
- service->status = CAMEL_SERVICE_DISCONNECTING;
- res = CSERV_CLASS (service)->disconnect (service, clean, ex);
- service->status = CAMEL_SERVICE_DISCONNECTED;
-
- CAMEL_SERVICE_LOCK (service, connect_op_lock);
- camel_operation_unref (service->connect_op);
- service->connect_op = NULL;
- CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
- }
-
- CAMEL_SERVICE_UNLOCK (service, connect_lock);
-
- return res;
-}
-
-static void
-cancel_connect (CamelService *service)
-{
- camel_operation_cancel (service->connect_op);
-}
-
-/**
- * camel_service_cancel_connect:
- * @service: a service
- *
- * If @service is currently attempting to connect to or disconnect
- * from a server, this causes it to stop and fail. Otherwise it is a
- * no-op.
- **/
-void
-camel_service_cancel_connect (CamelService *service)
-{
- CAMEL_SERVICE_LOCK (service, connect_op_lock);
- if (service->connect_op)
- CSERV_CLASS (service)->cancel_connect (service);
- CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
-}
-
-/**
- * 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, CAMEL_URL_HIDE_PASSWORD);
-}
-
-
-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;
-
- 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;
- int hostbuflen;
- char *hostbufmem;
-};
-
-static void *
-get_host(void *data)
-{
- struct _lookup_msg *info = data;
-
- while ((info->result = e_gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->herr)) == ERANGE) {
- 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_transient(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 a4399811cf..0000000000
--- a/camel/camel-service.h
+++ /dev/null
@@ -1,141 +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 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_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>
-#include <camel/camel-operation.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))
-
-
-typedef enum {
- CAMEL_SERVICE_DISCONNECTED,
- CAMEL_SERVICE_CONNECTING,
- CAMEL_SERVICE_CONNECTED,
- CAMEL_SERVICE_DISCONNECTING
-} CamelServiceConnectionStatus;
-
-struct _CamelService {
- CamelObject parent_object;
- struct _CamelServicePrivate *priv;
-
- CamelSession *session;
- CamelProvider *provider;
- CamelServiceConnectionStatus status;
- CamelOperation *connect_op;
- 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);
- void (*cancel_connect) (CamelService *service);
-
- 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);
-void camel_service_cancel_connect (CamelService *service);
-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 49fcc0b926..0000000000
--- a/camel/camel-session.c
+++ /dev/null
@@ -1,874 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-session.c : Abstract class for an email session */
-
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999 - 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
- */
-
-#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 "camel-vee-store.h"
-
-#include "camel-private.h"
-
-#define d(x)
-
-#define CS_CLASS(so) CAMEL_SESSION_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static void register_provider (CamelSession *session, CamelProvider *provider);
-static GList *list_providers (CamelSession *session, gboolean load);
-static CamelProvider *get_provider (CamelSession *session,
- const char *url_string,
- CamelException *ex);
-
-static CamelService *get_service (CamelSession *session,
- const char *url_string,
- CamelProviderType type,
- CamelException *ex);
-static char *get_storage_path (CamelSession *session,
- CamelService *service,
- CamelException *ex);
-
-#ifdef ENABLE_THREADS
-static void *session_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size);
-static void session_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *msg);
-static int session_thread_queue(CamelSession *session, CamelSessionThreadMsg *msg, int flags);
-static void session_thread_wait(CamelSession *session, int id);
-#endif
-
-/* 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",
-
- CAMEL_PROVIDER_IS_STORAGE,
-
- 0, /* url_flags */
-
- /* ... */
-};
-
-static void
-camel_session_init (CamelSession *session)
-{
- session->online = TRUE;
- 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();
- session->priv->thread_lock = g_mutex_new();
- session->priv->thread_id = 1;
- session->priv->thread_active = g_hash_table_new(NULL, NULL);
- session->priv->thread_queue = NULL;
-#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;
-
-#ifdef ENABLE_THREADS
- g_hash_table_destroy(session->priv->thread_active);
- if (session->priv->thread_queue)
- e_thread_destroy(session->priv->thread_queue);
-#endif
-
- 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);
- g_mutex_free(session->priv->thread_lock);
-#endif
- g_free(session->priv);
-}
-
-static void
-camel_session_class_init (CamelSessionClass *camel_session_class)
-{
- /* virtual method definition */
- camel_session_class->register_provider = register_provider;
- camel_session_class->list_providers = list_providers;
- camel_session_class->get_provider = get_provider;
- camel_session_class->get_service = get_service;
- camel_session_class->get_storage_path = get_storage_path;
-
-#ifdef ENABLE_THREADS
- camel_session_class->thread_msg_new = session_thread_msg_new;
- camel_session_class->thread_msg_free = session_thread_msg_free;
- camel_session_class->thread_queue = session_thread_queue;
- camel_session_class->thread_wait = session_thread_wait;
-#endif
-
- if (vee_provider.service_cache == NULL) {
- 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);
- vee_provider.url_hash = camel_url_hash;
- vee_provider.url_equal = camel_url_equal;
- }
-}
-
-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_construct:
- * @session: a session object to construct
- * @storage_path: path to a directory the session can use for
- * persistent storage. (This directory must already exist.)
- *
- * Constructs @session.
- **/
-void
-camel_session_construct (CamelSession *session, const char *storage_path)
-{
- session->storage_path = g_strdup (storage_path);
- camel_session_register_provider(session, &vee_provider);
-}
-
-
-static void
-register_provider (CamelSession *session, CamelProvider *provider)
-{
- g_hash_table_insert (session->providers, provider->protocol, provider);
-}
-
-/**
- * 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);
-
- CS_CLASS (session)->register_provider (session, 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);
-}
-
-static GList *
-list_providers (CamelSession *session, gboolean load)
-{
- GList *list = NULL;
-
- if (load)
- g_hash_table_foreach (session->modules, ensure_loaded, session);
-
- g_hash_table_foreach (session->providers, add_to_list, &list);
- return list;
-}
-
-/**
- * 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);
- list = CS_CLASS (session)->list_providers (session, load);
- CAMEL_SESSION_UNLOCK (session, lock);
-
- return list;
-}
-
-
-static CamelProvider *
-get_provider (CamelSession *session, const char *url_string, CamelException *ex)
-{
- CamelProvider *provider;
- char *protocol;
-
- protocol = g_strndup (url_string, strcspn (url_string, ":"));
-
- 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)) {
- g_free (protocol);
- 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);
- }
- g_free (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;
-
- CAMEL_SESSION_LOCK (session, lock);
- provider = CS_CLASS (session)->get_provider (session, url_string, ex);
- CAMEL_SESSION_UNLOCK (session, lock);
-
- 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);
-}
-
-
-static CamelService *
-get_service (CamelSession *session, const char *url_string,
- CamelProviderType type, CamelException *ex)
-{
- CamelURL *url;
- CamelProvider *provider;
- CamelService *service;
- CamelException internal_ex;
- 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 */
- provider = CS_CLASS (session)->get_provider (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);
- 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));
- return service;
- }
-
- service = (CamelService *)camel_object_new (provider->object_types[type]);
- camel_exception_init (&internal_ex);
- camel_service_construct (service, session, provider, url, &internal_ex);
- if (camel_exception_is_set (&internal_ex)) {
- camel_exception_xfer (ex, &internal_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);
- }
-
- return service;
-}
-
-/**
- * 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)
-{
- CamelService *service;
-
- g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
- g_return_val_if_fail (url_string != NULL, NULL);
-
- CAMEL_SESSION_LOCK (session, lock);
- service = CS_CLASS (session)->get_service (session, url_string, type, ex);
- 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->status != CAMEL_SERVICE_CONNECTED) {
- if (camel_service_connect (svc, ex) == FALSE) {
- camel_object_unref (CAMEL_OBJECT (svc));
- return NULL;
- }
- }
-
- return svc;
-}
-
-
-static char *
-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 (camel_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_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)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL);
-
- return CS_CLASS (session)->get_storage_path (session, service, ex);
-}
-
-
-/**
- * camel_session_get_password:
- * @session: session object
- * @prompt: prompt to provide to user
- * @secret: whether or not the data is secret (eg, a password, as opposed
- * to a smartcard response)
- * @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 ask the application and
- * the user for a password or other authentication data.
- *
- * @service and @item together uniquely identify the piece of data the
- * caller is concerned with.
- *
- * @prompt 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 will 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.
- *
- * Return value: the authentication information or %NULL.
- **/
-char *
-camel_session_get_password (CamelSession *session, const char *prompt,
- gboolean secret, CamelService *service,
- const char *item, CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
- g_return_val_if_fail (prompt != NULL, NULL);
- g_return_val_if_fail (item != NULL, NULL);
-
- return CS_CLASS (session)->get_password (session, prompt, secret, service, item, ex);
-}
-
-/**
- * camel_session_forget_password:
- * @session: session object
- * @service: the service rejecting the password
- * @item: an identifier, unique within this service, for the information
- * @ex: a CamelException
- *
- * This function is used by a CamelService to tell the application
- * that the authentication information it provided via
- * camel_session_get_password was rejected by the service. If the
- * application was caching this information, it should stop,
- * and if the service asks for it again, it should ask the user.
- *
- * @service and @item identify the rejected authentication information,
- * as with camel_session_get_password.
- **/
-void
-camel_session_forget_password (CamelSession *session, CamelService *service,
- const char *item, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_SESSION (session));
- g_return_if_fail (item != NULL);
-
- CS_CLASS (session)->forget_password (session, service, item, ex);
-}
-
-/**
- * camel_session_alert_user:
- * @session: session object
- * @type: the type of alert (info, warning, or error)
- * @prompt: the message for the user
- * @cancel: whether or not to provide a "Cancel" option in addition to
- * an "OK" option.
- *
- * Presents the given @prompt to the user, in the style indicated by
- * @type. If @cancel is %TRUE, the user will be able to accept or
- * cancel. Otherwise, the message is purely informational.
- *
- * Return value: %TRUE if the user accepts, %FALSE if they cancel.
- */
-gboolean
-camel_session_alert_user (CamelSession *session, CamelSessionAlertType type,
- const char *prompt, gboolean cancel)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
- g_return_val_if_fail (prompt != NULL, FALSE);
-
- return CS_CLASS (session)->alert_user (session, type, prompt, cancel);
-}
-
-/**
- * camel_session_register_timeout:
- * @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
- *
- * Registers the given timeout. @callback will be called every
- * @interval milliseconds with one argument, @user_data, until it
- * returns %FALSE.
- *
- * Return value: On success, a non-zero handle that can be used with
- * camel_session_remove_timeout(). On failure, 0.
- **/
-guint
-camel_session_register_timeout (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), 0);
-
- return CS_CLASS (session)->register_timeout (session, interval, callback, user_data);
-}
-
-/**
- * camel_session_remove_timeout:
- * @session: the CamelSession
- * @handle: a value returned from camel_session_register_timeout()
- *
- * Removes the indicated timeout.
- *
- * Return value: %TRUE on success, %FALSE on failure.
- **/
-gboolean
-camel_session_remove_timeout (CamelSession *session, guint handle)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
-
- return CS_CLASS (session)->remove_timeout (session, handle);
-}
-
-
-/**
- * camel_session_is_online:
- * @session: the session.
- *
- * Return value: whether or not @session is online.
- **/
-gboolean
-camel_session_is_online (CamelSession *session)
-{
- return session->online;
-}
-
-/**
- * camel_session_set_online:
- * @session: the session
- * @online: whether or not the session should be online
- *
- * Sets the online status of @session to @online.
- **/
-void
-camel_session_set_online (CamelSession *session, gboolean online)
-{
- session->online = online;
-}
-
-
-/**
- * camel_session_get_filter_driver:
- * @session: the session
- * @type: the type of filter (eg, "incoming")
- * @ex: a CamelException
- *
- * Return value: a filter driver, loaded with applicable rules
- **/
-CamelFilterDriver *
-camel_session_get_filter_driver (CamelSession *session,
- const char *type,
- CamelException *ex)
-{
- return CS_CLASS (session)->get_filter_driver (session, type, ex);
-}
-
-#ifdef ENABLE_THREADS
-
-static void *session_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size)
-{
- CamelSessionThreadMsg *m;
-
- g_assert(size >= sizeof(*m));
-
- m = g_malloc0(size);
- m->ops = ops;
-
- CAMEL_SESSION_LOCK(session, thread_lock);
- m->id = session->priv->thread_id++;
- g_hash_table_insert(session->priv->thread_active, (void *)m->id, m);
- CAMEL_SESSION_UNLOCK(session, thread_lock);
-
- return m;
-}
-
-static void session_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- g_assert(msg->ops != NULL);
-
- d(printf("free message %p session %p\n", msg, session));
-
- CAMEL_SESSION_LOCK(session, thread_lock);
- g_hash_table_remove(session->priv->thread_active, (void *)msg->id);
- CAMEL_SESSION_UNLOCK(session, thread_lock);
-
- d(printf("free msg, ops->free = %p\n", msg->ops->free));
-
- if (msg->ops->free)
- msg->ops->free(session, msg);
- g_free(msg);
-}
-
-static void session_thread_destroy(EThread *thread, CamelSessionThreadMsg *msg, CamelSession *session)
-{
- d(printf("destroy message %p session %p\n", msg, session));
- session_thread_msg_free(session, msg);
-}
-
-static void session_thread_received(EThread *thread, CamelSessionThreadMsg *msg, CamelSession *session)
-{
- d(printf("receive message %p session %p\n", msg, session));
- if (msg->ops->receive)
- msg->ops->receive(session, msg);
-}
-
-static int session_thread_queue(CamelSession *session, CamelSessionThreadMsg *msg, int flags)
-{
- int id;
-
- CAMEL_SESSION_LOCK(session, thread_lock);
- if (session->priv->thread_queue == NULL) {
- session->priv->thread_queue = e_thread_new(E_THREAD_QUEUE);
- e_thread_set_msg_destroy(session->priv->thread_queue, (EThreadFunc)session_thread_destroy, session);
- e_thread_set_msg_received(session->priv->thread_queue, (EThreadFunc)session_thread_received, session);
- }
- CAMEL_SESSION_UNLOCK(session, thread_lock);
-
- id = msg->id;
- e_thread_put(session->priv->thread_queue, &msg->msg);
-
- return id;
-}
-
-static void session_thread_wait(CamelSession *session, int id)
-{
- int wait;
-
- /* we just busy wait, only other alternative is to setup a reply port? */
- do {
- CAMEL_SESSION_LOCK(session, thread_lock);
- wait = g_hash_table_lookup(session->priv->thread_active, (void *)id) != NULL;
- CAMEL_SESSION_UNLOCK(session, thread_lock);
- if (wait) {
- usleep(20000);
- }
- } while (wait);
-}
-
-/**
- * camel_session_thread_msg_new:
- * @session:
- * @ops:
- * @size:
- *
- * Create a new thread message, using ops as the receive/reply/free
- * ops, of @size bytes.
- *
- * @ops points to the operations used to recieve/process and finally
- * free the message.
- **/
-void *camel_session_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size)
-{
- g_assert(CAMEL_IS_SESSION(session));
- g_assert(ops != NULL);
- g_assert(size >= sizeof(CamelSessionThreadMsg));
-
- return CS_CLASS (session)->thread_msg_new(session, ops, size);
-}
-
-/**
- * camel_session_thread_msg_free:
- * @session:
- * @msg:
- *
- * Free a @msg. Note that the message must have been allocated using
- * msg_new, and must nto have been submitted to any queue function.
- **/
-void camel_session_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *msg)
-{
- g_assert(CAMEL_IS_SESSION(session));
- g_assert(msg != NULL);
- g_assert(msg->ops != NULL);
-
- return CS_CLASS (session)->thread_msg_free(session, msg);
-}
-
-/**
- * camel_session_thread_queue:
- * @session:
- * @msg:
- * @flags: queue type flags, currently 0.
- *
- * Queue a thread message in another thread for processing.
- * The operation should be (but needn't) run in a queued manner
- * with other operations queued in this manner.
- *
- * Return value: The id of the operation queued.
- **/
-int camel_session_thread_queue(CamelSession *session, CamelSessionThreadMsg *msg, int flags)
-{
- g_assert(CAMEL_IS_SESSION(session));
- g_assert(msg != NULL);
-
- return CS_CLASS (session)->thread_queue(session, msg, flags);
-}
-
-/**
- * camel_session_thread_wait:
- * @session:
- * @id:
- *
- * Wait on an operation to complete (by id).
- **/
-void camel_session_thread_wait(CamelSession *session, int id)
-{
- g_assert(CAMEL_IS_SESSION(session));
-
- if (id == -1)
- return;
-
- return CS_CLASS (session)->thread_wait(session, id);
-}
-
-#endif
diff --git a/camel/camel-session.h b/camel/camel-session.h
deleted file mode 100644
index 0ae292f452..0000000000
--- a/camel/camel-session.h
+++ /dev/null
@@ -1,217 +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 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_SESSION_H
-#define CAMEL_SESSION_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-object.h>
-#include <camel/camel-provider.h>
-
-#include <e-util/e-msgport.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 gboolean (*CamelTimeoutCallback) (gpointer data);
-typedef enum {
- CAMEL_SESSION_ALERT_INFO,
- CAMEL_SESSION_ALERT_WARNING,
- CAMEL_SESSION_ALERT_ERROR
-} CamelSessionAlertType;
-
-struct _CamelSession
-{
- CamelObject parent_object;
- struct _CamelSessionPrivate *priv;
-
- char *storage_path;
- GHashTable *providers, *modules;
- gboolean online;
-};
-
-#ifdef ENABLE_THREADS
-typedef struct _CamelSessionThreadOps CamelSessionThreadOps;
-typedef struct _CamelSessionThreadMsg CamelSessionThreadMsg;
-#endif
-
-typedef struct {
- CamelObjectClass parent_class;
-
- void (*register_provider) (CamelSession *session,
- CamelProvider *provider);
- GList * (*list_providers) (CamelSession *session,
- gboolean load);
- CamelProvider * (*get_provider) (CamelSession *session,
- const char *url_string,
- CamelException *ex);
-
- CamelService * (*get_service) (CamelSession *session,
- const char *url_string,
- CamelProviderType type,
- CamelException *ex);
- char * (*get_storage_path) (CamelSession *session,
- CamelService *service,
- CamelException *ex);
-
- char * (*get_password) (CamelSession *session,
- const char *prompt,
- gboolean secret,
- CamelService *service,
- const char *item,
- CamelException *ex);
- void (*forget_password) (CamelSession *session,
- CamelService *service,
- const char *item,
- CamelException *ex);
- gboolean (*alert_user) (CamelSession *session,
- CamelSessionAlertType type,
- const char *prompt,
- gboolean cancel);
-
- guint (*register_timeout) (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data);
- gboolean (*remove_timeout) (CamelSession *session,
- guint handle);
-
- CamelFilterDriver * (*get_filter_driver) (CamelSession *session,
- const char *type,
- CamelException *ex);
-#ifdef ENABLE_THREADS
- /* mechanism for creating and maintaining multiple threads of control */
- void *(*thread_msg_new)(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size);
- void (*thread_msg_free)(CamelSession *session, CamelSessionThreadMsg *msg);
- int (*thread_queue)(CamelSession *session, CamelSessionThreadMsg *msg, int flags);
- void (*thread_wait)(CamelSession *session, int id);
-#endif
-
-} CamelSessionClass;
-
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_session_get_type (void);
-
-
-void camel_session_construct (CamelSession *session,
- const char *storage_path);
-
-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);
-
-char * camel_session_get_password (CamelSession *session,
- const char *prompt,
- gboolean secret,
- CamelService *service,
- const char *item,
- CamelException *ex);
-void camel_session_forget_password (CamelSession *session,
- CamelService *service,
- const char *item,
- CamelException *ex);
-gboolean camel_session_alert_user (CamelSession *session,
- CamelSessionAlertType type,
- const char *prompt,
- gboolean cancel);
-
-guint camel_session_register_timeout (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data);
-
-gboolean camel_session_remove_timeout (CamelSession *session,
- guint handle);
-
-
-gboolean camel_session_is_online (CamelSession *session);
-void camel_session_set_online (CamelSession *session,
- gboolean online);
-
-CamelFilterDriver *camel_session_get_filter_driver (CamelSession *session,
- const char *type,
- CamelException *ex);
-
-#ifdef ENABLE_THREADS
-struct _CamelSessionThreadOps {
- void (*receive)(CamelSession *session, struct _CamelSessionThreadMsg *m);
- void (*free)(CamelSession *session, struct _CamelSessionThreadMsg *m);
-};
-
-struct _CamelSessionThreadMsg {
- EMsg msg;
-
- CamelSessionThreadOps *ops;
- int id;
- /* user fields follow */
-};
-
-void *camel_session_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size);
-void camel_session_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *msg);
-int camel_session_thread_queue(CamelSession *session, CamelSessionThreadMsg *msg, int flags);
-void camel_session_thread_wait(CamelSession *session, int id);
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SESSION_H */
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
deleted file mode 100644
index 46ecf5c3a7..0000000000
--- a/camel/camel-smime-context.c
+++ /dev/null
@@ -1,953 +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 "camel-smime-context.h"
-
-#include "camel-mime-filter-from.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-fs.h"
-#include "camel-stream-mem.h"
-#include "camel-mime-part.h"
-#include "camel-multipart.h"
-
-#include "nss.h"
-#include <cms.h>
-#include <cert.h>
-#include <certdb.h>
-#include <pkcs11.h>
-#include <smime.h>
-
-#include <gtk/gtk.h> /* for _() macro */
-
-#define d(x)
-
-struct _CamelSMimeContextPrivate {
- CERTCertDBHandle *certdb;
-};
-
-
-static CamelMimeMessage *smime_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex);
-
-static CamelMimeMessage *smime_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-static CamelMimeMessage *smime_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-static CamelMimeMessage *smime_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex);
-
-static CamelMimeMessage *smime_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex);
-
-static CamelCMSContextClass *parent_class;
-
-static void
-camel_smime_context_init (CamelSMimeContext *context)
-{
- context->priv = g_new0 (struct _CamelSMimeContextPrivate, 1);
-}
-
-static void
-camel_smime_context_finalise (CamelObject *o)
-{
- CamelSMimeContext *context = (CamelSMimeContext *)o;
-
- g_free (context->encryption_key);
- g_free (context->priv);
-}
-
-static void
-camel_smime_context_class_init (CamelSMimeContextClass *camel_smime_context_class)
-{
- CamelCMSContextClass *camel_cms_context_class =
- CAMEL_CMS_CONTEXT_CLASS (camel_smime_context_class);
-
- parent_class = CAMEL_CMS_CONTEXT_CLASS (camel_type_get_global_classfuncs (camel_cms_context_get_type ()));
-
- camel_cms_context_class->sign = smime_sign;
- camel_cms_context_class->certsonly = smime_certsonly;
- camel_cms_context_class->encrypt = smime_encrypt;
- camel_cms_context_class->envelope = smime_envelope;
- camel_cms_context_class->decode = smime_decode;
-}
-
-CamelType
-camel_smime_context_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_cms_context_get_type (),
- "CamelSMimeContext",
- sizeof (CamelSMimeContext),
- sizeof (CamelSMimeContextClass),
- (CamelObjectClassInitFunc) camel_smime_context_class_init,
- NULL,
- (CamelObjectInitFunc) camel_smime_context_init,
- (CamelObjectFinalizeFunc) camel_smime_context_finalise);
- }
-
- return type;
-}
-
-
-/**
- * camel_smime_context_new:
- * @session: CamelSession
- * @encryption_key: preferred encryption key (used when attaching cert chains to messages)
- *
- * This creates a new CamelSMimeContext object which is used to sign,
- * verify, encrypt and decrypt streams.
- *
- * Return value: the new CamelSMimeContext
- **/
-CamelSMimeContext *
-camel_smime_context_new (CamelSession *session, const char *encryption_key)
-{
- CamelSMimeContext *context;
- CERTCertDBHandle *certdb;
-
- g_return_val_if_fail (session != NULL, NULL);
- g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
-
- certdb = CERT_GetDefaultCertDB ();
- if (!certdb)
- return NULL;
-
- context = CAMEL_SMIME_CONTEXT (camel_object_new (CAMEL_SMIME_CONTEXT_TYPE));
-
- camel_cms_context_construct (CAMEL_CMS_CONTEXT (context), session);
-
- context->encryption_key = g_strdup (encryption_key);
- context->priv->certdb = certdb;
-
- return context;
-}
-
-
-struct _GetPasswdData {
- CamelSession *session;
- const char *userid;
- CamelException *ex;
-};
-
-static char *
-smime_get_password (PK11SlotInfo *info, PRBool retry, void *arg)
-{
- CamelSession *session = ((struct _GetPasswdData *)arg)->session;
- const char *userid = ((struct _GetPasswdData *)arg)->userid;
- CamelException *ex = ((struct _GetPasswdData *)arg)->ex;
- char *prompt, *passwd, *ret;
-
- prompt = g_strdup_printf (_("Please enter your password for %s"), userid);
- passwd = camel_session_get_password (session, prompt, TRUE,
- NULL, userid, ex);
- g_free (prompt);
-
- ret = PL_strdup (passwd);
- g_free (passwd);
-
- return ret;
-}
-
-static PK11SymKey *
-decode_key_cb (void *arg, SECAlgorithmID *algid)
-{
- return (PK11SymKey *)arg;
-}
-
-
-static NSSCMSMessage *
-signed_data (CamelSMimeContext *ctx, const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex)
-{
- NSSCMSMessage *cmsg = NULL;
- NSSCMSContentInfo *cinfo;
- NSSCMSSignedData *sigd;
- NSSCMSSignerInfo *signerinfo;
- CERTCertificate *cert, *ekpcert;
-
- if (!userid) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Please indicate the nickname of a certificate to sign with."));
- return NULL;
- }
-
- if ((cert = CERT_FindCertByNickname (ctx->priv->certdb, (char *) userid)) == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("The signature certificate for \"%s\" does not exist."),
- userid);
- return NULL;
- }
-
- /* create the cms message object */
- cmsg = NSS_CMSMessage_Create (NULL);
-
- /* build chain of objects: message->signedData->data */
- sigd = NSS_CMSSignedData_Create (cmsg);
-
- cinfo = NSS_CMSMessage_GetContentInfo (cmsg);
- NSS_CMSContentInfo_SetContent_SignedData (cmsg, cinfo, sigd);
-
- cinfo = NSS_CMSSignedData_GetContentInfo (sigd);
-
- /* speciffy whether we want detached signatures or not */
- NSS_CMSContentInfo_SetContent_Data (cmsg, cinfo, NULL, detached);
-
- /* create & attach signer information */
- signerinfo = NSS_CMSSignerInfo_Create (cmsg, cert, SEC_OID_SHA1);
-
- /* include the cert chain */
- NSS_CMSSignerInfo_IncludeCerts (signerinfo, NSSCMSCM_CertChain,
- certUsageEmailSigner);
-
- if (signing_time) {
- NSS_CMSSignerInfo_AddSigningTime (signerinfo, PR_Now ());
- }
-
- if (TRUE) {
- /* Add S/MIME Capabilities */
- NSS_CMSSignerInfo_AddSMIMECaps (signerinfo);
- }
-
- if (ctx->encryption_key) {
- /* get the cert, add it to the message */
- ekpcert = CERT_FindCertByNickname (ctx->priv->certdb, ctx->encryption_key);
- if (!ekpcert) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("The encryption certificate for \"%s\" does not exist."),
- ctx->encryption_key);
- goto exception;
- }
-
- NSS_CMSSignerInfo_AddSMIMEEncKeyPrefs (signerinfo, ekpcert, ctx->priv->certdb);
-
- NSS_CMSSignedData_AddCertificate (sigd, ekpcert);
- } else {
- /* check signing cert for fitness as encryption cert */
- /* if yes, add signing cert as EncryptionKeyPreference */
- NSS_CMSSignerInfo_AddSMIMEEncKeyPrefs (signerinfo, cert, ctx->priv->certdb);
- }
-
- NSS_CMSSignedData_AddSignerInfo (sigd, signerinfo);
-
- return cmsg;
-
- exception:
-
- NSS_CMSMessage_Destroy (cmsg);
-
- return NULL;
-}
-
-static void
-smime_sign_restore (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);
-
- smime_sign_restore (part, encodings);
- *encodings = (*encodings)->next;
- }
- } else {
- CamelMimePartEncodingType encoding;
-
- if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- /* restore the message parts' subparts */
- smime_sign_restore (CAMEL_MIME_PART (wrapper), encodings);
- } else {
- encoding = GPOINTER_TO_INT ((*encodings)->data);
-
- camel_mime_part_set_encoding (mime_part, encoding);
- }
- }
-}
-
-static void
-smime_sign_prepare (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);
-
- smime_sign_prepare (part, encodings);
- }
- } else {
- CamelMimePartEncodingType encoding;
-
- if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- /* prepare the message parts' subparts */
- smime_sign_prepare (CAMEL_MIME_PART (wrapper), encodings);
- } else {
- 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));
- }
- }
-}
-
-
-static CamelMimeMessage *
-smime_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, gboolean signing_time,
- gboolean detached, CamelException *ex)
-{
- CamelMimeMessage *mesg = NULL;
- NSSCMSMessage *cmsg = NULL;
- struct _GetPasswdData *data;
- PLArenaPool *arena;
- NSSCMSEncoderContext *ecx;
- SECItem output = { 0, 0, 0 };
- CamelStream *stream;
- GSList *list, *encodings = NULL;
- GByteArray *buf;
-
- cmsg = signed_data (CAMEL_SMIME_CONTEXT (ctx), userid, signing_time, detached, ex);
- if (!cmsg)
- return NULL;
-
- arena = PORT_NewArena (1024);
- data = g_new (struct _GetPasswdData, 1);
- data->session = ctx->session;
- data->userid = userid;
- data->ex = ex;
- ecx = NSS_CMSEncoder_Start (cmsg, NULL, NULL, &output, arena,
- smime_get_password, data, NULL, NULL,
- NULL, NULL);
-
- stream = camel_stream_mem_new ();
-
- smime_sign_prepare (CAMEL_MIME_PART (message), &encodings);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- list = encodings;
- smime_sign_restore (CAMEL_MIME_PART (message), &list);
- g_slist_free (encodings);
-
- buf = CAMEL_STREAM_MEM (stream)->buffer;
-
- NSS_CMSEncoder_Update (ecx, buf->data, buf->len);
- NSS_CMSEncoder_Finish (ecx);
-
- camel_object_unref (CAMEL_OBJECT (stream));
- g_free (data);
-
- /* write the result to a camel stream */
- stream = camel_stream_mem_new ();
- camel_stream_write (stream, output.data, output.len);
- PORT_FreeArena (arena, PR_FALSE);
-
- NSS_CMSMessage_Destroy (cmsg);
-
- /* parse the stream into a new CamelMimeMessage */
- mesg = camel_mime_message_new ();
- camel_stream_reset (stream);
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return mesg;
-}
-
-
-static NSSCMSMessage *
-certsonly_data (CamelSMimeContext *ctx, const char *userid, GPtrArray *recipients, CamelException *ex)
-{
- NSSCMSMessage *cmsg = NULL;
- NSSCMSContentInfo *cinfo;
- NSSCMSSignedData *sigd;
- CERTCertificate **rcerts;
- int i = 0;
-
- /* find the signer's and the recipients' certs */
- rcerts = g_new (CERTCertificate *, recipients->len + 2);
- rcerts[0] = CERT_FindCertByNicknameOrEmailAddr (ctx->priv->certdb, (char *) userid);
- if (!rcerts[0]) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to find certificate for \"%s\"."),
- recipients->pdata[i]);
- goto exception;
- }
-
- for (i = 0; i < recipients->len; i++) {
- rcerts[i + 1] = CERT_FindCertByNicknameOrEmailAddr (ctx->priv->certdb,
- recipients->pdata[i]);
-
- if (!rcerts[i + 1]) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to find certificate for \"%s\"."),
- recipients->pdata[i]);
- goto exception;
- }
- }
- rcerts[i + 1] = NULL;
-
- /* create the cms message object */
- cmsg = NSS_CMSMessage_Create (NULL);
-
- sigd = NSS_CMSSignedData_CreateCertsOnly (cmsg, rcerts[0], PR_TRUE);
-
- /* add the recipient cert chain */
- for (i = 0; i < recipients->len; i++) {
- NSS_CMSSignedData_AddCertChain (sigd, rcerts[i]);
- }
-
- cinfo = NSS_CMSMessage_GetContentInfo (cmsg);
- NSS_CMSContentInfo_SetContent_SignedData (cmsg, cinfo, sigd);
-
- cinfo = NSS_CMSSignedData_GetContentInfo (sigd);
- NSS_CMSContentInfo_SetContent_Data (cmsg, cinfo, NULL, PR_FALSE);
-
- g_free (rcerts);
-
- return cmsg;
-
- exception:
-
- NSS_CMSMessage_Destroy (cmsg);
-
- g_free (rcerts);
-
- return NULL;
-}
-
-static CamelMimeMessage *
-smime_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- CamelMimeMessage *mesg = NULL;
- struct _GetPasswdData *data;
- NSSCMSMessage *cmsg = NULL;
- PLArenaPool *arena;
- NSSCMSEncoderContext *ecx;
- SECItem output = { 0, 0, 0 };
- CamelStream *stream;
- GByteArray *buf;
-
- cmsg = certsonly_data (CAMEL_SMIME_CONTEXT (ctx), userid, recipients, ex);
- if (!cmsg)
- return NULL;
-
- arena = PORT_NewArena (1024);
- data = g_new (struct _GetPasswdData, 1);
- data->session = ctx->session;
- data->userid = userid;
- data->ex = ex;
- ecx = NSS_CMSEncoder_Start (cmsg, NULL, NULL, &output, arena,
- smime_get_password, data, NULL, NULL,
- NULL, NULL);
-
- stream = camel_stream_mem_new ();
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
-
- NSS_CMSEncoder_Update (ecx, buf->data, buf->len);
- NSS_CMSEncoder_Finish (ecx);
-
- camel_object_unref (CAMEL_OBJECT (stream));
- g_free (data);
-
- /* write the result to a camel stream */
- stream = camel_stream_mem_new ();
- camel_stream_write (stream, output.data, output.len);
- PORT_FreeArena (arena, PR_FALSE);
-
- NSS_CMSMessage_Destroy (cmsg);
-
- /* parse the stream into a new CamelMimeMessage */
- mesg = camel_mime_message_new ();
- camel_stream_reset (stream);
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return mesg;
-}
-
-
-static NSSCMSMessage *
-enveloped_data (CamelSMimeContext *ctx, const char *userid, GPtrArray *recipients, CamelException *ex)
-{
- NSSCMSMessage *cmsg = NULL;
- NSSCMSContentInfo *cinfo;
- NSSCMSEnvelopedData *envd;
- NSSCMSRecipientInfo *rinfo;
- CERTCertificate **rcerts;
- SECOidTag bulkalgtag;
- int keysize, i;
-
- /* find the recipient certs by email address or nickname */
- rcerts = g_new (CERTCertificate *, recipients->len + 2);
- rcerts[0] = CERT_FindCertByNicknameOrEmailAddr (ctx->priv->certdb, (char *) userid);
- if (!rcerts[0]) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to find certificate for \"%s\"."),
- userid);
- goto exception;
- }
-
- for (i = 0; i < recipients->len; i++) {
- rcerts[i + 1] = CERT_FindCertByNicknameOrEmailAddr (ctx->priv->certdb,
- recipients->pdata[i]);
- if (!rcerts[i + 1]) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to find certificate for \"%s\"."),
- recipients->pdata[i]);
- goto exception;
- }
- }
- rcerts[i + 1] = NULL;
-
- /* find a nice bulk algorithm */
- if (!NSS_SMIMEUtil_FindBulkAlgForRecipients (rcerts, &bulkalgtag, &keysize)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to find a common bulk algorithm."));
- goto exception;
- }
-
- /* create a cms message object */
- cmsg = NSS_CMSMessage_Create (NULL);
-
- envd = NSS_CMSEnvelopedData_Create (cmsg, bulkalgtag, keysize);
- cinfo = NSS_CMSMessage_GetContentInfo (cmsg);
- NSS_CMSContentInfo_SetContent_EnvelopedData (cmsg, cinfo, envd);
-
- cinfo = NSS_CMSEnvelopedData_GetContentInfo (envd);
- NSS_CMSContentInfo_SetContent_Data (cmsg, cinfo, NULL, PR_FALSE);
-
- /* create & attach recipient information */
- for (i = 0; rcerts[i] != NULL; i++) {
- rinfo = NSS_CMSRecipientInfo_Create (cmsg, rcerts[i]);
- NSS_CMSEnvelopedData_AddRecipient (envd, rinfo);
- }
-
- g_free (rcerts);
-
- return cmsg;
-
- exception:
-
- NSS_CMSMessage_Destroy (cmsg);
-
- g_free (rcerts);
-
- return NULL;
-}
-
-static CamelMimeMessage *
-smime_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- CamelMimeMessage *mesg = NULL;
- struct _GetPasswdData *data;
- NSSCMSMessage *cmsg = NULL;
- PLArenaPool *arena;
- NSSCMSEncoderContext *ecx;
- SECItem output = { 0, 0, 0 };
- CamelStream *stream;
- GByteArray *buf;
-
- cmsg = enveloped_data (CAMEL_SMIME_CONTEXT (ctx), userid, recipients, ex);
- if (!cmsg)
- return NULL;
-
- arena = PORT_NewArena (1024);
- data = g_new (struct _GetPasswdData, 1);
- data->session = ctx->session;
- data->userid = userid;
- data->ex = ex;
- ecx = NSS_CMSEncoder_Start (cmsg, NULL, NULL, &output, arena,
- smime_get_password, data, NULL, NULL,
- NULL, NULL);
-
- stream = camel_stream_mem_new ();
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
-
- NSS_CMSEncoder_Update (ecx, buf->data, buf->len);
- NSS_CMSEncoder_Finish (ecx);
-
- camel_object_unref (CAMEL_OBJECT (stream));
- g_free (data);
-
- /* write the result to a camel stream */
- stream = camel_stream_mem_new ();
- camel_stream_write (stream, output.data, output.len);
- PORT_FreeArena (arena, PR_FALSE);
-
- NSS_CMSMessage_Destroy (cmsg);
-
- /* parse the stream into a new CamelMimeMessage */
- mesg = camel_mime_message_new ();
- camel_stream_reset (stream);
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return mesg;
-}
-
-
-struct _BulkKey {
- PK11SymKey *bulkkey;
- SECOidTag bulkalgtag;
- int keysize;
-};
-
-static NSSCMSMessage *
-encrypted_data (CamelSMimeContext *ctx, GByteArray *input, struct _BulkKey *key,
- CamelStream *ostream, CamelException *ex)
-{
- NSSCMSMessage *cmsg = NULL;
- NSSCMSContentInfo *cinfo;
- NSSCMSEncryptedData *encd;
- NSSCMSEncoderContext *ecx = NULL;
- PLArenaPool *arena = NULL;
- SECItem output = { 0, 0, 0 };
-
- /* arena for output */
- arena = PORT_NewArena (1024);
-
- /* create cms message object */
- cmsg = NSS_CMSMessage_Create (NULL);
-
- encd = NSS_CMSEncryptedData_Create (cmsg, key->bulkalgtag, key->keysize);
-
- cinfo = NSS_CMSMessage_GetContentInfo (cmsg);
- NSS_CMSContentInfo_SetContent_EncryptedData (cmsg, cinfo, encd);
-
- cinfo = NSS_CMSEncryptedData_GetContentInfo (encd);
- NSS_CMSContentInfo_SetContent_Data (cmsg, cinfo, NULL, PR_FALSE);
-
- ecx = NSS_CMSEncoder_Start (cmsg, NULL, NULL, &output, arena, NULL, NULL,
- decode_key_cb, key->bulkkey, NULL, NULL);
-
- NSS_CMSEncoder_Update (ecx, input->data, input->len);
-
- NSS_CMSEncoder_Finish (ecx);
-
- camel_stream_write (ostream, output.data, output.len);
-
- if (arena)
- PORT_FreeArena (arena, PR_FALSE);
-
- return cmsg;
-}
-
-static struct _BulkKey *
-get_bulkkey (CamelSMimeContext *ctx, const char *userid, GPtrArray *recipients, CamelException *ex)
-{
- struct _BulkKey *bulkkey = NULL;
- NSSCMSMessage *env_cmsg;
- NSSCMSContentInfo *cinfo;
- SECItem dummyOut = { 0, 0, 0 };
- SECItem dummyIn = { 0, 0, 0 };
- char str[] = "You are not a beautiful and unique snowflake.";
- PLArenaPool *arena;
- int i, nlevels;
-
- /* construct an enveloped data message to obtain bulk keys */
- arena = PORT_NewArena (1024);
- dummyIn.data = (unsigned char *)str;
- dummyIn.len = strlen (str);
-
- env_cmsg = enveloped_data (ctx, userid, recipients, ex);
- NSS_CMSDEREncode (env_cmsg, &dummyIn, &dummyOut, arena);
- /*camel_stream_write (envstream, dummyOut.data, dummyOut.len);*/
- PORT_FreeArena (arena, PR_FALSE);
-
- /* get the content info for the enveloped data */
- nlevels = NSS_CMSMessage_ContentLevelCount (env_cmsg);
- for (i = 0; i < nlevels; i++) {
- SECOidTag typetag;
-
- cinfo = NSS_CMSMessage_ContentLevel (env_cmsg, i);
- typetag = NSS_CMSContentInfo_GetContentTypeTag (cinfo);
- if (typetag == SEC_OID_PKCS7_DATA) {
- bulkkey = g_new (struct _BulkKey, 1);
-
- /* get the symmertic key */
- bulkkey->bulkalgtag = NSS_CMSContentInfo_GetContentEncAlgTag (cinfo);
- bulkkey->keysize = NSS_CMSContentInfo_GetBulkKeySize (cinfo);
- bulkkey->bulkkey = NSS_CMSContentInfo_GetBulkKey (cinfo);
-
- return bulkkey;
- }
- }
-
- return NULL;
-}
-
-static CamelMimeMessage *
-smime_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
- const char *userid, GPtrArray *recipients,
- CamelException *ex)
-{
- struct _BulkKey *bulkkey = NULL;
- CamelMimeMessage *mesg = NULL;
- NSSCMSMessage *cmsg = NULL;
- CamelStream *stream;
- GByteArray *buf;
-
- bulkkey = get_bulkkey (CAMEL_SMIME_CONTEXT (ctx), userid, recipients, ex);
- if (!bulkkey)
- return NULL;
-
- buf = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), buf);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- stream = camel_stream_mem_new ();
- cmsg = encrypted_data (CAMEL_SMIME_CONTEXT (ctx), buf, bulkkey, stream, ex);
- g_byte_array_free (buf, TRUE);
- g_free (bulkkey);
- if (!cmsg) {
- camel_object_unref (CAMEL_OBJECT (stream));
- return NULL;
- }
-
- NSS_CMSMessage_Destroy (cmsg);
-
- /* parse the stream into a new CamelMimeMessage */
- mesg = camel_mime_message_new ();
- camel_stream_reset (stream);
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return mesg;
-}
-
-
-static NSSCMSMessage *
-decode_data (CamelSMimeContext *ctx, GByteArray *input, CamelStream *ostream,
- CamelCMSValidityInfo **info, CamelException *ex)
-{
- NSSCMSDecoderContext *dcx;
- struct _GetPasswdData *data;
- CamelCMSValidityInfo *vinfo = NULL;
- NSSCMSMessage *cmsg = NULL;
- NSSCMSContentInfo *cinfo;
- NSSCMSSignedData *sigd = NULL;
- NSSCMSEnvelopedData *envd;
- NSSCMSEncryptedData *encd;
- int nlevels, i, nsigners, j;
- char *signercn;
- NSSCMSSignerInfo *si;
- SECOidTag typetag;
- SECItem *item;
-
- data = g_new (struct _GetPasswdData, 1);
- data->session = CAMEL_CMS_CONTEXT (ctx)->session;
- data->userid = NULL;
- data->ex = ex;
-
- dcx = NSS_CMSDecoder_Start (NULL,
- NULL, NULL,
- smime_get_password, data,
- decode_key_cb,
- NULL);
-
- NSS_CMSDecoder_Update (dcx, input->data, input->len);
-
- cmsg = NSS_CMSDecoder_Finish (dcx);
- g_free (data);
- if (cmsg == NULL) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to decode message."));
- return NULL;
- }
-
- nlevels = NSS_CMSMessage_ContentLevelCount (cmsg);
- for (i = 0; i < nlevels; i++) {
- CamelCMSSigner *signers = NULL;
-
- cinfo = NSS_CMSMessage_ContentLevel (cmsg, i);
- typetag = NSS_CMSContentInfo_GetContentTypeTag (cinfo);
-
- if (info && !vinfo) {
- vinfo = g_new0 (CamelCMSValidityInfo, 1);
- *info = vinfo;
- } else if (vinfo) {
- vinfo->next = g_new0 (CamelCMSValidityInfo, 1);
- vinfo = vinfo->next;
- }
-
- switch (typetag) {
- case SEC_OID_PKCS7_SIGNED_DATA:
- if (vinfo)
- vinfo->type = CAMEL_CMS_TYPE_SIGNED;
-
- sigd = (NSSCMSSignedData *)NSS_CMSContentInfo_GetContent (cinfo);
-
- /* import the certificates */
- NSS_CMSSignedData_ImportCerts (sigd, ctx->priv->certdb,
- certUsageEmailSigner, PR_FALSE);
-
- /* find out about signers */
- nsigners = NSS_CMSSignedData_SignerInfoCount (sigd);
-
- if (nsigners == 0) {
- /* must be a cert transport message */
- SECStatus retval;
-
- /* XXX workaround for bug #54014 */
- NSS_CMSSignedData_ImportCerts (sigd, ctx->priv->certdb,
- certUsageEmailSigner, PR_TRUE);
-
- retval = NSS_CMSSignedData_VerifyCertsOnly (sigd, ctx->priv->certdb,
- certUsageEmailSigner);
- if (retval != SECSuccess) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to verify certificates."));
- goto exception;
- }
-
- return cmsg;
- }
-
- for (j = 0; vinfo && j < nsigners; j++) {
- if (!signers) {
- signers = g_new0 (CamelCMSSigner, 1);
- vinfo->signers = signers;
- } else {
- signers->next = g_new0 (CamelCMSSigner, 1);
- signers = signers->next;
- }
-
- si = NSS_CMSSignedData_GetSignerInfo (sigd, j);
- signercn = NSS_CMSSignerInfo_GetSignerCommonName (si);
- if (signercn == NULL)
- signercn = "";
-
- NSS_CMSSignedData_VerifySignerInfo (sigd, j, ctx->priv->certdb,
- certUsageEmailSigner);
-
- if (signers) {
- signers->signercn = g_strdup (signercn);
- signers->status = g_strdup (
- NSS_CMSUtil_VerificationStatusToString (
- NSS_CMSSignerInfo_GetVerificationStatus (si)));
- }
- }
- break;
- case SEC_OID_PKCS7_ENVELOPED_DATA:
- if (vinfo)
- vinfo->type = CAMEL_CMS_TYPE_ENVELOPED;
-
- envd = (NSSCMSEnvelopedData *)NSS_CMSContentInfo_GetContent (cinfo);
- break;
- case SEC_OID_PKCS7_ENCRYPTED_DATA:
- if (vinfo)
- vinfo->type = CAMEL_CMS_TYPE_ENCRYPTED;
-
- encd = (NSSCMSEncryptedData *)NSS_CMSContentInfo_GetContent (cinfo);
- break;
- case SEC_OID_PKCS7_DATA:
- break;
- default:
- break;
- }
- }
-
- item = NSS_CMSMessage_GetContent (cmsg);
- camel_stream_write (ostream, item->data, item->len);
-
- return cmsg;
-
- exception:
-
- if (info)
- camel_cms_validity_info_free (*info);
-
- if (cmsg)
- NSS_CMSMessage_Destroy (cmsg);
-
- return NULL;
-}
-
-
-static CamelMimeMessage *
-smime_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex)
-{
- CamelMimeMessage *mesg = NULL;
- NSSCMSMessage *cmsg = NULL;
- CamelStream *stream, *ostream;
- GByteArray *buf;
-
- stream = camel_stream_mem_new ();
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- buf = CAMEL_STREAM_MEM (stream)->buffer;
-
- ostream = camel_stream_mem_new ();
- cmsg = decode_data (CAMEL_SMIME_CONTEXT (ctx), buf, ostream, info, ex);
- camel_object_unref (CAMEL_OBJECT (stream));
- if (!cmsg) {
- camel_object_unref (CAMEL_OBJECT (ostream));
- return NULL;
- }
-
- /* construct a new mime message from the stream */
- mesg = camel_mime_message_new ();
- camel_stream_reset (ostream);
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), ostream);
- camel_object_unref (CAMEL_OBJECT (ostream));
-
- return mesg;
-}
-
-#endif /* HAVE_NSS */
diff --git a/camel/camel-smime-context.h b/camel/camel-smime-context.h
deleted file mode 100644
index d1c54d1bfc..0000000000
--- a/camel/camel-smime-context.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_SMIME_CONTEXT_H
-#define CAMEL_SMIME_CONTEXT_H
-
-#include <camel/camel-session.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-cms-context.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CAMEL_SMIME_CONTEXT_TYPE (camel_smime_context_get_type ())
-#define CAMEL_SMIME_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SMIME_CONTEXT_TYPE, CamelSMimeContext))
-#define CAMEL_SMIME_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SMIME_CONTEXT_TYPE, CamelSMimeContextClass))
-#define CAMEL_IS_SMIME_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SMIME_CONTEXT_TYPE))
-
-typedef struct _CamelSMimeContext {
- CamelCMSContext parent_object;
-
- struct _CamelSMimeContextPrivate *priv;
-
- char *encryption_key;
-} CamelSMimeContext;
-
-typedef struct _CamelSMimeContextClass {
- CamelCMSContextClass parent_class;
-
-} CamelSMimeContextClass;
-
-
-CamelType camel_smime_context_get_type (void);
-
-CamelSMimeContext *camel_smime_context_new (CamelSession *session, const char *encryption_key);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SMIME_CONTEXT_H */
diff --git a/camel/camel-smime-utils.c b/camel/camel-smime-utils.c
deleted file mode 100644
index cf588898f3..0000000000
--- a/camel/camel-smime-utils.c
+++ /dev/null
@@ -1,126 +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-smime-utils.h"
-#include "camel-multipart.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define d(x) x
-
-/** rfc2633 stuff (aka S/MIME v3) ********************************/
-
-gboolean
-camel_smime_is_smime_v3_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/pkcs7-signature" */
- param = header_content_type_param (type, "protocol");
- if (!param || g_strcasecmp (param, "application/pkcs7-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/pkcs7-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", "pkcs7-signature"))
- return FALSE;
-
- /* The second part should be application/pkcs7-signature. */
- part = camel_multipart_get_part (mp, 1);
- type = camel_mime_part_get_content_type (part);
- if (!header_content_type_is (type, "application", "pkcs7-signature"))
- return FALSE;
-
- return TRUE;
-}
-
-gboolean
-camel_smime_is_smime_v3_encrypted (CamelMimePart *mime_part)
-{
- char *types[] = { "p7m", "p7c", "p7s", NULL };
- const gchar *param, *filename;
- CamelContentType *type;
- int i;
-
- /* check that we have a application/pkcs7-mime part */
- type = camel_mime_part_get_content_type (mime_part);
- if (header_content_type_is (type, "application", "pkcs7-mime")) {
- /* check to make sure it's an encrypted pkcs7-mime part? */
- return TRUE;
- }
-
- if (header_content_type_is (type, "application", "octent-stream")) {
- /* check to see if we have a paremeter called "smime-type" */
- param = header_content_type_param (type, "smime-type");
- if (param)
- return TRUE;
-
- /* check to see if there is a name param and if it has a smime extension */
- param = header_content_type_param (type, "smime-type");
- if (param && *param && strlen (param) > 4) {
- for (i = 0; types[i]; i++)
- if (!g_strcasecmp (param + strlen (param)-4, types[i]))
- return TRUE;
- }
-
- /* check to see if there is a name param and if it has a smime extension */
- filename = camel_mime_part_get_filename (mime_part);
- if (filename && *filename && strlen (filename) > 4) {
- for (i = 0; types[i]; i++)
- if (!g_strcasecmp (filename + strlen (filename)-4, types[i]))
- return TRUE;
- }
- }
-
- return FALSE;
-}
diff --git a/camel/camel-smime-utils.h b/camel/camel-smime-utils.h
deleted file mode 100644
index 4d955baa77..0000000000
--- a/camel/camel-smime-utils.h
+++ /dev/null
@@ -1,43 +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_SMIME_UTILS_H
-#define CAMEL_SMIME_UTILS_H
-
-#include <glib.h>
-#include <camel/camel-mime-part.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-gboolean camel_smime_is_smime_v3_signed (CamelMimePart *part);
-
-gboolean camel_smime_is_smime_v3_encrypted (CamelMimePart *part);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! CAMEL_SMIME_UTILS_H */
diff --git a/camel/camel-store.c b/camel/camel-store.c
deleted file mode 100644
index 31b410604e..0000000000
--- a/camel/camel-store.c
+++ /dev/null
@@ -1,943 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 <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,
- guint32 flags, 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 construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-
-static void
-camel_store_class_init (CamelStoreClass *camel_store_class)
-{
- CamelObjectClass *camel_object_class =
- CAMEL_OBJECT_CLASS (camel_store_class);
- CamelServiceClass *camel_service_class = CAMEL_SERVICE_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_service_class->construct = construct;
-
- 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;
-
- /* set vtrash on by default */
- store->flags = CAMEL_STORE_VTRASH;
-
- 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 void
-construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelStore *store = CAMEL_STORE(service);
-
- parent_class->construct(service, session, provider, url, ex);
- if (camel_exception_is_set (ex))
- return;
-
- if (camel_url_get_param(url, "filter"))
- store->flags |= CAMEL_STORE_FILTER_INBOX;
-}
-
-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)));
-
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_INVALID,
- _("Cannot create folder: Invalid operation on this 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);
-
- /* if we deleted a folder, force it out of the cache, and also out of the vtrash if setup */
- if (store->folders) {
- CamelFolder *folder;
- char *key;
-
- CAMEL_STORE_LOCK(store, cache_lock);
- if (g_hash_table_lookup_extended(store->folders, folder_name, (void **)&key, (void **)&folder)) {
- g_hash_table_remove(store->folders, key);
- g_free(key);
- camel_object_ref (CAMEL_OBJECT (folder));
- CAMEL_STORE_UNLOCK(store, cache_lock);
- if (store->vtrash)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vtrash, folder);
- camel_object_unref (CAMEL_OBJECT (folder));
- } else {
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
- }
-
- 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)
-{
- char *key;
- CamelFolder *folder;
-
- if (strcmp(old_name, new_name) == 0)
- return;
-
- CAMEL_STORE_LOCK(store, folder_lock);
- CS_CLASS (store)->rename_folder (store, old_name, new_name, ex);
-
- /* remove the old name from the cache if it is there */
- CAMEL_STORE_LOCK(store, cache_lock);
- if (g_hash_table_lookup_extended(store->folders, old_name, (void **)&key, (void **)&folder)) {
- g_hash_table_remove(store->folders, key);
- g_free(key);
-
- camel_object_ref (CAMEL_OBJECT (folder));
-
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
- if (store->vtrash)
- camel_vee_folder_remove_folder (CAMEL_VEE_FOLDER (store->vtrash), folder);
- camel_object_unref (CAMEL_OBJECT (folder));
- } else {
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
-
- 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)
-{
- if ((store->flags & CAMEL_STORE_VTRASH) == 0)
- return;
-
- store->vtrash = camel_vtrash_folder_new (store, CAMEL_VTRASH_NAME);
-
- 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;
-
- if ((store->flags & CAMEL_STORE_VTRASH) == 0)
- return NULL;
-
- 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);
-
- camel_object_unref (CAMEL_OBJECT (folder));
- g_free (key);
-}
-
-static void
-copy_folder_cache (gpointer key, gpointer folder, gpointer hash)
-{
- g_hash_table_insert ((GHashTable *) hash, g_strdup (key), folder);
- camel_object_ref (CAMEL_OBJECT (folder));
-}
-
-static void
-store_sync (CamelStore *store, CamelException *ex)
-{
- if (store->folders) {
- CamelException internal_ex;
- GHashTable *hash;
-
- hash = g_hash_table_new (CS_CLASS (store)->hash_folder_name,
- CS_CLASS (store)->compare_folder_name);
-
- camel_exception_init (&internal_ex);
- CAMEL_STORE_LOCK(store, cache_lock);
- g_hash_table_foreach (store->folders, copy_folder_cache, hash);
- CAMEL_STORE_UNLOCK(store, cache_lock);
- camel_exception_xfer (ex, &internal_ex);
-
- g_hash_table_foreach (hash, sync_folder, &internal_ex);
- g_hash_table_destroy (hash);
- }
-}
-
-/**
- * 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,
- guint32 flags, 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
- * @flags: various CAMEL_STORE_FOLDER_INFO_* flags to control behavior
- * @ex: a CamelException
- *
- * This fetches information about the folder structure of @store,
- * starting with @top, and returns a tree of CamelFolderInfo
- * structures. If @flags includes %CAMEL_STORE_FOLDER_INFO_SUBSCRIBED,
- * only subscribed folders will be listed. (This flag can only be used
- * for stores that support subscriptions.) If @flags includes
- * %CAMEL_STORE_FOLDER_INFO_RECURSIVE, the returned tree will include
- * all levels of hierarchy below @top. If not, it will only include
- * the immediate subfolders of @top. If @flags includes
- * %CAMEL_STORE_FOLDER_INFO_FAST, the unread_message_count fields of
- * some or all of the structures may be set to -1, if the store cannot
- * determine that information quickly.
- *
- * 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,
- guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *ret;
-
- g_return_val_if_fail (CAMEL_IS_STORE (store), NULL);
- g_return_val_if_fail ((store->flags & CAMEL_STORE_SUBSCRIPTIONS) ||
- !(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED),
- NULL);
-
- CAMEL_STORE_LOCK(store, folder_lock);
- ret = CS_CLASS (store)->get_folder_info (store, top, flags, 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->path);
- g_free (fi->url);
- g_free (fi);
- }
-}
-
-
-/**
- * camel_folder_info_build_path:
- * @fi: folder info
- * @separator: directory separator
- *
- * Sets the folder info path based on the folder's full name and
- * directory separator.
- **/
-void
-camel_folder_info_build_path (CamelFolderInfo *fi, char separator)
-{
- fi->path = g_strdup_printf("/%s", fi->full_name);
- if (separator != '/') {
- char *p;
-
- p = fi->path;
- while ((p = strchr (p, separator)))
- *p = '/';
- }
-}
-
-/**
- * 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++;
-
- /* set the path if it isn't already set */
- if (!fi->path)
- camel_folder_info_build_path (fi, separator);
-
- 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 {
- CamelURL *url;
- char *sep;
-
- 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);
-
- url = camel_url_new (fi->url, NULL);
- sep = strrchr (url->path, separator);
- if (sep)
- *sep = '\0';
- else
- g_warning ("huh, no \"%c\" in \"%s\"?", separator, fi->url);
-
- /* FIXME: wtf is this? This is WRONG. Parent folders can be selectable */
- camel_url_set_param (url, "noselect", "yes");
- pfi->url = camel_url_to_string (url, 0);
- camel_url_free (url);
-
- 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);
-}
-
-
-int
-camel_mkdir_hier (const char *path, mode_t mode)
-{
- char *copy, *p;
-
- p = copy = g_strdup (path);
- do {
- p = strchr (p + 1, '/');
- if (p)
- *p = '\0';
- if (access (copy, F_OK) == -1) {
- if (mkdir (copy, mode) == -1) {
- g_free (copy);
- return -1;
- }
- }
- if (p)
- *p = '/';
- } while (p);
-
- g_free (copy);
- return 0;
-}
diff --git a/camel/camel-store.h b/camel/camel-store.h
deleted file mode 100644
index 8f7f566d3a..0000000000
--- a/camel/camel-store.h
+++ /dev/null
@@ -1,206 +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 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_STORE_H
-#define CAMEL_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-/* for mode_t */
-#include <sys/types.h>
-
-#include <camel/camel-object.h>
-#include <camel/camel-service.h>
-
-
-typedef struct _CamelFolderInfo {
- struct _CamelFolderInfo *parent,
- *sibling,
- *child;
- char *url;
- char *name;
- char *full_name;
- char *path;
- 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)
-#define CAMEL_STORE_VTRASH (1 << 1)
-#define CAMEL_STORE_FILTER_INBOX (1 << 2)
-
-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 */
-
-#define CAMEL_STORE_FOLDER_INFO_FAST (1 << 0)
-#define CAMEL_STORE_FOLDER_INFO_RECURSIVE (1 << 1)
-#define CAMEL_STORE_FOLDER_INFO_SUBSCRIBED (1 << 2)
-
-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);
-
- CamelFolderInfo *(*get_folder_info) (CamelStore *store,
- const char *top,
- guint32 flags,
- 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,
- guint32 flags,
- 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);
-void camel_folder_info_build_path (CamelFolderInfo *fi,
- char separator);
-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);
-
-
-/* utility needed by some stores */
-int camel_mkdir_hier (const char *path, mode_t mode);
-
-#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 6f1aef96ab..0000000000
--- a/camel/camel-stream-buffer.c
+++ /dev/null
@@ -1,467 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 <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);
-}
-
-/* only returns the number passed in, or -1 on an error */
-static ssize_t
-stream_write_all(CamelStream *stream, const char *buffer, size_t n)
-{
- size_t left = n, w;
-
- while (left > 0) {
- w = camel_stream_write(stream, buffer, left);
- if (w == -1)
- return -1;
- left -= w;
- buffer += w;
- }
-
- return n;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
- ssize_t total = n;
- ssize_t left, todo;
-
- g_return_val_if_fail( (sbf->mode & CAMEL_STREAM_BUFFER_MODE) == CAMEL_STREAM_BUFFER_WRITE, 0);
-
- /* first, copy as much as we can */
- left = sbf->size - (sbf->ptr-sbf->buf);
- todo = MIN(left, n);
-
- memcpy(sbf->ptr, buffer, todo);
- n -= todo;
- buffer += todo;
- sbf->ptr += todo;
-
- /* if we've filled the buffer, write it out, reset buffer */
- if (left == todo) {
- if (stream_write_all(sbf->stream, sbf->buf, sbf->size) == -1)
- return -1;
-
- sbf->ptr = sbf->buf;
- }
-
- /* if we still have more, write directly, or copy to buffer */
- if (n > 0) {
- if (n >= sbf->size/3) {
- if (stream_write_all(sbf->stream, buffer, n) == -1)
- return -1;
- } else {
- memcpy(sbf->ptr, buffer, n);
- sbf->ptr += n;
- }
- }
-
- 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 c2a3841cce..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@ximian.com>
- *
- * Copyright 2000 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_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 47817e2b16..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 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 c48356ad07..0000000000
--- a/camel/camel-stream-filter.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 f7c5900325..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@ximian.com>
- *
- * Copyright 1999, 2000 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 <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 cc7a337a22..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 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_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 7389045567..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@ximian.com>
- *
- * Copyright 1999, 2000 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 <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 fb95c4bd25..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@ximian.com>
- *
- * Copyright 1999, 2000 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_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 7e99a9c38d..0000000000
--- a/camel/camel-stream-null.c
+++ /dev/null
@@ -1,92 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 "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) { ((CamelStreamNull *)stream)->written += 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) { ((CamelStreamNull *)stream)->written = 0; 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_null_new:
- *
- * Returns a NULL stream. A null stream is always at eof, and
- * always returns success for all reads and writes.
- *
- * Return value: the stream
- **/
-CamelStream *
-camel_stream_null_new(void)
-{
- return (CamelStream *)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 20214e23a5..0000000000
--- a/camel/camel-stream-null.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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;
-
- size_t written;
-};
-
-struct _CamelStreamNullClass {
- CamelStreamClass parent_class;
-};
-
-guint camel_stream_null_get_type (void);
-
-CamelStream *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 80391843f0..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 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 <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 0927bff85f..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 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_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 a940f2419a..0000000000
--- a/camel/camel-tcp-stream-openssl.c
+++ /dev/null
@@ -1,670 +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 "camel-tcp-stream-openssl.h"
-
-#include <openssl/ssl.h>
-#include <openssl/x509.h>
-#include <openssl/err.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-session.h"
-#include "camel-service.h"
-#include "camel-operation.h"
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-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 void
-errlib_error_to_errno (int ret)
-{
- long error;
-
- error = ERR_get_error ();
- if (error == 0) {
- if (ret == 0)
- errno = EINVAL; /* unexpected EOF */
- /* otherwise errno should be set */
- } else {
- /* ok, we get the shaft now. */
- errno = EINTR;
- }
-}
-
-static void
-ssl_error_to_errno (SSL *ssl, int ret)
-{
- /* hm, a CamelException might be useful right about now! */
-
- switch (SSL_get_error (ssl, ret)) {
- case SSL_ERROR_NONE:
- errno = 0;
- return;
- case SSL_ERROR_ZERO_RETURN:
- /* this one does not map well at all */
- errno = EINVAL;
- return;
- case SSL_ERROR_WANT_READ: /* non-fatal; retry */
- case SSL_ERROR_WANT_WRITE: /* non-fatal; retry */
- case SSL_ERROR_WANT_X509_LOOKUP: /* non-fatal; retry */
- errno = EAGAIN;
- return;
- case SSL_ERROR_SYSCALL:
- errlib_error_to_errno (ret);
- return;
- case SSL_ERROR_SSL:
- errlib_error_to_errno (-1);
- return;
- }
-}
-
-static int
-my_SSL_read (SSL *ssl, void *buf, int num)
-{
- int ret;
-
- do
- ret = SSL_read (ssl, buf, num);
- while (ret < 0 && (SSL_get_error (ssl, ret) == SSL_ERROR_WANT_READ ||
- SSL_get_error (ssl, ret) == SSL_ERROR_WANT_WRITE));
- return ret;
-}
-
-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 = my_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);
-
- do {
- nread = my_SSL_read (tcp_stream_openssl->priv->ssl, buffer, n);
-
- if (nread == 0)
- return nread;
-
- if (nread == -1 && errno == EAGAIN) {
- 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;
- }
- }
- } while (nread == -1 && errno == EAGAIN);
-
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags);
- }
-
- if (nread == -1)
- ssl_error_to_errno (tcp_stream_openssl->priv->ssl, -1);
-
- return nread;
-}
-
-static int
-my_SSL_write (SSL *ssl, const void *buf, int num)
-{
- int ret;
-
- do
- ret = SSL_write (ssl, buf, num);
- while (ret < 0 && (SSL_get_error (ssl, ret) == SSL_ERROR_WANT_READ ||
- SSL_get_error (ssl, ret) == SSL_ERROR_WANT_WRITE));
- return ret;
-}
-
-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 = my_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 = my_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);
- if (w == -1)
- written = -1;
- }
-
- if (written == -1)
- ssl_error_to_errno (tcp_stream_openssl->priv->ssl, -1);
-
- 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)
-{
- CamelTcpStreamOpenSSL *stream;
- X509 *cert;
- SSL *ssl;
- int err;
-
- ssl = X509_STORE_CTX_get_ex_data (ctx, SSL_get_ex_data_X509_STORE_CTX_idx ());
-
- stream = SSL_CTX_get_app_data (ssl->ctx);
-
- cert = X509_STORE_CTX_get_current_cert (ctx);
- err = X509_STORE_CTX_get_error (ctx);
-
- if (!ok && stream) {
- CamelService *service = stream->priv->service;
- char *prompt, *cert_str;
- char buf[257];
-
-#define GET_STRING(name) X509_NAME_oneline (name, buf, 256)
-
- cert_str = g_strdup_printf (_("Issuer: %s\n"
- "Subject: %s"),
- GET_STRING (X509_get_issuer_name (cert)),
- GET_STRING (X509_get_subject_name (cert)));
-
- prompt = g_strdup_printf (_("Bad certificate from %s:\n\n%s\n\n"
- "Do you wish to accept anyway?"),
- service->url->host, cert_str);
-
- ok = camel_session_alert_user (service->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE);
- g_free (prompt);
- }
-
- return ok;
-}
-
-static SSL *
-open_ssl_connection (CamelService *service, int sockfd, CamelTcpStreamOpenSSL *openssl)
-{
- SSL_CTX *ssl_ctx = NULL;
- SSL *ssl = NULL;
- int n;
-
- SSLeay_add_ssl_algorithms();
- SSL_load_error_strings();
-
- /* SSLv23_client_method will negotiate with SSL v2, v3, or TLS v1 */
- ssl_ctx = SSL_CTX_new (SSLv23_client_method ());
- g_return_val_if_fail (ssl_ctx != NULL, NULL);
-
- SSL_CTX_set_verify (ssl_ctx, SSL_VERIFY_PEER, &ssl_verify);
- ssl = SSL_new (ssl_ctx);
- SSL_set_fd (ssl, sockfd);
-
- SSL_CTX_set_app_data (ssl_ctx, openssl);
-
- n = SSL_connect (ssl);
- if (n != 1) {
- ssl_error_to_errno (ssl, n);
-
- 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 (openssl->priv->service, fd, openssl);
- 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 6eab9465a4..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 (CamelService *service, const char *expected_host);
-
-#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 0aa9c2e1e5..0000000000
--- a/camel/camel-tcp-stream-raw.c
+++ /dev/null
@@ -1,456 +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;
- int saveerrno;
-
- 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;
- }
-
- do {
- nread = read (tcp_stream_raw->sockfd, buffer, n);
- } while (nread == -1 && errno == EINTR);
- saveerrno = errno;
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags);
- errno = saveerrno;
- }
-
- 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;
- int saveerrno;
-
- 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;
- }
-
- do {
- w = write (tcp_stream_raw->sockfd, buffer + written, n - written);
- } while (w == -1 && errno == EINTR);
-
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
-
- saveerrno = errno;
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags);
- errno = saveerrno;
- }
-
- 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 c5d1766ca8..0000000000
--- a/camel/camel-tcp-stream-ssl.c
+++ /dev/null
@@ -1,482 +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 <cert.h>
-#include <certdb.h>
-#include <pk11func.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)
-{
- CamelTcpStreamSSL *ssl;
- CERTCertificate *cert;
- CamelService *service;
- char *prompt, *cert_str;
- gboolean accept;
-
- g_return_val_if_fail (data != NULL, SECFailure);
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM_SSL (data), SECFailure);
-
- ssl = CAMEL_TCP_STREAM_SSL (data);
- service = ssl->priv->service;
-
- 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_alert_user (service->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE);
- g_free (prompt);
-
- if (accept) {
-#if 0
- /* this code would work, except guess what? mozilla
- again changed api - these are all deprecated
- functions again. */
- CERTCertificate *temp;
- CERTCertTrust *trust;
- PK11SlotInfo *slot;
- char *nickname;
-
- nickname = CERT_MakeCANickname (cert);
-
- slot = PK11_GetInternalKeySlot ();
-
- trust = PORT_ZAlloc (sizeof (CERTCertTrust));
- trust->sslFlags = CERTDB_TRUSTED_CA | CERTDB_VALID_CA;
-
- temp = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), &cert->derCert, NULL, PR_FALSE, PR_TRUE);
-
- CERT_AddTempCertToPerm (temp, nickname, trust);
-
- CERT_DestroyCertificate (temp);
- PORT_Free (nickname);
-#endif
- 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_OptionSet (ssl_fd, SSL_SECURITY, PR_TRUE);
- 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);
-
- 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 b4d78c8d74..0000000000
--- a/camel/camel-transport.c
+++ /dev/null
@@ -1,148 +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@ximian.com>
- *
- * Copyright 2000 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 "camel-transport.h"
-#include "camel-exception.h"
-#include "camel-private.h"
-
-/* Returns the class for a CamelTransport */
-#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static void
-camel_transport_init (gpointer object, gpointer klass)
-{
- CamelTransport *xport = object;
-
- xport->priv = g_malloc0 (sizeof (struct _CamelTransportPrivate));
-#ifdef ENABLE_THREADS
- xport->priv->send_lock = g_mutex_new ();
-#endif
-}
-
-static void
-camel_transport_finalize (CamelObject *object)
-{
- CamelTransport *xport = CAMEL_TRANSPORT (object);
-
-#ifdef ENABLE_THREADS
- g_mutex_free (xport->priv->send_lock);
-#endif
- g_free (xport->priv);
-}
-
-CamelType
-camel_transport_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_SERVICE_TYPE,
- "CamelTransport",
- sizeof (CamelTransport),
- sizeof (CamelTransportClass),
- NULL,
- NULL,
- (CamelObjectInitFunc) camel_transport_init,
- (CamelObjectFinalizeFunc) camel_transport_finalize);
- }
-
- return 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)
-{
- gboolean sent;
-
- g_return_val_if_fail (CAMEL_IS_TRANSPORT (transport), FALSE);
-
- CAMEL_TRANSPORT_LOCK (transport, send_lock);
- sent = CT_CLASS (transport)->send (transport, message, ex);
- CAMEL_TRANSPORT_UNLOCK (transport, send_lock);
-
- return sent;
-}
-
-/**
- * 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)
-{
- gboolean sent;
-
- g_return_val_if_fail (CAMEL_IS_TRANSPORT (transport), FALSE);
-
- CAMEL_TRANSPORT_LOCK (transport, send_lock);
- sent = CT_CLASS (transport)->send_to (transport, message,
- recipients, ex);
- CAMEL_TRANSPORT_UNLOCK (transport, send_lock);
-
- return sent;
-}
diff --git a/camel/camel-transport.h b/camel/camel-transport.h
deleted file mode 100644
index a4693bdab3..0000000000
--- a/camel/camel-transport.h
+++ /dev/null
@@ -1,90 +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@ximian.com>
- *
- * Copyright 2000 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_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;
-
- struct _CamelTransportPrivate *priv;
-
- 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 8480d9f024..0000000000
--- a/camel/camel-types.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Copyright 2000 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_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 _CamelDiscoDiary CamelDiscoDiary;
-typedef struct _CamelDiscoFolder CamelDiscoFolder;
-typedef struct _CamelDiscoStore CamelDiscoStore;
-typedef struct _CamelDataWrapper CamelDataWrapper;
-typedef struct _CamelException CamelException;
-typedef struct _CamelFilterDriver CamelFilterDriver;
-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 37cbde3110..0000000000
--- a/camel/camel-uid-cache.c
+++ /dev/null
@@ -1,240 +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@ximian.com>
- *
- * Copyright 2000 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 <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "camel-uid-cache.h"
-
-struct _uid_state {
- int level;
- gboolean save;
-};
-
-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++) {
- struct _uid_state *state;
-
- state = g_new (struct _uid_state, 1);
- state->level = cache->level;
- state->save = TRUE;
-
- g_hash_table_insert (cache->uids, uids[i], state);
- }
- 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;
- struct _uid_state *state = value;
-
- if (state && state->level == cache->level && state->save) {
- 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);
- g_free (value);
-}
-
-
-/**
- * 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;
- char *uid;
- int i;
-
- new_uids = g_ptr_array_new ();
- cache->level++;
-
- for (i = 0; i < uids->len; i++) {
- struct _uid_state *state;
-
- uid = uids->pdata[i];
- if (g_hash_table_lookup_extended (cache->uids, uid, &old_uid, &state)) {
- g_hash_table_remove (cache->uids, uid);
- g_free (old_uid);
- } else {
- g_ptr_array_add (new_uids, g_strdup (uid));
- state = g_new (struct _uid_state, 1);
- state->save = FALSE;
- }
-
- state->level = cache->level;
- g_hash_table_insert (cache->uids, g_strdup (uid), state);
- }
-
- return new_uids;
-}
-
-
-/**
- * camel_uid_cache_save_uid:
- * @cache: a CamelUIDCache
- * @uid: a uid to save
- *
- * Marks a uid for saving.
- **/
-void
-camel_uid_cache_save_uid (CamelUIDCache *cache, const char *uid)
-{
- struct _uid_state *state;
- gpointer old_uid;
-
- g_return_if_fail (uid != NULL);
-
- if (g_hash_table_lookup_extended (cache->uids, uid, &old_uid, &state)) {
- state->save = TRUE;
- state->level = cache->level;
- } else {
- state = g_new (struct _uid_state, 1);
- state->save = TRUE;
- state->level = cache->level;
-
- g_hash_table_insert (cache->uids, g_strdup (uid), state);
- }
-}
-
-
-/**
- * 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 2a381f0be0..0000000000
--- a/camel/camel-uid-cache.h
+++ /dev/null
@@ -1,55 +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 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_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_save_uid (CamelUIDCache *cache, const char *uid);
-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 a5ee62b92e..0000000000
--- a/camel/camel-url.c
+++ /dev/null
@@ -1,554 +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 Anto <tiagoantao@bigfoot.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-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 <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)
-{
- if (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_full (&url->params, name, value ? g_strdup (value) : NULL, g_free);
-}
-
-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 (const char *part, gboolean escape_unsafe,
- const 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 b1bf3bd7ed..0000000000
--- a/camel/camel-url.h
+++ /dev/null
@@ -1,90 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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)
-
-#define CAMEL_URL_HIDE_ALL (CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS | CAMEL_URL_HIDE_AUTH)
-
-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 (const char *part, gboolean escape_unsafe,
- const 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 1cf0386e25..0000000000
--- a/camel/camel-vee-folder.c
+++ /dev/null
@@ -1,1178 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@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 "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"
-
-#if defined (DOEPOOLV) || defined (DOESTRV)
-#include "e-util/e-memory.h"
-#endif
-
-#define d(x)
-
-#define _PRIVATE(o) (((CamelVeeFolder *)(o))->priv)
-
-static void vee_refresh_info(CamelFolder *folder, CamelException *ex);
-
-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->refresh_info = vee_refresh_info;
- 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();
- p->changed_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)
- vee_folder_remove_folder(vf, f);
- }
- camel_object_unref((CamelObject *)f);
-
- node = g_list_next(node);
- }
-
- g_free(vf->expression);
- g_free(vf->vname);
-
- g_list_free(p->folders);
- g_list_free(p->folders_changed);
-
- camel_folder_change_info_free(vf->changes);
- camel_object_unref((CamelObject *)vf->search);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(p->summary_lock);
- g_mutex_free(p->subfolder_lock);
- g_mutex_free(p->changed_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;
- 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 ());
- d(printf("created foldeer unmatched %p\n", folder_unmatched));
-
- vee_folder_construct (folder_unmatched, parent_store, CAMEL_UNMATCHED_NAME, 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;
-
- 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());
- d(printf("created foldeer unmatched %p\n", folder_unmatched));
- vee_folder_construct (vf, parent_store, CAMEL_UNMATCHED_NAME, CAMEL_STORE_FOLDER_PRIVATE);
- }
-
- UNMATCHED_UNLOCK();
-
- if (strcmp(name, CAMEL_UNMATCHED_NAME) == 0) {
- camel_object_ref((CamelObject *)folder_unmatched);
- d(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);
-
- d(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);
-
- /* no change, do nothing */
- if ((vf->expression && query && strcmp(vf->expression, query) == 0)
- || (vf->expression == NULL && query == NULL)) {
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
- return;
- }
-
- g_free(vf->expression);
- if (query)
- vf->expression = g_strdup(query);
-
- 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_LOCK(vf, changed_lock);
- g_list_free(p->folders_changed);
- p->folders_changed = NULL;
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock);
-
- 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);
-
- CAMEL_VEE_FOLDER_LOCK(vf, changed_lock);
- p->folders_changed = g_list_remove(p->folders_changed, sub);
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_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);
-}
-
-static void
-remove_folders(CamelFolder *folder, CamelFolder *foldercopy, CamelVeeFolder *vf)
-{
- camel_vee_folder_remove_folder(vf, folder);
- camel_object_unref((CamelObject *)folder);
-}
-
-/**
- * camel_vee_folder_set_folders:
- * @vf:
- * @folders:
- *
- * Set the whole list of folder sources on a vee folder.
- **/
-void
-camel_vee_folder_set_folders(CamelVeeFolder *vf, GList *folders)
-{
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GHashTable *remove = g_hash_table_new(NULL, NULL);
- GList *l;
- CamelFolder *folder;
- int changed;
-
- /* setup a table of all folders we have currently */
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
- l = p->folders;
- while (l) {
- g_hash_table_insert(remove, l->data, l->data);
- camel_object_ref((CamelObject *)l->data);
- l = l->next;
- }
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-
- /* if we already have the folder, ignore it, otherwise add it */
- l = folders;
- while (l) {
- if ((folder = g_hash_table_lookup(remove, l->data))) {
- g_hash_table_remove(remove, folder);
- camel_object_unref((CamelObject *)folder);
-
- /* if this was a changed folder, re-update it while we're here */
- CAMEL_VEE_FOLDER_LOCK(vf, changed_lock);
- changed = g_list_find(p->folders_changed, folder) != NULL;
- if (changed)
- p->folders_changed = g_list_remove(p->folders_changed, folder);
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock);
- if (changed)
- vee_folder_build_folder(vf, folder, NULL);
- } else {
- camel_vee_folder_add_folder(vf, l->data);
- }
- l = l->next;
- }
-
- /* then remove any we still have */
- g_hash_table_foreach(remove, (GHFunc)remove_folders, vf);
- g_hash_table_destroy(remove);
-}
-
-/**
- * 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_refresh_info(CamelFolder *folder, CamelException *ex)
-{
- CamelVeeFolder *vf = (CamelVeeFolder *)folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GList *node, *list;
-
- CAMEL_VEE_FOLDER_LOCK(vf, changed_lock);
- list = p->folders_changed;
- p->folders_changed = NULL;
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock);
-
- node = list;
- while (node) {
- CamelFolder *f = node->data;
-
- if (vee_folder_build_folder(vf, f, ex) == -1)
- break;
-
- node = node->next;
- }
-
- g_list_free(list);
-}
-
-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_LOCK(vf, changed_lock);
- g_list_free(p->folders_changed);
- p->folders_changed = NULL;
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock);
-
- 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);
- }
-
- g_free(expr);
- 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) {
- d(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 DOEPOOLV
- mi->info.strings = e_poolv_set(mi->info.strings, CAMEL_MESSAGE_INFO_UID, uid, TRUE);
-#elif defined (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;
-
- /* if we have no expression, or its been cleared, then act as if no matches */
- if (vf->expression == NULL) {
- match = g_ptr_array_new();
- } else {
- 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);
- /* if expression not set, we only had a null list */
- if (vf->expression == NULL)
- g_ptr_array_free(match, TRUE);
- else
- 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, changed_lock);
- /* add this folder to our changed folders list if we have stuff we can't catch easily */
- /* Unfortuantely if its a change that doesn't affect the match, we're still going to
- rerun it :( */
- if (changes->uid_changed->len > 0 || changes->uid_added->len > 0)
- if (g_list_find(vf->priv->folders_changed, sub) != NULL)
- vf->priv->folders_changed = g_list_prepend(vf->priv->folders_changed, sub);
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock);
-
- 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 a2295ba7d8..0000000000
--- a/camel/camel-vee-folder.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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;
-};
-
-#define CAMEL_UNMATCHED_NAME "UNMATCHED"
-
-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_folders (CamelVeeFolder *vf, GList *folders);
-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 a5e2a43070..0000000000
--- a/camel/camel-vee-store.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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 "camel-exception.h"
-#include "camel-vee-store.h"
-#include "camel-vee-folder.h"
-
-#include "camel-private.h"
-
-#include <string.h>
-
-static CamelFolder *vee_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex);
-static void vee_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex);
-static void vee_rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex);
-static void vee_init_trash (CamelStore *store);
-static CamelFolder *vee_get_trash (CamelStore *store, CamelException *ex);
-
-static CamelFolderInfo *vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex);
-
-struct _CamelVeeStorePrivate {
-};
-
-#define _PRIVATE(o) (((CamelVeeStore *)(o))->priv)
-
-static void camel_vee_store_class_init (CamelVeeStoreClass *klass);
-static void camel_vee_store_init (CamelVeeStore *obj);
-static void camel_vee_store_finalise (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->rename_folder = vee_rename_folder;
- store_class->delete_folder = vee_delete_folder;
- store_class->get_folder_info = vee_get_folder_info;
- store_class->free_folder_info = camel_store_free_folder_info_full;
-
- 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;
- CamelStore *store = (CamelStore *)obj;
-
- /* we dont want a vtrash on this one */
- store->flags &= ~(CAMEL_STORE_VTRASH);
-
- 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#%s", ((CamelService *)store)->url->path,
- ((CamelFolder *)vf)->full_name);
- fi->unread_message_count = camel_folder_get_message_count((CamelFolder *)vf);
- camel_folder_info_build_path(fi, '/');
- 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;
-}
-
-struct _build_info {
- const char *top;
- guint32 flags;
- GPtrArray *infos;
- GPtrArray *folders;
-};
-
-static void
-build_info(char *name, CamelVeeFolder *folder, struct _build_info *data)
-{
- CamelFolderInfo *info;
-
- /* check we have to include this one */
- if (data->top) {
- if (data->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) {
- if (strncmp(name, data->top, strlen(data->top) != 0))
- return;
- } else {
- if (strcmp(name, data->top))
- return;
- }
- } else {
- if ((data->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) == 0) {
- if (strchr(name, '/'))
- return;
- }
- }
-
- info = g_malloc0(sizeof(*info));
- info->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)((CamelFolder *)folder)->parent_store)->url->path,
- ((CamelFolder *)folder)->full_name);
- info->full_name = g_strdup(((CamelFolder *)folder)->full_name);
- info->name = g_strdup(((CamelFolder *)folder)->name);
- info->unread_message_count = -1;
- g_ptr_array_add(data->infos, info);
- camel_object_ref((CamelObject *)folder);
- g_ptr_array_add(data->folders, folder);
-}
-
-static CamelFolderInfo *
-vee_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- struct _build_info data;
- CamelFolderInfo *info;
- int i;
-
- /* first, build the info list */
- data.top = top;
- data.flags = flags;
- data.infos = g_ptr_array_new();
- data.folders = g_ptr_array_new();
- CAMEL_STORE_LOCK(store, cache_lock);
- g_hash_table_foreach(store->folders, (GHFunc)build_info, &data);
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
- /* then make sure the unread counts are accurate */
- for (i=0;i<data.infos->len;i++) {
- CamelFolderInfo *info = data.infos->pdata[i];
- CamelFolder *folder = data.folders->pdata[i];
-
- camel_folder_refresh_info(folder, NULL);
- info->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_object_unref((CamelObject *)folder);
- }
- g_ptr_array_free(data.folders, TRUE);
-
- /* and always add UNMATCHED, if scanning from top/etc */
- if (top == NULL || top[0] == 0 || strncmp(top, CAMEL_UNMATCHED_NAME, strlen(CAMEL_UNMATCHED_NAME)) == 0) {
- info = g_malloc0(sizeof(*info));
- info->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)store)->url->path, CAMEL_UNMATCHED_NAME);
- info->full_name = g_strdup(CAMEL_UNMATCHED_NAME);
- info->name = g_strdup(CAMEL_UNMATCHED_NAME);
- info->unread_message_count = -1;
- camel_folder_info_build_path(info, '/');
- g_ptr_array_add(data.infos, info);
- }
-
- /* convert it into a tree */
- info = camel_folder_info_build(data.infos, (top&&top[0])?top:"", '/', TRUE);
- g_ptr_array_free(data.infos, TRUE);
-
- return info;
-}
-
-static void
-vee_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CamelFolder *folder;
- char *key;
-
- if (strcmp(folder_name, CAMEL_UNMATCHED_NAME) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot delete folder: %s: Invalid operation"), folder_name);
- return;
- }
-
- CAMEL_STORE_LOCK(store, cache_lock);
- if (g_hash_table_lookup_extended(store->folders, folder_name, (void **)&key, (void **)&folder)) {
- int update;
-
- update = (((CamelVeeFolder *)folder)->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0;
- g_hash_table_remove(store->folders, key);
- CAMEL_STORE_UNLOCK(store, cache_lock);
- if (store->vtrash)
- camel_vee_folder_remove_folder((CamelVeeFolder *)store->vtrash, folder);
-
- /* FIXME: deleted event shoudl just pass out the folder name, not all this shit?? */
- if (update) {
- CamelFolderInfo *fi = g_malloc0(sizeof(*fi));
-
- fi->full_name = g_strdup(key);
- fi->name = strrchr(key, '/');
- if (fi->name == NULL)
- fi->name = g_strdup(key);
- else
- fi->name = g_strdup(fi->name);
- fi->url = g_strdup_printf("vfolder:%s#%s", ((CamelService *)store)->url->path, key);
- fi->unread_message_count = -1;
- camel_folder_info_build_path(fi, '/');
-
- camel_object_trigger_event(CAMEL_OBJECT(store), "folder_deleted", fi);
- camel_folder_info_free(fi);
- }
- g_free(key);
- } else {
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot delete folder: %s: No such folder"), folder_name);
- }
-}
-
-static void
-vee_rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
- CamelFolder *folder;
- char *key, *oldname, *full_oldname;
-
- if (strcmp(old, CAMEL_UNMATCHED_NAME) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot rename folder: %s: Invalid operation"), old);
- return;
- }
-
- CAMEL_STORE_LOCK(store, cache_lock);
- if (g_hash_table_lookup_extended(store->folders, old, (void **)&key, (void **)&folder)) {
- g_hash_table_remove(store->folders, key);
- g_free(key);
-
- /* this should really be atomic */
- oldname = folder->name;
- full_oldname = folder->full_name;
- key = folder->name;
- folder->full_name = g_strdup(new);
- key = strrchr(new, '/');
- key = key?key+1:(char *)new;
- folder->name = g_strdup(key);
- g_hash_table_insert(store->folders, g_strdup(new), folder);
-
- g_free(oldname);
- g_free(full_oldname);
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
-
- } else {
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot rename folder: %s: No such folder"), new);
- }
-}
-
diff --git a/camel/camel-vee-store.h b/camel/camel-vee-store.h
deleted file mode 100644
index d325565499..0000000000
--- a/camel/camel-vee-store.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 1e7f7b8f67..0000000000
--- a/camel/camel-vtrash-folder.c
+++ /dev/null
@@ -1,141 +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>
-
-/* Returns the class for a CamelFolder */
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-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;
-
- vtrash = (CamelFolder *)camel_object_new (camel_vtrash_folder_get_type ());
- camel_vee_folder_construct (CAMEL_VEE_FOLDER (vtrash), parent_store, name,
- CAMEL_STORE_FOLDER_PRIVATE | CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_VEE_FOLDER_AUTO);
- camel_vee_folder_set_expression((CamelVeeFolder *)vtrash, "(match-all (system-flag \"Deleted\"))");
-
- 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 */
- CF_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_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 f01a28ff55..0000000000
--- a/camel/camel-vtrash-folder.h
+++ /dev/null
@@ -1,53 +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_NAME "Trash"
-
-#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 854fe1e896..0000000000
--- a/camel/camel.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999, 2000 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 <signal.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"
-#include "camel-charset-map.h"
-
-gboolean camel_verbose_debug = FALSE;
-
-#ifdef HAVE_NSS
-static void
-camel_shutdown (void)
-{
- NSS_Shutdown ();
-
- PR_Cleanup ();
-}
-#endif /* HAVE_NSS */
-
-gint
-camel_init (const char *configdir, 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;
-
- camel_charset_map_init ();
-
-#ifdef HAVE_NSS
- if (nss_init) {
- PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 10);
-
- if (NSS_InitReadWrite (configdir) == SECFailure) {
- /* fall back on using volatile dbs? */
- if (NSS_NoDB_Init (configdir) == SECFailure) {
- g_warning ("Failed to initialize NSS");
- return -1;
- }
- }
-
- NSS_SetDomesticPolicy ();
-
- g_atexit (camel_shutdown);
- }
-
- 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;
-}
diff --git a/camel/camel.h b/camel/camel.h
deleted file mode 100644
index 2226a571cb..0000000000
--- a/camel/camel.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999, 2000 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_H
-#define CAMEL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-cipher-context.h>
-#include <camel/camel-cms-context.h>
-#include <camel/camel-data-wrapper.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-digest-folder.h>
-#include <camel/camel-disco-diary.h>
-#include <camel/camel-disco-folder.h>
-#include <camel/camel-disco-store.h>
-#include <camel/camel-vee-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-smime-context.h>
-#include <camel/camel-smime-utils.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);
-
-#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 40ffc91e19..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 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 <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 3a56efde07..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 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 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 8354b0a633..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 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
- */
-
-#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 05247e370f..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 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 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/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 64095b320d..0000000000
--- a/camel/providers/imap/camel-imap-command.c
+++ /dev/null
@@ -1,759 +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@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000, 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 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-imap-private.h"
-#include <camel/camel-exception.h>
-
-static gboolean imap_command_start (CamelImapStore *store, CamelFolder *folder,
- const char *cmd, CamelException *ex);
-CamelImapResponse *imap_read_response (CamelImapStore *store,
- CamelException *ex);
-static char *imap_read_untagged (CamelImapStore *store, char *line,
- CamelException *ex);
-static char *imap_command_strdup_vprintf (CamelImapStore *store,
- const char *fmt, va_list ap);
-static char *imap_command_strdup_printf (CamelImapStore *store,
- const char *fmt, ...);
-
-/**
- * camel_imap_command:
- * @store: the IMAP store
- * @folder: The folder to perform the operation in (or %NULL if not
- * relevant).
- * @ex: a CamelException
- * @fmt: a sort of printf-style format string, followed by arguments
- *
- * This function calls camel_imap_command_start() to send the
- * command, then reads the complete response to it using
- * camel_imap_command_response() and returns a CamelImapResponse
- * structure.
- *
- * As a special case, if @fmt is %NULL, it will just select @folder
- * and return the response from doing so.
- *
- * See camel_imap_command_start() for details on @fmt.
- *
- * On success, the store's command_lock will be locked. It will be freed
- * when you call camel_imap_response_free. (The lock is recursive, so
- * callers can grab and release it themselves if they need to run
- * multiple commands atomically.)
- *
- * 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, ...)
-{
- va_list ap;
- char *cmd;
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
-
- if (fmt) {
- va_start (ap, fmt);
- cmd = imap_command_strdup_vprintf (store, fmt, ap);
- va_end (ap);
- } else {
- if (store->current_folder) {
- camel_object_unref (CAMEL_OBJECT (store->current_folder));
- store->current_folder = NULL;
- }
- store->current_folder = folder;
- camel_object_ref (CAMEL_OBJECT (folder));
- cmd = imap_command_strdup_printf (store, "SELECT %F",
- folder->full_name);
- }
-
- if (!imap_command_start (store, folder, cmd, ex)) {
- g_free (cmd);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return NULL;
- }
- g_free (cmd);
-
- return imap_read_response (store, ex);
-}
-
-/**
- * camel_imap_command_start:
- * @store: the IMAP store
- * @folder: The folder to perform the operation in (or %NULL if not
- * relevant).
- * @ex: a CamelException
- * @fmt: a 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.
- *
- * @fmt can include the following %-escapes ONLY:
- * %s, %d, %%: as with printf
- * %S: an IMAP "string" (quoted string or literal)
- * %F: an IMAP folder name
- *
- * %S strings will be passed as literals if the server supports LITERAL+
- * and quoted strings otherwise. (%S does not support strings that
- * contain newlines.)
- *
- * %F will have the imap store's namespace prepended and then be processed
- * like %S.
- *
- * On success, the store's command_lock will be locked. It will be
- * freed when %CAMEL_IMAP_RESPONSE_TAGGED or %CAMEL_IMAP_RESPONSE_ERROR
- * is returned from camel_imap_command_response(). (The lock is
- * recursive, so callers can grab and release it themselves if they
- * need to run multiple commands atomically.)
- *
- * Return value: %TRUE if the command was sent successfully, %FALSE if
- * an error occurred (in which case @ex will be set).
- **/
-gboolean
-camel_imap_command_start (CamelImapStore *store, CamelFolder *folder,
- CamelException *ex, const char *fmt, ...)
-{
- va_list ap;
- char *cmd;
- gboolean ok;
-
- va_start (ap, fmt);
- cmd = imap_command_strdup_vprintf (store, fmt, ap);
- va_end (ap);
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- ok = imap_command_start (store, folder, cmd, ex);
- g_free (cmd);
-
- if (!ok)
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return ok;
-}
-
-static gboolean
-imap_command_start (CamelImapStore *store, CamelFolder *folder,
- const char *cmd, CamelException *ex)
-{
- /* Check for current folder */
- if (folder && folder != store->current_folder) {
- CamelImapResponse *response;
- CamelException internal_ex;
-
- response = camel_imap_command (store, folder, ex, NULL);
- if (!response)
- return FALSE;
- camel_exception_init (&internal_ex);
- camel_imap_folder_selected (folder, response, &internal_ex);
- camel_imap_response_free (store, response);
- if (camel_exception_is_set (&internal_ex)) {
- camel_exception_xfer (ex, &internal_ex);
- return FALSE;
- }
- }
-
- /* Send the command */
- return camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex,
- "%c%.5d %s\r\n",
- store->tag_prefix,
- store->command++, cmd) != -1;
-}
-
-/**
- * camel_imap_command_continuation:
- * @store: the IMAP store
- * @cmd: buffer containing the response/request data
- * @ex: a CamelException
- *
- * This method is for sending continuing responses to the IMAP server
- * after camel_imap_command() or camel_imap_command_response() returns
- * a continuation response.
- *
- * This function assumes you have an exclusive lock on the remote stream.
- *
- * Return value: as for camel_imap_command(). On failure, the store's
- * command_lock will be released.
- **/
-CamelImapResponse *
-camel_imap_command_continuation (CamelImapStore *store, const char *cmd,
- CamelException *ex)
-{
- if (camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex,
- "%s\r\n", cmd) < 0) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return NULL;
- }
-
- return imap_read_response (store, ex);
-}
-
-/**
- * camel_imap_command_response:
- * @store: the IMAP store
- * @response: a pointer to pass back the response data in
- * @ex: a CamelException
- *
- * This reads a single tagged, untagged, or continuation response from
- * @store into *@response. The caller must free the string when it is
- * done with it.
- *
- * Return value: One of %CAMEL_IMAP_RESPONSE_CONTINUATION,
- * %CAMEL_IMAP_RESPONSE_UNTAGGED, %CAMEL_IMAP_RESPONSE_TAGGED, or
- * %CAMEL_IMAP_RESPONSE_ERROR. If either of the last two, @store's
- * command lock will be unlocked.
- **/
-CamelImapResponseType
-camel_imap_command_response (CamelImapStore *store, char **response,
- CamelException *ex)
-{
- CamelImapResponseType type;
- char *respbuf;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store),
- &respbuf, ex) < 0) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return CAMEL_IMAP_RESPONSE_ERROR;
- }
-
- switch (*respbuf) {
- case '*':
- type = CAMEL_IMAP_RESPONSE_UNTAGGED;
-
- /* Read the rest of the response if it is multi-line. */
- respbuf = imap_read_untagged (store, respbuf, ex);
- if (!respbuf)
- type = CAMEL_IMAP_RESPONSE_ERROR;
- else if (!g_strncasecmp (respbuf, "* BYE", 5)) {
- /* Connection was lost, no more data to fetch */
- store->connected = FALSE;
- g_free (respbuf);
- type = CAMEL_IMAP_RESPONSE_ERROR;
- }
- break;
- case '+':
- type = CAMEL_IMAP_RESPONSE_CONTINUATION;
- break;
- default:
- type = CAMEL_IMAP_RESPONSE_TAGGED;
- break;
- }
- *response = respbuf;
-
- if (type == CAMEL_IMAP_RESPONSE_ERROR ||
- type == CAMEL_IMAP_RESPONSE_TAGGED)
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return type;
-}
-
-CamelImapResponse *
-imap_read_response (CamelImapStore *store, CamelException *ex)
-{
- CamelImapResponse *response;
- CamelImapResponseType type;
- char *respbuf, *p;
-
- /* Get another lock so that when we reach the tagged
- * response and camel_imap_command_response unlocks,
- * we're still locked. This lock is owned by response
- * and gets unlocked when response is freed.
- */
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
-
- response = g_new0 (CamelImapResponse, 1);
- if (store->current_folder && camel_disco_store_status (CAMEL_DISCO_STORE (store)) != CAMEL_DISCO_STORE_RESYNCING) {
- response->folder = store->current_folder;
- camel_object_ref (CAMEL_OBJECT (response->folder));
- }
-
- response->untagged = g_ptr_array_new ();
- while ((type = camel_imap_command_response (store, &respbuf, ex))
- == CAMEL_IMAP_RESPONSE_UNTAGGED)
- g_ptr_array_add (response->untagged, respbuf);
-
- if (type == CAMEL_IMAP_RESPONSE_ERROR) {
- camel_imap_response_free_without_processing (store, response);
- return NULL;
- }
-
- response->status = respbuf;
-
- /* Check for OK or continuation response. */
- if (*respbuf == '+')
- return response;
- p = strchr (respbuf, ' ');
- if (p && !g_strncasecmp (p, " OK", 3))
- return response;
-
- /* We should never get BAD, or anything else but +, OK, or NO
- * for that matter.
- */
- if (!p || g_strncasecmp (p, " NO", 3) != 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_without_processing (store, response);
- return NULL;
- }
-
- p += 3;
- if (!*p++)
- p = NULL;
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("IMAP command failed: %s"),
- p ? p : _("Unknown error"));
- camel_imap_response_free_without_processing (store, 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:
- * @store: the CamelImapStore the response is from
- * @response: a CamelImapResponse
- *
- * Frees all of the data in @response and processes any untagged
- * EXPUNGE and EXISTS responses in it. Releases @store's command_lock.
- **/
-void
-camel_imap_response_free (CamelImapStore *store, 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_STORE_UNLOCK (store, command_lock);
-}
-
-/**
- * camel_imap_response_free_without_processing:
- * @store: the CamelImapStore the response is from.
- * @response: a CamelImapResponse:
- *
- * Frees all of the data in @response without processing any untagged
- * responses. Releases @store's command lock.
- **/
-void
-camel_imap_response_free_without_processing (CamelImapStore *store,
- CamelImapResponse *response)
-{
- if (response->folder) {
- camel_object_unref (CAMEL_OBJECT (response->folder));
- response->folder = NULL;
- }
- camel_imap_response_free (store, response);
-}
-
-/**
- * camel_imap_response_extract:
- * @store: the store the response came from
- * @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 and the
- * store's command_lock released.
- *
- * Return value: the desired response string, which the caller must free.
- **/
-char *
-camel_imap_response_extract (CamelImapStore *store,
- 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 (store, response);
- return resp;
-}
-
-/**
- * camel_imap_response_extract_continuation:
- * @store: the store the response came from
- * @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, release @store's command_lock,
- * 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 (CamelImapStore *store,
- CamelImapResponse *response,
- CamelException *ex)
-{
- char *status;
-
- if (response->status && *response->status == '+') {
- status = response->status;
- response->status = NULL;
- camel_imap_response_free (store, response);
- return status;
- }
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unexpected OK response from IMAP server: %s"),
- response->status);
- camel_imap_response_free (store, 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, arglen;
-
- 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':
- case 'F':
- string = va_arg (ap, char *);
- arglen = strlen (string);
- if (*p == 'F') {
- if (store->namespace == NULL) {
- if (*string != '\0') /*ok if foldername is "" */
- g_warning ("trying to list folder \"%s\" but no namespace. Hope for the best", string);
- arglen += 2;
- } else
- arglen += strlen (store->namespace) + 1;
- }
- g_ptr_array_add (args, string);
- if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS)
- len += arglen + 15;
- else
- len += arglen * 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':
- case 'F':
- string = args->pdata[i++];
- if (*p == 'F')
- string = imap_namespace_concat (store, string);
- 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);
- }
- if (*p == 'F')
- g_free (string);
- break;
-
- default:
- *op++ = '%';
- *op++ = *p;
- }
-
- start = *p ? p + 1 : p;
- }
-
- return out;
-}
-
-static char *
-imap_command_strdup_printf (CamelImapStore *store, const char *fmt, ...)
-{
- va_list ap;
- char *result;
-
- va_start (ap, fmt);
- result = imap_command_strdup_vprintf (store, fmt, ap);
- va_end (ap);
-
- return result;
-}
diff --git a/camel/providers/imap/camel-imap-command.h b/camel/providers/imap/camel-imap-command.h
deleted file mode 100644
index fbcf82ee7d..0000000000
--- a/camel/providers/imap/camel-imap-command.h
+++ /dev/null
@@ -1,80 +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@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright (C) 2000, 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 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"
-
-typedef enum {
- CAMEL_IMAP_RESPONSE_ERROR,
- CAMEL_IMAP_RESPONSE_CONTINUATION,
- CAMEL_IMAP_RESPONSE_UNTAGGED,
- CAMEL_IMAP_RESPONSE_TAGGED
-} CamelImapResponseType;
-
-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,
- const char *cmd,
- CamelException *ex);
-
-void camel_imap_response_free (CamelImapStore *store,
- CamelImapResponse *response);
-void camel_imap_response_free_without_processing (CamelImapStore *store,
- CamelImapResponse *response);
-char *camel_imap_response_extract (CamelImapStore *store,
- CamelImapResponse *response,
- const char *type,
- CamelException *ex);
-char *camel_imap_response_extract_continuation (CamelImapStore *store,
- CamelImapResponse *response,
- CamelException *ex);
-
-gboolean camel_imap_command_start (CamelImapStore *store,
- CamelFolder *folder,
- CamelException *ex,
- const char *fmt, ...);
-CamelImapResponseType camel_imap_command_response (CamelImapStore *store,
- char **respbuf,
- 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 6b4b65c4b7..0000000000
--- a/camel/providers/imap/camel-imap-folder.c
+++ /dev/null
@@ -1,2052 +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:
- * Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright (C) 2000, 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
- */
-
-#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 "camel-imap-folder.h"
-#include "camel-imap-command.h"
-#include "camel-imap-message-cache.h"
-#include "camel-imap-private.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 "camel-data-wrapper.h"
-#include "camel-disco-diary.h"
-#include "camel-exception.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-mime-filter-from.h"
-#include "camel-mime-message.h"
-#include "camel-mime-utils.h"
-#include "camel-multipart.h"
-#include "camel-operation.h"
-#include "camel-session.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-mem.h"
-#include "camel-stream.h"
-#include "string-utils.h"
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
-static CamelDiscoFolderClass *disco_folder_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_online (CamelFolder *folder, CamelException *ex);
-static void imap_sync_offline (CamelFolder *folder, CamelException *ex);
-static void imap_expunge_uids_online (CamelFolder *folder, GPtrArray *uids, CamelException *ex);
-static void imap_expunge_uids_offline (CamelFolder *folder, GPtrArray *uids, CamelException *ex);
-static void imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelException *ex);
-static void imap_cache_message (CamelDiscoFolder *disco_folder, const char *uid, CamelException *ex);
-
-/* message manipulation */
-static CamelMimeMessage *imap_get_message (CamelFolder *folder, const gchar *uid,
- CamelException *ex);
-static void imap_append_online (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-static void imap_append_offline (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-static void imap_append_resyncing (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-
-static void imap_copy_online (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-static void imap_copy_offline (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-static void imap_copy_resyncing (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);
-
-static void imap_thaw (CamelFolder *folder);
-
-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);
- CamelDiscoFolderClass *camel_disco_folder_class = CAMEL_DISCO_FOLDER_CLASS (camel_imap_folder_class);
-
- disco_folder_class = CAMEL_DISCO_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_disco_folder_get_type ()));
-
- /* virtual method overload */
- camel_folder_class->get_message = imap_get_message;
- 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;
- camel_folder_class->thaw = imap_thaw;
-
- camel_disco_folder_class->refresh_info_online = imap_refresh_info;
- camel_disco_folder_class->sync_online = imap_sync_online;
- camel_disco_folder_class->sync_offline = imap_sync_offline;
- /* We don't sync flags at resync time: the online code will
- * deal with it eventually.
- */
- camel_disco_folder_class->sync_resyncing = imap_sync_offline;
- camel_disco_folder_class->expunge_uids_online = imap_expunge_uids_online;
- camel_disco_folder_class->expunge_uids_offline = imap_expunge_uids_offline;
- camel_disco_folder_class->expunge_uids_resyncing = imap_expunge_uids_resyncing;
- camel_disco_folder_class->append_online = imap_append_online;
- camel_disco_folder_class->append_offline = imap_append_offline;
- camel_disco_folder_class->append_resyncing = imap_append_resyncing;
- camel_disco_folder_class->copy_online = imap_copy_online;
- camel_disco_folder_class->copy_offline = imap_copy_offline;
- camel_disco_folder_class->copy_resyncing = imap_copy_resyncing;
- camel_disco_folder_class->cache_message = imap_cache_message;
-}
-
-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
-
- imap_folder->need_rescan = TRUE;
-}
-
-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_DISCO_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 *folder_dir, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (parent);
- CamelFolder *folder;
- CamelImapFolder *imap_folder;
- const char *short_name;
- char *summary_file;
-
- if (camel_mkdir_hier (folder_dir, S_IRWXU) != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create directory %s: %s"),
- folder_dir, g_strerror (errno));
- return NULL;
- }
-
- folder = CAMEL_FOLDER (camel_object_new (camel_imap_folder_get_type ()));
- short_name = strrchr (folder_name, imap_store->dir_sep);
- if (short_name)
- short_name++;
- else
- short_name = folder_name;
- 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 = CAMEL_IMAP_FOLDER (folder);
- 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 ((imap_store->parameters & IMAP_PARAM_FILTER_INBOX) &&
- !g_strcasecmp (folder_name, "INBOX"))
- folder->filter_recent = TRUE;
-
- 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;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (folder->parent_store, command_lock);
-
- 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 (camel_disco_store_status (CAMEL_DISCO_STORE (folder->parent_store)) == CAMEL_DISCO_STORE_RESYNCING) {
- if (validity != imap_summary->validity) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID,
- _("Folder was destroyed and recreated on server."));
- return;
- }
-
- /* FIXME: find missing UIDs ? */
- return;
- }
-
- 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_FOLDER_LOCK (imap_folder, cache_lock);
- camel_imap_message_cache_clear (imap_folder->cache);
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- imap_folder->need_rescan = FALSE;
- camel_imap_folder_changed (folder, exists, NULL, ex);
- return;
- }
-
- /* If we've lost messages, we have to rescan everything */
- if (exists < count)
- imap_folder->need_rescan = TRUE;
- else if (count != 0 && !imap_folder->need_rescan) {
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
-
- /* 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 (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 (store, 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_folder->need_rescan = TRUE;
- }
-
- /* Now rescan if we need to */
- if (imap_folder->need_rescan) {
- imap_rescan (folder, exists, ex);
- return;
- }
-
- /* If we don't need to rescan completely, but new messages
- * have been added, find out about them.
- */
- 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)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelImapResponse *response;
-
- if (camel_disco_store_status (CAMEL_DISCO_STORE (imap_store)) == CAMEL_DISCO_STORE_OFFLINE)
- return;
-
- if (camel_folder_is_frozen (folder)) {
- imap_folder->need_refresh = TRUE;
- return;
- }
-
- /* If the folder isn't selected, select it (which will force
- * a rescan if one is needed.
- */
- if (imap_store->current_folder != folder) {
- response = camel_imap_command (imap_store, folder, ex, NULL);
- camel_imap_response_free (imap_store, response);
- return;
- }
-
- /* Otherwise, if we need a rescan, do it, and if not, just do
- * a NOOP to give the server a chance to tell us about new
- * messages.
- */
- if (imap_folder->need_rescan)
- imap_rescan (folder, camel_folder_summary_count (folder->summary), ex);
- else {
- response = camel_imap_command (imap_store, folder, ex, "NOOP");
- camel_imap_response_free (imap_store, response);
- }
-}
-
-/* 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);
- struct {
- char *uid;
- guint32 flags;
- } *new;
- char *resp;
- CamelImapResponseType type;
- int i, seq, summary_len, summary_got;
- CamelMessageInfo *info;
- CamelImapMessageInfo *iinfo;
- GArray *removed;
- gboolean ok;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock);
- imap_folder->need_rescan = FALSE;
-
- summary_len = camel_folder_summary_count (folder->summary);
- if (summary_len == 0) {
- if (exists)
- camel_imap_folder_changed (folder, exists, NULL, ex);
- return;
- }
-
- /* Check UIDs and flags of all messages we already know of. */
- camel_operation_start (NULL, _("Scanning for changed messages"));
- info = camel_folder_summary_index (folder->summary, summary_len - 1);
- ok = camel_imap_command_start (store, folder, ex,
- "UID FETCH 1:%s (FLAGS)",
- camel_message_info_uid (info));
- camel_folder_summary_info_free (folder->summary, info);
- if (!ok) {
- camel_operation_end (NULL);
- return;
- }
-
- new = g_malloc0 (summary_len * sizeof (*new));
- summary_got = 0;
- while ((type = camel_imap_command_response (store, &resp, ex)) == CAMEL_IMAP_RESPONSE_UNTAGGED) {
- GData *data;
- char *uid;
- guint32 flags;
-
- data = parse_fetch_response (imap_folder, resp);
- g_free (resp);
- if (!data)
- continue;
-
- seq = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE"));
- uid = g_datalist_get_data (&data, "UID");
- flags = GPOINTER_TO_UINT (g_datalist_get_data (&data, "FLAGS"));
-
- if (!uid || !seq || seq >= summary_len) {
- g_datalist_clear (&data);
- continue;
- }
-
- camel_operation_progress (NULL, ++summary_got * 100 / summary_len);
- new[seq - 1].uid = g_strdup (uid);
- new[seq - 1].flags = flags;
- g_datalist_clear (&data);
- }
-
- camel_operation_end (NULL);
- if (type == CAMEL_IMAP_RESPONSE_ERROR) {
- for (i = 0; i < summary_len && new[i].uid; i++)
- g_free (new[i].uid);
- g_free (new);
- return;
- }
- /* Free the final tagged response */
- g_free (resp);
-
- /* If we find a UID in the summary that doesn't correspond to
- * the UID in the folder, then either: (a) it's a real UID,
- * but the message was deleted on the server, or (b) it's a
- * fake UID, and needs to be removed from the summary in order
- * to sync up with the server. So either way, we remove it
- * from the summary.
- */
- removed = g_array_new (FALSE, FALSE, sizeof (int));
- for (i = 0; i < summary_len && new[i].uid; i++) {
- info = camel_folder_summary_index (folder->summary, i);
- iinfo = (CamelImapMessageInfo *)info;
-
- if (strcmp (camel_message_info_uid (info), new[i].uid) != 0) {
- camel_folder_summary_info_free(folder->summary, info);
- 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",
- new[i].uid);
- }
-
- camel_folder_summary_info_free (folder->summary, info);
- g_free (new[i].uid);
- }
-
- seq = i + 1;
-
- /* Free remaining memory. */
- while (i < summary_len && new[i].uid)
- g_free (new[i++].uid);
- g_free (new);
-
- /* Remove any leftover cached summary messages. (Yes, we
- * repeatedly add the same number to the removed array.
- * See RFC2060 7.4.1)
- */
- for (i = seq; i <= summary_len; i++)
- g_array_append_val (removed, seq);
-
- /* And finally update the summary. */
- camel_imap_folder_changed (folder, exists, removed, ex);
- g_array_free (removed, TRUE);
-}
-
-/* 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_offline (CamelFolder *folder, CamelException *ex)
-{
- camel_folder_summary_save (folder->summary);
-}
-
-static void
-imap_sync_online (CamelFolder *folder, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response = NULL;
- CamelMessageInfo *info;
- GPtrArray *matches;
- char *set, *flaglist;
- gboolean unset;
- int i, j, max;
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
-
- /* 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.
- */
- max = camel_folder_summary_count (folder->summary);
- 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;
- }
-
- /* Note: Cyrus will not accept an empty-set of flags
- so... if this is true then we want to unset the
- previously set flags.*/
- unset = info->flags == CAMEL_MESSAGE_FOLDER_FLAGGED;
-
- /* FIXME: since we don't know the previously set
- flags, if unset is TRUE then assume all were set? */
- flaglist = imap_create_flag_list (unset ? CAMEL_IMAP_SERVER_FLAGS : 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);
-
- /* Note: to `unset' flags, use -FLAGS.SILENT (<flag list>) */
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s %sFLAGS.SILENT %s",
- set, unset ? "-" : "", flaglist);
- g_free (set);
- g_free (flaglist);
-
- if (response)
- camel_imap_response_free (store, 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)) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return;
- }
- }
-
- /* Save the summary */
- imap_sync_offline (folder, ex);
-
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-}
-
-static void
-imap_expunge_uids_offline (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- int i;
-
- for (i = 0; i < uids->len; i++) {
- camel_folder_summary_remove_uid (folder->summary, uids->pdata[i]);
- /* We intentionally don't remove it from the cache because
- * the cached data may be useful in replaying a COPY later.
- */
- }
- camel_folder_summary_save (folder->summary);
-
- camel_disco_diary_log (CAMEL_DISCO_STORE (folder->parent_store)->diary,
- CAMEL_DISCO_DIARY_FOLDER_EXPUNGE, folder, uids);
-}
-
-static void
-imap_expunge_uids_online (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- char *set;
-
- set = imap_uid_array_to_set (folder->summary, uids);
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s +FLAGS.SILENT \\Deleted",
- set);
- if (response)
- camel_imap_response_free (store, response);
- if (camel_exception_is_set (ex)) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- g_free (set);
- return;
- }
-
- if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) {
- response = camel_imap_command (store, folder, ex,
- "UID EXPUNGE %s", set);
- } else
- response = camel_imap_command (store, folder, ex, "EXPUNGE");
- if (response)
- camel_imap_response_free (store, response);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-}
-
-static int
-uid_compar (const void *va, const void *vb)
-{
- const char **sa = (const char **)va, **sb = (const char **)vb;
- unsigned long a, b;
-
- a = strtoul (*sa, NULL, 10);
- b = strtoul (*sb, NULL, 10);
- if (a < b)
- return -1;
- else if (a == b)
- return 0;
- else
- return 1;
-}
-
-static void
-imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- char *result, *keep_uidset, *mark_uidset;
-
- if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) {
- imap_expunge_uids_online (folder, uids, ex);
- return;
- }
-
- /* If we don't have UID EXPUNGE we need to avoid expunging any
- * of the wrong messages. So we search for deleted messages,
- * and any that aren't in our to-expunge list get temporarily
- * marked un-deleted.
- */
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, folder, ex, "UID SEARCH DELETED");
- if (!response) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return;
- }
- result = camel_imap_response_extract (store, response, "SEARCH", ex);
- if (!result) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return;
- }
-
- keep_uidset = mark_uidset = NULL;
- if (result[8] == ' ') {
- GPtrArray *keep_uids, *mark_uids;
- char *uid, *lasts = NULL;
- unsigned long euid, kuid;
- int ei, ki;
-
- keep_uids = g_ptr_array_new ();
- mark_uids = g_ptr_array_new ();
-
- /* Parse SEARCH response */
- for (uid = strtok_r (result + 9, " ", &lasts); uid; uid = strtok_r (NULL, " ", &lasts))
- g_ptr_array_add (keep_uids, uid);
- qsort (keep_uids->pdata, keep_uids->len,
- sizeof (void *), uid_compar);
-
- /* Fill in "mark_uids", empty out "keep_uids" as needed */
- for (ei = ki = 0; ei < uids->len; ei++) {
- euid = strtoul (uids->pdata[ei], NULL, 10);
-
- for (kuid = 0; ki < keep_uids->len; ki++) {
- kuid = strtoul (keep_uids->pdata[ki], NULL, 10);
-
- if (kuid >= euid)
- break;
- }
-
- if (euid == kuid)
- g_ptr_array_remove_index (keep_uids, ki);
- else
- g_ptr_array_add (mark_uids, uids->pdata[ei]);
- }
-
- if (keep_uids->len)
- keep_uidset = imap_uid_array_to_set (folder->summary, keep_uids);
- g_ptr_array_free (keep_uids, TRUE);
-
- if (mark_uids->len)
- mark_uidset = imap_uid_array_to_set (folder->summary, mark_uids);
- g_ptr_array_free (mark_uids, TRUE);
- } else {
- /* Empty SEARCH result, meaning nothing is marked deleted
- * on server.
- */
- mark_uidset = imap_uid_array_to_set (folder->summary, uids);
- }
- g_free (result);
-
- /* Unmark messages to be kept */
- if (keep_uidset) {
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s -FLAGS.SILENT \\Deleted",
- keep_uidset);
- if (!response) {
- g_free (keep_uidset);
- g_free (mark_uidset);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return;
- }
- camel_imap_response_free (store, response);
- }
-
- /* Mark any messages that still need to be marked */
- if (mark_uidset) {
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s +FLAGS.SILENT \\Deleted",
- mark_uidset);
- g_free (mark_uidset);
- if (!response) {
- g_free (keep_uidset);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return;
- }
- camel_imap_response_free (store, response);
- }
-
- /* Do the actual expunging */
- response = camel_imap_command (store, folder, ex, "EXPUNGE");
- if (response)
- camel_imap_response_free (store, response);
-
- /* And fix the remaining messages if we mangled them */
- if (keep_uidset) {
- /* Don't pass ex if it's already been set */
- response = camel_imap_command (store, folder,
- camel_exception_is_set (ex) ? NULL : ex,
- "UID STORE %s +FLAGS.SILENT \\Deleted",
- keep_uidset);
- g_free (keep_uidset);
- if (response)
- camel_imap_response_free (store, response);
- }
-
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-}
-
-static void
-imap_append_offline (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapMessageCache *cache = CAMEL_IMAP_FOLDER (folder)->cache;
- CamelFolderChangeInfo *changes;
- char *uid;
-
- /* We could keep a separate counter, but this one works fine. */
- CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
- uid = g_strdup_printf ("append-%d", imap_store->command++);
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
-
- camel_imap_summary_add_offline (folder->summary, uid, message, info);
- CAMEL_IMAP_FOLDER_LOCK (folder, cache_lock);
- camel_imap_message_cache_insert_wrapper (cache, uid, "",
- CAMEL_DATA_WRAPPER (message), ex);
- CAMEL_IMAP_FOLDER_UNLOCK (folder, cache_lock);
-
- changes = camel_folder_change_info_new ();
- camel_folder_change_info_add_uid (changes, uid);
- camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed",
- changes);
- camel_folder_change_info_free (changes);
-
- camel_disco_diary_log (CAMEL_DISCO_STORE (imap_store)->diary,
- CAMEL_DISCO_DIARY_FOLDER_APPEND, folder, uid);
- g_free (uid);
-}
-
-static CamelImapResponse *
-do_append (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **uid,
- CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- CamelStream *memstream;
- CamelMimeFilter *crlf_filter;
- CamelStreamFilter *streamfilter;
- GByteArray *ba;
- char *flagstr, *result, *end;
-
- /* 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));
-
- response = camel_imap_command (store, NULL, ex, "APPEND %F%s%s {%d}",
- folder->full_name, flagstr ? " " : "",
- flagstr ? flagstr : "", ba->len);
- g_free (flagstr);
-
- if (!response) {
- g_byte_array_free (ba, TRUE);
- return NULL;
- }
- result = camel_imap_response_extract_continuation (store, response, ex);
- if (!result) {
- g_byte_array_free (ba, TRUE);
- return NULL;
- }
- 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, ba->data, ex);
- g_byte_array_free (ba, TRUE);
- if (!response)
- return response;
-
- if (store->capabilities & IMAP_CAPABILITY_UIDPLUS) {
- *uid = strstrcase (response->status, "[APPENDUID ");
- if (*uid)
- *uid = strchr (*uid + 11, ' ');
- if (*uid) {
- *uid = g_strndup (*uid + 1, strcspn (*uid + 1, "]"));
- /* Make sure it's a number */
- if (strtoul (*uid, &end, 10) == 0 || *end) {
- g_free (*uid);
- *uid = NULL;
- }
- }
- } else
- *uid = NULL;
-
- return response;
-}
-
-static void
-imap_append_online (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- char *uid;
- int count;
-
- count = camel_folder_summary_count (folder->summary);
- response = do_append (folder, message, info, &uid, ex);
- if (!response)
- return;
-
- if (uid) {
- /* Cache first, since freeing response may trigger a
- * summary update that will want this information.
- */
- CAMEL_IMAP_FOLDER_LOCK (folder, cache_lock);
- camel_imap_message_cache_insert_wrapper (
- CAMEL_IMAP_FOLDER (folder)->cache, uid,
- "", CAMEL_DATA_WRAPPER (message), ex);
- CAMEL_IMAP_FOLDER_UNLOCK (folder, cache_lock);
- g_free (uid);
- }
-
- camel_imap_response_free (store, response);
-
- /* Make sure a "folder_changed" is emitted. */
- if (store->current_folder != folder ||
- camel_folder_summary_count (folder->summary) == count)
- imap_refresh_info (folder, ex);
-}
-
-static void
-imap_append_resyncing (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- char *uid;
-
- response = do_append (folder, message, info, &uid, ex);
- if (!response)
- return;
-
- if (uid) {
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- const char *olduid = camel_message_info_uid (info);
-
- CAMEL_IMAP_FOLDER_LOCK (imap_folder, cache_lock);
- camel_imap_message_cache_copy (imap_folder->cache, olduid,
- imap_folder->cache, uid, ex);
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
-
- camel_disco_diary_uidmap_add (CAMEL_DISCO_STORE (store)->diary,
- olduid, uid);
- }
-
- camel_imap_response_free (store, response);
-}
-
-
-static void
-imap_copy_offline (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (source->parent_store);
- CamelImapMessageCache *sc = CAMEL_IMAP_FOLDER (source)->cache;
- CamelImapMessageCache *dc = CAMEL_IMAP_FOLDER (destination)->cache;
- CamelFolderChangeInfo *changes;
- CamelMimeMessage *message;
- CamelMessageInfo *mi;
- char *uid, *destuid;
- int i;
-
- /* We grab the store's command lock first, and then grab the
- * source and destination cache_locks. This way we can't
- * deadlock in the case where we're simultaneously also trying
- * to copy messages in the other direction from another thread.
- */
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- CAMEL_IMAP_FOLDER_LOCK (source, cache_lock);
- CAMEL_IMAP_FOLDER_LOCK (destination, cache_lock);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-
- changes = camel_folder_change_info_new ();
- for (i = 0; i < uids->len; i++) {
- uid = uids->pdata[i];
-
- message = camel_folder_get_message (source, uid, NULL);
- if (!message)
- continue;
- mi = camel_folder_summary_uid (source->summary, uid);
- g_return_if_fail (mi != NULL);
-
- destuid = g_strdup_printf ("copy-%s:%s", source->full_name, uid);
- camel_imap_summary_add_offline (destination->summary, destuid, message, mi);
-
- camel_imap_message_cache_copy (sc, uid, dc, destuid, ex);
- camel_folder_summary_info_free (source->summary, mi);
- camel_object_unref (CAMEL_OBJECT (message));
-
- camel_folder_change_info_add_uid (changes, destuid);
- g_free (destuid);
- }
-
- CAMEL_IMAP_FOLDER_UNLOCK (destination, cache_lock);
- CAMEL_IMAP_FOLDER_UNLOCK (source, cache_lock);
-
- camel_object_trigger_event (CAMEL_OBJECT (destination),
- "folder_changed", changes);
- camel_folder_change_info_free (changes);
-
- camel_disco_diary_log (CAMEL_DISCO_STORE (store)->diary,
- CAMEL_DISCO_DIARY_FOLDER_COPY,
- source, destination, uids);
-}
-
-static void
-handle_copyuid (CamelImapResponse *response, CamelFolder *source,
- CamelFolder *destination)
-{
- CamelImapMessageCache *scache = CAMEL_IMAP_FOLDER (source)->cache;
- CamelImapMessageCache *dcache = CAMEL_IMAP_FOLDER (destination)->cache;
- char *validity, *srcset, *destset;
- GPtrArray *src, *dest;
- int i;
-
- validity = strstrcase (response->status, "[COPYUID ");
- if (!validity)
- return;
- validity += 9;
- if (strtoul (validity, NULL, 10) !=
- CAMEL_IMAP_SUMMARY (destination->summary)->validity)
- return;
-
- srcset = strchr (validity, ' ');
- if (!srcset++)
- goto lose;
- destset = strchr (srcset, ' ');
- if (!destset++)
- goto lose;
-
- src = imap_uid_set_to_array (source->summary, srcset);
- dest = imap_uid_set_to_array (destination->summary, destset);
-
- if (src && dest && src->len == dest->len) {
- /* We don't have to worry about deadlocking on the
- * cache locks here, because we've got the store's
- * command lock too, so no one else could be here.
- */
- CAMEL_IMAP_FOLDER_LOCK (source, cache_lock);
- CAMEL_IMAP_FOLDER_LOCK (destination, cache_lock);
- for (i = 0; i < src->len; i++) {
- camel_imap_message_cache_copy (scache, src->pdata[i],
- dcache, dest->pdata[i],
- NULL);
- }
- CAMEL_IMAP_FOLDER_UNLOCK (source, cache_lock);
- CAMEL_IMAP_FOLDER_UNLOCK (destination, cache_lock);
-
- imap_uid_array_free (src);
- imap_uid_array_free (dest);
- return;
- }
-
- imap_uid_array_free (src);
- imap_uid_array_free (dest);
- lose:
- g_warning ("Bad COPYUID response from server");
-}
-
-static void
-do_copy (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (source->parent_store);
- CamelImapResponse *response;
- char *set;
-
- set = imap_uid_array_to_set (source->summary, uids);
- response = camel_imap_command (store, source, ex, "UID COPY %s %F",
- set, destination->full_name);
- if (response && (store->capabilities & IMAP_CAPABILITY_UIDPLUS))
- handle_copyuid (response, source, destination);
-
- camel_imap_response_free (store, response);
- g_free (set);
-}
-
-static void
-imap_copy_online (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (source->parent_store);
- int count;
-
- /* Sync message flags if needed. */
- imap_sync_online (source, ex);
- if (camel_exception_is_set (ex))
- return;
-
- count = camel_folder_summary_count (destination->summary);
-
- /* Now copy the messages */
- do_copy (source, uids, destination, ex);
- if (camel_exception_is_set (ex))
- return;
-
- /* Make the destination notice its new messages */
- if (store->current_folder != destination ||
- camel_folder_summary_count (destination->summary) == count)
- camel_folder_refresh_info (destination, ex);
-}
-
-static void
-imap_copy_resyncing (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelDiscoDiary *diary = CAMEL_DISCO_STORE (source->parent_store)->diary;
- GPtrArray *realuids;
- int first, i;
- const char *uid;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
-
- /* This is trickier than append_resyncing, because some of
- * the messages we are copying may have been copied or
- * appended into @source while we were offline, in which case
- * if we don't have UIDPLUS, we won't know their real UIDs,
- * so we'll have to append them rather than copying.
- */
-
- realuids = g_ptr_array_new ();
-
- i = 0;
- while (i < uids->len) {
- /* Skip past real UIDs */
- for (first = i; i < uids->len; i++) {
- uid = uids->pdata[i];
-
- if (!isdigit ((unsigned char)*uid)) {
- uid = camel_disco_diary_uidmap_lookup (diary, uid);
- if (!uid)
- break;
- }
- g_ptr_array_add (realuids, (char *)uid);
- }
-
- /* If we saw any real UIDs, do a COPY */
- if (i != first) {
- do_copy (source, realuids, destination, ex);
- g_ptr_array_set_size (realuids, 0);
- if (i == uids->len || camel_exception_is_set (ex))
- break;
- }
-
- /* Deal with fake UIDs */
- while (i < uids->len &&
- !isdigit (*(unsigned char *)(uids->pdata[i])) &&
- !camel_exception_is_set (ex)) {
- message = camel_folder_get_message (source, uids->pdata[i], NULL);
- if (!message) {
- /* Message must have been expunged */
- continue;
- }
- info = camel_folder_get_message_info (source, uids->pdata[i]);
- g_return_if_fail (info != NULL);
-
- imap_append_online (destination, message, info, ex);
- camel_folder_free_message_info (source, info);
- camel_object_unref (CAMEL_OBJECT (message));
- i++;
- }
- }
-
- g_ptr_array_free (realuids, FALSE);
-}
-
-static void
-imap_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- int i;
-
- /* do it this way (as opposed to camel_folder_copy_messages_to)
- * to avoid locking issues */
- CF_CLASS (source)->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_disco_store_check_online (CAMEL_DISCO_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 = NULL;
- 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 *
-get_message_simple (CamelImapFolder *imap_folder, const char *uid,
- CamelStream *stream, CamelException *ex)
-{
- CamelMimeMessage *msg;
-
- if (!stream) {
- 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;
-}
-
-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 = NULL;
-
- /* If the server doesn't support IMAP4rev1, or we already have
- * the whole thing cached, fetch it in one piece.
- */
- if (store->server_level < IMAP_LEVEL_IMAP4REV1 ||
- (stream = camel_imap_folder_fetch_data (imap_folder, uid, "", TRUE, NULL)))
- return get_message_simple (imap_folder, uid, stream, ex);
-
- mi = camel_folder_summary_uid (folder->summary, uid);
- g_return_val_if_fail (mi != NULL, NULL);
-
- /* If the message is small, fetch it in one piece. */
- if (mi->size < IMAP_SMALL_BODY_SIZE) {
- camel_folder_summary_info_free (folder->summary, mi);
- return get_message_simple (imap_folder, uid, NULL, ex);
- }
-
- /* 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_disco_store_status (CAMEL_DISCO_STORE (store)) == CAMEL_DISCO_STORE_OFFLINE) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("This message is not currently available"));
- return NULL;
- }
-
- response = camel_imap_command (store, folder, ex,
- "UID FETCH %s BODY", uid);
- 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 (store, response);
-
- if (!mi->content->type) {
- /* FETCH returned OK, but we didn't parse a BODY
- * response. Courier will return invalid BODY
- * responses for invalidly MIMEd messages, so
- * fall back to fetching the entire thing and
- * let the mailer's "bad MIME" code handle it.
- */
- camel_folder_summary_info_free (folder->summary, mi);
- return get_message_simple (imap_folder, uid, NULL, ex);
- }
- }
-
- msg = get_message (imap_folder, uid, "", mi->content, ex);
- camel_folder_summary_info_free (folder->summary, mi);
-
- return msg;
-}
-
-static void
-imap_cache_message (CamelDiscoFolder *disco_folder, const char *uid,
- CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (disco_folder);
- CamelStream *stream;
-
- stream = camel_imap_folder_fetch_data (imap_folder, uid, "", FALSE, ex);
- if (stream)
- camel_object_unref (CAMEL_OBJECT (stream));
-}
-
-/* We pretend that a FLAGS or RFC822.SIZE response is always exactly
- * 20 bytes long, and a BODY[HEADERS] response is always 2000 bytes
- * long. Since we know how many of each kind of response we're
- * expecting, we can find the total (pretend) amount of server traffic
- * to expect and then count off the responses as we read them to update
- * the progress bar.
- */
-#define IMAP_PRETEND_SIZEOF_FLAGS 20
-#define IMAP_PRETEND_SIZEOF_SIZE 20
-#define IMAP_PRETEND_SIZEOF_HEADERS 2000
-
-static void
-add_message_from_data (CamelFolder *folder, GPtrArray *messages,
- int first, GData *data)
-{
- int seq;
- CamelMimeMessage *msg;
- CamelStream *stream;
- CamelMessageInfo *mi;
-
- seq = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE"));
- if (seq < first)
- return;
- stream = g_datalist_get_data (&data, "BODY_PART_STREAM");
- if (!stream)
- return;
-
- if (seq - first >= messages->len)
- g_ptr_array_set_size (messages, seq - first + 1);
-
- msg = camel_mime_message_new ();
- 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;
-}
-
-static void
-imap_update_summary (CamelFolder *folder, int exists,
- CamelFolderChangeInfo *changes,
- CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- GPtrArray *fetch_data = NULL, *messages = NULL, *needheaders;
- guint32 flags, uidval, maxuid;
- int i, seq, first, size, got;
- CamelImapResponseType type;
- const char *header_spec;
- CamelMessageInfo *mi;
- CamelStream *stream;
- char *uid, *resp;
- GData *data;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock);
- if (store->server_level >= IMAP_LEVEL_IMAP4REV1)
- header_spec = "HEADER";
- else
- header_spec = "0";
-
- /* Figure out if any of the new messages are already cached (which
- * may be the case if we're re-syncing after disconnected operation).
- * If so, get their UIDs, FLAGS, and SIZEs. If not, get all that
- * and ask for the headers too at the same time.
- */
- seq = camel_folder_summary_count (folder->summary);
- first = seq + 1;
- if (seq > 0) {
- mi = camel_folder_summary_index (folder->summary, seq - 1);
- uidval = atoi (camel_message_info_uid (mi));
- camel_folder_summary_info_free (folder->summary, mi);
- } else
- uidval = 0;
-
- size = (exists - seq) * (IMAP_PRETEND_SIZEOF_FLAGS + IMAP_PRETEND_SIZEOF_SIZE);
- got = 0;
-
- maxuid = camel_imap_message_cache_max_uid (imap_folder->cache);
- if (uidval >= maxuid) {
- /* None of the new messages are cached */
- size += (exists - seq) * IMAP_PRETEND_SIZEOF_HEADERS;
- if (!camel_imap_command_start (store, folder, ex,
- "UID FETCH %d:* (FLAGS RFC822.SIZE BODY.PEEK[%s])",
- maxuid + 1, header_spec))
- return;
- camel_operation_start (NULL, _("Fetching summary information for new messages"));
- } else {
- if (!camel_imap_command_start (store, folder, ex,
- "UID FETCH %d:* (FLAGS RFC822.SIZE)",
- uidval + 1))
- return;
- camel_operation_start (NULL, _("Scanning for new messages"));
- }
-
- /* Parse the responses. We can't add a message to the summary
- * until we've gotten its headers, and there's no guarantee
- * the server will send the responses in a useful order...
- */
- fetch_data = g_ptr_array_new ();
- messages = g_ptr_array_new ();
- while ((type = camel_imap_command_response (store, &resp, ex)) ==
- CAMEL_IMAP_RESPONSE_UNTAGGED) {
- data = parse_fetch_response (imap_folder, resp);
- g_free (resp);
- if (!data)
- continue;
-
- seq = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE"));
- if (seq < first) {
- g_datalist_clear (&data);
- continue;
- }
-
- if (g_datalist_get_data (&data, "FLAGS"))
- got += IMAP_PRETEND_SIZEOF_FLAGS;
- if (g_datalist_get_data (&data, "RFC822.SIZE"))
- got += IMAP_PRETEND_SIZEOF_SIZE;
- stream = g_datalist_get_data (&data, "BODY_PART_STREAM");
- if (stream) {
- got += IMAP_PRETEND_SIZEOF_HEADERS;
-
- /* Use the stream now so we don't tie up many
- * many fds if we're fetching many many messages.
- */
- add_message_from_data (folder, messages, first, data);
- g_datalist_set_data (&data, "BODY_PART_STREAM", NULL);
- }
-
- camel_operation_progress (NULL, got * 100 / size);
- g_ptr_array_add (fetch_data, data);
- }
- camel_operation_end (NULL);
-
- if (type == CAMEL_IMAP_RESPONSE_ERROR)
- goto lose;
-
- /* Figure out which headers we still need to fetch. */
- needheaders = g_ptr_array_new ();
- size = got = 0;
- for (i = 0; i < fetch_data->len; i++) {
- data = fetch_data->pdata[i];
- if (g_datalist_get_data (&data, "BODY_PART_LEN"))
- continue;
-
- uid = g_datalist_get_data (&data, "UID");
- if (uid) {
- g_ptr_array_add (needheaders, uid);
- size += IMAP_PRETEND_SIZEOF_HEADERS;
- }
- }
-
- /* And fetch them */
- if (needheaders->len) {
- char *set;
-
- /* FIXME: sort needheaders */
- set = imap_uid_array_to_set (folder->summary, needheaders);
- g_ptr_array_free (needheaders, TRUE);
- if (!camel_imap_command_start (store, folder, ex,
- "UID FETCH %s BODY.PEEK[%s]",
- set, header_spec)) {
- g_free (set);
- goto lose;
- }
- g_free (set);
-
- camel_operation_start (NULL, _("Fetching summary information for new messages"));
- while ((type = camel_imap_command_response (store, &resp, ex))
- == CAMEL_IMAP_RESPONSE_UNTAGGED) {
- data = parse_fetch_response (imap_folder, resp);
- g_free (resp);
- if (!data)
- continue;
-
- stream = g_datalist_get_data (&data, "BODY_PART_STREAM");
- if (stream) {
- add_message_from_data (folder, messages, first, data);
- got += IMAP_PRETEND_SIZEOF_HEADERS;
- camel_operation_progress (NULL, got * 100 / size);
- }
- g_datalist_clear (&data);
- }
- camel_operation_end (NULL);
-
- if (type == CAMEL_IMAP_RESPONSE_ERROR)
- goto lose;
- }
-
- /* Now finish up summary entries (fix UIDs, set flags and size) */
- for (i = 0; i < fetch_data->len; i++) {
- data = fetch_data->pdata[i];
-
- seq = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE"));
- if (seq >= first + messages->len) {
- g_datalist_clear (&data);
- continue;
- }
- mi = messages->pdata[seq - first];
-
- uid = g_datalist_get_data (&data, "UID");
- if (uid)
- camel_message_info_set_uid (mi, g_strdup (uid));
- flags = GPOINTER_TO_INT (g_datalist_get_data (&data, "FLAGS"));
- if (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;
- }
- size = GPOINTER_TO_INT (g_datalist_get_data (&data, "RFC822.SIZE"));
- if (size)
- mi->size = size;
-
- g_datalist_clear (&data);
- }
- g_ptr_array_free (fetch_data, TRUE);
-
- /* And add the entries to the summary, etc. */
- 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));
-
- if ((mi->flags & CAMEL_IMAP_MESSAGE_RECENT))
- camel_folder_change_info_recent_uid(changes, camel_message_info_uid (mi));
- }
- g_ptr_array_free (messages, TRUE);
- return;
-
- lose:
- if (fetch_data) {
- for (i = 0; i < fetch_data->len; i++) {
- data = fetch_data->pdata[i];
- g_datalist_clear (&data);
- }
- g_ptr_array_free (fetch_data, TRUE);
- }
- if (messages) {
- for (i = 0; i < messages->len; i++) {
- if (messages->pdata[i])
- camel_folder_summary_info_free (folder->summary, messages->pdata[i]);
- }
- g_ptr_array_free (messages, TRUE);
- }
-}
-
-/* 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;
- GPtrArray *recents = NULL;
- int len;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (folder->parent_store, command_lock);
-
- 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);
- if (info == NULL) {
- /* FIXME: danw: does this mean that the summary is corrupt? */
- /* I guess a message that we never retrieved got expunged? */
- continue;
- }
-
- camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info));
- CAMEL_IMAP_FOLDER_LOCK (imap_folder, cache_lock);
- camel_imap_message_cache_remove (imap_folder->cache, camel_message_info_uid (info));
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- 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, exists, 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);
-
- if (recents)
- g_ptr_array_free (recents, TRUE);
-
- camel_folder_summary_save (folder->summary);
-}
-
-static void
-imap_thaw (CamelFolder *folder)
-{
- CamelImapFolder *imap_folder;
-
- CAMEL_FOLDER_CLASS (disco_folder_class)->thaw (folder);
- if (camel_folder_is_frozen (folder))
- return;
-
- imap_folder = CAMEL_IMAP_FOLDER (folder);
- if (imap_folder->need_refresh) {
- imap_folder->need_refresh = FALSE;
- imap_refresh_info (folder, NULL);
- }
-}
-
-
-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;
-
- /* EXPUNGE responses have to modify the cache, which means
- * they have to grab the cache_lock while holding the
- * command_lock. So we grab the command_lock now, in case
- * we're going to need it below, since we can't grab it
- * after the cache_lock.
- */
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
-
- CAMEL_IMAP_FOLDER_LOCK (imap_folder, cache_lock);
- stream = camel_imap_message_cache_get (imap_folder->cache, uid, section_text);
- if (!stream && (!strcmp (section_text, "HEADER") || !strcmp (section_text, "0")))
- stream = camel_imap_message_cache_get (imap_folder->cache, uid, "");
- if (stream || cache_only) {
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return stream;
- }
-
- if (camel_disco_store_status (CAMEL_DISCO_STORE (store)) == CAMEL_DISCO_STORE_OFFLINE) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("This message is not currently available"));
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return NULL;
- }
-
- 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);
- }
- /* We won't need the command_lock again after this. */
- 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 (store, 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;
-
- g_datalist_set_data (&data, "SEQUENCE", GINT_TO_POINTER (seq));
- }
-
- 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, NULL);
- 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 295cfd041e..0000000000
--- a/camel/providers/imap/camel-imap-folder.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-folder.h: class for an imap folder */
-
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright (C) 2000, 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 CAMEL_IMAP_FOLDER_H
-#define CAMEL_IMAP_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-imap-types.h"
-#include "camel-disco-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 {
- CamelDiscoFolder parent_object;
-
- struct _CamelImapFolderPrivate *priv;
-
- gboolean need_rescan, need_refresh;
- CamelFolderSearch *search;
- CamelImapMessageCache *cache;
-};
-
-
-typedef struct {
- CamelDiscoFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelImapFolderClass;
-
-
-/* public methods */
-CamelFolder *camel_imap_folder_new (CamelStore *parent,
- const char *folder_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 47e40a2ad1..0000000000
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ /dev/null
@@ -1,503 +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-data-wrapper.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 okey, ostream;
- guint32 uidval;
-
- uidval = strtoul (uid, NULL, 10);
- if (uidval > cache->max_uid)
- cache->max_uid = uidval;
-
- 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);
- }
-
- if (g_hash_table_lookup_extended (cache->parts, key, &okey, &ostream)) {
- if (ostream) {
- camel_object_unhook_event (ostream, "finalize",
- stream_finalize, cache);
- g_hash_table_remove (cache->cached, ostream);
- camel_object_unref (ostream);
- }
- hash_key = okey;
- } else {
- hash_key = g_strdup (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);
- }
-}
-
-/**
- * camel_imap_message_cache_new:
- * @path: directory to use for storage
- * @summary: CamelFolderSummary for the folder we are caching
- * @ex: a CamelException
- *
- * Return value: a new CamelImapMessageCache object using @path for
- * storage. If cache files already exist in @path, then any that do not
- * correspond to messages in @summary will be deleted.
- **/
-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;
-}
-
-/**
- * camel_imap_message_cache_max_uid:
- * @cache: the cache
- *
- * Return value: the largest (real) UID in the cache.
- **/
-guint32
-camel_imap_message_cache_max_uid (CamelImapMessageCache *cache)
-{
- return cache->max_uid;
-}
-
-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);
-}
-
-
-static CamelStream *
-insert_setup (CamelImapMessageCache *cache, const char *uid, const char *part_spec,
- char **path, char **key, CamelException *ex)
-{
- CamelStream *stream;
- int fd;
-
- *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) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to cache message %s: %s"),
- uid, g_strerror (errno));
- g_free (*path);
- return NULL;
- }
-
- return camel_stream_fs_new_with_fd (fd);
-}
-
-static CamelStream *
-insert_abort (char *path, CamelStream *stream)
-{
- unlink (path);
- g_free (path);
- camel_object_unref (CAMEL_OBJECT (stream));
- return NULL;
-}
-
-static CamelStream *
-insert_finish (CamelImapMessageCache *cache, const char *uid, char *path,
- char *key, CamelStream *stream)
-{
- camel_stream_reset (stream);
- cache_put (cache, uid, key, stream);
- g_free (path);
-
- return stream;
-}
-
-/**
- * camel_imap_message_cache_insert:
- * @cache: the cache
- * @uid: UID of the message data to cache
- * @part_spec: the IMAP part_spec of the data
- * @data: the data
- * @len: length of @data
- *
- * Caches the provided data into @cache.
- *
- * Return value: a CamelStream containing the cached data, which the
- * caller must unref.
- **/
-CamelStream *
-camel_imap_message_cache_insert (CamelImapMessageCache *cache, const char *uid,
- const char *part_spec, const char *data,
- int len, CamelException *ex)
-{
- char *path, *key;
- CamelStream *stream;
-
- stream = insert_setup (cache, uid, part_spec, &path, &key, ex);
- if (!stream)
- return NULL;
-
- if (camel_stream_write (stream, data, len) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to cache message %s: %s"),
- uid, g_strerror (errno));
- return insert_abort (path, stream);
- }
-
- return insert_finish (cache, uid, path, key, stream);
-}
-
-/**
- * camel_imap_message_cache_insert_stream:
- * @cache: the cache
- * @uid: UID of the message data to cache
- * @part_spec: the IMAP part_spec of the data
- * @data_stream: the stream to cache
- *
- * Caches the provided data into @cache.
- **/
-void
-camel_imap_message_cache_insert_stream (CamelImapMessageCache *cache,
- const char *uid, const char *part_spec,
- CamelStream *data_stream, CamelException *ex)
-{
- char *path, *key;
- CamelStream *stream;
-
- stream = insert_setup (cache, uid, part_spec, &path, &key, ex);
- if (!stream)
- return;
-
- if (camel_stream_write_to_stream (data_stream, stream) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to cache message %s: %s"),
- uid, g_strerror (errno));
- insert_abort (path, stream);
- } else {
- insert_finish (cache, uid, path, key, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- }
-}
-
-/**
- * camel_imap_message_cache_insert_wrapper:
- * @cache: the cache
- * @uid: UID of the message data to cache
- * @part_spec: the IMAP part_spec of the data
- * @wrapper: the wrapper to cache
- *
- * Caches the provided data into @cache.
- **/
-void
-camel_imap_message_cache_insert_wrapper (CamelImapMessageCache *cache,
- const char *uid, const char *part_spec,
- CamelDataWrapper *wrapper, CamelException *ex)
-{
- char *path, *key;
- CamelStream *stream;
-
- stream = insert_setup (cache, uid, part_spec, &path, &key, ex);
- if (!stream)
- return;
-
- if (camel_data_wrapper_write_to_stream (wrapper, stream) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to cache message %s: %s"),
- uid, g_strerror (errno));
- insert_abort (path, stream);
- } else {
- insert_finish (cache, uid, path, key, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- }
-}
-
-
-/**
- * camel_imap_message_cache_get:
- * @cache: the cache
- * @uid: the UID of the data to get
- * @part_spec: the part_spec of the data to get
- *
- * Return value: a CamelStream containing the cached data (which the
- * caller must unref), or %NULL if that data is not cached.
- **/
-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, '/') + 1;
- 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;
-}
-
-/**
- * camel_imap_message_cache_remove:
- * @cache: the cache
- * @uid: UID of the data to remove
- *
- * Removes all data associated with @uid from @cache.
- **/
-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 void
-add_uids (gpointer key, gpointer value, gpointer data)
-{
- if (!strchr (key, '.'))
- g_ptr_array_add (data, key);
-}
-
-/**
- * camel_imap_message_cache_clear:
- * @cache: the cache
- *
- * Removes all cached data from @cache.
- **/
-void
-camel_imap_message_cache_clear (CamelImapMessageCache *cache)
-{
- GPtrArray *uids;
- int i;
-
- uids = g_ptr_array_new ();
- g_hash_table_foreach (cache->parts, add_uids, uids);
-
- for (i = 0; i < uids->len; i++)
- camel_imap_message_cache_remove (cache, uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
-}
-
-
-/**
- * camel_imap_message_cache_copy:
- * @source: the source message cache
- * @source_uid: UID of a message in @source
- * @dest: the destination message cache
- * @dest_uid: UID of the message in @dest
- *
- * Copies all cached parts from @source_uid in @source to @dest_uid in
- * @destination.
- **/
-void
-camel_imap_message_cache_copy (CamelImapMessageCache *source,
- const char *source_uid,
- CamelImapMessageCache *dest,
- const char *dest_uid,
- CamelException *ex)
-{
- GPtrArray *subparts;
- CamelStream *stream;
- char *part;
- int i;
-
- subparts = g_hash_table_lookup (source->parts, source_uid);
- if (!subparts || !subparts->len)
- return;
-
- for (i = 0; i < subparts->len; i++) {
- part = strchr (subparts->pdata[i], '.');
- if (!part++)
- continue;
- stream = camel_imap_message_cache_get (source, source_uid, part);
- camel_imap_message_cache_insert_stream (dest, dest_uid, part, stream, ex);
- camel_object_unref (CAMEL_OBJECT (stream));
- }
-}
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 4399a5e703..0000000000
--- a/camel/providers/imap/camel-imap-message-cache.h
+++ /dev/null
@@ -1,107 +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;
- guint32 max_uid;
-};
-
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelImapMessageCacheClass;
-
-
-/* public methods */
-CamelImapMessageCache *camel_imap_message_cache_new (const char *path,
- CamelFolderSummary *summ,
- CamelException *ex);
-
-guint32 camel_imap_message_cache_max_uid (CamelImapMessageCache *cache);
-
-CamelStream *camel_imap_message_cache_insert (CamelImapMessageCache *cache,
- const char *uid,
- const char *part_spec,
- const char *data,
- int len,
- CamelException *ex);
-void camel_imap_message_cache_insert_stream (CamelImapMessageCache *cache,
- const char *uid,
- const char *part_spec,
- CamelStream *data_stream,
- CamelException *ex);
-void camel_imap_message_cache_insert_wrapper (CamelImapMessageCache *cache,
- const char *uid,
- const char *part_spec,
- CamelDataWrapper *wrapper,
- CamelException *ex);
-
-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);
-
-void camel_imap_message_cache_copy (CamelImapMessageCache *source,
- const char *source_uid,
- CamelImapMessageCache *dest,
- const char *dest_uid,
- CamelException *ex);
-
-/* 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 95014eca40..0000000000
--- a/camel/providers/imap/camel-imap-private.h
+++ /dev/null
@@ -1,95 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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))
-# if 0
-# define CAMEL_IMAP_STORE_ASSERT_LOCKED(f, l) (e_mutex_assert_locked(((CamelImapStore *)f)->priv->l))
-# else
-# define CAMEL_IMAP_STORE_ASSERT_LOCKED(f, l)
-# endif
-#else
-#define CAMEL_IMAP_STORE_LOCK(f, l)
-#define CAMEL_IMAP_STORE_UNLOCK(f, l)
-#define CAMEL_IMAP_STORE_ASSERT_LOCKED(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 40ec09f3ca..0000000000
--- a/camel/providers/imap/camel-imap-provider.c
+++ /dev/null
@@ -1,151 +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@ximian.com>
- *
- * Copyright 2000 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-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", NULL,
- N_("Apply filters to new messages in INBOX on this server"), "0" },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider imap_provider = {
- "imap",
- N_("IMAP"),
-
- 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.url_hash = imap_url_hash;
- imap_provider.url_equal = 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 3c96449963..0000000000
--- a/camel/providers/imap/camel-imap-search.c
+++ /dev/null
@@ -1,161 +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@ximian.com>
- *
- * Copyright 2000, 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 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 = NULL;
- char *result, *p, *lasts = NULL, *real_uid;
- const char *uid = "";
- ESExpResult *r;
- CamelMessageInfo *info;
- GHashTable *uid_hash = NULL;
-
- 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);
-
- if (argc == 1 && *value == '\0' && s->folder) {
- /* optimise the match "" case - match everything */
- int i;
-
- r->value.ptrarray = g_ptr_array_new ();
- for (i = 0; i < s->summary->len; i++) {
- CamelMessageInfo *info = g_ptr_array_index (s->summary, i);
- g_ptr_array_add (r->value.ptrarray, (char *)camel_message_info_uid (info));
- }
- } else {
- /* FIXME: danw: what if we have multiple string args? */
- r->value.ptrarray = g_ptr_array_new ();
- response = camel_imap_command (store, s->folder, NULL,
- "UID SEARCH BODY \"%s\"",
- value);
- }
- }
-
- if (!response)
- return r;
- result = camel_imap_response_extract (store, 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 58bd2268ba..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@ximian.com>
- *
- * Copyright 2000 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_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 1ab13d9a47..0000000000
--- a/camel/providers/imap/camel-imap-store.c
+++ /dev/null
@@ -1,1696 +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:
- * Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000, 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 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 "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-imap-summary.h"
-#include "camel-imap-message-cache.h"
-#include "camel-disco-diary.h"
-#include "camel-file-utils.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"
-
-/* Specified in RFC 2060 */
-#define IMAP_PORT 143
-
-static CamelDiscoStoreClass *disco_store_class = NULL;
-static CamelRemoteStoreClass *remote_store_class = NULL;
-static char imap_tag_prefix = 'A';
-
-static void construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-static gboolean can_work_offline (CamelDiscoStore *disco_store);
-static gboolean imap_connect_online (CamelService *service, CamelException *ex);
-static gboolean imap_connect_offline (CamelService *service, CamelException *ex);
-static gboolean imap_disconnect_online (CamelService *service, gboolean clean, CamelException *ex);
-static gboolean imap_disconnect_offline (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_online (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex);
-static CamelFolder *get_folder_offline (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 void delete_folder (CamelStore *store, const char *folder_name, CamelException *ex);
-static CamelFolderInfo *get_folder_info_online (CamelStore *store,
- const char *top,
- guint32 flags,
- CamelException *ex);
-static CamelFolderInfo *get_folder_info_offline (CamelStore *store,
- const char *top,
- guint32 flags,
- 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 void get_folders_online (CamelImapStore *imap_store, const char *pattern,
- GPtrArray *folders, gboolean lsub, CamelException *ex);
-
-static void
-camel_imap_store_class_init (CamelImapStoreClass *camel_imap_store_class)
-{
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_imap_store_class);
- CamelStoreClass *camel_store_class =
- CAMEL_STORE_CLASS (camel_imap_store_class);
- CamelRemoteStoreClass *camel_remote_store_class =
- CAMEL_REMOTE_STORE_CLASS (camel_imap_store_class);
- CamelDiscoStoreClass *camel_disco_store_class =
- CAMEL_DISCO_STORE_CLASS (camel_imap_store_class);
-
- disco_store_class = CAMEL_DISCO_STORE_CLASS (camel_type_get_global_classfuncs (camel_disco_store_get_type ()));
- 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_store_class->hash_folder_name = hash_folder_name;
- camel_store_class->compare_folder_name = compare_folder_name;
- camel_store_class->create_folder = create_folder;
- camel_store_class->delete_folder = delete_folder;
- 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;
-
- camel_disco_store_class->can_work_offline = can_work_offline;
- camel_disco_store_class->connect_online = imap_connect_online;
- camel_disco_store_class->connect_offline = imap_connect_offline;
- camel_disco_store_class->disconnect_online = imap_disconnect_online;
- camel_disco_store_class->disconnect_offline = imap_disconnect_offline;
- camel_disco_store_class->get_folder_online = get_folder_online;
- camel_disco_store_class->get_folder_offline = get_folder_offline;
- camel_disco_store_class->get_folder_resyncing = get_folder_online;
- camel_disco_store_class->get_folder_info_online = get_folder_info_online;
- camel_disco_store_class->get_folder_info_offline = get_folder_info_offline;
- camel_disco_store_class->get_folder_info_resyncing = get_folder_info_online;
-}
-
-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);
-
- /* This frees current_folder, folders, authtypes, and namespace. */
- imap_disconnect_offline (CAMEL_SERVICE (object), FALSE, NULL);
-
- if (imap_store->base_url)
- g_free (imap_store->base_url);
- if (imap_store->storage_path)
- g_free (imap_store->storage_path);
-
-#ifdef ENABLE_THREADS
- e_mutex_destroy (imap_store->priv->command_lock);
- e_thread_destroy(imap_store->async_thread);
-#endif
- g_free (imap_store->priv);
-}
-
-#ifdef ENABLE_THREADS
-static void async_destroy(EThread *et, EMsg *em, void *data)
-{
- CamelImapStore *imap_store = data;
- CamelImapMsg *msg = (CamelImapMsg *)em;
-
- if (msg->free)
- msg->free(imap_store, msg);
-
- g_free(msg);
-}
-
-static void async_received(EThread *et, EMsg *em, void *data)
-{
- CamelImapStore *imap_store = data;
- CamelImapMsg *msg = (CamelImapMsg *)em;
-
- if (msg->receive)
- msg->receive(imap_store, msg);
-}
-
-CamelImapMsg *camel_imap_msg_new(void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m),
- void (*free)(CamelImapStore *store, struct _CamelImapMsg *m),
- size_t size)
-{
- CamelImapMsg *msg;
-
- g_assert(size >= sizeof(*msg));
-
- msg = g_malloc0(size);
- msg->receive = receive;
- msg->free = free;
-
- return msg;
-}
-
-void camel_imap_msg_queue(CamelImapStore *store, CamelImapMsg *msg)
-{
- e_thread_put(store->async_thread, (EMsg *)msg);
-}
-
-#endif
-
-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->tag_prefix = imap_tag_prefix++;
- if (imap_tag_prefix > 'Z')
- imap_tag_prefix = 'A';
-
- imap_store->priv = g_malloc0 (sizeof (*imap_store->priv));
-#ifdef ENABLE_THREADS
- imap_store->priv->command_lock = e_mutex_new (E_MUTEX_REC);
- imap_store->async_thread = e_thread_new(E_THREAD_QUEUE);
- e_thread_set_msg_destroy(imap_store->async_thread, async_destroy, imap_store);
- e_thread_set_msg_received(imap_store->async_thread, async_received, imap_store);
-#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_DISCO_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 (disco_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 (!imap_store->storage_path)
- return;
-
- /* FIXME */
- 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;
- store->flags |= CAMEL_STORE_FILTER_INBOX;
- }
-}
-
-static void
-imap_set_server_level (CamelImapStore *store)
-{
- 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;
-}
-
-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;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock);
-
- 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 (store, 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);
-
- imap_set_server_level (store);
-
- 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;
- gboolean connected;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return NULL;
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- connected = CAMEL_SERVICE_CLASS (remote_store_class)->connect (service, ex) && connect_to_server (service, ex);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- if (!connected)
- return NULL;
-
- types = CAMEL_SERVICE_CLASS (disco_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_IMAP_FOLDER (folder)->need_rescan = TRUE;
- 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;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock);
-
- response = camel_imap_command (store, NULL, ex,
- "AUTHENTICATE %s", mech);
- if (!response)
- return FALSE;
-
- sasl = camel_sasl_new ("imap", mech, CAMEL_SERVICE (store));
- while (!camel_sasl_authenticated (sasl)) {
- resp = camel_imap_response_extract_continuation (store, 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, sasl_resp, ex);
- g_free (sasl_resp);
- if (!response)
- goto lose;
- }
-
- resp = camel_imap_response_extract_continuation (store, 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));
-
- 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 (store, 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));
-
- 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;
-
- CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock);
-
- 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_forget_password (
- session, 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_get_password (
- session, 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 {
- response = camel_imap_command (store, NULL, ex,
- "LOGIN %S %S",
- service->url->user,
- service->url->passwd);
- if (response) {
- camel_imap_response_free (store, 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;
-}
-
-#define IMAP_STOREINFO_VERSION 1
-
-static gboolean
-can_work_offline (CamelDiscoStore *disco_store)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (disco_store);
- char *path;
- gboolean can;
-
- path = g_strdup_printf ("%s/storeinfo", store->storage_path);
- can = access (path, F_OK) == 0;
- g_free (path);
- return can;
-}
-
-static gboolean
-imap_connect_online (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (service);
- CamelImapResponse *response;
- int i, flags, len;
- char *result, *name, *path;
- FILE *storeinfo;
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- if (!connect_to_server (service, ex) ||
- !imap_auth_loop (service, ex)) {
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
-
- 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_file_util_encode_uint32 (storeinfo, IMAP_STOREINFO_VERSION);
- camel_file_util_encode_uint32 (storeinfo, store->capabilities);
-
- /* Get namespace and hierarchy separator */
- if ((store->capabilities & IMAP_CAPABILITY_NAMESPACE) &&
- !(store->parameters & IMAP_PARAM_OVERRIDE_NAMESPACE)) {
- response = camel_imap_command (store, NULL, ex, "NAMESPACE");
- if (!response)
- goto done;
-
- result = camel_imap_response_extract (store, response, "NAMESPACE", ex);
- if (!result)
- goto done;
-
- name = 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) {
- 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);
- }
- if (!response)
- goto done;
-
- result = camel_imap_response_extract (store, response, "LIST", NULL);
- if (result) {
- imap_parse_list_response (store, result, NULL, &store->dir_sep, NULL);
- g_free (result);
- }
- if (!store->dir_sep)
- store->dir_sep = '/'; /* Guess */
- }
-
- /* canonicalize the namespace to end with dir_sep */
- len = strlen (store->namespace);
- if (len && store->namespace[len - 1] != store->dir_sep) {
- gchar *tmp;
-
- tmp = g_strdup_printf ("%s%c", store->namespace, store->dir_sep);
- g_free (store->namespace);
- store->namespace = tmp;
- }
-
- /* Write namespace/separator out */
- camel_file_util_encode_string (storeinfo, store->namespace);
- camel_file_util_encode_uint32 (storeinfo, store->dir_sep);
-
- if (CAMEL_STORE (store)->flags & CAMEL_STORE_SUBSCRIPTIONS) {
- /* Get subscribed folders */
- response = camel_imap_command (store, NULL, ex, "LSUB \"\" \"*\"");
- if (!response)
- goto done;
- 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 (store, result, &flags, NULL, &name))
- continue;
- if (flags & (IMAP_LIST_FLAG_MARKED | IMAP_LIST_FLAG_UNMARKED))
- store->capabilities |= IMAP_CAPABILITY_useful_lsub;
- if (flags & IMAP_LIST_FLAG_NOSELECT) {
- g_free (name);
- continue;
- }
- g_hash_table_insert (store->subscribed_folders, name,
- GINT_TO_POINTER (1));
- camel_file_util_encode_string (storeinfo, result);
- }
- camel_imap_response_free (store, response);
- }
-
- path = g_strdup_printf ("%s/journal", store->storage_path);
- disco_store->diary = camel_disco_diary_new (disco_store, path, ex);
- g_free (path);
-
- done:
- fclose (storeinfo);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-
- if (camel_exception_is_set (ex))
- camel_service_disconnect (service, TRUE, NULL);
- else
- imap_store_refresh_folders (CAMEL_REMOTE_STORE (store), ex);
- return !camel_exception_is_set (ex);
-}
-
-static gboolean
-imap_connect_offline (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (service);
- char *buf, *name, *path;
- FILE *storeinfo;
- guint32 tmp;
-
- path = g_strdup_printf ("%s/journal", store->storage_path);
- disco_store->diary = camel_disco_diary_new (disco_store, path, ex);
- g_free (path);
- if (!disco_store->diary)
- return FALSE;
-
- path = g_strdup_printf ("%s/storeinfo", store->storage_path);
- storeinfo = fopen (path, "r");
- g_free (path);
- tmp = 0;
- if (storeinfo)
- camel_file_util_decode_uint32 (storeinfo, &tmp);
- if (tmp != IMAP_STOREINFO_VERSION) {
- if (storeinfo)
- fclose (storeinfo);
-
- /* We know we're offline, so this will have to set ex
- * and return FALSE.
- */
- return camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex);
- }
-
- camel_file_util_decode_uint32 (storeinfo, &store->capabilities);
- imap_set_server_level (store);
- camel_file_util_decode_string (storeinfo, &store->namespace);
- camel_file_util_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_file_util_decode_string (storeinfo, &buf) == 0) {
- if (!imap_parse_list_response (store, 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);
- imap_store_refresh_folders (CAMEL_REMOTE_STORE (store), ex);
-
- store->connected = !camel_exception_is_set (ex);
- return store->connected;
-}
-
-static gboolean
-imap_disconnect_offline (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelDiscoStore *disco = CAMEL_DISCO_STORE (service);
-
- 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;
- }
-
- if (disco->diary) {
- camel_object_unref (CAMEL_OBJECT (disco->diary));
- disco->diary = NULL;
- }
-
- return TRUE;
-}
-
-static gboolean
-imap_disconnect_online (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelImapResponse *response;
-
- if (store->connected && clean) {
- response = camel_imap_command (store, NULL, ex, "LOGOUT");
- camel_imap_response_free (store, response);
- }
- imap_disconnect_offline (service, clean, ex);
-
- return TRUE;
-}
-
-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 *
-no_such_folder (const char *name, CamelException *ex)
-{
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("No such folder %s"), name);
- return NULL;
-}
-
-static int
-get_folder_status (CamelImapStore *imap_store, const char *folder_name, const char *type)
-{
- CamelImapResponse *response;
- char *status, *p;
- int out;
-
- /* FIXME: we assume the server is STATUS-capable */
-
- response = camel_imap_command (imap_store, NULL, NULL,
- "STATUS %F (%s)",
- folder_name,
- type);
-
- if (!response)
- return -1;
-
- status = camel_imap_response_extract (imap_store, response,
- "STATUS", NULL);
- if (!status)
- return -1;
-
- p = strstrcase (status, type);
- if (p)
- out = strtoul (p + strlen (type), NULL, 10);
- else
- out = -1;
-
- g_free (status);
- return out;
-}
-
-static CamelFolder *
-get_folder_online (CamelStore *store, const char *folder_name,
- guint32 flags, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
- CamelFolder *new_folder;
- char *folder_dir;
-
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return NULL;
-
- if (!g_strcasecmp (folder_name, "INBOX"))
- folder_name = "INBOX";
-
- /* Lock around the whole lot to check/create atomically */
- CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
- if (imap_store->current_folder) {
- camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
- imap_store->current_folder = NULL;
- }
- response = camel_imap_command (imap_store, NULL, NULL,
- "SELECT %F", folder_name);
- if (!response) {
- if (!flags & CAMEL_STORE_FOLDER_CREATE)
- return no_such_folder (folder_name, ex);
-
- response = camel_imap_command (imap_store, NULL, ex,
- "CREATE %F", folder_name);
- if (response) {
- camel_imap_response_free (imap_store, response);
-
- response = camel_imap_command (imap_store, NULL, NULL,
- "SELECT %F", folder_name);
- }
- if (!response) {
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
- return NULL;
- }
- }
-
- folder_dir = e_path_to_physical (imap_store->storage_path, folder_name);
- new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
- g_free (folder_dir);
- if (new_folder) {
- imap_store->current_folder = new_folder;
- camel_object_ref (CAMEL_OBJECT (new_folder));
- camel_imap_folder_selected (new_folder, response, ex);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
- imap_store->current_folder = NULL;
- camel_object_unref (CAMEL_OBJECT (new_folder));
- new_folder = NULL;
- }
- }
- camel_imap_response_free_without_processing (imap_store, response);
-
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
-
- return new_folder;
-}
-
-static CamelFolder *
-get_folder_offline (CamelStore *store, const char *folder_name,
- guint32 flags, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelFolder *new_folder;
- char *folder_dir;
-
- if (!imap_store->connected &&
- !camel_service_connect (CAMEL_SERVICE (store), ex))
- return NULL;
-
- if (!g_strcasecmp (folder_name, "INBOX"))
- folder_name = "INBOX";
-
- folder_dir = e_path_to_physical (imap_store->storage_path, folder_name);
- if (access (folder_dir, F_OK) != 0)
- return no_such_folder (folder_name, ex);
-
- new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
- g_free (folder_dir);
-
- return new_folder;
-}
-
-static void
-delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
-
- /* make sure this folder isn't currently SELECTed */
- response = camel_imap_command (imap_store, NULL, ex, "SELECT INBOX");
- if (response) {
- camel_imap_response_free_without_processing (imap_store, response);
-
- if (imap_store->current_folder)
- camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
- /* no need to actually create a CamelFolder for INBOX */
- imap_store->current_folder = NULL;
- } else
- return;
-
- response = camel_imap_command (imap_store, NULL, ex, "DELETE %F",
- folder_name);
- if (response)
- camel_imap_response_free (imap_store, response);
-
- if (!camel_exception_is_set (ex)) {
- CamelFolderSummary *summary;
- CamelImapMessageCache *cache;
- char *summary_file;
- char *journal_file;
- char *folder_dir;
-
- folder_dir = e_path_to_physical (imap_store->storage_path, folder_name);
- if (access (folder_dir, F_OK) != 0) {
- g_free (folder_dir);
- return;
- }
-
- summary_file = g_strdup_printf ("%s/summary", folder_dir);
- summary = camel_imap_summary_new (summary_file);
- if (!summary) {
- g_free (summary_file);
- g_free (folder_dir);
- return;
- }
-
- cache = camel_imap_message_cache_new (folder_dir, summary, ex);
- if (cache)
- camel_imap_message_cache_clear (cache);
-
- camel_object_unref (CAMEL_OBJECT (cache));
- camel_object_unref (CAMEL_OBJECT (summary));
-
- unlink (summary_file);
- g_free (summary_file);
-
- journal_file = g_strdup_printf ("%s/summary", folder_dir);
- unlink (journal_file);
- g_free (journal_file);
-
- rmdir (folder_dir);
- g_free (folder_dir);
- }
-}
-
-static CamelFolderInfo *
-create_folder (CamelStore *store, const char *parent_name,
- const char *folder_name, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- char *full_name, *resp, *thisone;
- CamelImapResponse *response;
- CamelException internal_ex;
- CamelFolderInfo *root = NULL;
- gboolean need_convert;
- char **pathnames = NULL;
- GPtrArray *folders = NULL;
- int i = 0, flags;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return NULL;
- if (!parent_name)
- parent_name = "";
-
- /* check if the parent allows inferiors */
-
- need_convert = FALSE;
- response = camel_imap_command (imap_store, NULL, ex, "LIST \"\" %F",
- parent_name);
- if (!response) /* whoa, this is bad */
- return NULL;
-
- /* FIXME: does not handle unexpected circumstances very well */
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i];
-
- if (!imap_parse_list_response (imap_store, resp, &flags, NULL, &thisone))
- continue;
-
- if (strcmp (thisone, parent_name) == 0) {
- if (flags & IMAP_LIST_FLAG_NOINFERIORS)
- need_convert = TRUE;
- break;
- }
- }
-
- camel_imap_response_free (imap_store, response);
-
- camel_exception_init (&internal_ex);
-
- /* if not, check if we can delete it and recreate it */
- if (need_convert) {
- char *name;
-
- if (get_folder_status (imap_store, parent_name, "MESSAGES")) {
- camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
- _("The parent folder is not allowed to contain subfolders"));
- return NULL;
- }
-
- /* delete the old parent and recreate it */
- delete_folder (store, parent_name, &internal_ex);
- if (camel_exception_is_set (&internal_ex)) {
- camel_exception_xfer (ex, &internal_ex);
- return NULL;
- }
-
- /* add the dirsep to the end of parent_name */
- name = g_strdup_printf ("%s%c", parent_name, imap_store->dir_sep);
- response = camel_imap_command (imap_store, NULL, ex, "CREATE %F",
- name);
- g_free (name);
-
- if (!response)
- return NULL;
- else
- camel_imap_response_free (imap_store, response);
- }
-
- /* ok now we can create the folder */
-
- full_name = imap_concat (imap_store, parent_name, folder_name);
- response = camel_imap_command (imap_store, NULL, ex, "CREATE %F",
- full_name);
- g_free (full_name);
-
- if (response) {
- CamelFolderInfo *parent, *fi;
-
- camel_imap_response_free (imap_store, response);
-
- /* We have to do this in case we are creating a
- recursive directory structure */
- i = 0;
- pathnames = imap_parse_folder_name (imap_store, folder_name);
- full_name = imap_concat (imap_store, parent_name, pathnames[i]);
- g_free (pathnames[i]);
-
- folders = g_ptr_array_new ();
-
- get_folders_online (imap_store, full_name, folders, FALSE, ex);
- g_free (full_name);
- if (camel_exception_is_set (&internal_ex)) {
- camel_exception_xfer (&internal_ex, ex);
- goto exception;
- }
-
- root = parent = folders->pdata[i];
-
- for (i = 1; parent && pathnames[i]; i++) {
- full_name = imap_concat (imap_store, parent_name, pathnames[i]);
- g_free (pathnames[i]);
-
- get_folders_online (imap_store, full_name, folders, FALSE, &internal_ex);
- if (camel_exception_is_set (&internal_ex)) {
- camel_exception_xfer (&internal_ex, ex);
- goto exception;
- }
- g_free (full_name);
-
- if (folders->len != i + 1)
- break;
-
- fi = folders->pdata[i];
- camel_folder_info_build_path (fi, imap_store->dir_sep);
- parent->child = fi;
- fi->parent = parent;
- parent = fi;
- }
-
- g_free (pathnames);
-
- g_ptr_array_free (folders, TRUE);
- }
-
- return root;
-
- exception:
-
- for (/* i is already set */; pathnames && pathnames[i]; i++)
- g_free (pathnames[i]);
- g_free (pathnames);
-
- if (folders) {
- for (i = 0; i < folders->len; i++)
- camel_folder_info_free (folders->pdata[i]);
- g_ptr_array_free (folders, TRUE);
- }
-
- return NULL;
-}
-
-static CamelFolderInfo *
-parse_list_response_as_folder_info (CamelImapStore *imap_store,
- const char *response)
-{
- CamelFolderInfo *fi;
- int flags;
- char sep, *dir, *name = NULL;
- CamelURL *url;
-
- if (!imap_parse_list_response (imap_store, 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);
-
- url = camel_url_new (imap_store->base_url, NULL);
- g_free (url->path);
- url->path = g_strdup_printf ("/%s", dir);
- if (flags & IMAP_LIST_FLAG_NOSELECT)
- camel_url_set_param (url, "noselect", "yes");
- 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++) {
- response = camel_imap_command (imap_store, NULL, ex,
- "LIST \"\" %F",
- names->pdata[i]);
- if (!response) {
- g_ptr_array_free (names, TRUE);
- return;
- }
- result = camel_imap_response_extract (imap_store, 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;
-
- response = camel_imap_command (imap_store, NULL, ex,
- "%s \"\" %F", lsub ? "LSUB" : "LIST",
- pattern);
- 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 (imap_store, response);
-}
-
-static CamelFolderInfo *
-get_folder_info_online (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- gboolean need_inbox = FALSE;
- GPtrArray *folders;
- const char *name;
- char *pattern;
- CamelFolderInfo *fi, *tree;
- int i;
-
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return NULL;
-
- name = top;
- if (!name || name[0] == '\0') {
- need_inbox = TRUE;
- name = "";
- }
-
- folders = g_ptr_array_new ();
-
- /* Get top-level */
- get_folders_online (imap_store, name, folders, FALSE, ex);
- if (camel_exception_is_set (ex))
- goto lose;
-
- if (folders->len) {
- const char *noselect;
- CamelURL *url;
-
- fi = folders->pdata[0];
-
- url = camel_url_new (fi->url, NULL);
- noselect = url ? camel_url_get_param (url, "noselect") : NULL;
- if (noselect && !g_strcasecmp (noselect, "yes") && name[0] == '\0') {
- camel_folder_info_free (fi);
- g_ptr_array_remove_index (folders, 0);
- }
- camel_url_free (url);
- }
-
- /* 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 ((flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED) &&
- !(imap_store->capabilities & IMAP_CAPABILITY_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, (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? "*" : "%");
- get_folders_online (imap_store, pattern, folders, (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED), ex);
- g_free (pattern);
- }
- if (camel_exception_is_set (ex)) {
- lose:
- 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);
- }
- }
-
- /* Assemble. */
- tree = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE);
- if (flags & CAMEL_STORE_FOLDER_INFO_FAST) {
- g_ptr_array_free (folders, TRUE);
- return tree;
- }
-
- /* 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++) {
- const char *noselect;
- CamelURL *url;
-
- fi = folders->pdata[i];
-
- /* Don't check if it doesn't contain messages or if it
- * was \UnMarked.
- */
- url = camel_url_new (fi->url, NULL);
- noselect = url ? camel_url_get_param (url, "noselect") : NULL;
- if (fi->unread_message_count != -1 || (noselect && !g_strcasecmp (noselect, "yes"))) {
- camel_url_free (url);
- continue;
- }
- camel_url_free (url);
-
- /* 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;
-
- /* For the current folder, poke it to check for new
- * messages and then report that number, rather than
- * doing a STATUS command.
- */
- if (imap_store->current_folder &&
- !strcmp (imap_store->current_folder->full_name, fi->full_name)) {
- camel_folder_refresh_info (imap_store->current_folder, NULL);
- fi->unread_message_count = camel_folder_get_unread_message_count (imap_store->current_folder);
- } else
- fi->unread_message_count = get_folder_status (imap_store, fi->full_name, "UNSEEN");
- }
-
- g_ptr_array_free (folders, TRUE);
-
- return tree;
-}
-
-static gboolean
-get_one_folder_offline (const char *physical_path, const char *path, gpointer data)
-{
- GPtrArray *folders = data;
- CamelImapStore *imap_store = folders->pdata[0];
- CamelFolderInfo *fi;
-
- if (*path++ != '/')
- return TRUE;
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (path);
- fi->name = strrchr (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);
-
- fi->url = g_strdup_printf ("%s/%s", imap_store->base_url, path);
-
- /* FIXME: check summary */
- fi->unread_message_count = -1;
-
- g_ptr_array_add (folders, fi);
- return TRUE;
-}
-
-static CamelFolderInfo *
-get_folder_info_offline (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelFolderInfo *fi;
- GPtrArray *folders;
-
- if (!imap_store->connected &&
- !camel_service_connect (CAMEL_SERVICE (store), ex))
- return NULL;
-
- if ((store->flags & CAMEL_STORE_SUBSCRIPTIONS) &&
- !(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)) {
- camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex);
- return NULL;
- }
-
- /* FIXME: obey other flags */
-
- folders = g_ptr_array_new ();
-
- /* A kludge to avoid having to pass a struct to the callback */
- g_ptr_array_add (folders, imap_store);
- if (!e_path_find_folders (imap_store->storage_path, get_one_folder_offline, folders)) {
- camel_disco_store_check_online (CAMEL_DISCO_STORE (imap_store), ex);
- fi = NULL;
- } else {
- g_ptr_array_remove_index_fast (folders, 0);
- fi = camel_folder_info_build (folders, "",
- 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;
- CamelFolderInfo *fi;
- const char *name;
- CamelURL *url;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return;
-
- response = camel_imap_command (imap_store, NULL, ex,
- "SUBSCRIBE %F", folder_name);
- if (!response)
- return;
- camel_imap_response_free (imap_store, response);
-
- 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++;
- else
- name = folder_name;
-
- url = camel_url_new (imap_store->base_url, NULL);
- g_free (url->path);
- url->path = g_strdup_printf ("/%s", folder_name);
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folder_name);
- fi->name = g_strdup (name);
- fi->url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- fi->unread_message_count = -1;
- camel_folder_info_build_path (fi, imap_store->dir_sep);
-
- camel_url_free (url);
-
- camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", fi);
- camel_folder_info_free (fi);
-}
-
-static void
-unsubscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
- gpointer key, value;
- CamelFolderInfo *fi;
- char *name;
-
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return;
-
- response = camel_imap_command (imap_store, NULL, ex,
- "UNSUBSCRIBE %F", folder_name);
- if (!response)
- return;
- camel_imap_response_free (imap_store, response);
-
- 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_folder_info_build_path (fi, imap_store->dir_sep);
-
- camel_object_trigger_event (CAMEL_OBJECT (store), "folder_deleted", fi);
- camel_folder_info_free (fi);
-}
-
-static gboolean
-folder_flags_have_changed (CamelFolder *folder)
-{
- CamelMessageInfo *info;
- int i, max;
-
- max = camel_folder_summary_count (folder->summary);
- for (i = 0; i < max; i++) {
- info = camel_folder_summary_index (folder->summary, i);
- if (!info)
- continue;
- if (info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) {
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static void
-imap_keepalive (CamelRemoteStore *store)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
-
- /* FIXME: should this check to see if we are online? */
-
- /* Note: the idea here is to sync the flags of our currently
- selected folder if there have been changes... */
-
- if (imap_store->current_folder && folder_flags_have_changed (imap_store->current_folder)) {
- camel_folder_sync (imap_store->current_folder, FALSE, NULL);
- }
-
- /* ...but we also want to NOOP so that we get an untagged response. */
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
-
- response = camel_imap_command (imap_store, NULL, NULL, "NOOP");
- camel_imap_response_free (imap_store, response);
-
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-}
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
deleted file mode 100644
index 458c1aa525..0000000000
--- a/camel/providers/imap/camel-imap-store.h
+++ /dev/null
@@ -1,114 +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@ximian.com>
- *
- * 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 CAMEL_IMAP_STORE_H
-#define CAMEL_IMAP_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-imap-types.h"
-#include "camel-disco-store.h"
-
-#ifdef ENABLE_THREADS
-#include "e-util/e-msgport.h"
-
-typedef struct _CamelImapMsg CamelImapMsg;
-
-struct _CamelImapMsg {
- EMsg msg;
-
- void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m);
- void (*free)(CamelImapStore *store, struct _CamelImapMsg *m);
-};
-
-CamelImapMsg *camel_imap_msg_new(void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m),
- void (*free)(CamelImapStore *store, struct _CamelImapMsg *m),
- size_t size);
-void camel_imap_msg_queue(CamelImapStore *store, CamelImapMsg *msg);
-
-#endif
-
-#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_CAPABILITY_useful_lsub (1 << 6)
-
-#define IMAP_PARAM_OVERRIDE_NAMESPACE (1 << 0)
-#define IMAP_PARAM_CHECK_ALL (1 << 1)
-#define IMAP_PARAM_FILTER_INBOX (1 << 2)
-
-struct _CamelImapStore {
- CamelDiscoStore parent_object;
- struct _CamelImapStorePrivate *priv;
-
- /* Information about the command channel / connection status */
- gboolean connected;
- char tag_prefix;
- guint32 command;
- CamelFolder *current_folder;
-
- /* Information about the server */
- CamelImapServerLevel server_level;
- guint32 capabilities, parameters;
- char *namespace, dir_sep, *base_url, *storage_path;
- GHashTable *authtypes, *subscribed_folders;
-#ifdef ENABLE_THREADS
- EThread *async_thread;
-#endif
-};
-
-
-typedef struct {
- CamelDiscoStoreClass parent_class;
-
-} CamelImapStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_imap_store_get_type (void);
-
-#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 7e737fdd8d..0000000000
--- a/camel/providers/imap/camel-imap-summary.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Dan Winship <danw@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 <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-file-utils.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 ()));
-
- 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_file_util_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_file_util_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_file_util_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_file_util_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);
-}
-
-void
-camel_imap_summary_add_offline (CamelFolderSummary *summary, const char *uid,
- CamelMimeMessage *message,
- const CamelMessageInfo *info)
-{
- CamelMessageInfo *mi;
- CamelFlag *flag;
- CamelTag *tag;
-
- /* Create summary entry */
- mi = camel_folder_summary_info_new_from_message (summary, message);
-
- /* Copy flags 'n' tags */
- mi->flags = info->flags;
- flag = info->user_flags;
- while (flag) {
- camel_flag_set (&mi->user_flags, flag->name, TRUE);
- flag = flag->next;
- }
- tag = info->user_tags;
- while (tag) {
- camel_tag_set (&mi->user_tags, tag->name, tag->value);
- tag = tag->next;
- }
-
- /* Set uid and add to summary */
- camel_message_info_set_uid (mi, g_strdup (uid));
- camel_folder_summary_add (summary, mi);
-}
diff --git a/camel/providers/imap/camel-imap-summary.h b/camel/providers/imap/camel-imap-summary.h
deleted file mode 100644
index bd9e39cc5b..0000000000
--- a/camel/providers/imap/camel-imap-summary.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Dan Winship <danw@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_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)
-
-#define CAMEL_IMAP_MESSAGE_RECENT (1 << 8)
-
-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);
-
-void camel_imap_summary_add_offline (CamelFolderSummary *summary,
- const char *uid,
- CamelMimeMessage *message,
- const CamelMessageInfo *info);
-
-#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 162841e75f..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 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 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 25154755f4..0000000000
--- a/camel/providers/imap/camel-imap-utils.c
+++ /dev/null
@@ -1,831 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
-#include "camel-imap-utils.h"
-#include "camel-imap-summary.h"
-#include "camel-imap-store.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:
- * @store: the IMAP store whose list response we're parsing
- * @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 (CamelImapStore *store, 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) {
- char *real_name;
- int n_len;
-
- /* get the folder name */
- word = imap_next_word (word);
- real_name = imap_parse_astring (&word, &len);
- n_len = strlen (store->namespace);
- if (!strncmp (real_name, store->namespace, n_len))
- *folder = g_strdup (real_name + n_len);
- else if (!g_strcasecmp (real_name, "INBOX")) {
- *folder = g_strdup (real_name);
- } else {
- g_warning ("IMAP folder name \"%s\" does not begin with \"%s\"", real_name, store->namespace);
- *folder = g_strdup (real_name);
- }
- g_free (real_name);
- return *folder != NULL;
- }
-
- return TRUE;
-}
-
-
-/**
- * imap_parse_folder_name:
- * @store:
- * @folder_name:
- *
- * Return an array of folder paths representing the folder heirarchy.
- * For example:
- * Full/Path/"to / from"/Folder
- * Results in:
- * Full, Full/Path, Full/Path/"to / from", Full/Path/"to / from"/Folder
- **/
-char **
-imap_parse_folder_name (CamelImapStore *store, const char *folder_name)
-{
- GPtrArray *heirarchy;
- char **paths;
- const char *p;
-
- p = folder_name;
- if (*p == store->dir_sep)
- p++;
-
- heirarchy = g_ptr_array_new ();
-
- while (*p) {
- if (*p == '"') {
- p++;
- while (*p && *p != '"')
- p++;
- if (*p)
- p++;
- continue;
- }
-
- if (*p == store->dir_sep)
- g_ptr_array_add (heirarchy, g_strndup (folder_name, p - folder_name));
-
- p++;
- }
-
- g_ptr_array_add (heirarchy, g_strdup (folder_name));
- g_ptr_array_add (heirarchy, NULL);
-
- paths = (char **) heirarchy->pdata;
- g_ptr_array_free (heirarchy, FALSE);
-
- return paths;
-}
-
-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;
- else if (!g_strncasecmp (flag_list, "\\Recent", len))
- flags |= CAMEL_IMAP_MESSAGE_RECENT;
-
- 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, 1, 0, 0, 1, 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);
-
- /* a quoted string cannot be broken into multiple lines */
- while (*str && *str != '"' && *str != '\n') {
- 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;
-
- g_assert (strchr (str, '\r') == NULL);
-
- len = strlen (str);
- p = str;
- while ((p = strpbrk (p, "\"\\"))) {
- len++;
- p++;
- }
-
- quoted = q = g_malloc (len + 3);
- *q++ = '"';
- for (p = str; *p; ) {
- if (strchr ("\"\\", *p))
- *q++ = '\\';
- *q++ = *p++;
- }
- *q++ = '"';
- *q = '\0';
-
- return quoted;
-}
-
-
-static inline unsigned long
-get_summary_uid_numeric (CamelFolderSummary *summary, int index)
-{
- CamelMessageInfo *info;
- unsigned long uid;
-
- info = camel_folder_summary_index (summary, index);
- uid = strtoul (camel_message_info_uid (info), NULL, 10);
- camel_folder_summary_info_free (summary, info);
- return uid;
-}
-
-/**
- * imap_uid_array_to_set:
- * @summary: summary for the folder the UIDs come from
- * @uids: a (sorted) array of UIDs
- *
- * Creates an IMAP "set" covering the listed UIDs and not covering
- * any UIDs that are in @summary but not in @uids. It doesn't
- * actually require that all (or any) of the UIDs be in @summary.
- *
- * Return value: the set, which the caller must free with g_free()
- **/
-char *
-imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids)
-{
- int ui, si, scount;
- unsigned long last_uid, next_summary_uid, this_uid;
- gboolean range = FALSE;
- GString *gset;
- char *set;
-
- g_return_val_if_fail (uids->len > 0, NULL);
-
- gset = g_string_new (uids->pdata[0]);
- last_uid = strtoul (uids->pdata[0], NULL, 10);
- next_summary_uid = 0;
- scount = camel_folder_summary_count (summary);
-
- for (ui = 1, si = 0; ui < uids->len; ui++) {
- /* Find the next UID in the summary after the one we
- * just wrote out.
- */
- for (; last_uid >= next_summary_uid && si < scount; si++)
- next_summary_uid = get_summary_uid_numeric (summary, si);
- if (last_uid >= next_summary_uid)
- next_summary_uid = (unsigned long) -1;
-
- /* Now get the next UID from @uids */
- this_uid = strtoul (uids->pdata[ui], NULL, 10);
- if (this_uid == next_summary_uid || this_uid == last_uid + 1)
- range = TRUE;
- else {
- if (range) {
- g_string_sprintfa (gset, ":%lu", last_uid);
- range = FALSE;
- }
- g_string_sprintfa (gset, ",%lu", this_uid);
- }
-
- last_uid = this_uid;
- }
-
- if (range)
- g_string_sprintfa (gset, ":%lu", last_uid);
-
- set = gset->str;
- g_string_free (gset, FALSE);
-
- return set;
-}
-
-/**
- * imap_uid_set_to_array:
- * @summary: summary for the folder the UIDs come from
- * @uids: a pointer to the start of an IMAP "set" of UIDs
- *
- * Fills an array with the UIDs corresponding to @uids and @summary.
- * There can be text after the uid set in @uids, which will be
- * ignored.
- *
- * If @uids specifies a range of UIDs that extends outside the range
- * of @summary, the function will assume that all of the "missing" UIDs
- * do exist.
- *
- * Return value: the array of uids, which the caller must free with
- * imap_uid_array_free(). (Or %NULL if the uid set can't be parsed.)
- **/
-GPtrArray *
-imap_uid_set_to_array (CamelFolderSummary *summary, const char *uids)
-{
- GPtrArray *arr;
- char *p, *q;
- unsigned long uid, suid;
- int si, scount;
-
- arr = g_ptr_array_new ();
- scount = camel_folder_summary_count (summary);
-
- p = (char *)uids;
- si = 0;
- do {
- uid = strtoul (p, &q, 10);
- if (p == q)
- goto lose;
- g_ptr_array_add (arr, g_strndup (p, q - p));
-
- if (*q == ':') {
- /* Find the summary entry for the UID after the one
- * we just saw.
- */
- while (++si < scount) {
- suid = get_summary_uid_numeric (summary, si);
- if (suid > uid)
- break;
- }
- if (si >= scount)
- suid = uid + 1;
-
- uid = strtoul (q + 1, &p, 10);
- if (p == q + 1)
- goto lose;
-
- /* Add each summary UID until we find one
- * larger than the end of the range
- */
- while (suid <= uid) {
- g_ptr_array_add (arr, g_strdup_printf ("%lu", suid));
- if (++si < scount)
- suid = get_summary_uid_numeric (summary, si);
- else
- suid++;
- }
- } else
- p = q;
- } while (*p++ == ',');
-
- return arr;
-
- lose:
- g_warning ("Invalid uid set %s", uids);
- imap_uid_array_free (arr);
- return NULL;
-}
-
-/**
- * imap_uid_array_free:
- * @arr: an array returned from imap_uid_set_to_array()
- *
- * Frees @arr
- **/
-void
-imap_uid_array_free (GPtrArray *arr)
-{
- int i;
-
- for (i = 0; i < arr->len; i++)
- g_free (arr->pdata[i]);
- g_ptr_array_free (arr, TRUE);
-}
-
-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);
-}
-
-char *
-imap_namespace_concat (CamelImapStore *store, const char *name)
-{
- if (!name || *name == '\0') {
- if (store->namespace)
- return g_strdup (store->namespace);
- else
- return g_strdup ("");
- }
-
- if (!g_strcasecmp (name, "INBOX"))
- return g_strdup ("INBOX");
-
- if (store->namespace == NULL) {
- g_warning ("Trying to concat NULL namespace to \"%s\"!", name);
- return g_strdup (name);
- }
-
- return imap_concat (store, store->namespace, name);
-}
diff --git a/camel/providers/imap/camel-imap-utils.h b/camel/providers/imap/camel-imap-utils.h
deleted file mode 100644
index 295e491583..0000000000
--- a/camel/providers/imap/camel-imap-utils.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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_IMAP_UTILS_H
-#define CAMEL_IMAP_UTILS_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-folder-summary.h"
-#include "camel-imap-types.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 (CamelImapStore *store, const char *buf, int *flags,
- char *sep, char **folder);
-
-char **imap_parse_folder_name (CamelImapStore *store, const char *folder_name);
-
-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);
-
-char *imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids);
-GPtrArray *imap_uid_set_to_array (CamelFolderSummary *summary, const char *uids);
-void imap_uid_array_free (GPtrArray *arr);
-
-char *imap_concat (CamelImapStore *imap_store, const char *prefix, const char *suffix);
-char *imap_namespace_concat (CamelImapStore *store, const char *name);
-
-#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 70c68002a0..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@ximian.com>
- *
- * Copyright 2000 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 <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 0f9bc0d529..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 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_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 d49cb13a60..0000000000
--- a/camel/providers/local/Makefile.am
+++ /dev/null
@@ -1,64 +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 \
- camel-spool-folder.c \
- camel-spool-store.c \
- camel-spool-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 \
- camel-spool-folder.h \
- camel-spool-store.h \
- camel-spool-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
-
-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 2e9e348695..0000000000
--- a/camel/providers/local/camel-local-folder.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * 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
- */
-
-#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_exception_clear(ex);
- }
-
- if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, 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_printf("%s:%s#%s", ((CamelService *)parent_store)->url->protocol,
- ((CamelService *)parent_store)->url->protocol, full_name);
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_folder_info_build_path(fi, '/');
-
- camel_object_trigger_event(CAMEL_OBJECT (parent_store), "folder_created", 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 227bada2c9..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@ximian.com>
- *
- * Copyright (C) 1999 Ximian (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_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 6c9b156752..0000000000
--- a/camel/providers/local/camel-local-private.h
+++ /dev/null
@@ -1,74 +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@ximian.com>
- *
- * Copyright 1999, 2000 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_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
-
-struct _CamelSpoolFolderPrivate {
-#ifdef ENABLE_THREADS
- GMutex *search_lock; /* for locking the search object */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_SPOOL_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelSpoolFolder *)f)->priv->l))
-#define CAMEL_SPOOL_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelSpoolFolder *)f)->priv->l))
-#else
-#define CAMEL_SPOOL_FOLDER_LOCK(f, l)
-#define CAMEL_SPOOL_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 adda3676cd..0000000000
--- a/camel/providers/local/camel-local-provider.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright (C) 2000 Ximian (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 <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"
-#include "camel-spool-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_LOCAL,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- /* ... */
-};
-
-static CamelProvider mbox_provider = {
- "mbox",
- N_("Local delivery"),
- N_("For retrieving local mail from standard mbox formated spools."),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_LOCAL,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- /* ... */
-};
-
-static CamelProviderConfEntry local_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", NULL,
- N_("Apply filters to new messages in INBOX"), "0" },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-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_PROVIDER_IS_LOCAL,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- local_conf_entries,
- /* ... */
-};
-
-static CamelProvider spool_provider = {
- "spool",
- N_("Standard Unix mbox spools"),
- N_("For reading and storing local mail in standard mbox spool files."),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- local_conf_entries,
- /* ... */
-};
-
-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);
- mh_provider.url_hash = camel_url_hash;
- mh_provider.url_equal = 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);
- mbox_provider.url_hash = camel_url_hash;
- mbox_provider.url_equal = 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);
- maildir_provider.url_hash = camel_url_hash;
- maildir_provider.url_equal = camel_url_equal;
- camel_session_register_provider(session, &maildir_provider);
-
- spool_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type();
- spool_provider.service_cache = g_hash_table_new(camel_url_hash, camel_url_equal);
- spool_provider.url_hash = camel_url_hash;
- spool_provider.url_equal = camel_url_equal;
- camel_session_register_provider(session, &spool_provider);
-}
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
deleted file mode 100644
index c5ed877b68..0000000000
--- a/camel/providers/local/camel-local-store.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * 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 <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,
- guint32 flags, 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;
-}
-
-static void
-camel_local_store_finalize (CamelLocalStore *local_store)
-{
- if (local_store->toplevel_dir)
- g_free (local_store->toplevel_dir);
-}
-
-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,
- (CamelObjectFinalizeFunc) camel_local_store_finalize);
- }
-
- return camel_local_store_type;
-}
-
-static void
-construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
-{
- CamelLocalStore *local_store = CAMEL_LOCAL_STORE (service);
- 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] != '/')
- local_store->toplevel_dir = g_strdup_printf ("%s/", service->url->path);
- else
- local_store->toplevel_dir = g_strdup (service->url->path);
-}
-
-const char *
-camel_local_store_get_toplevel_dir (CamelLocalStore *store)
-{
- return store->toplevel_dir;
-}
-
-static CamelFolder *
-get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex)
-{
- struct stat st;
- char *path = ((CamelLocalStore *)store)->toplevel_dir;
- 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)
-{
- char *dir = ((CamelLocalStore*)service)->toplevel_dir;
-
- if (brief)
- return g_strdup (dir);
- else
- return g_strdup_printf (_("Local mail file %s"), dir);
-}
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
-{
- /* FIXME: This is broken, but it corresponds to what was
- * there before.
- */
-
- d(printf("-- LOCAL STRE -- get folder info: %s\n", top));
-
- 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_LOCAL_STORE (store)->toplevel_dir;
-
- /* 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_LOCAL_STORE(store)->toplevel_dir, 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_LOCAL_STORE(store)->toplevel_dir, folder_name);
- fi->unread_message_count = -1;
- camel_folder_info_build_path(fi, '/');
-
- 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 5ecce3e288..0000000000
--- a/camel/providers/local/camel-local-store.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mbox-store.h : class for an mbox store */
-
-/*
- *
- * Copyright (C) 2000 Ximian, 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;
- char *toplevel_dir;
-
-} 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 3202076520..0000000000
--- a/camel/providers/local/camel-local-summary.c
+++ /dev/null
@@ -1,574 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <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"
-#include "camel/camel-stream-null.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) {
- g_warning("Could not load summary: flags may be reset");
- camel_folder_summary_clear((CamelFolderSummary *)cls);
- return -1;
- }
-
- return 0;
-}
-
-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);
-
- if (ret != -1) {
- if (camel_folder_summary_save((CamelFolderSummary *)cls) == -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));
- }
-
-#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);
- if (info->size)
- mi->size = info->size;
- }
-
- /* we need to calculate the size ourselves */
- if (mi->size == 0) {
- CamelStreamNull *sn = (CamelStreamNull *)camel_stream_null_new();
-
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)sn);
- mi->size = sn->written;
- camel_object_unref((CamelObject *)sn);
- }
-
- 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 ff71e76867..0000000000
--- a/camel/providers/local/camel-local-summary.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 1bd6417e1a..0000000000
--- a/camel/providers/local/camel-maildir-folder.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * 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
- */
-
-#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);
-
- if (parent_store->flags & CAMEL_STORE_FILTER_INBOX
- && strcmp(full_name, "") == 0)
- folder->filter_recent = TRUE;
-
- 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 = NULL;
-
- 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)
- goto fail_write;
-
- if (camel_data_wrapper_write_to_stream ((CamelDataWrapper *)message, output_stream) == -1
- || camel_stream_close (output_stream) == -1)
- goto fail_write;
-
- /* 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)
- goto fail_write;
-
- g_free (dest);
- g_free (name);
-
- camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed",
- ((CamelLocalFolder *)maildir_folder)->changes);
- camel_folder_change_info_clear (((CamelLocalFolder *)maildir_folder)->changes);
-
- return;
-
- fail_write:
-
- /* remove the summary info so we are not out-of-sync with the mh folder */
- camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (folder->summary),
- camel_message_info_uid (mi));
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to maildir folder: %s: %s"),
- name, g_strerror (errno));
-
- if (output_stream) {
- camel_object_unref (CAMEL_OBJECT (output_stream));
- unlink (name);
- }
-
- g_free (name);
- g_free (dest);
-}
-
-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 f145d5ef18..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@ximian.com>
- *
- * Copyright (C) 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 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 5ed4e4a533..0000000000
--- a/camel/providers/local/camel-maildir-store.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <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"
-#include "camel-private.h"
-
-#define d(x)
-
-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 CamelFolder *get_inbox (CamelStore *store, CamelException *ex);
-static void delete_folder(CamelStore * store, const char *folder_name, CamelException * ex);
-
-static CamelFolderInfo * get_folder_info (CamelStore *store, const char *top, guint32 flags, 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->get_inbox = get_inbox;
- camel_store_class->delete_folder = delete_folder;
-
- camel_store_class->get_folder_info = get_folder_info;
- camel_store_class->free_folder_info = camel_store_free_folder_info_full;
-}
-
-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_LOCAL_STORE(store)->toplevel_dir, 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 CamelFolder *
-get_inbox (CamelStore *store, CamelException *ex)
-{
- return get_folder (store, ".", 0, ex);
-}
-
-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_LOCAL_STORE(store)->toplevel_dir, 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);
-}
-
-static CamelFolderInfo *camel_folder_info_new(const char *url, const char *full, const char *name, int unread)
-{
- CamelFolderInfo *fi;
-
- fi = g_malloc0(sizeof(*fi));
- fi->url = g_strdup(url);
- fi->full_name = g_strdup(full);
- fi->name = g_strdup(name);
- fi->unread_message_count = unread;
- camel_folder_info_build_path(fi, '/');
-
- d(printf("Adding maildir info: '%s' '%s' '%s'\n", fi->path, fi->name, fi->full_name));
-
- return fi;
-}
-
-/* used to find out where we've visited already */
-struct _inode {
- dev_t dnode;
- ino_t inode;
-};
-
-/* returns number of records found at or below this level */
-static int scan_dir(CamelStore *store, GHashTable *visited, char *root, const char *path, guint32 flags, CamelFolderInfo *parent, CamelFolderInfo **fip, CamelException *ex)
-{
- DIR *dir;
- struct dirent *d;
- char *name, *uri, *tmp, *cur, *new;
- const char *base;
- CamelFolderInfo *fi = NULL;
- struct stat st;
- CamelFolder *folder;
- int unread;
-
- /* look for folders matching the right structure, recursively */
- name = g_strdup_printf("%s/%s", root, path);
-
- d(printf("checking dir '%s' part '%s' for maildir content\n", root, path));
-
- tmp = g_strdup_printf("%s/tmp", name);
- cur = g_strdup_printf("%s/cur", name);
- new = g_strdup_printf("%s/new", name);
-
- if (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)) {
- uri = g_strdup_printf("maildir:%s#%s", root, path);
- } else
- uri = g_strdup_printf("maildir:%s;noselect=yes#%s", root, path);
-
- base = strrchr(path, '/');
- if (base)
- base++;
- else
- base = path;
-
- /* if we have this folder open, get the real unread count */
- CAMEL_STORE_LOCK(store, cache_lock);
- folder = g_hash_table_lookup(store->folders, path);
- if (folder)
- unread = camel_folder_get_message_count(folder);
- else
- unread = 0;
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
- /* if we dont have a folder, then scan the directory and get the unread
- count from there, which is reasonably cheap (on decent filesystem) */
- /* Well we could get this from the summary, but this is more accurate */
- if (folder == NULL) {
- unread = 0;
- dir = opendir(new);
- if (dir) {
- /* we assume that all files here are unread ones */
- while ( (d = readdir(dir)) ) {
- if (d->d_name[0] != '.')
- unread++;
- }
- closedir(dir);
- }
- dir = opendir(cur);
- if (dir) {
- /* any files with flags but not the 'S' (seen) flag are unread */
- while ( (d = readdir(dir)) ) {
- char *p = strstr(d->d_name, ":2,");
-
- if (p && strchr(p, 'S') == NULL)
- unread++;
- }
- closedir(dir);
- }
- }
-
- fi = camel_folder_info_new(uri, path, base, unread);
-
- d(printf("found! uri = %s\n", fi->url));
- d(printf(" full_name = %s\n name = '%s'\n", fi->full_name, fi->name));
-
- fi->parent = parent;
- fi->sibling = *fip;
- *fip = fi;
- g_free(uri);
-
- g_free(tmp);
- g_free(cur);
- g_free(new);
-
- unread = 0;
-
- /* always look further if asked */
- if (((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) || parent == NULL)) {
- dir = opendir(name);
- if (dir == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not scan folder `%s': %s"),
- root, strerror(errno));
- g_free(name);
- return -1;
- }
-
- while ( (d = readdir(dir)) ) {
- if (strcmp(d->d_name, "tmp") == 0
- || strcmp(d->d_name, "cur") == 0
- || strcmp(d->d_name, "new") == 0
- || strcmp(d->d_name, ".") == 0
- || strcmp(d->d_name, "..") == 0)
- continue;
-
- tmp = g_strdup_printf("%s/%s", name, d->d_name);
- if (stat(tmp, &st) == 0 && S_ISDIR(st.st_mode)) {
- struct _inode in = { st.st_dev, st.st_ino };
-
- /* see if we've visited already */
- if (g_hash_table_lookup(visited, &in) == NULL) {
- struct _inode *inew = g_malloc(sizeof(*inew));
-
- *inew = in;
- g_hash_table_insert(visited, inew, inew);
- new = g_strdup_printf("%s/%s", path, d->d_name);
- if (scan_dir(store, visited, root, new, flags, fi, &fi->child, ex) == -1) {
- g_free(tmp);
- g_free(new);
- closedir(dir);
- return -1;
- }
- g_free(new);
- }
- }
- g_free(tmp);
- }
- closedir(dir);
- }
-
- g_free(name);
-
- return 0;
-}
-
-static guint inode_hash(const void *d)
-{
- const struct _inode *v = d;
-
- return v->inode ^ v->dnode;
-}
-
-static gboolean inode_equal(const void *a, const void *b)
-{
- const struct _inode *v1 = a, *v2 = b;
-
- return v1->inode == v2->inode && v1->dnode == v2->dnode;
-}
-
-static void inode_free(void *k, void *v, void *d)
-{
- g_free(k);
-}
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *fi = NULL;
- CamelLocalStore *local_store = (CamelLocalStore *)store;
- GHashTable *visited;
-
- visited = g_hash_table_new(inode_hash, inode_equal);
-
- if (scan_dir(store, visited, local_store->toplevel_dir, top?top:".", flags, NULL, &fi, ex) == -1 && fi != NULL) {
- camel_store_free_folder_info_full(store, fi);
- fi = NULL;
- }
-
- g_hash_table_foreach(visited, inode_free, NULL);
- g_hash_table_destroy(visited);
-
- return fi;
-}
diff --git a/camel/providers/local/camel-maildir-store.h b/camel/providers/local/camel-maildir-store.h
deleted file mode 100644
index 0443c2b57d..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 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 39726566bc..0000000000
--- a/camel/providers/local/camel-maildir-summary.c
+++ /dev/null
@@ -1,765 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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);
-
-#if defined (DOEPOOLV) || defined (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)
-{
-#if !defined (DOEPOOLV) && !defined (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"
- 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(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name);
- 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
-# ifdef DOEPOOLV
- info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name, FALSE);
-# else
- g_free(mdi->filename);
- mdi->filename = g_strdup(d->d_name);
-# endif
-#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);
- camel_folder_change_info_recent_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
-# ifdef DOEPOOLV
- info->strings = e_poolv_set(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname, TRUE);
-# else
- g_free(mdi->filename);
- mdi->filename = newname;
-# endif
-#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 fbb266dfb0..0000000000
--- a/camel/providers/local/camel-maildir-summary.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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;
-
-#if defined (DOEPOOLV) || defined (DOESTRV)
-enum {
- CAMEL_MAILDIR_INFO_FILENAME = CAMEL_MESSAGE_INFO_LAST,
- CAMEL_MAILDIR_INFO_LAST,
-};
-#endif
-
-typedef struct _CamelMaildirMessageInfo {
- CamelMessageInfo info;
-
-#if !defined (DOEPOOLV) && !defined (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);
-
-#if defined (DOEPOOLV) || defined (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 c7d09f4af2..0000000000
--- a/camel/providers/local/camel-mbox-folder.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * 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
- */
-
-#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;
- }
-
- if (camel_lock_folder(lf->folder_path, mf->lockfd, type, ex) == -1) {
- close(mf->lockfd);
- mf->lockfd = -1;
- return -1;
- }
-
- return 0;
-}
-
-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, retval;
- 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) */
- retval = camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex);
- if (retval == -1)
- 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 (mi == NULL)
- 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, g_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);
- }
-
- /* remove the summary info so we are not out-of-sync with the mbox */
- camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (mbs), camel_message_info_uid (mi));
-
- /* 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, retval;
- 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;
- retval = camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex);
- if (retval != -1)
- 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 016cdaea8f..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@ximian.com>
- *
- * Copyright (C) 1999 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 0cebdf4450..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@ximian.com>
- *
- * 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 <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_LOCAL_STORE(store)->toplevel_dir, 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_LOCAL_STORE (store)->toplevel_dir, 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 5387413954..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@ximian.com>
- *
- * 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 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 3d6dfc5378..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 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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 "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-file-utils.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_file_util_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_file_util_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_file_util_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_file_util_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, _("Storing folder"));
-
- fd = open(cls->folder_path, O_RDONLY);
- if (fd == -1) {
- d(printf("%s failed to open: %s\n", cls->folder_path, strerror(errno)));
- camel_exception_setv(ex, 1, _("Could not open folder: %s: %s"),
- cls->folder_path, 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;
- off_t pc = camel_mime_parser_tell_start_from (mp) + 1;
-
- camel_operation_progress (NULL, (int) (((float) pc / size) * 100));
-
- 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 check 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 %2d %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, _("Storing folder"));
-
- fd = open(cls->folder_path, O_RDONLY);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open file: %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, _("Storing folder"));
-
- fd = open(cls->folder_path, O_RDWR);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open file: %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 */
- if (summary_update(cls, mbs->folder_size, changeinfo, ex) == -1)
- 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 628aa7d695..0000000000
--- a/camel/providers/local/camel-mbox-summary.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 cf9bc827bf..0000000000
--- a/camel/providers/local/camel-mh-folder.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * 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
- */
-
-#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)
- goto fail_write;
-
- if (camel_data_wrapper_write_to_stream ((CamelDataWrapper *)message, output_stream) == -1
- || camel_stream_close (output_stream) == -1)
- goto fail_write;
-
- /* close this? */
- camel_object_unref (CAMEL_OBJECT (output_stream));
-
- g_free(name);
-
- camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed",
- ((CamelLocalFolder *)mh_folder)->changes);
- camel_folder_change_info_clear (((CamelLocalFolder *)mh_folder)->changes);
-
- return;
-
- fail_write:
-
- /* remove the summary info so we are not out-of-sync with the mh folder */
- camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (folder->summary),
- camel_message_info_uid (mi));
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to mh folder: %s: %s"),
- name, g_strerror (errno));
-
- if (output_stream) {
- camel_object_unref (CAMEL_OBJECT (output_stream));
- unlink (name);
- }
-
- g_free (name);
-}
-
-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 270bdeb04d..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@ximian.com>
- *
- * Copyright (C) 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 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 8d3d66cbc3..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 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <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_LOCAL_STORE(store)->toplevel_dir, 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_LOCAL_STORE(store)->toplevel_dir, 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 074e8ffbf1..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 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@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_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 f2ba0c9393..0000000000
--- a/camel/providers/local/camel-mh-summary.c
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 2c2b8f613d..0000000000
--- a/camel/providers/local/camel-mh-summary.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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/camel-spool-folder.c b/camel/providers/local/camel-spool-folder.c
deleted file mode 100644
index 8e8b3758a5..0000000000
--- a/camel/providers/local/camel-spool-folder.c
+++ /dev/null
@@ -1,654 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@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 <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-spool-folder.h"
-#include "camel-spool-store.h"
-#include "string-utils.h"
-#include "camel-stream-fs.h"
-#include "camel-spool-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-lock-client.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 CamelSpoolFolder */
-#define CSPOOLF_CLASS(so) CAMEL_SPOOL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CSPOOLS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static int spool_lock(CamelSpoolFolder *lf, CamelLockType type, CamelException *ex);
-static void spool_unlock(CamelSpoolFolder *lf);
-
-static void spool_sync(CamelFolder *folder, gboolean expunge, CamelException *ex);
-static void spool_expunge(CamelFolder *folder, CamelException *ex);
-
-static GPtrArray *spool_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-static void spool_search_free(CamelFolder *folder, GPtrArray * result);
-
-static void spool_append_message(CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo * info, CamelException *ex);
-static CamelMimeMessage *spool_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex);
-static void spool_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value);
-static void spool_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
-
-static void spool_finalize(CamelObject * object);
-
-static void
-camel_spool_folder_class_init(CamelSpoolFolderClass * camel_spool_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_spool_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 = spool_sync;
- camel_folder_class->expunge = spool_expunge;
-
- camel_folder_class->search_by_expression = spool_search_by_expression;
- camel_folder_class->search_free = spool_search_free;
-
- /* virtual method overload */
- camel_folder_class->append_message = spool_append_message;
- camel_folder_class->get_message = spool_get_message;
-
- camel_folder_class->set_message_user_flag = spool_set_message_user_flag;
- camel_folder_class->set_message_user_tag = spool_set_message_user_tag;
-
- camel_spool_folder_class->lock = spool_lock;
- camel_spool_folder_class->unlock = spool_unlock;
-}
-
-static void
-spool_init(gpointer object, gpointer klass)
-{
- CamelFolder *folder = object;
- CamelSpoolFolder *spool_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;
- spool_folder->search = NULL;
-
- spool_folder->priv = g_malloc0(sizeof(*spool_folder->priv));
-#ifdef ENABLE_THREADS
- spool_folder->priv->search_lock = g_mutex_new();
-#endif
-}
-
-static void
-spool_finalize(CamelObject * object)
-{
- CamelSpoolFolder *spool_folder = CAMEL_SPOOL_FOLDER(object);
- CamelFolder *folder = (CamelFolder *)object;
-
- if (folder->summary) {
- camel_spool_summary_sync((CamelSpoolSummary *)folder->summary, FALSE, spool_folder->changes, NULL);
- camel_object_unref((CamelObject *)folder->summary);
- folder->summary = NULL;
- }
-
- if (spool_folder->search) {
- camel_object_unref((CamelObject *)spool_folder->search);
- }
-
- while (spool_folder->locked> 0)
- camel_spool_folder_unlock(spool_folder);
-
- g_free(spool_folder->base_path);
- g_free(spool_folder->folder_path);
-
- camel_folder_change_info_free(spool_folder->changes);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(spool_folder->priv->search_lock);
-#endif
- g_free(spool_folder->priv);
-}
-
-CamelType camel_spool_folder_get_type(void)
-{
- static CamelType camel_spool_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_spool_folder_type == CAMEL_INVALID_TYPE) {
- camel_spool_folder_type = camel_type_register(CAMEL_FOLDER_TYPE, "CamelSpoolFolder",
- sizeof(CamelSpoolFolder),
- sizeof(CamelSpoolFolderClass),
- (CamelObjectClassInitFunc) camel_spool_folder_class_init,
- NULL,
- (CamelObjectInitFunc) spool_init,
- (CamelObjectFinalizeFunc) spool_finalize);
- }
-
- return camel_spool_folder_type;
-}
-
-CamelSpoolFolder *
-camel_spool_folder_construct(CamelSpoolFolder *lf, CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *fi;
- CamelFolder *folder;
- const char *root_dir_path, *name;
-
- 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_spool_store_get_toplevel_dir(CAMEL_SPOOL_STORE(folder->parent_store));
-
- lf->base_path = g_strdup(root_dir_path);
- lf->folder_path = g_strdup(root_dir_path);
-
- lf->changes = camel_folder_change_info_new();
- lf->flags = flags;
-
- folder->summary = (CamelFolderSummary *)camel_spool_summary_new(lf->folder_path);
- if (camel_spool_folder_lock(lf, CAMEL_LOCK_WRITE, ex) == -1) {
- camel_object_unref((CamelObject *)lf);
- return NULL;
- }
-
- camel_spool_summary_check((CamelSpoolSummary *)folder->summary, lf->changes, ex);
- camel_spool_folder_unlock(lf);
-
- fi = g_malloc0(sizeof(*fi));
- fi->full_name = g_strdup(full_name);
- fi->name = g_strdup(name);
- fi->url = g_strdup_printf("spool:%s#%s", ((CamelService *)parent_store)->url->path, fi->name);
- fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_folder_info_build_path(fi, '/');
-
- camel_object_trigger_event(CAMEL_OBJECT(parent_store), "folder_created", fi);
- camel_folder_info_free (fi);
-
- return lf;
-}
-
-CamelFolder *
-camel_spool_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
-{
- CamelFolder *folder;
-
- d(printf("Creating spool folder: %s in %s\n", full_name, camel_local_store_get_toplevel_dir((CamelLocalStore *)parent_store)));
-
- folder = (CamelFolder *)camel_object_new(CAMEL_SPOOL_FOLDER_TYPE);
-
- if (parent_store->flags & CAMEL_STORE_FILTER_INBOX
- && strcmp(full_name, "INBOX") == 0)
- folder->filter_recent = TRUE;
- folder = (CamelFolder *)camel_spool_folder_construct((CamelSpoolFolder *)folder,
- parent_store, full_name, flags, ex);
-
- return folder;
-}
-
-/* lock the folder, may be called repeatedly (with matching unlock calls),
- with type the same or less than the first call */
-int camel_spool_folder_lock(CamelSpoolFolder *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 (CSPOOLF_CLASS(lf)->lock(lf, type, ex) == -1)
- return -1;
- lf->locktype = type;
- }
-
- lf->locked++;
-
- return 0;
-}
-
-/* unlock folder */
-int camel_spool_folder_unlock(CamelSpoolFolder *lf)
-{
- g_assert(lf->locked>0);
- lf->locked--;
- if (lf->locked == 0)
- CSPOOLF_CLASS(lf)->unlock(lf);
-
- return 0;
-}
-
-static int
-spool_lock(CamelSpoolFolder *lf, CamelLockType type, CamelException *ex)
-{
- int retry = 0;
-
- lf->lockfd = open(lf->folder_path, O_RDWR, 0);
- if (lf->lockfd == -1) {
- camel_exception_setv(ex, 1, _("Cannot create folder lock on %s: %s"), lf->folder_path, strerror(errno));
- return -1;
- }
-
- while (retry < CAMEL_LOCK_RETRY) {
- if (retry > 0)
- sleep(CAMEL_LOCK_DELAY);
-
- camel_exception_clear(ex);
-
- if (camel_lock_fcntl(lf->lockfd, type, ex) == 0) {
- if (camel_lock_flock(lf->lockfd, type, ex) == 0) {
- if ((lf->lockid = camel_lock_helper_lock(lf->folder_path, ex)) != -1)
- return 0;
- camel_unlock_flock(lf->lockfd);
- }
- camel_unlock_fcntl(lf->lockfd);
- }
- retry++;
- }
-
- return -1;
-}
-
-static void
-spool_unlock(CamelSpoolFolder *lf)
-{
- camel_lock_helper_unlock(lf->lockid);
- lf->lockid = -1;
- camel_unlock_flock(lf->lockid);
- camel_unlock_fcntl(lf->lockid);
-
- close(lf->lockfd);
- lf->lockfd = -1;
-}
-
-static void
-spool_sync(CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelSpoolFolder *lf = CAMEL_SPOOL_FOLDER(folder);
-
- d(printf("spool sync, expunge=%s\n", expunge?"true":"false"));
-
- if (camel_spool_folder_lock(lf, CAMEL_LOCK_WRITE, ex) == -1)
- return;
-
- /* if sync fails, we'll pass it up on exit through ex */
- camel_spool_summary_sync((CamelSpoolSummary *)folder->summary, expunge, lf->changes, ex);
- camel_spool_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);
- }
-}
-
-static void
-spool_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 *
-spool_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
- CamelSpoolFolder *spool_folder = CAMEL_SPOOL_FOLDER(folder);
- GPtrArray *summary, *matches;
-
- /* NOTE: could get away without the search lock by creating a new
- search object each time */
-
- CAMEL_SPOOL_FOLDER_LOCK(folder, search_lock);
-
- if (spool_folder->search == NULL)
- spool_folder->search = camel_folder_search_new();
-
- camel_folder_search_set_folder(spool_folder->search, folder);
- summary = camel_folder_get_summary(folder);
- camel_folder_search_set_summary(spool_folder->search, summary);
-
- matches = camel_folder_search_execute_expression(spool_folder->search, expression, ex);
-
- CAMEL_SPOOL_FOLDER_UNLOCK(folder, search_lock);
-
- camel_folder_free_summary(folder, summary);
-
- return matches;
-}
-
-static void
-spool_search_free(CamelFolder *folder, GPtrArray * result)
-{
- CamelSpoolFolder *spool_folder = CAMEL_SPOOL_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_SPOOL_FOLDER_LOCK(folder, search_lock);
-
- camel_folder_search_free_result(spool_folder->search, result);
-
- CAMEL_SPOOL_FOLDER_UNLOCK(folder, search_lock);
-}
-
-static void
-spool_append_message(CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo * info, CamelException *ex)
-{
- CamelSpoolFolder *lf = (CamelSpoolFolder *)folder;
- CamelStream *output_stream = NULL, *filter_stream = NULL;
- CamelMimeFilter *filter_from = NULL;
- CamelSpoolSummary *mbs = (CamelSpoolSummary *)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_spool_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_spool_summary_check((CamelSpoolSummary *)folder->summary, lf->changes, ex);
- if (camel_exception_is_set(ex))
- goto fail;
-
- /* add it to the summary/assign the uid, etc */
- mi = camel_spool_summary_add((CamelSpoolSummary *)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 */
- ((CamelSpoolMessageInfo *)mi)->frompos = mbs->folder_size?mbs->folder_size+1:0;
-#if 0
- xev = camel_spool_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_spool_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_spool_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 spool file: %s: %s"),
- lf->folder_path, g_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);
- }
-
- /* remove the summary info so we are not out-of-sync with the spool */
- camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (mbs), camel_message_info_uid (mi));
-
- /* 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_spool_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 *
-spool_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex)
-{
- CamelSpoolFolder *lf = (CamelSpoolFolder *)folder;
- CamelMimeMessage *message;
- CamelSpoolMessageInfo *info;
- CamelMimeParser *parser;
- int fd;
- int retried = FALSE;
-
- d(printf("Getting message %s\n", uid));
-
- /* lock the folder first, burn if we can't, need write lock for summary check */
- if (camel_spool_folder_lock(lf, CAMEL_LOCK_WRITE, ex) == -1)
- return NULL;
-
- /* check for new messages, this may renumber uid's though */
- if (camel_spool_summary_check((CamelSpoolSummary *)folder->summary, lf->changes, ex) == -1)
- return NULL;
-
-retry:
- /* get the message summary info */
- info = (CamelSpoolMessageInfo *) 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_spool_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 spool 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_spool_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_spool_summary_check((CamelSpoolSummary *)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_spool_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_spool_folder_unlock(lf);
- return NULL;
- }
-
- /* and unlock now we're finished with it */
- camel_spool_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
-spool_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
-spool_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-spool-folder.h b/camel/providers/local/camel-spool-folder.h
deleted file mode 100644
index 1a342dc1dc..0000000000
--- a/camel/providers/local/camel-spool-folder.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@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_SPOOL_FOLDER_H
-#define CAMEL_SPOOL_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-spool-summary.h"
-#include "camel-lock.h"
-
-/* #include "camel-store.h" */
-
-#define CAMEL_SPOOL_FOLDER_TYPE (camel_spool_folder_get_type ())
-#define CAMEL_SPOOL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SPOOL_FOLDER_TYPE, CamelSpoolFolder))
-#define CAMEL_SPOOL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SPOOL_FOLDER_TYPE, CamelSpoolFolderClass))
-#define CAMEL_IS_SPOOL_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_SPOOL_FOLDER_TYPE))
-
-typedef struct {
- CamelFolder parent_object;
- struct _CamelSpoolFolderPrivate *priv;
-
- guint32 flags; /* open mode flags */
-
- int locked; /* lock counter */
- CamelLockType locktype; /* what type of lock we have */
- int lockfd; /* lock fd used for fcntl/etc locking */
- int lockid; /* lock id for dot locking */
-
- char *base_path; /* base path of the spool folder */
- char *folder_path; /* the path to the folder itself */
-#if 0
- char *summary_path; /* where the summary lives */
- char *index_path; /* where the index file lives */
-
- ibex *index; /* index for this folder */
-#endif
- CamelFolderSearch *search; /* used to run searches, we just use the real thing (tm) */
- CamelFolderChangeInfo *changes; /* used to store changes to the folder during processing */
-} CamelSpoolFolder;
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
- /* summary factory, only used at init */
- CamelSpoolSummary *(*create_summary)(const char *path, const char *folder, ibex *index);
-
- /* Lock the folder for my operations */
- int (*lock)(CamelSpoolFolder *, CamelLockType type, CamelException *ex);
-
- /* Unlock the folder for my operations */
- void (*unlock)(CamelSpoolFolder *);
-} CamelSpoolFolderClass;
-
-
-/* public methods */
-/* flags are taken from CAMEL_STORE_FOLDER_* flags */
-CamelSpoolFolder *camel_spool_folder_construct(CamelSpoolFolder *lf, CamelStore *parent_store,
- const char *full_name, guint32 flags, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_spool_folder_get_type(void);
-
-CamelFolder *camel_spool_folder_new(CamelStore *parent_store, const char *full_name,
- guint32 flags, CamelException *ex);
-
-/* Lock the folder for internal use. May be called repeatedly */
-/* UNIMPLEMENTED */
-int camel_spool_folder_lock(CamelSpoolFolder *lf, CamelLockType type, CamelException *ex);
-int camel_spool_folder_unlock(CamelSpoolFolder *lf);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SPOOL_FOLDER_H */
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
deleted file mode 100644
index ac857c0928..0000000000
--- a/camel/providers/local/camel-spool-store.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@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 <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include "camel-spool-store.h"
-#include "camel-spool-folder.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-#include "camel-private.h"
-
-#define d(x)
-
-/* Returns the class for a CamelSpoolStore */
-#define CSPOOLS_CLASS(so) CAMEL_SPOOL_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, guint32 flags, CamelException *ex);
-static void free_folder_info (CamelStore *store, CamelFolderInfo *fi);
-
-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_spool_store_class_init (CamelSpoolStoreClass *camel_spool_store_class)
-{
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_spool_store_class);
- CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_spool_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 = free_folder_info;
-
- camel_store_class->delete_folder = delete_folder;
- camel_store_class->rename_folder = rename_folder;
-}
-
-CamelType
-camel_spool_store_get_type (void)
-{
- static CamelType camel_spool_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_spool_store_type == CAMEL_INVALID_TYPE) {
- camel_spool_store_type = camel_type_register (CAMEL_STORE_TYPE, "CamelSpoolStore",
- sizeof (CamelSpoolStore),
- sizeof (CamelSpoolStoreClass),
- (CamelObjectClassInitFunc) camel_spool_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_spool_store_type;
-}
-
-static void
-construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
-{
- struct stat st;
-
- d(printf("constructing store of type %s '%s:%s'\n",
- camel_type_to_name(((CamelObject *)service)->s.type), url->protocol, url->path));
-
- CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
- if (camel_exception_is_set (ex))
- return;
-
- if (service->url->path[0] != '/') {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Store root %s is not an absolute path"), service->url->path);
- return;
- }
-
- if (stat(service->url->path, &st) == -1 || !S_ISREG(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Spool `%s' does not exist or is not a regular file"),
- service->url->path);
- return;
- }
-}
-
-const char *
-camel_spool_store_get_toplevel_dir (CamelSpoolStore *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)
-{
- char *path = ((CamelService *)store)->url->path;
- CamelFolder *folder;
-
- d(printf("opening folder %s on path %s\n", folder_name, path));
-
- /* we only support an 'INBOX' */
- if (strcmp(folder_name, "INBOX") != 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Folder `%s/%s' does not exist."),
- path, folder_name);
- return NULL;
- }
-
- folder = camel_spool_folder_new(store, folder_name, flags, ex);
-
- return folder;
-}
-
-static CamelFolder *
-get_inbox(CamelStore *store, CamelException *ex)
-{
- return get_folder (store, "INBOX", CAMEL_STORE_FOLDER_CREATE, ex);
-}
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup (service->url->path);
- else
- return g_strdup_printf (_("Spool mail file %s"), service->url->path);
-}
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *fi = NULL;
- CamelService *service = (CamelService *)store;
- CamelFolder *folder;
-
- if (top == NULL || strcmp(top, "INBOX") == 0) {
- /* FIXME: if the folder is opened we could look it up? */
- fi = g_malloc0(sizeof(*fi));
- fi->full_name = "INBOX";
- fi->name = "INBOX";
- fi->url = g_strdup_printf("spool:%s#%s", service->url->path, fi->name);
-
- CAMEL_STORE_LOCK(store, cache_lock);
- folder = g_hash_table_lookup(store->folders, fi->full_name);
- if (folder)
- fi->unread_message_count = camel_folder_get_message_count(folder);
- else
- fi->unread_message_count = -1;
- CAMEL_STORE_UNLOCK(store, cache_lock);
-
- camel_folder_info_build_path(fi, '/');
- }
-
- return fi;
-}
-
-static void free_folder_info (CamelStore *store, CamelFolderInfo *fi)
-{
- if (fi) {
- g_free(fi->url);
- g_free(fi);
- }
-}
-
-
-/* default implementation, rename all */
-static void
-rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Spool folders cannot be renamed"));
-}
-
-/* default implementation, only delete metadata */
-static void
-delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Spool folders cannot be deleted"));
-}
diff --git a/camel/providers/local/camel-spool-store.h b/camel/providers/local/camel-spool-store.h
deleted file mode 100644
index a659c16ca5..0000000000
--- a/camel/providers/local/camel-spool-store.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 (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_SPOOL_STORE_H
-#define CAMEL_SPOOL_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-store.h"
-
-#define CAMEL_SPOOL_STORE_TYPE (camel_spool_store_get_type ())
-#define CAMEL_SPOOL_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SPOOL_STORE_TYPE, CamelSpoolStore))
-#define CAMEL_SPOOL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SPOOL_STORE_TYPE, CamelSpoolStoreClass))
-#define CAMEL_IS_SPOOL_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_SPOOL_STORE_TYPE))
-
-
-typedef struct {
- CamelStore parent_object;
-
-} CamelSpoolStore;
-
-
-
-typedef struct {
- CamelStoreClass parent_class;
-
-} CamelSpoolStoreClass;
-
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_spool_store_get_type (void);
-
-const gchar *camel_spool_store_get_toplevel_dir (CamelSpoolStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SPOOL_STORE_H */
-
-
diff --git a/camel/providers/local/camel-spool-summary.c b/camel/providers/local/camel-spool-summary.c
deleted file mode 100644
index db05f602ef..0000000000
--- a/camel/providers/local/camel-spool-summary.c
+++ /dev/null
@@ -1,1279 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Copyright (C) 2001 Ximian Inc. (www.ximian.com)
- *
- * Authors: Michael Zucchi <notzed@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 <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "camel-spool-summary.h"
-#include "camel-mime-message.h"
-#include "camel-file-utils.h"
-#include "camel-operation.h"
-
-#define io(x)
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#define CAMEL_SPOOL_SUMMARY_VERSION (0x400)
-
-struct _CamelSpoolSummaryPrivate {
-};
-
-#define _PRIVATE(o) (((CamelSpoolSummary *)(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 *s, CamelMimeParser *mp);
-static CamelMessageInfo * message_info_load (CamelFolderSummary *, FILE *);
-static int message_info_save (CamelFolderSummary *, FILE *, CamelMessageInfo *);
-
-static int spool_summary_decode_x_evolution(CamelSpoolSummary *cls, const char *xev, CamelMessageInfo *mi);
-static char *spool_summary_encode_x_evolution(CamelSpoolSummary *cls, const CamelMessageInfo *mi);
-
-static int spool_summary_load(CamelSpoolSummary *cls, int forceindex, CamelException *ex);
-static int spool_summary_check(CamelSpoolSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static int spool_summary_sync(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static CamelMessageInfo *spool_summary_add(CamelSpoolSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
-static int spool_summary_sync_full(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-
-static void camel_spool_summary_class_init (CamelSpoolSummaryClass *klass);
-static void camel_spool_summary_init (CamelSpoolSummary *obj);
-static void camel_spool_summary_finalise (CamelObject *obj);
-static CamelFolderSummaryClass *camel_spool_summary_parent;
-
-CamelType
-camel_spool_summary_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_folder_summary_get_type(), "CamelSpoolSummary",
- sizeof (CamelSpoolSummary),
- sizeof (CamelSpoolSummaryClass),
- (CamelObjectClassInitFunc) camel_spool_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_spool_summary_init,
- (CamelObjectFinalizeFunc) camel_spool_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_spool_summary_class_init(CamelSpoolSummaryClass *klass)
-{
- CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) klass;
-
- camel_spool_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_type_get_global_classfuncs(camel_folder_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;
-
- klass->load = spool_summary_load;
- klass->check = spool_summary_check;
- klass->sync = spool_summary_sync;
- klass->add = spool_summary_add;
-
- klass->encode_x_evolution = spool_summary_encode_x_evolution;
- klass->decode_x_evolution = spool_summary_decode_x_evolution;
-}
-
-static void
-camel_spool_summary_init(CamelSpoolSummary *obj)
-{
- struct _CamelSpoolSummaryPrivate *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(CamelSpoolMessageInfo);
- s->content_info_size = sizeof(CamelMessageContentInfo);
-
- /* and a unique file version */
- s->version += CAMEL_SPOOL_SUMMARY_VERSION;
-}
-
-static void
-camel_spool_summary_finalise(CamelObject *obj)
-{
- CamelSpoolSummary *mbs = CAMEL_SPOOL_SUMMARY(obj);
-
- g_free(mbs->folder_path);
-}
-
-CamelSpoolSummary *
-camel_spool_summary_new(const char *filename)
-{
- CamelSpoolSummary *new = (CamelSpoolSummary *)camel_object_new(camel_spool_summary_get_type());
-
- camel_folder_summary_set_build_content(CAMEL_FOLDER_SUMMARY(new), FALSE);
- new->folder_path = g_strdup(filename);
-
- return new;
-}
-
-static int
-spool_summary_load(CamelSpoolSummary *cls, int forceindex, CamelException *ex)
-{
- g_warning("spool_summary_load() should nto b e called\n");
-
- return camel_folder_summary_load((CamelFolderSummary *)cls);
-}
-
-/* load/check the summary */
-int
-camel_spool_summary_load(CamelSpoolSummary *cls, int forceindex, CamelException *ex)
-{
- struct stat st;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
-
- g_warning("spool_summary_load() should nto b e called\n");
-
- d(printf("Loading summary ...\n"));
-
- if (forceindex
- || stat(s->summary_path, &st) == -1
- || ((CamelSpoolSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->load(cls, forceindex, ex) == -1) {
- camel_folder_summary_clear((CamelFolderSummary *)cls);
- }
-
- return camel_spool_summary_check(cls, NULL, ex);
-}
-
-char *
-camel_spool_summary_encode_x_evolution(CamelSpoolSummary *cls, const CamelMessageInfo *info)
-{
- return ((CamelSpoolSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->encode_x_evolution(cls, info);
-}
-
-int
-camel_spool_summary_decode_x_evolution(CamelSpoolSummary *cls, const char *xev, CamelMessageInfo *info)
-{
- return ((CamelSpoolSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->decode_x_evolution(cls, xev, info);
-}
-
-int
-camel_spool_summary_check(CamelSpoolSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int ret;
-
- ret = ((CamelSpoolSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->check(cls, changeinfo, ex);
-
- return ret;
-}
-
-int
-camel_spool_summary_sync(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- return ((CamelSpoolSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->sync(cls, expunge, changeinfo, ex);
-}
-
-CamelMessageInfo *
-camel_spool_summary_add(CamelSpoolSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, CamelException *ex)
-{
- return ((CamelSpoolSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->add(cls, msg, info, ci, ex);
-}
-
-/**
- * camel_spool_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_spool_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
-summary_header_load(CamelFolderSummary *s, FILE *in)
-{
- CamelSpoolSummary *mbs = CAMEL_SPOOL_SUMMARY(s);
-
- if (((CamelFolderSummaryClass *)camel_spool_summary_parent)->summary_header_load(s, in) == -1)
- return -1;
-
- return camel_file_util_decode_uint32(in, &mbs->folder_size);
-}
-
-static int
-summary_header_save(CamelFolderSummary *s, FILE *out)
-{
- CamelSpoolSummary *mbs = CAMEL_SPOOL_SUMMARY(s);
-
- if (((CamelFolderSummaryClass *)camel_spool_summary_parent)->summary_header_save(s, out) == -1)
- return -1;
-
- return camel_file_util_encode_uint32(out, mbs->folder_size);
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
- CamelMessageInfo *mi;
- CamelSpoolSummary *cls = (CamelSpoolSummary *)s;
-
- mi = ((CamelFolderSummaryClass *)camel_spool_summary_parent)->message_info_new(s, h);
- if (mi) {
- CamelSpoolMessageInfo *mbi = (CamelSpoolMessageInfo *)mi;
- const char *xev;
-
- xev = header_raw_find(&h, "X-Evolution", NULL);
- if (xev==NULL || camel_spool_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));
- }
-
- mbi->frompos = -1;
- }
-
- return mi;
-}
-
-static CamelMessageInfo *
-message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
- CamelMessageInfo *mi;
-
- mi = ((CamelFolderSummaryClass *)camel_spool_summary_parent)->message_info_new_from_parser(s, mp);
- if (mi) {
- CamelSpoolMessageInfo *mbi = (CamelSpoolMessageInfo *)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 spool message info\n"));
-
- mi = ((CamelFolderSummaryClass *)camel_spool_summary_parent)->message_info_load(s, in);
- if (mi) {
- CamelSpoolMessageInfo *mbi = (CamelSpoolMessageInfo *)mi;
-
- if (camel_file_util_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)
-{
- CamelSpoolMessageInfo *mbi = (CamelSpoolMessageInfo *)mi;
-
- io(printf("saving spool message info\n"));
-
- if (((CamelFolderSummaryClass *)camel_spool_summary_parent)->message_info_save(s, out, mi) == -1
- || camel_file_util_encode_off_t(out, mbi->frompos) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-summary_rebuild(CamelSpoolSummary *cls, off_t offset, CamelException *ex)
-{
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- 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) {
- d(printf("%s failed to open: %s\n", 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;
- off_t pc = camel_mime_parser_tell_start_from (mp) + 1;
-
- camel_operation_progress (NULL, (int) (((float) pc / size) * 100));
-
- 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);
- cls->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(CamelSpoolSummary *cls, off_t offset, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int ret, i, count;
- CamelFolderSummary *s = (CamelFolderSummary *)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 */
- ret = summary_rebuild(cls, 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
-spool_summary_check(CamelSpoolSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- 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 spool, 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, changeinfo, ex);
- } else {
- /* is the summary uptodate? */
- if (st.st_size != cls->folder_size || st.st_mtime != s->time) {
- if (cls->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", cls->folder_size));
- ret = summary_update(cls, cls->folder_size, changeinfo, ex);
- } else {
- d(printf("folder shrank! rebuilding from start\n"));
- camel_folder_summary_clear(s);
- ret = summary_update(cls, 0, changeinfo, ex);
- }
- }
- }
-
- if (ret != -1) {
- int i, work, count;
-
- /* check to see if we need to copy/update the file; missing xev headers prompt this */
- work = FALSE;
- count = camel_folder_summary_count(s);
- for (i=0;!work && i<count; i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
- g_assert(info);
- work = (info->flags & (CAMEL_MESSAGE_FOLDER_NOXEV)) != 0;
- camel_folder_summary_info_free(s, info);
- }
-
- /* if we do, then write out the headers using sync_full, etc */
- if (work) {
- d(printf("Have to add new headers, re-syncing from the start to accomplish this\n"));
- ret = spool_summary_sync_full(cls, FALSE, changeinfo, ex);
-
- if (stat(cls->folder_path, &st) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Unknown error: %s"), strerror(errno));
- return -1;
- }
- }
- cls->folder_size = st.st_size;
- s->time = st.st_mtime;
- }
-
- 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_spool_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
-spool_summary_sync_full(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- CamelMimeParser *mp = NULL;
- int i, count;
- CamelSpoolMessageInfo *info = NULL;
- int fd = -1, fdout = -1;
- char *tmpname = NULL;
- char *buffer, *xevnew = NULL, *p;
- int len;
- const char *fromline;
- int lastdel = FALSE;
- off_t spoollen, outlen;
- int size, sizeout;
- struct stat st;
-
- d(printf("performing full summary/sync\n"));
-
- camel_operation_start(NULL, _("Storing folder"));
-
- fd = open(cls->folder_path, O_RDWR);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open file: %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);
-
-#ifdef HAVE_MKSTEMP
- tmpname = alloca(64);
- sprintf(tmpname, "/tmp/spool.camel.XXXXXX");
- fdout = mkstemp(tmpname);
-#else
-#warning "Your system has no mkstemp(3), spool updating may be insecure"
- tmpname = alloca(L_tmpnam);
- tmpnam(tmpname);
- fdout = open(tmpname, O_RDWR|O_CREAT|O_EXCL, 0600);
-#endif
- d(printf("Writing tmp file to %s\n", tmpname));
- 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 = (CamelSpoolMessageInfo *)camel_folder_summary_index(s, i);
-
- g_assert(info);
-
- d(printf("Looking at message %s\n", camel_message_info_uid(info)));
-
- /* 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 0
- if (cls->index)
- ibex_unindex(cls->index, (char *)uid);
-#endif
- /* 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", camel_message_info_uid(info), 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_spool_summary_encode_x_evolution(cls, (CamelMessageInfo *)info);
- if (camel_spool_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;
- }
-
- /* mark this message as recent */
- if (info->info.flags & CAMEL_MESSAGE_FOLDER_NOXEV)
- camel_folder_change_info_recent_uid(changeinfo, camel_message_info_uid(info));
-
- 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 spool 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;
- }
- }
-
- /* sync out content */
- if (fsync(fdout) == -1) {
- g_warning("Cannot sync temporary folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync temporary folder %s: %s"),
- cls->folder_path, strerror(errno));
- goto error;
- }
-
- /* see if we can write this much to the spool file */
- if (fstat(fd, &st) == -1) {
- g_warning("Cannot sync temporary folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync temporary folder %s: %s"),
- cls->folder_path, strerror(errno));
- goto error;
- }
- spoollen = st.st_size;
-
- if (fstat(fdout, &st) == -1) {
- g_warning("Cannot sync temporary folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync temporary folder %s: %s"),
- cls->folder_path, strerror(errno));
- goto error;
- }
- outlen = st.st_size;
-
- /* I think this is the right way to do this */
- if (outlen>0
- && (lseek(fd, outlen-1, SEEK_SET) == -1
- || write(fd, "", 1) != 1
- || fsync(fd) == -1
- || lseek(fd, 0, SEEK_SET) == -1
- || lseek(fdout, 0, SEEK_SET) == -1)) {
- g_warning("Cannot sync spool folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync spool folder %s: %s"),
- cls->folder_path, strerror(errno));
- /* incase we ran out of room, remove any trailing space first */
- ftruncate(fd, spoollen);
- goto error;
- }
-
-
- /* now copy content back */
- buffer = g_malloc(8192);
- size = 1;
- while (size>0) {
- do {
- size = read(fdout, buffer, 8192);
- } while (size == -1 && errno == EINTR);
-
- if (size > 0) {
- p = buffer;
- do {
- sizeout = write(fd, p, size);
- if (sizeout > 0) {
- p+= sizeout;
- size -= sizeout;
- }
- } while ((sizeout == -1 && errno == EINTR) && size > 0);
- size = sizeout;
- }
-
- if (size == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync spool folder %s: %s\n"
- "Folder may be corrupt, copy saved in `%s'"),
- cls->folder_path, strerror(errno), tmpnam);
- /* so we dont delete it */
- close(fdout);
- tmpname = NULL;
- fdout = -1;
- g_free(buffer);
- goto error;
- }
- }
-
- g_free(buffer);
-
- d(printf("Closing folders\n"));
-
- if (ftruncate(fd, outlen) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync spool folder %s: %s\n"
- "Folder may be corrupt, copy saved in `%s'"),
- cls->folder_path, strerror(errno), tmpnam);
- close(fdout);
- tmpname = NULL;
- fdout = -1;
- goto error;
- }
-
- if (close(fd) == -1) {
- g_warning("Cannot close source folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not sync spool folder %s: %s\n"
- "Folder may be corrupt, copy saved in `%s'"),
- cls->folder_path, strerror(errno), tmpnam);
- close(fdout);
- tmpname = NULL;
- fdout = -1;
- fd = -1;
- goto error;
- }
-
- close(fdout);
- unlink(tmpname);
-
- 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
-spool_summary_sync_quick(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- CamelMimeParser *mp = NULL;
- int i, count;
- CamelSpoolMessageInfo *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, _("Storing folder"));
-
- fd = open(cls->folder_path, O_RDWR);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not file: %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 = (CamelSpoolMessageInfo *)camel_folder_summary_index(s, i);
-
- g_assert(info);
-
- d(printf("Checking message %s %08x\n", camel_message_info_uid(info), 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", camel_message_info_uid(info)));
-
- 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_spool_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_spool_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
-spool_summary_sync(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- struct stat st;
- 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, cls->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 = spool_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 = spool_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;
- cls->folder_size = st.st_size;
- /*camel_folder_summary_save(s);*/
-
- return 0;
-}
-
-
-static CamelMessageInfo *
-spool_summary_add(CamelSpoolSummary *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", camel_message_info_uid(mi)));
- 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_spool_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 *
-spool_summary_encode_x_evolution(CamelSpoolSummary *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
-spool_summary_decode_x_evolution(CamelSpoolSummary *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;
-}
-
diff --git a/camel/providers/local/camel-spool-summary.h b/camel/providers/local/camel-spool-summary.h
deleted file mode 100644
index 02b471c632..0000000000
--- a/camel/providers/local/camel-spool-summary.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc. (www.ximian.com)
- *
- * Authors: Michael Zucchi <notzed@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_SPOOL_SUMMARY_H
-#define _CAMEL_SPOOL_SUMMARY_H
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_SPOOL_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_spool_summary_get_type (), CamelSpoolSummary)
-#define CAMEL_SPOOL_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_spool_summary_get_type (), CamelSpoolSummaryClass)
-#define CAMEL_IS_SPOOL_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_spool_summary_get_type ())
-
-typedef struct _CamelSpoolSummary CamelSpoolSummary;
-typedef struct _CamelSpoolSummaryClass CamelSpoolSummaryClass;
-
-/* extra summary flags */
-enum {
- CAMEL_MESSAGE_FOLDER_NOXEV = 1<<17,
- CAMEL_MESSAGE_FOLDER_XEVCHANGE = 1<<18,
-};
-
-typedef struct _CamelSpoolMessageInfo {
- CamelMessageInfo info;
-
- off_t frompos;
-} CamelSpoolMessageInfo;
-
-struct _CamelSpoolSummary {
- CamelFolderSummary parent;
-
- struct _CamelSpoolSummaryPrivate *priv;
-
- char *folder_path; /* name of matching folder */
-
- size_t folder_size;
-};
-
-struct _CamelSpoolSummaryClass {
- CamelFolderSummaryClass parent_class;
-
- int (*load)(CamelSpoolSummary *cls, int forceindex, CamelException *ex);
- int (*check)(CamelSpoolSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
- int (*sync)(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
- CamelMessageInfo *(*add)(CamelSpoolSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
- char *(*encode_x_evolution)(CamelSpoolSummary *cls, const CamelMessageInfo *info);
- int (*decode_x_evolution)(CamelSpoolSummary *cls, const char *xev, CamelMessageInfo *info);
-};
-
-guint camel_spool_summary_get_type (void);
-void camel_spool_summary_construct (CamelSpoolSummary *new, const char *filename, const char *spool_name, ibex *index);
-
-/* create the summary, in-memory only */
-CamelSpoolSummary *camel_spool_summary_new(const char *filename);
-
-/* load/check the summary */
-int camel_spool_summary_load(CamelSpoolSummary *cls, int forceindex, CamelException *ex);
-/* check for new/removed messages */
-int camel_spool_summary_check(CamelSpoolSummary *cls, CamelFolderChangeInfo *, CamelException *ex);
-/* perform a folder sync or expunge, if needed */
-int camel_spool_summary_sync(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *, CamelException *ex);
-/* add a new message to the summary */
-CamelMessageInfo *camel_spool_summary_add(CamelSpoolSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
-/* generate an X-Evolution header line */
-char *camel_spool_summary_encode_x_evolution(CamelSpoolSummary *cls, const CamelMessageInfo *info);
-int camel_spool_summary_decode_x_evolution(CamelSpoolSummary *cls, const char *xev, CamelMessageInfo *info);
-
-/* utility functions - write headers to a file with optional X-Evolution header */
-int camel_spool_summary_write_headers(int fd, struct _header_raw *header, char *xevline);
-/* build a from line: FIXME: remove, or move to common code */
-char *camel_spool_summary_build_from(struct _header_raw *header);
-
-#endif /* ! _CAMEL_SPOOL_SUMMARY_H */
-
diff --git a/camel/providers/local/libcamellocal.urls b/camel/providers/local/libcamellocal.urls
deleted file mode 100644
index 207c19a98f..0000000000
--- a/camel/providers/local/libcamellocal.urls
+++ /dev/null
@@ -1,4 +0,0 @@
-mh
-mbox
-maildir
-spool
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 1244c04e52..0000000000
--- a/camel/providers/nntp/Makefile.am
+++ /dev/null
@@ -1,41 +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) \
- $(EXTRA_GNOME_CFLAGS) \
- -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
diff --git a/camel/providers/nntp/camel-nntp-auth.c b/camel/providers/nntp/camel-nntp-auth.c
deleted file mode 100644
index 6eba6cc066..0000000000
--- a/camel/providers/nntp/camel-nntp-auth.c
+++ /dev/null
@@ -1,93 +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 Ximian, Inc. <toshok@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 <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_get_password (session, 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 dbcbc898db..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@ximian.com>
- *
- * Copyright (C) 1999 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 0f981be643..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ /dev/null
@@ -1,289 +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@ximian.com>
- *
- * Copyright (C) 2000 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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-folder-search.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)
-{
- CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
- GPtrArray *matches, *summary;
-
- if(nntp_folder->search == NULL)
- nntp_folder->search = camel_folder_search_new();
-
- camel_folder_search_set_folder(nntp_folder->search, folder);
- summary = camel_folder_get_summary(folder);
- camel_folder_search_set_summary(nntp_folder->search, summary);
-
- matches = camel_folder_search_execute_expression(nntp_folder->search, expression, ex);
-
- camel_folder_free_summary(folder, summary);
-
- return matches;
-}
-
-static void
-nntp_folder_search_free(CamelFolder *folder, GPtrArray *result)
-{
- CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
-
- camel_folder_search_free_result(nntp_folder->search, result);
-
-}
-
-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;
- camel_folder_class->search_free = nntp_folder_search_free;
-}
-
-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;
- folder->has_search_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);
-
- camel_folder_summary_load (folder->summary);
-
- 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 add53cd987..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.h
+++ /dev/null
@@ -1,75 +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@ximian.com>
- *
- * Copyright (C) 2000 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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;
- CamelFolderSearch *search;
-} 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 8fdc513832..0000000000
--- a/camel/providers/nntp/camel-nntp-grouplist.c
+++ /dev/null
@@ -1,220 +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@ximian.com>
- *
- * Copyright (C) 2000 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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;
-
- CAMEL_NNTP_STORE_LOCK(store);
- 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) {
- list->group_list = g_list_reverse(list->group_list);
- 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_prepend (list->group_list, entry);
- }
- }
- CAMEL_NNTP_STORE_UNLOCK(store);
-
- list->group_list = g_list_reverse(list->group_list);
- 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_prepend (list->group_list, entry);
- }
-
- fclose (fp);
-
- list->group_list = g_list_reverse(list->group_list);
- 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 3b3451773e..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@ximian.com>
- *
- * Copyright (C) 2000 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 37f052cc9e..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 Ximian, Inc. <toshok@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 <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)
-{
- camel_nntp_newsrc_mark_range_read (newsrc, group_name, num, num);
-}
-
-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) {
- NEWSRC_UNLOCK(newsrc, lock);
- 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 a8afe48c02..0000000000
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ /dev/null
@@ -1,114 +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@ximian.com>
- *
- * Copyright (C) 2000 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 <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);
- news_provider.url_hash = nntp_url_hash;
- news_provider.url_equal = 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 2f4d9ed540..0000000000
--- a/camel/providers/nntp/camel-nntp-resp-codes.h
+++ /dev/null
@@ -1,56 +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 Ximian, Inc. <toshok@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_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_EXTENSIONS_SUPPORTED 202
-#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
-
-#define NNTP_NO_PERMISSION 502
-
-/* 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 19510af334..0000000000
--- a/camel/providers/nntp/camel-nntp-store.c
+++ /dev/null
@@ -1,876 +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 Ximian, Inc. <toshok@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 <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"
-
-#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)
-{
- int rc;
-
- store->extensions = 0;
-
- CAMEL_NNTP_STORE_LOCK(store);
- rc = camel_nntp_command(store, ex, NULL, "LIST EXTENSIONS");
- if (rc == NNTP_LIST_FOLLOWS || rc == NNTP_EXTENSIONS_SUPPORTED) {
- 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);
- }
- }
- CAMEL_NNTP_STORE_UNLOCK(store);
-
-#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;
-
- CAMEL_NNTP_STORE_LOCK(store);
- 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;
- }
- }
- CAMEL_NNTP_STORE_UNLOCK(store);
-}
-
-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;
- }
-
- resp_code = atoi (buf);
- /* Check to see if we have any permissions on this server. */
- if (resp_code == NNTP_NO_PERMISSION)
- return FALSE;
-
- /* check if posting is allowed. */
- 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, 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);
-
- /* 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,
- guint32 flags,
- 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 (!(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)) {
- 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);
-#ifdef ENABLE_THREADS
- e_mutex_destroy(nntp_store->command_lock);
-#endif
-}
-
-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);
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(object);
- CamelStore *store = CAMEL_STORE (object);
-
- remote_store->default_port = NNTP_PORT;
-
- store->flags = CAMEL_STORE_SUBSCRIPTIONS;
-
-#ifdef ENABLE_THREADS
- nntp_store->command_lock = e_mutex_new(E_MUTEX_REC);
-#endif
-}
-
-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);
-
- if(camel_exception_get_id(ex) ==
- CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED) {
- /* the connect might have timed out, give it another shot.. */
- camel_exception_clear(ex);
- if(nntp_store_connect(CAMEL_SERVICE(store), ex))
- resp_code =
- camel_nntp_command_send_recv (store, ex, ret, cmdbuf);
- /* that's it, no more tries */
- }
-
- 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 (camel_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 8841874e0c..0000000000
--- a/camel/providers/nntp/camel-nntp-store.h
+++ /dev/null
@@ -1,128 +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 Ximian, Inc. <toshok@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_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"
-
-#include "config.h"
-
-#ifdef ENABLE_THREADS
-#include "e-util/e-msgport.h"
-#endif
-
-#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;
-
-#ifdef ENABLE_THREADS
- EMutex *command_lock;
-#endif
-};
-
-struct CamelNNTPStoreClass {
- CamelRemoteStoreClass parent_class;
-
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_NNTP_STORE_LOCK(f) (e_mutex_lock(((CamelNNTPStore *) f)->command_lock))
-#define CAMEL_NNTP_STORE_UNLOCK(f) (e_mutex_unlock(((CamelNNTPStore *) f)->command_lock))
-#else
-#define CAMEL_NNTP_STORE_LOCK(f)
-#define CAMEL_NNTP_STORE_UNLOCK(f)
-#endif
-
-/* 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 49aa9987e0..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@ximian.com>
- *
- * Copyright (C) 2000 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 ed0482a109..0000000000
--- a/camel/providers/nntp/camel-nntp-utils.c
+++ /dev/null
@@ -1,301 +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@ximian.com>
- *
- * Copyright (C) 2000 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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(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 (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
-
-static inline int
-uid_num (CamelFolderSummary *summary, int index)
-{
- char *tmp;
- char *brk;
- CamelMessageInfo *minfo;
- int ret;
-
- minfo = camel_folder_summary_index(summary, index);
- if(minfo == NULL)
- return 0;
-
- tmp = g_strdup(camel_message_info_uid(minfo));
- camel_message_info_free(minfo);
-
- if((brk = strchr(tmp, ',')) == NULL)
- ret = 0;
- else {
- *brk = 0;
- ret = atoi(tmp);
- }
-
- g_free(tmp);
-
- return ret;
-}
-
-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, last_summary;
- int status;
- int i;
-
- 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);
-
- i = camel_folder_summary_count(folder->summary);
- if(i != 0) {
- last_summary = uid_num(folder->summary, i-1);
-
- if(last_summary < first_message)
- camel_folder_summary_clear(folder->summary);
- else {
- while(uid_num(folder->summary, 0) < first_message)
- camel_folder_summary_remove_index(folder->summary, 0);
-
- if(last_summary >= last_message)
- return;
-
- first_message = last_summary;
- }
- }
-
- 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 f40c75cd91..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@ximian.com>
- *
- * Copyright (C) 1999 Ximian .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public 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 476e3d3189..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
-
-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 e5cca11cff..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ /dev/null
@@ -1,429 +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@ximian.com>
- *
- * Copyright (C) 2000 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 "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 <e-util/md5-utils.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 CamelStreamMem *pop3_get_message_stream (CamelFolder *folder, int id,
- gboolean headers_only, CamelException *ex);
-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 GPtrArray *
-pop3_generate_uids (CamelFolder *folder, int count, CamelException *ex)
-{
- GPtrArray *uids;
- int i;
-
- uids = g_ptr_array_new ();
- g_ptr_array_set_size (uids, count);
-
- for (i = 0; i < count; i++) {
- CamelStreamMem *stream;
- guchar digest[16];
- char *uid;
-
- stream = pop3_get_message_stream (folder, i + 1, TRUE, ex);
- if (stream == NULL)
- goto exception;
-
- md5_get_digest (stream->buffer->data, stream->buffer->len, digest);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- uid = base64_encode_simple (digest, 16);
- uids->pdata[i] = uid;
- }
-
- return uids;
-
- exception:
-
- for (i = 0; i < count; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
-
- return NULL;
-}
-
-static void
-pop3_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- CamelPop3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store);
- CamelPop3Folder *pop3_folder = (CamelPop3Folder *) folder;
- GPtrArray *uids;
- int status, count;
- char *data;
-
- camel_operation_start (NULL, _("Retrieving POP summary"));
-
- status = camel_pop3_command (pop3_store, &data, ex, "STAT");
- switch (status) {
- case CAMEL_POP3_ERR:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not check POP server for new messages: %s"),
- data);
- g_free (data);
- /* fall through */
- case CAMEL_POP3_FAIL:
- camel_operation_end (NULL);
- return;
- }
-
- count = atoi (data);
- g_free (data);
-
- if (count == 0) {
- camel_operation_end (NULL);
- pop3_folder->uids = g_ptr_array_new ();
- pop3_folder->flags = g_new0 (guint32, 0);
- return;
- }
-
- 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) {
- uids = pop3_generate_uids (folder, count, ex);
- camel_operation_end (NULL);
- if (!uids || camel_exception_is_set (ex))
- return;
- } else {
- data = camel_pop3_command_get_additional_data (pop3_store, 0, ex);
- camel_operation_end (NULL);
- if (!data || 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);
-
- camel_operation_start(NULL, _("Expunging deleted messages"));
-
- for (i = 0; i < pop3_folder->uids->len; i++) {
- camel_operation_progress(NULL, (i+1) * 100 / pop3_folder->uids->len);
- 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) {
- camel_operation_end(NULL);
- return;
- }
- }
- }
-
- camel_operation_end(NULL);
-
- 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 CamelStreamMem *
-pop3_get_message_stream (CamelFolder *folder, int id, gboolean headers_only, CamelException *ex)
-{
- CamelStream *stream;
- char *result, *body;
- int status, total;
-
- status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
- &result, ex, headers_only ? "TOP %d 0" : "RETR %d", id);
- switch (status) {
- case CAMEL_POP3_ERR:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not fetch message: %s"), result);
- g_free (result);
- /* fall through */
- case CAMEL_POP3_FAIL:
- camel_operation_end (NULL);
- return NULL;
- }
-
- if (!result || (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;
- }
-
- stream = camel_stream_mem_new_with_buffer (body, strlen (body));
- g_free (body);
-
- return CAMEL_STREAM_MEM (stream);
-}
-
-static CamelMimeMessage *
-pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelMimeMessage *message;
- CamelStreamMem *stream;
- int id;
-
- id = uid_to_number (CAMEL_POP3_FOLDER (folder), uid);
- if (id == -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"), id);
- stream = pop3_get_message_stream (folder, id, FALSE, ex);
- camel_operation_end (NULL);
- if (stream == NULL)
- return NULL;
-
- message = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (message),
- CAMEL_STREAM (stream));
-
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return message;
-}
-
-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 ef3f6d94c2..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@ximian.com>
- *
- * Copyright (C) 2000 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_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 d1351c2daf..0000000000
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ /dev/null
@@ -1,116 +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@ximian.com>
- *
- * Copyright (C) 2000 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 "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" },
-#ifdef NOT_FOR_1_0
- { CAMEL_PROVIDER_CONF_CHECKSPIN, "delete_after", "UNIMPLEMENTED",
- N_("Delete after %s day(s)"), "0:1:7:365" },
-#endif
- { CAMEL_PROVIDER_CONF_SECTION_END },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider pop3_provider = {
- "pop",
-
- N_("POP"),
-
- N_("For connecting to and downloading mail from POP servers."),
-
- "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);
- pop3_provider.url_hash = camel_url_hash;
- pop3_provider.url_equal = 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 e5f6144ea6..0000000000
--- a/camel/providers/pop3/camel-pop3-store.c
+++ /dev/null
@@ -1,654 +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@ximian.com>
- *
- * Copyright (C) 2000 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 <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-tcp-stream.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);
- if (pop3_store->implementation)
- g_free (pop3_store->implementation);
-}
-
-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;
-
- 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;
- struct hostent *h;
- int fd;
-
- h = camel_service_gethost (service, ex);
-
- fd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (CAMEL_REMOTE_STORE (service)->ostream)));
- status = krb_sendauth (0, fd, &ticket_st, "pop", h->h_name,
- krb_realmofhost (h->h_name), 0,
- &msg_data, &cred, schedule,
- NULL, NULL, "KPOPV0.1");
- camel_free_host (h);
- 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);
- switch (status) {
- case CAMEL_POP3_ERR:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to server: %s"),
- buf);
- g_free (buf);
- /* fall through */
- case CAMEL_POP3_FAIL:
- 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;
-#ifdef HAVE_KRB4
- gboolean kpop;
-#endif
-
- 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->authmech = "+KPOP";
- kpop = connect_to_server (service, NULL);
- service->url->authmech = 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, 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_get_password (
- camel_service_get_session (service),
- prompt, TRUE, service, "password", ex);
- g_free (prompt);
- if (!service->url->passwd)
- return FALSE;
- }
-
- if (!service->url->authmech || !strcmp (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;
-
- 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_forget_password (
- camel_service_get_session (service),
- service, "password", ex);
- g_free (service->url->passwd);
- service->url->passwd = NULL;
- }
-
- tryagain = pop3_try_authenticate (service, 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.) @ex will be set if the return value is
- * CAMEL_POP3_FAIL, but *NOT* if it is CAMEL_POP3_ERR.
- **/
-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;
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unexpected response from POP server: %s"),
- respbuf);
- }
-
- 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 38e6214c3b..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@ximian.com>
- *
- * Copyright (C) 2000 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_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 05b97bc495..0000000000
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ /dev/null
@@ -1,65 +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@ximian.com>
- *
- * Copyright (C) 2000 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 "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);
- sendmail_provider.url_hash = camel_url_hash;
- sendmail_provider.url_equal = 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 c65b8784c7..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@ximian.com>
- *
- * Copyright 2000 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 <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 1f05e7c6cc..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@ximian.com>
- *
- * Copyright 2000 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_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 fcc2b06f9d..0000000000
--- a/camel/providers/smtp/Makefile.am
+++ /dev/null
@@ -1,37 +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) \
- $(OPENSSL_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
-
-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 88b995222b..0000000000
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ /dev/null
@@ -1,67 +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 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 "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.authtypes = g_list_append(smtp_provider.authtypes, camel_sasl_authtype ("POPB4SMTP"));
- smtp_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal);
- smtp_provider.url_hash = camel_url_hash;
- smtp_provider.url_equal = 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 000cdfe7f4..0000000000
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ /dev/null
@@ -1,1138 +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@ximian.com>
- *
- * Copyright (C) 2000 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 <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-stripheader.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-operation.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
-#ifdef HAVE_OPENSSL
-#include "camel-tcp-stream-openssl.h"
-#endif
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-sasl.h"
-#include "string-utils.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;
-
-#if defined(HAVE_NSS) || defined(HAVE_OPENSSL)
- if (transport->use_ssl) {
- port = service->url->port ? service->url->port : 465;
-#ifdef HAVE_NSS
- /* use the preferred implementation - NSS */
- tcp_stream = camel_tcp_stream_ssl_new (service, service->url->host);
-#else
- tcp_stream = camel_tcp_stream_openssl_new (service, service->url->host);
-#endif /* HAVE_NSS */
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-#else
- tcp_stream = camel_tcp_stream_raw_new ();
-#endif /* HAVE_NSS || HAVE_OPENSSL */
-
- 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);
-
- /* We (probably) need to check popb4smtp before we connect ... */
- if (service->url->authmech && !strcmp (service->url->authmech, "POPB4SMTP")) {
- int truth;
- GByteArray *chal;
- CamelSasl *sasl;
-
- sasl = camel_sasl_new ("smtp", "POPB4SMTP", service);
- chal = camel_sasl_challenge (sasl, NULL, ex);
- truth = camel_sasl_authenticated (sasl);
- if (chal)
- g_byte_array_free (chal, TRUE);
- camel_object_unref (CAMEL_OBJECT (sasl));
-
- if (!truth)
- return FALSE;
-
- return connect_to_server (service, ex);
- }
-
- 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_forget_password (
- session, 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_get_password (
- session, 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;
- }
-
- camel_operation_start (NULL, _("Sending message"));
-
- /* 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."));
- camel_operation_end(NULL);
- return FALSE;
- }
-
- for (r = recipients; r; r = r->next) {
- recipient = (char *) r->data;
- if (!smtp_rcpt (smtp_transport, recipient, ex)) {
- g_free (recipient);
- camel_operation_end (NULL);
- 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)) {
- camel_operation_end (NULL);
- return FALSE;
- }
-
- /* reset the service for our next transfer session */
- smtp_rset (smtp_transport, ex);
-
- camel_operation_end (NULL);
-
- 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_length (CAMEL_ADDRESS (to));
- 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_length (CAMEL_ADDRESS (cc));
- 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_length (CAMEL_ADDRESS (bcc));
- 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;
-
- camel_operation_start_transient (NULL, _("SMTP Greeting"));
-
- /* 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));
- camel_operation_end (NULL);
- 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));
- camel_operation_end (NULL);
- return FALSE;
- }
-
- if (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);
-
- camel_operation_end (NULL);
-
- return TRUE;
-}
-
-static gboolean
-smtp_auth (CamelSmtpTransport *transport, const char *mech, CamelException *ex)
-{
- gchar *cmdbuf, *respbuf = NULL, *challenge;
- CamelSasl *sasl = NULL;
-
- camel_operation_start_transient (NULL, _("SMTP Authentication"));
-
- sasl = camel_sasl_new ("smtp", mech, CAMEL_SERVICE (transport));
- if (!sasl) {
- camel_operation_end (NULL);
- 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);
-
- respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- while (!camel_sasl_authenticated (sasl)) {
- if (!respbuf) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("AUTH request timed out: %s"),
- g_strerror (errno));
- goto lose;
- }
-
- /* the server challenge/response should follow a 334 code */
- if (strncmp (respbuf, "334", 3)) {
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("AUTH request failed."));
- goto lose;
- }
-
- /* eat whtspc */
- for (challenge = respbuf + 4; isspace (*challenge); challenge++);
-
- challenge = camel_sasl_challenge_base64 (sasl, challenge, ex);
- g_free (respbuf);
- if (challenge == NULL)
- 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;
- }
-
- camel_object_unref (CAMEL_OBJECT (sasl));
- camel_operation_end (NULL);
-
- 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"));
- }
-
- camel_object_unref (CAMEL_OBJECT (sasl));
- camel_operation_end (NULL);
-
- 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, *bccfilter;
-
- /* 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);
- bccfilter = camel_mime_filter_stripheader_new ("Bcc");
- filtered_stream = camel_stream_filter_new_with_stream (transport->ostream);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (bccfilter));
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlffilter));
- camel_object_unref (CAMEL_OBJECT (bccfilter));
- camel_object_unref (CAMEL_OBJECT (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 0b72a5ef25..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 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_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 25b492b747..0000000000
--- a/camel/string-utils.c
+++ /dev/null
@@ -1,233 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 "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;
-}
-
-char *
-strstrcase (const char *haystack, const char *needle)
-{
- /* find the needle in the haystack neglecting case */
- const char *ptr;
- guint len;
-
- g_return_val_if_fail (haystack != NULL, NULL);
- g_return_val_if_fail (needle != NULL, NULL);
-
- len = strlen (needle);
- if (len > strlen (haystack))
- return NULL;
-
- if (len == 0)
- return (char *) haystack;
-
- for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
- if (!g_strncasecmp (ptr, needle, len))
- return (char *) ptr;
-
- return NULL;
-}
diff --git a/camel/string-utils.h b/camel/string-utils.h
deleted file mode 100644
index a94aad56c8..0000000000
--- a/camel/string-utils.h
+++ /dev/null
@@ -1,70 +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@ximian.com>
- *
- * Copyright 1999, 2000 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 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);
-
-char *strstrcase (const char *haystack, const char *needle);
-
-#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 e32f2e455f..0000000000
--- a/camel/tests/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-
-SUBDIRS = lib \
- message folder stream smime misc mime-filter
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 26eaf2f7e1..0000000000
--- a/camel/tests/folder/.cvsignore
+++ /dev/null
@@ -1,21 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-temp-test
-*.bb
-*.bbg
-*.da
-*.gcov
-test1
-test2
-test3
-test4
-test5
-test6
-test7
-test8
-test9
diff --git a/camel/tests/folder/Makefile.am b/camel/tests/folder/Makefile.am
deleted file mode 100644
index 7ae6ef9a9d..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) $(MAILER_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 c1d3809852..0000000000
--- a/camel/tests/folder/test1.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* store testing */
-
-#include "camel-test.h"
-#include "folders.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-store.h>
-
-#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_test_session_new ("/tmp/camel-test");
-
- /* 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, FALSE);
-
- 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 50a89f89e8..0000000000
--- a/camel/tests/folder/test2.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* folder testing */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "camel-test.h"
-#include "messages.h"
-#include "folders.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.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]))
-
-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_test_session_new ("/tmp/camel-test");
-
- /* 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, FALSE);
- }
-
- /* create a pseudo-spool file, and check that */
- creat("/tmp/camel-test/testbox", 0600);
- test_folder_message_ops(session, "spool:///tmp/camel-test/testbox", FALSE, 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 dc2946956f..0000000000
--- a/camel/tests/folder/test3.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/* folder/index testing */
-
-#include <gtk/gtk.h>
-
-#include "camel-test.h"
-#include "messages.h"
-#include "folders.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.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]))
-
-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_test_session_new ("/tmp/camel-test");
-
- /* 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 eb0bd3420b..0000000000
--- a/camel/tests/folder/test4.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* store testing, for remote folders */
-
-#include "camel-test.h"
-#include "folders.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-store.h>
-
-#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_test_session_new ("/tmp/camel-test");
-
- /* 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, 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 ccdfb23b23..0000000000
--- a/camel/tests/folder/test5.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* store testing, for remote folders */
-
-#include "camel-test.h"
-#include "folders.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-store.h>
-
-#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_test_session_new ("/tmp/camel-test");
-
- /* 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, 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 215fa999bf..0000000000
--- a/camel/tests/folder/test6.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* folder testing */
-
-#include "camel-test.h"
-#include "messages.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.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]))
-
-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_test_session_new ("/tmp/camel-test");
-
- 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 2f08712e4c..0000000000
--- a/camel/tests/folder/test7.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* folder testing */
-
-#include "camel-test.h"
-#include "messages.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.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]))
-
-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_test_session_new ("/tmp/camel-test");
-
- 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 cf8a7ecc8a..0000000000
--- a/camel/tests/folder/test8.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/* threaded folder testing */
-
-#include "camel-test.h"
-#include "folders.h"
-#include "messages.h"
-#include "session.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.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>
-
-
-#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_test_session_new ("/tmp/camel-test");
-
- 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 974c2c7793..0000000000
--- a/camel/tests/folder/test9.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* folder/index testing */
-
-#include "camel-test.h"
-#include "messages.h"
-#include "folders.h"
-#include "session.h"
-
-#include "camel/camel-exception.h"
-#include "camel/camel-service.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]))
-
-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_test_session_new ("/tmp/camel-test");
-
- /* 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();
- camel_filter_driver_set_folder_func(driver, 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", NULL, 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();
- camel_filter_driver_set_folder_func(driver, 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", NULL, 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();
- camel_filter_driver_set_folder_func(driver, 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", NULL, 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 f3a92899b2..0000000000
--- a/camel/tests/lib/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-
-INCLUDES = -I$(includedir) -I$(top_srcdir) -I$(top_srcdir)/camel
-
-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 \
- session.c session.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", "Sprvce oken hbe s okrajem okna\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "ISO-8859-1", "Vindueshndtering flytter dekorationsvindue istedet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "ISO-8859-1", "Vorschaubilder der Fenster mit dem Bildschirminhalt ausfllen" },
- { "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 salvestusksule.\nKas peaks ta niisama sulgema, vi veel ootama?" },
- { "iso-8859-1", "Lehio kudeatzaileak lehioaren dekorazaioa mugiarazten\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-15", "Nyt sovellukset, joiden ikkunoista on nkyvill vain otsikkopalkki" },
- { "ISO-8859-1", "Afficher les tches qui ne sont pas dans la liste des fentres" },
- { "iso-8859-1", "Nl applet ag tabhair freagra ar iarratas sbhil.\nBain amach an applet n lean ar fnacht?" },
- { "iso-8859-1", "Amosa-las tarefas agochadas da lista de fiestras (SKIP-WINLIST)" },
- { "iso-8859-2", "Az ablakkezel a dekorcit 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 neatsakinja praym isisaugoti.\nPaalinti pried ar laukti toliau?" },
- { "iso-8859-1", "Window manager verplaatst dekoratie\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-1", "Vindushndtereren 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 responsvel por executar outras aplicaes, embeber pequenos applets, a paz no mundo e crashes aleatrios do X." },
- { "iso-8859-1", "Mostrar tarefas que se escondem da lista de janelas (SKIP-WINLIST)" },
- { "koi8-r", " " },
- { "iso-8859-2", "Sprvca okien presva okraje okien\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "iso-8859-2", "Kai 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", "Fnsterhanteraren flyttar dekorationsfnstret istllet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- /*{ "TSCII", "츼- ¡ 츼 (츼--Ţ)" },*/
- { "iso-8859-9", "Kaydetme isteine bir uygulak cevap vermiyor .\nUygula sileyim mi , yoksa bekleyeyim mi ?" },
- { "koi8-u", "ͦ æ ͦ צ\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "iso-8859-1", "Cwand on scriftr est bodj fo, li scriftr t totes\nles apliketes dvins sont pierdowes. Bodj ci scriftr 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 86d9a1f3ff..0000000000
--- a/camel/tests/lib/folders.c
+++ /dev/null
@@ -1,524 +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, int spool)
-{
- CamelStore *store;
- CamelException *ex = camel_exception_new();
- CamelFolder *folder;
- 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 inbox */
- push("getting inbox folder");
- folder = camel_store_get_inbox(store, ex);
- if (local) {
- check(camel_exception_is_set(ex));
- check(folder == NULL);
- camel_exception_clear(ex);
- } else {
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
- check_unref(folder, 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();
-
- if (!spool) {
- 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();
-
- if (!spool) {
- 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, int spool)
-{
- CamelStore *store;
- CamelException *ex = camel_exception_new();
- CamelFolder *folder;
- CamelMimeMessage *msg;
- int j;
- int indexed, max;
- GPtrArray *uids;
- CamelMessageInfo *info;
- char *mailbox;
-
- if (spool)
- mailbox = "INBOX";
- else
- mailbox = "testbox";
-
- 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, mailbox, 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, mailbox, ex);
- check(camel_exception_is_set(ex));
- camel_exception_clear(ex);
- pull();
-
- push("re-opening folder");
- folder = camel_store_get_folder(store, mailbox, 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 */
-
- if (!spool) {
- push("deleting test folder, with no messages in it");
- camel_store_delete_folder(store, mailbox, 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 d3c9686dc2..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, int spool);
-/* test basic message operations on a folder */
-void test_folder_message_ops(CamelSession *session, const char *storename, int local, int spool);
diff --git a/camel/tests/lib/messages.c b/camel/tests/lib/messages.c
deleted file mode 100644
index 21d77582ad..0000000000
--- a/camel/tests/lib/messages.c
+++ /dev/null
@@ -1,154 +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);
- camel_object_unref((CamelObject *)file);
-
- 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/session.c b/camel/tests/lib/session.c
deleted file mode 100644
index 2ebf6e2d7f..0000000000
--- a/camel/tests/lib/session.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "session.h"
-
-static guint
-register_timeout (CamelSession *session, guint32 interval, CamelTimeoutCallback callback, gpointer user_data)
-{
- return 1;
-}
-
-static gboolean
-unregister_timeout (CamelSession *session, guint handle)
-{
- return TRUE;
-}
-
-
-static void
-class_init (CamelTestSessionClass *camel_test_session_class)
-{
- CamelSessionClass *camel_session_class =
- CAMEL_SESSION_CLASS (camel_test_session_class);
-
- /* virtual method override */
- camel_session_class->register_timeout = register_timeout;
- camel_session_class->remove_timeout = unregister_timeout;
-}
-
-CamelType
-camel_test_session_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_session_get_type (),
- "CamelTestSession",
- sizeof (CamelTestSession),
- sizeof (CamelTestSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-CamelSession *
-camel_test_session_new (const char *path)
-{
- CamelSession *session;
-
- session = CAMEL_SESSION (camel_object_new (CAMEL_TEST_SESSION_TYPE));
-
- camel_session_construct (session, path);
-
- return session;
-}
-
-
diff --git a/camel/tests/lib/session.h b/camel/tests/lib/session.h
deleted file mode 100644
index e69ef65e2e..0000000000
--- a/camel/tests/lib/session.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <camel/camel-session.h>
-
-#define CAMEL_TEST_SESSION_TYPE (camel_test_session_get_type ())
-#define CAMEL_TEST_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TEST_SESSION_TYPE, CamelTestSession))
-#define CAMEL_TEST_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TEST_SESSION_TYPE, CamelTestSessionClass))
-#define CAMEL_TEST_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_TEST_SESSION_TYPE))
-
-typedef struct _CamelTestSession {
- CamelSession parent_object;
-
-} CamelTestSession;
-
-typedef struct _CamelTestSessionClass {
- CamelSessionClass parent_class;
-
-} CamelTestSessionClass;
-
-CamelType camel_test_session_get_type (void);
-CamelSession *camel_test_session_new (const char *path);
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 2aa375d25e..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) $(MAILER_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 95b0e324aa..0000000000
--- a/camel/tests/message/test2.c
+++ /dev/null
@@ -1,326 +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 <iconv.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)
-{
- iconv_t ic = iconv_open(to, from);
- char *out, *outp;
- const char *inp;
- int inlen, outlen;
-
- if (ic == (iconv_t)-1)
- return g_strdup(in);
-
- inlen = strlen(in);
- outlen = inlen*5 + 16;
-
- outp = out = g_malloc(outlen);
- inp = in;
-
- if (iconv(ic, &inp, &inlen, &outp, &outlen) == -1) {
- test_free(out);
- iconv_close(ic);
- return g_strdup(in);
- }
-
- if (iconv(ic, NULL, 0, &outp, &outlen) == -1) {
- test_free(out);
- iconv_close(ic);
- return g_strdup(in);
- }
-
- iconv_close(ic);
-
- *outp = 0;
-
-#if 0
- /* lets see if we can convert back again? */
- {
- char *nout, *noutp;
- iconv_t ic = iconv_open(from, to);
-
- inp = out;
- inlen = strlen(out);
- outlen = inlen*5 + 16;
- noutp = nout = g_malloc(outlen);
- if (iconv(ic, &inp, &inlen, &noutp, &outlen) == -1
- || iconv(ic, NULL, 0, &noutp, &outlen) == -1) {
- g_warning("Cannot convert '%s' \n from %s to %s: %s\n", in, to, from, strerror(errno));
- }
- 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/mime-filter/.cvsignore b/camel/tests/mime-filter/.cvsignore
deleted file mode 100644
index c1f16ee7d4..0000000000
--- a/camel/tests/mime-filter/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-*.lo
-*.la
-test-stripheader
-test-crlf
diff --git a/camel/tests/mime-filter/Makefile.am b/camel/tests/mime-filter/Makefile.am
deleted file mode 100644
index 5d85ecd7df..0000000000
--- a/camel/tests/mime-filter/Makefile.am
+++ /dev/null
@@ -1,39 +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\" \
- -DSOURCEDIR=\"$(srcdir)\"
-
-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) $(MAILER_LIBS)
-
-EXTRA_DIST = \
- crlf-1.in \
- crlf-1.out \
- stripheader-1.in \
- stripheader-1.out \
- stripheader-2.in \
- stripheader-2.out \
- stripheader-3.in \
- stripheader-3.out \
- stripheader-4.in \
- stripheader-4.out \
- stripheader-5.in \
- stripheader-5.out \
- stripheader-6.in \
- stripheader-6.out
-
-check_PROGRAMS = \
- test-crlf \
- test-stripheader
-
-TESTS = test-crlf test-stripheader
-
-
-
diff --git a/camel/tests/mime-filter/crlf-1.in b/camel/tests/mime-filter/crlf-1.in
deleted file mode 100644
index d98703c725..0000000000
--- a/camel/tests/mime-filter/crlf-1.in
+++ /dev/null
@@ -1,19 +0,0 @@
-This is some text to filter and stuff. Hopefully that . will not become '..'
-when the filter is run on this text. It should, however, '..' the next line
-. The previous . should become .. in the output file, or so I hope...
-
-.
-..
-...
-....
-
-Once this text is decoded again, the above set of dots should look like:
-
- .
- ..
- ...
- ....
-
-Only it shouldn't be indented, obviously.
-
-Jeff \ No newline at end of file
diff --git a/camel/tests/mime-filter/crlf-1.out b/camel/tests/mime-filter/crlf-1.out
deleted file mode 100644
index c0b688f334..0000000000
--- a/camel/tests/mime-filter/crlf-1.out
+++ /dev/null
@@ -1,19 +0,0 @@
-This is some text to filter and stuff. Hopefully that . will not become '..'
-when the filter is run on this text. It should, however, '..' the next line
-.. The previous . should become .. in the output file, or so I hope...
-
-..
-...
-....
-.....
-
-Once this text is decoded again, the above set of dots should look like:
-
- .
- ..
- ...
- ....
-
-Only it shouldn't be indented, obviously.
-
-Jeff \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-1.in b/camel/tests/mime-filter/stripheader-1.in
deleted file mode 100644
index 1db4bf86e3..0000000000
--- a/camel/tests/mime-filter/stripheader-1.in
+++ /dev/null
@@ -1,6 +0,0 @@
-Subject: this is a simple test
-Stripped: of the header stripping filter
-CC: this header should be preserved
-BCC: as should this one
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-1.out b/camel/tests/mime-filter/stripheader-1.out
deleted file mode 100644
index 3101c1e6bd..0000000000
--- a/camel/tests/mime-filter/stripheader-1.out
+++ /dev/null
@@ -1,5 +0,0 @@
-Subject: this is a simple test
-CC: this header should be preserved
-BCC: as should this one
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-2.in b/camel/tests/mime-filter/stripheader-2.in
deleted file mode 100644
index 0a16133bc0..0000000000
--- a/camel/tests/mime-filter/stripheader-2.in
+++ /dev/null
@@ -1,8 +0,0 @@
-Subject: this is a simple test
-Stripped: of the header stripping filter
-CC: this header should be preserved
-Stripped: this header should also be stripped
-BCC: but not this one
-
-This is the body of the message.
-There are several lines to it. Oh boy oh boy. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-2.out b/camel/tests/mime-filter/stripheader-2.out
deleted file mode 100644
index 626dd9c170..0000000000
--- a/camel/tests/mime-filter/stripheader-2.out
+++ /dev/null
@@ -1,6 +0,0 @@
-Subject: this is a simple test
-CC: this header should be preserved
-BCC: but not this one
-
-This is the body of the message.
-There are several lines to it. Oh boy oh boy. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-3.in b/camel/tests/mime-filter/stripheader-3.in
deleted file mode 100644
index d7c348125b..0000000000
--- a/camel/tests/mime-filter/stripheader-3.in
+++ /dev/null
@@ -1,9 +0,0 @@
-Subject: this is a simple test with a different subject
-Stripped: of the header stripping filter
-Stripped: this header should also be stripped
-CC: this header should be preserved
-BCC: and so should this one
-
-This is the body of the message.
-There are several lines to it. Oh boy oh boy.
-Let's add lots of characters on this line just for fun because I love fun don't you who wouldn't love fun I sure do. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-3.out b/camel/tests/mime-filter/stripheader-3.out
deleted file mode 100644
index a6da94594e..0000000000
--- a/camel/tests/mime-filter/stripheader-3.out
+++ /dev/null
@@ -1,7 +0,0 @@
-Subject: this is a simple test with a different subject
-CC: this header should be preserved
-BCC: and so should this one
-
-This is the body of the message.
-There are several lines to it. Oh boy oh boy.
-Let's add lots of characters on this line just for fun because I love fun don't you who wouldn't love fun I sure do. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-4.in b/camel/tests/mime-filter/stripheader-4.in
deleted file mode 100644
index 5b0b12e080..0000000000
--- a/camel/tests/mime-filter/stripheader-4.in
+++ /dev/null
@@ -1,7 +0,0 @@
-Subject: this is a simple test
-Stripped: of the header stripping filter
- ooh look this header spans two lines.
-CC: this header should be preserved
-BCC: as should this one
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-4.out b/camel/tests/mime-filter/stripheader-4.out
deleted file mode 100644
index 3101c1e6bd..0000000000
--- a/camel/tests/mime-filter/stripheader-4.out
+++ /dev/null
@@ -1,5 +0,0 @@
-Subject: this is a simple test
-CC: this header should be preserved
-BCC: as should this one
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-5.in b/camel/tests/mime-filter/stripheader-5.in
deleted file mode 100644
index 99258daec6..0000000000
--- a/camel/tests/mime-filter/stripheader-5.in
+++ /dev/null
@@ -1,9 +0,0 @@
-Subject: this is a simple test
-Stripped: of the header stripping filter
- ooh look this header spans many
- lines look at all the freaking lines
- that this header spans. Wowwww.
-CC: this header should be preserved
-BCC: as should this one
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-5.out b/camel/tests/mime-filter/stripheader-5.out
deleted file mode 100644
index 3101c1e6bd..0000000000
--- a/camel/tests/mime-filter/stripheader-5.out
+++ /dev/null
@@ -1,5 +0,0 @@
-Subject: this is a simple test
-CC: this header should be preserved
-BCC: as should this one
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-6.in b/camel/tests/mime-filter/stripheader-6.in
deleted file mode 100644
index 8bf0e848d0..0000000000
--- a/camel/tests/mime-filter/stripheader-6.in
+++ /dev/null
@@ -1,15 +0,0 @@
-Subject: this is a simple test
-Stripped: of the header stripping filter
- ooh look this header spans many
- lines look at all the freaking lines
- that this header spans. Wowwww.
-Stripped: and then another one to strip that extends fairly far across the page
-Other: let's not use CC here.
-Stripped: oops, I stripped it again
-Stripped: then single line....
- followed by multi-line. Huzzah.
-NotBCC: definitely not BCC
- however this one is definitely continued
-Stripped: god-damn look at that stripping.
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/stripheader-6.out b/camel/tests/mime-filter/stripheader-6.out
deleted file mode 100644
index d8d4202ed0..0000000000
--- a/camel/tests/mime-filter/stripheader-6.out
+++ /dev/null
@@ -1,6 +0,0 @@
-Subject: this is a simple test
-Other: let's not use CC here.
-NotBCC: definitely not BCC
- however this one is definitely continued
-
-This is the body of the message. \ No newline at end of file
diff --git a/camel/tests/mime-filter/test-crlf.c b/camel/tests/mime-filter/test-crlf.c
deleted file mode 100644
index 2e8a4333fa..0000000000
--- a/camel/tests/mime-filter/test-crlf.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- test-crlf.c
-
- Test the CamelMimeFilterCrlf class
-*/
-
-#include <stdio.h>
-#include <string.h>
-
-#include "camel-test.h"
-
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter-crlf.h>
-
-#define d(x) x
-
-#define NUM_CASES 1
-#define CHUNK_SIZE 32
-
-enum {
- CRLF_ENCODE,
- CRLF_DECODE,
- CRLF_DONE
-};
-
-int
-main (int argc, char **argv)
-{
- CamelStream *source;
- CamelStream *correct;
- CamelStreamFilter *filter;
- CamelMimeFilter *sh;
- gchar *work;
- int i;
- ssize_t comp_progress, comp_correct_chunk, comp_filter_chunk;
- int comp_i;
- char comp_correct[CHUNK_SIZE], comp_filter[CHUNK_SIZE];
-
- camel_test_init(argc, argv);
-
- for (i = 0; i < NUM_CASES; i++) {
- int j;
-
- work = g_strdup_printf ("CRLF/DOT filter, test case %d", i);
- camel_test_start (work);
- g_free (work);
-
- for (j = CRLF_ENCODE; j < CRLF_DONE; j++) {
- CamelMimeFilterCRLFDirection direction;
- char *infile, *outfile;
-
- switch (j) {
- case CRLF_ENCODE:
- camel_test_push ("Test of the encoder");
- direction = CAMEL_MIME_FILTER_CRLF_ENCODE;
- infile = g_strdup_printf ("%s/crlf-%d.in", SOURCEDIR, i + 1);
- outfile = g_strdup_printf ("%s/crlf-%d.out", SOURCEDIR, i + 1);
- break;
- case CRLF_DECODE:
- camel_test_push ("Test of the decoder");
- direction = CAMEL_MIME_FILTER_CRLF_DECODE;
- infile = g_strdup_printf ("%s/crlf-%d.out", SOURCEDIR, i + 1);
- outfile = g_strdup_printf ("%s/crlf-%d.in", SOURCEDIR, i + 1);
- break;
- default:
- break;
- }
-
- camel_test_push ("Initializing objects");
- source = camel_stream_fs_new_with_name (infile, 0, O_RDONLY);
- if (!source) {
- camel_test_fail ("Failed to open input case in \"%s\"", infile);
- g_free (infile);
- continue;
- }
- g_free (infile);
-
- correct = camel_stream_fs_new_with_name (outfile, 0, O_RDONLY);
- if (!correct) {
- camel_test_fail ("Failed to open correct output in \"%s\"", outfile);
- g_free (outfile);
- continue;
- }
- g_free (outfile);
-
- filter = camel_stream_filter_new_with_stream (CAMEL_STREAM (source));
- if (!filter) {
- camel_test_fail ("Couldn't create CamelStreamFilter??");
- continue;
- }
-
- sh = camel_mime_filter_crlf_new (direction, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
- if (!sh) {
- camel_test_fail ("Couldn't create CamelMimeFilterCrlf??");
- continue;
- }
-
- camel_stream_filter_add (filter, sh);
- camel_test_pull ();
-
- camel_test_push ("Running filter and comparing to correct result");
-
- comp_progress = 0;
-
- while (1) {
- comp_correct_chunk = camel_stream_read (correct, comp_correct, CHUNK_SIZE);
- comp_filter_chunk = 0;
-
- if (comp_correct_chunk == 0)
- break;
-
- while (comp_filter_chunk < comp_correct_chunk) {
- ssize_t delta;
-
- delta = camel_stream_read (CAMEL_STREAM (filter),
- comp_filter + comp_filter_chunk,
- CHUNK_SIZE - comp_filter_chunk);
-
- if (delta == 0) {
- camel_test_fail ("Chunks are different sizes: correct is %d, "
- "filter is %d, %d bytes into stream",
- comp_correct_chunk, comp_filter_chunk, comp_progress);
- }
-
- comp_filter_chunk += delta;
- }
-
- d(printf ("\n\nCORRECT: >>%.*s<<", comp_correct_chunk, comp_correct));
- d(printf ("\nFILTER : >>%.*s<<\n", comp_filter_chunk, comp_filter));
-
- for (comp_i = 0; comp_i < comp_filter_chunk; comp_i++) {
- if (comp_correct[comp_i] != comp_filter[comp_i]) {
- camel_test_fail ("Difference: correct is %c, filter is %c, "
- "%d bytes into stream",
- comp_correct[comp_i],
- comp_filter[comp_i],
- comp_progress + comp_i);
- }
- }
-
- comp_progress += comp_filter_chunk;
- }
-
- camel_test_pull ();
-
- /* inefficient */
- camel_test_push ("Cleaning up");
- camel_object_unref (CAMEL_OBJECT (filter));
- camel_object_unref (CAMEL_OBJECT (correct));
- camel_object_unref (CAMEL_OBJECT (source));
- camel_object_unref (CAMEL_OBJECT (sh));
- camel_test_pull ();
-
- camel_test_pull ();
- }
-
- camel_test_end ();
- }
-
- return 0;
-}
diff --git a/camel/tests/mime-filter/test-stripheader.c b/camel/tests/mime-filter/test-stripheader.c
deleted file mode 100644
index ff5446635b..0000000000
--- a/camel/tests/mime-filter/test-stripheader.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- test-stripheader.c
-
- Test the CamelMimeFilterStripHeader class
-*/
-
-#include <stdio.h>
-#include <string.h>
-
-#include "camel-test.h"
-
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-mime-filter-stripheader.h>
-
-#define d(x) x
-
-#define NUM_CASES 6
-#define CHUNK_SIZE 32
-
-int
-main(int argc, char **argv)
-{
- CamelStream *source;
- CamelStream *correct;
- CamelStreamFilter *filter;
- CamelMimeFilter *sh;
- gchar *work;
- int i;
- ssize_t comp_progress, comp_correct_chunk, comp_filter_chunk;
- int comp_i;
- char comp_correct[CHUNK_SIZE], comp_filter[CHUNK_SIZE];
-
- camel_test_init(argc, argv);
-
- for (i = 0; i < NUM_CASES; i++) {
- work = g_strdup_printf ("Header stripping filter, test case %d", i);
- camel_test_start (work);
- g_free (work);
-
- camel_test_push ("Initializing objects");
- work = g_strdup_printf ("%s/stripheader-%d.in", SOURCEDIR, i + 1);
- source = camel_stream_fs_new_with_name (work, 0, O_RDONLY);
- if (!source) {
- camel_test_fail ("Failed to open input case in \"%s\"", work);
- g_free (work);
- continue;
- }
- g_free (work);
-
- work = g_strdup_printf ("%s/stripheader-%d.out", SOURCEDIR, i + 1);
- correct = camel_stream_fs_new_with_name (work, 0, O_RDONLY);
- if (!correct) {
- camel_test_fail ("Failed to open correct output in \"%s\"", work);
- g_free (work);
- continue;
- }
- g_free (work);
-
- filter = camel_stream_filter_new_with_stream (CAMEL_STREAM (source));
- if (!filter) {
- camel_test_fail ("Couldn't create CamelStreamFilter??");
- continue;
- }
-
- sh = camel_mime_filter_stripheader_new ("Stripped");
- if (!sh) {
- camel_test_fail ("Couldn't create CamelMimeFilterStripHeader??");
- continue;
- }
-
- camel_stream_filter_add (filter, sh);
- camel_test_pull ();
-
- camel_test_push ("Running filter and comparing to correct result");
-
- comp_progress = 0;
-
- while (1) {
- comp_correct_chunk = camel_stream_read (correct, comp_correct, CHUNK_SIZE);
- comp_filter_chunk = 0;
-
- if (comp_correct_chunk == 0)
- break;
-
- while (comp_filter_chunk < comp_correct_chunk) {
- ssize_t delta;
-
- delta = camel_stream_read (CAMEL_STREAM (filter),
- comp_filter + comp_filter_chunk,
- CHUNK_SIZE - comp_filter_chunk);
-
- if (delta == 0) {
- camel_test_fail ("Chunks are different sizes: correct is %d, filter is %d, %d bytes into stream",
- comp_correct_chunk, comp_filter_chunk, comp_progress);
- }
-
- comp_filter_chunk += delta;
- }
-
- d(printf ("\n\nCORRECT: >>%.*s<<", comp_correct_chunk, comp_correct);)
- d(printf ("\nFILTER : >>%.*s<<\n", comp_filter_chunk, comp_filter);)
-
- for (comp_i = 0; comp_i < comp_filter_chunk; comp_i++) {
- if (comp_correct[comp_i] != comp_filter[comp_i]) {
- camel_test_fail ("Difference: correct is %c, filter is %c, %d bytes into stream",
- comp_correct[comp_i],
- comp_filter[comp_i],
- comp_progress + comp_i);
- }
- }
-
- comp_progress += comp_filter_chunk;
- }
-
- camel_test_pull ();
-
- /* inefficient */
- camel_test_push ("Cleaning up");
- camel_object_unref (CAMEL_OBJECT (filter));
- camel_object_unref (CAMEL_OBJECT (correct));
- camel_object_unref (CAMEL_OBJECT (source));
- camel_object_unref (CAMEL_OBJECT (sh));
- camel_test_pull ();
-
- camel_test_end();
- }
-
- return 0;
-}
diff --git a/camel/tests/misc/.cvsignore b/camel/tests/misc/.cvsignore
deleted file mode 100644
index 7ef94ab5fa..0000000000
--- a/camel/tests/misc/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
-url \ No newline at end of file
diff --git a/camel/tests/misc/Makefile.am b/camel/tests/misc/Makefile.am
deleted file mode 100644
index 1ebda3da9c..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) $(MAILER_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 adc6278bae..0000000000
--- a/camel/tests/misc/url.c
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <config.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <camel/camel-url.h>
-#include <camel/camel-exception.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;
- CamelException ex;
- char *url_string;
- int i;
-
- camel_test_init (argc, argv);
-
- camel_test_start ("RFC1808 relative URL parsing");
-
- camel_test_push ("base URL parsing");
- camel_exception_init (&ex);
- base_url = camel_url_new (base, &ex);
- if (!base_url) {
- camel_test_fail ("Could not parse %s: %s\n", base,
- camel_exception_get_description (&ex));
- }
- 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 0eafc46e36..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) $(MAILER_LIBS)
-
-check_PROGRAMS = \
- pgp \
- pgp-mime
-# pkcs7
-
-TESTS = pgp pgp-mime #pkcs7
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 d2e243e084..0000000000
--- a/camel/tests/smime/pgp-mime.c
+++ /dev/null
@@ -1,170 +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"
-#include "session.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: Draen Kaar\n\nOkay, I guess that covers"
-"the basics at least...\n";
-
-
-#define CAMEL_PGP_SESSION_TYPE (camel_pgp_session_get_type ())
-#define CAMEL_PGP_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_PGP_SESSION_TYPE, CamelPgpSession))
-#define CAMEL_PGP_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_PGP_SESSION_TYPE, CamelPgpSessionClass))
-#define CAMEL_PGP_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_PGP_SESSION_TYPE))
-
-
-typedef struct _CamelPgpSession {
- CamelSession parent_object;
-
-} CamelPgpSession;
-
-typedef struct _CamelPgpSessionClass {
- CamelSessionClass parent_class;
-
-} CamelPgpSessionClass;
-
-
-static char *get_password (CamelSession *session, const char *prompt,
- gboolean secret, CamelService *service,
- const char *item, CamelException *ex);
-
-static void
-init (CamelPgpSession *session)
-{
- ;
-}
-
-static void
-class_init (CamelPgpSessionClass *camel_pgp_session_class)
-{
- CamelSessionClass *camel_session_class =
- CAMEL_SESSION_CLASS (camel_pgp_session_class);
-
- /* virtual method override */
- camel_session_class->get_password = get_password;
-}
-
-static CamelType
-camel_pgp_session_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_test_session_get_type (),
- "CamelPgpSession",
- sizeof (CamelPgpSession),
- sizeof (CamelPgpSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) init,
- NULL);
- }
-
- return type;
-}
-
-static char *
-get_password (CamelSession *session, const char *prompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- return g_strdup ("PGP/MIME is rfc2015, now go and read it.");
-}
-
-static CamelSession *
-camel_pgp_session_new (const char *path)
-{
- CamelSession *session;
-
- session = CAMEL_SESSION (camel_object_new (CAMEL_PGP_SESSION_TYPE));
-
- camel_session_construct (session, path);
-
- return session;
-}
-
-
-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_pgp_session_new ("/tmp/camel-test");
-
- ctx = camel_pgp_context_new (session, CAMEL_PGP_TYPE_GPG, "/usr/bin/gpg", FALSE);
-
- 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 2d5ff7228c..0000000000
--- a/camel/tests/smime/pgp.c
+++ /dev/null
@@ -1,178 +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"
-#include "session.h"
-
-#define CAMEL_PGP_SESSION_TYPE (camel_pgp_session_get_type ())
-#define CAMEL_PGP_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_PGP_SESSION_TYPE, CamelPgpSession))
-#define CAMEL_PGP_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_PGP_SESSION_TYPE, CamelPgpSessionClass))
-#define CAMEL_PGP_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_PGP_SESSION_TYPE))
-
-
-typedef struct _CamelPgpSession {
- CamelSession parent_object;
-
-} CamelPgpSession;
-
-typedef struct _CamelPgpSessionClass {
- CamelSessionClass parent_class;
-
-} CamelPgpSessionClass;
-
-
-static char *get_password (CamelSession *session, const char *prompt,
- gboolean secret, CamelService *service,
- const char *item, CamelException *ex);
-
-static void
-init (CamelPgpSession *session)
-{
- ;
-}
-
-static void
-class_init (CamelPgpSessionClass *camel_pgp_session_class)
-{
- CamelSessionClass *camel_session_class =
- CAMEL_SESSION_CLASS (camel_pgp_session_class);
-
- /* virtual method override */
- camel_session_class->get_password = get_password;
-}
-
-static CamelType
-camel_pgp_session_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_test_session_get_type (),
- "CamelPgpSession",
- sizeof (CamelPgpSession),
- sizeof (CamelPgpSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) init,
- NULL);
- }
-
- return type;
-}
-
-static char *
-get_password (CamelSession *session, const char *prompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- return g_strdup ("PGP/MIME is rfc2015, now go and read it.");
-}
-
-static CamelSession *
-camel_pgp_session_new (const char *path)
-{
- CamelSession *session;
-
- session = CAMEL_SESSION (camel_object_new (CAMEL_PGP_SESSION_TYPE));
-
- camel_session_construct (session, path);
-
- return session;
-}
-
-
-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_pgp_session_new ("/tmp/camel-test");
-
- ctx = camel_pgp_context_new (session, CAMEL_PGP_TYPE_GPG, "/usr/bin/gpg", FALSE);
-
- camel_test_start ("Test of PGP functions");
-
- stream1 = camel_stream_mem_new ();
- camel_stream_write (stream1, "Hello, I am a test stream.\n", 27);
- 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/smime/pkcs7.c b/camel/tests/smime/pkcs7.c
deleted file mode 100644
index 2248d8656d..0000000000
--- a/camel/tests/smime/pkcs7.c
+++ /dev/null
@@ -1,178 +0,0 @@
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <camel/camel-smime-context.h>
-#include <camel/camel-stream-mem.h>
-
-#include "camel-test.h"
-
-
-#define CAMEL_TEST_SESSION_TYPE (camel_test_session_get_type ())
-#define CAMEL_TEST_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TEST_SESSION_TYPE, CamelTestSession))
-#define CAMEL_TEST_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TEST_SESSION_TYPE, CamelTestSessionClass))
-#define CAMEL_TEST_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_TEST_SESSION_TYPE))
-
-
-typedef struct _CamelTestSession {
- CamelSession parent_object;
-
-} CamelTestSession;
-
-typedef struct _CamelTestSessionClass {
- CamelSessionClass parent_class;
-
-} CamelTestSessionClass;
-
-
-static char *get_password (CamelSession *session, const char *prompt,
- gboolean secret, CamelService *service,
- const char *item, CamelException *ex);
-
-static void
-init (CamelTestSession *session)
-{
- ;
-}
-
-static void
-class_init (CamelTestSessionClass *camel_test_session_class)
-{
- CamelSessionClass *camel_session_class =
- CAMEL_SESSION_CLASS (camel_test_session_class);
-
- /* virtual method override */
- camel_session_class->get_password = get_password;
-}
-
-static CamelType
-camel_test_session_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (
- camel_test_session_get_type (),
- "CamelTestSession",
- sizeof (CamelTestSession),
- sizeof (CamelTestSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) init,
- NULL);
- }
-
- return type;
-}
-
-static char *
-get_password (CamelSession *session, const char *prompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- return g_strdup ("S/MIME v3 is rfc263x, now go and read them.");
-}
-
-static CamelSession *
-camel_test_session_new (const char *path)
-{
- CamelSession *session;
-
- session = CAMEL_SESSION (camel_object_new (CAMEL_TEST_SESSION_TYPE));
-
- camel_session_construct (session, path);
-
- return session;
-}
-
-
-int main (int argc, char **argv)
-{
- CamelSession *session;
- CamelSMimeContext *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_test_session_new ("/tmp/camel-test");
-
- ctx = camel_smime_context_new (session);
-
- camel_test_start ("Test of S/MIME PKCS7 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 ("PKCS7 signing");
- camel_smime_sign (ctx, "smime@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 ("PKCS7 verify");
- camel_stream_reset (stream1);
- camel_stream_reset (stream2);
- valid = camel_smime_verify (ctx, CAMEL_CIPHER_HASH_SHA1, 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 ("PKCS7 encrypt");
- recipients = g_ptr_array_new ();
- g_ptr_array_add (recipients, "smime@xtorshun.org");
- camel_smime_encrypt (ctx, FALSE, "smime@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 ("PKCS7 decrypt");
- camel_smime_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 36f9336c1d..0000000000
--- a/camel/tests/stream/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
-test1
-test2
-test3
diff --git a/camel/tests/stream/Makefile.am b/camel/tests/stream/Makefile.am
deleted file mode 100644
index 1471ca82a5..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) $(MAILER_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/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 925b4b6898..0000000000
--- a/composer/ChangeLog
+++ /dev/null
@@ -1,2296 +0,0 @@
-2001-10-02 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (setup_ui): Use
- `bonobo_ui_component_new_default()', not
- `bonobo_ui_component_new()'.
-
-2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Don't set Content-Ids on these parts since they are not contained
- within a multipart/related - this fixes bug #10032.
-
-2001-09-26 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_from_url): Fixes glitch in
- mailto: url parsing that caused it to fail when recipient names
- contained commas. (Bug #10796)
-
-2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save_draft): Update to reflect changes to
- mail_get_folder.
-
-2001-09-20 Iain Holmes <iain@ximian.com>
-
- * e-msg-composer.c (get_file_content): Open the file with O_CREAT so
- that if it doesn't exist, it's created. Never return a NULL as this
- could potentially crash on Solaris.
-
-2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Attach an X-Evolution-Format
- header so if people re-edit a message in say their Sent folder, we
- will preserve format preferences.
- (e_msg_composer_get_message_draft): Don't attach
- X-Evolution-Format headers here since it is now done in
- build_message().
- (e_msg_composer_new_with_message): Make sure to remove *all*
- X-Evolution headers by using the mail-tools functions.
-
-2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (update): Don't
- gtk_object_destroy() the pixbuf loader, unref it instead.
-
- * e-msg-composer-hdrs.c (destroy): Don't forget to free the
- private structure.
-
-2001-09-14 Ettore Perazzoli <ettore@ximian.com>
-
- [Automake 1.5 fixes pointed out by Richard Boulton
- <richard@tartarus.org>, as per #9258.]
-
- * Makefile.am (CLEANFILES): Set directly with `=' instead of `+='.
-
-2001-09-13 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (map_default_cb): free the text values we get
- from the property bag and release the property bag properly.
-
-2001-09-12 JP Rosevear <jpr@ximian.com>
-
- * evolution-composer.c (corba_recipientlist_to_destv): null
- terminate the destination vector
-
-2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-composer.c (init): Don't call new_with_sig_file, it no
- longer exists.
-
- * e-msg-composer.c (setup_ui): Make sure that the session is
- non-NULL.
- (menu_file_send_cb): And here too.
- (e_msg_composer_new_with_sig_file): Removed.
-
-2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Wrap the S/MIME code in ifdef
- SMIME_SUPPORTED which isn't defined but by some later version will
- be.
- (setup_ui): And again here.
-
-2001-09-09 Maciej Stachowiak <mjs@noisehavoc.org>
-
- * Makefile.am: Add VFS_CFLAGS so things don't break when the
- gnome-vfs headers move.
-
-2001-09-08 Jon Trowbridge <trow@ximian.com>
-
- * evolution-composer.c (corba_recipientlist_to_destv): Originally
- was corba_recipientlist_to_glist.
- (impl_Composer_set_headers): Use corba_recipientlist_to_destv, new
- destination-based api.
-
- * e-msg-composer.c (build_message): Get rid of that 'sending'
- stuff. That was a bad idea.
- (e_msg_composer_new_with_message): Apply the revised api and work
- with vectors of destinations rather than just lists.
- (e_msg_composer_get_recipients): Added. Returns the full set of
- recipient destinations in a vector.
-
- * e-msg-composer-hdrs.c: Removed free_destv function. We use
- e_destination_freev instead.
- (e_msg_composer_hdrs_get_to): Changed to return a vector of
- EDestinations. This function now works.
- (e_msg_composer_hdrs_get_cc): Ditto.
- (e_msg_composer_hdrs_get_bcc): Ditto.
- (e_msg_composer_hdrs_get_recipients): Added. Returns a vector of
- EDestinations that is the union of the to, cc and bcc lines.
- (e_msg_composer_hdrs_set_to): Changed to take a vector of
- EDestinations, rather than a GList.
- (e_msg_composer_hdrs_set_cc): Ditto.
- (e_msg_composer_hdrs_set_bcc): Ditto.
- (e_msg_composer_hdrs_to_message): Use our new, improved API, rather
- than a bunch of poking around in BonoboPropertyBags, etc.
-
-2001-09-07 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients_from_destv): Remove some
- debugging messages that don't check for NULL strings and crash
- Solaris.
-
-2001-09-06 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (save): Have to specify a mode when using
- O_CREAT.
- (handle_multipart_alternative, handle_multipart,
- e_msg_composer_new_with_message): Update for mail_get_message_body
- change.
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans):
- s/Evolution/Ximian Evolution/.
- (do_exit): Set the title to be "Warning: Modified Message".
-
-2001-08-29 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_get_message_draft): Pass
- in FALSE as the 'sending' arg to e_msg_composer_get_message.
- (build_message): Added a 'sending' arg, which is passed to
- e_msg_composer_get_message.
- (e_msg_composer_get_message): Added a 'sending' arg,
- which gets passed directly on to build_message.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message): Added
- a "sending" arg, which should be TRUE if the message is being
- sent now (rather than being autosaved, etc.). The address
- use scores are only updated when sending. (Bug #8332)
- Removed obsolete (#if 0/#endif-ed) code.
-
-2001-08-22 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients_from_destv): Added. Try
- to properly handle contact lists in which the addresses of the
- list members should be hidden.
- (e_msg_composer_hdrs_to_message): Changed to extract the
- destination data from the entries and pass it along to
- set_recipients_from_destv.
-
-2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save): When reporting an error, use
- my_file_name instead of file_name since file_name can be NULL.
-
-2001-08-21 Ettore Perazzoli <ettore@ximian.com>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans):
- s/attempt recovery/try to recover them/.
-
-2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save_draft): Reset the "changed" state to
- FALSE after a successful save.
-
-2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (show_attachments): Toggle the
- View->Attachments menu item. This fixes bug #6107.
-
-2001-07-12 Peter Williams <peterw@ximian.com>
-
- * e-msg-composer.c (map_default_cb): New function. Figure out
- which widget gets the default and assign it. Harder to do than
- it sounds.
- (e_msg_composer_construct): Hook map_default_cb up to the "map"
- signal.
- (set_focus_to_editor): Removed.
- (set_focus_to_editor_idle): Removed.
-
-2001-08-10 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients): Removed comment about
- the need to resolve nicknames properly, because we now do that.
-
-2001-08-09 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (set_focus_to_editor): new helper function,
- just setup idle callback to grab focus
- (set_focus_to_editor_idle): grab focus for editor, before we have
- better solution, it run grab-focus command on editor control
- (e_msg_composer_construct): call prepare_engine here, set focus to
- editor
-
-2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): Don't
- forget to closedir() when we finish with dir.
-
-2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (from_changed_cb): Set the smime/pgp
- always-sign options when here so it updates when the user changes
- his/her identity.
-
-2001-08-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_get_message_draft): Set the
- PGP/MIME and S/MIME options to FALSE before getting the message
- draft and restore the values afterward.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (add_inlined_image): Use g_basename().
- (setup_ui): Get the default charset from the mail config db.
-
-2001-08-06 Radek Doulik <rodo@ximian.com>
-
- * listener.c (impl_event): handle delete event
-
-2001-07-31 Peter Williams <peterw@ximian.com>
-
- * e-msg-composer.c (setup_ui): Set the config path for the composer so
- that the customize toolbar command works.
-
-2001-07-31 Jason Leach <jleach@ximian.com>
-
- * e-msg-composer.c: Use Tuomas' and Jakub's new (and beautiful)
- icons for Send and Send Later in the toolbar and menus.
-
-2001-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (message_rfc822_dnd): Properly add the
- message/rfc822 part.
-
-2001-07-27 Jason Leach <jleach@ximian.com>
-
- * e-msg-composer.c (get_signature_html): "-- \n" is 4 chars long,
- so when checking if it's already in the sig, strncmp should check
- 4 chars, not 3.
-
-2001-07-26 Peter Williams <peterw@ximian.com>
-
- * e-msg-composer.c (get_signature_html): Correct our manually inserted
- signature dash thingie (it was missing the space).
-
-2001-07-26 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients): Get "destinations",
- rather than "text" from the entry_widget. (The getters/setters in
- the control have been made more symmetric.)
-
-2001-07-18 Jason Leach <jleach@ximian.com>
-
- * e-msg-composer-hdrs.c (create_from_optionmenu): Update to the
- new way of finding the default account.
-
-2001-07-18 Iain Holmes <iain@ximian.com>
-
- * e-msg-composer.c (do_exit): Use a messagebox.
-
-2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (drag_data_received): Correctly handle
- text/uri-list's that contain more than a single file reference.
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (menu_changed_charset_cb): Removed a warning
- that I don't need anymore. This code is working wonderfully ;-)
-
-2001-07-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-msg-composer.c: Fix typo. s/sesiion/session/
-
-2001-07-09 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): Only ask
- once about recovery, assume if they want to recover one file they
- want to recover all of them.
-
-2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Use
- camel_internet_address_format_address rather than
- camel_address_encode since we want display-friendly addresses.
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-msg-composer-select-file.c (file_selection_info_destroy_notify):
- Unref the file selection dialog when the data is destroyed.
-
-2001-07-09 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (composer_shutdown): Do the
- autosave_manager_unregister at shutdown time instead of destroy
- time (by which point the contents of the window, including the
- remote editor control, will have already been destroyed).
-
-2001-07-09 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-msg-composer-select-file.c: Added missing #include <config.h> to
- make translations working.
-
-2001-07-07 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients): Make sure that our
- destination string (dest_str) is not the empty string before we
- try to use it.
-
-2001-07-06 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (autosave_manager_new): add missing static.
- (best_encoding): make sure we don't try to call iconv_open with a
- NULL tocode.
- (autosave_manager_query_load_orphans): remove zero length orphans
- so that they don't clutter things up.
-
-2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Convert the filename string to UTF8 before setting it on the
- CamelMimePart because that code expects it to be in UTF8.
-
-2001-07-06 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (autosave_manager_query_load_orphans): only ask
- if there are actually contents in the file. Asking about an
- emptry fil is not very useful.
- (autosave_load_draft): add some sanity chacks.
- (autosave_run_foreach_cb): remove debugging warning.
- (autosave_manager_new): add a missing static.
-
-2001-07-06 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (autosave_manager_unregister): make sure we
- only remove the file if we think we saved it properly.
- (autosave_manager_stop): make sure we set the timeout back to 0 so
- that we will restart next time since we stop the timer when there
- are no active composers.
- (destroy): move this to the beginning of the destroy process.
- (autosave_save_draft): add a return value indicating success.
- (autosave_manager_register): go ahead and ask next time.
-
-2001-07-05 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c: add ask argment.
- (autosave_manager_query_load_orphans): move the load loop out of
- the dir reading loop.
- (autosave_manager_new): move initialization out or register.
- (autosave_manager_register): protect against recursion with ask.
- (init): call new, this still needs to be moved.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save): Play the "File exists, overwrite?"
- game.
- (autosave_run_foreach_cb): Change the return val from a gboolean
- to void.
-
-2001-07-04 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (autosave_load_draft): attach send and postpone
- handlers. and be more tolerant of errors.
-
-2001-07-03 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (autosave_save_draft): make sure we seek to the
- begining.
-
- * e-msg-composer.h: remove the timer id.
-
- * e-msg-composer.c: use autosave manager.
- (autosave_save_draft): moved initialization to
- autosave_init_file. Only save the buffer if we get a valid
- message.
- (autosave_load_draft): unlink the old file, we own it now. and
- unref the stream when we are done with it.
- (autosave_is_owned): check if we own the file, this needs to be
- extended to check for other valid processes.
- (autosave_query_load_orphans): make this search through the
- managers list as it walks the dir.
- (autosave_query_load_orphans): make sure we use the full path.
- (autosave_run_foreach_cb): timeout foreach handler.
- (autosave_run): the timeout function.
- (autosave_start): start timer.
- (autosave_stop): stop timer.
- (autosave_register): register a composer with the autosave manager.
- (autosave_unregister): unregister a composer.
- (destroy): unregister the composer, everything is okay.
- (init): register the composer.
-
-2001-07-02 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.h: add autosave members.
-
- * e-msg-composer.c (autosave_query_load_orphans): query the user to
- check if they want to load any orphans we've found.
- (autosave_query_cb): the dialog callback.
- (autosave_is_orphan): test if if a particular file is orphaned.
- (autosave_load_draft): load a message from an autosave file.
- (autosave_save_draft): save the current buffer to the autosave file.
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (INCLUDES): Added $(BONOBO_CONF_CFLAGS).
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): Set the
- user-chosen charset.
-
- * e-msg-composer.c (menu_change_charset_cb): New callback function
- to get the user-set charset.
- (init): Set the charset to NULL.
- (best_charset): Take a default_charset param that holds the value
- the user set for this particular message using the menu.
- (destroy): Free the charset.
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (setup_ui): Construct an e-charset-picker
- bonobo-ui menu.
- (menu_change_charset_cb):
-
-2001-06-30 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients): Touch all of our
- EDestinations before we unref them, updating the last-use records
- in the addressbook.
-
-2001-06-29 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_show_sig_file): remove now
- invalid argument in the documentation.
-
-2001-06-28 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c: removed obsolete e_msg_composer_get_sig_file
-
- * e-msg-composer.h: removed sig_file field from EMsgComposer
-
- * e-msg-composer.c (e_msg_composer_get_sig_file_content): exported
- (get_file_content): make it const safe
- (e_msg_composer_get_sig_file_content): refactored, don't try to be
- clever about signature filename, as it's exact now
- (get_signature_html): use has_html_signature flag
- (e_msg_composer_show_sig_file): renamed from
- e_msg_composer_set_sig_file, removed sig_file parameter as it's
- obsolete now
- (e_msg_composer_new_with_sig_file): removed obsolete parameters
-
-2001-06-27 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (menu_file_insert_file_cb): make hook this up.
- (get_sig_file_content): use get_file_content.
- (get_file_content): make this usable for both insertion and
- signatures.
- (read_file_content): added helper function to read file.
-
-2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c: Added a pixcache array for special pixmaps to
- use in the composer.
- (setup_ui): Set the pixcache.
-
-2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (menu_file_send_cb): Emit the POSTPONE signal
- if we are offline.
- (setup_ui): If we are offline, change the Control+Enter accel to
- be on the SendLater menu item.
-
-2001-06-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (save_draft): Save the formatting preference
- for this message draft using a X-Evolution-Format header.
- (e_msg_composer_new_with_message): Restore the format editing
- preference and also remove any other X-Evolution-* headers that we
- may have set.
-
-2001-06-20 Dave Camp <dave@ximian.com>
-
- * Evolution-Composer.idl: Changed attachData to accept a sequence of
- chars rather than a string.
-
- * evolution-composer.c (impl_Composer_attach_data): Changed the 'data'
- argument to a GNOME_Evolution_Composer_AttachmentData, and pass
- data->_buffer and data->_length to camel_mime_part_set_content().
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * evolution-composer.c (impl_Composer_send): send the message
-
- * Evolution-Composer.idl: add a "send" method to send a message
- without showing the editor
-
-2001-06-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_construct): Don't define the
- drop_types here.
- (drag_data_received): Implement message/rfc822 dnd drop type
- handling.
-
-2001-06-12 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-attachment.glade: Replace the disposition option
- menu with a checkbox.
-
- * e-msg-composer-select-file.c
- (e_msg_composer_select_file_attachment): New function to select a
- file to attach. Adds a "suggest inline disposition" checkbox.
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new): Add
- a disposition argument rather than always defaulting to
- "attachment".
- (struct _DialogData, ok_cb, e_msg_composer_attachment_edit):
- Update for optionmenu->checkbox change for disposition.
-
- * e-msg-composer-attachment-bar.c (add_from_file): Add a
- disposition argument.
- (add_from_user): Use e_msg_composer_select_file_attachment, pass
- chosen disposition to add_from_file.
- (e_msg_composer_attachment_bar_attach): Pass "attachment" to
- add_from_file for the disposition.
-
-2001-06-11 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (best_charset): Fix again... don't leave
- *encoding uninitialized in the US-ASCII case.
-
-2001-06-11 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_construct): Rearranged
- gtk_widget_show()s a bit to fix Bug#3204. The composer is now
- (like the rest of Evo) properly network transparent.
-
-2001-06-08 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer.c (save_draft): When saving a draft, attach
- information about the From: identity via X-Evolution-Account.
- This lets us select the correct identity when we edit it later.
- (e_msg_composer_new_with_message): If the message we are editting
- is tagged with an account (via X-Evolution-Account), make sure
- that the composer chooses that account's identity by default.
-
-2001-06-08 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (best_charset): Don't use the default charset
- if the message is US-ASCII.
-
-2001-06-07 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_sig_file): just set
- sig_file field, but don't actualy insert signature, it will be
- done by format menu item callback
- (e_msg_composer_set_body_text): don't set signature here
-
-2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): If user is trying to sign
- his/her message, try first to use the key that they might have
- provided in their account settings. If that was never set, default
- to their email address. Also respect their config option to
- encrypt-to-self.
-
-2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Oops. Fix a few compile problems.
-
-2001-05-31 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (HTML_EDITOR_GENERATED): Use GTKHTML_DATADIR here.
-
-2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Fixed up the S/MIME
- signing/encrypting code to work with the new API.
-
-2001-05-31 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (best_encoding): Add a missing iconv_close
-
-2001-05-30 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (build_message): Use the config-specified
- default character set (which in turn defaults to the locale
- character set) as the default for encoding non-US-ASCII messages,
- assuming it works. Fall back to camel_charset_best() if it fails.
- Also, pick the Content-Transfer-Encoding based on how the data
- looks in the destination charset, not in UTF8.
-
- While I was here, I also refactored a bunch and tried to reduce
- redundant code. There are still too many places that set the
- transfer-encoding on the plaintext part though... Also, I think
- some more cleanliness could happen if the sign/encrypt interfaces
- returned CamelMultiparts instead of CamelMimeParts.
-
-2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (update): Use
- e_utf8_to_gtk_string() on the description of the attachment since
- camel stores these as utf-8 strings.
-
-2001-05-28 Jason Leach <jleach@ximian.com>
-
- * Makefile.am (INCLUDES): srcdir != builddir fix.
-
-2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Populate the
- extra_hdr_* arrays with any non-special-case headers.
- (is_special_header): New convenience function to determine if a
- header is a "special" header or not.
-
-2001-05-24 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (menu_edit_delete_all_cb): new callback
- (menu_edit_delete_all_cb): set orig to 0 too
- (menu_edit_delete_all_cb): be more careful about text color and
- style
-
-2001-05-23 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_sig_file): set orig to 0
-
-2001-05-18 Jon Trowbridge <trow@ximian.com>
-
- * e-msg-composer-hdrs.c (set_recipients): Properly unserialize the
- string returned by the "text" property of the bonobo control,
- convert it into EDestinations, and use them to get the e-mail
- addresses of our recipients.
-
-2001-05-17 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (save_draft): Draft messages should be marked
- read.
-
-2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Added S/MIME sign/encrypt code.
- (init): Initalize smime_sign/encrypt.
- (e_msg_composer_get_smime_encrypt): new
- (e_msg_composer_set_smime_encrypt): new
- (e_msg_composer_get_smime_sign): new
- (e_msg_composer_set_smime_sign): new
- (menu_security_smime_sign_cb): new
- (menu_security_smime_encrypt_cb): new
- (setup_ui): Setup the UI for S/MIME stuff.
-
-2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): If we are creating a message
- with only a single part (ie no attachments and we will not be
- signing/encrypting the part) then `part = CAMEL_MIME_PART(message)`
- otherwise create a new MIME part and set it's content-object as the
- message's content-object at a later date.
-
-2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (add_inlined_image): Don't wrap content-id with
- brackets here as it is now done internally in camel.
-
-2001-05-03 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (get_signature_html): put signature in 100%
- width table
- (delete_old_signature): look only for first flow with signature == 1
- (e_msg_composer_new): don't insert <BR>
- (e_msg_composer_new_with_sig_file): ditto
- (delete_old_signature): don't delete whole signature paragraph,
- but just it's content
- (delete_old_signature): if signature isn't found, insert new empty
- paragraph to end of document for new signature
- (e_msg_composer_set_sig_file): delete signature always
- (e_msg_composer_set_sig_file): don't place signature to the end of
- document, but place it where previous one was (if there wasn't
- then new one is appended to the document)
-
-2001-05-02 Radek Doulik <rodo@ximian.com>
-
- * listener.c (impl_event): do automagic indenting only when
- in_signature_insert is FALSE
-
- * e-msg-composer.c (e_msg_composer_set_sig_file): do indent-zero
- before signature inserting
- (e_msg_composer_set_sig_file): use in_signature_insert flag
-
-2001-05-01 Radek Doulik <rodo@ximian.com>
-
- * listener.c (impl_event): set signature to 0 in newly created
- empty paragraphs
- (clear_signature): new helper function
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS
-
-2001-04-25 Radek Doulik <rodo@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_send_html): block/unblock
- redraw
-
- * listener.c (impl_event): reflect object data type change
-
- * e-msg-composer.c (get_sig_file_content): renamed from
- get_signature
- (get_signature_html): new helper function, uses
- get_sig_file_content
- (set_editor_text): removed signature parameters
- (from_changed_cb): new signal handler, sets signature by identity
- change
- (delete_old_signature): new function, deletes old signature from
- the document
- (e_msg_composer_set_sig_file): new method, set's signature
- filename
- (e_msg_composer_mark_text_orig): removed (obsolete)
-
- * e-msg-composer-hdrs.c: added signal FROM_CHANGED
-
-2001-04-21 Duncan Mak <duncan@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_construct): Set window_icon to
- "compose-message.png" for the composer window.
-
- Did #include <libgnomeui/gnome-window-icon.h> so we could use
- gnome_window_icon_set_from_file() here.
-
-2001-04-17 Radek Doulik <rodo@ximian.com>
-
- * listener.c (reply_indent): more auto-indentation magic
-
-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 c15597068a..0000000000
--- a/composer/Evolution-Composer.idl
+++ /dev/null
@@ -1,105 +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@ximian.com>
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-
- interface Composer : Bonobo::Unknown {
- struct Recipient {
- string name; /* UTF-8 */
- string address;
- };
- typedef sequence<Recipient> RecipientList;
-
- typedef sequence<char> AttachmentData;
-
- /**
- * 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 AttachmentData data);
-
- /**
- * show:
- *
- * Shows the composer and lets the user edit things
- * and send the message.
- **/
- void show ();
-
-
- /**
- * send:
- *
- * Send the message without showing the user the composer
- **/
- void send ();
- };
-};
-};
diff --git a/composer/Makefile.am b/composer/Makefile.am
deleted file mode 100644
index 9d0fe90ffc..0000000000
--- a/composer/Makefile.am
+++ /dev/null
@@ -1,96 +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: $(GTKHTML_DATADIR)/gtkhtml/Editor.idl
-
-$(HTML_EDITOR_GENERATED): $(GTKHTML_DATADIR)/gtkhtml/Editor.idl
- $(ORBIT_IDL) -I $(srcdir) `$(GNOME_CONFIG) --cflags idl` -I $(GTKHTML_DATADIR)/gtkhtml $(GTKHTML_DATADIR)/gtkhtml/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_srcdir)/addressbook/backend/ebook \
- -I$(top_builddir)/addressbook/backend/ebook \
- -I$(top_builddir)/addressbook/gui/component/select-names \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- $(EXTRA_GNOME_CFLAGS) \
- $(GNOME_INCLUDEDIR) \
- $(BONOBO_GNOME_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- $(GTKHTML_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- $(GNOME_VFS_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 d5ae665af1..0000000000
--- a/composer/e-msg-composer-attachment-bar.c
+++ /dev/null
@@ -1,820 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-attachment-bar.c
- *
- * Copyright (C) 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.
- *
- * 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 <gal/widgets/e-unicode.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,
- const gchar *disposition)
-{
- add_common (bar, e_msg_composer_attachment_new (file_name, disposition));
-}
-
-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;
- gchar *size_string, *label;
- CamelContentType *content_type;
- GdkPixbuf *pixbuf;
- gboolean image;
- char *desc;
-
- 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_unref (GTK_OBJECT (loader));
- camel_stream_close (mstream);
- }
-
- desc = e_utf8_to_gtk_string (GTK_WIDGET (icon_list), camel_mime_part_get_description (attachment->body));
- if (!desc || *desc == '\0')
- desc = e_utf8_to_gtk_string (GTK_WIDGET (icon_list),
- camel_mime_part_get_filename (attachment->body));
-
- if (!desc)
- desc = g_strdup (_("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 (desc);
- 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;
- gboolean is_inline = FALSE;
-
- composer = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar)));
-
- file_name = e_msg_composer_select_file_attachment (composer, &is_inline);
- if (!file_name)
- return;
-
- add_from_file (bar, file_name, is_inline ? "inline" : "attachment");
-
- 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,
- const char *default_charset)
-{
- 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));
- header_content_type_set_param (content_type, "charset", default_charset);
- } 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,
- const char *default_charset)
-{
- 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, default_charset);
- }
-}
-
-
-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, "attachment");
-}
-
-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 15774bb2fe..0000000000
--- a/composer/e-msg-composer-attachment-bar.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* msg-composer-attachment-bar.h
- *
- * Copyright (C) 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.
- *
- * 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,
- const char *default_charset);
-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 9231137317..0000000000
--- a/composer/e-msg-composer-attachment.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-attachment.c
- *
- * Copyright (C) 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.
- *
- * 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/gtknotebook.h>
-#include <gtk/gtktogglebutton.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: filename to attach
- * @disposition: Content-Disposition of the attachment
- *
- * Return value: the new attachment, or %NULL on error
- **/
-EMsgComposerAttachment *
-e_msg_composer_attachment_new (const gchar *file_name,
- const gchar *disposition)
-{
- EMsgComposerAttachment *new;
- CamelMimePart *part;
- CamelDataWrapper *wrapper;
- CamelStream *stream;
- struct stat statbuf;
- gchar *mime_type;
- char *content_id;
- char *filename;
-
- 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, disposition);
- if (strchr (file_name, '/'))
- filename = e_utf8_from_locale_string (strrchr (file_name, '/') + 1);
- else
- filename = e_utf8_from_locale_string (file_name);
-
- camel_mime_part_set_filename (part, filename);
- g_free (filename);
-
-#if 0
- /* Note: Outlook 2002 is broken with respect to Content-Ids on
- non-multipart/related parts, so as an interoperability
- workwaround, don't set a Content-Id on these parts. Fixes
- bug #10032 */
- /* set the Content-Id */
- content_id = header_msgid_generate ();
- camel_mime_part_set_content_id (part, content_id);
- g_free (content_id);
-#endif
-
- 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;
- GtkToggleButton *disposition_checkbox;
- 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);
-}
-
-static void
-ok_cb (GtkWidget *widget,
- gpointer data)
-{
- DialogData *dialog_data;
- EMsgComposerAttachment *attachment;
- gchar *str;
-
- 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);
-
- switch (gtk_toggle_button_get_active (dialog_data->disposition_checkbox)) {
- 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_checkbox = GTK_TOGGLE_BUTTON (
- glade_xml_get_widget (editor_gui, "disposition_checkbox"));
-
- 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);
- gtk_toggle_button_set_active (dialog_data->disposition_checkbox,
- disposition && !g_strcasecmp (disposition, "inline"));
- }
-
- 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 5b585e2d5c..0000000000
--- a/composer/e-msg-composer-attachment.glade
+++ /dev/null
@@ -1,280 +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>
- <output_main_file>False</output_main_file>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog</name>
- <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>
- <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>ok_button</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>close_button</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>table1</name>
- <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>
- <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>
- <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>
- <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>
- <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>mime_label</name>
- <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>description_label</name>
- <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>filename_label</name>
- <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>GtkCheckButton</class>
- <name>disposition_checkbox</name>
- <can_focus>True</can_focus>
- <label>Suggest automatic display of attachment</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</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>False</yfill>
- </child>
- </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 e51db41d73..0000000000
--- a/composer/e-msg-composer-attachment.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-attachment.h
- *
- * Copyright (C) 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.
- *
- * 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,
- const gchar *disposition);
-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 90bbddd941..0000000000
--- a/composer/e-msg-composer-hdrs.c
+++ /dev/null
@@ -1,1064 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* msg-composer-hdrs.c
- *
- * Copyright (C) 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.
- *
- * 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"
-#include "addressbook/backend/ebook/e-book-util.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,
- FROM_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");
- gtk_signal_emit (GTK_OBJECT (hdrs), signals [FROM_CHANGED]);
-}
-
-static GtkWidget *
-create_from_optionmenu (EMsgComposerHdrs *hdrs)
-{
- GtkWidget *omenu, *menu, *first = NULL;
- const GSList *accounts;
- GtkWidget *item;
- int i = 0, history = 0;
- int default_account;
-
- omenu = gtk_option_menu_new ();
- menu = gtk_menu_new ();
-
- default_account = mail_config_get_default_account_num ();
-
- 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 (i == 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);
-
- g_free (priv);
-
- 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);
-
- signals[FROM_CHANGED] =
- gtk_signal_new ("from_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMsgComposerHdrsClass,
- from_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_from_destv (CamelMimeMessage *msg,
- EDestination **to_destv,
- EDestination **cc_destv,
- EDestination **bcc_destv)
-{
- CamelInternetAddress *to_addr;
- CamelInternetAddress *cc_addr;
- CamelInternetAddress *bcc_addr;
- CamelInternetAddress *target;
- const gchar *text_addr;
- gint i;
- gboolean seen_hidden_list = FALSE;
-
- to_addr = camel_internet_address_new ();
- cc_addr = camel_internet_address_new ();
- bcc_addr = camel_internet_address_new ();
-
- if (to_destv) {
- for (i = 0; to_destv[i] != NULL; ++i) {
- text_addr = e_destination_get_address (to_destv[i]);
-
-
- if (text_addr && *text_addr) {
-
- target = to_addr;
- if (e_destination_is_evolution_list (to_destv[i])
- && !e_destination_list_show_addresses (to_destv[i])) {
- target = bcc_addr;
- seen_hidden_list = TRUE;
- }
-
- camel_address_unformat (CAMEL_ADDRESS (target), text_addr);
- }
- }
- }
-
- if (cc_destv) {
- for (i = 0; cc_destv[i] != NULL; ++i) {
- text_addr = e_destination_get_address (cc_destv[i]);
- if (text_addr && *text_addr) {
-
- target = cc_addr;
- if (e_destination_is_evolution_list (cc_destv[i])
- && !e_destination_list_show_addresses (cc_destv[i])) {
- target = bcc_addr;
- seen_hidden_list = TRUE;
- }
-
- camel_address_unformat (CAMEL_ADDRESS (target), text_addr);
- }
- }
- }
-
- if (bcc_destv) {
- for (i = 0; bcc_destv[i] != NULL; ++i) {
- text_addr = e_destination_get_address (bcc_destv[i]);
- if (text_addr && *text_addr) {
-
- camel_address_unformat (CAMEL_ADDRESS (bcc_addr), text_addr);
- }
- }
- }
-
- if (camel_address_length (CAMEL_ADDRESS (to_addr)) > 0) {
- camel_mime_message_set_recipients (msg, CAMEL_RECIPIENT_TYPE_TO, to_addr);
- } else if (seen_hidden_list) {
- camel_medium_set_header (CAMEL_MEDIUM (msg), CAMEL_RECIPIENT_TYPE_TO, "Undisclosed-Recipient:;");
- }
-
- if (camel_address_length (CAMEL_ADDRESS (cc_addr)) > 0) {
- camel_mime_message_set_recipients (msg, CAMEL_RECIPIENT_TYPE_CC, cc_addr);
- }
-
- if (camel_address_length (CAMEL_ADDRESS (bcc_addr)) > 0) {
- camel_mime_message_set_recipients (msg, CAMEL_RECIPIENT_TYPE_BCC, bcc_addr);
- }
-
- camel_object_unref (CAMEL_OBJECT (to_addr));
- camel_object_unref (CAMEL_OBJECT (cc_addr));
- camel_object_unref (CAMEL_OBJECT (bcc_addr));
-}
-
-void
-e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg)
-{
- CamelInternetAddress *addr;
- gchar *subject;
- EDestination **to_destv, **cc_destv, **bcc_destv;
-
- 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));
- }
-
- to_destv = e_msg_composer_hdrs_get_to (hdrs);
- cc_destv = e_msg_composer_hdrs_get_cc (hdrs);
- bcc_destv = e_msg_composer_hdrs_get_bcc (hdrs);
-
- /* Attach destinations to the message. */
-
- set_recipients_from_destv (msg, to_destv, cc_destv, bcc_destv);
-
- e_destination_freev (to_destv);
- e_destination_freev (cc_destv);
- e_destination_freev (bcc_destv);
-}
-
-
-
-/* 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;
- int default_account = 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);
-
- default_account = mail_config_get_default_account_num ();
-
- /* 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 && i == 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,
- EDestination **to_destv)
-{
- gchar *str;
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- str = e_destination_exportv (to_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", str, NULL);
- g_free (str);
-}
-
-void
-e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
- EDestination **cc_destv)
-{
- gchar *str;
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- str = e_destination_exportv (cc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", str, NULL);
- g_free (str);
-}
-
-void
-e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
- EDestination **bcc_destv)
-{
- gchar *str;
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- str = e_destination_exportv (bcc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", str, NULL);
- g_free (str);
-}
-
-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;
-}
-
-EDestination **
-e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
-{
- gchar *str = NULL;
- EDestination **destv = NULL;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", &str, NULL);
-
- if (str != NULL) {
- destv = e_destination_importv (str);
- g_free (str);
- }
-
- return destv;
-}
-
-EDestination **
-e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
-{
- gchar *str = NULL;
- EDestination **destv = NULL;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", &str, NULL);
-
- if (str != NULL) {
- destv = e_destination_importv (str);
- g_free (str);
- }
-
- return destv;
-}
-
-EDestination **
-e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
-{
- gchar *str = NULL;
- EDestination **destv = NULL;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", &str, NULL);
-
- if (str != NULL) {
- destv = e_destination_importv (str);
- g_free (str);
- }
-
- return destv;
-}
-
-EDestination **
-e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs)
-{
- EDestination **to_destv;
- EDestination **cc_destv;
- EDestination **bcc_destv;
- EDestination **recip_destv;
- gint i, j, n;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- to_destv = e_msg_composer_hdrs_get_to (hdrs);
- cc_destv = e_msg_composer_hdrs_get_cc (hdrs);
- bcc_destv = e_msg_composer_hdrs_get_bcc (hdrs);
-
- n = 0;
-
- for (i = 0; to_destv && to_destv[i] != NULL; ++i, ++n);
- for (i = 0; cc_destv && cc_destv[i] != NULL; ++i, ++n);
- for (i = 0; bcc_destv && bcc_destv[i] != NULL; ++i, ++n);
-
- if (n == 0)
- return NULL;
-
- recip_destv = g_new (EDestination *, n+1);
-
- j = 0;
-
- for (i = 0; to_destv && to_destv[i] != NULL; ++i, ++j)
- recip_destv[j] = to_destv[i];
- for (i = 0; cc_destv && cc_destv[i] != NULL; ++i, ++j)
- recip_destv[j] = cc_destv[i];
- for (i = 0; bcc_destv && bcc_destv[i] != NULL; ++i, ++j)
- recip_destv[j] = bcc_destv[i];
-
- g_assert (j == n);
- recip_destv[j] = NULL;
-
- g_free (to_destv);
- g_free (cc_destv);
- g_free (bcc_destv);
-
- return recip_destv;
-}
-
-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 15ad478497..0000000000
--- a/composer/e-msg-composer-hdrs.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* msg-composer-hdrs.h
- *
- * Copyright (C) 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.
- *
- * 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 <addressbook/backend/ebook/e-destination.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);
-
- void (* from_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,
- EDestination **to_destv);
-void e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
- EDestination **cc_destv);
-void e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
- EDestination **bcc_destv);
-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);
-
-EDestination **e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs);
-EDestination **e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs);
-EDestination **e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs);
-EDestination **e_msg_composer_hdrs_get_recipients (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 d44a0ec76f..0000000000
--- a/composer/e-msg-composer-select-file.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-select-file.c
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtkbox.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include "e-msg-composer-select-file.h"
-
-
-struct _FileSelectionInfo {
- GtkWidget *widget;
- GtkToggleButton *inline_checkbox;
- 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;
- GtkWidget *inline_checkbox;
- GtkWidget *box;
- 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);
-
- inline_checkbox = gtk_check_button_new_with_label (_("Suggest automatic display of attachment"));
- box = gtk_widget_get_ancestor (GTK_FILE_SELECTION (widget)->selection_entry, GTK_TYPE_BOX);
- gtk_box_pack_end (GTK_BOX (box), inline_checkbox, FALSE, FALSE, 4);
-
- info->widget = widget;
- info->selected_file = NULL;
- info->inline_checkbox = GTK_TOGGLE_BUTTON (inline_checkbox);
-
- return info;
-}
-
-static void
-file_selection_info_destroy_notify (void *data)
-{
- FileSelectionInfo *info;
-
- info = (FileSelectionInfo *) data;
-
- if (info->widget != NULL) {
- gtk_object_unref (GTK_OBJECT (info->widget));
- }
- g_free (info->selected_file);
- g_free (info);
-}
-
-
-static char *
-select_file_internal (EMsgComposer *composer,
- const char *title,
- gboolean *inline_p)
-{
- FileSelectionInfo *info;
- char *retval;
-
- 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);
- if (inline_p)
- gtk_widget_show (GTK_WIDGET (info->inline_checkbox));
- else
- gtk_widget_hide (GTK_WIDGET (info->inline_checkbox));
- gtk_widget_show (info->widget);
-
- GDK_THREADS_ENTER();
- gtk_main ();
- GDK_THREADS_LEAVE();
-
- retval = info->selected_file;
- info->selected_file = NULL;
-
- if (inline_p) {
- *inline_p = gtk_toggle_button_get_active (info->inline_checkbox);
- gtk_toggle_button_set_active (info->inline_checkbox, FALSE);
- }
-
- return retval;
-}
-
-/**
- * e_msg_composer_select_file:
- * @composer: a composer
- * @title: the title for the file selection dialog box
- *
- * This pops up a file selection dialog box with the given title
- * and allows the user to select a file.
- *
- * Return value: the selected filename, or %NULL if the user
- * cancelled.
- **/
-char *
-e_msg_composer_select_file (EMsgComposer *composer,
- const char *title)
-{
- return select_file_internal (composer, title, NULL);
-}
-
-char *
-e_msg_composer_select_file_attachment (EMsgComposer *composer,
- gboolean *inline_p)
-{
- return select_file_internal (composer, _("Attach a file"), inline_p);
-}
diff --git a/composer/e-msg-composer-select-file.h b/composer/e-msg-composer-select-file.h
deleted file mode 100644
index d0df1732e6..0000000000
--- a/composer/e-msg-composer-select-file.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-select-file.c
- *
- * 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
- */
-
-#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);
-
-char *e_msg_composer_select_file_attachment (EMsgComposer *composer,
- gboolean *inline_p);
-
-#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 030a7339ff..0000000000
--- a/composer/e-msg-composer.c
+++ /dev/null
@@ -1,3583 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer.c
- *
- * Copyright (C) 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.
- *
- * 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 <ctype.h>
-#include <stdlib.h>
-#include <dirent.h>
-#include <libgnome/gnome-defs.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 <libgnomeui/gnome-window-icon.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 <gal/e-text/e-entry.h>
-#include <gtkhtml/gtkhtml.h>
-
-#include "widgets/misc/e-charset-picker.h"
-
-#include "camel/camel.h"
-#include "camel/camel-charset-map.h"
-#include "camel/camel-session.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 "mail/mail-session.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 "evolution-shell-component-utils.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 };
-
-enum {
- DND_TYPE_MESSAGE_RFC822,
- DND_TYPE_TEXT_URI_LIST,
-};
-
-static GtkTargetEntry drop_types[] = {
- { "message/rfc822", 0, DND_TYPE_MESSAGE_RFC822 },
- { "text/uri-list", 0, DND_TYPE_TEXT_URI_LIST },
-};
-
-static const int num_drop_types = sizeof (drop_types) / sizeof (drop_types[0]);
-
-static GnomeAppClass *parent_class = NULL;
-
-/* local prototypes */
-static GList *add_recipients (GList *list, const char *recips, gboolean decode);
-static void handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth);
-static void message_rfc822_dnd (EMsgComposer *composer, CamelStream *stream);
-
-
-static GByteArray *
-get_text (Bonobo_PersistStream persist, char *format)
-{
- BonoboStream *stream;
- BonoboStreamMem *stream_mem;
- CORBA_Environment ev;
- GByteArray *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_byte_array_new ();
- g_byte_array_append (text, stream_mem->buffer, stream_mem->pos);
- bonobo_object_unref (BONOBO_OBJECT(stream));
-
- return text;
-}
-
-#define LINE_LEN 72
-
-static CamelMimePartEncodingType
-best_encoding (GByteArray *buf, const char *charset)
-{
- char *in, *out, outbuf[256], *ch;
- size_t inlen, outlen;
- int status, count = 0;
- iconv_t cd;
-
- if (!charset)
- return -1;
-
- cd = iconv_open (charset, "utf-8");
- g_return_val_if_fail (cd != (iconv_t)-1, -1);
-
- in = buf->data;
- inlen = buf->len;
- do {
- out = outbuf;
- outlen = sizeof (outbuf);
- status = iconv (cd, &in, &inlen, &out, &outlen);
- for (ch = out - 1; ch >= outbuf; ch--) {
- if ((unsigned char)*ch > 127)
- count++;
- }
- } while (status == -1 && errno == E2BIG);
- iconv_close (cd);
-
- if (status == -1)
- return -1;
-
- if (count == 0)
- return CAMEL_MIME_PART_ENCODING_7BIT;
- else if (count <= buf->len * 0.17)
- return CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
- else
- return CAMEL_MIME_PART_ENCODING_BASE64;
-}
-
-static const char *
-best_charset (GByteArray *buf, const char *default_charset, CamelMimePartEncodingType *encoding)
-{
- const char *charset;
-
- /* First try US-ASCII */
- *encoding = best_encoding (buf, "US-ASCII");
- if (*encoding == CAMEL_MIME_PART_ENCODING_7BIT)
- return NULL;
-
- /* Next try the user-specified charset for this message */
- charset = default_charset;
- *encoding = best_encoding (buf, charset);
- if (*encoding != -1)
- return charset;
-
- /* Now try the user's default charset from the mail config */
- charset = mail_config_get_default_charset ();
- *encoding = best_encoding (buf, charset);
- if (*encoding != -1)
- return charset;
-
- /* Try to find something that will work */
- charset = camel_charset_best (buf->data, buf->len);
- if (!charset)
- *encoding = CAMEL_MIME_PART_ENCODING_7BIT;
- else
- *encoding = best_encoding (buf, charset);
- return charset;
-}
-
-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 *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));
-
- camel_mime_part_set_content_id (part, cid);
- camel_mime_part_set_filename (part, g_basename (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);
- EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
- CamelMimeMessage *new;
- GByteArray *data;
- CamelDataWrapper *plain, *html, *current;
- CamelMimePartEncodingType plain_encoding;
- const char *charset;
- CamelContentType *type;
- CamelStream *stream;
- CamelMultipart *body = NULL;
- CamelMimePart *part;
- CamelException ex;
- int i;
-
- if (composer->persist_stream_interface == CORBA_OBJECT_NIL)
- return NULL;
-
- new = camel_mime_message_new ();
- e_msg_composer_hdrs_to_message (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]);
- }
-
- data = get_text (composer->persist_stream_interface, "text/plain");
- if (!data) {
- /* The component has probably died */
- camel_object_unref (CAMEL_OBJECT (new));
- return NULL;
- }
-
- /* FIXME: we may want to do better than this... */
- charset = best_charset (data, composer->charset, &plain_encoding);
- type = header_content_type_new ("text", "plain");
- if (charset)
- header_content_type_set_param (type, "charset", charset);
-
- plain = camel_data_wrapper_new ();
- stream = camel_stream_mem_new_with_byte_array (data);
- camel_data_wrapper_construct_from_stream (plain, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_data_wrapper_set_mime_type_field (plain, type);
- header_content_type_unref (type);
-
- if (composer->send_html) {
- data = get_text (composer->persist_stream_interface, "text/html");
- if (!data) {
- /* The component has probably died */
- camel_object_unref (CAMEL_OBJECT (new));
- camel_object_unref (CAMEL_OBJECT (plain));
- return NULL;
- }
- html = camel_data_wrapper_new ();
- stream = camel_stream_mem_new_with_byte_array (data);
- camel_data_wrapper_construct_from_stream (html, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_data_wrapper_set_mime_type (html, "text/html; charset=utf-8");
-
- /* Build the multipart/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 ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), plain);
- camel_object_unref (CAMEL_OBJECT (plain));
- camel_mime_part_set_encoding (part, plain_encoding);
- camel_multipart_add_part (body, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), html);
- camel_object_unref (CAMEL_OBJECT (html));
- camel_multipart_add_part (body, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- /* If there are inlined images, construct a
- * multipart/related containing the
- * multipart/alternative and the images.
- */
- if (g_hash_table_size (composer->inline_images)) {
- CamelMultipart *html_with_images;
-
- html_with_images = camel_multipart_new ();
- camel_data_wrapper_set_mime_type (
- CAMEL_DATA_WRAPPER (html_with_images),
- "multipart/related; type=\"multipart/alternative\"");
- camel_multipart_set_boundary (html_with_images, NULL);
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (body));
- camel_object_unref (CAMEL_OBJECT (body));
- camel_multipart_add_part (html_with_images, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- add_inlined_images (composer, html_with_images);
- current = CAMEL_DATA_WRAPPER (html_with_images);
- } else
- current = CAMEL_DATA_WRAPPER (body);
- } else
- current = plain;
-
- 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 ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
- if (current == plain)
- camel_mime_part_set_encoding (part, plain_encoding);
- camel_object_unref (CAMEL_OBJECT (current));
- camel_multipart_add_part (multipart, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- e_msg_composer_attachment_bar_to_multipart (attachment_bar, multipart, composer->charset);
-
- current = CAMEL_DATA_WRAPPER (multipart);
- }
-
- if (composer->pgp_sign || composer->pgp_encrypt) {
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
- if (current == plain)
- camel_mime_part_set_encoding (part, plain_encoding);
- camel_object_unref (CAMEL_OBJECT (current));
-
- if (composer->pgp_sign) {
- CamelInternetAddress *from = NULL;
- const char *pgpid;
-
- camel_exception_init (&ex);
-
- if (hdrs->account && hdrs->account->pgp_key) {
- pgpid = hdrs->account->pgp_key;
- } else {
- /* time for plan b */
- from = e_msg_composer_hdrs_get_from (hdrs);
- camel_internet_address_get (from, 0, NULL, &pgpid);
- }
-
- mail_crypto_pgp_mime_part_sign (&part, pgpid, CAMEL_CIPHER_HASH_SHA1, &ex);
-
- if (from)
- 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 ();
-
- /* check to see if we should encrypt to self */
- if (hdrs->account && hdrs->account->pgp_encrypt_to_self) {
- CamelInternetAddress *from = NULL;
-
- if (hdrs->account->pgp_key) {
- address = hdrs->account->pgp_key;
- } else {
- /* time for plan b */
- from = e_msg_composer_hdrs_get_from (hdrs);
- camel_internet_address_get (from, 0, NULL, &address);
- }
-
- g_ptr_array_add (recipients, g_strdup (address));
-
- if (from)
- camel_object_unref (CAMEL_OBJECT (from));
- }
-
- 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;
- }
-
- current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- camel_object_ref (CAMEL_OBJECT (current));
- camel_object_unref (CAMEL_OBJECT (part));
- }
-
- camel_medium_set_content_object (CAMEL_MEDIUM (new), current);
- if (current == plain)
- camel_mime_part_set_encoding (CAMEL_MIME_PART (new), plain_encoding);
- camel_object_unref (CAMEL_OBJECT (current));
-
-#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED)
- if (composer->smime_sign) {
- CamelInternetAddress *from = NULL;
- CamelMimeMessage *smime_mesg;
- const char *certname;
-
- camel_exception_init (&ex);
-
- if (hdrs->account && hdrs->account->smime_key) {
- certname = hdrs->account->smime_key;
- } else {
- /* time for plan b */
- from = e_msg_composer_hdrs_get_from (hdrs);
- camel_internet_address_get (from, 0, NULL, &certname);
- }
-
- smime_mesg = mail_crypto_smime_sign (new, certname, TRUE, TRUE, &ex);
-
- if (from)
- camel_object_unref (CAMEL_OBJECT (from));
-
- if (camel_exception_is_set (&ex))
- goto exception;
-
- camel_object_unref (CAMEL_OBJECT (new));
- new = smime_mesg;
- }
-
- if (composer->smime_encrypt) {
- /* FIXME: we should try to get the preferred cert "nickname" for each recipient */
- const CamelInternetAddress *addr = NULL;
- CamelInternetAddress *from = NULL;
- CamelMimeMessage *smime_mesg;
- const char *address;
- GPtrArray *recipients;
- int i, len;
-
- camel_exception_init (&ex);
- recipients = g_ptr_array_new ();
-
- /* check to see if we should encrypt to self */
- if (hdrs->account && hdrs->account->smime_encrypt_to_self) {
- if (hdrs->account->smime_key) {
- address = hdrs->account->smime_key;
- } else {
- /* time for plan b */
- from = e_msg_composer_hdrs_get_from (hdrs);
- camel_internet_address_get (from, 0, NULL, &address);
- }
-
- g_ptr_array_add (recipients, g_strdup (address));
-
- if (from)
- camel_object_unref (CAMEL_OBJECT (addr));
- }
-
- 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));
- }
-
- from = e_msg_composer_hdrs_get_from (E_MSG_COMPOSER_HDRS (composer->hdrs));
- camel_internet_address_get (from, 0, NULL, &address);
-
- smime_mesg = mail_crypto_smime_encrypt (new, address, recipients, &ex);
-
- camel_object_unref (CAMEL_OBJECT (from));
-
- 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_object_unref (CAMEL_OBJECT (new));
- new = smime_mesg;
- }
-
- /* FIXME: what about mail_crypto_smime_certsonly()?? */
-
- /* FIXME: what about mail_crypto_smime_envelope()?? */
-
-#endif /* HAVE_NSS */
-
- /* Attach whether this message was written in HTML */
- camel_medium_set_header (CAMEL_MEDIUM (new), "X-Evolution-Format",
- composer->send_html ? "text/html" : "text/plain");
-
- return new;
-
- exception:
-
- if (part != CAMEL_MIME_PART (new))
- 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 *
-read_file_content (gint fd)
-{
- GByteArray *contents;
- gchar buf[4096];
- gint n;
- gchar *body;
-
- g_return_val_if_fail (fd > 0, NULL);
-
- contents = g_byte_array_new ();
- while ((n = read (fd, buf, 4096)) > 0) {
- g_byte_array_append (contents, buf, n);
- }
- g_byte_array_append (contents, "\0", 1);
-
- body = (n < 0) ? NULL : (gchar *)contents->data;
- g_byte_array_free (contents, (n < 0));
-
- return body;
-}
-
-static char *
-get_file_content (const gchar *file_name, gboolean convert, guint flags)
-{
- gint fd;
- char *raw;
- char *html;
-
- fd = open (file_name, O_RDONLY | O_CREAT, 0775);
-
- raw = read_file_content (fd);
-
- if (raw == NULL) {
- char *msg;
-
- msg = g_strdup_printf (_("Error while reading file %s:\n"
- "%s"), file_name, g_strerror (errno));
-
- gnome_error_dialog (msg);
- g_free (msg);
- close (fd);
- return g_strdup ("");
- }
- close (fd);
-
- html = convert ? e_text_to_html (raw, flags) : raw;
-
- if (convert)
- g_free (raw);
-
- return html;
-}
-
-char *
-e_msg_composer_get_sig_file_content (const char *sigfile, gboolean in_html)
-{
- if (!sigfile || !*sigfile) {
- return NULL;
- }
-
- return get_file_content (sigfile, !in_html, 0);
-}
-
-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);
-}
-
-static gchar *
-get_signature_html (EMsgComposer *composer)
-{
- gboolean format_html = FALSE;
- gchar *text, *html = NULL, *sig_file = NULL;
-
- if (E_MSG_COMPOSER_HDRS (composer->hdrs)->account->id) {
- MailConfigIdentity *id;
-
- id = E_MSG_COMPOSER_HDRS (composer->hdrs)->account->id;
- if (composer->send_html) {
- if (id->has_html_signature) {
- sig_file = id->html_signature;
- format_html = TRUE;
- } else
- sig_file = id->signature;
- } else
- sig_file = id->signature;
- }
-
- if (!sig_file)
- return NULL;
-
- text = e_msg_composer_get_sig_file_content (sig_file, format_html);
- if (text) {
- /* The signature dash convention ("-- \n") is specified in the
- * "Son of RFC 1036": http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html,
- * section 4.3.2.
- */
- html = g_strdup_printf ("<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature\" value=\"1\">-->"
- "<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD>"
- "%s%s%s%s"
- "</TD></TR></TABLE>",
- format_html ? "" : "<PRE>\n",
- format_html || !strncmp ("-- \n", text, 4) ? "" : "-- \n",
- text,
- format_html ? "" : "</PRE>\n");
- g_free (text);
- text = html;
- }
-
- return text;
-}
-
-static void
-set_editor_text (EMsgComposer *composer, const char *text)
-{
- Bonobo_PersistStream persist;
- BonoboStream *stream;
- BonoboWidget *editor;
- CORBA_Environment ev;
-
- editor = BONOBO_WIDGET (composer->editor);
-
- 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 (text, strlen (text),
- TRUE, FALSE);
- 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)
-{
- char *full_key;
-
- if (composer->config_db == CORBA_OBJECT_NIL)
- return;
-
- full_key = g_strconcat ("/Mail/Composer/", key, NULL);
-
- bonobo_config_set_long (composer->config_db, full_key, val, NULL);
-
- 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. */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewAttach",
- "state", show ? "1" : "0", NULL);
-}
-
-static void
-save (EMsgComposer *composer,
- const char *file_name)
-{
- CORBA_Environment ev;
- char *my_file_name;
- int fd;
-
- 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;
-
- /* check to see if we already have the file */
- if ((fd = open (my_file_name, O_RDONLY | O_CREAT | O_EXCL, 0777)) == -1) {
- GtkWidget *dialog, *label;
-
- dialog = gnome_dialog_new (_("Warning!"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
- label = gtk_label_new (_("File exists, overwrite?"));
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0);
-
- switch (gnome_dialog_run_and_close (GNOME_DIALOG (dialog))) {
- case -1:
- gtk_widget_destroy (dialog);
- return;
- case 1:
- return;
- default:
- /* ie, the user hit "Yes" so just continue as normal */
- }
- } else
- close (fd);
-
- 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 (my_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;
- 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_thread_new);
- 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;
-
- msg = e_msg_composer_get_message_draft (composer);
-
- info = g_new0 (CamelMessageInfo, 1);
- info->flags = CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_SEEN;
-
- 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));
-
- /* Reset the "changed" state to FALSE */
- composer->has_changed = FALSE;
-}
-
-#define AUTOSAVE_SEED ".evolution-composer.autosave-XXXXXX"
-#define AUTOSAVE_INTERVAL 60000
-
-typedef struct _AutosaveManager AutosaveManager;
-struct _AutosaveManager {
- GHashTable *table;
- guint id;
- gboolean ask;
-};
-
-static AutosaveManager *am = NULL;
-
-static gboolean
-autosave_save_draft (EMsgComposer *composer)
-{
- CamelMimeMessage *msg;
- CamelStream *stream;
- char *file;
- gint fd;
- gboolean success = TRUE;
-
- fd = composer->autosave_fd;
- file = composer->autosave_file;
-
- if (fd == -1) {
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Error accessing file: %s"), file);
- return FALSE;
- }
-
- msg = e_msg_composer_get_message_draft (composer);
-
- if (msg == NULL) {
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Unable to retrieve message from editor"));
- return FALSE;
- }
-
- if (lseek (fd, (off_t)0, SEEK_SET) == -1) {
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Unable to seek on file: %s\n%s"), file, g_strerror (errno));
- return FALSE;
- }
-
- if (ftruncate (fd, (off_t)0) == -1) {
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Unable to truncate file: %s\n%s"), file, g_strerror (errno));
- return FALSE;
- }
-
- /* this does an lseek so we don't have to */
- stream = camel_stream_fs_new_with_fd (fd);
- if (camel_data_wrapper_write_to_stream ((CamelDataWrapper *)msg, stream) == -1
- || camel_stream_flush (CAMEL_STREAM (stream)) == -1) {
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Error autosaving message: %s\n %s"), file, strerror(errno));
-
- success = FALSE;
- }
-
- /* set the fd to -1 in the stream so camel doesn't close it we want to keep it open */
- CAMEL_STREAM_FS (stream)->fd = -1;
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return success;
-}
-
-static EMsgComposer *
-autosave_load_draft (const char *filename)
-{
- CamelStream *stream;
- CamelMimeMessage *msg;
- EMsgComposer *composer;
-
- g_return_val_if_fail (filename != NULL, NULL);
-
- g_warning ("autosave load filename = \"%s\"", filename);
-
- stream = camel_stream_fs_new_with_name (filename, O_RDONLY, 0);
-
- if (stream == NULL)
- return NULL;
-
- msg = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
- unlink (filename);
-
- composer = e_msg_composer_new_with_message (msg);
- if (composer) {
- autosave_save_draft (composer);
-
- gtk_signal_connect (GTK_OBJECT (composer), "send",
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (composer), "postpone",
- GTK_SIGNAL_FUNC (composer_postpone_cb), NULL);
-
- gtk_widget_show (GTK_WIDGET (composer));
- }
-
- camel_object_unref ((CamelObject *)stream);
- return composer;
-}
-
-static gboolean
-autosave_is_owned (AutosaveManager *am, const char *file)
-{
- return g_hash_table_lookup (am->table, file) != NULL;
-}
-
-static void
-autosave_query_cb (gint reply, gpointer data)
-{
- int *yes = data;
-
- *yes = !reply;
-}
-
-static void
-autosave_manager_query_load_orphans (AutosaveManager *am, EMsgComposer *composer)
-{
- GtkWidget *dialog;
- DIR *dir;
- struct dirent *d;
- GSList *match = NULL;
- gint len = strlen (AUTOSAVE_SEED);
- gint load = FALSE;
-
- dir = opendir (g_get_home_dir());
- if (!dir) {
- return;
- }
-
- while ((d = readdir (dir))) {
- if ((!strncmp (d->d_name, AUTOSAVE_SEED, len - 6))
- && (strlen (d->d_name) == len)
- && (!autosave_is_owned (am, d->d_name))) {
- char *filename = g_strdup_printf ("%s/%s", g_get_home_dir(), d->d_name);
- struct stat st;
-
- /*
- * check if the file has any length, It is a valid case if it doesn't
- * so we simply don't ask then.
- */
- if (stat (filename, &st) < 0 || st.st_size == 0) {
- unlink (filename);
- g_free (filename);
- continue;
- }
- match = g_slist_prepend (match, filename);
- }
- }
-
- closedir (dir);
-
- if (match != NULL) {
- dialog = gnome_question_dialog_parented (_("Ximian Evolution has found unsaved files from a previous session.\n"
- "Would you like to try to recover them?"),
- autosave_query_cb, &load, GTK_WINDOW (composer));
-
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- }
-
- while (match != NULL) {
- GSList *next = match->next;
- char *filename = match->data;
- EMsgComposer *composer;
-
- if (load) {
- composer = autosave_load_draft (filename);
- } else {
- unlink (filename);
- }
-
- g_free (filename);
- g_slist_free_1 (match);
- match = next;
- }
-}
-
-static void
-autosave_run_foreach_cb (gpointer key, gpointer value, gpointer data)
-{
- EMsgComposer *composer = E_MSG_COMPOSER (value);
-
- autosave_save_draft (composer);
-}
-
-static gint
-autosave_run (gpointer data)
-{
- AutosaveManager *am = data;
-
- g_hash_table_foreach (am->table, (GHFunc)autosave_run_foreach_cb, am);
-
- return TRUE;
-}
-
-static gboolean
-autosave_init_file (EMsgComposer *composer)
-{
- if (composer->autosave_file == NULL) {
- composer->autosave_file = g_strdup_printf ("%s/%s", g_get_home_dir(), AUTOSAVE_SEED);
- composer->autosave_fd = mkstemp (composer->autosave_file);
- return TRUE;
- }
- return FALSE;
-}
-static void
-autosave_manager_start (AutosaveManager *am)
-{
- if (am->id == 0)
- am->id = gtk_timeout_add (AUTOSAVE_INTERVAL, autosave_run, am);
-}
-
-static void
-autosave_manager_stop (AutosaveManager *am)
-{
- if (am->id) {
- gtk_timeout_remove (am->id);
- am->id = 0;
- }
-}
-
-static AutosaveManager *
-autosave_manager_new ()
-{
- AutosaveManager *am;
-
- am = g_new (AutosaveManager, 1);
- am->table = g_hash_table_new (g_str_hash, g_str_equal);
- am->id = 0;
- am->ask = TRUE;
-
- return am;
-}
-
-static void
-autosave_manager_register (AutosaveManager *am, EMsgComposer *composer)
-{
- char *key;
-
- g_return_if_fail (composer != NULL);
-
- if (autosave_init_file (composer)) {
- key = g_basename (composer->autosave_file);
- g_hash_table_insert (am->table, key, composer);
- if (am->ask) {
- /* keep recursion out of our bedrooms. */
- am->ask = FALSE;
- autosave_manager_query_load_orphans (am, composer);
- am->ask = TRUE;
- }
-
- }
- autosave_manager_start (am);
-}
-
-static void
-autosave_manager_unregister (AutosaveManager *am, EMsgComposer *composer)
-{
- g_hash_table_remove (am->table, g_basename (composer->autosave_file));
-
- /* only remove the file if we can successfully save it */
- /* FIXME this test could probably be more efficient */
- if (autosave_save_draft (composer)) {
- unlink (composer->autosave_file);
- }
- close (composer->autosave_fd);
- g_free (composer->autosave_file);
-
- if (g_hash_table_size (am->table) == 0)
- autosave_manager_stop (am);
-}
-
-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;
- gint button;
-
- if (composer->has_changed) {
- dialog = gnome_message_box_new (_("This message has not been sent.\n\nDo you wish to save your changes?"),
- GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES, /* Save */
- GNOME_STOCK_BUTTON_NO, /* Don't save */
- GNOME_STOCK_BUTTON_CANCEL, /* Cancel */
- NULL);
-
- gtk_window_set_title (GTK_WINDOW (dialog), _("Warning: Modified Message"));
- 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)
-{
- if (session && camel_session_is_online (session))
- gtk_signal_emit (GTK_OBJECT (data), signals[SEND]);
- else
- gtk_signal_emit (GTK_OBJECT (data), signals[POSTPONE]);
-}
-
-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_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path)
-{
- CORBA_Environment ev;
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
- CORBA_exception_init (&ev);
-
- GNOME_GtkHTML_Editor_Engine_undo_begin (composer->editor_engine, "Delete all but signature", "Undelete all", &ev);
- GNOME_GtkHTML_Editor_Engine_freeze (composer->editor_engine, &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "disable-selection", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "text-default-color", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "bold-off", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "italic-off", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "underline-off", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "strikeout-off", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "select-all", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "delete", &ev);
- GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "signature", "0", &ev);
- GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "orig", "0", &ev);
- e_msg_composer_show_sig_file (composer);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "style-normal", &ev);
- GNOME_GtkHTML_Editor_Engine_thaw (composer->editor_engine, &ev);
- GNOME_GtkHTML_Editor_Engine_undo_end (composer->editor_engine, &ev);
-
- CORBA_exception_free (&ev);
- printf ("delete all\n");
-}
-
-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);
-}
-
-static void
-menu_file_insert_file_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- EMsgComposer *composer;
- char *file_name;
- char *html;
- CORBA_Environment ev;
-
- composer = E_MSG_COMPOSER (data);
-
- file_name = e_msg_composer_select_file (composer, _("Insert File"));
- if (file_name == NULL)
- return;
-
- html = get_file_content (file_name, TRUE, E_TEXT_TO_HTML_PRE);
- if (html == NULL)
- return;
-
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_freeze (composer->editor_engine, &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-position-save", &ev);
- GNOME_GtkHTML_Editor_Engine_undo_begin (composer->editor_engine, "Insert file", "Uninsert file", &ev);
- if (!GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (composer->editor_engine, &ev))
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev);
- GNOME_GtkHTML_Editor_Engine_insertHTML (composer->editor_engine, html, &ev);
- GNOME_GtkHTML_Editor_Engine_undo_end (composer->editor_engine, &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-position-restore", &ev);
- GNOME_GtkHTML_Editor_Engine_thaw (composer->editor_engine, &ev);
- CORBA_exception_free (&ev);
-
- g_free (html);
-}
-
-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_security_smime_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_smime_sign (E_MSG_COMPOSER (composer), atoi (state));
-}
-
-static void
-menu_security_smime_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_smime_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 void
-menu_changed_charset_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- if (atoi (state)) {
- /* Charset menu names are "Charset-%s" where %s is the charset name */
- g_free (E_MSG_COMPOSER (user_data)->charset);
- E_MSG_COMPOSER (user_data)->charset = g_strdup (path + strlen ("Charset-"));
- }
-}
-
-
-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 ("DeleteAll", menu_edit_delete_all_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixcache [] = {
- E_PIXMAP ("/Toolbar/FileAttach", "buttons/add-attachment.png"),
- E_PIXMAP ("/Toolbar/FileSend", "buttons/send-24.png"),
-
-/* E_PIXMAP ("/menu/Insert/FileAttach", "buttons/add-attachment.png"), */
- E_PIXMAP ("/commands/FileSend", "send-16.png"),
- E_PIXMAP ("/commands/FileSendLater", "send-later-16.png"),
- E_PIXMAP ("/commands/FileSave", "save-16.png"),
- E_PIXMAP ("/commands/FileSaveAs", "save-as-16.png"),
-
- E_PIXMAP_END
-};
-
-static void
-setup_ui (EMsgComposer *composer)
-{
- BonoboUIContainer *container;
- char *default_charset;
- gboolean hide_smime;
-
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (composer));
-
- composer->uic = bonobo_ui_component_new_default ();
- 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);
-
- /* Customize Toolbar thingie */
- bonobo_ui_engine_config_set_path (bonobo_window_get_ui_engine (BONOBO_WINDOW (composer)),
- "/evolution/UIConf/composer");
-
- bonobo_ui_component_freeze (composer->uic, NULL);
-
- bonobo_ui_util_set_ui (composer->uic, EVOLUTION_DATADIR,
- "evolution-message-composer.xml",
- "evolution-message-composer");
-
- e_pixmaps_update (composer->uic, pixcache);
-
- /* Populate the Charset Encoding menu and default it to whatever the user
- chose as his default charset in the mailer */
- default_charset = bonobo_config_get_string (composer->config_db,
- "/Mail/Format/default_charset",
- NULL);
- e_charset_picker_bonobo_ui_populate (composer->uic, default_charset,
- menu_changed_charset_cb,
- composer);
- g_free (default_charset);
-
- if (!session || !camel_session_is_online (session)) {
- /* Move the accelerator from Send to Send Later */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/FileSend",
- "accel", NULL, NULL);
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/FileSendLater",
- "accel", "*Ctrl*Return", NULL);
- }
-
- /* 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);
-
-#if defined(HAVE_NSS) && defined(SMIME_SUPPORTED)
- hide_smime = FALSE;
-#else
- hide_smime = TRUE;
-#endif
-
- /* Security -> S/MIME Sign */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/SecuritySMimeSign",
- "state", composer->smime_sign ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/SecuritySMimeSign",
- "hidden", hide_smime ? "1" : "0", NULL);
-
- bonobo_ui_component_add_listener (
- composer->uic, "SecuritySMimeSign",
- menu_security_smime_sign_cb, composer);
-
- /* Security -> S/MIME Encrypt */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/SecuritySMimeEncrypt",
- "state", composer->smime_encrypt ? "1" : "0", NULL);
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/SecuritySMimeEncrypt",
- "hidden", hide_smime ? "1" : "0", NULL);
-
- bonobo_ui_component_add_listener (
- composer->uic, "SecuritySMimeEncrypt",
- menu_security_smime_encrypt_cb, composer);
-
- /* View -> Attachments */
- bonobo_ui_component_add_listener (
- composer->uic, "ViewAttach",
- menu_view_attachments_activate_cb, composer);
-
- bonobo_ui_component_thaw (composer->uic, NULL);
-}
-
-
-/* Miscellaneous callbacks. */
-
-static void
-attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
- void *data)
-{
- EMsgComposer *composer;
- gboolean show = FALSE;
-
- composer = E_MSG_COMPOSER (data);
-
- if (e_msg_composer_attachment_bar_get_num_attachments (bar) > 0)
- show = TRUE;
-
- e_msg_composer_show_attachments (composer, show);
-
- /* 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);
-}
-
-static void
-from_changed_cb (EMsgComposerHdrs *hdrs, void *data)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
-
- if (hdrs->account) {
- e_msg_composer_set_pgp_sign (composer, hdrs->account->pgp_always_sign);
- e_msg_composer_set_smime_sign (composer, hdrs->account->smime_always_sign);
- }
-
- e_msg_composer_show_sig_file (composer);
-}
-
-
-/* GtkObject methods. */
-
-static void
-composer_shutdown (GtkObject *object)
-{
- /* When destroy() is called, the contents of the window
- * (including the remote editor control) will already have
- * been destroyed, so we have to do this here.
- */
- autosave_manager_unregister (am, E_MSG_COMPOSER (object));
- if (GTK_OBJECT_CLASS (parent_class)->shutdown != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->shutdown) (object);
-}
-
-static void
-destroy (GtkObject *object)
-{
- EMsgComposer *composer;
- CORBA_Environment ev;
-
- composer = E_MSG_COMPOSER (object);
-
- CORBA_exception_init (&ev);
-
- if (composer->config_db) {
- Bonobo_ConfigDatabase_sync (composer->config_db, &ev);
- bonobo_object_release_unref (composer->config_db, NULL);
- }
- composer->config_db = NULL;
-
- 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);
-
- g_free (composer->charset);
-
- 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
-message_rfc822_dnd (EMsgComposer *composer, CamelStream *stream)
-{
- CamelMimeParser *mp;
- CamelException *ex;
-
- mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mp, TRUE);
- camel_mime_parser_init_with_stream (mp, stream);
-
- ex = camel_exception_new ();
-
- while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
- CamelMimeMessage *message;
- CamelMimePart *part;
-
- message = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (message), mp) == -1) {
- camel_object_unref (CAMEL_OBJECT (message));
- break;
- }
-
- part = camel_mime_part_new ();
- camel_mime_part_set_disposition (part, "inline");
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- CAMEL_DATA_WRAPPER (message));
- camel_mime_part_set_content_type (part, "message/rfc822");
- e_msg_composer_attachment_bar_attach_mime_part (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- part);
- camel_object_unref (CAMEL_OBJECT (message));
- camel_object_unref (CAMEL_OBJECT (part));
- camel_exception_clear (ex);
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- camel_object_unref (CAMEL_OBJECT (mp));
- camel_exception_free (ex);
-}
-
-static void
-drag_data_received (EMsgComposer *composer, GdkDragContext *context,
- gint x, gint y, GtkSelectionData *selection,
- guint info, guint time)
-{
- gchar *tmp, *filename, **filenames;
- CamelStream *stream;
- CamelURL *url;
- int i;
-
- switch (info) {
- case DND_TYPE_MESSAGE_RFC822:
- /* write the message(s) out to a CamelStream so we can use it */
- stream = camel_stream_mem_new ();
- camel_stream_write (stream, selection->data, selection->length);
- camel_stream_reset (stream);
-
- message_rfc822_dnd (composer, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- break;
- case DND_TYPE_TEXT_URI_LIST:
- tmp = g_strndup (selection->data, selection->length);
- filenames = g_strsplit (tmp, "\n", 0);
- g_free (tmp);
-
- for (i = 0; filenames[i] != NULL; i++) {
- filename = g_strstrip (filenames[i]);
-
- url = camel_url_new (filename, NULL);
- g_free (filename);
- filename = url->path;
- url->path = NULL;
- camel_url_free (url);
-
- e_msg_composer_attachment_bar_attach
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- filename);
-
- g_free (filename);
- }
-
- g_free (filenames);
- break;
- default:
- break;
- }
-}
-
-
-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->shutdown = composer_shutdown;
- 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->smime_sign = FALSE;
- composer->smime_encrypt = FALSE;
-
- composer->has_changed = FALSE;
-
- composer->charset = NULL;
- composer->autosave_file = NULL;
- composer->autosave_fd = -1;
-
- if (am == NULL) {
- am = autosave_manager_new ();
- }
- autosave_manager_register (am, composer);
-}
-
-
-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 void
-load_from_config_db (EMsgComposer *composer)
-{
- Bonobo_ConfigDatabase db = composer->config_db;
-
- composer->view_from = bonobo_config_get_long_with_default (db,
- "Mail/Composer/ViewFrom", 1, NULL);
- composer->view_replyto = bonobo_config_get_long_with_default (db,
- "Mail/Composer/ViewReplyTo", 0, NULL);
- composer->view_bcc = bonobo_config_get_long_with_default (db,
- "Mail/Composer/ViewBCC", 0, NULL);
- composer->view_cc = bonobo_config_get_long_with_default (db,
- "Mail/Composer/ViewCC", 1, NULL);
- composer->view_subject = bonobo_config_get_long_with_default (db,
- "Mail/Composer/ViewSubject", 1, NULL);
-}
-
-static void
-e_msg_composer_load_config (EMsgComposer *composer)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ( "wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (ev._major == CORBA_NO_EXCEPTION && db != CORBA_OBJECT_NIL){
- composer->config_db = db;
- load_from_config_db (composer);
- } else
- composer->config_db = CORBA_OBJECT_NIL;
-
- 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;
-}
-
-
-static void
-map_default_cb (EMsgComposer *composer, gpointer user_data)
-{
- GtkWidget *to;
- BonoboControlFrame *cf;
- Bonobo_PropertyBag pb = CORBA_OBJECT_NIL;
- char *text;
- CORBA_Environment ev;
-
- /* If the 'To:' field is empty, focus it (This is ridiculously complicated) */
-
- to = e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (composer->hdrs));
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (to));
- pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
- text = bonobo_property_bag_client_get_value_string (pb, "text", NULL);
- bonobo_object_release_unref (pb, NULL);
-
- if (!text || text[0] == '\0') {
- bonobo_control_frame_focus_child (cf, GTK_DIR_TAB_FORWARD);
- g_free (text);
- return;
- }
- g_free (text);
-
- /* If not, check the subject field */
-
- text = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs));
-
- if (!text || text[0] == '\0') {
- GtkWidget *widget;
-
- widget = e_msg_composer_hdrs_get_subject_entry (E_MSG_COMPOSER_HDRS (composer->hdrs));
- gtk_widget_grab_focus (GTK_WIDGET (E_ENTRY (widget)->canvas));
- g_free (text);
- return;
- }
- g_free (text);
-
- /* Jump to the editor as a last resort. */
-
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "grab-focus", &ev);
- CORBA_exception_free (&ev);
-}
-
-/**
- * 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;
-
- g_return_if_fail (gtk_main_level () > 0);
-
- gtk_window_set_default_size (GTK_WINDOW (composer),
- DEFAULT_WIDTH, DEFAULT_HEIGHT);
- gnome_window_icon_set_from_file (GTK_WINDOW (composer), EVOLUTION_DATADIR
- "/images/evolution/compose-message.png");
- 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, num_drop_types, 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_signal_connect (GTK_OBJECT (composer->hdrs), "from_changed",
- GTK_SIGNAL_FUNC (from_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_box_pack_start (GTK_BOX (vbox), composer->editor, TRUE, TRUE, 0);
-
- /* 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);
-
- /* If we show this widget earlier, we lose network transparency. i.e. the
- component appears on the machine evo is running on, ignoring any DISPLAY
- variable. */
- gtk_widget_show (composer->editor);
-
- e_msg_composer_show_attachments (composer, FALSE);
-
- prepare_engine (composer);
- gtk_signal_connect (GTK_OBJECT (composer), "map", map_default_cb, NULL);
-}
-
-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;
- }
-
- 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) {
- e_msg_composer_set_send_html (new, mail_config_get_send_html ());
- set_editor_text (new, "");
- }
-
- 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;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- text = mail_get_message_body (contents, FALSE, FALSE);
- if (text) {
- e_msg_composer_set_body_text (composer, text);
- g_free (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;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- text = mail_get_message_body (contents, FALSE, FALSE);
- if (text) {
- e_msg_composer_set_body_text (composer, text);
- g_free (text);
- }
- } else {
- /* this is a leaf of the tree, so attach it */
- e_msg_composer_attach (composer, mime_part);
- }
- }
-}
-
-/* FIXME: are there any other headers?? */
-/* This is a list of headers that we DO NOT want to append to the
- * extra_hdr_* arrays.
- *
- * Note: a '*' char can be used for a simple wilcard match.
- * is_special_header() will use g_strNcasecmp() with the first '*'
- * char being the end of the match string. If no '*' is present, then
- * it will be assumed that the header must be an exact match.
- */
-static char *special_headers[] = {
- "Subject",
- "Date",
- "From",
- "To",
- "Cc",
- "Bcc",
- "Received",
- "Message-Id",
- "X-Evolution*",
- "Content-*",
- "MIME-Version",
- NULL
-};
-
-static gboolean
-is_special_header (const char *hdr_name)
-{
- int i;
-
- for (i = 0; special_headers[i]; i++) {
- char *p;
-
- if ((p = strchr (special_headers[i], '*'))) {
- if (!g_strncasecmp (special_headers[i], hdr_name, p - special_headers[i]))
- return TRUE;
- } else {
- if (!g_strcasecmp (special_headers[i], hdr_name))
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-/**
- * 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;
- EDestination **Tov, **Ccv, **Bccv;
- const char *format, *subject, *account_name;
- CamelContentType *content_type;
- struct _header_raw *headers;
- EMsgComposer *new;
- XEvolution *xev;
- 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)) {
- EDestination *dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, addr);
- To = g_list_append (To, dest);
- }
- }
- Tov = e_destination_list_to_vector (To);
- g_list_free (To);
-
- 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)) {
- EDestination *dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, addr);
- Cc = g_list_append (Cc, dest);
- }
- }
- Ccv = e_destination_list_to_vector (Cc);
- g_list_free (Cc);
-
- 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)) {
- EDestination *dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, addr);
- Bcc = g_list_append (Bcc, dest);
- }
- }
-
- Bccv = e_destination_list_to_vector (Bcc);
- g_list_free (Bcc);
-
- /* Restore the Account preference */
- account_name = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Account");
- if (account_name) {
- while (*account_name && isspace ((unsigned) *account_name))
- account_name++;
- }
-
- e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject);
-
- e_destination_freev (Tov);
- e_destination_freev (Ccv);
- e_destination_freev (Bccv);
-
- /* Restore the format editing preference */
- format = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Format");
- if (format) {
- while (*format && isspace ((unsigned) *format))
- format++;
-
- if (!g_strcasecmp (format, "text/html"))
- e_msg_composer_set_send_html (new, TRUE);
- else
- e_msg_composer_set_send_html (new, FALSE);
- }
-
- /* Remove any other X-Evolution-* headers that may have been set */
- xev = mail_tool_remove_xevolution_headers (msg);
- mail_tool_destroy_xevolution (xev);
-
- /* set extra headers */
- headers = CAMEL_MIME_PART (msg)->headers;
- while (headers) {
- if (!is_special_header (headers->name)) {
- g_ptr_array_add (new->extra_hdr_names, g_strdup (headers->name));
- g_ptr_array_add (new->extra_hdr_values, g_strdup (headers->value));
- }
-
- headers = headers->next;
- }
-
- 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;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (msg));
- text = mail_get_message_body (contents, FALSE, FALSE);
- if (text) {
- e_msg_composer_set_body_text (new, text);
- g_free (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)) {
- EDestination *dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, addr);
-
- list = g_list_append (list, dest);
- }
- }
-
- return 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_in)
-{
- EMsgComposer *composer;
- EMsgComposerHdrs *hdrs;
- GList *to = NULL, *cc = NULL, *bcc = NULL;
- EDestination **tov, **ccv, **bccv;
- char *subject = NULL, *body = NULL;
- const char *p, *header;
- int len, clen;
- char *url, *content;
-
-
- g_return_val_if_fail (g_strncasecmp (url_in, "mailto:", 7) == 0, NULL);
-
- composer = e_msg_composer_new ();
- if (!composer)
- return NULL;
-
- url = g_strdup (url_in);
- camel_url_decode (url);
-
- /* 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, FALSE);
- 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;
- }
- }
- }
-
- tov = e_destination_list_to_vector (to);
- ccv = e_destination_list_to_vector (cc);
- bccv = e_destination_list_to_vector (bcc);
-
- g_list_free (to);
- g_list_free (cc);
- g_list_free (bcc);
-
- hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
-
- e_msg_composer_hdrs_set_to (hdrs, tov);
- e_msg_composer_hdrs_set_cc (hdrs, ccv);
- e_msg_composer_hdrs_set_bcc (hdrs, bccv);
-
- e_destination_freev (tov);
- e_destination_freev (ccv);
- e_destination_freev (bccv);
-
- 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, 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,
- EDestination **to,
- EDestination **cc,
- EDestination **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, 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 (E_IS_MSG_COMPOSER (composer), NULL);
-
- return build_message (composer);
-}
-
-CamelMimeMessage *
-e_msg_composer_get_message_draft (EMsgComposer *composer)
-{
- CamelMimeMessage *msg;
- const MailConfigAccount *account;
- gboolean old_send_html;
- gboolean old_pgp_sign;
- gboolean old_pgp_encrypt;
- gboolean old_smime_sign;
- gboolean old_smime_encrypt;
-
- /* always save drafts as HTML to preserve formatting */
- old_send_html = composer->send_html;
- composer->send_html = TRUE;
- old_pgp_sign = composer->pgp_sign;
- composer->pgp_sign = FALSE;
- old_pgp_encrypt = composer->pgp_encrypt;
- composer->pgp_encrypt = FALSE;
- old_smime_sign = composer->smime_sign;
- composer->smime_sign = FALSE;
- old_smime_encrypt = composer->smime_encrypt;
- composer->smime_encrypt = FALSE;
-
- msg = e_msg_composer_get_message (composer);
-
- composer->send_html = old_send_html;
- composer->pgp_sign = old_pgp_sign;
- composer->pgp_encrypt = old_pgp_encrypt;
- composer->smime_sign = old_smime_sign;
- composer->smime_encrypt = old_smime_encrypt;
-
- /* Attach account info to the draft. */
- account = e_msg_composer_get_preferred_account (composer);
- if (account && account->name)
- camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Account", account->name);
-
- return msg;
-}
-
-
-
-static void
-delete_old_signature (EMsgComposer *composer)
-{
- CORBA_Environment ev;
-
- /* printf ("delete_old_signature\n"); */
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-bod", &ev);
- if (GNOME_GtkHTML_Editor_Engine_searchByData (composer->editor_engine, 1, "ClueFlow", "signature", "1", &ev)) {
- /* printf ("found\n"); */
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "select-paragraph", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "delete", &ev);
- /* selection-move-right doesn't succeed means that we are already on the end of document */
- /* if (!rv)
- break; */
- GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "signature", "0", &ev);
- } else
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev);
- CORBA_exception_free (&ev);
-}
-
-/**
- * e_msg_composer_show_sig:
- * @composer: A message composer widget
- *
- * Set a signature
- **/
-void
-e_msg_composer_show_sig_file (EMsgComposer *composer)
-{
- CORBA_Environment ev;
- gchar *html;
-
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- /* printf ("set sig '%s' '%s'\n", sig_file, composer->sig_file); */
-
- composer->in_signature_insert = TRUE;
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_freeze (composer->editor_engine, &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-position-save", &ev);
- GNOME_GtkHTML_Editor_Engine_undo_begin (composer->editor_engine, "Set signature", "Reset signature", &ev);
-
- delete_old_signature (composer);
- html = get_signature_html (composer);
- if (html) {
- if (!GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (composer->editor_engine, &ev))
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev);
- /* printf ("insert %s\n", html); */
- GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "orig", "0", &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "indent-zero", &ev);
- GNOME_GtkHTML_Editor_Engine_insertHTML (composer->editor_engine, html, &ev);
- g_free (html);
- }
- GNOME_GtkHTML_Editor_Engine_undo_end (composer->editor_engine, &ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-position-restore", &ev);
- GNOME_GtkHTML_Editor_Engine_thaw (composer->editor_engine, &ev);
- CORBA_exception_free (&ev);
- composer->in_signature_insert = FALSE;
-}
-
-/**
- * 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)
-{
- CORBA_Environment ev;
-
- 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;
-
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "block-redraw", &ev);
- 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_show_sig_file (composer);
- GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "unblock-redraw", &ev);
- CORBA_exception_free (&ev);
-}
-
-/**
- * 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_smime_sign:
- * @composer: A message composer widget
- * @send_html: Whether the composer should have the "S/MIME Sign" flag set
- *
- * Set the status of the "S/MIME Sign" toggle item. The user can override it.
- **/
-void
-e_msg_composer_set_smime_sign (EMsgComposer *composer, gboolean smime_sign)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if (composer->smime_sign && smime_sign)
- return;
- if (!composer->smime_sign && !smime_sign)
- return;
-
- composer->smime_sign = smime_sign;
-
- bonobo_ui_component_set_prop (composer->uic, "/commands/SecuritySMimeSign",
- "state", composer->smime_sign ? "1" : "0", NULL);
-}
-
-/**
- * e_msg_composer_get_smime_sign:
- * @composer: A message composer widget
- *
- * Get the status of the "S/MIME Sign" flag.
- *
- * Return value: The status of the "S/MIME Sign" flag.
- **/
-gboolean
-e_msg_composer_get_smime_sign (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->smime_sign;
-}
-
-
-/**
- * e_msg_composer_set_smime_encrypt:
- * @composer: A message composer widget
- * @send_html: Whether the composer should have the "S/MIME Encrypt" flag set
- *
- * Set the status of the "S/MIME Encrypt" toggle item. The user can override it.
- **/
-void
-e_msg_composer_set_smime_encrypt (EMsgComposer *composer, gboolean smime_encrypt)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if (composer->smime_encrypt && smime_encrypt)
- return;
- if (!composer->smime_encrypt && !smime_encrypt)
- return;
-
- composer->smime_encrypt = smime_encrypt;
-
- bonobo_ui_component_set_prop (composer->uic, "/commands/SecuritySMimeEncrypt",
- "state", composer->smime_encrypt ? "1" : "0", NULL);
-}
-
-
-/**
- * e_msg_composer_get_smime_encrypt:
- * @composer: A message composer widget
- *
- * Get the status of the "S/MIME Encrypt" flag.
- *
- * Return value: The status of the "S/MIME Encrypt" flag.
- **/
-gboolean
-e_msg_composer_get_smime_encrypt (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->smime_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));
-}
-
-EDestination **
-e_msg_composer_get_recipients (EMsgComposer *composer)
-{
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return composer->hdrs ? e_msg_composer_hdrs_get_recipients (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
-}
-
-/**
- * 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 e3cc8537ee..0000000000
--- a/composer/e-msg-composer.h
+++ /dev/null
@@ -1,179 +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 <bonobo-conf/bonobo-config-database.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_ConfigDatabase config_db;
-
- char *charset;
-
- char *autosave_file;
- int autosave_fd;
-
- gboolean attachment_bar_visible : 1;
- gboolean send_html : 1;
- gboolean pgp_sign : 1;
- gboolean pgp_encrypt : 1;
- gboolean smime_sign : 1;
- gboolean smime_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;
-
- gboolean in_signature_insert : 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_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,
- EDestination **to,
- EDestination **cc,
- EDestination **bcc,
- const char *subject);
-void e_msg_composer_set_body_text (EMsgComposer *composer,
- const char *text);
-void e_msg_composer_add_header (EMsgComposer *composer,
- const char *name,
- const char *value);
-void e_msg_composer_attach (EMsgComposer *composer,
- CamelMimePart *attachment);
-CamelMimeMessage *e_msg_composer_get_message (EMsgComposer *composer);
-CamelMimeMessage *e_msg_composer_get_message_draft (EMsgComposer *composer);
-void e_msg_composer_show_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);
-
-EDestination **e_msg_composer_get_recipients (EMsgComposer *composer);
-
-const MailConfigAccount *e_msg_composer_get_preferred_account (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);
-
-/* PGP */
-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);
-
-/* S/MIME */
-void e_msg_composer_set_smime_sign (EMsgComposer *composer,
- gboolean smime_sign);
-gboolean e_msg_composer_get_smime_sign (EMsgComposer *composer);
-void e_msg_composer_set_smime_encrypt (EMsgComposer *composer,
- gboolean smime_encrypt);
-gboolean e_msg_composer_get_smime_encrypt (EMsgComposer *composer);
-gchar * e_msg_composer_get_sig_file_content (const char *sigfile,
- gboolean in_html);
-
-#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 41844a13dc..0000000000
--- a/composer/evolution-composer.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-composer.c
- *
- * 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: Dan Winship <danw@ximian.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 EDestination **
-corba_recipientlist_to_destv (const GNOME_Evolution_Composer_RecipientList *cl)
-{
- GNOME_Evolution_Composer_Recipient *recip;
- EDestination **destv;
- int i;
-
- if (cl->_length == 0)
- return NULL;
-
- destv = g_new (EDestination *, cl->_length+1);
-
- for (i = 0; i < cl->_length; ++i) {
- recip = &(cl->_buffer[i]);
-
- destv[i] = e_destination_new ();
-
- if (*recip->name)
- e_destination_set_name (destv[i], recip->name);
- e_destination_set_email (destv[i], recip->address);
-
- }
- destv[cl->_length] = NULL;
-
- return destv;
-}
-
-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;
- EDestination **tov, **ccv, **bccv;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- tov = corba_recipientlist_to_destv (to);
- ccv = corba_recipientlist_to_destv (cc);
- bccv = corba_recipientlist_to_destv (bcc);
-
- e_msg_composer_set_headers (composer->composer, NULL, tov, ccv, bccv, subject);
-
- e_destination_freev (tov);
- e_destination_freev (ccv);
- e_destination_freev (bccv);
-}
-
-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 GNOME_Evolution_Composer_AttachmentData *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->_buffer, data->_length,
- 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));
-}
-
-static void
-impl_Composer_send (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- send_cb (composer->composer, NULL);
-}
-
-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;
- epv->send = impl_Composer_send;
-
- 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;
-
- account = mail_config_get_default_account ();
- 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 9791a262fd..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 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: 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 d9141befaf..0000000000
--- a/composer/listener.c
+++ /dev/null
@@ -1,270 +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 Ximian, Inc.
- Authors: Radek Doulik <rodo@ximian.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, "cursor-position-save", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "select-paragraph-extended", 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);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "disable-selection", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "cursor-position-restore", ev);
-}
-
-static void
-clear_signature (GNOME_GtkHTML_Editor_Engine e, CORBA_Environment * ev)
-{
- if (GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (e, ev))
- GNOME_GtkHTML_Editor_Engine_setParagraphData (e, "signature", "0", ev);
- else if (GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty (e, ev)
- && GNOME_GtkHTML_Editor_Engine_runCommand (e, "cursor-backward", ev)) {
- GNOME_GtkHTML_Editor_Engine_setParagraphData (e, "signature", "0", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (e, "cursor-forward", 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);
- CORBA_any *rv = NULL;
-
- /* printf ("impl_event\n"); */
-
- if (!strcmp (name, "command")) {
- if (!l->composer->in_signature_insert) {
- CORBA_char *orig, *signature;
- /* FIXME check for insert-paragraph command */
- orig = GNOME_GtkHTML_Editor_Engine_getParagraphData (l->composer->editor_engine, "orig", ev);
- if (ev->_major == CORBA_NO_EXCEPTION) {
- if (orig && *orig == '1')
- reply_indent (l, ev);
- GNOME_GtkHTML_Editor_Engine_setParagraphData (l->composer->editor_engine, "orig", "0", ev);
- }
- signature = GNOME_GtkHTML_Editor_Engine_getParagraphData (l->composer->editor_engine, "signature", ev);
- if (ev->_major == CORBA_NO_EXCEPTION) {
- if (signature && *signature == '1')
- clear_signature (l->composer->editor_engine, 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);
- }
- } else if (!strcmp (name, "delete")) {
- CORBA_char *orig;
-
- if (GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (l->composer->editor_engine, ev)) {
- orig = GNOME_GtkHTML_Editor_Engine_getParagraphData (l->composer->editor_engine, "orig", ev);
- if (ev->_major == CORBA_NO_EXCEPTION) {
- if (orig && *orig == '1') {
- GNOME_GtkHTML_Editor_Engine_setParagraphData (l->composer->editor_engine, "orig", "0", ev);
-
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "indent-zero", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "style-normal", 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);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "insert-paragraph", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "delete-back", ev);
- }
- }
- }
- }
-
- 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 72e2cb697a..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 Ximian, Inc.
- Authors: Radek Doulik <rodo@ximian.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 073a701e14..0000000000
--- a/configure.in
+++ /dev/null
@@ -1,1191 +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=15
-EVOLUTION_MICRO_VERSION=99
-VERSION=$EVOLUTION_MAJOR_VERSION.$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION
-PACKAGE=evolution
-
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_SUBST(VERSION)
-
-AC_DEFUN(EVO_CHECK_LIB, [
- dispname="$1"
- pkgname="$2"
- minvers="$3"
- maxvers="$4"
-
- AC_MSG_CHECKING(for $dispname)
-
- 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;}'`
- cmpminvers=`echo $minvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- cmpmaxvers=`echo $maxvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- ok=yes
- if test "$pkgvers" -lt $cmpminvers; then
- ok=no
- elif test -n "$maxvers"; then
- if test "$pkgvers" -gt $cmpmaxvers; then
- ok=no
- elif test "$maxvers" != "$minvers" -a "$cmpmaxvers" -eq "$pkgvers"; then
- ok=no
- fi
- fi
- if test $ok = no; then
- case $maxvers in
- "")
- dispvers="$minvers or higher"
- ;;
- $minvers)
- dispvers="$minvers (exactly)"
- ;;
- *)
- dispvers="$minvers or higher, but less than $maxvers,"
- ;;
- esac
-
- AC_MSG_ERROR([
-""
-"You need $dispname $dispvers to build Evolution"
-"If you think you already have this installed, consult the README."])
- fi
-])
-
-SCROLLKEEPER_REQUIRED=0.1.4
-AC_SUBST(SCROLLKEEPER_REQUIRED)
-
-dnl Check for scrollkeeper
-AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
-if test x$SCROLLKEEPER_CONFIG = xno; then
- AC_MSG_ERROR(Couldn't find scrollkeeper-config -- please install the scrollkeeper package)
-fi
-SCROLLKEEPER_LOCALSTATE_DIR=`scrollkeeper-config --pkglocalstatedir`
-AC_SUBST(SCROLLKEEPER_LOCALSTATE_DIR)
-
-dnl Test whether jw is installed
-AC_PATH_PROG(JW,jw,no)
-if test x$JW = xno; then
- HAVE_JW="no"
-else
- HAVE_JW="yes"
-fi
-AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
-AC_SUBST(HAVE_JW)
-
-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, gnome, 1.2.9)
-
-ALL_LINGUAS="az bg ca da de el en_GB es fi fr ga gl hu it ja ko lt nl nn no pl pt pt_BR ro 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 -a '!' -h /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")
-
-case `ls -ld $system_mail_dir 2>&1 | awk '{print $1;}'` in
-d??????rw?)
- CAMEL_LOCK_HELPER_USER=""
- CAMEL_LOCK_HELPER_GROUP=""
- system_mail_perm="world writable"
- ;;
-
-d???rw????)
- CAMEL_LOCK_HELPER_USER=""
- CAMEL_LOCK_HELPER_GROUP=`ls -ld $system_mail_dir 2>&1 | awk '{print $4;}'`
- system_mail_perm="writable by group $CAMEL_LOCK_HELPER_GROUP"
- ;;
-
-drw???????)
- CAMEL_LOCK_HELPER_USER=`ls -ld $system_mail_dir 2>&1 | awk '{print $3;}'`
- CAMEL_LOCK_HELPER_GROUP=""
- system_mail_perm="writable by user $CAMEL_LOCK_HELPER_USER"
- ;;
-
-*)
- CAMEL_LOCK_HELPER_USER=""
- CAMEL_LOCK_HELPER_GROUP=""
- system_mail_perm="???"
- ;;
-esac
-
-AC_MSG_RESULT([$system_mail_dir, $system_mail_perm])
-AC_SUBST(CAMEL_LOCK_HELPER_USER)
-AC_SUBST(CAMEL_LOCK_HELPER_GROUP)
-
-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_CHECK_FUNCS(gethostbyname_r,[
-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 * db3 stuff
-dnl ***********
-
-# To ensure that any copy of evolution of a given version can read
-# the data files of any other copy, we require a precise db3 version.
-# This can only change between Evolution versions (and then can only
-# go up.)
-evolution_db_version_major=3
-evolution_db_version_minor=1
-evolution_db_version_patch=17
-
-evolution_db_version=${evolution_db_version_major}.${evolution_db_version_minor}.${evolution_db_version_patch}
-AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_MAJOR,$evolution_db_version_major)
-AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_MINOR,$evolution_db_version_minor)
-AC_DEFINE_UNQUOTED(EVOLUTION_DB_VERSION_PATCH,$evolution_db_version_patch)
-
-
-AC_ARG_WITH(db3, [ --with-db3=PREFIX Location of db3],
- [with_db3_includes="$withval/include"
- with_db3_libs="$withval/lib"])
-AC_ARG_WITH(db3-includes, [ --with-db3-includes=PATH Location of db3 includes],
- with_db3_includes="$withval")
-AC_ARG_WITH(db3-libs, [ --with-db3-libs=PATH Location of db3 libs],
- with_db3_libs="$withval")
-
-if test -z "$with_db3_libs"; then
- with_db3_libs="/usr/lib"
-fi
-
-dnl The AC_CACHE_CHECK lets you avoid having to specify --with-db3
-dnl again with later configures
-AC_CACHE_CHECK([for db3 compiler flags], ac_cv_db3_cflags,
-[
- if test -n "${with_db3_includes}"; then
- ac_cv_db3_cflags="-I$with_db3_includes"
- fi
-])
-DB3_CFLAGS=$ac_cv_db3_cflags
-AC_SUBST(DB3_CFLAGS)
-
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="$DB3_CFLAGS $CPPFLAGS"
-AC_CHECK_HEADERS(db.h db3/db.h, break)
-
-AC_CACHE_CHECK([db3 header version], ac_cv_db3_header_version,
-[
- AC_TRY_COMPILE([
- #ifdef HAVE_DB3_DB_H
- #include <db3/db.h>
- #else
- #include <db.h>
- #endif
- ],[
- #if DB_VERSION_MAJOR != $evolution_db_version_major || \
- DB_VERSION_MINOR != $evolution_db_version_minor || \
- DB_VERSION_PATCH != $evolution_db_version_patch
- #error
- #endif
- ], :, AC_MSG_ERROR(Found db.h is not version $evolution_db_version))
-
- ac_cv_db3_header_version=$evolution_db_version
-])
-
-AC_CACHE_CHECK([for db3 library name], ac_cv_db3_ldadd,
-[
- LIBS_save="$LIBS"
- ac_cv_db3_ldadd=""
-
- for name in db db3 db-3.1; do
- LIBS="$LIBS_save $with_db3_libs/lib${name}.a"
- AC_TRY_LINK([
- #ifdef HAVE_DB3_DB_H
- #include <db3/db.h>
- #else
- #include <db.h>
- #endif
- ],[
- DB *db;
- db_create (&db, 0, 0);
- ], [
- ac_cv_db3_ldadd="$with_db3_libs/lib${name}.a"
- break
- ])
- done
- LIBS="$LIBS_save"
-
- if test -z "$ac_cv_db3_ldadd"; then
- AC_MSG_ERROR(Could not find db3 library)
- fi
-])
-DB3_LDADD=$ac_cv_db3_ldadd
-AC_SUBST(DB3_LDADD)
-
-AC_CACHE_CHECK([that db3 library version matches header version], ac_cv_db3_lib_version_match,
-[
- LIBS="$DB3_LDADD $LIBS"
- AC_TRY_RUN([
- #ifdef HAVE_DB3_DB_H
- #include <db3/db.h>
- #else
- #include <db.h>
- #endif
-
- int
- main (void)
- {
- int major, minor, patch;
-
- db_version (&major, &minor, &patch);
- return !(major == DB_VERSION_MAJOR &&
- minor == DB_VERSION_MINOR &&
- patch == DB_VERSION_PATCH);
- }
- ], ac_cv_db3_lib_version_match=yes, ac_cv_db3_lib_version_match=no,
- ac_cv_db3_lib_version_match=yes)
-])
-if test "$ac_cv_db3_lib_version_match" = no; then
- AC_MSG_ERROR(db3 headers and library do not match... multiple copies installed?)
-fi
-
-CPPFLAGS="$CPPFLAGS_save"
-LIBS="$LIBS_save"
-
-
-dnl **************************************************
-dnl * ldap related stuff.
-dnl **************************************************
-AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution])
-AC_ARG_WITH(static-ldap, [ --with-static-ldap=[no/yes] Link LDAP support statically into evolution ])
-AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=no}")
-case $ac_cv_with_openldap in
-no|"")
- msg_ldap=no
- ;;
-yes)
- with_openldap=/usr
- msg_ldap=yes
- ;;
-*)
- with_openldap=$ac_cv_with_openldap
- LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
- LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
- msg_ldap=yes
- ;;
-esac
-
-if test "$msg_ldap" = yes; then
-
- AC_DEFINE(HAVE_LDAP)
-
- if test -f $with_openldap/lib/libldap.la; then
- msg_ldap_linktype="(static)"
- else
- msg_ldap_linktype="(dynamic)"
- fi
-
-
- if test "${with_static_ldap+set}" = set; then
- case $with_static_ldap in
- no|"")
- msg_ldap_linktype="(dynamic)"
- ;;
- *)
- msg_ldap_linktype="(static)"
- ;;
- esac
- fi
-
- AC_CACHE_CHECK(if OpenLDAP is version 2.x, ac_cv_openldap_version2, [
- CPPFLAGS_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $LDAP_CFLAGS"
- AC_EGREP_CPP(yes, [
- #include "ldap.h"
- #if LDAP_VENDOR_VERSION > 20000
- yes
- #endif
- ], ac_cv_openldap_version2=yes, ac_cv_openldap_version2=no)
- CPPFLAGS="$CPPFLAGS_save"
- ])
- if test "$ac_cv_openldap_version2" = no; then
- AC_MSG_ERROR(evolution requires OpenLDAP version >= 2)
- fi
-
- AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="-lresolv")
- AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
- AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
- AC_CHECK_LIB(lber, ber_get_tag, [
- if test "$msg_ldap_linktype" = "(static)"; then
- LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS"
-
- # libldap might depend on OpenSSL... We need to pull
- # in the dependency libs explicitly here since we're
- # not using libtool for the configure test.
- if test -f $with_openldap/lib/libldap.la; then
- LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
- fi
- else
- LDAP_LIBS="-llber $LDAP_LIBS"
- fi
- AC_CHECK_LIB(ldap, ldap_open, [
- if test $msg_ldap_linktype = "(static)"; then
- LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS"
- else
- LDAP_LIBS="-lldap $LDAP_LIBS"
- fi],
- LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
- LDAP_LIBS="$LDAP_LDFLAGS $LDAP_LIBS"
- ], LDAP_LIBS="", $LDAP_LDFLAGS $LDAP_LIBS)
-
- if test -z "$LDAP_LIBS"; then
- AC_MSG_ERROR(could not find OpenLDAP libraries)
- elif test "$msg_ldap_linktype" = "(static)"; then
- LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic"
- fi
-
- AC_SUBST(LDAP_CFLAGS)
- AC_SUBST(LDAP_LIBS)
-fi
-AM_CONDITIONAL(ENABLE_LDAP, test $msg_ldap = yes)
-
-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
-
-GLIB_CONFIG=${GLIB_CONFIG-glib-config}
-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 * sendmail operation
-dnl **************************************************
-
-AC_MSG_CHECKING(for SunOS broken spool format)
-if test "x$host_os" = "xsunos" ; then
- with_broken_spool="yes"
-fi
-
-AC_ARG_WITH(broken-spool,
-[ --with-broken-spool=[yes/no] Using SunOS/Solaris sendmail which has a broken spool format],,with_broken_spool=${with_broken_spool:=no})
-
-if test "x$with_broken_spool" = "xyes"; then
- AC_DEFINE(HAVE_BROKEN_SPOOL)
-fi
-
-AC_MSG_RESULT($with_broken_spool)
-
-dnl ***************
-dnl GNOME Libraries
-dnl ***************
-EVO_CHECK_LIB(Bonobo, bonobox, 1.0.3)
-EVO_CHECK_LIB(OAF, oaf, 0.6.2)
-EVO_CHECK_LIB(libglade, libglade, 0.14)
-EVO_CHECK_LIB(gdk-pixbuf with GNOME canvas support, gnomecanvaspixbuf, 0.9.0)
-EVO_CHECK_LIB(GAL, gal, 0.13)
-EVO_CHECK_LIB(GtkHTML, gtkhtml, 0.14)
-EVO_CHECK_LIB(GNOME-VFS, vfs, 1.0)
-EVO_CHECK_LIB(libxml, xml, 1.8.10, 2.0)
-EVO_CHECK_LIB(bonobo-conf, bonobo_conf, 0.11)
-
-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)
-
-GAL_CFLAGS="`gnome-config --cflags gal`"
-GAL_LIBS="`gnome-config --libs gal`"
-AC_SUBST(GAL_CFLAGS)
-AC_SUBST(GAL_LIBS)
-
-BONOBO_CONF_CFLAGS="`gnome-config --cflags bonobo_conf`"
-BONOBO_CONF_LIBS="`gnome-config --libs bonobo_conf`"
-AC_SUBST(BONOBO_CONF_CFLAGS)
-AC_SUBST(BONOBO_CONF_LIBS)
-
-EXTRA_GNOME_LIBS="`gnome-config --libs libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_LIBS"
-EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_CFLAGS"
-
-AC_SUBST(EXTRA_GNOME_LIBS)
-AC_SUBST(EXTRA_GNOME_CFLAGS)
-
-BONOBO_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $OAF_LIBS"
-BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $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"
-BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_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)
-
-BONOBO_CONF_CFLAGS="`gnome-config --cflags bonobo_conf`"
-BONOBO_CONF_LIBS="`gnome-config --libs bonobo_conf`"
-AC_SUBST(BONOBO_CONF_CFLAGS)
-AC_SUBST(BONOBO_CONF_LIBS)
-
-GTKHTML_CFLAGS="`gnome-config --cflags gtkhtml`"
-GTKHTML_LIBS="`gnome-config --libs gtkhtml`"
-GTKHTML_DATADIR=`gnome-config --moddatadir gtkhtml`
-AC_SUBST(GTKHTML_CFLAGS)
-AC_SUBST(GTKHTML_LIBS)
-AC_SUBST(GTKHTML_DATADIR)
-
-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)
-
-CAMEL_CFLAGS="`gnome-config --cflags gal xml` $THREADS_CFLAGS"
-CAMEL_LIBS="`gnome-config --libs gal xml` $THREADS_LIBS"
-AC_SUBST(CAMEL_CFLAGS)
-AC_SUBST(CAMEL_LIBS)
-
-MAILER_CFLAGS="`gnome-config --cflags gtkhtml libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal bonobo_conf bonobox bonobox_print vfs` $THREADS_CFLAGS"
-MAILER_LIBS="`gnome-config --libs gtkhtml libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal bonobo_conf bonobox bonobox_print vfs` $THREADS_LIBS"
-AC_SUBST(MAILER_CFLAGS)
-AC_SUBST(MAILER_LIBS)
-
-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 Pedantic PGP/MIME
-dnl ==========================
-AC_ARG_ENABLE(pedantic-pgp-mime,
-[ --enable-pedantic-pgp-mime=[no/yes] Enable pedantic PGP/MIME handling (not recommended)],,enable_pedantic_pgp_mime=no)
-if test "x$enable_pedantic_pgp_mime" = "xyes"; then
- AC_DEFINE(ENABLE_PEDANTIC_PGPMIME)
-fi
-
-
-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 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="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
- 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")
-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("")
-
- if test "x${with_nspr_includes}" != "x"; then
- CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
- else
- CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
- fi
-
- AC_CHECK_HEADERS(nss.h ssl.h smime.h,
- [ have_nss_includes="yes" ],
- [ have_nss_includes="no" ])
-
- CPPFLAGS="$CPPFLAGS_save"
-
- if test "x${have_nss_includes}" = xyes ; 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.],
- 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="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
- nsslibs="-lssl3 -lsmime3 -lnss3"
- AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
- [
- LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -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 OpenSSL
-dnl ******************************
-
-if test "x${msg_nss}" != "xyes"; then
- AC_ARG_WITH(openssl-includes, [ --with-openssl-includes=PREFIX Location of OpenSSL includes.],
- with_openssl_includes="$withval", with_openssl_includes="/usr/include")
- have_openssl_includes="no"
- if test "x${with_openssl_includes}" != "xno"; then
- CPPFLAGS_save="$CPPFLAGS"
-
- AC_MSG_CHECKING(for OpenSSL includes)
- AC_MSG_RESULT("")
-
- CPPFLAGS="$CPPFLAGS -I$with_openssl_includes"
- AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h, [ openssl_includes="yes" ])
- CPPFLAGS="$CPPFLAGS_save"
-
- if test "x{$openssl_includes}" != "xno" -a "x{$openssl_includes}" != "x"; then
- have_openssl_includes="yes"
- OPENSSL_CFLAGS="-I$with_openssl_includes"
- else
- OPENSSL_CFLAGS=""
- fi
- else
- AC_MSG_CHECKING(for OpenSSL includes)
- AC_MSG_RESULT(no)
- fi
-
- AC_ARG_WITH(openssl-libs, [ --with-openssl-libs=PREFIX Location of OpenSSL libs.],
- with_openssl_libs="$withval")
- msg_openssl="no"
- if test "x${with_openssl_libs}" != "xno" -a "x${have_openssl_includes}" != "xno"; then
- LDFLAGS_save="$LDFLAGS"
-
- case $with_openssl_libs in
- ""|-L*) ;;
- *) with_openssl_libs="-L$with_openssl_libs" ;;
- esac
-
- AC_CHECK_LIB(dl, dlopen, DL_LDFLAGS="-ldl", DL_LDFLAGS="")
- AC_CACHE_CHECK([for OpenSSL libraries], openssl_libs,
- [
- LDFLAGS="$LDFLAGS $with_openssl_libs -lssl -lcrypto $DL_LDFLAGS"
- AC_TRY_LINK_FUNC(SSL_read, openssl_libs="yes", openssl_libs="no")
- LDFLAGS="$LDFLAGS_save"
- ])
- if test "x${openssl_libs}" != "xno"; then
- AC_DEFINE(HAVE_OPENSSL)
- msg_openssl="yes"
- OPENSSL_LDFLAGS="$with_openssl_libs -lssl -lcrypto $DL_LDFLAGS"
- else
- OPENSSL_CFLAGS=""
- OPENSSL_LDFLAGS=""
- fi
- else
- AC_MSG_CHECKING(for OpenSSL libraries)
- AC_MSG_RESULT(no)
- fi
-else
- OPENSSL_CFLAGS=""
- OPENSSL_LDFLAGS=""
- msg_openssl="no"
-fi
-
-AC_SUBST(OPENSSL_CFLAGS)
-AC_SUBST(OPENSSL_LDFLAGS)
-
-dnl ******************************
-dnl See if we have SSL support
-dnl ******************************
-
-if test "x${msg_nss}" != "xno" -o "x${msg_openssl}" != "xno"; then
- msg_ssl="yes"
- AC_DEFINE(HAVE_SSL)
-else
- msg_ssl="no"
-fi
-
-##################################################
-# Check for gtk-doc.
-##################################################
-
-AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
-
-if test "x$with_html_dir" = "x" ; then
- HTML_DIR='${datadir}/gnome/html'
-else
- HTML_DIR=$with_html_dir
-fi
-
-AC_SUBST(HTML_DIR)
-
-AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
-
-gtk_doc_min_version=0.6
-if $GTKDOC ; then
- gtk_doc_version=`gtkdoc-mkdb --version`
- AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
- if perl <<EOF ; then
- exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
- ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
-EOF
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- GTKDOC=false
- fi
-fi
-
-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
-
-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 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
-addressbook/Makefile
-addressbook/backend/Makefile
-addressbook/backend/ebook/Makefile
-addressbook/backend/idl/Makefile
-addressbook/backend/pas/Makefile
-addressbook/conduit/Makefile
-addressbook/gui/Makefile
-addressbook/gui/component/Makefile
-addressbook/gui/component/select-names/Makefile
-addressbook/gui/contact-editor/Makefile
-addressbook/gui/contact-list-editor/Makefile
-addressbook/gui/merging/Makefile
-addressbook/gui/search/Makefile
-addressbook/gui/widgets/Makefile
-addressbook/printing/Makefile
-art/Makefile
-calendar/Makefile
-calendar/cal-client/Makefile
-calendar/cal-util/Makefile
-calendar/conduits/Makefile
-calendar/conduits/calendar/Makefile
-calendar/conduits/todo/Makefile
-calendar/gui/Makefile
-calendar/gui/alarm-notify/Makefile
-calendar/gui/dialogs/Makefile
-calendar/idl/Makefile
-calendar/pcs/Makefile
-camel/Makefile
-camel/providers/Makefile
-camel/providers/imap/Makefile
-camel/providers/local/Makefile
-camel/providers/nntp/Makefile
-camel/providers/pop3/Makefile
-camel/providers/sendmail/Makefile
-camel/providers/smtp/Makefile
-camel/tests/Makefile
-camel/tests/folder/Makefile
-camel/tests/lib/Makefile
-camel/tests/message/Makefile
-camel/tests/mime-filter/Makefile
-camel/tests/misc/Makefile
-camel/tests/smime/Makefile
-camel/tests/stream/Makefile
-composer/Makefile
-data/Makefile
-default_user/Makefile
-default_user/local/Calendar/Makefile
-default_user/local/Contacts/Makefile
-default_user/local/Drafts/Makefile
-default_user/local/Inbox/Makefile
-default_user/local/Makefile
-default_user/local/Outbox/Makefile
-default_user/local/Sent/Makefile
-default_user/local/Tasks/Makefile
-default_user/local/Trash/Makefile
-doc/Makefile
-doc/devel/Makefile
-doc/devel/calendar/Makefile
-doc/devel/calendar/cal-client/Makefile
-doc/devel/calendar/cal-util/Makefile
-e-util/Makefile
-e-util/ename/Makefile
-filter/Makefile
-help/C/Makefile
-help/Makefile
-help/no/Makefile
-importers/Makefile
-intl/Makefile
-libibex/Makefile
-libversit/Makefile
-libwombat/Makefile
-macros/Makefile
-mail/Makefile
-mail/importers/Makefile
-my-evolution/Makefile
-omf-install/Makefile
-po/Makefile.in
-shell/Makefile
-shell/glade/Makefile
-shell/importer/Makefile
-tools/Makefile
-ui/Makefile
-views/Makefile
-views/addressbook/Makefile
-views/calendar/Makefile
-views/mail/Makefile
-views/tasks/Makefile
-widgets/Makefile
-widgets/e-timezone-dialog/Makefile
-widgets/menus/Makefile
-widgets/misc/Makefile
-wombat/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, $system_mail_perm
- LDAP support: $msg_ldap $msg_ldap_linktype
- NNTP support: $msg_nntp
- Pilot conduits: $msg_pilot
- Kerberos 4/5: $msg_krb4/$msg_krb5
- SSL support: $msg_ssl
- S/MIME 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 f72de6399b..0000000000
--- a/data/evolution.mime
+++ /dev/null
@@ -1,5 +0,0 @@
-text/x-vcard
- ext: vcf
-
-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 0f7a37d855..0000000000
--- a/default_user/ChangeLog
+++ /dev/null
@@ -1,242 +0,0 @@
-2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Add mkdir config in dist-hook here instead.
-
-2001-09-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * config/: Added.
-
-2001-08-16 Peter Williams <peterw@ximian.com>
-
- * searches.xml: Implement "Message Contains" (searches sender,
- recipients, subject, and body) and make it first.
-
-2001-08-14 Peter Williams <peterw@ximian.com>
-
- * searches.xml: Rename <title> to <_title> so that these fields can
- be translated.
-
-2001-08-09 Chris Toshok <toshok@ximian.com>
-
- * addressbook-sources.xml: remove the description field.
-
-2001-08-07 Chris Toshok <toshok@ximian.com>
-
- * addressbook-sources.xml: giving up for now. removed netcenter.
-
-2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * searches.xml: So it turns out that I needed to name the
- recipient's part name to "to" instead of "recipient" because they
- need to match whatever is in vfoldertypes.xml. I also changed the
- "type" to "address" which is what the vfoldertypes.xml
- specifies. Unfortunately, it's still not working? At least it's
- probably more correct now...
-
-2001-07-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * searches.xml: Moved "Sender-contains" to the top of the list and
- added a Recipient contains item. This fixes bugs #4888 and #5668.
-
-2001-07-30 Jason Leach <jleach@ximian.com>
-
- * Makefile.am (install-data-hook): Only try to make a
- $(defaultdir)/news if building with NNTP support.
-
-2001-07-19 Chris Toshok <toshok@ximian.com>
-
- * addressbook-sources.xml: remove all the servers that just don't
- work anymore, and add Verisign's directory.
-
-2001-07-03 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (default_DATA): Remove `shortcuts.xml'. The shell
- is now able to create that by itself.
-
-2001-06-07 Iain Holmes <iain@ximian.com>
-
- * shortcuts.xml: Removed the references to local/Executive-Summary.
-
- * local/Executive-Summary: Removed.
-
-2001-05-08 Not Zed <NotZed@Ximian.com>
-
- * searches.xml: Reverted Gediminas patch.
-
-2001-05-08 Gediminas Paulauskas <menesis@delfi.lt>
-
- * searches.xml: replace title> with _title>. Part of fix to #2253.
-
-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 29a2e18945..0000000000
--- a/default_user/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-SUBDIRS = local
-
-defaultdir = $(datadir)/evolution/default_user
-default_DATA = addressbook-sources.xml searches.xml
-
-EXTRA_DIST = $(default_DATA)
-
-install-data-hook:
-if ENABLE_NNTP
- -mkdir $(defaultdir)/news
- -mkdir $(defaultdir)/config
-endif
diff --git a/default_user/addressbook-sources.xml b/default_user/addressbook-sources.xml
deleted file mode 100644
index a2d3d49049..0000000000
--- a/default_user/addressbook-sources.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<addressbooks>
- <contactserver>
- <name>Bigfoot</name>
- <host>ldap.bigfoot.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <scope>one</scope>
- </contactserver>
- <contactserver>
- <name>Verisign</name>
- <host>directory.verisign.com</host>
- <port>389</port>
- <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/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 a1baef5052..0000000000
--- a/default_user/local/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-SUBDIRS = \
- Calendar \
- Contacts \
- Drafts \
- 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 6b08f8eda2..0000000000
--- a/default_user/searches.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<filteroptions>
- <ruleset>
- <rule grouping="any" source="demand">
- <_title>Message contains</_title>
- <partset>
- <part name="subject">
- <value name="subject-type" type="option" value="contains"/>
- <value name="subject" type="string"/>
- </part>
- <part name="body">
- <value name="body-type" type="option" value="contains"/>
- <value name="word" type="string"/>
- </part>
- <part name="sender">
- <value name="sender-type" type="option" value="contains"/>
- <value name="sender" type="string"/>
- </part>
- <part name="to">
- <value name="recipient-type" type="option" value="contains"/>
- <value name="recipient" type="address"/>
- </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>
-
- <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"/>
- </part>
- <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>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>Recipients contain</_title>
- <partset>
- <part name="to">
- <value name="recipient-type" type="option" value="contains"/>
- <value name="recipient" type="address"/>
- </part>
- </partset>
- <sources/>
- </rule>
- </ruleset>
-</filteroptions>
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/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 8b510dad7a..0000000000
--- a/doc/Camel-Classes
+++ /dev/null
@@ -1,65 +0,0 @@
-CamelException
-CamelLock
-CamelLockClient
-CamelLockHelper
-CamelMovemail
-CamelOperation
-CamelProvider
-CamelUIDCache
-CamelURL
-CamelObject
- + CamelAddress
- | + CamelInternetAddress
- | ` CamelNewsAddress
- + CamelDataWrapper
- | + CamelMedium
- | | ` CamelMimePart
- | | ` CamelMimeMessage
- | ` CamelMultipart
- + CamelCipherContext
- | ` CamelPgpContext
- + CamelCMSContext
- | ` CamelSMimeContext
- + CamelDiscoDiary
- + CamelFolder
- | + CamelDiscoFolder
- | ` CamelVeeFolder
- | ` CamelVTrashFolder
- + CamelFolderSearch
- + CamelFolderSummary
- + CamelMimeFilter
- | + CamelMimeFilterBasic
- | + CamelMimeFilterBestenc
- | + CamelMimeFilterCharset
- | + CamelMimeFilterCRLF
- | + CamelMimeFilterFrom
- | + CamelMimeFilterIndex
- | + CamelMimeFilterLinewrap
- | + CamelMimeFilterSave
- | ` CamelMimeFilterStripHeader
- + CamelSasl
- | + CamelSaslAnonymous
- | + CamelSaslCramMD5
- | + CamelSaslDigestMD5
- | + CamelSaslKerberos
- | + CamelSaslLogin
- | ` CamelSaslPlain
- + CamelService
- | + CamelStore
- | | + CamelRemoteStore
- | | | ` CamelDiscoStore
- | | ` CamelVeeStore
- | ` CamelTransport
- + CamelSession
- ` CamelStream
- + CamelSeekableStream
- | + CamelSeekableSubstream
- | + CamelStreamFs
- | ` CamelStreamMem
- + CamelStreamBuffer
- + CamelStreamFilter
- + CamelStreamNull
- ` CamelTcpStream
- + CamelTcpStreamOpenSSL
- + CamelTcpStreamRaw
- ` CamelTcpStreamSSL
diff --git a/doc/ChangeLog b/doc/ChangeLog
deleted file mode 100644
index e7dd37db31..0000000000
--- a/doc/ChangeLog
+++ /dev/null
@@ -1,1146 +0,0 @@
-2001-08-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/Makefile.am: Small fix to build.
- * C/evolution-C.omf: Small fix. Remove an extra space.
- * no/Makefile.am: Same here.
- * no/evolution-no.omf: And here.
-
-2001-08-15 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Updated one line about bullet points.
-
-2001-08-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * no/*: Added beginnings of a Norwegian translation.
- * sgmldocs.make: Forgot to add this. Kinda important.
- * C/*.sgml: s/fig/figures/
- * C/Makefile.am: Make it use the sgmldocs.make framework.
-
-2001-08-14 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: Commented out menuref.
- * C/usage-contact.sgml: Commented out menuref.
- * C/evolution.sgml: commented out menuref.
- * C/preface.sgml: commented out menuref.
-
-2001-08-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/apx-authors.sgml: Added missing ;'s after entities.
- * C/evolution-C.omf: s/en/C in Language.
- * C/usage-mail-org.sgml: Add missing ;.
- * C/usage-mainwindow.sgml: Same here.
-
-2001-08-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: Switched all images in entire document to
- *not* use file extensions, so that they work properly with
- db2ps. This doesn't completely fix the db2ps issues, but it's
- apparently the right way to do this.
-
-2001-08-09 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.sgml: Made sharing tip an orderedlist.
-
-2001-08-08 Kevin Breit <battery841@mediaone.net>
-
- * C/config-prefs.sgml: Add information about sharing mailbox files.
-
-2001-08-03 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Add information about gathering actions.
-
-2001-08-02 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Added a <tip> for scrolling through mails.
-
-2001-07-30 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Fixed some breakage Aaron caused.
-
-2001-07-26 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: revised.
-
- * C/usage-mail.sgml: revisions and stuff.
-
-2001-07-24 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Reworded a few questions.
-
-2001-07-23 Kevin Breit <battery841@mediaone.net>
-
- * C/Makefile.am: Pulled instance of config-setupassist.sgml to make stuff build right.
-
-2001-07-23 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: validated.
-
- * C/config-setupassist.sgml: Removed.
-
- * C/evolution.sgml: removed config-setupassist.
-
- * C/usage-exec-summary.sgml: Minor revisions.
-
- * C/usage-contact.sgml: Added 'format="png"' to all <image> tags
- missing the attribute.
-
- * C/usage-calendar.sgml: Added 'format="png"' to all <image> tags
- missing the attribute.
-
- * C/usage-mail.sgml: Added 'format="png"' to all <image> tags
- missing the attribute.
-
- * C/usage-mainwindow.sgml: Style. Merged info from preface. Added
- 'format="png"' to all <image> tags missing the attribute.
-
- * C/preface.sgml: Style changes. Removed info that was duplicated
- in mainwindow.sgml.
-
-2001-07-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mainwindow.sgml: Fixed the first time druid stuff a little more.
-
-2001-07-16 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Sepllcheck.
-
-2001-07-15 Kevin Breit <battery841@mediaone.net>
-
- * C/config-sync.sgml: Updated slightly for new design.
-
-2001-07-13 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mainwindow.sgml: Added lots of good stuff with the first time druid.
-
-2001-07-12 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: TYPO fixing.
-
-2001-07-12 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Added "get bt for component-only crash" qandaentry.
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * */Makefile.am (dist-hook): Clean up make dist.
-
-2001-07-11 Aaron Weber <aaron@ximian.com>
-
- * C/evolution.sgml: validation on usage-mainwindow and usage-contact.
-
-2001-07-11 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: More edits.
-
- * C/usage-contact.sgml: Sick amounts of changes too!
-
- * C/usage-mail-org.sgml: Heavy editing...touched almost everything.
-
- * C/usage-exec-summary.sgml: Minor change. There was only one change for this chapter, cuz I'm such a 'godly' writer...yeah.
-
- * C/usage-mainwindow.sgml: A bit of editing.
-
- * C/preface.sgml: Screwed with the examples and did some cleanup.
-
-2001-07-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: validation.
-
-2001-07-10 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Added <application> tags
-
- * C/usage-mail-org.sgml: Added <application> tags
-
- * C/config-prefs.sgml: Added <application> tags
-
-2001-07-09 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-exec-summary.sgml: Editing
-
- * C/usage-mail.sgml: Editing
-
- * C/usage-mail-org.sgml: Editing
-
- * C/usage-calendar.sgml: Editing
-
- * C/usage-contact.sgml: Editing
-
- * C/usage-mail-org.sgml: Mention UNMATCHED
-
- * C/usage-mail.sgml: Commented on trash being a vFolder
-
-2001-07-06 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Spell check
-
- * C/usage-calendar.sgml: Spell check
-
-2001-07-05 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mainwindow.sgml: Added orderedlists.
-
- * C/usage-exec-summary.sgml: Added orderedlists.
-
- * C/usage-contact.sgml: Added orderedlists.
-
- * C/usage-mail-org.sgml: Added orderedlists.
-
-2001-07-03 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Put in lots of orderedlists...more SGML, less
- for the user to read. They'll thank me in droves later.
-
- * C/usage-exec-summary.sgml: Fixed build error
-
-2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * white-papers/mail/camel.sgml: Updated slightly.
-
- * Camel-Classes: Updated.
-
-2001-07-02 Kevin Breit <battery841@mediaone.net>
-
- * C/apx-common-tasks.sgml: Created its own file.
-
- * C/usage-mainwindow.sgml: You name it.
-
- * C/preface.sgml: Pulled shortcuts from here into its own apx
-
- * C/evolution.sgml: Reordered entities
-
-2001-06-30 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Pulled organizing stuff, made its own file.
-
-2001-06-26 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Revised move/rename/copy questions, now
- that these functions work.
-
-2001-06-25 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Now that bug-buddy works with our
- bugzilla, update faq to reflect it.
-
-2001-06-25 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Put config-encryption in usage-mail.sgml.
- config-encryption.sgml should be depreciated.
-
- * C/usage-contact.sgml: Fixed typo
-
- * C/usage-mail.sgml: Added info about mailing lists Elaborated on
- mailing lists
-
- * C/usage-exec-summary.sgml: Fixed a few typos
-
- * C/preface.sgml: Added section for importing files
-
- * C/usage-calendar.sgml: Removed some *'s that are causing
- problems.
-
-2001-06-22 Kevin Breit <battery841@mediaone.net>
-
- * C/preface.sgml: Put in Contacts information in the quicktasks.
-
- * C/usage-mail.sgml: Pulled some redundant information.
-
-2001-06-21 battery841 <battery841@mediaone.net>
-
- * C/preface.sgml, C/fig/mail-inbox.png, C/fig/mainwindow-pic.png,
- C/usage-mail.sgml: Updated screenshots and redid layout for
- graphics on pages.
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-contact.sgml: Fixed .gif problem
-
- * C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Specify the file format
-
- * C/usage-contact.sgml, C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Trying to fix the .gif problem
-
- * C/fig/calendar.png, C/fig/contact.png, C/usage-calendar.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Redid graphics to add labels to them and
- described the labels in text.
-
- * C/config-encryption.sgml, C/evolution.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/evolution.sgml: Added config-encryption.sgml for building
-
- * C/fig/calendar.png, C/fig/config-cal.png, C/fig/config-mail.png,
- C/fig/filter-assist-fig.png, C/fig/filter-new-fig.png,
- C/fig/mail-composer.png, C/fig/mail-druid-pic.png,
- C/fig/mail-inbox.png, C/fig/print-dest.png,
- C/fig/print-preview.png, C/fig/vfolder-createrule-fig.png:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/fig/*png: Updated graphics for newer UI.
-
- * C/fig/full-1.png, C/fig/full-2.png, C/fig/full-3.png,
- C/fig/full-4.png, C/fig/full-5.png, C/fig/full-6.png,
- C/fig/full-7.png, C/fig/mainwindow-pic.png, C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Redid graphics to add labels to them and
- described in labels in text. Looks good!
-
- * C/usage-encryption.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/encryption.sgml: Added file
-
- * C/preface.sgml:
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * doc/ChangeLog: Moved my entires to doc/ChangeLog per request of
- danw
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-contact.sgml: Fixed .gif problem
-
- * C/usage-mail.sgml: Specify the file format
-
- * C/usage-mail.sgml: Trying to fix the .gif problem
-
- * C/usage-calendar.sgml: Redid graphics to add labels to them and
- described the labels in text.
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/evolution.sgml: Added config-encryption.sgml for building
-
- * C/fig/*png: Updated graphics for newer UI.
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Redid graphics to add labels to them and
- described in labels in text. Looks good!
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/encryption.sgml: Added file
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * ChangeLog: Moved my entires to doc/ChangeLog per request of danw
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/config-setupassist.sgml: Updated for new UI.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-sync: Reworded a little bit for more descrip.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Documented categorizing an event.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Updated Bcc: example
-
-2001-06-19 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: A couple changes to Kevin's update.
-
-2001-06-19 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Basic edits
-
-2001-06-19 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-exec-summary: Updated to say "My Evolution"
-
-2001-06-19 Kevin Breit <battery841@mediaone.net>
-
- * C/apx-gloss.sgml: Added definition.
-
- * C/usage-mainwindow.sgml: Routine updates.
-
-2001-06-07 Duncan Mak <duncan@lumox.simplemente.net>
-
- * C/evolution-faq.sgml: Fixed a typo. Thanks to Greg Leblanc for
- pointing this out.
-
-2001-05-23 Ettore Perazzoli <ettore@ximian.com>
-
- * C/evolution-faq.sgml: Re-indented.
-
-2001-05-18 Duncan Mak <duncan@ximian.com>
-
- * C/evolution-faq.sgml: Added two questions about importing
- Outlook (text from Iain). Fixed some tags and cleaned up a bit
- here and there.
-
-2001-05-18 Ettore Perazzoli <ettore@ximian.com>
-
- * C/evolution-faq.sgml: Added a question about the permission
- issues with /var/spool/mail.
-
-2001-05-15 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am (SGML_FILES): Renamed to `GUIDE_SGML_FILES'.
- (EXTRA_DIST): Add `$(FAQ_SGML_FILES)'.
- (all): Depend on `evolution-faq' too.
- (evolution-faq): New.
- (install-data-local): Depend on `evolution-faq' too. Install the
- FAQ into `$(evolution_helpdir)/evolution-faq' and the guide into
- `$(evolution_helpdir)/evolution-guide'.
-
- * C/evolution-faq.sgml: New.
-
-2001-04-23 Jon Trowbridge <trow@ximian.com>
-
- * C/Makefile.am (install-data-local): Changed dependency for
- install-data-local from "evolution" to "evolution-guide".
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am (evolution-guide): Use `$(srcdir)' here.
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am (SGML_FILES): Add `evolution.sgml'.
- (evolution-guide): Process `evolution.sgml', not
- `evolution-guide.sgml'.
- (dist-hook): s/evolution-guide/evolution/
- (install-data-local): Likewise.
-
-2001-02-23 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-authors.sgml: s/helixcode/ximian (How I missed this page
- on the first go-round I don't know).
-
-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.
-
-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 75be1c7ed2..0000000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = 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/devel/.cvsignore b/doc/devel/.cvsignore
deleted file mode 100644
index 81268d18cf..0000000000
--- a/doc/devel/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-html
-evolution-devel-guide.html
-*.stamp
diff --git a/doc/devel/ChangeLog b/doc/devel/ChangeLog
deleted file mode 100644
index 265dac5ce7..0000000000
--- a/doc/devel/ChangeLog
+++ /dev/null
@@ -1,251 +0,0 @@
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (dist-hook): Remove the copying of the
- index.sgml file which doesn't seem to be generated
- anywhere anyway.
-
-2001-06-25 Peter Williams <peterw@ximian.com>
-
- * Makefile.am: ... and comment out more exec summary stuff.
-
- * reference.sgml: Here too.
-
-2001-06-25 Peter Williams <peterw@ximian.com>
-
- * calendar/cal-util/Makefile.am,
- calendar/cal-client/Makefile.am: Fix make dist.
-
- * Makefile.am: clean up a bit.
-
-2001-06-21 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: disable executive summary build because it is no
- longer built
-
-2001-06-21 JP Rosevear <jpr@ximian.com>
-
- * calendar/cal-client/Makefile.am: add new lib
-
-2001-06-21 Peter Williams <peterw@ximian.com>
-
- * Makefile.am:
- calendar/cal-client/Makefile.am:
- calendar/cal-util/Makefile.am:
- importer/Makefile.am:
- executive-summary/Makefile.am: Changed to used gtk-doc's
- canonical Makefile.am (plus some tweaks because not every
- dir builds html).
-
-2001-06-14 Damon Chaplin <damon@ximian.com>
-
- * executive-summary/.cvsignore:
- * calendar/cal-util/.cvsignore:
- * calendar/cal-client/.cvsignore: added *-undocumented.txt
-
-2001-05-24 Federico Mena Quintero <federico@ximian.com>
-
- * evolution-devel-guide.sgml: s/Helix Code/Ximian
-
-2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * Removed some evolution-*-decl.txt files since these are
- autogenerated by gtk-doc and don't belong in cvs anyway.
- Should the tmpl/ dirs also be removed??
-
- Updated: Readded them and updated the .cvsignore files - I guess
- we do need them after all ;-)
-
-2001-04-25 Jon Trowbridge <trow@ximian.com>
-
- * Removed generated files from CVS, updated .cvsignore files
- to include generated files.
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * executive-summary/Makefile.am (scan) [ENABLE_GTK_DOC]: Kludge
- builddir != srcdir behavior by symlinking the $(DOC_MODULE).types
- file into the builddir.
- * calendar/cal-client/Makefile.am (scan) [ENABLE_GTK_DOC]:
- Likewise.
- * calendar/cal-util/Makefile.am (scan) [ENABLE_GTK_DOC]: Likewise.
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * evolution-devel-guide.sgml: Disable the importer references here
- too.
-
- * Makefile.am: Remove the importer stuff for now.
-
-2001-04-20 Damon Chaplin <damon@ximian.com>
-
- * importer/evolution-shell-importer.types: changed path to the
- importer header files, since we've had reports that they aren't being
- found (though it worked OK for me).
-
-2001-04-17 Ettore Perazzoli <ettore@ximian.com>
-
- * calendar/cal-client/Makefile.am (install-data-local): Install
- the $(DOC_DIR_INSTALL_FILES) from the srcdir.
- * calendar/cal-util/Makefile.am (install-data-local): Likewise.
- * importer/Makefile.am (install-data-local): Likewise.
- * executive-summary/Makefile.am (install-data-local): Likewise.
-
-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 f8597eccf1..0000000000
--- a/doc/devel/Makefile.am
+++ /dev/null
@@ -1,178 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = calendar
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=evolution-devel-guide
-
-# The top-level SGML file. Change it if you want.
-DOC_MAIN_SGML_FILE=evolution-devel-guide.sgml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting functions and macros.
-#DOC_SOURCE_DIR=
-
-# Extra options to supply to gtkdoc-scan.
-#SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-#MKDB_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref.
-#FIXXREF_OPTIONS=
-
-# Used for dependencies.
-#HFILE_GLOB=
-#CFILE_GLOB=
-
-# Header files to ignore when scanning.
-#IGNORE_HFILES=
-
-# Images to copy into HTML directory.
-HTML_IMAGES =
-
-
-# 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
-
-# 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
-
-# importer/sgml/evolution-importer.sgml \
-# importer/sgml/evolution-importer-client.sgml
-
-installed_content_files = \
- fdl.sgml \
- preface.sgml \
- reference.sgml
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-content_files = \
- $(installed_content_files) \
- $(local_entities)
-
-# Other files to distribute.
-extra_files =
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
-# contains GtkObjects/GObjects and you want to document signals and properties.
-#GTKDOC_CFLAGS =
-#GTKDOC_LIBS =
-#
-#GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
-#GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
-
-# If you need to override some of the declarations, place them in this file
-# and uncomment this line.
-#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
-
-HTML_DIR = $(datadir)/gnome/html
-
-###########################################################################
-# Everything below here is generic and you shouldn't need to change it.
-###########################################################################
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(extra_files) \
- $(installed_content_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE)
-
-# $(DOC_MODULE).types \
-# $(DOC_MODULE)-sections.txt \
-# $(DOC_OVERRIDES)
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-#SCANOBJ_FILES = \
-# $(DOC_MODULE).args \
-# $(DOC_MODULE).hierarchy \
-# $(DOC_MODULE).signals
-
-if ENABLE_GTK_DOC
-all-local: html-build.stamp
-
-#### html ####
-
-html-build.stamp: $(DOC_MAIN_SGML_FILE) $(content_files) #sgml.stamp
- @echo '*** Building HTML ***'
- test -d $(srcdir)/html || mkdir $(srcdir)/html
- cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo '-- Fixing Crossreferences'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-endif
-
-##############
-
-clean-local:
- rm -f *~ *.bak *-unused.txt $(DOC_STAMPS) # $(SCANOBJ_FILES)
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-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; \
- fi)
-
-# echo '-- Installing $(srcdir)/html/index.sgml' ; \
-# $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/html
- files=`echo $(srcdir)/html/*.html` ; \
- test '$(srcdir)/html/*.html' = "$$files" \
- || cp $$files $(distdir)/html
- files=`echo $(srcdir)/html/*.css` ; \
- test '$(srcdir)/html/*.css' = "$$files" \
- || cp $$files $(distdir)/html
- images=$(HTML_IMAGES) ; \
- for i in $$images ; do \
- cp $(srcdir)/$$i $(distdir)/html ; \
- done
-
-# mkdir $(distdir)/tmpl
-# mkdir $(distdir)/sgml
-# -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
-# -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-
-.PHONY : dist-hook-local
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 028622bd82..0000000000
--- a/doc/devel/calendar/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-SUBDIRS = cal-util cal-client
-
-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 87bb93d0b1..0000000000
--- a/doc/devel/calendar/cal-client/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-sgml
-Makefile
-Makefile.in
-*-decl.txt
-*-decl-list.txt
-*-unused.txt
-*-undocumented.txt
-*.hierarchy
-*.signals
-*.stamp
-*-scan.c
-.libs
diff --git a/doc/devel/calendar/cal-client/Makefile.am b/doc/devel/calendar/cal-client/Makefile.am
deleted file mode 100644
index 7452ba35b5..0000000000
--- a/doc/devel/calendar/cal-client/Makefile.am
+++ /dev/null
@@ -1,195 +0,0 @@
-# The name of the module.
-DOC_MODULE=evolution-cal-client
-
-# The top-level SGML file. Change it if you want.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting functions and macros.
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/calendar/cal-client
-
-# Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref.
-FIXXREF_OPTIONS=
-
-# Used for dependencies.
-HFILE_GLOB= \
- $(top_srcdir)/calendar/cal-client/cal-client.c \
- $(top_srcdir)/calendar/cal-client/cal-client-types.c
-
-CFILE_GLOB= \
- $(top_srcdir)/calendar/cal-client/cal-client.h \
- $(top_srcdir)/calendar/cal-client/cal-client-types.h
-
-# Header files to ignore when scanning.
-IGNORE_HFILES= \
- cal-listener.h \
- evolution-calendar.h
-
-# Images to copy into HTML directory.
-HTML_IMAGES =
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-content_files =
-
-# Other files to distribute.
-extra_files =
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
-# contains GtkObjects/GObjects and you want to document signals and properties.
-GTKDOC_CFLAGS= \
- -I$(top_srcdir)/calendar \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/libical/src/libical \
- $(BONOBO_VFS_GNOME_CFLAGS)
-
-GTKDOC_LIBS= \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/calendar/cal-client/.libs/libcal-client-static.al\
- $(top_builddir)/calendar/cal-util/.libs/libcal-util-static.al \
- $(top_builddir)/libical/src/libical/.libs/libical-static.al \
- $(top_builddir)/libversit/.libs/libversit.al \
- $(top_builddir)/libwombat/libwombat.la
-
-GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
-
-# If you need to override some of the declarations, place them in this file
-# and uncomment this line.
-#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
-DOC_OVERRIDES =
-
-#DOC_DIR=$(datadir)/gnome/html
-
-###########################################################################
-# Everything below here is generic and you shouldn't need to change it.
-###########################################################################
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(content_files) \
- $(extra_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
- $(DOC_MODULE).types \
- $(DOC_MODULE)-sections.txt \
- $(DOC_OVERRIDES)
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
- $(DOC_MODULE).hierarchy \
- $(DOC_MODULE).signals
-
-if ENABLE_GTK_DOC
-#all-local: html-build.stamp
-all-local: sgml-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB)
- @echo '*** Scanning header files ***'
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scanobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
- else \
- cd $(srcdir) ; \
- for i in $(SCANOBJ_FILES) ; do \
- test -f $$i || touch $$i ; \
- done \
- fi
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
- touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
- @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
- @echo '*** Rebuilding template files ***'
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
- touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
- @true
-
-#### sgml ####
-
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
- @echo '*** Building SGML ***'
- cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
- touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
- @true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo '*** Building HTML ***'
- test -d $(srcdir)/html || mkdir $(srcdir)/html
- cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo '-- Fixing Crossreferences'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-endif
-
-##############
-
-clean-local:
- rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-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); \
- fi)
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/tmpl
- mkdir $(distdir)/sgml
- files=`echo $(srcdir)/tmpl/*.sgml` ; \
- test '$(srcdir)/tmpl/*.sgml' = "$$files" \
- || cp $$files $(distdir)/tmpl
- files=`echo $(srcdir)/sgml/*.sgml` ; \
- test '$(srcdir)/sgml/*.sgml' = "$$files" \
- || cp $$files $(distdir)/sgml
-
-.PHONY : dist-hook-local
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 5511d9fb74..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client-decl.txt
+++ /dev/null
@@ -1,339 +0,0 @@
-<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>
-<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>
-<USER_FUNCTION>
-<NAME>CalClientAuthFunc</NAME>
-<RETURNS>gchar *</RETURNS>
-CalClient *client,
- const gchar *prompt,
- const gchar *key,
- gpointer user_data
-</USER_FUNCTION>
-<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_set_auth_func</NAME>
-<RETURNS>void </RETURNS>
-CalClient *client, CalClientAuthFunc func, gpointer data
-</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_timezone</NAME>
-<RETURNS>CalClientGetStatus </RETURNS>
-CalClient *client,const char *tzid,icaltimezone **zone
-</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_get_free_busy</NAME>
-<RETURNS>CalClientGetStatus </RETURNS>
-CalClient *client, time_t start, time_t end,CalComponent **comp
-</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_update_objects</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, icalcomponent *icalcomp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_remove_object</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, const char *uid
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_query</NAME>
-<RETURNS>CalQuery *</RETURNS>
-CalClient *client, const char *sexp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_resolve_tzid_cb</NAME>
-<RETURNS>icaltimezone *</RETURNS>
-const char *tzid, gpointer data
-</FUNCTION>
-<MACRO>
-<NAME>CAL_QUERY_TYPE</NAME>
-#define CAL_QUERY_TYPE (cal_query_get_type ())
-</MACRO>
-<MACRO>
-<NAME>CAL_QUERY</NAME>
-#define CAL_QUERY(obj) (GTK_CHECK_CAST ((obj), CAL_QUERY_TYPE, CalQuery))
-</MACRO>
-<MACRO>
-<NAME>CAL_QUERY_CLASS</NAME>
-#define CAL_QUERY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_QUERY_TYPE, CalQueryClass))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_QUERY</NAME>
-#define IS_CAL_QUERY(obj) (GTK_CHECK_TYPE ((obj), CAL_QUERY_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_QUERY_CLASS</NAME>
-#define IS_CAL_QUERY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_QUERY_TYPE))
-</MACRO>
-<ENUM>
-<NAME>CalQueryDoneStatus</NAME>
-typedef enum {
- CAL_QUERY_DONE_SUCCESS,
- CAL_QUERY_DONE_PARSE_ERROR
-} CalQueryDoneStatus;
-</ENUM>
-<STRUCT>
-<NAME>CalQueryPrivate</NAME>
-</STRUCT>
-<TYPEDEF>
-<NAME>CalQuery</NAME>
-typedef struct {
- GtkObject object;
-
- /* Private data */
- CalQueryPrivate *priv;
-} CalQuery;
-</TYPEDEF>
-<FUNCTION>
-<NAME>cal_query_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_query_construct</NAME>
-<RETURNS>CalQuery *</RETURNS>
-CalQuery *query,GNOME_Evolution_Calendar_Cal cal,const char *sexp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_query_new</NAME>
-<RETURNS>CalQuery *</RETURNS>
-GNOME_Evolution_Calendar_Cal cal,const char *sexp
-</FUNCTION>
-<MACRO>
-<NAME>QUERY_LISTENER_TYPE</NAME>
-#define QUERY_LISTENER_TYPE (query_listener_get_type ())
-</MACRO>
-<MACRO>
-<NAME>QUERY_LISTENER</NAME>
-#define QUERY_LISTENER(obj) (GTK_CHECK_CAST ((obj), QUERY_LISTENER_TYPE, QueryListener))
-</MACRO>
-<MACRO>
-<NAME>QUERY_LISTENER_CLASS</NAME>
-#define QUERY_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), QUERY_LISTENER_TYPE, \
- QueryListenerClass))
-</MACRO>
-<MACRO>
-<NAME>IS_QUERY_LISTENER</NAME>
-#define IS_QUERY_LISTENER(obj) (GTK_CHECK_TYPE ((obj), QUERY_LISTENER_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_QUERY_LISTENER_CLASS</NAME>
-#define IS_QUERY_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), QUERY_LISTENER_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>QueryListenerPrivate</NAME>
-</STRUCT>
-<TYPEDEF>
-<NAME>QueryListener</NAME>
-typedef struct {
- BonoboXObject xobject;
-
- /* Private data */
- QueryListenerPrivate *priv;
-} QueryListener;
-</TYPEDEF>
-<USER_FUNCTION>
-<NAME>QueryListenerObjUpdatedFn</NAME>
-<RETURNS>void </RETURNS>
-QueryListener *ql,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_boolean query_in_progress,
- CORBA_long n_scanned,
- CORBA_long total,
- gpointer data
-</USER_FUNCTION>
-<USER_FUNCTION>
-<NAME>QueryListenerObjRemovedFn</NAME>
-<RETURNS>void </RETURNS>
-QueryListener *ql,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- gpointer data
-</USER_FUNCTION>
-<USER_FUNCTION>
-<NAME>QueryListenerQueryDoneFn</NAME>
-<RETURNS>void </RETURNS>
-
- QueryListener *ql,
- GNOME_Evolution_Calendar_QueryListener_QueryDoneStatus status,
- const CORBA_char *error_str,
- gpointer data
-</USER_FUNCTION>
-<USER_FUNCTION>
-<NAME>QueryListenerEvalErrorFn</NAME>
-<RETURNS>void </RETURNS>
-QueryListener *ql,
- const CORBA_char *error_str,
- gpointer data
-</USER_FUNCTION>
-<FUNCTION>
-<NAME>query_listener_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>query_listener_construct</NAME>
-<RETURNS>QueryListener *</RETURNS>
-QueryListener *ql,QueryListenerObjUpdatedFn obj_updated_fn,QueryListenerObjRemovedFn obj_removed_fn,QueryListenerQueryDoneFn query_done_fn,QueryListenerEvalErrorFn eval_error_fn,gpointer fn_data
-</FUNCTION>
-<FUNCTION>
-<NAME>query_listener_new</NAME>
-<RETURNS>QueryListener *</RETURNS>
-QueryListenerObjUpdatedFn obj_updated_fn,QueryListenerObjRemovedFn obj_removed_fn,QueryListenerQueryDoneFn query_done_fn,QueryListenerEvalErrorFn eval_error_fn,gpointer fn_data
-</FUNCTION>
-<FUNCTION>
-<NAME>query_listener_stop_notification</NAME>
-<RETURNS>void </RETURNS>
-QueryListener *ql
-</FUNCTION>
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client-docs.sgml b/doc/devel/calendar/cal-client/evolution-cal-client-docs.sgml
deleted file mode 100644
index 136cf77e5c..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client-docs.sgml
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!ENTITY CalClient SYSTEM "sgml/cal-client.sgml">
-<!ENTITY evolution-cal-client-CalQuery SYSTEM "sgml/cal-query.sgml">
-]>
-<book id="index">
- <bookinfo>
- <title>[Insert name here] Reference Manual</title>
- </bookinfo>
-
- <chapter>
- <title>[Insert title here]</title>
- &CalClient;
- &evolution-cal-client-CalQuery;
- </chapter>
-</book>
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 8e33be4933..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client-sections.txt
+++ /dev/null
@@ -1,69 +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
-cal_client_get_query
-
-<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>
-
-
-<SECTION>
-<FILE>cal-query</FILE>
-CAL_QUERY
-<TITLE>CalQuery</TITLE>
-
-CalQueryDoneStatus
-cal_query_new
-
-<SUBSECTION Standard>
-
-CAL_QUERY_TYPE
-IS_CAL_QUERY
-CAL_QUERY_CLASS
-IS_CAL_QUERY_CLASS
-cal_query_get_type
-cal_query_construct
-
-<SUBSECTION Private>
-CalQuery
-CalQueryPrivate
-
-</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.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 dac080cca1..0000000000
--- a/doc/devel/calendar/cal-client/tmpl/cal-client.sgml
+++ /dev/null
@@ -1,329 +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:
-
-
-<!-- ##### FUNCTION cal_client_get_query ##### -->
-<para>
-
-</para>
-
-@client:
-@sexp:
-@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:
--->
-
-<!-- ##### SIGNAL CalClient::categories-changed ##### -->
-<para>
-
-</para>
-
-@calclient: the object which received the signal.
-@arg1:
-
-<!-- ##### SIGNAL CalClient::forget-password ##### -->
-<para>
-
-</para>
-
-@calclient: the object which received the signal.
-@arg1:
-
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 3e8ce25ee6..0000000000
--- a/doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml
+++ /dev/null
@@ -1,84 +0,0 @@
-<!-- ##### 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.
-
-<!-- ##### 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_create_calendar ##### -->
-<para>
-
-</para>
-
-@client:
-@str_uri:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_get_events_in_range ##### -->
-<para>
-
-</para>
-
-@client:
-@start:
-@end:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_get_uid_by_pilot_id ##### -->
-<para>
-
-</para>
-
-@client:
-@pilot_id:
-@uid:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_is_loaded ##### -->
-<para>
-
-</para>
-
-@client:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_load_calendar ##### -->
-<para>
-
-</para>
-
-@client:
-@str_uri:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_update_pilot_id ##### -->
-<para>
-
-</para>
-
-@client:
-@uid:
-@pilot_id:
-@pilot_status:
-
diff --git a/doc/devel/calendar/cal-util/.cvsignore b/doc/devel/calendar/cal-util/.cvsignore
deleted file mode 100644
index 4c0883da0a..0000000000
--- a/doc/devel/calendar/cal-util/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-sgml
-Makefile
-Makefile.in
-*-decl.txt
-*-decl-list.txt
-*-unused.txt
-*-undocumented.txt
-*.signals
-*.hierarchy
-*.stamp
-*-scan.c
-.libs
diff --git a/doc/devel/calendar/cal-util/Makefile.am b/doc/devel/calendar/cal-util/Makefile.am
deleted file mode 100644
index fa5effcb31..0000000000
--- a/doc/devel/calendar/cal-util/Makefile.am
+++ /dev/null
@@ -1,196 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=evolution-cal-util
-
-# The top-level SGML file. Change it if you want.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting functions and macros.
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/calendar/cal-util
-
-# Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref.
-FIXXREF_OPTIONS=
-
-# Used for dependencies.
-HFILE_GLOB= \
- $(top_srcdir)/calendar/cal-util/cal-component.h \
- $(top_srcdir)/calendar/cal-util/cal-recur.h \
- $(top_srcdir)/calendar/cal-util/cal-util.h \
- $(top_srcdir)/calendar/cal-util/timeutil.h
-
-CFILE_GLOB= \
- $(top_srcdir)/calendar/cal-util/cal-component.c \
- $(top_srcdir)/calendar/cal-util/cal-recur.c \
- $(top_srcdir)/calendar/cal-util/cal-util.c \
- $(top_srcdir)/calendar/cal-util/timeutil.c
-
-
-# Header files to ignore when scanning.
-IGNORE_HFILES= \
- calobj.h
-
-# Images to copy into HTML directory.
-HTML_IMAGES =
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-content_files =
-
-# Other files to distribute.
-extra_files =
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
-# contains GtkObjects/GObjects and you want to document signals and properties.
-GTKDOC_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)
-
-GTKDOC_LIBS = \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/calendar/cal-util/.libs/libcal-util-static.al \
- $(top_builddir)/libical/src/libical/.libs/libical-static.al \
- $(top_builddir)/libversit/.libs/libversit.al
-
-GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
-
-# If you need to override some of the declarations, place them in this file
-# and uncomment this line.
-#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
-DOC_OVERRIDES =
-
-###########################################################################
-# Everything below here is generic and you shouldn't need to change it.
-###########################################################################
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(content_files) \
- $(extra_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
- $(DOC_MODULE).types \
- $(DOC_MODULE)-sections.txt \
- $(DOC_OVERRIDES)
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
- $(DOC_MODULE).hierarchy \
- $(DOC_MODULE).signals
-
-if ENABLE_GTK_DOC
-all-local: sgml-build.stamp
-#all-local: html-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB)
- @echo '*** Scanning header files ***'
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scanobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
- else \
- cd $(srcdir) ; \
- for i in $(SCANOBJ_FILES) ; do \
- test -f $$i || touch $$i ; \
- done \
- fi
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
- touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
- @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
- @echo '*** Rebuilding template files ***'
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
- touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
- @true
-
-#### sgml ####
-
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
- @echo '*** Building SGML ***'
- cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
- touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
- @true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo '*** Building HTML ***'
- test -d $(srcdir)/html || mkdir $(srcdir)/html
- cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo '-- Fixing Crossreferences'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-endif
-
-##############
-
-clean-local:
- rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-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); \
- fi)
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/tmpl
- mkdir $(distdir)/sgml
- files=`echo $(srcdir)/tmpl/*.sgml` ; \
- test '$(srcdir)/tmpl/*.sgml' = "$$files" \
- || cp $$files $(distdir)/tmpl
- files=`echo $(srcdir)/sgml/*.sgml` ; \
- test '$(srcdir)/sgml/*.sgml' = "$$files" \
- || cp $$files $(distdir)/sgml
-
-.PHONY : dist-hook-local \ No newline at end of file
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 608c328755..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util-decl.txt
+++ /dev/null
@@ -1,977 +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_STATUS,
- CAL_COMPONENT_FIELD_COMPONENT, /* 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>
-<ENUM>
-<NAME>CalComponentRangeType</NAME>
-typedef enum {
- CAL_COMPONENT_RANGE_SINGLE,
- CAL_COMPONENT_RANGE_THISPRIOR,
- CAL_COMPONENT_RANGE_THISFUTURE,
-} CalComponentRangeType;
-</ENUM>
-<TYPEDEF>
-<NAME>CalComponentRange</NAME>
-typedef struct {
- CalComponentRangeType type;
-
- CalComponentDateTime *datetime;
-} CalComponentRange;
-</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>
-<TYPEDEF>
-<NAME>CalComponentAttendee</NAME>
-typedef struct {
- const char *value;
-
- const char *member;
- icalparameter_cutype cutype;
- icalparameter_role role;
- icalparameter_partstat status;
- gboolean rsvp;
-
- const char *delto;
- const char *delfrom;
- const char *sentby;
- const char *cn;
- const char *language;
-} CalComponentAttendee;
-</TYPEDEF>
-<TYPEDEF>
-<NAME>CalComponentOrganizer</NAME>
-typedef struct {
- const char *value;
- const char *sentby;
- const char *cn;
- const char *language;
-} CalComponentOrganizer;
-</TYPEDEF>
-<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_contact_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **text_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_contact_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *text_list
-</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_organizer</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentOrganizer *organizer
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_organizer</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentOrganizer *organizer
-</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_recurid</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentRange **recur_id
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_recurid</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentRange *recur_id
-</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_get_attendee_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **attendee_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_attendee_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *attendee_list
-</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>
-<FUNCTION>
-<NAME>cal_component_free_attendee_list</NAME>
-<RETURNS>void </RETURNS>
-GSList *attendee_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_start;
- time_t occur_end;
-} 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>
-<TYPEDEF>
-<NAME>CalAlarmRepeat</NAME>
-typedef struct {
- /* Number of extra repetitions, zero for none */
- int repetitions;
-
- /* Interval between repetitions */
- struct icaldurationtype duration;
-} CalAlarmRepeat;
-</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_clone</NAME>
-<RETURNS>CalComponentAlarm *</RETURNS>
-CalComponentAlarm *alarm
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_free</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm
-</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_attach</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, icalattach **attach
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_set_attach</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, icalattach *attach
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_get_description</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalComponentText *description
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_set_description</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalComponentText *description
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_get_repeat</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalAlarmRepeat *repeat
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_set_repeat</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalAlarmRepeat repeat
-</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>
-<USER_FUNCTION>
-<NAME>CalRecurInstanceFn</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data
-</USER_FUNCTION>
-<USER_FUNCTION>
-<NAME>CalRecurResolveTimezoneFn</NAME>
-<RETURNS>icaltimezone *</RETURNS>
-const char *tzid,
- 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,CalRecurResolveTimezoneFn tz_cb,gpointer tz_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>cal_util_new_top_level</NAME>
-<RETURNS>icalcomponent *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_generate_alarms_for_comp</NAME>
-<RETURNS>CalComponentAlarms *</RETURNS>
-CalComponent *comp,time_t start,time_t end,CalRecurResolveTimezoneFn resolve_tzid,gpointer user_data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_generate_alarms_for_list</NAME>
-<RETURNS>int </RETURNS>
-GList *comps,time_t start,time_t end,GSList **comp_alarms,CalRecurResolveTimezoneFn resolve_tzid,gpointer user_data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_util_resolve_tzid</NAME>
-<RETURNS>icaltimezone *</RETURNS>
-const char *tzid, gpointer data
-</FUNCTION>
-<FUNCTION>
-<NAME>time_days_in_month</NAME>
-<RETURNS>int </RETURNS>
-int year, int month
-</FUNCTION>
-<FUNCTION>
-<NAME>time_day_of_year</NAME>
-<RETURNS>int </RETURNS>
-int day, int month, int year
-</FUNCTION>
-<FUNCTION>
-<NAME>time_day_of_week</NAME>
-<RETURNS>int </RETURNS>
-int day, int month, int year
-</FUNCTION>
-<FUNCTION>
-<NAME>time_is_leap_year</NAME>
-<RETURNS>gboolean </RETURNS>
-int year
-</FUNCTION>
-<FUNCTION>
-<NAME>time_leap_years_up_to</NAME>
-<RETURNS>int </RETURNS>
-int year
-</FUNCTION>
-<FUNCTION>
-<NAME>isodate_from_time_t</NAME>
-<RETURNS>char *</RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_from_isodate</NAME>
-<RETURNS>time_t </RETURNS>
-const char *str
-</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_year_begin</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_week_begin</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t, int week_start_day
-</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>time_add_day_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int days, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_week_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int weeks, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_month_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int months, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_year_begin_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_month_begin_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_week_begin_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int week_start_day,icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_day_begin_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_day_end_with_zone</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, icaltimezone *zone
-</FUNCTION>
-<FUNCTION>
-<NAME>time_to_gdate_with_zone</NAME>
-<RETURNS>void </RETURNS>
-GDate *date, time_t time, icaltimezone *zone
-</FUNCTION>
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util-docs.sgml b/doc/devel/calendar/cal-util/evolution-cal-util-docs.sgml
deleted file mode 100644
index bab3cac78e..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util-docs.sgml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!ENTITY CalComponent SYSTEM "sgml/cal-component.sgml">
-<!ENTITY evolution-cal-util-cal-recur SYSTEM "sgml/cal-recur.sgml">
-<!ENTITY evolution-cal-util-cal-util SYSTEM "sgml/cal-util.sgml">
-<!ENTITY evolution-cal-util-timeutil SYSTEM "sgml/timeutil.sgml">
-]>
-<book id="index">
- <bookinfo>
- <title>[Insert name here] Reference Manual</title>
- </bookinfo>
-
- <chapter>
- <title>[Insert title here]</title>
- &CalComponent;
- &evolution-cal-util-cal-recur;
- &evolution-cal-util-cal-util;
- &evolution-cal-util-timeutil;
- </chapter>
-</book>
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 0bd957e9c2..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-component.sgml
+++ /dev/null
@@ -1,993 +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_STATUS:
-@CAL_COMPONENT_FIELD_COMPONENT:
-@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 a8e7cf1620..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-recur.sgml
+++ /dev/null
@@ -1,44 +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:
-@tz_cb:
-@tz_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 878273b0aa..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml
+++ /dev/null
@@ -1,288 +0,0 @@
-<!-- ##### 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:
-
-<!-- ##### TYPEDEF CalComponentAlarmTrigger ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ENUM CalComponentAlarmTriggerRelated ##### -->
-<para>
-
-</para>
-
-@CAL_COMPONENT_ALARM_TRIGGER_RELATED_START:
-@CAL_COMPONENT_ALARM_TRIGGER_RELATED_END:
-
-<!-- ##### ENUM CalComponentAlarmTriggerType ##### -->
-<para>
-
-</para>
-
-@CAL_COMPONENT_ALARM_TRIGGER_RELATIVE:
-@CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
-
-<!-- ##### STRUCT CalComponentPrivate ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### STRUCT CalObjTime ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@day:
-@hour:
-@minute:
-@second:
-
-<!-- ##### 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 CalRecurrence ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION cal_alarm_instance_list_free ##### -->
-<para>
-
-</para>
-
-@list:
-
-<!-- ##### FUNCTION cal_component_alarm_free_trigger ##### -->
-<para>
-
-</para>
-
-@trigger: <!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
-End:
--->
-
-<!-- ##### FUNCTION cal_component_get_first_alarm ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_get_next_alarm ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_get_pilot_id ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_id:
-
-<!-- ##### FUNCTION cal_component_get_pilot_status ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_status:
-
-<!-- ##### FUNCTION cal_component_set_pilot_id ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_id:
-
-<!-- ##### FUNCTION cal_component_set_pilot_status ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_status:
-
-<!-- ##### FUNCTION cal_recur_free ##### -->
-<para>
-
-</para>
-
-@r:
-
-<!-- ##### FUNCTION cal_recur_from_icalrecurrencetype ##### -->
-<para>
-
-</para>
-
-@ir:
-@Returns:
-
-<!-- ##### FUNCTION format_simple_hour ##### -->
-<para>
-
-</para>
-
-@hour:
-@use_am_pm:
-@Returns:
-
-<!-- ##### FUNCTION get_time_t_hour ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-<!-- ##### FUNCTION isodiff_from_secs ##### -->
-<para>
-
-</para>
-
-@secs:
-@Returns:
-
-<!-- ##### FUNCTION isodiff_to_secs ##### -->
-<para>
-
-</para>
-
-@str:
-@Returns:
-
-<!-- ##### FUNCTION parse_date ##### -->
-<para>
-
-</para>
-
-@str:
-@Returns:
-
-<!-- ##### FUNCTION print_time_t ##### -->
-<para>
-
-</para>
-
-@t:
-
-<!-- ##### FUNCTION time_add_minutes ##### -->
-<para>
-
-</para>
-
-@time:
-@minutes:
-@Returns:
-
-<!-- ##### FUNCTION time_add_year ##### -->
-<para>
-
-</para>
-
-@time:
-@years:
-@Returns:
-
-<!-- ##### FUNCTION time_day_hour ##### -->
-<para>
-
-</para>
-
-@t:
-@hour:
-@Returns:
-
-<!-- ##### FUNCTION time_from_day ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@day:
-@Returns:
-
-<!-- ##### FUNCTION time_from_icaltimetype ##### -->
-<para>
-
-</para>
-
-@itt:
-@Returns:
-
-<!-- ##### FUNCTION time_from_isodate ##### -->
-<para>
-
-</para>
-
-@str:
-@Returns:
-
-<!-- ##### FUNCTION time_from_start_duration ##### -->
-<para>
-
-</para>
-
-@start:
-@duration:
-@Returns:
-
-<!-- ##### FUNCTION time_month_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-<!-- ##### FUNCTION time_week_end ##### -->
-<para>
-
-</para>
-
-@t:
-@week_start_day:
-@Returns:
-
-<!-- ##### FUNCTION time_year_end ##### -->
-<para>
-
-</para>
-
-@t:
-@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 e2dba5224f..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/timeutil.sgml
+++ /dev/null
@@ -1,111 +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_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_days_in_month ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@Returns:
-
-
-<!-- ##### FUNCTION time_year_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_month_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_week_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@week_start_day:
-@Returns:
-
-
-<!-- ##### FUNCTION time_day_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_day_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
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 c089c5b885..0000000000
--- a/doc/devel/evolution-devel-guide.sgml
+++ /dev/null
@@ -1,98 +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 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>">
-]>
-
-<!-- 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" -->
-
-
-<book id="index">
- <bookinfo>
- <title>&Evolution; Developer's Guide</title>
-
- <authorgroup>
- <corpauthor>
- Ximian, Inc.
- </corpauthor>
- </authorgroup>
-
- <copyright>
- <year>2001</year>
- <holder>Ximian, 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 489a3d04fd..0000000000
--- a/doc/devel/executive-summary/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-Makefile
-Makefile.in
-*-decl.txt
-*.signals
-*.hierarchy
-*.stamp
-*-scan.c
-*-unused.txt
-*-undocumented.txt
-*-decl-list.txt
-sgml
-
diff --git a/doc/devel/executive-summary/Makefile.am b/doc/devel/executive-summary/Makefile.am
deleted file mode 100644
index 9e0901bd9f..0000000000
--- a/doc/devel/executive-summary/Makefile.am
+++ /dev/null
@@ -1,191 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=evolution-services
-
-# The top-level SGML file. Change it if you want.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting functions and macros.
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/executive-summary/evolution-services
-
-# Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref.
-FIXXREF_OPTIONS=
-
-# Used for dependencies.
-HFILE_GLOB=
-CFILE_GLOB= \
- $(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
-
-
-# Header files to ignore when scanning.
-IGNORE_HFILES=Executive-Summary.h
-
-# Images to copy into HTML directory.
-HTML_IMAGES =
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-content_files =
-
-# Other files to distribute.
-extra_files =
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
-# contains GtkObjects/GObjects and you want to document signals and properties.
-GTKDOC_CFLAGS = \
- -I$(top_srcdir)/executive-summary/evolution-services \
- -I$(top_srcdir)/executive-summary \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(BONOBO_VFS_GNOME_CFLAGS)
-
-GTKDOC_LIBS = \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/executive-summary/evolution-services/.libs/libevolution-services.so
-
-GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
-
-# If you need to override some of the declarations, place them in this file
-# and uncomment this line.
-#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
-DOC_OVERRIDES =
-
-
-###########################################################################
-# Everything below here is generic and you shouldn't need to change it.
-###########################################################################
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(content_files) \
- $(extra_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
- $(DOC_MODULE).types \
- $(DOC_MODULE)-sections.txt \
- $(DOC_OVERRIDES)
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
- $(DOC_MODULE).hierarchy \
- $(DOC_MODULE).signals
-
-if ENABLE_GTK_DOC
-#all-local: html-build.stamp
-all-local: sgml-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB)
- @echo '*** Scanning header files ***'
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scanobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
- else \
- cd $(srcdir) ; \
- for i in $(SCANOBJ_FILES) ; do \
- test -f $$i || touch $$i ; \
- done \
- fi
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
- touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
- @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
- @echo '*** Rebuilding template files ***'
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
- touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
- @true
-
-#### sgml ####
-
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
- @echo '*** Building SGML ***'
- cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
- touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
- @true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo '*** Building HTML ***'
- test -d $(srcdir)/html || mkdir $(srcdir)/html
- cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo '-- Fixing Crossreferences'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-endif
-
-##############
-
-clean-local:
- rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-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); \
- fi)
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/tmpl
- mkdir $(distdir)/sgml
- mkdir $(distdir)/html
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
- -cp $(srcdir)/html/index.sgml $(distdir)/html
- -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
-
- images=$(HTML_IMAGES) ; \
- for i in $$images ; do \
- cp $(srcdir)/$$i $(distdir)/html ; \
- done
-
-.PHONY : dist-hook-local
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 caaabb2ee7..0000000000
--- a/doc/devel/executive-summary/evolution-services-decl.txt
+++ /dev/null
@@ -1,536 +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>
-<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_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>
-<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_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>
-<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_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>
-<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>
-<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>
-<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>
-<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>
-<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_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>
-<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>
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 37559d819d..0000000000
--- a/doc/devel/executive-summary/evolution-services.hierarchy
+++ /dev/null
@@ -1,7 +0,0 @@
-GtkObject
- BonoboObject
- ExecutiveSummaryComponent
- ExecutiveSummaryComponentFactory
- Handle to remote Bonobo::Unknown
- ExecutiveSummaryComponentFactoryClient
- ExecutiveSummaryHtmlView
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 9f8096db6a..0000000000
--- a/doc/devel/executive-summary/tmpl/evolution-services-unused.sgml
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- ##### SIGNAL ExecutiveSummaryHtmlView::handle-uri ##### -->
-<para>
-
-</para>
-
-@executivesummaryhtmlview: the object which received the signal.
-@arg1:
-
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 439d6641ff..0000000000
--- a/doc/devel/importer/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-sgml
-Makefile
-Makefile.in
-*-decl.txt
-*-decl-list.txt
-*-unused.txt
-*.hierarchy
-*.signals
-*.stamp
-*-scan.c
diff --git a/doc/devel/importer/Makefile.am b/doc/devel/importer/Makefile.am
deleted file mode 100644
index 8b5343677a..0000000000
--- a/doc/devel/importer/Makefile.am
+++ /dev/null
@@ -1,195 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=evolution-shell-importer
-
-# The top-level SGML file. Change it if you want.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting functions and macros.
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/shell/importer
-
-# Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-MKDB_OPTIONS=
-
-# Extra options to supply to gtkdoc-fixref.
-FIXXREF_OPTIONS=
-
-# Used for dependencies.
-HFILE_GLOB= \
- $(top_srcdir)/shell/importer/evolution-importer.h \
- $(top_srcdir)/shell/importer/evolution-importer-client.h
-
-CFILE_GLOB= \
- $(top_srcdir)/shell/importer/evolution-importer.c \
- $(top_srcdir)/shell/importer/evolution-importer-client.c
-
-# Header files to ignore when scanning.
-IGNORE_HFILES= \
- GNOME_Evolution_Importer.h \
- importer.h
-
-# Images to copy into HTML directory.
-HTML_IMAGES =
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-content_files =
-
-# Other files to distribute.
-extra_files =
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
-# contains GtkObjects/GObjects and you want to document signals and properties.
-GTKDOC_CFLAGS = \
- -I$(top_srcdir)/shell/importer \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(BONOBO_VFS_GNOME_CFLAGS)
-
-GTKDOC_LIBS = \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/shell/importer/.libs/libevolution-importer.so
-
-GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
-
-# If you need to override some of the declarations, place them in this file
-# and uncomment this line.
-#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
-DOC_OVERRIDES =
-
-###########################################################################
-# Everything below here is generic and you shouldn't need to change it.
-###########################################################################
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST = \
- $(content_files) \
- $(extra_files) \
- $(HTML_IMAGES) \
- $(DOC_MAIN_SGML_FILE) \
- $(DOC_MODULE).types \
- $(DOC_MODULE)-sections.txt \
- $(DOC_OVERRIDES)
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
- $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
- $(DOC_MODULE).hierarchy \
- $(DOC_MODULE).signals
-
-if ENABLE_GTK_DOC
-#all-local: html-build.stamp
-all-local: sgml-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB)
- @echo '*** Scanning header files ***'
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
- CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scanobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
- else \
- cd $(srcdir) ; \
- for i in $(SCANOBJ_FILES) ; do \
- test -f $$i || touch $$i ; \
- done \
- fi
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
- touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
- @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
- @echo '*** Rebuilding template files ***'
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
- touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
- @true
-
-#### sgml ####
-
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
- @echo '*** Building SGML ***'
- cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
- touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
- @true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo '*** Building HTML ***'
- test -d $(srcdir)/html || mkdir $(srcdir)/html
- cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
- test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo '-- Fixing Crossreferences'
- cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- touch html-build.stamp
-endif
-
-##############
-
-clean-local:
- rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-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); \
- fi)
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
- @echo "*** gtk-doc must be installed and enabled in order to make dist"
- @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
- mkdir $(distdir)/tmpl
- mkdir $(distdir)/sgml
- mkdir $(distdir)/html
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
- -cp $(srcdir)/html/index.sgml $(distdir)/html
- -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
-
- images=$(HTML_IMAGES) ; \
- for i in $$images ; do \
- cp $(srcdir)/$$i $(distdir)/html ; \
- done
-
-.PHONY : dist-hook-local
-
-
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.hierarchy b/doc/devel/importer/evolution-shell-importer.hierarchy
deleted file mode 100644
index c46ebdf782..0000000000
--- a/doc/devel/importer/evolution-shell-importer.hierarchy
+++ /dev/null
@@ -1,7 +0,0 @@
-GtkObject
- BonoboObject
- BonoboXObject
- EvolutionImporter
- EvolutionImporterListener
- Handle to remote Bonobo::Unknown
- EvolutionImporterClient
diff --git a/doc/devel/importer/evolution-shell-importer.types b/doc/devel/importer/evolution-shell-importer.types
deleted file mode 100644
index e787818599..0000000000
--- a/doc/devel/importer/evolution-shell-importer.types
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <gnome.h>
-#include <bonobo.h>
-#include <shell/importer/evolution-importer.h>
-#include <shell/importer/evolution-importer-client.h>
-#include <shell/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 6cee37bef1..0000000000
--- a/doc/devel/importer/tmpl/evolution-importer-client.sgml
+++ /dev/null
@@ -1,84 +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:
-@folderpath:
-@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 1c7736a37f..0000000000
--- a/doc/devel/importer/tmpl/evolution-importer.sgml
+++ /dev/null
@@ -1,96 +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.
-@folderpath:
-@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>
-
-@EVOLUTION_IMPORTER_OK:
-@EVOLUTION_IMPORTER_UNSUPPORTED_OPERATION:
-@EVOLUTION_IMPORTER_INTERRUPTED:
-@EVOLUTION_IMPORTER_BUSY:
-@EVOLUTION_IMPORTER_NOT_READY:
-@EVOLUTION_IMPORTER_UNKNOWN_DATA:
-@EVOLUTION_IMPORTER_BAD_DATA:
-@EVOLUTION_IMPORTER_BAD_FILE:
-@EVOLUTION_IMPORTER_UNKNOWN_ERROR:
-
-<!-- ##### 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 4381ad29b7..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/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 5f5ea27a98..0000000000
--- a/doc/white-papers/mail/camel.sgml
+++ /dev/null
@@ -1,356 +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>Jeffrey</firstname>
- <surname>Stedfast</surname>
- <affiliation>
- <address>
- <email>fejj@helixcode.com</email>
- </address>
- </affiliation>
- </author>
-
- <author>
- <firstname>Michael</firstname>
- <surname>Zucchi</surname>
- <affiliation>
- <address>
- <email>notzed@helixcode.com</email>
- </address>
- </affiliation>
- </author>
-
- <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, 2001</year>
- <holder>Ximian, 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 subclassed
- <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 POP, 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</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 filtered. So a CamelMimePart
- containing base64-encoded data can filter its output through
- CamelMimeFilterBasic. 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 e11691a740..0000000000
--- a/e-util/ChangeLog
+++ /dev/null
@@ -1,1566 +0,0 @@
-2001-10-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-url.c (e_uri_copy): duplicate also the params member
-
-2001-10-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-url.[ch] (e_uri_copy, e_uri_to_string): new functions
-
-2001-10-01 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-url.[ch]: added basic URI management functions
-
- * Makefile.am: added BONOBO flags to make it compile with latest
- Bonobo, which installs headers in a version-based directory
-
-2001-10-01 Dan Winship <danw@ximian.com>
-
- * e-passwords.c (e_passwords_ask_password): New, copied/renamed
- from mailer and gnome-libs.
-
-2001-09-30 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (libeutil_la_SOURCES): add e-passwords.[ch]
-
-2001-09-30 Chris Toshok <toshok@ximian.com>
-
- * e-passwords.c: copy/rename the mail specific password stuff
- here.
-
- * e-passwords.h: same.
-
-2001-09-28 <NotZed@Ximian.com>
-
- * e-msgport.c (e_msgport_put): Write the pipe notification outside
- the lock. This way if the pipe fills up because of too many
- outstanding request, the queue isn't deadlocked. This only
- happens wiht 4096 outstanding messages, so something is getting
- VERY busy! Fixes #11121.
-
-2001-09-24 Christopher James Lahey <clahey@ximian.com>
-
- * e-categories-master-list-wombat.c (ecmlw_load, ecmlw_save): Make
- the printouts here conditionally compiled out.
-
-2001-09-21 <NotZed@Ximian.com>
-
- * e-msgport.c (e_thread_destroy): Instead of using
- pthread_cancel() which seems to have numerous implementation
- issues, send a special quit message to the subordinate thread.
- (thread_dispatch): When it gets a quit message, well, quit!
-
-2001-09-18 Ettore Perazzoli <ettore@ximian.com>
-
- * e-gtk-utils.c (widget_realize_callback_for_backing_store): Use
- ->bin_window [instead of ->window] if the widget is a GtkLayout.
-
-2001-09-17 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.c (e_time_parse_date): only use 1 format, so we are
- consistent everywhere. If we support multiple formats we have to
- support that in e_time_parse_date_and_time() which means an explosion
- of different formats. I don't think the alternatives are that useful,
- anyway.
- (e_time_parse_date_and_time): parse everything in one go, to avoid
- i18n problems. Also only use '%p' if the locale has am/pm strings.
- (e_time_parse_time): Only use '%p' if locale has am/pm strings.
-
-2001-09-17 Ettore Perazzoli <ettore@ximian.com>
-
- * e-gtk-utils.c (gtk_radio_button_get_nth_selected): Removed.
- (gtk_radio_button_select_nth): Removed.
- (e_make_widget_backing_stored): New.
-
-2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-mktemp.c (e_mktemp_cleanup): Make sure the dir pointer is
- non-NULL before using it.
-
-2001-09-08 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Fix some broken calls to
- check_size that could result in memory corruption displaying short
- replies.
-
-2001-09-06 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Add E_TEXT_TO_HTML_CITE,
- to prepend "> " to each line.
-
-2001-09-05 Dan Winship <danw@ximian.com>
-
- * e-mktemp.c (get_path): Fix the check for the case when mkdir()
- returns EEXIST to check S_ISDIR on the right structure component.
- Fixes bug #8775.
-
-2001-08-31 Federico Mena Quintero <federico@ximian.com>
-
- * e-time-utils.c (e_time_parse_date_and_time): Added format for
- "7 PM" and equivalents. Fixes bug #7456.
- (e_time_parse_time): Likewise.
-
-2001-08-28 Not Zed <NotZed@Ximian.com>
-
- * e-categories-master-list-wombat.c (ecmlw_load): Dont call
- g_print with a NULL string. See bug #7396.
-
-2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-mktemp.c (get_path): Make more robust.
-
-2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added e-mktemp.[c,h] to the build.
-
- * e-mktemp.c (e_mktemp): A new wrapper around mktemp so that we
- can keep track of temp files for later cleanup.
- (e_mkstemp): Same but obviously for the mkstemp call.
- (e_mkdtemp): And finally a mkdtemp wrapper.
-
-2001-08-24 Zbigniew Chyla <cyba@gnome.pl>
-
- * Makefile.am (libeutil_la_SOURCES): Added e-unicode-i18n.c and
- e-unicode-i18n.h.
-
- * e-unicode-i18n.[ch]: New files with two extra functions
- (e_utf8_gettext, e_utf8_dgettext) and U_() macro.
- Should be used instead of _() if we need UTF-8 string.
-
-2001-08-23 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-request.c (e_request_string): Modified to accept and return
- UTF-8 string. It's currently used only in
- shell/e-shortcuts-view.c and we need UTF-8 there.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.c (e_time_parse_date): added comments to help
- translators a bit.
-
-2001-08-09 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.c (e_categories_config_get_icon_for): return
- when there's no icon associated with the category
-
- * e-categories-config.c: reworked to use the
- ECategoriesMasterListWombat class. Also, load correctly images
- (fixes #6794)
-
-2001-08-09 Federico Mena Quintero <federico@ximian.com>
-
- * e-categories-master-list-wombat.c (ecmlw_destroy): Chain to the
- destroy handler in the parent class!
-
- * e-list-iterator.c (e_list_iterator_destroy): Likewise. Sigh.
-
- * e-list.c (e_list_destroy): Likewise. Double sigh.
-
-2001-08-08 Ettore Perazzoli <ettore@ximian.com>
-
- * e-dialog-utils.h: New.
- * e-dialog-utils.c: New.
-
-2001-08-04 Ettore Perazzoli <ettore@ximian.com>
-
- * e-bonobo-factory-util.c
- (e_bonobo_generic_factory_multi_display_new): New function to
- create a factory that creates separate component instances for
- different displays.
-
-2001-08-03 Christopher James Lahey <clahey@ximian.com>
-
- * e-list-iterator.c (e_list_iterator_next): Made it so that
- e_list_iterator_next goes to the first element if it's set to
- NULL. This makes deleting the first element and then doing
- e_list_iterator_next go to the new first element. Did the analogy
- for e_list_iterator_prev for completeness and consistency's sakes.
- Fixes Ximian bug #6057.
-
-2001-08-01 Christopher James Lahey <clahey@ximian.com>
-
- * e-categories-master-list-wombat.c (ecmlw_load): Fixed the load
- statement here by just using array_from_string.
- (ecmlw_save): Removed the part where we save the icons and colors
- since that's handled in the array_to_string function. Fixes
- Ximian bug #4451.
-
-2001-07-27 JP Rosevear <jpr@ximian.com>
-
- * e-dbhash.c (string_to_dbt): memset everything to 0
- (md5_to_dbt): ditto
-
-2001-07-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.c (initialize_categories_config): use the 2
- new category icons (16_category_suppliers.png and
- 16_category_time-and-expenses.png)
-
-2001-07-19 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.c (initialize_categories_config): use the 2
- new category icons
-
- * Makefile.am: s/imagedir/imagesdir
-
-2001-07-17 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.c (initialize_categories_config): generate
- default configuration for icons-per-category the first time. And
- use a global (for this file) Bonobo_ConfigDatabase
-
-2001-07-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.c (e_categories_config_get_icon_for):
- (e_categories_config_get_icon_file_for):
- (e_categories_config_set_icon_file_for): use GdkPixbuf to load images
-
-2001-07-16 Federico Mena Quintero <federico@ximian.com>
-
- * e-time-utils.c (parse_with_strptime): Generalized function for
- trying a number of strptime() formats on a string.
- (e_time_parse_time): Use parse_with_strptime().
- (e_time_parse_date): New function, analogous to the previous one,
- but uses a number of date formats.
-
-2001-07-12 Federico Mena Quintero <federico@ximian.com>
-
- * e-time-utils.c (e_time_parse_date_and_time): If the string is
- empty, clear the struct tm before returning.
-
-2001-07-12 Jon Trowbridge <trow@ximian.com>
-
- * e-html-utils.c: Added is_addr_char_no_pipes macro, which specifically
- does not consider '|' ("pipe") to be a legal address character.
- (email_address_extract): Use is_addr_char_no_pipes when looking for
- e-mail addresses to turn into HTML links. (Bug #3940)
-
-2001-07-05 Not Zed <NotZed@Ximian.com>
-
- * e-memory.c: Added some malloc check stuff.
-
-2001-07-04 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-master-list-wombat.c (ecmlw_load): load all icons
- and colors for each category
-
- (ecmlw_save): save all icons and categories associated with
- each category
-
- * e-categories-config.c: use BonoboConf to store/retrieve settings,
- and use ECategoriesMasterListWombat when creating a ECategories
- dialog widget
-
-2001-07-02 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (libeutil_la_SOURCES): Added
- e-categories-master-list-wombat.c and
- e-categories-master-list-wombat.h.
- (INCLUDES): Added $(BONOBO_CONF_CFLAGS).
-
- * e-categories-master-list-wombat.c,
- e-categories-master-list-wombat.h: New class implementing a master
- list that stores its state using bonobo-conf.
-
-2001-07-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * e-categories-config.[ch]: new file for a set of functions for
- managing category-related (icons, colors) configuration
-
-2001-07-01 Ettore Perazzoli <ettore@ximian.com>
-
- * e-request.c: New.
- * e-request.h: New.
-
-2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-sexp.c (term_eval_and): When ANDing two bools, don't use a
- bitwise AND.
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Split e-db3-utils and e-dbhash off into libedb3util
- so eutil won't depend on db3.
-
-2001-06-15 Not Zed <NotZed@Ximian.com>
-
- * e-sexp.c (parse_values): REmove a silly hardcoded term limit,
- oops forgot about that.
-
-2001-06-11 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.c (e_time_parse_date_and_time): skip any non-digits
- while looking for dates and times. This should fix some translation
- problems. Though there is still a problem with Japanese, where the
- am/pm flag comes before the time so we will skip it incorrectly.
-
-2001-06-10 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.c (e_time_parse_date_and_time):
- (e_time_parse_time): got rid of '%n' at end of each format string
- for strptime. I don't know how I managed to put them in there.
-
-2001-05-31 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (INCLUDES): Added db3 cflags.
-
- * e-dbhash.c: Made this use db3.
-
- * e-db3-utils.c, e-db3-utils.h: New files with some helper
- functions.
-
-2001-05-27 Dan Winship <danw@ximian.com>
-
- * e-gui-utils.c: Remove e_pixmaps_update (moved to libeshell) so
- libeutil won't depend on bonobo.
-
-2001-05-19 Ettore Perazzoli <ettore@ximian.com>
-
- * e-host-utils.c (e_gethostbyname_r)
- [HAVE_GETHOSTBYNAME_R && GETHOSTBYNAME_R_FIVE_ARGS]: Set `*herr'
- to zero if the function returns a non-NULL pointer to the hostent.
- According to the docs, a returned non-NULL hostent always means
- "no error" no matter what the returned value of `herr' is. [And
- in fact, at least on libc 2.2.3, trying to resolve `localhost'
- sets herr to `HOST_NOT_FOUND' even if the name is resolved
- correctly and the returned hostent is non-NULL.]
-
-2001-05-16 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): add
- E_TEXT_TO_HTML_ESCAPE_8BIT to turn non-US-ASCII characters into
- "?"s.
-
-2001-05-14 Jon Trowbridge <trow@ximian.com>
-
- * e-html-utils.c (is_citation): Check for bad utf8.
-
-2001-05-08 Dan Winship <danw@ximian.com>
-
- * e-path.c (e_path_find_folders): Walk a hierarchy using the
- "/subfolders/" convention and call a callback for each folder
- found.
-
-2001-05-01 Dan Winship <danw@ximian.com>
-
- * e-msgport.c (e_mutex_assert_locked): Debugging routine. (Only
- works for recursive mutexes right now.)
-
- * e-html-utils.c (e_text_to_html_full): Don't use g_utf8_next_char
- on text that isn't valid UTF8, since it won't work (and might even
- get into an infinite loop).
-
-2001-04-29 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (email_address_extract): Make this smarter. Now
- e_text_to_html_full calls it when it sees a '@', and
- email_address_extract deals with scanning both forward and
- backward to find the bounds of the email address. It's still
- fooled by Message-IDs, but there's not a whole lot we can do
- there...
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * e-host-utils.c (e_gethostbyname_r): Make the Solaris and
- no-gethostbyname_r implementations behave more like the Linux one.
- Document.
-
- * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS
- (libeutil_la_LIBADD): Change UNICODE_LIBS to GAL_LIBS
-
-2001-04-26 Not Zed <NotZed@Ximian.com>
-
- * e-memory.c (e_poolv_get): Modified to match e_strv_get
- behaviour. Assert on bad cases, and return "" rather than NULL
- for empty/unset strings.
- (e_poolv_new): Simplify the mutex cases, only have a single mutex
- for mempool and hashtable references.
- (e_poolv_set): Simplify mutex code. Fixed a #ifdef orde prob in
- profile stuff. Always copy string to our own memory when we add
- it to the hash, even if we free it; I think this would have led to
- dangling references otherwise.
- (e_poolv_destroy): Renamed from poolv_free, for consistency with
- the rest of the allocators here.
- (e_poolv_set): Add optional refcounting code here, not currently
- enabled/used, but should make proper string collection work
- easily.
- (e_poolv_destroy): Unrefcount the strings here.
- (e_poolv_cpy): Add refcounting code here.
-
- * e-memory.[ch]: Applied Jacob's patches <jacob@ximian.com> for
- 'e-poolv' type, added his name to the authors list.
-
-2001-04-24 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (check_size): If the buffer is too small, making
- it twice as big does not guarantee it will be big enough. "Duh".
- Also, a bunch of the check_size calls don't seem to be taking
- trailing NULs into account, so add in a +1 here.
-
-2001-04-24 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-gui-utils.c, e-memory, e-msgport.c, e-pilot-map, e-sexp.c:
- Added #include <glib.h> and move corresponding local headers
- to the top to catch missing includes in them. Tip from clahey.
-
-2001-04-24 Chris Toshok <toshok@ximian.com>
-
- * e-host-utils.h: remove prototype for e_gethostbyname_init.
-
- * e-host-utils.c (e_gethostbyname_r): don't dynamically allocate
- anything - store everything in the buffer that's passed in. Also,
- stop using EMutex. Switch to a static GMutex (so we can
- initialize it without having e_gethostbyname_init).
- (e_gethostbyname_init): removed.
-
-2001-04-23 Jon Trowbridge <trow@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Removed attempts to use
- Radek's evil <DATA> hacks, which were just causing me
- (and GtkHTML) grief.
-
-2001-04-23 Jon Trowbridge <trow@ximian.com>
-
- * e-host-utils.c: Include glib.h, so that the g_warning in
- e_gethostbyname_r will be treated as a macro and not as an
- unresolved symbol.
-
-2001-04-22 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (libeutil_la_SOURCES): add e-host-utils.[ch]
-
- * e-host-utils.c: new file, with e_gethostbyname_r.
-
- * e-host-utils.h: new file.
-
-2001-04-19 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (is_citation): ">From" is not a citation unless
- the previous or following line is a citation.
- (e_text_to_html_full): Update for is_citation change. Also, when
- marking citations, unmangle mbox From-mangling.
-
-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 f0dbca7500..0000000000
--- a/e-util/Makefile.am
+++ /dev/null
@@ -1,100 +0,0 @@
-SUBDIRS = . ename
-
-imagesdir = $(datadir)/images/evolution
-
-INCLUDES = \
- $(DB3_CFLAGS) \
- -I$(top_srcdir) \
- $(GNOME_INCLUDEDIR) \
- $(EXTRA_GNOME_CFLAGS) \
- $(BONOBO_GNOME_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- $(PISOCK_CFLAGS) \
- -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
- -DEVOLUTION_CATEGORY_ICONS=\""$(imagesdir)/categories"\" \
- -DG_LOG_DOMAIN=\"e-utils\"
-
-noinst_LTLIBRARIES = libeutil.la libeutil-static.la \
- libeconduit.la libeconduit-static.la \
- libedb3util.la
-
-libeutil_la_SOURCES = \
- e-bonobo-factory-util.c \
- e-bonobo-factory-util.h \
- e-categories-master-list-wombat.c \
- e-categories-master-list-wombat.h \
- e-categories-config.c \
- e-categories-config.h \
- e-corba-utils.c \
- e-corba-utils.h \
- e-dialog-utils.c \
- e-dialog-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-host-utils.c \
- e-host-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-mktemp.c \
- e-mktemp.h \
- e-msgport.c \
- e-msgport.h \
- e-passwords.c \
- e-passwords.h \
- e-path.c \
- e-path.h \
- e-request.c \
- e-request.h \
- e-sexp.c \
- e-sexp.h \
- e-time-utils.c \
- e-time-utils.h \
- e-unicode-i18n.c \
- e-unicode-i18n.h \
- e-url.c \
- e-url.h \
- md5-utils.c \
- md5-utils.h
-
-libeutil_la_LIBADD = $(GAL_LIBS)
-
-libeutil_static_la_SOURCES = $(libeutil_la_SOURCES)
-libeutil_static_la_LIBADD = $(libeutil_la_LIBADD)
-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)
-
-libedb3util_la_SOURCES = \
- e-db3-utils.c \
- e-db3-utils.h \
- e-dbhash.c \
- e-dbhash.h
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
deleted file mode 100644
index f79970ad22..0000000000
--- a/e-util/e-bit-array.c
+++ /dev/null
@@ -1,415 +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);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/**
- * 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-bonobo-factory-util.c b/e-util/e-bonobo-factory-util.c
deleted file mode 100644
index 9b67f64fd1..0000000000
--- a/e-util/e-bonobo-factory-util.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-bonobo-factory-util.c
- *
- * 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.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-bonobo-factory-util.h"
-
-#include <X11/Xlib.h>
-#include <gdk/gdkprivate.h>
-
-
-BonoboGenericFactory *
-e_bonobo_generic_factory_multi_display_new (const char *factory_iid,
- GnomeFactoryCallback factory_callback,
- void *factory_callback_data)
-{
- BonoboGenericFactory *factory;
- char *registration_id;
- char *display_string;
-
- g_return_val_if_fail (factory_iid != NULL, NULL);
- g_return_val_if_fail (factory_callback != NULL, NULL);
-
- display_string = DisplayString (gdk_display);
- registration_id = oaf_make_registration_id (factory_iid, display_string);
- factory = bonobo_generic_factory_new_multi (registration_id, factory_callback, factory_callback_data);
-
- g_free (registration_id);
- XFree (display_string);
-
- return factory;
-}
diff --git a/e-util/e-bonobo-factory-util.h b/e-util/e-bonobo-factory-util.h
deleted file mode 100644
index e4aefd1f42..0000000000
--- a/e-util/e-bonobo-factory-util.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-bonobo-factory-util.h
- *
- * 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.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef E_BONOBO_FACTORY_UTIL_H
-#define E_BONOBO_FACTORY_UTIL_H
-
-#include <bonobo/bonobo-generic-factory.h>
-
-BonoboGenericFactory *e_bonobo_generic_factory_multi_display_new (const char *factory_iid,
- GnomeFactoryCallback factory_callback,
- void *factory_callback_data);
-
-#endif
diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c
deleted file mode 100644
index 72db8e572c..0000000000
--- a/e-util/e-categories-config.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Categories configuration.
- *
- * Author:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2001, Ximian, Inc.
- */
-
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnome/gnome-i18n.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-categories.h>
-#include "e-categories-config.h"
-#include "e-categories-master-list-wombat.h"
-
-static gboolean initialized = FALSE;
-static ECategoriesMasterListWombat *ecmlw = NULL;
-static GHashTable *icons_table = NULL;
-
-static void
-initialize_categories_config (void)
-{
- g_return_if_fail (initialized == FALSE);
-
- ecmlw = E_CATEGORIES_MASTER_LIST_WOMBAT (e_categories_master_list_wombat_new ());
- icons_table = g_hash_table_new (g_str_hash, g_str_equal);
- /* FIXME: must free the two objects above when exiting */
-
- initialized = TRUE;
-}
-
-/**
- * e_categories_config_get_color_for:
- * @category: Category to get the color for.
- *
- * Returns the representation of the color configured for the given
- * category
- *
- * Returns: An X color specification.
- */
-const char *
-e_categories_config_get_color_for (const char *category)
-{
- int n;
-
- g_return_val_if_fail (category != NULL, NULL);
-
- if (!initialized)
- initialize_categories_config ();
-
- for (n = 0;
- n < e_categories_master_list_count (E_CATEGORIES_MASTER_LIST (ecmlw));
- n++) {
- char *tmp_cat;
-
- tmp_cat = (char *) e_categories_master_list_nth (E_CATEGORIES_MASTER_LIST (ecmlw), n);
- if (tmp_cat && !strcmp (tmp_cat, category))
- return e_categories_master_list_nth_color (E_CATEGORIES_MASTER_LIST (ecmlw), n);
- }
-
- return NULL; /* not found */
-}
-
-/**
- * e_categories_config_set_color_for
- */
-void
-e_categories_config_set_color_for (const char *category, const char *color)
-{
- /* FIXME: implement */
-}
-
-/**
- * e_categories_config_get_icon_for:
- * @category: Category for which to get the icon.
- * @icon: A pointer to where the pixmap will be returned.
- * @mask: A pointer to where the mask will be returned.
- *
- * Returns the icon (and associated mask) configured for the
- * given category.
- */
-void
-e_categories_config_get_icon_for (const char *category, GdkPixmap **pixmap, GdkBitmap **mask)
-{
- char *icon_file;
- GdkPixbuf *pixbuf;
- GdkBitmap *tmp_mask;
-
- g_return_if_fail (pixmap != NULL);
-
- icon_file = (char *) e_categories_config_get_icon_file_for (category);
- if (!icon_file) {
- *pixmap = NULL;
- if (mask != NULL)
- *mask = NULL;
- return;
- }
-
- /* load the icon in our list */
- pixbuf = g_hash_table_lookup (icons_table, icon_file);
- if (!pixbuf) {
- pixbuf = gdk_pixbuf_new_from_file (icon_file);
- if (!pixbuf) {
- *pixmap = NULL;
- if (mask != NULL)
- *mask = NULL;
- return;
- }
-
- g_hash_table_insert (icons_table, g_strdup (icon_file), pixbuf);
- }
-
- /* render the pixbuf to the pixmap and mask passed */
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, pixmap, &tmp_mask, 1);
- if (mask != NULL)
- *mask = tmp_mask;
-}
-
-/**
- * e_categories_config_get_icon_file_for
- * @category: Category for which to get the icon file
- */
-const char *
-e_categories_config_get_icon_file_for (const char *category)
-{
- int n;
-
- g_return_val_if_fail (category != NULL, NULL);
-
- if (!initialized)
- initialize_categories_config ();
-
- for (n = 0;
- n < e_categories_master_list_count (E_CATEGORIES_MASTER_LIST (ecmlw));
- n++) {
- char *tmp_cat;
-
- tmp_cat = (char *) e_categories_master_list_nth (E_CATEGORIES_MASTER_LIST (ecmlw), n);
- if (tmp_cat && !strcmp (tmp_cat, category))
- return e_categories_master_list_nth_icon (E_CATEGORIES_MASTER_LIST (ecmlw), n);
- }
-
- return NULL; /* not found */
-}
-
-/**
- * e_categories_config_set_icon_for
- * @category: Category for which to set the icon.
- * @icon_file: Full path of the icon file.
- */
-void
-e_categories_config_set_icon_for (const char *category, const char *icon_file)
-{
-}
-
-/**
- * e_categories_config_open_dialog_for_entry:
- * entry: A GtkEntry on which to get/set the categories list.
- *
- * This is a self-contained function that lets you open a popup dialog for
- * the user to select a list of categories.
- *
- * The @entry parameter is used, at initialization time, as the list of
- * initial categories that are selected in the categories selection dialog.
- * Then, when the user commits its changes, the list of selected categories
- * is put back on the entry widget.
- */
-void
-e_categories_config_open_dialog_for_entry (GtkEntry *entry)
-{
- char *categories;
- GnomeDialog *dialog;
- int result;
-
- g_return_if_fail (entry != NULL);
- g_return_if_fail (GTK_IS_ENTRY (entry));
-
- if (!initialized)
- initialize_categories_config ();
-
- categories = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry));
- dialog = GNOME_DIALOG (e_categories_new (categories));
-
- gtk_object_set (GTK_OBJECT (dialog),
- "ecml", ecmlw,
- NULL);
-
- /* run the dialog */
- 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/e-util/e-categories-config.h b/e-util/e-categories-config.h
deleted file mode 100644
index 0b798e466e..0000000000
--- a/e-util/e-categories-config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Categories configuration.
- *
- * Author:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright 2001, Ximian, Inc.
- */
-
-#ifndef __E_CATEGORIES_CONFIG_H__
-#define __E_CATEGORIES_CONFIG_H__
-
-#include <glib.h>
-#include <gdk/gdk.h>
-#include <gtk/gtkentry.h>
-#include <libgnome/gnome-defs.h>
-
-BEGIN_GNOME_DECLS
-
-const char *e_categories_config_get_color_for (const char *category);
-void e_categories_config_set_color_for (const char *category, const char *color);
-
-void e_categories_config_get_icon_for (const char *category,
- GdkPixmap **icon,
- GdkBitmap **mask);
-const char *e_categories_config_get_icon_file_for (const char *category);
-void e_categories_config_set_icon_for (const char *category,
- const char *pixmap_file);
-
-void e_categories_config_open_dialog_for_entry (GtkEntry *entry);
-
-END_GNOME_DECLS
-
-#endif
diff --git a/e-util/e-categories-master-list-wombat.c b/e-util/e-categories-master-list-wombat.c
deleted file mode 100644
index 29318dec04..0000000000
--- a/e-util/e-categories-master-list-wombat.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-categories-master-list.c: the master list of categories.
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 1999, 2000 Ximian, Inc.
- */
-#include <config.h>
-
-#include "e-categories-master-list-wombat.h"
-#include "e-categories-config.h"
-
-#include <tree.h>
-#include <parser.h>
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-xml-utils.h>
-#include <bonobo-conf/bonobo-config-database.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-listener.h>
-#include <bonobo/bonobo-event-source.h>
-
-#define PARENT_TYPE e_categories_master_list_array_get_type ()
-
-#define d(x)
-
-struct _ECategoriesMasterListWombatPriv {
- Bonobo_ConfigDatabase db;
- Bonobo_EventSource_ListenerId listener_id;
-};
-
-static ECategoriesMasterListArrayClass *parent_class;
-
-static void
-ecmlw_load (ECategoriesMasterListWombat *ecmlw)
-{
- char *string;
- gboolean def;
-
- string = bonobo_config_get_string_with_default
- (ecmlw->priv->db,
- "General/CategoryMasterList",
- NULL,
- &def);
-
- /* parse the XML string */
- if (!def) {
- e_categories_master_list_array_from_string (E_CATEGORIES_MASTER_LIST_ARRAY (ecmlw),
- string);
- }
-
- d(g_print ("load: %s\n", string?string:"(nil)"));
-
- g_free (string);
-}
-
-static void
-ecmlw_save (ECategoriesMasterListWombat *ecmlw)
-{
- char *string;
- CORBA_Environment ev;
-
- string = e_categories_master_list_array_to_string (E_CATEGORIES_MASTER_LIST_ARRAY (ecmlw));
-
- d(g_print ("save: %s\n", string));
-
- CORBA_exception_init (&ev);
-
- bonobo_config_set_string (ecmlw->priv->db,
- "General/CategoryMasterList",
- string,
- &ev);
-
- CORBA_exception_free (&ev);
-
- g_free (string);
-}
-
-/**
- * ecmlw_commit:
- * @ecml: the master list to remove from.
- */
-static void
-ecmlw_commit (ECategoriesMasterList *ecml)
-{
- ECategoriesMasterListWombat *ecmlw = E_CATEGORIES_MASTER_LIST_WOMBAT (ecml);
-
- ((ECategoriesMasterListClass *) parent_class)->commit (ecml);
-
- ecmlw_save (ecmlw);
-}
-
-
-/**
- * ecmlw_reset:
- * @ecml: the master list to reset.
- */
-static void
-ecmlw_reset (ECategoriesMasterList *ecml)
-{
- ECategoriesMasterListWombat *ecmlw = E_CATEGORIES_MASTER_LIST_WOMBAT (ecml);
-
- ((ECategoriesMasterListClass *) parent_class)->reset (ecml);
-
- ecmlw_save (ecmlw);
-}
-
-static void
-ecmlw_destroy (GtkObject *object)
-{
- ECategoriesMasterListWombat *ecmlw = E_CATEGORIES_MASTER_LIST_WOMBAT (object);
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- /* remove the listener */
-
- bonobo_event_source_client_remove_listener (ecmlw->priv->db,
- ecmlw->priv->listener_id,
- &ev);
- bonobo_object_release_unref (ecmlw->priv->db, &ev);
-
- CORBA_exception_free (&ev);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-static void
-ecmlw_class_init (GtkObjectClass *object_class)
-{
- ECategoriesMasterListClass *ecml_class = E_CATEGORIES_MASTER_LIST_CLASS(object_class);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- ecml_class->commit = ecmlw_commit;
-
- ecml_class->reset = ecmlw_reset ;
-
- object_class->destroy = ecmlw_destroy;
-}
-
-static void
-property_change_cb (BonoboListener *listener,
- char *event_name,
- CORBA_any *any,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- ecmlw_load (user_data);
-}
-
-static void
-ecmlw_init (ECategoriesMasterListWombat *ecmlw)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- ecmlw->priv = g_new (ECategoriesMasterListWombatPriv, 1);
- ecmlw->priv->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- /* add a listener */
- ecmlw->priv->listener_id =
- bonobo_event_source_client_add_listener (ecmlw->priv->db, property_change_cb,
- NULL, &ev, ecmlw);
- if (BONOBO_EX (&ev)) {
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- ecmlw_load (ecmlw);
-}
-
-guint
-e_categories_master_list_wombat_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo info = {
- "ECategoriesMasterListWombat",
- sizeof (ECategoriesMasterListWombat),
- sizeof (ECategoriesMasterListWombatClass),
- (GtkClassInitFunc) ecmlw_class_init,
- (GtkObjectInitFunc) ecmlw_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-ECategoriesMasterList *
-e_categories_master_list_wombat_new (void)
-{
- return E_CATEGORIES_MASTER_LIST (gtk_type_new (e_categories_master_list_wombat_get_type ()));
-}
diff --git a/e-util/e-categories-master-list-wombat.h b/e-util/e-categories-master-list-wombat.h
deleted file mode 100644
index a6fe2a04ff..0000000000
--- a/e-util/e-categories-master-list-wombat.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_CATEGORIES_MASTER_LIST_WOMBAT_H_
-#define _E_CATEGORIES_MASTER_LIST_WOMBAT_H_
-
-#include <gal/widgets/e-categories-master-list-array.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_CATEGORIES_MASTER_LIST_WOMBAT_TYPE (e_categories_master_list_wombat_get_type ())
-#define E_CATEGORIES_MASTER_LIST_WOMBAT(o) (GTK_CHECK_CAST ((o), E_CATEGORIES_MASTER_LIST_WOMBAT_TYPE, ECategoriesMasterListWombat))
-#define E_CATEGORIES_MASTER_LIST_WOMBAT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CATEGORIES_MASTER_LIST_WOMBAT_TYPE, ECategoriesMasterListWombatClass))
-#define E_IS_CATEGORIES_MASTER_LIST_WOMBAT(o) (GTK_CHECK_TYPE ((o), E_CATEGORIES_MASTER_LIST_WOMBAT_TYPE))
-#define E_IS_CATEGORIES_MASTER_LIST_WOMBAT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CATEGORIES_MASTER_LIST_WOMBAT_TYPE))
-
-typedef struct _ECategoriesMasterListWombatPriv ECategoriesMasterListWombatPriv;
-
-typedef struct {
- ECategoriesMasterListArray base;
- ECategoriesMasterListWombatPriv *priv;
-} ECategoriesMasterListWombat;
-
-typedef struct {
- ECategoriesMasterListArrayClass parent_class;
-} ECategoriesMasterListWombatClass;
-
-GtkType e_categories_master_list_wombat_get_type (void);
-ECategoriesMasterList *e_categories_master_list_wombat_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_CATEGORIES_MASTER_LIST_WOMBAT_H_ */
diff --git a/e-util/e-corba-utils.c b/e-util/e-corba-utils.c
deleted file mode 100644
index 8245b91986..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 Ximian, Inc.
- * Author: Ettore Perazzoli <ettore@ximian.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 1281f86876..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 Ximian, Inc.
- * Author: Ettore Perazzoli <ettore@ximian.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-db3-utils.c b/e-util/e-db3-utils.c
deleted file mode 100644
index c1da265453..0000000000
--- a/e-util/e-db3-utils.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include "config.h"
-
-#include "e-db3-utils.h"
-
-#include <db.h>
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-
-#if DB_VERSION_MAJOR != 3 || \
- DB_VERSION_MINOR != 1 || \
- DB_VERSION_PATCH != 17
-#error Including wrong DB3. Need libdb 3.1.17.
-#endif
-
-static char *
-get_check_filename (const char *filename)
-{
- return g_strdup_printf ("%s-upgrading", filename);
-}
-
-static char *
-get_copy_filename (const char *filename)
-{
- return g_strdup_printf ("%s-copy", filename);
-}
-
-static int
-cp_file (const char *src, const char *dest)
-{
- int i;
- int o;
- char buffer[1024];
- int length;
- int place;
-
- i = open (src, O_RDONLY);
- if (i == -1)
- return -1;
- o = creat (dest, S_IREAD | S_IWRITE);
- if (o == -1) {
- close (i);
- return -1;
- }
- while (1) {
- length = read (i, &buffer, sizeof (buffer));
-
- if (length == 0)
- break;
-
- if (length == -1) {
- if (errno == EINTR)
- continue;
- else {
- close (i);
- close (o);
- unlink (dest);
- return -1;
- }
- }
-
- place = 0;
- while (length != 0) {
- int count;
- count = write (o, buffer + place, length);
- if (count == -1) {
- if (errno == EINTR)
- continue;
- else {
- close (i);
- close (o);
- unlink (dest);
- return -1;
- }
- }
-
- length -= count;
- place += count;
- }
- }
- if (close (i))
- return -1;
- if (close (o))
- return -1;
- return 0;
-}
-
-static int
-touch_file (const char *file)
-{
- int o;
- o = creat (file, S_IREAD | S_IWRITE);
- if (o == -1)
- return -1;
-
- if (close (o) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-resume_upgrade (const char *filename, const char *copy_filename, const char *check_filename)
-{
- DB *db;
- int ret_val;
-
- ret_val = db_create (&db, NULL, 0);
-
- if (ret_val == 0)
- ret_val = cp_file (copy_filename, filename);
-
- if (ret_val == 0)
- ret_val = db->upgrade (db, filename, 0);
-
- if (ret_val == 0)
- ret_val = unlink (check_filename);
- if (ret_val == 0)
- ret_val = unlink (copy_filename);
-
- db->close (db, 0);
-
- return ret_val;
-}
-
-int
-e_db3_utils_maybe_recover (const char *filename)
-{
- int ret_val = 0;
- char *copy_filename;
- char *check_filename;
-
- copy_filename = get_copy_filename (filename);
- check_filename = get_check_filename (filename);
-
- if (g_file_exists (check_filename)) {
- ret_val = resume_upgrade(filename, copy_filename, check_filename);
- } else if (g_file_exists (copy_filename)) {
- unlink (copy_filename);
- }
-
- g_free (copy_filename);
- g_free (check_filename);
- return ret_val;
-}
-
-int
-e_db3_utils_upgrade_format (const char *filename)
-{
- char *copy_filename;
- char *check_filename;
- DB *db;
- int ret_val;
-
- ret_val = db_create (&db, NULL, 0);
- if (ret_val != 0)
- return ret_val;
-
- copy_filename = get_copy_filename (filename);
- check_filename = get_check_filename (filename);
-
- ret_val = cp_file (filename, copy_filename);
-
- if (ret_val == 0)
- ret_val = touch_file (check_filename);
- if (ret_val == 0)
- ret_val = db->upgrade (db, filename, 0);
- if (ret_val == 0)
- ret_val = unlink (check_filename);
-
- if (ret_val == 0)
- ret_val = unlink (copy_filename);
-
- db->close (db, 0);
-
- g_free (check_filename);
- g_free (copy_filename);
- return ret_val;
-}
diff --git a/e-util/e-db3-utils.h b/e-util/e-db3-utils.h
deleted file mode 100644
index a574e59178..0000000000
--- a/e-util/e-db3-utils.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * db3 utils.
- *
- * Author:
- * Chris Lahey <clahey@ximian.com>
- *
- * Copyright 2001, Ximian, Inc.
- */
-
-#ifndef __E_DB3_UTILS_H__
-#define __E_DB3_UTILS_H__
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-int e_db3_utils_maybe_recover (const char *filename);
-int e_db3_utils_upgrade_format (const char *filename);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! __E_DB3_UTILS_H__ */
-
diff --git a/e-util/e-dbhash.c b/e-util/e-dbhash.c
deleted file mode 100644
index 7ac5dd0d8c..0000000000
--- a/e-util/e-dbhash.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * JP Rosevear (jpr@ximian.com)
- *
- * Copyright 2000, Ximian, Inc.
- */
-
-#include <config.h>
-
-#include "e-dbhash.h"
-
-#include <string.h>
-#include <fcntl.h>
-#include <db.h>
-#include "md5-utils.h"
-
-#if DB_VERSION_MAJOR != 3 || \
- DB_VERSION_MINOR != 1 || \
- DB_VERSION_PATCH != 17
-#error Including wrong DB3. Need libdb 3.1.17.
-#endif
-
-struct _EDbHashPrivate
-{
- DB *db;
-};
-
-EDbHash *
-e_dbhash_new (const char *filename)
-{
- EDbHash *edbh;
- DB *db;
- int rv;
-
- int major, minor, patch;
-
- db_version (&major, &minor, &patch);
-
- if (major != 3 ||
- minor != 1 ||
- patch != 17) {
- g_warning ("Wrong version of libdb.");
- return NULL;
- }
-
- /* Attempt to open the database */
- rv = db_create (&db, NULL, 0);
- if (rv != 0) {
- return NULL;
- }
-
- rv = db->open (db, filename, NULL, DB_HASH, 0, 0666);
- if (rv != 0) {
- rv = db->open (db, filename, NULL, DB_HASH, DB_CREATE, 0666);
-
- if (rv != 0)
- 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)
-{
- memset (dbt, 0, sizeof (DBT));
- dbt->data = (void*)str;
- dbt->size = strlen (str) + 1;
-}
-
-static void
-md5_to_dbt(const char str[16], DBT *dbt)
-{
- memset (dbt, 0, sizeof (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, NULL, &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, NULL, &dkey, 0);
-}
-
-void
-e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data)
-{
- DB *db;
- DBT dkey;
- DBT ddata;
- DBC *dbc;
- 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->cursor (db, NULL, &dbc, 0);
-
- if (db_error != 0) {
- return;
- }
-
- db_error = dbc->c_get(dbc, &dkey, &ddata, DB_FIRST);
-
- while (db_error == 0) {
- (*func) ((const char *)dkey.data, user_data);
-
- db_error = dbc->c_get(dbc, &dkey, &ddata, DB_NEXT);
- }
- dbc->c_close (dbc);
-}
-
-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, NULL, &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, 0);
-
- 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 9772a60c41..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@ximian.com)
- *
- * Copyright 2000, Ximian, 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-utils.c b/e-util/e-dialog-utils.c
deleted file mode 100644
index 0a6bf13386..0000000000
--- a/e-util/e-dialog-utils.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-dialog-utils.h
- *
- * 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:
- * Michael Meeks <michael@ximian.com>
- * Ettore Perazzoli <ettore@ximian.com>
- */
-
-#include "e-dialog-utils.h"
-
-#include "widgets/misc/e-bonobo-widget.h"
-
-#include <gdk/gdkx.h>
-#include <gdk/gdkprivate.h>
-#include <gdk/gdk.h>
-
-#include <gtk/gtksignal.h>
-
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-
-
-#define TRANSIENT_DATA_ID "e-dialog:transient"
-
-
-static void
-transient_realize_callback (GtkWidget *widget)
-{
- GdkWindow *window;
-
- window = gtk_object_get_data (GTK_OBJECT (widget), TRANSIENT_DATA_ID);
- g_assert (window != NULL);
-
- gdk_window_set_transient_for (GTK_WIDGET (widget)->window, window);
-}
-
-static void
-transient_unrealize_callback (GtkWidget *widget)
-{
- GdkWindow *window;
-
- window = gtk_object_get_data (GTK_OBJECT (widget), TRANSIENT_DATA_ID);
- g_assert (window != NULL);
-
- gdk_property_delete (window, gdk_atom_intern ("WM_TRANSIENT_FOR", FALSE));
-}
-
-static void
-transient_destroy_callback (GtkWidget *widget)
-{
- GdkWindow *window;
-
- window = gtk_object_get_data (GTK_OBJECT (widget), "transient");
- if (window != NULL)
- gdk_window_unref (window);
-}
-
-static void
-set_transient_for_gdk (GtkWindow *window,
- GdkWindow *parent)
-{
- g_return_if_fail (window != NULL);
- g_return_if_fail (gtk_object_get_data (GTK_OBJECT (window), TRANSIENT_DATA_ID) == NULL);
-
- gdk_window_ref (parent); /* FIXME? */
-
- gtk_object_set_data (GTK_OBJECT (window), TRANSIENT_DATA_ID, parent);
-
- if (GTK_WIDGET_REALIZED (window))
- gdk_window_set_transient_for (GTK_WIDGET (window)->window, parent);
-
- gtk_signal_connect (GTK_OBJECT (window), "realize",
- GTK_SIGNAL_FUNC (transient_realize_callback), NULL);
-
- gtk_signal_connect (GTK_OBJECT (window), "unrealize",
- GTK_SIGNAL_FUNC (transient_unrealize_callback), NULL);
-
- gtk_signal_connect (GTK_OBJECT (window), "destroy",
- GTK_SIGNAL_FUNC (transient_destroy_callback), NULL);
-}
-
-
-/**
- * e_set_dialog_parent:
- * @dialog:
- * @parent_widget:
- *
- * This sets the parent for @dialog to be @parent_widget. Unlike
- * gtk_window_set_parent(), this doesn't need @parent_widget to be the actual
- * toplevel, and also works if @parent_widget is been embedded as a Bonobo
- * control by an out-of-process container.
- **/
-void
-e_set_dialog_parent (GtkWindow *dialog,
- GtkWidget *parent_widget)
-{
- Bonobo_PropertyBag property_bag;
- GtkWidget *toplevel;
- GdkWindow *gdk_window;
- CORBA_char *id;
- guint32 xid;
-
- g_return_if_fail (dialog != NULL);
- g_return_if_fail (GTK_IS_WINDOW (dialog));
- g_return_if_fail (parent_widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (parent_widget));
-
- toplevel = gtk_widget_get_toplevel (parent_widget);
- if (toplevel == NULL)
- return;
-
- if (! BONOBO_IS_CONTROL (toplevel)) {
- if (GTK_IS_WINDOW (toplevel))
- gtk_window_set_transient_for (dialog, GTK_WINDOW (toplevel));
- return;
- }
-
- property_bag = bonobo_control_get_ambient_properties (BONOBO_CONTROL (toplevel), NULL);
- if (property_bag == CORBA_OBJECT_NIL)
- return;
-
- id = bonobo_property_bag_client_get_value_string (property_bag, E_BONOBO_WIDGET_TOPLEVEL_PROPERTY_ID, NULL);
- if (id == NULL)
- return;
-
- xid = strtol (id, NULL, 10);
-
- g_warning ("Got id `%s' -> %x", id, xid);
-
- gdk_window = gdk_window_foreign_new (xid);
- set_transient_for_gdk (dialog, gdk_window);
-}
diff --git a/e-util/e-dialog-utils.h b/e-util/e-dialog-utils.h
deleted file mode 100644
index 578ea0d585..0000000000
--- a/e-util/e-dialog-utils.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-dialog-utils.h
- *
- * 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.
- *
- * Author: Ettore Perazzoli <ettore@ximian.com>
- */
-
-#ifndef E_DIALOG_UTILS_H
-#define E_DIALOG_UTILS_H
-
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkwidget.h>
-
-void e_set_dialog_parent (GtkWindow *dialog,
- GtkWidget *parent_widget);
-
-#endif
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
deleted file mode 100644
index 5bf3d3c844..0000000000
--- a/e-util/e-dialog-widgets.c
+++ /dev/null
@@ -1,832 +0,0 @@
-/* Evolution internal utilities - Glade dialog widget utilities
- *
- * Copyright (C) 2000 Ximian, 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 2a27705d3c..0000000000
--- a/e-util/e-dialog-widgets.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Evolution internal utilities - Glade dialog widget utilities
- *
- * Copyright (C) 2000 Ximian, 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 f865dabf8d..0000000000
--- a/e-util/e-gtk-utils.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-gtk-utils.c
- *
- * 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
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtklayout.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwidget.h>
-
-#include <gdk/gdkx.h>
-
-#include <X11/Xlib.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);
-}
-
-
-/* BackingStore support. */
-
-static void
-widget_realize_callback_for_backing_store (GtkWidget *widget,
- void *data)
-{
- XSetWindowAttributes attributes;
- GdkWindow *window;
-
- if (GTK_IS_LAYOUT (widget))
- window = GTK_LAYOUT (widget)->bin_window;
- else
- window = widget->window;
-
- attributes.backing_store = Always;
- XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XWINDOW (window),
- CWBackingStore, &attributes);
-}
-
-/**
- * e_make_widget_backing_stored:
- * @widget: A GtkWidget
- *
- * Make sure that the window for @widget has the BackingStore attribute set to
- * Always when realized. This will allow the widget to be refreshed by the X
- * server even if the application is currently not responding to X events (this
- * is e.g. very useful for the splash screen).
- *
- * Notice that this will not work 100% in all cases as the server might not
- * support that or just refuse to do so.
- **/
-void
-e_make_widget_backing_stored (GtkWidget *widget)
-{
- gtk_signal_connect (GTK_OBJECT (widget), "realize",
- GTK_SIGNAL_FUNC (widget_realize_callback_for_backing_store), NULL);
-}
diff --git a/e-util/e-gtk-utils.h b/e-util/e-gtk-utils.h
deleted file mode 100644
index 4ab95e5b68..0000000000
--- a/e-util/e-gtk-utils.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-gtk-utils.c
- *
- * 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
- */
-
-#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);
-
-void e_make_widget_backing_stored (GtkWidget *widget);
-
-#endif
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
deleted file mode 100644
index 70007cf07a..0000000000
--- a/e-util/e-gui-utils.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * GUI utility functions
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- *
- * (C) 1999 Miguel de Icaza
- * (C) 2000 Ximian, Inc.
- */
-#include <config.h>
-
-#include "e-gui-utils.h"
-
-#include <glib.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>
-
-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;
-}
diff --git a/e-util/e-gui-utils.h b/e-util/e-gui-utils.h
deleted file mode 100644
index 9cbb64fbf6..0000000000
--- a/e-util/e-gui-utils.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef E_GUI_UTILS_H
-#define E_GUI_UTILS_H
-
-#include <gtk/gtkwidget.h>
-
-GtkWidget *e_create_image_widget (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2);
-
-#endif /* E_GUI_UTILS_H */
diff --git a/e-util/e-host-utils.c b/e-util/e-host-utils.c
deleted file mode 100644
index 968063f398..0000000000
--- a/e-util/e-host-utils.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-host-utils.c
- *
- * 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.
- *
- * Author: Chris Toshok
- */
-
-#include <config.h>
-#include <glib.h>
-#include "e-host-utils.h"
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-
-G_LOCK_DEFINE_STATIC (gethost_mutex);
-
-/**
- * e_gethostbyname_r:
- * @name: the host to resolve
- * @host: a buffer pointing to a struct hostent to use for storage
- * @buf: a buffer to use for hostname storage
- * @buflen: the size of @buf
- * @herr: a pointer to a variable to store an error code in
- *
- * Resolves the hostname @name, in a hopefully-reentrant fashion.
- *
- * Return value: 0 on success, ERANGE if @buflen is too small,
- * "something else" otherwise (in which case *@herr will be set to
- * one of the gethostbyname() error codes).
- **/
-int
-e_gethostbyname_r (const char *name, struct hostent *host,
- char *buf, int buflen, int *herr)
-{
-#ifdef HAVE_GETHOSTBYNAME_R
-#ifdef GETHOSTBYNAME_R_FIVE_ARGS
- if (gethostbyname_r(name, host, buf, buflen, herr))
- return 0;
- else
- return errno;
-#else
- struct hostent *hp;
- int retval;
-
- retval = gethostbyname_r(name, host, buf, buflen, &hp, herr);
- if (hp != NULL)
- *herr = 0;
- return retval;
-#endif
-#else
- int i;
- char *p;
- struct hostent *h;
- int req_length;
- int num_aliases = 0, num_addrs = 0;
-
- G_LOCK (gethost_mutex);
-
- h = gethostbyname (name);
-
- if (!h) {
- *herr = h_errno;
- G_UNLOCK (gethost_mutex);
- return -1;
- }
-
- /* check to make sure we have enough room in our buffer */
- req_length = 0;
- if (h->h_aliases) {
- for (i = 0; h->h_aliases[i]; i ++)
- req_length += strlen (h->h_aliases[i]) + 1;
- num_aliases = i;
- }
- if (h->h_addr_list) {
- for (i = 0; h->h_addr_list[i]; i ++)
- req_length += h->h_length;
- num_addrs = i;
- }
-
- req_length += sizeof (char*) * (num_aliases + 1);
- req_length += sizeof (char*) * (num_addrs + 1);
- req_length += strlen (h->h_name) + 1;
-
- if (buflen < req_length) {
- *herr = ERANGE;
- G_UNLOCK (gethost_mutex);
- return ERANGE;
- }
-
- /* we store the alias/addr pointers in the buffer - figure out
- their addresses here. */
- p = buf;
- if (num_aliases) {
- host->h_aliases = (char**)p;
- p += sizeof (char*) * (num_aliases + 1);
- }
- else
- host->h_aliases = NULL;
- if (num_addrs) {
- host->h_addr_list = (char**)p;
- p += sizeof(char*) * (num_addrs + 1);
- }
- else
- host->h_addr_list = NULL;
-
- /* copy the host name into the buffer */
- host->h_name = p;
- strcpy (p, h->h_name);
- p += strlen (h->h_name) + 1;
- host->h_addrtype = h->h_addrtype;
- host->h_length = h->h_length;
-
- /* copy the aliases/addresses into the buffer, and assign the
- pointers into the hostent */
- *p = 0;
- if (num_aliases) {
- for (i = 0; i < num_aliases; i ++) {
- strcpy (p, h->h_aliases[i]);
- host->h_aliases[i] = p;
- p += strlen (h->h_aliases[i]);
- }
- host->h_aliases[num_aliases] = NULL;
- }
-
- if (num_addrs) {
- for (i = 0; i < num_addrs; i ++) {
- memcpy (p, h->h_addr_list[i], h->h_length);
- host->h_addr_list[i] = p;
- p += h->h_length;
- }
- host->h_addr_list[num_addrs] = NULL;
- }
-
- G_UNLOCK (gethost_mutex);
-
- return 0;
-#endif
-}
diff --git a/e-util/e-host-utils.h b/e-util/e-host-utils.h
deleted file mode 100644
index 948209f112..0000000000
--- a/e-util/e-host-utils.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-host-utils.h
- *
- * 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.
- *
- * Author: Chris Toshok
- */
-
-#ifndef E_HOST_UTILS_H
-#define E_HOST_UTILS_H
-
-#include <sys/types.h>
-#include <netdb.h>
-
-/* gethostbyname_r implementation that works for systems without a
- native gethostbyname_r. if you use this, you must make sure to
- *only* use this - it can't even coexist with naked calls to
- gethostbyname (even if they exist in libraries.) yes, this loses
- in many ways. blame your local OS developer. */
-int e_gethostbyname_r (const char *name, struct hostent *host, char *buf, int buflen, int *herr);
-
-#endif /* E_HOST_UTILS_H */
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c
deleted file mode 100644
index a2759f91a8..0000000000
--- a/e-util/e-html-utils.c
+++ /dev/null
@@ -1,417 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-html-utils.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Dan Winship <danw@ximian.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 <gal/unicode/gunicode.h>
-
-#include "e-html-utils.h"
-
-static char *
-check_size (char **buffer, int *buffer_size, char *out, int len)
-{
- if (out + len + 1> *buffer + *buffer_size) {
- int index = out - *buffer;
-
- *buffer_size = MAX (index + len + 1, *buffer_size * 2);
- *buffer = g_realloc (*buffer, *buffer_size);
- out = *buffer + index;
- }
- return out;
-}
-
-/* 1 = non-email-address chars: ()<>@,;:\"[] */
-/* 2 = trailing garbage: ,.!?;:>)]}`'-_ */
-static int special_chars[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* nul - 0x0f */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */
- 1, 2, 1, 0, 0, 0, 0, 2, 1, 3, 0, 0, 3, 2, 2, 0, /* sp - / */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 0, 3, 2, /* 0 - ? */
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ - O */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 0, 2, /* P - _ */
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ` - o */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0 /* p - del */
-};
-
-#define is_addr_char(c) (isprint (c) && !(special_chars[c] & 1))
-#define is_addr_char_no_pipes(c) (is_addr_char(c) && (c) != '|')
-#define is_trailing_garbage(c) (!isprint(c) || (special_chars[c] & 2))
-
-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 && is_trailing_garbage (*(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;
-}
-
-static char *
-email_address_extract (const unsigned char **cur, char **out, const unsigned char *linestart)
-{
- const unsigned char *start, *end, *dot;
- char *addr;
-
- /* *cur points to the '@'. Look backward for a valid local-part */
- for (start = *cur; start - 1 >= linestart && is_addr_char_no_pipes (*(start - 1)); start--)
- ;
- if (start == *cur)
- return NULL;
-
- /* Now look forward for a valid domain part */
- for (end = *cur + 1, dot = NULL; is_addr_char_no_pipes (*end); end++) {
- if (*end == '.' && !dot)
- dot = end;
- }
- if (!dot)
- return NULL;
-
- /* Remove trailing garbage */
- while (is_trailing_garbage (*(end - 1)))
- end--;
- if (dot > end)
- return NULL;
-
- addr = g_strndup (start, end - start);
- *out -= *cur - start;
- *cur = end;
-
- return addr;
-}
-
-static gboolean
-is_citation (const unsigned char *c, gboolean saw_citation)
-{
- gunichar u;
- gint i;
-
- /* A line that starts with a ">" is a citation, unless it's
- * just mbox From-mangling...
- */
- if (*c == '>') {
- const unsigned char *p;
-
- if (strncmp (c, ">From ", 6) != 0)
- return TRUE;
-
- /* If the previous line was a citation, then say this
- * one is too.
- */
- if (saw_citation)
- return TRUE;
-
- /* Same if the next line is */
- p = (const unsigned char *)strchr ((const char *)c, '\n');
- if (p && *++p == '>')
- return TRUE;
-
- /* Otherwise, it was just an isolated ">From" line. */
- return FALSE;
- }
-
- /* Check for "Rupert> " and the like... */
- for (i = 0; c && *c && g_unichar_validate (g_utf8_get_char (c)) && *c != '\n' && i < 10; i ++, c = g_utf8_next_char (c)) {
- u = g_utf8_get_char (c);
- if (u == '>')
- return TRUE;
- if (!g_unichar_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="..."> </font> around
- * citations (lines beginning with "> ", etc).
- *
- * - E_TEXT_TO_HTML_ESCAPE_8BIT: flatten everything to US-ASCII
- *
- * - E_TEXT_TO_HTML_CITE: quote the text with "> " at the start of each
- * line.
- **/
-char *
-e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
-{
- const unsigned char *cur, *next, *linestart;
- char *buffer = NULL;
- char *out = NULL;
- int buffer_size = 0, col;
- gboolean colored = FALSE, saw_citation = 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>");
-
- col = 0;
-
- for (cur = linestart = input; cur && *cur; cur = next) {
- gunichar u;
-
- if (flags & E_TEXT_TO_HTML_MARK_CITATION && col == 0) {
- saw_citation = is_citation (cur, saw_citation);
- if (saw_citation) {
- if (!colored) {
- gchar font [25];
-
- g_snprintf (font, 25, "<FONT COLOR=\"#%06x\">", color);
-
- out = check_size (&buffer, &buffer_size, out, 25);
- out += sprintf (out, "%s", font);
- colored = TRUE;
- }
- } else if (colored) {
- gchar *no_font = "</FONT>";
-
- out = check_size (&buffer, &buffer_size, out, 9);
- out += sprintf (out, "%s", no_font);
- colored = FALSE;
- }
-
- /* Display mbox-mangled ">From" as "From" */
- if (*cur == '>' && !saw_citation)
- cur++;
- } else if (flags & E_TEXT_TO_HTML_CITE && col == 0) {
- out = check_size (&buffer, &buffer_size, out, 5);
- out += sprintf (out, "&gt; ");
- }
-
- u = g_utf8_get_char (cur);
- if (g_unichar_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) &&
- g_unichar_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;
- u = g_utf8_get_char (cur);
- }
-
- if (u == '@' && (flags & E_TEXT_TO_HTML_CONVERT_ADDRESSES)) {
- char *addr, *dispaddr, *outaddr;
-
- addr = email_address_extract (&cur, &out, linestart);
- if (addr) {
- dispaddr = e_text_to_html (addr, 0);
- outaddr = g_strdup_printf ("<a href=\"mailto:%s\">%s</a>",
- 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);
-
- u = g_utf8_get_char (cur);
- }
- }
-
- if (!g_unichar_validate (u)) {
- /* Sigh. Someone sent undeclared 8-bit data.
- * Assume it's iso-8859-1.
- */
- u = *cur;
- next = cur + 1;
- } else
- next = g_utf8_next_char (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;
- linestart = 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 {
- if (flags & E_TEXT_TO_HTML_ESCAPE_8BIT)
- *out++ = '?';
- 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 812fe06d58..0000000000
--- a/e-util/e-html-utils.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-html-utils.c */
-/*
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Dan Winship <danw@ximian.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)
-#define E_TEXT_TO_HTML_ESCAPE_8BIT (1 << 6)
-#define E_TEXT_TO_HTML_CITE (1 << 7)
-
-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 8bd14ee6c8..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 Ximian, 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 a6f0899235..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@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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 7d3d644fc2..0000000000
--- a/e-util/e-list-iterator.c
+++ /dev/null
@@ -1,249 +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 Ximian, 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 EIteratorClass *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));
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-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);
- else
- iterator->iterator = iterator->list->list;
- 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);
- else
- iterator->iterator = g_list_last(iterator->list->list);
- 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 6903015002..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@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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 64ccea728c..0000000000
--- a/e-util/e-list.c
+++ /dev/null
@@ -1,179 +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 Ximian, 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);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
diff --git a/e-util/e-list.h b/e-util/e-list.h
deleted file mode 100644
index da63576996..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@ximian.com>
- *
- * Copyright (C) 2000 Ximian, 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 4a2764e407..0000000000
--- a/e-util/e-memory.c
+++ /dev/null
@@ -1,1280 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jacob Berkman <jacob@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 "e-memory.h"
-
-#include <string.h> /* memset() */
-#include <stdlib.h> /* alloca() */
-#include <glib.h>
-
-#define s(x) /* strv debug */
-#define p(x) /* poolv debug */
-#define p2(x) /* poolv assertion checking */
-
-/*#define MALLOC_CHECK*/
-
-/* #define PROFILE_POOLV */
-
-#ifdef PROFILE_POOLV
-#include <time.h>
-#define pp(x) x
-#else
-#define pp(x)
-#endif
-
-/*#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
-
-#ifdef MALLOC_CHECK
-#include <mcheck.h>
-#include <stdio.h>
-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();
- }
- }
-}
-#define MPROBE(x) checkmem((void *)(x))
-#else
-#define MPROBE(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'\nawkmeharder: %s\n ", index, str, 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'\nawkmeevenharder: %s\n ", index, str, 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);
-}
-
-
-
-/* string pool stuff */
-
-/* TODO:
- garbage collection, using the following technique:
- Create a memchunk for each possible size of poolv, and allocate every poolv from those
- To garbage collect, scan all memchunk internally, ignoring any free areas (or mark each
- poolv when freeing it - set length 0?), and find out which strings are not anywhere,
- then free them.
-
- OR:
- Just keep a refcount in the hashtable, instead of duplicating the key pointer.
-
- either would also require a free for the mempool, so ignore it for now */
-
-/*#define POOLV_REFCNT*/ /* Define to enable refcounting code that does
- automatic garbage collection of unused strings */
-
-static GHashTable *poolv_pool = NULL;
-static EMemPool *poolv_mempool = NULL;
-
-#ifdef MALLOC_CHECK
-static GPtrArray *poolv_table = NULL;
-#endif
-
-#ifdef PROFILE_POOLV
-static gulong poolv_hits = 0;
-static gulong poolv_misses = 0;
-#endif
-
-#ifdef G_THREADS_ENABLED
-static GStaticMutex poolv_mutex = G_STATIC_MUTEX_INIT;
-#endif
-
-struct _EPoolv {
- unsigned char length;
- char *s[1];
-};
-
-/**
- * e_poolv_new: @size: The number of elements in the poolv, maximum of 254 elements.
- *
- * create a new poolv (string vector which shares a global string
- * pool). poolv's can be used to work with arrays of strings which
- * save memory by eliminating duplicated allocations of the same
- * string.
- *
- * this is useful when you have a log of read-only strings that do not
- * go away and are duplicated a lot (such as email headers).
- *
- * we should probably in the future ref count the strings contained in
- * the hash table, but for now let's not.
- *
- * Return value: new pooled string vector
- **/
-EPoolv *
-e_poolv_new(unsigned int size)
-{
- EPoolv *poolv;
-
- g_assert(size < 255);
-
- poolv = g_malloc0(sizeof (*poolv) + (size - 1) * sizeof (char *));
- poolv->length = size;
-
-#ifdef G_THREADS_ENABLED
- g_static_mutex_lock(&poolv_mutex);
-#endif
- if (!poolv_pool)
- poolv_pool = g_hash_table_new(g_str_hash, g_str_equal);
-
- if (!poolv_mempool)
- poolv_mempool = e_mempool_new(32 * 1024, 512, E_MEMPOOL_ALIGN_BYTE);
-
-#ifdef MALLOC_CHECK
- {
- int i;
-
- if (poolv_table == NULL)
- poolv_table = g_ptr_array_new();
-
- for (i=0;i<poolv_table->len;i++)
- MPROBE(poolv_table->pdata[i]);
-
- g_ptr_array_add(poolv_table, poolv);
- }
-#endif
-
-#ifdef G_THREADS_ENABLED
- g_static_mutex_unlock(&poolv_mutex);
-#endif
-
- p(printf("new poolv=%p\tsize=%d\n", poolv, sizeof(*poolv) + (size-1)*sizeof(char *)));
-
- return poolv;
-}
-
-/**
- * e_poolv_cpy:
- * @dest: destination pooled string vector
- * @src: source pooled string vector
- *
- * Copy the contents of a pooled string vector
- *
- * Return value: @dest, which may be re-allocated if the strings
- * are different lengths.
- **/
-EPoolv *
-e_poolv_cpy(EPoolv *dest, const EPoolv *src)
-{
-#ifdef POOLV_REFCNT
- int i;
- unsigned int ref;
- char *key;
-#endif
-
- p2(g_return_val_if_fail (dest != NULL, NULL));
- p2(g_return_val_if_fail (src != NULL, NULL));
-
- MPROBE(dest);
- MPROBE(src);
-
- if (dest->length != src->length) {
- e_poolv_destroy(dest);
- dest = e_poolv_new(src->length);
- }
-
-#ifdef POOLV_REFCNT
-#ifdef G_THREADS_ENABLED
- g_static_mutex_lock(&poolv_mutex);
-#endif
- /* ref new copies */
- for (i=0;i<src->length;i++) {
- if (src->s[i]) {
- if (g_hash_table_lookup_extended(poolv_pool, src->s[i], (void **)&key, (void **)&ref)) {
- g_hash_table_insert(poolv_pool, key, (void *)(ref+1));
- } else {
- g_assert_not_reached();
- }
- }
- }
-
- /* unref the old ones */
- for (i=0;i<dest->length;i++) {
- if (dest->s[i]) {
- if (g_hash_table_lookup_extended(poolv_pool, dest->s[i], (void **)&key, (void **)&ref)) {
- /* if ref == 1 free it */
- g_assert(ref > 0);
- g_hash_table_insert(poolv_pool, key, (void *)(ref-1));
- } else {
- g_assert_not_reached();
- }
- }
- }
-#ifdef G_THREADS_ENABLED
- g_static_mutex_unlock(&poolv_mutex);
-#endif
-#endif
-
- memcpy(dest->s, src->s, src->length * sizeof (char *));
-
- return dest;
-}
-
-#ifdef PROFILE_POOLV
-static void
-poolv_profile_update (void)
-{
- static time_t last_time = 0;
- time_t new_time;
-
- new_time = time (NULL);
- if (new_time - last_time < 5)
- return;
-
- printf("poolv profile: %lu hits, %lu misses: %d%% hit rate\n",
- poolv_hits, poolv_misses,
- (int)(100.0 * ((double) poolv_hits / (double) (poolv_hits + poolv_misses))));
-
- last_time = new_time;
-}
-#endif
-
-/**
- * e_poolv_set:
- * @poolv: pooled string vector
- * @index: index in vector of string
- * @str: string to set
- * @freeit: whether the caller is releasing its reference to the
- * string
- *
- * Set a string vector reference. If the caller will no longer be
- * referencing the string, freeit should be TRUE. Otherwise, this
- * will duplicate the string if it is not found in the pool.
- *
- * Return value: @poolv
- **/
-EPoolv *
-e_poolv_set (EPoolv *poolv, int index, char *str, int freeit)
-{
-#ifdef POOLV_REFCNT
- unsigned int ref;
- char *key;
-#endif
-
- p2(g_return_val_if_fail (poolv != NULL, NULL));
-
- g_assert(index >=0 && index < poolv->length);
-
- MPROBE(poolv);
-
- p(printf("setting %d `%s'\n", index, str));
-
- if (!str) {
-#ifdef POOLV_REFCNT
- if (poolv->s[index]) {
- if (g_hash_table_lookup_extended(poolv_pool, poolv->s[index], (void **)&key, (void **)&ref)) {
- g_assert(ref > 0);
- g_hash_table_insert(poolv_pool, key, (void *)(ref-1));
- } else {
- g_assert_not_reached();
- }
- }
-#endif
- poolv->s[index] = NULL;
- return poolv;
- }
-
-#ifdef G_THREADS_ENABLED
- g_static_mutex_lock(&poolv_mutex);
-#endif
-
-#ifdef POOLV_REFCNT
- if (g_hash_table_lookup_extended(poolv_pool, str, (void **)&key, (void **)&ref)) {
- g_hash_table_insert(poolv_pool, key, (void *)(ref+1));
- poolv->s[index] = key;
-# ifdef PROFILE_POOLV
- poolv_hits++;
- poolv_profile_update ();
-# endif
- } else {
-# ifdef PROFILE_POOLV
- poolv_misses++;
- poolv_profile_update ();
-# endif
- poolv->s[index] = e_mempool_strdup(poolv_mempool, str);
- g_hash_table_insert(poolv_pool, poolv->s[index], (void *)1);
- }
-
-#else /* !POOLV_REFCNT */
- if ((poolv->s[index] = g_hash_table_lookup(poolv_pool, str)) != NULL) {
-# ifdef PROFILE_POOLV
- poolv_hits++;
- poolv_profile_update ();
-# endif
- } else {
-# ifdef PROFILE_POOLV
- poolv_misses++;
- poolv_profile_update ();
-# endif
- poolv->s[index] = e_mempool_strdup(poolv_mempool, str);
- g_hash_table_insert(poolv_pool, poolv->s[index], poolv->s[index]);
- }
-#endif /* !POOLV_REFCNT */
-
-#ifdef G_THREADS_ENABLED
- g_static_mutex_unlock(&poolv_mutex);
-#endif
-
- if (freeit)
- g_free(str);
-
- return poolv;
-}
-
-/**
- * e_poolv_get:
- * @poolv: pooled string vector
- * @index: index in vector of string
- *
- * Retrieve a string by index. This could possibly just be a macro.
- *
- * Since the pool is never freed, this string does not need to be
- * duplicated, but should not be modified.
- *
- * Return value: string at that index.
- **/
-const char *
-e_poolv_get(EPoolv *poolv, int index)
-{
- g_assert(poolv != NULL);
- g_assert(index>= 0 && index < poolv->length);
-
- MPROBE(poolv);
-
- p(printf("get %d = `%s'\n", index, poolv->s[index]));
-
- return poolv->s[index]?poolv->s[index]:"";
-}
-
-/**
- * e_poolv_destroy:
- * @poolv: pooled string vector to free
- *
- * Free a pooled string vector. This doesn't free the strings from
- * the vector, however.
- **/
-void
-e_poolv_destroy(EPoolv *poolv)
-{
-#ifdef POOLV_REFCNT
- int i;
- unsigned int ref;
- char *key;
-
- MPROBE(poolv);
-
-#ifdef G_THREADS_ENABLED
- g_static_mutex_lock(&poolv_mutex);
-#endif
-
-#ifdef MALLOC_CHECK
- for (i=0;i<poolv_table->len;i++)
- MPROBE(poolv_table->pdata[i]);
-
- g_ptr_array_remove_fast(poolv_table, poolv);
-#endif
-
- for (i=0;i<poolv->length;i++) {
- if (poolv->s[i]) {
- if (g_hash_table_lookup_extended(poolv_pool, poolv->s[i], (void **)&key, (void **)&ref)) {
- /* if ref == 1 free it */
- g_assert(ref > 0);
- g_hash_table_insert(poolv_pool, key, (void *)(ref-1));
- } else {
- g_assert_not_reached();
- }
- }
- }
-#ifdef G_THREADS_ENABLED
- g_static_mutex_unlock(&poolv_mutex);
-#endif
-#endif
-
- g_free(poolv);
-}
-
-#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);
- time_end("allocating 1000000 gmemchunks");
-
- time_start("Using malloc");
- for (i=0;i<1000000;i++) {
- malloc(CHUNK_SIZE);
- }
- time_end("allocating 1000000 malloc");
-#endif
-
-}
-
-#endif
diff --git a/e-util/e-memory.h b/e-util/e-memory.h
deleted file mode 100644
index c609a896be..0000000000
--- a/e-util/e-memory.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2001, Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- * Jacob Berkman <jacob@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_MEMORY_H
-#define _E_MEMORY_H
-
-/* memchunks - allocate/free fixed-size blocks of memory */
-/* this is like gmemchunk, only faster and less overhead (only 4 bytes for every atomcount allocations) */
-typedef struct _EMemChunk EMemChunk;
-
-EMemChunk *e_memchunk_new(int atomcount, int atomsize);
-void *e_memchunk_alloc(EMemChunk *m);
-void *e_memchunk_alloc0(EMemChunk *m);
-void e_memchunk_free(EMemChunk *m, void *mem);
-void e_memchunk_empty(EMemChunk *m);
-void e_memchunk_clean(EMemChunk *m);
-void e_memchunk_destroy(EMemChunk *m);
-
-/* mempools - allocate variable sized blocks of memory, and free as one */
-/* allocation is very fast, but cannot be freed individually */
-typedef struct _EMemPool EMemPool;
-typedef enum {
- E_MEMPOOL_ALIGN_STRUCT = 0, /* allocate to native structure alignment */
- E_MEMPOOL_ALIGN_WORD = 1, /* allocate to words - 16 bit alignment */
- E_MEMPOOL_ALIGN_BYTE = 2, /* allocate to bytes - 8 bit alignment */
- E_MEMPOOL_ALIGN_MASK = 3, /* which bits determine the alignment information */
-} EMemPoolFlags;
-
-EMemPool *e_mempool_new(int blocksize, int threshold, EMemPoolFlags flags);
-void *e_mempool_alloc(EMemPool *pool, int size);
-char *e_mempool_strdup(EMemPool *pool, const char *str);
-void e_mempool_flush(EMemPool *pool, int freeall);
-void e_mempool_destroy(EMemPool *pool);
-
-/* strv's string arrays that can be efficiently modified and then compressed mainly for retrival */
-/* building is relatively fast, once compressed it takes the minimum amount of memory possible to store */
-typedef struct _EStrv EStrv;
-
-EStrv *e_strv_new(int size);
-EStrv *e_strv_set_ref(EStrv *strv, int index, char *str);
-EStrv *e_strv_set_ref_free(EStrv *strv, int index, char *str);
-EStrv *e_strv_set(EStrv *strv, int index, const char *str);
-EStrv *e_strv_pack(EStrv *strv);
-char *e_strv_get(EStrv *strv, int index);
-void e_strv_destroy(EStrv *strv);
-
-/* poolv's are similar to strv's, but they store common strings */
-typedef struct _EPoolv EPoolv;
-
-EPoolv *e_poolv_new(unsigned int size);
-EPoolv *e_poolv_cpy(EPoolv *dest, const EPoolv *src);
-EPoolv *e_poolv_set(EPoolv *poolv, int index, char *str, int freeit);
-const char *e_poolv_get(EPoolv *poolv, int index);
-void e_poolv_destroy(EPoolv *poolv);
-
-#endif /* ! _E_MEMORY_H */
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c
deleted file mode 100644
index 1d878b1ba0..0000000000
--- a/e-util/e-mktemp.c
+++ /dev/null
@@ -1,267 +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 "e-mktemp.h"
-
-#include <config.h>
-
-#include <glib.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-
-static gboolean initialized = FALSE;
-static GSList *temp_files = NULL;
-static GSList *temp_dirs = NULL;
-#ifdef ENABLE_THREADS
-static pthread_mutex_t temp_files_lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t temp_dirs_lock = PTHREAD_MUTEX_INITIALIZER;
-#define TEMP_FILES_LOCK() pthread_mutex_lock (&temp_files_lock)
-#define TEMP_FILES_UNLOCK() pthread_mutex_unlock (&temp_files_lock)
-#define TEMP_DIRS_LOCK() pthread_mutex_lock (&temp_dirs_lock)
-#define TEMP_DIRS_UNLOCK() pthread_mutex_unlock (&temp_dirs_lock)
-#else
-#define TEMP_FILES_LOCK()
-#define TEMP_FILES_UNLOCK()
-#define TEMP_DIRS_LOCK()
-#define TEMP_DIRS_UNLOCK()
-#endif /* ENABLE_THREADS */
-
-
-static GString *
-get_path (gboolean make)
-{
- GString *path;
-
- path = g_string_new ("/tmp/evolution-");
- g_string_sprintfa (path, "%d-%d", (int) getuid (), (int) getpid ());
-
- if (make) {
- int ret;
-
- /* shoot now, ask questions later */
- ret = mkdir (path->str, S_IRWXU);
- if (ret == -1) {
- if (errno == EEXIST) {
- struct stat st;
-
- if (stat (path->str, &st) == -1) {
- /* reset errno */
- errno = EEXIST;
- g_string_free (path, TRUE);
- return NULL;
- }
-
- /* make sure this is a directory and belongs to us... */
- if (!S_ISDIR (st.st_mode) || st.st_uid != getuid ()) {
- /* eek! this is bad... */
- g_string_free (path, TRUE);
- return NULL;
- }
- } else {
- /* some other error...do not pass go, do not collect $200 */
- g_string_free (path, TRUE);
- return NULL;
- }
- }
- }
-
- return path;
-}
-
-static void
-e_mktemp_cleanup (void)
-{
- GString *path;
- GSList *node;
-
- TEMP_FILES_LOCK ();
- if (temp_files) {
- node = temp_files;
- while (node) {
- unlink (node->data);
- g_free (node->data);
- node = node->next;
- }
- g_slist_free (temp_files);
- temp_files = NULL;
- }
- TEMP_FILES_UNLOCK ();
-
- TEMP_DIRS_LOCK ();
- if (temp_dirs) {
- node = temp_dirs;
- while (node) {
- /* perform the equivalent of a rm -rf */
- struct dirent *dent;
- DIR *dir;
-
- /* first empty out this directory of it's files... */
- dir = opendir (node->data);
- if (dir) {
- while ((dent = readdir (dir)) != NULL) {
- /* yea...so if we contain
- subdirectories this won't work, but
- it shouldn't so we won't
- bother caring... */
- if (strcmp (dent->d_name, ".") && strcmp (dent->d_name, ".."))
- unlink (dent->d_name);
- }
- closedir (dir);
- }
-
- /* ...then rmdir the directory */
- rmdir (node->data);
- g_free (node->data);
- node = node->next;
- }
- g_slist_free (temp_dirs);
- temp_dirs = NULL;
- }
- TEMP_DIRS_UNLOCK ();
-
- path = get_path (FALSE);
- rmdir (path->str);
-
- g_string_free (path, TRUE);
-}
-
-
-const char *
-e_mktemp (const char *template)
-{
- GString *path;
- char *ret;
-
- path = get_path (TRUE);
- if (!path)
- return NULL;
-
- g_string_append_c (path, '/');
- if (template)
- g_string_append (path, template);
- else
- g_string_append (path, "unknown-XXXXXX");
-
- ret = mktemp (path->str);
- if (ret) {
- TEMP_FILES_LOCK ();
- if (!initialized) {
- g_atexit (e_mktemp_cleanup);
- initialized = TRUE;
- }
- temp_files = g_slist_prepend (temp_files, ret);
- g_string_free (path, FALSE);
- TEMP_FILES_UNLOCK ();
- } else {
- g_string_free (path, TRUE);
- }
-
- return ret;
-}
-
-
-int
-e_mkstemp (const char *template)
-{
- GString *path;
- int fd;
-
- path = get_path (TRUE);
- if (!path)
- return -1;
-
- g_string_append_c (path, '/');
- if (template)
- g_string_append (path, template);
- else
- g_string_append (path, "unknown-XXXXXX");
-
- fd = mkstemp (path->str);
- if (fd != -1) {
- TEMP_FILES_LOCK ();
- if (!initialized) {
- g_atexit (e_mktemp_cleanup);
- initialized = TRUE;
- }
- temp_files = g_slist_prepend (temp_files, path->str);
- g_string_free (path, FALSE);
- TEMP_FILES_UNLOCK ();
- } else {
- g_string_free (path, TRUE);
- }
-
- return fd;
-}
-
-
-const char *
-e_mkdtemp (const char *template)
-{
- GString *path;
- char *tmpdir;
-
- path = get_path (TRUE);
- if (!path)
- return NULL;
-
- g_string_append_c (path, '/');
- if (template)
- g_string_append (path, template);
- else
- g_string_append (path, "unknown-XXXXXX");
-
-#ifdef HAVE_MKDTEMP
- tmpdir = mkdtemp (path->str);
-#else
- tmpdir = mktemp (path->str);
- if (tmpdir) {
- if (mkdir (tmpdir, S_IRWXU) == -1)
- tmpdir = NULL;
- }
-#endif
-
- if (tmpdir) {
- TEMP_DIRS_LOCK ();
- if (!initialized) {
- g_atexit (e_mktemp_cleanup);
- initialized = TRUE;
- }
- temp_dirs = g_slist_prepend (temp_dirs, tmpdir);
- g_string_free (path, FALSE);
- TEMP_DIRS_UNLOCK ();
- } else {
- g_string_free (path, TRUE);
- }
-
- return tmpdir;
-}
diff --git a/e-util/e-mktemp.h b/e-util/e-mktemp.h
deleted file mode 100644
index 9f7831d7b5..0000000000
--- a/e-util/e-mktemp.h
+++ /dev/null
@@ -1,33 +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 __E_MKTEMP_H__
-#define __E_MKTEMP_H__
-
-const char *e_mktemp (const char *template);
-
-int e_mkstemp (const char *template);
-
-const char *e_mkdtemp (const char *template);
-
-#endif /* __E_MKTEMP_H__ */
diff --git a/e-util/e-msgport.c b/e-util/e-msgport.c
deleted file mode 100644
index 2bb4311b18..0000000000
--- a/e-util/e-msgport.c
+++ /dev/null
@@ -1,868 +0,0 @@
-
-#include "e-msgport.h"
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <pthread.h>
-
-#include <glib.h>
-
-#define m(x) /* msgport debug */
-#define t(x) /* thread debug */
-
-void e_dlist_init(EDList *v)
-{
- v->head = (EDListNode *)&v->tail;
- v->tail = 0;
- v->tailpred = (EDListNode *)&v->head;
-}
-
-EDListNode *e_dlist_addhead(EDList *l, EDListNode *n)
-{
- n->next = l->head;
- n->prev = (EDListNode *)&l->head;
- l->head->prev = n;
- l->head = n;
- return n;
-}
-
-EDListNode *e_dlist_addtail(EDList *l, EDListNode *n)
-{
- n->next = (EDListNode *)&l->tail;
- n->prev = l->tailpred;
- l->tailpred->next = n;
- l->tailpred = n;
- return n;
-}
-
-EDListNode *e_dlist_remove(EDListNode *n)
-{
- n->next->prev = n->prev;
- n->prev->next = n->next;
- return n;
-}
-
-EDListNode *e_dlist_remhead(EDList *l)
-{
- EDListNode *n, *nn;
-
- n = l->head;
- nn = n->next;
- if (nn) {
- nn->prev = n->prev;
- l->head = nn;
- return n;
- }
- return NULL;
-}
-
-EDListNode *e_dlist_remtail(EDList *l)
-{
- EDListNode *n, *np;
-
- n = l->tailpred;
- np = n->prev;
- if (np) {
- np->next = n->next;
- l->tailpred = np;
- return n;
- }
- return NULL;
-}
-
-int e_dlist_empty(EDList *l)
-{
- return (l->head == (EDListNode *)&l->tail);
-}
-
-int e_dlist_length(EDList *l)
-{
- EDListNode *n, *nn;
- int count = 0;
-
- n = l->head;
- nn = n->next;
- while (nn) {
- count++;
- n = nn;
- nn = n->next;
- }
-
- return 0;
-}
-
-struct _EMsgPort {
- EDList queue;
- int condwait; /* how many waiting in condwait */
- union {
- int pipe[2];
- struct {
- int read;
- int write;
- } fd;
- } pipe;
- /* @#@$#$ glib stuff */
- GCond *cond;
- GMutex *lock;
-};
-
-EMsgPort *e_msgport_new(void)
-{
- EMsgPort *mp;
-
- mp = g_malloc(sizeof(*mp));
- e_dlist_init(&mp->queue);
- mp->lock = g_mutex_new();
- mp->cond = g_cond_new();
- mp->pipe.fd.read = -1;
- mp->pipe.fd.write = -1;
- mp->condwait = 0;
-
- return mp;
-}
-
-void e_msgport_destroy(EMsgPort *mp)
-{
- g_mutex_free(mp->lock);
- g_cond_free(mp->cond);
- if (mp->pipe.fd.read != -1) {
- close(mp->pipe.fd.read);
- close(mp->pipe.fd.write);
- }
- g_free(mp);
-}
-
-/* get a fd that can be used to wait on the port asynchronously */
-int e_msgport_fd(EMsgPort *mp)
-{
- int fd;
-
- g_mutex_lock(mp->lock);
- fd = mp->pipe.fd.read;
- if (fd == -1) {
- pipe(mp->pipe.pipe);
- fd = mp->pipe.fd.read;
- }
- g_mutex_unlock(mp->lock);
-
- return fd;
-}
-
-void e_msgport_put(EMsgPort *mp, EMsg *msg)
-{
- int fd;
-
- m(printf("put:\n"));
- g_mutex_lock(mp->lock);
- e_dlist_addtail(&mp->queue, &msg->ln);
- if (mp->condwait > 0) {
- m(printf("put: condwait > 0, waking up\n"));
- g_cond_signal(mp->cond);
- }
- fd = mp->pipe.fd.write;
- g_mutex_unlock(mp->lock);
-
- if (fd != -1) {
- m(printf("put: have pipe, writing notification to it\n"));
- write(fd, "", 1);
- }
-
- m(printf("put: done\n"));
-}
-
-static void
-msgport_cleanlock(void *data)
-{
- EMsgPort *mp = data;
-
- g_mutex_unlock(mp->lock);
-}
-
-EMsg *e_msgport_wait(EMsgPort *mp)
-{
- EMsg *msg;
-
- m(printf("wait:\n"));
- g_mutex_lock(mp->lock);
- while (e_dlist_empty(&mp->queue)) {
- if (mp->pipe.fd.read == -1) {
- m(printf("wait: waiting on condition\n"));
- mp->condwait++;
- /* if we are cancelled in the cond-wait, then we need to unlock our lock when we cleanup */
- pthread_cleanup_push(msgport_cleanlock, mp);
- g_cond_wait(mp->cond, mp->lock);
- pthread_cleanup_pop(0);
- m(printf("wait: got condition\n"));
- mp->condwait--;
- } else {
- fd_set rfds;
-
- m(printf("wait: waitng on pipe\n"));
- FD_ZERO(&rfds);
- FD_SET(mp->pipe.fd.read, &rfds);
- g_mutex_unlock(mp->lock);
- select(mp->pipe.fd.read+1, &rfds, NULL, NULL, NULL);
- pthread_testcancel();
- g_mutex_lock(mp->lock);
- m(printf("wait: got pipe\n"));
- }
- }
- msg = (EMsg *)mp->queue.head;
- m(printf("wait: message = %p\n", msg));
- g_mutex_unlock(mp->lock);
- m(printf("wait: done\n"));
- return msg;
-}
-
-EMsg *e_msgport_get(EMsgPort *mp)
-{
- EMsg *msg;
- char dummy[1];
-
- g_mutex_lock(mp->lock);
- msg = (EMsg *)e_dlist_remhead(&mp->queue);
- if (msg && mp->pipe.fd.read != -1)
- read(mp->pipe.fd.read, dummy, 1);
- m(printf("get: message = %p\n", msg));
- g_mutex_unlock(mp->lock);
-
- return msg;
-}
-
-void e_msgport_reply(EMsg *msg)
-{
- if (msg->reply_port) {
- e_msgport_put(msg->reply_port, msg);
- }
- /* else lost? */
-}
-
-struct _thread_info {
- pthread_t id;
- int busy;
-};
-
-struct _EThread {
- EMsgPort *server_port;
- EMsgPort *reply_port;
- pthread_mutex_t mutex;
- e_thread_t type;
- int queue_limit;
-
- int waiting; /* if we are waiting for a new message, count of waiting processes */
- pthread_t id; /* id of our running child thread */
- GList *id_list; /* if THREAD_NEW, then a list of our child threads in thread_info structs */
-
- EThreadFunc destroy;
- void *destroy_data;
-
- EThreadFunc received;
- void *received_data;
-
- EThreadFunc lost;
- void *lost_data;
-};
-
-#define E_THREAD_NONE ((pthread_t)~0)
-#define E_THREAD_QUIT_REPLYPORT ((struct _EMsgPort *)~0)
-
-static void thread_destroy_msg(EThread *e, EMsg *m);
-
-static struct _thread_info *thread_find(EThread *e, pthread_t id)
-{
- GList *node;
- struct _thread_info *info;
-
- node = e->id_list;
- while (node) {
- info = node->data;
- if (info->id == id)
- return info;
- node = node->next;
- }
- return NULL;
-}
-
-#if 0
-static void thread_remove(EThread *e, pthread_t id)
-{
- GList *node;
- struct _thread_info *info;
-
- node = e->id_list;
- while (node) {
- info = node->data;
- if (info->id == id) {
- e->id_list = g_list_remove(e->id_list, info);
- g_free(info);
- }
- node = node->next;
- }
-}
-#endif
-
-EThread *e_thread_new(e_thread_t type)
-{
- EThread *e;
-
- e = g_malloc0(sizeof(*e));
- pthread_mutex_init(&e->mutex, 0);
- e->type = type;
- e->server_port = e_msgport_new();
- e->id = E_THREAD_NONE;
- e->queue_limit = INT_MAX;
-
- return e;
-}
-
-/* close down the threads & resources etc */
-void e_thread_destroy(EThread *e)
-{
- int busy = FALSE;
- EMsg *msg;
- struct _thread_info *info;
- GList *l;
-
- /* make sure we soak up all the messages first */
- while ( (msg = e_msgport_get(e->server_port)) ) {
- thread_destroy_msg(e, msg);
- }
-
- pthread_mutex_lock(&e->mutex);
-
- switch(e->type) {
- case E_THREAD_QUEUE:
- case E_THREAD_DROP:
- /* if we have a thread, 'kill' it */
- if (e->id != E_THREAD_NONE) {
- pthread_t id = e->id;
-
- t(printf("Sending thread '%d' quit message\n", id));
-
- e->id = E_THREAD_NONE;
-
- msg = g_malloc0(sizeof(*msg));
- msg->reply_port = E_THREAD_QUIT_REPLYPORT;
- e_msgport_put(e->server_port, msg);
-
- pthread_mutex_unlock(&e->mutex);
- t(printf("Joining thread '%d'\n", id));
- pthread_join(id, 0);
- t(printf("Joined thread '%d'!\n", id));
- pthread_mutex_lock(&e->mutex);
- }
- busy = e->id != E_THREAD_NONE;
- break;
- case E_THREAD_NEW:
- /* first, send everyone a quit message */
- l = e->id_list;
- while (l) {
- info = l->data;
- t(printf("Sending thread '%d' quit message\n", info->id));
- msg = g_malloc0(sizeof(*msg));
- msg->reply_port = E_THREAD_QUIT_REPLYPORT;
- e_msgport_put(e->server_port, msg);
- l = l->next;
- }
-
- /* then, wait for everyone to quit */
- while (e->id_list) {
- info = e->id_list->data;
- e->id_list = g_list_remove(e->id_list, info);
- pthread_mutex_unlock(&e->mutex);
- t(printf("Joining thread '%d'\n", info->id));
- pthread_join(info->id, 0);
- t(printf("Joined thread '%d'!\n", info->id));
- pthread_mutex_lock(&e->mutex);
- g_free(info);
- }
- busy = g_list_length(e->id_list) != 0;
- break;
- }
-
- pthread_mutex_unlock(&e->mutex);
-
- /* and clean up, if we can */
- if (busy) {
- g_warning("threads were busy, leaked EThread");
- return;
- }
-
- e_msgport_destroy(e->server_port);
- g_free(e);
-}
-
-/* set the queue maximum depth, what happens when the queue
- fills up depends on the queue type */
-void e_thread_set_queue_limit(EThread *e, int limit)
-{
- e->queue_limit = limit;
-}
-
-/* set a msg destroy callback, this can not call any e_thread functions on @e */
-void e_thread_set_msg_destroy(EThread *e, EThreadFunc destroy, void *data)
-{
- pthread_mutex_lock(&e->mutex);
- e->destroy = destroy;
- e->destroy_data = data;
- pthread_mutex_unlock(&e->mutex);
-}
-
-/* set a message lost callback, called if any message is discarded */
-void e_thread_set_msg_lost(EThread *e, EThreadFunc lost, void *data)
-{
- pthread_mutex_lock(&e->mutex);
- e->lost = lost;
- e->lost_data = lost;
- pthread_mutex_unlock(&e->mutex);
-}
-
-/* set a reply port, if set, then send messages back once finished */
-void e_thread_set_reply_port(EThread *e, EMsgPort *reply_port)
-{
- e->reply_port = reply_port;
-}
-
-/* set a received data callback */
-void e_thread_set_msg_received(EThread *e, EThreadFunc received, void *data)
-{
- pthread_mutex_lock(&e->mutex);
- e->received = received;
- e->received_data = data;
- pthread_mutex_unlock(&e->mutex);
-}
-
-static void
-thread_destroy_msg(EThread *e, EMsg *m)
-{
- EThreadFunc func;
- void *func_data;
-
- /* we do this so we never get an incomplete/unmatched callback + data */
- pthread_mutex_lock(&e->mutex);
- func = e->destroy;
- func_data = e->destroy_data;
- pthread_mutex_unlock(&e->mutex);
-
- if (func)
- func(e, m, func_data);
-}
-
-static void
-thread_received_msg(EThread *e, EMsg *m)
-{
- EThreadFunc func;
- void *func_data;
-
- /* we do this so we never get an incomplete/unmatched callback + data */
- pthread_mutex_lock(&e->mutex);
- func = e->received;
- func_data = e->received_data;
- pthread_mutex_unlock(&e->mutex);
-
- if (func)
- func(e, m, func_data);
- else
- g_warning("No processing callback for EThread, message unprocessed");
-}
-
-static void
-thread_lost_msg(EThread *e, EMsg *m)
-{
- EThreadFunc func;
- void *func_data;
-
- /* we do this so we never get an incomplete/unmatched callback + data */
- pthread_mutex_lock(&e->mutex);
- func = e->lost;
- func_data = e->lost_data;
- pthread_mutex_unlock(&e->mutex);
-
- if (func)
- func(e, m, func_data);
-}
-
-/* the actual thread dispatcher */
-static void *
-thread_dispatch(void *din)
-{
- EThread *e = din;
- EMsg *m;
- struct _thread_info *info;
- pthread_t self = pthread_self();
-
- t(printf("dispatch thread started: %ld\n", pthread_self()));
-
- while (1) {
- pthread_mutex_lock(&e->mutex);
- m = e_msgport_get(e->server_port);
- if (m == NULL) {
- /* nothing to do? If we are a 'new' type thread, just quit.
- Otherwise, go into waiting (can be cancelled here) */
- info = NULL;
- switch (e->type) {
- case E_THREAD_NEW:
- case E_THREAD_QUEUE:
- case E_THREAD_DROP:
- info = thread_find(e, self);
- if (info)
- info->busy = FALSE;
- e->waiting++;
- pthread_mutex_unlock(&e->mutex);
- e_msgport_wait(e->server_port);
- pthread_mutex_lock(&e->mutex);
- e->waiting--;
- pthread_mutex_unlock(&e->mutex);
- break;
-#if 0
- case E_THREAD_NEW:
- e->id_list = g_list_remove(e->id_list, (void *)pthread_self());
- pthread_mutex_unlock(&e->mutex);
- return 0;
-#endif
- }
-
- continue;
- } else if (m->reply_port == E_THREAD_QUIT_REPLYPORT) {
- t(printf("Thread %d got quit message\n", self));
- /* Handle a quit message, say we're quitting, free the message, and break out of the loop */
- info = thread_find(e, self);
- if (info)
- info->busy = 2;
- pthread_mutex_unlock(&e->mutex);
- g_free(m);
- break;
- } else {
- info = thread_find(e, self);
- if (info)
- info->busy = TRUE;
- }
- pthread_mutex_unlock(&e->mutex);
-
- t(printf("got message in dispatch thread\n"));
-
- /* process it */
- thread_received_msg(e, m);
-
- /* if we have a reply port, send it back, otherwise, lose it */
- if (m->reply_port) {
- e_msgport_reply(m);
- } else {
- thread_destroy_msg(e, m);
- }
- }
-
- return NULL;
-}
-
-/* send a message to the thread, start thread if necessary */
-void e_thread_put(EThread *e, EMsg *msg)
-{
- pthread_t id;
- EMsg *dmsg = NULL;
-
- pthread_mutex_lock(&e->mutex);
-
- /* the caller forgot to tell us what to do, well, we can't do anything can we */
- if (e->received == NULL) {
- pthread_mutex_unlock(&e->mutex);
- g_warning("EThread called with no receiver function, no work to do!");
- thread_destroy_msg(e, msg);
- return;
- }
-
- msg->reply_port = e->reply_port;
-
- switch(e->type) {
- case E_THREAD_QUEUE:
- /* if the queue is full, lose this new addition */
- if (e_dlist_length(&e->server_port->queue) < e->queue_limit) {
- e_msgport_put(e->server_port, msg);
- } else {
- printf("queue limit reached, dropping new message\n");
- dmsg = msg;
- }
- break;
- case E_THREAD_DROP:
- /* if the queue is full, lose the oldest (unprocessed) message */
- if (e_dlist_length(&e->server_port->queue) < e->queue_limit) {
- e_msgport_put(e->server_port, msg);
- } else {
- printf("queue limit reached, dropping old message\n");
- e_msgport_put(e->server_port, msg);
- dmsg = e_msgport_get(e->server_port);
- }
- break;
- case E_THREAD_NEW:
- /* it is possible that an existing thread can catch this message, so
- we might create a thread with no work to do.
- but that doesn't matter, the other alternative that it be lost is worse */
- e_msgport_put(e->server_port, msg);
- if (e->waiting == 0
- && g_list_length(e->id_list) < e->queue_limit
- && pthread_create(&id, NULL, thread_dispatch, e) == 0) {
- struct _thread_info *info = g_malloc0(sizeof(*info));
- t(printf("created NEW thread %ld\n", id));
- info->id = id;
- info->busy = TRUE;
- e->id_list = g_list_append(e->id_list, info);
- }
- pthread_mutex_unlock(&e->mutex);
- return;
- }
-
- /* create the thread, if there is none to receive it yet */
- if (e->id == E_THREAD_NONE) {
- if (pthread_create(&e->id, NULL, thread_dispatch, e) == -1) {
- g_warning("Could not create dispatcher thread, message queued?: %s", strerror(errno));
- e->id = E_THREAD_NONE;
- }
- }
-
- pthread_mutex_unlock(&e->mutex);
-
- if (dmsg) {
- thread_lost_msg(e, dmsg);
- thread_destroy_msg(e, dmsg);
- }
-}
-
-/* yet-another-mutex interface */
-struct _EMutex {
- int type;
- pthread_t owner;
- short waiters;
- short depth;
- pthread_mutex_t mutex;
- pthread_cond_t cond;
-};
-
-/* sigh, this is just painful to have to need, but recursive
- read/write, etc mutexes just aren't very common in thread
- implementations */
-/* TODO: Just make it use recursive mutexes if they are available */
-EMutex *e_mutex_new(e_mutex_t type)
-{
- struct _EMutex *m;
-
- m = g_malloc(sizeof(*m));
- m->type = type;
- m->waiters = 0;
- m->depth = 0;
- m->owner = E_THREAD_NONE;
-
- switch (type) {
- case E_MUTEX_SIMPLE:
- pthread_mutex_init(&m->mutex, 0);
- break;
- case E_MUTEX_REC:
- pthread_mutex_init(&m->mutex, 0);
- pthread_cond_init(&m->cond, 0);
- break;
- /* read / write ? flags for same? */
- }
-
- return m;
-}
-
-int e_mutex_destroy(EMutex *m)
-{
- int ret = 0;
-
- switch (m->type) {
- case E_MUTEX_SIMPLE:
- ret = pthread_mutex_destroy(&m->mutex);
- if (ret == -1)
- g_warning("EMutex destroy failed: %s", strerror(errno));
- g_free(m);
- break;
- case E_MUTEX_REC:
- ret = pthread_mutex_destroy(&m->mutex);
- if (ret == -1)
- g_warning("EMutex destroy failed: %s", strerror(errno));
- ret = pthread_cond_destroy(&m->cond);
- if (ret == -1)
- g_warning("EMutex destroy failed: %s", strerror(errno));
- g_free(m);
-
- }
- return ret;
-}
-
-int e_mutex_lock(EMutex *m)
-{
- pthread_t id;
-
- switch (m->type) {
- case E_MUTEX_SIMPLE:
- return pthread_mutex_lock(&m->mutex);
- case E_MUTEX_REC:
- id = pthread_self();
- if (pthread_mutex_lock(&m->mutex) == -1)
- return -1;
- while (1) {
- if (m->owner == E_THREAD_NONE) {
- m->owner = id;
- m->depth = 1;
- break;
- } else if (id == m->owner) {
- m->depth++;
- break;
- } else {
- m->waiters++;
- if (pthread_cond_wait(&m->cond, &m->mutex) == -1)
- return -1;
- m->waiters--;
- }
- }
- return pthread_mutex_unlock(&m->mutex);
- }
-
- errno = EINVAL;
- return -1;
-}
-
-int e_mutex_unlock(EMutex *m)
-{
- switch (m->type) {
- case E_MUTEX_SIMPLE:
- return pthread_mutex_unlock(&m->mutex);
- case E_MUTEX_REC:
- if (pthread_mutex_lock(&m->mutex) == -1)
- return -1;
- g_assert(m->owner == pthread_self());
-
- m->depth--;
- if (m->depth == 0) {
- m->owner = E_THREAD_NONE;
- if (m->waiters > 0)
- pthread_cond_signal(&m->cond);
- }
- return pthread_mutex_unlock(&m->mutex);
- }
-
- errno = EINVAL;
- return -1;
-}
-
-void e_mutex_assert_locked(EMutex *m)
-{
- g_return_if_fail (m->type == E_MUTEX_REC);
- pthread_mutex_lock(&m->mutex);
- g_assert(m->owner == pthread_self());
- pthread_mutex_unlock(&m->mutex);
-}
-
-#ifdef STANDALONE
-EMsgPort *server_port;
-
-
-void *fdserver(void *data)
-{
- int fd;
- EMsg *msg;
- int id = (int)data;
- fd_set rfds;
-
- fd = e_msgport_fd(server_port);
-
- while (1) {
- int count = 0;
-
- printf("server %d: waiting on fd %d\n", id, fd);
- FD_ZERO(&rfds);
- FD_SET(fd, &rfds);
- select(fd+1, &rfds, NULL, NULL, NULL);
- printf("server %d: Got async notification, checking for messages\n", id);
- while ((msg = e_msgport_get(server_port))) {
- printf("server %d: got message\n", id);
- sleep(1);
- printf("server %d: replying\n", id);
- e_msgport_reply(msg);
- count++;
- }
- printf("server %d: got %d messages\n", id, count);
- }
-}
-
-void *server(void *data)
-{
- EMsg *msg;
- int id = (int)data;
-
- while (1) {
- printf("server %d: waiting\n", id);
- msg = e_msgport_wait(server_port);
- msg = e_msgport_get(server_port);
- if (msg) {
- printf("server %d: got message\n", id);
- sleep(1);
- printf("server %d: replying\n", id);
- e_msgport_reply(msg);
- } else {
- printf("server %d: didn't get message\n", id);
- }
- }
-}
-
-void *client(void *data)
-{
- EMsg *msg;
- EMsgPort *replyport;
- int i;
-
- replyport = e_msgport_new();
- msg = g_malloc0(sizeof(*msg));
- msg->reply_port = replyport;
- for (i=0;i<10;i++) {
- /* synchronous operation */
- printf("client: sending\n");
- e_msgport_put(server_port, msg);
- printf("client: waiting for reply\n");
- e_msgport_wait(replyport);
- e_msgport_get(replyport);
- printf("client: got reply\n");
- }
-
- printf("client: sleeping ...\n");
- sleep(2);
- printf("client: sending multiple\n");
-
- for (i=0;i<10;i++) {
- msg = g_malloc0(sizeof(*msg));
- msg->reply_port = replyport;
- e_msgport_put(server_port, msg);
- }
-
- printf("client: receiving multiple\n");
- for (i=0;i<10;i++) {
- e_msgport_wait(replyport);
- msg = e_msgport_get(replyport);
- g_free(msg);
- }
-
- printf("client: done\n");
-}
-
-int main(int argc, char **argv)
-{
- pthread_t serverid, clientid;
-
- g_thread_init(NULL);
-
- server_port = e_msgport_new();
-
- /*pthread_create(&serverid, NULL, server, (void *)1);*/
- pthread_create(&serverid, NULL, fdserver, (void *)1);
- pthread_create(&clientid, NULL, client, NULL);
-
- sleep(60);
-
- return 0;
-}
-#endif
diff --git a/e-util/e-msgport.h b/e-util/e-msgport.h
deleted file mode 100644
index d181ac7fb7..0000000000
--- a/e-util/e-msgport.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-#ifndef _E_MSGPORT_H
-#define _E_MSGPORT_H
-
-/* double-linked list yeah another one, deal */
-typedef struct _EDListNode {
- struct _EDListNode *next;
- struct _EDListNode *prev;
-} EDListNode;
-
-typedef struct _EDList {
- struct _EDListNode *head;
- struct _EDListNode *tail;
- struct _EDListNode *tailpred;
-} EDList;
-
-#define E_DLIST_INITIALISER(l) { (EDListNode *)&l.tail, 0, (EDListNode *)&l.head }
-
-void e_dlist_init(EDList *v);
-EDListNode *e_dlist_addhead(EDList *l, EDListNode *n);
-EDListNode *e_dlist_addtail(EDList *l, EDListNode *n);
-EDListNode *e_dlist_remove(EDListNode *n);
-EDListNode *e_dlist_remhead(EDList *l);
-EDListNode *e_dlist_remtail(EDList *l);
-int e_dlist_empty(EDList *l);
-int e_dlist_length(EDList *l);
-
-/* message ports - a simple inter-thread 'ipc' primitive */
-/* opaque handle */
-typedef struct _EMsgPort EMsgPort;
-
-/* header for any message */
-typedef struct _EMsg {
- EDListNode ln;
- EMsgPort *reply_port;
-} EMsg;
-
-EMsgPort *e_msgport_new(void);
-void e_msgport_destroy(EMsgPort *mp);
-/* get a fd that can be used to wait on the port asynchronously */
-int e_msgport_fd(EMsgPort *mp);
-void e_msgport_put(EMsgPort *mp, EMsg *msg);
-EMsg *e_msgport_wait(EMsgPort *mp);
-EMsg *e_msgport_get(EMsgPort *mp);
-void e_msgport_reply(EMsg *msg);
-
-/* e threads, a server thread with a message based request-response, and flexible queuing */
-typedef struct _EThread EThread;
-
-typedef enum {
- E_THREAD_QUEUE = 0, /* run one by one, until done, if the queue_limit is reached, discard new request */
- E_THREAD_DROP, /* run one by one, until done, if the queue_limit is reached, discard oldest requests */
- E_THREAD_NEW, /* always run in a new thread, if the queue limit is reached, new requests are
- stored in the queue until a thread becomes available for it, creating a thread pool */
-} e_thread_t;
-
-typedef void (*EThreadFunc)(EThread *, EMsg *, void *data);
-
-EThread *e_thread_new(e_thread_t type);
-void e_thread_destroy(EThread *e);
-void e_thread_set_queue_limit(EThread *e, int limit);
-void e_thread_set_msg_lost(EThread *e, EThreadFunc destroy, void *data);
-void e_thread_set_msg_destroy(EThread *e, EThreadFunc destroy, void *data);
-void e_thread_set_reply_port(EThread *e, EMsgPort *reply_port);
-void e_thread_set_msg_received(EThread *e, EThreadFunc received, void *data);
-void e_thread_put(EThread *e, EMsg *msg);
-
-/* sigh, another mutex interface, this one allows different mutex types, portably */
-typedef struct _EMutex EMutex;
-
-typedef enum _e_mutex_t {
- E_MUTEX_SIMPLE, /* == pthread_mutex */
- E_MUTEX_REC, /* recursive mutex */
-} e_mutex_t;
-
-EMutex *e_mutex_new(e_mutex_t type);
-int e_mutex_destroy(EMutex *m);
-int e_mutex_lock(EMutex *m);
-int e_mutex_unlock(EMutex *m);
-void e_mutex_assert_locked(EMutex *m);
-
-#endif
diff --git a/e-util/e-passwords.c b/e-util/e-passwords.c
deleted file mode 100644
index f9c8780180..0000000000
--- a/e-util/e-passwords.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-passwords.c
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "e-passwords.h"
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-config.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkcheckbutton.h>
-
-static char *decode_base64 (char *base64);
-
-static GHashTable *passwords = NULL;
-
-static int base64_encode_close(unsigned char *in, int inlen, gboolean break_lines, unsigned char *out, int *state, int *save);
-static int base64_encode_step(unsigned char *in, int len, gboolean break_lines, unsigned char *out, int *state, int *save);
-
-void
-e_passwords_init ()
-{
- char *key, *value;
- void *iter;
-
- passwords = g_hash_table_new (g_str_hash, g_str_equal);
-
- iter = gnome_config_private_init_iterator ("/Evolution/Passwords");
- if (iter) {
- while (gnome_config_iterator_next (iter, &key, &value)) {
- g_hash_table_insert (passwords,
- decode_base64 (key),
- decode_base64 (value));
- g_free (key);
- g_free (value);
- }
- }
-}
-
-static gboolean
-free_entry (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- memset (value, 0, strlen (value));
- g_free (value);
- return TRUE;
-}
-
-void
-e_passwords_shutdown ()
-{
- gnome_config_sync ();
- g_hash_table_foreach_remove (passwords, free_entry, NULL);
- g_hash_table_destroy (passwords);
- passwords = NULL;
-}
-
-
-void
-e_passwords_forget_passwords ()
-{
- g_hash_table_foreach_remove (passwords, free_entry, NULL);
- gnome_config_private_clean_section ("/Evolution/Passwords");
- gnome_config_sync ();
-}
-
-static void
-maybe_remember_password (gpointer key, gpointer password, gpointer url)
-{
- char *path, *key64, *pass64;
- int len, state, save;
-
- len = strlen (url);
- if (strncmp (key, url, len) != 0)
- return;
-
- len = strlen (key);
- key64 = g_malloc0 ((len + 2) * 4 / 3 + 1);
- state = save = 0;
- base64_encode_close (key, len, FALSE, key64, &state, &save);
- path = g_strdup_printf ("/Evolution/Passwords/%s", key64);
- g_free (key64);
-
- len = strlen (password);
- pass64 = g_malloc0 ((len + 2) * 4 / 3 + 1);
- state = save = 0;
- base64_encode_close (password, len, FALSE, pass64, &state, &save);
-
- gnome_config_private_set_string (path, pass64);
- g_free (path);
- g_free (pass64);
-}
-
-void
-e_passwords_remember_password (const char *url)
-{
- g_hash_table_foreach (passwords, maybe_remember_password, (gpointer)url);
-}
-
-void
-e_passwords_forget_password (const char *key)
-{
- gpointer okey, value;
-
- if (g_hash_table_lookup_extended (passwords, key, &okey, &value)) {
- g_hash_table_remove (passwords, key);
- memset (value, 0, strlen (value));
- g_free (okey);
- g_free (value);
- }
-}
-
-const char *
-e_passwords_get_password (const char *key)
-{
- return g_hash_table_lookup (passwords, key);
-}
-
-void
-e_passwords_add_password (const char *key, const char *passwd)
-{
- g_hash_table_insert (passwords, (gpointer)key, (gpointer)passwd);
-}
-
-
-/**
- * e_passwords_ask_password:
- * @title: title for the password dialog
- * @key: key to store the password under
- * @prompt: prompt string
- * @secret: whether or not the password text should be ***ed out
- * @remember_type: whether or not to offer to remember the password,
- * and for how long.
- * @remember: on input, the default state of the remember checkbox.
- * on output, the state of the checkbox when the dialog was closed.
- * @parent: parent window of the dialog, or %NULL
- *
- * Asks the user for a password.
- *
- * Return value: the password, or %NULL if the user cancelled the
- * operation. *@remember will be set if the return value is non-%NULL
- * and @remember_type is not E_PASSWORDS_DO_NOT_REMEMBER.
- **/
-char *
-e_passwords_ask_password (const char *title, const char *key,
- const char *prompt, gboolean secret,
- EPasswordsRememberType remember_type,
- gboolean *remember,
- GtkWindow *parent)
-{
- GtkWidget *dialog;
- GtkWidget *check, *entry;
- char *password;
- int button;
-
- dialog = gnome_message_box_new (prompt, GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gtk_window_set_title (GTK_WINDOW (dialog), title);
- if (parent)
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gnome_dialog_set_close (GNOME_DIALOG (dialog), FALSE);
-
- /* Password entry */
- entry = gtk_entry_new();
- if (secret)
- gtk_entry_set_visibility (GTK_ENTRY(entry), FALSE);
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- entry, FALSE, FALSE, 4);
- gtk_widget_show (entry);
- gtk_widget_grab_focus (entry);
-
- /* If Return is pressed in the text entry, propagate to the buttons */
- gnome_dialog_editable_enters (GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
-
- /* Remember the password? */
- if (remember_type != E_PASSWORDS_DO_NOT_REMEMBER) {
- const char *label;
-
- if (remember_type == E_PASSWORDS_REMEMBER_FOREVER)
- label = _("Remember this password");
- else
- label = _("Remember this password for the remainder of this session");
- check = gtk_check_button_new_with_label (label);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check),
- *remember);
-
- gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- check, TRUE, FALSE, 4);
- gtk_widget_show (check);
- }
-
- gtk_widget_show (dialog);
- button = gnome_dialog_run (GNOME_DIALOG (dialog));
-
- if (button == 0) {
- password = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
- *remember = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
-
- if (*remember || remember_type == E_PASSWORDS_REMEMBER_FOREVER)
- e_passwords_add_password (key, password);
- if (*remember && remember_type == E_PASSWORDS_REMEMBER_FOREVER)
- e_passwords_remember_password (key);
- } else
- password = NULL;
-
- gnome_dialog_close (GNOME_DIALOG (dialog));
- return password;
-}
-
-
-
-static char *base64_alphabet =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-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,
-};
-
-/* call this when finished encoding everything, to
- flush off the last little bit */
-static 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];
-
- 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).
-*/
-static 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;
-
- 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;
- }
-
- 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;
- }
-
- 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
- **/
-static 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;
-}
-
-static char *
-decode_base64 (char *base64)
-{
- char *plain, *pad = "==";
- int len, out, state, save;
-
- len = strlen (base64);
- plain = g_malloc0 (len);
- state = save = 0;
- out = base64_decode_step (base64, len, plain, &state, &save);
- if (len % 4) {
- base64_decode_step (pad, 4 - len % 4, plain + out,
- &state, &save);
- }
-
- return plain;
-}
diff --git a/e-util/e-passwords.h b/e-util/e-passwords.h
deleted file mode 100644
index 9bc0de6540..0000000000
--- a/e-util/e-passwords.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * e-passwords.h
- *
- * 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.
- */
-
-#ifndef _E_PASSWORD_H_
-#define _E_PASSWORD_H_
-
-#include <glib.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <gtk/gtkwindow.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-void e_passwords_init (void);
-void e_passwords_shutdown (void);
-
-void e_passwords_remember_password (const char *key);
-void e_passwords_add_password (const char *key, const char *passwd);
-const char *e_passwords_get_password (const char *key);
-void e_passwords_forget_password (const char *key);
-void e_passwords_forget_passwords (void);
-
-typedef enum {
- E_PASSWORDS_DO_NOT_REMEMBER,
- E_PASSWORDS_REMEMBER_FOR_SESSION,
- E_PASSWORDS_REMEMBER_FOREVER
-} EPasswordsRememberType;
-
-char * e_passwords_ask_password (const char *title, const char *key,
- const char *prompt, gboolean secret,
- EPasswordsRememberType remember_type,
- gboolean *remember,
- GtkWindow *parent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_PASSWORD_H_ */
diff --git a/e-util/e-path.c b/e-util/e-path.c
deleted file mode 100644
index 22b370b436..0000000000
--- a/e-util/e-path.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-path.c
- *
- * 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.
- */
-
-#include <config.h>
-
-#include <dirent.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <glib.h>
-
-#include "e-path.h"
-
-#define SUBFOLDER_DIR_NAME "subfolders"
-#define SUBFOLDER_DIR_NAME_LEN 10
-
-/**
- * e_path_to_physical:
- * @prefix: a prefix to prepend to the path, or %NULL
- * @path: the virtual path to convert to a filesystem path.
- *
- * This converts the "virtual" path @path into an expanded form that
- * allows a given name to refer to both a file and a directory. The
- * expanded path will have a "subfolders" directory inserted between
- * each path component. If the path ends with "/", the returned
- * physical path will end with "/subfolders"
- *
- * If @prefix is non-%NULL, it will be prepended to the returned path.
- *
- * Return value: the expanded path
- **/
-char *
-e_path_to_physical (const char *prefix, const char *vpath)
-{
- const char *p, *newp;
- char *dp;
- char *ppath;
- int ppath_len;
- int prefix_len;
-
- while (*vpath == '/')
- vpath++;
- if (!prefix)
- prefix = "";
-
- /* Calculate the length of the real path. */
- ppath_len = strlen (vpath);
- ppath_len++; /* For the ending zero. */
-
- prefix_len = strlen (prefix);
- ppath_len += prefix_len;
- ppath_len++; /* For the separating slash. */
-
- /* Take account of the fact that we need to translate every
- * separator into `subfolders/'.
- */
- p = vpath;
- while (1) {
- newp = strchr (p, '/');
- if (newp == NULL)
- break;
-
- ppath_len += SUBFOLDER_DIR_NAME_LEN;
- ppath_len++; /* For the separating slash. */
-
- /* Skip consecutive slashes. */
- while (*newp == '/')
- newp++;
-
- p = newp;
- };
-
- ppath = g_malloc (ppath_len);
- dp = ppath;
-
- memcpy (dp, prefix, prefix_len);
- dp += prefix_len;
- *(dp++) = '/';
-
- /* Copy the mangled path. */
- p = vpath;
- while (1) {
- newp = strchr (p, '/');
- if (newp == NULL) {
- strcpy (dp, p);
- break;
- }
-
- memcpy (dp, p, newp - p + 1); /* `+ 1' to copy the slash too. */
- dp += newp - p + 1;
-
- memcpy (dp, SUBFOLDER_DIR_NAME, SUBFOLDER_DIR_NAME_LEN);
- dp += SUBFOLDER_DIR_NAME_LEN;
-
- *(dp++) = '/';
-
- /* Skip consecutive slashes. */
- while (*newp == '/')
- newp++;
-
- p = newp;
- }
-
- return ppath;
-}
-
-
-static gboolean
-find_folders_recursive (const char *physical_path, const char *path,
- EPathFindFoldersCallback callback, gpointer data)
-{
- DIR *dir;
- char *subfolder_directory_path;
- gboolean ok;
-
- if (*path) {
- if (!callback (physical_path, path, data))
- return FALSE;
-
- subfolder_directory_path = g_strdup_printf ("%s/%s", physical_path, SUBFOLDER_DIR_NAME);
- } else {
- /* On the top level, we have no folders and,
- * consequently, no subfolder directory.
- */
-
- subfolder_directory_path = g_strdup (physical_path);
- }
-
- /* Now scan the subfolders and load them. */
- dir = opendir (subfolder_directory_path);
- if (dir == NULL) {
- g_free (subfolder_directory_path);
- return TRUE;
- }
-
- ok = TRUE;
- while (ok) {
- struct stat file_stat;
- struct dirent *dirent;
- char *file_path;
- char *new_path;
-
- dirent = readdir (dir);
- if (dirent == NULL)
- break;
-
- if (strcmp (dirent->d_name, ".") == 0 || strcmp (dirent->d_name, "..") == 0)
- continue;
-
- file_path = g_strdup_printf ("%s/%s", subfolder_directory_path,
- dirent->d_name);
-
- if (stat (file_path, &file_stat) < 0 ||
- ! S_ISDIR (file_stat.st_mode)) {
- g_free (file_path);
- continue;
- }
-
- new_path = g_strdup_printf ("%s/%s", path, dirent->d_name);
-
- ok = find_folders_recursive (file_path, new_path, callback, data);
-
- g_free (file_path);
- g_free (new_path);
- }
-
- closedir (dir);
- g_free (subfolder_directory_path);
-
- return ok;
-}
-
-/**
- * e_path_find_folders:
- * @prefix: directory to start from
- * @callback: Callback to invoke on each folder
- * @data: Data for @callback
- *
- * Walks the folder tree starting at @prefix and calls @callback
- * on each folder.
- *
- * Return value: %TRUE on success, %FALSE if an error occurs at any point
- **/
-gboolean
-e_path_find_folders (const char *prefix,
- EPathFindFoldersCallback callback,
- gpointer data)
-{
- return find_folders_recursive (prefix, "", callback, data);
-}
diff --git a/e-util/e-path.h b/e-util/e-path.h
deleted file mode 100644
index 50a3507363..0000000000
--- a/e-util/e-path.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2001 Ximian, Inc.
- *
- * 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_PATH__
-#define __E_PATH__
-
-#include <glib.h>
-
-typedef gboolean (*EPathFindFoldersCallback) (const char *physical_path,
- const char *path,
- gpointer user_data);
-
-char * e_path_to_physical (const char *prefix, const char *vpath);
-
-gboolean e_path_find_folders (const char *prefix,
- EPathFindFoldersCallback callback,
- gpointer data);
-
-#endif /* __E_PATH__ */
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
deleted file mode 100644
index 54552b4dca..0000000000
--- a/e-util/e-pilot-map.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution Conduits - Pilot Map routines
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: 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 "e-pilot-map.h"
-
-#include <string.h> /* memset(), strcmp() */
-#include <stdlib.h>
-#include <glib.h>
-#include <gnome-xml/parser.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-
-typedef struct
-{
- char *uid;
- gboolean archived;
-} EPilotMapPidNode;
-
-typedef struct
-{
- guint32 pid;
- gboolean archived;
-} EPilotMapUidNode;
-
-
-static void
-map_set_node_timet (xmlNodePtr node, const char *name, time_t t)
-{
- char *tstring;
-
- tstring = g_strdup_printf ("%ld", t);
- xmlSetProp (node, name, tstring);
-}
-
-static void
-map_sax_start_element (void *data, const xmlChar *name,
- const xmlChar **attrs)
-{
- EPilotMap *map = (EPilotMap *)data;
-
- if (!strcmp (name, "PilotMap")) {
- while (attrs && *attrs != NULL) {
- const xmlChar **val = attrs;
-
- val++;
- if (!strcmp (*attrs, "timestamp"))
- map->since = (time_t)strtoul (*val, NULL, 0);
-
- attrs = ++val;
- }
- }
-
- if (!strcmp (name, "map")) {
- const char *uid = NULL;
- guint32 pid = 0;
- gboolean archived = FALSE;
-
- while (attrs && *attrs != NULL) {
- const xmlChar **val = attrs;
-
- val++;
- if (!strcmp (*attrs, "uid"))
- uid = *val;
-
- if (!strcmp (*attrs, "pilot_id"))
- pid = strtoul (*val, NULL, 0);
-
- if (!strcmp (*attrs, "archived"))
- archived = strtoul (*val, NULL, 0)== 1 ? TRUE : FALSE;
-
- attrs = ++val;
- }
-
- if (uid && pid != 0)
- e_pilot_map_insert (map, pid, uid, archived);
- }
-}
-
-static void
-map_write_foreach (gpointer key, gpointer value, gpointer data)
-{
- xmlNodePtr root = data;
- xmlNodePtr mnode;
- unsigned long *pid = key;
- EPilotMapPidNode *pnode = value;
- char *pidstr;
-
- mnode = xmlNewChild (root, NULL, "map", NULL);
-
- pidstr = g_strdup_printf ("%lu", *pid);
- xmlSetProp (mnode, "pilot_id", pidstr);
- g_free (pidstr);
-
- xmlSetProp (mnode, "uid", pnode->uid);
-
- if (pnode->archived)
- xmlSetProp (mnode, "archived", "1");
- else
- xmlSetProp (mnode, "archived", "0");
-}
-
-gboolean
-e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid)
-{
- EPilotMapPidNode *pnode;
-
- pnode = g_hash_table_lookup (map->pid_map, &pid);
-
- if (pnode == NULL)
- return FALSE;
-
- return pnode->archived;
-}
-
-gboolean
-e_pilot_map_uid_is_archived (EPilotMap *map, const char *uid)
-{
- EPilotMapUidNode *unode;
-
- unode = g_hash_table_lookup (map->uid_map, uid);
-
- if (unode == NULL)
- return FALSE;
-
- return unode->archived;
-}
-
-void
-e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived)
-{
- char *new_uid;
- guint32 *new_pid = g_new (guint32, 1);
- EPilotMapPidNode *pnode = g_new0 (EPilotMapPidNode, 1);
- EPilotMapUidNode *unode = g_new0 (EPilotMapUidNode, 1);
-
- *new_pid = pid;
- new_uid = g_strdup (uid);
-
- pnode->uid = new_uid;
- pnode->archived = archived;
-
- unode->pid = pid;
- unode->archived = archived;
-
- g_hash_table_insert (map->pid_map, new_pid, pnode);
- g_hash_table_insert (map->uid_map, new_uid, unode);
-}
-
-void
-e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid)
-{
- EPilotMapPidNode *pnode;
- EPilotMapUidNode *unode;
-
- pnode = g_hash_table_lookup (map->pid_map, &pid);
- if (!pnode)
- return;
-
- unode = g_hash_table_lookup (map->uid_map, pnode->uid);
-
- g_hash_table_remove (map->pid_map, &pid);
- g_hash_table_remove (map->uid_map, pnode->uid);
-
- g_free (pnode);
- g_free (unode);
-}
-
-void
-e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid)
-{
- EPilotMapPidNode *pnode;
- EPilotMapUidNode *unode;
-
- unode = g_hash_table_lookup (map->uid_map, uid);
- if (!unode)
- return;
-
- pnode = g_hash_table_lookup (map->pid_map, &unode->pid);
-
- g_hash_table_remove (map->uid_map, uid);
- g_hash_table_remove (map->pid_map, &unode->pid);
-
- g_free (unode);
- g_free (pnode);
-}
-
-
-guint32
-e_pilot_map_lookup_pid (EPilotMap *map, const char *uid)
-{
- EPilotMapUidNode *unode = NULL;
-
- unode = g_hash_table_lookup (map->uid_map, uid);
-
- if (unode == NULL)
- return 0;
-
- return unode->pid;
-}
-
-const char *
-e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid)
-{
- EPilotMapPidNode *pnode = NULL;
-
- pnode = g_hash_table_lookup (map->pid_map, &pid);
-
- if (pnode == NULL)
- return NULL;
-
- return pnode->uid;
-}
-
-int
-e_pilot_map_read (const char *filename, EPilotMap **map)
-{
- xmlSAXHandler handler;
- EPilotMap *new_map = g_new0 (EPilotMap, 1);
-
- *map = NULL;
-
- memset (&handler, 0, sizeof (xmlSAXHandler));
- handler.startElement = map_sax_start_element;
-
- new_map->pid_map = g_hash_table_new (g_int_hash, g_int_equal);
- new_map->uid_map = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (g_file_exists (filename)) {
- if (xmlSAXUserParseFile (&handler, new_map, filename) < 0) {
- g_free (new_map);
- return -1;
- }
- }
-
- *map = new_map;
-
- return 0;
-}
-
-int
-e_pilot_map_write (const char *filename, EPilotMap *map)
-{
- xmlDocPtr doc;
- int ret;
-
- g_return_val_if_fail (map != NULL, -1);
-
- doc = xmlNewDoc ("1.0");
- if (doc == NULL) {
- g_warning ("Pilot map file could not be created\n");
- return -1;
- }
- doc->root = xmlNewDocNode(doc, NULL, "PilotMap", NULL);
- map->since = time (NULL);
- map_set_node_timet (doc->root, "timestamp", map->since);
-
- g_hash_table_foreach (map->pid_map, map_write_foreach, doc->root);
-
- /* Write the file */
- xmlSetDocCompressMode (doc, 0);
- ret = xmlSaveFile (filename, doc);
- if (ret < 0) {
- g_warning ("Pilot map file '%s' could not be saved\n", filename);
- return -1;
- }
-
- xmlFreeDoc (doc);
-
- return 0;
-}
-
-void
-e_pilot_map_destroy (EPilotMap *map)
-{
- g_hash_table_destroy (map->pid_map);
- g_hash_table_destroy (map->uid_map);
- g_free (map);
-}
-
-
-
-
-
-
-
-
diff --git a/e-util/e-pilot-map.h b/e-util/e-pilot-map.h
deleted file mode 100644
index 51039e3ca0..0000000000
--- a/e-util/e-pilot-map.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution Conduits - Pilot Map routines
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: 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 E_PILOT_MAP_H
-#define E_PILOT_MAP_H
-
-#include <glib.h>
-#include <time.h>
-
-typedef struct _EPilotMap EPilotMap;
-
-struct _EPilotMap
-{
- GHashTable *pid_map;
- GHashTable *uid_map;
-
- time_t since;
-};
-
-gboolean e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid);
-gboolean e_pilot_map_uid_is_archived (EPilotMap *map, const char *uid);
-
-void e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived);
-void e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid);
-void e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid);
-
-guint32 e_pilot_map_lookup_pid (EPilotMap *map, const char *uid);
-const char * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid);
-
-int e_pilot_map_read (const char *filename, EPilotMap **map);
-int e_pilot_map_write (const char *filename, EPilotMap *map);
-
-void e_pilot_map_destroy (EPilotMap *map);
-
-#endif /* E_PILOT_MAP_H */
diff --git a/e-util/e-pilot-util.c b/e-util/e-pilot-util.c
deleted file mode 100644
index 780336a62f..0000000000
--- a/e-util/e-pilot-util.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution Conduits - Pilot Map routines
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: 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 <stdlib.h>
-#include <time.h>
-#include <gnome-xml/parser.h>
-#include <pi-util.h>
-
-#include "e-pilot-util.h"
-
-char *
-e_pilot_utf8_to_pchar (const char *string)
-{
- char *pstring = NULL;
- int res;
-
- if (!string)
- return NULL;
-
- res = convert_ToPilotChar ("UTF8", string, strlen (string), &pstring);
-
- if (res != 0)
- pstring = strdup (string);
-
- return pstring;
-}
-
-char *
-e_pilot_utf8_from_pchar (const char *string)
-{
- char *ustring = NULL;
- int res;
-
- if (!string)
- return NULL;
-
- res = convert_FromPilotChar ("UTF8", string, strlen (string), &ustring);
-
- if (res != 0)
- ustring = strdup (string);
-
- return ustring;
-}
diff --git a/e-util/e-pilot-util.h b/e-util/e-pilot-util.h
deleted file mode 100644
index 811a1d77ef..0000000000
--- a/e-util/e-pilot-util.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution Conduits - Pilot Map routines
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: 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 E_PILOT_UTIL_H
-#define E_PILOT_UTIL_H
-
-char *e_pilot_utf8_to_pchar (const char *string);
-char *e_pilot_utf8_from_pchar (const char *string);
-
-#endif /* E_PILOT_UTIL_H */
diff --git a/e-util/e-request.c b/e-util/e-request.c
deleted file mode 100644
index 09634eb32b..0000000000
--- a/e-util/e-request.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-request.c
- *
- * Copyright (C) 2000, 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.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-request.h"
-
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <gtk/gtklabel.h>
-#include <gtk/gtkentry.h>
-
-
-/**
- * e_request_string:
- * @parent:
- * @title:
- * @prompt:
- * @default:
- *
- * Requst a string to the user.
- *
- * Return value: NULL if the user cancelled the dialog, the inserted string
- * otherwise. The string must be freed by the caller.
- **/
-char *
-e_request_string (GtkWindow *parent,
- const char *title,
- const char *prompt,
- const char *default_string)
-{
- GtkWidget *dialog;
- GtkWidget *prompt_label;
- GtkWidget *entry;
- GtkWidget *vbox;
- char *retval;
-
- g_return_val_if_fail (title != NULL, NULL);
- g_return_val_if_fail (prompt != NULL, NULL);
-
- dialog = gnome_dialog_new (title, GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-
- vbox = GNOME_DIALOG (dialog)->vbox;
-
- prompt_label = gtk_label_new (prompt);
- gtk_box_pack_start (GTK_BOX (vbox), prompt_label, TRUE, TRUE, 0);
-
- entry = gtk_entry_new ();
- e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), default_string);
- gtk_entry_select_region (GTK_ENTRY (entry), 0, -1);
- gtk_box_pack_start (GTK_BOX (vbox), entry, TRUE, TRUE, 0);
-
- gtk_widget_grab_focus (entry);
- gnome_dialog_editable_enters (GNOME_DIALOG (dialog), GTK_EDITABLE (entry));
-
- gtk_widget_show (prompt_label);
- gtk_widget_show (entry);
- gtk_widget_show (dialog);
-
- switch (gnome_dialog_run (GNOME_DIALOG (dialog))) {
- case 0:
- /* OK. */
- retval = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry));
- break;
- case -1:
- case 1:
- /* Cancel. */
- retval = NULL;
- break;
- default:
- g_assert_not_reached ();
- retval = NULL;
- }
-
- gtk_widget_destroy (dialog);
-
- return retval;
-}
diff --git a/e-util/e-request.h b/e-util/e-request.h
deleted file mode 100644
index f4404b83d5..0000000000
--- a/e-util/e-request.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-request.c
- *
- * Copyright (C) 2000, 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.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef E_REQUEST_H
-#define E_REQUEST_H
-
-#include <gtk/gtkwindow.h>
-
-char *e_request_string (GtkWindow *parent,
- const char *title,
- const char *prompt,
- const char *default_string);
-
-#endif
diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c
deleted file mode 100644
index e8b100808f..0000000000
--- a/e-util/e-sexp.c
+++ /dev/null
@@ -1,1292 +0,0 @@
-/*
- * Copyright 2000 Ximian (www.ximian.com).
- *
- * A simple, extensible s-exp evaluation engine.
- *
- * Author :
- * Michael Zucchi <notzed@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
- */
-
-/*
- The following built-in s-exp's are supported:
-
- list = (and list*)
- perform an intersection of a number of lists, and return that.
-
- bool = (and bool*)
- perform a boolean AND of boolean values.
-
- list = (or list*)
- perform a union of a number of lists, returning the new list.
-
- bool = (or bool*)
- perform a boolean OR of boolean values.
-
- int = (+ int*)
- Add integers.
-
- string = (+ string*)
- Concat strings.
-
- time_t = (+ time_t*)
- Add time_t values.
-
- int = (- int int*)
- Subtract integers from the first.
-
- time_t = (- time_t*)
- Subtract time_t values from the first.
-
- Comparison operators:
-
- bool = (< int int)
- bool = (> int int)
- bool = (= int int)
-
- bool = (< string string)
- bool = (> string string)
- bool = (= string string)
-
- bool = (< time_t time_t)
- bool = (> time_t time_t)
- bool = (= time_t time_t)
- Perform a comparision of 2 integers, 2 string values, or 2 time values.
-
- Function flow:
-
- type = (if bool function)
- type = (if bool function function)
- Choose a flow path based on a boolean value
-
- type = (begin func func func)
- Execute a sequence. The last function return is the return type.
-*/
-
-#include "e-sexp.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <string.h>
-
-#include <glib.h>
-#include "e-memory.h"
-#define p(x) /* parse debug */
-#define r(x) /* run debug */
-#define d(x) /* general debug */
-
-
-static struct _ESExpTerm * parse_list(ESExp *f, int gotbrace);
-static struct _ESExpTerm * parse_value(ESExp *f);
-
-static void parse_dump_term(struct _ESExpTerm *t, int depth);
-
-#ifdef E_SEXP_IS_GTK_OBJECT
-static GtkObjectClass *parent_class;
-#endif
-
-static GScannerConfig scanner_config =
-{
- ( " \t\r\n") /* cset_skip_characters */,
- ( G_CSET_a_2_z
- "_+-<=>?"
- G_CSET_A_2_Z) /* cset_identifier_first */,
- ( G_CSET_a_2_z
- "_0123456789-<>?"
- G_CSET_A_2_Z
- G_CSET_LATINS
- G_CSET_LATINC ) /* cset_identifier_nth */,
- ( ";\n" ) /* cpair_comment_single */,
-
- FALSE /* case_sensitive */,
-
- TRUE /* skip_comment_multi */,
- TRUE /* skip_comment_single */,
- TRUE /* scan_comment_multi */,
- TRUE /* scan_identifier */,
- TRUE /* scan_identifier_1char */,
- FALSE /* scan_identifier_NULL */,
- TRUE /* scan_symbols */,
- FALSE /* scan_binary */,
- TRUE /* scan_octal */,
- TRUE /* scan_float */,
- TRUE /* scan_hex */,
- FALSE /* scan_hex_dollar */,
- TRUE /* scan_string_sq */,
- TRUE /* scan_string_dq */,
- TRUE /* numbers_2_int */,
- FALSE /* int_2_float */,
- FALSE /* identifier_2_string */,
- TRUE /* char_2_token */,
- FALSE /* symbol_2_token */,
- FALSE /* scope_0_fallback */,
-};
-
-/* jumps back to the caller of f->failenv, only to be called from inside a callback */
-void
-e_sexp_fatal_error(struct _ESExp *f, char *why, ...)
-{
- va_list args;
-
- if (f->error)
- g_free(f->error);
-
- va_start(args, why);
- f->error = g_strdup_vprintf(why, args);
- va_end(args);
-
- longjmp(f->failenv, 1);
-}
-
-const char *
-e_sexp_error(struct _ESExp *f)
-{
- return f->error;
-}
-
-struct _ESExpResult *
-e_sexp_result_new(struct _ESExp *f, int type)
-{
- struct _ESExpResult *r = e_memchunk_alloc0(f->result_chunks);
- r->type = type;
- return r;
-}
-
-void
-e_sexp_result_free(struct _ESExp *f, struct _ESExpResult *t)
-{
- if (t == NULL)
- return;
-
- switch(t->type) {
- case ESEXP_RES_ARRAY_PTR:
- g_ptr_array_free(t->value.ptrarray, TRUE);
- break;
- case ESEXP_RES_BOOL:
- case ESEXP_RES_INT:
- case ESEXP_RES_TIME:
- break;
- case ESEXP_RES_STRING:
- g_free(t->value.string);
- break;
- case ESEXP_RES_UNDEFINED:
- break;
- default:
- g_assert_not_reached();
- }
- e_memchunk_free(f->result_chunks, t);
-}
-
-/* used in normal functions if they have to abort, and free their arguments */
-void
-e_sexp_resultv_free(struct _ESExp *f, int argc, struct _ESExpResult **argv)
-{
- int i;
-
- for (i=0;i<argc;i++) {
- e_sexp_result_free(f, argv[i]);
- }
-}
-
-/* implementations for the builtin functions */
-
-/* can you tell, i dont like glib? */
-/* we can only itereate a hashtable from a called function */
-struct _glib_sux_donkeys {
- int count;
- GPtrArray *uids;
-};
-
-/* ok, store any values that are in all sets */
-static void
-g_lib_sux_htand(char *key, int value, struct _glib_sux_donkeys *fuckup)
-{
- if (value == fuckup->count) {
- g_ptr_array_add(fuckup->uids, key);
- }
-}
-
-/* or, store all unique values */
-static void
-g_lib_sux_htor(char *key, int value, struct _glib_sux_donkeys *fuckup)
-{
- g_ptr_array_add(fuckup->uids, key);
-}
-
-static ESExpResult *
-term_eval_and(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r, *r1;
- GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
- struct _glib_sux_donkeys lambdafoo;
- int type=-1;
- int bool = TRUE;
- int i;
-
- r(printf("( and\n"));
-
- r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-
- for (i=0;bool && i<argc;i++) {
- r1 = e_sexp_term_eval(f, argv[i]);
- if (type == -1)
- type = r1->type;
- if (type != r1->type) {
- e_sexp_result_free(f, r);
- e_sexp_result_free(f, r1);
- g_hash_table_destroy(ht);
- e_sexp_fatal_error(f, "Invalid types in AND");
- } else if (r1->type == ESEXP_RES_ARRAY_PTR) {
- char **a1;
- int l1, j;
-
- a1 = (char **)r1->value.ptrarray->pdata;
- l1 = r1->value.ptrarray->len;
- for (j=0;j<l1;j++) {
- int n;
- n = (int)g_hash_table_lookup(ht, a1[j]);
- g_hash_table_insert(ht, a1[j], (void *)n+1);
- }
- } else if (r1->type == ESEXP_RES_BOOL) {
- bool = bool && r1->value.bool;
- }
- e_sexp_result_free(f, r1);
- }
-
- if (type == ESEXP_RES_ARRAY_PTR) {
- lambdafoo.count = argc;
- lambdafoo.uids = g_ptr_array_new();
- g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htand, &lambdafoo);
- r->type = ESEXP_RES_ARRAY_PTR;
- r->value.ptrarray = lambdafoo.uids;
- } else if (type == ESEXP_RES_BOOL) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = bool;
- }
-
- g_hash_table_destroy(ht);
-
- return r;
-}
-
-static ESExpResult *
-term_eval_or(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r, *r1;
- GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
- struct _glib_sux_donkeys lambdafoo;
- int type = -1;
- int bool = FALSE;
- int i;
-
- r(printf("(or \n"));
-
- r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-
- for (i=0;!bool && i<argc;i++) {
- r1 = e_sexp_term_eval(f, argv[i]);
- if (type == -1)
- type = r1->type;
- if (r1->type != type) {
- e_sexp_result_free(f, r);
- e_sexp_result_free(f, r1);
- g_hash_table_destroy(ht);
- e_sexp_fatal_error(f, "Invalid types in OR");
- } else if (r1->type == ESEXP_RES_ARRAY_PTR) {
- char **a1;
- int l1, j;
-
- a1 = (char **)r1->value.ptrarray->pdata;
- l1 = r1->value.ptrarray->len;
- for (j=0;j<l1;j++) {
- g_hash_table_insert(ht, a1[j], (void *)1);
- }
- } else if (r1->type == ESEXP_RES_BOOL) {
- bool |= r1->value.bool;
- }
- e_sexp_result_free(f, r1);
- }
-
- if (type == ESEXP_RES_ARRAY_PTR) {
- lambdafoo.count = argc;
- lambdafoo.uids = g_ptr_array_new();
- g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htor, &lambdafoo);
- r->type = ESEXP_RES_ARRAY_PTR;
- r->value.ptrarray = lambdafoo.uids;
- } else if (type == ESEXP_RES_BOOL) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = bool;
- }
- g_hash_table_destroy(ht);
-
- return r;
-}
-
-static ESExpResult *
-term_eval_not(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
-{
- int res = TRUE;
- ESExpResult *r;
-
- if (argc>0) {
- if (argv[0]->type == ESEXP_RES_BOOL
- && argv[0]->value.bool)
- res = FALSE;
- }
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = res;
- return r;
-}
-
-/* this should support all arguments ...? */
-static ESExpResult *
-term_eval_lt(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r, *r1, *r2;
-
- r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-
- if (argc == 2) {
- r1 = e_sexp_term_eval(f, argv[0]);
- r2 = e_sexp_term_eval(f, argv[1]);
- if (r1->type != r2->type) {
- e_sexp_result_free(f, r1);
- e_sexp_result_free(f, r2);
- e_sexp_result_free(f, r);
- e_sexp_fatal_error(f, "Incompatible types in compare <");
- } else if (r1->type == ESEXP_RES_INT) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = r1->value.number < r2->value.number;
- } else if (r1->type == ESEXP_RES_TIME) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = r1->value.time < r2->value.time;
- } else if (r1->type == ESEXP_RES_STRING) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = strcmp(r1->value.string, r2->value.string) < 0;
- }
- e_sexp_result_free(f, r1);
- e_sexp_result_free(f, r2);
- }
- return r;
-}
-
-/* this should support all arguments ...? */
-static ESExpResult *
-term_eval_gt(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r, *r1, *r2;
-
- r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-
- if (argc == 2) {
- r1 = e_sexp_term_eval(f, argv[0]);
- r2 = e_sexp_term_eval(f, argv[1]);
- if (r1->type != r2->type) {
- e_sexp_result_free(f, r1);
- e_sexp_result_free(f, r2);
- e_sexp_result_free(f, r);
- e_sexp_fatal_error(f, "Incompatible types in compare >");
- } else if (r1->type == ESEXP_RES_INT) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = r1->value.number > r2->value.number;
- } else if (r1->type == ESEXP_RES_TIME) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = r1->value.time > r2->value.time;
- } else if (r1->type == ESEXP_RES_STRING) {
- r->type = ESEXP_RES_BOOL;
- r->value.bool = strcmp(r1->value.string, r2->value.string) > 0;
- }
- e_sexp_result_free(f, r1);
- e_sexp_result_free(f, r2);
- }
- return r;
-}
-
-/* this should support all arguments ...? */
-static ESExpResult *
-term_eval_eq(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r, *r1, *r2;
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-
- if (argc == 2) {
- r1 = e_sexp_term_eval(f, argv[0]);
- r2 = e_sexp_term_eval(f, argv[1]);
- if (r1->type != r2->type) {
- r->value.bool = FALSE;
- } else if (r1->type == ESEXP_RES_INT) {
- r->value.bool = r1->value.number == r2->value.number;
- } else if (r1->type == ESEXP_RES_BOOL) {
- r->value.bool = r1->value.bool == r2->value.bool;
- } else if (r1->type == ESEXP_RES_TIME) {
- r->value.bool = r1->value.time == r2->value.time;
- } else if (r1->type == ESEXP_RES_STRING) {
- r->value.bool = strcmp(r1->value.string, r2->value.string) == 0;
- }
- e_sexp_result_free(f, r1);
- e_sexp_result_free(f, r2);
- }
- return r;
-}
-
-static ESExpResult *
-term_eval_plus(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
-{
- struct _ESExpResult *r=NULL;
- int type;
- int i;
-
- if (argc>0) {
- type = argv[0]->type;
- switch(type) {
- case ESEXP_RES_INT: {
- int total = argv[0]->value.number;
- for (i=1;i<argc && argv[i]->type == ESEXP_RES_INT;i++) {
- total += argv[i]->value.number;
- }
- if (i<argc) {
- e_sexp_resultv_free(f, argc, argv);
- e_sexp_fatal_error(f, "Invalid types in (+ ints)");
- }
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = total;
- break; }
- case ESEXP_RES_STRING: {
- GString *s = g_string_new(argv[0]->value.string);
- for (i=1;i<argc && argv[i]->type == ESEXP_RES_STRING;i++) {
- g_string_append(s, argv[i]->value.string);
- }
- if (i<argc) {
- e_sexp_resultv_free(f, argc, argv);
- e_sexp_fatal_error(f, "Invalid types in (+ strings)");
- }
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- r->value.string = s->str;
- g_string_free(s, FALSE);
- break; }
- case ESEXP_RES_TIME: {
- time_t total;
-
- total = argv[0]->value.time;
-
- for (i = 1; i < argc && argv[i]->type == ESEXP_RES_TIME; i++)
- total += argv[i]->value.time;
-
- if (i < argc) {
- e_sexp_resultv_free (f, argc, argv);
- e_sexp_fatal_error (f, "Invalid types in (+ time_t)");
- }
-
- r = e_sexp_result_new (f, ESEXP_RES_TIME);
- r->value.time = total;
- break; }
- }
- }
-
- if (!r) {
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = 0;
- }
- return r;
-}
-
-static ESExpResult *
-term_eval_sub(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
-{
- struct _ESExpResult *r=NULL;
- int type;
- int i;
-
- if (argc>0) {
- type = argv[0]->type;
- switch(type) {
- case ESEXP_RES_INT: {
- int total = argv[0]->value.number;
- for (i=1;i<argc && argv[i]->type == ESEXP_RES_INT;i++) {
- total -= argv[i]->value.number;
- }
- if (i<argc) {
- e_sexp_resultv_free(f, argc, argv);
- e_sexp_fatal_error(f, "Invalid types in -");
- }
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = total;
- break; }
- case ESEXP_RES_TIME: {
- time_t total;
-
- total = argv[0]->value.time;
-
- for (i = 1; i < argc && argv[i]->type == ESEXP_RES_TIME; i++)
- total -= argv[i]->value.time;
-
- if (i < argc) {
- e_sexp_resultv_free (f, argc, argv);
- e_sexp_fatal_error (f, "Invalid types in (- time_t)");
- }
-
- r = e_sexp_result_new (f, ESEXP_RES_TIME);
- r->value.time = total;
- break; }
- }
- }
-
- if (!r) {
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = 0;
- }
- return r;
-}
-
-/* implements 'if' function */
-static ESExpResult *
-term_eval_if(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r;
- int doit;
-
- if (argc >=2 && argc<=3) {
- r = e_sexp_term_eval(f, argv[0]);
- doit = (r->type == ESEXP_RES_BOOL && r->value.bool);
- e_sexp_result_free(f, r);
- if (doit) {
- return e_sexp_term_eval(f, argv[1]);
- } else if (argc>2) {
- return e_sexp_term_eval(f, argv[2]);
- }
- }
- return e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-}
-
-/* implements 'begin' statement */
-static ESExpResult *
-term_eval_begin(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
-{
- struct _ESExpResult *r=NULL;
- int i;
-
- for (i=0;i<argc;i++) {
- if (r)
- e_sexp_result_free(f, r);
- r = e_sexp_term_eval(f, argv[i]);
- }
- if (r)
- return r;
- else
- return e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-}
-
-
-/* this must only be called from inside term evaluation callbacks! */
-struct _ESExpResult *
-e_sexp_term_eval(struct _ESExp *f, struct _ESExpTerm *t)
-{
- struct _ESExpResult *r = NULL;
- int i;
- struct _ESExpResult **argv;
-
- g_return_val_if_fail(t != NULL, NULL);
-
- r(printf("eval term :\n"));
- r(parse_dump_term(t, 0));
-
- switch (t->type) {
- case ESEXP_TERM_STRING:
- r(printf(" (string \"%s\")\n", t->value.string));
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- /* erk, this shoul;dn't need to strdup this ... */
- r->value.string = g_strdup(t->value.string);
- break;
- case ESEXP_TERM_INT:
- r(printf(" (int %d)\n", t->value.number));
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = t->value.number;
- break;
- case ESEXP_TERM_BOOL:
- r(printf(" (int %d)\n", t->value.number));
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = t->value.bool;
- break;
- case ESEXP_TERM_TIME:
- r(printf(" (time_t %d)\n", t->value.time));
- r = e_sexp_result_new (f, ESEXP_RES_TIME);
- r->value.time = t->value.time;
- break;
- case ESEXP_TERM_IFUNC:
- if (t->value.func.sym->f.ifunc)
- r = t->value.func.sym->f.ifunc(f, t->value.func.termcount, t->value.func.terms, t->value.func.sym->data);
- break;
- case ESEXP_TERM_FUNC:
- /* first evaluate all arguments to result types */
- argv = alloca(sizeof(argv[0]) * t->value.func.termcount);
- for (i=0;i<t->value.func.termcount;i++) {
- argv[i] = e_sexp_term_eval(f, t->value.func.terms[i]);
- }
- /* call the function */
- if (t->value.func.sym->f.func)
- r = t->value.func.sym->f.func(f, t->value.func.termcount, argv, t->value.func.sym->data);
-
- e_sexp_resultv_free(f, t->value.func.termcount, argv);
- break;
- default:
- e_sexp_fatal_error(f, "Unknown type in parse tree: %d", t->type);
- }
-
- if (r==NULL)
- r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
-
- return r;
-}
-
-#ifdef TESTER
-static void
-eval_dump_result(ESExpResult *r, int depth)
-{
- int i;
-
- if (r==NULL) {
- printf("null result???\n");
- return;
- }
-
- for (i=0;i<depth;i++)
- printf(" ");
-
- switch (r->type) {
- case ESEXP_RES_ARRAY_PTR:
- printf("array pointers\n");
- break;
- case ESEXP_RES_INT:
- printf("int: %d\n", r->value.number);
- break;
- case ESEXP_RES_STRING:
- printf("string: '%s'\n", r->value.string);
- break;
- case ESEXP_RES_BOOL:
- printf("bool: %c\n", r->value.bool?'t':'f');
- break;
- case ESEXP_RES_TIME:
- printf("time_t: %ld\n", (long) r->value.time);
- break;
- case ESEXP_RES_UNDEFINED:
- printf(" <undefined>\n");
- break;
- }
- printf("\n");
-}
-#endif
-
-static void
-parse_dump_term(struct _ESExpTerm *t, int depth)
-{
- int i;
-
- if (t==NULL) {
- printf("null term??\n");
- return;
- }
-
- for (i=0;i<depth;i++)
- printf(" ");
-
- switch (t->type) {
- case ESEXP_TERM_STRING:
- printf(" \"%s\"", t->value.string);
- break;
- case ESEXP_TERM_INT:
- printf(" %d", t->value.number);
- break;
- case ESEXP_TERM_BOOL:
- printf(" #%c", t->value.bool?'t':'f');
- break;
- case ESEXP_TERM_TIME:
- printf(" %ld", (long) t->value.time);
- break;
- case ESEXP_TERM_IFUNC:
- case ESEXP_TERM_FUNC:
- printf(" (function %s\n", t->value.func.sym->name);
- /*printf(" [%d] ", t->value.func.termcount);*/
- for (i=0;i<t->value.func.termcount;i++) {
- parse_dump_term(t->value.func.terms[i], depth+1);
- }
- for (i=0;i<depth;i++)
- printf(" ");
- printf(" )");
- break;
- case ESEXP_TERM_VAR:
- printf(" (variable %s )\n", t->value.var->name);
- break;
- default:
- printf("unknown type: %d\n", t->type);
- }
-
- printf("\n");
-}
-
-/*
- PARSER
-*/
-
-static struct _ESExpTerm *
-parse_term_new(struct _ESExp *f, int type)
-{
- struct _ESExpTerm *s = e_memchunk_alloc0(f->term_chunks);
- s->type = type;
- return s;
-}
-
-static void
-parse_term_free(struct _ESExp *f, struct _ESExpTerm *t)
-{
- int i;
-
- if (t==NULL) {
- return;
- }
-
- switch (t->type) {
- case ESEXP_TERM_INT:
- case ESEXP_TERM_BOOL:
- case ESEXP_TERM_TIME:
- case ESEXP_TERM_VAR:
- break;
-
- case ESEXP_TERM_STRING:
- g_free(t->value.string);
- break;
-
- case ESEXP_TERM_FUNC:
- case ESEXP_TERM_IFUNC:
- for (i=0;i<t->value.func.termcount;i++) {
- parse_term_free(f, t->value.func.terms[i]);
- }
- g_free(t->value.func.terms);
- break;
-
- default:
- printf("parse_term_free: unknown type: %d\n", t->type);
- }
- e_memchunk_free(f->term_chunks, t);
-}
-
-static struct _ESExpTerm **
-parse_values(ESExp *f, int *len)
-{
- int token;
- struct _ESExpTerm **terms;
- int i, size = 0;
- GScanner *gs = f->scanner;
- GSList *list = NULL, *l;
-
- p(printf("parsing values\n"));
-
- while ( (token = g_scanner_peek_next_token(gs)) != G_TOKEN_EOF
- && token != ')') {
- list = g_slist_prepend(list, parse_value(f));
- size++;
- }
-
- /* go over the list, and put them backwards into the term array */
- terms = g_malloc(size * sizeof(*terms));
- l = list;
- for (i=size-1;i>=0;i--) {
- g_assert(l);
- g_assert(l->data);
- terms[i] = l->data;
- l = g_slist_next(l);
- }
- g_slist_free(list);
-
- p(printf("found %d subterms\n", size));
- *len = size;
-
- p(printf("done parsing values\n"));
- return terms;
-}
-
-static struct _ESExpTerm *
-parse_value(ESExp *f)
-{
- int token;
- struct _ESExpTerm *t = NULL;
- GScanner *gs = f->scanner;
- struct _ESExpSymbol *s;
-
- p(printf("parsing value\n"));
-
- token = g_scanner_get_next_token(gs);
- switch(token) {
- case G_TOKEN_LEFT_PAREN:
- p(printf("got brace, its a list!\n"));
- return parse_list(f, TRUE);
- case G_TOKEN_STRING:
- p(printf("got string\n"));
- t = parse_term_new(f, ESEXP_TERM_STRING);
- t->value.string = g_strdup(g_scanner_cur_value(gs).v_string);
- break;
- case G_TOKEN_INT:
- t = parse_term_new(f, ESEXP_TERM_INT);
- t->value.number = g_scanner_cur_value(gs).v_int;
- p(printf("got int\n"));
- break;
- case '#': {
- char *str;
-
- p(printf("got bool?\n"));
- token = g_scanner_get_next_token(gs);
- if (token != G_TOKEN_IDENTIFIER) {
- e_sexp_fatal_error (f, "Invalid format for a boolean value");
- return NULL;
- }
-
- str = g_scanner_cur_value (gs).v_identifier;
-
- g_assert (str != NULL);
- if (!(strlen (str) == 1 && (str[0] == 't' || str[0] == 'f'))) {
- e_sexp_fatal_error (f, "Invalid format for a boolean value");
- return NULL;
- }
-
- t = parse_term_new(f, ESEXP_TERM_BOOL);
- t->value.bool = (str[0] == 't');
- break; }
- case G_TOKEN_SYMBOL:
- s = g_scanner_cur_value(gs).v_symbol;
- switch (s->type) {
- case ESEXP_TERM_FUNC:
- case ESEXP_TERM_IFUNC:
- /* this is basically invalid, since we can't use function
- pointers, but let the runtime catch it ... */
- t = parse_term_new(f, s->type);
- t->value.func.sym = s;
- t->value.func.terms = parse_values(f, &t->value.func.termcount);
- break;
- case ESEXP_TERM_VAR:
- t = parse_term_new(f, s->type);
- t->value.var = s;
- break;
- default:
- e_sexp_fatal_error(f, "Invalid symbol type: %s: %d", s->name, s->type);
- }
- break;
- case G_TOKEN_IDENTIFIER:
- e_sexp_fatal_error(f, "Unknown identifier: %s", g_scanner_cur_value(gs).v_identifier);
- break;
- default:
- e_sexp_fatal_error(f, "Unexpected token encountered: %d", token);
- }
- p(printf("done parsing value\n"));
- return t;
-}
-
-/* FIXME: this needs some robustification */
-static struct _ESExpTerm *
-parse_list(ESExp *f, int gotbrace)
-{
- int token;
- struct _ESExpTerm *t = NULL;
- GScanner *gs = f->scanner;
-
- p(printf("parsing list\n"));
- if (gotbrace)
- token = '(';
- else
- token = g_scanner_get_next_token(gs);
- if (token =='(') {
- token = g_scanner_get_next_token(gs);
- switch(token) {
- case G_TOKEN_SYMBOL: {
- struct _ESExpSymbol *s;
-
- s = g_scanner_cur_value(gs).v_symbol;
- p(printf("got funciton: %s\n", s->name));
- t = parse_term_new(f, s->type);
- p(printf("created new list %p\n", t));
- /* if we have a variable, find out its base type */
- while (s->type == ESEXP_TERM_VAR) {
- s = ((ESExpTerm *)(s->data))->value.var;
- }
- if (s->type == ESEXP_TERM_FUNC
- || s->type == ESEXP_TERM_IFUNC) {
- t->value.func.sym = s;
- t->value.func.terms = parse_values(f, &t->value.func.termcount);
- } else {
- parse_term_free(f, t);
- e_sexp_fatal_error(f, "Trying to call variable as function: %s", s->name);
- }
- break; }
- case G_TOKEN_IDENTIFIER:
- e_sexp_fatal_error(f, "Unknown identifier: %s", g_scanner_cur_value(gs).v_identifier);
- break;
- default:
- e_sexp_fatal_error(f, "Unexpected token encountered: %d", token);
- }
- token = g_scanner_get_next_token(gs);
- if (token != ')') {
- e_sexp_fatal_error(f, "Missing ')'");
- }
- } else {
- e_sexp_fatal_error(f, "Missing '('");
- }
-
- p(printf("returning list %p\n", t));
- return t;
-}
-
-static void e_sexp_finalise(void *);
-
-#ifdef E_SEXP_IS_GTK_OBJECT
-static void
-e_sexp_class_init (ESExpClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- object_class->finalize = e_sexp_finalise;
-
- parent_class = gtk_type_class (gtk_object_get_type ());
-}
-#endif
-
-/* 'builtin' functions */
-static struct {
- char *name;
- ESExpFunc *func;
- int type; /* set to 1 if a function can perform shortcut evaluation, or
- doesn't execute everything, 0 otherwise */
-} symbols[] = {
- { "and", (ESExpFunc *)term_eval_and, 1 },
- { "or", (ESExpFunc *)term_eval_or, 1 },
- { "not", (ESExpFunc *)term_eval_not, 0 },
- { "<", (ESExpFunc *)term_eval_lt, 1 },
- { ">", (ESExpFunc *)term_eval_gt, 1 },
- { "=", (ESExpFunc *)term_eval_eq, 1 },
- { "+", (ESExpFunc *)term_eval_plus, 0 },
- { "-", (ESExpFunc *)term_eval_sub, 0 },
- { "if", (ESExpFunc *)term_eval_if, 1 },
- { "begin", (ESExpFunc *)term_eval_begin, 1 },
-};
-
-static void
-free_symbol(void *key, void *value, void *data)
-{
- struct _ESExpSymbol *s = value;
-
- g_free(s->name);
- g_free(s);
-}
-
-static void
-e_sexp_finalise(void *o)
-{
- ESExp *s = (ESExp *)o;
-
- if (s->tree) {
- parse_term_free(s, s->tree);
- s->tree = NULL;
- }
-
- e_memchunk_destroy(s->term_chunks);
- e_memchunk_destroy(s->result_chunks);
-
- g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, 0);
- g_scanner_destroy(s->scanner);
-
-#ifdef E_SEXP_IS_GTK_OBJECT
- ((GtkObjectClass *)(parent_class))->finalize((GtkObject *)o);
-#endif
-}
-
-static void
-e_sexp_init (ESExp *s)
-{
- int i;
-
- s->scanner = g_scanner_new(&scanner_config);
- s->term_chunks = e_memchunk_new(16, sizeof(struct _ESExpTerm));
- s->result_chunks = e_memchunk_new(16, sizeof(struct _ESExpResult));
-
- /* load in builtin symbols? */
- for(i=0;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction(s, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, &symbols[i]);
- } else {
- e_sexp_add_function(s, 0, symbols[i].name, symbols[i].func, &symbols[i]);
- }
- }
-
-#ifndef E_SEXP_IS_GTK_OBJECT
- s->refcount = 1;
-#endif
-}
-
-#ifdef E_SEXP_IS_GTK_OBJECT
-guint
-e_sexp_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "ESExp",
- sizeof (ESExp),
- sizeof (ESExpClass),
- (GtkClassInitFunc) e_sexp_class_init,
- (GtkObjectInitFunc) e_sexp_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gtk_object_get_type (), &type_info);
- }
-
- return type;
-}
-#endif
-
-ESExp *
-e_sexp_new (void)
-{
-#ifdef E_SEXP_IS_GTK_OBJECT
- ESExp *f = E_SEXP ( gtk_type_new (e_sexp_get_type ()));
-#else
- ESExp *f = g_malloc0(sizeof(*f));
- e_sexp_init(f);
-#endif
-
- return f;
-}
-
-#ifndef E_SEXP_IS_GTK_OBJECT
-void e_sexp_ref (ESExp *f)
-{
- f->refcount++;
-}
-
-void e_sexp_unref (ESExp *f)
-{
- f->refcount--;
- if (f->refcount == 0) {
- e_sexp_finalise(f);
- g_free(f);
- }
-}
-#endif
-
-void
-e_sexp_add_function(ESExp *f, int scope, char *name, ESExpFunc *func, void *data)
-{
- struct _ESExpSymbol *s;
-
- g_return_if_fail(FILTER_IS_SEXP(f));
- g_return_if_fail(name != NULL);
-
- s = g_malloc0(sizeof(*s));
- s->name = g_strdup(name);
- s->f.func = func;
- s->type = ESEXP_TERM_FUNC;
- s->data = data;
- g_scanner_scope_add_symbol(f->scanner, scope, s->name, s);
-}
-
-void
-e_sexp_add_ifunction(ESExp *f, int scope, char *name, ESExpIFunc *ifunc, void *data)
-{
- struct _ESExpSymbol *s;
-
- g_return_if_fail(FILTER_IS_SEXP(f));
- g_return_if_fail(name != NULL);
-
- s = g_malloc0(sizeof(*s));
- s->name = g_strdup(name);
- s->f.ifunc = ifunc;
- s->type = ESEXP_TERM_IFUNC;
- s->data = data;
- g_scanner_scope_add_symbol(f->scanner, scope, s->name, s);
-}
-
-void
-e_sexp_add_variable(ESExp *f, int scope, char *name, ESExpTerm *value)
-{
- struct _ESExpSymbol *s;
-
- g_return_if_fail(FILTER_IS_SEXP(f));
- g_return_if_fail(name != NULL);
-
- s = g_malloc0(sizeof(*s));
- s->name = g_strdup(name);
- s->type = ESEXP_TERM_VAR;
- s->data = value;
- g_scanner_scope_add_symbol(f->scanner, scope, s->name, s);
-}
-
-void
-e_sexp_remove_symbol(ESExp *f, int scope, char *name)
-{
- int oldscope;
- struct _ESExpSymbol *s;
-
- g_return_if_fail(FILTER_IS_SEXP(f));
- g_return_if_fail(name != NULL);
-
- oldscope = g_scanner_set_scope(f->scanner, scope);
- s = g_scanner_lookup_symbol(f->scanner, name);
- g_scanner_scope_remove_symbol(f->scanner, scope, name);
- g_scanner_set_scope(f->scanner, oldscope);
- if (s) {
- g_free(s->name);
- g_free(s);
- }
-}
-
-int
-e_sexp_set_scope(ESExp *f, int scope)
-{
- g_return_val_if_fail(FILTER_IS_SEXP(f), 0);
-
- return g_scanner_set_scope(f->scanner, scope);
-}
-
-void
-e_sexp_input_text(ESExp *f, const char *text, int len)
-{
- g_return_if_fail(FILTER_IS_SEXP(f));
- g_return_if_fail(text != NULL);
-
- g_scanner_input_text(f->scanner, text, len);
-}
-
-void
-e_sexp_input_file (ESExp *f, int fd)
-{
- g_return_if_fail(FILTER_IS_SEXP(f));
-
- g_scanner_input_file(f->scanner, fd);
-}
-
-/* returns -1 on error */
-int
-e_sexp_parse(ESExp *f)
-{
- g_return_val_if_fail(FILTER_IS_SEXP(f), -1);
-
- if (setjmp(f->failenv)) {
- g_warning("Error in parsing: %s", f->error);
- return -1;
- }
-
- if (f->tree)
- parse_term_free(f, f->tree);
-
- f->tree = parse_value (f);
-
- return 0;
-}
-
-/* returns NULL on error */
-struct _ESExpResult *
-e_sexp_eval(ESExp *f)
-{
- g_return_val_if_fail(FILTER_IS_SEXP(f), NULL);
- g_return_val_if_fail(f->tree != NULL, NULL);
-
- if (setjmp(f->failenv)) {
- g_warning("Error in execution: %s", f->error);
- return NULL;
- }
-
- return e_sexp_term_eval(f, f->tree);
-}
-
-/**
- * e_sexp_encode_bool:
- * @s:
- * @state:
- *
- * Encode a bool into an s-expression @s. Bools are
- * encoded using #t #f syntax.
- **/
-void
-e_sexp_encode_bool(GString *s, gboolean state)
-{
- if (state)
- g_string_append(s, " #t");
- else
- g_string_append(s, " #f");
-}
-
-/**
- * e_sexp_encode_string:
- * @s: Destination string.
- * @string: String expression.
- *
- * Add a c string @string to the s-expression stored in
- * the gstring @s. Quotes are added, and special characters
- * are escaped appropriately.
- **/
-void
-e_sexp_encode_string(GString *s, const char *string)
-{
- char c;
- const char *p;
-
- if (string == NULL)
- p = "";
- else
- p = string;
- g_string_append(s, " \"");
- while ( (c = *p++) ) {
- if (c=='\\' || c=='\"' || c=='\'')
- g_string_append_c(s, '\\');
- g_string_append_c(s, c);
- }
- g_string_append(s, "\"");
-}
-
-#ifdef TESTER
-int main(int argc, char **argv)
-{
- ESExp *f;
- char *t = "(+ \"foo\" \"\\\"\" \"bar\" \"\\\\ blah \\x \")";
- ESExpResult *r;
-
- gtk_init(&argc, &argv);
-
- f = e_sexp_new();
-
- e_sexp_add_variable(f, 0, "test", NULL);
-
- e_sexp_input_text(f, t, strlen(t));
- e_sexp_parse(f);
-
- if (f->tree) {
- parse_dump_term(f->tree, 0);
- }
-
- r = e_sexp_eval(f);
- if (r) {
- eval_dump_result(r, 0);
- } else {
- printf("no result?|\n");
- }
-
- return 0;
-}
-#endif
diff --git a/e-util/e-sexp.h b/e-util/e-sexp.h
deleted file mode 100644
index d4b8795c3e..0000000000
--- a/e-util/e-sexp.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- generic s-exp evaluator class
-*/
-#ifndef _E_SEXP_H
-#define _E_SEXP_H
-
-#include <setjmp.h>
-#include <time.h>
-#include <glib.h>
-
-#ifdef E_SEXP_IS_GTK_OBJECT
-#include <gtk/gtkobject.h>
-#endif
-
-#ifdef E_SEXP_IS_GTK_OBJECT
-#define E_SEXP(obj) GTK_CHECK_CAST (obj, e_sexp_get_type (), ESExp)
-#define E_SEXP_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_sexp_get_type (), ESExpClass)
-#define FILTER_IS_SEXP(obj) GTK_CHECK_TYPE (obj, e_sexp_get_type ())
-#else
-#define E_SEXP(obj) ((struct _ESExp *)(obj))
-#define E_SEXP_CLASS(klass) ((struct _ESExpClass *)(klass))
-#define FILTER_IS_SEXP(obj) (1)
-#endif
-
-typedef struct _ESExp ESExp;
-typedef struct _ESExpClass ESExpClass;
-
-typedef struct _ESExpSymbol ESExpSymbol;
-typedef struct _ESExpResult ESExpResult;
-typedef struct _ESExpTerm ESExpTerm;
-
-typedef struct _ESExpResult *(ESExpFunc)(struct _ESExp *sexp,
- int argc,
- struct _ESExpResult **argv,
- void *data);
-
-typedef struct _ESExpResult *(ESExpIFunc)(struct _ESExp *sexp,
- int argc,
- struct _ESExpTerm **argv,
- void *data);
-enum _ESExpResultType {
- ESEXP_RES_ARRAY_PTR=0, /* type is a ptrarray, what it points to is implementation dependant */
- ESEXP_RES_INT, /* type is a number */
- ESEXP_RES_STRING, /* type is a pointer to a single string */
- ESEXP_RES_BOOL, /* boolean type */
- ESEXP_RES_TIME, /* time_t type */
- ESEXP_RES_UNDEFINED /* unknown type */
-};
-
-struct _ESExpResult {
- enum _ESExpResultType type;
- union {
- GPtrArray *ptrarray;
- int number;
- char *string;
- int bool;
- time_t time;
- } value;
-};
-
-enum _ESExpTermType {
- ESEXP_TERM_INT = 0, /* integer literal */
- ESEXP_TERM_BOOL, /* boolean literal */
- ESEXP_TERM_STRING, /* string literal */
- ESEXP_TERM_TIME, /* time_t literal (number of seconds past the epoch) */
- ESEXP_TERM_FUNC, /* normal function, arguments are evaluated before calling */
- ESEXP_TERM_IFUNC, /* immediate function, raw terms are arguments */
- ESEXP_TERM_VAR, /* variable reference */
-};
-
-struct _ESExpSymbol {
- int type; /* ESEXP_TERM_FUNC or ESEXP_TERM_VAR */
- char *name;
- void *data;
- union {
- ESExpFunc *func;
- ESExpIFunc *ifunc;
- } f;
-};
-
-struct _ESExpTerm {
- enum _ESExpTermType type;
- union {
- char *string;
- int number;
- int bool;
- time_t time;
- struct {
- struct _ESExpSymbol *sym;
- struct _ESExpTerm **terms;
- int termcount;
- } func;
- struct _ESExpSymbol *var;
- } value;
-};
-
-
-
-struct _ESExp {
-#ifdef E_SEXP_IS_GTK_OBJECT
- GtkObject object;
-#else
- int refcount;
-#endif
- GScanner *scanner; /* for parsing text version */
- ESExpTerm *tree; /* root of expression tree */
-
- /* private stuff */
- jmp_buf failenv;
- char *error;
-
- /* TODO: may also need a pool allocator for term strings, so we dont lose them
- in error conditions? */
- struct _EMemChunk *term_chunks;
- struct _EMemChunk *result_chunks;
-};
-
-struct _ESExpClass {
-#ifdef E_SEXP_IS_GTK_OBJECT
- GtkObjectClass parent_class;
-#endif
-};
-
-#ifdef E_SEXP_IS_GTK_OBJECT
-guint e_sexp_get_type (void);
-#endif
-ESExp *e_sexp_new (void);
-#ifndef E_SEXP_IS_GTK_OBJECT
-void e_sexp_ref (ESExp *f);
-void e_sexp_unref (ESExp *f);
-#endif
-void e_sexp_add_function (ESExp *f, int scope, char *name, ESExpFunc *func, void *data);
-void e_sexp_add_ifunction (ESExp *f, int scope, char *name, ESExpIFunc *func, void *data);
-void e_sexp_add_variable (ESExp *f, int scope, char *name, ESExpTerm *value);
-void e_sexp_remove_symbol (ESExp *f, int scope, char *name);
-int e_sexp_set_scope (ESExp *f, int scope);
-
-void e_sexp_input_text (ESExp *f, const char *text, int len);
-void e_sexp_input_file (ESExp *f, int fd);
-
-
-int e_sexp_parse (ESExp *f);
-ESExpResult *e_sexp_eval (ESExp *f);
-
-ESExpResult *e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t);
-ESExpResult *e_sexp_result_new (struct _ESExp *f, int type);
-void e_sexp_result_free (struct _ESExp *f, struct _ESExpResult *t);
-
-/* used in normal functions if they have to abort, to free their arguments */
-void e_sexp_resultv_free (struct _ESExp *f, int argc, struct _ESExpResult **argv);
-
-/* utility functions for creating s-exp strings. */
-void e_sexp_encode_bool (GString *s, gboolean state);
-void e_sexp_encode_string (GString *s, const char *string);
-
-/* only to be called from inside a callback to signal a fatal execution error */
-void e_sexp_fatal_error (struct _ESExp *f, char *why, ...);
-
-/* return the error string */
-const char *e_sexp_error (struct _ESExp *f);
-
-#endif /* _E_SEXP_H */
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
deleted file mode 100644
index 0bd0cac149..0000000000
--- a/e-util/e-sorter-array.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-sorter-array.c:
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * (C) 2001 Ximian, Inc.
- */
-#include <config.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtksignal.h>
-#include "gal/util/e-util.h"
-#include "e-sorter-array.h"
-
-#define d(x)
-
-/* The arguments we take */
-enum {
- ARG_0,
-};
-
-#define PARENT_TYPE e_sorter_get_type()
-
-#define INCREMENT_AMOUNT 100
-
-static ESorterClass *parent_class;
-
-static void esa_sort (ESorterArray *esa);
-static void esa_backsort (ESorterArray *esa);
-
-static gint esa_model_to_sorted (ESorter *sorter, int row);
-static gint esa_sorted_to_model (ESorter *sorter, int row);
-static void esa_get_model_to_sorted_array (ESorter *sorter, int **array, int *count);
-static void esa_get_sorted_to_model_array (ESorter *sorter, int **array, int *count);
-static gboolean esa_needs_sorting (ESorter *esa);
-
-#define ESA_NEEDS_SORTING(esa) (((ESorterArray *) (esa))->compare != NULL)
-
-static int
-esort_callback(const void *data1, const void *data2, gpointer user_data)
-{
- ESorterArray *esa = user_data;
- int ret_val;
- int int1, int2;
-
- int1 = *(int *)data1;
- int2 = *(int *)data2;
-
- ret_val = esa->compare (int1, int2, esa->closure);
- if (ret_val != 0)
- return ret_val;
-
- if (int1 < int2)
- return -1;
- if (int1 > int2)
- return 1;
- return 0;
-}
-
-static void
-esa_sort(ESorterArray *esa)
-{
- int rows;
- int i;
-
- if (esa->sorted)
- return;
-
- rows = esa->rows;
-
- esa->sorted = g_new(int, rows);
- for (i = 0; i < rows; i++)
- esa->sorted[i] = i;
-
- if (esa->compare)
- e_sort (esa->sorted, rows, sizeof(int), esort_callback, esa);
-}
-
-static void
-esa_backsort(ESorterArray *esa)
-{
- int i, rows;
-
- if (esa->backsorted)
- return;
-
- esa_sort(esa);
-
- rows = esa->rows;
-
- esa->backsorted = g_new0(int, rows);
-
- for (i = 0; i < rows; i++) {
- esa->backsorted[esa->sorted[i]] = i;
- }
-}
-
-
-static gint
-esa_model_to_sorted (ESorter *es, int row)
-{
- ESorterArray *esa = E_SORTER_ARRAY(es);
-
- g_return_val_if_fail(row >= 0, -1);
- g_return_val_if_fail(row < esa->rows, -1);
-
- if (ESA_NEEDS_SORTING(es))
- esa_backsort(esa);
-
- if (esa->backsorted)
- return esa->backsorted[row];
- else
- return row;
-}
-
-static gint
-esa_sorted_to_model (ESorter *es, int row)
-{
- ESorterArray *esa = (ESorterArray *) es;
-
- g_return_val_if_fail(row >= 0, -1);
- g_return_val_if_fail(row < esa->rows, -1);
-
- if (ESA_NEEDS_SORTING(es))
- esa_sort(esa);
-
- if (esa->sorted)
- return esa->sorted[row];
- else
- return row;
-}
-
-static void
-esa_get_model_to_sorted_array (ESorter *es, int **array, int *count)
-{
- ESorterArray *esa = E_SORTER_ARRAY(es);
- if (array || count) {
- esa_backsort(esa);
-
- if (array)
- *array = esa->backsorted;
- if (count)
- *count = esa->rows;
- }
-}
-
-static void
-esa_get_sorted_to_model_array (ESorter *es, int **array, int *count)
-{
- ESorterArray *esa = E_SORTER_ARRAY(es);
- if (array || count) {
- esa_sort(esa);
-
- if (array)
- *array = esa->sorted;
- if (count)
- *count = esa->rows;
- }
-}
-
-static gboolean
-esa_needs_sorting(ESorter *es)
-{
- ESorterArray *esa = E_SORTER_ARRAY(es);
- return esa->compare != NULL;
-}
-
-void
-e_sorter_array_clean(ESorterArray *esa)
-{
- g_free(esa->sorted);
- esa->sorted = NULL;
-
- g_free(esa->backsorted);
- esa->backsorted = NULL;
-}
-
-void
-e_sorter_array_set_count (ESorterArray *esa, int count)
-{
- e_sorter_array_clean (esa);
- esa->rows = count;
-}
-
-void
-e_sorter_array_append (ESorterArray *esa, int count)
-{
- int i;
- g_free(esa->backsorted);
- esa->backsorted = NULL;
-
- if (esa->sorted) {
- esa->sorted = g_renew(int, esa->sorted, esa->rows + count);
- for (i = 0; i < count; i++) {
- int value = esa->rows;
- size_t pos;
- e_bsearch (&value, esa->sorted, esa->rows, sizeof (int), esort_callback, esa, &pos, NULL);
- memmove (esa->sorted + pos + 1, esa->sorted + pos, sizeof (int) * (esa->rows - pos));
- esa->sorted[pos] = value;
- esa->rows ++;
- }
- } else {
- esa->rows += count;
- }
-}
-
-ESorterArray *
-e_sorter_array_construct (ESorterArray *esa,
- ECompareRowsFunc compare,
- gpointer closure)
-{
- esa->compare = compare;
- esa->closure = closure;
- return esa;
-}
-
-ESorterArray *
-e_sorter_array_new (ECompareRowsFunc compare, gpointer closure)
-{
- ESorterArray *esa = gtk_type_new (E_SORTER_ARRAY_TYPE);
-
- return e_sorter_array_construct (esa, compare, closure);
-}
-
-static void
-esa_destroy (GtkObject *object)
-{
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
-esa_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- switch (arg_id) {
- default:
- break;
- }
-}
-
-static void
-esa_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- switch (arg_id) {
- }
-}
-
-static void
-esa_class_init (ESorterArrayClass *klass)
-{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);
- ESorterClass *sorter_class = E_SORTER_CLASS(klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = esa_destroy;
- object_class->set_arg = esa_set_arg;
- object_class->get_arg = esa_get_arg;
-
- sorter_class->model_to_sorted = esa_model_to_sorted ;
- sorter_class->sorted_to_model = esa_sorted_to_model ;
- sorter_class->get_model_to_sorted_array = esa_get_model_to_sorted_array ;
- sorter_class->get_sorted_to_model_array = esa_get_sorted_to_model_array ;
- sorter_class->needs_sorting = esa_needs_sorting ;
-}
-
-static void
-esa_init (ESorterArray *esa)
-{
- esa->rows = 0;
- esa->compare = NULL;
- esa->closure = NULL;
- esa->sorted = NULL;
- esa->backsorted = NULL;
-}
-
-E_MAKE_TYPE(e_sorter_array, "ESorterArray", ESorterArray, esa_class_init, esa_init, PARENT_TYPE);
diff --git a/e-util/e-sorter-array.h b/e-util/e-sorter-array.h
deleted file mode 100644
index 7f876e4148..0000000000
--- a/e-util/e-sorter-array.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_SORTER_ARRAY_H_
-#define _E_SORTER_ARRAY_H_
-
-#include <gtk/gtkobject.h>
-#include <gal/util/e-sorter.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-
-BEGIN_GNOME_DECLS
-
-#define E_SORTER_ARRAY_TYPE (e_sorter_array_get_type ())
-#define E_SORTER_ARRAY(o) (GTK_CHECK_CAST ((o), E_SORTER_ARRAY_TYPE, ESorterArray))
-#define E_SORTER_ARRAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SORTER_ARRAY_TYPE, ESorterArrayClass))
-#define E_IS_SORTER_ARRAY(o) (GTK_CHECK_TYPE ((o), E_SORTER_ARRAY_TYPE))
-#define E_IS_SORTER_ARRAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SORTER_ARRAY_TYPE))
-
-#ifndef _E_COMPARE_ROWS_FUNC_H_
-#define _E_COMPARE_ROWS_FUNC_H_
-typedef int (*ECompareRowsFunc) (int row1,
- int row2,
- gpointer closure);
-#endif
-
-typedef struct {
- ESorter base;
-
- ECompareRowsFunc compare;
- gpointer closure;
-
- /* If needs_sorting is 0, then model_to_sorted and sorted_to_model are no-ops. */
- int *sorted;
- int *backsorted;
-
- int rows;
-} ESorterArray;
-
-typedef struct {
- ESorterClass parent_class;
-} ESorterArrayClass;
-
-GtkType e_sorter_array_get_type (void);
-ESorterArray *e_sorter_array_construct (ESorterArray *sorter,
- ECompareRowsFunc compare,
- gpointer closure);
-ESorterArray *e_sorter_array_new (ECompareRowsFunc compare,
- gpointer closure);
-void e_sorter_array_clean (ESorterArray *esa);
-void e_sorter_array_set_count (ESorterArray *esa,
- int count);
-void e_sorter_array_append (ESorterArray *esa,
- int count);
-
-END_GNOME_DECLS
-
-#endif /* _E_SORTER_ARRAY_H_ */
diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c
deleted file mode 100644
index b6e0c000fc..0000000000
--- a/e-util/e-sorter.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * E-sorted.c: Virtual sorter class
- *
- * Author:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000,2001 Ximian, Inc.
- */
-#include <config.h>
-#include <stdlib.h>
-#include <gtk/gtksignal.h>
-#include <string.h>
-#include "gal/util/e-util.h"
-#include "e-sorter.h"
-
-#define d(x)
-
-#define PARENT_TYPE gtk_object_get_type()
-
-static GtkObjectClass *parent_class;
-
-#define ES_CLASS(es) ((ESorterClass *)((GtkObject *)(es))->klass)
-
-static gint es_model_to_sorted (ESorter *es, int row);
-static gint es_sorted_to_model (ESorter *es, int row);
-static void es_get_model_to_sorted_array (ESorter *es, int **array, int *count);
-static void es_get_sorted_to_model_array (ESorter *es, int **array, int *count);
-static gboolean es_needs_sorting(ESorter *es);
-
-static void
-es_class_init (ESorterClass *klass)
-{
- parent_class = gtk_type_class (PARENT_TYPE);
-
- klass->model_to_sorted = es_model_to_sorted;
- klass->sorted_to_model = es_sorted_to_model;
- klass->get_model_to_sorted_array = es_get_model_to_sorted_array;
- klass->get_sorted_to_model_array = es_get_sorted_to_model_array;
- klass->needs_sorting = es_needs_sorting;
-}
-
-static void
-es_init (ESorter *es)
-{
-}
-
-E_MAKE_TYPE(e_sorter, "ESorter", ESorter, es_class_init, es_init, PARENT_TYPE);
-
-ESorter *
-e_sorter_new (void)
-{
- ESorter *es = gtk_type_new (E_SORTER_TYPE);
-
- return es;
-}
-
-
-static gint
-es_model_to_sorted (ESorter *es, int row)
-{
- return row;
-}
-
-static gint
-es_sorted_to_model (ESorter *es, int row)
-{
- return row;
-}
-
-
-static void
-es_get_model_to_sorted_array (ESorter *es, int **array, int *count)
-{
-}
-
-static void
-es_get_sorted_to_model_array (ESorter *es, int **array, int *count)
-{
-}
-
-
-static gboolean
-es_needs_sorting(ESorter *es)
-{
- return FALSE;
-}
-
-gint
-e_sorter_model_to_sorted (ESorter *es, int row)
-{
- g_return_val_if_fail(es != NULL, -1);
- g_return_val_if_fail(row >= 0, -1);
-
- if (ES_CLASS(es)->model_to_sorted)
- return ES_CLASS(es)->model_to_sorted (es, row);
- else
- return -1;
-}
-
-gint
-e_sorter_sorted_to_model (ESorter *es, int row)
-{
- g_return_val_if_fail(es != NULL, -1);
- g_return_val_if_fail(row >= 0, -1);
-
- if (ES_CLASS(es)->sorted_to_model)
- return ES_CLASS(es)->sorted_to_model (es, row);
- else
- return -1;
-}
-
-
-void
-e_sorter_get_model_to_sorted_array (ESorter *es, int **array, int *count)
-{
- g_return_if_fail(es != NULL);
-
- if (ES_CLASS(es)->get_model_to_sorted_array)
- ES_CLASS(es)->get_model_to_sorted_array (es, array, count);
-}
-
-void
-e_sorter_get_sorted_to_model_array (ESorter *es, int **array, int *count)
-{
- g_return_if_fail(es != NULL);
-
- if (ES_CLASS(es)->get_sorted_to_model_array)
- ES_CLASS(es)->get_sorted_to_model_array (es, array, count);
-}
-
-
-gboolean
-e_sorter_needs_sorting(ESorter *es)
-{
- g_return_val_if_fail (es != NULL, FALSE);
-
- if (ES_CLASS(es)->needs_sorting)
- return ES_CLASS(es)->needs_sorting (es);
- else
- return FALSE;
-}
diff --git a/e-util/e-sorter.h b/e-util/e-sorter.h
deleted file mode 100644
index fa6c5bbc60..0000000000
--- a/e-util/e-sorter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_SORTER_H_
-#define _E_SORTER_H_
-
-#include <gtk/gtkobject.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_SORTER_TYPE (e_sorter_get_type ())
-#define E_SORTER(o) (GTK_CHECK_CAST ((o), E_SORTER_TYPE, ESorter))
-#define E_SORTER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SORTER_TYPE, ESorterClass))
-#define E_IS_SORTER(o) (GTK_CHECK_TYPE ((o), E_SORTER_TYPE))
-#define E_IS_SORTER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SORTER_TYPE))
-
-typedef struct {
- GtkObject base;
-} ESorter;
-
-typedef struct {
- GtkObjectClass parent_class;
- gint (*model_to_sorted) (ESorter *sorter,
- int row);
- gint (*sorted_to_model) (ESorter *sorter,
- int row);
-
- void (*get_model_to_sorted_array) (ESorter *sorter,
- int **array,
- int *count);
- void (*get_sorted_to_model_array) (ESorter *sorter,
- int **array,
- int *count);
-
- gboolean (*needs_sorting) (ESorter *sorter);
-} ESorterClass;
-
-GtkType e_sorter_get_type (void);
-ESorter *e_sorter_new (void);
-
-gint e_sorter_model_to_sorted (ESorter *sorter,
- int row);
-gint e_sorter_sorted_to_model (ESorter *sorter,
- int row);
-
-void e_sorter_get_model_to_sorted_array (ESorter *sorter,
- int **array,
- int *count);
-void e_sorter_get_sorted_to_model_array (ESorter *sorter,
- int **array,
- int *count);
-
-gboolean e_sorter_needs_sorting (ESorter *sorter);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_SORTER_H_ */
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
deleted file mode 100644
index f3077ae42f..0000000000
--- a/e-util/e-text-event-processor-emacs-like.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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 <string.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
-#include "e-text-event-processor-emacs-like.h"
-
-static void e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *card);
-static void e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass);
-static gint e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
-
-static ETextEventProcessorClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0
-};
-
-static const ETextEventProcessorCommand control_keys[26] =
-{
- { E_TEP_START_OF_LINE, E_TEP_MOVE, 0, "" }, /* a */
- { E_TEP_BACKWARD_CHARACTER, E_TEP_MOVE, 0, "" }, /* b */
- { E_TEP_SELECTION, E_TEP_COPY, 0, "" }, /* c */
- { E_TEP_FORWARD_CHARACTER, E_TEP_DELETE, 0, "" }, /* d */
- { E_TEP_END_OF_LINE, E_TEP_MOVE, 0, "" }, /* e */
- { E_TEP_FORWARD_CHARACTER, E_TEP_MOVE, 0, "" }, /* f */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* g */
- { E_TEP_BACKWARD_CHARACTER, E_TEP_DELETE, 0, "" }, /* h */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* i */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* j */
- { E_TEP_END_OF_LINE, E_TEP_DELETE, 0, "" }, /* k */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* l */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* m */
- { E_TEP_FORWARD_LINE, E_TEP_MOVE, 0, "" }, /* n */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* o */
- { E_TEP_BACKWARD_LINE, E_TEP_MOVE, 0, "" }, /* p */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* q */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* r */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* s */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */
- { E_TEP_START_OF_LINE, E_TEP_DELETE, 0, "" }, /* u */
- { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* v */
- { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* w */
- { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* x */
- { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* y */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */
-};
-
-static const ETextEventProcessorCommand alt_keys[26] =
-{
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* a */
- { E_TEP_BACKWARD_WORD, E_TEP_MOVE, 0, "" }, /* b */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* c */
- { E_TEP_FORWARD_WORD, E_TEP_DELETE, 0, "" }, /* d */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* e */
- { E_TEP_FORWARD_WORD, E_TEP_MOVE, 0, "" }, /* f */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* g */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* h */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* i */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* j */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* k */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* l */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* m */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* n */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* o */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* p */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* q */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* r */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* s */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* u */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* v */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* w */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* x */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* y */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */
-
-};
-
-GtkType
-e_text_event_processor_emacs_like_get_type (void)
-{
- static GtkType text_event_processor_emacs_like_type = 0;
-
- if (!text_event_processor_emacs_like_type)
- {
- static const GtkTypeInfo text_event_processor_emacs_like_info =
- {
- "ETextEventProcessorEmacsLike",
- sizeof (ETextEventProcessorEmacsLike),
- sizeof (ETextEventProcessorEmacsLikeClass),
- (GtkClassInitFunc) e_text_event_processor_emacs_like_class_init,
- (GtkObjectInitFunc) e_text_event_processor_emacs_like_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- text_event_processor_emacs_like_type = gtk_type_unique (e_text_event_processor_get_type (), &text_event_processor_emacs_like_info);
- }
-
- return text_event_processor_emacs_like_type;
-}
-
-static void
-e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass)
-{
- GtkObjectClass *object_class;
- ETextEventProcessorClass *processor_class;
-
- object_class = (GtkObjectClass*) klass;
- processor_class = (ETextEventProcessorClass*) klass;
-
- parent_class = gtk_type_class (e_text_event_processor_get_type ());
-
- processor_class->event = e_text_event_processor_emacs_like_event;
-}
-
-static void
-e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *tep)
-{
-}
-
-static gint
-e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event)
-{
- ETextEventProcessorCommand command;
- ETextEventProcessorEmacsLike *tep_el = E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(tep);
- command.action = E_TEP_NOP;
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- if (event->button.button == 1) {
- command.action = E_TEP_GRAB;
- command.time = event->button.time;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
- if (event->button.state & GDK_SHIFT_MASK)
- command.action = E_TEP_SELECT;
- else
- command.action = E_TEP_MOVE;
- command.position = E_TEP_VALUE;
- command.value = event->button.position;
- command.time = event->button.time;
- tep_el->mouse_down = TRUE;
- }
- break;
- case GDK_2BUTTON_PRESS:
- if (event->button.button == 1) {
- command.action = E_TEP_SELECT;
- command.position = E_TEP_SELECT_WORD;
- command.time = event->button.time;
- }
- break;
- case GDK_3BUTTON_PRESS:
- if (event->button.button == 1) {
- command.action = E_TEP_SELECT;
- command.position = E_TEP_SELECT_ALL;
- command.time = event->button.time;
- }
- break;
- case GDK_BUTTON_RELEASE:
- if (event->button.button == 1) {
- command.action = E_TEP_UNGRAB;
- command.time = event->button.time;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
- command.time = event->button.time;
- tep_el->mouse_down = FALSE;
- command.action = E_TEP_NOP;
- } else if (event->button.button == 2) {
- command.action = E_TEP_MOVE;
- command.position = E_TEP_VALUE;
- command.value = event->button.position;
- command.time = event->button.time;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-
- command.action = E_TEP_GET_SELECTION;
- command.position = E_TEP_SELECTION;
- command.value = 0;
- command.time = event->button.time;
- }
- break;
- case GDK_MOTION_NOTIFY:
- if (tep_el->mouse_down) {
- command.action = E_TEP_SELECT;
- command.position = E_TEP_VALUE;
- command.time = event->motion.time;
- command.value = event->motion.position;
- }
- break;
- case GDK_KEY_PRESS:
- {
- ETextEventProcessorEventKey key = event->key;
- command.time = event->key.time;
- if (key.state & GDK_SHIFT_MASK)
- command.action = E_TEP_SELECT;
- else
- command.action = E_TEP_MOVE;
- switch(key.keyval) {
- case GDK_Home:
- case GDK_KP_Home:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_START_OF_BUFFER;
- else
- command.position = E_TEP_START_OF_LINE;
- break;
- case GDK_End:
- case GDK_KP_End:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_END_OF_BUFFER;
- else
- command.position = E_TEP_END_OF_LINE;
- break;
- case GDK_Page_Up:
- case GDK_KP_Page_Up: command.position = E_TEP_BACKWARD_PAGE; break;
-
- case GDK_Page_Down:
- case GDK_KP_Page_Down: command.position = E_TEP_FORWARD_PAGE; break;
- /* CUA has Ctrl-Up/Ctrl-Down as paragraph up down */
- case GDK_Up:
- case GDK_KP_Up: command.position = E_TEP_BACKWARD_LINE; break;
-
- case GDK_Down:
- case GDK_KP_Down: command.position = E_TEP_FORWARD_LINE; break;
-
- case GDK_Left:
- case GDK_KP_Left:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_BACKWARD_WORD;
- else
- command.position = E_TEP_BACKWARD_CHARACTER;
- break;
- case GDK_Right:
- case GDK_KP_Right:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_FORWARD_WORD;
- else
- command.position = E_TEP_FORWARD_CHARACTER;
- break;
-
- case GDK_BackSpace:
- command.action = E_TEP_DELETE;
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_BACKWARD_WORD;
- else
- command.position = E_TEP_BACKWARD_CHARACTER;
- break;
- case GDK_Clear:
- command.action = E_TEP_DELETE;
- command.position = E_TEP_END_OF_LINE;
- break;
- case GDK_Insert:
- case GDK_KP_Insert:
- if (key.state & GDK_SHIFT_MASK) {
- command.action = E_TEP_PASTE;
- command.position = E_TEP_SELECTION;
- } else if (key.state & GDK_CONTROL_MASK) {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- } else {
- /* gtk_toggle_insert(text) -- IMPLEMENT -- FIXME */
- }
- break;
- case GDK_Delete:
- case GDK_KP_Delete:
- if (key.state & GDK_CONTROL_MASK){
- command.action = E_TEP_DELETE;
- command.position = E_TEP_FORWARD_WORD;
- } else if (key.state & GDK_SHIFT_MASK) {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-
- command.action = E_TEP_DELETE;
- command.position = E_TEP_SELECTION;
- } else {
- command.action = E_TEP_DELETE;
- command.position = E_TEP_FORWARD_CHARACTER;
- }
- break;
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
- case GDK_3270_BackTab:
- /* Don't insert literally */
- command.action = E_TEP_NOP;
- command.position = E_TEP_SELECTION;
- break;
- case GDK_Return:
- case GDK_KP_Enter:
- if (tep->allow_newlines) {
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "\n";
- } else {
- command.action = E_TEP_ACTIVATE;
- command.position = E_TEP_SELECTION;
- }
- break;
- case GDK_Escape:
- /* Don't insert literally */
- command.action = E_TEP_NOP;
- command.position = E_TEP_SELECTION;
- break;
-
- case GDK_KP_Space:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = " ";
- break;
- case GDK_KP_Equal:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "=";
- break;
- case GDK_KP_Multiply:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "*";
- break;
- case GDK_KP_Add:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "+";
- break;
- case GDK_KP_Subtract:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "-";
- break;
- case GDK_KP_Decimal:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = ".";
- break;
- case GDK_KP_Divide:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "/";
- break;
- case GDK_KP_0:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "0";
- break;
- case GDK_KP_1:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "1";
- break;
- case GDK_KP_2:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "2";
- break;
- case GDK_KP_3:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "3";
- break;
- case GDK_KP_4:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "4";
- break;
- case GDK_KP_5:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "5";
- break;
- case GDK_KP_6:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "6";
- break;
- case GDK_KP_7:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "7";
- break;
- case GDK_KP_8:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "8";
- break;
- case GDK_KP_9:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "9";
- break;
-
- default:
- if (key.state & GDK_CONTROL_MASK) {
- if ((key.keyval >= 'A') && (key.keyval <= 'Z'))
- key.keyval -= 'A' - 'a';
-
- if ((key.keyval >= 'a') && (key.keyval <= 'z')) {
- command.position = control_keys[(int) (key.keyval - 'a')].position;
- if (control_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE)
- command.action = control_keys[(int) (key.keyval - 'a')].action;
- command.value = control_keys[(int) (key.keyval - 'a')].value;
- command.string = control_keys[(int) (key.keyval - 'a')].string;
- }
-
- if (key.keyval == 'x' || key.keyval == 'w') {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-
- command.action = E_TEP_DELETE;
- command.position = E_TEP_SELECTION;
- }
-
- break;
- } else if (key.state & GDK_MOD1_MASK) {
- if ((key.keyval >= 'A') && (key.keyval <= 'Z'))
- key.keyval -= 'A' - 'a';
-
- if ((key.keyval >= 'a') && (key.keyval <= 'z')) {
- command.position = alt_keys[(int) (key.keyval - 'a')].position;
- if (alt_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE)
- command.action = alt_keys[(int) (key.keyval - 'a')].action;
- command.value = alt_keys[(int) (key.keyval - 'a')].value;
- command.string = alt_keys[(int) (key.keyval - 'a')].string;
- }
- } else if (key.length > 0) {
- if (key.keyval >= GDK_KP_0 && key.keyval <= GDK_KP_9) {
- key.keyval = '0';
- key.string = "0";
- }
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = strlen(key.string);
- command.string = key.string;
-
- } else {
- command.action = E_TEP_NOP;
- }
- }
- break;
- case GDK_KEY_RELEASE:
- command.time = event->key.time;
- command.action = E_TEP_NOP;
- break;
- default:
- command.action = E_TEP_NOP;
- break;
- }
- }
- if (command.action != E_TEP_NOP) {
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
- return 1;
- }
- else
- return 0;
-}
-
-ETextEventProcessor *
-e_text_event_processor_emacs_like_new (void)
-{
- ETextEventProcessorEmacsLike *retval = gtk_type_new (e_text_event_processor_emacs_like_get_type ());
- return E_TEXT_EVENT_PROCESSOR (retval);
-}
-
diff --git a/e-util/e-text-event-processor-emacs-like.h b/e-util/e-text-event-processor-emacs-like.h
deleted file mode 100644
index 7d1f0e68d2..0000000000
--- a/e-util/e-text-event-processor-emacs-like.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor-emacs-like.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__
-#define __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__
-
-#include <gal/util/e-text-event-processor.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* ETextEventProcessorEmacsLike - Turns events on a text widget into commands. Uses an emacs-ish interface.
- *
- */
-
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE (e_text_event_processor_emacs_like_get_type ())
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (GTK_CHECK_CAST ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLike))
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLikeClass))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (GTK_CHECK_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
-
-
-typedef struct _ETextEventProcessorEmacsLike ETextEventProcessorEmacsLike;
-typedef struct _ETextEventProcessorEmacsLikeClass ETextEventProcessorEmacsLikeClass;
-
-struct _ETextEventProcessorEmacsLike
-{
- ETextEventProcessor parent;
-
- /* object specific fields */
- guint mouse_down : 1;
-};
-
-struct _ETextEventProcessorEmacsLikeClass
-{
- ETextEventProcessorClass parent_class;
-};
-
-
-GtkType e_text_event_processor_emacs_like_get_type (void);
-ETextEventProcessor *e_text_event_processor_emacs_like_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__ */
diff --git a/e-util/e-text-event-processor-types.h b/e-util/e-text-event-processor-types.h
deleted file mode 100644
index 1e012cdf1a..0000000000
--- a/e-util/e-text-event-processor-types.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-#define __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gdk/gdktypes.h>
-
-typedef union _ETextEventProcessorEvent ETextEventProcessorEvent;
-
-typedef enum {
- E_TEP_VALUE,
- E_TEP_SELECTION,
-
- E_TEP_START_OF_BUFFER,
- E_TEP_END_OF_BUFFER,
-
- E_TEP_START_OF_LINE,
- E_TEP_END_OF_LINE,
-
- E_TEP_FORWARD_CHARACTER,
- E_TEP_BACKWARD_CHARACTER,
-
- E_TEP_FORWARD_WORD,
- E_TEP_BACKWARD_WORD,
-
- E_TEP_FORWARD_LINE,
- E_TEP_BACKWARD_LINE,
-
- E_TEP_FORWARD_PARAGRAPH,
- E_TEP_BACKWARD_PARAGRAPH,
-
- E_TEP_FORWARD_PAGE,
- E_TEP_BACKWARD_PAGE,
-
- E_TEP_SELECT_WORD,
- E_TEP_SELECT_ALL
-
-} ETextEventProcessorCommandPosition;
-
-typedef enum {
- E_TEP_MOVE,
- E_TEP_SELECT,
- E_TEP_DELETE,
- E_TEP_INSERT,
-
- E_TEP_COPY,
- E_TEP_PASTE,
- E_TEP_GET_SELECTION,
- E_TEP_SET_SELECT_BY_WORD,
- E_TEP_ACTIVATE,
-
- E_TEP_GRAB,
- E_TEP_UNGRAB,
-
- E_TEP_NOP
-} ETextEventProcessorCommandAction;
-
-typedef struct {
- ETextEventProcessorCommandPosition position;
- ETextEventProcessorCommandAction action;
- int value;
- char *string;
- guint32 time;
-} ETextEventProcessorCommand;
-
-typedef struct {
- GdkEventType type;
- guint32 time;
- guint state;
- guint button;
- gint position;
-} ETextEventProcessorEventButton;
-
-typedef struct {
- GdkEventType type;
- guint32 time;
- guint state;
- guint keyval;
- gint length;
- gchar *string;
-} ETextEventProcessorEventKey;
-
-typedef struct {
- GdkEventType type;
- guint32 time;
- guint state;
- gint position;
-} ETextEventProcessorEventMotion;
-
-union _ETextEventProcessorEvent {
- GdkEventType type;
- ETextEventProcessorEventButton button;
- ETextEventProcessorEventKey key;
- ETextEventProcessorEventMotion motion;
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_TEXT_EVENT_PROCESSOR_TYPES_H__ */
diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c
deleted file mode 100644
index 6449b23463..0000000000
--- a/e-util/e-text-event-processor.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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-text-event-processor.h"
-#include <gtk/gtksignal.h>
-
-static void e_text_event_processor_init (ETextEventProcessor *card);
-static void e_text_event_processor_class_init (ETextEventProcessorClass *klass);
-
-static void e_text_event_processor_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_text_event_processor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
-static GtkObjectClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_ALLOW_NEWLINES,
-};
-
-enum {
- E_TEP_EVENT,
- E_TEP_LAST_SIGNAL
-};
-
-static guint e_tep_signals[E_TEP_LAST_SIGNAL] = { 0 };
-
-GtkType
-e_text_event_processor_get_type (void)
-{
- static GtkType text_event_processor_type = 0;
-
- if (!text_event_processor_type)
- {
- static const GtkTypeInfo text_event_processor_info =
- {
- "ETextEventProcessor",
- sizeof (ETextEventProcessor),
- sizeof (ETextEventProcessorClass),
- (GtkClassInitFunc) e_text_event_processor_class_init,
- (GtkObjectInitFunc) e_text_event_processor_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- text_event_processor_type = gtk_type_unique (gtk_object_get_type (), &text_event_processor_info);
- }
-
- return text_event_processor_type;
-}
-
-static void
-e_text_event_processor_class_init (ETextEventProcessorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- e_tep_signals[E_TEP_EVENT] =
- gtk_signal_new ("command",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ETextEventProcessorClass, command),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_tep_signals, E_TEP_LAST_SIGNAL);
-
- gtk_object_add_arg_type ("ETextEventProcessor::allow_newlines", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_ALLOW_NEWLINES);
-
- klass->event = NULL;
- klass->command = NULL;
-
- object_class->set_arg = e_text_event_processor_set_arg;
- object_class->get_arg = e_text_event_processor_get_arg;
-}
-
-static void
-e_text_event_processor_init (ETextEventProcessor *tep)
-{
- tep->allow_newlines = TRUE;
-}
-
-gint
-e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event)
-{
- if (E_TEXT_EVENT_PROCESSOR_CLASS(GTK_OBJECT(tep)->klass)->event) {
- return E_TEXT_EVENT_PROCESSOR_CLASS(GTK_OBJECT(tep)->klass)->event(tep, event);
- } else {
- return 0;
- }
-}
-
-/* Set_arg handler for the text item */
-static void
-e_text_event_processor_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ETextEventProcessor *tep = E_TEXT_EVENT_PROCESSOR (object);
-
- switch (arg_id) {
- case ARG_ALLOW_NEWLINES:
- tep->allow_newlines = GTK_VALUE_BOOL (*arg);
- break;
- default:
- return;
- }
-}
-
-/* Get_arg handler for the text item */
-static void
-e_text_event_processor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ETextEventProcessor *tep = E_TEXT_EVENT_PROCESSOR (object);
-
- switch (arg_id) {
- case ARG_ALLOW_NEWLINES:
- GTK_VALUE_BOOL (*arg) = tep->allow_newlines;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h
deleted file mode 100644
index 00785db757..0000000000
--- a/e-util/e-text-event-processor.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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_TEXT_EVENT_PROCESSOR_H__
-#define __E_TEXT_EVENT_PROCESSOR_H__
-
-#include <glib.h>
-#include <gtk/gtkobject.h>
-#include <gal/util/e-text-event-processor-types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* ETextEventProcessor - Turns events on a text widget into commands.
- *
- */
-
-#define E_TEXT_EVENT_PROCESSOR_TYPE (e_text_event_processor_get_type ())
-#define E_TEXT_EVENT_PROCESSOR(obj) (GTK_CHECK_CAST ((obj), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessor))
-#define E_TEXT_EVENT_PROCESSOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass))
-#define E_IS_TEXT_EVENT_PROCESSOR(obj) (GTK_CHECK_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-
-
-typedef struct _ETextEventProcessor ETextEventProcessor;
-typedef struct _ETextEventProcessorClass ETextEventProcessorClass;
-
-struct _ETextEventProcessor
-{
- GtkObject parent;
-
- /* object specific fields */
- guint allow_newlines : 1;
-};
-
-struct _ETextEventProcessorClass
-{
- GtkObjectClass parent_class;
-
- /* signals */
- void (* command) (ETextEventProcessor *tep, ETextEventProcessorCommand *command);
-
- /* virtual functions */
- gint (* event) (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
-};
-
-
-GtkType e_text_event_processor_get_type (void);
-gint e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_TEXT_EVENT_PROCESSOR_H__ */
diff --git a/e-util/e-time-utils.c b/e-util/e-time-utils.c
deleted file mode 100644
index 64392de6ca..0000000000
--- a/e-util/e-time-utils.c
+++ /dev/null
@@ -1,406 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Time utility functions
- *
- * Author:
- * Damon Chaplin (damon@ximian.com)
- *
- * (C) 2001 Ximian, Inc.
- */
-
-#include <config.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 <string.h>
-#include <ctype.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-time-utils.h"
-
-
-/* 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;
-}
-
-
-/* Takes a number of format strings for strptime() and attempts to parse a
- * string with them.
- */
-static ETimeParseStatus
-parse_with_strptime (const char *value, struct tm *result, const char **formats, int n_formats)
-{
- const char *parse_end = NULL, *pos;
- gboolean parsed = FALSE;
- int i;
-
- if (string_is_empty (value)) {
- memset (result, 0, sizeof (*result));
- result->tm_isdst = -1;
- return E_TIME_PARSE_NONE;
- }
-
- pos = value;
-
- /* Skip whitespace */
- while (isspace (*pos))
- pos++;
-
- /* Try each of the formats in turn */
-
- for (i = 0; i < n_formats; i++) {
- memset (result, 0, sizeof (*result));
- parse_end = strptime (pos, formats[i], result);
- if (parse_end) {
- parsed = TRUE;
- break;
- }
- }
-
- result->tm_isdst = -1;
-
- /* If we parsed something, make sure we parsed the entire string. */
- if (parsed) {
- /* Skip whitespace */
- while (isspace (*parse_end))
- parse_end++;
-
- if (*parse_end == '\0')
- return E_TIME_PARSE_OK;
- }
-
- return E_TIME_PARSE_INVALID;
-}
-
-
-/* Returns TRUE if the locale has 'am' and 'pm' strings defined, in which
- case the user can choose between 12 and 24-hour time formats. */
-static gboolean
-locale_supports_12_hour_format (void)
-{
- struct tm tmp_tm = { 0 };
- char s[16];
-
- strftime (s, sizeof (s), "%p", &tmp_tm);
- return s[0] != '\0';
-}
-
-
-/*
- * Parses a string containing a date and a time. The date is expected to be
- * in a format something like "Wed 3/13/00 14:20:00", though we use gettext
- * to support the appropriate local formats and we try to accept slightly
- * different formats, e.g. the weekday can be skipped and we can accept 12-hour
- * formats with an am/pm string.
- *
- * Returns E_TIME_PARSE_OK if it could not be parsed, E_TIME_PARSE_NONE if it
- * was empty, or E_TIME_PARSE_INVALID if it couldn't be parsed.
- */
-ETimeParseStatus
-e_time_parse_date_and_time (const char *value,
- struct tm *result)
-{
- struct tm *today_tm;
- time_t t;
- const char *format[16];
- int num_formats = 0;
- gboolean use_12_hour_formats = locale_supports_12_hour_format ();
- ETimeParseStatus status;
-
- if (string_is_empty (value)) {
- memset (result, 0, sizeof (*result));
- result->tm_isdst = -1;
- return E_TIME_PARSE_NONE;
- }
-
- /* We'll parse the whole date and time in one go, otherwise we get
- into i18n problems. We attempt to parse with several formats,
- longest first. Note that we only use the '%p' specifier if the
- locale actually has 'am' and 'pm' strings defined, otherwise we
- will get incorrect results. Note also that we try to use exactly
- the same strings as in e_time_format_date_and_time(), to try to
- avoid i18n problems. We also use cut-down versions, so users don't
- have to type in the weekday or the seconds, for example.
- Note that all these formats include the full date, and the time
- will be set to 00:00:00 before parsing, so we don't need to worry
- about filling in any missing fields after parsing. */
-
- /*
- * Try the full times, with the weekday. Then try without seconds,
- * and without minutes, and finally with no time at all.
- */
- if (use_12_hour_formats) {
- /* strptime format of a weekday, a date and a time,
- in 12-hour format. */
- format[num_formats++] = _("%a %m/%d/%Y %I:%M:%S %p");
- }
-
- /* strptime format of a weekday, a date and a time,
- in 24-hour format. */
- format[num_formats++] = _("%a %m/%d/%Y %H:%M:%S");
-
- if (use_12_hour_formats) {
- /* strptime format of a weekday, a date and a time,
- in 12-hour format, without seconds. */
- format[num_formats++] = _("%a %m/%d/%Y %I:%M %p");
- }
-
- /* strptime format of a weekday, a date and a time,
- in 24-hour format, without seconds. */
- format[num_formats++] = _("%a %m/%d/%Y %H:%M");
-
- if (use_12_hour_formats) {
- /* strptime format of a weekday, a date and a time,
- in 12-hour format, without minutes or seconds. */
- format[num_formats++] = _("%a %m/%d/%Y %I %p");
- }
-
- /* strptime format of a weekday, a date and a time,
- in 24-hour format, without minutes or seconds. */
- format[num_formats++] = _("%a %m/%d/%Y %H");
-
- /* strptime format of a weekday and a date. */
- format[num_formats++] = _("%a %m/%d/%Y");
-
-
- /*
- * Now try all the above formats again, but without the weekday.
- */
- if (use_12_hour_formats) {
- /* strptime format of a date and a time, in 12-hour format. */
- format[num_formats++] = _("%m/%d/%Y %I:%M:%S %p");
- }
-
- /* strptime format of a date and a time, in 24-hour format. */
- format[num_formats++] = _("%m/%d/%Y %H:%M:%S");
-
- if (use_12_hour_formats) {
- /* strptime format of a date and a time, in 12-hour format,
- without seconds. */
- format[num_formats++] = _("%m/%d/%Y %I:%M %p");
- }
-
- /* strptime format of a date and a time, in 24-hour format,
- without seconds. */
- format[num_formats++] = _("%m/%d/%Y %H:%M");
-
- if (use_12_hour_formats) {
- /* strptime format of a date and a time, in 12-hour format,
- without minutes or seconds. */
- format[num_formats++] = _("%m/%d/%Y %I %p");
- }
-
- /* strptime format of a date and a time, in 24-hour format,
- without minutes or seconds. */
- format[num_formats++] = _("%m/%d/%Y %H");
-
- /* strptime format of a weekday and a date. */
- format[num_formats++] = _("%m/%d/%Y");
-
-
- status = parse_with_strptime (value, result, format, num_formats);
- /* Note that we checked if it was empty already, so it is either OK
- or INVALID here. */
- if (status == E_TIME_PARSE_OK) {
- /* If a 2-digit year was used we use the current century. */
- if (result->tm_year < 0) {
- t = time (NULL);
- today_tm = localtime (&t);
-
- /* This should convert it into a value from 0 to 99. */
- result->tm_year += 1900;
-
- /* Now add on the century. */
- result->tm_year += today_tm->tm_year
- - (today_tm->tm_year % 100);
- }
- } else {
- /* Now we try to just parse a time, assuming the current day.*/
- status = e_time_parse_time (value, result);
- if (status == E_TIME_PARSE_OK) {
- /* We fill in the current day. */
- t = time (NULL);
- today_tm = localtime (&t);
- result->tm_mday = today_tm->tm_mday;
- result->tm_mon = today_tm->tm_mon;
- result->tm_year = today_tm->tm_year;
- }
- }
-
- return status;
-}
-
-/**
- * e_time_parse_date:
- * @value: A date string.
- * @result: Return value for the parsed date.
- *
- * Takes in a date string entered by the user and tries to convert it to
- * a struct tm.
- *
- * Return value: Result code indicating whether the @value was an empty
- * string, a valid date, or an invalid date.
- **/
-ETimeParseStatus
-e_time_parse_date (const char *value, struct tm *result)
-{
- const char *format[1];
-
- g_return_val_if_fail (value != NULL, E_TIME_PARSE_INVALID);
- g_return_val_if_fail (result != NULL, E_TIME_PARSE_INVALID);
-
- /* This is the preferred date format for the locale. */
- format[0] = _("%m/%d/%Y");
-
- return parse_with_strptime (value, result, format, sizeof (format) / sizeof (format[0]));
-}
-
-
-/*
- * Parses a string containing a time. It is expected to be in a format
- * something like "14:20:00", though we use gettext to support the appropriate
- * local formats and we try to accept slightly different formats, e.g. we can
- * accept 12-hour formats with an am/pm string.
- *
- * Returns E_TIME_PARSE_OK if it could not be parsed, E_TIME_PARSE_NONE if it
- * was empty, or E_TIME_PARSE_INVALID if it couldn't be parsed.
- */
-ETimeParseStatus
-e_time_parse_time (const char *value, struct tm *result)
-{
- const char *format[6];
- int num_formats = 0;
- gboolean use_12_hour_formats = locale_supports_12_hour_format ();
-
- if (use_12_hour_formats) {
- /* strptime format for a time of day, in 12-hour format. */
- format[num_formats++] = _("%I:%M:%S %p");
- }
-
- /* strptime format for a time of day, in 24-hour format. */
- format[num_formats++] = _("%H:%M:%S");
-
- if (use_12_hour_formats) {
- /* strptime format for time of day, without seconds,
- in 12-hour format. */
- format[num_formats++] = _("%I:%M %p");
- }
-
- /* strptime format for time of day, without seconds 24-hour format. */
- format[num_formats++] = _("%H:%M");
-
- if (use_12_hour_formats) {
- /* strptime format for hour and AM/PM, 12-hour format. */
- format[num_formats++] = _("%I %p");
- }
-
- /* strptime format for hour, 24-hour format. */
- format[num_formats++] = "%H";
-
- return parse_with_strptime (value, result, format, num_formats);
-}
-
-
-/* Creates a string representation of a time value and stores it in buffer.
- buffer_size should be about 64 to be safe. If show_midnight is FALSE, and
- the time is midnight, then we just show the date. If show_zero_seconds
- is FALSE, then if the time has zero seconds only the hour and minute are
- shown. */
-void
-e_time_format_date_and_time (struct tm *date_tm,
- gboolean use_24_hour_format,
- gboolean show_midnight,
- gboolean show_zero_seconds,
- char *buffer,
- int buffer_size)
-{
- char *format;
-
- if (!show_midnight && date_tm->tm_hour == 0
- && date_tm->tm_min == 0 && date_tm->tm_sec == 0) {
- /* strftime format of a weekday and a date. */
- format = _("%a %m/%d/%Y");
- } else if (use_24_hour_format) {
- if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a weekday, a date and a
- time, in 24-hour format, without seconds. */
- format = _("%a %m/%d/%Y %H:%M");
- else
- /* strftime format of a weekday, a date and a
- time, in 24-hour format. */
- format = _("%a %m/%d/%Y %H:%M:%S");
- } else {
- if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a weekday, a date and a
- time, in 12-hour format, without seconds. */
- format = _("%a %m/%d/%Y %I:%M %p");
- else
- /* strftime format of a weekday, a date and a
- time, in 12-hour format. */
- format = _("%a %m/%d/%Y %I:%M:%S %p");
- }
-
- /* strftime returns 0 if the string doesn't fit, and leaves the buffer
- undefined, so we set it to the empty string in that case. */
- if (strftime (buffer, buffer_size, format, date_tm) == 0)
- buffer[0] = '\0';
-}
-
-
-/* Creates a string representation of a time value and stores it in buffer.
- buffer_size should be about 64 to be safe. */
-void
-e_time_format_time (struct tm *date_tm,
- gboolean use_24_hour_format,
- gboolean show_zero_seconds,
- char *buffer,
- int buffer_size)
-{
- char *format;
-
- if (use_24_hour_format) {
- if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a time in 24-hour format,
- without seconds. */
- format = _("%H:%M");
- else
- /* strftime format of a time in 24-hour format. */
- format = _("%H:%M:%S");
- } else {
- if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a time in 12-hour format,
- without seconds. */
- format = _("%I:%M %p");
- else
- /* strftime format of a time in 12-hour format. */
- format = _("%I:%M:%S %p");
- }
-
- /* strftime returns 0 if the string doesn't fit, and leaves the buffer
- undefined, so we set it to the empty string in that case. */
- if (strftime (buffer, buffer_size, format, date_tm) == 0)
- buffer[0] = '\0';
-}
diff --git a/e-util/e-time-utils.h b/e-util/e-time-utils.h
deleted file mode 100644
index f6d85df5ac..0000000000
--- a/e-util/e-time-utils.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Time utility functions
- *
- * Author:
- * Damon Chaplin (damon@ximian.com)
- *
- * (C) 2001 Ximian, Inc.
- */
-
-#ifndef E_TIME_UTILS
-#define E_TIME_UTILS
-
-#include <time.h>
-#include <glib.h>
-
-typedef enum {
- E_TIME_PARSE_OK,
- E_TIME_PARSE_NONE,
- E_TIME_PARSE_INVALID
-} ETimeParseStatus;
-
-/* Tries to parse a string containing a date and time. */
-ETimeParseStatus e_time_parse_date_and_time (const char *value,
- struct tm *result);
-
-/* Tries to parse a string containing a date. */
-ETimeParseStatus e_time_parse_date (const char *value,
- struct tm *result);
-
-/* Tries to parse a string containing a time. */
-ETimeParseStatus e_time_parse_time (const char *value,
- struct tm *result);
-
-/* Turns a struct tm into a string like "Wed 3/12/00 12:00:00 AM". */
-void e_time_format_date_and_time (struct tm *date_tm,
- gboolean use_24_hour_format,
- gboolean show_midnight,
- gboolean show_zero_seconds,
- char *buffer,
- int buffer_size);
-
-/* Formats a time from a struct tm, e.g. "01:59 PM". */
-void e_time_format_time (struct tm *date_tm,
- gboolean use_24_hour_format,
- gboolean show_zero_seconds,
- char *buffer,
- int buffer_size);
-
-
-
-
-#endif /* E_TIME_UTILS */
diff --git a/e-util/e-unicode-i18n.c b/e-util/e-unicode-i18n.c
deleted file mode 100644
index 94cf05ecd9..0000000000
--- a/e-util/e-unicode-i18n.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * e-unicode-i18n.c
- *
- * Author: Zbigniew Chyla <cyba@gnome.pl>
- *
- * Copyright (C) 2001 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <gal/widgets/e-unicode.h>
-#include "e-unicode-i18n.h"
-
-static GHashTable *locale_to_utf8_hash = NULL;
-
-static const char *
-locale_to_utf8 (const char *string)
-{
- char *utf;
-
- if (locale_to_utf8_hash == NULL) {
- locale_to_utf8_hash = g_hash_table_new (&g_str_hash, &g_str_equal);
- }
-
- utf = g_hash_table_lookup (locale_to_utf8_hash, string);
- if (utf == NULL) {
- utf = e_utf8_from_locale_string (string);
- g_hash_table_insert (locale_to_utf8_hash, g_strdup (string), utf);
- }
-
- return utf;
-}
-
-const char *
-e_utf8_gettext (const char *string)
-{
- if (string == NULL) {
- return NULL;
- } else if (string[0] == '\0') {
- return "";
- } else {
- return locale_to_utf8 (gettext (string));
- }
-}
-
-const char *
-e_utf8_dgettext (const char *domain, const char *string)
-{
- if (string == NULL) {
- return NULL;
- } else if (string[0] == '\0') {
- return "";
- } else {
- return locale_to_utf8 (dgettext (domain, string));
- }
-}
diff --git a/e-util/e-unicode-i18n.h b/e-util/e-unicode-i18n.h
deleted file mode 100644
index e8281891bc..0000000000
--- a/e-util/e-unicode-i18n.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _E_UNICODE_I18N_H
-#define _E_UNICODE_I18N_H
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-
-const char *e_utf8_gettext (const char *string);
-const char *e_utf8_dgettext (const char *domain, const char *string);
-
-#undef U_
-#ifdef GNOME_EXPLICIT_TRANSLATION_DOMAIN
-# define U_(domain,string) e_utf8_dgettext (domain, string)
-#else
-# define U_(string) e_utf8_gettext (string)
-#endif
-
-#endif /* _E_UNICODE_I18N_H */
diff --git a/e-util/e-url.c b/e-util/e-url.c
deleted file mode 100644
index 496cd87981..0000000000
--- a/e-util/e-url.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-url.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.com>
- * 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 <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include "e-url.h"
-
-char *
-e_url_shroud (const char *url)
-{
- const char *first_colon = NULL;
- const char *last_at = NULL;
- const char *p;
- char *shrouded;
-
- if (url == NULL)
- return NULL;
-
- /* Skip past the moniker */
- for (p = url; *p && *p != ':'; ++p);
- if (*p)
- ++p;
-
- while (*p) {
- if (first_colon == NULL && *p == ':')
- first_colon = p;
- if (*p == '@')
- last_at = p;
- ++p;
- }
-
- if (first_colon && last_at && first_colon < last_at) {
- shrouded = g_strdup_printf ("%.*s%s", first_colon - url, url, last_at);
- } else {
- shrouded = g_strdup (url);
- }
-
- return shrouded;
-}
-
-gboolean
-e_url_equal (const char *url1, const char *url2)
-{
- char *shroud1 = e_url_shroud (url1);
- char *shroud2 = e_url_shroud (url2);
- gint len1, len2;
- gboolean rv;
-
- if (shroud1 == NULL || shroud2 == NULL) {
- rv = (shroud1 == shroud2);
- } else {
- len1 = strlen (shroud1);
- len2 = strlen (shroud2);
-
- rv = !strncmp (shroud1, shroud2, MIN (len1, len2));
- }
-
- g_free (shroud1);
- g_free (shroud2);
-
- return rv;
-}
-
-#define HEXVAL(c) (isdigit (c) ? (c) - '0' : tolower (c) - 'a' + 10)
-
-static void
-uri_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';
-}
-
-EUri *
-e_uri_new (const char *uri_string)
-{
- EUri *uri;
- const char *end, *hash, *colon, *semi, *at, *slash, *question;
- const char *p;
-
- uri = g_new0 (EUri, 1);
-
- /* find fragment */
- end = hash = strchr (uri_string, '#');
- if (hash && hash[1]) {
- uri->fragment = g_strdup (hash + 1);
- uri_decode (uri->fragment);
- }
- else
- end = uri_string + strlen (uri_string);
-
- /* find protocol: initial [a-z+.-]* substring until ":" */
- p = uri_string;
- while (p < end && (isalnum ((unsigned char) *p) ||
- *p == '.' || *p == '+' || *p == '-'))
- p++;
-
- if (p > uri_string && *p == ':') {
- uri->protocol = g_strndup (uri_string, p - uri_string);
- g_strdown (uri->protocol);
- uri_string = p + 1;
- }
-
- if (!*uri_string)
- return uri;
-
- /* check for authority */
- if (strncmp (uri_string, "//", 2) == 0) {
- uri_string += 2;
-
- slash = uri_string + strcspn (uri_string, "/#");
- at = strchr (uri_string, '@');
- if (at && at < slash) {
- colon = strchr (uri_string, ':');
- if (colon && colon < at) {
- uri->passwd = g_strndup (colon + 1, at - colon - 1);
- uri_decode (uri->passwd);
- }
- else {
- uri->passwd = NULL;
- colon = at;
- }
-
- semi = strchr (uri_string, ';');
- if (semi && semi < colon &&
- !strncasecmp (semi, ";auth=", 6)) {
- uri->authmech = g_strndup (semi + 6, colon - semi - 6);
- uri_decode (uri->authmech);
- }
- else {
- uri->authmech = NULL;
- semi = colon;
- }
-
- uri->user = g_strndup (uri_string, semi - uri_string);
- uri_decode (uri->user);
- uri_string = at + 1;
- }
- else
- uri->user = uri->passwd = uri->authmech = NULL;
-
- /* find host and port */
- colon = strchr (uri_string, ':');
- if (colon && colon < slash) {
- uri->host = g_strndup (uri_string, colon - uri_string);
- uri->port = strtoul (colon + 1, NULL, 10);
- }
- else {
- uri->host = g_strndup (uri_string, slash - uri_string);
- uri_decode (uri->host);
- uri->port = 0;
- }
-
- uri_string = slash;
- }
-
- /* find query */
- question = memchr (uri_string, '?', end - uri_string);
- if (question) {
- if (question[1]) {
- uri->query = g_strndup (question + 1, end - (question + 1));
- uri_decode (uri->query);
- }
- end = question;
- }
-
- /* find parameters */
- semi = memchr (uri_string, ';', end - uri_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));
- uri_decode (value);
- } else {
- name = g_strndup (cur, p - cur);
- value = g_strdup ("");
- }
- uri_decode (name);
- g_datalist_set_data_full (&uri->params, name,
- value, g_free);
- g_free (name);
- }
- }
- end = semi;
- }
-
- if (end != uri_string) {
- uri->path = g_strndup (uri_string, end - uri_string);
- uri_decode (uri->path);
- }
-
- return uri;
-}
-
-void
-e_uri_free (EUri *uri)
-{
- if (uri) {
- g_free (uri->protocol);
- g_free (uri->user);
- g_free (uri->authmech);
- g_free (uri->passwd);
- g_free (uri->host);
- g_free (uri->path);
- g_datalist_clear (&uri->params);
- g_free (uri->query);
- g_free (uri->fragment);
-
- g_free (uri);
- }
-}
-
-const char *
-e_uri_get_param (EUri *uri, const char *name)
-{
- return g_datalist_get_data (&uri->params, name);
-}
-
-static void
-copy_param_cb (GQuark key_id, gpointer data, gpointer user_data)
-{
- GData *params = (GData *) user_data;
-
- g_datalist_id_set_data_full (&params, key_id, g_strdup (data), g_free);
-}
-
-EUri *
-e_uri_copy (EUri *uri)
-{
- EUri *uri_copy;
-
- g_return_val_if_fail (uri != NULL, NULL);
-
- uri_copy = g_new0 (EUri, 1);
- uri_copy->protocol = g_strdup (uri->protocol);
- uri_copy->user = g_strdup (uri->user);
- uri_copy->authmech = g_strdup (uri->authmech);
- uri_copy->passwd = g_strdup (uri->passwd);
- uri_copy->host = g_strdup (uri->host);
- uri_copy->port = uri->port;
- uri_copy->path = g_strdup (uri->path);
- uri_copy->query = g_strdup (uri->query);
- uri_copy->fragment = g_strdup (uri->fragment);
-
- /* copy uri->params */
- g_datalist_foreach (&uri->params,
- (GDataForeachFunc) copy_param_cb,
- &uri_copy->params);
-
- return uri_copy;
-}
-
-char *
-e_uri_to_string (EUri *uri, gboolean show_password)
-{
- char *str_uri = NULL;
-
- g_return_val_if_fail (uri != NULL, NULL);
-
- if (uri->port != 0)
- str_uri = g_strdup_printf (
- "%s://%s%s%s%s%s%s%s:%d%s%s%s",
- uri->protocol,
- uri->user ? uri->user : "",
- uri->authmech ? ";auth=" : "",
- uri->authmech ? uri->authmech : "",
- uri->passwd && show_password ? ":" : "",
- uri->passwd && show_password ? uri->passwd : "",
- uri->user ? "@" : "",
- uri->host,
- uri->port,
- uri->path ? uri->path : "",
- uri->query ? "?" : "",
- uri->query ? uri->query : "");
- else
- str_uri = g_strdup_printf(
- "%s://%s%s%s%s%s%s%s%s%s%s",
- uri->protocol,
- uri->user ? uri->user : "",
- uri->authmech ? ";auth=" : "",
- uri->authmech ? uri->authmech : "",
- uri->passwd && show_password ? ":" : "",
- uri->passwd && show_password ? uri->passwd : "",
- uri->user ? "@" : "",
- uri->host,
- uri->path ? uri->path : "",
- uri->query ? "?" : "",
- uri->query ? uri->query : "");
-
- return str_uri;
-}
diff --git a/e-util/e-url.h b/e-util/e-url.h
deleted file mode 100644
index d776bb4b08..0000000000
--- a/e-util/e-url.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-url.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.com>
- * 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 __E_URL_H__
-#define __E_URL_H__
-
-#include <gtk/gtk.h>
-
-char *e_url_shroud (const char *url);
-gboolean e_url_equal (const char *url1, const char *url2);
-
-typedef struct {
- char *protocol;
- char *user;
- char *authmech;
- char *passwd;
- char *host;
- int port;
- char *path;
- GData *params;
- char *query;
- char *fragment;
-} EUri;
-
-EUri *e_uri_new (const char *uri_string);
-void e_uri_free (EUri *uri);
-const char *e_uri_get_param (EUri *uri, const char *name);
-EUri *e_uri_copy (EUri *uri);
-char *e_uri_to_string (EUri *uri, gboolean show_password);
-
-#endif /* __E_URL_H__ */
-
diff --git a/e-util/e-util.c b/e-util/e-util.c
deleted file mode 100644
index d3479a6661..0000000000
--- a/e-util/e-util.c
+++ /dev/null
@@ -1,1180 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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 <glib.h>
-#include <gtk/gtkobject.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include "e-util.h"
-#if 0
-#include <libgnomevfs/gnome-vfs.h>
-#endif
-
-int
-g_str_compare(const void *x, const void *y)
-{
- if (x == NULL || y == NULL) {
- if (x == y)
- return 0;
- else
- return x ? -1 : 1;
- }
-
- return strcmp(x, y);
-}
-
-int
-g_int_compare(const void *x, const void *y)
-{
- if ( GPOINTER_TO_INT(x) < GPOINTER_TO_INT(y) )
- return -1;
- else if ( GPOINTER_TO_INT(x) == GPOINTER_TO_INT(y) )
- return 0;
- else
- return 1;
-}
-
-char *
-e_strdup_strip(const char *string)
-{
- int i;
- int length = 0;
- int initial = 0;
- for ( i = 0; string[i]; i++ ) {
- if (initial == i && isspace((unsigned char) string[i])) {
- initial ++;
- }
- if (!isspace((unsigned char) string[i])) {
- length = i - initial + 1;
- }
- }
- return g_strndup(string + initial, length);
-}
-
-void
-e_free_object_list (GList *list)
-{
- GList *p;
-
- for (p = list; p != NULL; p = p->next)
- gtk_object_unref (GTK_OBJECT (p->data));
-
- g_list_free (list);
-}
-
-void
-e_free_object_slist (GSList *list)
-{
- GSList *p;
-
- for (p = list; p != NULL; p = p->next)
- gtk_object_unref (GTK_OBJECT (p->data));
-
- g_slist_free (list);
-}
-
-void
-e_free_string_list (GList *list)
-{
- GList *p;
-
- for (p = list; p != NULL; p = p->next)
- g_free (p->data);
-
- g_list_free (list);
-}
-
-void
-e_free_string_slist (GSList *list)
-{
- GSList *p;
-
- for (p = list; p != NULL; p = p->next)
- g_free (p->data);
- g_slist_free (list);
-}
-
-#define BUFF_SIZE 1024
-
-char *
-e_read_file(const char *filename)
-{
- int fd;
- char buffer[BUFF_SIZE];
- GList *list = NULL, *list_iterator;
- GList *lengths = NULL, *lengths_iterator;
- int length = 0;
- int bytes;
- char *ret_val;
-
- fd = open(filename, O_RDONLY);
- if (fd == -1)
- return NULL;
- bytes = read(fd, buffer, BUFF_SIZE);
- while (bytes) {
- if (bytes > 0) {
- char *temp = g_malloc(bytes);
- memcpy (temp, buffer, bytes);
- list = g_list_prepend(list, temp);
- lengths = g_list_prepend(lengths, GINT_TO_POINTER(bytes));
- length += bytes;
- } else {
- if (errno != EINTR) {
- close(fd);
- g_list_foreach(list, (GFunc) g_free, NULL);
- g_list_free(list);
- g_list_free(lengths);
- return NULL;
- }
- }
- bytes = read(fd, buffer, BUFF_SIZE);
- }
- ret_val = g_new(char, length + 1);
- ret_val[length] = 0;
- lengths_iterator = lengths;
- list_iterator = list;
- for ( ; list_iterator; list_iterator = list_iterator->next, lengths_iterator = lengths_iterator->next) {
- int this_length = GPOINTER_TO_INT(lengths_iterator->data);
- length -= this_length;
- memcpy(ret_val + length, list_iterator->data, this_length);
- }
- close(fd);
- g_list_foreach(list, (GFunc) g_free, NULL);
- g_list_free(list);
- g_list_free(lengths);
- return ret_val;
-}
-
-gint
-e_write_file(const char *filename, const char *data, int flags)
-{
- int fd;
- int length = strlen(data);
- int bytes;
- fd = open(filename, flags, 0666);
- if (fd == -1)
- return errno;
- while (length > 0) {
- bytes = write(fd, data, length);
- if (bytes > 0) {
- length -= bytes;
- data += bytes;
- } else {
- if (errno != EINTR && errno != EAGAIN) {
- int save_errno = errno;
- close(fd);
- return save_errno;
- }
- }
- }
- close(fd);
- return 0;
-}
-
-/**
- * e_mkdir_hier:
- * @path: a directory path
- * @mode: a mode, as for mkdir(2)
- *
- * This creates the named directory with the given @mode, creating
- * any necessary intermediate directories (with the same @mode).
- *
- * Return value: 0 on success, -1 on error, in which case errno will
- * be set as for mkdir(2).
- **/
-int
-e_mkdir_hier(const char *path, mode_t mode)
-{
- char *copy, *p;
-
- p = copy = g_strdup (path);
- do {
- p = strchr (p + 1, '/');
- if (p)
- *p = '\0';
- if (access (copy, F_OK) == -1) {
- if (mkdir (copy, mode) == -1) {
- g_free (copy);
- return -1;
- }
- }
- if (p)
- *p = '/';
- } while (p);
-
- g_free (copy);
- return 0;
-}
-
-#if 0
-char *
-e_read_uri(const char *uri)
-{
- GnomeVFSHandle *handle;
- GList *list = NULL, *list_iterator;
- GList *lengths = NULL, *lengths_iterator;
- gchar buffer[1025];
- gchar *ret_val;
- int length = 0;
- GnomeVFSFileSize bytes;
-
- gnome_vfs_open(&handle, uri, GNOME_VFS_OPEN_READ);
-
- gnome_vfs_read(handle, buffer, 1024, &bytes);
- while (bytes) {
- if (bytes) {
- char *temp = g_malloc(bytes);
- memcpy (temp, buffer, bytes);
- list = g_list_prepend(list, temp);
- lengths = g_list_prepend(lengths, GINT_TO_POINTER((gint) bytes));
- length += bytes;
- }
- gnome_vfs_read(handle, buffer, 1024, &bytes);
- }
-
- ret_val = g_new(char, length + 1);
- ret_val[length] = 0;
- lengths_iterator = lengths;
- list_iterator = list;
- for ( ; list_iterator; list_iterator = list_iterator->next, lengths_iterator = lengths_iterator->next) {
- int this_length = GPOINTER_TO_INT(lengths_iterator->data);
- length -= this_length;
- memcpy(ret_val + length, list_iterator->data, this_length);
- }
- gnome_vfs_close(handle);
- g_list_foreach(list, (GFunc) g_free, NULL);
- g_list_free(list);
- g_list_free(lengths);
- return ret_val;
-}
-#endif
-
-typedef gint (*GtkSignal_INT__INT_INT_POINTER) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gpointer user_data);
-
-void
-e_marshal_INT__INT_INT_POINTER (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_INT__INT_INT_POINTER rfunc;
- gint *return_val;
- return_val = GTK_RETLOC_INT (args[3]);
- rfunc = (GtkSignal_INT__INT_INT_POINTER) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- func_data);
-}
-
-typedef gint (*GtkSignal_INT__INT_POINTER_INT_POINTER) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gpointer user_data);
-
-void
-e_marshal_INT__INT_POINTER_INT_POINTER (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_INT__INT_POINTER_INT_POINTER rfunc;
- gint *return_val;
- return_val = GTK_RETLOC_INT (args[4]);
- rfunc = (GtkSignal_INT__INT_POINTER_INT_POINTER) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- func_data);
-}
-
-typedef void (*GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object,
- GtkObject *arg1,
- gdouble arg2,
- gdouble arg3,
- gboolean arg4,
- gpointer user_data);
-
-void
-e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL rfunc;
- rfunc = (GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL) func;
- (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_DOUBLE (args[1]),
- GTK_VALUE_DOUBLE (args[2]),
- GTK_VALUE_BOOL (args[3]),
- func_data);
-}
-
-typedef gdouble (*GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object,
- GtkObject *arg1,
- gdouble arg2,
- gdouble arg3,
- gboolean arg4,
- gpointer user_data);
-
-void
-e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL rfunc;
- gdouble *return_val;
- return_val = GTK_RETLOC_DOUBLE (args[4]);
- rfunc = (GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_DOUBLE (args[1]),
- GTK_VALUE_DOUBLE (args[2]),
- GTK_VALUE_BOOL (args[3]),
- func_data);
-}
-
-typedef gdouble (*GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object,
- GtkObject *arg1,
- gdouble arg2,
- gdouble arg3,
- gboolean arg4,
- gpointer user_data);
-
-void
-e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL rfunc;
- gboolean *return_val;
- return_val = GTK_RETLOC_BOOL (args[4]);
- rfunc = (GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_DOUBLE (args[1]),
- GTK_VALUE_DOUBLE (args[2]),
- GTK_VALUE_BOOL (args[3]),
- func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gpointer arg4,
- gint arg5,
- gint arg6,
- gpointer user_data);
-void
-e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gpointer arg5,
- gint arg6,
- gint arg7,
- gpointer user_data);
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_POINTER (args[4]),
- GTK_VALUE_INT (args[5]), GTK_VALUE_INT (args[6]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_POINTER_INT) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gint arg4, gpointer user_data);
-void
-e_marshal_NONE__INT_INT_POINTER_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_INT_POINTER_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_POINTER_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]), GTK_VALUE_INT (args[3]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_INT) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gint arg5, gpointer user_data);
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]), GTK_VALUE_INT (args[4]), func_data);
-}
-
-typedef gboolean (*GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gint arg4,
- gint arg5,
- gint arg6,
- gpointer user_data);
-void
-e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT rfunc;
- gboolean *return_val;
- return_val = GTK_RETLOC_BOOL (args[6]);
- rfunc = (GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_INT (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_INT (args[5]), func_data);
-}
-
-typedef gboolean (*GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gint arg5,
- gint arg6,
- gint arg7,
- gpointer user_data);
-void
-e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT rfunc;
- gboolean *return_val;
- return_val = GTK_RETLOC_BOOL (args[7]);
- rfunc = (GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_INT (args[5]),
- GTK_VALUE_INT (args[6]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT) (GtkObject *
- object,
- gint arg1,
- gint arg2,
- gpointer
- arg3,
- gint arg4,
- gint arg5,
- gpointer
- arg6,
- gint arg7,
- gint arg8,
- gpointer
- user_data);
-
-void
-e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg * args)
-{
- GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_INT (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_POINTER (args[5]),
- GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT) (GtkObject *
- object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gint arg5,
- gint arg6,
- gpointer arg7,
- gint arg8,
- gint arg9,
- gpointer user_data);
-
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_INT (args[5]),
- GTK_VALUE_POINTER (args[6]),
- GTK_VALUE_INT (args[7]), GTK_VALUE_INT (args[8]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__POINTER_POINTER_INT) (GtkObject *, gpointer,
- gpointer, gint, gpointer);
-
-void
-e_marshal_NONE__POINTER_POINTER_INT (GtkObject * object, GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__POINTER_POINTER_INT rfunc;
- rfunc = (GtkSignal_NONE__POINTER_POINTER_INT) func;
- (*rfunc) (object, GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER) (GtkObject *, gint, gpointer,
- gint, gpointer, gpointer);
-
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER (GtkObject * object, GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER) func;
- (*rfunc) (object, GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]), GTK_VALUE_POINTER (args[3]), func_data);
-}
-
-typedef int (*GtkSignal_INT__POINTER_POINTER) (GtkObject *,
- gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[2]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- func_data);
-}
-
-typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER) (GtkObject *,
- gpointer, gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[3]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_POINTER (args[2]),
- func_data);
-}
-
-typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER_POINTER) (GtkObject *,
- gpointer, gpointer, gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER_POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[4]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_POINTER (args[3]),
- func_data);
-}
-
-
-typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER_POINTER_POINTER) (GtkObject *,
- gpointer, gpointer, gpointer, gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER_POINTER_POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER_POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[4]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_POINTER (args[3]),
- func_data);
-}
-
-
-void
-e_marshal_NONE__POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- (* (void (*)(GtkObject *, gpointer, int, int, int, gpointer)) func)
- (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_INT (args[1]),
- GTK_VALUE_INT (args[2]),
-
- GTK_VALUE_INT (args[3]),
- func_data);
-}
-
-typedef int (*GtkSignal_INT__OBJECT_POINTER) (GtkObject *,
- GtkObject *, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__OBJECT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__OBJECT_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__OBJECT_POINTER) func;
- return_val = GTK_RETLOC_INT (args[2]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- func_data);
-}
-
-gchar**
-e_strsplit (const gchar *string,
- const gchar *delimiter,
- gint max_tokens)
-{
- GSList *string_list = NULL, *slist;
- gchar **str_array, *s;
- guint i, n = 1;
-
- g_return_val_if_fail (string != NULL, NULL);
- g_return_val_if_fail (delimiter != NULL, NULL);
-
- if (max_tokens < 1)
- max_tokens = G_MAXINT;
-
- s = strstr (string, delimiter);
- if (s)
- {
- guint delimiter_len = strlen (delimiter);
-
- do
- {
- guint len;
- gchar *new_string;
-
- len = s - string;
- new_string = g_new (gchar, len + 1);
- strncpy (new_string, string, len);
- new_string[len] = 0;
- string_list = g_slist_prepend (string_list, new_string);
- n++;
- string = s + delimiter_len;
- s = strstr (string, delimiter);
- }
- while (--max_tokens && s);
- }
-
- n++;
- string_list = g_slist_prepend (string_list, g_strdup (string));
-
- str_array = g_new (gchar*, n);
-
- i = n - 1;
-
- str_array[i--] = NULL;
- for (slist = string_list; slist; slist = slist->next)
- str_array[i--] = slist->data;
-
- g_slist_free (string_list);
-
- return str_array;
-}
-
-gchar *
-e_strstrcase (const gchar *haystack, const gchar *needle)
-{
- /* find the needle in the haystack neglecting case */
- const gchar *ptr;
- guint len;
-
- g_return_val_if_fail (haystack != NULL, NULL);
- g_return_val_if_fail (needle != NULL, NULL);
-
- len = strlen(needle);
- if (len > strlen(haystack))
- return NULL;
-
- if (len == 0)
- return (gchar *) haystack;
-
- for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
- if (!g_strncasecmp (ptr, needle, len))
- return (gchar *) ptr;
-
- return NULL;
-}
-
-void
-e_filename_make_safe (gchar *string)
-{
- gchar *p;
-
- g_return_if_fail (string != NULL);
-
- for (p = string; *p; p++) {
- if (!isprint ((unsigned char)*p) || strchr (" /'\"`&();|<>${}!", *p))
- *p = '_';
- }
-}
-
-static gint
-epow10 (gint number) {
- gint value;
-
- for (value = 1; number > 0; number --) {
- value *= 10;
- }
- return value;
-}
-
-gchar *
-e_format_number (gint number)
-{
- GList *iterator, *list = NULL;
- struct lconv *locality;
- gint char_length = 0;
- gint group_count = 0;
- guchar *grouping;
- int last_count = 3;
- int divider;
- char *value;
- char *value_iterator;
- int initial_grouping;
-
- locality = localeconv();
- grouping = locality->grouping;
- initial_grouping = *grouping;
- while (number) {
- char *group;
- switch (*grouping) {
- default:
- last_count = *grouping;
- grouping++;
- case 0:
- divider = epow10(last_count);
- if((!list && (number/divider) > 0) || number > divider) {
- group = g_strdup_printf("%0*d", initial_grouping, number % divider);
- } else {
- group = g_strdup_printf("%d", number % divider);
- }
- number /= divider;
- break;
- case CHAR_MAX:
- group = g_strdup_printf("%d", number);
- number = 0;
- break;
- }
- char_length += strlen(group);
- list = g_list_prepend(list, group);
- group_count ++;
- }
-
- if (list) {
- value = g_new(char, 1 + char_length + (group_count - 1) * strlen(locality->thousands_sep));
-
- iterator = list;
- value_iterator = value;
-
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
- for (iterator = iterator->next; iterator; iterator = iterator->next) {
- strcpy(value_iterator, locality->thousands_sep);
- value_iterator += strlen(locality->thousands_sep);
-
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
- }
- e_free_string_list (list);
- return value;
- } else {
- return g_strdup("0");
- }
-}
-
-gchar *
-e_format_number_float (gfloat number)
-{
- gint int_part;
- gint fraction;
- struct lconv *locality;
- gchar *str_intpart;
- gchar *decimal_point;
- gchar *str_fraction;
- gchar *value;
-
- locality = localeconv();
-
- int_part = (int) number;
- str_intpart = e_format_number (int_part);
-
- if (!strcmp(locality->mon_decimal_point, "")) {
- decimal_point = ".";
- }
- else {
- decimal_point = locality->mon_decimal_point;
- }
-
- fraction = (int) ((number - int_part) * 100);
-
- if (fraction == 0) {
- str_fraction = g_strdup ("00");
- }
- else {
- str_fraction = g_strdup_printf ("%02d", fraction);
- }
-
- value = g_strconcat (str_intpart, decimal_point, str_fraction, NULL);
-
- g_free (str_intpart);
- g_free (str_fraction);
-
- return value;
-}
-
-gboolean
-e_create_directory (gchar *directory)
-{
- gchar *full_name;
- gchar *position;
- gchar *current_dir = g_get_current_dir();
- struct stat info;
- gboolean return_value = TRUE;
-
- if (directory[0] == '/') {
- full_name = g_malloc0 (strlen (directory) + 1);
- strcpy (full_name, directory);
- } else {
- full_name = g_malloc0 (strlen (directory) + strlen (current_dir) + 2);
- sprintf (full_name, "%s/%s", current_dir, directory);
- }
-
- if ((position = strrchr (full_name, '/')) == full_name) {
- if (stat (full_name, &info)) {
- switch (errno) {
- case ENOENT:
- if (mkdir (full_name, 0777)) {
- switch (errno) {
- default:
- return_value = FALSE;
- break;
- }
- }
- break;
- default:
- return_value = FALSE;
- break;
- }
- }
- } else {
- *position = 0;
- e_create_directory (full_name);
- *position = '/';
- if (stat (full_name, &info)) {
- switch (errno) {
- case ENOENT:
- if (mkdir (full_name, 0777)) {
- switch (errno) {
- default:
- return_value = FALSE;
- break;
- }
- }
- break;
- default:
- return_value = FALSE;
- break;
- }
- }
- }
-
- g_free (current_dir);
- g_free (full_name);
-
- return (return_value);
-}
-
-
-/* Perform a binary search for key in base which has nmemb elements
- of size bytes each. The comparisons are done by (*compare)(). */
-void e_bsearch (const void *key,
- const void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure,
- size_t *start,
- size_t *end)
-{
- size_t l, u, idx;
- const void *p;
- int comparison;
- if (!(start || end))
- return;
-
- l = 0;
- u = nmemb;
- while (l < u) {
- idx = (l + u) / 2;
- p = (void *) (((const char *) base) + (idx * size));
- comparison = (*compare) (key, p, closure);
- if (comparison < 0)
- u = idx;
- else if (comparison > 0)
- l = idx + 1;
- else {
- size_t lsave, usave;
- lsave = l;
- usave = u;
- if (start) {
- while (l < u) {
- idx = (l + u) / 2;
- p = (void *) (((const char *) base) + (idx * size));
- comparison = (*compare) (key, p, closure);
- if (comparison <= 0)
- u = idx;
- else
- l = idx + 1;
- }
- *start = l;
-
- l = lsave;
- u = usave;
- }
- if (end) {
- while (l < u) {
- idx = (l + u) / 2;
- p = (void *) (((const char *) base) + (idx * size));
- comparison = (*compare) (key, p, closure);
- if (comparison < 0)
- u = idx;
- else
- l = idx + 1;
- }
- *end = l;
- }
- return;
- }
- }
-
- if (start)
- *start = l;
- if (end)
- *end = l;
-}
-
-static gpointer closure_closure;
-static ESortCompareFunc compare_closure;
-
-static int
-qsort_callback(const void *data1, const void *data2)
-{
- return (*compare_closure) (data1, data2, closure_closure);
-}
-
-/* Forget it. We're just going to use qsort. I lost the need for a stable sort. */
-void
-e_sort (void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure)
-{
- closure_closure = closure;
- compare_closure = compare;
- qsort(base, nmemb, size, qsort_callback);
-#if 0
- void *base_copy;
- int i;
- base_copy = g_malloc(nmemb * size);
-
- for (i = 0; i < nmemb; i++) {
- int position;
- e_bsearch(base + (i * size), base_copy, i, size, compare, closure, NULL, &position);
- memmove(base_copy + (position + 1) * size, base_copy + position * size, (i - position) * size);
- memcpy(base_copy + position * size, base + i * size, size);
- }
- memcpy(base, base_copy, nmemb * size);
- g_free(base_copy);
-#endif
-}
-
-/**
- * Function to do a last minute fixup of the AM/PM stuff if the locale
- * and gettext haven't done it right. Most English speaking countries
- * except the USA use the 24 hour clock (UK, Australia etc). However
- * since they are English nobody bothers to write a language
- * translation (gettext) file. So the locale turns off the AM/PM, but
- * gettext does not turn on the 24 hour clock. Leaving a mess.
- *
- * This routine checks if AM/PM are defined in the locale, if not it
- * forces the use of the 24 hour clock.
- *
- * The function itself is a front end on strftime and takes exactly
- * the same arguments.
- *
- * TODO: Actually remove the '%p' from the fixed up string so that
- * there isn't a stray space.
- **/
-
-size_t e_strftime_fix_am_pm(char *s, size_t max, const char *fmt, const struct tm *tm)
-{
- char buf[10];
- char *sp;
- char *ffmt;
- size_t ret;
-
- if (strstr(fmt, "%p")==NULL && strstr(fmt, "%P")==NULL) {
- /* No AM/PM involved - can use the fmt string directly */
- ret=strftime(s, max, fmt, tm);
- } else {
- /* Get the AM/PM symbol from the locale */
- strftime (buf, 10, "%p", tm);
-
- if (buf[0]) {
- /**
- * AM/PM have been defined in the locale
- * so we can use the fmt string directly
- **/
- ret=strftime(s, max, fmt, tm);
- } else {
- /**
- * No AM/PM defined by locale
- * must change to 24 hour clock
- **/
- ffmt=g_strdup(fmt);
- for (sp=ffmt; (sp=strstr(sp, "%l")); sp++) {
- /**
- * Maybe this should be 'k', but I have never
- * seen a 24 clock actually use that format
- **/
- sp[1]='H';
- }
- for (sp=ffmt; (sp=strstr(sp, "%I")); sp++) {
- sp[1]='H';
- }
- ret=strftime(s, max, ffmt, tm);
- g_free(ffmt);
- }
- }
- return(ret);
-}
-
diff --git a/e-util/e-util.h b/e-util/e-util.h
deleted file mode 100644
index 22b96a376a..0000000000
--- a/e-util/e-util.h
+++ /dev/null
@@ -1,216 +0,0 @@
-#ifndef _E_UTIL_H_
-#define _E_UTIL_H_
-
-#include <sys/types.h>
-#include <gtk/gtktypeutils.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_MAKE_TYPE(l,str,t,ci,i,parent) \
-GtkType l##_get_type(void)\
-{\
- static GtkType type = 0;\
- if (!type){\
- GtkTypeInfo info = {\
- str,\
- sizeof (t),\
- sizeof (t##Class),\
- (GtkClassInitFunc) ci,\
- (GtkObjectInitFunc) i,\
- NULL, /* reserved 1 */\
- NULL, /* reserved 2 */\
- (GtkClassInitFunc) NULL\
- };\
- type = gtk_type_unique (parent, &info);\
- }\
- return type;\
-}
-
-
-#define E_MAKE_X_TYPE(l,str,t,ci,i,parent,poa_init,offset) \
-GtkType l##_get_type(void)\
-{\
- static GtkType type = 0;\
- if (!type){\
- GtkTypeInfo info = {\
- str,\
- sizeof (t),\
- sizeof (t##Class),\
- (GtkClassInitFunc) ci,\
- (GtkObjectInitFunc) i,\
- NULL, /* reserved 1 */\
- NULL, /* reserved 2 */\
- (GtkClassInitFunc) NULL\
- };\
- type = bonobo_x_type_unique (\
- parent, poa_init, NULL,\
- offset, &info);\
- }\
- return type;\
-}
-
-typedef enum {
- E_FOCUS_NONE,
- E_FOCUS_CURRENT,
- E_FOCUS_START,
- E_FOCUS_END
-} EFocus;
-int g_str_compare (const void *x,
- const void *y);
-int g_int_compare (const void *x,
- const void *y);
-char *e_strdup_strip (const char *string);
-
-void e_free_object_list (GList *list);
-void e_free_object_slist (GSList *list);
-void e_free_string_list (GList *list);
-void e_free_string_slist (GSList *list);
-
-char *e_read_file (const char *filename);
-int e_write_file (const char *filename,
- const char *data,
- int flags);
-int e_mkdir_hier (const char *path,
- mode_t mode);
-
-gchar **e_strsplit (const gchar *string,
- const gchar *delimiter,
- gint max_tokens);
-gchar *e_strstrcase (const gchar *haystack,
- const gchar *needle);
-void e_filename_make_safe (gchar *string);
-gchar *e_format_number (gint number);
-gchar *e_format_number_float (gfloat number);
-gboolean e_create_directory (gchar *directory);
-
-
-typedef int (*ESortCompareFunc) (const void *first,
- const void *second,
- gpointer closure);
-void e_sort (void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure);
-void e_bsearch (const void *key,
- const void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure,
- size_t *start,
- size_t *end);
-size_t e_strftime_fix_am_pm (char *s,
- size_t max,
- const char *fmt,
- const struct tm *tm);
-void e_marshal_INT__INT_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__INT_POINTER_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT
-void e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT
-void e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_INT_POINTER_UINT e_marshal_NONE__INT_INT_POINTER_INT
-void e_marshal_NONE__INT_INT_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_POINTER_INT_POINTER_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_INT
-void e_marshal_NONE__INT_POINTER_INT_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_BOOL__INT_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT
-void e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT
-void e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT
-void e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT
-void e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__POINTER_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__INT_POINTER_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__OBJECT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_UTIL_H_ */
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
deleted file mode 100644
index 3754d42ba2..0000000000
--- a/e-util/e-xml-utils.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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 "e-xml-utils.h"
-
-#include <locale.h>
-#include <math.h>
-#include <string.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include "gal/util/e-i18n.h"
-
-xmlNode *
-e_xml_get_child_by_name (const xmlNode *parent, const xmlChar *child_name)
-{
- xmlNode *child;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (child_name != NULL, NULL);
-
- for (child = parent->childs; child != NULL; child = child->next) {
- if (xmlStrcmp (child->name, child_name) == 0) {
- return child;
- }
- }
- return NULL;
-}
-
-/* Returns the first child with the name child_name and the "lang"
- * attribute that matches the current LC_MESSAGES, or else, the first
- * child with the name child_name and no "lang" attribute.
- */
-xmlNode *
-e_xml_get_child_by_name_by_lang (const xmlNode *parent,
- const xmlChar *child_name,
- const gchar *lang)
-{
- xmlNode *child;
- /* This is the default version of the string. */
- xmlNode *C = NULL;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (child_name != NULL, NULL);
-
- if (lang == NULL) {
-#ifdef HAVE_LC_MESSAGES
- lang = setlocale (LC_MESSAGES, NULL);
-#else
- lang = setlocale (LC_CTYPE, NULL);
-#endif
- }
- for (child = parent->childs; child != NULL; child = child->next) {
- if (xmlStrcmp (child->name, child_name) == 0) {
- xmlChar *this_lang = xmlGetProp (child, "lang");
- if (this_lang == NULL) {
- C = child;
- } else if (xmlStrcmp(this_lang, "lang") == 0) {
- return child;
- }
- }
- }
- return C;
-}
-
-static xmlNode *
-e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent,
- const gchar *name,
- GList *lang_list,
- gint *best_lang_score)
-{
- xmlNodePtr best_node = NULL, node;
-
- for (node = parent->childs; node != NULL; node = node->next) {
- xmlChar *lang;
-
- if (node->name == NULL || strcmp (node->name, name) != 0) {
- continue;
- }
- lang = xmlGetProp (node, "xml:lang");
- if (lang != NULL) {
- GList *l;
- gint i;
-
- for (l = lang_list, i = 0;
- l != NULL && i < *best_lang_score;
- l = l->next, i++) {
- if (strcmp ((gchar *) l->data, lang) == 0) {
- best_node = node;
- *best_lang_score = i;
- }
- }
- } else {
- if (best_node == NULL) {
- best_node = node;
- }
- }
- xmlFree (lang);
- if (*best_lang_score == 0) {
- return best_node;
- }
- }
-
- return best_node;
-}
-
-/*
- * e_xml_get_child_by_name_by_lang_list:
- *
- */
-xmlNode *
-e_xml_get_child_by_name_by_lang_list (const xmlNode *parent,
- const gchar *name,
- GList *lang_list)
-{
- gint best_lang_score = INT_MAX;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- if (lang_list == NULL) {
- lang_list = gnome_i18n_get_language_list ("LC_MESSAGES");
- }
- return e_xml_get_child_by_name_by_lang_list_with_score
- (parent,name,
- lang_list,
- &best_lang_score);
-}
-
-/*
- * e_xml_get_child_by_name_no_lang
- *
- */
-xmlNode *
-e_xml_get_child_by_name_no_lang (const xmlNode *parent, const gchar *name)
-{
- xmlNodePtr node;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- for (node = parent->childs; node != NULL; node = node->next) {
- xmlChar *lang;
-
- if (node->name == NULL || strcmp (node->name, name) != 0) {
- continue;
- }
- lang = xmlGetProp (node, "xml:lang");
- if (lang == NULL) {
- return node;
- }
- xmlFree (lang);
- }
-
- return NULL;
-}
-
-gint
-e_xml_get_integer_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_integer_prop_by_name_with_default (parent, prop_name, 0);
-}
-
-gint
-e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gint def)
-{
- xmlChar *prop;
- gint ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- (void) sscanf (prop, "%d", &ret_val);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_integer_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- gint value)
-{
- gchar *valuestr;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- valuestr = g_strdup_printf ("%d", value);
- xmlSetProp (parent, prop_name, valuestr);
- g_free (valuestr);
-}
-
-guint
-e_xml_get_uint_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_uint_prop_by_name_with_default (parent, prop_name, 0);
-}
-
-guint
-e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- guint def)
-{
- xmlChar *prop;
- guint ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- (void) sscanf (prop, "%u", &ret_val);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_uint_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- guint value)
-{
- gchar *valuestr;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- valuestr = g_strdup_printf ("%u", value);
- xmlSetProp (parent, prop_name, valuestr);
- g_free (valuestr);
-}
-
-gboolean
-e_xml_get_bool_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_bool_prop_by_name_with_default (parent,
- prop_name,
- FALSE);
-}
-
-gboolean
-e_xml_get_bool_prop_by_name_with_default(const xmlNode *parent,
- const xmlChar *prop_name,
- gboolean def)
-{
- xmlChar *prop;
- gboolean ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- if (g_strcasecmp (prop, "true") == 0) {
- ret_val = TRUE;
- } else if (g_strcasecmp (prop, "false") == 0) {
- ret_val = FALSE;
- }
- xmlFree(prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_bool_prop_by_name (xmlNode *parent, const xmlChar *prop_name, gboolean value)
-{
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (value) {
- xmlSetProp (parent, prop_name, "true");
- } else {
- xmlSetProp (parent, prop_name, "false");
- }
-}
-
-gdouble
-e_xml_get_double_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_double_prop_by_name_with_default (parent, prop_name, 0.0);
-}
-
-gdouble
-e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar *prop_name, gdouble def)
-{
- xmlChar *prop;
- gdouble ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- (void) sscanf (prop, "%lf", &ret_val);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble value)
-{
- gchar *valuestr;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (fabs (value) < 1e9 && fabs (value) > 1e-5) {
- valuestr = g_strdup_printf ("%f", value);
- } else {
- valuestr = g_strdup_printf ("%.*g", DBL_DIG, value);
- }
- xmlSetProp (parent, prop_name, valuestr);
- g_free (valuestr);
-}
-
-gchar *
-e_xml_get_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_string_prop_by_name_with_default (parent, prop_name, NULL);
-}
-
-gchar *
-e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, const xmlChar *prop_name, const gchar *def)
-{
- xmlChar *prop;
- gchar *ret_val;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- ret_val = g_strdup (prop);
- xmlFree (prop);
- } else {
- ret_val = g_strdup (def);
- }
- return ret_val;
-}
-
-void
-e_xml_set_string_prop_by_name (xmlNode *parent, const xmlChar *prop_name, const gchar *value)
-{
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (value != NULL) {
- xmlSetProp (parent, prop_name, value);
- }
-}
-
-gchar *
-e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- xmlChar *prop;
- gchar *ret_val = NULL;
- gchar *combined_name;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- ret_val = g_strdup (prop);
- xmlFree (prop);
- return ret_val;
- }
-
- combined_name = g_strdup_printf("_%s", prop_name);
- prop = xmlGetProp ((xmlNode *) parent, combined_name);
- if (prop != NULL) {
- ret_val = g_strdup (gettext(prop));
- xmlFree (prop);
- }
- g_free(combined_name);
-
- return ret_val;
-}
diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h
deleted file mode 100644
index ba102c1c3d..0000000000
--- a/e-util/e-xml-utils.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <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_XML_UTILS__
-#define __E_XML_UTILS__
-
-#include <libgnome/gnome-defs.h>
-#include <glib.h>
-#include <gnome-xml/tree.h>
-
-BEGIN_GNOME_DECLS
-
-xmlNode *e_xml_get_child_by_name (const xmlNode *parent,
- const xmlChar *child_name);
-/* lang set to NULL means use the current locale. */
-xmlNode *e_xml_get_child_by_name_by_lang (const xmlNode *parent,
- const xmlChar *child_name,
- const gchar *lang);
-/* lang_list set to NULL means use the current locale. */
-xmlNode *e_xml_get_child_by_name_by_lang_list (const xmlNode *parent,
- const gchar *name,
- GList *lang_list);
-xmlNode *e_xml_get_child_by_name_no_lang (const xmlNode *parent,
- const gchar *name);
-
-
-gint e_xml_get_integer_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gint e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gint def);
-void e_xml_set_integer_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- gint value);
-
-
-guint e_xml_get_uint_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-guint e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- guint def);
-void e_xml_set_uint_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- guint value);
-
-
-gboolean e_xml_get_bool_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gboolean e_xml_get_bool_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gboolean def);
-void e_xml_set_bool_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- gboolean value);
-
-gdouble e_xml_get_double_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gdouble e_xml_get_double_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gdouble def);
-void e_xml_set_double_prop_by_name ( xmlNode *parent,
- const xmlChar *prop_name,
- gdouble value);
-
-
-gchar *e_xml_get_string_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gchar *e_xml_get_string_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- const gchar *def);
-void e_xml_set_string_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- const gchar *value);
-
-gchar *e_xml_get_translated_string_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-
-END_GNOME_DECLS
-
-#endif /* __E_XML_UTILS__ */
diff --git a/e-util/ename/.cvsignore b/e-util/ename/.cvsignore
deleted file mode 100644
index 4f8c173841..0000000000
--- a/e-util/ename/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
-test-ename-western
-test-ename-western-gtk
diff --git a/e-util/ename/Makefile.am b/e-util/ename/Makefile.am
deleted file mode 100644
index b3abe633df..0000000000
--- a/e-util/ename/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-INCLUDES = \
- -DG_LOG_DOMAIN=\"EName\" \
- -I$(srcdir) \
- -I$(srcdir)/.. \
- -I$(top_srcdir) \
- -I. \
- -I.. \
- -I$(top_builddir) \
- -I$(includedir) \
- $(GNOME_INCLUDEDIR) \
- $(EXTRA_GNOME_CFLAGS)
-
-gnome_libs = \
- $(BONOBO_GNOME_LIBS) \
- $(INTLLIBS) \
- $(EXTRA_GNOME_LIBS)
-
-ename_libs = \
- libename.la \
- $(gnome_libs)
-
-lib_LTLIBRARIES = libename.la
-
-libename_la_SOURCES = \
- e-address-western.c \
- e-name-western.c
-
-libenameincludedir = $(includedir)/ename
-
-libenameinclude_HEADERS = \
- e-address-western.h \
- e-name-western-tables.h \
- e-name-western.h
-
-
-noinst_LTLIBRARIES = libename-static.la
-libename_static_la_SOURCES = $(libename_la_SOURCES)
-libename_static_la_LDFLAGS = --all-static
-
-
-noinst_PROGRAMS = \
- test-ename-western \
- test-ename-western-gtk
-
-test_ename_western_SOURCES = \
- test-ename-western.c
-
-test_ename_western_LDADD = $(ename_libs) \
- $(EXTRA_GNOME_LIBS)
-
-test_ename_western_gtk_SOURCES = \
- test-ename-western-gtk.c
-
-test_ename_western_gtk_LDADD = \
- $(ename_libs) \
- $(top_builddir)/e-util/libeutil.la \
- $(gnome_libs)
diff --git a/e-util/ename/TODO b/e-util/ename/TODO
deleted file mode 100644
index 669661eea7..0000000000
--- a/e-util/ename/TODO
+++ /dev/null
@@ -1,2 +0,0 @@
-* Support other naming systems.
-* Handle misspelled suffixes better.
diff --git a/e-util/ename/e-address-western.c b/e-util/ename/e-address-western.c
deleted file mode 100644
index 88b501497e..0000000000
--- a/e-util/ename/e-address-western.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/* --------------------------------------------------
-
- An address parser, yielding fields as per RFC 2426.
-
- Author:
- Jesse Pavel (jpavel@ximian.com)
-
- Copyright 2000, Ximian, Inc.
- --------------------------------------------------
-*/
-
-#include <ctype.h>
-#include <string.h>
-#include <glib.h>
-
-#ifdef E_ADDRESS_WESTERN_TEST
-
-#include "e-address-western.h"
-
-#else
-
-#include <ename/e-address-western.h>
-#include <gal/util/e-util.h>
-
-#endif
-
-/* These are the keywords that will distinguish the start of an extended
- address. */
-
-static char *extended_keywords[] = {
- "apt", "apartment", "suite", NULL
-};
-
-
-
-static gboolean
-e_address_western_is_line_blank (gchar *line)
-{
- gboolean blank = TRUE;
- gint cntr;
-
- /* A blank line consists of whitespace only, or a NULL line. */
- for (cntr = 0; line[cntr] != '\0'; cntr++ ) {
- if (!isspace(line[cntr])) {
- blank = FALSE;
- break;
- }
- }
-
- return blank;
-}
-
-
-
-/* In the array of lines, `lines', we will erase the line at line_num, and
- shift the remaining lines, up to line number num_lines, up one position. */
-
-static void
-e_address_western_shift_line (gchar *lines[], gint line_num, gint num_lines)
-{
- gint cntr;
-
- if (line_num >= (num_lines - 1)) {
- /* It is the last line, so simply shift in a NULL. */
- lines[line_num] = NULL;
- }
- else {
- for (cntr = line_num; cntr < num_lines; cntr++)
- lines[cntr] = lines[cntr + 1];
- }
-}
-
-
-static void
-e_address_western_remove_blank_lines (gchar *lines[], gint *linecntr)
-{
- gint cntr;
-
- for (cntr = 0; cntr < *linecntr; cntr++) {
- if (e_address_western_is_line_blank (lines[cntr])) {
- /* Delete the blank line, and shift all subsequent lines up
- one spot to fill its old spot. */
- e_address_western_shift_line (lines, cntr, *linecntr);
-
- /* Since we must check the newly shifted line, let's
- not advance the counter on this next pass. */
- cntr--;
-
- /* There is now one less line, total. */
- *linecntr -= 1;
- }
- }
-}
-
-
-static gboolean
-e_address_western_is_po_box (gchar *line)
-{
- gboolean retval = FALSE;
-
- /* In which phase of processing are we? */
- enum State { FIRSTCHAR, SECONDCHAR, WHITESPACE } state;
-
-
- /* If the first two letters of the line are `p' and `o', and these
- are in turn followed by whitespace before another letter, then I
- will deem the line a representation of a PO Box address. */
-
- gint cntr;
-
- state = FIRSTCHAR;
- for (cntr = 0; line[cntr] != '\0'; cntr++) {
- if (state == FIRSTCHAR) {
- if (isalnum(line[cntr])) {
- if (tolower(line[cntr]) == 'p')
- state = SECONDCHAR;
- else {
- retval = FALSE;
- break;
- }
- }
- }
- else if (state == SECONDCHAR) {
- if (isalnum (line[cntr])) {
- if (tolower(line[cntr]) == 'o')
- state = WHITESPACE;
- else {
- retval = FALSE;
- break;
- }
- }
- }
- else if (state == WHITESPACE) {
- if (isspace (line[cntr])) {
- retval = TRUE;
- break;
- }
- else if (isalnum (line[cntr])) {
- retval = FALSE;
- break;
- }
- }
- }
-
- return retval;
-}
-
-/* A line that contains a comma followed eventually by a number is
- deemed to be the line in the form of <town, region postal-code>. */
-
-static gboolean
-e_address_western_is_postal (guchar *line)
-{
- gboolean retval;
- int cntr;
-
- if (strchr (line, ',') == NULL)
- retval = FALSE; /* No comma. */
- else {
- int index;
-
- /* Ensure that the first character after the comma is
- a letter. */
- index = strcspn (line, ",");
- index++;
- while (isspace(line[index]))
- index++;
-
- if (!isalpha (line[index]))
- return FALSE; /* FIXME: ugly control flow. */
-
- cntr = strlen(line) - 1;
-
- /* Go to the character immediately following the last
- whitespace character. */
- while (cntr >= 0 && isspace(line[cntr]))
- cntr--;
-
- while (cntr >= 0 && !isspace(line[cntr]))
- cntr--;
-
- if (cntr == 0)
- retval = FALSE;
- else {
- if (isdigit (line[cntr+1]))
- retval = TRUE;
- else
- retval = FALSE;
- }
- }
-
- return retval;
-}
-
-static gchar *
-e_address_western_extract_po_box (gchar *line)
-{
- /* Return everything from the beginning of the line to
- the end of the first word that contains a number. */
-
- int index;
-
- index = 0;
- while (!isdigit(line[index]))
- index++;
-
- while (isgraph(line[index]))
- index++;
-
- return g_strndup (line, index);
-}
-
-static gchar *
-e_address_western_extract_locality (gchar *line)
-{
- gint index;
-
- /* Everything before the comma is the locality. */
- index = strcspn(line, ",");
-
- if (index == 0)
- return NULL;
- else
- return g_strndup (line, index);
-}
-
-
-/* Whatever resides between the comma and the start of the
- postal code is deemed to be the region. */
-
-static gchar *
-e_address_western_extract_region (gchar *line)
-{
- gint start, end;
-
- start = strcspn (line, ",");
- start++;
- while (isspace(line[start]))
- start++;
-
- end = strlen(line) - 1;
- while (isspace (line[end]))
- end--;
-
- while (!isspace (line[end]))
- end--;
-
- while (isspace (line[end]))
- end--;
- end++;
-
- /* Between start and end lie the string. */
- return g_strndup ( (line+start), end-start);
-}
-
-static gchar *
-e_address_western_extract_postal_code (gchar *line)
-{
- int start, end;
-
- end = strlen (line) - 1;
- while (isspace(line[end]))
- end--;
-
- start = end;
- end++;
-
- while (!isspace(line[start]))
- start--;
- start++;
-
- /* Between start and end lie the string. */
- return g_strndup ( (line+start), end-start);
-}
-
-
-
-static void
-e_address_western_extract_street (gchar *line, gchar **street, gchar **extended)
-{
- const gchar *split = NULL;
- gint cntr;
-
- for (cntr = 0; extended_keywords[cntr] != NULL; cntr++) {
- split = e_strstrcase (line, extended_keywords[cntr]);
- if (split != NULL)
- break;
- }
-
- if (split != NULL) {
- *street = g_strndup (line, (split - line));
- *extended = g_strdup (split);
- }
- else {
- *street = g_strdup (line);
- *extended = NULL;
- }
-
-}
-
-
-
-EAddressWestern *
-e_address_western_parse (const gchar *in_address)
-{
- gchar **lines;
- gint linecntr, lineindex;
- gchar *address;
- gint cntr;
- gboolean found_po_box, found_postal;
-
- EAddressWestern *eaw;
-#if 0
- gint start, end; /* To be used to classify address lines. */
-#endif
-
- if (in_address == NULL)
- return NULL;
-
- eaw = (EAddressWestern *)g_malloc (sizeof(EAddressWestern));
- eaw->po_box = NULL;
- eaw->extended = NULL;
- eaw->street = NULL;
- eaw->locality = NULL;
- eaw->region = NULL;
- eaw->postal_code = NULL;
- eaw->country = NULL;
-
- address = g_strdup (in_address);
-
- /* The first thing I'll do is divide the multiline input string
- into lines. */
-
- /* ... count the lines. */
- linecntr = 1;
- lineindex = 0;
- while (address[lineindex] != '\0') {
- if (address[lineindex] == '\n')
- linecntr++;
-
- lineindex++;
- }
-
- /* ... tally them. */
- lines = (gchar **)g_malloc (sizeof(gchar *) * (linecntr+3));
- lineindex = 0;
- lines[0] = &address[0];
- linecntr = 1;
- while (address[lineindex] != '\0') {
- if (address[lineindex] == '\n') {
- lines[linecntr] = &address[lineindex + 1];
- linecntr++;
- }
-
- lineindex++;
- }
-
- /* Convert the newlines at the end of each line (except the last,
- because it is already NULL terminated) to NULLs. */
- for (cntr = 0; cntr < (linecntr - 1); cntr++) {
- *(strchr (lines[cntr], '\n')) = '\0';
- }
-
- e_address_western_remove_blank_lines (lines, &linecntr);
-
- /* Let's just test these functions. */
- found_po_box = FALSE;
- found_postal = FALSE;
-
- for (cntr = 0; cntr < linecntr; cntr++) {
- if (e_address_western_is_po_box (lines[cntr])) {
- if (eaw->po_box == NULL)
- eaw->po_box = e_address_western_extract_po_box (lines[cntr]);
- found_po_box = TRUE;
- }
- else if (e_address_western_is_postal (lines[cntr])) {
- if (eaw->locality == NULL)
- eaw->locality = e_address_western_extract_locality (lines[cntr]);
- if (eaw->region == NULL)
- eaw->region = e_address_western_extract_region (lines[cntr]);
- if (eaw->postal_code == NULL)
- eaw->postal_code = e_address_western_extract_postal_code (lines[cntr]);
- found_postal = TRUE;
- }
- else {
- if (found_postal) {
- if (eaw->country == NULL)
- eaw->country = g_strdup (lines[cntr]);
- else {
- gchar *temp;
- temp = g_strconcat (eaw->country, "\n", lines[cntr], NULL);
- g_free (eaw->country);
- eaw->country = temp;
- }
- }
- else {
- if (eaw->street == NULL) {
- e_address_western_extract_street (lines[cntr], &eaw->street,
- &eaw->extended );
- }
- else {
- if (eaw->extended == NULL) {
- eaw->extended = g_strdup (lines[cntr]);
- }
- else {
- gchar *temp;
- temp = g_strconcat (eaw->extended, "\n", lines[cntr], NULL);
- g_free (eaw->extended);
- eaw->extended = temp;
- }
- }
- }
- }
- }
-
- g_free (lines);
- g_free (address);
-
- return eaw;
-}
-
-
-void
-e_address_western_free (EAddressWestern *eaw)
-{
- if (eaw == NULL)
- return;
-
- if (eaw->po_box != NULL)
- g_free(eaw->po_box);
- if (eaw->extended != NULL)
- g_free(eaw->extended);
- if (eaw->street != NULL)
- g_free(eaw->street);
- if (eaw->locality != NULL)
- g_free(eaw->locality);
- if (eaw->region != NULL)
- g_free(eaw->region);
- if (eaw->postal_code != NULL)
- g_free(eaw->postal_code);
- if (eaw->country != NULL)
- g_free(eaw->country);
-
- g_free (eaw);
-}
-
diff --git a/e-util/ename/e-address-western.h b/e-util/ename/e-address-western.h
deleted file mode 100644
index e6417f88c4..0000000000
--- a/e-util/ename/e-address-western.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef __E_ADDRESS_WESTERN_H__
-#define __E_ADDRESS_WESTERN_H__
-
-typedef struct {
-
- /* Public */
- char *po_box;
- char *extended; /* I'm not sure what this is. */
- char *street;
- char *locality; /* For example, the city or town. */
- char *region; /* The state or province. */
- char *postal_code;
- char *country;
-} EAddressWestern;
-
-EAddressWestern *e_address_western_parse (const char *address);
-void e_address_western_free (EAddressWestern *eaw);
-
-#endif /* ! __E_ADDRESS_WESTERN_H__ */
-
-
diff --git a/e-util/ename/e-name-western-tables.h b/e-util/ename/e-name-western-tables.h
deleted file mode 100644
index 2e94a94845..0000000000
--- a/e-util/ename/e-name-western-tables.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef __E_NAME_WESTERN_TABLES_H__
-#define __E_NAME_WESTERN_TABLES_H__
-
-char *e_name_western_pfx_table[] = {
-
- /*
- * English.
- */
- "mister", "miss.", "mr.", "mrs.", "ms.",
- "miss", "mr", "mrs", "ms", "sir",
- "professor", "prof.", "dr", "dr.", "doctor",
- "judge", "justice", "chief justice",
- "congressman", "congresswoman", "commander",
- "lieutenant", "lt.", "colonel", "col.", "major", "maj.",
- "general", "gen.", "admiral", "admr.", "sergeant", "sgt.",
- "lord", "lady", "baron", "baroness", "duke", "duchess",
- "king", "queen", "prince", "princess",
-
- "the most honorable", "the honorable",
- "the reverend", "his holiness",
- "his eminence", "his majesty", "her majesty",
- "his grace", "her grace",
-
- "president", "vice president", "secretary", "undersecretary",
- "consul", "ambassador",
-
- "senator", "saint", "st.", "pastor", "deacon",
- "father", "bishop", "archbishop", "cardinal", "pope",
- "reverend", "rev.", "rabbi",
-
- /*
- * French.
- */
- "monsieur", "m.", "mademoiselle", "melle",
- "madame", "mme", "professeur", "dauphin", "dauphine",
-
- /*
- * German
- */
- "herr", "frau", "fraulein", "herr doktor", "doktor frau", "doktor frau doktor",
- "frau doktor",
-
-
- /*
- * Spanish.
- */
- "senor", "senora", "sra.", "senorita", "srita.",
-
- NULL};
-
-char *e_name_western_sfx_table[] = {
-
- /*
- * English.
- */
- "junior", "senior", "jr", "sr", "I", "II", "III", "IV", "V",
- "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV",
- "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII",
- "phd", "ms", "md", "esq", "esq.", "esquire",
-
- NULL};
-
-char *e_name_western_twopart_sfx_table[] = {
-
- /*
- * English.
- */
- "the first", "the second", "the third",
-
- NULL};
-
-char *e_name_western_complex_last_table[] = {"van", "von", "de", NULL};
-
-#endif /* ! __E_NAME_WESTERN_TABLES_H__ */
diff --git a/e-util/ename/e-name-western.c b/e-util/ename/e-name-western.c
deleted file mode 100644
index f3fe719023..0000000000
--- a/e-util/ename/e-name-western.c
+++ /dev/null
@@ -1,870 +0,0 @@
-/*
- * A simple Western name parser.
- *
- * <Nat> Jamie, do you know anything about name parsing?
- * <jwz> Are you going down that rat hole? Bring a flashlight.
- *
- * Author:
- * Nat Friedman (nat@ximian.com)
- *
- * Copyright 1999, Ximian, Inc.
- */
-
-#include <ctype.h>
-#include <string.h>
-#include <glib.h>
-
-#include <ename/e-name-western.h>
-#include <ename/e-name-western-tables.h>
-
-typedef struct {
- int prefix_idx;
- int first_idx;
- int middle_idx;
- int nick_idx;
- int last_idx;
- int suffix_idx;
-} ENameWesternIdxs;
-
-static int
-e_name_western_str_count_words (char *str)
-{
- int word_count;
- char *p;
-
- word_count = 0;
-
- for (p = str; p != NULL; p = strchr (p, ' ')) {
- word_count ++;
- p ++;
- }
-
- return word_count;
-}
-
-static void
-e_name_western_cleanup_string (char **str)
-{
- char *newstr;
- char *p;
-
- if (*str == NULL)
- return;
-
- /* skip any spaces and commas at the start of the string */
- p = *str;
- while (isspace (*p) || *p == ',')
- p ++;
-
- /* make the copy we're going to return */
- newstr = g_strdup (p);
-
- if ( strlen(newstr) > 0) {
- /* now search from the back, skipping over any spaces and commas */
- p = newstr + strlen (newstr) - 1;
- while (isspace (*p) || *p == ',')
- p --;
- /* advance p to after the character that caused us to exit the
- previous loop, and end the string. */
- if ((! isspace (*p)) && *p != ',')
- p ++;
- *p = '\0';
- }
-
- g_free (*str);
- *str = newstr;
-}
-
-static char *
-e_name_western_get_words_at_idx (char *str, int idx, int num_words)
-{
- char *words;
- char *p;
- int word_count;
- int words_len;
-
- /*
- * Walk to the end of the words.
- */
- word_count = 0;
- p = str + idx;
- while (word_count < num_words && *p != '\0') {
- while (! isspace (*p) && *p != '\0')
- p ++;
-
- while (isspace (*p) && *p != '\0')
- p ++;
-
- word_count ++;
- }
-
- words_len = p - str - idx - 1;
-
- if (*p == '\0')
- words_len ++;
-
- words = g_malloc0 (1 + words_len);
- strncpy (words, str + idx, words_len);
-
- return words;
-}
-
-/*
- * What the fuck is wrong with glib's MAX macro.
- */
-static int
-e_name_western_max (const int a, const int b)
-{
- if (a > b)
- return a;
-
- return b;
-}
-
-static gboolean
-e_name_western_word_is_suffix (char *word)
-{
- int i;
-
- for (i = 0; e_name_western_sfx_table [i] != NULL; i ++) {
- if (g_strcasecmp (word, e_name_western_sfx_table [i]))
- continue;
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-static char *
-e_name_western_get_one_prefix_at_str (char *str)
-{
- char *word;
- int i;
-
- /*
- * Check for prefixes from our table.
- */
- for (i = 0; e_name_western_pfx_table [i] != NULL; i ++) {
- int pfx_words;
- char *words;
-
- pfx_words = e_name_western_str_count_words (e_name_western_pfx_table [i]);
- words = e_name_western_get_words_at_idx (str, 0, pfx_words);
-
- if (! g_strcasecmp (words, e_name_western_pfx_table [i]))
- return words;
-
- g_free (words);
- }
-
- /*
- * Check for prefixes we don't know about. These are always a
- * sequence of more than one letters followed by a period.
- */
- word = e_name_western_get_words_at_idx (str, 0, 1);
-
- if (strlen (word) > 2 &&
- isalpha ((unsigned char) word [0]) &&
- isalpha ((unsigned char) word [1]) &&
- word [strlen (word) - 1] == '.')
- return word;
-
- g_free (word);
-
- return NULL;
-}
-
-static char *
-e_name_western_get_prefix_at_str (char *str)
-{
- char *pfx;
- char *pfx1;
- char *pfx2;
- char *p;
-
- /* Get the first prefix. */
- pfx1 = e_name_western_get_one_prefix_at_str (str);
-
- if (pfx1 == NULL)
- return NULL;
-
- /* Check for a second prefix. */
- p = str + strlen (pfx1);
- while (isspace (*p) && *p != '\0')
- p ++;
-
- pfx2 = e_name_western_get_one_prefix_at_str (p);
-
- if (pfx2 != NULL) {
- int pfx_len;
-
- pfx_len = (p + strlen (pfx2)) - str;
- pfx = g_malloc0 (pfx_len + 1);
- strncpy (pfx, str, pfx_len);
- } else {
- pfx = g_strdup (pfx1);
- }
-
- g_free (pfx1);
- g_free (pfx2);
-
- return pfx;
-}
-
-static void
-e_name_western_extract_prefix (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- char *pfx;
-
- pfx = e_name_western_get_prefix_at_str (name->full);
-
- if (pfx == NULL)
- return;
-
- idxs->prefix_idx = 0;
- name->prefix = pfx;
-}
-
-static gboolean
-e_name_western_is_complex_last_beginning (char *word)
-{
- int i;
-
- for (i = 0; e_name_western_complex_last_table [i] != NULL; i ++) {
-
- if (! g_strcasecmp (
- word, e_name_western_complex_last_table [i]))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-e_name_western_extract_first (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- /*
- * If there's a prefix, then the first name is right after it.
- */
- if (idxs->prefix_idx != -1) {
- int first_idx;
- char *p;
-
- first_idx = idxs->prefix_idx + strlen (name->prefix);
-
- /* Skip past white space. */
- p = name->full + first_idx;
- while (isspace (*p) && *p != '\0')
- p++;
-
- if (*p == '\0')
- return;
-
- idxs->first_idx = p - name->full;
- name->first = e_name_western_get_words_at_idx (
- name->full, idxs->first_idx, 1);
-
- } else {
-
- /*
- * Otherwise, the first name is probably the first string.
- */
- idxs->first_idx = 0;
- name->first = e_name_western_get_words_at_idx (
- name->full, idxs->first_idx, 1);
- }
-
- /*
- * Check that we didn't just assign the beginning of a
- * compound last name to the first name.
- */
- if (name->first != NULL) {
- if (e_name_western_is_complex_last_beginning (name->first)) {
- g_free (name->first);
- name->first = NULL;
- idxs->first_idx = -1;
- }
- }
-}
-
-static void
-e_name_western_extract_middle (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- char *word;
- int middle_idx;
-
- /*
- * Middle names can only exist if you have a first name.
- */
- if (idxs->first_idx == -1)
- return;
-
- middle_idx = idxs->first_idx + strlen (name->first) + 1;
-
- if (middle_idx > strlen (name->full))
- return;
-
- /*
- * Search for the first space (or the terminating \0)
- */
- while (isspace (name->full [middle_idx]) &&
- name->full [middle_idx] != '\0')
- middle_idx ++;
-
- if (name->full [middle_idx] == '\0')
- return;
-
- /*
- * Skip past the nickname, if it's there.
- */
- if (name->full [middle_idx] == '\"') {
- if (idxs->nick_idx == -1)
- return;
-
- middle_idx = idxs->nick_idx + strlen (name->nick) + 1;
-
- while (isspace (name->full [middle_idx]) &&
- name->full [middle_idx] != '\0')
- middle_idx ++;
-
- if (name->full [middle_idx] == '\0')
- return;
- }
-
- /*
- * Make sure this isn't the beginning of a complex last name.
- */
- word = e_name_western_get_words_at_idx (name->full, middle_idx, 1);
- if (e_name_western_is_complex_last_beginning (word)) {
- g_free (word);
- return;
- }
-
- /*
- * Make sure this isn't a suffix.
- */
- e_name_western_cleanup_string (& word);
- if (e_name_western_word_is_suffix (word)) {
- g_free (word);
- return;
- }
-
- /*
- * Make sure we didn't just grab a cute nickname.
- */
- if (word [0] == '\"') {
- g_free (word);
- return;
- }
-
- idxs->middle_idx = middle_idx;
- name->middle = word;
-}
-
-static void
-e_name_western_extract_nickname (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- int idx;
- int start_idx;
- char *str;
-
- if (idxs->first_idx == -1)
- return;
-
- if (idxs->middle_idx > idxs->first_idx)
- idx = idxs->middle_idx + strlen (name->middle);
- else
- idx = idxs->first_idx + strlen (name->first);
-
- while (name->full [idx] != '\"' && name->full [idx] != '\0')
- idx ++;
-
- if (name->full [idx] != '\"')
- return;
-
- start_idx = idx;
-
- /*
- * Advance to the next double quote.
- */
- idx ++;
-
- while (name->full [idx] != '\"' && name->full [idx] != '\0')
- idx ++;
-
- if (name->full [idx] == '\0')
- return;
-
- str = g_malloc0 (idx - start_idx + 2);
- strncpy (str, name->full + start_idx, idx - start_idx + 1);
-
- name->nick = str;
- idxs->nick_idx = start_idx;
-}
-
-static int
-e_name_western_last_get_max_idx (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- int max_idx = -1;
-
- if (name->prefix != NULL)
- max_idx = e_name_western_max (
- max_idx, idxs->prefix_idx + strlen (name->prefix));
-
- if (name->first != NULL)
- max_idx = e_name_western_max (
- max_idx, idxs->first_idx + strlen (name->first));
-
- if (name->middle != NULL)
- max_idx = e_name_western_max (
- max_idx, idxs->middle_idx + strlen (name->middle));
-
- if (name->nick != NULL)
- max_idx = e_name_western_max (
- max_idx, idxs->nick_idx + strlen (name->nick));
-
- return max_idx;
-}
-
-static void
-e_name_western_extract_last (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- char *word;
- int idx = -1;
-
- idx = e_name_western_last_get_max_idx (name, idxs);
-
- /*
- * In the case where there is no preceding name element, the
- * name is either just a first name ("Nat", "John"), is a
- * single-element name ("Cher", which we treat as a first
- * name), or is just a last name. The only time we can
- * differentiate a last name alone from a single-element name
- * or a first name alone is if it's a complex last name ("de
- * Icaza", "van Josephsen"). So if there is no preceding name
- * element, we check to see whether or not the first part of
- * the name is the beginning of a complex name. If it is,
- * we subsume the entire string. If we accidentally subsume
- * the suffix, this will get fixed in the fixup routine.
- */
- if (idx == -1) {
- word = e_name_western_get_words_at_idx (name->full, 0, 1);
- if (! e_name_western_is_complex_last_beginning (word)) {
- g_free (word);
- return;
- }
-
- name->last = g_strdup (name->full);
- idxs->last_idx = 0;
- return;
- }
-
- /* Skip past the white space. */
- while (isspace (name->full [idx]) && name->full [idx] != '\0')
- idx ++;
-
- if (name->full [idx] == '\0')
- return;
-
- word = e_name_western_get_words_at_idx (name->full, idx, 1);
- e_name_western_cleanup_string (& word);
- if (e_name_western_word_is_suffix (word)) {
- g_free (word);
- return;
- }
- g_free (word);
-
- /*
- * Subsume the rest of the string into the last name. If we
- * accidentally include the prefix, it will get fixed later.
- * This is the only way to handle things like "Miguel de Icaza
- * Amozorrutia" without dropping data and forcing the user
- * to retype it.
- */
- name->last = g_strdup (name->full + idx);
- idxs->last_idx = idx;
-}
-
-static char *
-e_name_western_get_preceding_word (char *str, int idx)
-{
- int word_len;
- char *word;
- char *p;
-
- p = str + idx;
-
- while (isspace (*p) && p > str)
- p --;
-
- while (! isspace (*p) && p > str)
- p --;
-
- if (isspace (*p))
- p ++;
-
- word_len = (str + idx) - p;
- word = g_malloc0 (word_len + 1);
- if (word_len > 0)
- strncpy (word, p, word_len);
-
- return word;
-}
-
-static char *
-e_name_western_get_suffix_at_str_end (char *str)
-{
- char *suffix;
- char *p;
-
- /*
- * Walk backwards till we reach the beginning of the
- * (potentially-comma-separated) list of suffixes.
- */
- p = str + strlen (str);
- while (1) {
- char *nextp;
- char *word;
-
- word = e_name_western_get_preceding_word (str, p - str);
- nextp = p - strlen (word) - 1;
-
- e_name_western_cleanup_string (& word);
-
- if (e_name_western_word_is_suffix (word)) {
- p = nextp;
- g_free (word);
- } else {
- g_free (word);
- break;
- }
- }
-
- if (p == (str + strlen (str)))
- return NULL;
-
- suffix = g_strdup (p);
- e_name_western_cleanup_string (& suffix);
-
- if (strlen (suffix) == 0) {
- g_free (suffix);
- return NULL;
- }
-
- return suffix;
-}
-
-static void
-e_name_western_extract_suffix (ENameWestern *name, ENameWesternIdxs *idxs)
-{
-
- name->suffix = e_name_western_get_suffix_at_str_end (name->full);
-
- if (name->suffix == NULL)
- return;
-
- idxs->suffix_idx = strlen (name->full) - strlen (name->suffix);
-}
-
-static gboolean
-e_name_western_detect_backwards (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- char *comma;
- char *word;
-
- comma = strchr (name->full, ',');
-
- if (comma == NULL)
- return FALSE;
-
- /*
- * If there's a comma, we need to detect whether it's
- * separating the last name from the first or just separating
- * suffixes. So we grab the word which comes before the
- * comma and check if it's a suffix.
- */
- word = e_name_western_get_preceding_word (name->full, comma - name->full);
-
- if (e_name_western_word_is_suffix (word)) {
- g_free (word);
- return FALSE;
- }
-
- g_free (word);
- return TRUE;
-}
-
-static void
-e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- char *prefix;
- char *last;
- char *suffix;
- char *firstmidnick;
- char *newfull;
-
- char *comma;
- char *p;
-
- if (! e_name_western_detect_backwards (name, idxs))
- return;
-
- /*
- * Convert
- * <Prefix> <Last name>, <First name> <Middle[+nick] name> <Suffix>
- * to
- * <Prefix> <First name> <Middle[+nick] name> <Last name> <Suffix>
- */
-
- /*
- * Grab the prefix from the beginning.
- */
- prefix = e_name_western_get_prefix_at_str (name->full);
-
- /*
- * Everything from the end of the prefix to the comma is the
- * last name.
- */
- comma = strchr (name->full, ',');
- if (comma == NULL)
- return;
-
- p = name->full + (prefix == NULL ? 0 : strlen (prefix));
-
- while (isspace (*p) && *p != '\0')
- p ++;
-
- last = g_malloc0 (comma - p + 1);
- strncpy (last, p, comma - p);
-
- /*
- * Get the suffix off the end.
- */
- suffix = e_name_western_get_suffix_at_str_end (name->full);
-
- /*
- * Firstmidnick is everything from the comma to the beginning
- * of the suffix.
- */
- p = comma + 1;
-
- while (isspace (*p) && *p != '\0')
- p ++;
-
- if (suffix != NULL) {
- char *q;
-
- /*
- * Point q at the beginning of the suffix.
- */
- q = name->full + strlen (name->full) - strlen (suffix) - 1;
-
- /*
- * Walk backwards until we hit the space which
- * separates the suffix from firstmidnick.
- */
- while (! isspace (*q) && q > comma)
- q --;
-
- if ((q - p + 1) > 0) {
- firstmidnick = g_malloc0 (q - p + 1);
- strncpy (firstmidnick, p, q - p);
- } else
- firstmidnick = NULL;
- } else {
- firstmidnick = g_strdup (p);
- }
-
- /*
- * Create our new reordered version of the name.
- */
-#define NULLSTR(a) ((a) == NULL ? "" : (a))
- newfull = g_strdup_printf ("%s %s %s %s", NULLSTR (prefix), NULLSTR (firstmidnick),
- NULLSTR (last), NULLSTR (suffix));
- g_strstrip (newfull);
- g_free (name->full);
- name->full = newfull;
-
-
- g_free (prefix);
- g_free (firstmidnick);
- g_free (last);
- g_free (suffix);
-}
-
-static void
-e_name_western_zap_nil (char **str, int *idx)
-{
- if (*str == NULL)
- return;
-
- if (strlen (*str) != 0)
- return;
-
- *idx = -1;
- g_free (*str);
- *str = NULL;
-}
-
-static void
-e_name_western_fixup (ENameWestern *name, ENameWesternIdxs *idxs)
-{
- /*
- * The middle and last names cannot be the same.
- */
- if (idxs->middle_idx != -1 && idxs->middle_idx == idxs->last_idx) {
- idxs->middle_idx = -1;
- g_free (name->middle);
- name->middle = NULL;
- }
-
- /*
- * If we have a middle name and no last name, then we mistook
- * the last name for the middle name.
- */
- if (idxs->last_idx == -1 && idxs->middle_idx != -1) {
- idxs->last_idx = idxs->middle_idx;
- name->last = name->middle;
- name->middle = NULL;
- idxs->middle_idx = -1;
- }
-
- /*
- * Check to see if we accidentally included the suffix in the
- * last name.
- */
- if (idxs->suffix_idx != -1 && idxs->last_idx != -1 &&
- idxs->suffix_idx < (idxs->last_idx + strlen (name->last))) {
- char *sfx;
-
- sfx = name->last + (idxs->suffix_idx - idxs->last_idx);
- if (sfx != NULL) {
- char *newlast;
- char *p;
-
- p = sfx - 1;
- while (isspace (*p) && p > name->last)
- p --;
- p ++;
-
- newlast = g_malloc0 (p - name->last + 1);
- strncpy (newlast, name->last, p - name->last);
- g_free (name->last);
- name->last = newlast;
- }
- }
-
- /*
- * If we have a prefix and a first name, but no last name,
- * then we need to assign the first name to the last name.
- * This way we get things like "Mr Friedman" correctly.
- */
- if (idxs->first_idx != -1 && idxs->prefix_idx != -1 &&
- idxs->last_idx == -1) {
- name->last = name->first;
- idxs->last_idx = idxs->first_idx;
- idxs->first_idx = -1;
- name->first = NULL;
- }
-
- /*
- * Remove stray spaces and commas (although there don't seem
- * to be any in the test cases, they might show up later).
- */
- e_name_western_cleanup_string (& name->prefix);
- e_name_western_cleanup_string (& name->first);
- e_name_western_cleanup_string (& name->middle);
- e_name_western_cleanup_string (& name->nick);
- e_name_western_cleanup_string (& name->last);
- e_name_western_cleanup_string (& name->suffix);
-
- /*
- * Make zero-length strings just NULL.
- */
- e_name_western_zap_nil (& name->prefix, & idxs->prefix_idx);
- e_name_western_zap_nil (& name->first, & idxs->first_idx);
- e_name_western_zap_nil (& name->middle, & idxs->middle_idx);
- e_name_western_zap_nil (& name->nick, & idxs->nick_idx);
- e_name_western_zap_nil (& name->last, & idxs->last_idx);
- e_name_western_zap_nil (& name->suffix, & idxs->suffix_idx);
-}
-
-/**
- * e_name_western_western_parse_fullname:
- * @full_name: A string containing a Western name.
- *
- * Parses @full_name and returns an #ENameWestern object filled with
- * the component parts of the name.
- */
-ENameWestern *
-e_name_western_parse (const char *full_name)
-{
- ENameWesternIdxs *idxs;
- ENameWestern *wname;
-
- wname = g_new0 (ENameWestern, 1);
-
- wname->full = g_strdup (full_name);
-
- idxs = g_new0 (ENameWesternIdxs, 1);
-
- idxs->prefix_idx = -1;
- idxs->first_idx = -1;
- idxs->middle_idx = -1;
- idxs->nick_idx = -1;
- idxs->last_idx = -1;
- idxs->suffix_idx = -1;
-
- /*
- * An extremely simple algorithm.
- *
- * The goal here is to get it right 95% of the time for
- * Western names.
- *
- * First we check to see if this is an ass-backwards name
- * ("Prefix Last, First Middle Suffix"). These names really
- * suck (imagine "Dr von Johnson, Albert Roderick Jr"), so
- * we reorder them first and then parse them.
- *
- * Next, we grab the most obvious assignments for the various
- * parts of the name. Once this is done, we check for stupid
- * errors and fix them up.
- */
- e_name_western_reorder_asshole (wname, idxs);
-
- e_name_western_extract_prefix (wname, idxs);
- e_name_western_extract_first (wname, idxs);
- e_name_western_extract_nickname (wname, idxs);
- e_name_western_extract_middle (wname, idxs);
- e_name_western_extract_last (wname, idxs);
- e_name_western_extract_suffix (wname, idxs);
-
- e_name_western_fixup (wname, idxs);
-
- g_free (idxs);
-
- return wname;
-}
-
-/**
- * e_name_western_free:
- * @name: An ENameWestern object which needs to be freed.
- *
- * Deep-frees @name
- */
-void
-e_name_western_free (ENameWestern *w)
-{
-
- g_free (w->prefix);
- g_free (w->first);
- g_free (w->middle);
- g_free (w->nick);
- g_free (w->last);
- g_free (w->suffix);
-
- g_free (w->full);
-
- g_free (w);
-}
diff --git a/e-util/ename/e-name-western.h b/e-util/ename/e-name-western.h
deleted file mode 100644
index fa5bac494c..0000000000
--- a/e-util/ename/e-name-western.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef __E_NAME_WESTERN_H__
-#define __E_NAME_WESTERN_H__
-
-typedef struct {
-
- /* Public */
- char *prefix;
- char *first;
- char *middle;
- char *nick;
- char *last;
- char *suffix;
-
- /* Private */
- char *full;
-} ENameWestern;
-
-ENameWestern *e_name_western_parse (const char *full_name);
-void e_name_western_free (ENameWestern *w);
-
-#endif /* ! __E_NAME_WESTERN_H__ */
diff --git a/e-util/ename/test-ename-western-gtk.c b/e-util/ename/test-ename-western-gtk.c
deleted file mode 100644
index 8ae0ef8770..0000000000
--- a/e-util/ename/test-ename-western-gtk.c
+++ /dev/null
@@ -1,157 +0,0 @@
-#include <gtk/gtkmain.h>
-#include <gtk/gtktable.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
-#include <gal/widgets/e-unicode.h>
-#include "e-name-western.h"
-
-ENameWestern *name;
-GtkWidget *full;
-GtkWidget *prefix;
-GtkWidget *first;
-GtkWidget *middle;
-GtkWidget *nick;
-GtkWidget *last;
-GtkWidget *suffix;
-
-static void
-fill_entries (void)
-{
-
-#define SET(a,b) (e_utf8_gtk_entry_set_text (GTK_ENTRY (a), (b) == NULL ? "" : (b)))
- SET(prefix, name->prefix);
- SET(first, name->first);
- SET(middle, name->middle);
- SET(nick, name->nick);
- SET(last, name->last);
- SET(suffix, name->suffix);
-}
-
-static void
-full_changed_cb (GtkEntry *fulle)
-{
- gchar *str;
-
- e_name_western_free (name);
- str = e_utf8_gtk_entry_get_text (fulle);
- name = e_name_western_parse (str);
- fill_entries ();
-
- g_free (str);
-}
-
-static void
-create_window (void)
-{
- GtkWidget *app;
- GtkTable *table;
-
- GtkWidget *prefix_label;
- GtkWidget *first_label;
- GtkWidget *middle_label;
- GtkWidget *nick_label;
- GtkWidget *last_label;
- GtkWidget *suffix_label;
-
- app = gnome_app_new ("test", "Evolution Western Name Parser");
-
- table = GTK_TABLE (gtk_table_new (3, 6, FALSE));
-
- full = gtk_entry_new ();
- prefix = gtk_entry_new ();
- first = gtk_entry_new ();
- middle = gtk_entry_new ();
- nick = gtk_entry_new ();
- last = gtk_entry_new ();
- suffix = gtk_entry_new ();
-
- gtk_widget_set_usize (prefix, 100, 0);
- gtk_widget_set_usize (first, 100, 0);
- gtk_widget_set_usize (middle, 100, 0);
- gtk_widget_set_usize (nick, 100, 0);
- gtk_widget_set_usize (last, 100, 0);
- gtk_widget_set_usize (suffix, 100, 0);
-
- gtk_table_attach (table, full, 0, 6, 0, 1,
- GTK_EXPAND | GTK_FILL, 0,
- 0, 0);
-
- gtk_table_attach (table, prefix, 0, 1, 1, 2,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, first, 1, 2, 1, 2,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, middle, 2, 3, 1, 2,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, nick, 3, 4, 1, 2,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, last, 4, 5, 1, 2,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, suffix, 5, 6, 1, 2,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
-
- prefix_label = gtk_label_new ("Prefix");
- first_label = gtk_label_new ("First");
- middle_label = gtk_label_new ("Middle");
- nick_label = gtk_label_new ("Nick");
- last_label = gtk_label_new ("Last");
- suffix_label = gtk_label_new ("Suffix");
-
- gtk_table_attach (table, prefix_label, 0, 1, 2, 3,
- GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, first_label, 1, 2, 2, 3,
- GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, middle_label, 2, 3, 2, 3,
- GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, nick_label, 3, 4, 2, 3,
- GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, last_label, 4, 5, 2, 3,
- GTK_SHRINK, 0,
- 0, 0);
-
- gtk_table_attach (table, suffix_label, 5, 6, 2, 3,
- GTK_SHRINK, 0,
- 0, 0);
-
- gnome_app_set_contents (GNOME_APP (app), GTK_WIDGET (table));
-
- gtk_widget_show_all (app);
-
- gtk_entry_set_text (GTK_ENTRY (full),
- "The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire");
-
- name = e_name_western_parse ("The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire");
- fill_entries ();
-
- gtk_signal_connect (GTK_OBJECT (full), "changed", full_changed_cb, NULL);
-}
-
-int
-main (int argc, char **argv)
-{
- gnome_init ("Test EName", "Test EName", argc, argv);
-
- create_window ();
-
- gtk_main ();
-
- return 0;
-}
diff --git a/e-util/ename/test-ename-western.c b/e-util/ename/test-ename-western.c
deleted file mode 100644
index 09847b5b4b..0000000000
--- a/e-util/ename/test-ename-western.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <ctype.h>
-#include <stdio.h>
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <ename/e-name-western.h>
-
-static void
-do_name (char *n)
-{
- ENameWestern *wname;
-
- wname = e_name_western_parse (n);
-
- printf ("Full Name: [%s]\n", n);
-
- printf ("Prefix: [%s]\n", wname->prefix);
- printf ("First: [%s]\n", wname->first);
- printf ("Middle: [%s]\n", wname->middle);
- printf ("Nick: [%s]\n", wname->nick);
- printf ("Last: [%s]\n", wname->last);
- printf ("Suffix: [%s]\n", wname->suffix);
-
- printf ("\n");
-
- e_name_western_free (wname);
-}
-
-int
-main (int argc, char **argv)
-{
- if (argc == 2) {
- while (! feof (stdin)) {
- char s[256];
-
- if (fgets (s, sizeof (s), stdin) == NULL)
- return 0;
-
- g_strstrip (s);
-
- do_name (s);
- }
-
- return 0;
- }
-
- do_name ("Nat");
- do_name ("Karl Anders Carlsson");
- do_name ("Miguel de Icaza Amozorrutia");
- do_name ("The Honorable Doctor de Icaza, Miguel \"Sparky\" Junior, PhD, MD");
- do_name ("Nat Friedman MD, Phd");
- do_name ("Nat Friedman PhD");
- do_name ("Friedman, Nat");
- do_name ("Miguel de Icaza Esquire");
- do_name ("Dr Miguel \"Sparky\" de Icaza");
- do_name ("Robert H.B. Netzer");
- do_name ("W. Richard Stevens");
- do_name ("Nat Friedman");
- do_name ("N. Friedman");
- do_name ("Miguel de Icaza");
- do_name ("Drew Johnson");
- do_name ("President Bill \"Slick Willy\" Clinton");
- do_name ("The Honorable Mark J. Einstein Jr");
- do_name ("Friedman, Nat");
- do_name ("de Icaza, Miguel");
- do_name ("Mr de Icaza, Miguel");
- do_name ("Smith, John Jr");
- do_name ("Nick Glennie-Smith");
- do_name ("Dr von Johnson, Albert Roderick Jr");
-
- return 0;
-}
diff --git a/e-util/md5-utils.c b/e-util/md5-utils.c
deleted file mode 100644
index 368a3c1828..0000000000
--- a/e-util/md5-utils.c
+++ /dev/null
@@ -1,362 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * This code implements the MD5 message-digest algorithm.
- * The algorithm is due to Ron Rivest. This code was
- * written by Colin Plumb in 1993, no copyright is claimed.
- * This code is in the public domain; do with it what you wish.
- *
- * Equivalent code is available from RSA Data Security, Inc.
- * This code has been tested against that, and is equivalent,
- * except that you don't need to include two pages of legalese
- * with every copy.
- *
- * To compute the message digest of a chunk of bytes, declare an
- * MD5Context structure, pass it to md5_init, call md5_update as
- * needed on buffers full of bytes, and then call md5_Final, which
- * will fill a supplied 16-byte array with the digest.
- */
-
-/* parts of this file are :
- * Written March 1993 by Branko Lankester
- * Modified June 1993 by Colin Plumb for altered md5.c.
- * Modified October 1995 by Erik Troan for RPM
- */
-
-
-#include <stdio.h>
-#include <string.h>
-#include "md5-utils.h"
-
-static void md5_transform (guint32 buf[4], const guint32 in[16]);
-
-static gint _ie = 0x44332211;
-static union _endian { gint i; gchar b[4]; } *_endian = (union _endian *)&_ie;
-#define IS_BIG_ENDIAN() (_endian->b[0] == '\x44')
-#define IS_LITTLE_ENDIAN() (_endian->b[0] == '\x11')
-
-
-/*
- * Note: this code is harmless on little-endian machines.
- */
-static void
-_byte_reverse (guchar *buf, guint32 longs)
-{
- guint32 t;
- do {
- t = (guint32) ((guint32) buf[3] << 8 | buf[2]) << 16 |
- ((guint32) buf[1] << 8 | buf[0]);
- *(guint32 *) buf = t;
- buf += 4;
- } while (--longs);
-}
-
-/**
- * md5_init: Initialise an md5 context object
- * @ctx: md5 context
- *
- * Initialise an md5 buffer.
- *
- **/
-void
-md5_init (MD5Context *ctx)
-{
- ctx->buf[0] = 0x67452301;
- ctx->buf[1] = 0xefcdab89;
- ctx->buf[2] = 0x98badcfe;
- ctx->buf[3] = 0x10325476;
-
- ctx->bits[0] = 0;
- ctx->bits[1] = 0;
-
- if (IS_BIG_ENDIAN())
- ctx->doByteReverse = 1;
- else
- ctx->doByteReverse = 0;
-}
-
-
-
-/**
- * md5_update: add a buffer to md5 hash computation
- * @ctx: conetxt object used for md5 computaion
- * @buf: buffer to add
- * @len: buffer length
- *
- * Update context to reflect the concatenation of another buffer full
- * of bytes. Use this to progressively construct an md5 hash.
- **/
-void
-md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
-{
- guint32 t;
-
- /* Update bitcount */
-
- t = ctx->bits[0];
- if ((ctx->bits[0] = t + ((guint32) len << 3)) < t)
- ctx->bits[1]++; /* Carry from low to high */
- ctx->bits[1] += len >> 29;
-
- t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */
-
- /* Handle any leading odd-sized chunks */
-
- if (t) {
- guchar *p = (guchar *) ctx->in + t;
-
- t = 64 - t;
- if (len < t) {
- memcpy (p, buf, len);
- return;
- }
- memcpy (p, buf, t);
- if (ctx->doByteReverse)
- _byte_reverse (ctx->in, 16);
- md5_transform (ctx->buf, (guint32 *) ctx->in);
- buf += t;
- len -= t;
- }
- /* Process data in 64-byte chunks */
-
- while (len >= 64) {
- memcpy (ctx->in, buf, 64);
- if (ctx->doByteReverse)
- _byte_reverse (ctx->in, 16);
- md5_transform (ctx->buf, (guint32 *) ctx->in);
- buf += 64;
- len -= 64;
- }
-
- /* Handle any remaining bytes of data. */
-
- memcpy (ctx->in, buf, len);
-}
-
-
-
-
-
-/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern
- * 1 0* (64-bit count of bits processed, MSB-first)
- */
-/**
- * md5_final: copy the final md5 hash to a bufer
- * @digest: 16 bytes buffer
- * @ctx: context containing the calculated md5
- *
- * copy the final md5 hash to a bufer
- **/
-void
-md5_final (MD5Context *ctx, guchar digest[16])
-{
- guint32 count;
- guchar *p;
-
- /* Compute number of bytes mod 64 */
- count = (ctx->bits[0] >> 3) & 0x3F;
-
- /* Set the first char of padding to 0x80. This is safe since there is
- always at least one byte free */
- p = ctx->in + count;
- *p++ = 0x80;
-
- /* Bytes of padding needed to make 64 bytes */
- count = 64 - 1 - count;
-
- /* Pad out to 56 mod 64 */
- if (count < 8) {
- /* Two lots of padding: Pad the first block to 64 bytes */
- memset (p, 0, count);
- if (ctx->doByteReverse)
- _byte_reverse (ctx->in, 16);
- md5_transform (ctx->buf, (guint32 *) ctx->in);
-
- /* Now fill the next block with 56 bytes */
- memset (ctx->in, 0, 56);
- } else {
- /* Pad block to 56 bytes */
- memset (p, 0, count - 8);
- }
- if (ctx->doByteReverse)
- _byte_reverse (ctx->in, 14);
-
- /* Append length in bits and transform */
- ((guint32 *) ctx->in)[14] = ctx->bits[0];
- ((guint32 *) ctx->in)[15] = ctx->bits[1];
-
- md5_transform (ctx->buf, (guint32 *) ctx->in);
- if (ctx->doByteReverse)
- _byte_reverse ((guchar *) ctx->buf, 4);
- memcpy (digest, ctx->buf, 16);
-}
-
-
-
-
-/* The four core functions - F1 is optimized somewhat */
-
-/* #define F1(x, y, z) (x & y | ~x & z) */
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1(z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
-
-/* This is the central step in the MD5 algorithm. */
-#define MD5STEP(f, w, x, y, z, data, s) \
- ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
-
-/*
- * The core of the MD5 algorithm, this alters an existing MD5 hash to
- * reflect the addition of 16 longwords of new data. md5_Update blocks
- * the data and converts bytes into longwords for this routine.
- */
-static void
-md5_transform (guint32 buf[4], const guint32 in[16])
-{
- register guint32 a, b, c, d;
-
- a = buf[0];
- b = buf[1];
- c = buf[2];
- d = buf[3];
-
- MD5STEP (F1, a, b, c, d, in[0] + 0xd76aa478, 7);
- MD5STEP (F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
- MD5STEP (F1, c, d, a, b, in[2] + 0x242070db, 17);
- MD5STEP (F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
- MD5STEP (F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
- MD5STEP (F1, d, a, b, c, in[5] + 0x4787c62a, 12);
- MD5STEP (F1, c, d, a, b, in[6] + 0xa8304613, 17);
- MD5STEP (F1, b, c, d, a, in[7] + 0xfd469501, 22);
- MD5STEP (F1, a, b, c, d, in[8] + 0x698098d8, 7);
- MD5STEP (F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
- MD5STEP (F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
- MD5STEP (F1, b, c, d, a, in[11] + 0x895cd7be, 22);
- MD5STEP (F1, a, b, c, d, in[12] + 0x6b901122, 7);
- MD5STEP (F1, d, a, b, c, in[13] + 0xfd987193, 12);
- MD5STEP (F1, c, d, a, b, in[14] + 0xa679438e, 17);
- MD5STEP (F1, b, c, d, a, in[15] + 0x49b40821, 22);
-
- MD5STEP (F2, a, b, c, d, in[1] + 0xf61e2562, 5);
- MD5STEP (F2, d, a, b, c, in[6] + 0xc040b340, 9);
- MD5STEP (F2, c, d, a, b, in[11] + 0x265e5a51, 14);
- MD5STEP (F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
- MD5STEP (F2, a, b, c, d, in[5] + 0xd62f105d, 5);
- MD5STEP (F2, d, a, b, c, in[10] + 0x02441453, 9);
- MD5STEP (F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
- MD5STEP (F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
- MD5STEP (F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
- MD5STEP (F2, d, a, b, c, in[14] + 0xc33707d6, 9);
- MD5STEP (F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
- MD5STEP (F2, b, c, d, a, in[8] + 0x455a14ed, 20);
- MD5STEP (F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
- MD5STEP (F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
- MD5STEP (F2, c, d, a, b, in[7] + 0x676f02d9, 14);
- MD5STEP (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-
- MD5STEP (F3, a, b, c, d, in[5] + 0xfffa3942, 4);
- MD5STEP (F3, d, a, b, c, in[8] + 0x8771f681, 11);
- MD5STEP (F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
- MD5STEP (F3, b, c, d, a, in[14] + 0xfde5380c, 23);
- MD5STEP (F3, a, b, c, d, in[1] + 0xa4beea44, 4);
- MD5STEP (F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
- MD5STEP (F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
- MD5STEP (F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
- MD5STEP (F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
- MD5STEP (F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
- MD5STEP (F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
- MD5STEP (F3, b, c, d, a, in[6] + 0x04881d05, 23);
- MD5STEP (F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
- MD5STEP (F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
- MD5STEP (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
- MD5STEP (F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-
- MD5STEP (F4, a, b, c, d, in[0] + 0xf4292244, 6);
- MD5STEP (F4, d, a, b, c, in[7] + 0x432aff97, 10);
- MD5STEP (F4, c, d, a, b, in[14] + 0xab9423a7, 15);
- MD5STEP (F4, b, c, d, a, in[5] + 0xfc93a039, 21);
- MD5STEP (F4, a, b, c, d, in[12] + 0x655b59c3, 6);
- MD5STEP (F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
- MD5STEP (F4, c, d, a, b, in[10] + 0xffeff47d, 15);
- MD5STEP (F4, b, c, d, a, in[1] + 0x85845dd1, 21);
- MD5STEP (F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
- MD5STEP (F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
- MD5STEP (F4, c, d, a, b, in[6] + 0xa3014314, 15);
- MD5STEP (F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
- MD5STEP (F4, a, b, c, d, in[4] + 0xf7537e82, 6);
- MD5STEP (F4, d, a, b, c, in[11] + 0xbd3af235, 10);
- MD5STEP (F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
- MD5STEP (F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-
- buf[0] += a;
- buf[1] += b;
- buf[2] += c;
- buf[3] += d;
-}
-
-
-
-
-/**
- * md5_get_digest: get the md5 hash of a buffer
- * @buffer: byte buffer
- * @buffer_size: buffer size (in bytes)
- * @digest: 16 bytes buffer receiving the hash code.
- *
- * Get the md5 hash of a buffer. The result is put in
- * the 16 bytes buffer @digest .
- **/
-void
-md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16])
-{
- MD5Context ctx;
-
- md5_init (&ctx);
- md5_update (&ctx, buffer, buffer_size);
- md5_final (&ctx, digest);
-
-}
-
-
-/**
- * md5_get_digest_from_file: get the md5 hash of a file
- * @filename: file name
- * @digest: 16 bytes buffer receiving the hash code.
- *
- * Get the md5 hash of a file. The result is put in
- * the 16 bytes buffer @digest .
- **/
-void
-md5_get_digest_from_file (const gchar *filename, guchar digest[16])
-{
- MD5Context ctx;
- guchar tmp_buf[1024];
- gint nb_bytes_read;
- FILE *fp;
-
- printf("generating checksum\n");
-
- md5_init (&ctx);
- fp = fopen(filename, "r");
- if (!fp) {
- return;
- }
-
- while ((nb_bytes_read = fread (tmp_buf, sizeof (guchar), 1024, fp)) > 0)
- md5_update (&ctx, tmp_buf, nb_bytes_read);
-
- if (ferror(fp)) {
- fclose(fp);
- return;
- }
-
-
- md5_final (&ctx, digest);
-
- printf("checksum done\n");
-}
-
-
-
-
diff --git a/e-util/md5-utils.h b/e-util/md5-utils.h
deleted file mode 100644
index 08e014e86e..0000000000
--- a/e-util/md5-utils.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * This code implements the MD5 message-digest algorithm.
- * The algorithm is due to Ron Rivest. This code was
- * written by Colin Plumb in 1993, no copyright is claimed.
- * This code is in the public domain; do with it what you wish.
- *
- * Equivalent code is available from RSA Data Security, Inc.
- * This code has been tested against that, and is equivalent,
- * except that you don't need to include two pages of legalese
- * with every copy.
- *
- * To compute the message digest of a chunk of bytes, declare an
- * MD5Context structure, pass it to rpmMD5Init, call rpmMD5Update as
- * needed on buffers full of bytes, and then call rpmMD5Final, which
- * will fill a supplied 16-byte array with the digest.
- */
-
-/* parts of this file are :
- * Written March 1993 by Branko Lankester
- * Modified June 1993 by Colin Plumb for altered md5.c.
- * Modified October 1995 by Erik Troan for RPM
- */
-
-
-#ifndef MD5_UTILS_H
-#define MD5_UTILS_H
-
-#include <glib.h>
-
-typedef struct {
- guint32 buf[4];
- guint32 bits[2];
- guchar in[64];
- gint doByteReverse;
-
-} MD5Context ;
-
-
-void md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16]);
-
-/* use this one when speed is needed */
-/* for use in provider code only */
-void md5_get_digest_from_file (const gchar *filename, guchar digest[16]);
-
-/* raw routines */
-void md5_init (MD5Context *ctx);
-void md5_update (MD5Context *ctx, const guchar *buf, guint32 len);
-void md5_final (MD5Context *ctx, guchar digest[16]);
-
-
-#endif /* MD5_UTILS_H */
diff --git a/executive-summary/.cvsignore b/executive-summary/.cvsignore
deleted file mode 100644
index a098ff204f..0000000000
--- a/executive-summary/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-core
-Makefile.in
-Makefile
-GNOME_Evolution_Summary.oaf
diff --git a/executive-summary/ChangeLog b/executive-summary/ChangeLog
deleted file mode 100644
index 3ab48d9509..0000000000
--- a/executive-summary/ChangeLog
+++ /dev/null
@@ -1,908 +0,0 @@
-2001-09-14 Ettore Perazzoli <ettore@ximian.com>
-
- [Automake 1.5 fixes pointed out by Richard Boulton
- <richard@tartarus.org>, as per #9258.]
-
- * executive-summary/component/Makefile.am (CLEANFILE): Assign
- directly with `=', not `+='.
- * executive-summary/evolution-services/Makefile.am: Likewise.
-
-2001-07-21 Ettore Perazzoli <ettore@ximian.com>
-
- * component/component-factory.c: Make the "executive-summary"
- folders non-user-creatable by setting `user_creatable' to %FALSE
- in the `EvolutionShellComponentFolderType's.
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * test-service/Makefile.am (test_service_LDADD): Remove DB3_LDADD
-
- * component/Makefile.am (evolution_executive_summary_LDADD):
- Remove DB3_LDADD
-
-2001-06-04 Ettore Perazzoli <ettore@ximian.com>
-
- * component/Makefile.am (evolution_executive_summary_LDADD): Move
- `libevolution-services.la' on top.
-
-2001-06-03 Ettore Perazzoli <ettore@ximian.com>
-
- * test-service/Makefile.am (rdf_summary_LDADD): Move
- `$(DB3_LDADD)' before the shared libraries.
-
- * component/Makefile.am (evolution_executive_summary_LDADD): Move
- `$(DB3_LDADD)' before libeutil.
-
-2001-06-01 Ettore Perazzoli <ettore@ximian.com>
-
- * component/Makefile.am (evolution_executive_summary_LDADD): Add
- `$(DB3_LDADD)'.
- * test-service/Makefile.am (test_service_LDADD): Likewise.
- (rdf_summary_LDADD): Likewise.
-
-2001-05-27 Dan Winship <danw@ximian.com>
-
- * component/e-summary-factory.c: #include
- "evolution-shell-component-utils.h" rather than "e-gui-utils.h"
- for e_pixmaps_update.
-
- * component/Makefile.am (evolution_executive_summary_LDADD): Use
- libeshell.la, not libeshell.a (Did Peter forget to commit this?)
-
-2001-05-25 Peter Williams <peterw@ximian.com>
-
- * component/Makefile.am: Reference libeshell.la instead of libeshell.a.
-
-2001-05-23 Kjartan Maraas <kmaraas@gnome.org>
-
- * component/e-summary-url.c: Mark a string for translation.
-
-2001-05-10 Iain Holmes <iain@ximian.com>
-
- * test-service/rdf-summary.c (load_from_stream): Set the time, not the
- timeout id. (duh!)
- (summary_to_string): Get the time, not the timeout id. (DUH!)
- (property_control): Connect the spin button to the item_changed callback.
-
-2001-05-10 Iain Holmes <iain@ximian.com>
-
- * test-service/rdf-summary.c (property_control): Don't let the spinner
- be set to 0
-
-2001-05-10 Iain Holmes <iain@ximian.com>
-
- * test-service/rdf-summary.c (download_cb): Proxy clicked events to
- download.
- (property_control): Connect the Update Now button to the download_cb
- instead of download to prevent a crash.
-
-2001-05-05 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component/Makefile.am, evolution-services/Makefile.am: no need of
- -DEVOLUTION_VERSION
-
- * component/e-summary-callbacks.c: translate window title.
-
- * component/e-summary-url.c (e_summary_url_describe): contents are in
- utf-8, convert to locale.
-
- * test-service/Makefile.am: define EVOLUTION_LOCALEDIR.
-
- * test-service/rdf-summary.c: init gettext.
-
-2001-05-02 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component/e-summary.c: set default content type of html to
- "text/html; charset=utf-8".
-
-2001-04-25 Dan Winship <danw@ximian.com>
-
- * idl/Makefile.am (INCLUDES): Remove this section, which doesn't
- apply to anything since there are no targets in this directory.
-
- * test-service/Makefile.am:
- * evolution-services/Makefile.am:
- * component/Makefile.am: Remove UNICODE_LIBS/UNICODE_CFLAGS
-
-2001-04-14 Michael Meeks <michael@ximian.com>
-
- * idl/Makefile.am: Remove stale build cruftiness.
-
-2001-04-10 Gediminas Paulauskas <menesis@delfi.lt>
-
- * widgets/e-summary-subwindow.c: added some missing includes.
- * widgets/e-summary-title-button.h: same.
-
-2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component/component-factory.c: last time I've broken shortcut view.
- renamed icons properly.
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component/component-factory.c: Changed folder type icon to tiny
- executive summary icon.
- * component/e-summary-factory.c: replaced set_pixmap with new EPixmap
- cache.
-
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * *.*: Clean up includes. Remove/replace <gnome.h>, <bonobo.h>
- and <gtk/gtk.h>.
-
-2001-03-08 Ettore Perazzoli <ettore@ximian.com>
-
- * component/component-factory.c (factory_fn): Specify a NULL
- `EvolutionShellComponentGetDndSelectionFn'.
-
-2001-02-14 Iain Holmes <iain@ximian.com>
-
- * component/e-summary-url.c (e_summary_url_click): Remove the new
- OTHER uri stuff.
-
-2001-02-14 Christopher James Lahey <clahey@ximian.com>
-
- * component/component-factory.c (component_destroy_cb): Removed
- this unused function.
-
- * evolution-services/executive-summary-html-view.c
- (impl_GNOME_Evolution_Summary_HTMLView_handleURI): Changed the
- declaration of this function to match the signature in the
- generated header file.
-
- * test-service/rdf-summary.c (property_control): Added a cast here.
-
-2001-02-14 Iain Holmes <iain@ximian.com>
-
- * evolution-services/executive-summary-html-view.c
- (executive_summary_html_view_destroy): Don't unref the event source.
- (impl_GNOME_Evolution_Summary_HTMLView_handleURI): Emit the signal.
- (corba_class_init): Hook up the handleURI method.
- (executive_summary_html_view_class_init): Create the signal.
-
- * idl/HTMLView.idl: Add the handleURI method.
-
-2001-02-13 Iain Holmes <iain@ximian.com>
-
- * test-service/rdf-summary.c (property_control): Add an update now button.
-
-2001-02-12 Iain Holmes <iain@ximian.com>
-
- * test-service/rdf-summary.c (property_control): Add a "Update" spinner.
- (property_action): Only download a new RDF if the URL changed. Use a cached
- version otherwise.
-
-2001-02-08 Iain Holmes <iain@ximian.com>
-
- * component/e-summary-url.c (e_summary_url_click): Close and remove the
- window on an idle, so that the whole desktop isn't locked by a
- GNOME-VFS bug.
-
-2001-02-13 Kjartan Maraas <kmaraas@gnome.org>
-
- * Makefile.am: xml-i18n-tools setup for .oaf.in files.
- * GNOME_Evolution_Summary.oaf.in: Mark strings for translation.
- * test-service/Makefile.am: xml-i18n-tools setup for .oaf.in files.
- * test-service/*.oaf.in: Mark strings for translation.
-
-2001-01-23 Iain Holmes <iain@ximian.com>
-
- * component/e-summary.c (e_summary_load_page): Don't strdup the NULL.
-
-2001-01-20 Iain Holmes <iain@ximian.com>
-
- * component/e-summary.c (e_summary_display_window): Free the html
- variable and the header too.
-
-2001-01-22 Christopher James Lahey <clahey@helixcode.com>
-
- * component/e-summary-url.c: Change the callbacks in this file to
- match the callback function types. Fixes warnings.
-
-2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * component/component-factory.c (factory_fn): Pass NULL as the
- @copy_folder_fn arg to `evolution_shell_component_new()'.
-
- * evolution-services/executive-summary-component.c
- (executive_summary_component_destroy): Remove unused variable.
-
-2001-01-12 Iain Holmes <iain@ximian.com>
-
- * component/e-summary-util.c (e_summary_rm_dir): If base == NULL return;
- Closes bug #37077
-
-2000-12-30 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_rebuild_page): The number of columns
- is no longer hardcoded.
-
- * component/e-summary-prefs.[ch]: Add a columns member, and all the
- necessary code to support it.
-
- * component/e-summary-callbacks.c: Set the columns member.
-
- * test-service/rdf-summary.c: Add a "Show title" button for turning off
- the title if it is taking up too much room.
-
-2000-12-29 Iain Holmes <iain@helixcode.com>
-
- * test-service/rdf-summary.c (view_destroyed): Cancel all pending
- async downloads.
- (load_from_stream): Check if the XML was correctly loaded.
- (read_callback):
- (close_callback):
- (open_callback): Add a cast to remove warnings
-
- * component/e-summary.c (listener_event): Check for the correct event names.
-
-2000-12-28 Iain Holmes <iain@helixcode.com>
-
- * test-service/rdf-summary.c (create_view): Aggregate a
- Bonobo::PersistStream interface.
- (load_from_stream):
- (summary_to_string):
- (save_to_stream):
- (content_types): Functions to load and save an XML document.
-
-2000-12-26 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (make_control_html): Neatened the code.
- (e_summary_add_service): Get the event source that is shared
- between everything.
-
- * component/e-summary-url.c (e_summary_url_click): Use the shared
- event source.
-
- * test-service/rdf-summary.c (create_view): Use the EventSource when
- creating the BonoboPropertyBag.
-
- * test-service/main.c (create_view): Create a shared BonoboEventSource.
-
-2000-12-21 Iain Holmes <iain@helixcode.com>
-
- * test-service/rdf-summary.c (download): Split this function into
- many callbacks, for async action.
-
- * component/e-summary-url.c (e_summary_url_request): Split this
- into async callbacks too.
-
-2000-12-13 Christopher James Lahey <clahey@helixcode.com>
-
- * component/e-summary-callbacks.c (configure_summary): Added a
- cast.
-
-2000-12-13 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_rebuild_page): Display all the windows
- correctly.
- (e_summary_save_state): Remove the whole of the Executive-Summary dir.
-
- * component/e-summary-util.[ch]: Add e_summary_rm_dir, a function to reove
- everything in the path. RC people have a function to do it too, but I can't
- remember how to get RC :)
-
- * component/e-summary-callbacks.c: (configure_summary): Put an HTML
- explanation into the configure dialog.
-
-2000-12-13 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_rebuild_page): Count the number
- of rows correctly.
-
-2000-12-12 Christopher James Lahey <clahey@helixcode.com>
-
- * component/e-summary-callbacks.c: Added #include
- <e-summary-callbacks.h>.
- (destroy_prefs_cb): Added a cast.
- (configure_summary): Added a cast.
-
- * component/e-summary-callbacks.h: Added #include "e-summary.h"
-
- * component/e-summary-url.c (e_summary_url_click): Removed an
- unused variable.
-
- * component/e-summary-util.c: Added #include <e-summary-util.h>
-
- * component/e-summary.c: Added #include <gtkhtml/htmlselection.h>.
- (e_summary_queue_rebuild): Added a cast.
-
- * component/main.c: Added #include <glade/glade.h>.
-
- * test-service/main.c: Changed some variable types to make casting
- easier.
-
- * test-service/rdf-summary.c: Changed some variable types to make
- casting easier.
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (EXTRA_DIST): Add stuff. (From campd.)
-
-2000-12-11 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-html-view.h: Add a define
- for the "html_changed" signal to name space it. Change the
- function declarations to fit with the below change too.
-
- * evolution-services/executive-summary-html-view.c
- (executive_summary_html_view_new): Create a default BonoboEventSource
- and use the new _full function.
- (executive_summary_html_view_new_full): Creates a new HtmlView with
- the given BonoboEventSource.
- (executive_summary_html_view_get_event_source): Returns the
- BonoboEventSource for the view.
- (executive_summary_html_view_set_html): Use the new #define for the event
- name.
-
- * test-service/rdf-summary.c (create_view): Share the BonoboEventSource
- between the HtmlView and the BonoboPropertyControl.
-
- * component/e-summary.c (html_event): Use the name spaced #define.
- (e_summary_start_load): Add a new hack to set the border width of the
- GtkHTML widget to 0.
- (e_summary_rebuild_page): Redid the way the tables are drawn. Made the
- title icon be constrained to 48.
-
- * evolution-services/executive-summary-component.c
- (impl_GNOME_Evolution_Summary_ComponentFactory_createViw): Fixed a warning.
-
- * component/e-summary-util (e_pixmap_file): Free the edir.
-
-2000-12-08 Iain Holmes <iain@helixcode.com>
-
- * summary.html: Don't hardcode the image paths.
-
-2000-12-08 JP Rosevear <jpr@helixcode.com>
-
- * component/Makefile.am (evolution-executive-summary.pure): Add purify
- options for the build
-
-2000-12-08 JP Rosevear <jpr@helixcode.com>
-
- * Makefile.am: Remove files from extra_dist since they are already
- listed
-
-2000-12-07 Iain Holmes <iain@helixcode.com>
-
- * summary.html: Prettier HTML summary.
-
- * Makefile.am: Install the new summary.html
-
- * component/e-summary.c (load_component): Free corba_subdir and
- corba_stream.
- (save_component): Free corba stuff.
-
-
-2000-12-06 Iain Holmes <iain@helixcode.com>
-
- * e-summary-callbacks.c (new_mail): Update COMPOSER_IID to the new
- style IIDs.
- (configure_summary): Set up to do stuff when preferences are changed.
-
- * e-summary-prefs.c (e_summary_prefs_save): Sync and drop the config file
- so that changes are written to disk.
-
- * e-summary.c (e_summary_reconfigure): Change the summary to the new
- preferences.
-
-2000-12-04 Iain Holmes <iain@helixcode.com>
-
- * test-service/rdf-summary.c (entry_changed): Add a NULL for opt_ev.
-
- * idl/HtmlView.idl: Inherit from Bonobo::Unknown and not
- Bonobo::EventSource.
-
- * evolution-services/executive-summary-html-view.[ch]: Change
- implementation of the EventSource so that it is aggregated onto
- the HtmlView object and not inherited.
-
- * component/e-summary.c (e_summary_window_free): Free the event_source.
- (e_summary_add_service): query for the EventSource interface.
-
-2000-12-01 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_load_state): Fix memory leak.
- (everywhere): Fixed memory leaks, and unref problems.
-
-2000-11-30 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_window_free): remove the
- event listener before destruction.
-
- * component/e-summary-url.c (e_summary_url_click): Handle the
- new PropertyControl api. Add a listener to detect when the page
- is changed, and adjust the property box accordingly.
-
- * test-service/main.c (create_view): Increment running view.
-
-2000-11-29 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c: Big memory leak cleanup.
-
-2000-11-28 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_display_window): If the HTML
- control dies, then just close the open tags.
-
- * component/e-summary-url (e_summary_url_click): Put the control
- into a GnomePropertyBox.
-
- * evolution-services/executive-summary-component.c
- (impl_GNOME_Evolution_Summary_ComponentFactory_createView):
- Duplicate the component.
-
-2000-11-27 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_window_free): Free all the
- interfaces and the component.
- (e_summary_load_state): Fix typos.
-
- * component/e-summary-prefs.c: Fix some typos.
-
- * component/e-summary-url.c: If configure is pressed, retrieve
- the control and embed it in a window.
-
- * test-services/main.c (component_destroyed): assign ud from data
- not from ud!
-
- * test-services/rdf-summary.c (view_destroyed): Connect this
- callback and free the summary.
- (property_control): Made a simple configuration dialog.
-
-2000-11-25 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary-prefs.[ch]: New files to handle loading,
- saving, copying and freeing preferences.
-
- * component/e-summary.c (e_summary_save_state): Use the new
- prefs stuff to save.
- (e_summary_load_state): Use the new prefs stuff to load.
-
- * component/e-summary-factory.c (set_pixmap): Use e_pixmap_file
- to find the pixbuf.
-
-2000-11-24 Iain Holmes <iain@helixcode.com>
-
- * idl/SummaryComponent.idl: Removed the setOwner and unsetOwner
- methods from the Component interface.
-
- * evolution-services/executive-summary.[ch]
- evolution-services/executive-summary-client.[ch]
- evolution-services/executive-summary-component-client.[ch]
- evolution-services/executive-summary-component-view.[ch]:
- Removed.
-
- * component/main.c (main): Stopped ignoring the signals.
-
- * component/executive-summary-config.glade: Glade file for the
- prefs dialog.
-
-2000-11-23 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary-factory.c (embed-service): Moved to
- e-summary-callbacks.c.
- (e_summary_factory_embed_from_id): Moved to e-summary.c and renamed
- e_summary_embed_from_id.
- Added a New Mail button.
-
- * component/e-summary-callbacks.c: New file.
-
-2000-11-22 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_save_state): removed the #if 0s
- and changed the save type to fs.
-
-2000-11-21 Iain Holmes <iain@helixcode.com>
-
- * test-services/rdf-summary.c: Rewrote to use the new services code.
-
- * idl/HtmlView.idl: Inherit from Bonobo::EventSource instead of
- Bonobo::Unknown.
-
-2000-11-20 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_save_state): #if 0'd out the
- PersistStream code till it is fixed.
- (e_summary_window_free): Only Bonobo_Unknown_unref the component,
- not all the other interfaces.
- (e_summary_remove_window): Function to remove the window from the
- window list and free it.
- (make_control_html): Make "id" the address of the window structure.
-
- * component/e-summary-url.c: Reimplemented all the functions that the
- Executive Summary had before the big code change.
-
-2000-11-18 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_save_state): Use Persist stream to
- save the state of all the components.
- (e_summary_load_state): Use Persist stream to load the components again.
- (e_summary_add_service): Add a Property Listener to the property bag to
- be notified of changes to the title or icon.
-
-2000-12-07 Dave Camp <dave@helixcode.com>
-
- * evolution-services/evolution-summary-component.c: Don't include
- executive-summary-client.h.
-
-2000-12-07 Dave Camp <dave@helixcode.com>
-
- * idl/Makefile.am (IDLS): Include HtmlView.idl
-
-2000-11-29 Dan Winship <danw@helixcode.com>
-
- * component/main.c (main): Remove no-longer-needed e_unicode_init.
-
-2000-17-10 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (make_control_html): Set the configure button
- active if there is a Bonobo_PropertyControl object associated with the
- window.
-
- * Makefile.am: Remove the widgets subdirectory.
-
-2000-16-10 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_display_window): Use the property
- bag to get the window title and icon.
-
- * test-service/main.c: (create_view): Add a PropertyBag to the object.
- (set_property): Set the properties.
- (get_property): Get the properties.
-
-2000-15-10 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-component-factory-client.[ch]:
- A client for the factory stuff.
-
-2000-14-10 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-html-view.[ch]: Implementation
- of the HtmlView interface.
-
- * component/e-summary-factory.c
- (e_summary_factory_embed_service_from_id): Rewrote to use the new
- component_factory.
-
- * component/e-summary.c (e_summary_add_service): Rewrote to use
- the new component stuff. Lots of queryInterfaces :)
- (e_summary_window_free): Rewrote.
-
- * test-service/main.c: Rewrote completely as an example of the
- new services.
-
-2000-13-10 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-component.c:
- Created the ExecutiveSummaryComponentFactory type, that implements
- GNOME/Evolution/Summary/ComponentFactory. Changed the way
- GNOME/Evolution/Summary/Component is implemented.
-
- * idl/SummaryComponent.idl: Removed all methods from Component
- execpt setOwner and unsetOwner. Added ComponentFactory interface
- with a createView method.
-
- * idl/HtmlView.idl: New interface for HTML services. One method
- getHtml.
-
-2000-11-10 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-component-view.c
- (executive_summary_component_view_set_title): Removed the
- "wrong side" warning.
-
- * component/e-summary-factory.c (set_icon): Change the view's
- icon.
- (e_summary_factory_embed_service_from_id): Connect to the set_icon
- signal.
-
-2000-11-09 Iain Holmes <iain@helixcode.com>
-
- * test-service/rdf-summary.c: Made Alan Cox's rdf-engine.c from
- Portaloo into a summary component.
-
-2000-11-08 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_window_free): Remove the view
- from the id_to_view hash table.
- (make_control_html): Fix the bottom row comparison.
-
-2000-11-07 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_load_state): Load the HTML
- page for the background.
- (load_html_page): Use GnomeVFS to load this page, and split it
- into a header and footer.
- (e_summary_rebuild_page): If a header and footer exist, use them
- otherwise just load the default.
-
-2000-11-06 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (on_object_requested): Load a bonobo
- service and try to get it to display (Not working yet).
-
-2000-11-04 Iain Holmes <iain@helixcode.com>
-
- * test-service/test-bonobo.c: New file to test Bonobo control
- based services.
-
- * test-service/test-service.oafinfo: Added the details for the
- test-bonobo service.
-
-2000-11-03 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (make_control_html): Make a neater
- function to create the window controls. Check if a window can
- be moved in a certain direction before making a link.
-
- * evolution-services/executive-summary-component-view.c: Added a
- GtkWidget to the private structure to store the control's widget.
-
-2000-11-03 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-component-view.c:
- (executive_summary_component_view_class_init): Add a "configure"
- signal.
-
- * evolution-services/executive-summary-component-view.h: Add the
- default handler in the class type.
-
- * idl/SummaryComponent.idl: Add an id to the configure method.
-
- * evolution-services/executive-summary-component-client.[ch]:
- executive_summary_component_client_configure: Takes a View param.
-
- * component/e-summary-factory.c: Connect to the configure signal
- of the created view and call the configure method.
-
- * component/e-summary-url.c: When the [?] is clicked, emit the
- configure signal.
-
- * test-service/main.c: Connect the configure signal to something.
-
-2000-11-21 Radek Doulik <rodo@helixcode.com>
-
- * component/e-summary.c (e_summary_rebuild_page): use html_engine_is_selection_active
- added some includes
-
-2000-11-11 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * component/e-summary-factory.c: (control_activate_cb),
- (embed_service):
- * evolution-executive-summary.oafinfo:
- * test-service/test-service.oafinfo:
- Update the remaining "IDL:Evolution*" to "IDL:GNOME/Evolution*"
- to sync up with yesterday's IDL re-scoping.
-
-2000-11-10 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * component/Makefile.am: Regenerate the idl-generated files
- if composer idl changes.
-
-2000-11-03 Federico Mena Quintero <federico@helixcode.com>
-
- * evolution-services/Makefile.am: Clean the idl-generated files
- properly.
-
-2000-11-01 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c:
- component/e-summary-factory.c:
- component/e-summary-url.c: Warning's cleanup.
-
-2000-11-01 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_rebuild_page): Requeue the redraw
- if there is a selection on the widget.
-
-2000-11-01 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_display_window): Draw the window
- controls to move, close and configure the window.
- (e_summary_window_move_(left|right|up|down)): Move the window around the
- window list.
-
- * component/e-summary-url.c (e_summary_url_click): Add handlers for the
- window control URIs (close:// configure:// up:// down:// left:// and
- right://).
- (get_protocol): Add support for the new protocols.
- (parse_uri): Ditto.
- (e_summary_url_describe): ditto.
-
-2000-10-30 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary-factory.c (embed_service): Generate the uid here
- and pass it into the create_view method.
-
- * evolution-services/executive-summary-component-client.c
- (executive_summary_component_client_create_view): Use the passed in UID
- to generate a view.
-
- * evolution-services/executive-summary-component.c
- (impl_Evolution_SummaryComponent_create_view): Don't generate the id here
- but use the passed in one instead.
-
- * idl/SummaryComponent.idl: create_view now takes an ID parameter.
-
-2000-10-26 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (load_default): Neaten the Report bug link.
- (e_summary_end_load): Put in a <hr> and a mailto to me.
- (e_summary_new): Create an EvolutionShellClient from the Evolution_Shell.
- (e_summary_get_shell_client): Retrieve the shell-client.
-
- * component/e-summary-url.c (e_summary_url_click): On a PROTOCOL_VIEW
- change the current view to the one specified in the URL.
-
-2000-10-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * component/Makefile.am (INCLUDES): Add
- `-I$(top_builddir)/executive-summary/evolution-services' and
- `-I$(top_srcdir)/executive-summary/evolution-services'.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary-url.c (e_summary_url_exec): Execute a program
- specified in the format "exec://program args".
- (e_summary_url_mail_compose): Run the mail composer when a mailto:
- URL is clicked.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (e_summary_start_load): Add a hack to stop the
- GtkHTML widget returning to the top when it is redrawn.
-
- * component/e-summary-url.[ch]
- * component/e-summary-util.[ch]: Split some functions out of e-summary.c
-
- * component/Makefile.am: Added the new files, and run orbit-idl on the
- mail composer idl.
-
-2000-10-25 <jpr@helixcode.com>
-
- * component/e-summary-factory.c (control_activate): User
- bonobo_control_get_remote_uid_container, not the old version
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * test-service/main.c: Store each individual views data with the view.
- Add comments to explain everything.
-
- * evolution-services/executive-summary-component.c
- (impl_Evolution_SummaryComponent_create_view): Only try to create a
- control if the returned control != NULL.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary-component.c
- (impl_Evolution_SummaryComponent_create_view): Set the UID of the view
- before passing it to the create_view method.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * idl/Summary.idl: Added set_icon method, and changed update_html_component
- to update_component. Made all methods take a long ID instead of an
- SummaryComponent.
-
- * idl/SummaryComponent.idl: Combined the create_bonobo_view and
- create_html_view into create_view.
- Added a destroy_view method.
-
- * evolution-services/Makefile.am: Added the 2 new files.
-
- * evolution-services/executive-summary-component-view.[ch]: New
- files implementing a view of an ExecutiveSummaryComponent.
-
- * evolution-services/executive-summary.[ch]
- * evolution-services/executive-summary-client.[ch]
- * evolution-services/executive-summary-component.[ch]
- * evolution-services/executive-summary-component-client.[ch]:
- * component/e-summary-factory.c
- * component/e-summary.c
- * test-service/main.c:
- Updated to use new methods and the new ExecutiveSummaryComponentView
- object.
-
-2000-10-16 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/executive-summary.c (executive_summary_class_init):
- Implement the update, set_title and flash functionality as signals
- instead of methods.
- (impl_Evolution_Summary_set_title): Emit signal.
- (impl_Evolution_Summary_flash): Emit signal.
- (impl_Evolution_Summary_update_html_component): Emit signal.
- (executive_summary_new): Don't need the methods anymore.
- (executive_summary_construct): Same.
- (executive_summary_init): Remove the private initialisation.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * idl/Makefile.am (INCLUDES):
- * evolution-services/Makefile.am (INCLUDES):
- * component/Makefile.am (INCLUDES): Update EVOLUTION_LOCALEDIR
-
-2000-10-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * evolution-executive-summary.oafinfo: Added
- "evolution:shell-component-icon" property.
-
-2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
-
- * evolution-services/Makefile.am (IDLS): make the built sources
- depend on the idl files
-
-2000-10-09 Iain Holmes <iain@helixcode.com>
-
- * idl/SummaryComponent.idl: Added an icon parameter to the
- create_view methods.
-
- * evolution-services/executive-summary-component.c: Implement
- the icon parameter.
-
- * evolution-services/executive-summary-component-client.c: Ditto
-
- * component/e-summary.c: Draw the specified icon.
-
- * component/e-summary-factory.c: Use the icon parameter.
-
-2000-10-09 Iain Holmes <iain@helixcode.com>
-
- * evolution-services/Makefile.am: Added $(EXTRA_GNOME_CFLAGS) to
- find gnomesupport.h
-
-2000-10-06 Iain Holmes <iain@helixcode.com>
-
- * component/e-summary.c (request_cb): Use gnome-vfs to retrieve
- the requested files. Allows services to specify remote urls.
- (load_default, e_summary_display_window, e_summary_rebuild_page):
- Change the html to match TigerT's lovely design.
- (e_summary_add_html_service, e_summary_add_html_service): Add
- the client argument so we can destroy it when we've quit.
- (e_summary_window_update): Only do an update if there isn't one
- pending.
-
- * component/e-summary-factory.c (embed_service): upd.
-
- * test-service/main.c: Made the test service be really silly and count
- the number of seconds since it was started.
-
-2000-10-06 Ettore Perazzoli <ettore@helixcode.com>
-
- * component/Makefile.am (INCLUDES): Fix builddir != srcdir.
-
-2000-10-05 Chris Toshok <toshok@helixcode.com>
-
- * widgets/.cvsignore: ignore more stuff.
-
- * .cvsignore: ignore more stuff.
-
- * idl/.cvsignore: ignore more stuff.
-
- * evolution-services/.cvsignore: ignore more stuff.
-
- * component/.cvsignore: ignore more stuff.
-
- * .cvsignore: add Makefile
-
-2000-10-05 Chris Toshok <toshok@helixcode.com>
-
- * component/component-factory.c: include
- <gal/widgets/e-gui-utils.h> instead of "e-util/e-gui-utils.h" to
- clear up e_notice declaration, and #include <gnome.h> to get "_".
-
-2000-10-05 Michael Meeks <michael@helixcode.com>
-
- * component/e-summary-factory.c (control_activate): upd.
- (set_pixmap): upd. (update_pixmaps): upd.
- (control_activate_cb): upd.
- (control_deactivate): upd.
-
-2000-10-04 Iain Holmes <iain@helixcode.com>
-
- * idl/SummaryComponent.idl: Added a title argument to the
- create_view methods.
-
-2000-09-13 Iain Holmes <iain@helixcode.com>
-
- * Started the Executive Summary
diff --git a/executive-summary/GNOME_Evolution_Summary.oaf.in b/executive-summary/GNOME_Evolution_Summary.oaf.in
deleted file mode 100644
index eeffbe28c0..0000000000
--- a/executive-summary/GNOME_Evolution_Summary.oaf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponentFactory"
- type="exe"
- location="evolution-executive-summary">
- <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 executive summary component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Summary_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 the executive summary."/>
-
- <oaf_attribute name="evolution:shell-component-icon" type="string"
- value="evolution-today.png"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/executive-summary/Makefile.am b/executive-summary/Makefile.am
deleted file mode 100644
index 6d9aa83a17..0000000000
--- a/executive-summary/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-SUBDIRS = idl evolution-services component test-service
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Summary.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-htmldir = $(datadir)/evolution
-html_DATA = summary.html
-
-EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) $(html_DATA)
diff --git a/executive-summary/component/.cvsignore b/executive-summary/component/.cvsignore
deleted file mode 100644
index 75f1a012f2..0000000000
--- a/executive-summary/component/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-core
-Makefile.in
-Makefile
-.deps
-.libs
-evolution-executive-summary
-Composer-common.c
-Composer.h
-Composer-stubs.c
-Composer-skels.c \ No newline at end of file
diff --git a/executive-summary/component/Makefile.am b/executive-summary/component/Makefile.am
deleted file mode 100644
index 870746bf1e..0000000000
--- a/executive-summary/component/Makefile.am
+++ /dev/null
@@ -1,88 +0,0 @@
-bin_PROGRAMS = evolution-executive-summary
-
-INCLUDES = \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/widgets/e-text \
- -I$(top_srcdir) \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_builddir)/executive-summary \
- -I$(top_srcdir)/executive-summary \
- -I$(top_builddir)/executive-summary/evolution-services \
- -I$(top_srcdir)/executive-summary/evolution-services \
- $(EXTRA_GNOME_CFLAGS) \
- $(GNOME_VFS_CFLAGS) \
- $(GTKHTML_CFLAGS) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DG_LOG_DOMAIN=\"evolution-executive-summary\"
-
-COMPOSER_GENERATED = \
- Composer.h \
- Composer-common.c \
- Composer-skels.c \
- Composer-stubs.c
-
-Composer-impl.o: Composer.h
-
-selectnamesdir = $(top_srcdir)/addressbook/gui/component/select-names
-
-IDLS = \
- $(selectnamesdir)/Evolution-Addressbook-SelectNames.idl \
- $(top_srcdir)/composer/Evolution-Composer.idl \
- $(top_srcdir)/composer/Composer.idl
-
-$(COMPOSER_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(top_srcdir)/composer/Composer.idl
-
-evolution_executive_summary_SOURCES = \
- $(COMPOSER_GENERATED) \
- component-factory.c \
- component-factory.h \
- e-summary.c \
- e-summary.h \
- e-summary-callbacks.c \
- e-summary-callbacks.h \
- e-summary-factory.c \
- e-summary-factory.h \
- e-summary-prefs.c \
- e-summary-prefs.h \
- e-summary-url.c \
- e-summary-url.h \
- e-summary-util.c \
- e-summary-util.h \
- main.c
-
-evolution_executive_summary_LDADD = \
- $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- -lgal \
- $(GTKHTML_LIBS)
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = executive-summary-config.glade
-
-if ENABLE_PURIFY
-PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-
-all-local: evolution-executive-summary.pure
-
-evolution-executive-summary.pure: evolution-executive-summary
- @rm -f evolution-executive-summary.pure
- $(PLINK) $(evolution_executive_summary_OBJECTS) $(evolution_executive_summary_LDADD) $(LIBS)
-
-endif
-
-EXTRA_DIST = $(glade_DATA)
-CLEANFILES = $(COMPOSER_GENERATED)
-BUILT_SOURCES = $(COMPOSER_GENERATED)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/executive-summary/component/component-factory.c b/executive-summary/component/component-factory.c
deleted file mode 100644
index 0c727c40ba..0000000000
--- a/executive-summary/component/component-factory.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Iain Holmes <iain@ximian.com>
- *
- * 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 <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-
-#include "evolution-shell-component.h"
-#include <gal/widgets/e-gui-utils.h>
-
-#include "component-factory.h"
-#include "e-summary-factory.h"
-
-#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Summary_ShellComponentFactory"
-
-static BonoboGenericFactory *factory = NULL;
-static gint running_objects = 0;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "executive-summary", "evolution-today.png", FALSE, NULL, NULL },
- { NULL, NULL }
-};
-
-char *evolution_dir;
-
-/* EvolutionShellComponent methods and signals */
-
-static EvolutionShellComponentResult
-create_view (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *folder_type,
- BonoboControl **control_return,
- void *closure)
-{
- EvolutionShellClient *shell_client;
- GNOME_Evolution_Shell corba_shell;
- BonoboControl *control;
-
- if (g_strcasecmp (folder_type, "executive-summary") != 0)
- return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
-
- shell_client = evolution_shell_component_get_owner (shell_component);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-
- control = e_summary_factory_new_control (physical_uri, corba_shell);
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_NOTFOUND;
-
- *control_return = control;
-
- return EVOLUTION_SHELL_COMPONENT_OK;
-}
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- GNOME_Evolution_Shell corba_shell;
-
- evolution_dir = g_strdup (evolution_homedir);
-
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- gpointer user_data)
-{
- gtk_main_quit ();
-}
-
-static void
-factory_destroy (BonoboObject *component,
- gpointer dummy)
-{
- running_objects--;
-
- if (running_objects > 0)
- return;
-
- if (factory)
- bonobo_object_unref (BONOBO_OBJECT (factory));
- else
- g_warning ("Serious ref counting error");
- factory = NULL;
-
- gtk_main_quit ();
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionShellComponent *shell_component;
-
- running_objects++;
-
- shell_component = evolution_shell_component_new (folder_types,
- create_view,
- NULL, NULL, NULL, NULL, NULL,
- NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "destroy",
- GTK_SIGNAL_FUNC (factory_destroy), 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
-component_factory_init (void)
-{
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID,
- factory_fn, NULL);
-
- if (factory == NULL) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's Executive Summary component."));
- exit (1);
- }
-}
diff --git a/executive-summary/component/component-factory.h b/executive-summary/component/component-factory.h
deleted file mode 100644
index ff1f2c2bc9..0000000000
--- a/executive-summary/component/component-factory.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.h
- *
- * 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
- */
-
-#ifndef COMPONENT_FACTORY_H
-#define COMPONENT_FACTORY_H
-
-void component_factory_init (void);
-
-#endif
-
-
diff --git a/executive-summary/component/e-summary-callbacks.c b/executive-summary/component/e-summary-callbacks.c
deleted file mode 100644
index ddad892891..0000000000
--- a/executive-summary/component/e-summary-callbacks.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-callbacks.c
- *
- * Author:
- * Iain Holmes <iain@ximian.com>
- *
- * 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 <libgnomeui/gnome-propertybox.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <bonobo/bonobo-selector.h>
-
-#include <stdlib.h> /* For atoi */
-
-#include <liboaf/liboaf.h>
-#include <glade/glade.h>
-#include <gtkhtml/gtkhtml.h>
-#include <e-util/e-html-utils.h>
-
-#include "e-summary.h"
-#include "e-summary-callbacks.h"
-
-#include "Composer.h"
-
-#define COMPOSER_IID "OAFIID:GNOME_Evolution_Mail_Composer"
-typedef struct _PropertyData {
- ESummary *esummary;
- GnomePropertyBox *box;
- GladeXML *xml;
-} PropertyData;
-
-/* HTML helper functions from mail/mail-config-gui.c */
-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,
- const char *text)
-{
- GtkHTMLStream *handle;
- char *htmltext;
-
- htmltext = 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 (htmltext);
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
-}
-
-void
-embed_service (GtkWidget *widget,
- ESummary *esummary)
-{
- char *required_interfaces[2] = {"IDL:GNOME/Evolution:Summary:ComponentFactory:1.0",
- NULL};
- char *obj_id;
-
- obj_id = bonobo_selector_select_id (_("Select a service"),
- (const char **) required_interfaces);
- if (obj_id == NULL)
- return;
-
- e_summary_embed_service_from_id (esummary, obj_id);
-}
-
-void
-new_mail (GtkWidget *widget,
- ESummary *esummary)
-{
- GNOME_Evolution_Composer_RecipientList *to, *cc, *bcc;
- CORBA_char *subject;
- CORBA_Object composer;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- composer = oaf_activate_from_id ((char *)COMPOSER_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION || composer == NULL) {
- CORBA_exception_free (&ev);
- g_warning ("Unable to start composer component!");
- return;
- }
- CORBA_exception_free (&ev);
-
- to = GNOME_Evolution_Composer_RecipientList__alloc ();
- to->_length = 0;
- to->_maximum = 0;
- to->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (0);
-
- cc = GNOME_Evolution_Composer_RecipientList__alloc ();
- cc->_length = 0;
- cc->_maximum = 0;
- cc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (0);
-
- bcc = GNOME_Evolution_Composer_RecipientList__alloc ();
- bcc->_length = 0;
- bcc->_maximum = 0;
- bcc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (0);
-
- subject = CORBA_string_dup ("");
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Composer_setHeaders (composer, to, cc,
- bcc, subject, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- CORBA_free (to);
- CORBA_free (cc);
- CORBA_free (bcc);
- CORBA_free (subject);
-
- g_warning ("Error setting headers!");
- return;
- }
-
- CORBA_free (to);
- CORBA_free (cc);
- CORBA_free (bcc);
- CORBA_free (subject);
-
- GNOME_Evolution_Composer_show (composer, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- g_warning ("Error showing composer");
- return;
- }
-
- CORBA_exception_free (&ev);
- return;
-}
-
-static void
-destroy_prefs_cb (GtkObject *object,
- PropertyData *data)
-{
- gtk_object_unref (GTK_OBJECT(data->xml));
- g_free (data);
-}
-
-static void
-html_page_changed_cb (GtkEntry *entry,
- PropertyData *data)
-{
- ESummaryPrefs *prefs;
-
- /* Change the tmp prefs so that we can restore if the user cancels */
- prefs = data->esummary->tmp_prefs;
-
- if (prefs->page)
- g_free (prefs->page);
-
- prefs->page = g_strdup (gtk_entry_get_text (entry));
-
- gnome_property_box_changed (data->box);
-}
-
-static void
-column_spinner_changed_cb (GtkEntry *entry,
- PropertyData *data)
-{
- ESummaryPrefs *prefs;
- char *value;
-
- prefs = data->esummary->tmp_prefs;
-
- gnome_property_box_changed (data->box);
- value = gtk_entry_get_text (entry);
- if (value == NULL || *value == '\0')
- return;
-
- prefs->columns = atoi (value);
-}
-
-static void
-apply_prefs_cb (GnomePropertyBox *property_box,
- int page,
- ESummary *esummary)
-{
- g_print ("Applying\n");
-
- if (page != -1)
- return;
-
- esummary->prefs = e_summary_prefs_copy (esummary->tmp_prefs);
-
- e_summary_reconfigure (esummary);
-}
-
-void
-configure_summary (GtkWidget *widget,
- ESummary *esummary)
-{
- static GtkWidget *prefs = NULL;
- PropertyData *data;
- GtkWidget *html_page;
- GtkWidget *vbox, *html, *spinner;
- char *tmp;
-
- if (prefs != NULL) {
- g_assert (GTK_WIDGET_REALIZED (prefs));
- gdk_window_show (prefs->window);
- gdk_window_raise (prefs->window);
- return;
- }
-
- data = g_new (PropertyData, 1);
- data->esummary = esummary;
-
- if (esummary->tmp_prefs != NULL) {
- e_summary_prefs_free (esummary->tmp_prefs);
- }
-
- esummary->tmp_prefs = e_summary_prefs_copy (esummary->prefs);
-
- data->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/executive-summary-config.glade", NULL);
- prefs = glade_xml_get_widget (data->xml, "summaryprefs");
- data->box = GNOME_PROPERTY_BOX(prefs);
-
- vbox = glade_xml_get_widget (data->xml, "vbox");
- html = html_new (TRUE);
- put_html (GTK_HTML(html),
- _("You can select a different HTML page for the background "
- "of the Executive Summary.\n\nJust leave it blank for the "
- "default"));
- gtk_box_pack_start (GTK_BOX (vbox), html->parent->parent, TRUE, TRUE, 0);
- gtk_box_reorder_child (GTK_BOX (vbox), html->parent->parent, 0);
-
- html_page = glade_xml_get_widget (data->xml, "htmlpage");
-
- if (esummary->prefs->page != NULL)
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (html_page))), esummary->prefs->page);
-
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (html_page))),
- "changed", GTK_SIGNAL_FUNC (html_page_changed_cb),
- data);
-
- spinner = glade_xml_get_widget (data->xml, "columnspinner");
-
- tmp = g_strdup_printf ("%d", esummary->prefs->columns);
- gtk_entry_set_text (GTK_ENTRY (spinner), tmp);
- g_free (tmp);
- gtk_signal_connect (GTK_OBJECT (spinner), "changed",
- GTK_SIGNAL_FUNC (column_spinner_changed_cb), data);
-
- gtk_signal_connect (GTK_OBJECT (prefs), "apply",
- GTK_SIGNAL_FUNC (apply_prefs_cb), esummary);
-
- gtk_signal_connect (GTK_OBJECT (prefs), "destroy",
- GTK_SIGNAL_FUNC (destroy_prefs_cb), data);
- gtk_signal_connect (GTK_OBJECT (prefs), "destroy",
- GTK_SIGNAL_FUNC (gtk_widget_destroyed), &prefs);
-}
-
diff --git a/executive-summary/component/e-summary-callbacks.h b/executive-summary/component/e-summary-callbacks.h
deleted file mode 100644
index 6b908d694c..0000000000
--- a/executive-summary/component/e-summary-callbacks.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __E_SUMMARY_CALLBACKS_H__
-#define __E_SUMMARY_CALLBACKS_H__
-
-#include "e-summary.h"
-
-void embed_service (GtkWidget *widget,
- ESummary *esummary);
-void new_mail (GtkWidget *widget,
- ESummary *esummary);
-void configure_summary (GtkWidget *widget,
- ESummary *esummary);
-#endif
diff --git a/executive-summary/component/e-summary-factory.c b/executive-summary/component/e-summary-factory.c
deleted file mode 100644
index 4562952f69..0000000000
--- a/executive-summary/component/e-summary-factory.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-factory.c
- *
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Iain Holmes <iain@ximian.com>
- *
- * 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 <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include <liboaf/liboaf.h>
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gal/util/e-util.h>
-#include "evolution-shell-component-utils.h"
-
-#include "e-summary-factory.h"
-
-#include "e-summary.h"
-#include "e-summary-util.h"
-#include "e-summary-callbacks.h"
-#include "Evolution.h"
-
-#include <evolution-services/Executive-Summary.h>
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-component-factory-client.h>
-
-static GList *control_list = NULL;
-
-BonoboUIVerb verbs[] = {
- BONOBO_UI_UNSAFE_VERB ("AddService", embed_service),
- BONOBO_UI_UNSAFE_VERB ("NewMail", new_mail),
- BONOBO_UI_UNSAFE_VERB ("ESummarySettings", configure_summary),
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/Toolbar/AddService", "buttons/add-service.png"),
- E_PIXMAP ("/Toolbar/NewMail", "buttons/compose-message.png"),
- E_PIXMAP_END
-};
-
-static void
-control_activate (BonoboControl *control,
- BonoboUIComponent *ui_component,
- ESummary *esummary)
-{
- Bonobo_UIContainer container;
-
- container = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (ui_component, container);
- bonobo_object_release_unref (container, NULL);
-
- bonobo_ui_component_add_verb_list_with_data (ui_component, verbs, esummary);
-
- bonobo_ui_component_freeze (ui_component, NULL);
-
- bonobo_ui_util_set_ui (ui_component, EVOLUTION_DATADIR,
- "evolution-executive-summary.xml",
- "evolution-executive-summary");
-
- e_pixmaps_update (ui_component, pixmaps);
-
- bonobo_ui_component_thaw (ui_component, NULL);
-}
-
-static void
-control_deactivate (BonoboControl *control,
- BonoboUIComponent *ui_component,
- ESummary *esummary)
-{
- e_summary_unset_message (esummary);
- bonobo_ui_component_unset_container (ui_component);
-}
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
- gpointer user_data)
-{
- ESummary *summary;
- BonoboUIComponent *ui_component;
- Bonobo_ControlFrame control_frame;
- GNOME_Evolution_ShellView shell_view_interface;
- CORBA_Environment ev;
-
- ui_component = bonobo_control_get_ui_component (control);
- g_assert (ui_component != NULL);
-
- if (gtk_object_get_data (GTK_OBJECT (control), "shell_view_interface") == NULL) {
- control_frame = bonobo_control_get_control_frame (control);
- if (control_frame == NULL) {
- goto out;
- }
-
- 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.");
- }
-
- summary = E_SUMMARY (user_data);
- e_summary_set_shell_view_interface (summary,
- shell_view_interface);
- }
-
- out:
- if (activate)
- control_activate (control, ui_component, user_data);
- else
- control_deactivate (control, ui_component, user_data);
-}
-
-static void
-control_destroy_cb (BonoboControl *control,
- gpointer user_data)
-{
- GtkWidget *esummary = user_data;
-
- control_list = g_list_remove (control_list, control);
-
- gtk_object_destroy (GTK_OBJECT (esummary));
-}
-
-BonoboControl *
-e_summary_factory_new_control (const char *uri,
- const GNOME_Evolution_Shell shell)
-{
- BonoboControl *control;
- GtkWidget *esummary;
-
- esummary = e_summary_new (shell);
- if (esummary == NULL)
- return NULL;
-
- gtk_widget_show (esummary);
-
- control = bonobo_control_new (esummary);
-
- if (control == NULL) {
- gtk_object_destroy (GTK_OBJECT (esummary));
- return NULL;
- }
-
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- control_activate_cb, esummary);
-
- gtk_signal_connect (GTK_OBJECT (control), "destroy",
- control_destroy_cb, esummary);
-
- control_list = g_list_prepend (control_list, control);
-
- return control;
-}
diff --git a/executive-summary/component/e-summary-factory.h b/executive-summary/component/e-summary-factory.h
deleted file mode 100644
index 6fc7de7117..0000000000
--- a/executive-summary/component/e-summary-factory.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-factory.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_FACTORY_H__
-#define _E_SUMMARY_FACTORY_H__
-
-#include <Evolution.h>
-#include "e-summary.h"
-
-BonoboControl *e_summary_factory_new_control (const char *uri,
- const GNOME_Evolution_Shell shell);
-ESummaryWindow *e_summary_factory_embed_service_from_id (ESummary *esummary,
- const char *obj_id);
-
-#endif
diff --git a/executive-summary/component/e-summary-prefs.c b/executive-summary/component/e-summary-prefs.c
deleted file mode 100644
index 68de19e95f..0000000000
--- a/executive-summary/component/e-summary-prefs.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-prefs.c: Preference handling routines.
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <stdio.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-config.h>
-#include "e-summary-prefs.h"
-#include "e-summary.h"
-
-void
-e_summary_prefs_free (ESummaryPrefs *prefs)
-{
- g_return_if_fail (prefs != NULL);
-
- g_free (prefs->page);
- g_free (prefs);
-}
-
-ESummaryPrefs *
-e_summary_prefs_new (void)
-{
- ESummaryPrefs *prefs;
-
- prefs = g_new0 (ESummaryPrefs, 1);
- return prefs;
-}
-
-ESummaryPrefs *
-e_summary_prefs_copy (ESummaryPrefs *prefs)
-{
- ESummaryPrefs *copy;
-
- g_return_val_if_fail (prefs != NULL, NULL);
-
- copy = e_summary_prefs_new ();
- copy->page = g_strdup (prefs->page);
- copy->columns = prefs->columns;
-
- return copy;
-}
-
-gboolean
-e_summary_prefs_compare (ESummaryPrefs *p1,
- ESummaryPrefs *p2)
-{
- if (p1 == p2)
- return TRUE;
-
- if (strcmp (p1->page, p2->page) == 0)
- return TRUE;
-
- if (p1->columns == p2->columns)
- return TRUE;
-
- return FALSE;
-}
-
-ESummaryPrefs *
-e_summary_prefs_load (const char *path)
-{
- ESummaryPrefs *prefs;
- char *item;
-
- g_return_val_if_fail (path != NULL, NULL);
- g_return_val_if_fail (*path != '\0', NULL);
-
- prefs = e_summary_prefs_new ();
-
- item = g_strdup_printf ("=%s/e-summary=/executive-summary/page", path);
- prefs->page = gnome_config_get_string (item);
- g_free (item);
-
- item = g_strdup_printf ("=%s/e-summary=/executive-summary/columns=3", path);
- prefs->columns = gnome_config_get_int (item);
- g_free (item);
- return prefs;
-}
-
-void
-e_summary_prefs_save (ESummaryPrefs *prefs,
- const char *path)
-{
- char *item;
-
- g_return_if_fail (prefs != NULL);
- g_return_if_fail (path != NULL);
- g_return_if_fail (*path != '\0');
-
- item = g_strdup_printf ("=%s/e-summary=/executive-summary/page", path);
- gnome_config_set_string (item, prefs->page);
- g_free (item);
-
- item = g_strdup_printf ("=%s/e-summary=/executive-summary/columns", path);
- gnome_config_set_int (item, prefs->columns);
- g_free (item);
-
- gnome_config_sync ();
- gnome_config_drop_all ();
-}
diff --git a/executive-summary/component/e-summary-prefs.h b/executive-summary/component/e-summary-prefs.h
deleted file mode 100644
index a1535e787c..0000000000
--- a/executive-summary/component/e-summary-prefs.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-prefs.h: Preference handling routines.
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 __E_SUMMARY_PREFS_H__
-#define __E_SUMMARY_PREFS_H__
-
-typedef struct _ESummaryPrefs ESummaryPrefs;
-struct _ESummaryPrefs {
- char *page; /* Background HTML page URL */
- int columns; /* Number of components per row (Default = 3) */
-
- /* If anything is added here, don't forget to add
- copy, compare, load and save routines to the appropriate
- functions. */
-};
-
-ESummaryPrefs *e_summary_prefs_new (void);
-void e_summary_prefs_free (ESummaryPrefs *prefs);
-ESummaryPrefs *e_summary_prefs_copy (ESummaryPrefs *prefs);
-gboolean e_summary_prefs_compare (ESummaryPrefs *p1,
- ESummaryPrefs *p2);
-ESummaryPrefs *e_summary_prefs_load (const char *path);
-void e_summary_prefs_save (ESummaryPrefs *prefs,
- const char *path);
-
-#endif
diff --git a/executive-summary/component/e-summary-url.c b/executive-summary/component/e-summary-url.c
deleted file mode 100644
index 16fd41c786..0000000000
--- a/executive-summary/component/e-summary-url.c
+++ /dev/null
@@ -1,852 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-url.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <bonobo/bonobo-property-control.h>
-#include <bonobo/bonobo-event-source.h>
-#include <bonobo/bonobo-widget.h>
-
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-url.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnomeui/gnome-propertybox.h>
-
-#include <stdlib.h>
-
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <liboaf/liboaf.h>
-
-#include <libgnomevfs/gnome-vfs.h>
-#include "e-summary.h"
-#include "e-summary-url.h"
-#include "e-summary-util.h"
-
-#include "Composer.h"
-
-typedef enum _ESummaryProtocol {
- PROTOCOL_NONE,
- PROTOCOL_HTTP,
- PROTOCOL_MAILTO,
- PROTOCOL_VIEW,
- PROTOCOL_EXEC,
- PROTOCOL_FILE,
- PROTOCOL_CLOSE,
- PROTOCOL_LEFT,
- PROTOCOL_RIGHT,
- PROTOCOL_UP,
- PROTOCOL_DOWN,
- PROTOCOL_CONFIGURE,
- PROTOCOL_OTHER
-} ESummaryProtocol;
-
-static char *descriptions[] = {
- N_("Open %s with the default GNOME application"),
- N_("Open %s with the default GNOME web browser"),
- N_("Send an email to %s"),
- N_("Change the view to %s"),
- N_("Run %s"),
- N_("Open %s with the default GNOME application"),
- N_("Close %s"),
- N_("Move %s to the left"),
- N_("Move %s to the right"),
- N_("Move %s into the previous row"),
- N_("Move %s into the next row"),
- N_("Configure %s"),
- N_("Open %s with the default GNOME application")
-};
-
-typedef struct _PropertyDialog {
- BonoboListener *listener;
- int listener_id;
-
- Bonobo_EventSource eventsource;
- GtkWidget *dialog;
-} PropertyDialog;
-#define COMPOSER_IID "OAFIID:GNOME_Evolution_Mail_Composer"
-
-#if HAVECACHE
-static ESummaryCache *image_cache = NULL;
-#endif
-
-gboolean e_summary_url_mail_compose (ESummary *esummary,
- const char *url);
-gboolean e_summary_url_exec (const char *exec);
-
-struct _DownloadInfo {
- GtkHTMLStream *stream;
- char *uri;
- char *buffer;
-
- gboolean error;
-};
-typedef struct _DownloadInfo DownloadInfo;
-
-static void
-close_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- DownloadInfo *info = data;
- if (info->error) {
- gtk_html_stream_close (info->stream, GTK_HTML_STREAM_ERROR);
- } else {
- gtk_html_stream_close (info->stream, GTK_HTML_STREAM_OK);
- }
-
- g_free (info->uri);
- g_free (info->buffer);
- g_free (info);
-}
-
-static void
-read_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize bytes_requested,
- GnomeVFSFileSize bytes_read,
- gpointer data)
-{
- DownloadInfo *info = data;
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- g_warning ("Read error");
- info->error = TRUE;
- gnome_vfs_async_close (handle, close_callback, info);
- }
-
- if (bytes_read == 0) {
- info->error = FALSE;
- gnome_vfs_async_close (handle, close_callback, info);
- } else {
- gtk_html_stream_write (info->stream, buffer, bytes_read);
- gnome_vfs_async_read (handle, buffer, 4095, read_callback,
- info);
- }
-}
-
-static void
-open_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- DownloadInfo *info)
-{
- if (result != GNOME_VFS_OK) {
- gtk_html_stream_close (info->stream, GTK_HTML_STREAM_ERROR);
- g_free (info->uri);
- g_free (info);
- return;
- }
-
- info->buffer = g_new (char, 4096);
- gnome_vfs_async_read (handle, info->buffer, 4095, read_callback, info);
-}
-
-void
-e_summary_url_request (GtkHTML *html,
- const gchar *url,
- GtkHTMLStream *stream)
-{
- char *filename;
- GnomeVFSAsyncHandle *handle;
- DownloadInfo *info;
-
- g_print ("url: %s\n", url);
- if (strncasecmp (url, "file:", 5) == 0) {
- url += 5;
- filename = e_pixmap_file (url);
- } else if (strchr (url, ':') >= strchr (url, '/')) {
- filename = e_pixmap_file (url);
- } else
- filename = g_strdup (url);
-
- if (filename == NULL) {
- gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
- return;
- }
-
- g_print ("Filename: %s\n", filename);
-
- info = g_new (DownloadInfo, 1);
- info->stream = stream;
- info->uri = filename;
- info->error = FALSE;
-
- gnome_vfs_async_open (&handle, filename, GNOME_VFS_OPEN_READ,
- (GnomeVFSAsyncOpenCallback) open_callback, info);
-}
-
-static char *
-parse_uri (const char *uri,
- ESummaryProtocol protocol,
- ESummary *esummary)
-{
- char *parsed;
- char *p;
- int address;
- ESummaryWindow *window;
-
- switch (protocol) {
-
- case PROTOCOL_HTTP:
- /* "http://" == 7 */
- parsed = g_strdup (uri + 7);
- break;
-
- case PROTOCOL_EXEC:
- /* "exec://" == 7 */
- parsed = g_strdup (uri + 7);
- break;
-
- case PROTOCOL_VIEW:
- /* "view://" == 7 */
- parsed = g_strdup (uri + 7);
- break;
-
- case PROTOCOL_MAILTO:
- /* Fun. Mailto's might be "mailto:" or "mailto://" */
- if (strstr (uri, "mailto://") == NULL) {
- parsed = (char *) (uri + 7);
- } else {
- parsed = (char *) (uri + 9);
- }
-
- /* Now strip anything after a question mark,
- as it is a parameter (that we ignore for the time being) */
- if ( (p = strchr (parsed, '?')) != NULL) {
- parsed = g_strndup (parsed, p - parsed);
- } else {
- parsed = g_strdup (parsed);
- }
-
- break;
-
- case PROTOCOL_CLOSE:
- address = atoi (uri + 8);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- parsed = g_strdup (window->title);
- break;
-
- case PROTOCOL_LEFT:
- address = atoi (uri + 7);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- parsed = g_strdup (window->title);
- break;
-
- case PROTOCOL_RIGHT:
- address = atoi (uri + 8);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- parsed = g_strdup (window->title);
- break;
-
- case PROTOCOL_UP:
- address = atoi (uri + 5);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- parsed = g_strdup (window->title);
- break;
-
- case PROTOCOL_DOWN:
- address = atoi (uri + 7);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- parsed = g_strdup (window->title);
- break;
-
- case PROTOCOL_CONFIGURE:
- address = atoi (uri + 12);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- parsed = g_strdup (window->title);
- break;
-
- case PROTOCOL_NONE:
- case PROTOCOL_OTHER:
- default:
- /* Just return the uneditted uri. */
- parsed = g_strdup (uri);
- break;
- }
-
- return parsed;
-}
-
-static ESummaryProtocol
-get_protocol (const char *url)
-{
- char *lowerurl;
- ESummaryProtocol protocol = PROTOCOL_OTHER;
-
- lowerurl = g_strdup (url);
- g_strdown (lowerurl);
-
- /* Check for no :/ */
- if (strstr (lowerurl, "://") == NULL) {
-
- /* Annoying alternative for mailto URLs */
- if (strncmp (lowerurl, "mailto:", 6) != 0) {
- g_free (lowerurl);
- return PROTOCOL_NONE;
- } else {
- g_free (lowerurl);
- return PROTOCOL_MAILTO;
- }
- }
-
- switch (lowerurl[0]) {
- case 'c':
- switch (lowerurl[1]) {
- case 'l':
- if (strncmp (lowerurl + 2, "ose", 3) == 0)
- protocol = PROTOCOL_CLOSE;
- break;
- case 'o':
- if (strncmp (lowerurl + 2, "nfigure", 7) == 0)
- protocol = PROTOCOL_CONFIGURE;
- break;
- }
-
- case 'd':
- if (strncmp (lowerurl + 1, "own", 3) == 0)
- protocol = PROTOCOL_DOWN;
- break;
-
- case 'e':
- if (strncmp (lowerurl + 1, "xec", 3) == 0)
- protocol = PROTOCOL_EXEC;
- break;
-
- case 'f':
- if (strncmp (lowerurl + 1, "ile", 3) == 0)
- protocol = PROTOCOL_FILE;
- break;
-
- case 'h':
- if (strncmp (lowerurl + 1, "ttp", 3) == 0)
- protocol = PROTOCOL_HTTP;
- break;
-
- case 'l':
- if (strncmp (lowerurl + 1, "eft", 3) == 0)
- protocol = PROTOCOL_LEFT;
- break;
-
- case 'm':
- if (strncmp (lowerurl + 1, "ailto", 5) == 0)
- protocol = PROTOCOL_MAILTO;
- break;
-
- case 'r':
- if (strncmp (lowerurl + 1, "ight", 4) == 0)
- protocol = PROTOCOL_RIGHT;
- break;
-
- case 'u':
- if (lowerurl[1] == 'p')
- protocol = PROTOCOL_UP;
- break;
-
- case 'v':
- if (strncmp (lowerurl + 1, "iew", 3) == 0)
- protocol = PROTOCOL_VIEW;
- break;
-
- default:
- break;
- }
-
- g_free (lowerurl);
-
- return protocol;
-}
-
-static void
-property_apply (GnomePropertyBox *propertybox,
- gint page_num,
- Bonobo_PropertyControl control)
-{
- CORBA_Environment ev;
-
- g_print ("page_num: %d\n", page_num);
-
- CORBA_exception_init (&ev);
- Bonobo_PropertyControl_notifyAction (control, page_num, Bonobo_PropertyControl_APPLY, &ev);
- CORBA_exception_free (&ev);
-}
-
-static void
-property_help (GnomePropertyBox *propertybox,
- gint page_num,
- Bonobo_PropertyControl control)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- Bonobo_PropertyControl_notifyAction (control, page_num, Bonobo_PropertyControl_HELP, &ev);
- CORBA_exception_free (&ev);
-}
-
-static void
-property_event (BonoboListener *listener,
- char *event_name,
- CORBA_any *any,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- PropertyDialog *data = (PropertyDialog *) user_data;
- if (strcmp (event_name, BONOBO_PROPERTY_CONTROL_CHANGED) == 0) {
- gnome_property_box_changed (GNOME_PROPERTY_BOX (data->dialog));
- return;
- }
-}
-
-static void
-dialog_destroyed (GtkObject *object,
- PropertyDialog *dialog)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- Bonobo_EventSource_removeListener (dialog->eventsource,
- dialog->listener_id, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error: %s", CORBA_exception_id (&ev));
- }
-
- bonobo_object_unref (BONOBO_OBJECT (dialog->listener));
- CORBA_exception_free (&ev);
- g_free (dialog);
-}
-
-struct _idle_data {
- ESummary *esummary;
- ESummaryWindow *window;
-};
-
-static gboolean
-idle_remove_window (gpointer data)
-{
- struct _idle_data *id = data;
-
- e_summary_remove_window (id->esummary, id->window);
- e_summary_queue_rebuild (id->esummary);
- g_free (id);
-
- return FALSE;
-}
-
-void
-e_summary_url_click (GtkWidget *widget,
- const char *url,
- ESummary *esummary)
-{
- ESummaryProtocol protocol;
- char *parsed;
- int address;
- ESummaryWindow *window;
- struct _idle_data *id;
- Bonobo_Control control;
- Bonobo_Listener corba_listener;
- GtkWidget *prefsbox, *control_widget;
- CORBA_Environment ev;
- PropertyDialog *data;
- int num_pages, i;
-
- protocol = get_protocol (url);
-
- parsed = parse_uri (url, protocol, esummary);
-
- switch (protocol) {
- case PROTOCOL_MAILTO:
- /* Open a composer window */
- e_summary_url_mail_compose (esummary, parsed);
- break;
-
- case PROTOCOL_VIEW:
- /* Change the EShellView's current uri */
- e_summary_change_current_view (esummary, parsed);
- break;
-
- case PROTOCOL_EXEC:
- /* Execute the rest of the url */
- e_summary_url_exec (parsed);
- break;
-
- case PROTOCOL_CLOSE:
- /* Close the window. */
- address = atoi (url + 8);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- if (window->iid == NULL)
- break;
-
- id = g_new (struct _idle_data, 1);
- id->window = window;
- id->esummary = esummary;
-
- /* Close the window on an idle to work around a bug in
- gnome-vfs which locks the e_summary_remove_window function
- and as gtkhtml has a pointer grab on, this locks the whole
- display. GAH! */
- g_idle_add (idle_remove_window, id);
- break;
-
- case PROTOCOL_CONFIGURE:
- /* Configure the window. . . */
- address = atoi (url + 12);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- if (window->iid == NULL)
- break;
-
- data = g_new (PropertyDialog, 1);
- /* Create the property box */
- prefsbox = gnome_property_box_new ();
- data->dialog = prefsbox;
-
- CORBA_exception_init (&ev);
- data->eventsource = window->event_source;
- data->listener = bonobo_listener_new (property_event, data);
- corba_listener = bonobo_object_corba_objref (BONOBO_OBJECT (data->listener));
- data->listener_id = Bonobo_EventSource_addListener (data->eventsource,
- corba_listener, &ev);
-
- gtk_signal_connect (GTK_OBJECT (prefsbox), "apply",
- GTK_SIGNAL_FUNC (property_apply),
- window->propertycontrol);
- gtk_signal_connect (GTK_OBJECT (prefsbox), "help",
- GTK_SIGNAL_FUNC (property_help),
- window->propertycontrol);
- gtk_signal_connect (GTK_OBJECT (prefsbox), "destroy",
- GTK_SIGNAL_FUNC (dialog_destroyed), data);
-
- num_pages = Bonobo_PropertyControl__get_pageCount (window->propertycontrol, &ev);
- for (i = 0; i < num_pages; i++) {
- control = Bonobo_PropertyControl_getControl (window->propertycontrol, i, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Unable to get property control.");
- CORBA_exception_free (&ev);
- break;
- }
- control_widget = bonobo_widget_new_control_from_objref (control,
- CORBA_OBJECT_NIL);
- gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefsbox),
- control_widget,
- gtk_label_new (_("page")));
- }
-
- gtk_widget_show_all (prefsbox);
-
- break;
-
- case PROTOCOL_LEFT:
- /* Window left */
- address = atoi (url + 7);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- if (window->iid == NULL)
- break;
-
- e_summary_window_move_left (esummary, window);
- e_summary_queue_rebuild (esummary);
- break;
-
- case PROTOCOL_RIGHT:
- address = atoi (url + 8);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- if (window->iid == NULL)
- break;
-
- e_summary_window_move_right (esummary, window);
- e_summary_queue_rebuild (esummary);
- break;
-
- case PROTOCOL_UP:
- address = atoi (url + 5);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- if (window->iid == NULL)
- break;
-
- e_summary_window_move_up (esummary, window);
- e_summary_queue_rebuild (esummary);
- break;
-
- case PROTOCOL_DOWN:
- address = atoi (url + 7);
- window = (ESummaryWindow *) GINT_TO_POINTER (address);
- if (window->iid == NULL)
- break;
-
- e_summary_window_move_down (esummary, window);
- e_summary_queue_rebuild (esummary);
- break;
-
- case PROTOCOL_OTHER:
- case PROTOCOL_NONE:
- case PROTOCOL_HTTP:
- case PROTOCOL_FILE:
- default:
- /* Let browser handle it */
- gnome_url_show (url);
- break;
-
- }
-
- g_free (parsed);
-}
-
-static void
-parse_mail_url (char *url,
- GList **cc,
- GList **bcc,
- char **subject)
-{
- char **options;
- int i = 0;
-
- options = g_strsplit (url, "&", 0);
- while (options[i] != NULL) {
- char **params;
-
- params = g_strsplit (options[i], "=", 2);
- if (strcmp (params[0], "subject") == 0) {
- *subject = g_strdup (params[1]);
- } else if (strcmp (params[0], "cc") == 0) {
- *cc = g_list_prepend (*cc, g_strdup (params[1]));
- } else if (strcmp (params[1], "bcc") == 0) {
- *bcc = g_list_prepend (*bcc, g_strdup (params[1]));
- }
-
- g_strfreev (params);
- i++;
- }
-
- g_strfreev (options);
- /* Reverse the list so it's in the correct order */
- *cc = g_list_reverse (*cc);
- *bcc = g_list_reverse (*bcc);
-}
-
-static void
-recipients_from_list (GNOME_Evolution_Composer_RecipientList *recipients,
- GList *list)
-{
- GList *t;
- int i;
-
- for (i = 0, t = list; t; i++, t = t->next) {
- GNOME_Evolution_Composer_Recipient *recipient;
- char *address = (char *)t->data;
-
- recipient = recipients->_buffer + i;
- recipient->name = CORBA_string_dup ("");
- recipient->address = CORBA_string_dup (address ? address : "");
- }
-}
-
-static void
-free_list (GList *list)
-{
- for (; list; list = list->next) {
- g_free (list->data);
- }
-}
-
-gboolean
-e_summary_url_mail_compose (ESummary *esummary,
- const char *url)
-{
- CORBA_Object composer;
- CORBA_Environment ev;
- char *full_address, *address, *proto, *q;
- GNOME_Evolution_Composer_RecipientList *to, *cc, *bcc;
- GNOME_Evolution_Composer_Recipient *recipient;
- CORBA_char *subject;
- GList *gcc = NULL, *gbcc = NULL;
- char *gsubject = NULL;
-
- CORBA_exception_init (&ev);
-
- /* FIXME: Query for IIDs? */
- composer = oaf_activate_from_id ((char *)COMPOSER_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- g_warning ("Unable to start composer component!");
- return FALSE;
- }
-
- if ( (proto = strstr (url, "://")) != NULL){
- full_address = proto + 3;
- } else {
- if (strncmp (url, "mailto:", 7) == 0)
- full_address = (char *) (url + 7);
- else
- full_address = (char *) url;
- }
-
- q = strchr (full_address, '?');
- if (q != NULL) {
- address = g_strndup (full_address, q - full_address);
- parse_mail_url (q + 1, &gcc, &gbcc, &gsubject);
- } else {
- address = g_strdup (full_address);
- }
-
- to = GNOME_Evolution_Composer_RecipientList__alloc ();
- to->_length = 1;
- to->_maximum = 1;
- to->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (to->_maximum);
-
- recipient = to->_buffer;
- recipient->name = CORBA_string_dup ("");
- recipient->address = CORBA_string_dup (address?address:"");
- g_free (address);
-
- /* FIXME: Get these out of the URL */
- cc = GNOME_Evolution_Composer_RecipientList__alloc ();
- cc->_length = g_list_length (gcc);
- cc->_maximum = cc->_length;
- cc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (cc->_maximum);
-
- recipients_from_list (cc, gcc);
- free_list (gcc);
- g_list_free (gcc);
-
- bcc = GNOME_Evolution_Composer_RecipientList__alloc ();
- bcc->_length = g_list_length (gbcc);
- bcc->_maximum = bcc->_length;
- bcc->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (bcc->_maximum);
-
- recipients_from_list (bcc, gbcc);
- free_list (gbcc);
- g_list_free (gbcc);
-
- subject = CORBA_string_dup (gsubject ? gsubject : "");
- g_free (gsubject);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Composer_setHeaders (composer, to, cc, bcc, subject, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- CORBA_free (to);
- CORBA_free (cc);
- CORBA_free (bcc);
- CORBA_free (subject);
-
- g_warning ("%s(%d): Error setting headers", __FUNCTION__, __LINE__);
- return FALSE;
- }
-
- CORBA_free (to);
- CORBA_free (cc);
- CORBA_free (bcc);
- CORBA_free (subject);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Composer_show (composer, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- g_warning ("%s(%d): Error showing composer", __FUNCTION__, __LINE__);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- /* FIXME: Free the composer? */
-
- return TRUE;
-}
-
-gboolean
-e_summary_url_exec (const char *exec)
-{
- gchar **exec_array;
- int argc;
-
- exec_array = g_strsplit (exec, " ", 0);
-
- argc = 0;
- while (exec_array[argc] != NULL) {
- argc++;
- }
-
- gnome_execute_async (NULL, argc, exec_array);
-
- g_strfreev (exec_array);
- return TRUE;
-}
-
-static char *
-e_summary_url_describe (const char *uri,
- ESummary *esummary)
-{
- ESummaryProtocol protocol;
- char *contents, *description, *tmp;
-
- protocol = get_protocol (uri);
- contents = parse_uri (uri, protocol, esummary);
- tmp = e_utf8_to_locale_string (contents);
-
- description = g_strdup_printf (_(descriptions[protocol]), tmp);
- g_free (tmp);
- g_free (contents);
-
- return description;
-}
-
-void
-e_summary_url_over (GtkHTML *html,
- const char *uri,
- ESummary *esummary)
-{
- char *description;
-
- if (uri != NULL) {
- description = e_summary_url_describe (uri, esummary);
- e_summary_set_message (esummary, description, FALSE);
- g_free (description);
- } else {
- e_summary_unset_message (esummary);
- }
-}
-
-/* Cache stuff */
-#if HAVECACHE
-void
-e_summary_url_init_cache (void)
-{
- if (image_cache != NULL)
- return;
-
- image_cache = e_summary_cache_new ();
-}
-
-void
-e_summary_url_cache_destroy (void)
-{
- if (image_cache == NULL)
- return;
-
- gtk_object_unref (GTK_OBJECT (image_cache));
-
- image_cache = NULL;
-}
-#endif
diff --git a/executive-summary/component/e-summary-url.h b/executive-summary/component/e-summary-url.h
deleted file mode 100644
index ced2d45531..0000000000
--- a/executive-summary/component/e-summary-url.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-url.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_URL_H__
-#define _E_SUMMARY_URL_H__
-
-void e_summary_url_request (GtkHTML *html,
- const gchar *url,
- GtkHTMLStream *stream);
-void e_summary_url_click (GtkWidget *widget,
- const char *url,
- ESummary *esummary);
-void e_summary_url_over (GtkHTML *html,
- const char *uri,
- ESummary *esummary);
-
-#endif
diff --git a/executive-summary/component/e-summary-util.c b/executive-summary/component/e-summary-util.c
deleted file mode 100644
index 28da2b1f87..0000000000
--- a/executive-summary/component/e-summary-util.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-url.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#include <e-summary-util.h>
-
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-
-/**
- * e_pixmap_file:
- * @filename: Filename of pixmap.
- *
- * Finds @filename in the Evolution or GNOME installation dir.
- *
- * Returns: A newly allocated absolute path to @filename, or NULL
- * if it cannot be found.
- */
-char *
-e_pixmap_file (const char *filename)
-{
- char *ret;
- char *edir;
-
- if (g_file_exists (filename)) {
- ret = g_strdup (filename);
-
- return ret;
- }
-
- /* Try the evolution images dir */
- edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution",
- filename);
-
- if (g_file_exists (edir)) {
- ret = g_strdup (edir);
- g_free (edir);
-
- return ret;
- }
- g_free (edir);
-
- /* Try the evolution button images dir */
- edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons",
- filename);
-
- if (g_file_exists (edir)) {
- ret = g_strdup (edir);
- g_free (edir);
-
- return ret;
- }
- g_free (edir);
-
- /* Fall back to the gnome_pixmap_file */
- return gnome_pixmap_file (filename);
-}
-
-/**
- * e_summary_rm_dir:
- * @path: Full path to the directory or file to be removed.
- *
- * Deletes everything in fullpath.
- */
-void
-e_summary_rm_dir (const char *path)
-{
- DIR *base;
- struct stat statbuf;
- struct dirent *contents;
-
- stat (path, &statbuf);
- if (!S_ISDIR (statbuf.st_mode)) {
- /* Not a directory */
- g_warning ("Removing: %s", path);
- unlink (path);
- return;
- } else {
- g_warning ("Opening: %s", path);
- base = opendir (path);
-
- if (base == NULL)
- return;
-
- contents = readdir (base);
- while (contents != NULL) {
- char *fullpath;
-
- if (strcmp (contents->d_name, ".") == 0||
- strcmp (contents->d_name, "..") ==0) {
- contents = readdir (base);
- continue;
- }
-
- fullpath = g_concat_dir_and_file (path, contents->d_name);
- e_summary_rm_dir (fullpath);
- g_free (fullpath);
-
- contents = readdir (base);
- }
-
- closedir (base);
- rmdir (path);
- }
-}
-
diff --git a/executive-summary/component/e-summary-util.h b/executive-summary/component/e-summary-util.h
deleted file mode 100644
index c7c260dc07..0000000000
--- a/executive-summary/component/e-summary-util.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-util.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_UTIL_H__
-#define _E_SUMMARY_UTIL_H__
-
-char *e_pixmap_file (const char *filename);
-void e_summary_rm_dir (const char *filename);
-
-#endif
diff --git a/executive-summary/component/e-summary.c b/executive-summary/component/e-summary.c
deleted file mode 100644
index 63aed7f4dc..0000000000
--- a/executive-summary/component/e-summary.c
+++ /dev/null
@@ -1,1341 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-event-source.h>
-#include <bonobo/bonobo-listener.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-property-control.h>
-#include <bonobo/bonobo-storage.h>
-#include <bonobo/bonobo-stream-client.h>
-
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-embedded.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <gtkhtml/htmlengine.h>
-#include <gtkhtml/htmlselection.h>
-
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <libgnomevfs/gnome-vfs.h>
-
-#include "e-summary.h"
-#include "e-summary-factory.h"
-#include "e-summary-util.h"
-#include "e-summary-url.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>
-
-#define PARENT_TYPE (gtk_vbox_get_type ())
-
-#define STORAGE_TYPE "fs"
-#define IID_FILE "oaf.id"
-#define DATA_FILE "data"
-
-/* From component-factory.c */
-extern char *evolution_dir;
-
-static GtkObjectClass *e_summary_parent_class;
-
-struct _ESummaryPrivate {
- GNOME_Evolution_Shell shell;
- GNOME_Evolution_ShellView shell_view_interface;
-
- GtkWidget *html_scroller;
- GtkWidget *html;
-
- guint idle;
-
- GtkHTMLStream *stream;
- gboolean grabbed;
-
- GList *window_list;
-
- char *header;
- int header_len;
- char *footer;
- int footer_len;
-};
-
-static gboolean on_object_requested (GtkHTML *html,
- GtkHTMLEmbedded *eb,
- ESummary *summary);
-static void e_summary_save_state (ESummary *esummary,
- const char *path);
-static void e_summary_load_state (ESummary *esummary,
- const char *path);
-
-/* GtkObject methods */
-
-static void
-e_summary_destroy (GtkObject *object)
-{
- ESummary *esummary = E_SUMMARY (object);
- ESummaryPrivate *priv;
- GList *l;
- char *prefix;
-
- priv = esummary->private;
- if (priv == NULL)
- return;
-
- prefix = g_concat_dir_and_file (evolution_dir, "config/");
- e_summary_save_state (esummary, prefix);
- g_free (prefix);
-
- e_summary_prefs_free (esummary->prefs);
- for (l = priv->window_list; l; l = l->next)
- e_summary_window_free (l->data);
- g_list_free (priv->window_list);
-
- g_free (priv->header);
- g_free (priv->footer);
- g_free (esummary->private);
- esummary->private = NULL;
-
- e_summary_parent_class->destroy (object);
-}
-
-static void
-e_summary_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = e_summary_destroy;
-
- e_summary_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-e_summary_start_load (ESummary *esummary)
-{
- ESummaryPrivate *priv;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- priv->stream = gtk_html_begin (GTK_HTML (priv->html));
-
- /* HTML hacks */
- /* Hack to stop page returning to the top */
- GTK_HTML (priv->html)->engine->newPage = FALSE;
- /* Hack to make the border width of the page 0 */
- GTK_HTML (priv->html)->engine->leftBorder = 0;
- GTK_HTML (priv->html)->engine->rightBorder = 0;
- GTK_HTML (priv->html)->engine->topBorder = 0;
- GTK_HTML (priv->html)->engine->bottomBorder = 0;
-}
-
-static void
-load_default_header (ESummary *esummary)
-{
- ESummaryPrivate *priv;
- char *def = "<html><body bgcolor=\"#ffffff\">"
- "<table width=\"100%\"><tr><td align=\"right\">"
- "<img src=\"ccsplash.png\"></td></tr></table>"
- "<table><tr><td><a href=\"exec://bug-buddy\"><img src=\"file://gnome-spider.png\" width=\"24\" height=\"24\" border=\"0\">"
- "</a></td><td><a href=\"exec://bug-buddy\">Submit a bug report"
- "</a></td></tr></table><hr>";
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- g_return_if_fail (priv->stream != NULL);
-
- gtk_html_write (GTK_HTML (priv->html), priv->stream, def, strlen (def));
-}
-static void
-load_default_footer (ESummary *esummary)
-{
- ESummaryPrivate *priv;
- char *footer = "<hr><p align=\"right\">All Executive Summary comments to <a href=\"mailto:iain@ximian.com\">Iain Holmes (iain@ximian.com)</a></p></body></html>";
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- footer, strlen (footer));
-}
-
-static void
-e_summary_end_load (ESummary *esummary)
-{
- ESummaryPrivate *priv;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
- gtk_html_end (GTK_HTML (priv->html), priv->stream, GTK_HTML_STREAM_OK);
-
- priv->stream = NULL;
-}
-
-static void
-e_summary_init (ESummary *esummary)
-{
- GdkColor bgcolour = {0, 0xdfff, 0xdfff, 0xffff};
- ESummaryPrivate *priv;
-
- esummary->prefs = NULL;
- esummary->tmp_prefs = NULL;
- esummary->private = g_new0 (ESummaryPrivate, 1);
- priv = esummary->private;
-
- priv->window_list = NULL;
- priv->idle = 0;
-
- /* HTML widget */
- priv->html_scroller = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller),
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- priv->html = gtk_html_new ();
- gtk_html_set_editable (GTK_HTML (priv->html), FALSE);
- gtk_html_set_default_content_type (GTK_HTML (priv->html),
- "text/html; charset=utf-8");
- gtk_html_set_default_background_color (GTK_HTML (priv->html), &bgcolour);
- gtk_signal_connect (GTK_OBJECT (priv->html), "url-requested",
- GTK_SIGNAL_FUNC (e_summary_url_request), esummary);
- gtk_signal_connect (GTK_OBJECT (priv->html), "object-requested",
- GTK_SIGNAL_FUNC (on_object_requested), esummary);
- gtk_signal_connect (GTK_OBJECT (priv->html), "link-clicked",
- GTK_SIGNAL_FUNC (e_summary_url_click), esummary);
- gtk_signal_connect (GTK_OBJECT (priv->html), "on-url",
- GTK_SIGNAL_FUNC (e_summary_url_over), esummary);
-
- gtk_container_add (GTK_CONTAINER (priv->html_scroller), priv->html);
- gtk_widget_show_all (priv->html_scroller);
-
- e_summary_queue_rebuild (esummary);
-
- /* Pack stuff */
- gtk_box_pack_start (GTK_BOX (esummary), priv->html_scroller,
- TRUE, TRUE, 0);
-}
-
-E_MAKE_TYPE (e_summary, "ESummary", ESummary, e_summary_class_init,
- e_summary_init, PARENT_TYPE);
-
-GtkWidget *
-e_summary_new (const GNOME_Evolution_Shell shell)
-{
- ESummary *esummary;
- ESummaryPrivate *priv;
- char *path;
-
- esummary = gtk_type_new (e_summary_get_type ());
- priv = esummary->private;
-
- priv->shell = shell;
-
- /* Restore services */
- path = g_concat_dir_and_file (evolution_dir,
- "config");
- e_summary_load_state (esummary, path);
- g_free (path);
-
- return GTK_WIDGET (esummary);
-}
-
-#if 0
-static void
-control_unrealize (GtkHTMLEmbedded *eb,
- GtkWidget *widget)
-{
- g_print ("Removing\n");
-}
-
-static void
-being_unrealized (GtkWidget *widget,
- GtkHTMLEmbedded *eb)
-{
- g_warning ("Widget is being unrealized");
- gtk_container_remove (GTK_CONTAINER (eb), widget);
-}
-
-static void
-being_realized (GtkWidget *widget,
- gpointer user_data)
-{
- gdk_window_ref (widget->window);
-}
-#endif
-
-static gboolean
-on_object_requested (GtkHTML *html,
- GtkHTMLEmbedded *eb,
- ESummary *esummary)
-{
-#if 0
- static GtkWidget *widget = NULL;
- int id;
-
- if (sscanf (eb->classid, "cid:%d", &id) != 1) {
- g_warning ("Could not get the view id: eb->classid = %s",
- eb->classid);
- return FALSE;
- }
-
- if (widget == NULL || !GTK_IS_WIDGET (widget)) {
- g_print ("Create new\n");
- widget = executive_summary_component_view_get_widget (view);
-/* widget = gtk_button_new_with_label ("Hello?"); */
- gtk_signal_connect (GTK_OBJECT (widget), "realize",
- GTK_SIGNAL_FUNC (being_realized), NULL);
- gtk_signal_connect (GTK_OBJECT (widget), "unrealize",
- GTK_SIGNAL_FUNC (being_unrealized), eb);
- g_print ("New widget: %p\n", GTK_BIN (widget)->child);
- } else {
- g_print ("No new\n");
- }
-
- if (widget == NULL) {
- g_warning ("View %d has no GtkWidget.", id);
- return FALSE;
- }
-
- gtk_signal_connect (GTK_OBJECT (eb), "unrealize",
- GTK_SIGNAL_FUNC (control_unrealize), widget);
- gtk_widget_show_all (widget);
- gtk_widget_ref (widget);
-
- if (widget->parent == NULL)
- gtk_container_add (GTK_CONTAINER (eb), widget);
-
-#endif
- return TRUE;
-}
-
-/* Generates the window controls and works out
- if they should be disabled or not */
-static char *
-make_control_html (ESummaryWindow *window,
- int row,
- int col,
- int numwindows)
-{
- char *html, *tmp;
- int id = GPOINTER_TO_INT (window);
- gboolean config;
-
- config = TRUE;
-
- if (window->propertycontrol == CORBA_OBJECT_NIL)
- config = FALSE;
-
- html = g_strdup_printf ("<table><tr><td><a href=\"close://%d\">"
- "<img src=\"service-close.png\" border=\"0\">"
- "</a></td></tr><tr><td>", id);
-
- tmp = html;
- if (!config) {
- html = g_strdup_printf ("%s<img src=\"service-configure.png\">"
- "</td></tr></table>", tmp);
- } else {
- html = g_strdup_printf ("%s<a href=\"configure://%d\">"
- "<img src=\"service-configure.png\" border=\"0\">"
- "</a></td></tr></table>", tmp, id);
- }
- g_free (tmp);
-
- return html;
-}
-
-static void
-e_summary_display_window_title (ESummary *esummary,
- ESummaryWindow *window,
- int row,
- int col,
- int numwindows)
-{
- ESummaryPrivate *priv;
- char *title_html;
- char *control_html;
- char *title_colour[2] = {"bac1b6",
- "cdd1c7"};
-
- priv = esummary->private;
-
- control_html = make_control_html (window, row, col, numwindows);
- title_html = g_strdup_printf ("<td bgcolor=\"#%s\">"
- "<table width=\"100%%\" height=\"100%%\"><tr><td>"
- "<img src=\"%s\" height=\"48\"></td>"
- "<td nowrap align=\"center\" width=\"100%%\">"
- "<b>%s</b></td><td>%s</td></tr></table></td>",
- title_colour[col % 2], window->icon,
- window->title, control_html);
- g_free (control_html);
-
- gtk_html_write (GTK_HTML (priv->html), priv->stream, title_html,
- strlen (title_html));
- g_free (title_html);
-}
-
-static void
-e_summary_display_window (ESummary *esummary,
- ESummaryWindow *window,
- int row,
- int col,
- int numwindows)
-{
- ESummaryPrivate *priv;
- char *footer = "</td>";
- char *header;
- char *colour[2] = {"e6e8e4",
- "edeeeb"};
-
- priv = esummary->private;
-
- header = g_strdup_printf ("<td bgcolor=\"%s\" valign=\"top\">", colour[col % 2]);
- gtk_html_write (GTK_HTML (priv->html), priv->stream, header, strlen (header));
- g_free (header);
-
- if (window->html != CORBA_OBJECT_NIL) {
- char *html = NULL;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- html = GNOME_Evolution_Summary_HTMLView_getHtml (window->html,
- &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- g_warning ("Cannot get HTML.");
- if (html)
- CORBA_free (html);
- } else {
- CORBA_exception_free (&ev);
-
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- html, strlen (html));
- CORBA_free (html);
- }
- } else {
-#if 0
- char *body_cid;
-
- body_cid = g_strdup_printf ("<object classid=\"cid:%d\"></object>", id);
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- body_cid, strlen (body_cid));
- g_free (body_cid);
-#endif
- }
-
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- footer, strlen (footer));
-}
-
-static int
-e_summary_rebuild_page (ESummary *esummary)
-{
- ESummaryPrivate *priv;
- GList *windows;
- char *service_table = "<table numcols=\"%d\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" height=\"100%%\" width=\"100%%\">";
- char *tmp;
- int numwindows, numrows;
- int i, j, k;
- int columns;
-
- g_return_val_if_fail (esummary != NULL, FALSE);
- g_return_val_if_fail (IS_E_SUMMARY (esummary), FALSE);
-
- priv = esummary->private;
-
- if (priv->idle == 0) {
- g_warning ("esummary->private->idle == 0! This means that "
- "e_summary_rebuild_page was called by itself and "
- "not queued. You should use e_summary_queue_rebuild "
- "instead.");
- return FALSE;
- }
-
- /* If there is a selection, don't redraw the page so that the selection
- isn't cleared */
- if (GTK_HTML (priv->html)->in_selection == TRUE ||
- html_engine_is_selection_active (GTK_HTML (priv->html)->engine) == TRUE)
- return FALSE;
-
- gtk_layout_freeze (GTK_LAYOUT (priv->html));
- e_summary_start_load (esummary);
-
- if (priv->header == NULL || *priv->header == '\0') {
- load_default_header (esummary);
- } else {
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- priv->header, priv->header_len);
- }
-
- /* Load the start of the services */
- tmp = g_strdup_printf (service_table, esummary->prefs->columns);
- gtk_html_write (GTK_HTML (priv->html), priv->stream, tmp, strlen (tmp));
- g_free (tmp);
- /* Load each of the services */
- numwindows = g_list_length (priv->window_list);
-
- columns = esummary->prefs->columns;
-
- windows = priv->window_list;
- if (numwindows % columns == 0)
- numrows = numwindows / columns;
- else
- numrows = numwindows / columns + 1;
-
- for (i = 0; i < numrows; i++) {
- GList *window = windows;
-
- /* Do the same row twice:
- Once for the title, once for the contents */
- for (j = 0; j < 2; j++) {
- int limit;
-
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- "<tr>", 4);
- /* For each window on row i */
- limit = MIN (columns, (numwindows - (i * columns)));
- for (k = 0; k < limit; k++) {
-
- if (window == NULL)
- break;
-
- if (j == 0) {
- e_summary_display_window_title (esummary,
- window->data,
- k, k,
- numwindows);
- } else {
- e_summary_display_window (esummary,
- window->data,
- k, k,
- numwindows);
- }
-
- if (window != NULL)
- window = window->next;
-
- if (window == NULL)
- break;
- }
-
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- "</tr>", 5);
- if (j == 0)
- window = windows;
- else {
- if (window)
- windows = window;
- else
- break;
- }
- }
- }
- gtk_html_write (GTK_HTML (priv->html), priv->stream, "</tr></table>", 13);
-
- if (priv->footer == NULL || *priv->footer == '\0') {
- load_default_footer (esummary);
- } else {
- gtk_html_write (GTK_HTML (priv->html), priv->stream,
- priv->footer, priv->footer_len);
- }
-
- e_summary_end_load (esummary);
- gtk_layout_thaw (GTK_LAYOUT (priv->html));
-
- priv->idle = 0;
- return FALSE;
-}
-
-/* This is the function that should be called instead of
- e_summary_queue_rebuild. This prevents multiple
- rebuilds happening together. */
-void
-e_summary_queue_rebuild (ESummary *esummary)
-{
- ESummaryPrivate *priv;
-
- priv = esummary->private;
- if (priv->idle != 0)
- return;
-
- priv->idle = g_idle_add ((GSourceFunc) e_summary_rebuild_page, esummary);
-}
-
-static void
-listener_event (BonoboListener *listener,
- char *event_name,
- BonoboArg *event_data,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- ESummaryWindow *window = (ESummaryWindow *) user_data;
-
- if (strcmp (event_name, "Bonobo/Property:change:window_title") == 0) {
- if (window->title != NULL)
- g_free (window->title);
-
- window->title = g_strdup (BONOBO_ARG_GET_STRING (event_data));
- e_summary_queue_rebuild (window->esummary);
- } else if (strcmp (event_name, "Bonobo/Property:change:window_icon") == 0) {
- if (window->icon != NULL)
- g_free (window->icon);
-
- window->icon = g_strdup (BONOBO_ARG_GET_STRING (event_data));
- e_summary_queue_rebuild (window->esummary);
- } else if (strcmp (event_name, EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED) == 0) {
- e_summary_queue_rebuild (window->esummary);
- }
-
- return;
-}
-
-ESummaryWindow *
-e_summary_add_service (ESummary *esummary,
- GNOME_Evolution_Summary_Component component,
- const char *iid)
-{
- ESummaryWindow *window;
- ESummaryPrivate *priv;
- Bonobo_Unknown unknown = CORBA_OBJECT_NIL;
- Bonobo_Listener listener;
- CORBA_Environment ev;
-
- g_return_val_if_fail (esummary != NULL, NULL);
- g_return_val_if_fail (IS_E_SUMMARY (esummary), NULL);
- g_return_val_if_fail (component != CORBA_OBJECT_NIL, NULL);
-
- priv = esummary->private;
-
- window = g_new0 (ESummaryWindow, 1);
- window->component = component;
- window->iid = g_strdup (iid);
- window->esummary = esummary;
-
- /* See what interfaces our component supports */
- CORBA_exception_init (&ev);
- unknown = Bonobo_Unknown_queryInterface (component,
- "IDL:Bonobo/Control:1.0", &ev);
- window->control = (Bonobo_Control) unknown;
-
- unknown = Bonobo_Unknown_queryInterface (component,
- "IDL:GNOME/Evolution/Summary/HTMLView:1.0",
- &ev);
- window->html = (GNOME_Evolution_Summary_HTMLView) unknown;
-
- /* Check at least one of the above interfaces was supported */
- if (window->html == CORBA_OBJECT_NIL &&
- window->control == CORBA_OBJECT_NIL) {
- CORBA_Environment ev2;
- g_warning ("This component does not support either"
- "Bonobo/Control:1.0 or GNOME/Evolution/Summary/HTMLView:1.0");
-
- CORBA_exception_init (&ev2);
- CORBA_Object_release (component, &ev2);
- CORBA_exception_free (&ev2);
-
- g_free (window);
- return NULL;
- }
-
- unknown = Bonobo_Unknown_queryInterface (component,
- "IDL:Bonobo/PropertyBag:1.0",
- &ev);
- window->propertybag = (Bonobo_PropertyBag) unknown;
-
- window->event_source = Bonobo_Unknown_queryInterface(window->propertybag,
- "IDL:Bonobo/EventSource:1.0", &ev);
- if (window->event_source == CORBA_OBJECT_NIL) {
- g_warning ("There is no Bonobo::EventSource interface");
-
- /* FIXME: Free whatever objects exist */
- g_free (window);
- return NULL;
- }
-
- window->listener = bonobo_listener_new (NULL, NULL);
- gtk_signal_connect (GTK_OBJECT (window->listener), "event_notify",
- GTK_SIGNAL_FUNC (listener_event), window);
- listener = bonobo_object_corba_objref (BONOBO_OBJECT (window->listener));
- window->listener_id = Bonobo_EventSource_addListener (window->event_source, listener, &ev);
-
- unknown = Bonobo_Unknown_queryInterface (component,
- "IDL:Bonobo/PersistStream:1.0",
- &ev);
- window->persiststream = (Bonobo_PersistStream) unknown;
-
- unknown = Bonobo_Unknown_queryInterface (component,
- "IDL:Bonobo/PropertyControl:1.0",
- &ev);
- window->propertycontrol = (Bonobo_PropertyControl) unknown;
-
- /* Cache the title and icon */
- window->title = bonobo_property_bag_client_get_value_string (window->propertybag,
- "window_title",
- NULL);
- g_print ("title: %s\n", window->title);
- window->icon = bonobo_property_bag_client_get_value_string (window->propertybag,
- "window_icon", NULL);
- g_print ("icon: %s\n", window->icon);
-
- CORBA_exception_free (&ev);
- priv->window_list = g_list_append (priv->window_list, window);
-
- return window;
-}
-
-
-ESummaryWindow *
-e_summary_embed_service_from_id (ESummary *esummary,
- const char *obj_id)
-{
- GNOME_Evolution_Summary_Component component;
- ExecutiveSummaryComponentFactoryClient *client;
- ESummaryWindow *window;
-
- client = executive_summary_component_factory_client_new (obj_id);
-
- component = executive_summary_component_factory_client_create_view (client);
-
- /* Don't need the client any more */
- bonobo_object_unref (BONOBO_OBJECT (client));
-
- window = e_summary_add_service (esummary, component, obj_id);
- e_summary_queue_rebuild (esummary);
-
- return window;
-}
-
-void
-e_summary_window_free (ESummaryWindow *window)
-{
- CORBA_Environment ev;
-
- g_return_if_fail (window != NULL);
-
- g_free (window->iid);
- g_free (window->icon);
- g_free (window->title);
-
- CORBA_exception_init (&ev);
-
- if (window->control != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (window->control, &ev);
- }
-
- if (window->event_source != CORBA_OBJECT_NIL) {
- Bonobo_EventSource_removeListener (window->event_source,
- window->listener_id,
- &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("CORBA ERROR: %s", CORBA_exception_id (&ev));
- }
- bonobo_object_release_unref (window->event_source, &ev);
- }
-
- bonobo_object_release_unref (window->propertybag, &ev);
- bonobo_object_release_unref (window->persiststream, &ev);
- bonobo_object_release_unref (window->propertycontrol, &ev);
- bonobo_object_unref (BONOBO_OBJECT (window->listener));
- bonobo_object_release_unref (window->html, &ev);
-
- bonobo_object_release_unref (window->component, &ev);
- CORBA_exception_free (&ev);
- g_free (window);
-}
-
-void
-e_summary_remove_window (ESummary *esummary,
- ESummaryWindow *window)
-{
- ESummaryPrivate *priv;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
- g_return_if_fail (window != NULL);
-
- priv = esummary->private;
- priv->window_list = g_list_remove (priv->window_list, window);
- e_summary_window_free (window);
-}
-
-void
-e_summary_set_shell_view_interface (ESummary *esummary,
- GNOME_Evolution_ShellView svi)
-{
- ESummaryPrivate *priv;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
- g_return_if_fail (svi != CORBA_OBJECT_NIL);
-
- priv = esummary->private;
- priv->shell_view_interface = svi;
-}
-
-/* Wrappers for GNOME_Evolution_ShellView */
-void
-e_summary_set_message (ESummary *esummary,
- const char *message,
- gboolean busy)
-{
- ESummaryPrivate *priv;
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- svi = priv->shell_view_interface;
- if (svi == NULL)
- return;
-
- CORBA_exception_init (&ev);
- if (message != NULL)
- GNOME_Evolution_ShellView_setMessage (svi, message, busy, &ev);
- else
- GNOME_Evolution_ShellView_setMessage (svi, "", busy, &ev);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_unset_message (ESummary *esummary)
-{
- ESummaryPrivate *priv;
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- svi = priv->shell_view_interface;
- if (svi == NULL)
- return;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_unsetMessage (svi, &ev);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_change_current_view (ESummary *esummary,
- const char *uri)
-{
- ESummaryPrivate *priv;
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- svi = priv->shell_view_interface;
- if (svi == NULL)
- return;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_changeCurrentView (svi, uri, &ev);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_set_title (ESummary *esummary,
- const char *title)
-{
- ESummaryPrivate *priv;
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- svi = priv->shell_view_interface;
- if (svi == NULL)
- return;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_setTitle (svi, title, &ev);
- CORBA_exception_free (&ev);
-}
-
-static void
-e_summary_load_page (ESummary *esummary)
-{
- ESummaryPrivate *priv;
- GnomeVFSHandle *handle = NULL;
- GnomeVFSResult result;
- GtkWidget *toplevel;
- GString *string;
- char *str, *comment;
- char *filename;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- /* Pass NULL to reset the page to the default */
- if ((esummary->prefs->page) == NULL ||
- *(esummary->prefs->page) == '\0') {
- filename = g_concat_dir_and_file (EVOLUTION_DATADIR, "/evolution/summary.html");
- } else {
- filename = g_strdup (esummary->prefs->page);
- }
-
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (esummary));
- string = g_string_new ("");
- result = gnome_vfs_open (&handle, filename, GNOME_VFS_OPEN_READ);
- if (result != GNOME_VFS_OK) {
- e_notice (GTK_WINDOW (toplevel), GNOME_MESSAGE_BOX_WARNING,
- _("Cannot open the HTML file:\n%s"), filename);
- g_free (filename);
- return;
- }
-
- g_free (filename);
- while (1) {
- char buffer[4096];
- GnomeVFSFileSize size;
-
- memset (buffer, 0x00, 4096);
- result = gnome_vfs_read (handle, buffer, 4096, &size);
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- e_notice (GTK_WINDOW (toplevel), GNOME_MESSAGE_BOX_WARNING,
- _("Error reading data:\n%s"),
- gnome_vfs_result_to_string (result));
- gnome_vfs_close (handle);
- return;
- }
- if (size == 0)
- break; /* EOF */
-
- string = g_string_append (string, buffer);
- }
-
- gnome_vfs_close (handle);
- str = string->str;
- g_string_free (string, FALSE);
-
- comment = strstr (str, "<!-- EVOLUTION EXECUTIVE SUMMARY SERVICES DO NOT REMOVE -->");
- if (comment == NULL) {
- e_notice (NULL, GNOME_MESSAGE_BOX_WARNING,
- _("File does not have a place for the services.\n"));
- g_free (str);
- return;
- }
-
- if (priv->header != NULL)
- g_free (priv->header);
- priv->header = g_strndup (str, comment - str);
- priv->header_len = strlen (priv->header);
-
- if (priv->footer != NULL)
- g_free (priv->footer);
- priv->footer = g_strdup (comment);
- priv->footer_len = strlen (priv->footer);
- g_free (str);
-}
-
-static char *
-load_component_id_stream_read (Bonobo_Stream stream,
- CORBA_Environment *ev)
-{
- Bonobo_Stream_iobuf *buffer;
- GString *str;
- char *ans;
-
- str = g_string_sized_new (256);
-#define READ_CHUNK_SIZE 65536
- do {
- int i;
- Bonobo_Stream_read (stream, READ_CHUNK_SIZE, &buffer, ev);
- if (ev->_major != CORBA_NO_EXCEPTION)
- return NULL;
-
- /* FIXME: make better PLEASE!!!*/
- for (i = 0; i < buffer->_length; i++)
- g_string_append_c (str, buffer->_buffer[i]);
-
- if (buffer->_length <= 0)
- break;
- CORBA_free (buffer);
- } while (1);
-#undef READ_CHUNK_SIZE
- CORBA_free (buffer);
-
- ans = str->str;
- g_string_free (str, FALSE);
-
- return ans;
-}
-
-static char *
-load_component_id (Bonobo_Storage corba_storage,
- CORBA_Environment *ev)
-{
- Bonobo_Stream corba_stream;
- char *iid;
-
- corba_stream = Bonobo_Storage_openStream (corba_storage, IID_FILE,
- Bonobo_Storage_READ, ev);
- if (ev->_major != CORBA_NO_EXCEPTION)
- return NULL;
-
- if (corba_stream) {
- iid = load_component_id_stream_read (corba_stream, ev);
- Bonobo_Unknown_unref (corba_stream, ev);
- CORBA_Object_release (corba_stream, ev);
- } else {
- g_warning ("Cannot find `%s'", IID_FILE);
- return NULL;
- }
-
- return iid;
-}
-
-static void
-load_component (ESummary *esummary,
- BonoboStorage *storage,
- int index)
-{
- char *curdir;
- char *iid;
- Bonobo_Storage corba_subdir;
- Bonobo_Storage corba_storage;
- ESummaryWindow *window;
- CORBA_Environment ev;
-
- curdir = g_strdup_printf ("%08d", index);
- corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage));
- CORBA_exception_init (&ev);
-
- corba_subdir = Bonobo_Storage_openStorage (corba_storage, curdir,
- Bonobo_Storage_READ, &ev);
- if (corba_subdir == CORBA_OBJECT_NIL) {
- g_free (curdir);
- return;
- }
-
- iid = load_component_id (corba_subdir, &ev);
-
- if (iid) {
- Bonobo_Stream corba_stream;
-
- window = e_summary_embed_service_from_id (esummary, iid);
- if (window) {
- if (window->persiststream) {
- corba_stream = Bonobo_Storage_openStream
- (corba_subdir,
- DATA_FILE,
- Bonobo_Storage_READ |
- Bonobo_Storage_CREATE, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_print ("Gah");
- return;
- }
-
- Bonobo_PersistStream_load (window->persiststream,
- corba_stream,
- "", &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_warning ("Could not load `%s'", iid);
-
- bonobo_object_release_unref (corba_stream, &ev);
- }
- }
-
- g_free (iid);
- }
-
- bonobo_object_release_unref (corba_subdir, &ev);
- CORBA_exception_free (&ev);
- g_free (curdir);
-}
-
-void
-e_summary_reconfigure (ESummary *esummary)
-{
- e_summary_load_page (esummary);
- e_summary_queue_rebuild (esummary);
-}
-
-static void
-e_summary_load_state (ESummary *esummary,
- const char *path)
-{
- char *fullpath;
- BonoboStorage *storage;
- Bonobo_Storage corba_storage;
- Bonobo_Storage_DirectoryList *list;
- CORBA_Environment ev;
- int i;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- fullpath = g_strdup_printf ("%s/Executive-Summary", path);
- storage = bonobo_storage_open (STORAGE_TYPE, fullpath,
- Bonobo_Storage_READ |
- Bonobo_Storage_WRITE,
- 0664);
- if (storage != NULL) {
- CORBA_exception_init (&ev);
-
- corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage));
- list = Bonobo_Storage_listContents (corba_storage, "/", 0, &ev);
- if (list) {
- for (i = 0; i < list->_length; i++)
- load_component (esummary, storage, i);
-
- CORBA_free (list);
- }
-
- bonobo_object_unref (BONOBO_OBJECT (storage));
- CORBA_exception_free (&ev);
- }
-
- g_free (fullpath);
-
- /* Load the preferences */
- if (esummary->prefs != NULL)
- e_summary_prefs_free (esummary->prefs);
-
- esummary->prefs = e_summary_prefs_load (path);
- e_summary_reconfigure (esummary);
-}
-
-static void
-save_component (BonoboStorage *storage,
- ESummaryWindow *window,
- int index)
-{
- char *curdir = g_strdup_printf ("%08d", index);
- Bonobo_Storage corba_storage;
- Bonobo_Storage corba_subdir;
- CORBA_Environment ev;
-
- corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage));
- CORBA_exception_init (&ev);
-
- corba_subdir = Bonobo_Storage_openStorage (corba_storage, curdir,
- Bonobo_Storage_CREATE|
- Bonobo_Storage_WRITE|
- Bonobo_Storage_READ, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Cannot create '%s'", curdir);
- g_free (curdir);
- } else {
- Bonobo_Stream corba_stream;
-
- g_free (curdir);
- corba_stream = Bonobo_Storage_openStream
- (corba_subdir, IID_FILE,
- Bonobo_Storage_CREATE|
- Bonobo_Storage_READ|
- Bonobo_Storage_WRITE, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("EEK: %s", CORBA_exception_id (&ev));
- if (corba_subdir != CORBA_OBJECT_NIL)
- bonobo_object_release_unref (corba_subdir, &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- bonobo_stream_client_write_string (corba_stream,
- window->iid, TRUE, &ev);
- bonobo_object_release_unref (corba_stream, &ev);
-
- corba_stream = Bonobo_Storage_openStream (corba_subdir, DATA_FILE,
- Bonobo_Storage_CREATE,
- &ev);
- if (window->persiststream != CORBA_OBJECT_NIL) {
- Bonobo_PersistStream_save (window->persiststream,
- corba_stream, "", &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Unable to save %s", window->iid);
- }
- }
-
- bonobo_object_release_unref (corba_stream, &ev);
- }
-
- if (corba_subdir != CORBA_OBJECT_NIL)
- bonobo_object_release_unref (corba_subdir, &ev);
- CORBA_exception_free (&ev);
-}
-
-static void
-e_summary_save_state (ESummary *esummary,
- const char *path)
-{
- ESummaryPrivate *priv;
- BonoboStorage *storage;
- Bonobo_Storage corba_storage;
- CORBA_Environment ev;
- GList *windows;
- char *fullpath;
- int i;
-
- g_return_if_fail (esummary != NULL);
- g_return_if_fail (IS_E_SUMMARY (esummary));
-
- priv = esummary->private;
-
- fullpath = g_strdup_printf("%s/Executive-Summary", path);
- g_print ("fullpath: %s\n", fullpath);
-
- e_summary_rm_dir (fullpath);
-
- storage = bonobo_storage_open (STORAGE_TYPE, fullpath,
- Bonobo_Storage_READ |
- Bonobo_Storage_WRITE |
- Bonobo_Storage_CREATE, 0660);
- g_return_if_fail (storage);
-
- CORBA_exception_init (&ev);
- corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (storage));
-
- i = 0;
- for (windows = priv->window_list; windows; windows = windows->next) {
- save_component (storage, windows->data, i);
- g_print ("IID: %s\n", ((ESummaryWindow *)windows->data)->iid);
- i++;
- }
-
- Bonobo_Storage_commit (corba_storage, &ev);
- CORBA_exception_free (&ev);
- bonobo_object_unref (BONOBO_OBJECT (storage));
-
- e_summary_prefs_save (esummary->prefs, path);
- g_free (fullpath);
-}
-
-void
-e_summary_window_move_left (ESummary *esummary,
- ESummaryWindow *window)
-{
- ESummaryPrivate *priv;
- GList *win_item, *grandparent;
- int position;
-
- priv = esummary->private;
-
- /* Need to cache this location */
- win_item = g_list_find (priv->window_list, window);
-
- /* Find the item 2 previous. */
- if (win_item->prev == NULL)
- return; /* Item was first, can't be moved left */
-
- grandparent = win_item->prev->prev;
-
- /* Remove it from the list */
- priv->window_list = g_list_remove_link (priv->window_list, win_item);
-
- /* Insert it after the grandparent */
- position = g_list_position (priv->window_list, grandparent);
- priv->window_list = g_list_insert (priv->window_list, win_item->data,
- position + 1);
- g_list_free_1 (win_item);
-}
-
-void
-e_summary_window_move_right (ESummary *esummary,
- ESummaryWindow *window)
-{
- ESummaryPrivate *priv;
- GList *win_item, *child;
- int position;
-
- priv = esummary->private;
-
- win_item = g_list_find (priv->window_list, window);
-
- if (win_item->next == NULL)
- return;
-
- child = win_item->next;
-
- priv->window_list = g_list_remove_link (priv->window_list, win_item);
-
- position = g_list_position (priv->window_list, child);
- priv->window_list = g_list_insert (priv->window_list, win_item->data,
- position + 1);
- g_list_free_1 (win_item);
-}
-
-void
-e_summary_window_move_up (ESummary *esummary,
- ESummaryWindow *window)
-{
- ESummaryPrivate *priv;
- GList *win_item;
- int position;
-
- priv = esummary->private;
-
- win_item = g_list_find (priv->window_list, window);
-
- position = g_list_position (priv->window_list, win_item);
- priv->window_list = g_list_remove_link (priv->window_list, win_item);
-
- priv->window_list = g_list_insert (priv->window_list, win_item->data,
- position - 3);
- g_list_free_1 (win_item);
-}
-
-void
-e_summary_window_move_down (ESummary *esummary,
- ESummaryWindow *window)
-{
- ESummaryPrivate *priv;
- GList *win_item;
- int position;
-
- priv = esummary->private;
-
- win_item = g_list_find (priv->window_list, window);
-
- position = g_list_position (priv->window_list, win_item);
- priv->window_list = g_list_remove_link (priv->window_list, win_item);
-
- priv->window_list = g_list_insert (priv->window_list, win_item->data,
- position + 3);
-}
diff --git a/executive-summary/component/e-summary.h b/executive-summary/component/e-summary.h
deleted file mode 100644
index 757b513058..0000000000
--- a/executive-summary/component/e-summary.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_H__
-#define _E_SUMMARY_H__
-
-#include <gtk/gtkvbox.h>
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-listener.h>
-#include <bonobo/bonobo-event-source.h>
-#include <Evolution.h>
-#include <evolution-services/Executive-Summary.h>
-
-#include "e-summary-prefs.h"
-
-#define E_SUMMARY_TYPE (e_summary_get_type ())
-#define E_SUMMARY(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE, ESummary))
-#define E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE, ESummaryClass))
-#define IS_E_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TYPE))
-#define IS_E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TYPE))
-
-typedef struct _ESummaryPrivate ESummaryPrivate;
-typedef struct _ESummary ESummary;
-typedef struct _ESummaryClass ESummaryClass;
-typedef struct _ESummaryWindow ESummaryWindow;
-
-struct _ESummaryWindow {
- GNOME_Evolution_Summary_Component component;
-
- Bonobo_Control control;
- GNOME_Evolution_Summary_HTMLView html;
-
- Bonobo_PersistStream persiststream;
- Bonobo_PropertyBag propertybag;
- Bonobo_PropertyControl propertycontrol;
- Bonobo_EventSource event_source;
-
- /* Listener for the event_source */
- BonoboListener *listener;
- int listener_id;
-
- char *iid;
- char *title;
- char *icon;
-
- ESummary *esummary;
-};
-
-struct _ESummary {
- GtkVBox parent;
-
- ESummaryPrefs *prefs;
- ESummaryPrefs *tmp_prefs;
- ESummaryPrivate *private;
-};
-
-struct _ESummaryClass {
- GtkVBoxClass parent_class;
-};
-
-GtkType e_summary_get_type (void);
-GtkWidget *e_summary_new (const GNOME_Evolution_Shell shell);
-void e_summary_queue_rebuild (ESummary *esummary);
-
-void e_summary_window_free (ESummaryWindow *window);
-void e_summary_remove_window (ESummary *esummary,
- ESummaryWindow *window);
-ESummaryWindow *e_summary_add_service (ESummary *esummary,
- GNOME_Evolution_Summary_Component component,
- const char *iid);
-ESummaryWindow * e_summary_embed_service_from_id (ESummary *esummary,
- const char *obj_id);
-
-void e_summary_set_shell_view_interface (ESummary *summary,
- GNOME_Evolution_ShellView svi);
-void e_summary_set_message (ESummary *esummary,
- const char *message,
- gboolean busy);
-void e_summary_unset_message (ESummary *esummary);
-void e_summary_change_current_view (ESummary *esummary,
- const char *uri);
-void e_summary_set_title (ESummary *esummary,
- const char *title);
-
-void e_summary_window_move_left (ESummary *esummary,
- ESummaryWindow *window);
-void e_summary_window_move_right (ESummary *esummary,
- ESummaryWindow *window);
-void e_summary_window_move_up (ESummary *esummary,
- ESummaryWindow *window);
-void e_summary_window_move_down (ESummary *esummary,
- ESummaryWindow *window);
-void e_summary_reconfigure (ESummary *esummary);
-
-#endif
diff --git a/executive-summary/component/executive-summary-config.glade b/executive-summary/component/executive-summary-config.glade
deleted file mode 100644
index 17fd9b0e69..0000000000
--- a/executive-summary/component/executive-summary-config.glade
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Project1</name>
- <program_name>project1</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>
- <translatable_strings_file></translatable_strings_file>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>summaryprefs</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomePropertyBox:notebook</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <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>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame1</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Appearance</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>vbox2</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Background:</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>GnomeFileEntry</class>
- <name>htmlpage</name>
- <cxx_use_heap>True</cxx_use_heap>
- <max_saved>10</max_saved>
- <directory>False</directory>
- <modal>False</modal>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>combo-entry1</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>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Number of columns:</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>GtkSpinButton</class>
- <name>columnspinner</name>
- <cxx_use_heap>True</cxx_use_heap>
- <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>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>
- </widget>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>Label</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>
-</widget>
-
-</GTK-Interface>
diff --git a/executive-summary/component/executive-summary.png b/executive-summary/component/executive-summary.png
deleted file mode 100644
index 10a122f39e..0000000000
--- a/executive-summary/component/executive-summary.png
+++ /dev/null
Binary files differ
diff --git a/executive-summary/component/main.c b/executive-summary/component/main.c
deleted file mode 100644
index ed21ac567e..0000000000
--- a/executive-summary/component/main.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * main.c: The core of the executive summary component.
- *
- * 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: Iain Holmes <iain@ximian.com>
- */
-
-#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 <liboaf/liboaf.h>
-#include <glade/glade.h>
-
-#ifdef GTKHTML_HAVE_GCONF
-#include <gconf/gconf.h>
-#endif
-
-#include "gal/widgets/e-gui-utils.h"
-#include "gal/widgets/e-cursors.h"
-
-#include <libgnomevfs/gnome-vfs.h>
-#include "component-factory.h"
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- gnome_init_with_popt_table ("evolution-executive-summary", VERSION,
- argc, argv, oaf_popt_options, 0, NULL);
- orb = oaf_init (argc, argv);
-
- gdk_rgb_init ();
- glade_gnome_init ();
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
- g_error (_("Executive summary component could not initialize Bonobo.\n"
- "If there was a warning message about the "
- "RootPOA, it probably means\nyou compiled "
- "Bonobo against GOAD instead of OAF."));
- }
-
-#ifdef GTKHTML_HAVE_GCONF
- gconf_init (argc, argv, NULL);
-#endif
-
- e_cursors_init ();
-
- component_factory_init ();
-
- gnome_vfs_init ();
- bonobo_main ();
-
- return 0;
-}
diff --git a/executive-summary/default-header.html b/executive-summary/default-header.html
deleted file mode 100644
index 64fc119ea6..0000000000
--- a/executive-summary/default-header.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title>Evolution - Executive Summary</title>
-</head>
-
-<body bgcolor="#ffffff">
-<table>
-<tr valign="center">
-<td align="right"><img src="executive-summary.png"></td>
-</tr>
-</table>
-</body>
-</html>
-
diff --git a/executive-summary/evolution-services/.cvsignore b/executive-summary/evolution-services/.cvsignore
deleted file mode 100644
index d9807cd94f..0000000000
--- a/executive-summary/evolution-services/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Executive-Summary.h
-Executive-Summary-common.c
-Executive-Summary-skels.c
-Executive-Summary-stubs.c
-Makefile.in
-Makefile
-core
-.deps
-.libs
-*.lo
-*.la \ No newline at end of file
diff --git a/executive-summary/evolution-services/Makefile.am b/executive-summary/evolution-services/Makefile.am
deleted file mode 100644
index e371b0ddf4..0000000000
--- a/executive-summary/evolution-services/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-lib_LTLIBRARIES = libevolution-services.la
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/executive-summary \
- -I$(top_builddir)/executive-summary \
- $(EXTRA_GNOME_CFLAGS) \
- $(GNOME_VFS_CFLAGS) \
- $(GTKHTML_CFLAGS) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DG_LOG_DOMAIN=\"evolution-services\"
-
-IDL_GENERATED = \
- Executive-Summary.h \
- Executive-Summary-common.c \
- Executive-Summary-skels.c \
- Executive-Summary-stubs.c
-
-Executive-Summary-impl.o: Executive-Summary.h
-
-IDLS = \
- $(srcdir)/../idl/Executive-Summary.idl \
- $(srcdir)/../idl/Summary.idl \
- $(srcdir)/../idl/SummaryComponent.idl \
- $(srcdir)/../idl/HtmlView.idl
-
-$(IDL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(srcdir)/../idl/Executive-Summary.idl
-
-libevolution_services_la_SOURCES = \
- $(IDL_GENERATED) \
- executive-summary-component.c \
- executive-summary-component.h \
- executive-summary-component-factory-client.c \
- executive-summary-component-factory-client.h \
- executive-summary-html-view.c \
- executive-summary-html-view.h
-
-libevolution_services_la_LIBADD = \
- $(top_builddir)/e-util/libeutil.la \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(GTKHTML_LIBS)
-
-BUILT_SOURCES = $(IDL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/executive-summary/evolution-services/executive-summary-client.c b/executive-summary/evolution-services/executive-summary-client.c
deleted file mode 100644
index af8fab4f10..0000000000
--- a/executive-summary/evolution-services/executive-summary-client.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-client.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-
-#include "Executive-Summary.h"
-#include "executive-summary-client.h"
-#include "executive-summary-component.h"
-
-#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE
-static BonoboObjectClass *parent_class = NULL;
-
-struct _ExecutiveSummaryClientPrivate {
- int dummy;
-};
-
-static void
-executive_summary_client_destroy (GtkObject *object)
-{
- ExecutiveSummaryClient *client;
- ExecutiveSummaryClientPrivate *priv;
-
- client = EXECUTIVE_SUMMARY_CLIENT (object);
- priv = client->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- client->private = NULL;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-executive_summary_client_init (ExecutiveSummaryClient *client)
-{
- ExecutiveSummaryClientPrivate *priv;
-
- priv = g_new0 (ExecutiveSummaryClientPrivate, 1);
- client->private = priv;
-}
-
-static void
-executive_summary_client_class_init (ExecutiveSummaryClientClass *client)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (client);
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = executive_summary_client_destroy;
-}
-
-void
-executive_summary_client_construct (ExecutiveSummaryClient *client,
- CORBA_Object corba_object)
-{
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_CLIENT (client));
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (client), corba_object);
-}
-
-E_MAKE_TYPE (executive_summary_client, "ExecutiveSummaryClient",
- ExecutiveSummaryClient, executive_summary_client_class_init,
- executive_summary_client_init, PARENT_TYPE);
-
-void
-executive_summary_client_set_title (ExecutiveSummaryClient *client,
- int id,
- const char *title)
-{
- GNOME_Evolution_Summary_ViewFrame summary;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- summary = bonobo_object_corba_objref (BONOBO_OBJECT (client));
-
- GNOME_Evolution_Summary_ViewFrame_setTitle (summary, id, title, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error setting title to %s:%s", title, CORBA_exception_id (&ev));
- }
-
- CORBA_exception_free (&ev);
-}
-
-void
-executive_summary_client_set_icon (ExecutiveSummaryClient *client,
- int id,
- const char *icon)
-{
- GNOME_Evolution_Summary_ViewFrame summary;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- summary = bonobo_object_corba_objref (BONOBO_OBJECT (client));
-
- GNOME_Evolution_Summary_ViewFrame_setIcon (summary, id, icon, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error setting icon to %s:%s", icon, CORBA_exception_id (&ev));
- }
-
- CORBA_exception_free (&ev);
-}
-
-void
-executive_summary_client_flash (ExecutiveSummaryClient *client,
- int id)
-{
- GNOME_Evolution_Summary_ViewFrame summary;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- summary = bonobo_object_corba_objref (BONOBO_OBJECT (client));
-
- GNOME_Evolution_Summary_ViewFrame_flash (summary, id, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error flashing");
- }
-
- CORBA_exception_free (&ev);
-}
-
-void
-executive_summary_client_update (ExecutiveSummaryClient *client,
- int id,
- const char *html)
-{
- GNOME_Evolution_Summary_ViewFrame summary;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- summary = bonobo_object_corba_objref (BONOBO_OBJECT (client));
-
- GNOME_Evolution_Summary_ViewFrame_updateComponent (summary, id, html, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error updating the component");
- }
-
- CORBA_exception_free (&ev);
-}
-
-
diff --git a/executive-summary/evolution-services/executive-summary-client.h b/executive-summary/evolution-services/executive-summary-client.h
deleted file mode 100644
index 14c193dc08..0000000000
--- a/executive-summary/evolution-services/executive-summary-client.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-client.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _EXECUTIVE_SUMMARY_CLIENT_H__
-#define _EXECUTIVE_SUMMARY_CLIENT_H__
-
-#include <bonobo/bonobo-object.h>
-#include <evolution-services/executive-summary-component.h>
-
-#define EXECUTIVE_SUMMARY_CLIENT_TYPE (executive_summary_client_get_type ())
-#define EXECUTIVE_SUMMARY_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE, ExecutiveSummaryClient))
-#define EXECUTIVE_SUMMARY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_CLIENT_TYPE, ExecutiveSummaryClientClass))
-#define IS_EXECUTIVE_SUMMARY_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE))
-#define IS_EXECUTIVE_SUMMARY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE))
-
-typedef struct _ExecutiveSummaryClientPrivate ExecutiveSummaryClientPrivate;
-typedef struct _ExecutiveSummaryClient ExecutiveSummaryClient;
-typedef struct _ExecutiveSummaryClientClass ExecutiveSummaryClientClass;
-
-struct _ExecutiveSummaryClient {
- BonoboObjectClient parent;
-
- ExecutiveSummaryClientPrivate *private;
-};
-
-struct _ExecutiveSummaryClientClass {
- BonoboObjectClientClass parent_class;
-};
-
-GtkType executive_summary_client_get_type (void);
-void executive_summary_client_construct (ExecutiveSummaryClient *client,
- CORBA_Object object);
-void executive_summary_client_set_title (ExecutiveSummaryClient *client,
- int id,
- const char *title);
-void executive_summary_client_set_icon (ExecutiveSummaryClient *client,
- int id,
- const char *icon);
-void executive_summary_client_flash (ExecutiveSummaryClient *client,
- int id);
-void executive_summary_client_update (ExecutiveSummaryClient *client,
- int id,
- const char *html);
-
-#endif
diff --git a/executive-summary/evolution-services/executive-summary-component-client.c b/executive-summary/evolution-services/executive-summary-component-client.c
deleted file mode 100644
index 30daf499ba..0000000000
--- a/executive-summary/evolution-services/executive-summary-component-client.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component-client.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-
-#include <liboaf/liboaf.h>
-
-#include <Executive-Summary.h>
-#include "executive-summary-component-client.h"
-#include "executive-summary.h"
-
-#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE
-static BonoboObjectClass *parent_class = NULL;
-
-struct _ExecutiveSummaryComponentClientPrivate {
- int dummy;
-};
-
-static void
-executive_summary_component_client_destroy (GtkObject *object)
-{
- ExecutiveSummaryComponentClient *client;
- ExecutiveSummaryComponentClientPrivate *priv;
-
- client = EXECUTIVE_SUMMARY_COMPONENT_CLIENT (object);
- priv = client->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- client->private = NULL;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-executive_summary_component_client_init (ExecutiveSummaryComponentClient *client)
-{
- ExecutiveSummaryComponentClientPrivate *priv;
-
- priv = g_new0 (ExecutiveSummaryComponentClientPrivate, 1);
- client->private = priv;
-}
-
-static void
-executive_summary_component_client_class_init (ExecutiveSummaryComponentClientClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = executive_summary_component_client_destroy;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-void
-executive_summary_component_client_construct (ExecutiveSummaryComponentClient *client,
- CORBA_Object corba_object)
-{
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT (client));
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (client), corba_object);
-}
-
-ExecutiveSummaryComponentClient*
-executive_summary_component_client_new (const char *id)
-{
- ExecutiveSummaryComponentClient *client;
- CORBA_Environment ev;
- CORBA_Object corba_object;
-
- g_return_val_if_fail (id != NULL, NULL);
-
- CORBA_exception_init (&ev);
-
- corba_object = oaf_activate_from_id ((char *)id, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- g_warning ("Could not start %s\n", id);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- if (corba_object == CORBA_OBJECT_NIL) {
- g_warning ("Could not activate %s\n", id);
- return NULL;
- }
-
- client = gtk_type_new (executive_summary_component_client_get_type ());
- executive_summary_component_client_construct (client, corba_object);
-
- return client;
-}
-
-/* External API */
-void
-executive_summary_component_client_set_owner (ExecutiveSummaryComponentClient *client,
- ExecutiveSummary *summary)
-{
- GNOME_Evolution_Summary_Component component;
- GNOME_Evolution_Summary_ViewFrame corba_object;
- CORBA_Environment ev;
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT (client));
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY (summary));
-
- CORBA_exception_init (&ev);
- component = bonobo_object_corba_objref (BONOBO_OBJECT (client));
- corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (summary));
-
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
- GNOME_Evolution_Summary_Component_setOwner (component, corba_object, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error setting owner");
- }
-
- CORBA_exception_free (&ev);
- return;
-}
-
-void
-executive_summary_component_client_unset_owner (ExecutiveSummaryComponentClient *client)
-{
- GNOME_Evolution_Summary_Component component;
- CORBA_Environment ev;
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT (client));
-
- CORBA_exception_init (&ev);
- component = bonobo_object_corba_objref (BONOBO_OBJECT (client));
-
- GNOME_Evolution_Summary_Component_unsetOwner (component, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error unsetting owner");
- }
-
- CORBA_exception_free (&ev);
- return;
-}
-
-E_MAKE_TYPE (executive_summary_component_client,
- "ExecutiveSummaryComponentClient",
- ExecutiveSummaryComponentClient,
- executive_summary_component_client_class_init,
- executive_summary_component_client_init, PARENT_TYPE)
diff --git a/executive-summary/evolution-services/executive-summary-component-client.h b/executive-summary/evolution-services/executive-summary-component-client.h
deleted file mode 100644
index d893f8dde8..0000000000
--- a/executive-summary/evolution-services/executive-summary-component-client.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component-client.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _EXECUTIVE_SUMMARY_COMPONENT_CLIENT_H__
-#define _EXECUTIVE_SUMMARY_COMPONENT_CLIENT_H__
-
-#include <bonobo/bonobo-object.h>
-#include <evolution-services/executive-summary.h>
-#include <evolution-services/executive-summary-component-view.h>
-
-#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE (executive_summary_component_client_get_type ())
-#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE, ExecutiveSummaryComponentClient))
-#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE, ExecutiveSummaryComponentClientClass))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE))
-
-typedef struct _ExecutiveSummaryComponentClientPrivate ExecutiveSummaryComponentClientPrivate;
-typedef struct _ExecutiveSummaryComponentClient ExecutiveSummaryComponentClient;
-typedef struct _ExecutiveSummaryComponentClientClass ExecutiveSummaryComponentClientClass;
-
-struct _ExecutiveSummaryComponentClient {
- BonoboObjectClient parent;
-
- ExecutiveSummaryComponentClientPrivate *private;
-};
-
-struct _ExecutiveSummaryComponentClientClass {
- BonoboObjectClientClass parent_class;
-};
-
-GtkType executive_summary_component_client_get_type (void);
-ExecutiveSummaryComponentClient *executive_summary_component_client_new (const char *id);
-
-void executive_summary_component_client_set_owner (ExecutiveSummaryComponentClient *client,
- ExecutiveSummary *summary);
-void executive_summary_component_client_unset_owner (ExecutiveSummaryComponentClient *client);
-
-void executive_summary_component_client_supports (ExecutiveSummaryComponentClient *client,
- gboolean *bonobo,
- gboolean *html);
-
-void executive_summary_component_client_configure (ExecutiveSummaryComponentClient *client,
- ExecutiveSummaryComponentView *view);
-void executive_summary_component_client_destroy_view (ExecutiveSummaryComponentClient *client,
- ExecutiveSummaryComponentView *view);
-
-#endif
-
diff --git a/executive-summary/evolution-services/executive-summary-component-factory-client.c b/executive-summary/evolution-services/executive-summary-component-factory-client.c
deleted file mode 100644
index 3f14001697..0000000000
--- a/executive-summary/evolution-services/executive-summary-component-factory-client.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component-factory-client.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-
-#include <liboaf/liboaf.h>
-
-#include <Executive-Summary.h>
-#include "executive-summary-component-factory-client.h"
-
-#define PARENT_TYPE BONOBO_OBJECT_CLIENT_TYPE
-static BonoboObjectClass *parent_class = NULL;
-
-struct _ExecutiveSummaryComponentFactoryClientPrivate {
- int dummy;
-};
-
-static void
-executive_summary_component_factory_client_destroy (GtkObject *object)
-{
- ExecutiveSummaryComponentFactoryClient *client;
- ExecutiveSummaryComponentFactoryClientPrivate *priv;
-
- client = EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT (object);
- priv = client->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- client->private = NULL;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-executive_summary_component_factory_client_init (ExecutiveSummaryComponentFactoryClient *client)
-{
- ExecutiveSummaryComponentFactoryClientPrivate *priv;
-
- priv = g_new0 (ExecutiveSummaryComponentFactoryClientPrivate, 1);
- client->private = priv;
-}
-
-static void
-executive_summary_component_factory_client_class_init (ExecutiveSummaryComponentFactoryClientClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = executive_summary_component_factory_client_destroy;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-E_MAKE_TYPE (executive_summary_component_factory_client,
- "ExecutiveSummaryComponentFactoryClient",
- ExecutiveSummaryComponentFactoryClient,
- executive_summary_component_factory_client_class_init,
- executive_summary_component_factory_client_init, PARENT_TYPE)
-
-
-/*** Public API ***/
-/**
- * executive_summary_component_factory_client_construct:
- * @client: The ExecutiveSummaryComponentFactoryClient to construct.
- * @corba_object: The CORBA_Object to construct it from.
- *
- * Constructs a client from the given CORBA_Object.
- */
-void
-executive_summary_component_factory_client_construct (ExecutiveSummaryComponentFactoryClient *client,
- CORBA_Object corba_object)
-{
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT (client));
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_client_construct (BONOBO_OBJECT_CLIENT (client), corba_object);
-}
-
-/**
- * executive_summary_component_factory_client_new:
- * @id: The OAFIID of the component to activate.
- *
- * Activates the component specified by @id, and creates a server side client
- * for that object.
- *
- * Returns: A pointer to an ExecutiveSummaryComponentFactoryClient object.
- */
-ExecutiveSummaryComponentFactoryClient *
-executive_summary_component_factory_client_new (const char *id)
-{
- ExecutiveSummaryComponentFactoryClient *client;
- CORBA_Environment ev;
- CORBA_Object corba_object;
-
- g_return_val_if_fail (id != NULL, NULL);
-
- CORBA_exception_init (&ev);
-
- corba_object = oaf_activate_from_id ((char *)id, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- g_warning ("Could not start %s\n", id);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- if (corba_object == CORBA_OBJECT_NIL) {
- g_warning ("Could not activate %s\n", id);
- return NULL;
- }
-
- client = gtk_type_new (executive_summary_component_factory_client_get_type ());
- executive_summary_component_factory_client_construct (client,
- corba_object);
-
- return client;
-}
-
-/**
- * executive_summary_component_factory_client_create_view:
- * @client: The client on which to create the view.
- *
- * Creates a new view of a remote component.
- *
- * Returns: A GNOME_Evolution_Summary_Component.
- */
-GNOME_Evolution_Summary_Component
-executive_summary_component_factory_client_create_view (ExecutiveSummaryComponentFactoryClient *client)
-{
- GNOME_Evolution_Summary_ComponentFactory factory;
- GNOME_Evolution_Summary_Component component;
- CORBA_Environment ev;
-
- g_return_val_if_fail (client != NULL, CORBA_OBJECT_NIL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT (client),
- CORBA_OBJECT_NIL);
-
- CORBA_exception_init (&ev);
- factory = bonobo_object_corba_objref (BONOBO_OBJECT (client));
-
- component = GNOME_Evolution_Summary_ComponentFactory_createView (factory, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error creating view: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
- return component;
-}
diff --git a/executive-summary/evolution-services/executive-summary-component-factory-client.h b/executive-summary/evolution-services/executive-summary-component-factory-client.h
deleted file mode 100644
index 7c9044256f..0000000000
--- a/executive-summary/evolution-services/executive-summary-component-factory-client.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component-factory-client.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_H__
-#define _EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_H__
-
-#include <bonobo/bonobo-object-client.h>
-
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE (executive_summary_component_factory_client_get_type ())
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE, ExecutiveSummaryComponentFactoryClient))
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE, ExecutiveSummaryComponentFactoryClientClass))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE))
-
-typedef struct _ExecutiveSummaryComponentFactoryClientPrivate ExecutiveSummaryComponentFactoryClientPrivate;
-typedef struct _ExecutiveSummaryComponentFactoryClient ExecutiveSummaryComponentFactoryClient;
-typedef struct _ExecutiveSummaryComponentFactoryClientClass ExecutiveSummaryComponentFactoryClientClass;
-
-struct _ExecutiveSummaryComponentFactoryClient {
- BonoboObjectClient parent;
-
- ExecutiveSummaryComponentFactoryClientPrivate *private;
-};
-
-struct _ExecutiveSummaryComponentFactoryClientClass {
- BonoboObjectClientClass parent_class;
-};
-
-GtkType executive_summary_component_factory_client_get_type (void);
-
-void executive_summary_component_factory_client_construct (ExecutiveSummaryComponentFactoryClient *client,
- CORBA_Object corba_object);
-ExecutiveSummaryComponentFactoryClient *executive_summary_component_factory_client_new (const char *id);
-CORBA_Object executive_summary_component_factory_client_create_view (ExecutiveSummaryComponentFactoryClient *client);
-
-#endif
-
diff --git a/executive-summary/evolution-services/executive-summary-component-view.c b/executive-summary/evolution-services/executive-summary-component-view.c
deleted file mode 100644
index 6fdfdce733..0000000000
--- a/executive-summary/evolution-services/executive-summary-component-view.c
+++ /dev/null
@@ -1,401 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component.c - Bonobo implementation of
- * SummaryComponent.idl
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-component-view.h>
-
-struct _ExecutiveSummaryComponentViewPrivate {
- ExecutiveSummaryComponent *component;
-
- BonoboControl *control;
- Bonobo_Control objref;
-
- char *html;
-
- char *title;
- char *icon;
-
- int id;
-};
-
-static GtkObjectClass *parent_class = NULL;
-#define PARENT_TYPE (gtk_object_get_type ())
-
-enum {
- CONFIGURE,
- LAST_SIGNAL
-};
-
-static gint32 view_signals[LAST_SIGNAL] = { 0 };
-
-static void
-executive_summary_component_view_destroy (GtkObject *object)
-{
- ExecutiveSummaryComponentView *view;
- ExecutiveSummaryComponentViewPrivate *priv;
-
- view = EXECUTIVE_SUMMARY_COMPONENT_VIEW (object);
- priv = view->private;
- if (priv == NULL)
- return;
-
- if (priv->component)
- bonobo_object_unref (BONOBO_OBJECT (priv->component));
-
- if (priv->control)
- bonobo_object_unref (BONOBO_OBJECT (priv->control));
-
- g_free (priv->html);
- g_free (priv->title);
- g_free (priv->icon);
-
- g_free (priv);
- view->private = NULL;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-executive_summary_component_view_class_init (ExecutiveSummaryComponentViewClass *view_class)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (view_class);
-
- object_class->destroy = executive_summary_component_view_destroy;
-
- view_signals[CONFIGURE] = gtk_signal_new ("configure",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ExecutiveSummaryComponentViewClass, configure),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, view_signals, LAST_SIGNAL);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-executive_summary_component_view_init (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- priv = g_new (ExecutiveSummaryComponentViewPrivate, 1);
- view->private = priv;
-
- priv->control = NULL;
- priv->objref = NULL;
- priv->html = NULL;
- priv->title = NULL;
- priv->icon = NULL;
- priv->id = -1;
-}
-
-E_MAKE_TYPE (executive_summary_component_view, "ExecutiveSummaryComponentView",
- ExecutiveSummaryComponentView,
- executive_summary_component_view_class_init,
- executive_summary_component_view_init, PARENT_TYPE);
-
-void
-executive_summary_component_view_construct (ExecutiveSummaryComponentView *view,
- ExecutiveSummaryComponent *component,
- BonoboControl *control,
- const char *html,
- const char *title,
- const char *icon)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
- g_return_if_fail (control != NULL || html != NULL);
-
- priv = view->private;
-
- if (component != NULL) {
- bonobo_object_ref (BONOBO_OBJECT (component));
- priv->component = component;
- } else {
- priv->component = NULL;
- }
-
- if (control != NULL) {
- bonobo_object_ref (BONOBO_OBJECT (control));
- priv->control = control;
- } else {
- priv->control = NULL;
- }
-
- if (html) {
- priv->html = g_strdup (html);
- } else {
- priv->html = NULL;
- }
-
- if (title) {
- priv->title = g_strdup (title);
- } else {
- priv->title = NULL;
- }
-
- if (icon) {
- priv->icon = g_strdup (icon);
- } else {
- priv->icon = NULL;
- }
-}
-
-ExecutiveSummaryComponentView *
-executive_summary_component_view_new (ExecutiveSummaryComponent *component,
- BonoboControl *control,
- const char *html,
- const char *title,
- const char *icon)
-{
- ExecutiveSummaryComponentView *view;
-
- g_return_val_if_fail (control != NULL || html != NULL, NULL);
-
- view = gtk_type_new (executive_summary_component_view_get_type ());
- executive_summary_component_view_construct (view, component, control,
- html, title, icon);
-
- return view;
-}
-
-void
-executive_summary_component_view_set_title (ExecutiveSummaryComponentView *view,
- const char *title)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
- ExecutiveSummaryComponent *component;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
-
- priv = view->private;
- if (priv->title)
- g_free (priv->title);
- priv->title = g_strdup (title);
-
- component = priv->component;
- if (component == NULL) {
- return;
- }
-
- executive_summary_component_set_title (component, view);
-}
-
-const char *
-executive_summary_component_view_get_title (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL);
-
- priv = view->private;
-
- return priv->title;
-}
-
-void
-executive_summary_component_view_set_icon (ExecutiveSummaryComponentView *view,
- const char *icon)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
- ExecutiveSummaryComponent *component;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
-
- priv = view->private;
- if (priv->icon)
- g_free (priv->icon);
- priv->icon = g_strdup (icon);
-
- component = priv->component;
- if (component == NULL) {
- return;
- }
-
- executive_summary_component_set_icon (component, view);
-}
-
-const char *
-executive_summary_component_view_get_icon (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL);
-
- priv = view->private;
-
- return priv->icon;
-}
-
-void
-executive_summary_component_view_flash (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
- ExecutiveSummaryComponent *component;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
-
- priv = view->private;
- component = priv->component;
- if (component == NULL) {
- g_warning ("Calling %s from the wrong side of the CORBA interface", __FUNCTION__);
- return;
- }
-
- executive_summary_component_flash (component, view);
-}
-
-void
-executive_summary_component_view_set_html (ExecutiveSummaryComponentView *view,
- const char *html)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
- ExecutiveSummaryComponent *component;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
-
- priv = view->private;
- if (priv->html)
- g_free (priv->html);
-
- priv->html = g_strdup (html);
-
- component = priv->component;
- if (component == NULL) {
- return;
- }
-
- executive_summary_component_update (component, view);
-}
-
-void
-executive_summary_component_view_configure (ExecutiveSummaryComponentView *view)
-{
- gtk_signal_emit (GTK_OBJECT (view), view_signals[CONFIGURE]);
-}
-
-const char *
-executive_summary_component_view_get_html (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL);
-
- priv = view->private;
-
- return priv->html;
-}
-
-BonoboObject *
-executive_summary_component_view_get_control (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL);
-
- priv = view->private;
-
- return (BonoboObject *)priv->control;
-}
-
-void
-executive_summary_component_view_set_id (ExecutiveSummaryComponentView *view,
- int id)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
-
- priv = view->private;
-
- priv->id = id;
-}
-
-int
-executive_summary_component_view_get_id (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, -1);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), -1);
-
- priv = view->private;
-
- return priv->id;
-}
-
-void
-executive_summary_component_view_set_objref (ExecutiveSummaryComponentView *view,
- Bonobo_Control objref)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view));
-
- priv = view->private;
-
- if (priv->objref) {
- g_warning ("View already has an objref.");
- return;
- }
-
- priv->objref = objref;
-}
-
-GtkWidget *
-executive_summary_component_view_get_widget (ExecutiveSummaryComponentView *view)
-{
- ExecutiveSummaryComponentViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW (view), NULL);
-
- priv = view->private;
- if (priv->objref == NULL) {
- g_warning ("View has no objref.");
- return NULL;
- }
-
- return bonobo_widget_new_control_from_objref (priv->objref, NULL);
-}
diff --git a/executive-summary/evolution-services/executive-summary-component-view.h b/executive-summary/evolution-services/executive-summary-component-view.h
deleted file mode 100644
index 22dabf97b0..0000000000
--- a/executive-summary/evolution-services/executive-summary-component-view.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 __EXECUTIVE_SUMMARY_COMPONENT_VIEW_H__
-#define __EXECUTIVE_SUMMARY_COMPONENT_VIEW_H__
-
-#include <bonobo/bonobo-control.h>
-#include <evolution-services/executive-summary-component.h>
-
-#define EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE (executive_summary_component_view_get_type ())
-#define EXECUTIVE_SUMMARY_COMPONENT_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE, ExecutiveSummaryComponentView))
-#define EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE, ExecutiveSummaryComponentClass))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS_TYPE))
-
-typedef struct _ExecutiveSummaryComponentViewPrivate ExecutiveSummaryComponentViewPrivate;
-typedef struct _ExecutiveSummaryComponentView ExecutiveSummaryComponentView;
-typedef struct _ExecutiveSummaryComponentViewClass ExecutiveSummaryComponentViewClass;
-
-struct _ExecutiveSummaryComponentView {
- GtkObject object;
-
- ExecutiveSummaryComponentViewPrivate *private;
-};
-
-struct _ExecutiveSummaryComponentViewClass {
- GtkObjectClass parent_class;
-
- /* Signals */
- void (* configure) (ExecutiveSummaryComponentView *view);
-};
-
-GtkType executive_summary_component_view_get_type (void);
-void
-executive_summary_component_view_construct (ExecutiveSummaryComponentView *view,
- ExecutiveSummaryComponent *component,
- BonoboControl *control,
- const char *html,
- const char *title,
- const char *icon);
-ExecutiveSummaryComponentView *
-executive_summary_component_view_new (ExecutiveSummaryComponent *component,
- BonoboControl *control,
- const char *html,
- const char *title,
- const char *icon);
-
-void executive_summary_component_view_set_title (ExecutiveSummaryComponentView *view,
- const char *title);
-const char *executive_summary_component_view_get_title (ExecutiveSummaryComponentView *view);
-
-void executive_summary_component_view_set_icon (ExecutiveSummaryComponentView *view,
- const char *icon);
-const char *executive_summary_component_view_get_icon (ExecutiveSummaryComponentView *view);
-
-void executive_summary_component_view_flash (ExecutiveSummaryComponentView *view);
-
-void executive_summary_component_view_set_html (ExecutiveSummaryComponentView *view,
- const char *html);
-const char *executive_summary_component_view_get_html (ExecutiveSummaryComponentView *view);
-BonoboObject *executive_summary_component_view_get_control (ExecutiveSummaryComponentView *view);
-
-int executive_summary_component_view_get_id (ExecutiveSummaryComponentView *view);
-void executive_summary_component_view_set_id (ExecutiveSummaryComponentView *view,
- int id);
-void executive_summary_component_view_configure (ExecutiveSummaryComponentView *view);
-void executive_summary_component_view_set_objref (ExecutiveSummaryComponentView *view,
- Bonobo_Control objref);
-GtkWidget *executive_summary_component_view_get_widget (ExecutiveSummaryComponentView *view);
-
-#endif
-
-
diff --git a/executive-summary/evolution-services/executive-summary-component.c b/executive-summary/evolution-services/executive-summary-component.c
deleted file mode 100644
index 44873be94e..0000000000
--- a/executive-summary/evolution-services/executive-summary-component.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component.c - Bonobo implementation of
- * SummaryComponent.idl
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-
-#include "Executive-Summary.h"
-#include "executive-summary-component.h"
-
-static void executive_summary_component_destroy (GtkObject *object);
-static void executive_summary_component_init (ExecutiveSummaryComponent *component);
-static void executive_summary_component_class_init (ExecutiveSummaryComponentClass *esc_class);
-
-#define PARENT_TYPE (bonobo_object_get_type ())
-#define FACTORY_PARENT_TYPE (bonobo_object_get_type ())
-
-static BonoboObjectClass *parent_class;
-static BonoboObjectClass *factory_parent_class;
-
-struct _ExecutiveSummaryComponentPrivate {
- int dummy;
-};
-
-struct _ExecutiveSummaryComponentFactoryPrivate {
- EvolutionServicesCreateViewFn create_view;
- void *closure;
-};
-
-/* CORBA interface */
-static POA_GNOME_Evolution_Summary_Component__vepv SummaryComponent_vepv;
-static POA_GNOME_Evolution_Summary_ComponentFactory__vepv ComponentFactory_vepv;
-
-static POA_GNOME_Evolution_Summary_Component *
-create_servant (void)
-{
- POA_GNOME_Evolution_Summary_Component *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_Summary_Component *)g_new0 (BonoboObjectServant, 1);
- servant->vepv = &SummaryComponent_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_Evolution_Summary_Component__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
-executive_summary_component_destroy (GtkObject *object)
-{
- ExecutiveSummaryComponent *component;
- ExecutiveSummaryComponentPrivate *priv;
-
- component = EXECUTIVE_SUMMARY_COMPONENT (object);
- priv = component->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- component->private = NULL;
-
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/* Init */
-static void
-corba_class_init (void)
-{
- POA_GNOME_Evolution_Summary_Component__vepv *vepv;
- POA_GNOME_Evolution_Summary_Component__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_Summary_Component__epv, 1);
-
- vepv = &SummaryComponent_vepv;
- vepv->_base_epv = base_epv;
- vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
- vepv->GNOME_Evolution_Summary_Component_epv = epv;
-}
-
-static void
-executive_summary_component_class_init (ExecutiveSummaryComponentClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = executive_summary_component_destroy;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- corba_class_init ();
-}
-
-static void
-executive_summary_component_init (ExecutiveSummaryComponent *component)
-{
- ExecutiveSummaryComponentPrivate *priv;
-
- priv = g_new (ExecutiveSummaryComponentPrivate, 1);
-
- component->private = priv;
-}
-
-E_MAKE_TYPE (executive_summary_component, "ExecutiveSummaryComponent",
- ExecutiveSummaryComponent, executive_summary_component_class_init,
- executive_summary_component_init, PARENT_TYPE);
-
-
-static void
-executive_summary_component_construct (ExecutiveSummaryComponent *component,
- GNOME_Evolution_Summary_Component corba_object)
-{
- g_return_if_fail (component != NULL);
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_construct (BONOBO_OBJECT (component), corba_object);
-}
-
-
-/*** Public API ***/
-/**
- * executive_summary_component_new:
- *
- * Creates a BonoboObject that implements the Summary::Component interface.
- *
- * Returns: A pointer to a BonoboObject.
- */
-BonoboObject *
-executive_summary_component_new (void)
-{
- ExecutiveSummaryComponent *component;
- POA_GNOME_Evolution_Summary_Component *servant;
- GNOME_Evolution_Summary_Component corba_object;
-
- servant = create_servant ();
- if (servant == NULL)
- return NULL;
-
- component = gtk_type_new (executive_summary_component_get_type ());
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (component),
- servant);
-
- executive_summary_component_construct (component, corba_object);
-
- return BONOBO_OBJECT (component);
-}
-
-
-/**** ComponentFactory implementation ****/
-
-static POA_GNOME_Evolution_Summary_ComponentFactory *
-create_factory_servant (void)
-{
- POA_GNOME_Evolution_Summary_ComponentFactory *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_Summary_ComponentFactory *)g_new0 (BonoboObjectServant, 1);
- servant->vepv = &ComponentFactory_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_Evolution_Summary_ComponentFactory__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 GNOME_Evolution_Summary_Component
-impl_GNOME_Evolution_Summary_ComponentFactory_createView (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- BonoboObject *view;
- ExecutiveSummaryComponentFactory *factory;
- ExecutiveSummaryComponentFactoryPrivate *priv;
- GNOME_Evolution_Summary_Component component, component_dup;
-
- bonobo_object = bonobo_object_from_servant (servant);
- factory = EXECUTIVE_SUMMARY_COMPONENT_FACTORY (bonobo_object);
- priv = factory->private;
-
- view = (* priv->create_view) (factory, priv->closure);
- g_return_val_if_fail (view != NULL, CORBA_OBJECT_NIL);
-
- component = bonobo_object_corba_objref (BONOBO_OBJECT (view));
-
- component_dup = CORBA_Object_duplicate (component, ev);
-
- return component_dup;
-}
-
-static void
-corba_factory_init (void)
-{
- POA_GNOME_Evolution_Summary_ComponentFactory__vepv *vepv;
- POA_GNOME_Evolution_Summary_ComponentFactory__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_Summary_ComponentFactory__epv, 1);
- epv->createView = impl_GNOME_Evolution_Summary_ComponentFactory_createView;
-
- vepv = &ComponentFactory_vepv;
- vepv->_base_epv = base_epv;
- vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
- vepv->GNOME_Evolution_Summary_ComponentFactory_epv = epv;
-}
-
-/* GtkObject methods */
-static void
-executive_summary_component_factory_destroy (GtkObject *object)
-{
- ExecutiveSummaryComponentFactory *factory;
- ExecutiveSummaryComponentFactoryPrivate *priv;
-
- factory = EXECUTIVE_SUMMARY_COMPONENT_FACTORY (object);
- priv = factory->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- factory->private = NULL;
-
- (* GTK_OBJECT_CLASS (factory_parent_class)->destroy) (object);
-}
-
-static void
-executive_summary_component_factory_class_init (ExecutiveSummaryComponentFactoryClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = executive_summary_component_factory_destroy;
-
- factory_parent_class = gtk_type_class (FACTORY_PARENT_TYPE);
- corba_factory_init ();
-}
-
-static void
-executive_summary_component_factory_init (ExecutiveSummaryComponentFactory *factory)
-{
- ExecutiveSummaryComponentFactoryPrivate *priv;
-
- priv = g_new (ExecutiveSummaryComponentFactoryPrivate, 1);
-
- priv->create_view = NULL;
- priv->closure = NULL;
- factory->private = priv;
-}
-
-E_MAKE_TYPE (executive_summary_component_factory,
- "ExecutiveSummaryComponentFactory",
- ExecutiveSummaryComponentFactory,
- executive_summary_component_factory_class_init,
- executive_summary_component_factory_init, FACTORY_PARENT_TYPE);
-
-static void
-executive_summary_component_factory_construct (ExecutiveSummaryComponentFactory *factory,
- GNOME_Evolution_Summary_ComponentFactory corba_object,
- EvolutionServicesCreateViewFn create_view,
- void *closure)
-{
- ExecutiveSummaryComponentFactoryPrivate *priv;
-
- g_return_if_fail (factory != NULL);
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_construct (BONOBO_OBJECT (factory), corba_object);
- priv = factory->private;
-
- priv->create_view = create_view;
- priv->closure = closure;
-}
-
-
-/*** Public API ***/
-/**
- * executive_summary_component_factory_new:
- * @create_view: A pointer to the function to create a new view.
- * @closure: The data to be passed to the @create_view function when it is
- * called.
- *
- * Creates a BonoboObject that implements the Summary::ComponentFactory
- * interface.
- *
- * Returns: A pointer to a BonoboObject.
- */
-BonoboObject *
-executive_summary_component_factory_new (EvolutionServicesCreateViewFn create_view,
- void *closure)
-{
- ExecutiveSummaryComponentFactory *factory;
- POA_GNOME_Evolution_Summary_ComponentFactory *servant;
- GNOME_Evolution_Summary_ComponentFactory corba_object;
-
- servant = create_factory_servant ();
- if (servant == NULL)
- return NULL;
-
- factory = gtk_type_new (executive_summary_component_factory_get_type ());
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (factory),
- servant);
- executive_summary_component_factory_construct (factory, corba_object,
- create_view, closure);
- return BONOBO_OBJECT (factory);
-}
-
diff --git a/executive-summary/evolution-services/executive-summary-component.h b/executive-summary/evolution-services/executive-summary-component.h
deleted file mode 100644
index e12923cdd6..0000000000
--- a/executive-summary/evolution-services/executive-summary-component.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-component.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _EXECUTIVE_SUMMARY_COMPONENT_H__
-#define _EXECUTIVE_SUMMARY_COMPONENT_H__
-
-#include <gtk/gtksignal.h>
-#include <bonobo/bonobo-object.h>
-
-#define EXECUTIVE_SUMMARY_COMPONENT_TYPE (executive_summary_component_get_type ())
-#define EXECUTIVE_SUMMARY_COMPONENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE, ExecutiveSummaryComponent))
-#define EXECUTIVE_SUMMARY_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_TYPE, ExecutiveSummaryComponentClass))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE))
-
-typedef struct _ExecutiveSummaryComponentPrivate ExecutiveSummaryComponentPrivate;
-typedef struct _ExecutiveSummaryComponent ExecutiveSummaryComponent;
-typedef struct _ExecutiveSummaryComponentClass ExecutiveSummaryComponentClass;
-
-struct _ExecutiveSummaryComponent {
- BonoboObject parent;
-
- ExecutiveSummaryComponentPrivate *private;
-};
-
-struct _ExecutiveSummaryComponentClass {
- BonoboObjectClass parent_class;
-};
-
-GtkType executive_summary_component_get_type (void);
-
-BonoboObject *executive_summary_component_new (void);
-
-
-/* Factory */
-
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE (executive_summary_component_factory_get_type ())
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE, ExecutiveSummaryComponentFactory))
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE, ExecutiveSummaryComponentFactoryClass))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE))
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE))
-
-typedef struct _ExecutiveSummaryComponentFactoryPrivate ExecutiveSummaryComponentFactoryPrivate;
-typedef struct _ExecutiveSummaryComponentFactory ExecutiveSummaryComponentFactory;
-typedef struct _ExecutiveSummaryComponentFactoryClass ExecutiveSummaryComponentFactoryClass;
-
-typedef BonoboObject *(* EvolutionServicesCreateViewFn) (ExecutiveSummaryComponentFactory *factory,
- void *closure);
-
-struct _ExecutiveSummaryComponentFactory {
- BonoboObject parent;
-
- ExecutiveSummaryComponentFactoryPrivate *private;
-};
-
-struct _ExecutiveSummaryComponentFactoryClass {
- BonoboObjectClass parent_class;
-};
-
-GtkType executive_summary_component_factory_get_type (void);
-
-BonoboObject *executive_summary_component_factory_new (EvolutionServicesCreateViewFn create_view,
- void *closure);
-#endif
diff --git a/executive-summary/evolution-services/executive-summary-html-view.c b/executive-summary/evolution-services/executive-summary-html-view.c
deleted file mode 100644
index b05d4929e1..0000000000
--- a/executive-summary/evolution-services/executive-summary-html-view.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-html-view.c - Bonobo implementation of
- * HtmlView.idl
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gtk/gtksignal.h>
-#include <bonobo/bonobo-event-source.h>
-#include <gal/util/e-util.h>
-
-#include "Executive-Summary.h"
-#include "executive-summary-html-view.h"
-
-static void executive_summary_html_view_destroy (GtkObject *object);
-static void executive_summary_html_view_init (ExecutiveSummaryHtmlView *component);
-static void executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClass *klass);
-
-#define PARENT_TYPE (bonobo_object_get_type ())
-
-static BonoboObjectClass *parent_class;
-
-enum {
- HANDLE_URI,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-struct _ExecutiveSummaryHtmlViewPrivate {
- BonoboEventSource *event_source;
-
- char *html;
-};
-
-/* CORBA interface */
-static POA_GNOME_Evolution_Summary_HTMLView__vepv HTMLView_vepv;
-
-static POA_GNOME_Evolution_Summary_HTMLView *
-create_servant (void)
-{
- POA_GNOME_Evolution_Summary_HTMLView *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_Summary_HTMLView *)g_new0 (BonoboObjectServant, 1);
- servant->vepv = &HTMLView_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_Evolution_Summary_HTMLView__init ((PortableServer_Servant) servant, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_free (servant);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- return servant;
-}
-
-static CORBA_char *
-impl_GNOME_Evolution_Summary_HTMLView_getHtml (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ExecutiveSummaryHtmlView *view;
- ExecutiveSummaryHtmlViewPrivate *priv;
-
- bonobo_object = bonobo_object_from_servant (servant);
- view = EXECUTIVE_SUMMARY_HTML_VIEW (bonobo_object);
- priv = view->private;
-
- return CORBA_string_dup (priv->html? priv->html: "");
-}
-
-static void
-impl_GNOME_Evolution_Summary_HTMLView_handleURI (PortableServer_Servant servant,
- const CORBA_char *uri,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
-
- bonobo_object = bonobo_object_from_servant (servant);
-
- gtk_signal_emit (GTK_OBJECT (bonobo_object), signals[HANDLE_URI], uri);
-}
-
-/* GtkObject methods */
-static void
-executive_summary_html_view_destroy (GtkObject *object)
-{
- ExecutiveSummaryHtmlView *view;
- ExecutiveSummaryHtmlViewPrivate *priv;
-
- g_print ("BANG!");
- view = EXECUTIVE_SUMMARY_HTML_VIEW (object);
- priv = view->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv->html);
- g_free (priv);
-
- view->private = NULL;
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
-corba_class_init (void)
-{
- POA_GNOME_Evolution_Summary_HTMLView__vepv *vepv;
- POA_GNOME_Evolution_Summary_HTMLView__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_Summary_HTMLView__epv, 1);
- epv->getHtml = impl_GNOME_Evolution_Summary_HTMLView_getHtml;
- epv->handleURI = impl_GNOME_Evolution_Summary_HTMLView_handleURI;
-
- vepv = &HTMLView_vepv;
- vepv->_base_epv = base_epv;
- vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
- vepv->GNOME_Evolution_Summary_HTMLView_epv = epv;
-}
-
-static void
-executive_summary_html_view_class_init (ExecutiveSummaryHtmlViewClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = executive_summary_html_view_destroy;
-
- signals[HANDLE_URI] = gtk_signal_new ("handle_uri", GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ExecutiveSummaryHtmlViewClass, handle_uri),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- corba_class_init ();
-}
-
-static void
-executive_summary_html_view_init (ExecutiveSummaryHtmlView *view)
-{
- ExecutiveSummaryHtmlViewPrivate *priv;
-
- priv = g_new (ExecutiveSummaryHtmlViewPrivate, 1);
- priv->html = NULL;
- priv->event_source = NULL;
-
- view->private = priv;
-}
-
-E_MAKE_TYPE (executive_summary_html_view, "ExecutiveSummaryHtmlView",
- ExecutiveSummaryHtmlView, executive_summary_html_view_class_init,
- executive_summary_html_view_init, PARENT_TYPE);
-
-static void
-executive_summary_html_view_construct (ExecutiveSummaryHtmlView *view,
- BonoboEventSource *event_source,
- GNOME_Evolution_Summary_HTMLView corba_object)
-{
- ExecutiveSummaryHtmlViewPrivate *priv;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view));
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- priv = view->private;
-
- priv->event_source = event_source;
- bonobo_object_add_interface (BONOBO_OBJECT (view),
- BONOBO_OBJECT (priv->event_source));
-
- bonobo_object_construct (BONOBO_OBJECT (view), corba_object);
-}
-
-/*** Public API ***/
-/**
- * executive_summary_html_view_new_full:
- * @event_source: A BonoboEventSource that will be aggregated onto the
- * interface.
- *
- * Creates a new BonoboObject that implements
- * the HTMLView.idl interface.
- *
- * Returns: A BonoboObject.
- */
-BonoboObject *
-executive_summary_html_view_new_full (BonoboEventSource *event_source)
-{
- ExecutiveSummaryHtmlView *view;
- POA_GNOME_Evolution_Summary_HTMLView *servant;
- GNOME_Evolution_Summary_HTMLView corba_object;
-
- g_return_val_if_fail (event_source != NULL, NULL);
- g_return_val_if_fail (BONOBO_IS_EVENT_SOURCE (event_source), NULL);
-
- servant = create_servant ();
- if (servant == NULL)
- return NULL;
-
- view = gtk_type_new (executive_summary_html_view_get_type ());
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (view),
- servant);
-
- executive_summary_html_view_construct (view, event_source, corba_object);
-
- return BONOBO_OBJECT (view);
-}
-
-/**
- * executive_summary_html_view_new:
- *
- * Creates a new BonoboObject that implements
- * the HTMLView.idl interface.
- * Creates a default Bonobo::EventSource interface that will be aggregated onto
- * the interface.
- *
- * Returns: A BonoboObject.
- */
-BonoboObject *
-executive_summary_html_view_new (void)
-{
- BonoboEventSource *event_source;
-
- event_source = bonobo_event_source_new ();
- return executive_summary_html_view_new_full (event_source);
-}
-
-/**
- * executive_summary_html_view_set_html:
- * @view: The ExecutiveSummaryHtmlView to operate on,
- * @html: The HTML as a string.
- *
- * Sets the HTML string in @view to @html. @html is copied into @view,
- * so after this call you are free to do what you want with @html.
- */
-void
-executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view,
- const char *html)
-{
- ExecutiveSummaryHtmlViewPrivate *priv;
- CORBA_any any;
- CORBA_short s;
-
- g_return_if_fail (view != NULL);
- g_return_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view));
-
- priv = view->private;
- if (priv->html)
- g_free (priv->html);
-
- if (html != NULL)
- priv->html = g_strdup (html);
- else
- priv->html = NULL;
-
- /* Notify any listeners */
- s = 0;
-
- any._type = (CORBA_TypeCode) TC_short;
- any._value = &s;
-
- bonobo_event_source_notify_listeners (BONOBO_EVENT_SOURCE (priv->event_source),
- EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED,
- &any, NULL);
-}
-
-/**
- * executive_summary_html_view_get_html:
- * @view: The ExecutiveSummaryHtmlView to operate on.
- *
- * Retrieves the HTML stored in @view. This return value is not duplicated
- * before returning, so you should not free it. Instead, if you want to free
- * the HTML stored in @view, you should use
- * executive_summary_html_view_set_html (view, NULL);.
- *
- * Returns: A pointer to the HTML stored in @view.
- */
-const char *
-executive_summary_html_view_get_html (ExecutiveSummaryHtmlView *view)
-{
- ExecutiveSummaryHtmlViewPrivate *priv;
-
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view), NULL);
-
- priv = view->private;
- return priv->html;
-}
-
-/**
- * executive_summary_html_view_get_event_source:
- * @view: The ExecutiveSummaryHtmlView to operate on.
- *
- * Retrieves the BonoboEventSource that is used in this view.
- *
- * Returns: A BonoboEventSource pointer.
- */
-BonoboEventSource *
-executive_summary_html_view_get_event_source (ExecutiveSummaryHtmlView *view)
-{
- g_return_val_if_fail (view != NULL, NULL);
- g_return_val_if_fail (IS_EXECUTIVE_SUMMARY_HTML_VIEW (view), NULL);
-
- return view->private->event_source;
-}
diff --git a/executive-summary/evolution-services/executive-summary-html-view.h b/executive-summary/evolution-services/executive-summary-html-view.h
deleted file mode 100644
index 8afc7e8274..0000000000
--- a/executive-summary/evolution-services/executive-summary-html-view.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary-html-view.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _EXECUTIVE_SUMMARY_HTML_VIEW_H__
-#define _EXECUTIVE_SUMMARY_HTML_VIEW_H__
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-event-source.h>
-
-#define EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED "GNOME:Evolution:Summary:HTMLView:html_changed"
-
-#define EXECUTIVE_SUMMARY_HTML_VIEW_TYPE (executive_summary_html_view_get_type ())
-#define EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlView))
-#define EXECUTIVE_SUMMARY_HTML_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlViewClass))
-#define IS_EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE))
-#define IS_EXECUTIVE_SUMMARY_HTML_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE))
-
-typedef struct _ExecutiveSummaryHtmlViewPrivate ExecutiveSummaryHtmlViewPrivate;
-typedef struct _ExecutiveSummaryHtmlView ExecutiveSummaryHtmlView;
-typedef struct _ExecutiveSummaryHtmlViewClass ExecutiveSummaryHtmlViewClass;
-
-struct _ExecutiveSummaryHtmlView {
- BonoboObject parent;
-
- ExecutiveSummaryHtmlViewPrivate *private;
-};
-
-struct _ExecutiveSummaryHtmlViewClass {
- BonoboObjectClass parent_class;
-
- void (* handle_uri) (ExecutiveSummaryHtmlView *view,
- char *uri);
-};
-
-GtkType executive_summary_html_view_get_type (void);
-BonoboObject *executive_summary_html_view_new_full (BonoboEventSource *event_source);
-BonoboObject *executive_summary_html_view_new (void);
-
-void executive_summary_html_view_set_html (ExecutiveSummaryHtmlView *view,
- const char *html);
-const char *executive_summary_html_view_get_html (ExecutiveSummaryHtmlView *view);
-BonoboEventSource *executive_summary_html_view_get_event_source (ExecutiveSummaryHtmlView *view);
-
-#endif
-
diff --git a/executive-summary/evolution-services/executive-summary.c b/executive-summary/evolution-services/executive-summary.c
deleted file mode 100644
index 5f90059f7e..0000000000
--- a/executive-summary/evolution-services/executive-summary.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary.c - Bonobo implementation of Summary.idl
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-
-#include "Executive-Summary.h"
-#include "executive-summary.h"
-
-static void executive_summary_destroy (GtkObject *object);
-static void executive_summary_class_init (ExecutiveSummaryClass *es_class);
-static void executive_summary_init (ExecutiveSummary *es);
-
-#define PARENT_TYPE (bonobo_object_get_type ())
-
-enum {
- UPDATE,
- SET_TITLE,
- SET_ICON,
- FLASH,
- LAST_SIGNAL
-};
-
-static guint32 summary_signals [LAST_SIGNAL] = { 0 };
-static BonoboObjectClass *parent_class;
-
-struct _ExecutiveSummaryPrivate {
- int dummy;
-};
-
-/* CORBA interface implementation */
-static POA_GNOME_Evolution_Summary_ViewFrame__vepv Summary_vepv;
-
-static POA_GNOME_Evolution_Summary_ViewFrame *
-create_servant (void)
-{
- POA_GNOME_Evolution_Summary_ViewFrame *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_Summary_ViewFrame *)g_new0 (BonoboObjectServant, 1);
- servant->vepv = &Summary_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Summary_ViewFrame__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;
-}
-
-#if 0
-static void
-impl_GNOME_Evolution_Summary_ViewFrame_setTitle (PortableServer_Servant servant,
- CORBA_long id,
- const CORBA_char *title,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ExecutiveSummary *summary;
-
- bonobo_object = bonobo_object_from_servant (servant);
- summary = EXECUTIVE_SUMMARY (bonobo_object);
-
- gtk_signal_emit (GTK_OBJECT (summary), summary_signals[SET_TITLE],
- id, title);
-}
-
-static void
-impl_GNOME_Evolution_Summary_ViewFrame_setIcon (PortableServer_Servant servant,
- CORBA_long id,
- const CORBA_char *title,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ExecutiveSummary *summary;
-
- bonobo_object = bonobo_object_from_servant (servant);
- summary = EXECUTIVE_SUMMARY (bonobo_object);
-
- gtk_signal_emit (GTK_OBJECT (summary), summary_signals[SET_ICON],
- id, title);
-}
-
-static void
-impl_GNOME_Evolution_Summary_ViewFrame_flash (PortableServer_Servant servant,
- CORBA_long id,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ExecutiveSummary *summary;
-
- bonobo_object = bonobo_object_from_servant (servant);
- summary = EXECUTIVE_SUMMARY (bonobo_object);
-
- gtk_signal_emit (GTK_OBJECT (summary), summary_signals[FLASH], id);
-}
-
-static void
-impl_GNOME_Evolution_Summary_ViewFrame_updateComponent (PortableServer_Servant servant,
- const CORBA_long id,
- const CORBA_char *html,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ExecutiveSummary *summary;
-
- bonobo_object = bonobo_object_from_servant (servant);
- summary = EXECUTIVE_SUMMARY (bonobo_object);
-
- gtk_signal_emit (GTK_OBJECT (summary), summary_signals[UPDATE],
- id, html);
-}
-#endif
-
-/* GtkObject methods */
-static void
-executive_summary_destroy (GtkObject *object)
-{
- ExecutiveSummary *es;
- ExecutiveSummaryPrivate *priv;
-
- es = EXECUTIVE_SUMMARY (object);
- priv = es->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- es->private = NULL;
-}
-
-/* Initialisation */
-
-static void
-corba_class_init (void)
-{
- POA_GNOME_Evolution_Summary_ViewFrame__vepv *vepv;
- POA_GNOME_Evolution_Summary_ViewFrame__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_Summary_ViewFrame__epv, 1);
-
- vepv = &Summary_vepv;
- vepv->_base_epv = base_epv;
- vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
- vepv->GNOME_Evolution_Summary_ViewFrame_epv = epv;
-}
-
-static void
-executive_summary_class_init (ExecutiveSummaryClass *es_class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) es_class;
-
- object_class->destroy = executive_summary_destroy;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- summary_signals[UPDATE] = gtk_signal_new ("update",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, update),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
- GTK_TYPE_POINTER);
- summary_signals[SET_TITLE] = gtk_signal_new ("set_title",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, set_title),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
- GTK_TYPE_POINTER);
- summary_signals[SET_ICON] = gtk_signal_new ("set_icon",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, set_icon),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
- GTK_TYPE_POINTER);
- summary_signals[FLASH] = gtk_signal_new ("flash",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ExecutiveSummaryClass, flash),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
- gtk_object_class_add_signals (object_class, summary_signals, LAST_SIGNAL);
-
- corba_class_init ();
-}
-
-static void
-executive_summary_init (ExecutiveSummary *es)
-{
- ExecutiveSummaryPrivate *priv;
-
- priv = g_new (ExecutiveSummaryPrivate, 1);
- es->private = priv;
-}
-
-E_MAKE_TYPE (executive_summary, "ExecutiveSummary", ExecutiveSummary,
- executive_summary_class_init, executive_summary_init, PARENT_TYPE);
-
-void
-executive_summary_construct (ExecutiveSummary *es,
- GNOME_Evolution_Summary_ViewFrame corba_object)
-{
- bonobo_object_construct (BONOBO_OBJECT (es), corba_object);
-}
-
-BonoboObject *
-executive_summary_new (void)
-{
- POA_GNOME_Evolution_Summary_ViewFrame *servant;
- GNOME_Evolution_Summary_ViewFrame corba_object;
- ExecutiveSummary *es;
-
- servant = create_servant ();
- if (servant == NULL)
- return NULL;
-
- es = gtk_type_new (executive_summary_get_type ());
-
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (es),
- servant);
- executive_summary_construct (es, corba_object);
-
- return BONOBO_OBJECT (es);
-}
diff --git a/executive-summary/evolution-services/executive-summary.h b/executive-summary/evolution-services/executive-summary.h
deleted file mode 100644
index 97b5c7b508..0000000000
--- a/executive-summary/evolution-services/executive-summary.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* executive-summary.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _EXECUTIVE_SUMMARY_H__
-#define _EXECUTIVE_SUMMARY_H__
-
-#include <gtk/gtksignal.h>
-#include <bonobo.h>
-#include "Executive-Summary.h"
-
-#define EXECUTIVE_SUMMARY_TYPE (executive_summary_get_type ())
-#define EXECUTIVE_SUMMARY(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_TYPE, ExecutiveSummary))
-#define EXECUTIVE_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_TYPE, ExecutiveSummaryClass))
-#define IS_EXECUTIVE_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_TYPE))
-#define IS_EXECUTIVE_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_TYPE))
-
-typedef struct _ExecutiveSummaryPrivate ExecutiveSummaryPrivate;
-typedef struct _ExecutiveSummary ExecutiveSummary;
-typedef struct _ExecutiveSummaryClass ExecutiveSummaryClass;
-
-struct _ExecutiveSummary {
- BonoboObject parent;
-
- ExecutiveSummaryPrivate *private;
-};
-
-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);
-};
-
-GtkType executive_summary_get_type (void);
-void executive_summary_construct (ExecutiveSummary *es,
- GNOME_Evolution_Summary_ViewFrame corba_object);
-BonoboObject *executive_summary_new (void);
-#endif
-
diff --git a/executive-summary/idl/.cvsignore b/executive-summary/idl/.cvsignore
deleted file mode 100644
index b840c21800..0000000000
--- a/executive-summary/idl/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile \ No newline at end of file
diff --git a/executive-summary/idl/Executive-Summary.idl b/executive-summary/idl/Executive-Summary.idl
deleted file mode 100644
index a564e90fe6..0000000000
--- a/executive-summary/idl/Executive-Summary.idl
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <Bonobo.idl>
-#include <SummaryComponent.idl>
-#include <Summary.idl>
-#include <HtmlView.idl>
diff --git a/executive-summary/idl/HtmlView.idl b/executive-summary/idl/HtmlView.idl
deleted file mode 100644
index 627873563f..0000000000
--- a/executive-summary/idl/HtmlView.idl
+++ /dev/null
@@ -1,25 +0,0 @@
-/*-*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * CORBA interface for an HTML view.
- *
- * Authors:
- * Iain Holmes <iain@ximian.com>
- *
- * Copyright (C) 2000 Ximian, Inc.
- */
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-module Summary {
-
- interface HTMLView : Bonobo::Unknown {
- string getHtml ();
-
- void handleURI (in string uri);
- };
-};
-};
-};
-
diff --git a/executive-summary/idl/Makefile.am b/executive-summary/idl/Makefile.am
deleted file mode 100644
index 29a35f43cf..0000000000
--- a/executive-summary/idl/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-EXTRA_DIST = $(IDLS)
-
-IDLS = \
- Executive-Summary.idl \
- HtmlView.idl \
- Summary.idl \
- SummaryComponent.idl \ No newline at end of file
diff --git a/executive-summary/idl/Summary.idl b/executive-summary/idl/Summary.idl
deleted file mode 100644
index c460b856ab..0000000000
--- a/executive-summary/idl/Summary.idl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*-*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * CORBA interface for the Evolution shell.
- *
- * Authors:
- * Iain Holmes <iain@ximian.com>
- *
- * Copyright (C) 2000 Ximian, Inc.
- */
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-module Summary {
- interface ViewFrame: Bonobo::Unknown {
- };
-};
-};
-};
diff --git a/executive-summary/idl/SummaryComponent.idl b/executive-summary/idl/SummaryComponent.idl
deleted file mode 100644
index f6aab37469..0000000000
--- a/executive-summary/idl/SummaryComponent.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * CORBA interface for the Evolution Executive Summary Components.
- *
- * Authors:
- * Iain Holmes <iain@ximian.com>
- *
- * Copyright (C) 2000 Ximian, Inc.
- */
-
-/* TODO: Needs Exceptions */
-
-#include <Bonobo.idl>
-#include <oaf-factory.idl>
-
-module GNOME {
-module Evolution {
-module Summary {
- interface ViewFrame;
-
- interface Component: Bonobo::Unknown {
- };
-
- interface ComponentFactory: Bonobo::Unknown {
- /**
- * createView:
- *
- * Creates a new Component object.
- *
- * Returns: A Component object.
- **/
- Component createView ();
- };
-};
-};
-};
diff --git a/executive-summary/summary.html b/executive-summary/summary.html
deleted file mode 100644
index 16602da2a6..0000000000
--- a/executive-summary/summary.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<html>
-<head>
-<Title>Evolution Executive Summary</title>
-</head>
-
-<body bgcolor="#ffffff" background="executive-summary-bg.png">
-<table cellpadding="0" cellspacing="0" numcols="3" width="100%" height="100%" border="0">
-<tr>
-<td bgcolor="#9aadbf" height="102">
-<img src="butterfly.png"></td>
-<td width="100%" colspan="2" align="middle" bgcolor="#9aadbf">
-E V O L U T I O N
-</td></tr>
-<!-- Hmmmm.
-<tr><td bgcolor="#9aadbf">&nbsp;</td>
-<td valign="top" width="100"><img src="executive-summary-curve.png"></td>
-<td width="95%">
-
-<table border="0" align="middle">
-<tr>
-<td align="left">
- <form method="get" action="/search" name="f">
- <b>Search On Google</b>
- <input type="text" size="15" name=q>
- <input type="submit" name"submit">
- </form>
-</td>
-</tr>
--->
-<tr>
-<td colspan="2">
-<!-- EVOLUTION EXECUTIVE SUMMARY SERVICES DO NOT REMOVE -->
-</td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-
-</table>
-</body>
-</html>
-
-
diff --git a/executive-summary/test-service/.cvsignore b/executive-summary/test-service/.cvsignore
deleted file mode 100644
index e9a7d4280b..0000000000
--- a/executive-summary/test-service/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile.in
-Makefile
-core
-.deps
-.libs
-test-service
-rdf-summary
-GNOME_Evolution_Summary_test.oaf
-GNOME_Evolution_Summary_rdf.oaf
diff --git a/executive-summary/test-service/GNOME_Evolution_Summary_rdf.oaf.in b/executive-summary/test-service/GNOME_Evolution_Summary_rdf.oaf.in
deleted file mode 100644
index decd499293..0000000000
--- a/executive-summary/test-service/GNOME_Evolution_Summary_rdf.oaf.in
+++ /dev/null
@@ -1,27 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_rdf_SummaryComponentFactory"
- type="exe"
- location="rdf-summary">
-
- <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 RDF summary."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_rdf_SummaryComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Summary_rdf_SummaryComponentFactory">
-
- <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="RDF Summary"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/executive-summary/test-service/GNOME_Evolution_Summary_test.oaf.in b/executive-summary/test-service/GNOME_Evolution_Summary_test.oaf.in
deleted file mode 100644
index b0c9e8f0d6..0000000000
--- a/executive-summary/test-service/GNOME_Evolution_Summary_test.oaf.in
+++ /dev/null
@@ -1,53 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_test_ComponentFactory"
- type="exe"
- location="test-service">
-
- <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 test component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_test_Component"
- type="factory"
- location="OAFIID:GNOME_Evolution_Summary_test_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="Test service"/>
-</oaf_server>
-
-<!-- This does not work
-<oaf_server iid="OAFIID:evolution-summary-component-factory:test-bonobo-service:b6da2ad2-1fbb-4539-93f9-038b1702810e"
- type="exe"
- location="test-bonobo-service">
-
- <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 test bonobo component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:evolution-summary-component:test-bonobo-service:d3cb3ed6-a654-4337-8aa0-f443751d6d1b"
- type="factory"
- location="OAFIID:evolution-summary-component-factory:test-bonobo-service:b6da2ad2-1fbb-4539-93f9-038b1702810e">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Evolution:SummaryComponent:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Test bonobo service"/>
-</oaf_server>
-
--->
-</oaf_info>
diff --git a/executive-summary/test-service/Makefile.am b/executive-summary/test-service/Makefile.am
deleted file mode 100644
index 458b015c1e..0000000000
--- a/executive-summary/test-service/Makefile.am
+++ /dev/null
@@ -1,43 +0,0 @@
-bin_PROGRAMS = test-service rdf-summary
-
-CFLAGS += -g
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/executive-summary \
- $(EXTRA_GNOME_CFLAGS) \
- $(BONOBO_HTML_GNOME_CFLAGS) \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\"
-
-test_service_SOURCES = \
- main.c
-
-test_service_LDADD = \
- $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-#test_bonobo_service_SOURCES = \
-# test-bonobo.c
-
-#test_bonobo_service_LDADD = \
-# $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
-# $(BONOBO_VFS_GNOME_LIBS) \
-# $(EXTRA_GNOME_LIBS)
-
-rdf_summary_SOURCES = \
- rdf-summary.c
-
-rdf_summary_LDADD = \
- $(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-oafdir = $(datadir)/oaf
-oaf_in_files = \
- GNOME_Evolution_Summary_test.oaf.in \
- GNOME_Evolution_Summary_rdf.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-EXTRA_DIST = $(oaf_in_files) $(oaf_DATA)
diff --git a/executive-summary/test-service/main.c b/executive-summary/test-service/main.c
deleted file mode 100644
index d94a4e8008..0000000000
--- a/executive-summary/test-service/main.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* main.c
- * Test Service that counts the number of seconds since it was started.
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-html-view.h>
-
-#include <liboaf/liboaf.h>
-
-enum {
- PROPERTY_TITLE,
- PROPERTY_ICON
-};
-
-struct _UserData {
- char *title;
- char *icon;
-};
-typedef struct _UserData UserData;
-
-static int running_views = 0;
-
-#define TEST_SERVICE_ID "OAFIID:GNOME_Evolution_Summary_test_ComponentFactory"
-
-static BonoboGenericFactory *factory = NULL;
-
-/* PersistStream callbacks */
-static void
-load_from_stream (BonoboPersistStream *ps,
- Bonobo_Stream stream,
- Bonobo_Persist_ContentType type,
- gpointer data,
- CORBA_Environment *ev)
-{
- char *str;
-
- if (*type && g_strcasecmp (type, "application/x-test-service") != 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;
- }
-
- g_print ("Restoring with :%s\n", str);
- g_free (str);
-}
-
-static void
-save_to_stream (BonoboPersistStream *ps,
- const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type,
- gpointer data,
- CORBA_Environment *ev)
-{
-
- if (*type && g_strcasecmp (type, "application/x-test-service") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- bonobo_stream_client_printf (stream, TRUE, ev, "Yo yo yo");
- if (ev->_major != CORBA_NO_EXCEPTION)
- return;
-}
-
-static Bonobo_Persist_ContentTypeList *
-content_types (BonoboPersistStream *ps,
- void *closure,
- CORBA_Environment *ev)
-{
- return bonobo_persist_generate_content_types (1, "application/x-test-service");
-}
-
-/* PropertyControl callback */
-
-/* Propertybag set/get functions */
-static void
-set_property (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- switch (arg_id) {
- case PROPERTY_TITLE:
- g_print ("Setting title.\n");
- break;
-
- case PROPERTY_ICON:
- g_print ("Setting icon.\n");
- break;
-
- default:
- break;
- }
-}
-
-static void
-get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- UserData *ud = (UserData *) user_data;
-
- switch (arg_id) {
- case PROPERTY_TITLE:
- BONOBO_ARG_SET_STRING (arg, ud->title);
- break;
-
- case PROPERTY_ICON:
- BONOBO_ARG_SET_STRING (arg, ud->icon);
- break;
-
- default:
- break;
- }
-}
-
-static void
-component_destroyed (GtkObject *object,
- gpointer data)
-{
- UserData *ud = (UserData *) data;
- /* Free the UserData structure */
- g_free (ud->title);
- g_free (ud->icon);
- g_free (ud);
-
- running_views--;
-
- g_print ("Destroy!\n");
- if (running_views <= 0) {
- bonobo_object_unref (BONOBO_OBJECT (factory));
- gtk_main_quit ();
- }
-}
-
-static BonoboObject *
-create_view (ExecutiveSummaryComponentFactory *_factory,
- void *closure)
-{
- BonoboObject *component, *view;
- BonoboPersistStream *stream;
- BonoboPropertyBag *bag;
- BonoboEventSource *event_source;
- UserData *ud;
-
- /* Create the component object */
- component = executive_summary_component_new ();
-
- /* Create the UserData structure and fill it */
- ud = g_new (UserData, 1);
- ud->title = g_strdup ("Hello World!");
- ud->icon = g_strdup ("apple-red.png");
-
- gtk_signal_connect (GTK_OBJECT (component), "destroy",
- GTK_SIGNAL_FUNC (component_destroyed), ud);
-
- /* Now create the aggregate objects. For a "service"
- either a Summary::HTMLView or Bonobo::Control are required.
- Other supported agreggate objects are
- PersistStream: For saving and restoring the component.
- PropertyBag: To set the icon and title and other properties
- PropertyControl: To produce a control to configure the service.
-
- To aggregate the objects
- i) Create the objects using their creation functions
- ii) Use bonobo_object_add_interface ().
- */
-
- /* Create an event source to share with all the interfaces,
- as we can only aggregate one onto the ExecutiveSummaryComponent */
- event_source = bonobo_event_source_new ();
-
- /* The Summary::HTMLView interface */
- view = executive_summary_html_view_new_full (event_source);
- /* Set the default HTML */
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (view),
- "<B>Hello World</b>");
-
- bonobo_object_add_interface (component, view);
-
- /* Add the Bonobo::PropertyBag interface */
- bag = bonobo_property_bag_new_full (get_property, set_property,
- event_source, ud);
- /* Add the properties. There should be 2:
- window_title: For the window title.
- window_icon: For the window icon.
- */
- bonobo_property_bag_add (bag,
- "window_title", PROPERTY_TITLE,
- BONOBO_ARG_STRING,
- NULL,
- "The title of this components window", 0);
- bonobo_property_bag_add (bag,
- "window_icon", PROPERTY_ICON,
- BONOBO_ARG_STRING,
- NULL,
- "The icon for this component's window", 0);
-
- /* Now add the interface */
- bonobo_object_add_interface (component, BONOBO_OBJECT(bag));
-
- /* Add the Bonobo::PersistStream interface */
- stream = bonobo_persist_stream_new (load_from_stream, save_to_stream,
- NULL, content_types, NULL);
- bonobo_object_add_interface (component, BONOBO_OBJECT(stream));
-
- running_views++;
- /* Return the ExecutiveSummaryComponent object */
- return component;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *generic_factory,
- void *closure)
-{
- BonoboObject *_factory;
-
- /* Create an executive summary component factory */
- _factory = executive_summary_component_factory_new (create_view, NULL);
- return _factory;
-}
-
-void
-test_service_factory_init (void)
-{
- if (factory != NULL)
- return;
-
- /* Register the factory creation function and the IID */
- factory = bonobo_generic_factory_new (TEST_SERVICE_ID, factory_fn, NULL);
- if (factory == NULL) {
- g_warning ("Cannot initialize test service");
- exit (0);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- CORBA_ORB orb;
-
- /* Init GNOME, oaf and bonobo */
- gnome_init_with_popt_table ("Test service", VERSION,
- 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");
- }
-
- /* Register the factory */
- test_service_factory_init ();
-
- /* Enter main */
- bonobo_main ();
-
- return 0;
-}
-
diff --git a/executive-summary/test-service/rdf-summary.c b/executive-summary/test-service/rdf-summary.c
deleted file mode 100644
index 301ededea2..0000000000
--- a/executive-summary/test-service/rdf-summary.c
+++ /dev/null
@@ -1,984 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* RDF viewer Evolution Executive Summary Component.
- * Bonoboised by Iain Holmes <iain@ximian.com>
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Based on code from Portaloo
- * Channel retrieval tool
- *
- * (C) 1998 Alan Cox.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-property.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-property-control.h>
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-html-view.h>
-#include <liboaf/liboaf.h>
-#include <libgnomevfs/gnome-vfs.h>
-
-int xmlSubstituteEntitiesDefaultValue = 1; /* DV thinks of everything */
-
-static int wipe_trackers = FALSE;
-static int running_views = 0;
-
-static BonoboGenericFactory *factory = NULL;
-#define RDF_SUMMARY_ID "OAFIID:GNOME_Evolution_Summary_rdf_SummaryComponentFactory"
-
-enum {
- PROPERTY_TITLE,
- PROPERTY_ICON
-};
-
-struct _RdfSummary {
- BonoboObject *component;
- BonoboObject *view;
- BonoboPropertyBag *bag;
- BonoboPropertyControl *property_control;
-
- GtkWidget *rdf;
- GtkWidget *g_limit;
- GtkWidget *g_title;
- GtkWidget *g_update;
- GtkWidget *g_update_container;
- GtkAdjustment *adjustment;
-
- char *title;
- char *icon;
- char *location;
- int limit;
- gboolean showtitle;
-
- gboolean usetimer;
- int time;
- int timer;
-
- GString *str;
- char *buffer;
-
- GnomeVFSAsyncHandle *handle;
-
- xmlDocPtr cache;
-};
-typedef struct _RdfSummary RdfSummary;
-
-/************ RDF Parser *******************/
-
-static char *
-layer_find (xmlNodePtr node,
- char *match,
- char *fail)
-{
- while (node!=NULL) {
-#ifdef RDF_DEBUG
- xmlDebugDumpNode (stdout, node, 32);
- printf("%s.\n", node->name);
-#endif
- if (strcasecmp (node->name, match)==0) {
- if (node->childs != NULL && node->childs->content != NULL) {
- return node->childs->content;
- } else {
- return fail;
- }
- }
- node = node->next;
- }
- return fail;
-}
-
-static char *
-layer_find_url (xmlNodePtr node,
- char *match,
- char *fail)
-{
- char *p = layer_find (node, match, fail);
- char *r = p;
- static char *wb = NULL;
- char *w;
-
- if (wb) {
- free (wb);
- }
-
- wb = w = malloc (3 * strlen (p));
-
- if (w == NULL) {
- fprintf(stderr, "Out of memory\n");
- exit(1);
- }
-
- if (*r == ' ') r++; /* Fix UF bug */
-
- while (*r) {
- if (memcmp (r, "&amp;", 5) == 0) {
- *w++ = '&';
- r += 5;
- continue;
- }
- if (memcmp (r, "&lt;", 4) == 0) {
- *w++ = '<';
- r += 4;
- continue;
- }
- if (memcmp (r, "&gt;", 4) == 0) {
- *w++ = '>';
- r += 4;
- continue;
- }
- if (*r == '"' || *r == ' '){
- *w++ = '%';
- *w++ = "0123456789ABCDEF"[*r/16];
- *w++ = "0123456789ABCDEF"[*r&15];
- r++;
- continue;
- }
- *w++ = *r++;
- }
- *w = 0;
- return wb;
-}
-
-static void
-tree_walk (xmlNodePtr root,
- RdfSummary *summary,
- GString *html)
-{
- BonoboArg *arg;
- xmlNodePtr walk;
- xmlNodePtr rewalk = root;
- xmlNodePtr channel = NULL;
- xmlNodePtr image = NULL;
- xmlNodePtr item[16];
- int items = 0;
- int limit = summary->limit;
- int i;
- char *t;
- char n[512];
- char *tmp;
-
- do {
- walk = rewalk;
- rewalk = NULL;
-
- while (walk!=NULL){
-#ifdef RDF_DEBUG
- printf ("%p, %s\n", walk, walk->name);
-#endif
- if (strcasecmp (walk->name, "rdf") == 0) {
- rewalk = walk->childs;
- walk = walk->next;
- continue;
- }
- if (strcasecmp (walk->name, "rss") == 0){
- rewalk = walk->childs;
- walk = walk->next;
- continue;
- }
- /* This is the channel top level */
-#ifdef RDF_DEBUG
- printf ("Top level '%s'.\n", walk->name);
-#endif
- if (strcasecmp (walk->name, "channel") == 0) {
- channel = walk;
- rewalk = channel->childs;
- }
- if (strcasecmp (walk->name, "image") == 0) {
- image = walk;
- g_print ("Image\n");
- }
- if (strcasecmp (walk->name, "item") == 0 && items < 16) {
- item[items++] = walk;
- }
- walk = walk->next;
- }
- }
- while (rewalk);
-
- if (channel == NULL) {
- fprintf(stderr, "No channel definition.\n");
- exit(1);
- }
-
- t = layer_find(channel->childs, "title", "No title");
-
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
-
- if (summary->showtitle) {
- BONOBO_ARG_SET_STRING (arg, t);
- } else {
- BONOBO_ARG_SET_STRING (arg, "");
- }
-
- bonobo_property_bag_set_value (summary->bag,
- "window_title",
- (const BonoboArg *) arg, NULL);
- bonobo_arg_release (arg);
-
- if (image && !wipe_trackers) {
- char *icon;
-
- icon = layer_find_url (image->childs, "url", "apple-red.png");
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
- BONOBO_ARG_SET_STRING (arg, icon);
- bonobo_property_bag_set_value (summary->bag,
- "window_icon",
- (const BonoboArg *) arg, NULL);
- bonobo_arg_release (arg);
-
- }
-
- g_string_append (html, "<br clear=all><FONT size=\"-1\" face=\"helvetica\"><P><UL>\n");
-
- items = MIN (limit, items);
- for (i = 0; i < items; i++) {
- char *p = layer_find (item[i]->childs, "title", "No information");
-
- if (wipe_trackers) {
- char *p = layer_find_url (item[i]->childs, "link", "");
- char *x = strchr (p, '?');
- unsigned char *r, *w;
- int n;
- if (x == NULL)
- continue;
- x++;
- r = x;
- w = x;
- while (*r) {
- if (*r == '+') {
- *w++ = ' ';
- } else if (*r == '%') {
- sscanf (r+1, "%02x", &n);
- *w++ = n;
- r += 2;
- } else {
- *w++ = *r;
- }
- r++;
- }
- *w = 0;
- tmp = g_strdup_printf ("<LI><A href=\"%s\">\n", x+4);
- g_string_append (html, tmp);
- g_free (tmp);
- }
- else {
- tmp = g_strdup_printf ("<LI><A href=\"%s\">\n", layer_find_url(item[i]->childs, "link", ""));
- g_string_append (html, tmp);
- g_free (tmp);
- }
-
- tmp = g_strdup_printf ("%s\n</A>\n", p);
- g_string_append (html, tmp);
- g_free (tmp);
- }
- g_string_append (html, "</UL></FONT>\n");
-}
-
-/********* ExecutiveSummaryComponent section **************/
-static void
-view_destroyed (GtkObject *object,
- gpointer data)
-{
- RdfSummary *summary = (RdfSummary *) data;
-
- g_warning ("RDF: Point 1");
- if (summary->handle)
- gnome_vfs_async_cancel (summary->handle);
-
- g_warning ("RDF: Point 2");
-
- if (summary->cache != NULL)
- xmlFreeDoc (summary->cache);
-
- g_free (summary->title);
- g_free (summary->icon);
- g_free (summary);
-
- running_views--;
- g_print ("Running_views: %d\n", running_views);
- if (running_views <= 0) {
- gtk_main_quit ();
- }
- g_warning ("RDF: Point 3");
-}
-
-/* PersistStream callbacks */
-static void
-load_from_stream (BonoboPersistStream *ps,
- Bonobo_Stream stream,
- Bonobo_Persist_ContentType type,
- gpointer data,
- CORBA_Environment *ev)
-{
- RdfSummary *summary = (RdfSummary *) data;
- char *str;
- xmlChar *xml_str;
- xmlDocPtr doc;
- xmlNodePtr root, children;
-
- if (*type && g_strcasecmp (type, "application/x-rdf-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);
- g_free (str);
- return;
- }
-
- g_free (str);
-
- root = doc->root;
- children = root->childs;
- while (children) {
- if (strcasecmp (children->name, "location") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- summary->location = g_strdup (xml_str);
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- if (strcasecmp (children->name, "limit") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- summary->limit = atoi (xml_str);
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- if (strcasecmp (children->name, "showtitle") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- summary->showtitle = atoi (xml_str);
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- if (strcasecmp (children->name, "usetimer") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- summary->usetimer = atoi (xml_str);
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- if (strcasecmp (children->name, "timer") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- summary->time = atoi (xml_str);
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- g_print ("Unknown name: %s\n", children->name);
- children = children->next;
- }
- xmlFreeDoc (doc);
-}
-
-static char *
-summary_to_string (RdfSummary *summary)
-{
- xmlChar *out_str;
- int out_len = 0;
- xmlDocPtr doc;
- xmlNodePtr root;
- xmlNsPtr ns;
- char *tmp_str;
-
- doc = xmlNewDoc ("1.0");
- ns = xmlNewGlobalNs (doc, "www.ximian.com", "rdf");
-
- doc->root = xmlNewDocNode (doc, ns, "rdf-summary", NULL);
-
- xmlNewChild (doc->root, ns, "location", summary->location);
- tmp_str = g_strdup_printf ("%d", summary->limit);
- xmlNewChild (doc->root, ns, "limit", tmp_str);
- g_free (tmp_str);
-
- tmp_str = g_strdup_printf ("%d", summary->showtitle);
- xmlNewChild (doc->root, ns, "showtitle", tmp_str);
- g_free (tmp_str);
-
- tmp_str = g_strdup_printf ("%d", summary->usetimer);
- xmlNewChild (doc->root, ns, "usetimer", tmp_str);
- g_free (tmp_str);
-
- tmp_str = g_strdup_printf ("%d", summary->time);
- xmlNewChild (doc->root, ns, "timer", tmp_str);
- g_free (tmp_str);
-
- 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)
-{
- RdfSummary *summary = (RdfSummary *) data;
- char *str;
-
- if (*type && g_strcasecmp (type, "application/x-rdf-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-rdf-summary");
-}
-
-static void
-display_doc (RdfSummary *summary)
-{
- GString *html;
-
- html = g_string_new ("");
-
- tree_walk (summary->cache->root, summary, html);
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), html->str);
- g_string_free (html, TRUE);
-}
-
-static void
-close_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- RdfSummary *summary)
-{
- xmlDocPtr doc;
- char *xml;
-
- if (summary == NULL)
- return;
-
- summary->handle = NULL;
- g_free (summary->buffer);
- xml = summary->str->str;
- g_string_free (summary->str, FALSE);
-
- if (summary->cache != NULL)
- xmlFreeDoc (summary->cache);
-
- doc = xmlParseMemory (xml, strlen (xml));
- if (doc == NULL) {
- char *emsg;
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
- BONOBO_ARG_SET_STRING (arg, _("Error"));
- bonobo_property_bag_set_value (summary->bag,
- "window_title",
- (const BonoboArg *) arg,
- NULL);
- bonobo_arg_release (arg);
-
- emsg = g_strdup_printf ("<b>Cannot open location:<br>%s</b>",
- summary->location);
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), emsg);
- g_free (emsg);
- g_free (xml);
- return;
- }
-
- g_free (xml);
-
- /* Cache it for later */
- summary->cache = doc;
-
- /* Draw it */
- display_doc (summary);
-}
-
-static void
-read_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize bytes_requested,
- GnomeVFSFileSize bytes_read,
- RdfSummary *summary)
-{
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- char *emsg;
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
- BONOBO_ARG_SET_STRING (arg, _("Error"));
- bonobo_property_bag_set_value (summary->bag,
- "window_title",
- (const BonoboArg *) arg,
- NULL);
- bonobo_arg_release (arg);
-
- emsg = g_strdup_printf ("<b>Cannot open location:<br>%s</b>",
- summary->location);
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), emsg);
- g_free (emsg);
- gnome_vfs_async_close (handle,
- (GnomeVFSAsyncCloseCallback) close_callback,
- NULL);
- g_print ("NULLING\n");
- summary->handle = NULL;
- }
-
- if (bytes_read == 0) {
- /* EOF */
- gnome_vfs_async_close (handle,
- (GnomeVFSAsyncCloseCallback) close_callback,
- summary);
- } else {
- *((char *) buffer + bytes_read) = 0;
- g_string_append (summary->str, (const char *) buffer);
- gnome_vfs_async_read (handle, buffer, 4095,
- (GnomeVFSAsyncReadCallback) read_callback,
- summary);
- }
-}
-
-static void
-open_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- RdfSummary *summary)
-{
- GList *uri;
- char *buffer;
-
- if (result != GNOME_VFS_OK) {
- char *emsg;
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
- BONOBO_ARG_SET_STRING (arg, _("Error"));
- bonobo_property_bag_set_value (summary->bag,
- "window_title",
- (const BonoboArg *) arg,
- NULL);
- bonobo_arg_release (arg);
-
- emsg = g_strdup_printf ("<b>Cannot open location:<br>%s</b>",
- summary->location);
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view), emsg);
- g_free (emsg);
- summary->handle = NULL;
- return;
- }
-
- summary->str = g_string_new ("");
- summary->buffer = g_new (char, 4096);
-
- gnome_vfs_async_read (handle, summary->buffer, 4095,
- (GnomeVFSAsyncReadCallback) read_callback,
- summary);
-}
-
-static int
-download (RdfSummary *summary)
-{
- GnomeVFSAsyncHandle *handle;
- char *html = "<b>Loading RDF file. . .<br>Please wait</b>";
-
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (summary->view),
- html);
-
- gnome_vfs_async_open (&handle, summary->location, GNOME_VFS_OPEN_READ,
- (GnomeVFSAsyncOpenCallback) open_callback,
- summary);
-
- summary->handle = handle;
- return FALSE;
-}
-
-static void
-download_cb (GtkWidget *w,
- RdfSummary *summary)
-{
- download (summary);
-}
-
-static void
-get_prop (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- RdfSummary *summary = (RdfSummary *) user_data;
-
- switch (arg_id) {
- case PROPERTY_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_prop (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- RdfSummary *summary = (RdfSummary *) user_data;
-
- switch (arg_id) {
- case PROPERTY_TITLE:
- if (summary->title)
- g_free (summary->title);
-
- summary->title = g_strdup (BONOBO_ARG_GET_STRING (arg));
- g_print ("Notify listener!\n");
- 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));
- g_print ("Notify listener 2\n");
- bonobo_property_bag_notify_listeners (bag, "window_icon",
- arg, NULL);
- break;
-
- default:
- break;
- }
-}
-
-static void
-item_changed (GtkWidget *widget,
- RdfSummary *summary)
-{
- if (widget == summary->g_update) {
- summary->usetimer = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- gtk_widget_set_sensitive (summary->g_update_container,
- summary->usetimer);
- }
-
- bonobo_property_control_changed (summary->property_control, NULL);
-}
-
-static BonoboControl *
-property_control (BonoboPropertyControl *property_control,
- int page_num,
- gpointer user_data)
-{
- BonoboControl *control;
- RdfSummary *summary = (RdfSummary *) user_data;
- GtkWidget *container, *label, *hbox, *spinner, *button;
- char *climit;
-
- container = gtk_vbox_new (FALSE, 2);
- gtk_container_set_border_width (GTK_CONTAINER (container), 2);
- hbox = gtk_hbox_new (FALSE, 2);
-
- label = gtk_label_new ("Location:");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- summary->rdf = gtk_entry_new ();
- if (summary->location)
- gtk_entry_set_text (GTK_ENTRY (summary->rdf), summary->location);
-
- gtk_signal_connect (GTK_OBJECT (summary->rdf), "changed",
- GTK_SIGNAL_FUNC (item_changed), summary);
-
- gtk_box_pack_start (GTK_BOX (hbox), summary->rdf, TRUE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- label = gtk_label_new ("Maximum number of entries:");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- summary->g_limit = gtk_entry_new ();
- climit = g_strdup_printf ("%d", summary->limit);
- gtk_entry_set_text (GTK_ENTRY (summary->g_limit), climit);
- g_free (climit);
-
- gtk_signal_connect (GTK_OBJECT (summary->g_limit), "changed",
- GTK_SIGNAL_FUNC (item_changed), summary);
-
- gtk_box_pack_start (GTK_BOX (hbox), summary->g_limit, TRUE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- /* FIXME: Do this better? */
- label = gtk_label_new ("Show window title");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- summary->g_title = gtk_check_button_new ();
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (summary->g_title),
- summary->showtitle);
-
- gtk_signal_connect (GTK_OBJECT (summary->g_title), "toggled",
- GTK_SIGNAL_FUNC (item_changed), summary);
-
- gtk_box_pack_start (GTK_BOX (hbox), summary->g_title, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- /* Update */
- hbox = gtk_hbox_new (FALSE, 2);
- label = gtk_label_new (_("Update automatically"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- summary->g_update = gtk_check_button_new ();
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (summary->g_update),
- summary->usetimer);
-
- gtk_signal_connect (GTK_OBJECT (summary->g_update), "toggled",
- GTK_SIGNAL_FUNC (item_changed), summary);
- gtk_box_pack_start (GTK_BOX (hbox), summary->g_update, TRUE, TRUE, 0);
-
- button = gtk_button_new_with_label (_("Update now"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (download_cb), summary);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0);
-
- /* Timer */
- hbox = gtk_hbox_new (FALSE, 2);
- summary->g_update_container = hbox;
-
- label = gtk_label_new (_("Update every "));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- summary->adjustment = GTK_ADJUSTMENT(gtk_adjustment_new (summary->time / 1000 / 60,
- 1.0, 1000.0, 1.0, 10.0, 1.0));
- spinner = gtk_spin_button_new (summary->adjustment, 1.0, 0);
- gtk_signal_connect (GTK_OBJECT (spinner), "changed",
- GTK_SIGNAL_FUNC (item_changed), summary);
-
- gtk_box_pack_start (GTK_BOX (hbox), spinner, FALSE, FALSE, 0);
-
- label = gtk_label_new (_("minutes"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (container), hbox, FALSE, FALSE, 0);
- gtk_widget_set_sensitive (hbox, summary->usetimer);
-
- 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,
- RdfSummary *summary)
-{
- gboolean changed = FALSE;
- char *old_location;
-
- switch (action) {
- case Bonobo_PropertyControl_APPLY:
- old_location = summary->location;
- summary->showtitle = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (summary->g_title));
- summary->location = g_strdup (gtk_entry_get_text (GTK_ENTRY (summary->rdf)));
- if (strcmp (old_location, summary->location) != 0)
- changed = TRUE;
-
- summary->limit = atoi (gtk_entry_get_text (GTK_ENTRY (summary->g_limit)));
- summary->time = summary->adjustment->value * 60 * 1000;
- if (summary->timer)
- gtk_timeout_remove (summary->timer);
- summary->timer = gtk_timeout_add (summary->time,
- (GSourceFunc)download, summary);
-
- if (changed)
- g_idle_add ((GSourceFunc) download, summary);
- else
- g_idle_add ((GSourceFunc) display_doc, summary);
-
- g_free (old_location);
- break;
-
- case Bonobo_PropertyControl_HELP:
- g_print ("HELP: Page %d!\n", page_num);
- break;
-
- default:
- break;
- }
-}
-
-static BonoboObject *
-create_view (ExecutiveSummaryComponentFactory *_factory,
- void *closure)
-{
- RdfSummary *summary;
- BonoboObject *component, *view;
- BonoboEventSource *event_source;
- BonoboPersistStream *stream;
- BonoboPropertyBag *bag;
- BonoboPropertyControl *property;
-
- summary = g_new (RdfSummary, 1);
- summary->icon = g_strdup ("apple-green.png");
- summary->title = g_strdup ("Downloading...");
- summary->location = g_strdup ("http://news.gnome.org/gnome-news/rdf");
- summary->limit = 10;
- summary->showtitle = TRUE;
-
- summary->cache = NULL;
-
- summary->usetimer = TRUE;
- summary->time = 600000; /* 10 minutes */
- summary->timer = gtk_timeout_add (summary->time, (GSourceFunc) download,
- summary);
-
- component = executive_summary_component_new ();
- gtk_signal_connect (GTK_OBJECT (component), "destroy",
- GTK_SIGNAL_FUNC (view_destroyed), summary);
-
- summary->component = component;
-
- /* Share the event source between the ExecutiveSummaryHtmlView and the
- BonoboPropertyControl as we can only have one Bonobo::EventSource
- interface aggregated */
- event_source = bonobo_event_source_new ();
-
- /* Summary::HtmlView */
- view = executive_summary_html_view_new_full (event_source);
-
- summary->view = view;
- bonobo_object_add_interface (component, view);
-
- /* Bonobo::PropertyBag */
- bag = bonobo_property_bag_new_full (get_prop, set_prop,
- event_source, summary);
-
- summary->bag = bag;
- 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));
-
- /* Bonobo::PropertyControl */
- property = bonobo_property_control_new_full (property_control, 1,
- event_source,
- summary);
- summary->property_control = property;
-
- gtk_signal_connect (GTK_OBJECT (property), "action",
- GTK_SIGNAL_FUNC (property_action), summary);
-
- bonobo_object_add_interface (component, BONOBO_OBJECT(property));
-
- /* Bonobo::PersistStream */
- 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++;
- gtk_idle_add ((GSourceFunc) download, summary);
-
- return component;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- BonoboObject *component_factory;
-
- component_factory = executive_summary_component_factory_new (create_view, NULL);
- return component_factory;
-}
-
-static void
-factory_init (void)
-{
- if (factory != NULL) {
- return;
- }
-
- factory = bonobo_generic_factory_new (RDF_SUMMARY_ID, factory_fn, NULL);
- if (factory == NULL) {
- g_error ("Cannot initialize factory");
- }
-}
-
-int
-main (int argc,
- char *argv[])
-{
- CORBA_ORB orb;
-
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- gnome_init_with_popt_table ("RDF-Summary", VERSION,
- argc, argv, oaf_popt_options, 0, NULL);
- orb = oaf_init (argc, argv);
- gnome_vfs_init ();
-
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
- g_error ("Could not initialize Bonobo");
- }
-
- factory_init ();
- bonobo_main ();
-
- return 0;
-}
-
diff --git a/executive-summary/widgets/.cvsignore b/executive-summary/widgets/.cvsignore
deleted file mode 100644
index ddca354b6d..0000000000
--- a/executive-summary/widgets/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-esummary-window-test \ No newline at end of file
diff --git a/executive-summary/widgets/Makefile.am b/executive-summary/widgets/Makefile.am
deleted file mode 100644
index f83d956d63..0000000000
--- a/executive-summary/widgets/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(includedir) \
- $(GNOME_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"Executive-Summary-Widgets\" \
- -g \
- -Wall \
- -Wmissing-prototypes \
- -Wmissing-declarations
-
-noinst_LIBRARIES = libesummary-widgets.a
-
-libesummary_widgets_a_SOURCES = \
- e-summary-subwindow.c \
- e-summary-subwindow.h \
- e-summary-titlebar.c \
- e-summary-titlebar.h \
- e-summary-title-button.c \
- e-summary-title-button.h
-
-noinst_PROGRAMS = \
- esummary-window-test
-
-esummary_window_test_SOURCES = \
- esummary-window-test.c
-
-esummary_window_test_LDADD = \
- $(EXTRA_GNOME_LIBS) \
- libesummary-widgets.a \
- $(BONOBO_GNOME_LIBS) \
- $(top_builddir)/e-util/libeutil.la
-
diff --git a/executive-summary/widgets/e-summary-subwindow.c b/executive-summary/widgets/e-summary-subwindow.c
deleted file mode 100644
index 1b84c87010..0000000000
--- a/executive-summary/widgets/e-summary-subwindow.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gtk/gtkframe.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-font.h>
-#include <gal/e-text/e-text.h>
-#include <libgnomeui/gnome-canvas.h>
-#include <libgnomeui/gnome-canvas-widget.h>
-
-#include "e-summary-subwindow.h"
-#include "e-summary-titlebar.h"
-
-#define PARENT_TYPE (gnome_canvas_group_get_type ())
-#define TITLEBAR_BORDER_WIDTH 2
-
-static void e_summary_subwindow_destroy (GtkObject *object);
-static void e_summary_subwindow_class_init (GtkObjectClass *object_class);
-static void e_summary_subwindow_init (GtkObject *object);
-
-static GnomeCanvasGroupClass *parent_class;
-
-struct _ESummarySubwindowPrivate {
- GnomeCanvasItem *titlebar;
- GnomeCanvasItem *contents;
-
- GtkWidget *container;
-
- char *title;
-};
-
-enum {
- ARG_0,
- ARG_X,
- ARG_Y,
- ARG_WIDTH,
- ARG_HEIGHT,
- ARG_STATE
-};
-
-enum {
- CLOSE_CLICKED,
- SHADE_CLICKED,
- EDIT_CLICKED,
- LAST_SIGNAL
-};
-
-static guint32 e_summary_subwindow_signals[LAST_SIGNAL] = { 0 };
-
-static void
-e_summary_subwindow_destroy (GtkObject *object)
-{
- ESummarySubwindow *subwindow = E_SUMMARY_SUBWINDOW (object);
- ESummarySubwindowPrivate *priv;
-
- priv = subwindow->private;
-
- if (priv == NULL)
- return;
-
- if (priv->container) {
- gtk_widget_destroy (priv->container);
- priv->container = NULL;
- }
-
- if (priv->title) {
- g_free (priv->title);
- priv->title = NULL;
- }
-
- g_free (subwindow->private);
- subwindow->private = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-e_summary_subwindow_realize (GnomeCanvasItem *item)
-{
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)
- (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) (item);
-}
-
-static void
-e_summary_subwindow_unrealize (GnomeCanvasItem *item)
-{
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item);
-}
-
-static void
-e_summary_subwindow_class_init (GtkObjectClass *object_class)
-{
- GnomeCanvasItemClass *item_class;
-
- item_class = (GnomeCanvasItemClass *) object_class;
-
- object_class->destroy = e_summary_subwindow_destroy;
-
- item_class->realize = e_summary_subwindow_realize;
- item_class->unrealize = e_summary_subwindow_unrealize;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-e_summary_subwindow_init (GtkObject *object)
-{
- ESummarySubwindow *subwindow = E_SUMMARY_SUBWINDOW (object);
- ESummarySubwindowPrivate *priv;
-
- subwindow->private = g_new0 (ESummarySubwindowPrivate, 1);
- priv = subwindow->private;
-
- priv->title = NULL;
-}
-
-E_MAKE_TYPE (e_summary_subwindow, "ESummarySubwindow", ESummarySubwindow,
- e_summary_subwindow_class_init, e_summary_subwindow_init,
- PARENT_TYPE);
-
-static void
-container_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- ESummarySubwindow *subwindow)
-{
- ESummarySubwindowPrivate *priv;
-
- g_return_if_fail (subwindow != NULL);
- g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow));
-
- priv = subwindow->private;
-
- gnome_canvas_item_set (priv->titlebar,
- "width", (double) allocation->width - 1,
- NULL);
-
-}
-
-static void
-edit_cb (GnomeCanvasItem *item,
- ESummarySubwindow *subwindow)
-{
- g_print ("EDIT!\n");
-}
-
-static void
-shade_cb (GnomeCanvasItem *item,
- ESummarySubwindow *subwindow)
-{
- g_print ("SHADE!\n");
-}
-
-static void
-close_cb (GnomeCanvasItem *item,
- ESummarySubwindow *subwindow)
-{
- g_print ("CLOSE!\n");
- gtk_object_destroy (GTK_OBJECT (subwindow));
-}
-
-void
-e_summary_subwindow_construct (GnomeCanvasItem *item)
-{
- GnomeCanvasGroup *group;
- ESummarySubwindow *subwindow;
- ESummarySubwindowPrivate *priv;
- EFont *font;
- int titlebar_height;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (item));
-
- subwindow = E_SUMMARY_SUBWINDOW (item);
- priv = subwindow->private;
-
- group = GNOME_CANVAS_GROUP (item);
-
- font = e_font_from_gdk_font ( ((GtkWidget *) item->canvas)->style->font);
-
- titlebar_height = 18 + 2 * TITLEBAR_BORDER_WIDTH; /* FIXME: Not hardcoded */
-
- priv->titlebar = gnome_canvas_item_new (group,
- e_summary_titlebar_get_type (),
- "text", "Titlebar",
- "width", 100.0,
- NULL);
- gtk_signal_connect (GTK_OBJECT (priv->titlebar), "edit",
- GTK_SIGNAL_FUNC (edit_cb), subwindow);
- gtk_signal_connect (GTK_OBJECT (priv->titlebar), "shade",
- GTK_SIGNAL_FUNC (shade_cb), subwindow);
- gtk_signal_connect (GTK_OBJECT (priv->titlebar), "close",
- GTK_SIGNAL_FUNC (close_cb), subwindow);
-
- priv->container = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (priv->container), GTK_SHADOW_ETCHED_IN);
- gtk_widget_show (priv->container);
-
- priv->contents = gnome_canvas_item_new (group,
- gnome_canvas_widget_get_type (),
- "x", (double) 0,
- "y", (double) titlebar_height + 1,
- "widget", priv->container,
- NULL);
- gtk_signal_connect (GTK_OBJECT (priv->container), "size_allocate",
- GTK_SIGNAL_FUNC (container_size_allocate), subwindow);
-
-}
-
-GnomeCanvasItem *
-e_summary_subwindow_new (GnomeCanvasGroup *parent,
- double x,
- double y)
-{
- GnomeCanvasItem *item;
-
- item = gnome_canvas_item_new (parent, e_summary_subwindow_get_type (),
- "x", x,
- "y", y,
- NULL);
- e_summary_subwindow_construct (item);
-
- return item;
-}
-
-/* These functions mimic the GtkContainer methods */
-
-void
-e_summary_subwindow_add (ESummarySubwindow *subwindow,
- GtkWidget *widget)
-{
- ESummarySubwindowPrivate *priv;
-
- g_return_if_fail (subwindow != NULL);
- g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow));
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- priv = subwindow->private;
-
- gtk_container_add (GTK_CONTAINER (priv->container), widget);
-
-}
-
-void
-e_summary_subwindow_remove (ESummarySubwindow *subwindow,
- GtkWidget *widget)
-{
- ESummarySubwindowPrivate *priv;
-
- g_return_if_fail (subwindow != NULL);
- g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow));
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- priv = subwindow->private;
-
- gtk_container_remove (GTK_CONTAINER (priv->container), widget);
-}
-
-void
-e_summary_subwindow_set_title (ESummarySubwindow *subwindow,
- const char *title)
-{
- ESummarySubwindowPrivate *priv;
-
- g_return_if_fail (subwindow != NULL);
- g_return_if_fail (IS_E_SUMMARY_SUBWINDOW (subwindow));
- g_return_if_fail (title != NULL);
-
- priv = subwindow->private;
- if (priv->title)
- g_free (priv->title);
-
- priv->title = g_strdup (title);
-}
diff --git a/executive-summary/widgets/e-summary-subwindow.h b/executive-summary/widgets/e-summary-subwindow.h
deleted file mode 100644
index 2676f9ec7d..0000000000
--- a/executive-summary/widgets/e-summary-subwindow.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-subwindow.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_SUBWINDOW_H__
-#define _E_SUMMARY_SUBWINDIW_H__
-
-#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-canvas.h>
-
-#define E_SUMMARY_SUBWINDOW_TYPE (e_summary_subwindow_get_type ())
-#define E_SUMMARY_SUBWINDOW(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_SUBWINDOW_TYPE, ESummarySubwindow))
-#define E_SUMMARY_SUBWINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_SUBWINDOW_TYPE, ESummarySubwindowClass))
-#define IS_E_SUMMARY_SUBWINDOW(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_SUBWINDOW_TYPE))
-#define IS_E_SUMMARY_SUBWINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_SUBWINDOW_TYPE))
-
-typedef struct _ESummarySubwindowPrivate ESummarySubwindowPrivate;
-typedef struct _ESummarySubwindow ESummarySubwindow;
-typedef struct _ESummarySubwindowClass ESummarySubwindowClass;
-
-struct _ESummarySubwindow {
- GnomeCanvasGroup parent;
-
- ESummarySubwindowPrivate *private;
-};
-
-struct _ESummarySubwindowClass {
- GnomeCanvasGroupClass parent_class;
-
- void (*close_clicked) (ESummarySubwindow *window);
- void (*shade_clicked) (ESummarySubwindow *window);
- void (*edit_clicked) (ESummarySubwindow *window);
-};
-
-GtkType e_summary_subwindow_get_type (void);
-
-void e_summary_subwindow_construct (GnomeCanvasItem *subwindow);
-GnomeCanvasItem *e_summary_subwindow_new (GnomeCanvasGroup *parent,
- double x,
- double y);
-
-void e_summary_subwindow_add (ESummarySubwindow *subwindow,
- GtkWidget *widget);
-void e_summary_subwindow_remove (ESummarySubwindow *subwindow,
- GtkWidget *widget);
-void e_summary_subwindow_set_title (ESummarySubwindow *subwindow,
- const char *title);
-
-#endif
diff --git a/executive-summary/widgets/e-summary-title-button.c b/executive-summary/widgets/e-summary-title-button.c
deleted file mode 100644
index 4ef9d77209..0000000000
--- a/executive-summary/widgets/e-summary-title-button.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-title-buttons.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <gal/util/e-util.h>
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include "e-summary-title-button.h"
-
-#define PARENT_TYPE (gnome_canvas_rect_get_type ())
-
-enum {
- ARG_0,
- ARG_PIXBUF,
- ARG_X,
- ARG_Y
-};
-
-enum {
- CLICKED,
- LAST_SIGNAL
-};
-
-static void e_summary_title_button_destroy (GtkObject *object);
-static void e_summary_title_button_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void e_summary_title_button_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void e_summary_title_button_class_init (ESummaryTitleButtonClass *estb_class);
-static void e_summary_title_button_init (ESummaryTitleButton *estb);
-static double e_summary_title_button_point (GnomeCanvasItem *item,
- double x,
- double y,
- int cx,
- int cy,
- GnomeCanvasItem **actual_item);
-static void e_summary_title_button_update (GnomeCanvasItem *item,
- double affine[6],
- ArtSVP *clip_path,
- gint flags);
-static void e_summary_title_button_draw (GnomeCanvasItem *item,
- GdkDrawable *drawable,
- int x, int y,
- int width, int height);
-static gint e_summary_title_button_event (GnomeCanvasItem *item,
- GdkEvent *event);
-
-static GnomeCanvasRectClass *parent_class;
-static guint estb_signals[LAST_SIGNAL] = { 0 };
-
-struct _ESummaryTitleButtonPrivate {
- GdkPixbuf *pixbuf;
- double x, y;
- int width, height;
-
- int in_button : 1;
- int button_down : 1;
-};
-
-static void
-e_summary_title_button_destroy (GtkObject *object)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
-
- estb = E_SUMMARY_TITLE_BUTTON (object);
- priv = estb->private;
-
- if (priv == NULL)
- return;
-
- gdk_pixbuf_unref (priv->pixbuf);
-
- g_free (priv);
- estb->private = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-e_summary_title_button_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
- gboolean update = FALSE;
-
- estb = E_SUMMARY_TITLE_BUTTON (object);
- priv = estb->private;
-
- switch (arg_id) {
- case ARG_PIXBUF:
- if (priv->pixbuf)
- gdk_pixbuf_unref (priv->pixbuf);
-
- priv->pixbuf = GTK_VALUE_POINTER (*arg);
- gdk_pixbuf_ref (priv->pixbuf);
-
- priv->width = gdk_pixbuf_get_width (priv->pixbuf);
- priv->height = gdk_pixbuf_get_height (priv->pixbuf);
-
- update = TRUE;
- break;
-
- case ARG_X:
- priv->x = GTK_VALUE_DOUBLE (*arg);
- break;
-
- case ARG_Y:
- priv->y = GTK_VALUE_DOUBLE (*arg);
- break;
-
- default:
- break;
-
- }
-
- if (update)
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (estb));
-
-}
-
-static void
-e_summary_title_button_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
-
- estb = E_SUMMARY_TITLE_BUTTON (object);
- priv = estb->private;
-
- switch (arg_id) {
- case ARG_PIXBUF:
- GTK_VALUE_POINTER (*arg) = priv->pixbuf;
- break;
-
- case ARG_X:
- GTK_VALUE_DOUBLE (*arg) = priv->x;
- break;
-
- case ARG_Y:
- GTK_VALUE_DOUBLE (*arg) = priv->y;
- break;
-
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
-
- }
-}
-
-static void
-e_summary_title_button_init (ESummaryTitleButton *estb)
-{
- estb->private = g_new0 (ESummaryTitleButtonPrivate, 1);
-}
-
-static void
-e_summary_title_button_class_init (ESummaryTitleButtonClass *estb_class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *item_class;
-
- object_class = (GtkObjectClass *) estb_class;
- item_class = (GnomeCanvasItemClass *) estb_class;
-
- object_class->destroy = e_summary_title_button_destroy;
- object_class->set_arg = e_summary_title_button_set_arg;
- object_class->get_arg = e_summary_title_button_get_arg;
-
- item_class->draw = e_summary_title_button_draw;
- item_class->point = e_summary_title_button_point;
- item_class->update = e_summary_title_button_update;
- item_class->event = e_summary_title_button_event;
-
- gtk_object_add_arg_type ("ESummaryTitleButton::pixbuf",
- GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,
- ARG_PIXBUF);
- gtk_object_add_arg_type ("ESummaryTitleButton::x",
- GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,
- ARG_X);
- gtk_object_add_arg_type ("ESummaryTitleButton::y",
- GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,
- ARG_Y);
- estb_signals[CLICKED] = gtk_signal_new ("clicked", GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESummaryTitleButtonClass,
- clicked),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, estb_signals, LAST_SIGNAL);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-E_MAKE_TYPE (e_summary_title_button, "ESummaryTitleButton",
- ESummaryTitleButton, e_summary_title_button_class_init,
- e_summary_title_button_init, PARENT_TYPE);
-
-static double
-e_summary_title_button_point (GnomeCanvasItem *item,
- double x,
- double y,
- int cx,
- int cy,
- GnomeCanvasItem **actual_item)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
- double d = 1.0;
-
- estb = E_SUMMARY_TITLE_BUTTON (item);
- priv = estb->private;
-
- if (x >= priv->x && x <= priv->x + gdk_pixbuf_get_width (priv->pixbuf)
- && y >= priv->y && y <= priv->y + gdk_pixbuf_get_height (priv->pixbuf)) {
- d = 0.0;
- *actual_item = item;
- }
-
- return d;
-}
-
-static void
-get_bounds (ESummaryTitleButton *estb,
- double *px1, double *py1,
- double *px2, double *py2)
-{
- GnomeCanvasItem *item;
- ESummaryTitleButtonPrivate *priv;
- double x1, y1, x2, y2;
- int cx1, cy1, cx2, cy2;
-
- item = GNOME_CANVAS_ITEM (estb);
- priv = estb->private;
-
- x1 = priv->x;
- y1 = priv->y;
- x2 = x1 + priv->width;
- y2 = y1 + priv->height;
-
- gnome_canvas_item_i2w (item, &x1, &y1);
- gnome_canvas_item_i2w (item, &x2, &x2);
- gnome_canvas_w2c (item->canvas, x1, y1, &cx1, &cy1);
- gnome_canvas_w2c (item->canvas, x2, y2, &cx2, &cy2);
-
- *px1 = cx1;
- *py1 = cy1;
- *px2 = cx2;
- *py2 = cy2;
-}
-
-static void
-e_summary_title_button_update (GnomeCanvasItem *item,
- double affine[6],
- ArtSVP *clip_path,
- gint flags)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
- double x1, y1, x2, y2;
-
- estb = E_SUMMARY_TITLE_BUTTON (item);
- priv = estb->private;
-
- get_bounds (estb, &x1, &y1, &x2, &y2);
- gnome_canvas_update_bbox (item, (int) x1, (int) y1, (int) x2, (int) y2);
-}
-
-static void
-e_summary_title_button_draw (GnomeCanvasItem *item,
- GdkDrawable *drawable,
- int x, int y,
- int width, int height)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
- double i2w[6], w2c[6], i2c[6];
- int x1, x2, y1, y2;
- ArtPoint i1, i2;
- ArtPoint c1, c2;
- GdkGC *gc;
-
- estb = E_SUMMARY_TITLE_BUTTON (item);
- priv = estb->private;
-
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->draw)
- (* GNOME_CANVAS_ITEM_CLASS (parent_class)->draw) (item, drawable, x, y, width, height);
-
- gnome_canvas_item_i2w_affine (item, i2w);
- gnome_canvas_w2c_affine (item->canvas, w2c);
- art_affine_multiply (i2c, i2w, w2c);
-
- i1.x = priv->x;
- i1.y = priv->y;
- i2.x = i1.x + priv->width + 4;
- i2.y = i1.y + priv->height + 4;
- art_affine_point (&c1, &i1, i2c);
- art_affine_point (&c2, &i2, i2c);
- x1 = c1.x;
- y1 = c1.y;
- x2 = c2.x;
- y2 = c2.y;
-
- gc = gdk_gc_new (item->canvas->layout.bin_window);
- gdk_draw_rectangle (drawable, gc,
- FALSE, x1 - x,
- y1 - y,
- x2 - x1,
- y2 - y1);
- gdk_gc_unref (gc);
-
- gdk_pixbuf_render_to_drawable_alpha (priv->pixbuf,
- drawable,
- 0, 0,
- x1 + 2, y1 + 2,
- priv->width, priv->height,
- GDK_PIXBUF_ALPHA_BILEVEL,
- 127,
- GDK_RGB_DITHER_NORMAL,
- 0, 0);
-}
-
-static gint
-e_summary_title_button_event (GnomeCanvasItem *item,
- GdkEvent *event)
-{
- ESummaryTitleButton *estb;
- ESummaryTitleButtonPrivate *priv;
-
- estb = E_SUMMARY_TITLE_BUTTON (item);
- priv = estb->private;
-
- switch (event->type) {
- case GDK_ENTER_NOTIFY:
- priv->in_button = TRUE;
- break;
-
- case GDK_LEAVE_NOTIFY:
- priv->in_button = FALSE;
- break;
-
- case GDK_BUTTON_PRESS:
- if (priv->in_button) {
- priv->button_down = TRUE;
- gnome_canvas_item_grab (item,
- GDK_LEAVE_NOTIFY_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_BUTTON_RELEASE_MASK,
- NULL, event->button.time);
- }
- break;
-
- case GDK_BUTTON_RELEASE:
- priv->button_down = FALSE;
- gnome_canvas_item_ungrab (item, event->button.time);
-
- if (priv->in_button) {
- gtk_signal_emit (GTK_OBJECT (estb), estb_signals[CLICKED]);
- }
- break;
-
- default:
- return TRUE;
- }
-
- return FALSE;
-}
diff --git a/executive-summary/widgets/e-summary-title-button.h b/executive-summary/widgets/e-summary-title-button.h
deleted file mode 100644
index de0d5212a3..0000000000
--- a/executive-summary/widgets/e-summary-title-button.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-title-button.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_TITLE_BUTTON_H__
-#define _E_SUMMARY_TITLE_BUTTON_H__
-
-#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-canvas.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-
-#define E_SUMMARY_TITLE_BUTTON_TYPE (e_summary_title_button_get_type ())
-#define E_SUMMARY_TITLE_BUTTON(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TITLE_BUTTON_TYPE, ESummaryTitleButton))
-#define E_SUMMARY_TITLE_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TITLE_BUTTON_TYPE, ESummaryTitleButtonClass))
-#define IS_E_SUMMARY_TITLE_BUTTON(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TITLE_BUTTON_TYPE))
-#define IS_E_SUMMARY_TITLE_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TITLE_BUTTON_TYPE))
-
-typedef struct _ESummaryTitleButtonPrivate ESummaryTitleButtonPrivate;
-typedef struct _ESummaryTitleButton ESummaryTitleButton;
-typedef struct _ESummaryTitleButtonClass ESummaryTitleButtonClass;
-
-struct _ESummaryTitleButton {
- GnomeCanvasRect parent;
-
- ESummaryTitleButtonPrivate *private;
-};
-
-struct _ESummaryTitleButtonClass {
- GnomeCanvasRectClass parent_class;
-
- void (*clicked) (ESummaryTitleButton *estb);
-};
-
-GtkType e_summary_title_button_get_type (void);
-
-#endif
diff --git a/executive-summary/widgets/e-summary-titlebar.c b/executive-summary/widgets/e-summary-titlebar.c
deleted file mode 100644
index 2fd3b2d3db..0000000000
--- a/executive-summary/widgets/e-summary-titlebar.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-titlebar.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <gal/util/e-util.h>
-#include <gal/widgets/e-font.h>
-
-#include <gal/e-text/e-text.h>
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-#include "e-summary-titlebar.h"
-#include "e-summary-title-button.h"
-
-/* XPMS */
-#include "edit.xpm"
-#include "x.xpm"
-#include "shade.xpm"
-
-#define PARENT_TYPE (gnome_canvas_group_get_type ())
-#define TITLEBAR_BORDER_WIDTH 2
-
-enum {
- ARG_0,
- ARG_TEXT,
- ARG_WIDTH,
- ARG_HEIGHT
-};
-
-enum {
- EDIT,
- SHADE,
- CLOSE,
- LAST_SIGNAL
-};
-
-static void e_summary_titlebar_destroy (GtkObject *object);
-static void e_summary_titlebar_class_init (GtkObjectClass *object_class);
-static void e_summary_titlebar_init (GtkObject *object);
-
-static GnomeCanvasGroupClass *parent_class;
-static guint titlebar_signals[LAST_SIGNAL] = { 0 };
-
-struct _ESummaryTitlebarPrivate {
- GnomeCanvasItem *rect;
- GnomeCanvasItem *titletext;
-
- GnomeCanvasItem *edit;
- GnomeCanvasItem *shade;
- GnomeCanvasItem *close;
-
- char *text;
- double width, height;
-};
-
-static void
-e_summary_titlebar_destroy (GtkObject *object)
-{
- ESummaryTitlebar *titlebar;
- ESummaryTitlebarPrivate *priv;
-
- titlebar = E_SUMMARY_TITLEBAR (object);
- priv = titlebar->private;
-
- if (priv == NULL)
- return;
-
- g_free (priv);
- titlebar->private = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-edit_cb (GnomeCanvasItem *item,
- ESummaryTitlebar *titlebar)
-{
- gtk_signal_emit (GTK_OBJECT (titlebar), titlebar_signals[EDIT]);
-}
-
-static void
-shade_cb (GnomeCanvasItem *item,
- ESummaryTitlebar *titlebar)
-{
- gtk_signal_emit (GTK_OBJECT (titlebar), titlebar_signals[SHADE]);
-}
-
-static void
-close_cb (GnomeCanvasItem *item,
- ESummaryTitlebar *titlebar)
-{
- gtk_signal_emit (GTK_OBJECT (titlebar), titlebar_signals[CLOSE]);
-}
-
-static void
-e_summary_titlebar_realize (GnomeCanvasItem *item)
-{
- GnomeCanvasGroup *group;
- ESummaryTitlebar *titlebar;
- ESummaryTitlebarPrivate *priv;
- GdkPixbuf *pb;
- EFont *font;
- int font_height;
-
- group = GNOME_CANVAS_GROUP (item);
- titlebar = E_SUMMARY_TITLEBAR (item);
- priv = titlebar->private;
-
- font = e_font_from_gdk_font (GTK_WIDGET (item->canvas)->style->font);
- font_height = e_font_height (font);
- priv->height = 18 + 2 * TITLEBAR_BORDER_WIDTH; /* FIXME: Not hardcoded */
-
- priv->rect = gnome_canvas_item_new (group,
- gnome_canvas_rect_get_type (),
- "x1", 0.0,
- "y1", 0.0,
- "y2", (double) priv->height,
- "x2", priv->width,
- "fill_color_rgba", 0x88AAFFFF,
- NULL);
-
- pb = gdk_pixbuf_new_from_xpm_data ((const char**) x_xpm);
- priv->close = gnome_canvas_item_new (group,
- e_summary_title_button_get_type (),
- "x", (double) priv->width - TITLEBAR_BORDER_WIDTH - 18,
- "y", (double) TITLEBAR_BORDER_WIDTH,
- "pixbuf", pb,
- NULL);
- gdk_pixbuf_unref (pb);
- gtk_signal_connect (GTK_OBJECT (priv->close), "clicked",
- GTK_SIGNAL_FUNC (close_cb), titlebar);
-
- pb = gdk_pixbuf_new_from_xpm_data ((const char**) shade_xpm);
- priv->shade = gnome_canvas_item_new (group,
- e_summary_title_button_get_type (),
- "x", (double) priv->width - (TITLEBAR_BORDER_WIDTH * 2) - 36,
- "y", (double) TITLEBAR_BORDER_WIDTH,
- "pixbuf", pb,
- NULL);
- gdk_pixbuf_unref (pb);
- gtk_signal_connect (GTK_OBJECT (priv->shade), "clicked",
- GTK_SIGNAL_FUNC (shade_cb), titlebar);
-
- pb = gdk_pixbuf_new_from_xpm_data ((const char**) edit_xpm);
- priv->edit = gnome_canvas_item_new (group,
- e_summary_title_button_get_type (),
- "x", (double) priv->width - (TITLEBAR_BORDER_WIDTH * 3) - 54,
- "y", (double) TITLEBAR_BORDER_WIDTH,
- "pixbuf", pb,
- NULL);
- gdk_pixbuf_unref (pb);
- gtk_signal_connect (GTK_OBJECT (priv->edit), "clicked",
- GTK_SIGNAL_FUNC (edit_cb), titlebar);
-
- priv->titletext = gnome_canvas_item_new (group,
- e_text_get_type (),
- "text", priv->text,
- "font_gdk", GTK_WIDGET (item->canvas)->style->font,
- "clip_width", (double) priv->width -
- (TITLEBAR_BORDER_WIDTH*4)- 50,
- "clip_height", (double) e_font_height (font),
-
- "clip", TRUE,
- "use_ellipsis", TRUE,
- "fill_color", "black",
- "anchor", GTK_ANCHOR_NW,
- "draw_background", FALSE,
- NULL);
- gnome_canvas_item_move (priv->titletext, TITLEBAR_BORDER_WIDTH,
- (priv->height - font_height) / 2);
-
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)
- (* GNOME_CANVAS_ITEM_CLASS (parent_class)->realize) (item);
-}
-
-static void
-e_summary_titlebar_unrealize (GnomeCanvasItem *item)
-{
- if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item);
-}
-
-static void
-e_summary_titlebar_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
-{
- ESummaryTitlebar *titlebar;
- ESummaryTitlebarPrivate *priv;
-
- titlebar = E_SUMMARY_TITLEBAR (object);
- priv = titlebar->private;
-
- switch (arg_id) {
- case ARG_TEXT:
- if (priv->text)
- g_free (priv->text);
-
- priv->text = g_strdup (GTK_VALUE_STRING (*arg));
-
- if (priv->titletext)
- gnome_canvas_item_set (priv->titletext,
- "text", priv->text,
- NULL);
- break;
-
- case ARG_WIDTH:
- priv->width = GTK_VALUE_DOUBLE (*arg);
-
- if (priv->rect)
- gnome_canvas_item_set (priv->rect,
- "x2", priv->width,
- NULL);
- if (priv->titletext)
- gnome_canvas_item_set (priv->titletext,
- "clip_width", priv->width -
- (TITLEBAR_BORDER_WIDTH* 4) - 42,
- NULL);
- break;
-
- default:
- break;
- }
-}
-
-static void
-e_summary_titlebar_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
-{
- ESummaryTitlebar *titlebar;
- ESummaryTitlebarPrivate *priv;
-
- titlebar = E_SUMMARY_TITLEBAR (object);
- priv = titlebar->private;
-
- switch (arg_id) {
- case ARG_TEXT:
- GTK_VALUE_STRING (*arg) = priv->text;
- break;
-
- case ARG_WIDTH:
- GTK_VALUE_DOUBLE (*arg) = priv->width;
- break;
-
- case ARG_HEIGHT:
- GTK_VALUE_DOUBLE (*arg) = priv->height;
- break;
-
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static gint
-e_summary_titlebar_event (GnomeCanvasItem *item,
- GdkEvent *event)
-{
- if (event->type == GDK_2BUTTON_PRESS &&
- event->button.button == 1) {
- gtk_signal_emit (GTK_OBJECT (item), titlebar_signals[SHADE]);
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
-static double
-e_summary_titlebar_point (GnomeCanvasItem *item,
- double x,
- double y,
- int cx,
- int cy,
- GnomeCanvasItem **actual_item)
-{
- ESummaryTitlebar *est;
- ESummaryTitlebarPrivate *priv;
- GnomeCanvasItem *ret_item;
- double d;
-
- est = E_SUMMARY_TITLEBAR (item);
- priv = est->private;
-
- d = (* GNOME_CANVAS_ITEM_CLASS
- (GTK_OBJECT (priv->edit)->klass)->point) (priv->edit,
- x, y,
- cx, cy,
- &ret_item);
- if (d == 0.0) {
- *actual_item = ret_item;
- return 0.0;
- }
-
- d = (* GNOME_CANVAS_ITEM_CLASS
- (GTK_OBJECT (priv->shade)->klass)->point) (priv->shade,
- x, y,
- cx, cy,
- &ret_item);
- if (d == 0.0) {
- *actual_item = ret_item;
- return 0.0;
- }
-
- d = (* GNOME_CANVAS_ITEM_CLASS
- (GTK_OBJECT (priv->close)->klass)->point) (priv->close,
- x, y,
- cx, cy,
- &ret_item);
- if (d == 0.0) {
- *actual_item = ret_item;
- return 0.0;
- }
-
- *actual_item = item;
- return 0.0;
-}
-
-static void
-e_summary_titlebar_class_init (GtkObjectClass *object_class)
-{
- GnomeCanvasItemClass *item_class;
-
- item_class = (GnomeCanvasItemClass *) object_class;
-
- object_class->destroy = e_summary_titlebar_destroy;
- object_class->set_arg = e_summary_titlebar_set_arg;
- object_class->get_arg = e_summary_titlebar_get_arg;
-
- item_class->realize = e_summary_titlebar_realize;
- item_class->unrealize = e_summary_titlebar_unrealize;
- item_class->event = e_summary_titlebar_event;
- item_class->point = e_summary_titlebar_point;
-
- gtk_object_add_arg_type ("ESummaryTitlebar::text",
- GTK_TYPE_STRING, GTK_ARG_READWRITE,
- ARG_TEXT);
- gtk_object_add_arg_type ("ESummaryTitlebar::width",
- GTK_TYPE_DOUBLE, GTK_ARG_READWRITE,
- ARG_WIDTH);
- gtk_object_add_arg_type ("ESummaryTitlebar::height",
- GTK_TYPE_DOUBLE, GTK_ARG_READABLE,
- ARG_HEIGHT);
-
- titlebar_signals[EDIT] = gtk_signal_new ("edit", GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESummaryTitlebarClass,
- edit),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- titlebar_signals[SHADE] = gtk_signal_new ("shade", GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESummaryTitlebarClass,
- shade),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- titlebar_signals[CLOSE] = gtk_signal_new ("close", GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESummaryTitlebarClass,
- close),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, titlebar_signals,
- LAST_SIGNAL);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-e_summary_titlebar_init (GtkObject *object)
-{
- ESummaryTitlebar *titlebar;
- ESummaryTitlebarPrivate *priv;
-
- titlebar = E_SUMMARY_TITLEBAR (object);
- titlebar->private = g_new0 (ESummaryTitlebarPrivate, 1);
- priv = titlebar->private;
-
- priv->width = 100.0;
- priv->text = NULL;
-
- gdk_rgb_init ();
-}
-
-E_MAKE_TYPE (e_summary_titlebar, "ESummaryTitlebar", ESummaryTitlebar,
- e_summary_titlebar_class_init, e_summary_titlebar_init,
- PARENT_TYPE);
-
diff --git a/executive-summary/widgets/e-summary-titlebar.h b/executive-summary/widgets/e-summary-titlebar.h
deleted file mode 100644
index 9104860698..0000000000
--- a/executive-summary/widgets/e-summary-titlebar.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-titlebar.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 _E_SUMMARY_TITLEBAR_H__
-#define _E_SUMMARY_TITLEBAR_H__
-
-#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-canvas.h>
-
-#define E_SUMMARY_TITLEBAR_TYPE (e_summary_titlebar_get_type ())
-#define E_SUMMARY_TITLEBAR(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TITLEBAR_TYPE, ESummaryTitlebar))
-#define E_SUMMARY_TITLEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TITLEBAR_TYPE, ESummaryTitlebarClass))
-#define IS_E_SUMMARY_TITLEBAR(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TITLEBAR_TYPE))
-#define IS_E_SUMMARY_TITLEBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TITLEBAR_TYPE))
-
-typedef struct _ESummaryTitlebarPrivate ESummaryTitlebarPrivate;
-typedef struct _ESummaryTitlebar ESummaryTitlebar;
-typedef struct _ESummaryTitlebarClass ESummaryTitlebarClass;
-
-struct _ESummaryTitlebar {
- GnomeCanvasGroup parent;
-
- ESummaryTitlebarPrivate *private;
-};
-
-struct _ESummaryTitlebarClass {
- GnomeCanvasGroupClass parent_class;
-
- void (*close) (ESummaryTitlebar *window);
- void (*shade) (ESummaryTitlebar *window);
- void (*edit) (ESummaryTitlebar *window);
-};
-
-GtkType e_summary_titlebar_get_type (void);
-
-#endif
diff --git a/executive-summary/widgets/edit.xpm b/executive-summary/widgets/edit.xpm
deleted file mode 100644
index 7f2deb1525..0000000000
--- a/executive-summary/widgets/edit.xpm
+++ /dev/null
@@ -1,19 +0,0 @@
-/* XPM */
-static char * edit_xpm[] = {
-"14 14 2 1",
-" g None",
-". g #000000",
-" ",
-" ",
-" ... ",
-" . . ",
-" . . ",
-" . ",
-" . ",
-" .. ",
-" .. ",
-" .. ",
-" ",
-" .. ",
-" .. ",
-" "};
diff --git a/executive-summary/widgets/esummary-window-test.c b/executive-summary/widgets/esummary-window-test.c
deleted file mode 100644
index 7928e8b6f9..0000000000
--- a/executive-summary/widgets/esummary-window-test.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <gal/widgets/e-canvas.h>
-#include "e-summary-subwindow.h"
-#include "e-summary-titlebar.h"
-
-
-void close_test (GtkWidget *widget, gpointer data);
-
-void
-close_test (GtkWidget *widget,
- gpointer data)
-{
- gtk_main_quit ();
-}
-
-int
-main (int argc,
- char **argv)
-{
- GtkWidget *window, *canvas;
- ESummarySubwindow *subwindow;
- GtkWidget *control;
-
- gnome_init ("Executive Summary Subwindow Test", "1.0", argc, argv);
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_signal_connect (GTK_OBJECT (window), "destroy",
- GTK_SIGNAL_FUNC (close_test), NULL);
-
- canvas = e_canvas_new ();
-
- subwindow = e_summary_subwindow_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas)->root), 100, 100);
-
- control = gtk_button_new_with_label ("A big button");
- gtk_widget_set_usize (control, 400, 200);
-
- e_summary_subwindow_add (subwindow, control);
- gtk_widget_show (control);
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS (canvas), 0.0, 0.0, 1000.0, 1300.0);
- gtk_container_add (GTK_CONTAINER (window), canvas);
- gtk_widget_show_all (window);
-
- gtk_main ();
-
- exit(0);
-}
diff --git a/executive-summary/widgets/shade.xpm b/executive-summary/widgets/shade.xpm
deleted file mode 100644
index 349212e906..0000000000
--- a/executive-summary/widgets/shade.xpm
+++ /dev/null
@@ -1,19 +0,0 @@
-/* XPM */
-static char * shade_xpm[] = {
-"14 14 2 1",
-" g None",
-". g #000000",
-" ",
-" ............ ",
-" ............ ",
-" ............ ",
-" ............ ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" ............ ",
-" "};
diff --git a/executive-summary/widgets/x.xpm b/executive-summary/widgets/x.xpm
deleted file mode 100644
index ce9e9f19dc..0000000000
--- a/executive-summary/widgets/x.xpm
+++ /dev/null
@@ -1,19 +0,0 @@
-/* XPM */
-static char * x_xpm[] = {
-"14 14 2 1",
-" g None",
-". g #000000",
-" ",
-" .. .. ",
-" ... ... ",
-" ... ... ",
-" ... ... ",
-" ...... ",
-" .... ",
-" .... ",
-" ...... ",
-" ... ... ",
-" ... ... ",
-" ... ... ",
-" .. .. ",
-" "};
diff --git a/filter/.cvsignore b/filter/.cvsignore
deleted file mode 100644
index 7c13af9a14..0000000000
--- a/filter/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.la
-*.lo
-.libs
-.deps
-.pure
-Makefile
-Makefile.in
-filter-driver
-filter-editor
diff --git a/filter/ChangeLog b/filter/ChangeLog
deleted file mode 100644
index c260cb8fb8..0000000000
--- a/filter/ChangeLog
+++ /dev/null
@@ -1,2044 +0,0 @@
-2001-09-28 <NotZed@Ximian.com>
-
- * vfolder-rule.c (vfolder_rule_add_source): Emit changed events
- when we change it.
- (vfolder_rule_remove_source): "
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (edit_editor_clicked): Set the item label to the
- new rule name, not the old rule name. Fixes bug #11168.
-
-2001-09-27 <NotZed@Ximian.com>
-
- * vfolder-rule.c (xml_decode): Use g_strdup for the uri, not the
- xml memory.
-
- * filter-driver.c, filter-message-search.c: Removed, again, how
- did they come back???
-
-2001-09-13 <NotZed@Ximian.com>
-
- * filter-filter.c (filter_filter_add_action):
- (filter_filter_remove_action):
- (filter_filter_replace_action): Emit changed events.
-
- * filter-rule.c (filter_rule_xml_decode): Emiot a rule changed
- event.
- (filter_rule_copy): Emit a changed event.
- (filter_rule_replace_part): "
- (filter_rule_add_part): "
- (filter_rule_remove_part): "
- (filter_rule_xml_decode): Freeze around decoding, so we only emit
- changed when done.
- (filter_rule_emit_changed): New function to emit changed events if
- not frozen.
-
-2001-09-13 <NotZed@Ximian.com>
-
- * rule-context.c (rule_context_class_init): Added a 'rule_added'
- and 'rule_removed' signal.
- (rule_context_load): Set a (private) frozen flag while we're
- loading.
- (rule_context_add_rule): Emit a rule_added signal if we're not
- frozen.
- (rule_context_remove_rule): Emit a rule_removed signal if we're
- not frozen.
-
-2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_edit): Clone the current rule before editing
- it so that changes can be undone.
- (edit_editor_clicked): If the user hit OK, replace the original
- rule with the new one.
-
- * vfolder-rule.c (vfolder_rule_finalise): Free the sources list.
- (rule_copy): Implemented.
-
- * filter-filter.c (rule_copy): Implemented.
-
- * filter-rule.c (filter_rule_copy): New convenience function to
- copy one rule "into" another.
- (rule_copy): Default implementation.
- (filter_rule_clone): Use filter_rule_copy() internally to get rid
- of the nastiness/slowness of xml encoding and then decoding.
-
-2001-09-12 <NotZed@Ximian.com>
-
- * vfoldertypes.xml: Remove the match-all from the not
- body-contains, so we can use the new vector not function.
-
-2001-09-10 <NotZed@Ximian.com>
-
- * filter-score.c (format_sexp): Encode the score as an integer
- string, not as a string of integers. #5098.
-
-2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-datespec.c (button_clicked): Allow the dialog's title to
- be translated.
-
-2001-08-19 Chris Toshok <toshok@ximian.com>
-
- * filter-input.c: #include <sys/types.h> for regex_t on freebsd.
-
-2001-08-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter.glade: Added key accelerators.
-
-2001-08-14 Peter Williams <peterw@ximian.com>
-
- * filter-rule.c (xml_decode): Match either "title" or "_title" to
- allow for translations of the title (provided in the default
- files)
-
-2001-08-13 Peter Williams <peterw@ximian.com>
-
- * filter-datespec.c (make_span_editor): Add a gettext around our static
- strings.
- (format_time): New function. Convert a time_t to a gchar * (with i18n)
- (describe_button): Use format_time instead of ctime.
-
-2001-08-10 Peter Williams <peterw@ximian.com>
-
- * rule-context.c (rule_context_add_rule_gui): Make this compile again.
-
-2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (rule_context_add_rule_gui): No need to
- gtk_widget_show() the gnome dialog widget twice...
-
- * vfolder-rule.c (get_widget): Unref the glade_xml gui object
- before returning.
-
-2001-08-08 Radek Doulik <rodo@ximian.com>
-
- * filter-folder.c (button_clicked): don't mix g_free and xmlAlloc
- (xml_decode): don't mix g_free and xmlAlloc
-
- * filter-code.c (filter_code_init): use xmlStrdup instead of
- g_strdup
-
- * filter-input.c (filter_input_new_type_name): use xmlStrdup
- instead of g_strdup
- (filter_input_finalise): don't mix g_free and xmlAlloc
-
- * filter-option.c (clone): use xmlStrdup instead of g_strdup
- (free_option): don't mix g_free and xmlAlloc
-
- * filter-source.c (clone): use xmlStrdup rather than g_strdup
-
- * filter-element.c (filter_element_finalise): don't mix g_free and
- xmlAlloc
-
-2001-08-07 Not Zed <NotZed@Ximian.com>
-
- * filter-rule.c (filter_rule_finalise): Properly free the list of
- parts, and the private data.
- (FilterRulePrivate): Remove unused 'parts' member.
-
- * filter-option.c (free_option): For freeing options.
- (filter_option_finalise): Free options list.
-
- * filter-element.c (filter_element_finalise): free name.
-
- * filter-input.c (filter_input_finalise): Free type and values
- list.
-
- * filter-context.c (filter_context_finalise): Free the actions.
-
- * rule-context.c (rule_context_finalise): Remove the totally weird
- arsed *_set_list free code.
- (free_part_set):
- (free_rule_set): Use this to free stuff using g_list_foreach.
- (rule_context_finalise): Free the error string.
- (rule_context_finalise): Free the rules and parts.
-
-2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Reverted my previous change, I fixed the filter
- code to handle this the way danw said to handle it in bug #5886
- now.
-
-2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Removed the "is" and "is not" rules from the
- xml file for address matching because users are easily confused.
-
-2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-rule.c (get_widget): Do an evil kludgy hack so that the
- Rule Name entry widget gets focused when the filter editor is
- shown.
-
-2001-08-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-rule.c: Wrap some debug printf's with d().
-
- * rule-context.h: Removed prototype for rule_context_delete_rule()
- since the function doesn't exist.
-
-2001-07-23 Jon Trowbridge <trow@ximian.com>
-
- * vfolder-rule.c (validate): Added a validate function
- that checks to make sure that vfolders that have "specific
- folders" as their source actually have a non-empty list of
- source folders selected. (Bug #4937)
- (get_widget): If fr->source is NULL for some reason, bring
- it into sync with the default in the option menu.
-
-2001-07-23 Peter Williams <peterw@ximian.com>
-
- * filter-datespec.c (make_span_editor): Change the butt-ugly
- UI to a saner (and just as flexible) one. Instead of all those
- spinbuttons, just have one and let the user select the time unit.
- (omenu_item_activated): New function. When the user changes the
- time unit, convert it from the old number. Pretty.
- (adj_value_changed): This function is now simpler.
- (set_adjustments): Also modified for new UI model.
- (button_clicked): Set the selected_type before calling the callback.
- (FilterDatespecPrivate): Members change a bit.
- (filter_datespec_init): No longer need to allocation spinbuttons
- (filter_datespec_finalise): No longer need to free spinbuttons.
-
-2001-07-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Removed the "Forward To" filter action.
-
-2001-07-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (rule_context_get_rank_rule): Return -1 if we
- don't find it? This is what most of the code expected but not what
- we were returning on fail.
-
-2001-07-12 Zbigniew Chyla <cyba@gnome.pl>
-
- * filter-datespec.c (stringify_agoness): Marked string for translation.
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Users should not be able to filter on "Status
- is Deleted" since we don't allow that in the filter driver code.
-
-2001-07-11 Jason Leach <jleach@ximian.com>
-
- * vfoldertypes.xml: Copied the "Attachments" rule part over from
- filtertypes.xml, would be a powerful feature for vfolders (see all
- the patches across all folders, or all the attachments you've sent,
- without having to duplicate potentially big files, blah blah, bug
- #1155).
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * vfoldertypes.xml: Put a match-all around the not-body-contains
- to make it work per-message.
-
- * filtertypes.xml: Same.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-rule.c (get_widget): Set the focus on the title of the
- filter rule.
-
-2001-07-09 Anna Marie Dirks <anna@ximian.com>
-
- * rule-context.c (rule_context_add_rule_gui): Increased the size
- of the "Add Filter Rule" dialog to 600 x 400, so that no resizing
- is necessary to use the dialog.
-
-2001-07-09 Jon Trowbridge <trow@ximian.com>
-
- * filter-source.c (filter_source_get_sources): Bonobo-conf-ified.
- Removed /home/trow hard-wiring. :)
- (xml_encode): Encode things properly.
- (xml_decode): Decode things properly.
- (get_widget): Ignore accounts w/o source URLs.
- (clone): Set the ->name in our copy.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_delete): Select the most appropriate filter
- rule.
-
- * filtertypes.xml: Fix bug #4043: s/colour/color
-
-2001-07-03 Peter Williams <peterw@ximian.com>
-
- * filter-source.c (get_widget): Prevent crashing while we work
- this out.
-
- * filter-rule.c (get_widget): Don't try to gtk_widget_grab_default
- with a widget that can't be the default. Altough it should be able
- to....
-
-2001-07-02 Sam Creasey <sammy@oh.verio.com>
-
- * filter-int.c: Added an integer type for filtering values. used
- for size.
-
- * Makefile.am (SOURCES): added filter-int.c, filter-int.h
-
- * filtertypes.xml: added a part entry for size based filters
-
-2001-07-02 Anna Marie Dirks <anna@ximian.com>
-
- * filter-rule.c (get_widget): Changed "Add criterion" button to
- have normal button relief in response to complaints of it not
- appearing clickable.
-
- * filter-filter.c: Changed "Add action" button to have normal
- button relief in response to complaints of it not appearing
- clickable.
-
-2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_editor_construct): Set the filter-rule
- dialog to be user-resizable.
-
-2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Make "Move" the default action.
-
-2001-05-08 Not Zed <NotZed@Ximian.com>
-
- * filter-rule.c: Deleted Gediminas patch.
-
-2001-05-08 Gediminas Paulauskas <menesis@delfi.lt>
-
- * filter-rule.c (xml_decode): allow "_title" in user
- rules. translate them and encode to utf8.
- (get_rule_part_widget): do not call gettext on part->title. It is
- always translated already.
-
-2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_edit): Set the default size of the dialog to
- 600x400, which seems to be a nice size that fits all the widgets
- into it.
- (rule_add): Same.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS
-
-2001-04-26 Not Zed <NotZed@Ximian.com>
-
- * filter-part.c (filter_part_xml_create): Blah blah fix for xml1
- broken utf8 encoding, and use "g" memory for all allocations.
- (filter_part_finalise): Free our data properly.
-
-2001-04-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * filter-rule.c: Pull up fix for translation of filter
- direction drop down menu from the branch.
-
-2001-04-18 Dan Winship <danw@ximian.com>
-
- * filter-colour.c, filter-datespec.c, filter-folder.c,
- filter-input.c, filter-option.c, filter-rule.c, filter-score.c,
- filter-source.c, score-rule.c (xml_decode): Plug memory leaks.
-
- * rule-context.c (rule_context_finalise): Implement. Free stuff.
-
- * filter-element.h: #include <gnome-xml/xmlmemory.h> here for xmlFree
-
- * filter-filter.c, filter-part.c: Remove xmlmemory.h #include
-
-2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: s/Is/is/ and s/Is Not/is not/ to be more
- consistant with the rest.
-
-2001-04-13 Jon Trowbridge <trow@gnu.org>
-
- * filtertypes.xml: Add XML specs for source account filtering.
-
- * filter-element.c (filter_element_new_type_name): Recognize
- type "source", construct a FilterSource.
-
- * filter-source.c: Added. A FilterElement for the account e-mail
- comes from.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * filter-editor.c: Fix headers.
- * filter-filter.c: Same here.
- * filter-option.c: Same here.
- * filter-part.c: Same here.
- * filter-rule.c: Same here.
- * rule-editor.c: Same here.
- * score-editor.c: Same here.
- * vfolder-editor.c: Same here.
- * vfolder-rule.c: Same here.
-
-2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-filter.c (option_activate): Set the newpart on the
- container object.
- (less_parts): Remove the rule tht the user wants to remove.
- (attach_rule): Attach a new rule and it's remove button to the end
- of the table.
- (more_parts): Fix to resize the table and such.
- (get_widget): Don't have a remove action button, we are putting
- this next to the rule part now.
-
-2001-03-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * *.*: Fix headers. Remove unneccesary ones and replace
- with more finegrained ones where needed.
-
-2001-03-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-datespec.c (validate): Oops, an unspecified date is '0',
- not -1.
-
-2001-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-context.c (new_rule_clicked): Validate the rule before
- closing.
-
-2001-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * rule-editor.c (rule_edit): Set the editor dialog modal rather
- than setting the filter dialog insensitive. Also ref re->edit
- since we unref it when the editor closes. This should fix bug
- #1905.
- (edit_editor_clicked): No need to set the filter dialog sensitive
- again.
- (rule_add): Set the add-rule dialog modal and don't set the filter
- dialog insensitive.
- (add_editor_clicked): No need to set the filter dialog sensitive
- again.
-
-2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-option.c (build_code): Since we are now using
- filter-option widgets in place of system-flag, we do not need a
- "code" part so if there isn't a code part, don't build it.
- (clone): Updated to allow NULL code parts.
-
-2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-element.c (filter_element_new_type_name): If the filter
- type is a "system-flag", use the optionlist type as type
- system-flag has been removed. This should allow backward
- compatability.
-
- * filter-editor.c (filter_editor_construct): Remove the menu that
- is in the glade file because we want to replace it with our menu,
- not append items to that menu.
-
- * filtertypes.xml: Oops, missed the system-flag action-set.
-
- * vfoldertypes.xml: Update "status" ruleset.
-
-2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Removed filter-url.[c,h] and
- filter-system-flag.[c,h]
-
- * filter-element.c (filter_element_new_type_name): Removed
- references to the url-type and system-flag types.
-
- * filtertypes.xml: Removed "source" type and fixed "status" to use
- the optionmenu.
-
- * filter-url.[c,h]: Removed.
-
- * filter-system-flag.[c,h]: Removed (just use optionmenu).
-
-2001-03-15 Not Zed <NotZed@Ximian.com>
-
- * filter.glade: Changed the edit_filter to be a standalone window
- rather than a widget, so we can get the rule editor part out
- separately. Same for vfolder editor, and new score, and basic rule
- editors.
-
- * score-editor.c (score_editor_new): Turned back on object
- stuff, subclass rule-editor, and removed most of the code.
-
- * filter-editor.c (filter_editor_new): Turned into an object,
- subclass rule-editor, removed most of the code. Now we accept the
- source list during create, and plug that into the glade.
-
- * vfolder-editor.c (vfolder_editor_new): Turned back on object
- stuff, subclass rule-editor, and removed most of the code.
-
- * Makefile.am (libfilter_la_SOURCES): Added rule-editor.[ch].
-
- * filter-filter.c (validate): inherit the validate function and
- also validate the actions part of a filterfilter.
-
- * filter-rule.c (filter_rule_validate): New method so that filter
- rules can validate themselves.
- (validate): Default implementation, validates base rules.
-
- * rule-editor.h: New generic rule editor, to be used for filter
- editor/vfolder editor/score editor/saved searches editor.
-
-2001-03-15 Gediminas Paulauskas <menesis@delfi.lt>
-
- * filter-system-flag.c: translate status flag title.
-
-2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * filtertypes.xml: Added an "Attachments" filter option where you
- can filter messages that have (or do not have) attachments. This
- does not allow you to filter based on the types of the
- attachments.
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * vfolder-editor.c (double_click): Make sure we have something
- selected first ;-)
-
- * filter-editor.c (double_click): And here too.
-
-2001-03-03 Not Zed <NotZed@Ximian.com>
-
- * filter.glade: Added option menu to vfolder editor.
-
-2001-03-02 Not Zed <NotZed@Ximian.com>
-
- * vfolder-rule.c (get_widget): Setup the data on the base source
- opiton menu, and make hte option menu reflect the source.
- (select_source_with): Set the source type for this
- rule. e.g. these folders, "with ..."
-
- * filter-editor.c: Removed the N_() stuff from the source_names
- array, they must not be internationalised!!!
-
-2001-02-28 Not Zed <NotZed@Ximian.com>
-
- * filter-rule.c (filter_rule_clone): New function to clone rules.
-
-2001-02-23 Not Zed <NotZed@Ximian.com>
-
- * filtertypes.xml: Added mailing list matching rules.
- renamed mailing list options to be more meaningful.
-
- * vfoldertypes.xml: Added mailing list rules.
- renamed mailing list options to be more meaningful.
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- * filter.glade.h: removed.
- * filter.glade: do not donnt output to above one.
- * Makefile.am: do not include filter.glade.h in EXTRA_DIST.
-
-2001-02-06 Dan Winship <danw@ximian.com>
-
- * filter-option.c (get_widget): Translate the option title.
- (Noticed by Kjartan).
-
-2001-02-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * filter-code.c, filter-colour.c, filter-context.c,
- filter-element.c, filter-input.c, filter-score.c,
- filter-system-flag.c, filter-url.c: Add #include <config.h>
- and mark some strings for translation.
-
-2001-01-22 Not Zed <NotZed@Ximian.com>
-
- * filter-message-search.[ch]: Removed, now lives in
- camel-filter-search.*
-
- * Makefile.am (libfilter_la_SOURCES): Removed filter-driver.[ch]
- and filter-message-search.[ch].
-
- * filter-driver.[ch]: Removed. now lives in camel-filter-driver.*
-
-2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-driver.c (filter_driver_filter_message): Set the delete
- bit *before* copying to the default folder.
-
-2001-01-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-filter.c (less_parts): Er, don't set the button
- insensitive if there is *1* action, set it insensitive if there
- are less than or equal to *1* actions. Doh!
- (more_parts): Only set the remove button sensitive if there is
- more than 1 action.
- (get_widget): Here too.
-
-2001-01-16 Jason Leach <jasonleach@usa.net>
-
- * e-search-bar.[ch]: Moved ESearchBar to $(toplevel)/widgets/misc,
- a more appropriate home. Bug #1060.
-
-2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * filter-driver.c (do_copy): Moved p->copied to the inner part of
- the loop so that in the case of a folder not existing, it doesn't
- think that the message was already copied to some place and thus
- not save it to the Inbox.
- (do_move): Same.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Changed Priority to Score.
-
- * filter-option.c (get_widget): Attach to the "activate" signal -
- this should now make it so that a filter-option will "remember"
- what a user changed.
-
- * filter-system-flag.c (get_widget): Don't reset fsf->value to the
- first system flag, this should already be defaulted to the
- appropriate flag. This should fix the problem of always defaulting
- to the first menu option and thus "forgetting" the user's settings.
-
-2001-01-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-system-flag.c: comment out some of the system flags as we
- don't want to use them.
- (xml_encode): Update the printf
- (get_widget): Use strcmp instead of g_strcasecmp.
-
-2001-01-02 Lauris Kaplinski <lauris@helixcode.com>
-
- * filter-input.c (xml_encode): Encode utf8
- (xml_decode): Decode utf8
-
- * filter-option.c (xml_create): Decode utf8
-
- * filter-part.c (filter_part_xml_create): Decode utf8
-
- * filter_rule.c (xml_encode): Encode utf8
- (xml_decode): Decode utf8
-
-2001-01-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (do_flag): Set the 'dirty' flag - this should
- fix the problem of flags not being set (or, more precisely,
- synced).
- (filter_driver_filter_message): Here too.
-
-2000-12-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-message-search.c (header_contains): Use
- e_utf8_strstrcase() instead of just strstr().
- (header_starts_with): Make sure that the header contents are
- longer than the starts-with string.
-
- * vfoldertypes.xml: Don't send \"Subject\" to body-contains.
- Also added matches, starts-with, and ends-with xml stuff.
-
-2000-12-28 Dan Winship <danw@helixcode.com>
-
- * filter-message-search.c (handle_multipart, body_contains,
- body_regex): Use CamelContentType rather than GMimeContentField.
-
-2000-12-24 Not Zed <NotZed@HelixCode.com>
-
- * Merge from camel-mt-branch.
-
-2000-12-21 Not Zed <NotZed@HelixCode.com>
-
- * filter-message-search.c (filter_message_search): And here too.
-
- * filter-driver.c (filter_driver_finalise): Kind of revert an
- accidentally commited patch for e_sexp_unref.
-
-2000-12-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_message): Oops, slight
- logic error. We want to copy the message to the default folder if
- the message hasn't been Moved (which is the same as Copied &&
- Deleted). This fixes bug #1007.
-
- * filter-rule.c (more_parts): Make sure we have more than 1 part
- before we sensitize the "remove" button.
-
-2000-12-20 Not Zed <NotZed@HelixCode.com>
-
- * filter-message-search.c (filter_message_search): Oops, missed a
- gtk unref of the now-no-longer gtk e_sexp.
-
- * filter-driver.c: Remove mail_tool_lock stuff.
- (filter_driver_finalise): unref e_sexp properly.
-
-2000-12-12 Christopher James Lahey <clahey@helixcode.com>
-
- * e-search-bar.c (esb_pack_menubar): Fixed some warnings.
-
-2000-12-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-folder.c (button_clicked): Added a kludge, 'is_active'
- which is a static variable that holds whether or not there is an
- active shell folder dialog up or not.
-
- * vfolder-editor.c (rule_delete): Autoselect the rule that ends up
- in the same position (or the one above it if the list is shorter
- than the position).
-
-2000-12-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-rule.c (get_widget): Don't highlight the title if it's
- "Untitled" because switching widget focus doesn't cause this
- selection to go away.
-
-2000-12-06 Kjartan Maraas <kmaraas@gnome.org>
-
- * filter-editor.c: Mark some strings for translation.
-
-2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-element.c (filter_element_new_type_name): Added support
- for the system-flag type.
-
- * Makefile.am: Added filter-system-flag.[c,h].
-
- * filter-system-flag.[c,h]: New type for system flags.
-
- * filtertypes.xml: Oops, looks like we were still using integers
- as arguments to set-flag. Change over to using strings which are
- safer and also change the name to set-system-flag.
-
- * filter-driver.c (do_flag): Use strings instead of integers.
- Instead of set-flag, the callback is now set-system-flag for less
- confusion. Sorry Ettore, but you'll have to change your filters.
-
- * filtertypes.xml: Added system-flags stuff.
-
- * vfoldertypes.xml: And here too.
-
- * filter-message-search.c (system_flag): New ESExp callback for
- filtering on system flags.
-
-2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_message): Use
- camel_message_info_free() instead of freeing everything by hand -
- is this a new function? I don't ever recall seeing this
- before. Also use my new function,
- camel_message_info_new_from_header - ahhh... this code is now so
- beatiful. Okay, I'm done.
-
-2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_message): Update to use
- EStrv in appropriate places (wrapped with #ifdef DOESTRV for the
- moment).
-
-2000-11-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Moved the regex filter rule around - we've
- changed the format a bit.
-
- * filter-option.c (option_activate): Removed.
- (get_widget): Don't connect the activate signal.
-
- * filter-folder.c (validate): Updated.
-
- * filter-datespec.c (validate): Updated.
-
- * filter-part.c (filter_part_validate): Updated.
-
- * filter-input.c (validate): Check the filter-input type - if it's
- of type "regex", then check for regex validity.
-
- * filter-element.c (filter_element_validate): No longer takes a
- gpointer argument.
- (filter_element_new_type_name): Allow type "regex" and create a
- new filter-input with type "regex".
-
-2000-11-24 Michael Meeks <michael@helixcode.com>
-
- * filter-message-search.c (get_full_header): impl.
- (header_full_regex): use it.
-
-2000-11-23 Michael Meeks <michael@helixcode.com>
-
- * filter-message-search.c (header_full_regex): impl.
-
-2000-11-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-message-search.c: took out some no longer needed
- printfs.
-
-2000-11-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_folder): Sync here
- instead.
- (filter_driver_filter_mbox): And here too.
- (filter_driver_finalise): Don't sync here afterall - it's more
- preferable to sync right after processing.
-
-2000-11-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_finalise): Sync the
- defaultfolder.
- (filter_driver_filter_folder): Sync here instead.
- (filter_driver_filter_mbox): And here too.
-
-2000-11-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-message-search.c (header_matches): Neglect any leading
- whitespace in the header contents.
- (header_starts_with): Same.
- (header_ends_with): Same.
- (header_soundex): Same.
-
-2000-11-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_message): If there is a
- default folder and the message hasn't been deleted then... should
- be: If there is a default folder and the message hasn't been
- copied to another folder and the message hasn't been deleted...
- (filter_driver_filter_message): Make it so that the FILTER_LOG_END
- is only called if filtered were applied to the message so we don't
- get huge gaps of whitespace in the log file.
- (filter_driver_filter_message):
-
-2000-11-10 Christopher James Lahey <clahey@helixcode.com>
-
- * e-search-bar.c: Made the underline show up properly in the main
- menu bar.
-
-2000-11-10 Christopher James Lahey <clahey@helixcode.com>
-
- * e-search-bar.c: Switched from using gtk_menu_item_new_with_label
- for the menu header to using gnome_stock_menu_item.
-
-2000-11-08 Anna Marie Dirks <anna@helixcode.com>
- * e-search-bar.c: Fixed two spacing problems: first, changed
- the spacing around the end of the text-entry widget so that
- the text entry is always aligned with the beginning of the scrollbar;
- second, trimmed down the space between the widgets in the search bar.
-
-
-2000-11-06 Not Zed <NotZed@HelixCode.com>
-
- * filter-driver.c (do_flag): you shouldn't use an integer to
- set the flag. You should use a string, and look it up, because
- the flag bits might change.
- (filter_driver_filter_message): Can som e one PLEASE STOP
- INDENTING THE CODE. Even if i have to come over the and
- beat it into you. YOU DONT INDENT CODE ONCE ITS BEEN CHECKED IN
- TO CVS, otherwise you SCREW UP THE DIFF's. Can't you please
- please learn this?
- (filter_driver_log): Fixes for api changes to mime_message.
-
-2000-11-05 Not Zed <NotZed@HelixCode.com>
-
- * filter-message-search.c (get_sent_date): Fix for date change
- api. No longer need to encode/decode the date, after its been
- encoded/ecoded already.
- (get_received_date): Likewise.
-
-2000-11-06 Christopher James Lahey <clahey@helixcode.com>
-
- * e-search-bar.h: Fixed the argument comment. Removed an old enum
- that's not used here.
-
-2000-11-06 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added e-search-bar.c and e-search-bar.h.
-
- * e-search-bar.c, e-search-bar.h: Moved this from
- e-addressbook-search.
-
-2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_log): Fix for when 'desc' is
- NULL.
- (filter_driver_filter_message): Use a more user-friendly filter
- name in the log file.
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_message): Use
- filter_driver_log() where appropriate.
- (do_copy): Use the service url for the path rather than the
- folder->full_name because that'll only get you a "/mbox" which is
- entirely useless. Replace occurences of report_status with
- filter_driver_log.
- (do_move): Same.
- (report_status): Don't use this for logging anymore, use only for
- reporting the status back to the caller.
- (filter_driver_log): Renamed from filter_driver_status_log. Now
- ONLY handles file logging and is for INTERNAL USE ONLY.
- (do_flag): Replace occurences of report_status with
- filter_driver_log.
- (do_score): Same.
- (do_colour): Same.
- (do_stop): Same.
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-datespec.c (validate): Check to make sure the user has
- entered a valid date.
-
-2000-10-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Updated to allow the user to select "sounds
- like" or "does not sound like" (uses header-soundex).
-
- * filter-message-search.c (header_matches): Oops. Should be using
- !g_strncasecmp. This should fix it so this filter match works
- right.
- (header_starts_with): Same.
- (header_ends_with): Same.
- (header_soundex): New filter callback for soundex matching (yes,
- it's probably a bloated feature but hey, it was fun to code)
-
-2000-10-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-folder.c (validate): Override the default validate
- function to only return TRUE if a folder has been selected.
-
- * filter-editor.c (rule_add): Validate that all the rule parts and
- action parts are correctly filled in.
- (rule_edit): Same.
-
-2000-10-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Updated to add an action to set message flags.
-
- * filter-driver.c (do_flag): New callback to set message info
- flags.
-
- * filter-element.c (filter_element_set_data): New convenience
- function to set the data on a FilterElement.
-
- * filter-url.c (get_widget): Set the sources list to point to the
- FilterElement data.
-
-2000-10-31 Federico Mena Quintero <federico@helixcode.com>
-
- * filter-rule.c (get_widget): Do not pad around the Name hbox;
- its parent already has spacing.
- Do not pad around the inframe's children; the inframe already has
- spacing.
-
-2000-10-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-option.c (option_activate): If a regex option is
- selected, change the FilterElement data to TRUE else set to FALSE.
-
- * filter-rule.c (more_parts): Validate the previously entered
- FilterPart before allowing the user to add a new FilterPart.
-
- * filter-part.c (filter_part_validate): New convenience function
- to validate an entire FilterPart expression.
-
- * filter-input.c (validate): Validate the entry text if it
- contains a regular expression.
-
- * filter-element.[c,h]: New virtual function to validate the
- contents of the FilterElement (useful for regex and sexp).
- (filter_element_validate): You get the idea...
-
-2000-10-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-input.c:
- * filter-option.c:
- * filter-part.c: Pure formatting changes, no actual code
- changes. Since I know I'm going to get flamed for this, I'm sorry
- but I'll probably have to modify code in these files and it's
- easier if the code is quickly readable by me.
-
- * filter-rule.c (get_widget): Set the "remove" button insensitive
- for <= 1 instead of == 1.
-
-2000-10-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_message): Copy the message
- to the default folder if it wasn't marked as deleted.
-
-2000-10-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Added header-starts-with, header-ends-with, and
- header-exists menu items.
-
- * filter-message-search.c (header_starts_with): New callback to
- match the beginnings of headers.
- (header_ends_with): New callback to match the ends of headers.
- (header_exists): New callback to determine if a header exists
- which is useful when filtering out all those pesky bug-buddy
- emails!
-
-2000-10-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Add header-matches expressions ("is" / "is not").
-
- * filter-message-search.c (header_matches): New callback to match
- headers exactly (aka strcmp rather than strstr).
-
-2000-10-27 Jacob "Ulysses" Berkman <jacob@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_mbox): divide before
- multiple so that we don't overflow.
-
-2000-10-27 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Fixed this to include EXTRA_GNOME_CFLAGS.
-
-2000-10-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (do_move): Don't mark as deleted here, otherwise
- the message will have the DELETED flag set in the folder it's
- being moved to.
- (do_delete): Don't set the DELETED flag here either...we'll only
- set it at the very end of the filtering process.
- (filter_driver_filter_message): Set the DELETED flag after all
- processing is completed.
-
-2000-10-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Readded Source url stuff.
-
- * filter-element.c (filter_element_new_type_name): Added url stuff
- back in.
-
- * filter-url.[c,h]: Back from the dead...
-
- * Makefile.am: Re-added filter-url.[c,h].
-
-2000-10-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Added option menu items to allow searching
- based on regular expressions.
-
- * filter-message-search.c (body_regex): New callback to match text
- in the body using regex.
- (body_contains): Modified to only match using strstr.
- (header_regex): New callback to match headers using regex.
- (header_contains): Modified to only match using strstr.
-
-2000-10-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Take out the reference to "Source".
-
- * filter-element.c (filter_element_new_type_name): Remove
- filter-url code.
-
- * filter-url.[c,h]: What was I smoking? There's no good reason to
- filter on source urls as there are other ways to get the same
- effect. Thanks to both Zucchi and Miguel for helping me see this
- :-)
-
-2000-10-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c: Fixed NULL in fprintf.
-
-2000-10-24 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (libfilter-i18n.h): Build a fake header file with
- the titles from the xml files, for translation purposes.
-
- * filter-rule.c (get_rule_part_widget): Call _() on the rule's
- title.
-
- * filter-option.c (get_widget): Call _() on the option's title.
-
- * filter.glade: Turn on translatable strings.
-
- * libfilter-i18n.h, filter.glade.h: Translatable string files.
-
- * add #include <config.h> to a bunch of C files so that _()
- actually does anything. Undo some UTF8 frobs since we're now
- dealing in localized strings.
-
-2000-10-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-filter.c (less_parts): Set the remove button insensitive
- if there is only 1 action left.
- (more_parts): Set the remove button sensitive (since we now have 2
- or more actions).
- (get_widget): If there is only 1 action, disable the remove
- button.
-
- * filter-rule.c (xml_encode): If there is a defined source, don't
- set it to "incoming", set it to whatever the source is!
- (less_parts): Set the remove button insensitive if there is only 1
- criterion left.
- (more_parts): Set the remove button sensitive (since we now have 2
- or more criterion).
- (get_widget): If there is no name for the filter then set it to
- "Untitled", highlight it, and grab the focus. If there is only 1
- criterion, disable the remove button.
-
- * filter-editor.c, vfolder-editor.c: GUI fixes here and there as
- well as some consistancy fixes between them.
-
- * filter-driver.c (filter_driver_filter_mbox): Updated to send the
- source url to filter_driver_filter_message()
- (filter_driver_filter_folder): Updated to send the source url of
- the folder to filter_driver_filter_message()
- (filter_driver_filter_message): Now takes a source_url argument
- that represents the url of the folder the message is coming from
- (so that we may filter based upon that information).
-
-2000-10-23 Christopher James Lahey <clahey@helixcode.com>
-
- * filter.glade: Fixed these widgets to resize properly.
-
-2000-10-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-editor.c: Remove the "demand" source from the list.
-
- * filter.glade: Remove the "On Demand" option and replace it with
- an "Outgoing" option.
-
-2000-10-23 Christopher James Lahey <clahey@helixcode.com>
-
- * filter-editor.c, filter-filter.c, filter-folder.c,
- filter-part.c, filter-rule.c, rule-context.c, score-editor.c,
- vfolder-editor.c: Fixed these widgets to resize properly.
-
-2000-10-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * Makefile.am: Added filter-url.[c,h].
-
- * filter-message-search.c (get_source): New callback to get the
- source url of the message being filtered.
- (filter_message_search): Now takes a source argument.
-
- * filter-element.c (filter_element_new_type_name): Added code to
- handle URL types.
-
- * filter-url.[c,h]: New filter object to handle URLs (ie in the
- case of filtering on source url). FIXME: find a way to populate
- the source combo box (including mail-config.h breaks the build in
- the addressbook - how does including mail-tools.h not break the
- build???)
-
- * filtertypes.xml: Added the source filter type and added the
- move-to action.
-
- * filter-driver.c (do_move): New callback, a "Copy" action should
- just copy the message to another location while a Move should both
- copy the message to a new location and delete it from the source
- location.
- (do_delete): Set the deleted flag on the message info.
- (filter_driver_filter_message): Now returns void as we don't care
- if it was copied or not in the caller functions. Also check the
- CamelMessageInfo being passed in - if the message has been marked
- as deleted prior to being filtered, then return immediately as we
- don't want to apply filter actions to deleted messages.
-
-2000-10-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_filter_folder): Start fetching at
- 1, not 0.
-
-2000-10-11 Not Zed <NotZed@HelixCode.com>
-
- * filter-driver.c (filter_driver_filter_mbox): Report the
- percentage of file complete for the filter.
-
-2000-10-10 Not Zed <NotZed@HelixCode.com>
-
- * filter-driver.c (filter_driver_run): Why on earth does this code
- ref all these objects for? This is not right at all.
- (filter_driver_run): Changed source type to a string.
- (filter_driver_run): REmove the very weird exception copying
- stuff - just ref it instead.
- (do_score):
- (do_colour):
- (do_stop):
- (do_copy):
- (mark_forward):
- (do_delete): Removed bogus 'terminated' testing. This is NOT
- NEEDED HERE. It is tested after every rule/action, and
- termination only makes sense at that point.
- (filter_driver_filter_message): new funciton (renamed), filter
- only a message.
- (filter_driver_filter_mbox): Filter a whole mbox.
- (filter_driver_run): If we aren't given an info, create a simple
- one based on the message headers.
- (filter_driver_filter_message): Renamed from filter_driver_run().
- (filter_driver_set_status_func): Set the status callback function.
- (filter_driver_set_default_folder): Set the default folder for
- filtering.
- (report_status): Internal function to report the status of a given
- event.
- (do_copy): Removed a pointless cache lookup - duh, we do it in
- open_folder anyway (infact, we do it in camel too!!).
- (filter_driver_filter_message): Removed pointless re-refing of
- arguments. Why would anyone think this could be any use at all?
- (filter_driver_filter_folder): New function to filter a whole
- folder.
-
- * filter-editor.c (rule_add): api fixes.
- (rule_edit):
- (rule_up):
- (rule_down):
- (set_sensitive): This didn't take into account the source, now it
- does.
- (select_source): Fix for api changes. Changed the rather generic
- 'number' argument to be 'source', and a string.
- (filter_editor_construct): Changed the 'number' to 'source', and
- set the string appropriately. Added a warning for one case where
- the glade file is out of sync.
-
- * score-editor.c (score_editor_construct):
- (rule_edit):
- (rule_delete):
- (rule_up):
- (rule_down):
- (set_sensitive): api fixes.
-
- * vfolder-editor.c (set_sensitive): Api fixes.
- (vfolder_editor_construct):
- (rule_edit):
- (vfolder_editor_construct):
-
- * rule-context.h (RCNextRuleFunc): Added a source argument.
-
- * rule-context.c (rule_context_next_rule): Added source argument.
- (rule_context_find_rule): Added source argument.
- (rule_context_get_rank_rule): Added source argument.
- (rule_context_get_rank_rule_with_source): Removed.
- (save): Fixed for changes to RCNextRuleFunc prototype.
-
- * filter-rule.h: Changed the source to be a string, removed the
- filter_source_t type.
-
- * filter-rule.c (filter_rule_set_source): New function to set the
- source of a rule. What idiot ran this code through indent?
- (filter_rule_find_list): Added a source argument.
- (filter_rule_next_list): Added a source argument.
- (get_widget): Fixed the wording. You dont remove search parts,
- you can only remove the last one. Why you even need to mention
- they are search 'criteria' is beyond me. Whoever added the
- scrolled window needs to be shot, its the single most awful GUI
- feature ever invented (ranks with the close button next to
- maximise).
- (xml_encode): Save source as a string (if present).
- (xml_decode): Likewise for loading & fixed a small memleak.
- (filter_rule_finalise): Free source.
-
-2000-10-06 Not Zed <NotZed@HelixCode.com>
-
- * rule-context.c (load): Remove the stupid on-demand cb shit.
- (rule_context_load): And here too.
-
-2000-09-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Now takes an argument to
- specify the log file (or NULL if logging is not to be performed).
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (gladedir, filterdir): Use $(datadir), not
- $(prefix)/share.
-
-2000-09-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Modified to use more intuitive naming
-
- * score-rule.c (xml_decode): Make sure the score is within our
- range
- (get_widget): Changed range to -3 to +3
-
- * filter-score.c (get_widget): Changed range to -3 to +3
- (xml_decode): Make sure the score is within our range
-
- * filter-rule.c (get_widget): Rearranged widgets.
-
- * filter-filter.c (get_widget): Rearranged widgets.
-
- * filter-editor.c (filter_editor_construct): Updated to allow for
- double-clicking on a rule to edit it.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * filter-editor.c, filter-filter.c, filter-folder.c,
- filter-input.c, filter-message-search.c, filter-option.c,
- filter-rule.c, score-editor.c, vfolder-editor.c, vfolder-rule.c:
- Fixed the #include lines to deal properly with gal.
-
-2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-message-search.c (body_contains): Modified to only match
- text MIME parts in the message rather than the entire MIME message
- (header_contains): Added regex matching
-
-2000-09-12 Dan Winship <danw@helixcode.com>
-
- * rule-context.c (d):
- * filter-datespec.c (d): Turn off debugging output.
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c: We now use a "copied" variable to record
- whether a message was marked as copied or not instead of trying to
- "guess" by looking at the folders hash table as that won't work at
- all anymore.
- (do_copy): Renamed as this is more appropriate now that it
- actually copies the message rather than marking it for copying
- later. Also fixed a logic error which prevented a message from
- being dumped into a folder if the fodler had been previously
- opened.
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): No longer takes a
- self_destruct argument.
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Don't freeze/thaw the
- default inbox here, let the caller freeze/thaw it. Don't destroy
- the folders hash table here, it's faster if we wait till the
- filter-driver is destroyed.
- (filter_driver_finalise): Destroy the folders hash table here
- (filter_driver_init): Initialize the folders hash table here
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Changed "Header" to be "Message header" so it's
- not quite as confusing (??)
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Updated to allow the user to specify arbitrary
- headers.
-
-2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Fixed a logic error. Only
- mark filtered as TRUE if it was successfully copied to another
- folder, this means don't mark true if the default inbox is NULL.
-
-2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Erm, okay I misunderstood
- what camel_folder_[un]hook_event() did - we don't even need this
- crap in the filter driver so lets take it completely out and let
- the caller handle this junk.
-
-2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Updated to not emit the
- folder_changed signal when a message is appended to the default
- mailbox - lets leave that up to the caller so we don't queue up a
- bunch of these emits if the caller is downloading messages for
- example.
-
-2000-09-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filtertypes.xml: Added scoring xml stuffs
-
- * Makefile.am: added filter-score.[c,h]
-
- * filter-score.[c,h]: New functions to handle the "score" filter
- type.
-
- * filter-element.c (filter_element_new_type_name): Added support
- for "score" type.
-
- * filter-driver.c (do_score): New ESExp callback for filter
- actions to set the score on a message.
-
- * filter-message-search.c (get_score): New ESExp callback for
- getting the score tag as an integer value.
-
-2000-09-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Now takes a
- CamelMessageInfo argument in preparation for handling scoring
-
-2000-09-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Modified to return a
- boolean value specifying whether or not the message was filtered
- into a folder other than the default. The default mailbox can now
- also be specified as NULL if the message shouldn't be appended to
- it in the case that it's not filtered into some other folder.
-
-2000-09-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Rewrote - this shouldn't
- need to be an async function
-
- * filter-message-search.c (match_all): Modified to look at the
- boolean value being fed to it and just to return that instead of
- always returning TRUE
-
-2000-09-07 Lauris Kaplinski <lauris@helixcode.com>
-
- * filter-editor.c, filter-filter.c, filter-folder.c, filter-option.c:
- * filter-rule.c, score-editor.c, vfolder-editor.c, vfolder-rule.c:
- More UTF-8 wrapping
-
-2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Totally rewritten to filter
- a single message at a time instead of filtering a folder.
-
- * filter-message-search.c (filter_message_search): New convenience
- function for searching a message.
-
-2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
-
- * filter-folder.c: Use e_utf8 wrappers
-
- * filter-input.c: Use e_utf8 wrappers
-
- * filter-rule.c: Use e_utf8 wrappers
-
-2000-08-23 Dan Winship <danw@helixcode.com>
-
- * filter-datespec.c (cal_day_selected): Set seltime.tm_isdst to
- -1, not daylight, because the current dst value is not relevant to
- the selected date.
-
-2000-08-18 Peter Williams <peterw@helixcode.com>
-
- * filter-driver.c (do_filter_mail): Unlink a new parameter, path_to_unlink,
- if it is empty once the mail is filtered. Fixes a race in
- mail_tool_filter_contents_into.
-
- * filter-driver.h: Update the prototype.
-
-2000-08-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * vfolder-editor.c (rule_add): Add translation marks and use stock
- buttons.
- (rule_edit): Likewise.
-
- * score-editor.c (rule_add): Add translation marks and use stock
- buttons.
- (rule_edit): Likewise.
-
- * rule-context.c (rule_context_add_rule_gui): Add translation
- marks and use stock buttons.
-
- * filter-part.c (main): Add translation marks and use
- stock buttons.
-
- * filter-folder.c (button_clicked): Add translation marks and use
- stock buttons.
-
- * filter-editor.c (rule_add): Add translation marks and use stock
- buttons.
- (rule_edit): Likewise.
-
- * filter-rule.c (get_widget): Add translation marks.
-
- * filter-filter.c (get_widget): Add translation marks. Add
- padding to make it look like the buttons in `filter-rule.c'.
-
-2000-08-17 Peter Williams <peterw@helixcode.com>
-
- Implement filtering on demand.
-
- * rule-context.h: Add a new callback to rule_context_load
- that allows the caller to hook on-demand rules into its UI.
-
- * rule-context.c (rule_context_load): Changed to pass the
- extra parameters to load().
- (load): If the rule is successfully loaded, call the provided
- callback so that the UI can be updated.
-
- * filter-editor.c (rule_add): Set the source of the new filter.
- (rule_edit): Use the new rule_context_get_rank_rule_with_source()
- so that we don't get a bad index into the GtkList.
- (rule_delete): Same as above.
- (rule_up): Same as above.
- (rule_down): Same as above.
- (select_source): New function. When the user changes the
- dropdown list to select a new source type, repopulate the
- list with rules of the appropriate type.
- (filter_editor_construct): Code moved from here into
- select_source(). Hook up all the elements of the source optionmenu
- to callbacks to select_source().
-
- * filter-rule.c (xml_encode): Save the rule's source type.
- (xml_decode): Load it. Default to 'incoming' if unspecified.
-
- * filter-rule.h: New enumeration, _filter_source_t, the
- specifies the rule's source. Add it to struct _FilterRule.
-
- * filter-driver.c (filter_driver_run): Add a new input,
- sourcetype, that specifies which rules to run (only ones
- with the same source will be run). struct filter_mail_input_t
- changed to accomodate.
- (do_filter_mail): Skip rules if they're not the specified source.
- If source and dest are the same, don't delete the messages or
- copy unnecessarily.
-
- * filter.glade: Make the optionmenu sensitive. Change "Outgoing"
- to "On Demand" (outgoing should be added later).
-
-2000-08-15 Peter Williams <peterw@curious-george.helixcode.com>
-
- * vfoldertype.xml, filtertypes.xml: Add entries defining the
- date-based message filtering and vfoldering.
-
- * filter-datespec.{c,h}: New files implementing the UI for
- date-based filtering and vfoldering -- specifically, choosing
- what to compare the message to.
-
- * filter-element,c: Hook up to create a datespec filter if
- that's what's called for.
-
- * Makefile.am: Build the new -datespec files.
-
-2000-08-13 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (EXTRA_DIST): remove blank.xpm and check.xpm which
- no longer exist. Add filter.glade.
-
-2000-08-12 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (describe_filter_mail): Use
- mail_tool_get_folder_name here too. (Hm... this directory really
- shouldn't depend on stuff in mail/, but it already did. We'll have
- to sort this out later.)
-
-2000-08-11 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (do_filter_mail): Remove an '#if 0' that must
- have been left in accidentally, so that messages which are copied
- to other folders will not also be copied into the Inbox. Also,
- #ifdef out the line that printfs the rule, because the rules are
- often very large.
-
-2000-08-11 Not Zed <NotZed@HelixCode.com>
-
- * filter-driver.c (do_colour): Use proper accessor function
- instead of poking the structure.
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * filter-driver.c, filter-folder.c, rule-context.c,
- vfolder-editor.c: Fixed some warnings.
-
-2000-08-10 Peter Williams <peterw@helixcode.com>
-
- * filter-driver.c (do_filter_mail): Fix the infinite fetchmail.
-
-2000-08-10 Not Zed <NotZed@HelixCode.com>
-
- * filter-driver.c (filter_driver_run): Save the results of
- searches till we're done. So we dont have to go strduping strings
- agian and again and again and again ... Remove all the unecessary
- strdups.
- (do_colour): Implement.
- (filter_driver_run): Change for append api change.
- (free_key): Removed.
-
-2000-08-09 Not Zed <NotZed@HelixCode.com>
-
- * rule-context.c (rule_context_add_rule_gui): Helper function to
- add a rule, but present a gui first, asking for confirmation/allow
- editing.
- (rule_context_add_rule_gui): Keep track of context so it isn't freed under us.
-
- * filter-context.c (filter_context_create_action): Implement,
- helper to aid filter generation.
-
-2000-08-08 Peter Williams <peterw@helixcode.com>
-
- * filter-driver.c (close_folder): Fix an accidental GTK unref
- of a CamelObject.
-
-2000-08-03 Ettore Perazzoli <ettore@helixcode.com>
-
- * filter-folder.c (button_clicked): Use the base name of the
- Evoluton URI for the button's label.
- (get_widget): Likewise.
-
-2000-08-03 Peter Williams <peterw@helixcode.com>
-
- * filter-driver.c (op_filter_mail): Conform to the new mail-threads
- interface.
-
-2000-08-01 Not Zed <NotZed@HelixCode.com>
-
- * vfolder-editor.c (rule_add): Oops, create a vfolder_rule when we
- add a new one.
-
- * rule-context.c (load): If there are no user rules, dont bomb
- out.
-
-2000-07-31 Not Zed <NotZed@HelixCode.com>
-
- * filter-input.c (filter_input_set_value): Set value of a simple
- type to a new string.
-
- * filter-option.c (filter_option_set_current): New function to set
- the current value of an option.
-
- * filter-rule.c (filter_rule_find_list): New function to find a
- rule in a list, by name.
- (filter_rule_set_name): Let you set the name of a rule.
-
- * rule-context.c (rule_context_find_rule): Find a rule by name.
- (rule_context_create_part): Helper to find and clone a part by
- name.
-
- * filter-folder.c (button_clicked): Fix warning.
-
- * filter.glade: Add new widgets for vfolder rule editor.
-
- * vfolder-context.c (vfolder_context_init): Changed to use vfolder
- rule as the rule type.
-
- * vfolder-rule.c: New class to encode extra information required
- for vfolder rules.
-
-2000-07-30 Not Zed <NotZed@HelixCode.com>
-
- ** Almost a total rewrite of every file, except for filter-driver
- which just had minor updates.
-
- The rule format has changed.
-
-2000-07-24 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (do_delete, filter_driver_run): Update for
- CamelFolder API changes. (delete_message and get_uids don't take
- exceptions any more.)
-
-2000-07-21 Peter Williams <peterw@helixcode.com>
-
- * filter-driver.c (cleanup_filter_mail): Use the exception
- provided to us by the async manager instead of allocating
- our own; use mail_tool_camel_lock_{up,down} around camel
- operations.
- (filter_driver_run): Make it return void.
-
-2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c: Update to make "async".
-
-2000-07-11 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c: Update for CamelFolder API changes
-
-2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c (filter_driver_run): Updated to reflect changes to
- camel_folder_append_message ()
-
-2000-07-09 Dan Winship <danw@helixcode.com>
-
- * filter-xml.[ch]: add a "string" type
-
- * filtertype.xml, vfoldertypes.xml: Use type="string" rather than
- "folder" for subject/body matching.
-
- * filter-arg-types.c: Update some strings for "text" input. Fix
- some warnings (including one that pointed out a real bug).
-
- * filter-arg.c, filter-druid.c, filter-format.c: fix warnings
-
-2000-07-07 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c: Update for camel_folder_search_by_expression
- change (GList -> GPtrArray).
-
- * vfoldertypes.xml: sync this to filtertypes.xml (to/cc thing)
-
-2000-07-05 Dan Winship <danw@helixcode.com>
-
- * remove some non-error case debugging messages.
-
- * filtertypes.xml: Fix typos and update the "to-address" rule to
- match To or Cc.
- * vfoldertypes.xml: Fix typos.
-
- * filter-driver.c (do_delete, do_copy, do_stop,
- filter_driver_run): Add uids to the "processed" list only after
- succesfully doing something with them. Fixes the problem where
- copying a message to a folder that didn't exist would result in it
- disapearing.
-
-2000-07-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * filter-driver.c (filter_driver_new): Don't free the ruleset nor
- the xmlDoc. This will make us leak [I think], but at least
- filters work.
-
-2000-07-02 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (open_folder): freeze the folder to avoid
- multiple folder_changed's
- (close_folder): and thaw it.
-
-2000-07-02 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (filter_driver_new): kill
- filter_driver_set_session and filter_driver_set_rules and instead
- make filter_driver_new take the rules and a callback function it
- can use to turn URIs into folders.
- (open_folder): Use the callback function rather than calling camel
- directly: some URIs need special handling to turn them into stores
- and folders correctly, so let the mailer do that.
-
-2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * filter-arg-types.c (arg_folder_edit_value): Only allow type
- "mail" when selecting a folder for the filter.
-
-2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-driver.c: Updated to reflect changes made to
- camel-folder.
-
-2000-06-30 Peter Williams <peterw@curious-george.helixcode.com>
-
- * filter-xml.c (filter_load_optionset_file): Check for failure
- when loading the filter doc.
-
- * filter-driver.c (filter_driver_set_rules): Ditto.
-
- * filter-editor.c (filter_editor_set_rule_files): Ditto.
-
-2000-06-29 Ettore Perazzoli <ettore@helixcode.com>
-
- * filter-arg-types.c: Replaced `global_shell_interface' with
- `global_shell_client'.
- (arg_folder_edit_value): Use
- `evolution_shell_client_user_select_folder()'.
- (create_listener): Removed.
- (impl_FolderSelectionListener_selected): Removed, together with
- all the ::Listener stuff.
-
-2000-06-29 Arik Devens <arik@helixcode.com>
-
- * vfoldertypes.xml (ruleset type="match"): Changed Cc to CC to be
- the same as the other CC rule. None of this works however, cause
- the CC code is not hooked up to camel... oh well ;-(
-
-2000-06-29 Arik Devens <arik@helixcode.com>
-
- * vfoldertypes.xml (ruleset type="match"): Added a Cc rule to
- vfolders. Works like To except on the Cc of a message ;-)
-
-2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-arg-types.c (arg_string_edit_value): Changed "Filter name"
- to "Option value" as "Filter name" made no sense in the dialog
- (arg_address_edit_value): Same
- (arg_folder_edit_value): What do we want to return??
-
-2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * filter-xml.c (load_desc): Strdup content before assigning the
- value. Also, no need to check for NULL when g_strdup()ing as
- g_strdup() returns NULL for a NULL arg.
-
-2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (INCLUDES): `-I$(top_builddir)/shell' so that it
- works with builddir != srcdir. [We need to #include
- "Evolution.h".]
-
-2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
-
- * Makefile.am (INCLUDES): Add the shell dir for includes (for
- corba interfaces).
-
- * filter-arg-types.c (impl_FolderSelectionListener_selected):
- Listener for folder query. Sigh.
- (create_listener): Create the listener object for the folder
- dialogue query. Uses a global for linkage to the shell object,
- via the mail component.
- (arg_folder_edit_value): Call the folder selection dialogue to
- edit the value, rather than a simple text widget.
-
-2000-06-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * filter-editor.c: Added a #include <gnome-xml/parser.h> as this
- was needed (since we used the xml parser...)
- (druid_dialogue_clicked): Do we want to use struct filter_option
- or do we instead want to use struct filter_optionrule as we had before?
- Since the function we pass the data to expects filter_option, I suspect
- that that is what we want.
-
- * filter-format.h (filter_description_html_write): Renamed from
- description_html_write in order to match function name in
- filter-format.c
-
- * filter-druid.c (option_name_changed): Fixed a memory leak (Free'd
- a filter description list).
-
- * filter-arg-types.c (arg_folder_edit_values): Free'd GList data in
- argin->values.
-
- * filter-driver.c (filter_driver_set_rules): Added code to free an
- xmlDoc and some other data.
-
- * filter-arg.h: Add prototypes for filter_arg_write_html() and
- filter_arg_write_text();
-
- * filter-arg-types.c: Lets see if we can't get rid of some of these
- warnings... (use some casts to make warnings go away)
- (arg_address_edit_value): Lets make sure that ad exists before looking
- at member data.
-
-2000-06-16 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (do_delete, filter_driver_run): Update for Camel
- flag handling changes.
-
-2000-06-15 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (open_folder, close_folder): Update for
- CamelFolder changes.
-
-2000-06-09 Jacob Berkman <jacob@helixcode.com>
-
- * filter-editor.c (add_or_edit): use stock pixmap buttons
-
- * filter-druid.c (build_druid): remove the border on the notebook,
- put the html widget in a scroll frame, and add some padding
-
-2000-06-06 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (open_folder): Update for folder
- existence/creation changes.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * filter-driver.c: Free the exception and the priv struct.
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * filter-arg-types.c (arg_address_edit_value): Search for ad in
- arg->values instead of text since it's a list of
- filter_arg_adresses. Also, free the old value in the list.
-
-2000-05-30 Not Zed <NotZed@HelixCode.com>
-
- * filtertypes.xml: And here too.
-
- * vfoldertypes.xml: Add body-contains and not-body-contains
- types.
-
-2000-05-27 Not Zed <NotZed@HelixCode.com>
-
- * vfoldertypes.xml: New file - lists rules appropriate for
- vfolders (no actions, etc).
-
- * Makefile.am (EXTRA_DIST): Add vfoldertypes.xml
-
- * filter-driver.c (filter_driver_expand_option): Made public from
- expand_filter_option.
- (filter_driver_rule_count): find out how many user rules are
- defined.
- (filter_driver_rule_get): Get a user rule by index.
-
-2000-05-21 Ettore Perazzoli <ettore@helixcode.com>
-
- * filter-druid.c: Don't pass an empty URL to `gtk_html_begin()'
- anymore.
-
- * filter-arg-types.c: Updated for the new GtkHTML API which uses
- `GtkHTMLStream *' instead of `GtkHTMLStreamHandle'.
- * filter-arg.c: Likewise.
- * filter-arg.h: Likewise.
- * filter-druid.c: Likewise.
-
- * filter-format.c: Likewise.
- * filter-format.h: Likewise.
-
-2000-05-18 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (filter_driver_run): update for
- camel_folder_get_uids change
-
-2000-05-17 NotZed <NotZed@HelixCode.com>
-
- * filter-druid.c: Fix some html formatting.
-
-2000-05-16 NotZed <NotZed@HelixCode.com>
-
- * filter-driver.c (filter_driver_run): Delete all processed
- messages. This is probably going to slow it down a bit.
- (filter_driver_run): Close folders before destroying them *sigh*.
- (open_folder): Actually open the folder. Doh.
-
- * filtertypes.xml: Initial filter rules.
-
- * filter-xml.c (filter_write_optionset): Save the description
- also.
- (write_description): Routine to save description - only saves 1
- node of description.
-
- * filter-arg.c (filter_arg_edit_clicked): Dont free edata here,
- let the destroy do it(?)
-
- * filter-editor.c (main): Simple driver program for testing, so i
- can fix all this really broken code *sigh*
-
-2000-05-15 NotZed <NotZed@HelixCode.com>
-
- * filter-editor.c (filter_editor_set_rule_files): filename based
- interface.
- (filter_editor_save_rules): Interface to save the options to a
- filename.
-
- * filter-xml.[ch]: Bunch of cleanup.
-
- * filter-xml.c (filter_*_file): New interfaces to read/write files
- directly, rather than messing with xmldoc crap.
-
- * Makefile.am: Removed filter-driver test program, now just part
- of libfilter.
-
- * filter-driver.c: Made an object, with an api and everything, can
- apply a filter to a given mailbox.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * filter-arg.h: Changed tree.h to gnome-xml/tree.h.
-
- * Makefile.am: Added filter-arg-types.h, filter-arg.h,
- filter-xml.h, filter-format.h, filter-druid.h, filter-editor.h.
-
-2000-05-02 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: set G_LOG_DOMAIN.
-
-2000-05-01 NotZed <NotZed@HelixCode.com>
-
- * filter-driver.c (main): Fix for api.
-
-2000-04-30 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c (start): Remove no-longer-necessary call to
- camel_provider_register_as_module.
-
-2000-04-25 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (INCLUDES): Use `$(GTKHTML_CFLAGS)'.
-
-2000-04-20 NotZed <NotZed@HelixCode.com>
-
- * filter-driver.c: Removed a bunch of crappy unrequired headers.
-
- * Makefile.am (filter_driver_LDADD): Added libibex back again.
-
-2000-04-18 Dan Winship <danw@helixcode.com>
-
- * filter-driver.c: remove unused camel-log.h include
-
-2000-04-12 Matt Loper <matt@helixcode.com>
-
- * filter-arg.c (filter_arg_edit_value): Return a value.
-
-2000-03-27 NotZed <NotZed@HelixCode.com>
-
- * filter-xml.c (tokenise_xmlfreeprop): Free a prop after
- tokenising it.
- (find_node_attr): Free the prop after using it.
- (load_desc): Ditto. I use free() because xmlFree() is nowhere to
- be found.
- (filter_load_optionset): Ditto.
-
- * filter-arg-types.c (arg_address_values_add_xml): free() xml
- stuff, plugs a leak.
- (arg_folder_values_add_xml): Ditto.
-
-2000-03-22 NotZed <NotZed@HelixCode.com>
-
- * filter-driver.c (main): Changed to use async search api.
-
-2000-03-04 NotZed <NotZed@HelixCode.com>
-
- * filter-druid.c (html_write_options): Output 'and' bits between
- the rules.
-
- * filter-driver.c (main): Actually implement filtering, at least,
- from Inbox. Copy messages to folder (in the same store only, so
- far), delete, and stop processing are implemented, and the logic
- to handle default processing.
-
- * filter-xml.c (load_optionvalue): Fix up a bug where we lost the
- name of the arg (ouch).
- * filter-xml.c: Wrapped printf's in debug macros.
-
-2000-03-02 NotZed <NotZed@HelixCode.com>
-
- * filter-druid.c (object_destroy): Disconnect the list signal, so
- we dont get spurious emits during destroy.
- (arg_changed): Callback to update filter arg asynchronously.
- (arg_link_clicked): Edit the value non-modally.
-
- * filter-arg.c (filter_arg_edit_values_1): Changed to use
- non-modal interface.
-
-2000-03-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am: New file.
-
- * Makefile: Removed. I wonder why we are using plain Makefiles
- instead of automake Makefiles at all.
-
-2000-02-29 NotZed <NotZed@HelixCode.com>
-
- * filter-driver.c (main): Remove gui code, this will be actual
- filtering code.
-
- * Makefile: Added filter-editor to the library.
-
- * filter-editor.c (main): Comment out, make it a proper library.
-
-2000-02-28 NotZed <NotZed@HelixCode.com>
-
- * filter-druid.c: Removed unused header.
-
- * Makefile: Removed references to filter-sexp.[ch].
-
- * filter-sexp.[ch]: Removed some unecessary includes. Moved to
- e-util. Renamed callers.
-
-2000-02-24 NotZed <NotZed@HelixCode.com>
-
- * filter-xml.c (filter_description_free):
- (filter_load_ruleset_free):
- (filter_load_optionset_free): Functions for memory management.
-
- * filter-arg.c (filter_arg_copy): Copy the values of one arg into
- another.
-
- * filter-editor.c: New widget, a dialogue which uses filter-druid
- to present the various editing views.
- (druid_dialogue_clicked): On finish, save the user's new filter
- definition where it came from.
-
- * filter-druid.c: Changed to just being a notebook with no tabs,
- rather than a full druid (no next/prev/etc buttons).
- (option_name_changed): Update the option's description as the user
- enters it in.
-
-2000-02-22 NotZed <NotZed@HelixCode.com>
-
- * filter-xml.c (filter_clone_optionrule):
- (filter_clone_optionrule_free):
- (filter_optionrule_new_from_rule): New utility functions for
- working with the internal rule format.
-
- * filter-arg.[ch]: Added new callbacks for editing a single value,
- and a new editor which shows all items in a list, and allows you
- to edit them via the single-edit method. This needs some cleanup
- for some unused/unusable virtual methods (edit_values,
- write_html?).
-
- * Makefile: Add the druid for build.
-
- * filter-druid.c: A 'druid' widget for editing a single filter
- rule.
-
-2000-02-21 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: New file.
-
-2000-02-18 NotZed <NotZed@HelixCode.com>
-
- * blank/check.xpm: Added forgotten files.
-
- * Uh, more changes, lots, its still work in progress.
-
-2000-02-14 NotZed <notzed@helixcode.com>
-
- * Initial import.
-
diff --git a/filter/Makefile.am b/filter/Makefile.am
deleted file mode 100644
index 17b150baa9..0000000000
--- a/filter/Makefile.am
+++ /dev/null
@@ -1,85 +0,0 @@
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = filter.glade
-
-INCLUDES = \
- -I $(top_srcdir) \
- -I $(top_srcdir)/libibex \
- -I $(top_srcdir)/camel \
- -I $(top_srcdir)/e-util \
- -I $(top_srcdir)/shell \
- -I $(top_srcdir)/camel/providers/mbox \
- -I $(top_builddir)/shell \
- -I $(GNOME_INCLUDEDIR) \
- $(GTKHTML_CFLAGS) \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -DFILTER_GLADEDIR=\"$(gladedir)\" \
- -DG_LOG_DOMAIN=\"filter\"
-##
-
-noinst_LTLIBRARIES = \
- libfilter.la
-
-libfilter_la_SOURCES = \
- filter-code.c \
- filter-code.h \
- filter-colour.c \
- filter-colour.h \
- filter-context.c \
- filter-context.h \
- filter-datespec.c \
- filter-datespec.h \
- filter-editor.c \
- filter-editor.h \
- filter-element.c \
- filter-element.h \
- filter-filter.c \
- filter-filter.h \
- filter-folder.c \
- filter-folder.h \
- filter-input.c \
- filter-input.h \
- filter-int.c \
- filter-int.h \
- filter-option.c \
- filter-option.h \
- filter-part.c \
- filter-part.h \
- filter-rule.c \
- filter-rule.h \
- filter-score.c \
- filter-score.h \
- filter-source.h \
- filter-source.c \
- rule-context.c \
- rule-context.h \
- rule-editor.c \
- rule-editor.h \
- score-context.c \
- score-context.h \
- score-editor.c \
- score-editor.h \
- score-rule.c \
- score-rule.h \
- vfolder-context.c \
- vfolder-context.h \
- vfolder-editor.c \
- vfolder-editor.h \
- vfolder-rule.c \
- vfolder-rule.h
-
-libfilter_la_DEPENDENCIES = libfilter-i18n.h
-
-EXTRA_DIST = filtertypes.xml vfoldertypes.xml \
- $(glade_DATA) libfilter-i18n.h
-
-# basic rules.
-filterdir = $(datadir)/evolution
-filter_DATA = filtertypes.xml vfoldertypes.xml
-
-libfilter-i18n.h: filtertypes.xml vfoldertypes.xml
- echo "/* Automatically generated. Do not edit. */" > $@; \
- cat $(srcdir)/filtertypes.xml $(srcdir)/vfoldertypes.xml | \
- sed -n -e 's:.*<title>\(.*\)</title>:char *s = N_("\1");:p' | \
- sort -u >> $@
diff --git a/filter/filter-code.c b/filter/filter-code.c
deleted file mode 100644
index 9ae83468f9..0000000000
--- a/filter/filter-code.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 "filter-code.h"
-
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp(FilterElement *, GString *);
-
-static void filter_code_class_init (FilterCodeClass *class);
-static void filter_code_init (FilterCode *gspaper);
-static void filter_code_finalise (GtkObject *obj);
-
-static FilterInputClass *parent_class;
-
-guint
-filter_code_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterCode",
- sizeof(FilterCode),
- sizeof(FilterCodeClass),
- (GtkClassInitFunc)filter_code_class_init,
- (GtkObjectInitFunc)filter_code_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(filter_input_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_code_class_init (FilterCodeClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(filter_input_get_type ());
-
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- object_class->finalize = filter_code_finalise;
- /* override methods */
-
-}
-
-static void
-filter_code_init (FilterCode *o)
-{
- ((FilterInput *)o)->type = xmlStrdup("code");
-}
-
-static void
-filter_code_finalise(GtkObject *obj)
-{
- FilterCode *o = (FilterCode *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_code_new:
- *
- * Create a new FilterCode object.
- *
- * Return value: A new #FilterCode object.
- **/
-FilterCode *
-filter_code_new(void)
-{
- FilterCode *o = (FilterCode *)gtk_type_new(filter_code_get_type ());
- return o;
-}
-
-/* here, the string IS the code */
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- GList *l;
- FilterInput *fi = (FilterInput *)fe;
-
- l = fi->values;
- while (l) {
- g_string_append(out, (char *)l->data);
- l = g_list_next(l);
- }
-}
-
-/* and we have no value */
-static void format_sexp(FilterElement *fe, GString *out)
-{
- return;
-}
diff --git a/filter/filter-code.h b/filter/filter-code.h
deleted file mode 100644
index 32c62f543f..0000000000
--- a/filter/filter-code.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_CODE_H
-#define _FILTER_CODE_H
-
-#include "filter-input.h"
-
-#define FILTER_CODE(obj) GTK_CHECK_CAST (obj, filter_code_get_type (), FilterCode)
-#define FILTER_CODE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_code_get_type (), FilterCodeClass)
-#define IS_FILTER_CODE(obj) GTK_CHECK_TYPE (obj, filter_code_get_type ())
-
-typedef struct _FilterCode FilterCode;
-typedef struct _FilterCodeClass FilterCodeClass;
-
-struct _FilterCode {
- FilterInput parent;
-};
-
-struct _FilterCodeClass {
- FilterInputClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_code_get_type (void);
-FilterCode *filter_code_new (void);
-
-/* methods */
-
-#endif /* ! _FILTER_CODE_H */
-
diff --git a/filter/filter-colour.c b/filter/filter-colour.c
deleted file mode 100644
index d3a3fa022b..0000000000
--- a/filter/filter-colour.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <gtk/gtksignal.h>
-#include <libgnomeui/gnome-color-picker.h>
-
-#include "e-util/e-sexp.h"
-#include "filter-colour.h"
-
-#define d(x)
-
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget(FilterElement *fe);
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp(FilterElement *, GString *);
-
-static void filter_colour_class_init (FilterColourClass *class);
-static void filter_colour_init (FilterColour *gspaper);
-static void filter_colour_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterColour *)(x))->priv)
-
-struct _FilterColourPrivate {
-};
-
-static FilterElementClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_colour_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterColour",
- sizeof(FilterColour),
- sizeof(FilterColourClass),
- (GtkClassInitFunc)filter_colour_class_init,
- (GtkObjectInitFunc)filter_colour_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_colour_class_init (FilterColourClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(filter_element_get_type ());
-
- object_class->finalize = filter_colour_finalise;
-
- /* override methods */
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_colour_init (FilterColour *o)
-{
- o->priv = g_malloc0(sizeof(*o->priv));
-}
-
-static void
-filter_colour_finalise(GtkObject *obj)
-{
- FilterColour *o = (FilterColour *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_colour_new:
- *
- * Create a new FilterColour object.
- *
- * Return value: A new #FilterColour object.
- **/
-FilterColour *
-filter_colour_new(void)
-{
- FilterColour *o = (FilterColour *)gtk_type_new(filter_colour_get_type ());
- return o;
-}
-
-static void xml_create(FilterElement *fe, xmlNodePtr node)
-{
- /*FilterColour *fc = (FilterColour *)fe;*/
-
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-}
-
-static xmlNodePtr xml_encode(FilterElement *fe)
-{
- xmlNodePtr value;
- FilterColour *fc = (FilterColour *)fe;
- char hex[16];
-
- d(printf("Encoding colour as xml\n"));
- value = xmlNewNode(NULL, "value");
- xmlSetProp(value, "name", fe->name);
- xmlSetProp(value, "type", "colour");
-
- sprintf(hex, "%04x", fc->r);
- xmlSetProp(value, "red", hex);
- sprintf(hex, "%04x", fc->g);
- xmlSetProp(value, "green", hex);
- sprintf(hex, "%04x", fc->b);
- xmlSetProp(value, "blue", hex);
- sprintf(hex, "%04x", fc->a);
- xmlSetProp(value, "alpha", hex);
-
- return value;
-}
-
-static guint16
-get_value(xmlNodePtr node, char *name)
-{
- unsigned int ret;
- char *value;
-
- value = xmlGetProp(node, name);
- sscanf(value, "%04x", &ret);
- xmlFree(value);
- return ret;
-}
-
-
-static int xml_decode(FilterElement *fe, xmlNodePtr node)
-{
- FilterColour *fc = (FilterColour *)fe;
-
- xmlFree (fe->name);
- fe->name = xmlGetProp(node, "name");
- fc->r = get_value(node, "red");
- fc->g = get_value(node, "green");
- fc->b = get_value(node, "blue");
- fc->a = get_value(node, "alpha");
-
- return 0;
-}
-
-static void set_colour(GnomeColorPicker *cp, guint r, guint g, guint b, guint a, FilterColour *fc)
-{
- fc->r = r;
- fc->g = g;
- fc->b = b;
- fc->a = a;
-}
-
-static GtkWidget *get_widget(FilterElement *fe)
-{
- FilterColour *fc = (FilterColour *)fe;
- GnomeColorPicker *cp;
-
- cp = (GnomeColorPicker *)gnome_color_picker_new();
- gnome_color_picker_set_i16(cp, fc->r, fc->g, fc->b, fc->a);
- gtk_widget_show((GtkWidget *)cp);
- gtk_signal_connect((GtkObject *)cp, "color_set", set_colour, fe);
- return (GtkWidget *)cp;
-}
-
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return;
-}
-
-static void format_sexp(FilterElement *fe, GString *out)
-{
- char *str;
- FilterColour *fc = (FilterColour *)fe;
-
- str =g_strdup_printf("rgb:%04x/%04x/%04x", fc->r, fc->g, fc->b);
- e_sexp_encode_string(out, str);
- g_free(str);
-}
diff --git a/filter/filter-colour.h b/filter/filter-colour.h
deleted file mode 100644
index 672ae8fc5a..0000000000
--- a/filter/filter-colour.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_COLOUR_H
-#define _FILTER_COLOUR_H
-
-#include "filter-element.h"
-
-#define FILTER_COLOUR(obj) GTK_CHECK_CAST (obj, filter_colour_get_type (), FilterColour)
-#define FILTER_COLOUR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_colour_get_type (), FilterColourClass)
-#define IS_FILTER_COLOUR(obj) GTK_CHECK_TYPE (obj, filter_colour_get_type ())
-
-typedef struct _FilterColour FilterColour;
-typedef struct _FilterColourClass FilterColourClass;
-
-struct _FilterColour {
- FilterElement parent;
- struct _FilterColourPrivate *priv;
-
- guint16 r,g,b,a;
-};
-
-struct _FilterColourClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_colour_get_type (void);
-FilterColour *filter_colour_new (void);
-
-/* methods */
-
-#endif /* ! _FILTER_COLOUR_H */
-
diff --git a/filter/filter-context.c b/filter/filter-context.c
deleted file mode 100644
index b7a808a764..0000000000
--- a/filter/filter-context.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <gtk/gtktypeutils.h>
-#include <gtk/gtkobject.h>
-
-#include "filter-context.h"
-#include "filter-filter.h"
-
-#define d(x)
-
-static void filter_context_class_init (FilterContextClass *class);
-static void filter_context_init (FilterContext *gspaper);
-static void filter_context_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterContext *)(x))->priv)
-
-struct _FilterContextPrivate {
-};
-
-static RuleContextClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_context_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterContext",
- sizeof(FilterContext),
- sizeof(FilterContextClass),
- (GtkClassInitFunc)filter_context_class_init,
- (GtkObjectInitFunc)filter_context_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(rule_context_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_context_class_init (FilterContextClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(rule_context_get_type ());
-
- object_class->finalize = filter_context_finalise;
- /* override methods */
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_context_init (FilterContext *o)
-{
- o->priv = g_malloc0(sizeof(*o->priv));
-
- rule_context_add_part_set((RuleContext *)o, "partset", filter_part_get_type(),
- rule_context_add_part, rule_context_next_part);
- rule_context_add_part_set((RuleContext *)o, "actionset", filter_part_get_type(),
- (RCPartFunc)filter_context_add_action,
- (RCNextPartFunc)filter_context_next_action);
-
- rule_context_add_rule_set((RuleContext *)o, "ruleset", filter_filter_get_type(),
- (RCRuleFunc)rule_context_add_rule, rule_context_next_rule);
-}
-
-static void
-filter_context_finalise(GtkObject *obj)
-{
- FilterContext *o = (FilterContext *)obj;
-
- g_list_foreach(o->actions, (GFunc)gtk_object_unref, NULL);
- g_list_free(o->actions);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_context_new:
- *
- * Create a new FilterContext object.
- *
- * Return value: A new #FilterContext object.
- **/
-FilterContext *
-filter_context_new(void)
-{
- FilterContext *o = (FilterContext *)gtk_type_new(filter_context_get_type ());
- return o;
-}
-
-void filter_context_add_action(FilterContext *f, FilterPart *action)
-{
- d(printf("find action : "));
- f->actions = g_list_append(f->actions, action);
-}
-
-FilterPart *filter_context_find_action(FilterContext *f, const char *name)
-{
- d(printf("find action : "));
- return filter_part_find_list(f->actions, name);
-}
-
-FilterPart *filter_context_create_action(FilterContext *f, const char *name)
-{
- FilterPart *part;
-
- part = filter_context_find_action(f, name);
- if (part)
- part = filter_part_clone(part);
- return part;
-}
-
-FilterPart *filter_context_next_action(FilterContext *f, FilterPart *last)
-{
- return filter_part_next_list(f->actions, last);
-}
diff --git a/filter/filter-context.h b/filter/filter-context.h
deleted file mode 100644
index e46621c8e6..0000000000
--- a/filter/filter-context.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_CONTEXT_H
-#define _FILTER_CONTEXT_H
-
-#include "rule-context.h"
-
-#define FILTER_CONTEXT(obj) GTK_CHECK_CAST (obj, filter_context_get_type (), FilterContext)
-#define FILTER_CONTEXT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_context_get_type (), FilterContextClass)
-#define IS_FILTER_CONTEXT(obj) GTK_CHECK_TYPE (obj, filter_context_get_type ())
-
-typedef struct _FilterContext FilterContext;
-typedef struct _FilterContextClass FilterContextClass;
-
-struct _FilterContext {
- RuleContext parent;
- struct _FilterContextPrivate *priv;
-
- GList *actions;
-};
-
-struct _FilterContextClass {
- RuleContextClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_context_get_type (void);
-FilterContext *filter_context_new (void);
-
-/* methods */
-void filter_context_add_action(FilterContext *f, FilterPart *action);
-FilterPart *filter_context_find_action(FilterContext *f, const char *name);
-FilterPart *filter_context_create_action(FilterContext *f, const char *name);
-FilterPart *filter_context_next_action(FilterContext *f, FilterPart *last);
-
-#endif /* ! _FILTER_CONTEXT_H */
-
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
deleted file mode 100644
index dd8087ddde..0000000000
--- a/filter/filter-datespec.c
+++ /dev/null
@@ -1,763 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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.
- */
-
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <math.h>
-#include <glib.h>
-#include <gtk/gtkcalendar.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkhseparator.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtktable.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-stock.h>
-
-#include "filter-datespec.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static void xml_create (FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode (FilterElement *fe);
-static int xml_decode (FilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget (FilterElement *fe);
-static void build_code (FilterElement *fe, GString *out, struct _FilterPart *fds);
-static void format_sexp (FilterElement *, GString *);
-
-static void filter_datespec_class_init (FilterDatespecClass *class);
-static void filter_datespec_init (FilterDatespec *gspaper);
-static void filter_datespec_finalise (GtkObject *obj);
-
-static void make_span_editor (FilterDatespec *fds);
-static void adj_value_changed (GtkAdjustment *adj, gpointer user_data);
-static void omenu_item_activated (GtkMenuItem *item, gpointer user_data);
-static gchar *describe_button (FilterDatespec *fds);
-static gchar *stringify_agoness (FilterDatespec *fds);
-static void set_adjustments (FilterDatespec *fds);
-
-static void cal_day_selected (GtkCalendar *cal, gpointer user_data);
-static void cal_day_selected_double_click (GtkCalendar *cal, gpointer user_data);
-
-#define PRIV(x) (((FilterDatespec *)(x))->priv)
-
-typedef struct _timespan {
- guint32 seconds;
- const gchar *singular;
- const gchar *plural;
- gfloat max;
-} timespan;
-
-static const timespan timespans[] = {
- { 31557600, N_("year"), N_("years"), 1000.0 },
- { 2419200, N_("month"), N_("months"), 12.0 },
- { 604800, N_("week"), N_("weeks"), 52.0 },
- { 86400, N_("day"), N_("days"), 31.0 },
- { 3600, N_("hour"), N_("hours"), 23.0 },
- { 60, N_("minute"), N_("minutes"), 59.0 },
- { 1, N_("second"), N_("seconds"), 59.0 }
-};
-
-#define DAY_INDEX 3
-#define N_TIMESPANS (sizeof (timespans) / sizeof (timespans[0]))
-
-struct _FilterDatespecPrivate {
- GnomeDialog *gd;
- GtkWidget *descriptive_label;
- GtkWidget *cur_extra_widget;
- FilterDatespec_type selected_type;
-
- GtkWidget *date_chooser;
- GtkWidget *span_chooser;
- GtkWidget *omenu, *spinbutton, *recent_item;
- gboolean double_click;
-};
-
-static FilterElementClass *parent_class;
-
-guint
-filter_datespec_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterDatespec",
- sizeof (FilterDatespec),
- sizeof (FilterDatespecClass),
- (GtkClassInitFunc) filter_datespec_class_init,
- (GtkObjectInitFunc) filter_datespec_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_datespec_class_init (FilterDatespecClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (filter_element_get_type ());
-
- object_class->finalize = filter_datespec_finalise;
-
- /* override methods */
- filter_element->validate = validate;
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-}
-
-static void
-filter_datespec_init (FilterDatespec *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
- o->type = FDST_UNKNOWN;
- PRIV(o)->selected_type = FDST_UNKNOWN;
-}
-
-static void
-filter_datespec_finalise(GtkObject *obj)
-{
- FilterDatespec *o = (FilterDatespec *)obj;
-
- if (o->priv)
- g_free (o->priv);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_datespec_new:
- *
- * Create a new FilterDatespec object.
- *
- * Return value: A new #FilterDatespec object.
- **/
-FilterDatespec *
-filter_datespec_new (void)
-{
- FilterDatespec *o = (FilterDatespec *)gtk_type_new (filter_datespec_get_type ());
- return o;
-}
-
-static gboolean
-validate (FilterElement *fe)
-{
- FilterDatespec *fds = (FilterDatespec *) fe;
- gboolean valid = TRUE;
-
- if (fds->value <= 0) {
- GtkWidget *gd;
-
- valid = FALSE;
-
- if (fds->type == FDST_UNKNOWN)
- gd = gnome_ok_dialog (_("Oops. You have forgotten to choose a date."));
- else
- gd = gnome_ok_dialog (_("Oops. You have chosen an invalid date."));
-
- gnome_dialog_run_and_close (GNOME_DIALOG (gd));
- }
-
- return valid;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value, work;
- FilterDatespec *fds = (FilterDatespec *)fe;
- gchar str[32];
-
- d(printf ("Encoding datespec as xml\n"));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", "datespec");
-
- work = xmlNewChild (value, NULL, "datespec", NULL);
- sprintf (str, "%d", fds->type);
- xmlSetProp (work, "type", str);
- sprintf (str, "%d", (int)fds->value);
- xmlSetProp (work, "value", str);
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterDatespec *fds = (FilterDatespec *)fe;
- xmlNodePtr n;
- gchar *val;
-
- d(printf ("Decoding datespec from xml %p\n", fe));
-
- xmlFree (fe->name);
- fe->name = xmlGetProp (node, "name");
-
- n = node->childs;
- while (n) {
- if (!strcmp (n->name, "datespec")) {
- val = xmlGetProp (n, "type");
- fds->type = atoi (val);
- xmlFree (val);
- val = xmlGetProp (n, "value");
- fds->value = atoi (val);
- xmlFree (val);
- break;
- }
- n = n->next;
- }
- return 0;
-}
-
-static void
-activate_now (GtkMenuItem *item, FilterDatespec *fds)
-{
- if (PRIV (fds)->cur_extra_widget) {
- gtk_container_remove (GTK_CONTAINER (PRIV(fds)->gd->vbox),
- PRIV (fds)->cur_extra_widget);
- PRIV (fds)->cur_extra_widget = NULL;
- }
-
- gtk_label_set_text (GTK_LABEL (PRIV (fds)->descriptive_label),
- _("The message's date will be compared against\n"
- "whatever the time is when the filter is run\n"
- "or vfolder is opened."));
-
- PRIV (fds)->selected_type = FDST_NOW;
-}
-
-static void
-activate_specified (GtkMenuItem *item, FilterDatespec *fds)
-{
- struct tm *seltime;
-
- /* Remove other widget if it exists */
-
- if (PRIV (fds)->cur_extra_widget) {
- gtk_container_remove (GTK_CONTAINER (PRIV (fds)->gd->vbox),
- PRIV (fds)->cur_extra_widget);
- PRIV (fds)->cur_extra_widget = NULL;
- }
-
- /* Set description */
-
- gtk_label_set_text (GTK_LABEL (PRIV (fds)->descriptive_label),
- _("The message's date will be compared against\n"
- "the time that you specify here."));
-
- /* Reset if going from one type to another */
- if (PRIV (fds)->selected_type != FDST_SPECIFIED)
- fds->value = 0;
-
- PRIV (fds)->selected_type = FDST_SPECIFIED;
-
- /* Set the calendar's time */
-
- if (fds->value > 0) {
- /* gmtime? */
- seltime = localtime (&(fds->value));
-
- gtk_calendar_select_month (GTK_CALENDAR (PRIV (fds)->date_chooser),
- seltime->tm_mon,
- seltime->tm_year + 1900);
- gtk_calendar_select_day (GTK_CALENDAR (PRIV (fds)->date_chooser),
- seltime->tm_mday);
- /* free seltime?? */
- }
-
- gtk_box_pack_start (GTK_BOX (PRIV (fds)->gd->vbox),
- PRIV (fds)->date_chooser,
- TRUE, TRUE, 3);
- gtk_widget_show (PRIV (fds)->date_chooser);
- PRIV (fds)->cur_extra_widget = PRIV (fds)->date_chooser;
-}
-
-static void
-activate_x_ago (GtkMenuItem *item, FilterDatespec *fds)
-{
- if (PRIV (fds)->cur_extra_widget) {
- gtk_container_remove (GTK_CONTAINER (PRIV (fds)->gd->vbox),
- PRIV (fds)->cur_extra_widget);
- PRIV (fds)->cur_extra_widget = NULL;
- }
-
- gtk_label_set_text (GTK_LABEL (PRIV (fds)->descriptive_label),
- _("The message's date will be compared against\n"
- "a time relative to when the filter is run;\n"
- "\"a week ago\", for example."));
-
- /* Reset if going from one type to another */
- if (PRIV (fds)->selected_type != FDST_X_AGO)
- fds->value = 0;
-
- PRIV (fds)->selected_type = FDST_X_AGO;
-
- if (fds->value > 0)
- set_adjustments (fds);
-
- gtk_box_pack_start (GTK_BOX (PRIV (fds)->gd->vbox),
- PRIV (fds)->span_chooser,
- TRUE, TRUE, 3);
- gtk_widget_show (PRIV (fds)->span_chooser);
- PRIV (fds)->cur_extra_widget = PRIV (fds)->span_chooser;
-}
-
-typedef void (*my_menu_callback) (GtkMenuItem *, FilterDatespec *);
-
-static void
-button_clicked (GtkButton *button, FilterDatespec *fds)
-{
- GnomeDialog *gd;
- GtkWidget *box;
- GtkWidget *label;
- GtkWidget *menu;
- GtkWidget *selectomatic;
- GtkWidget *sep;
- int i;
- gchar *desc;
-
- /* keep in sync with FilterDatespec_type! */
- const char *items[] = { N_("the current time"), N_("a time you specify"),
- N_("a time relative to the current time"), NULL };
- const my_menu_callback callbacks[]
- = { activate_now, activate_specified, activate_x_ago };
-
- PRIV (fds)->descriptive_label = gtk_label_new("");
- PRIV (fds)->cur_extra_widget = NULL;
- PRIV (fds)->double_click = FALSE;
-
- /* The calendar */
-
- PRIV (fds)->date_chooser = gtk_calendar_new ();
- gtk_object_ref (GTK_OBJECT (PRIV (fds)->date_chooser));
- gtk_signal_connect (GTK_OBJECT (PRIV (fds)->date_chooser), "day_selected",
- cal_day_selected, fds);
- gtk_signal_connect (GTK_OBJECT (PRIV (fds)->date_chooser), "day_selected_double_click",
- cal_day_selected_double_click, fds);
-
- /* The span editor thingie */
-
- make_span_editor (fds);
- gtk_object_ref (GTK_OBJECT (PRIV (fds)->span_chooser));
-
- /* The dialog */
-
- gd = (GnomeDialog *) gnome_dialog_new (_("Select a time to compare against"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- PRIV (fds)->gd = gd;
-
- /* The menu */
-
- menu = gtk_menu_new ();
-
- for (i = 0; items[i]; i++) {
- GtkWidget *item;
-
- item = gtk_menu_item_new_with_label (gettext (items[i]));
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- callbacks[i], fds);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
- }
-
- gtk_widget_show (menu);
-
- /* The selector */
-
- selectomatic = gtk_option_menu_new();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (selectomatic), GTK_WIDGET (menu));
- if (fds->type != FDST_UNKNOWN)
- /* Keep in sync with FilterDatespec_type! */
- gtk_option_menu_set_history (GTK_OPTION_MENU (selectomatic), fds->type);
-
- gtk_widget_show ((GtkWidget *)selectomatic);
-
- /* The label */
-
- label = gtk_label_new (_("Compare against"));
- gtk_widget_show (label);
-
- /* The hbox */
-
- box = gtk_hbox_new (FALSE, 3);
- gtk_box_pack_start (GTK_BOX (box), label,
- TRUE, TRUE, 2);
- gtk_box_pack_start (GTK_BOX (box), selectomatic,
- TRUE, TRUE, 2);
- gtk_widget_show (box);
- gtk_box_pack_start ((GtkBox *)gd->vbox, (GtkWidget *)box, TRUE, TRUE, 3);
-
- /* The separator */
-
- sep = gtk_hseparator_new ();
- gtk_widget_show (sep);
- gtk_box_pack_start (GTK_BOX (gd->vbox), sep, TRUE, TRUE, 3);
-
- /* The descriptive label */
-
- gtk_box_pack_start (GTK_BOX (gd->vbox), PRIV (fds)->descriptive_label, TRUE, TRUE, 3);
- gtk_misc_set_alignment (GTK_MISC (PRIV (fds)->descriptive_label), 0.5, 0.5);
- gtk_widget_show (PRIV (fds)->descriptive_label);
-
- /* Set up the current view */
-
- if (fds->type == FDST_UNKNOWN)
- fds->type = FDST_NOW;
- PRIV (fds)->selected_type = fds->type;
-
- (callbacks[fds->type]) (NULL, fds);
-
- /* go go gadget gnomedialog! */
-
- switch (gnome_dialog_run_and_close(gd)) {
- case -1: /*wm close*/
- if (PRIV (fds)->double_click == FALSE)
- break;
- /* else fall */
- case 0:
- fds->type = PRIV (fds)->selected_type;
-
- PRIV (fds)->descriptive_label = NULL;
-
- desc = describe_button (fds);
- gtk_label_set_text (GTK_LABEL (GTK_BIN (button)->child), desc);
- g_free (desc);
- /* falllllll */
- case 1:
- /* cancel */
- break;
- }
-
- gtk_widget_destroy (PRIV (fds)->date_chooser);
- gtk_widget_destroy (PRIV (fds)->span_chooser);
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterDatespec *fds = (FilterDatespec *)fe;
- GtkWidget *button;
- GtkWidget *label;
- gchar *desc;
-
- desc = describe_button (fds);
- label = gtk_label_new (desc);
- gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
- g_free (desc);
-
- button = gtk_button_new();
- gtk_container_add (GTK_CONTAINER (button), label);
- gtk_signal_connect (GTK_OBJECT (button), "clicked", button_clicked, fds);
-
- gtk_widget_show (button);
- gtk_widget_show (label);
- return button;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *fp)
-{
- return;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterDatespec *fds = (FilterDatespec *)fe;
-
- switch (fds->type) {
- case FDST_UNKNOWN:
- g_warning ("user hasn't selected a datespec yet!");
- /* fall through */
- case FDST_NOW:
- g_string_append (out, "(get-current-date)");
- break;
- case FDST_SPECIFIED:
- g_string_sprintfa (out, "%d", (int) fds->value);
- break;
- case FDST_X_AGO:
- g_string_sprintfa (out, "(- (get-current-date) %d)", (int) fds->value);
- break;
- }
-}
-
-static gchar *
-stringify_agoness (FilterDatespec *fds)
-{
- time_t val;
- GString *str;
- gchar *ret;
-
- str = g_string_new("");
- val = fds->value;
-
- if (val == 0) {
- g_string_append (str, _("now"));
- } else {
- int where;
-
- where = 0;
-
- while (val) {
- int count;
-
- count = 0;
-
- while (timespans[where].seconds <= val) {
- count++;
- val -= timespans[where].seconds;
- }
-
- if (count != 0 ) {
- if (count > 1)
- g_string_sprintfa (str, "%d %s", (int) count, gettext (timespans[where].plural));
- else
- g_string_sprintfa (str, "%d %s", (int) count, gettext (timespans[where].singular));
-
- if (val)
- g_string_append (str, ", ");
- }
-
- where++;
- }
-
- g_string_append (str, _(" ago"));
- }
-
- ret = str->str;
- g_string_free (str, FALSE);
- return ret;
-}
-
-static void
-make_span_editor (FilterDatespec *fds)
-{
- int i;
- GtkObject *adj;
- GtkWidget *hbox, *menu, *om, *sb, *label;
-
- /*PRIV (fds)->span_chooser = gtk_vbox_new (TRUE, 3);*/
-
- hbox = gtk_hbox_new (TRUE, 3);
-
- adj = gtk_adjustment_new (0.0, 0.0,
- /*timespans[i].max*/100000.0,
- 1.0, 10.0, 0.0);
- sb = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0, 0);
- gtk_widget_show (GTK_WIDGET (sb));
- gtk_box_pack_start (GTK_BOX (hbox), sb, TRUE, TRUE, 0);
-
- menu = gtk_menu_new ();
- for (i = 0; i < N_TIMESPANS; i++) {
- GtkWidget *item;
-
- item = gtk_menu_item_new_with_label (gettext (timespans[i].plural));
- gtk_object_set_data (GTK_OBJECT (item), "timespan", (gpointer) &(timespans[i]));
- gtk_signal_connect (GTK_OBJECT (item), "activate", omenu_item_activated, fds);
- gtk_widget_show (item);
- gtk_menu_prepend (GTK_MENU (menu), item);
-
- if (i == DAY_INDEX)
- PRIV (fds)->recent_item = item;
- }
-
- om = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (om), menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (om), DAY_INDEX);
- gtk_widget_show (om);
- gtk_box_pack_start (GTK_BOX (hbox), om, FALSE, TRUE, 0);
-
- label = gtk_label_new (_("ago"));
- gtk_widget_show (label);
- gtk_misc_set_padding (GTK_MISC (label), 3, 0);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-
- gtk_widget_show (hbox);
-
- PRIV (fds)->span_chooser = hbox;
- PRIV (fds)->omenu = om;
- PRIV (fds)->spinbutton = sb;
-
- /* if we do this earlier, we get the signal before the private
- * members have been set up. */
- gtk_signal_connect (adj, "value_changed",
- adj_value_changed, fds);
-}
-
-static void
-omenu_item_activated (GtkMenuItem *item, gpointer user_data)
-{
- FilterDatespec *fds = (FilterDatespec *) user_data;
- GtkOptionMenu *om;
- timespan *old_ts, *new_ts;
- int cur_val;
- gfloat new_val;
-
- if (!PRIV (fds)->recent_item) {
- PRIV (fds)->recent_item = GTK_WIDGET (item);
- return;
- }
-
- om = GTK_OPTION_MENU (PRIV (fds)->omenu);
- old_ts = gtk_object_get_data (GTK_OBJECT (PRIV (fds)->recent_item), "timespan");
- new_ts = gtk_object_get_data (GTK_OBJECT (item), "timespan");
-
- cur_val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (PRIV (fds)->spinbutton));
-
- /*if (old_ts->seconds > new_ts->seconds)*/
- new_val = ceil (cur_val * old_ts->seconds / new_ts->seconds);
-
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (PRIV (fds)->spinbutton), new_val);
- PRIV (fds)->recent_item = GTK_WIDGET (item);
-}
-
-static void
-adj_value_changed (GtkAdjustment *adj, gpointer user_data)
-{
- FilterDatespec *fds = (FilterDatespec *) user_data;
- GtkOptionMenu *om;
- timespan *ts;
-
- om = GTK_OPTION_MENU (PRIV (fds)->omenu);
-
- if (om->menu_item == NULL) /* this has happened to me... dunno what it means */
- return;
-
- ts = gtk_object_get_data (GTK_OBJECT (om->menu_item), "timespan");
- fds->value = ts->seconds *
- (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (PRIV (fds)->spinbutton)));
-}
-
-static void
-set_adjustments (FilterDatespec *fds)
-{
- time_t val;
- int i;
-
- val = fds->value;
-
- for (i = 0; i < N_TIMESPANS; i++) {
- if (val % timespans[i].seconds == 0) {
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (PRIV (fds)->spinbutton),
- (gfloat) val / timespans[i].seconds);
- break;
- }
- }
-
- gtk_option_menu_set_history (GTK_OPTION_MENU (PRIV (fds)->omenu),
- N_TIMESPANS - (i + 1));
-}
-
-static gchar *
-format_time (time_t time)
-{
- struct tm *as_tm;
- char buf[128];
-
- /* no idea if this format is the 'correct' one */
-
- as_tm = localtime (&time);
- strftime (buf, 128, _("%b %d %l:%M %p"), as_tm);
- return g_strdup (buf);
-}
-
-static gchar *
-describe_button (FilterDatespec *fds)
-{
- gchar *desc = NULL;
-
- switch (fds->type) {
- case FDST_UNKNOWN:
- desc = g_strdup (_("<click here to select a date>"));
- break;
- case FDST_NOW:
- desc = g_strdup (_("now"));
- break;
- case FDST_SPECIFIED:
- desc = format_time (fds->value);
- break;
- case FDST_X_AGO:
- desc = stringify_agoness (fds);
- break;
- }
-
- return desc;
-}
-
-static void
-cal_day_selected (GtkCalendar *cal, gpointer user_data)
-{
- FilterDatespec *fds = (FilterDatespec *)user_data;
- struct tm seltime;
-
- seltime.tm_sec = 0;
- seltime.tm_min = 0;
- seltime.tm_hour = 0;
- seltime.tm_mday = cal->selected_day;
- seltime.tm_mon = cal->month;
- seltime.tm_year = cal->year - 1900;
- seltime.tm_isdst = -1;
-
- fds->value = mktime (&seltime);
-}
-
-static void
-cal_day_selected_double_click (GtkCalendar *cal, gpointer user_data)
-{
- FilterDatespec *fds = (FilterDatespec *)user_data;
-
- cal_day_selected (cal, user_data);
- PRIV (fds)->double_click = TRUE;
- gnome_dialog_close (PRIV (fds)->gd);
-}
diff --git a/filter/filter-datespec.h b/filter/filter-datespec.h
deleted file mode 100644
index ed805d4268..0000000000
--- a/filter/filter-datespec.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_DATESPEC_H
-#define _FILTER_DATESPEC_H
-
-#include <time.h>
-#include "filter-element.h"
-
-#define FILTER_DATESPEC(obj) GTK_CHECK_CAST (obj, filter_datespec_get_type (), FilterDatespec)
-#define FILTER_DATESPEC_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_datespec_get_type (), FilterDatespecClass)
-#define IS_FILTER_DATESPEC(obj) GTK_CHECK_TYPE (obj, filter_datespec_get_type ())
-
-typedef struct _FilterDatespec FilterDatespec;
-typedef struct _FilterDatespecClass FilterDatespecClass;
-
-typedef enum _FilterDatespec_type { FDST_NOW, FDST_SPECIFIED, FDST_X_AGO, FDST_UNKNOWN } FilterDatespec_type;
-
-struct _FilterDatespec {
- FilterElement parent;
- struct _FilterDatespecPrivate *priv;
-
- FilterDatespec_type type;
-
- /* either a timespan, an absolute time, or 0
- * depending on type -- the above mapping to
- * (X_AGO, SPECIFIED, NOW)
- */
-
- time_t value;
-};
-
-struct _FilterDatespecClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_datespec_get_type (void);
-FilterDatespec *filter_datespec_new (void);
-
-/* methods */
-
-#endif /* ! _FILTER_DATESPEC_H */
-
diff --git a/filter/filter-editor.c b/filter/filter-editor.c
deleted file mode 100644
index b27270179d..0000000000
--- a/filter/filter-editor.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (C) 2000, 2001 Ximian Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "filter-editor.h"
-#include "filter-context.h"
-#include "filter-filter.h"
-
-#define d(x)
-
-static FilterRule * create_rule(RuleEditor *re);
-
-static void filter_editor_class_init (FilterEditorClass *class);
-static void filter_editor_init (FilterEditor *gspaper);
-static void filter_editor_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterEditor *)(x))->priv)
-
-struct _FilterEditorPrivate {
-};
-
-static GnomeDialogClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_editor_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterEditor",
- sizeof(FilterEditor),
- sizeof(FilterEditorClass),
- (GtkClassInitFunc)filter_editor_class_init,
- (GtkObjectInitFunc)filter_editor_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (rule_editor_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_editor_class_init (FilterEditorClass *class)
-{
- GtkObjectClass *object_class = (GtkObjectClass *)class;
- RuleEditorClass *re_class = (RuleEditorClass *)class;
-
- parent_class = gtk_type_class (gnome_dialog_get_type ());
-
- object_class->finalize = filter_editor_finalise;
-
- /* override methods */
- re_class->create_rule = create_rule;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_editor_init (FilterEditor *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_editor_finalise (GtkObject *obj)
-{
- FilterEditor *o = (FilterEditor *)obj;
-
- g_free(o->priv);
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-/**
- * filter_editor_new:
- *
- * Create a new FilterEditor object.
- *
- * Return value: A new #FilterEditor object.
- **/
-FilterEditor *
-filter_editor_new(FilterContext *f, const char **source_names)
-{
- FilterEditor *o = (FilterEditor *)gtk_type_new (filter_editor_get_type ());
- GladeXML *gui;
- GtkWidget *w;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor");
- filter_editor_construct (o, f, gui, source_names);
-
- w = glade_xml_get_widget (gui, "rule_frame");
- gtk_frame_set_label (GTK_FRAME (w), _("Filter Rules"));
-
- gtk_object_unref (GTK_OBJECT (gui));
-
- return o;
-}
-
-static void
-select_source (GtkMenuItem *mi, FilterEditor *fe)
-{
- char *source;
-
- source = gtk_object_get_data (GTK_OBJECT (mi), "source");
- g_assert (source);
-
- rule_editor_set_source ((RuleEditor *)fe, source);
-}
-
-void
-filter_editor_construct (FilterEditor *fe, FilterContext *fc, GladeXML *gui, const char **source_names)
-{
- GtkWidget *menu, *item, *omenu;
- int i;
-
- omenu = glade_xml_get_widget (gui, "filter_source");
- gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu));
- menu = gtk_menu_new ();
-
- for (i = 0; source_names[i]; i++) {
- item = gtk_menu_item_new_with_label (_(source_names[i]));
- gtk_object_set_data_full (GTK_OBJECT (item), "source", g_strdup (source_names[i]), g_free);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
- gtk_signal_connect (GTK_OBJECT (item), "activate", select_source, fe);
- }
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
- gtk_widget_show (omenu);
-
- rule_editor_construct ((RuleEditor *)fe, (RuleContext *)fc, gui, source_names[0]);
-}
-
-static FilterRule *
-create_rule (RuleEditor *re)
-{
- FilterRule *rule = filter_rule_new ();
- FilterPart *part;
-
- /* create a rule with 1 part & 1 action in it */
- rule = (FilterRule *)filter_filter_new ();
- part = rule_context_next_part (re->context, NULL);
- filter_rule_add_part (rule, filter_part_clone (part));
- part = filter_context_next_action ((FilterContext *)re->context, NULL);
- filter_filter_add_action ((FilterFilter *)rule, filter_part_clone (part));
-
- return rule;
-}
diff --git a/filter/filter-editor.h b/filter/filter-editor.h
deleted file mode 100644
index 3d65f9c99f..0000000000
--- a/filter/filter-editor.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2000, 2001 Ximian 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 _FILTER_EDITOR_H
-#define _FILTER_EDITOR_H
-
-#include "rule-editor.h"
-
-#define FILTER_EDITOR(obj) GTK_CHECK_CAST (obj, filter_editor_get_type (), FilterEditor)
-#define FILTER_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_editor_get_type (), FilterEditorClass)
-#define IS_FILTER_EDITOR(obj) GTK_CHECK_TYPE (obj, filter_editor_get_type ())
-
-typedef struct _FilterEditor FilterEditor;
-typedef struct _FilterEditorClass FilterEditorClass;
-
-struct _FilterEditor {
- RuleEditor parent;
- struct _FilterEditorPrivate *priv;
-
-};
-
-struct _FilterEditorClass {
- RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-struct _FilterContext;
-
-guint filter_editor_get_type (void);
-FilterEditor *filter_editor_new(struct _FilterContext *f, const char **source_names);
-void filter_editor_construct(FilterEditor *fe, struct _FilterContext *fc, struct _GladeXML *gui, const char **source_names);
-
-#endif /* ! _FILTER_EDITOR_H */
-
diff --git a/filter/filter-element.c b/filter/filter-element.c
deleted file mode 100644
index d8218c5079..0000000000
--- a/filter/filter-element.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <string.h>
-#include <gtk/gtktypeutils.h>
-
-#include "filter-element.h"
-#include "filter-input.h"
-#include "filter-option.h"
-#include "filter-code.h"
-#include "filter-colour.h"
-#include "filter-datespec.h"
-#include "filter-score.h"
-#include "filter-int.h"
-#include "filter-folder.h"
-#include "filter-source.h"
-
-
-static gboolean validate (FilterElement *fe);
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static FilterElement *clone(FilterElement *fe);
-
-static void filter_element_class_init (FilterElementClass *class);
-static void filter_element_init (FilterElement *gspaper);
-static void filter_element_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterElement *)(x))->priv)
-struct _FilterElementPrivate {
-};
-
-static GtkObjectClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_element_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterElement",
- sizeof(FilterElement),
- sizeof(FilterElementClass),
- (GtkClassInitFunc)filter_element_class_init,
- (GtkObjectInitFunc)filter_element_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(gtk_object_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_element_class_init (FilterElementClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- object_class->finalize = filter_element_finalise;
-
- /* override methods */
- class->validate = validate;
- class->xml_create = xml_create;
- class->clone = clone;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_element_init (FilterElement *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_element_finalise (GtkObject *obj)
-{
- FilterElement *o = (FilterElement *)obj;
-
- xmlFree(o->name);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_element_new:
- *
- * Create a new FilterElement object.
- *
- * Return value: A new #FilterElement object.
- **/
-FilterElement *
-filter_element_new (void)
-{
- FilterElement *o = (FilterElement *)gtk_type_new(filter_element_get_type ());
- return o;
-}
-
-gboolean
-filter_element_validate (FilterElement *fe)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->validate (fe);
-}
-
-/**
- * filter_element_xml_create:
- * @fe: filter element
- * @node: xml node
- *
- * Create a new filter element based on an xml definition of
- * that element.
- **/
-void
-filter_element_xml_create (FilterElement *fe, xmlNodePtr node)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->xml_create(fe, node);
-}
-
-/**
- * filter_element_xml_encode:
- * @fe: filter element
- *
- * Encode the values of a filter element into xml format.
- *
- * Return value:
- **/
-xmlNodePtr
-filter_element_xml_encode (FilterElement *fe)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->xml_encode(fe);
-}
-
-/**
- * filter_element_xml_decode:
- * @fe: filter element
- * @node: xml node
- *
- * Decode the values of a fitler element from xml format.
- *
- * Return value:
- **/
-int
-filter_element_xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->xml_decode(fe, node);
-}
-
-/**
- * filter_element_clone:
- * @fe: filter element
- *
- * Clones the FilterElement @fe.
- *
- * Return value:
- **/
-FilterElement *
-filter_element_clone (FilterElement *fe)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->clone(fe);
-}
-
-/**
- * filter_element_get_widget:
- * @fe: filter element
- * @node: xml node
- *
- * Create a widget to represent this element.
- *
- * Return value:
- **/
-GtkWidget *
-filter_element_get_widget (FilterElement *fe)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->get_widget(fe);
-}
-
-/**
- * filter_element_build_code:
- * @fe: filter element
- * @out: output buffer
- * @ff:
- *
- * Add the code representing this element to the output string @out.
- **/
-void
-filter_element_build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->build_code(fe, out, ff);
-}
-
-/**
- * filter_element_format_sexp:
- * @fe: filter element
- * @out: output buffer
- *
- * Format the value(s) of this element in a method suitable for the context of
- * sexp where it is used. Usually as space separated, double-quoted strings.
- **/
-void
-filter_element_format_sexp (FilterElement *fe, GString *out)
-{
- return ((FilterElementClass *)((GtkObject *)fe)->klass)->format_sexp(fe, out);
-}
-
-/**
- * filter_element_new_type_name:
- * @type: filter element type
- *
- * Create a new filter element based on its type name.
- *
- * Return value:
- **/
-FilterElement *
-filter_element_new_type_name (const char *type)
-{
- if (type == NULL)
- return NULL;
-
- if (!strcmp (type, "string")) {
- return (FilterElement *)filter_input_new ();
- } else if (!strcmp (type, "folder")) {
- return (FilterElement *)filter_folder_new ();
- } else if (!strcmp (type, "address")) {
- /* FIXME: temporary ... need real address type */
- return (FilterElement *)filter_input_new_type_name (type);
- } else if (!strcmp (type, "code")) {
- return (FilterElement *)filter_code_new ();
- } else if (!strcmp (type, "colour")) {
- return (FilterElement *)filter_colour_new ();
- } else if (!strcmp (type, "optionlist") || !strcmp (type, "system-flag")) {
- return (FilterElement *)filter_option_new ();
- } else if (!strcmp (type, "datespec")) {
- return (FilterElement *)filter_datespec_new ();
- } else if (!strcmp (type, "score")) {
- return (FilterElement *)filter_score_new ();
- } else if (!strcmp (type, "integer")) {
- return (FilterElement *)filter_int_new ();
- } else if (!strcmp (type, "regex")) {
- return (FilterElement *)filter_input_new_type_name (type);
- } else if (!strcmp (type, "source")) {
- return (FilterElement *)filter_source_new ();
- } else {
- g_warning("Unknown filter type '%s'", type);
- return 0;
- }
-}
-
-void
-filter_element_set_data (FilterElement *fe, gpointer data)
-{
- fe->data = data;
-}
-
-/* default implementations */
-static gboolean
-validate (FilterElement *fe)
-{
- return TRUE;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- fe->name = xmlGetProp (node, "name");
-}
-
-static FilterElement *
-clone (FilterElement *fe)
-{
- xmlNodePtr node;
- FilterElement *new;
-
- new = (FilterElement *)gtk_type_new (GTK_OBJECT (fe)->klass->type);
- node = filter_element_xml_encode (fe);
- filter_element_xml_decode (new, node);
- xmlFreeNodeList (node);
-
- return new;
-}
diff --git a/filter/filter-element.h b/filter/filter-element.h
deleted file mode 100644
index bb5584d0f7..0000000000
--- a/filter/filter-element.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_ELEMENT_H
-#define _FILTER_ELEMENT_H
-
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-
-#define FILTER_ELEMENT(obj) GTK_CHECK_CAST (obj, filter_element_get_type (), FilterElement)
-#define FILTER_ELEMENT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_element_get_type (), FilterElementClass)
-#define IS_FILTER_ELEMENT(obj) GTK_CHECK_TYPE (obj, filter_element_get_type ())
-
-typedef struct _FilterElement FilterElement;
-typedef struct _FilterElementClass FilterElementClass;
-
-struct _FilterElement {
- GtkObject parent;
- struct _FilterElementPrivate *priv;
-
- char *name;
- gpointer data;
-};
-
-struct _FilterPart;
-
-struct _FilterElementClass {
- GtkObjectClass parent_class;
-
- /* virtual methods */
- gboolean (*validate)(FilterElement *fe);
-
- void (*xml_create)(FilterElement *, xmlNodePtr);
- xmlNodePtr (*xml_encode)(FilterElement *);
- int (*xml_decode)(FilterElement *, xmlNodePtr);
-
- FilterElement *(*clone)(FilterElement *fe);
-
- GtkWidget *(*get_widget)(FilterElement *);
- void (*build_code)(FilterElement *, GString *, struct _FilterPart *ff);
- void (*format_sexp)(FilterElement *, GString *);
-
- /* signals */
-};
-
-guint filter_element_get_type (void);
-FilterElement *filter_element_new (void);
-
-FilterElement *filter_element_new_type_name (const char *type);
-
-void filter_element_set_data (FilterElement *fe, gpointer data);
-
-/* methods */
-gboolean filter_element_validate (FilterElement *fe);
-
-void filter_element_xml_create (FilterElement *fe, xmlNodePtr node);
-
-xmlNodePtr filter_element_xml_encode (FilterElement *fe);
-int filter_element_xml_decode (FilterElement *fe, xmlNodePtr node);
-FilterElement *filter_element_clone (FilterElement *fe);
-
-GtkWidget *filter_element_get_widget (FilterElement *fe);
-void filter_element_build_code (FilterElement *fe, GString *out, struct _FilterPart *ff);
-void filter_element_format_sexp (FilterElement *fe, GString *out);
-
-#endif /* ! _FILTER_ELEMENT_H */
-
diff --git a/filter/filter-filter.c b/filter/filter-filter.c
deleted file mode 100644
index f8d369adcf..0000000000
--- a/filter/filter-filter.c
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * Copyright (C) 2000-2001 Ximian Inc.
- *
- * Authors: Not Zed <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "filter-filter.h"
-#include "filter-context.h"
-
-#define d(x)
-
-static int validate(FilterRule *);
-static xmlNodePtr xml_encode (FilterRule *);
-static int xml_decode (FilterRule *, xmlNodePtr, struct _RuleContext *f);
-static void rule_copy (FilterRule *dest, FilterRule *src);
-/*static void build_code(FilterRule *, GString *out);*/
-static GtkWidget *get_widget (FilterRule *fr, struct _RuleContext *f);
-
-static void filter_filter_class_init (FilterFilterClass *class);
-static void filter_filter_init (FilterFilter *gspaper);
-static void filter_filter_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterFilter *)(x))->priv)
-
-struct _FilterFilterPrivate {
-};
-
-static FilterRuleClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_filter_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterFilter",
- sizeof(FilterFilter),
- sizeof(FilterFilterClass),
- (GtkClassInitFunc)filter_filter_class_init,
- (GtkObjectInitFunc)filter_filter_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(filter_rule_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_filter_class_init (FilterFilterClass *class)
-{
- GtkObjectClass *object_class;
- FilterRuleClass *filter_rule = (FilterRuleClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (filter_rule_get_type ());
-
- object_class->finalize = filter_filter_finalise;
-
- /* override methods */
- filter_rule->validate = validate;
- filter_rule->xml_encode = xml_encode;
- filter_rule->xml_decode = xml_decode;
- /*filter_rule->build_code = build_code;*/
- filter_rule->copy = rule_copy;
- filter_rule->get_widget = get_widget;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_filter_init (FilterFilter *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-unref_list (GList *l)
-{
- while (l) {
- gtk_object_unref (GTK_OBJECT (l->data));
- l = g_list_next (l);
- }
-}
-
-static void
-filter_filter_finalise (GtkObject *obj)
-{
- FilterFilter *o = (FilterFilter *)obj;
-
- unref_list (o->actions);
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-/**
- * filter_filter_new:
- *
- * Create a new FilterFilter object.
- *
- * Return value: A new #FilterFilter object.
- **/
-FilterFilter *
-filter_filter_new (void)
-{
- FilterFilter *o = (FilterFilter *)gtk_type_new(filter_filter_get_type ());
- return o;
-}
-
-void
-filter_filter_add_action (FilterFilter *fr, FilterPart *fp)
-{
- fr->actions = g_list_append (fr->actions, fp);
-
- filter_rule_emit_changed((FilterRule *)fr);
-}
-
-void
-filter_filter_remove_action (FilterFilter *fr, FilterPart *fp)
-{
- fr->actions = g_list_remove (fr->actions, fp);
-
- filter_rule_emit_changed((FilterRule *)fr);
-}
-
-void
-filter_filter_replace_action (FilterFilter *fr, FilterPart *fp, FilterPart *new)
-{
- GList *l;
-
- l = g_list_find (fr->actions, fp);
- if (l) {
- l->data = new;
- } else {
- fr->actions = g_list_append (fr->actions, new);
- }
-
- filter_rule_emit_changed((FilterRule *)fr);
-}
-
-void
-filter_filter_build_action (FilterFilter *fr, GString *out)
-{
- g_string_append (out, "(begin\n");
- filter_part_build_code_list (fr->actions, out);
- g_string_append (out, ")\n");
-}
-
-static int
-validate(FilterRule *fr)
-{
- int valid;
- GList *parts;
- FilterFilter *ff = (FilterFilter *)fr;
-
- valid = ((FilterRuleClass *)(parent_class))->validate(fr);
-
- /* validate rule actions */
- parts = ff->actions;
- while (parts && valid) {
- valid = filter_part_validate((FilterPart *)parts->data);
- parts = parts->next;
- }
-
- return valid;
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- xmlNodePtr node, set, work;
- GList *l;
- FilterFilter *ff = (FilterFilter *)fr;
-
- node = ((FilterRuleClass *)(parent_class))->xml_encode (fr);
- g_assert (node != NULL);
- set = xmlNewNode (NULL, "actionset");
- xmlAddChild (node, set);
- l = ff->actions;
- while (l) {
- work = filter_part_xml_encode ((FilterPart *)l->data);
- xmlAddChild (set, work);
- l = g_list_next (l);
- }
-
- return node;
-
-}
-
-static void
-load_set (xmlNodePtr node, FilterFilter *ff, RuleContext *f)
-{
- xmlNodePtr work;
- char *rulename;
- FilterPart *part;
-
- work = node->childs;
- while (work) {
- if (!strcmp (work->name, "part")) {
- rulename = xmlGetProp (work, "name");
- part = filter_context_find_action ((FilterContext *)f, rulename);
- if (part) {
- part = filter_part_clone (part);
- filter_part_xml_decode (part, work);
- filter_filter_add_action (ff, part);
- } else {
- g_warning ("cannot find rule part '%s'\n", rulename);
- }
- xmlFree (rulename);
- } else {
- g_warning ("Unknwon xml node in part: %s", work->name);
- }
- work = work->next;
- }
-}
-
-static int
-xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
-{
- xmlNodePtr work;
- FilterFilter *ff = (FilterFilter *)fr;
- int result;
-
- result = ((FilterRuleClass *)(parent_class))->xml_decode (fr, node, f);
- if (result != 0)
- return result;
-
- work = node->childs;
- while (work) {
- if (!strcmp (work->name, "actionset")) {
- load_set (work, ff, f);
- }
- work = work->next;
- }
-
- return 0;
-}
-
-static void
-rule_copy (FilterRule *dest, FilterRule *src)
-{
- FilterFilter *fdest, *fsrc;
- GList *node;
-
- fdest = (FilterFilter *) dest;
- fsrc = (FilterFilter *) src;
-
- if (fdest->actions) {
- g_list_foreach (fdest->actions, (GFunc) gtk_object_unref, NULL);
- g_list_free (fdest->actions);
- fdest->actions = NULL;
- }
-
- node = fsrc->actions;
- while (node) {
- FilterPart *part = node->data;
-
- gtk_object_ref (GTK_OBJECT (part));
- fdest->actions = g_list_append (fdest->actions, part);
- node = node->next;
- }
-
- ((FilterRuleClass *)(parent_class))->copy (dest, src);
-}
-
-/*static void build_code(FilterRule *fr, GString *out)
-{
- return ((FilterRuleClass *)(parent_class))->build_code(fr, out);
-}*/
-
-struct _part_data {
- FilterRule *fr;
- FilterContext *f;
- FilterPart *part;
- GtkWidget *partwidget, *container;
-};
-
-static void
-option_activate (GtkMenuItem *item, struct _part_data *data)
-{
- FilterPart *part = gtk_object_get_data (GTK_OBJECT (item), "part");
- FilterPart *newpart;
-
- /* dont update if we haven't changed */
- if (!strcmp (part->title, data->part->title))
- return;
-
- /* here we do a widget shuffle, throw away the old widget/rulepart,
- and create another */
- if (data->partwidget)
- gtk_container_remove (GTK_CONTAINER (data->container), data->partwidget);
-
- newpart = filter_part_clone (part);
- filter_filter_replace_action ((FilterFilter *)data->fr, data->part, newpart);
- gtk_object_unref (GTK_OBJECT (data->part));
- data->part = newpart;
- data->partwidget = filter_part_get_widget (newpart);
- if (data->partwidget)
- gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, FALSE, FALSE, 0);
-
- gtk_object_set_data (GTK_OBJECT (data->container), "part", newpart);
-}
-
-static GtkWidget *
-get_rule_part_widget (FilterContext *f, FilterPart *newpart, FilterRule *fr)
-{
- FilterPart *part = NULL;
- GtkWidget *menu;
- GtkWidget *item;
- GtkWidget *omenu;
- GtkWidget *hbox;
- GtkWidget *p;
- int index = 0, current = 0;
- struct _part_data *data;
-
- data = g_malloc0 (sizeof (*data));
- data->fr = fr;
- data->f = f;
- data->part = newpart;
-
- hbox = gtk_hbox_new (FALSE, 0);
- p = filter_part_get_widget (newpart);
-
- data->partwidget = p;
- data->container = hbox;
-
- menu = gtk_menu_new ();
- while ((part = filter_context_next_action (f, part))) {
- item = gtk_menu_item_new_with_label (_(part->title));
-
- gtk_object_set_data (GTK_OBJECT (item), "part", part);
- gtk_signal_connect (GTK_OBJECT (item), "activate", option_activate, data);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
-
- if (!strcmp (newpart->title, part->title)) {
- current = index;
- }
- index++;
- }
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
- gtk_widget_show (omenu);
-
- gtk_box_pack_start (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
- if (p) {
- gtk_box_pack_start (GTK_BOX (hbox), p, FALSE, FALSE, 0);
- }
- gtk_widget_show_all (hbox);
-
- return hbox;
-}
-
-struct _rule_data {
- FilterRule *fr;
- FilterContext *f;
- GtkWidget *parts;
-};
-
-static void
-less_parts (GtkWidget *button, struct _rule_data *data)
-{
- FilterPart *part;
- GtkWidget *rule;
- GList *l;
-
- l = ((FilterFilter *)data->fr)->actions;
- if (g_list_length (l) < 2)
- return;
-
- rule = gtk_object_get_data (GTK_OBJECT (button), "rule");
- part = gtk_object_get_data (GTK_OBJECT (rule), "part");
-
- /* remove the part from the list */
- filter_filter_remove_action ((FilterFilter *)data->fr, part);
- gtk_object_unref (GTK_OBJECT (part));
-
- /* and from the display */
- gtk_container_remove (GTK_CONTAINER (data->parts), rule);
- gtk_container_remove (GTK_CONTAINER (data->parts), button);
-}
-
-static void
-attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
-{
- GtkWidget *remove;
- GtkWidget *pixmap;
-
- gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
- remove = gnome_pixmap_button (pixmap, _("Remove"));
- gtk_object_set_data (GTK_OBJECT (remove), "rule", rule);
- gtk_object_set_data (GTK_OBJECT (rule), "part", part);
- /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
- gtk_signal_connect (GTK_OBJECT (remove), "clicked", less_parts, data);
- gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
- 0, 0, 0, 0);
- gtk_widget_show (remove);
-}
-
-static void
-more_parts (GtkWidget *button, struct _rule_data *data)
-{
- FilterPart *new;
-
- /* create a new rule entry, use the first type of rule */
- new = filter_context_next_action ((FilterContext *)data->f, NULL);
- if (new) {
- GtkWidget *w;
- guint16 rows;
-
- new = filter_part_clone (new);
- filter_filter_add_action ((FilterFilter *)data->fr, new);
- w = get_rule_part_widget (data->f, new, data->fr);
-
- rows = GTK_TABLE (data->parts)->nrows;
- gtk_table_resize (GTK_TABLE (data->parts), rows + 1, 2);
- attach_rule (w, data, new, rows);
- }
-}
-
-static GtkWidget *
-get_widget (FilterRule *fr, struct _RuleContext *f)
-{
- GtkWidget *widget;
- GtkWidget *parts, *inframe;
- GtkWidget *hbox;
- GtkWidget *add, *pixmap;
- GtkWidget *w;
- GtkWidget *frame;
- GtkWidget *scrolledwindow;
- GtkObject *hadj, *vadj;
- GList *l;
- FilterPart *part;
- struct _rule_data *data;
- FilterFilter *ff = (FilterFilter *)fr;
- gint rows, i = 0;
-
- widget = ((FilterRuleClass *)(parent_class))->get_widget (fr, f);
-
- /* and now for the action area */
- frame = gtk_frame_new (_("Then"));
- inframe = gtk_vbox_new (FALSE, 3);
- gtk_container_add (GTK_CONTAINER (frame), inframe);
-
- rows = g_list_length (ff->actions);
- parts = gtk_table_new (rows, 2, FALSE);
- data = g_malloc0 (sizeof (*data));
- data->f = (FilterContext *)f;
- data->fr = fr;
- data->parts = parts;
-
- hbox = gtk_hbox_new (FALSE, 3);
-
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_ADD);
- add = gnome_pixmap_button (pixmap, _("Add action"));
- /* gtk_button_set_relief (GTK_BUTTON (add), GTK_RELIEF_NONE); */
- gtk_signal_connect (GTK_OBJECT (add), "clicked", more_parts, data);
- gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 3);
-
- gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3);
-
- l = ff->actions;
- while (l) {
- part = l->data;
- d(printf ("adding action %s\n", part->title));
- w = get_rule_part_widget ((FilterContext *)f, part, fr);
- attach_rule (w, data, part, i++);
- l = g_list_next (l);
- }
-
- hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
- vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
- scrolledwindow = gtk_scrolled_window_new (GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj));
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), parts);
-
- gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 3);
-
- /*gtk_box_pack_start (GTK_BOX (inframe), parts, FALSE, FALSE, 3);*/
-
- gtk_widget_show_all (frame);
-
- gtk_box_pack_start (GTK_BOX (widget), frame, TRUE, TRUE, 3);
-
- return widget;
-}
diff --git a/filter/filter-filter.h b/filter/filter-filter.h
deleted file mode 100644
index d5076af9e4..0000000000
--- a/filter/filter-filter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_FILTER_H
-#define _FILTER_FILTER_H
-
-#include "filter-rule.h"
-
-#define FILTER_FILTER(obj) GTK_CHECK_CAST (obj, filter_filter_get_type (), FilterFilter)
-#define FILTER_FILTER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_filter_get_type (), FilterFilterClass)
-#define IS_FILTER_FILTER(obj) GTK_CHECK_TYPE (obj, filter_filter_get_type ())
-
-typedef struct _FilterFilter FilterFilter;
-typedef struct _FilterFilterClass FilterFilterClass;
-
-struct _FilterFilter {
- FilterRule parent;
- struct _FilterFilterPrivate *priv;
-
- GList *actions;
-};
-
-struct _FilterFilterClass {
- FilterRuleClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_filter_get_type (void);
-FilterFilter *filter_filter_new (void);
-
-/* methods */
-void filter_filter_add_action (FilterFilter *fr, FilterPart *fp);
-void filter_filter_remove_action (FilterFilter *fr, FilterPart *fp);
-void filter_filter_replace_action (FilterFilter *fr, FilterPart *fp, FilterPart *new);
-
-void filter_filter_build_action (FilterFilter *fr, GString *out);
-
-#endif /* ! _FILTER_FILTER_H */
-
diff --git a/filter/filter-folder.c b/filter/filter-folder.c
deleted file mode 100644
index c79059178e..0000000000
--- a/filter/filter-folder.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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.
- */
-
-#include <config.h>
-
-#define SHELL
-
-#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/widgets/e-unicode.h>
-
-#include "filter-folder.h"
-#ifdef SHELL
-#include "shell/evolution-shell-client.h"
-#endif
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget(FilterElement *fe);
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp(FilterElement *, GString *);
-
-#ifdef SHELL
-extern EvolutionShellClient *global_shell_client;
-#endif
-
-static void filter_folder_class_init (FilterFolderClass *class);
-static void filter_folder_init (FilterFolder *gspaper);
-static void filter_folder_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterFolder *)(x))->priv)
-
-struct _FilterFolderPrivate {
-};
-
-static FilterElementClass *parent_class;
-
-guint
-filter_folder_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterFolder",
- sizeof(FilterFolder),
- sizeof(FilterFolderClass),
- (GtkClassInitFunc)filter_folder_class_init,
- (GtkObjectInitFunc)filter_folder_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_folder_class_init (FilterFolderClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (filter_element_get_type ());
-
- object_class->finalize = filter_folder_finalise;
-
- /* override methods */
- filter_element->validate = validate;
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-}
-
-static void
-filter_folder_init (FilterFolder *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_folder_finalise (GtkObject *obj)
-{
- FilterFolder *o = (FilterFolder *)obj;
-
- g_free (o->uri);
- g_free (o->name);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_folder_new:
- *
- * Create a new FilterFolder object.
- *
- * Return value: A new #FilterFolder object.
- **/
-FilterFolder *
-filter_folder_new (void)
-{
- FilterFolder *o = (FilterFolder *)gtk_type_new (filter_folder_get_type ());
- return o;
-}
-
-static gboolean
-validate (FilterElement *fe)
-{
- FilterFolder *ff = (FilterFolder *) fe;
-
- if (ff->uri && *ff->uri) {
- return TRUE;
- } else {
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog (_("Oops, you forgot to choose a folder.\n"
- "Please go back and specify a valid folder to deliver mail to."));
-
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- return FALSE;
- }
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value, work;
- FilterFolder *ff = (FilterFolder *)fe;
-
- d(printf ("Encoding folder as xml\n"));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", "folder");
-
- work = xmlNewChild (value, NULL, "folder", NULL);
- xmlSetProp (work, "name", ff->name);
- xmlSetProp (work, "uri", ff->uri);
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterFolder *ff = (FilterFolder *)fe;
- xmlNodePtr n;
-
- d(printf ("Decoding folder from xml %p\n", fe));
-
- xmlFree (fe->name);
- fe->name = xmlGetProp (node, "name");
-
- n = node->childs;
- while (n) {
- if (!strcmp (n->name, "folder")) {
- char *uri, *name;
-
- name = xmlGetProp (n, "name");
- g_free (ff->name);
- ff->name = g_strdup (name);
- xmlFree (name);
-
- uri = xmlGetProp (n, "uri");
- g_free (ff->uri);
- ff->uri = g_strdup (uri);
- xmlFree (uri);
- break;
- }
- n = n->next;
- }
-
- return 0;
-}
-
-static void
-button_clicked (GtkButton *button, FilterFolder *ff)
-{
-#ifdef SHELL
- const char *allowed_types[] = { "mail", NULL };
- char *def, *physical_uri, *evolution_uri;
- static gboolean is_active = FALSE;
- gchar *s;
-
- if (is_active)
- return;
-
- is_active = TRUE;
-
- def = ff->uri ? ff->uri : "";
-
- evolution_shell_client_user_select_folder (global_shell_client,
- _("Select Folder"),
- def, allowed_types,
- &evolution_uri,
- &physical_uri);
-
- if (physical_uri != NULL && physical_uri[0] != '\0') {
- g_free (ff->uri);
- ff->uri = physical_uri;
-
- g_free (ff->name);
- ff->name = g_strdup (g_basename (evolution_uri));
- s = e_utf8_to_gtk_string (GTK_WIDGET (button), ff->name);
- gtk_label_set_text (GTK_LABEL (GTK_BIN (button)->child), s);
- g_free (s);
- } else {
- g_free (physical_uri);
- }
- g_free (evolution_uri);
-
- is_active = FALSE;
-#else
- GnomeDialog *gd;
- GtkEntry *entry;
- char *uri, *str;
-
- gd = (GnomeDialog *)gnome_dialog_new(_("Enter folder URI"),
- GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gtk_window_set_policy(GTK_WINDOW(gd), FALSE, TRUE, FALSE);
- entry = (GtkEntry *)gtk_entry_new();
- if (ff->uri) {
- e_utf8_gtk_entry_set_text(entry, ff->uri);
- }
- gtk_box_pack_start((GtkBox *)gd->vbox, (GtkWidget *)entry, TRUE, TRUE, 3);
- gtk_widget_show((GtkWidget *)entry);
- switch (gnome_dialog_run(gd)) {
- case 0:
- g_free(ff->uri);
- g_free(ff->name);
- uri = e_utf8_gtk_entry_get_text(entry);
- ff->uri = uri;
- str = strstr(uri, "//");
- if (str)
- str = strchr(str+2, '/');
- if (str)
- str++;
- else
- str = uri;
- ff->name = g_strdup(str);
- s = e_utf8_to_gtk_string ((GtkWidget *) button, ff->name);
- gtk_label_set_text((GtkLabel *)GTK_BIN(button)->child, s);
- g_free (s);
- case 1:
- gnome_dialog_close(gd);
- case -1:
- /* nothing */
- }
-
-#endif
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterFolder *ff = (FilterFolder *)fe;
- GtkWidget *button;
- GtkWidget *label;
-
- if (ff->name && ff->name[0])
- label = gtk_label_new (g_basename (ff->name));
- else
- label = gtk_label_new (_("<click here to select a folder>"));
-
- button = gtk_button_new ();
- gtk_container_add (GTK_CONTAINER (button), label);
- gtk_widget_show (button);
- gtk_widget_show (label);
- gtk_signal_connect (GTK_OBJECT (button), "clicked", button_clicked, ff);
-
- return button;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterFolder *ff = (FilterFolder *)fe;
-
- e_sexp_encode_string (out, ff->uri);
-}
diff --git a/filter/filter-folder.h b/filter/filter-folder.h
deleted file mode 100644
index 3ce2c25afa..0000000000
--- a/filter/filter-folder.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_FOLDER_H
-#define _FILTER_FOLDER_H
-
-#include "filter-element.h"
-
-#define FILTER_FOLDER(obj) GTK_CHECK_CAST (obj, filter_folder_get_type (), FilterFolder)
-#define FILTER_FOLDER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_folder_get_type (), FilterFolderClass)
-#define IS_FILTER_FOLDER(obj) GTK_CHECK_TYPE (obj, filter_folder_get_type ())
-
-typedef struct _FilterFolder FilterFolder;
-typedef struct _FilterFolderClass FilterFolderClass;
-
-struct _FilterFolder {
- FilterElement parent;
- struct _FilterFolderPrivate *priv;
-
- char *uri;
- char *name; /* name of folder for display? */
-};
-
-struct _FilterFolderClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_folder_get_type (void);
-FilterFolder *filter_folder_new (void);
-
-/* methods */
-
-#endif /* ! _FILTER_FOLDER_H */
-
diff --git a/filter/filter-input.c b/filter/filter-input.c
deleted file mode 100644
index dc35f2bec3..0000000000
--- a/filter/filter-input.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <string.h>
-#include <sys/types.h>
-#include <regex.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 <gal/widgets/e-unicode.h>
-
-#include "filter-input.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static gboolean validate (FilterElement *fe);
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget(FilterElement *fe);
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp(FilterElement *, GString *);
-
-static void filter_input_class_init (FilterInputClass *class);
-static void filter_input_init (FilterInput *gspaper);
-static void filter_input_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterInput *)(x))->priv)
-
-struct _FilterInputPrivate {
-};
-
-static FilterElementClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_input_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterInput",
- sizeof(FilterInput),
- sizeof(FilterInputClass),
- (GtkClassInitFunc)filter_input_class_init,
- (GtkObjectInitFunc)filter_input_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_input_class_init (FilterInputClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(filter_element_get_type ());
-
- object_class->finalize = filter_input_finalise;
-
- /* override methods */
- filter_element->validate = validate;
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_input_init (FilterInput *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_input_finalise (GtkObject *obj)
-{
- FilterInput *o = (FilterInput *)obj;
-
- xmlFree (o->type);
- g_list_foreach(o->values, (GFunc)g_free, NULL);
- g_list_free(o->values);
-
- g_free(o->priv);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_input_new:
- *
- * Create a new FilterInput object.
- *
- * Return value: A new #FilterInput object.
- **/
-FilterInput *
-filter_input_new (void)
-{
- FilterInput *o = (FilterInput *)gtk_type_new(filter_input_get_type ());
- return o;
-}
-
-FilterInput *
-filter_input_new_type_name (const char *type)
-{
- FilterInput *o = filter_input_new ();
- o->type = xmlStrdup (type);
-
- d(printf("new type %s = %p\n", type, o));
- return o;
-}
-
-void
-filter_input_set_value (FilterInput *fi, const char *value)
-{
- GList *l;
-
- l = fi->values;
- while (l) {
- g_free (l->data);
- l = g_list_next (l);
- }
- g_list_free (fi->values);
-
- fi->values = g_list_append (NULL, g_strdup (value));
-}
-
-static gboolean
-validate (FilterElement *fe)
-{
- FilterInput *fi = (FilterInput *)fe;
- gboolean valid = TRUE;
-
- if (!strcmp (fi->type, "regex")) {
- regex_t regexpat; /* regex patern */
- gint regerr;
- char *text;
-
- text = fi->values->data;
-
- regerr = regcomp (&regexpat, text, REG_EXTENDED | REG_NEWLINE | REG_ICASE);
- if (regerr) {
- GtkWidget *dialog;
- gchar *regmsg, *errmsg;
- size_t reglen;
-
- /* regerror gets called twice to get the full error string
- length to do proper posix error reporting */
- reglen = regerror (regerr, &regexpat, 0, 0);
- regmsg = g_malloc0 (reglen + 1);
- regerror (regerr, &regexpat, regmsg, reglen);
-
- errmsg = g_strdup_printf (_("Error in regular expression '%s':\n%s"),
- text, regmsg);
- g_free (regmsg);
-
- dialog = gnome_ok_dialog (errmsg);
-
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- g_free (errmsg);
- valid = FALSE;
- }
-
- regfree (&regexpat);
- }
-
- return valid;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value;
- GList *l;
- FilterInput *fi = (FilterInput *)fe;
- char *type;
-
- type = fi->type ? fi->type : "string";
-
- d(printf ("Encoding %s as xml\n", type));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", type);
- l = fi->values;
- while (l) {
- xmlNodePtr cur;
- char *str = l->data;
- char *encstr;
-
- cur = xmlNewChild (value, NULL, type, NULL);
- encstr = e_utf8_xml1_encode (str);
- xmlNodeSetContent (cur, encstr);
- g_free (encstr);
- l = g_list_next (l);
- }
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterInput *fi = (FilterInput *)fe;
- char *name, *str, *type;
- xmlNodePtr n;
-
- name = xmlGetProp (node, "name");
- type = xmlGetProp (node, "type");
-
- d(printf("Decoding %s from xml %p\n", type, fe));
- d(printf ("Name = %s\n", name));
- xmlFree (fe->name);
- fe->name = name;
- xmlFree (fi->type);
- fi->type = type;
- n = node->childs;
- while (n) {
- if (!strcmp (n->name, type)) {
- gchar *decstr;
- str = xmlNodeGetContent (n);
- decstr = e_utf8_xml1_decode (str);
- if (str)
- xmlFree (str);
- d(printf (" '%s'\n", decstr));
- fi->values = g_list_append (fi->values, decstr);
- } else {
- g_warning ("Unknown node type '%s' encountered decoding a %s\n", n->name, type);
- }
- n = n->next;
- }
-
- return 0;
-}
-
-static void
-entry_changed (GtkEntry *entry, FilterElement *fe)
-{
- char *new;
- FilterInput *fi = (FilterInput *)fe;
- GList *l;
-
- new = e_utf8_gtk_entry_get_text(entry);
-
- /* NOTE: entry only supports a single value ... */
- l = fi->values;
- while (l) {
- g_free (l->data);
- l = g_list_next (l);
- }
-
- g_list_free (fi->values);
-
- fi->values = g_list_append (NULL, new);
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- GtkWidget *entry;
- FilterInput *fi = (FilterInput *)fe;
-
- entry = gtk_entry_new ();
- if (fi->values && fi->values->data) {
- e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), fi->values->data);
- }
-
- gtk_signal_connect (GTK_OBJECT (entry), "changed", entry_changed, fe);
-
- return entry;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- GList *l;
- FilterInput *fi = (FilterInput *)fe;
-
- l = fi->values;
- while (l) {
- e_sexp_encode_string (out, l->data);
- l = g_list_next (l);
- }
-}
diff --git a/filter/filter-input.h b/filter/filter-input.h
deleted file mode 100644
index 2c522d34e5..0000000000
--- a/filter/filter-input.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_INPUT_H
-#define _FILTER_INPUT_H
-
-#include "filter-element.h"
-
-#define FILTER_INPUT(obj) GTK_CHECK_CAST (obj, filter_input_get_type (), FilterInput)
-#define FILTER_INPUT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_input_get_type (), FilterInputClass)
-#define IS_FILTER_INPUT(obj) GTK_CHECK_TYPE (obj, filter_input_get_type ())
-
-typedef struct _FilterInput FilterInput;
-typedef struct _FilterInputClass FilterInputClass;
-
-struct _FilterInput {
- FilterElement parent;
- struct _FilterInputPrivate *priv;
-
- char *type; /* name of type */
- GList *values; /* strings */
-};
-
-struct _FilterInputClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_input_get_type (void);
-FilterInput *filter_input_new (void);
-
-FilterInput *filter_input_new_type_name (const char *type);
-
-/* methods */
-void filter_input_set_value(FilterInput *fi, const char *value);
-
-#endif /* ! _FILTER_INPUT_H */
-
diff --git a/filter/filter-int.c b/filter/filter-int.c
deleted file mode 100644
index e6d2656b46..0000000000
--- a/filter/filter-int.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Ripped off by Sam Creasey <sammy@oh.verio.com> from filter-score by:
- *
- * 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 <stdlib.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-
-#include "e-util/e-sexp.h"
-#include "filter-int.h"
-
-#define d(x)
-
-static void xml_create (FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode (FilterElement *fe);
-static int xml_decode (FilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget (FilterElement *fe);
-static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp (FilterElement *, GString *);
-
-static void filter_int_class_init (FilterIntClass *class);
-static void filter_int_init (FilterInt *gspaper);
-static void filter_int_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterInt *)(x))->priv)
-
-struct _FilterIntPrivate {
-};
-
-static FilterElementClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_int_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterInt",
- sizeof (FilterInt),
- sizeof (FilterIntClass),
- (GtkClassInitFunc) filter_int_class_init,
- (GtkObjectInitFunc) filter_int_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_int_class_init (FilterIntClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (filter_element_get_type ());
-
- object_class->finalize = filter_int_finalise;
-
- /* override methods */
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_int_init (FilterInt *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_int_finalise(GtkObject *obj)
-{
- FilterInt *o = (FilterInt *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_int_new:
- *
- * Create a new FilterInt object.
- *
- * Return value: A new #FilterInt object.
- **/
-FilterInt *
-filter_int_new (void)
-{
- FilterInt *o = (FilterInt *)gtk_type_new(filter_int_get_type ());
- return o;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value;
- FilterInt *fs = (FilterInt *)fe;
- char *intval;
-
- d(printf("Encoding integer as xml\n"));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", "integer");
-
- intval = g_strdup_printf ("%d", fs->val);
- xmlSetProp (value, "integer", intval);
- g_free (intval);
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterInt *fs = (FilterInt *)fe;
- char *name;
- char *intval;
-
- d(printf("Decoding integer from xml %p\n", fe));
-
- name = xmlGetProp (node, "name");
- d(printf ("Name = %s\n", name));
- xmlFree (fe->name);
- fe->name = name;
- intval = xmlGetProp (node, "integer");
- if (intval) {
- fs->val = atoi (intval);
- xmlFree (intval);
- } else
- fs->val = 0;
-
- return 0;
-}
-
-static void
-spin_changed (GtkWidget *spin, FilterElement *fe)
-{
- FilterInt *fs = (FilterInt *)fe;
-
- fs->val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- GtkWidget *spin;
- GtkObject *adjustment;
- FilterInt *fs = (FilterInt *)fe;
-
- adjustment = gtk_adjustment_new (0.0, 0.0, (gfloat)G_MAXINT,
- 1.0, 1.0, 1.0);
- spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 5.0, 0);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
-
- if (fs->val) {
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), (gfloat) fs->val);
- }
-
- gtk_signal_connect (GTK_OBJECT (spin), "changed", spin_changed, fe);
-
- return spin;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterInt *fs = (FilterInt *)fe;
-
- g_string_append(out, g_strdup_printf("%d", fs->val));
-}
diff --git a/filter/filter-int.h b/filter/filter-int.h
deleted file mode 100644
index 1fb702aec1..0000000000
--- a/filter/filter-int.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Ripped off by Sam Creasey <sammy@oh.verio.com> from filter-score by:
- *
- * 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 _FILTER_INT_H
-#define _FILTER_INT_H
-
-#include "filter-element.h"
-
-#define FILTER_INT(obj) GTK_CHECK_CAST (obj, filter_int_get_type (), FilterInt)
-#define FILTER_INT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_int_get_type (), FilterIntClass)
-#define IS_FILTER_INT(obj) GTK_CHECK_TYPE (obj, filter_int_get_type ())
-
-typedef struct _FilterInt FilterInt;
-typedef struct _FilterIntClass FilterIntClass;
-
-struct _FilterInt {
- FilterElement parent;
- struct _FilterIntPrivate *priv;
-
- gint32 val;
-};
-
-struct _FilterIntClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_int_get_type (void);
-FilterInt *filter_int_new (void);
-
-/* methods */
-
-#endif /* ! _FILTER_INT_H */
-
diff --git a/filter/filter-option.c b/filter/filter-option.c
deleted file mode 100644
index a517fd71df..0000000000
--- a/filter/filter-option.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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.
- */
-
-#include <config.h>
-
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "filter-option.h"
-#include "filter-part.h"
-#include "e-util/e-sexp.h"
-
-#define d(x)
-
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
-static FilterElement *clone(FilterElement *fe);
-static GtkWidget *get_widget(FilterElement *fe);
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp(FilterElement *, GString *);
-
-static void filter_option_class_init (FilterOptionClass *class);
-static void filter_option_init (FilterOption *gspaper);
-static void filter_option_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterOption *)(x))->priv)
-
-struct _FilterOptionPrivate {
-};
-
-static FilterElementClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_option_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterOption",
- sizeof(FilterOption),
- sizeof(FilterOptionClass),
- (GtkClassInitFunc)filter_option_class_init,
- (GtkObjectInitFunc)filter_option_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_option_class_init (FilterOptionClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(filter_element_get_type ());
-
- object_class->finalize = filter_option_finalise;
-
- /* override methods */
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->clone = clone;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_option_init (FilterOption *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-free_option(struct _filter_option *o, void *data)
-{
- g_free(o->title);
- xmlFree (o->value);
- g_free(o->code);
- g_free(o);
-}
-
-static void
-filter_option_finalise (GtkObject *obj)
-{
- FilterOption *o = (FilterOption *)obj;
-
- g_list_foreach(o->options, (GFunc)free_option, NULL);
- g_list_free(o->options);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_option_new:
- *
- * Create a new FilterOption object.
- *
- * Return value: A new #FilterOption object.
- **/
-FilterOption *
-filter_option_new (void)
-{
- FilterOption *o = (FilterOption *)gtk_type_new (filter_option_get_type ());
- return o;
-}
-
-static struct _filter_option *
-find_option (FilterOption *fo, const char *name)
-{
- GList *l = fo->options;
- struct _filter_option *op;
-
- while (l) {
- op = l->data;
- if (!strcmp (name, op->value)) {
- return op;
- }
- l = g_list_next (l);
- }
-
- return NULL;
-}
-
-void
-filter_option_set_current (FilterOption *option, const char *name)
-{
- g_assert(IS_FILTER_OPTION(option));
-
- option->current = find_option (option, name);
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- FilterOption *fo = (FilterOption *)fe;
- xmlNodePtr n, work;
- struct _filter_option *op;
-
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-
- n = node->childs;
- while (n) {
- if (!strcmp (n->name, "option")) {
- op = g_malloc0 (sizeof (*op));
- op->value = xmlGetProp (n, "value");
- work = n->childs;
- while (work) {
- if (!strcmp (work->name, "title")) {
- if (!op->title) {
- gchar *str, *decstr;
- str = xmlNodeGetContent (work);
- decstr = e_utf8_xml1_decode (str);
- if (str) xmlFree (str);
- op->title = decstr;
- }
- } else if (!strcmp (work->name, "code")) {
- if (!op->code) {
- gchar *str, *decstr;
- str = xmlNodeGetContent (work);
- decstr = e_utf8_xml1_decode (str);
- if (str) xmlFree (str);
- op->code = decstr;
- }
- }
- work = work->next;
- }
- d(printf ("creating new option:\n title %s\n value %s\n code %s\n",
- op->title, op->value, op->code ? op->code : "none"));
- fo->options = g_list_append (fo->options, op);
- if (fo->current == NULL)
- fo->current = op;
- } else {
- g_warning ("Unknown xml node within optionlist: %s\n", n->name);
- }
- n = n->next;
- }
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value;
- FilterOption *fo = (FilterOption *)fe;
-
- d(printf ("Encoding option as xml\n"));
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", "option");
- if (fo->current) {
- xmlSetProp (value, "value", fo->current->value);
- }
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterOption *fo = (FilterOption *)fe;
- char *value;
-
- d(printf ("Decoding option from xml\n"));
- xmlFree (fe->name);
- fe->name = xmlGetProp (node, "name");
- value = xmlGetProp (node, "value");
- if (value) {
- fo->current = find_option (fo, value);
- xmlFree (value);
- } else {
- fo->current = NULL;
- }
- return 0;
-}
-
-static void
-option_changed (GtkWidget *widget, FilterElement *fe)
-{
- FilterOption *fo = (FilterOption *)fe;
-
- fo->current = gtk_object_get_data (GTK_OBJECT (widget), "option");
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterOption *fo = (FilterOption *)fe;
- GtkWidget *menu;
- GtkWidget *omenu;
- GtkWidget *item;
- GtkWidget *first = NULL;
- GList *l = fo->options;
- struct _filter_option *op;
- int index = 0, current = 0;
-
- menu = gtk_menu_new ();
- while (l) {
- op = l->data;
- item = gtk_menu_item_new_with_label (_(op->title));
- gtk_object_set_data (GTK_OBJECT (item), "option", op);
- gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, fe);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
- if (op == fo->current) {
- current = index;
- first = item;
- } else if (!first) {
- first = item;
- }
-
- l = g_list_next (l);
- index++;
- }
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- if (first)
- gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
-
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
-
- return omenu;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- FilterOption *fo = (FilterOption *)fe;
-
- d(printf ("building option code %p, current = %p\n", fo, fo->current));
-
- if (fo->current && fo->current->code) {
- filter_part_expand_code (ff, fo->current->code, out);
- }
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterOption *fo = (FilterOption *)fe;
-
- if (fo->current) {
- e_sexp_encode_string (out, fo->current->value);
- }
-}
-
-static FilterElement *
-clone (FilterElement *fe)
-{
- FilterOption *fo = (FilterOption *)fe, *new;
- GList *l;
- struct _filter_option *fn, *op;
-
- d(printf ("cloning option\n"));
-
- new = FILTER_OPTION (((FilterElementClass *)(parent_class))->clone(fe));
- l = fo->options;
- while (l) {
- op = l->data;
- fn = g_malloc (sizeof (*fn));
- d(printf (" option %s\n", op->title));
- fn->title = g_strdup (op->title);
- fn->value = xmlStrdup (op->value);
- if (op->code)
- fn->code = g_strdup (op->code);
- else
- fn->code = NULL;
- new->options = g_list_append (new->options, fn);
- l = g_list_next (l);
-
- if (new->current == NULL)
- new->current = fn;
- }
-
- d(printf ("cloning option code %p, current = %p\n", new, new->current));
-
- return (FilterElement *)new;
-}
diff --git a/filter/filter-option.h b/filter/filter-option.h
deleted file mode 100644
index ebd2d3dd09..0000000000
--- a/filter/filter-option.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_OPTION_H
-#define _FILTER_OPTION_H
-
-#include "filter-element.h"
-
-#define FILTER_OPTION(obj) GTK_CHECK_CAST (obj, filter_option_get_type (), FilterOption)
-#define FILTER_OPTION_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_option_get_type (), FilterOptionClass)
-#define IS_FILTER_OPTION(obj) GTK_CHECK_TYPE (obj, filter_option_get_type ())
-
-typedef struct _FilterOption FilterOption;
-typedef struct _FilterOptionClass FilterOptionClass;
-
-struct _filter_option {
- char *title; /* button title */
- char *value; /* value, if it has one */
- char *code; /* used to string code segments together */
-};
-
-struct _FilterOption {
- FilterElement parent;
- struct _FilterOptionPrivate *priv;
-
- GList *options;
- struct _filter_option *current;
-};
-
-struct _FilterOptionClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_option_get_type (void);
-FilterOption *filter_option_new (void);
-
-/* methods */
-void filter_option_set_current(FilterOption *option, const char *name);
-
-#endif /* ! _FILTER_OPTION_H */
-
diff --git a/filter/filter-part.c b/filter/filter-part.c
deleted file mode 100644
index d056441567..0000000000
--- a/filter/filter-part.c
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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.
- */
-
-#include <config.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <glib.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkhbox.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "filter-part.h"
-#include "filter-element.h"
-
-
-#define d(x)
-
-static void filter_part_class_init (FilterPartClass *class);
-static void filter_part_init (FilterPart *gspaper);
-static void filter_part_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterPart *)(x))->priv)
-
-struct _FilterPartPrivate {
-};
-
-static GtkObjectClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_part_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterPart",
- sizeof(FilterPart),
- sizeof(FilterPartClass),
- (GtkClassInitFunc)filter_part_class_init,
- (GtkObjectInitFunc)filter_part_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(gtk_object_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_part_class_init (FilterPartClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- object_class->finalize = filter_part_finalise;
- /* override methods */
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_part_init (FilterPart *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_part_finalise(GtkObject *obj)
-{
- FilterPart *o = (FilterPart *)obj;
- GList *l;
-
- o = o;
-
- l = o->elements;
- while (l) {
- gtk_object_unref((GtkObject *)l->data);
- l = g_list_next(l);
- }
-
- g_list_free(o->elements);
- g_free(o->name);
- g_free(o->title);
- g_free(o->code);
-
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_part_new:
- *
- * Create a new FilterPart object.
- *
- * Return value: A new #FilterPart object.
- **/
-FilterPart *
-filter_part_new (void)
-{
- FilterPart *o = (FilterPart *)gtk_type_new(filter_part_get_type ());
- return o;
-}
-
-gboolean
-filter_part_validate (FilterPart *fp)
-{
- gboolean correct = TRUE;
- GList *l;
-
- l = fp->elements;
- while (l && correct) {
- FilterElement *fe = l->data;
-
- correct = filter_element_validate (fe);
-
- l = l->next;
- }
-
- return correct;
-}
-
-int
-filter_part_xml_create (FilterPart *ff, xmlNodePtr node)
-{
- xmlNodePtr n;
- char *type, *str, *decstr;
- FilterElement *el;
-
- str = xmlGetProp(node, "name");
- ff->name = g_strdup(str);
- if (str)
- xmlFree(str);
- n = node->childs;
- while (n) {
- if (!strcmp (n->name, "input")) {
- type = xmlGetProp (n, "type");
- d(printf ("creating new element type input '%s'\n", type));
- if (type != NULL
- && (el = filter_element_new_type_name (type)) != NULL) {
- filter_element_xml_create (el, n);
- xmlFree(type);
- d(printf ("adding element part %p %s\n", ff, el, el->name));
- ff->elements = g_list_append (ff->elements, el);
- } else {
- g_warning ("Invalid xml format, missing/unknown input type");
- }
- } else if (!strcmp(n->name, "title")) {
- if (!ff->title) {
- str = xmlNodeGetContent (n);
- ff->title = e_utf8_xml1_decode (str);
- if (str)
- xmlFree (str);
- }
- } else if (!strcmp (n->name, "code")) {
- if (!ff->code) {
- str = xmlNodeGetContent (n);
- ff->code = e_utf8_xml1_decode (str);
- if (str)
- xmlFree (str);
- }
- } else {
- g_warning ("Unknwon part element in xml: %s\n", n->name);
- }
- n = n->next;
- }
-
- return 0;
-}
-
-xmlNodePtr
-filter_part_xml_encode (FilterPart *fp)
-{
- GList *l;
- FilterElement *fe;
- xmlNodePtr part, value;
-
- g_return_val_if_fail (fp != NULL, NULL);
-
- part = xmlNewNode (NULL, "part");
- xmlSetProp (part, "name", fp->name);
- l = fp->elements;
- while (l) {
- fe = l->data;
- value = filter_element_xml_encode (fe);
- xmlAddChild (part, value);
- l = g_list_next (l);
- }
-
- return part;
-}
-
-
-int
-filter_part_xml_decode (FilterPart *fp, xmlNodePtr node)
-{
- FilterElement *fe;
- xmlNodePtr n;
- char *name;
-
- g_return_val_if_fail (fp != NULL, -1);
- g_return_val_if_fail (node != NULL, -1);
-
- n = node->childs;
- while (n) {
- if (!strcmp (n->name, "value")) {
- name = xmlGetProp (n, "name");
- d(printf ("finding element part %p %s = %p\n", name, name, fe));
- fe = filter_part_find_element (fp, name);
- d(printf ("finding element part %p %s = %p\n", name, name, fe));
- xmlFree (name);
- if (fe) {
- filter_element_xml_decode (fe, n);
- }
- }
- n = n->next;
- }
-
- return 0;
-}
-
-FilterPart *
-filter_part_clone (FilterPart *fp)
-{
- FilterPart *new;
- GList *l;
- FilterElement *fe, *ne;
-
- new = (FilterPart *)gtk_type_new ((GTK_OBJECT (fp))->klass->type);
- new->name = g_strdup(fp->name);
- new->title = g_strdup(fp->title);
- new->code = g_strdup(fp->code);
- l = fp->elements;
- while (l) {
- fe = l->data;
- ne = filter_element_clone (fe);
- new->elements = g_list_append (new->elements, ne);
- l = g_list_next (l);
- }
-
- return new;
-}
-
-FilterElement *
-filter_part_find_element (FilterPart *ff, const char *name)
-{
- GList *l = ff->elements;
- FilterElement *fe;
-
- if (name == NULL)
- return NULL;
-
- while (l) {
- fe = l->data;
- if (fe->name && !strcmp (fe->name, name))
- return fe;
- l = g_list_next (l);
- }
-
- return NULL;
-}
-
-
-GtkWidget *
-filter_part_get_widget (FilterPart *ff)
-{
- GtkWidget *hbox;
- GList *l = ff->elements;
- FilterElement *fe;
- GtkWidget *w;
-
- hbox = gtk_hbox_new (FALSE, 3);
-
- while (l) {
- fe = l->data;
- w = filter_element_get_widget (fe);
- if (w) {
- gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 3);
- }
- l = g_list_next (l);
- }
-
- gtk_widget_show_all (hbox);
-
- return hbox;
-}
-
-/**
- * filter_part_build_code:
- * @ff:
- * @out:
- *
- * Outputs the code of a part.
- **/
-void
-filter_part_build_code (FilterPart *ff, GString *out)
-{
- GList *l = ff->elements;
- FilterElement *fe;
-
- if (ff->code) {
- filter_part_expand_code (ff, ff->code, out);
- }
- while (l) {
- fe = l->data;
- filter_element_build_code (fe, out, ff);
- l = g_list_next (l);
- }
-}
-
-/**
- * filter_part_build_code_list:
- * @l:
- * @out:
- *
- * Construct a list of the filter parts code into
- * a single string.
- **/
-void
-filter_part_build_code_list (GList *l, GString *out)
-{
- FilterPart *fp;
-
- while (l) {
- fp = l->data;
- filter_part_build_code (fp, out);
- g_string_append (out, "\n ");
- l = g_list_next (l);
- }
-}
-
-/**
- * filter_part_find_list:
- * @l:
- * @name:
- *
- * Find a filter part stored in a list.
- *
- * Return value:
- **/
-FilterPart *
-filter_part_find_list (GList *l, const char *name)
-{
- FilterPart *part;
-
- d(printf ("Find part named %s\n", name));
-
- while (l) {
- part = l->data;
- if (!strcmp (part->name, name)) {
- d(printf ("Found!\n"));
- return part;
- }
- l = g_list_next (l);
- }
-
- return NULL;
-}
-
-/**
- * filter_part_next_list:
- * @l:
- * @last: The last item retrieved, or NULL to start
- * from the beginning of the list.
- *
- * Iterate through a filter part list.
- *
- * Return value: The next value in the list, or NULL if the
- * list is expired.
- **/
-FilterPart *
-filter_part_next_list (GList *l, FilterPart *last)
-{
- GList *node = l;
-
- if (last != NULL) {
- node = g_list_find (node, last);
- if (node == NULL)
- node = l;
- else
- node = g_list_next (node);
- }
- if (node)
- return node->data;
-
- return NULL;
-}
-
-/**
- * filter_part_expand_code:
- * @ff:
- * @str:
- * @out:
- *
- * Expands the variables in string @str based on the values of the part.
- **/
-void
-filter_part_expand_code (FilterPart *ff, const char *source, GString *out)
-{
- const char *newstart, *start, *end;
- char *name = alloca (32);
- int len, namelen = 32;
- FilterElement *fe;
-
- start = source;
- while (start && (newstart = strstr (start, "${"))
- && (end = strstr (newstart+2, "}")) ) {
- len = end - newstart - 2;
- if (len + 1 > namelen) {
- namelen = (len + 1) * 2;
- name = alloca (namelen);
- }
- memcpy (name, newstart+2, len);
- name[len] = 0;
- fe = filter_part_find_element (ff, name);
- d(printf("expand code: looking up variab le '%s' = %p\n", ff, name, fe));
- if (fe) {
- g_string_sprintfa (out, "%.*s", newstart-start, start);
- filter_element_format_sexp (fe, out);
-#if 0
- } else if ( (val = g_hash_table_lookup (ff->globals, name)) ) {
- g_string_sprintfa (out, "%.*s", newstart-start, start);
- e_sexp_encode_string (out, val);
-#endif
- } else {
- g_string_sprintfa (out, "%.*s", end-start+1, start);
- }
- start = end + 1;
- }
- g_string_append (out, start);
-}
-
-#if 0
-int main(int argc, char **argv)
-{
- xmlDocPtr system;
- FilterPart *ff;
- GtkWidget *w;
- GnomeDialog *gd;
- xmlNodePtr node;
- GString *code;
-
- gnome_init("test", "0.0", argc, argv);
-
- system = xmlParseFile("form.xml");
- if (system==NULL) {
- printf("i/o error\n");
- return 1;
- }
-
- ff = filter_part_new();
- filter_part_xml_create(ff, system->root);
-
- w = filter_part_get_widget(ff);
-
- gd = (GnomeDialog *)gnome_dialog_new(_("Test"), GNOME_STOCK_BUTTON_OK, NULL);
- gtk_window_set_policy(GTK_WINDOW(gd), FALSE, TRUE, FALSE);
- gtk_box_pack_start((GtkBox *)gd->vbox, w, TRUE, TRUE, 0);
- gtk_widget_show((GtkWidget *)gd);
-
- gnome_dialog_run_and_close(gd);
-
- code = g_string_new("");
- filter_part_build_code(ff, code);
- printf("code is:\n%s\n", code->str);
-
- return 0;
-}
-#endif
diff --git a/filter/filter-part.h b/filter/filter-part.h
deleted file mode 100644
index da8e3d7215..0000000000
--- a/filter/filter-part.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_PART_H
-#define _FILTER_PART_H
-
-#include <gtk/gtkobject.h>
-#include "filter-input.h"
-
-#define FILTER_PART(obj) GTK_CHECK_CAST (obj, filter_part_get_type (), FilterPart)
-#define FILTER_PART_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_part_get_type (), FilterPartClass)
-#define IS_FILTER_PART(obj) GTK_CHECK_TYPE (obj, filter_part_get_type ())
-
-typedef struct _FilterPart FilterPart;
-typedef struct _FilterPartClass FilterPartClass;
-
-struct _FilterPart {
- GtkObject parent;
- struct _FilterPartPrivate *priv;
-
- char *name;
- char *title;
- char *code;
- GList *elements;
-};
-
-struct _FilterPartClass {
- GtkObjectClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_part_get_type (void);
-FilterPart *filter_part_new (void);
-
-/* methods */
-gboolean filter_part_validate (FilterPart *fp);
-
-int filter_part_xml_create (FilterPart *ff, xmlNodePtr node);
-
-xmlNodePtr filter_part_xml_encode (FilterPart *fe);
-int filter_part_xml_decode (FilterPart *fe, xmlNodePtr node);
-
-FilterPart *filter_part_clone (FilterPart *fp);
-
-FilterElement *filter_part_find_element(FilterPart *ff, const char *name);
-
-GtkWidget *filter_part_get_widget (FilterPart *ff);
-void filter_part_build_code (FilterPart *ff, GString *out);
-void filter_part_expand_code (FilterPart *ff, const char *str, GString *out);
-
-/* static functions */
-void filter_part_build_code_list (GList *l, GString *out);
-FilterPart *filter_part_find_list (GList *l, const char *name);
-FilterPart *filter_part_next_list (GList *l, FilterPart *last);
-
-#endif /* ! _FILTER_PART_H */
-
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
deleted file mode 100644
index 28703024a2..0000000000
--- a/filter/filter-rule.c
+++ /dev/null
@@ -1,842 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "filter-rule.h"
-#include "filter-context.h"
-
-#define d(x)
-
-static int validate(FilterRule *);
-static xmlNodePtr xml_encode (FilterRule *);
-static int xml_decode (FilterRule *, xmlNodePtr, RuleContext *);
-static void build_code (FilterRule *, GString * out);
-static void rule_copy (FilterRule *dest, FilterRule *src);
-static GtkWidget *get_widget (FilterRule * fr, struct _RuleContext *f);
-
-static void filter_rule_class_init (FilterRuleClass * class);
-static void filter_rule_init (FilterRule * gspaper);
-static void filter_rule_finalise (GtkObject * obj);
-
-#define _PRIVATE(x) (((FilterRule *)(x))->priv)
-
-struct _FilterRulePrivate {
- int frozen;
-};
-
-static GtkObjectClass *parent_class;
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_rule_get_type ()
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterRule",
- sizeof (FilterRule),
- sizeof (FilterRuleClass),
- (GtkClassInitFunc) filter_rule_class_init,
- (GtkObjectInitFunc) filter_rule_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gtk_object_get_type(), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_rule_class_init (FilterRuleClass * class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (gtk_object_get_type());
-
- object_class->finalize = filter_rule_finalise;
-
- /* override methods */
- class->validate = validate;
- class->xml_encode = xml_encode;
- class->xml_decode = xml_decode;
- class->build_code = build_code;
- class->copy = rule_copy;
- class->get_widget = get_widget;
-
- /* signals */
- signals[CHANGED] =
- gtk_signal_new("changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (FilterRuleClass, changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_rule_init (FilterRule * o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_rule_finalise (GtkObject * obj)
-{
- FilterRule *o = (FilterRule *) obj;
-
- g_free (o->name);
- g_free (o->source);
- g_list_foreach(o->parts, (GFunc)gtk_object_unref, NULL);
- g_list_free(o->parts);
-
- g_free(o->priv);
-
- ((GtkObjectClass *) (parent_class))->finalize(obj);
-}
-
-/**
- * filter_rule_new:
- *
- * Create a new FilterRule object.
- *
- * Return value: A new #FilterRule object.
- **/
-FilterRule *
-filter_rule_new ()
-{
- FilterRule *o = (FilterRule *) gtk_type_new (filter_rule_get_type());
-
- return o;
-}
-
-FilterRule *
-filter_rule_clone (FilterRule *base)
-{
- FilterRule *rule;
-
- g_assert (IS_FILTER_RULE (base));
-
- rule = gtk_type_new (GTK_OBJECT (base)->klass->type);
- filter_rule_copy (rule, base);
-
- return rule;
-}
-
-void
-filter_rule_set_name (FilterRule *fr, const char *name)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- g_free (fr->name);
- fr->name = g_strdup (name);
-}
-
-void
-filter_rule_set_source (FilterRule *fr, const char *source)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- g_free (fr->source);
- fr->source = g_strdup (source);
-}
-
-int
-filter_rule_validate (FilterRule *fr)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- return ((FilterRuleClass *) ((GtkObject *) fr)->klass)->validate (fr);
-}
-
-static int
-validate (FilterRule *fr)
-{
- int valid = TRUE;
- GList *parts;
-
- /* validate rule parts */
- parts = fr->parts;
- while (parts && valid) {
- valid = filter_part_validate ((FilterPart *)parts->data);
- parts = parts->next;
- }
-
- return valid;
-}
-
-xmlNodePtr
-filter_rule_xml_encode (FilterRule *fr)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- return ((FilterRuleClass *) ((GtkObject *) fr)->klass)->xml_encode (fr);
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- xmlNodePtr node, set, work;
- GList *l;
-
- node = xmlNewNode (NULL, "rule");
- switch (fr->grouping) {
- case FILTER_GROUP_ALL:
- xmlSetProp (node, "grouping", "all");
- break;
- case FILTER_GROUP_ANY:
- xmlSetProp (node, "grouping", "any");
- break;
- }
-
- if (fr->source) {
- xmlSetProp (node, "source", fr->source);
- } else {
- /* set to the default filter type */
- xmlSetProp (node, "source", "incoming");
- }
-
- if (fr->name) {
- char *encstr;
-
- work = xmlNewNode (NULL, "title");
- encstr = e_utf8_xml1_encode (fr->name);
- xmlNodeSetContent (work, encstr);
- g_free (encstr);
- xmlAddChild (node, work);
- }
-
- set = xmlNewNode (NULL, "partset");
- xmlAddChild (node, set);
- l = fr->parts;
- while (l) {
- work = filter_part_xml_encode ((FilterPart *) l->data);
- xmlAddChild (set, work);
- l = g_list_next (l);
- }
-
- return node;
-}
-
-static void
-load_set (xmlNodePtr node, FilterRule *fr, RuleContext *f)
-{
- xmlNodePtr work;
- char *rulename;
- FilterPart *part;
-
- work = node->childs;
- while (work) {
- if (!strcmp (work->name, "part")) {
- rulename = xmlGetProp (work, "name");
- part = rule_context_find_part (f, rulename);
- if (part) {
- part = filter_part_clone (part);
- filter_part_xml_decode (part, work);
- filter_rule_add_part (fr, part);
- } else {
- g_warning ("cannot find rule part '%s'\n", rulename);
- }
- xmlFree (rulename);
- } else {
- g_warning ("Unknwon xml node in part: %s", work->name);
- }
- work = work->next;
- }
-}
-
-int
-filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
-{
- int res;
-
- g_assert (IS_FILTER_RULE (fr));
- g_assert (IS_RULE_CONTEXT (f));
- g_assert (node != NULL);
-
- fr->priv->frozen++;
- res = ((FilterRuleClass *) ((GtkObject *) fr)->klass)->xml_decode (fr, node, f);
- fr->priv->frozen--;
-
- filter_rule_emit_changed(fr);
-
- return res;
-}
-
-static int
-xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
-{
- xmlNodePtr work;
- char *grouping;
- char *source;
-
- if (fr->name) {
- g_free (fr->name);
- fr->name = NULL;
- }
-
- grouping = xmlGetProp (node, "grouping");
- if (!strcmp (grouping, "any"))
- fr->grouping = FILTER_GROUP_ANY;
- else
- fr->grouping = FILTER_GROUP_ALL;
- xmlFree (grouping);
-
- g_free (fr->source);
- source = xmlGetProp (node, "source");
- if (source) {
- fr->source = g_strdup (source);
- xmlFree (source);
- } else {
- /* default filter type */
- fr->source = g_strdup ("incoming");
- }
-
- work = node->childs;
- while (work) {
- if (!strcmp (work->name, "partset")) {
- load_set (work, fr, f);
- } else if (!strcmp (work->name, "title") || !strcmp (work->name, "_title")) {
- if (!fr->name) {
- char *str, *decstr;
-
- str = xmlNodeGetContent (work);
- decstr = e_utf8_xml1_decode (str);
- if (str)
- xmlFree (str);
- fr->name = decstr;
- }
- }
- work = work->next;
- }
-
- return 0;
-}
-
-static void
-rule_copy (FilterRule *dest, FilterRule *src)
-{
- GList *node;
-
- g_free (dest->name);
- dest->name = g_strdup (src->name);
-
- g_free (dest->source);
- dest->source = g_strdup (src->source);
-
- dest->grouping = src->grouping;
-
- if (dest->parts) {
- g_list_foreach (dest->parts, (GFunc) gtk_object_unref, NULL);
- g_list_free (dest->parts);
- dest->parts = NULL;
- }
-
- node = src->parts;
- while (node) {
- FilterPart *part = node->data;
-
- gtk_object_ref (GTK_OBJECT (part));
- dest->parts = g_list_append (dest->parts, part);
- node = node->next;
- }
-}
-
-void
-filter_rule_copy (FilterRule *dest, FilterRule *src)
-{
- g_assert (IS_FILTER_RULE (dest));
- g_assert (IS_FILTER_RULE (src));
-
- ((FilterRuleClass *) ((GtkObject *) dest)->klass)->copy (dest, src);
-
- filter_rule_emit_changed(dest);
-}
-
-void
-filter_rule_add_part (FilterRule *fr, FilterPart *fp)
-{
- g_assert (IS_FILTER_RULE (fr));
- g_assert (IS_FILTER_PART (fp));
-
- fr->parts = g_list_append (fr->parts, fp);
-
- filter_rule_emit_changed(fr);
-}
-
-void
-filter_rule_remove_part (FilterRule *fr, FilterPart *fp)
-{
- g_assert (IS_FILTER_RULE (fr));
- g_assert (IS_FILTER_PART (fp));
-
- fr->parts = g_list_remove (fr->parts, fp);
-
- filter_rule_emit_changed(fr);
-}
-
-void
-filter_rule_replace_part (FilterRule *fr, FilterPart *fp, FilterPart *new)
-{
- GList *l;
-
- g_assert (IS_FILTER_RULE (fr));
- g_assert (IS_FILTER_PART (fp));
- g_assert (IS_FILTER_PART (new));
-
- l = g_list_find (fr->parts, fp);
- if (l) {
- l->data = new;
- } else {
- fr->parts = g_list_append (fr->parts, new);
- }
-
- filter_rule_emit_changed(fr);
-}
-
-void
-filter_rule_build_code (FilterRule *fr, GString *out)
-{
- g_assert (IS_FILTER_RULE (fr));
- g_assert (out != NULL);
-
- ((FilterRuleClass *) ((GtkObject *) fr)->klass)->build_code (fr, out);
-
- d(printf ("build_code: [%s](%d)", out->str, out->len));
-}
-
-void
-filter_rule_emit_changed(FilterRule *fr)
-{
- g_assert (IS_FILTER_RULE (fr));
-
- if (fr->priv->frozen == 0)
- gtk_signal_emit((GtkObject *)fr, signals[CHANGED]);
-}
-
-static void
-build_code (FilterRule *fr, GString *out)
-{
- switch (fr->grouping) {
- case FILTER_GROUP_ALL:
- g_string_append (out, " (and\n ");
- break;
- case FILTER_GROUP_ANY:
- g_string_append (out, " (or\n ");
- break;
- default:
- g_warning ("Invalid grouping");
- }
-
- filter_part_build_code_list (fr->parts, out);
- g_string_append (out, ")\n");
-}
-
-static void
-match_all (GtkWidget *widget, FilterRule *fr)
-{
- fr->grouping = FILTER_GROUP_ALL;
-}
-
-static void
-match_any (GtkWidget *widget, FilterRule *fr)
-{
- fr->grouping = FILTER_GROUP_ANY;
-}
-
-struct _part_data {
- FilterRule *fr;
- RuleContext *f;
- FilterPart *part;
- GtkWidget *partwidget, *container;
-};
-
-static void
-option_activate (GtkMenuItem *item, struct _part_data *data)
-{
- FilterPart *part = gtk_object_get_data (GTK_OBJECT (item), "part");
- FilterPart *newpart;
-
- /* dont update if we haven't changed */
- if (!strcmp (part->title, data->part->title))
- return;
-
- /* here we do a widget shuffle, throw away the old widget/rulepart,
- and create another */
- if (data->partwidget)
- gtk_container_remove (GTK_CONTAINER (data->container), data->partwidget);
-
- newpart = filter_part_clone (part);
- filter_rule_replace_part (data->fr, data->part, newpart);
- gtk_object_unref (GTK_OBJECT (data->part));
- data->part = newpart;
- data->partwidget = filter_part_get_widget (newpart);
- if (data->partwidget)
- gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, FALSE, FALSE, 0);
-
- gtk_object_set_data (GTK_OBJECT (data->container), "part", newpart);
-}
-
-static GtkWidget *
-get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr)
-{
- FilterPart *part = NULL;
- GtkWidget *menu;
- GtkWidget *item;
- GtkWidget *omenu;
- GtkWidget *hbox;
- GtkWidget *p;
- int index = 0, current = 0;
- struct _part_data *data;
-
- data = g_malloc0 (sizeof (*data));
- data->fr = fr;
- data->f = f;
- data->part = newpart;
-
- hbox = gtk_hbox_new (FALSE, 0);
- /* only set to automatically clean up the memory */
- gtk_object_set_data_full (GTK_OBJECT (hbox), "data", data, g_free);
-
- p = filter_part_get_widget (newpart);
-
- data->partwidget = p;
- data->container = hbox;
-
- menu = gtk_menu_new ();
- /* sigh, this is a little ugly */
- while ((part = rule_context_next_part (f, part))) {
- item = gtk_menu_item_new_with_label (_(part->title));
- gtk_object_set_data (GTK_OBJECT (item), "part", part);
- gtk_signal_connect (GTK_OBJECT (item), "activate", option_activate, data);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
- if (!strcmp (newpart->title, part->title)) {
- current = index;
- }
- index++;
- }
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
- gtk_widget_show (omenu);
-
- gtk_box_pack_start (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
- if (p) {
- gtk_box_pack_start (GTK_BOX (hbox), p, FALSE, FALSE, 0);
- }
- gtk_widget_show_all (hbox);
-
- return hbox;
-}
-
-struct _rule_data {
- FilterRule *fr;
- RuleContext *f;
- GtkWidget *parts;
-};
-
-static void
-less_parts (GtkWidget *button, struct _rule_data *data)
-{
- FilterPart *part;
- GtkWidget *rule;
-
- if (g_list_length (data->fr->parts) < 2)
- return;
-
- rule = gtk_object_get_data (GTK_OBJECT (button), "rule");
- part = gtk_object_get_data (GTK_OBJECT (rule), "part");
-
- /* remove the part from the list */
- filter_rule_remove_part (data->fr, part);
- gtk_object_unref (GTK_OBJECT (part));
-
- /* and from the display */
- gtk_container_remove (GTK_CONTAINER (data->parts), rule);
- gtk_container_remove (GTK_CONTAINER (data->parts), button);
-}
-
-static void
-attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
-{
- GtkWidget *remove;
- GtkWidget *pixmap;
-
- gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
- remove = gnome_pixmap_button (pixmap, _("Remove"));
- gtk_object_set_data (GTK_OBJECT (remove), "rule", rule);
- gtk_object_set_data (GTK_OBJECT (rule), "part", part);
- /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
- gtk_signal_connect (GTK_OBJECT (remove), "clicked", less_parts, data);
- gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
- 0, 0, 0, 0);
- gtk_widget_show (remove);
-}
-
-static void
-more_parts (GtkWidget *button, struct _rule_data *data)
-{
- FilterPart *new;
-
- /* first make sure that the last part is ok */
- if (data->fr->parts) {
- FilterPart *part;
- GList *l;
-
- l = g_list_last (data->fr->parts);
- part = l->data;
- if (!filter_part_validate (part))
- return;
- }
-
- /* create a new rule entry, use the first type of rule */
- new = rule_context_next_part (data->f, NULL);
- if (new) {
- GtkWidget *w;
- int rows;
-
- new = filter_part_clone (new);
- filter_rule_add_part (data->fr, new);
- w = get_rule_part_widget (data->f, new, data->fr);
-
- rows = GTK_TABLE (data->parts)->nrows;
- gtk_table_resize (GTK_TABLE (data->parts), rows + 1, 2);
- attach_rule (w, data, new, rows);
- }
-}
-
-static void
-name_changed (GtkEntry *entry, FilterRule *fr)
-{
- g_free (fr->name);
- fr->name = e_utf8_gtk_entry_get_text (entry);
-}
-
-GtkWidget *
-filter_rule_get_widget (FilterRule *fr, struct _RuleContext *f)
-{
- return ((FilterRuleClass *) ((GtkObject *) fr)->klass)->get_widget(fr, f);
-}
-
-static void
-grab_focus (GtkWidget *entry, gpointer data)
-{
- gtk_widget_grab_focus (entry);
-}
-
-static GtkWidget *
-get_widget (FilterRule *fr, struct _RuleContext *f)
-{
- GtkWidget *vbox, *parts, *inframe;
- GtkWidget *hbox;
- GtkWidget *add, *pixmap;
- GtkWidget *w;
- GtkWidget *menu, *item, *omenu;
- GtkWidget *frame;
- GtkWidget *name;
- GtkWidget *label;
- GtkWidget *scrolledwindow;
- GtkObject *hadj, *vadj;
- GList *l;
- FilterPart *part;
- struct _rule_data *data;
- gint rows, i = 0;
-
- /* this stuff should probably be a table, but the
- rule parts need to be a vbox */
- vbox = gtk_vbox_new (FALSE, 3);
-
- label = gtk_label_new (_("Rule name: "));
- name = gtk_entry_new ();
-
- if (!fr->name) {
- fr->name = g_strdup (_("Untitled"));
- gtk_entry_set_text (GTK_ENTRY (name), fr->name);
- /* FIXME: do we want the following code in the future? */
- /*gtk_editable_select_region (GTK_EDITABLE (name), 0, -1);*/
- } else {
- e_utf8_gtk_entry_set_text (GTK_ENTRY (name), fr->name);
- }
-
- /* evil kludgy hack because gtk sucks */
- gtk_signal_connect (GTK_OBJECT (name), "realize", grab_focus, name);
-
- hbox = gtk_hbox_new (FALSE, 3);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), name, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (name), "changed", name_changed, fr);
-
- frame = gtk_frame_new (_("If"));
- inframe = gtk_vbox_new (FALSE, 3);
- gtk_container_add (GTK_CONTAINER (frame), inframe);
-
- /* this is the parts table, it should probably be inside a scrolling list */
- rows = g_list_length (fr->parts);
- parts = gtk_table_new (rows, 2, FALSE);
-
- /* data for the parts part of the display */
- data = g_malloc0 (sizeof (*data));
- data->f = f;
- data->fr = fr;
- data->parts = parts;
-
- /* only set to automatically clean up the memory */
- gtk_object_set_data_full (GTK_OBJECT (vbox), "data", data, g_free);
-
- hbox = gtk_hbox_new (FALSE, 3);
- label = gtk_label_new (_("Execute actions"));
-
- menu = gtk_menu_new ();
-
- item = gtk_menu_item_new_with_label (_("if all criteria are met"));
- gtk_signal_connect (GTK_OBJECT (item), "activate", match_all, fr);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
-
- item = gtk_menu_item_new_with_label (_("if any criteria are met"));
- gtk_signal_connect (GTK_OBJECT (item), "activate", match_any, fr);
- 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);
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->grouping == FILTER_GROUP_ALL ? 0 : 1);
- gtk_widget_show (omenu);
-
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_ADD);
- add = gnome_pixmap_button (pixmap, _("Add criterion"));
- gtk_signal_connect (GTK_OBJECT (add), "clicked", more_parts, data);
- gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 3);
-
- gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 0);
-
- l = fr->parts;
- while (l) {
- part = l->data;
- d(printf ("adding rule %s\n", part->title));
- w = get_rule_part_widget (f, part, fr);
- attach_rule (w, data, part, i++);
- l = g_list_next (l);
- }
-
- hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
- vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
- scrolledwindow = gtk_scrolled_window_new (GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj));
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), parts);
-
- gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 0);
-
- /*gtk_box_pack_start (GTK_BOX (inframe), parts, FALSE, FALSE, 3); */
-
- gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
-
- gtk_widget_show_all (vbox);
-
- return vbox;
-}
-
-FilterRule *
-filter_rule_next_list (GList * l, FilterRule * last, const char *source)
-{
- GList *node = l;
-
- if (last != NULL) {
- node = g_list_find (node, last);
- if (node == NULL)
- node = l;
- else
- node = g_list_next (node);
- }
-
- if (source) {
- while (node) {
- FilterRule *rule = node->data;
-
- if (rule->source && strcmp (rule->source, source) == 0)
- break;
- node = g_list_next (node);
- }
- }
-
- if (node)
- return node->data;
-
- return NULL;
-}
-
-FilterRule *
-filter_rule_find_list (GList * l, const char *name, const char *source)
-{
- while (l) {
- FilterRule *rule = l->data;
-
- if (strcmp (rule->name, name) == 0)
- if (source == NULL || (rule->source != NULL && strcmp (rule->source, source) == 0))
- return rule;
- l = g_list_next (l);
- }
-
- return NULL;
-}
-
-#ifdef FOR_TRANSLATIONS_ONLY
-
-static char *list[] = {
- N_("incoming"), N_("outgoing")
-};
-#endif
diff --git a/filter/filter-rule.h b/filter/filter-rule.h
deleted file mode 100644
index 37704214a9..0000000000
--- a/filter/filter-rule.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _FILTER_RULE_H
-#define _FILTER_RULE_H
-
-#include <gtk/gtkobject.h>
-#include "filter-part.h"
-
-#define FILTER_RULE(obj) GTK_CHECK_CAST (obj, filter_rule_get_type (), FilterRule)
-#define FILTER_RULE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_rule_get_type (), FilterRuleClass)
-#define IS_FILTER_RULE(obj) GTK_CHECK_TYPE (obj, filter_rule_get_type ())
-
-typedef struct _FilterRule FilterRule;
-typedef struct _FilterRuleClass FilterRuleClass;
-
-struct _RuleContext;
-
-enum _filter_grouping_t {
- FILTER_GROUP_ALL, /* all rules must match */
- FILTER_GROUP_ANY /* any rule must match */
-};
-
-
-#define FILTER_SOURCE_INCOMING "incoming" /* performed on incoming email */
-#define FILTER_SOURCE_DEMAND "demand" /* performed on the selected folder
- * when the user asks for it */
-#define FILTER_SOURCE_OUTGOING "outgoing"/* performed on outgoing mail */
-
-struct _FilterRule {
- GtkObject parent;
- struct _FilterRulePrivate *priv;
-
- char *name;
- char *source;
-
- enum _filter_grouping_t grouping;
- GList *parts;
-};
-
-struct _FilterRuleClass {
- GtkObjectClass parent_class;
-
- /* virtual methods */
- int (*validate)(FilterRule *);
-
- xmlNodePtr (*xml_encode)(FilterRule *);
- int (*xml_decode)(FilterRule *, xmlNodePtr, struct _RuleContext *);
-
- void (*build_code)(FilterRule *, GString *out);
-
- void (*copy)(FilterRule *dest, FilterRule *src);
-
- GtkWidget *(*get_widget)(FilterRule *fr, struct _RuleContext *f);
-
- /* signals */
- void (*changed)(FilterRule *fr);
-};
-
-guint filter_rule_get_type (void);
-FilterRule *filter_rule_new (void);
-
-FilterRule *filter_rule_clone (FilterRule *base);
-
-/* methods */
-void filter_rule_set_name (FilterRule *fr, const char *name);
-void filter_rule_set_source (FilterRule *fr, const char *source);
-
-int filter_rule_validate (FilterRule *fr);
-
-xmlNodePtr filter_rule_xml_encode (FilterRule *fr);
-int filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f);
-
-void filter_rule_copy (FilterRule *dest, FilterRule *src);
-
-void filter_rule_add_part (FilterRule *fr, FilterPart *fp);
-void filter_rule_remove_part (FilterRule *fr, FilterPart *fp);
-void filter_rule_replace_part(FilterRule *fr, FilterPart *fp, FilterPart *new);
-
-GtkWidget *filter_rule_get_widget (FilterRule *fr, struct _RuleContext *f);
-
-void filter_rule_build_code (FilterRule *fr, GString *out);
-/*
-void filter_rule_build_action(FilterRule *fr, GString *out);
-*/
-
-void filter_rule_emit_changed (FilterRule *fr);
-
-/* static functions */
-FilterRule *filter_rule_next_list (GList *l, FilterRule *last, const char *source);
-FilterRule *filter_rule_find_list (GList *l, const char *name, const char *source);
-
-
-#endif /* ! _FILTER_RULE_H */
-
diff --git a/filter/filter-score.c b/filter/filter-score.c
deleted file mode 100644
index 80c7e6ed94..0000000000
--- a/filter/filter-score.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 <stdlib.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-
-#include "e-util/e-sexp.h"
-#include "filter-score.h"
-
-#define d(x)
-
-static void xml_create (FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode (FilterElement *fe);
-static int xml_decode (FilterElement *fe, xmlNodePtr node);
-static GtkWidget *get_widget (FilterElement *fe);
-static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp (FilterElement *, GString *);
-
-static void filter_score_class_init (FilterScoreClass *class);
-static void filter_score_init (FilterScore *gspaper);
-static void filter_score_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((FilterScore *)(x))->priv)
-
-struct _FilterScorePrivate {
-};
-
-static FilterElementClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_score_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterScore",
- sizeof (FilterScore),
- sizeof (FilterScoreClass),
- (GtkClassInitFunc) filter_score_class_init,
- (GtkObjectInitFunc) filter_score_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_score_class_init (FilterScoreClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (filter_element_get_type ());
-
- object_class->finalize = filter_score_finalise;
-
- /* override methods */
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_score_init (FilterScore *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-filter_score_finalise(GtkObject *obj)
-{
- FilterScore *o = (FilterScore *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * filter_score_new:
- *
- * Create a new FilterScore object.
- *
- * Return value: A new #FilterScore object.
- **/
-FilterScore *
-filter_score_new (void)
-{
- FilterScore *o = (FilterScore *)gtk_type_new(filter_score_get_type ());
- return o;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /*FilterScore *fs = (FilterScore *)fe;*/
-
- /* parent implementation */
- ((FilterElementClass *)(parent_class))->xml_create(fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value;
- FilterScore *fs = (FilterScore *)fe;
- char *score;
-
- d(printf("Encoding score as xml\n"));
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", "score");
-
- score = g_strdup_printf ("%d", fs->score);
- xmlSetProp (value, "score", score);
- g_free (score);
-
- return value;
-}
-
-static int
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterScore *fs = (FilterScore *)fe;
- char *name;
- char *score;
-
- d(printf("Decoding score from xml %p\n", fe));
-
- name = xmlGetProp (node, "name");
- d(printf ("Name = %s\n", name));
- xmlFree (fe->name);
- fe->name = name;
- score = xmlGetProp (node, name);
- if (score) {
- fs->score = atoi (score);
- xmlFree (score);
- } else
- fs->score = 0;
-
- if (fs->score > 3)
- fs->score = 3;
- else if (fs->score < -3)
- fs->score = -3;
-
- return 0;
-}
-
-static void
-spin_changed (GtkWidget *spin, FilterElement *fe)
-{
- FilterScore *fs = (FilterScore *)fe;
-
- fs->score = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- GtkWidget *spin;
- GtkObject *adjustment;
- FilterScore *fs = (FilterScore *)fe;
-
- adjustment = gtk_adjustment_new (0.0, -3.0, 3.0, 1.0, 1.0, 1.0);
- spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1.0, 0);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
-
- if (fs->score) {
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), (gfloat) fs->score);
- }
-
- gtk_signal_connect (GTK_OBJECT (spin), "changed", spin_changed, fe);
-
- return spin;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- return;
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterScore *fs = (FilterScore *)fe;
-
- g_string_sprintfa(out, "%d ", fs->score);
-}
diff --git a/filter/filter-score.h b/filter/filter-score.h
deleted file mode 100644
index 468d28c28f..0000000000
--- a/filter/filter-score.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 _FILTER_SCORE_H
-#define _FILTER_SCORE_H
-
-#include "filter-element.h"
-
-#define FILTER_SCORE(obj) GTK_CHECK_CAST (obj, filter_score_get_type (), FilterScore)
-#define FILTER_SCORE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_score_get_type (), FilterScoreClass)
-#define IS_FILTER_SCORE(obj) GTK_CHECK_TYPE (obj, filter_score_get_type ())
-
-typedef struct _FilterScore FilterScore;
-typedef struct _FilterScoreClass FilterScoreClass;
-
-struct _FilterScore {
- FilterElement parent;
- struct _FilterScorePrivate *priv;
-
- gint32 score;
-};
-
-struct _FilterScoreClass {
- FilterElementClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint filter_score_get_type (void);
-FilterScore *filter_score_new (void);
-
-/* methods */
-
-#endif /* ! _FILTER_SCORE_H */
-
diff --git a/filter/filter-source.c b/filter/filter-source.c
deleted file mode 100644
index fd9a56f882..0000000000
--- a/filter/filter-source.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * filter-source.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 "filter-source.h"
-
-#include <gtk/gtk.h>
-#include <gnome.h>
-#include <gal/widgets/e-unicode.h>
-#include <e-util/e-url.h>
-#include <e-util/e-sexp.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-
-typedef struct _SourceInfo SourceInfo;
-struct _SourceInfo {
- gchar *name;
- gchar *address;
- gchar *url;
-};
-
-struct _FilterSourcePrivate {
- GList *sources;
- gchar *current_url;
-};
-
-static FilterElementClass *parent_class = NULL;
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static void filter_source_class_init (FilterSourceClass *);
-static void filter_source_init (FilterSource *);
-static void filter_source_finalize (GtkObject *);
-
-static void xml_create(FilterElement *fe, xmlNodePtr node);
-static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
-static FilterElement *clone(FilterElement *fe);
-static GtkWidget *get_widget(FilterElement *fe);
-static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
-static void format_sexp(FilterElement *, GString *);
-
-static void filter_source_add_source (FilterSource *fs, const gchar *name, const gchar *addr, const gchar *url);
-static void filter_source_get_sources (FilterSource *fs);
-
-
-GtkType
-filter_source_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterSource",
- sizeof(FilterSource),
- sizeof(FilterSourceClass),
- (GtkClassInitFunc)filter_source_class_init,
- (GtkObjectInitFunc)filter_source_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (filter_element_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_source_class_init (FilterSourceClass *class)
-{
- GtkObjectClass *object_class;
- FilterElementClass *filter_element = (FilterElementClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(filter_element_get_type ());
-
- object_class->finalize = filter_source_finalize;
-
- /* override methods */
- filter_element->xml_create = xml_create;
- filter_element->xml_encode = xml_encode;
- filter_element->xml_decode = xml_decode;
- filter_element->clone = clone;
- filter_element->get_widget = get_widget;
- filter_element->build_code = build_code;
- filter_element->format_sexp = format_sexp;
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_source_init (FilterSource *fs)
-{
- fs->priv = g_new0 (struct _FilterSourcePrivate, 1);
-}
-
-static void
-filter_source_finalize (GtkObject *obj)
-{
- FilterSource *fs = FILTER_SOURCE (obj);
- GList *i = fs->priv->sources;
-
- while (i) {
- SourceInfo *info = i->data;
- g_free (info->name);
- g_free (info->address);
- g_free (info->url);
- g_free (info);
- i = g_list_next (i);
- }
-
- g_list_free (fs->priv->sources);
-
- g_free (fs->priv);
-
- if (GTK_OBJECT_CLASS (parent_class)->finalize)
- GTK_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-FilterSource *
-filter_source_new (void)
-{
- FilterSource *s = (FilterSource *) gtk_type_new (filter_source_get_type ());
- return s;
-}
-
-static void
-xml_create (FilterElement *fe, xmlNodePtr node)
-{
- /* Call parent implementation */
- ((FilterElementClass *)parent_class)->xml_create (fe, node);
-}
-
-static xmlNodePtr
-xml_encode (FilterElement *fe)
-{
- xmlNodePtr value;
-
- FilterSource *fs = (FilterSource *) fe;
-
- value = xmlNewNode (NULL, "value");
- xmlSetProp (value, "name", fe->name);
- xmlSetProp (value, "type", "uri");
-
- if (fs->priv->current_url)
- xmlNewTextChild (value, NULL, "uri", fs->priv->current_url);
-
- return value;
-}
-
-static gint
-xml_decode (FilterElement *fe, xmlNodePtr node)
-{
- FilterSource *fs = (FilterSource *) fe;
- gchar *value;
-
- node = node->childs;
- if (node && node->name && !strcmp (node->name, "uri")) {
- g_free (fs->priv->current_url);
- fs->priv->current_url = xmlNodeGetContent (node);
- }
-
- return 0;
-}
-
-static FilterElement *
-clone (FilterElement *fe)
-{
- FilterSource *fs = (FilterSource *) fe;
- FilterSource *cpy = filter_source_new ();
- GList *i;
-
- ((FilterElement *)cpy)->name = xmlStrdup (fe->name);
-
- cpy->priv->current_url = g_strdup (fs->priv->current_url);
-
- for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) {
- SourceInfo *info = (SourceInfo *) i->data;
- filter_source_add_source (cpy, info->name, info->address, info->url);
- }
-
- return (FilterElement *) cpy;
-}
-
-static void
-source_changed (GtkWidget *w, FilterSource *fs)
-{
- SourceInfo *info = (SourceInfo *) gtk_object_get_data (GTK_OBJECT (w), "source");
-
- g_free (fs->priv->current_url);
- fs->priv->current_url = g_strdup (info->url);
-}
-
-static GtkWidget *
-get_widget (FilterElement *fe)
-{
- FilterSource *fs = (FilterSource *) fe;
- GtkWidget *menu;
- GtkWidget *omenu;
- GtkWidget *item;
- GList *i;
- SourceInfo *first = NULL;
- gint index, current_index;
-
- if (fs->priv->sources == NULL)
- filter_source_get_sources (fs);
-
- menu = gtk_menu_new ();
-
- index = 0;
- current_index = -1;
-
- for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) {
- SourceInfo *info = (SourceInfo *) i->data;
- gchar *label, *native_label;
-
- if (info->url != NULL) {
-
- if (first == NULL)
- first = info;
-
- label = g_strdup_printf ("%s <%s>", info->name, info->address);
- native_label = e_utf8_to_gtk_string (GTK_WIDGET (menu), label);
- item = gtk_menu_item_new_with_label (native_label);
- g_free (label);
- g_free (native_label);
-
- gtk_object_set_data (GTK_OBJECT (item), "source", info);
- gtk_signal_connect (GTK_OBJECT (item), "activate", GTK_SIGNAL_FUNC (source_changed), fs);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
-
- if (fs->priv->current_url && e_url_equal (info->url, fs->priv->current_url)) {
- current_index = index;
- }
-
- ++index;
- }
- }
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- if (current_index >= 0) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current_index);
- } else {
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), 0);
- g_free (fs->priv->current_url);
-
- if (first)
- fs->priv->current_url = g_strdup (first->url);
- else
- fs->priv->current_url = NULL;
- }
-
- return omenu;
-}
-
-static void
-build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
-{
- /* We are doing nothing on purpose. */
-}
-
-static void
-format_sexp (FilterElement *fe, GString *out)
-{
- FilterSource *fs = (FilterSource *) fe;
-
- e_sexp_encode_string (out, fs->priv->current_url);
-}
-
-
-static void
-filter_source_add_source (FilterSource *fs, const gchar *name, const gchar *addr, const gchar *url)
-{
- SourceInfo *info;
- g_return_if_fail (fs && IS_FILTER_SOURCE (fs));
-
- info = g_new0 (SourceInfo, 1);
- info->name = g_strdup (name);
- info->address = g_strdup (addr);
- info->url = g_strdup (url);
-
- fs->priv->sources = g_list_append (fs->priv->sources, info);
-}
-
-static void
-filter_source_get_sources (FilterSource *fs)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- gint i, len;
-
- CORBA_exception_init (&ev);
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- len = bonobo_config_get_long_with_default (db, "/Mail/Accounts/num", 0, NULL);
-
- for (i = 0; i < len; ++i) {
- gchar *path;
- gchar *name;
- gchar *addr;
- gchar *url;
-
- path = g_strdup_printf ("/Mail/Accounts/identity_name_%d", i);
- name = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_address_%d", i);
- addr = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_url_%d", i);
- url = bonobo_config_get_string (db, path, NULL);
- g_free (path);
-
- filter_source_add_source (fs, name, addr, url);
-
- g_free (name);
- g_free (addr);
- g_free (url);
- }
-}
diff --git a/filter/filter-source.h b/filter/filter-source.h
deleted file mode 100644
index 4d14b3bf8c..0000000000
--- a/filter/filter-source.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * filter-source.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 __FILTER_SOURCE_H__
-#define __FILTER_SOURCE_H__
-
-#include "filter-element.h"
-
-#define FILTER_SOURCE(obj) GTK_CHECK_CAST (obj, filter_source_get_type (), FilterSource)
-#define FILTER_SOURCE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_source_get_type (), FilterSourceClass)
-#define IS_FILTER_SOURCE(obj) GTK_CHECK_TYPE (obj, filter_source_get_type ())
-
-typedef struct _FilterSource FilterSource;
-typedef struct _FilterSourceClass FilterSourceClass;
-struct _FilterSourcePrivate;
-
-struct _FilterSource {
- FilterElement parent;
- struct _FilterSourcePrivate *priv;
-};
-
-struct _FilterSourceClass {
- FilterElementClass parent_class;
-};
-
-GtkType filter_source_get_type (void);
-FilterSource *filter_source_new (void);
-
-void filter_source_set_current (FilterSource *src, const gchar *url);
-
-#endif /* __FILTER_SOURCE_H__ */
-
diff --git a/filter/filter.glade b/filter/filter.glade
deleted file mode 100644
index 7325381317..0000000000
--- a/filter/filter.glade
+++ /dev/null
@@ -1,738 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Filter</name>
- <program_name>filter</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>edit_filter_2</name>
- <title>Edit Filters</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>GtkOptionMenu</class>
- <name>filter_source</name>
- <can_focus>True</can_focus>
- <items>Incoming
-Outgoing
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame1</name>
- <label>Filter Rules</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>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <width>256</width>
- <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>GtkViewport</class>
- <name>viewport1</name>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkList</class>
- <name>rule_list</name>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>0</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>6</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>rule_add</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>rule_edit</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>rule_delete</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rule_up</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_UP</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rule_down</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_DOWN</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>edit_vfolder_2</name>
- <title>Edit VFolders</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-vbox2</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_area2</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>button13</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>button15</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame2</name>
- <label>Virtual Folders</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>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <width>256</width>
- <height>167</height>
- <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>GtkViewport</class>
- <name>viewport2</name>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkList</class>
- <name>rule_list</name>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox2</name>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>0</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>6</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>rule_add</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>rule_edit</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>rule_delete</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rule_up</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_UP</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rule_down</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_DOWN</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>vfolder_source</name>
- <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-vbox3</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_area3</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>button16</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>button17</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>button18</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>vfolder_source_frame</name>
- <label>vFolder Sources</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>vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>source_option</name>
- <can_focus>True</can_focus>
- <items>specific folders only
-with all local folders
-with all active remote folders
-with all local and active remote folders
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow3</name>
- <width>256</width>
- <height>125</height>
- <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>GtkViewport</class>
- <name>viewport3</name>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkList</class>
- <name>source_list</name>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox3</name>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>0</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>6</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>source_add</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>source_remove</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Remove</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>edit_filter</name>
- <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>GtkVBox</class>
- <name>rule_editor</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>filter_source</name>
- <visible>False</visible>
- <can_focus>True</can_focus>
- <items>Incoming
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>rule_frame</name>
- <label>Filter Rules</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>0</spacing>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow4</name>
- <width>256</width>
- <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>GtkViewport</class>
- <name>viewport4</name>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkList</class>
- <name>rule_list</name>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox4</name>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>0</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>6</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>rule_add</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>rule_edit</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>rule_delete</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rule_up</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_UP</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rule_down</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_DOWN</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml
deleted file mode 100644
index bca26ca0b3..0000000000
--- a/filter/filtertypes.xml
+++ /dev/null
@@ -1,628 +0,0 @@
-<?xml version="1.0"?>
-<filterdescription>
-<partset>
- <part name="sender">
- <title>Sender</title>
- <input type="optionlist" name="sender-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (match-all (header-contains "From" ${sender}))
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (header-contains "From" ${sender})))
- </code>
- </option>
- <option value="is">
- <title>is</title>
- <code>
- (match-all (header-matches "From" ${sender}))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (header-matches "From" ${sender})))
- </code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with "From" ${sender}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with "From" ${sender})))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with "From" ${sender}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with "From" ${sender})))
- </code>
- </option>
- <option value="matches soundex">
- <title>sounds like</title>
- <code>
- (match-all (header-soundex "From" ${sender}))
- </code>
- </option>
- <option value="not match soundex">
- <title>does not sound like</title>
- <code>
- (match-all (not (header-soundex "From" ${sender})))
- </code>
- </option>
- </input>
- <input type="string" name="sender"/>
- </part>
-
- <part name="to">
- <title>Recipients</title>
- <input type="optionlist" name="recipient-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (match-all (or (header-contains "To" ${recipient})
- (header-contains "Cc" ${recipient})))
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (or
- (header-contains "To" ${recipient})
- (header-contains "Cc" ${recipient}))))
- </code>
- </option>
- <option value="is">
- <title>is</title>
- <code>
- (match-all (or (header-matches "To" ${recipient})
- (header-matches "Cc" ${recipient})))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (or
- (header-matches "To" ${recipient})
- (header-matches "Cc" ${recipient}))))
- </code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (or (header-starts-with "To" ${recipient})
- (header-starts-with "Cc" ${recipient})))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (or
- (header-starts-with "To" ${recipient})
- (header-starts-with "Cc" ${recipient}))))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (or (header-ends-with "To" ${recipient})
- (header-ends-with "Cc" ${recipient})))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (or
- (header-ends-with "To" ${recipient})
- (header-ends-with "Cc" ${recipient}))))
- </code>
- </option>
- <option value="matches soundex">
- <title>sounds like</title>
- <code>
- (match-all (or (header-soundex "To" ${recipient})
- (header-soundex "Cc" ${recipient})))
- </code>
- </option>
- <option value="not match soundex">
- <title>does not sound like</title>
- <code>
- (match-all (not (or
- (header-soundex "To" ${recipient})
- (header-soundex "Cc" ${recipient}))))
- </code>
- </option>
- </input>
- <input type="address" name="recipient"/>
- </part>
-
- <part name="subject">
- <title>Subject</title>
- <input type="optionlist" name="subject-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (match-all (header-contains "Subject" ${subject}))
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (header-contains "Subject" ${subject})))
- </code>
- </option>
- <option value="is">
- <title>is</title>
- <code>
- (match-all (header-matches "Subject" ${subject}))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (header-matches "Subject" ${subject}))
- </code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with "Subject" ${subject}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with "Subject" ${subject}))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with "Subject" ${subject}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with "Subject" ${subject}))
- </code>
- </option>
- <option value="matches soundex">
- <title>sounds like</title>
- <code>
- (match-all (header-soundex "Subject" ${subject}))
- </code>
- </option>
- <option value="not match soundex">
- <title>does not sound like</title>
- <code>
- (match-all (not (header-soundex "Subject" ${subject})))
- </code>
- </option>
- </input>
- <input type="string" name="subject"/>
- </part>
-
- <part name="header">
- <title>Specific header</title>
- <input type="string" name="header-field"/>
- <input type="optionlist" name="header-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (match-all (header-contains ${header-field} ${word}))
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (header-contains ${header-field} ${word})))
- </code>
- </option>
- <option value="is">
- <title>is</title>
- <code>
- (match-all (header-matches ${header-field} ${word}))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (header-matches ${header-field} ${word}))
- </code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with ${header-field} ${word}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with ${header-field} ${word}))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with ${header-field} ${word}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with ${header-field} ${word}))
- </code>
- </option>
- <option value="exists">
- <title>exists</title>
- <code>
- (match-all (header-exists ${header-field}))
- </code>
- </option>
- <option value="not exists">
- <title>does not exist</title>
- <code>
- (match-all (not (header-exists ${header-field}))
- </code>
- </option>
- <option value="matches soundex">
- <title>sounds like</title>
- <code>
- (match-all (header-soundex ${header-field} ${word}))
- </code>
- </option>
- <option value="not match soundex">
- <title>does not sound like</title>
- <code>
- (match-all (not (header-soundex ${header-field} ${word})))
- </code>
- </option>
- </input>
- <input type="string" name="word"/>
- </part>
-
- <part name="body">
- <title>Message Body</title>
- <input type="optionlist" name="body-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (body-contains ${word})
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (body-contains ${word})))
- </code>
- </option>
- </input>
- <input type="string" name="word"/>
- </part>
-
- <part name="sexp">
- <title>Expression</title>
- <input type="code" name="code"/>
- </part>
-
- <part name="sent-date">
- <title>Date sent</title>
- <input type="optionlist" name="date-spec-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (get-sent-date) ${versus})))
- </code>
- </option>
- <option value="before">
- <title>was before</title>
- <code>
- (match-all (&lt; (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>was after</title>
- <code>
- (match-all (&gt; (get-sent-date) ${versus}))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus"/>
- </part>
-
- <part name="recv-date">
- <title>Date received</title>
- <input type="optionlist" name="date-spec-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (get-received-date) ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (get-received-date) ${versus})))
- </code>
- </option>
- <option value="before">
- <title>was before</title>
- <code>
- (match-all (&lt; (get-received-date) ${versus}))
- </code>
- </option>
- <option value="after">
- <title>was after</title>
- <code>
- (match-all (&gt; (get-received-date) ${versus}))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus"/>
- </part>
-
- <part name="score">
- <title>Score</title>
- <input type="optionlist" name="score-type">
- <option value="less-than">
- <title>is</title>
- <code>
- (match-all (= (get-score) ${versus}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (get-score) ${versus})))
- </code>
- </option>
- <option value="greater-than">
- <title>is greater than</title>
- <code>
- (match-all (&gt; (get-score) ${versus}))
- </code>
- </option>
- <option value="less-than">
- <title>is less than</title>
- <code>
- (match-all (&lt; (get-score) ${versus}))
- </code>
- </option>
- </input>
- <input type="score" name="versus"/>
- </part>
-
-
- <part name="size">
- <title>Size (kB)</title>
- <input type="optionlist" name="size-type">
- <option value="greater-than">
- <title>is greater than</title>
- <code>
- (match-all (&gt; (get-size) ${versus}))
- </code>
- </option>
- <option value="less-than">
- <title>is less than</title>
- <code>
- (match-all (&lt; (get-size) ${versus}))
- </code>
- </option>
- </input>
- <input type="integer" name="versus"/>
- </part>
-
- <part name="status">
- <title>Status</title>
- <input type="optionlist" name="match-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (system-flag ${flag}))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (system-flag ${flag})))
- </code>
- </option>
- </input>
- <input type="optionlist" name="flag">
- <option value="Answered">
- <title>Replied to</title>
- </option>
- <option value="Draft">
- <title>Draft</title>
- </option>
- <option value="Flagged">
- <title>Important</title>
- </option>
- <option value="Seen">
- <title>Read</title>
- </option>
- </input>
- </part>
-
- <part name="attachments">
- <title>Attachments</title>
- <input type="optionlist" name="match-type">
- <option value="exist">
- <title>Exist</title>
- <code>
- (match-all (system-flag "Attachments"))
- </code>
- </option>
- <option value="not exist">
- <title>Do Not Exist</title>
- <code>
- (match-all (not (system-flag "Attachments")))
- </code>
- </option>
- </input>
- </part>
-
- <part name="mlist">
- <title>Mailing list</title>
- <input type="optionlist" name="mlist-type">
- <option value="contains">
- <title>contains</title>
- <code>(match-all (header-contains "x-camel-mlist" ${mlist}))</code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>(match-all (not (header-contains "x-camel-mlist" ${mlist})))</code>
- </option>
- <option value="is">
- <title>is</title>
- <code>(match-all (header-matches "x-camel-mlist" ${mlist}))</code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>(match-all (not (header-matches "x-camel-mlist" ${mlist})))</code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with "x-camel-mlist" ${mlist}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with "x-camel-mlist" ${mlist})))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with "x-camel-mlist" ${mlist}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with "x-camel-mlist" ${mlist})))
- </code>
- </option>
- </input>
- <input type="string" name="mlist"/>
- </part>
-
- <part name="regex">
- <title>Regex Match</title>
- <input type="optionlist" name="match-type">
- <option value="header">
- <title>Message Header</title>
- <code>
- (match-all (header-full-regex ${expression}))
- </code>
- </option>
- <option value="body">
- <title>Message Body</title>
- <code>
- (match-all (body-regex ${expression}))
- </code>
- </option>
- </input>
- <input type="regex" name="expression"/>
- </part>
-
- <part name="source">
- <title>Source Account</title>
- <input type="optionlist" name="srcmatch-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (= (get-source) ${source}))
- </code>
- </option>
- <option value="is-not">
- <title>is not</title>
- <code>
- (match-all (not (= (get-source) ${source})))
- </code>
- </option>
- </input>
- <input type="source" name="source"/>
- </part>
-
-</partset>
-
-
-<actionset>
- <part name="move-to-folder">
- <title>Move to Folder</title>
- <code>(move-to ${folder})</code>
- <input type="folder" name="folder"/>
- </part>
- <part name="copy-to-folder">
- <title>Copy to Folder</title>
- <code>(copy-to ${folder})</code>
- <input type="folder" name="folder"/>
- </part>
- <part name="delete">
- <title>Delete</title>
- <code>(delete)</code>
- </part>
- <part name="stop">
- <title>Stop Processing</title>
- <code>(stop)</code>
- </part>
- <part name="colour">
- <title>Assign Color</title>
- <code>(set-colour ${colour})</code>
- <input type="colour" name="colour"/>
- </part>
- <part name="score">
- <title>Assign Score</title>
- <code>(set-score ${score})</code>
- <input type="score" name="score"/>
- </part>
- <part name="set-status">
- <title>Set Status</title>
- <code>
- (set-system-flag ${flag})
- </code>
- <input type="optionlist" name="flag">
- <option value="Answered">
- <title>Replied to</title>
- </option>
- <option value="Deleted">
- <title>Deleted</title>
- </option>
- <option value="Draft">
- <title>Draft</title>
- </option>
- <option value="Flagged">
- <title>Important</title>
- </option>
- <option value="Seen">
- <title>Read</title>
- </option>
- </input>
- </part>
-</actionset>
-</filterdescription>
diff --git a/filter/libfilter-i18n.h b/filter/libfilter-i18n.h
deleted file mode 100644
index d3cc5cbb36..0000000000
--- a/filter/libfilter-i18n.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Automatically generated. Do not edit. */
-char *s = N_("after");
-char *s = N_("Assign Color");
-char *s = N_("Assign Score");
-char *s = N_("Attachments");
-char *s = N_("before");
-char *s = N_("contains");
-char *s = N_("Copy to Folder");
-char *s = N_("Date received");
-char *s = N_("Date sent");
-char *s = N_("Delete");
-char *s = N_("Deleted");
-char *s = N_("does not contain");
-char *s = N_("does not end with");
-char *s = N_("does not exist");
-char *s = N_("does not sound like");
-char *s = N_("does not start with");
-char *s = N_("Do Not Exist");
-char *s = N_("Draft");
-char *s = N_("ends with");
-char *s = N_("Exist");
-char *s = N_("exists");
-char *s = N_("Expression");
-char *s = N_("Important");
-char *s = N_("is");
-char *s = N_("is greater than");
-char *s = N_("is less than");
-char *s = N_("is not");
-char *s = N_("Mailing list");
-char *s = N_("Message Body");
-char *s = N_("Message Header");
-char *s = N_("Message was received");
-char *s = N_("Message was sent");
-char *s = N_("Move to Folder");
-char *s = N_("on or after");
-char *s = N_("on or before");
-char *s = N_("Read");
-char *s = N_("Recipients");
-char *s = N_("Regex Match");
-char *s = N_("Replied to");
-char *s = N_("Score");
-char *s = N_("Sender");
-char *s = N_("Set Status");
-char *s = N_("Size (kB)");
-char *s = N_("sounds like");
-char *s = N_("Source Account");
-char *s = N_("Specific header");
-char *s = N_("starts with");
-char *s = N_("Status");
-char *s = N_("Stop Processing");
-char *s = N_("Subject");
-char *s = N_("was after");
-char *s = N_("was before");
diff --git a/filter/rule-context.c b/filter/rule-context.c
deleted file mode 100644
index 389ef7296a..0000000000
--- a/filter/rule-context.c
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <errno.h>
-#include <string.h>
-#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-
-#include "rule-context.h"
-
-#define d(x)
-
-static int load(RuleContext * f, const char *system, const char *user);
-static int save(RuleContext * f, const char *user);
-
-static void rule_context_class_init(RuleContextClass * class);
-static void rule_context_init(RuleContext * gspaper);
-static void rule_context_finalise(GtkObject * obj);
-
-#define _PRIVATE(x) (((RuleContext *)(x))->priv)
-
-struct _RuleContextPrivate {
- int frozen;
-};
-
-static GtkObjectClass *parent_class;
-
-enum {
- RULE_ADDED,
- RULE_REMOVED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-rule_context_get_type(void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "RuleContext",
- sizeof(RuleContext),
- sizeof(RuleContextClass),
- (GtkClassInitFunc) rule_context_class_init,
- (GtkObjectInitFunc) rule_context_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique(gtk_object_get_type(), &type_info);
- }
-
- return type;
-}
-
-static void
-rule_context_class_init (RuleContextClass * class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class(gtk_object_get_type());
-
- object_class->finalize = rule_context_finalise;
-
- /* override methods */
- class->load = load;
- class->save = save;
-
- /* signals */
- signals[RULE_ADDED] =
- gtk_signal_new("rule_added",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (RuleContextClass, rule_added),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- signals[RULE_REMOVED] =
- gtk_signal_new("rule_removed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (RuleContextClass, rule_removed),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-rule_context_init (RuleContext * o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-
- o->part_set_map = g_hash_table_new (g_str_hash, g_str_equal);
- o->rule_set_map = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-free_part_set (struct _part_set_map *map, void *data)
-{
- g_free (map->name);
- g_free (map);
-}
-
-static void
-free_rule_set (struct _rule_set_map *map, void *data)
-{
- g_free (map->name);
- g_free (map);
-}
-
-static void
-rule_context_finalise (GtkObject * obj)
-{
- RuleContext *o = (RuleContext *) obj;
-
- g_list_foreach (o->rule_set_list, (GFunc)free_rule_set, NULL);
- g_list_free (o->rule_set_list);
- g_hash_table_destroy (o->rule_set_map);
-
- g_list_foreach (o->part_set_list, (GFunc)free_part_set, NULL);
- g_list_free (o->part_set_list);
- g_hash_table_destroy (o->part_set_map);
-
- g_free (o->error);
-
- g_list_foreach (o->parts, (GFunc)gtk_object_unref, NULL);
- g_list_free (o->parts);
- g_list_foreach (o->rules, (GFunc)gtk_object_unref, NULL);
- g_list_free (o->rules);
-
- if (o->system)
- xmlFreeDoc (o->system);
- if (o->user)
- xmlFreeDoc (o->user);
-
- g_free (o->priv);
-
- ((GtkObjectClass *) (parent_class))->finalize (obj);
-}
-
-/**
- * rule_context_new:
- *
- * Create a new RuleContext object.
- *
- * Return value: A new #RuleContext object.
- **/
-RuleContext *
-rule_context_new (void)
-{
- RuleContext *o = (RuleContext *) gtk_type_new(rule_context_get_type());
-
- return o;
-}
-
-void
-rule_context_add_part_set (RuleContext * f, const char *setname, int part_type, RCPartFunc append, RCNextPartFunc next)
-{
- struct _part_set_map *map;
-
- g_assert(g_hash_table_lookup(f->part_set_map, setname) == NULL);
-
- map = g_malloc0 (sizeof(*map));
- map->type = part_type;
- map->append = append;
- map->next = next;
- map->name = g_strdup (setname);
- g_hash_table_insert (f->part_set_map, map->name, map);
- f->part_set_list = g_list_append (f->part_set_list, map);
- d(printf("adding part set '%s'\n", setname));
-}
-
-void
-rule_context_add_rule_set (RuleContext * f, const char *setname, int rule_type, RCRuleFunc append, RCNextRuleFunc next)
-{
- struct _rule_set_map *map;
-
- g_assert(g_hash_table_lookup (f->rule_set_map, setname) == NULL);
-
- map = g_malloc0 (sizeof (*map));
- map->type = rule_type;
- map->append = append;
- map->next = next;
- map->name = g_strdup (setname);
- g_hash_table_insert (f->rule_set_map, map->name, map);
- f->rule_set_list = g_list_append (f->rule_set_list, map);
- d(printf("adding rule set '%s'\n", setname));
-}
-
-/**
- * rule_context_set_error:
- * @f:
- * @error:
- *
- * Set the text error for the context, or NULL to clear it.
- **/
-static void
-rule_context_set_error (RuleContext * f, char *error)
-{
- g_free (f->error);
- f->error = error;
-}
-
-/**
- * rule_context_load:
- * @f:
- * @system:
- * @user:
- *
- * Load a rule context from a system and user description file.
- *
- * Return value:
- **/
-int
-rule_context_load (RuleContext *f, const char *system, const char *user)
-{
- int res;
-
- d(printf("rule_context: loading %s %s\n", system, user));
-
- f->priv->frozen++;
- res= ((RuleContextClass *) ((GtkObject *) f)->klass)->load (f, system, user);
- f->priv->frozen--;
-
- return res;
-}
-
-static int
-load (RuleContext *f, const char *system, const char *user)
-{
- xmlNodePtr set, rule;
- struct _part_set_map *part_map;
- struct _rule_set_map *rule_map;
-
- rule_context_set_error (f, NULL);
-
- d(printf("loading rules %s %s\n", system, user));
-
- f->system = xmlParseFile (system);
- if (f->system == NULL) {
- rule_context_set_error(f, g_strdup_printf ("Unable to load system rules '%s': %s",
- system, strerror(errno)));
- return -1;
- }
- if (strcmp (f->system->root->name, "filterdescription")) {
- rule_context_set_error (f, g_strdup_printf ("Unable to load system rules '%s': Invalid format", system));
- xmlFreeDoc (f->system);
- f->system = NULL;
- return -1;
- }
- /* doesn't matter if this doens't exist */
- f->user = xmlParseFile (user);
-
- /* now parse structure */
- /* get rule parts */
- set = f->system->root->childs;
- while (set) {
- d(printf("set name = %s\n", set->name));
- part_map = g_hash_table_lookup (f->part_set_map, set->name);
- if (part_map) {
- d(printf("loading parts ...\n"));
- rule = set->childs;
- while (rule) {
- if (!strcmp (rule->name, "part")) {
- FilterPart *part = FILTER_PART (gtk_type_new (part_map->type));
-
- if (filter_part_xml_create (part, rule) == 0) {
- part_map->append (f, part);
- } else {
- gtk_object_unref (GTK_OBJECT (part));
- g_warning ("Cannot load filter part");
- }
- }
- rule = rule->next;
- }
- }
- set = set->next;
- }
-
- /* now load actual rules */
- if (f->user) {
- set = f->user->root->childs;
- while (set) {
- d(printf("set name = %s\n", set->name));
- rule_map = g_hash_table_lookup (f->rule_set_map, set->name);
- if (rule_map) {
- d(printf("loading rules ...\n"));
- rule = set->childs;
- while (rule) {
- d(printf("checking node: %s\n", rule->name));
- if (!strcmp (rule->name, "rule")) {
- FilterRule *part = FILTER_RULE(gtk_type_new (rule_map->type));
-
- if (filter_rule_xml_decode (part, rule, f) == 0) {
- rule_map->append (f, part);
- } else {
- gtk_object_unref (GTK_OBJECT (part));
- g_warning ("Cannot load filter part");
- }
- }
- rule = rule->next;
- }
- }
- set = set->next;
- }
- }
- return 0;
-}
-
-/**
- * rule_context_save:
- * @f:
- * @user:
- *
- * Save a rule context to disk.
- *
- * Return value:
- **/
-int
-rule_context_save (RuleContext *f, const char *user)
-{
- return ((RuleContextClass *) ((GtkObject *) f)->klass)->save(f, user);
-}
-
-static int
-save (RuleContext *f, const char *user)
-{
- xmlDocPtr doc;
- xmlNodePtr root, rules, work;
- GList *l;
- FilterRule *rule;
- struct _rule_set_map *map;
-
- doc = xmlNewDoc ("1.0");
- root = xmlNewDocNode (doc, NULL, "filteroptions", NULL);
- xmlDocSetRootElement (doc, root);
- l = f->rule_set_list;
- while (l) {
- map = l->data;
- rules = xmlNewDocNode (doc, NULL, map->name, NULL);
- xmlAddChild (root, rules);
- rule = NULL;
- while ((rule = map->next (f, rule, NULL))) {
- d(printf("processing rule %s\n", rule->name));
- work = filter_rule_xml_encode (rule);
- xmlAddChild (rules, work);
- }
- l = g_list_next (l);
- }
- xmlSaveFile (user, doc);
- xmlFreeDoc (doc);
- return 0;
-}
-
-FilterPart *
-rule_context_find_part (RuleContext *f, const char *name)
-{
- d(printf("find part : "));
- return filter_part_find_list (f->parts, name);
-}
-
-FilterPart *
-rule_context_create_part (RuleContext *f, const char *name)
-{
- FilterPart *part;
-
- part = rule_context_find_part (f, name);
- if (part)
- part = filter_part_clone (part);
- return part;
-}
-
-FilterPart *
-rule_context_next_part (RuleContext *f, FilterPart *last)
-{
- return filter_part_next_list (f->parts, last);
-}
-
-FilterRule *
-rule_context_next_rule (RuleContext *f, FilterRule *last, const char *source)
-{
- return filter_rule_next_list (f->rules, last, source);
-}
-
-FilterRule *
-rule_context_find_rule (RuleContext *f, const char *name, const char *source)
-{
- return filter_rule_find_list (f->rules, name, source);
-}
-
-void
-rule_context_add_part (RuleContext *f, FilterPart *part)
-{
- f->parts = g_list_append (f->parts, part);
-}
-
-void
-rule_context_add_rule (RuleContext *f, FilterRule *new)
-{
- f->rules = g_list_append (f->rules, new);
-
- if (f->priv->frozen == 0)
- gtk_signal_emit((GtkObject *)f, signals[RULE_ADDED], new);
-}
-
-static void
-new_rule_clicked (GtkWidget *dialog, int button, RuleContext *context)
-{
-#ifndef NO_WARNINGS
-#warning "Need a changed signal for this to work best"
-#endif
- if (button == 0) {
- FilterRule *rule = gtk_object_get_data (GTK_OBJECT (dialog), "rule");
- char *user = gtk_object_get_data (GTK_OBJECT (dialog), "path");
-
- if (!filter_rule_validate (rule)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- gtk_object_ref (GTK_OBJECT (rule));
- rule_context_add_rule (context, rule);
- if (user) {
- rule_context_save ((RuleContext *) context, user);
- }
- }
-
- if (button != -1) {
- gnome_dialog_close (GNOME_DIALOG (dialog));
- }
-}
-
-/* add a rule, with a gui, asking for confirmation first ... optionally save to path */
-void
-rule_context_add_rule_gui (RuleContext *f, FilterRule *rule, const char *title, const char *path)
-{
- GtkWidget *dialog, *w;
-
- w = filter_rule_get_widget (rule, f);
- dialog = gnome_dialog_new (title, GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), w, TRUE, TRUE, 0);
- gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
- gtk_widget_show (w);
-
- gtk_object_set_data_full (GTK_OBJECT (dialog), "rule", rule, (GtkDestroyNotify) gtk_object_unref);
- if (path)
- gtk_object_set_data_full (GTK_OBJECT (dialog), "path", g_strdup (path), (GtkDestroyNotify) g_free);
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked", new_rule_clicked, f);
- gtk_object_ref (GTK_OBJECT (f));
- gtk_object_set_data_full (GTK_OBJECT (dialog), "context", f, (GtkDestroyNotify) gtk_object_unref);
- gtk_widget_show (dialog);
-}
-
-void
-rule_context_remove_rule (RuleContext *f, FilterRule *rule)
-{
- f->rules = g_list_remove (f->rules, rule);
-
- if (f->priv->frozen == 0)
- gtk_signal_emit((GtkObject *)f, signals[RULE_REMOVED], rule);
-}
-
-void
-rule_context_rank_rule (RuleContext *f, FilterRule *rule, int rank)
-{
- f->rules = g_list_remove (f->rules, rule);
- f->rules = g_list_insert (f->rules, rule, rank);
-}
-
-int
-rule_context_get_rank_rule (RuleContext *f, FilterRule *rule, const char *source)
-{
- GList *node = f->rules;
- int i = 0;
-
- while (node) {
- FilterRule *r = node->data;
-
- if (r == rule)
- return i;
-
- if (source == NULL || (r->source && strcmp (r->source, source) == 0))
- i++;
-
- node = node->next;
- }
-
- return -1;
-}
diff --git a/filter/rule-context.h b/filter/rule-context.h
deleted file mode 100644
index 6f6a72f270..0000000000
--- a/filter/rule-context.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _RULE_CONTEXT_H
-#define _RULE_CONTEXT_H
-
-#include <gtk/gtkobject.h>
-#include <gnome-xml/parser.h>
-
-#include "filter-part.h"
-#include "filter-rule.h"
-
-#define RULE_CONTEXT(obj) GTK_CHECK_CAST (obj, rule_context_get_type (), RuleContext)
-#define RULE_CONTEXT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, rule_context_get_type (), RuleContextClass)
-#define IS_RULE_CONTEXT(obj) GTK_CHECK_TYPE (obj, rule_context_get_type ())
-
-typedef struct _RuleContext RuleContext;
-typedef struct _RuleContextClass RuleContextClass;
-
-struct _RuleContext {
- GtkObject parent;
- struct _RuleContextPrivate *priv;
-
- char *error; /* string version of error */
-
- xmlDocPtr system; /* system rules source */
- xmlDocPtr user; /* user defined rules source */
-
- GList *parts;
- GList *rules;
-
- GHashTable *part_set_map;/* map set types to part types */
- GList *part_set_list;
- GHashTable *rule_set_map;/* map set types to rule types */
- GList *rule_set_list;
-};
-
-typedef void (*RCRegisterFunc)(RuleContext *f, FilterRule *rule, gpointer data);
-
-struct _RuleContextClass {
- GtkObjectClass parent_class;
-
- /* virtual methods */
- int (*load)(RuleContext *f, const char *system, const char *user);
- int (*save)(RuleContext *f, const char *user);
-
- /* signals */
- void (*rule_added)(RuleContext *f, FilterRule *rule);
- void (*rule_removed)(RuleContext *f, FilterRule *rule);
-};
-
-typedef void (*RCPartFunc)(RuleContext *f, FilterPart *part);
-typedef void (*RCRuleFunc)(RuleContext *f, FilterRule *part);
-typedef FilterPart * (*RCNextPartFunc)(RuleContext *f, FilterPart *part);
-typedef FilterRule * (*RCNextRuleFunc)(RuleContext *f, FilterRule *rule, const char *source);
-
-struct _part_set_map {
- char *name;
- int type;
- RCPartFunc append;
- RCNextPartFunc next;
-};
-
-struct _rule_set_map {
- char *name;
- int type;
- RCRuleFunc append;
- RCNextRuleFunc next;
-};
-
-guint rule_context_get_type (void);
-RuleContext *rule_context_new (void);
-
-/* methods */
-int rule_context_load(RuleContext *f, const char *system, const char *user);
-int rule_context_save(RuleContext *f, const char *user);
-
-void rule_context_add_part(RuleContext *f, FilterPart *new);
-FilterPart *rule_context_find_part(RuleContext *f, const char *name);
-FilterPart *rule_context_create_part(RuleContext *f, const char *name);
-FilterPart *rule_context_next_part(RuleContext *f, FilterPart *last);
-
-FilterRule *rule_context_next_rule(RuleContext *f, FilterRule *last, const char *source);
-FilterRule *rule_context_find_rule(RuleContext *f, const char *name, const char *source);
-void rule_context_add_rule(RuleContext *f, FilterRule *new);
-void rule_context_add_rule_gui(RuleContext *f, FilterRule *rule, const char *title, const char *path);
-void rule_context_remove_rule(RuleContext *f, FilterRule *rule);
-
-/* get/set the rank (position) of a rule */
-void rule_context_rank_rule(RuleContext *f, FilterRule *rule, int rank);
-int rule_context_get_rank_rule(RuleContext *f, FilterRule *rule, const char *source);
-
-/* setup type for set parts */
-void rule_context_add_part_set(RuleContext *f, const char *setname, int part_type, RCPartFunc append, RCNextPartFunc next);
-void rule_context_add_rule_set(RuleContext *f, const char *setname, int rule_type, RCRuleFunc append, RCNextRuleFunc next);
-
-#endif /* ! _RULE_CONTEXT_H */
-
diff --git a/filter/rule-editor.c b/filter/rule-editor.c
deleted file mode 100644
index 68b77ab0ae..0000000000
--- a/filter/rule-editor.c
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <glade/glade.h>
-
-#include <gal/widgets/e-unicode.h>
-#include "rule-editor.h"
-#include "rule-context.h"
-#include "filter-rule.h"
-
-#define d(x)
-
-static void set_source(RuleEditor *re, const char *source);
-static void set_sensitive(RuleEditor *re);
-static FilterRule *create_rule(RuleEditor *re);
-
-static void rule_editor_class_init(RuleEditorClass *class);
-static void rule_editor_init(RuleEditor *gspaper);
-static void rule_editor_finalise(GtkObject *obj);
-
-#define _PRIVATE(x)(((RuleEditor *)(x))->priv)
-
-enum {
- BUTTON_ADD,
- BUTTON_EDIT,
- BUTTON_DELETE,
- BUTTON_UP,
- BUTTON_DOWN,
- BUTTON_LAST
-};
-
-struct _RuleEditorPrivate {
- GtkButton *buttons[BUTTON_LAST];
-};
-
-static GnomeDialogClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-rule_editor_get_type(void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "RuleEditor",
- sizeof (RuleEditor),
- sizeof (RuleEditorClass),
- (GtkClassInitFunc) rule_editor_class_init,
- (GtkObjectInitFunc) rule_editor_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gnome_dialog_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-rule_editor_class_init (RuleEditorClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(gnome_dialog_get_type());
-
- object_class->finalize = rule_editor_finalise;
-
- /* override methods */
- class->set_source = set_source;
- class->set_sensitive = set_sensitive;
- class->create_rule = create_rule;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-rule_editor_init (RuleEditor *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-rule_editor_finalise (GtkObject *obj)
-{
- RuleEditor *o = (RuleEditor *)obj;
-
- gtk_object_unref (GTK_OBJECT (o->context));
-
- g_free (o->priv);
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-/**
- * rule_editor_new:
- *
- * Create a new RuleEditor object.
- *
- * Return value: A new #RuleEditor object.
- **/
-RuleEditor *
-rule_editor_new (RuleContext *f, const char *source)
-{
- GladeXML *gui;
- RuleEditor *o = (RuleEditor *)gtk_type_new (rule_editor_get_type ());
- GtkWidget *w;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor");
- rule_editor_construct (o, f, gui, source);
-
- w = glade_xml_get_widget (gui, "rule_frame");
- gtk_frame_set_label ((GtkFrame *)w, _("Rules"));
-
- gtk_object_unref (GTK_OBJECT (gui));
-
- return o;
-}
-
-/* used internally by implementations if required */
-void
-rule_editor_set_sensitive (RuleEditor *re)
-{
- return ((RuleEditorClass *)((GtkObject *)re)->klass)->set_sensitive(re);
-}
-
-/* used internally by implementations */
-void
-rule_editor_set_source (RuleEditor *re, const char *source)
-{
- return ((RuleEditorClass *)((GtkObject *)re)->klass)->set_source(re, source);
-}
-
-/* factory method for "add" button */
-FilterRule *
-rule_editor_create_rule (RuleEditor *re)
-{
- return ((RuleEditorClass *)((GtkObject *)re)->klass)->create_rule(re);
-}
-
-static FilterRule *
-create_rule (RuleEditor *re)
-{
- FilterRule *rule = filter_rule_new ();
- FilterPart *part;
-
- /* create a rule with 1 part in it */
- part = rule_context_next_part (re->context, NULL);
- filter_rule_add_part (rule, filter_part_clone (part));
-
- return rule;
-}
-
-static void
-add_editor_clicked (GtkWidget *dialog, int button, RuleEditor *re)
-{
- GtkWidget *item;
- GList *l = NULL;
- char *string;
-
- switch (button) {
- case 0:
- if (!filter_rule_validate (re->edit)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- gtk_object_ref (GTK_OBJECT (re->edit));
- string = e_utf8_to_gtk_string (GTK_WIDGET (re->list), re->edit->name);
- item = gtk_list_item_new_with_label (string);
- g_free (string);
-
- gtk_object_set_data (GTK_OBJECT (item), "rule", re->edit);
- gtk_widget_show (item);
-
- l = g_list_append (l, GTK_LIST_ITEM (item));
-
- gtk_list_append_items (re->list, l);
- gtk_list_select_child (re->list, item);
-
- re->current = re->edit;
- rule_context_add_rule (re->context, re->current);
- case 1:
- default:
- gnome_dialog_close (GNOME_DIALOG (dialog));
- case -1:
- gtk_object_unref (GTK_OBJECT (re->edit));
- re->edit = NULL;
-
- rule_editor_set_sensitive (re);
- }
-}
-
-static void
-rule_add (GtkWidget *widget, RuleEditor *re)
-{
- GtkWidget *dialog;
- GtkWidget *rules;
-
- d(printf ("add rule\n"));
-
- re->edit = rule_editor_create_rule (re);
- filter_rule_set_source (re->edit, re->source);
- rules = filter_rule_get_widget (re->edit, re->context);
-
- dialog = gnome_dialog_new (_("Add Rule"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), rules, TRUE, TRUE, 0);
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked", add_editor_clicked, re);
-
- gtk_widget_show (dialog);
-}
-
-static void
-edit_editor_clicked (GtkWidget *dialog, int button, RuleEditor *re)
-{
- GtkWidget *item;
- char *string;
- int pos;
-
- switch (button) {
- case 0:
- if (!filter_rule_validate (re->edit)) {
- /* no need to popup a dialog because the validate code does that. */
- return;
- }
-
- pos = rule_context_get_rank_rule (re->context, re->current, re->source);
- if (pos != -1) {
- item = g_list_nth_data (GTK_LIST (re->list)->children, pos);
- string = e_utf8_to_gtk_string (GTK_WIDGET (item), re->edit->name);
- gtk_label_set_text (GTK_LABEL (GTK_BIN (item)->child), string);
- g_free (string);
-
- /* replace the old rule with the new rule */
- filter_rule_copy (re->current, re->edit);
- }
- case 1:
- default:
- gnome_dialog_close (GNOME_DIALOG (dialog));
- case -1:
- gtk_object_unref (GTK_OBJECT (re->edit));
- re->edit = NULL;
-
- rule_editor_set_sensitive (re);
- }
-}
-
-static void
-rule_edit (GtkWidget *widget, RuleEditor *re)
-{
- GtkWidget *dialog;
- GtkWidget *rules;
-
- if (re->current == NULL)
- return;
-
- re->edit = filter_rule_clone (re->current);
-
- rules = filter_rule_get_widget (re->edit, re->context);
- dialog = gnome_dialog_new (_("Edit Rule"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), rules, TRUE, TRUE, 0);
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked", edit_editor_clicked, re);
-
- gtk_widget_show (dialog);
-}
-
-static void
-rule_delete (GtkWidget *widget, RuleEditor *re)
-{
- int pos;
- GList *l;
- GtkListItem *item;
-
- d(printf ("delete rule\n"));
- pos = rule_context_get_rank_rule (re->context, re->current, re->source);
- if (pos != -1) {
- gint len;
-
- rule_context_remove_rule (re->context, re->current);
-
- item = g_list_nth_data (GTK_LIST (re->list)->children, pos);
- l = g_list_append (NULL, item);
- gtk_list_remove_items (re->list, l);
- g_list_free (l);
-
- gtk_object_unref (GTK_OBJECT (re->current));
- re->current = NULL;
-
- /* now select the next rule */
- len = g_list_length (GTK_LIST (re->list)->children);
- pos = pos >= len ? len - 1 : pos;
- gtk_list_select_item (GTK_LIST (re->list), pos);
- }
-
- rule_editor_set_sensitive (re);
-}
-
-static void
-rule_move (RuleEditor *re, int from, int to)
-{
- GList *l;
- GtkListItem *item;
-
- d(printf ("moving %d to %d\n", from, to));
- rule_context_rank_rule (re->context, re->current, to);
-
- item = g_list_nth_data (re->list->children, from);
- l = g_list_append (NULL, item);
- gtk_list_remove_items_no_unref (re->list, l);
- gtk_list_insert_items (re->list, l, to);
- gtk_list_select_child (re->list, GTK_WIDGET (item));
-
- rule_editor_set_sensitive (re);
-}
-
-static void
-rule_up (GtkWidget *widget, RuleEditor *re)
-{
- int pos;
-
- d(printf ("up rule\n"));
- pos = rule_context_get_rank_rule (re->context, re->current, re->source);
- if (pos > 0)
- rule_move (re, pos, pos - 1);
-}
-
-static void
-rule_down (GtkWidget *widget, RuleEditor *re)
-{
- int pos;
-
- d(printf ("down rule\n"));
- pos = rule_context_get_rank_rule (re->context, re->current, re->source);
- if (pos >= 0)
- rule_move (re, pos, pos + 1);
-}
-
-static struct {
- char *name;
- GtkSignalFunc func;
-} edit_buttons[] = {
- { "rule_add", rule_add },
- { "rule_edit", rule_edit },
- { "rule_delete", rule_delete },
- { "rule_up", rule_up },
- { "rule_down", rule_down },
-};
-
-static void
-set_sensitive (RuleEditor *re)
-{
- FilterRule *rule = NULL;
- int index = -1, count = 0;
-
- while ((rule = rule_context_next_rule(re->context, rule, re->source))) {
- if (rule == re->current)
- index = count;
- count++;
- }
-
- d(printf("index = %d count=%d\n", index, count));
-
- count--;
-
- gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_EDIT]), index != -1);
- gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_DELETE]), index != -1);
- gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_UP]), index > 0);
- gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_DOWN]), index >= 0 && index < count);
-}
-
-
-static void
-select_rule (GtkWidget *w, GtkWidget *child, RuleEditor *re)
-{
- re->current = gtk_object_get_data (GTK_OBJECT (child), "rule");
-
- g_assert (re->current);
-
- rule_editor_set_sensitive (re);
-}
-
-static void
-double_click (GtkWidget *widget, GdkEventButton *event, RuleEditor *re)
-{
- if (re->current && event->type == GDK_2BUTTON_PRESS)
- rule_edit (widget, re);
-}
-
-static void
-set_source (RuleEditor *re, const char *source)
-{
- FilterRule *rule = NULL;
- GList *newitems = NULL;
-
- gtk_list_clear_items(GTK_LIST(re->list), 0, -1);
-
- d(printf("Checking for rules that are of type %s\n", source));
- while ((rule = rule_context_next_rule(re->context, rule, source)) != NULL) {
- GtkWidget *item;
- char *s;
-
- d(printf(" hit %s(%d)\n", rule->name, source));
- s = e_utf8_to_gtk_string (GTK_WIDGET (re->list), rule->name);
- item = gtk_list_item_new_with_label (s);
- g_free (s);
- gtk_object_set_data (GTK_OBJECT (item), "rule", rule);
- gtk_widget_show (GTK_WIDGET (item));
- newitems = g_list_append (newitems, item);
- }
-
- gtk_list_append_items (re->list, newitems);
- g_free (re->source);
- re->source = g_strdup (source);
- re->current = NULL;
- rule_editor_set_sensitive (re);
-}
-
-void
-rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source)
-{
- GtkWidget *w;
- int i;
-
- re->context = context;
- gtk_object_ref (GTK_OBJECT (context));
-
- gtk_window_set_policy (GTK_WINDOW (re), FALSE, TRUE, FALSE);
-
- w = glade_xml_get_widget (gui, "rule_editor");
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (re)->vbox), w, TRUE, TRUE, 0);
-
- for (i = 0; i < BUTTON_LAST; i++) {
- re->priv->buttons[i] = (GtkButton *)w = glade_xml_get_widget (gui, edit_buttons[i].name);
- gtk_signal_connect (GTK_OBJECT (w), "clicked", edit_buttons[i].func, re);
- }
-
- re->list = (GtkList *) w = glade_xml_get_widget(gui, "rule_list");
- gtk_signal_connect (GTK_OBJECT (w), "select_child", select_rule, re);
- gtk_signal_connect (GTK_OBJECT (w), "button_press_event", double_click, re);
-
- rule_editor_set_source (re, source);
-
- gnome_dialog_append_buttons (GNOME_DIALOG (re), GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL, NULL);
-}
diff --git a/filter/rule-editor.h b/filter/rule-editor.h
deleted file mode 100644
index 2a474725b5..0000000000
--- a/filter/rule-editor.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _RULE_EDITOR_H
-#define _RULE_EDITOR_H
-
-#include <gtk/gtklist.h>
-#include <libgnomeui/gnome-dialog.h>
-
-#define RULE_EDITOR(obj) GTK_CHECK_CAST (obj, rule_editor_get_type (), RuleEditor)
-#define RULE_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, rule_editor_get_type (), RuleEditorClass)
-#define IS_RULE_EDITOR(obj) GTK_CHECK_TYPE (obj, rule_editor_get_type ())
-
-typedef struct _RuleEditor RuleEditor;
-typedef struct _RuleEditorClass RuleEditorClass;
-
-struct _RuleEditor {
- GnomeDialog parent;
-
- GtkList *list;
- struct _RuleContext *context;
- struct _FilterRule *current;
- struct _FilterRule *edit; /* for editing/adding rules, so we only do 1 at a time */
-
- char *source;
-
- struct _RuleEditorPrivate *priv;
-};
-
-struct _RuleEditorClass {
- GnomeDialogClass parent_class;
-
- /* virtual methods */
- void (*set_sensitive)(RuleEditor *);
- void (*set_source)(RuleEditor *, const char *source);
-
- struct _FilterRule *(*create_rule)(RuleEditor *);
-
- /* signals */
-};
-
-struct _GladeXML;
-struct _RuleContext;
-
-guint rule_editor_get_type (void);
-RuleEditor *rule_editor_new (struct _RuleContext *, const char *source);
-void rule_editor_construct (RuleEditor *re, struct _RuleContext *context, struct _GladeXML *gui, const char *source);
-
-/* methods */
-void rule_editor_set_source(RuleEditor *re, const char *source);
-/* calculates the sensitivity of the editor */
-void rule_editor_set_sensitive(RuleEditor *re);
-/* used internally to create a new rule appropriate for the editor */
-struct _FilterRule *rule_editor_create_rule(RuleEditor *re);
-
-#endif /* ! _RULE_EDITOR_H */
-
diff --git a/filter/score-context.c b/filter/score-context.c
deleted file mode 100644
index 9b9bbfb410..0000000000
--- a/filter/score-context.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <gtk/gtkobject.h>
-
-#include "score-context.h"
-#include "score-rule.h"
-
-
-static void score_context_class_init (ScoreContextClass *class);
-static void score_context_init (ScoreContext *gspaper);
-static void score_context_finalise (GtkObject *obj);
-
-static RuleContextClass *parent_class;
-
-guint
-score_context_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "ScoreContext",
- sizeof(ScoreContext),
- sizeof(ScoreContextClass),
- (GtkClassInitFunc)score_context_class_init,
- (GtkObjectInitFunc)score_context_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(rule_context_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-score_context_class_init (ScoreContextClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(rule_context_get_type ());
-
- object_class->finalize = score_context_finalise;
- /* override methods */
-
-}
-
-static void
-score_context_init (ScoreContext *o)
-{
- rule_context_add_part_set((RuleContext *)o, "partset", filter_part_get_type(),
- rule_context_add_part, rule_context_next_part);
-
- rule_context_add_rule_set((RuleContext *)o, "ruleset", score_rule_get_type(),
- rule_context_add_rule, rule_context_next_rule);
-}
-
-static void
-score_context_finalise(GtkObject *obj)
-{
- ScoreContext *o = (ScoreContext *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * score_context_new:
- *
- * Create a new ScoreContext object.
- *
- * Return value: A new #ScoreContext object.
- **/
-ScoreContext *
-score_context_new(void)
-{
- ScoreContext *o = (ScoreContext *)gtk_type_new(score_context_get_type ());
- return o;
-}
diff --git a/filter/score-context.h b/filter/score-context.h
deleted file mode 100644
index 261a1d8c4c..0000000000
--- a/filter/score-context.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _SCORE_CONTEXT_H
-#define _SCORE_CONTEXT_H
-
-#include "rule-context.h"
-
-#define SCORE_CONTEXT(obj) GTK_CHECK_CAST (obj, score_context_get_type (), ScoreContext)
-#define SCORE_CONTEXT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, score_context_get_type (), ScoreContextClass)
-#define IS_SCORE_CONTEXT(obj) GTK_CHECK_TYPE (obj, score_context_get_type ())
-
-typedef struct _ScoreContext ScoreContext;
-typedef struct _ScoreContextClass ScoreContextClass;
-
-struct _ScoreContext {
- RuleContext parent;
-};
-
-struct _ScoreContextClass {
- RuleContextClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint score_context_get_type (void);
-ScoreContext *score_context_new (void);
-
-/* methods */
-
-#endif /* ! _SCORE_CONTEXT_H */
-
diff --git a/filter/score-editor.c b/filter/score-editor.c
deleted file mode 100644
index 956e33816f..0000000000
--- a/filter/score-editor.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "score-editor.h"
-#include "score-context.h"
-#include "score-rule.h"
-
-#define d(x)
-
-static FilterRule * create_rule(RuleEditor *re);
-
-static void score_editor_class_init (ScoreEditorClass *class);
-static void score_editor_init (ScoreEditor *gspaper);
-static void score_editor_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((ScoreEditor *)(x))->priv)
-
-struct _ScoreEditorPrivate {
-};
-
-static RuleEditorClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-score_editor_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "ScoreEditor",
- sizeof(ScoreEditor),
- sizeof(ScoreEditorClass),
- (GtkClassInitFunc)score_editor_class_init,
- (GtkObjectInitFunc)score_editor_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (rule_editor_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-score_editor_class_init (ScoreEditorClass *class)
-{
- GtkObjectClass *object_class = (GtkObjectClass *)class;
- RuleEditorClass *re_class = (RuleEditorClass *)class;
-
- parent_class = gtk_type_class (rule_editor_get_type ());
-
- object_class->finalize = score_editor_finalise;
-
- /* override methods */
- re_class->create_rule = create_rule;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-score_editor_init (ScoreEditor *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-score_editor_finalise(GtkObject *obj)
-{
- ScoreEditor *o = (ScoreEditor *)obj;
-
- g_free(o->priv);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * score_editor_new:
- *
- * Create a new ScoreEditor object.
- *
- * Return value: A new #ScoreEditor object.
- **/
-ScoreEditor *
-score_editor_new(ScoreContext *f)
-{
- GladeXML *gui;
- ScoreEditor *o = (ScoreEditor *)gtk_type_new (score_editor_get_type ());
- GtkWidget *w;
-
- gui = glade_xml_new(FILTER_GLADEDIR "/filter.glade", "rule_editor");
- rule_editor_construct((RuleEditor *)o, (RuleContext *)f, gui, NULL);
-
- w = glade_xml_get_widget(gui, "rule_frame");
- gtk_frame_set_label((GtkFrame *)w, _("Score Rules"));
-
- gtk_object_unref((GtkObject *)gui);
-
- return o;
-}
-
-static FilterRule *
-create_rule(RuleEditor *re)
-{
- FilterRule *rule = filter_rule_new();
- FilterPart *part;
-
- /* create a rule with 1 part in it */
- rule = (FilterRule *)score_rule_new ();
- part = rule_context_next_part(re->context, NULL);
- filter_rule_add_part(rule, filter_part_clone(part));
-
- return rule;
-}
diff --git a/filter/score-editor.h b/filter/score-editor.h
deleted file mode 100644
index ad1a5ad2d7..0000000000
--- a/filter/score-editor.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _SCORE_EDITOR_H
-#define _SCORE_EDITOR_H
-
-#include "rule-editor.h"
-
-#define SCORE_EDITOR(obj) GTK_CHECK_CAST (obj, score_editor_get_type (), ScoreEditor)
-#define SCORE_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, score_editor_get_type (), ScoreEditorClass)
-#define IS_SCORE_EDITOR(obj) GTK_CHECK_TYPE (obj, score_editor_get_type ())
-
-typedef struct _ScoreEditor ScoreEditor;
-typedef struct _ScoreEditorClass ScoreEditorClass;
-
-struct _ScoreEditor {
- RuleEditor parent;
-
- struct _ScoreEditorPrivate *priv;
-};
-
-struct _ScoreEditorClass {
- RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-struct _ScoreContext;
-
-guint score_editor_get_type (void);
-ScoreEditor *score_editor_new (struct _ScoreContext *f);
-
-#endif /* ! _SCORE_EDITOR_H */
-
diff --git a/filter/score-rule.c b/filter/score-rule.c
deleted file mode 100644
index 9eaefe6134..0000000000
--- a/filter/score-rule.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-
-#include <string.h>
-
-#include <glib.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "score-rule.h"
-
-static xmlNodePtr xml_encode(FilterRule *);
-static int xml_decode(FilterRule *, xmlNodePtr, struct _RuleContext *f);
-/*static void build_code(FilterRule *, GString *out);*/
-static GtkWidget *get_widget(FilterRule *fr, struct _RuleContext *f);
-
-static void score_rule_class_init (ScoreRuleClass *class);
-static void score_rule_init (ScoreRule *gspaper);
-static void score_rule_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((ScoreRule *)(x))->priv)
-
-struct _ScoreRulePrivate {
-};
-
-static FilterRuleClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-score_rule_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "ScoreRule",
- sizeof(ScoreRule),
- sizeof(ScoreRuleClass),
- (GtkClassInitFunc)score_rule_class_init,
- (GtkObjectInitFunc)score_rule_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (filter_rule_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-score_rule_class_init (ScoreRuleClass *class)
-{
- GtkObjectClass *object_class;
- FilterRuleClass *rule_class = (FilterRuleClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (filter_rule_get_type ());
-
- object_class->finalize = score_rule_finalise;
-
- /* override methods */
- rule_class->xml_encode = xml_encode;
- rule_class->xml_decode = xml_decode;
-/* rule_class->build_code = build_code;*/
- rule_class->get_widget = get_widget;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-score_rule_init (ScoreRule *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-score_rule_finalise (GtkObject *obj)
-{
- ScoreRule *o = (ScoreRule *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-/**
- * score_rule_new:
- *
- * Create a new ScoreRule object.
- *
- * Return value: A new #ScoreRule object.
- **/
-ScoreRule *
-score_rule_new (void)
-{
- ScoreRule *o = (ScoreRule *)gtk_type_new (score_rule_get_type ());
- return o;
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- ScoreRule *sr = (ScoreRule *)fr;
- xmlNodePtr node, value;
- char number[16];
-
- node = ((FilterRuleClass *)(parent_class))->xml_encode (fr);
- sprintf (number, "%d", sr->score);
- value = xmlNewNode (NULL, "score");
- xmlSetProp (value, "value", number);
- xmlAddChild (node, value);
-
- return node;
-}
-
-static int
-xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
-{
- ScoreRule *sr = (ScoreRule *)fr;
- xmlNodePtr value;
- int result;
- char *str;
-
- result = ((FilterRuleClass *)(parent_class))->xml_decode (fr, node, f);
- if (result != 0)
- return result;
-
- value = node->childs;
- while (value) {
- if (!strcmp (value->name, "score")) {
- str = xmlGetProp (value, "value");
- sscanf (str, "%d", &sr->score);
- xmlFree (str);
-
- /* score range is -3 to +3 */
- if (sr->score > 3)
- sr->score = 3;
- else if (sr->score < -3)
- sr->score = -3;
- }
- value = value->next;
- }
-
- return 0;
-}
-
-/*static void build_code(FilterRule *fr, GString *out)
-{
-}*/
-
-static void
-spin_changed (GtkAdjustment *adj, ScoreRule *sr)
-{
- sr->score = adj->value;
-}
-
-static GtkWidget *
-get_widget (FilterRule *fr, struct _RuleContext *f)
-{
- GtkWidget *widget;
- GtkWidget *frame;
- GtkWidget *label;
- GtkWidget *hbox;
- GtkAdjustment *adj;
- ScoreRule *sr = (ScoreRule *)fr;
- GtkWidget *spin;
-
- widget = ((FilterRuleClass *)(parent_class))->get_widget (fr, f);
-
- frame = gtk_frame_new (_("Score"));
- hbox = gtk_hbox_new (FALSE, 3);
- label = gtk_label_new (_("Score"));
-
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 3);
- adj = (GtkAdjustment *)gtk_adjustment_new ((float) sr->score, -3.0, 3.0, 1.0, 1.0, 1.0);
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed", spin_changed, sr);
-
- spin = gtk_spin_button_new (adj, 1.0, 0);
- gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 3);
- gtk_container_add (GTK_CONTAINER (frame), hbox);
-
- gtk_widget_show_all (frame);
-
- gtk_box_pack_start (GTK_BOX (widget), frame, FALSE, FALSE, 3);
-
- return widget;
-}
diff --git a/filter/score-rule.h b/filter/score-rule.h
deleted file mode 100644
index 1ac9eb71f3..0000000000
--- a/filter/score-rule.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _SCORE_RULE_H
-#define _SCORE_RULE_H
-
-#include "filter-rule.h"
-
-#define SCORE_RULE(obj) GTK_CHECK_CAST (obj, score_rule_get_type (), ScoreRule)
-#define SCORE_RULE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, score_rule_get_type (), ScoreRuleClass)
-#define IS_SCORE_RULE(obj) GTK_CHECK_TYPE (obj, score_rule_get_type ())
-
-typedef struct _ScoreRule ScoreRule;
-typedef struct _ScoreRuleClass ScoreRuleClass;
-
-struct _ScoreRule {
- FilterRule parent;
- struct _ScoreRulePrivate *priv;
-
- int score;
-};
-
-struct _ScoreRuleClass {
- FilterRuleClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint score_rule_get_type (void);
-ScoreRule *score_rule_new (void);
-
-/* methods */
-
-#endif /* ! _SCORE_RULE_H */
-
diff --git a/filter/vfolder-context.c b/filter/vfolder-context.c
deleted file mode 100644
index 3a05aa6c6e..0000000000
--- a/filter/vfolder-context.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 <gtk/gtkobject.h>
-
-#include "vfolder-context.h"
-#include "vfolder-rule.h"
-
-static void vfolder_context_class_init (VfolderContextClass *class);
-static void vfolder_context_init (VfolderContext *gspaper);
-static void vfolder_context_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((VfolderContext *)(x))->priv)
-
-struct _VfolderContextPrivate {
-};
-
-static RuleContextClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-vfolder_context_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "VfolderContext",
- sizeof(VfolderContext),
- sizeof(VfolderContextClass),
- (GtkClassInitFunc)vfolder_context_class_init,
- (GtkObjectInitFunc)vfolder_context_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(rule_context_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-vfolder_context_class_init (VfolderContextClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(rule_context_get_type ());
-
- object_class->finalize = vfolder_context_finalise;
- /* override methods */
-
- /* signals */
-
- gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-}
-
-static void
-vfolder_context_init (VfolderContext *o)
-{
- o->priv = g_malloc0(sizeof(*o->priv));
-
- rule_context_add_part_set((RuleContext *)o, "partset", filter_part_get_type(),
- rule_context_add_part, rule_context_next_part);
-
- rule_context_add_rule_set((RuleContext *)o, "ruleset", vfolder_rule_get_type(),
- rule_context_add_rule, rule_context_next_rule);
-}
-
-static void
-vfolder_context_finalise(GtkObject *obj)
-{
- VfolderContext *o = (VfolderContext *)obj;
-
- o = o;
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * vfolder_context_new:
- *
- * Create a new VfolderContext object.
- *
- * Return value: A new #VfolderContext object.
- **/
-VfolderContext *
-vfolder_context_new(void)
-{
- VfolderContext *o = (VfolderContext *)gtk_type_new(vfolder_context_get_type ());
- return o;
-}
diff --git a/filter/vfolder-context.h b/filter/vfolder-context.h
deleted file mode 100644
index 86f9910437..0000000000
--- a/filter/vfolder-context.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _VFOLDER_CONTEXT_H
-#define _VFOLDER_CONTEXT_H
-
-#include "rule-context.h"
-
-#define VFOLDER_CONTEXT(obj) GTK_CHECK_CAST (obj, vfolder_context_get_type (), VfolderContext)
-#define VFOLDER_CONTEXT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, vfolder_context_get_type (), VfolderContextClass)
-#define IS_VFOLDER_CONTEXT(obj) GTK_CHECK_TYPE (obj, vfolder_context_get_type ())
-
-typedef struct _VfolderContext VfolderContext;
-typedef struct _VfolderContextClass VfolderContextClass;
-
-struct _VfolderContext {
- RuleContext parent;
- struct _VfolderContextPrivate *priv;
-
-};
-
-struct _VfolderContextClass {
- RuleContextClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint vfolder_context_get_type (void);
-VfolderContext *vfolder_context_new (void);
-
-/* methods */
-
-#endif /* ! _VFOLDER_CONTEXT_H */
-
diff --git a/filter/vfolder-editor.c b/filter/vfolder-editor.c
deleted file mode 100644
index a2566e344a..0000000000
--- a/filter/vfolder-editor.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- * Jeffrey Stedfast <fejj@ximian.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 <config.h>
-
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "vfolder-editor.h"
-#include "vfolder-context.h"
-#include "vfolder-rule.h"
-
-#define d(x)
-
-static FilterRule * create_rule(RuleEditor *re);
-
-static void vfolder_editor_class_init (VfolderEditorClass *class);
-static void vfolder_editor_init (VfolderEditor *gspaper);
-static void vfolder_editor_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((VfolderEditor *)(x))->priv)
-
-struct _VfolderEditorPrivate {
-};
-
-static RuleEditorClass *parent_class;
-
-enum {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-vfolder_editor_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "VfolderEditor",
- sizeof(VfolderEditor),
- sizeof(VfolderEditorClass),
- (GtkClassInitFunc)vfolder_editor_class_init,
- (GtkObjectInitFunc)vfolder_editor_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (rule_editor_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-vfolder_editor_class_init (VfolderEditorClass *class)
-{
- GtkObjectClass *object_class = (GtkObjectClass *)class;
- RuleEditorClass *re_class = (RuleEditorClass *)class;
-
- parent_class = gtk_type_class (rule_editor_get_type ());
-
- object_class->finalize = vfolder_editor_finalise;
-
- /* override methods */
- re_class->create_rule = create_rule;
-
- /* signals */
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-vfolder_editor_init (VfolderEditor *o)
-{
- o->priv = g_malloc0 (sizeof (*o->priv));
-}
-
-static void
-vfolder_editor_finalise(GtkObject *obj)
-{
- VfolderEditor *o = (VfolderEditor *)obj;
-
- g_free(o->priv);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * vfolder_editor_new:
- *
- * Create a new VfolderEditor object.
- *
- * Return value: A new #VfolderEditor object.
- **/
-VfolderEditor *
-vfolder_editor_new(VfolderContext *f)
-{
- GladeXML *gui;
- VfolderEditor *o = (VfolderEditor *)gtk_type_new (vfolder_editor_get_type ());
- GtkWidget *w;
-
- gui = glade_xml_new(FILTER_GLADEDIR "/filter.glade", "rule_editor");
- rule_editor_construct((RuleEditor *)o, (RuleContext *)f, gui, NULL);
-
- w = glade_xml_get_widget(gui, "rule_frame");
- gtk_frame_set_label((GtkFrame *)w, _("Virtual Folders"));
-
- gtk_object_unref((GtkObject *)gui);
-
- return o;
-}
-
-static FilterRule *
-create_rule(RuleEditor *re)
-{
- FilterRule *rule = filter_rule_new();
- FilterPart *part;
-
- /* create a rule with 1 part in it */
- rule = (FilterRule *)vfolder_rule_new ();
- part = rule_context_next_part(re->context, NULL);
- filter_rule_add_part(rule, filter_part_clone(part));
-
- return rule;
-}
diff --git a/filter/vfolder-editor.h b/filter/vfolder-editor.h
deleted file mode 100644
index f8fe85503f..0000000000
--- a/filter/vfolder-editor.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2000, 2001 Ximian 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 _VFOLDER_EDITOR_H
-#define _VFOLDER_EDITOR_H
-
-#include "rule-editor.h"
-
-#define VFOLDER_EDITOR(obj) GTK_CHECK_CAST (obj, vfolder_editor_get_type (), VfolderEditor)
-#define VFOLDER_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, vfolder_editor_get_type (), VfolderEditorClass)
-#define IS_VFOLDER_EDITOR(obj) GTK_CHECK_TYPE (obj, vfolder_editor_get_type ())
-
-typedef struct _VfolderEditor VfolderEditor;
-typedef struct _VfolderEditorClass VfolderEditorClass;
-
-struct _VfolderEditor {
- RuleEditor parent;
-
- struct _VfolderEditorPrivate *priv;
-
-};
-
-struct _VfolderEditorClass {
- RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-struct _VfolderContext;
-
-guint vfolder_editor_get_type (void);
-VfolderEditor *vfolder_editor_new (struct _VfolderContext *);
-
-#endif /* ! _VFOLDER_EDITOR_H */
-
diff --git a/filter/vfolder-rule.c b/filter/vfolder-rule.c
deleted file mode 100644
index c0e790bc54..0000000000
--- a/filter/vfolder-rule.c
+++ /dev/null
@@ -1,487 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Copyright (C) 2000 Ximian 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.
- */
-
-#include <config.h>
-
-#include <glib.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtklist.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "vfolder-context.h"
-#include "vfolder-rule.h"
-#include "shell/evolution-shell-client.h"
-
-#define d(x) x
-
-static gint validate(FilterRule *);
-static xmlNodePtr xml_encode(FilterRule *);
-static int xml_decode(FilterRule *, xmlNodePtr, struct _RuleContext *f);
-static void rule_copy (FilterRule *dest, FilterRule *src);
-/*static void build_code(FilterRule *, GString *out);*/
-static GtkWidget *get_widget(FilterRule *fr, struct _RuleContext *f);
-
-extern EvolutionShellClient *global_shell_client;
-
-static void vfolder_rule_class_init (VfolderRuleClass *class);
-static void vfolder_rule_init (VfolderRule *gspaper);
-static void vfolder_rule_finalise (GtkObject *obj);
-
-#define _PRIVATE(x) (((VfolderRule *)(x))->priv)
-
-struct _VfolderRulePrivate {
-};
-
-static FilterRuleClass *parent_class;
-
-guint
-vfolder_rule_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "VfolderRule",
- sizeof(VfolderRule),
- sizeof(VfolderRuleClass),
- (GtkClassInitFunc)vfolder_rule_class_init,
- (GtkObjectInitFunc)vfolder_rule_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique(filter_rule_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-vfolder_rule_class_init (VfolderRuleClass *class)
-{
- GtkObjectClass *object_class;
- FilterRuleClass *filter_rule = (FilterRuleClass *)class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class(filter_rule_get_type ());
-
- object_class->finalize = vfolder_rule_finalise;
-
- /* override methods */
- filter_rule->validate = validate;
- filter_rule->xml_encode = xml_encode;
- filter_rule->xml_decode = xml_decode;
- filter_rule->copy = rule_copy;
- /*filter_rule->build_code = build_code;*/
- filter_rule->get_widget = get_widget;
-}
-
-static void
-vfolder_rule_init (VfolderRule *o)
-{
- o->priv = g_malloc0(sizeof(*o->priv));
-}
-
-static void
-vfolder_rule_finalise(GtkObject *obj)
-{
- VfolderRule *o = (VfolderRule *)obj;
-
- g_list_foreach (o->sources, (GFunc) g_free, NULL);
- g_list_free (o->sources);
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * vfolder_rule_new:
- *
- * Create a new VfolderRule object.
- *
- * Return value: A new #VfolderRule object.
- **/
-VfolderRule *
-vfolder_rule_new (void)
-{
- VfolderRule *o = (VfolderRule *)gtk_type_new(vfolder_rule_get_type ());
- return o;
-}
-
-void
-vfolder_rule_add_source (VfolderRule *vr, const char *uri)
-{
- g_assert(IS_VFOLDER_RULE(vr));
-
- vr->sources = g_list_append(vr->sources, g_strdup(uri));
-
- filter_rule_emit_changed((FilterRule *)vr);
-}
-
-const char *
-vfolder_rule_find_source (VfolderRule *vr, const char *uri)
-{
- GList *l;
-
- g_assert(IS_VFOLDER_RULE(vr));
-
- /* only does a simple string or address comparison, should
- probably do a decoded url comparison */
- l = vr->sources;
- while (l) {
- if (l->data == uri || !strcmp(l->data, uri))
- return l->data;
- l = g_list_next(l);
- }
- return NULL;
-}
-
-void
-vfolder_rule_remove_source (VfolderRule *vr, const char *uri)
-{
- char *found;
-
- g_assert(IS_VFOLDER_RULE(vr));
-
- found = (char *)vfolder_rule_find_source(vr, uri);
- if (found) {
- vr->sources = g_list_remove(vr->sources, found);
- g_free(found);
- filter_rule_emit_changed((FilterRule *)vr);
- }
-}
-
-const char *
-vfolder_rule_next_source (VfolderRule *vr, const char *last)
-{
- GList *node;
-
- if (last == NULL) {
- node = vr->sources;
- } else {
- node = g_list_find(vr->sources, (char *)last);
- if (node == NULL)
- node = vr->sources;
- else
- node = g_list_next(node);
- }
- if (node)
- return (const char *)node->data;
- return NULL;
-}
-
-static gint
-validate (FilterRule *fr)
-{
- /* We have to have at least one source set in the "specific" case.
- Do not translate this string! */
- if (fr && fr->source && !strcmp (fr->source, "specific") && VFOLDER_RULE (fr)->sources == NULL) {
-
- GtkWidget *gd;
-
- gd = gnome_ok_dialog (_("Oops. You need to to specify at least one folder as a source."));
- gnome_dialog_run_and_close (GNOME_DIALOG (gd));
-
- return 0;
- }
-
- if (FILTER_RULE_CLASS (parent_class)->validate)
- return FILTER_RULE_CLASS (parent_class)->validate (fr);
-
- return 1;
-}
-
-static xmlNodePtr
-xml_encode (FilterRule *fr)
-{
- xmlNodePtr node, set, work;
- GList *l;
- VfolderRule *vr = (VfolderRule *)fr;
-
- node = ((FilterRuleClass *)(parent_class))->xml_encode(fr);
- g_assert(node != NULL);
- set = xmlNewNode(NULL, "sources");
- xmlAddChild(node, set);
- l = vr->sources;
- while (l) {
- work = xmlNewNode(NULL, "folder");
- xmlSetProp(work, "uri", l->data);
- xmlAddChild(set, work);
- l = g_list_next(l);
- }
- return node;
-}
-
-static int
-xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
-{
- xmlNodePtr set, work;
- int result;
- VfolderRule *vr = (VfolderRule *)fr;
- char *uri;
-
- result = ((FilterRuleClass *)(parent_class))->xml_decode(fr, node, f);
- if (result != 0)
- return result;
-
- set = node->childs;
- while (set) {
- if (!strcmp(set->name, "sources")) {
- work = set->childs;
- while (work) {
- if (!strcmp(work->name, "folder")) {
- uri = xmlGetProp(work, "uri");
- if (uri) {
- vr->sources = g_list_append(vr->sources, g_strdup(uri));
- xmlFree(uri);
- }
- }
- work = work->next;
- }
- }
- set = set->next;
- }
- return 0;
-}
-
-static void
-rule_copy (FilterRule *dest, FilterRule *src)
-{
- VfolderRule *vdest, *vsrc;
- GList *node;
-
- vdest = (VfolderRule *) dest;
- vsrc = (VfolderRule *) src;
-
- if (vdest->sources) {
- g_list_foreach (vdest->sources, (GFunc) g_free, NULL);
- g_list_free (vdest->sources);
- vdest->sources = NULL;
- }
-
- node = vsrc->sources;
- while (node) {
- char *uri = node->data;
-
- vdest->sources = g_list_append (vdest->sources, g_strdup (uri));
- node = node->next;
- }
-
- ((FilterRuleClass *)(parent_class))->copy (dest, src);
-}
-
-
-enum {
- BUTTON_ADD,
- BUTTON_REMOVE,
- BUTTON_LAST,
-};
-
-struct _source_data {
- RuleContext *f;
- VfolderRule *vr;
- const char *current;
- GtkList *list;
- GtkButton *buttons[BUTTON_LAST];
-};
-
-static void source_add(GtkWidget *widget, struct _source_data *data);
-static void source_remove(GtkWidget *widget, struct _source_data *data);
-
-static struct {
- char *name;
- GtkSignalFunc func;
-} edit_buttons[] = {
- { "source_add", source_add },
- { "source_remove", source_remove },
-};
-
-static void
-set_sensitive(struct _source_data *data)
-{
- gtk_widget_set_sensitive((GtkWidget *)data->buttons[BUTTON_ADD], TRUE);
- gtk_widget_set_sensitive((GtkWidget *)data->buttons[BUTTON_REMOVE], data->current != NULL);
-}
-
-static void
-select_source(GtkWidget *w, GtkWidget *child, struct _source_data *data)
-{
- data->current = gtk_object_get_data((GtkObject *)child, "source");
- set_sensitive(data);
-}
-
-static void
-select_source_with(GtkWidget *w, struct _source_data *data)
-{
- char *source = gtk_object_get_data((GtkObject *)w, "source");
-
- filter_rule_set_source((FilterRule *)data->vr, source);
-}
-
-static void
-source_add(GtkWidget *widget, struct _source_data *data)
-{
- const char *allowed_types[] = { "mail", NULL };
- char *def, *uri;
- GtkListItem *item;
- GList *l;
- gchar *s;
-
- def = "";
- evolution_shell_client_user_select_folder (global_shell_client,
- _("Select Folder"),
- def, allowed_types, NULL, &uri);
-
- if (uri != NULL && uri[0] != '\0') {
- data->vr->sources = g_list_append(data->vr->sources, uri);
-
- l = NULL;
- s = e_utf8_to_gtk_string ((GtkWidget *) data->list, uri);
- item = (GtkListItem *)gtk_list_item_new_with_label (s);
- g_free (s);
- gtk_object_set_data((GtkObject *)item, "source", uri);
- gtk_widget_show((GtkWidget *)item);
- l = g_list_append(NULL, item);
- gtk_list_append_items(data->list, l);
- gtk_list_select_child(data->list, (GtkWidget *)item);
- data->current = uri;
- } else {
- g_free(uri);
- }
- set_sensitive(data);
-}
-
-static void
-source_remove(GtkWidget *widget, struct _source_data *data)
-{
- const char *source;
- int index = 0;
- GList *l;
- GtkListItem *item;
-
- source = NULL;
- while ((source = vfolder_rule_next_source(data->vr, source))) {
- if (data->current == source) {
- vfolder_rule_remove_source(data->vr, source);
- item = g_list_nth_data(data->list->children, index);
- l = g_list_append(NULL, item);
- gtk_list_remove_items(data->list, l);
- g_list_free(l);
- data->current = NULL;
- break;
- }
- index++;
- }
- set_sensitive(data);
-}
-
-/* DO NOT internationalise these strings */
-const char *source_names[] = {
- "specific",
- "local",
- "remote_active",
- "local_remote_active"
-};
-
-static GtkWidget *
-get_widget(FilterRule *fr, struct _RuleContext *f)
-{
- GtkWidget *widget, *frame, *w;
- GladeXML *gui;
- const char *source;
- VfolderRule *vr = (VfolderRule *)fr;
- struct _source_data *data;
- int i, row;
- GList *l;
-
- widget = ((FilterRuleClass *)(parent_class))->get_widget (fr, f);
-
- data = g_malloc0 (sizeof (*data));
- data->f = f;
- data->vr = vr;
-
- gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "vfolder_source_frame");
- frame = glade_xml_get_widget (gui, "vfolder_source_frame");
-
- gtk_object_set_data_full (GTK_OBJECT (frame), "data", data, g_free);
-
- for (i = 0; i < BUTTON_LAST; i++) {
- data->buttons[i] = (GtkButton *)w = glade_xml_get_widget (gui, edit_buttons[i].name);
- gtk_signal_connect (GTK_OBJECT (w), "clicked", edit_buttons[i].func, data);
- }
-
- w = glade_xml_get_widget (gui, "source_list");
- data->list = (GtkList *)w;
- l = NULL;
- source = NULL;
- while ((source = vfolder_rule_next_source (vr, source))) {
- GtkListItem *item;
-
- gchar *s = e_utf8_to_gtk_string (GTK_WIDGET (data->list), source);
- item = (GtkListItem *)gtk_list_item_new_with_label (s);
- g_free (s);
- gtk_object_set_data (GTK_OBJECT (item), "source", (void *)source);
- gtk_widget_show (GTK_WIDGET (item));
- l = g_list_append (l, item);
- }
- gtk_list_append_items (data->list, l);
- gtk_signal_connect (GTK_OBJECT (w), "select_child", select_source, data);
-
- w = glade_xml_get_widget (gui, "source_option");
- l = GTK_MENU_SHELL (GTK_OPTION_MENU (w)->menu)->children;
- i = 0;
- row = 0;
- while (l) {
- GtkWidget *b = GTK_WIDGET (l->data);
-
- /* make sure that the glade is in sync with the source list! */
- if (i < sizeof (source_names) / sizeof (source_names[0])) {
- gtk_object_set_data (GTK_OBJECT (b), "source", (char *)source_names[i]);
- if (fr->source && strcmp (source_names[i], fr->source) == 0) {
- row = i;
- }
- } else {
- g_warning ("Glade file " FILTER_GLADEDIR "/filter.glade out of sync with editor code");
- }
- gtk_signal_connect (GTK_OBJECT (b), "activate", select_source_with, data);
-
- i++;
- l = l->next;
- }
-
- gtk_option_menu_set_history (GTK_OPTION_MENU (w), row);
- if (fr->source == NULL)
- filter_rule_set_source (fr, (char *)source_names[row]);
-
- set_sensitive (data);
-
- gtk_box_pack_start (GTK_BOX (widget), frame, TRUE, TRUE, 3);
-
- gtk_object_unref (GTK_OBJECT (gui));
-
- return widget;
-}
diff --git a/filter/vfolder-rule.h b/filter/vfolder-rule.h
deleted file mode 100644
index 20dcb6f017..0000000000
--- a/filter/vfolder-rule.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Copyright (C) 2000 Ximian 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 _VFOLDER_RULE_H
-#define _VFOLDER_RULE_H
-
-#include "filter-rule.h"
-
-#define VFOLDER_RULE(obj) GTK_CHECK_CAST (obj, vfolder_rule_get_type (), VfolderRule)
-#define VFOLDER_RULE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, vfolder_rule_get_type (), VfolderRuleClass)
-#define IS_VFOLDER_RULE(obj) GTK_CHECK_TYPE (obj, vfolder_rule_get_type ())
-
-typedef struct _VfolderRule VfolderRule;
-typedef struct _VfolderRuleClass VfolderRuleClass;
-
-struct _VfolderRule {
- FilterRule parent;
- struct _VfolderRulePrivate *priv;
-
- GList *sources; /* uri's of the source folders */
-};
-
-struct _VfolderRuleClass {
- FilterRuleClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint vfolder_rule_get_type (void);
-VfolderRule *vfolder_rule_new (void);
-
-/* methods */
-void vfolder_rule_add_source (VfolderRule *vr, const char *uri);
-void vfolder_rule_remove_source (VfolderRule *vr, const char *uri);
-const char *vfolder_rule_find_source (VfolderRule *vr, const char *uri);
-const char *vfolder_rule_next_source (VfolderRule *vr, const char *last);
-
-#endif /* ! _VFOLDER_RULE_H */
-
diff --git a/filter/vfoldertypes.xml b/filter/vfoldertypes.xml
deleted file mode 100644
index 7f38eb7834..0000000000
--- a/filter/vfoldertypes.xml
+++ /dev/null
@@ -1,360 +0,0 @@
-<?xml version="1.0"?>
-<filterdescription>
-<partset>
- <part name="sender">
- <title>Sender</title>
- <input type="optionlist" name="sender-type">
- <option value="contains">
- <title>contains</title>
- <code>(match-all (header-contains "From" ${sender}))</code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>(match-all (not (header-contains "From" ${sender})))</code>
- </option>
- <option value="is">
- <title>is</title>
- <code>(match-all (header-matches "From" ${sender}))</code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>(match-all (not (header-matches "From" ${sender})))</code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with "From" ${sender}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with "From" ${sender})))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with "From" ${sender}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with "From" ${sender})))
- </code>
- </option>
- </input>
- <input type="string" name="sender"/>
- </part>
-
- <part name="to">
- <title>Recipients</title>
- <input type="optionlist" name="recipient-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (match-all (or (header-contains "To" ${recipient})
- (header-contains "Cc" ${recipient})))
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (or
- (header-contains "To" ${recipient})
- (header-contains "Cc" ${recipient}))))
- </code>
- </option>
- <option value="is">
- <title>is</title>
- <code>
- (match-all (or (header-matches "To" ${recipient})
- (header-matches "Cc" ${recipient})))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (or
- (header-matches "To" ${recipient})
- (header-matches "Cc" ${recipient}))))
- </code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (or (header-starts-with "To" ${recipient})
- (header-starts-with "Cc" ${recipient})))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (or
- (header-starts-with "To" ${recipient})
- (header-starts-with "Cc" ${recipient}))))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (or (header-ends-with "To" ${recipient})
- (header-ends-with "Cc" ${recipient})))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (or
- (header-ends-with "To" ${recipient})
- (header-ends-with "Cc" ${recipient}))))
- </code>
- </option>
- </input>
- <input type="address" name="recipient"/>
- </part>
-
- <part name="subject">
- <title>Subject</title>
- <input type="optionlist" name="subject-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (match-all (header-contains "Subject" ${subject}))
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (match-all (not (header-contains "Subject" ${subject})))
- </code>
- </option>
- <option value="is">
- <title>is</title>
- <code>
- (match-all (header-matches "Subject" ${subject}))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (header-matches "Subject" ${subject}))
- </code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with "Subject" ${subject}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with "Subject" ${subject}))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with "Subject" ${subject}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with "Subject" ${subject}))
- </code>
- </option>
- </input>
- <input type="string" name="subject"/>
- </part>
- <part name="body">
- <title>Message Body</title>
- <input type="optionlist" name="body-type">
- <option value="contains">
- <title>contains</title>
- <code>
- (body-contains ${word})
- </code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>
- (not (body-contains ${word}))
- </code>
- </option>
- </input>
- <input type="string" name="word"/>
- </part>
- <part name="sexp">
- <title>Expression</title>
- <input type="code" name="code"/>
- </part>
-
- <part name="sent-date">
- <title>Message was sent</title>
- <input type="optionlist" name="date-spec-type">
- <option value="before">
- <title>before</title>
- <code>
- (match-all (&lt; (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="on-or-before">
- <title>on or before</title>
- <code>
- (match-all (not (&gt; (get-sent-date) ${versus})))
- </code>
- </option>
- <option value="after">
- <title>after</title>
- <code>
- (match-all (&gt; (get-sent-date) ${versus}))
- </code>
- </option>
- <option value="on-or-after">
- <title>on or after</title>
- <code>
- (match-all (not (&lt; (get-sent-date) ${versus})))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus">
- </input>
- </part>
-
- <part name="recv-date">
- <title>Message was received</title>
- <input type="optionlist" name="date-spec-type">
- <option value="before">
- <title>before</title>
- <code>
- (match-all (&lt; (get-received-date) ${versus}))
- </code>
- </option>
- <option value="on-or-before">
- <title>on or before</title>
- <code>
- (match-all (not (&gt; (get-received-date) ${versus})))
- </code>
- </option>
- <option value="after">
- <title>after</title>
- <code>
- (match-all (&gt; (get-received-date) ${versus}))
- </code>
- </option>
- <option value="on-or-after">
- <title>on or after</title>
- <code>
- (match-all (not (&lt; (get-received-date) ${versus})))
- </code>
- </option>
- </input>
- <input type="datespec" name="versus">
- </input>
- </part>
-
- <part name="status">
- <title>Status</title>
- <input type="optionlist" name="match-type">
- <option value="is">
- <title>is</title>
- <code>
- (match-all (system-flag ${flag}))
- </code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>
- (match-all (not (system-flag ${flag})))
- </code>
- </option>
- </input>
- <input type="optionlist" name="flag">
- <option value="Answered">
- <title>Replied to</title>
- </option>
- <option value="Deleted">
- <title>Deleted</title>
- </option>
- <option value="Draft">
- <title>Draft</title>
- </option>
- <option value="Flagged">
- <title>Important</title>
- </option>
- <option value="Seen">
- <title>Read</title>
- </option>
- </input>
- </part>
-
- <part name="attachments">
- <title>Attachments</title>
- <input type="optionlist" name="match-type">
- <option value="exist">
- <title>Exist</title>
- <code>
- (match-all (system-flag "Attachments"))
- </code>
- </option>
- <option value="not exist">
- <title>Do Not Exist</title>
- <code>
- (match-all (not (system-flag "Attachments")))
- </code>
- </option>
- </input>
- </part>
-
- <part name="mlist">
- <title>Mailing list</title>
- <input type="optionlist" name="mlist-type">
- <option value="contains">
- <title>contains</title>
- <code>(match-all (header-contains "x-camel-mlist" ${mlist}))</code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>(match-all (not (header-contains "x-camel-mlist" ${mlist})))</code>
- </option>
- <option value="is">
- <title>is</title>
- <code>(match-all (header-matches "x-camel-mlist" ${mlist}))</code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>(match-all (not (header-matches "x-camel-mlist" ${mlist})))</code>
- </option>
- <option value="starts with">
- <title>starts with</title>
- <code>
- (match-all (header-starts-with "x-camel-mlist" ${mlist}))
- </code>
- </option>
- <option value="not starts with">
- <title>does not start with</title>
- <code>
- (match-all (not (header-starts-with "x-camel-mlist" ${mlist})))
- </code>
- </option>
- <option value="ends with">
- <title>ends with</title>
- <code>
- (match-all (header-ends-with "x-camel-mlist" ${mlist}))
- </code>
- </option>
- <option value="not ends with">
- <title>does not end with</title>
- <code>
- (match-all (not (header-ends-with "x-camel-mlist" ${mlist})))
- </code>
- </option>
- </input>
- <input type="string" name="mlist"/>
- </part>
-
-</partset>
-</filterdescription>
diff --git a/help/.cvsignore b/help/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/help/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/help/C/.cvsignore b/help/C/.cvsignore
deleted file mode 100644
index d124a07e3e..0000000000
--- a/help/C/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-*.log
-*.ps
-*.dvi
-*.tex
-evolution
-index.html
-omf_timestamp
diff --git a/help/C/Makefile.am b/help/C/Makefile.am
deleted file mode 100644
index 96b00881c8..0000000000
--- a/help/C/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-figs = \
- figures/calendar.png \
- figures/config-cal.png \
- figures/config-mail.png \
- figures/contact-editor.png \
- figures/contact.png \
- figures/filter-assist-fig.png \
- figures/filter-new-fig.png \
- figures/full-1.png \
- figures/full-2.png \
- figures/full-3.png \
- figures/full-4.png \
- figures/full-5.png \
- figures/full-6.png \
- figures/full-7.png \
- figures/mail-composer.png \
- figures/mail-druid-pic.png \
- figures/mail-inbox.png \
- figures/mainwindow-pic.png \
- figures/newmsg.png \
- figures/print-dest.png \
- figures/print-preview.png \
- figures/replymsg.png \
- figures/vfolder-createrule-fig.png
-docname = evolution
-lang = C
-omffile = evolution-C.omf
-sgml_ents = \
- apx-authors.sgml \
- apx-bugs.sgml \
- apx-gloss.sgml \
- config-encryption.sgml \
- config-prefs.sgml \
- config-sync.sgml \
- evolution-faq.sgml \
- menuref.sgml \
- preface.sgml \
- usage-calendar.sgml \
- usage-contact.sgml \
- usage-encryption.sgml \
- usage-exec-summary.sgml \
- usage-mail-org.sgml \
- usage-mail.sgml \
- usage-mainwindow.sgml \
- usage-print.sgml \
- usage-sync.sgml
-include $(top_srcdir)/help/sgmldocs.make
-dist-hook: app-dist-hook
diff --git a/help/C/POTFILES.in b/help/C/POTFILES.in
deleted file mode 100644
index d9393e82cc..0000000000
--- a/help/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/help/C/apx-authors.sgml b/help/C/apx-authors.sgml
deleted file mode 100644
index a1664ab0a5..0000000000
--- a/help/C/apx-authors.sgml
+++ /dev/null
@@ -1,91 +0,0 @@
- <appendix id="authors">
- <title>Authors</title>
- <para>
- <application>Evolution</application> was written by:
-<simplelist>
- <member>Seth Alves: <email>alves@ximian.com</email></member>
- <member>Anders Carlsson: <email>andersca@gnu.org</email></member>
- <member>Damon Chaplin: <email>damon@ximian.com</email></member>
- <member>Clifford R. Conover: <email>rusty@zootweb.com</email></member>
- <member>Miguel De Icaza: <email>miguel@ximian.com</email></member>
- <member>Radek Doulik: <email>rodo@ximian.com</email></member>
- <member>Arturo Espinoza: <email>arturo@nucleu.unam.mx</email></member>
- <member>Larry Ewing: <email>lewing@ximian.com</email></member>
- <member>Bertrand Guiheneuf: <email>bertrand@ximian.com</email></member>
- <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>
- <member>Christopher J. Lahey: <email>clahey@ximian.com</email></member>
- <member>Matthew Loper: <email>matt@loper.org</email></member>
- <member>Federico Mena: <email>federico@ximian.com</email></member>
- <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>
- <member>Nat Friedman: <email>nat@ximian.com</email></member>
- <member>Ettore Perazzoli: <email>ettore@ximian.com</email></member>
- <member>Jeffrey Stedfast: <email>jeff@ximian.com</email></member>
- <member>Russell Steinthal: <email>rms39@columbia.edu</email></member>
- <member>Peter Teichman: <email>peter@ximian.com</email></member>
- <member>Chris Toshok: <email>toshok@ximian.com</email></member>
- <member>Peter Williams: <email>peter@newton.cx</email></member>
- <member>Dan Winship: <email>danw@ximian.com</email></member>
- <member>Michael Zucchi: <email>notzed@ximian.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.ximian.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@ximian.com</email>), Kevin Breit
- (<email>battery841@mypad.com</email>) Duncan Mak
- (<email>duncan@ximian.com</email>) and Ettore Perazzoli
- (<email>ettore@ximian.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>
- <para>
- Translations:
- <itemizedlist>
- <listitem><para>
- Daniel Persson for .se
- </para></listitem>
-
- <listitem><para>
- Hector Garcia Alvarez for .es
- </para></listitem>
-
- <listitem><para>
- Kjartaan Marass for .no
- </para></listitem>
-
- </itemizedlist>
-
- </para>
- </appendix>
-
-
-
-
-
diff --git a/help/C/apx-bugs.sgml b/help/C/apx-bugs.sgml
deleted file mode 100644
index e4a96a8155..0000000000
--- a/help/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/help/C/apx-gloss.sgml b/help/C/apx-gloss.sgml
deleted file mode 100644
index 84f6b3cfb4..0000000000
--- a/help/C/apx-gloss.sgml
+++ /dev/null
@@ -1,437 +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="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="expunge">
- <glossterm>Expunge</glossterm>
- <glossdef>
- <para>
- When messages are marked for deletion, they remain till they are expunged.
- When a message is expunged, it is permanently deleted, as long as it was
- marked for deletion.
- </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 <filename>/</filename>.
- The rest of the "branches" spread downwards from the root. Don't
- confuse the root directory with the root
- account, or root's home directory,
- <filename>/home/root</filename>.b
- </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>
- If you get a message intended for someone else, you can use
- message forwarding to send it on to the right person.
- </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,
- including email, calendar, and addressbook tools.
- </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="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="public-key-encryption">
- <glossterm>Public Key Encryption</glossterm>
- <glossdef>
- <para>
- A strong encryption method that uses a set of two "keys," one of
- which is made public, and one of which is kept private. Data
- encrypted using the public key can only be decrypted using the
- private key. The longer the keys, the more difficult it is to
- break the encryption.
- </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="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 program which inserts itself into other files or programs and
- which, when executed, spreads to 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/help/C/config-encryption.sgml b/help/C/config-encryption.sgml
deleted file mode 100644
index e36f17c652..0000000000
--- a/help/C/config-encryption.sgml
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[]>
-
-<article>
-
- <sect1 id="encryption-intro">
- <title>What is Encryption?</title>
- <para>
- Encryption is an ancient method of changing readable text to unreadable
- text that dates back to Egyptian times. Encryption takes the statement
- "Evolution" and turns it into something which cannot be read without help
- through decryption.
- <example>
- <title>Encryption Example</title>
- <para>
- Kevin orders an <application>Evolution</application> t-shirt from
- Ximian, Inc. over the internet. He puts in his credit card number
- which is 1234-567-8901. For security, his computer encrypts the
- credit card number so it can be safely transmitted over the internet.
- The number now is @#$23ui7yr87#@!48970fsd, which holds no intentional
- resemblance to the inital number. When the information gets to
- Ximian, Inc. it'll be decrypted into the inital number.
- </para>
- </example>
- Encryption can be used in email in two ways: to verify that the sender is
- the real sender, and to hide the message while in transmission.
- <application>Evolution</application> has the capability to do both.
- </para>
- </sect1>
- <sect1 id="generating-key">
- <title>Generating your PGP key</title>
- <para>
- First, you need to create a PGP key. To do this, you'll need GPG
- installed.
- </para>
- <tip>
- <title>GPG Versions</title>
- <para>
- This manual covers version 1.0.6 of GPG. If your version is different,
- this may not be entirely accurate. You may find out your version number
- by typing in: <command>gpg --version</command>.
- </para>
- </tip>
- <para>
- You can start by typing in: <command>gpg --gen-key</command>. At the
- first question, select 1. The next question asks you about key length.
- The longer the key, more stronger it is. However, the longer the key, the
- longer it takes to generate. This is your choice. However, 1024 bits
- (default) should be adequate. The next question asks you if you want your
- key to expire. Expiring keys make your key invalid after a certain amount
- of time, so old keys don't float around active. This is the same concept
- as a coupon at a supermarket. Next, you'll type in your Real name, your
- email address, and a comment. You should not forge this information, as
- it is used later to verify who you are. Assuming that all your
- information is correct, press "O" to continue. GPG now asks you for a
- passphrase. This is a password which you will need to decrypt and encrypt
- messages. This can be any length, with any characters in it. It is case
- sensitive, which means that it does know the difference between capital
- letters and lower-case. Now your key is generated. It is recommend you
- surf the internet, read your email, or write a letter in a word
- processor. This help creates randomness in the key.
- </para>
- <para>
- Once this is completed, you'll be dropped back to the command line.
- Now you can view your key information by typing <command>gpg
- --list-keys</command>. You should see something similar to this:
- <example id="gpg-list-keys">
- <title>GPG Listing Keys</title>
- <para>
- /home/bob/.gnupg/pubring.gpg
- ----------------------------
- pub 1024D/32j38dk2 2001-06-20 bob &lt;bob@bob.com&gt;
- sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
- </para>
- </example>
- You'll now need to upload your public key to a keyserver, so that your
- friends can use your key. You'll need to know the ID of your key, which
- is after the 1024D on the line beginning with pub. For this example, it
- is 32j38dk2. You now type in <command>gpg --send-keys --keyserver
- wwwkeys.pgp.net 32j38dk2</command>. Substitute your key ID for 32j38dk2.
- You will be prompted to type in your password <!-- verify that you need to
- enter your password here --> and your key will be uploaded for your
- friends to download.
- </para>
- </sect1>
- <sect1 id="encrypt-evo-integ">
- <title>Setting up Evolution's Encryption</title>
- <para>
- You'll need to open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- Once there, select the account you'd like to associate the key to and click
- the <guibutton>Edit</guibutton> button. In the
- <guilabel>Security</guilabel> tab is a section labeled <guilabel>Pretty
- Goog Privacy</guilabel>. Enter your key ID and click
- <guibutton>OK</guibutton>. Your key is now integrated into your identity
- in <application>Evolution</application>.
- </para>
- </sect1>
- <sect1 id="encrypt-sending">
- <title>Sending Encrypted Messages</title>
- <para>
- You can either sign or encrypt a message. When you sign a message, verify
- that you were the one who sent it, and that no one is forging your
- identity. Encrypting a message makes it impossible for someone with
- prying eyes to view it while it's in tranmission.
- </para>
- <para>
- <sect2 id="sign-msg">
- <title>Signing a Message</title>
- <para>
- To sign a message, you simply click
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Sign</guimenuitem>
- </menuchoice>
- . You will be prompted for your PGP password. Once you enter it,
- click <guibutton>OK</guibutton> and your message will be signed.
- </para>
- </sect2>
- <sect2 id="encrypt-msg">
- <title>Encrypting a Message</title>
- <para>
- Encrypting a message is very similar to signing a message. You simply
- click the menu item
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Encrypt</guimenuitem>
- </menuchoice>
- </para>
- </sect2>
- </para>
- </sect1>
- <sect1 id="unencrypting">
- <title>Unencrypting a Recieved Message</title>
- <para>
- Sometimes, a friend will send you a message which is encrypted. In order
- for you to read it, you need to unencrypt it.
- </para>
- <para>
- When you view the encrypted message, <application>Evolution</application>
- will prompt you for your PGP password. You type in your PGP password and
- the message is then decrypted.
- </para>
- </sect1>
- </article>
diff --git a/help/C/config-prefs.sgml b/help/C/config-prefs.sgml
deleted file mode 100644
index 128dc24437..0000000000
--- a/help/C/config-prefs.sgml
+++ /dev/null
@@ -1,769 +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>Tools</guimenu> <guimenuitem>Mail
- Settings</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>Accounts</guilabel></term>
- <listitem>
- <para>
- This allows you to create and alter one or more identities for your
- email.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Display</guilabel></term>
- <listitem>
- <para>
- Allows you to edit how email appears.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Composer</guilabel></term>
- <listitem>
- <para>
- Customizes the behavior of the email message composer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Other</guilabel></term>
- <listitem>
- <para>
- Configures miscellanious aspects of
- <application>Evolution</application> such as character
- set and encryption tools.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-mail-fig">
- <title>Mail Preferences Dialog</title>
- <screenshot>
- <screeninfo>Setting mail preferences</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/config-mail" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
-
-
- <sect2 id="config-prefs-mail-identity">
- <title>Working with the Accounts Tab</title>
- <para>
- <application>Ximian Evolution</application> allows you to
- maintain multiple accounts, or identities. This is useful
- want to keep personal and professional email separate, or if
- you wear several hats at work. When you are writing an email
- message, you can which account to use by selecting from the
- drop-down list next to the <guilabel>From</guilabel> entry in
- the message composer.
- </para>
-
- <para>
- Clicking <guibutton>Get Mail</guibutton> will refresh any
- IMAP, <filename>mh</filename>, or
- <filename>mbox</filename> 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. If
- you don't want to check mail for a given account, select it
- in the <guilabel>Accounts</guilabel> tab and click the
- <guibutton>Disable</guibutton> button.
- </para>
-
- <para>
- To add a new account, simply click <guibutton>Add</guibutton>
- to open the mail configuration assistant. To alter an
- existing identity, select it in the
- <interface>Preferences</interface> window, and then click
- <guibutton>Edit</guibutton> to open the account editor
- dialog.
- </para>
- <para>
- The account editor dialog has six sections:
- <variablelist>
-
- <varlistentry>
- <term>Identity:</term>
- <listitem>
- <para>
- Here, enter the name,
- email address, and other identifying information for the
- account.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Receiving Mail</term>
- <listitem>
- <para>
- Here, select the way you will be getting mail: you may
- download mail from a server (<glossterm
- linkend="pop">POP</glossterm> or <glossterm
- linkend="imap">IMAP</glossterm>) or access it from files
- on your local system. If you use a server, it may permit
- or require you to use a Secure Socket Layer (SSL)
- connection. To turn SSL connections on, just click the
- <guibutton>Use Secure Connection (SSL)</guibutton>
- button.
-
-<note id="config-arbitrary-port">
-<title>Specifying Port Numbers</title>
-<para>
-Your system administrator may ask you to connect to a specific port on
-a mail server. To specify which port you use, just type a colon and
-the port number after the server name. For example, to connect to port
-143 on the server smtp.omniport.com, you would enter
-as
-<userinput>
-smtp.omniport.com:143
-</userinput> as the server name.
-</para>
-</note>
-
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Receiving Options</term>
- <listitem>
- <para>
- Here, decide whether you'd like to check for mail
- automatically, and set other options related to the
- behavior of your server. If you use POP mail, you can
- decide whether to leave mail on the server, and if you
- use IMAP, you can set folder subscription options here.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Sending Mail</term>
- <listitem>
- <para>
- In this section, you will choose and configure a method
- for sending mail. You may choose <glossterm
- linkend="smtp">SMTP</glossterm> or <glossterm
- linkend="sendmail">sendmail</glossterm>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Special Folders</term>
- <listitem>
- <para>
- Here, you can decide where this account will store the
- messages that it has sent, and the messages that you
- save as drafts.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Security</term>
- <listitem>
- <para>
- In this section, you will set the security options for
- this account. Enter your PGP Key ID and decide how
- frequently to encrypt and sign your messages.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-display">
- <title>Mail Display Options</title>
- <para>
- In this tab you can decide how you would like
- <application>Ximian Evolution</application> to display your
- mail: how to display citations, how long to wait before
- marking a message as read, and so forth.
- </para>
- <para>
- This is also where you can decide how you would like
- <application>Ximian Evolution</application> to handle inline
- images in HTML mail that you get. There is a detailed
- discussion of the issues surrounding these options in <xref
- linkend="usage-mail-getnsend-get-attach-html">.
- </para>
- <para>
- To hange the font which <application>Ximian
- Evolution</application> uses to display mail, do the
- following:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open the Control Center by selecting <menuchoice>
- <guimenu>System</guimenu>
- <guimenuitem>Settings</guimenuitem> </menuchoice> from
- the menu panel.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the HTML Viewer settings tool.
- </para>
- </listitem>
- <listitem>
- <para>Choose the font and font size you would like to use.
- </para>
- </listitem>
- </orderedlist>
-
- Alternately, open a terminal and run the
- <command>gtkhtml-properties-capplet</command> command. This
- will open the GNOME HTML Display Properties tool, and you can
- select a font and other attributes of your HTML display,
- including that in <application>Ximian Evolution</application>.
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-composer">
- <title>Message Composer Preferences</title>
-
- <para>
- Mercifully, there are only four preferences you can prefer in
- the message composer preferences dialog:
- <variablelist>
- <varlistentry>
- <term>Send mail in HTML format by default </term>
- <listitem>
- <para>
- If you would like all email messages that you compose
- to begin in HTML format, leave this box checked. You
- can convert messages between HTML and plain text by
- selecting the <menuchoice> <guimenu>Format</guimenu>
- <guimenuitem>HTML</guimenuitem> </menuchoice> toggle
- in the message composer.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Default Forward style</term>
- <listitem>
- <para>
- Select from:
- <simplelist>
- <member><guilabel>Attachment:</guilabel> the
- message you forward appended to the message you send
- as a seperate file.</member>
-
- <member> <guilabel>Inline:</guilabel> The message
- you forward is included at the end of the message
- you send.</member>
-
- <member>
- <guilabel>Quoted:</guilabel> The message
- you forward is included at the end of the message
- you send, and a greater-than symbol (&gt;) is
- inserted at the beginning of each line to
- indicate that it is quoted.
- </member>
- </simplelist>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Prompt when sending messages with an empty subject</term>
- <listitem>
- <para>
- The composer will warn you if you try to send a
- message without a subject.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Prompt when sending messages with only Bcc recipients defined</term>
- <listitem>
- <para>
- The composer will warn you if you try to send a
- message that has only <guilabel>Bcc</guilabel>
- recipients. This is important because some mail
- servers will fail to honor blind carbon copy if you
- do not have at least one recipient that is visible to
- all readers.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </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 configuration options that
- didn't fit anywhere else.
- <variablelist>
-
- <varlistentry>
- <term>
- <guilabel>PGP binary path</guilabel>
- </term>
- <listitem>
- <para>
- The complete path to your external encryption tool On
- most Linux systems, this will be
- <filename>/usr/bin/gpg</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <guilabel>Remember PGP Passphrase until Exit</guilabel>
- </term>
- <listitem>
- <para> Check this box if you want <application>Ximian
- Evolution</application> to remember your PGP
- passphrase for as long as it is running. You will
- still have to enter your passphrase again each time
- you start <application>Ximian Evolution</application>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <guilabel>Default Character Encoding</guilabel>
- </term>
- <listitem> <para> Choose a default character encoding for
- your messages.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <guilabel>Empty Trash Folders on Exit</guilabel>
- </term>
- <listitem> <para> If you would like to expunge all deleted
- mail when you quit <application>Ximian
- Evolution</application>, check this box.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <guilabel>Log filter actions to:</guilabel>
- </term>
- <listitem> <para> If you like, you can have
- <application>Ximian Evolution</application> write all
- its message filter actions to a log file. Select a log
- file here.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
-
-<!-- NOT FOR 1.0, see usage-mail.sgml
- <sect1 id="config-prefs-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 news servers as you like, of course. News servers
- will appear next to your IMAP servers in the
- <interface>folder bar</interface>.
- </para>
- </sect2>
--->
-
-
- <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 three
- tabs: <guilabel>Calendar</guilabel>, <guilabel>TaskPad</guilabel>, <guilabel>Reminders</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>
- <mediaobject><imageobject><imagedata fileref="figures/config-cal" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </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 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 colors 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.
- </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. These beeps
- are distinct from full-fledged audio alarms. If you leave this box
- unchecked, <application>Evolution</application> will only
- alert you to events by opening a dialog box.
- </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:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Addressbook Sources</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Add</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the server information.
- <variablelist>
- <varlistentry>
- <term>Account name</term>
- <listitem>
- <para>
- The name that you see on the screen. This could be anything you wish.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Server name</term>
- <listitem>
- <para>
- Address of the server where the addressbook is located.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>My server requires authentication</term>
- <listitem>
- <para>
- Select this if the server needs a password to access the addressbook.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Port</term>
- <listitem>
- <para>
- The internet port to connect to in order to access the database. This is normally 389.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Search base</term>
- <listitem>
- <para>
- The base node to use for all your searches. Contact your administrator for information about setting this up.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Search scope</term>
- <listitem>
- <para>
- The scope of the search <!-- FIXME: THIS DEFINITION SUCKS -->
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton> to permanenty make changes or <guibutton>Apply</guibutton> to temporarily set the changes.
- </para>
- </listitem>
- </orderedlist>
- </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/help/C/config-sync.sgml b/help/C/config-sync.sgml
deleted file mode 100644
index 8490f9a84b..0000000000
--- a/help/C/config-sync.sgml
+++ /dev/null
@@ -1,133 +0,0 @@
- <chapter id="config-sync">
- <title>Setting up your synchronization system</title>
- <para>
- Synchronization presents you with two issues you'll need to
- address.
- <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> by selecting
- <menuchoice><guimenu>System</guimenu><guimenuitem>Settings</guimenuitem></menuchoice>,
- and make sure that <application>Pilot Link</application> is
- properly configured.
- </para>
- <para>
- Once your computer and your Palm-OS device are talking happily
- to each other, select the <glossterm
- linkend="conduit">conduits</glossterm> you want under the
- <guilabel>Pilot Conduits</guilabel> section of the Control
- Center. You may use conduits to synchronize data with several
- applications; the <application>Ximian Evolution</application>
- conduits are labelled <guilabel>EAddress</guilabel>, for the
- address cards in your Contact Manager,
- <guilabel>ECalendar</guilabel>, for your Calendar, and
- <guilabel>ETodo</guilabel>, for your Task List.
- </para>
- <para>
- To enable a conduit, click the
- <guibutton>Enable</guibutton> to enable it, and click
- <guibutton>Settings</guibutton> to change what it will do when
- activated. 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 the behavior you want for each conduit you choose to use.
- If you're not sure, go ahead and stick with
- <guilabel>Synchronize</guilabel>. Then, put your handheld on
- its cradle and press the HotSync button.
- </para>
- <para>
- <tip>
- <title>Data Loss Prevention</title>
- <para>
- It's always a good idea to make a backup. To do that,
- make a copy of the <filename>evolution</filename>
- directory inside your home directory.
- </para>
- </tip>
- </para>
-
- </chapter>
-
-
-
-
diff --git a/help/C/evolution-C.omf b/help/C/evolution-C.omf
deleted file mode 100644
index 004068a52e..0000000000
--- a/help/C/evolution-C.omf
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<omf>
- <resource>
- <title>
- The Evolution Manual
- </title>
- <subject>
- <category>GNOME|Applications</category>
- </subject>
- <format mime="text/sgml"/>
- <identifier url="evolution.sgml"/>
- <language code="C"/>
- </resource>
-</omf>
diff --git a/help/C/evolution-faq.sgml b/help/C/evolution-faq.sgml
deleted file mode 100644
index 8e658ff308..0000000000
--- a/help/C/evolution-faq.sgml
+++ /dev/null
@@ -1,973 +0,0 @@
-<!--
-<!DOCTYPE appendix PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<appendix id="evolution-faq">
- <title>Frequently Asked Questions About Ximian Evolution</title>
- <para>
- Here are some frequently asked questions about the
- <application>Evolution</application> groupware suite from
- Ximian. If you have a question that's not listed, you can
- contact us at evolve@ximian.com.
- </para>
-
- <sect1 id="faq-features">
- <title>Features</title>
-
- <qandaset>
-
- <qandaentry>
- <question>
- <para>
- How can I use Evolution with Microsoft Exchange or Lotus Notes?
- </para>
- </question>
- <answer>
- <para>
- If your server uses standard open protocols like IMAP,
- LDAP, POP, and SMTP, you can use Evolution with it. You
- can share addresses with vCards and calendar items with
- iCal appointments.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can I use Evolution with KDE?
- </para>
- </question>
- <answer>
- <para>
- Evolution will work fine in KDE. You will need to
- install all of the GNOME libraries that it depends on.
- Also, certain configuration options, such as default
- fonts and the message editor keybinding behavior, must be
- changed using the GNOME Control Center application (this
- will also run from within KDE).
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- How can I remove or rename a folder?
- </para>
- </question>
- <answer>
- <para>
- Right-click on the folder and select the
- <guimenuitem>Delete</guimenuitem> or
- <guimenuitem>Rename</guimenuitem> items.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Why doesn't drag and drop between folders seem to work?
- </para>
- </question>
- <answer>
- <para>
- The implementation isn't finished, although it's nearly done.
- </para>
-
- <para>
- In the meantime, right-click on the folders or messages
- you want to move, and select the
- <guimenuitem>Move</guimenuitem> or
- <guimenuitem>Copy</guimenuitem> options.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can I read mail from a mailbox file created by some other
- application (e.g. Mutt) without importing mail from it?
- </para>
- </question>
- <answer>
- <para>
- No, but it's a planned feature.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can Evolution sync with my Palm OS (tm) device?
- </para>
- </question>
- <answer>
- <para>
- Yes. However, it is not yet stable enough for general
- release and we do not yet ship Evolution with Palm
- synchronization enabled default. Until we do, you will
- need to compile this in yourself. Check the
- <filename>README</filename> file for additional
- information on the requirements. Full compatibility and
- synchronization for calendar and addressbook applications
- on Palm devices will be implemented and shipped soon.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- What is the difference between a virtual folder (vfolder)
- and a regular folder?
- </para>
- </question>
- <answer>
- <para>
- A virtual folder is like a saved search: it is a view of
- your mail. Regular folders actually contain the mail
- messages. You can have one message be in multiple virtual
- folders, but only in one regular folder. See the section
- in the Evolution manual about virtual folders for more
- information.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Can Evolution spell-check messages while I compose them?
- </para>
- </question>
- <answer>
- <para>
- Yes. The Evolution composer is able to highlight
- mis-spelled word on the fly as you type them, and also
- give you suggestions for possible corrections. In order
- for this to work you need the
- <filename>gnome-spell</filename> component, which is not
- shipped with Ximian GNOME yet.
- </para>
-
- <para>
- If you are brave enough, you can check out module
- <filename>gnome-spell</filename> from the GNOME CVS and
- compile it yourself. Check out its README file for a list
- of <filename>gnome-spell</filename>'s requirements for
- compilation.
- </para>
-
- <para>
- Note that you don't need to recompile Evolution after
- installing <filename>gnome-spell</filename>; it will be
- picked up automatically.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Why can't I see the images that are contained in some HTML
- mail messages.
- </para>
- </question>
- <answer>
- <para>
- Evolution currently doesn't support this, but it's a
- planned feature. It will be an option: many people like
- to turn off the images because they use up bandwidth and can
- be used to spy on your email reading habits.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can I change the font that Evolution uses to compose and
- display mail messages?
- </para>
- </question>
- <answer>
- <para>
- You have to change the GtkHTML settings for that: in the
- GNOME Control Center, go to the "HTML Viewer"
- configuration page, which is under the "Document Handlers"
- category.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- How do I import my Outlook <filename>.pst</filename> files into Evolution?
- </para>
- </question>
- <answer>
- <para>
- You cannot import these files directly into Evolution
- because the <filename>.pst</filename> format is a
- proprietary format. However, Mozilla Mail on Windows can
- convert them into the <type>mbox</type> format, which can
- then be imported by Evolution.
- </para>
-
- <para>
- To start importing your Outlook mail to Evolution, run
- Mozilla Mail on Windows and select the
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import...</guimenuitem></menuchoice>
- to begin. Then select that you wish to import Mail from
- Outlook. Once Mozilla has imported all your mail, reboot
- your computer into Linux.
- </para>
-
- <para>
- Mount your Windows partition in Linux and run Evolution to
- begin importing your mail. Select
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import
- File...</guimenuitem></menuchoice> to start importing. Set
- the file type to MBox (mbox) and click on
- <guibutton>Browse</guibutton> to select the mail you want
- to import.
- </para>
-
- <para>
- If you are the only user on Windows, the mail files will
- be stored in <filename>/mnt/c/windows/Application
- Data/Mozilla/Profiles/default/XXXX/Mail/imported.mail/</filename>
- where <filename>/mnt/c/</filename> is your windows
- partition mount point and XXXX is some collection of
- numbers and digits ending in <filename>.slt</filename>.
- </para>
-
- <para>
- If there is more than one user, the file will be in
- <filename>/mnt/c/windows/Profiles/USERNAME/XXXX/Mail/imported.mail/</filename>
- where USERNAME is your Windows username.
- </para>
-
- <para>
- For each mail folder in Outlook, Mozilla will convert the
- folder into one mbox file. To import all your mail, import
- all the files without a <filename>.msf</filename>
- extension.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- If Mozilla can import <filename>.pst</filename> files, why can't Evolution?
- </para>
- </question>
- <answer>
- <para>
- Mozilla on Windows accesses the <filename>.pst</filename>
- files through the <filename>MAPI.DLL</filename>, which is
- only available on Windows. <filename>MAPI.DLL</filename>
- is the only way to access <filename>.pst</filename> files
- and Evolution cannot use this DLL in Linux.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Will there be an Evolution server? How about a text-based or web-based front end?
- </para>
- </question>
- <answer>
- <para>
- Of course, we can't comment on unannounced future product
- plans, but Evolution's architecture would permit the
- existence of that kind of software. If there is enough
- demand for such software we will consider moving in that
- direction.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Will Evolution make a good mocha?
- </para>
- </question>
- <answer>
- <para>
- Only espresso is planned, but you can easily plug in a chocolate component.
- </para>
- </answer>
- </qandaentry>
-
- </qandaset>
- </sect1>
-
-
- <!-- Section: Getting and compiling -->
-
- <sect1 id="faq-get-and-compile">
- <title>
- Getting and Compiling Evolution
- </title>
- <qandaset>
- <qandaentry>
- <question>
- <para>
- Where can I get the latest Evolution release?
- </para>
- </question>
- <answer>
- <para>
- There are two ways to install the latest Evolution
- release:
- <itemizedlist>
- <listitem>
- <para>
- If you have Ximian GNOME installed, you can start
- Red Carpet, Ximian's software updating system, and
- subscribe to the Evolution channel. This will let
- you install a binary for the latest release, and
- will also warn you when a new version has been made
- available.
- </para>
- </listitem>
-
- <listitem>
- <para>
- If you want to compile from source, you can
- download the latest official Evolution tarball
- from:
- </para>
-
- <para>
- <ulink url="ftp://ftp.gnome.org/pub/GNOME/unstable/sources/evolution">
- ftp://ftp.gnome.org/pub/GNOME/unstable/sources/evolution</ulink>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Are binary snapshots available?
- </para>
- </question>
- <answer>
- <para>
- Yes, if you have Ximian GNOME installed. Just run Red
- Carpet and subscribe to the Evolution Snapshot channel.
- </para>
-
- <para>
- You can check the status of snapshots at
- <ulink url="http://primates.ximian.com/~snapshot">http://primates.ximian.com/~snapshot</ulink>.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Why isn't a new snapshot available today?
- </para>
- </question>
- <answer>
- <para>
- Sometimes the build might fail because of problems with
- the source on CVS. In this case, just wait for next day's
- snapshot.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- How do I get Evolution from CVS?
- </para>
- </question>
- <answer>
- <para>
- If you already have
- <ulink url="http://cvs.gnome.org">GNOME CVS</ulink> access,
- simply check out the following modules: evolution,
- gtkhtml, gal.
- </para>
- <para>
- If you don't have a CVS account, you can use anoncvs
- instead. Bear in mind that anoncvs is only synchronized once
- a day, and code received from anoncvs may not be latest
- version available.
- </para>
-
- <para>
- Before using the anoncvs server, you have to log into it.
- This only needs to be done once. Use this command:
- </para>
-
- <programlisting>
- cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
- </programlisting>
-
- <para>
- Then you can retrieve the modules needed to compile Evolution
- using the following command:
- </para>
-
- <programlisting>
- cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co evolution gtkhtml gal
- </programlisting>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- How should I compile Evolution avoiding conflicts with my
- existing GNOME installation?
- </para>
- </question>
- <answer>
- <para>
- The best way is to install Evolution into a separate prefix.
- In order to specify a non-default installation prefix, you
- can pass the <parameter>--prefix</parameter> option to
- <filename>configure</filename> or
- <filename>autogen.sh</filename>. For example:
- </para>
-
- <programlisting>
- cd /cvs/evolution
- ./autogen.sh --prefix=/opt/gnome
- </programlisting>
-
- <para>
- If you install Evolution and the Evolution libraries in a
- non-standard prefix, make sure you set the appropriate
- environment variables in the startup script for Evolution:
- </para>
-
- <programlisting>
- export PATH=/opt/gnome:$PATH
- export GNOME_PATH=/opt/gnome:/usr
- </programlisting>
-
- <para>
- You may also need to add <filename>$prefix/lib</filename>
- (e.g. <filename>/opt/gnome/lib</filename>) to your
- <filename>/etc/ld.so.conf</filename>. Of course, this will
- not work for systems which do not use ld.so.conf, such as
- HP-UX.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- I get the error message: <computeroutput>make: *** No rule
- to make target
- `all-no-@BUILD_INCLUDED_LIBINTL@'</computeroutput>
- </para>
- </question>
- <answer>
- <para>
- You probably have <filename>gettext</filename> 0.10.36 or
- later installed. Try downgrading to 0.10.35;
- unfortunately, 0.10.36 introduced some incompatibilities
- with the current <filename>xml-i18n-tools</filename>.
- </para>
- </answer>
- </qandaentry>
- </qandaset>
- </sect1>
-
- <sect1 id="faq-trouble">
- <title>Troubleshooting</title>
- <qandaset>
- <qandaentry>
- <question>
- <para>
- I get <computeroutput>Cannot initialize the Evolution
- shell</computeroutput>.
- </para>
- </question>
- <answer>
- <para>
- There are a number of things that can cause this error.
- Check that:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- <filename>oafd</filename> is listed in your <envar>PATH</envar>
- environment variable.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <filename>GNOME_Evolution_Shell.oaf</filename> and
- the other
- <filename>GNOME_Evolution_*.oaf</filename> files are
- readable and installed in
- <filename>$prefix/share/oaf</filename>, where
- <filename>$prefix</filename> is one of the prefixes
- listed in <envar>GNOME_PATH</envar> or
- <envar>OAF_INFO_PATH</envar>. (These variables are
- supposed to contain $PATH-like colon-separated lists of
- paths. If the installation prefix for Evolution is
- different from that). Run `oaf-slay' once before running
- `evolution' again if you change $GNOME_PATH or
- $OAF_INFO_PATH.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <filename>evolution</filename>,
- <filename>evolution-mail</filename> and the other
- <filename>evolution-*</filename> executables are in your
- $PATH.
- </para>
- </listitem>
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- I get <computeroutput>Cannot open composer window</computeroutput>.
- </para>
- </question>
- <answer>
- <para>
- This actually means that Evolution cannot activate the HTML
- editor component from GtkHTML. The comments in the previous
- answer still apply; also make sure that
- <command>gnome-gtkhtml-editor</command> is in your
- <envar>PATH</envar>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- The address suggestion list steals focus from the "To:"
- entry box when I'm typing. How can I make it keep focus?
- </para>
- </question>
- <answer>
- <para>
- This is a bug in GTK version 1.2.10. To avoid it, downgrade
- to GTK version 1.2.9, or install the Ximian version of GTK
- 1.2.10.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- I updated Evolution and now my addressbook information is gone!
- What should I do?
- </para>
- </question>
- <answer>
- <para>
- Evolution uses the <filename>libdb</filename> library to
- handle the addressbook database. Two versions of
- <filename>libdb</filename> can be used with Evolution: version
- 1.88 and version 2.
- </para>
-
- <para>
- Unfortunately, an Evolution executable that is linked against
- a certain version of <filename>libdb</filename> will only be
- able to read addressbook files written by another Evolution
- executable that is linked with the same version of the
- library. If your addressbook is not readable by Evolution
- anymore, it probably means that you used to have Evolution
- linked with a certain version of <filename>libdb</filename>,
- but now it gets linked to a different version.
- </para>
-
- <para>
- Because of the way <filename>libdb</filename> is designed, it
- is not easy for Evolution to automatically do the conversion
- between the two formats. But, if your Evolution used to be
- linked against version 1.85 and now is linked to version 2,
- there is a very simple way to convert the database and recover
- your data.
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- First of all, check the format of the database using the
- <command>file</command> command:
- </para>
-
- <programlisting>
- file ~/evolution/local/Contacts/addressbook.db
- </programlisting>
-
- <para>
- You want version 1.85 there. If your version is 2, then
- your current Evolution is probably linked against
- version 1.85 and you cannot convert the database to the
- old format. To do that, follow these instructions:
- </para>
- </listitem>
-
- <listitem>
- <para>
- Quit Evolution.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Make a copy of the addressbook database for backup
- purposes, then move the original out of the way.
- </para>
-
- <programlisting>
- cd ~/evolution/local/Contacts
- cp addressbook.db addressbook.db.backup
- mv addressbook.db addressbook.db.tmp
- </programlisting>
- </listitem>
-
- <listitem>
- <para>
- Convert the contacts to the new format using
- <command>db_dump185</command> and
- <command>db_load</command>:
- </para>
-
- <programlisting>
- db_dump185 addressbook.db.tmp | db_load ~/evolution/local/Contacts/addressbook.db
- </programlisting>
- </listitem>
-
- <listitem>
- <para>
- Restart Evolution.
- </para>
- </listitem>
-
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Evolution reported an error when trying to retrieve from my
- local spool in <filename>/var/spool/mail/username</filename>. Why?
- </para>
- </question>
- <answer>
- <para>
- Evolution doesn't have an external helper for moving mail,
- so <filename>/var/spool/mail/</filename> must be writable
- by you. Try this:
- </para>
-
- <programlisting>
- chmod 1777 /var/spool/mail
- </programlisting>
-
- <para>
- We're working on a solution to this problem now.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Evolution crashes reporting that it couldn't allocate N
- billion bytes; how do I fix this?
- </para>
- </question>
- <answer>
- <para>
- This usually happens when a component tries talking a
- certain version of a CORBA interface to another component
- that supports a different version. For example, this can
- happen when you recompile and install a single component
- without recompiling/installing the rest of Evolution.
- </para>
-
- <para>
- If you run into this problem, make sure all the components
- are compiled and installed at the same time. This also
- applies to GtkHTML upgrades; after upgrading and
- installing a newer GtkHTML, always re-compile and
- re-install Evolution against it.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- What is <command>killev</command> and why do I need to use it?
- </para>
- </question>
- <answer>
- <para>
- Evolution is actually made up of several components that run
- as separate processes. Evolution's shell is not very good
- at cleaning up stale processes, so it is possible that
- sometimes already-running components cause unexpected and/or
- broken behavior.
- </para>
-
- <para>
- It's always a good idea to run <command>killev</command>
- after a crash in Evolution, especially if the Evolution
- shell itself crashed. (If a component crashes instead, you
- should try to exit the shell cleanly first, so you give a
- chance to the other components to clean things up properly.)
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- What is <command>oaf-slay</command> and why do I need to use it?
- </para>
- </question>
- <answer>
- <para>
- <command>oaf-slay</command> is an utility which comes with
- OAF, the Object Activation Framework that is used in the
- GNOME Desktop to activate components. It will kill the
- object activation daemon (<command>oafd</command>) as well
- as all the active components on the system.
- </para>
-
- <para>
- Using <command>oaf-slay</command>
- <command>oaf-slay</command> is quite drastic and can cause
- problems with other programs that use oaf, especially with
- <application>Nautilus</application>. To avoid problems, do
- not run <command>oaf-slay</command> while you are in GNOME.
- </para>
- </answer>
- </qandaentry>
- </qandaset>
- </sect1>
-
- <sect1 id="faq-debugging">
- <title>Questions about Bugs and Debugging</title>
- <para>
- Find a bug? Here's how to help us fix it!
- </para>
-
- <qandaset>
- <qandaentry>
- <question>
- <para>
- Where should I report bugs for Evolution?
- </para>
- </question>
- <answer>
- <para>
- You can use the GNOME Bug Report Tool
- (<command>bug-buddy</command>), or report bugs to the
- Ximian bug reporting system (Bugzilla), located at <ulink
- url="http://bugzilla.ximian.com">http://bugzilla.ximian.com</ulink>.
- </para>
-
- <para>
- Please use the query function to check if a bug has been
- submitted already, so that we avoid duplicate reports.
- </para>
- </answer>
- </qandaentry>
-
-
- <qandaentry>
- <question>
- <para>
- What is a stack trace (backtrace) and how do I get one?
- </para>
- </question>
- <answer>
- <para>
- A stack trace is a list of the chain of function calls
- that lead to some point in the program. Typically, you
- want to get a stack trace when Evolution crashes or
- hangs and you want to try to figure out where in the
- code that happened and why. For this reason, stack
- traces are extremely useful for the Evolution
- developers, so it's important that you learn how to get
- them, and include them in crash reports. The
- <application>bug-buddy</application> tool can get and
- submit a stack trace for you. If you want to do it by
- yourself, here's how:
- </para>
- <para>
- First of all, in order to get a stack trace, your
- executable (and possibly the libraries) must be compiled
- with debugging symbols. Debugging symbols are created by
- default if you compile from CVS, and are included in the
- snapshot builds. If you decide to compile by yourself
- with some custom CFLAGS value, make sure -g is included
- in them.
- </para>
- <para>
- Finally, you must put the component that crashes through
- <application>gdb</application>, the GNU debugging tool.
- To do so, make sure all the components are dead (exit
- Evolution and run <command>killev</command>), then run the
- following command:
- <programlisting>
- <command>gdb name-of-component</command>
- </programlisting>
-
- Where "name-of-component" is the name of the component that
- crashed.
- </para>
- <para>
- Then, at the gdb prompt, type r (for "run") and wait a
- few seconds to make sure the component has registered
- with the name service. Then start
- <application>Evolution</application> normally from a
- different terminal.
- </para>
- <para>
- When you have started
- <application>Evolution</application>, reproduce the
- crash, and go back to the terminal where you ran gdb. If
- the component crashed, you should have a prompt there;
- otherwise, just hit Control+C. At the prompt, type
- <command>info threads</command>. This will give you a
- screen that looks like this:
- </para>
- <para>
- <programlisting>
-(gdb) info threads
- 8 Thread 6151 (LWP 14908) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 7 Thread 5126 (LWP 14907) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 6 Thread 4101 (LWP 1007) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 5 Thread 3076 (LWP 1006) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 4 Thread 2051 (LWP 1005) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 3 Thread 1026 (LWP 1004) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 2 Thread 2049 (LWP 1003) 0x40a10d90 in poll () from /lib/libc.so.6
- 1 Thread 1024 (LWP 995) 0x40a10d90 in poll () from /lib/libc.so.6
- </programlisting>
-
- For the most part, only
- <application>evolution-mail</application> will have more
- than one thread.
- </para>
- <para>
- Now, for each of the threads listed, type the following commands:
-<programlisting>
-thread N
-bt
-</programlisting>
- Where 'N' is the number of the thread (in this example, 1
- through 8).
- </para>
- <para>
- Cut and paste all the output gdb gives you into a text
- file. You can quit gdb by typing
- <userinput>quit</userinput>
- </para>
- <para>
- If you prefer, you can start gdb while a process is
- running. You'll want to do this right after a crash dialog
- appears, but before hitting "OK" or "Submit bug report".
- Start <application>gdb</application> as above, but instead
- of using <userinput>r</userinput>, type <userinput>attach
- PID</userinput> where PID is the process ID of the
- component you want to debug.
- </para>
- <para>
- If that sounds too complicated, you can always use
- <command>bug-buddy</command> to get and submit the stack
- trace.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- A component of evolution crashed, but since the rest of
- evolution stayed up, I couldn't use bug-buddy to get a
- stack trace. How can I use gdb to get a stack trace of
- the component?
- </para>
- </question>
- <answer>
- <para>
- To trace a failing component (in this example, evolution-mail):
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open two terminals.
- </para>
- </listitem>
- <listitem>
- <para>
- In one, type <command>gdb evolution-mail</command>
- . Replace "evolution-mail" with the name of the
- component that is crashing: evolution-addressbook,
- evolution-calendar, etc.)
- </para>
- </listitem>
- <listitem>
- <para>
- Once gdb starts, type <userinput>r</userinput> and
- hit enter. Give it a few seconds, to make sure it
- starts up completely.
- </para>
- </listitem>
- <listitem>
- <para>
- In the second terminal, type
- <command>evolution</command>. Do whatever you did
- to cause the crash in the component you used in
- step two.
- </para>
- </listitem>
- <listitem>
- <para>
- When the crash occurs, type 'bt' in the first
- terminal.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Cut and paste the output into your bug report.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </answer>
- </qandaentry>
- </qandaset>
- </sect1>
- </appendix>
-
-<!-- Local Variables: --> <!-- indent-tabs-mode:nil --> <!-- End: -->
-
-
-
-
diff --git a/help/C/evolution.sgml b/help/C/evolution.sgml
deleted file mode 100644
index bbc40cc480..0000000000
--- a/help/C/evolution.sgml
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.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-MAIL-ORG SYSTEM "usage-mail-org.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-PREFS SYSTEM "config-prefs.sgml">
-<!ENTITY CONFIG-SYNC SYSTEM "config-sync.sgml">
-<!ENTITY CONFIG-ENCRYPTION SYSTEM "config-encryption.sgml">
-<!-- <!ENTITY FAQ SYSTEM "evolution-faq.sgml"> Just link to the web page-->
-<!ENTITY MENUREF SYSTEM "menuref.sgml">
-<!ENTITY APX-GLOSS SYSTEM "apx-gloss.sgml">
-<!ENTITY APX-COMMON-TASKS SYSTEM "apx-common-tasks.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 Ximian Evolution</title>
- <authorgroup>
- <author><firstname>Aaron</firstname><surname>Weber</surname></author>
- <author><firstname>Kevin</firstname><surname>Breit</surname></author>
- <author><firstname>Ettore</firstname><surname>Perazzoli</surname></author>
- <author><firstname>Duncan</firstname><surname>Mak</surname></author>
- </authorgroup>
- <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>
-
- <releaseinfo>
- This is version 0.11 of the Ximian Evolution manual.
- </releaseinfo>
-
- </bookinfo>
-
- &PREFACE;
-
- <part id="usage">
- <title>Getting Started with Ximian Evolution</title>
- <partintro>
- <para>
- Part one of the <application>Ximian Evolution</application> manual
- describes how to use <application>Ximian 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-MAIL-ORG;
- &USAGE-CONTACT;
- &USAGE-CALENDAR;
-<!-- &USAGE-NOTES; -->
- &USAGE-SYNC;
- &USAGE-PRINT;
- </part>
- <part id="config">
- <title>Configuring and Managing Ximian Evolution</title>
- <partintro>
- <para>
- <application>Ximian 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>Ximian
- Evolution</application>, "configurable", 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-PREFS;
- &CONFIG-SYNC;
- </part>
-
-<!-- &FAQ; Just link to the webpage -->
- &MENUREF;
- &APX-GLOSS;
- &APX-BUGS;
- &APX-AUTHORS;
-
-</book>
-
-
-
-
-
-
-
-
-
-
diff --git a/help/C/figures/calendar.png b/help/C/figures/calendar.png
deleted file mode 100644
index fe96ba10b4..0000000000
--- a/help/C/figures/calendar.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/config-cal.png b/help/C/figures/config-cal.png
deleted file mode 100644
index 41fd408292..0000000000
--- a/help/C/figures/config-cal.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/config-mail.png b/help/C/figures/config-mail.png
deleted file mode 100644
index 32d03785cd..0000000000
--- a/help/C/figures/config-mail.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/contact-editor.png b/help/C/figures/contact-editor.png
deleted file mode 100644
index 21a0bb61ad..0000000000
--- a/help/C/figures/contact-editor.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/contact.png b/help/C/figures/contact.png
deleted file mode 100644
index c5138ce609..0000000000
--- a/help/C/figures/contact.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/filter-assist-fig.png b/help/C/figures/filter-assist-fig.png
deleted file mode 100644
index 672351b36e..0000000000
--- a/help/C/figures/filter-assist-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/filter-new-fig.png b/help/C/figures/filter-new-fig.png
deleted file mode 100644
index 51fc680df9..0000000000
--- a/help/C/figures/filter-new-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-1.png b/help/C/figures/full-1.png
deleted file mode 100644
index 84afc9d3e7..0000000000
--- a/help/C/figures/full-1.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-2.png b/help/C/figures/full-2.png
deleted file mode 100644
index 929e356db5..0000000000
--- a/help/C/figures/full-2.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-3.png b/help/C/figures/full-3.png
deleted file mode 100644
index 175fd1d970..0000000000
--- a/help/C/figures/full-3.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-4.png b/help/C/figures/full-4.png
deleted file mode 100644
index 45d66bb193..0000000000
--- a/help/C/figures/full-4.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-5.png b/help/C/figures/full-5.png
deleted file mode 100644
index 5fcfd20e45..0000000000
--- a/help/C/figures/full-5.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-6.png b/help/C/figures/full-6.png
deleted file mode 100644
index 484eca4903..0000000000
--- a/help/C/figures/full-6.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/full-7.png b/help/C/figures/full-7.png
deleted file mode 100644
index 8a19eaab42..0000000000
--- a/help/C/figures/full-7.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/mail-composer.png b/help/C/figures/mail-composer.png
deleted file mode 100644
index d85f632b64..0000000000
--- a/help/C/figures/mail-composer.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/mail-druid-pic.png b/help/C/figures/mail-druid-pic.png
deleted file mode 100644
index 18e29aa49d..0000000000
--- a/help/C/figures/mail-druid-pic.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/mail-inbox.png b/help/C/figures/mail-inbox.png
deleted file mode 100644
index 7659cb003a..0000000000
--- a/help/C/figures/mail-inbox.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/mail-threaded.png b/help/C/figures/mail-threaded.png
deleted file mode 100644
index 1b1da138f9..0000000000
--- a/help/C/figures/mail-threaded.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/mainwindow-pic.png b/help/C/figures/mainwindow-pic.png
deleted file mode 100644
index 18b68c96a5..0000000000
--- a/help/C/figures/mainwindow-pic.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/newmsg.png b/help/C/figures/newmsg.png
deleted file mode 100644
index fc960d9155..0000000000
--- a/help/C/figures/newmsg.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/print-dest.png b/help/C/figures/print-dest.png
deleted file mode 100644
index fb1faf7d70..0000000000
--- a/help/C/figures/print-dest.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/print-preview.png b/help/C/figures/print-preview.png
deleted file mode 100644
index 51ab5e795e..0000000000
--- a/help/C/figures/print-preview.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/replymsg.png b/help/C/figures/replymsg.png
deleted file mode 100644
index fc3ec6b599..0000000000
--- a/help/C/figures/replymsg.png
+++ /dev/null
Binary files differ
diff --git a/help/C/figures/vfolder-createrule-fig.png b/help/C/figures/vfolder-createrule-fig.png
deleted file mode 100644
index 733ed1f7cf..0000000000
--- a/help/C/figures/vfolder-createrule-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/C/menuref.sgml b/help/C/menuref.sgml
deleted file mode 100644
index bc5008f68d..0000000000
--- a/help/C/menuref.sgml
+++ /dev/null
@@ -1,372 +0,0 @@
-<!--
-<!DOCTYPE Appendix PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<appendix id="menuref">
- <title>Quick Reference</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>Ximian Evolution</application>.
- </para>
-
-
-<note id="shortcuts">
-<title>Custom Keyboard Shortcuts</title>
-<para>
- If you have set custom keyboard shortcuts for your desktop, (you can
- do this the control center: select
- <menuchoice><guimenu>System</guimenu><guimenuitem>Settings</guimenuitem></menuchoice>
- from your menu panel), they may interfere with Evolution keyboard
- shortcuts.
-</para>
-<para>
- For example, if you have chosen Emacs-style key bindings for your
- desktop-wide text editor, the shortcut
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>W</keycap>
- </keycombo>
- will act as "Cut region" rather than as "Close Window" in the
- message composer.
-</para>
-</note>
-
-
-
-
- <sect1 id="quickref-open">
- <title>Opening or Creating Anything</title>
- <para>
- <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>E</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>
- Double-click in any blank space in the contact
- manager to create a new address card. You can also
- use
- <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>
- </sect1>
- <sect1 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>Send and Receive Mail</term>
- <listitem>
- <para>
- Press <keycap>F9</keycap>, click the
- <guibutton>Send/Receive</guibutton> button in the
- toolbar, or choose
- <menuchoice><guimenu>Actions</guimenu>
- <guimenuitem>Send/Receive</guimenuitem></menuchoice>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Navigating the Message List with the Keyboard</term>
- <listitem>
- <para>
- Press <keycap>N</keycap> to jump to the next unread
- message. <keycap>P</keycap> goes to the previous
- unread message. Use the arrow keys to move up
- and down along the list of all message.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Move the display up and down in the preview pane</term>
- <listitem>
- <para>
- Press the space bar to go a page down. Press
- <keycap>Backspace</keycap> to go a page up.
- </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>F</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>
- Right-click on a message and select
- <guimenuitem>Create Rule From
- Message</guimenuitem>. You can also create filters and
- virtual folders in the <guimenu>Tools</guimenu> menu.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Add Sender to Address Book</term>
- <listitem>
- <para>
- Right-click on a message and select <guimenuitem>Add
- Sender to Address Book</guimenuitem>. You can also
- right-click on any email address to add it to your
- address book.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
-
- </para>
- </sect1>
- <sect1 id="quickref-cal">
- <title>Calendar</title>
- <para>
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- <tip id="new-appt">
- <title>New Appointments Fast</title>
- <para>
- Click on any blank spot in the calendar and start
- typing to create a new appointment entry.
- </para>
- </tip>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect1>
- <sect1 id="quickref-contact">
- <title>Contact Manager</title>
- <para>
- Here are the most frequent tasks that are done in the Contact Manager,
- with the shortcuts so that you can use these tasks without having to use
- your mouse:
-
- <variablelist>
- <varlistentry>
- <term>Edit a Contact</term>
- <listitem>
- <para>
- You can edit a contact two ways:
- <itemizedlist>
- <listitem>
- <para>
- Click once on the person's address card and you can
- edit the person's properties all in the same window.
- </para>
- </listitem>
- <listitem>
- <para>
- Double-click on the contact's card and alter their details.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <variablelist>
- <varlistentry>
- <term>Deleting a Contact</term>
- <listitem>
- <para>
- Right click on a contact and click <guilabel>Delete</guilabel>
- or select a contact and press the <guibutton>Delete</guibutton>
- on the <guilabel>toolbar</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
- <variablelist>
- <varlistentry>
- <term>Email a Contact</term>
- <listitem>
- <para>
- Right click on a contact and select
- <guilabel>Send message to contact</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <variablelist>
- <varlistentry>
- <term>Creating a New Contact</term>
- <listitem>
- <para>
- Double-click in any blank space in the contact
- manager to create a new address card. You can also
- use <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>
- </variablelist>
- </para>
- </sect1>
-</appendix> \ No newline at end of file
diff --git a/help/C/preface.sgml b/help/C/preface.sgml
deleted file mode 100644
index 839dbdcb93..0000000000
--- a/help/C/preface.sgml
+++ /dev/null
@@ -1,69 +0,0 @@
-<!--
-<!DOCTYPE preface PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
- <preface id="introduction">
- <title>About this Book</title>
- <sect1 id="organization">
- <title>Organization</title>
- <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.
- </para>
- </sect1>
-
- <sect1 id="typography">
- <title>Typographical conventions</title>
- <para>
- In this book, we'll mark some words with special typography:
- <simplelist>
- <member><application>Applications</application></member>
- <member><command>Commands</command> you type at the command line</member>
- <member><guilabel>Labels</guilabel> for </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>
- <tip id="example-tip">
- <title>Example Tip</title>
- <para>
- Tips and bits of extra information will look like
- this.
- </para>
- </tip>
-
- <example>
- <title>Example Example</title>
- <para>
- This is what an example looks like.
- </para>
- </example>
-
- <warning id="example-warning">
- <title>Example Warning</title>
- <para>
- This is what a warning looks like.
- </para>
- </warning>
- </para>
- </sect1>
-</preface>
-
diff --git a/help/C/topic.dat b/help/C/topic.dat
deleted file mode 100644
index b90b0f04be..0000000000
--- a/help/C/topic.dat
+++ /dev/null
@@ -1,10 +0,0 @@
-index.html Table of Contents
-introduction.html What is Evolution?
-usage-mainwindow.html Getting Started
-usage-exec-summary.html The Evolution Summary
-usage-mail.html Getting and Sending Email
-usage-contact.html Using the Contact Manager
-usage-calendar.html Managing Your Schedule
-config-prefs.html Configuring Evolution
-menuref.html Quick Reference
-apx-gloss.html Glossary \ No newline at end of file
diff --git a/help/C/usage-calendar.sgml b/help/C/usage-calendar.sgml
deleted file mode 100644
index 41a5abd2b7..0000000000
--- a/help/C/usage-calendar.sgml
+++ /dev/null
@@ -1,499 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-calendar">
- <title>Managing your Schedule</title>
-
- <para>
- This chapter will show you how to use the Ximian Evolution
- Calendar to manage your schedule alone or in conjunction with
- others.
-<!-- Others what? -->
- </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:
- <itemizedlist>
- <listitem>
- <para>
- Day
- </para>
- </listitem>
- <listitem>
- <para>
- Work Week
- </para>
- </listitem>
- <listitem>
- <para>
- Week
- </para>
- </listitem>
- <listitem>
- <para>
- Month
- </para>
- </listitem>
- </itemizedlist>
-
- Press the calendar-shaped buttons on the right side of the toolbar to
- switch between views.
-<!--QUESTION What does the following mean? I can't find this functionality -->
- You can also select a range of
- days&mdash; three days, ten days, or 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>
-
- </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
- appointments, set alarms, and determine appointment recurrence.
- </para>
-
- <sect2 id="usage-calendar-apts-basic">
- <title>Creating appointments</title>
- <para>
- To create a new appointment, 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 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 appointment 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 appointment list, in the grey header under the date, rather than inside
- it. That makes it easy to have appointments that overlap and fit
- inside each other. For example, a conference might be an all
- day appointment, and the meetings at the conference would be timed
- appointments. Of course, appointments 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>Multiple Simultanious Appointments</title>
- <para>
- If you create calendar appointments 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 appointment
- you've scheduled. You can have one alarm of each of the following types:
- <variablelist>
- <varlistentry>
- <term><guilabel>Display</guilabel></term>
- <listitem>
- <para>
- A window will pop up on your screen to remind you of
- your appointment.
- </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>
- only applies to calendars on a
- network. <guilabel>Public</guilabel> is the default category,
- and a public appointment can be viewed by anyone on the calendar
- sharing network. <guilabel>Private</guilabel> denotes one
- level of security, and <guilabel>Confidential</guilabel> an even
- higher level.
- </para>
- <para>
- <application>Evolution</application> lets you categorize your
- appointments, which can help if you lead a busy life. The bottom
- section of the <guilabel>Appointment</guilabel> tab is where your
- categorization is done.
- </para>
-
- <tip>
- <title>Adding a New Appointment Category</title>
- <para>
- You can add a new category to your category list by clicking on
- <guibutton>Edit Master Category List</guibutton> and single-clicking
- on <guilabel> Click here to add a category</guilabel>.
- </para>
- </tip>
-
- <para>
- The purpose of categories is to let you view all appointments which have
- similar activities. To do this, change <guilabel>Any field contains</guilabel>
- to <guilabel>Has category</guilabel> and enter your category at right.
- </para>
-
- <para>
- Clicking on the <guibutton>Categories</guibutton> button opens up the category
- list. To associate a category to an appointment, simply click the check box.
- </para>
- <para>
- Once you've selected your categories, click <guibutton>OK</guibutton> to
- assign these categories to the appointment. The categories you selected are now
- listed in the text box to the right of the <guibutton>Categories...</guibutton>
- button.
- </para>
-
- <para>
- The <guilabel>Recurrence</guilabel> tab lets you describe
- repetition in appointments ranging from once every day up to once
- every 100 years. You can then choose a time and date when the
- appointment will stop recurring, and, under
- <guilabel>Exceptions</guilabel>, pick individual days when the
- appointment 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 to save and close the appointment editor window.
- If you want, you can alter an appointment
- summary in the calendar view by clicking on it and typing. You
- can change other settings by right-clicking on the appointment then
- choosing <guimenuitem>Edit this Appointment</guimenuitem>.
- </para>
- </sect2>
- <sect2 id="usage-calendar-rsvp">
- <title>Sending an RSVP with the Calendar</title>
- <para>
- <application>Evolution</application> can be used to setup group appointments
- and help you manage RSVPs.
- </para>
- <para>
- When you setup a gathering, you can specify people to come in numerous
- positions, such as chair. They are sent an email which lets them
- easily reply to you with their response. If they aren't sure if they
- can attend, they can always reply to the mail later.
- </para>
- <para>
- To select receipients to be invited to an event:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Actions</guimenu>
- <guimenuitem>Schedule Meeting</guimenuitem>
- </menuchoice>. The <guilabel>Scheduling</guilabel> and <guilabel>Meeting</guilabel> tab open.
- </para>
- </listitem>
- <listitem>
- <para>
- If you have multiple identities setup, select the identity to use in the <guilabel>Sent By</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Click in the white box.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Invite Others</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select a person in the <guilabel>Contacts</guilabel> field and click one of the four choices to move them to be an RSVP reciever.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Save the Appointment.
- </para>
- </listitem>
- </orderedlist>
- An email is now sent out to all the recipients, inviting them to your event.
- </para>
- </sect2>
- <sect2 id="replying-to-rsvp">
- <title>Replying to an RSVP</title>
- <para>
- If you recieve an RSVP, the RSVP will be attached as an ical file. Click on the attachment and view it inline. All the details are shown about the event including time and dates. Then you can choose how to reply to the RSVP. Your choices are:
- <itemizedlist>
- <listitem>
- <para>
- Accept
- </para>
- </listitem>
- <listitem>
- <para>
- Tentativly Accept
- </para>
- </listitem>
- <listitem>
- <para>
- Decline
- </para>
- </listitem>
- </itemizedlist>
- Click <guibutton>OK</guibutton> and an email will be sent to the organizer with your answer. The event will also be added to your calendar if you accept.
- </para>
- </sect2>
-
- <sect2 id="recieving-rsvp-response">
- <title>Recieving an RSVP Response</title>
- <para>
- Once you recieve an RSVP, you'll need to view it inline in the email. Click the attachment and select <guibutton>View Inline</guibutton>. At the bottom, you can choose an action. Click <guibutton>OK</guibutton> to update your attendee list.
- </para>
- </sect2>
-
-<!-- ############UNIMPLEMENTED FEATURES ###################
-
- <sect2 id="usage-calendar-apts-group">
- <title>Appointments for Groups</title>
- <para>
- 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 appointment</interface> window. Then
- describe the appointment as you would any other. When you are
- ready to send the invitation <guibutton>OK</guibutton>
- <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 appointment on your calendar and on
- theirs as tentative, rather than a confirmed, appointment.
- </para>
- <para>
- To mark a tentative appointment as confirmed, click once on the
- appointment in the <interface>calendar view</interface> to select
- it, and then choose <guimenuitem>Appointment
- Properties</guimenuitem> from the <guimenu>Settings</guimenu>
- menu. In the <interface>Appointment Properties</interface> dialog
- window, click the "tentative" button to De-select the
- appointment.
- </para>
- <para>
- When your meeting attendees get the email inviting them to the
- meeting, they'll be able to enter the information into their
- calendars and let you know if they'll be able to attend; if
- they use <application>Ximian Evolution</application> or
- another iCal compliant mail client, they can do this with just
- one click. When you get a response from them, it will include
- an iCal attachment. Opening and accepting this attachment will
- change the meeting data in your calendar to indicate that they
- have responded to your invitation, and whether they will be in
- attendance.
- </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 appointments. 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 in the toolbar. <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>Start Date</guilabel></term>
- <listitem>
- <para>
- The date you intend to start working. <!-- NOTE Check this please --> The item will not show up on the list until the start date.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Description:</guilabel></term>
- <listitem>
- <para>
- If you wish, you can keep a more detailed description of
- the item here. For example, you can note that a task is
- in progress, and display how close it is to completion.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Classification</guilabel></term>
- <listitem>
- <para>
- Sets who will see it if your calendar is shared.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- There are more options in the <guilabel>Details</guilabel> tab such as priority and progress settings.
- </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>
- <para>
- The list of tasks is sorted in a similar way to the list of
- email messages in <application>Ximian Evolution
- Mail</application>. Click once on the message headers to change
- the direction and type of sorting, or right-click to add or
- remove columns from the display.
- </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 Cubs are
- playing.
- </para>
- </example>
- <para>
- To create a new calendar, select
- <menuchoice>
- <guimenu>File</guimenu> <guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem>
- </menuchoice>.
- You'll need to tell the <guilabel>New Folder</guilabel> dialog that the new folder should be of the calendar type. 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/help/C/usage-contact.sgml b/help/C/usage-contact.sgml
deleted file mode 100644
index 5a49602374..0000000000
--- a/help/C/usage-contact.sgml
+++ /dev/null
@@ -1,628 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-contact">
- <title>Working with Your Contacts</title>
- <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>
-
- <para>
- The toolbar for the address book is quite simple.
- <itemizedlist>
- <listitem><para>
- Click <guibutton>New Contact</guibutton> to create a new card, or double-click
- in a blank space in the contact list.
- </para></listitem>
-
- <listitem><para>
- Click <guibutton>New List</guibutton> to create a new card, or double-click
- in a blank space in the contact list.
- </para></listitem>
-
- <listitem><para> The <guiicon>printer</guiicon> icon sends one
- or more of your cards to the printer. </para></listitem>
-
- <listitem><para> The <guiicon>stop sign</guiicon> icon 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 to 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>
-
- <sect1 id="usage-contact-cards">
- <title>The Contact Editor</title>
- <para>
- To delete a contact:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click once on the contact.
- </para>
- </listitem>
- <listitem>
- <para>
- Press the <guibutton>Delete</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </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. If you want to create a new
- card, 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 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>
- <mediaobject><imageobject><imagedata
- fileref="figures/contact-editor" format="png" srccredit="Aaron
- Weber">
- </imageobject></mediaobject>
- </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>
- </itemizedlist>
- </para>
- <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 in, 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>
- </varlistentry>
- <varlistentry>
- <term>Multiple Values for Fields</term>
- <listitem>
- <para>
- If you click on the downward pointing triangle 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. Entries that have information in them have
- a check mark next to them. The 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 much simpler:
- <itemizedlist>
- <listitem>
- <para>
- The briefcase - Describes the person's professional life
- </para>
- </listitem>
- <listitem>
- <para>
- The face - Describes the person's personal life
- </para>
- </listitem>
- <listitem>
- <para>
- The globe - Miscellanious notes
- </para>
- </listitem>
- </itemizedlist>
-
- <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.
- </para>
- </tip>
- </para>
- </sect1>
-
- <sect1 id="contact-search">
- <title>Searching for Contacts</title>
- <para>
- <application>Evolution</application> allows searching through contacts
- quickly and easily.
- </para>
- <para>
- To search through contacts:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select your search focus in the search bar.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter your query.
- </para>
- </listitem>
- <listitem>
- <para>
- Press return to search.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can refine searches by doing several in
- succession, or start over by pressing the <guibutton>Show
- 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>
- To perform a complex search through your contacts:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Search for contacts</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Name the rule in the <guilabel>Rule Name</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Setup your criteria information in the <guilabel>If</guilabel> section.
- </para>
- </listitem>
- <listitem>
- <para>
- If you want to add more critera, click the <guibutton>Add
- Criterion</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Search</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- To show all your contacts, select <guibutton>Show All</guibutton> in the
- <guilabel>Search Bar</guilabel> or search with an empty query.
- </para>
-
- </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 Virtual Folders. 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 mail folders do. For more
- flexibility, you can also mark contacts as elements of
- different categories. To better integrate with email tools,
- you can also create lists of contacts that you can send mail
- to as a single person.
- </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.
- 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>
-
- <!-- 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>
-
- <sect3 id="usage-contact-organize-group-list">
- <title>Creating a List of Contacts</title>
- <para>
- To create a list of contacts:
-
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open the list creation dialog box by clicking the
- <guibutton>New List</guibutton> button or selecting
- <menuchoice>
- <guimenu>
- File
- </guimenu>
- <guisubmenu>
- New
- </guisubmenu>
- <guimenuitem>
- Contact List
- </guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Enter a name for the list.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter names or email addresses of contacts, or just
- drag contacts from the main window into the list.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Choose whether you would like to hide the email
- addresses when you send a message to the list.
- Unless it is a very small list, it is recommended
- that you leave the addresses hidden. This is the
- same thing as using the "Bcc:" feature discussed in
- <xref linkend="usage-mail-getnsend-send-to-types">.
- </para>
- </listitem>
-
- </orderedlist>
- </para>
- <para>
- When you are done, click <guibutton>OK</guibutton>. The
- list will appear as a contact card, which you can use as
- you would any other. That includes emailing the list to
- another person, and, of course, sending email to the list.
- </para>
- <para>
- To mail the list, open a new email and type the name you
- chose for the list. Ximian Evolution will address the
- message to the entire list when you send it. You can also
- right-click on the list's address card in the Contact
- Manager and select <guimenuitem>Send Message to
- List</guimenuitem>.
- </para>
- </sect3>
-
-
- </sect2>
- </sect1>
-
-<!-- we need a LDAP server up for me to test this -->
- <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 peoples 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
- you share calendars as well as address books, people can avoid
- duplicating work and keep up to date on developments within
- their workgroup 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="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> can also add cards from a
- hand-held device during HotSync operation. For more
- information about that, see <xref linkend="usage-sync">.
- </para>
- </sect1>
-
- <sect1 id="contact-automation-lists">
- <title>Sending Mail to Categories of Contacts</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>
- -->
-
- </sect1>
-
- <!--- FIXME this feature not yet implemented
- <sect1 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>
- -->
-
-
-
-</chapter>
diff --git a/help/C/usage-encryption.sgml b/help/C/usage-encryption.sgml
deleted file mode 100644
index e36f17c652..0000000000
--- a/help/C/usage-encryption.sgml
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[]>
-
-<article>
-
- <sect1 id="encryption-intro">
- <title>What is Encryption?</title>
- <para>
- Encryption is an ancient method of changing readable text to unreadable
- text that dates back to Egyptian times. Encryption takes the statement
- "Evolution" and turns it into something which cannot be read without help
- through decryption.
- <example>
- <title>Encryption Example</title>
- <para>
- Kevin orders an <application>Evolution</application> t-shirt from
- Ximian, Inc. over the internet. He puts in his credit card number
- which is 1234-567-8901. For security, his computer encrypts the
- credit card number so it can be safely transmitted over the internet.
- The number now is @#$23ui7yr87#@!48970fsd, which holds no intentional
- resemblance to the inital number. When the information gets to
- Ximian, Inc. it'll be decrypted into the inital number.
- </para>
- </example>
- Encryption can be used in email in two ways: to verify that the sender is
- the real sender, and to hide the message while in transmission.
- <application>Evolution</application> has the capability to do both.
- </para>
- </sect1>
- <sect1 id="generating-key">
- <title>Generating your PGP key</title>
- <para>
- First, you need to create a PGP key. To do this, you'll need GPG
- installed.
- </para>
- <tip>
- <title>GPG Versions</title>
- <para>
- This manual covers version 1.0.6 of GPG. If your version is different,
- this may not be entirely accurate. You may find out your version number
- by typing in: <command>gpg --version</command>.
- </para>
- </tip>
- <para>
- You can start by typing in: <command>gpg --gen-key</command>. At the
- first question, select 1. The next question asks you about key length.
- The longer the key, more stronger it is. However, the longer the key, the
- longer it takes to generate. This is your choice. However, 1024 bits
- (default) should be adequate. The next question asks you if you want your
- key to expire. Expiring keys make your key invalid after a certain amount
- of time, so old keys don't float around active. This is the same concept
- as a coupon at a supermarket. Next, you'll type in your Real name, your
- email address, and a comment. You should not forge this information, as
- it is used later to verify who you are. Assuming that all your
- information is correct, press "O" to continue. GPG now asks you for a
- passphrase. This is a password which you will need to decrypt and encrypt
- messages. This can be any length, with any characters in it. It is case
- sensitive, which means that it does know the difference between capital
- letters and lower-case. Now your key is generated. It is recommend you
- surf the internet, read your email, or write a letter in a word
- processor. This help creates randomness in the key.
- </para>
- <para>
- Once this is completed, you'll be dropped back to the command line.
- Now you can view your key information by typing <command>gpg
- --list-keys</command>. You should see something similar to this:
- <example id="gpg-list-keys">
- <title>GPG Listing Keys</title>
- <para>
- /home/bob/.gnupg/pubring.gpg
- ----------------------------
- pub 1024D/32j38dk2 2001-06-20 bob &lt;bob@bob.com&gt;
- sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
- </para>
- </example>
- You'll now need to upload your public key to a keyserver, so that your
- friends can use your key. You'll need to know the ID of your key, which
- is after the 1024D on the line beginning with pub. For this example, it
- is 32j38dk2. You now type in <command>gpg --send-keys --keyserver
- wwwkeys.pgp.net 32j38dk2</command>. Substitute your key ID for 32j38dk2.
- You will be prompted to type in your password <!-- verify that you need to
- enter your password here --> and your key will be uploaded for your
- friends to download.
- </para>
- </sect1>
- <sect1 id="encrypt-evo-integ">
- <title>Setting up Evolution's Encryption</title>
- <para>
- You'll need to open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- Once there, select the account you'd like to associate the key to and click
- the <guibutton>Edit</guibutton> button. In the
- <guilabel>Security</guilabel> tab is a section labeled <guilabel>Pretty
- Goog Privacy</guilabel>. Enter your key ID and click
- <guibutton>OK</guibutton>. Your key is now integrated into your identity
- in <application>Evolution</application>.
- </para>
- </sect1>
- <sect1 id="encrypt-sending">
- <title>Sending Encrypted Messages</title>
- <para>
- You can either sign or encrypt a message. When you sign a message, verify
- that you were the one who sent it, and that no one is forging your
- identity. Encrypting a message makes it impossible for someone with
- prying eyes to view it while it's in tranmission.
- </para>
- <para>
- <sect2 id="sign-msg">
- <title>Signing a Message</title>
- <para>
- To sign a message, you simply click
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Sign</guimenuitem>
- </menuchoice>
- . You will be prompted for your PGP password. Once you enter it,
- click <guibutton>OK</guibutton> and your message will be signed.
- </para>
- </sect2>
- <sect2 id="encrypt-msg">
- <title>Encrypting a Message</title>
- <para>
- Encrypting a message is very similar to signing a message. You simply
- click the menu item
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Encrypt</guimenuitem>
- </menuchoice>
- </para>
- </sect2>
- </para>
- </sect1>
- <sect1 id="unencrypting">
- <title>Unencrypting a Recieved Message</title>
- <para>
- Sometimes, a friend will send you a message which is encrypted. In order
- for you to read it, you need to unencrypt it.
- </para>
- <para>
- When you view the encrypted message, <application>Evolution</application>
- will prompt you for your PGP password. You type in your PGP password and
- the message is then decrypted.
- </para>
- </sect1>
- </article>
diff --git a/help/C/usage-exec-summary.sgml b/help/C/usage-exec-summary.sgml
deleted file mode 100644
index be59cb389d..0000000000
--- a/help/C/usage-exec-summary.sgml
+++ /dev/null
@@ -1,312 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-summary">
- <title>Using the Ximian Evolution Summary</title>
-
- <sect1 id="summary-intro">
- <title>Introducing the Summary</title>
- <para>
- The Ximian Evolution Summary can show you what you need to know
- quickly. It will show you your tasks for that day, how many
- emails are waiting for you, and much more.
- </para>
- <para>
- To begin using your Summary, click on the <guilabel>Shortcut
- Bar</guilabel> or <guilabel>Summary</guilabel> at the top of the
- <guilabel>Folder Bar</guilabel>. By default, you will see:
- <itemizedlist>
- <listitem>
- <para>
- Weather Reports
- </para>
- </listitem>
- <listitem>
- <para>
- News feeds from the Internet
- </para>
- </listitem>
- <listitem>
- <para>
- Your mail summary, showing you how many new emails are
- waiting in selected mail boxes.
- </para>
- </listitem>
- <listitem>
- <para>
- Appointments
- </para>
- </listitem>
- <listitem>
- <para>
- Tasks
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
- <sect1 id="customizing-summary">
- <title>Customizing the Summary's Modules</title>
- <para>
- <application>Evolution's</application> modules can be customized
- to suit your needs. For example, you can choose which mail
- boxes are summarized, and which news services appear.
- </para>
-
-
- <note id="summary-http-proxy">
- <title>Using the Summary through an HTTP Proxy</title>
- <para>
- If you use an HTTP proxy, <application>Ximian
- Evolution</application> must be able to find it through the
- <systemitem>gnome-vfs</systemitem> subsystem before it can
- access news and weather from the Internet. This is also
- the case if you wish to load remote images into HTML mail
- message. You can tell the GNOME Virtual File System about
- your HTTP proxy in one of two ways:
- <variablelist>
- <varlistentry>
- <term>Configure it with Nautilus</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a Nautilus window
- </para>
- </listitem>
- <listitem>
- <para>
- Select <menuchoice>
- <guimenu>Preferences</guimenu>
- <guimenuitem>Edit Preferences</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Go to the <guilabel>Navigation</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guilabel>Use HTTP Proxy</guilabel>
- checkbox and enter the location of your HTTP
- proxy in the <guilabel>Location</guilabel> field.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Configure it with the gconftool command</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a terminal.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command
- <command>
- gconftool --type=bool --set /system/gnome-vfs/use-http-proxy "TRUE"
- </command>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command
- <command>
- gconftool --type=string --set /system/gnome-vfs/http-proxy-host "your-proxy-url"
- </command>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command
- <command>
- gconftool --type=int --set /system/gnome-vfs/http-proxy-port "8080"
- </command>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- For more information about the gconftool command,
- read the gconftool man page.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </note>
-
-
- <sect2 id="customizing-summary-weather">
- <title>Customizing the Weather Summary</title>
- <para>
- To add a city to be displayed in the weather:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <guilabel>Summary</guilabel> in the <guilabel>Shortcut Bar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Summary Settings</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guilabel>Weather</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the city on the left hand column.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Add</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- <tip id="measurments">
- <title>Metric or Imperial?</title>
- <para>
- <application>Evolution</application> supports both
- Imperial and Metric measurement for weather reports.
- </para>
- </tip>
- </para>
- </sect2>
- <sect2 id="customizing-feeds">
- <title>Customizing Your News Feeds</title>
- <para>
- To customize your news feeds:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <guilabel>Summary</guilabel> in the <guilabel>Shortcut Bar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Summary Settings</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guilabel>News Feeds</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the news news feed on the left column.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Add</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="customizing-mail">
- <title>Customizing Your Mail Summary</title>
- <para>
- To customize your mail summary:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <guilabel>Summary</guilabel> in the <guilabel>Shortcut Bar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Summary Settings</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Mail</guibutton> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the mail folder you want to see in the preview on the left.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Add</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="customizing-cal">
- <title>Customizing Your Schedule Summary</title>
- <para>
- To customize your calendar summary:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click <guilabel>Summary</guilabel> in the <guilabel>Shortcut Bar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Summary Settings</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Schedule</guibutton> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose whether you'd like appointments displayed for one
- day, five days, a week, or a month.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose whether you'd like to display all tasks, or just
- the tasks due today.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-</chapter> \ No newline at end of file
diff --git a/help/C/usage-mail-org.sgml b/help/C/usage-mail-org.sgml
deleted file mode 100644
index 3e806b0ba8..0000000000
--- a/help/C/usage-mail-org.sgml
+++ /dev/null
@@ -1,794 +0,0 @@
-<chapter id="usage-mail-organize">
- <title>Organizing and Managing your Email</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>Ximian Evolution</application> has the tools
- to help you do it.
- </para>
-
- <sect1 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, 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.
-
- To add columns:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Right click on the column header
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guimenuitem>Add a Column</guimenuitem>
- </para>
- </listitem>
- <listitem>
- <para>
- Click and drag a column you want into a space between
- existing column headers. A red arrow will show you where
- the column will be placed.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- Right-click on one of the column headers to get a list of
- options:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Sort Ascending</guimenuitem></term>
- <listitem><para>
- Sorts the messages top to bottom.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Sort Descending</guimenuitem></term>
- <listitem><para>
- Sorts the messages bottom to top.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Group By this Field</guimenuitem></term>
- <listitem><para>
- Groups messages instead of sorting them. This makes each contact
- with identical properties in the specified field to be placed in
- its own group and physically separated from others.
- </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>
- When you choose this item, a list
- of column headers will appear; 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>
- </sect1>
-
- <sect1 id="usage-mail-organize-folders">
- <title>Getting Organized with Folders</title>
- <para>
- <application>Ximian 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>Ximian 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
- filed automatically.
- </para>
- </sect1>
-
- <sect1 id="usage-mail-organize-search">
- <title>Searching for Messages</title>
- <para>
- Most mail clients can search through your messages for you,
- but <application>Ximian 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>Ximian 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 vFolder</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 vFolders in the next few sections.
- </para>
-
- </sect1>
-
- <sect1 id="usage-mail-organize-filters">
- <title>Create Rules to Automatically Organize Mail</title>
- <para>
- Filters work very much like the mail room in a large company.
- Their purpose is to bundle, sort, and distribute mail to the
- various folders. 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 quickly. Of
- course, it's also faster and more flexible than an actual
- person with a pile of envelopes.
- </para>
-
- <sect2 id="usage-mail-org-filters-new">
- <title>Making New Filters</title>
- <para>
- To create a new filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Filters</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Press the <guibutton>Add</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Name your filter in the <guilabel>Rule name</guilabel> field.
- For each filter criterion, you must first select
- which of the following parts of the message you want the filter to
- examine:
-
- <itemizedlist>
- <listitem><para>
- Sender - The sender's address.
- </para></listitem>
-
-
- <listitem><para>
- Recipients - The recipients of the message.
- </para></listitem>
-
- <listitem><para>
- Subject - The subject line of the message.
- </para></listitem>
-
- <listitem><para>
- Specific Header - 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>
-
- <listitem><para>
- Message Body - Search in the actual text of the message.
- </para></listitem>
-
- <listitem>
- <para>
- Expression - For programmers only: match a message according to an
- expression you write in the Scheme language, used to
- define filters in <application>Ximian Evolution</application>.
- </para>
- </listitem>
-
- <listitem><para> Date sent - Filter messages according to the date on
- which 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>
-
- <listitem><para>
- Date Recieved - 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>
-
- <listitem><para>
- Score - 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>
-
- <listitem>
- <para>
- Size (kb) - Sorts based on the size of the message in kilobytes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Status - Filters according to the status of a message, such as
- 'New'.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Attachments - Create a filter based on whether or not you
- have an attachment in the email.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Mailing List - Filter based on the mailing list it came from.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Regex Match - If you know your way around a <glossterm
- linkend="regular-expression">regex</glossterm>, or
- regular expression, put your knowledge to use here.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Source Account - 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>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the criterion for the condition. If you want multiple
- criteria for this filter, press <guibutton>Add
- criterion</guibutton> and repeat the previous step.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the actions for the filter in the <guilabel>Then</guilabel>
- section. You can select any of the following options.
- <itemizedlist>
- <listitem><para>
- Move to Folder - If you select this item, <application>Ximian 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>
-
- <listitem><para>
- Copy to Folder - If you select this item, <application>Ximian 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>
-
- <listitem><para>
- Forward to Address - Select this, enter an address, and the addressee will
- get a copy of the message.
- </para></listitem>
-
- <listitem><para>
- Delete - Marks the message for deletion. You can still get the message
- back, at least until you <guimenuitem>Expunge</guimenuitem> your
- mail yourself.
- </para></listitem>
-
- <listitem><para>
- Stop Processing - 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>
-
- <listitem><para>
- Assign Color - Select this item, and <application>Ximian Evolution</application>
- will mark the message with whatever color you please.
- </para></listitem>
-
- <listitem><para>
- Assign Score - 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>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Set Status - If you want to add multiple actions for this filter, press
- <guibutton>Add filter</guibutton> and repeat the previous step.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
-
- <sect2 id="filters-edit">
- <title>Editing Filters</title>
- <para>
- To edit a filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenu>Filters</guimenu>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the filter in the <guilabel>Filter Rules</guilabel> section
- and press <guibutton>Edit</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change the desired settings.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton> in the filter editor window.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton> in the filter manager window.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
-
- <sect2 id="filters-deleting">
- <title>Deleting Filters</title>
- <para>
- To delete a filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenu>Filters</guimenu>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the filter and press <guibutton>Delete</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- <note>
- <title>Changing Folder Names and Filters</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. So be sure to change the filters that go with it.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </note>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-organize-vfolders">
- <title>Getting Really Organized with vFolders</title>
- <para>
- If filters aren't flexible enough for you, or you find
- yourself performing the same search again and again, consider
- a vFolder. vFolders, or virtual folders, are an advanced way
- of viewing your email messages within
- <application>Ximian Evolution</application>. If you get a lot of
- mail or often forget where you put messages, vFolders
- can help you stay on top of things.
- </para>
- <para>
- A vFolder 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 vFolder 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 vFolder criteria arrive or are
- deleted, <application>Ximian Evolution</application> will
- automatically place them in and remove them from the
- vFolder contents list. When you delete a message, it gets
- erased from the folder in which it actually exists, as well as
- any vFolders 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. vFolders
- make for better organization because they can accept
- overlapping groups in a way that regular folders and filing
- systems can't.
- </para>
-
-
- <note id="unmatched-vfolder">
- <title>The Unmatched vFolder</title>
- <para>
- Obviously, not all messages will fit into all your Virtual
- Folders. That's why <application>Ximian Evolution</application>
- includes an UNMATCHED vFolder. The UNMATCHED
- vFolder displays messages that are not matched by other rules.
- </para>
- </note>
-
-
- <example id="usage-mail-organize-vFolders-ex">
- <title>Using Folders, Searches, and vFolders</title>
- <para>
- To organize his mailbox, Jim sets up a virtual volder for emails from
- his friend and co-worker Anna. He has another one for messages that
- have ximian.com in the address and <application>Ximian Evolution</application> in the subject line, so he
- can keep a record of what people from work send him about
- <application>evolution</application>. If Anna sends him a message about
- anything other than <application>Ximian Evolution</application>, it only shows up in the "Anna" folder.
- When Anna sends him mail about the user interface for
- <application>evolution</application>, he can see that message both in
- the "Anna" vFolder and in the "Internal Evolution Discussion"
- vFolder.
- </para>
- </example>
-
- <!-- (INSERT SCREENSHOT HERE: vFolders in action) -->
-
- <sect2 id="vfolder-create">
- <title>Creating vFolders</title>
- <para>
- To create a vFolder:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>vFolder Editor</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Add</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Name your vFolder in the <guilabel>Rule name</guilabel> field.
-
- </para>
- </listitem>
- <listitem>
- <para>
- Select your search criteria. For each criterion, you
- must first select which of the following parts of the
- message you want the search to examine:
- <itemizedlist>
- <listitem><para>
- Sender - The sender's address.
- </para></listitem>
-
-
- <listitem><para>
- Recipients - The recipients of the message.
- </para></listitem>
-
- <listitem><para>
- Subject - The subject line of the message.
- </para></listitem>
-
- <listitem><para>
- Specific Header - The vFolder 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>
-
- <listitem><para>
- Message Body - Search in the actual text of the message.
- </para></listitem>
-
- <listitem>
- <para>
- Expression - For programmers only: match a message according to an
- expression you write in the Scheme language, used to
- define vFolders in <application>Ximian Evolution</application>.
- </para>
- </listitem>
-
- <listitem><para> Date sent - Search messages according to the date on
- which 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 vFolder 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>
-
- <listitem><para>
- Date Recieved - 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>
-
- <listitem><para>
- Score - Emails have a standard priority range from -3 (least
- important) to 3 (most important). You can have vFolders set the
- priority of messages you recieve, and then have other
- vFolders
- applied only to those messages which have a certain priority.
- </para></listitem>
-
- <listitem>
- <para>
- Size (kb) - Sorts based on the size of the message in kilobytes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Status - Searches according to the status of a message, such as
- 'New'.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Attachments - Create a vFolder based on whether or not you have an
- attachment in the email.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Mailing List - Search based on the mailing list it came from.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Source Account - Search 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>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the folder sources. You can select:
- <itemizedlist>
- <listitem>
- <para>
- Specific folders only
- <note>
- <para>
- If you select specific folders only, you need to specify the
- source folders in the box below.
- </para>
- </note>
- </para>
- </listitem>
- <listitem>
- <para>
- All local folders
- </para>
- </listitem>
- <listitem>
- <para>
- With all active remote folders
- </para>
- </listitem>
- <listitem>
- <para>
- With all local and active folders
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- <listitem>
- <para>
- If you want multiple criteria for this filter, press <guibutton>Add
- criterion</guibutton> and repeat the previous step.
- </para>
- </listitem>
- </orderedlist>
-
- <figure id="usage-mail-vfolder-fig-createrule">
- <title>Selecting a vFolder Rule</title>
- <screenshot>
- <screeninfo>Creating a vFolder Rule</screeninfo>
- <mediaobject><imageobject><imagedata
- fileref="figures/vfolder-createrule-fig" format="png"
- srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </screenshot>
- </figure>
- </para>
- </sect2>
- </sect1>
- <!--
- <sect1 id="usage-mail-subscriptions">
- <title>Subscription Management</title>
- <para>
- <application>Ximian 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>
- </sect1>
--->
-</chapter>
diff --git a/help/C/usage-mail.sgml b/help/C/usage-mail.sgml
deleted file mode 100644
index b78a9edcb4..0000000000
--- a/help/C/usage-mail.sgml
+++ /dev/null
@@ -1,2004 +0,0 @@
-
-<chapter id="usage-mail">
- <title>Using Evolution for Email</title>
- <para>
- This chapter, and <xref linkend="usage-mail-organize">, will
- provide you with an in-depth guide to the capabilities of
- Evolution as a mail client. For information about how to set up
- your mail account, see <xref linkend="config-prefs-mail">.
- </para>
-
- <note>
- <title>If you use IMAP Mail</title>
- <para>
- If you chose IMAP mail during the setup process, you must
- subscribe to your mail folders before you can read mail in
- them. Read <xref linkend="usage-mail-subscriptions"> to find out
- how.
- </para>
- </note>
-
-
- <sect1 id="usage-mail-getnsend-read">
- <title>Reading Mail</title>
- <para>
- Start the mail client by clicking on the
- <guibutton>Inbox</guibutton> icon in the shortcut bar, or by
- selecting a mail folder in the folder bar. To read a message,
- select it in the message list; if you'd like to see it in its
- own window, double-click on it or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>O</keycap>
- </keycombo>.
- </para>
-
- <tip id="spaceandbs">
- <title>Reading Mail with the Keyboard</title>
- <para>
- You can click the spacebar to page down while you're reading
- an email, and press backspace to page up in an email. This
- may help to make reading your email faster.
- </para>
- </tip>
-
- <sect2 id="usage-mail-listorder">
- <title>Sorting the message list</title>
- <para>
- <application>Evolution</application> helps you work by letting you sort
- your email. 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>
-
- <tip id="view-headers">
- <title>Email Headers</title>
- <para>
- To look at the complete headers for email messages, select
- <menuchoice><guimenu>View</guimenu><guisubmenu>Message
- Display</guisubmenu><guimenuitem>Show Full
- Headers</guimenuitem></menuchoice>. To see absolutely every
- bit, choose
- <menuchoice><guimenu>View</guimenu><guisubmenu>Message
- Display</guisubmenu><guimenuitem>Show Email Source
- </guimenuitem></menuchoice>.
- </para>
- </tip>
-
- <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>
-<figure>
- <title>Threaded Mail View</title>
-<screenshot>
-<screeninfo>Threaded Mail View</screeninfo>
-<mediaobject><imageobject><imagedata format="png" fileref="figures/mail-threaded" srccredit="Aaron Weber">
-</imageobject></mediaobject>
-</screenshot>
-</figure>
-
- </sect2>
-
- <sect2 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 delete a message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click the message to select it
- </para>
- </listitem>
- <listitem>
- <para>
- Press delete button or right click on the message and
- choose <guilabel>Delete</guilabel>.
- </para>
- <note>
- <title>Why do I still see deleted mail?</title>
- <para>
- When you press <guibutton>Delete</guibutton> or click
- the trash button, your mail isn't actually deleted,
- but is marked for deletion. Your email is not gone
- until you have expunged it. When you "Expunge" a
- folder, you remove all the mail that you have marked
- for deletion.
- </para>
- <para>
- If you don't like this behavior, select
- <menuchoice><guimenu>View</guimenu><guimenuitem>Hide
- Deleted Messages</guimenuitem></menuchoice>. Then,
- you will only see deleted messages when you look in
- your <guilabel>Trash</guilabel> folder.
- </para>
- </note>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Actions</guimenu>
- <guimenuitem>Expunge</guimenuitem>
- </menuchoice>
- or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>E</keycap>
- </keycombo>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <note>
- <title>Trash is Actually a vFolder?</title>
- <para>
- Your trash folder is actually a vFolder that displays all
- messages you have marked for later deletion. For more
- information about vFolders, see <xref
- linkend="usage-mail-organize-vfolders">. If you choose
- <menuchoice> <guimenu>Actions</guimenu> <guimenuitem>Empty
- Trash</guimenuitem> </menuchoice> you will expunge
- <emphasis>all</emphasis> your folders.
- </para>
- </note>
- </sect2>
- <sect2 id="usage-mail-getnsend-undelete">
- <title>Undeleting Messages</title>
- <para>
- To undelete a message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select a message you have marked for deletion.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <keycombo
- action="simul"><keycap>Ctrl</keycap><keycap>U</keycap>
- </keycombo>
- or choose
- <menuchoice>
- <guimenu>Actions</guimenu>
- <guimenuitem>Undelete</guimenuitem>
- </menuchoice>
-
- </para>
- <note>
- <title>What does Undelete actually do?</title>
- <para>
- If you have marked a message for deletion, undeleting
- it will unmark it, and the message will be removed
- from the Trash folder. However, it can't bring back
- messages that have been expunged.
- </para>
- </note>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-getnsend-get">
- <title>Checking for New 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 you haven't entered any mail settings yet, the
- <interface>setup assistant</interface> will ask you for the
- information it needs to check your email.
- </para>
- <para>
- The assistant will give you several dialog boxes where you configure:
- <itemizedlist>
- <listitem>
- <para>
- your personal information
- </para>
- </listitem>
- <listitem>
- <para>
- your outgoing email server information
- </para>
- </listitem>
- <listitem>
- <para>
- your mail account identity name
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- To check your email, press the <guibutton>Check Mail</guibutton>
- button. If this is your first time checking mail, or you
- haven't asked <application>Evolution</application> to store your
- password, you'll be prompted for the password. Enter your
- password and your email will be downloaded.
- </para>
- <note id="badmailsettings">
- <title>Can't Check Mail?</title>
- <para>
- If you get an error message instead of mail, you probably need
- to check your network settings. To learn how to do that, have
- a look at <xref linkend="config-prefs-mail">, or ask your
- system administrator.
- </para>
- </note>
-
-
-
- <tip>
- <title>Sharing Mailboxes with Other Mail Programs</title>
- <para>
- If you want to use <application>Evolution</application>
- and another email client, such as
- <application>Mutt</application>, at the same time,
- here's how:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Download your mail in the other application as
- you would normally.
- </para>
- </listitem>
- <listitem>
- <para>
- In <application>Evolution</application>
- <menuchoice><guimenu>Tools</guimenu><guimenuitem>Mail
- Settings</guimenuitem></menuchoice>, and pick the account
- you'd like to use to share mail. You may want to
- create a new account just for this source of
- mail.
- </para>
- </listitem>
- <listitem>
- <para>
- Under the <guilabel>Receiving Mail</guilabel>
- tab, select the type of mail file that your
- other mail application uses, and then enter the
- full path to that file.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>OK</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </tip>
-
-
-<!-- NOT FOR 1.0
- <sect2 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>
- </sect2>
--->
-
- <sect2 id="usage-mail-getnsend-get-attach">
- <title>Working with 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,
- including HTML formatting and embedded images, will appear
- as part of the message, rather than at the end of the
- message as an attachment.
- </para>
-
- <sect3 id="usage-mail-getnsend-get-attach-actions">
- <title>Saving or Opening Attachments</title>
- <para>
- If you get an attachment with an email message,
- <application>Ximian Evolution</application> can help you save
- it or open it with the appropriate applications.
- </para>
- <para>
- To save an attachment to disk:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click the downward pointing arrow on the attachment icon
- and select <guimenuitem>Save to Disk</guimenuitem>.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose a location and name for the file.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- To Open an Attachment in a Program:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open the mail message with the attachment you want to read.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the arrow next the attachment icon.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the program you'd like to use. It will start up
- and open the document.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- </para>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-get-attach-html">
- <title>Inline Images in HTML Mail</title>
- <para>
- When someone sends you HTML mail that includes an image in
- the body of the message&mdash; like the welcome message in
- your Inbox when you first started <application>Ximian
- Evolution</application>&mdash;
- <application>Evolution</application> will display the image
- inside the message. You can create messages like this by
- using the
- <menuchoice><guimenu>Insert</guimenu><guimenuitem>Image</guimenuitem></menuchoice>
- tool in the message composer.
- </para>
-
- <para>
- If the image isn't included in the message, but is, instead,
- a link to an image, <application>Evolution</application> can
- download the image from the Internet for you. However,
- <application>Evolution</application> will not display the
- image unless you ask it to. This is because remotely hosted
- images can be slow to load and display, and can even be used
- by spammers to track who reads their email. Having images
- not load automatically helps protect your privacy.
- </para>
- <para>
- If you want the images to load for one message, select
- <menuchoice>
- <guimenu>View</guimenu>
- <guisubmenu>Message Display</guisubmenu>
- <guimenuitem>Load Images</guimenuitem>
- </menuchoice>.
-
- If you want <application>Ximian Evolution</application> to
- load remotely hosted images more often, go to the
- <guilabel>Display</guilabel> tab of the
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice> dialog.
- </para>
- <note id="http-proxy">
- <title>Loading Images from the Net through an HTTP Proxy</title>
- <para>
- If you use an HTTP proxy,
- <application>Evolution</application> must be able to find
- it through the <systemitem>gnome-vfs</systemitem> subsystem
- before it can load images from the Internet. This is also
- the case if you wish to access weather and news information
- through the Summary tool. You can tell the GNOME Virtual
- File System about your HTTP proxy in one of two ways:
- <variablelist>
- <varlistentry>
- <term>Configure it with Nautilus</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a Nautilus window
- </para>
- </listitem>
- <listitem>
- <para>
- Select <menuchoice>
- <guimenu>Preferences</guimenu>
- <guimenuitem>Edit Preferences</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Go to the <guilabel>Navigation</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guilabel>Use HTTP Proxy</guilabel>
- checkbox and enter the location of your HTTP
- proxy in the <guilabel>Location</guilabel> field.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Configure it with the gconftool command</term>
- <listitem>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a terminal.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command
- <command>
- gconftool --type=bool --set /system/gnome-vfs/use-http-proxy "TRUE"
- </command>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command
- <command>
- gconftool --type=string --set /system/gnome-vfs/http-proxy-host "your-proxy-url"
- </command>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command
- <command>
- gconftool --type=int --set /system/gnome-vfs/http-proxy-port "8080"
- </command>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- For more information about the gconftool command,
- read the gconftool man page.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </note>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-getnsend-send">
- <title>Composing New Email Messages</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>
- <mediaobject><imageobject><imagedata fileref="figures/newmsg" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-
- <para>
- Enter an address in the <guilabel>To:</guilabel> field. If you
- wish, enter a subject in the <guilabel>Subject:</guilabel>, and
- a message in the box at the bottom of the window.
- Once you have written your message, press
- <guibutton>Send</guibutton>.
- </para>
-
- <sect2 id="usage-mail-getnsend-send-delay">
- <title>Sending Composed Messages Later</title>
- <para>
- <application>Evolution</application> 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. The
- "Send Later" feature is particularly useful if you use a
- modem to connect to the Internet and pay per-minute
- charges: you can remain offline until you need to send
- mail, then connect and send all your mail at once. Mail in
- the outbox is sent when you click
- <guibutton>Send/Recieve</guibutton> in the main window.
- </para>
- <para>
- To learn more about how you can specify message queue and
- filter behavior, see <xref linkend="config-prefs-mail">.
- </para>
- <note>
- <title>Working Offline</title>
- <para>
- Select
- <menuchoice><guimenu>File</guimenu><guimenuitem>Work
- Offline</guimenuitem></menuchoice> to have
- <application>Ximian Evolution</application> disconnect
- from the Internet while you work. When you want to
- reconnect, choose
- <menuchoice><guimenu>File</guimenu><guimenuitem>Work
- Online</guimenuitem></menuchoice>. Alternativly, you can click the connection button at the bottom left side of the window.
- </para>
- </note>
-
- <para>
- You can also choose to save messages as drafts or as text
- files. Your options are:
- <itemizedlist>
- <listitem><para>
- Choose
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Save Draft</guimenuitem>
- </menuchoice>
- to store your messages in the drafts folder for later
- revision.
- </para></listitem>
-
- <listitem><para>
- If you'd like to have the message sent later, you
- can choose <guimenuitem>Send Later</guimenuitem>. That way,
- the message will be added to the queue, and you can send a
- batch of messages all at once.
- </para></listitem>
-
- <listitem><para>
- If you prefer to save your message as a text file,
- choose <guimenuitem>Save As</guimenuitem> and then choose a
- file name.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-compose">
- <title>More About Mail Composition</title>
- <para>
- In the next few sections, you'll see how
- <application>Evolution</application> handles advanced email
- features, including large recipient lists, attachments, and
- forwarding.
- </para>
- <sect3 id="usage-mail-getnsend-send-attach">
- <title>Attachments</title>
- <para>
- To attach a file to your email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Push the attach button in the composer toolbar
- </para>
- </listitem>
- <listitem>
- <para>
- Select the file you want to attach
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can drag a file from your desktop into the composer window to
- attach it as well.
- </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>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-send-to-types">
- <title>Specifying Recipients for Email</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
- <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.
- </para>
- <para>
- <guilabel>Bcc:</guilabel> is a little more complex. You
- use it like <guilabel>Cc:</guilabel>, but people on the
- <guilabel>Bcc:</guilabel> list are hidden from the other
- recipients of the message. Use it to send mail to large
- groups of people, especially if they don't know each other
- or if privacy is a concern. If your <guilabel>Bcc:</guilabel> field is absent, click
- <menuchoice>
- <guimenu>View</guimenu>
- <guimenuitem>Bcc Field</guimenuitem>
- </menuchoice>.
-
- </para>
-
- <para>
- If you frequently write email to the same groups of people,
- you can create address lists in the Contact Manager, and
- then send them mail as though they had a single address.
- To learn how to do that, read <xref
- linkend="usage-contact-organize-group-list">.
- </para>
-
- </sect3>
-
- <sect3 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 offer a
- drop down list of possible address completions from your
- address book. 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.
-
-<!-- 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. NOTE: Bug filed on this: it's not available now,
- but may be in the future.
--->
-
- </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="contact-automation-basic"> and <xref
- linkend="usage-calendar-apts">.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-reply">
- <title>Replying to Email 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 grey (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">.
-
- <!-- ==============Figure=================================== -->
- <figure id="usage-mail-getnsend-reply-fig">
- <title>Reply Message Window</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/replymsg" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </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>
- <para>
- If you're subscribed to a mailing list, and want your reply
- to go just to the list, rather than to the sender, choose
- <guibutton>Reply to List</guibutton> instead of
- <guibutton>Reply</guibutton> or <guibutton>Reply to
- All</guibutton>.
- <note>
- <title>What is a Mailing List?</title>
- <para>
- Mailing Lists are one of the most popular tools for
- group collaboration on the Internet. Here's how they work:
- <simplelist>
- <member>
- Someone sends a message to a single address, like
- <email>evolution@ximian.com</email>.
- </member>
- <member>
- That address belongs to a program that distributes
- the message to a list of recipients.
- </member>
- </simplelist>
- The mail management program lets individuals subscribe
- to or unsubscribe from the list at will, without
- requiring the message writers to remember the addresses
- of every recipient.
- </para>
- <para>
- Mailing list servers can also let network administrators
- control mail flow, list membership, and even moderate
- the content of mailing lists.
- </para>
- </note>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-find">
- <title>Searching and Replacing with the Composer</title>
- <para>
- You are probably familiar with search and replace features
- in any sort of text-editing software, and if you come from
- a Linux or Unix background, you may know what
- <guimenuitem>Find Regex</guimenuitem> does. If you aren't
- among the lucky who already know, here's a quick rundown of
- the automated text searching features that the message
- composer makes available to you.
- </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>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-html">
- <title>Enhance your email with HTML</title>
- <para>
- Normally, you can't set text styles or insert pictures in
- emails, which is why email is often regarded as
- uncommunicative and cold, and why people often resort to
- using far too many exclamation points 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. Because some people may
- prefer not to get HTML mail,
- <application>Evolution</application> sends plain text
- unless you explicitly ask for HTML.
- </para>
- </note>
-
- <para> You can change the format of an email message between
- plain text and HTML by choosing <menuchoice>
- <guimenu>Format</guimenu> <guimenuitem>
- HTML</guimenuitem></menuchoice>.
- </para>
- <para>
- To send all your mail as HTML by default, set your mail
- format preferences in the mail configuration dialog. See
- <xref linkend="config-prefs-mail-other"> for more
- information.
- </para>
- <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>preformat</guilabel>, to use the HTML
- tag for preformatted blocks of text, and three types
- of bullet points 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. You can select a background color or image by
- right-clicking on the message background and
- selecting <guilabel>Page</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- The <guimenu>Insert</guimenu> gives you opinions which let you
- spruce up your email to make it more interesting:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Link</guimenuitem></term>
- <listitem>
- <para>
- Lets you link some text to a website. Use this tool to put hyperlinks in your HTML
- messages. 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. To add a link:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select the text you wish to link from.
- </para>
- </listitem>
- <listitem>
- <para>
- Right click on the text and click on <guibutton>Link</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Put the URL you want to use in the <guilabel>URL</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <note>
- <para>
- If you're typing a webpage address to be automatically formatted, keep in mind that a space terminates the link.
- </para>
- </note>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Image</guimenuitem></term>
- <listitem>
- <para>
- Lets you put an image alongside text.
- </para>
- <para>
- To insert an image into your email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a new email by clicking <guibutton>New Message</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Make sure that you have the
- <menuchoice>
- <guimenu>Format</guimenu>
- <guimenuitem>HTML</guimenuitem>
- </menuchoice>
- selector checked.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Insert Image</guibutton> button in the toolbar, or select
- <menuchoice>
- <guimenu>Insert</guimenu>
- <guimenuitem>Image</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose your image by clicking the <guibutton>Browse</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>Insert</guibutton> to insert the image.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Rule</guimenuitem></term>
- <listitem>
- <para>
- Inserts a horizontal line into the text to help divide two
- sections.
- </para>
- <para>
- To insert a rule:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a new email by clicking <guibutton>New Message</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Make sure that you have the
- <menuchoice>
- <guimenu>Format</guimenu>
- <guimenuitem>HTML</guimenuitem>
- </menuchoice>
- selector checked.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Rule</guibutton> button in the <guilabel>Toolbar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the type of rule. You can use a plain
- line, a 3D line, or a yellow line with flowers.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose the size of the line, as a percentage of the width of the email window.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Choose the alignment and style. For the plain
- line, you can choose the thickness of the line,
- and whether it will be shaded, or solid. For the
- other types, you can only choose alignment.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Click <guibutton>Insert</guibutton> to insert the rule.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Table</term>
- <listitem>
- <para>
- Inserts a table into the text to help divide two
- sections.
- </para>
- <para>
- To insert a rule:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a new email by clicking <guibutton>New Message</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Make sure that you have the
- <menuchoice>
- <guimenu>Format</guimenu>
- <guimenuitem>HTML</guimenuitem>
- </menuchoice>
- selector checked.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Table</guibutton> button in the <guilabel>Toolbar</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the <guibutton>Template</guibutton> you wish to use. Each template has a slightly different feel and layout.
- </para>
- </listitem>
- <listitem>
- <para>
- If you so desire, you may change the other options such as: number of rows, columns, spacing of each cell, and more.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Insert</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- To add a hyperlink to your HTML message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select the text you want to display as a link.
- </para>
- </listitem>
- <listitem>
- <para>
- Right click on text and select
- <guimenuitem>Link</guimenuitem>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the address you wish to link to in the
- <guilabel>URL</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- To add an image to your HTML message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Insert</guimenu>
- <guimenuitem>Image</guimenuitem>
- </menuchoice>.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Browse</guibutton> to select the image
- you want to include in your email.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Along the right side of the window, choose the alignment,
- border, and other attributes of the image. If you change
- the size attributes, the image will be shrunk or stretched
- to fit the size you have chosen.
- </para>
- </listitem>
-
- <listitem>
- <para>
- If you would like to make the image a clickable link,
- enter a URL in the <guilabel>Link</guilabel> tab of the
- window.
- </para>
- </listitem>
-
- <listitem>
- <para>
- When you are finished, press
- <guibutton>Insert</guibutton> to include the image in
- your message.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can insert an image into the background of your message by
- right-clicking on the message background and selecting
- <guimenuitem>Page</guimenuitem>. From that dialog, you may
- also select background color and set other general options
- about the html message you are composing.
- </para>
- <sect3 id="html-templates">
- <title>HTML Templates</title>
- <para>
- <application>Evolution</application> not only allows you to
- decorate your email with HTML text and graphics, but
- provides you with prebuilt templates for you to use when
- making these improvements. You can use these to emphasize a
- point or frame an image in an attractive manner.
- </para>
- <para>
- To include a template into your HTML based email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Create a new email by clicking <guibutton>New Message</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Make sure that the
- <menuchoice>
- <guimenu>
- Format
- </guimenu>
- <guimenuitem>
- HTML
- </guimenuitem>
- </menuchoice>
- selector is checked.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>HTML Template</guibutton> button in the
- <guilabel>Toolbar</guilabel> or select
- <menuchoice>
- <guimenu>
- Insert
- </guimenu>
- <guimenuitem>
- HTML Template
- </guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the template type in the
- <guilabel>Template</guilabel> selection box. Your
- options are <guilabel>Note</guilabel> and
- <guilabel>Image Frame</guilabel>.
- </para>
- </listitem>
- <listitem>
- <para>
- Set the size and alignment of the HTML template.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Click <guibutton>Insert</guibutton> to insert it where the
- cursor is.
- </para>
- </listitem>
- <listitem>
- <para>
- Once you have inserted the template, click on the text
- in the template, and enter the text you want to use.
- </para>
- <para>
- If you have selected an image frame template,
- right-click on the image and select
- <guimenuitem>Image</guimenuitem> to select the image
- you want to place in the frame.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect3>
- <sect3 id="composer-tables">
- <title>Tables in Email</title>
- <para>
- <application>Evolution</application> allows you to put
- tables in your HTML email to help organize your thoughts.
- These tables are a simplified version of what you might find
- in a spreadsheet program like
- <application>Gnumeric</application>.
- </para>
- <para>
- To include a table in your email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Create a new email by clicking <guibutton>New Message</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Make sure you have the
- <menuchoice>
- <guimenu>
- Format
- </guimenu>
- <guimenuitem>
- HTML
- </guimenuitem>
- </menuchoice>
- selector checked.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>
- Insert
- </guimenu>
- <guimenuitem>
- Table
- </guimenuitem>
- </menuchoice>
- or click the <guiicon>Table</guiicon> button in the
- toolbar.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Select the template, or style, you want to use for the
- table.
- </para>
- </listitem>
- <listitem>
- <para>
- Set the number of rows and columns you want.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Insert</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Click in a cell and type to insert text into the table.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can also edit a table after creation. Just right-click
- on it and select <guimenuitem>Table</guimenuitem> to open
- the table editing window again. Or, you can select items
- from the <guimenu>Table Delete</guimenu> and <guimenu>Table
- Insert</guimenu> menus.
- </para>
-
- <para>
- <tip id="table-tip">
- <title>Deleting an Entire Table</title>
- <para>
- You can delete an entire table by right-clicking on
- a table or other HTML object in a message, and selecting
- <menuchoice>
- <guimenu>Table Delete</guimenu>
- <guimenuitem>Table</guimenuitem> </menuchoice>. In an
- HMTL message, your signature, templates, and image
- inclusions all have tables around them, and you can remove
- them completely and quickly with this shortcut.
- </para>
- </tip>
- </para>
-
- </sect3>
- </sect2>
-
- <sect2 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 a letter if it comes to you 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>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-ettiquette">
- <title>Seven Tips for Email Courtesy</title>
- <para>
-
- <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>
- WRITING IN CAPITAL LETTERS MEANS YOU'RE SHOUTING!
- Don't write a whole message in capital letters. It
- hurts people's ears.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Check your spelling and use complete sentences. By
- default, <application>Evolution</application> will put
- a red line beneath words it doesn't recognize, as you
- type them.
- </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>
-
- <listitem>
- <para>
- Don't send spam.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> Happy mailing! </para>
- </sect2>
- </sect1>
- <sect1 id="rsvp-stuff">
- <title>RSVPs in Mail</title>
- <para>
- If you create an event in the calendar component, you can then
- send invitations to the attendee list through the
- <application>Ximian Evolution</application> email tool. The
- invitation card is sent as an attachment in iCal format.
- </para>
- <para>
- If you click on the attachment button and click the
- <guibutton>View Inline</guibutton>, <application>Ximian
- Evolution</application> will show you information about the
- meeting, and let you respond to the meeting in several ways.
- Select the response that you would like, and then click the
- <guibutton>OK</guibutton> button.
- </para>
- <para>
- Your options are:
- <variablelist>
- <varlistentry>
- <term>Accept</term>
- <listitem>
- <para>
- Select this entry if you will attend the meeting. When you
- click the <guibutton>OK</guibutton> button, the meeting will
- be entered into your calendar.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>>Accept</term>
- <listitem>
- <para>
- Select this entry if you will probably attend the meeting.
- When you click the <guibutton>OK</guibutton> button, the
- meeting will be entered into your calendar, but marked as
- tentative.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Decline</term>
- <listitem>
- <para>
- Select this item if you will be unable to attend the
- meeting. The meeting will not be entered into your calendar
- when you click the <guibutton>OK</guibutton>, although your
- response will be sent to the meeting host if you have
- checked the <guilabel>RSVP</guilabel> box.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>RSVP</term>
- <listitem>
- <para>
- Check this box if you would like your response sent to
- the meeting organizers.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect1>
-
- <sect1 id="usage-mail-subscriptions">
- <title>Subscription Management</title>
- <para>
- Since IMAP folders exist on the server, and opening them or
- checking them takes time, you need fine-grained control over
- the way that you use IMAP folders. That's why
- <application>Evolution</application> has an IMAP
- subscriptions manager.
- </para>
- <para>
- To use it:
- <orderedlist numeration="arabic">
-
- <listitem>
- <para>
- Select
- <menuchoice><guimenu>Tools</guimenu><guimenuitem>Subscribe
- to Folders</guimenuitem></menuchoice>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- If you have accounts on multiple IMAP servers, select the
- server where you'd like to manage your
- subscriptions. <application>Evolution</application> will
- display a list of available files and folders.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Select a file or folder by clicking on it. You will want
- to select at least the <guilabel>INBOX</guilabel>
- folder. Depending upon the way your IMAP server is
- configured, the list of available files may include
- non-mail folders. If it does, you can ignore them.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Click the <guibutton>Subscribe</guibutton> to add it to
- the subscribed list.
- </para>
- </listitem>
- <listitem>
- <para>
- When you have subscribed to the folders you want, close
- the window.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect1>
-
- <sect1 id="encryption">
- <title>Encryption</title>
- <sect2 id="encryption-whatis">
- <title>What is Encryption?</title>
- <para>
- Encryption is an ancient method of keeping information safe
- from prying eyes. <application>Evolution</application> helps
- you you protect your privacy by using
- <application>gpg</application>, an implementation of strong
- <glossterm linkend="public-key-encryption">Public Key
- Encryption.</glossterm>
- </para>
-
- <note id="pub-priv">
- <title>Public Key? Private Key? What is the difference?</title>
- <para>
- GPG uses two keys: public and private. You can give your
- public key to anyone you want to recieve
- encrypted messages, or put it on a public key server so
- that people can look it up before contacting you.
- <emphasis>Never give your private key to anyone,
- ever</emphasis>. Your private key lets you decrypt any
- message encrypted with your public key.
- </para>
- </note>
-
- <para>
- Using encryption takes a bit of forethought. When you send a
- message that is encrypted, you must encrypt it using your
- intended recipient's public key. To <emphasis>get</emphasis>
- an encrypted message, you must make sure that the sender has
- your public key in advance.
- </para>
-
- <para>
- You can use encryption in two different ways:
- <simplelist>
- <member>
- Encrypt the entire message, so that nobody but the recipient can read it.
- </member>
- <member>
- Attach an encrypted signature to a plain text message, so
- that the recipient can read the message without decrypting it, and
- only needs decryption to verify the sender's identity.
- </member>
- </simplelist>
- </para>
-
- <example>
- <title>Sending an Encrypted Messagee</title>
- <para>
- Kevin wants to send an encrypted message to his friend
- Rachel. He looks up her public key on a general key
- server, and then tells
- <application>Evolution</application> to encrypt the
- message. The message now reads "@#$23ui7yr87#@!48970fsd."
- When the information gets to Rachel, she decrypts it using
- her private key, and it appears as plain text for her to
- read.
- </para>
- </example>
- <tip id="always-sign">
- <title>Always Sign</title>
- <para>
- You can set <application>Evolution</application> to always sign your email messages:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open your account preferences.
- </para>
- </listitem>
- <listitem>
- <para>
- Open the <guilabel>Security</guilabel> tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>Always sign outgoing messages when using this account</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </tip>
- </sect2>
-
- <sect2 id="encryption-keygen">
- <title>Making Encryption Keys</title>
- <para>
- Before you can get or send encrypted mail, you need to
- generate your public and private keys with GPG. Here's how:
- </para>
- <tip>
- <title>GPG Versions</title>
- <para>
- This manual covers version 1.0.6 of GPG. If your version is
- different, this may not be entirely accurate. You may find
- out your version number by typing in: <command>gpg
- --version</command>.
- </para>
- </tip>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a terminal and type <command>gpg --gen-key</command>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Choose the default algorythm, "DSA and ElGamal."
- </para>
- </listitem>
-
- <listitem>
- <para>
- Choose a key length. The default, 1024 bits, should be
- long enough.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Decide if you want your key to expire automatically, and if so, when.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- Enter your name, email address, and any additional
- personal information you think is appropriate. Do not
- falsify this information, because it will be needed to
- verify your identity later on.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Next, enter your passphrase. It does not have to be the
- same as your email password or your login password. In
- fact, it probably shouldn't. Don't forget it. If you lose
- it, your keys will be useless and you will be unable to
- decrypt messages sent to you with those keys.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Now, GPG will generate your keys. This may take awhile,
- so feel free to do something else while it's
- happening. In fact, using your computer for something
- else actually helps to generate better keys, because it
- increases the randomness in the key generation seeds.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- Once the keys are generated, you can view your key information
- by typing <command>gpg --list-keys</command>. You should see
- something similar to this:
- <programlisting>
- /home/you/.gnupg/pubring.gpg
- ----------------------------
- pub 1024D/32j38dk2 2001-06-20 you &lt;you@your-address.com&gt;
- sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
- </programlisting>
- </para>
- <para>
- GPG will create one list, or keyring, for your public keys
- and one for your private keys. All the public keys you know
- are stored in the file
- <filename>~/.gnupg/pubring.gpg</filename>. If you want to
- give other people your key, send them that file.
- </para>
- <para>
- If you wish, you can upload your keys to a keyserver. Here's
- how:
- <orderedlist>
- <listitem>
- <para>
- Check your public key ID with <command>gpg
---list-keys</command>. It will be the string after 1024D on the line
-beginning with "pub." In this example, it's 32j38dk2.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command <command>gpg --send-keys --keyserver
-wwwkeys.pgp.net 32j38dk2</command>. Substitute your key ID for
-32j38dk2. You will need your password to do this.
- </para>
- </listitem>
- </orderedlist>
-
- <note id="why-keyserver">
- <title>Why Use a Keyserver?</title>
- <para>
- Keyservers store your public keys for you so that your
- friends can decrypt your messages. If you choose not to
- use a keyserver, you can manually send your people public
- key, include it in your signature file, or put it on your
- own web page. However, it's easier to publish them once,
- and then let people download them from the keyserver when
- they want.
- </para>
- </note>
-
- </para>
- </sect2>
-
- <sect2 id="encrypt-getting-key">
- <title>Getting and Using Public Keys</title>
- <para>
- To encrypt a message to your someone else you'll need to use
- their public key in combination with your private key.
- <application>Evolution</application> does that for you, but
- you still need to get their key and add it to your keyring.
- </para>
- <para>
- To get public keys from a public key server, enter the
- command:
- <command>
- gpg --recv-keys --keyserver wwwkeys.pgp.net keyid
- </command>, substituting "keyid" for your recipient's ID. You
- will need to type in your password, and then their ID will
- automatically be added to your keyring. When you send mail to
- them, <application>Evolution</application> will allow you to
- encrypt your messages.
- </para>
- <para>
- If someone sends you their public key directly, save it as a
- plain text file and enter the command <command>gpg
- filename</command>. This will add it to your keyring.
- </para>
- </sect2>
-
- <sect2 id="encrypt-evo-integ">
- <title>Setting up Evolution's Encryption</title>
- <para>
- You'll need to open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- Once there, select the account with which you'd like to send
- and recieve encrypted mail, and click the
- <guibutton>Edit</guibutton> button. In the
- <guilabel>Security</guilabel> tab is a section labeled
- <guilabel>Pretty Good Privacy</guilabel>. Enter your key ID
- and click <guibutton>OK</guibutton>. Your key is now
- integrated into your identity in
- <application>Evolution</application>.
- </para>
- <note>
- <title>What is my Key ID again?</title>
- <para>
- <application>Evolution</application> requires that you know your key ID. If you don't remember it, you can find it by typing <command>gpg --list-keys</command> in a console window. Your key ID will be an eight character string with random numbers and letters.
- </para>
- </note>
- </sect2>
-
- <sect2 id="encrypt-sending">
- <title>Sending Encrypted Messages</title>
- <para>
- As you know, you can use encryption to hide the entire
- message, or just to verify your signature. Once you've
- generated your public and private keys, and have the public
- keys of the people to whom you want to send mail, here's what
- to do:
- </para>
- </sect2>
-
- <sect2 id="sign-msg">
- <title>Signing a Message</title>
- <para>
- To sign a message, choose:
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Sign</guimenuitem>
- </menuchoice>
- . You will be prompted for your PGP password. Once you enter it,
- click <guibutton>OK</guibutton> and your message will be signed.
- </para>
- </sect2>
-
- <sect2 id="encrypt-msg">
- <title>Encrypting a Message</title>
- <para>
- Encrypting a message is very similar to signing a message.
- Just choose the menu item
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Encrypt</guimenuitem>
- </menuchoice>
- </para>
- </sect2>
- <sect2 id="unencrypting">
- <title>Unencrypting a Recieved Message</title>
- <para>
- If you get an encrypted message, you will need to decrypt it
- before you read it. Remember, the sender has to have your
- public key before they can send you an encrypted message.
- </para>
- <para>
- When you view the message,
- <application>Evolution</application> will ask you for your
- PGP password. Enter it, and the message will be displayed
- properly.
- </para>
- </sect2>
- </sect1>
-</chapter>
diff --git a/help/C/usage-mainwindow.sgml b/help/C/usage-mainwindow.sgml
deleted file mode 100644
index 7794c8c54f..0000000000
--- a/help/C/usage-mainwindow.sgml
+++ /dev/null
@@ -1,1106 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-mainwindow">
-
- <title>Getting Started with Ximian Evolution</title>
-
- <sect1 id="what">
- <title>What is Ximian 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>. The goal of
- <application>Ximian Evolution</application> 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.
- </para>
- <para>
- In other words, <application>Ximian Evolution</application> is
- a tool to help you get your work done.
- </para>
- <para>
- <application>Ximian 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>
- <application>Ximian 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>
- With <application>Ximian Evolution</application>, you can
- accomplish your most common 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>Ximian 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="usage-mainwindow-starting">
- <title>The First Time you Start Ximian Evolution</title>
- <para>
- To start <application>Ximian Evolution</application>, do either
- of the following:
- <itemizedlist>
- <listitem>
- <para>
- Select <menuchoice><guimenu>Programs</guimenu>
- <guimenuitem>Evolution</guimenuitem> </menuchoice> from your
- menu panel.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Type <command>evolution</command> at the command line.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <para>
- The first time you run the program, it will create a directory
- called <filename>evolution</filename> in your home directory,
- where it will store all of its local data. Then, it will open a
- first-run assistant to help you set up mail accounts and import
- data from other applications.
- </para>
- <para>
- Using the first-run assistant will take approximately two to
- five minutes.
- </para>
-
- <sect2 id="first-step">
- <title>Defining Your Identity</title>
- <para>
- The Identity window is the first of four steps in the
- assistant. The identity step will ask you to enter your basic
- personal information. You can define multiple identities
- later on with the <menuchoice><guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem></menuchoice> tool.
- <itemizedlist>
- <listitem>
- <para>
- Full Name &mdash; Your full name (Example: John Doe).
- </para>
- </listitem>
- <listitem>
- <para>
- Email Address &mdash; Your email address (Example: john@doe.com)
- </para>
- </listitem>
- <listitem>
- <para>
- Organization &mdash; The company where you work (optional).
- </para>
- </listitem>
- <listitem>
- <para>
- Signature file &mdash; If you'd like to use an email
- <glossterm linkend="signature">signature</glossterm>,
- select your signature file here. Normally, the
- signature will be the contents of the
- <filename>.signature</filename> file in your home
- directory.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="second-step">
- <title>Recieving Email</title>
- <para>
- The <guilabel>Recieving Email</guilabel> step lets you configure
- receving email people have sent you.
- <itemizedlist>
- <listitem>
- <para>
- Server Type &mdash; There are numerous types of servers
- from which <application>Ximian Evolution</application>
- can fetch your mail:
- <itemizedlist>
- <listitem>
- <para>
- POP &mdash; Downloads your email to your hard disk for
- permanent storage.
- </para>
- </listitem>
- <listitem>
- <para>
- IMAPv4 &mdash; Keeps the email on your server so
- you can access your email from any computer that
- supports IMAPv4 and have everything be the
- same. For more information about how to use IMAP
- mail, see <xref
- linkend="usage-mail-subscriptions">.
- </para>
- </listitem>
- <listitem>
- <para>
- Unix mail spool file &mdash; If you run a mail
- server on your desktop computer, choose this optino.
- </para>
- </listitem>
- <listitem>
- <para>
- Standard Unix .mbox file &mdash; If you want
- <application>Ximian Evolution</application> to
- read mail from a specific file, or if you download
- mail with another application, choose this option.
- </para>
- </listitem>
- <listitem>
- <para>
- Qmail maildir format files &mdash; If you download your
- mail using qmail, you'll want to use this.
- </para>
- </listitem>
- <listitem>
- <para>
- None &mdash; How do you have None? figure out!
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Email Server &mdash; This is the address of the server you're
- downloading from.
- </para>
- </listitem>
- <listitem>
- <para>
- Username &mdash; The username that you login to your email. That
- is often the part before the @ in your email.
- </para>
- <para>
- Authentication Type &mdash; Chances are you are using
- <guilabel>Password</guilabel>. Ask your administrator for more
- details. You can have <application>Ximian Evolution</application> check
- by clicking <guibutton>Check for supported types</guibutton>.
- </para>
- <para>
- Remember Password &mdash; If you prefer to not enter your
- password every time you check email, press this button.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <tip id="exchange-info">
- <title>Can Ximian Evolution Talk to Exchange?</title>
- <para>
- <application>Ximian Evolution</application> can work with the
- <application>Microsoft Exchange</application> server over
- standard protocols such as POP or IMAP. Check with your
- system administrator to see if you can get POP or IMAP
- access to your email server.
- </para>
- </tip>
- </sect2>
- <sect2 id="third-step">
- <title>Sending Email</title>
- <para>
- The <guilabel>Sending Email</guilabel> step lets you configure sending
- email.
- <itemizedlist>
- <listitem>
- <para>
- Server Type &mdash; There are numerous server types that
- <application>Ximian Evolution</application> supports for sending your
- mail.
- <itemizedlist>
- <listitem>
- <para>
- SMTP &mdash; Downloads mail into your mailbox file.
- </para>
- </listitem>
- <listitem>
- <para>
- Sendmail &mdash; Uses another program to download your mail
- to your mailbox files.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Host &mdash; If you chose SMTP, enter the server's name
- or IP address here.
- </para>
- </listitem>
- <listitem>
- <para>
- Server requires authentication &mdash; If your server
- requires you to enter a password to send mail, check
- this box.
- </para>
- </listitem>
- <listitem>
- <para>
- Authentication Type &mdash; Chances are you are using
- <guilabel>Password</guilabel>. If you're not sure, ask
- your system administrator or ISP, or have
- <application>Ximian Evolution</application> check for you by
- clicking <guibutton>Check for supported
- types</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Username &mdash; The account name you use when you login
- to check your email. Normally, this is the part of your
- email address before the '@' character.
- </para>
- </listitem>
- <listitem>
- <para>
- Remember Password &mdash; If you prefer to not enter
- your password every time you check email, press this
- button.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="fourth-step">
- <title>Importing Mail (Optional)</title>
- <para>
- If <application>Ximian Evolution</application> finds mail or address
- files from another application, it will offer to import them.
- If you're not sure which file format your mail program uses,
- ask your system administrator.
- </para>
- <para>
- <application>Ximian Evolution</application> can import the following types of
- files:
- <variablelist>
- <varlistentry>
- <term>VCard (.vcf, gcrd)</term>
- <listitem>
- <para>
- The most common addressbook format.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Outlook Express 4 (.mbx)</term>
- <listitem>
- <para>
- Email file format used by Outlook Express 4.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>MBox (mbox)</term>
- <listitem>
- <para>
- The email box format used by Mozilla, Netscape,
- Ximian Evolution, Eudora, and many other email clients.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-</para>
-<para>
- <note>
- <title>Outlook 2000 Users</title>
- <para>
- Outlook 2000 uses a proprietary format that
- <application>Ximian Evolution</application> cannot import directly.
- To import files from Outlook 2000, do the following:
- <orderedlist numeration="arabic">
-
- <listitem>
- <para>
- While using Windows, import the files into Mozilla Mail (or
- another mailer, such as Netscape or Eudora, that uses the
- standard mbox format).
- </para>
- </listitem>
-
- <listitem>
- <para>
- Copy the files to the system or partition you use for
- <application>Ximian Evolution</application>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Use the <application>Ximian Evolution</application> import
- tool to import the files. Read the FAQ at the Ximian
- website for more information.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </note>
-
- <note>
- <title>Netscape Users</title>
- <para>
- Before importing mail from Netscape, make sure you select
- <menuchoice><guimenu>File</guimenu><guimenuitem>Compact All
- Folders</guimenuitem></menuchoice>. If you don't,
- <application>Ximian Evolution</application> will import and undelete
- the messages in your Trash folders.
- </para>
- </note>
-
- </para>
-
- <tip>
- <title>Exporting Files From Ximian Evolution</title>
- <para>
- Ximian Evolution uses standard file types for all its information,
- so you should have no trouble taking your information
- elsewhere if you want.
- </para>
- <para>
- For mail, that's <filename>mbox</filename>, for calendar,
- <filename>iCal</filename>, and for the address book, vCards
- in a <filename>.db3</filename> database.
- </para>
- </tip>
- </sect2>
- </sect1>
-
- <sect1 id="ui-intro">
- <title>What's What in Ximian Evolution</title>
- <para>
- Now that you've gotten the first-run configuration out of the
- way, you're ready to get down to work. Here's a quick
- explanation of what's going on in your main
- <application>Ximian Evolution</application> window.
- </para>
-
- <figure id="preface-basic-interface">
- <title>The Ximian Evolution Main Window</title>
- <screenshot>
- <screeninfo>Inbox</screeninfo>
- <mediaobject><imageobject><imagedata
- fileref="figures/mainwindow-pic" format="png" srccredit="Kevin
- Breit"> </imageobject></mediaobject>
- </screenshot>
- </figure>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-1" format="png"></imageobject></inlinemediaobject>
- <guilabel>Menubar</guilabel>
- </para>
-
- <para>
- The <guilabel>Menubar</guilabel> gives you access to nearly all the
- features that can be found in <application>Ximian Evolution</application>.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="png"></imageobject></inlinemediaobject>
- <guilabel>Toolbar</guilabel>
- </para>
-
- <para>
- The <guilabel>Toolbar</guilabel> gives you fast and easy access to the
- most used features in each component.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="png"></imageobject></inlinemediaobject>
- <guilabel>Shortcut Bar</guilabel>
- </para>
-
- <para>
- The <guilabel>Shortcut Bar</guilabel> lets you go to your favorite
- components with the click of a click of a button.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-4" format="png"></imageobject></inlinemediaobject>
- <guilabel>Status Bar</guilabel>
- </para>
-
- <para>
- Periodically, <application>Ximian Evolution</application> will need to quietly
- display a message, or tell you the progress of a task. This most
- often happens when you're checking or sending email. These progress
- queues are shown here, in the <guilabel>Status Bar</guilabel>.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-5" format="png"></imageobject></inlinemediaobject>
- <guilabel>Search Tools</guilabel>
- </para>
-
- <para>
- The <guilabel>Search Tool</guilabel> lets you search through your email
- with precision so you can easily find what you're looking for.
- </para>
-
-
- <sect2 id="usage-mainwindow-shortcutbar">
- <title>The Shortcut Bar</title>
- <para>
- <application>Ximian 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>
- Take a look at the <guilabel>Shortcut Bar</guilabel>
- The shortcut buttons in that category are:
-
- <variablelist>
- <varlistentry>
- <term> <guibutton>Summary</guibutton></term>
- <listitem>
- <para>
- Start your day here. The Ximian Evolution
- <guilabel>Summary</guilabel> gives you a quick
- summary of new or important messages, daily
- appointments and urgent tasks. You can customize
- its appearance and content, and use it to access
- Ximian 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 Ximian 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 task 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>
- </sect2>
- <sect2 id="usage-mainwindow-folderbar">
- <title>Folders and The Folder Bar</title>
- <para>
- The <interface>folder bar</interface> is a more comprehensive
- way to view the information you've stored with
- <application>Ximian 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, of course, is the
- <guilabel>Summary</guilabel>, a customizable summary of your
- information. Below that are your <guilabel>Local
- Folders</guilabel>, which hold all the
- <application>Ximian Evolution</application> data that's stored on your
- computer. After that are your network servers: <glossterm
- linkend="ldap">LDAP</glossterm> servers that host shared contact
- directories, and <glossterm linkend="imap">IMAP</glossterm> mail
- folders to which you subscribe. Lastly, there are
- <guilabel>vFolders</guilabel>, or virtual folders, discussed in
- <xref linkend="usage-mail-organize-vfolders">,
- </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>Drafts</guilabel>, for messages you started and didn't finish.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Inbox</guilabel>, for incoming mail.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Outbox</guilabel>, for messages you have written
- but not yet sent. This will be empty unless you use
- <application>Ximian Evolution</application> while offline.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Sent</guilabel>, for sent mail.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Trash</guilabel>, a vFolder view of all the
- messages you have marked for deletion but not yet
- <glossterm linkend="expunge">expunged</glossterm>.
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- <tip id="foldertips">
- <title>Navigating without the Folder Bar or the Shortcut 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. When you hide the folder
- bar,
- there is a menu on the left side of the window just below the toolbar
- to move about the folder tree, even with the folder and
- shortcut bars hidden.
- </para>
- </tip>
-
- <para>
- If you get large volumes of mail, you'll want more folders than
- just your Inbox. To create a new folder:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem></menuchoice>
- <keycombo action="simul">
- <keycap>Shift</keycap>
- <keycap>Ctrl</keycap>
- <keycap>E</keycap>
- </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the name of the folder in the <guilabel>Folder
- Name</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the folder type. The available options are.
- <itemizedlist>
- <listitem>
- <para>
- Calendar
- </para>
- </listitem>
- <listitem>
- <para>
- Contacts
- </para>
- </listitem>
- <listitem>
- <para>
- Mail
- </para>
- </listitem>
- <listitem>
- <para>
- Tasks
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- <listitem>
- <para>
- Choose the location of the new folder.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <sect3 id="subfolders">
- <title>Subfolders</title>
- <para>
- <application>Ximian Evolution</application> lets you nest folders
- inside of each other, so that you can have a detailed
- organizational system.
- </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
- <application>Ximian Evolution</application>. If you right-click on a
- folder, you'll have a menu with the following options:
- <itemizedlist>
- <listitem><para><guimenuitem>View</guimenuitem>, to view the folder. </para></listitem>
- <listitem><para><guimenuitem>Open in New Window</guimenuitem> to view the folder in another window. </para></listitem>
- <listitem><para><guimenuitem>Move</guimenuitem>, to move the folder to another location. </para></listitem>
- <listitem><para><guimenuitem>Copy</guimenuitem>, to duplicate the folder. </para></listitem>
- <listitem><para><guimenuitem>Delete</guimenuitem>, to delete the folder and all its contents. </para></listitem>
- <listitem><para><guimenuitem>Rename</guimenuitem>, to change its name. </para></listitem>
- <listitem><para><guimenuitem>Create New Folder</guimenuitem>, to create another folder in the same location. </para></listitem>
- <listitem><para><guimenuitem>Add to Shortcut Bar</guimenuitem>, to add the folder to your shortcut bar. </para></listitem>
- <listitem><para><guimenuitem>Properties</guimenuitem>, to view or change the folder properties. </para></listitem>
- </itemizedlist>
- </para>
- <para>
- You can also rearrange folders and messages by dragging and
- dropping them.
- </para>
-
- <para>
- Any time new mail arrives in a mail folder, that folder
- label is displayed in bold text, along with the number of
- new messages in that folder.
- </para>
- </sect3>
- </sect2>
-
- <sect2 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. If you're looking at your Inbox, most of the menu items
- will relate to mail; some will relate to other components of
- <application>Ximian Evolution</application> and some, especially those
- in the <guimenu>File Menu</guimenu> will relate to the
- application as a whole.
- </para>
- <para>
- <variablelist>
- <varlistentry>
- <term> <guimenu>File</guimenu></term>
-
- <listitem><para> Anything 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></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></term>
- <listitem><para>
- This menu lets you decide how <application>Ximian Evolution</application>
- should look. Some of the features control the appearance of
- <application>Ximian Evolution</application> as a whole, and others
- the way a particular kind of information appears.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Actions</guimenu></term>
- <listitem><para>
- Holds actions which maybe applied to a message. Normally,
- if there is only one target for the action &mdash; for
- example, replying to a message &mdash; you can find it in
- the <guimenu>Actions</guimenu> menu.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Tools</guimenu></term>
- <listitem><para>
- Tools for configuring, changing, and
- setting up preferences 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></term>
- <listitem><para>
- Select among these items to open the
- <application>Help Browser</application>
- and read the <application>Ximian Evolution</application> manual.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- Once you've familiarized yourself with the <interface>main
- window</interface> you can start doing things with it. We'll
- start with the <guilabel>Summary</guilabel>, which provides a
- quick overview of your <application>Ximian
- Evolution</application> information.
- </para>
- </sect2>
- <sect2 id="basics-summary">
- <title>Introducing the Summary</title>
- <para>
- The Ximian Evolution Summary provides you with a quick
- run-down of important information: your appointments for a
- given day, how much new mail you have, headlines from
- selected news services, and so forth. To see the Summary,
- click on the <guibutton>Summary</guibutton> button in the
- shortcut bar, or select the <guilabel>Summary</guilabel>
- folder in the folder bar.
- </para>
-
- <para>
- FIXME: Insert picture of the Summary and labels here.
- </para>
-
- <para>
- To add additional services to your Summary, or to edit the
- existing services, select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Summary Settings</guimenuitem>
- </menuchoice>.
- </para>
-
- </sect2>
-
- <sect2 id="basics-mail">
- <title>Introducing Email</title>
- <para>
- <application>Ximian Evolution</application> email is like other
- email programs in several ways:
- <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 makes it easy to send and recieve multiple file
- attachments.
- </para>
- </listitem>
- <listitem>
- <para>
- It supports multiple mail sources, including <glossterm
- linkend="imap">IMAP</glossterm>, <glossterm
- linkend="pop">POP3</glossterm>, local
- <filename>mbox</filename> and
- <filename>mh</filename> files.
-
-<!-- NOT FOR 1.0, but maybe later
- and even NNTP messages (newsgroups), which aren't
- technically email.
--->
- </para>
- </listitem>
- <listitem>
- <para>
- It lets you guard your privacy with encryption.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- However, <application>Ximian Evolution</application> has some
- important differences. First, it's built to handle very large
- amounts of mail. 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 large volumes
- of mail. There's also the <application>Ximian Evolution</application>
- <link linkend="usage-mail-organize-vFolders">vFolder</link>,
- an advanced organizational feature not found in mainstream
- 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>
- <para>
- Here's what the mailer looks like:
-
- <!-- ==============Figure=================================== -->
-
- <figure id="usage-mail-intro-fig">
- <title>Ximian Evolution Mail</title>
- <screenshot>
- <screeninfo>Inbox</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/mail-inbox" format="png" srccredit="Kevin Breit">
- </imageobject></mediaobject>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-</para>
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-1"
- format="png"></imageobject></inlinemediaobject> <guilabel>Email
- Viewer</guilabel>
- </para>
-
- <para>
- This is where your email is displayed.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-2"
- format="png"></imageobject></inlinemediaobject> <guilabel>Email List</guilabel>
- </para>
-
- <para>
- The <guilabel>Email List</guilabel> displays all the emails
- that you have. This includes all your read, unread, and email
- that is flagged to be deleted.
- </para>
-
- <para>
- 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. To change the sizes of a pane, just click
- and hold on the divider between the two panes. Then you can drag
- up and down to select the size of the panes. Just like with
- folders, you can right-click on messages in the message list and
- get a menu of possible actions.
- </para>
- <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. Almost all of them are also located 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.
- </para>
-
- <para>
- For an in-depth guide to the email capabilities of Ximian
- Evolution, read <xref linkend="usage-mail">.
- </para>
- </sect2>
- <sect2 id="basics-calendar">
- <title>Introducing the 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>Task</guilabel> pad, where you can
- keep a list of tasks separate from your calendar appointments.
- The day view in the calendar looks like this:
-
- <!-- ============== Figure ============================= -->
- <figure id="usage-calendar-fig">
- <title>Ximian Evolution Calendar View</title>
- <screenshot>
- <screeninfo>Ximian Evolution Contact Manager Window</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/calendar" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </screenshot>
- </figure>
- <!-- ============== End of Figure ============================= -->
-
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-1"
- format="png"></imageobject></inlinemediaobject> <guilabel>Appointment
- List</guilabel>
- </para>
-
- <para>
- The <guilabel>Appointment List</guilabel> is responsible for showing you all of
- your scheduled appointments, whether they are all day appointments or simply one time
- appointments that last a half an hour.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-2" format="png"></imageobject></inlinemediaobject>
- <guilabel>Task List</guilabel>
- </para>
-
- <para>
- The <guilabel>Task List</guilabel> compliments the
- <guilabel>Appointment List </guilabel> as it keeps track of
- tasks which don't have a time associated with them. Tasks can
- have complex notes associated with them, and you can also note
- their completeness on a percentage scale.
- </para>
-
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-3" format="png"></imageobject></inlinemediaobject>
- <guilabel>Calendar Window</guilabel>
- </para>
-
- <para>
- The <guilabel>Calendar Window</guilabel> has a graphical representation of
- the calendar, so you can select what days to view in the <guilabel>Appointment
- List</guilabel>.
- </para>
-
- <para>
- For more information about the calendar
- read <xref linkend="usage-calendar">.
- </para>
-
- </sect2>
- <sect2 id="basics-contacts">
- <title>Introducing the Address Book</title>
- <para>
- The <application>Ximian 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>Ximian Evolution</application> than it is to change an
- actual paper book. <application>Ximian Evolution</application> also
- allows easy synchronization with hand-held devices. Since
- <application>Ximian 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>Ximian Evolution</application>
- address book is its integration with the rest of the
- application. For example, you can create an address card from
- an email just by right-clicking on the sender's email address.
- </para>
- <para>
- To open 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> view. 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>
- <para>
- The address book looks like this:
-
- <figure id="usage-contact-fig">
- <title>Ximian Evolution Contact Interface</title>
- <screenshot>
- <screeninfo>Ximian Evolution Contact List Window</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/contact" format="png" srccredit="Kevin Breit">
- </imageobject></mediaobject>
- </screenshot>
- </figure>
- </para>
- <para>
- <inlinemediaobject><imageobject><imagedata fileref="figures/full-1"
- format="png"></imageobject></inlinemediaobject> <guilabel>Contact
- List</guilabel>
- </para>
- <para>
- The <guilabel>Contact List</guilabel> lists your contacts.
- </para>
- <para>
- For detailed instructions on how to use the address book,
- read <xref linkend="usage-contact">.
- </para>
- </sect2>
- </sect1>
-</chapter> \ No newline at end of file
diff --git a/help/C/usage-notes.sgml b/help/C/usage-notes.sgml
deleted file mode 100644
index 1ff2283128..0000000000
--- a/help/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/help/C/usage-print.sgml b/help/C/usage-print.sgml
deleted file mode 100644
index ebce544b9a..0000000000
--- a/help/C/usage-print.sgml
+++ /dev/null
@@ -1,115 +0,0 @@
-<chapter id="usage-print">
-<title>Printing with Evolution</title>
-<para>
- 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>
- <mediaobject><imageobject><imagedata fileref="figures/print-preview" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </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; <guilabel>Generic Postscript</guilabel>,
- whether to write to a PDF file, and whether to print to a file
- or to an actual printer in Generic Postscript. 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.
-
- <note id="windows-ps">
- <title>Printing to PostScript?</title>
- <para>
- PostScript is the file format used by most laser printers,
- and in UNIX world is the easiest way to print to a file.
- However, most systems running Microsoft Windows can't
- recognize or handle PostScript files. You'll need to print
- to PDF if you want to share your file with Windows users.
- </para>
- </note>
- </para>
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-dest">
- <title>Choosing a Printer</title>
- <screenshot>
- <screeninfo>Choosing a Printer</screeninfo>
- <mediaobject><imageobject><imagedata fileref="figures/print-dest" format="png" srccredit="Aaron Weber">
- </imageobject></mediaobject>
- </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/help/C/usage-sync.sgml b/help/C/usage-sync.sgml
deleted file mode 100644
index 5b93a65736..0000000000
--- a/help/C/usage-sync.sgml
+++ /dev/null
@@ -1,39 +0,0 @@
- <chapter id="usage-sync">
- <title>Synchronizing Evolution with Hand-Held Devices</title>
- <para>
- This chapter is very short. It describes how to synchronize
- the data on your Palm-OS device with the data you store in
- <application>Ximian Evolution</application>. If you need
- information on how to set up handheld synchronization, consult
- <xref linkend="config-sync">.
- </para>
-
- <sect1 id="hotsync">
- <title>Using HotSync</title>
- <para>
- Put your hand-held device in its cradle and press the
- HotSync button.
- </para>
-
-<tip id="sync-tip">
-<title>Palm OS v. 4.0 with Passwords</title>
-<para>
-If you use Palm OS v. 4.0 and have password protection turned on for
-your handheld device, you may encounter trouble synchronizing. If
-this happens, try turning off password protection on your handheld,
-synchronize it with your desktop computer, and then re-enable password
-protection on your handheld.
-</para>
-</tip>
- <para>
- If you have followed the set up instructions properly, your
- Palm-OS device will synchronize data with <application>Ximian
- Evolution</application>.
- </para>
-
- <para>
- That's it.
- </para>
-
- </sect1>
- </chapter>
diff --git a/help/COPYING-DOCS b/help/COPYING-DOCS
deleted file mode 100644
index b42936beb3..0000000000
--- a/help/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/help/ChangeLog b/help/ChangeLog
deleted file mode 100644
index 63c1785903..0000000000
--- a/help/ChangeLog
+++ /dev/null
@@ -1,1417 +0,0 @@
-2001-10-01 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: missing directory for figure file ref.
-
-2001-09-29 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Slightly improved encryption documentation.
-
-2001-09-26 Aaron Weber <aaron@ximian.com>
-
- * C/config-sync.sgml: Polish, describe names of conduits.
-
- * C/usage-sync.sgml: Minor changes.
-
-2001-09-25 Ettore Perazzoli <ettore@ximian.com>
-
- [Patch for Automake 1.5 compatibility pointed out by Richard
- Boulton <richard@tartarus.org>, as per #9258.]
-
- * sgmldocs.make ($(docname).sgml): Indent the rule with a tab
- instead of 8 spaces.
-
-2001-09-25 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: Added Right-click-bginfo a little.
-
- * C/usage-mail-org.sgml: s/virtual folder/vFolder
- also use of criterion/criteria.
-
-2001-09-24 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Fixed some brokenness
-2001-09-24 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Documented Insert -> Link a wee bit more
-
-2001-09-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Some grammar changes suggested by my girlfriend Amanda...props to Amanda!
-
- * C/usage-calendar.sgml: Verfied to make sure it was accurate against the calendar in functionality. Also added info about RSVP, scheduling appointments, and the like! Finally did this.
-
-2001-09-20 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: move to DocBook 4.1
-
- * C/usage-mail-org.sgml: move to DocBook 4.1
-
- * C/usage-mail.sgml: move to DocBook 4.1
-
- * C/config-sync.sgml: move to DocBook 4.1
-
- * C/apx-gloss.sgml: move to DocBook 4.1
-
- * C/evolution.sgml: move to DocBook 4.1
-
-2001-09-19 Aaron Weber <aaron@ximian.com>
-
- * C/usage-calendar.sgml: more meetings-by-mail additions. Had no
- idea this needed so much work.
-
- * C/usage-mail.sgml: Added info about meetings-by-mail.
-
- * C/menuref.sgml: added F9 instructions.
-
- * C/config-prefs.sgml: added info on how to connect to an arbitrary port.
-
- * C/usage-mail.sgml: Revised gnome-vfs-http-proxy info.
-
- * C/usage-exec-summary.sgml: added gnome-vfs-http-proxy
- info. Almost the same as the stuff in usage-mail.
-
- * C/usage-mail-org.sgml: removed regex item.
-
-2001-09-18 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Added a tip about the always encrypt button.
-
-2001-09-17 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: threaded mailview figure and img. added.
-
- * C/usage-sync.sgml: Note about PalmOS 4 and Password Protection.
-
- * C/figures/* (well, almost): New img.
-
-2001-09-15 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: linked to a now-obsolete section. changed link.
-
- * C/config-prefs.sgml: Man, this needed so much more than style
- revision-- the whole mail section had to be redone. Yech.
-
- * C/usage-mail.sgml: moved "sharing mail" tip from config-prefs.
-
- * C/config-prefs.sgml: style.
-
-2001-09-13 Aaron Weber <aaron@ximian.com>
-
- * C/usage-calendar.sgml: Add more info on tasks features.
-
-2001-09-11 Aaron Weber <aaron@ximian.com>
-
- * C/evolution.sgml: Validation issues.
-
-2001-09-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-contact.sgml: Contact lists.
-
- * C/usage-mail.sgml: Contact Lists.
-
- * C/menuref.sgml: Verified and Corrected.
-
-2001-09-10 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Verified that all functionality is in here, should be!
-
-2001-09-05 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: applied patch.
-
-2001-09-04 Aaron Weber <aaron@ximian.com>
-
- * C/evolution.sgml: Validation.
-
- * C/usage-print.sgml: Add .ps information.
-
- * C/usage-mail-org.sgml: Virtual Folder/vFolder, Ximian Evolution/Evolution.
-
-2001-09-04 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: Validate.
-
- * C/usage-mail.sgml: More html stuff.
-
- * C/apx-authors.sgml: Credit kmarass.
-
- * C/usage-contact.sgml: groups-of-contacts-management.
-
- * C/usage-mainwindow.sgml: Add more info, "whatis" section,
- "Ximian Evolution" and "vFolder."
-
- * C/evolution.sgml: "Ximian Evolution" not "Evolution"
-
- * C/preface.sgml: Moved "whatis" section to usage-mainwindow, as
- per new-outline.
-
- * C/usage-mail.sgml: Expand deletion info. Also composer work.
-
-2001-08-30 Aaron Weber <aaron@ximian.com>
-
- * C/apx-gloss.sgml: remove Spam, emoticon, haiku. Revise "Virus"
-
-2001-09-04 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-print.sgml: Added infoa about Windows not handling .ps
-
-2001-09-03 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Fixed brokenness
-
- * C/usage-mainwindow.sgml: Added info on Exchange interaction
-
-2001-08-30 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exec-summary.sgml: revise for style. added info about calendar customizing.
-
-2001-08-29 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: Added info about NS importing.
-
-2001-08-29 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-exec-summary.sgml: Rewrote this file to be...more up to date.
-
-2001-08-28 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Renamed a xref to make it work.
-
- * C/config-prefs.sgml: Updated for new LDAP UI.
-
-2001-08-24 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Added info about tables, rules, and images
-
- * C/usage-calendar.sgml: Rename a few titles
-
-2001-08-22 Aaron Weber <aaron@ximian.com>
-
- * C/apx-gloss.sgml: public key.
-
-2001-08-22 Peter Williams <peterw@ximian.com>
-
- * sgmldocs.make: Oops, we need to take the basename too.
-
-2001-08-22 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: Removed NNTP docs. Improved IMAP docs. IMAP
- still needs more work though.
-
- * C/config-prefs.sgml: Removed NNTP docs.
-
- * C/usage-mainwindow.sgml: s/todo/task list/, fix grammar/style.
-
-2001-08-22 Peter Williams <peterw@ximian.com>
-
- * sgmldocs.make (omf_timestamp): Put in a $(srcdir) here for when
- srcdir != builddir.
-
-2001-08-21 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Add `sgmldocs.make' to `EXTRA_DIST'.
-
-2001-08-20 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exec-summary.sgml: Moved introductory/basic content to the
- usage-mainwindow.sgml file. Rewrote intro.
-
- * C/usage-contact.sgml: Moved introductory/basic content to the
- usage-mainwindow.sgml file.Rewrote intro.
-
- * C/usage-calendar.sgml: Moved introductory/basic content to the
- usage-mainwindow.sgml file.Rewrote intro.
-
- * C/usage-mail.sgml: Moved introductory/basic content to the
- usage-mainwindow.sgml file.Rewrote intro.
-
- * C/usage-mainwindow.sgml: Put summary-type info into
- this file from other chapters.
-
- * C/topic.dat: New file. Help Menu info.
-
-2001-08-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Did more event -> appointment conversions.
-
-2001-08-18 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Renamed events to appointments (please
- review for me as it was a simple regex replace).
-
- * C/usage-mail.sgml: Removed "emoticon" and "root of all evil",
- removed gargantuan, removed instances of "the the", changes
- Virtual Folders to vFolders, renamed "Attachements and HTML Mail"
- section, reworded "Embellish" to say "Enhance"
-
-2001-08-17 Aaron Weber <aaron@ximian.com>
-
- * C/usage-exec-summary.sgml: s/My Evolution/Summary/
-
- * C/preface.sgml: Moved "Quickref" stuff to Menuref file.
-
- * C/usage-mainwindow.sgml: removed reference to faq.
-
- * C/menuref.sgml: Gutted. Filled with "quickref" stuff.
-
- * C/evolution.sgml: Removed FAQ. Re-added menuref. Menuref is now
- the "quick reference" section.
-
-2001-08-17 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Wrote documentation about HTML templates.
-
-2001-08-16 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: minor edits. Added <tip> about bug 7428.
-
-2001-08-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/evolution-C.omf: Place it under <category="GNOME|Applications"/>
-
-2001-08-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/Makefile.am: Small fix to build.
- * C/evolution-C.omf: Small fix. Remove an extra space.
- * no/Makefile.am: Same here.
- * no/evolution-no.omf: And here.
-
-2001-08-15 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Updated one line about bullet points.
-
-2001-08-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * no/*: Added beginnings of a Norwegian translation.
- * sgmldocs.make: Forgot to add this. Kinda important.
- * C/*.sgml: s/fig/figures/
- * C/Makefile.am: Make it use the sgmldocs.make framework.
-
-2001-08-14 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: Commented out menuref.
- * C/usage-contact.sgml: Commented out menuref.
- * C/evolution.sgml: commented out menuref.
- * C/preface.sgml: commented out menuref.
-
-2001-08-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * C/apx-authors.sgml: Added missing ;'s after entities.
- * C/evolution-C.omf: s/en/C in Language.
- * C/usage-mail-org.sgml: Add missing ;.
- * C/usage-mainwindow.sgml: Same here.
-
-2001-08-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail.sgml: Switched all images in entire document to
- *not* use file extensions, so that they work properly with
- db2ps. This doesn't completely fix the db2ps issues, but it's
- apparently the right way to do this.
-
-2001-08-09 Aaron Weber <aaron@ximian.com>
-
- * C/config-prefs.sgml: Made sharing tip an orderedlist.
-
-2001-08-08 Kevin Breit <battery841@mediaone.net>
-
- * C/config-prefs.sgml: Add information about sharing mailbox files.
-
-2001-08-03 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Add information about gathering actions.
-
-2001-08-02 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Added a <tip> for scrolling through mails.
-
-2001-07-30 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Fixed some breakage Aaron caused.
-
-2001-07-26 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: revised.
-
- * C/usage-mail.sgml: revisions and stuff.
-
-2001-07-24 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Reworded a few questions.
-
-2001-07-23 Kevin Breit <battery841@mediaone.net>
-
- * C/Makefile.am: Pulled instance of config-setupassist.sgml to make stuff build right.
-
-2001-07-23 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: validated.
-
- * C/config-setupassist.sgml: Removed.
-
- * C/evolution.sgml: removed config-setupassist.
-
- * C/usage-exec-summary.sgml: Minor revisions.
-
- * C/usage-contact.sgml: Added 'format="png"' to all <image> tags
- missing the attribute.
-
- * C/usage-calendar.sgml: Added 'format="png"' to all <image> tags
- missing the attribute.
-
- * C/usage-mail.sgml: Added 'format="png"' to all <image> tags
- missing the attribute.
-
- * C/usage-mainwindow.sgml: Style. Merged info from preface. Added
- 'format="png"' to all <image> tags missing the attribute.
-
- * C/preface.sgml: Style changes. Removed info that was duplicated
- in mainwindow.sgml.
-
-2001-07-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mainwindow.sgml: Fixed the first time druid stuff a little more.
-
-2001-07-16 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Sepllcheck.
-
-2001-07-15 Kevin Breit <battery841@mediaone.net>
-
- * C/config-sync.sgml: Updated slightly for new design.
-
-2001-07-13 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mainwindow.sgml: Added lots of good stuff with the first time druid.
-
-2001-07-12 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: TYPO fixing.
-
-2001-07-12 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Added "get bt for component-only crash" qandaentry.
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * */Makefile.am (dist-hook): Clean up make dist.
-
-2001-07-11 Aaron Weber <aaron@ximian.com>
-
- * C/evolution.sgml: validation on usage-mainwindow and usage-contact.
-
-2001-07-11 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: More edits.
-
- * C/usage-contact.sgml: Sick amounts of changes too!
-
- * C/usage-mail-org.sgml: Heavy editing...touched almost everything.
-
- * C/usage-exec-summary.sgml: Minor change. There was only one change for this chapter, cuz I'm such a 'godly' writer...yeah.
-
- * C/usage-mainwindow.sgml: A bit of editing.
-
- * C/preface.sgml: Screwed with the examples and did some cleanup.
-
-2001-07-10 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mail-org.sgml: validation.
-
-2001-07-10 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Added <application> tags
-
- * C/usage-mail-org.sgml: Added <application> tags
-
- * C/config-prefs.sgml: Added <application> tags
-
-2001-07-09 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-exec-summary.sgml: Editing
-
- * C/usage-mail.sgml: Editing
-
- * C/usage-mail-org.sgml: Editing
-
- * C/usage-calendar.sgml: Editing
-
- * C/usage-contact.sgml: Editing
-
- * C/usage-mail-org.sgml: Mention UNMATCHED
-
- * C/usage-mail.sgml: Commented on trash being a vFolder
-
-2001-07-06 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Spell check
-
- * C/usage-calendar.sgml: Spell check
-
-2001-07-05 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mainwindow.sgml: Added orderedlists.
-
- * C/usage-exec-summary.sgml: Added orderedlists.
-
- * C/usage-contact.sgml: Added orderedlists.
-
- * C/usage-mail-org.sgml: Added orderedlists.
-
-2001-07-03 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Put in lots of orderedlists...more SGML, less
- for the user to read. They'll thank me in droves later.
-
- * C/usage-exec-summary.sgml: Fixed build error
-
-2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * white-papers/mail/camel.sgml: Updated slightly.
-
- * Camel-Classes: Updated.
-
-2001-07-02 Kevin Breit <battery841@mediaone.net>
-
- * C/apx-common-tasks.sgml: Created its own file.
-
- * C/usage-mainwindow.sgml: You name it.
-
- * C/preface.sgml: Pulled shortcuts from here into its own apx
-
- * C/evolution.sgml: Reordered entities
-
-2001-06-30 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Pulled organizing stuff, made its own file.
-
-2001-06-26 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Revised move/rename/copy questions, now
- that these functions work.
-
-2001-06-25 Aaron Weber <aaron@ximian.com>
-
- * C/evolution-faq.sgml: Now that bug-buddy works with our
- bugzilla, update faq to reflect it.
-
-2001-06-25 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Put config-encryption in usage-mail.sgml.
- config-encryption.sgml should be depreciated.
-
- * C/usage-contact.sgml: Fixed typo
-
- * C/usage-mail.sgml: Added info about mailing lists Elaborated on
- mailing lists
-
- * C/usage-exec-summary.sgml: Fixed a few typos
-
- * C/preface.sgml: Added section for importing files
-
- * C/usage-calendar.sgml: Removed some *'s that are causing
- problems.
-
-2001-06-22 Kevin Breit <battery841@mediaone.net>
-
- * C/preface.sgml: Put in Contacts information in the quicktasks.
-
- * C/usage-mail.sgml: Pulled some redundant information.
-
-2001-06-21 battery841 <battery841@mediaone.net>
-
- * C/preface.sgml, C/fig/mail-inbox.png, C/fig/mainwindow-pic.png,
- C/usage-mail.sgml: Updated screenshots and redid layout for
- graphics on pages.
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-contact.sgml: Fixed .gif problem
-
- * C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Specify the file format
-
- * C/usage-contact.sgml, C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Trying to fix the .gif problem
-
- * C/fig/calendar.png, C/fig/contact.png, C/usage-calendar.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Redid graphics to add labels to them and
- described the labels in text.
-
- * C/config-encryption.sgml, C/evolution.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/evolution.sgml: Added config-encryption.sgml for building
-
- * C/fig/calendar.png, C/fig/config-cal.png, C/fig/config-mail.png,
- C/fig/filter-assist-fig.png, C/fig/filter-new-fig.png,
- C/fig/mail-composer.png, C/fig/mail-druid-pic.png,
- C/fig/mail-inbox.png, C/fig/print-dest.png,
- C/fig/print-preview.png, C/fig/vfolder-createrule-fig.png:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/fig/*png: Updated graphics for newer UI.
-
- * C/fig/full-1.png, C/fig/full-2.png, C/fig/full-3.png,
- C/fig/full-4.png, C/fig/full-5.png, C/fig/full-6.png,
- C/fig/full-7.png, C/fig/mainwindow-pic.png, C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Redid graphics to add labels to them and
- described in labels in text. Looks good!
-
- * C/usage-encryption.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/encryption.sgml: Added file
-
- * C/preface.sgml:
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * doc/ChangeLog: Moved my entires to doc/ChangeLog per request of
- danw
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-contact.sgml: Fixed .gif problem
-
- * C/usage-mail.sgml: Specify the file format
-
- * C/usage-mail.sgml: Trying to fix the .gif problem
-
- * C/usage-calendar.sgml: Redid graphics to add labels to them and
- described the labels in text.
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/evolution.sgml: Added config-encryption.sgml for building
-
- * C/fig/*png: Updated graphics for newer UI.
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Redid graphics to add labels to them and
- described in labels in text. Looks good!
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml:
-
-2001-06-21 Kevin Breit <battery841@mediaone.net>
-
- * C/encryption.sgml: Added file
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * ChangeLog: Moved my entires to doc/ChangeLog per request of danw
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/config-setupassist.sgml: Updated for new UI.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-sync: Reworded a little bit for more descrip.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-calendar.sgml: Documented categorizing an event.
-
-2001-06-20 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Updated Bcc: example
-
-2001-06-19 Aaron Weber <aaron@ximian.com>
-
- * C/usage-mainwindow.sgml: A couple changes to Kevin's update.
-
-2001-06-19 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-mail.sgml: Basic edits
-
-2001-06-19 Kevin Breit <battery841@mediaone.net>
-
- * C/usage-exec-summary: Updated to say "My Evolution"
-
-2001-06-19 Kevin Breit <battery841@mediaone.net>
-
- * C/apx-gloss.sgml: Added definition.
-
- * C/usage-mainwindow.sgml: Routine updates.
-
-2001-06-07 Duncan Mak <duncan@lumox.simplemente.net>
-
- * C/evolution-faq.sgml: Fixed a typo. Thanks to Greg Leblanc for
- pointing this out.
-
-2001-05-23 Ettore Perazzoli <ettore@ximian.com>
-
- * C/evolution-faq.sgml: Re-indented.
-
-2001-05-18 Duncan Mak <duncan@ximian.com>
-
- * C/evolution-faq.sgml: Added two questions about importing
- Outlook (text from Iain). Fixed some tags and cleaned up a bit
- here and there.
-
-2001-05-18 Ettore Perazzoli <ettore@ximian.com>
-
- * C/evolution-faq.sgml: Added a question about the permission
- issues with /var/spool/mail.
-
-2001-05-15 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am (SGML_FILES): Renamed to `GUIDE_SGML_FILES'.
- (EXTRA_DIST): Add `$(FAQ_SGML_FILES)'.
- (all): Depend on `evolution-faq' too.
- (evolution-faq): New.
- (install-data-local): Depend on `evolution-faq' too. Install the
- FAQ into `$(evolution_helpdir)/evolution-faq' and the guide into
- `$(evolution_helpdir)/evolution-guide'.
-
- * C/evolution-faq.sgml: New.
-
-2001-04-23 Jon Trowbridge <trow@ximian.com>
-
- * C/Makefile.am (install-data-local): Changed dependency for
- install-data-local from "evolution" to "evolution-guide".
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am (evolution-guide): Use `$(srcdir)' here.
-
-2001-04-23 Ettore Perazzoli <ettore@ximian.com>
-
- * C/Makefile.am (SGML_FILES): Add `evolution.sgml'.
- (evolution-guide): Process `evolution.sgml', not
- `evolution-guide.sgml'.
- (dist-hook): s/evolution-guide/evolution/
- (install-data-local): Likewise.
-
-2001-02-23 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-authors.sgml: s/helixcode/ximian (How I missed this page
- on the first go-round I don't know).
-
-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.
-
-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/help/Makefile.am b/help/Makefile.am
deleted file mode 100644
index 40c4c87e1c..0000000000
--- a/help/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = C no
-
-EXTRA_DIST = sgmldocs.make
diff --git a/help/README_Translations b/help/README_Translations
deleted file mode 100644
index cc02f1aa5e..0000000000
--- a/help/README_Translations
+++ /dev/null
@@ -1,46 +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). Doing 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 ;-) )
-
-
-Hctor Garca lvarez <hector@scouts-es.org>
diff --git a/help/devel/executive-summary/evolution-services.hierarchy b/help/devel/executive-summary/evolution-services.hierarchy
deleted file mode 100644
index 37559d819d..0000000000
--- a/help/devel/executive-summary/evolution-services.hierarchy
+++ /dev/null
@@ -1,7 +0,0 @@
-GtkObject
- BonoboObject
- ExecutiveSummaryComponent
- ExecutiveSummaryComponentFactory
- Handle to remote Bonobo::Unknown
- ExecutiveSummaryComponentFactoryClient
- ExecutiveSummaryHtmlView
diff --git a/help/devel/importer/evolution-shell-importer.hierarchy b/help/devel/importer/evolution-shell-importer.hierarchy
deleted file mode 100644
index c46ebdf782..0000000000
--- a/help/devel/importer/evolution-shell-importer.hierarchy
+++ /dev/null
@@ -1,7 +0,0 @@
-GtkObject
- BonoboObject
- BonoboXObject
- EvolutionImporter
- EvolutionImporterListener
- Handle to remote Bonobo::Unknown
- EvolutionImporterClient
diff --git a/help/es.po/apx-authors.sgml.po b/help/es.po/apx-authors.sgml.po
deleted file mode 100644
index 362ac349fa..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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> Traduccin al espaol realizada por\n"
-" Hctor Garca lvarez (<email>hector@scouts-es.org</email>). \n"
-" Por favor enve todos los comentarios y sugerencias sobre esta \n"
-" traduccin 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 cdigo 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 aplicacin y el proyecto de documentacin de\n"
-" GNOME. Por favor enve todos sus comentarios y sugerencias acerca de\n"
-" este manual al proyecto de documentacin de GNOME a\n"
-" <email>docs@gnome.org</email>. Tambin 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"
-" Documentacin 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 ms informacin por favor visite la \n"
-" <ulink url=\"http://www.helixcode.com/apps/evolution.php3\"\n"
-" type=\"http\">pgina web</ulink> de <application>Evolution\n"
-" </application>. Por favor enve 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 lnea en <ulink\n"
-" url=\"http://bugs.gnome.org/Reporting.html\" type=\"http\">\n"
-" http://bugs.gnome.org/Reporting.html</ulink>. Tambin puede usar el\n"
-" comando <command>bug-buddy</command> para enviar reportes de fallo.\n"
-" </para>\n"
diff --git a/help/es.po/apx-bugs.sgml.po b/help/es.po/apx-bugs.sgml.po
deleted file mode 100644
index 58f9c2f63e..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 todava es software en fase beta, as que el seguimiento\n"
-" de errores es mejor dejrselo al sistema bugzilla y a los \n"
-" programadores. Eso s, hay cierto nmero de limitaciones que\n"
-" no sern corregidas antes de la versin 1.0. Las ms notables son: \n"
-" Importacin 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 apndice 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 lnea de comandos) si encuentra\n"
-" algn 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/help/es.po/apx-gloss.sgml.po b/help/es.po/apx-gloss.sgml.po
deleted file mode 100644
index 2ccd5c8472..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 ms comn 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 trminos de un correo electrnico, 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 pgina web. La\n"
-" cortesa dicta que debe tener una longitud inferior a cuatro lneas.\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, nmeros de telfono 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 informacin de contacto. Similar en\n"
-" apariencia a una pequea 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 expresin regular, o \"regex\", es una forma de describir una\n"
-" cadena de texto usando meta caracteres o smbolos 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 expresin, 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"
-" documentacin 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 paquea caja con texto explicatorio que aparece cuando el puntero\n"
-" del ratn permanece sin moverse sobre un botn 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 enva correo. <application>Evolution</application>\n"
-" puede usarlo en lugar de <glossterm>SMTP</glossterm>; algunas\n"
-" personas lo prefieren porque permite ms flexibilidad, pero es ms\n"
-" difcil 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 rpido acceso a la partes de la aplicacin\n"
-" usadas ms 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 sincronizacin es una pequea aplicacin que controla la\n"
-" transferencia de informacin 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 poesa tradicional japonesa. Los poemas son de tres\n"
-" lneas, donde la primera y la ltima tienen cinco slabas, y la\n"
-" segunda lnea tiene siete slabas.\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 perversin de la tpica nomenclatura de ordenadores\n"
-" (y especialmente en Unix y Linux), la parte ms alta del rbol se\n"
-" llama el directorio raz, y se denota por <systemitem><filename>/\n"
-" </filename></systemitem>. El resto de las \"ramas\" se extienden\n"
-" desde la raz. No confundir el directorio raz (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"
-" Tambin llamados \"smileys\", los emoticones son pequeas caras "
-"puestas\n"
-" de lado echas de puntos y parntesis que la gente usa para expresar\n"
-" emociones en los correos electrnicos. 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 mtodo de comunicacin acordado, especialmente uno acordado para\n"
-" enviar tipos particulares de informacin entre ordenadores\n"
-" Ejemplos son POP (Protocolo de Oficina de Correo), para el correo, y\n"
-" HTTP (Protocolo de Transferencia de Hipertexto), para pginas 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 informacin\n"
-" rpidamente. Permite bsquedas ms rpidas 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 aplicacin 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 prxima generacin del\n"
-" gestor de archivos de <acronym>GNOME</acronym> que est desarrollando\n"
-" la compaa 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 seccin 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 informacin 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 aplicacin con la que una persona lee y\n"
-" enva correos electrnicos. En el otro lado estn 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, permitindole expandirse a ms programas y a otros "
-"ordenadores.\n"
-" Un virus puede causar daos 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 sinnimo de \"macro,\" para denotar\n"
-" una serie de comando o acciones pre grabados en una aplicacin.\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 gua al usuario a travs 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 direccin de correo electrnico.\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 bsqueda compleja. Los\n"
-" contenidos de la carpeta se actualizan dinmicamente.\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 aadidos 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 conversacin, 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"
-" tpicamente (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 trmino que describe la aplicacin que ayuda a\n"
-" grupos de persones a trabajar juntas. Tpicamente, esta aplicacin\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 rpidas son combinaciones de teclado usadas para realizar\n"
-" acciones en el ordenador en lugar de usar el ratn para la misma\n"
-" accin. Las teclas rpidas 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 pgina en documentos "
-"electrnicos\n"
-" como pginas web, archivos de ayuda, y mensajes de correo. El HTML se\n"
-" puede usar en el correo electrnico y en los grupos de noticias para\n"
-" insertar imgenes 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 travs de una shell o un\n"
-" administrador de archivos. Esta precaucin de seguridad previene "
-"contra\n"
-" la ejecucin automtica o accidental de programas maliciosos. Para ms\n"
-" informacin acerca de archivos ejecutables y permisos de archivos,\n"
-" consulte la documentacin 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 intil. El spam normalmente aparece como cartas\n"
-" encadenadas y publicidad de compaas sin escrpulos o sin sentido.\n"
-" Los mensajes que no valen para nada se conocen como \"boletnes\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 mtodo\n"
-" para ordenar el correo automticamente. Puede crear filtros para\n"
-" realizar una o ms 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 Automtico</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 Rpida</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 lnea</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>Expresin 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/help/es.po/config-prefs.sgml.po b/help/es.po/config-prefs.sgml.po
deleted file mode 100644
index e83d4ff5c9..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 pestaa <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 ms difcil de "
-"configurar,\n"
-" pero ofrece ms 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 categoras. Esta parte contiene\n"
-" una miscelnea 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 opcin, enviar sus\n"
-" mensajes en HTML por defecto. Si no la selecciona, sus\n"
-" mensajes se enviarn sin formato HTML a menos que "
-"seleccione \n"
-" <menuchoice> <guimenu>Formato</guimenu> "
-"<guimenuitem>HTML</guimenuitem>\n"
-" </menuchoice> en la ventana de composicin de mensajes.\n"
-" Vea <xref linkend=\"usage-mail-getnsend-send-html\">\n"
-" para ms informacin acerca del correo en HTML.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term> \n"
-" <guilabel>Marcar Mensajes como Ledos Pasados</guilabel>\n"
-" </term>\n"
-" <listitem><para> \n"
-" Cuando selecciona un mensaje,\n"
-" <application>Evolution</application> esperar un\n"
-" momento antes de marcarlo como ledo. 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 caracterstica avanzada y que puede "
-"hacer\n"
-" que pierda algunos mensajes, as que probablemente\n"
-" primero debera hacer una copia de seguridad de su\n"
-" directorio <systemitem><filename>evolution</"
-"filename> </systemitem>\n"
-". Adems, 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 pestaa <interface>Fuentes de Correo</interface> le permite\n"
-" editar, aadir, o borrar mtodos de obtener el correo de los\n"
-" servidores. Pulsando en <guibutton>Aadir</guibutton> o\n"
-" <guibutton>Editar</guibutton> aparecer una caja de dilogo 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 debera ser la parte de delante de la @\n"
-" de su direccin 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>Autentificacin:</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"
-" varan 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 autentificacin ofrece.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Probar Configuracin</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Pulse este botn para que\n"
-" <application>Evolution</application> compruebe si sus\n"
-" fuentes de correo estn 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 pestaa\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 aadir un nuevo servidor LDAP a su carpeta de contactos\n"
-" disponibles, seleccin <menuchoice><guimenu>Acciones</"
-"guimenu>\n"
-" <guimenuitem>Nuevo Servidor de Directorio</guimenuitem>\n"
-" </menuchoice>. Esto mostrar una pequea caja de dilogo 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>Descripcin</guilabel> &mdash; un descripcin "
-"larga del servidor.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Servidor LDAP</guilabel> &mdash; la direccin "
-"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 Raz</guilabel> &mdash; entre el DN raz "
-"aqu.\n"
-" </para></listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:190
-msgid " <title>Adding Directory Servers</title>\n"
-msgstr " <title>Aadiendo 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>Aadir</guibutton> para aadir 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 aparecern detrs 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 razn para no tenerlos al lado de su correo. La\n"
-" primera vez que seleccione la pestaa <guilabel>Servidor de\n"
-" Noticias</guilabel>, ver una caja vaca con tres botones ya\n"
-" familiares a la derecha: <guibutton>Aadir</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 vlido. "
-"Para\n"
-" que lo haga, pulse el botn <guilabel>Comprobar\n"
-" Configuracin</guilabel>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:231
-msgid " <title>Mail Settings</title>\n"
-msgstr " <title>Configuracin 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 configuracin de correo, seleccione <menuchoice>\n"
-" <guimenu>Configuracin</guimenu> <guimenuitem>Configuracin\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 estn separadas en varias categoras:\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 ms identidades para\n"
-" su correo electrnico.\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 pestaa le permite indicar a\n"
-" <application>Evolution</application> de donde obtener el\n"
-" correo que le enven 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 pestaa 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"
-" caractersticas 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"
-" Configuracin miscelnea 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 ledo.\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, seleccin\n"
-" <menuchoice><guimenu>Configuraciones</guimenu>\n"
-" <guimenuitem>Configuracin del\n"
-" Calendario</guimenuitem></menuchoice> desde la vista del\n"
-" calendario. Esto abrir la ventana de\n"
-" <interface>Preferencias</interface>. Contiene cuatro pestaas:\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>Dilogo de Preferencias del Calendario</title>\n"
-"\t<screenshot>\n"
-"\t <screeninfo>Si esto funcionase en mi trabajo tambin 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 aadir una nueva identidad, simplemente pulse\n"
-" <guibutton>Aadir</guibutton>. Para modificar una identidad\n"
-" ya existente, seleccione la de la pestaa\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>Configuracin 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>Direccin de Correo:</guilabel> Escriba su "
-"direccin\n"
-" de correo en este espacio.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Organizacin:</guilabel> Si enva mensajes en\n"
-" representacin de una compaa u otra organizacin,\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"
-" pequeo archivo de texto para que sea aadido a todos los\n"
-" mensajes que mande. Tpicamente, los archivos de firma\n"
-" incluyen la direccin u otra informacin de contacto, o su\n"
-" cita preferida. Es una buena costumbre hacer que no tenga\n"
-" ms de cuatro lneas.\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 enva el correo desde una\n"
-" sola direccin, tan solo deber configurar una identidad. De todos\n"
-" modos, si quiere puede tener mltiples 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 recepcin y envo 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 configuracin que en dicho programa. La\n"
-" configuracin relacionada con la Red se encuentra en las pestaas\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 configuracin de sus citas.\n"
-" Cualquiera que sea la razn, usted quiere cambiar su configuracin\n"
-" de <application>Evolution</application>. Este captulo 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 pestaa <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 botn "
-"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 pestaa de <interface>colores</interface> le permite decidir\n"
-" de que color ser su calendario. La pestaa 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 botn\n"
-" de color a la derecha de cada elemento, mostrar una ventana de\n"
-" seleccin de color donde podr elegir a que color cambiar el\n"
-" elemento. Pulsando <guibutton>ACEPTAR</guibutton> en el dilogo de\n"
-" seleccin 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 pestaa 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 opcin para que <application>Evolution</application> emita un\n"
-"\t pitido para la alarma que haya fijado. Si deja esta opcin sin\n"
-"\t marcar, <application>Evolution</application> tan solo le alertar de\n"
-"\t los sucesos abriendo un ventana de dilogo. 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 opcin para que las alarmas auditivas cesen\n"
-"\t automticamente pasados un nmero 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 opcin 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>Configuracin Avanzada</title>\n"
-
-#: tmp/config-prefs.sgml.h:482
-msgid " <title>Alarms Settings</title>\n"
-msgstr " <title>Colocacin 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>Configuracin 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>Configuracin de la Red</title> \n"
-
-#: tmp/config-prefs.sgml.h:492
-msgid " <title>Time Display Settings</title>\n"
-msgstr " <title>Configuracin de las Vistas del Tiempo</title>\n"
-
-#: tmp/config-prefs.sgml.h:494
-msgid " <title>To Do List Settings</title>\n"
-msgstr " <title>Configuracin 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 informacin muestra la lista Por Hacer y la manera\n"
-" como la muestra. Las dos reas de la pestaa <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 opcin contiene tres elementos. Si marca las casillas\n"
-" a su lado, esa informacin 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 lneas entre los das y la\n"
-" parte de arriba de la vista.\n"
-" </para>\n"
-" </listitem>\n"
-"\n"
-" <listitem>\n"
-" <para> <guilabel>Ttulos:</guilabel> Color del texto para los\n"
-" nombres de los das y los meses y para otros ttulos.\n"
-" </para>\n"
-" </listitem>\n"
-"\n"
-" <listitem>\n"
-" <para> <guilabel>Das vacos:</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>Da 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>Nmeros de los das:</guilabel> Color del texto para "
-"los nmeros de las fechas.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" \n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <guilabel>Nmero del da actual:</guilabel> Color del texto "
-"para la fecha del da 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 estn an dentro del plazo.\n"
-" (Quiz sea el color de fondo? avergualo!)\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 configuracin se cubrirn aqu,\n"
-" segn 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/help/es.po/config-setupassist.sgml.po b/help/es.po/config-setupassist.sgml.po
deleted file mode 100644
index aac50943ec..0000000000
--- a/help/es.po/config-setupassist.sgml.po
+++ /dev/null
@@ -1,446 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 configuracin (algunas veces llamado \n"
-"\t <glossterm>Druida</glossterm>, por analoga con los \"Magos\"\n"
-"\t que usan otros programas) le guiar a travs del proceso de "
-"configuracin\n"
-"\t de la red. Le preguntar acerca de alguna informacin bsica. Su\n"
-"\t administrador de sistemas o su proveedor de Internet debera tener\n"
-"\t las respuestas que necesitar. El asistente para la configuracin 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 Configuracin 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 informacin:\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>Direccin de correo electrnico:</guilabel></"
-"term>\n"
-"\t <listitem><para>\n"
-" Su direccin de correo completa.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Organizacin:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Cualquier organizacin a la que represente, o la compaa 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 aadido a cualquier mensaje que enve. Una\n"
-" firma tpica consiste en su nombre y su direccin de correo,\n"
-" o una cita que le guste. Es una buena medida mantener su\n"
-" \"firma\" corta: cuatro lneas son suficientes. Recuerde,\n"
-" que esto se adjuntar a todos los mensajes que enve.\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 mltiples fuentes si "
-"lo\n"
-" desea; vea <xref\n"
-" linkend=\"config-prefs-mail-network\"> para ms\n"
-" informacin.\n"
-" </para>\n"
-" <para>\n"
-" Si decide que <application>Evolution</application>\n"
-" no use ningn 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 enva 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 carcter @, 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>Autentificacin:</guilabel></term> \n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Seleccin el tipo de autentificacin que usar. "
-"Puede pulsar <guibutton>Detectar tipos soportados</guibutton> "
-"para\n"
-" averiguar que protocolos de autentificacin 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 envo 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 ms\n"
-" comn.\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"
-"\tconfiguracin del correo</interface> para ayudarle con la configuracin "
-"de\n"
-"\tsu correo. Si no piensa usar el correo electrnico, o si prefiere\n"
-"\tocuparse de la configuracin de su correo ms 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"
-" configuracin del correo le pedir algunos datos bsicos, para que\n"
-" <application>Evolution</application> le deje usar el correo. Si\n"
-" prefiere una configuracin ms detallada, o si quiere realizar\n"
-" cambios en una configuracin 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>Configuracin Fcil con el Asistente</title>\n"
-
-#: tmp/config-setupassist.sgml.h:176
-msgid " <title>Mail Setup</title>\n"
-msgstr " <title>Configuracin 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 variarn ligeramente dependiendo de la configuracin 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 conexin\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 ms informacin acerca de los\n"
-" servidores de correo.\n"
-"-->\n"
diff --git a/help/es.po/config-sync.sgml.po b/help/es.po/config-sync.sgml.po
deleted file mode 100644
index 42a1511eed..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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>Prevencin de Prdida 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 sern:\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 informacin 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 informacin 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 sincronizacin 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 sincronizacin 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 sincronizacin</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 seccin\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"
-" mayora, querra quedarse con <guilabel>Sincronizar</guilabel>.\n"
-" Entoces, ponga el dispositivo de mano en su cuna y presione el\n"
-" botn de sincronizacin.\n"
-" </para>\n"
diff --git a/help/es.po/evolution.sgml.po b/help/es.po/evolution.sgml.po
deleted file mode 100644
index 5bc1f0a268..0000000000
--- a/help/es.po/evolution.sgml.po
+++ /dev/null
@@ -1,165 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 compaas para distinguir sus\n"
-" productos y servicios estn registrados como marcas. Cuando\n"
-" aparecen esos nombres en la documentacin de GNOME, y el Proyecto\n"
-" de Documentacin de GNOME tiene conocimiento de dichas marcas,\n"
-" estos han sido escritos en maysculas o empiezan con maysculas.\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, adems\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 Configuracin hasta una visin a fondo de los dilogos 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"
-" Segn vaya utilizando estas cosas descubrir que hay ms de\n"
-" una manera de hacer las cosas, y puede puede elegir el mtodo\n"
-" que ms 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 mens y los\n"
-" comandos de los mens 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 trminos de la <ulink type=\"help\"\n"
-" url=\"gnome-help:fdl\"><citetitle>Licencia de Documentacin Libre\n"
-" de GNU</citetitle></ulink>, Versin 1.1 o posteriores versiones\n"
-" publicadas por la Fundacin 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 Documentacin Libre de GNU</"
-"citetitle>n de la Fundacin 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 gua 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/help/es.po/menuref.sgml.po b/help/es.po/menuref.sgml.po
deleted file mode 100644
index f9d68a84ab..0000000000
--- a/help/es.po/menuref.sgml.po
+++ /dev/null
@@ -1,3062 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 ms informacin 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 ms informacin.\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, segn 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 ordenacin mediante este atributo, y dejar la lista\n"
-" segn el orden anterior.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Agrupar segn 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 posicin 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 posicin 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 ledo (cerrado para no ledo, abierto para ledo).\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>Un Signo de Exclamacin</guiicon> para la "
-"prioridad\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>Un Pingino</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>Tamao</guilabel>, para el tamao 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>Alineacin</guimenuitem></term>\n"
-"\t <listitem><para> Use este elemento para decidir sobre la alineacin\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 Colocacin</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 informacin 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 todava.\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 dilogo que le permite elegir una ordenacin 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 direccin\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 direccin\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 segn el Asunto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Este elemento, y los tres que le siguen, crearn carpetas \n"
-" virtuales que podr personalizar ms o guardar tal cual. Este crear una\n"
-" carpeta virtual que mostrar todos los mensajes que contengan "
-"la \n"
-" lnea del asunto del mensaje seleccionado. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder segn 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 segn 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 segn el Asunto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Este elemento, y los tres siguientes, crearn filtros para los "
-"que \n"
-" debe elegir una accin. 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 lnea del \n"
-" asunto del mensaje seleccionado. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filtrar segn 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 segn 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 estn\n"
-" al lado de los elementos en los propios mens.\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Deshacer</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Deshace la ltima accin 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 opcin.\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 edicin 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"
-" posicin 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 Expresin</guimenuitem>, \n"
-" <guimenuitem>Buscar de nuevo</guimenuitem>, y\n"
-" <guimenuitem>Remplazar</guimenuitem>, <application>Evolution</"
-"application>\n"
-" le ofrecer la opcin de buscar hacia adelante o hacia "
-"atras.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Buscar Expresin</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Si esta familiarizado con las <glossterm>expresiones "
-"regulares</glossterm>,\n"
-" ha veces llamadas \"regexes\", puede buscar cosas ms "
-"complicadas, \n"
-" usando comodines y lgica 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 bsqueda.\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 gustara\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 opcin muestra el Capplet de Propiedades del Compositor "
-"de Mensajes,\n"
-" una parte del Centro de Control de GNOME ue determina la \n"
-" asociacin 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 mayora de ellos\n"
-" requieren que haya un mensaje seleccionado, y estn tambien\n"
-" disponibles pulsando con el botn 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 Ledos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t <application>Evolution</application> se acuerda de que mensajes ha \n"
-"\t ledo; para marcar todos los mensajes de una carpeta como ledos "
-"elija esta opcin.\n"
-"\t Puede marcar un solo mensaje como ledo pulsando con el botn "
-"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 opcin 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 opcin 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 conversin.\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 ttulos\n"
-" individuales &mdash;\n"
-" <guilabel>Asunto</guilabel>, por ejemplo, para ordenar la lista\n"
-" de mensajes por ese atributo. Eso si, si pulsa el botn derecho\n"
-" sobre uno de los ttulos, 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 todava fijo, as que no lo\n"
-" voy a documentar todava. (Esto significa ARREGLAME). Deberian\n"
-" ser:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Descripcin\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Descripcin\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Descripcin\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 opcin 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 opcin 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 Ortogrfico</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Comprueba la ortografa 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 opcin:\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 caracterstica.\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 opcin:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Nuevo Servidor de Directorio</guimenuitem></term> "
-"<listitem><para> Muestra una ventana\n"
-"\t de bsqueda en profundidad. <xref\n"
-"\t linkend=\"config-prefs-contact-ldap-add\"> describe como usar esta\n"
-"\t caracterstica. </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 posicin y nombre actual. Si todava no "
-"ha elegido\n"
-" una posicin 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 posicin 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 Configuracin de Pgina</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 Impresin</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 tendrn su cita si la\n"
-" imprime. Vea <xref linkend=\"usage-print\">\n"
-"\t para ms detalles sobre imprimir y la funcin 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 todava:\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 vaco.\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 ms 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 imgenes, 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 creacin de enlaces</"
-"interface>,\n"
-" que le permite especificar la URL y un descripcin 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>dilogo de creacin de reglas horizontales</"
-"interface>, el cual le permite\n"
-"\t crear una regla horizontal en HTML. Para ms informacin, 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 opcin 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 aadiendo\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 opcin. \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 opcin. \n"
-" Vea <xref linkend=\"usage-mainwindow-folderbar\"> para \n"
-" ms informacin acerca de la barra de carpetas. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Vista por Das</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 Das</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Muestra cinco das 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 "
-"opcin. \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 opcin. \n"
-" Vea <xref linkend=\"usage-mainwindow-folderbar\"> para \n"
-" ms informacin 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 opcin 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 Reunin</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Aparece la ventana de <interface>Invitacin de Reunin</"
-"interface>, \n"
-" descrita en <xref linkend=\"usage-calendar-apts\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cancelar Invitacin</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 descripcin 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 peticin 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 informacin.\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 opcin. \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 opcin. \n"
-" Vea <xref linkend=\"usage-mainwindow-folderbar\"> para \n"
-" ms informacin 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 opcin controla si la lista de sus mensajes se muestra "
-"siguiendo la cadena de la discusin \n"
-" o por otro criterio. La ordenacin por defecto es por "
-"fecha.\n"
-" Vea <xref linkend=\"usage-mail-listorder\"> para ms\n"
-"informacin 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 ms informacin 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>Configuracin 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 Contrasea</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Esta opcin hara que <application>Evolution</application>\n"
-"\t olvide sus contraseas.\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 rpida, 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 gua 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 podrn arreglarlos. Selececion "
-"esta opcin 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 informacin sobre la aplicacin y sus "
-"autores.\n"
-" Tiene la misma informacin 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 opcin:\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 opcin 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 Configuracin 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 Edicin</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 Configuracin 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 Botn 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 ms mens\n"
-" especializados, y ms opciones de men especializadas, que cualquier\n"
-" otra parte de la aplicacin.\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 mens <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 mens 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 mens 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 composicin de mensajes tiene su propio juego de mens:\n"
-" <guimenu>Archivo</guimenu>, que controla las operaciones sobre los\n"
-" archivos y los datos, <guimenu>Editar</guimenu>, para la edicin de\n"
-" textos, <guimenu>Formato</guimenu>, que controla el formato de los\n"
-" mensajes que enva, <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 mens:\n"
-" <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,\n"
-" <guimenu>Vista</guimenu>, <guimenu>Configuracin</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 mens, 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>Mens del Administrador de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1358
-msgid " <title>Mail Menus</title>\n"
-msgstr " <title>Mens del Correo</title>\n"
-
-#: tmp/menuref.sgml.h:1360
-msgid " <title>Menus that are the same everywhere</title>\n"
-msgstr " <title>Mens que son iguales en todas partes</title>\n"
-
-#: tmp/menuref.sgml.h:1362
-msgid " <title>The Appointment Editor Menus</title>\n"
-msgstr " <title>Los Mens del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1364
-msgid " <title>The Calendar Menus</title>\n"
-msgstr " <title>Los Mens del Calendario</title>\n"
-
-#: tmp/menuref.sgml.h:1366
-msgid " <title>The Contact Editor Menus</title>\n"
-msgstr " <title>Los Mens del Editor de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1368
-msgid " <title>The Message Composer Menus</title>\n"
-msgstr " <title>Los Mens 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 seccin en blanco hasta que la UI se estabilize un\n"
-" poco ms.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1375
-msgid " <title>Executive Summary Menus</title>\n"
-msgstr " <title>Mens 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 mens 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 seccin\n"
-" servir como referencia de todos esos mens, 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 edicin de mensajes, citas, y\n"
-" contactos todas tienen barras de herramientas propias. De izquierda a\n"
-" derecha, los mens que tiene disponible cuando est leyendo el correo\n"
-" son: <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,\n"
-" <guimenu>Vista</guimenu>, <guimenu>Configuracin</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 mens 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 mens relacionados con el\n"
-" correo; para su calendario, tendr opciones relacionadas con\n"
-" calendarios. Algunos mens, naturalmente, como\n"
-" <guimenu>Ayuda</guimenu> y <guimenu>Archivo</guimenu> no cambian mucho,\n"
-" si es que lo hacen, porque son funciones ms universales. Pero usted\n"
-" nunca marcar una tarjeta de direccin como \"leidao\", o pondra\n"
-" recurrencia a un mensaje que ha recivido. Dependiendo de si esta "
-"mirando\n"
-" el correo, los contactos, o la informacin del calendario. \n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1409
-msgid " <title>Menu Reference</title>\n"
-msgstr " <title>Referencias de los Mens</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/help/es.po/preface.sgml.po b/help/es.po/preface.sgml.po
deleted file mode 100644
index 705365fbfc..0000000000
--- a/help/es.po/preface.sgml.po
+++ /dev/null
@@ -1,932 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 estn escritas con una tipografa "
-"especial:\n"
-" <simplelist>\n"
-"\t <member><application>Aplicaciones</application></member>\n"
-"\t <member><command>Comandos</command> escritos en la lnea de comandos</"
-"member>\n"
-"\t <member><guilabel>Etiquetas</guilabel> de elementos de la interfaz</"
-"member>\n"
-"\n"
-" <member> La opcciones de los mens aparecen as:\n"
-" <menuchoice>\n"
-" <guimenu>Men</guimenu>\n"
-" <guisubmenu>Sub-men</guisubmenu> \n"
-" <guimenuitem>Opcin 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 estn 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 Tipogrficos</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>Mail\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 estn 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><guimenuitem>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 informacin\n"
-" de contacto, y uno o ms 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 diseada para hacer la\n"
-" mayora de las tareas diarias ms rpido. 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 ms rpidas y eficientes, para que las bsquedas\n"
-" sean ms rpidas y el uso de la memoria sea menor. Las personas\n"
-" que reciben mucho correo apreciarn las caractersticas avanzadas\n"
-" como las <link\n"
-" linkend=\"usage-mail-organize-vFolders\">Carpetas Virtuales</link>,\n"
-" que le permiten guardar bsquedas 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 liberacin de prueba</title>\n"
-" <para>\n"
-" <application>Evolution</application> no esta completa, y\n"
-" todava tiene muchos fallos. Por favor aydenos 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 lnea 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 cdigo fuente estn liberados bajo los trminos de\n"
-" la <ulink type=\"help\" url=\"gnome-help:gpl\"><citetitle>General "
-"Public License \"Licencia Pblica\n"
-" General\" (GPL)</citetitle></ulink> de GNU, y la\n"
-" documentacin est bajo la <ulink type=\"help\"\n"
-" url=\"gnome-help:fdl\"><citetitle>Free Documentation\n"
-" License \"Licencia Libre de Documentacin\"</citetitle></ulink>\n"
-" (FDL). Para ms informacin acerca de la GPL y de la FDL,\n"
-" visite el sitio web de la Free Software Foundation \"Fundacin 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 estn las tareas ms comunes con el correo, y los\n"
-" atajos para manejarse por su buzn con el teclado en lugar\n"
-" de con el ratn:\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 especfico desde el men que\n"
-" aparece al pulsar el botn derecho del ratn. \n"
-" Alternativamente, seleccion un mensaje, y elija\n"
-" <menuchoice><guimenu>Configuracin</guimenu>\n"
-" <guimenuitem>Filtros de Correo</guimenuitem> </menuchoice>\n"
-" o <menuchoice> <guimenu>Configuracin</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 informacin 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 informacin personal sean\n"
-" ms fciles, 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 aplicacin 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 aplicacin.\n"
-" Desde los guiones ms simples a la programacin de red y\n"
-" componentes ms 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 informacin, 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 seccin es para usted. La segunda "
-"seccin,\n"
-" cubriendo la <link linkend=\"config\">configuracin</link>, est\n"
-" dirijida a usuarios ms 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 mens</"
-"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 versin de la Gua de Usuario de\n"
-" <application>Evolution</application> es un\n"
-" <emphasis>borrador</emphasis>. Describe la versin 0.6 del\n"
-" programa. Le faltan grandes piezas de informacin, y muchas de\n"
-" las arecteristicas que describe no estn implementadas.\n"
-" Todo el contenido esta sujeto a cambios, especialmente si usted\n"
-" colabora. Por favor ebvie comentarios sobre la gua a\n"
-" <email>aaron@ximian.com</email> y sobre la traduccin a\n"
-" <email>hector@scouts-es.org</email>. Si le gustara colaborar en la\n"
-" gua 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 Documentacin de GNOME. Este prrafo\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 seccin y pegarla a la pared de al "
-"lado\n"
-" de su ordenador: es un resumen muy corto de la mayora de las cosas\n"
-" que querr hacer con <application>Evolution</application>, y \n"
-" referencias a las secciones del libro donde encontrar "
-"descripciones\n"
-" ms profundas de dichas tareas.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:420
-msgid " <title>Introduction</title> \n"
-msgstr " <title>Introduccin</title> \n"
-
-#: tmp/preface.sgml.h:422
-msgid " <title>Quick Reference for Common Tasks</title>\n"
-msgstr " <title>Referencia Rpida 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/help/es.po/usage-calendar.sgml.po b/help/es.po/usage-calendar.sgml.po
deleted file mode 100644
index 3654bd4910..0000000000
--- a/help/es.po/usage-calendar.sgml.po
+++ /dev/null
@@ -1,816 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 ms informacin 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"
-" informacin ms 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 configuracin, pulse en el icono\n"
-"\tdel disco en la barra de herramientas. Esto guardar el evento y cerrar\n"
-"\tla ventana de edicin 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 botn derecho del ratn 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 botn <guibutton>Nuevo</guibutton> a la izquierda de la barra\n"
-"\tde herramientas. El dilogo 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>Clasificacin</guilabel> es un poco ms complicado,\n"
-" y solo afecta a los calendarios en red.\n"
-" <guilabel>Pblico</guilabel> es la categora por defecto,\n"
-" y un evento pblico puede ser visto por cualquiera en la red de\n"
-" conparticin 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 opcin 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 aplicacin adicional se\n"
-"\t ejecute como recordatorio. Puede escribir su nombre en el campo\n"
-"\t de texto, o buscarla con el botn\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 direccin 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 pequea compaa, 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 das 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 pestaa <guilabel>Recurrencia</guilabel> le permite describir\n"
-" repeticiones en eventos que van desde una vez cada da a una vez\n"
-" cada 100 aos. Puede tambien elegir cuando cesarn las\n"
-" repeticiones, y, bajo <guilabel>Excepciones</guilabel>, elegir\n"
-" das 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 da</guilabel>. Un <guilabel>Evento de todo el da</guilabel>\n"
-" aparece arriba en una lista de eventos diarios en lugar de dentro\n"
-" del da. Eso hace que sea ms 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 da, y los encuentros en la conferencia\n"
-" serian eventos parciales. Naturalmente, los eventos con horarios\n"
-" especficos 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 Mltiples 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"
-" mltiples calendarios. Esto es til si mantiene horarios para otras\n"
-" personas, si es el responsable de la bsqueda de recursos o\n"
-" habitaciones, o si tiene mltiples 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 aadido una tarea a su lista \"por hacer\", su resumen\n"
-" aparece en la seccin <guilabel>Resumen</guilabel> de la lista de\n"
-" tareas. Para ver o editar una descripcin 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 botn <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 movern hacia alante y hacia atrs en las\n"
-" pginas de su calendario. Si est viendo solo a un da, ver la\n"
-" pgina de maana 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 da 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 ms inforacin), y son incluidas con la informacin del\n"
-" calendario cuando se sincroniza con dispositivo de mano. Puede usar\n"
-" la lista en un formato ms grande eligiendo el botn\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 da, cinco das, 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 das&mdash; tres das, diez das, quinzenas\n"
-" si quiere&mdash; en el pequeo 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 botn\n"
-" <guibutton>Aadir</guibutton>. <application>Evolution</application>\n"
-" mostrar una pequea 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 descripcin 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 (ms 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 descripcin ms "
-"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 dilogo 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 ms que\n"
-" saber que da es. Esta seccin 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"
-" configuracin, 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>Mltiples 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 da. 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 botn <guibutton>Anterior</guibutton>. Para maana, la semana "
-#~ "que\n"
-#~ " viene o el mes prximo, pulse <guibutton>Siguiente</guibutton>, y\n"
-#~ " naturalmente, pulse <guibutton>Hoy</guibutton> para hoy.\n"
-#~ " </para>\n"
diff --git a/help/es.po/usage-contact.sgml.po b/help/es.po/usage-contact.sgml.po
deleted file mode 100644
index 04cfc5c703..0000000000
--- a/help/es.po/usage-contact.sgml.po
+++ /dev/null
@@ -1,1225 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 reunin con la Compaa X, as que\n"
-"\t busca en la red la tarjeta de la Compaa X para saber a quien tiene\n"
-"\t que llamar. Dado que su compaia comparte un calendario, ve que su\n"
-"\t compaera Diana ya ha concertado una reunin con la Compaa X para "
-"el\n"
-"\t prximo jueves. Puede ir el mismo a la reunin o pedir a Diana que\n"
-"\t trate el tema por el. De cualquier modo, evita concertar otra cita\n"
-"\t co la Compaa 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 rpida 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 telfono,\n"
-"\t y se me olvid anotar la compaa 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 ms sencilla de agrupar tarjetas de direcciones es usar\n"
-"\t carpetas. Por defecto, las tarjetas estn 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 ms 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 categora 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 categora \"Negocios\", porque\n"
-" trabaja conmigo, en la categora \"Amigos\", porque tambien es "
-"mi\n"
-" amigo, y en la categora \"Frecuente\", porque le llamo\n"
-" continuamente y nunca me acuerdo de su nmero de telfono.\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 categora\n"
-" haciendo: <!-- ARREGLAME --> Esperando a que Evolution soporte\n"
-" la operacin.\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 categora, "
-"pulse\n"
-" botn <guibutton>Categorias</guibutton> abajo a la derecha.\n"
-" De la ventana de dilogo que aparece, puede marcar tantas\n"
-" categoras 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 Categoras</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 Bsqueda Rpida</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 categoras no le es suficiente, puede\n"
-" aadir las suyas propias. Simplemente escriba el nombre de la\n"
-" nueva categora en la caja de texto, entonces pulse\n"
-" <guibutton>Categorias</guibutton> y elija\n"
-" <guilabel>Aadir 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 bsqueda rpida. Para usarlo,\n"
-" \t elija de la lista descendente que clase de bsqueda quiere hacer\n"
-" \t (toda la tarjeta, solo el nombre, o solo la direccin de correo),\n"
-" \t entonces escriba una o ms 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 bsquedas haciendo varias bsquedas sucesivas,\n"
-" \t o empezar de nuevo pulsando el botn <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 ms\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 informacin acerca de una\n"
-"\tpersona en el correo o en una entrada del calendario, puede aadirla\n"
-"\ta una tarjeta de direcciones. Para hacerlo, pulse con el botn\n"
-"\tderecho en cualquier direccin de correo o mensaje de correo, y\n"
-"\tseleccione <guimenuitem>Aadir Tarjeta de Direcciones</guimenuitem>\n"
-"\tdel men que aparece. Naturalmente,\n"
-"\t<application>Evolution</application> tambien aade tarjetas desde un\n"
-"\tdispositivo de mano durante la operacin de sincronizacin. Para ms\n"
-"\tinformacin 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 pestaas,\n"
-" \t<guilabel>General</guilabel>, para informacin contacto bsica,\n"
-" \ty <guilabel>Detalles</guilabel>, para una descripcin ms especfica\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 ms\n"
-" flexibilidad, puede marcar los contactos como miembros de\n"
-" diferentes categoras.\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>Aadir Criterio</guibutton> para aumentar el\n"
-" nmero de criterios que quiere usar en la bsqueda, y\n"
-" <guibutton>Eliminar Criterio</guibutton> para eliminar uno del la\n"
-" parte inferior de la lista. Su criterio puede ser una bsqueda en\n"
-" los campos <guilabel>Nombre</guilabel> o\n"
-" <guilabel>Correo</guilabel>. Alternativamente puede elegir buscar "
-"en\n"
-" todos los campos con una expresin 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 bsqueda ms 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"
-" bsqueda a fondo, que le permitir usar multiples criterios de\n"
-" bsqueda 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 pestaa <guilabel>General</guilabel> tiene siete secciones,\n"
-" cada una con un icono, una cara, para el nombre y la compaa, un\n"
-" telfono para nmeros de telfono, un sobre para direcciones de\n"
-" correo, un globo terraqueo para direcciones de pginas web, una\n"
-" casa para direccin postal, un archivador para contactos, y una\n"
-" cartera para categoras. \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>Envame una Tarjeta: Aadiendo Tarjetas Rpidamente</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 pestaa de <guilabel>Detalles</guilabel> es, afortunadamente,\n"
-" mucho ms simple: tres secciones, las cuales son ms 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 pestaa <guilabel>General</guilabel> es la\n"
-" herramienta de organizacin de <guilabel>Categorias</guilabel>, para\n"
-" ver informacin 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 informacin de contacto compartida\n"
-" para su compaa o su departamento. Esta es la clase de\n"
-" caractersticas que querr si su compaa 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 da en los desarrollos de su\n"
-" grupo de trabajo o de la compaa 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 aadir 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 "
-"informacin\n"
-" actual. Si quiere crear una nueva, pulsando el botn\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 nieras 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 bsquedas 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 categoras,\n"
-" y le permite crear sus propias categoras. Para aprender acerca de\n"
-" las categoras, 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 ms herramientas en camino, y cuando llegen, <!-- ARREGLAME -->\n"
-" sern descritas en esta seccin.\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 bsqueda.\n"
-" </para></listitem>\n"
-"\t\n"
-"\t<listitem><para>\n"
-"\t <guibutton>Imprimir</guibutton> enva una o ms 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"
-" informacin de todas las direcciones en la carpeta. Use este\n"
-" botn para actualizar una carpeta de red, o para cambiar de\n"
-" ver los resultados de una bsqueda a ver todos los contenidos.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para> <guibutton>Para</guibutton> detiene la carga\n"
-" de la informacin de contacto de la red. Este botn solo es\n"
-" relevante si est buscando informacin 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 botn <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 aadir 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 aparecern 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 estn disponibles cueando est\n"
-" conectado a la red. Si usa un portatil o tiene una conexin\n"
-" por modem, puede que quiera copiar o cachear el directorio en\n"
-" red y sincronizar periodicamente su copia con la versin en\n"
-" la red. <!-- ARREGLAME: COMO? -->\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-" <listitem>\n"
-"\t <para>\n"
-" Para prevenir el trfico 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, aadir, y borrar contactos\n"
-" dependen de la configuracin 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 alfabtico, 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 informacin de contacto rellena el resto de la vista. Muevase\n"
-" por las tarjetas alfabticamente con los botonrd y la barra de\n"
-" desplazamiento a la derecha de la ventana. Naturalemnte, si tiene\n"
-" listadas ms de unas pocas personas, querr una manera de\n"
-" encontrarlas ms rpidamente, que es para lo que est la funcin de\n"
-" bsqueda.\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 integracin con el resto de la aplicacin. Cuando busca la\n"
-" direccin de alguien, tambin puede ver un historial de las citas con\n"
-" esa persona. O, puede crear tarjetas de direcciones de mensajes de\n"
-" correo electrnico con unas pocas pulsaciones. En suma, las\n"
-" bsquedas 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"
-" ms facil actualizar <application>Evolution</application> que\n"
-" cambiar una hoja de papel. <application>Evolution</application>\n"
-" tambin permite una facil sincronizacin 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 captulo le mostrar como puede usar la agenda de\n"
-" <application>Evolution</application> para organizar cualquier\n"
-" cantidad de informacin, compartir direcciones a traves de una\n"
-" red, y varias formas de ahorrar tiempo con las tareas de todos\n"
-" los das. 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 ""
-" <para>\n"
-" <variablelist>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term>Nombre Completo</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" El campo <guilabel>Nombre Completo</guilabel> tiene dos\n"
-" caracteristicas importantes:\n"
-" <itemizedlist>\n"
-"\t\t<listitem>\n"
-"\t\t <para>\n"
-" Puede escribir un nombre en el campo <guibutton>Nombre\n"
-" Completo</guibutton>, pero tambien puede pulsar sobre\n"
-" el botn <guibutton>Nombre Completo</guibutton> para\n"
-" que aparezca una pequea ventana de dilogo con alguas\n"
-" cajas de texto\n"
-" <variablelist>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Ttulo: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t Escriba una categora o seleccione una del men.\n"
-"\t </para></listitem>\n"
-"\t\t </varlistentry>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Nombre: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t Escriba el nombre.\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>Apellidos: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t\t Escriba los apellidos.\n"
-"\t\t\t </para></listitem>\n"
-"\t\t </varlistentry>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Sufijo: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t\t Escriba un sufujo como \"Junior\" o \"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"
-" El campo <guilabel>Nombre Completo</guilabel>\n"
-" tambin interactua con la opcin <guilabel>Archivar\n"
-" Como</guilabel> para ayudarle a organizar sus\n"
-" contactos.\n"
-" </para>\n"
-" <para>\n"
-" Vea como funciona, esbriba un nombre en el campo\n"
-" <guilabel>Nombre Completo</guilabel>:\n"
-" <userinput>Rupert T. Monkey</userinput>. Ver\n"
-" que el campo <guilabel>Archivar Como</guilabel>\n"
-" tambin se rellena, pero inversamente:\n"
-" <computeroutput>Monkey, Rupert</computeroutput>.\n"
-" Puede elegir <computeroutput>Rupert Monkey\n"
-" </computeroutput> de la lista desplegable, o\n"
-" escribir el suyo propio, como\n"
-" <userinput>T. Rupert Monkey</userinput>.\n"
-" </para>\n"
-"\t\t <tip>\n"
-"\t\t <title>Consejos para Rellenar el Campo</title>\n"
-"\t\t \n"
-"\t\t <para>\n"
-" No escriba algo totalmente distinto al nombre\n"
-" real, dado que puede que olvide que achiv la\n"
-" informacin de Rupert bajo la \"F\" como\n"
-" \"Empleado Ficticio de Ximian\".\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>Valores Mltiples para los Campos</term>\n"
-" <listitem>\n"
-"\t <para>\n"
-" Si pulsa en el botn con una pequea flecha al lado del\n"
-" campo <guilabel>Correo Primario</guilabel>, puede elegir\n"
-" <guilabel>Correo 2</guilabel> y\n"
-" <guilabel>Correo 3</guilabel>. Aunque el editor de\n"
-" contactos solo mostrar uno al tiempo,\n"
-" <application>Evolution</application> los almacenar\n"
-" todos. El botn con la flecha a lado de los campos\n"
-" telfono y direccin postal funcionan igual.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: 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 ""
-"<!--\n"
-" <para>\n"
-" Otra caracterstica til de <application>Evolution</application>\n"
-" es su habilidad para reconocer cuando la gente vive o trabajan\n"
-" juntos. Si varias personas en su agenda de direcciones comparten\n"
-" una direccin, y cambia la direccin de uno de ellos,\n"
-" <application>Evolution</application> le preguntar si quiere\n"
-" cambiar la direccin de todos, o solo la de uno de ellos.\n"
-" </para>\n"
-"-->\n"
-
-#: 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 ""
diff --git a/help/es.po/usage-mail.sgml.po b/help/es.po/usage-mail.sgml.po
deleted file mode 100644
index f076b15554..0000000000
--- a/help/es.po/usage-mail.sgml.po
+++ /dev/null
@@ -1,2322 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 hara una\n"
-"\t herramienta de composicin 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 Tcnica 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 "
-"mquinas\n"
-"\t de escribir y no habia fotocopiadoras, \"Cc\" significa\n"
-"\t \"Copia de Carbn\". 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 compaero,\n"
-"\t Tim, en el campo <guilabel>Cc:</guilabel>, para que sepa como "
-"van\n"
-"\t las cosas. El cliente puede ver que Tim tambin recivi el\n"
-"\t mensaje, y sabe que tambin 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 nmero 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 enva 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 compaa, 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 compaa sea pblica.\n"
-"\t Parece una pequea 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 ms en descargar\n"
-"\t y en ser mostrado. <emphasis>Algunas</emphasis> personas se hablan\n"
-"\t correo con HTML como \"la raz de todos los males\" y se enfadan\n"
-"\t mucho si les envia correo con HTML, por lo cual\n"
-"\t <application>Evolution</application> enva 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 dilogo de configuracin del correo.\n"
-"\t Vea <xref linkend=\"config-prefs-mail-other\"> para ms informacin.\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 ms informacin 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 ratn sobre los botnes. Los botones entran "
-"en cuatro\n"
-" categoras:\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 tamaos de "
-"las\n"
-" cabeceras desde grande (1) hasta pequeo (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 ms\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 "
-"itlicas</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>Alineacin</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Localizado al lado de los botones de estilo del texto, "
-"estos tres\n"
-" iconos de prrafo deberian ser familiares para aquellos "
-"usuarios de\n"
-" la mayora de los procesadores de texto. El botn ms a "
-"la izquierda\n"
-" har que su texto se alinee a la izquierda, el botn "
-"central, lo\n"
-" centrar, y el botn 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 indentacin</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" El botn con la flecha hacia la izquierda reducir\n"
-" la indentacin de un prrafo, y la flecha a la derecha\n"
-" incrementar su indentacin.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Seleccin de colores</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" En la parte derecha esta la herramienta de seleccin de "
-"color.\n"
-" La caja coloreada muestra el color actual del texto. Para\n"
-" elegir uno nuevo, pulse el botn 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 continuacin.\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 botn con un clip de la barra de herramientas,\n"
-"\t con el ttulo <guibutton>Adjuntar</guibutton>. Si presiona el\n"
-"\t botn <guibutton>Adjuntar</guibutton>,\n"
-"\t <application>Evolution</application> abrir una ventana de seleccin\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 grficos. 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 ms\n"
-"\t Tarde</guimenuitem></menuchoice>. Esto aadir 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 enviarn en ese momento.\n"
-"\t Me gusta usar \"Enviar ms Tarde\" porque me permite tener la "
-"oportunidad\n"
-"\t de cambiar de opinin acerca de un mensaje antes de enviarlo. De esa "
-"forma\n"
-"\t no envio nada de lo que me arrepentir al da 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 ms 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 buzn, defino una carpeta virtual para\n"
-"\t los mensajes de mi amiga y compaera Anna. Tengo otra para los\n"
-"\t los mensajes que tienen \"ximian.com\" en la direccin 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 enva 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 \"Discusin 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 botn\n"
-"\t <guibutton>Responder</guibutton> mientras est seleccionado,\n"
-"\t o elija <guimenuitem>Responder al Remitente</guimenuitem> del menu\n"
-"\t del botn 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 estarn 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 itlicas (para vista en HTML) o con el\n"
-"\t caracter &gt; precediendo cada lnea (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 seguirn. </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 mltiples 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 cortesa excasa, pero sea cortes!\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\tTODO EN MAYUSCULAS SIGNIFICA QUE EST GRITANDO! No escriba todo el\n"
-"\t\tmensaje en mayusculas. Hace dao 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 electrnico nada que no dira en pblico.\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 ortografa 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 reenva, 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 enva 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 mayora de imgenes se mostrarn 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 botn derecho sobre el icono para obtener\n"
-"\t una lista de opciones que variarn dependiendo del tipo de adjunto.\n"
-"\t Tendr la opcin de mostrar la mayora de los archivos como parte del\n"
-"\t mensaje, exportarlos a otra aplicacin (imgenes a Eye of GNOME, hojas\n"
-"\t de clculo 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 direccin, y\n"
-"\t <application>Evolution</application> completar la direccin por usted\n"
-"\t <!-- (INSERTAR descripcin de la IU para esta caracteristica,\n"
-"\t una vez que se decida). --> Si escribe un nombre oun apodo\n"
-"\t puede coincidir con ms de una tarjeta, Evolution abrir una ventana de\n"
-"\t dilogo y le preguntar a quien se refiere.\n"
-"\t <!-- (TODAVIA NO) Tambien, <application>Evolution</application>\n"
-"\t aadir un dominio a cualquier direccion incompleta. Por defecto, ser\n"
-"\t su dominio, pero puede elegirlo en el dilogo 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 ""
-"\t<para>\n"
-"\t Si est leyendo un mensaje con varios destinatarios, puede usar\n"
-"\t <guibutton>Responder a Todos</guibutton> en lugar de\n"
-"\t <guibutton>Responder</guibutton>. Si hay gran cantidad de personas\n"
-"\t en los campos <guilabel>Cc:</guilabel> o <guilabel>A:</guilabel>,\n"
-"\t esto puede ahorrar cantidades de tiempo sustanciales.\n"
-"\t <example>\n"
-"\t <title>Usando opcin Responder a Todos</title>\n"
-"\t <para>\n"
-"\t Susan enva un correo a un cliente y enva copias a Tim\n"
-"\t y a una lista de correo interno de la compaa.\n"
-"\t Si Tim quiere hacer un comentrio para que lo lean todos, usa\n"
-"\t <guibutton>Responder a Todos</guibutton>, pero si solo quiere\n"
-"\t decirle a Susan que est de acuerdo con ella, usa\n"
-"\t <guibutton>Responder</guibutton>. Note que su respuesta no llegar\n"
-"\t a ninguna de las personas que Susan puso en su lista\n"
-"\t <guilabel>Cco</guilabel>, dado que esa lista no es compartida con\n"
-"\t nadie.\n"
-"\t </para>\n"
-"\t </example>\n"
-"\t</para>\n"
-
-#: 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 envo 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 Rpidamente 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 ms 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 Cortesa 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 Caractersticas 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, Bsquedas, 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 ms simple de dirigir un mensaje es poner la direccin\n"
-" o direcciones de correo en el campo <guilabel>A:</guilabel>,\n"
-" el cual denota a los destinatarios principales. Para enviar\n"
-" correo a ms 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 mayora 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>Composicin 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></"
-"menuchoice>\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 segn 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/help/es.po/usage-mainwindow.sgml.po b/help/es.po/usage-mainwindow.sgml.po
deleted file mode 100644
index 9df4079faa..0000000000
--- a/help/es.po/usage-mainwindow.sgml.po
+++ /dev/null
@@ -1,788 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 botn\n"
-" derecho en cualquier espacio vaco de la barra de atajos. Del "
-"men\n"
-" que aparece, puede elegir el tamao 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 botn\n"
-" derecho sobre el y seleccione <guimenuitem>Quitar</guimenuitem>.\n"
-" Para aadir 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 botn 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 botn 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> tpica 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 dejn 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 todava. Estar vaca 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 ms importante de <application>Evolution</application> "
-"es\n"
-" darle acceso a su informacin 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 categora 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 da. 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 botn <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 da.\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 informacin de direcciones,\n"
-"\t nmeros de telfono, e informacin de contacto. Al igual que la\n"
-"\t informacin 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 ""
-" <para>\n"
-" Los botones de los grupos de atajos son <guibutton>Atajos de\n"
-" Evolution</guibutton> y <guibutton>Directorios de\n"
-" Internet</guibutton>. Cuando pulsas sobre ellos, se deslizan\n"
-" arriba y abajo para dejarle acceder a los diferentes tipos de\n"
-" atajos. La primera vez qe inicia\n"
-" <application>Evolution</application>, ver la categora\n"
-" <guilabel>Atajos de Evolution</guilabel>. Si pulsa sobre\n"
-" <guilabel>Directorios de Internet</guilabel>, se deslizar hacia\n"
-" arriba y ver botones para los directorios\n"
-" <guilabel>Bigfoot</guilabel> y <guilabel>Netcenter</guilabel>,\n"
-" as como cualquier otro que usted o su administrador hayan\n"
-" aadido. Puede aadir ms grupos pulsando con el botn derecho\n"
-" sobre el fondo de la barra de atajos y seleccionando\n"
-" <guimenuitem>Men de Grupos</guimenuitem>. Los directorios de\n"
-" Internet se comportan muy similarmente al administrador de\n"
-" contactos local, el cual se cubre en <xref\n"
-" linkend=\"usage-contact\">.\n"
-" </para>\n"
-
-#: 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 ""
-" <para>\n"
-" Para crear una nueva carpeta, seleccione <menuchoice>\n"
-" <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu>\n"
-" <guimenuitem>Carpeta</guimenuitem></menuchoice>. Ser preguntado "
-"acerca de donde\n"
-" quiere ponerla, y que clase de carpeta debera ser. Puede elegir\n"
-" entre tres tipos: <guilabel>Correo</guilabel>, para guardar\n"
-" correo, <guilabel>Calendario</guilabel> para guardar calendarios,\n"
-" y <guilabel>Contactos</guilabel> para guardar contactos.\n"
-" </para>\n"
-
-#: 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 informacin 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 ""
-" <para>\n"
-" Si no le gusta la barra de atajos, puede usar la barra de carpetas\n"
-" o la barra de mens para navegar a traves de la vetana principal.\n"
-" Pulse \n"
-" <keycombo action=\"simul\">\n"
-" <keycap>Ctrl</keycap> \n"
-" <keycap>O</keycap> \n"
-" </keycombo>\n"
-" para elegir de una lista la carpeta a la que quiere ir, o\n"
-" use la barra de carpetas. Puede ocultar y mostrar la barra de\n"
-" carpetas y la barra de atajos seleccionando dichos elementos en el\n"
-" men <guimenu>Ver</guimenu>.\n"
-" </para>\n"
-
-#: 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 Bsicos 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/help/es.po/usage-notes.sgml.po b/help/es.po/usage-notes.sgml.po
deleted file mode 100644
index d26eb63c56..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 electrnico fuera inventado,\n"
-" habia pequeos trozos de papel que la gente usaba para guardar\n"
-" informacin 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 electrnico.\n"
-" Tiene sentido, entonces, que <application>Evolution</application>\n"
-" eventualmente tenga una funcin de notas.\n"
-" <application>Evolution</application> le ayuda a tomar notas de la\n"
-" siguientes formas:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-" <para>\n"
-" Apunte nmeros de telfono, notas de la escuela, tome notas de\n"
-"\t mensajes telefnicos, o incluso escriba poesa.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Un cdigo 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 electrnico 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/help/es.po/usage-print.sgml.po b/help/es.po/usage-print.sgml.po
deleted file mode 100644
index 29abf423a1..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 Impresin</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 seleccin de impresora, mostrada en <xref\n"
-" linkend=\"print-dest\">, le permite elegir el formato de\n"
-" impresin&mdash; en estos momentos, solo est disponible\n"
-" <guilabel>Postscript Genrico</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"
-" nmero 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 botn en\n"
-" el dilogo de impresin y como una opcin en el men\n"
-" <guimenu>Archivo</guimenu>. En ambos sitios, hace lo mismo:\n"
-" abre una nueva ventana que le muestra que pasara 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 pginas quiere ver,\n"
-" y como de cerca quiere verlas. Aumentar o disminuir el zoom,\n"
-" ajustar la pgina a la ventana (el botn <guibutton>Ajustar</"
-"guibutton>)\n"
-" o igualar el ancho del papel con el de la ventana (el botn\n"
-" <guibutton>Ajustar Ancho</guibutton>). Ninguno de estos botones\n"
-" modifica la manera en que se imprimen las pginas, 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 ms)\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 Impresin</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 ms de una pgina, tiene la\n"
-" opcin de elegir que pginas 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 captulo muy corto, porque imprimir con\n"
-" <application>Evolution</application> no es unatarea complicada. Como\n"
-" la mayora de las aplicaciones GNOME, <application>Evolution</"
-"application>\n"
-" usa el sistema gnome-print, as que si ha usado otra aplicacin GNOME\n"
-" para imprimir, debera 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"
-" seleccin de tarjetas de visita, puede elegir entre imprimirlo "
-"directamente\n"
-" en la impresora, o guardar la salida de la impresin en un archivo\n"
-" postscript. Tambin puede usar la caracterstica 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/help/es.po/usage-sync.sgml.po b/help/es.po/usage-sync.sgml.po
deleted file mode 100644
index b6a2c541a3..0000000000
--- a/help/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.
-# Hctor Garca lvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-04-20 13:43+0200\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Hctor Garca 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 botn\n"
-" de sincronizacin.\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 Sincronizacin</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 captulo cubre como sincronizar datos una vez instalado y \n"
-" configurado. Si necesita informacin sobre como preparar un\n"
-" sistema de sincronizacin, 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/help/es/Makefile.in b/help/es/Makefile.in
deleted file mode 100644
index dee738f8c3..0000000000
--- a/help/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/help/es/apx-authors.sgml b/help/es/apx-authors.sgml
deleted file mode 100644
index 8af980555f..0000000000
--- a/help/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 cdigo 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 ms informacin por favor visite la
- <ulink url="http://www.helixcode.com/apps/evolution.php3"
- type="http">pgina web</ulink> de <application>Evolution
- </application>. Por favor enve 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 lnea en <ulink
- url="http://bugs.gnome.org/Reporting.html" type="http">
- http://bugs.gnome.org/Reporting.html</ulink>. Tambin 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 aplicacin y el proyecto de documentacin de
- GNOME. Por favor enve todos sus comentarios y sugerencias acerca de
- este manual al proyecto de documentacin de GNOME a
- <email>docs@gnome.org</email>. Tambin puede enviar comentarios a
- del web usando la <ulink type="http"
- url="http://www.gnome.org/gdp/doctable/">Tabla de Estado de la
- Documentacin de GNOME</ulink> (est en ingles).
- </para>
- <para> Traduccin al espaol realizada por
- Hctor Garca lvarez (<email>hector@scouts-es.org</email>).
- Por favor enve todos los comentarios y sugerencias sobre esta
- traduccin a <email>hector@debian.org</email>. </para>
- </appendix>
-
-
-
-
-
diff --git a/help/es/apx-bugs.sgml b/help/es/apx-bugs.sgml
deleted file mode 100644
index 544387481e..0000000000
--- a/help/es/apx-bugs.sgml
+++ /dev/null
@@ -1,23 +0,0 @@
- <appendix id="bugs">
-
- <title>Errores y limitaciones conocidas</title>
- <abstract>
- <para>
- Este apndice 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 lnea de comandos) si encuentra
- algn error que no este en esta lista.
- </para>
- </abstract>
-
- <para>
- Evolution todava es software en fase beta, as que el seguimiento
- de errores es mejor dejrselo al sistema bugzilla y a los
- programadores. Eso s, hay cierto nmero de limitaciones que
- no sern corregidas antes de la versin 1.0. Las ms notables son:
- Importacin de los archivos .pst de Microsoft Outlook, y la
- compatibilidad con el protocolo de Microsoft Exchange.
- </para>
- </appendix>
-
diff --git a/help/es/apx-gloss.sgml b/help/es/apx-gloss.sgml
deleted file mode 100644
index dd7c1b50e1..0000000000
--- a/help/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 aadidos a el.
- </para>
- </glossdef>
- </glossentry>
-
-<glossentry id="automatic-indexing">
- <glossterm>Indexado Automtico</glossterm>
- <glossdef>
- <para>
- El procedimiento de pre-ordenado que permite a
- <application>Evolution</application> encontrar la informacin
- rpidamente. Permite bsquedas ms rpidas 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 conversacin, sin estar en la lista de
- A:
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="conduit">
- <glossterm>Enlaze</glossterm>
- <glossdef>
- <para>
- Un enlaze de sincronizacin es una pequea aplicacin que controla la
- transferencia de informacin entre un dispositivo de mano y un
- ordenador.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="druid">
- <glossterm>Ayudante</glossterm>
- <glossdef>
- <para>
- Una herramienta que gua al usuario a travs 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>
- Tambin llamados "smileys", los emoticones son pequeas caras puestas
- de lado echas de puntos y parntesis que la gente usa para expresar
- emociones en los correos electrnicos. Ejemplos: :-) ;( .
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="evolution">
- <glossterm>Evolution</glossterm>
- <glossdef>
- <para>
- <application>Evolution</application> es la aplicacin 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 travs de una shell o un
- administrador de archivos. Esta precaucin de seguridad previene contra
- la ejecucin automtica o accidental de programas maliciosos. Para ms
- informacin acerca de archivos ejecutables y permisos de archivos,
- consulte la documentacin 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 perversin de la tpica nomenclatura de ordenadores
- (y especialmente en Unix y Linux), la parte ms alta del rbol se
- llama el directorio raz, y se denota por <systemitem><filename>/
- </filename></systemitem>. El resto de las "ramas" se extienden
- desde la raz. No confundir el directorio raz (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 mtodo
- para ordenar el correo automticamente. Puede crear filtros para
- realizar una o ms 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 trmino que describe la aplicacin que ayuda a
- grupos de persones a trabajar juntas. Tpicamente, esta aplicacin
- varias herramientas de productividad integradas en un mismo programa.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="haiku">
- <glossterm>Haiku</glossterm>
- <glossdef>
- <para>
- Una forma de poesa tradicional japonesa. Los poemas son de tres
- lneas, donde la primera y la ltima tienen cinco slabas, y la
- segunda lnea tiene siete slabas.
- </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 pgina en documentos electrnicos
- como pginas web, archivos de ayuda, y mensajes de correo. El HTML se
- puede usar en el correo electrnico y en los grupos de noticias para
- insertar imgenes o formatear el texto
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="hot-key">
- <glossterm>Tecla Rpida</glossterm>
- <glossdef>
- <para>
- Teclas rpidas son combinaciones de teclado usadas para realizar
- acciones en el ordenador en lugar de usar el ratn para la misma
- accin. Las teclas rpidas 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 seccin 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
- tpicamente (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 lnea</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, nmeros de telfono 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 aplicacin con la que una persona lee y
- enva correos electrnicos. En el otro lado estn 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 informacin de contacto. Similar en
- apariencia a una pequea tarjeta de visita.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nautilus">
- <glossterm>Nautilus</glossterm>
- <glossdef>
- <para>
- <application>Nautilus</application> es la prxima generacin del
- gestor de archivos de <acronym>GNOME</acronym> que est desarrollando
- la compaa Eazel.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nickname">
- <glossterm>Apodo</glossterm>
- <glossdef>
- <para>
- Un alias para una direccin de correo electrnico.
- </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 mtodo de comunicacin acordado, especialmente uno acordado para
- enviar tipos particulares de informacin entre ordenadores
- Ejemplos son POP (Protocolo de Oficina de Correo), para el correo, y
- HTTP (Protocolo de Transferencia de Hipertexto), para pginas web.
-
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="regular-expression">
- <glossterm>Expresin Regular</glossterm>
- <glossdef>
- <para>
- Una expresin regular, o "regex", es una forma de describir una
- cadena de texto usando meta caracteres o smbolos 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 expresin, 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
- documentacin 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 sinnimo de "macro," para denotar
- una serie de comando o acciones pre grabados en una aplicacin.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="sendmail">
- <glossterm>Sendmail</glossterm>
- <glossdef>
- <para>
- Como su nombre indica, <application>sendmail</application> es un
- programa que enva correo. <application>Evolution</application>
- puede usarlo en lugar de <glossterm>SMTP</glossterm>; algunas
- personas lo prefieren porque permite ms flexibilidad, pero es ms
- difcil 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 rpido acceso a la partes de la aplicacin
- usadas ms frecuentemente.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="signature">
- <glossterm>Firma</glossterm>
- <glossdef>
- <para>
- En trminos de un correo electrnico, 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 pgina web. La
- cortesa dicta que debe tener una longitud inferior a cuatro lneas.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="SMTP">
- <glossterm>SMTP</glossterm>
- <glossdef>
- <para>
- Esta es la manera ms comn 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 intil. El spam normalmente aparece como cartas
- encadenadas y publicidad de compaas sin escrpulos o sin sentido.
- Los mensajes que no valen para nada se conocen como "boletnes
- opt-in"
-. </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="tooltip">
- <glossterm>Mensaje de Ayuda</glossterm>
- <glossdef>
- <para>
- Una paquea caja con texto explicatorio que aparece cuando el puntero
- del ratn permanece sin moverse sobre un botn 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, permitindole expandirse a ms programas y a otros ordenadores.
- Un virus puede causar daos 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 informacin 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 bsqueda compleja. Los
- contenidos de la carpeta se actualizan dinmicamente.
- </para>
- </glossdef>
- </glossentry>
-
-</glossary>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/help/es/config-prefs.sgml b/help/es/config-prefs.sgml
deleted file mode 100644
index ba159f51d5..0000000000
--- a/help/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>Configuracin Avanzada</title>
- <para>
- Quiz su servidor de correo ha cambiado de nombre. Quiz se ha
- cansado de cierto aspecto de la configuracin de sus citas.
- Cualquiera que sea la razn, usted quiere cambiar su configuracin
- de <application>Evolution</application>. Este captulo le
- dir como hacer exactamente eso.
- </para>
-
- <sect1 id="config-prefs-mail">
- <title>Configuracin del Correo</title>
- <para>
- Para cambiar su configuracin de correo, seleccione <menuchoice>
- <guimenu>Configuracin</guimenu> <guimenuitem>Configuracin
- 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 estn separadas en varias categoras:
- <variablelist>
- <varlistentry>
- <term><guilabel>Identidades</guilabel></term>
- <listitem>
- <para>
- Esto le permite crear o alterar una o ms identidades para
- su correo electrnico.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Fuentes</guilabel></term>
- <listitem>
- <para>
- Esta pestaa le permite indicar a
- <application>Evolution</application> de donde obtener el
- correo que le enven y como obtenerlo.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
-
- <term><guilabel>Transporte de Correo</guilabel></term>
- <listitem>
- <para>
- Esta pestaa 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
- caractersticas de su servidor de noticias..
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Otros</guilabel></term>
- <listitem>
- <para>
- Configuracin miscelnea 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 ledo.
- </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>Configuracin de Identidades</title>
- <para>
- Si solo tiene una cuenta de correo, o enva el correo desde una
- sola direccin, tan solo deber configurar una identidad. De todos
- modos, si quiere puede tener mltiples 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 aadir una nueva identidad, simplemente pulse
- <guibutton>Aadir</guibutton>. Para modificar una identidad
- ya existente, seleccione la de la pestaa
- <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>Direccin de Correo:</guilabel> Escriba su direccin
- de correo en este espacio.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Organizacin:</guilabel> Si enva mensajes en
- representacin de una compaa u otra organizacin,
- escriba aqu el nombre de la misma.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Archivo de Firma:</guilabel> Puede elegir un
- pequeo archivo de texto para que sea aadido a todos los
- mensajes que mande. Tpicamente, los archivos de firma
- incluyen la direccin u otra informacin de contacto, o su
- cita preferida. Es una buena costumbre hacer que no tenga
- ms de cuatro lneas.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-network">
- <title>Configuracin 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 recepcin y envo 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 configuracin que en dicho programa. La
- configuracin relacionada con la Red se encuentra en las pestaas
- <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 pestaa <interface>Fuentes de Correo</interface> le permite
- editar, aadir, o borrar mtodos de obtener el correo de los
- servidores. Pulsando en <guibutton>Aadir</guibutton> o
- <guibutton>Editar</guibutton> aparecer una caja de dilogo 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 debera ser la parte de delante de la @
- de su direccin 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>Autentificacin:</guilabel></term>
- <listitem>
- <para>
- Diga a <application>Evolution</application> como
- verificar su identidad con el servidor. Sus opciones
- varan 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 autentificacin ofrece.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Probar Configuracin</guilabel></term>
- <listitem>
- <para>
- Pulse este botn para que
- <application>Evolution</application> compruebe si sus
- fuentes de correo estn 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 pestaa <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 ms difcil de configurar,
- pero ofrece ms 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 vlido. Para
- que lo haga, pulse el botn <guilabel>Comprobar
- Configuracin</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 razn para no tenerlos al lado de su correo. La
- primera vez que seleccione la pestaa <guilabel>Servidor de
- Noticias</guilabel>, ver una caja vaca con tres botones ya
- familiares a la derecha: <guibutton>Aadir</guibutton>,
- <guibutton>Editar</guibutton>, y
- <guibutton>Borrar</guibutton>.
- </para>
- <para>
- Pulse <guibutton>Aadir</guibutton> para aadir 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 aparecern detrs 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 categoras. Esta parte contiene
- una miscelnea 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 opcin, enviar sus
- mensajes en HTML por defecto. Si no la selecciona, sus
- mensajes se enviarn sin formato HTML a menos que seleccione
- <menuchoice> <guimenu>Formato</guimenu> <guimenuitem>HTML</guimenuitem>
- </menuchoice> en la ventana de composicin de mensajes.
- Vea <xref linkend="usage-mail-getnsend-send-html">
- para ms informacin acerca del correo en HTML.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <guilabel>Marcar Mensajes como Ledos Pasados</guilabel>
- </term>
- <listitem><para>
- Cuando selecciona un mensaje,
- <application>Evolution</application> esperar un
- momento antes de marcarlo como ledo. 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 caracterstica avanzada y que puede hacer
- que pierda algunos mensajes, as que probablemente
- primero debera hacer una copia de seguridad de su
- directorio <systemitem><filename>evolution</filename> </systemitem>
-. Adems, llevar bastante tiempo si tiene
- un mailbox grande.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="config-prefs-cal">
- <title>Configuracin del Calendario</title>
- <para>
- Para especificar sus preferencias sobre el calendario, seleccin
- <menuchoice><guimenu>Configuraciones</guimenu>
- <guimenuitem>Configuracin del
- Calendario</guimenuitem></menuchoice> desde la vista del
- calendario. Esto abrir la ventana de
- <interface>Preferencias</interface>. Contiene cuatro pestaas:
- <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>Dilogo de Preferencias del Calendario</title>
- <screenshot>
- <screeninfo>Si esto funcionase en mi trabajo tambin 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>Configuracin de las Vistas del Tiempo</title>
- <para>
- La pestaa <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 botn 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 pestaa de <interface>colores</interface> le permite decidir
- de que color ser su calendario. La pestaa 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 botn
- de color a la derecha de cada elemento, mostrar una ventana de
- seleccin de color donde podr elegir a que color cambiar el
- elemento. Pulsando <guibutton>ACEPTAR</guibutton> en el dilogo de
- seleccin 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 lneas entre los das y la
- parte de arriba de la vista.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Ttulos:</guilabel> Color del texto para los
- nombres de los das y los meses y para otros ttulos.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Das vacos:</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>Da resaltado:</guilabel> El color de fondo
- para un espacio de tiempo seleccionado.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <guilabel>Nmeros de los das:</guilabel> Color del texto para los nmeros de las fechas.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <guilabel>Nmero del da actual:</guilabel> Color del texto para la fecha del da 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 estn an dentro del plazo.
- (Quiz sea el color de fondo? avergualo!)
- </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>Configuracin de la Lista de Tareas Por-Hacer</title>
- <para>
- Puede elegir que informacin muestra la lista Por Hacer y la manera
- como la muestra. Las dos reas de la pestaa <interface>Lista Por
- Hacer</interface> ofrecen varias opciones cada una:
- <variablelist>
- <varlistentry>
- <term>Mostrar en la Lista Por Hacer</term>
- <listitem>
- <para>
- Esta opcin contiene tres elementos. Si marca las casillas
- a su lado, esa informacin 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>Colocacin de Alarmas</title>
- <para>
- La pestaa 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 opcin para que <application>Evolution</application> emita un
- pitido para la alarma que haya fijado. Si deja esta opcin sin
- marcar, <application>Evolution</application> tan solo le alertar de
- los sucesos abriendo un ventana de dilogo. Estos pitidos son
- distintos a los de las alarmas auditivas.
- </para>
- </listitem>
- <listitem>
- <para><guilabel>Las alarmas auditivas cesan tras: </guilabel>
- Seleccione esta opcin para que las alarmas auditivas cesen
- automticamente pasados un nmero 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 opcin 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 pestaa
- <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>Aadiendo Servidores de Directorio</title>
- <para>
- Para aadir un nuevo servidor LDAP a su carpeta de contactos
- disponibles, seleccin <menuchoice><guimenu>Acciones</guimenu>
- <guimenuitem>Nuevo Servidor de Directorio</guimenuitem>
- </menuchoice>. Esto mostrar una pequea caja de dilogo 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>Descripcin</guilabel> &mdash; un descripcin larga del servidor.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Servidor LDAP</guilabel> &mdash; la direccin 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 Raz</guilabel> &mdash; entre el DN raz aqu.
- </para></listitem>
- </itemizedlist>
- </para>
- </sect2>
- </sect1>
-
-
-
- <sect1 id="config-prefs-general">
- <title>Preferencias Generales</title>
- <para>
- Las opciones adicionales de configuracin se cubrirn aqu,
- segn vayan estando disponibles.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
diff --git a/help/es/config-setupassist.sgml b/help/es/config-setupassist.sgml
deleted file mode 100644
index f557b6e02a..0000000000
--- a/help/es/config-setupassist.sgml
+++ /dev/null
@@ -1,211 +0,0 @@
- <chapter id="config-setupassist">
- <title>Configuracin Fcil con el Asistente</title>
- <para>
- La primera vez que intente usar el correo, el asistente de
- configuracin del correo le pedir algunos datos bsicos, para que
- <application>Evolution</application> le deje usar el correo. Si
- prefiere una configuracin ms detallada, o si quiere realizar
- cambios en una configuracin ya existente, vea <xref
- linkend="config-prefs">.
- </para>
-
- <sect1 id="config-setupassist-mail">
- <title>Configuracin del Correo</title>
- <para>
- La primera vez que intente enviar o recibir correo con
- <application>Evolution</application>, aparecer el <interface>asistente de
- configuracin del correo</interface> para ayudarle con la configuracin de
- su correo. Si no piensa usar el correo electrnico, o si prefiere
- ocuparse de la configuracin de su correo ms tarde, pulse
- <guibutton>Cancelar</guibutton>.
- </para>
-
-<!--
-
- Antes de obtenerlo, eso si, debe decidir donde lo quiere conservar.
- Sus opciones variarn ligeramente dependiendo de la configuracin 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 conexin
- 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 ms informacin acerca de los
- servidores de correo.
--->
-
- <para>
- El asistente para la configuracin (algunas veces llamado
- <glossterm>Druida</glossterm>, por analoga con los "Magos"
- que usan otros programas) le guiar a travs del proceso de configuracin
- de la red. Le preguntar acerca de alguna informacin bsica. Su
- administrador de sistemas o su proveedor de Internet debera tener
- las respuestas que necesitar. El asistente para la configuracin 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 Configuracin 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 informacin:
- <variablelist>
-
- <varlistentry>
- <term> <guilabel>Nombre:</guilabel> </term> <listitem>
- <para>Su nombre completo. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Direccin de correo electrnico:</guilabel></term>
- <listitem><para>
- Su direccin de correo completa.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Organizacin:</guilabel></term>
- <listitem>
- <para>
- Cualquier organizacin a la que represente, o la compaa 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 aadido a cualquier mensaje que enve. Una
- firma tpica consiste en su nombre y su direccin de correo,
- o una cita que le guste. Es una buena medida mantener su
- "firma" corta: cuatro lneas son suficientes. Recuerde,
- que esto se adjuntar a todos los mensajes que enve.
- </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 mltiples fuentes si lo
- desea; vea <xref
- linkend="config-prefs-mail-network"> para ms
- informacin.
- </para>
- <para>
- Si decide que <application>Evolution</application>
- no use ningn 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 enva 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 carcter @, 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>Autentificacin:</guilabel></term>
- <listitem>
- <para>
- Seleccin el tipo de autentificacin que usar. Puede pulsar <guibutton>Detectar tipos soportados</guibutton> para
- averiguar que protocolos de autentificacin admite su sistema.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Transporte de Correo:</guilabel></term>
- <listitem>
- <para>
- Este es el protocolo de envo de correo que quiera usar.
- <application>Evolution</application> soporta ambos
- <glossterm linkend="smtp">SMTP</glossterm> y
- <application>sendmail</application>; SMTP es de lejos el ms
- comn.
- </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/help/es/config-sync.sgml b/help/es/config-sync.sgml
deleted file mode 100644
index aeec2fba92..0000000000
--- a/help/es/config-sync.sgml
+++ /dev/null
@@ -1,122 +0,0 @@
- <chapter id="config-sync">
- <title>Configurando su sistema de sincronizacin</title>
- <para>
- La sincronizacin 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 sincronizacin 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 seccin
- <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 sern:
-
- <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 informacin 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 informacin 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
- mayora, querra quedarse con <guilabel>Sincronizar</guilabel>.
- Entoces, ponga el dispositivo de mano en su cuna y presione el
- botn de sincronizacin.
- </para>
-
-
- <para>
- <warning>
- <title>Prevencin de Prdida 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/help/es/evolution.sgml b/help/es/evolution.sgml
deleted file mode 100644
index 869e9df781..0000000000
--- a/help/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 gua 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 trminos de la <ulink type="help"
- url="gnome-help:fdl"><citetitle>Licencia de Documentacin Libre
- de GNU</citetitle></ulink>, Versin 1.1 o posteriores versiones
- publicadas por la Fundacin 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 Documentacin Libre de GNU</citetitle>n de la Fundacin 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 compaas para distinguir sus
- productos y servicios estn registrados como marcas. Cuando
- aparecen esos nombres en la documentacin de GNOME, y el Proyecto
- de Documentacin de GNOME tiene conocimiento de dichas marcas,
- estos han sido escritos en maysculas o empiezan con maysculas.
- </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.
- Segn vaya utilizando estas cosas descubrir que hay ms de
- una manera de hacer las cosas, y puede puede elegir el mtodo
- que ms 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, adems
- 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 Configuracin hasta una visin a fondo de los dilogos 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 mens y los
- comandos de los mens que le ofrece
- <application>Evolution</application>.
- </para>
- </partintro>
- &MENUREF;
- </part>
-
- &APX-GLOSS;
- &APX-BUGS;
- &APX-AUTHORS;
-</book>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/help/es/menuref.sgml b/help/es/menuref.sgml
deleted file mode 100644
index 4e13032213..0000000000
--- a/help/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 Mens</title>
- <para>
- Los mens 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 seccin
- servir como referencia de todos esos mens, y las posibilidades que le
- ofrecen.
- </para>
- <para>
- Ademas, las herramientas de edicin de mensajes, citas, y
- contactos todas tienen barras de herramientas propias. De izquierda a
- derecha, los mens que tiene disponible cuando est leyendo el correo
- son: <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,
- <guimenu>Vista</guimenu>, <guimenu>Configuracin</guimenu>,
- <guimenu>Mensaje</guimenu>, <guimenu>Carpeta</guimenu>and
- <guimenu>Ayuda</guimenu>.
-
- </para>
- <para>
- Los mens 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 mens relacionados con el
- correo; para su calendario, tendr opciones relacionadas con
- calendarios. Algunos mens, naturalmente, como
- <guimenu>Ayuda</guimenu> y <guimenu>Archivo</guimenu> no cambian mucho,
- si es que lo hacen, porque son funciones ms universales. Pero usted
- nunca marcar una tarjeta de direccin como "leidao", o pondra
- recurrencia a un mensaje que ha recivido. Dependiendo de si esta mirando
- el correo, los contactos, o la informacin del calendario.
- </para>
-
-
-
- <sect1 id="menuref-universal">
- <title>Mens que son iguales en todas partes</title>
- <para>
- Los mens <guimenu>Archivo</guimenu> y <guimenu>Ayuda</guimenu> de la
- ventana principal de <application>Evolution</application> no cambian,
- porque se refieren a elementos globales. Otros mens 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 ms informacin 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 ms informacin.
- </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 rpida, 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 gua 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 podrn arreglarlos. Selececion esta opcin 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 informacin sobre la aplicacin y sus autores.
- Tiene la misma informacin que <xref linkend="authors">.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-exec">
- <title>Mens del Resumen de Trabajo</title>
- <para>
- Dejaremos esta seccin en blanco hasta que la UI se estabilize un
- poco ms.
- </para>
- </sect1>
-
-
-
- <sect1 id="menuref-mail">
- <title>Mens del Correo</title>
- <para>
- El Correo de <application>Evolution</application> tiene ms mens
- especializados, y ms opciones de men especializadas, que cualquier
- otra parte de la aplicacin.
- </para>
-
- <sect2 id="menuref-mail-edit">
- <title>El Men Edicin</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 informacin.
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Mostrar Barra de Atajos</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de atajos con esta opcin.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mostrar Barra de Carpetas</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de carpetas con esta opcin.
- Vea <xref linkend="usage-mainwindow-folderbar"> para
- ms informacin acerca de la barra de carpetas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Lista de Mensajes Encadenados</guimenuitem></term>
- <listitem><para>
- Esta opcin controla si la lista de sus mensajes se muestra siguiendo la cadena de la discusin
- o por otro criterio. La ordenacin por defecto es por fecha.
- Vea <xref linkend="usage-mail-listorder"> para ms
-informacin acerca de
- como ordenar la lista de mensajes.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-tools">
- <title>El Men Configuracin 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 ms informacin 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>Configuracin 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 Contrasea</guimenuitem></term>
- <listitem><para>
- Esta opcin hara que <application>Evolution</application>
- olvide sus contraseas.
- </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 Ledos</guimenuitem></term>
- <listitem><para>
- <application>Evolution</application> se acuerda de que mensajes ha
- ledo; para marcar todos los mensajes de una carpeta como ledos elija esta opcin.
- Puede marcar un solo mensaje como ledo pulsando con el botn derecho en la barra de mensajes.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Borrar Todos</guimenuitem></term>
- <listitem><para>
- Esta es la opcin 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 opcin 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 conversin.
- </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 mayora de ellos
- requieren que haya un mensaje seleccionado, y estn tambien
- disponibles pulsando con el botn 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 direccin
- 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 direccin
- 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 segn el Asunto</guimenuitem></term>
- <listitem><para>
- Este elemento, y los tres que le siguen, crearn carpetas
- virtuales que podr personalizar ms o guardar tal cual. Este crear una
- carpeta virtual que mostrar todos los mensajes que contengan la
- lnea del asunto del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>VFolder segn 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 segn 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 segn el Asunto</guimenuitem></term>
- <listitem><para>
- Este elemento, y los tres siguientes, crearn filtros para los que
- debe elegir una accin. Puede conservar el criterio como
- est, o modificarla como quiera. Este crear un filtro que
- afectar a todos los mensajes que contengan la lnea del
- asunto del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filtrar segn 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 segn 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 Botn 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 ttulos
- individuales &mdash;
- <guilabel>Asunto</guilabel>, por ejemplo, para ordenar la lista
- de mensajes por ese atributo. Eso si, si pulsa el botn derecho
- sobre uno de los ttulos, obtendr el siguiente men:
- </para>
-
- <para>
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Ordenar Ascendentemente</guimenuitem></term>
- <listitem><para>
- Ordenar la lista, en orden ascendente, segn 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 ordenacin mediante este atributo, y dejar la lista
- segn el orden anterior.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Agrupar segn 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 posicin en la barra de cabecera
- de la lista de mensajes; aparecen flechas rojas cunado se acerca los
- suficiente a una posicin posible.</para>
-
- <para>
- Sus opciones son:
- <itemizedlist>
- <listitem><para>
- <guiicon>Un Sobre</guiicon> el cual indica cuando un mensaje a sido ledo (cerrado para no ledo, abierto para ledo).
- </para></listitem>
-
- <listitem><para>
- <guiicon>Un Signo de Exclamacin</guiicon> para la prioridad
- </para></listitem>
-
- <listitem><para>
- <guiicon>Un Pingino</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>Tamao</guilabel>, para el tamao del mensaje.
- </para></listitem>
- </itemizedlist>
- </para>
-
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Alineacin</guimenuitem></term>
- <listitem><para> Use este elemento para decidir sobre la alineacin
- de los atributos de los mensajes en sus columnas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mejor Colocacin</guimenuitem></term>
- <listitem><para>
- Modifica el ancho de las columnas de la lista de mensajes para
-maximizar la cantidad de informacin mostrada.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Formato de las Columnas...</guimenuitem></term>
- <listitem><para>
- Este elemento no est disponible todava.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Personalizar
- Vistas...</guimenuitem></term> <listitem><para> Abre una
- caja de dilogo que le permite elegir una ordenacin 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 Mens del Compositor de Mensajes</title>
- <para>
- La ventana de composicin de mensajes tiene su propio juego de mens:
- <guimenu>Archivo</guimenu>, que controla las operaciones sobre los
- archivos y los datos, <guimenu>Editar</guimenu>, para la edicin de
- textos, <guimenu>Formato</guimenu>, que controla el formato de los
- mensajes que enva, <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 ms 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 estn
- al lado de los elementos en los propios mens.
-
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Deshacer</guimenuitem></term>
- <listitem><para>
- Deshace la ltima accin realizada.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Rehacer</guimenuitem></term>
- <listitem><para>
- Si cambia de idea sobre Deshacer algo,
- siempre puede usar esta opcin.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Cotar</guimenuitem></term>
- <listitem><para>
- Elimina el texto seleccionado de la ventana de edicin 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
- posicin 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 Expresin</guimenuitem>,
- <guimenuitem>Buscar de nuevo</guimenuitem>, y
- <guimenuitem>Remplazar</guimenuitem>, <application>Evolution</application>
- le ofrecer la opcin de buscar hacia adelante o hacia atras.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Buscar Expresin</guimenuitem></term>
- <listitem><para>
- Si esta familiarizado con las <glossterm>expresiones regulares</glossterm>,
- ha veces llamadas "regexes", puede buscar cosas ms complicadas,
- usando comodines y lgica booleana.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Buscar de nuevo</guimenuitem></term>
- <listitem><para>
- Repite la ltima bsqueda.
- </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 gustara
- reemplazarla.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Propiedades</guimenuitem></term>
- <listitem><para>
- Esta opcin muestra el Capplet de Propiedades del Compositor de Mensajes,
- una parte del Centro de Control de GNOME ue determina la
- asociacin 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 opcin:
- <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 opcin 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 opcin est seleccionada,
- <application>Evolution</application> crear una caja separada
-de la ventana
- del compositor de mensajes para mostrar que archivos adjuntos est aadiendo
- 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 imgenes, 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 creacin de enlaces</interface>,
- que le permite especificar la URL y un descripcin 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>dilogo de creacin de reglas horizontales</interface>, el cual le permite
- crear una regla horizontal en HTML. Para ms informacin, 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 Mens del Calendario</title>
- <para>
- La ventana principal del calendario tiene los mismos mens 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 todava fijo, as que no lo
- voy a documentar todava. (Esto significa ARREGLAME). Deberian
- ser:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- Descripcin
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- Descripcin
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- Descripcin
- </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 opcin.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mostrar la Barra de Carpetas</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de carpetas con esta opcin.
- Vea <xref linkend="usage-mainwindow-folderbar"> para
- ms informacin acerca de la barra de carpetas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista por Das</guimenuitem></term>
- <listitem><para>
- Cambia el calendario a la vista diaria.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista Cinco Das</guimenuitem></term>
- <listitem><para>
- Muestra cinco das 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 Configuracin del Calendario</title>
- <para>
- Este men est vaco.
- </para>
- </sect2>
-
- </sect1>
-
- <sect1 id="menuref-cal-editor">
- <title>Los Mens del Editor de Citas</title>
- <para>
- El editor de citas tiene sus propios mens, 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 posicin y nombre actual. Si todava no ha elegido
- una posicin 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 posicin 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 Configuracin de Pgina</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 Impresin</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 tendrn su cita si la
- imprime. Vea <xref linkend="usage-print">
- para ms detalles sobre imprimir y la funcin 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 opcin 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 opcin 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 peticin 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 todava:
- <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 Ortogrfico</guimenuitem></term>
- <listitem><para>
- Comprueba la ortografa 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 Reunin</guimenuitem></term>
- <listitem><para>
- Aparece la ventana de <interface>Invitacin de Reunin</interface>,
- descrita en <xref linkend="usage-calendar-apts">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Cancelar Invitacin</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 descripcin 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 vaco.
- </para>
- </sect2>
-
- </sect1>
-
- <sect1>
- <title>Mens del Administrador de Contactos</title>
- <para>
- El administrador de contactos tiene seis mens:
- <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,
- <guimenu>Vista</guimenu>, <guimenu>Configuracin</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 vaco.
- </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 opcin.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Muestra la Barra de Carpetas</guimenuitem></term>
- <listitem><para>
- Active y descative la barra de carpetas con esta opcin.
- Vea <xref linkend="usage-mainwindow-folderbar"> para
- ms informacin 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 opcin 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 opcin:
-
- <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 caracterstica.
- </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 opcin:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Nuevo Servidor de Directorio</guimenuitem></term> <listitem><para> Muestra una ventana
- de bsqueda en profundidad. <xref
- linkend="config-prefs-contact-ldap-add"> describe como usar esta
- caracterstica. </para></listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-contact-editor">
- <title>Los Mens 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/help/es/preface.sgml b/help/es/preface.sgml
deleted file mode 100644
index 82b5856eb0..0000000000
--- a/help/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>Introduccin</title>
-
- <sect1 id="what">
- <title>Qu es Evolution, y qu puede hacer por mi?</title>
- <para>
- La informacin 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 informacin personal sean
- ms fciles, 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 cdigo fuente estn liberados bajo los trminos de
- la <ulink type="help" url="gnome-help:gpl"><citetitle>General Public License "Licencia Pblica
- General" (GPL)</citetitle></ulink> de GNU, y la
- documentacin est bajo la <ulink type="help"
- url="gnome-help:fdl"><citetitle>Free Documentation
- License "Licencia Libre de Documentacin"</citetitle></ulink>
- (FDL). Para ms informacin acerca de la GPL y de la FDL,
- visite el sitio web de la Free Software Foundation "Fundacin para
- el Software Libre" en <ulink
- url="http://www.fsf.org">http://www.fsf.org</ulink>.
- </para>
- <para>
- <note>
- <title>Esta es una liberacin de prueba</title>
- <para>
- <application>Evolution</application> no esta completa, y
- todava tiene muchos fallos. Por favor aydenos 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 lnea de comandos).
- </para>
- </note>
- </para>
-
- <para>
- <application>Evolution</application> le puede ayudar a trabajar en
- grupo encargandose del correo, direcciones y otra informacin
- de contacto, y uno o ms 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 aplicacin 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 aplicacin.
- Desde los guiones ms simples a la programacin de red y
- componentes ms 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 informacin, 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 diseada para hacer la
- mayora de las tareas diarias ms rpido. 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 ms rpidas y eficientes, para que las bsquedas
- sean ms rpidas y el uso de la memoria sea menor. Las personas
- que reciben mucho correo apreciarn las caractersticas avanzadas
- como las <link
- linkend="usage-mail-organize-vFolders">Carpetas Virtuales</link>,
- que le permiten guardar bsquedas 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 versin de la Gua de Usuario de
- <application>Evolution</application> es un
- <emphasis>borrador</emphasis>. Describe la versin 0.6 del
- programa. Le faltan grandes piezas de informacin, y muchas de
- las arecteristicas que describe no estn implementadas.
- Todo el contenido esta sujeto a cambios, especialmente si usted
- colabora. Por favor ebvie comentarios sobre la gua a
- <email>aaron@ximian.com</email> y sobre la traduccin a
- <email>hector@scouts-es.org</email>. Si le gustara colaborar en la
- gua por favor pongase en contacto conmigo o vea el <ulink
- url="http://developer.gnome.org/projects/gdp">sitio
- web</ulink> del proyecto de Documentacin de GNOME. Este prrafo
- 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 seccin es para usted. La segunda seccin,
- cubriendo la <link linkend="config">configuracin</link>, est
- dirijida a usuarios ms 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 mens</link>
- que describe casi todas las posibilidades que ofrece
- <application>Evolution</application>.
- </para>
- <formalpara>
- <title>Convenios Tipogrficos</title>
- <para>
- Algunas clases de palabras estn escritas con una tipografa especial:
- <simplelist>
- <member><application>Aplicaciones</application></member>
- <member><command>Comandos</command> escritos en la lnea de comandos</member>
- <member><guilabel>Etiquetas</guilabel> de elementos de la interfaz</member>
-
- <member> La opcciones de los mens aparecen as:
- <menuchoice>
- <guimenu>Men</guimenu>
- <guisubmenu>Sub-men</guisubmenu>
- <guimenuitem>Opcin 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 estn definidas en el <xref linkend="apx-gloss">.</member>
- </simplelist>
- </para>
- </formalpara>
- </sect1>
- <sect1 id="commontasks">
- <title>Referencia Rpida para Tareas Comunes</title>
- <para>
- Puede que quiera copiar esta seccin y pegarla a la pared de al lado
- de su ordenador: es un resumen muy corto de la mayora de las cosas
- que querr hacer con <application>Evolution</application>, y
- referencias a las secciones del libro donde encontrar descripciones
- ms profundas de dichas tareas.
- </para>
- <sect2 id="quickref-newthings">
- <title>Abriendo o Creando algo</title>
- <para>
- Aqu estn 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 estn las tareas ms comunes con el correo, y los
- atajos para manejarse por su buzn con el teclado en lugar
- de con el ratn:
- <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 especfico desde el men que
- aparece al pulsar el botn derecho del ratn.
- Alternativamente, seleccion un mensaje, y elija
- <menuchoice><guimenu>Configuracin</guimenu>
- <guimenuitem>Filtros de Correo</guimenuitem> </menuchoice>
- o <menuchoice> <guimenu>Configuracin</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/help/es/usage-calendar.sgml b/help/es/usage-calendar.sgml
deleted file mode 100644
index 1abbace951..0000000000
--- a/help/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 da. 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 da, cinco das, 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 das&mdash; tres das, diez das, quinzenas
- si quiere&mdash; en el pequeo calendario en la esquina superior
- derecha.
- </para>
- <para>
- Los botones <guibutton>Previo</guibutton> y <guibutton>
- Siguiente</guibutton> le movern hacia alante y hacia atrs en las
- pginas de su calendario. Si est viendo solo a un da, ver la
- pgina de maana 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 da 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 dilogo 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 ms que
- saber que da es. Esta seccin 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 botn <guibutton>Nuevo</guibutton> a la izquierda de la barra
- de herramientas. El dilogo 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 ms informacin 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
- informacin ms 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 da</guilabel>. Un <guilabel>Evento de todo el da</guilabel>
- aparece arriba en una lista de eventos diarios en lugar de dentro
- del da. Eso hace que sea ms facil tener eventos que se solapen y
- que esten unos dentro de otros. Por ejemplo, una conferencia puede
- ser un evento de todo el da, y los encuentros en la conferencia
- serian eventos parciales. Naturalmente, los eventos con horarios
- especficos 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 opcin 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 aplicacin adicional se
- ejecute como recordatorio. Puede escribir su nombre en el campo
- de texto, o buscarla con el botn
- <guibutton>Buscar</guibutton>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Correo</guilabel></term>
- <listitem>
- <para>
- <application>Evolution</application> enviar un mensaje
- recordatorio a la direccin que haya escrito en el campo de
- texto.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- <para>
- <guilabel>Clasificacin</guilabel> es un poco ms complicado,
- y solo afecta a los calendarios en red.
- <guilabel>Pblico</guilabel> es la categora por defecto,
- y un evento pblico puede ser visto por cualquiera en la red de
- conparticin 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 pestaa <guilabel>Recurrencia</guilabel> le permite describir
- repeticiones en eventos que van desde una vez cada da a una vez
- cada 100 aos. Puede tambien elegir cuando cesarn las
- repeticiones, y, bajo <guilabel>Excepciones</guilabel>, elegir
- das 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 configuracin, pulse en el icono
- del disco en la barra de herramientas. Esto guardar el evento y cerrar
- la ventana de edicin 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 botn derecho del ratn 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 ms inforacin), y son incluidas con la informacin del
- calendario cuando se sincroniza con dispositivo de mano. Puede usar
- la lista en un formato ms grande eligiendo el botn
- <guibutton>Tareas</guibutton> de la barra de atajos o del arbol de
- carpetas.
- </para>
- <para>
- Para guardar una nueva tarea, pulse sobre el botn
- <guibutton>Aadir</guibutton>. <application>Evolution</application>
- mostrar una pequea ventana con cinco elementos en ella:
-
- <variablelist>
- <varlistentry>
- <term> <guilabel>Resumen:</guilabel></term>
- <listitem>
- <para>
- La descripcin 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 (ms 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 descripcin ms detallada
- del elemento.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Una vez que ha aadido una tarea a su lista "por hacer", su resumen
- aparece en la seccin <guilabel>Resumen</guilabel> de la lista de
- tareas. Para ver o editar una descripcin 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 botn <guibutton>Borrar</guibutton>.
- </para>
- </sect1>
-
- <sect1 id="usage-calendar-multiple">
- <title>Mltiples Calendarios</title>
- <para>
- <application>Evolution</application> le permite tener y mantener
- mltiples calendarios. Esto es til si mantiene horarios para otras
- personas, si es el responsable de la bsqueda de recursos o
- habitaciones, o si tiene mltiples personalidades.
- </para>
-
- <example>
- <title>Manteniendo Mltiples Calendarios</title>
- <para>
- Keelyn, la encargada de oficina de una pequea compaa, 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 das 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
- configuracin, y las vistas de cada calendario se mantienen separadas
- unas de otras.
- </para>
-
- </sect1>
-</chapter>
-
-
-
-
-
-
-
-
-
-
diff --git a/help/es/usage-contact.sgml b/help/es/usage-contact.sgml
deleted file mode 100644
index c419b2e6b1..0000000000
--- a/help/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 bsqueda rpida. Para usarlo,
- elija de la lista descendente que clase de bsqueda quiere hacer
- (toda la tarjeta, solo el nombre, o solo la direccin de correo),
- entonces escriba una o ms 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 bsquedas haciendo varias bsquedas sucesivas,
- o empezar de nuevo pulsando el botn <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 Bsqueda Rpida</title>
- <para>
- Tom vuelve de almorzar y se encuantra una nota en su teclado:
- "Le ha llamado Curtis de ventas, pero no dejo un telfono,
- y se me olvid anotar la compaa 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 rpida 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 bsqueda ms compleja, pulse
- <guibutton>Buscar</guibutton> o elija
- <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Buscar
- Contacto</guimenuitem></menuchoice>. Esto abrir la ventana de
- bsqueda a fondo, que le permitir usar multiples criterios de
- bsqueda de la misma manera que en los filtros de correo y las
- <glossterm linkend="vfolder">carpetas virtuales</glossterm>.
- </para>
- <para>
- Pulse <guibutton>Aadir Criterio</guibutton> para aumentar el
- nmero de criterios que quiere usar en la bsqueda, y
- <guibutton>Eliminar Criterio</guibutton> para eliminar uno del la
- parte inferior de la lista. Su criterio puede ser una bsqueda en
- los campos <guilabel>Nombre</guilabel> o
- <guilabel>Correo</guilabel>. Alternativamente puede elegir buscar en
- todos los campos con una expresin 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 aadir 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 informacin
- actual. Si quiere crear una nueva, pulsando el botn
- <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 pestaas,
- <guilabel>General</guilabel>, para informacin contacto bsica,
- y <guilabel>Detalles</guilabel>, para una descripcin ms especfica
- 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 pestaa <guilabel>General</guilabel> tiene siete secciones,
- cada una con un icono, una cara, para el nombre y la compaa, un
- telfono para nmeros de telfono, un sobre para direcciones de
- correo, un globo terraqueo para direcciones de pginas web, una
- casa para direccin postal, un archivador para contactos, y una
- cartera para categoras.
- </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 pestaa <guilabel>General</guilabel> es la
- herramienta de organizacin de <guilabel>Categorias</guilabel>, para
- ver informacin acerca de ella, lea <xref
- linkend="usage-contact-organize">.
- </para>
- <para>
- La pestaa de <guilabel>Detalles</guilabel> es, afortunadamente,
- mucho ms simple: tres secciones, las cuales son ms 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 ms
- flexibilidad, puede marcar los contactos como miembros de
- diferentes categoras.
- </para>
-
- <sect3 id="usage-contact-organize-group-folder">
- <title>Agrupando con Carpatas</title>
- <para>
- La manera ms sencilla de agrupar tarjetas de direcciones es usar
- carpetas. Por defecto, las tarjetas estn 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 ms 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 Categoras</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 categora 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 categora "Negocios", porque
- trabaja conmigo, en la categora "Amigos", porque tambien es mi
- amigo, y en la categora "Frecuente", porque le llamo
- continuamente y nunca me acuerdo de su nmero de telfono.
- </para>
- <para>
- Para marcar una tarjeta como perteneciente a una categora, pulse
- botn <guibutton>Categorias</guibutton> abajo a la derecha.
- De la ventana de dilogo que aparece, puede marcar tantas
- categoras como quiera.
- </para>
- <para>
- Entonces, puede referirse a todas las tarjetas en esa categora
- haciendo: <!-- ARREGLAME --> Esperando a que Evolution soporte
- la operacin.
- </para>
-
- <!-- ARREGLAME: Caracteristica no implementeada
- <para>
-
- Si la lista principal de categoras no le es suficiente, puede
- aadir las suyas propias. Simplemente escriba el nombre de la
- nueva categora en la caja de texto, entonces pulse
- <guibutton>Categorias</guibutton> y elija
- <guilabel>Aadir 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 informacin de contacto compartida
- para su compaa o su departamento. Esta es la clase de
- caractersticas que querr si su compaa 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 da en los desarrollos de su
- grupo de trabajo o de la compaa entera.
- </para>
-
- <example id="usage-contact-sharing-ex">
- <title>Conpartiendo Tarjetas de Direcciones y Datos del Calendario</title>
- <para>
- Raul quiere concertar una reunin con la Compaa X, as que
- busca en la red la tarjeta de la Compaa X para saber a quien tiene
- que llamar. Dado que su compaia comparte un calendario, ve que su
- compaera Diana ya ha concertado una reunin con la Compaa X para el
- prximo jueves. Puede ir el mismo a la reunin o pedir a Diana que
- trate el tema por el. De cualquier modo, evita concertar otra cita
- co la Compaa 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>Envame una Tarjeta: Aadiendo Tarjetas Rpidamente</title>
- <para>
- Como se ha visto antes, cuando obtiene informacin acerca de una
- persona en el correo o en una entrada del calendario, puede aadirla
- a una tarjeta de direcciones. Para hacerlo, pulse con el botn
- derecho en cualquier direccin de correo o mensaje de correo, y
- seleccione <guimenuitem>Aadir Tarjeta de Direcciones</guimenuitem>
- del men que aparece. Naturalmente,
- <application>Evolution</application> tambien aade tarjetas desde un
- dispositivo de mano durante la operacin de sincronizacin. Para ms
- informacin 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 ms
- 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/help/es/usage-mail.sgml b/help/es/usage-mail.sgml
deleted file mode 100644
index e1e02327fc..0000000000
--- a/help/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 enva 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 mayora de imgenes se mostrarn dentro del mensaje.
- Para otros archivos,
- <application>Evolution</application> mostrar un icono al final
- del mensaje. Pulse con el botn derecho sobre el icono para obtener
- una lista de opciones que variarn dependiendo del tipo de adjunto.
- Tendr la opcin de mostrar la mayora de los archivos como parte del
- mensaje, exportarlos a otra aplicacin (imgenes a Eye of GNOME, hojas
- de clculo a Gnumeric, y as sucesivamente), o guardarlo en el disco.
- </para>
-
- <para>
- <application>Evolution</application> tambien puede mostrar
- correo formateado en HTML, completo con grficos. 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 ms tarde</title>
- <para>
- Evolution enviar el mensaje inmediatamente a menos que le diga lo
- contrario seleccionando <menuchoice>
- <guimenu>Archivo</guimenu> <guimenuitem>Enviar ms
- Tarde</guimenuitem></menuchoice>. Esto aadir 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 enviarn en ese momento.
- Me gusta usar "Enviar ms Tarde" porque me permite tener la oportunidad
- de cambiar de opinin acerca de un mensaje antes de enviarlo. De esa forma
- no envio nada de lo que me arrepentir al da siguiente.
- </para>
- Para aprender ms 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>Composicin 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 botn con un clip de la barra de herramientas,
- con el ttulo <guibutton>Adjuntar</guibutton>. Si presiona el
- botn <guibutton>Adjuntar</guibutton>,
- <application>Evolution</application> abrir una ventana de seleccin
- 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 mayora de
- los programas de correo reconoce tres tipos de direcciones
- destinatarios principales, destinatarios secundarios, y
- destinatarios escondidos ("oculto").
- </para>
- <para>
- La manera ms simple de dirigir un mensaje es poner la direccin
- o direcciones de correo en el campo <guilabel>A:</guilabel>,
- el cual denota a los destinatarios principales. Para enviar
- correo a ms 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 mquinas
- de escribir y no habia fotocopiadoras, "Cc" significa
- "Copia de Carbn". 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 compaero,
- Tim, en el campo <guilabel>Cc:</guilabel>, para que sepa como van
- las cosas. El cliente puede ver que Tim tambin recivi el
- mensaje, y sabe que tambin puede hablar con Tim acerca del
- mensaje.
- </para>
- </example>
- </para>
- <para>
- Si tiene un gran nmero 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 enva 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 compaa, 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 compaa sea pblica.
- Parece una pequea diferencia, pero en ocasiones puede tener
- una gran importancia.
- </para>
- </example>
- </para>
- </sect4>
-
- <sect4 id="usage-mail-getnsend-send-to">
- <title>Eligiendo Rpidamente 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 direccin, y
- <application>Evolution</application> completar la direccin por usted
- <!-- (INSERTAR descripcin de la IU para esta caracteristica,
- una vez que se decida). --> Si escribe un nombre oun apodo
- puede coincidir con ms de una tarjeta, Evolution abrir una ventana de
- dilogo y le preguntar a quien se refiere.
- <!-- (TODAVIA NO) Tambien, <application>Evolution</application>
- aadir un dominio a cualquier direccion incompleta. Por defecto, ser
- su dominio, pero puede elegirlo en el dilogo 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 ms informacin 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 botn
- <guibutton>Responder</guibutton> mientras est seleccionado,
- o elija <guimenuitem>Responder al Remitente</guimenuitem> del menu
- del botn derecho del mensaje. Esto abrir el
- <interface>compositor de mensajes</interface>. Los campos
- <guilabel>A:</guilabel> y <guilabel>Asunto</guilabel>
- ya estarn escritos, aunque puede alterarlos si lo desea.
- Ademas, el texto completo del antiguo mensaje es insertado en el
- nuevo mensaje, bien sea con itlicas (para vista en HTML) o con el
- caracter &gt; precediendo cada lnea (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 ms en descargar
- y en ser mostrado. <emphasis>Algunas</emphasis> personas se hablan
- correo con HTML como "la raz de todos los males" y se enfadan
- mucho si les envia correo con HTML, por lo cual
- <application>Evolution</application> enva 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 dilogo de configuracin del correo.
- Vea <xref linkend="config-prefs-mail-other"> para ms informacin.
- </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 ratn sobre los botnes. Los botones entran en cuatro
- categoras:
- <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 tamaos de las
- cabeceras desde grande (1) hasta pequeo (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 ms
- 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 itlicas</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>Alineacin</term>
- <listitem>
- <para>
- Localizado al lado de los botones de estilo del texto, estos tres
- iconos de prrafo deberian ser familiares para aquellos usuarios de
- la mayora de los procesadores de texto. El botn ms a la izquierda
- har que su texto se alinee a la izquierda, el botn central, lo
- centrar, y el botn a la derecha, lo aliner al lado derecho.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Reglas de indentacin</term>
- <listitem>
- <para>
- El botn con la flecha hacia la izquierda reducir
- la indentacin de un prrafo, y la flecha a la derecha
- incrementar su indentacin.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Seleccin de colores</term>
- <listitem>
- <para>
- En la parte derecha esta la herramienta de seleccin de color.
- La caja coloreada muestra el color actual del texto. Para
- elegir uno nuevo, pulse el botn 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 continuacin.
- </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 Tcnica 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 hara una
- herramienta de composicin 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 Cortesa 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 mltiples 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 cortesa excasa, pero sea cortes!
- </para>
- </listitem>
-
- <listitem>
- <para>
- TODO EN MAYUSCULAS SIGNIFICA QUE EST GRITANDO! No escriba todo el
- mensaje en mayusculas. Hace dao a los oidos de la gente.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Nunca escriba en un mensaje electrnico nada que no dira en pblico.
- Los mensajes antiguos tienen la mala costumbre de reaparecer cuando
- menos se lo espera.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Compruebe su ortografa 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 reenva, incluya justo lo suficiente del mensaje
- anterior para tener un contexto: no incluya demasiado,
- ni demasiado poco.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> Feliz envo 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 segn 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 Caractersticas 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 seguirn. </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, Bsquedas, y Carpetas Virtuales</title>
- <para>
- Para organizar el correo en mi buzn, defino una carpeta virtual para
- los mensajes de mi amiga y compaera Anna. Tengo otra para los
- los mensajes que tienen "ximian.com" en la direccin y "Evolution"
- en el asunto, as puedo registrar que personas del trabajo me escriben
- acerca de <application>Evolution</application>. Si Anna me enva 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
- "Discusin 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/help/es/usage-mainwindow.sgml b/help/es/usage-mainwindow.sgml
deleted file mode 100644
index 44dd90350a..0000000000
--- a/help/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 Bsicos 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/help/es/usage-notes.sgml b/help/es/usage-notes.sgml
deleted file mode 100644
index fb4e3289b2..0000000000
--- a/help/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 electrnico fuera inventado,
- habia pequeos trozos de papel que la gente usaba para guardar
- informacin 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 electrnico.
- Tiene sentido, entonces, que <application>Evolution</application>
- eventualmente tenga una funcin de notas.
- <application>Evolution</application> le ayuda a tomar notas de la
- siguientes formas:
- <itemizedlist>
- <listitem>
- <para>
- Apunte nmeros de telfono, notas de la escuela, tome notas de
- mensajes telefnicos, o incluso escriba poesa.
- </para>
- </listitem>
- <listitem>
- <para>
- Un cdigo 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 electrnico 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/help/es/usage-print.sgml b/help/es/usage-print.sgml
deleted file mode 100644
index ef5b501f8e..0000000000
--- a/help/es/usage-print.sgml
+++ /dev/null
@@ -1,104 +0,0 @@
-<chapter id="usage-print">
-<title>Imprimiendo con Evolution</title>
-<para>
- Este es un captulo muy corto, porque imprimir con
- <application>Evolution</application> no es unatarea complicada. Como
- la mayora de las aplicaciones GNOME, <application>Evolution</application>
- usa el sistema gnome-print, as que si ha usado otra aplicacin GNOME
- para imprimir, debera sera capaz de imprimir inmeditamente en
- <application>Evolution</application>.
-</para>
-<para>
- Tanto si esta imprimiendo un mensaje, una pagina del calendario, o una
- seleccin de tarjetas de visita, puede elegir entre imprimirlo directamente
- en la impresora, o guardar la salida de la impresin en un archivo
- postscript. Tambin puede usar la caracterstica de vista previa para ver
- como ser la salida.
-</para>
-
- <sect1 id="printpreview">
- <title>Vista Previa de la Impresin</title>
- <para>
- <guibutton>Vista Previa</guibutton> aparece como un botn en
- el dilogo de impresin y como una opcin en el men
- <guimenu>Archivo</guimenu>. En ambos sitios, hace lo mismo:
- abre una nueva ventana que le muestra que pasara si imprimiese
- el mensaje, el calendario, la cita, o la tarjeta de actual.
- </para>
- <para>
- Esa ventana le permite sleccionar que pginas quiere ver,
- y como de cerca quiere verlas. Aumentar o disminuir el zoom,
- ajustar la pgina a la ventana (el botn <guibutton>Ajustar</guibutton>)
- o igualar el ancho del papel con el de la ventana (el botn
- <guibutton>Ajustar Ancho</guibutton>). Ninguno de estos botones
- modifica la manera en que se imprimen las pginas, 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 Impresin</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 seleccin de impresora, mostrada en <xref
- linkend="print-dest">, le permite elegir el formato de
- impresin&mdash; en estos momentos, solo est disponible
- <guilabel>Postscript Genrico</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
- nmero 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 ms de una pgina, tiene la
- opcin de elegir que pginas 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 ms)
- a la vista previa, o <guibutton>Cancelar</guibutton> para cancelarlo
- todo.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
diff --git a/help/es/usage-sync.sgml b/help/es/usage-sync.sgml
deleted file mode 100644
index 878406c4b6..0000000000
--- a/help/es/usage-sync.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
-
- <chapter id="usage-sync">
- <title>Sincronizando con un Dispositivo de mano</title>
- <para>
- Este captulo cubre como sincronizar datos una vez instalado y
- configurado. Si necesita informacin sobre como preparar un
- sistema de sincronizacin, consulte <xref
- linkend="config-sync">.
- </para>
- <sect1 id="hotsync">
- <title>Usando la Sincronizacin</title>
- <para>
- Ponga su dispositivo de mano en su cuna y apriete el botn
- de sincronizacin.
- </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/help/no/.cvsignore b/help/no/.cvsignore
deleted file mode 100644
index 11bc8ea04b..0000000000
--- a/help/no/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-*.log
-*.ps
-*.dvi
-*.tex
-evolution
-index.html
-omf_timestamp \ No newline at end of file
diff --git a/help/no/ChangeLog b/help/no/ChangeLog
deleted file mode 100644
index 587d79e81c..0000000000
--- a/help/no/ChangeLog
+++ /dev/null
@@ -1,5 +0,0 @@
-2001-08-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * ChangeLog: Added this here.
- * topic.dat:: Norwegian version.
- \ No newline at end of file
diff --git a/help/no/Makefile.am b/help/no/Makefile.am
deleted file mode 100644
index 56df841020..0000000000
--- a/help/no/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-figs = \
- figures/calendar.png \
- figures/config-cal.png \
- figures/config-mail.png \
- figures/contact-editor.png \
- figures/contact.png \
- figures/filter-assist-fig.png \
- figures/filter-new-fig.png \
- figures/full-1.png \
- figures/full-2.png \
- figures/full-3.png \
- figures/full-4.png \
- figures/full-5.png \
- figures/full-6.png \
- figures/full-7.png \
- figures/mail-composer.png \
- figures/mail-druid-pic.png \
- figures/mail-inbox.png \
- figures/mainwindow-pic.png \
- figures/newmsg.png \
- figures/print-dest.png \
- figures/print-preview.png \
- figures/replymsg.png \
- figures/vfolder-createrule-fig.png
-docname = evolution
-lang = no
-omffile = evolution-no.omf
-sgml_ents = \
- apx-authors.sgml \
- apx-bugs.sgml \
- apx-gloss.sgml \
- config-encryption.sgml \
- config-prefs.sgml \
- config-sync.sgml \
- evolution-faq.sgml \
- menuref.sgml \
- preface.sgml \
- usage-calendar.sgml \
- usage-contact.sgml \
- usage-encryption.sgml \
- usage-exec-summary.sgml \
- usage-mail-org.sgml \
- usage-mail.sgml \
- usage-mainwindow.sgml \
- usage-print.sgml \
- usage-sync.sgml
-
-include $(top_srcdir)/help/sgmldocs.make
-dist-hook: app-dist-hook
diff --git a/help/no/apx-authors.sgml b/help/no/apx-authors.sgml
deleted file mode 100644
index 37497ae176..0000000000
--- a/help/no/apx-authors.sgml
+++ /dev/null
@@ -1,84 +0,0 @@
- <appendix id="authors">
- <title>Forfattere</title>
- <para>
- <application>Evolution</application> er skrevet av:
-<simplelist>
- <member>Seth Alves: <email>alves@ximian.com</email></member>
- <member>Anders Carlsson: <email>andersca@gnu.org</email></member>
- <member>Damon Chaplin: <email>damon@ximian.com</email></member>
- <member>Clifford R. Conover: <email>rusty@zootweb.com</email></member>
- <member>Miguel De Icaza: <email>miguel@ximian.com</email></member>
- <member> Radek Doulik: <email>rodo@ximian.com</email></member>
- <member>Arturo Espinoza: <email>arturo@nucleu.unam.mx</email></member>
- <member>Larry Ewing: <email>lewing@ximian.com</email></member>
- <member>Bertrand Guiheneuf: <email>bertrand@ximian.com</email></member>
- <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>
- <member>Christopher J. Lahey: <email>clahey@ximian.com</email></member>
- <member>Matthew Loper: <email>matt@loper.org</email></member>
- <member>Federico Mena: <email>federico@ximian.com</email></member>
- <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>
- <member>Nat Friedman: <email>nat@ximian.com</email></member>
- <member>Ettore Perazzoli: <email>ettore@ximian.com</email></member>
- <member>Jeffrey Stedfast: <email>jeff@ximian.com</email></member>
- <member>Russell Steinthal: <email>rms39@columbia.edu</email></member>
- <member>Peter Teichman: <email>peter@ximian.com</email></member>
- <member>Chris Toshok: <email>toshok@ximian.com</email></member>
- <member>Peter Williams: <email>peter@newton.cx</email></member>
- <member>Dan Winship: <email>danw@ximian.com</email></member>
- <member>Michael Zucchi: <email>notzed@ximian.com</email></member>
-</simplelist>
-og andre dedikerte GNOME-programmerere.
-</para>
- <para>
- <application>Evolution</application>-koden str i stor gjeld
- til <application>GNOME-pim</application> og
- <application>GNOME-Calendar</application> applikasjonene, og til
- <application>KHTMLW</application>. <application>Evolution</application>-
- utviklerene er takknemlige for innsatsen og bidragene fra alle
- som har arbeidet p disse prosjektene.
- </para>
-
- <para>
- For mer informasjon vennligst besk
- <application>Evolution</application> <ulink
- url="http://www.ximian.com/apps/evolution.php3"
- type="http">nettsiden</ulink>. Vr vennlig og send alle
- kommentarer, forslag og feilrapporter til <ulink
- url="http://bugzilla.gnome.org" type="http">GNOME feilrapporterings-
- databasen</ulink>. Instruksjoner for innsending av feilrapporter kan
- finnes p nettet p <ulink
- url="http://bugzilla.gnome.org/bugwritinghelp.html" type="http">
- http://bugzilla.gnome.org/bugwritinghelp.html</ulink>. Du kan ogs bruke
- kommandoen <command>bug-buddy</command> for sende inn feilrapporter.
- </para>
- <para>
- Denne brukerhndboken er skrevet av Aaron Weber
- (<email>aaron@ximian.com</email>), Kevin Breit
- (<email>battery841@mypad.com</email>) Duncan Mak
- (<email>duncan@ximian.com</email>) og Ettore Perazzoli
- (<email>ettore@ximian.com</email>) med hjelp fra
- applikasjonsprogrammererene og GNOME Documentation Project.
- Vennligst send alle kommentarer og forslag angende brukerhndboken
- til GNOME Documentation Project p
- <email>docs@gnome.org</email>. Du kan ogs legge til dine kommentarer
- p nett ved bruke <ulink type="http"
- url="http://www.gnome.org/gdp/doctable/">GNOME Documentation
- Status Table</ulink>.
- </para>
- <para>
- Oversettelser:
- <itemizedlist>
- <listitem><para>
- Daniel Persson for .se
- </para></listitem>
-
- <listitem><para>
- Hector Garcia Alvarez for .es
- </para></listitem>
-
- <listitem><para>
- Kjartan Maraas for .no
- </para></listitem>
- </itemizedlist>
- </para>
- </appendix>
diff --git a/help/no/apx-bugs.sgml b/help/no/apx-bugs.sgml
deleted file mode 100644
index 3ef159ce5b..0000000000
--- a/help/no/apx-bugs.sgml
+++ /dev/null
@@ -1,23 +0,0 @@
- <appendix id="bugs">
-
- <title>Kjente feil og begrensninger</title>
- <abstract>
- <para>
- Dette tillegget beskriver kjente feil og begrensninger i
- <application>Evolution</application>. Vennligst bruk GNOME
- <application>Bug Report Tool</application> (kjent som
- <command>bug-buddy</command> p kommandolinjen) hvis du finner feil
- vi ikke har listet.
- </para>
- </abstract>
-
- <para>
- Evolution er fremdeles beta programvare, s feilsking br helst
- overlates til bugzilla-systemet og til programmererene. Uansett,
- der er en rekke begrensninger som ikke vil bli adressert fr
- versjon 1.0. De mest merkbare er: Import av Microsoft Outlook
- .pst filer, og kompatibilitet med Microsoft
- Exchange protokollen.
- </para>
- </appendix>
-
diff --git a/help/no/apx-gloss.sgml b/help/no/apx-gloss.sgml
deleted file mode 100644
index 76102417c4..0000000000
--- a/help/no/apx-gloss.sgml
+++ /dev/null
@@ -1,470 +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="expunge">
- <glossterm>Expunge</glossterm>
- <glossdef>
- <para>
- When messages are marked for deletion, they remain till they are expunged.
- When a message is expunged, it is permanently deleted, as long as it was
- marked for deletion.
- </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>
- If you get a message intended for someone else, you can use
- message forwarding to send it on to the right person.
- </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,
- including email, calendar, and addressbook tools.
- </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/help/no/config-encryption.sgml b/help/no/config-encryption.sgml
deleted file mode 100644
index e36f17c652..0000000000
--- a/help/no/config-encryption.sgml
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[]>
-
-<article>
-
- <sect1 id="encryption-intro">
- <title>What is Encryption?</title>
- <para>
- Encryption is an ancient method of changing readable text to unreadable
- text that dates back to Egyptian times. Encryption takes the statement
- "Evolution" and turns it into something which cannot be read without help
- through decryption.
- <example>
- <title>Encryption Example</title>
- <para>
- Kevin orders an <application>Evolution</application> t-shirt from
- Ximian, Inc. over the internet. He puts in his credit card number
- which is 1234-567-8901. For security, his computer encrypts the
- credit card number so it can be safely transmitted over the internet.
- The number now is @#$23ui7yr87#@!48970fsd, which holds no intentional
- resemblance to the inital number. When the information gets to
- Ximian, Inc. it'll be decrypted into the inital number.
- </para>
- </example>
- Encryption can be used in email in two ways: to verify that the sender is
- the real sender, and to hide the message while in transmission.
- <application>Evolution</application> has the capability to do both.
- </para>
- </sect1>
- <sect1 id="generating-key">
- <title>Generating your PGP key</title>
- <para>
- First, you need to create a PGP key. To do this, you'll need GPG
- installed.
- </para>
- <tip>
- <title>GPG Versions</title>
- <para>
- This manual covers version 1.0.6 of GPG. If your version is different,
- this may not be entirely accurate. You may find out your version number
- by typing in: <command>gpg --version</command>.
- </para>
- </tip>
- <para>
- You can start by typing in: <command>gpg --gen-key</command>. At the
- first question, select 1. The next question asks you about key length.
- The longer the key, more stronger it is. However, the longer the key, the
- longer it takes to generate. This is your choice. However, 1024 bits
- (default) should be adequate. The next question asks you if you want your
- key to expire. Expiring keys make your key invalid after a certain amount
- of time, so old keys don't float around active. This is the same concept
- as a coupon at a supermarket. Next, you'll type in your Real name, your
- email address, and a comment. You should not forge this information, as
- it is used later to verify who you are. Assuming that all your
- information is correct, press "O" to continue. GPG now asks you for a
- passphrase. This is a password which you will need to decrypt and encrypt
- messages. This can be any length, with any characters in it. It is case
- sensitive, which means that it does know the difference between capital
- letters and lower-case. Now your key is generated. It is recommend you
- surf the internet, read your email, or write a letter in a word
- processor. This help creates randomness in the key.
- </para>
- <para>
- Once this is completed, you'll be dropped back to the command line.
- Now you can view your key information by typing <command>gpg
- --list-keys</command>. You should see something similar to this:
- <example id="gpg-list-keys">
- <title>GPG Listing Keys</title>
- <para>
- /home/bob/.gnupg/pubring.gpg
- ----------------------------
- pub 1024D/32j38dk2 2001-06-20 bob &lt;bob@bob.com&gt;
- sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
- </para>
- </example>
- You'll now need to upload your public key to a keyserver, so that your
- friends can use your key. You'll need to know the ID of your key, which
- is after the 1024D on the line beginning with pub. For this example, it
- is 32j38dk2. You now type in <command>gpg --send-keys --keyserver
- wwwkeys.pgp.net 32j38dk2</command>. Substitute your key ID for 32j38dk2.
- You will be prompted to type in your password <!-- verify that you need to
- enter your password here --> and your key will be uploaded for your
- friends to download.
- </para>
- </sect1>
- <sect1 id="encrypt-evo-integ">
- <title>Setting up Evolution's Encryption</title>
- <para>
- You'll need to open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- Once there, select the account you'd like to associate the key to and click
- the <guibutton>Edit</guibutton> button. In the
- <guilabel>Security</guilabel> tab is a section labeled <guilabel>Pretty
- Goog Privacy</guilabel>. Enter your key ID and click
- <guibutton>OK</guibutton>. Your key is now integrated into your identity
- in <application>Evolution</application>.
- </para>
- </sect1>
- <sect1 id="encrypt-sending">
- <title>Sending Encrypted Messages</title>
- <para>
- You can either sign or encrypt a message. When you sign a message, verify
- that you were the one who sent it, and that no one is forging your
- identity. Encrypting a message makes it impossible for someone with
- prying eyes to view it while it's in tranmission.
- </para>
- <para>
- <sect2 id="sign-msg">
- <title>Signing a Message</title>
- <para>
- To sign a message, you simply click
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Sign</guimenuitem>
- </menuchoice>
- . You will be prompted for your PGP password. Once you enter it,
- click <guibutton>OK</guibutton> and your message will be signed.
- </para>
- </sect2>
- <sect2 id="encrypt-msg">
- <title>Encrypting a Message</title>
- <para>
- Encrypting a message is very similar to signing a message. You simply
- click the menu item
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Encrypt</guimenuitem>
- </menuchoice>
- </para>
- </sect2>
- </para>
- </sect1>
- <sect1 id="unencrypting">
- <title>Unencrypting a Recieved Message</title>
- <para>
- Sometimes, a friend will send you a message which is encrypted. In order
- for you to read it, you need to unencrypt it.
- </para>
- <para>
- When you view the encrypted message, <application>Evolution</application>
- will prompt you for your PGP password. You type in your PGP password and
- the message is then decrypted.
- </para>
- </sect1>
- </article>
diff --git a/help/no/config-prefs.sgml b/help/no/config-prefs.sgml
deleted file mode 100644
index b3e27fce98..0000000000
--- a/help/no/config-prefs.sgml
+++ /dev/null
@@ -1,669 +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>Tools</guimenu> <guimenuitem>Mail
- Settings</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>Accounts</guilabel></term>
- <listitem>
- <para>
- This allows you to create and alter one or more identities for your
- email.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Display</guilabel></term>
- <listitem>
- <para>
- Allows you to edit how email is handled and displayed.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Composer</guilabel></term>
- <listitem>
- <para>
- Customizes the composer's behavior.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Other</guilabel></term>
- <listitem>
- <para>
- Configures miscellanious aspects of <application>Evolution</application>
- such as character sets.
- </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="figures/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
- add, edit, 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. Your POP server 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. You can disable checking mail on accounts in their
- properties.
- </para>
- <tip>
- <title>Sharing Mailboxes with Other Mail Programs</title>
- <para>
- If you want to use <application>Evolution</application>
- and another email client, such as
- <application>Mutt</application>, at the same time,
- here's how:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Download your mail in the other application as
- you would normally.
- </para>
- </listitem>
- <listitem>
- <para>
- In <application>Evolution</application>
- <menuchoice><guimenu>Tools</guimenu><guimenuitem>Mail
- Settings</guimenuitem></menuchoice>, and pick the account
- you'd like to use to share mail. You may want to
- create a new account just for this source of
- mail.
- </para>
- </listitem>
- <listitem>
- <para>
- Under the <guilabel>Receiving Mail</guilabel>
- tab, select the type of mail file that your
- other mail application uses, and then enter the
- full path to that file.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guibutton>OK</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </tip>
- </sect3>
-
- <sect3 id="config-prefs-mail-network-transports">
- <title>Mail Transports</title>
- <para>
- The <interface>Mail Transports</interface> tab lets you choose
- how you will send mail. <application>Evolution</application> 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 news 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 Read After</guilabel>
- </term>
- <listitem><para>
- When you click on a message,
- <application>Evolution</application> will wait a
- moment before marking it as read. 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 three
- tabs: <guilabel>Calendar</guilabel>, <guilabel>TaskPad</guilabel>, <guilabel>Reminders</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="figures/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 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 colors 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.
- </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. These beeps
- are distinct from full-fledged audio alarms. If you leave this box
- unchecked, <application>Evolution</application> will only
- alert you to events by opening a dialog box.
- </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/help/no/config-sync.sgml b/help/no/config-sync.sgml
deleted file mode 100644
index 8f3b30d1f0..0000000000
--- a/help/no/config-sync.sgml
+++ /dev/null
@@ -1,128 +0,0 @@
- <chapter id="config-sync">
- <title>Setting up your synchronization system</title>
- <para>
- Synchronization presents you with two issues you'll need to
- address.
- <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. To enable a conduit, click the
- <guibutton>Enable</guibutton> to enable it and click
- <guibutton>Settings</guibutton>. 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>
- <tip>
- <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>
- </tip>
- </para>
-
- </chapter>
-
-
-
-
diff --git a/help/no/evolution-faq.sgml b/help/no/evolution-faq.sgml
deleted file mode 100644
index 8e658ff308..0000000000
--- a/help/no/evolution-faq.sgml
+++ /dev/null
@@ -1,973 +0,0 @@
-<!--
-<!DOCTYPE appendix PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<appendix id="evolution-faq">
- <title>Frequently Asked Questions About Ximian Evolution</title>
- <para>
- Here are some frequently asked questions about the
- <application>Evolution</application> groupware suite from
- Ximian. If you have a question that's not listed, you can
- contact us at evolve@ximian.com.
- </para>
-
- <sect1 id="faq-features">
- <title>Features</title>
-
- <qandaset>
-
- <qandaentry>
- <question>
- <para>
- How can I use Evolution with Microsoft Exchange or Lotus Notes?
- </para>
- </question>
- <answer>
- <para>
- If your server uses standard open protocols like IMAP,
- LDAP, POP, and SMTP, you can use Evolution with it. You
- can share addresses with vCards and calendar items with
- iCal appointments.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can I use Evolution with KDE?
- </para>
- </question>
- <answer>
- <para>
- Evolution will work fine in KDE. You will need to
- install all of the GNOME libraries that it depends on.
- Also, certain configuration options, such as default
- fonts and the message editor keybinding behavior, must be
- changed using the GNOME Control Center application (this
- will also run from within KDE).
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- How can I remove or rename a folder?
- </para>
- </question>
- <answer>
- <para>
- Right-click on the folder and select the
- <guimenuitem>Delete</guimenuitem> or
- <guimenuitem>Rename</guimenuitem> items.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Why doesn't drag and drop between folders seem to work?
- </para>
- </question>
- <answer>
- <para>
- The implementation isn't finished, although it's nearly done.
- </para>
-
- <para>
- In the meantime, right-click on the folders or messages
- you want to move, and select the
- <guimenuitem>Move</guimenuitem> or
- <guimenuitem>Copy</guimenuitem> options.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can I read mail from a mailbox file created by some other
- application (e.g. Mutt) without importing mail from it?
- </para>
- </question>
- <answer>
- <para>
- No, but it's a planned feature.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can Evolution sync with my Palm OS (tm) device?
- </para>
- </question>
- <answer>
- <para>
- Yes. However, it is not yet stable enough for general
- release and we do not yet ship Evolution with Palm
- synchronization enabled default. Until we do, you will
- need to compile this in yourself. Check the
- <filename>README</filename> file for additional
- information on the requirements. Full compatibility and
- synchronization for calendar and addressbook applications
- on Palm devices will be implemented and shipped soon.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- What is the difference between a virtual folder (vfolder)
- and a regular folder?
- </para>
- </question>
- <answer>
- <para>
- A virtual folder is like a saved search: it is a view of
- your mail. Regular folders actually contain the mail
- messages. You can have one message be in multiple virtual
- folders, but only in one regular folder. See the section
- in the Evolution manual about virtual folders for more
- information.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Can Evolution spell-check messages while I compose them?
- </para>
- </question>
- <answer>
- <para>
- Yes. The Evolution composer is able to highlight
- mis-spelled word on the fly as you type them, and also
- give you suggestions for possible corrections. In order
- for this to work you need the
- <filename>gnome-spell</filename> component, which is not
- shipped with Ximian GNOME yet.
- </para>
-
- <para>
- If you are brave enough, you can check out module
- <filename>gnome-spell</filename> from the GNOME CVS and
- compile it yourself. Check out its README file for a list
- of <filename>gnome-spell</filename>'s requirements for
- compilation.
- </para>
-
- <para>
- Note that you don't need to recompile Evolution after
- installing <filename>gnome-spell</filename>; it will be
- picked up automatically.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Why can't I see the images that are contained in some HTML
- mail messages.
- </para>
- </question>
- <answer>
- <para>
- Evolution currently doesn't support this, but it's a
- planned feature. It will be an option: many people like
- to turn off the images because they use up bandwidth and can
- be used to spy on your email reading habits.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Can I change the font that Evolution uses to compose and
- display mail messages?
- </para>
- </question>
- <answer>
- <para>
- You have to change the GtkHTML settings for that: in the
- GNOME Control Center, go to the "HTML Viewer"
- configuration page, which is under the "Document Handlers"
- category.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- How do I import my Outlook <filename>.pst</filename> files into Evolution?
- </para>
- </question>
- <answer>
- <para>
- You cannot import these files directly into Evolution
- because the <filename>.pst</filename> format is a
- proprietary format. However, Mozilla Mail on Windows can
- convert them into the <type>mbox</type> format, which can
- then be imported by Evolution.
- </para>
-
- <para>
- To start importing your Outlook mail to Evolution, run
- Mozilla Mail on Windows and select the
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import...</guimenuitem></menuchoice>
- to begin. Then select that you wish to import Mail from
- Outlook. Once Mozilla has imported all your mail, reboot
- your computer into Linux.
- </para>
-
- <para>
- Mount your Windows partition in Linux and run Evolution to
- begin importing your mail. Select
- <menuchoice><guimenu>File</guimenu><guimenuitem>Import
- File...</guimenuitem></menuchoice> to start importing. Set
- the file type to MBox (mbox) and click on
- <guibutton>Browse</guibutton> to select the mail you want
- to import.
- </para>
-
- <para>
- If you are the only user on Windows, the mail files will
- be stored in <filename>/mnt/c/windows/Application
- Data/Mozilla/Profiles/default/XXXX/Mail/imported.mail/</filename>
- where <filename>/mnt/c/</filename> is your windows
- partition mount point and XXXX is some collection of
- numbers and digits ending in <filename>.slt</filename>.
- </para>
-
- <para>
- If there is more than one user, the file will be in
- <filename>/mnt/c/windows/Profiles/USERNAME/XXXX/Mail/imported.mail/</filename>
- where USERNAME is your Windows username.
- </para>
-
- <para>
- For each mail folder in Outlook, Mozilla will convert the
- folder into one mbox file. To import all your mail, import
- all the files without a <filename>.msf</filename>
- extension.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- If Mozilla can import <filename>.pst</filename> files, why can't Evolution?
- </para>
- </question>
- <answer>
- <para>
- Mozilla on Windows accesses the <filename>.pst</filename>
- files through the <filename>MAPI.DLL</filename>, which is
- only available on Windows. <filename>MAPI.DLL</filename>
- is the only way to access <filename>.pst</filename> files
- and Evolution cannot use this DLL in Linux.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Will there be an Evolution server? How about a text-based or web-based front end?
- </para>
- </question>
- <answer>
- <para>
- Of course, we can't comment on unannounced future product
- plans, but Evolution's architecture would permit the
- existence of that kind of software. If there is enough
- demand for such software we will consider moving in that
- direction.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Will Evolution make a good mocha?
- </para>
- </question>
- <answer>
- <para>
- Only espresso is planned, but you can easily plug in a chocolate component.
- </para>
- </answer>
- </qandaentry>
-
- </qandaset>
- </sect1>
-
-
- <!-- Section: Getting and compiling -->
-
- <sect1 id="faq-get-and-compile">
- <title>
- Getting and Compiling Evolution
- </title>
- <qandaset>
- <qandaentry>
- <question>
- <para>
- Where can I get the latest Evolution release?
- </para>
- </question>
- <answer>
- <para>
- There are two ways to install the latest Evolution
- release:
- <itemizedlist>
- <listitem>
- <para>
- If you have Ximian GNOME installed, you can start
- Red Carpet, Ximian's software updating system, and
- subscribe to the Evolution channel. This will let
- you install a binary for the latest release, and
- will also warn you when a new version has been made
- available.
- </para>
- </listitem>
-
- <listitem>
- <para>
- If you want to compile from source, you can
- download the latest official Evolution tarball
- from:
- </para>
-
- <para>
- <ulink url="ftp://ftp.gnome.org/pub/GNOME/unstable/sources/evolution">
- ftp://ftp.gnome.org/pub/GNOME/unstable/sources/evolution</ulink>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Are binary snapshots available?
- </para>
- </question>
- <answer>
- <para>
- Yes, if you have Ximian GNOME installed. Just run Red
- Carpet and subscribe to the Evolution Snapshot channel.
- </para>
-
- <para>
- You can check the status of snapshots at
- <ulink url="http://primates.ximian.com/~snapshot">http://primates.ximian.com/~snapshot</ulink>.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- Why isn't a new snapshot available today?
- </para>
- </question>
- <answer>
- <para>
- Sometimes the build might fail because of problems with
- the source on CVS. In this case, just wait for next day's
- snapshot.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- How do I get Evolution from CVS?
- </para>
- </question>
- <answer>
- <para>
- If you already have
- <ulink url="http://cvs.gnome.org">GNOME CVS</ulink> access,
- simply check out the following modules: evolution,
- gtkhtml, gal.
- </para>
- <para>
- If you don't have a CVS account, you can use anoncvs
- instead. Bear in mind that anoncvs is only synchronized once
- a day, and code received from anoncvs may not be latest
- version available.
- </para>
-
- <para>
- Before using the anoncvs server, you have to log into it.
- This only needs to be done once. Use this command:
- </para>
-
- <programlisting>
- cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome login
- </programlisting>
-
- <para>
- Then you can retrieve the modules needed to compile Evolution
- using the following command:
- </para>
-
- <programlisting>
- cvs -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co evolution gtkhtml gal
- </programlisting>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- How should I compile Evolution avoiding conflicts with my
- existing GNOME installation?
- </para>
- </question>
- <answer>
- <para>
- The best way is to install Evolution into a separate prefix.
- In order to specify a non-default installation prefix, you
- can pass the <parameter>--prefix</parameter> option to
- <filename>configure</filename> or
- <filename>autogen.sh</filename>. For example:
- </para>
-
- <programlisting>
- cd /cvs/evolution
- ./autogen.sh --prefix=/opt/gnome
- </programlisting>
-
- <para>
- If you install Evolution and the Evolution libraries in a
- non-standard prefix, make sure you set the appropriate
- environment variables in the startup script for Evolution:
- </para>
-
- <programlisting>
- export PATH=/opt/gnome:$PATH
- export GNOME_PATH=/opt/gnome:/usr
- </programlisting>
-
- <para>
- You may also need to add <filename>$prefix/lib</filename>
- (e.g. <filename>/opt/gnome/lib</filename>) to your
- <filename>/etc/ld.so.conf</filename>. Of course, this will
- not work for systems which do not use ld.so.conf, such as
- HP-UX.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- I get the error message: <computeroutput>make: *** No rule
- to make target
- `all-no-@BUILD_INCLUDED_LIBINTL@'</computeroutput>
- </para>
- </question>
- <answer>
- <para>
- You probably have <filename>gettext</filename> 0.10.36 or
- later installed. Try downgrading to 0.10.35;
- unfortunately, 0.10.36 introduced some incompatibilities
- with the current <filename>xml-i18n-tools</filename>.
- </para>
- </answer>
- </qandaentry>
- </qandaset>
- </sect1>
-
- <sect1 id="faq-trouble">
- <title>Troubleshooting</title>
- <qandaset>
- <qandaentry>
- <question>
- <para>
- I get <computeroutput>Cannot initialize the Evolution
- shell</computeroutput>.
- </para>
- </question>
- <answer>
- <para>
- There are a number of things that can cause this error.
- Check that:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- <filename>oafd</filename> is listed in your <envar>PATH</envar>
- environment variable.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <filename>GNOME_Evolution_Shell.oaf</filename> and
- the other
- <filename>GNOME_Evolution_*.oaf</filename> files are
- readable and installed in
- <filename>$prefix/share/oaf</filename>, where
- <filename>$prefix</filename> is one of the prefixes
- listed in <envar>GNOME_PATH</envar> or
- <envar>OAF_INFO_PATH</envar>. (These variables are
- supposed to contain $PATH-like colon-separated lists of
- paths. If the installation prefix for Evolution is
- different from that). Run `oaf-slay' once before running
- `evolution' again if you change $GNOME_PATH or
- $OAF_INFO_PATH.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <filename>evolution</filename>,
- <filename>evolution-mail</filename> and the other
- <filename>evolution-*</filename> executables are in your
- $PATH.
- </para>
- </listitem>
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- I get <computeroutput>Cannot open composer window</computeroutput>.
- </para>
- </question>
- <answer>
- <para>
- This actually means that Evolution cannot activate the HTML
- editor component from GtkHTML. The comments in the previous
- answer still apply; also make sure that
- <command>gnome-gtkhtml-editor</command> is in your
- <envar>PATH</envar>.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- The address suggestion list steals focus from the "To:"
- entry box when I'm typing. How can I make it keep focus?
- </para>
- </question>
- <answer>
- <para>
- This is a bug in GTK version 1.2.10. To avoid it, downgrade
- to GTK version 1.2.9, or install the Ximian version of GTK
- 1.2.10.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- I updated Evolution and now my addressbook information is gone!
- What should I do?
- </para>
- </question>
- <answer>
- <para>
- Evolution uses the <filename>libdb</filename> library to
- handle the addressbook database. Two versions of
- <filename>libdb</filename> can be used with Evolution: version
- 1.88 and version 2.
- </para>
-
- <para>
- Unfortunately, an Evolution executable that is linked against
- a certain version of <filename>libdb</filename> will only be
- able to read addressbook files written by another Evolution
- executable that is linked with the same version of the
- library. If your addressbook is not readable by Evolution
- anymore, it probably means that you used to have Evolution
- linked with a certain version of <filename>libdb</filename>,
- but now it gets linked to a different version.
- </para>
-
- <para>
- Because of the way <filename>libdb</filename> is designed, it
- is not easy for Evolution to automatically do the conversion
- between the two formats. But, if your Evolution used to be
- linked against version 1.85 and now is linked to version 2,
- there is a very simple way to convert the database and recover
- your data.
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- First of all, check the format of the database using the
- <command>file</command> command:
- </para>
-
- <programlisting>
- file ~/evolution/local/Contacts/addressbook.db
- </programlisting>
-
- <para>
- You want version 1.85 there. If your version is 2, then
- your current Evolution is probably linked against
- version 1.85 and you cannot convert the database to the
- old format. To do that, follow these instructions:
- </para>
- </listitem>
-
- <listitem>
- <para>
- Quit Evolution.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Make a copy of the addressbook database for backup
- purposes, then move the original out of the way.
- </para>
-
- <programlisting>
- cd ~/evolution/local/Contacts
- cp addressbook.db addressbook.db.backup
- mv addressbook.db addressbook.db.tmp
- </programlisting>
- </listitem>
-
- <listitem>
- <para>
- Convert the contacts to the new format using
- <command>db_dump185</command> and
- <command>db_load</command>:
- </para>
-
- <programlisting>
- db_dump185 addressbook.db.tmp | db_load ~/evolution/local/Contacts/addressbook.db
- </programlisting>
- </listitem>
-
- <listitem>
- <para>
- Restart Evolution.
- </para>
- </listitem>
-
- </itemizedlist>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Evolution reported an error when trying to retrieve from my
- local spool in <filename>/var/spool/mail/username</filename>. Why?
- </para>
- </question>
- <answer>
- <para>
- Evolution doesn't have an external helper for moving mail,
- so <filename>/var/spool/mail/</filename> must be writable
- by you. Try this:
- </para>
-
- <programlisting>
- chmod 1777 /var/spool/mail
- </programlisting>
-
- <para>
- We're working on a solution to this problem now.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- Evolution crashes reporting that it couldn't allocate N
- billion bytes; how do I fix this?
- </para>
- </question>
- <answer>
- <para>
- This usually happens when a component tries talking a
- certain version of a CORBA interface to another component
- that supports a different version. For example, this can
- happen when you recompile and install a single component
- without recompiling/installing the rest of Evolution.
- </para>
-
- <para>
- If you run into this problem, make sure all the components
- are compiled and installed at the same time. This also
- applies to GtkHTML upgrades; after upgrading and
- installing a newer GtkHTML, always re-compile and
- re-install Evolution against it.
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- What is <command>killev</command> and why do I need to use it?
- </para>
- </question>
- <answer>
- <para>
- Evolution is actually made up of several components that run
- as separate processes. Evolution's shell is not very good
- at cleaning up stale processes, so it is possible that
- sometimes already-running components cause unexpected and/or
- broken behavior.
- </para>
-
- <para>
- It's always a good idea to run <command>killev</command>
- after a crash in Evolution, especially if the Evolution
- shell itself crashed. (If a component crashes instead, you
- should try to exit the shell cleanly first, so you give a
- chance to the other components to clean things up properly.)
- </para>
- </answer>
- </qandaentry>
-
- <qandaentry>
- <question>
- <para>
- What is <command>oaf-slay</command> and why do I need to use it?
- </para>
- </question>
- <answer>
- <para>
- <command>oaf-slay</command> is an utility which comes with
- OAF, the Object Activation Framework that is used in the
- GNOME Desktop to activate components. It will kill the
- object activation daemon (<command>oafd</command>) as well
- as all the active components on the system.
- </para>
-
- <para>
- Using <command>oaf-slay</command>
- <command>oaf-slay</command> is quite drastic and can cause
- problems with other programs that use oaf, especially with
- <application>Nautilus</application>. To avoid problems, do
- not run <command>oaf-slay</command> while you are in GNOME.
- </para>
- </answer>
- </qandaentry>
- </qandaset>
- </sect1>
-
- <sect1 id="faq-debugging">
- <title>Questions about Bugs and Debugging</title>
- <para>
- Find a bug? Here's how to help us fix it!
- </para>
-
- <qandaset>
- <qandaentry>
- <question>
- <para>
- Where should I report bugs for Evolution?
- </para>
- </question>
- <answer>
- <para>
- You can use the GNOME Bug Report Tool
- (<command>bug-buddy</command>), or report bugs to the
- Ximian bug reporting system (Bugzilla), located at <ulink
- url="http://bugzilla.ximian.com">http://bugzilla.ximian.com</ulink>.
- </para>
-
- <para>
- Please use the query function to check if a bug has been
- submitted already, so that we avoid duplicate reports.
- </para>
- </answer>
- </qandaentry>
-
-
- <qandaentry>
- <question>
- <para>
- What is a stack trace (backtrace) and how do I get one?
- </para>
- </question>
- <answer>
- <para>
- A stack trace is a list of the chain of function calls
- that lead to some point in the program. Typically, you
- want to get a stack trace when Evolution crashes or
- hangs and you want to try to figure out where in the
- code that happened and why. For this reason, stack
- traces are extremely useful for the Evolution
- developers, so it's important that you learn how to get
- them, and include them in crash reports. The
- <application>bug-buddy</application> tool can get and
- submit a stack trace for you. If you want to do it by
- yourself, here's how:
- </para>
- <para>
- First of all, in order to get a stack trace, your
- executable (and possibly the libraries) must be compiled
- with debugging symbols. Debugging symbols are created by
- default if you compile from CVS, and are included in the
- snapshot builds. If you decide to compile by yourself
- with some custom CFLAGS value, make sure -g is included
- in them.
- </para>
- <para>
- Finally, you must put the component that crashes through
- <application>gdb</application>, the GNU debugging tool.
- To do so, make sure all the components are dead (exit
- Evolution and run <command>killev</command>), then run the
- following command:
- <programlisting>
- <command>gdb name-of-component</command>
- </programlisting>
-
- Where "name-of-component" is the name of the component that
- crashed.
- </para>
- <para>
- Then, at the gdb prompt, type r (for "run") and wait a
- few seconds to make sure the component has registered
- with the name service. Then start
- <application>Evolution</application> normally from a
- different terminal.
- </para>
- <para>
- When you have started
- <application>Evolution</application>, reproduce the
- crash, and go back to the terminal where you ran gdb. If
- the component crashed, you should have a prompt there;
- otherwise, just hit Control+C. At the prompt, type
- <command>info threads</command>. This will give you a
- screen that looks like this:
- </para>
- <para>
- <programlisting>
-(gdb) info threads
- 8 Thread 6151 (LWP 14908) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 7 Thread 5126 (LWP 14907) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 6 Thread 4101 (LWP 1007) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 5 Thread 3076 (LWP 1006) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 4 Thread 2051 (LWP 1005) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 3 Thread 1026 (LWP 1004) 0x409778fe in sigsuspend () from /lib/libc.so.6
- 2 Thread 2049 (LWP 1003) 0x40a10d90 in poll () from /lib/libc.so.6
- 1 Thread 1024 (LWP 995) 0x40a10d90 in poll () from /lib/libc.so.6
- </programlisting>
-
- For the most part, only
- <application>evolution-mail</application> will have more
- than one thread.
- </para>
- <para>
- Now, for each of the threads listed, type the following commands:
-<programlisting>
-thread N
-bt
-</programlisting>
- Where 'N' is the number of the thread (in this example, 1
- through 8).
- </para>
- <para>
- Cut and paste all the output gdb gives you into a text
- file. You can quit gdb by typing
- <userinput>quit</userinput>
- </para>
- <para>
- If you prefer, you can start gdb while a process is
- running. You'll want to do this right after a crash dialog
- appears, but before hitting "OK" or "Submit bug report".
- Start <application>gdb</application> as above, but instead
- of using <userinput>r</userinput>, type <userinput>attach
- PID</userinput> where PID is the process ID of the
- component you want to debug.
- </para>
- <para>
- If that sounds too complicated, you can always use
- <command>bug-buddy</command> to get and submit the stack
- trace.
- </para>
- </answer>
- </qandaentry>
- <qandaentry>
- <question>
- <para>
- A component of evolution crashed, but since the rest of
- evolution stayed up, I couldn't use bug-buddy to get a
- stack trace. How can I use gdb to get a stack trace of
- the component?
- </para>
- </question>
- <answer>
- <para>
- To trace a failing component (in this example, evolution-mail):
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open two terminals.
- </para>
- </listitem>
- <listitem>
- <para>
- In one, type <command>gdb evolution-mail</command>
- . Replace "evolution-mail" with the name of the
- component that is crashing: evolution-addressbook,
- evolution-calendar, etc.)
- </para>
- </listitem>
- <listitem>
- <para>
- Once gdb starts, type <userinput>r</userinput> and
- hit enter. Give it a few seconds, to make sure it
- starts up completely.
- </para>
- </listitem>
- <listitem>
- <para>
- In the second terminal, type
- <command>evolution</command>. Do whatever you did
- to cause the crash in the component you used in
- step two.
- </para>
- </listitem>
- <listitem>
- <para>
- When the crash occurs, type 'bt' in the first
- terminal.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Cut and paste the output into your bug report.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </answer>
- </qandaentry>
- </qandaset>
- </sect1>
- </appendix>
-
-<!-- Local Variables: --> <!-- indent-tabs-mode:nil --> <!-- End: -->
-
-
-
-
diff --git a/help/no/evolution-no.omf b/help/no/evolution-no.omf
deleted file mode 100644
index cd0e866e64..0000000000
--- a/help/no/evolution-no.omf
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<omf>
- <resource>
- <title>
- Evolution brukerhndbok
- </title>
- <subject>
- <category>GNOME|Applikasjoner</category>
- </subject>
- <format mime="text/sgml"/>
- <identifier url="evolution.sgml"/>
- <language code="no"/>
- </resource>
-</omf>
diff --git a/help/no/evolution.sgml b/help/no/evolution.sgml
deleted file mode 100644
index 8db87fdf29..0000000000
--- a/help/no/evolution.sgml
+++ /dev/null
@@ -1,134 +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-MAIL-ORG SYSTEM "usage-mail-org.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-PREFS SYSTEM "config-prefs.sgml">
-<!ENTITY CONFIG-SYNC SYSTEM "config-sync.sgml">
-<!ENTITY CONFIG-ENCRYPTION SYSTEM "config-encryption.sgml">
-<!ENTITY MENUREF SYSTEM "menuref.sgml">
-<!ENTITY FAQ SYSTEM "evolution-faq.sgml">
-<!ENTITY APX-GLOSS SYSTEM "apx-gloss.sgml">
-<!ENTITY APX-COMMON-TASKS SYSTEM "apx-common-tasks.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>En brukers hndbok for Evolution</title>
- <authorgroup>
- <author><firstname>Aaron</firstname><surname>Weber</surname></author>
- <author><firstname>Kevin</firstname><surname>Breit</surname></author>
- <author><firstname>Ettore</firstname><surname>Perazzoli</surname></author>
- <author><firstname>Duncan</firstname><surname>Mak</surname></author>
- </authorgroup>
- <copyright>
- <year>2001</year>
- <holder>Ximian, Inc.</holder>
- </copyright>
-
- <legalnotice id="legalnotice">
-
- <para>Det gis herved rett til kopiere, distribuere og/eller endre
- dette dokumentet under betingelsene gitt i <ulink type="help"
- url="gnome-help:fdl"><citetitle>GNU Free Documentation
- License</citetitle></ulink>, versjon 1.1 eller enhver senere versjon
- publisert av Free Software Foundation uten "Invariant
- Sections", uten forsidetekst, og uten baksidetekst. En kopi av
- lisensen kan finnes <ulink type="help"
- url="gnome-help:fdl">her</ulink>. </para>
-
- <para>Mange av navnene som brukes av firmaer for gjre sine
- produkter og tjenester unik er tatt som merkenavn. Der hvor disse
- navnene brukes i GNOME's dokumentasjon, og disse merkenavnene gjres
- kjent for medlemmer av GNOME Documentation Project, har disse navnene
- blitt skrevet med store bokstaver eller de begynner med stor bokstav.
- </para>
-
- </legalnotice>
-
- <releaseinfo>
- Dette er versjon 0.11 av Evolution brukerhndboken.
- </releaseinfo>
-
- </bookinfo>
-
- &PREFACE;
-
- <part id="usage">
- <title>Kom i gang med Evolution 1.0</title>
- <partintro>
- <para>
- Frste del av <application>Evolution</application> hndboken
- beskriver hvordan du bruker <application>Evolution</application>
- for e-post, kontakthndtering i tillegg til styring av avtaler
- og oppgaver. Du vil etterhvert finne ut at det er flere mter
- gjre ting p, og du kan velge den metoden du liker best
- selv.
- </para>
- </partintro>
-
- &USAGE-MAINWINDOW;
- &USAGE-EXEC-SUMMARY;
- &USAGE-MAIL;
- &USAGE-MAIL-ORG;
- &USAGE-CONTACT;
- &USAGE-CALENDAR;
-<!-- &USAGE-NOTES; -->
- &USAGE-SYNC;
- &USAGE-PRINT;
- </part>
- <part id="config">
- <title>Konfigurasjon og hndtering av Evolution</title>
- <partintro>
- <para>
- <application>Evolution</application> er meget konfigurerbart.
- Nr utviklere sier dette mener de vanligvis at de ikke testet
- det grundig og har overlatt det til andre programmerere
- "konfigurere" seg til et funksjonelt system. I tilfellet med
- <application>Evolution</application>, betyr "konfigurerbart",
- at, mens du kan forvente at programmet fungerer helt greit med
- standardinstillingene, er det ogs lett endre oppfrselen p
- en rekke forskjellige mter, slik at det mter dine behov bedre.
- Denne delen av boken vil beskrive denne prosessen, fra et lite
- glimt av veiviser for oppsett til en omvisning i dialoger for
- brukervalg som gr mer i dybden.
- </para>
- </partintro>
-
- &CONFIG-PREFS;
- &CONFIG-SYNC;
- </part>
-
- <part>
- <title>Utfyllende menyreferanse</title>
- <partintro>
- <para>
- Den flgende referansen dekker alle, eller nesten alle
- menyer og menykommandoer som
- <application>Evolution</application> har tilby deg.
- </para>
- </partintro>
- &MENUREF;
- </part>
- &FAQ;
- &APX-GLOSS;
- &APX-BUGS;
- &APX-AUTHORS;
-
-</book>
diff --git a/help/no/figures/calendar.png b/help/no/figures/calendar.png
deleted file mode 100644
index 1266f7b21b..0000000000
--- a/help/no/figures/calendar.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/config-cal.png b/help/no/figures/config-cal.png
deleted file mode 100644
index 5be44dc68d..0000000000
--- a/help/no/figures/config-cal.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/config-mail.png b/help/no/figures/config-mail.png
deleted file mode 100644
index 5fb06c705c..0000000000
--- a/help/no/figures/config-mail.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/contact-editor.png b/help/no/figures/contact-editor.png
deleted file mode 100644
index 988ad2f918..0000000000
--- a/help/no/figures/contact-editor.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/contact.png b/help/no/figures/contact.png
deleted file mode 100644
index 0748b30d69..0000000000
--- a/help/no/figures/contact.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/filter-assist-fig.png b/help/no/figures/filter-assist-fig.png
deleted file mode 100644
index 3240196307..0000000000
--- a/help/no/figures/filter-assist-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/filter-new-fig.png b/help/no/figures/filter-new-fig.png
deleted file mode 100644
index 51fc680df9..0000000000
--- a/help/no/figures/filter-new-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-1.png b/help/no/figures/full-1.png
deleted file mode 100644
index 84afc9d3e7..0000000000
--- a/help/no/figures/full-1.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-2.png b/help/no/figures/full-2.png
deleted file mode 100644
index 929e356db5..0000000000
--- a/help/no/figures/full-2.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-3.png b/help/no/figures/full-3.png
deleted file mode 100644
index 175fd1d970..0000000000
--- a/help/no/figures/full-3.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-4.png b/help/no/figures/full-4.png
deleted file mode 100644
index 45d66bb193..0000000000
--- a/help/no/figures/full-4.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-5.png b/help/no/figures/full-5.png
deleted file mode 100644
index 5fcfd20e45..0000000000
--- a/help/no/figures/full-5.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-6.png b/help/no/figures/full-6.png
deleted file mode 100644
index 484eca4903..0000000000
--- a/help/no/figures/full-6.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/full-7.png b/help/no/figures/full-7.png
deleted file mode 100644
index 8a19eaab42..0000000000
--- a/help/no/figures/full-7.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/mail-composer.png b/help/no/figures/mail-composer.png
deleted file mode 100644
index d85f632b64..0000000000
--- a/help/no/figures/mail-composer.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/mail-druid-pic.png b/help/no/figures/mail-druid-pic.png
deleted file mode 100644
index 18e29aa49d..0000000000
--- a/help/no/figures/mail-druid-pic.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/mail-inbox.png b/help/no/figures/mail-inbox.png
deleted file mode 100644
index 7659cb003a..0000000000
--- a/help/no/figures/mail-inbox.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/mainwindow-pic.png b/help/no/figures/mainwindow-pic.png
deleted file mode 100644
index 18b68c96a5..0000000000
--- a/help/no/figures/mainwindow-pic.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/newmsg.png b/help/no/figures/newmsg.png
deleted file mode 100644
index 9f2c15d025..0000000000
--- a/help/no/figures/newmsg.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/print-dest.png b/help/no/figures/print-dest.png
deleted file mode 100644
index fb1faf7d70..0000000000
--- a/help/no/figures/print-dest.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/print-preview.png b/help/no/figures/print-preview.png
deleted file mode 100644
index 51ab5e795e..0000000000
--- a/help/no/figures/print-preview.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/replymsg.png b/help/no/figures/replymsg.png
deleted file mode 100644
index 0952ba3805..0000000000
--- a/help/no/figures/replymsg.png
+++ /dev/null
Binary files differ
diff --git a/help/no/figures/vfolder-createrule-fig.png b/help/no/figures/vfolder-createrule-fig.png
deleted file mode 100644
index cc0a7abf66..0000000000
--- a/help/no/figures/vfolder-createrule-fig.png
+++ /dev/null
Binary files differ
diff --git a/help/no/menuref.sgml b/help/no/menuref.sgml
deleted file mode 100644
index a2a4ea1b32..0000000000
--- a/help/no/menuref.sgml
+++ /dev/null
@@ -1,1138 +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-mail">
- <title>Mail Menus</title>
- <para>
- Note that the <guimenu>File</guimenu> menu and the
- <guimenu>Help</guimenu> are identical within the
- <application>Evolution</application> main window, regardless
- of what features you are using.
-
- <variablelist>
- <varlistentry>
- <term>File Menu</term>
- <listitem> <para>
- <variablelist>
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Mail
- Message</guimenuitem></menuchoice></term>
- <listitem>
- <para>
- <keycombo action="simul"><keycap>Ctl</keycap>
- <keycap>N</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Evolution
- Window</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul">
- <keycap>Shft</keycap><keycap>Ctl</keycap><keycap>W</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Shortcut</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>S</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Mail
- Message</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>M</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Appointment</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>A</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Contact</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>C</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Task</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>T</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guimenuitem>Open Selected Items</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>O</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guimenuitem>Save As</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>Alt</keycap><keycap>S</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guisubmenu>Folder</guisubmenu>
- <guimenuitem>New Folder</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>F</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guimenuitem>Go to Folder</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>G</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guimenuitem>Print</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>P</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guimenuitem>Close</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>W</keycap></keycombo></para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>File</guimenu><guimenuitem>Exit</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>Q</keycap></keycombo></para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Edit Menu</term>
- <listitem><para>
- <variablelist>
- <varlistentry><term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Select All</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>
- Ctl</keycap><keycap>A</keycap></keycombo>
- </para></listitem></varlistentry>
-
- <varlistentry><term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Invert Selection</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>I</keycap></keycombo>
- </para></listitem></varlistentry>
-
- <varlistentry><term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Delete</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>D</keycap></keycombo>
- </para>
- </listitem></varlistentry>
-
- <varlistentry><term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Undelete</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>U</keycap></keycombo>
- </para>
- </listitem></varlistentry>
-
- <varlistentry><term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Mark as Read</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>K</keycap></keycombo>
- </para>
- </listitem></varlistentry>
-
- <varlistentry><term><menuchoice><guimenu>Edit</guimenu><guimenuitem>Mark as Unread</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>K</keycap></keycombo>
- </para>
- </listitem></varlistentry>
- </variablelist>
- </para> </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>View Menu</term>
- <listitem>
- <variablelist>
- <varlistentry>
- <term><menuchoice><guimenu>View</guimenu><guimenuitem>Threaded</guimenuitem></menuchoice></term>
- <listitem><para><keycombo action="simul"><keycap>Ctl</keycap><keycap>T</keycap></keycombo></para></listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Actions Menu</term>
- <listitem>
- <variablelist>
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guisubmenu>Forward
- As</guisubmenu><guimenuitem>Inline</guimenuitem>
- </menuchoice> </term>
- <listitem>
- <para>
- <keycombo action="simul">
- <keycap>Shft</keycap><keycap>Ctl</keycap><keycap>J</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><menuchoice>
- <guimenu>Actions</guimenu><guisubmenu>Forward As</guisubmenu>
- <guimenuitem>Attachment</guimenuitem>
- </menuchoice></term>
- <listitem><para>
- <keycombo action="simul">
- <keycap>Ctl</keycap><keycap>F</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guimenuitem>Reply</guimenuitem>
- </menuchoice></term> <listitem><para>
- <keycombo action="simul">
- <keycap>Ctl</keycap><keycap>R</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guimenuitem>Reply to All</guimenuitem>
- </menuchoice></term>
- <listitem><para>
- <keycombo action="simul"><keycap>Shft</keycap><keycap>Ctl</keycap><keycap>R</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guimenuitem>Move
- to Folder</guimenuitem> </menuchoice></term>
- <listitem><para> <keycombo
- action="simul"><keycap>Ctl</keycap><keycap>M</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guimenuitem>Copy to Folder </guimenuitem>
- </menuchoice></term>
- <listitem><para>
- <keycombo action="simul"><keycap>>Ctl</keycap><keycap>C</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guimenuitem>Apply
- Filters </guimenuitem> </menuchoice></term>
- <listitem><para> <keycombo
- action="simul"><keycap>Ctl</keycap><keycap>Y</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><menuchoice><guimenu>Actions</guimenu><guimenuitem>Expunge
- </guimenuitem> </menuchoice></term> <listitem><para>
- <keycombo
- action="simul"><keycap>Ctl</keycap><keycap>X</keycap>
- </keycombo>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><menuchoice><guimenu>Help</guimenu><guimenuitem>Index
- </guimenuitem> </menuchoice></term>
- <listitem><para> <keycombo
- action="simul"><keycap>Ctl</keycap><keycap>H</keycap></keycombo>
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
- </para>
-
- </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-tasklist">
- <title>Task List Shortcuts and Menus</title>
- <para>
- </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
- <menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu></menuchoice>
- submenu that is identical to that in the main window. The
- 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/help/no/preface.sgml b/help/no/preface.sgml
deleted file mode 100644
index 28190668b6..0000000000
--- a/help/no/preface.sgml
+++ /dev/null
@@ -1,495 +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.
- </para>
- <para>
- Without all the hot air, that means 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 Beta release</title>
- <para>
- <application>Evolution</application> is now on the home
- stretch to version 1.0. Please help prepare for the 1.0
- release by reporting bugs to us at <ulink
- url="http://bugzilla.ximian.com">bugzilla.ximian.com</ulink>. There
- are detailed bug reporting instructions in <xref
- linkend="evolution-faq">.
- </para>
- <para>
- Please send comments on the guide to
- <email>aaron@ximian.com</email>. The first person to send
- some good suggestions gets a free Ximian t-shirt.
- </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>
- <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>
- <tip id="example-tip">
- <title>Example Tip</title>
- <para>
- Tips and bits of extra information will look like
- this.
- </para>
- </tip>
-
- <example>
- <title>Example Example</title>
- <para>
- This is what an example looks like.
- </para>
- </example>
-
- <warning id="example-warning">
- <title>Example Warning</title>
- <para>
- This is what a warning looks like.
- </para>
- </warning>
- </para>
- </formalpara>
- </sect1>
-
- <sect1 id="quickref-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>. Read <xref linkend="menuref"> if
- you would like a complete list of keyboard shortcuts for menu commands.
- </para>
-
- <sect2 id="quickref-newthings">
- <title>Opening or Creating Anything</title>
- <para>
-
- <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>Navigating the Message List with the Keyboard</term>
- <listitem>
- <para>
- Press <keycap>N</keycap> to jump to the next unread
- message. <keycap>P</keycap> goes to the previous
- unread message. Use the arrow keys to move up
- and down along the list of all message.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Display the next page of a message in the preview pane</term>
- <listitem>
- <para>
- Press the space bar.
- </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>F</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>
- Right-click on a message and select "Create Rule..."
- menu items. You can also create filters and virtual
- folders in the <guimenu>Tools</guimenu> menu.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- <sect2 id="quickref-cal">
- <title>Address Book</title>
- <para>
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- <tip id="new-appt">
- <title>New Appointments Fast</title>
- <para>
- Double-click in a blank space to create a new contact.
- </para>
- </tip>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- <sect2 id="quickref-contact">
- <title>Contact Manager</title>
- <para>
- Here are the most frequent tasks that are done in the Contact Manager,
- with the shortcuts so that you can use these tasks without having to use
- your mouse:
-
- <variablelist>
- <varlistentry>
- <term>Edit a Contact</term>
- <listitem>
- <para>
- You can edit a contact two ways:
- <itemizedlist>
- <listitem>
- <para>
- Click once on the person's address card and you can
- edit the person's properties all in the same window.
- </para>
- </listitem>
- <listitem>
- <para>
- Double-click on the contact's card and alter their details.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <variablelist>
- <varlistentry>
- <term>Deleting a Contact</term>
- <listitem>
- <para>
- Right click on a contact and click <guilabel>Delete</guilabel>
- or select a contact and press the <guibutton>Delete</guibutton>
- on the <guilabel>toolbar</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
- <variablelist>
- <varlistentry>
- <term>Email a Contact</term>
- <listitem>
- <para>
- Right click on a contact and select
- <guilabel>Send message to contact</guilabel>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- </sect1>
-</preface>
diff --git a/help/no/topic.dat b/help/no/topic.dat
deleted file mode 100644
index 163b853800..0000000000
--- a/help/no/topic.dat
+++ /dev/null
@@ -1,10 +0,0 @@
-index.html Innholdsfortegnelse
-introduction.html Hva er Evolution?
-usage-mainwindow.html Kom i gang
-usage-exec-summary.html Evolution sammendrag
-usage-mail.html hente og sende e-post
-usage-contact.html Bruk av kontakthndtereren
-usage-calendar.html Hndtering av avtaler
-config-prefs.html Konfigurasjon av Evolution
-menuref.html Hurtigreferanse
-apx-gloss.html Ordbok \ No newline at end of file
diff --git a/help/no/usage-calendar.sgml b/help/no/usage-calendar.sgml
deleted file mode 100644
index 3aeb9b23e2..0000000000
--- a/help/no/usage-calendar.sgml
+++ /dev/null
@@ -1,451 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-calendar">
- <title>Managing your Schedule</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
- separate 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="figures/calendar" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ============== End of Figure ============================= -->
-
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-1" format="png"></inlinegraphic>
- <guilabel>Event List</guilabel>
- </para>
-
- <para>
- The <guilabel>Event List</guilabel> is responsible for showing you all of
- your scheduled events, whether they are all day events or simply one time
- events that last a half an hour.
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-2" format="png"></inlinegraphic>
- <guilabel>Todo List</guilabel>
- </para>
-
- <para>
- The <guilabel>Todo List</guilabel> compliments the <guilabel>Event List
- </guilabel> as it keeps track of your chores or tasks which don't have
- any time associated with them. These may include "Clean Room" or "Call
- Repairman".
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-3" format="png"></inlinegraphic>
- <guilabel>Calendar Window</guilabel>
- </para>
-
- <para>
- The <guilabel>Calendar Window</guilabel> has a graphical representation of
- the calendar, so you can select what days to view in the <guilabel>Event
- List</guilabel>.
- </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 appointment, 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 of the following types:
- <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>
- 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>
- <application>Evolution</application> lets you categorize your
- appointments, which can help if you lead a busy life. The bottom
- section of the <guilabel>Appointment</guilabel> tab is where your
- categorization is done.
- </para>
-
- <tip>
- <title>Adding a New Category</title>
- <para>
- You can add a new category to your category list by clicking on
- <guibutton>Edit Master Category List...</guibutton> and single-clicking
- on <guilabel> Click here to add a category</guilabel>.
- </para>
- </tip>
-
- <para>
- The purpose of categories is to let you view all appointments which have
- similar activities. To do this, change <guilabel>Any field contains</guilabel>
- to <guilabel>Has category</guilabel> and enter your category at right.
- </para>
-
- <para>
- Clicking on the <guibutton>Categories</guibutton> button opens up the category
- list. To associate a category to an event, simply click the check box.
- </para>
- <para>
- Once you've selected your categories, click <guibutton>OK</guibutton> to
- assign these categories to the event. The categories you selected are now
- listed in the text box to the right of the <guibutton>Categories...</guibutton>
- button.
- </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>
- <sect2 id="usage-calendar-rsvp">
- <title>RSVPs with the Calendar</title>
- <para>
- <application>Evolution</application> can be used to setup group events
- and help you manage RSVPs.
- </para>
- <para>
- When you setup a gathering, you can specify people to come in numerous
- positions, such as chair. They are sent an email which lets them
- easily reply to you with their response. If they aren't sure if they
- can attend, they can always reply to the mail later.
- </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/help/no/usage-contact.sgml b/help/no/usage-contact.sgml
deleted file mode 100644
index 5be3d0ca09..0000000000
--- a/help/no/usage-contact.sgml
+++ /dev/null
@@ -1,639 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-contact">
- <title>Working with Your Contacts</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 <application>Evolution</application>.
- </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>
-
- <figure id="usage-contact-fig">
- <title>Evolution Contact Interface</title>
- <screenshot>
- <screeninfo>Evolution Contact List Window</screeninfo>
- <graphic fileref="figures/contact" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-
- <para>
- <inlinegraphic fileref="figures/full-1" format="png"></inlinegraphic>
- <guilabel>Contact List</guilabel>
- </para>
-
- <para>
- The <guilabel>Contact List</guilabel> lists your contacts.
- </para>
-
- <para>
- To open 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> view. 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>
-
- <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 all your contacts.
- <!-- Lets xref to search feature -->
- </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 to 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>
- </sect1>
-
- <sect1 id="usage-contact-cards">
- <title>The Contact Editor</title>
- <para>
- To delete a contact:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click once on the contact.
- </para>
- </listitem>
- <listitem>
- <para>
- Press the <guibutton>Delete</guibutton> button.
- </para>
- </listitem>
- </orderedlist>
- </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. If you want to create a new
- card, 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="figures/contact-editor" 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>
- </itemizedlist>
- </para>
- <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 in, 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>
- </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 much simpler:
- <itemizedlist>
- <listitem>
- <para>
- The briefcase - Describes the person's professional life
- </para>
- </listitem>
- <listitem>
- <para>
- The face - Describes the person's personal life
- </para>
- </listitem>
- <listitem>
- <para>
- The globe - Miscellanious notes
- </para>
- </listitem>
- </itemizedlist>
-
- <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.
- </para>
- </tip>
- </para>
- </sect1>
-
- <sect1 id="contact-search">
- <title>Searching for Contacts</title>
- <para>
- <application>Evolution</application> allows searching through contacts
- quickly and easily.
- </para>
- <para>
- To search through contacts:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select your search focus in the search bar.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter your query.
- </para>
- </listitem>
- <listitem>
- <para>
- Press return to search.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can refine searches by doing several in
- succession, or start over by pressing the <guibutton>Show
- 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>
- To perform a complex search through your contacts:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Search for contacts</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Name the rule in the <guilabel>Rule Name</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Setup your criteria information in the <guilabel>If</guilabel> section.
- </para>
- </listitem>
- <listitem>
- <para>
- If you want to add more critera, click the <guibutton>Add
- Criterion</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Search</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- To show all your contacts, select <guibutton>Show All</guibutton> in the
- <guilabel>Search Bar</guilabel> or search with an empty query.
- </para>
-
- </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 Virtual Folders. 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 mail folders do. For more
- flexibility, you can also mark contacts as elements 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.
- 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>
-
-<!-- we need a LDAP server up for me to test this -->
- <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 peoples 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
- you share calendars as well as address books, people can avoid
- duplicating work and keep up to date on developments within
- their workgroup 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> can also add 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/help/no/usage-encryption.sgml b/help/no/usage-encryption.sgml
deleted file mode 100644
index e36f17c652..0000000000
--- a/help/no/usage-encryption.sgml
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[]>
-
-<article>
-
- <sect1 id="encryption-intro">
- <title>What is Encryption?</title>
- <para>
- Encryption is an ancient method of changing readable text to unreadable
- text that dates back to Egyptian times. Encryption takes the statement
- "Evolution" and turns it into something which cannot be read without help
- through decryption.
- <example>
- <title>Encryption Example</title>
- <para>
- Kevin orders an <application>Evolution</application> t-shirt from
- Ximian, Inc. over the internet. He puts in his credit card number
- which is 1234-567-8901. For security, his computer encrypts the
- credit card number so it can be safely transmitted over the internet.
- The number now is @#$23ui7yr87#@!48970fsd, which holds no intentional
- resemblance to the inital number. When the information gets to
- Ximian, Inc. it'll be decrypted into the inital number.
- </para>
- </example>
- Encryption can be used in email in two ways: to verify that the sender is
- the real sender, and to hide the message while in transmission.
- <application>Evolution</application> has the capability to do both.
- </para>
- </sect1>
- <sect1 id="generating-key">
- <title>Generating your PGP key</title>
- <para>
- First, you need to create a PGP key. To do this, you'll need GPG
- installed.
- </para>
- <tip>
- <title>GPG Versions</title>
- <para>
- This manual covers version 1.0.6 of GPG. If your version is different,
- this may not be entirely accurate. You may find out your version number
- by typing in: <command>gpg --version</command>.
- </para>
- </tip>
- <para>
- You can start by typing in: <command>gpg --gen-key</command>. At the
- first question, select 1. The next question asks you about key length.
- The longer the key, more stronger it is. However, the longer the key, the
- longer it takes to generate. This is your choice. However, 1024 bits
- (default) should be adequate. The next question asks you if you want your
- key to expire. Expiring keys make your key invalid after a certain amount
- of time, so old keys don't float around active. This is the same concept
- as a coupon at a supermarket. Next, you'll type in your Real name, your
- email address, and a comment. You should not forge this information, as
- it is used later to verify who you are. Assuming that all your
- information is correct, press "O" to continue. GPG now asks you for a
- passphrase. This is a password which you will need to decrypt and encrypt
- messages. This can be any length, with any characters in it. It is case
- sensitive, which means that it does know the difference between capital
- letters and lower-case. Now your key is generated. It is recommend you
- surf the internet, read your email, or write a letter in a word
- processor. This help creates randomness in the key.
- </para>
- <para>
- Once this is completed, you'll be dropped back to the command line.
- Now you can view your key information by typing <command>gpg
- --list-keys</command>. You should see something similar to this:
- <example id="gpg-list-keys">
- <title>GPG Listing Keys</title>
- <para>
- /home/bob/.gnupg/pubring.gpg
- ----------------------------
- pub 1024D/32j38dk2 2001-06-20 bob &lt;bob@bob.com&gt;
- sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
- </para>
- </example>
- You'll now need to upload your public key to a keyserver, so that your
- friends can use your key. You'll need to know the ID of your key, which
- is after the 1024D on the line beginning with pub. For this example, it
- is 32j38dk2. You now type in <command>gpg --send-keys --keyserver
- wwwkeys.pgp.net 32j38dk2</command>. Substitute your key ID for 32j38dk2.
- You will be prompted to type in your password <!-- verify that you need to
- enter your password here --> and your key will be uploaded for your
- friends to download.
- </para>
- </sect1>
- <sect1 id="encrypt-evo-integ">
- <title>Setting up Evolution's Encryption</title>
- <para>
- You'll need to open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- Once there, select the account you'd like to associate the key to and click
- the <guibutton>Edit</guibutton> button. In the
- <guilabel>Security</guilabel> tab is a section labeled <guilabel>Pretty
- Goog Privacy</guilabel>. Enter your key ID and click
- <guibutton>OK</guibutton>. Your key is now integrated into your identity
- in <application>Evolution</application>.
- </para>
- </sect1>
- <sect1 id="encrypt-sending">
- <title>Sending Encrypted Messages</title>
- <para>
- You can either sign or encrypt a message. When you sign a message, verify
- that you were the one who sent it, and that no one is forging your
- identity. Encrypting a message makes it impossible for someone with
- prying eyes to view it while it's in tranmission.
- </para>
- <para>
- <sect2 id="sign-msg">
- <title>Signing a Message</title>
- <para>
- To sign a message, you simply click
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Sign</guimenuitem>
- </menuchoice>
- . You will be prompted for your PGP password. Once you enter it,
- click <guibutton>OK</guibutton> and your message will be signed.
- </para>
- </sect2>
- <sect2 id="encrypt-msg">
- <title>Encrypting a Message</title>
- <para>
- Encrypting a message is very similar to signing a message. You simply
- click the menu item
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Encrypt</guimenuitem>
- </menuchoice>
- </para>
- </sect2>
- </para>
- </sect1>
- <sect1 id="unencrypting">
- <title>Unencrypting a Recieved Message</title>
- <para>
- Sometimes, a friend will send you a message which is encrypted. In order
- for you to read it, you need to unencrypt it.
- </para>
- <para>
- When you view the encrypted message, <application>Evolution</application>
- will prompt you for your PGP password. You type in your PGP password and
- the message is then decrypted.
- </para>
- </sect1>
- </article>
diff --git a/help/no/usage-exec-summary.sgml b/help/no/usage-exec-summary.sgml
deleted file mode 100644
index 76724e4362..0000000000
--- a/help/no/usage-exec-summary.sgml
+++ /dev/null
@@ -1,187 +0,0 @@
-<chapter id="usage-exec-summary">
- <title>My Evolution</title>
- <para>
- My Evolution is designed to show you a
- summary of important information: the appointments for a given
- day, important email, and so forth. To see your My Evolution,
- click on the <guibutton>My Evolution</guibutton>
- button in the shortcut bar, or select the
- <guilabel>My Evolution</guilabel> folder in the folder
- bar.
- </para>
-
- <sect1 id="exec-intro">
- <title>Introducing My Evolution</title>
- <para>
- The first thing you'll want to do with My Evolution
- is add a service. Go to
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>My Evolution Settings</guimenuitem>
- </menuchoice>
- 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>Mail</term>
- <listitem>
- <para>
- Display amount of unread email in your selected folders.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>RDF Summary</term>
- <listitem>
- <para>
- News headlines from sites that allow this
- feature. The default
- is news about the GNOME project from <ulink
- url="www.gnome.org/gnome-news/">gnotices</ulink>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Weather</term>
- <listitem>
- <para>
- Shows you the current weather for the cities of your choice.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Schedule</term>
- <listitem>
- <para>
- Lets you see the events for the day.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- <application>Evolution</application> comes with ... enabled by
- default.
- </para>
- <sect2 id="new-components">
- <title>Adding New Components</title>
- <para>
- To add a new service:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>My Evolution Settings</guimenuitem>
- </menuchoice>
- from the menubar.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the service you wish to add by clicking on the respective
- tab.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose <guibutton>OK</guibutton> when finished configuring the
- item.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="delete-components">
- <title>Deleting Components</title>
- <para>
- To remove a service from My Evolution, do the following:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>My Evolution Settings</guimenuitem>
- </menuchoice>
- from the menubar.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guilabel>Enable</guilabel> button in the component you
- would like to disable.
- <!-- This is incorrect. I am going to ask Iain if he could throw
- in an Enable button -->
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- <sect2 id="modifying-components">
- <title>Modifying Components</title>
- <para>
- Chances are, the components that you setup aren't going to be setup for
- your needs. For instance, you may choose that you want to use different
- city choices than the default settings.
- <application>Evolution</application> lets you configure all the
- components in My Evolution.
- </para>
- <sect3 id="modifying-components-mail">
- <title>Customizing My Evolution Mail Summary</title>
- <para>
- To modify mail:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Choose
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>My Evolution Settings</guimenuitem>
- </menuchoice>
- from the menubar.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the <guilabel>Mail</guilabel> tab at the top of the
- window.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- The <guilabel>Mail</guilabel> service window is broken up into two
- sections. The left section is where your mail folders are listed.
- The right section shows which folders are displayed.
- </para>
- <para>
- To add a folder to the summary, click on a folder in the
- <guilabel>All folders</guilabel> section and click the
- <guibutton>Add</guibutton> button.
- </para>
- <para>
- To remove a folder from the service, click on the folder in the
- <guilabel>Display folders</guilabel> section and click the
- <guibutton>Remove</guibutton> button.
- </para>
- </sect3>
- </sect2>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
-
-
-
diff --git a/help/no/usage-mail-org.sgml b/help/no/usage-mail-org.sgml
deleted file mode 100644
index ece659c27a..0000000000
--- a/help/no/usage-mail-org.sgml
+++ /dev/null
@@ -1,801 +0,0 @@
-<chapter id="usage-mail-organize">
- <title>Organizing and Managing your Email</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>
-
- <sect1 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, 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.
-
- To add columns:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Right click on the column header
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guimenuitem>Add a Column</guimenuitem>
- </para>
- </listitem>
- <listitem>
- <para>
- Click and drag a column you want into a space between
- existing column headers. A red arrow will show you where
- the column will be placed.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- Right-click on one of the column headers to get a list of
- options:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Sort Ascending</guimenuitem></term>
- <listitem><para>
- Sorts the messages top to bottom.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Sort Descending</guimenuitem></term>
- <listitem><para>
- Sorts the messages bottom to top.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Group By this Field</guimenuitem></term>
- <listitem><para>
- Groups messages instead of sorting them. This makes each contact
- with identical properties in the specified field to be placed in
- its own group and physically separated from others.
- </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>
- When you choose this item, a list
- of column headers will appear; 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>
- </sect1>
-
- <sect1 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
- filed automatically.
- </para>
- </sect1>
-
- <sect1 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>
-
- </sect1>
-
- <sect1 id="usage-mail-organize-filters">
- <title>Create Rules to Automatically Organize Mail</title>
- <para>
- Filters work very much like the mail room in a large company.
- Their purpose is to bundle, sort, and distribute mail to the
- various folders. 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 quickly. Of
- course, it's also faster and more flexible than an actual
- person with a pile of envelopes.
- </para>
-
- <sect2 id="usage-mail-org-filters-new">
- <title>Making New Filters</title>
- <para>
- To create a new filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Filters</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Press the <guibutton>Add</guibutton> button.
- </para>
- </listitem>
- <listitem>
- <para>
- Name your filter in the <guilabel>Rule name</guilabel> field.
- For each filter criterion, you must first select
- which of the following parts of the message you want the filter to
- examine:
-
- <itemizedlist>
- <listitem><para>
- Sender - The sender's address.
- </para></listitem>
-
-
- <listitem><para>
- Recipients - The recipients of the message.
- </para></listitem>
-
- <listitem><para>
- Subject - The subject line of the message.
- </para></listitem>
-
- <listitem><para>
- Specific Header - 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>
-
- <listitem><para>
- Message Body - Search in the actual text of the message.
- </para></listitem>
-
- <listitem>
- <para>
- Expression - For programmers only: match a message according to an
- expression you write in the Scheme language, used to
- define filters in <application>Evolution</application>.
- </para>
- </listitem>
-
- <listitem><para> Date sent - Filter messages according to the date on
- which 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>
-
- <listitem><para>
- Date Recieved - 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>
-
- <listitem><para>
- Score - 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>
-
- <listitem>
- <para>
- Size (kb) - Sorts based on the size of the message in kilobytes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Status - Filters according to the status of a message, such as
- 'New'.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Attachments - Create a filter based on whether or not you
- have an attachment in the email.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Mailing List - Filter based on the mailing list it came from.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Regex Match - If you know your way around a <glossterm
- linkend="regular-expression">regex</glossterm>, or
- regular expression, put your knowledge to use here.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Source Account - 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>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the criterion for the condition. If you want multiple
- criterion for this filter, press <guibutton>Add
- criterion</guibutton> and repeat the previous step.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the actions for the filter in the <guilabel>Then</guilabel>
- section. You can select any of the following options.
- <itemizedlist>
- <listitem><para>
- Move to Folder - 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>
-
- <listitem><para>
- Copy to Folder - 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>
-
- <listitem><para>
- Forward to Address - Select this, enter an address, and the addressee will
- get a copy of the message.
- </para></listitem>
-
- <listitem><para>
- Delete - Marks the message for deletion. You can still get the message
- back, at least until you <guimenuitem>Expunge</guimenuitem> your
- mail yourself.
- </para></listitem>
-
- <listitem><para>
- Stop Processing - 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>
-
- <listitem><para>
- Assign Color - Select this item, and <application>Evolution</application>
- will mark the message with whatever color you please.
- </para></listitem>
-
- <listitem><para>
- Assign Score - 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>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Set Status - If you want to add multiple actions for this filter, press
- <guibutton>Add filter</guibutton> and repeat the previous step.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
-
- <sect2 id="filters-edit">
- <title>Editing Filters</title>
- <para>
- To edit a filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenu>Filters</guimenu>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the filter in the <guilabel>Filter Rules</guilabel> section
- and press <guibutton>Edit</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Change the desired settings.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton> in the filter editor window.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton> in the filter manager window.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
-
- <sect2 id="filters-deleting">
- <title>Deleting Filters</title>
- <para>
- To delete a filter:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenu>Filters</guimenu>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the filter and press <guibutton>Delete</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- <note>
- <title>Changing Folder Names and Filters</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. So be sure to change the filters that go with it.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </note>
- </para>
- </sect2>
- </sect1>
-
- <sect1 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>
-
-
- <note id="unmatched-vfolder">
- <title>The Unmatched Virtual Folder</title>
- <para>
- Obveously, not all messages will fit into all your Virtual
- Folders. That's why <application>Evolution</application>
- includes an UNMATCHED Virtual Folder. The UNMATCHED Virtual
- Folder displays messages that are not matched by other rules.
- </para>
- </note>
-
-
- <example id="usage-mail-organize-vFolders-ex">
- <title>Using Folders, Searches, and Virtual Folders</title>
- <para>
- To organize his mailbox, Jim sets up a virtual volder for emails from
- his friend and co-worker Anna. He has another one for messages that
- have ximian.com in the address and <application>Evolution</application> in the subject line, so he
- can keep a record of what people from work send him about
- <application>evolution</application>. If Anna sends him a message about
- anything other than <application>Evolution</application>, it only shows up in the "Anna" folder.
- When Anna sends him mail about the user interface for
- <application>evolution</application>, he 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) -->
-
- <sect2 id="vfolder-create">
- <title>Creating Virtual Folders</title>
- <para>
- To create a virtual folder:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Virtual Folder Editor</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Add</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Name your virtual folder in the <guilabel>Rule name</guilabel> field.
-
- </para>
- </listitem>
- <listitem>
- <para>
- Select your search criteria. For each criterion, you
- must first select which of the following parts of the
- message you want the search to examine:
- <itemizedlist>
- <listitem><para>
- Sender - The sender's address.
- </para></listitem>
-
-
- <listitem><para>
- Recipients - The recipients of the message.
- </para></listitem>
-
- <listitem><para>
- Subject - The subject line of the message.
- </para></listitem>
-
- <listitem><para>
- Specific Header - The virtual folder 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>
-
- <listitem><para>
- Message Body - Search in the actual text of the message.
- </para></listitem>
-
- <listitem>
- <para>
- Expression - For programmers only: match a message according to an
- expression you write in the Scheme language, used to
- define virtual folders in <application>Evolution</application>.
- </para>
- </listitem>
-
- <listitem><para> Date sent - Search messages according to the date on
- which 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 virtual folder 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>
-
- <listitem><para>
- Date Recieved - 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>
-
- <listitem><para>
- Score - Emails have a standard priority range from -3 (least
- important) to 3 (most important). You can have virtual folders set the
- priority of messages you recieve, and then have other
- virtual folders
- applied only to those messages which have a certain priority.
- </para></listitem>
-
- <listitem>
- <para>
- Size (kb) - Sorts based on the size of the message in kilobytes.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Status - Searches according to the status of a message, such as
- 'New'.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Attachments - Create a virtual folder based on whether or not you have an
- attachment in the email.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Mailing List - Search based on the mailing list it came from.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Regex Match - If you know your way around a <glossterm
- linkend="regular-expression">regex</glossterm>, or
- regular expression, put your knowledge to use here.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Source Account - Search 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>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the folder sources. You can select:
- <itemizedlist>
- <listitem>
- <para>
- Specific folders only
- <note>
- <para>
- If you select specific folders only, you need to specify the
- source folders in the box below.
- </para>
- </note>
- </para>
- </listitem>
- <listitem>
- <para>
- All local folders
- </para>
- </listitem>
- <listitem>
- <para>
- With all active remote folders
- </para>
- </listitem>
- <listitem>
- <para>
- With all local and active folders
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- <listitem>
- <para>
- If you want multiple criteria for this filter, press <guibutton>Add
- criterion</guibutton> and repeat the previous step.
- </para>
- </listitem>
- </orderedlist>
-
- <figure id="usage-mail-vfolder-fig-createrule">
- <title>Selecting a Virtual Folder Rule</title>
- <screenshot>
- <screeninfo>Creating a Virtual Folder Rule</screeninfo>
- <graphic fileref="figures/vfolder-createrule-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- </para>
- </sect2>
- </sect1>
- <!--
- <sect1 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>
- </sect1>
--->
-</chapter>
diff --git a/help/no/usage-mail.sgml b/help/no/usage-mail.sgml
deleted file mode 100644
index b3579fb5d8..0000000000
--- a/help/no/usage-mail.sgml
+++ /dev/null
@@ -1,1447 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-mail">
- <title>Using Evolution for Email</title>
- <abstract>
- <title> A Guide to the Evolution Mailer</title>
- <para>
- <application>Evolution</application> email is like other email
- programs in all the ways that matter:
- <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
- makes it easy to send and recieve 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>
- <listitem>
- <para>
- Lets you enhance your security with encryption.
- </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
- mainstream 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-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">.
- 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. To change the sizes of a pane, just click
- and hold on the divider between the two panes. Then you can drag
- up and down to select the size of the panes. 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="figures/mail-inbox" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- <para>
- <inlinegraphic fileref="figures/full-1" format="png"></inlinegraphic>
- <guilabel>Email Viewer</guilabel>
- </para>
-
- <para>
- This is where your email is displayed.
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-2" format="png"></inlinegraphic>
- <guilabel>Email List</guilabel>
- </para>
-
- <para>
- The <guilabel>Email List</guilabel> displays all the emails that you
- have. This includes all your read, unread, and email that is flagged
- to be deleted.
- </para>
-
- <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. Almost all of them are also located 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>Email Headers</title>
- <para>
- To look at the complete headers for email messages, select
- <menuchoice><guimenu>View</guimenu><guisubmenu>Message
- Display</guisubmenu><guimenuitem>Show Full
- Headers</guimenuitem></menuchoice>. To see absolutely every
- bit, choose
- <menuchoice><guimenu>View</guimenu><guisubmenu>Message
- Display</guisubmenu><guimenuitem>Show Email Source
- </guimenuitem></menuchoice>.
- </para>
- </tip>
-
- </para>
-
- <sect2 id="usage-mail-listorder">
- <title>Sorting the message list</title>
- <para>
- <application>Evolution</application> helps you work by letting you sort
- your email. 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>
- </sect2>
-
- <sect2 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 delete a message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click the message to select it
- </para>
- </listitem>
- <listitem>
- <para>
- Press delete button or right click on the message and
- choose <guilabel>Delete</guilabel>.
- </para>
- <note>
- <title>Deleted but still here?</title>
- <para>
- When you do this, your message is marked to be
- deleted. Your email is not gone until you have
- expunged it. When you "Expunge" a folder, you remove
- all the mail that you have marked for deletion.
- </para>
- </note>
- </listitem>
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Actions</guimenu>
- <guimenuitem>Expunge</guimenuitem>
- </menuchoice>
- or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>E</keycap>
- </keycombo>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <note>
- <title>Trash is Actually a Virtual Folder?</title>
- <para>
- Your trash bin is actually a Virtual Folder that displays
- all messages you have marked for later deletion. For more
- information about Virtual Folders, see <xref
- linkend="usage-mail-organize-vfolders">. If you choose
- <menuchoice> <guimenu>Actions</guimenu> <guimenuitem>Empty
- Trash</guimenuitem> </menuchoice> you will expunge
- <emphasis>all</emphasis> your folders.
- </para>
- </note>
- </sect2>
- <sect2 id="usage-mail-getnsend-undelete">
- <title>Undeleting Messages</title>
- <para>
- To undelete a message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select a message you have marked for deletion.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <keycombo
- action="simul"><keycap>Ctrl</keycap><keycap>U</keycap>
- </keycombo>
- or choose
- <menuchoice>
- <guimenu>Actions</guimenu>
- <guimenuitem>Undelete</guimenuitem>
- </menuchoice>
-
- </para>
- <note>
- <title>What does Undelete actually do?</title>
- <para>
- If you have marked a message for deletion, undeleting
- it will unmark it, and the message will be removed
- from the Trash folder. However, it can't bring back
- messages that have been expunged.
- </para>
- </note>
- </listitem>
- </orderedlist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 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 you haven't entered any mail settings yet, the
- <interface>setup assistant</interface> will ask you for the
- information it needs to check your email.
- </para>
- <para>
- The assistant will give you several dialog boxes where you configure:
- <itemizedlist>
- <listitem>
- <para>
- your personal information
- </para>
- </listitem>
- <listitem>
- <para>
- your outgoing email server information
- </para>
- </listitem>
- <listitem>
- <para>
- your mail account identity name
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- To check your email, press the <guibutton>Check Mail</guibutton>
- button. If this is your first time checking mail, or you
- haven't asked <application>Evolution</application> to store your
- password, you'll be prompted for the password. Enter your
- password and your email will be downloaded.
- </para>
- <note id="badmailsettings">
- <title>Can't Check Mail?</title>
- <para>
- If you get an error message instead of mail, you probably need to check
- 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>
-
- <sect2 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>
- </sect2>
-
- <sect2 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,
- including HTML formatting, will appear as part of the
- message. To minimize download time, and to foil spammers
- who use server information to track their messages, images
- linked from an HTML message <emphasis>not</emphasis>
- display unless you select the
- <menuchoice><guimenu>View</guimenu><guisubmenu>Message
- Display</guisubmenu><guimenuitem>Load Images
- </guimenuitem></menuchoice> option. For other files,
- <application>Evolution</application> will show an icon at
- the end of the message.
- </para>
- <para>
- To Save an Attachment to Disk:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open up the desired email
- </para>
- </listitem>
- <listitem>
- <para>
- Click on the down arrow at the bottom of the email for the desired
- attachment.
- </para>
- </listitem>
- <listitem>
- <para>
- Select <guibutton>Save to Disk</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Choose the directory and filename you wish.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>OK</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <tip id="spaceandbs">
- <title>Reading email with keyboard</title>
- <para>
- You can click the spacebar to page down while you're reading an email,
- and press backspace to page up in an email. This may help to make
- reading your email faster.
- </para>
- </tip>
- <para>
- To Open an Attachment in a Program:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open the mail message with the attachment you want to read.
- </para>
- </listitem>
- <listitem>
- <para>
- Click the aarrow next the the attachment icon.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the program you'd like to use. It will start up
- and open the document.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <para>
- <application>Evolution</application> can also display
- HTML-formatted mail, complete with graphics. Graphics
- don't load automatically by default, because they can be
- large and take a long time to download. They can also be
- used by spammers to help track who reads their email. So
- having them not load automatically helps protect your
- privacy.
- </para>
- </sect2>
- </sect1>
-
- <sect1 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="figures/newmsg" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-
- <para>
- Enter an address in the <guilabel>To:</guilabel> field. If you wish
- enter a subject in the <guilabel>Subject:</guilabel> and a message in
- the big empty box at the bottom of the window. Once you have revised
- your message, press <guibutton>Send</guibutton>.
- </para>
-
- <sect2 id="usage-mail-getnsend-send-delay">
- <title>Saving Messages for Later</title>
- <para>
- <application>Evolution</application> 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.
- You might want to use "Send Later" becuase it gives
- you a chance to change your mind about a message before you send it.
- </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. Your options are:
- <itemizedlist>
- <listitem><para>
- Choose
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Save Draft</guimenuitem>
- </menuchoice>
- to store your messages in the drafts folder for later
- revision.
- </para></listitem>
-
- <listitem><para>
- If you'd like to have the message sent later, you
- can choose <guimenuitem>Send Later</guimenuitem>. That way,
- the message will be added to the queue, and you can send a
- batch of messages all at once.
- </para></listitem>
-
- <listitem><para>
- If you prefer to save your message as a text file,
- choose <guimenuitem>Save As</guimenuitem> and then choose a
- file name.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-compose">
- <title>Advanced Mail Composition</title>
- <para>
- In the next few sections, you'll see how
- <application>Evolution</application> handles advanced email
- features, including large recipient lists, attachments, and
- forwarding.
- </para>
- <sect3 id="usage-mail-getnsend-send-attach">
- <title>Attachments</title>
- <para>
- To attach a file to your email:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Push the attach button in the composer toolbar
- </para>
- </listitem>
- <listitem>
- <para>
- Select the file you want to attach
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- You can drag a file from your desktop into the composer window to
- attach it as well.
- </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>
- <para>
- When receiving a message that has an attached image,
- <application>Evolution</application> gives you the choice
- whether to view it or not. You can choose to have it
- always shown, load images only if the sender is in your
- addressbook, or never load images.
- </para>
- </sect3>
-
- <sect3 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.
- </para>
- <para>
- <guilabel>Bcc:</guilabel> is a little more complex. You
- use it like <guilabel>Cc:</guilabel>, but people on the
- <guilabel>Bcc:</guilabel> list are hidden from the other
- recipients of the message. Use it to send mail to large
- groups of people, especially if they don't know each other
- or if privacy is a concern.
- </para>
-
- <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>
-
- <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. But putting his "Clients" addressbook
- into the Bcc: section, that will cause them to be hidden
- from the competition. It seems insignificant, but it can
- make a huge difference in some situations.
- </para>
- </example>
- </para>
- </sect3>
-
- <sect3 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 offer a
- drop down list of possible address completions from your
- address book. 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. 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>
- </sect3>
- </sect2>
-
- <sect2 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 grey (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-->
-<!-- I want to wait for the formatting bugs to be fixed first -->
- <!-- ==============Figure=================================== -->
- <figure id="usage-mail-getnsend-reply-fig">
- <title>Reply Message Window</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="figures/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>
- <para>
- If you're subscribed to a mailing list, and want your reply
- to go just to the list, rather than to the sender, choose
- <guibutton>Reply to List</guibutton> instead of
- <guibutton>Reply</guibutton> or <guibutton>Reply to
- All</guibutton>.
- <note>
- <title>What is a Mailing List?</title>
- <para>
- Mailing Lists are one of the most popular tools for
- group collaboration on the Internet. Here's how they work:
- <simplelist>
- <member>
- Someone sends a message to a single address, like
- <email>evolution@ximian.com</email>.
- </member>
- <member>
- That address belongs to a program that distributes
- the message to a list of recipients.
- </member>
- </simplelist>
- The mail management program lets individuals subscribe
- to or unsubscribe from the list at will, without
- requiring the message writers to remember the addresses
- of every recipient.
- </para>
- <para>
- Mailing list servers can also let network administrators
- control mail flow, list membership, and even moderate
- the content of mailing lists.
- </para>
- </note>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send-find">
- <title>Searching and Replacing with the Composer</title>
- <para>
- You are probably familiar with search and replace features
- in any sort of text-editing software, and if you come from
- a Linux or Unix background, you may know what
- <guimenuitem>Find Regex</guimenuitem> does. If you aren't
- among the lucky who already know, here's a quick rundown of
- the automated text searching features that the message
- composer makes available to you.
- </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>
- </sect2>
-
- <sect2 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>preformat</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>
- The <guimenu>Insert</guimenu> gives you three opinions which let you
- spruce up your email to make it more interesting:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Insert Link</guimenuitem></term>
- <listitem>
- <para>
- Lets you link some text to a website. Use this tool to put hyperlinks in your HTML
- messages. 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>
- Lets you put an image alongside text.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Insert Rule</guimenuitem></term>
- <listitem>
- <para>
- Inserts a horizontal line into the text to help divide two
- sections.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- To add a hyperlink to your HTML message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select the text you want to link from
- </para>
- </listitem>
- <listitem>
- <para>
- Right click on text and select
- <guimenuitem>Link</guimenuitem>
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the address you wish to link to in the
- <guilabel>URL</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- To add an image to your HTML message:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Click
- <menuchoice>
- <guimenu>Insert</guimenu>
- <guimenuitem>Image</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Browse</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Select the image you want
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>OK</guibutton>
- </para>
- </listitem>
- <listitem>
- <para>
- Press <guibutton>Insert</guibutton>
- </para>
- </listitem>
- </orderedlist>
-
- </para>
- <note>
- <title>A Technical note on HTML Tags</title>
- <para>
- The composer is a <acronym>WYSIWYG</acronym>
- (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>
- </sect2>
-
- <sect2 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 a letter if it comes to you 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>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-ettiquette">
- <title>Seven Tips for Email Courtesy</title>
- <para>
-
- <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>
- WRITING IN CAPITAL LETTERS MEANS YOU'RE SHOUTING!
- Don't write a whole message in capital letters. It
- hurts people's ears.
- </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>
-
- <listitem>
- <para>
- Don't send <glossterm linkend="spam">spam</glossterm>.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> Happy mailing! </para>
- </sect2>
- </sect1>
-
- <sect1 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.
-
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- In the <guilabel>Store</guilabel> section, click on the
- folder to which you wish to subscribe.
- </para>
- </listitem>
- <listitem>
- <para>
- Click <guibutton>Subscribe</guibutton> to add it to the
- subscribed list.
- </para>
- </listitem>
- <listitem>
- <para>
- Close the window.
- </para>
- </listitem>
- </orderedlist>
- </para>
- </sect1>
-
- <sect1 id="encryption">
- <title>Encryption</title>
- <sect2 id="encryption-whatis">
- <title>What is Encryption?</title>
- <para>
- Encryption is an ancient method of keeping information safe
- from prying eyes. <application>Evolution</application> can
- help you keep your private messages secret. To do that, it
- makes use of the external application
- <application>gpg</application>, an implementation of strong
- <!-- <glossterm linkend="public-key-encryption"> --> Public Key
- Encryption <!-- </glossterm> -->.
- </para>
-
- <note id="pub-priv">
- <title>Public Key? Private Key? Whats the difference?</title>
- <para>
- GPG uses two keys: public and private. You can give your
- public key to anyone from whom you want to recieve
- encrypted messages, or put it on a public key server so
- that people can look it up before contacting you.
- <emphasis>Never give your private key to anyone,
- ever</emphasis>. Your private key lets you decrypt any
- message encrypted with your public key.
- </para>
- </note>
-
- <para>
- Using encryption takes a bit of forethought. When you send a
- message that is encrypted, you must encrypt it using your
- intended recipient's public key. To <emphasis>get</emphasis>
- an encrypted message, you must make sure that the sender has
- your public key in advance.
- </para>
-
- <para>
- You can use encryption in two different ways:
- <simplelist>
- <member>
- Encrypt the entire message, so that nobody but the recipient can read it.
- </member>
- <member>
- Attach an encrypted signature to a plain text message, so
- that the recipient can read the message without decrypting it, and
- only needs decryption to verify the sender's identity.
- </member>
- </simplelist>
- </para>
-
- <example>
- <title>Sending an Encrypted Messagee</title>
- <para>
- Kevin wants to send an encrypted message to his friend
- Rachel. He looks up her public key on a general key
- server, and then tells
- <application>Evolution</application> to encrypt the
- message. The message now reads "@#$23ui7yr87#@!48970fsd."
- When the information gets to Rachel, she decrypts it using
- her private key, and it appears as plain text for her to
- read.
- </para>
- </example>
- </sect2>
-
- <sect2 id="encryption-keygen">
- <title>Making Encryption Keys</title>
- <para>
- Before you can get or send encrypted mail, you need to
- generate your public and private keys with GPG. Here's how:
- </para>
- <tip>
- <title>GPG Versions</title>
- <para>
- This manual covers version 1.0.6 of GPG. If your version is
- different, this may not be entirely accurate. You may find
- out your version number by typing in: <command>gpg
- --version</command>.
- </para>
- </tip>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Open a terminal and type <command>gpg --gen-key</command>.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Choose the default algorythm, "DSA and ElGamal."
- </para>
- </listitem>
-
- <listitem>
- <para>
- Choose a key length. The default, 1024 bits, should be
- long enough.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Decide if you want your key to expire automatically, and if so, when.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- Enter your name, email address, and any additional
- personal information you think is appropriate. Do not
- falsify this information, because it will be needed to
- verify your identity later on.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Next, enter your passphrase. It does not have to be the
- same as your email password or your login password. In
- fact, it probably shouldn't. Don't forget it. If you lose
- it, your keys will be useless and you will be unable to
- decrypt messages sent to you with those keys.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Now, GPG will generate your keys. This may take awhile,
- so feel free to do something else while it's
- happening. In fact, using your computer for something
- else actually helps to generate better keys, because it
- increases the randomness in the key generation seeds.
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>
- Once the keys are generated, you can view your key information
- by typing <command>gpg --list-keys</command>. You should see
- something similar to this:
- <programlisting>
- /home/you/.gnupg/pubring.gpg
- ----------------------------
- pub 1024D/32j38dk2 2001-06-20 you &lt;you@your-address.com&gt;
- sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
- </programlisting>
- </para>
- <para>
- GPG will create one list, or keyring, for your public keys
- and one for your private keys. All the public keys you know
- are stored in the file
- <filename>~/.gnupg/pubring.gpg</filename>. If you want to
- give other people your key, send them that file.
- </para>
- <para>
- If you wish, you can upload your keys to a keyserver. Here's
- how:
- <orderedlist>
- <listitem>
- <para>
- Check your public key ID with <command>gpg
---list-keys</command>. It will be the string after 1024D on the line
-beginning with "pub." In this example, it's 32j38dk2.
- </para>
- </listitem>
- <listitem>
- <para>
- Enter the command <command>gpg --send-keys --keyserver
-wwwkeys.pgp.net 32j38dk2</command>. Substitute your key ID for
-32j38dk2. You will need your password to do this.
- </para>
- </listitem>
- </orderedlist>
-
- <note id="why-keyserver">
- <title>Why Use a Keyserver?</title>
- <para>
- Keyservers store your public keys for you so that your
- friends can decrypt your messages. If you choose not to
- use a keyserver, you can manually send your people public
- key, include it in your signature file, or put it on your
- own web page. However, it's easier to publish them once,
- and then let people download them from the keyserver when
- they want.
- </para>
- </note>
-
- </para>
- </sect2>
-
- <sect2 id="encrypt-getting-key">
- <title>Getting and Using Public Keys</title>
- <para>
- To encrypt a message to your someone else you'll need to use
- their public key in combination with your private key.
- <application>Evolution</application> does that for you, but
- you still need to get their key and add it to your keyring.
- </para>
- <para>
- To get public keys from a public key server, enter the
- command:
- <command>
- gpg --recv-keys --keyserver wwwkeys.pgp.net keyid
- </command>, substituting "keyid" for your recipient's ID. You
- will need to type in your password, and then their ID will
- automatically be added to your keyring. When you send mail to
- them, <application>Evolution</application> will allow you to
- encrypt your messages.
- </para>
- <para>
- If someone sends you their public key directly, save it as a
- plain text file and enter the command <command>gpg
- filename</command>. This will add it to your keyring.
- </para>
- </sect2>
-
- <sect2 id="encrypt-evo-integ">
- <title>Setting up Evolution's Encryption</title>
- <para>
- You'll need to open
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guimenuitem>Mail Settings</guimenuitem>
- </menuchoice>
- Once there, select the account with which you'd like to send
- and recieve encrypted mail, and click the
- <guibutton>Edit</guibutton> button. In the
- <guilabel>Security</guilabel> tab is a section labeled
- <guilabel>Pretty Good Privacy</guilabel>. Enter your key ID
- and click <guibutton>OK</guibutton>. Your key is now
- integrated into your identity in
- <application>Evolution</application>.
- </para>
- </sect2>
-
- <sect2 id="encrypt-sending">
- <title>Sending Encrypted Messages</title>
- <para>
- As you know, you can use encryption to hide the entire
- message, or just to verify your signature. Once you've
- generated your public and private keys, and have the public
- keys of the people to whom you want to send mail, here's what
- to do:
- </para>
- </sect2>
-
- <sect2 id="sign-msg">
- <title>Signing a Message</title>
- <para>
- To sign a message, choose:
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Sign</guimenuitem>
- </menuchoice>
- . You will be prompted for your PGP password. Once you enter it,
- click <guibutton>OK</guibutton> and your message will be signed.
- </para>
- </sect2>
-
- <sect2 id="encrypt-msg">
- <title>Encrypting a Message</title>
- <para>
- Encrypting a message is very similar to signing a message.
- Just choose the menu item
- <menuchoice>
- <guimenu>Security</guimenu>
- <guimenuitem>PGP Encrypt</guimenuitem>
- </menuchoice>
- </para>
- </sect2>
- <sect2 id="unencrypting">
- <title>Unencrypting a Recieved Message</title>
- <para>
- If you get an encrypted message, you will need to decrypt it
- before you read it. Remember, the sender has to have your
- public key before they can send you an encrypted message.
- </para>
- <para>
- When you view the message,
- <application>Evolution</application> will ask you for your
- PGP password. Enter it, and the message will be displayed
- properly.
- </para>
- </sect2>
- </sect1>
-</chapter>
diff --git a/help/no/usage-mainwindow.sgml b/help/no/usage-mainwindow.sgml
deleted file mode 100644
index 7d143d8488..0000000000
--- a/help/no/usage-mainwindow.sgml
+++ /dev/null
@@ -1,769 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-mainwindow">
-
- <title>The Evolution Workspace</title>
- <sect1 id="usage-mainwindow-starting">
- <title>The First Time you Start Evolution</title>
- <para>
- Start <application>Evolution</application> by selecting
- <guimenuitem>Evolution</guimenuitem> from your
- <guimenu>Programs</guimenu> menu, 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. Then, it will offer to help you set up mail accounts and
- import data from other applications.
- </para>
- <para>
- The first screen welcomes you to the assistant. It is estimated that
- configuring your mail will take 2 to 5 minutes and importing mail will
- take 1 to 2 minutes.
- </para>
-
- <sect2 id="first-step">
- <title>Step 1 of 4</title>
- <para>
- The Identity window is the first of four steps in the
- assistant. The identity step will ask you to enter your basic
- personal information.
- <itemizedlist>
- <listitem>
- <para>
- Full Name &mdash; Your full name (Example: John Doe).
- </para>
- </listitem>
- <listitem>
- <para>
- Email Address &mdash; Your email address (Example: john@doe.com)
- </para>
- </listitem>
- <listitem>
- <para>
- Organization &mdash; The company where you work (optional).
- </para>
- </listitem>
- <listitem>
- <para>
- Signature file &mdash; If you'd like to use an email
- <glossterm linkend="signature">signature</glossterm>,
- select your signature file here. Normally, the
- signature will be the contents of the
- <filename>.signature</filename> file in your home
- directory.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="second-step">
- <title>Step 2 of 4</title>
- <para>
- The <guilabel>Recieving Email</guilabel> step lets you configure
- receving email people have sent you.
- <itemizedlist>
- <listitem>
- <para>
- Server Type &mdash; There are numerous types of servers which
- <application>Evolution</application> can download your email from:
- <itemizedlist>
- <listitem>
- <para>
- POP &mdash; Downloads your email to your hard disk for
- permanent storage.
- </para>
- </listitem>
- <listitem>
- <para>
- IMAPv4 &mdash; Keeps the email on your server so you can
- access your email from any computer that supports IMAPv4 and
- have everything be the same.
- </para>
- </listitem>
- <listitem>
- <para>
- Unix mbox spool-format file &mdash; Bad description, we're
- getting a better definition shortly.
- </para>
- </listitem>
- <listitem>
- <para>
- Standard Unix mailbox file &mdash; Bad description, we're
- getting a better definition shortly.
- </para>
- </listitem>
- <listitem>
- <para>
- Qmail maildir format files &mdash; If you download your
- mail using qmail, you'll want to use this.
- </para>
- </listitem>
- <listitem>
- <para>
- None &mdash How do you have None? figure out!
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Email Server &mdash; This is the address of the server you're
- downloading from.
- </para>
- </listitem>
- <listitem>
- <para>
- Username &mdash; The username that you login to your email. That
- is often the part before the @ in your email.
- </para>
- <para>
- Authentication Type &mdash; Chances are you are using
- <guilabel>Password</guilabel>. Ask your administrator for more
- details. You can have <application>Evolution</application> check
- by clicking <guibutton>Check for supported types</guibutton>.
- </para>
- <para>
- Remember Password &mdash; If you prefer to not enter your
- password everytime you check email, press this button.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
- <sect2 id="third-step">
- <title>Step 3 or 4</title>
- <para>
- The <guilabel>Sending Email</guilabel> step lets you configure sending
- email.
- <itemizedlist>
- <listitem>
- <para>
- Server Type &mdash; There are numerous server types that
- <application>Evolution</application> supports for sending your
- mail.
- <itemizedlist>
- <listitem>
- <para>
- SMTP &mdash; Downloads mail into your mailbox file.
- </para>
- </listitem>
- <listitem>
- <para>
- Sendmail &mdash; Uses another program to download your mail
- to your mailbox files.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- Host &mdash; If you chose SMTP, enter the server's name
- or IP address here.
- </para>
- </listitem>
- <listitem>
- <para>
- Server requires authentication &mdash; If your server
- requires you to enter a password to send mail, check
- this box.
- </para>
- </listitem>
- <listitem>
- <para>
- Authentication Type &mdash; Chances are you are using
- <guilabel>Password</guilabel>. If you're not sure, ask
- your system administrator or ISP, or have
- <application>Evolution</application> check for you by
- clicking <guibutton>Check for supported
- types</guibutton>.
- </para>
- </listitem>
- <listitem>
- <para>
- Username &mdash; The account name you use when you login
- to check your email. Normally, this is the part of your
- email address before the '@' character.
- </para>
- </listitem>
- <listitem>
- <para>
- Remember Password &mdash; If you prefer to not enter
- your password every time you check email, press this
- button.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="fourth-step">
- <title>Step 4 of 4</title>
- <para>
- Chances are, <application>Evolution</application> isn't your first email
- program. You're probably switching from another program and will want
- access to your email from your old program. It's for exactly these
- situations that <application>Evolution</application> includes an import
- feature.
- </para>
- <para>
- <application>Evolution</application> can import the following types of
- files:
- <variablelist>
- <varlistentry>
- <term>VCard (.vcf, gcrd)</term>
- <listitem>
- <para>
- The most common addressbook format.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Outlook Express 4 (.mbx)</term>
- <listitem>
- <para>
- Email file format used by Outlook Express 4.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>MBox (mbox)</term>
- <listitem>
- <para>
- The email box format used by Netscape, Evolution,
- Eudora, and many other email clients.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-</para>
-<para>
- <note>
- <title>Outlook 2000</title>
- <para>
- Outlook 2000 uses a proprietary format that
- <application>Evolution</application> cannot import directly.
- To import files from Outlook 2000, you will need to boot to
- Windows, import the files into Mozilla mail, then reboot and
- import from Mozilla. Please see the <xref linkend="evolution-faq">FAQ for more
- information.
- </para>
- </note>
-
-
- Ask your system administrator if you aren't sure which you use.
- </para>
-
- <tip>
- <title>Exporting Files From Evolution</title>
- <para>
- Evolution uses standard file types for all its information,
- so you should have no trouble taking your information
- elsewhere if you want.
- </para>
- <para>
- For mail, that's <filename>mbox</filename>, for calendar,
- <filename>iCal</filename>, and for the address book, vCards
- in a <filename>.db3</filename> database.
- </para>
- </tip>
- </sect2>
- </sect1>
-
- <sect1 id="ui-intro">
- <title>What's What in Evolution</title>
- <para>
- Now that you've gotten the first-run configuration out of the
- way, you're ready to get down to work. Here's a quick
- explanation of what's going on in your main
- <application>Evolution</application> window.
- </para>
-
- <figure id="preface-basic-interface">
- <title>The Evolution Main Window</title>
- <screenshot>
- <screeninfo>Inbox</screeninfo>
- <graphic srccredit="Kevin Breit" fileref="figures/mainwindow-pic"/>
- </graphic>
- </screenshot>
- </figure>
-
- <para>
- <inlinegraphic fileref="figures/full-1" format="png"></inlinegraphic>
- <guilabel>Menubar</guilabel>
- </para>
-
- <para>
- The <guilabel>Menubar</guilabel> gives you access to nearly all the
- features that can be found in <application>Evolution</application>.
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-2" format="png"></inlinegraphic>
- <guilabel>Toolbar</guilabel>
- </para>
-
- <para>
- The <guilabel>Toolbar</guilabel> gives you fast and easy access to the
- most used features in each component.
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-3" format="png"></inlinegraphic>
- <guilabel>Shortcut Bar</guilabel>
- </para>
-
- <para>
- The <guilabel>Shortcut Bar</guilabel> lets you go to your favorite
- components with the click of a click of a button.
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-4" format="png"></inlinegraphic>
- <guilabel>Status Bar</guilabel>
- </para>
-
- <para>
- Periodically, <application>Evolution</application> will need to quietly
- display a message, or tell you the progress of a task. This most
- often happens when you're checking or sending email. These progress
- queues are shown here, in the <guilabel>Status Bar</guilabel>.
- </para>
-
- <para>
- <inlinegraphic fileref="figures/full-5" format="png"></inlinegraphic>
- <guilabel>Search Bar</guilabel>
- </para>
-
- <para>
- The <guilabel>Search Bar</guilabel> lets you search through your email
- with precision so you can easily find what you're looking for.
- </para>
-
-
- <sect2 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>
- Take a look at the <guilabel>Shortcut Bar</guilabel>
- The shortcut buttons in that category are:
-
- <variablelist>
- <varlistentry>
- <term> <guibutton>My Evolution</guibutton></term>
- <listitem>
- <para>
- Start your day here. <guilabel>My Evolution</guilabel>
- gives you a quick summary 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>
- </sect2>
- <sect2 id="usage-mainwindow-folderbar">
- <title>Folders and 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 are
- <guilabel>Other Contacts</guilabel>, <glossterm
- linkend="ldap">LDAP</glossterm> contact directories stored on a
- network, followed by any <glossterm
- linkend="imap">IMAP</glossterm> mail folders you may have
- available to you over your network. Lastly, there are
- <guilabel>Virtual Folders</guilabel>, discussed in <xref
- linkend="usage-mail-organize-vfolders">,
- </para>
- <para>
-
- A typical <guilabel>Local</guilabel> folder contains the following folders:
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>My Evolution</guilabel>, a quick summary to help you do
- your tasks.
- </para>
- </listitem>
- <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>Drafts</guilabel>, for messages you started and didn't finish.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Inbox</guilabel>, for incoming mail.
- </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>
-
- <listitem>
- <para>
- <guilabel>Sent</guilabel>, for sent mail.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Trash</guilabel>, a virtual folder view of all
- the messages you have marked for deletion but not yet
- <glossterm linkend="expunge">expunged</glossterm>. Note that
- once you have expunged a message, it
- is permanently deleted.
- </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. When you hide the folder
- bar,
- there is a menu on the left side of the window just below the toolbar
- to move about the folder tree, even with the folder and
- shortcut bars hidden.
- </para>
- </tip>
-
- <para>
- If you get any serious amount of mail, you'll want more folders
- than just your Inbox.
- To create a new folder:
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- Select
- <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem></menuchoice>
- <keycombo action="simul">
- <keycap>Shift</keycap>
- <keycap>Ctrl</keycap>
- <keycap>E</keycap>
- </keycombo>.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the name of the folder in the <guilabel>Folder
- Name</guilabel> field.
- </para>
- </listitem>
- <listitem>
- <para>
- Select the folder type. The available options are.
-
- <itemizedlist>
- <listitem>
- <para>
- Calendar
- </para>
- </listitem>
- <listitem>
- <para>
- Contacts
- </para>
- </listitem>
- <listitem>
- <para>
- Mail
- </para>
- </listitem>
- <listitem>
- <para>
- Mail Storage
- </para>
- </listitem>
- <listitem>
- <para>
- My Evolution
- </para>
- </listitem>
- <listitem>
- <para>
- Tasks
- </para>
- </listitem>
- <listitem>
- <para>
- vTrash
- </para>
- </listitem>
- </itemizedlist>
-
- </para>
- </listitem>
- <listitem>
- <para>
- Select the folder for the new folder to go in.
- </para>
- </listitem>
- </orderedlist>
- </para>
-
- <sect3 id="subfolders">
- <title>Subfolders</title>
- <para>
- <application>Evolution</application> can also manage subfolders,
- subfolders are folders inside of folders. This works well if
- you want to try to separate your home folders from your work
- folders, or if you like to keep very organized.
- </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>View</guimenuitem>, to view the folder. </para></listitem>
- <listitem><para><guimenuitem>Open in New Window</guimenuitem>, to see it in a new Evolution window. </para></listitem>
- <listitem><para><guimenuitem>Move</guimenuitem>, to move the folder to another location. </para></listitem>
- <listitem><para><guimenuitem>Copy</guimenuitem>, to duplicate the folder. </para></listitem>
- <listitem><para><guimenuitem>Delete</guimenuitem>, to delete the folder and all its contents. </para></listitem>
- <listitem><para><guimenuitem>Rename</guimenuitem>, to change its name. </para></listitem>
- <listitem><para><guimenuitem>Create New Folder</guimenuitem>, to create another folder in the same location. </para></listitem>
- <listitem><para><guimenuitem>Add to Shortcut Bar</guimenuitem>, to add the folder to your shortcut bar. </para></listitem>
- <listitem><para><guimenuitem>Properties</guimenuitem>, to view or change the folder properties. </para></listitem>
-
- </itemizedlist>
- </para>
-
- <para>
- You can also rearrange folders and messages by dragging and
- dropping them.
- </para>
-
-
-
-<!--
- <tip>
- <title>Context-Sensitive Help</title>
- <para>
- GNOME 2.0 offers 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 mail folder, that folder label
- is displayed in bold text, along with the number of new messages in
- that folder inside of paranthesis.
- </para>
- </sect3>
- </sect2>
-
- <sect2 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></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></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></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>Actions</guimenu></term>
- <listitem><para>
- Holds actions which maybe applied to a message. Normally,
- if there is only one target for the action &mdash; for
- example, replying to a message &mdash; you can find it in
- the <guimenu>Actions</guimenu> menu.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term> <guimenu>Tools</guimenu></term>
- <listitem><para>
- Tools for configuring, changing, and
- setting up preferences 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></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>
- Once you've familiarized yourself with the <interface>main
- window</interface> you can start doing things with it. We'll
- start with <guilabel>My Evolution</guilabel>, the summary of
- everything that's going on.
- </para>
- </sect2>
- </sect1>
-
-</chapter>
-
diff --git a/help/no/usage-notes.sgml b/help/no/usage-notes.sgml
deleted file mode 100644
index e9561065e6..0000000000
--- a/help/no/usage-notes.sgml
+++ /dev/null
@@ -1,49 +0,0 @@
-<chapter id="usage-notes">
- <title>Evolution notater</title>
- <abstract>
- <title>En oversikt over notater i Evolution</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/help/no/usage-print.sgml b/help/no/usage-print.sgml
deleted file mode 100644
index 747b6838d0..0000000000
--- a/help/no/usage-print.sgml
+++ /dev/null
@@ -1,103 +0,0 @@
-<chapter id="usage-print">
-<title>Printing with Evolution</title>
-<para>
- 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="figures/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; <guilabel>Generic
- Postscript</guilabel>, whether to write to a PDF file, and whether to print
- to a file or to an actual printer in Generic Postscript. 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="figures/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/help/no/usage-sync.sgml b/help/no/usage-sync.sgml
deleted file mode 100644
index 83fef7f6df..0000000000
--- a/help/no/usage-sync.sgml
+++ /dev/null
@@ -1,21 +0,0 @@
-
- <chapter id="usage-sync">
- <title>Synchronizing Evolution with Hand-Held Devices</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>
- If your environment is correctly configured to sync with your
- PDA, then it should sync with <application>Evolution</application>.
- </para>
- </sect1>
- </chapter>
diff --git a/help/sgmldocs.make b/help/sgmldocs.make
deleted file mode 100644
index 1dca7e7fc5..0000000000
--- a/help/sgmldocs.make
+++ /dev/null
@@ -1,139 +0,0 @@
-# To use this template:
-# 1) Define: figs, docname, lang, omffile, sgml_ents although figs,
-# omffile, and sgml_ents may be empty in your Makefile.am which
-# will "include" this one
-# 2) Figures must go under figures/ and be in PNG format
-# 3) You should only have one document per directory
-#
-# Note that this makefile forces the directory name under
-# $prefix/share/gnome/help/ to be the same as the SGML filename
-# of the document. This is required by GNOME. eg:
-# $prefix/share/gnome/help/fish_applet/C/fish_applet.sgml
-# ^^^^^^^^^^^ ^^^^^^^^^^^
-# Definitions:
-# figs A list of screenshots which will be included in EXTRA_DIST
-# Note that these should reside in figures/ and should be .png
-# files, or you will have to make modifications below.
-# docname This is the name of the SGML file: <docname>.sgml
-# lang This is the document locale
-# omffile This is the name of the OMF file. Convention is to name
-# it <docname>-<locale>.omf.
-# sgml_ents This is a list of SGML entities which must be installed
-# with the main SGML file and included in EXTRA_DIST.
-# eg:
-# figs = \
-# figures/fig1.png \
-# figures/fig2.png
-# docname = scrollkeeper-manual
-# lang = C
-# omffile=scrollkeeper-manual-C.omf
-# sgml_ents = fdl.sgml
-# include $(top_srcdir)/help/sgmldocs.make
-# dist-hook: app-dist-hook
-#
-
-docdir = $(datadir)/gnome/help/$(docname)/$(lang)
-
-doc_DATA = index.html
-
-sgml_files = $(sgml_ents) $(docname).sgml
-
-omf_dir=$(top_srcdir)/omf-install
-
-EXTRA_DIST = $(sgml_files) $(doc_DATA) $(omffile) $(figs)
-
-CLEANFILES = omf_timestamp
-
-all: index.html omf
-
-omf: omf_timestamp
-
-omf_timestamp: $(omffile)
- -for file in $(srcdir)/$(omffile); do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- scrollkeeper-preinstall $(docdir)/$(docname).sgml $$file $(omf_dir)/$$basefile; \
- done
- touch omf_timestamp
-
-index.html: $(docname)/index.html
- -cp $(docname)/index.html .
-
-$(docname).sgml: $(sgml_ents)
- -ourdir=`pwd`; \
- cd $(srcdir); \
- cp $(sgml_ents) $$ourdir
-
-
-# The weird srcdir trick is because the db2html from the Cygnus RPMs
-# cannot handle relative filenames
-$(docname)/index.html: $(srcdir)/$(docname).sgml
- -srcdir=`cd $(srcdir) && pwd`; \
- if test "$(HAVE_JW)" = 'yes' ; then \
- jw -c /etc/sgml/catalog $$srcdir/$(docname).sgml -o $$srcdir/$(docname); \
- else \
- db2html $$srcdir/$(docname).sgml; \
- fi
-
-app-dist-hook: index.html
- -$(mkinstalldirs) $(distdir)/$(docname)/stylesheet-images
- -$(mkinstalldirs) $(distdir)/figures
- -cp $(srcdir)/$(docname)/*.html $(distdir)/$(docname)
- -for file in $(srcdir)/$(docname)/*.css; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- cp $$file $(distdir)/$(docname)/$$basefile ; \
- done
- -for file in $(srcdir)/$(docname)/stylesheet-images/*.gif; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- cp $$file $(distdir)/$(docname)/stylesheet-images/$$basefile ; \
- done
- -if [ -e topic.dat ]; then \
- cp $(srcdir)/topic.dat $(distdir); \
- fi
-
-install-data-am: index.html omf
- -$(mkinstalldirs) $(DESTDIR)$(docdir)/stylesheet-images
- -$(mkinstalldirs) $(DESTDIR)$(docdir)/figures
- -cp $(srcdir)/$(sgml_files) $(DESTDIR)$(docdir)
- -for file in $(srcdir)/$(docname)/*.html $(srcdir)/$(docname)/*.css; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$$basefile; \
- done
- -for file in $(srcdir)/figures/*.png; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/figures/$$basefile; \
- done
- -for file in $(srcdir)/$(docname)/stylesheet-images/*.gif; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/stylesheet-images/$$basefile; \
- done
- -if [ -e $(srcdir)/topic.dat ]; then \
- $(INSTALL_DATA) $(srcdir)/topic.dat $(DESTDIR)$(docdir); \
- fi
-
-$(docname).ps: $(srcdir)/$(docname).sgml
- -srcdir=`cd $(srcdir) && pwd`; \
- db2ps $$srcdir/$(docname).sgml
-
-$(docname).rtf: $(srcdir)/$(docname).sgml
- -srcdir=`cd $(srcdir) && pwd`; \
- db2ps $$srcdir/$(docname).sgml
-
-uninstall-local:
- -for file in $(srcdir)/$(docname)/stylesheet-images/*.gif; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- rm -f $(docdir)/stylesheet-images/$$basefile; \
- done
- -for file in $(srcdir)/figures/*.png; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- rm -f $(docdir)/figures/$$basefile; \
- done
- -for file in $(srcdir)/$(docname)/*.html $(srcdir)/$(docname)/*.css; do \
- basefile=`echo $$file | sed -e 's,^.*/,,'`; \
- rm -f $(DESTDIR)$(docdir)/$$basefile; \
- done
- -for file in $(sgml_files); do \
- rm -f $(DESTDIR)$(docdir)/$$file; \
- done
- -rmdir $(DESTDIR)$(docdir)/stylesheet-images
- -rmdir $(DESTDIR)$(docdir)/figures
- -rmdir $(DESTDIR)$(docdir)
diff --git a/help/update_po.pl b/help/update_po.pl
deleted file mode 100755
index 7fa054e721..0000000000
--- a/help/update_po.pl
+++ /dev/null
@@ -1,212 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Script for translators that extract .sgml files into .sgml.po ones
-#
-# Copyright (C) 2001 Hctor Garca 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: Hctor Garca 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"; }
-
-if ( !(-d "./$LANG") ){ mkdir ("./$LANG", 0755) ; }
-
-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");
-
- if ( -f "../$LANG/$Original_file.po") {
- 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");
- } else {
- system ("mv ../$LANG/$Original_file.pot ../$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/help/update_translation.pl b/help/update_translation.pl
deleted file mode 100755
index 0023b069d1..0000000000
--- a/help/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 Hctor Garca 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: Hctor Garca 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 "Traduccin \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/importers/.cvsignore b/importers/.cvsignore
deleted file mode 100644
index 3c0c94a291..0000000000
--- a/importers/.cvsignore
+++ /dev/null
@@ -1,20 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.bb
-*.bbg
-*.da
-*.gcov
-*.oaf
-*.lo
-*.la
-Mail-stubs.c
-Mail-skels.c
-Mail-common.c
-Mail.h
-evolution-elm-importer
-evolution-gnomecard-importer
-evolution-pine-importer
-evolution-netscape-importer
diff --git a/importers/ChangeLog b/importers/ChangeLog
deleted file mode 100644
index b1a3b75276..0000000000
--- a/importers/ChangeLog
+++ /dev/null
@@ -1,252 +0,0 @@
-2001-09-25 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (netscape_import_accounts): Handle the case when
- the transport is set to nothing.
-
-2001-09-14 Iain Holmes <iain@ximian.com>
-
- * pine-importer.c (import_addressfile): Rewrite.
-
-2001-09-10 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (create_checkboxes_control): Use an HBox instead
- of a VBox.
-
-2001-09-10 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (netscape_import_accounts): Handle Movemail case.
-
-2001-09-07 Iain Holmes <iain@ximian.com>
-
- * pine-importer.c:
- netscape-importer.c:
- elm-importer.c:
- evolution-gnomecard-importer.c (create_checkboxes_control): New control
- layout.
-
-2001-09-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * pine-importer.c: Fix a typo.
-
-2001-09-04 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (netscape_import_accounts): If there is no
- username defined in the netscape file, work it out from the passwd
- file.
- (get_user_fullname): Work out the username from the passwd file,
- striping all the extra stuff and expanding the &
-
-2001-08-31 Iain Holmes <iain@ximian.com>
-
- * elm-importer.c (create_importer_gui): Add a messagebox.
- (importer_cb): Update GUI
- (elm_import_file): Update GUI.
-
-2001-08-30 Iain Holmes <iain@ximian.com>
-
- * pine-importer.c (create_importer_gui): Add a messagebox.
- (importer_cb): Update GUI
- (pine_import_file): Upidate gui.
-
-2001-08-29 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (importer_cb): Handle the case if the importer
- isn't ready or is busy.
- (importer_timeout_fn): One shot timeout function to call the importer
- again.
-
- * pine-importer.c (importer_cb): Same.
-
-2001-08-29 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (create_importer_gui): Add a message.
- (importer_cb): Make the progressbar move (ohhh pretty).
-
-2001-08-29 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (create_importer_gui): Create a progress GUI.
- (importer_cb): Update GUI.
- (netscape_import_file): Update GUI.
-
-2001-08-21 Iain Holmes <iain@ximian.com>
-
- * pine-importer.c (scan_dir): Don't add a directory to the list of files
- to be imported.
-
-2001-08-21 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (netscape_import_accounts): Fully assign the id
- structure.
-
-2001-08-02 Jon Trowbridge <trow@ximian.com>
-
- * Makefile.am: Added camel dependency (now needed by ebook).
-
-2001-07-18 Jon Trowbridge <trow@ximian.com>
-
- * netscape-importer.c (netscape_import_accounts): Remove obsolete
- reference to account.default_account.
-
-2001-07-16 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (is_dir_empty): Find out if a dir is either empty
- or contains only 0 length files.
- (netscape_can_import): Only import a file if the dir isn't empty.
-
-2001-07-12 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c (netscape_init_prefs): Ignore comments.
- (netscape_import_accounts): Move the accounts.source assignment down a
- little bit. Fixes about a zillion bugs.
-
-2001-07-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * Makefile.am: s/GNOMELOCALEDIR/EVOLUTION_LOCALEDIR
- * elm-importer.c: Added bindtextdomain(), textdomain() calls.
- * evolution-gnomecard-importer.c: Same here.
- * pine-importer.c: Same here.
- * netscape-importer.c: Same here.
-
-2001-07-10 Iain Holmes <iain@ximian.com>
-
- * elm-importer.c: Removed all the Don't ask again and alias code.
-
-2001-07-10 Iain Holmes <iain@ximian.com>
-
- * pine-importer.c: Removed all the Don't ask again and settings code.
- Made it quit correctly after it imports addressbooks.
-
-2001-07-10 Iain Holmes <iain@ximian.com>
-
- * netscape-importer.c: Removed all the code for the bits that are not
- supported. Also removed the Don't Ask Me Again button.
-
-2001-07-10 Iain Holmes <iain@ximian.com>
-
- * evolution-gnomecard-importer.c (gnomecard_store_settings): Don't
- use an Ask again thing.
- (gnomecard_restore_settings): Ditto.
- (gnomecard_can_import): Ditto
- (importer_cb): Quit correctly, releasing all our bonobo objects.
- (gnomecard_destroy_cb): Release our objects.
- (create_checkboxes_control): Don't create an ask again thing.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am: added $(BONOBO_CONF_LIBS) to all the LDADDs, to get
- it to compile. Not entirely sure it is correct.
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * Makefile.am (evolution_netscape_importer_LDADD):
- (evolution_elm_importer_LDADD):
- (evolution_pine_importer_LDADD):
- (evolution_gnomecard_importer_LDADD): Remove DB3_LDADD
-
-2001-06-14 Damon Chaplin <damon@ximian.com>
-
- * .cvsignore: added evolution-gnomecard-importer.
-
-2001-06-04 Ettore Perazzoli <ettore@ximian.com>
-
- Fix Radek's fix. $(DB3_LDADD) must always come *before*
- `libeutil.la'.
-
- * Makefile.am (evolution_netscape_importer_LDADD): Move
- `libevolution-importer.la' on top, then put `$(DB3_LDADD)', then
- libeutil.la, then the Bonobo and GNOME libs.
- (evolution_elm_importer_LDADD): Likewise.
-
-2001-06-04 Radek Doulik <rodo@ximian.com>
-
- * Makefile.am: move DB3_LDADD down to fix linkage
-
-2001-06-03 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (evolution_netscape_importer_LDADD): Move
- `$(DB3_LDADD)' before libeutil, and the shared libraries at the
- bottom.
- (evolution_elm_importer_LDADD): Likewise.
- (evolution_pine_importer_LDADD): Likewise.
- (evolution_gnomecard_importer_LDADD): Likewise.
-
-2001-06-01 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (evolution_netscape_importer_LDADD): Add
- `$(DB3_LDADD)'.
- (evolution_elm_importer_LDADD): Likewise.
- (evolution_pine_importer_LDADD): Likewise.
- (evolution_gnomecard_importer_LDADD): Likewise.
-
-2001-05-16 Iain Holmes <iain@ximian.com>
-
- * evolution-gnomecard-importer.c: Converted the old importer into an
- intelligent importer that uses the VCard importer to do it's dirty work.
-
- * Makefile.am: Create the gnomecard importer.
-
- * GNOME_Evolution_GnomeCard_Intelligent_Importer.oaf.in: OAF file.
-
-2001-05-14 Iain Holmes <iain@ximian.com>
-
- * elm-importer.c (elm_store_settings): Store the elm settings.
- (elm_restore_settings): Restore all the settings.
- (elm_can_import): Check the importer settings, handle the don't ask me
- again stuff.
- (scan_dir): Switch the arguments to match the other importers.
- (destroy_cb): Store the settings.
- (elm_create_structure): Set all the settings, handle the new location
- of the elm mail.
- (create_checkboxes_control): Add a "Don't ask me again" box.
-
-2001-05-09 Iain Holmes <iain@ximian.com>
-
- * pine-importer.c (import_addressfile): Free memory leaks.
- Fix spewage.
-
- * netscape-importer.c: Fix spewage.
-
-2001-05-09 Iain Holmes <iain@ximian.com>
-
- * elm-importer.c (elm_can_import): Check the elm rc file for the mail dir.
- Handle if the aliases file exists too.
- (parse_elm_rc): Parse the elmrc file into a hash table.
- (elm_get_rc_value): Get the value out of the hash table.
-
-2001-05-09 Christopher James Lahey <clahey@ximian.com>
-
- * .cvsignore: Added .cvsignore.
-
-2001-05-09 Christopher James Lahey <clahey@ximian.com>
-
- * elm-importer.c, netscape-importer.c, pine-importer.c: Include
- bonobo-context.h.
-
- * netscape-importer.c (netscape_import_accounts): Made a bunch of
- const char *s here.
- (importer_cb): Replaced CORBA_OBJECT_NIL with CORBA_NO_EXCEPTION
- in a error check here.
- (netscape_create_structure): Removed unused data variable here.
- Added BONOBO_OBJECT casts.
- (importer_init): Changed factory to be a BonoboGenericFactory *
- instead of a BonoboObject *.
-
- * pine-importer.c (import_addressfile): Changed signature to match
- EBookCallback signature. Added char *email variable. Removed
- EList since we only need to deal with one email for now. Changed
- this to not set the file as to the fullname.
- (pine_can_import): Removed unused settings and addressbook
- variables.
- (pine_create_structure): Added BONOBO_OBJECT casts.
-
-2001-05-08 Iain Holmes <iain@ximian.com>
-
- * *: Added everything to CVS.
-
-2001-04-26 Iain Holmes <iain@ximian.com>
-
- * elm-importer.c:
- pine-importer.c:
- netscape-importer.c: Moved these files to their own toplevel.
- Made them use the mbox importer component instead of doing it themselves.
- Made them quit correctly, and store their settings.
diff --git a/importers/GNOME_Evolution_Elm_Intelligent_Importer.oaf.in b/importers/GNOME_Evolution_Elm_Intelligent_Importer.oaf.in
deleted file mode 100644
index 6676042bf6..0000000000
--- a/importers/GNOME_Evolution_Elm_Intelligent_Importer.oaf.in
+++ /dev/null
@@ -1,21 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Elm_Intelligent_Importer_Factory"
- type="exe"
- location="evolution-elm-importer">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Elm_Intelligent_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Elm_Intelligent_Importer_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:1.0"/>
- </oaf_attribute>
-
-</oaf_server>
-</oaf_info>
diff --git a/importers/GNOME_Evolution_GnomeCard_Intelligent_Importer.oaf.in b/importers/GNOME_Evolution_GnomeCard_Intelligent_Importer.oaf.in
deleted file mode 100644
index e80bbcacbf..0000000000
--- a/importers/GNOME_Evolution_GnomeCard_Intelligent_Importer.oaf.in
+++ /dev/null
@@ -1,21 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_GnomeCard_Intelligent_ImporterFactory"
- type="exe"
- location="evolution-gnomecard-importer">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_GnomeCard_Intelligent_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_GnomeCard_Intelligent_ImporterFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:1.0"/>
- </oaf_attribute>
-
-</oaf_server>
-</oaf_info>
diff --git a/importers/GNOME_Evolution_Netscape_Intelligent_Importer.oaf.in b/importers/GNOME_Evolution_Netscape_Intelligent_Importer.oaf.in
deleted file mode 100644
index a53d9bad6c..0000000000
--- a/importers/GNOME_Evolution_Netscape_Intelligent_Importer.oaf.in
+++ /dev/null
@@ -1,21 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Netscape_Intelligent_Importer_Factory"
- type="exe"
- location="evolution-netscape-importer">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Netscape_Intelligent_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Netscape_Intelligent_Importer_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:1.0"/>
- </oaf_attribute>
-
-</oaf_server>
-</oaf_info>
diff --git a/importers/GNOME_Evolution_Pine_Intelligent_Importer.oaf.in b/importers/GNOME_Evolution_Pine_Intelligent_Importer.oaf.in
deleted file mode 100644
index 00d15710f4..0000000000
--- a/importers/GNOME_Evolution_Pine_Intelligent_Importer.oaf.in
+++ /dev/null
@@ -1,21 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Pine_Intelligent_Importer_Factory"
- type="exe"
- location="evolution-pine-importer">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Pine_Intelligent_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Pine_Intelligent_Importer_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/IntelligentImporter:1.0"/>
- </oaf_attribute>
-
-</oaf_server>
-</oaf_info>
diff --git a/importers/Makefile.am b/importers/Makefile.am
deleted file mode 100644
index 4c22c5e20b..0000000000
--- a/importers/Makefile.am
+++ /dev/null
@@ -1,90 +0,0 @@
-bin_PROGRAMS = evolution-netscape-importer \
- evolution-elm-importer \
- evolution-pine-importer \
- evolution-gnomecard-importer
-
-INCLUDES = \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DG_LOG_DOMAIN=\"Evolution-Importer\" \
- -I$(top_srcdir) \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/addressbook/backend/ebook \
- $(BONOBO_GNOME_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-IDLS = \
- $(top_srcdir)/mail/Mail.idl
-
-MAIL_GENERATED = \
- Mail.h \
- Mail-common.c \
- Mail-skels.c \
- Mail-stubs.c
-
-$(MAIL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) `$(GNOME_CONFIG) --cflags idl` $(top_srcdir)/mail/Mail.idl
-
-evolution_netscape_importer_SOURCES = \
- $(MAIL_GENERATED) \
- netscape-importer.c
-
-evolution_netscape_importer_LDADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/e-util/libeutil.la \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-evolution_elm_importer_SOURCES = \
- elm-importer.c
-
-evolution_elm_importer_LDADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/e-util/libeutil.la \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-evolution_pine_importer_SOURCES = \
- pine-importer.c
-
-evolution_pine_importer_LDADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-evolution_gnomecard_importer_SOURCES = \
- evolution-gnomecard-importer.c
-
-evolution_gnomecard_importer_LDADD = \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(BONOBO_CONF_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Netscape_Intelligent_Importer.oaf.in \
- GNOME_Evolution_Elm_Intelligent_Importer.oaf.in \
- GNOME_Evolution_Pine_Intelligent_Importer.oaf.in \
- GNOME_Evolution_GnomeCard_Intelligent_Importer.oaf.in
-
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-EXTRA_DIST = $(oaf_in_files) $(oaf_DATA)
-
-@XML_I18N_MERGE_OAF_RULE@
diff --git a/importers/elm-importer.c b/importers/elm-importer.c
deleted file mode 100644
index 530d5c7d80..0000000000
--- a/importers/elm-importer.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* elm-importer.c
- *
- * Authors:
- * Iain Holmes <iain@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 Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
-
-#include <glib.h>
-#include <gnome.h>
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/evolution-importer-client.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#define ELM_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Elm_Intelligent_Importer_Factory"
-#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer"
-#define KEY "elm-mail-imported"
-
-/*#define SUPER_IMPORTER_DEBUG*/
-#ifdef SUPER_IMPORTER_DEBUG
-#define d(x) x
-#else
-#define d(x)
-#endif
-
-typedef struct {
- GList *dir_list;
-
- int num;
-
- GNOME_Evolution_Importer importer;
- EvolutionImporterListener *listener;
-
- GtkWidget *mail;
- gboolean do_mail;
-
- Bonobo_ConfigDatabase db;
-
- GtkWidget *dialog;
- GtkWidget *label;
- GtkWidget *progressbar;
-} ElmImporter;
-
-typedef struct {
- char *parent;
- char *foldername;
- char *path;
-} ElmFolder;
-
-static GHashTable *elm_prefs = NULL;
-
-static void import_next (ElmImporter *importer);
-
-static GtkWidget *
-create_importer_gui (ElmImporter *importer)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("Evolution is importing your old Elm mail"), GNOME_MESSAGE_BOX_INFO, NULL);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Importing..."));
-
- importer->label = gtk_label_new (_("Please wait"));
- importer->progressbar = gtk_progress_bar_new ();
- gtk_progress_set_activity_mode (GTK_PROGRESS (importer->progressbar), TRUE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), importer->label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), importer->progressbar, FALSE, FALSE, 0);
-
- return dialog;
-}
-
-static void
-elm_store_settings (ElmImporter *importer)
-{
- bonobo_config_set_boolean (importer->db, "/Importer/Elm/mail",
- importer->do_mail, NULL);
-}
-
-static void
-elm_restore_settings (ElmImporter *importer)
-{
- importer->do_mail = bonobo_config_get_boolean_with_default (
- importer->db, "/Importer/Elm/mail", TRUE, NULL);
-}
-
-static void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- ElmImporter *importer = (ElmImporter *) data;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- if (more_items) {
- GtkAdjustment *adj;
- float newval;
-
- adj = GTK_PROGRESS (importer->progressbar)->adjustment;
- newval = adj->value + 1;
- if (newval > adj->upper) {
- newval = adj->lower;
- }
-
- gtk_progress_set_value (GTK_PROGRESS (importer->progressbar), newval);
- CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer,
- objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
- return;
- }
-
- import_next (importer);
-}
-
-static gboolean
-elm_import_file (ElmImporter *importer,
- const char *path,
- const char *folderpath)
-{
- CORBA_boolean result;
- CORBA_Environment ev;
- CORBA_Object objref;
- char *str;
-
- CORBA_exception_init (&ev);
-
- str = g_strdup_printf (_("Importing %s as %s"), path, folderpath);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- result = GNOME_Evolution_Importer_loadFile (importer->importer, path,
- folderpath, &ev);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s", CORBA_exception_id (&ev));
- CORBA_Object_release (importer->importer, &ev);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- importer->listener = evolution_importer_listener_new (importer_cb,
- importer);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return FALSE;
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-static void
-parse_elm_rc (const char *elmrc)
-{
- static gboolean parsed = FALSE;
- char line[4096];
- FILE *handle;
- gboolean exists;
-
- if (parsed == TRUE)
- return;
-
- elm_prefs = g_hash_table_new (g_str_hash, g_str_equal);
-
- exists = g_file_exists (elmrc);
- if (exists == FALSE) {
- parsed = TRUE;
- return;
- }
-
- handle = fopen (elmrc, "r");
- if (handle == NULL) {
- parsed = TRUE;
- return;
- }
-
- while (fgets (line, 4096, handle) != NULL) {
- char *linestart, *end;
- char *key, *value;
- if (*line == '#' &&
- (line[1] != '#' && line[2] != '#')) {
- continue;
- } else if (*line == '\n') {
- continue;
- } else if (*line == '#' && line[1] == '#' && line[2] == '#') {
- linestart = line + 4;
- } else {
- linestart = line;
- }
-
- end = strstr (linestart, " = ");
- if (end == NULL) {
- g_warning ("Broken line");
- continue;
- }
-
- *end = 0;
- key = g_strdup (linestart);
-
- linestart = end + 3;
- end = strchr (linestart, '\n');
- if (end == NULL) {
- g_warning ("Broken line");
- g_free (key);
- continue;
- }
-
- *end = 0;
- value = g_strdup (linestart);
-
- g_hash_table_insert (elm_prefs, key, value);
- }
-
- parsed = TRUE;
- fclose (handle);
-}
-
-static char *
-elm_get_rc_value (const char *value)
-{
- if (elm_prefs == NULL)
- return NULL;
-
- return g_hash_table_lookup (elm_prefs, value);
-}
-
-static gboolean
-elm_can_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- ElmImporter *importer = closure;
- char *elmdir, *maildir, *aliasfile;
- char *elmrc;
- gboolean exists, mailexists, aliasexists;
- gboolean mail, alias;
-
- mail = bonobo_config_get_boolean_with_default (importer->db,
- "/Importer/Elm/mail-imported", FALSE, NULL);
-
- if (mail)
- return FALSE;
-
- importer->do_mail = !mail;
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (importer->mail),
- importer->do_mail);
-
- elmdir = gnome_util_prepend_user_home (".elm");
- exists = g_file_exists (elmdir);
-
- g_free (elmdir);
- if (exists == FALSE)
- return FALSE;
-
- elmrc = gnome_util_prepend_user_home (".elm/elmrc");
- parse_elm_rc (elmrc);
-
- maildir = elm_get_rc_value ("maildir");
- if (maildir == NULL) {
- maildir = g_strdup ("Mail");
- } else {
- maildir = g_strdup (maildir);
- }
-
- if (!g_path_is_absolute (maildir)) {
- elmdir = gnome_util_prepend_user_home (maildir);
- } else {
- elmdir = g_strdup (maildir);
- }
-
- g_free (maildir);
-
- mailexists = g_file_exists (elmdir);
- g_free (elmdir);
-
- aliasfile = gnome_util_prepend_user_home (".elm/aliases");
- aliasexists = g_file_exists (aliasfile);
- g_free (aliasfile);
-
- exists = (aliasexists || mailexists);
-
- return exists;
-}
-
-static void
-import_next (ElmImporter *importer)
-{
- ElmFolder *data;
-
- if (importer->dir_list) {
- char *folder;
-
- data = importer->dir_list->data;
-
- folder = g_concat_dir_and_file (data->parent, data->foldername);
- elm_import_file (importer, data->path, folder);
- g_free (folder);
- g_free (data->parent);
- g_free (data->path);
- g_free (data->foldername);
- g_free (data);
- importer->dir_list = importer->dir_list->next;
- }
-
- if (importer->db) {
- bonobo_object_release_unref (importer->db, NULL);
- }
- bonobo_object_release_unref (importer->importer, NULL);
- gtk_main_quit ();
-}
-
-static void
-scan_dir (ElmImporter *importer,
- const char *orig_parent,
- const char *dirname)
-{
- DIR *maildir;
- struct stat buf;
- struct dirent *current;
- char *str;
-
- maildir = opendir (dirname);
- if (maildir == NULL) {
- g_warning ("Could not open %s\nopendir returned: %s",
- dirname, g_strerror (errno));
- return;
- }
-
- str = g_strdup_printf (_("Scanning %s"), dirname);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
-
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- current = readdir (maildir);
- while (current) {
- ElmFolder *pf;
- char *fullname;
-
- /* Ignore . and .. */
- if (current->d_name[0] == '.') {
- if (current->d_name[1] == '\0' ||
- (current->d_name[1] == '.' && current->d_name[2] == '\0')) {
- current = readdir (maildir);
- continue;
- }
- }
-
- fullname = g_concat_dir_and_file (dirname, current->d_name);
- if (stat (fullname, &buf) == -1) {
- g_warning ("Could not stat %s\nstat returned: %s",
- fullname, g_strerror (errno));
- current = readdir (maildir);
- g_free (fullname);
- continue;
- }
-
- if (S_ISREG (buf.st_mode)) {
- pf = g_new (ElmFolder, 1);
- pf->path = g_strdup (fullname);
- pf->parent = g_strdup (orig_parent);
- pf->foldername = g_strdup (current->d_name);
- importer->dir_list = g_list_append (importer->dir_list, pf);
- } else if (S_ISDIR (buf.st_mode)) {
- char *subdir;
-
- pf = g_new (ElmFolder, 1);
- pf->path = NULL;
- pf->parent = g_strdup (orig_parent);
- pf->foldername = g_strdup (current->d_name);
- importer->dir_list = g_list_append (importer->dir_list, pf);
-
- subdir = g_concat_dir_and_file (orig_parent, current->d_name);
- scan_dir (importer, subdir, fullname);
- g_free (subdir);
- }
-
- g_free (fullname);
- current = readdir (maildir);
- }
-}
-
-static void
-elm_create_structure (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- CORBA_Environment ev;
- ElmImporter *importer = closure;
- char *maildir;
-
- /* Reference our object so when the shell release_unrefs us
- we will still exist and not go byebye */
- bonobo_object_ref (BONOBO_OBJECT (ii));
-
- elm_store_settings (importer);
-
- /* Create a dialog */
- importer->dialog = create_importer_gui (importer);
- gtk_widget_show_all (importer->dialog);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- if (importer->do_mail == TRUE) {
- char *elmdir;
-
- bonobo_config_set_boolean (importer->db,
- "/Importer/Elm/mail-imported", TRUE, NULL);
-
- maildir = elm_get_rc_value ("maildir");
- if (maildir == NULL) {
- maildir = g_strdup ("Mail");
- } else {
- maildir = g_strdup (maildir);
- }
-
- if (!g_path_is_absolute (maildir)) {
- elmdir = gnome_util_prepend_user_home (maildir);
- } else {
- elmdir = g_strdup (maildir);
- }
-
- g_free (maildir);
-
- scan_dir (importer, "/", maildir);
- g_free (maildir);
-
- /* Import them */
- import_next (importer);
- }
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->do_mail == FALSE) {
- bonobo_object_unref (BONOBO_OBJECT (ii));
- }
-}
-
-static void
-elm_destroy_cb (GtkObject *object,
- ElmImporter *importer)
-{
- CORBA_Environment ev;
-
- elm_store_settings (importer);
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->db != CORBA_OBJECT_NIL)
- bonobo_object_release_unref (importer->db, NULL);
- importer->db = CORBA_OBJECT_NIL;
- bonobo_object_release_unref (importer->importer, NULL);
-
- gtk_main_quit ();
-}
-
-/* Fun initialisation stuff */
-/* Fun control stuff */
-static void
-checkbox_toggle_cb (GtkToggleButton *tb,
- gboolean *do_item)
-{
- *do_item = gtk_toggle_button_get_active (tb);
-}
-
-static BonoboControl *
-create_checkboxes_control (ElmImporter *importer)
-{
- GtkWidget *hbox;
- BonoboControl *control;
-
- hbox = gtk_vbox_new (FALSE, 2);
-
- importer->mail = gtk_check_button_new_with_label (_("Mail"));
- gtk_signal_connect (GTK_OBJECT (importer->mail), "toggled",
- GTK_SIGNAL_FUNC (checkbox_toggle_cb),
- &importer->do_mail);
-
- gtk_box_pack_start (GTK_BOX (hbox), importer->mail, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
- control = bonobo_control_new (hbox);
- return control;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionIntelligentImporter *importer;
- BonoboControl *control;
- ElmImporter *elm;
- CORBA_Environment ev;
- char *message = N_("Evolution has found Elm mail files\n"
- "Would you like to import them into Evolution?");
-
- elm = g_new0 (ElmImporter, 1);
-
- CORBA_exception_init (&ev);
-
- elm->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || elm->db == CORBA_OBJECT_NIL) {
- g_free (elm);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- elm_restore_settings (elm);
-
- elm->importer = oaf_activate_from_id (MBOX_IMPORTER_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_free (elm);
- g_warning ("Could not start MBox importer\n%s",
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- importer = evolution_intelligent_importer_new (elm_can_import,
- elm_create_structure,
- _("Elm"),
- _(message), elm);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (elm_destroy_cb), elm);
-
- control = create_checkboxes_control (elm);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
- return BONOBO_OBJECT (importer);
-}
-
-/* Entry point */
-static void
-importer_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (ELM_INTELLIGENT_IMPORTER_IID,
- factory_fn, NULL);
- if (factory == NULL) {
- g_error ("Could not initialise Elm Intelligent Mail Importer.");
- exit (0);
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- bindtextdomain(PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(PACKAGE);
-
- gnome_init_with_popt_table ("Evolution-Elm-Importer",
- VERSION, 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 initialise Bonobo");
- exit (0);
- }
-
- importer_init ();
- bonobo_main ();
-
- return 0;
-}
diff --git a/importers/evolution-gnomecard-importer.c b/importers/evolution-gnomecard-importer.c
deleted file mode 100644
index 9a558ad783..0000000000
--- a/importers/evolution-gnomecard-importer.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-gnomecard-intelligent-importer.c
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <e-book.h>
-
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-#include <importer/evolution-importer-listener.h>
-
-#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_GnomeCard_Intelligent_ImporterFactory"
-#define VCARD_IMPORTER_IID "OAFIID:GNOME_Evolution_Addressbook_VCard_Importer"
-
-typedef struct {
- GNOME_Evolution_Importer importer;
- EvolutionImporterListener *listener;
-
- GtkWidget *addresses;
- gboolean do_addresses;
-
- Bonobo_ConfigDatabase db;
-} GnomeCardImporter;
-
-static void
-gnomecard_store_settings (GnomeCardImporter *importer)
-{
- bonobo_config_set_boolean (importer->db,
- "/Importer/Gnomecard/address",
- importer->do_addresses, NULL);
-}
-
-static void
-gnomecard_restore_settings (GnomeCardImporter *importer)
-{
- importer->do_addresses = bonobo_config_get_boolean_with_default (
- importer->db, "/Importer/Gnomecard/address", TRUE, NULL);
-}
-
-static gboolean
-gnomecard_can_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- GnomeCardImporter *importer = closure;
- char *gnomecard;
- gboolean result, address;
-
- address = bonobo_config_get_boolean_with_default (importer->db,
- "/Importer/Gnomecard/address-imported", FALSE, NULL);
-
- if (address == TRUE)
- return FALSE;
-
- gnomecard = gnome_util_home_file ("GnomeCard.gcrd");
- result = g_file_exists (gnomecard);
- g_free (gnomecard);
-
- return result;
-}
-
-static gboolean
-importer_timeout_fn (gpointer data)
-{
- GnomeCardImporter *gci = (GnomeCardImporter *) data;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (gci->listener));
- GNOME_Evolution_Importer_processItem (gci->importer, objref, &ev);
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-static void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- GnomeCardImporter *gci = (GnomeCardImporter *) data;
- CORBA_Environment ev;
-
- if (result == EVOLUTION_IMPORTER_NOT_READY ||
- result == EVOLUTION_IMPORTER_BUSY) {
- gtk_timeout_add (5000, importer_timeout_fn, data);
- return;
- }
-
- if (more_items) {
- g_idle_add_full (G_PRIORITY_LOW, importer_timeout_fn, data, NULL);
- return;
- }
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (gci->importer, &ev);
- bonobo_object_release_unref (gci->db, &ev);
- CORBA_exception_free (&ev);
-
- gtk_main_quit ();
-}
-
-static void
-gnomecard_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- CORBA_boolean result;
- GnomeCardImporter *gci = closure;
- CORBA_Object objref;
- CORBA_Environment ev;
- char *gnomecard;
-
- gnomecard = gnome_util_home_file ("GnomeCard.gcrd");
-
- /* Reference our object so when the shell release_unrefs us
- we will still exist and not go byebye */
- bonobo_object_ref (BONOBO_OBJECT (ii));
-
- gnomecard_store_settings (gci);
-
- if (gci->do_addresses == TRUE) {
-
- CORBA_exception_init (&ev);
- result = GNOME_Evolution_Importer_loadFile (gci->importer,
- gnomecard,
- "", &ev);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s",
- CORBA_exception_id (&ev));
- CORBA_Object_release (gci->importer, &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- gci->listener = evolution_importer_listener_new (importer_cb,
- gci);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (gci->listener));
- GNOME_Evolution_Importer_processItem (gci->importer, objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- return;
- }
-
- CORBA_exception_free (&ev);
-
- return;
- } else {
- bonobo_object_unref (BONOBO_OBJECT (ii));
- return;
- }
-}
-
-static void
-gnomecard_destroy_cb (GtkObject *object,
- GnomeCardImporter *importer)
-{
- CORBA_Environment ev;
-
- /* save the state of the checkboxes */
- g_print ("\n---------Settings-------\n");
- g_print ("Addressbook - %s\n", importer->do_addresses? "Yes" : "No");
-
- gnomecard_store_settings (importer);
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->importer != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->importer, NULL);
- }
-
- if (importer->db != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->db, NULL);
- }
- importer->db = CORBA_OBJECT_NIL;
-
- gtk_main_quit ();
-}
-
-/* Fun with aggregation */
-static void
-checkbox_toggle_cb (GtkToggleButton *tb,
- gboolean *do_item)
-{
- *do_item = gtk_toggle_button_get_active (tb);
-}
-
-static BonoboControl *
-create_checkboxes_control (GnomeCardImporter *importer)
-{
- GtkWidget *label, *hbox;
- BonoboControl *control;
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- label = gtk_label_new (_("GnomeCard:"));
- importer->addresses = gtk_check_button_new_with_label (_("Addressbook"));
- gtk_signal_connect (GTK_OBJECT (importer->addresses), "toggled",
- GTK_SIGNAL_FUNC (checkbox_toggle_cb),
- &importer->do_addresses);
-
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), importer->addresses, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
- control = bonobo_control_new (hbox);
- return control;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionIntelligentImporter *importer;
- GnomeCardImporter *gci;
- char *message = N_("Evolution has found GnomeCard files.\n"
- "Would you like them to be imported into Evolution?");
- CORBA_Environment ev;
- BonoboControl *control;
-
- gci = g_new (GnomeCardImporter, 1);
-
- CORBA_exception_init (&ev);
-
- gci->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || gci->db == CORBA_OBJECT_NIL) {
- g_free (gci);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- gnomecard_restore_settings (gci);
-
- gci->importer = oaf_activate_from_id (VCARD_IMPORTER_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Could not start VCard importer: %s",
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- importer = evolution_intelligent_importer_new (gnomecard_can_import,
- gnomecard_import,
- "GnomeCard",
- _(message), gci);
-
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (gnomecard_destroy_cb), gci);
-
- control = create_checkboxes_control (gci);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
-
- return BONOBO_OBJECT (importer);
-}
-
-static void
-importer_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID,
- factory_fn, NULL);
- if (factory == NULL) {
- g_error ("Unable to create factory");
- exit (0);
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- bindtextdomain(PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(PACKAGE);
-
- gnome_init_with_popt_table ("Evolution-GnomeCard-Intelligent-Importer",
- VERSION, 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.");
- exit (0);
- }
-
- importer_init ();
- bonobo_main ();
-
- return 0;
-}
-
-
diff --git a/importers/netscape-importer.c b/importers/netscape-importer.c
deleted file mode 100644
index 79fa5edfaf..0000000000
--- a/importers/netscape-importer.c
+++ /dev/null
@@ -1,1075 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* netscape-importer.c
- *
- * Authors:
- * Iain Holmes <iain@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 Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <pwd.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <dirent.h>
-
-#include <glib.h>
-#include <gnome.h>
-
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-#include <importer/evolution-importer-client.h>
-
-#include "Mail.h"
-
-static char *nsmail_dir = NULL;
-static GHashTable *user_prefs = NULL;
-
-#define FACTORY_IID "OAFIID:GNOME_Evolution_Netscape_Intelligent_Importer_Factory"
-#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer"
-#define MAIL_CONFIG_IID "OAFIID:GNOME_Evolution_MailConfig"
-
-#define KEY "netscape-mail-imported"
-
-/*#define SUPER_IMPORTER_DEBUG*/
-#ifdef SUPER_IMPORTER_DEBUG
-#define d(x) x
-#else
-#define d(x)
-#endif
-
-typedef struct {
- GList *dir_list;
-
- int num;
-
- GNOME_Evolution_Importer importer;
- EvolutionImporterListener *listener;
-
- /* Checkboxes */
- GtkWidget *mail;
- gboolean do_mail;
-/*
- GtkWidget *addrs;
- gboolean do_addrs;
- GtkWidget *filters;
- gboolean do_filters;
-*/
- GtkWidget *settings;
- gboolean do_settings;
-
- Bonobo_ConfigDatabase db;
-
- /* GUI */
- GtkWidget *dialog;
- GtkWidget *label;
- GtkWidget *progressbar;
-} NetscapeImporter;
-
-static void import_next (NetscapeImporter *importer);
-
-static GtkWidget *
-create_importer_gui (NetscapeImporter *importer)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("Evolution is importing your old Netscape data"), GNOME_MESSAGE_BOX_INFO, NULL);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Importing..."));
-
- importer->label = gtk_label_new (_("Please wait"));
- importer->progressbar = gtk_progress_bar_new ();
- gtk_progress_set_activity_mode (GTK_PROGRESS (importer->progressbar), TRUE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- importer->label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- importer->progressbar, FALSE, FALSE, 0);
-
- return dialog;
-}
-
-static void
-netscape_store_settings (NetscapeImporter *importer)
-{
- bonobo_config_set_boolean (importer->db, "/Importer/Netscape/mail",
- importer->do_mail, NULL);
- bonobo_config_set_boolean (importer->db, "/Importer/Netscape/settings",
- importer->do_settings, NULL);
-}
-
-static void
-netscape_restore_settings (NetscapeImporter *importer)
-{
- importer->do_mail = bonobo_config_get_boolean_with_default (
- importer->db, "/Importer/Netscape/mail", TRUE, NULL);
-
- importer->do_settings = bonobo_config_get_boolean_with_default (
- importer->db, "/Importer/Netscape/settings", TRUE, NULL);
-}
-
-static const char *
-netscape_get_string (const char *strname)
-{
- return g_hash_table_lookup (user_prefs, strname);
-}
-
-static int
-netscape_get_integer (const char *strname)
-{
- char *intstr;
-
- intstr = g_hash_table_lookup (user_prefs, strname);
- if (intstr == NULL) {
- return 0;
- } else {
- return atoi (intstr);
- }
-}
-
-static gboolean
-netscape_get_boolean (const char *strname)
-{
- char *boolstr;
-
- boolstr = g_hash_table_lookup (user_prefs, strname);
-
- if (boolstr == NULL) {
- return FALSE;
- } else {
- if (strcasecmp (boolstr, "false") == 0) {
- return FALSE;
- } else if (strcasecmp (boolstr, "true") == 0) {
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static char *
-netscape_get_key (const char *line)
-{
- char *line_dup;
- char *start, *end;
- char *key;
-
- line_dup = g_strdup (line);
- start = strchr (line_dup, '\"');
- if (start == NULL)
- goto die;
- start++;
- if (*start == '\0')
- goto die;
-
- end = strchr (start, '\"');
- if (end == NULL)
- goto die;
- *end = '\0';
-
- key = g_strdup (start);
- g_free (line_dup);
-
- d(g_warning ("Found key: %s", key));
- return key;
-
- die:
- g_free (line_dup);
- g_warning ("Broken line: %s", line);
- return NULL;
-}
-
-static char *
-netscape_get_value (const char *line)
-{
- char *line_dup;
- char *start, *end;
- char *value;
-
- line_dup = g_strdup (line);
- start = strchr (line_dup, ',');
- if (start == NULL)
- goto die;
- start++;
- if (*start == '\0')
- goto die;
-
- if (*start == ' ')
- start++;
- if (*start == '\0')
- goto die;
-
- if (*start == '\"')
- start++;
- if (*start == '\0')
- goto die;
-
- /* Start should now be the start of the value */
- end = strrchr (start, ')');
- if (end == NULL)
- goto die;
- *end = '\0';
- if (*(end - 1) == '\"')
- *(end - 1) = '\0';
-
- if (start == (end - 1)) {
- g_free (line_dup);
- return NULL;
- }
-
- value = g_strdup (start);
- g_free (line_dup);
-
- d(g_warning ("Found value: %s", value));
- return value;
-
- die:
- g_free (line_dup);
- g_warning ("Broken line: %s", line);
- return NULL;
-}
-
-static void
-netscape_init_prefs (void)
-{
- FILE *prefs_handle;
- char *nsprefs;
- char line[4096];
-
- user_prefs = g_hash_table_new (g_str_hash, g_str_equal);
-
- nsprefs = gnome_util_prepend_user_home (".netscape/preferences.js");
- prefs_handle = fopen (nsprefs, "r");
- g_free (nsprefs);
-
- if (prefs_handle == NULL) {
- d(g_warning ("No .netscape/preferences.js"));
- g_hash_table_destroy (user_prefs);
- user_prefs = NULL;
- return;
- }
-
- /* Find the user mail dir */
- while (fgets (line, 4096, prefs_handle)) {
- char *key, *value;
-
- if (*line == 0) {
- continue;
- }
-
- if (*line == '/' && line[1] == '/') {
- continue;
- }
-
- key = netscape_get_key (line);
- value = netscape_get_value (line);
-
- if (key == NULL)
- continue;
-
- g_hash_table_insert (user_prefs, key, value);
- }
-
- return;
-}
-
-static char *
-get_user_fullname (void)
-{
- char *uname, *gecos, *special;
- struct passwd *pwd;
-
- uname = getenv ("USER");
- pwd = getpwnam (uname);
-
- if (strcmp (pwd->pw_gecos, "") == 0) {
- return g_strdup (uname);
- }
-
- special = strchr (pwd->pw_gecos, ',');
- if (special == NULL) {
- gecos = g_strdup (pwd->pw_gecos);
- } else {
- gecos = g_strndup (pwd->pw_gecos, special - pwd->pw_gecos);
- }
-
- special = strchr (gecos, '&');
- if (special == NULL) {
- return gecos;
- } else {
- char *capname, *expanded, *noamp;
-
- capname = g_strdup (uname);
- capname[0] = toupper ((int) capname[0]);
- noamp = g_strndup (gecos, special - gecos - 1);
- expanded = g_strconcat (noamp, capname, NULL);
-
- g_free (noamp);
- g_free (capname);
- g_free (gecos);
-
- return expanded;
- }
-}
-
-static void
-netscape_import_accounts (NetscapeImporter *importer)
-{
- char *username;
- const char *nstr;
- const char *imap;
- GNOME_Evolution_MailConfig_Account account;
- GNOME_Evolution_MailConfig_Service source, transport;
- GNOME_Evolution_MailConfig_Identity id;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- if (user_prefs == NULL) {
- netscape_init_prefs ();
- if (user_prefs == NULL)
- return;
- }
-
- CORBA_exception_init (&ev);
- objref = oaf_activate_from_id (MAIL_CONFIG_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error starting mail config");
- CORBA_exception_free (&ev);
- return;
- }
-
- if (objref == CORBA_OBJECT_NIL) {
- g_warning ("Error activating mail config");
- return;
- }
-
- /* Create identify structure */
- nstr = netscape_get_string ("mail.identity.username");
- if (nstr != NULL) {
- username = g_strdup (nstr);
- } else {
- username = get_user_fullname ();
- }
-
- id.name = CORBA_string_dup (username);
- nstr = netscape_get_string ("mail.identity.useremail");
- id.address = CORBA_string_dup (nstr ? nstr : "");
- nstr = netscape_get_string ("mail.identity.organization");
- id.organization = CORBA_string_dup (nstr ? nstr : "");
- nstr = netscape_get_string ("mail.signature_file");
- id.signature = CORBA_string_dup (nstr ? nstr : "");
- id.html_signature = CORBA_string_dup ("");
- id.has_html_signature = FALSE;
-
- /* Create transport */
- nstr = netscape_get_string ("network.hosts.smtp_server");
- if (nstr != NULL) {
- char *url;
- const char *nstr2;
-
- nstr2 = netscape_get_string ("mail.smtp_name");
- if (nstr2) {
- url = g_strconcat ("smtp://", nstr2, "@", nstr, NULL);
- } else {
- url = g_strconcat ("smtp://", nstr, NULL);
- }
- transport.url = CORBA_string_dup (url);
- transport.keep_on_server = FALSE;
- transport.auto_check = FALSE;
- transport.auto_check_time = 10;
- transport.save_passwd = FALSE;
- transport.enabled = TRUE;
- g_free (url);
- } else {
- transport.url = CORBA_string_dup ("");
- transport.keep_on_server = FALSE;
- transport.auto_check = FALSE;
- transport.auto_check_time = 0;
- transport.save_passwd = FALSE;
- transport.enabled = FALSE;
- }
-
- /* Create account */
- account.name = CORBA_string_dup (username);
- account.id = id;
- account.transport = transport;
-
- account.drafts_folder_name = CORBA_string_dup ("");
- account.drafts_folder_uri = CORBA_string_dup ("");
- account.sent_folder_name = CORBA_string_dup ("");
- account.sent_folder_uri = CORBA_string_dup ("");
-
- /* Create POP3 source */
- nstr = netscape_get_string ("network.hosts.pop_server");
- if (nstr != NULL && *nstr != 0) {
- char *url;
- gboolean bool;
- const char *nstr2;
-
- nstr2 = netscape_get_string ("mail.pop_name");
- if (nstr2) {
- url = g_strconcat ("pop://", nstr2, "@", nstr, NULL);
- } else {
- url = g_strconcat ("pop://", nstr, NULL);
- }
- source.url = CORBA_string_dup (url);
- bool = netscape_get_boolean ("mail.leave_on_server");
- g_warning ("mail.leave_on_server: %s", bool ? "true" : "false");
- source.keep_on_server = netscape_get_boolean ("mail.leave_on_server");
- source.auto_check = TRUE;
- source.auto_check_time = 10;
- bool = netscape_get_boolean ("mail.remember_password");
- g_warning ("mail.remember_password: %s", bool ? "true" : "false");
- source.save_passwd = netscape_get_boolean ("mail.remember_password");
- source.enabled = TRUE;
- g_free (url);
- } else {
- /* Are there IMAP accounts? */
- imap = netscape_get_string ("network.hosts.imap_servers");
- if (imap != NULL) {
- char **servers;
- int i;
-
- servers = g_strsplit (imap, ",", 1024);
- for (i = 0; servers[i] != NULL; i++) {
- GNOME_Evolution_MailConfig_Service imapsource;
- char *serverstr, *name, *url;
- const char *username;
-
- /* Create a server for each of these */
- serverstr = g_strdup_printf ("mail.imap.server.%s.", servers[i]);
- name = g_strconcat (serverstr, "userName", NULL);
- username = netscape_get_string (name);
- g_free (name);
-
- if (username)
- url = g_strconcat ("imap://", username,
- "@", servers[i], NULL);
- else
- url = g_strconcat ("imap://", servers[i], NULL);
-
- imapsource.url = CORBA_string_dup (url);
-
- imapsource.keep_on_server = netscape_get_boolean ("mail.leave_on_server");
-
- name = g_strconcat (serverstr, "check_new_mail", NULL);
- imapsource.auto_check = netscape_get_boolean (name);
- g_free (name);
-
- name = g_strconcat (serverstr, "check_time", NULL);
- imapsource.auto_check_time = netscape_get_integer (name);
- g_free (name);
-
- name = g_strconcat (serverstr, "remember_password", NULL);
- imapsource.save_passwd = netscape_get_boolean (name);
- g_free (name);
- imapsource.enabled = TRUE;
-
- account.source = imapsource;
-
- GNOME_Evolution_MailConfig_addAccount (objref, &account, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error setting account: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- g_free (url);
- g_free (serverstr);
- }
-
- CORBA_exception_free (&ev);
- g_strfreev (servers);
- return;
- } else {
- char *url, *path;
-
- /* Using Movemail */
- path = getenv ("MAIL");
- url = g_strconcat ("mbox://", path, NULL);
- source.url = CORBA_string_dup (url);
- g_free (url);
-
- source.keep_on_server = netscape_get_boolean ("mail.leave_on_server");
- source.auto_check = TRUE;
- source.auto_check_time = 10;
- source.save_passwd = netscape_get_boolean ("mail.remember_password");
- source.enabled = FALSE;
- }
- }
- account.source = source;
-
- GNOME_Evolution_MailConfig_addAccount (objref, &account, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Error setting account: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- g_free (username);
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-is_dir_empty (const char *path)
-{
- DIR *base;
- struct stat buf;
- struct dirent *contents;
-
- base = opendir (path);
- if (base == NULL) {
- return TRUE; /* Can't open dir */
- }
-
- contents = readdir (base);
- while (contents != NULL) {
- char *fullpath;
-
- if (strcmp (contents->d_name, ".") == 0 ||
- strcmp (contents->d_name, "..") == 0) {
- contents = readdir (base);
- continue;
- }
-
- fullpath = g_concat_dir_and_file (path, contents->d_name);
- stat (fullpath, &buf);
- if (S_ISDIR (buf.st_mode)) {
- gboolean sub;
-
- sub = is_dir_empty (fullpath);
- if (sub == FALSE) {
- g_free (fullpath);
- closedir (base);
- return FALSE;
- }
- } else {
- /* File */
- if (buf.st_size != 0) {
- g_free (fullpath);
- closedir (base);
- return FALSE;
- }
- }
-
- g_free (fullpath);
- contents = readdir (base);
- }
-
- closedir (base);
- return TRUE;
-}
-
-static gboolean
-netscape_can_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- NetscapeImporter *importer = closure;
- gboolean mail, settings;
-
- mail = bonobo_config_get_boolean_with_default (importer->db,
- "/Importer/Netscape/mail-imported", FALSE, NULL);
- settings = bonobo_config_get_boolean_with_default (importer->db,
- "/Importer/Netscape/settings-imported", FALSE, NULL);
-
- if (settings && mail)
- return FALSE;
-
- importer->do_mail = !mail;
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (importer->mail),
- importer->do_mail);
- importer->do_settings = !settings;
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (importer->settings),
- importer->do_settings);
-
- if (user_prefs == NULL) {
- netscape_init_prefs ();
- }
-
- if (user_prefs == NULL) {
- d(g_warning ("No netscape dir"));
- return FALSE;
- }
-
- nsmail_dir = g_hash_table_lookup (user_prefs, "mail.directory");
- if (nsmail_dir == NULL) {
- return FALSE;
- } else {
- return !is_dir_empty (nsmail_dir);
- }
-}
-
-static gboolean
-importer_timeout_fn (gpointer data)
-{
- NetscapeImporter *importer = (NetscapeImporter *) data;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-static void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- NetscapeImporter *importer = (NetscapeImporter *) data;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- if (result == EVOLUTION_IMPORTER_NOT_READY ||
- result == EVOLUTION_IMPORTER_BUSY) {
- gtk_timeout_add (5000, importer_timeout_fn, data);
- return;
- }
-
- if (more_items) {
- GtkAdjustment *adj;
- float newval;
-
- adj = GTK_PROGRESS (importer->progressbar)->adjustment;
- newval = adj->value + 1;
- if (newval > adj->upper) {
- newval = adj->lower;
- }
-
- gtk_progress_set_value (GTK_PROGRESS (importer->progressbar), newval);
- CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer,
- objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
- return;
- }
-
- if (importer->dir_list) {
- import_next (importer);
- } else {
- gtk_main_quit ();
- }
-}
-
-static gboolean
-netscape_import_file (NetscapeImporter *importer,
- const char *path,
- const char *folderpath)
-{
- CORBA_boolean result;
- CORBA_Environment ev;
- CORBA_Object objref;
- char *str;
-
- /* Do import */
- d(g_warning ("Importing %s as %s\n", path, folderpath));
-
- CORBA_exception_init (&ev);
-
- str = g_strdup_printf (_("Importing %s as %s"), path, folderpath);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- result = GNOME_Evolution_Importer_loadFile (importer->importer, path,
- folderpath, &ev);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s", CORBA_exception_id (&ev));
- CORBA_Object_release (importer->importer, &ev);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- importer->listener = evolution_importer_listener_new (importer_cb,
- importer);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- d(g_print ("%s:Processing...\n", __FUNCTION__));
- CORBA_exception_init (&ev);
- GNOME_Evolution_Importer_processItem (importer->importer,
- objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return FALSE;
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-typedef struct {
- NetscapeImporter *importer;
- char *parent;
- char *path;
- char *foldername;
-} NetscapeCreateDirectoryData;
-
-static void
-import_next (NetscapeImporter *importer)
-{
- NetscapeCreateDirectoryData *data;
-
- if (importer->dir_list) {
- char *folder;
-
- /* Do the next in the list */
- data = importer->dir_list->data;
-
- folder = g_concat_dir_and_file (data->parent, data->foldername);
- netscape_import_file (importer, data->path, folder);
- g_free (folder);
- g_free (data->parent);
- g_free (data->path);
- g_free (data->foldername);
- g_free (data);
- importer->dir_list = importer->dir_list->next;
- }
-}
-
-static char *
-maybe_replace_name (const char *original_name)
-{
- if (strcmp (original_name, "Trash") == 0) {
- return g_strdup ("Netscape-Trash"); /* Trash is an invalid name */
- } else if (strcmp (original_name, "Unsent Messages") == 0) {
- return g_strdup ("Outbox");
- }
-
- return g_strdup (original_name);
-}
-
-/* This function basically flattens the tree structure.
- It makes a list of all the directories that are to be imported. */
-static void
-scan_dir (NetscapeImporter *importer,
- const char *orig_parent,
- const char *dirname)
-{
- DIR *nsmail;
- struct stat buf;
- struct dirent *current;
- char *str;
-
- nsmail = opendir (dirname);
- if (nsmail == NULL) {
- d(g_warning ("Could not open %s\nopendir returned: %s",
- dirname, g_strerror (errno)));
- return;
- }
-
- str = g_strdup_printf (_("Scanning %s"), dirname);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
-
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- current = readdir (nsmail);
- while (current) {
- char *fullname, *foldername;
-
- /* Ignore things which start with .
- which should be ., .., and the summaries. */
- if (current->d_name[0] =='.') {
- current = readdir (nsmail);
- continue;
- }
-
- if (*orig_parent == '/') {
- foldername = maybe_replace_name (current->d_name);
- } else {
- foldername = g_strdup (current->d_name);
- }
-
- fullname = g_concat_dir_and_file (dirname, current->d_name);
- if (stat (fullname, &buf) == -1) {
- d(g_warning ("Could not stat %s\nstat returned:%s",
- fullname, g_strerror (errno)));
- current = readdir (nsmail);
- g_free (fullname);
- continue;
- }
-
- if (S_ISREG (buf.st_mode)) {
- char *sbd, *parent;
- NetscapeCreateDirectoryData *data;
-
- d(g_print ("File: %s\n", fullname));
-
- data = g_new0 (NetscapeCreateDirectoryData, 1);
- data->importer = importer;
- data->parent = g_strdup (orig_parent);
- data->path = g_strdup (fullname);
- data->foldername = g_strdup (foldername);
-
- importer->dir_list = g_list_append (importer->dir_list,
- data);
-
-
- parent = g_concat_dir_and_file (orig_parent,
- data->foldername);
-
- /* Check if a .sbd folder exists */
- sbd = g_strconcat (fullname, ".sbd", NULL);
- if (g_file_exists (sbd)) {
- scan_dir (importer, parent, sbd);
- }
-
- g_free (parent);
- g_free (sbd);
- }
-
- g_free (fullname);
- g_free (foldername);
- current = readdir (nsmail);
- }
-}
-
-static void
-netscape_create_structure (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- CORBA_Environment ev;
- NetscapeImporter *importer = closure;
-
- g_return_if_fail (nsmail_dir != NULL);
-
- /* Reference our object so when the shell release_unrefs us
- we will still exist and not go byebye */
- bonobo_object_ref (BONOBO_OBJECT (ii));
-
- netscape_store_settings (importer);
-
- /* Create a dialog */
- importer->dialog = create_importer_gui (importer);
- gtk_widget_show_all (importer->dialog);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- if (importer->do_settings == TRUE) {
- bonobo_config_set_boolean (importer->db,
- "/Importer/Netscape/settings-imported", TRUE, NULL);
- netscape_import_accounts (importer);
- }
-
- if (importer->do_mail == TRUE) {
- bonobo_config_set_boolean (importer->db,
- "/Importer/Netscape/mail-imported", TRUE, NULL);
- /* Scan the nsmail folder and find out what folders
- need to be imported */
- gtk_label_set_text (GTK_LABEL (importer->label),
- _("Scanning directory"));
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- scan_dir (importer, "/", nsmail_dir);
-
- /* Import them */
- gtk_label_set_text (GTK_LABEL (importer->label),
- _("Starting import"));
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
- import_next (importer);
- }
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->do_mail == FALSE) {
- /* Destroy it here if we weren't importing mail
- otherwise the mail importer destroys itself
- once the mail in imported */
- bonobo_object_unref (BONOBO_OBJECT (ii));
- }
-}
-
-static void
-netscape_destroy_cb (GtkObject *object,
- NetscapeImporter *importer)
-{
- CORBA_Environment ev;
-
- netscape_store_settings (importer);
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->db != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->db, NULL);
- }
- importer->db = CORBA_OBJECT_NIL;
-
- if (importer->importer != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->importer, NULL);
- }
-
- gtk_main_quit ();
-}
-
-/* Fun initialisation stuff */
-
-/* Fun with aggregation */
-static void
-checkbox_toggle_cb (GtkToggleButton *tb,
- gboolean *do_item)
-{
- *do_item = gtk_toggle_button_get_active (tb);
-}
-
-static BonoboControl *
-create_checkboxes_control (NetscapeImporter *importer)
-{
- GtkWidget *hbox;
- BonoboControl *control;
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- importer->mail = gtk_check_button_new_with_label (_("Mail"));
- gtk_signal_connect (GTK_OBJECT (importer->mail), "toggled",
- GTK_SIGNAL_FUNC (checkbox_toggle_cb),
- &importer->do_mail);
-
- importer->settings = gtk_check_button_new_with_label (_("Settings"));
- gtk_signal_connect (GTK_OBJECT (importer->settings), "toggled",
- GTK_SIGNAL_FUNC (checkbox_toggle_cb),
- &importer->do_settings);
-
- gtk_box_pack_start (GTK_BOX (hbox), importer->mail, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), importer->settings, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
- control = bonobo_control_new (hbox);
- return control;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionIntelligentImporter *importer;
- BonoboControl *control;
- NetscapeImporter *netscape;
- CORBA_Environment ev;
- char *message = N_("Evolution has found Netscape mail files.\n"
- "Would you like them to be imported into Evolution?");
-
- netscape = g_new0 (NetscapeImporter, 1);
-
- CORBA_exception_init (&ev);
-
- netscape->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase",
- &ev);
-
- if (BONOBO_EX (&ev) || netscape->db == CORBA_OBJECT_NIL) {
- g_free (netscape);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- netscape_restore_settings (netscape);
-
- netscape->importer = oaf_activate_from_id (MBOX_IMPORTER_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Could not start MBox importer\n%s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- importer = evolution_intelligent_importer_new (netscape_can_import,
- netscape_create_structure,
- "Netscape",
- _(message), netscape);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (netscape_destroy_cb), netscape);
-
- control = create_checkboxes_control (netscape);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
- return BONOBO_OBJECT (importer);
-}
-
-static void
-importer_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (FACTORY_IID, factory_fn, NULL);
- if (factory == NULL) {
- g_error ("Unable to create factory");
- exit (0);
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- bindtextdomain(PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(PACKAGE);
-
- gnome_init_with_popt_table ("Evolution-Netscape-Importer",
- VERSION, 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 initialise Bonobo");
- exit (0);
- }
-
- importer_init ();
- bonobo_main ();
-
- return 0;
-}
diff --git a/importers/pine-importer.c b/importers/pine-importer.c
deleted file mode 100644
index cb422b360c..0000000000
--- a/importers/pine-importer.c
+++ /dev/null
@@ -1,771 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* pine-importer.c
- *
- * Authors:
- * Iain Holmes <iain@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 Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <ctype.h>
-
-#include <glib.h>
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <importer/evolution-intelligent-importer.h>
-#include <importer/evolution-importer-client.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include <e-book.h>
-#include <e-card-simple.h>
-
-#define PINE_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Pine_Intelligent_Importer_Factory"
-#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_Importer"
-#define KEY "pine-mail-imported"
-
-/*#define SUPER_IMPORTER_DEBUG*/
-#ifdef SUPER_IMPORTER_DEBUG
-#define d(x) x
-#else
-#define d(x)
-#endif
-
-typedef struct {
- GList *dir_list;
-
- GNOME_Evolution_Importer importer;
- EvolutionImporterListener *listener;
-
- GtkWidget *mail;
- gboolean do_mail;
- GtkWidget *address;
- gboolean do_address;
-
- EBook *book;
-
- Bonobo_ConfigDatabase db;
-
- /* GUI */
- GtkWidget *dialog;
- GtkWidget *label;
- GtkWidget *progressbar;
-} PineImporter;
-
-typedef struct {
- char *parent;
- char *foldername;
- char *path;
- gboolean folder;
-} PineFolder;
-
-static void import_next (PineImporter *importer);
-
-static GtkWidget *
-create_importer_gui (PineImporter *importer)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("Evolution is importing your old Pine data"), GNOME_MESSAGE_BOX_INFO, NULL);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Importing..."));
-
- importer->label = gtk_label_new (_("Please wait"));
- importer->progressbar = gtk_progress_bar_new ();
- gtk_progress_set_activity_mode (GTK_PROGRESS (importer->progressbar), TRUE);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- importer->label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- importer->progressbar, FALSE, FALSE, 0);
- return dialog;
-}
-
-static void
-pine_store_settings (PineImporter *importer)
-{
- bonobo_config_set_boolean (importer->db, "/Importer/Pine/mail",
- importer->do_mail, NULL);
- bonobo_config_set_boolean (importer->db, "/Importer/Pine/address",
- importer->do_address, NULL);
-}
-
-static void
-pine_restore_settings (PineImporter *importer)
-{
- importer->do_mail = bonobo_config_get_boolean_with_default (
- importer->db, "/Importer/Pine/mail", TRUE, NULL);
-
- importer->do_address = bonobo_config_get_boolean_with_default (
- importer->db, "/Importer/Pine/address", TRUE, NULL);
-
-}
-
-/* A very basic address spliter.
- Returns the first email address
- denoted by <address> */
-static char *
-parse_address (const char *address)
-{
- char *addr_dup, *result, *start, *end;
-
- if (address == NULL) {
- return NULL;
- }
-
- addr_dup = g_strdup (address);
- start = strchr (addr_dup, '<');
- if (start == NULL) {
- /* Whole line is an address */
- return addr_dup;
- }
-
- start += 1;
- end = strchr (start, '>');
- if (end == NULL) {
- result = g_strdup (start);
- g_free (addr_dup);
-
- return result;
- }
-
- *end = 0;
- result = strdup (start);
- g_free (addr_dup);
-
- return result;
-}
-
-static void
-add_card_cb (EBook *book,
- EBookStatus status,
- const char *id,
- gpointer closure)
-{
- gtk_object_unref (GTK_OBJECT (closure));
-}
-
-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
-import_addressfile (EBook *book,
- EBookStatus status,
- gpointer user_data)
-{
- char *addressbook;
- FILE *handle;
- char line[2 * 1024];
- int which = 0;
- char *lastline = NULL;
- PineImporter *importer = user_data;
-
- addressbook = gnome_util_prepend_user_home (".addressbook");
- handle = fopen (addressbook, "r");
- g_free (addressbook);
-
- if (handle == NULL) {
- g_warning ("Cannot open .addressbook");
- return;
- }
-
- while (fgets (line + which * 1024, 1024, handle)) {
- int length;
- char *thisline = line + which * 1024;
-
- length = strlen (thisline);
- if (thisline[length - 1] == '\n') {
- line[--length] = 0;
- }
-
- if (lastline && *thisline && isspace ((int) *thisline)) {
- char *temp;
-
- while (*thisline && isspace ((int) *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);
- }
-
- fclose (handle);
- if (importer->do_mail == FALSE) {
- if (importer->db != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->db, NULL);
- }
- gtk_main_quit ();
- }
-}
-
-static void
-import_addressbook (PineImporter *importer)
-{
- char *path, *uri;
-
- importer->book = e_book_new ();
- if (importer->book == NULL) {
- g_warning ("Could not create EBook.");
- 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 (importer->book, uri, import_addressfile, importer)) {
- g_warning ("Error calling load_uri");
- }
- g_free (uri);
-}
-
-static gboolean
-importer_timeout_fn (gpointer data)
-{
- PineImporter *importer = (PineImporter *) data;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- CORBA_exception_free (&ev);
-
- return FALSE;
-}
-
-static void
-importer_cb (EvolutionImporterListener *listener,
- EvolutionImporterResult result,
- gboolean more_items,
- void *data)
-{
- PineImporter *importer = (PineImporter *) data;
- CORBA_Object objref;
- CORBA_Environment ev;
-
- if (result == EVOLUTION_IMPORTER_NOT_READY ||
- result == EVOLUTION_IMPORTER_BUSY) {
- gtk_timeout_add (5000, importer_timeout_fn, data);
- return;
- }
-
- if (more_items) {
- GtkAdjustment *adj;
- float newval;
-
- adj = GTK_PROGRESS (importer->progressbar)->adjustment;
- newval = adj->value + 1;
- if (newval > adj->upper) {
- newval = adj->lower;
- }
-
- gtk_progress_set_value (GTK_PROGRESS (importer->progressbar), newval);
- CORBA_exception_init (&ev);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer,
- objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
- return;
- }
-
- if (importer->dir_list) {
- import_next (importer);
- } else {
- bonobo_object_release_unref (importer->importer, NULL);
- if (importer->db != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->db, NULL);
- }
- gtk_main_quit ();
- }
-}
-
-static gboolean
-pine_import_file (PineImporter *importer,
- const char *path,
- const char *folderpath,
- gboolean folder)
-{
- CORBA_boolean result;
- CORBA_Environment ev;
- CORBA_Object objref;
- char *str;
-
- CORBA_exception_init (&ev);
-
- str = g_strdup_printf (_("Importing %s as %s"), path, folderpath);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
- result = GNOME_Evolution_Importer_loadFile (importer->importer, path,
- folderpath, &ev);
- if (ev._major != CORBA_NO_EXCEPTION || result == FALSE) {
- g_warning ("Exception here: %s\n%s, %s", CORBA_exception_id (&ev), path, folderpath);
- CORBA_Object_release (importer->importer, &ev);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- if (folder == TRUE) {
- return FALSE;
- }
-
- importer->listener = evolution_importer_listener_new (importer_cb,
- importer);
- objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
- GNOME_Evolution_Importer_processItem (importer->importer, objref, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception: %s", CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-static gboolean
-pine_can_import (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- PineImporter *importer = closure;
- char *maildir, *addrfile;
- gboolean mail;
- gboolean md_exists, addr_exists;
-
- /* Already imported */
-
- mail = bonobo_config_get_boolean_with_default (importer->db,
- "/Importer/Pine/mail-imported", FALSE, NULL);
-
- if (mail)
- return FALSE;
-
- importer->do_mail = !mail;
-
- maildir = gnome_util_prepend_user_home ("mail");
- md_exists = g_file_exists (maildir);
- importer->do_mail = md_exists;
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (importer->mail),
- importer->do_mail);
-
- gtk_widget_set_sensitive (importer->mail, md_exists);
- g_free (maildir);
-
- addrfile = gnome_util_prepend_user_home (".addressbook");
- addr_exists = g_file_exists (addrfile);
- g_free (addrfile);
- gtk_widget_set_sensitive (importer->address, addr_exists);
-
- return md_exists || addr_exists;
-}
-
-static void
-import_next (PineImporter *importer)
-{
- PineFolder *data;
-
- if (importer->dir_list) {
- char *folder;
-
- data = importer->dir_list->data;
-
- folder = g_concat_dir_and_file (data->parent, data->foldername);
-#if 0
- while (pine_import_file (importer, data->path, folder, data->folder) == FALSE) {
- g_free (folder);
- g_free (data->parent);
- g_free (data->path);
- g_free (data->foldername);
- g_free (data);
- importer->dir_list = importer->dir_list->next;
-
- if (importer->dir_list == NULL) {
- break;
- }
-
- data = importer->dir_list->data;
- folder = g_concat_dir_and_file (data->parent, data->foldername);
- }
-#endif
- pine_import_file (importer, data->path, folder, data->folder);
- g_free (folder);
- g_free (data->parent);
- g_free (data->path);
- g_free (data->foldername);
- g_free (data);
- importer->dir_list = importer->dir_list->next;
- }
-
-}
-
-/* Pine uses sent-mail and saved-mail whereas Evolution uses Sent and Drafts */
-static char *
-maybe_replace_name (const char *original_name)
-{
- if (strcmp (original_name, "sent-mail") == 0) {
- return g_strdup ("Sent");
- } else if (strcmp (original_name, "saved-messages") == 0) {
- return g_strdup ("Drafts");
- }
-
- return g_strdup (original_name);
-}
-
-static void
-scan_dir (PineImporter *importer,
- const char *dirname,
- const char *orig_parent)
-{
- DIR *maildir;
- struct stat buf;
- struct dirent *current;
- char *str;
-
- maildir = opendir (dirname);
- if (maildir == NULL) {
- g_warning ("Could not open %s\nopendir returned: %s",
- dirname, g_strerror (errno));
- return;
- }
-
- str = g_strdup_printf (_("Scanning %s"), dirname);
- gtk_label_set_text (GTK_LABEL (importer->label), str);
- g_free (str);
-
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- current = readdir (maildir);
- while (current) {
- PineFolder *pf;
- char *fullname, *foldername;
-
- /* Ignore . and .. */
- if (current->d_name[0] == '.') {
- if (current->d_name[1] == '\0' ||
- (current->d_name[1] == '.' && current->d_name[2] == '\0')) {
- current = readdir (maildir);
- continue;
- }
- }
-
- if (*orig_parent == '/') {
- foldername = maybe_replace_name (current->d_name);
- } else {
- foldername = g_strdup (current->d_name);
- }
-
- fullname = g_concat_dir_and_file (dirname, current->d_name);
- if (stat (fullname, &buf) == -1) {
- g_warning ("Could not stat %s\nstat returned: %s",
- fullname, g_strerror (errno));
- current = readdir (maildir);
- g_free (fullname);
- continue;
- }
-
- if (S_ISREG (buf.st_mode)) {
- pf = g_new (PineFolder, 1);
- pf->path = g_strdup (fullname);
- pf->parent = g_strdup (orig_parent);
- pf->foldername = g_strdup (foldername);
- pf->folder = FALSE;
- importer->dir_list = g_list_append (importer->dir_list, pf);
- } else if (S_ISDIR (buf.st_mode)) {
- char *subdir;
-
- pf = g_new (PineFolder, 1);
- pf->path = g_strdup (fullname);
- pf->parent = g_strdup (orig_parent);
- pf->foldername = g_strdup (foldername);
- pf->folder = TRUE;
- importer->dir_list = g_list_append (importer->dir_list, pf);
-
- subdir = g_concat_dir_and_file (orig_parent, foldername);
- scan_dir (importer, fullname, subdir);
- g_free (subdir);
- }
-
- g_free (fullname);
- g_free (foldername);
- current = readdir (maildir);
- }
-}
-
-static void
-pine_create_structure (EvolutionIntelligentImporter *ii,
- void *closure)
-{
- CORBA_Environment ev;
- PineImporter *importer = closure;
- char *maildir;
-
- bonobo_object_ref (BONOBO_OBJECT (ii));
- pine_store_settings (importer);
-
- /* Create a dialog */
- importer->dialog = create_importer_gui (importer);
- gtk_widget_show_all (importer->dialog);
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- if (importer->do_address == TRUE) {
- bonobo_config_set_boolean (importer->db,
- "/Importer/Pine/address-imported", TRUE, NULL);
-
- import_addressbook (importer);
- }
-
- if (importer->do_mail == TRUE) {
- bonobo_config_set_boolean (importer->db,
- "/Importer/Pine/mail-imported", TRUE, NULL);
-
- maildir = gnome_util_prepend_user_home ("mail");
- gtk_label_set_text (GTK_LABEL (importer->label),
- _("Scanning directory"));
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
-
- scan_dir (importer, maildir, "/");
- g_free (maildir);
-
- /* Import them */
- import_next (importer);
- }
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->do_mail == FALSE && importer->do_address == FALSE) {
- /* Destroy it here if we weren't importing mail
- otherwise the mail importer destroys itself
- once the mail is imported */
-
- /* Hmmm, this needs fixed badly */
- bonobo_object_unref (BONOBO_OBJECT (ii));
- }
-}
-
-static void
-pine_destroy_cb (GtkObject *object,
- PineImporter *importer)
-{
- CORBA_Environment ev;
-
- pine_store_settings (importer);
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (importer->db, &ev);
- CORBA_exception_free (&ev);
-
- if (importer->db != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->db, NULL);
- }
- importer->db = CORBA_OBJECT_NIL;
-
- if (importer->importer != CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (importer->importer, NULL);
- }
- gtk_main_quit ();
-}
-
-/* Fun inity stuff */
-
-/* Fun control stuff */
-static void
-checkbox_toggle_cb (GtkToggleButton *tb,
- gboolean *do_item)
-{
- *do_item = gtk_toggle_button_get_active (tb);
-}
-
-static BonoboControl *
-create_checkboxes_control (PineImporter *importer)
-{
- GtkWidget *hbox;
- BonoboControl *control;
-
- hbox = gtk_hbox_new (FALSE, 2);
-
- importer->mail = gtk_check_button_new_with_label (_("Mail"));
- gtk_signal_connect (GTK_OBJECT (importer->mail), "toggled",
- GTK_SIGNAL_FUNC (checkbox_toggle_cb),
- &importer->do_mail);
-
- importer->address = gtk_check_button_new_with_label (_("Addressbook"));
- gtk_signal_connect (GTK_OBJECT (importer->address), "toggled",
- GTK_SIGNAL_FUNC (checkbox_toggle_cb),
- &importer->do_address);
-
- gtk_box_pack_start (GTK_BOX (hbox), importer->mail, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), importer->address, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
- control = bonobo_control_new (hbox);
- return control;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionIntelligentImporter *importer;
- BonoboControl *control;
- PineImporter *pine;
- CORBA_Environment ev;
- char *message = N_("Evolution has found Pine mail files.\n"
- "Would you like to import them into Evolution?");
-
- pine = g_new0 (PineImporter, 1);
-
- CORBA_exception_init (&ev);
-
- pine->db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || pine->db == CORBA_OBJECT_NIL) {
- g_free (pine);
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- pine_restore_settings (pine);
-
- pine->importer = oaf_activate_from_id (MBOX_IMPORTER_IID, 0, NULL, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Could not start MBox importer\n%s",
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- importer = evolution_intelligent_importer_new (pine_can_import,
- pine_create_structure,
- _("Pine"),
- _(message), pine);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (pine_destroy_cb), pine);
-
- control = create_checkboxes_control (pine);
- bonobo_object_add_interface (BONOBO_OBJECT (importer),
- BONOBO_OBJECT (control));
- return BONOBO_OBJECT (importer);
-}
-
-static void
-importer_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (PINE_INTELLIGENT_IMPORTER_IID,
- factory_fn, NULL);
- if (factory == NULL) {
- g_warning ("Could not initialise Pine Intelligent Mail Importer.");
- exit (0);
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- bindtextdomain(PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(PACKAGE);
-
- gnome_init_with_popt_table ("Evolution-Pine-Importer",
- VERSION, 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 initialise Bonobo");
- exit (0);
- }
-
- importer_init ();
- bonobo_main ();
-
- return 0;
-}
diff --git a/libibex/.cvsignore b/libibex/.cvsignore
deleted file mode 100644
index b0d27ba734..0000000000
--- a/libibex/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-testindex
-dumpindex
diff --git a/libibex/COPYING.LIB b/libibex/COPYING.LIB
deleted file mode 100644
index eb685a5ec9..0000000000
--- a/libibex/COPYING.LIB
+++ /dev/null
@@ -1,481 +0,0 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/libibex/ChangeLog b/libibex/ChangeLog
deleted file mode 100644
index 2f5a1e27af..0000000000
--- a/libibex/ChangeLog
+++ /dev/null
@@ -1,494 +0,0 @@
-2001-09-20 <NotZed@Ximian.com>
-
- * ibex_block.c: Turn off the o(x) debug set, & include alloca.h &
- config.h.
-
-2001-09-17 <NotZed@Ximian.com>
-
- * disktail.c (tail_space): Fix the tail space calculation, it
- didn't always take into account the space used by a new tail node
- (i think).
- (tail_info): Add a failback assertion that end >= start. Fix all
- callers (needed to add blocks argument).
-
-2001-08-16 Not Zed <NotZed@Ximian.com>
-
- * dumpindex.c (main): Force open of internal data before using it.
-
- * ibex_block.c (ibex_use): Use a next pointer so we keep the list
- intact as we scan it.
-
-2001-08-15 Not Zed <NotZed@Ximian.com>
-
- * ibex_block.c (ibex_use): New function to limit use of fd's.
- Mark an ibex file in use, re-open if necessary, and close off
- another (lru) if necessary.
- (ibex_unuse): Mark an ibex as not in use.
- (ibex_open): Delay opening of the actual block file till later,
- and add the ibex to a global list.
- (ibex_save): Use/unuse around operations.
- (close_backend): Zero out blocks when closed.
- (ibex_close): Remove the ibex from the global list before closing
- it down.
- (ibex_index_buffer, ibex_find, ibex_unindex, ibex_find_name):
- Use/unuse around ops.
-
-2001-08-10 Not Zed <NotZed@Ximian.com>
-
- * wordindexmem.c (sync_cache_entry): NOOP if writing to a failed
- file.
- (word_index_pre): NOOP if failed file.
- (ibex_create_word_index_mem): Setup blocks value.
-
- ** Added internal exception handling to libibex, in the case of
- errors with on-disk data, exceptions are returned.
-
- * block.c (ibex_block_cache_open): Detect fatal errors below us
- and clean up appropriately.
- (ibex_block_cache_fail): New function to handle the failure, and
- keep track of it.
- (ibex_block_cache_sync): Dont do anything if we've failed on this
- file.
-
- * disktail.c (tail_compress): Add blocks param so we can assert
- for exceptions.
-
- * hash.c, block.c disktail.c: g_assert->ibex_block_cache_assert
- where dealing with external data.
-
- * hash.c (hash_info): Add index param so we can assert for exceptions.
-
- * ibex_block.c (ibex_index_buffer): Setjmp before calling into
- internal routines.
- (ibex_save): "
- (ibex_unindex): "
- (ibex_find): "
- (ibex_find_name): "
- (ibex_contains_name): "
- (ibex_reset): Function to reset the index file if we have an
- error, call when we have an error.
-
- * block.h (ibex_block_cache_assert): Create assertion/exception
- macros, and include a setjmp buffer for returning it.
-
-2001-08-09 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (libibex_la_SOURCES): Remove wordindex.c,
- wordindexmem is what's used.
-
-2001-06-01 Peter Williams <peterw@ximian.com>
-
- * Makefile.am (dumpindex_LDADD): Add GAL_LIBS here too.
- (testindex_LDADD): And here.
-
-2001-04-25 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libibex_la_LIBADD): Add GAL_LIBS for gunicode stuff
- (until glib 2.0)
- (INCLUDES): Use EXTRA_GNOME_CFLAGS
- (dumpindex_LDADD, testindex_LDADD): fix
- Remove references to mkindex and lookup.
-
- * ibex_block.c (ibex_normalise_word, utf8_category): Convert to
- gunicode interfaces
-
- * ibex_db.c, lookup.c, mkindex.c: Unused, remove.
-
-2001-03-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * disktail.c: Header shuffling. Move glibc headers before
- gnome stuff.
- * testindex.c: Same here.
- * wordindexmem.c: Added <string.h> and <stdlib.h> to quench
- warnings from newer gcc.
-
-2000-12-24 Not Zed <NotZed@HelixCode.com>
-
- * Merge from camel-mt-branch.
-
-2000-12-18 Not Zed <NotZed@HelixCode.com>
-
- * dumpindex.c (main): Same here.
-
- * testindex.c (main): Add a g_thread_init(). Sigh, glib's thread
- stuff is snot.
- (read_words): Setup another flat-out thread to test
- multithreadedness at little bit.
-
- * ibex_block.c (ibex_index_buffer): Add locking around internal
- calls.
- (ibex_open): Init the locking mutex.
- (ibex_close): Free the locking mutex.
- (ibex_unindex):
- (ibex_find):
- (ibex_find_name):
- (ibex_contains_name): Add locking around internal calls.
-
- * ibex_internal.h (struct ibex): Add a lock. Include config.h
-
-2000-12-13 Christopher James Lahey <clahey@helixcode.com>
-
- * disktail.c (tail_compress):
- (tail_get): Added some casts to get rid of warnings.
- (tail_dump): #if 0ed this out to get rid of a warning.
- (ibex_diskarray_dump): Added a prototype.
-
- * ibex_block.c (ibex_index_buffer): Assigned cat the value 0 to
- start off with to avoid a warning.
-
-2000-12-12 Christopher James Lahey <clahey@helixcode.com>
-
- * wordindex.c (cache_sanity): Made cache_sanity only be included
- if d(x) is defined as x.
-
- * wordindexmem.c: Made node_sanity and cache_sanity only be
- included if d(x) is defined as x or if MALLOC_CHECK is defined.
- Made sync_value only be included if d(x) is defined as x.
-
-2000-11-28 Not Zed <NotZed@HelixCode.com>
-
- * index.h: Turn off index stats by default.
-
- * ibex_block.c (ibex_save): And here.
- (ibex_close): Debug out printfs.
-
- * wordindexmem.c (ibex_create_word_index_mem): And here.
- (num): Made buf static.
-
- * block.c (ibex_block_cache_open): Debug out some printfs.
- (ibex_block_read): And here.
-
-2000-11-17 Not Zed <NotZed@HelixCode.com>
-
- * wordindexmem.c (add_list): If we have the namecache active, and
- there is no name there, we add it directly and dont look it up
- first.
-
- * testindex.c: Some performance testing & stat gathering stuff.
-
-2000-11-16 Not Zed <NotZed@HelixCode.com>
-
- * wordindexmem.c (ibex_create_word_index_mem): Initialise nameinit
- & namecache.
- (contains_name): On first call, load all names into memory. We
- usually do a whole lot of lookups in a row, and this saves a lot
- of penalties on a big list, for not too much a memory hit.
- (find_name): If we have the namelist in memory do a quick
- short-circuit check to see if we have to do further processing.
- (unindex_name): Cross check the namecache, if it is active.
- Remove it there too/or exit (no work to do).
- (word_flush): If we have the namecache active, destroy it now, as
- it is not needed anymore (for now).
-
-2000-10-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * hash.c: #include <stdlib.h> to remove warning.
- * wordindex.c: #include <stdlib.h> and <string.h>.
-
-2000-10-26 Not Zed <NotZed@HelixCode.com>
-
- * block.c (ibex_block_cache_open): Use IBEX_VERSION rather than
- hardcoded version string.
-
- * ibex_internal.h (IBEX_VERSION): Bumped version again. This time
- I did change the index format.
- (IBEX_VERSION): moved into block.h
-
- * hash.c (struct _hashroot): Add a linked list of keys to the table.
- (struct _hashblock): Added a next pointer as a block number.
- (hash_insert): Link new key blocks into the key block list.
- (struct _HASHCursor): Renamed block to key and added a block item.
- (hash_cursor_next): Changed to go through the linked list of all
- hash items rather than through each hash chain separately. >>
- faster.
- (ibex_hash_dump_rec): Remove a warning.
-
-2000-10-25 <jpr@helixcode.com>
-
- * ibex_block.c: No longer include <db.h>
-
-2000-10-25 Not Zed <NotZed@HelixCode.com>
-
- * ibex_internal.h (IBEX_VERSION): Bumped to another version. The
- file format hasn't changed, but earlier bugs may create invalid
- files.
-
- * block.c (ibex_block_read): Use the root data directly.
- (ibex_block_cache_open): As well.
- (ibex_block_get): And here too.
- (ibex_block_cache_sync): Sync the root block directly here.
-
- * block.h: Pad root block out to 1024 bytes.
- Added root block to struct _memcache.
-
- * disktail.c (tail_get): Dirty the root block.
- (tail_get): Fix for changes to root access.
- (disk_remove): And here too.
-
- * wordindexmem.c (sync_cache_entry): Handle the case of not having
- any files in the list, which can happen now.
- (word_index_pre): Make sure we set the wordid on the new cache
- entry.
-
- * ibex_block.c (ibex_save): Sigh. Pass the right argument to
- index_post.
-
-2000-10-24 JP Rosevear <jpr@helixcode.com>
-
- * .cvsignore: Shush
-
-2000-10-24 Not Zed <NotZed@HelixCode.com>
-
- * block.c (ibex_block_cache_open): Create a word_index_mem for
- indexing the words, rather than a word_index.
-
- * ibex_block.c (ibex_index_buffer): If we haven't called index_pre
- yet, do it before indexing anything.
- (ibex_save): If wehave called index_pre previously, call
- index_post.
- (ibex_close): And same for here.
-
- * index.h: Added a cursor class, and cursor retrieval function for
- iterating through an index's keys.
-
- * wordindexmem.c (ibex_create_word_index_mem): New word class,
- similar to wordindex, but meant to be faster for updates.
- (word_index_pre): Implement. We load all keys into memory.
- (word_index_post): Implement. We sync and free all keys.
- (find): Remove lru code, its no longer a cache, but a lookup
- table.
- (add_index_cache): Remove lru code here too.
- (find_name): And here.
- (word_flush): Flush the hashtable direct.
- (word_close): Call flush to flush, rather than doing it ourselves.
- (add_index_cache): If we are in an index state, we can assume a
- cache miss == a new word.
- (word_index_post): Maintain whether or not we are in an index
- state, and the depth of the state.
- (word_index_pre): Likewise. Dont reread the index if we have
- already.
- (cache_sanity): Fixed for struct changes.
-
- * wordindex.h (IBEXWordClass): Added functions to prepare/cleanup
- for lots of indexing. i.e. can be used to optimise indexing speed
- at the cost of extra memory usage during the indexing process.
-
- * dumpindex.c: Dumps the contents of indexs.
-
- * hash.c (ibex_hash_dump_rec): Also print the word count.
- (hash_cursor_create): Create a new cursor for iterating through a
- hashtable.
- (hash_cursor_close): 'close' the cursor. It is upto the
- application to close any cursors it creates.
- (hash_cursor_next): Goto the next key id.
- (hash_cursor_next_key): Goto the next key, reutrn the key.
- (hash_get_cursor): Return a cursor object.
-
- * wordindex.c (unindex_name): Cross-check the cache as well.
- (word_index_post):
- (word_index_pre): Added (empty) callbacks for pre/post functions.
-
-2000-10-12 Not Zed <NotZed@HelixCode.com>
-
- * ibex_internal.h (struct ibex): Bumped ibex rev.
-
- * block.c (ibex_block_cache_open): Bumped the ibex file revision
- because of the hash table size change.
-
- * index.h: Added some stat stuff.
-
- * wordindex.c (struct _wordcache): Changed files[] to be a pointer
- to an allocated block/or an individual item.
- (find): Fix for changes to struct.
- (find_name): "
- (sync_cache_entry): "
- (add): "
- (add_list): "
- (add_index_cache): Free the cache file array if it was created.
- (word_flush): And here.
- (word_close): And here too.
- (ibex_create_word_index): Double the size of the hashtables.
- (word_flush): Make sure we reset the wordcount to 0 if we remove
- the list items. DOH.
- (add_index_cache): Use a slightly more sohpisticated aging
- algorithm to remove expired nodes.
-
-2000-10-10 Not Zed <NotZed@HelixCode.com>
-
- * hash.c (hash_find):
- (hash_remove):
- (hash_insert): Truncate key if it is too big to fit in a
- single block to MAX_KEYLEN bytes.
-
-2000-09-28 Not Zed <NotZed@HelixCode.com>
-
- * block.c (ibex_block_free): Make sure we map the 'free' block to
- a block number when unlinking a block (fixes a lot of assertion
- failures).
- (ibex_block_cache_open): Initialise sync flag on root block. If
- it is not set on open then the index could be in an invalid state,
- and should be rescanned.
- (ibex_block_cache_sync): Sync root block last, and set the sync
- flag.
- (ibex_block_cache_open): Mirror root block flags in block_cache
- struct.
- (ibex_block_cache_sync): Likewise.
- (ibex_block_read): If we write a dirty block, then we clear the
- sync flag if its still set; we are no longer synced.
-
-2000-09-19 Not Zed <NotZed@HelixCode.com>
-
- ** Merged from IBEX_DISK branch to head.
-
- * file.c:
- * find.c:
- * words.c:
- * index.c: Removed unused files.
-
- * block.h: Changed block to use only 24 bits for next and 8 for
- used, and fixed all relevant code. Some cleanup.
-
- * disktail.c (tail_get): If we use an empty tail node, then make
- sure we make it dirty.
-
-2000-09-15 Not Zed <NotZed@HelixCode.com>
-
- * wordindex.c (word_close): Free hashtable on exit too.
-
- * disktail.c: Implemented tail-node storage for the end of long
- lists, or for short lists. Should save significant disk space
- (5x?).
- Implemented special case for 1-item lists, where the tailnode
- pointer is used to store the index entry.
-
-2000-09-14 Not Zed <NotZed@HelixCode.com>
-
- * wordindex.c (add_index_key): Keys also handle tails.
-
- * hash.c (hash_set_data_block): Added new parameter to keys - a
- tail block (a full 32 bit block pointer).
- (hash_get_data_block): And same here.
-
-2000-09-12 Not Zed <NotZed@HelixCode.com>
-
- * wordindex.c (word_close): Dont close namestore twice.
-
-2000-09-11 Not Zed <NotZed@HelixCode.com>
-
- ** Redid almost everything, on-disk hash table to store an index
- to index records, mroe on the way to modularisation (more to go),
- now stores reverse indexes for deleting.
-
-2000-08-31 Not Zed <NotZed@HelixCode.com>
-
- * block.c (add_key_mem): Initialise a memory based array for newly
- added index entries.
- (add_record): Changed to cache updates in memory until we hit a
- limit, and then flush them to disk.
- (get_record): Merge in-memory records with disk records.
- (remove_record): Remove from memory first, and if that fails, goto
- disk.
- (find_record): Check memory first, then disk if that fails.
- (add_datum_list): oops, copy size * sizeof(blockid_t)
- (add_indexed): Make sure we link in the head node when we create a
- new one.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * file.c, find.c: Fixed some warnings.
-
-2000-05-11 NotZed <NotZed@HelixCode.com>
-
- * index.c (ibex_unindex): Make sure we mark the ibex as dirty.
-
-2000-05-07 NotZed <NotZed@HelixCode.com>
-
- * file.c (ibex_save): New function, only write out the ibex if it
- has changed.
-
-2000-05-07 <notzed@helixcode.com>
-
- * file.c (ibex_open): Also close the fd after we're done.
-
- * find.c (ibex_contains_name): New function to find out if a file
- is indexed.
-
-2000-05-02 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: set G_LOG_DOMAIN.
-
-2000-04-12 NotZed <NotZed@HelixCode.com>
-
- * find.c (ibex_dump_all): Debug function to dump the whole index
- to stdout.
-
- * words.c (get_ibex_file): Use g_strdup(), not strdup().
-
-2000-04-11 NotZed <NotZed@HelixCode.com>
-
- * file.c (write_word): Always write out all words we have (even if
- its 0 ... the file expects it). No longer check for removed files.
- (store_word): Check for removed files here, and only add to the
- ordered tree if we have references left to this word.
- (ibex_write): First insert into the tree, to determine the
- wordcount to be saved in the output file, and then write that.
- (ibex_open): Remove some debug.
-
- * words.c (ibex_index_buffer): Always set 'unread', if it is a
- valid pointer (dont rely on caller to initialise it).
-
-2000-03-26 NotZed <NotZed@HelixCode.com>
-
- * lookup.c (main): Fixed call to ibex_open.
-
- * mkindex.c (main): Fixed call to ibex_open.
-
- * file.c (ibex_open): Changed to accept flags and mode equivalent
- to open(2).
-
-2000-02-25 Dan Winship <danw@helixcode.com>
-
- * *.c: add gtk-doc-style comments
-
-2000-02-21 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: Added mkindex.
-
-2000-02-21 NotZed <NotZed@HelixCode.com>
-
- * Makefile.am: change noinst_LIBRARIES to noinst_LTLIBRARIES, and
- supply -static to LDFLAGS. Duh, and changed LDADD back to
- libibex.la.
-
-2000-02-20 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: changed mkindex_LDADD to libibex.a instead of
- libibex.la.
-
-2000-02-19 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: added lookup.
-
-2000-02-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * Makefile.am (lookup_LDADD): For now. make a libibex.a library so
- we can link it with the camel provider. I hate libtool
-
-2000-02-16 Dan Winship <danw@helixcode.com>
-
- * Makefile.am: automakify
-
-2000-02-16 NotZed <NotZed@HelixCode.com>
-
- * find.[ch] (ibex_find_name): Finds if a word is indexed under a
- given name.
-
-2000-02-14 NotZed <notzed@zedzone.helixcode.com>
-
- * Makefile: Hack together a build using libtool. This should all
- be auto*'d at some point I guess.
-
-2000-02-13 NotZed <notzed@zedzone.helixcode.com>
-
- * Added ChangeLog file.
-
diff --git a/libibex/Makefile.am b/libibex/Makefile.am
deleted file mode 100644
index 52dc07fb54..0000000000
--- a/libibex/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-noinst_LTLIBRARIES = libibex.la
-
-libibex_la_SOURCES = \
- wordindexmem.c \
- block.c ibex.h \
- hash.c \
- disktail.c \
- ibex_block.c
-
-libibex_la_LDFLAGS = -static
-
-libibex_la_LIBADD = \
- $(GAL_LIBS)
-
-noinst_HEADERS = \
- ibex_internal.h \
- block.h \
- wordindex.h \
- index.h
-
-INCLUDES = \
- $(EXTRA_GNOME_CFLAGS) \
- -DG_LOG_DOMAIN=\"libibex\"
-
-
-noinst_PROGRAMS = dumpindex testindex
-
-dumpindex_SOURCES = dumpindex.c
-dumpindex_LDADD = libibex.la $(GAL_LIBS) $(THREADS_LIBS)
-
-testindex_SOURCES = testindex.c
-testindex_LDADD = libibex.la $(GAL_LIBS) $(THREADS_LIBS) -lm
diff --git a/libibex/TODO b/libibex/TODO
deleted file mode 100644
index a087c8d1f3..0000000000
--- a/libibex/TODO
+++ /dev/null
@@ -1,61 +0,0 @@
-Stability
----------
-* ibex_open should never crash, and should never return NULL without
-errno being set. Should check for errors when reading.
-
-
-Performance
------------
-* Profiling, keep thinking about data structures, etc.
-
-* Check memory usage
-
-* See if writing the "inverse image" of long ref streams helps
-compression without hurting performance now. (ie, if a word appears in
-more than half of the files, write out the list of files it _doesn't_
-appear in). (I tried this before, and it wasn't working well, but the
-file format and data structures have changed a lot.)
-
-* We could save a noticeable chunk of time if normalize_word computed
-the hash of the word and then we could pass that into
-g_hash_table_insert somehow.
-
-* Make a copy of the buffer to be indexed (or provide interface for
-caller to say ibex can munge the provided data) and then use that
-rather than constantly copying things. ?
-
-
-Functionality
--------------
-* ibex file locking
-
-* specify file mode in ibex_open
-
-* ibex_find* need to normalize the search words... should this be done
-by the caller or by ibex_find?
-
-* Needs to be some way to do a secondary search after getting results
-back from ibex_find* (ie, for "foo near bar"). This either has to be
-done by ibex, or requires us to export the normalize interface.
-
-* Does there need to be an ibex_find_any, or is that easy enough for the
-caller to do?
-
-* utf8_trans needs to cover at least two more code pages. This is
-tricky because it's not clear whether some of the letters there should
-be translated to ASCII or left as UTF8. This requires some
-investigation.
-
-* ibex_index_* need to ignore HTML tags.
- NAME = [A-Za-z][A-Za-z0-9.-]*
- </?{NAME}(\s*{NAME}(\s*=\s*({NAME}|"[^"]*"|'[^']*')))*>
- <!(--([^-]*|-[^-])--\s*)*>
-
- ugh. ok, simplifying, we get:
- <[^!](([^"'>]*("[^"]*"|'[^']*'))*> or
- <!(--([^-]*|-[^-])--\s*)*>
-
- which is still not simple. sigh.
-
-* ibex_index_* need to recognize and ignore "non-text". Particularly
-BinHex and uuencoding.
diff --git a/libibex/block.c b/libibex/block.c
deleted file mode 100644
index ef7a524d71..0000000000
--- a/libibex/block.c
+++ /dev/null
@@ -1,621 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 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.
- */
-
-/*
- block file/cache/utility functions
-*/
-
-#include <stdio.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <glib.h>
-
-#include "block.h"
-
-/*#define MALLOC_CHECK*/
-
-#ifdef MALLOC_CHECK
-#include <mcheck.h>
-#endif
-
-#define d(x)
-/*#define DEBUG*/
-
-int block_log;
-
-#ifdef IBEX_STATS
-static void
-init_stats(struct _memcache *index)
-{
- index->stats = g_hash_table_new(g_direct_hash, g_direct_equal);
-}
-
-static void
-dump_1_stat(int id, struct _stat_info *info, struct _memcache *index)
-{
- printf("%d %d %d %d %d\n", id, info->read, info->write, info->cache_hit, info->cache_miss);
-}
-
-static void
-dump_stats(struct _memcache *index)
-{
- printf("Block reads writes hits misses\n");
- g_hash_table_foreach(index->stats, dump_1_stat, index);
-}
-
-static void
-add_read(struct _memcache *index, int id)
-{
- struct _stat_info *info;
-
- info = g_hash_table_lookup(index->stats, (void *)id);
- if (info == NULL) {
- info = g_malloc0(sizeof(*info));
- g_hash_table_insert(index->stats, (void *)id, info);
- }
- info->read++;
-}
-
-static void
-add_write(struct _memcache *index, int id)
-{
- struct _stat_info *info;
-
- info = g_hash_table_lookup(index->stats, (void *)id);
- if (info == NULL) {
- info = g_malloc0(sizeof(*info));
- g_hash_table_insert(index->stats, (void *)id, info);
- }
- info->write++;
-}
-
-static void
-add_hit(struct _memcache *index, int id)
-{
- struct _stat_info *info;
-
- info = g_hash_table_lookup(index->stats, (void *)id);
- if (info == NULL) {
- info = g_malloc0(sizeof(*info));
- g_hash_table_insert(index->stats, (void *)id, info);
- }
- info->cache_hit++;
-}
-
-static void
-add_miss(struct _memcache *index, int id)
-{
- struct _stat_info *info;
-
- info = g_hash_table_lookup(index->stats, (void *)id);
- if (info == NULL) {
- info = g_malloc0(sizeof(*info));
- g_hash_table_insert(index->stats, (void *)id, info);
- }
- info->cache_miss++;
-}
-#endif /* IBEX_STATS */
-
-#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
-
-/* simple list routines (for simplified memory management of cache/lists) */
-
-/**
- * ibex_list_new:
- * @v:
- *
- * Initialise a list header. A list header must always be initialised
- * before use.
- **/
-void ibex_list_new(struct _list *v)
-{
- v->head = (struct _listnode *)&v->tail;
- v->tail = 0;
- v->tailpred = (struct _listnode *)&v->head;
-}
-
-/**
- * ibex_list_addhead:
- * @l: List.
- * @n: Node to append.
- *
- * Prepend a listnode to the head of the list @l.
- *
- * Return value: Always @n.
- **/
-struct _listnode *ibex_list_addhead(struct _list *l, struct _listnode *n)
-{
- n->next = l->head;
- n->prev = (struct _listnode *)&l->head;
- l->head->prev = n;
- l->head = n;
- return n;
-}
-
-/**
- * ibex_list_addtail:
- * @l:
- * @n:
- *
- * Append a listnode to the end of the list @l.
- *
- * Return value: Always the same as @n.
- **/
-struct _listnode *ibex_list_addtail(struct _list *l, struct _listnode *n)
-{
- n->next = (struct _listnode *)&l->tail;
- n->prev = l->tailpred;
- l->tailpred->next = n;
- l->tailpred = n;
- return n;
-}
-
-/**
- * ibex_list_remove:
- * @n: The node to remove.
- *
- * Remove a listnode from a list.
- *
- * Return value: Always the same as @n.
- **/
-struct _listnode *ibex_list_remove(struct _listnode *n)
-{
- n->next->prev = n->prev;
- n->prev->next = n->next;
- return n;
-}
-
-static struct _memblock *
-memblock_addr(struct _block *block)
-{
- return (struct _memblock *)(((char *)block) - G_STRUCT_OFFSET(struct _memblock, data));
-}
-
-/* read/sync the rootblock into the block_cache structure */
-static int
-ibex_block_read_root(struct _memcache *block_cache)
-{
- lseek(block_cache->fd, 0, SEEK_SET);
- if (read(block_cache->fd, &block_cache->root, sizeof(block_cache->root)) != sizeof(block_cache->root)) {
-
- return -1;
- }
- return 0;
-}
-
-static int
-ibex_block_sync_root(struct _memcache *block_cache)
-{
- lseek(block_cache->fd, 0, SEEK_SET);
- if (write(block_cache->fd, &block_cache->root, sizeof(block_cache->root)) != sizeof(block_cache->root)) {
- return -1;
- }
- return fsync(block_cache->fd);
-}
-
-
-/**
- * ibex_block_dirty:
- * @block:
- *
- * Dirty a block. This will cause it to be written to disk on
- * a cache sync, or when the block is flushed from the cache.
- **/
-void
-ibex_block_dirty(struct _block *block)
-{
- memblock_addr(block)->flags |= BLOCK_DIRTY;
-}
-
-static void
-sync_block(struct _memcache *block_cache, struct _memblock *memblock)
-{
- if (block_log)
- printf("writing block %d\n", memblock->block);
-
- lseek(block_cache->fd, memblock->block, SEEK_SET);
- if (write(block_cache->fd, &memblock->data, sizeof(memblock->data)) != -1) {
- memblock->flags &= ~BLOCK_DIRTY;
- }
-#ifdef IBEX_STATS
- add_write(block_cache, memblock->block);
-#endif
-}
-
-/**
- * ibex_block_cache_sync:
- * @block_cache:
- *
- * Ensure the block cache is fully synced to disk.
- **/
-void
-ibex_block_cache_sync(struct _memcache *block_cache)
-{
- struct _memblock *memblock;
-
- if (block_cache->failed)
- return;
-
- memblock = (struct _memblock *)block_cache->nodes.head;
- while (memblock->next) {
-#ifdef MALLOC_CHECK
- checkmem(memblock);
-#endif
- if (memblock->flags & BLOCK_DIRTY) {
- sync_block(block_cache, memblock);
- }
- memblock = memblock->next;
- }
-
- block_cache->root.flags |= IBEX_ROOT_SYNCF;
- if (ibex_block_sync_root(block_cache) != 0) {
- block_cache->root.flags &= ~IBEX_ROOT_SYNCF;
- }
-
-#ifdef IBEX_STATS
- dump_stats(block_cache);
-#endif
-
-}
-
-#ifdef MALLOC_CHECK
-static void
-check_cache(struct _memcache *block_cache)
-{
- struct _memblock *mw, *mn;
-
- checkmem(block_cache);
- checkmem(block_cache->index);
-
- mw = (struct _memblock *)block_cache->nodes.head;
- mn = mw->next;
- while (mn) {
- checkmem(mw);
- mw = mn;
- mn = mn->next;
- }
-}
-#endif
-
-/**
- * ibex_block_cache_flush:
- * @block_cache:
- *
- * Ensure the block cache is fully synced to disk, and then flush
- * its contents from memory.
- **/
-void
-ibex_block_cache_flush(struct _memcache *block_cache)
-{
- struct _memblock *mw, *mn;
-
- ibex_block_cache_sync(block_cache);
-
- mw = (struct _memblock *)block_cache->nodes.head;
- mn = mw->next;
- while (mn) {
- g_hash_table_remove(block_cache->index, (void *)mw->block);
- g_free(mw);
- mw = mn;
- mn = mn->next;
- }
- ibex_list_new(&block_cache->nodes);
-}
-
-/**
- * ibex_block_read:
- * @block_cache:
- * @blockid:
- *
- * Read the data of a block by blockid. The data contents is backed by
- * the block cache, and should be considered static.
- *
- * TODO; should this return a NULL block on error?
- *
- * Return value: The address of the block data (which may be cached).
- **/
-struct _block *
-ibex_block_read(struct _memcache *block_cache, blockid_t blockid)
-{
- struct _memblock *memblock;
-
-#ifdef MALLOC_CHECK
- check_cache(block_cache);
-#endif
-
- /* nothing can read the root block directly */
- ibex_block_cache_assert(block_cache, blockid != 0);
- ibex_block_cache_assert(block_cache, blockid < block_cache->root.roof);
-
- memblock = g_hash_table_lookup(block_cache->index, (void *)blockid);
-
-#ifdef MALLOC_CHECK
- check_cache(block_cache);
-#endif
-
- if (memblock) {
- d(printf("foudn blockid in cache %d = %p\n", blockid, &memblock->data));
-
- /* 'access' page */
- ibex_list_remove((struct _listnode *)memblock);
- ibex_list_addtail(&block_cache->nodes, (struct _listnode *)memblock);
-
-#ifdef MALLOC_CHECK
- check_cache(block_cache);
-#endif
-
-#ifdef IBEX_STATS
- add_hit(block_cache, memblock->block);
-#endif
-
-#ifdef MALLOC_CHECK
- check_cache(block_cache);
-#endif
-
- return &memblock->data;
- }
-#ifdef IBEX_STATS
- add_miss(block_cache, blockid);
- add_read(block_cache, blockid);
-#endif
- if (block_log)
- printf("miss block %d\n", blockid);
-
- d(printf("loading blockid from disk %d\n", blockid));
- memblock = g_malloc(sizeof(*memblock));
- memblock->block = blockid;
- memblock->flags = 0;
- lseek(block_cache->fd, blockid, SEEK_SET);
- memset(&memblock->data, 0, sizeof(memblock->data));
- read(block_cache->fd, &memblock->data, sizeof(memblock->data));
-
- ibex_list_addtail(&block_cache->nodes, (struct _listnode *)memblock);
- g_hash_table_insert(block_cache->index, (void *)blockid, memblock);
- if (block_cache->count >= CACHE_SIZE) {
- struct _memblock *old = (struct _memblock *)block_cache->nodes.head;
- d(printf("discaring cache block %d\n", old->block));
- g_hash_table_remove(block_cache->index, (void *)old->block);
- ibex_list_remove((struct _listnode *)old);
- if (old->flags & BLOCK_DIRTY) {
- /* are we about to un-sync the file? update root and sync it */
- if (block_cache->root.flags & IBEX_ROOT_SYNCF) {
- d(printf("Unsyncing root block\n"));
-
- block_cache->root.flags &= ~IBEX_ROOT_SYNCF;
- if (ibex_block_sync_root(block_cache) != 0) {
- /* what do we do? i dont know! */
- g_warning("Could not sync root block of index: %s", strerror(errno));
- }
- }
- sync_block(block_cache, old);
- }
- g_free(old);
- } else {
- block_cache->count++;
- }
-
- d(printf(" --- cached blocks : %d\n", block_cache->count));
-
-#ifdef MALLOC_CHECK
- check_cache(block_cache);
-#endif
- return &memblock->data;
-}
-
-void
-ibex_block_cache_fail(struct _memcache *block_cache, char *where, int line, char *why)
-{
- block_cache->failed = TRUE;
- block_cache->root.flags &= ~IBEX_ROOT_SYNCF;
- /* and blow it away, we can do nothing better yet */
- ftruncate(block_cache->fd, 0);
-
- g_warning("%s(%d): Integrity assertion failed: '%s' on file '%s'", where, line, why, block_cache->name);
-
- longjmp(block_cache->failenv, 1);
-}
-
-/**
- * ibex_block_cache_open:
- * @name:
- * @flags: Flags as to open(2), should use O_RDWR and optionally O_CREAT.
- * @mode: Mose as to open(2)
- *
- * Open a block file.
- *
- * FIXME; this currently also initialises the word and name indexes
- * because their pointers are stored in the root block. Should be
- * upto the caller to manage these pointers/data.
- *
- * Return value: NULL if the backing file could not be opened.
- **/
-struct _memcache *
-ibex_block_cache_open(const char *name, int flags, int mode)
-{
- struct _memcache *block_cache = g_malloc0(sizeof(*block_cache));
-
- d(printf("opening ibex file: %s", name));
-
- /* setup cache */
- ibex_list_new(&block_cache->nodes);
- block_cache->count = 0;
- block_cache->index = g_hash_table_new(g_direct_hash, g_direct_equal);
- block_cache->fd = open(name, flags, mode);
- block_cache->failed = FALSE;
- block_cache->name = g_strdup(name);
-
- if (block_cache->fd == -1) {
- g_hash_table_destroy(block_cache->index);
- g_free(block_cache);
- return NULL;
- }
-
- if (ibex_block_cache_setjmp(block_cache) != 0) {
- close(block_cache->fd);
- g_hash_table_destroy(block_cache->index);
- g_free(block_cache);
- return NULL;
- }
-
- ibex_block_read_root(block_cache);
- if (block_cache->root.roof == 0
- || memcmp(block_cache->root.version, IBEX_VERSION, 4)
- || ((block_cache->root.flags & IBEX_ROOT_SYNCF) == 0)) {
- d(printf("Initialising superblock\n"));
- /* reset root data */
- memcpy(block_cache->root.version, IBEX_VERSION, 4);
- block_cache->root.roof = 1024;
- block_cache->root.free = 0;
- block_cache->root.words = 0;
- block_cache->root.names = 0;
- block_cache->root.tail = 0; /* list of tail blocks */
- block_cache->root.flags = 0;
- ibex_block_sync_root(block_cache);
- /* reset the file contents */
- ftruncate(block_cache->fd, 1024);
- } else {
- d(printf("superblock already initialised:\n"
- " roof = %d\n free = %d\n words = %d\n names = %d\n tail = %d\n",
- block_cache->root.roof, block_cache->root.free,
- block_cache->root.words, block_cache->root.names, block_cache->root.tail));
- }
- /* FIXME: this should be moved higher up in the object tree */
- {
- struct _IBEXWord *ibex_create_word_index_mem(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot);
-
- block_cache->words = ibex_create_word_index_mem(block_cache, &block_cache->root.words,&block_cache->root.names);
- }
-
-#ifdef IBEX_STATS
- init_stats(block_cache);
-#endif
-
- return block_cache;
-}
-
-/**
- * ibex_block_cache_close:
- * @block_cache:
- *
- * Close the block file, sync any remaining cached data
- * to disk, and free all resources.
- **/
-void
-ibex_block_cache_close(struct _memcache *block_cache)
-{
- struct _memblock *mw, *mn;
-
- ibex_block_cache_sync(block_cache);
- close(block_cache->fd);
- g_free(block_cache->name);
-
- mw = (struct _memblock *)block_cache->nodes.head;
- mn = mw->next;
- while (mn) {
- g_free(mw);
- mw = mn;
- mn = mw->next;
- }
-
- g_hash_table_destroy(block_cache->index);
-
- g_free(block_cache);
-}
-
-/**
- * ibex_block_free:
- * @block_cache:
- * @blockid:
- *
- * Return a block to the free pool.
- **/
-void
-ibex_block_free(struct _memcache *block_cache, blockid_t blockid)
-{
- struct _block *block = ibex_block_read(block_cache, blockid);
-
- block->next = block_number(block_cache->root.free);
- block_cache->root.free = blockid;
- ibex_block_dirty((struct _block *)block);
-}
-
-/**
- * ibex_block_get:
- * @block_cache:
- *
- * Allocate a new block, or access a previously freed block and return
- * its block id. The block will have zeroed contents.
- *
- * Return value: 0 if there are no blocks left (disk full/read only
- * file, etc).
- **/
-blockid_t
-ibex_block_get(struct _memcache *block_cache)
-{
- struct _block *block;
- blockid_t head;
-
- if (block_cache->root.free) {
- head = block_cache->root.free;
- block = ibex_block_read(block_cache, head);
- block_cache->root.free = block_location(block->next);
- } else {
- /* TODO: check the block will fit first */
- /* TODO: no need to read this block, can allocate it manually (saves a syscall/read) */
- head = block_cache->root.roof;
- block_cache->root.roof += BLOCK_SIZE;
- block = ibex_block_read(block_cache, head);
- }
-
- ibex_block_cache_assert(block_cache, head != 0);
-
- d(printf("new block = %d\n", head));
- block->next = 0;
- block->used = 0;
- ibex_block_dirty(block);
- return head;
-}
diff --git a/libibex/block.h b/libibex/block.h
deleted file mode 100644
index 74221836e1..0000000000
--- a/libibex/block.h
+++ /dev/null
@@ -1,125 +0,0 @@
-
-/* public interfaces for block io routines */
-
-#ifndef _BLOCK_H
-#define _BLOCK_H
-
-/*#define IBEX_STATS*/ /* define to get/dump block access stats */
-
-#include <glib.h>
-#include <setjmp.h>
-
-/* version of file format */
-#define IBEX_VERSION "ibx6"
-
-typedef guint32 nameid_t;
-typedef guint32 blockid_t;
-
-#define BLOCK_BITS (8)
-#define BLOCK_SIZE (1<<BLOCK_BITS)
-#define CACHE_SIZE 256 /* blocks in disk cache */
-
-/* root block */
-struct _root {
- char version[4];
-
- blockid_t free; /* list of free blocks */
- blockid_t roof; /* top of allocated space, everything below is in a free or used list */
- blockid_t tail; /* list of 'tail' blocks */
-
- blockid_t words; /* root of words index */
- blockid_t names; /* root of names index */
-
- char flags; /* state flags */
-
- /* makes structure fill up to 1024 bytes */
- char dummy[1024 - (sizeof(char)*5) - (sizeof(blockid_t)*5)];
-};
-
-#define IBEX_ROOT_SYNCF (1<<0) /* file is synced */
-
-/* basic disk structure for (data) blocks */
-struct _block {
- unsigned int next:32-BLOCK_BITS; /* next block */
- unsigned int used:BLOCK_BITS; /* number of elements used */
-
- nameid_t bl_data[(BLOCK_SIZE-4)/4]; /* references */
-};
-
-/* custom list structure, for a simple/efficient cache */
-struct _listnode {
- struct _listnode *next;
- struct _listnode *prev;
-};
-struct _list {
- struct _listnode *head;
- struct _listnode *tail;
- struct _listnode *tailpred;
-};
-
-void ibex_list_new(struct _list *v);
-struct _listnode *ibex_list_addhead(struct _list *l, struct _listnode *n);
-struct _listnode *ibex_list_addtail(struct _list *l, struct _listnode *n);
-struct _listnode *ibex_list_remove(struct _listnode *n);
-
-/* in-memory structure for block cache */
-struct _memblock {
- struct _memblock *next;
- struct _memblock *prev;
-
- blockid_t block;
- int flags;
-
- struct _block data;
-};
-#define BLOCK_DIRTY (1<<0)
-
-struct _memcache {
- struct _list nodes;
- int count; /* nodes in cache */
-
- GHashTable *index; /* blockid->memblock mapping */
-
- int fd; /* file fd */
- char *name; /* file name */
-
- jmp_buf failenv; /* for exception failure */
- int failed; /* indicates the file failed */
-
-#ifdef IBEX_STATS
- GHashTable *stats;
-#endif
- struct _root root; /* root block */
-
- /* temporary here */
- struct _IBEXWord *words; /* word index */
-};
-
-#ifdef IBEX_STATS
-struct _stat_info {
- int read;
- int write;
- int cache_hit;
- int cache_miss;
-};
-#endif /* IBEX_STATS */
-
-struct _memcache *ibex_block_cache_open(const char *name, int flags, int mode);
-void ibex_block_cache_close(struct _memcache *block_cache);
-void ibex_block_cache_sync(struct _memcache *block_cache);
-void ibex_block_cache_flush(struct _memcache *block_cache);
-
-#define ibex_block_cache_setjmp(bc) (((bc)==NULL)?1:setjmp((bc)->failenv))
-#define ibex_block_cache_assert(bc, cond) { if (!(cond)) { ibex_block_cache_fail(bc, __FILE__, __LINE__, # cond); } }
-
-void ibex_block_cache_fail(struct _memcache *block_cache, char *file, int line, char *why);
-
-blockid_t ibex_block_get(struct _memcache *block_cache);
-void ibex_block_free(struct _memcache *block_cache, blockid_t blockid);
-void ibex_block_dirty(struct _block *block);
-struct _block *ibex_block_read(struct _memcache *block_cache, blockid_t blockid);
-
-#define block_number(x) ((x)>>BLOCK_BITS)
-#define block_location(x) ((x)<<BLOCK_BITS)
-
-#endif /* ! _BLOCK_H */
diff --git a/libibex/diskarray.c b/libibex/diskarray.c
deleted file mode 100644
index 996ec78818..0000000000
--- a/libibex/diskarray.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 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.
- */
-
-/* a disk based array storage class */
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <glib.h>
-
-#include "block.h"
-#include "index.h"
-
-#define d(x)
-/*#define DEBUG*/
-
-static struct _IBEXStore *disk_create(struct _memcache *bc);
-static int disk_sync(struct _IBEXStore *store);
-static int disk_close(struct _IBEXStore *store);
-
-static blockid_t disk_add(struct _IBEXStore *store, blockid_t head, nameid_t data);
-static blockid_t disk_add_list(struct _IBEXStore *store, blockid_t head, GArray *data);
-static blockid_t disk_remove(struct _IBEXStore *store, blockid_t head, nameid_t data);
-static void disk_free(struct _IBEXStore *store, blockid_t head);
-
-static gboolean disk_find(struct _IBEXStore *store, blockid_t head, nameid_t data);
-static GArray *disk_get(struct _IBEXStore *store, blockid_t head);
-
-struct _IBEXStoreClass ibex_diskarray_class = {
- disk_create, disk_sync, disk_close,
- disk_add, disk_add_list,
- disk_remove, disk_free,
- disk_find, disk_get
-};
-
-static struct _IBEXStore *disk_create(struct _memcache *bc)
-{
- struct _IBEXStore *store;
-
- store = g_malloc0(sizeof(*store));
- store->klass = &ibex_diskarray_class;
- store->blocks = bc;
-
- return store;
-}
-
-static int disk_sync(struct _IBEXStore *store)
-{
- /* no cache, nop */
- return 0;
-}
-
-static int disk_close(struct _IBEXStore *store)
-{
- g_free(store);
- return 0;
-}
-
-static blockid_t
-disk_add(struct _IBEXStore *store, blockid_t head, nameid_t data)
-{
- struct _block *block;
- struct _block *newblock;
- blockid_t new;
-
- if (head == 0) {
- head = ibex_block_get(store->blocks);
- }
- block = ibex_block_read(store->blocks, head);
-
- d(printf("adding record %d to block %d (next = %d)\n", data, head, block->next));
-
- if (block->used < sizeof(block->bl_data)/sizeof(block->bl_data[0])) {
- d(printf("adding record into block %d %d\n", head, data));
- block->bl_data[block->used] = data;
- block->used++;
- ibex_block_dirty(block);
- return head;
- } else {
- new = ibex_block_get(store->blocks);
- newblock = ibex_block_read(store->blocks, new);
- newblock->next = head;
- newblock->bl_data[0] = data;
- newblock->used = 1;
- d(printf("adding record into new %d %d, next =%d\n", new, data, newblock->next));
- ibex_block_dirty(newblock);
- return new;
- }
-}
-
-static blockid_t
-disk_add_list(struct _IBEXStore *store, blockid_t head, GArray *data)
-{
- struct _block *block;
- struct _block *newblock;
- blockid_t new;
- int copied = 0;
- int left, space, tocopy;
-
- if (head == 0) {
- head = ibex_block_get(store->blocks);
- }
- block = ibex_block_read(store->blocks, head);
-
- while (copied < data->len) {
- left = data->len - copied;
- space = sizeof(block->bl_data)/sizeof(block->bl_data[0]) - block->used;
- if (space) {
- tocopy = MIN(left, space);
- memcpy(block->bl_data+block->used, &g_array_index(data, blockid_t, copied), tocopy*sizeof(blockid_t));
- block->used += tocopy;
- ibex_block_dirty(block);
- } else {
- new = ibex_block_get(store->blocks);
- newblock = ibex_block_read(store->blocks, new);
- newblock->next = head;
- tocopy = MIN(left, sizeof(block->bl_data)/sizeof(block->bl_data[0]));
- memcpy(newblock->bl_data, &g_array_index(data, blockid_t, copied), tocopy*sizeof(blockid_t));
- newblock->used = tocopy;
- block = newblock;
- head = new;
- ibex_block_dirty(newblock);
- }
- copied += tocopy;
- }
- return head;
-}
-
-static blockid_t
-disk_remove(struct _IBEXStore *store, blockid_t head, nameid_t data)
-{
- blockid_t node = head;
-
- d(printf("removing %d from %d\n", data, head));
- while (node) {
- struct _block *block = ibex_block_read(store->blocks, node);
- int i;
-
- for (i=0;i<block->used;i++) {
- if (block->bl_data[i] == data) {
- struct _block *start = ibex_block_read(store->blocks, head);
-
- start->used--;
- block->bl_data[i] = start->bl_data[start->used];
- if (start->used == 0) {
- struct _root *root = (struct _root *)ibex_block_read(store->blocks, 0);
- blockid_t new;
-
- d(printf("dropping block %d, new head = %d\n", head, start->next));
- new = start->next;
- start->next = root->free;
- root->free = head;
- head = new;
- ibex_block_dirty((struct _block *)root);
- }
- ibex_block_dirty(block);
- ibex_block_dirty(start);
- return head;
- }
- }
- node = block->next;
- }
- return head;
-}
-
-static void disk_free(struct _IBEXStore *store, blockid_t head)
-{
- blockid_t next;
- struct _block *block;
-
- while (head) {
- block = ibex_block_read(store->blocks, head);
- next = block->next;
- ibex_block_free(store->blocks, head);
- head = next;
- }
-}
-
-static gboolean
-disk_find(struct _IBEXStore *store, blockid_t head, nameid_t data)
-{
- blockid_t node = head;
-
- d(printf("finding %d from %d\n", data, head));
- while (node) {
- struct _block *block = ibex_block_read(store->blocks, node);
- int i;
-
- for (i=0;i<block->used;i++) {
- if (block->bl_data[i] == data) {
- return TRUE;
- }
- }
- node = block->next;
- }
- return FALSE;
-}
-
-static GArray *
-disk_get(struct _IBEXStore *store, blockid_t head)
-{
- GArray *result = g_array_new(0, 0, sizeof(nameid_t));
-
- while (head) {
- struct _block *block = ibex_block_read(store->blocks, head);
-
- d(printf("getting data from block %d\n", head));
-
- g_array_append_vals(result, block->bl_data, block->used);
- head = block->next;
- d(printf("next = %d\n", head));
- }
- return result;
-}
-
-void
-ibex_diskarray_dump(struct _memcache *blocks, blockid_t head)
-{
- blockid_t node = head;
-
- printf("dumping list %d\n", node);
- while (node) {
- struct _block *block = ibex_block_read(blocks, node);
- int i;
-
- printf(" block %d used %d\n ", node, block->used);
- for (i=0;i<block->used;i++) {
- printf(" %d", block->bl_data[i]);
- }
- printf("\n");
- node = block->next;
- }
-}
diff --git a/libibex/disktail.c b/libibex/disktail.c
deleted file mode 100644
index 0117924d4f..0000000000
--- a/libibex/disktail.c
+++ /dev/null
@@ -1,820 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 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.
- */
-
-/* a disk based array storage class that stores the tails of data lists
- in common blocks */
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <glib.h>
-
-#include "block.h"
-#include "index.h"
-
-#define d(x)
-/*#define DEBUG*/
-
-/* marker to define which root keys indicate a single length key */
-#define BLOCK_ONE (1<<BLOCK_BITS)
-
-/* tail blocks only contain tail data ... */
-/* and we pack it in, similar to the key data, only more compact */
-struct _tailblock {
- unsigned int next:32-BLOCK_BITS; /* only needs to point to block numbers */
- unsigned int used:BLOCK_BITS; /* how many entries are used */
- union {
- unsigned char offset[BLOCK_SIZE-4]; /* works upto blocksize of 1024 bytes */
- nameid_t data[(BLOCK_SIZE-4)/4];
- } tailblock_u;
-};
-#define tb_offset tailblock_u.offset
-#define tb_data tailblock_u.data
-
-/* map a tail index to a block index */
-#define TAIL_INDEX(b) ((b) & (BLOCK_SIZE-1))
-/* map a tail index to a block number */
-#define TAIL_BLOCK(b) ((b) & ~(BLOCK_SIZE-1))
-/* map a block + index to a tailid */
-#define TAIL_KEY(b, i) (((b) & ~(BLOCK_SIZE-1)) | ((i) & (BLOCK_SIZE-1)))
-
-#define TAIL_THRESHOLD ((BLOCK_SIZE-8)/6)
-
-static struct _IBEXStore *disk_create(struct _memcache *bc);
-static int disk_sync(struct _IBEXStore *store);
-static int disk_close(struct _IBEXStore *store);
-
-static blockid_t disk_add(struct _IBEXStore *store, blockid_t *head, blockid_t *tail, nameid_t data);
-static blockid_t disk_add_list(struct _IBEXStore *store, blockid_t *head, blockid_t *tail, GArray *data);
-static blockid_t disk_remove(struct _IBEXStore *store, blockid_t *head, blockid_t *tail, nameid_t data);
-static void disk_free(struct _IBEXStore *store, blockid_t head, blockid_t tail);
-
-static gboolean disk_find(struct _IBEXStore *store, blockid_t head, blockid_t tail, nameid_t data);
-static GArray *disk_get(struct _IBEXStore *store, blockid_t head, blockid_t tail);
-
-struct _IBEXStoreClass ibex_diskarray_class = {
- disk_create, disk_sync, disk_close,
- disk_add, disk_add_list,
- disk_remove, disk_free,
- disk_find, disk_get
-};
-
-
-static int
-tail_info(struct _memcache *blocks, struct _tailblock *bucket, nameid_t tailid, blockid_t **startptr)
-{
- blockid_t *start, *end;
- int index;
-
- /* get start/end of area to zap */
- index = TAIL_INDEX(tailid);
- start = &bucket->tb_data[bucket->tb_offset[index]];
- if (index == 0) {
- end = &bucket->tb_data[sizeof(bucket->tb_data)/sizeof(bucket->tb_data[0])];
- } else {
- end = &bucket->tb_data[bucket->tb_offset[index-1]];
- }
- if (startptr)
- *startptr = start;
-
- ibex_block_cache_assert(blocks, end >= start);
-
- return end-start;
-}
-
-/* compresses (or expand) the bucket entry, to the new size */
-static void
-tail_compress(struct _memcache *blocks, struct _tailblock *bucket, int index, int newsize)
-{
- int i;
- blockid_t *start, *end, *newstart;
-
- /* get start/end of area to zap */
- start = &bucket->tb_data[bucket->tb_offset[index]];
- if (index == 0) {
- end = &bucket->tb_data[sizeof(bucket->tb_data)/sizeof(bucket->tb_data[0])];
- } else {
- end = &bucket->tb_data[bucket->tb_offset[index-1]];
- }
-
- if (end-start == newsize)
- return;
-
- /*
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXyyyyy
- 0 20 25
-
- newsize = 0
- end = 25
- newstart = 0
- start = 20
-
- newstart+(end-start)-newsize = 5
- i = start-newstart
-
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXyyyyy
- 0 20 25
-
- newsize = 2
- end = 25
- newstart = 0
- start = 20
-
- newstart+(end-start)-newsize = 3
- i = start-newstart + MIN(end-start, newsize)) = 22
-
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- 5 25
- newsize = 5
- end = 25
- start = 25
- newstart = 5
-
- newstart+(end-start)-newsize = 0
- i = start-newstart = 20
-
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXyy
- 3 23 25
- newsize = 5
- end = 25
- start = 23
- newstart = 3
-
- newstart+(end-start)-newsize = 0
- i = start-newstart + MIN(end-start, newsize) = 22
-
- */
-
-
- /* fixup data */
- newstart = &bucket->tb_data[bucket->tb_offset[bucket->used-1]];
-
- ibex_block_cache_assert(blocks, newstart+(end-start)-newsize <= &bucket->tb_data[sizeof(bucket->tb_data)/sizeof(bucket->tb_data[0])]);
- ibex_block_cache_assert(blocks, newstart + (start-newstart) + MIN(end-start, newsize) <= &bucket->tb_data[sizeof(bucket->tb_data)/sizeof(bucket->tb_data[0])]);
- ibex_block_cache_assert(blocks, newstart+(end-start)-newsize >= (blockid_t *) &bucket->tb_offset[bucket->used]);
- ibex_block_cache_assert(blocks, newstart + (start-newstart) + MIN(end-start, newsize) >= (blockid_t *) &bucket->tb_offset[bucket->used]);
-
- memmove(newstart+(end-start)-newsize, newstart, ((start-newstart)+MIN(end-start, newsize)) * sizeof(blockid_t));
-
- /* fixup key pointers */
- for (i=index;i<bucket->used;i++) {
- bucket->tb_offset[i] += (end-start)-newsize;
- }
- ibex_block_dirty((struct _block *)bucket);
-}
-
-/*
- returns the number of blockid's free
-*/
-static int
-tail_space(struct _tailblock *tail)
-{
- if (tail->used == 0)
- return sizeof(tail->tb_data)/sizeof(tail->tb_data[0])-1;
-
- return &tail->tb_data[tail->tb_offset[tail->used-1]]
- - (blockid_t *)&tail->tb_offset[tail->used] - 1;
-}
-
-#if 0
-static void
-tail_dump(struct _memcache *blocks, blockid_t tailid)
-{
- int i;
- struct _tailblock *tail = (struct _tailblock *)ibex_block_read(blocks, TAIL_BLOCK(tailid));
-
- printf("Block %d, used %d\n", tailid, tail->used);
- for (i=0;i<sizeof(struct _tailblock)/sizeof(unsigned int);i++) {
- printf(" %08x", ((unsigned int *)tail)[i]);
- }
- printf("\n");
-}
-#endif
-
-static blockid_t
-tail_get(struct _memcache *blocks, int size)
-{
- blockid_t tailid;
- struct _tailblock *tail;
- int freeindex;
- blockid_t *end;
- int i, count = 0;
-
- d(printf("looking for a tail node with %d items in it\n", size));
-
- /* look for a node with enough space, if we dont find it fairly
- quickly, just quit. needs a better free algorithm i think ... */
- tailid = blocks->root.tail;
- while (tailid && count<5) {
- int space;
-
- d(printf(" checking tail node %d\n", tailid));
-
- tail = (struct _tailblock *)ibex_block_read(blocks, tailid);
-
- if (tail->used == 0) {
- /* assume its big enough ... */
- tail->used = 1;
- tail->tb_offset[0] = sizeof(tail->tb_data)/sizeof(tail->tb_data[0]) - size;
- d(printf("allocated %d (%d), used %d\n", tailid, tailid, tail->used));
- ibex_block_dirty((struct _block *)tail);
-
- ibex_block_cache_assert(blocks, &tail->tb_offset[tail->used-1]
- < (unsigned char *) &tail->tb_data[tail->tb_offset[tail->used-1]]);
-
- return tailid;
- }
-
- ibex_block_cache_assert(blocks, &tail->tb_offset[tail->used-1]
- < (unsigned char *) &tail->tb_data[tail->tb_offset[tail->used-1]]);
-
- /* see if we have a free slot first */
- freeindex = -1;
- end = &tail->tb_data[sizeof(tail->tb_data)/sizeof(tail->tb_data[0])];
- for (i=0;i<tail->used;i++) {
- if (end == &tail->tb_data[tail->tb_offset[i]]) {
- freeindex = i;
- break;
- }
- end = &tail->tb_data[tail->tb_offset[i]];
- }
-
- /* determine how much space we have available - incl any extra header we might need */
- space = ((char *)&tail->tb_data[tail->tb_offset[tail->used-1]])
- - ((char *)&tail->tb_offset[tail->used])
- /* FIXMEL work out why this is out a little bit */
- - 8;
- if (freeindex == -1)
- space -= sizeof(tail->tb_offset[0]);
-
- /* if we have enough, set it up, creating a new entry if necessary */
- /* for some really odd reason the compiler promotes this expression to unsigned, hence
- the requirement for the space>0 check ... */
- if (space>0 && space > size*sizeof(blockid_t)) {
- d(printf("space = %d, size = %d size*sizeof() = %d truth = %d\n", space, size, size*sizeof(blockid_t), space>size*sizeof(blockid_t)));
- if (freeindex == -1) {
- freeindex = tail->used;
- tail->tb_offset[tail->used] = tail->tb_offset[tail->used-1];
- tail->used++;
- }
- tail_compress(blocks, tail, freeindex, size);
- ibex_block_dirty((struct _block *)tail);
- d(printf("allocated %d (%d), used %d\n", tailid, TAIL_KEY(tailid, freeindex), tail->used));
- return TAIL_KEY(tailid, freeindex);
- }
- count++;
- tailid = block_location(tail->next);
- }
-
- d(printf("allocating new data node for tail data\n"));
- tailid = ibex_block_get(blocks);
- tail = (struct _tailblock *)ibex_block_read(blocks, tailid);
- tail->next = block_number(blocks->root.tail);
- blocks->root.tail = tailid;
- tail->used = 1;
- tail->tb_offset[0] = sizeof(tail->tb_data)/sizeof(tail->tb_data[0]) - size;
- ibex_block_dirty((struct _block *)tail);
- d(printf("allocated %d (%d), used %d\n", tailid, TAIL_KEY(tailid, 0), tail->used));
-
- g_assert(&tail->tb_offset[tail->used-1]
- < (unsigned char *) &tail->tb_data[tail->tb_offset[tail->used-1]]);
-
- return TAIL_KEY(tailid, 0);
-}
-
-static void
-tail_free(struct _memcache *blocks, blockid_t tailid)
-{
- struct _tailblock *tail;
-
- d(printf("freeing tail id %d\n", tailid));
-
- if (tailid == 0)
- return;
-
- tail = (struct _tailblock *)ibex_block_read(blocks, TAIL_BLOCK(tailid));
- d(printf(" tail %d used %d\n", tailid, tail->used));
- ibex_block_cache_assert(blocks, tail->used);
- if (TAIL_INDEX(tailid) == tail->used - 1) {
- tail->used --;
- } else {
- tail_compress(blocks, tail, TAIL_INDEX(tailid), 0);
- }
- ibex_block_dirty((struct _block *)tail);
-}
-
-static struct _IBEXStore *disk_create(struct _memcache *bc)
-{
- struct _IBEXStore *store;
-
- store = g_malloc0(sizeof(*store));
- store->klass = &ibex_diskarray_class;
- store->blocks = bc;
-
- return store;
-}
-
-static int disk_sync(struct _IBEXStore *store)
-{
- /* no cache, nop */
- return 0;
-}
-
-static int disk_close(struct _IBEXStore *store)
-{
- g_free(store);
- return 0;
-}
-
-static blockid_t
-disk_add(struct _IBEXStore *store, blockid_t *headptr, blockid_t *tailptr, nameid_t data)
-{
- struct _block *block;
- struct _block *newblock;
- blockid_t new, head = *headptr /*, tail = *tailptr*/;
-
- g_error("Inbimplemented");
-
- if (head == 0) {
- head = ibex_block_get(store->blocks);
- }
- block = ibex_block_read(store->blocks, head);
-
- d(printf("adding record %d to block %d (next = %d)\n", data, head, block->next));
-
- if (block->used < sizeof(block->bl_data)/sizeof(block->bl_data[0])) {
- (printf("adding record into block %d %d\n", head, data));
- block->bl_data[block->used] = data;
- block->used++;
- ibex_block_dirty(block);
- return head;
- } else {
- new = ibex_block_get(store->blocks);
- newblock = ibex_block_read(store->blocks, new);
- newblock->next = block_number(head);
- newblock->bl_data[0] = data;
- newblock->used = 1;
- d(printf("adding record into new %d %d, next =%d\n", new, data, newblock->next));
- ibex_block_dirty(newblock);
- return new;
- }
-}
-
-static blockid_t
-disk_add_blocks_internal(struct _IBEXStore *store, blockid_t *headptr, blockid_t *tailptr, GArray *data)
-{
- blockid_t head = *headptr, tail = *tailptr, new;
- int tocopy;
- struct _tailblock *tailblock;
- struct _block *block, *newblock;
- int space, copied = 0, left;
-
- /* assumes this funciton is in control of any tail creation */
- ibex_block_cache_assert(store->blocks, tail == 0);
-
- d(printf("Adding %d items to block list\n", data->len));
-
- if (head == 0) {
- head = ibex_block_get(store->blocks);
- d(printf("allocating new head %d\n", head));
- }
- block = ibex_block_read(store->blocks, head);
-
- /* ensure the first block is full before proceeding */
- space = sizeof(block->bl_data)/sizeof(block->bl_data[0]) - block->used;
- if (space) {
- tocopy = MIN(data->len, space);
- memcpy(block->bl_data+block->used, &g_array_index(data, blockid_t, copied), tocopy*sizeof(blockid_t));
- block->used += tocopy;
- ibex_block_dirty(block);
- copied = tocopy;
- d(printf("copied %d items to left over last node\n", tocopy));
- }
-
- while (copied < data->len) {
- left = data->len - copied;
- /* do we drop the rest in a tail? */
- if (left < TAIL_THRESHOLD) {
- d(printf("Storing remaining %d items in tail\n", left));
- tocopy = left;
- new = tail_get(store->blocks, tocopy);
- tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(new));
- memcpy(&tailblock->tb_data[tailblock->tb_offset[TAIL_INDEX(new)]],
- &g_array_index(data, blockid_t, copied), tocopy*sizeof(blockid_t));
- *tailptr = new;
- } else {
- new = ibex_block_get(store->blocks);
- newblock = (struct _block *)ibex_block_read(store->blocks, new);
- newblock->next = block_number(head);
- tocopy = MIN(left, sizeof(block->bl_data)/sizeof(block->bl_data[0]));
- d(printf("storing %d items in own block\n", tocopy));
- memcpy(newblock->bl_data, &g_array_index(data, blockid_t, copied), tocopy*sizeof(blockid_t));
- newblock->used = tocopy;
- block = newblock;
- head = new;
- ibex_block_dirty(newblock);
- }
- copied += tocopy;
- }
-
- *headptr = head;
- return head;
-}
-/*
- case 1:
- no head, no tail, adding a lot of data
- add blocks until the last, which goes in a tail node
- case 2:
- no head, no tail, adding a little data
- just add a tail node
- case 3:
- no head, tail, total exceeds a block
- merge as much as possible into new full blocks, then the remainder in the tail
- case 4:
- no head, tail, room in existing tail for data
- add new data to tail node
- case 5:
- no head, tail, no room in existing tail for data
- add a new tail node, copy data across, free old tail node
-*/
-
-static blockid_t
-disk_add_list(struct _IBEXStore *store, blockid_t *headptr, blockid_t *tailptr, GArray *data)
-{
- blockid_t new, head = *headptr, tail = *tailptr, *start;
- struct _tailblock *tailblock, *tailnew;
- int len;
- GArray *tmpdata = NULL;
-
- d(printf("adding %d items head=%d tail=%d\n", data->len, head, tail));
- if (data->len == 0)
- return head;
-
- /* store length=1 data in the tail pointer */
- if (head == 0 && tail == 0 && data->len == 1) {
- *headptr = BLOCK_ONE;
- *tailptr = g_array_index(data, blockid_t, 0);
- return BLOCK_ONE;
- }
- /* if we got length=1 data to append to, upgrade it to a real block list */
- if (head == BLOCK_ONE) {
- tmpdata = g_array_new(0, 0, sizeof(blockid_t));
- g_array_append_vals(tmpdata, data->data, data->len);
- g_array_append_val(tmpdata, tail);
- head = *headptr = 0;
- tail = *tailptr = 0;
- }
-
- /* if we have no head, then check the tail */
- if (head == 0) {
- if (tail == 0) {
- if (data->len >= TAIL_THRESHOLD) {
- /* add normally */
- head = disk_add_blocks_internal(store, headptr, tailptr, data);
- } else {
- /* else add to a tail block */
- new = tail_get(store->blocks, data->len);
- d(printf("adding %d items to a tail block %d\n", data->len, new));
- tailnew = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(new));
- memcpy(&tailnew->tb_data[tailnew->tb_offset[TAIL_INDEX(new)]],
- data->data, data->len*sizeof(blockid_t));
- *tailptr = new;
- ibex_block_dirty((struct _block *)tailnew);
- }
- } else {
- tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(tail));
- len = tail_info(store->blocks, tailblock, tail, &start);
- /* case 3 */
- if (len + data->len >= TAIL_THRESHOLD) {
- /* this is suboptimal, but should work - merge the tail data with
- our new data, and write it out */
- if (tmpdata == NULL) {
- tmpdata = g_array_new(0, 0, sizeof(blockid_t));
- g_array_append_vals(tmpdata, data->data, data->len);
- }
- g_array_append_vals(tmpdata, start, len);
- *tailptr = 0;
- tail_free(store->blocks, tail);
- head = disk_add_blocks_internal(store, headptr, tailptr, tmpdata);
- } else if (tail_space(tailblock) >= data->len) {
- /* can we just expand this in our node, or do we need a new one? */
- tail_compress(store->blocks, tailblock, TAIL_INDEX(tail), data->len + len);
- memcpy(&tailblock->tb_data[tailblock->tb_offset[TAIL_INDEX(tail)] + len],
- data->data, data->len * sizeof(blockid_t));
- ibex_block_dirty((struct _block *)tailblock);
- } else {
- /* we need to allocate a new tail node */
- new = tail_get(store->blocks, data->len + len);
- /* and copy the data across */
- tailnew = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(new));
- memcpy(&tailnew->tb_data[tailnew->tb_offset[TAIL_INDEX(new)]],
- start, len*sizeof(blockid_t));
- memcpy(&tailnew->tb_data[tailnew->tb_offset[TAIL_INDEX(new)]+len],
- data->data, data->len*sizeof(blockid_t));
- tail_free(store->blocks, tail);
- ibex_block_dirty((struct _block *)tailnew);
- *tailptr = new;
- }
- }
- } else {
- if (tail) {
- /* read/merge the tail with the new data, rewrite out.
- suboptimal, but it should be 'ok' ? */
- tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(tail));
- len = tail_info(store->blocks, tailblock, tail, &start);
- tmpdata = g_array_new(0, 0, sizeof(blockid_t));
- g_array_append_vals(tmpdata, start, len);
- g_array_append_vals(tmpdata, data->data, data->len);
- *tailptr = 0;
- tail_free(store->blocks, tail);
- head = disk_add_blocks_internal(store, headptr, tailptr, tmpdata);
- } else {
- head = disk_add_blocks_internal(store, headptr, tailptr, data);
- }
- }
- if (tmpdata)
- g_array_free(tmpdata, TRUE);
-
- return head;
-}
-
-static blockid_t
-disk_remove(struct _IBEXStore *store, blockid_t *headptr, blockid_t *tailptr, nameid_t data)
-{
- blockid_t head = *headptr, node = *headptr, tail = *tailptr;
- int i;
-
- /* special case for 1-item nodes */
- if (head == BLOCK_ONE) {
- if (tail == data) {
- *tailptr = 0;
- *headptr = 0;
- head = 0;
- }
- return head;
- }
-
- d(printf("removing %d from %d\n", data, head));
- while (node) {
- struct _block *block = ibex_block_read(store->blocks, node);
-
- for (i=0;i<block->used;i++) {
- if (block->bl_data[i] == data) {
- struct _block *start = ibex_block_read(store->blocks, head);
-
- d(printf("removing data from block %d\n ", head));
-
- start->used--;
- block->bl_data[i] = start->bl_data[start->used];
- if (start->used == 0) {
- blockid_t new;
-
- d(printf("dropping block %d, new head = %d\n", head, start->next));
- new = block_location(start->next);
- start->next = block_number(store->blocks->root.free);
- store->blocks->root.free = head;
- head = new;
- }
- ibex_block_dirty(block);
- ibex_block_dirty(start);
- *headptr = head;
- return head;
- }
- }
- node = block_location(block->next);
- }
-
- if (tail) {
- struct _tailblock *tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(tail));
- int len;
- blockid_t *start;
-
- len = tail_info(store->blocks, tailblock, tail, &start);
- for (i=0;i<len;i++) {
- if (start[i] == data) {
- for (;i<len-1;i++)
- start[i] = start[i+1];
- if (len == 1)
- *tailptr = 0;
- if (len == 1 && (tailblock->used-1) == TAIL_INDEX(tail)) {
- d(printf("dropping/unlinking tailblock %d (%d) used = %d\n",
- TAIL_BLOCK(tail), tail, tailblock->used));
- tailblock->used--;
- /* drop/unlink block? */
- ibex_block_dirty((struct _block *)tailblock);
- *tailptr = 0;
- } else {
- tail_compress(store->blocks, tailblock, TAIL_INDEX(tail), len-1);
- ibex_block_dirty((struct _block *)tailblock);
- }
- }
- }
-
- }
-
- return head;
-}
-
-static void disk_free(struct _IBEXStore *store, blockid_t head, blockid_t tail)
-{
- blockid_t next;
- struct _block *block;
-
- if (head == BLOCK_ONE)
- return;
-
- while (head) {
- d(printf("freeing block %d\n", head));
- block = ibex_block_read(store->blocks, head);
- next = block_location(block->next);
- ibex_block_free(store->blocks, head);
- head = next;
- }
- if (tail) {
- struct _tailblock *tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(tail));
- d(printf("freeing tail block %d (%d)\n", TAIL_BLOCK(tail), tail));
- tail_compress(store->blocks, tailblock, TAIL_INDEX(tail), 0);
- ibex_block_dirty((struct _block *)tailblock);
- }
-}
-
-static gboolean
-disk_find(struct _IBEXStore *store, blockid_t head, blockid_t tail, nameid_t data)
-{
- blockid_t node = head;
- int i;
-
- d(printf("finding %d from %d\n", data, head));
-
- if (head == BLOCK_ONE)
- return data == tail;
-
- /* first check full blocks */
- while (node) {
- struct _block *block = ibex_block_read(store->blocks, node);
-
- for (i=0;i<block->used;i++) {
- if (block->bl_data[i] == data) {
- return TRUE;
- }
- }
- node = block_location(block->next);
- }
-
- /* then check tail */
- if (tail) {
- struct _tailblock *tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(tail));
- int len;
- blockid_t *start;
-
- len = tail_info(store->blocks, tailblock, tail, &start);
- for (i=0;i<len;i++) {
- if (start[i] == data)
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static GArray *
-disk_get(struct _IBEXStore *store, blockid_t head, blockid_t tail)
-{
- GArray *result = g_array_new(0, 0, sizeof(nameid_t));
-
- if (head == BLOCK_ONE) {
- g_array_append_val(result, tail);
- return result;
- }
-
- while (head) {
- struct _block *block = ibex_block_read(store->blocks, head);
-
- d(printf("getting data from block %d\n", head));
-
- g_array_append_vals(result, block->bl_data, block->used);
- head = block_location(block->next);
- d(printf("next = %d\n", head));
- }
-
- /* chuck on any tail data as well */
- if (tail) {
- struct _tailblock *tailblock;
- int len;
- blockid_t *start;
-
- tailblock = (struct _tailblock *)ibex_block_read(store->blocks, TAIL_BLOCK(tail));
- len = tail_info(store->blocks, tailblock, tail, &start);
- g_array_append_vals(result, start, len);
- }
- return result;
-}
-
-void ibex_diskarray_dump(struct _memcache *blocks, blockid_t head, blockid_t tail);
-
-void
-ibex_diskarray_dump(struct _memcache *blocks, blockid_t head, blockid_t tail)
-{
- blockid_t node = head;
-
- printf("dumping list %d tail %d\n", node, tail);
- if (head == BLOCK_ONE) {
- printf(" 1 length index: %d\n", tail);
- return;
- }
-
- while (node) {
- struct _block *block = ibex_block_read(blocks, node);
- int i;
-
- printf(" block %d used %d\n ", node, block->used);
- for (i=0;i<block->used;i++) {
- printf(" %d", block->bl_data[i]);
- }
- printf("\n");
- node = block_location(block->next);
- }
-
- printf("tail: ");
- if (tail) {
- struct _tailblock *tailblock;
- int len;
- blockid_t *start;
- int i;
-
- tailblock = (struct _tailblock *)ibex_block_read(blocks, TAIL_BLOCK(tail));
- len = tail_info(blocks, tailblock, tail, &start);
- for (i=0;i<len;i++)
- printf(" %d", start[i]);
- }
- printf("\n");
-}
-
-#if 0
-int main(int argc, char **argv)
-{
- struct _memcache *bc;
- struct _IBEXStore *disk;
- int i;
- blockid_t data[100];
- GArray adata;
- blockid_t head=0, tail=0;
-
- for (i=0;i<100;i++) {
- data[i] = i;
- }
-
- bc = ibex_block_cache_open("index.db", O_CREAT|O_RDWR, 0600);
- disk = ibex_diskarray_class.create(bc);
-
- head = 0;
- tail = 0;
- adata.data = data;
- adata.len = 70;
- for (i=0;i<100;i++) {
- printf("Loop %d\n", i);
- ibex_diskarray_class.add_list(disk, &head, &tail, &adata);
- ibex_diskarray_dump(bc, head, tail);
- }
-
-#if 0
- for (i=1;i<100;i++) {
- printf("inserting %d items\n", i);
- adata.data = data;
- adata.len = i;
- head=0;
- tail=0;
- ibex_diskarray_class.add_list(disk, &head, &tail, &adata);
- ibex_diskarray_dump(bc, head, tail);
- }
-#endif
- ibex_diskarray_class.close(disk);
- ibex_block_cache_close(bc);
- return 0;
-}
-
-#endif
diff --git a/libibex/dumpindex.c b/libibex/dumpindex.c
deleted file mode 100644
index 5f8cacd603..0000000000
--- a/libibex/dumpindex.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- Dump the hash tables from an ibex file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "ibex_internal.h"
-
-extern void ibex_hash_dump(struct _IBEXIndex *index);
-
-static void
-index_iterate(struct _IBEXIndex *index)
-{
- struct _IBEXCursor *idc;
- int len;
- char *key;
- int total = 0, totallen = 0;
-
- idc = index->klass->get_cursor(index);
- key = idc->klass->next_key(idc, &len);
- while (len) {
- total++;
- totallen += len;
- printf("%s\n", key);
- g_free(key);
- key = idc->klass->next_key(idc, &len);
- }
- g_free(key);
-
- idc->klass->close(idc);
-
- printf("Iterate Totals: %d items, total bytes %d\n", total, totallen);
-}
-
-int main(int argc, char **argv)
-{
- ibex *ib;
-
-#ifdef ENABLE_THREADS
- g_thread_init(0);
-#endif
-
- if (argc != 2) {
- printf("Usage: %s ibexfile\n", argv[0]);
- return 1;
- }
- ib = ibex_open(argv[1], O_RDONLY, 0);
- if (ib == NULL) {
- perror("Opening ibex file\n");
- return 1;
- }
-
- /* force real-open of the ibex internals */
- ibex_contains_name(ib, "dummy");
-
- ibex_hash_dump(ib->words->wordindex);
- ibex_hash_dump(ib->words->nameindex);
-
- index_iterate(ib->words->wordindex);
- index_iterate(ib->words->nameindex);
-
- ibex_close(ib);
-
- return 0;
-}
diff --git a/libibex/hash.c b/libibex/hash.c
deleted file mode 100644
index e0ad09ac2f..0000000000
--- a/libibex/hash.c
+++ /dev/null
@@ -1,857 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 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.
- */
-
-/* hash based index mechanism */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "block.h"
-#include "index.h"
-
-#define d(x)
-
-#define HASH_SIZE (1024)
-#define KEY_THRESHOLD (sizeof(struct _hashkey) + 4) /* minimum number of free bytes we worry about
- maintaining free blocks for */
-#define ARRAY_LEN(a) (sizeof(a)/sizeof(a[0]))
-
-typedef guint32 hashid_t;
-
-struct _HASHCursor {
- struct _IBEXCursor cursor;
-
- hashid_t key;
- hashid_t block;
- unsigned int index;
- unsigned int size;
-};
-
-static struct _IBEXIndex *hash_create(struct _memcache *bc, int size);
-static struct _IBEXIndex *hash_open(struct _memcache *bc, blockid_t root);
-static int hash_sync(struct _IBEXIndex *index);
-static int hash_close(struct _IBEXIndex *index);
-
-static hashid_t hash_find(struct _IBEXIndex *index, const char *key, int keylen);
-static void hash_remove(struct _IBEXIndex *index, const char *key, int keylen);
-static hashid_t hash_insert(struct _IBEXIndex *index, const char *key, int keylen);
-static char *hash_get_key(struct _IBEXIndex *index, hashid_t hashbucket, int *len);
-static void hash_set_data_block(struct _IBEXIndex *index, hashid_t keyid, blockid_t blockid, blockid_t tail);
-static blockid_t hash_get_data_block(struct _IBEXIndex *index, hashid_t keyid, blockid_t *tail);
-static struct _IBEXCursor *hash_get_cursor(struct _IBEXIndex *index);
-
-static struct _IBEXCursor *hash_cursor_create(struct _IBEXIndex *);
-static void hash_cursor_close(struct _IBEXCursor *);
-static guint32 hash_cursor_next(struct _IBEXCursor *);
-static char *hash_cursor_next_key(struct _IBEXCursor *, int *keylenptr);
-
-struct _IBEXIndexClass ibex_hash_class = {
- hash_create, hash_open,
- hash_sync, hash_close,
- hash_find,
- hash_remove,
- hash_insert,
- hash_get_key,
- hash_set_data_block,
- hash_get_data_block,
- hash_get_cursor,
-};
-
-struct _IBEXCursorClass ibex_hash_cursor_class = {
- hash_cursor_close,
- hash_cursor_next,
- hash_cursor_next_key
-};
-
-/* the reason we have the tail here is that otherwise we need to
- have a 32 bit blockid for the root node; which would make this
- structure the same size anyway, with about 24 wasted bits */
-struct _hashkey {
- blockid_t next; /* next in hash chain */
- blockid_t tail;
- unsigned int root:32-BLOCK_BITS;
- unsigned int keyoffset:BLOCK_BITS;
-};
-
-struct _hashblock {
- unsigned int next:32-BLOCK_BITS; /* next block, linked list of all key blocks: block number */
- unsigned int used:BLOCK_BITS; /* number of elements used */
- union {
- struct _hashkey keys[(BLOCK_SIZE-4)/sizeof(struct _hashkey)];
- char keydata[BLOCK_SIZE-4];
- } hashblock_u;
-};
-#define hb_keys hashblock_u.keys
-#define hb_keydata hashblock_u.keydata
-
-/* size of block overhead + 2 key block overhead */
-#define MAX_KEYLEN (BLOCK_SIZE - 4 - 12 - 12)
-
-/* root block for a hash index */
-struct _hashroot {
- hashid_t free; /* free list */
- guint32 size; /* how big the hash table is */
- hashid_t keys; /* linked list of blocks */
- hashid_t table[(BLOCK_SIZE-8)/sizeof(hashid_t)]; /* pointers to blocks of pointers */
-};
-
-struct _hashtableblock {
- hashid_t buckets[BLOCK_SIZE/sizeof(hashid_t)];
-};
-
-/* map a hash index to a block index */
-#define HASH_INDEX(b) ((b) & (BLOCK_SIZE-1))
-/* map a hash index to a block number */
-#define HASH_BLOCK(b) ((b) & ~(BLOCK_SIZE-1))
-/* map a block + index to a hash key */
-#define HASH_KEY(b, i) (((b) & ~(BLOCK_SIZE-1)) | ((i) & (BLOCK_SIZE-1)))
-
-/* taken from tdb/gdbm */
-static unsigned int hash_key(const unsigned char *key, int keylen)
-{
- char *newkey;
- newkey = alloca(keylen+1);
- memcpy(newkey, key, keylen);
- newkey[keylen]=0;
- return g_str_hash(newkey);
-#if 0
- unsigned int value; /* Used to compute the hash value. */
- unsigned int i; /* Used to cycle through random values. */
-
- /* Set the initial value from the key size. */
- value = 0x238F13AF * keylen;
- for (i=0; i < keylen; i++) {
- value = (value + (key[i] << (i*5 % 24)));
- }
-
- value = (1103515243 * value + 12345);
-
- return value;
-#endif
-}
-
-/* create a new hash table, return a pointer to its root block */
-static struct _IBEXIndex *
-hash_create(struct _memcache *bc, int size)
-{
- blockid_t root, block;
- struct _hashroot *hashroot;
- int i;
- struct _hashtableblock *table;
- struct _IBEXIndex *index;
-
- g_assert(size<=10240);
-
- d(printf("initialising hash table, size = %d\n", size));
-
- index = g_malloc0(sizeof(*index));
- index->blocks = bc;
- index->klass = &ibex_hash_class;
- root = ibex_block_get(bc);
- index->root = root;
- d(printf(" root = %d\n", root));
- hashroot = (struct _hashroot *)ibex_block_read(bc, root);
- hashroot->free = 0;
- hashroot->size = size;
- ibex_block_dirty((struct _block *)hashroot);
- for (i=0;i<size/(BLOCK_SIZE/sizeof(blockid_t));i++) {
- d(printf("initialising hash table index block %d\n", i));
- block = hashroot->table[i] = ibex_block_get(bc);
- table = (struct _hashtableblock *)ibex_block_read(bc, block);
- memset(table, 0, sizeof(table));
- ibex_block_dirty((struct _block *)table);
- }
-
- return index;
-}
-
-static struct _IBEXIndex *
-hash_open(struct _memcache *bc, blockid_t root)
-{
- struct _IBEXIndex *index;
-
- /* FIXME: check a 'magic', and the root for validity */
-
- index = g_malloc0(sizeof(*index));
- index->blocks = bc;
- index->root = root;
- index->klass = &ibex_hash_class;
-
- return index;
-}
-
-
-static int hash_sync(struct _IBEXIndex *index)
-{
- /* nop, index always synced on disk (at least, to blocks) */
- return 0;
-}
-
-static int hash_close(struct _IBEXIndex *index)
-{
-#ifdef INDEX_STAT
- printf("Performed %d lookups, average %f depth\n", index->lookups, (double)index->lookup_total/index->lookups);
-#endif
- g_free(index);
- return 0;
-}
-
-/* get an iterator class */
-static struct _IBEXCursor *hash_get_cursor(struct _IBEXIndex *index)
-{
- return hash_cursor_create(index);
-}
-
-/* convert a hashbucket id into a name */
-static char *
-hash_get_key(struct _IBEXIndex *index, hashid_t hashbucket, int *len)
-{
- struct _hashblock *bucket;
- int ind;
- char *ret, *start, *end;
-
- if (hashbucket == 0) {
- if (len)
- *len = 0;
- return g_strdup("");
- }
-
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(hashbucket));
- ind = HASH_INDEX(hashbucket);
-
- ibex_block_cache_assert(index->blocks, ind < bucket->used);
-
- start = &bucket->hb_keydata[bucket->hb_keys[ind].keyoffset];
- if (ind == 0) {
- end = &bucket->hb_keydata[sizeof(bucket->hb_keydata)/sizeof(bucket->hb_keydata[0])];
- } else {
- end = &bucket->hb_keydata[bucket->hb_keys[ind-1].keyoffset];
- }
-
- ret = g_malloc(end-start+1);
- memcpy(ret, start, end-start);
- ret[end-start]=0;
- if (len)
- *len = end-start;
- return ret;
-}
-
-/* sigh, this is fnugly code ... */
-static hashid_t
-hash_find(struct _IBEXIndex *index, const char *key, int keylen)
-{
- struct _hashroot *hashroot;
- guint32 hash;
- int hashentry;
- blockid_t hashtable;
- hashid_t hashbucket;
- struct _hashtableblock *table;
-
- g_assert(index != 0);
- g_assert(index->root != 0);
-
- d(printf("finding hash %.*s\n", keylen, key));
-
- /* truncate the key to the maximum size */
- if (keylen > MAX_KEYLEN)
- keylen = MAX_KEYLEN;
-
- hashroot = (struct _hashroot *)ibex_block_read(index->blocks, index->root);
-
- /* find the table containing this entry */
- hash = hash_key(key, keylen) % hashroot->size;
- hashtable = hashroot->table[hash / (BLOCK_SIZE/sizeof(blockid_t))];
- ibex_block_cache_assert(index->blocks, hashtable != 0);
- table = (struct _hashtableblock *)ibex_block_read(index->blocks, hashtable);
- hashentry = hash % (BLOCK_SIZE/sizeof(blockid_t));
- /* and its bucket */
- hashbucket = table->buckets[hashentry];
-
-#ifdef INDEX_STAT
- index->lookups++;
-#endif
- /* go down the bucket chain, reading each entry till we are done ... */
- while (hashbucket != 0) {
- struct _hashblock *bucket;
- char *start, *end;
- int ind;
-
-#ifdef INDEX_STAT
- index->lookup_total++;
-#endif
-
- d(printf(" checking bucket %d\n", hashbucket));
-
- /* get the real bucket id from the hashbucket id */
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(hashbucket));
- /* and get the key number within the block */
- ind = HASH_INDEX(hashbucket);
-
- ibex_block_cache_assert(index->blocks, ind < bucket->used);
-
- start = &bucket->hb_keydata[bucket->hb_keys[ind].keyoffset];
- if (ind == 0) {
- end = &bucket->hb_keydata[sizeof(bucket->hb_keydata)/sizeof(bucket->hb_keydata[0])];
- } else {
- end = &bucket->hb_keydata[bucket->hb_keys[ind-1].keyoffset];
- }
- if ( (end-start) == keylen
- && memcmp(start, key, keylen) == 0) {
- return hashbucket;
- }
- hashbucket = bucket->hb_keys[ind].next;
- }
- return 0;
-}
-
-static int
-hash_info(struct _IBEXIndex *idex, struct _hashblock *bucket, int index)
-{
- char *start, *end;
-
- ibex_block_cache_assert(idex->blocks, index < bucket->used);
-
- start = &bucket->hb_keydata[bucket->hb_keys[index].keyoffset];
- if (index == 0) {
- end = &bucket->hb_keydata[sizeof(bucket->hb_keydata)/sizeof(bucket->hb_keydata[0])];
- } else {
- end = &bucket->hb_keydata[bucket->hb_keys[index-1].keyoffset];
- }
-
- return end-start;
-}
-
-
-/* TODO: get rid of hash_compress/remove and just have one a-la the disktail code */
-
-/* compresses the bucket 'bucket', removing data
- at index 'index' */
-static void
-hash_compress(struct _hashblock *bucket, int index)
-{
- int i;
- char *start, *end, *newstart;
-
- /* get start/end of area to zap */
- start = &bucket->hb_keydata[bucket->hb_keys[index].keyoffset];
- if (index == 0) {
- end = &bucket->hb_keydata[sizeof(bucket->hb_keydata)/sizeof(bucket->hb_keydata[0])];
- } else {
- end = &bucket->hb_keydata[bucket->hb_keys[index-1].keyoffset];
- }
-
- if (start == end)
- return;
-
- /* fixup data */
- newstart = &bucket->hb_keydata[bucket->hb_keys[bucket->used-1].keyoffset];
- memmove(newstart+(end-start), newstart, start-newstart);
-
- /* fixup key pointers */
- for (i=index;i<bucket->used;i++) {
- bucket->hb_keys[i].keyoffset += (end-start);
- }
- ibex_block_dirty((struct _block *)bucket);
-}
-
-/* make room 'len' for the key 'index' */
-/* assumes key 'index' is already empty (0 length) */
-static void
-hash_expand(struct _hashblock *bucket, int index, int len)
-{
- int i;
- char *end, *newstart;
-
- /* get start/end of area to zap */
- if (index == 0) {
- end = &bucket->hb_keydata[sizeof(bucket->hb_keydata)/sizeof(bucket->hb_keydata[0])];
- } else {
- end = &bucket->hb_keydata[bucket->hb_keys[index-1].keyoffset];
- }
-
- /* fixup data */
- newstart = &bucket->hb_keydata[bucket->hb_keys[bucket->used-1].keyoffset];
- memmove(newstart-len, newstart, end-newstart);
-
- /* fixup key pointers */
- for (i=index;i<bucket->used;i++) {
- bucket->hb_keys[i].keyoffset -= len;
- }
- ibex_block_dirty((struct _block *)bucket);
-}
-
-static void
-hash_remove(struct _IBEXIndex *index, const char *key, int keylen)
-{
- struct _hashroot *hashroot;
- guint32 hash;
- int hashentry;
- blockid_t hashtable;
- hashid_t hashbucket, hashprev;
- struct _hashtableblock *table;
-
- g_assert(index != 0);
- g_assert(index->root != 0);
-
- d(printf("removing hash %.*s\n", keylen, key));
-
- /* truncate the key to the maximum size */
- if (keylen > MAX_KEYLEN)
- keylen = MAX_KEYLEN;
-
- hashroot = (struct _hashroot *)ibex_block_read(index->blocks, index->root);
-
- /* find the table containing this entry */
- hash = hash_key(key, keylen) % hashroot->size;
- hashtable = hashroot->table[hash / (BLOCK_SIZE/sizeof(blockid_t))];
- table = (struct _hashtableblock *)ibex_block_read(index->blocks, hashtable);
- hashentry = hash % (BLOCK_SIZE/sizeof(blockid_t));
- /* and its bucket */
- hashbucket = table->buckets[hashentry];
-
- /* go down the bucket chain, reading each entry till we are done ... */
- hashprev = 0;
- while (hashbucket != 0) {
- struct _hashblock *bucket;
- char *start, *end;
- int ind;
-
- d(printf(" checking bucket %d\n", hashbucket));
-
- /* get the real bucket id from the hashbucket id */
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(hashbucket));
- /* and get the key number within the block */
- ind = HASH_INDEX(hashbucket);
-
- ibex_block_cache_assert(index->blocks, ind < bucket->used);
-
- start = &bucket->hb_keydata[bucket->hb_keys[ind].keyoffset];
- if (ind == 0) {
- end = &bucket->hb_keydata[sizeof(bucket->hb_keydata)/sizeof(bucket->hb_keydata[0])];
- } else {
- end = &bucket->hb_keydata[bucket->hb_keys[ind-1].keyoffset];
- }
- if ( (end-start) == keylen
- && memcmp(start, key, keylen) == 0) {
- struct _hashblock *prevbucket;
-
- if (hashprev == 0) {
- /* unlink from hash chain */
- table->buckets[hashentry] = bucket->hb_keys[HASH_INDEX(hashbucket)].next;
- /* link into free list */
- bucket->hb_keys[HASH_INDEX(hashbucket)].next = hashroot->free;
- hashroot->free = hashbucket;
- /* compress away data */
- hash_compress(bucket, HASH_INDEX(hashbucket));
- ibex_block_dirty((struct _block *)bucket);
- ibex_block_dirty((struct _block *)table);
- ibex_block_dirty((struct _block *)hashroot);
- } else {
- prevbucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(hashprev));
- prevbucket->hb_keys[HASH_INDEX(hashprev)].next = bucket->hb_keys[ind].next;
- /* link into free list */
- bucket->hb_keys[ind].next = hashroot->free;
- hashroot->free = hashbucket;
- /* compress entry */
- hash_compress(bucket, ind);
- ibex_block_dirty((struct _block *)bucket);
- ibex_block_dirty((struct _block *)prevbucket);
- ibex_block_dirty((struct _block *)hashroot);
- }
- return;
- }
- hashprev = hashbucket;
- hashbucket = bucket->hb_keys[ind].next;
- }
-}
-
-/* set where the datablock is located */
-static void
-hash_set_data_block(struct _IBEXIndex *index, hashid_t keyid, blockid_t blockid, blockid_t tail)
-{
- struct _hashblock *bucket;
-
- d(printf("setting data block hash %d to %d tail %d\n", keyid, blockid, tail));
-
- /* map to a block number */
- ibex_block_cache_assert(index->blocks, (blockid & (BLOCK_SIZE-1)) == 0);
- blockid >>= BLOCK_BITS;
-
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(keyid));
- if (bucket->hb_keys[HASH_INDEX(keyid)].root != blockid
- || bucket->hb_keys[HASH_INDEX(keyid)].tail != tail) {
- bucket->hb_keys[HASH_INDEX(keyid)].tail = tail;
- bucket->hb_keys[HASH_INDEX(keyid)].root = blockid;
- ibex_block_dirty((struct _block *)bucket);
- }
-}
-
-static blockid_t
-hash_get_data_block(struct _IBEXIndex *index, hashid_t keyid, blockid_t *tail)
-{
- struct _hashblock *bucket;
-
- d(printf("getting data block hash %d\n", keyid));
-
- if (keyid == 0) {
- if (tail)
- *tail = 0;
- return 0;
- }
-
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(keyid));
- if (tail)
- *tail = bucket->hb_keys[HASH_INDEX(keyid)].tail;
- return bucket->hb_keys[HASH_INDEX(keyid)].root << BLOCK_BITS;
-}
-
-static hashid_t
-hash_insert(struct _IBEXIndex *index, const char *key, int keylen)
-{
- struct _hashroot *hashroot;
- guint32 hash;
- int hashentry;
- blockid_t hashtable;
- hashid_t hashbucket, keybucket, keyprev, keyfree;
- struct _hashtableblock *table;
- struct _hashblock *bucket;
- int count;
-
- g_assert(index != 0);
- g_assert(index->root != 0);
-
- /* truncate the key to the maximum size */
- if (keylen > MAX_KEYLEN)
- keylen = MAX_KEYLEN;
-
- d(printf("inserting hash %.*s\n", keylen, key));
-
- hashroot = (struct _hashroot *)ibex_block_read(index->blocks, index->root);
-
- /* find the table containing this entry */
- hash = hash_key(key, keylen) % hashroot->size;
- hashtable = hashroot->table[hash / (BLOCK_SIZE/sizeof(blockid_t))];
- table = (struct _hashtableblock *)ibex_block_read(index->blocks, hashtable);
- hashentry = hash % (BLOCK_SIZE/sizeof(blockid_t));
- /* and its bucket */
- hashbucket = table->buckets[hashentry];
-
- /* now look for a free slot, first try the free list */
- /* but dont try too hard if our key is just too long ... so just scan upto
- 4 blocks, but if we dont find a space, tough ... */
- keybucket = hashroot->free;
- keyprev = 0;
- count = 0;
- while (keybucket && count<4) {
- int space;
-
- d(printf(" checking free %d\n", keybucket));
-
- /* read the bucket containing this free key */
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(keybucket));
-
- /* check if there is enough space for the key */
- space = &bucket->hb_keydata[bucket->hb_keys[bucket->used-1].keyoffset]
- - (char *)&bucket->hb_keys[bucket->used];
- if (space >= keylen) {
- hash_expand(bucket, HASH_INDEX(keybucket), keylen);
- memcpy(&bucket->hb_keydata[bucket->hb_keys[HASH_INDEX(keybucket)].keyoffset], key, keylen);
-
- /* check if there is free space still in this node, and there are no other empty blocks */
- keyfree = bucket->hb_keys[HASH_INDEX(keybucket)].next;
- if ((space-keylen) >= KEY_THRESHOLD) {
- int i;
- int head = ARRAY_LEN(bucket->hb_keydata);
- int found = FALSE;
-
- for (i=0;i<bucket->used;i++) {
- if (bucket->hb_keys[i].keyoffset == head) {
- /* already have a free slot in this block, leave it */
- found = TRUE;
- break;
- }
- head = bucket->hb_keys[i].keyoffset;
- }
- if (!found) {
- /* we should link in a new free slot for this node */
- bucket->hb_keys[bucket->used].next = bucket->hb_keys[HASH_INDEX(keybucket)].next;
- bucket->hb_keys[bucket->used].keyoffset = bucket->hb_keys[bucket->used-1].keyoffset;
- keyfree = HASH_KEY(HASH_BLOCK(keybucket), bucket->used);
- bucket->used++;
- }
- }
- /* link 'keyfree' back to the parent ... */
- if (keyprev == 0) {
- hashroot->free = keyfree;
- ibex_block_dirty((struct _block *)hashroot);
- } else {
- struct _hashblock *prevbucket;
- prevbucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(keyprev));
- prevbucket->hb_keys[HASH_INDEX(keyprev)].next = keyfree;
- ibex_block_dirty((struct _block *)prevbucket);
- }
-
- /* link into the hash chain */
- bucket->hb_keys[HASH_INDEX(keybucket)].next = hashbucket;
- bucket->hb_keys[HASH_INDEX(keybucket)].root = 0;
- bucket->hb_keys[HASH_INDEX(keybucket)].tail = 0;
- table->buckets[hashentry] = keybucket;
- ibex_block_dirty((struct _block *)table);
- ibex_block_dirty((struct _block *)bucket);
-
- d(printf(" new key id %d\n", keybucket));
- d(printf(" new free id %d\n", hashroot->free));
-
- return keybucket;
- }
-
- count++;
- keyprev = keybucket;
- keybucket = bucket->hb_keys[HASH_INDEX(keybucket)].next;
- }
-
- /* else create a new block ... */
- keybucket = ibex_block_get(index->blocks);
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, keybucket);
-
- d(printf("creating new key bucket %d\n", keybucket));
-
- memset(bucket, 0, sizeof(*bucket));
-
- bucket->used = 2;
- /* first block, is the new key */
- bucket->hb_keys[0].keyoffset = ARRAY_LEN(bucket->hb_keydata) - keylen;
- memcpy(&bucket->hb_keydata[bucket->hb_keys[0].keyoffset], key, keylen);
- bucket->hb_keys[0].next = hashbucket;
- bucket->hb_keys[0].root = 0;
- bucket->hb_keys[0].tail = 0;
-
- table->buckets[hashentry] = HASH_KEY(keybucket, 0);
-
- /* next block is a free block, link into free list */
- bucket->hb_keys[1].keyoffset = bucket->hb_keys[0].keyoffset;
- bucket->hb_keys[1].next = hashroot->free;
- hashroot->free = HASH_KEY(keybucket, 1);
-
- /* link new block into keys list */
- bucket->next = block_number(hashroot->keys);
- hashroot->keys = keybucket;
-
- ibex_block_dirty((struct _block *)hashroot);
- ibex_block_dirty((struct _block *)table);
- ibex_block_dirty((struct _block *)bucket);
-
- d(printf(" new key id %d\n", HASH_KEY(keybucket, 0)));
- d(printf(" new free id %d\n", hashroot->free));
-
- return HASH_KEY(keybucket, 0);
-}
-
-/* hash cursor functions */
-static struct _IBEXCursor *
-hash_cursor_create(struct _IBEXIndex *idx)
-{
- struct _HASHCursor *idc;
- struct _hashroot *hashroot;
-
- idc = g_malloc(sizeof(*idc));
- idc->cursor.klass = &ibex_hash_cursor_class;
- idc->cursor.index = idx;
- idc->key = 0;
- idc->index = 0;
-
- hashroot = (struct _hashroot *)ibex_block_read(idx->blocks, idx->root);
- idc->size = hashroot->size;
- idc->block = hashroot->keys;
-
- return &idc->cursor;
-}
-
-static void
-hash_cursor_close(struct _IBEXCursor *idc)
-{
- g_free(idc);
-}
-
-static guint32
-hash_cursor_next(struct _IBEXCursor *idc)
-{
- struct _HASHCursor *hc = (struct _HASHCursor *)idc;
- struct _hashblock *bucket;
-
- while (hc->block != 0) {
- bucket = (struct _hashblock *)ibex_block_read(idc->index->blocks, hc->block);
- while (hc->index < bucket->used) {
- if (hash_info(idc->index, bucket, hc->index) > 0) {
- hc->key = HASH_KEY(hc->block, hc->index);
- hc->index++;
- if (hc->index == bucket->used) {
- hc->index = 0;
- hc->block = block_location(bucket->next);
- }
- return hc->key;
- }
- hc->index++;
- }
- hc->index = 0;
- hc->block = block_location(bucket->next);
- }
-
- return hc->block;
-}
-
-static char *
-hash_cursor_next_key(struct _IBEXCursor *idc, int *keylenptr)
-{
- /* TODO: this could be made slightly mroe efficient going to the structs direct.
- but i'm lazy today */
- return idc->index->klass->get_key(idc->index, idc->klass->next(idc), keylenptr);
-}
-
-/* debug */
-void ibex_hash_dump(struct _IBEXIndex *index);
-static void ibex_hash_dump_rec(struct _IBEXIndex *index, int *words, int *wordslen);
-
-void ibex_hash_dump(struct _IBEXIndex *index)
-{
- int words = 0, wordslen=0;
-
- ibex_hash_dump_rec(index, &words, &wordslen);
-
- printf("Total words = %d, bytes = %d, ave length = %f\n", words, wordslen, (double)wordslen/(double)words);
-}
-
-
-static void
-ibex_hash_dump_rec(struct _IBEXIndex *index, int *words, int *wordslen)
-{
- int i;
- struct _hashtableblock *table;
- struct _hashblock *bucket;
- struct _hashroot *hashroot;
- blockid_t hashtable;
- hashid_t hashbucket;
- extern void ibex_diskarray_dump(struct _memcache *blocks, blockid_t head, blockid_t tail);
-
-
- printf("Walking hash tree:\n");
- hashroot = (struct _hashroot *)ibex_block_read(index->blocks, index->root);
- for (i=0;i<hashroot->size;i++) {
- printf("Hash table chain: %d\n", i);
- hashtable = hashroot->table[i / (BLOCK_SIZE/sizeof(blockid_t))];
- table = (struct _hashtableblock *)ibex_block_read(index->blocks, hashtable);
- hashbucket = table->buckets[i % (BLOCK_SIZE/sizeof(blockid_t))];
- while (hashbucket) {
- int len;
-
- *words = *words + 1;
-
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(hashbucket));
- printf(" bucket %d: [used %d]", hashbucket, bucket->used);
- if (HASH_INDEX(hashbucket) == 0) {
- len = ARRAY_LEN(bucket->hb_keydata) -
- bucket->hb_keys[HASH_INDEX(hashbucket)].keyoffset;
- } else {
- len = bucket->hb_keys[HASH_INDEX(hashbucket)-1].keyoffset -
- bucket->hb_keys[HASH_INDEX(hashbucket)].keyoffset;
- }
- printf("'%.*s' = %d next=%d\n", len, &bucket->hb_keydata[bucket->hb_keys[HASH_INDEX(hashbucket)].keyoffset],
- bucket->hb_keys[HASH_INDEX(hashbucket)].root,
- bucket->hb_keys[HASH_INDEX(hashbucket)].next);
-
- *wordslen = *wordslen + len;
-
- ibex_diskarray_dump(index->blocks,
- bucket->hb_keys[HASH_INDEX(hashbucket)].root << BLOCK_BITS,
- bucket->hb_keys[HASH_INDEX(hashbucket)].tail);
-
- hashbucket = bucket->hb_keys[HASH_INDEX(hashbucket)].next;
- }
- /* make sure its still in the cache */
- hashroot = (struct _hashroot *)ibex_block_read(index->blocks, index->root);
- }
-
- hashbucket = hashroot->free;
- printf("Dumping free lists ..\n");
- while (hashbucket) {
- printf(" %d", hashbucket);
- bucket = (struct _hashblock *)ibex_block_read(index->blocks, HASH_BLOCK(hashbucket));
- hashbucket = bucket->hb_keys[HASH_INDEX(hashbucket)].next;
- }
- printf("\n");
-}
-
-#if 0
-int main(int argc, char **argv)
-{
- struct _memcache *bc;
- struct _IBEXIndex *hash;
- int i;
-
- bc = ibex_block_cache_open("index.db", O_CREAT|O_RDWR, 0600);
- hash = ibex_hash_class.create(bc, 1024);
- for (i=0;i<10000;i++) {
- char key[16];
- sprintf(key, "key %d", i);
- ibex_hash_class.insert(hash, key, strlen(key));
- }
-
- for (i=500;i<1000;i++) {
- char key[16];
- sprintf(key, "key %d", i);
- ibex_hash_class.remove(hash, key, strlen(key));
- }
-
- for (i=500;i<1000;i++) {
- char key[16];
- sprintf(key, "key %d", i);
- ibex_hash_class.insert(hash, key, strlen(key));
- }
-
-
- ibex_hash_dump(hash);
-
- for (i=0;i<2000;i++) {
- char key[16], *lookup;
- hashid_t keyid;
- blockid_t root, tail;
-
- sprintf(key, "key %d", i);
- keyid = ibex_hash_class.find(hash, key, strlen(key));
- lookup = ibex_hash_class.get_key(hash, keyid, 0);
- root = ibex_hash_class.get_data(hash, keyid, &tail);
- printf("key %s = %d = '%s' root:%d tail:%d \n", key, keyid, lookup, root, tail);
- g_free(lookup);
- }
-
- ibex_hash_class.close(hash);
- ibex_block_cache_close(bc);
- return 0;
-}
-
-#endif
diff --git a/libibex/ibex.h b/libibex/ibex.h
deleted file mode 100644
index f9d758754b..0000000000
--- a/libibex/ibex.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef IBEX_H
-#define IBEX_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <glib.h>
-
-struct ibex;
-typedef struct ibex ibex;
-
-/* All functions that can fail set errno and return NULL or -1 on
- * failure.
- */
-
-/* Open the named ibex index file. If CREATE is true, create the file
- * if it doesn't already exist.
- */
-ibex *ibex_open (char *file, int flags, int mode);
-
-/* Write the ibex to disk. */
-int ibex_write (ibex *ib);
-
-/* only save if ibex has changed. */
-int ibex_save (ibex *ib);
-
-/* Write the ibex to disk if it has changed, and free all memory
- * associated with it.
- */
-int ibex_close (ibex *ib);
-
-
-
-/* Index the named file. (If the FILENAME is already in the index,
- * remove the old copy.
- */
-int ibex_index_file (ibex *ib, char *filename);
-
-/* Index LEN bytes off FD, using NAME as the filename in the index.
- * (If NAME already exists in the index, this adds more data to it.)
- */
-int ibex_index_fd (ibex *ib, char *name, int fd, size_t len);
-
-/* Like ibex_index_fd, but with a buffer rather than a file descriptor.
- * The buffer does not need to be '\0'-terminated. If UNREAD is not
- * NULL, then the indexer won't assume that the buffer ends on a word
- * boundary, and will return (in UNREAD) the number of bytes from the
- * end of the buffer that it didn't use, if any.
- */
-int ibex_index_buffer (ibex *ib, char *name, char *buffer,
- size_t len, size_t *unread);
-
-/* Remove entries for a given file from the index. (Most of the removal
- * isn't actually done until the file is written out to disk, so this
- * is very fast.)
- */
-void ibex_unindex (ibex *ib, char *name);
-
-/* Rename a file in the index. (This is also fast.) */
-void ibex_rename (ibex *ib, char *oldfilename, char *newfilename);
-
-
-
-/* Find a word in the index. Returns an array of strings: the caller
- * should free the array, but should not free or modify the strings.
- */
-GPtrArray *ibex_find (ibex *ib, char *word);
-
-/* Find if a word is contained in a specific name reference.
- */
-gboolean ibex_find_name (ibex *ib, char *name, char *word);
-
-/* has a file been indexed?
- */
-gboolean ibex_contains_name(ibex *ib, char *name);
-
-/* Return all the files containing all of the words in the given
- * array. Returned data is like with ibex_find.
- */
-GPtrArray *ibex_find_all (ibex *ib, GPtrArray *words);
-
-/* Debug function, dumps the whole index tree, showing removed files as well */
-void ibex_dump_all (ibex *ib);
-
-#endif /* ! IBEX_H */
-
diff --git a/libibex/ibex_block.c b/libibex/ibex_block.c
deleted file mode 100644
index 112ae140e2..0000000000
--- a/libibex/ibex_block.c
+++ /dev/null
@@ -1,602 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-
-#include <stdio.h>
-#include <gal/unicode/gunicode.h>
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#include "ibex_internal.h"
-
-#define d(x)
-#define o(x)
-
-static void ibex_reset(ibex *ib);
-static int close_backend(ibex *ib);
-
-static struct _list ibex_list = { (struct _listnode *)&ibex_list.tail, 0, (struct _listnode *)&ibex_list.head };
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-static pthread_mutex_t ibex_list_lock = PTHREAD_MUTEX_INITIALIZER;
-int ibex_opened; /* count of actually opened ibexe's */
-#define IBEX_LIST_LOCK(ib) (pthread_mutex_lock(&ibex_list_lock))
-#define IBEX_LIST_UNLOCK(ib) (pthread_mutex_unlock(&ibex_list_lock))
-#else
-#define IBEX_LIST_LOCK(ib)
-#define IBEX_LIST_UNLOCK(ib)
-#endif
-
-/* check we are open properly */
-
-/* TODO: return errors? */
-static void ibex_use(ibex *ib)
-{
- ibex *wb, *wn;
-
- /* always lock list then ibex */
- IBEX_LIST_LOCK(ib);
- IBEX_LOCK(ib);
-
- if (ib->blocks == NULL) {
- o(printf("Delayed opening ibex '%s', total = %d\n", ib->name, ibex_opened+1));
-
- ib->blocks = ibex_block_cache_open(ib->name, ib->flags, ib->mode);
- if (ib->blocks) {
- /* FIXME: the blockcache or the wordindex needs to manage the other one */
- ib->words = ib->blocks->words;
- } else {
- ib->words = NULL;
- g_warning("ibex_use:open(): Error occured?: %s\n", strerror(errno));
- }
- if (ib->blocks != NULL)
- ibex_opened++;
- }
-
- ib->usecount++;
-
- /* this makes an 'lru' cache of used files */
- ibex_list_remove((struct _listnode *)ib);
- ibex_list_addtail(&ibex_list, (struct _listnode *)ib);
-
- IBEX_UNLOCK(ib);
-
- /* check for other ibex's we can close now to not over-use fd's.
- we can't do this first for locking issues */
- if (ibex_opened > IBEX_OPEN_THRESHOLD) {
- wb = (ibex *)ibex_list.head;
- wn = wb->next;
- while (wn) {
- IBEX_LOCK(wb);
- if (wb->usecount == 0 && wb->blocks != NULL) {
- o(printf("Forcing close of obex '%s', total = %d\n", wb->name, ibex_opened-1));
- close_backend(wb);
- IBEX_UNLOCK(wb);
- /* optimise the next scan? */
- /*ibex_list_remove((struct _listnode *)wb);
- ibex_list_addtail(&ibex_list, (struct _listnode *)wb);*/
- ibex_opened--;
- break;
- }
- IBEX_UNLOCK(wb);
- wb = wn;
- wn = wn->next;
- }
- }
-
- IBEX_LIST_UNLOCK(ib);
-}
-
-static void ibex_unuse(ibex *ib)
-{
- IBEX_LOCK(ib);
- ib->usecount--;
- IBEX_UNLOCK(ib);
-}
-
-
-static signed char utf8_trans[] = {
- 'A', 'A', 'A', 'A', 'A', 'A', -1, 'C', 'E', 'E', 'E', 'E', 'I', 'I',
- 'I', 'I', -2, 'N', 'O', 'O', 'O', 'O', 'O', '*', 'O', 'U', 'U', 'U',
- 'U', 'Y', -3, -4, 'a', 'a', 'a', 'a', 'a', 'a', -5, 'c', 'e', 'e',
- 'e', 'e', 'i', 'i', 'i', 'i', -6, 'n', 'o', 'o', 'o', 'o', 'o', '/',
- 'o', 'u', 'u', 'u', 'u', 'y', -7, 'y', 'A', 'a', 'A', 'a', 'A', 'a',
- 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e',
- 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g',
- 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i',
- 'I', 'i', -8, -9, 'J', 'j', 'K', 'k', 'k', 'L', 'l', 'L', 'l', 'L',
- 'l', 'L', 'l', 'L', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', -10, -11,
- 'O', 'o', 'O', 'o', 'O', 'o', -12, -13, 'R', 'r', 'R', 'r', 'R', 'r',
- 'S', 'r', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't',
- 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w',
- 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's'
-};
-
-static char *utf8_long_trans[] = {
- "AE", "TH", "TH", "ss", "ae", "th", "th", "IJ", "ij",
- "NG", "ng", "OE", "oe"
-};
-
-/* This is a bit weird. It takes pointers to the start and end (actually
- * just past the end) of a UTF-8-encoded word, and a buffer at least 1
- * byte longer than the length of the word. It copies the word into the
- * buffer in all lowercase without accents, and splits up ligatures.
- * (Since any ligature would be a multi-byte character in UTF-8, splitting
- * them into two US-ASCII characters won't overrun the buffer.)
- *
- * It is not safe to call this routine with bad UTF-8.
- */
-static void
-ibex_normalise_word(char *start, char *end, char *buf)
-{
- unsigned char *s, *d;
- gunichar uc;
-
- s = (unsigned char *)start;
- d = (unsigned char *)buf;
- while (s < (unsigned char *)end) {
- if (*s < 0x80) {
- /* US-ASCII character: copy unless it's
- * an apostrophe.
- */
- if (*s != '\'')
- *d++ = tolower (*s);
- s++;
- } else {
- char *next = g_utf8_next_char (s);
- uc = g_utf8_get_char (s);
- if (uc >= 0xc0 && uc < 0xc0 + sizeof (utf8_trans)) {
- signed char ch = utf8_trans[uc - 0xc0];
- if (ch > 0)
- *d++ = tolower (ch);
- else {
- *d++ = tolower (utf8_long_trans[-ch - 1][0]);
- *d++ = tolower (utf8_long_trans[-ch - 1][1]);
- }
- s = next;
- } else {
- while (s < (unsigned char *)next)
- *d++ = *s++;
- }
- }
- }
- *d = '\0';
-}
-
-enum { IBEX_ALPHA, IBEX_NONALPHA, IBEX_INVALID, IBEX_INCOMPLETE };
-
-static int
-utf8_category (char *p, char **np, char *end)
-{
- if (isascii ((unsigned char)*p)) {
- *np = p + 1;
- if (isalpha ((unsigned char)*p) || *p == '\'')
- return IBEX_ALPHA;
- return IBEX_NONALPHA;
- } else {
- gunichar uc;
-
- *np = g_utf8_find_next_char (p, end);
- if (!*np)
- return IBEX_INCOMPLETE;
- uc = g_utf8_get_char (p);
- if (uc == (gunichar) -1)
- return IBEX_INVALID;
- else if (g_unichar_isalpha (uc))
- return IBEX_ALPHA;
- else
- return IBEX_NONALPHA;
- }
-}
-
-/**
- * ibex_index_buffer: the lowest-level ibex indexing interface
- * @ib: an ibex
- * @name: the name of the file being indexed
- * @buffer: a buffer containing data from the file
- * @len: the length of @buffer
- * @unread: an output argument containing the number of unread bytes
- *
- * This routine indexes up to @len bytes from @buffer into @ib.
- * If @unread is NULL, the indexer assumes that the buffer ends on a
- * word boundary, and will index all the way to the end of the
- * buffer. If @unread is not NULL, and the buffer ends with an
- * alphabetic character, the indexer will assume that the buffer has
- * been cut off in the middle of a word, and return the number of
- * un-indexed bytes at the end of the buffer in *@unread. The caller
- * should then read in more data through whatever means it has
- * and pass in the unread bytes from the original buffer, followed
- * by the new data, on its next call.
- *
- * Return value: 0 on success, -1 on failure.
- **/
-int
-ibex_index_buffer (ibex *ib, char *name, char *buffer, size_t len, size_t *unread)
-{
- char *p, *q, *nq, *end;
- char *word;
- int wordsiz, cat = 0;
- GHashTable *words = g_hash_table_new(g_str_hash, g_str_equal);
- GPtrArray *wordlist = g_ptr_array_new();
- int i, ret=-1;
-
- if (unread)
- *unread = 0;
-
- end = buffer + len;
- wordsiz = 20;
- word = g_malloc (wordsiz);
-
- p = buffer;
- while (p < end) {
- while (p < end) {
- cat = utf8_category (p, &q, end);
- if (cat != IBEX_NONALPHA)
- break;
- p = q;
- }
- if (p == end) {
- goto done;
- } else if (cat == IBEX_INVALID) {
- goto error;
- } else if (cat == IBEX_INCOMPLETE)
- q = end;
-
- while (q < end) {
- cat = utf8_category (q, &nq, end);
- if (cat != IBEX_ALPHA)
- break;
- q = nq;
- }
- if (cat == IBEX_INVALID ||
- (cat == IBEX_INCOMPLETE && !unread)) {
- goto error;
- } else if (cat == IBEX_INCOMPLETE || (q == end && unread)) {
- *unread = end - p;
- goto done;
- }
-
- if (wordsiz < q - p + 1) {
- wordsiz = q - p + 1;
- word = g_realloc (word, wordsiz);
- }
- ibex_normalise_word (p, q, word);
- if (word[0]) {
- if (g_hash_table_lookup(words, word) == 0) {
- char *newword = g_strdup(word);
- g_ptr_array_add(wordlist, newword);
- g_hash_table_insert(words, newword, name);
- }
- }
- p = q;
- }
-done:
- /* this weird word=NULL shit is to get rid of compiler warnings about clobbering with longjmp */
- g_free(word);
- word = NULL;
-
- ibex_use(ib);
- IBEX_LOCK(ib);
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- printf("Error in indexing\n");
- ret = -1;
- ibex_reset(ib);
- word = NULL; /* here too */
- } else {
- word = NULL; /* ... and here */
- d(printf("name %s count %d size %d\n", name, wordlist->len, len));
- if (!ib->predone) {
- ib->words->klass->index_pre(ib->words);
- ib->predone = TRUE;
- }
- ib->words->klass->add_list(ib->words, name, wordlist);
- ret = 0;
- }
-
- IBEX_UNLOCK(ib);
- ibex_unuse(ib);
-
-error:
- for (i=0;i<wordlist->len;i++)
- g_free(wordlist->pdata[i]);
- g_ptr_array_free(wordlist, TRUE);
- g_hash_table_destroy(words);
- g_free(word);
- return ret;
-}
-
-
-/**
- * ibex_open:
- * @file:
- * @flags:
- * @mode:
- *
- * Open a new ibex file. file, flags, and mode as for open(2)
- *
- * Return value: A new ibex, or NULL on failure.
- **/
-ibex *ibex_open (char *file, int flags, int mode)
-{
- ibex *ib;
-
- ib = g_malloc0(sizeof(*ib));
- ib->blocks = NULL;
- ib->usecount = 0;
-#if 0
- ib->blocks = ibex_block_cache_open(file, flags, mode);
- if (ib->blocks == 0) {
- g_warning("create: Error occured?: %s\n", strerror(errno));
- g_free(ib);
- return NULL;
- }
- /* FIXME: the blockcache or the wordindex needs to manage the other one */
- ib->words = ib->blocks->words;
-#endif
- ib->name = g_strdup(file);
- ib->flags = flags;
- ib->mode = mode;
-
-#ifdef ENABLE_THREADS
- ib->lock = g_mutex_new();
-#endif
-
- IBEX_LIST_LOCK(ib);
- ibex_list_addtail(&ibex_list, (struct _listnode *)ib);
- IBEX_LIST_UNLOCK(ib);
-
- return ib;
-}
-
-/**
- * ibex_save:
- * @ib:
- *
- * Save (sync) an ibex file to disk.
- *
- * Return value: -1 on failure.
- **/
-int ibex_save (ibex *ib)
-{
- int ret;
-
- d(printf("syncing database\n"));
-
- ibex_use(ib);
- IBEX_LOCK(ib);
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- ibex_reset(ib);
- printf("Error saving\n");
- ret = -1;
- } else {
- if (ib->predone) {
- ib->words->klass->index_post(ib->words);
- ib->predone = FALSE;
- }
- ib->words->klass->sync(ib->words);
- /* FIXME: some return */
- ibex_block_cache_sync(ib->blocks);
- ret = 0;
- }
-
- IBEX_UNLOCK(ib);
- ibex_unuse(ib);
-
- return ret;
-}
-
-static int
-close_backend(ibex *ib)
-{
- int ret;
-
- if (ib->blocks == 0)
- return 0;
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- printf("Error closing!\n");
- ret = -1;
- } else {
- if (ib->predone) {
- ib->words->klass->index_post(ib->words);
- ib->predone = FALSE;
- }
-
- ib->words->klass->close(ib->words);
- /* FIXME: return */
- ibex_block_cache_close(ib->blocks);
- ib->blocks = NULL;
- ret = 0;
- }
-
- return ret;
-}
-
-/* close/reopen the ibex file, assumes we have lock */
-static void
-ibex_reset(ibex *ib)
-{
- g_warning("resetting ibex file");
-
- close_backend(ib);
-
- ib->blocks = ibex_block_cache_open(ib->name, ib->flags, ib->mode);
- if (ib->blocks == 0) {
- g_warning("ibex_reset create: Error occured?: %s\n", strerror(errno));
- }
- /* FIXME: the blockcache or the wordindex needs to manage the other one */
- ib->words = ib->blocks->words;
-}
-
-/**
- * ibex_close:
- * @ib:
- *
- * Close (and save) an ibex file, restoring all resources used.
- *
- * Return value: -1 on error. In either case, ibex is no longer
- * defined afterwards.
- **/
-int ibex_close (ibex *ib)
-{
- int ret;
-
- d(printf("closing database\n"));
-
- g_assert(ib->usecount == 0);
-
- IBEX_LIST_LOCK(ib);
- ibex_list_remove((struct _listnode *)ib);
- IBEX_LIST_UNLOCK(ib);
-
- if (ib->blocks != NULL)
- ret = close_backend(ib);
- else
- ret = 0;
-
- g_free(ib->name);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(ib->lock);
-#endif
- g_free(ib);
-
- return ret;
-}
-
-/**
- * ibex_unindex:
- * @ib:
- * @name:
- *
- * Remove a name from the index.
- **/
-void ibex_unindex (ibex *ib, char *name)
-{
- d(printf("trying to unindex '%s'\n", name));
-
- ibex_use(ib);
- IBEX_LOCK(ib);
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- printf("Error unindexing!\n");
- ibex_reset(ib);
- } else {
- ib->words->klass->unindex_name(ib->words, name);
- }
-
- IBEX_UNLOCK(ib);
- ibex_unuse(ib);
-}
-
-/**
- * ibex_find:
- * @ib:
- * @word:
- *
- * Find all names containing @word.
- *
- * Return value:
- **/
-GPtrArray *ibex_find (ibex *ib, char *word)
-{
- char *normal;
- int len;
- GPtrArray *ret;
-
- len = strlen(word);
- normal = alloca(len+1);
- ibex_normalise_word(word, word+len, normal);
-
- ibex_use(ib);
- IBEX_LOCK(ib);
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- ibex_reset(ib);
- ret = NULL;
- } else {
- ret = ib->words->klass->find(ib->words, normal);
- }
-
- IBEX_UNLOCK(ib);
- ibex_unuse(ib);
-
- return ret;
-}
-
-/**
- * ibex_find_name:
- * @ib:
- * @name:
- * @word:
- *
- * Return #TRUE if the specific @word is contained in @name.
- *
- * Return value:
- **/
-gboolean ibex_find_name (ibex *ib, char *name, char *word)
-{
- char *normal;
- int len;
- gboolean ret;
-
- len = strlen(word);
- normal = alloca(len+1);
- ibex_normalise_word(word, word+len, normal);
-
- ibex_use(ib);
- IBEX_LOCK(ib);
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- ibex_reset(ib);
- ret = FALSE;
- } else {
- ret = ib->words->klass->find_name(ib->words, name, normal);
- }
-
- IBEX_UNLOCK(ib);
- ibex_unuse(ib);
-
- return ret;
-}
-
-/**
- * ibex_contains_name:
- * @ib:
- * @name:
- *
- * Returns true if the name @name is somewhere in the database.
- *
- * Return value:
- **/
-gboolean ibex_contains_name(ibex *ib, char *name)
-{
- gboolean ret;
-
- ibex_use(ib);
- IBEX_LOCK(ib);
-
- if (ibex_block_cache_setjmp(ib->blocks) != 0) {
- ibex_reset(ib);
- ret = FALSE;
- } else {
- ret = ib->words->klass->contains_name(ib->words, name);
- }
-
- IBEX_UNLOCK(ib);
- ibex_unuse(ib);
-
- return ret;
-}
-
diff --git a/libibex/ibex_internal.h b/libibex/ibex_internal.h
deleted file mode 100644
index bb15ebc1f7..0000000000
--- a/libibex/ibex_internal.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include <glib.h>
-
-#include "ibex.h"
-#include "block.h"
-#include "wordindex.h"
-
-struct ibex {
- struct ibex *next; /* for list of open ibex's */
- struct ibex *prev;
-
- int usecount;
-
- char *name;
- int flags;
- int mode;
- struct _memcache *blocks;
- struct _IBEXWord *words;
- int predone;
-
- /* sigh i hate glib's mutex stuff too */
-#ifdef ENABLE_THREADS
- GMutex *lock;
-#endif
-
-};
-
-#define IBEX_OPEN_THRESHOLD (5)
-
-#ifdef ENABLE_THREADS
-/*#define IBEX_LOCK(ib) (printf(__FILE__ "%d: %s: locking ibex\n", __LINE__, __FUNCTION__), g_mutex_lock(ib->lock))
- #define IBEX_UNLOCK(ib) (printf(__FILE__ "%d: %s: unlocking ibex\n", __LINE__, __FUNCTION__), g_mutex_unlock(ib->lock))*/
-#define IBEX_LOCK(ib) (g_mutex_lock(ib->lock))
-#define IBEX_UNLOCK(ib) (g_mutex_unlock(ib->lock))
-#else
-#define IBEX_LOCK(ib)
-#define IBEX_UNLOCK(ib)
-#endif
-
diff --git a/libibex/index.h b/libibex/index.h
deleted file mode 100644
index 79aa1d854b..0000000000
--- a/libibex/index.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _INDEX_H
-#define _INDEX_H
-
-/* an indexing 'class' maps a key to 1 piece of info */
-
-/*#define INDEX_STAT*/
-
-struct _IBEXCursor {
- struct _IBEXCursorClass *klass;
- struct _IBEXIndex *index;
-};
-
-struct _IBEXCursorClass {
- void (*close)(struct _IBEXCursor *);
-
- guint32 (*next)(struct _IBEXCursor *);
- char *(*next_key)(struct _IBEXCursor *, int *keylenptr);
-};
-
-struct _IBEXIndex {
- struct _IBEXIndexClass *klass;
- struct _memcache *blocks;
- blockid_t root; /* root block of ondisk index data */
-#ifdef INDEX_STAT
- int lookups; /* how many lookups */
- int lookup_total; /* how many blocks loaded for all lookups (hash chain depth) */
-#endif
-};
-
-struct _IBEXIndexClass {
-
- struct _IBEXIndex *(*create)(struct _memcache *bc, int size);
- struct _IBEXIndex *(*open)(struct _memcache *bc, blockid_t root);
-
- int (*sync)(struct _IBEXIndex *);
- int (*close)(struct _IBEXIndex *);
-
- /* lookup a key in the index, returns the keyid of this item, or 0 if not found */
- guint32 (*find)(struct _IBEXIndex *, const char *key, int keylen);
-
- /* remove a key from the index */
- void (*remove)(struct _IBEXIndex *, const char *key, int keylen);
-
- /* insert a new key into the index, the keyid is returned */
- guint32 (*insert)(struct _IBEXIndex *, const char *key, int keylen);
-
- /* get the key contents/key length from the keyid */
- char *(*get_key)(struct _IBEXIndex *, guint32 keyid, int *keylenptr);
-
- /* set the key contents based on the keyid */
- void (*set_data)(struct _IBEXIndex *, guint32 keyid, blockid_t datablock, blockid_t tail);
-
- /* get the key contents based on the keyid */
- blockid_t (*get_data)(struct _IBEXIndex *, guint32 keyid, blockid_t *tail);
-
- /* get a cursor for iterating over all contents */
- struct _IBEXCursor *(*get_cursor)(struct _IBEXIndex *);
-};
-
-/* a storage class, stores lists of lists of id's */
-
-struct _IBEXStore {
- struct _IBEXStoreClass *klass;
- struct _memcache *blocks;
-};
-
-struct _IBEXStoreClass {
- struct _IBEXStore *(*create)(struct _memcache *bc);
- int (*sync)(struct _IBEXStore *store);
- int (*close)(struct _IBEXStore *store);
-
- blockid_t (*add)(struct _IBEXStore *store, blockid_t *head, blockid_t *tail, nameid_t data);
- blockid_t (*add_list)(struct _IBEXStore *store, blockid_t *head, blockid_t *tail, GArray *data);
- blockid_t (*remove)(struct _IBEXStore *store, blockid_t *head, blockid_t *tail, nameid_t data);
- void (*free)(struct _IBEXStore *store, blockid_t head, blockid_t tail);
-
- gboolean (*find)(struct _IBEXStore *store, blockid_t head, blockid_t tail, nameid_t data);
- GArray *(*get)(struct _IBEXStore *store, blockid_t head, blockid_t tail);
-};
-
-#endif
diff --git a/libibex/testindex.c b/libibex/testindex.c
deleted file mode 100644
index 064ff1b7ac..0000000000
--- a/libibex/testindex.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/* Test code for libibex */
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <glib.h>
-#include "ibex_internal.h"
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-#define TIMEIT
-/*#define DO_MCHECK*/
-
-#ifdef TIMEIT
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-
-#ifdef DO_MCHECK
-#include <mcheck.h>
-#endif
-
-void word_index_mem_dump_info(struct _IBEXWord *idx);
-
-/*
- The following is a routine to generate a Gaussian distribution
- of pseudo random numbers, to make the results a little more
- meaningful
-*/
-
-/* boxmuller.c Implements the Polar form of the Box-Muller
- Transformation
-
- (c) Copyright 1994, Everett F. Carter Jr.
- Permission is granted by the author to use
- this software for any application provided this
- copyright notice is preserved.
-
-*/
-
-#include <stdlib.h>
-#include <math.h>
-
-#define ranf() ((float)rand()/(float)RAND_MAX)
-
-static float box_muller(float m, float s) /* normal random variate generator */
-{ /* mean m, standard deviation s */
- float x1, x2, w, y1;
- static float y2;
- static int use_last = 0;
-
- if (use_last) /* use value from previous call */
- {
- y1 = y2;
- use_last = 0;
- }
- else
- {
- do {
- x1 = 2.0 * ranf() - 1.0;
- x2 = 2.0 * ranf() - 1.0;
- w = x1 * x1 + x2 * x2;
- } while ( w >= 1.0 );
-
- w = sqrt( (-2.0 * log( w ) ) / w );
- y1 = x1 * w;
- y2 = x2 * w;
- use_last = 1;
- }
-
- return( m + y1 * s );
-}
-
-/* gets a word from words, using m and s as distribution values */
-static char *getword(GPtrArray *words, float m, float s)
-{
- int index;
-
- do {
- index = (int)box_muller(m, s);
- } while (index<0 || index>=words->len);
-
- return words->pdata[index];
-}
-
-#ifdef ENABLE_THREADS
-int do_read_words;
-
-static void *
-read_words(void *in)
-{
- ibex *ib = in;
- GPtrArray *a;
- int lastlen = 0;
- int i;
-
- while (do_read_words) {
- a = ibex_find(ib, "joneses");
- if (a->len != lastlen) {
- printf("Found %d joneses!\n", a->len);
- lastlen = a->len;
- }
- for (i=0;i<a->len;i++)
- g_free(a->pdata[i]);
- g_ptr_array_free(a, TRUE);
- }
-}
-#endif
-
-
-
-#ifdef DO_MCHECK
-static int blowup(int status)
-{
- switch(status) {
- case 1:
- printf("Double free failure\n");
- break;
- case 2:
- printf("Memory clobbered before block\n");
- break;
- case 3:
- printf("Memory clobbered after block\n");
- break;
- }
- abort();
- return status;
-}
-#endif
-
-int main(int argc, char **argv)
-{
- int i, j;
- GPtrArray *words;
- char line[256];
- int len;
- FILE *file;
- float m, s;
- ibex *ib;
- GString *buffer;
- int files;
- char *dict;
- int synccount;
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-#endif
-#ifdef ENABLE_THREADS
- pthread_t id;
-#endif
-
-#ifdef DO_MCHECK
- mcheck(blowup);
-#endif
- words = g_ptr_array_new();
- buffer = g_string_new("");
-
-#ifdef ENABLE_THREADS
- g_thread_init(0);
-#undef ENABLE_THREADS
-#endif
-
-#ifdef TIMEIT
- gettimeofday(&start, NULL);
-#endif
-
- srand(0xABADF00D);
-
- synccount = 1000;
- files = 8000;
- dict = "/usr/dict/words";
-
- /* read words into an array */
- file = fopen(dict, "r");
- if (file == NULL) {
- fprintf(stderr, "Cannot open word file: %s: %s\n", dict, strerror(errno));
- return 1;
- }
- while (fgets(line, sizeof(line), file) != NULL) {
- len = strlen(line);
- if (len>0 && line[len-1]=='\n') {
- line[len-1]=0;
- }
- g_ptr_array_add(words, g_strdup(line));
- }
- fclose(file);
-
- fprintf(stderr, "Read %d words\n", words->len);
-
- /* *shrug* arbitrary values really */
- m = words->len/2;
- /* well, the average vocabulary of a mailbox is about 10K words */
- s = 1000.0;
-
- printf("mean is %f, s is %f\n", m, s);
-
- /* open ibex file */
- ib = ibex_open("test.ibex", O_RDWR|O_CREAT, 0600);
- if (ib == NULL) {
- perror("Creating ibex file\n");
- return 1;
- }
-
-#ifdef ENABLE_THREADS
- do_read_words = 1;
- pthread_create(&id, 0, read_words, ib);
-#endif
- printf("Adding %d files\n", files);
-
-
- /* simulate adding new words to a bunch of files */
- for (j=0;j<200000;j++) {
- /* always new name */
- char *name;
- /* something like 60 words in a typical message, say */
- int count = (int)box_muller(60.0, 20.0);
- int word = (int)box_muller(m, 4000);
- GPtrArray *a;
- static int lastlen = 0;
-
- /* random name */
- name = words->pdata[word % words->len];
-
- if (j%1000 == 0 && j>0) {
- IBEX_LOCK(ib);
- word_index_mem_dump_info(ib->words);
- IBEX_UNLOCK(ib);
- }
-
- /* lookup word just to test lookup */
- a = ibex_find(ib, name);
- if (a) {
- for (i=0;i<a->len;i++)
- g_free(a->pdata[i]);
- g_ptr_array_free(a, TRUE);
- }
-
- /* half the time, remove items from the index */
- if (rand() < RAND_MAX/2) {
- ibex_unindex(ib, name);
- } else {
- /* cache the name info */
- ibex_contains_name(ib, name);
-
- /*printf("Adding %d words to '%s'\n", count, name);*/
-
- g_string_truncate(buffer, 0);
-
- /* build up the word buffer */
- for (i=0;i<count;i++) {
- if (i>0)
- g_string_append_c(buffer, ' ');
- g_string_append(buffer, getword(words, m, 2000));
- }
-
- /* and index it */
- ibex_index_buffer(ib, name, buffer->str, buffer->len, NULL);
- }
-
-
- a = ibex_find(ib, "joneses");
- if (a) {
- if (a->len != lastlen) {
- printf("Found %d joneses!\n", a->len);
- lastlen = a->len;
- }
- for (i=0;i<a->len;i++)
- g_free(a->pdata[i]);
- g_ptr_array_free(a, TRUE);
- }
-
- if (j%synccount == 0) {
- printf("Reloading index\n");
- IBEX_LOCK(ib);
- word_index_mem_dump_info(ib->words);
- IBEX_UNLOCK(ib);
-#ifdef ENABLE_THREADS
- do_read_words = 0;
- pthread_join(id, 0);
-#endif
- ibex_save(ib);
- ibex_close(ib);
-
- ib = ibex_open("test.ibex", O_RDWR|O_CREAT, 0600);
- ibex_contains_name(ib, name);
- IBEX_LOCK(ib);
- word_index_mem_dump_info(ib->words);
- IBEX_UNLOCK(ib);
-#ifdef ENABLE_THREADS
- do_read_words = 1;
- pthread_create(&id, 0, read_words, ib);
-#endif
- }
-
- }
-
-
- IBEX_LOCK(ib);
- word_index_mem_dump_info(ib->words);
- IBEX_UNLOCK(ib);
-
-#ifdef ENABLE_THREADS
- do_read_words = 0;
- pthread_join(id, 0);
-#endif
-
- ibex_close(ib);
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Total time taken %ld.%03ld seconds\n", diff / 1000, diff % 1000);
-#endif
-
- return 0;
-}
-
diff --git a/libibex/wordindex.c b/libibex/wordindex.c
deleted file mode 100644
index 869f15e628..0000000000
--- a/libibex/wordindex.c
+++ /dev/null
@@ -1,646 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 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.
- */
-
-/* code to manage a word index */
-/* includes a cache for word index writes,
- but not for name index writes (currently), or any reads.
-
-Note the word cache is only needed during indexing of lots
-of words, and could then be discarded (:flush()).
-
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <glib.h>
-
-#include "block.h"
-#include "index.h"
-#include "wordindex.h"
-
-#define d(x)
-
-/*#define WORDCACHE_SIZE (256)*/
-#define WORDCACHE_SIZE (4096)
-
-extern struct _IBEXStoreClass ibex_diskarray_class;
-extern struct _IBEXIndexClass ibex_hash_class;
-
-/* need 2 types of hash key?
- one that just stores the wordid / wordblock
- and one that stores the filecount/files?
-*/
-
-
-#define CACHE_FILE_COUNT (62)
-
-struct _wordcache {
- struct _wordcache *next;
- struct _wordcache *prev;
- nameid_t wordid; /* disk wordid */
- blockid_t wordblock; /* head of disk list */
- blockid_t wordtail; /* and the tail data */
- short filecount; /* how many valid items in files[] */
- short filealloc; /* how much allocated space in files[] */
- union {
- nameid_t *files; /* memory cache of files */
- nameid_t file0; /* if filecount == 1 && filealloc == 0, store directly */
- } file;
- char word[1]; /* actual word follows */
-};
-
-static void unindex_name(struct _IBEXWord *, const char *name); /* unindex all entries for name */
-static gboolean contains_name(struct _IBEXWord *, const char *name); /* index contains data for name */
-static GPtrArray *find(struct _IBEXWord *, const char *word); /* returns all matches for word */
-static gboolean find_name(struct _IBEXWord *, const char *name, const char *word); /* find if name contains word */
-static void add(struct _IBEXWord *, const char *name, const char *word); /* adds a single word to name (slow) */
-static void add_list(struct _IBEXWord *, const char *name, GPtrArray *words);/* adds a bunch of words to a given name */
-static int word_sync(struct _IBEXWord *idx);
-static int word_flush(struct _IBEXWord *idx);
-static int word_close(struct _IBEXWord *idx);
-static void word_index_pre(struct _IBEXWord *idx);
-static void word_index_post(struct _IBEXWord *idx);
-
-struct _IBEXWordClass ibex_word_index_class = {
- word_sync, word_flush, word_close,
- word_index_pre, word_index_post,
- unindex_name, contains_name,
- find, find_name,
- add, add_list
-};
-
-/* this interface isn't the best, but it'll do for now */
-struct _IBEXWord *
-ibex_create_word_index(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot)
-{
- struct _IBEXWord *idx;
-
- idx = g_malloc0(sizeof(*idx));
- idx->wordcache = g_hash_table_new(g_str_hash, g_str_equal);
- ibex_list_new(&idx->wordnodes);
- idx->wordcount = 0;
- idx->klass = &ibex_word_index_class;
-
- /* we use the same block array storage for both indexes at the moment */
- idx->wordstore = ibex_diskarray_class.create(bc);
- idx->namestore = idx->wordstore;
-
- /* but not the same indexes! */
- if (*wordroot) {
- printf("opening wordindex root = %d\n", *wordroot);
- idx->wordindex = ibex_hash_class.open(bc, *wordroot);
- } else {
- idx->wordindex = ibex_hash_class.create(bc, 2048);
- *wordroot = idx->wordindex->root;
- printf("creating wordindex root = %d\n", *wordroot);
- }
- if (*nameroot) {
- printf("opening nameindex root = %d\n", *nameroot);
- idx->nameindex = ibex_hash_class.open(bc, *nameroot);
- } else {
- idx->nameindex = ibex_hash_class.create(bc, 2048);
- *nameroot = idx->nameindex->root;
- printf("creating nameindex root = %d\n", *nameroot);
- }
- return idx;
-}
-
-#if d(!)0
-static void
-cache_sanity(struct _wordcache *head)
-{
- while (head->next) {
- g_assert(head->filecount <= head->filealloc);
- g_assert(strlen(head->word) != 0);
- head = head->next;
- }
-}
-#endif
-
-static void word_index_pre(struct _IBEXWord *idx)
-{
-}
-
-static void word_index_post(struct _IBEXWord *idx)
-{
-}
-
-/* unindex all entries for name */
-static void unindex_name(struct _IBEXWord *idx, const char *name)
-{
- GArray *words;
- int i;
- nameid_t nameid, wordid;
- blockid_t nameblock, wordblock, newblock, nametail, wordtail, newtail;
- char *word;
- struct _wordcache *cache;
-
- d(printf("unindexing %s\n", name));
-
- /* lookup the hash key */
- nameid = idx->nameindex->klass->find(idx->nameindex, name, strlen(name));
- /* get the block for this key */
- nameblock = idx->nameindex->klass->get_data(idx->nameindex, nameid, &nametail);
- /* and the data for this block */
- words = idx->namestore->klass->get(idx->namestore, nameblock, nametail);
- /* walk it ... */
- for (i=0;i<words->len;i++) {
- /* get the word */
- wordid = g_array_index(words, nameid_t, i);
- d(printf(" word %d\n", wordid));
- /* get the data block */
- wordblock = idx->wordindex->klass->get_data(idx->wordindex, wordid, &wordtail);
- /* clear this name from it */
- newblock = wordblock;
- newtail = wordtail;
- idx->wordstore->klass->remove(idx->wordstore, &newblock, &newtail, nameid);
- if (newblock != wordblock || newtail != wordtail)
- idx->wordindex->klass->set_data(idx->wordindex, wordid, newblock, newtail);
-
- /* now check the cache as well */
- word = idx->nameindex->klass->get_key(idx->wordindex, wordid, NULL);
- if (word) {
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache) {
- /* its there, update our head/tail pointers */
- cache->wordblock = newblock;
- cache->wordtail = newtail;
-
- /* now check that we have a data entry in it */
- if (cache->filealloc == 0 && cache->filecount == 1) {
- if (cache->file.file0 == nameid) {
- cache->filecount = 0;
- }
- } else {
- int j;
-
- for (j=0;j<cache->filecount;j++) {
- if (cache->file.files[j] == nameid) {
- cache->file.files[j] = cache->file.files[cache->filecount-1];
- cache->filecount--;
- break;
- }
- }
- }
- }
- g_free(word);
- }
- }
- g_array_free(words, TRUE);
-
- /* and remove name data and itself */
- idx->namestore->klass->free(idx->namestore, nameblock, nametail);
- idx->nameindex->klass->remove(idx->nameindex, name, strlen(name));
-}
-
-/* index contains (any) data for name */
-static gboolean contains_name(struct _IBEXWord *idx, const char *name)
-{
- return idx->nameindex->klass->find(idx->nameindex, name, strlen(name)) != 0;
-}
-
-/* returns all matches for word */
-static GPtrArray *find(struct _IBEXWord *idx, const char *word)
-{
- nameid_t wordid, nameid;
- GPtrArray *res;
- GArray *names;
- int i;
- char *new;
- struct _wordcache *cache;
- blockid_t wordblock, wordtail;
-
- res = g_ptr_array_new();
-
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache) {
- /* freshen cache entry if we touch it */
- ibex_list_remove((struct _listnode *)cache);
- ibex_list_addtail(&idx->wordnodes, (struct _listnode *)cache);
- wordid = cache->wordid;
- wordblock = cache->wordblock;
- wordtail = cache->wordtail;
- } else {
- /* lookup the hash key */
- wordid = idx->wordindex->klass->find(idx->wordindex, word, strlen(word));
- /* get the block for this key */
- wordblock = idx->wordindex->klass->get_data(idx->wordindex, wordid, &wordtail);
- }
- /* and the data for this block */
- names = idx->wordstore->klass->get(idx->wordstore, wordblock, wordtail);
- /* .. including any memory-only data */
- if (cache) {
- if (cache->filealloc == 0 && cache->filecount == 1)
- g_array_append_val(names, cache->file.file0);
- else
- g_array_append_vals(names, cache->file.files, cache->filecount);
- }
-
- /* walk it ... converting id's back to strings */
- g_ptr_array_set_size(res, names->len);
- for (i=0;i<names->len;i++) {
- nameid = g_array_index(names, nameid_t, i);
- new = idx->nameindex->klass->get_key(idx->nameindex, nameid, NULL);
- res->pdata[i] = new;
- }
- g_array_free(names, TRUE);
- return res;
-}
-
-/* find if name contains word */
-static gboolean find_name(struct _IBEXWord *idx, const char *name, const char *word)
-{
- nameid_t wordid, nameid;
- blockid_t nameblock, nametail;
- struct _wordcache *cache;
- int i;
-
- /* lookup the hash key for the name */
- nameid = idx->nameindex->klass->find(idx->nameindex, name, strlen(name));
- /* get the block for this name */
- nameblock = idx->nameindex->klass->get_data(idx->nameindex, nameid, &nametail);
-
- /* check if there is an in-memory cache for this word, check its file there first */
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache) {
- /* freshen cache entry if we touch it */
- ibex_list_remove((struct _listnode *)cache);
- ibex_list_addtail(&idx->wordnodes, (struct _listnode *)cache);
- if (cache->filecount == 1 && cache->filealloc == 0) {
- if (cache->file.file0 == nameid)
- return TRUE;
- } else {
- for (i=0;i<cache->filecount;i++) {
- if (cache->file.files[i] == nameid)
- return TRUE;
- }
- }
- /* not there? well we can use the wordid anyway */
- wordid = cache->wordid;
- } else {
- /* lookup the hash key for word */
- wordid = idx->wordindex->klass->find(idx->wordindex, word, strlen(word));
- }
-
- /* see if wordid is in nameblock */
- return idx->namestore->klass->find(idx->namestore, nameblock, nametail, wordid);
-}
-
-/* cache helper functions */
-/* flush a cache entry to disk, and empty it out */
-static void
-sync_cache_entry(struct _IBEXWord *idx, struct _wordcache *cache)
-{
- GArray array; /* just use this as a header */
- blockid_t oldblock, oldtail;
-
- d(printf("syncing cache entry '%s' used %d\n", cache->word, cache->filecount));
- if (cache->filecount == 1 && cache->filealloc == 0)
- array.data = (char *)&cache->file.file0;
- else
- array.data = (char *)cache->file.files;
- array.len = cache->filecount;
- oldblock = cache->wordblock;
- oldtail = cache->wordtail;
- idx->wordstore->klass->add_list(idx->wordstore, &cache->wordblock, &cache->wordtail, &array);
- if (oldblock != cache->wordblock || oldtail != cache->wordtail) {
- idx->wordindex->klass->set_data(idx->wordindex, cache->wordid, cache->wordblock, cache->wordtail);
- }
- cache->filecount = 0;
-}
-
-/* create a new key in an index, returning its id and head block */
-static void
-add_index_key(struct _IBEXIndex *wordindex, const char *word, nameid_t *wordid, blockid_t *wordblock, blockid_t *wordtail)
-{
- /* initialise cache entry - id of word entry and head block */
- *wordid = wordindex->klass->find(wordindex, word, strlen(word));
- if (*wordid == 0) {
- *wordid = wordindex->klass->insert(wordindex, word, strlen(word));
- *wordblock = 0;
- *wordtail = 0;
- } else {
- *wordblock = wordindex->klass->get_data(wordindex, *wordid, wordtail);
- }
-}
-
-/* create a new key in a cached index (only word cache so far), flushing old keys
- if too much space is being used */
-static struct _wordcache *
-add_index_cache(struct _IBEXWord *idx, const char *word)
-{
- struct _wordcache *cache;
-
- d(printf("adding %s to cache\n", word));
-
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache == 0) {
- /* see if we have to flush off the last entry */
- if (idx->wordcount >= WORDCACHE_SIZE) {
- struct _wordcache *mincache;
- int min, count=0;
- /* remove last entry, and flush it */
- cache = (struct _wordcache *)idx->wordnodes.tailpred;
- mincache = cache;
- min = mincache->filecount;
-
- d(printf("flushing word from cache %s\n", cache->word));
- /* instead of just using the last entry, we try and find an entry with
- with only 1 item (failing that, the smallest in the range we look at) */
- /* this could probably benefit greatly from a more sophisticated aging algorithm */
- while (cache->next && count < 100) {
- if (cache->filecount == 1) {
- mincache = cache;
- break;
- }
- if (cache->filecount > 0 && cache->filecount < min) {
- mincache = cache;
- min = cache->filecount;
- }
- cache = cache->next;
- count++;
- }
- ibex_list_remove((struct _listnode *)mincache);
- g_hash_table_remove(idx->wordcache, mincache->word);
- sync_cache_entry(idx, mincache);
- if (mincache->filealloc)
- g_free(mincache->file.files);
- g_free(mincache);
- idx->wordcount--;
- }
- cache = g_malloc0(sizeof(*cache)+strlen(word));
- /* initialise cache entry - id of word entry and head block */
- add_index_key(idx->wordindex, word, &cache->wordid, &cache->wordblock, &cache->wordtail);
- /* other fields */
- strcpy(cache->word, word);
- cache->filecount = 0;
- g_hash_table_insert(idx->wordcache, cache->word, cache);
- ibex_list_addhead(&idx->wordnodes, (struct _listnode *)cache);
- idx->wordcount++;
- } else {
- /* move cache bucket ot the head of the cache list */
- ibex_list_remove((struct _listnode *)cache);
- ibex_list_addhead(&idx->wordnodes, (struct _listnode *)cache);
- }
- return cache;
-}
-
-/* adds a single word to name (slow) */
-static void add(struct _IBEXWord *idx, const char *name, const char *word)
-{
- nameid_t nameid;
- blockid_t nameblock, newblock, nametail, newtail;
- struct _wordcache *cache;
-
- g_error("Dont use wordindex::add()");
- abort();
-
- cache = add_index_cache(idx, word);
-
- /* get the nameid and block start for this name */
- add_index_key(idx->nameindex, name, &nameid, &nameblock, &nametail);
-
- /* check for repeats of the last name - dont add anything */
- if (cache->filecount == 1 && cache->filealloc == 0) {
- if (cache->file.file0 == nameid)
- return;
- } else {
- if (cache->file.files[cache->filecount] == nameid)
- return;
- }
-
- /* see if we are setting the first, drop it in the union */
- if (cache->filecount == 0 && cache->filealloc == 0) {
- cache->file.file0 = nameid;
- } else if (cache->filecount == 1 && cache->filealloc == 0) {
- nameid_t saveid;
- /* we need to allocate space for words */
- saveid = cache->file.file0;
- cache->file.files = g_malloc(sizeof(cache->file.files[0]) * CACHE_FILE_COUNT);
- /* this could possibly grow as needed, but i wont for now */
- cache->filealloc = CACHE_FILE_COUNT;
- cache->file.files[0] = saveid;
- cache->file.files[1] = nameid;
- } else {
- cache->file.files[cache->filecount] = nameid;
- }
-
- cache->filecount++;
-
- /* if we are full, force a flush now */
- if (cache->filealloc && cache->filecount >= cache->filealloc) {
- sync_cache_entry(idx, cache);
- }
-
- newtail = nametail;
- newblock = nameblock;
- idx->namestore->klass->add(idx->namestore, &newblock, &newtail, cache->wordid);
- if (newblock != nameblock || newtail != nametail) {
- idx->nameindex->klass->set_data(idx->nameindex, nameid, newblock, newtail);
- }
-}
-
-/* adds a bunch of words to a given name */
-static void add_list(struct _IBEXWord *idx, const char *name, GPtrArray *words)
-{
- int i;
- GArray *data = g_array_new(0, 0, sizeof(nameid_t));
- blockid_t nameblock, newblock, nametail, newtail;
- nameid_t nameid;
- struct _wordcache *cache;
-
- d(printf("Adding words to name %s\n", name));
-
- d(cache_sanity((struct _wordcache *)idx->wordnodes.head));
-
- /* get the nameid and block start for this name */
- add_index_key(idx->nameindex, name, &nameid, &nameblock, &nametail);
-
- d(cache_sanity((struct _wordcache *)idx->wordnodes.head));
-
- for (i=0;i<words->len;i++) {
- char *word = words->pdata[i];
-
- cache = add_index_cache(idx, word);
-
- /*d(cache_sanity((struct _wordcache *)idx->wordnodes.head));*/
-
- /* check for duplicates; doesn't catch duplicates over an overflow boundary. Watch me care. */
- if (cache->filecount == 0
- /* the 1 item case */
- || (cache->filecount == 1 && cache->filealloc == 0 && cache->file.file0 != nameid)
- /* the normal case */
- || (cache->filealloc > 0 && cache->file.files[cache->filecount-1] != nameid)) {
-
- /* see if we are setting the first, drop it in the union */
- if (cache->filecount == 0 && cache->filealloc == 0) {
- cache->file.file0 = nameid;
- } else if (cache->filecount == 1 && cache->filealloc == 0) {
- nameid_t saveid;
- /* we need to allocate space for words */
- saveid = cache->file.file0;
- cache->file.files = g_malloc(sizeof(cache->file.files[0]) * CACHE_FILE_COUNT);
- /* this could possibly grow as needed, but i wont for now */
- cache->filealloc = CACHE_FILE_COUNT;
- cache->file.files[0] = saveid;
- cache->file.files[1] = nameid;
- } else {
- cache->file.files[cache->filecount] = nameid;
- }
-
- cache->filecount++;
-
- /* if we are full, force a flush now */
- if (cache->filealloc && cache->filecount >= cache->filealloc) {
- sync_cache_entry(idx, cache);
- }
-
- /*d(cache_sanity((struct _wordcache *)idx->wordnodes.head));*/
-
- /* and append this wordid for this name in memory */
- g_array_append_val(data, cache->wordid);
- }
-
- /*d(cache_sanity((struct _wordcache *)idx->wordnodes.head));*/
- }
-
- d(cache_sanity((struct _wordcache *)idx->wordnodes.head));
-
- /* and append these word id's in one go */
- newblock = nameblock;
- newtail = nametail;
- idx->namestore->klass->add_list(idx->namestore, &newblock, &newtail, data);
- if (newblock != nameblock || newtail != nametail) {
- idx->nameindex->klass->set_data(idx->nameindex, nameid, newblock, newtail);
- }
-
- d(cache_sanity((struct _wordcache *)idx->wordnodes.head));
-
- g_array_free(data, TRUE);
-}
-
-/* sync any in-memory data to disk */
-static int
-word_sync(struct _IBEXWord *idx)
-{
- /* we just flush also, save memory */
- word_flush(idx);
-
-#if 0
- struct _wordcache *cache = (struct _wordcache *)idx->wordnodes.head;
-
- while (cache->next) {
- sync_cache_entry(idx, cache);
- cache = cache->next;
- }
-
- /*ibex_hash_dump(idx->wordindex);*/
- /*ibex_hash_dump(idx->nameindex);*/
-#endif
- return 0;
-}
-
-/* sync and flush any in-memory data to disk and free it */
-static int
-word_flush(struct _IBEXWord *idx)
-{
- struct _wordcache *cache = (struct _wordcache *)idx->wordnodes.head, *next;
- extern int block_log;
- int count= 0;
- int used=0, wasted=0;
-
- block_log = 0;
-
- next = cache->next;
- while (next) {
- count++;
- used += sizeof(struct _wordcache) + (cache->filealloc * sizeof(nameid_t));
- if (cache->filealloc)
- wasted += (cache->filealloc-cache->filecount)*sizeof(nameid_t);
- else
- wasted += (1-cache->filecount) * sizeof(nameid_t);
-
- /*printf("syncing word %s\n", cache->word);*/
- sync_cache_entry(idx, cache);
- g_hash_table_remove(idx->wordcache, cache->word);
- if (cache->filealloc)
- g_free(cache->file.files);
- g_free(cache);
- cache = next;
- next = cache->next;
- }
-
- printf("sync cache entries = %d\n used memory = %d\n wasted memory = %d\n", count, used, wasted);
-
- block_log = 0;
- ibex_list_new(&idx->wordnodes);
- idx->wordcount = 0;
- return 0;
-}
-
-static int word_close(struct _IBEXWord *idx)
-{
- struct _wordcache *cache = (struct _wordcache *)idx->wordnodes.head, *next;
- extern int block_log;
- int count= 0;
- int used=0, wasted=0;
-
- block_log = 0;
-
- next = cache->next;
- while (next) {
- count++;
- used += sizeof(struct _wordcache) + (cache->filealloc * sizeof(nameid_t));
- if (cache->filealloc)
- wasted += (cache->filealloc-cache->filecount)*sizeof(nameid_t);
- else
- wasted += (1-cache->filecount) * sizeof(nameid_t);
-
- /*printf("closing word %s\n", cache->word);*/
- sync_cache_entry(idx, cache);
- if (cache->filealloc)
- g_free(cache->file.files);
- g_free(cache);
- cache = next;
- next = cache->next;
- }
- block_log = 0;
-
- printf("cache entries = %d\n used memory = %d\n wasted memory = %d\n", count, used, wasted);
-
- idx->namestore->klass->close(idx->namestore);
- idx->nameindex->klass->close(idx->nameindex);
- /*same as namestore:
- idx->wordstore->klass->close(idx->wordstore);*/
- idx->wordindex->klass->close(idx->wordindex);
- g_hash_table_destroy(idx->wordcache);
- g_free(idx);
-
- return 0;
-}
diff --git a/libibex/wordindex.h b/libibex/wordindex.h
deleted file mode 100644
index e113f7e82c..0000000000
--- a/libibex/wordindex.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _WORDINDEX_H
-#define _WORDINDEX_H
-
-#include <glib.h>
-
-#include "block.h"
-#include "index.h"
-
-struct _IBEXWord;
-
-/* not used yet */
-typedef void (*IBEXNormaliseFunc)(char *source, int len, char *dest);
-
-struct _IBEXWordClass {
- int (*sync)(struct _IBEXWord *);
- int (*flush)(struct _IBEXWord *);
- int (*close)(struct _IBEXWord *);
-
- void (*index_pre)(struct _IBEXWord *); /* get ready for doing a lot of indexing. may be a nop */
- void (*index_post)(struct _IBEXWord *);
-
- void (*unindex_name)(struct _IBEXWord *, const char *name); /* unindex all entries for name */
- gboolean (*contains_name)(struct _IBEXWord *, const char *name); /* index contains data for name */
- GPtrArray *(*find)(struct _IBEXWord *, const char *word); /* returns all matches for word */
- gboolean (*find_name)(struct _IBEXWord *, const char *name, const char *word); /* find if name contains word */
- void (*add)(struct _IBEXWord *, const char *name, const char *word); /* adds a single word to name */
- void (*add_list)(struct _IBEXWord *, const char *name, GPtrArray *words);/* adds a bunch of words to a given name */
-};
-
-struct _IBEXWord {
- struct _IBEXWordClass *klass;
- struct _IBEXStore *wordstore;
- struct _IBEXIndex *wordindex;
- struct _IBEXStore *namestore;
- struct _IBEXIndex *nameindex;
-
- struct _memcache *blocks;
-
- /* word caching info (should probably be modularised) */
- GHashTable *wordcache; /* word->struct _wordcache mapping */
- struct _list wordnodes; /* LRU list of wordcache structures */
- int wordcount; /* how much space used in cache */
- int precount;
- GHashTable *namecache; /* a list of names (only), cached for quick reference */
- int nameinit;
-};
-
-
-/*struct _IBEXWord *ibex_create_word_index(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot);*/
-
-/* alternate implemenation */
-struct _IBEXWord *ibex_create_word_index_mem(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot);
-
-#endif /* !_WORDINDEX_H */
diff --git a/libibex/wordindexmem.c b/libibex/wordindexmem.c
deleted file mode 100644
index 077b53e051..0000000000
--- a/libibex/wordindexmem.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Michael Zucchi <notzed@ximian.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 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.
- */
-
-/* this is the same as wordindex.c, but it doesn't have an LRU cache
- for word names. it has a lookup tab le that is only loaded if
- index-pre is called, otherwise it always hits disk */
-
-/* code to manage a word index */
-/* includes a cache for word index writes,
- but not for name index writes (currently), or any reads.
-
-Note the word cache is only needed during indexing of lots
-of words, and could then be discarded (:flush()).
-
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <glib.h>
-
-#include "block.h"
-#include "index.h"
-#include "wordindex.h"
-
-/*#define MALLOC_CHECK*/
-
-#ifdef MALLOC_CHECK
-#include <mcheck.h>
-#endif
-
-#define d(x)
-
-/*#define WORDCACHE_SIZE (256)*/
-#define WORDCACHE_SIZE (4096)
-
-extern struct _IBEXStoreClass ibex_diskarray_class;
-extern struct _IBEXIndexClass ibex_hash_class;
-
-/* need 2 types of hash key?
- one that just stores the wordid / wordblock
- and one that stores the filecount/files?
-*/
-
-
-#define CACHE_FILE_COUNT (62)
-
-struct _wordcache {
- nameid_t wordid; /* disk wordid */
- blockid_t wordblock; /* head of disk list */
- blockid_t wordtail; /* and the tail data */
- short filecount; /* how many valid items in files[] */
- short filealloc; /* how much allocated space in files[] */
- union {
- nameid_t *files; /* memory cache of files */
- nameid_t file0; /* if filecount == 1 && filealloc == 0, store directly */
- } file;
- char word[1]; /* actual word follows */
-};
-
-static void unindex_name(struct _IBEXWord *, const char *name); /* unindex all entries for name */
-static gboolean contains_name(struct _IBEXWord *, const char *name); /* index contains data for name */
-static GPtrArray *find(struct _IBEXWord *, const char *word); /* returns all matches for word */
-static gboolean find_name(struct _IBEXWord *, const char *name, const char *word); /* find if name contains word */
-static void add(struct _IBEXWord *, const char *name, const char *word); /* adds a single word to name (slow) */
-static void add_list(struct _IBEXWord *, const char *name, GPtrArray *words);/* adds a bunch of words to a given name */
-static int word_sync(struct _IBEXWord *idx);
-static int word_flush(struct _IBEXWord *idx);
-static int word_close(struct _IBEXWord *idx);
-static void word_index_pre(struct _IBEXWord *idx);
-static void word_index_post(struct _IBEXWord *idx);
-
-static void sync_cache_entry(struct _IBEXWord *idx, struct _wordcache *cache);
-
-struct _IBEXWordClass ibex_word_index_mem_class = {
- word_sync, word_flush, word_close,
- word_index_pre, word_index_post,
- unindex_name, contains_name,
- find, find_name,
- add, add_list
-};
-
-#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
-
-/* this interface isn't the best, but it'll do for now */
-struct _IBEXWord *
-ibex_create_word_index_mem(struct _memcache *bc, blockid_t *wordroot, blockid_t *nameroot)
-{
- struct _IBEXWord *idx;
-
- idx = g_malloc0(sizeof(*idx));
- idx->blocks = bc;
- idx->wordcache = g_hash_table_new(g_str_hash, g_str_equal);
- ibex_list_new(&idx->wordnodes);
- idx->wordcount = 0;
- idx->precount = 0;
- idx->namecache = g_hash_table_new(g_str_hash, g_str_equal);
- idx->nameinit = 0;
- idx->klass = &ibex_word_index_mem_class;
-
- /* we use the same block array storage for both indexes at the moment */
- idx->wordstore = ibex_diskarray_class.create(bc);
- idx->namestore = idx->wordstore;
-
- /* but not the same indexes! */
- if (*wordroot) {
- d(printf("opening wordindex root = %d\n", *wordroot));
- idx->wordindex = ibex_hash_class.open(bc, *wordroot);
- } else {
- idx->wordindex = ibex_hash_class.create(bc, 2048);
- *wordroot = idx->wordindex->root;
- d(printf("creating wordindex root = %d\n", *wordroot));
- }
- if (*nameroot) {
- d(printf("opening nameindex root = %d\n", *nameroot));
- idx->nameindex = ibex_hash_class.open(bc, *nameroot);
- } else {
- idx->nameindex = ibex_hash_class.create(bc, 2048);
- *nameroot = idx->nameindex->root;
- d(printf("creating nameindex root = %d\n", *nameroot));
- }
- return idx;
-}
-
-#if (d(!)0) || defined(MALLOC_CHECK)
-static void
-node_sanity(char *key, struct _wordcache *node, void *data)
-{
- g_assert(node->filecount <= node->filealloc || (node->filecount == 1 && node->filealloc == 0));
- g_assert(strlen(node->word) != 0);
-#ifdef MALLOC_CHECK
- checkmem(node);
- if (node->filealloc)
- checkmem(node->file.files);
-#endif
-}
-
-static void
-cache_sanity(struct _IBEXWord *idx)
-{
-#ifdef MALLOC_CHECK
- checkmem(idx);
-#endif
- g_hash_table_foreach(idx->wordcache, (GHFunc)node_sanity, idx);
-}
-#endif
-
-static void word_index_pre(struct _IBEXWord *idx)
-{
- struct _IBEXCursor *idc;
- struct _wordcache *cache;
- nameid_t wordid;
- char *key;
- int len;
-
- idx->precount ++;
- if (idx->precount > 1)
- return;
-
- /* NOOP if failed */
- if (idx->blocks->failed) {
- g_warning("word_index_pre() on failed data file");
- return;
- }
-
- /* want to load all words into the cache lookup table */
- d(printf("pre-loading all word info into memory\n"));
- idc = idx->wordindex->klass->get_cursor(idx->wordindex);
- while ( (wordid = idc->klass->next(idc)) ) {
- key = idc->index->klass->get_key(idc->index, wordid, &len);
- /*d(printf("Adding word %s\n", key));*/
- cache = g_malloc0(sizeof(*cache) + strlen(key));
- strcpy(cache->word, key);
- g_free(key);
- cache->wordid = wordid;
- cache->wordblock = idc->index->klass->get_data(idc->index, wordid, &cache->wordtail);
- cache->filecount = 0;
- cache->filealloc = 0;
- g_hash_table_insert(idx->wordcache, cache->word, cache);
- idx->wordcount++;
- }
-
-#ifdef MALLOC_CHECK
- cache_sanity(idx);
-#endif
-
- idc->klass->close(idc);
-
- d(printf("done\n"));
-}
-
-static gboolean
-sync_free_value(void *key, void *value, void *data)
-{
- struct _wordcache *cache = (struct _wordcache *)value;
- struct _IBEXWord *idx = (struct _IBEXWord *)data;
-
- sync_cache_entry(idx, cache);
- if (cache->filealloc)
- g_free(cache->file.files);
- g_free(cache);
-
- return TRUE;
-}
-
-#if d(!)0
-static void
-sync_value(void *key, void *value, void *data)
-{
- struct _wordcache *cache = (struct _wordcache *)value;
- struct _IBEXWord *idx = (struct _IBEXWord *)data;
-
- sync_cache_entry(idx, cache);
-}
-#endif
-
-static void word_index_post(struct _IBEXWord *idx)
-{
- idx->precount--;
- if (idx->precount > 0)
- return;
- idx->precount = 0;
-
-#ifdef MALLOC_CHECK
- cache_sanity(idx);
-#endif
-
- g_hash_table_foreach_remove(idx->wordcache, sync_free_value, idx);
- idx->wordcount = 0;
-}
-
-/* unindex all entries for name */
-static void unindex_name(struct _IBEXWord *idx, const char *name)
-{
- GArray *words;
- int i;
- nameid_t nameid, wordid;
- blockid_t nameblock, wordblock, newblock, nametail, wordtail, newtail;
- char *word;
- struct _wordcache *cache;
-
- d(printf("unindexing %s\n", name));
-
- /* if we have a namecache, check that to see if we need to remove that item, or there is no work here */
- if (idx->nameinit) {
- char *oldkey;
- gboolean oldval;
-
- if (g_hash_table_lookup_extended(idx->namecache, name, (void *)&oldkey, (void *)&oldval)) {
- g_hash_table_remove(idx->namecache, oldkey);
- g_free(oldkey);
- } else {
- return;
- }
- }
-
- /* lookup the hash key */
- nameid = idx->nameindex->klass->find(idx->nameindex, name, strlen(name));
- /* get the block for this key */
- nameblock = idx->nameindex->klass->get_data(idx->nameindex, nameid, &nametail);
- /* and the data for this block */
- words = idx->namestore->klass->get(idx->namestore, nameblock, nametail);
- /* walk it ... */
- for (i=0;i<words->len;i++) {
- /* get the word */
- wordid = g_array_index(words, nameid_t, i);
- d(printf(" word %d\n", wordid));
- /* get the data block */
- wordblock = idx->wordindex->klass->get_data(idx->wordindex, wordid, &wordtail);
- /* clear this name from it */
- newblock = wordblock;
- newtail = wordtail;
- idx->wordstore->klass->remove(idx->wordstore, &newblock, &newtail, nameid);
- if (newblock != wordblock || newtail != wordtail)
- idx->wordindex->klass->set_data(idx->wordindex, wordid, newblock, newtail);
-
- /* now check the cache as well */
- word = idx->nameindex->klass->get_key(idx->wordindex, wordid, NULL);
- if (word) {
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache) {
- /* its there, update our head/tail pointers */
- cache->wordblock = newblock;
- cache->wordtail = newtail;
-
- /* now check that we have a data entry in it */
- if (cache->filealloc == 0 && cache->filecount == 1) {
- if (cache->file.file0 == nameid) {
- cache->filecount = 0;
- }
- } else {
- int j;
-
- for (j=0;j<cache->filecount;j++) {
- if (cache->file.files[j] == nameid) {
- cache->file.files[j] = cache->file.files[cache->filecount-1];
- cache->filecount--;
- break;
- }
- }
- }
- }
- g_free(word);
- }
- }
- g_array_free(words, TRUE);
-
- /* and remove name data and itself */
- idx->namestore->klass->free(idx->namestore, nameblock, nametail);
- idx->nameindex->klass->remove(idx->nameindex, name, strlen(name));
-}
-
-/* index contains (any) data for name */
-static gboolean contains_name(struct _IBEXWord *idx, const char *name)
-{
- struct _IBEXCursor *idc;
- nameid_t wordid;
- char *key;
- int len;
-
- /* load all the names into memory, since we're *usually* about to do a lot of these */
-
- /* Note that because of the (poor) hash algorithm, this is >> faster than
- looking up every key in turn. Basically because all keys are stored packed
- in the same list, not in buckets of keys for the same hash (among other reasons) */
-
- if (!idx->nameinit) {
- d(printf("pre-loading all name info into memory\n"));
- idc = idx->nameindex->klass->get_cursor(idx->nameindex);
- while ( (wordid = idc->klass->next(idc)) ) {
- key = idc->index->klass->get_key(idc->index, wordid, &len);
- g_hash_table_insert(idx->namecache, key, (void *)TRUE);
- }
- idc->klass->close(idc);
- idx->nameinit = TRUE;
- }
-
- return (gboolean)g_hash_table_lookup(idx->namecache, name);
- /*return idx->nameindex->klass->find(idx->nameindex, name, strlen(name)) != 0;*/
-}
-
-/* returns all matches for word */
-static GPtrArray *find(struct _IBEXWord *idx, const char *word)
-{
- nameid_t wordid, nameid;
- GPtrArray *res;
- GArray *names;
- int i;
- char *new;
- struct _wordcache *cache;
- blockid_t wordblock, wordtail;
-
- res = g_ptr_array_new();
-
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache) {
-#if 0
- /* freshen cache entry if we touch it */
- ibex_list_remove((struct _listnode *)cache);
- ibex_list_addtail(&idx->wordnodes, (struct _listnode *)cache);
-#endif
- wordid = cache->wordid;
- wordblock = cache->wordblock;
- wordtail = cache->wordtail;
- } else {
- /* lookup the hash key */
- wordid = idx->wordindex->klass->find(idx->wordindex, word, strlen(word));
- /* get the block for this key */
- wordblock = idx->wordindex->klass->get_data(idx->wordindex, wordid, &wordtail);
- }
- /* and the data for this block */
- names = idx->wordstore->klass->get(idx->wordstore, wordblock, wordtail);
- /* .. including any memory-only data */
- if (cache) {
- if (cache->filealloc == 0 && cache->filecount == 1)
- g_array_append_val(names, cache->file.file0);
- else
- g_array_append_vals(names, cache->file.files, cache->filecount);
- }
-
- /* walk it ... converting id's back to strings */
- g_ptr_array_set_size(res, names->len);
- for (i=0;i<names->len;i++) {
- nameid = g_array_index(names, nameid_t, i);
- new = idx->nameindex->klass->get_key(idx->nameindex, nameid, NULL);
- res->pdata[i] = new;
- }
- g_array_free(names, TRUE);
- return res;
-}
-
-/* find if name contains word */
-static gboolean find_name(struct _IBEXWord *idx, const char *name, const char *word)
-{
- nameid_t wordid, nameid;
- blockid_t nameblock, nametail;
- struct _wordcache *cache;
- int i;
-
- /* if we have the namelist in memory, quick-check that */
- if (idx->nameinit && g_hash_table_lookup(idx->namecache, name) == NULL)
- return FALSE;
-
- /* lookup the hash key for the name */
- nameid = idx->nameindex->klass->find(idx->nameindex, name, strlen(name));
- /* get the block for this name */
- nameblock = idx->nameindex->klass->get_data(idx->nameindex, nameid, &nametail);
-
- /* check if there is an in-memory cache for this word, check its file there first */
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache) {
-#if 0
- /* freshen cache entry if we touch it */
- ibex_list_remove((struct _listnode *)cache);
- ibex_list_addtail(&idx->wordnodes, (struct _listnode *)cache);
-#endif
- if (cache->filecount == 1 && cache->filealloc == 0) {
- if (cache->file.file0 == nameid)
- return TRUE;
- } else {
- for (i=0;i<cache->filecount;i++) {
- if (cache->file.files[i] == nameid)
- return TRUE;
- }
- }
- /* not there? well we can use the wordid anyway */
- wordid = cache->wordid;
- } else {
- /* lookup the hash key for word */
- wordid = idx->wordindex->klass->find(idx->wordindex, word, strlen(word));
- }
-
- /* see if wordid is in nameblock */
- return idx->namestore->klass->find(idx->namestore, nameblock, nametail, wordid);
-}
-
-/* cache helper functions */
-/* flush a cache entry to disk, and empty it out */
-static void
-sync_cache_entry(struct _IBEXWord *idx, struct _wordcache *cache)
-{
- GArray array; /* just use this as a header */
- blockid_t oldblock, oldtail;
-
- /* NOOP if failed */
- if (idx->blocks->failed)
- return;
-
- if (cache->filecount == 0)
- return;
-
- d(printf("syncing cache entry '%s' used %d\n", cache->word, cache->filecount));
- if (cache->filecount == 1 && cache->filealloc == 0)
- array.data = (char *)&cache->file.file0;
- else
- array.data = (char *)cache->file.files;
- array.len = cache->filecount;
- oldblock = cache->wordblock;
- oldtail = cache->wordtail;
- idx->wordstore->klass->add_list(idx->wordstore, &cache->wordblock, &cache->wordtail, &array);
- if (oldblock != cache->wordblock || oldtail != cache->wordtail) {
- idx->wordindex->klass->set_data(idx->wordindex, cache->wordid, cache->wordblock, cache->wordtail);
- }
- cache->filecount = 0;
-}
-
-/* create a new key in an index, returning its id and head block */
-static void
-add_index_key(struct _IBEXIndex *wordindex, const char *word, nameid_t *wordid, blockid_t *wordblock, blockid_t *wordtail)
-{
- /* initialise cache entry - id of word entry and head block */
- *wordid = wordindex->klass->find(wordindex, word, strlen(word));
-
- if (*wordid == 0) {
- *wordid = wordindex->klass->insert(wordindex, word, strlen(word));
- *wordblock = 0;
- *wordtail = 0;
- } else {
- *wordblock = wordindex->klass->get_data(wordindex, *wordid, wordtail);
- }
-}
-
-/* create a new key in a cached index (only word cache so far), flushing old keys
- if too much space is being used */
-static struct _wordcache *
-add_index_cache(struct _IBEXWord *idx, const char *word)
-{
- struct _wordcache *cache;
-
- cache = g_hash_table_lookup(idx->wordcache, word);
- if (cache == 0) {
- /*d(printf("adding %s to cache\n", word));*/
-
-#if 0
- /* see if we have to flush off the last entry */
- if (idx->wordcount >= WORDCACHE_SIZE) {
- struct _wordcache *mincache;
- int min, count=0;
- /* remove last entry, and flush it */
- cache = (struct _wordcache *)idx->wordnodes.tailpred;
- mincache = cache;
- min = mincache->filecount;
-
- d(printf("flushing word from cache %s\n", cache->word));
- /* instead of just using the last entry, we try and find an entry with
- with only 1 item (failing that, the smallest in the range we look at) */
- /* this could probably benefit greatly from a more sophisticated aging algorithm */
- while (cache->next && count < 100) {
- if (cache->filecount == 1) {
- mincache = cache;
- break;
- }
- if (cache->filecount > 0 && cache->filecount < min) {
- mincache = cache;
- min = cache->filecount;
- }
- cache = cache->next;
- count++;
- }
- ibex_list_remove((struct _listnode *)mincache);
- g_hash_table_remove(idx->wordcache, mincache->word);
- sync_cache_entry(idx, mincache);
- if (mincache->filealloc)
- g_free(mincache->file.files);
- g_free(mincache);
- idx->wordcount--;
- }
-#endif
- cache = g_malloc0(sizeof(*cache)+strlen(word));
- /* if we're in an index state, we can assume we dont have it if we dont have it in memory */
- if (idx->precount == 0) {
- /* initialise cache entry - id of word entry and head block */
- add_index_key(idx->wordindex, word, &cache->wordid, &cache->wordblock, &cache->wordtail);
- } else {
- cache->wordid = idx->wordindex->klass->insert(idx->wordindex, word, strlen(word));
- }
- /* other fields */
- strcpy(cache->word, word);
- cache->filecount = 0;
- g_hash_table_insert(idx->wordcache, cache->word, cache);
-#if 0
- ibex_list_addhead(&idx->wordnodes, (struct _listnode *)cache);
-#endif
- idx->wordcount++;
- } else {
- /*d(printf("already have %s in cache\n", word));*/
-#if 0
- /* move cache bucket ot the head of the cache list */
- ibex_list_remove((struct _listnode *)cache);
- ibex_list_addhead(&idx->wordnodes, (struct _listnode *)cache);
-#endif
- }
- return cache;
-}
-
-/* adds a single word to name (slow) */
-static void add(struct _IBEXWord *idx, const char *name, const char *word)
-{
- nameid_t nameid;
- blockid_t nameblock, newblock, nametail, newtail;
- struct _wordcache *cache;
-
- g_error("Dont use wordindex::add()");
- abort();
-
- cache = add_index_cache(idx, word);
-
- /* get the nameid and block start for this name */
- add_index_key(idx->nameindex, name, &nameid, &nameblock, &nametail);
-
- /* check for repeats of the last name - dont add anything */
- if (cache->filecount == 1 && cache->filealloc == 0) {
- if (cache->file.file0 == nameid)
- return;
- } else {
- if (cache->file.files[cache->filecount] == nameid)
- return;
- }
-
- /* see if we are setting the first, drop it in the union */
- if (cache->filecount == 0 && cache->filealloc == 0) {
- cache->file.file0 = nameid;
- } else if (cache->filecount == 1 && cache->filealloc == 0) {
- nameid_t saveid;
- /* we need to allocate space for words */
- saveid = cache->file.file0;
- cache->file.files = g_malloc(sizeof(cache->file.files[0]) * CACHE_FILE_COUNT);
- /* this could possibly grow as needed, but i wont for now */
- cache->filealloc = CACHE_FILE_COUNT;
- cache->file.files[0] = saveid;
- cache->file.files[1] = nameid;
- } else {
- cache->file.files[cache->filecount] = nameid;
- }
-
- cache->filecount++;
-
- /* if we are full, force a flush now */
- if (cache->filealloc && cache->filecount >= cache->filealloc) {
- sync_cache_entry(idx, cache);
- }
-
- newtail = nametail;
- newblock = nameblock;
- idx->namestore->klass->add(idx->namestore, &newblock, &newtail, cache->wordid);
- if (newblock != nameblock || newtail != nametail) {
- idx->nameindex->klass->set_data(idx->nameindex, nameid, newblock, newtail);
- }
-}
-
-/* adds a bunch of words to a given name */
-static void add_list(struct _IBEXWord *idx, const char *name, GPtrArray *words)
-{
- int i;
- GArray *data = g_array_new(0, 0, sizeof(nameid_t));
- blockid_t nameblock, newblock, nametail, newtail;
- nameid_t nameid;
- struct _wordcache *cache;
-
- d(printf("Adding words to name %s\n", name));
-
- d(cache_sanity(idx));
-
- /* make sure we keep the namecache in sync, if it is active */
- if (idx->nameinit && g_hash_table_lookup(idx->namecache, name) == NULL) {
- g_hash_table_insert(idx->namecache, g_strdup(name), (void *)TRUE);
- /* we know we dont have it in the disk hash either, so we insert anew (saves a lookup) */
- nameid = idx->nameindex->klass->insert(idx->nameindex, name, strlen(name));
- nameblock = 0;
- nametail = 0;
- } else {
- /* get the nameid and block start for this name */
- add_index_key(idx->nameindex, name, &nameid, &nameblock, &nametail);
- }
-
- d(cache_sanity(idx));
-
- for (i=0;i<words->len;i++) {
- char *word = words->pdata[i];
-
- cache = add_index_cache(idx, word);
-
- /*d(cache_sanity(idx));*/
-
- /* check for duplicates; doesn't catch duplicates over an overflow boundary. Watch me care. */
- if (cache->filecount == 0
- /* the 1 item case */
- || (cache->filecount == 1 && cache->filealloc == 0 && cache->file.file0 != nameid)
- /* the normal case */
- || (cache->filealloc > 0 && cache->file.files[cache->filecount-1] != nameid)) {
-
- /* see if we are setting the first, drop it in the union */
- if (cache->filecount == 0 && cache->filealloc == 0) {
- cache->file.file0 = nameid;
- } else if (cache->filecount == 1 && cache->filealloc == 0) {
- nameid_t saveid;
- /* we need to allocate space for words */
- saveid = cache->file.file0;
- cache->file.files = g_malloc(sizeof(cache->file.files[0]) * CACHE_FILE_COUNT);
- /* this could possibly grow as needed, but i wont for now */
- cache->filealloc = CACHE_FILE_COUNT;
- cache->file.files[0] = saveid;
- cache->file.files[1] = nameid;
- } else {
- cache->file.files[cache->filecount] = nameid;
- }
-
- cache->filecount++;
-
- /* if we are full, force a flush now */
- if (cache->filealloc && cache->filecount >= cache->filealloc) {
- sync_cache_entry(idx, cache);
- }
-
- /*d(cache_sanity(idx));*/
-
- /* and append this wordid for this name in memory */
- g_array_append_val(data, cache->wordid);
- }
-
- /*d(cache_sanity(idx));*/
- }
-
- d(cache_sanity(idx));
-
- /* and append these word id's in one go */
- newblock = nameblock;
- newtail = nametail;
- idx->namestore->klass->add_list(idx->namestore, &newblock, &newtail, data);
- if (newblock != nameblock || newtail != nametail) {
- idx->nameindex->klass->set_data(idx->nameindex, nameid, newblock, newtail);
- }
-
- d(cache_sanity(idx));
-
- g_array_free(data, TRUE);
-}
-
-/* sync any in-memory data to disk */
-static int
-word_sync(struct _IBEXWord *idx)
-{
- /* we just flush also, save memory */
- word_flush(idx);
-
-#if 0
- struct _wordcache *cache = (struct _wordcache *)idx->wordnodes.head;
-
- while (cache->next) {
- sync_cache_entry(idx, cache);
- cache = cache->next;
- }
-
- /*ibex_hash_dump(idx->wordindex);*/
- /*ibex_hash_dump(idx->nameindex);*/
-#endif
- return 0;
-}
-
-static gboolean
-free_key(void *key, void *value, void *data)
-{
- g_free(key);
-
- return TRUE;
-}
-
-/* sync and flush any in-memory data to disk and free it */
-static int
-word_flush(struct _IBEXWord *idx)
-{
- d(cache_sanity(idx));
-
- g_hash_table_foreach_remove(idx->wordcache, sync_free_value, idx);
- idx->wordcount = 0;
- if (idx->nameinit) {
- g_hash_table_foreach_remove(idx->namecache, free_key, NULL);
- idx->nameinit = FALSE;
- }
- return 0;
-}
-
-static int word_close(struct _IBEXWord *idx)
-{
- idx->klass->flush(idx);
-
- idx->namestore->klass->close(idx->namestore);
- idx->nameindex->klass->close(idx->nameindex);
- /*same as namestore:
- idx->wordstore->klass->close(idx->wordstore);*/
- idx->wordindex->klass->close(idx->wordindex);
- g_hash_table_destroy(idx->wordcache);
- g_hash_table_destroy(idx->namecache);
- g_free(idx);
-
- return 0;
-}
-
-/* debugging/tuning function */
-
-struct _stats {
- int memcache; /* total memory used by cache entries */
- int memfile; /* total mem ysed by file data */
- int memfileused; /* actual memory used by file data */
- int memword; /* total mem used by words */
- int file1; /* total file entries with only 1 entry */
- int total;
-};
-
-static void
-get_info(void *key, void *value, void *data)
-{
- struct _wordcache *cache = (struct _wordcache *)value;
- struct _stats *stats = (struct _stats *)data;
-
- /* round up to probable alignment, + malloc overheads */
- stats->memcache += ((sizeof(struct _wordcache) + strlen(cache->word) + 4 + 3) & ~3);
- if (cache->filealloc > 0) {
- /* size of file array data */
- stats->memcache += sizeof(nameid_t) * cache->filealloc + 4;
- /* actual used memory */
- stats->memfile += sizeof(nameid_t) * cache->filealloc;
- stats->memfileused += sizeof(nameid_t) * cache->filecount;
- }
- if (cache->filecount == 1 && cache->filealloc == 0)
- stats->file1++;
-
- stats->memword += strlen(cache->word);
- stats->total++;
-}
-
-static char *
-num(int num)
-{
- int n;
- static char buf[256];
- char *p = buf;
- char type = 0;
-
- n = num;
- if (n>1000000) {
- p+= sprintf(p, "%d ", n/1000000);
- n -= (n/1000000)*1000000;
- type = 'M';
- }
- if (n>1000) {
- if (num>1000000)
- p+= sprintf(p, "%03d ", n/1000);
- else
- p+= sprintf(p, "%d ", n/1000);
- n -= (n/1000)*1000;
- if (type == 0)
- type = 'K';
- }
- if (num > 1000)
- p += sprintf(p, "%03d", n);
- else
- p += sprintf(p, "%d", n);
-
- n = num;
- switch (type) {
- case 'M':
- p += sprintf(p, ", %d.%02dM", n/1024/1024, n*100/1024/1024);
- break;
- case 'K':
- p += sprintf(p, ", %d.%02dK", n/1024, n*100/1024);
- break;
- case 0:
- break;
- }
-
- return buf;
-}
-
-void word_index_mem_dump_info(struct _IBEXWord *idx);
-
-void word_index_mem_dump_info(struct _IBEXWord *idx)
-{
- struct _stats stats = { 0 };
- int useful;
-
- g_hash_table_foreach(idx->wordcache, get_info, &stats);
-
- useful = stats.total * sizeof(struct _wordcache) + stats.memword + stats.memfile;
-
- printf("Word Index Stats:\n");
- printf("Total word count: %d\n", stats.total);
- printf("Total memory used: %s\n", num(stats.memcache));
- printf("Total useful memory: %s\n", num(useful));
- printf("Total malloc/alignment overhead: %s\n", num(stats.memcache - useful));
- printf("Total buffer overhead: %s\n", num(stats.memfile - stats.memfileused));
- printf("Space taken by words: %s\n", num(stats.memword + stats.total));
- printf("Number of 1-word entries: %s\n", num(stats.file1));
- if (stats.memcache > 0)
- printf("%% unused space: %d %%\n", (stats.memfile - stats.memfileused) * 100 / stats.memcache);
-}
-
diff --git a/libical/.cvsignore b/libical/.cvsignore
deleted file mode 100644
index 41f3513f40..0000000000
--- a/libical/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-*.la
-*.lo
-.libs
-Makefile
-Makefile.in
-aclocal.m4
-config.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-libtool
-ltconfig
-ltmain.sh
-stamp-h
-stamp-h.in
diff --git a/libical/AUTHORS b/libical/AUTHORS
deleted file mode 100644
index 659288c31d..0000000000
--- a/libical/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Eric Busboom <eric@softwarestudio.org>
diff --git a/libical/COPYING b/libical/COPYING
deleted file mode 100644
index e69de29bb2..0000000000
--- a/libical/COPYING
+++ /dev/null
diff --git a/libical/ChangeLog b/libical/ChangeLog
deleted file mode 100644
index 41d6d84ad0..0000000000
--- a/libical/ChangeLog
+++ /dev/null
@@ -1,1053 +0,0 @@
-2001-09-26 Federico Mena Quintero <federico@ximian.com>
-
- Fix the libical-related part of Ximian bug #7892.
-
- * src/libical/icalduration.c (icaldurationtype_as_ical_string):
- The correct string for zero seconds is "PT0S", not "PTS0". Also
- handle "negative zero" durations.
-
- * src/libical/icalvalue.c (icalvalue_new_from_string_with_error):
- Use icalerrno to see if the duration string is invalid. We cannot
- use icaldurationtype_is_null_duration() because a duration of zero
- *is* valid, not an error (icalduration_type_from_string() returns
- a zero duration on parse error, too).
-
-2001-09-19 Larry Ewing <lewing@ximian.com>
-
- * src/libical/icalperiod.c (icalperiodtype_from_string): free the
- temp dup'd string.
-
-2001-09-11 Federico Mena Quintero <federico@ximian.com>
-
- * src/libical/icalvalue.c (icalvalue_new_from_string_with_error):
- Generate an ICAL_ATTACH_VALUE value from the string.
-
-2001-09-10 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icalcomponent.c (icalcomponent_compare_vtimezones):
- strdup the result of the first call to ical_component_as_ical_string()
- since the second call may free it.
- Also, don't free the results of ical_component_as_ical_string() since
- it is a tmp buffer which is freed elsewhere.
-
-2001-09-10 Federico Mena Quintero <federico@ximian.com>
-
- Replace struct icalattachtype by an opaque icalattach that is
- properly reference-counted.
-
- * src/libical/icalvalueimpl.h (struct icalattach_impl): Private
- declaration for the icalattach type.
- (struct icalvalue_impl): Make the v_attach field be an icalattach *.
-
- * src/libical/icaltypes.h: Added declaration for icalattach. This
- is now an opaque type; the implementation is in icalvalueimpl.h.
- (struct icalattachtype): Removed.
-
- * src/libical/icaltypes.c (icalattach_new_from_url): New function.
- (icalattach_new_from_data): New function.
- (icalattach_ref): New function.
- (icalattach_unref): New function.
- (icalattach_get_is_url): New function.
- (icalattach_get_url): New function.
- (icalattach_get_data): New function.
- (icalattachtype_new): Removed.
- (icalattachtype_free): Removed.
- (icalattachtype_add_reference): Removed.
- (icalattachtype_set_url): Removed.
- (icalattachtype_get_url): Removed.
- (icalattachtype_set_base64): Removed.
- (icalattachtype_get_base64): Removed.
- (icalattachtype_set_binary): Removed.
- (icalattachtype_get_binary): Removed.
-
- * src/libical/icalderivedvalue.c.in (icalvalue_new_attach): New
- function; we implement it ourselves.
- (icalvalue_set_attach): New function.
- (icalvalue_get_attach): New function.
-
- * src/libical/icalvalue.c (icalmemory_strdup_and_dequote): Made
- static.
- (icalvalue_new_clone): Clone BINARY and ATTACH values by refing
- the old attach value.
- (icalvalue_free): Free BINARY and ATTACH values.
- (icalvalue_attach_as_ical_string): Handle the new icalattachtype.
- (icalvalue_compare): Ditto.
-
- * src/libical/Makefile.am (CLEANFILES): Added ical.h.
-
- * design-data/*: Mark ATTACH as a custom value.
-
-2001-09-06 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icalcomponent.c (icalcomponent_merge_vtimezone): pass
- the VTIMEZONE component to icalcomponent_compare_vtimezones(), not
- the icaltimezone*. Strangely we weren't getting a compiler error.
- Fixes bug #5275, hopefully.
-
- * src/libical/icaltimezone.c (icaltimezone_dump_changes): updated so
- it still outputs the same format, even though the '1 Jan 0001'
- component isn't included any more.
-
-2001-08-31 Damon Chaplin <damon@ximian.com>
-
- * zoneinfo/*: updated all of the VTIMEZONE files to try to be more
- compatable with Outlook. i.e. We don't use seconds in UTC offsets,
- we don't use BYMONTHDAY if we can avoid it (there are still a few uses
- of this we need to fix), and we don't use years < 1600.
-
- * src/libical/icalvalue.c (icalvalue_utcoffset_as_ical_string): if
- seconds is 0 then don't output it. None of the builtin VTIMEZONE data
- uses the seconds value any more, since it messes up iTIP with Outlook.
- We may want to make it always round to the nearest minute, to avoid
- interop problems.
-
-2001-08-22 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Remove src/python/Makefile and src/test/Makefile.
-
-2001-08-16 Federico Mena Quintero <federico@ximian.com>
-
- * src/libical/icalvalue.c (icalmemory_strdup_and_dequote): Dequote
- the same characters that we know how to quote in
- icalvalue_text_as_ical_string(). Fixes Ximian bug #7433.
-
-2001-08-01 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c: removed some debugging messages.
-
-2001-07-30 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c (icaltimezone_get_builtin_timezone):
- changed the debugging message to avoid a crash on non-glibc boxes.
- (Using %s with a NULL argument will crash them.)
-
-2001-07-30 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icalcomponent.c (icalcomponent_merge_vtimezone): copy
- the TZID just in case the property we got it from gets modified.
- (icalcomponent_rename_tzids_callback): break out of the loop if we
- have renamed the TZID parameter. Otherwise our tzid variable would be
- invalid.
-
- * scripts/mkderivedproperties.pl (fudge_data): changed this so we can
- set EXDATEs that are DATE values, by checking the is_date field.
- I'm not entirely sure this is the way it should be done.
- If it is, I'll also do this for other things like DTSTART/DTEND.
-
- * src/libical/icalrecur.c (icalrecurrencetype_as_string): handle
- UNTIL as a DATE value as well as a DATE-TIME.
-
- * src/libical/icalcomponent.c (icalcomponent_compare_vtimezones):
- fixed stupid error, getting TZID property from wrong VTIMEZONE.
- This would only have affected iTIP stuff, with VTIMEZONEs that don't
- use the '/' prefix (i.e. from Outlook). It probably just meant we
- kept multiple copies of the same VTIMEZONE.
-
- * src/libical/icaltimezone.c: removed some debugging messages.
-
-2001-07-26 JP Rosevear <jpr@ximian.com>
-
- * src/libical/icalcomponent.c (icalcomponent_begin_component):
- call pvl_next on i rather than itr.iter
-
-2001-07-26 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c (icaltimezone_convert_time): if from_zone
- is NULL (i.e. it is a floating time), just return.
-
-2001-07-25 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c: accept an icaltimezone* of NULL for all
- the public functions, since NULL is used to represent floating times.
-
-2001-07-25 JP Rosevear <jpr@ximian.com>
-
- * src/libical/icalparameter.c (icalparameter_as_ical_string): if
- the property contains ':' or ';' put the value in quotes so it
- parses correctly
-
-2001-07-23 JP Rosevear <jpr@ximian.com>
-
- * src/libical/icalparser.c: pass extra param to
- icalparser_get_next_char
- (icalparser_get_next_char): only use quote mode if the flag is set
-
-2001-07-23 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltime.c (icaltime_day_of_year): changed so it doesn't
- use mktime(). We are having problems because mktime() only works
- post 1970.
-
-2001-07-17 JP Rosevear <jpr@ximian.com>
-
- * src/libical/icaltimezone.c
- (icaltimezone_get_tznames_from_vtimezone): do not strdup a NULL
- (valid) timezone
-
-2001-07-16 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c
- (icaltimezone_get_location_from_vtimezone): return NULL if we
- couldn't find the LOCATION.
- (icaltimezone_get_utc_offset): ifdef'd out a debugging message.
- (icaltimezone_get_location):
- (icaltimezone_get_latitude):
- (icaltimezone_get_longitude): don't load the builtin timezone for
- these. We should already have the data from reading zones.tab.
- (icaltimezone_get_builtin_timezone_from_tzid): return NULL if the
- TZID given is NULL or "" (i.e. a floating time).
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * src/libicalss/Makefile.am (libicalss_la_SOURCES): Add the
- COMBINEDHEADERS here and remove the EXTRA_DIST. This fixes distcheck.
- We can't just put CONBINEDHEADERS at the bottom of _SOURCES because
- of the $(srcdir).
-
-2001-07-11 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c: only create the timezones array when we
- need to, and make sure we free things when necessary.
- Also added timezones_sorted variable, which we set to 0 when adding a
- timezone. We then sort the array before doing binary searches (oops!)
-
- * src/libical/icaltimezone.[hc]: added free_struct() arg to
- icaltimezone_free() to specify whether to free the icaltimezone struct.
- Also added icaltimezone_array_free() function.
-
-2001-07-10 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c (icaltimezone_convert_time): don't convert
- DATE values.
-
- * src/libical/icaltime.c (icaltime_from_timet_with_zone):
- (icaltime_as_timet_with_zone): changed so they do not convert DATE
- values according to the timezone.
-
- * src/libical/icaltime.[hc]: added icaltime_current_time_with_zone()
- and icaltime_today() functions.
-
-2001-07-09 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltime.c (icaltime_adjust): forgot to compile before
- committing. Idiot.
-
-2001-07-09 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c (icaltimezone_convert_time): if the 2
- zones are the same just return.
-
- * src/libical/icaltime.c (icaltime_adjust): normalize the month.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icalcomponent.c (icalcomponent_add_component): add the
- icaltimezone to the timezone array of the toplevel VCALENDAR component.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icalcomponent.c (icalcomponent_merge_component): fixed
- bad assertion, '!=' -> '=='.
- (icalcomponent_merge_vtimezone): get the TZID from vtimezone, not comp.
-
-2001-07-03 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltime.c:
- * src/libical/icalcomponent.c: more timezone stuff.
-
-2001-06-28 Peter Williams <peterw@ximian.com>
-
- * zoneinfo/Makefile.am (dist-hook): Add $(srcdir) as in install-data-local
- rule.
-
-2001-06-28 Damon Chaplin <damon@ximian.com>
-
- * configure.in: commented out AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1).
- We only want it to abort when there is no possibility of carrying on.
-
-2001-06-26 Damon Chaplin <damon@ximian.com>
-
- * zoneinfo/*: stripped all blank lines from iCalendar files.
- Apparently they aren't exactly legal. Oops.
-
-2001-06-15 JP Rosevear <jpr@ximian.com>
-
- * zoneinfo/Makefile.am: Extra dist the zones.tab information
-
-2001-06-14 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.c (icaltimezone_get_latitude):
- (icaltimezone_get_longitude): added functions to get the coords of
- builtin timezones.
-
-2001-06-13 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icalrecur.c: merged in some new stuff from libical CVS.
- (icalrecur_add_byrules): If no sign is given set sign to 1 (i.e.
- default to positive).
- (icalrecur_iterator_new): when setting up the year days array, handle
- the case where a year has no occurrences and we have to skip it.
- Also initialize the last.day and last.month fields.
- (expand_by_day): set the last day of the year explicitly rather than
- adding 1 to year and subtracting 1 from day. It is more efficient,
- and less prone to bugs. Also rewrote a bit.
- (expand_year_days): added code to handle BY_MONTH_DAY and BY_DAY +
- BY_MONTH_DAY, and rewrote code to handle BY_DAY + BY_MONTH.
- (next_year): handled the case where there are no occurrences in the
- year.
-
- * src/libical/icaltime.c (icaltime_adjust): new function to adjust a
- time by a number of days/hours/minutes/seconds.
- (icaltime_day_of_week): rewrote using a single call to mktime().
- (icaltime_day_of_year): rewrote using a single call to mktime().
- (icaltime_from_day_of_year): rewrote in a simpler way. The old version
- had a bug in it.
-
- * src/libical/icaltime.h (struct icaltimetype): added is_daylight
- flag, so we can try to distinguish between standard and daylight time
- when the clocks go back. Though this doesn't always resolve the
- ambiguity.
-
- * src/libical/icalcomponent.c: added some stuff to handle timezone
- data connected to the calendar component. Unfinished.
-
- * src/libical/icalyacc.y: merged in a fix from sourceforge CVS version
- of libical, so we can handle -ve UTC offsets.
-
- * src/libical/Makefile.am (CPPFLAGS): added PACKAGE_DATA_DIR define
- for finding the VTIMEZONE files.
- (libical_la_SOURCES): added icalarray.[hc] and icaltimezone.[hc].
- (COMBINEDHEADERS): added icalarray.h and icaltimezone.h to the headers
- to be combined into ical.h.
-
-2001-06-13 Damon Chaplin <damon@ximian.com>
-
- * src/libical/icaltimezone.[hc]: new files to contain support for
- timezones.
-
- * src/libical/icalarray.[hc]: new files to provide a simple expanding
- array datatype.
-
-2001-06-13 Damon Chaplin <damon@ximian.com>
-
- * Makefile.am (SUBDIRS): added zoneinfo.
-
- * configure.in (AC_OUTPUT): added zoneinfo/Makefile.
-
- * zoneinfo/Makefile.am: new file to install & distribute the
- VTIMEZONE data files, and the zones.tab file.
-
- * zoneinfo/zones.tab: new file containing a list of all timezones
- and their coordinates (so we can mark them on the world map).
-
- * zoneinfo/*: Lots of VTIMEZONE data files added, one per timezone.
-
-2001-05-16 JP Rosevear <jpr@ximian.com>
-
- * src/libical/Makefile.am: Fixes to make it make dist and make
- distcheck. Kind of kludgy but they seem to work. Time will tell.
-
-2001-05-10 JP Roseveaer <jpr@ximian.com>
-
- * src/libical/icaltime.c (set_tz, unset_tz): plug leak
- (icaltime_as_timet): use altered functions
- (icaltime_utc_offset): ditto
- (icaltime_from_day_of_year): ditto
-
-2001-05-02 JP Rosevear <jpr@ximian.com>
-
- * src/libical/icalparser.c (icalparser_new): initialize
- "continuation_line" to 0
-
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
-
- * src/Makefile.am (SUBDIRS): Don't compile the Python stuff nor
- the tests for now; they are broken.
-
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
-
- * src/libicalss/Makefile.am (COMBINEDHEADERS): All of these have
- to come from the srcdir: prepend `$(srcdir)'.
-
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
-
- * src/libical/Makefile.am (COMBINEDHEADERS): Shouldn't prepend
- `$(top_builddir)/src/libical' to `icalderivedvalue.h',
- `icalderivedparameter.h', `icalderivedproperty.h' here, that
- confuses the dependencies for make.
-
- * src/libical/Makefile.am (ical.h): Depend on
- `$(COMBINEDHEADERS)', not `$(BUILT_SOURCES)'.
-
-2001-04-01 Eric Busboom <eric@softwarestudio.org>
-
- * icalcomponent.h Changed meaning of
- icalcomponent_new_from_string. It used to create a new component
- given the text name of the component type to create. Now it calls
- icalparser_parse_string to create a new component from the
- complete iCalendar text representation of the component.
-
-2001-03-31 Eric Busboom <eric@softwarestudio.org>
-
- * icalvalue Changed ACTION properties to take an ACTION value
- instead of TEXT. The ACTION value is enumerated.
-
-2001-03-26 Eric Busboom <eric@softwarestudio.org>
-
- * icalparameter.h icalparameter_rsvp_* routines now take, return
- ICAL_RSVP_TRUE and ICAL_RSVP_FALSE, not 0 and 1
-
-2001-03-25 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c Many changes to get YEARLY rules working and fix
- other errors. Recurrences are stil broken, but more types of rue
- now work.
-
-2001-03-16 Eric Busboom <eric@softwarestudio.org>
-
- * icalparameter.c Changed icalparameter_new_from_string() to
- icalparameter_new_from_value_string(). Created new
- icalparameter_new_from_string() that takes strings of
- form"PARAMNAME=PARAMVALUE"
-
- * *_XNAME changes all _XNAME enumerations to _X
-
- * derived props, values, parameters. Seperated out derived
- proeprties, parameters and values into their own files. This makes
- it easier to auto generate all of the enumerations for values,
- parameters and proeprties.
-
- * icalenum.h Major changes to icalenum. Movel all of the
- icalenum_* values to other modules, and changed the names. Look
- for #defines in icalenum.h tying the old name to the new
- name. Also moved all of the enumerations into other files.
-
-
-
-2001-02-26 Eric Busboom <eric@softwarestudio.org>
-
- * src/libical/icalproperty.c Added
- icalproperty_set_parameter_from_string and
- icalproperty_set_value_from_string to aid in binding to Python
-
-2001-02-15 Eric Busboom <eric@softwarestudio.org>
-
- * design-data/prop-to-value.txt Made a new CSV file,
- properties.cvs That collects property-to-value and default value
- information
-
- * src/libical/icalproperty.{c,h}.in Moved auto generated code into
- icalderivedproperty.{c,h} and created icalderivedproperty.{c,h}.in
-
-
-
-2001-02-14 JP Rosevear <jpr@ximian.com>
-
- * src/libical/Makefile.am: Sigh, automake is dumber than i thought
-
-2001-02-12 JP Rosevear <jpr@ximian.com>
-
- * src/test/Makefile.am: link with the static versions
-
- * src/python/Makefile.am: use include dir discovered in configure checks
-
- * src/python/.cvsignore: shush
-
- * src/libical/icalrestriction.c: remove autogenerated file
-
- * src/libical/Makefile.am: the generated files are now disted so
- look for them in the source dir rather than the build dir
-
- * src/Makefile.am: Only build the python dir if all the configure
- stuff checked out
-
- * configure.in: Remove shared library disabling and add a python
- check and allow for the python bindings to not be built
-
-2001-02-11 Eric Busboom <eric@softwarestudio.org>
-
- * src/python/Makefile.am Tweaked makefile to use automake more,
- but it stil isn't quie right.
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * Shush cvs
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * src/libical/Makefile.am: Slightly over zealous during the merge
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * src/libical/Makefile.am: Correct typo
-
- * Removal of more auto generated files
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * Removal of various auto generated files
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * src/libical/icalparameter.c.in (icalparameter_new_from_string):
- its NEEDS-ACTION rather than NEEDSACTION
- (icalparameter_as_ical_string): ditto
-
-2001-02-09 Eric Busboom <eric@softwarestudio.org>
-
- * python Added src/python directory. Inserted SWIG wrapper files,
- and a simple interface to Component, Time, Duration, Period and
- Store.
-
- * icallangbind.c More experimental work
-
- * icalduration.{c,h}, icalperiod.{c,h} Broke out period and
- duration types into their own files
-
-2001-02-06 Christopher James Lahey <clahey@ximian.com>
-
- * src/libical/icallangbind.c: Added a missing #include here.
-
- * src/libical/icalrecur.c (icalrecur_add_bydayrules): Copy the
- passed in const vals since we change it.
-
-2001-02-06 Eric Busboom <eric@softwarestudio.org>
-
- * icaltime.c Changed icaltime_from_day_of_year to run mktime in
- the UTC timezone. This fixed a bug where it would return one day
- eariler for some timezones.
-
-2001-02-05 Ettore Perazzoli <ettore@ximian.com>
-
- * src/libical/Makefile.am (COMBINEDHEADERS): `icalvalue.h',
- `icalparameter.h', `icalproperty.h' and `icalrestriction.h' are
- created in the builddir so they shouldn't be prefixed with
- `$(top_builddir)/src/libical'.
-
-2001-01-26 Eric Busboom <eric@softwarestudio.org>
-
- * icalproperty.c.in Improved icalproperty_as_ical_string() to
- eliminate the possibility of having a VALUE parameter that does
- not match the actual kind of value.
-
- * icalvalue.c.in made icalvalue_*_trigger() and
- icalvalue_*_datetimeperiod non-autogenerated. These routines were
- for combined value type -- non standard values that can have more
- than on standard value type. These non-standard types now delegate
- to stadard types.
-
-2001-01-24 Dan Winship <danw@helixcode.com>
-
- * src/libical/icaltime.c: Remove unused "extern long timezone".
-
-2001-01-24 Eric Busboom <eric@softwarestudio.org>
-
- * icalfileset.c fixed icalfileset_read-from_file so it will handle
- lines longer than 80 char properly.
-
-2001-01-23 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Don't AC_INIT on an autogenerated file that does not
- exist beforehand
-
-2001-01-23 Eric Busboom <eric@softwarestudio.org>
-
- * icltime.c Removed all of the _local_ routines and simplified
- icaltime_utc_offset and icaltime_as_timet
-
- * regression.c Added tests for triggers and improvements to icaltime.c
-
- * icaltypes.c Addedd icaltriggertype_from_string and changed
- icaltriggertype to be a struct
-
-2001-01-22 Eric Busboom <eric@softwarestudio.org>
-
- * icaltime.c implemented icaldurationtype_from_string to parse the
- string it self, rather than use lex/yacc
-
-2001-01-15 Eric Busboom <eric@softwarestudio.org>
-
- * icalfileset.c Many improvements. File locking now works, and so
- does searching with icalfileset_select()
-
-2001-01-08 Eric Busboom <eric@softwarestudio.org>
-
- * Makefile.am Remove spaces after -I in several
- Makefile.am routines.
-
- * icalset.c removed return statements from some void functions.
-
- * icalparameter.c.in Added break to default: case that had no
- body. Compilers on Solaris and Tru64 UNIX complained.
-
-2001-01-02 Eric Busboom <eric@softwarestudio.org>
-
- * icaltime.c Changed icaldurationtype_from_time and _as_timet to
- _from_int and _as_int. This is a change interface that may break
- some code.
-
- * icalgauge.c icalgaugeimpl.h, icalgauge.h., Rewrote gauge code to
- use pvl-lists directly, instead of trying to reuse icalcomponent.
-
-2000-12-15 Ettore Perazzoli <ettore@helixcode.com>
-
- * src/libical/Makefile.am: Build `libical-static.la'.
-
-2000-12-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * src/libical/Makefile.am (ical.h):
-
-2000-12-13 Federico Mena Quintero <federico@helixcode.com>
-
- * src/libical/icaltime.c (icaltime_from_timet): Use gmtime()
- unconditionally, since we want an UTC broken-down representation.
- (icaltime_as_timet): Add the offset only if the time was supposed
- to be in UTC; that way mktime() will get a proper localtime as
- source data.
-
-2000-12-13 Federico Mena Quintero <federico@helixcode.com>
-
- * src/libical/icaltime.c (icaltime_from_timet): time_t values
- *are* in UTC by definition, so the is_utc argument is useless.
- Removed the conversion to UTC and made the icaltimetype.is_utc be
- TRUE always. This breaks libical's owne internal use of this
- function, but since we do not use any of the functions that use it
- that way, we can ignore this. This is basically a temporary
- measure until libical does the right thing.
-
-2000-12-12 Eric Busboom <eric@softwarestudio.org>
-
- * icalparser.c Addedd support for x-parameters.
-
- * icalenum.c Fixed icalenum_parameter_type_to_string and
- icalenum_property_type_to_string to property identify X- parameers
- and properties.
-
- * icalparameter.c Fixed icalparameter_as_ical_string to property
- write out X-Parameters.
-
-
-2000-12-13 Christopher James Lahey <clahey@helixcode.com>
-
- * src/libical/icalerror.h: Added a name to the parameter to
- icalerror_set_errno.
-
-2000-12-12 Eric Busboom <eric@softwarestudio.org>
-
- * icalparser.c Addedd support for x-parameters.
-
- * icalenum.c Fixed icalenum_parameter_type_to_string and
- icalenum_property_type_to_string to property identify X- parameers
- and properties.
-
- * icalparameter.c Fixed icalparameter_as_ical_string to property
- write out X-Parameters.
-
-
-2000-12-11 Eric Busboom <eric@softwarestudio.org>
-
- * icalcstp.c added empty bodies to prep_* routines so that shared
- libraries would build.
-
-2000-12-13 Federico Mena Quintero <federico@helixcode.com>
-
- * src/libical/Makefile.am (COMBINEDHEADERS): Removed the explicit
- paths. Why it did *not* work on my original try when they were
- not there, well, now I don't know.
-
-2000-12-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * src/libicalvcal/Makefile.am (INCLUDES): Add
- `$(top_builddir)/src/libical' to the include directory list.
-
- * src/libical/Makefile.am (icalparameter.h): Use `$(srcdir)'.
- (icalparameter.c): Likewise.
- (icalproperty.h): Likewise.
- (icalproperty.c): Likewise.
- (icalvalue.h): Likewise.
- (icalvalue.c): Likewise.
- (icalrestriction.c): Likewise.
- (CLEANFILES): Add `icalparameter.h', `icalparameter.c',
- `icalproperty.h', `icalproperty.c', `icalrestriction.c',
- `icalvalue.h', `icalvalue.c'.
- (COMBINEDHEADERS): `icalvalue.h', `icalparameter.h' and
- `icalproperty.h' are in builddir, not srcdir, so fix the list to
- use `$(top_builddir)' instead of `$(top_srcdir)'.
- (all): Removed.
- (BUILT_SOURCES): Move `ical.h' here instead.
- (ical.h): Don't depend on `(BUILT_SOURCES)'; this a built source
- itself.
-
-2000-12-12 Joe Shaw <joe@helixcode.com>
-
- * src/libical/icalrecur.c: #if 0ed out some #if 1ed test code that
- was breaking my build by #including ical.h. No cookie!
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * configure.in: Add a check for "extern int timezone;" vs struct
- tm tm_gmtoff, stolen from Evolution's configure.in.
-
- * src/libical/icaltime.c (icaltime_utc_offset,
- icaltime_local_utc_offset): Use HAVE_TIMEZONE, add tm_gmtoff
- support.
-
- * src/libical/icallexer.l: Remove ical_yy_scan_buffer, ..._string,
- and ..._bytes prototypes, since it compiles fine without them on
- Linux, and bombs out due to prototype mismatch on my NetBSD box.
-
-2000-12-11 Federico Mena Quintero <federico@helixcode.com>
-
- * Makefile.am:
- * configure.in: Disable compilation of the examples directory
- until libicalss is fixed.
-
- * configure.in: Make AC_INIT() check for a file that is not
- autogenerated!
-
- * configure.in: Added check for Perl.
-
-2000-12-11 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in (AC_OUTPUT): Fixed order of generated files to make
- "make distcheck" work. Turn on AM_MAINTAINER_MODE.
-
- * src/libical/Makefile.am (EXTRA_DIST): Add icalversion.h.in.
- (COMBINEDHEADERS): Added paths to make "make distcheck" work.
- (libical_la_SOURCES): Added headers for distribution in our weird
- setup.
-
-2000-12-11 JP Rosevear <jpr@helixcode.com>
-
- * src/libical/icaltime.c (icaltime_compare_date_only): New
- function that compares only the dates, not the times as well.
-
- * src/libical/icaltime.h: Add prototype for the function above.
-
- * src/libical/icalrecur.h (struct icalrecurrencetype): Correct
- header documentation.
-
- * src/libical/icaltypes.c: No longer include <limits.h>.
-
- * src/libical/icalrecur.c: Likewise.
-
- * src/libical/icalvalue.c.in: Likewise.
-
- * src/libical/icalyacc.y: Likewise.
-
-2000-12-06 Eric Busboom <eric@softwarestudio.org>
-
- * icaltime.c added icaltime_as_local to convert a UTC time to a
- local time
-
- * icaltime.h icaltime.c Removed is_utc argument from
- icaltime_from_timet
-
-
-2000-11-29 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c More testing and bug fixes. Many more of the rules
- in recur.txt work correctly.
-
-2000-11-28 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c Several changes to extract icalrecur.c from
- libical. I'd like to make it into a reference impl for recurrence
- rules. CHanges include moving all of the recurrence type and
- recurrence enums from icalenum and icaltypes into icalrecur, and
- adding code to parse recurrence rule strings.
-
- * icaltime.c Changed icaltime_from_string to parse the string
- directly. Now icaltime.c has no dependency on icalvalue.c
-
-2000-11-21 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c Fixed a bug in the increment_* routines that made
- incrementing by more then 1 insensible. Thanks to Martin Neimeier
-
-2000-11-20 Eric Busboom <eric@softwarestudio.org>
-
- * icalmessage.c Many routines to create new ical messages.
-
- * icalspanlist.c Code to generate a list of the busy time f the
- VEVENTS in a set. Also includes routiens to generate free and busy
- lists from the spanlist, and to find the next free time after a
- given time.
-
- * icalvalue.c The STATUS property now has its own value type,
- STATUS, which holds the enumeration icalproperty_status.
-
- * icalrestriction.c Added more restrictions. Now handles mutual
- and exclusive consitions, and checks for the reight values in
- STATUS properties
-
-
-2000-11-10 Eric Busboom <eric@softwarestudio.org>
-
- * icaltypes.c Added routine to create durationtype from string:
- icaldurationtype_from_string
-
-2000-11-09 Eric Busboom <eric@softwarestudio.org>
-
- * icalcomponet.c Add sever get/set convienience routines to access
- and manipulate common component propoerties from the component
- interface. This eliminates the need to create a lot of temporary
- variables if you just want to change the start time of and event.
-
-2000-11-06 Eric Busboom <eric@softwarestudio.org>
-
- * icalcomponent.c Added new routines to icalcomponent:
- _get_span -- returns the start and end times of the event in UTC
- _get_first_real_component -- return ref to VTODO, VEVENT or VJOURNAL
-
- * icalspanlist.c Added new class, icalspanlist, that generates a
- list of alternating busy and free times from an icalset. The class
- includes routines to gnerate rfc2445 busy and free lists, and to
- get the next avaliable busy or free time after a given time.
-
-2000-11-06 Federico Mena Quintero <federico@helixcode.com>
-
- * src/libical/icalvalue.c (icalvalue_recur_as_ical_string): Handle
- both the position and weekday in the by_day field.
-
-2000-10-20 Jesse Pavel <jpavel@helixcode.com>
-
- * src/libical/icalproperty.c: added support for the
- icalproperty_remove_parameter() function.
-
-2000-10-20 Eric Busboom <eric@agony.busboom.org>
-
- * Const correctness. Added 'const' all over everywhere.
-
-2000-10-19 Eric Busboom <eric@agony.busboom.org>
-
- * icalproperty, icalparameter, icalvalue .c, .h Changed most
- instances of char* to const char*
-
- * icalclassify.h Added multiple include protection
-
- * icalset.h and others, got rid of parameter named "new"
-
-2000-10-15 Eric Busboom <eric@softwarestudio.org>
-
- * icalcomponent Added convienience functions for constructing
- components: icalcomponent_new_vcalendar(), etc.
-
- * Makefile.am Incorporated build system patch from Federico
- Quintero. Misc small fixes and cleanup
-
- * scripts Incorporated auto-gen patch from Frederico. Generated
- code in libical now uses icalproperty.c.in (etc) instead of
- editing file icalparoperty.c in place.
-
- * libical. Changed flex/bison to use the -P/-p options to set
- ical_yy as a prefix. Removed prefix redefinition from icalyacc.y
-
-2000-10-12 Eric Busboom <eric@softwarestudio.org>
-
- * icalproperty.c Fixed icalproperty_get_{first,next}_parameter to
- honor the parameter kind argument
-
- * icalparameter.c Added, but did not complete, a new version of
- icalparameters_from_string that does not use the hairy nested
- case/switch statements of the previous version
-
-2000-10-11 Damon Chaplin <damon@helixcode.com>
-
- * src/libical/icalparameter.c (icalparameter_as_ical_string):
- (icalparameter_new_from_string):
- * src/libical/icalparser.c (icalparser_add_line): add support for
- 'X-' parameters.
-
-2000-10-07 Dan Winship <danw@helixcode.com>
-
- * src/libical/icalyacc.y (weekday_list): Fix the semicolons in
- this rule. Noticed by x-virge.
-
- * src/test/Makefile.in: While I'm here, remove this from CVS, as
- it's a generated file.
-
-2000-10-02 Eric Busboom <eric@softwarestudio.org>
-
- * ical.h ical.h and icalss.h now are concatenations of all of the
- public headers for their respective libraries. Thus, only ical.h,
- icalss.h and icalvcal.h need to be installed.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: AC_OUTPUT the Makefile in `src' before the stuff
- in its subdirs.
-
-2000-09-12 JP Rosevear <jpr@helixcode.com>
-
- * test-data/stresstest.ics: Merge missing file for distcheck
-
- * src/libicalss/icalcstp.h: ditto
-
- * src/libicalss/icalcsdb.h: ditto
-
-2000-09-11 Eric Busboom <eric@softwarestudio.org>
-
- * icalvcal.c Added more comments
-
-2000-09-01 JP Rosevear <jpr@helixcode.com>
-
- * configure.in: We don't need AC_PROG_RANLIB and
- AM_PROG_LIBTOOL
-
- * src/libical/icalyacc.y (clear_recur): Explicitly
- set the week_start to the Monday default in case the
- recurrence rule does not.
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * Kill off more old, dead files
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * MacOS: This dir is not in 0.19
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * src/libical/CHANGES: This file is not in 0.19
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * src/libical/.gdb_history: Kill file
-
- * src/libical/.gdb_history: Kill file
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * src/pvl/Makefile: Kill old file
-
- * src/test/usecases.c: Kill old file
-
- * src/test/.cvsignore: Update
-
- * src/libicalvcal/.cvsignore: Update
-
- * examples/.cvsignore: Shut up
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * configure.in: Don't list config.h in AC_OUTPUT
-
-2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
-
- * examples/Makefile.am (INCLUDES): More `$(srcdir)' loving.
-
- * src/libicalvcal/Makefile.am (INCLUDES): Add `-I
- $(srcdir)/../libical' for builddir != srcdir loving.
-
-2000-08-25 Christopher James Lahey <clahey@helixcode.com>
-
- * examples/access_properties_and_parameters.c,
- src/libicalvcal/vcc.y: Got rid of some warnings.
-
- * src/libicalvcal/vcc.c: Checking in generated C file.
-
-2000-08-25 Christopher James Lahey <clahey@helixcode.com>
-
- * src/libical/icalcomponent.c: Fixed an incorrect struct name.
-
-2000-08-25 Peter Williams <peterw@helixcode.com>
-
- * src/libical/icalcomponent.c (icalcomponent_end_component): Compile fix;
- use icalerror_check_arg_re so we can return an valid icalcompiter.
- (icalcomponent_begin_component): Same.
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * src/libical/icalvcal.h: Remove this duplicate file to fix build
-
-2000-08-24 Federico Mena Quintero <federico@helixcode.com>
-
- * src/test/Makefile.am: Make it work.
-
-2000-08-04 Eric Busboom <eric@softwarestudio.org>
-
- * stow.c Changed stow to write data to a file ( icalfileset) not a
- calendar. Also added MIME parsing capability
-
- * sspm.c Core of the mime processor. Now handles quoted-printable
- and base64 encodings
-
- * icalmime.h New file that parses mime data and returns an
- icalcomponent that includes all of the parts.
-
-
-2000-07-26 Eric Busboom <eric@softwarestudio.org>
-
- * icaldirset.h misc bug fixes to get deleting components to work
-
- * icalcomponent.h Eliminated internal use of _get_first_component
- and _get_next_component, since these will reset the interal
- iterators.
-
-2000-07-23 Eric Busboom <eric@softwarestudio.org>
-
- * icalcomponent.h Added external iterators to icalcomponent for
- subcomponents: icalcompiter. These are still experimental, but they
- seem to work OK and have a nice syntax
-
-2000-07-18 Eric Busboom <eric@softwarestudio.org>
-
- * icalset This is a new "superclass" for icalstore, icalcluster,
- and others. It merges the interfaces of the old icalstore and
- icalcluster
-
- * icalstore.{c,h} CHanged name to icaldirset
-
- * icalcluster.{c,h} Changed name to icalfileset
-
-
-2000-06-12 Eric Busboom <eric@softwarestudio.org>
-
- * icalstow.c misc improvements and bug fixes to make it useful.
-
-2000-06-09 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c More extensive code changes for recurrence rule.
-
- * icalyacc.y Added support for integers in by day lists
-
-2000-06-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * src/test/Makefile.am (INCLUDES): Likewise.
-
- * src/libicalss/Makefile.am (INCLUDES): Use $(srcdir) to allow
- builddir != srcdir.
-
-2000-06-01 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c moved recur code into new files
-
-2000-05-30 Eric Busboom <eric@softwarestudio.org>
-
- * icaltypes.c Extensive work on code to expand recurences
-
- * icaltypes.h Changed signature icaltimetype_from_timet to include
- is_utc flag.
-
-
-2000-03-17 Eric Busboom <eric@softwarestudio.org>
-
- * icalstore.c Vastly improved icalstore_test.
-
-2000-03-16 Eric Busboom <eric@softwarestudio.org>
-
- * icalcluster.c Added compile flag (ICAL_SAFESAVES) to switch how
- icalcluster saves files during commits. When the flag is define,
- it will write the data to a temorar file and rename the file to
- the target file.
-
- * storage.c Added seterate test suite for sotage components
-
- * icalparser.c Created parser object, implemented line-oriented
- parsering, and made message oriented parsing work in terms f line
- oriented parsing.
-
- * icalparser.c Fixed icalparser_get_line to remove \r in input.
-
-
diff --git a/libical/INSTALL b/libical/INSTALL
deleted file mode 100644
index b3f195d679..0000000000
--- a/libical/INSTALL
+++ /dev/null
@@ -1,24 +0,0 @@
-Building the library
---------------------
-
-This distribution is developed on Red Hat Linux 6.0 and usually
-compiles on SunOS 5.6 and FreeBSD 2.27. I have reports of success of
-previous version on MacOS ( with CodeWarrior ) and on UnixWare, but I
-don't know about any other systems.
-
-The library is configured with automake. From the root directory, run
-
- ./configure
-
-To build all of the Makefiles for your system. If you will be installing the library, you may want to use the --prefix flag to set the directory where the library and header files will be installed.
-
- ./configure --prefix=/proj/local/
-
-If configure runs fine, run "make" to build the library and
-"make install" to install it.
-
-The current version of libical focuses on creating and
-manipulating iCal objects. With it, you can parse text representations
-of iCal components, add and remove sub-components, properties,
-parameters and values, and print the components back out as strings.
-
diff --git a/libical/Makefile.am b/libical/Makefile.am
deleted file mode 100644
index 2220da18ec..0000000000
--- a/libical/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-
-EXTRA_DIST = \
- ChangeLog \
- README \
- TEST \
- TODO
-
-SUBDIRS = design-data doc scripts test-data src zoneinfo
-
-# Disabled examples until it builds
-#SUBDIRS = design-data doc scripts test-data src examples
-
diff --git a/libical/NEWS b/libical/NEWS
deleted file mode 100644
index 16a7924645..0000000000
--- a/libical/NEWS
+++ /dev/null
@@ -1,447 +0,0 @@
-Version 0.23, 26 Mar 01 ( cvs tag libical-0-23 )
-------------------------------------------------
-
-**** Incompatibilities with previous versions ****
-
-icalparameter_new_rsvp
-icalparameter_get_rsvp
-icalparameter_set_rsvp
-
- These routines now take and return ICAL_RSVP_TRUE and
- ICAL_RSVP_FALSE instead of 0 and 1
-
-icalenum_*_to_*
-
- These routines have been moved to icalproperty, icalparameter
- or icalvalue
-
-
-
-Python interface: An alpha level python interface is available in
-src/python.
-
-Perl interface: A pre-alpha level interface is available in
-src/Net-ICal-Libical
-
-Code Autogeneration: Converted all of the important files in
-design-data/ to .csv files and improved the code that is generated
-from them. Now all of the enumerations for property, parameters and
-values are generated from thes files, as are the string
-representations for the enumerations. You can add a new property or
-parameter to the system simply by adding a line to the appropriate
-file in design-data/
-
-Recurrences: Improved the recurrence code by fixing bugs in MONTHLY
-recurrences and completely re-implementing expand_year_days() for
-YEARLY recurrences. Hubert V's aided in testing.
-
-Build system: JP Rosevear made several improvements to the build
-system. Now checking out the code from cvs should give to a complete
-but minimal distribution, without any of the autognerated files.
-
-Interface changes: Nearly all of the icalenum routines for converting
-between strings and enumerations have been moved out of icalenum into
-icalproperty, icalparameter and icalvalue. This means that their names
-have changed, although #defines have been added to icalenum.h to map
-back to the old names.
-
-Added src/libical/icllangbind.c that has some functions to make it
-easier to bind libical to other languages.
-
-
-Version 0.22, 15 Jan 01 ( cvs tag libical-0-22)
-----------------------------------------------
-
-Many improvements to the time routines in icaltime.c. I think that
-they actually make sense now. Note that there is an interface change
-with icaltime_from_timet() -- I removed the is_utc parameter, since
-all timet values are in UTC. Use icaltime_from_int() if you really
-want the old interface
-
-Major improvements to icalfileset. icalfileset_select now works and so
-does file locking.
-
-Minor revision to the documentation, but it does include a new section
-on file storage ( icalfileset ) and time ( icaltime.c)
-
-Lots of bug fixes and small patches.
-
-I improved the regression test in src/test/regression.c. It now have
-command line switches to select specific tests ( undocumentated, of
-course ) and more of the tests include asserts, so you can just run it
-without looking at the output. If the test runs without crashing, it
-is mostly OK.
-
-
-
-Version 0.21, 20 Nov 00 ( cvs tag libical-0-21)
-----------------------------------------------
-
- * icalmessage.c Many routines to create new ical messages.
-
- * icalspanlist.c Code to generate a list of the busy time f the
- VEVENTS in a set. Also includes routiens to generate free and busy
- lists from the spanlist, and to find the next free time after a
- given time.
-
- * icalvalue.c The STATUS property now has its own value type,
- STATUS, which holds the enumeration icalproperty_status.
-
- * icalrestriction.c Added more restrictions. Now handles mutual
- and exclusive consitions, and checks for the reight values in
- STATUS properties
-
- * icaltypes.c Added routine to create durationtype from string:
- icaldurationtype_from_string
-
-
- * icalcomponet.c Add sever get/set convienience routines to access
- and manipulate common component propoerties from the component
- interface. This eliminates the need to create a lot of temporary
- variables if you just want to change the start time of and event.
-
-
- * icalcomponent.c Added new routines to icalcomponent:
- _get_span -- returns the start and end times of the event in UTC
- _get_first_real_component -- return ref to VTODO, VEVENT or VJOURNAL
-
- * icalspanlist.c Added new class, icalspanlist, that generates a
- list of alternating busy and free times from an icalset. The class
- includes routines to gnerate rfc2445 busy and free lists, and to
- get the next avaliable busy or free time after a given time.
-
-
-Version 0.20D 3 Nov 00
------------------------
-
-Many miscelaneous tweaks to the build system
-
-More work to icalclassify.
-
-Aded routines to icaltime.c to convert to and from specific timezones
-in Olsen format ("America/Los_Angeles")
-
-
-Version 0.20 7 Sept 00 (cvs tag libical-0-20 )
-----------------------------------------------
-
-Addedd icalclassify() which looks at a message and determine how to
-process it.
-
-Misc bug fixes and tweaks.
-
-Version 0.19 6 August 00 (cvs tag libical-0-19)
------------------------------------------------
-
-Created a MIME parser in icalmime.c. This will take any complex MIME
-encapsulated message and return an icalcomponent with the same
-structure. Each MIME part is represented by a component of type
-X-LIC-MIMEPART.
-
-Added MIME partsing to stow.c
-
-Added external iterators to icalcomponent. See test_iterators() in
-test/regression.c
-
-Refactored icalcluster and icalstore into icalset, icalfileset and
-icaldirset, which have a pseudo inheritance relationship between them.
-
-Fixed more memory leaks.
-
-Version 0.18a 10 June 00 ( cvs tag libical-0-18a )
------------------------------------------------
-
-Did the final tweaks to stow.c, a program to recieve and store iMIP
-messages.
-
-
-Version 0.18 10 June 00 ( cvs tag libical-0-18 )
------------------------------------------------
-
-Added libicalvcal, which includes the Versit code for parsing vCal
-files and a routine (icalvcal_convert() ) that converts a vCal object
-to an iCal object. The test program is src/test/testvcal.
-
-Added marginally functional recurrence code. The curent code does not
-handle all of the examples in rfc2445 ( which are extracted in
-test-data/recur.txt ) but it can do all of the obvious cases. See the
-test program in src/test/recur.c for an example. In particular, the
-code cannot handle the integer values in BYDAY, nor negative integers
-in BYMONTH or BYMONTHDAY. It also cannot handle BYSETPOS.
-
-Moved some code to the examples directory and improved the comments.
-
-Did a little more work on the documentation in the doc directory. The
-documentation is in LyX source, but there is a text version in
-UsingLibical.txt
-
-
-Version 0.17 15 May 00 (cvs tag libical-0-17 )
----------------------------------------------
-
-Fixed two bugs that added extraneous '/' to test values
-
-Fixed type in internal string for the COUNTER method
-
-Eliminated a memory leak in icalparser.c
-
-
-Version 0.16a 29 April 00
-----------------------------------------------
-
-Fixed bug in icalvalue_new_from_string that caused METHOD value to
-choke on non standard input.
-
-Fixed a memory leak in icalparser_add_line -- failed to free 'line'
-
-
-Version 0.16 5 April 00 ( cvs tag libical-0-16)
-----------------------------------------------
-
-Now using automake.
-
-Substantial changes to the parser. New interfaces let you parser
-multiple components from a single stream by feading the parser object
-one line at a time.
-
-Added a STRING value type. this type is like TEXT, but does not
-backslash magic characters. It is used in PRODID and REQUEST-STATUS,
-where the '/' and ';' are literal.
-
-Added several convience functions for REQUEST-STATUS to icalenums.c
-
-Addedd a routine to icalcomponent to convert X-LIC errors to
-REQUEST-STATUS return values.
-
-Version 0.15a 5 Mar 00 (cvs tag libical-0-15a)
----------------------
-
-Experimented with CVS
-
-Fixed icalvalue_set_text to convert escaped characters into the proper
-values.
-
-Other minor code tweaks.
-
-
-Version 0.15 7 Feb 00
----------------------
-
-Split the storage classess ( icalstore, icalcluster, icalcalendar )
-into a seperate library, libicalss
-
-Implemented restriction checking in file icalrestrictions.c. The
-checking is not complete, but can handle the bulk of the restrictions
-described in RFC 2446.
-
-Created a new value type, METHOD. Changed METHOD property to use the
-new value. The METHOD value uses an enumeration.
-
-
-Version 0.14b
--------------
-
-Implemented parsing of RECUR values, although it does not handle BYDAY
-specs with numbers.
-
-Fixed error in icalparser_next_line that mangled lines longer than the
-temp buffer (1024 chars.) The temp buffer is now 80 chars, and it can
-handle (apparently) arbitrary length lines
-
-Fixed severe brokenness in a value, but I forgot which one.
-
-Cleaned cruft out of the distribution, so the tarfile is smaller.
-
-
-Version 0.14a 14 Jan 00
------------------------
-
-Fixed bug in ROLE parameter -- missing '-' in the text of allowed values
-
-Fixed bug in X-parameters
-
-Version 0.14 11 Jan 00
-----------------------
-
-Fixed wrong value type for TRIGGER property
-
-Added Calendar object. Calendar is an aggregate of two stores and two
-clusters, and can store all of the inforamation associated with a
-calendar.
-
-icalcomponent_add_property and icalcomponent_add_component will
-complain if you try to add a component or property that is already
-part of an other component. The *_free routines wil complain if you try
-to free a linked component or property.
-
-More improvements to error handling.
-
-Parser is much more robust.
-
-Minor memory enhancements.
-
-Regression test runs without memory leaks.
-
-Version 0.13d 21Dec99
----------------------
-
-Seperated perl interface and library
-
-Added autoconf support
-
-Scripts that generate derived properties, values and parameters now
-change source and header files inline.
-
-Changed icalstore to cluster all components with DTSTART in a month
-into a single file. This should reduce number of file accesses by a
-factor of 60.
-
-Ran code through Purify and fixed memory leaks.
-
-
-Version 0.13 16Nov99
----------------------
-
-Yet more bug fixes! Yeah!
-
-Added better error handling. The Parser inserts X-LIC-*ERROR
-properties to warn of parsing errors.
-
-The imip source/sink programs in /src/imip is demonstrably functional.
-
-Version 0.12b 17Oct99
----------------------
-
-More bug fixes, particularily in parse from string routines
-
-ICal::Store is mostly functional
-
-This is version is a checkpoint, not a release.
-
-Version 0.12a 10Oct99
----------------------
-
-Expanded perl interface:
- Added 1/2 of Store module
- Fixed bugs
- Implemeted get_{first,next}_property
-
-Extended C interface
- Made get_{first,next}_property work properly
- Fixed bugs
-
-
-This is version is a checkpoint, not a release.
-
-Version 0.12 27Aug99
---------------------
-
-Added a rudimentatry perl interface
-
-This is version is a checkpoint, not a release.
-
-
-Version 0.11 11Aug99
---------------------
-
-Eliminated most use of flex/bison -- all parsing, except for the
-values, is done in C.
-
-Cleaned up memory leaks. Purify claims that I got them all.
-
-Moved all derived component/prop/param/value code ( in .inc / .h
-files) into main files ( icalcomponent.{c,h}, icalproperty.{c,h}, etc/
-)
-
-Implemented *_clone routines.
-
-Fixed a lot of bugs.
-
-Implemented more value types. Still unimplemeneted are BINARY and RECUR
-
-Included MacOS/Code Warior files from Graham Davison
-
-
-Version 0.10 8Jul99
--------------------
-
-Eliminated shift/reduce and reduce/reduce conflicts in the parser.
-This version is almost feature complete -- it has the basic structure
-for all of the library's functionality, and it will only require
-implementing procedure shells and fixing bugs. I think that all of the
-hard work is done...
-
-Version 0.09a,b 3,7 Jul99
--------------------------
-
-Various improvements to the parser, added some functionality. The parser code
-is mostly complete, and should be fully functional, except for a horde of
-bugs. Also added support for X-Properties.
-
-Version 0.09 25Jun99
---------------------
-
-Added a parser in files src/comp/icalitip.{y,l} The lexer is mostly
-functional, but the parser is not.
-
-
-Version 0.08 2Jun99
---------------------
-
-All files now have MPL licensing
-
-Implement enough of the code to perform some rudimentary testing
-
-
-Version 0.07 14May99
---------------------
-
-Remove all interfaces that construct object from a string
-
-Moved most code back into comp directory
-
-Implemented C files for most headers -- usecases.c now links.
-
-Many improvements to generation scripts.
-
-
-
-Version 0.06 25Apr99
---------------------
-
-Expanded distribution to include:
- Directory structure that can accomodate future expansion
- Several levels of Makefiles
- This CHANGES file
-
-Added headers for irip and parse modules
-
-Added several files with design information
-
-Added scripts that I had used to generate much of the ical header code.
-
-Split C headers from CC headers
-
-Added data for iTIP and iCAL component restrictions in restrictions.csv
-
-Version 0.05 11Apr99
-----------------------
-
-Changes to ical headers
-
- Added derived Property classes.
-
- Improved the interface to the derived property and parameter classes
-
- Added derived component classes.
-
- Created usecases.c and ccusecases.cc to demonstrate use
-
- C++ interface compile
-
-
-Version 0.04 5Apr99
--------------------
-
-Version 0.02 30Mar99
---------------------
diff --git a/libical/README b/libical/README
deleted file mode 100644
index 92b2ff6e86..0000000000
--- a/libical/README
+++ /dev/null
@@ -1,100 +0,0 @@
-
-LIBICAL -- An implementation of basic iCAL protocols
-
-The code and datafiles in this distribution are licensed under the
-Mozilla Public License. See http://www.mozilla.org/NPL/MPL-1.0.html
-for a copy of the license. Alternately, you may use libical under the
-terms of the GNU Library General Public License. See
-http://www.fsf.org/copyleft/lesser.html for a copy of the LGPL.
-
-This dual license ensures that the library can be incorporated into
-both proprietary code and GPL'd programs, and will benefit from
-improvements made by programmers in both realms. I will only accept
-changes into my version of the library if they are similarly
-dual-licensed.
-
-The code in this distribution implements the iCal protocols as
-described in RFC2445 and RFC2446. The code is in very early stages of
-development.
-
-Portions of this distribution are (C) Copyright 1996 Apple Computer,
-Inc., AT&T Corp., International Business Machines Corporation and
-Siemens Rolm Communications Inc. See src/libicalvcal/README.TXT for
-details.
-
-This code is under active development. If you would like to contribute
-to the project, you can contact me, Eric Busboom, at
-eric@softwarestudio.org. The project has a webpage at
-
- http://softwarestudio.org/libical/index.html
-
-and a mailing list that you can join by sending the following mail:
-
- ------------
- To: minimalist@softwarestudio.org
- Subject: subscribe libical
- ------------
-
-
-Building the library
---------------------
-
-This distribution is developed on Red Hat Linux 6.0 and usually
-compiles on SunOS 5.6 and FreeBSD 2.27. I have reports of success of
-previous version on MacOS ( with CodeWarrior ) and on UnixWare, but I
-don't know about any other systems.
-
-The library is configured with automake. From the root directory, run
-
- ./configure
-
-To build all of the Makefiles for your system. If you will be installing the library, you may want to use the --prefix flag to set the directory where the library and header files will be installed.
-
- ./configure --prefix=/proj/local/
-
-If configure runs fine, run "make" to build the library and
-"make install" to install it.
-
-Although the distribution uses libtool to generate libraries, it has
-shared libraries turned off by default. To create and install shared
-libraries use:
-
- ./configure --enable-shared
-
-The current version of libical focuses on creating and
-manipulating iCal objects. With it, you can parse text representations
-of iCal components, add and remove sub-components, properties,
-parameters and values, and print the components back out as strings.
-
-
-Notes for Libical Developers
--------------------
-
-If you don't want to use gcc as the compiler, and you got the sources
-from CVS, you should set the CC variable to the path to the compiler
-and run "automake --include-deps" to keep automake from using
-gcc-specific automatic dependancy tracking.
-
- > CC=/pkg/SUNWspro/bin/cc; export CC
- > automake --include-deps
- > ./configure --prefix=/proj/local/
- > make
-
-You will not need to re-run automake unless you got the sources from CVS.
-
-Using the Library
------------------
-
-There is rudimentary, unfinished documentation in the /doc directory,
-and annotated examples in /examples.
-
-
-Perl Library
-------------
-
-There is a perl language binding of this library, LIBICAL.
-It is available from http://www.softwarestudio.org/libical
-
-
-Eric Busboom
-eric@softwarestudio.org
diff --git a/libical/TEST b/libical/TEST
deleted file mode 100644
index 90c3473b31..0000000000
--- a/libical/TEST
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Parser Tests
-------------
-Use iCAL keywords as first words of unquoted strings \ No newline at end of file
diff --git a/libical/THANKS b/libical/THANKS
deleted file mode 100644
index a56bca9365..0000000000
--- a/libical/THANKS
+++ /dev/null
@@ -1,54 +0,0 @@
-Thanks to:
-
-Allan Clark <allanc@atlas.platypus.bc.ca> for testing libical against
-UnixWare.
-
-Graham Davison <g.m.davison@computer.org> for MacOS support and
-miscelaneous code bits
-
-Seth Alves <alves@hungry.com> for the first cut at the Makefile.am
-files and various utility functions.
-
-Russ Steinthal <rms39@columbia.edu> for several utility functions and
-comments.
-
-Ola Lundqvist <olalu526@student.liu.se> for the vCal test data file.
-
-Colin DuPlantis <colin@cp.net> for new functions in icalparser.c
-
-Holger Schmidt <hschmidt@chronolabs.de> for all of icalcstp.c, The
-CSTP protocol implementation, and modifications to icalcstp.h
-
-Gisle Hannemyr <gisle@oslonett.no> The decode*() functions in sspm.c
-are based on the decode() routine in the mimelite program, Copyright
-(c) 1994 Gisle Hannemyr.
-
-The Evolution team at Helixcode ( Federico Mena Quintero
-<federico@helixcode.com>, JP Rosevear <jpr@helixcode.com>, Ettore
-Perazzoli <ettore@helixcode.com>, Christopher James Lahey
-<clahey@helixcode.com>, Peter Williams <peterw@helixcode.com>) for
-miscelaneous patches and adjustments to the build system.
-
-Cornelius Schumacher <schumacher@kde.org> for many insightful
-suggestions and a few patches.
-
-Mark D. Anderson <mda@discerning.com> for discussions and ideas.
-
-Martin Neimeier <nei@ibn.de> for correcting bugs in icalrecur.c
-
-Tom Leitner <tom@radar.tu-graz.ac.at> For several bug fixes in
-compiling on Tru64 UNIX.
-
-Patrick Lewis <plewis@inetarena.com> for several bug reports and
-contributions to the Python bindings
-
-Larry W. Virden <lvirden@cas.org> for several bug reports in compiling
-on Solaris.
-
-Bryan Bartone <bsb@mesasys.com> for code changes based on porting
-libical to Windows.
-
-Hubert V <hubertv@bigfoot.com> for checking and analyzing the output
-of the recurrence rule system.
-
-Jonathan Yue <jonathan.yue@cp.net> for icalproperty_get_name()
diff --git a/libical/TODO b/libical/TODO
deleted file mode 100644
index eb52fb7a25..0000000000
--- a/libical/TODO
+++ /dev/null
@@ -1,39 +0,0 @@
-
-TODOs for libical-0.16
----------------------
-
-libical treats properties with multiple values incorrecty -- it always
-seperates multiple values into multiple properties. This is not
-acceptable for CATEGORIES and RESOURCES.
-
-Some TEXT valued properties, like METHOD, have a limited set of valid
-values. The code should check that the values of these properites are
-valid. ( Although METHOD now uses enums, and is not really TEXT valued )
-
-Finish implementing values
- ATTACH/BINARY
- content_type
- language
-
-Check for buffer overflow on external input.
-
-Error Handling
-
- Dates and times: the parser will accept many illegal date time
- values
-
-RECUR values ignore integers in BYDAY clauses, ie 'FREQ=MONTHLY;BYDAY=-1SU'
-
-Restrictions code does not catch lack of DTEND or DURATION
-
-For some value types, if there illegal characters in the value ( like
-4.56 in an integer value), the parser will output the characters to
-stdout.
-
-Check all uses of strcpy and sprinf for buffer overflows
-
-Make the mime parsing code in sspm grow the list of parts as needed,
-rather than having a hard limit.
-
-in sspm.c, and unrecognized content-transfer-encoding values must
-force a content type of application/octet-stream.
diff --git a/libical/acconfig.h b/libical/acconfig.h
deleted file mode 100644
index f4909b0c46..0000000000
--- a/libical/acconfig.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Define to make icalerror_* calls abort instead of internally
- signalling an error */
-#undef ICAL_ERRORS_ARE_FATAL
-
-/* Define to make icalcluster_commit() save to a temp file and mv to
- the original file instead of writing to the orig file directly */
-#undef ICAL_SAFESAVES
-
-/* Define to terminate lines with "\n" instead of "\r\n" */
-#undef ICAL_UNIX_NEWLINE
-
-/* Define if your libc defines a "timezone" variable */
-#undef HAVE_TIMEZONE
-
-/* Define if your libc defines a struct tm containing a "tm_gmtoff" member */
-#undef HAVE_TM_GMTOFF
-
-/* Define to 1 if your compile does not like lines like: struct
- something foo[]*/
-#undef ICAL_NO_EMPTY_ARRAY_DECL
diff --git a/libical/autogen.sh b/libical/autogen.sh
deleted file mode 100755
index e15e4e33a8..0000000000
--- a/libical/autogen.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-PROJECT=libical
-TEST_TYPE=-d
-FILE=src
-
-DIE=0
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
-
-(automake --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have automake installed to compile $PROJECT."
- echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
-}
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
-
-test $TEST_TYPE $FILE || {
- echo "You must run this script in the top-level $PROJECT directory"
- exit 1
-}
-
-if test -z "$*"; then
- echo "I am going to run ./configure with no arguments - if you wish "
- echo "to pass any to it, please specify them on the $0 command line."
-fi
-
-case $CC in
-*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
-esac
-
-if test -z "$ACLOCAL_FLAGS"; then
-
- acdir=`aclocal --print-ac-dir`
- m4list="glib.m4"
-
- for file in $m4list
- do
- if [ ! -f "$acdir/$file" ]; then
- echo "WARNING: aclocal's directory is $acdir, but..."
- echo " no file $acdir/$file"
- echo " You may see fatal macro warnings below."
- echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
- echo " environment variable to \"-I /some/dir\", or install"
- echo " $acdir/$file."
- echo ""
- fi
- done
-fi
-
-aclocal $ACLOCAL_FLAGS
-
-# optionally feature autoheader
-(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
-
-automake -a $am_opt
-autoconf
-cd $ORIGDIR
-
-$srcdir/configure "$@"
-
-echo
-echo "Now type 'make' to compile $PROJECT."
diff --git a/libical/configure.in b/libical/configure.in
deleted file mode 100644
index 244f38a280..0000000000
--- a/libical/configure.in
+++ /dev/null
@@ -1,102 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(src)
-AM_INIT_AUTOMAKE(libical,0.23a)
-AM_CONFIG_HEADER(config.h)
-
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
-
-dnl Checks for programs.
-AC_PROG_YACC
-AC_PROG_CC
-AM_PROG_LEX
-AC_PROG_LN_S
-AC_PROG_INSTALL
-
-dnl Initialize libtool
-AM_PROG_LIBTOOL
-
-AC_SUBST(AR)
-
-AC_CHECK_PROGS(AR, ar aal, ar)
-AC_CHECK_PROGS(PERL, perl5 perl)
-
-dnl AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1)
-AC_DEFINE(ICAL_SAFESAVES,1)
-AC_DEFINE(ICAL_UNIX_NEWLINE,1)
-dnl AC_DEFINE(ICAL_NO_EMPTY_ARRAY_DECL)
-
-dnl Checks for libraries.
-dnl Replace `main' with a function in -lical:
-dnl AC_CHECK_LIB(ical, main)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(time.h sys/types.h assert.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_STRUCT_TM
-
-dnl Checks for library functions.
-AC_CHECK_FUNCS(strdup)
-
-dnl **************************************************
-dnl * Check for Python
-dnl **************************************************
-python_val=false
-AC_ARG_ENABLE(python-bindings,
-[ --enable-python-bindings=[yes/no] Enable python bindings],,enable_python_bindings=yes)
-if test "x$enable_python_bindings" = "xyes"; then
- python_val=true
-else
- python_val=false
-fi
-
-if $python_val; then
- AC_CHECK_PROG(python_val, python, true, false)
-fi
-if $python_val; then
- AC_CHECK_PROG(python_val, swig, true, false)
-fi
-
-if $python_val; then
- PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
- PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'`
- changequote(<<, >>)dnl
- PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
- changequote([, ])dnl
- if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
- PY_LIBS="python$PY_VERSION"
- PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
- PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
- PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile"
- PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
- PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
- PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE`
- PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS"
- AC_SUBST(PY_LIBS)
- AC_SUBST(PY_LIB_LOC)
- AC_SUBST(PY_CFLAGS)
- AC_SUBST(PY_EXTRA_LIBS)
- else
- python_val=false
- fi
-fi
-AM_CONDITIONAL(WITH_PYTHON, $python_val)
-
-AC_OUTPUT([
-Makefile
-design-data/Makefile
-doc/Makefile
-scripts/Makefile
-src/Makefile
-src/libical/Makefile
-src/libical/icalversion.h
-src/libicalss/Makefile
-src/libicalvcal/Makefile
-test-data/Makefile
-zoneinfo/Makefile
-])
-
diff --git a/libical/design-data/.cvsignore b/libical/design-data/.cvsignore
deleted file mode 100644
index 3dda72986f..0000000000
--- a/libical/design-data/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/libical/design-data/Makefile.am b/libical/design-data/Makefile.am
deleted file mode 100644
index 8f27cd6ce0..0000000000
--- a/libical/design-data/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-EXTRA_DIST =\
- properties.csv \
- parameters.csv \
- restrictions.csv \
- status.txt \
- value-types.csv
diff --git a/libical/design-data/components.txt b/libical/design-data/components.txt
deleted file mode 100644
index ae5cc976ad..0000000000
--- a/libical/design-data/components.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-VCALENDAR
-VEVENT
-VTODO
-VJOURNAL
-VFREEBUSY
-VTIMEZONE
-XSTANDARDTIME
-XDAYLIGHTSAVINGSTIME
-VALARM
-XAUDIOALARM
-XDISPLAYALARM
-XEMAILALARM
-XPROCEDUREALARM
-X
-VSCHEDULE
-VQUERY
-VCAR
-VCOMMAND
-XLICINVALID
-XMIMEPART
-ANY
-
diff --git a/libical/design-data/param-c-types.txt b/libical/design-data/param-c-types.txt
deleted file mode 100644
index 3f690fa0dc..0000000000
--- a/libical/design-data/param-c-types.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-ALTREP const char*
-CN const char*
-CUTYPE icalparameter_cutype
-DELEGATED-FROM const char*
-DELEGATED-TO const char*
-DIR const char*
-ENCODING icalparameter_encoding
-FBTYPE icalparameter_fbtype
-FMTTYPE const char*
-LANGUAGE const char*
-MEMBER const char*
-PARTSTAT icalparameter_partstat
-RANGE icalparameter_range
-RELATED icalparameter_related
-RELTYPE icalparameter_reltype
-ROLE icalparameter_role
-RSVP int
-SENT-BY const char*
-TZID const char*
-VALUE icalparameter_value
-X const char*
-X-LIC-ERRORTYPE icalparameter_xlicerrortype
-X-LIC-COMPARETYPE icalparameter_xliccomparetype
diff --git a/libical/design-data/parameters.csv b/libical/design-data/parameters.csv
deleted file mode 100644
index c71eb115eb..0000000000
--- a/libical/design-data/parameters.csv
+++ /dev/null
@@ -1,24 +0,0 @@
-"#Name ","C Type","Enumeration Values"
-"ALTREP","const char*",
-"CN","const char*",
-"CUTYPE","icalparameter_cutype","INDIVIDUAL;GROUP;RESOURCE;ROOM;UNKNOWN"
-"DELEGATED-FROM","const char*",
-"DELEGATED-TO","const char*",
-"DIR","const char*",
-"ENCODING","icalparameter_encoding","8BIT;BASE64"
-"FBTYPE","icalparameter_fbtype","FREE;BUSY;BUSYUNAVAILABLE;BUSYTENTATIVE"
-"FMTTYPE","const char*",
-"LANGUAGE","const char*",
-"MEMBER","const char*",
-"PARTSTAT","icalparameter_partstat","NEEDS-ACTION;ACCEPTED;DECLINED;TENTATIVE;DELEGATED;COMPLETED;INPROCESS"
-"RANGE","icalparameter_range","THISANDPRIOR;THISANDFUTURE"
-"RELATED","icalparameter_related","START;END "
-"RELTYPE","icalparameter_reltype","PARENT;CHILD;SIBLING"
-"ROLE","icalparameter_role","CHAIR;REQ-PARTICIPANT;OPT-PARTICIPANT;NON-PARTICIPANT"
-"RSVP","icalparameter_rsvp","TRUE;FALSE"
-"SENT-BY","const char*",
-"TZID","const char*",
-"VALUE","icalparameter_value","BINARY;BOOLEAN;DATE;DURATION;FLOAT;INTEGER;PERIOD;RECUR;TEXT;TIME;URI;ERROR;DATE-TIME;UTC-OFFSET;CAL-ADDRESS"
-"X","const char*",
-"X-LIC-ERRORTYPE","icalparameter_xlicerrortype","COMPONENT-PARSE-ERROR;PROPERTY-PARSE-ERROR;PARAMETER-NAME-PARSE-ERROR;PARAMETER-VALUE-PARSE-ERROR;VALUE-PARSE-ERROR;INVALID-ITIP;UNKNOWN-VCAL-PROP-ERROR;MIME-PARSE-ERROR"
-"X-LIC-COMPARETYPE","icalparameter_xliccomparetype","EQUAL;NOTEQUAL;LESS;GREATER;LESSEQUAL;GREATEREQUAL;REGEX"
diff --git a/libical/design-data/params-in-prop.txt b/libical/design-data/params-in-prop.txt
deleted file mode 100644
index 4d4e133fc3..0000000000
--- a/libical/design-data/params-in-prop.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-ACTION VALUE X
-ATTACH FMTTYPE ENCODING VALUE X
-ATTENDEE CN CUTYPE DELEGATED-FROM DELEGATED-TO DIR LANGUAGE MEMBER PARTSTAT ROLE RSVP SENT-BY X
-CALSCALE X
-CATEGORIES LANGUAGE X
-CLASS X
-COMMENT ALTREP LANGUAGE X
-COMPLETED X
-CONTACT ALTREP LANGUAGE X
-CREATED X
-DESCRIPTION ALTREP LANGUAGE X
-DTEND VALUE TZID X
-DTSTAMP X
-DTSTART VALUE TZID X
-DUE VALUE TZID X
-DURATION X
-EXDATE VALUE TZID X
-EXRULE X
-FREEBUSY FBTYPE X
-GEO X
-LAST-MODIFIED X
-LOCATION ALTREP LANGUAGE X
-METHOD X
-ORGANIZER CN DIR LANGUAGE SENT-BY X
-PERCENT-COMPLETE X
-PRIORITY X
-PRODID X
-RDATE VALUE TZID X
-RECURRENCE-ID VALUE RANGE TZID X
-RELATED-TO RELTYPE X
-REPEAT X
-REQUEST-STATUS LANGUAGE X
-RESOURCES ALTREP LANGUAGE X
-RRULE X
-SEQUENCE X
-STATUS X
-SUMMARY ALTREP LANGUAGE X
-TRANSP X
-TRIGGER VALUE RELATED X
-TZID X
-TZNAME LANGUAGE X
-TZOFFSETFROM X
-TZOFFSETTO X
-TZURL X
-UID X
-URL X
-VERSION X
-XPROP LANGUAGE X
-X-LIC-ERROR XLICEERRORTYPE X
-SCOPE X
-MAXRESULTS X
-MAXRESULTSSIZE X
-QUERY X
-QUERYNAME X
-TARGET X \ No newline at end of file
diff --git a/libical/design-data/prop-to-value.txt b/libical/design-data/prop-to-value.txt
deleted file mode 100644
index a7d0c1f772..0000000000
--- a/libical/design-data/prop-to-value.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-CALSCALE TEXT
-METHOD METHOD # Non-std. RFC2445 specifies TEXT
-PRODID TEXT
-VERSION TEXT
-CATEGORIES TEXT
-CLASS TEXT
-COMMENT TEXT
-DESCRIPTION TEXT
-LOCATION TEXT
-PERCENT-COMPLETE INTEGER
-PRIORITY INTEGER
-RESOURCES TEXT
-STATUS STATUS
-SUMMARY TEXT
-COMPLETED DATE-TIME
-FREEBUSY PERIOD
-TRANSP TEXT
-TZNAME TEXT
-TZOFFSETFROM UTC-OFFSET
-TZOFFSETTO UTC-OFFSET
-TZURL URI
-TZID TEXT
-ATTENDEE CAL-ADDRESS
-CONTACT TEXT
-ORGANIZER CAL-ADDRESS
-RELATED-TO TEXT
-URL URI
-UID TEXT
-EXRULE RECUR
-RRULE RECUR
-ACTION TEXT
-REPEAT INTEGER
-CREATED DATE-TIME
-DTSTAMP DATE-TIME
-LAST-MODIFIED DATE-TIME
-SEQUENCE INTEGER
-X TEXT
-REQUEST-STATUS STRING
-ATTACH ATTACH # Non-std: URI or BINARY
-GEO GEO # Non-std: Two FLOATS
-DTEND DATE-TIME # Non-std: DATE-TIME or DATE
-DUE DATE-TIME # Non-std: DATE-TIME or DATE
-DTSTART DATE-TIME # Non-std: DATE-TIME or DATE
-RECURRENCE-ID DATE-TIME # Non-std: DATE-TIME or DATE
-EXDATE DATE-TIME # Non-std: DATE-TIME or DATE
-RDATE DATE-TIME-PERIOD # Non-std: DATE-TIME or DATE or PERIOD
-TRIGGER TRIGGER # Non-std: DURATION or DATE-TIME
-DURATION DURATION
-QUERY QUERY
-X-LIC-ERROR TEXT
-X-LIC-CLUSTERCOUNT INTEGER
-X-LIC-MIMECONTENTTYPE STRING
-X-LIC-MIMECHARSET STRING
-X-LIC-MIMEENCODING STRING
-X-LIC-MIMEOPTINFO STRING
-X-LIC-MIMECID STRING
-X-LIC-MIMEFILENAME STRING
diff --git a/libical/design-data/properties.csv b/libical/design-data/properties.csv
deleted file mode 100644
index dca6810d8f..0000000000
--- a/libical/design-data/properties.csv
+++ /dev/null
@@ -1,66 +0,0 @@
-,,
-"#Property Name","libical Value type","iCalendar default value"
-"ACTION","ACTION","ACTION"
-"ATTACH","ATTACH","URI"
-"ATTENDEE","CAL-ADDRESS","CAL-ADDRESS"
-"CALSCALE","TEXT","TEXT"
-"CATEGORIES","TEXT","TEXT"
-"CLASS","TEXT","TEXT"
-"COMMENT","TEXT","TEXT"
-"COMPLETED","DATE-TIME","DATE-TIME"
-"CONTACT","TEXT","TEXT"
-"CREATED","DATE-TIME","DATE-TIME"
-"DESCRIPTION","TEXT","TEXT"
-"DTEND","DATE-TIME","DATE-TIME"
-"DTSTAMP","DATE-TIME","DATE-TIME"
-"DTSTART","DATE-TIME","DATE-TIME"
-"DUE","DATE-TIME","DATE-TIME"
-"DURATION","DURATION","DURATION"
-"EXDATE","DATE-TIME","DATE-TIME"
-"EXRULE","RECUR","RECUR"
-"FREEBUSY","PERIOD","PERIOD"
-"GEO","GEO","GEO"
-"LAST-MODIFIED","DATE-TIME","DATE-TIME"
-"LOCATION","TEXT","TEXT"
-"METHOD","METHOD","METHOD"
-"ORGANIZER","CAL-ADDRESS","CAL-ADDRESS"
-"PERCENT-COMPLETE","INTEGER","INTEGER"
-"PRIORITY","INTEGER","INTEGER"
-"PRODID","TEXT","TEXT"
-"RDATE","DATE-TIME-PERIOD","DATE-TIME"
-"RECURRENCE-ID","DATE-TIME","DATE-TIME"
-"RELATED-TO","TEXT","TEXT"
-"REPEAT","INTEGER","INTEGER"
-"REQUEST-STATUS","STRING","STRING"
-"RESOURCES","TEXT","TEXT"
-"RRULE","RECUR","RECUR"
-"SEQUENCE","INTEGER","INTEGER"
-"STATUS","STATUS","STATUS"
-"SUMMARY","TEXT","TEXT"
-"TRANSP","TEXT","TEXT"
-"TRIGGER","TRIGGER","DURATION"
-"TZID","TEXT","TEXT"
-"TZNAME","TEXT","TEXT"
-"TZOFFSETFROM","UTC-OFFSET","UTC-OFFSET"
-"TZOFFSETTO","UTC-OFFSET","UTC-OFFSET"
-"TZURL","URI","URI"
-"UID","TEXT","TEXT"
-"URL","URI","URI"
-"VERSION","TEXT","TEXT"
-"X","TEXT","TEXT"
-"SCOPE","TEXT","TEXT"
-"MAXRESULTS","INTEGER","INTEGER"
-"MAXRESULTSSIZE","INTEGER","INTEGER"
-"QUERY","QUERY","QUERY"
-"QUERYNAME","TEXT","TEXT"
-"TARGET","CAL-ADDRESS","CAL-ADDRESS"
-"X-LIC-ERROR","TEXT","TEXT"
-"X-LIC-CLUSTERCOUNT","STRING","STRING"
-"X-LIC-MIMECONTENTTYPE","STRING","STRING"
-"X-LIC-MIMECHARSET","STRING","STRING"
-"X-LIC-MIMEENCODING","STRING","STRING"
-"X-LIC-MIMEOPTINFO","STRING","STRING"
-"X-LIC-MIMECID","STRING","STRING"
-"X-LIC-MIMEFILENAME","STRING","STRING"
-"ANY","NO","NO"
-"NO","NO","NO"
diff --git a/libical/design-data/property-tokens.txt b/libical/design-data/property-tokens.txt
deleted file mode 100644
index f8a95861c4..0000000000
--- a/libical/design-data/property-tokens.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-8BIT
-ACCEPTED
-ADD
-AUDIO
-BASE64
-BINARY
-BOOLEAN
-BUSY
-BUSY-TENTATIVE
-BUSY-UNAVAILABLE
-CAL-ADDRESS
-CANCEL
-CANCELLED
-CHAIR
-CHILD
-COMPLETED
-CONFIDENTIAL
-CONFIRMED
-COUNTER
-DATE
-DATE-TIME
-DECLINECOUNTER
-DECLINED
-DELEGATED
-DISPLAY
-DRAFT
-DURATION
-EMAIL
-END
-FINAL
-FLOAT
-FREE
-GREGORIAN
-GROUP
-INDIVIDUAL
-IN-PROCESS
-INTEGER
-NEEDS-ACTION
-NON-PARTICIPANT
-OPAQUE
-OPT-PARTICIPANT
-PARENT
-PERIOD
-PRIVATE
-PROCEDURE
-PUBLIC
-PUBLISH
-RECUR
-REFRESH
-REPLY
-REQ-PARTICIPANT
-REQUEST
-RESOURCE
-ROOM
-SIBLING
-START
-TENTATIVE
-TEXT
-THISANDFUTURE
-THISANDPRIOR
-TIME
-TRANSPAENT
-UNKNOWN
-UTCOFFSET
-XNAME
diff --git a/libical/design-data/restrictions.csv b/libical/design-data/restrictions.csv
deleted file mode 100644
index 1c62e2a8b4..0000000000
--- a/libical/design-data/restrictions.csv
+++ /dev/null
@@ -1,1348 +0,0 @@
-# Method, Target component, Property, Sub-component, Restriction
-PUBLISH,VEVENT,NONE,NONE,ONEPLUS
-PUBLISH,VEVENT,DTSTAMP,NONE,ONE
-PUBLISH,VEVENT,DTSTART,NONE,ONE
-PUBLISH,VEVENT,ORGANIZER,NONE,ONE
-PUBLISH,VEVENT,SUMMARY,NONE,ONE
-PUBLISH,VEVENT,UID,NONE,ONE
-PUBLISH,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-PUBLISH,VEVENT,SEQUENCE,NONE,ZEROORONE
-PUBLISH,VEVENT,ATTACH,NONE,ZEROPLUS
-PUBLISH,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
-PUBLISH,VEVENT,CLASS,NONE,ZEROORONE
-PUBLISH,VEVENT,COMMENT,NONE,ZEROORONE
-PUBLISH,VEVENT,CONTACT,NONE,ZEROPLUS
-PUBLISH,VEVENT,CREATED,NONE,ZEROORONE
-PUBLISH,VEVENT,DESCRIPTION,NONE,ZEROORONE
-PUBLISH,VEVENT,DTEND,NONE,ZEROORONE
-PUBLISH,VEVENT,DURATION,NONE,ZEROORONE
-PUBLISH,VEVENT,EXDATE,NONE,ZEROPLUS
-PUBLISH,VEVENT,EXRULE,NONE,ZEROPLUS
-PUBLISH,VEVENT,GEO,NONE,ZEROORONE
-PUBLISH,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-PUBLISH,VEVENT,LOCATION,NONE,ZEROORONE
-PUBLISH,VEVENT,PRIORITY,NONE,ZEROORONE
-PUBLISH,VEVENT,RDATE,NONE,ZEROPLUS
-PUBLISH,VEVENT,RELATEDTO,NONE,ZEROPLUS
-PUBLISH,VEVENT,RESOURCES,NONE,ZEROORONE
-PUBLISH,VEVENT,RRULE,NONE,ZEROPLUS
-PUBLISH,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf_cancel
-PUBLISH,VEVENT,TRANSP,NONE,ZEROORONE
-PUBLISH,VEVENT,URL,NONE,ZEROORONE
-PUBLISH,VEVENT,X,NONE,ZEROPLUS
-PUBLISH,VEVENT,ATTENDEE,NONE,ZERO
-PUBLISH,VEVENT,REQUESTSTATUS,NONE,ZERO
-PUBLISH,VEVENT,NONE,VALARM,ZEROPLUS
-PUBLISH,VEVENT,NONE,VFREEBUSY,ZERO
-PUBLISH,VEVENT,NONE,VJOURNAL,ZERO
-PUBLISH,VEVENT,NONE,VTODO,ZERO
-PUBLISH,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
-PUBLISH,VEVENT,NONE,X,ZEROPLUS
-REQUEST,VEVENT,NONE,NONE,ONEPLUS
-REQUEST,VEVENT,ATTENDEE,NONE,ONEPLUS
-REQUEST,VEVENT,DTSTAMP,NONE,ONE
-REQUEST,VEVENT,DTSTART,NONE,ONE
-REQUEST,VEVENT,ORGANIZER,NONE,ONE
-REQUEST,VEVENT,SEQUENCE,NONE,ZEROORONE
-REQUEST,VEVENT,SUMMARY,NONE,ONE
-REQUEST,VEVENT,UID,NONE,ONE
-REQUEST,VEVENT,ATTACH,NONE,ZEROPLUS
-REQUEST,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
-REQUEST,VEVENT,CLASS,NONE,ZEROORONE
-REQUEST,VEVENT,COMMENT,NONE,ZEROORONE
-REQUEST,VEVENT,CONTACT,NONE,ZEROPLUS
-REQUEST,VEVENT,CREATED,NONE,ZEROORONE
-REQUEST,VEVENT,DESCRIPTION,NONE,ZEROORONE
-REQUEST,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
-REQUEST,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_dtend
-REQUEST,VEVENT,EXDATE,NONE,ZEROPLUS
-REQUEST,VEVENT,EXRULE,NONE,ZEROPLUS
-REQUEST,VEVENT,GEO,NONE,ZEROORONE
-REQUEST,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-REQUEST,VEVENT,LOCATION,NONE,ZEROORONE
-REQUEST,VEVENT,PRIORITY,NONE,ZEROORONE
-REQUEST,VEVENT,RDATE,NONE,ZEROPLUS
-REQUEST,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-REQUEST,VEVENT,RELATEDTO,NONE,ZEROPLUS
-REQUEST,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
-REQUEST,VEVENT,RESOURCES,NONE,ZEROORONE
-REQUEST,VEVENT,RRULE,NONE,ZEROPLUS
-REQUEST,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf
-REQUEST,VEVENT,TRANSP,NONE,ZEROORONE
-REQUEST,VEVENT,URL,NONE,ZEROORONE
-REQUEST,VEVENT,X,NONE,ZEROPLUS
-REQUEST,VEVENT,NONE,VALARM,ZEROPLUS
-REQUEST,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
-REQUEST,VEVENT,NONE,X,ZEROPLUS
-REQUEST,VEVENT,NONE,VFREEBUSY,ZERO
-REQUEST,VEVENT,NONE,VJOURNAL,ZERO
-REQUEST,VEVENT,NONE,VTODO,ZERO
-REPLY,VEVENT,NONE,NONE,ONEPLUS
-REPLY,VEVENT,ATTENDEE,NONE,ONE
-REPLY,VEVENT,DTSTAMP,NONE,ONE
-REPLY,VEVENT,ORGANIZER,NONE,ONE
-REPLY,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-REPLY,VEVENT,UID,NONE,ONE
-REPLY,VEVENT,SEQUENCE,NONE,ZEROORONE
-REPLY,VEVENT,ATTACH,NONE,ZEROPLUS
-REPLY,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
-REPLY,VEVENT,CLASS,NONE,ZEROORONE
-REPLY,VEVENT,COMMENT,NONE,ZEROORONE
-REPLY,VEVENT,CONTACT,NONE,ZEROPLUS
-REPLY,VEVENT,CREATED,NONE,ZEROORONE
-REPLY,VEVENT,DESCRIPTION,NONE,ZEROORONE
-REPLY,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
-REPLY,VEVENT,DTSTART,NONE,ZEROORONE
-REPLY,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_dtend
-REPLY,VEVENT,EXDATE,NONE,ZEROPLUS
-REPLY,VEVENT,EXRULE,NONE,ZEROPLUS
-REPLY,VEVENT,GEO,NONE,ZEROORONE
-REPLY,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-REPLY,VEVENT,LOCATION,NONE,ZEROORONE
-REPLY,VEVENT,PRIORITY,NONE,ZEROORONE
-REPLY,VEVENT,RDATE,NONE,ZEROPLUS
-REPLY,VEVENT,RELATEDTO,NONE,ZEROPLUS
-REPLY,VEVENT,RESOURCES,NONE,ZEROORONE
-REPLY,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
-REPLY,VEVENT,RRULE,NONE,ZEROPLUS
-REPLY,VEVENT,STATUS,NONE,ZEROORONE
-REPLY,VEVENT,SUMMARY,NONE,ZEROORONE
-REPLY,VEVENT,TRANSP,NONE,ZEROORONE
-REPLY,VEVENT,URL,NONE,ZEROORONE
-REPLY,VEVENT,X,NONE,ZEROPLUS
-REPLY,VEVENT,NONE,VTIMEZONE,ZEROORONE,must_if_tz_ref
-REPLY,VEVENT,NONE,X,ZEROPLUS
-REPLY,VEVENT,NONE,VALARM,ZERO
-REPLY,VEVENT,NONE,VFREEBUSY,ZERO
-REPLY,VEVENT,NONE,VJOURNAL,ZERO
-REPLY,VEVENT,NONE,VTODO,ZERO
-ADD,VEVENT,NONE,NONE,ONE
-ADD,VEVENT,DTSTAMP,NONE,ONE
-ADD,VEVENT,DTSTART,NONE,ONE
-ADD,VEVENT,ORGANIZER,NONE,ONE
-ADD,VEVENT,SEQUENCE,NONE,ONE
-ADD,VEVENT,SUMMARY,NONE,ONE
-ADD,VEVENT,UID,NONE,ONE
-ADD,VEVENT,ATTACH,NONE,ZEROPLUS
-ADD,VEVENT,ATTENDEE,NONE,ZEROPLUS
-ADD,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
-ADD,VEVENT,CLASS,NONE,ZEROORONE
-ADD,VEVENT,COMMENT,NONE,ZEROORONE
-ADD,VEVENT,CONTACT,NONE,ZEROPLUS
-ADD,VEVENT,CREATED,NONE,ZEROORONE
-ADD,VEVENT,DESCRIPTION,NONE,ZEROORONE
-ADD,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
-ADD,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
-ADD,VEVENT,EXDATE,NONE,ZEROPLUS
-ADD,VEVENT,EXRULE,NONE,ZEROPLUS
-ADD,VEVENT,GEO,NONE,ZEROORONE
-ADD,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-ADD,VEVENT,LOCATION,NONE,ZEROORONE
-ADD,VEVENT,PRIORITY,NONE,ZEROORONE
-ADD,VEVENT,RDATE,NONE,ZEROPLUS
-ADD,VEVENT,RELATEDTO,NONE,ZEROPLUS
-ADD,VEVENT,RESOURCES,NONE,ZEROORONE
-ADD,VEVENT,RRULE,NONE,ZEROPLUS
-ADD,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf
-ADD,VEVENT,TRANSP,NONE,ZEROORONE
-ADD,VEVENT,URL,NONE,ZEROORONE
-ADD,VEVENT,X,NONE,ZEROPLUS
-ADD,VEVENT,RECURRENCEID,NONE,ZERO,must_be_recurring
-ADD,VEVENT,REQUESTSTATUS,NONE,ZERO
-ADD,VEVENT,NONE,VALARM,ZEROPLUS
-ADD,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
-ADD,VEVENT,NONE,X,ZEROPLUS
-ADD,VEVENT,NONE,VFREEBUSY,ZERO
-ADD,VEVENT,NONE,VTODO,ZERO
-ADD,VEVENT,NONE,VJOURNAL,ZERO
-CANCEL,VEVENT,NONE,NONE,ONEPLUS
-CANCEL,VEVENT,ATTENDEE,NONE,ZEROPLUS
-CANCEL,VEVENT,DTSTAMP,NONE,ONE
-CANCEL,VEVENT,ORGANIZER,NONE,ONE
-CANCEL,VEVENT,SEQUENCE,NONE,ONE
-CANCEL,VEVENT,UID,NONE,ONE
-CANCEL,VEVENT,COMMENT,NONE,ZEROORONE
-CANCEL,VEVENT,ATTACH,NONE,ZEROPLUS
-CANCEL,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
-CANCEL,VEVENT,CLASS,NONE,ZEROORONE
-CANCEL,VEVENT,CONTACT,NONE,ZEROPLUS
-CANCEL,VEVENT,CREATED,NONE,ZEROORONE
-CANCEL,VEVENT,DESCRIPTION,NONE,ZEROORONE
-CANCEL,VEVENT,DTEND,NONE,ONEEXCLUSIVE ,no_duration
-CANCEL,VEVENT,DTSTART,NONE,ZEROORONE
-CANCEL,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
-CANCEL,VEVENT,EXDATE,NONE,ZEROPLUS
-CANCEL,VEVENT,EXRULE,NONE,ZEROPLUS
-CANCEL,VEVENT,GEO,NONE,ZEROORONE
-CANCEL,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-CANCEL,VEVENT,LOCATION,NONE,ZEROORONE
-CANCEL,VEVENT,PRIORITY,NONE,ZEROORONE
-CANCEL,VEVENT,RDATE,NONE,ZEROPLUS
-CANCEL,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-CANCEL,VEVENT,RELATEDTO,NONE,ZEROPLUS
-CANCEL,VEVENT,RESOURCES,NONE,ZEROORONE
-CANCEL,VEVENT,RRULE,NONE,ZEROPLUS
-CANCEL,VEVENT,STATUS,NONE,ZEROORONE,must_be_canceled_no_attendee
-CANCEL,VEVENT,SUMMARY,NONE,ZEROORONE
-CANCEL,VEVENT,TRANSP,NONE,ZEROORONE
-CANCEL,VEVENT,URL,NONE,ZEROORONE
-CANCEL,VEVENT,X,NONE,ZEROPLUS
-CANCEL,VEVENT,REQUESTSTATUS,NONE,ZERO
-CANCEL,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
-CANCEL,VEVENT,NONE,X,ZEROPLUS
-CANCEL,VEVENT,NONE,VTODO,ZERO
-CANCEL,VEVENT,NONE,VJOURNAL,ZERO
-CANCEL,VEVENT,NONE,VFREEBUSY,ZERO
-CANCEL,VEVENT,NONE,VALARM,ZERO
-REFRESH,VEVENT,NONE,NONE,ONE
-REFRESH,VEVENT,ATTENDEE,NONE,ONE
-REFRESH,VEVENT,DTSTAMP,NONE,ONE
-REFRESH,VEVENT,ORGANIZER,NONE,ONE
-REFRESH,VEVENT,UID,NONE,ONE
-REFRESH,VEVENT,COMMENT,NONE,ZEROORONE
-REFRESH,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-REFRESH,VEVENT,X,NONE,ZEROPLUS
-REFRESH,VEVENT,ATTACH,NONE,ZERO
-REFRESH,VEVENT,CATEGORIES,NONE,ZERO
-REFRESH,VEVENT,CLASS,NONE,ZERO
-REFRESH,VEVENT,CONTACT,NONE,ZERO
-REFRESH,VEVENT,CREATED,NONE,ZERO
-REFRESH,VEVENT,DESCRIPTION,NONE,ZERO
-REFRESH,VEVENT,DTEND,NONE,ZERO
-REFRESH,VEVENT,DTSTART,NONE,ZERO
-REFRESH,VEVENT,DURATION,NONE,ZERO
-REFRESH,VEVENT,EXDATE,NONE,ZERO
-REFRESH,VEVENT,EXRULE,NONE,ZERO
-REFRESH,VEVENT,GEO,NONE,ZERO
-REFRESH,VEVENT,LASTMODIFIED,NONE,ZERO
-REFRESH,VEVENT,LOCATION,NONE,ZERO
-REFRESH,VEVENT,PRIORITY,NONE,ZERO
-REFRESH,VEVENT,RDATE,NONE,ZERO
-REFRESH,VEVENT,RELATEDTO,NONE,ZERO
-REFRESH,VEVENT,REQUESTSTATUS,NONE,ZERO
-REFRESH,VEVENT,RESOURCES,NONE,ZERO
-REFRESH,VEVENT,RRULE,NONE,ZERO
-REFRESH,VEVENT,SEQUENCE,NONE,ZERO
-REFRESH,VEVENT,STATUS,NONE,ZERO
-REFRESH,VEVENT,SUMMARY,NONE,ZERO
-REFRESH,VEVENT,TRANSP,NONE,ZERO
-REFRESH,VEVENT,URL,NONE,ZERO
-REFRESH,VEVENT,NONE,X,ZEROPLUS
-REFRESH,VEVENT,NONE,VTODO,ZERO
-REFRESH,VEVENT,NONE,VJOURNAL,ZERO
-REFRESH,VEVENT,NONE,VFREEBUSY,ZERO
-REFRESH,VEVENT,NONE,VTIMEZONE,ZERO,must_if_tz_ref
-REFRESH,VEVENT,NONE,VALARM,ZERO
-COUNTER,VEVENT,NONE,NONE,ONE
-COUNTER,VEVENT,DTSTAMP,NONE,ONE
-COUNTER,VEVENT,DTSTART,NONE,ONE
-COUNTER,VEVENT,ORGANIZER,NONE,ONE
-COUNTER,VEVENT,SEQUENCE,NONE,ONE
-COUNTER,VEVENT,SUMMARY,NONE,ONE
-COUNTER,VEVENT,UID,NONE,ONE
-COUNTER,VEVENT,ATTACH,NONE,ZEROPLUS
-COUNTER,VEVENT,ATTENDEE,NONE,ZEROPLUS
-COUNTER,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
-COUNTER,VEVENT,CLASS,NONE,ZEROORONE
-COUNTER,VEVENT,COMMENT,NONE,ZEROORONE
-COUNTER,VEVENT,CONTACT,NONE,ZEROPLUS
-COUNTER,VEVENT,CREATED,NONE,ZEROORONE
-COUNTER,VEVENT,DESCRIPTION,NONE,ZEROORONE
-COUNTER,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
-COUNTER,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
-COUNTER,VEVENT,EXDATE,NONE,ZEROPLUS
-COUNTER,VEVENT,EXRULE,NONE,ZEROPLUS
-COUNTER,VEVENT,GEO,NONE,ZEROORONE
-COUNTER,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-COUNTER,VEVENT,LOCATION,NONE,ZEROORONE
-COUNTER,VEVENT,PRIORITY,NONE,ZEROORONE
-COUNTER,VEVENT,RDATE,NONE,ZEROPLUS
-COUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-COUNTER,VEVENT,RELATEDTO,NONE,ZEROPLUS
-COUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
-COUNTER,VEVENT,RESOURCES,NONE,ZEROORONE
-COUNTER,VEVENT,RRULE,NONE,ZEROPLUS
-COUNTER,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf_cancel
-COUNTER,VEVENT,TRANSP,NONE,ZEROORONE
-COUNTER,VEVENT,URL,NONE,ZEROORONE
-COUNTER,VEVENT,X,NONE,ZEROPLUS
-COUNTER,VEVENT,NONE,VALARM,ZEROPLUS
-COUNTER,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
-COUNTER,VEVENT,NONE,X,ZEROPLUS
-COUNTER,VEVENT,NONE,VTODO,ZERO
-COUNTER,VEVENT,NONE,VJOURNAL,ZERO
-COUNTER,VEVENT,NONE,VFREEBUSY,ZERO
-DECLINECOUNTER,VEVENT,NONE,NONE,ONE
-DECLINECOUNTER,VEVENT,DTSTAMP,NONE,ONE
-DECLINECOUNTER,VEVENT,ORGANIZER,NONE,ONE
-DECLINECOUNTER,VEVENT,UID,NONE,ONE
-DECLINECOUNTER,VEVENT,COMMENT,NONE,ZEROORONE
-DECLINECOUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-DECLINECOUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
-DECLINECOUNTER,VEVENT,SEQUENCE,NONE,ZERO
-DECLINECOUNTER,VEVENT,X,NONE,ZEROPLUS
-DECLINECOUNTER,VEVENT,ATTACH,NONE,ZERO
-DECLINECOUNTER,VEVENT,ATTENDEE,NONE,ZERO
-DECLINECOUNTER,VEVENT,CATEGORIES,NONE,ZERO
-DECLINECOUNTER,VEVENT,CLASS,NONE,ZERO
-DECLINECOUNTER,VEVENT,CONTACT,NONE,ZERO
-DECLINECOUNTER,VEVENT,CREATED,NONE,ZERO
-DECLINECOUNTER,VEVENT,DESCRIPTION,NONE,ZERO
-DECLINECOUNTER,VEVENT,DTEND,NONE,ZERO
-DECLINECOUNTER,VEVENT,DTSTART,NONE,ZERO
-DECLINECOUNTER,VEVENT,DURATION,NONE,ZERO
-DECLINECOUNTER,VEVENT,EXDATE,NONE,ZERO
-DECLINECOUNTER,VEVENT,EXRULE,NONE,ZERO
-DECLINECOUNTER,VEVENT,GEO,NONE,ZERO
-DECLINECOUNTER,VEVENT,LASTMODIFIED,NONE,ZERO
-DECLINECOUNTER,VEVENT,LOCATION,NONE,ZERO
-DECLINECOUNTER,VEVENT,PRIORITY,NONE,ZERO
-DECLINECOUNTER,VEVENT,RDATE,NONE,ZERO
-DECLINECOUNTER,VEVENT,RELATEDTO,NONE,ZERO
-DECLINECOUNTER,VEVENT,RESOURCES,NONE,ZERO
-DECLINECOUNTER,VEVENT,RRULE,NONE,ZERO
-DECLINECOUNTER,VEVENT,STATUS,NONE,ZERO
-DECLINECOUNTER,VEVENT,SUMMARY,NONE,ZERO
-DECLINECOUNTER,VEVENT,TRANSP,NONE,ZERO
-DECLINECOUNTER,VEVENT,URL,NONE,ZERO
-DECLINECOUNTER,VEVENT,NONE,X,ZEROPLUS
-DECLINECOUNTER,VEVENT,NONE,VTODO,ZERO
-DECLINECOUNTER,VEVENT,NONE,VJOURNAL,ZERO
-DECLINECOUNTER,VEVENT,NONE,VFREEBUSY,ZERO
-DECLINECOUNTER,VEVENT,NONE,VTIMEZONE,ZERO,must_if_tz_ref
-DECLINECOUNTER,VEVENT,NONE,VALARM,ZERO
-PUBLISH,VFREEBUSY,NONE,NONE,ONEPLUS
-PUBLISH,VFREEBUSY,DTSTAMP,NONE,ONE
-PUBLISH,VFREEBUSY,DTSTART,NONE,ONE
-PUBLISH,VFREEBUSY,DTEND,NONE,ONE
-PUBLISH,VFREEBUSY,FREEBUSY,NONE,ONEPLUS
-PUBLISH,VFREEBUSY,ORGANIZER,NONE,ONE
-PUBLISH,VFREEBUSY,COMMENT,NONE,ZEROORONE
-PUBLISH,VFREEBUSY,CONTACT,NONE,ZEROPLUS
-PUBLISH,VFREEBUSY,X,NONE,ZEROPLUS
-PUBLISH,VFREEBUSY,URL,NONE,ZEROORONE
-PUBLISH,VFREEBUSY,ATTENDEE,NONE,ZERO
-PUBLISH,VFREEBUSY,DURATION,NONE,ZERO
-PUBLISH,VFREEBUSY,REQUESTSTATUS,NONE,ZERO
-PUBLISH,VFREEBUSY,UID,NONE,ZERO
-PUBLISH,VFREEBUSY,NONE,X,ZEROPLUS
-PUBLISH,VFREEBUSY,NONE,VEVENT,ZERO
-PUBLISH,VFREEBUSY,NONE,VTODO,ZERO
-PUBLISH,VFREEBUSY,NONE,VJOURNAL,ZERO
-PUBLISH,VFREEBUSY,NONE,VTIMEZONE,ZERO,must_if_tz_ref
-PUBLISH,VFREEBUSY,NONE,VALARM,ZERO
-REQUEST,VFREEBUSY,NONE,NONE,ONE
-REQUEST,VFREEBUSY,ATTENDEE,NONE,ONEPLUS
-REQUEST,VFREEBUSY,DTEND,NONE,ONE
-REQUEST,VFREEBUSY,DTSTAMP,NONE,ONE
-REQUEST,VFREEBUSY,DTSTART,NONE,ONE
-REQUEST,VFREEBUSY,ORGANIZER,NONE,ONE
-REQUEST,VFREEBUSY,UID,NONE,ONE
-REQUEST,VFREEBUSY,COMMENT,NONE,ZEROORONE
-REQUEST,VFREEBUSY,CONTACT,NONE,ZEROPLUS
-REQUEST,VFREEBUSY,X,NONE,ZEROPLUS
-REQUEST,VFREEBUSY,FREEBUSY,NONE,ZERO
-REQUEST,VFREEBUSY,DURATION,NONE,ZERO
-REQUEST,VFREEBUSY,REQUESTSTATUS,NONE,ZERO
-REQUEST,VFREEBUSY,URL,NONE,ZERO
-REQUEST,VFREEBUSY,NONE,X,ZEROPLUS
-REQUEST,VFREEBUSY,NONE,VALARM,ZERO
-REQUEST,VFREEBUSY,NONE,VEVENT,ZERO
-REQUEST,VFREEBUSY,NONE,VTODO,ZERO
-REQUEST,VFREEBUSY,NONE,VJOURNAL,ZERO
-REQUEST,VFREEBUSY,NONE,VTIMEZONE,ZERO
-REPLY,VFREEBUSY,NONE,NONE,ONE
-REPLY,VFREEBUSY,ATTENDEE,NONE,ONE
-REPLY,VFREEBUSY,DTSTAMP,NONE,ONE
-REPLY,VFREEBUSY,DTEND,NONE,ONE
-REPLY,VFREEBUSY,DTSTART,NONE,ONE
-REPLY,VFREEBUSY,FREEBUSY,NONE,ONEPLUS
-REPLY,VFREEBUSY,ORGANIZER,NONE,ONE
-REPLY,VFREEBUSY,UID,NONE,ONE
-REPLY,VFREEBUSY,COMMENT,NONE,ZEROORONE
-REPLY,VFREEBUSY,CONTACT,NONE,ZEROPLUS
-REPLY,VFREEBUSY,REQUESTSTATUS,NONE,ZEROPLUS
-REPLY,VFREEBUSY,URL,NONE,ZEROORONE
-REPLY,VFREEBUSY,X,NONE,ZEROPLUS
-REPLY,VFREEBUSY,DURATION,NONE,ZERO
-REPLY,VFREEBUSY,SEQUENCE,NONE,ZERO
-REPLY,VFREEBUSY,NONE,X,ZEROPLUS
-REPLY,VFREEBUSY,NONE,VALARM,ZERO
-REPLY,VFREEBUSY,NONE,VEVENT,ZERO
-REPLY,VFREEBUSY,NONE,VTODO,ZERO
-REPLY,VFREEBUSY,NONE,VJOURNAL,ZERO
-REPLY,VFREEBUSY,NONE,VTIMEZONE,ZERO
-PUBLISH,VTODO,NONE,NONE,ONEPLUS
-PUBLISH,VTODO,DTSTAMP,NONE,ONE
-PUBLISH,VTODO,DTSTART,NONE,ONE
-PUBLISH,VTODO,ORGANIZER,NONE,ONE
-PUBLISH,VTODO,PRIORITY,NONE,ONE
-PUBLISH,VTODO,SEQUENCE,NONE,ZEROORONE
-PUBLISH,VTODO,SUMMARY,NONE,ONE
-PUBLISH,VTODO,UID,NONE,ONE
-PUBLISH,VTODO,ATTACH,NONE,ZEROPLUS
-PUBLISH,VTODO,CATEGORIES,NONE,ZEROPLUS #Non-Standard
-PUBLISH,VTODO,CLASS,NONE,ZEROORONE
-PUBLISH,VTODO,COMMENT,NONE,ZEROORONE
-PUBLISH,VTODO,CONTACT,NONE,ZEROPLUS
-PUBLISH,VTODO,CREATED,NONE,ZEROORONE
-PUBLISH,VTODO,DESCRIPTION,NONE,ZEROORONE
-PUBLISH,VTODO,DUE,NONE,ZEROORONE
-PUBLISH,VTODO,DURATION,NONE,ZEROORONE
-PUBLISH,VTODO,EXDATE,NONE,ZEROPLUS
-PUBLISH,VTODO,EXRULE,NONE,ZEROPLUS
-PUBLISH,VTODO,GEO,NONE,ZEROORONE
-PUBLISH,VTODO,LASTMODIFIED,NONE,ZEROORONE
-PUBLISH,VTODO,LOCATION,NONE,ZEROORONE
-PUBLISH,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-PUBLISH,VTODO,RDATE,NONE,ZEROPLUS
-PUBLISH,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-PUBLISH,VTODO,RELATEDTO,NONE,ZEROPLUS
-PUBLISH,VTODO,RESOURCES,NONE,ZEROORONE
-PUBLISH,VTODO,RRULE,NONE,ZEROPLUS
-PUBLISH,VTODO,STATUS,NONE,ZEROORONE
-PUBLISH,VTODO,URL,NONE,ZEROORONE
-PUBLISH,VTODO,X,NONE,ZEROPLUS
-PUBLISH,VTODO,ATTENDEE,NONE,ZERO
-PUBLISH,VTODO,REQUESTSTATUS,NONE,ZERO
-PUBLISH,VTODO,NONE,VTIMEZONE,ZEROPLUS
-PUBLISH,VTODO,NONE,VALARM,ZEROPLUS
-PUBLISH,VTODO,NONE,X,ZEROPLUS
-PUBLISH,VTODO,NONE,VFREEBUSY,ZERO
-PUBLISH,VTODO,NONE,VEVENT,ZERO
-PUBLISH,VTODO,NONE,VJOURNAL,ZERO
-REQUEST,VTODO,NONE,NONE,ONEPLUS
-REQUEST,VTODO,ATTENDEE,NONE,ONEPLUS
-REQUEST,VTODO,DTSTAMP,NONE,ONE
-REQUEST,VTODO,DTSTART,NONE,ONE
-REQUEST,VTODO,ORGANIZER,NONE,ONE
-REQUEST,VTODO,PRIORITY,NONE,ONE
-REQUEST,VTODO,SEQUENCE,NONE,ZEROORONE
-REQUEST,VTODO,SUMMARY,NONE,ONE
-REQUEST,VTODO,UID,NONE,ONE
-REQUEST,VTODO,ATTACH,NONE,ZEROPLUS
-REQUEST,VTODO,CATEGORIES,NONE,ZEROPLUS #Non-Standard
-REQUEST,VTODO,CLASS,NONE,ZEROORONE
-REQUEST,VTODO,COMMENT,NONE,ZEROORONE
-REQUEST,VTODO,CONTACT,NONE,ZEROPLUS
-REQUEST,VTODO,CREATED,NONE,ZEROORONE
-REQUEST,VTODO,DESCRIPTION,NONE,ZEROORONE
-REQUEST,VTODO,DUE,NONE,ZEROORONE
-REQUEST,VTODO,DURATION,NONE,ZEROORONE
-REQUEST,VTODO,EXDATE,NONE,ZEROPLUS
-REQUEST,VTODO,EXRULE,NONE,ZEROPLUS
-REQUEST,VTODO,GEO,NONE,ZEROORONE
-REQUEST,VTODO,LASTMODIFIED,NONE,ZEROORONE
-REQUEST,VTODO,LOCATION,NONE,ZEROORONE
-REQUEST,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-REQUEST,VTODO,RDATE,NONE,ZEROPLUS
-REQUEST,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-REQUEST,VTODO,RELATEDTO,NONE,ZEROPLUS
-REQUEST,VTODO,RESOURCES,NONE,ZEROORONE
-REQUEST,VTODO,RRULE,NONE,ZEROPLUS
-REQUEST,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process
-REQUEST,VTODO,URL,NONE,ZEROORONE
-REQUEST,VTODO,X,NONE,ZEROPLUS
-REQUEST,VTODO,REQUESTSTATUS,NONE,ZERO
-REQUEST,VTODO,NONE,VALARM,ZEROPLUS
-REQUEST,VTODO,NONE,VTIMEZONE,ZEROPLUS
-REQUEST,VTODO,NONE,X,ZEROPLUS
-REQUEST,VTODO,NONE,VEVENT,ZERO
-REQUEST,VTODO,NONE,VFREEBUSY,ZERO
-REQUEST,VTODO,NONE,VJOURNAL,ZERO
-REPLY,VTODO,NONE,NONE,ONEPLUS
-REPLY,VTODO,ATTENDEE,NONE,ONEPLUS
-REPLY,VTODO,DTSTAMP,NONE,ONE
-REPLY,VTODO,ORGANIZER,NONE,ONE
-REPLY,VTODO,REQUESTSTATUS,NONE,ONEPLUS
-REPLY,VTODO,UID,NONE,ONE
-REPLY,VTODO,ATTACH,NONE,ZEROPLUS
-REPLY,VTODO,CATEGORIES,NONE,ZEROPLUS #Non-Standard
-REPLY,VTODO,CLASS,NONE,ZEROORONE
-REPLY,VTODO,COMMENT,NONE,ZEROORONE
-REPLY,VTODO,CONTACT,NONE,ZEROPLUS
-REPLY,VTODO,CREATED,NONE,ZEROORONE
-REPLY,VTODO,DESCRIPTION,NONE,ZEROORONE
-REPLY,VTODO,DTSTART,NONE,ZEROORONE
-REPLY,VTODO,DUE,NONE,ZEROORONE
-REPLY,VTODO,DURATION,NONE,ZEROORONE
-REPLY,VTODO,EXDATE,NONE,ZEROPLUS
-REPLY,VTODO,EXRULE,NONE,ZEROPLUS
-REPLY,VTODO,GEO,NONE,ZEROORONE
-REPLY,VTODO,LASTMODIFIED,NONE,ZEROORONE
-REPLY,VTODO,LOCATION,NONE,ZEROORONE
-REPLY,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-REPLY,VTODO,PRIORITY,NONE,ZEROORONE
-REPLY,VTODO,RDATE,NONE,ZEROPLUS
-REPLY,VTODO,RELATEDTO,NONE,ZEROPLUS
-REPLY,VTODO,RESOURCES,NONE,ZEROORONE
-REPLY,VTODO,RRULE,NONE,ZEROPLUS
-REPLY,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-REPLY,VTODO,SEQUENCE,NONE,ZEROORONE
-REPLY,VTODO,STATUS,NONE,ZEROORONE
-REPLY,VTODO,SUMMARY,NONE,ZEROORONE
-REPLY,VTODO,URL,NONE,ZEROORONE
-REPLY,VTODO,X,NONE,ZEROPLUS
-REPLY,VTODO,NONE,VTIMEZONE,ZEROORONE
-REPLY,VTODO,NONE,X,ZEROPLUS
-REPLY,VTODO,NONE,VALARM,ZERO
-REPLY,VTODO,NONE,VEVENT,ZERO
-REPLY,VTODO,NONE,VFREEBUSY,ZERO
-ADD,VTODO,NONE,NONE,ONE
-ADD,VTODO,DTSTAMP,NONE,ONE
-ADD,VTODO,ORGANIZER,NONE,ONE
-ADD,VTODO,PRIORITY,NONE,ONE
-ADD,VTODO,SEQUENCE,NONE,ONE
-ADD,VTODO,SUMMARY,NONE,ONE
-ADD,VTODO,UID,NONE,ONE
-ADD,VTODO,ATTACH,NONE,ZEROPLUS
-ADD,VTODO,ATTENDEE,NONE,ZEROPLUS
-ADD,VTODO,CATEGORIES,NONE,ZEROPLUS
-ADD,VTODO,CLASS,NONE,ZEROORONE
-ADD,VTODO,COMMENT,NONE,ZEROORONE
-ADD,VTODO,CONTACT,NONE,ZEROPLUS
-ADD,VTODO,CREATED,NONE,ZEROORONE
-ADD,VTODO,DESCRIPTION,NONE,ZEROORONE
-ADD,VTODO,DTSTART,NONE,ZEROORONE
-ADD,VTODO,DUE,NONE,ZEROORONE
-ADD,VTODO,DURATION,NONE,ZEROORONE
-ADD,VTODO,EXDATE,NONE,ZEROPLUS
-ADD,VTODO,EXRULE,NONE,ZEROPLUS
-ADD,VTODO,GEO,NONE,ZEROORONE
-ADD,VTODO,LASTMODIFIED,NONE,ZEROORONE
-ADD,VTODO,LOCATION,NONE,ZEROORONE
-ADD,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-ADD,VTODO,RDATE,NONE,ZEROPLUS
-ADD,VTODO,RELATEDTO,NONE,ZEROPLUS
-ADD,VTODO,RESOURCES,NONE,ZEROORONE
-ADD,VTODO,RRULE,NONE,ZEROPLUS
-ADD,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process
-ADD,VTODO,URL,NONE,ZEROORONE
-ADD,VTODO,X,NONE,ZEROPLUS
-ADD,VTODO,RECURRENCEID,NONE,ZERO,must_be_recurring
-ADD,VTODO,REQUESTSTATUS,NONE,ZERO
-ADD,VTODO,NONE,VALARM,ZEROPLUS
-ADD,VTODO,NONE,VTIMEZONE,ZEROPLUS
-ADD,VTODO,NONE,X,ZEROPLUS
-ADD,VTODO,NONE,VEVENT,ZERO
-ADD,VTODO,NONE,VJOURNAL,ZERO
-ADD,VTODO,NONE,VFREEBUSY,ZERO
-CANCEL,VTODO,NONE,NONE,ONE
-CANCEL,VTODO,ATTENDEE,NONE,ZEROPLUS
-CANCEL,VTODO,UID,NONE,ONE
-CANCEL,VTODO,DTSTAMP,NONE,ONE
-CANCEL,VTODO,ORGANIZER,NONE,ONE
-CANCEL,VTODO,SEQUENCE,NONE,ONE
-CANCEL,VTODO,ATTACH,NONE,ZEROPLUS
-CANCEL,VTODO,CATEGORIES,NONE,ZEROPLUS #Non-Standard
-CANCEL,VTODO,CLASS,NONE,ZEROORONE
-CANCEL,VTODO,COMMENT,NONE,ZEROORONE
-CANCEL,VTODO,CONTACT,NONE,ZEROPLUS
-CANCEL,VTODO,CREATED,NONE,ZEROORONE
-CANCEL,VTODO,DESCRIPTION,NONE,ZEROORONE
-CANCEL,VTODO,DTSTART,NONE,ZEROORONE
-CANCEL,VTODO,DUE,NONE,ZEROORONE
-CANCEL,VTODO,DURATION,NONE,ZEROORONE
-CANCEL,VTODO,EXDATE,NONE,ZEROPLUS
-CANCEL,VTODO,EXRULE,NONE,ZEROPLUS
-CANCEL,VTODO,GEO,NONE,ZEROORONE
-CANCEL,VTODO,LASTMODIFIED,NONE,ZEROORONE
-CANCEL,VTODO,LOCATION,NONE,ZEROORONE
-CANCEL,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-CANCEL,VTODO,RDATE,NONE,ZEROPLUS
-CANCEL,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-CANCEL,VTODO,RELATEDTO,NONE,ZEROPLUS
-CANCEL,VTODO,RESOURCES,NONE,ZEROORONE
-CANCEL,VTODO,RRULE,NONE,ZEROPLUS
-CANCEL,VTODO,PRIORITY,NONE,ZEROORONE
-CANCEL,VTODO,STATUS,NONE,ZEROORONE,must_be_canceled_no_attendee
-CANCEL,VTODO,URL,NONE,ZEROORONE
-CANCEL,VTODO,X,NONE,ZEROPLUS
-CANCEL,VTODO,REQUESTSTATUS,NONE,ZERO
-CANCEL,VTODO,NONE,VTIMEZONE,ZEROORONE
-CANCEL,VTODO,NONE,X,ZEROPLUS
-CANCEL,VTODO,NONE,VALARM,ZERO
-CANCEL,VTODO,NONE,VEVENT,ZERO
-CANCEL,VTODO,NONE,VFREEBUSY,ZERO
-REFRESH,VTODO,NONE,NONE,ONE
-REFRESH,VTODO,ATTENDEE,NONE,ONE
-REFRESH,VTODO,DTSTAMP,NONE,ONE
-REFRESH,VTODO,UID,NONE,ONE
-REFRESH,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-REFRESH,VTODO,X,NONE,ZEROPLUS
-REFRESH,VTODO,ATTACH,NONE,ZERO
-REFRESH,VTODO,CATEGORIES,NONE,ZERO
-REFRESH,VTODO,CLASS,NONE,ZERO
-REFRESH,VTODO,COMMENT,NONE,ZERO
-REFRESH,VTODO,CONTACT,NONE,ZERO
-REFRESH,VTODO,CREATED,NONE,ZERO
-REFRESH,VTODO,DESCRIPTION,NONE,ZERO
-REFRESH,VTODO,DTSTART,NONE,ZERO
-REFRESH,VTODO,DUE,NONE,ZERO
-REFRESH,VTODO,DURATION,NONE,ZERO
-REFRESH,VTODO,EXDATE,NONE,ZERO
-REFRESH,VTODO,EXRULE,NONE,ZERO
-REFRESH,VTODO,GEO,NONE,ZERO
-REFRESH,VTODO,LASTMODIFIED,NONE,ZERO
-REFRESH,VTODO,LOCATION,NONE,ZERO
-REFRESH,VTODO,ORGANIZER,NONE,ZERO
-REFRESH,VTODO,PERCENTCOMPLETE,NONE,ZERO
-REFRESH,VTODO,PRIORITY,NONE,ZERO
-REFRESH,VTODO,RDATE,NONE,ZERO
-REFRESH,VTODO,RELATEDTO,NONE,ZERO
-REFRESH,VTODO,REQUESTSTATUS,NONE,ZERO
-REFRESH,VTODO,RESOURCES,NONE,ZERO
-REFRESH,VTODO,RRULE,NONE,ZERO
-REFRESH,VTODO,SEQUENCE,NONE,ZERO
-REFRESH,VTODO,STATUS,NONE,ZERO
-REFRESH,VTODO,URL,NONE,ZERO
-REFRESH,VTODO,NONE,X,ZEROPLUS
-REFRESH,VTODO,NONE,VALARM,ZERO
-REFRESH,VTODO,NONE,VEVENT,ZERO
-REFRESH,VTODO,NONE,VFREEBUSY,ZERO
-REFRESH,VTODO,NONE,VTIMEZONE,ZERO
-COUNTER,VTODO,NONE,NONE,ONE
-COUNTER,VTODO,ATTENDEE,NONE,ONEPLUS
-COUNTER,VTODO,DTSTAMP,NONE,ONE
-COUNTER,VTODO,ORGANIZER,NONE,ONE
-COUNTER,VTODO,PRIORITY,NONE,ONE
-COUNTER,VTODO,SUMMARY,NONE,ONE
-COUNTER,VTODO,UID,NONE,ONE
-COUNTER,VTODO,ATTACH,NONE,ZEROPLUS
-COUNTER,VTODO,CATEGORIES,NONE,ZEROPLUS #Non-standard
-COUNTER,VTODO,CLASS,NONE,ZEROORONE
-COUNTER,VTODO,COMMENT,NONE,ZEROORONE
-COUNTER,VTODO,CONTACT,NONE,ZEROPLUS
-COUNTER,VTODO,CREATED,NONE,ZEROORONE
-COUNTER,VTODO,DESCRIPTION,NONE,ZEROORONE
-COUNTER,VTODO,DTSTART,NONE,ZEROORONE
-COUNTER,VTODO,DUE,NONE,ZEROORONE
-COUNTER,VTODO,DURATION,NONE,ZEROORONE
-COUNTER,VTODO,EXDATE,NONE,ZEROPLUS
-COUNTER,VTODO,EXRULE,NONE,ZEROPLUS
-COUNTER,VTODO,GEO,NONE,ZEROORONE
-COUNTER,VTODO,LASTMODIFIED,NONE,ZEROORONE
-COUNTER,VTODO,LOCATION,NONE,ZEROORONE
-COUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-COUNTER,VTODO,RDATE,NONE,ZEROPLUS
-COUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-COUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS
-COUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS
-COUNTER,VTODO,RESOURCES,NONE,ZEROORONE
-COUNTER,VTODO,RRULE,NONE,ZEROORONE
-COUNTER,VTODO,SEQUENCE,NONE,ZEROORONE
-COUNTER,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process
-COUNTER,VTODO,URL,NONE,ZEROORONE
-COUNTER,VTODO,X,NONE,ZEROPLUS
-COUNTER,VTODO,NONE,VALARM,ZEROPLUS
-COUNTER,VTODO,NONE,VTIMEZONE,ZEROORONE
-COUNTER,VTODO,NONE,X,ZEROPLUS
-COUNTER,VTODO,NONE,VEVENT,ZERO
-COUNTER,VTODO,NONE,VFREEBUSY,ZERO
-DECLINECOUNTER,VTODO,NONE,NONE,ONE
-DECLINECOUNTER,VTODO,ATTENDEE,NONE,ONEPLUS
-DECLINECOUNTER,VTODO,DTSTAMP,NONE,ONE
-DECLINECOUNTER,VTODO,ORGANIZER,NONE,ONE
-DECLINECOUNTER,VTODO,SEQUENCE,NONE,ONE
-DECLINECOUNTER,VTODO,UID,NONE,ONE
-DECLINECOUNTER,VTODO,ATTACH,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,CATEGORIES,NONE,ZEROPLUS #Non-standard
-DECLINECOUNTER,VTODO,CLASS,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,COMMENT,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,CONTACT,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,CREATED,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,DESCRIPTION,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,DTSTART,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,DUE,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,DURATION,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,EXDATE,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,EXRULE,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,GEO,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,LASTMODIFIED,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,LOCATION,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,PRIORITY,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,RDATE,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-DECLINECOUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,RESOURCES,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,RRULE,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,STATUS,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,URL,NONE,ZEROORONE
-DECLINECOUNTER,VTODO,X,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,NONE,VTIMEZONE,ZEROPLUS
-DECLINECOUNTER,VTODO,NONE,X,ZEROPLUS
-DECLINECOUNTER,VTODO,NONE,VALARM,ZERO
-DECLINECOUNTER,VTODO,NONE,VEVENT,ZERO
-DECLINECOUNTER,VTODO,NONE,VFREEBUSY,ZERO
-PUBLISH,VJOURNAL,NONE,NONE,ONEPLUS
-PUBLISH,VJOURNAL,DESCRIPTION,NONE,ONE
-PUBLISH,VJOURNAL,DTSTAMP,NONE,ONE
-PUBLISH,VJOURNAL,DTSTART,NONE,ONE
-PUBLISH,VJOURNAL,ORGANIZER,NONE,ONE
-PUBLISH,VJOURNAL,UID,NONE,ONE
-PUBLISH,VJOURNAL,ATTACH,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,CATEGORIES,NONE,ZEROPLUS #Non-standard
-PUBLISH,VJOURNAL,CLASS,NONE,ZEROORONE
-PUBLISH,VJOURNAL,COMMENT,NONE,ZEROORONE
-PUBLISH,VJOURNAL,CONTACT,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,CREATED,NONE,ZEROORONE
-PUBLISH,VJOURNAL,EXDATE,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,EXRULE,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE
-PUBLISH,VJOURNAL,RDATE,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-PUBLISH,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,RRULE,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,SEQUENCE,NONE,ZEROORONE
-PUBLISH,VJOURNAL,STATUS,NONE,ZEROORONE,may_be_draft_final_canceled
-PUBLISH,VJOURNAL,SUMMARY,NONE,ZEROORONE
-PUBLISH,VJOURNAL,URL,NONE,ZEROORONE
-PUBLISH,VJOURNAL,X,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,ATTENDEE,NONE,ZERO
-PUBLISH,VJOURNAL,NONE,VALARM,ZEROPLUS
-PUBLISH,VJOURNAL,NONE,VTIMEZONE,ZEROPLUS
-PUBLISH,VJOURNAL,NONE,X,ZEROPLUS
-PUBLISH,VJOURNAL,NONE,VEVENT,ZERO
-PUBLISH,VJOURNAL,NONE,VFREEBUSY,ZERO
-PUBLISH,VJOURNAL,NONE,VTODO,ZERO
-ADD,VJOURNAL,NONE,NONE,ONE
-ADD,VJOURNAL,DESCRIPTION,NONE,ONE
-ADD,VJOURNAL,DTSTAMP,NONE,ONE
-ADD,VJOURNAL,DTSTART,NONE,ONE
-ADD,VJOURNAL,ORGANIZER,NONE,ONE
-ADD,VJOURNAL,SEQUENCE,NONE,ONE
-ADD,VJOURNAL,UID,NONE,ONE
-ADD,VJOURNAL,ATTACH,NONE,ZEROPLUS
-ADD,VJOURNAL,CATEGORIES,NONE,ZEROPLUS #Non-standard
-ADD,VJOURNAL,CLASS,NONE,ZEROORONE
-ADD,VJOURNAL,COMMENT,NONE,ZEROORONE
-ADD,VJOURNAL,CONTACT,NONE,ZEROPLUS
-ADD,VJOURNAL,CREATED,NONE,ZEROORONE
-ADD,VJOURNAL,EXDATE,NONE,ZEROPLUS
-ADD,VJOURNAL,EXRULE,NONE,ZEROPLUS
-ADD,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE
-ADD,VJOURNAL,RDATE,NONE,ZEROPLUS
-ADD,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
-ADD,VJOURNAL,RRULE,NONE,ZEROPLUS
-ADD,VJOURNAL,STATUS,NONE,ZEROORONE
-ADD,VJOURNAL,SUMMARY,NONE,ZEROORONE
-ADD,VJOURNAL,URL,NONE,ZEROORONE
-ADD,VJOURNAL,X,NONE,ZEROPLUS
-ADD,VJOURNAL,ATTENDEE,NONE,ZERO
-ADD,VJOURNAL,RECURRENCEID,NONE,ZERO
-ADD,VJOURNAL,NONE,VALARM,ZEROPLUS
-ADD,VJOURNAL,NONE,VTIMEZONE,ZEROORONE
-ADD,VJOURNAL,NONE,X,ZEROPLUS
-ADD,VJOURNAL,NONE,VEVENT,ZERO
-ADD,VJOURNAL,NONE,VFREEBUSY,ZERO
-ADD,VJOURNAL,NONE,VTODO,ZERO
-CANCEL,VJOURNAL,NONE,NONE,ONEPLUS
-CANCEL,VJOURNAL,DTSTAMP,NONE,ONE
-CANCEL,VJOURNAL,ORGANIZER,NONE,ONE
-CANCEL,VJOURNAL,SEQUENCE,NONE,ONE
-CANCEL,VJOURNAL,UID,NONE,ONE
-CANCEL,VJOURNAL,ATTACH,NONE,ZEROPLUS
-CANCEL,VJOURNAL,ATTENDEE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,CATEGORIES,NONE,ZEROPLUS #Non-standard
-CANCEL,VJOURNAL,CLASS,NONE,ZEROORONE
-CANCEL,VJOURNAL,COMMENT,NONE,ZEROORONE
-CANCEL,VJOURNAL,CONTACT,NONE,ZEROPLUS
-CANCEL,VJOURNAL,CREATED,NONE,ZEROORONE
-CANCEL,VJOURNAL,DESCRIPTION,NONE,ZEROORONE
-CANCEL,VJOURNAL,DTSTART,NONE,ZEROORONE
-CANCEL,VJOURNAL,EXDATE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,EXRULE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE
-CANCEL,VJOURNAL,RDATE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-CANCEL,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
-CANCEL,VJOURNAL,RRULE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,STATUS,NONE,ZEROORONE,must_be_cancel_if_present
-CANCEL,VJOURNAL,SUMMARY,NONE,ZEROORONE
-CANCEL,VJOURNAL,URL,NONE,ZEROORONE
-CANCEL,VJOURNAL,X,NONE,ZEROPLUS
-CANCEL,VJOURNAL,REQUESTSTATUS,NONE,ZERO
-CANCEL,VJOURNAL,NONE,VTIMEZONE,ZEROPLUS
-CANCEL,VJOURNAL,NONE,X,ZEROPLUS
-CANCEL,VJOURNAL,NONE,VALARM,ZERO
-CANCEL,VJOURNAL,NONE,VEVENT,ZERO
-CANCEL,VJOURNAL,NONE,VFREEBUSY,ZERO
-CANCEL,VJOURNAL,NONE,VTODO,ZERO
-NONE,VCALENDAR,ACTION,NONE,ZERO
-NONE,VCALENDAR,ATTACH,NONE,ZERO
-NONE,VCALENDAR,ATTENDEE,NONE,ZERO
-NONE,VCALENDAR,CALSCALE,NONE,ZEROORONE
-NONE,VCALENDAR,CATEGORIES,NONE,ZERO
-NONE,VCALENDAR,CLASS,NONE,ZERO
-NONE,VCALENDAR,COMMENT,NONE,ZERO
-NONE,VCALENDAR,COMPLETED,NONE,ZERO
-NONE,VCALENDAR,CONTACT,NONE,ZERO
-NONE,VCALENDAR,CREATED,NONE,ZERO
-NONE,VCALENDAR,DESCRIPTION,NONE,ZERO
-NONE,VCALENDAR,DTEND,NONE,ZERO
-NONE,VCALENDAR,DTSTAMP,NONE,ZERO
-NONE,VCALENDAR,DTSTART,NONE,ZERO
-NONE,VCALENDAR,DUE,NONE,ZERO
-NONE,VCALENDAR,DURATION,NONE,ZERO
-NONE,VCALENDAR,EXDATE,NONE,ZERO
-NONE,VCALENDAR,EXRULE,NONE,ZERO
-NONE,VCALENDAR,FREEBUSY,NONE,ZERO
-NONE,VCALENDAR,GEO,NONE,ZERO
-NONE,VCALENDAR,LASTMODIFIED,NONE,ZERO
-NONE,VCALENDAR,LOCATION,NONE,ZERO
-NONE,VCALENDAR,METHOD,NONE,ZEROORONE
-NONE,VCALENDAR,ORGANIZER,NONE,ZERO
-NONE,VCALENDAR,PERCENTCOMPLETE,NONE,ZERO
-NONE,VCALENDAR,PRIORITY,NONE,ZERO
-NONE,VCALENDAR,PRODID,NONE,ONE
-NONE,VCALENDAR,RDATE,NONE,ZERO
-NONE,VCALENDAR,RECURRENCEID,NONE,ZERO
-NONE,VCALENDAR,RELATEDTO,NONE,ZERO
-NONE,VCALENDAR,REPEAT,NONE,ZERO
-NONE,VCALENDAR,REQUESTSTATUS,NONE,ZERO
-NONE,VCALENDAR,RESOURCES,NONE,ZERO
-NONE,VCALENDAR,RRULE,NONE,ZERO
-NONE,VCALENDAR,SEQUENCE,NONE,ZERO
-NONE,VCALENDAR,STATUS,NONE,ZERO
-NONE,VCALENDAR,SUMMARY,NONE,ZERO
-NONE,VCALENDAR,TRANSP,NONE,ZERO
-NONE,VCALENDAR,TRIGGER,NONE,ZERO
-NONE,VCALENDAR,TZID,NONE,ZERO
-NONE,VCALENDAR,TZNAME,NONE,ZERO
-NONE,VCALENDAR,TZOFFSETFROM,NONE,ZERO
-NONE,VCALENDAR,TZOFFSETTO,NONE,ZERO
-NONE,VCALENDAR,TZURL,NONE,ZERO
-NONE,VCALENDAR,UID,NONE,ZERO
-NONE,VCALENDAR,URL,NONE,ZERO
-NONE,VCALENDAR,VERSION,NONE,ONE
-NONE,VCALENDAR,X,NONE,ZEROPLUS
-NONE,VEVENT,ACTION,NONE,ZERO
-NONE,VEVENT,ATTACH,NONE,ZEROPLUS
-NONE,VEVENT,ATTENDEE,NONE,ZEROPLUS
-NONE,VEVENT,CALSCALE,NONE,ZERO
-NONE,VEVENT,CATEGORIES,NONE,ZEROPLUS
-NONE,VEVENT,CLASS,NONE,ZEROORONE
-NONE,VEVENT,COMMENT,NONE,ZEROPLUS
-NONE,VEVENT,COMPLETED,NONE,ZERO
-NONE,VEVENT,CONTACT,NONE,ZEROPLUS
-NONE,VEVENT,CREATED,NONE,ZEROORONE
-NONE,VEVENT,DESCRIPTION,NONE,ZEROORONE
-NONE,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
-NONE,VEVENT,DTSTAMP,NONE,ZEROORONE
-NONE,VEVENT,DTSTART,NONE,ZEROORONE
-NONE,VEVENT,DUE,NONE,ZERO
-NONE,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
-NONE,VEVENT,EXDATE,NONE,ZEROPLUS
-NONE,VEVENT,EXRULE,NONE,ZEROPLUS
-NONE,VEVENT,FREEBUSY,NONE,ZERO
-NONE,VEVENT,GEO,NONE,ZEROORONE
-NONE,VEVENT,LASTMODIFIED,NONE,ZEROORONE
-NONE,VEVENT,LOCATION,NONE,ZEROORONE
-NONE,VEVENT,METHOD,NONE,ZERO
-NONE,VEVENT,ORGANIZER,NONE,ZEROORONE
-NONE,VEVENT,PERCENTCOMPLETE,NONE,ZERO
-NONE,VEVENT,PRIORITY,NONE,ZEROORONE
-NONE,VEVENT,PRODID,NONE,ZERO
-NONE,VEVENT,RDATE,NONE,ZEROPLUS
-NONE,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-NONE,VEVENT,RELATEDTO,NONE,ZEROPLUS
-NONE,VEVENT,REPEAT,NONE,ZERO
-NONE,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
-NONE,VEVENT,RESOURCES,NONE,ZEROPLUS
-NONE,VEVENT,RRULE,NONE,ZEROPLUS
-NONE,VEVENT,SEQUENCE,NONE,ZEROORONE
-NONE,VEVENT,STATUS,NONE,ZEROORONE
-NONE,VEVENT,SUMMARY,NONE,ZEROORONE
-NONE,VEVENT,TRANSP,NONE,ZEROORONE
-NONE,VEVENT,TRIGGER,NONE,ZERO
-NONE,VEVENT,TZID,NONE,ZERO
-NONE,VEVENT,TZNAME,NONE,ZERO
-NONE,VEVENT,TZOFFSETFROM,NONE,ZERO
-NONE,VEVENT,TZOFFSETTO,NONE,ZERO
-NONE,VEVENT,TZURL,NONE,ZERO
-NONE,VEVENT,UID,NONE,ZEROORONE
-NONE,VEVENT,URL,NONE,ZEROORONE
-NONE,VEVENT,VERSION,NONE,ZERO
-NONE,VEVENT,X,NONE,ZEROPLUS
-NONE,VTODO,ACTION,NONE,ZERO
-NONE,VTODO,ATTACH,NONE,ZEROPLUS
-NONE,VTODO,ATTENDEE,NONE,ZEROPLUS
-NONE,VTODO,CALSCALE,NONE,ZERO
-NONE,VTODO,CATEGORIES,NONE,ZEROPLUS
-NONE,VTODO,CLASS,NONE,ZEROORONE
-NONE,VTODO,COMMENT,NONE,ZEROPLUS
-NONE,VTODO,COMPLETED,NONE,ZEROORONE
-NONE,VTODO,CONTACT,NONE,ZEROPLUS
-NONE,VTODO,CREATED,NONE,ZEROORONE
-NONE,VTODO,DESCRIPTION,NONE,ZEROORONE
-NONE,VTODO,DTEND,NONE,ZERO
-NONE,VTODO,DTSTAMP,NONE,ZEROORONE
-NONE,VTODO,DTSTART,NONE,ZEROORONE
-NONE,VTODO,DUE,NONE,ONEEXCLUSIVE
-NONE,VTODO,DURATION,NONE,ONEEXCLUSIVE
-NONE,VTODO,EXDATE,NONE,ZEROPLUS
-NONE,VTODO,EXRULE,NONE,ZEROPLUS
-NONE,VTODO,FREEBUSY,NONE,ZERO
-NONE,VTODO,GEO,NONE,ZEROORONE
-NONE,VTODO,LASTMODIFIED,NONE,ZEROORONE
-NONE,VTODO,LOCATION,NONE,ZEROORONE
-NONE,VTODO,METHOD,NONE,ZERO
-NONE,VTODO,ORGANIZER,NONE,ZEROORONE
-NONE,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
-NONE,VTODO,PRIORITY,NONE,ZEROORONE
-NONE,VTODO,PRODID,NONE,ZERO
-NONE,VTODO,RDATE,NONE,ZEROPLUS
-NONE,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-NONE,VTODO,RELATEDTO,NONE,ZEROPLUS
-NONE,VTODO,REPEAT,NONE,ZERO
-NONE,VTODO,REQUESTSTATUS,NONE,ZEROPLUS
-NONE,VTODO,RESOURCES,NONE,ZEROPLUS
-NONE,VTODO,RRULE,NONE,ZEROPLUS
-NONE,VTODO,SEQUENCE,NONE,ZEROORONE
-NONE,VTODO,STATUS,NONE,ZEROORONE
-NONE,VTODO,SUMMARY,NONE,ZEROORONE
-NONE,VTODO,TRANSP,NONE,ZERO
-NONE,VTODO,TRIGGER,NONE,ZERO
-NONE,VTODO,TZID,NONE,ZERO
-NONE,VTODO,TZNAME,NONE,ZERO
-NONE,VTODO,TZOFFSETFROM,NONE,ZERO
-NONE,VTODO,TZOFFSETTO,NONE,ZERO
-NONE,VTODO,TZURL,NONE,ZERO
-NONE,VTODO,UID,NONE,ZEROORONE
-NONE,VTODO,URL,NONE,ZEROORONE
-NONE,VTODO,VERSION,NONE,ZERO
-NONE,VTODO,X,NONE,ZEROPLUS
-NONE,VJOURNAL,ACTION,NONE,ZERO
-NONE,VJOURNAL,ATTACH,NONE,ZEROPLUS
-NONE,VJOURNAL,ATTENDEE,NONE,ZEROPLUS
-NONE,VJOURNAL,CALSCALE,NONE,ZERO
-NONE,VJOURNAL,CATEGORIES,NONE,ZEROPLUS
-NONE,VJOURNAL,CLASS,NONE,ZEROORONE
-NONE,VJOURNAL,COMMENT,NONE,ZEROPLUS
-NONE,VJOURNAL,COMPLETED,NONE,ZERO
-NONE,VJOURNAL,CONTACT,NONE,ZEROPLUS
-NONE,VJOURNAL,CREATED,NONE,ZEROORONE
-NONE,VJOURNAL,DESCRIPTION,NONE,ZEROORONE
-NONE,VJOURNAL,DTEND,NONE,ZERO
-NONE,VJOURNAL,DTSTAMP,NONE,ZEROORONE
-NONE,VJOURNAL,DTSTART,NONE,ZEROORONE
-NONE,VJOURNAL,DUE,NONE,ONEEXCLUSIVE
-NONE,VJOURNAL,DURATION,NONE,ONEEXCLUSIVE
-NONE,VJOURNAL,EXDATE,NONE,ZEROPLUS
-NONE,VJOURNAL,EXRULE,NONE,ZEROPLUS
-NONE,VJOURNAL,FREEBUSY,NONE,ZERO
-NONE,VJOURNAL,GEO,NONE,ZERO
-NONE,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE
-NONE,VJOURNAL,LOCATION,NONE,ZERO
-NONE,VJOURNAL,METHOD,NONE,ZERO
-NONE,VJOURNAL,ORGANIZER,NONE,ZEROORONE
-NONE,VJOURNAL,PERCENTCOMPLETE,NONE,ZERO
-NONE,VJOURNAL,PRIORITY,NONE,ZERO
-NONE,VJOURNAL,PRODID,NONE,ZERO
-NONE,VJOURNAL,RDATE,NONE,ZEROPLUS
-NONE,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
-NONE,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
-NONE,VJOURNAL,REPEAT,NONE,ZERO
-NONE,VJOURNAL,REQUESTSTATUS,NONE,ZEROPLUS
-NONE,VJOURNAL,RESOURCES,NONE,ZERO
-NONE,VJOURNAL,RRULE,NONE,ZEROPLUS
-NONE,VJOURNAL,SEQUENCE,NONE,ZEROORONE
-NONE,VJOURNAL,STATUS,NONE,ZEROORONE
-NONE,VJOURNAL,SUMMARY,NONE,ZEROORONE
-NONE,VJOURNAL,TRANSP,NONE,ZERO
-NONE,VJOURNAL,TRIGGER,NONE,ZERO
-NONE,VJOURNAL,TZID,NONE,ZERO
-NONE,VJOURNAL,TZNAME,NONE,ZERO
-NONE,VJOURNAL,TZOFFSETFROM,NONE,ZERO
-NONE,VJOURNAL,TZOFFSETTO,NONE,ZERO
-NONE,VJOURNAL,TZURL,NONE,ZERO
-NONE,VJOURNAL,UID,NONE,ZEROORONE
-NONE,VJOURNAL,URL,NONE,ZEROORONE
-NONE,VJOURNAL,VERSION,NONE,ZERO
-NONE,VJOURNAL,X,NONE,ZEROPLUS
-NONE,VFREEBUSY,ACTION,NONE,ZERO
-NONE,VFREEBUSY,ATTACH,NONE,ZERO
-NONE,VFREEBUSY,ATTENDEE,NONE,ZEROPLUS
-NONE,VFREEBUSY,CALSCALE,NONE,ZERO
-NONE,VFREEBUSY,CATEGORIES,NONE,ZERO
-NONE,VFREEBUSY,CLASS,NONE,ZERO
-NONE,VFREEBUSY,COMMENT,NONE,ZEROPLUS
-NONE,VFREEBUSY,COMPLETED,NONE,ZERO
-NONE,VFREEBUSY,CONTACT,NONE,ZEROORONE
-NONE,VFREEBUSY,CREATED,NONE,ZERO
-NONE,VFREEBUSY,DESCRIPTION,NONE,ZERO
-NONE,VFREEBUSY,DTEND,NONE,ZEROORONE
-NONE,VFREEBUSY,DTSTAMP,NONE,ZERO
-NONE,VFREEBUSY,DTSTART,NONE,ZEROORONE
-NONE,VFREEBUSY,DUE,NONE,ZERO
-NONE,VFREEBUSY,DURATION,NONE,ZEROORONE
-NONE,VFREEBUSY,EXDATE,NONE,ZERO
-NONE,VFREEBUSY,EXRULE,NONE,ZERO
-NONE,VFREEBUSY,FREEBUSY,NONE,ZEROPLUS
-NONE,VFREEBUSY,GEO,NONE,ZERO
-NONE,VFREEBUSY,LASTMODIFIED,NONE,ZERO
-NONE,VFREEBUSY,LOCATION,NONE,ZERO
-NONE,VFREEBUSY,METHOD,NONE,ZERO
-NONE,VFREEBUSY,ORGANIZER,NONE,ZEROORONE
-NONE,VFREEBUSY,PERCENTCOMPLETE,NONE,ZERO
-NONE,VFREEBUSY,PRIORITY,NONE,ZERO
-NONE,VFREEBUSY,PRODID,NONE,ZERO
-NONE,VFREEBUSY,RDATE,NONE,ZERO
-NONE,VFREEBUSY,RECURRENCEID,NONE,ZERO
-NONE,VFREEBUSY,RELATEDTO,NONE,ZERO
-NONE,VFREEBUSY,REPEAT,NONE,ZERO
-NONE,VFREEBUSY,REQUESTSTATUS,NONE,ZEROPLUS
-NONE,VFREEBUSY,RESOURCES,NONE,ZERO
-NONE,VFREEBUSY,RRULE,NONE,ZERO
-NONE,VFREEBUSY,SEQUENCE,NONE,ZERO
-NONE,VFREEBUSY,STATUS,NONE,ZERO
-NONE,VFREEBUSY,SUMMARY,NONE,ZERO
-NONE,VFREEBUSY,TRANSP,NONE,ZERO
-NONE,VFREEBUSY,TRIGGER,NONE,ZERO
-NONE,VFREEBUSY,TZID,NONE,ZERO
-NONE,VFREEBUSY,TZNAME,NONE,ZERO
-NONE,VFREEBUSY,TZOFFSETFROM,NONE,ZERO
-NONE,VFREEBUSY,TZOFFSETTO,NONE,ZERO
-NONE,VFREEBUSY,TZURL,NONE,ZERO
-NONE,VFREEBUSY,UID,NONE,ZEROORONE
-NONE,VFREEBUSY,URL,NONE,ZEROORONE
-NONE,VFREEBUSY,VERSION,NONE,ZERO
-NONE,VFREEBUSY,X,NONE,ZEROPLUS
-NONE,VTIMEZONE,ACTION,NONE,ZERO
-NONE,VTIMEZONE,ATTACH,NONE,ZERO
-NONE,VTIMEZONE,ATTENDEE,NONE,ZERO
-NONE,VTIMEZONE,CALSCALE,NONE,ZERO
-NONE,VTIMEZONE,CATEGORIES,NONE,ZERO
-NONE,VTIMEZONE,CLASS,NONE,ZERO
-NONE,VTIMEZONE,COMMENT,NONE,ZERO
-NONE,VTIMEZONE,COMPLETED,NONE,ZERO
-NONE,VTIMEZONE,CONTACT,NONE,ZERO
-NONE,VTIMEZONE,CREATED,NONE,ZERO
-NONE,VTIMEZONE,DESCRIPTION,NONE,ZERO
-NONE,VTIMEZONE,DTEND,NONE,ZERO
-NONE,VTIMEZONE,DTSTAMP,NONE,ZERO
-NONE,VTIMEZONE,DTSTART,NONE,ZERO
-NONE,VTIMEZONE,DUE,NONE,ZERO
-NONE,VTIMEZONE,DURATION,NONE,ZERO
-NONE,VTIMEZONE,EXDATE,NONE,ZERO
-NONE,VTIMEZONE,EXRULE,NONE,ZERO
-NONE,VTIMEZONE,FREEBUSY,NONE,ZERO
-NONE,VTIMEZONE,GEO,NONE,ZERO
-NONE,VTIMEZONE,LASTMODIFIED,NONE,ZEROORONE
-NONE,VTIMEZONE,LOCATION,NONE,ZERO
-NONE,VTIMEZONE,METHOD,NONE,ZERO
-NONE,VTIMEZONE,ORGANIZER,NONE,ZERO
-NONE,VTIMEZONE,PERCENTCOMPLETE,NONE,ZERO
-NONE,VTIMEZONE,PRIORITY,NONE,ZERO
-NONE,VTIMEZONE,PRODID,NONE,ZERO
-NONE,VTIMEZONE,RDATE,NONE,ZERO
-NONE,VTIMEZONE,RECURRENCEID,NONE,ZERO
-NONE,VTIMEZONE,RELATEDTO,NONE,ZERO
-NONE,VTIMEZONE,REPEAT,NONE,ZERO
-NONE,VTIMEZONE,REQUESTSTATUS,NONE,ZERO
-NONE,VTIMEZONE,RESOURCES,NONE,ZERO
-NONE,VTIMEZONE,RRULE,NONE,ZERO
-NONE,VTIMEZONE,SEQUENCE,NONE,ZERO
-NONE,VTIMEZONE,STATUS,NONE,ZERO
-NONE,VTIMEZONE,SUMMARY,NONE,ZERO
-NONE,VTIMEZONE,TRANSP,NONE,ZERO
-NONE,VTIMEZONE,TRIGGER,NONE,ZERO
-NONE,VTIMEZONE,TZID,NONE,ONE
-NONE,VTIMEZONE,TZNAME,NONE,ZERO
-NONE,VTIMEZONE,TZOFFSETFROM,NONE,ZERO
-NONE,VTIMEZONE,TZOFFSETTO,NONE,ZERO
-NONE,VTIMEZONE,TZURL,NONE,ZEROPLUS
-NONE,VTIMEZONE,UID,NONE,ZERO
-NONE,VTIMEZONE,URL,NONE,ZERO
-NONE,VTIMEZONE,VERSION,NONE,ZERO
-NONE,VTIMEZONE,X,NONE,ZEROORONE
-NONE,XSTANDARD,ACTION,NONE,ZERO
-NONE,XSTANDARD,ATTACH,NONE,ZERO
-NONE,XSTANDARD,ATTENDEE,NONE,ZERO
-NONE,XSTANDARD,CALSCALE,NONE,ZERO
-NONE,XSTANDARD,CATEGORIES,NONE,ZERO
-NONE,XSTANDARD,CLASS,NONE,ZERO
-NONE,XSTANDARD,COMMENT,NONE,ZEROPLUS
-NONE,XSTANDARD,COMPLETED,NONE,ZERO
-NONE,XSTANDARD,CONTACT,NONE,ZERO
-NONE,XSTANDARD,CREATED,NONE,ZERO
-NONE,XSTANDARD,DESCRIPTION,NONE,ZERO
-NONE,XSTANDARD,DTEND,NONE,ZERO
-NONE,XSTANDARD,DTSTAMP,NONE,ZERO
-NONE,XSTANDARD,DTSTART,NONE,ONE
-NONE,XSTANDARD,DUE,NONE,ZERO
-NONE,XSTANDARD,DURATION,NONE,ZERO
-NONE,XSTANDARD,EXDATE,NONE,ZERO
-NONE,XSTANDARD,EXRULE,NONE,ZERO
-NONE,XSTANDARD,FREEBUSY,NONE,ZERO
-NONE,XSTANDARD,GEO,NONE,ZERO
-NONE,XSTANDARD,LASTMODIFIED,NONE,ZERO
-NONE,XSTANDARD,LOCATION,NONE,ZERO
-NONE,XSTANDARD,METHOD,NONE,ZERO
-NONE,XSTANDARD,ORGANIZER,NONE,ZERO
-NONE,XSTANDARD,PERCENTCOMPLETE,NONE,ZERO
-NONE,XSTANDARD,PRIORITY,NONE,ZERO
-NONE,XSTANDARD,PRODID,NONE,ZERO
-NONE,XSTANDARD,RDATE,NONE,ZEROPLUS
-NONE,XSTANDARD,RECURRENCEID,NONE,ZERO
-NONE,XSTANDARD,RELATEDTO,NONE,ZERO
-NONE,XSTANDARD,REPEAT,NONE,ZERO
-NONE,XSTANDARD,REQUESTSTATUS,NONE,ZERO
-NONE,XSTANDARD,RESOURCES,NONE,ZERO
-NONE,XSTANDARD,RRULE,NONE,ZEROPLUS
-NONE,XSTANDARD,SEQUENCE,NONE,ZERO
-NONE,XSTANDARD,STATUS,NONE,ZERO
-NONE,XSTANDARD,SUMMARY,NONE,ZERO
-NONE,XSTANDARD,TRANSP,NONE,ZERO
-NONE,XSTANDARD,TRIGGER,NONE,ZERO
-NONE,XSTANDARD,TZID,NONE,ZERO
-NONE,XSTANDARD,TZNAME,NONE,ZEROPLUS
-NONE,XSTANDARD,TZOFFSETFROM,NONE,ONE
-NONE,XSTANDARD,TZOFFSETTO,NONE,ONE
-NONE,XSTANDARD,TZURL,NONE,ZERO
-NONE,XSTANDARD,UID,NONE,ZERO
-NONE,XSTANDARD,URL,NONE,ZERO
-NONE,XSTANDARD,VERSION,NONE,ZERO
-NONE,XSTANDARD,X,NONE,ZEROPLUS
-NONE,XDAYLIGHT,ACTION,NONE,ZERO
-NONE,XDAYLIGHT,ATTACH,NONE,ZERO
-NONE,XDAYLIGHT,ATTENDEE,NONE,ZERO
-NONE,XDAYLIGHT,CALSCALE,NONE,ZERO
-NONE,XDAYLIGHT,CATEGORIES,NONE,ZERO
-NONE,XDAYLIGHT,CLASS,NONE,ZERO
-NONE,XDAYLIGHT,COMMENT,NONE,ZEROPLUS
-NONE,XDAYLIGHT,COMPLETED,NONE,ZERO
-NONE,XDAYLIGHT,CONTACT,NONE,ZERO
-NONE,XDAYLIGHT,CREATED,NONE,ZERO
-NONE,XDAYLIGHT,DESCRIPTION,NONE,ZERO
-NONE,XDAYLIGHT,DTEND,NONE,ZERO
-NONE,XDAYLIGHT,DTSTAMP,NONE,ZERO
-NONE,XDAYLIGHT,DTSTART,NONE,ONE
-NONE,XDAYLIGHT,DUE,NONE,ZERO
-NONE,XDAYLIGHT,DURATION,NONE,ZERO
-NONE,XDAYLIGHT,EXDATE,NONE,ZERO
-NONE,XDAYLIGHT,EXRULE,NONE,ZERO
-NONE,XDAYLIGHT,FREEBUSY,NONE,ZERO
-NONE,XDAYLIGHT,GEO,NONE,ZERO
-NONE,XDAYLIGHT,LASTMODIFIED,NONE,ZERO
-NONE,XDAYLIGHT,LOCATION,NONE,ZERO
-NONE,XDAYLIGHT,METHOD,NONE,ZERO
-NONE,XDAYLIGHT,ORGANIZER,NONE,ZERO
-NONE,XDAYLIGHT,PERCENTCOMPLETE,NONE,ZERO
-NONE,XDAYLIGHT,PRIORITY,NONE,ZERO
-NONE,XDAYLIGHT,PRODID,NONE,ZERO
-NONE,XDAYLIGHT,RDATE,NONE,ZEROPLUS
-NONE,XDAYLIGHT,RECURRENCEID,NONE,ZERO
-NONE,XDAYLIGHT,RELATEDTO,NONE,ZERO
-NONE,XDAYLIGHT,REPEAT,NONE,ZERO
-NONE,XDAYLIGHT,REQUESTSTATUS,NONE,ZERO
-NONE,XDAYLIGHT,RESOURCES,NONE,ZERO
-NONE,XDAYLIGHT,RRULE,NONE,ZEROPLUS
-NONE,XDAYLIGHT,SEQUENCE,NONE,ZERO
-NONE,XDAYLIGHT,STATUS,NONE,ZERO
-NONE,XDAYLIGHT,SUMMARY,NONE,ZERO
-NONE,XDAYLIGHT,TRANSP,NONE,ZERO
-NONE,XDAYLIGHT,TRIGGER,NONE,ZERO
-NONE,XDAYLIGHT,TZID,NONE,ZERO
-NONE,XDAYLIGHT,TZNAME,NONE,ZEROPLUS
-NONE,XDAYLIGHT,TZOFFSETFROM,NONE,ONE
-NONE,XDAYLIGHT,TZOFFSETTO,NONE,ONE
-NONE,XDAYLIGHT,TZURL,NONE,ZERO
-NONE,XDAYLIGHT,UID,NONE,ZERO
-NONE,XDAYLIGHT,URL,NONE,ZERO
-NONE,XDAYLIGHT,VERSION,NONE,ZERO
-NONE,XDAYLIGHT,X,NONE,ZEROPLUS
-NONE,XAUDIOALARM,ACTION,NONE,ONE
-NONE,XAUDIOALARM,ATTACH,NONE,ZEROORONE
-NONE,XAUDIOALARM,ATTENDEE,NONE,ZERO
-NONE,XAUDIOALARM,CALSCALE,NONE,ZERO
-NONE,XAUDIOALARM,CATEGORIES,NONE,ZERO
-NONE,XAUDIOALARM,CLASS,NONE,ZERO
-NONE,XAUDIOALARM,COMMENT,NONE,ZERO
-NONE,XAUDIOALARM,COMPLETED,NONE,ZERO
-NONE,XAUDIOALARM,CONTACT,NONE,ZERO
-NONE,XAUDIOALARM,CREATED,NONE,ZERO
-NONE,XAUDIOALARM,DESCRIPTION,NONE,ZERO
-NONE,XAUDIOALARM,DTEND,NONE,ZERO
-NONE,XAUDIOALARM,DTSTAMP,NONE,ZERO
-NONE,XAUDIOALARM,DTSTART,NONE,ZERO
-NONE,XAUDIOALARM,DUE,NONE,ZERO
-NONE,XAUDIOALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
-NONE,XAUDIOALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
-NONE,XAUDIOALARM,EXDATE,NONE,ZERO
-NONE,XAUDIOALARM,EXRULE,NONE,ZERO
-NONE,XAUDIOALARM,FREEBUSY,NONE,ZERO
-NONE,XAUDIOALARM,GEO,NONE,ZERO
-NONE,XAUDIOALARM,LASTMODIFIED,NONE,ZERO
-NONE,XAUDIOALARM,LOCATION,NONE,ZERO
-NONE,XAUDIOALARM,METHOD,NONE,ZERO
-NONE,XAUDIOALARM,ORGANIZER,NONE,ZERO
-NONE,XAUDIOALARM,PERCENTCOMPLETE,NONE,ZERO
-NONE,XAUDIOALARM,PRIORITY,NONE,ZERO
-NONE,XAUDIOALARM,PRODID,NONE,ZERO
-NONE,XAUDIOALARM,RDATE,NONE,ZERO
-NONE,XAUDIOALARM,RECURRENCEID,NONE,ZERO
-NONE,XAUDIOALARM,RELATEDTO,NONE,ZERO
-NONE,XAUDIOALARM,REQUESTSTATUS,NONE,ZERO
-NONE,XAUDIOALARM,RESOURCES,NONE,ZERO
-NONE,XAUDIOALARM,RRULE,NONE,ZERO
-NONE,XAUDIOALARM,SEQUENCE,NONE,ZERO
-NONE,XAUDIOALARM,STATUS,NONE,ZERO
-NONE,XAUDIOALARM,SUMMARY,NONE,ZERO
-NONE,XAUDIOALARM,TRANSP,NONE,ZERO
-NONE,XAUDIOALARM,TRIGGER,NONE,ONE
-NONE,XAUDIOALARM,TZID,NONE,ZERO
-NONE,XAUDIOALARM,TZNAME,NONE,ZERO
-NONE,XAUDIOALARM,TZOFFSETFROM,NONE,ZERO
-NONE,XAUDIOALARM,TZOFFSETTO,NONE,ZERO
-NONE,XAUDIOALARM,TZURL,NONE,ZERO
-NONE,XAUDIOALARM,UID,NONE,ZERO
-NONE,XAUDIOALARM,URL,NONE,ZERO
-NONE,XAUDIOALARM,VERSION,NONE,ZERO
-NONE,XAUDIOALARM,X,NONE,ZEROPLUS
-NONE,XDISPLAYALARM,ACTION,NONE,ONE
-NONE,XDISPLAYALARM,ATTACH,NONE,ZERO
-NONE,XDISPLAYALARM,ATTENDEE,NONE,ZERO
-NONE,XDISPLAYALARM,CALSCALE,NONE,ZERO
-NONE,XDISPLAYALARM,CATEGORIES,NONE,ZERO
-NONE,XDISPLAYALARM,CLASS,NONE,ZERO
-NONE,XDISPLAYALARM,COMMENT,NONE,ZERO
-NONE,XDISPLAYALARM,COMPLETED,NONE,ZERO
-NONE,XDISPLAYALARM,CONTACT,NONE,ZERO
-NONE,XDISPLAYALARM,CREATED,NONE,ZERO
-NONE,XDISPLAYALARM,DESCRIPTION,NONE,ONE
-NONE,XDISPLAYALARM,DTEND,NONE,ZERO
-NONE,XDISPLAYALARM,DTSTAMP,NONE,ZERO
-NONE,XDISPLAYALARM,DTSTART,NONE,ZERO
-NONE,XDISPLAYALARM,DUE,NONE,ZERO
-NONE,XDISPLAYALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
-NONE,XDISPLAYALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
-NONE,XDISPLAYALARM,EXDATE,NONE,ZERO
-NONE,XDISPLAYALARM,EXRULE,NONE,ZERO
-NONE,XDISPLAYALARM,FREEBUSY,NONE,ZERO
-NONE,XDISPLAYALARM,GEO,NONE,ZERO
-NONE,XDISPLAYALARM,LASTMODIFIED,NONE,ZERO
-NONE,XDISPLAYALARM,LOCATION,NONE,ZERO
-NONE,XDISPLAYALARM,METHOD,NONE,ZERO
-NONE,XDISPLAYALARM,ORGANIZER,NONE,ZERO
-NONE,XDISPLAYALARM,PERCENTCOMPLETE,NONE,ZERO
-NONE,XDISPLAYALARM,PRIORITY,NONE,ZERO
-NONE,XDISPLAYALARM,PRODID,NONE,ZERO
-NONE,XDISPLAYALARM,RDATE,NONE,ZERO
-NONE,XDISPLAYALARM,RECURRENCEID,NONE,ZERO
-NONE,XDISPLAYALARM,RELATEDTO,NONE,ZERO
-NONE,XDISPLAYALARM,REQUESTSTATUS,NONE,ZERO
-NONE,XDISPLAYALARM,RESOURCES,NONE,ZERO
-NONE,XDISPLAYALARM,RRULE,NONE,ZERO
-NONE,XDISPLAYALARM,SEQUENCE,NONE,ZERO
-NONE,XDISPLAYALARM,STATUS,NONE,ZERO
-NONE,XDISPLAYALARM,SUMMARY,NONE,ZERO
-NONE,XDISPLAYALARM,TRANSP,NONE,ZERO
-NONE,XDISPLAYALARM,TRIGGER,NONE,ONE
-NONE,XDISPLAYALARM,TZID,NONE,ZERO
-NONE,XDISPLAYALARM,TZNAME,NONE,ZERO
-NONE,XDISPLAYALARM,TZOFFSETFROM,NONE,ZERO
-NONE,XDISPLAYALARM,TZOFFSETTO,NONE,ZERO
-NONE,XDISPLAYALARM,TZURL,NONE,ZERO
-NONE,XDISPLAYALARM,UID,NONE,ZERO
-NONE,XDISPLAYALARM,URL,NONE,ZERO
-NONE,XDISPLAYALARM,VERSION,NONE,ZERO
-NONE,XDISPLAYALARM,X,NONE,ZEROPLUS
-NONE,XEMAILALARM,ACTION,NONE,ONE
-NONE,XEMAILALARM,ATTACH,NONE,ZEROPLUS
-NONE,XEMAILALARM,ATTENDEE,NONE,ONEPLUS
-NONE,XEMAILALARM,CALSCALE,NONE,ZERO
-NONE,XEMAILALARM,CATEGORIES,NONE,ZERO
-NONE,XEMAILALARM,CLASS,NONE,ZERO
-NONE,XEMAILALARM,COMMENT,NONE,ZERO
-NONE,XEMAILALARM,COMPLETED,NONE,ZERO
-NONE,XEMAILALARM,CONTACT,NONE,ZERO
-NONE,XEMAILALARM,CREATED,NONE,ZERO
-NONE,XEMAILALARM,DESCRIPTION,NONE,ONE
-NONE,XEMAILALARM,DTEND,NONE,ZERO
-NONE,XEMAILALARM,DTSTAMP,NONE,ZERO
-NONE,XEMAILALARM,DTSTART,NONE,ZERO
-NONE,XEMAILALARM,DUE,NONE,ZERO
-NONE,XEMAILALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
-NONE,XEMAILALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
-NONE,XEMAILALARM,EXDATE,NONE,ZERO
-NONE,XEMAILALARM,EXRULE,NONE,ZERO
-NONE,XEMAILALARM,FREEBUSY,NONE,ZERO
-NONE,XEMAILALARM,GEO,NONE,ZERO
-NONE,XEMAILALARM,LASTMODIFIED,NONE,ZERO
-NONE,XEMAILALARM,LOCATION,NONE,ZERO
-NONE,XEMAILALARM,METHOD,NONE,ZERO
-NONE,XEMAILALARM,ORGANIZER,NONE,ZERO
-NONE,XEMAILALARM,PERCENTCOMPLETE,NONE,ZERO
-NONE,XEMAILALARM,PRIORITY,NONE,ZERO
-NONE,XEMAILALARM,PRODID,NONE,ZERO
-NONE,XEMAILALARM,RDATE,NONE,ZERO
-NONE,XEMAILALARM,RECURRENCEID,NONE,ZERO
-NONE,XEMAILALARM,RELATEDTO,NONE,ZERO
-NONE,XEMAILALARM,REQUESTSTATUS,NONE,ZERO
-NONE,XEMAILALARM,RESOURCES,NONE,ZERO
-NONE,XEMAILALARM,RRULE,NONE,ZERO
-NONE,XEMAILALARM,SEQUENCE,NONE,ZERO
-NONE,XEMAILALARM,STATUS,NONE,ZERO
-NONE,XEMAILALARM,SUMMARY,NONE,ONE
-NONE,XEMAILALARM,TRANSP,NONE,ZERO
-NONE,XEMAILALARM,TRIGGER,NONE,ONE
-NONE,XEMAILALARM,TZID,NONE,ZERO
-NONE,XEMAILALARM,TZNAME,NONE,ZERO
-NONE,XEMAILALARM,TZOFFSETFROM,NONE,ZERO
-NONE,XEMAILALARM,TZOFFSETTO,NONE,ZERO
-NONE,XEMAILALARM,TZURL,NONE,ZERO
-NONE,XEMAILALARM,UID,NONE,ZERO
-NONE,XEMAILALARM,URL,NONE,ZERO
-NONE,XEMAILALARM,VERSION,NONE,ZERO
-NONE,XEMAILALARM,X,NONE,ZEROPLUS
-NONE,XPROCEDUREALARM,ACTION,NONE,ONE
-NONE,XPROCEDUREALARM,ATTACH,NONE,ZEROORONE
-NONE,XPROCEDUREALARM,ATTENDEE,NONE,ZERO
-NONE,XPROCEDUREALARM,CALSCALE,NONE,ZERO
-NONE,XPROCEDUREALARM,CATEGORIES,NONE,ZERO
-NONE,XPROCEDUREALARM,CLASS,NONE,ZERO
-NONE,XPROCEDUREALARM,COMMENT,NONE,ZERO
-NONE,XPROCEDUREALARM,COMPLETED,NONE,ZERO
-NONE,XPROCEDUREALARM,CONTACT,NONE,ZERO
-NONE,XPROCEDUREALARM,CREATED,NONE,ZERO
-NONE,XPROCEDUREALARM,DESCRIPTION,NONE,ZEROORONE
-NONE,XPROCEDUREALARM,DTEND,NONE,ZERO
-NONE,XPROCEDUREALARM,DTSTAMP,NONE,ZERO
-NONE,XPROCEDUREALARM,DTSTART,NONE,ZERO
-NONE,XPROCEDUREALARM,DUE,NONE,ZERO
-NONE,XPROCEDUREALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
-NONE,XPROCEDUREALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
-NONE,XPROCEDUREALARM,EXDATE,NONE,ZERO
-NONE,XPROCEDUREALARM,EXRULE,NONE,ZERO
-NONE,XPROCEDUREALARM,FREEBUSY,NONE,ZERO
-NONE,XPROCEDUREALARM,GEO,NONE,ZERO
-NONE,XPROCEDUREALARM,LASTMODIFIED,NONE,ZERO
-NONE,XPROCEDUREALARM,LOCATION,NONE,ZERO
-NONE,XPROCEDUREALARM,METHOD,NONE,ZERO
-NONE,XPROCEDUREALARM,ORGANIZER,NONE,ZERO
-NONE,XPROCEDUREALARM,PERCENTCOMPLETE,NONE,ZERO
-NONE,XPROCEDUREALARM,PRIORITY,NONE,ZERO
-NONE,XPROCEDUREALARM,PRODID,NONE,ZERO
-NONE,XPROCEDUREALARM,RDATE,NONE,ZERO
-NONE,XPROCEDUREALARM,RECURRENCEID,NONE,ZERO
-NONE,XPROCEDUREALARM,RELATEDTO,NONE,ZERO
-NONE,XPROCEDUREALARM,REQUESTSTATUS,NONE,ZERO
-NONE,XPROCEDUREALARM,RESOURCES,NONE,ZERO
-NONE,XPROCEDUREALARM,RRULE,NONE,ZERO
-NONE,XPROCEDUREALARM,SEQUENCE,NONE,ZERO
-NONE,XPROCEDUREALARM,STATUS,NONE,ZERO
-NONE,XPROCEDUREALARM,SUMMARY,NONE,ZERO
-NONE,XPROCEDUREALARM,TRANSP,NONE,ZERO
-NONE,XPROCEDUREALARM,TRIGGER,NONE,ONE
-NONE,XPROCEDUREALARM,TZID,NONE,ZERO
-NONE,XPROCEDUREALARM,TZNAME,NONE,ZERO
-NONE,XPROCEDUREALARM,TZOFFSETFROM,NONE,ZERO
-NONE,XPROCEDUREALARM,TZOFFSETTO,NONE,ZERO
-NONE,XPROCEDUREALARM,TZURL,NONE,ZERO
-NONE,XPROCEDUREALARM,UID,NONE,ZERO
-NONE,XPROCEDUREALARM,URL,NONE,ZERO
-NONE,XPROCEDUREALARM,VERSION,NONE,ZERO
-NONE,XPROCEDUREALARM,X,NONE,ZEROPLUS
diff --git a/libical/design-data/status.txt b/libical/design-data/status.txt
deleted file mode 100644
index 9e7bbf83a7..0000000000
--- a/libical/design-data/status.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-2.0 STATOK Operation was successfully performed.
-2.0.1 STARTSENDATA Start ICAL input; end with <CRLF>.<CRLF>
-2.0.11 OKDATAFOLLOWS The request was processed successfully. Reply data follows on the next line and terminates with <CRLF>.<CRLF>
-2.0.2 REPLYPENDING A timeout has occurred. The server is still working on the reply. Use CONTINUE to continue waiting for the reply or ABORT to terminate the command.
-2.0.3 ABORTED The command currently underway was successsfully aborted.
-2.0.4 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway.
-2.0.5 TRUSTEDWILLQUEUE The request or reply will be queued and delivered to the target calendar when its iRIP server contacts this server and issues the SWITCH command.
-2.0.6 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway.
-2.0.7 QUEUED The message has been queued for delivery.
-2.0.8 QUEUEEMPTY There are no more queued messages.
-2.1 FALLBACK Success. Fallback taken on one or more property values.
-2.2 NOCOMMANDINPROGRESS An ABORT or CONTINUE was received when no command was in progress
-2.2 IGPROP Success. Invalid property ignored.
-2.3 IGPARAM Success. invalid property parameter ignored.
-2.4 IGXPROP Success. Unknown non-standard property ignored.
-2.5 IGXPARAM Success. Unknown non standard property value ignored.
-2.6 IGCOMP Success. Invalid calendar component ignored.
-2.7 FORWARD Success. Request forwarded to Calendar User.
-2.8 ONEEVENT Success. Repeating event ignored. Scheduled as a single component.
-2.9 TRUNC Success. Truncated end date time to date boundary.
-2.10 ONETODO Success. Repeating VTODO ignored. Scheduled as a single VTODO.
-2.11 TRUNCRRULE Success. Unbounded RRULE clipped at some finite number of instances
-3.0 INVPROPNAME Invalid property name.
-3.1 INVPROPVAL Invalid property value.
-3.2 INVPARAM Invalid property parameter.
-3.3 INVPARAMVAL Invalid property parameter value.
-3.4 INVCOMP Invalid calendar component sequence.
-3.5 INVTIME Invalid date or time.
-3.6 INVRULE Invalid rule.
-3.7 INVCU Invalid Calendar User.
-3.8 NOAUTH No authority.
-3.9 BADVERSION Unsupported version.
-3.10 TOOBIG Request entity too large.
-3.11 MISSREQCOMP Required component or property missing.
-3.12 UNKCOMP Unknown component or property found.
-3.13 BADCOMP Unsupported component or property found
-3.14 NOCAP Unsupported capability.
-4.0 BUSY Event conflict. Date/time is busy.
-5.0 MAYBE Request MAY supported.
-5.1 UNAVAIL Service unavailable.
-5.2 NOSERVICE Invalid calendar service.
-5.3 NOSCHED No scheduling support for user.
-6.1 AUTHENTICATEFAILURE Unsupported authentication mechanism, credentials rejected
-6.2 AUTHENTICATIONABORTED Sender aborted authentication, authentication exchange cancelled
-8.0 GENERALFAILURE A failure has occurred in the Receiver that prevents the operation from succeeding.
-8.1 SERVERTOOBUSY The iRIP Receiver is too busy.
-8.2 ICALOBJECTTOOBIG Object has exceeded the server's size limit.
-8.3 DATETOOLARGE A DATETIME value was too far in the future to be represented on this Calendar.
-8.4 DATETOOSMALL A DATETIME value was too far in the past to be represented on this Calendar.
-9.0 INVALIDIRIPCOMMAND An unrecongnized command was received.
-9.1 UNEXPECTEDCOMMAND The command is not allowed for the server's current state.
-10.1 REFERRAL Accompanied by an alternate address.
-10.2 SERVERSHUTDOWN The server is shutting down.
-10.3 SERVERSTOPPING FLOOD 2
-10.4 EXCEEDEDQUOTAS The operation would cause a resource to exceed the allocated quota
-10.5 QUEUEDTOOLONG The ITIP message has been queued too long. Delivery has been aborted.
diff --git a/libical/design-data/value-c-types.txt b/libical/design-data/value-c-types.txt
deleted file mode 100644
index 9b445655d9..0000000000
--- a/libical/design-data/value-c-types.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-ATTACH nogen icalattach *
-BINARY autogen const char*
-BOOLEAN autogen int
-CAL-ADDRESS autogen const char*
-DATE autogen struct icaltimetype
-DATE-TIME autogen struct icaltimetype
-DATE-TIME-DATE autogen struct icaltimetype # Non-std
-DATE-TIME-PERIOD nogen struct icaldatetimeperiodtype # Non-std
-DURATION autogen struct icaldurationtype
-FLOAT autogen float
-GEO autogen struct icalgeotype # Non-std
-INTEGER autogen int
-METHOD autogen icalproperty_method # Non-std
-PERIOD autogen struct icalperiodtype
-RECUR nogen struct icalrecurrencetype
-STRING autogen const char* # Non-std
-TEXT autogen const char*
-TIME autogen struct icaltimetype
-TRIGGER nogen struct icaltriggertype # Non-std
-URI autogen const char*
-UTC-OFFSET autogen int
-QUERY autogen const char*
-STATUS autogen icalproperty_status #Non-std
diff --git a/libical/design-data/value-mem-semantics.txt b/libical/design-data/value-mem-semantics.txt
deleted file mode 100644
index ce085ede80..0000000000
--- a/libical/design-data/value-mem-semantics.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-ATTACH icalattach *
-BINARY char*
-BOOLEAN int
-CAL-ADDRESS char*
-DATE time_t
-DATE-TIME time_t
-DATE-TIME-DATE time_t
-DATE-TIME-PERIOD struct icalperiodtype
-DURATION struct icaldurationtype
-FLOAT float
-GEO struct icalgeotype
-INTEGER int
-PERIOD struct icalperiodtype
-RECUR struct icalrecurrencetype
-TEXT char*
-TIME time_t
-TRIGGER struct icaltriggertimetype
-URI char*
-UTC-OFFSET int
diff --git a/libical/design-data/value-types.csv b/libical/design-data/value-types.csv
deleted file mode 100644
index 654307097e..0000000000
--- a/libical/design-data/value-types.csv
+++ /dev/null
@@ -1,31 +0,0 @@
-"#Name","C type& gen flag","Python","Component Values","Enum Values"
-"BINARY","(a)const char*","file","unitary",
-"BOOLEAN","(a)int","integer","unitary",
-"CAL-ADDRESS","(a)const char*","string","unitary",
-"DATE","(a)struct icaltimetype","Time","unitary",
-"DATE-TIME","(a)struct icaltimetype","Time","unitary",
-"DURATION","(a)struct icaldurationtype","Duration","unitary",
-"FLOAT","(a)float","float","unitary",
-"INTEGER","(a)int","integer","unitary",
-"PERIOD","(a)struct icalperiodtype","Period","unitary",
-"RECUR","(m)struct icalrecurrencetype","RecurrenceSet","unitary",
-"TEXT","(a)const char*","string","unitary",
-"TIME","(a)struct icaltimetype","Time","unitary",
-"URI","(a)const char*","string","unitary",
-"UTC-OFFSET","(a)int","integer","unitary",
-"QUERY","(a)const char*","string","unitary",
-"#Non-standard multi-valued types",,,,
-"ATTACH","(m)icalattach *","none","URI;BINARY",
-"DATE-TIME-DATE","(a)struct icaltimetype","none","DATE-TIME;DATE",
-"DATE-TIME-PERIOD","(m)struct icaldatetimeperiodtype","none","DATE-TIME;PERIOD",
-"TRIGGER","(m)struct icaltriggertype","string","DURATION;DATE-TIME",
-"#Non-standard property enumeration types",,,,
-"METHOD","(a)enum icalproperty_method","string","unitary","PUBLISH;REQUEST;REPLY;ADD;CANCEL;REFRESH;COUNTER;DECLINECOUNTER;CREATE;READ;RESPONSE;MOVE;MODIFY;GENERATEUID;DELETE"
-"ACTION","(a)enum icalproperty_action","string","unitary","AUDIO;DISPLAY;EMAIL;PROCEDURE"
-"STATUS","(a)enum icalproperty_status","string","unitary","TENTATIVE;CONFIRMED;COMPLETED;NEEDS-ACTION;CANCELLED;IN-PROCESS;DRAFT;FINAL"
-"TRANSP","(a)enum icalproperty_transp","string","unitary","OPAQUE;TRANSPARENT"
-"CLASS","(a)enum icalproperty_class","string","unitary","PUBLIC;PRIVATE;CONFIDENTIAL"
-"#Other non-standard",,,,
-"GEO","(a)struct icalgeotype","tuple","unitary",
-"STRING","(a)const char*","string","unitary",
-"X","(m)const char*","string","unitary",
diff --git a/libical/doc/.cvsignore b/libical/doc/.cvsignore
deleted file mode 100644
index 3dda72986f..0000000000
--- a/libical/doc/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/libical/doc/Makefile.am b/libical/doc/Makefile.am
deleted file mode 100644
index 70b008a369..0000000000
--- a/libical/doc/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = UsingLibical.lyx UsingLibical.ps UsingLibical.txt
diff --git a/libical/doc/UsingLibical.lyx b/libical/doc/UsingLibical.lyx
deleted file mode 100644
index cef199bea5..0000000000
--- a/libical/doc/UsingLibical.lyx
+++ /dev/null
@@ -1,2578 +0,0 @@
-#LyX 1.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 2.16
-\textclass article
-\language default
-\inputencoding latin1
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single
-\papersize Default
-\paperpackage a4
-\use_geometry 0
-\use_amsmath 0
-\paperorientation portrait
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language english
-\quotes_times 2
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-
-\layout Title
-
-Using Libical
-\layout Author
-
-Eric Busboom (eric@softwarestudio.org)
-\layout Date
-
-January 2001
-\layout Standard
-
-
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset
-
-
-\layout Section
-
-Introduction
-\layout Standard
-
-Libical is an Open Source implementation of the iCalendar protocols and
- protocol data units.
- The iCalendar specification describes how calendar clients can communicate
- with calendar servers so users can store their calendar data and arrange
- meetings with other users.
-
-\layout Standard
-
-Libical implements RFC2445, RFC2446 and some of RFC2447 and the CAP draft.
-
-\layout Standard
-
-This documentation assumes that you are familiar with the iCalendar standards
- RFC2445 and RFC2446.
- these specifications are online on the CALSCH webpage at:
-\layout LyX-Code
-
-http://www.imc.org/ietf-calendar/
-\layout Subsection
-
-The libical project
-\layout Standard
-
-This code is under active development.
- If you would like to contribute to the project, you can contact me, Eric
- Busboom, at eric@softwarestudio.org.
- The project has a webpage at
-\layout LyX-Code
-
-http://softwarestudio.org/libical/index.html
-\layout Standard
-
-and a mailing list that you can join by sending the following mail:
-\layout LyX-Code
-
-To: minimalist@softwarestudio.org
-\layout LyX-Code
-
-Subject: subscribe libical
-\layout Subsection
-
-License
-\layout Standard
-
-The code and datafiles in this distribution are licensed under the Mozilla
- Public License.
- See http://www.mozilla.org/NPL/MPL-1.0.html for a copy of the license.
- Alternately, you may use libical under the terms of the GNU Library General
- Public License.
- See http://www.fsf.org/copyleft/lesser.html for a copy of the LGPL.
-\layout Standard
-
-This dual license ensures that the library can be incorporated into both
- proprietary code and GPL'd programs, and will benefit from improvements
- made by programmers in both realms.
- I will only accept changes into my version of the library if they are similarly
- dual-licensed.
-\layout Subsection
-
-Example Code
-\layout Standard
-
-A lot of the documentation for this library is in the form of example code.
- These examples are in the
-\begin_inset Quotes eld
-\end_inset
-
-examples
-\begin_inset Quotes erd
-\end_inset
-
- directory of the distribution.
- Also look in
-\begin_inset Quotes eld
-\end_inset
-
-src/test
-\begin_inset Quotes erd
-\end_inset
-
- for additional annotated examples.
-
-\layout Section
-
-Building nas Installing the Library
-\layout Standard
-
-Libical uses autoconf to generate makefiles.
- It should built with no adjustments on Linux, FreeBSD and Solaris under
- gcc.
- Some version have been successfully been build on MacOS, Solaris, UnixWare,
- And Tru64 UNIX without gcc, but you may run into problems with a particular
- later version.
-
-\layout Standard
-
-For a more complete guide to building the library, see the README file in
- the distribution.
-
-\layout Standard
-
-
-\begin_inset Quotes eld
-\end_inset
-
-make install
-\begin_inset Quotes erd
-\end_inset
-
- will install the libraries and header files for three modules: libical,
- libicalss.
- and libicalvcal.
- If you build shared objects, then these files will be installed:
-\layout Itemize
-
-ical.h
-\layout Itemize
-
-libical.a
-\layout Itemize
-
-libical.so
-\layout Itemize
-
-icalss.h
-\layout Itemize
-
-libicalss.a
-\layout Itemize
-
-libicalss.so
-\layout Itemize
-
-icalvcal.h
-\layout Itemize
-
-libicalvcal.a
-\layout Itemize
-
-libicalvcal.so
-\layout Standard
-
-The header files ical.h and icalss.h are combined header files, generated
- by concatenating together all of the header files in src/libical and src/libica
-lss respectively.
-
-\layout Section
-
-Structure
-\layout Standard
-
-The iCal calendar model is based on four types of objects: components, propertie
-s, values and parameters.
-
-\layout Standard
-
-Properties are the fundamental unit of information in iCal, and they work
- a bit like a hash entry, with a constant key and a variable value.
- Properties may also have modifiers, called parameters.
- In the iCal content line
-\layout LyX-Code
-
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
-\layout Standard
-
-The property name is
-\begin_inset Quotes eld
-\end_inset
-
-ORGANIZER,
-\begin_inset Quotes erd
-\end_inset
-
- the value of the property is
-\begin_inset Quotes eld
-\end_inset
-
-mrbig@host.com
-\begin_inset Quotes erd
-\end_inset
-
- and the
-\begin_inset Quotes eld
-\end_inset
-
-ROLE
-\begin_inset Quotes erd
-\end_inset
-
- parameter specifies that Mr Big is the chair of the meetings associated
- with this property.
-
-\layout Standard
-
-Components are groups of properties that represent the core objects of a
- calendar system, such as events or timezones.
- Components are delimited by
-\begin_inset Quotes eld
-\end_inset
-
-BEGIN
-\begin_inset Quotes erd
-\end_inset
-
- and
-\begin_inset Quotes eld
-\end_inset
-
-END
-\begin_inset Quotes erd
-\end_inset
-
- tags.
-
-\layout Standard
-\added_space_bottom 0.3cm
-When a component is sent across a network, if it is un-encrypted, it will
- look something like:
-\layout LyX-Code
-
-BEGIN:VCALENDAR
-\layout LyX-Code
-
-METHOD:REQUEST
-\layout LyX-Code
-
-PRODID: -//hacksw/handcal//NONSGML v1.0//EN
-\layout LyX-Code
-
-BEGIN:VEVENT
-\layout LyX-Code
-
-DTSTAMP:19980309T231000Z
-\layout LyX-Code
-
-UID:guid-1.host1.com
-\layout LyX-Code
-
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
-\layout LyX-Code
-
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
-\layout LyX-Code
-
- MAILTO:employee-A@host.com
-\layout LyX-Code
-
-DESCRIPTION:Project XYZ Review Meeting
-\layout LyX-Code
-
-CATEGORIES:MEETING
-\layout LyX-Code
-
-CLASS:PUBLIC
-\layout LyX-Code
-
-CREATED:19980309T130000Z
-\layout LyX-Code
-
-SUMMARY:XYZ Project Review
-\layout LyX-Code
-
-DTSTART;TZID=US-Eastern:19980312T083000
-\layout LyX-Code
-
-DTEND;TZID=US-Eastern:19980312T093000
-\layout LyX-Code
-
-LOCATION:1CP Conference Room 4350
-\layout LyX-Code
-
-END:VEVENT
-\layout LyX-Code
-
-END:VCALENDAR
-\layout Standard
-
-Note that components can be nested; this example has both a VCALENDAR and
- a VEVENT component, one nested inside the other.
-
-\layout Standard
-
-The main goal of Libical is to offer a structured, type-safe to create,
- access and manipulate components and their properties, values and parameters.
-
-\layout Subsection
-
-Core iCal classes
-\layout Standard
-
-Libical is an object-based, data-oriented library.
- There are no real-objects, but the way the routines are named and organized
- results in the same sort of encapsulations and abstraction that are major
- features of Object-Orieted languages.
- Nearly all of the routines in the library are associated with an opaque
- data types and perform some operation on that data type.
- For instnace, a Property is declared as:
-\layout LyX-Code
-
-icalproperty *prop;
-\layout Standard
-
-Icalproperty is typedef'd to void, so the only way to manipulate it is through
- the accessor routines, all of which have a form similar to:
-\layout LyX-Code
-
-char* icalproperty_as_ical_string(icalproperty* prop);
-\layout Standard
-
-That is, the name of the 'class' is the first word in the routine name,
- and the first parameter is a pointer to the 'object.'
-\layout Standard
-
-Although the library does not actually have classes, we will use those terms
- since the behavior of these associations of data and routines is very similar
- to a class.
-
-\layout Subsubsection
-
-Properties
-\layout LyX-Code
-
-icalproperty *prop;
-\layout Standard
-
-Properties are represented with the icalproperty class and its many
-\begin_inset Quotes eld
-\end_inset
-
-derived
-\begin_inset Quotes erd
-\end_inset
-
- classes with on
-\begin_inset Quotes eld
-\end_inset
-
-derived
-\begin_inset Quotes erd
-\end_inset
-
- class per property type in RFC2445.
- Again, there is no actual inheritance relations, but there are clusters
- of routines that make this term useful.
- A property is a container for a single value and a set of parameters.
-
-\layout Subsubsection
-
-Components
-\layout LyX-Code
-
-icalcomponent *comp;
-\layout Standard
-
-In libical, components are represented with the icalcomponent class.
- Icalcomponent is a container for a set of other components and properties.
-\layout Subsubsection
-
-Values
-\layout LyX-Code
-
-icalvalue *value;
-\layout Standard
-
-Values are represented in a similar way to properties; a base class and
- many
-\begin_inset Quotes eld
-\end_inset
-
-derived
-\begin_inset Quotes eld
-\end_inset
-
- classes.
- A value is essentially a abstract handle on a single fundamental type,
- a structure or a union.
- You probably will never use a value directly, since for most operations
- you can get to its data through the property that holds it.
-
-\layout Subsubsection
-
-Parameters
-\layout LyX-Code
-
-icalparameter *param;
-\layout Standard
-
-Parameters are represetned in a similar way to properties, except that they
- contain only one value
-\layout Subsection
-
-Other elements of libical
-\layout Standard
-
-In addition to the core iCal classes, libical has many other types, structures,
- classes that aid in creating and using iCal components.
-
-\layout Subsubsection
-
-Enumerations and types
-\layout Standard
-
-Libical is strongly typed, so every component, property, parameter, and
- value type has an enumeration, and some have an associated structure or
- union.
-
-\layout Subsubsection
-
-The parser
-\layout Standard
-
-The libical parser offers a variety of ways to convert RFC2445 text into
- a libical iinsteral component structure.
- the parser can parse blocks of text as a string, or it can parse lin-by-line.
-\layout Subsubsection
-
-Error objects
-\layout Standard
-
-Libical has a substantial error reporting system for both programming errors
- and component usage errors.
-
-\layout Subsubsection
-
-Memory Management
-\layout Standard
-
-Since many of libicals interfaces return strings, the library has its own
- memory management system to elimiate the need to free every string returned
- from the libraru.
-
-\layout Subsubsection
-
-Storage classes
-\layout Standard
-
-The library also offers several classes to store components to flies, memory
- or databases.
-
-\layout Section
-
-Differences From RFCs
-\layout Standard
-
-Libical has been designed to follow the standards as closely as possible,
- so that the key objects in the standards are also key objects in the library.
- However, there are a few areas where the specifications are (arguably)
- irregular, and following them exactly would result in an unfriendly interface.
- These deviations make libical easier to use by maintaining a self-similar
- interface.
-
-\layout Subsection
-
-Pseudo Components
-\layout Standard
-
-Libical defines components for groups of properties that look and act like
- components, but are not defined as components in the specification.
- XDAYLIGHT and XSTANDARD are notable examples.
- These pseudo components group properties within the VTIMEZONE components.
- For instanace, the timezone properties associated with daylight savings
- time starts with
-\begin_inset Quotes eld
-\end_inset
-
-BEGIN:DAYLIGHT
-\begin_inset Quotes erd
-\end_inset
-
- and ends with
-\begin_inset Quotes eld
-\end_inset
-
-END:DAYLIGHT, just like other components, but is not defined as a component
- in RFC2445.
- ( See RFC2445, page 61 ) In Libical,this grouping is represented by the
- XDAYLIGHT component.
- Standard iCAL components all start with the letter
-\begin_inset Quotes eld
-\end_inset
-
-V,
-\begin_inset Quotes erd
-\end_inset
-
- while pseudo components start with
-\begin_inset Quotes erd
-\end_inset
-
-X.
-\begin_inset Quotes erd
-\end_inset
-
-
-\layout Standard
-
-There are also pseudo components that are conceptually derived classes of
- VALARM.
- RFC2446 defines what properties may be included in each component, and
- for VALARM, the set of properties it may have depends on the value of the
- ACTION property.
-
-\layout Standard
-
-For instance, if a VALARM component has an ACTION property with the value
- of
-\begin_inset Quotes eld
-\end_inset
-
-AUDIO,
-\begin_inset Quotes erd
-\end_inset
-
- the component must also have an
-\begin_inset Quotes eld
-\end_inset
-
-ATTACH
-\begin_inset Quotes erd
-\end_inset
-
- property.
- However, if the ACTION value is
-\begin_inset Quotes eld
-\end_inset
-
-DISPLAY,
-\begin_inset Quotes erd
-\end_inset
-
- the component must have a DESCRIPTION property.
-
-\layout Standard
-
-To handle these various, complex restrictions, libical has pseudo components
- for each type of alarm: XAUDIOALARM, XDISPLAYALARM, XEMAILALARM and XPROCEDUREA
-LARM.
-
-\layout Subsection
-
-Combined Values
-\layout Standard
-
-Many values can take more than one type.
- TRIGGER, for instance, can have a value type of with DURATION or of DATE-TIME.
- These multiple types make it difficult to create routines to return the
- value associated with a property.
-
-\layout Standard
-
-It is natural to have interfaces that would return the value of a property,
- but it is cumbersome for a single routine to return multiple types.
- So, in libical, properties that can have multiple types are given a single
- type that is the union of their RFC2445 types.
- For instance, in libical, the value of the TRIGGER property resolves to
- struct icaltriggertype.
- This type is a union of a DURATION and a DATE-TIME.
-
-\layout Subsection
-
-Multi-Valued Properties
-\layout Standard
-
-Some properties, such as CATEGORIES have only one value type, but each CATEGORIE
-S property can have multiple value instances.
- This also results in a cumbersome interface -- CATEGORIES accessors would
- have to return a list while all other accessors returned a single value.
- In libical, all properties have a single value, and multi-valued properties
- are broken down into multiple single valued properties during parsing.
- That is, an input line like,
-\layout LyX-Code
-
-CATEGORIES: work, home
-\layout Standard
-
-becomes in libical's internal representation
-\layout LyX-Code
-
-CATEGORIES: work
-\layout LyX-Code
-
-CATEGORIES: home
-\layout Standard
-
-Oddly, RFC2445 allows some multi-valued properties ( like FREEBUSY ) to
- exist as both a multi-values property and as multiple single value properties,
- while others ( like CATEGORIES ) can only exist as single multi-valued
- properties.
- This makes the internal representation for CATEGORIES illegal.
- However when you convert a component to a string, the library will collect
- all of the CATEGORIES properties into one.
-
-\layout Section
-
-Using libical
-\layout Subsection
-
-Creating Components
-\layout Standard
-
-There are three ways to create components in Libical:
-\layout Itemize
-
-Create individual components, properties and parameters and assemble them
- into structures
-\layout Itemize
-
-Build complete components with nested vaargs calls
-\layout Itemize
-
-Parse bits of text
-\layout Itemize
-
-Parse entire files
-\layout Subsubsection
-
-Constructor Interfaces
-\layout Standard
-
-Using constructor interfaces, you create each of the objects separately
- and then assemble them in to components:
-\layout LyX-Code
-
-icalcomponent *event;
-\layout LyX-Code
-
-icalproperty *prop;
-\layout LyX-Code
-
-icalparameter *param;
-\layout LyX-Code
-
-struct icaltimetype atime;
-\layout LyX-Code
-
-\layout LyX-Code
-
-event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
-\layout LyX-Code
-
-prop = icalproperty_new_dtstamp(atime);
-\layout LyX-Code
-
-icalcomponent_add_property(event, prop);
-\layout LyX-Code
-
-\layout LyX-Code
-
-prop = icalproperty_new_uid(''guid-1.host1.com'') );
-\layout LyX-Code
-
-icalcomponent_add_property(event,prop);
-\layout LyX-Code
-
-\layout LyX-Code
-
-prop=icalproperty_new_organizer(''mrbig@host.com'');
-\layout LyX-Code
-
-param = icalparameter_new_role(ICAL_ROLE_CHAIR)
-\layout LyX-Code
-
-icalproperty_add_parameter(prop, param);
-\layout LyX-Code
-
-\layout LyX-Code
-
-icalcomponent_add_property(event,prop);
-\layout Standard
-
-Notice that libical uses a semi-object-oriented style of interface.
- Most things you work with are objects, that are instantiated with a constructor
- that has
-\begin_inset Quotes eld
-\end_inset
-
-new
-\begin_inset Quotes erd
-\end_inset
-
- in the name.
- Also note that, other than the object reference, most structure data is
- passed in to libical routines by value.
- Libical has some complex but very regular memory handling rules.
- These are detailed in section
-\begin_inset LatexCommand \ref{sec:memory}
-
-\end_inset
-
-.
-\layout Standard
-
-If any of the constructors fail, they will return 0.
- If you try to insert 0 into a property or component, or use a zero-valued
- object reference, libical will either silently ignore the error or will
- abort with an error message.
- This behavior is controlled by a compile time flag (ICAL_ERRORS_ARE_FATAL),
- and will abort by default.
-
-\layout Subsubsection
-
-vaargs Constructors
-\layout Standard
-
-There is another way to create complex components, which is arguably more
- elegant, if you are not horrified by varargs.
- The varargs constructor interface allows you to create intricate components
- in a single block of code.
- Here is the previous examples in the vaargs style.
-
-\layout LyX-Code
-
- calendar =
-\layout LyX-Code
-
- icalcomponent_vanew(
-\layout LyX-Code
-
- ICAL_VCALENDAR_COMPONENT,
-\layout LyX-Code
-
- icalproperty_new_version(''2.0''),
-\layout LyX-Code
-
- icalproperty_new_prodid(
-\layout LyX-Code
-
- ''-//RDU Software//NONSGML HandCal//EN''),
-\layout LyX-Code
-
- icalcomponent_vanew(
-\layout LyX-Code
-
- ICAL_VEVENT_COMPONENT,
-\layout LyX-Code
-
- icalproperty_new_dtstamp(atime),
-\layout LyX-Code
-
- icalproperty_new_uid(''guid-1.host1.com''),
-\layout LyX-Code
-
- icalproperty_vanew_organizer(
-\layout LyX-Code
-
- ''mrbig@host.com''),
-\layout LyX-Code
-
- icalparameter_new_role(ICAL_ROLE_CHAIR),
-\layout LyX-Code
-
- 0
-\layout LyX-Code
-
- ),
-\layout LyX-Code
-
- icalproperty_vanew_attendee(
-\layout LyX-Code
-
- ''employee-A@host.com'',
-\layout LyX-Code
-
- icalparameter_new_role(
-\layout LyX-Code
-
- ICAL_ROLE_REQPARTICIPANT),
-\layout LyX-Code
-
- icalparameter_new_rsvp(1),
-\layout LyX-Code
-
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
-\layout LyX-Code
-
- 0
-\layout LyX-Code
-
- ),
-\layout LyX-Code
-
- icalproperty_new_location(
-\layout LyX-Code
-
- "1CP Conference Room 4350"),
-\layout LyX-Code
-
- 0
-\layout LyX-Code
-
- ),
-\layout LyX-Code
-
- 0
-\layout LyX-Code
-
- );
-\layout Standard
-
-This form is similar to the constructor form , except that the constructors
- have
-\begin_inset Quotes eld
-\end_inset
-
-vanew
-\begin_inset Quotes erd
-\end_inset
-
- instead of
-\begin_inset Quotes eld
-\end_inset
-
-new
-\begin_inset Quotes erd
-\end_inset
-
- in the name.
- The arguments are similar too, except that the component constructor can
- have a list of properties, and the property constructor can have a list
- of parameters.
- Be sure to terminate every list with a '0', or your code will crash, if
- you are lucky.
-
-\layout Subsubsection
-
-Parsing Text
-\layout Standard
-
-Several routines are available for generating objects from text.
- For properties, use:
-\layout LyX-Code
-
-icalproperty* p;
-\layout LyX-Code
-
-p = icalproperty_new_from_string("DTSTART:19970101T120000Z
-\backslash
-n");
-\layout Standard
-
-For parameters, use:
-\layout LyX-Code
-
-icalparameter *param
-\layout LyX-Code
-
-param = icalparameter_new_from_string("PARTSTAT=ACCEPTED");
-\layout Standard
-
-The final way to create components will probably be the most common; you
- can create components from RFC2445 compliant text.
- If you have the string in memory, use
-\layout LyX-Code
-
-icalcomponent* icalcomponent_new_from_string(char* str);
-\layout Standard
-
-If the string contains only one component, the routine will return the component
- in libical form.
- If the string contains multiple components, the multiple components will
- be returned as the children of an ICAL_XROOT_COMPONENT component.
- This routine is identical to ( and actually uses ) icalparser_parse_string(char
-* str).
-\layout Standard
-
-Parsing a whole string may seem wasteful if you want to pull a large component
- off of the network or from a file; you may prefer to parse the component
- line by line.
- This is possible too by using:
-\layout LyX-Code
-
-icalparser* icalparser_new();
-\layout LyX-Code
-
-void icalparser_free(icalparser* parser);
-\layout LyX-Code
-
-icalparser_get_line(parser,read_stream);
-\layout LyX-Code
-
-icalparser_add_line(parser,line);
-\layout LyX-Code
-
-icalparser_set_gen_data(parser,stream)
-\layout Standard
-
-These routines will construct a parser object to which you can add lines
- of input and retrieve any components that the parser creates from the input.
- These routines work by specifing an adaptor routine to get string data
- from a source.
- For an example:
-\layout LyX-Code
-
-char* read_stream(char *s, size_t size, void *d)
-\layout LyX-Code
-
-{
-\layout LyX-Code
-
- char *c = fgets(s,size, (FILE*)d);
-\layout LyX-Code
-
- return c;
-\layout LyX-Code
-
-}
-\layout LyX-Code
-
-main() {
-\layout LyX-Code
-
- char* line;
-\layout LyX-Code
-
- icalcomponent *c;
-\layout LyX-Code
-
- icalparser *parser = icalparser_new();
-\layout LyX-Code
-
- FILE* stream = fopen(argv[1],"r");
-\layout LyX-Code
-
- icalparser_set_gen_data(parser,stream);
-\layout LyX-Code
-
- do{
-\layout LyX-Code
-
- line = icalparser_get_line(parser,read_stream);
-\layout LyX-Code
-
- c = icalparser_add_line(parser,line);
-\layout LyX-Code
-
- if (c != 0){
-\layout LyX-Code
-
- printf("%s",icalcomponent_as_ical_string(c));
-\layout LyX-Code
-
- icalparser_claim(parser);
-\layout LyX-Code
-
- printf("
-\backslash
-n---------------
-\backslash
-n");
-\layout LyX-Code
-
- icalcomponent_free(c);
-\layout LyX-Code
-
- }
-\layout LyX-Code
-
- } while ( line != 0);
-\layout LyX-Code
-
-}
-\layout Standard
-
-The parser object parameterizes the routine used to get input lines with
- icalparser_set_gen_data() and
-\emph on
-
-\emph default
-icalparser_get_line().
- In this example, the routine read_stream() will fetch the next line from
- a stream, with the stream passed in as the void* parameter d.
- The parser calls read_stream() from icalparser_get_line(), but it also
- needs to know what stream to use.
- This is set by the call to icalparser_set_gen_data().
- By using a different routine for read_stream or passing in different data
- with icalparser_set_gen_data, you can connect to any data source.
-
-\layout Standard
-
-Using the same mechanism, other implementations could read from memory buffers,
- sockets or other interfaces.
-
-\layout Standard
-
-Since the example code is a very common way to use the parser, there is
- a convenience routine;
-\layout LyX-Code
-
-icalcomponent* icalparser_parse(icalparser *parser,
-\layout LyX-Code
-
- char* (*line_gen_func)(char *s, size_t size, void* d))
-\layout Standard
-
-To use this routine, you still must construct the parser object and pass
- in a reference to a line reading routine.
- If the parser can create a single component from the input, it will return
- a pointer to the newly constructed component.
- If the parser can construct multiple components from the input, it will
- return a reference to an XROOT component ( of type ICAL_XROOT_COMPONENT.)
- This XROOT component will hold all of the components constructed from the
- input as children.
-
-\layout Subsection
-
-Accessing Components
-\layout Standard
-
-Given a reference to a component, you probably will want to access the propertie
-s, parameters and values inside.
- Libical interfaces let you find sub-components, add and remove sub-components,
- and do the same three operations on properties.
-
-\layout Subsubsection
-
-Finding Components
-\layout Standard
-
-To find a sub-component of a component, use:
-\layout LyX-Code
-
-icalcomponent* icalcomponent_get_first_component(
-\layout LyX-Code
-
- icalcomponent* component,
-\layout LyX-Code
-
- icalcomponent_kind kind);
-\layout Standard
-
-This routine will return a reference to the first component of the type
- 'kind.' The key kind values, listed in icalenums.h are:
-\layout LyX-Code
-
-ICAL_ANY_COMPONENT
-\layout LyX-Code
-
-ICAL_VEVENT_COMPONENT
-\layout LyX-Code
-
-ICAL_VTODO_COMPONENT
-\layout LyX-Code
-
-ICAL_VJOURNAL_COMPONENT
-\layout LyX-Code
-
-ICAL_VCALENDAR_COMPONENT
-\layout LyX-Code
-
-ICAL_VFREEBUSY_COMPONENT
-\layout LyX-Code
-
-ICAL_VALARM_COMPONENT
-\layout Standard
-
-These are only the most common components; there are many more listed in
- icalenums.h.
-\layout Standard
-
-As you might guess, if there is more than one subcomponent of the type you
- have chosen, this routine will return only the first.
- to get at the others, you need to iterate through the component.
-
-\layout Subsubsection
-
-Iterating Through Components
-\layout Standard
-
-Iteration requires a second routine to get the next subcomponent after the
- first:
-\layout LyX-Code
-
-icalcomponent* icalcomponent_get_next_component(
-\layout LyX-Code
-
- icalcomponent* component,
-\layout LyX-Code
-
- icalcomponent_kind kind);
-\layout Standard
-
-With the 'first' and 'next' routines, you can create a for loop to iterate
- through all of a components subcomponents
-\layout LyX-Code
-
- for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
-\layout LyX-Code
-
- c != 0;
-\layout LyX-Code
-
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT))
-\layout LyX-Code
-
-{
-\layout LyX-Code
-
- do_something(c);
-\layout LyX-Code
-
-}
-\layout Standard
-
-This code bit wil iterate through all of the subcomponents in 'comp' but
- you can select a specific type of component by changing ICAL_ANY_COMPONENT
- to another component type.
-\layout Subsubsection
-
-Using Component Iterators
-\layout Standard
-
-The iteration model in the previous section requires the component to keep
- the state of the iteration.
- So, you could not use this model to perform a sorting operations, since
- you'd need two iterators and there is only space for one.
- If you ever call icalcomponent_get_first_component() when an iteration
- is in progress, the pointer will be reset to the beginning.
-
-\layout Standard
-
-To solve this problem, there are also external iterators for components.
- The routines associated with these external iterators are:
-\layout LyX-Code
-
-icalcompiter icalcomponent_begin_component(icalcomponent* component, icalcompone
-nt_kind kind);
-\layout LyX-Code
-
-icalcompiter icalcomponent_end_component(icalcomponent* component, icalcomponent
-_kind kind);
-\layout LyX-Code
-
-icalcomponent* icalcompiter_next(icalcompiter* i);
-\layout LyX-Code
-
-icalcomponent* icalcompiter_prior(icalcompiter* i);
-\layout LyX-Code
-
-icalcomponent* icalcompiter_deref(icalcompiter* i);
-\layout Standard
-
-The _begin_() and _end_() routines return a new iterator that points to
- the beginning and ending of the list of subcomponent for the given component,
- and the kind argument works like the kind argument for internal iterators.
-
-\layout Standard
-
-After creating an iterators, use _next_() and _prior_() to step forward
- and backward through the list and get the component that the iterator points
- to, and use _deref() to return the component that the iterator points to
- without moving the iterator.
- All routines will return 0 when they move to point off the end of the list.
-
-\layout Standard
-
-Here is an example of a loop using these routines:
-\layout LyX-Code
-
-for(
-\layout LyX-Code
-
- i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
-
-\layout LyX-Code
-
- icalcompiter_deref(&i)!= 0;
-\layout LyX-Code
-
- icalcompiter_next(&i)
-\layout LyX-Code
-
-) {
-\layout LyX-Code
-
- icalcomponent *this = icalcompiter_deref(&i);
-\layout LyX-Code
-
-}
-\layout Subsubsection
-
-Removing Components
-\layout Standard
-
-Removing an element from a list while iterating through the list with the
- internal iterators can cause problems, since you will probably be removing
- the element that the internal iterator points to.
- The _remove() routine will keep the iterator valid by moving it to the
- next component, but in a normal loop, this will result in two advances
- per iteration, and you will remove only every other component.
- To avoid the problem, you will need to step the iterator ahead of the
- element you are going to remove, like this:
-\layout LyX-Code
-
-for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT);
-
-\layout LyX-Code
-
- c != 0;
-\layout LyX-Code
-
- c = next
-\layout LyX-Code
-
-{
-\layout LyX-Code
-
- next = icalcomponent_get_next_component(parent_comp,ICAL_ANY_COMPONENT);
-\layout LyX-Code
-
- icalcomponent_remove_component(parent_comp,c);
-\layout LyX-Code
-
-}
-\layout Standard
-
-Another way to remove components is to rely on the side effect of icalcomponent_
-remove_component: if component iterator in the parent component is pointing
- to the child that will be removed, it will move the iterator to the component
- after the child.
- The following code will exploit this behavior:
-\layout LyX-Code
-
-icalcomponent_get_first_component(parent_comp,ICAL_VEVENT_COMPONENT);
-\layout LyX-Code
-
-while((c=icalcomponent_get_current_component(c)) != 0 ){
-\layout LyX-Code
-
- if(icalcomponent_isa(c) == ICAL_VEVENT_COMPONENT){
-\layout LyX-Code
-
- icalcomponent_remove_component(parent_comp,inner);
-\layout LyX-Code
-
- } else {
-\layout LyX-Code
-
- icalcomponent_get_next_component(parent_comp,ICAL_VEVENT_COMPONENT);
-
-\layout LyX-Code
-
- }
-\layout LyX-Code
-
-}
-\layout Subsubsection
-
-Working with properties and parameters
-\layout Standard
-
-Finding, iterating and removing properties works the same as it does for
- components, using the property-specific or parameter-specific interfaces:
-
-\layout LyX-Code
-
-icalproperty* icalcomponent_get_first_property(
-\layout LyX-Code
-
- icalcomponent* component,
-\layout LyX-Code
-
- icalproperty_kind kind);
-\layout LyX-Code
-
-icalproperty* icalcomponent_get_next_property(
-\layout LyX-Code
-
- icalcomponent* component,
-\layout LyX-Code
-
- icalproperty_kind kind);
-\layout LyX-Code
-
-void icalcomponent_add_property(
-\layout LyX-Code
-
- icalcomponent* component,
-\layout LyX-Code
-
- icalproperty* property);
-\layout LyX-Code
-
-void icalcomponent_remove_property(
-\layout LyX-Code
-
- icalcomponent* component,
-\layout LyX-Code
-
- icalproperty* property);
-\layout Standard
-
-For parameters:
-\layout LyX-Code
-
-icalparameter* icalproperty_get_first_parameter(
-\layout LyX-Code
-
- icalproperty* prop,
-\layout LyX-Code
-
- icalparameter_kind kind);
-\layout LyX-Code
-
-icalparameter* icalproperty_get_next_parameter(
-\layout LyX-Code
-
- icalproperty* prop,
-\layout LyX-Code
-
- icalparameter_kind kind);
-\layout LyX-Code
-
-void icalproperty_add_parameter(
-\layout LyX-Code
-
- icalproperty* prop,
-\layout LyX-Code
-
- icalparameter* parameter);
-\layout LyX-Code
-
-void icalproperty_remove_parameter(
-\layout LyX-Code
-
- icalproperty* prop,
-\layout LyX-Code
-
- icalparameter_kind kind);
-\layout Standard
-
-Note that since there should be only one parameter of each type in a property,
- you will rarely need to use icalparameter_get_nect_paameter.
-\layout Subsubsection
-
-Working with values
-\layout Standard
-
-Values are typically part of a property, although they can exist on their
- own.
- You can manipulate them either as part of the property or independently.
-\layout Standard
-
-The most common way to work with values to is to manipulate them from they
- properties that contain them.
- This involves fewer routine calls and intermediate variables than working
- with them independently, and it is type-safe.
-
-\layout Standard
-
-For each property, there are a _get_ and a _set_ routine that access the
- internal value.
- For instanace, for the UID property, the routines are:
-\layout LyX-Code
-
-void icalproperty_set_uid(icalproperty* prop, const char* v)
-\layout LyX-Code
-
-const char* icalproperty_get_uid(icalproperty* prop)
-\layout Standard
-
-For multi-valued properties, like ATTACH, the value type is usually a struct
- or union that holds both possible types.
-
-\layout Standard
-
-If you want to work with the underlying value object, you can get and set
- it with:
-\layout LyX-Code
-
-icalvalue* icalproperty_get_value (icalproperty* prop)
-\layout LyX-Code
-
-void icalproperty_set_value(icalproperty* prop, icalvalue* value);
-\layout Standard
-
-Icalproperty_get_value() will return a reference that you can manipulate
- with other icalvalue routines.
- Most of the time, you will have to know what the type of the value is.
- For instance, if you know that the value is a DATETIME type, you can manipulate
- it with:
-\layout LyX-Code
-
-struct icaltimetype icalvalue_get_datetime(icalvalue* value);
-\layout LyX-Code
-
-void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
-\layout Standard
-
-When working with an extension property or value (and X-PROPERTY or a property
- that has the parameter VALUE=x-name ) the value type is always a string.
- To get and set the value, use:
-\layout LyX-Code
-
-void icalproperty_set_x(icalproperty* prop, char* v);
-\layout LyX-Code
-
-char* icalproperty_get_x(icalproperty* prop);
-\layout Standard
-
-All X properties have the type of ICAL_X_PROPERTY, so you will need these
- routines to get and set the name of the property:
-\layout LyX-Code
-
-char* icalproperty_get_x_name(icalproperty* prop)
-\layout LyX-Code
-
-void icalproperty_set_x_name(icalproperty* prop, char* name);
-\layout Subsubsection
-
-Checking Component Validity
-\layout Standard
-
-RFC 2446 defines rules for what properties must exist in a component to
- be used for transferring scheduling data.
- Most of these rules relate to the existence of properties relative to the
- METHOD property, which declares what operation a remote receiver should
- use to process a component.
- For instance, if the METHOD is REQUEST and the component is a VEVENT, the
- sender is probably asking the receiver to join in a meeting.
- In this case, RFC2446 says that the component must specify a start time
- (DTSTART) and list the receiver as an attendee (ATTENDEE).
-
-\layout Standard
-
-Libical can check these restrictions with the routine:
-\layout LyX-Code
-
-int icalrestriction_check(icalcomponent* comp);
-\layout Standard
-
-This routine returns 0 if the component does not pass RFC2446 restrictions,
- or if the component is malformed.
- The component you pass in
-\emph on
-must
-\emph default
- be a VCALENDAR, with one or more children, like the examples in RFC2446.
-
-\layout Standard
-
-When this routine runs, it will insert new properties into the component
- to indicate any errors it finds.
- See section 6.5.3, X-LIC-ERROR for more information about these error properties.
-
-\layout Subsubsection
-
-Converting Components to Text
-\layout Standard
-
-To create an RFC2445 compliant text representation of an object, use one
- of the *_as_ical_string() routines:
-\layout LyX-Code
-
-char* icalcomponent_as_ical_string (icalcomponent* component)
-\layout LyX-Code
-
-char* icalproperty_as_ical_string (icalproperty* property)
-\layout LyX-Code
-
-char* icalparameter_as_ical_string (icalparameter* parameter)
-\layout LyX-Code
-
-char* icalvalue_as_ical_string (icalvalue* value)
-\layout Standard
-
-In most cases, you will only use icalcomponent_as_ical_string (), since
- it will cascade and convert all of the parameters, properties and values
- that are attached to the root component.
-\layout Standard
-
-Icalproperty_as_ical_string() will terminate each line with the RFC2445
- specified line terminator
-\begin_inset Quotes eld
-\end_inset
-
-
-\backslash
-
-\backslash
-n
-\begin_inset Quotes erd
-\end_inset
-
- However, if you compile with the symbol ICAL_UNIX_NEWLINE undefined, (
- it is defined by default) it will terminate lines with
-\begin_inset Quotes eld
-\end_inset
-
-
-\backslash
-
-\backslash
-n
-\backslash
-
-\backslash
-r
-\begin_inset Quotes erd
-\end_inset
-
-
-\layout Standard
-
-Remember that the string returned by these routines is owned by the library,
- and will eventually be re-written.
- You should copy it if you want to preserve it.
-
-\layout Subsection
-
-Time
-\layout Subsubsection
-
-Time structure
-\layout Standard
-
-LIbical defines it's own time structure for storing all dates and times.
- It would have been nice to re-use the C library's
-\emph on
-struct tm,
-\emph default
-but that structure does not differentiate between dates and times, and between
- local time and UTC.
- The libical structure is:
-\layout LyX-Code
-
-struct icaltimetype {
-\layout LyX-Code
-
- int year;
-\layout LyX-Code
-
- int month;
-\layout LyX-Code
-
- int day;
-\layout LyX-Code
-
- int hour;
-\layout LyX-Code
-
- int minute;
-\layout LyX-Code
-
- int second;
-\layout LyX-Code
-
- int is_utc; /* 1-> time is in UTC timezone */
-\layout LyX-Code
-
- int is_date; /* 1 -> interpret this as date.
- */ };
-\layout Standard
-
-The year, month, day, hour, minute and second fields hold the broken-out
- time values.
- The is_utc field distinguishes between times in UTC and a local time zone.
- The is_date field indicates if the time should be interpreted only as a
- date.
- If it is a date, the hour, minute and second fields are assumed to be zero,
- regardless of their actual vaules.
-
-\layout Subsubsection
-
-Creating time structures
-\layout Standard
-
-There are several ways to create a new icaltimetype structure:
-\layout LyX-Code
-
-struct icaltimetype icaltime_from_string(const char* str);
-\layout LyX-Code
-
-struct icaltimetype icaltime_from_timet(time_t v, int is_date);
-\layout LyX-Code
-
-\layout Standard
-
-Icaltime_from_string takes any RFC2445 compliant time string:
-\layout LyX-Code
-
-struct icaltimetype tt = icaltime_from_string("19970101T103000");
-\layout Standard
-
-Icaltime_from_timet takes a timet value, representing seconds past the POSIX
- epoch, and a flag to indicate if the time is a date.
- Dates have an identical structure to a time, but the time portion ( hours,
- minuts and seconds ) is always 00:00:00.
- Dates act differently in sorting an comparision, and they have a different
- string representation in RFC2445.
-
-\layout Subsubsection
-
-Time manipulating routines
-\layout Standard
-
-The null time value is used to indicate that the data in the structure is
- not a valid time.
-\layout LyX-Code
-
-struct icaltimetype icaltime_null_time(void);
-\layout LyX-Code
-
-int icaltime_is_null_time(struct icaltimetype t);
-\layout Standard
-
-It is sensible for the broken-out time fields to contain values that are
- not permitted in an ISO compliant time string.
- For instance, the seconds field can hold values greater than 59, and the
- hours field can hold values larger than 24.
- The excessive values will be rolled over into the next larger field when
- the structure is normalized.
-
-\layout LyX-Code
-
-struct icaltimetype icaltime_normalize(struct icaltimetype t);
-\layout Standard
-
-Normalizing allows you to do arithmetic operations on time values.
-
-\layout LyX-Code
-
-struct icaltimetype tt = icaltime_from_string(
-\begin_inset Quotes eld
-\end_inset
-
-19970101T103000
-\begin_inset Quotes erd
-\end_inset
-
-);
-\layout LyX-Code
-
-tt.days +=3
-\layout LyX-Code
-
-tt.second += 70;
-\layout LyX-Code
-
-tt = icaltime_normalize(tt);
-\layout Standard
-
-There are several routines to get the day of the week or month, etc, from
- a time structure.
-\layout LyX-Code
-
-short icaltime_day_of_year(struct icaltimetype t);
-\layout LyX-Code
-
-struct icaltimetype icaltime_from_day_of_year(short doy, short year);
-\layout LyX-Code
-
-short icaltime_day_of_week(struct icaltimetype t);
-\layout LyX-Code
-
-short icaltime_start_doy_of_week(struct icaltimetype t);
-\layout LyX-Code
-
-short icaltime_week_number(short day_of_month, short month, short year);
-\layout LyX-Code
-
-struct icaltimetype icaltime_from_week_number(short week_number, short year);
-\layout LyX-Code
-
-short icaltime_days_in_month(short month,short year);
-\layout Standard
-
-Two routines convert time structures to and from the number of seconds since
- the POSIX epoch.
- The is_date field indicates whether or not the hour, minute and second
- fields should be used in the conversion.
-\layout LyX-Code
-
-struct icaltimetype icaltime_from_timet(time_t v, int is_date);
-\layout LyX-Code
-
-time_t icaltime_as_timet(struct icaltimetype);
-\layout Standard
-
-The compare routine works exactly like strcmp, but on time structures.
-
-\layout LyX-Code
-
-int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
-\layout Standard
-
-The following routines convert between UTC and a named timezone.
- The tzid field must be a timezone name from the Olsen database, such as
-
-\begin_inset Quotes eld
-\end_inset
-
-America/Los_Angeles.
-\begin_inset Quotes erd
-\end_inset
-
-
-\layout Standard
-
-The utc_offset routine returns the offset of the named time zone from UTC,
- in seconds.
-
-\layout Standard
-
-The tt parameter in the following routines indicates the date on which the
- conversion should be made.
- The tt parameter is necessary because timezones have many different rules
- for when daylight savings time is used, and these rules can change over
- time.
- So, for a single timezone one year may have daylight savings time on March
- 15, but for other years March 15 may be standard time, and some years may
- have standard time all year.
-
-\layout LyX-Code
-
-int icaltime_utc_offset(struct icaltimetype tt, char* tzid);
-\layout LyX-Code
-
-int icaltime_local_utc_offset();
-\layout LyX-Code
-
-struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid);
-\layout LyX-Code
-
-struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid);
-\layout LyX-Code
-
-struct icaltimetype icaltime_as_local(struct icaltimetype tt);
-\layout Subsection
-
-Storing Objects
-\layout Standard
-
-The libical distribution includes a separate library, libicalss, that allows
- you to store iCal component data to disk in a variety of ways.
- This library also includes code to implement the CSTP protocol of CAP and
- has some routines for deciphering incomming messages.
-
-\layout Standard
-
-The file storage routines are organized in an inheritance heirarchy that
- is rooted in icalset, with the derived class icalfileset and icaldirset.
- Icalfileset stores components to a file, while icaldirset stores components
- to multiple files, one per month based on DTSTAMP.
- Other storages classess, for storage to a heap or a mysql database are
- planned for the future.
-
-\layout Standard
-
-All of the icalset derived classes have the same interface:
-\layout LyX-Code
-
-\layout LyX-Code
-
-icaldirset* icaldirset_new(const char* path);
-\layout LyX-Code
-
-void icaldirset_free(icaldirset* store);
-\layout LyX-Code
-
-const char* icaldirset_path(icaldirset* store);
-\layout LyX-Code
-
-void icaldirset_mark(icaldirset* store);
-\layout LyX-Code
-
-icalerrorenum icaldirset_commit(icaldirset* store);
-\layout LyX-Code
-
-icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent*
- comp);
-\layout LyX-Code
-
-icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent*
- comp);
-\layout LyX-Code
-
-int icaldirset_count_components(icaldirset* store, icalcomponent_kind kind);
-\layout LyX-Code
-
-icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge);
-\layout LyX-Code
-
-void icaldirset_clear(icaldirset* store);
-\layout LyX-Code
-
-icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid);
-\layout LyX-Code
-
-int icaldirset_has_uid(icaldirset* store, const char* uid);
-\layout LyX-Code
-
-icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c);
-\layout LyX-Code
-
-icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc,
- icalcomponent *newc);
-\layout LyX-Code
-
-icalcomponent* icaldirset_get_current_component(icaldirset* store);
-\layout LyX-Code
-
-icalcomponent* icaldirset_get_first_component(icaldirset* store);
-\layout LyX-Code
-
-icalcomponent* icaldirset_get_next_component(icaldirset* store);
-\layout Subsubsection
-
-Creating a new set
-\layout Standard
-
-You can create a new set from either the base class or the direved class.
- From the base class use one of:
-\layout LyX-Code
-
-icalset* icalset_new_file(const char* path);
-\layout LyX-Code
-
-icalset* icalset_new_dir(const char* path);
-\layout LyX-Code
-
-icalset* icalset_new_heap(void);
-\layout LyX-Code
-
-icalset* icalset_new_mysql(const char* path);
-\layout Standard
-
-You can also create a new set based on the derived class, For instance,
- with icalfileset:
-\layout LyX-Code
-
-icalfileset* icalfileset_new(const char* path);
-\layout LyX-Code
-
-icalfileset* icalfileset_new_open(const char* path, int flags, mode_t mode);
-\layout Standard
-
-Icaset_new_file is identical to icalfileset_new.
- BOth routines will open an existing file for readinga and writing, or create
- a new file if it does not exist.
- Icalfilset_new_open takes the same arguments as the open() system routine
- and behaves in the same way.
-
-\layout Standard
-
-The icalset and icalfilset objects are somewhat interchangable -- you can
- use an icalfileset* as an argument to any of the icalset routines.
-\layout Standard
-
-The following examples will all use icalfileset routines; using the other
- icalset derived classess will be similar.
-
-\layout Subsubsection
-
-Adding, Finding and Removing Components
-\layout Standard
-
-To add components to a set, use:
-\layout LyX-Code
-
-icalerrorenum icalfileset_add_component(icalfileset* cluster, icalcomponent*
- child);
-\layout Standard
-
-The fileset keeps an inmemory copy of the components, and this set must
- be written back to the file ocassionally.
- There are two routines to manage this:
-\layout LyX-Code
-
-void icalfileset_mark(icalfileset* cluster);
-\layout LyX-Code
-
-icalerrorenum icalfileset_commit(icalfileset* cluster);
-\layout Standard
-
-Icalfileset_mark indicates that the in-memory components have changed.
- Calling the _add_component routine will call _mark automatically, but you
- may need to call it yourself if you have made a change to an existing component.
- The _commit routine writes the data base to disk, but only if it is marked.
- The _commit routine is called automatically when the icalfileset is freed.
-
-\layout Standard
-
-To iterate through the components in a set, use:
-\layout LyX-Code
-
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster);
-\layout LyX-Code
-
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster);
-\layout LyX-Code
-
-icalcomponent* icalfileset_get_current_component (icalfileset* cluster);
-
-\layout Standard
-
-These routines work like the corresponding routines from icalcomponent,
- except that their output is filtered through a gauge.
- A gauge is a test for the properties within a components; only components
- that pass the test are returned.
- A gauge can be constructed from a MINSQL string with:
-\layout LyX-Code
-
-icalgauge* icalgauge_new_from_sql(char* sql);
-\layout Standard
-
-Then, you can add the gauge to the set with :
-\layout LyX-Code
-
-icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge);
-\layout Standard
-
-Here is an example that puts all of these routines together:
-\layout LyX-Code
-
-
-\latex no_latex
-void test_fileset()
-\layout LyX-Code
-
-
-\latex no_latex
-{
-\layout LyX-Code
-
-
-\latex no_latex
- icalfileset *fs;
-\layout LyX-Code
-
-
-\latex no_latex
- icalcomponent *c;
-\layout LyX-Code
-
-
-\latex no_latex
- int i;
-\layout LyX-Code
-
-
-\latex no_latex
- char *path = "test_fileset.ics";
-\layout LyX-Code
-
-
-\latex no_latex
- icalgauge *g = icalgauge_new_from_sql(
-\layout LyX-Code
-
-
-\latex no_latex
- "SELECT * FROM VEVENT WHERE DTSTART > '20000103T120000Z' AND DTSTART
- <= '20000106T120000Z'");
-\layout LyX-Code
-
-
-\latex no_latex
-
-\layout LyX-Code
-
-
-\latex no_latex
-fs = icalfileset_new(path);
-\layout LyX-Code
-
-
-\layout LyX-Code
-
-
-\latex no_latex
-for (i = 0; i!= 10; i++){
-\layout LyX-Code
-
-
-\latex no_latex
- c = make_component(i);
-\latex default
- /* Make a new component where DTSTART has month of i */
-\layout LyX-Code
-
-
-\latex no_latex
- icalfileset_add_component(fs,c);
-\layout LyX-Code
-
-
-\latex no_latex
- }
-\layout LyX-Code
-
-\layout LyX-Code
-
-
-\latex no_latex
- icalfileset_commit(fs);
-\latex default
- /* Write to disk */
-\layout LyX-Code
-
-\layout LyX-Code
-
-
-\latex no_latex
- icalfileset_select(fs,g);
-\latex default
- /* Set the gauge to filter components */
-\layout LyX-Code
-
-
-\latex no_latex
-
-\layout LyX-Code
-
-
-\latex no_latex
- for (c = icalfileset_get_first_component(fs);
-\layout LyX-Code
-
-
-\latex no_latex
- c != 0;
-\layout LyX-Code
-
-
-\latex no_latex
- c = icalfileset_get_next_component(fs)){
-\layout LyX-Code
-
-
-\latex no_latex
- struct icaltimetype t = icalcomponent_get_dtstart(c);
-\layout LyX-Code
-
-
-\latex no_latex
-
-\layout LyX-Code
-
-
-\latex no_latex
- printf("%s
-\backslash
-n",icaltime_as_ctime(t));
-\layout LyX-Code
-
-
-\latex no_latex
- }
-\layout LyX-Code
-
-
-\latex no_latex
-icalfileset_free(fs);
-\layout LyX-Code
-
-
-\latex no_latex
-}
-\layout Subsubsection
-
-Other routines
-\layout Standard
-
-There are several other routines in the icalset interface, but they not
- fully implemented yet.
-
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{sec:memory}
-
-\end_inset
-
-Memory Management
-\layout Standard
-
-Libical relies heavily on dynamic allocation for both the core objects and
- for the strings used to hold values.
- Some of this memory the library caller owns and must free, and some of
- the memory is managed by the library.
- Here is a summary of the memory rules.
-
-\layout Description
-
-1) If the function name has "new" in it, the caller gets control of the
- memory.
- ( such as icalcomponent_new(), or icalproperty_new_clone() )
-\layout Description
-
-2) If you got the memory from a routine with new in it, you must call the
- corresponding *_free routine to free the memory.
- ( Use icalcomponent_free() to free objects created with icalcomponent_new())
-
-\layout Description
-
-3) If the function name has "add" in it, the caller is transferring control
- of the memory to the routine.
- ( icalproperty_add_parameter() )
-\layout Description
-
-4) If the function name has "remove" in it, the caller passes in a pointer
- to an object and after the call returns, the caller owns the object.
- So, before you call icalcomponent_remove_property(comp,foo), you do not
- own "foo" and after the call returns, you do.
-
-\layout Description
-
-5) If the routine returns a string, libical owns the memory and will put
- it on a ring buffer to reclaim later.
- For example, icalcomponent_as_ical_string().
- You'd better strdup() it if you want to keep it, and you don't have to
- delete it.
-
-\layout Subsection
-
-Error Handling
-\layout Standard
-
-Libical has several error handling mechanisms for the various types of programmi
-ng, semantic and syntactic errors you may encounter.
-\layout Subsubsection
-
-Return values
-\layout Standard
-
-Many library routines signal errors through their return values.
- All routines that return a pointer, such as icalcomponent_new(), will return
- 0 ( zero ) on a fatal error.
- Some routines will return a value of enum icalerrorenum.
-
-\layout Subsubsection
-
-icalerrno
-\layout Standard
-
-Most routines will set the global error value icalerrno on errors.
- This variable is an enumeration; permissible values can be found in libical/ica
-lerror.h.
- If the routine returns an enum icalerrorenum, then the return value will
- be the same as icalerrno.
- You can use icalerror_strerror() to get a string that describes the error.
- The enumerations are:
-\layout Standard
-\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
-multicol5
-12 2 0 0 -1 -1 -1 -1
-1 1 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 0 0 0
-1 1 0 0
-2 1 0 "" ""
-2 1 1 "" ""
-0 8 1 0 0 0 0 "" ""
-0 8 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-
-
-\newline
-
-\newline
-ICAL_BADARG_ERROR
-\newline
-One of the argument to a routine was bad.
- Typically for a null pointer.
-\newline
-ICAL_NEWFAILED_ERROR
-\newline
-A new() or malloc() failed
-\newline
-ICAL_MALFORMEDDATA_ERROR
-\newline
-An input string was not in the correct format
-\newline
-ICAL_PARSE_ERROR
-\newline
-the parser failed to parse an incomming component
-\newline
-ICAL_INTERNAL_ERROR
-\newline
-Largely equivalent to an assert; it indicates a bug in the libical code
-\newline
-ICAL_FILE_ERROR
-\newline
-A file operation failed.
- Check errno for more detai
-\newline
-ICAL_ALLOCATION_ERROR
-\newline
-
-\newline
-ICAL_NO_ERROR
-\newline
-No error has occured
-\newline
-ICAL_TIMEDOUT_ERROR
-\newline
-Failed to acquire a lock on a file, or the CSTP protocol timed out.
-
-\newline
-ICAL_MULTIPLEINCLUSION_ERROR
-\newline
-
-\newline
-ICAL_UNKNOWN_ERROR
-\newline
-
-\layout Subsubsection
-
-X-LIC-ERROR and X-LIC-INVALID-COMPONENT
-\layout Standard
-
-The library handles semantic and syntactic errors in components by inserting
- errors properties into the components.
- If the parser cannot parse incoming text ( a syntactic error ) or if the
- icalrestriction_check() routine indicates that the component does not meet
- the requirements of RFC2446 ( a semantic error) the library will insert
- properties of the type X-LIC-ERROR to describe the error.
- Here is an example of the error property:
-\layout LyX-Code
-
-X-LIC-ERROR;X-LIC-ERRORTYPE=INVALID_ITIP :Failed iTIP restrictions for property
- DTSTART.
-
-\layout LyX-Code
-
-Expected 1 instances of the property and got 0
-\layout Standard
-
-This error resulted from a call to icalrestriction_check(), which discovered
- that the component does not have a DTSTART property, as required by RFC2445.
-
-\layout Standard
-
-There are a few routines to manipulate error properties:
-\layout Standard
-\LyXTable
-multicol5
-10 2 0 0 -1 -1 -1 -1
-1 1 0 0
-0 0 0 0
-0 1 1 0
-0 0 0 0
-0 1 1 0
-0 1 0 0
-0 1 1 0
-0 1 0 0
-0 1 1 0
-0 1 1 0
-2 1 1 "" ""
-2 1 1 "3in" ""
-0 2 1 1 0 0 0 "" ""
-0 8 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 1 0 1 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 1 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 1 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 1 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 1 1 0 1 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 1 1 0 1 "" ""
-0 2 1 0 0 0 0 "" ""
-0 2 1 1 0 0 1 "" ""
-
-Routine
-\newline
-Purpose
-\newline
-void icalrestriction_check()
-\newline
-Check a component against RFC2446 and insert
-\newline
-
-\newline
-error properties to indicate non compliance
-\newline
-int icalcomponent_count_errors()
-\newline
-Return the number of error properties
-\newline
-
-\newline
-in a component
-\newline
-void icalcomponent_strip_errors()
-\newline
-Remove all error properties in as
-\newline
-
-\newline
-component
-\newline
-void icalcomponent_convert_errors()
-\newline
-Convert some error properties into
-\newline
-
-\newline
-REQUESTS-STATUS proprties to indicate the inability to
-\newline
-
-\newline
-process the component as an iTIP request.
-
-\layout Standard
-
-The types of errors are listed in icalerror.h.
- They are:
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_COMPONENTPARSEERROR
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_PROPERTYPARSEERROR
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_VALUEPARSEERROR
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_UNKVCALPROP
-\layout LyX-Code
-
-ICAL_XLICERRORTYPE_INVALIDITIP
-\layout Standard
-
-The libical parser will generate the error that end in PARSEERROR when it
- encounters garbage in the input steam.
- ICAL_XLICERRORTYPE_INVALIDITIP is inserted by icalrestriction_check(),
- and ICAL_XLICERRORTYPE_UNKVCALPROP is generated by icalvcal_convert() when
- it encounters a vCal property that it cannot convert or does not know about.
-
-\layout Standard
-
-Icalcomponent_convert_errors() converts some of the error properties in
- a component into REQUEST-STATUS properties that indicate a failure.
- As of libical version0.18, this routine only convert *PARSEERROR errors
- and it always generates a 3.x ( failure ) code.
- This makes it more of a good idea than a really useful bit of code.
-
-\layout Subsubsection
-
-ICAL_ERRORS_ARE_FATAL and icalerror_errors_are_fatal
-\layout Standard
-
-If the global variable icalerror_errors_are_fatal is set to 1, then any
- error condition will cause the program to abort.
- The abort occurs in icalerror_set_errno(), and is done with an assert(0)
- if NDEBUG is undefined, and with icalerror_crash_here if NDEBUG is defined.
- The default value of icalerror_errors_are_fatal is 1 when ICAL_ERRORS_ARE_FATAL
- is defined, and 0 otherwise.
- Since ICAL_ERRORS_ARE_FATAL is defined by default, icalerror_errors_are_fatal
- is also defined by default.
-
-\layout Subsection
-
-Naming Standard
-\layout Standard
-
-Structures that you access with the
-\begin_inset Quotes eld
-\end_inset
-
-struct
-\begin_inset Quotes erd
-\end_inset
-
- keyword, such as
-\begin_inset Quotes eld
-\end_inset
-
-struct icaltimetype
-\begin_inset Quotes erd
-\end_inset
-
- are things that you are allowed to see inside and poke at.
-
-\layout Standard
-
-Structures that you access though a typedef, such as
-\begin_inset Quotes eld
-\end_inset
-
-icalcomponent
-\begin_inset Quotes erd
-\end_inset
-
- are things where all of the data is hidden.
-
-\layout Standard
-
-Component names that start with
-\begin_inset Quotes eld
-\end_inset
-
-V
-\begin_inset Quotes erd
-\end_inset
-
- are part of RFC 2445 or another iCal standard.
- Component names that start with
-\begin_inset Quotes eld
-\end_inset
-
-X
-\begin_inset Quotes erd
-\end_inset
-
- are also part of the spec, but they are not actually components in the
- spec.
- However, they look and act like components, so they are components in libical.
- Names that start with
-\begin_inset Quotes eld
-\end_inset
-
-XLIC
-\begin_inset Quotes erd
-\end_inset
-
- or
-\begin_inset Quotes eld
-\end_inset
-
-X-LIC
-\begin_inset Quotes erd
-\end_inset
-
- are not part of any iCal spec.
- They are used internally by libical.
-
-\layout Standard
-
-Enums that identify a component, property, value or parameter end with
-\begin_inset Quotes eld
-\end_inset
-
-_COMPONENT,
-\begin_inset Quotes erd
-\end_inset
-
-
-\begin_inset Quotes eld
-\end_inset
-
-_PROPERTY,
-\begin_inset Quotes erd
-\end_inset
-
-
-\begin_inset Quotes eld
-\end_inset
-
-_VALUE,
-\begin_inset Quotes erd
-\end_inset
-
- or
-\begin_inset Quotes eld
-\end_inset
-
-_PARAMETER
-\begin_inset Quotes erd
-\end_inset
-
-s
-\layout Standard
-
-Enums that identify a parameter value have the name of the parameter as
- the second word.
- For instance: ICAL_ROLE_REQPARTICIPANT or ICAL_PARTSTAT_ACCEPTED.
-\layout Standard
-
-The enums for the parts of a recurarance rule and request statuses are irregular.
-
-\layout Section
-
-Hacks and Bugs
-\layout Standard
-
-There are a lot of hacks in the library -- bits of code that I am not proud
- of and should probably be changed.
- These are marked with the comment string
-\begin_inset Quotes eld
-\end_inset
-
-HACK.
-\begin_inset Quotes erd
-\end_inset
-
-
-\the_end
diff --git a/libical/doc/UsingLibical.ps b/libical/doc/UsingLibical.ps
deleted file mode 100644
index 6223144e3a..0000000000
--- a/libical/doc/UsingLibical.ps
+++ /dev/null
@@ -1,2327 +0,0 @@
-%!PS-Adobe-2.0
-%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
-%%Title: UsingLibical.dvi
-%%Pages: 22
-%%PageOrder: Ascend
-%%BoundingBox: 0 0 612 792
-%%EndComments
-%DVIPSWebPage: (www.radicaleye.com)
-%DVIPSCommandLine: dvips -t letter -o
-%+ /usr/local/home/eric/proj/FreeAssociation/libical/doc/UsingLibical.ps
-%+ UsingLibical.dvi
-%DVIPSParameters: dpi=600, compressed
-%DVIPSSource: TeX output 2001.01.09:0928
-%%BeginProcSet: texc.pro
-%!
-/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
-N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
-mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
-0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
-landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
-mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
-matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
-exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
-statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
-N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
-/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
-/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
-array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
-df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
-definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
-}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
-B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
-1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
-1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
-0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
-sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
-rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
-gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
-/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
-/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
-A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
-get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
-ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
-fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
-{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
-chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
-1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
-forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
-/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
-}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
-bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
-mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
-SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
-userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
-1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
-index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
-/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
-/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
-(LaserWriter 16/600)]{A length product length le{A length product exch 0
-exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
-end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
-grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
-imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
-exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
-fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
-delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
-B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
-p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
-rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
-
-%%EndProcSet
-TeXDict begin 40258431 52099146 1000 600 600 (UsingLibical.dvi)
-@start
-%DVIPSBitmapFont: Fa ecti1000 10 7
-/Fa 7 118 df<EA03C0EA07F0120F121F13F8A313F0EA07B0EA003013701360A213E013
-C01201EA038013005A120E5A5A5A5A5A0D197A8819>44 D<147F903803FFC090380FC1E0
-90381F0070017E13784913383901F801F83803F003120713E0120FD81FC013F091C7FC48
-5AA2127F90C8FCA35A5AA45AA3153015381578007C14F0007EEB01E0003EEB03C0EC0F80
-6CEB3E00380F81F83803FFE0C690C7FC1D2677A426>99 D<D801E001FEEB07F03C07F803
-FF801FFC3C0E3C0F07C0783E3C1E3E3C03E1E01F261C1F78D9F3C013803C383FF001F780
-0F02E01400007801C013FE007018C002805B4A4848EB1F80EAF07FD8E07E5CA200000207
-143F01FE1700495CA2030F5C0001177E495C18FE031F5C120349DA8001131C18F8033F15
-3C00070403133849020013F0A24B1570000F17E049017E15F019E003FEECE1C0001FEE01
-E34949903800FF000007C70038143C3E2679A444>109 D<3903C003F0390FF01FFC391E
-783C0F381C7C703A3C3EE03F8038383FC0EB7F800078150000701300151CD8F07E90C7FC
-EAE0FE5BA2120012015BA312035BA312075BA3120F5BA3121F5BA3123F90C9FC120E2126
-79A423>114 D<14FE903807FF8090380F83C090383E00E04913F00178137001F813F000
-01130313F0A215E00003EB01C06DC7FC7FEBFFC06C13F814FE6C7F6D13807F010F13C013
-00143F141F140F123E127E00FE1480A348EB1F0012E06C133E00705B6C5B381E03E06CB4
-5AD801FEC7FC1C267AA422>I<EB0380EB07C0130FA4131F1480A3133F1400A35B137E00
-7FB5FCA2B6FC3800FC00A312015BA312035BA312075BA3120F5BA3121FEB801CA2143C00
-3F1338EB0078147014F014E0EB01C0EA3E03381F0780380F0F00EA07FCEA01F0183579B3
-1C>I<13F8D803FEEB01C0D8078FEB03E0390E0F8007121E121C0038140F131F007815C0
-1270013F131F00F0130000E015805BD8007E133FA201FE14005B5D120149137EA215FE12
-0349EBFC0EA20201131E161C15F813E0163CD9F003133814070001ECF07091381EF8F03A
-00F83C78E090393FF03FC090390FC00F00272679A42D>I E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fb ecbx1200 12 42
-/Fb 42 122 df<B612F8A91D097F9A25>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA
-7FFCEA3FF8EA1FF0EA07C00F0F788E1F>I<EC03C01407141F147FEB03FF133FB6FCA413
-C3EA0003B3B3ADB712FCA5264177C038>49 D<ECFFE0010F13FE013F6D7E90B612E00003
-15F82607FC0313FE3A0FE0007FFFD81F806D138048C7000F13C0488001C015E001F07F00
-FF6E13F07F17F881A46C5A6C5A6C5AC9FC17F05DA217E05D17C04B13804B1300A2ED1FFC
-4B5A5E4B5A4B5A4A90C7FC4A5A4A5AEC0FF04A5AEC3F804AC7127814FE495A494814F8D9
-07E014F0495A495A49C8FC017C140149140348B7FC4816E05A5A5A5A5AB8FC17C0A42D41
-7BC038>I<ECFFF0010713FF011F14C0017F14F049C66C7ED803F8EB3FFED807E06D7E81
-D80FF86D138013FE001F16C07FA66C5A6C4815806C485BC814005D5E4B5A4B5A4B5A4A5B
-020F1380902607FFFEC7FC15F815FF16C090C713F0ED3FFCED0FFEEEFF80816F13C017E0
-A26F13F0A217F8A3EA0FC0EA3FF0487EA2487EA217F0A25D17E06C5A494913C05BD83F80
-491380D81FF0491300D80FFEEBFFFE6CB612F800015D6C6C14C0011F49C7FC010113E02D
-427BC038>I<163FA25E5E5D5DA25D5D5D5DA25D92B5FCEC01F7EC03E7140715C7EC0F87
-EC1F07143E147E147C14F8EB01F0EB03E0130714C0EB0F80EB1F00133E5BA25B485A485A
-485A120F5B48C7FC123E5A12FCB91280A5C8000F90C7FCAC027FB61280A531417DC038>
-I<0007150301E0143F01FFEB07FF91B6FC5E5E5E5E5E16804BC7FC5D15E092C8FC01C0C9
-FCAAEC3FF001C1B5FC01C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01F06D13
-804915C0497F6C4815E0C8FC6F13F0A317F8A4EA0F80EA3FE0487E12FF7FA317F05B5D6C
-4815E05B007EC74813C0123E003F4A1380D81FC0491300D80FF0495AD807FEEBFFFC6CB6
-12F0C65D013F1480010F01FCC7FC010113C02D427BC038>I<4AB47E021F13F0027F13FC
-49B6FC01079038807F8090390FFC001FD93FF014C04948137F4948EBFFE048495A5A1400
-485A120FA248486D13C0EE7F80EE1E00003F92C7FCA25B127FA2EC07FC91381FFF8000FF
-017F13E091B512F89039F9F01FFC9039FBC007FE9039FF8003FF17804A6C13C05B6F13E0
-A24915F0A317F85BA4127FA5123FA217F07F121FA2000F4A13E0A26C6C15C06D4913806C
-018014006C6D485A6C9038E01FFC6DB55A011F5C010714C0010191C7FC9038003FF02D42
-7BC038>I<121E121F13FC90B712FEA45A17FC17F817F017E017C0A2481680007EC8EA3F
-00007C157E5E00785D15014B5A00F84A5A484A5A5E151FC848C7FC157E5DA24A5A14035D
-14074A5AA2141F5D143FA2147F5D14FFA25BA35B92C8FCA35BA55BAA6D5A6D5A6D5A2F44
-7AC238>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F031F80161F
-82033F80ED3E07037E80157C8203FC804B7E02018115F0820203814B137F0207815D173F
-020F814B7F021F8292C77EA24A82023E80027E82027FB7FCA291B87EA2498302F0C8FCA2
-0103834A157F0107834A153FA249488284011F8491C97E4984133E017E82B6020FB612F0
-A54C457CC455>65 D<DCFFF01470031F01FF14F04AB6EAE0010207EDF803023FEDFE0791
-B539E001FF0F4949C7EA3F9F010701F0EC0FFF4901C0804990C87E494881494881494816
-7F4849163F4849161F5A4A160F485B19074890CAFC19035A5BA2007F1801A34994C7FC12
-FFAE127F7F1AF0A2123FA27F6C18011AE06C7F19036C6D17C06E16077E6C6DEE0F806C6D
-EE1F006D6C5E6D6C167E6D6C6C5D6D6D4A5A6D01F0EC07F0010101FEEC1FE06D903AFFF0
-01FF80023F90B6C7FC020715FC020115F0DA001F1480030001F8C8FC44467AC451>67
-D<BA12F8A485D8001F90C71201EF003F180F180318011800A2197E193EA3191EA21778A2
-85A405F890C7FCA316011603161F92B5FCA5ED001F160316011600A2F101E01778A2F103
-C0A494C7FC1907A21A80A2190FA2191FA2193FF17F0061601807181F4DB5FCBBFC61A443
-447DC34A>69 D<B7D88003B612FEA526003FFEC9EBF800B3A791B9FCA54AC9FCB3AAB7D8
-8003B612FEA54F447CC358>72 D<B712F0A526003FFECAFCB3B1F00780A4180F1900A460
-A360A2187EA218FE170117031707171F177FEE03FFB95AA539447CC343>76
-D<B500FE067FB512806E95B6FCA26F5EA2D8003F50C7FC013D6DEE03DFA2013C6DEE079F
-A26E6CEE0F1FA26E6C161EA26E6C163CA36E6C1678A26E6C16F0A26E6DEC01E0A26E6DEC
-03C0A36E6DEC0780A26F6CEC0F00A26F6C141EA26F6C5CA36F6C5CA26F6C5CA26F6D485A
-A26F6D485AA26F6D485AA3706C48C7FCA293383FF81EA2706C5AA2706C5AA3706C5AA270
-5BA2705BA2705BA2B6057FB6128071C7FCA2173E171C61447CC36A>I<B64BB512FE8181
-A281D8003F6D91C7EA780081013D7F81133C6E7E6E7F6E7F6E7F6E7F82806E7F6E7F6F7E
-6F7F83816F7F6F7F6F7F6F7F6F7F8382707F707F707F707F8482707F707F717E71138071
-13C019E0837113F07113F87113FC7113FE19FF847213F884848484A28484197F193F191F
-A2190F1907B61603190119001A78A24F447CC358>I<923807FFC092B512FE0207ECFFC0
-021F15F091267FFE0013FC902601FFF0EB1FFF01070180010313C04990C76C7FD91FFC6E
-6C7E49486F7E49486F7E01FF8348496F7E48496F1380A248496F13C0A24890C96C13E0A2
-4819F04982003F19F8A3007F19FC49177FA400FF19FEAD007F19FC6D17FFA3003F19F8A2
-6D5E6C19F0A26E5D6C19E0A26C6D4B13C06C19806E5D6C6D4B13006C6D4B5A6D6C4B5A6D
-6C4B5A6D6C4A5B6D01C001075B6D01F0011F5B010101FE90B5C7FC6D90B65A023F15F802
-0715C002004AC8FC030713C047467AC454>I<B9FC18F018FE727E19E0D8001F90C7000F
-7F05017F716C7E727E727E721380A21AC084A21AE0A91AC0A24E1380A21A00604E5A4E5A
-4D485A050F5B92B712C096C7FC18FC18C092CBFCB3A7B712E0A543447DC34D>I<DAFFE0
-131C010701FE133C013F9038FF807C90B6EAE0FC4815F9489038801FFF3907FC00014848
-EB007F4848143F4848140F491407007F15035B1601160012FF177CA27FA26D153C7F7F6D
-92C7FC6C7EEBFFE014FE6CEBFFF015FF6C15E016FC6C816C6F7E6C826C826C6C81011F81
-0107811300020F80140003077FED007F82040F1380828212F082A282A27EA218007EA26C
-5D6C5E6D14036D5D6D140701F84A5A01FFEC3FF002F8EBFFE0486CB65AD8FC1F92C7FCD8
-F80714FC48C614F0480107138031467AC43E>83 D<003FBA12E0A59026FE000FEB8003D8
-7FE09338003FF049171F90C71607A2007E1803007C1801A300781800A400F819F8481978
-A5C81700B3B3A20107B8FCA545437CC24E>I<B792B6FCA526003FFECAEAFC00806D606F
-15016D608119036D606F15076D606F150F6D6081191F6D6D93C7FC61027F163E6F157E02
-3F167C8119FC6E6D5C18016E5E7013036E5E8218076E6D5C180F6E5E70131F6E93C8FC70
-5B037F143E82187E033F147C7013FC6F5C17816F5C17C117C36F5C17E76F5C17FF6F5CA3
-6F91C9FCA2705AA2705AA3705AA2705AA2705AA250457EC355>86
-D<903801FFE0011F13FE017F6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7E
-A26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC1307013F13F19038FFFC0100
-0313E0481380381FFE00485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEB
-FFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97
-D<EB7FC0B5FCA512037EB1ED0FF892B57E02C314E002CF14F89139DFC03FFC9139FF000F
-FE02FCEB03FF4A6D13804A15C04A6D13E05CEF7FF0A218F8173FA318FCAC18F8A2177F18
-F0A3EFFFE06E15C06E5B6E491380027C491300496C495A903AFC1FC07FFC496CB512F0D9
-F00314C049C691C7FCC8EA1FF036467DC43E>I<EC3FFC49B512C0010F14F0013F14FC90
-397FF003FE9039FFC001FF0003495A48494813805B120F485AA2485A6F1300007F6E5AED
-00784991C7FCA212FFAC6C7EA3123F6DEC03C0A26C6C1407000F16806D140F6C6DEB1F00
-6C6D133E6C01F05B3A007FFC03F86DB55A010F14C0010391C7FC9038003FF82A2F7CAD32
->I<EE03FEED07FFA5ED001F160FB1EC3FE0903803FFFC010FEBFF8F013F14CF9039FFF8
-07FF48EBC00148903880007F4890C7123F4848141F49140F121F485AA3127F5BA212FFAC
-127FA37F123FA26C6C141FA26C6C143F0007157F6C6C91B5FC6CD9C00314FC6C9038F01F
-EF6DB5128F011FEBFE0F010713F89026007FC0EBF80036467CC43E>I<EC3FF80103B57E
-010F14E0013F8090397FF83FF89039FFC007FC48496C7E48496C7E48486D1380485A001F
-ED7FC05B003FED3FE0A2127F5B17F0161F12FFA290B7FCA401F0C9FCA5127FA27FA2123F
-17F06C7E16016C6C15E06C6C14036C6DEB07C06C6DEB0F806C01F0EB3F0090397FFE01FE
-011FB55A010714F0010114C09026001FFEC7FC2C2F7DAD33>I<EDFF80020F13E0027F13
-F049B512F849EB8FFC90390FFE0FFE90381FFC1F14F8133FEB7FF0A2ED0FFCEBFFE0ED03
-F0ED00C01600ABB612F8A5C601E0C7FCB3B0007FEBFFE0A527467DC522>I<DAFFE0137E
-010F9039FE03FF80013FEBFF8F90B812C048D9C07F133F489038001FF84848EB0FFC4848
-903907FE1F80001F9238FF0F00496D90C7FCA2003F82A8001F93C7FCA26D5B000F5D6C6C
-495A6C6C495A6C9038C07FF04890B55A1680D8078F49C8FC018013E0000F90CAFCA47F7F
-7F90B612C016FC6CEDFF8017E06C826C16FC7E000382000F82D81FF0C77ED83FC0140748
-48020113808248C9FC177FA46D15FF007F17006D5C6C6C4A5A6C6C4A5AD80FFEEC3FF83B
-07FFC001FFF0000190B612C06C6C92C7FC010F14F8D9007F90C8FC32427DAC38>I<EB7F
-C0B5FCA512037EB1ED07FE92383FFF8092B512E002C114F89139C7F03FFC9138CF801F91
-39DF000FFE14DE14FC4A6D7E5CA25CA35CB3A7B60083B512FEA537457CC43E>I<137C48
-B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFF
-A512037EB3AFB6FCA518467CC520>I<EC03E0EC0FF8EC1FFCEC3FFEA2EC7FFFA5EC3FFE
-A2EC1FFCEC0FF8EC03E091C7FCAAEC01FF0103B5FCA5EB000F80B3B3A7EA1F80EA3FC0EA
-7FE0EAFFF0EC0FFEA215FC141F01E013F8007FEB3FF0393FC0FFE06CB512806C14000003
-13FCC613C0205A86C522>I<EB7FC0B5FCA512037EB3B3B3A3B61280A519457CC420>108
-D<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E002816E4880913D
-87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E6D013C13
-0F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D7CAC5E>
-I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F801F00039039
-9F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E>I<EC1F
-FC49B512C0010714F0011F14FC90397FF80FFF9026FFC0017F48496C7F4848C7EA3FE000
-078248486E7E49140F001F82A2003F82491407007F82A400FF1780AA007F1700A46C6C4A
-5AA2001F5E6D141F000F5E6C6C4A5AA26C6C6CEBFFE06C6D485B27007FF80F90C7FC6DB5
-5A010F14F8010114C09026001FFCC8FC312F7DAD38>I<90397FC00FF8B590B57E02C314
-E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15C04A6D13E0
-5C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E4913806E49
-13006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FCADB67EA536
-407DAC3E>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE
-6C13BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>
-114 D<90391FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E
-00FE140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C80000380
-6C15806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C14
-1FA26DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7C
-AD2C>I<EB01E0A51303A41307A2130FA2131FA2133F137F13FF1203000F90B51280B7FC
-A4C601E0C7FCB3A3ED01E0A9150302F013C0137F150790393FF80F8090391FFC1F006DB5
-FC6D13FC01015B9038003FE023407EBE2C>I<D97FC049B4FCB50103B5FCA50003EC000F
-6C81B3A85EA25EA25E7E6E491380017FD901F713FE9138F807E76DB512C7010F14070103
-13FE9026007FF0EBFC00372E7CAC3E>I<B500FE90383FFFF0A5C601F0903803E0006D6C
-495A6D6C495A011F4AC7FC6E5B6D6C137E6DEB807C6D6D5A6DEBC1F0EDE3E06DEBF7C06E
-B45A806E90C8FC5D6E7E6E7F6E7FA24A7F4A7F8291381F3FFCEC3E1F027C7F4A6C7E4948
-6C7F01036D7F49487E02C08049486C7F49C76C7E013E6E7E017E141FB500E090B512FCA5
-362C7EAB3B>120 D<B6903803FFFCA5000101E09038003E006C163C80017F5D8017F801
-3F5D6E1301011F5D6E1303010F5D6E13076D5DED800F6D92C7FC15C05E6DEBE01E163E6D
-143CEDF07C027F1378EDF8F8023F5B15FD021F5B15FF6E5BA36E5BA26E90C8FCA26E5AA2
-6E5AA21578A215F85D14015D001F1303D83F805B387FC007D8FFE05B140F92C9FC5C143E
-495A387FC1F8EB07F06CB45A6C5B000790CAFCEA01FC36407EAB3B>I
-E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fc ectt1000 10 78
-/Fc 78 123 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F
-C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<003C131E007F137F481480A66C14
-00A6007E7FA6003E133EA3003C131E001C131C191977B32C>I<EA0F80EA1FE0EA3FF012
-7F13F8A213FCA2123F121F120FEA007CA313FC13F8A2120113F01203EA07E0A2EA0FC0EA
-3F80127FEAFF005A12F812700E1D71B22C>39 D<143814FC13011303EB07F8EB0FF0EB1F
-C0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5A
-AC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0F
-F0EB07F8EB03FC130113001438164272B92C>I<127012FC7E7E6C7E6C7EEA0FE06C7E6C
-7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301A314FC1300AC13
-0114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE485A485A485A485A
-EA3FC0485A48C7FC5A5A1270164279B92C>I<EB0380497EA60020140800F8143E00FE14
-FE00FF13C1EBC7C7EBE7CF003FB512F8000F14E0000314806C140038007FFCA248B5FC48
-1480000F14E0003F14F839FFE7CFFEEBC7C7EB07C100FE13C000F8143E00201408000014
-00A66D5A1F247AAA2C>I<147014F8AF003FB612E0B712F8A4C700F8C7FCB0147025267D
-AB2C>I<EA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA03F0
-1207EA1FE0EA7FC0EAFF80130012FC12700E17718A2C>I<007FB512F0B612F8A36C14F0
-1D0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507
-ED0F80A2151F16005D153E157E157CA215FC5D14015D14035D14075D140F5D141F92C7FC
-5C143EA2147E147C14FC5C13015C13035C13075C130F5C131F91C8FC5B133EA2137E137C
-13FC5B12015B12035B12075B120F5B121F90C9FCA25A123E127E127C12FC5AA212702141
-7BB92C>I<EB03F8EB0FFE90383FFF80497F90B57E3901FE0FF03903F803F848486C7EEB
-E0004848137EA248487FA248C7EA1F80A2003E140F007E15C0A3007C140700FC15E0AC6C
-140F007E15C0A46CEC1F80A36C6CEB3F00A26C6C137E6D13FE00075CEBF0016C6C485A39
-01FE0FF06CB55A6D5B6D5BD90FFEC7FCEB03F823357CB32C>I<1307497EA2131FA2133F
-137F13FF5A1207127FB5FC13DF139FEA7C1F1200B3AE007FB512E0B612F0A36C14E01C34
-77B32C>I<EB0FF890387FFF8048B512E00007804814FC391FF80FFE393FE001FF903880
-007F48C7EA3F80007E141F00FE15C0150F6C15E01507A3127E123CC8FCA2150F16C0151F
-1680153F16005D15FE4A5A14034A5A4A5A4A5A4A5AECFF804948C7FC495A495A495AEB3F
-E0EB7F8049C8FC485A4848EB03C04848EB07E0EA1FE0485A48B6FCB7FCA36C15C023347C
-B32C>I<EB0FFC90387FFF8048B512E0000714F84880391FF807FEEBC0004848137F6D7F
-1680151FA26C5A6CC7FCC8FC153F16005D15FE14014A5AEC1FF890381FFFF0495BA215F8
-6D7F90380007FEEC00FF81ED3F80ED1FC0150FA216E01507A2123C127EB4FC150F16C0A2
-48141F007FEC3F806DEB7F006C6C5B391FF807FE6CB55A6C5C6C14E0C66C1380D90FFCC7
-FC23357CB32C>I<EC07F04A7E141F143FA2147EA214FCEB01F8A2EB03F0EB07E0A2EB0F
-C0EB1F80A2EB3F00137EA25B485AA2485A5B1207485AA2485A48C7FCA2127E5AB712FC16
-FEA36C15FCC8EAF800AA91387FFFF091B512F8A36E13F027347EB32C>I<000FB512FE48
-80A35D0180C8FCADEB83FE90389FFF8090B512E015F8819038FE03FE9038F000FF01C07F
-49EB3F8090C7121F6C15C0C8120FA2ED07E0A4123C127EB4FC150F16C0A248141F007EEC
-3F80007FEC7F006C6C5B6D485A391FF80FFC6CB55A6C5C000114C06C6C90C7FCEB0FF823
-347CB22C>I<EC3FC0903801FFF801077F011F7F497F90387FE07F9039FF003F80484813
-7FEA03F8485A5B000FEC3F004848131E4990C7FC123F90C9FCA25A127EEB03FE90381FFF
-80D8FC7F13E000FDB57EB67E9038FE07FC9038F001FE9038C0007F49EB3F8090C7121F16
-C048140F16E01507A3127EA47E150F6D14C0001F141F6D1480000F143F6DEB7F003907F8
-01FE3903FE07FC6CB55A6C5C6D5B011F1380D907FCC7FC23357CB32C>I<1278B712C016
-E0A316C000FCC7EA3F80ED7F0015FE00785CC712014A5A4A5A5D140F5D4A5A143F92C7FC
-5C147E14FE5C13015CA2495AA213075CA3495AA4495AA5133F91C8FCAA131E23357CB32C
->I<EB07FC90383FFF8090B512E0000314F84880390FFC07FE391FF001FF9038C0007F48
-48EB3F8090C7121F4815C0007E140FA56CEC1F80A26C6CEB3F006D5B390FF001FE3903FC
-07F86CB55A6C6C13C0D907FCC7FC90387FFFC048B512F03903FC07F8390FF001FE391FC0
-007F497F48C7EA1F80007EEC0FC0A248EC07E0A7007EEC0FC0A2007F141F6C6CEB3F806C
-6CEB7F009038F001FF390FFC07FE6CB55A6C5CC614E0013F1380D907FCC7FC23357CB32C
->I<EB07FCEB3FFF90B512C0488048803907FC07F8390FF001FC48486C7ED83F80137E15
-7F48C77E007EEC1F8012FE5AED0FC0A416E0A37E127E007F141F7E6D133F6C6C137F390F
-F001FF3807FC0F6CB6FC6C14F76C14C7013F130FD90FF813C090C7FCA2151F1680153F16
-00000F5C486C137E486C13FE4A5A4A5A14079038801FF0391FE07FE090B55A6C91C7FC6C
-5B000113F838007FC023357CB32C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F
-00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C>I<EA0F80EA
-1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0EA0F80C7FCAEEA0F80EA1FE0EA3FF0EA7FF8A213FC
-A3123F121F120F120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC12700E30
-71A32C>I<007FB612F0B712F8A36C15F0CAFCA8007FB612F0B712F8A36C15F025127DA1
-2C>61 D<EC7F80903803FFE0010F7F013F7F497F9038FFC0FE3901FE007FD803F87F4848
-EB1F809038E00FCF390FC03FFF48484813C091B5FCEA3F01393E03F87F903907F03FE000
-7EEBE01F397C0FC00FEC8007A2EAFC1F00F8EB0003A900FCEB8007D87C0F14C0A2ECC00F
-3A7E07E01F80003EEBF03F903903F87F00393F01FFFED81F805B6E5A6C6C6C5A3907E00F
-C09039F00007C06C6CEB0FE0D801FE131F3900FFC0FF6DB512C06D1480010FEBFE000103
-13F89038007FC023337CB22C>64 D<14FE497EA4497FA214EFA2130781A214C7A2010F7F
-A314C390381F83F0A590383F01F8A490387E00FCA549137E90B512FEA34880A29038F800
-3FA34848EB1F80A4000715C049130FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C
->I<007FB512E015F8B612FE6C8016C03903F0003FED0FE0ED07F01503A2ED01F8A6ED03
-F0A21507ED0FE0ED1FC0EDFF8090B612005D5D15FF16C09039F0001FE0ED07F0ED03F815
-01ED00FCA216FE167EA616FE16FC1501ED03F8150FED3FF0007FB612E016C0B712806CEC
-FE0015F027337FB22C>I<02FF13700107EBE0F84913F9013F13FD4913FFEBFF813901FE
-007F4848131FD807F0130F1507485A491303485A150148C7FCA25A007EEC00F01600A212
-FE5AAB7E127EA3007F15F06CEC01F8A26C7EA26C6C13036D14F06C6C130716E0D803FC13
-1F6C6CEB3FC03A00FF81FF806DB512006D5B010F5B6D13F00100138025357DB32C>I<00
-7FB5FCB612C015F0816C803907E003FEEC00FFED7F80153FED1FC0ED0FE0A2150716F015
-0316F81501A4ED00FCACED01F8A3150316F0A2150716E0150FED1FC0153FED7F80EDFF00
-EC03FE007FB55AB65A5D15C06C91C7FC26337EB22C>I<007FB612F0B712F8A37E3903F0
-0001A7ED00F01600A4EC01E04A7EA490B5FCA5EBF003A46E5A91C8FCA5163C167EA8007F
-B612FEB7FCA36C15FC27337EB22C>I<007FB612F8B712FCA37ED803F0C7FCA716781600
-A515F04A7EA490B5FCA5EBF001A46E5A92C7FCAD387FFFE0B5FC805C7E26337EB22C>I<
-903901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F48
-48133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF84A
-13FCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF
-6D5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>I<D87FFE
-EBFFFCB54813FEA36C486C13FCD807E0EB0FC0B190B6FCA59038E0000FB3D87FFEEBFFFC
-B54813FEA36C486C13FC27337EB22C>I<007FB512F8B612FCA36C14F839000FC000B3B3
-A5007FB512F8B612FCA36C14F81E3379B22C>I<0107B512804914C0A36D148090390003
-F000B3AF1218127EA2B4FCA24A5A48130F007F131F9038C07FC06CB55A6C91C7FC6C5B00
-0313F838007FC022347BB22C>I<D87FFCEB7FF8486CEBFFFCA36C48EB7FF8D807C0EB1F
-80153FED7F00157E5D4A5A14034A5A5D4A5A4A5A143F4AC7FC147E5CEBC1F813C3EBC7FC
-A2EBCFFEEBDFBEEBFFBF141F01FE7F496C7E13F86E7EEBF00301E07FEBC001816E7EA215
-7E153E153F811680ED0FC0A2ED07E0D87FFCEB1FFC486CEB3FFEA36C48EB1FFC27337EB2
-2C>I<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025
-337DB22C>I<D87FE0EB0FFC486CEB1FFEA26D133F007F15FC000F15E001BC137BA4019E
-13F3A3EB9F01A2018F13E3A21483A2018713C314C7A201831383A214EFA201811303A214
-FFEB80FEA3147C14381400ACD87FF0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<
-D87FF0EB7FFC486CEBFFFEA27F007FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C7
-14C0A213C314E0A213C114F0A213C014F8A2147CA3143EA2141E141FA2140F1587A21407
-15C7A2140315E71401A215F71400A215FFD87FFC137F487E153FA26C48EB1F8027337EB2
-2C>I<EB7FFF0003B512E0000F14F848804880EBE003EB800048C7127FA2007E80A300FE
-158048141FB3A86C143FA2007E1500A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C0003
-14E0C66C90C7FC21357BB32C>I<007FB512C0B612F88115FF6C15802603F00013C0153F
-ED0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90B61280160015
-FC5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14
-F848804880EBF007EB800048C7127FA2007E80A300FE158048141FB3A7EB01F0EB03F800
-FE143F267E01FC1300A2EB00FE007F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314
-E0C67E90380007F0A26E7EA26E7EA26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E
-15E015F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE14
-0790B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5
-ECFF00815E6C486D5AC8EA01F029347EB22C>I<90381FF80790B5EA0F804814CF000714
-FF5A381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC
-127F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07
-FF02001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0
-EB7F009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>I<007F
-B612FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA22733
-7EB22C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800B3AF6D130300
-015DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B90
-38003F802B3480B22C>I<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D13
-0F000715C0A36D131F00031580A36D133F00011500A36D5B0000147EA4017E5BA46D485A
-A490381F83F0A4010F5B14C7A301075BA214EFA201035BA214FFA26D90C7FCA46D5A2734
-7EB22C>I<D87FF0EB07FF486C491380A36C486D1300001FC8127CA46C6C5CA76C6C495A
-A4143E147FA33A03E0FF83E0A214F7A201E113C3A3000101E35BA201F113C701F313E7A3
-14C1A200005DA201F713F71480A301FF13FF017F91C7FC4A7EA4013E133E29347FB22C>
-I<3A3FFF03FFE0484913F0148714076C6D13E03A01F800FE007F0000495A13FE017E5BEB
-7F03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2497E
-A2497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F0001147E49
-137F000380491480151FD87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>I<D87FFC
-EB7FFC486CEBFFFEA36C48EB7FFCD807F0EB0FC0151F000315806D133F12016DEB7F0012
-006D137E017E13FE017F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0A201035B
-14EF6DB45AA292C7FC7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<003FB612C0
-4815E0A4007EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA24A5A4A5A
-A24A5A4AC7FCA214FE495AA2495A495AA2495A495AA2495A49C8FCA213FE485AA24848EB
-03C049EB07E01207485A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<007FB6FC
-B71280A46C150021067B7D2C>95 D<3801FFF0000713FE001F6D7E15E048809038C01FF8
-1407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF8
-00EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EB
-FE1F3A003FF007FC27247CA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFFF801FB13
-FE90B6FC16809138F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE16
-7EA816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B512801600
-01FB5B01F813F83900F03FC027337FB22C>I<903803FFE0011F13F8017F13FE48B5FC48
-804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127EA2127F6C140F6DEB
-1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC2124
-7AA32C>I<EC0FFE4A7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807FC0F380F
-F00348487E497E48487F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C6C6C5A38
-0FF0073807FC1F6CB612FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C>I<EB03
-FE90381FFFC0017F13F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B4848EB1F
-C090C7120F5A007E15E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C06DEB07E0
-6C7ED80FF0130F6C6CEB3FC001FF13FF000190B512806C1500013F13FC010F13F0010113
-8023247CA32C>I<EC0FF8EC3FFE91B5FC4914805B903807FC7F14F090390FE03F0014C0
-92C7FCA6007FB512FEB7FCA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C21337DB2
-2C>I<ED03F8903907F80FFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC0FF82607
-F003133E3A0FE001FC1CD9C0001300001F8049137EA66D13FE000F5CEBE0016C6C485A39
-03FC0FF048B5FC5D481480D99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C14FE48EC
-FF804815E04815F03A3FC0001FF848C7EA03FC007E1400007C157C00FC157E48153EA46C
-157E007E15FCD87F801303D83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C1500D800
-3F13F8010713C028387EA42C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC9038F9FFFE
-01FB7F90B6FC9138F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480
-A36C01E0140029337FB22C>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFF
-C080B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2
-EC7FC0A3EC3F80A2EC0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F003C1480
-007E133FB414005CEB01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>I<EA7FE048
-7EA3127F1201AA91381FFFF04A13F8A36E13F0913800FE004A5A4A5A4A5A4A5A4A5A4A5A
-4AC7FC14FEEBF1FC13F3EBF7FE90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E496C7E81
-1400157E811680151F3A7FFFC0FFFCB500E113FEA36C01C013FC27337EB22C>I<387FFF
-E0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F83F007E0
-9039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01
-F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0
-023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038
-F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E014002924
-7FA32C>I<EB07FCEB1FFF017F13C048B512F048803907FC07FC390FF001FE48486C7E01
-80133F003F158090C7121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F141F6C15
-806D133F6C6CEB7F006D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90C7FCEB07
-FC23247CA32C>I<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038F07FC091
-38801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F86D
-13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8EC3FC091C8
-FCAD387FFFE0B57EA36C5B27367FA32C>I<903903FC078090391FFF0FC0017F13CF48B5
-12EF4814FF3807FE07380FF00148487E49137F4848133F90C7FC48141F127E150F5AA87E
-007E141FA26C143F7F6C6C137F6D13FF380FF0033807FC0F6CB6FC6C14EF6C6C138F6D13
-0FEB07F890C7FCAD0203B5FC4A1480A36E140029367DA32C>I<D87FFEEB3FC0B53801FF
-F0020713F8021F13FC6C5B39003F7FE1ECFF019138FC00F84A13704A13005CA25C5CA391
-C8FCAF007FB512E0B67EA36C5C26247EA32C>I<90387FF8700003B512F8120F5A5A387F
-C00F387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0
-C66C13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE90
-38F007FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6FC
-B71280A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB5128016
-0001035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB
-000FB3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE0713002924
-7FA32C>I<3A7FFF01FFFCB514FE148314016C15FC3A03E0000F80A26D131F00011500A2
-6D5B0000143EA26D137E017C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA2
-14C701075BA214EF01035BA214FF6D90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF
-6EB5FCB515806C16004A7ED807C0EB01F0A66C6C495AA3143E147FA2D801F0495AECFF87
-A214F7A201F113C700005D9038F9E3CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2
-013F5B90381F007C29247FA32C>I<3A3FFF03FFF048018713F8A36C010313F03A00FC00
-7E005D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D
-5A147C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E0001
-7C137C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01
-FFFCB5008113FE148314816C010113FC3A03E0000F806C7E151F6D140012005D6D133E13
-7C017E137E013E137CA2013F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C013
-0114F75DEB00FFA292C7FC80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87
-E0EA7E0F495A387FFF806C90C8FC6C5A6C5AEA07E027367EA32C>I<003FB612E04815F0
-A4007EC7EA1FE0ED3FC0ED7F80EDFF004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FC
-EB01FC495AEB0FF0495A495A495A49C8FC4848EB01E04848EB03F0485A485A485A485A48
-5AB7FCA46C15E024247DA32C>I E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fd ecbx1000 10 57
-/Fd 57 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF
-FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081
-F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938>
-27 D<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E137FA2EB3F80A214C013
-1F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E0131FA214C0133F1480A2EB
-7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A12F05A16537BBD25>41
-D<EA0F80EA3FE0EA7FF0A2EAFFF8A213FCA3127FA2123FEA0F9CEA001C133C1338A31378
-137013F0EA01E0A2EA03C0EA0780EA0F005A121C12180E1D798C1B>44
-D<B61280A819087F9620>I<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F80
-0D0D798C1B>I<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB61280A42136
-79B530>49 D<EB0FFE90387FFFC048B512F0000714FC390FE03FFF261F800F1380263F00
-0313C0D87F8014E0EBE00100FF6D13F07FA2ED7FF8A46C5A6C5A0006C7FCC8FCEDFFF0A2
-16E05C16C04A138016004A5A4A5AEC1FF05D4A5A4AC7FC14FE495AD903F01378495A495A
-495A49C712F8017C14F05B49130148B6FC5A5A5A5A5A4815E0B7FCA425367BB530>I<EB
-03FF011F13F0017F13FC3901FC07FF2603F003138048486C13C0496C13E0EA0FF86D14F0
-487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC3FF090380FFFC05D15F090
-380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FEEA1FC0487E487E487EA416
-FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC0713806CB61200000114FC6C
-6C13F0010790C7FC27377CB530>I<ED07C0150FA2151F153F157F15FF5CA25C5C5C5C14
-3E143C5C5C1301495A5C495A495A5B133E5B13785B485A1203485A5B48C7FC121E5A127C
-5AB81280A4C70001EBC000AA0103B61280A429367DB530>I<001C15C0D81F80130701F8
-137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381FFFE0017F13
-F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16F0A216F8A3
-121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F4913806C6C
-481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530>I<EC0FF8EC
-FFFE0103EBFF8090390FF80FC090393FE003E090397F8001F09038FF000F48EC1FF84848
-133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA31408EC7FF039FFF1FFFC01F3
-13FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16FCA34914FEA4127FA5123F
-16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01FF81FF806C90B51200013F
-13FC010F13F00101138027377CB530>I<123C123EEA3FE090B71280A41700485D5E5E5E
-5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A5AC7485A4A5AA24A5A143F
-4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133FA96D5A6D5A6D5A29397BB7
-30>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F804848EB3FC04848EB1FE015
-0F484814F01507121FA27F7F7F6D130F01FF14E014C09138E01FC06CEBF83F9138FE7F80
-6C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612E0D803FD14F02607F07F13
-F848487E261FC00F13FC383F8003007F010013FE90C7127F151F00FE140715031501A215
-00A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D80FFEEB7FC00003B61200C6
-14FC013F13F00103138027377CB530>I<ED03E04B7EA24B7EA34B7EA24B7EA34B7EA292
-B57EA34A8015F302038015E1A202078015C0020F80ED807FA2021F80ED003F4A80023E13
-1FA2027E80027C7F02FC814A7FA20101824A7F49B77EA3498202C0C7FC010F824A147FA2
-011F8291C8123F4982013E151FA2017E82017C8101FE83B500F80107B61280A4413A7DB9
-48>65 D<B812C017FC17FF18C028007FF000037F04007F717E717E171F84A2717EA74D5A
-A260173F4D5A4D5A4C13C0040F5B91B600FCC7FCA2EFFF8002F0C713F0EF3FF8717E717E
-717E19807113C0A319E0A719C0A25F4D138019005FEF7FFE4C485AB912F018C095C7FC17
-F03B397DB844>I<DB3FFCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00
-FF3F4901C0EB1FFFD91FFEC77E49481403D97FF080494880485B48177F4849153F4890C9
-FC181F485A180F123F5B1807127FA24993C7FC12FFAD127F7FF003C0123FA27F001F1707
-A26C6C1780180F6C6D16006C6D5D6C173E6C6D157ED97FF85D6D6C4A5A6DB44A5A010701
-C0EB0FE06D01FCEBFF80010090B548C7FC021F14F8020314E09126003FFEC8FC3A3B7BB9
-45>I<B87E17F817FF18C028007FF8000713F09338007FF8EF1FFE717E050313807113C0
-A27113E0F07FF0A2F03FF8A219FC181FA219FEA419FFAC19FEA419FC183FA219F8187F19
-F0F0FFE0A24D13C04D13804D1300EF1FFEEF7FFC933807FFF0B912C095C7FC17FC178040
-397DB849>I<B912F0A426007FF8C7FCEF1FF8170717031701A21700A21878A3043C137C
-183CA41800167CA216FC150391B5FCA4ECF8031500167CA2163C180FA3181EA293C7FCA2
-183EA2183C187CA218FCA2EF01F81703170F173FEE01FFB9FC18F0A338397DB83F>I<B9
-12C0A43A007FF800039338007FE0171F170F1707A21703A21701A318F0EE7800A41800A2
-16F8A21501150791B5FCA4ECF80715011500A21678A693C8FCADB7FCA434397DB83C>I<
-B6D8FC03B612F0A426007FF8C70001EBE000B3A391B8FCA402F8C71201B3A6B6D8FC03B6
-12F0A444397DB84B>72 D<B612FCA439007FF800B3B3ADB612FCA41E397DB824>I<B7FC
-A426007FF8C9FCB3ACEF0780A5170F1800A35FA25FA25F5F5E5EEE0FFE167FB8FCA43139
-7DB839>76 D<B500F80403B512F06E5EA26E5ED8007FF1E000A2D97BFF161EA201796D5D
-A201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A5AA26E6C4A5AA26E6C141EA36E
-6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C485AA26F6C48C7FCA2923803FF
-1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D4848B612F0A2EE0F80EE07005439
-7DB85B>I<B500FC0203B512F0A28080C66C6D90390003F0006F6E5A81017B7F13798101
-787F6E7E6E7E6E7F6E7FA26E7F6E7F6E7F6E7F6F7E153F826F13806F13C06F13E06F13F0
-6F13F88117FCEE7FFEEE3FFF7013817013C17013E18218F17013F97013FDEF7FFF8383A2
-8383838383187FA2183F181F01FC160FB500FC150718031801A244397DB84B>I<EDFFF8
-020FEBFF80027F14F0903A01FFC01FFC010790380007FFD91FFC010113C0D93FF06D6C7E
-49486E7E49486E7E48496E7E48834890C86C7EA248486F1380A248486F13C0A2003F18E0
-A348486F13F0A400FF18F8AC007F18F06D5DA3003F18E0A26D5D001F18C0A26C6C4B1380
-6C18006E5C6C6D4A5A6C5F6C6D4A5A6D6C4A5AD93FFC49485A6DB401075B0107D9C01F90
-C7FC010190B512FC6D6C14F0020F1480020001F8C8FC3D3B7BB948>I<B8FC17F017FEEF
-FF8028007FF8000F13C0040113E07013F0EF7FF8EF3FFCA2EF1FFEA218FFA818FEA2EF3F
-FCA2EF7FF8EFFFF04C13E0040F13C091B7120017FC17E002F8C9FCB3A4B612FCA438397D
-B841>I<B712FCEEFFE017FC17FF28007FF8000F13C004017F707F717E717EA2717EA284
-A760A24D5A604D5A4D5A04035B041F90C8FC91B612FC17E0839139F8003FFCEE0FFF707F
-707F8284A2707FA584A51A601AF084177F1901DD3FFE13E0B600FC011F130394390FFF87
-C071EBFF8005011400CBEA1FFC443A7DB848>82 D<D907FF130E013FEBE01E90B5EAF83E
-0003ECFE7E3A07FC01FFFE390FF0001F4848130F48481303491301007F140090C8FC167E
-5A163EA27F161E7F7F6D91C7FC13FC387FFFE014FEECFFF06C14FE6F7E6C816C15F06C81
-6C81C681133F010F801301D9000F1480EC007F030F13C01503818100F0157FA3163FA27E
-17807E167F6C16007E6D14FE01E0495A01F813039039FF801FF800FC90B512E0D8F83F5C
-D8F00749C7FC39E0007FF02A3B7BB935>I<003FB91280A4D9F800EBF003D87FC0923800
-7FC049161F007EC7150FA2007C1707A200781703A400F818E0481701A4C892C7FCB3AE01
-0FB7FCA43B387DB742>I<B600FC011FB512C0A426007FF8C8381FC000725AB3B3181F01
-3F94C7FC8060011F163E6D6C157E187C6D6C15FC6D6D495A6D6DEB07F06D01F0EB1FE0DA
-7FFEEBFFC0021FB6C8FC02075C020014F0030F1380423A7DB849>I<B600F00103B512E0
-A4C601F0C83807F0006E5E017F5F6E150FA2013F5F6E151F011F94C7FC6E5D6D163E6F14
-7E6D167CA26F14FC6D5E6F13016D5E6F13036D5E811707027F5D6F130F023F5D6F131F02
-1F92C8FC815F6E143EEE807E6E147CEEC0FC6E5C16E016E16E5C16F36E5C16FF6F5BA36F
-5BA26F90C9FCA26F5AA36F5AA26F5AA26F5A433A7EB848>I<B6D8E01FB500FC90383FFF
-FCA4000101F0C7D83FFCC8EA7E006C71153C171F6E197C017F701578836E7014F8013F6F
-5E6E1801011F4B6D5CA26E18036D4B6D5CA26D6D496D495A173C6F170F6D037C6D91C7FC
-EF787F6F5F6D4B6C6C131E816D02016E5BEFE01F03F8177C027F01036E13784D7E03FCEE
-80F8023F49486C5C15FE021F010FEDC1E04D7E03FF16C36E49EDE3C0041E7F049E15F76E
-01BC6D5C04FC15FF6E95C8FC4C80A26E5F4C143F6E5F4C141FA2037F5E4C140FA26F486E
-5AA2031F5E93C812036F5E5E3A7EB863>I<007FB5D8F803B512F8A4C66C48C7D80FF0C7
-FC6D6C5D6D5E6F495A6D6D49C8FC7F6D6D137E6F5B6DEBF8016D5D6F485A6E6C485A023F
-130FDA1FFF5BEE9F806E01FFC9FC805E6E5B6E5B80826F7E153F826F7F5D4B7F92B57EA2
-DA01F97FDA03F17F03F07F913807E07FDA0FC07F021F6D7E4B7E4A486C7F027E8102FE6D
-7F4A7F49488149486D7F0107804A6E7E49488149486E7E013F81017F83B60107B61280A4
-41397DB848>I<EB3FFE0003B512E0000F14F8391FF00FFE003FEB03FF6D6C7F6E7FA26F
-7EA26C5A6C5AEA0380C8FCA2EC3FFF010FB5FC137F3901FFF87F00071380380FFE00EA3F
-F85B485A12FF5BA415FF6D5A127F263FF00713F83B1FFC1FBFFFC0390FFFFE1F0003EBF8
-0F39003FE0032A257DA42E>97 D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138
-FE03FFDAF00013804AEB7FC00280EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3
-EE1FF8A217F06E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8
-D9E00F13E0D9C00390C7FC2F3A7EB935>I<903801FFC0010F13FC017F13FFD9FF801380
-2603FE0013C048485AEA0FF8121F13F0123F6E13804848EB7F00151C92C7FC12FFA9127F
-A27F123FED01E06C7E15036C6CEB07C06C6C14806C6C131FC69038C07E006DB45A010F13
-F00101138023257DA42A>I<EE7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD
-9038FFC07F0003EB001FD807FC1307000F8048487F5B123FA2485AA312FFAA127FA27F12
-3FA26C6C5B000F5C6C6C5B6C6C4913C02701FF80FD13FE39007FFFF9011F13E101011301
-2F3A7DB935>I<903803FF80011F13F0017F13FC3901FF83FE3A03FE007F804848133F48
-4814C0001FEC1FE05B003FEC0FF0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA3
-6C7E1678121F6C6C14F86D14F000071403D801FFEB0FE06C9038C07FC06DB51200010F13
-FC010113E025257DA42C>I<EC1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9
-FFC113C0A2481381A24813016E1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FE
-A4223A7DB91D>I<161FD907FEEBFFC090387FFFE348B6EAEFE02607FE07138F260FF801
-131F48486C138F003F15CF4990387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C
-4890C7FC3907FE07FE48B512F86D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512
-F8EDFF8016E06C15F86C816C815A001F81393FC0000F48C8138048157F5A163FA36C157F
-6C16006D5C6C6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B
-377DA530>I<13FFB5FCA412077EAFED7FC0913803FFF8020F13FE91381F03FFDA3C0113
-8014784A7E4A14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07
-FC487EA2487EA56C5AA26C5AEA01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA
-1B>I<141FEC7FC0ECFFE0A24913F0A56D13E0A2EC7FC0EC1F0091C7FCA9EC0FF0EB0FFF
-A4EB007F143FB3B0121FEA3F80EA7FC0EAFFE0EC7FE0A215C014FF6C481380903883FE00
-6CB45A000F13F0000113801C4B86BA1D>I<13FFB5FCA412077EAF92380FFFE0A4923803
-FC0016F0ED0FE0ED1F804BC7FC157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCF
-FEEC0FFF496C7F806E7F6E7F82157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>
-I<13FFB5FCA412077EB3B3ACB512FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601
-FFFC90383FFF80020701FF90B512E0DA1F81903983F03FF0DA3C00903887801F000749DA
-CF007F00034914DE6D48D97FFC6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0
-A44C257DA451>I<01FEEB7FC000FF903803FFF8020F13FE91381F03FFDA3C0113800007
-13780003497E6D4814C05CA25CA291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801
-FFC0010F13F8017F13FFD9FF807F3A03FE003FE048486D7E48486D7E48486D7EA2003F81
-491303007F81A300FF1680A9007F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C
-6C495A6C6C6CB45A6C6CB5C7FC011F13FC010113C029257DA430>I<9039FF01FF80B500
-0F13F0023F13FC9138FE07FFDAF00113800003496C13C00280EB7FE091C713F0EE3FF8A2
-EE1FFCA3EE0FFEAA17FC161FA217F8163F17F06E137F6E14E06EEBFFC0DAF00313809139
-FC07FE0091383FFFF8020F13E0020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE
-03F000FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00
-150C92C7FC91C8FCB3A2B512FEA422257EA427>114 D<90383FF0383903FFFEF8000F13
-FF381FC00F383F0003007E1301007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF
-806C14C06C14F06C14F81203C614FC131F9038007FFE140700F0130114007E157E7E157C
-6C14FC6C14F8EB80019038F007F090B512C000F8140038E01FF81F257DA426>I<130FA5
-5BA45BA25B5BA25A1207001FEBFFE0B6FCA3000390C7FCB21578A815F86CEB80F014816C
-EBC3E090383FFFC06D1380903803FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714
-016C80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90387FFFFC011F13F0010313803025
-7DA435>I<B539F001FFF8A4000390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8
-017F5CECF001013F5C14F8011F495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15
-BE6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFF
-A43D07FE000FF80003E06C6C010715C082028015076C6E6C148015076C01C0ED0F00826E
-485C017FED801E5D90273FF01E7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B
-0FFC781FF0F0A29139FEF00FF10107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C
-90C7FCA292C7FC6E5CA2023E147C023C143C40257EA445>I<B539F01FFFF0A400039039
-8003F8006C01C013E06C1407D97FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FE
-FC6D6C5A5D6D5B6D5B6E7E6E7E814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC049
-486C7E4A6C7E013E80496D7E49130F00016E7EB590383FFFF8A42D257EA432>I<B539F0
-01FFF8A4000390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F
-5C14F8011F495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5B
-A36E5AA26E5AA26E5AA26E5AA292C8FCA25C141E003F133E387F803C38FFC07C147814F8
-EBC1F0EBC3E06C485A387D1F80D83FFFC9FCEA1FFCEA07F02D357EA432>I
-E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fe ecbx1440 14.4 35
-/Fe 35 122 df<DC7FFEECFFC0031FB5D8801F13F092B6D8E07F13FC020703F9B57E021F
-D9C007B5EAC1FF91277FFE000102071380DAFFF8010713FC010301E049494813C0495B49
-494913F04990C7FC19E0495A741380017F17C04A6E6E130071EC00FC98C7FCAEBB12FEA5
-26007FFCC7000701C0C8FCB3B3A7007FB5D8FC07B612F0A552547DD34D>27
-D<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7FCB3B3B3A600
-7FB712FCA52E4E76CD42>49 D<EC1FFE49B512F0010F14FC013FECFF804915E02701FF80
-3F7F2703FC000713FCD807F001017F48486D7FD81F806E138048C87E7013C0D87FE016E0
-01F8806D16F000FF817F7013F8A56C5AA26C5A6C5AEA0380C914F05EA218E05E18C05E18
-804C13005F4C5A4C5A5F4B5B4B5B4B5B94C7FCED0FFC4B5A4B5AED7FC04B5A4A90C8FCEC
-03FC4A5A4A4814F84A5A4A5A4AC8FC02FEEC01F0495A495A495A5CD90F80140349C8FC01
-3E1507017FB7FC90B812E05A5A5A5A5A5A5AB9FC18C0A4354E7ACD42>I<913807FFC002
-7F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE48488148486E
-138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD80038168090C8FC4C13
-00A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEEFF80DA000313
-E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218FEA3EA03C0EA
-0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE04A13C06C485C
-D80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E0010F92C7FC0101
-14FCD9001F1380374F7BCD42>I<17FC1601A216031607160FA2161F163F167FA216FF5D
-5DA25D5D5D167F153E157E15FC15F8EC01F01403EC07E015C0EC0F80141FEC3F00143E5C
-14FC495A5C495A1307495A5C49C7FC5B137E137C5B1201485A5B485A120F485A90C8FC12
-3E127E5ABA1280A5C901FCC7FCAF021FB71280A5394F7CCE42>I<486C150601F0153E01
-FEEC01FED9FFF0133F91B65A5F5F5F5F5F94C7FC16FC5E16E093C8FC15FC01F0138091CA
-FCAC913807FF80023F13F891B512FE01F36E7E9026FFFC0113E09139E0007FF891C76C7E
-496E7E01F86E7E5B7013804916C0C9FC18E08218F0A418F8A31203EA0FE0EA3FF8487EA2
-12FF7FA218F0A25B5E6C4816E05B01C016C06CC85A18806C6C4A13007FD80FF04A5A6C6C
-ECFFFCD803FE4913F02701FFE00F5B6C6CB612806D92C7FC010F14F8010114C09026003F
-FCC8FC354F7ACD42>I<ED07FE92B512C0020314F0021F14FC91397FFC01FE9139FFE000
-7F01030180EB3F804990C7121F4948EC7FC0494814FF4948010313E0495A49485B5A485B
-A2485BA2486F13C091C7FC4803001300177E94C7FC5AA25B127FA2ED3FF04AB5FC020714
-C000FF4914F091391F807FF891393E001FFE02786D7E4A6D13807013C06D5A4A6D13E018
-F05C7013F8A291C813FCA44916FEA3127FA6123FA37F6C17FCA36C17F85E7E6E15F06C17
-E06C6D5B6E15C06C4B13806D6C491300D93FFC495A6DB4EBFFFC010790B512F06D5D0100
-1580021F01FCC7FC020313C0374F7BCD42>I<B912FEF0FFF019FE737E1AE0D8000F01C0
-C7001F7F06037F727F726C7E867313807313C0A27313E0A37313F0A94F13E0A34F13C01B
-80614F1300624F5A06035B4E13E0063F5B92B8C7FC19F8A2F1FF8003C0C7001F13E00601
-13F89538007FFE737E070F13C01BE07313F0851BF87313FCA27313FEA31BFFA91BFEA261
-1BFCA2614F13F81BF0614F13E0077F13C04EB51280060FEBFE00BB5A1AF01AC04FC7FC19
-C050527BD15D>66 D<932603FFF01407047F01FF140F0307B600E0131F033F03F8133F92
-B700FE137F02039126C003FF13FF020F01F8C7EA3FC1023F01C0EC0FE391B5C80003B5FC
-4901FC814949814901E082011F498249498292CA7E4948834948835A4A83485B4885A248
-49187FA2485B1B3FA2485B1B1FA25AA21B0091CDFCA2B5FCAE7EA280A36C1A1FA36C7FA2
-1B3F6C7F1B3E6C7F1B7E6C6D187C6C1AFC6E18F86C19016D6CEF03F06D7E6FEE07E06D6D
-EE0FC001076DEE1F806D01F8EE3F006D6D16FE6D01FF4B5A023F01C0EC07F8020F01FCEC
-3FF00203903AFFC001FFC0020091B6C7FC033F15FC030715F0DB007F1480040301F0C8FC
-505479D25F>I<BAFC19F819FF1AE01AF8D8000701F0C7001F13FE06017FDE003F13C007
-0F7F07037F737F737F747E747E747F86747F8886888688A2747FA3881B7FA288A51D80AF
-1D00A564A21BFF64A3505BA2505BA2505BA2505B505B99C7FC505A1A7F4F485A4F13F007
-0F5B073F5B4EB55A061F49C8FCBB12F81AE097C9FC19F896CAFC59527CD165>I<BB12FC
-A5D8000701F0C7000F7F1800191F190F19071903190119001A7E1A7F86A386A51B80DD03
-E0130FA497C7FCA31707A3170F171F173FEE01FF92B6FCA5EDF001EE003F171F170F1707
-A31703A794CAFCB3A2B812F0A549527CD153>70 D<B8D88007B712FCA5D8000701F0C900
-3FEB8000B3AE92BAFCA503F0C9123FB3B1B8D88007B712FCA55E527CD167>72
-D<B81280A5D8000701F0C7FCB3B3B3B2B81280A529527DD130>I<B812E0A5D8000F01E0
-CAFCB3B3A91AF8A419011AF0A51903A31907A2190F1AE0191FA2193F197F19FF60180760
-187F0503B5FCBB12C0A545527CD14F>76 D<B912E018FF19F019FE737ED8000701F0C714
-E0060F7F060313FC06007F737E737F8587737FA28785A287A863A261636361634F90C8FC
-4F5A4F5A06035B060F13E095B5128092B748C9FC19F019C019F09226F0000713FC050013
-FF063F7F727F727F727F727FA2727FA28486A886A71D707513F8A2851C017301C013F0A2
-73EBE003B86C6D9038F007E0739038FC1FC0070190B51280736C1400080F5BCE13F85D53
-7CD162>82 D<DA0FFE141C91B500F0133C010702FC137C011F02FF13FC017F15C19026FF
-F00113E148903980001FFB4890C7EA07FFD807FC14014848804848153F171F4848150FA2
-007F1607491503A2170112FFA217007FA26D167CA27F7F6D93C7FC6C7E14C014F8ECFF80
-6C14F8EDFFC06C15FC6CEDFF8017F06C16FC6C826C707E6C836D82011F8201078213016D
-6C81020781EC007F030380ED003F040314801600173F837113C0838312F883A3837EA319
-807EA26C5E19007F6D4B5A7F6D4B5A01FC4B5A6D151FD9FFC04A5AD97FF8ECFFE028FE1F
-FF80075B010790B6C7FCD8FC0115FC486C6C14F048010F14C0489026007FFCC8FC3A5479
-D249>I<B700FE4AB612F0A5D8000F01E0CA387FC000091FC7FCB3B3B26D611B3E811B7E
-6D197CA26D6D17FC636D6D1601027F4D5A6F4C5A023F170F6E6C4C5A6E6D4B5A6E01E003
-FFC8FC6E01F8EC03FE020001FEEC1FFC923B7FFFE001FFF8031F90B612E0030716800300
-4BC9FC041F14F0040091CAFC5C537CD165>85 D<EC3FFE0107B512E0011F14FC017F14FF
-2701FFC00F13C02703FE00037F486C01007F6E6D7E486D80707EA2707EA3707F6C5B6C90
-C7FC6C5AC9FCA60307B5FC0203B6FC147F0103B7FC011FEBF00F017F1300EBFFFC000313
-F04813C0485B4890C7FC5A5B485AF081F012FF5BA35EA26D5C127F6D5C003F03F713C36D
-D901E314E06CD9C00714FF00079026F01F8114C06C90B5C61480C602FC6D1300011F01F0
-EB3FFC01010180EB07F03C387CB642>97 D<EB3FF8B5FCA51203C6FCB3A4EE7FF00307B5
-FC031F14C0037F14F0913AF9FF007FFCDAFFF8EB1FFF03E001077F03806D7F92C76C7F4A
-6E7F5C4A6F7E85183F85A38584A31A80AD1A00A36061A261187F616E15FF616E4A5B6E4A
-5B6F495BDACFE04990C7FCDA87F0EB3FFE913A01FE01FFF8496CB65A49013F14C0490107
-49C8FC90C813E041547DD249>I<913803FFE0023F13FE91B67E010315E0010F9038003F
-F8D93FFCEB07FC4948497E4948131F4849497E485B485BA24890C7FC5A5B003F6F5A705A
-705A007F92C8FC5BA312FFAD127F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D14
-3E6C6D147E6C6D5C6D6C495A6DB4EB07F0010F9038C01FE06D90B5128001014AC7FCD900
-3F13F80203138031387CB63A>I<943803FF80040FB5FCA5EE003F170FB3A4913803FF80
-023F13F849B512FE0107ECFF8F011F9038C03FEF90273FFE0007B5FCD97FF8130149487F
-484980484980484980488291C8FC5A5B123FA2127F5BA312FFAD127FA37F123FA3121F7F
-6C5E6C6D5C5F6C6D91B5FC6C6D5B6C6D4914E0D97FFCD90FEFEBFF80D91FFFEB7F8F0107
-90B5120F010114FC6D6C13E00207010049C7FC41547CD249>I<913807FF80027F13F849
-B512FE01076E7E011F010313E0903A3FFC007FF0D97FF06D7E49486D7E4849130F48496D
-7E48824890C77E1880485A82003F17C0A3485A18E082A212FFA290B8FCA401FCCAFCA612
-7FA37F123FA2EF03E06C7E17076C17C06C6D140F18806C6D141F6C6DEC3F006C6D147ED9
-7FFC495AD91FFFEB07F86D9038E03FF0010390B512C001005D023F01FCC7FC020113E033
-387CB63C>I<DA1FFE14FE49B539E007FF80010FDAFC1F13C0013FDAFF7F13E090267FF8
-07EBFF072701FFE001EBF07F48497E484990387FF83F91C7003F14C048EEFC1F489338FE
-070049021F90C7FCA2003F82A9001F5EA26D143F6C5E6C5E6E137F6C6D495A6C6D485B6C
-D9F80713804890B6C8FCD803EF14FC01C114E02707C01FFEC9FC49CBFCA2487EA37FA27F
-13FC90B612FE6CEDFFF017FCEFFF806C8318F06C836C837F48B87E1207D80FFCC700037F
-4848EC003F4848150F48486F138083485A83A56D5D007F18006D5D003F5F6C6C4B5A01FE
-153FD807FFED7FF06C01C049485AC601FC011F1380013FB648C7FC010F15F8010115C0D9
-000F01F8C8FC3B4F7CB542>103 D<EB3FF8B5FCA51203C6FCB3A4EE1FFC93B57E030314
-E0030F14F892391FC07FFC92397E003FFE03F86D7EECF9F04B6D7FECFBC0ECFF8092C76C
-7FA25CA25CA45CB3ACB6D8F807B612C0A542537CD249>I<133FEBFFC0487F487FA2487F
-A66C5BA26C5B6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD3
-24>I<EB3FF8B5FCA51203C6FCB3A50407B512F0A59339007FF000EF3FC04D5A4DC7FCEE
-01FC4C5AEE0FF04C5A4C5A4CC8FC16FEED03FC4B5A4B5A4B5A4B7E4B7EECF9FF02FB7F91
-B57EA28203BF7F031F7F14FE4A6C7FDAF0077F6F7FA26F7F6F7F167F83707F707FA2707F
-707F707FA2707F707F84B6D8F00F14FEA53F537DD245>107 D<EB3FF8B5FCA51203C6FC
-B3B3B3B1B612F8A51D537CD224>I<D93FF0D91FF84AB47EB591B56C010F13F8030302E0
-013F13FE030F6E90B6FCDB3F809027F803F80F7F922A7E007FFC07E0077F000302F89028
-3FFE0F80037FC6D9F1F0011F49487EDAF3E0DAFF3E814B153CDAF7805D92C76C496D7F14
-FF4A5EA24A5EA34A5EB3ADB6D8F80FB66CB612F8A565367BB56E>I<D93FF0EB1FFCB591
-B57E030314E0030F14F892391FC07FFC92397E003FFE000302F86D7EC6EBF1F04B6D7FEC
-F3C0ECF78092C76C7F14FF5CA25CA45CB3ACB6D8F807B612C0A542367CB549>I<913801
-FFC0023F13FE91B67E010315E0010F018013F8903A3FFC001FFED97FF0EB07FF49486D7F
-48496D7F48496D7F91C8127F4883488349153F001F83A2003F8349151FA2007F83A400FF
-1880AC007F1800A3003F5F6D153FA2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D
-495B6D6C4990C7FCD93FFCEB1FFE6DB46CB45A010790B512F0010115C0D9003F49C8FC02
-0313E039387CB642>I<90393FF001FCB590380FFF804B13E0037F13F09238FE1FF89138
-F1F83F00019138F07FFC6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC
-5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315
-FE3907FE003FD80FF0130F4848130348481301491300127F90C8127EA248153EA27FA27F
-01F091C7FC13FCEBFF806C13FEECFFF06C14FE6F7E6C15E06C816C15FC6C81C681133F01
-0F15801301D9000F14C0EC003F030713E0150100F880167F6C153FA2161F7EA217C07E6D
-143F17807F6DEC7F0001F85C6DEB03FE9039FF801FFC486CB512F0D8F81F14C0D8F00791
-C7FC39E0007FF02B387CB634>I<147CA614FCA41301A31303A21307A2130F131F133F13
-7F13FF1203000F90B512FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E
-806D6D5A6DEBC1F86DEBFFF001005C023F1380DA03FEC7FC294D7ECB33>I<D93FF89138
-01FFC0B50207B5FCA50003ED001FC61607B3AE5FA35FA25F137F5F6D6C14F7DC01E713F0
-6D6CD907C7EBFFC0903A0FFF801F876D90B51207010114FC6D6C13F0020701C091C7FC42
-377CB549>I<B600E090381FFFFCA5000101F8C7000113006CEE007C6E15FC017F5E6E14
-01013F5E8017036D6D5C17076D5E6F130F6D5E6F131F6D93C7FC815F6D6D133E177E6D15
-7C6F13FC027F5C811601DA3FFF5B16036E5C16876E5C16CF6E5C16EF16FF6E91C8FCA26E
-5BA26E5BA26F5AA36F5AA26F5AA26F5AA35E151F93C9FC5D153E157ED81FC0137C487E48
-6C13FC486C5B14015D4A5A14074A5A6C48485A4948CAFC495A383F81FC6CB45A6C5B0003
-13C0C648CBFC3E4D7DB445>121 D E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Ff ecrm1000 10 81
-/Ff 81 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF
-83C0903A07E001FF0F903B1F8007FE1FE090393F000FFC137E16F85B9338F00780484801
-0790C7FC1503ACB812F8A32801F80003F0C7FCB3AB486C497E267FFFE0B512F0A3333B7F
-BA30>27 D<EC0FF8EC7FFE903901F80780903907E001C090391F8000E090383F0007017E
-497EA25BA2485A6F5AED018092C8FCA9ED03F0B7FCA33901F8000F1503B3AA486C497E26
-7FFFE0B512C0A32A3B7FBA2E>I<EC0FFC91387FFF70903901F803F0903807E00790381F
-800FEB3F00137EA25B150748481303ADB7FCA33901F80003B3AB486C497E267FFFE0B512
-C0A32A3B7FBA2E>I<DA0FF0EB1FF0DA7FFEEBFFFC903B01F80F83F00F903C07E001CFC0
-0380903C1F8000FF0001C090273F0007FE130F017E4948497EA2495CA248485C03076E5A
-03030203C7FC95C8FCA9F007E0BAFCA33C01F80003F0001F1807B3AA486C496C497E267F
-FFE0B500C1B51280A3413B7FBA45>I<007C137C00FE13FEEAFF01A3EAFE00A7007E13FC
-007C137CA8003C137800381338A700181330171E77BA2A>34 D<121C127FEAFF80A213C0
-A3127F121C1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>39
-D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FC
-A25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E
-1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F
-6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0
-B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7
-FC120E5A5A5A5A5A13527CBD20>I<EB0380497EA7397803803C00FC147E00FE14FE397F
-8383FC393FC387F8390FE38FE03903FBBF803900FFFE00EB3FF8EB0FE0A2EB3FF8EBFFFE
-3903FBBF80390FE38FE0393FC387F8397F8383FC39FE0380FE00FC147E0078143C390007
-C000A76D5A1F247BBD2A>I<121C127FEAFF80A213C0A3127F121C1200A412011380A212
-0313005A1206120E5A5A5A12600A19798817>44 D<B512FCA516057F941C>I<121C127F
-EAFF80A5EA7F00121C0909798817>I<1506A2150E150CA2151C151815381530A2157015
-60A215E015C0A214011580A2140315005C1406A2140E140CA2141C1418A214381430A214
-70146014E05CA213015CA2130391C7FCA25B1306A2130E130C131C1318A213381330A213
-701360A213E05BA212015B120390C8FCA25A1206A2120E120CA2121C1218A21238123012
-701260A212E05AA21F537BBD2A>I<EB03F8EB1FFF90387E0FC09038F803E03901E000F0
-484813780007147C48487FA248C77EA2481580A3007EEC0FC0A500FE15E0B3007E15C0A4
-007F141F6C1580A36C1500A26C6C133EA26C6C5B6C6C5BEBF0013900F803E090387E0FC0
-D91FFFC7FCEB03F823397DB62A>I<EB01C013031307131F13FFB5FCA2131F1200B3B3A7
-497E007FB512F0A31C3779B62A>I<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0001E
-6D7E001C6D7E486D7E5A6E7E126012FE6CEC7F807FA56CC7FC121CC8FCEDFF00A25D1401
-5D14035D4A5A4A5A5D4A5A4AC7FC147E5C495A14E0495A495A49C8FC011EEB01805B5B49
-130348481400485A485A90C75A48B6FC5A5A485CB6FCA321377CB62A>I<EB07F8EB3FFF
-90B512C03901F80FF03903C007F848486C7E390E0001FEEA0F80391FE000FF7FA56C5A6C
-5AC7485AA25D14035D4A5A5DEC0F80027FC7FCEB1FFCECFF809038000FE06E7EEC01FC81
-6E7EED7F80A216C0A2153F16E0A2121EEA7F80A2487EA316C0157F491480007EC7FC0070
-ECFF006C495A121E390F8003F83907F00FF00001B512C06C6C90C7FCEB0FF823397DB62A
->I<1538A2157815F8A2140114031407A2140F141F141B14331473146314C313011483EB
-030313071306130C131C131813301370136013C01201EA038013005A120E120C5A123812
-305A12E0B712F8A3C73803F800AA4A7E0103B512F8A325387EB72A>I<0006140CD80780
-133C9038F003F890B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB1FFE903878
-0F809038E007E03907C003F0496C7E130000066D7E81C8FC8181A21680A4121C127F5A7F
-A390C713005D12FC00605C12704A5A6C5C6C1303001E495A6C6C485A3907E03F800001B5
-C7FC38007FFCEB1FE021397CB62A>I<EC3FC0903801FFF0010713FC90380FE03E90383F
-800790387E001F49EB3F804848137F485A12075B000FEC3F0049131E001F91C7FC5B123F
-A3127F90C9FCEB01FC903807FF8039FF1E07E090383801F0496C7E01607F01E0137E497F
-16805BED1FC0A390C713E0A57EA47F123F16C0A2001FEC3F807F000F15006D5B000714FE
-6C6C5B6C6C485A3900FE07F090387FFFC0011F90C7FCEB03FC23397DB62A>I<12301238
-123E003FB612E0A316C05A168016000070C712060060140E5D5D00E014304814705D5DC7
-12014A5A4AC7FC1406140E5CA25C1478147014F05C1301A213035C1307A2130FA3131F5C
-A2133FA5137FA96DC8FC131E233A7BB72A>I<EB03F8EB1FFF017F13C09038FC07F03901
-E001F83903C0007C4848133C90C7123E48141E000E141F001E80A3121FA26D5B6D131E7F
-D80FF85B6D137C01FF13786C6D5A6CEBE3E0ECF780C601FFC7FC6D5A6D6C7E010F13E001
-3F7F01F97F3901E07FFE48486C7E380F800F48486C1380001E010113C0487F007C143F00
-78EC1FE0150F00F81407481403A21501A36C15C0A200781403007C15806C14076CEC0F00
-6C6C131ED807E0137C3903F803F0C6B55A013F1380D907FCC7FC23397DB62A>I<EB03F8
-EB1FFF017F13C03901FC07E048486C7E3907E001F8000F6D7E4848137E5B003F80A248C7
-1380A25AED1FC0A516E0A56C143FA36C7E157F121F6C6C13FF6C6C13DF000313013901F0
-039F3900FC0F1FD93FFC13C0EB07F090C7FCA2153F1680A216005D120F486C137E486C5B
-A24A5A4A5A49485A381F000F001CEB1F80260F807FC7FC3807FFFE000113F838003FC023
-397DB62A>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C09
-2479A317>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A213C0A3127F12
-1C1200A412011380A2120313005A1206120E5A5A5A12600A3479A317>I<007FB812F8B9
-12FCCCFCB0B912FC6C17F836147B9E41>61 D<EC03FF021F13E09138FC00FCD901E0131E
-D90780EB0780011EC7EA01E00138EC00704981498148488148488190C97E48D901FC1480
-000ED907FFEB01C0000C90391F03C000001C90267E00E013E000184901701360263801F8
-6D13700030496D13300103EC0FE0267007E00107133800601718495AA200E0171C484848
-150CAA6C6C7E1260A26D6C151C00701718263003F0130F0101141F00386D013F13382618
-00FC01771330001C017E9038E3F070000C90261F03C113E0000E903A07FF00FFC06CD901
-FCEB3F006C90CAFC7F6C7E6C7E13706D167C011EED03FCD90780EC1FF0D901E0ECFF80D9
-00FC90383FFC00021FB51280020301E0C7FC363C7BBA41>64 D<1538A3157CA315FEA34A
-7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A20270
-7FEC6003A202C07F1501A2D901807F81A249C77F167FA20106810107B6FCA24981010CC7
-121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512
-FEA3373C7DBB3E>I<B712E016FC16FF0001903980007FC06C90C7EA1FE0707E707E707E
-A2707EA283A75F16035F4C5A4C5A4C5A4C5AEEFF8091B500FCC7FCA291C7EA7F80EE1FE0
-EE07F0707E707E83707EA21880177F18C0A7188017FFA24C13005F16034C5AEE1FF8486D
-EB7FF0B812C094C7FC16F832397DB83B>I<913A01FF800180020FEBE003027F13F8903A
-01FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE15
-3F12014848151F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD
-127F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F
-15386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F
-13F002011380313D7BBA3C>I<B712C016F816FE000190398001FF806C90C7EA3FE0EE0F
-F0EE03F8707E707E177FA2EF3F8018C0171F18E0170F18F0A3EF07F8A418FCAC18F8A4EF
-0FF0A218E0A2171F18C0EF3F80A2EF7F0017FE4C5A4C5AEE0FF0EE3FE0486DEBFF80B8C7
-FC16F816C036397DB83F>I<B812FEA3000190388000076C90C8FC173F838383A383A318
-80170116C0A394C7FCA31501A21503150F91B5FCA3EC000F15031501A21500A21860A318
-E093C712C0A41701A3EF0380A21707A2170F173F177F486D903807FF00B9FCA333397EB8
-38>I<B812F8A30001903880001F6C90C71201EE00FC177C173C171CA2170CA4170E1706
-A2ED0180A21700A41503A21507151F91B5FCA3EC001F15071503A21501A692C8FCAD4813
-C0B612C0A32F397DB836>I<DBFF8013C0020FEBF001023F13FC9139FF803F03903A03FC
-000787D90FF0EB03CF4948EB00EF4948147F4948143F49C8121F485A4848150F48481507
-A248481503A2485A1701123F5B007F1600A448481600AB93B6FCA26C7E9338007FE0EF3F
-C0A2123F7F121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D6C14FF6D6C14EFD90FF8EB
-03C7D903FEEB0783903A00FFC03F0191393FFFFC00020F01F0130002001380383D7CBA41
->I<B648B512FEA30001902680000313006C90C76C5AB3A491B6FCA391C71201B3A6486D
-497EB648B512FEA337397DB83E>I<B612C0A3C6EBC0006D5AB3B3AD497EB612C0A31A39
-7EB81E>I<013FB512E0A39039001FFC00EC07F8B3B3A3123FEA7F80EAFFC0A44A5A1380
-D87F005B0070131F6C5C6C495A6C49C7FC380781FC3801FFF038007F80233B7DB82B>I<
-B649B5FCA3000101809038007FF06C90C8EA3F80053EC7FC173C17385F5F4C5A4C5A4CC8
-FC160E5E5E5E5E4B5AED0780030EC9FC5D153E157E15FF5C4A7F4A6C7E140E4A6C7E4A6C
-7E14704A6C7E4A6C7E14804A6C7E6F7EA26F7F707EA2707E707EA2707EA2707E707EA270
-7E707F8484486D497FB6011FEBFF80A339397DB841>I<B612E0A3000101C0C8FC6C90C9
-FCB3AD1718A517381730A31770A317F0A216011603160FEE1FE0486D13FFB8FCA32D397D
-B834>I<B5933807FFF86E5DA20001F0FC002600DFC0ED1BF8A2D9CFE01533A3D9C7F015
-63A3D9C3F815C3A2D9C1FCEC0183A3D9C0FEEC0303A2027F1406A36E6C130CA36E6C1318
-A26E6C1330A36E6C1360A26E6C13C0A3913901FC0180A3913900FE0300A2ED7F06A3ED3F
-8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80FFC6D48497EB500C00203B512F8A2ED018045
-397DB84C>I<B5913807FFFE8080C69238007FE06EEC1F80D9DFF0EC0F001706EBCFF8EB
-C7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E6E7E81140F6E7E8114036E7E168080ED7FC0
-16E0153FED1FF0ED0FF8A2ED07FCED03FEA2ED01FF6F1386A2EE7FC6EE3FE6A2EE1FF6EE
-0FFEA216071603A216011600A2177E486C153E487ED80FFC151EB500C0140EA217063739
-7DB83E>I<EC03FF021F13E09138FE01FC903901F8007ED907E0EB1F8049486D7ED93F80
-EB07F049C76C7E01FE6E7E48486E7E49157E0003167F4848ED3F80A24848ED1FC0A2001F
-17E049150F003F17F0A3007F17F8491507A300FF17FCAC007F17F86D150FA3003F17F0A2
-6C6CED1FE0A36C6CED3FC0000717806D157F000317006C6C15FEA26C6C4A5A017F4A5A6D
-6C495A6D6C495AD907E0EB1F80D903F8017FC7FC903900FE01FC91381FFFE0020390C8FC
-363D7BBA41>I<B712C016FC16FF0001D9800013C06C90C7EA1FE0707EEE03F883707EA2
-707EA21880A71800A24C5AA24C5A5FEE0FF04C5AEEFF8091B548C7FC16F091CAFCB3A548
-7FB6FCA331397EB838>I<EC03FF021F13E09138FE01FC903901F8007ED907E0EB1F8049
-486D7ED93F80EB07F049C76C7E01FE6E7E48486E7EA24848157F0007178049153F000F17
-C049151F001F17E0A24848ED0FF0A3007F17F8A2491507A200FF17FCAC007F17F8A26D15
-0FA2003F17F0A26C6CED1FE0A36C6CED3FC00007027C14804AB4FC3C03F80383807F003B
-01FC0701C0FEEC0E002600FE0CEBE1FC017FEC63F8D93F8CEB77F0D91FCCEB3FE0D907EE
-14806DB449C7FC0100D981FC130CEC1FFF0203131C91C7001E131C161F183CEF807CEFC0
-F8EE0FFFA318F08218E07013C07013809338007E00364B7BBA41>I<B612FEEDFFE016F8
-000190388007FE6C90C76C7EEE3FC0707E707E707EA2707EA283A65FA24C5AA24C5A4C5A
-EE3F8004FFC8FCED07FC91B512E05E9138000FF0ED03F8ED00FE82707E707EA2161F83A5
-83A6F00180A217F8160F1803486D01071400B66D6C5A04011306933800FE0ECAEA3FFCEF
-07F0393B7DB83D>I<D90FF813C090383FFE0190B512813903F807E33907E000F7484813
-7F4848133F48C7121F003E140F007E1407A2007C140312FC1501A36C1400A37E6D14006C
-7E7F13F86CB47E6C13F8ECFF806C14E06C14F86C14FEC680013F1480010714C0EB007F02
-0713E0EC007FED3FF0151F150FED07F8A200C01403A21501A37EA216F07E15036C15E06C
-14076C15C06C140F6DEB1F80D8FBF0EB3F00D8F0FE13FE39E03FFFF8010F13E0D8C00190
-C7FC253D7CBA2E>I<003FB812E0A3D9C003EB001F273E0001FE130348EE01F000781600
-00701770A300601730A400E01738481718A4C71600B3B0913807FF80011FB612E0A33539
-7DB83C>I<B6903807FFFEA3000101809038007FE06C90C8EA1F80EF0F001706B3B2170E
-6D150C80171C133F17186D6C14385F6D6C14F06D6C5C6D6C495A6D6CEB07806D6C49C7FC
-91387F807E91381FFFF8020713E09138007F80373B7DB83E>I<B500FC91387FFF80A300
-03018091380FFC006C90C8EA07E0715A6C705A6E1403017F93C7FCA280013F1506A26E14
-0E011F150C80010F5DA28001075DA26E147001031560A26D6C5CA2806D4A5AA2ED800302
-7F91C8FCA291383FC006A215E0021F5BA2EDF01C020F1318A26E6C5AA215FC02035BA2ED
-FEE002015BA26E6C5AA36FC9FCA3153EA2151CA3393B7EB83E>I<B5D8FC07B5D8F001B5
-FCA30007902780001FFEC7EA1FF86C48C7D80FF8EC07E000010307ED03C01B807F6C6F6C
-1500A26E5F017F6E6C1406A280013F4A6C5CA280011F4A6D5BEE067FA26D6C010E6D5BEE
-0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE300FA26D6C6F485AEE6007A26D6C4CC7FC93
-38C003FCA203805D913B7F818001FE06A203C1150EDA3FC3C7EAFF0CA203E3151CDA1FE6
-EC7F98A215F6DA0FFCEC3FF0A302075E4B141FA202035E4B140FA202015E4B1407A20200
-93C8FC4B80503B7EB855>I<007FB590383FFFFCA3C601F801071380D97FE0D903FCC7FC
-013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C1306160E6D6C5B6DEB801816389138
-7FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC5D14036E7EA26E7F6F7EA24B7E15
-DF9138019FF09138038FF8150F91380607FC91380E03FE140C4A6C7EEC38000230804A6D
-7E14E04A6D7E49486D7E130391C76C7E01066E7E130E010C6E7E011C1401013C8101FE82
-2607FF80010713E0B500E0013FEBFF80A339397EB83E>I<B500FE91383FFFE0A3000301
-E0913807FE00C649EC03F0017F6F5A606D6C5D6D6C140395C7FC6D6C1406A26D6C5C6D6C
-141C17186D6C143817306D6D5B6E6C13E05F91383FE0015F91381FF003DA0FF890C8FC16
-06913807FC0E160C913803FE1C913801FF185E6E13B016E0157F6F5AB3A24B7E023FB512
-C0A33B397FB83E>I<003FB7FCA39039FC0001FE01C0130349495A003EC7FC003C4A5A5E
-0038141F00784A5A12704B5A5E006014FF4A90C7FCA24A5A5DC712074A5AA24A5A5D143F
-4A5AA24A5A92C8FC5B495AA2495A5C130F4948EB0180A2495A5C137F495A16034890C7FC
-5B1203485AEE0700485A495C001F5D48485C5E4848495A49130FB8FCA329397BB833>I<
-007FB81280B912C0A26C17803204797041>95 D<EB1FE0EBFFFC3803E03F3907000F8039
-0F8007E0486C6C7E13E06E7EA26E7E6C5A6C5AC8FCA4147FEB07FFEB3FE0EBFE00EA03F8
-EA0FF0EA1FC0123F485A90C7FC160C12FEA31401A26C13036CEB077C903980063E18383F
-C01E3A0FE0781FF03A03FFF00FE03A007F8007C026277DA52A>97
-D<EA03F012FFA3120F1203B0EC1FE0EC7FF89038F1E03E9039F3801F809039F7000FC001
-FEEB07E049EB03F049EB01F85BED00FCA216FEA2167E167FAA167E16FEA216FC15016D14
-F8ED03F07F01EEEB07E001C6EB0FC09039C7801F00903881E07E903800FFF8C7EA1FC028
-3B7EB92E>I<EB03FC90381FFF8090387E03E03901F80070484813F83907E001FC380FC0
-03A2EA1F80123F90380001F848EB00F01500A2127E12FEAA127E127FA26C14067F001F14
-0E6D130C000F141C6C6C13386C6C13706C6C13E039007C07C090381FFF00EB07F81F277D
-A525>I<ED0FC0EC03FFA3EC003F150FB0EB03F8EB1FFF90387E078F9038F801EF3903F0
-007F4848133F4848131FA24848130F123F90C7FC5AA2127E12FEAA127E127FA27EA26C6C
-131FA26C6C133F6C6C137F6C6CEBEFF03A01F801CFFF39007C078F90381FFE0FD907F813
-C0283B7DB92E>I<EB07F8EB1FFF90387C0FC03901F803E03903F001F0D807E013F8380F
-C0004848137CA248C7127E153E5A153F127E12FEA3B7FCA248C8FCA5127EA2127FA26C14
-037F001F14076C6C13060007140E6D131CD801F013386C6C137090387E03E090381FFF80
-903803FC0020277EA525>I<147E903803FF8090380FC1E0EB1F8790383F0FF0137EA213
-FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8A31C3B7FBA19>I<
-ED03F090390FF00FF890393FFC3C3C9039F81F707C3901F00FE03903E007C03A07C003E0
-10000FECF000A248486C7EA86C6C485AA200075C6C6C485A6D485A6D48C7FC38073FFC38
-060FF0000EC9FCA4120FA213C06CB512C015F86C14FE6CECFF804815C03A0F80007FE048
-C7EA0FF0003E140348140116F8481400A56C1401007C15F06CEC03E0003F1407D80F80EB
-0F80D807E0EB3F003901FC01FC39007FFFF0010790C7FC26387EA52A>I<EA03F012FFA3
-120F1203B0EC0FF0EC3FFCECF03F9039F1C01F809039F3800FC0EBF70013FE496D7EA25B
-A35BB3A3486C497EB500C1B51280A3293A7EB92E>I<EA0380EA0FE0487EA56C5AEA0380
-C8FCAAEA03F012FFA312071203B3AA487EB512C0A312387EB717>I<EB01C0EB07F0EB0F
-F8A5EB07F0EB01C090C7FCAAEB01F813FFA313071301B3B3A2123C127E00FF13F01303A2
-14E038FE07C0127C383C0F00EA0FFEEA03F8154984B719>I<EA03F012FFA3120F1203B1
-913801FFFCA39138007FC01600157C15705D4A5A4A5A4AC7FC141E1438147814FC13F1EB
-F3FEEBF73F01FE7FEBF81F496C7E8114076E7E6E7E811400157E157F811680ED1FC0486C
-EB3FF0B500C0B5FCA3283A7EB92C>I<EA03F012FFA3120F1203B3B3AD487EB512C0A312
-3A7EB917>I<2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E07E903BF1C01F8380
-3F3D0FF3800FC7001F802603F70013CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A348
-6C496CEB1FE0B500C1B50083B5FCA340257EA445>I<3903F00FF000FFEB3FFCECF03F90
-39F1C01F803A0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C497EB500C1B51280
-A329257EA42E>I<EB03FE90380FFF8090383E03E09038F800F84848137C48487F48487F
-4848EB0F80001F15C090C712074815E0A2007EEC03F0A400FE15F8A9007E15F0A2007F14
-076C15E0A26C6CEB0FC0000F15806D131F6C6CEB3F006C6C137EC66C13F890387E03F090
-381FFFC0D903FEC7FC25277EA52A>I<3903F01FE000FFEB7FF89038F1E07E9039F3801F
-803A07F7000FC0D803FEEB07E049EB03F04914F849130116FC150016FEA3167FAA16FEA3
-ED01FCA26DEB03F816F06D13076DEB0FE001F614C09039F7803F009038F1E07E9038F0FF
-F8EC1FC091C8FCAB487EB512C0A328357EA42E>I<D903F813C090381FFE0190387E0781
-9038FC01C33903F000E3000714774848133749133F001F141F485A150F48C7FCA312FEAA
-127FA37E6D131F121F6D133F120F6C6C137F6C6C13EF3901F801CF39007E078F90381FFE
-0FEB07F890C7FCABED1FE00203B5FCA328357DA42C>I<3807E01F00FFEB7FC09038E1E3
-E09038E387F0380FE707EA03E613EE9038EC03E09038FC0080491300A45BB3A2487EB512
-F0A31C257EA421>I<EBFF03000313E7380F80FF381E003F487F487F00707F12F0A2807E
-A27EB490C7FCEA7FE013FF6C13E06C13F86C7F00037FC67F01071380EB007F141F00C0EB
-0FC01407A26C1303A37E15806C13077EEC0F00B4131E38F3C07C38E1FFF038C03F801A27
-7DA521>I<1318A51338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215
-C0A93800FC011580EB7C03017E13006D5AEB0FFEEB01F81A347FB220>I<D803F0EB07E0
-00FFEB01FFA3000FEB001F00031407B3A4150FA3151F12016D133F0000EC77F86D9038E7
-FF8090383F03C790381FFF87903A03FC07E00029267EA42E>I<B538803FFEA33A0FF800
-0FF06C48EB07E00003EC03C06D148000011500A26C6C1306A26D130E017E130CA26D5BA2
-EC8038011F1330A26D6C5AA214E001075BA2903803F180A3D901FBC7FCA214FF6D5AA214
-7CA31438A227257EA32C>I<B53A1FFFE03FFEA3260FF8009038000FF86C48017EEB03E0
-18C00003023EEB0180A26C6C013FEB0300A36C6CEC8006156FA2017E9038EFC00C15C717
-1CD93F01EBE01815830281EBF038D91F831430150102C3EBF87090260FC6001360A2D907
-E66D5A02EC137CA2D903FCEB7F804A133FA2010192C7FC4A7FA20100141E4A130E026013
-0C37257EA33C>I<B538807FFFA33A03FE003FF00001EC1F80000092C7FC017E131C6D13
-186D6C5AECC070010F5B6D6C5AECF180EB03FB6DB4C8FC6D5AA2147F804A7E8114CF9038
-01C7E090380383F090380703F8EB0601496C7E011C137E49137F01787F496D7E486C8000
-0FEC3FF0D8FFFE90B51280A329247FA32C>I<B538803FFEA33A0FF8000FF06C48EB07C0
-0003EC03806C7E16007F00001406A2017E5BA2137F6D5BA26D6C5AA2ECC070010F1360A2
-6D6C5AA214F101035BA2D901FBC7FCA214FF6D5AA2147CA31438A21430A214701460A25C
-A2EA7C0100FE5B130391C8FC1306EAFC0EEA701C6C5AEA1FF0EA0FC027357EA32C>I<00
-3FB512FCA2EB8003D83E0013F8003CEB07F00038EB0FE012300070EB1FC0EC3F80006013
-7F150014FE495AA2C6485A495AA2495A495A495AA290387F000613FEA2485A485A000714
-0E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F247EA325>I
-E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fg ecss2074 20.74 10
-/Fg 10 116 df<EAFFC0B3B3B3B3B3B390B912FCA83E7570F456>76
-D<D8FFC0F03FF0B3B3B3B3AD6C6CF07FE0A46C6CF0FFC0A36D5F001F1A80A26C6C4D1300
-A26C6C4D5A6D170F6C616E161F6C6D4C5A6C6D4C5A6E16FF6D6C4B5B6D6C4B5B6D6C4B5B
-6D6C6C021F90C7FC6D01E0EC7FFE6D01F849485A6D9026FF801F5B6D91B65A6E5E021F16
-8002074BC8FC020115F86E6C14E0030F91C9FC030013F04C7770F46D>85
-D<91380FFF8049B512F0010F14FC017F14FF48B712C0000782001F824882DAE0007F49C7
-EA3FFE01F8140FD81FC06E7E90C86C1380121E00186F13C0001081CAFCEF7FE0A318F017
-3FAD93B5FC157F0207B6FC143F49B7FC1307011F153F017FEBF80090B512804801F8C7FC
-4813C04890C8FCEA0FFC485A485A5B485A5BA248C9FCA5177FA26D15FFA26C6C5C6D5C6D
-140F6C6C5C01FF91B5FC6CEBE00791B612BF6CEDFE3F16FC6C15F06C15C06CECFE006C6C
-13F0D91FFCC9FC344C77CA4C>97 D<EAFFC0B3B3ADED0FFC92B57E020714E0021F80027F
-14FC91B67E01C38101C7829026CFFE0080D9DFF0131FD9FFC001037F4A6D7F49C86C7E49
-153F496F7E170F496F7E5B717E4981A2711380A2187FA219C0183FA419E0181FAD183F19
-C0A3187FA2198018FFA24D1300A25F6D5E17076D4B5A6D151F4D5A6D4B5A6D15FF6D0203
-5B6E495BD9DFE0013F5B9026CFFC01B5C7FC01C7B65A01C35D01C15D01C05D023F14C002
-0F5C020301FCC8FCC8EA3FE03B7C72FA52>I<ED3FFF4AB512F8020F14FF023F15C04A15
-F049B712FC4916FF49178049EBE0004990C7120FD93FFC02011300D97FF06E7E4948151F
-0280814890C912034894C7FC5B485A5B120F5B121F5B123F5BA3485AA548CCFCAD6C7EA4
-7F123FA27F121F7FA26C7EA26C6C17806D1601000317036C6C160F6E151F6C01E0ED7FC0
-6D6CEC01FFD93FFC14076DB4143F6DD9E003B512806D90B6EAFE006D5E6D16F06D6C5D6E
-1580020F02FCC7FC020114E09126003FFCC8FC3A4C78CA47>I<DB1FE04AB4FC912601FF
-FE143F02079026FF8003B5FC4AECC01F023F02F0B6FC4A02FB158091BAFC49EBE01F49D9
-000302FCC7FC49486D01F8C8FC02F89038007F8049486E7E49486E7E4A140F013F824A14
-07A249C86C7EA401FE6F7EAA017F4B5AA46D6C4A5AA26E140F011F5E6E141F6D6C4A5A6D
-6C4A5A02FEEB01FF496C4990C9FC499038E01FFE92B55A495D02BF5C020F14C0496C5CD9
-7E0149CAFC9138001FE001FE90CCFCA67FA27F8080EB3FF091B612FE6DEDFFF818FF6D17
-C019F0013F17FC498390BA7E48854801E0C71203480180DA001F7F4848C900037F484816
-0049EF3FF84848171F49717E127F4917078648481703A76D1707007F616D170F003F616D
-171FD81FFCEF7FF06C6C4D5A6D5E6C01C003075B6C01F8033F5BC601FF4AB448C7FC6D01
-F0011F5B6D90B75A010F17E00103178001004CC8FC021F15F002031580DA000F01E0C9FC
-496D7CC950>103 D<EAFFE0ABC7FCB3A9EA7FE0B3B3B3B30B6F74EE25>105
-D<EAFFC0B3B3B3B3B3B3AF0A7B73FA25>108 D<ED1FF826FFC001B57E020714E0021F14
-F8027F8091B67E01C18101C316809038C7FE00D9CFF0011F13C0D9DFE0010713E0D9FF80
-130191C8FC18F049157F5B173F4916F8A249151FA35BA45BB3B3AC354A72C952>110
-D<91380FFFC091B512FE0107ECFFC0011F15F8017F15FE90B812804817C05A489038F000
-3F4890C70003138049EC007FD81FF8151F491507003F16014992C7FCA2485AA77FA26C7E
-7F7F6CB4FC6C13C014F86CEBFF806C14FC6CECFFE06C15FC6D14FF6D15C0010F81010315
-F8010081020F80DA007F7F03071480DB003F13C0160F040313E01600EF7FF0173FA2EF1F
-F8A2170FA7EF1FF0A20070163F127C007FEE7FE001C015FF01F0020313C0B5020F138002
-F0137F91B712006C5E001F5E000716F0C65E011F1580010302FCC7FCD9000F13C0354C7C
-CA3D>115 D E
-%EndDVIPSBitmapFont
-end
-%%EndProlog
-%%BeginSetup
-%%Feature: *Resolution 600dpi
-TeXDict begin
-%%BeginPaperSize: Letter
-letter
-%%EndPaperSize
-
-%%EndSetup
-%%Page: 1 1
-1 0 bop 0 201 a Fg(Using)54 b(Libical)p 0 315 3900 24
-v 0 428 a Ff(Eric)28 b(Busb)r(o)r(om)f(\(eric@soft)n(w)n
-(arestudio.org\))1948 b(Jan)n(uary)26 b(2001)0 1072 y
-Fe(Con)l(ten)l(ts)0 1312 y Fd(1)77 b(In)m(tro)s(duction)3201
-b(2)125 1468 y Ff(1.1)83 b(The)28 b(libical)f(pro)5 b(ject)67
-b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
-(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(3)125 1625 y(1.2)83
-b(License)22 b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)134 b(3)125 1781 y(1.3)83 b(Example)28 b(Co)r(de)78
-b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
-f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(3)0 2021
-y Fd(2)77 b(Building)30 b(the)h(Library)2865 b(3)0 2260
-y(3)77 b(Structure)3330 b(3)125 2417 y Ff(3.1)83 b(Core)27
-b(iCal)g(classes)62 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
-h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
-b(4)315 2573 y(3.1.1)94 b(Prop)r(erties)34 b(.)42 b(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)
-h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
-(.)h(.)134 b(4)315 2730 y(3.1.2)94 b(Comp)r(onen)n(ts)84
-b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
-h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g
-(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 2886 y(3.1.3)94
-b(V)-7 b(alues)108 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f
-(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
-h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
-b(5)315 3043 y(3.1.4)94 b(P)n(arameters)61 b(.)41 b(.)h(.)g(.)f(.)h(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)134 b(5)125 3199 y(3.2)83 b(Other)27 b(elemen)n(ts)h(of)f(libical)42
-b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
-f(.)h(.)f(.)h(.)134 b(5)315 3356 y(3.2.1)94 b(En)n(umerations)27
-b(and)g(t)n(yp)r(es)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 3512 y(3.2.2)94 b(The)28
-b(parser)78 b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
-h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
-(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315
-3669 y(3.2.3)94 b(Error)26 b(ob)5 b(jects)57 b(.)42 b(.)g(.)f(.)h(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)134 b(5)315 3825 y(3.2.4)94 b(Memory)27 b(Managemen)n(t)65
-b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)
-h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
-(.)h(.)134 b(5)315 3981 y(3.2.5)94 b(Storage)26 b(classes)64
-b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)134 b(5)0 4221 y Fd(4)77 b(Di\033erences)30
-b(F)-8 b(rom)31 b(RF)m(Cs)2750 b(6)125 4377 y Ff(4.1)83
-b(Pseudo)28 b(Comp)r(onen)n(ts)62 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
-f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
-b(6)125 4534 y(4.2)83 b(Com)n(bined)28 b(V)-7 b(alues)108
-b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
-(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(6)125 4690 y(4.3)83
-b(Multi-V)-7 b(alued)28 b(Prop)r(erties)54 b(.)41 b(.)h(.)f(.)h(.)f(.)h
-(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
-f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
-b(6)0 4930 y Fd(5)77 b(Using)31 b(libical)3208 b(7)125
-5086 y Ff(5.1)83 b(Creating)27 b(Comp)r(onen)n(ts)73
-b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 5243 y(5.1.1)94 b(Constructor)26
-b(In)n(terfaces)48 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
-f(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 5399 y(5.1.2)94 b(v)-5
-b(aargs)26 b(Constructors)70 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
-h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(8)p eop
-%%Page: 2 2
-2 1 bop 0 -167 3900 5 v 0 -200 a Fd(1.)73 b(In)m(tro)s(duction)3184
-b Ff(2)315 162 y(5.1.3)94 b(P)n(arsing)26 b(T)-7 b(ext)28
-b(Files)68 b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
-f(.)h(.)f(.)h(.)f(.)h(.)134 b(8)125 318 y(5.2)83 b(A)n(ccessing)27
-b(Comp)r(onen)n(ts)105 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
-h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315 475
-y(5.2.1)h(Finding)28 b(Comp)r(onen)n(ts)99 b(.)42 b(.)f(.)h(.)f(.)h(.)g
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)
-h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315
-631 y(5.2.2)h(Iterating)27 b(Through)f(Comp)r(onen)n(ts)45
-b(.)d(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
-b(10)315 788 y(5.2.3)h(Using)27 b(Comp)r(onen)n(t)h(Iterators)59
-b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
-b(11)315 944 y(5.2.4)h(Remo)n(ving)27 b(Comp)r(onen)n(ts)83
-b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)93 b(12)315 1101 y(5.2.5)h(W)-7 b(orking)27 b(with)h(prop)r(erties)e
-(and)i(parameters)e(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
-b(12)315 1257 y(5.2.6)h(W)-7 b(orking)27 b(with)h(v)-5
-b(alues)52 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
-h(.)f(.)h(.)f(.)h(.)93 b(13)315 1413 y(5.2.7)h(Chec)n(king)27
-b(Comp)r(onen)n(t)g(V)-7 b(alidit)n(y)25 b(.)42 b(.)g(.)f(.)h(.)f(.)h
-(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
-h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(14)315 1570 y(5.2.8)h(Con)n(v)n
-(erting)26 b(Comp)r(onen)n(ts)h(to)g(T)-7 b(ext)74 b(.)41
-b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
-(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(14)125
-1726 y(5.3)83 b(Time)33 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
-f(.)h(.)f(.)h(.)93 b(15)315 1883 y(5.3.1)h(Time)28 b(structure)56
-b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)93 b(15)315 2039 y(5.3.2)h(Creating)26
-b(time)j(structures)j(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)93 b(15)315 2196 y(5.3.3)h(Time)28
-b(manipulating)f(routines)38 b(.)j(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
-(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
-h(.)f(.)h(.)f(.)h(.)93 b(15)125 2352 y(5.4)83 b(Storing)27
-b(Ob)5 b(jects)39 b(.)i(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
-(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
-f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
-b(17)315 2509 y(5.4.1)h(Creating)26 b(a)i(new)f(set)48
-b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
-h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
-(.)h(.)f(.)h(.)93 b(17)315 2665 y(5.4.2)h(A)n(dding,)28
-b(Finding)f(and)h(Remo)n(ving)e(Comp)r(onen)n(ts)76 b(.)41
-b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
-(.)f(.)h(.)f(.)h(.)93 b(18)315 2822 y(5.4.3)h(Other)27
-b(routines)70 b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
-(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
-f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(19)125 2978
-y(5.5)83 b(Memory)27 b(Managemen)n(t)73 b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)
-h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
-(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
-b(19)125 3135 y(5.6)83 b(Error)27 b(Handling)56 b(.)41
-b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
-(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
-h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(20)315 3291 y(5.6.1)h(Return)28
-b(v)-5 b(alues)34 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(20)315
-3448 y(5.6.2)h(icalerrno)28 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
-(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
-b(20)315 3604 y(5.6.3)h(X-LIC-ERR)n(OR)27 b(and)g(X-LIC-INV)-9
-b(ALID-COMPONENT)70 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
-f(.)h(.)f(.)h(.)f(.)h(.)93 b(20)125 3760 y(5.7)83 b(Naming)28
-b(Standard)h(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
-(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
-f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(21)0
-4000 y Fd(6)77 b(Hac)m(ks)32 b(and)g(Bugs)3009 b(22)0
-4338 y Fe(1)131 b(In)l(tro)t(duction)0 4577 y Ff(Libical)23
-b(is)f(an)h(Op)r(en)g(Source)f(implemen)n(tation)h(of)g(the)g
-(iCalendar)f(proto)r(cols)f(and)i(proto)r(col)e(data)i(units.)35
-b(The)23 b(iCalendar)0 4691 y(sp)r(eci\034cation)29 b(describ)r(es)f
-(ho)n(w)h(calendar)f(clien)n(ts)h(can)f(comm)n(unicate)h(with)h
-(calendar)d(serv)n(ers)g(so)i(users)f(can)h(store)f(their)0
-4804 y(calendar)e(data)h(and)h(arrange)d(meetings)i(with)h(other)f
-(users.)0 4961 y(Libical)g(implemen)n(ts)h(RF)n(C2445,)e(RF)n(C2446)f
-(and)j(some)f(of)g(RF)n(C2447)f(and)h(the)h(CAP)g(draft.)0
-5117 y(This)k(do)r(cumen)n(tation)g(assumes)g(that)g(y)n(ou)g(are)f
-(familiar)h(with)h(the)f(iCalendar)f(standards)g(RF)n(C2445)g(and)h(RF)
-n(C2446.)0 5231 y(these)c(sp)r(eci\034cations)e(are)h(online)g(on)h
-(the)g(CALSCH)g(w)n(ebpage)e(at:)p eop
-%%Page: 3 3
-3 2 bop 0 -167 3900 5 v 0 -200 a Fd(2.)73 b(Building)31
-b(the)g(Library)2847 b Ff(3)0 162 y Fc(http://www.imc.o)o(rg)o(/ie)o
-(tf)o(-c)o(ale)o(nd)o(ar)o(/)0 453 y Fb(1.1)112 b(The)38
-b(libical)c(pro)6 b(ject)0 663 y Ff(This)29 b(co)r(de)g(is)g(under)g
-(activ)n(e)f(dev)n(elopmen)n(t.)40 b(If)30 b(y)n(ou)e(w)n(ould)h(lik)n
-(e)f(to)h(con)n(tribute)g(to)g(the)g(pro)5 b(ject,)29
-b(y)n(ou)f(can)h(con)n(tact)f(me,)0 777 y(Eric)g(Busb)r(o)r(om,)f(at)g
-(eric@soft)n(w)n(arestudio.org.)33 b(The)27 b(pro)5 b(ject)27
-b(has)g(a)g(w)n(ebpage)g(at)0 1016 y Fc(http://softwares)o(tu)o(dio)o
-(.o)o(rg)o(/li)o(bi)o(ca)o(l/i)o(nd)o(ex)o(.ht)o(ml)0
-1256 y Ff(and)g(a)h(mailing)f(list)g(that)h(y)n(ou)f(can)g(join)h(b)n
-(y)f(sending)g(the)h(follo)n(wing)f(mail:)0 1495 y Fc(To:)42
-b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g)0 1609
-y(Subject:)e(subscribe)g(libical)0 1900 y Fb(1.2)112
-b(License)0 2111 y Ff(The)60 b(co)r(de)f(and)h(data\034les)f(in)h(this)
-g(distribution)g(are)e(licensed)i(under)g(the)g(Mozilla)f(Public)h
-(License.)133 b(See)0 2224 y(h)n(ttp://www.mozilla.org/NPL/MPL-1.0.h)n
-(tml)37 b(for)j(a)h(cop)n(y)f(of)g(the)i(license.)76
-b(Alternately)-7 b(,)44 b(y)n(ou)c(ma)n(y)g(use)g(libical)0
-2338 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d(General)h
-(Public)i(License.)50 b(See)32 b(h)n(ttp://www.fsf.org/cop)n
-(yleft/lesser.h)n(tml)0 2451 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.)
-0 2608 y(This)j(dual)g(license)f(ensures)h(that)g(the)g(library)f(can)g
-(b)r(e)i(incorp)r(orated)d(in)n(to)i(b)r(oth)g(proprietary)e(co)r(de)i
-(and)f(GPL'd)i(pro-)0 2721 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g
-(from)f(impro)n(v)n(emen)n(ts)e(made)i(b)n(y)g(programmers)e(in)i(b)r
-(oth)h(realms.)34 b(I)25 b(will)f(only)g(accept)g(c)n(hanges)0
-2835 y(in)n(to)j(m)n(y)h(v)n(ersion)e(of)h(the)h(library)e(if)i(they)g
-(are)f(similarly)f(dual-licensed.)0 3126 y Fb(1.3)112
-b(Example)37 b(Co)s(de)0 3336 y Ff(A)h(lot)f(of)h(the)g(do)r(cumen)n
-(tation)f(for)g(this)h(library)e(is)i(in)g(the)g(form)f(of)g(example)g
-(co)r(de.)67 b(These)37 b(examples)g(are)g(in)h(the)0
-3450 y("examples")26 b(directory)g(of)i(the)g(distribution.)36
-b(Also)28 b(lo)r(ok)e(in)i("src/test")e(for)h(additional)g(annotated)g
-(examples.)0 3788 y Fe(2)131 b(Building)46 b(the)e(Library)0
-4027 y Ff(Libical)33 b(uses)h(auto)r(conf)f(to)h(generate)e(mak)n
-(e\034les.)55 b(It)34 b(should)g(built)g(with)g(no)g(adjustmen)n(ts)g
-(on)f(Lin)n(ux,)j(F)-7 b(reeBSD)33 b(and)0 4141 y(Solaris)22
-b(under)i(gcc.)34 b(Some)24 b(v)n(ersion)e(ha)n(v)n(e)g(b)r(een)i
-(successfully)f(b)r(een)h(build)g(on)f(MacOS,)g(Solaris,)g(UnixW)-7
-b(are,)24 b(And)g(T)-7 b(ru64)0 4254 y(UNIX)28 b(without)g(gcc,)f(but)i
-(y)n(ou)d(ma)n(y)h(run)h(in)n(to)f(problems)g(with)h(a)f(particular)f
-(later)h(v)n(ersion.)0 4411 y(F)-7 b(or)27 b(a)g(more)g(complete)g
-(guide)h(to)f(building)h(the)g(library)-7 b(,)26 b(see)h(the)h(README)i
-(\034le)e(in)f(the)h(distribution.)0 4749 y Fe(3)131
-b(Structure)0 4988 y Ff(The)28 b(iCal)f(calendar)f(mo)r(del)i(is)f
-(based)g(on)h(four)f(t)n(yp)r(es)g(of)h(ob)5 b(jects:)36
-b(comp)r(onen)n(ts,)27 b(prop)r(erties,)g(v)-5 b(alues)27
-b(and)g(parameters.)0 5144 y(Prop)r(erties)32 b(are)f(the)i(fundamen)n
-(tal)f(unit)i(of)e(information)g(in)g(iCal,)i(and)e(they)g(w)n(ork)f(a)
-h(bit)h(lik)n(e)f(a)g(hash)g(en)n(try)-7 b(,)34 b(with)e(a)0
-5258 y(constan)n(t)21 b(k)n(ey)h(and)g(a)f(v)-5 b(ariable)21
-b(v)-5 b(alue.)35 b(Prop)r(erties)21 b(ma)n(y)h(also)f(ha)n(v)n(e)g(mo)
-r(di\034ers,)h(called)g(parameters.)33 b(In)22 b(the)h(iCal)f(con)n
-(ten)n(t)0 5371 y(line)p eop
-%%Page: 4 4
-4 3 bop 0 -167 3900 5 v 0 -200 a Fd(3.)73 b(Structure)3313
-b Ff(4)0 162 y Fc(ORGANIZER;ROLE=C)o(HA)o(IR:)o(MA)o(IL)o(TO:)o(mr)o
-(bi)o(g@h)o(os)o(t.)o(com)0 401 y Ff(The)34 b(prop)r(ert)n(y)f(name)h
-(is)g("OR)n(GANIZER,")g(the)g(v)-5 b(alue)34 b(of)h(the)f(prop)r(ert)n
-(y)f(is)h("mrbig@host.com")e(and)i(the)g("R)n(OLE")0
-515 y(parameter)26 b(sp)r(eci\034es)h(that)h(Mr)g(Big)f(is)g(the)h(c)n
-(hair)e(of)i(the)g(meetings)f(asso)r(ciated)f(with)i(this)g(prop)r(ert)
-n(y)-7 b(.)0 671 y(Comp)r(onen)n(ts)26 b(are)f(groups)g(of)h(prop)r
-(erties)f(that)i(represen)n(t)e(the)i(core)e(ob)5 b(jects)26
-b(of)g(a)g(calendar)f(system,)h(suc)n(h)g(as)g(ev)n(en)n(ts)f(or)0
-785 y(timezones.)36 b(Comp)r(onen)n(ts)27 b(are)g(delimited)h(b)n(y)g
-("BEGIN")f(and)g("END")h(tags.)0 941 y(When)g(a)f(comp)r(onen)n(t)g(is)
-h(sen)n(t)f(across)f(a)h(net)n(w)n(ork,)f(if)i(it)g(is)g(un-encrypted,)
-f(it)h(will)g(lo)r(ok)f(something)g(lik)n(e:)0 1181 y
-Fc(BEGIN:VCALENDAR)0 1294 y(METHOD:REQUEST)0 1408 y(PRODID:)41
-b(-//hacksw/handc)o(al)o(//N)o(ON)o(SG)o(ML)c(v1.0//EN)0
-1521 y(BEGIN:VEVENT)0 1635 y(DTSTAMP:19980309)o(T2)o(310)o(00)o(Z)0
-1749 y(UID:guid-1.host1)o(.c)o(om)0 1862 y(ORGANIZER;ROLE=C)o(HA)o(IR:)
-o(MA)o(IL)o(TO:)o(mr)o(bi)o(g@h)o(os)o(t.)o(com)0 1976
-y(ATTENDEE;RSVP=TR)o(UE)o(;RO)o(LE)o(=R)o(EQ-)o(PA)o(RT)o(ICI)o(PA)o
-(NT)o(;CU)o(TY)o(PE)o(=GR)o(OU)o(P:)87 2089 y(MAILTO:employee-)o(A@h)o
-(os)o(t.)o(com)0 2203 y(DESCRIPTION:Proj)o(ec)o(t)h(XYZ)k(Review)f
-(Meeting)0 2317 y(CATEGORIES:MEETI)o(NG)0 2430 y(CLASS:PUBLIC)0
-2544 y(CREATED:19980309)o(T1)o(300)o(00)o(Z)0 2657 y(SUMMARY:XYZ)e
-(Project)i(Review)0 2771 y(DTSTART;TZID=US-)o(Ea)o(ste)o(rn)o(:1)o(998)
-o(03)o(12)o(T08)o(30)o(00)0 2884 y(DTEND;TZID=US-Ea)o(st)o(ern)o(:1)o
-(99)o(803)o(12)o(T0)o(930)o(00)0 2998 y(LOCATION:1CP)d(Conference)i
-(Room)i(4350)0 3112 y(END:VEVENT)0 3225 y(END:VCALENDAR)0
-3465 y Ff(Note)28 b(that)h(comp)r(onen)n(ts)f(can)g(b)r(e)h(nested;)g
-(this)g(example)e(has)h(b)r(oth)h(a)f(V)n(CALEND)n(AR)i(and)e(a)g
-(VEVENT)i(comp)r(onen)n(t,)0 3578 y(one)d(nested)h(inside)f(the)h
-(other.)0 3870 y Fb(3.1)112 b(Core)37 b(iCal)f(classes)0
-4080 y Ff(Libical)25 b(is)h(an)g(ob)5 b(ject-based,)25
-b(data-orien)n(ted)f(library)-7 b(.)34 b(Nearly)25 b(all)h(of)g(the)g
-(routines)f(in)h(the)g(library)e(are)h(asso)r(ciated)g(with)0
-4193 y(an)e(opaque)g(data)f(t)n(yp)r(es)i(and)f(p)r(erform)g(some)g(op)
-r(eration)f(on)h(that)h(data)e(t)n(yp)r(e.)36 b(Although)24
-b(the)f(library)f(do)r(es)h(not)h(actually)0 4307 y(ha)n(v)n(e)32
-b(classes,)h(w)n(e)g(will)g(use)g(those)g(terms)f(since)h(the)h(b)r
-(eha)n(vior)d(of)i(these)g(asso)r(ciations)e(of)j(data)e(and)h
-(routines)f(is)h(v)n(ery)0 4420 y(similar)27 b(to)g(a)g(class.)0
-4693 y Fd(3.1.1)94 b(Prop)s(erties)0 4903 y Ff(Prop)r(erties)23
-b(are)g(represen)n(ted)f(with)j(the)f(icalprop)r(ert)n(y)e(class)h(and)
-g(its)h(man)n(y)f("deriv)n(ed")f(classes)g(with)j(on)e("deriv)n(ed")f
-(class)0 5017 y(p)r(er)35 b(prop)r(ert)n(y)g(t)n(yp)r(e)g(in)h(RF)n
-(C2445.)59 b(Again,)37 b(there)e(is)h(no)f(actual)g(inheritance)g
-(relations,)h(but)g(there)g(are)e(clusters)h(of)0 5130
-y(routines)27 b(that)h(mak)n(e)e(this)i(term)g(useful.)37
-b(A)28 b(prop)r(ert)n(y)e(is)i(a)f(con)n(tainer)f(for)h(a)g(single)g(v)
--5 b(alue)28 b(and)f(a)g(set)h(of)f(parameters.)p eop
-%%Page: 5 5
-5 4 bop 0 -167 3900 5 v 0 -200 a Fd(3.)73 b(Structure)3313
-b Ff(5)0 162 y Fd(3.1.2)94 b(Comp)s(onen)m(ts)0 372 y
-Ff(In)29 b(libical,)f(comp)r(onen)n(ts)g(are)g(represen)n(ted)f(with)i
-(the)g(icalcomp)r(onen)n(t)e(class.)39 b(Icalcomp)r(onen)n(t)27
-b(is)i(a)f(con)n(tainer)f(for)h(a)g(set)0 485 y(of)g(other)e(comp)r
-(onen)n(ts)h(and)h(prop)r(erties.)0 758 y Fd(3.1.3)94
-b(V)-8 b(alues)0 968 y Ff(V)h(alues)29 b(are)g(represen)n(ted)f(in)i(a)
-f(similar)f(w)n(a)n(y)g(to)i(prop)r(erties;)f(a)g(base)g(class)g(and)g
-(man)n(y)g("deriv)n(ed)f(")h(classes.)41 b(A)30 b(v)-5
-b(alue)29 b(is)0 1082 y(essen)n(tially)d(a)i(abstract)e(handle)i(on)f
-(a)g(single)g(fundamen)n(tal)h(t)n(yp)r(e,)f(a)h(structure)f(or)f(a)h
-(union.)0 1354 y Fd(3.1.4)94 b(P)m(arameters)0 1564 y
-Ff(P)n(arameters)26 b(are)g(represetned)h(in)h(a)f(similar)g(w)n(a)n(y)
-f(to)i(prop)r(erties,)e(except)i(that)g(they)f(con)n(tain)g(only)g(one)
-g(v)-5 b(alue)0 1856 y Fb(3.2)112 b(Other)37 b(elemen)m(ts)g(of)g
-(libical)0 2066 y Ff(In)26 b(addition)f(to)h(the)g(core)e(iCal)h
-(classes,)g(libical)g(has)g(man)n(y)g(other)g(t)n(yp)r(es,)h
-(structures,)g(classes)e(that)i(aid)f(in)h(creating)e(and)0
-2179 y(using)j(iCal)g(comp)r(onen)n(ts.)0 2452 y Fd(3.2.1)94
-b(En)m(umerations)30 b(and)i(t)m(yp)s(es)0 2662 y Ff(Libical)h(is)f
-(strongly)g(t)n(yp)r(ed,)i(so)r(o)e(ev)n(ery)g(comp)r(onen)n(t,)i(prop)
-r(ert)n(y)-7 b(,)33 b(parameter,)g(and)f(v)-5 b(alue)33
-b(t)n(yp)r(e)g(has)g(an)f(en)n(umeration,)0 2776 y(and)27
-b(some)g(ha)n(v)n(e)g(an)g(asso)r(ciated)f(structure)h(or)g(union.)0
-3048 y Fd(3.2.2)94 b(The)32 b(parser)0 3258 y Ff(The)20
-b(libical)f(parser)f(o\033ers)h(a)g(v)-5 b(ariet)n(y)19
-b(of)h(w)n(a)n(ys)e(to)h(con)n(v)n(ert)f(RF)n(C2445)g(text)i(in)n(to)g
-(a)f(libical)g(iinsteral)g(comp)r(onen)n(t)h(structure.)0
-3372 y(the)28 b(parser)e(can)h(parse)f(blo)r(c)n(ks)h(of)h(text)g(as)f
-(a)g(string,)g(or)f(it)i(can)g(parse)e(lin-b)n(y-line.)0
-3645 y Fd(3.2.3)94 b(Error)32 b(ob)5 b(jects)0 3855 y
-Ff(Libical)27 b(has)g(a)g(substan)n(tial)g(error)f(rep)r(orting)g
-(system)i(for)f(b)r(oth)h(programming)d(errors)g(and)j(comp)r(onen)n(t)
-f(usage)f(errors.)0 4127 y Fd(3.2.4)94 b(Memory)30 b(Managemen)m(t)0
-4337 y Ff(Since)38 b(man)n(y)g(of)h(libicals)e(in)n(terfaces)h(return)g
-(strings,)i(the)e(library)f(has)h(its)h(o)n(wn)e(memory)h(managemen)n
-(t)f(system)h(to)0 4451 y(elimiate)28 b(the)g(need)f(to)h(free)f(ev)n
-(ery)f(string)h(returned)g(from)g(the)h(libraru.)0 4724
-y Fd(3.2.5)94 b(Storage)32 b(classes)0 4934 y Ff(The)c(library)e(also)g
-(o\033ers)h(sev)n(eral)f(classes)g(to)h(store)g(comp)r(onen)n(ts)g(to)g
-(\035ies,)h(memory)f(or)f(databases.)p eop
-%%Page: 6 6
-6 5 bop 0 -167 3900 5 v 0 -200 a Fd(4.)73 b(Di\033erences)31
-b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Ff(6)0 162 y Fe(4)131
-b(Di\033erences)44 b(F)-11 b(rom)43 b(RF)l(Cs)0 400 y
-Ff(Libical)c(has)f(b)r(een)h(designed)g(to)f(follo)n(w)h(the)g
-(standards)e(as)i(closely)f(as)g(p)r(ossible,)j(so)e(that)g(the)g(k)n
-(ey)f(ob)5 b(jects)39 b(in)g(the)0 514 y(standards)32
-b(are)g(also)g(k)n(ey)g(ob)5 b(jects)33 b(in)g(the)h(library)-7
-b(.)52 b(Ho)n(w)n(ev)n(er,)32 b(there)h(are)f(a)h(few)g(areas)f(where)g
-(the)i(sp)r(eci\034cations)e(are)0 628 y(\(arguably\))e(irregular,)h
-(and)g(follo)n(wing)g(them)h(exactly)f(w)n(ould)g(result)h(in)g(an)f
-(unfriendly)h(in)n(terface.)49 b(These)31 b(deviations)0
-741 y(mak)n(e)c(libical)g(easier)f(to)i(use)f(b)n(y)h(main)n(taining)e
-(a)h(self-similar)g(in)n(terface.)0 1033 y Fb(4.1)112
-b(Pseudo)38 b(Comp)s(onen)m(ts)0 1243 y Ff(Libical)29
-b(de\034nes)g(comp)r(onen)n(ts)g(for)g(groups)f(of)h(prop)r(erties)f
-(that)i(lo)r(ok)f(and)g(act)g(lik)n(e)g(comp)r(onen)n(ts,)g(but)h(are)e
-(not)i(de\034ned)0 1356 y(as)e(comp)r(onen)n(ts)h(in)g(the)g(sp)r
-(eci\034cation.)41 b(XD)n(A)-7 b(YLIGHT)30 b(and)f(XST)-7
-b(AND)n(ARD)30 b(are)e(notable)h(examples.)40 b(These)29
-b(pseudo)0 1470 y(comp)r(onen)n(ts)d(group)f(prop)r(erties)g(within)i
-(the)g(VTIMEZONE)g(comp)r(onen)n(ts.)36 b(F)-7 b(or)25
-b(instanace,)h(the)h(timezone)f(prop)r(erties)0 1583
-y(asso)r(ciated)f(with)i(da)n(yligh)n(t)e(sa)n(vings)g(time)i(starts)e
-(with)i("BEGIN:D)n(A)-7 b(YLIGHT")27 b(and)f(ends)h(with)f("END:D)n(A)
--7 b(YLIGHT,)0 1697 y(just)32 b(lik)n(e)g(other)f(comp)r(onen)n(ts,)h
-(but)g(is)g(not)g(de\034ned)g(as)f(a)g(comp)r(onen)n(t)g(in)h(RF)n
-(C2445.)48 b(\()32 b(See)f(RF)n(C2445,)g(page)g(61)g(\))h(In)0
-1811 y(Libical,this)d(grouping)e(is)i(represen)n(ted)e(b)n(y)i(the)g
-(XD)n(A)-7 b(YLIGHT)30 b(comp)r(onen)n(t.)41 b(Standard)28
-b(iCAL)h(comp)r(onen)n(ts)f(all)h(start)0 1924 y(with)f(the)g(letter)g
-("V,")f(while)g(pseudo)g(comp)r(onen)n(ts)g(start)g(with"X.")0
-2081 y(There)22 b(are)g(also)g(pseudo)h(comp)r(onen)n(ts)f(that)h(are)f
-(conceptually)g(deriv)n(ed)g(classes)g(of)h(V)-9 b(ALARM.)23
-b(RF)n(C2446)e(de\034nes)i(what)0 2194 y(prop)r(erties)g(ma)n(y)h(b)r
-(e)g(included)h(in)f(eac)n(h)g(comp)r(onen)n(t,)g(and)g(for)g(V)-9
-b(ALARM,)25 b(the)f(set)g(of)h(prop)r(erties)e(it)h(ma)n(y)g(ha)n(v)n
-(e)f(dep)r(ends)0 2308 y(on)k(the)h(v)-5 b(alue)28 b(of)f(the)h(A)n
-(CTION)f(prop)r(ert)n(y)-7 b(.)0 2464 y(F)g(or)19 b(instance,)j(if)e(a)
-g(V)-9 b(ALARM)20 b(comp)r(onen)n(t)g(has)f(an)h(A)n(CTION)g(prop)r
-(ert)n(y)e(with)j(the)f(v)-5 b(alue)20 b(of)g("A)n(UDIO,")f(the)h(comp)
-r(onen)n(t)0 2578 y(m)n(ust)h(also)g(ha)n(v)n(e)f(an)h("A)-7
-b(TT)g(A)n(CH")21 b(prop)r(ert)n(y)-7 b(.)34 b(Ho)n(w)n(ev)n(er,)20
-b(if)i(the)g(A)n(CTION)f(v)-5 b(alue)21 b(is)g("DISPLA)-7
-b(Y,")22 b(the)g(comp)r(onen)n(t)f(m)n(ust)0 2691 y(ha)n(v)n(e)26
-b(a)i(DESCRIPTION)g(prop)r(ert)n(y)-7 b(.)0 2848 y(T)g(o)28
-b(handle)g(these)g(v)-5 b(arious,)27 b(complex)h(restrictions,)f
-(libical)h(has)g(pseudo)g(comp)r(onen)n(ts)f(for)h(eac)n(h)f(t)n(yp)r
-(e)i(of)f(alarm:)37 b(XA)n(U-)0 2961 y(DIO)n(ALARM,)28
-b(XDISPLA)-7 b(Y)g(ALARM,)30 b(XEMAILALARM)f(and)f(XPR)n(OCEDUREALARM.)
-0 3253 y Fb(4.2)112 b(Com)m(bined)37 b(V)-9 b(alues)0
-3463 y Ff(Man)n(y)34 b(v)-5 b(alues)34 b(can)g(tak)n(e)g(more)g(than)g
-(one)h(t)n(yp)r(e.)58 b(TRIGGER,)35 b(for)f(instance,)i(can)e(ha)n(v)n
-(e)g(a)g(v)-5 b(alue)34 b(t)n(yp)r(e)h(of)g(with)g(DU-)0
-3577 y(RA)-7 b(TION)32 b(or)f(of)h(D)n(A)-7 b(TE-TIME.)33
-b(These)f(m)n(ultiple)g(t)n(yp)r(es)g(mak)n(e)f(it)i(di\036cult)g(to)e
-(create)g(routines)h(to)f(return)h(the)g(v)-5 b(alue)0
-3690 y(asso)r(ciated)26 b(with)i(a)f(prop)r(ert)n(y)-7
-b(.)0 3847 y(It)29 b(is)g(natural)f(to)h(ha)n(v)n(e)f(in)n(terfaces)g
-(that)h(w)n(ould)f(return)h(the)g(v)-5 b(alue)29 b(of)f(a)h(prop)r(ert)
-n(y)-7 b(,)28 b(but)i(it)f(is)g(cum)n(b)r(ersome)f(for)g(a)h(single)0
-3960 y(routine)j(to)g(return)g(m)n(ultiple)h(t)n(yp)r(es.)51
-b(So,)33 b(in)g(libical,)g(prop)r(erties)e(that)i(can)f(ha)n(v)n(e)f(m)
-n(ultiple)i(t)n(yp)r(es)f(are)f(giv)n(en)h(a)g(single)0
-4074 y(t)n(yp)r(e)26 b(that)g(is)g(the)g(union)g(of)g(their)g(RF)n
-(C2445)e(t)n(yp)r(es.)36 b(F)-7 b(or)26 b(instance,)g(in)g(libical,)g
-(the)g(v)-5 b(alue)26 b(of)g(the)g(TRIGGER)h(prop)r(ert)n(y)0
-4187 y(resolv)n(es)e(to)j(struct)f(icaltriggert)n(yp)r(e.)35
-b(This)28 b(t)n(yp)r(e)f(is)h(a)f(union)h(of)f(a)g(DURA)-7
-b(TION)29 b(and)e(a)g(D)n(A)-7 b(TE-TIME.)0 4479 y Fb(4.3)112
-b(Multi-V)-9 b(alued)36 b(Prop)s(erties)0 4689 y Ff(Some)31
-b(prop)r(erties,)h(suc)n(h)f(as)g(CA)-7 b(TEGORIES)33
-b(ha)n(v)n(e)d(only)h(one)g(v)-5 b(alue)32 b(t)n(yp)r(e,)h(but)f(eac)n
-(h)e(CA)-7 b(TEGORIES)33 b(prop)r(ert)n(y)d(can)0 4803
-y(ha)n(v)n(e)24 b(m)n(ultiple)h(v)-5 b(alue)25 b(instances.)35
-b(This)25 b(also)f(results)g(in)h(a)g(cum)n(b)r(ersome)f(in)n(terface)g
-(\025)g(CA)-7 b(TEGORIES)26 b(accessors)d(w)n(ould)0
-4916 y(ha)n(v)n(e)k(to)i(return)f(a)g(list)g(while)h(all)f(other)g
-(accessors)e(returned)i(a)g(single)g(v)-5 b(alue.)39
-b(In)29 b(libical,)g(all)f(prop)r(erties)f(ha)n(v)n(e)h(a)g(single)0
-5030 y(v)-5 b(alue,)35 b(and)e(m)n(ulti-v)-5 b(alued)33
-b(prop)r(erties)f(are)h(brok)n(en)f(do)n(wn)g(in)n(to)h(m)n(ultiple)h
-(single)f(v)-5 b(alued)33 b(prop)r(erties)g(during)f(parsing.)0
-5143 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)0 5383
-y Fc(CATEGORIES:)39 b(work,)i(home)p eop
-%%Page: 7 7
-7 6 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3190 b Ff(7)0 162 y(b)r(ecomes)27 b(in)h(libical's)f(in)n
-(ternal)g(represen)n(tation)0 401 y Fc(CATEGORIES:)39
-b(work)0 515 y(CATEGORIES:)g(home)0 754 y Ff(Oddly)-7
-b(,)34 b(RF)n(C2445)d(allo)n(ws)g(some)h(m)n(ulti-v)-5
-b(alued)33 b(prop)r(erties)f(\()h(lik)n(e)g(FREEBUSY)h(\))f(to)g(exist)
-g(as)f(b)r(oth)h(a)f(m)n(ulti-v)-5 b(alues)0 868 y(prop)r(ert)n(y)24
-b(and)h(as)f(m)n(ultiple)h(single)g(v)-5 b(alue)24 b(prop)r(erties,)h
-(while)g(others)f(\()i(lik)n(e)e(CA)-7 b(TEGORIES)26
-b(\))f(can)g(only)g(exist)f(as)h(single)0 981 y(m)n(ulti-v)-5
-b(alued)32 b(prop)r(erties.)48 b(This)31 b(mak)n(es)g(the)h(in)n
-(ternal)f(represen)n(tation)e(for)i(CA)-7 b(TEGORIES)33
-b(illegal.)48 b(Ho)n(w)n(ev)n(er)30 b(when)0 1095 y(y)n(ou)d(con)n(v)n
-(ert)f(a)h(comp)r(onen)n(t)g(to)h(a)f(string,)g(the)h(library)e(will)i
-(collect)f(all)g(of)h(the)g(CA)-7 b(TEGORIES)28 b(prop)r(erties)f(in)n
-(to)g(one.)0 1433 y Fe(5)131 b(Using)44 b(libical)0 1691
-y Fb(5.1)112 b(Creating)37 b(Comp)s(onen)m(ts)0 1901
-y Ff(There)e(are)g(three)h(w)n(a)n(ys)e(to)i(create)e(comp)r(onen)n(ts)
-i(in)g(Libical:)53 b(creating)34 b(individual)i(ob)5
-b(jects)35 b(and)h(assem)n(bling)e(them,)0 2015 y(building)28
-b(en)n(tire)f(ob)5 b(jects)27 b(in)h(massiv)n(e)e(v)-5
-b(aargs)26 b(calls,)h(and)g(parsing)f(a)h(text)h(\034le)g(con)n
-(taining)e(iCalendar)h(data.)0 2287 y Fd(5.1.1)94 b(Constructor)32
-b(In)m(terfaces)0 2497 y Ff(Using)e(constructor)f(in)n(terfaces,)i(y)n
-(ou)f(create)f(eac)n(h)h(of)h(the)g(ob)5 b(jects)30 b(separately)f(and)
-i(then)g(assem)n(ble)e(them)i(in)g(to)g(com-)0 2611 y(p)r(onen)n(ts:)0
-2850 y Fc(icalcomponent)38 b(*event;)0 2964 y(icalproperty)g(*prop;)0
-3077 y(icalparameter)g(*param;)0 3191 y(struct)j(icaltimetype)e(atime;)
-0 3305 y(event)i(=)j(icalcomponent_n)o(ew)o(\(IC)o(AL)o(_V)o(EVE)o(NT)o
-(_C)o(OMP)o(ON)o(EN)o(T\);)0 3418 y(prop)e(=)h(icalproperty_new)o(_d)o
-(tst)o(am)o(p\()o(ati)o(me)o(\))37 b(;)0 3532 y(icalcomponent_ad)o(d_)o
-(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,)h(prop\);)0 3645
-y(prop)k(=)h(icalproperty_new)o(_u)o(id\()o('')o(gu)o(id-)o(1.)o(ho)o
-(st1)o(.c)o(om)o(''\))37 b(\);)0 3759 y(icalcomponent_ad)o(d_)o(pro)o
-(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(\);)0 3872 y(prop=icalpropert)o
-(y_)o(new)o(_o)o(rg)o(ani)o(ze)o(r\()o(''m)o(rb)o(ig)o(@ho)o(st)o(.c)o
-(om')o('\))o(;)0 3986 y(param)k(=)j(icalparameter_n)o(ew)o(_ro)o(le)o
-(\(I)o(CAL)o(_R)o(OL)o(E_C)o(HA)o(IR)o(\))0 4100 y(icalproperty_add)o
-(_p)o(ara)o(me)o(te)o(r\(p)o(ro)o(p,)37 b(param\);)0
-4213 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o
-(op)o(\);)0 4453 y Ff(Notice)e(that)g(libical)g(uses)f(a)h(semi-ob)5
-b(ject-orien)n(ted)32 b(st)n(yle)j(of)g(in)n(terface.)58
-b(Most)34 b(things)h(y)n(ou)f(w)n(ork)f(with)j(are)e(ob)5
-b(jects,)0 4566 y(that)28 b(are)e(instan)n(tiated)h(with)h(a)f
-(constructor)f(that)i(has)f("new")g(in)g(the)h(name.)37
-b(Also)27 b(note)g(that,)h(other)f(than)g(the)h(ob)5
-b(ject)0 4680 y(reference,)30 b(most)g(structure)f(data)h(is)g(passed)f
-(in)h(to)g(libical)g(routines)f(b)n(y)h(v)-5 b(alue.)44
-b(Libical)30 b(has)g(some)f(complex)h(but)g(v)n(ery)0
-4793 y(regular)c(memory)g(handling)i(rules.)36 b(These)27
-b(are)g(detailed)g(in)h(section)f(5.5)g(\(\).)0 4950
-y(If)33 b(an)n(y)e(of)h(the)h(constructors)d(fail,)k(they)f(will)f
-(return)g(0.)50 b(If)33 b(y)n(ou)f(try)g(to)g(insert)g(0)f(in)n(to)h(a)
-g(prop)r(ert)n(y)f(or)h(comp)r(onen)n(t,)h(or)0 5063
-y(use)j(a)g(zero-v)-5 b(alued)34 b(ob)5 b(ject)36 b(reference,)h
-(libical)f(will)h(either)f(silen)n(tly)f(ignore)g(the)i(error)d(or)h
-(will)h(ab)r(ort)g(with)g(an)g(error)0 5177 y(message.)61
-b(This)36 b(b)r(eha)n(vior)e(is)i(con)n(trolled)f(b)n(y)g(a)h(compile)g
-(time)g(\035ag)f(\(ICAL_ERR)n(ORS_ARE_F)-9 b(A)i(T)g(AL\),)37
-b(and)f(will)0 5291 y(ab)r(ort)27 b(b)n(y)g(default.)p
-eop
-%%Page: 8 8
-8 7 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3190 b Ff(8)0 162 y Fd(5.1.2)94 b(v)-5 b(aargs)32
-b(Constructors)0 372 y Ff(There)24 b(is)g(another)g(w)n(a)n(y)f(to)i
-(create)e(complex)h(comp)r(onen)n(ts,)h(whic)n(h)f(is)h(arguably)d
-(more)i(elegan)n(t,)g(if)h(y)n(ou)f(are)g(not)g(horri\034ed)0
-485 y(b)n(y)k(v)-5 b(arargs.)35 b(The)28 b(v)-5 b(arargs)26
-b(constructor)g(in)n(terface)i(allo)n(ws)e(y)n(ou)i(to)f(create)h(in)n
-(tricate)f(comp)r(onen)n(ts)g(in)i(a)e(single)h(blo)r(c)n(k)f(of)0
-599 y(co)r(de.)37 b(Here)27 b(is)g(the)h(previous)f(examples)f(in)i
-(the)g(v)-5 b(aargs)26 b(st)n(yle.)174 830 y Fc(calendar)40
-b(=)349 943 y(icalcomponent_v)o(an)o(ew\()523 1057 y(ICAL_VCALENDAR_C)o
-(OM)o(PO)o(NEN)o(T,)523 1171 y(icalproperty_new)o(_v)o(er)o(sio)o(n\()o
-('')o(2.0)o('')o(\),)523 1284 y(icalproperty_new)o(_p)o(ro)o(did)o(\()
-741 1398 y(''-//RDU)g(Software//NONSGM)o(L)d(HandCal//EN''\),)523
-1511 y(icalcomponent_va)o(ne)o(w\()697 1625 y(ICAL_VEVENT_COMP)o(ONE)o
-(NT)o(,)697 1738 y(icalproperty_new)o(_dt)o(st)o(am)o(p\(a)o(ti)o(me)o
-(\),)697 1852 y(icalproperty_new)o(_ui)o(d\()o('')o(gui)o(d-)o(1.)o
-(hos)o(t1)o(.co)o(m')o('\))o(,)697 1966 y(icalproperty_van)o(ew_)o(or)o
-(ga)o(niz)o(er)o(\()872 2079 y(''mrbig@host.co)o(m')o('\))o(,)872
-2193 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o(OL)o(E_C)o
-(HA)o(IR)o(\),)872 2306 y(0)872 2420 y(\),)697 2533 y(icalproperty_van)
-o(ew_)o(at)o(te)o(nde)o(e\()872 2647 y(''employee-A@ho)o(st)o(.c)o(om')
-o(',)872 2761 y(icalparameter_n)o(ew)o(_r)o(ole)o(\()1046
-2874 y(ICAL_ROLE_REQPA)o(RTI)o(CI)o(PA)o(NT\))o(,)872
-2988 y(icalparameter_n)o(ew)o(_r)o(svp)o(\(1)o(\),)872
-3101 y(icalparameter_n)o(ew)o(_c)o(uty)o(pe)o(\(I)o(CAL)o(_C)o(UTY)o
-(PE)o(_G)o(ROU)o(P\))o(,)872 3215 y(0)872 3328 y(\),)697
-3442 y(icalproperty_new)o(_lo)o(ca)o(ti)o(on\()828 3556
-y(1CP)42 b(Conference)e(Room)h(4350\),)697 3669 y(0)697
-3783 y(\),)523 3896 y(0)523 4010 y(\);)0 4241 y Ff(This)30
-b(form)f(is)h(similar)f(to)h(the)g(constructor)f(form)g(,)i(except)f
-(that)g(the)g(constructors)e(ha)n(v)n(e)h("v)-5 b(anew")29
-b(instead)g(of)h("new")0 4354 y(in)38 b(the)f(name.)66
-b(The)37 b(argumen)n(ts)f(are)h(similar)f(to)r(o,)k(except)d(that)g
-(the)h(comp)r(onen)n(t)f(constructor)f(can)h(ha)n(v)n(e)f(a)h(list)g
-(of)0 4468 y(prop)r(erties,)26 b(and)i(the)f(prop)r(ert)n(y)g
-(constructor)e(can)i(ha)n(v)n(e)g(a)g(list)g(of)h(parameters.)35
-b(Be)27 b(sure)f(to)i(terminate)f(ev)n(ery)f(list)i(with)0
-4582 y(a)f('0',)h(or)e(y)n(our)g(co)r(de)i(will)g(crash,)e(if)i(y)n(ou)
-f(are)g(luc)n(ky)-7 b(.)0 4853 y Fd(5.1.3)94 b(P)m(arsing)32
-b(T)-8 b(ext)32 b(Files)0 5063 y Ff(The)g(\034nal)g(w)n(a)n(y)f(to)h
-(create)f(comp)r(onen)n(ts)h(will)g(probably)f(b)r(e)h(the)h(most)f
-(common;)i(y)n(ou)d(can)h(create)f(comp)r(onen)n(ts)g(from)0
-5176 y(RF)n(C2445)26 b(complian)n(t)h(text.)37 b(If)28
-b(y)n(ou)f(ha)n(v)n(e)f(the)i(string)f(in)h(memory)-7
-b(,)26 b(use)0 5407 y Fc(icalcomponent*)38 b(icalparser_pars)o(e_)o
-(str)o(in)o(g\()o(cha)o(r*)f(str\);)p eop
-%%Page: 9 9
-9 8 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3190 b Ff(9)0 162 y(If)38 b(the)g(string)f(con)n(tains)f
-(only)h(one)h(comp)r(onen)n(t,)h(the)f(parser)e(will)i(return)f(the)h
-(comp)r(onen)n(t)f(in)h(libical)f(form.)67 b(If)38 b(the)0
-275 y(string)45 b(con)n(tains)g(m)n(ultiple)h(comp)r(onen)n(ts,)k(the)c
-(m)n(ultiple)g(comp)r(onen)n(ts)f(will)h(b)r(e)g(returned)f(as)g(the)h
-(c)n(hildren)g(of)f(an)0 389 y(ICAL_XR)n(OOT_COMPONENT)26
-b(comp)r(onen)n(t.)0 545 y(P)n(arsing)h(a)h(whole)g(string)f(ma)n(y)h
-(seem)g(w)n(asteful)f(if)i(y)n(ou)f(w)n(an)n(t)f(to)h(pull)h(a)f(large)
-e(comp)r(onen)n(t)i(o\033)h(of)f(the)g(net)n(w)n(ork)f(or)g(from)0
-659 y(a)g(\034le;)h(y)n(ou)f(ma)n(y)g(prefer)g(to)g(parse)f(the)i(comp)
-r(onen)n(t)g(line)f(b)n(y)h(line.)37 b(This)27 b(is)h(p)r(ossible)f(to)
-r(o)g(b)n(y)g(using:)0 898 y Fc(icalparser*)39 b(icalparser_new\(\))o
-(;)0 1012 y(void)j(icalparser_free\()o(ic)o(al)o(par)o(se)o(r*)37
-b(parser\);)0 1125 y(icalparser_get_l)o(in)o(e\(p)o(ar)o(se)o(r,r)o(ea)
-o(d_)o(str)o(ea)o(m\))o(;)0 1239 y(icalparser_add_l)o(in)o(e\(p)o(ar)o
-(se)o(r,l)o(in)o(e\))o(;)0 1353 y(icalparser_set_g)o(en)o(_da)o(ta)o
-(\(p)o(ars)o(er)o(,s)o(tre)o(am)o(\))0 1592 y Ff(These)21
-b(routines)f(will)i(construct)f(a)f(parser)g(ob)5 b(ject)21
-b(to)g(whic)n(h)g(y)n(ou)g(can)g(add)g(lines)g(of)g(input)h(and)f
-(retriev)n(e)f(an)n(y)h(comp)r(onen)n(ts)0 1705 y(that)32
-b(the)g(parser)f(creates)f(from)i(the)g(input.)51 b(These)31
-b(routines)g(w)n(ork)g(b)n(y)g(sp)r(eci\034ng)h(an)g(adaptor)e(routine)
-h(to)h(get)g(string)0 1819 y(data)27 b(from)g(a)g(source.)36
-b(F)-7 b(or)27 b(an)g(example:)0 2058 y Fc(char*)41 b
-(read_stream\(char)c(*s,)43 b(size_t)e(size,)g(void)h(*d\))87
-2286 y(char)g(*c)h(=)g(fgets\(s,size,)38 b(\(FILE*\)d\);)87
-2399 y(return)j(c;)0 2626 y(main\(\))87 2740 y(char*)h(line;)87
-2853 y(icalcomponent)c(*c;)87 2967 y(icalparser)h(*parser)i(=)i
-(icalparser_new\(\))o(;)87 3081 y(FILE*)f(stream)f(=)i
-(fopen\(argv1,r\);)87 3194 y(icalparser_set_g)o(en_)o(da)o(ta)o(\(pa)o
-(rs)o(er)o(,st)o(re)o(am)o(\);)87 3308 y(do)174 3421
-y(line)f(=)h(icalparser_get_li)o(ne)o(\(p)o(ars)o(er)o(,r)o(ead)o(_s)o
-(tr)o(eam)o(\);)174 3535 y(c)g(=)h(icalparser_add_)o(li)o(ne\()o(pa)o
-(rs)o(er,)o(li)o(ne)o(\);)174 3648 y(if)f(\(c)g(!=)f(0\))218
-3762 y(printf\(s,icalcom)o(po)o(ne)o(nt_)o(as)o(_i)o(cal)o(_s)o(tr)o
-(ing)o(\(c)o(\)\))o(;)218 3876 y(icalparser_claim)o(\(p)o(ar)o(ser)o
-(\);)218 3989 y(printf\(n--------)o(--)o(--)o(---)o(n\))o(;)218
-4103 y(icalcomponent_fr)o(ee)o(\(c)o(\);)131 4330 y(while)f(\()i(line)f
-(!=)h(0\);)0 4569 y Ff(The)48 b(parser)f(ob)5 b(ject)48
-b(parameterizes)f(the)i(routine)f(used)g(to)g(get)h(input)g(lines)f
-(with)h(icalparser_set_gen_data\(\))0 4683 y
-(andicalparser_get_line\(\).)81 b(In)44 b(this)f(example,)k(the)d
-(routine)f(read_stream\(\))e(will)j(fetc)n(h)g(the)f(next)h(line)g
-(from)e(a)0 4796 y(stream,)51 b(with)d(the)f(stream)g(passed)f(in)h(as)
-g(the)g(v)n(oid*)f(parameter)f(d.)96 b(The)47 b(parser)f(calls)g
-(read_stream\(\))f(from)0 4910 y(icalparser_get_line\(\),)e(but)g(it)g
-(also)e(needs)h(to)h(kno)n(w)e(what)h(stream)g(to)g(use.)81
-b(This)42 b(is)h(set)f(b)n(y)g(the)h(call)f(to)g(ical-)0
-5024 y(parser_set_gen_data\(\).)64 b(By)37 b(using)g(a)h(di\033eren)n
-(t)f(routine)h(for)f(read_stream)e(or)i(passing)g(in)h(di\033eren)n(t)f
-(data)h(with)0 5137 y(icalparser_set_gen_data,)23 b(y)n(ou)k(can)g
-(connect)g(to)h(an)n(y)e(data)i(source.)0 5294 y(Using)g(the)h(same)e
-(mec)n(hanism,)h(other)g(implemen)n(tations)g(could)g(read)f(from)h
-(memory)g(bu\033ers,)g(so)r(c)n(k)n(ets)f(or)g(other)h(in)n(ter-)0
-5407 y(faces.)p eop
-%%Page: 10 10
-10 9 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(10)0 162 y(Since)28 b(the)g(example)f(co)r(de)g(is)
-h(a)f(v)n(ery)f(common)h(w)n(a)n(y)f(to)i(use)f(the)h(parser,)e(there)i
-(is)f(a)g(con)n(v)n(enience)f(routine;)0 401 y Fc(icalcomponent*)38
-b(icalparser_pars)o(e\()o(ica)o(lp)o(ar)o(ser)f(*parser,)654
-515 y(char*)k(\(*line_gen_func\))o(\(c)o(har)c(*s,)42
-b(size_t)f(size,)85 b(void*)42 b(d\)\))0 754 y Ff(T)-7
-b(o)36 b(use)h(this)g(routine,)i(y)n(ou)d(still)h(m)n(ust)g(construct)f
-(the)h(parser)f(ob)5 b(ject)36 b(and)h(pass)f(in)h(a)f(reference)g(to)h
-(a)f(line)h(reading)0 868 y(routine.)50 b(If)33 b(the)f(parser)f(can)h
-(create)f(a)h(single)f(comp)r(onen)n(t)h(from)g(the)g(input,)i(it)f
-(will)f(return)g(a)g(p)r(oin)n(ter)g(to)g(the)g(newly)0
-981 y(constructed)h(comp)r(onen)n(t.)54 b(If)34 b(the)g(parser)e(can)h
-(construct)f(m)n(ultiple)i(comp)r(onen)n(ts)f(from)g(the)h(input,)i(it)
-e(will)g(return)e(a)0 1095 y(reference)c(to)h(an)g(XR)n(OOT)g(comp)r
-(onen)n(t)g(\()h(of)f(t)n(yp)r(e)g(ICAL_XR)n(OOT_COMPONENT.\))g(This)g
-(XR)n(OOT)f(comp)r(onen)n(t)0 1209 y(will)g(hold)f(all)h(of)f(the)h
-(comp)r(onen)n(ts)f(constructed)g(from)g(the)h(input)g(as)f(c)n
-(hildren.)0 1500 y Fb(5.2)112 b(A)m(ccessing)37 b(Comp)s(onen)m(ts)0
-1710 y Ff(Giv)n(en)30 b(a)g(reference)f(to)i(a)e(comp)r(onen)n(t,)i(y)n
-(ou)f(probably)f(will)h(w)n(an)n(t)g(to)g(access)f(the)i(prop)r
-(erties,)f(parameters)e(and)j(v)-5 b(alues)0 1824 y(inside.)56
-b(Libical)34 b(in)n(terfaces)f(let)i(y)n(ou)e(\034nd)i(sub-comp)r(onen)
-n(t,)g(add)e(and)h(remo)n(v)n(e)f(sub-comp)r(onen)n(ts,)i(and)e(do)h
-(the)h(same)0 1937 y(three)27 b(op)r(erations)g(on)g(prop)r(erties.)0
-2210 y Fd(5.2.1)94 b(Finding)30 b(Comp)s(onen)m(ts)0
-2420 y Ff(T)-7 b(o)27 b(\034nd)h(a)f(sub-comp)r(onen)n(t)g(of)h(a)f
-(comp)r(onen)n(t,)g(use:)0 2659 y Fc(icalcomponent*)38
-b(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()1525
-2773 y(icalcomponent*)g(component,)1525 2887 y(icalcomponent_ki)o(nd)f
-(kind\);)0 3126 y Ff(This)27 b(routine)g(will)h(return)f(a)g(reference)
-g(to)g(the)h(\034rst)f(comp)r(onen)n(t)g(of)h(the)f(t)n(yp)r(e)h
-('kind.')37 b(The)28 b(k)n(ey)e(kind)i(v)-5 b(alues,)27
-b(listed)h(in)0 3240 y(icalen)n(ums.h)f(are:)0 3479 y
-Fc(ICAL_ANY_COMPONE)o(NT)0 3593 y(ICAL_VEVENT_COMP)o(ON)o(ENT)0
-3706 y(ICAL_VTODO_COMPO)o(NE)o(NT)0 3820 y(ICAL_VJOURNAL_CO)o(MP)o(ONE)
-o(NT)0 3933 y(ICAL_VCALENDAR_C)o(OM)o(PON)o(EN)o(T)0
-4047 y(ICAL_VFREEBUSY_C)o(OM)o(PON)o(EN)o(T)0 4161 y(ICAL_VALARM_COMP)o
-(ON)o(ENT)0 4400 y Ff(These)g(are)g(only)g(the)h(most)f(common)g(comp)r
-(onen)n(ts;)g(there)h(are)e(man)n(y)h(more)g(listed)h(in)g(icalen)n
-(ums.h.)0 4557 y(As)h(y)n(ou)f(migh)n(t)h(guess,)g(if)g(there)g(is)g
-(more)f(than)h(one)f(sub)r(comp)r(onen)n(t)h(of)g(the)h(t)n(yp)r(e)f(y)
-n(ou)f(ha)n(v)n(e)g(c)n(hosen,)g(this)h(routine)g(will)0
-4670 y(return)e(only)g(the)h(\034rst.)37 b(to)27 b(get)h(at)f(the)h
-(others,)f(y)n(ou)f(need)i(to)g(iterate)f(through)f(the)i(comp)r(onen)n
-(t.)0 4943 y Fd(5.2.2)94 b(Iterating)32 b(Through)g(Comp)s(onen)m(ts)0
-5153 y Ff(Iteration)27 b(requires)f(a)h(second)g(routine)g(to)h(get)f
-(the)h(next)g(sub)r(comp)r(onen)n(t)f(after)g(the)h(\034rst:)p
-eop
-%%Page: 11 11
-11 10 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(11)0 162 y Fc(icalcomponent*)38 b(icalcomponent_g)o
-(et)o(_ne)o(xt)o(_c)o(omp)o(on)o(en)o(t\()654 275 y(icalcomponent*)f
-(component,)654 389 y(icalcomponent_k)o(in)o(d)h(kind\);)0
-610 y Ff(With)25 b(the)g('\034rst')f(and)g('next')h(routines,)g(y)n(ou)
-e(can)h(create)g(a)g(for)f(lo)r(op)h(to)h(iterate)f(through)f(all)h(of)
-h(a)f(comp)r(onen)n(ts)g(sub)r(com-)0 723 y(p)r(onen)n(ts)87
-944 y Fc(for\(c)42 b(=)h(icalcomponent_g)o(et_)o(fi)o(rs)o(t_c)o(om)o
-(po)o(nen)o(t\()o(co)o(mp,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))
-o(;)392 1058 y(c)g(!=)g(0;)44 1171 y(c)g(=)g(icalcomponent_ge)o(t_)o
-(ne)o(xt_)o(co)o(mp)o(one)o(nt)o(\(c)o(omp)o(,I)o(CA)o(L_A)o(NY)o(_CO)o
-(MP)o(ON)o(ENT)o(\)\))261 1398 y(do_something\(c\);)0
-1619 y Ff(This)32 b(co)r(de)f(bit)h(wil)g(iterate)g(through)f(all)g(of)
-h(the)g(sub)r(comp)r(onen)n(ts)f(in)h('comp')g(but)g(y)n(ou)f(can)g
-(select)h(a)f(sp)r(eci\034c)h(t)n(yp)r(e)g(of)0 1733
-y(comp)r(onen)n(t)27 b(b)n(y)h(c)n(hanging)e(ICAL_ANY_COMPONENT)i(to)f
-(another)g(comp)r(onen)n(t)g(t)n(yp)r(e.)0 2002 y Fd(5.2.3)94
-b(Using)31 b(Comp)s(onen)m(t)f(Iterators)0 2212 y Ff(The)h(iteration)f
-(mo)r(del)h(in)h(the)f(previous)f(section)g(requires)g(the)h(comp)r
-(onen)n(t)g(to)g(k)n(eep)f(the)i(state)f(of)g(the)g(iteration.)46
-b(So,)0 2326 y(y)n(ou)32 b(could)g(not)h(use)f(this)h(mo)r(del)g(to)f
-(p)r(erform)g(a)g(sorting)f(op)r(erations,)i(since)f(y)n(ou'd)g(need)h
-(t)n(w)n(o)f(iterators)f(and)h(there)g(is)0 2440 y(only)26
-b(space)h(for)f(one.)36 b(If)27 b(y)n(ou)f(ev)n(er)g(call)h(icalcomp)r
-(onen)n(t_get_\034rst_comp)r(onen)n(t\(\))d(when)j(an)f(iteration)h(is)
-f(in)h(progress,)0 2553 y(the)h(p)r(oin)n(ter)f(will)h(b)r(e)g(reset)f
-(to)g(the)h(b)r(eginning.)0 2710 y(T)-7 b(o)28 b(solv)n(e)g(this)h
-(problem,)g(there)f(are)g(also)g(external)f(iterators)h(for)g(comp)r
-(onen)n(ts.)40 b(The)28 b(routines)g(asso)r(ciated)g(with)h(these)0
-2823 y(external)e(iterators)f(are:)0 3044 y Fc(icalcompiter)38
-b(icalcomponent_beg)o(in)o(_co)o(mp)o(on)o(ent)o(\(i)o(ca)o(lco)o(mp)o
-(one)o(nt)o(*)f(component,)j(icalcomponent_k)o(ind)d(kind\);)0
-3158 y(icalcompiter)h(icalcomponent_end)o(_c)o(omp)o(on)o(en)o(t\(i)o
-(ca)o(lc)o(omp)o(on)o(ent)o(*)f(component,)j(icalcomponent_k)o(in)o(d)e
-(kind\);)0 3271 y(icalcomponent*)g(icalcompiter_ne)o(xt)o(\(ic)o(al)o
-(co)o(mpi)o(te)o(r*)f(i\);)0 3385 y(icalcomponent*)h(icalcompiter_pr)o
-(io)o(r\(i)o(ca)o(lc)o(omp)o(it)o(er)o(*)g(i\);)0 3498
-y(icalcomponent*)g(icalcompiter_de)o(re)o(f\(i)o(ca)o(lc)o(omp)o(it)o
-(er)o(*)g(i\);)0 3719 y Ff(The)27 b(_b)r(egin_\(\))g(and)g(_end_\(\))g
-(routines)g(return)g(a)g(new)g(iterator)f(that)h(p)r(oin)n(ts)g(to)h
-(the)f(b)r(eginning)g(and)g(ending)h(of)f(the)0 3833
-y(list)36 b(of)f(sub)r(comp)r(onen)n(t)h(for)f(the)h(giv)n(en)f(comp)r
-(onen)n(t,)i(and)e(the)h(kind)g(argumen)n(t)e(w)n(orks)g(lik)n(e)h(the)
-h(kind)g(argumen)n(t)f(for)0 3946 y(in)n(ternal)27 b(iterators.)0
-4103 y(After)f(creating)e(an)h(iterators,)g(use)g(_next_\(\))g(and)h
-(_prior_\(\))e(to)h(step)h(forw)n(ard)d(and)j(bac)n(kw)n(ard)d(through)
-i(the)h(list)f(and)0 4216 y(get)30 b(the)g(comp)r(onen)n(t)g(that)g
-(the)g(iterator)e(p)r(oin)n(ts)i(to,)h(and)e(use)h(_deref\(\))g(to)g
-(return)f(the)h(comp)r(onen)n(t)g(that)g(the)g(iterator)0
-4330 y(p)r(oin)n(ts)c(to)g(without)h(mo)n(ving)e(the)i(iterator.)35
-b(All)27 b(routines)f(will)g(return)g(0)g(when)g(they)h(mo)n(v)n(e)e
-(to)h(p)r(oin)n(t)h(o\033)f(the)h(end)f(of)h(the)0 4444
-y(list.)0 4600 y(Here)g(is)h(an)f(example)g(of)h(a)f(lo)r(op)g(using)g
-(these)h(routines:)0 4821 y Fc(for\()131 4934 y(i)43
-b(=)g(icalcomponent_be)o(gi)o(n_c)o(om)o(po)o(nen)o(t\()o(im)o(pl-)o
-(cl)o(us)o(ter)o(,I)o(CAL)o(_A)o(NY)o(_CO)o(MP)o(ON)o(ENT)o(\);)131
-5048 y(icalcompiter_de)o(ref)o(\(i)o(\)!)o(=)38 b(0;)131
-5162 y(icalcompiter_ne)o(xt\()o(i\))0 5275 y(\))261 5389
-y(icalcomponent)h(*this)i(=)i(icalcompiter_der)o(ef)o(\(i\))o(;)p
-eop
-%%Page: 12 12
-12 11 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(12)0 162 y Fd(5.2.4)94 b(Remo)m(ving)29
-b(Comp)s(onen)m(ts)0 372 y Ff(Remo)n(ving)40 b(an)h(elemen)n(t)g(from)g
-(a)g(list)g(while)h(iterating)e(through)h(the)g(list)h(with)f(the)h(in)
-n(ternal)e(iterators)g(can)h(cause)0 485 y(problems,)20
-b(since)e(y)n(ou)g(will)h(probably)e(b)r(e)i(remo)n(ving)e(the)i
-(elemen)n(t)g(that)g(the)g(in)n(ternal)f(iterator)f(p)r(oin)n(ts)h(to.)
-34 b(The)19 b(_remo)n(v)n(e\(\))0 599 y(routine)24 b(will)g(k)n(eep)f
-(the)i(iterator)d(v)-5 b(alid)24 b(b)n(y)g(mo)n(ving)f(it)h(to)g(the)h
-(next)f(comp)r(onen)n(t,)g(but)h(in)f(a)g(normal)f(lo)r(op,)h(this)g
-(will)g(result)0 712 y(in)k(t)n(w)n(o)f(adv)-5 b(ances)26
-b(p)r(er)i(iteration,)e(and)i(y)n(ou)f(will)g(remo)n(v)n(e)f(only)h(ev)
-n(ery)f(other)h(comp)r(onen)n(t.)37 b(T)-7 b(o)27 b(a)n(v)n(oid)f(the)i
-(problem,)f(y)n(ou)0 826 y(will)h(need)f(to)h(step)g(the)g(iterator)e
-(ahead)h(of)g(the)h(elemen)n(t)g(y)n(ou)e(are)h(going)f(to)i(remo)n(v)n
-(e,)e(lik)n(e)h(this:)0 1066 y Fc(for\(c)41 b(=)j(icalcomponent_g)o(et)
-o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()o(pa)o(re)o(nt_)o(co)o(mp,)o(IC)
-o(AL)o(_AN)o(Y_)o(CO)o(MPO)o(NE)o(NT)o(\);)305 1179 y(c)f(!=)g(0;)305
-1293 y(c)g(=)g(next)174 1520 y(next)f(=)h(icalcomponent_get)o(_n)o(ex)o
-(t_c)o(om)o(po)o(nen)o(t\()o(pa)o(ren)o(t_)o(com)o(p,)o(IC)o(AL_)o(AN)o
-(Y_)o(COM)o(PO)o(NE)o(NT\))o(;)174 1633 y(icalcomponent_rem)o(ov)o(e_)o
-(com)o(po)o(ne)o(nt\()o(pa)o(re)o(nt_)o(co)o(mp)o(,c\))o(;)0
-1873 y Ff(Another)32 b(w)n(a)n(y)e(to)i(remo)n(v)n(e)e(comp)r(onen)n
-(ts)i(is)g(to)f(rely)h(on)f(the)i(side)f(e\033ect)g(of)g(icalcomp)r
-(onen)n(t_remo)n(v)n(e_comp)r(onen)n(t:)42 b(if)0 1986
-y(comp)r(onen)n(t)28 b(iterator)g(in)h(the)g(paren)n(t)f(comp)r(onen)n
-(t)h(is)f(p)r(oin)n(ting)h(to)g(the)g(c)n(hild)g(that)g(will)g(b)r(e)g
-(remo)n(v)n(ed,)f(it)h(will)g(mo)n(v)n(e)f(the)0 2100
-y(iterator)e(to)i(the)g(comp)r(onen)n(t)f(after)g(the)h(c)n(hild.)37
-b(The)27 b(follo)n(wing)g(co)r(de)g(will)h(exploit)f(this)h(b)r(eha)n
-(vior:)0 2340 y Fc(icalcomponent_ge)o(t_)o(fir)o(st)o(_c)o(omp)o(on)o
-(en)o(t\(p)o(ar)o(en)o(t_c)o(om)o(p,)o(ICA)o(L_)o(VEV)o(EN)o(T_)o(COM)o
-(PO)o(NE)o(NT\))o(;)0 2453 y(while\(\(c=icalcom)o(po)o(nen)o(t_)o(ge)o
-(t_c)o(ur)o(re)o(nt_)o(co)o(mp)o(one)o(nt)o(\(c)o(\)\))37
-b(!=)43 b(0)g(\))131 2567 y(if\(icalcomponen)o(t_i)o(sa)o(\(c)o(\))38
-b(==)k(ICAL_VEVENT_COMP)o(ONE)o(NT)o(\))261 2680 y(icalcomponent_rem)o
-(ov)o(e_c)o(om)o(po)o(nen)o(t\()o(pa)o(ren)o(t_)o(co)o(mp,)o(in)o(ner)o
-(\);)174 2794 y(else)261 2907 y(icalcomponent_get)o(_n)o(ext)o(_c)o(om)
-o(pon)o(en)o(t\()o(par)o(en)o(t_)o(com)o(p,)o(ICA)o(L_)o(VE)o(VEN)o(T_)
-o(CO)o(MPO)o(NE)o(NT)o(\);)0 3294 y Fd(5.2.5)94 b(W)-8
-b(orking)31 b(with)g(prop)s(erties)g(and)h(parameters)0
-3504 y Ff(Finding,)g(iterating)f(and)g(remo)n(ving)e(prop)r(erties)h(w)
-n(orks)g(the)h(same)g(as)f(it)i(do)r(es)e(for)h(comp)r(onen)n(ts,)g
-(using)g(the)h(prop)r(ert)n(y-)0 3617 y(sp)r(eci\034c)c(or)e
-(parameter-sp)r(eci\034c)g(in)n(terfaces:)0 3857 y Fc(icalproperty*)38
-b(icalcomponent_ge)o(t_)o(fir)o(st)o(_p)o(rop)o(er)o(ty)o(\()218
-3970 y(icalcomponent*)g(component,)218 4084 y(icalproperty_kin)o(d)f
-(kind\);)0 4197 y(icalproperty*)h(icalcomponent_ge)o(t_)o(nex)o(t_)o
-(pr)o(ope)o(rt)o(y\()218 4311 y(icalcomponent*)g(component,)218
-4425 y(icalproperty_kin)o(d)f(kind\);)0 4538 y(void)42
-b(icalcomponent_ad)o(d_)o(pr)o(ope)o(rt)o(y\()218 4652
-y(icalcomponent*)c(component,)218 4765 y(icalproperty*)g(property\);)0
-4879 y(void)k(icalcomponent_re)o(mo)o(ve)o(_pr)o(op)o(er)o(ty\()218
-4992 y(icalcomponent*)c(component,)218 5106 y(icalproperty*)g
-(property\);)0 5346 y Ff(F)-7 b(or)27 b(parameters:)p
-eop
-%%Page: 13 13
-13 12 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(13)0 162 y Fc(icalparameter*)38 b(icalproperty_ge)o
-(t_)o(fir)o(st)o(_p)o(ara)o(me)o(te)o(r\()218 275 y(icalproperty*)g
-(prop,)218 389 y(icalparameter_ki)o(nd)f(kind\);)0 502
-y(icalparameter*)h(icalproperty_ge)o(t_)o(nex)o(t_)o(pa)o(ram)o(et)o
-(er)o(\()218 616 y(icalproperty*)g(prop,)218 730 y(icalparameter_ki)o
-(nd)f(kind\);)0 843 y(void)42 b(icalproperty_add)o(_p)o(ar)o(ame)o(te)o
-(r\()218 957 y(icalproperty*)c(prop,)218 1070 y(icalparameter*)g
-(parameter\);)0 1184 y(void)k(icalproperty_rem)o(ov)o(e_)o(par)o(am)o
-(et)o(er\()218 1297 y(icalproperty*)c(prop,)218 1411
-y(icalparameter_ki)o(nd)f(kind\);)0 1650 y Ff(Note)30
-b(that)g(since)f(there)h(should)f(b)r(e)i(only)e(one)g(parameter)f(of)i
-(eac)n(h)f(t)n(yp)r(e)h(in)g(a)f(prop)r(ert)n(y)-7 b(,)30
-b(y)n(ou)f(will)h(rarely)e(need)i(to)f(use)0 1764 y
-(icalparameter_get_nect_paameter.)0 2037 y Fd(5.2.6)94
-b(W)-8 b(orking)31 b(with)g(v)-5 b(alues)0 2247 y Ff(V)e(alues)33
-b(are)g(t)n(ypically)g(part)h(of)f(a)h(prop)r(ert)n(y)-7
-b(,)34 b(although)f(they)h(can)f(exist)h(on)f(their)h(o)n(wn.)55
-b(Y)-7 b(ou)34 b(can)f(manipulate)h(them)0 2360 y(either)27
-b(as)g(part)g(of)h(the)g(prop)r(ert)n(y)e(or)h(indep)r(enden)n(tly)-7
-b(.)0 2517 y(The)36 b(most)f(common)g(w)n(a)n(y)f(to)h(w)n(ork)f(with)i
-(v)-5 b(alues)35 b(to)h(is)f(to)g(manipulate)h(them)g(from)f(they)h
-(prop)r(erties)e(that)i(con)n(tain)0 2630 y(them.)46
-b(This)31 b(in)n(v)n(olv)n(es)d(few)n(er)i(routine)g(calls)g(and)h(in)n
-(termediate)f(v)-5 b(ariables)29 b(than)h(w)n(orking)f(with)i(them)g
-(indep)r(enden)n(tly)-7 b(,)0 2744 y(and)27 b(it)h(is)g(t)n(yp)r
-(e-safe.)0 2900 y(F)-7 b(or)26 b(eac)n(h)g(prop)r(ert)n(y)-7
-b(,)26 b(there)h(are)f(a)g(_get_)g(and)h(a)f(_set_)g(routine)h(that)g
-(access)e(the)j(in)n(ternal)e(v)-5 b(alue.)36 b(F)-7
-b(or)26 b(instanace,)h(for)0 3014 y(the)h(UID)g(prop)r(ert)n(y)-7
-b(,)27 b(the)h(routines)f(are:)0 3253 y Fc(void)42 b(icalproperty_set)o
-(_u)o(id)o(\(ic)o(al)o(pr)o(ope)o(rt)o(y*)37 b(prop,)k(const)h(char*)f
-(v\))0 3367 y(const)g(char*)h(icalproperty_get)o(_u)o(id)o(\(ic)o(al)o
-(pr)o(ope)o(rt)o(y*)37 b(prop\))0 3607 y Ff(F)-7 b(or)19
-b(m)n(ulti-v)-5 b(alued)20 b(prop)r(erties,)h(lik)n(e)f(A)-7
-b(TT)g(A)n(CH,)20 b(the)h(v)-5 b(alue)20 b(t)n(yp)r(e)g(is)g(usually)f
-(a)h(struct)g(or)f(union)h(that)g(holds)g(b)r(oth)g(p)r(ossible)0
-3720 y(t)n(yp)r(es.)0 3877 y(If)28 b(y)n(ou)f(w)n(an)n(t)g(to)g(w)n
-(ork)f(with)i(the)g(underlying)f(v)-5 b(alue)28 b(ob)5
-b(ject,)27 b(y)n(ou)g(can)g(get)g(and)h(set)f(it)h(with:)0
-4116 y Fc(icalvalue*)39 b(icalproperty_get_)o(va)o(lu)o(e)f
-(\(icalproperty*)f(prop\))0 4230 y(void)42 b(icalproperty_set)o(_v)o
-(al)o(ue\()o(ic)o(al)o(pro)o(pe)o(rt)o(y*)37 b(prop,)42
-b(icalvalue*)d(value\);)0 4469 y Ff(Icalprop)r(ert)n(y_get_v)-5
-b(alue\(\))36 b(will)i(return)g(a)g(reference)f(that)h(y)n(ou)g(can)g
-(manipulate)g(with)h(other)e(icalv)-5 b(alue)38 b(routines.)0
-4583 y(Most)30 b(of)h(the)g(time,)g(y)n(ou)f(will)h(ha)n(v)n(e)e(to)i
-(kno)n(w)e(what)i(the)g(t)n(yp)r(e)f(of)h(the)g(v)-5
-b(alue)30 b(is.)46 b(F)-7 b(or)30 b(instance,)g(if)i(y)n(ou)d(kno)n(w)h
-(that)h(the)0 4696 y(v)-5 b(alue)27 b(is)h(a)f(D)n(A)-7
-b(TETIME)29 b(t)n(yp)r(e,)f(y)n(ou)f(can)g(manipulate)g(it)h(with:)0
-4936 y Fc(struct)41 b(icaltimetype)e(icalvalue_get_d)o(at)o(et)o(ime)o
-(\(i)o(ca)o(lva)o(lu)o(e*)e(value\);)0 5049 y(void)42
-b(icalvalue_set_da)o(te)o(ti)o(me\()o(ic)o(al)o(val)o(ue)o(*)37
-b(value,)k(struct)h(icaltimetype)c(v\);)0 5289 y Ff(When)21
-b(w)n(orking)e(with)i(an)f(extension)g(prop)r(ert)n(y)f(or)h(v)-5
-b(alue)20 b(\(and)h(X-PR)n(OPER)-7 b(TY)21 b(or)f(a)g(prop)r(ert)n(y)f
-(that)i(has)f(the)h(parameter)0 5402 y(V)-9 b(ALUE=x-name)27
-b(\))h(the)g(v)-5 b(alue)28 b(t)n(yp)r(e)f(is)h(alw)n(a)n(ys)d(a)j
-(string.)36 b(T)-7 b(o)27 b(get)g(and)h(set)f(the)h(v)-5
-b(alue,)28 b(use:)p eop
-%%Page: 14 14
-14 13 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(14)0 162 y Fc(void)42 b(icalproperty_set)o(_x)o
-(\(i)o(cal)o(pr)o(op)o(ert)o(y*)37 b(prop,)k(char*)h(v\);)0
-275 y(char*)f(icalproperty_get_)o(x\()o(ica)o(lp)o(ro)o(per)o(ty)o(*)c
-(prop\);)0 515 y Ff(All)26 b(X)g(prop)r(erties)f(ha)n(v)n(e)f(the)i(t)n
-(yp)r(e)g(of)g(ICAL_X_PR)n(OPER)-7 b(TY,)26 b(so)f(y)n(ou)g(will)h
-(need)g(these)g(routines)f(to)g(get)h(and)f(set)h(the)0
-628 y(name)h(of)h(the)g(prop)r(ert)n(y:)0 868 y Fc(char*)41
-b(icalproperty_get_)o(x_)o(nam)o(e\()o(ic)o(alp)o(ro)o(pe)o(rty)o(*)c
-(prop\))0 981 y(void)42 b(icalproperty_set)o(_x)o(_n)o(ame)o(\(i)o(ca)o
-(lpr)o(op)o(er)o(ty*)37 b(prop,)k(char*)h(name\);)0 1254
-y Fd(5.2.7)94 b(Chec)m(king)32 b(Comp)s(onen)m(t)d(V)-8
-b(alidit)m(y)0 1464 y Ff(RF)n(C)25 b(2446)e(de\034nes)j(rules)e(for)h
-(what)g(prop)r(erties)f(m)n(ust)h(exist)g(in)h(a)e(comp)r(onen)n(t)h
-(to)g(b)r(e)h(used)f(for)f(transferring)g(sc)n(heduling)0
-1578 y(data.)58 b(Most)35 b(of)g(these)g(rules)f(relate)g(to)h(the)g
-(existence)f(of)h(prop)r(erties)f(relativ)n(e)g(to)h(the)g(METHOD)h
-(prop)r(ert)n(y)-7 b(,)35 b(whic)n(h)0 1691 y(declares)22
-b(what)h(op)r(eration)f(a)h(remote)g(receiv)n(er)f(should)h(use)g(to)g
-(pro)r(cess)f(a)h(comp)r(onen)n(t.)35 b(F)-7 b(or)23
-b(instance,)h(if)g(the)f(METHOD)0 1805 y(is)36 b(REQUEST)h(and)e(the)i
-(comp)r(onen)n(t)e(is)h(a)f(VEVENT,)j(the)e(sender)f(is)h(probably)f
-(asking)f(the)j(receiv)n(er)d(to)h(join)h(in)g(a)0 1918
-y(meeting.)g(In)25 b(this)g(case,)g(RF)n(C2446)d(sa)n(ys)i(that)h(the)g
-(comp)r(onen)n(t)g(m)n(ust)g(sp)r(ecify)g(a)f(start)g(time)i(\(DTST)-7
-b(AR)g(T\))26 b(and)f(list)g(the)0 2032 y(receiv)n(er)h(as)h(an)g
-(attendee)h(\(A)-7 b(TTENDEE\).)0 2188 y(Libical)27 b(can)g(c)n(hec)n
-(k)g(these)h(restrictions)e(with)i(the)g(routine:)0 2428
-y Fc(int)42 b(icalrestriction_c)o(he)o(ck)o(\(ic)o(al)o(co)o(mpo)o(ne)o
-(nt)o(*)c(comp\);)0 2667 y Ff(This)19 b(routine)f(returns)g(0)h(if)g
-(the)g(comp)r(onen)n(t)g(do)r(es)f(not)h(pass)f(RF)n(C2446)f
-(restrictions,)i(or)f(if)h(the)g(comp)r(onen)n(t)g(is)g(malformed.)0
-2781 y(The)38 b(comp)r(onen)n(t)g(y)n(ou)f(pass)g(in)h
-Fa(must)45 b Ff(b)r(e)38 b(a)g(V)n(CALEND)n(AR,)h(with)g(one)e(or)g
-(more)h(c)n(hildren,)i(lik)n(e)d(the)i(examples)e(in)0
-2895 y(RF)n(C2446.)0 3051 y(When)28 b(this)f(routine)g(runs,)f(it)i
-(will)f(insert)g(new)g(prop)r(erties)f(in)n(to)h(the)h(comp)r(onen)n(t)
-e(to)h(indicate)h(an)n(y)e(errors)f(it)i(\034nds.)37
-b(See)0 3165 y(section)27 b(6.5.3,)f(X-LIC-ERR)n(OR)i(for)f(more)f
-(information)h(ab)r(out)h(these)f(error)f(prop)r(erties.)0
-3437 y Fd(5.2.8)94 b(Con)m(v)m(erting)32 b(Comp)s(onen)m(ts)d(to)j(T)-8
-b(ext)0 3647 y Ff(T)h(o)19 b(create)g(an)h(RF)n(C2445)e(complian)n(t)h
-(text)h(represen)n(tation)e(of)i(an)f(ob)5 b(ject,)21
-b(use)f(one)f(of)h(the)g(*_as_ical_string\(\))d(routines:)0
-3887 y Fc(char*)41 b(icalcomponent_as_)o(ic)o(al_)o(st)o(ri)o(ng)c
-(\(icalcomponent*)g(component\))0 4000 y(char*)k(icalproperty_as_i)o
-(ca)o(l_s)o(tr)o(in)o(g)d(\(icalproperty*)f(property\))0
-4114 y(char*)k(icalparameter_as_)o(ic)o(al_)o(st)o(ri)o(ng)c
-(\(icalparameter*)g(parameter\))0 4227 y(char*)k(icalvalue_as_ical)o
-(_s)o(tri)o(ng)c(\(icalvalue*)i(value\))0 4467 y Ff(In)32
-b(most)h(cases,)f(y)n(ou)f(will)i(only)f(use)g(icalcomp)r(onen)n
-(t_as_ical_string)c(\(\),)34 b(since)e(it)h(will)f(cascade)f(and)h(con)
-n(v)n(ert)f(all)h(of)0 4581 y(the)c(parameters,)e(prop)r(erties)g(and)i
-(v)-5 b(alues)27 b(that)h(are)e(attac)n(hed)h(to)h(the)g(ro)r(ot)e
-(comp)r(onen)n(t.)0 4737 y(Icalprop)r(ert)n(y_as_ical_string\(\))37
-b(will)k(terminate)g(eac)n(h)g(line)g(with)h(the)f(RF)n(C2445)f(sp)r
-(eci\034ed)h(line)h(terminator)e("n")0 4851 y(Ho)n(w)n(ev)n(er,)27
-b(if)h(y)n(ou)g(compile)g(with)h(the)f(sym)n(b)r(ol)g
-(ICAL_UNIX_NEWLINE)i(unde\034ned,)f(\()g(it)g(is)f(de\034ned)h(b)n(y)f
-(default\))h(it)0 4964 y(will)f(terminate)f(lines)h(with)g("nr")0
-5121 y(Remem)n(b)r(er)35 b(that)h(the)f(string)g(returned)f(b)n(y)h
-(these)h(routines)e(is)h(o)n(wned)g(b)n(y)g(the)h(library)-7
-b(,)36 b(and)f(will)g(ev)n(en)n(tually)f(b)r(e)i(re-)0
-5234 y(written.)h(Y)-7 b(ou)28 b(should)f(cop)n(y)g(it)h(if)g(y)n(ou)e
-(w)n(an)n(t)h(to)h(preserv)n(e)e(it.)p eop
-%%Page: 15 15
-15 14 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(15)0 162 y Fb(5.3)112 b(Time)0 372
-y Fd(5.3.1)94 b(Time)30 b(structure)0 582 y Ff(LIbical)d(de\034nes)g
-(it's)g(o)n(wn)f(time)i(structure)e(for)h(storing)f(all)h(dates)f(and)h
-(times.)37 b(It)28 b(w)n(ould)e(ha)n(v)n(e)g(b)r(een)i(nice)f(to)g
-(re-use)f(the)0 695 y(C)j(library's)e Fa(struct)j(tm,)h
-Ff(but)e(that)h(structure)e(do)r(es)g(not)h(di\033eren)n(tiate)g(b)r
-(et)n(w)n(een)g(dates)f(and)h(times,)g(and)g(b)r(et)n(w)n(een)g(lo)r
-(cal)0 809 y(time)f(and)f(UTC.)h(The)g(libical)f(structure)g(is:)0
-1031 y Fc(struct)41 b(icaltimetype)87 1144 y(int)h(year;)87
-1258 y(int)g(month;)87 1371 y(int)g(day;)87 1485 y(int)g(hour;)87
-1599 y(int)g(minute;)87 1712 y(int)g(second;)87 1826
-y(int)g(is_utc;)f(/*)i(1-)g(time)e(is)i(in)g(UTC)f(timezone)e(*/)87
-1939 y(int)i(is_date;)f(/*)h(1)i(-)f(interpret)c(this)j(as)h(date.)e
-(*/)i(;)0 2161 y Ff(The)35 b(y)n(ear,)h(mon)n(th,)g(da)n(y)-7
-b(,)37 b(hour,)f(min)n(ute)f(and)g(second)g(\034elds)g(ho)n(w)f(the)h
-(brok)n(en-out)f(time)h(v)-5 b(alues.)59 b(The)35 b(is_utc)g(\034eld)0
-2275 y(distinguishes)30 b(b)r(et)n(w)n(een)h(times)g(UTC)g(and)g(a)f
-(lo)r(cal)g(time)i(zone.)45 b(The)31 b(is_date)f(\034eld)h(indicates)g
-(if)g(the)g(in)n(tra-da)n(y)e(\034elds)0 2388 y(hold)e(v)-5
-b(alid)28 b(data.)0 2658 y Fd(5.3.2)94 b(Creating)31
-b(time)f(structures)0 2868 y Ff(There)d(are)g(sev)n(eral)e(w)n(a)n(ys)h
-(to)i(create)e(a)i(new)f(icaltimet)n(yp)r(e)h(structure:)0
-3089 y Fc(struct)41 b(icaltimetype)e(icaltime_from_s)o(tr)o(in)o(g\(c)o
-(on)o(st)e(char*)42 b(str\);)0 3203 y(struct)f(icaltimetype)e
-(icaltime_from_t)o(im)o(et)o(\(ti)o(me)o(_t)e(v,)43 b(int)f(is_date\);)
-0 3317 y(struct)f(icaltimetype)e(icaltime_from_i)o(nt)o(\(i)o(nt)e(v,)
-43 b(int)f(is_date,)e(int)j(is_utc\);)0 3538 y Ff(Icaltime_from_string)
-25 b(tak)n(es)i(an)n(y)g(RF)n(C2445)e(complian)n(t)i(time)h(string:)0
-3760 y Fc(struct)41 b(icaltimetype)e(tt)j(=)h(icaltime_from_str)o(in)o
-(g\()o(199)o(70)o(101)o(T1)o(03)o(000)o(\);)0 3982 y
-Ff(Icaltime_from_timet)22 b(tak)n(es)g(a)h(timet)g(v)-5
-b(alue,)24 b(represen)n(ting)e(seconds)g(past)g(the)i(POSIX)f(ep)r(o)r
-(c)n(h,)h(and)f(a)f(\035ag)g(to)h(indicate)0 4095 y(if)k(the)f(time)g
-(is)g(a)g(date.)36 b(Dates)26 b(ha)n(v)n(e)f(an)h(iden)n(tical)f
-(structure)h(to)g(a)f(time,)i(but)g(they)f(time)h(p)r(ortion)e(\()i
-(hours,)e(min)n(uts)h(and)0 4209 y(seconds)d(\))i(is)g(alw)n(a)n(ys)d
-(00:00:00.)33 b(Dates)24 b(act)h(di\033eren)n(tly)f(in)h(sorting)e(an)h
-(comparision,)f(and)i(they)f(ha)n(v)n(e)f(a)h(di\033eren)n(t)h(string)0
-4322 y(represen)n(tation)h(in)i(RF)n(C2445.)0 4479 y(The)20
-b(icaltime_from_in)n(t)e(is)h(lik)n(e)g(icaltime_from_timet,)i(but)f
-(with)g(an)f(arbitrary)f(ep)r(o)r(c)n(h.)34 b(This)19
-b(routine)g(w)n(as)g(a)g(mistak)n(e)0 4592 y(and)27 b(is)h(deprecated.)
-0 4862 y Fd(5.3.3)94 b(Time)30 b(manipulating)f(routines)0
-5072 y Ff(The)f(n)n(ull)f(time)h(v)-5 b(alue)28 b(is)f(used)h(to)f
-(indicate)h(that)g(the)g(data)f(in)g(the)h(structure)f(is)h(not)f(a)h
-(v)-5 b(alid)27 b(time.)0 5294 y Fc(struct)41 b(icaltimetype)e
-(icaltime_null_t)o(im)o(e\()o(voi)o(d\))o(;)0 5407 y(int)j
-(icaltime_is_null_)o(ti)o(me)o(\(st)o(ru)o(ct)37 b(icaltimetype)h(t\);)
-p eop
-%%Page: 16 16
-16 15 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(16)0 162 y(It)33 b(is)g(sensible)g(for)g(the)g
-(brok)n(en-out)f(time)h(\034elds)g(to)g(con)n(tain)g(v)-5
-b(alues)32 b(that)i(are)e(not)h(p)r(ermitted)h(in)f(an)g(ISO)g
-(complian)n(t)0 275 y(time)g(string.)53 b(F)-7 b(or)32
-b(instance,)i(the)g(seconds)e(\034eld)h(can)g(hold)g(v)-5
-b(alues)32 b(greater)f(than)j(59,)f(and)g(the)g(hours)f(\034eld)i(can)e
-(hold)0 389 y(v)-5 b(alues)29 b(larger)e(than)j(24.)41
-b(The)29 b(excessiv)n(e)f(v)-5 b(alues)29 b(will)g(b)r(e)h(rolled)e(o)n
-(v)n(er)g(in)n(to)h(the)g(next)h(larger)d(\034eld)j(when)f(the)h
-(structure)0 502 y(is)d(normalized.)0 712 y Fc(struct)41
-b(icaltimetype)e(icaltime_normal)o(iz)o(e\()o(str)o(uc)o(t)e
-(icaltimetype)i(t\);)0 921 y Ff(Normalizing)26 b(allo)n(ws)g(y)n(ou)h
-(to)h(do)f(arithmetic)g(op)r(erations)g(on)g(time)h(v)-5
-b(alues.)0 1130 y Fc(struct)41 b(icaltimetype)e(tt)j(=)h
-(icaltime_from_str)o(in)o(g\()o("19)o(97)o(010)o(1T)o(10)o(300)o(0")o
-(\);)0 1244 y(tt.days)e(+=3)0 1357 y(tt.second)f(+=)i(70;)0
-1471 y(tt)h(=)g(icaltime_normali)o(ze)o(\(t)o(t\);)0
-1680 y Ff(There)27 b(are)g(sev)n(eral)e(routines)i(to)h(get)f(the)h(da)
-n(y)f(of)g(the)h(w)n(eek)f(or)g(mon)n(th,)g(etc,)h(from)f(a)h(time)g
-(structure.)0 1889 y Fc(short)41 b(icaltime_day_of_y)o(ea)o(r\(s)o(tr)o
-(uc)o(t)d(icaltimetype)g(t\);)0 2003 y(struct)j(icaltimetype)e
-(icaltime_from_d)o(ay)o(_o)o(f_y)o(ea)o(r\()o(sho)o(rt)e(doy,)42
-b(short)f(year\);)0 2117 y(short)g(icaltime_day_of_w)o(ee)o(k\(s)o(tr)o
-(uc)o(t)d(icaltimetype)g(t\);)0 2230 y(short)j(icaltime_start_do)o(y_)o
-(of_)o(we)o(ek)o(\(st)o(ru)o(ct)c(icaltimetype)i(t\);)0
-2344 y(short)i(icaltime_week_num)o(be)o(r\(s)o(ho)o(rt)c(day_of_month,)
-h(short)k(month,)f(short)g(year\);)0 2457 y(struct)g(icaltimetype)e
-(icaltime_from_w)o(ee)o(k_)o(num)o(be)o(r\()o(sho)o(rt)e(week_number,)h
-(short)k(year\);)0 2571 y(short)f(icaltime_days_in_)o(mo)o(nth)o(\(s)o
-(ho)o(rt)c(month,short)i(year\);)0 2780 y Ff(T)-7 b(w)n(o)37
-b(routines)g(con)n(v)n(ert)g(time)h(structures)f(to)h(and)f(from)h(the)
-g(n)n(um)n(b)r(er)g(of)f(seconds)g(since)h(the)g(POSIX)g(ep)r(o)r(c)n
-(h.)68 b(The)0 2894 y(is_date)27 b(\034eld)h(indicates)f(whether)g(or)g
-(not)h(the)g(hour,)e(min)n(ute)i(and)g(second)f(\034elds)g(should)h(b)r
-(e)g(used)f(in)h(the)g(con)n(v)n(ersion.)0 3103 y Fc(struct)41
-b(icaltimetype)e(icaltime_from_t)o(im)o(et)o(\(ti)o(me)o(_t)e(v,)43
-b(int)f(is_date\);)0 3217 y(time_t)f(icaltime_as_time)o(t\()o(str)o(uc)
-o(t)c(icaltimetype\);)0 3426 y Ff(The)28 b(compare)e(routine)h(w)n
-(orks)f(exactly)h(lik)n(e)g(strcmp,)g(but)h(on)g(time)g(structures.)0
-3635 y Fc(int)42 b(icaltime_compare\()o(st)o(ru)o(ct)37
-b(icaltimetype)i(a,struct)h(icaltimetype)e(b\);)0 3844
-y Ff(The)d(follo)n(wing)e(routines)h(con)n(v)n(ert)g(b)r(et)n(w)n(een)g
-(UTC)h(and)g(a)f(named)h(timezone.)58 b(The)35 b(tzid)g(\034eld)g(m)n
-(ust)g(b)r(e)g(a)f(timezone)0 3958 y(name)27 b(from)h(the)f(Olsen)h
-(database,)e(suc)n(h)h(as)g("America/Los_Angeles.")0
-4114 y(The)h(utc_o\033set)f(routine)g(returns)g(the)h(o\033set)f(of)h
-(the)g(named)f(time)h(zone)f(from)h(UTC,)f(in)h(seconds.)0
-4271 y(The)f(tt)g(parameter)e(in)i(the)g(follo)n(wing)e(routines)h
-(indicates)h(the)g(date)f(on)h(whic)n(h)f(the)h(con)n(v)n(ersion)d
-(should)j(b)r(e)g(made.)36 b(The)0 4384 y(tt)23 b(parameter)e(is)h
-(necessary)f(b)r(ecause)h(timezones)g(ha)n(v)n(e)f(man)n(y)g
-(di\033eren)n(t)i(rules)f(for)g(when)g(da)n(yligh)n(t)f(sa)n(vings)g
-(time)i(is)f(used,)0 4498 y(and)27 b(these)h(rules)f(can)g(c)n(hange)f
-(o)n(v)n(er)g(time.)37 b(So,)27 b(for)g(a)g(single)g(timezone)g(one)g
-(y)n(ear)f(ma)n(y)h(ha)n(v)n(e)f(da)n(yligh)n(t)h(sa)n(vings)e(time)j
-(on)0 4612 y(Marc)n(h)f(15,)f(but)j(for)e(other)g(y)n(ears)f(Marc)n(h)g
-(15)h(ma)n(y)g(b)r(e)h(standard)f(time,)h(and)f(some)g(y)n(ears)f(ma)n
-(y)h(ha)n(v)n(e)g(standard)f(time)i(all)0 4725 y(y)n(ear.)0
-4934 y Fc(int)42 b(icaltime_utc_offs)o(et)o(\(s)o(tru)o(ct)37
-b(icaltimetype)h(tt,)43 b(char*)e(tzid\);)0 5048 y(int)h
-(icaltime_local_ut)o(c_)o(of)o(fse)o(t\()o(\);)0 5162
-y(struct)f(icaltimetype)e(icaltime_as_utc)o(\(s)o(tr)o(uct)e
-(icaltimetype)h(tt,char*)i(tzid\);)0 5275 y(struct)h(icaltimetype)e
-(icaltime_as_zon)o(e\()o(st)o(ruc)o(t)e(icaltimetype)i(tt,char*)h
-(tzid\);)0 5389 y(struct)h(icaltimetype)e(icaltime_as_loc)o(al)o(\(s)o
-(tru)o(ct)e(icaltimetype)h(tt\);)p eop
-%%Page: 17 17
-17 16 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(17)0 162 y Fb(5.4)112 b(Storing)37
-b(Ob)6 b(jects)0 372 y Ff(The)31 b(libical)f(distribution)h(includes)g
-(a)f(separate)f(library)-7 b(,)30 b(libicalss,)h(that)g(allo)n(ws)e(y)n
-(ou)h(to)g(store)g(iCal)g(comp)r(onen)n(t)h(data)0 485
-y(to)f(disk)g(in)h(a)f(v)-5 b(ariet)n(y)29 b(of)i(w)n(a)n(ys.)43
-b(This)30 b(library)f(also)h(includes)g(co)r(de)g(to)g(implemen)n(t)h
-(the)g(CSTP)g(proto)r(col)e(of)h(CAP)h(and)0 599 y(has)c(some)g
-(routines)g(for)g(deciphering)g(incomming)g(messages.)0
-755 y(The)f(\034le)h(storage)e(routines)g(are)h(organized)e(in)j(an)f
-(inheritance)g(heirarc)n(h)n(y)f(that)h(is)h(ro)r(oted)e(in)i(icalset,)
-f(with)h(the)g(deriv)n(ed)0 869 y(class)k(ical\034leset)g(and)h
-(icaldirset.)48 b(Ical\034leset)32 b(stores)e(comp)r(onen)n(ts)h(to)h
-(a)g(\034le,)h(while)f(icaldirset)e(stores)h(comp)r(onen)n(ts)g(to)0
-983 y(m)n(ultiple)c(\034les,)f(one)g(p)r(er)g(mon)n(th)g(based)g(on)g
-(DTST)-7 b(AMP)g(.)28 b(Other)e(storages)e(classess,)h(for)g(storage)g
-(to)h(a)g(heap)g(or)f(a)h(m)n(ysql)0 1096 y(database)g(are)h(planned)g
-(for)g(the)h(future.)0 1253 y(All)g(of)g(the)g(icalset)f(deriv)n(ed)f
-(classes)h(ha)n(v)n(e)f(the)i(same)f(in)n(terface:)0
-1579 y Fc(icaldirset*)39 b(icaldirset_new\(c)o(on)o(st)e(char*)k
-(path\);)0 1693 y(void)h(icaldirset_free\()o(ic)o(al)o(dir)o(se)o(t*)37
-b(store\);)0 1806 y(const)k(char*)h(icaldirset_path\()o(ic)o(al)o(dir)o
-(se)o(t*)37 b(store\);)0 1920 y(void)42 b(icaldirset_mark\()o(ic)o(al)o
-(dir)o(se)o(t*)37 b(store\);)0 2033 y(icalerrorenum)h(icaldirset_commi)
-o(t\()o(ica)o(ld)o(ir)o(set)o(*)f(store\);)0 2147 y(icalerrorenum)h
-(icaldirset_add_c)o(om)o(pon)o(en)o(t\()o(ica)o(ld)o(ir)o(set)o(*)f
-(store,)k(icalcomponent*)d(comp\);)0 2260 y(icalerrorenum)g
-(icaldirset_remov)o(e_)o(com)o(po)o(ne)o(nt\()o(ic)o(al)o(dir)o(se)o
-(t*)f(store,)k(icalcomponent*)d(comp\);)0 2374 y(int)k
-(icaldirset_count_)o(co)o(mp)o(one)o(nt)o(s\()o(ica)o(ld)o(ir)o(set)o
-(*)37 b(store,)k(icalcomponent_kin)o(d)c(kind\);)0 2488
-y(icalerrorenum)h(icaldirset_selec)o(t\()o(ica)o(ld)o(ir)o(set)o(*)f
-(store,)k(icalcomponent*)d(gauge\);)0 2601 y(void)k(icaldirset_clear)o
-(\(i)o(ca)o(ldi)o(rs)o(et)o(*)c(store\);)0 2715 y(icalcomponent*)g
-(icaldirset_fetc)o(h\()o(ica)o(ld)o(ir)o(set)o(*)f(store,)k(const)h
-(char*)f(uid\);)0 2828 y(int)h(icaldirset_has_ui)o(d\()o(ic)o(ald)o(ir)
-o(se)o(t*)37 b(store,)k(const)h(char*)f(uid\);)0 2942
-y(icalcomponent*)d(icaldirset_fetc)o(h_)o(mat)o(ch)o(\(i)o(cal)o(di)o
-(rs)o(et*)f(set,)42 b(icalcomponent)c(*c\);)0 3055 y(icalerrorenum)g
-(icaldirset_modif)o(y\()o(ica)o(ld)o(ir)o(set)o(*)f(store,)k
-(icalcomponent)d(*oldc,)j(icalcomponent)e(*newc\);)0
-3169 y(icalcomponent*)f(icaldirset_get_)o(cu)o(rre)o(nt)o(_c)o(omp)o
-(on)o(en)o(t\(i)o(ca)o(ldi)o(rs)o(et)o(*)g(store\);)0
-3283 y(icalcomponent*)g(icaldirset_get_)o(fi)o(rst)o(_c)o(om)o(pon)o
-(en)o(t\()o(ica)o(ld)o(irs)o(et)o(*)f(store\);)0 3396
-y(icalcomponent*)h(icaldirset_get_)o(ne)o(xt_)o(co)o(mp)o(one)o(nt)o
-(\(i)o(cal)o(di)o(rse)o(t*)f(store\);)0 3664 y Fd(5.4.1)94
-b(Creating)31 b(a)h(new)g(set)0 3874 y Ff(Y)-7 b(ou)28
-b(can)f(create)f(a)i(new)f(set)h(from)f(either)g(the)h(base)f(class)g
-(or)g(the)g(direv)n(ed)g(class.)36 b(F)-7 b(rom)27 b(the)h(base)f
-(class)g(use)g(one)g(of:)0 4087 y Fc(icalset*)40 b(icalset_new_file)o
-(\(co)o(ns)o(t)d(char*)42 b(path\);)0 4201 y(icalset*)e
-(icalset_new_dir\()o(con)o(st)d(char*)k(path\);)0 4314
-y(icalset*)f(icalset_new_heap)o(\(vo)o(id)o(\);)0 4428
-y(icalset*)g(icalset_new_mysq)o(l\(c)o(on)o(st)d(char*)k(path\);)0
-4641 y Ff(Y)-7 b(ou)28 b(can)f(also)f(create)h(a)g(new)h(set)f(based)g
-(on)h(the)f(deriv)n(ed)g(class,)g(F)-7 b(or)27 b(instance,)g(with)h
-(ical\034leset:)0 4854 y Fc(icalfileset*)38 b(icalfileset_new\(c)o(on)o
-(st)f(char*)42 b(path\);)0 4967 y(icalfileset*)c(icalfileset_new_o)o
-(pe)o(n\(c)o(on)o(st)f(char*)k(path,)h(int)g(flags,)f(mode_t)g(mode\);)
-0 5180 y Ff(Icaset_new_\034le)33 b(is)h(iden)n(tical)g(to)g
-(ical\034leset_new.)55 b(BOth)34 b(routines)g(will)g(op)r(en)g(an)g
-(existing)g(\034le)g(for)g(readinga)e(and)0 5294 y(writing,)24
-b(or)e(create)g(a)h(new)g(\034le)g(if)h(it)f(do)r(es)g(not)g(exist.)35
-b(Ical\034lset_new_op)r(en)22 b(tak)n(es)g(the)h(same)g(argumen)n(ts)f
-(as)g(the)i(op)r(en\(\))0 5407 y(system)j(routine)g(and)h(b)r(eha)n(v)n
-(es)e(in)i(the)g(same)f(w)n(a)n(y)-7 b(.)p eop
-%%Page: 18 18
-18 17 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(18)0 162 y(The)29 b(icalset)g(and)g(ical\034lset)g
-(ob)5 b(jects)29 b(are)f(somewhat)h(in)n(terc)n(hangable)e(\025)i(y)n
-(ou)f(can)h(use)g(an)g(ical\034leset*)g(as)f(an)h(argumen)n(t)0
-275 y(to)e(an)n(y)g(of)h(the)g(icalset)f(routines.)0
-432 y(The)d(follo)n(wing)f(examples)h(will)g(all)g(use)g(ical\034leset)
-g(routines;)g(using)g(the)h(other)e(icalset)h(deriv)n(ed)f(classess)g
-(will)h(b)r(e)h(similar.)0 704 y Fd(5.4.2)94 b(A)m(dding,)31
-b(Finding)g(and)h(Remo)m(ving)d(Comp)s(onen)m(ts)0 914
-y Ff(T)-7 b(o)27 b(add)h(comp)r(onen)n(ts)f(to)g(a)g(set,)h(use:)0
-1154 y Fc(icalerrorenum)38 b(icalfileset_add_)o(co)o(mpo)o(ne)o(nt)o
-(\(ic)o(al)o(fi)o(les)o(et)o(*)g(cluster,)i(icalcomponent*)d(child\);)0
-1393 y Ff(The)k(\034leset)h(k)n(eeps)e(an)h(inmemory)g(cop)n(y)f(of)h
-(the)h(comp)r(onen)n(ts,)i(and)d(this)g(set)h(m)n(ust)f(b)r(e)g
-(written)h(bac)n(k)e(to)h(the)h(\034le)0 1507 y(o)r(cassionally)-7
-b(.)35 b(There)27 b(are)f(t)n(w)n(o)h(routines)g(to)g(manage)g(this:)0
-1746 y Fc(void)42 b(icalfileset_mark)o(\(i)o(ca)o(lfi)o(le)o(se)o(t*)37
-b(cluster\);)0 1860 y(icalerrorenum)h(icalfileset_comm)o(it)o(\(ic)o
-(al)o(fi)o(les)o(et)o(*)f(cluster\);)0 2099 y Ff(Ical\034leset_mark)d
-(indicates)i(that)h(the)g(in-memory)e(comp)r(onen)n(ts)h(ha)n(v)n(e)f
-(c)n(hanged.)62 b(Calling)36 b(the)h(_add_comp)r(onen)n(t)0
-2212 y(routine)32 b(will)h(call)f(_mark)f(automatically)-7
-b(,)33 b(but)g(y)n(ou)f(ma)n(y)g(need)h(to)f(call)h(it)g(y)n(ourself)e
-(if)i(y)n(ou)f(ha)n(v)n(e)f(made)i(a)f(c)n(hange)f(to)0
-2326 y(an)g(existing)h(comp)r(onen)n(t.)49 b(The)32 b(_commit)f
-(routine)g(writes)h(the)g(data)f(base)g(to)h(disk,)g(but)h(only)e(if)h
-(it)g(is)g(mark)n(ed.)48 b(The)0 2440 y(_commit)27 b(routine)g(is)h
-(called)f(automatically)f(when)i(the)g(ical\034leset)f(is)h(freed.)0
-2596 y(T)-7 b(o)27 b(iterate)g(through)g(the)h(comp)r(onen)n(ts)f(in)h
-(a)f(set,)h(use:)0 2835 y Fc(icalcomponent*)38 b(icalfileset_get)o(_f)o
-(irs)o(t_)o(co)o(mpo)o(ne)o(nt)o(\(ic)o(al)o(fil)o(es)o(et)o(*)g
-(cluster\);)0 2949 y(icalcomponent*)g(icalfileset_get)o(_n)o(ext)o(_c)o
-(om)o(pon)o(en)o(t\()o(ica)o(lf)o(ile)o(se)o(t*)f(cluster\);)0
-3063 y(icalcomponent*)h(icalfileset_get)o(_c)o(urr)o(en)o(t_)o(com)o
-(po)o(ne)o(nt)f(\(icalfileset*)h(cluster\);)0 3302 y
-Ff(These)25 b(routines)g(w)n(ork)g(lik)n(e)g(the)h(corresp)r(onding)e
-(routines)h(from)g(icalcomp)r(onen)n(t,)g(except)h(that)g(their)f
-(output)i(is)e(\034ltered)0 3415 y(through)j(a)h(gauge.)39
-b(A)29 b(gauge)f(is)h(a)f(test)h(for)g(the)g(prop)r(erties)f(within)h
-(a)g(comp)r(onen)n(ts;)g(only)f(comp)r(onen)n(ts)g(that)i(pass)e(the)0
-3529 y(test)g(are)e(returned.)37 b(A)28 b(gauge)e(can)h(b)r(e)h
-(constructed)f(from)g(a)g(MINSQL)h(string)f(with:)0 3768
-y Fc(icalgauge*)39 b(icalgauge_new_fro)o(m_)o(sq)o(l\(c)o(ha)o(r*)e
-(sql\);)0 4008 y Ff(Then,)28 b(y)n(ou)f(can)g(add)g(the)h(gauge)e(to)i
-(the)g(set)f(with)h(:)0 4247 y Fc(icalerrorenum)38 b(icalfileset_sele)o
-(ct)o(\(ic)o(al)o(fi)o(les)o(et)o(*)f(store,)42 b(icalgauge*)d
-(gauge\);)0 4486 y Ff(Here)27 b(is)h(an)f(example)g(that)h(puts)g(all)f
-(of)h(these)f(routines)g(together:)0 4726 y Fc(void)42
-b(test_fileset\(\))174 4953 y(icalfileset)d(*fs;)174
-5066 y(icalcomponent)f(*c;)174 5180 y(int)43 b(i;)174
-5294 y(char)f(*path)g(=)h(test_fileset.ic)o(s;)174 5407
-y(icalgauge)84 b(*g)42 b(=)i(icalgauge_new_f)o(ro)o(m_)o(sql)o(\()p
-eop
-%%Page: 19 19
-19 18 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(19)349 162 y Fc(SELECT)41 b(*)i(FROM)f(VEVENT)f
-(WHERE)g(DTSTART)84 b('20000103T120000Z)o(')37 b(AND)43
-b(DTSTART)d(=)j('20000106T120000Z)o('\))o(;)174 389 y(fs)g(=)g
-(icalfileset_new\()o(pat)o(h\))o(;)174 616 y(for)g(\(i)f(=)h(0;)g(i!=)g
-(10;)f(i++\))349 730 y(c)h(=)g(make_component\(i)o(\);)37
-b(/*)43 b(Make)e(a)j(new)e(component)e(where)h(DTSTART)g(has)h(month)f
-(of)i(i)g(*/)349 843 y(icalfileset_add)o(_c)o(omp)o(on)o(en)o(t\(f)o
-(s,)o(c\))o(;)174 1184 y(icalfileset_commi)o(t\()o(fs)o(\);)37
-b(/*)43 b(Write)e(to)i(disk)f(*/)174 1411 y(icalfileset_selec)o(t\()o
-(fs)o(,g\))o(;)37 b(/*)43 b(Set)f(the)h(gauge)e(to)i(filter)e
-(components)e(*/)174 1638 y(for)k(\(c)f(=)h(icalfileset_get_f)o(ir)o
-(st_)o(co)o(mp)o(one)o(nt)o(\(f)o(s\);)392 1752 y(c)g(!=)g(0;)392
-1865 y(c)g(=)g(icalfileset_get_n)o(ex)o(t_c)o(om)o(po)o(nen)o(t\()o(fs)
-o(\)\))349 1979 y(struct)e(icaltimetype)d(t)43 b(=)g(icalcomponent_get)
-o(_d)o(tst)o(ar)o(t\()o(c\);)349 2206 y(printf\(sn,icalt)o(im)o(e_a)o
-(s_)o(ct)o(ime)o(\(t)o(\)\))o(;)174 2433 y(icalfileset_free\()o(fs)o
-(\);)0 2706 y Fd(5.4.3)94 b(Other)31 b(routines)0 2916
-y Ff(There)c(are)g(sev)n(eral)e(other)i(routines)g(in)h(the)g(icalset)f
-(in)n(terface,)g(but)h(they)g(not)f(fully)h(implemen)n(ted)h(y)n(et.)0
-3207 y Fb(5.5)112 b(Memory)37 b(Managemen)m(t)0 3417
-y Ff(Libical)25 b(relies)f(hea)n(vily)g(on)h(dynamic)g(allo)r(cation)f
-(for)h(b)r(oth)h(the)f(core)f(ob)5 b(jects)25 b(and)g(for)f(the)i
-(strings)e(used)h(to)g(hold)g(v)-5 b(alues.)0 3531 y(Some)34
-b(of)f(this)h(memory)f(the)h(library)f(caller)g(o)n(wns)g(and)g(m)n
-(ust)h(free,)h(and)f(some)f(of)h(the)g(memory)f(is)h(managed)e(b)n(y)i
-(the)0 3645 y(library)-7 b(.)36 b(Here)27 b(is)g(a)g(summary)g(of)h
-(the)g(memory)e(rules.)0 3884 y Fd(1\))208 4031 y Ff(If)40
-b(the)h(function)g(name)g(has)f(new)g(in)h(it,)j(the)d(caller)e(gets)h
-(con)n(trol)f(of)i(the)g(memory)-7 b(.)75 b(\()40 b(suc)n(h)h(as)e
-(icalcomp)r(o-)208 4144 y(nen)n(t_new\(\),)27 b(or)g(icalprop)r(ert)n
-(y_new_clone\(\))e(\))0 4324 y Fd(2\))208 4471 y Ff(If)j(y)n(ou)g(got)g
-(the)h(memory)f(from)g(a)g(routine)g(with)h(new)f(in)h(it,)g(y)n(ou)f
-(m)n(ust)h(call)f(the)h(corresp)r(onding)d(*_free)i(routine)208
-4585 y(to)f(free)g(the)h(memory)-7 b(.)36 b(\()28 b(Use)g(icalcomp)r
-(onen)n(t_free\(\))e(to)i(free)f(ob)5 b(jects)27 b(created)g(with)h
-(icalcomp)r(onen)n(t_new\(\)\))0 4765 y Fd(3\))208 4912
-y Ff(If)j(the)h(function)f(name)g(has)g(add)g(in)g(it,)i(the)f(caller)e
-(is)h(transferring)e(con)n(trol)h(of)h(the)h(memory)e(to)h(the)h
-(routine.)47 b(\()208 5025 y(icalprop)r(ert)n(y_add_parameter\(\))23
-b(\))0 5205 y Fd(4\))p eop
-%%Page: 20 20
-20 19 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(20)208 162 y(If)34 b(the)g(function)g(name)g(has)f
-(remo)n(v)n(e)f(in)i(it,)i(the)e(caller)f(passes)f(in)i(a)g(p)r(oin)n
-(ter)f(to)g(an)h(ob)5 b(ject)33 b(and)h(after)f(the)h(call)208
-275 y(returns,)e(the)h(caller)e(o)n(wns)g(the)h(ob)5
-b(ject.)50 b(So,)33 b(b)r(efore)f(y)n(ou)f(call)h(icalcomp)r(onen)n
-(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 389
-y(y)n(ou)26 b(do)i(not)f(o)n(wn)g(fo)r(o)g(and)h(after)f(the)h(call)f
-(returns,)g(y)n(ou)g(do.)0 561 y Fd(5\))208 703 y Ff(If)d(the)g
-(routine)f(returns)g(a)g(string,)h(libical)g(o)n(wns)f(the)h(memory)f
-(and)g(will)h(put)g(it)h(on)e(a)g(ring)g(bu\033er)h(to)g(reclaim)f
-(later.)208 817 y(F)-7 b(or)32 b(example,)i(icalcomp)r(onen)n
-(t_as_ical_string\(\).)50 b(Y)-7 b(ou'd)33 b(b)r(etter)g(strdup\(\))h
-(it)g(if)f(y)n(ou)f(w)n(an)n(t)h(to)g(k)n(eep)f(it,)j(and)208
-931 y(y)n(ou)26 b(don't)i(ha)n(v)n(e)e(to)i(delete)g(it.)0
-1219 y Fb(5.6)112 b(Error)36 b(Handling)0 1429 y Ff(Libical)25
-b(has)g(sev)n(eral)e(error)h(handling)h(mec)n(hanisms)f(for)h(the)h(v)
--5 b(arious)24 b(t)n(yp)r(es)h(of)g(programming,)f(seman)n(tic)h(and)g
-(syn)n(tactic)0 1542 y(errors)g(y)n(ou)i(ma)n(y)g(encoun)n(ter.)0
-1811 y Fd(5.6.1)94 b(Return)31 b(v)-5 b(alues)0 2022
-y Ff(Man)n(y)29 b(library)f(routines)g(signal)h(errors)e(through)h
-(their)h(return)g(v)-5 b(alues.)42 b(All)30 b(routines)e(that)i(return)
-f(a)f(p)r(oin)n(ter,)i(suc)n(h)f(as)0 2135 y(icalcomp)r(onen)n
-(t_new\(\),)36 b(will)f(return)f(0)g(\()h(zero)f(\))h(on)f(a)g(fatal)h
-(error.)56 b(Some)35 b(routines)f(will)g(return)h(a)f(v)-5
-b(alue)34 b(of)h(en)n(um)0 2249 y(icalerroren)n(um.)0
-2518 y Fd(5.6.2)94 b(icalerrno)0 2728 y Ff(Most)24 b(routines)f(will)i
-(set)f(the)g(global)f(error)f(v)-5 b(alue)24 b(icalerrno)f(on)h
-(errors.)33 b(This)24 b(v)-5 b(ariable)23 b(is)h(an)g(en)n(umeration;)g
-(p)r(ermissible)0 2841 y(v)-5 b(alues)35 b(can)f(b)r(e)h(found)h(in)f
-(libical/icalerror.h.)56 b(If)35 b(the)g(routine)g(returns)f(an)h(en)n
-(um)g(icalerroren)n(um,)f(then)h(the)h(return)0 2955
-y(v)-5 b(alue)27 b(will)h(b)r(e)f(the)h(same)f(as)f(icalerrno.)35
-b(Y)-7 b(ou)27 b(can)g(use)g(icalerror_strerror\(\))c(to)k(get)g(a)g
-(string)f(that)i(describ)r(es)e(the)i(error)0 3224 y
-Fd(5.6.3)94 b(X-LIC-ERR)m(OR)30 b(and)j(X-LIC-INV)-11
-b(ALID-COMPONENT)0 3434 y Ff(The)38 b(library)f(handles)g(seman)n(tic)g
-(and)h(syn)n(tactic)f(errors)f(in)i(comp)r(onen)n(ts)g(b)n(y)f
-(inserting)g(errors)f(prop)r(erties)h(in)n(to)h(the)0
-3548 y(comp)r(onen)n(ts.)k(If)30 b(the)g(parser)d(cannot)i(parse)g
-(incoming)g(text)g(\()h(a)f(syn)n(tactic)g(error)e(\))j(or)f(if)h(the)g
-(icalrestriction_c)n(hec)n(k\(\))0 3661 y(routine)h(indicates)g(that)h
-(the)f(comp)r(onen)n(t)g(do)r(es)g(not)h(meet)f(the)h(requiremen)n(ts)e
-(of)h(RF)n(C2446)f(\()h(a)g(seman)n(tic)g(error\))f(the)0
-3775 y(library)i(will)h(insert)g(prop)r(erties)f(of)h(the)h(t)n(yp)r(e)
-f(X-LIC-ERR)n(OR)g(to)g(describ)r(e)g(the)g(error.)52
-b(Here)33 b(is)g(an)g(example)g(of)g(the)0 3889 y(error)26
-b(prop)r(ert)n(y:)0 4108 y Fc(X-LIC-ERROR;X-LI)o(C-)o(ERR)o(OR)o(TY)o
-(PE=)o(IN)o(VA)o(LID)o(_I)o(TI)o(P)38 b(:Failed)i(iTIP)i(restrictions)d
-(for)j(property)e(DTSTART.)0 4221 y(Expected)g(1)j(instances)d(of)j
-(the)f(property)e(and)j(got)f(0)0 4441 y Ff(This)35 b(error)f(resulted)
-h(from)g(a)g(call)g(to)h(icalrestriction_c)n(hec)n(k\(\),)f(whic)n(h)g
-(disco)n(v)n(ered)e(that)j(the)g(comp)r(onen)n(t)f(do)r(es)g(not)0
-4554 y(ha)n(v)n(e)26 b(a)i(DTST)-7 b(AR)g(T)28 b(prop)r(ert)n(y)-7
-b(,)27 b(as)g(required)f(b)n(y)h(RF)n(C2445.)0 4711 y(There)g(are)g(a)g
-(few)h(routines)e(to)i(manipulate)f(error)f(prop)r(erties:)0
-4867 y(The)35 b(follo)n(wing)g(data)g(is)g(supp)r(osed)g(to)g(b)r(e)h
-(in)g(a)f(table.)60 b(It)36 b(lo)r(oks)e(OK)h(in)h(LyX,)f(but)h(do)r
-(es)f(not)g(format)g(prop)r(ertly)g(in)0 4981 y(output.)0
-5137 y(Routine)28 b(Purp)r(ose)f(v)n(oid)g(icalrestriction_c)n(hec)n
-(k\(\))e(Chec)n(k)i(a)g(comp)r(onen)n(t)g(against)g(RF)n(C2446)e(and)j
-(insert)0 5294 y(error)g(prop)r(erties)g(to)i(indicate)f(non)g
-(compliance)g(in)n(t)h(icalcomp)r(onen)n(t_coun)n(t_errors\(\))c
-(Return)j(the)h(n)n(um)n(b)r(er)g(of)f(error)0 5407 y(prop)r(erties)p
-eop
-%%Page: 21 21
-21 20 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32
-b(libical)3149 b Ff(21)0 162 y(in)28 b(a)f(comp)r(onen)n(t)g(v)n(oid)g
-(icalcomp)r(onen)n(t_strip_errors\(\))d(Remo)n(v)n(e)i(all)i(error)d
-(prop)r(erties)i(in)h(as)0 318 y(comp)r(onen)n(t)f(v)n(oid)g(icalcomp)r
-(onen)n(t_con)n(v)n(ert_errors\(\))c(Con)n(v)n(ert)j(some)h(error)e
-(prop)r(erties)i(in)n(to)0 475 y(REQUESTS-ST)-7 b(A)g(TUS)29
-b(proprties)e(to)g(indicate)h(the)g(inabilit)n(y)f(to)0
-631 y(pro)r(cess)f(the)i(comp)r(onen)n(t)g(as)e(an)i(iTIP)g(request.)0
-788 y(The)g(t)n(yp)r(es)f(of)h(errors)d(are)i(listed)g(in)h
-(icalerror.h.)35 b(They)27 b(are:)0 1027 y Fc(ICAL_XLICERRORTY)o(PE)o
-(_CO)o(MP)o(ON)o(ENT)o(PA)o(RS)o(EER)o(RO)o(R)0 1141
-y(ICAL_XLICERRORTY)o(PE)o(_PA)o(RA)o(ME)o(TER)o(VA)o(LU)o(EPA)o(RS)o
-(EE)o(RRO)o(R)0 1254 y(ICAL_XLICERRORTY)o(PE)o(_PA)o(RA)o(ME)o(TER)o
-(NA)o(ME)o(PAR)o(SE)o(ER)o(ROR)0 1368 y(ICAL_XLICERRORTY)o(PE)o(_PR)o
-(OP)o(ER)o(TYP)o(AR)o(SE)o(ERR)o(OR)0 1481 y(ICAL_XLICERRORTY)o(PE)o
-(_VA)o(LU)o(EP)o(ARS)o(EE)o(RR)o(OR)0 1595 y(ICAL_XLICERRORTY)o(PE)o
-(_UN)o(KV)o(CA)o(LPR)o(OP)0 1709 y(ICAL_XLICERRORTY)o(PE)o(_IN)o(VA)o
-(LI)o(DIT)o(IP)0 1948 y Ff(The)46 b(libical)f(parser)f(will)i(generate)
-e(the)i(error)d(that)j(end)g(in)g(P)-7 b(ARSEERR)n(OR)47
-b(when)e(it)h(encoun)n(ters)f(garbage)e(in)0 2062 y(the)d(input)g
-(steam.)72 b(ICAL_XLICERR)n(OR)-7 b(TYPE_INV)e(ALIDITIP)42
-b(is)d(inserted)g(b)n(y)g(icalrestriction_c)n(hec)n(k\(\),)h(and)0
-2175 y(ICAL_XLICERR)n(OR)-7 b(TYPE_UNKV)n(CALPR)n(OP)21
-b(is)e(generated)f(b)n(y)i(icalv)n(cal_con)n(v)n(ert\(\))c(when)k(it)g
-(encoun)n(ters)f(a)g(vCal)0 2289 y(prop)r(ert)n(y)26
-b(that)i(it)g(cannot)f(con)n(v)n(ert)f(or)h(do)r(es)g(not)h(kno)n(w)f
-(ab)r(out.)0 2445 y(Icalcomp)r(onen)n(t_con)n(v)n(ert_errors\(\))33
-b(con)n(v)n(erts)k(some)g(of)i(the)f(error)f(prop)r(erties)g(in)h(a)g
-(comp)r(onen)n(t)g(in)n(to)g(REQUEST-)0 2559 y(ST)-7
-b(A)g(TUS)29 b(prop)r(erties)e(that)h(indicate)g(a)g(failure.)38
-b(As)28 b(of)g(libical)g(v)n(ersion0.18,)e(this)i(routine)g(only)f(con)
-n(v)n(ert)g(*P)-7 b(ARSEER-)0 2672 y(R)n(OR)29 b(errors)d(and)j(it)h
-(alw)n(a)n(ys)d(generates)h(a)g(3.x)h(\()g(failure)g(\))g(co)r(de.)42
-b(This)29 b(mak)n(es)f(it)h(more)f(of)h(a)g(go)r(o)r(d)g(idea)f(than)h
-(a)g(really)0 2786 y(useful)f(bit)g(of)g(co)r(de.)0 3077
-y Fb(5.7)112 b(Naming)36 b(Standard)0 3288 y Ff(Structures)26
-b(that)i(y)n(ou)e(access)f(with)j(the)f("struct")f(k)n(eyw)n(ord,)f
-(suc)n(h)h(as)h("struct)f(icaltimet)n(yp)r(e")g(are)g(things)h(that)g
-(y)n(ou)f(are)0 3401 y(allo)n(w)n(ed)g(to)i(see)f(inside)g(and)h(p)r
-(ok)n(e)f(at.)0 3558 y(Structures)33 b(that)h(y)n(ou)e(access)g(though)
-i(a)f(t)n(yp)r(edef,)i(suc)n(h)e(as)g("icalcomp)r(onen)n(t")e(are)i
-(things)g(where)g(all)g(of)h(the)f(data)g(is)0 3671 y(hidden.)0
-3828 y(Comp)r(onen)n(t)28 b(names)g(that)h(start)f(with)h("V")f(are)f
-(part)h(of)h(RF)n(C)f(2445)f(or)g(another)h(iCal)g(standard.)38
-b(Comp)r(onen)n(t)29 b(names)0 3941 y(that)h(start)f(with)i("X")e(are)g
-(also)g(part)g(of)h(the)g(sp)r(ec,)g(but)h(they)f(are)f(not)h(actually)
-f(comp)r(onen)n(ts)g(in)h(the)g(sp)r(ec.)44 b(Ho)n(w)n(ev)n(er,)0
-4055 y(they)34 b(lo)r(ok)f(and)g(act)h(lik)n(e)f(comp)r(onen)n(ts,)h
-(so)f(they)h(are)f(comp)r(onen)n(ts)g(in)h(libical.)55
-b(Names)33 b(that)h(start)f(with)h("XLIC")f(or)0 4168
-y("X-LIC")26 b(are)h(not)h(part)f(of)g(an)n(y)g(iCal)g(sp)r(ec.)37
-b(They)27 b(are)g(used)h(in)n(ternally)e(b)n(y)i(libical.)0
-4325 y(En)n(ums)34 b(that)h(iden)n(tify)f(a)g(comp)r(onen)n(t,)h(prop)r
-(ert)n(y)-7 b(,)35 b(v)-5 b(alue)33 b(or)h(parameter)e(end)i(with)h
-("_COMPONENT,")e("_PR)n(OP-)0 4438 y(ER)-7 b(TY,")28
-b("_V)-9 b(ALUE,")27 b(or)g("_P)-7 b(ARAMETER"s)0 4595
-y(En)n(ums)31 b(that)f(iden)n(tify)h(a)f(parameter)f(v)-5
-b(alue)30 b(ha)n(v)n(e)f(the)i(name)f(of)h(the)f(parameter)f(as)h(the)h
-(second)e(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 4708
-y(ICAL_R)n(OLE_REQP)-7 b(AR)g(TICIP)g(ANT)29 b(or)d(ICAL_P)-7
-b(AR)g(TST)g(A)g(T_A)n(CCEPTED.)0 4865 y(The)28 b(en)n(ums)f(for)g(the)
-h(parts)f(of)g(a)g(recurarance)e(rule)j(and)f(request)g(statuses)g(are)
-f(irregular.)p eop
-%%Page: 22 22
-22 21 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Hac)m(ks)33
-b(and)f(Bugs)2997 b Ff(22)0 162 y Fe(6)131 b(Hac)l(ks)45
-b(and)e(Bugs)0 400 y Ff(There)24 b(are)f(a)g(lot)h(of)g(hac)n(ks)f(in)i
-(the)f(library)f(\025)h(bits)g(of)g(co)r(de)g(that)g(I)g(am)g(not)g
-(proud)g(of)g(and)g(should)g(probably)f(b)r(e)h(c)n(hanged.)0
-514 y(These)j(are)g(mark)n(ed)f(with)i(the)g(commen)n(t)g(string)e("HA)
-n(CK.")p eop
-%%Trailer
-end
-userdict /end-hook known{end-hook}if
-%%EOF
diff --git a/libical/doc/UsingLibical.txt b/libical/doc/UsingLibical.txt
deleted file mode 100644
index 6b203d43d2..0000000000
--- a/libical/doc/UsingLibical.txt
+++ /dev/null
@@ -1,1384 +0,0 @@
-
-
-Using Libical
-
-Eric Busboom (eric@softwarestudio.org)
-
-January 2001
-
-
-
-1 Introduction
-
-Libical is an Open Source implementation of the iCalendar protocols
-and protocol data units. The iCalendar specification describes how
-calendar clients can communicate with calendar servers so users can
-store their calendar data and arrange meetings with other users.
-
-Libical implements RFC2445, RFC2446 and some of RFC2447 and the CAP
-draft.
-
-This documentation assumes that you are familiar with the iCalendar
-standards RFC2445 and RFC2446. these specifications are online on
-the CALSCH webpage at:
-
-http://www.imc.org/ietf-calendar/
-
-1.1 The libical project
-
-This code is under active development. If you would like to contribute
-to the project, you can contact me, Eric Busboom, at eric@softwarestudio.org.
-The project has a webpage at
-
-http://softwarestudio.org/libical/index.html
-
-and a mailing list that you can join by sending the following mail:
-
-To: minimalist@softwarestudio.org
-
-Subject: subscribe libical
-
-1.2 License
-
-The code and datafiles in this distribution are licensed under the
-Mozilla Public License. See http://www.mozilla.org/NPL/MPL-1.0.html
-for a copy of the license. Alternately, you may use libical under
-the terms of the GNU Library General Public License. See http://www.fsf.org/copyleft/lesser.html
-for a copy of the LGPL.
-
-This dual license ensures that the library can be incorporated into
-both proprietary code and GPL'd programs, and will benefit from improvements
-made by programmers in both realms. I will only accept changes into
-my version of the library if they are similarly dual-licensed.
-
-1.3 Example Code
-
-A lot of the documentation for this library is in the form of example
-code. These examples are in the "examples" directory of the distribution.
-Also look in "src/test" for additional annotated examples.
-
-2 Building the Library
-
-Libical uses autoconf to generate makefiles. It should built with no
-adjustments on Linux, FreeBSD and Solaris under gcc. Some version
-have been successfully been build on MacOS, Solaris, UnixWare, And
-Tru64 UNIX without gcc, but you may run into problems with a particular
-later version.
-
-For a more complete guide to building the library, see the README file
-in the distribution.
-
-3 Structure
-
-The iCal calendar model is based on four types of objects: components,
-properties, values and parameters.
-
-Properties are the fundamental unit of information in iCal, and they
-work a bit like a hash entry, with a constant key and a variable value.
-Properties may also have modifiers, called parameters. In the iCal
-content line
-
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
-
-The property name is "ORGANIZER," the value of the property is "mrbig@host.com"
-and the "ROLE" parameter specifies that Mr Big is the chair of the
-meetings associated with this property.
-
-Components are groups of properties that represent the core objects
-of a calendar system, such as events or timezones. Components are
-delimited by "BEGIN" and "END" tags.
-
-When a component is sent across a network, if it is un-encrypted, it
-will look something like:
-
-BEGIN:VCALENDAR
-
-METHOD:REQUEST
-
-PRODID: -//hacksw/handcal//NONSGML v1.0//EN
-
-BEGIN:VEVENT
-
-DTSTAMP:19980309T231000Z
-
-UID:guid-1.host1.com
-
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
-
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
-
- MAILTO:employee-A@host.com
-
-DESCRIPTION:Project XYZ Review Meeting
-
-CATEGORIES:MEETING
-
-CLASS:PUBLIC
-
-CREATED:19980309T130000Z
-
-SUMMARY:XYZ Project Review
-
-DTSTART;TZID=US-Eastern:19980312T083000
-
-DTEND;TZID=US-Eastern:19980312T093000
-
-LOCATION:1CP Conference Room 4350
-
-END:VEVENT
-
-END:VCALENDAR
-
-Note that components can be nested; this example has both a VCALENDAR
-and a VEVENT component, one nested inside the other.
-
-3.1 Core iCal classes
-
-Libical is an object-based, data-oriented library. Nearly all of the
-routines in the library are associated with an opaque data types and
-perform some operation on that data type. Although the library does
-not actually have classes, we will use those terms since the behavior
-of these associations of data and routines is very similar to a class.
-
-3.1.1 Properties
-
-Properties are represented with the icalproperty class and its many
-"derived" classes with on "derived" class per property type in RFC2445.
-Again, there is no actual inheritance relations, but there are clusters
-of routines that make this term useful. A property is a container
-for a single value and a set of parameters.
-
-3.1.2 Components
-
-In libical, components are represented with the icalcomponent class.
-Icalcomponent is a container for a set of other components and properties.
-
-3.1.3 Values
-
-Values are represented in a similar way to properties; a base class
-and many "derived " classes. A value is essentially a abstract handle
-on a single fundamental type, a structure or a union.
-
-3.1.4 Parameters
-
-Parameters are represetned in a similar way to properties, except that
-they contain only one value
-
-3.2 Other elements of libical
-
-In addition to the core iCal classes, libical has many other types,
-structures, classes that aid in creating and using iCal components.
-
-3.2.1 Enumerations and types
-
-Libical is strongly typed, soo every component, property, parameter,
-and value type has an enumeration, and some have an associated structure
-or union.
-
-3.2.2 The parser
-
-The libical parser offers a variety of ways to convert RFC2445 text
-into a libical iinsteral component structure. the parser can parse
-blocks of text as a string, or it can parse lin-by-line.
-
-3.2.3 Error objects
-
-Libical has a substantial error reporting system for both programming
-errors and component usage errors.
-
-3.2.4 Memory Management
-
-Since many of libicals interfaces return strings, the library has its
-own memory management system to elimiate the need to free every string
-returned from the libraru.
-
-3.2.5 Storage classes
-
-The library also offers several classes to store components to flies,
-memory or databases.
-
-4 Differences From RFCs
-
-Libical has been designed to follow the standards as closely as possible,
-so that the key objects in the standards are also key objects in the
-library. However, there are a few areas where the specifications are
-(arguably) irregular, and following them exactly would result in an
-unfriendly interface. These deviations make libical easier to use
-by maintaining a self-similar interface.
-
-4.1 Pseudo Components
-
-Libical defines components for groups of properties that look and act
-like components, but are not defined as components in the specification.
-XDAYLIGHT and XSTANDARD are notable examples. These pseudo components
-group properties within the VTIMEZONE components. For instanace, the
-timezone properties associated with daylight savings time starts with
-"BEGIN:DAYLIGHT" and ends with "END:DAYLIGHT, just like other components,
-but is not defined as a component in RFC2445. ( See RFC2445, page
-61 ) In Libical,this grouping is represented by the XDAYLIGHT component.
-Standard iCAL components all start with the letter "V," while pseudo
-components start with"X."
-
-There are also pseudo components that are conceptually derived classes
-of VALARM. RFC2446 defines what properties may be included in each
-component, and for VALARM, the set of properties it may have depends
-on the value of the ACTION property.
-
-For instance, if a VALARM component has an ACTION property with the
-value of "AUDIO," the component must also have an "ATTACH" property.
-However, if the ACTION value is "DISPLAY," the component must have
-a DESCRIPTION property.
-
-To handle these various, complex restrictions, libical has pseudo components
-for each type of alarm: XAUDIOALARM, XDISPLAYALARM, XEMAILALARM and
-XPROCEDUREALARM.
-
-4.2 Combined Values
-
-Many values can take more than one type. TRIGGER, for instance, can
-have a value type of with DURATION or of DATE-TIME. These multiple
-types make it difficult to create routines to return the value associated
-with a property.
-
-It is natural to have interfaces that would return the value of a property,
-but it is cumbersome for a single routine to return multiple types.
-So, in libical, properties that can have multiple types are given
-a single type that is the union of their RFC2445 types. For instance,
-in libical, the value of the TRIGGER property resolves to struct icaltriggertype.
-This type is a union of a DURATION and a DATE-TIME.
-
-4.3 Multi-Valued Properties
-
-Some properties, such as CATEGORIES have only one value type, but each
-CATEGORIES property can have multiple value instances. This also results
-in a cumbersome interface -- CATEGORIES accessors would have to return
-a list while all other accessors returned a single value. In libical,
-all properties have a single value, and multi-valued properties are
-broken down into multiple single valued properties during parsing.
-That is, an input line like,
-
-CATEGORIES: work, home
-
-becomes in libical's internal representation
-
-CATEGORIES: work
-
-CATEGORIES: home
-
-Oddly, RFC2445 allows some multi-valued properties ( like FREEBUSY
-) to exist as both a multi-values property and as multiple single
-value properties, while others ( like CATEGORIES ) can only exist
-as single multi-valued properties. This makes the internal representation
-for CATEGORIES illegal. However when you convert a component to a
-string, the library will collect all of the CATEGORIES properties
-into one.
-
-5 Using libical
-
-5.1 Creating Components
-
-There are three ways to create components in Libical: creating individual
-objects and assembling them, building entire objects in massive vaargs
-calls, and parsing a text file containing iCalendar data.
-
-5.1.1 Constructor Interfaces
-
-Using constructor interfaces, you create each of the objects separately
-and then assemble them in to components:
-
-icalcomponent *event;
-
-icalproperty *prop;
-
-icalparameter *param;
-
-struct icaltimetype atime;
-
-event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
-
-prop = icalproperty_new_dtstamp(atime) ;
-
-icalcomponent_add_property(event, prop);
-
-prop = icalproperty_new_uid(''guid-1.host1.com'') );
-
-icalcomponent_add_property(event,prop);
-
-prop=icalproperty_new_organizer(''mrbig@host.com'');
-
-param = icalparameter_new_role(ICAL_ROLE_CHAIR)
-
-icalproperty_add_parameter(prop, param);
-
-icalcomponent_add_property(event,prop);
-
-Notice that libical uses a semi-object-oriented style of interface.
-Most things you work with are objects, that are instantiated with
-a constructor that has "new" in the name. Also note that, other than
-the object reference, most structure data is passed in to libical
-routines by value. Libical has some complex but very regular memory
-handling rules. These are detailed in section [sec:memory].
-
-If any of the constructors fail, they will return 0. If you try to
-insert 0 into a property or component, or use a zero-valued object
-reference, libical will either silently ignore the error or will abort
-with an error message. This behavior is controlled by a compile time
-flag (ICAL_ERRORS_ARE_FATAL), and will abort by default.
-
-5.1.2 vaargs Constructors
-
-There is another way to create complex components, which is arguably
-more elegant, if you are not horrified by varargs. The varargs constructor
-interface allows you to create intricate components in a single block
-of code. Here is the previous examples in the vaargs style.
-
- calendar =
-
- icalcomponent_vanew(
-
- ICAL_VCALENDAR_COMPONENT,
-
- icalproperty_new_version(''2.0''),
-
- icalproperty_new_prodid(
-
- ''-//RDU Software//NONSGML HandCal//EN''),
-
- icalcomponent_vanew(
-
- ICAL_VEVENT_COMPONENT,
-
- icalproperty_new_dtstamp(atime),
-
- icalproperty_new_uid(''guid-1.host1.com''),
-
- icalproperty_vanew_organizer(
-
- ''mrbig@host.com''),
-
- icalparameter_new_role(ICAL_ROLE_CHAIR),
-
- 0
-
- ),
-
- icalproperty_vanew_attendee(
-
- ''employee-A@host.com'',
-
- icalparameter_new_role(
-
- ICAL_ROLE_REQPARTICIPANT),
-
- icalparameter_new_rsvp(1),
-
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
-
- 0
-
- ),
-
- icalproperty_new_location(
-
- "1CP Conference Room 4350"),
-
- 0
-
- ),
-
- 0
-
- );
-
-This form is similar to the constructor form , except that the constructors
-have "vanew" instead of "new" in the name. The arguments are similar
-too, except that the component constructor can have a list of properties,
-and the property constructor can have a list of parameters. Be sure
-to terminate every list with a '0', or your code will crash, if you
-are lucky.
-
-5.1.3 Parsing Text Files
-
-The final way to create components will probably be the most common;
-you can create components from RFC2445 compliant text. If you have
-the string in memory, use
-
-icalcomponent* icalparser_parse_string(char* str);
-
-If the string contains only one component, the parser will return the
-component in libical form. If the string contains multiple components,
-the multiple components will be returned as the children of an ICAL_XROOT_COMPONENT
-component.
-
-Parsing a whole string may seem wasteful if you want to pull a large
-component off of the network or from a file; you may prefer to parse
-the component line by line. This is possible too by using:
-
-icalparser* icalparser_new();
-
-void icalparser_free(icalparser* parser);
-
-icalparser_get_line(parser,read_stream);
-
-icalparser_add_line(parser,line);
-
-icalparser_set_gen_data(parser,stream)
-
-These routines will construct a parser object to which you can add
-lines of input and retrieve any components that the parser creates
-from the input. These routines work by specifing an adaptor routine
-to get string data from a source. For an example:
-
-char* read_stream(char *s, size_t size, void *d)
-
-{
-
- char *c = fgets(s,size, (FILE*)d);
-
- return c;
-
-}
-
-main() {
-
- char* line;
-
- icalcomponent *c;
-
- icalparser *parser = icalparser_new();
-
- FILE* stream = fopen(argv[1],"r");
-
- icalparser_set_gen_data(parser,stream);
-
- do{
-
- line = icalparser_get_line(parser,read_stream);
-
- c = icalparser_add_line(parser,line);
-
- if (c != 0){
-
- printf("%s",icalcomponent_as_ical_string(c));
-
- icalparser_claim(parser);
-
- printf("\n---------------\n");
-
- icalcomponent_free(c);
-
- }
-
- } while ( line != 0);
-
-}
-
-The parser object parameterizes the routine used to get input lines
-with icalparser_set_gen_data() and icalparser_get_line(). In this
-example, the routine read_stream() will fetch the next line from a
-stream, with the stream passed in as the void* parameter d. The parser
-calls read_stream() from icalparser_get_line(), but it also needs
-to know what stream to use. This is set by the call to icalparser_set_gen_data().
-By using a different routine for read_stream or passing in different
-data with icalparser_set_gen_data, you can connect to any data source.
-
-Using the same mechanism, other implementations could read from memory
-buffers, sockets or other interfaces.
-
-Since the example code is a very common way to use the parser, there
-is a convenience routine;
-
-icalcomponent* icalparser_parse(icalparser *parser,
-
- char* (*line_gen_func)(char *s, size_t size, void*
-d))
-
-To use this routine, you still must construct the parser object and
-pass in a reference to a line reading routine. If the parser can create
-a single component from the input, it will return a pointer to the
-newly constructed component. If the parser can construct multiple
-components from the input, it will return a reference to an XROOT
-component ( of type ICAL_XROOT_COMPONENT.) This XROOT component will
-hold all of the components constructed from the input as children.
-
-5.2 Accessing Components
-
-Given a reference to a component, you probably will want to access
-the properties, parameters and values inside. Libical interfaces let
-you find sub-component, add and remove sub-components, and do the
-same three operations on properties.
-
-5.2.1 Finding Components
-
-To find a sub-component of a component, use:
-
-icalcomponent* icalcomponent_get_first_component(
-
- icalcomponent* component,
-
- icalcomponent_kind kind);
-
-This routine will return a reference to the first component of the
-type 'kind.' The key kind values, listed in icalenums.h are:
-
-ICAL_ANY_COMPONENT
-
-ICAL_VEVENT_COMPONENT
-
-ICAL_VTODO_COMPONENT
-
-ICAL_VJOURNAL_COMPONENT
-
-ICAL_VCALENDAR_COMPONENT
-
-ICAL_VFREEBUSY_COMPONENT
-
-ICAL_VALARM_COMPONENT
-
-These are only the most common components; there are many more listed
-in icalenums.h.
-
-As you might guess, if there is more than one subcomponent of the type
-you have chosen, this routine will return only the first. to get at
-the others, you need to iterate through the component.
-
-5.2.2 Iterating Through Components
-
-Iteration requires a second routine to get the next subcomponent after
-the first:
-
-icalcomponent* icalcomponent_get_next_component(
-
- icalcomponent* component,
-
- icalcomponent_kind kind);
-
-With the 'first' and 'next' routines, you can create a for loop to
-iterate through all of a components subcomponents
-
- for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
-
- c != 0;
-
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT))
-
-{
-
- do_something(c);
-
-}
-
-This code bit wil iterate through all of the subcomponents in 'comp'
-but you can select a specific type of component by changing ICAL_ANY_COMPONENT
-to another component type.
-
-5.2.3 Using Component Iterators
-
-The iteration model in the previous section requires the component
-to keep the state of the iteration. So, you could not use this model
-to perform a sorting operations, since you'd need two iterators and
-there is only space for one. If you ever call icalcomponent_get_first_component()
-when an iteration is in progress, the pointer will be reset to the
-beginning.
-
-To solve this problem, there are also external iterators for components.
-The routines associated with these external iterators are:
-
-icalcompiter icalcomponent_begin_component(icalcomponent* component,
-icalcomponent_kind kind);
-
-icalcompiter icalcomponent_end_component(icalcomponent* component,
-icalcomponent_kind kind);
-
-icalcomponent* icalcompiter_next(icalcompiter* i);
-
-icalcomponent* icalcompiter_prior(icalcompiter* i);
-
-icalcomponent* icalcompiter_deref(icalcompiter* i);
-
-The _begin_() and _end_() routines return a new iterator that points
-to the beginning and ending of the list of subcomponent for the given
-component, and the kind argument works like the kind argument for
-internal iterators.
-
-After creating an iterators, use _next_() and _prior_() to step forward
-and backward through the list and get the component that the iterator
-points to, and use _deref() to return the component that the iterator
-points to without moving the iterator. All routines will return 0
-when they move to point off the end of the list.
-
-Here is an example of a loop using these routines:
-
-for(
-
- i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
-
- icalcompiter_deref(&i)!= 0;
-
- icalcompiter_next(&i)
-
-) {
-
- icalcomponent *this = icalcompiter_deref(&i);
-
-}
-
-5.2.4 Removing Components
-
-Removing an element from a list while iterating through the list with
-the internal iterators can cause problems, since you will probably
-be removing the element that the internal iterator points to. The
-_remove() routine will keep the iterator valid by moving it to the
-next component, but in a normal loop, this will result in two advances
-per iteration, and you will remove only every other component. To
-avoid the problem, you will need to step the iterator ahead of the
-element you are going to remove, like this:
-
-for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT);
-
- c != 0;
-
- c = next
-
-{
-
- next = icalcomponent_get_next_component(parent_comp,ICAL_ANY_COMPONENT);
-
- icalcomponent_remove_component(parent_comp,c);
-
-}
-
-Another way to remove components is to rely on the side effect of icalcomponent_remove_component:
-if component iterator in the parent component is pointing to the child
-that will be removed, it will move the iterator to the component after
-the child. The following code will exploit this behavior:
-
-icalcomponent_get_first_component(parent_comp,ICAL_VEVENT_COMPONENT);
-
-while((c=icalcomponent_get_current_component(c)) != 0 ){
-
- if(icalcomponent_isa(c) == ICAL_VEVENT_COMPONENT){
-
- icalcomponent_remove_component(parent_comp,inner);
-
- } else {
-
- icalcomponent_get_next_component(parent_comp,ICAL_VEVENT_COMPONENT);
-
- }
-
-}
-
-5.2.5 Working with properties and parameters
-
-Finding, iterating and removing properties works the same as it does
-for components, using the property-specific or parameter-specific
-interfaces:
-
-icalproperty* icalcomponent_get_first_property(
-
- icalcomponent* component,
-
- icalproperty_kind kind);
-
-icalproperty* icalcomponent_get_next_property(
-
- icalcomponent* component,
-
- icalproperty_kind kind);
-
-void icalcomponent_add_property(
-
- icalcomponent* component,
-
- icalproperty* property);
-
-void icalcomponent_remove_property(
-
- icalcomponent* component,
-
- icalproperty* property);
-
-For parameters:
-
-icalparameter* icalproperty_get_first_parameter(
-
- icalproperty* prop,
-
- icalparameter_kind kind);
-
-icalparameter* icalproperty_get_next_parameter(
-
- icalproperty* prop,
-
- icalparameter_kind kind);
-
-void icalproperty_add_parameter(
-
- icalproperty* prop,
-
- icalparameter* parameter);
-
-void icalproperty_remove_parameter(
-
- icalproperty* prop,
-
- icalparameter_kind kind);
-
-Note that since there should be only one parameter of each type in
-a property, you will rarely need to use icalparameter_get_nect_paameter.
-
-5.2.6 Working with values
-
-Values are typically part of a property, although they can exist on
-their own. You can manipulate them either as part of the property
-or independently.
-
-The most common way to work with values to is to manipulate them from
-they properties that contain them. This involves fewer routine calls
-and intermediate variables than working with them independently, and
-it is type-safe.
-
-For each property, there are a _get_ and a _set_ routine that access
-the internal value. For instanace, for the UID property, the routines
-are:
-
-void icalproperty_set_uid(icalproperty* prop, const char* v)
-
-const char* icalproperty_get_uid(icalproperty* prop)
-
-For multi-valued properties, like ATTACH, the value type is usually
-a struct or union that holds both possible types.
-
-If you want to work with the underlying value object, you can get and
-set it with:
-
-icalvalue* icalproperty_get_value (icalproperty* prop)
-
-void icalproperty_set_value(icalproperty* prop, icalvalue* value);
-
-Icalproperty_get_value() will return a reference that you can manipulate
-with other icalvalue routines. Most of the time, you will have to
-know what the type of the value is. For instance, if you know that
-the value is a DATETIME type, you can manipulate it with:
-
-struct icaltimetype icalvalue_get_datetime(icalvalue* value);
-
-void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
-
-When working with an extension property or value (and X-PROPERTY or
-a property that has the parameter VALUE=x-name ) the value type is
-always a string. To get and set the value, use:
-
-void icalproperty_set_x(icalproperty* prop, char* v);
-
-char* icalproperty_get_x(icalproperty* prop);
-
-All X properties have the type of ICAL_X_PROPERTY, so you will need
-these routines to get and set the name of the property:
-
-char* icalproperty_get_x_name(icalproperty* prop)
-
-void icalproperty_set_x_name(icalproperty* prop, char* name);
-
-5.2.7 Checking Component Validity
-
-RFC 2446 defines rules for what properties must exist in a component
-to be used for transferring scheduling data. Most of these rules relate
-to the existence of properties relative to the METHOD property, which
-declares what operation a remote receiver should use to process a
-component. For instance, if the METHOD is REQUEST and the component
-is a VEVENT, the sender is probably asking the receiver to join in
-a meeting. In this case, RFC2446 says that the component must specify
-a start time (DTSTART) and list the receiver as an attendee (ATTENDEE).
-
-Libical can check these restrictions with the routine:
-
-int icalrestriction_check(icalcomponent* comp);
-
-This routine returns 0 if the component does not pass RFC2446 restrictions,
-or if the component is malformed. The component you pass in must be
-a VCALENDAR, with one or more children, like the examples in RFC2446.
-
-When this routine runs, it will insert new properties into the component
-to indicate any errors it finds. See section 6.5.3, X-LIC-ERROR for
-more information about these error properties.
-
-5.2.8 Converting Components to Text
-
-To create an RFC2445 compliant text representation of an object, use
-one of the *_as_ical_string() routines:
-
-char* icalcomponent_as_ical_string (icalcomponent* component)
-
-char* icalproperty_as_ical_string (icalproperty* property)
-
-char* icalparameter_as_ical_string (icalparameter* parameter)
-
-char* icalvalue_as_ical_string (icalvalue* value)
-
-In most cases, you will only use icalcomponent_as_ical_string (), since
-it will cascade and convert all of the parameters, properties and
-values that are attached to the root component.
-
-Icalproperty_as_ical_string() will terminate each line with the RFC2445
-specified line terminator "\\n" However, if you compile with the symbol
-ICAL_UNIX_NEWLINE undefined, ( it is defined by default) it will terminate
-lines with "\\n\\r"
-
-Remember that the string returned by these routines is owned by the
-library, and will eventually be re-written. You should copy it if
-you want to preserve it.
-
-5.3 Time
-
-5.3.1 Time structure
-
-LIbical defines it's own time structure for storing all dates and times.
-It would have been nice to re-use the C library's struct tm, but that
-structure does not differentiate between dates and times, and between
-local time and UTC. The libical structure is:
-
-struct icaltimetype {
-
- int year;
-
- int month;
-
- int day;
-
- int hour;
-
- int minute;
-
- int second;
-
- int is_utc; /* 1-> time is in UTC timezone */
-
- int is_date; /* 1 -> interpret this as date. */ };
-
-The year, month, day, hour, minute and second fields hold the broken-out
-time values. The is_utc field distinguishes between times in UTC and
-a local time zone. The is_date field indicates if the time should
-be interpreted only as a date. If it is a date, the hour, minute and
-second fields are assumed to be zero, regardless of their actual vaules.
-
-5.3.2 Creating time structures
-
-There are several ways to create a new icaltimetype structure:
-
-struct icaltimetype icaltime_from_string(const char* str);
-
-struct icaltimetype icaltime_from_timet(time_t v, int is_date);
-
-struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc);
-
-Icaltime_from_string takes any RFC2445 compliant time string:
-
-struct icaltimetype tt = icaltime_from_string("19970101T103000");
-
-Icaltime_from_timet takes a timet value, representing seconds past
-the POSIX epoch, and a flag to indicate if the time is a date. Dates
-have an identical structure to a time, but the time portion ( hours,
-minuts and seconds ) is always 00:00:00. Dates act differently in
-sorting an comparision, and they have a different string representation
-in RFC2445.
-
-The icaltime_from_int is like icaltime_from_timet, but with an arbitrary
-epoch. This routine was a mistake and is deprecated.
-
-5.3.3 Time manipulating routines
-
-The null time value is used to indicate that the data in the structure
-is not a valid time.
-
-struct icaltimetype icaltime_null_time(void);
-
-int icaltime_is_null_time(struct icaltimetype t);
-
-It is sensible for the broken-out time fields to contain values that
-are not permitted in an ISO compliant time string. For instance, the
-seconds field can hold values greater than 59, and the hours field
-can hold values larger than 24. The excessive values will be rolled
-over into the next larger field when the structure is normalized.
-
-struct icaltimetype icaltime_normalize(struct icaltimetype t);
-
-Normalizing allows you to do arithmetic operations on time values.
-
-struct icaltimetype tt = icaltime_from_string("19970101T103000");
-
-tt.days +=3
-
-tt.second += 70;
-
-tt = icaltime_normalize(tt);
-
-There are several routines to get the day of the week or month, etc,
-from a time structure.
-
-short icaltime_day_of_year(struct icaltimetype t);
-
-struct icaltimetype icaltime_from_day_of_year(short doy, short year);
-
-short icaltime_day_of_week(struct icaltimetype t);
-
-short icaltime_start_doy_of_week(struct icaltimetype t);
-
-short icaltime_week_number(short day_of_month, short month, short year);
-
-struct icaltimetype icaltime_from_week_number(short week_number, short
-year);
-
-short icaltime_days_in_month(short month,short year);
-
-Two routines convert time structures to and from the number of seconds
-since the POSIX epoch. The is_date field indicates whether or not
-the hour, minute and second fields should be used in the conversion.
-
-struct icaltimetype icaltime_from_timet(time_t v, int is_date);
-
-time_t icaltime_as_timet(struct icaltimetype);
-
-The compare routine works exactly like strcmp, but on time structures.
-
-int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
-
-The following routines convert between UTC and a named timezone. The
-tzid field must be a timezone name from the Olsen database, such as
-"America/Los_Angeles."
-
-The utc_offset routine returns the offset of the named time zone from
-UTC, in seconds.
-
-The tt parameter in the following routines indicates the date on which
-the conversion should be made. The tt parameter is necessary because
-timezones have many different rules for when daylight savings time
-is used, and these rules can change over time. So, for a single timezone
-one year may have daylight savings time on March 15, but for other
-years March 15 may be standard time, and some years may have standard
-time all year.
-
-int icaltime_utc_offset(struct icaltimetype tt, char* tzid);
-
-int icaltime_local_utc_offset();
-
-struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid);
-
-struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid);
-
-struct icaltimetype icaltime_as_local(struct icaltimetype tt);
-
-5.4 Storing Objects
-
-The libical distribution includes a separate library, libicalss, that
-allows you to store iCal component data to disk in a variety of ways.
-This library also includes code to implement the CSTP protocol of
-CAP and has some routines for deciphering incomming messages.
-
-The file storage routines are organized in an inheritance heirarchy
-that is rooted in icalset, with the derived class icalfileset and
-icaldirset. Icalfileset stores components to a file, while icaldirset
-stores components to multiple files, one per month based on DTSTAMP.
-Other storages classess, for storage to a heap or a mysql database
-are planned for the future.
-
-All of the icalset derived classes have the same interface:
-
-icaldirset* icaldirset_new(const char* path);
-
-void icaldirset_free(icaldirset* store);
-
-const char* icaldirset_path(icaldirset* store);
-
-void icaldirset_mark(icaldirset* store);
-
-icalerrorenum icaldirset_commit(icaldirset* store);
-
-icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent*
-comp);
-
-icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent*
-comp);
-
-int icaldirset_count_components(icaldirset* store, icalcomponent_kind
-kind);
-
-icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge);
-
-void icaldirset_clear(icaldirset* store);
-
-icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid);
-
-int icaldirset_has_uid(icaldirset* store, const char* uid);
-
-icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent
-*c);
-
-icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc,
-icalcomponent *newc);
-
-icalcomponent* icaldirset_get_current_component(icaldirset* store);
-
-icalcomponent* icaldirset_get_first_component(icaldirset* store);
-
-icalcomponent* icaldirset_get_next_component(icaldirset* store);
-
-5.4.1 Creating a new set
-
-You can create a new set from either the base class or the direved
-class. From the base class use one of:
-
-icalset* icalset_new_file(const char* path);
-
-icalset* icalset_new_dir(const char* path);
-
-icalset* icalset_new_heap(void);
-
-icalset* icalset_new_mysql(const char* path);
-
-You can also create a new set based on the derived class, For instance,
-with icalfileset:
-
-icalfileset* icalfileset_new(const char* path);
-
-icalfileset* icalfileset_new_open(const char* path, int flags, mode_t
-mode);
-
-Icaset_new_file is identical to icalfileset_new. BOth routines will
-open an existing file for readinga and writing, or create a new file
-if it does not exist. Icalfilset_new_open takes the same arguments
-as the open() system routine and behaves in the same way.
-
-The icalset and icalfilset objects are somewhat interchangable -- you
-can use an icalfileset* as an argument to any of the icalset routines.
-
-The following examples will all use icalfileset routines; using the
-other icalset derived classess will be similar.
-
-5.4.2 Adding, Finding and Removing Components
-
-To add components to a set, use:
-
-icalerrorenum icalfileset_add_component(icalfileset* cluster, icalcomponent*
-child);
-
-The fileset keeps an inmemory copy of the components, and this set
-must be written back to the file ocassionally. There are two routines
-to manage this:
-
-void icalfileset_mark(icalfileset* cluster);
-
-icalerrorenum icalfileset_commit(icalfileset* cluster);
-
-Icalfileset_mark indicates that the in-memory components have changed.
-Calling the _add_component routine will call _mark automatically,
-but you may need to call it yourself if you have made a change to
-an existing component. The _commit routine writes the data base to
-disk, but only if it is marked. The _commit routine is called automatically
-when the icalfileset is freed.
-
-To iterate through the components in a set, use:
-
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster);
-
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster);
-
-icalcomponent* icalfileset_get_current_component (icalfileset* cluster);
-
-These routines work like the corresponding routines from icalcomponent,
-except that their output is filtered through a gauge. A gauge is a
-test for the properties within a components; only components that
-pass the test are returned. A gauge can be constructed from a MINSQL
-string with:
-
-icalgauge* icalgauge_new_from_sql(char* sql);
-
-Then, you can add the gauge to the set with :
-
-icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge);
-
-Here is an example that puts all of these routines together:
-
-void test_fileset()
-
-{
-
- icalfileset *fs;
-
- icalcomponent *c;
-
- int i;
-
- char *path = "test_fileset.ics";
-
- icalgauge *g = icalgauge_new_from_sql(
-
- "SELECT * FROM VEVENT WHERE DTSTART > '20000103T120000Z' AND
-DTSTART <= '20000106T120000Z'");
-
-
-
- fs = icalfileset_new(path);
-
-
-
- for (i = 0; i!= 10; i++){
-
- c = make_component(i); /* Make a new component where DTSTART
-has month of i */
-
- icalfileset_add_component(fs,c);
-
- }
-
- icalfileset_commit(fs); /* Write to disk */
-
- icalfileset_select(fs,g); /* Set the gauge to filter components
-*/
-
-
-
- for (c = icalfileset_get_first_component(fs);
-
- c != 0;
-
- c = icalfileset_get_next_component(fs)){
-
- struct icaltimetype t = icalcomponent_get_dtstart(c);
-
-
-
- printf("%s\n",icaltime_as_ctime(t));
-
- }
-
- icalfileset_free(fs);
-
-}
-
-5.4.3 Other routines
-
-There are several other routines in the icalset interface, but they
-not fully implemented yet.
-
-5.5 <sec:memory>Memory Management
-
-Libical relies heavily on dynamic allocation for both the core objects
-and for the strings used to hold values. Some of this memory the library
-caller owns and must free, and some of the memory is managed by the
-library. Here is a summary of the memory rules.
-
-1) If the function name has "new" in it, the caller gets control
- of the memory. ( such as icalcomponent_new(), or icalproperty_new_clone()
- )
-
-2) If you got the memory from a routine with new in it, you must
- call the corresponding *_free routine to free the memory. ( Use
- icalcomponent_free() to free objects created with icalcomponent_new())
-
-3) If the function name has "add" in it, the caller is transferring
- control of the memory to the routine. ( icalproperty_add_parameter() )
-
-4) If the function name has "remove" in it, the caller passes in
- a pointer to an object and after the call returns, the caller owns
- the object. So, before you call icalcomponent_remove_property(comp,foo),
- you do not own "foo" and after the call returns, you do.
-
-5) If the routine returns a string, libical owns the memory and will
- put it on a ring buffer to reclaim later. For example, icalcomponent_as_ical_string().
- You'd better strdup() it if you want to keep it, and you don't have
- to delete it.
-
-5.6 Error Handling
-
-Libical has several error handling mechanisms for the various types
-of programming, semantic and syntactic errors you may encounter.
-
-5.6.1 Return values
-
-Many library routines signal errors through their return values. All
-routines that return a pointer, such as icalcomponent_new(), will
-return 0 ( zero ) on a fatal error. Some routines will return a value
-of enum icalerrorenum.
-
-5.6.2 icalerrno
-
-Most routines will set the global error value icalerrno on errors.
-This variable is an enumeration; permissible values can be found in
-libical/icalerror.h. If the routine returns an enum icalerrorenum,
-then the return value will be the same as icalerrno. You can use icalerror_strerror()
-to get a string that describes the error. The enumerations are:
-
-* ICAL_BADARG_ERROR -- One of the argument to a routine was bad. Typically
- for a null pointer.
-
-* ICAL_NEWFAILED_ERROR -- A new() or malloc() failed
-
-* ICAL_MALFORMEDDATA_ERROR -- An input string was not in the correct
- format
-
-* ICAL_PARSE_ERROR -- The parser failed to parse an incomming component
-
-* ICAL_INTERNAL_ERROR -- Largely equivalent to an assert
-
-* ICAL_FILE_ERROR -- A file operation failed. Check errno for more
- detail.
-
-* ICAL_ALLOCATION_ERROR -- ?
-
-* ICAL_USAGE_ERROR -- ?
-
-* ICAL_NO_ERROR -- No error
-
-* ICAL_MULTIPLEINCLUSION_ERROR -- ?
-
-* ICAL_TIMEDOUT_ERROR -- For CSTP and acquiring locks
-
-* ICAL_UNKNOWN_ERROR -- ?
-
-5.6.3 X-LIC-ERROR and X-LIC-INVALID-COMPONENT
-
-The library handles semantic and syntactic errors in components by
-inserting errors properties into the components. If the parser cannot
-parse incoming text ( a syntactic error ) or if the icalrestriction_check()
-routine indicates that the component does not meet the requirements
-of RFC2446 ( a semantic error) the library will insert properties
-of the type X-LIC-ERROR to describe the error. Here is an example
-of the error property:
-
-X-LIC-ERROR;X-LIC-ERRORTYPE=INVALID_ITIP :Failed iTIP restrictions
-for property DTSTART.
-
-Expected 1 instances of the property and got 0
-
-This error resulted from a call to icalrestriction_check(), which discovered
-that the component does not have a DTSTART property, as required by
-RFC2445.
-
-There are a few routines to manipulate error properties:
-
-[ The following data is supposed to be in a table. It looks OK in LyX,
-but does not format propertly in output. ]
-
-+-------------------------------------+---------------------------------------------------------+
-| Routine | Purpose |
-+-------------------------------------+---------------------------------------------------------+
-| void icalrestriction_check() | Check a component against RFC2446 and insert |
-+-------------------------------------+---------------------------------------------------------+
-| | error properties to indicate non compliance |
-+-------------------------------------+---------------------------------------------------------+
-| int icalcomponent_count_errors() | Return the number of error properties |
-+-------------------------------------+---------------------------------------------------------+
-| | in a component |
-+-------------------------------------+---------------------------------------------------------+
-| void icalcomponent_strip_errors() | Remove all error properties in as |
-+-------------------------------------+---------------------------------------------------------+
-| | component |
-+-------------------------------------+---------------------------------------------------------+
-| void icalcomponent_convert_errors() | Convert some error properties into |
-+-------------------------------------+---------------------------------------------------------+
-| | REQUESTS-STATUS proprties to indicate the inability to |
-+-------------------------------------+---------------------------------------------------------+
-| | process the component as an iTIP request. |
-+-------------------------------------+---------------------------------------------------------+
-
-
-The types of errors are listed in icalerror.h. They are:
-
-ICAL_XLICERRORTYPE_COMPONENTPARSEERROR
-
-ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR
-
-ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR
-
-ICAL_XLICERRORTYPE_PROPERTYPARSEERROR
-
-ICAL_XLICERRORTYPE_VALUEPARSEERROR
-
-ICAL_XLICERRORTYPE_UNKVCALPROP
-
-ICAL_XLICERRORTYPE_INVALIDITIP
-
-The libical parser will generate the error that end in PARSEERROR when
-it encounters garbage in the input steam. ICAL_XLICERRORTYPE_INVALIDITIP
-is inserted by icalrestriction_check(), and ICAL_XLICERRORTYPE_UNKVCALPROP
-is generated by icalvcal_convert() when it encounters a vCal property
-that it cannot convert or does not know about.
-
-Icalcomponent_convert_errors() converts some of the error properties
-in a component into REQUEST-STATUS properties that indicate a failure.
-As of libical version0.18, this routine only convert *PARSEERROR errors
-and it always generates a 3.x ( failure ) code. This makes it more
-of a good idea than a really useful bit of code.
-
-5.6.4 ICAL_ERRORS_ARE_FATAL and icalerror_errors_are_fatal
-
-If the global variable icalerror_errors_are_fatal is set to 1, then
-any error condition will cause the program to abort. The abort occurs
-in icalerror_set_errno(), and is done with an assert(0) if NDEBUG
-is undefined, and with icalerror_crash_here if NDEBUG is defined.
-The default value of icalerror_errors_are_fatal is 1 when ICAL_ERRORS_ARE_FATAL
-is defined, and 0 otherwise. Since ICAL_ERRORS_ARE_FATAL is defined
-by default, icalerror_errors_are_fatal is also defined by default.
-
-5.7 Naming Standard
-
-Structures that you access with the "struct" keyword, such as "struct
-icaltimetype" are things that you are allowed to see inside and poke
-at.
-
-Structures that you access though a typedef, such as "icalcomponent"
-are things where all of the data is hidden.
-
-Component names that start with "V" are part of RFC 2445 or another
-iCal standard. Component names that start with "X" are also part of
-the spec, but they are not actually components in the spec. However,
-they look and act like components, so they are components in libical.
-Names that start with "XLIC" or "X-LIC" are not part of any iCal spec.
-They are used internally by libical.
-
-Enums that identify a component, property, value or parameter end with
-"_COMPONENT," "_PROPERTY," "_VALUE," or "_PARAMETER"s
-
-Enums that identify a parameter value have the name of the parameter
-as the second word. For instance: ICAL_ROLE_REQPARTICIPANT or ICAL_PARTSTAT_ACCEPTED.
-
-The enums for the parts of a recurarance rule and request statuses
-are irregular.
-
-6 Hacks and Bugs
-
-There are a lot of hacks in the library -- bits of code that I am not
-proud of and should probably be changed. These are marked with the
-comment string "HACK."
-
-7 Library Reference
-
-7.1 Manipulating struct icaltimetype
-
-7.1.1 Struct icaltimetype
-
-struct icaltimetype
-
-{
-
- int year;
-
- int month;
-
- int day;
-
- int hour;
-
- int minute;
-
- int second;
-
- int is_utc;
-
- int is_date;
-
- const char* zone;
-
-};
diff --git a/libical/examples/.cvsignore b/libical/examples/.cvsignore
deleted file mode 100644
index 29ef3ef4c8..0000000000
--- a/libical/examples/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.libs
-.deps
-Makefile
-Makefile.in
-doesnothing
diff --git a/libical/examples/Makefile.am b/libical/examples/Makefile.am
deleted file mode 100644
index 99e33d3400..0000000000
--- a/libical/examples/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-
-noinst_PROGRAMS = doesnothing
-
-LDADD = ../src/libical/libical.a ../src/libicalss/libicalss.la ../src/libicalvcal/libicalvcal.la
-INCLUDES = -I . -I../src/libical -I$(srcdir)/../src/libical -I../src/libicalss -I../src/libicalvcal
-
-INCLUDES = -I. -I../src/libical -I$(srcdir)/../src/libical -I../src/libicalss -I../src/libicalvcal
-
-doesnothing_SOURCES = \
- access_components.c \
- access_properties_and_parameters.c \
- errors.c \
- main.c \
- parse_text.c
-
diff --git a/libical/examples/access_components.c b/libical/examples/access_components.c
deleted file mode 100644
index cc5a33d6d2..0000000000
--- a/libical/examples/access_components.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* Access_component.c */
-
-#include "ical.h"
-
-#include <assert.h>
-#include <string.h> /* for strdup */
-#include <stdlib.h> /* for malloc */
-#include <stdio.h> /* for printf */
-#include <time.h> /* for time() */
-#include "icalmemory.h"
-
-void do_something(icalcomponent *c);
-
-/* Creating iCal Components
-
- There are two ways to create new component in libical. You can
- build the component from primitive parts, or you can create it
- from a string.
-
- There are two variations of the API for building the component from
- primitive parts. In the first variation, you add each parameter and
- value to a property, and then add each property to a
- component. This results in a long series of function calls. This
- style is show in create_new_component()
-
- The second variation uses vargs lists to nest many primitive part
- constructors, resulting in a compact, neatly formated way to create
- components. This style is shown in create_new_component_with_va_args()
-
-
-
-*/
-
-icalcomponent* create_new_component()
-{
-
- /* variable definitions */
- icalcomponent* calendar;
- icalcomponent* event;
- struct icaltimetype atime = icaltime_from_timet( time(0),0);
- struct icalperiodtype rtime;
- icalproperty* property;
-
- /* Define a time type that will use as data later. */
- rtime.start = icaltime_from_timet( time(0),0);
- rtime.end = icaltime_from_timet( time(0),0);
- rtime.end.hour++;
-
- /* Create calendar and add properties */
-
- calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
-
- /* Nearly every libical function call has the same general
- form. The first part of the name defines the 'class' for the
- function, and the first argument will be a pointer to a struct
- of that class. So, icalcomponent_ functions will all take
- icalcomponent* as their first argument. */
-
- /* The next call creates a new proeprty and immediately adds it to the
- 'calendar' component. */
-
- icalcomponent_add_property(
- calendar,
- icalproperty_new_version("2.0")
- );
-
-
- /* Here is the short version of the memory rules:
-
- If the routine name has "new" in it:
- Caller owns the returned memory.
- If you pass in a string, the routine takes the memory.
-
- If the routine name has "add" in it:
- The routine takes control of the component, property,
- parameter or value memory.
-
- If the routine returns a string ( "get" and "as_ical_string" )
- The library owns the returned memory.
-
- There are more rules, so refer to the documentation for more
- details.
-
- */
-
- icalcomponent_add_property(
- calendar,
- icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN")
- );
-
- /* Add an event */
-
- event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
-
- icalcomponent_add_property(
- event,
- icalproperty_new_dtstamp(atime)
- );
-
- /* In the previous call, atime is a struct, and it is passed in by value.
- This is how all compound types of values are handled. */
-
- icalcomponent_add_property(
- event,
- icalproperty_new_uid("guid-1.host1.com")
- );
-
- /* add a property that has parameters */
- property = icalproperty_new_organizer("mailto:mrbig@host.com");
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_role(ICAL_ROLE_CHAIR)
- );
-
- icalcomponent_add_property(event,property);
-
- /* In this style of component creation, you need to use an extra
- call to add parameters to properties, but the form of this
- operation is the same as adding a property to a component */
-
- /* add another property that has parameters */
- property = icalproperty_new_attendee("mailto:employee-A@host.com");
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT)
- );
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_rsvp(1)
- );
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP)
- );
-
- icalcomponent_add_property(event,property);
-
-
- /* more properties */
-
- icalcomponent_add_property(
- event,
- icalproperty_new_description("Project XYZ Review Meeting")
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_categories("MEETING")
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_class("PUBLIC")
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_created(atime)
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_summary("XYZ Project Review")
- );
-
- property = icalproperty_new_dtstart(atime);
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_tzid("US-Eastern")
- );
-
- icalcomponent_add_property(event,property);
-
-
- property = icalproperty_new_dtend(atime);
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_tzid("US-Eastern")
- );
-
- icalcomponent_add_property(event,property);
-
- icalcomponent_add_property(
- event,
- icalproperty_new_location("1CP Conference Room 4350")
- );
-
- icalcomponent_add_component(calendar,event);
-
- return calendar;
-}
-
-
-/* Now, create the same component as in the previous routine, but use
-the constructor style. */
-
-icalcomponent* create_new_component_with_va_args()
-{
-
- /* This is a similar set up to the last routine */
- icalcomponent* calendar;
- struct icaltimetype atime = icaltime_from_timet( time(0),0);
- struct icalperiodtype rtime;
-
- rtime.start = icaltime_from_timet( time(0),0);
- rtime.end = icaltime_from_timet( time(0),0);
- rtime.end.hour++;
-
- /* Some of these routines are the same as those in the previous
- routine, but we've also added several 'vanew' routines. These
- 'vanew' routines take a list of properties, parameters or
- values and add each of them to the parent property or
- component. */
-
- calendar =
- icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstamp(atime),
- icalproperty_new_uid("guid-1.host1.com"),
- icalproperty_vanew_organizer(
- "mailto:mrbig@host.com",
- icalparameter_new_role(ICAL_ROLE_CHAIR),
- 0
- ),
- icalproperty_vanew_attendee(
- "mailto:employee-A@host.com",
- icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
- icalparameter_new_rsvp(1),
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
- 0
- ),
- icalproperty_new_description("Project XYZ Review Meeting"),
-
- icalproperty_new_categories("MEETING"),
- icalproperty_new_class("PUBLIC"),
- icalproperty_new_created(atime),
- icalproperty_new_summary("XYZ Project Review"),
- icalproperty_vanew_dtstart(
- atime,
- icalparameter_new_tzid("US-Eastern"),
- 0
- ),
- icalproperty_vanew_dtend(
- atime,
- icalparameter_new_tzid("US-Eastern"),
- 0
- ),
- icalproperty_new_location("1CP Conference Room 4350"),
- 0
- ),
- 0
- );
-
-
- /* Note that properties with no parameters can use the regular
- 'new' constructor, while those with parameters use the 'vanew'
- constructor. And, be sure that the last argument in the 'vanew'
- call is a zero. Without, your program will probably crash. */
-
- return calendar;
-}
-
-
-void find_sub_components(icalcomponent* comp)
-{
- icalcomponent *c;
-
- /* The second parameter to icalcomponent_get_first_component
- indicates the type of component to search for. This will
- iterate through all sub-components */
- for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
- c != 0;
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
-
- do_something(c);
- }
-
- /* This will iterate only though VEVENT sub-components */
-
- for(c = icalcomponent_get_first_component(comp,ICAL_VEVENT_COMPONENT);
- c != 0;
- c = icalcomponent_get_next_component(comp,ICAL_VEVENT_COMPONENT)){
-
- do_something(c);
- }
-
-}
-
-/* Ical components only have one internal iterator, so removing the
- object that the iterator points to can cause problems. Here is the
- right way to remove components */
-
-void remove_vevent_sub_components(icalcomponent* comp){
-
- icalcomponent *c, *next;
-
- for( c = icalcomponent_get_first_component(comp,ICAL_VEVENT_COMPONENT);
- c != 0;
- c = next)
- {
- next = icalcomponent_get_next_component(comp,ICAL_VEVENT_COMPONENT);
-
- icalcomponent_remove_component(comp,c);
-
- do_something(c);
- }
-
-}
-
diff --git a/libical/examples/access_properties_and_parameters.c b/libical/examples/access_properties_and_parameters.c
deleted file mode 100644
index ba3d7fcc0b..0000000000
--- a/libical/examples/access_properties_and_parameters.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/* access_properties_and_parameters.c */
-
-#include "ical.h"
-#include <string.h>
-
-/* Get a particular parameter out of a component. This routine will
- return a list of strings of all attendees who are required. Note
- that this routine assumes that the component that we pass in is a
- VEVENT. */
-
-void get_required_attendees(icalcomponent* event)
-{
- icalproperty* p;
- icalparameter* parameter;
-
- assert(event != 0);
- assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
-
- /* This loop iterates over all of the ATTENDEE properties in the
- event */
-
- /* The iteration routines save their state in the event
- struct, so the are not thread safe unless you lock the whole
- component. */
-
- for(
- p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
- ) {
-
- /* Get the first ROLE parameter in the property. There should
- only be one, so we won't bother to iterate over them. But,
- you can iterate over parameters just like with properties */
-
- parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER);
-
- /* If the parameter indicates the participant is required, get
- the attendees name and stick a copy of it into the output
- array */
-
- if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT)
- {
- /* Remember, the caller does not own this string, so you
- should strdup it if you want to change it. */
- const char *attendee = icalproperty_get_attendee(p);
- }
- }
-
-}
-
-/* Here is a similar example. If an attendee has a PARTSTAT of
- NEEDSACTION or has no PARTSTAT parameter, change it to
- TENTATIVE. */
-
-void update_attendees(icalcomponent* event)
-{
- icalproperty* p;
- icalparameter* parameter;
-
- assert(event != 0);
- assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
-
- for(
- p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
- ) {
-
- parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER);
-
- if (parameter == 0) {
-
- /* There was no PARTSTAT parameter, so add one. */
- icalproperty_add_parameter(
- p,
- icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
- );
-
- } else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) {
- /* Remove the NEEDSACTION parameter and replace it with
- TENTATIVE */
-
- icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER);
-
- /* Don't forget to free it */
- icalparameter_free(parameter);
-
- /* Add a new one */
- icalproperty_add_parameter(
- p,
- icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
- );
- }
-
- }
-}
-
-/* Here are some examples of manipulating properties */
-
-void test_properties()
-{
- icalproperty *prop;
- icalparameter *param;
- icalvalue *value;
-
- icalproperty *clone;
-
- /* Create a new property */
- prop = icalproperty_vanew_comment(
- "Another Comment",
- icalparameter_new_cn("A Common Name 1"),
- icalparameter_new_cn("A Common Name 2"),
- icalparameter_new_cn("A Common Name 3"),
- icalparameter_new_cn("A Common Name 4"),
- 0);
-
- /* Iterate through all of the parameters in the property */
- for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER);
- param != 0;
- param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) {
-
- printf("Prop parameter: %s\n",icalparameter_get_cn(param));
- }
-
- /* Get a string representation of the property's value */
- printf("Prop value: %s\n",icalproperty_get_comment(prop));
-
- /* Spit out the property in its RFC 2445 representation */
- printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop));
-
- /* Make a copy of the property. Caller owns the memory */
- clone = icalproperty_new_clone(prop);
-
- /* Get a reference to the value within the clone property */
- value = icalproperty_get_value(clone);
-
- printf("Value: %s",icalvalue_as_ical_string(value));
-
- /* Free the original and the clone */
- icalproperty_free(clone);
- icalproperty_free(prop);
-
-}
diff --git a/libical/examples/errors.c b/libical/examples/errors.c
deleted file mode 100644
index 86d963bd75..0000000000
--- a/libical/examples/errors.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* errors.c */
-
-#include "ical.h"
-#include <stdio.h>
-
-void program_errors()
-{
- /*Most routines will set icalerrno on errors. This is an
- enumeration defined in icalerror.h */
-
- icalcomponent *c;
-
- icalerror_clear_errno();
-
- c = icalcomponent_new(ICAL_VEVENT_COMPONENT);
-
- if (icalerrno != ICAL_NO_ERROR){
-
- fprintf(stderr,"Horrible libical error: %s\n",
- icalerror_strerror(icalerrno));
-
- }
-
-}
-
-void component_errors(icalcomponent *comp)
-{
- int errors;
- icalproperty *p;
-
- /* presume that we just got this component from the parser */
-
- errors = icalcomponent_count_errors(comp);
-
- printf("This component has %d parsing errors\n", errors);
-
- /* Print out all of the parsing errors. This is not strictly
- correct, because it does not descend into any sub-components,
- as icalcomponent_count_errors() does. */
-
- for(p = icalcomponent_get_first_property(comp,ICAL_XLICERROR_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(comp,ICAL_XLICERROR_PROPERTY))
- {
-
- printf("-- The error is %s:\n",icalproperty_get_xlicerror(p));
- }
-
-
-
- /* Check the component for iTIP compilance, and add more
- X-LIC-ERROR properties if it is non-compilant. */
- icalrestriction_check(comp);
-
-
- /* Count the new errors. */
- if(errors != icalcomponent_count_errors(comp)){
- printf(" -- The component also has iTIP restriction errors \n");
- }
-
- /* Since there are iTIP restriction errors, it may be impossible
- to process this component as an iTIP request. In this case, the
- X-LIC-ERROR proeprties should be expressed as REQUEST-STATUS
- properties in the reply. This following routine makes this
- conversion */
-
-
- icalcomponent_convert_errors(comp);
-
-}
diff --git a/libical/examples/main.c b/libical/examples/main.c
deleted file mode 100644
index 1be2de5c9e..0000000000
--- a/libical/examples/main.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* This is just to make the code in the example directory link properly. */
-#include "ical.h"
-
-int main()
-{
-
- return 1;
-}
-
-
-void do_something(icalcomponent* comp){
-}
diff --git a/libical/examples/parse_text.c b/libical/examples/parse_text.c
deleted file mode 100644
index b7eba43b8a..0000000000
--- a/libical/examples/parse_text.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* parse_text.c
-
- */
-#include <stdio.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include "ical.h"
-
-#include <stdlib.h>
-
-/* The icalparser_get_line routine will create a single *content* line
-out of one or more input lines. The content line is all of the
-properties and values for a single property, and it can span several
-input lines. So, icalparser_get_line will need to be able to get more
-data on its own. Read_string is a routine that does this. You can
-write your own version of read stream to get data from other types of
-files, sockets, etc. */
-
-char* read_stream(char *s, size_t size, void *d)
-{
- char *c = fgets(s,size, (FILE*)d);
-
- return c;
-
-}
-
-void parse_text(int argc, char* argv[])
-{
-
- char* line;
- FILE* stream;
- icalcomponent *c;
-
- /* Create a new parser object */
- icalparser *parser = icalparser_new();
-
- stream = fopen(argv[1],"r");
-
- assert(stream != 0);
-
- /* Tell the parser what input routie it should use. */
- icalparser_set_gen_data(parser,stream);
-
- do{
-
- /* Get a single content line by making one or more calls to
- read_stream()*/
- line = icalparser_get_line(parser,read_stream);
-
- /* Now, add that line into the parser object. If that line
- completes a component, c will be non-zero */
- c = icalparser_add_line(parser,line);
-
-
- if (c != 0){
- printf("%s",icalcomponent_as_ical_string(c));
-
- printf("\n---------------\n");
-
- icalcomponent_free(c);
- }
-
- } while ( line != 0);
-
-
- icalparser_free(parser);
-}
diff --git a/libical/scripts/.cvsignore b/libical/scripts/.cvsignore
deleted file mode 100644
index b840c21800..0000000000
--- a/libical/scripts/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile \ No newline at end of file
diff --git a/libical/scripts/Makefile.am b/libical/scripts/Makefile.am
deleted file mode 100644
index c61eaefdce..0000000000
--- a/libical/scripts/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-EXTRA_DIST = \
-mkderivedcomponents.pl \
-mkderivedparameters.pl \
-mkderivedproperties.pl \
-mkderivedvalues.pl \
-mkparameterrestrictions.pl \
-mkrestrictionrecords.pl \
-mkrestrictiontable.pl \
-readvaluesfile.pl
diff --git a/libical/scripts/mkderivedcomponents.pl b/libical/scripts/mkderivedcomponents.pl
deleted file mode 100755
index ac4e472250..0000000000
--- a/libical/scripts/mkderivedcomponents.pl
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/local/bin/perl
-
-use Getopt::Std;
-getopts('chspi:');
-
-
-# ARG 0 is components.txt
-open(PV,"$ARGV[0]") || die "Can't open components file $ARGV[0]:$!";
-
-my @components;
-
-while (<PV>){
-
- s/#.*//;
-
- chop;
-
- push(@components,$_);
-
-}
-
-close PV;
-
-# Write the file inline by copying everything before a demarcation
-# line, and putting the generated data after the demarcation
-
-if ($opt_i) {
-
- open(IN,$opt_i) || die "Can't open input file \"$opt_i\"";
-
- while(<IN>){
-
- if (/Do not edit/){
- last;
- }
-
- print;
-
- }
-
- if($opt_i){
- print "# Everything below this line is machine generated. Do not edit. \n";
- } else {
- print "/* Everything below this line is machine generated. Do not edit. */\n";
- }
-
-}
-
-if ($opt_c or $opt_h and !$opt_i){
-
-print <<EOM;
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalderivedproperties.{c,h}
- CREATOR: eric 09 May 1999
-
- \044Id:\044
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- ======================================================================*/
-
-/*
- * THIS FILE IS MACHINE GENERATED DO NOT EDIT
- */
-
-#include <stdarg.h> /* for va_arg functions */
-
-EOM
-
-}
-
-if ($opt_p and !$opt_i){
-
-print <<EOM;
-
-EOM
-
-}
-
-
-foreach $comp (@components) {
-
- next if !$comp;
-
- my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$comp));
- my $lc = lc($ucf);
- my $uc = uc($lc);
-
- if($opt_c) { # Make C source
- print<<EOM;
-
-/* $comp */
-
-icalcomponent* icalcomponent_new_${lc}()
-{
- return (icalcomponent*)icalcomponent_new_impl(ICAL_${uc}_COMPONENT);
-}
-
-icalcomponent* icalcomponent_vanew_${lc}(...)
-{
- va_list args;
- struct icalcomponent_impl *impl = icalcomponent_new_impl(ICAL_${uc}_component);
-
- va_start(args,v);
- icalcomponent_add_properties(impl, args);
- va_end(args);
-
- return (icalcomponent*)impl;
-}
-
-EOM
-
-
- } elsif ($opt_h) { # Make a C header
- print<<EOM;
-
-/* $comp */
-icalcomponent* icalcomponent_new_${lc}();
-icalcomponent* icalcomponent_vanew_${lc}(...);
-EOM
-
-} elsif ($opt_s) { # Make something for a switch statement
-
-print <<EOM;
-case ICAL_${uc}_PROPERTY:
-EOM
-
-} elsif ($opt_p) { # make perl source
-
-print <<EOM;
-
-# $comp
-package Net::ICal::Component::${ucf};
-\@ISA=qw(Net::ICal::Component);
-
-sub new
-{
- my \$package = shift;
- my \$c = Net::ICal::icalcomponent_new(\$Net::ICal::ICAL_${uc}_COMPONENT);
-
- my \$self = Net::ICal::Component::new_from_ref(\$c);
- Net::ICal::Component::_add_elements(\$self,\\\@_);
-
- # Self is blessed in new_from_ref
-
- return \$self;
-
-}
-EOM
-
-}
-
-
-
-}
-
-
diff --git a/libical/scripts/mkderivedparameters.pl b/libical/scripts/mkderivedparameters.pl
deleted file mode 100755
index 5772065ec4..0000000000
--- a/libical/scripts/mkderivedparameters.pl
+++ /dev/null
@@ -1,321 +0,0 @@
-#!/usr/local/bin/perl
-
-require "readvaluesfile.pl";
-
-use Getopt::Std;
-getopts('chspi:');
-
-%no_xname = (RELATED=>1,RANGE=>1,RSVP=>1,XLICERRORTYPE=>1,XLICCOMPARETYPE=>1);
-
-%params = read_parameters_file($ARGV[0]);
-
-
-# Write the file inline by copying everything before a demarcation
-# line, and putting the generated data after the demarcation
-
-if ($opt_i) {
-
- open(IN,$opt_i) || die "Can't open input file $opt_i";
-
- while(<IN>){
-
- if (/Do not edit/){
- last;
- }
-
- print;
-
- }
-
- if($opt_p){
- print "# Everything below this line is machine generated. Do not edit. \n";
- } else {
- print "/* Everything below this line is machine generated. Do not edit. */\n";
- }
-
-}
-
-
-# Write parameter string map
-if ($opt_c){
-}
-
-# Write parameter enumerations and datatypes
-
-if($opt_h){
- print "typedef enum icalparameter_kind {\n ICAL_ANY_PARAMETER = 0,\n";
- foreach $param (sort keys %params) {
-
- next if !$param;
-
- next if $param eq 'NO' or $param eq 'ANY';
-
- my $uc = join("",map {uc($_);} split(/-/,$param));
-
- my @enums = @{$params{$param}->{'enums'}};
-
- print " ICAL_${uc}_PARAMETER, \n";
-
- }
- print " ICAL_NO_PARAMETER\n} icalparameter_kind;\n\n";
-
- # Now create enumerations for parameter values
- $idx = 20000;
-
- print "#define ICALPARAMETER_FIRST_ENUM $idx\n\n";
-
- foreach $param (sort keys %params) {
-
- next if !$param;
-
- next if $param eq 'NO' or $prop eq 'ANY';
-
- my $type = $params{$param}->{"C"};
- my $ucv = join("",map {uc(lc($_));} split(/-/,$param));
- my @enums = @{$params{$param}->{'enums'}};
-
- if(@enums){
-
- print "typedef enum $type {\n";
- my $first = 1;
-
- unshift(@enums,"X");
-
- push(@enums,"NONE");
-
- foreach $e (@enums) {
- if (!$first){
- print ",\n";
- } else {
- $first = 0;
- }
-
- my $uce = join("",map {uc(lc($_));} split(/-/,$e));
-
- print " ICAL_${ucv}_${uce} = $idx";
-
- $idx++;
- }
- $c_type =~ s/enum //;
-
- print "\n} $type;\n\n";
- }
- }
-
- print "#define ICALPARAMETER_LAST_ENUM $idx\n\n";
-
-}
-
-if ($opt_c){
-
- # Create the icalparameter_value to icalvalue_kind conversion table
- print "struct icalparameter_value_kind_map value_kind_map[] = {\n";
-
- foreach $enum (@{$params{'VALUE'}->{'enums'}}){
- next if $enum eq 'NO' or $enum eq 'ERROR';
- $uc = join("",map {uc(lc($_));} split(/-/,$enum));
- print " {ICAL_VALUE_${uc},ICAL_${uc}_VALUE},\n";
- }
-
- print " {ICAL_VALUE_X,ICAL_X_VALUE},\n";
- print " {ICAL_VALUE_NONE,ICAL_NO_VALUE}\n};\n\n";
-
- #Create the parameter Name map
- print "static struct icalparameter_kind_map parameter_map[] = { \n";
-
- foreach $param (sort keys %params) {
-
- next if !$param;
-
- next if $param eq 'NO' or $prop eq 'ANY';
-
- my $lc = join("",map {lc($_);} split(/-/,$param));
- my $uc = join("",map {uc(lc($_));} split(/-/,$param));
-
-
- print " {ICAL_${uc}_PARAMETER,\"$param\"},\n";
-
- }
-
- print " { ICAL_NO_PARAMETER, \"\"}\n};\n\n";
-
- # Create the parameter value map
-
- print "static struct icalparameter_map icalparameter_map[] = {\n";
- print "{ICAL_ANY_PARAMETER,0,\"\"},\n";
-
- foreach $param (sort keys %params) {
-
- next if !$param;
-
- next if $param eq 'NO' or $prop eq 'ANY';
-
- my $type = $params{$param}->{"C"};
- my $uc = join("",map {uc(lc($_));} split(/-/,$param));
- my @enums = @{$params{$param}->{'enums'}};
-
- if(@enums){
-
- foreach $e (@enums){
- my $uce = join("",map {uc(lc($_));} split(/-/,$e));
-
- print " {ICAL_${uc}_PARAMETER,ICAL_${uc}_${uce},\"$e\"},\n";
- }
-
- }
- }
-
- print " {ICAL_NO_PARAMETER,0,\"\"}};\n\n";
-
-}
-
-foreach $param (keys %params){
-
- my $type = $params{$param}->{'C'};
-
- my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$param));
-
- my $lc = lc($ucf);
- my $uc = uc($lc);
-
- my $charorenum;
- my $set_code;
- my $pointer_check;
- my $pointer_check_v;
- my $xrange;
-
- if ($type=~/char/ ) {
-
- $charorenum = " icalerror_check_arg_rz( (param!=0), \"param\");\n return ($type)((struct icalparameter_impl*)param)->string;";
-
- $set_code = "((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);";
-
- $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");";
- $pointer_check_v = "icalerror_check_arg_rv( (v!=0),\"v\");";
-
- } else {
-
- $xrange =" if ( ((struct icalparameter_impl*)param)->string != 0){\n return ICAL_${uc}_X;\n }\n" if !exists $no_xname{$uc};
-
- $charorenum= "icalerror_check_arg( (param!=0), \"param\");\n$xrange\nreturn ($type)((struct icalparameter_impl*)param)->data;";
-
- $pointer_check = "icalerror_check_arg_rz(v >= ICAL_${uc}_X,\"v\");\n icalerror_check_arg_rz(v < ICAL_${uc}_NONE,\"v\");";
-
- $pointer_check_v = "icalerror_check_arg_rv(v >= ICAL_${uc}_X,\"v\");\n icalerror_check_arg_rv(v < ICAL_${uc}_NONE,\"v\");";
-
- $set_code = "((struct icalparameter_impl*)param)->data = (int)v;";
-
- }
-
-
-
- if ($opt_c) {
-
- print <<EOM;
-/* $param */
-icalparameter* icalparameter_new_${lc}($type v)
-{
- struct icalparameter_impl *impl;
- icalerror_clear_errno();
- $pointer_check
- impl = icalparameter_new_impl(ICAL_${uc}_PARAMETER);
- if (impl == 0) {
- return 0;
- }
-
- icalparameter_set_${lc}((icalparameter*) impl,v);
- if (icalerrno != ICAL_NO_ERROR) {
- icalparameter_free((icalparameter*) impl);
- return 0;
- }
-
- return (icalparameter*) impl;
-}
-
-${type} icalparameter_get_${lc}(icalparameter* param)
-{
- icalerror_clear_errno();
-$charorenum
-}
-
-void icalparameter_set_${lc}(icalparameter* param, ${type} v)
-{
- $pointer_check_v
- icalerror_check_arg_rv( (param!=0), "param");
- icalerror_clear_errno();
-
- $set_code
-}
-
-EOM
-
- } elsif( $opt_h) {
-
- print <<EOM;
-/* $param */
-icalparameter* icalparameter_new_${lc}($type v);
-${type} icalparameter_get_${lc}(icalparameter* value);
-void icalparameter_set_${lc}(icalparameter* value, ${type} v);
-
-EOM
-
-}
-
-if ($opt_p) {
-
- print <<EOM;
-
-# $param
-
-package Net::ICal::Parameter::${ucf};
-\@ISA=qw(Net::ICal::Parameter);
-
-sub new
-{
- my \$self = [];
- my \$package = shift;
- my \$value = shift;
-
- bless \$self, \$package;
-
- my \$p;
-
- if (\$value) {
- \$p = Net::ICal::icalparameter_new_from_string(\$Net::ICal::ICAL_${uc}_PARAMETER,\$value);
- } else {
- \$p = Net::ICal::icalparameter_new(\$Net::ICal::ICAL_${uc}_PARAMETER);
- }
-
- \$self->[0] = \$p;
-
- return \$self;
-}
-
-sub get
-{
- my \$self = shift;
- my \$impl = \$self->_impl();
-
- return Net::ICal::icalparameter_as_ical_string(\$impl);
-
-}
-
-sub set
-{
- # This is hard to implement, so I've punted for now.
- die "Set is not implemented";
-}
-
-EOM
-
-}
-
-}
-
-if ($opt_h){
-
-print <<EOM;
-#endif /*ICALPARAMETER_H*/
-
-EOM
-}
diff --git a/libical/scripts/mkderivedproperties.pl b/libical/scripts/mkderivedproperties.pl
deleted file mode 100755
index 965817eb30..0000000000
--- a/libical/scripts/mkderivedproperties.pl
+++ /dev/null
@@ -1,239 +0,0 @@
-#!/usr/local/bin/perl
-
-require "readvaluesfile.pl";
-
-use Getopt::Std;
-getopts('chspmi:');
-
-# ARG 0 is properties.csv
-%propmap = read_properties_file($ARGV[0]);
-
-# ARG 1 is value-types.txt
-%valuemap = read_values_file($ARGV[1]);
-
-
-# Write the file inline by copying everything before a demarcation
-# line, and putting the generated data after the demarcation
-
-if ($opt_i) {
-
- open(IN,$opt_i) || die "Can't open input file $opt_i";
-
- while(<IN>){
-
- if (/Do not edit/){
- last;
- }
-
- print;
-
- }
-
- print "/* Everything below this line is machine generated. Do not edit. */\n";
-
-
-}
-
-sub fudge_data {
- my $prop = shift;
-
- my $value = $propmap{$prop}->{'lic_value'};
-
- if (!$value){
- die "Can't find value for property \"$prop\"\n";
- }
- my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$prop));
- my $lc = lc($ucf);
- my $uc = uc($lc);
-
- my $ucfvalue = join("",map {ucfirst(lc($_));} split(/-/,$value));
- my $lcvalue = lc($ucfvalue);
- my $ucvalue = uc($lcvalue);
-
- my $type = $valuemap{$value}->{C}->[1];
-
- return ($uc,$lc,$lcvalue,$ucvalue,$type);
-
-}
-
-# Create the property map data
-if($opt_c){
-
- print "static struct icalproperty_map property_map[] = {\n";
-
- foreach $prop (sort keys %propmap) {
-
- next if !$prop;
-
- next if $prop eq 'NO';
-
- my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
-
- print "{ICAL_${uc}_PROPERTY,\"$prop\",ICAL_${ucvalue}_VALUE},\n";
-
- }
-
- $prop = "NO";
-
- my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
-
- print "{ICAL_${uc}_PROPERTY,\"\",ICAL_NO_VALUE}};\n\n";
-
-
- print "static struct icalproperty_enum_map enum_map[] = {\n";
-
- $idx = 10000;
-
- foreach $value (sort keys %valuemap) {
-
- next if !$value;
- next if $value eq 'NO' or $prop eq 'ANY';
-
- my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
- my @enums = @{$valuemap{$value}->{'enums'}};
-
- if(@enums){
-
- my ($c_autogen,$c_type) = @{$valuemap{$value}->{'C'}};
-
- unshift(@enums,"X");
- push(@enums,"NONE");
-
- foreach $e (@enums) {
-
- my $uce = join("",map {uc(lc($_));} split(/-/,$e));
-
- if($e ne "X" and $e ne "NONE"){
- $str = $e;
- } else {
- $str = "";
- }
-
- print " {ICAL_${ucv}_PROPERTY,ICAL_${ucv}_${uce},\"$str\" }, /*$idx*/\n";
-
- $idx++;
- }
-
- }
- }
- print " {ICAL_NO_PROPERTY,0,\"\"}\n};\n\n";
-
-
-}
-
-
-if($opt_h){
-
- # Create the property enumerations list
- print "typedef enum icalproperty_kind {\n ICAL_ANY_PROPERTY = 0,\n";
- foreach $prop (sort keys %propmap) {
-
- next if !$prop;
-
- next if $prop eq 'NO' or $prop eq 'ANY';
-
- my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
-
- print " ICAL_${uc}_PROPERTY, \n";
-
- }
- print " ICAL_NO_PROPERTY\n} icalproperty_kind;\n\n";
-
-
-}
-
-
-foreach $prop (sort keys %propmap) {
-
- next if !$prop;
-
- next if $prop eq 'NO' or $prop eq 'ANY';
-
- my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
-
-
- my $pointer_check;
- if ($type =~ /\*/){
- $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/;
- } elsif ( $type eq "void" ){
- $pointer_check = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
-
- }
-
- my $set_pointer_check = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
-
- if($opt_c) { # Generate C source
- print<<EOM;
-/* $prop */
-icalproperty* icalproperty_new_${lc}($type v) {
- struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
- icalproperty_set_${lc}((icalproperty*)impl,v);
- return (icalproperty*)impl;
-}
-icalproperty* icalproperty_vanew_${lc}($type v, ...){
- va_list args;
- struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
- icalproperty_set_${lc}((icalproperty*)impl,v);
- va_start(args,v);
- icalproperty_add_parameters(impl, args);
- va_end(args);
- return (icalproperty*)impl;
-}
-EOM
-
- # Allow EXDATEs to take DATE values easily.
- if ($lc eq "exdate") {
- print<<EOM;
-void icalproperty_set_${lc}(icalproperty* prop, $type v){
- icalvalue *value;
- $set_pointer_check
- icalerror_check_arg_rv( (prop!=0),"prop");
- if (v.is_date)
- value = icalvalue_new_date(v);
- else
- value = icalvalue_new_datetime(v);
- icalproperty_set_value(prop,value);
-}
-EOM
- } else {
- print<<EOM;
-void icalproperty_set_${lc}(icalproperty* prop, $type v){
- icalvalue *value;
- $set_pointer_check
- icalerror_check_arg_rv( (prop!=0),"prop");
- value = icalvalue_new_${lcvalue}(v);
- icalproperty_set_value(prop,value);
-}
-EOM
- }
-
- print<<EOM;
-$type icalproperty_get_${lc}(icalproperty* prop){
- icalvalue *value;
- icalerror_check_arg( (prop!=0),"prop");
- value = icalproperty_get_value(prop);
- return icalvalue_get_${lcvalue}(value);
-}
-EOM
-
-
- } elsif ($opt_h) { # Generate C Header file
- print "\
-/* $prop */\
-icalproperty* icalproperty_new_${lc}($type v);\
-icalproperty* icalproperty_vanew_${lc}($type v, ...);\
-void icalproperty_set_${lc}(icalproperty* prop, $type v);\
-$type icalproperty_get_${lc}(icalproperty* prop);";
-
-}
-
-
-} # This brace terminates the main loop
-
-
-
-if ($opt_h){
-
-print "\n\n#endif /*ICALPROPERTY_H*/\n"
-}
-
diff --git a/libical/scripts/mkderivedvalues.pl b/libical/scripts/mkderivedvalues.pl
deleted file mode 100755
index e7ede34ae7..0000000000
--- a/libical/scripts/mkderivedvalues.pl
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/usr/bin/perl
-
-use lib '.';
-
-require 'readvaluesfile.pl';
-
-use Getopt::Std;
-getopts('chi:');
-
- #Options
- # c -> generate c code file
- # h-> generate header file
-
- # Open with value-types.txt
-
-my %h = read_values_file($ARGV[0]);
-
-
- # Write the file inline by copying everything before a demarcation
- # line, and putting the generated data after the demarcation
-
-if ($opt_i) {
-
- open(IN,$opt_i) || die "Can't open input file $opt_i";
-
- while(<IN>){
- print;
- }
-}
-
-
- # Map type names to the value in the icalvalue_impl data union */
-
-%union_map = (
- BOOLEAN => 'int',
- CALADDRESS=>'string',
- DATE=>'time',
- DATETIME=>'time',
- DATETIMEDATE=>'time',
- DATETIMEPERIOD=>'period',
- DURATION=>'duration',
- INTEGER=>'int',
- TEXT=>'string',
- URI=>'string',
- UTCOFFSET=>'int',
- QUERY=>'string',
- BINARY=>'string',
- X=>'string'
- );
-
-
-if($opt_h){
-
- # First print out the value enumerations
- $idx = 5000;
- print "typedef enum icalvalue_kind {\n";
- print " ICAL_ANY_VALUE=$idx,\n";
-
- foreach $value (keys %h) {
-
- $idx++;
- my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
-
- next if $value eq "NO";
-
- print " ICAL_${ucv}_VALUE=$idx,\n";
- }
-
- $idx++;
- print " ICAL_NO_VALUE=$idx\n} icalvalue_kind ;\n\n";
-
- # Now create enumerations for property values
- $idx = 10000;
-
- print "#define ICALPROPERTY_FIRST_ENUM $idx\n\n";
-
- foreach $value (sort keys %h) {
-
- next if !$value;
-
- next if $value eq 'NO' or $prop eq 'ANY';
-
- my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
- my @enums = @{$h{$value}->{'enums'}};
-
- if(@enums){
-
- my ($c_autogen,$c_type) = @{$h{$value}->{'C'}};
- print "typedef $c_type {\n";
- my $first = 1;
-
- unshift(@enums,"X");
-
- push(@enums,"NONE");
-
- foreach $e (@enums) {
- if (!$first){
- print ",\n";
- } else {
- $first = 0;
- }
-
- my $uce = join("",map {uc(lc($_));} split(/-/,$e));
-
- print " ICAL_${ucv}_${uce} = $idx";
-
- $idx++;
- }
-
- $c_type =~ s/enum //;
-
- print "\n} $c_type;\n\n";
- }
- }
-
- print "#define ICALPROPERTY_LAST_ENUM $idx\n\n";
-
-}
-
-
-if($opt_c){
-
- # print out the value to string map
-
- print "static struct icalvalue_kind_map value_map[]={\n";
-
- foreach $value (keys %h) {
-
- $idx++;
- my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
-
- next if $value eq "NO";
-
- print " {ICAL_${ucv}_VALUE,\"$value\"},\n";
- }
-
-
- print " {ICAL_NO_VALUE,\"\"}\n};";
-
-}
-
-
-foreach $value (keys %h) {
-
- my $autogen = $h{$value}->{C}->[0];
- my $type = $h{$value}->{C}->[1];
-
- my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$value));
-
- my $lc = lc($ucf);
- my $uc = uc($lc);
-
- my $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/;
- my $pointer_check_rv = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
-
- my $assign;
-
- if ($type =~ /char/){
- $assign = "icalmemory_strdup(v);\n\n if (impl->data.v_string == 0){\n errno = ENOMEM;\n }\n";
- } else {
- $assign = "v;";
- }
-
- my $union_data;
-
- if(@{$h{$value}->{'enums'}}){
- $union_data = 'enum';
-
- } elsif (exists $union_map{$uc} ){
- $union_data=$union_map{$uc};
- } else {
- $union_data = $lc;
- }
-
- if ($opt_c && $autogen) {
-
- print "\n\n\
-icalvalue* icalvalue_new_${lc} ($type v){\
- struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_${uc}_VALUE);\
- $pointer_check\
- icalvalue_set_${lc}((icalvalue*)impl,v);\
- return (icalvalue*)impl;\
-}\
-void icalvalue_set_${lc}(icalvalue* value, $type v) {\
- struct icalvalue_impl* impl; \
- icalerror_check_arg_rv( (value!=0),\"value\");\
- $pointer_check_rv\
- icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
- impl = (struct icalvalue_impl*)value;\n";
-
- if( $union_data eq 'string') {
-
- print " if(impl->data.v_${union_data}!=0) {free((void*)impl->data.v_${union_data});}\n";
- }
-
-
- print "\n impl->data.v_$union_data = $assign \n }\n";
-
- print "$type\ icalvalue_get_${lc}(icalvalue* value)\ {\n\
- icalerror_check_arg( (value!=0),\"value\");\
- icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
- return ((struct icalvalue_impl*)value)->data.v_${union_data};\n}\n";
-
-
- } elsif($opt_h && $autogen) {
-
- print "\n /* $value */ \
-icalvalue* icalvalue_new_${lc}($type v); \
-$type icalvalue_get_${lc}(icalvalue* value); \
-void icalvalue_set_${lc}(icalvalue* value, ${type} v);\n\n";
-
- }
-
-}
-
-
-if ($opt_h){
- print "#endif /*ICALVALUE_H*/\n";
- }
-
-
- __END__
-
diff --git a/libical/scripts/mkparameterrestrictions.pl b/libical/scripts/mkparameterrestrictions.pl
deleted file mode 100755
index 2c57eb4ca5..0000000000
--- a/libical/scripts/mkparameterrestrictions.pl
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/perl
-
-# Version: 1.0
-# Script last updated: 30May1999 GMD
-# Change log:
-# <none>
-
-
-# usually open params-in-prop.txt
-open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
-
-print <<EOM;
-/*
- ======================================================================
- File: parameterrestrictions.c
-
- (C) COPYRIGHT 1999 Graham Davison
- mailto:g.m.davison\@computer.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- ======================================================================*/
-
-/*
- * THIS FILE IS MACHINE GENERATED DO NOT EDIT
- */
-
-
-int icalrestriction_is_parameter_allowed(icalproperty_kind prop,icalparameter_kind param)
-{
- switch (prop)
- {
-EOM
-
-while(<F>)
-{
- chop;
-
- # split line by whitespace
- my @v = split(/\s+/,$_);
- # property is first item on line
- my $prop = shift @v;
- my $prop_name = $prop;
- if (substr($prop,0,1) eq "X") { $prop = "X"; }
- $prop = join("",split(/-/,$prop));
-
-print <<EOM;
-
- /* ${prop_name} */
- case ICAL_${prop}_PROPERTY:
- switch (param)
- {
-EOM
-
- foreach $param (@v)
- {
- $param = join("",split(/-/,$param));
- print "\t\t\t\tcase ICAL_${param}_PARAMETER:\n";
- }
-
-print <<EOM;
- return 1;
- default:
- return 0;
- }
-
-EOM
-
-}
-
-print <<EOM;
- }
-
- return 0;
-}
-EOM
diff --git a/libical/scripts/mkrestrictionrecords.pl b/libical/scripts/mkrestrictionrecords.pl
deleted file mode 100755
index e2c62ae748..0000000000
--- a/libical/scripts/mkrestrictionrecords.pl
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/perl
-
-# Version: 1.0
-# Script last updated: 30May1999 GMD
-# Change log:
-# <none>
-
-# usually open restrictions.csv
-open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
-
-print <<EOM;
-/*
- ======================================================================
- File: restrictionrecords.c
-
- (C) COPYRIGHT 1999 Graham Davison
- mailto:g.m.davison\@computer.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- ======================================================================*/
-
-
-/*
- * THIS FILE IS MACHINE GENERATED DO NOT EDIT
- */
-
-
-typedef struct icalrestriction_record {
- icalproperty_method method;
- icalcomponent_kind component;
- icalproperty_kind property;
- icalcomponent_kind subcomponent;
- icalrestriction_kind restriction;
-} icalrestriction_record;
-
-
-icalrestriction_record icalrestriction_records[] =
-{
-EOM
-
-my $last_method = "";
-my $last_component = "";
-my $last_property = "";
-my $need_header = 0;
-
-while(<F>)
-{
- chop;
-
- # split line at commas
- my ($method,$component,$property,$subcomponent,$restriction)=split(/\,/,$_);
-
- #
- #put in code to generate comments here!
- #
- if ($method ne $last_method)
- {
- $need_header = 1;
- $last_method = $method;
- }
- if ($component ne $last_component)
- {
- $need_header = 1;
- $last_component = $component;
- }
-
- if ($need_header)
- {
- print "\n\t/* METHOD: ${method}, COMPONENT: ${component} */\n";
- $need_header = 0;
- }
-
- foreach $item ($component,$property,$subcomponent,$restriction)
- {
- # handle special cases.
- if ($item eq "NONE")
- { $item = "NO"; }
- else { if (substr($item,0,1) eq "X")
- { $item = "X"; }}
-
- # strip out dashes
- $item = join("",split(/-/,$item));
- }
- # strip leading V from component names
- $component =~ s/^(V?)(\w+?)((SAVINGS)?)((TIME)?)$/$2/;
- $subcomponent =~ s/^V(\w+)/$1/;
-
- print "\t\{ICAL_METHOD_${method},ICAL_${component}_COMPONENT,";
- print "ICAL_${property}_PROPERTY,ICAL_${subcomponent}_COMPONENT,";
- print "ICAL_RESTRICTION_${restriction}\},\n";
-
-}
-
-print <<EOM;
-
- /* END */
- {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}
-};
-EOM
diff --git a/libical/scripts/mkrestrictiontable.pl b/libical/scripts/mkrestrictiontable.pl
deleted file mode 100755
index e1e1a0ca53..0000000000
--- a/libical/scripts/mkrestrictiontable.pl
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Std;
-getopts('i:');
-
-# the argument should be the path to the restriction datafile, usually
-# design-data/restrictions.csv
-open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!";
-
-# Write the file inline by copying everything before a demarcation
-# line, and putting the generated data after the demarcation
-
-if ($opt_i) {
-
- open(IN,$opt_i) || die "Can't open input file $opt_i";
-
- while(<IN>){
-
- if (/Do not edit/){
- last;
- }
-
- print;
-
- }
-
- print "/* Everything below this line is machine generated. Do not edit. */\n";
-
-
- close IN;
-}
-
-# First build the property restriction table
-print "icalrestriction_property_record icalrestriction_property_records[] = {\n";
-
-while(<F>)
-{
-
- chop;
-
- s/\#.*$//;
-
- my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_);
-
- next if !$method;
-
- if(!$sub) {
- $sub = "0";
- } else {
- $sub = "icalrestriction_".$sub;
- }
-
- if($prop ne "NONE"){
- print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub},\n");
- }
-
-}
-
-
-# Print the terminating line
-print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE}\n";
-
-print "};\n";
-
-print "icalrestriction_component_record icalrestriction_component_records[] = {\n";
-
-
-# Go back through the entire file and build the component restriction table
-close(F);
-open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!";
-
-while(<F>)
-{
-
- chop;
-
- s/\#.*$//;
-
- my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_);
-
- next if !$method;
-
- if(!$sub) {
- $sub = "0";
- } else {
- $sub = "icalrestriction_".$sub;
- }
-
-
- if($subcomp ne "NONE"){
- print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${subcomp}_COMPONENT,ICAL_RESTRICTION_${restr},$sub\},\n");
- }
-
-}
-
-# print the terminating line
-print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}\n";
-print "};\n";
diff --git a/libical/scripts/readvaluesfile.pl b/libical/scripts/readvaluesfile.pl
deleted file mode 100644
index d5e2d36fd8..0000000000
--- a/libical/scripts/readvaluesfile.pl
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-sub read_values_file {
-
- my $path = shift;
- my %h;
-
- open(F,$path) || die "Can't open values file $path";
-
- while(<F>){
-
- chop;
-
- s/#.*$//g;
- s/\"//g;
-
- next if ! $_;
-
- @column = split(/,/,$_);
-
- my $value_name = $column[0];
-
- my $c_type_str = $column[1];
- my $c_autogen = ($c_type_str =~ /\(a\)/);
-
- my $c_type = $c_type_str;
- $c_type =~ s/\(.\)//;
-
- my $python_type = $column[2];
- my $components = $column[3];
- my $enum_values = $column[4];
-
- my @components;
- if($components ne "unitary"){
- @components = split(/;/,$components);
- } else {
- @components = ();
- }
-
- my @enums;
- if($enum_values) {
- @enums = split(/;/,$enum_values);
-
- } else {
- @enums = ();
- }
-
- $h{$value_name} = { C => [$c_autogen,$c_type],
- perl => $perl_type,
- python => $python_type,
- components=>[@components],
- enums=>[@enums]
- };
- }
-
- return %h;
-}
-
-sub read_properties_file {
-
- my $path = shift;
- my %h;
-
- open(F,$path) || die "Can't open properties file $path";
-
- while(<F>){
-
- chop;
-
- s/#.*$//g;
- s/\"//g;
-
- next if ! $_;
-
- @column = split(/,/,$_);
-
- my $property_name = $column[0];
-
- my $lic_value = $column[1];
- my $default_value = $column[2];
-
- $h{$property_name} = { lic_value => $lic_value,
- default_value => $default_value
- };
- }
-
- return %h;
-}
-
-sub read_parameters_file {
-
- my $path = shift;
- my %h;
-
- open(F,$path) || die "Can't open parameters file $path";
-
- while(<F>){
-
- chop;
-
- s/#.*$//g;
- s/\"//g;
-
- next if ! $_;
-
- @column = split(/\,/,$_);
-
- my $parameter_name = $column[0];
-
- my $data_type = $column[1];
- my $enum_string = $column[2];
-
- my @enums;
- if($enum_string){
- @enums = split(/;/,$enum_string);
- }
-
- $h{$parameter_name} = { C => $data_type,
- enums => [@enums]
- };
- }
-
- close(F);
-
- return %h;
-}
-
-
-
-1;
diff --git a/libical/src/.cvsignore b/libical/src/.cvsignore
deleted file mode 100644
index c038ed7864..0000000000
--- a/libical/src/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in \ No newline at end of file
diff --git a/libical/src/Makefile.am b/libical/src/Makefile.am
deleted file mode 100644
index d6ba22c548..0000000000
--- a/libical/src/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-if WITH_PYTHON
-PYTHON_DIR = python
-else
-PYTHON_DIR =
-endif
-
-SUBDIRS = libical libicalss libicalvcal # $(PYTHON_DIR) test
diff --git a/libical/src/libical/.cvsignore b/libical/src/libical/.cvsignore
deleted file mode 100644
index ef04480fde..0000000000
--- a/libical/src/libical/.cvsignore
+++ /dev/null
@@ -1,22 +0,0 @@
-Makefile
-Makefile.in
-icalitipy.c
-icalitipy.h
-icalitipl.c
-icallexer.c
-icalyacc.c
-icalyacc.h
-y.output
-*.lo
-*.la
-.libs
-.deps
-icalversion.h
-ical.h
-icalderivedparameter.c
-icalderivedparameter.h
-icalderivedproperty.c
-icalderivedproperty.h
-icalderivedvalue.h
-icalderivedvalue.c
-icalrestriction.c
diff --git a/libical/src/libical/Makefile.am b/libical/src/libical/Makefile.am
deleted file mode 100644
index e27f77e5ba..0000000000
--- a/libical/src/libical/Makefile.am
+++ /dev/null
@@ -1,237 +0,0 @@
-#======================================================================
-# FILE: Makefile.am
-# CREATOR: eric
-#
-# $Id: Makefile.am,v 1.31 2001/09/10 21:54:44 federico Exp $
-#
-#
-# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# The original code is icalcomponent.c
-#
-#======================================================================
-
-
-DESIGNDATA = $(top_srcdir)/design-data
-ICALSCRIPTS = $(top_srcdir)/scripts
-
-lib_LTLIBRARIES = libical.la
-
-noinst_LTLIBRARIES = libical-static.la
-libical_static_la_SOURCES = $(libical_la_SOURCES)
-libical_static_la_LDFLAGS = --all-static
-
-YFLAGS = -d -v -t -pical_yy
-LFLAGS = -Pical_yy
-LEX_OUTPUT_ROOT = lex.ical_yy
-
-CPPFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
-
-all: ical.h
-
-INCLUDES = \
- -I$(top_builddir) \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src \
- -I$(srcdir)
-
-libical_la_LDFLAGS = -version-info 0:0:0
-
-libical_la_SOURCES = \
- $(BUILT_SOURCES) \
- icalarray.c \
- icalarray.h \
- icalattendee.h \
- icalattendee.c \
- icalcomponent.c \
- icalcomponent.h \
- icalenums.c \
- icalenums.h \
- icalerror.c \
- icalerror.h \
- icallexer.l \
- icalmemory.c \
- icalmemory.h \
- icalmime.c \
- icalmime.h \
- icalparameter.c \
- icalparameter.h \
- icalparameterimpl.h \
- icalparser.c \
- icalparser.h \
- icalproperty.c \
- icalproperty.h \
- icalrecur.c \
- icalrecur.h \
- icalrestriction.h \
- icaltime.c \
- icaltime.h \
- icaltimezone.c \
- icaltimezone.h \
- icalduration.h \
- icalduration.c \
- icalperiod.h \
- icalperiod.c \
- icaltypes.c \
- icaltypes.h \
- icalvalue.c \
- icalvalue.h \
- icalvalueimpl.h \
- icalyacc.h \
- icalyacc.y \
- pvl.c \
- pvl.h \
- sspm.c \
- sspm.h \
- vsnprintf.c \
- icallangbind.h \
- icallangbind.c
-
-libicalincludedir = $(includedir)
-
-libicalinclude_HEADERS = ical.h
-
-# ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It
-# is required to make the combined header ical.h properly
-COMBINEDHEADERS = \
- $(top_builddir)/src/libical/icalversion.h \
- $(top_srcdir)/src/libical/icaltime.h \
- $(top_srcdir)/src/libical/icalduration.h \
- $(top_srcdir)/src/libical/icalperiod.h \
- $(top_srcdir)/src/libical/icalenums.h \
- $(top_srcdir)/src/libical/icaltypes.h \
- $(top_srcdir)/src/libical/icalrecur.h \
- icalderivedvalue.h \
- icalderivedparameter.h \
- $(top_srcdir)/src/libical/icalvalue.h \
- $(top_srcdir)/src/libical/icalparameter.h \
- icalderivedproperty.h \
- $(top_srcdir)/src/libical/icalproperty.h \
- $(top_srcdir)/src/libical/icalattendee.h \
- $(top_srcdir)/src/libical/pvl.h \
- $(top_srcdir)/src/libical/icalarray.h \
- $(top_srcdir)/src/libical/icalcomponent.h \
- $(top_srcdir)/src/libical/icaltimezone.h \
- $(top_srcdir)/src/libical/icalparser.h \
- $(top_srcdir)/src/libical/icalmemory.h \
- $(top_srcdir)/src/libical/icalerror.h \
- $(top_srcdir)/src/libical/icalrestriction.h \
- $(top_srcdir)/src/libical/sspm.h \
- $(top_srcdir)/src/libical/icalmime.h \
- $(top_srcdir)/src/libical/icallangbind.h
-
-BUILT_COMBINEDHEADERS = \
- icalderivedparameter.h \
- icalderivedproperty.h \
- icalderivedvalue.h
-
-BUILT_SOURCES = \
- $(BUILT_COMBINEDHEADERS)\
- icalderivedparameter.c \
- icalderivedproperty.c \
- icalrestriction.c \
- icalderivedvalue.c
-
-ical.h: $(COMBINEDHEADERS)
- cat $(COMBINEDHEADERS) \
- | egrep -v "#include.*\"ical" \
- | egrep -v "#include.*\"pvl\.h\"" > ical.h
-
-icallexer.c : icalyacc.h
-
-
-# parameters
-
-PARAMETERDEPS = \
- $(ICALSCRIPTS)/mkderivedparameters.pl \
- $(DESIGNDATA)/parameters.csv \
- icalderivedparameter.c.in \
- icalderivedparameter.h.in
-
-icalderivedparameter.h: $(PARAMETERDEPS)
- $(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h
-
-icalderivedparameter.c: $(PARAMETERDEPS) $(BUILT_COMBINEDHEADERS)
- $(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c
-
-# properties
-
-PROPERTYDEPS = \
- $(ICALSCRIPTS)/mkderivedproperties.pl \
- $(DESIGNDATA)/properties.csv \
- $(DESIGNDATA)/value-types.csv \
- icalderivedproperty.c.in \
- icalderivedproperty.h.in
-
-
-icalderivedproperty.h: $(PROPERTYDEPS)
- $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
- -i $(srcdir)/icalderivedproperty.h.in -h $(DESIGNDATA)/properties.csv\
- ${DESIGNDATA}/value-types.csv > icalderivedproperty.h
-
-icalderivedproperty.c: $(PROPERTYDEPS) $(BUILT_COMBINEDHEADERS)
- $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
- -i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \
- ${DESIGNDATA}/value-types.csv > icalderivedproperty.c
-
-# restrictions
-
-RESTRICTIONDEPS = \
- $(ICALSCRIPTS)/mkrestrictiontable.pl \
- $(DESIGNDATA)/restrictions.csv \
- icalrestriction.c.in
-
-icalrestriction.c: $(RESTRICTIONDEPS)
- $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \
- $(DESIGNDATA)/restrictions.csv > icalrestriction.c
-
-# values
-
-VALUEDEPS = \
- $(ICALSCRIPTS)/mkderivedvalues.pl \
- $(DESIGNDATA)/value-types.csv \
- icalderivedvalue.c.in \
- icalderivedvalue.h.in
-
-icalderivedvalue.h: $(VALUEDEPS)
- $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
- -i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h
-
-icalderivedvalue.c: $(VALUEDEPS) $(BUILT_COMBINEDHEADERS)
- $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
- -i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c
-
-
-
-# housekeeping
-CONFIG_CLEAN_FILES = y.output
-
-CLEANFILES += $(BUILT_SOURCES) ical.h
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
- cd $(distdir); rm -f ical.h
-
-EXTRA_DIST = \
- icalderivedparameter.c.in \
- icalderivedparameter.h.in \
- icalderivedproperty.c.in \
- icalderivedproperty.h.in \
- icalrestriction.c.in \
- icalderivedvalue.c.in \
- icalderivedvalue.h.in \
- icalversion.h.in \
- icallexer.c \
- icalyacc.c
-
diff --git a/libical/src/libical/icalarray.c b/libical/src/libical/icalarray.c
deleted file mode 100644
index 9aea671b64..0000000000
--- a/libical/src/libical/icalarray.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*-
- ======================================================================
- FILE: icalarray.c
- CREATOR: Damon Chaplin 07 March 2001
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2001, Ximian, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "icalarray.h"
-#include "icalerror.h"
-
-
-static void icalarray_expand (icalarray *array,
- int space_needed);
-
-
-icalarray*
-icalarray_new (int element_size,
- int increment_size)
-{
- icalarray *array;
-
- array = (icalarray*) malloc (sizeof (icalarray));
- if (!array) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return NULL;
- }
-
- array->element_size = element_size;
- array->increment_size = increment_size;
- array->num_elements = 0;
- array->space_allocated = 0;
- array->data = NULL;
-
- return array;
-}
-
-
-void
-icalarray_free (icalarray *array)
-{
- if (array->data)
- free (array->data);
- free (array);
-}
-
-
-void
-icalarray_append (icalarray *array,
- void *element)
-{
- if (array->num_elements >= array->space_allocated)
- icalarray_expand (array, 1);
-
- memcpy (array->data + array->num_elements * array->element_size, element,
- array->element_size);
- array->num_elements++;
-}
-
-
-void*
-icalarray_element_at (icalarray *array,
- int position)
-{
- assert (position >= 0);
- assert (position < array->num_elements);
-
- return array->data + position * array->element_size;
-}
-
-
-void
-icalarray_remove_element_at (icalarray *array,
- int position)
-{
- void *dest;
- int elements_to_move;
-
- assert (position >= 0);
- assert (position < array->num_elements);
-
- dest = array->data + position * array->element_size;
- elements_to_move = array->num_elements - position - 1;
-
- if (elements_to_move > 0)
- memmove (dest, dest + array->element_size,
- elements_to_move * array->element_size);
-
- array->num_elements--;
-}
-
-
-void
-icalarray_sort (icalarray *array,
- int (*compare) (const void *,
- const void *))
-{
- qsort (array->data, array->num_elements, array->element_size, compare);
-}
-
-
-static void
-icalarray_expand (icalarray *array,
- int space_needed)
-{
- int new_space_allocated;
- void *new_data;
-
- new_space_allocated = array->space_allocated + array->increment_size;
-
- if (space_needed > array->increment_size)
- new_space_allocated += space_needed;
-
- new_data = realloc (array->data,
- new_space_allocated * array->element_size);
- if (new_data) {
- array->data = new_data;
- array->space_allocated = new_space_allocated;
- } else {
- icalerror_set_errno(ICAL_ALLOCATION_ERROR);
- }
-}
-
-
diff --git a/libical/src/libical/icalarray.h b/libical/src/libical/icalarray.h
deleted file mode 100644
index cbf72688da..0000000000
--- a/libical/src/libical/icalarray.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*======================================================================
- FILE: icalarray.h
- CREATOR: Damon Chaplin 07 March 2001
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2001, Ximian, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
-======================================================================*/
-
-
-#ifndef ICALARRAY_H
-#define ICALARRAY_H
-
-/* An array of arbitrarily-sized elements which grows dynamically as elements
- are added. */
-
-
-typedef struct _icalarray icalarray;
-struct _icalarray {
- int element_size;
- int increment_size;
- int num_elements;
- int space_allocated;
- void *data;
-};
-
-
-
-icalarray *icalarray_new (int element_size,
- int increment_size);
-void icalarray_free (icalarray *array);
-
-void icalarray_append (icalarray *array,
- void *element);
-void icalarray_remove_element_at (icalarray *array,
- int position);
-
-void *icalarray_element_at (icalarray *array,
- int position);
-
-void icalarray_sort (icalarray *array,
- int (*compare) (const void *, const void *));
-
-
-#endif /* ICALARRAY_H */
diff --git a/libical/src/libical/icalattendee.c b/libical/src/libical/icalattendee.c
deleted file mode 100644
index 30cb949c40..0000000000
--- a/libical/src/libical/icalattendee.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalattendee.c
- CREATOR: eric 08 Mar 01
-
- $Id$
- $Locker$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icaltypes.c
-
- ======================================================================*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalattendee.h"
diff --git a/libical/src/libical/icalattendee.h b/libical/src/libical/icalattendee.h
deleted file mode 100644
index 023b30734c..0000000000
--- a/libical/src/libical/icalattendee.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalattendee.h
- CREATOR: eric 8 Mar 01
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icaltypes.h
-
-======================================================================*/
-
-#ifndef ICALATTENDEE_H
-#define ICALATTENDEE_H
-
-#include <time.h>
-#include "icalenums.h"
-#include "icaltime.h"
-#include "icalduration.h"
-#include "icalperiod.h"
-#include "icalderivedparameter.h"
-#include "icalderivedvalue.h"
-
-struct icalorganizertype {
- const char* value;
- const char* common_name;
- const char* dir;
- const char* sentby;
- const char* language;
-
-};
-
-/* Create a copy of the given organizer. Libical will not own the
- memory for the strings in the copy; the call must free them */
-struct icalorganizertype icalorganizertype_new_clone(struct icalorganizertype a);
-
-
-struct icalattendeetype {
- const char* cuid; /* Cal user id, contents of the property value */
- /*icalparameter_cutype cutype;*/
- const char* member;
- /*icalparameter_role role;*/
- int rsvp;
- const char* delto;
- const char* delfrom;
- const char* sentby;
- const char* cn;
- const char* dir;
- const char* language;
-};
-
-/* Create a copy of the given attendee. Libical will not own the
- memory for the strings in the copy; the call must free them */
-struct icalattendeetype icalattendeetype_new_clone(struct icalattendeetype a);
-
-
-#endif /* !ICALATTENDEE_H */
diff --git a/libical/src/libical/icalcomponent.c b/libical/src/libical/icalcomponent.c
deleted file mode 100644
index 4829034f28..0000000000
--- a/libical/src/libical/icalcomponent.c
+++ /dev/null
@@ -1,1932 +0,0 @@
-/*======================================================================
- FILE: icalcomponent.c
- CREATOR: eric 28 April 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalcomponent.c
-
-======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalcomponent.h"
-#include "pvl.h" /* "Pointer-to-void list" */
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalenums.h"
-#include "icaltime.h"
-#include "icalarray.h"
-#include "icaltimezone.h"
-#include "icalduration.h"
-#include "icalperiod.h"
-#include "icalparser.h"
-
-#include <stdlib.h> /* for malloc */
-#include <stdarg.h> /* for va_list, etc */
-#include <errno.h>
-#include <assert.h>
-#include <stdio.h> /* for fprintf */
-#include <string.h> /* for strdup */
-
-#define MAX_TMP 1024
-
-struct icalcomponent_impl
-{
- char id[5];
- icalcomponent_kind kind;
- char* x_name;
- pvl_list properties;
- pvl_elem property_iterator;
- pvl_list components;
- pvl_elem component_iterator;
- icalcomponent* parent;
-
- /* An array of icaltimezone structs. We use this so we can do fast
- lookup of timezones using binary searches. timezones_sorted is
- set to 0 whenever we add a timezone, so we remember to sort the
- array before doing a binary search. */
- icalarray* timezones;
- int timezones_sorted;
-};
-
-/* icalproperty functions that only components get to use */
-void icalproperty_set_parent(icalproperty* property,
- icalcomponent* component);
-icalcomponent* icalproperty_get_parent(icalproperty* property);
-void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args);
-icalcomponent* icalcomponent_new_impl (icalcomponent_kind kind);
-int icalcomponent_property_sorter(void *a, void *b);
-
-static void icalcomponent_merge_vtimezone (icalcomponent *comp,
- icalcomponent *vtimezone,
- icalarray *tzids_to_rename);
-static void icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp,
- icalcomponent *vtimezone,
- icalproperty *tzid_prop,
- const char *tzid,
- icalarray *tzids_to_rename);
-static int icalcomponent_get_tzid_prefix_len (const char *tzid);
-static void icalcomponent_rename_tzids(icalcomponent* comp,
- icalarray* rename_table);
-static void icalcomponent_rename_tzids_callback(icalparameter *param,
- void *data);
-static int icalcomponent_compare_vtimezones (icalcomponent *vtimezone1,
- icalcomponent *vtimezone2);
-static int icalcomponent_compare_timezone_fn (const void *elem1,
- const void *elem2);
-
-
-void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args)
-{
- void* vp;
-
- while((vp = va_arg(args, void*)) != 0) {
-
- assert (icalcomponent_isa_component(vp) != 0 ||
- icalproperty_isa_property(vp) != 0 ) ;
-
- if (icalcomponent_isa_component(vp) != 0 ){
-
- icalcomponent_add_component((icalcomponent*)impl,
- (icalcomponent*)vp);
-
- } else if (icalproperty_isa_property(vp) != 0 ){
-
- icalcomponent_add_property((icalcomponent*)impl,
- (icalproperty*)vp);
- }
- }
-}
-
-icalcomponent*
-icalcomponent_new_impl (icalcomponent_kind kind)
-{
- struct icalcomponent_impl* comp;
-
- if ( ( comp = (struct icalcomponent_impl*)
- malloc(sizeof(struct icalcomponent_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy(comp->id,"comp");
-
- comp->kind = kind;
- comp->properties = pvl_newlist();
- comp->property_iterator = 0;
- comp->components = pvl_newlist();
- comp->component_iterator = 0;
- comp->x_name = 0;
- comp->parent = 0;
- comp->timezones = NULL;
- comp->timezones_sorted = 1;
-
- return comp;
-}
-
-icalcomponent*
-icalcomponent_new (icalcomponent_kind kind)
-{
- return (icalcomponent*)icalcomponent_new_impl(kind);
-}
-
-icalcomponent*
-icalcomponent_vanew (icalcomponent_kind kind, ...)
-{
- va_list args;
-
- struct icalcomponent_impl *impl = icalcomponent_new_impl(kind);
-
- if (impl == 0){
- return 0;
- }
-
- va_start(args,kind);
- icalcomponent_add_children(impl, args);
- va_end(args);
-
- return (icalcomponent*) impl;
-}
-
-icalcomponent* icalcomponent_new_from_string(char* str)
-{
- return icalparser_parse_string(str);
-}
-
-icalcomponent* icalcomponent_new_clone(icalcomponent* component)
-{
- struct icalcomponent_impl *old = (struct icalcomponent_impl*)component;
- struct icalcomponent_impl *new;
- icalproperty *p;
- icalcomponent *c;
- pvl_elem itr;
-
- icalerror_check_arg_rz( (component!=0), "component");
-
- new = icalcomponent_new_impl(old->kind);
-
- if (new == 0){
- return 0;
- }
-
-
- for( itr = pvl_head(old->properties);
- itr != 0;
- itr = pvl_next(itr))
- {
- p = (icalproperty*)pvl_data(itr);
- icalcomponent_add_property(new,icalproperty_new_clone(p));
- }
-
-
- for( itr = pvl_head(old->components);
- itr != 0;
- itr = pvl_next(itr))
- {
- c = (icalcomponent*)pvl_data(itr);
- icalcomponent_add_component(new,icalcomponent_new_clone(c));
- }
-
- return new;
-
-}
-
-
-void
-icalcomponent_free (icalcomponent* component)
-{
- icalproperty* prop;
- icalcomponent* comp;
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
-
- icalerror_check_arg_rv( (component!=0), "component");
-
-#ifdef ICAL_FREE_ON_LIST_IS_ERROR
- icalerror_assert( (c->parent ==0),"Tried to free a component that is still attached to a parent component");
-#else
- if(c->parent != 0){
- return;
- }
-#endif
-
- if(component != 0 ){
-
- while( (prop=pvl_pop(c->properties)) != 0){
- assert(prop != 0);
- icalproperty_set_parent(prop,0);
- icalproperty_free(prop);
- }
-
- pvl_free(c->properties);
-
- while( (comp=pvl_data(pvl_head(c->components))) != 0){
- assert(comp!=0);
- icalcomponent_remove_component(component,comp);
- icalcomponent_free(comp);
- }
-
- pvl_free(c->components);
-
- if (c->x_name != 0) {
- free(c->x_name);
- }
-
- if (c->timezones)
- icaltimezone_array_free (c->timezones);
-
- c->kind = ICAL_NO_COMPONENT;
- c->properties = 0;
- c->property_iterator = 0;
- c->components = 0;
- c->component_iterator = 0;
- c->x_name = 0;
- c->id[0] = 'X';
- c->timezones = NULL;
-
- free(c);
- }
-
-}
-
-char*
-icalcomponent_as_ical_string (icalcomponent* component)
-{
- char* buf, *out_buf;
- char* tmp_buf;
- size_t buf_size = 1024;
- char* buf_ptr = 0;
- pvl_elem itr;
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
-
-#ifdef ICAL_UNIX_NEWLINE
- char newline[] = "\n";
-#else
- char newline[] = "\r\n";
-#endif
-
- icalcomponent *c;
- icalproperty *p;
- icalcomponent_kind kind = icalcomponent_isa(component);
-
- const char* kind_string;
-
- buf = icalmemory_new_buffer(buf_size);
- buf_ptr = buf;
-
- icalerror_check_arg_rz( (component!=0), "component");
- icalerror_check_arg_rz( (kind!=ICAL_NO_COMPONENT), "component kind is ICAL_NO_COMPONENT");
-
- kind_string = icalenum_component_kind_to_string(kind);
-
- icalerror_check_arg_rz( (kind_string!=0),"Unknown kind of component");
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string);
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
-
-
-
- for( itr = pvl_head(impl->properties);
- itr != 0;
- itr = pvl_next(itr))
- {
- p = (icalproperty*)pvl_data(itr);
-
- icalerror_assert((p!=0),"Got a null property");
- tmp_buf = icalproperty_as_ical_string(p);
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, tmp_buf);
- }
-
-
- for( itr = pvl_head(impl->components);
- itr != 0;
- itr = pvl_next(itr))
- {
- c = (icalcomponent*)pvl_data(itr);
-
- tmp_buf = icalcomponent_as_ical_string(c);
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, tmp_buf);
-
- }
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size,
- icalenum_component_kind_to_string(kind));
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
-
- out_buf = icalmemory_tmp_copy(buf);
- free(buf);
-
- return out_buf;
-}
-
-
-int
-icalcomponent_is_valid (icalcomponent* component)
-{
- struct icalcomponent_impl *impl = (struct icalcomponent_impl *)component;
-
-
- if ( (strcmp(impl->id,"comp") == 0) &&
- impl->kind != ICAL_NO_COMPONENT){
- return 1;
- } else {
- return 0;
- }
-
-}
-
-
-icalcomponent_kind
-icalcomponent_isa (icalcomponent* component)
-{
- struct icalcomponent_impl *impl = (struct icalcomponent_impl *)component;
- icalerror_check_arg_rz( (component!=0), "component");
-
- if(component != 0)
- {
- return impl->kind;
- }
-
- return ICAL_NO_COMPONENT;
-}
-
-
-int
-icalcomponent_isa_component (void* component)
-{
- struct icalcomponent_impl *impl = (struct icalcomponent_impl *)component;
-
- icalerror_check_arg_rz( (component!=0), "component");
-
- if (strcmp(impl->id,"comp") == 0) {
- return 1;
- } else {
- return 0;
- }
-
-}
-
-int icalcomponent_property_sorter(void *a, void *b)
-{
- icalproperty_kind kinda, kindb;
- const char *ksa, *ksb;
-
- kinda = icalproperty_isa((icalproperty*)a);
- kindb = icalproperty_isa((icalproperty*)b);
-
- ksa = icalenum_property_kind_to_string(kinda);
- ksb = icalenum_property_kind_to_string(kindb);
-
- return strcmp(ksa,ksb);
-}
-
-
-void
-icalcomponent_add_property (icalcomponent* component, icalproperty* property)
-{
- struct icalcomponent_impl *impl;
-
- icalerror_check_arg_rv( (component!=0), "component");
- icalerror_check_arg_rv( (property!=0), "property");
-
- impl = (struct icalcomponent_impl*)component;
-
- icalerror_assert( (!icalproperty_get_parent(property)),"The property has already been added to a component. Remove the property with icalcomponent_remove_property before calling icalcomponent_add_property");
-
- icalproperty_set_parent(property,component);
-
-#ifdef ICAL_INSERT_ORDERED
- pvl_insert_ordered(impl->properties,
- icalcomponent_property_sorter,property);
-#else
- pvl_push(impl->properties,property);
-#endif
-
-}
-
-
-void
-icalcomponent_remove_property (icalcomponent* component, icalproperty* property)
-{
- struct icalcomponent_impl *impl;
- pvl_elem itr, next_itr;
- struct icalproperty_impl *pimpl;
-
- icalerror_check_arg_rv( (component!=0), "component");
- icalerror_check_arg_rv( (property!=0), "property");
-
- impl = (struct icalcomponent_impl*)component;
-
- pimpl = (struct icalproperty_impl*)property;
-
- icalerror_assert( (icalproperty_get_parent(property)),"The property is not a member of a component");
-
-
- for( itr = pvl_head(impl->properties);
- itr != 0;
- itr = next_itr)
- {
- next_itr = pvl_next(itr);
-
- if( pvl_data(itr) == (void*)property ){
-
- if (impl->property_iterator == itr){
- impl->property_iterator = pvl_next(itr);
- }
-
- pvl_remove( impl->properties, itr);
- icalproperty_set_parent(property,0);
- }
- }
-}
-
-int
-icalcomponent_count_properties (icalcomponent* component,
- icalproperty_kind kind)
-{
- int count=0;
- pvl_elem itr;
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
-
- icalerror_check_arg_rz( (component!=0), "component");
-
- for( itr = pvl_head(impl->properties);
- itr != 0;
- itr = pvl_next(itr))
- {
- if(kind == icalproperty_isa((icalproperty*)pvl_data(itr)) ||
- kind == ICAL_ANY_PROPERTY){
- count++;
- }
- }
-
-
- return count;
-
-}
-
-icalproperty* icalcomponent_get_current_property (icalcomponent* component)
-{
-
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
- icalerror_check_arg_rz( (component!=0),"component");
-
- if ((c->property_iterator==0)){
- return 0;
- }
-
- return (icalproperty*) pvl_data(c->property_iterator);
-
-}
-
-icalproperty*
-icalcomponent_get_first_property (icalcomponent* component, icalproperty_kind kind)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
- icalerror_check_arg_rz( (component!=0),"component");
-
- for( c->property_iterator = pvl_head(c->properties);
- c->property_iterator != 0;
- c->property_iterator = pvl_next(c->property_iterator)) {
-
- icalproperty *p = (icalproperty*) pvl_data(c->property_iterator);
-
- if (icalproperty_isa(p) == kind || kind == ICAL_ANY_PROPERTY) {
-
- return p;
- }
- }
- return 0;
-}
-
-icalproperty*
-icalcomponent_get_next_property (icalcomponent* component, icalproperty_kind kind)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
- icalerror_check_arg_rz( (component!=0),"component");
-
- if (c->property_iterator == 0){
- return 0;
- }
-
- for( c->property_iterator = pvl_next(c->property_iterator);
- c->property_iterator != 0;
- c->property_iterator = pvl_next(c->property_iterator)) {
-
- icalproperty *p = (icalproperty*) pvl_data(c->property_iterator);
-
- if (icalproperty_isa(p) == kind || kind == ICAL_ANY_PROPERTY) {
-
- return p;
- }
- }
-
- return 0;
-}
-
-
-icalproperty**
-icalcomponent_get_properties (icalcomponent* component, icalproperty_kind kind);
-
-
-void
-icalcomponent_add_component (icalcomponent* parent, icalcomponent* child)
-{
- struct icalcomponent_impl *impl, *cimpl;
-
- icalerror_check_arg_rv( (parent!=0), "parent");
- icalerror_check_arg_rv( (child!=0), "child");
-
- impl = (struct icalcomponent_impl*)parent;
- cimpl = (struct icalcomponent_impl*)child;
-
- icalerror_assert( (cimpl->parent ==0),"The child component has already been added to a parent component. Remove the component with icalcomponent_remove_component before calling icalcomponent_add_component");
-
- cimpl->parent = parent;
-
- pvl_push(impl->components,child);
-
- /* If the new component is a VTIMEZONE, add it to our array. */
- if (cimpl->kind == ICAL_VTIMEZONE_COMPONENT) {
- /* FIXME: Currently we are also creating this array when loading in
- a builtin VTIMEZONE, when we don't need it. */
- if (!impl->timezones)
- impl->timezones = icaltimezone_array_new ();
-
- icaltimezone_array_append_from_vtimezone (impl->timezones, child);
-
- /* Flag that we need to sort it before doing any binary searches. */
- impl->timezones_sorted = 0;
- }
-}
-
-
-void
-icalcomponent_remove_component (icalcomponent* parent, icalcomponent* child)
-{
- struct icalcomponent_impl *impl,*cimpl;
- pvl_elem itr, next_itr;
-
- icalerror_check_arg_rv( (parent!=0), "parent");
- icalerror_check_arg_rv( (child!=0), "child");
-
- impl = (struct icalcomponent_impl*)parent;
- cimpl = (struct icalcomponent_impl*)child;
-
- /* If the component is a VTIMEZONE, remove it from our array as well. */
- if (cimpl->kind == ICAL_VTIMEZONE_COMPONENT) {
- icaltimezone *zone;
- int i, num_elements;
-
- num_elements = impl->timezones ? impl->timezones->num_elements : 0;
- for (i = 0; i < num_elements; i++) {
- zone = icalarray_element_at (impl->timezones, i);
- if (icaltimezone_get_component (zone) == child) {
- icaltimezone_free (zone, 0);
- icalarray_remove_element_at (impl->timezones, i);
- break;
- }
- }
- }
-
- for( itr = pvl_head(impl->components);
- itr != 0;
- itr = next_itr)
- {
- next_itr = pvl_next(itr);
-
- if( pvl_data(itr) == (void*)child ){
-
- if (impl->component_iterator == itr){
- /* Don't let the current iterator become invalid */
-
- /* HACK. The semantics for this are troubling. */
- impl->component_iterator =
- pvl_next(impl->component_iterator);
-
- }
- pvl_remove( impl->components, itr);
- cimpl->parent = 0;
- break;
- }
- }
-}
-
-
-int
-icalcomponent_count_components (icalcomponent* component,
- icalcomponent_kind kind)
-{
- int count=0;
- pvl_elem itr;
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
-
- icalerror_check_arg_rz( (component!=0), "component");
-
- for( itr = pvl_head(impl->components);
- itr != 0;
- itr = pvl_next(itr))
- {
- if(kind == icalcomponent_isa((icalcomponent*)pvl_data(itr)) ||
- kind == ICAL_ANY_COMPONENT){
- count++;
- }
- }
-
- return count;
-}
-
-icalcomponent*
-icalcomponent_get_current_component(icalcomponent* component)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
-
- icalerror_check_arg_rz( (component!=0),"component");
-
- if (c->component_iterator == 0){
- return 0;
- }
-
- return (icalcomponent*) pvl_data(c->component_iterator);
-}
-
-icalcomponent*
-icalcomponent_get_first_component (icalcomponent* component,
- icalcomponent_kind kind)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
-
- icalerror_check_arg_rz( (component!=0),"component");
-
- for( c->component_iterator = pvl_head(c->components);
- c->component_iterator != 0;
- c->component_iterator = pvl_next(c->component_iterator)) {
-
- icalcomponent *p = (icalcomponent*) pvl_data(c->component_iterator);
-
- if (icalcomponent_isa(p) == kind || kind == ICAL_ANY_COMPONENT) {
-
- return p;
- }
- }
-
- return 0;
-}
-
-
-icalcomponent*
-icalcomponent_get_next_component (icalcomponent* component, icalcomponent_kind kind)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
-
- icalerror_check_arg_rz( (component!=0),"component");
-
- if (c->component_iterator == 0){
- return 0;
- }
-
- for( c->component_iterator = pvl_next(c->component_iterator);
- c->component_iterator != 0;
- c->component_iterator = pvl_next(c->component_iterator)) {
-
- icalcomponent *p = (icalcomponent*) pvl_data(c->component_iterator);
-
- if (icalcomponent_isa(p) == kind || kind == ICAL_ANY_COMPONENT) {
-
- return p;
- }
- }
-
- return 0;
-}
-
-icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c)
-{
- icalcomponent *comp;
-
- for(comp = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT);
- comp != 0;
- comp = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT)){
-
- icalcomponent_kind kind = icalcomponent_isa(comp);
-
- if(kind == ICAL_VEVENT_COMPONENT ||
- kind == ICAL_VTODO_COMPONENT ||
- kind == ICAL_VJOURNAL_COMPONENT ){
- return comp;
- }
- }
- return 0;
-}
-
-struct icaltime_span icalcomponent_get_span(icalcomponent* comp)
-{
- icalcomponent *inner;
- icalproperty *p, *duration;
- icalcomponent_kind kind;
- struct icaltime_span span;
- struct icaltimetype start;
-
- span.start = 0;
- span.end = 0;
- span.is_busy= 1;
-
- /* initial Error checking */
-
-/* icalerror_check_arg_rz( (comp!=0),"comp");*/
-
- kind = icalcomponent_isa(comp);
-
- if(kind == ICAL_VCALENDAR_COMPONENT){
- inner = icalcomponent_get_first_real_component(comp);
-
- /* Maybe there is a VTIMEZONE in there */
- if (inner == 0){
- inner = icalcomponent_get_first_component(comp,
- ICAL_VTIMEZONE_COMPONENT);
- }
-
- } else {
- inner = comp;
- }
-
- if (inner == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- /*icalerror_warn("icalcomponent_get_span: no component specified, or empty VCALENDAR component");*/
- return span;
- }
-
- kind = icalcomponent_isa(inner);
-
- if( !( kind == ICAL_VEVENT_COMPONENT ||
- kind == ICAL_VJOURNAL_COMPONENT ||
- kind == ICAL_VTODO_COMPONENT ||
- kind == ICAL_VFREEBUSY_COMPONENT )) {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- /*icalerror_warn("icalcomponent_get_span: no component specified, or empty VCALENDAR component");*/
- return span;
-
- }
-
-
-
- /* Get to work. starting with DTSTART */
-
- p = icalcomponent_get_first_property(inner, ICAL_DTSTART_PROPERTY);
-
- if (p ==0 ) {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- /*icalerror_warn("icalcomponent_get_span: component has no DTSTART time");*/
- return span;
- }
-
-
- start = icalproperty_get_dtstart(p);
-
- icalerror_clear_errno();
-
- /* FIXME: Needs updating to new icaltimezone functions. */
-#if 0
- span.start = icalcomponent_convert_time(p);
-#endif
-
-#ifdef TEST_CONVERT_TIME
- printf("convert time:\n %s %s",
- icalproperty_as_ical_string(p), ctime(&span.start));
-#endif
-
- if(icalerrno != ICAL_NO_ERROR){
- span.start = 0;
- return span;
- }
-
- /* The end time could be specified as either a DTEND or a DURATION */
- p = icalcomponent_get_first_property(inner, ICAL_DTEND_PROPERTY);
- duration = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY);
-
- if (p==0 && duration == 0 && start.is_date != 1) {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- /*icalerror_warn("icalcomponent_get_span: component has neither DTEND nor DURATION time");*/
- span.start = 0;
- return span;
- }
-
- if (p!=0){
- /* FIXME: Needs updating to new icaltimezone functions. */
-#if 0
- span.end = icalcomponent_convert_time(p);
-#endif
- } else if (start.is_date == 1) {
- /* Duration is all day */
- span.end = span.start + 60*60*24;
- } else {
- /* Use the duration */
- struct icaldurationtype dur;
- time_t durt;
-
-
- dur = icalproperty_get_duration(duration);
-
- durt = icaldurationtype_as_int(dur);
- span.end = span.start+durt;
- }
-
- return span;
-
-}
-
-
-int icalcomponent_count_errors(icalcomponent* component)
-{
- int errors = 0;
- icalproperty *p;
- icalcomponent *c;
- pvl_elem itr;
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
-
- for( itr = pvl_head(impl->properties);
- itr != 0;
- itr = pvl_next(itr))
- {
- p = (icalproperty*)pvl_data(itr);
-
- if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY)
- {
- errors++;
- }
- }
-
-
- for( itr = pvl_head(impl->components);
- itr != 0;
- itr = pvl_next(itr))
- {
- c = (icalcomponent*)pvl_data(itr);
-
- errors += icalcomponent_count_errors(c);
-
- }
-
- return errors;
-}
-
-
-void icalcomponent_strip_errors(icalcomponent* component)
-{
- icalproperty *p;
- icalcomponent *c;
- pvl_elem itr, next_itr;
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
-
- for( itr = pvl_head(impl->properties);
- itr != 0;
- itr = next_itr)
- {
- p = (icalproperty*)pvl_data(itr);
- next_itr = pvl_next(itr);
-
- if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY)
- {
- icalcomponent_remove_property(component,p);
- }
- }
-
- for( itr = pvl_head(impl->components);
- itr != 0;
- itr = pvl_next(itr))
- {
- c = (icalcomponent*)pvl_data(itr);
- icalcomponent_strip_errors(c);
- }
-}
-
-/* Hack. This will change the state of the iterators */
-void icalcomponent_convert_errors(icalcomponent* component)
-{
- icalproperty *p, *next_p;
- icalcomponent *c;
-
- for(p = icalcomponent_get_first_property(component,ICAL_ANY_PROPERTY);
- p != 0;
- p = next_p){
-
- next_p = icalcomponent_get_next_property(component,ICAL_ANY_PROPERTY);
-
- if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY)
- {
- struct icalreqstattype rst;
- icalparameter *param = icalproperty_get_first_parameter
- (p,ICAL_XLICERRORTYPE_PARAMETER);
-
- rst.code = ICAL_UNKNOWN_STATUS;
- rst.desc = 0;
-
- switch(icalparameter_get_xlicerrortype(param)){
-
- case ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR: {
- rst.code = ICAL_3_2_INVPARAM_STATUS;
- break;
- }
- case ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR: {
- rst.code = ICAL_3_3_INVPARAMVAL_STATUS;
- break;
- }
- case ICAL_XLICERRORTYPE_PROPERTYPARSEERROR: {
- rst.code = ICAL_3_0_INVPROPNAME_STATUS;
- break;
- }
- case ICAL_XLICERRORTYPE_VALUEPARSEERROR: {
- rst.code = ICAL_3_1_INVPROPVAL_STATUS;
- break;
- }
- case ICAL_XLICERRORTYPE_COMPONENTPARSEERROR: {
- rst.code = ICAL_3_4_INVCOMP_STATUS;
- break;
- }
-
- default: {
- }
- }
- if (rst.code != ICAL_UNKNOWN_STATUS){
-
- rst.debug = icalproperty_get_xlicerror(p);
- icalcomponent_add_property(component,
- icalproperty_new_requeststatus(
- icalreqstattype_as_string(rst)
- )
- );
-
- icalcomponent_remove_property(component,p);
- }
- }
- }
-
- for(c = icalcomponent_get_first_component(component,ICAL_ANY_COMPONENT);
- c != 0;
- c = icalcomponent_get_next_component(component,ICAL_ANY_COMPONENT)){
-
- icalcomponent_convert_errors(c);
- }
-}
-
-
-icalcomponent* icalcomponent_get_parent(icalcomponent* component)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
-
- return c->parent;
-}
-
-void icalcomponent_set_parent(icalcomponent* component, icalcomponent* parent)
-{
- struct icalcomponent_impl *c = (struct icalcomponent_impl*)component;
-
- c->parent = parent;
-}
-
-icalcompiter icalcompiter_null = {ICAL_NO_COMPONENT,0};
-
-
-struct icalcomponent_kind_map {
- icalcomponent_kind kind;
- char name[20];
-};
-
-
-
-static struct icalcomponent_kind_map component_map[] =
-{
- { ICAL_VEVENT_COMPONENT, "VEVENT" },
- { ICAL_VTODO_COMPONENT, "VTODO" },
- { ICAL_VJOURNAL_COMPONENT, "VJOURNAL" },
- { ICAL_VCALENDAR_COMPONENT, "VCALENDAR" },
- { ICAL_VFREEBUSY_COMPONENT, "VFREEBUSY" },
- { ICAL_VTIMEZONE_COMPONENT, "VTIMEZONE" },
- { ICAL_VALARM_COMPONENT, "VALARM" },
- { ICAL_XSTANDARD_COMPONENT, "STANDARD" }, /*These are part of RFC2445 */
- { ICAL_XDAYLIGHT_COMPONENT, "DAYLIGHT" }, /*but are not really components*/
- { ICAL_X_COMPONENT, "X" },
- { ICAL_VSCHEDULE_COMPONENT, "SCHEDULE" },
-
- /* CAP components */
- { ICAL_VQUERY_COMPONENT, "VQUERY" },
- { ICAL_VCAR_COMPONENT, "VCAR" },
- { ICAL_VCOMMAND_COMPONENT, "VCOMMAND" },
-
- /* libical private components */
- { ICAL_XLICINVALID_COMPONENT, "X-LIC-UNKNOWN" },
- { ICAL_XLICMIMEPART_COMPONENT, "X-LIC-MIME-PART" },
- { ICAL_ANY_COMPONENT, "ANY" },
- { ICAL_XROOT_COMPONENT, "XROOT" },
-
- /* End of list */
- { ICAL_NO_COMPONENT, "" },
-};
-
-
-
-const char* icalcomponent_kind_to_string(icalcomponent_kind kind)
-{
- int i;
-
- for (i=0; component_map[i].kind != ICAL_NO_COMPONENT; i++) {
- if (component_map[i].kind == kind) {
- return component_map[i].name;
- }
- }
-
- return 0;
-
-}
-
-icalcomponent_kind icalcomponent_string_to_kind(const char* string)
-{
- int i;
-
- if (string ==0 ) {
- return ICAL_NO_COMPONENT;
- }
-
- for (i=0; component_map[i].kind != ICAL_NO_COMPONENT; i++) {
- if (strcmp(component_map[i].name, string) == 0) {
- return component_map[i].kind;
- }
- }
-
- return ICAL_NO_COMPONENT;
-}
-
-
-
-icalcompiter
-icalcomponent_begin_component(icalcomponent* component,icalcomponent_kind kind)
-{
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
- icalcompiter itr;
- pvl_elem i;
-
- itr.kind = kind;
-
- icalerror_check_arg_re( (component!=0),"component",icalcompiter_null);
-
- for( i = pvl_head(impl->components); i != 0; i = pvl_next(i)) {
-
- icalcomponent *c = (icalcomponent*) pvl_data(i);
-
- if (icalcomponent_isa(c) == kind || kind == ICAL_ANY_COMPONENT) {
-
- itr.iter = i;
-
- return itr;
- }
- }
-
- return icalcompiter_null;
-}
-
-icalcompiter
-icalcomponent_end_component(icalcomponent* component,icalcomponent_kind kind)
-{
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
- icalcompiter itr;
- pvl_elem i;
-
- itr.kind = kind;
-
- icalerror_check_arg_re( (component!=0),"component",icalcompiter_null);
-
- for( i = pvl_tail(impl->components); i != 0; i = pvl_prior(i)) {
-
- icalcomponent *c = (icalcomponent*) pvl_data(i);
-
- if (icalcomponent_isa(c) == kind || kind == ICAL_ANY_COMPONENT) {
-
- itr.iter = pvl_next(i);
-
- return itr;
- }
- }
-
- return icalcompiter_null;;
-}
-
-
-icalcomponent* icalcompiter_next(icalcompiter* i)
-{
- if (i->iter == 0){
- return 0;
- }
-
- icalerror_check_arg_rz( (i!=0),"i");
-
- for( i->iter = pvl_next(i->iter);
- i->iter != 0;
- i->iter = pvl_next(i->iter)) {
-
- icalcomponent *c = (icalcomponent*) pvl_data(i->iter);
-
- if (icalcomponent_isa(c) == i->kind
- || i->kind == ICAL_ANY_COMPONENT) {
-
- return icalcompiter_deref(i);;
- }
- }
-
- return 0;
-
-}
-
-icalcomponent* icalcompiter_prior(icalcompiter* i)
-{
- if (i->iter == 0){
- return 0;
- }
-
- for( i->iter = pvl_prior(i->iter);
- i->iter != 0;
- i->iter = pvl_prior(i->iter)) {
-
- icalcomponent *c = (icalcomponent*) pvl_data(i->iter);
-
- if (icalcomponent_isa(c) == i->kind
- || i->kind == ICAL_ANY_COMPONENT) {
-
- return icalcompiter_deref(i);;
- }
- }
-
- return 0;
-
-}
-icalcomponent* icalcompiter_deref(icalcompiter* i)
-{
- if(i->iter ==0){
- return 0;
- }
-
- return pvl_data(i->iter);
-}
-
-icalcomponent* icalcomponent_get_inner(icalcomponent* comp)
-{
- if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){
- return icalcomponent_get_first_real_component(comp);
- } else {
- return comp;
- }
-}
-
-
-void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v)
-{
-
- icalcomponent *inner = icalcomponent_get_inner(comp);
- icalproperty *prop
- = icalcomponent_get_first_property(inner, ICAL_DTSTART_PROPERTY);
-
-
- if (prop == 0){
- prop = icalproperty_new_dtstart(v);
- icalcomponent_add_property(inner, prop);
- }
-
- icalproperty_set_dtstart(prop,v);
-
-}
-
-
-struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
- icalproperty *prop
- = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY);
-
- if (prop == 0){
- return icaltime_null_time();
- }
-
- return icalproperty_get_dtstart(prop);
-}
-
-
-struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
-
- icalproperty *end_prop
- = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
-
- icalproperty *dur_prop
- = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY);
-
-
- if( end_prop == 0 && dur_prop == 0){
- return icaltime_null_time();
- } else if ( end_prop != 0) {
- return icalproperty_get_dtend(end_prop);
- } else if ( dur_prop != 0) {
-
- struct icaltimetype start =
- icalcomponent_get_dtstart(inner);
- struct icaldurationtype duration =
- icalproperty_get_duration(dur_prop);
-
- struct icaltimetype end = icaltime_add(start,duration);
-
- return end;
-
- } else {
- /* Error, both duration and dtend have been specified */
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return icaltime_null_time();
-
- }
-
-}
-
-
-void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
-
- icalproperty *end_prop
- = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
-
- icalproperty *dur_prop
- = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY);
-
-
- if( end_prop == 0 && dur_prop == 0){
- end_prop = icalproperty_new_dtend(v);
- icalcomponent_add_property(inner,end_prop);
- } else if ( end_prop != 0) {
- icalproperty_set_dtend(end_prop,v);
- } else if ( dur_prop != 0) {
- struct icaltimetype start =
- icalcomponent_get_dtstart(inner);
-
- struct icaltimetype end =
- icalcomponent_get_dtend(inner);
-
- struct icaldurationtype dur
- = icaltime_subtract(end,start);
-
- icalproperty_set_duration(dur_prop,dur);
-
- } else {
- /* Error, both duration and dtend have been specified */
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- }
-}
-
-void icalcomponent_set_duration(icalcomponent* comp,
- struct icaldurationtype v)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
-
- icalproperty *end_prop
- = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
-
- icalproperty *dur_prop
- = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY);
-
-
- if( end_prop == 0 && dur_prop == 0){
- dur_prop = icalproperty_new_duration(v);
- icalcomponent_add_property(inner, dur_prop);
- } else if ( end_prop != 0) {
- struct icaltimetype start =
- icalcomponent_get_dtstart(inner);
-
- struct icaltimetype new_end = icaltime_add(start,v);
-
- icalproperty_set_dtend(end_prop,new_end);
-
- } else if ( dur_prop != 0) {
- icalproperty_set_duration(dur_prop,v);
- } else {
- /* Error, both duration and dtend have been specified */
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- }
-}
-
-struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
-
- icalproperty *end_prop
- = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
-
- icalproperty *dur_prop
- = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY);
-
- struct icaldurationtype null_duration;
- memset(&null_duration,0,sizeof(struct icaldurationtype));
-
-
- if( end_prop == 0 && dur_prop == 0){
- return null_duration;
- } else if ( end_prop != 0) {
- struct icaltimetype start =
- icalcomponent_get_dtstart(inner);
- time_t startt = icaltime_as_timet(start);
-
- struct icaltimetype end =
- icalcomponent_get_dtend(inner);
- time_t endt = icaltime_as_timet(end);
-
- return icaldurationtype_from_int(endt-startt);
- } else if ( dur_prop != 0) {
- return icalproperty_get_duration(dur_prop);
- } else {
- /* Error, both duration and dtend have been specified */
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return null_duration;
- }
-}
-
-void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method)
-{
- icalproperty *prop
- = icalcomponent_get_first_property(comp, ICAL_METHOD_PROPERTY);
-
-
- if (prop == 0){
- prop = icalproperty_new_method(method);
- icalcomponent_add_property(comp, prop);
- }
-
- icalproperty_set_method(prop,method);
-
-}
-
-icalproperty_method icalcomponent_get_method(icalcomponent* comp)
-{
- icalproperty *prop
- = icalcomponent_get_first_property(comp,ICAL_METHOD_PROPERTY);
-
- if (prop == 0){
- return ICAL_METHOD_NONE;
- }
-
- return icalproperty_get_method(prop);
-}
-
-void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v)
-{
-
- icalcomponent *inner = icalcomponent_get_inner(comp);
- icalproperty *prop
- = icalcomponent_get_first_property(inner, ICAL_DTSTAMP_PROPERTY);
-
-
- if (prop == 0){
- prop = icalproperty_new_dtstamp(v);
- icalcomponent_add_property(inner, prop);
- }
-
- icalproperty_set_dtstamp(prop,v);
-
-}
-
-
-struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
- icalproperty *prop
- = icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY);
-
- if (prop == 0){
- return icaltime_null_time();
- }
-
- return icalproperty_get_dtstamp(prop);
-}
-
-
-void icalcomponent_set_summary(icalcomponent* comp, const char* v)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
- icalproperty *prop
- = icalcomponent_get_first_property(inner, ICAL_SUMMARY_PROPERTY);
-
- if (prop == 0){
- prop = icalproperty_new_summary(v);
- icalcomponent_add_property(inner, prop);
- }
-
- icalproperty_set_summary(prop,v);
-}
-
-
-const char* icalcomponent_get_summary(icalcomponent* comp)
-{
- icalcomponent *inner = icalcomponent_get_inner(comp);
- icalproperty *prop
- = icalcomponent_get_first_property(inner,ICAL_SUMMARY_PROPERTY);
-
- if (prop == 0){
- return 0;
- }
-
- return icalproperty_get_summary(prop);
-
-}
-
-void icalcomponent_set_comment(icalcomponent* comp, const char* v);
-const char* icalcomponent_get_comment(icalcomponent* comp);
-
-void icalcomponent_set_uid(icalcomponent* comp, const char* v);
-const char* icalcomponent_get_uid(icalcomponent* comp);
-
-void icalcomponent_set_recurrenceid(icalcomponent* comp,
- struct icaltimetype v);
-struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
-
-
-
-
-icalcomponent* icalcomponent_new_vcalendar()
-{
- return icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
-}
-icalcomponent* icalcomponent_new_vevent()
-{
- return icalcomponent_new(ICAL_VEVENT_COMPONENT);
-}
-icalcomponent* icalcomponent_new_vtodo()
-{
- return icalcomponent_new(ICAL_VTODO_COMPONENT);
-}
-icalcomponent* icalcomponent_new_vjournal()
-{
- return icalcomponent_new(ICAL_VJOURNAL_COMPONENT);
-}
-icalcomponent* icalcomponent_new_valarm()
-{
- return icalcomponent_new(ICAL_VALARM_COMPONENT);
-}
-icalcomponent* icalcomponent_new_vfreebusy()
-{
- return icalcomponent_new(ICAL_VFREEBUSY_COMPONENT);
-}
-icalcomponent* icalcomponent_new_vtimezone()
-{
- return icalcomponent_new(ICAL_VTIMEZONE_COMPONENT);
-}
-icalcomponent* icalcomponent_new_xstandard()
-{
- return icalcomponent_new(ICAL_XSTANDARD_COMPONENT);
-}
-icalcomponent* icalcomponent_new_xdaylight()
-{
- return icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT);
-}
-
-
-/*
- * Timezone stuff.
- */
-
-/* This takes 2 VCALENDAR components and merges the second one into the first,
- resolving any problems with conflicting TZIDs. comp_to_merge will no
- longer exist after calling this function. */
-void icalcomponent_merge_component(icalcomponent* comp,
- icalcomponent* comp_to_merge)
-{
- icalcomponent *subcomp, *next_subcomp;
- icalarray *tzids_to_rename;
- int i;
-
- /* Check that both components are VCALENDAR components. */
- assert (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT);
- assert (icalcomponent_isa(comp_to_merge) == ICAL_VCALENDAR_COMPONENT);
-
- /* Step through each subcomponent of comp_to_merge, looking for VTIMEZONEs.
- For each VTIMEZONE found, check if we need to add it to comp and if we
- need to rename it and all TZID references to it. */
- tzids_to_rename = icalarray_new (sizeof (char*), 16);
- subcomp = icalcomponent_get_first_component (comp_to_merge,
- ICAL_VTIMEZONE_COMPONENT);
- while (subcomp) {
- next_subcomp = icalcomponent_get_next_component (comp_to_merge,
- ICAL_VTIMEZONE_COMPONENT);
- /* This will add the VTIMEZONE to comp, if necessary, and also update
- the array of TZIDs we need to rename. */
- icalcomponent_merge_vtimezone (comp, subcomp, tzids_to_rename);
- /* FIXME: Handle possible NEWFAILED error. */
-
- subcomp = next_subcomp;
- }
-
- /* If we need to do any renaming of TZIDs, do it now. */
- if (tzids_to_rename->num_elements != 0) {
- icalcomponent_rename_tzids (comp_to_merge, tzids_to_rename);
-
- /* Now free the tzids_to_rename array. */
- for (i = 0; i < tzids_to_rename->num_elements; i++) {
- free (icalarray_element_at (tzids_to_rename, i));
- }
- icalarray_free (tzids_to_rename);
- }
-
- /* Now move all the components from comp_to_merge to comp, excluding
- VTIMEZONE components. */
- subcomp = icalcomponent_get_first_component (comp_to_merge,
- ICAL_ANY_COMPONENT);
- while (subcomp) {
- next_subcomp = icalcomponent_get_next_component (comp_to_merge,
- ICAL_ANY_COMPONENT);
- if (icalcomponent_isa(subcomp) != ICAL_VTIMEZONE_COMPONENT) {
- icalcomponent_remove_component (comp_to_merge, subcomp);
- icalcomponent_add_component (comp, subcomp);
- }
- subcomp = next_subcomp;
- }
-
- /* Free comp_to_merge. We have moved most of the subcomponents over to
- comp now. */
- icalcomponent_free (comp_to_merge);
-}
-
-
-static void icalcomponent_merge_vtimezone (icalcomponent *comp,
- icalcomponent *vtimezone,
- icalarray *tzids_to_rename)
-{
- icalproperty *tzid_prop;
- const char *tzid;
- char *tzid_copy;
- icaltimezone *existing_zone;
- icalcomponent *existing_vtimezone;
-
- /* Get the TZID of the VTIMEZONE. */
- tzid_prop = icalcomponent_get_first_property (vtimezone, ICAL_TZID_PROPERTY);
- if (!tzid_prop)
- return;
-
- tzid = icalproperty_get_tzid (tzid_prop);
- if (!tzid)
- return;
-
- /* See if there is already a VTIMEZONE in comp with the same TZID. */
- existing_zone = icalcomponent_get_timezone (comp, tzid);
-
- /* If there is no existing VTIMEZONE with the same TZID, we can just move
- the VTIMEZONE to comp and return. */
- if (!existing_zone) {
- icalcomponent_remove_component (icalcomponent_get_parent (vtimezone),
- vtimezone);
- icalcomponent_add_component (comp, vtimezone);
- return;
- }
-
- /* If the TZID has a '/' prefix, then we don't have to worry about the
- clashing TZIDs, as they are supposed to be exactly the same VTIMEZONE. */
- if (tzid[0] == '/')
- return;
-
- /* Now we have two VTIMEZONEs with the same TZID (which isn't a globally
- unique one), so we compare the VTIMEZONE components to see if they are
- the same. If they are, we don't need to do anything. We make a copy of
- the tzid, since the parameter may get modified in these calls. */
- tzid_copy = strdup (tzid);
- if (!tzid_copy) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- }
-
- existing_vtimezone = icaltimezone_get_component (existing_zone);
- if (!icalcomponent_compare_vtimezones (existing_vtimezone, vtimezone)) {
- /* FIXME: Handle possible NEWFAILED error. */
-
- /* Now we have two different VTIMEZONEs with the same TZID. */
- icalcomponent_handle_conflicting_vtimezones (comp, vtimezone, tzid_prop,
- tzid_copy, tzids_to_rename);
- }
- free (tzid_copy);
-}
-
-
-static void
-icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp,
- icalcomponent *vtimezone,
- icalproperty *tzid_prop,
- const char *tzid,
- icalarray *tzids_to_rename)
-{
- struct icalcomponent_impl *impl = (struct icalcomponent_impl*)comp;
- int tzid_len, i, suffix, max_suffix = 1, num_elements;
- char *tzid_copy, *new_tzid, suffix_buf[32];
-
- /* Find the length of the TZID without any trailing digits. */
- tzid_len = icalcomponent_get_tzid_prefix_len (tzid);
-
- /* Step through each of the VTIMEZONEs in comp. We may already have the
- clashing VTIMEZONE in the calendar, but it may have been renamed
- (i.e. a unique number added on the end of the TZID, e.g. 'London2').
- So we compare the new VTIMEZONE with any VTIMEZONEs that have the
- same prefix (e.g. 'London'). If it matches any of those, we have to
- rename the TZIDs to that TZID, else we rename to a new TZID, using
- the biggest numeric suffix found + 1. */
- num_elements = impl->timezones ? impl->timezones->num_elements : 0;
- for (i = 0; i < num_elements; i++) {
- icaltimezone *zone;
- char *existing_tzid, *existing_tzid_copy;
- int existing_tzid_len;
-
- zone = icalarray_element_at (impl->timezones, i);
- existing_tzid = icaltimezone_get_tzid (zone);
-
- /* Find the length of the TZID without any trailing digits. */
- existing_tzid_len = icalcomponent_get_tzid_prefix_len (existing_tzid);
-
- /* Check if we have the same prefix. */
- if (tzid_len == existing_tzid_len
- && !strncmp (tzid, existing_tzid, tzid_len)) {
- /* Compare the VTIMEZONEs. */
- if (icalcomponent_compare_vtimezones (icaltimezone_get_component (zone),
- vtimezone)) {
- /* The VTIMEZONEs match, so we can use the existing VTIMEZONE. But
- we have to rename TZIDs to this TZID. */
- tzid_copy = strdup (tzid);
- existing_tzid_copy = strdup (existing_tzid);
- if (!tzid_copy || !existing_tzid_copy) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- } else {
- icalarray_append (tzids_to_rename, tzid_copy);
- icalarray_append (tzids_to_rename, existing_tzid_copy);
- }
- return;
- } else {
- /* FIXME: Handle possible NEWFAILED error. */
-
- /* Convert the suffix to an integer and remember the maximum numeric
- suffix found. */
- suffix = atoi (existing_tzid + existing_tzid_len);
- if (max_suffix < suffix)
- max_suffix = suffix;
- }
- }
- }
-
- /* We didn't find a VTIMEZONE that matched, so we have to rename the TZID,
- using the maximum numerical suffix found + 1. */
- tzid_copy = strdup (tzid);
- sprintf (suffix_buf, "%i", max_suffix + 1);
- new_tzid = malloc (tzid_len + strlen (suffix_buf) + 1);
- if (!new_tzid || !tzid_copy) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- }
-
- strncpy (new_tzid, tzid, tzid_len);
- strcpy (new_tzid + tzid_len, suffix_buf);
- icalarray_append (tzids_to_rename, tzid_copy);
- icalarray_append (tzids_to_rename, new_tzid);
-}
-
-
-/* Returns the length of the TZID, without any trailing digits. */
-static int icalcomponent_get_tzid_prefix_len (const char *tzid)
-{
- int len;
- const char *p;
-
- len = strlen (tzid);
- p = tzid + len - 1;
- while (len > 0 && *p >= '0' && *p <= '9') {
- p--;
- len--;
- }
-
- return len;
-}
-
-
-/* Renames all references to the given TZIDs to a new name. rename_table
- contains pairs of strings - a current TZID, and the new TZID to rename it
- to. */
-static void icalcomponent_rename_tzids(icalcomponent* comp,
- icalarray* rename_table)
-{
- icalcomponent_foreach_tzid (comp, icalcomponent_rename_tzids_callback,
- rename_table);
-}
-
-
-static void icalcomponent_rename_tzids_callback(icalparameter *param, void *data)
-{
- icalarray *rename_table = data;
- const char *tzid;
- int i;
-
- tzid = icalparameter_get_tzid (param);
- if (!tzid)
- return;
-
- /* Step through the rename table to see if the current TZID matches
- any of the ones we want to rename. */
- for (i = 0; i < rename_table->num_elements - 1; i += 2) {
- if (!strcmp (tzid, icalarray_element_at (rename_table, i))) {
- icalparameter_set_tzid (param, icalarray_element_at (rename_table, i + 1));
- break;
- }
- }
-}
-
-
-/* Calls the given function for each TZID parameter found in the component. */
-void icalcomponent_foreach_tzid(icalcomponent* comp,
- void (*callback)(icalparameter *param, void *data),
- void *callback_data)
-{
- icalproperty *prop;
- icalproperty_kind kind;
- icalparameter *param;
- icalcomponent *subcomp;
-
- /* First look for any TZID parameters used in this component itself. */
- prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY);
- while (prop) {
- kind = icalproperty_isa (prop);
-
- /* These are the only properties that can have a TZID. Note that
- COMPLETED, CREATED, DTSTAMP & LASTMODIFIED must be in UTC. */
- if (kind == ICAL_DTSTART_PROPERTY || kind == ICAL_DTEND_PROPERTY
- || kind == ICAL_DUE_PROPERTY || kind == ICAL_EXDATE_PROPERTY
- || kind == ICAL_RDATE_PROPERTY) {
- param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
- if (param)
- (*callback) (param, callback_data);
- }
-
- prop = icalcomponent_get_next_property (comp, ICAL_ANY_PROPERTY);
- }
-
- /* Now recursively check child components. */
- subcomp = icalcomponent_get_first_component (comp, ICAL_ANY_COMPONENT);
- while (subcomp) {
- icalcomponent_foreach_tzid (subcomp, callback, callback_data);
- subcomp = icalcomponent_get_next_component (comp, ICAL_ANY_COMPONENT);
- }
-}
-
-
-
-/* Returns the icaltimezone from the component corresponding to the given
- TZID, or NULL if the component does not have a corresponding VTIMEZONE. */
-icaltimezone* icalcomponent_get_timezone(icalcomponent* comp, const char *tzid)
-{
- struct icalcomponent_impl *impl;
- icaltimezone *zone;
- int lower, upper, middle, cmp;
- char *zone_tzid;
-
- impl = (struct icalcomponent_impl*)comp;
-
- if (!impl->timezones)
- return NULL;
-
- /* Sort the array if necessary (by the TZID string). */
- if (!impl->timezones_sorted) {
- icalarray_sort (impl->timezones, icalcomponent_compare_timezone_fn);
- impl->timezones_sorted = 1;
- }
-
- /* Do a simple binary search. */
- lower = middle = 0;
- upper = impl->timezones->num_elements;
-
- while (lower < upper) {
- middle = (lower + upper) >> 1;
- zone = icalarray_element_at (impl->timezones, middle);
- zone_tzid = icaltimezone_get_tzid (zone);
- cmp = strcmp (tzid, zone_tzid);
- if (cmp == 0)
- return zone;
- else if (cmp < 0)
- upper = middle;
- else
- lower = middle + 1;
- }
-
- return NULL;
-}
-
-
-/* A function to compare 2 icaltimezone elements, used for qsort(). */
-static int icalcomponent_compare_timezone_fn (const void *elem1,
- const void *elem2)
-{
- icaltimezone *zone1, *zone2;
- const char *zone1_tzid, *zone2_tzid;
- int retval;
-
- zone1 = (icaltimezone*) elem1;
- zone2 = (icaltimezone*) elem2;
-
- zone1_tzid = icaltimezone_get_tzid (zone1);
- zone2_tzid = icaltimezone_get_tzid (zone2);
-
- return strcmp (zone1_tzid, zone2_tzid);
-}
-
-
-/* Compares 2 VTIMEZONE components to see if they match, ignoring their TZIDs.
- It returns 1 if they match, 0 if they don't, or -1 on error. */
-static int icalcomponent_compare_vtimezones (icalcomponent *vtimezone1,
- icalcomponent *vtimezone2)
-{
- icalproperty *prop1, *prop2;
- const char *tzid1, *tzid2;
- char *tzid2_copy, *string1, *string2, *string1_copy;
- int cmp;
-
- /* Get the TZID property of the first VTIMEZONE. */
- prop1 = icalcomponent_get_first_property (vtimezone1, ICAL_TZID_PROPERTY);
- if (!prop1)
- return -1;
-
- /* This returns the pointer to the actual string in the property. */
- tzid1 = icalproperty_get_tzid (prop1);
- if (!tzid1)
- return -1;
-
- /* Get the TZID property of the second VTIMEZONE. */
- prop2 = icalcomponent_get_first_property (vtimezone2, ICAL_TZID_PROPERTY);
- if (!prop2)
- return -1;
-
- /* This returns the pointer to the actual string in the property. */
- tzid2 = icalproperty_get_tzid (prop2);
- if (!tzid2)
- return -1;
-
- /* Copy the second TZID, and set the property to the same as the first
- TZID, since we don't care if these match of not. */
- tzid2_copy = strdup (tzid2);
- if (!tzid2_copy) {
- icalerror_set_errno (ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- icalproperty_set_tzid (prop2, tzid1);
-
- /* Now convert both VTIMEZONEs to strings and compare them. */
- string1 = icalcomponent_as_ical_string (vtimezone1);
- if (!string1) {
- /* Try to reset the property. Though this may not work if we are low
- on memory. */
- icalproperty_set_tzid (prop2, tzid2_copy);
- free (tzid2_copy);
- return -1;
- }
-
- /* Copy the string, since it is in a temporary buffer which may get freed
- during the next call. */
- string1_copy = strdup (string1);
- if (!string1_copy) {
- icalproperty_set_tzid (prop2, tzid2_copy);
- free (tzid2_copy);
- return -1;
- }
-
- string2 = icalcomponent_as_ical_string (vtimezone2);
- if (!string2) {
- icalproperty_set_tzid (prop2, tzid2_copy);
- free (tzid2_copy);
- return -1;
- }
-
- cmp = strcmp (string1_copy, string2);
-
- free (string1_copy);
-
- /* Now reset the second TZID. */
- icalproperty_set_tzid (prop2, tzid2_copy);
- free (tzid2_copy);
-
- return (cmp == 0) ? 1 : 0;
-}
diff --git a/libical/src/libical/icalcomponent.h b/libical/src/libical/icalcomponent.h
deleted file mode 100644
index 55c0592bb2..0000000000
--- a/libical/src/libical/icalcomponent.h
+++ /dev/null
@@ -1,264 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcomponent.h
- CREATOR: eric 20 March 1999
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalcomponent.h
-
-======================================================================*/
-
-#ifndef ICALCOMPONENT_H
-#define ICALCOMPONENT_H
-
-#include "icalproperty.h"
-#include "icalvalue.h"
-#include "icalenums.h" /* defines icalcomponent_kind */
-#include "icalattendee.h"
-#include "pvl.h"
-
-typedef void icalcomponent;
-
-/* An opaque struct representing a timezone. We declare this here to avoid
- a circular dependancy. */
-#ifndef ICALTIMEONE_DEFINED
-#define ICALTIMEONE_DEFINED
-typedef struct _icaltimezone icaltimezone;
-#endif
-
-
-/* This is exposed so that callers will not have to allocate and
- deallocate iterators. Pretend that you can't see it. */
-typedef struct icalcompiter
-{
- icalcomponent_kind kind;
- pvl_elem iter;
-
-} icalcompiter;
-
-icalcomponent* icalcomponent_new(icalcomponent_kind kind);
-icalcomponent* icalcomponent_new_clone(icalcomponent* component);
-icalcomponent* icalcomponent_new_from_string(char* str);
-icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...);
-void icalcomponent_free(icalcomponent* component);
-
-char* icalcomponent_as_ical_string(icalcomponent* component);
-
-int icalcomponent_is_valid(icalcomponent* component);
-
-icalcomponent_kind icalcomponent_isa(icalcomponent* component);
-
-int icalcomponent_isa_component (void* component);
-
-/*
- * Working with properties
- */
-
-void icalcomponent_add_property(icalcomponent* component,
- icalproperty* property);
-
-void icalcomponent_remove_property(icalcomponent* component,
- icalproperty* property);
-
-int icalcomponent_count_properties(icalcomponent* component,
- icalproperty_kind kind);
-
-/* Iterate through the properties */
-icalproperty* icalcomponent_get_current_property(icalcomponent* component);
-
-icalproperty* icalcomponent_get_first_property(icalcomponent* component,
- icalproperty_kind kind);
-icalproperty* icalcomponent_get_next_property(icalcomponent* component,
- icalproperty_kind kind);
-
-
-/*
- * Working with components
- */
-
-
-/* Return the first VEVENT, VTODO or VJOURNAL sub-component of cop, or
- comp if it is one of those types */
-
-icalcomponent* icalcomponent_get_inner(icalcomponent* comp);
-
-
-void icalcomponent_add_component(icalcomponent* parent,
- icalcomponent* child);
-
-void icalcomponent_remove_component(icalcomponent* parent,
- icalcomponent* child);
-
-int icalcomponent_count_components(icalcomponent* component,
- icalcomponent_kind kind);
-
-/* This takes 2 VCALENDAR components and merges the second one into the first,
- resolving any problems with conflicting TZIDs. comp_to_merge will no
- longer exist after calling this function. */
-void icalcomponent_merge_component(icalcomponent* comp,
- icalcomponent* comp_to_merge);
-
-
-/* Iteration Routines. There are two forms of iterators, internal and
-external. The internal ones came first, and are almost completely
-sufficient, but they fail badly when you want to construct a loop that
-removes components from the container.*/
-
-
-/* Iterate through components */
-icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
-
-icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
- icalcomponent_kind kind);
-icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
- icalcomponent_kind kind);
-
-/* Using external iterators */
-icalcompiter icalcomponent_begin_component(icalcomponent* component,
- icalcomponent_kind kind);
-icalcompiter icalcomponent_end_component(icalcomponent* component,
- icalcomponent_kind kind);
-icalcomponent* icalcompiter_next(icalcompiter* i);
-icalcomponent* icalcompiter_prior(icalcompiter* i);
-icalcomponent* icalcompiter_deref(icalcompiter* i);
-
-
-
-
-/* Working with embedded error properties */
-
-int icalcomponent_count_errors(icalcomponent* component);
-
-/* Remove all X-LIC-ERROR properties*/
-void icalcomponent_strip_errors(icalcomponent* component);
-
-/* Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/
-void icalcomponent_convert_errors(icalcomponent* component);
-
-/* Internal operations. They are private, and you should not be using them. */
-icalcomponent* icalcomponent_get_parent(icalcomponent* component);
-void icalcomponent_set_parent(icalcomponent* component,
- icalcomponent* parent);
-
-/* Kind conversion routiens */
-
-icalcomponent_kind icalcomponent_string_to_kind(const char* string);
-
-const char* icalcomponent_kind_to_string(icalcomponent_kind kind);
-
-
-/************* Derived class methods. ****************************
-
-If the code was in an OO language, the remaining routines would be
-members of classes derived from icalcomponent. Don't call them on the
-wrong component subtypes. */
-
-/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO or
- VJOURNAL */
-icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c);
-
-/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end
- times of an event in UTC */
-struct icaltime_span icalcomponent_get_span(icalcomponent* comp);
-
-/******************** Convienience routines **********************/
-
-void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v);
-struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp);
-
-/* For the icalcomponent routines only, dtend and duration are tied
- together. If you call the set routine for one and the other exists,
- the routine will calculate the change to the other. That is, if
- there is a DTEND and you call set_duration, the routine will modify
- DTEND to be the sum of DTSTART and the duration. If you call a get
- routine for one and the other exists, the routine will calculate
- the return value. If you call a set routine and neither exists, the
- routine will create the apcompriate comperty */
-
-
-struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp);
-void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v);
-
-void icalcomponent_set_duration(icalcomponent* comp,
- struct icaldurationtype v);
-struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp);
-
-void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method);
-icalproperty_method icalcomponent_get_method(icalcomponent* comp);
-
-struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp);
-void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v);
-
-
-void icalcomponent_set_summary(icalcomponent* comp, const char* v);
-const char* icalcomponent_get_summary(icalcomponent* comp);
-
-void icalcomponent_set_comment(icalcomponent* comp, const char* v);
-const char* icalcomponent_get_comment(icalcomponent* comp);
-
-void icalcomponent_set_uid(icalcomponent* comp, const char* v);
-const char* icalcomponent_get_uid(icalcomponent* comp);
-
-void icalcomponent_set_recurrenceid(icalcomponent* comp,
- struct icaltimetype v);
-struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
-
-
-void icalcomponent_set_organizer(icalcomponent* comp,
- struct icalorganizertype org);
- struct icalorganizertype icalcomponent_get_organizer(icalcomponent* comp);
-
-
-void icalcomponent_add_attendee(icalcomponent *comp,
- struct icalattendeetype attendee);
-
-int icalcomponent_remove_attendee(icalcomponent *comp, char* cuid);
-
-/* Get the Nth attendee. Out of range indices return an attendee
- with cuid == 0 */
-struct icalattendeetype icalcomponent_get_attendee(icalcomponent *comp,
- int index);
-
-/* Calls the given function for each TZID parameter found in the component,
- and any subcomponents. */
-void icalcomponent_foreach_tzid(icalcomponent* comp,
- void (*callback)(icalparameter *param, void *data),
- void *callback_data);
-
-/* Returns the icaltimezone in the component corresponding to the TZID, or NULL
- if it can't be found. */
-icaltimezone* icalcomponent_get_timezone(icalcomponent* comp,
- const char *tzid);
-
-
-/*************** Type Specific routines ***************/
-
-icalcomponent* icalcomponent_new_vcalendar();
-icalcomponent* icalcomponent_new_vevent();
-icalcomponent* icalcomponent_new_vtodo();
-icalcomponent* icalcomponent_new_vjournal();
-icalcomponent* icalcomponent_new_valarm();
-icalcomponent* icalcomponent_new_vfreebusy();
-icalcomponent* icalcomponent_new_vtimezone();
-icalcomponent* icalcomponent_new_xstandard();
-icalcomponent* icalcomponent_new_xdaylight();
-
-
-
-#endif /* !ICALCOMPONENT_H */
-
-
-
diff --git a/libical/src/libical/icalderivedparameter.c.in b/libical/src/libical/icalderivedparameter.c.in
deleted file mode 100644
index 4af6e95c0e..0000000000
--- a/libical/src/libical/icalderivedparameter.c.in
+++ /dev/null
@@ -1,211 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalderivedparameters.{c,h}
- CREATOR: eric 09 May 1999
-
- $Id: icalderivedparameter.c.in,v 1.1 2001/04/17 17:23:17 jpr Exp $
- $Locker: $
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalderivedparameters.{c,h}
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
- ======================================================================*/
-/*#line 29 "icalparameter.c.in"*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "icalparameter.h"
-#include "icalparameterimpl.h"
-
-#include "icalproperty.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-
-#include <stdlib.h> /* for malloc() */
-#include <errno.h>
-#include <string.h> /* for memset() */
-
-icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
-
-struct icalparameter_impl* icalparameter_new_impl(icalparameter_kind kind);
-
-/* This map associates each of the parameters with the string
- representation of the paramter's name */
-struct icalparameter_kind_map {
- icalparameter_kind kind;
- char *name;
-
-};
-
-extern struct icalparameter_kind_map parameter_map[];
-
-
-const char* icalparameter_kind_to_string(icalparameter_kind kind)
-{
- int i;
-
- for (i=0; parameter_map[i].kind != ICAL_NO_PARAMETER; i++) {
- if (parameter_map[i].kind == kind) {
- return parameter_map[i].name;
- }
- }
-
- return 0;
-
-}
-
-icalparameter_kind icalparameter_string_to_kind(const char* string)
-{
- int i;
-
- if (string ==0 ) {
- return ICAL_NO_PARAMETER;
- }
-
- for (i=0; parameter_map[i].kind != ICAL_NO_PARAMETER; i++) {
-
- if (strcmp(parameter_map[i].name, string) == 0) {
- return parameter_map[i].kind;
- }
- }
-
- if(strncmp(string,"X-",2)==0){
- return ICAL_X_PARAMETER;
- }
-
- return ICAL_NO_PARAMETER;
-}
-
-/* This map associates the enumerations for the VALUE parameter with
- the kinds of VALUEs. */
-
-struct icalparameter_value_kind_map {
- icalparameter_value value;
- icalvalue_kind kind;
-};
-
-extern struct icalparameter_value_kind_map value_kind_map[];
-
-
-icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value)
-{
- int i;
-
- for (i=0; value_kind_map[i].kind != ICAL_NO_VALUE; i++) {
-
- if (value_kind_map[i].value == value) {
- return value_kind_map[i].kind;
- }
- }
-
- return ICAL_NO_VALUE;
-}
-
-
-/* This map associates the parameter enumerations with a specific parameter and the string representation of the enumeration */
-
-struct icalparameter_map {
- icalparameter_kind kind;
- int enumeration;
- const char* str;
-};
-
-
-extern struct icalparameter_map icalparameter_map[];
-
-
-const char* icalparameter_enum_to_string(int e)
-{
- int i;
-
- icalerror_check_arg_rz(e >= ICALPARAMETER_FIRST_ENUM,"e");
- icalerror_check_arg_rz(e <= ICALPARAMETER_LAST_ENUM,"e");
-
- for (i=0; icalparameter_map[i].kind != ICAL_NO_PARAMETER; i++){
- if(e == icalparameter_map[i].enumeration){
- return icalparameter_map[i].str;
- }
- }
-
- return 0;
-}
-
-int icalparameter_string_to_enum(const char* str)
-{
- int i;
-
- icalerror_check_arg_rz(str != 0,"str");
-
- for (i=0; icalparameter_map[i].kind != ICAL_NO_PARAMETER; i++){
- if(strcmp(str,icalparameter_map[i].str) == 0) {
- return icalparameter_map[i].enumeration;
- }
- }
-
- return 0;
-}
-
-icalparameter* icalparameter_new_from_value_string(icalparameter_kind kind,const char* val)
-{
-
- struct icalparameter_impl* param=0;
- int found_kind = 0;
- int i;
-
- icalerror_check_arg_rz((val!=0),"val");
-
- /* Search through the parameter map to find a matching kind */
-
- param = icalparameter_new_impl(kind);
-
- for (i=0; icalparameter_map[i].kind != ICAL_NO_PARAMETER; i++){
- if(kind == icalparameter_map[i].kind) {
- found_kind = 1;
- if(strcmp(val,icalparameter_map[i].str) == 0) {
-
- param->data = (int)icalparameter_map[i].enumeration;
- return param;
- }
- }
- }
-
- if(found_kind == 1){
- /* The kind was in the parameter map, but the string did not
- match, so assume that it is an alternate value, like an
- X-value.*/
-
- icalparameter_set_xvalue(param, val);
-
- } else {
-
- /* If the kind was not found, then it must be a string type */
-
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(val);
-
- }
-
- return param;
-}
-
-
-
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalderivedparameter.h.in b/libical/src/libical/icalderivedparameter.h.in
deleted file mode 100644
index e9fdd19fa7..0000000000
--- a/libical/src/libical/icalderivedparameter.h.in
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalparam.h
- CREATOR: eric 20 March 1999
-
-
- $Id: icalderivedparameter.h.in,v 1.1 2001/04/17 17:23:17 jpr Exp $
- $Locker: $
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalparam.h
-
- ======================================================================*/
-
-#ifndef ICALDERIVEDPARAMETER_H
-#define ICALDERIVEDPARAMETER_H
-
-
-typedef void icalparameter;
-
-const char* icalparameter_enum_to_string(int e);
-int icalparameter_string_to_enum(const char* str);
-
diff --git a/libical/src/libical/icalderivedproperty.c.in b/libical/src/libical/icalderivedproperty.c.in
deleted file mode 100644
index ceec0b797d..0000000000
--- a/libical/src/libical/icalderivedproperty.c.in
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C -*- */
-
-/*======================================================================
- FILE: icalderivedproperty.c
- CREATOR: eric 15 Feb 2001
-
- $Id: icalderivedproperty.c.in,v 1.1 2001/04/17 17:23:17 jpr Exp $
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalproperty.c
-
-======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalproperty.h"
-#include "icalcomponent.h"
-#include "pvl.h"
-#include "icalenums.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalparser.h"
-
-#include <string.h> /* For icalmemory_strdup, rindex */
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <stdio.h> /* for printf */
-#include <stdarg.h> /* for va_list, va_start, etc. */
-
-#define TMP_BUF_SIZE 1024
-
-struct icalproperty_impl*
-icalproperty_new_impl (icalproperty_kind kind);
-
-/* This map associates the property kinds with the string
- representation of the property name and the kind of VALUE that the
- property uses as a default */
-
-struct icalproperty_map {
- icalproperty_kind kind;
- const char *name;
- icalvalue_kind value;
-
-};
-
-extern struct icalproperty_map property_map[];
-
-const char* icalproperty_kind_to_string(icalproperty_kind kind)
-{
- int i;
-
- for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
- if (property_map[i].kind == kind) {
- return property_map[i].name;
- }
- }
-
- return 0;
-
-}
-
-
-icalproperty_kind icalproperty_string_to_kind(const char* string)
-{
- int i;
-
- if (string ==0 ) {
- return ICAL_NO_PROPERTY;
- }
-
-
- for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
- if (strcmp(property_map[i].name, string) == 0) {
- return property_map[i].kind;
- }
- }
-
- if(strncmp(string,"X-",2)==0){
- return ICAL_X_PROPERTY;
- }
-
-
- return ICAL_NO_PROPERTY;
-}
-
-
-icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind)
-{
- int i;
-
- for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
- if ( property_map[i].value == kind ) {
- return property_map[i].kind;
- }
- }
-
- return ICAL_NO_VALUE;
-}
-
-
-
-icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind)
-{
- int i;
-
- for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
- if ( property_map[i].kind == kind ) {
- return property_map[i].value;
- }
- }
-
- return ICAL_NO_VALUE;
-}
-
-
-/* This map associates the property enumerations with the king of
- property that they are used in and the string representation of the
- enumeration */
-
-struct icalproperty_enum_map {
- icalproperty_kind prop;
- int prop_enum;
- const char* str;
-};
-
-extern struct icalproperty_enum_map enum_map[];
-
-
-const char* icalproperty_enum_to_string(int e)
-{
- icalerror_check_arg_rz(e >= ICALPROPERTY_FIRST_ENUM,"e");
- icalerror_check_arg_rz(e <= ICALPROPERTY_LAST_ENUM,"e");
-
- return enum_map[e-ICALPROPERTY_FIRST_ENUM].str;
-}
-
-int icalproperty_string_to_enum(const char* str)
-{
- int i;
-
- icalerror_check_arg_rz(str!=0,"str")
-
- while(*str == ' '){
- str++;
- }
-
- for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
- if ( strcmp(enum_map[i-ICALPROPERTY_FIRST_ENUM].str, str) == 0) {
- return enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum;
- }
- }
-
- return 0;
-}
-
-int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e)
-{
- int i;
-
-
- for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
- if(enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum == e &&
- enum_map[i-ICALPROPERTY_FIRST_ENUM].prop == kind ){
- return 1;
- }
- }
-
- return 0;
-}
-
-
-const char* icalproperty_method_to_string(icalproperty_method method)
-{
- icalerror_check_arg_rz(method >= ICAL_METHOD_X,"method");
- icalerror_check_arg_rz(method <= ICAL_METHOD_NONE,"method");
-
- return enum_map[method-ICALPROPERTY_FIRST_ENUM].str;
-}
-
-icalproperty_method icalproperty_string_to_method(const char* str)
-{
- int i;
-
- icalerror_check_arg_rx(str!=0,"str",ICAL_METHOD_NONE)
-
- while(*str == ' '){
- str++;
- }
-
- for (i=ICAL_METHOD_X-ICALPROPERTY_FIRST_ENUM;
- i != ICAL_METHOD_NONE-ICALPROPERTY_FIRST_ENUM;
- i++) {
- if ( strcmp(enum_map[i].str, str) == 0) {
- return (icalproperty_method)enum_map[i].prop_enum;
- }
- }
-
- return ICAL_METHOD_NONE;
-}
-
-
-const char* icalenum_status_to_string(icalproperty_status status)
-{
- icalerror_check_arg_rz(status >= ICAL_STATUS_X,"status");
- icalerror_check_arg_rz(status <= ICAL_STATUS_NONE,"status");
-
- return enum_map[status-ICALPROPERTY_FIRST_ENUM].str;
-}
-
-icalproperty_status icalenum_string_to_status(const char* str)
-{
- int i;
-
- icalerror_check_arg_rx(str!=0,"str",ICAL_STATUS_NONE)
-
- while(*str == ' '){
- str++;
- }
-
- for (i=ICAL_STATUS_X-ICALPROPERTY_FIRST_ENUM;
- i != ICAL_STATUS_NONE-ICALPROPERTY_FIRST_ENUM;
- i++) {
- if ( strcmp(enum_map[i].str, str) == 0) {
- return (icalproperty_method)enum_map[i].prop_enum;
- }
- }
-
- return ICAL_STATUS_NONE;
-
-}
-
-
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalderivedproperty.h.in b/libical/src/libical/icalderivedproperty.h.in
deleted file mode 100644
index 6ce34afafb..0000000000
--- a/libical/src/libical/icalderivedproperty.h.in
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalderivedproperties.{c,h}
- CREATOR: eric 09 May 1999
-
- $Id: icalderivedproperty.h.in,v 1.1 2001/04/17 17:23:17 jpr Exp $
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
- ======================================================================*/
-
-
-#ifndef ICALDERIVEDPROPERTY_H
-#define ICALDERIVEDPROPERTY_H
-
-#include <time.h>
-#include "icalparameter.h"
-#include "icalderivedvalue.h"
-#include "icalrecur.h"
-
-typedef void icalproperty;
-
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalderivedvalue.c.in b/libical/src/libical/icalderivedvalue.c.in
deleted file mode 100644
index 8dac43a788..0000000000
--- a/libical/src/libical/icalderivedvalue.c.in
+++ /dev/null
@@ -1,341 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalvalue.c
- CREATOR: eric 02 May 1999
-
- $Id: icalderivedvalue.c.in,v 1.2 2001/09/10 21:54:44 federico Exp $
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvalue.c
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
-
-======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalparser.h"
-#include "icalenums.h"
-
-#include "icalvalueimpl.h"
-
-#include <stdlib.h> /* for malloc */
-#include <stdio.h> /* for sprintf */
-#include <string.h> /* For memset, others */
-#include <stddef.h> /* For offsetof() macro */
-#include <errno.h>
-#include <time.h> /* for mktime */
-#include <stdlib.h> /* for atoi and atof */
-#include <limits.h> /* for SHRT_MAX */
-
-
-
-#define TMP_BUF_SIZE 1024
-
-struct icalvalue_impl* icalvalue_new_impl(icalvalue_kind kind);
-
-/* This map associates each of the value types with its string
- representation */
-struct icalvalue_kind_map {
- icalvalue_kind kind;
- char name[20];
-};
-
-extern struct icalvalue_kind_map value_map[];
-
-const char* icalvalue_kind_to_string(icalvalue_kind kind)
-{
- int i;
-
- for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) {
- if (value_map[i].kind == kind) {
- return value_map[i].name;
- }
- }
-
- return 0;
-}
-
-icalvalue_kind icalvalue_string_to_kind(const char* str)
-{
- int i;
-
- for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) {
- if (strcmp(value_map[i].name,str) == 0) {
- return value_map[i].kind;
- }
- }
-
- return value_map[i].kind;
-
-}
-
-icalvalue* icalvalue_new_x (const char* v){
- struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_X_VALUE);
- icalerror_check_arg_rz( (v!=0),"v");
-
- icalvalue_set_x((icalvalue*)impl,v);
- return (icalvalue*)impl;
-}
-void icalvalue_set_x(icalvalue* value, const char* v) {
- struct icalvalue_impl* impl;
- icalerror_check_arg_rv( (value!=0),"value");
- icalerror_check_arg_rv( (v!=0),"v");
-
- impl = (struct icalvalue_impl*)value;
- if(impl->x_value!=0) {free((void*)impl->x_value);}
-
- impl->x_value = icalmemory_strdup(v);
-
- if (impl->x_value == 0){
- errno = ENOMEM;
- }
-
- }
-const char* icalvalue_get_x(icalvalue* value) {
-
- icalerror_check_arg( (value!=0),"value");
- icalerror_check_value_type(value, ICAL_X_VALUE);
- return ((struct icalvalue_impl*)value)->x_value;
-}
-
-/* Recur is a special case, so it is not auto generated. */
-icalvalue*
-icalvalue_new_recur (struct icalrecurrencetype v)
-{
- struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_RECUR_VALUE);
-
- icalvalue_set_recur((icalvalue*)impl,v);
-
- return (icalvalue*)impl;
-}
-
-void
-icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v)
-{
- struct icalvalue_impl* impl;
-
- icalerror_check_arg_rv( (value!=0),"value");
- icalerror_check_value_type(value, ICAL_RECUR_VALUE);
-
- impl = (struct icalvalue_impl*)value;
-
- if (impl->data.v_recur != 0){
- free(impl->data.v_recur);
- impl->data.v_recur = 0;
- }
-
- impl->data.v_recur = malloc(sizeof(struct icalrecurrencetype));
-
- if (impl->data.v_recur == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- } else {
- memcpy(impl->data.v_recur, &v, sizeof(struct icalrecurrencetype));
- }
-
-}
-
-struct icalrecurrencetype
-icalvalue_get_recur(icalvalue* value)
-{
- icalerror_check_arg( (value!=0),"value");
- icalerror_check_value_type(value, ICAL_RECUR_VALUE);
-
- return *(((struct icalvalue_impl*)value)->data.v_recur);
-}
-
-
-
-
-icalvalue*
-icalvalue_new_trigger (struct icaltriggertype v)
-{
- struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TRIGGER_VALUE);
-
- icalvalue_set_trigger((icalvalue*)impl,v);
-
- return (icalvalue*)impl;
-}
-
-void
-icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v)
-{
- struct icalvalue_impl* impl;
-
- icalerror_check_arg_rv( (value!=0),"value");
-
- impl = (struct icalvalue_impl*)value;
-
- if(!icaltime_is_null_time(v.time)){
- icalvalue_set_datetime((icalvalue*)impl,v.time);
- impl->kind = ICAL_DATETIME_VALUE;
- } else {
- icalvalue_set_duration((icalvalue*)impl,v.duration);
- impl->kind = ICAL_DURATION_VALUE;
- }
-
-}
-
-struct icaltriggertype
-icalvalue_get_trigger(icalvalue* value)
-{
- struct icalvalue_impl *impl = (struct icalvalue_impl*)value;
- struct icaltriggertype tr;
-
- icalerror_check_arg( (value!=0),"value");
- icalerror_check_arg( (value!=0),"value");
-
- if(impl->kind == ICAL_DATETIME_VALUE){
- tr.duration = icaldurationtype_from_int(0);
- tr.time = impl->data.v_time;
- } else if(impl->kind == ICAL_DURATION_VALUE){
- tr.time = icaltime_null_time();
- tr.duration = impl->data.v_duration;
- } else {
- tr.duration = icaldurationtype_from_int(0);
- tr.time = icaltime_null_time();
- icalerror_set_errno(ICAL_BADARG_ERROR);
- }
-
- return tr;
-}
-
-/* DATE-TIME-PERIOD is a special case, and is not auto generated */
-
-icalvalue*
-icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v)
-{
- struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIMEPERIOD_VALUE);
-
- icalvalue_set_datetimeperiod((icalvalue*)impl,v);
-
- return (icalvalue*)impl;
-}
-
-void
-icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v)
-{
- struct icalvalue_impl* impl = (struct icalvalue_impl*)value;
-
- icalerror_check_arg_rv( (value!=0),"value");
-
- icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE);
-
- if(!icaltime_is_null_time(v.time)){
- if(!icaltime_is_valid_time(v.time)){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return;
- }
- impl->kind = ICAL_DATETIME_VALUE;
- icalvalue_set_datetime(impl,v.time);
- } else if (!icalperiodtype_is_null_period(v.period)) {
- if(!icalperiodtype_is_valid_period(v.period)){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return;
- }
- impl->kind = ICAL_PERIOD_VALUE;
- icalvalue_set_period(impl,v.period);
- } else {
- icalerror_set_errno(ICAL_BADARG_ERROR);
- }
-}
-
-struct icaldatetimeperiodtype
-icalvalue_get_datetimeperiod(icalvalue* value)
-{
- struct icaldatetimeperiodtype dtp;
-
- struct icalvalue_impl* impl = (struct icalvalue_impl*)value;
- icalerror_check_arg( (value!=0),"value");
- icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE);
-
- if(impl->kind == ICAL_DATETIME_VALUE){
- dtp.period = icalperiodtype_null_period();
- dtp.time = impl->data.v_time;
- } else if(impl->kind == ICAL_PERIOD_VALUE) {
- dtp.period = impl->data.v_period;
- dtp.time = icaltime_null_time();
- } else {
- dtp.period = icalperiodtype_null_period();
- dtp.time = icaltime_null_time();
- icalerror_set_errno(ICAL_BADARG_ERROR);
- }
-
- return dtp;
-}
-
-icalvalue *
-icalvalue_new_attach (icalattach *attach)
-{
- struct icalvalue_impl *impl;
-
- icalerror_check_arg_rz ((attach != NULL), "attach");
-
- impl = icalvalue_new_impl (ICAL_ATTACH_VALUE);
- if (!impl) {
- errno = ENOMEM;
- return NULL;
- }
-
- icalvalue_set_attach ((icalvalue *) impl, attach);
- return (icalvalue *) impl;
-}
-
-void
-icalvalue_set_attach (icalvalue *value, icalattach *attach)
-{
- struct icalvalue_impl *impl;
-
- icalerror_check_arg_rv ((value != NULL), "value");
- icalerror_check_value_type (value, ICAL_ATTACH_VALUE);
- icalerror_check_arg_rv ((attach != NULL), "attach");
-
- impl = (struct icalvalue_impl *) value;
-
- icalattach_ref (attach);
-
- if (impl->data.v_attach)
- icalattach_unref (impl->data.v_attach);
-
- impl->data.v_attach = attach;
-}
-
-icalattach *
-icalvalue_get_attach (icalvalue *value)
-{
- struct icalvalue_impl *impl;
-
- icalerror_check_arg_rz ((value != NULL), "value");
- icalerror_check_value_type (value, ICAL_ATTACH_VALUE);
-
- impl = (struct icalvalue_impl *) value;
-
- return impl->data.v_attach;
-}
-
-
-/* The remaining interfaces are 'new', 'set' and 'get' for each of the value
- types */
-
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalderivedvalue.h.in b/libical/src/libical/icalderivedvalue.h.in
deleted file mode 100644
index d043ac4048..0000000000
--- a/libical/src/libical/icalderivedvalue.h.in
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalvalue.h
- CREATOR: eric 20 March 1999
-
-
- $Id: icalderivedvalue.h.in,v 1.2 2001/09/10 21:54:44 federico Exp $
- $Locker: $
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvalue.h
-
- ======================================================================*/
-
-#ifndef ICALDERIVEDVALUE_H
-#define ICALDERIVEDVALUE_H
-
-#include "icaltypes.h"
-#include "icalrecur.h"
-#include "icaltime.h"
-#include "icalduration.h"
-#include "icalperiod.h"
-
-typedef void icalvalue;
-
-
-void icalvalue_set_x(icalvalue* value, const char* v);
-icalvalue* icalvalue_new_x(const char* v);
-const char* icalvalue_get_x(icalvalue* value);
-
-icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
-void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
-struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
-
-icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
-void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
-struct icaltriggertype icalvalue_get_trigger(icalvalue* value);
-
-icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
-void icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v);
-struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
-
-icalvalue *icalvalue_new_attach (icalattach *attach);
-void icalvalue_set_attach (icalvalue *value, icalattach *attach);
-icalattach *icalvalue_get_attach (icalvalue *value);
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalduration.c b/libical/src/libical/icalduration.c
deleted file mode 100644
index 250cd6e3d6..0000000000
--- a/libical/src/libical/icalduration.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icaltime.c
- CREATOR: eric 02 June 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalduration.h"
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef ICAL_NO_LIBICAL
-#define icalerror_set_errno(x)
-#define icalerror_check_arg_rv(x,y)
-#define icalerror_check_arg_re(x,y,z)
-#else
-#include "icalerror.h"
-#include "icalmemory.h"
-#endif
-
-
-
-
-/* From Seth Alves, <alves@hungry.com> */
-struct icaldurationtype icaldurationtype_from_int(int t)
-{
- struct icaldurationtype dur;
- int used = 0;
-
- dur = icaldurationtype_null_duration();
-
- if(t < 0){
- dur.is_neg = 1;
- t = -t;
- }
-
- dur.weeks = (t - used) / (60 * 60 * 24 * 7);
- used += dur.weeks * (60 * 60 * 24 * 7);
- dur.days = (t - used) / (60 * 60 * 24);
- used += dur.days * (60 * 60 * 24);
- dur.hours = (t - used) / (60 * 60);
- used += dur.hours * (60 * 60);
- dur.minutes = (t - used) / (60);
- used += dur.minutes * (60);
- dur.seconds = (t - used);
-
- return dur;
-}
-
-#ifndef ICAL_NO_LIBICAL
-#include "icalvalue.h"
-struct icaldurationtype icaldurationtype_from_string(const char* str)
-{
-
- int i;
- int begin_flag = 0;
- int time_flag = 0;
- int date_flag = 0;
- int week_flag = 0;
- int digits=-1;
- int scan_size = -1;
- int size = strlen(str);
- char p;
- struct icaldurationtype d;
-
- memset(&d, 0, sizeof(struct icaldurationtype));
-
- for(i=0;i != size;i++){
- p = str[i];
-
- switch(p)
- {
- case '-': {
- if(i != 0 || begin_flag == 1) goto error;
-
- d.is_neg = 1;
- break;
- }
-
- case 'P': {
- if (i != 0 && i !=1 ) goto error;
- begin_flag = 1;
- break;
- }
-
- case 'T': {
- time_flag = 1;
- break;
- }
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
-
- /* HACK. Skip any more digits if the l;ast one
- read has not been assigned */
- if(digits != -1){
- break;
- }
-
- if (begin_flag == 0) goto error;
- /* Get all of the digits, not one at a time */
- scan_size = sscanf((char*)(str+i),"%d",&digits);
- if(scan_size == 0) goto error;
- break;
- }
-
- case 'H': {
- if (time_flag == 0||week_flag == 1||d.hours !=0||digits ==-1)
- goto error;
- d.hours = digits; digits = -1;
- break;
- }
- case 'M': {
- if (time_flag == 0||week_flag==1||d.minutes != 0||digits ==-1)
- goto error;
- d.minutes = digits; digits = -1;
- break;
- }
- case 'S': {
- if (time_flag == 0||week_flag==1||d.seconds!=0||digits ==-1)
- goto error;
- d.seconds = digits; digits = -1;
- break;
- }
- case 'W': {
- if (time_flag==1||date_flag==1||d.weeks!=0||digits ==-1)
- goto error;
- week_flag = 1;
- d.weeks = digits; digits = -1;
- break;
- }
- case 'D': {
- if (time_flag==1||week_flag==1||d.days!=0||digits ==-1)
- goto error;
- date_flag = 1;
- d.days = digits; digits = -1;
- break;
- }
- default: {
- goto error;
- }
-
- }
- }
-
- return d;
-
-
- error:
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- memset(&d, 0, sizeof(struct icaldurationtype));
- return d;
-
-}
-
-#define TMP_BUF_SIZE 1024
-void append_duration_segment(char** buf, char** buf_ptr, size_t* buf_size,
- char* sep, unsigned int value) {
-
- char temp[TMP_BUF_SIZE];
-
- sprintf(temp,"%d",value);
-
- icalmemory_append_string(buf, buf_ptr, buf_size, temp);
- icalmemory_append_string(buf, buf_ptr, buf_size, sep);
-
-}
-
-char* icaldurationtype_as_ical_string(struct icaldurationtype d)
-{
-
- char *buf, *output_line;
- size_t buf_size = 256;
- char* buf_ptr = 0;
- int seconds;
-
- buf = (char*)icalmemory_new_buffer(buf_size);
- buf_ptr = buf;
-
-
- seconds = icaldurationtype_as_int(d);
-
- if(seconds !=0){
-
- if(d.is_neg == 1){
- icalmemory_append_char(&buf, &buf_ptr, &buf_size, '-');
- }
-
- icalmemory_append_char(&buf, &buf_ptr, &buf_size, 'P');
-
- if (d.weeks != 0 ) {
- append_duration_segment(&buf, &buf_ptr, &buf_size, "W", d.weeks);
- }
-
- if (d.days != 0 ) {
- append_duration_segment(&buf, &buf_ptr, &buf_size, "D", d.days);
- }
-
- if (d.hours != 0 || d.minutes != 0 || d.seconds != 0) {
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "T");
-
- if (d.hours != 0 ) {
- append_duration_segment(&buf, &buf_ptr, &buf_size, "H", d.hours);
- }
- if (d.minutes != 0 ) {
- append_duration_segment(&buf, &buf_ptr, &buf_size, "M",
- d.minutes);
- }
- if (d.seconds != 0 ) {
- append_duration_segment(&buf, &buf_ptr, &buf_size, "S",
- d.seconds);
- }
-
- }
- } else {
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, d.is_neg ? "-PT0S" : "PT0S");
- }
-
- output_line = icalmemory_tmp_copy(buf);
- icalmemory_free_buffer(buf);
-
- return output_line;
-
-}
-
-#endif
-
-
-/* From Russel Steinthal */
-int icaldurationtype_as_int(struct icaldurationtype dur)
-{
- return (int)( (dur.seconds +
- (60 * dur.minutes) +
- (60 * 60 * dur.hours) +
- (60 * 60 * 24 * dur.days) +
- (60 * 60 * 24 * 7 * dur.weeks))
- * (dur.is_neg==1? -1 : 1) ) ;
-}
-
-struct icaldurationtype icaldurationtype_null_duration(void)
-{
- struct icaldurationtype d;
-
- memset(&d,0,sizeof(struct icaldurationtype));
-
- return d;
-}
-
-int icaldurationtype_is_null_duration(struct icaldurationtype d)
-{
- if(icaldurationtype_as_int(d) == 0){
- return 1;
- } else {
- return 0;
- }
-}
-
-
-
-struct icaltimetype icaltime_add(struct icaltimetype t,
- struct icaldurationtype d)
-{
- int dt = icaldurationtype_as_int(d);
-
- t.second += dt;
-
- t = icaltime_normalize(t);
-
- return t;
-}
-
-struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
- struct icaltimetype t2)
-{
-
- time_t t1t = icaltime_as_timet(t1);
- time_t t2t = icaltime_as_timet(t2);
-
- return icaldurationtype_from_int(t1t-t2t);
-
-
-}
-
diff --git a/libical/src/libical/icalduration.h b/libical/src/libical/icalduration.h
deleted file mode 100644
index 0450a081d3..0000000000
--- a/libical/src/libical/icalduration.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalduration.h
- CREATOR: eric 26 Jan 2001
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALDURATION_H
-#define ICALDURATION_H
-
-#include "icaltime.h"
-
-struct icaldurationtype
-{
- int is_neg;
- unsigned int days;
- unsigned int weeks;
- unsigned int hours;
- unsigned int minutes;
- unsigned int seconds;
-};
-
-struct icaldurationtype icaldurationtype_from_int(int t);
-struct icaldurationtype icaldurationtype_from_string(const char*);
-int icaldurationtype_as_int(struct icaldurationtype duration);
-char* icaldurationtype_as_ical_string(struct icaldurationtype d);
-struct icaldurationtype icaldurationtype_null_duration(void);
-int icaldurationtype_is_null_duration(struct icaldurationtype d);
-
-struct icaltimetype icaltime_add(struct icaltimetype t,
- struct icaldurationtype d);
-
-struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
- struct icaltimetype t2);
-
-#endif /* !ICALDURATION_H */
-
-
-
diff --git a/libical/src/libical/icalenums.c b/libical/src/libical/icalenums.c
deleted file mode 100644
index 6751933c3e..0000000000
--- a/libical/src/libical/icalenums.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalenum.c
- CREATOR: eric 29 April 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalenum.c
-
- ======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalenums.h"
-
-#include <stdio.h> /* For fprintf */
-#include <stdio.h> /* For stderr */
-#include <string.h> /* For strncmp */
-#include <assert.h>
-
-
-
-struct {
- enum icalrequeststatus kind;
- int major;
- int minor;
- const char* str;
-} request_status_map[] = {
- {ICAL_2_0_SUCCESS_STATUS, 2,0,"Success."},
- {ICAL_2_1_FALLBACK_STATUS, 2,1,"Success but fallback taken on one or more property values."},
- {ICAL_2_2_IGPROP_STATUS, 2,2,"Success, invalid property ignored."},
- {ICAL_2_3_IGPARAM_STATUS, 2,3,"Success, invalid property parameter ignored."},
- {ICAL_2_4_IGXPROP_STATUS, 2,4,"Success, unknown non-standard property ignored."},
- {ICAL_2_5_IGXPARAM_STATUS, 2,5,"Success, unknown non standard property value ignored."},
- {ICAL_2_6_IGCOMP_STATUS, 2,6,"Success, invalid calendar component ignored."},
- {ICAL_2_7_FORWARD_STATUS, 2,7,"Success, request forwarded to Calendar User."},
- {ICAL_2_8_ONEEVENT_STATUS, 2,8,"Success, repeating event ignored. Scheduled as a single component."},
- {ICAL_2_9_TRUNC_STATUS, 2,9,"Success, truncated end date time to date boundary."},
- {ICAL_2_10_ONETODO_STATUS, 2,10,"Success, repeating VTODO ignored. Scheduled as a single VTODO."},
- {ICAL_2_11_TRUNCRRULE_STATUS, 2,11,"Success, unbounded RRULE clipped at some finite number of instances "},
- {ICAL_3_0_INVPROPNAME_STATUS, 3,0,"Invalid property name."},
- {ICAL_3_1_INVPROPVAL_STATUS, 3,1,"Invalid property value."},
- {ICAL_3_2_INVPARAM_STATUS, 3,2,"Invalid property parameter."},
- {ICAL_3_3_INVPARAMVAL_STATUS, 3,3,"Invalid property parameter value."},
- {ICAL_3_4_INVCOMP_STATUS, 3,4,"Invalid calendar component."},
- {ICAL_3_5_INVTIME_STATUS, 3,5,"Invalid date or time."},
- {ICAL_3_6_INVRULE_STATUS, 3,6,"Invalid rule."},
- {ICAL_3_7_INVCU_STATUS, 3,7,"Invalid Calendar User."},
- {ICAL_3_8_NOAUTH_STATUS, 3,8,"No authority."},
- {ICAL_3_9_BADVERSION_STATUS, 3,9,"Unsupported version."},
- {ICAL_3_10_TOOBIG_STATUS, 3,10,"Request entity too large."},
- {ICAL_3_11_MISSREQCOMP_STATUS, 3,11,"Required component or property missing."},
- {ICAL_3_12_UNKCOMP_STATUS, 3,12,"Unknown component or property found."},
- {ICAL_3_13_BADCOMP_STATUS, 3,13,"Unsupported component or property found"},
- {ICAL_3_14_NOCAP_STATUS, 3,14,"Unsupported capability."},
- {ICAL_4_0_BUSY_STATUS, 4,0,"Event conflict. Date/time is busy."},
- {ICAL_5_0_MAYBE_STATUS, 5,0,"Request MAY supported."},
- {ICAL_5_1_UNAVAIL_STATUS, 5,1,"Service unavailable."},
- {ICAL_5_2_NOSERVICE_STATUS, 5,2,"Invalid calendar service."},
- {ICAL_5_3_NOSCHED_STATUS, 5,3,"No scheduling support for user."},
- {ICAL_UNKNOWN_STATUS, 0,0,"Error: Unknown request status"}
-};
-
-
-const char* icalenum_reqstat_desc(icalrequeststatus stat)
-{
-
- int i;
-
- for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( request_status_map[i].kind == stat) {
- return request_status_map[i].str;
- }
- }
-
- return 0;
-}
-
-
-short icalenum_reqstat_major(icalrequeststatus stat)
-{
- int i;
-
- for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( request_status_map[i].kind == stat) {
- return request_status_map[i].major;
- }
- }
- return -1;
-}
-
-short icalenum_reqstat_minor(icalrequeststatus stat)
-{
- int i;
-
- for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( request_status_map[i].kind == stat) {
- return request_status_map[i].minor;
- }
- }
- return -1;
-}
-
-
-icalrequeststatus icalenum_num_to_reqstat(short major, short minor)
-{
- int i;
-
- for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( request_status_map[i].major == major && request_status_map[i].minor == minor) {
- return request_status_map[i].kind;
- }
- }
- return 0;
-}
-
-
-
diff --git a/libical/src/libical/icalenums.h b/libical/src/libical/icalenums.h
deleted file mode 100644
index 21031dd20e..0000000000
--- a/libical/src/libical/icalenums.h
+++ /dev/null
@@ -1,157 +0,0 @@
-
-/* -*- Mode: C -*-*/
-/*======================================================================
- FILE: icalenums.h
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalenums.h
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
-======================================================================*/
-
-#ifndef ICALENUMS_H
-#define ICALENUMS_H
-
-
-
-/***********************************************************************
- * Component enumerations
-**********************************************************************/
-
-typedef enum icalcomponent_kind {
- ICAL_NO_COMPONENT,
- ICAL_ANY_COMPONENT, /* Used to select all components*/
- ICAL_XROOT_COMPONENT,
- ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
- ICAL_VEVENT_COMPONENT,
- ICAL_VTODO_COMPONENT,
- ICAL_VJOURNAL_COMPONENT,
- ICAL_VCALENDAR_COMPONENT,
- ICAL_VFREEBUSY_COMPONENT,
- ICAL_VALARM_COMPONENT,
- ICAL_XAUDIOALARM_COMPONENT,
- ICAL_XDISPLAYALARM_COMPONENT,
- ICAL_XEMAILALARM_COMPONENT,
- ICAL_XPROCEDUREALARM_COMPONENT,
- ICAL_VTIMEZONE_COMPONENT,
- ICAL_XSTANDARD_COMPONENT,
- ICAL_XDAYLIGHT_COMPONENT,
- ICAL_X_COMPONENT,
- ICAL_VSCHEDULE_COMPONENT,
- ICAL_VQUERY_COMPONENT,
- ICAL_VCAR_COMPONENT,
- ICAL_VCOMMAND_COMPONENT,
- ICAL_XLICINVALID_COMPONENT,
- ICAL_XLICMIMEPART_COMPONENT /* a non-stardard component that mirrors
- structure of MIME data */
-
-} icalcomponent_kind;
-
-
-
-/***********************************************************************
- * Request Status codes
- **********************************************************************/
-
-typedef enum icalrequeststatus {
- ICAL_UNKNOWN_STATUS,
- ICAL_2_0_SUCCESS_STATUS,
- ICAL_2_1_FALLBACK_STATUS,
- ICAL_2_2_IGPROP_STATUS,
- ICAL_2_3_IGPARAM_STATUS,
- ICAL_2_4_IGXPROP_STATUS,
- ICAL_2_5_IGXPARAM_STATUS,
- ICAL_2_6_IGCOMP_STATUS,
- ICAL_2_7_FORWARD_STATUS,
- ICAL_2_8_ONEEVENT_STATUS,
- ICAL_2_9_TRUNC_STATUS,
- ICAL_2_10_ONETODO_STATUS,
- ICAL_2_11_TRUNCRRULE_STATUS,
- ICAL_3_0_INVPROPNAME_STATUS,
- ICAL_3_1_INVPROPVAL_STATUS,
- ICAL_3_2_INVPARAM_STATUS,
- ICAL_3_3_INVPARAMVAL_STATUS,
- ICAL_3_4_INVCOMP_STATUS,
- ICAL_3_5_INVTIME_STATUS,
- ICAL_3_6_INVRULE_STATUS,
- ICAL_3_7_INVCU_STATUS,
- ICAL_3_8_NOAUTH_STATUS,
- ICAL_3_9_BADVERSION_STATUS,
- ICAL_3_10_TOOBIG_STATUS,
- ICAL_3_11_MISSREQCOMP_STATUS,
- ICAL_3_12_UNKCOMP_STATUS,
- ICAL_3_13_BADCOMP_STATUS,
- ICAL_3_14_NOCAP_STATUS,
- ICAL_4_0_BUSY_STATUS,
- ICAL_5_0_MAYBE_STATUS,
- ICAL_5_1_UNAVAIL_STATUS,
- ICAL_5_2_NOSERVICE_STATUS,
- ICAL_5_3_NOSCHED_STATUS
-} icalrequeststatus;
-
-
-const char* icalenum_reqstat_desc(icalrequeststatus stat);
-short icalenum_reqstat_major(icalrequeststatus stat);
-short icalenum_reqstat_minor(icalrequeststatus stat);
-icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
-
-/***********************************************************************
- * Conversion functions
-**********************************************************************/
-
-
-/* Thse routines used to be in icalenums.c, but were moved into the
- icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
-
-/* const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
-#define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
-
-/*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
-#define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
-
-/*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
-#define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
-
-/*const char* icalenum_method_to_string(icalproperty_method);*/
-#define icalenum_method_to_string(x) icalproperty_method_to_string(x)
-
-/*icalproperty_method icalenum_string_to_method(const char* string);*/
-#define icalenum_string_to_method(x) icalproperty_string_to_method(x)
-
-/*const char* icalenum_status_to_string(icalproperty_status);*/
-#define icalenum_status_to_string(x) icalproperty_status_to_string(x)
-
-/*icalproperty_status icalenum_string_to_status(const char* string);*/
-#define icalenum_string_to_status(x) icalproperty_string_to_status(x)
-
-/*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
-#define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
-
-/*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
-#define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
-
-/*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
-#define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
-
-/*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
-#define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
-
-
-#endif /* !ICALENUMS_H */
-
diff --git a/libical/src/libical/icalerror.c b/libical/src/libical/icalerror.c
deleted file mode 100644
index 05191defb9..0000000000
--- a/libical/src/libical/icalerror.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalerror.c
- CREATOR: eric 16 May 1999
-
- $Id$
- $Locker$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalerror.c
-
- ======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalerror.h"
-
-icalerrorenum icalerrno;
-
-int foo;
-void icalerror_stop_here(void)
-{
- foo++; /* Keep optimizers from removing routine */
-}
-
-void icalerror_crash_here(void)
-{
- int *p=0;
- *p = 1;
-
- assert( *p);
-}
-
-
-void icalerror_clear_errno() {
-
- icalerrno = ICAL_NO_ERROR;
-}
-
-#ifdef ICAL_ERRORS_ARE_FATAL
-int icalerror_errors_are_fatal = 1;
-#else
-int icalerror_errors_are_fatal = 0;
-#endif
-
-struct icalerror_state {
- icalerrorenum error;
- icalerrorstate state;
-};
-
-struct icalerror_state error_state_map[] =
-{
- { ICAL_BADARG_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_NEWFAILED_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_MALFORMEDDATA_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_PARSE_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_INTERNAL_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_FILE_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_USAGE_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_UNIMPLEMENTED_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_UNKNOWN_ERROR,ICAL_ERROR_DEFAULT},
- { ICAL_NO_ERROR,ICAL_ERROR_DEFAULT}
-
-};
-
-struct icalerror_string_map {
- const char* str;
- icalerrorenum error;
- char name[160];
-};
-
-static struct icalerror_string_map string_map[] =
-{
- {"BADARG",ICAL_BADARG_ERROR,"BADARG: Bad argument to function"},
- { "NEWFAILED",ICAL_NEWFAILED_ERROR,"NEWFAILED: Failed to create a new object via a *_new() routine"},
- {"MALFORMEDDATA",ICAL_MALFORMEDDATA_ERROR,"MALFORMEDDATA: An input string was not correctly formed or a component has missing or extra properties"},
- { "PARSE",ICAL_PARSE_ERROR,"PARSE: Failed to parse a part of an iCal component"},
- {"INTERNAL",ICAL_INTERNAL_ERROR,"INTERNAL: Random internal error. This indicates an error in the library code, not an error in use"},
- { "FILE",ICAL_FILE_ERROR,"FILE: An operation on a file failed. Check errno for more detail."},
- { "USAGE",ICAL_USAGE_ERROR,"USAGE: Failed to propertyl sequence calls to a set of interfaces"},
- { "UNIMPLEMENTED",ICAL_UNIMPLEMENTED_ERROR,"UNIMPLEMENTED: This feature has not been implemented"},
- { "NO",ICAL_NO_ERROR,"NO: No error"},
- {"UNKNOWN",ICAL_UNKNOWN_ERROR,"UNKNOWN: Unknown error type -- icalerror_strerror() was probably given bad input"}
-};
-
-
-icalerrorenum icalerror_error_from_string(const char* str){
-
- icalerrorenum e;
- int i = 0;
-
- for( i = 0; string_map[i].error != ICAL_NO_ERROR; i++){
- if (strcmp(string_map[i].str,str) == 0){
- e = string_map[i].error;
- }
- }
-
- return e;
-}
-
-icalerrorstate icalerror_supress(const char* error){
-
- icalerrorenum e = icalerror_error_from_string(error);
- icalerrorstate es;
-
- if (e == ICAL_NO_ERROR){
- return ICAL_ERROR_UNKNOWN;
- }
-
-
- es = icalerror_get_error_state(e);
- icalerror_set_error_state(e,ICAL_ERROR_NONFATAL);
-
- return es;
-}
-
-char* icalerror_perror()
-{
- return icalerror_strerror(icalerrno);
-}
-
-void icalerror_restore(const char* error, icalerrorstate es){
-
-
- icalerrorenum e = icalerror_error_from_string(error);
-
- if (e != ICAL_NO_ERROR){
- icalerror_set_error_state(e,es);
- }
-
-}
-
-
-
-void icalerror_set_error_state( icalerrorenum error,
- icalerrorstate state)
-{
- int i;
-
- for(i = ICAL_BADARG_ERROR; error_state_map[i].error!= ICAL_NO_ERROR;i++){
- if(error_state_map[i].error == error){
- error_state_map[i].state = state;
- }
- }
-}
-
-icalerrorstate icalerror_get_error_state( icalerrorenum error)
-{
- int i;
-
- for(i = ICAL_BADARG_ERROR; error_state_map[i].error!= ICAL_NO_ERROR;i++){
- if(error_state_map[i].error == error){
- return error_state_map[i].state;
- }
- }
-
- return ICAL_ERROR_UNKNOWN;
-}
-
-
-
-
-char* icalerror_strerror(icalerrorenum e) {
-
- int i;
-
- for (i=0; string_map[i].error != ICAL_UNKNOWN_ERROR; i++) {
- if (string_map[i].error == e) {
- return string_map[i].name;
- }
- }
-
- return string_map[i].name; /* Return string for ICAL_UNKNOWN_ERROR*/
-
-}
-
-
-
diff --git a/libical/src/libical/icalerror.h b/libical/src/libical/icalerror.h
deleted file mode 100644
index 790fa90f22..0000000000
--- a/libical/src/libical/icalerror.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalerror.h
- CREATOR: eric 09 May 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalerror.h
-
-======================================================================*/
-
-
-#ifndef ICALERROR_H
-#define ICALERROR_H
-
-#include <assert.h>
-#include <stdio.h> /* For icalerror_warn() */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-/* This routine is called before any error is triggered. It is called
- by icalerror_set_errno, so it does not appear in all of the macros
- below */
-void icalerror_stop_here(void);
-
-void icalerror_crash_here(void);
-
-typedef enum icalerrorenum {
-
- ICAL_BADARG_ERROR,
- ICAL_NEWFAILED_ERROR,
- ICAL_ALLOCATION_ERROR,
- ICAL_MALFORMEDDATA_ERROR,
- ICAL_PARSE_ERROR,
- ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */
- ICAL_FILE_ERROR,
- ICAL_USAGE_ERROR,
- ICAL_UNIMPLEMENTED_ERROR,
- ICAL_UNKNOWN_ERROR, /* Used for problems in input to icalerror_strerror()*/
- ICAL_NO_ERROR
-
-} icalerrorenum;
-
-/* The libical error enumeration, like errno*/
-extern icalerrorenum icalerrno;
-
-/* If true, libicl aborts after a call to icalerror_set_error*/
-extern int icalerror_errors_are_fatal;
-
-/* Warning messages */
-
-#ifdef __GNUC__ca
-#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);}
-#else /* __GNU_C__ */
-#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);}
-#endif /* __GNU_C__ */
-
-
-void icalerror_clear_errno(void);
-void _icalerror_set_errno(icalerrorenum);
-
-/* Make an individual error fatal or non-fatal. */
-typedef enum icalerrorstate {
- ICAL_ERROR_FATAL, /* Not fata */
- ICAL_ERROR_NONFATAL, /* Fatal */
- ICAL_ERROR_DEFAULT, /* Use the value of icalerror_errors_are_fatal*/
- ICAL_ERROR_UNKNOWN /* Asked state for an unknown error type */
-} icalerrorstate ;
-
-char* icalerror_strerror(icalerrorenum e);
-char* icalerror_perror();
-void icalerror_set_error_state( icalerrorenum error, icalerrorstate);
-icalerrorstate icalerror_get_error_state( icalerrorenum error);
-
-
-#define icalerror_set_errno(x) \
-icalerrno = x; \
-if(icalerror_get_error_state(x)==ICAL_ERROR_FATAL || \
- (icalerror_get_error_state(x)==ICAL_ERROR_DEFAULT && \
- icalerror_errors_are_fatal == 1 )){ \
- icalerror_warn(icalerror_strerror(x)); \
- assert(0); \
-}
-
-
-#ifdef ICAL_ERRORS_ARE_FATAL
-#undef NDEBUG
-#endif
-
-#define icalerror_check_value_type(value,type);
-#define icalerror_check_property_type(value,type);
-#define icalerror_check_parameter_type(value,type);
-#define icalerror_check_component_type(value,type);
-
-/* Assert with a message */
-#ifdef ICAL_ERRORS_ARE_FATAL
-
-#ifdef __GNUC__
-#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();}
-#else /*__GNUC__*/
-#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);icalerror_stop_here(); abort();}
-#endif /*__GNUC__*/
-
-#else /* ICAL_ERRORS_ARE_FATAL */
-#define icalerror_assert(test,message)
-#endif /* ICAL_ERRORS_ARE_FATAL */
-
-/* Check & abort if check fails */
-#define icalerror_check_arg(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); }
-
-/* Check & return void if check fails*/
-#define icalerror_check_arg_rv(test,arg) if(!(test)) {icalerror_set_errno(ICAL_BADARG_ERROR); return; }
-
-/* Check & return 0 if check fails*/
-#define icalerror_check_arg_rz(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return 0;}
-
-/* Check & return an error if check fails*/
-#define icalerror_check_arg_re(test,arg,error) if(!(test)) { icalerror_stop_here(); assert(0); return error;}
-
-/* Check & return something*/
-#define icalerror_check_arg_rx(test,arg,x) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return x;}
-
-
-
-/* String interfaces to set an error to NONFATAL and restore it to its
- original value */
-
-icalerrorstate icalerror_supress(const char* error);
-void icalerror_restore(const char* error, icalerrorstate es);
-
-
-#endif /* !ICALERROR_H */
-
-
-
diff --git a/libical/src/libical/icallangbind.c b/libical/src/libical/icallangbind.c
deleted file mode 100644
index 866eb700cc..0000000000
--- a/libical/src/libical/icallangbind.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icallangbind.c
- CREATOR: eric 15 dec 2000
-
- DESCRIPTION:
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- This package is free software and is provided "as is" without
- express or implied warranty. It may be used, redistributed and/or
- modified under the same terms as perl itself. ( Either the Artistic
- License or the GPL. )
-
- ======================================================================*/
-
-#include "icalcomponent.h"
-#include "icalproperty.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-#include <malloc.h>
-#include <string.h>
-
-int* icallangbind_new_array(int size){
- int* p = (int*)malloc(size*sizeof(int));
- return p; /* Caller handles failures */
-}
-
-void icallangbind_free_array(int* array){
- free(array);
-}
-
-int icallangbind_access_array(int* array, int index) {
- return array[index];
-}
-
-
-
-/* LIke icalcomponent_get_first_component, buut takes a string for the
- kind and can iterate over X properties as if each X name was a
- seperate kind */
-icalproperty* icallangbind_get_first_property(icalcomponent *c,
- const char* prop)
-{
- icalproperty_kind kind = icalproperty_string_to_kind(prop);
- icalproperty *p;
-
- if (kind == ICAL_NO_PROPERTY){
- return 0;
- }
-
- if(kind == ICAL_X_PROPERTY){
- for(p = icalcomponent_get_first_property(c,kind);
- p !=0;
- p = icalcomponent_get_next_property(c,kind)){
-
- if(strcmp(icalproperty_get_x_name(p),prop) == 0){
- return p;
- }
- }
- } else {
- p=icalcomponent_get_first_property(c,kind);
-
- return p;
- }
-
- return 0;
-
-}
-
-icalproperty* icallangbind_get_next_property(icalcomponent *c,
- const char* prop)
-{
- icalproperty_kind kind = icalenum_string_to_property_kind(prop);
- icalproperty *p;
-
- if (kind == ICAL_NO_PROPERTY){
- return 0;
- }
-
- if(kind == ICAL_X_PROPERTY){
- for(p = icalcomponent_get_next_property(c,kind);
- p !=0;
- p = icalcomponent_get_next_property(c,kind)){
-
- if(strcmp(icalproperty_get_x_name(p),prop) == 0){
- return p;
- }
- }
- } else {
- p=icalcomponent_get_next_property(c,kind);
-
- return p;
- }
-
- return 0;
-
-}
-
-
-icalcomponent* icallangbind_get_first_component(icalcomponent *c,
- const char* comp)
-{
- icalcomponent_kind kind = icalenum_string_to_component_kind(comp);
-
- if (kind == ICAL_NO_COMPONENT){
- return 0;
- }
- return icalcomponent_get_first_component(c,kind);
-}
-
-icalcomponent* icallangbind_get_next_component(icalcomponent *c,
- const char* comp)
-{
- icalcomponent_kind kind = icalenum_string_to_component_kind(comp);
-
- if (kind == ICAL_NO_COMPONENT){
- return 0;
- }
- return icalcomponent_get_next_component(c,kind);
-}
-
-
-#define APPENDS(x) icalmemory_append_string(&buf, &buf_ptr, &buf_size, x);
-
-#define APPENDC(x) icalmemory_append_char(&buf, &buf_ptr, &buf_size, x);
-
-const char* icallangbind_property_eval_string(icalproperty* prop, char* sep)
-{
- char tmp[25];
- size_t buf_size = 1024;
- char* buf = icalmemory_new_buffer(buf_size);
- char* buf_ptr = buf;
- icalparameter *param;
-
- icalvalue* value;
-
- if( prop == 0){
- return 0;
- }
-
- APPENDS("{ ");
-
- value = icalproperty_get_value(prop);
-
- APPENDS(" 'name' ");
- APPENDS(sep);
- APPENDC('\'');
- APPENDS(icalenum_property_kind_to_string(icalproperty_isa(prop)));
- APPENDC('\'');
-
- if(value){
- APPENDS(", 'value_type' ");
- APPENDS(sep);
- APPENDC('\'');
- APPENDS(icalenum_value_kind_to_string(icalvalue_isa(value)));
- APPENDC('\'');
- }
-
- APPENDS(", 'pid' ");
- APPENDS(sep);
- APPENDC('\'');
- snprintf(tmp,25,"%p",prop);
- APPENDS(tmp);
- APPENDC('\'');
-
-
- if(value){
- switch (icalvalue_isa(value)){
-
- case ICAL_ATTACH_VALUE:
- case ICAL_BINARY_VALUE:
- case ICAL_NO_VALUE: {
- icalerror_set_errno(ICAL_INTERNAL_ERROR);
- break;
- }
-
- default:
- {
- const char* str = icalvalue_as_ical_string(value);
- char* copy = (char*) malloc(strlen(str)+1);
-
- const char *i;
- char *j;
-
- if(copy ==0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- break;
- }
- /* Remove any newlines */
-
- for(j=copy, i = str; *i != 0; j++,i++){
- if(*i=='\n'){
- i++;
- }
- *j = *i;
- }
-
- *j = 0;
-
- APPENDS(", 'value'");
- APPENDS(sep);
- APPENDC('\'');
- APPENDS(copy);
- APPENDC('\'');
-
- free(copy);
- break;
-
- }
- }
- }
-
- /* Add Parameters */
-
- for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER);
- param != 0;
- param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)){
-
- const char* str = icalparameter_as_ical_string(param);
- char *copy = icalmemory_tmp_copy(str);
- char *v;
-
- if(copy == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- continue;
- }
-
- v = strchr(copy,'=');
-
-
- if(v == 0){
- continue;
- }
-
- *v = 0;
-
- v++;
-
- APPENDS(", ");
- APPENDC('\'');
- APPENDS(copy);
- APPENDC('\'');
- APPENDS(sep);
- APPENDC('\'');
- APPENDS(v);
- APPENDC('\'');
-
- }
-
-
- APPENDC('}');
-
- icalmemory_add_tmp_buffer(buf);
- return buf;
-
-}
-
-#include "fcntl.h"
-int icallangbind_string_to_open_flag(const char* str)
-{
- if (strcmp(str,"r") == 0) {return O_RDONLY;}
- else if (strcmp(str,"r+") == 0) {return O_RDWR;}
- else if (strcmp(str,"w") == 0) {return O_WRONLY;}
- else if (strcmp(str,"a") == 0) {return O_WRONLY|O_APPEND;}
- else return -1;
-}
-
diff --git a/libical/src/libical/icallangbind.h b/libical/src/libical/icallangbind.h
deleted file mode 100644
index 2ed50038eb..0000000000
--- a/libical/src/libical/icallangbind.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icallangbind.h
- CREATOR: eric 25 jan 2001
-
- DESCRIPTION:
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- This package is free software and is provided "as is" without
- express or implied warranty. It may be used, redistributed and/or
- modified under the same terms as perl itself. ( Either the Artistic
- License or the GPL. )
-
- ======================================================================*/
-
-#ifndef __ICALLANGBIND_H__
-#define __ICALLANGBIND_H__
-
-int* icallangbind_new_array(int size);
-void icallangbind_free_array(int* array);
-int icallangbind_access_array(int* array, int index);
-icalproperty* icallangbind_get_property(icalcomponent *c, int n, const char* prop);
-const char* icallangbind_get_property_val(icalproperty* p);
-const char* icallangbind_get_parameter(icalproperty *p, const char* parameter);
-icalcomponent* icallangbind_get_component(icalcomponent *c, const char* comp);
-
-icalproperty* icallangbind_get_first_property(icalcomponent *c,
- const char* prop);
-
-icalproperty* icallangbind_get_next_property(icalcomponent *c,
- const char* prop);
-
-icalcomponent* icallangbind_get_first_component(icalcomponent *c,
- const char* comp);
-
-icalcomponent* icallangbind_get_next_component(icalcomponent *c,
- const char* comp);
-
-
-const char* icallangbind_property_eval_string(icalproperty* prop, char* sep);
-
-
-int icallangbind_string_to_open_flag(const char* str);
-#endif /*__ICALLANGBIND_H__*/
diff --git a/libical/src/libical/icallexer.l b/libical/src/libical/icallexer.l
deleted file mode 100644
index d76a7938e3..0000000000
--- a/libical/src/libical/icallexer.l
+++ /dev/null
@@ -1,161 +0,0 @@
-%{
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icallexer.l
- CREATOR: eric 10 June 1999
-
- DESCRIPTION:
-
- $Id: icallexer.l,v 1.8 2001/01/23 20:22:33 jpr Exp $
- $Locker: $
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
- The original code is icalitip.y
-
-
-
- ======================================================================*/
-#include "icalparser.h"
-#include "icalenums.h"
-#include "icalmemory.h"
-#include "assert.h"
-#include "icalyacc.h"
-
-#include <string.h> /* For strdup() */
-
-int icalparser_flex_input(char* buf, int max_size);
-void icalparser_clear_flex_input(void);
-
-
-#define ICAL_MAX_STR_CONST 1024
-
-#undef YY_INPUT
-#define YY_INPUT(b,r,ms) ( r= icalparser_flex_input(b,ms))
-#undef yywrap
-
-#undef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) ical_yyerror(msg)
-
-icalvalue_kind value_kind=ICAL_NO_VALUE;
-void set_parser_value_state(icalvalue_kind kind);
-extern int yydebug;
-
-void ical_yyerror(char *s);
-
-void init_str_buf(void);
-
-int last_state;
-
-char *str_buf;
-char *str_buf_p;
-size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/
-
-%}
-
-crlf \x0D?\x0A
-space [ ]
-qsafechar [^\x00-\x1F\"]
-safechar [^\x00-\x1F\"\:\;\,]
-tsafechar [\x20-\x21\x23-\x2B\x2D-\x39\x3C-\x5B\x5D-\x7E]
-valuechar [^\x00-\x08\x10-\x1F]
-xname X-[a-zA-Z0-9\-]+
-xname2 [a-zA-Z0-9\-\ ]
-paramtext {safechar}+
-value {valuechar}+
-quotedstring \"{qsafechar}+\"
-digit [0-9]
-
-%array /* Make yytext an array. Slow, but handy. HACK */
-
-%option caseless
-
-%s quoted_string
-%s binary_value boolean_value uri_value time_value duration_value number_value period_value recur_value text_value utcoffset_value
-%s enum_param_value string_param_value stringlist_param_value keyword line_start component seperator parameter end_of_value paramtext
-
-
-
-%%
-
-%{
-%}
-
-
-<time_value>{
-{digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext) ;
- return DIGITS; }
-T { return TIME_CHAR; }
-Z { return UTC_CHAR; }
-[\/\+\-PWHMSD] { return yytext[0]; }
-{crlf} { return EOL;}
-
-}
-
-<utcoffset_value>{
-{crlf} { return EOL;}
-\-|\+ { return yytext[0]; }
-{digit}{digit} { ical_yylval.v_int=atoi(yytext); return INTNUMBER; }
-
-}
-
-<enum_param_value>{
-. { return CHARACTER; }
-{crlf} { return EOL;}
-
-}
-
-<seperator>{
-, { BEGIN(last_state); return COMMA; }
-}
-
-
-%%
-
-int yywrap()
-{
- return 1;
-}
-
-
-void set_parser_value_state(icalvalue_kind kind)
-{
-
- switch (kind){
-
- case ICAL_UTCOFFSET_VALUE:
- {BEGIN(utcoffset_value);break;}
-
- case ICAL_DATETIMEPERIOD_VALUE:
- case ICAL_DURATION_VALUE:
- case ICAL_PERIOD_VALUE:
- {BEGIN(time_value);break;}
-
- default:
- {
- assert(1==0);
- }
- }
-}
-
-void init_str_buf(void)
-{
- str_buf = icalmemory_tmp_buffer(ICAL_MAX_STR_CONST);
- str_buf_p = str_buf;
- buf_sz = ICAL_MAX_STR_CONST;
-
-
-}
-
diff --git a/libical/src/libical/icalmemory.c b/libical/src/libical/icalmemory.c
deleted file mode 100644
index 297ead8826..0000000000
--- a/libical/src/libical/icalmemory.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalmemory.c
- CREATOR: eric 30 June 1999
-
- $Id$
- $Locker$
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is icalmemory.h
-
- ======================================================================*/
-
-/* libical often passes strings back to the caller. To make these
- * interfaces simple, I did not want the caller to have to pass in a
- * memory buffer, but having libical pass out newly allocated memory
- * makes it difficult to de-allocate the memory.
- *
- * The ring buffer in this scheme makes it possible for libical to pass
- * out references to memory which the caller does not own, and be able
- * to de-allocate the memory later. The ring allows libical to have
- * several buffers active simultaneously, which is handy when creating
- * string representations of components. */
-
-#define ICALMEMORY_C
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-#include "icalmemory.h"
-#include "icalerror.h"
-
-#include <stdio.h> /* for printf (debugging) */
-#include <stdlib.h> /* for malloc, realloc */
-#include <string.h> /* for memset(), strdup */
-
-#define BUFFER_RING_SIZE 25
-#define MIN_BUFFER_SIZE 200
-
-void icalmemory_free_tmp_buffer (void* buf);
-
-
-/* HACK. Not threadsafe */
-void* buffer_ring[BUFFER_RING_SIZE];
-int buffer_pos = -1;
-int initialized = 0;
-
-/* Add an existing buffer to the buffer ring */
-void icalmemory_add_tmp_buffer(void* buf)
-{
- /* I don't think I need this -- I think static arrays are
- initialized to 0 as a standard part of C, but I am not sure. */
- if (initialized == 0){
- int i;
- for(i=0; i<BUFFER_RING_SIZE; i++){
- buffer_ring[i] = 0;
- }
- initialized = 1;
- }
-
- /* Wrap around the ring */
- if(++buffer_pos == BUFFER_RING_SIZE){
- buffer_pos = 0;
- }
-
- /* Free buffers as their slots are overwritten */
- if ( buffer_ring[buffer_pos] != 0){
- free( buffer_ring[buffer_pos]);
- buffer_ring[buffer_pos] = 0;
- }
-
- /* Assign the buffer to a slot */
- buffer_ring[buffer_pos] = buf;
-}
-
-/* Create a new temporary buffer on the ring. Libical owns these and
- wil deallocate them. */
-void*
-icalmemory_tmp_buffer (size_t size)
-{
- char *buf;
-
- if (size < MIN_BUFFER_SIZE){
- size = MIN_BUFFER_SIZE;
- }
-
- buf = (void*)malloc(size);
-
- if( buf == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memset(buf,0,size);
-
- icalmemory_add_tmp_buffer(buf);
-
- return buf;
-}
-
-void icalmemory_free_ring()
-{
-
- int i;
- for(i=0; i<BUFFER_RING_SIZE; i++){
- if ( buffer_ring[i] != 0){
- free( buffer_ring[i]);
- }
- buffer_ring[i] = 0;
- }
-
- initialized = 1;
-
-}
-
-
-
-/* Like strdup, but the buffer is on the ring. */
-char*
-icalmemory_tmp_copy(const char* str)
-{
- char* b = icalmemory_tmp_buffer(strlen(str)+1);
-
- strcpy(b,str);
-
- return b;
-}
-
-
-char* icalmemory_strdup(const char *s)
-{
- return strdup(s);
-}
-
-void
-icalmemory_free_tmp_buffer (void* buf)
-{
- if(buf == 0)
- {
- return;
- }
-
- free(buf);
-}
-
-
-/* These buffer routines create memory the old fashioned way -- so the
- caller will have to delocate the new memory */
-
-void* icalmemory_new_buffer(size_t size)
-{
- void *b = malloc(size);
-
- if( b == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memset(b,0,size);
-
- return b;
-}
-
-void* icalmemory_resize_buffer(void* buf, size_t size)
-{
- void *b = realloc(buf, size);
-
- if( b == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- return b;
-}
-
-void icalmemory_free_buffer(void* buf)
-{
- free(buf);
-}
-
-void
-icalmemory_append_string(char** buf, char** pos, size_t* buf_size,
- const char* string)
-{
- char *new_buf;
- char *new_pos;
-
- size_t data_length, final_length, string_length;
-
-#ifndef ICAL_NO_INTERNAL_DEBUG
- icalerror_check_arg_rv( (buf!=0),"buf");
- icalerror_check_arg_rv( (*buf!=0),"*buf");
- icalerror_check_arg_rv( (pos!=0),"pos");
- icalerror_check_arg_rv( (*pos!=0),"*pos");
- icalerror_check_arg_rv( (buf_size!=0),"buf_size");
- icalerror_check_arg_rv( (*buf_size!=0),"*buf_size");
- icalerror_check_arg_rv( (string!=0),"string");
-#endif
-
- string_length = strlen(string);
- data_length = (size_t)*pos - (size_t)*buf;
- final_length = data_length + string_length;
-
- if ( final_length >= (size_t) *buf_size) {
-
-
- *buf_size = (*buf_size) * 2 + final_length;
-
- new_buf = realloc(*buf,*buf_size);
-
- new_pos = (void*)((size_t)new_buf + data_length);
-
- *pos = new_pos;
- *buf = new_buf;
- }
-
- strcpy(*pos, string);
-
- *pos += string_length;
-}
-
-
-void
-icalmemory_append_char(char** buf, char** pos, size_t* buf_size,
- char ch)
-{
- char *new_buf;
- char *new_pos;
-
- size_t data_length, final_length;
-
-#ifndef ICAL_NO_INTERNAL_DEBUG
- icalerror_check_arg_rv( (buf!=0),"buf");
- icalerror_check_arg_rv( (*buf!=0),"*buf");
- icalerror_check_arg_rv( (pos!=0),"pos");
- icalerror_check_arg_rv( (*pos!=0),"*pos");
- icalerror_check_arg_rv( (buf_size!=0),"buf_size");
- icalerror_check_arg_rv( (*buf_size!=0),"*buf_size");
-#endif
-
- data_length = (size_t)*pos - (size_t)*buf;
-
- final_length = data_length + 2;
-
- if ( final_length > (size_t) *buf_size ) {
-
-
- *buf_size = (*buf_size) * 2 + final_length +1;
-
- new_buf = realloc(*buf,*buf_size);
-
- new_pos = (void*)((size_t)new_buf + data_length);
-
- *pos = new_pos;
- *buf = new_buf;
- }
-
- **pos = ch;
- *pos += 1;
- **pos = 0;
-}
diff --git a/libical/src/libical/icalmemory.h b/libical/src/libical/icalmemory.h
deleted file mode 100644
index 52364e289f..0000000000
--- a/libical/src/libical/icalmemory.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalmemory.h
- CREATOR: eric 30 June 1999
-
-
- $Id$
- $Locker$
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Initial Developer of the Original Code is Eric Busboom
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-======================================================================*/
-
-#ifndef ICALMEMORY_H
-#define ICALMEMORY_H
-
-#include <sys/types.h> /* for size_t */
-
-
-/* Tmp buffers are managed by ical. References can be returned to the
- caller, although the caller will not own the memory. */
-
-void* icalmemory_tmp_buffer(size_t size);
-char* icalmemory_tmp_copy(const char* str);
-
-/* Add an externally allocated buffer to the ring. */
-void icalmemory_add_tmp_buffer(void*);
-
-
-/* Free all memory used in the ring */
-void icalmemory_free_ring(void);
-
-/* Non-tmp buffers must be freed. These are mostly wrappers around
- * malloc, etc, but are used so the caller can change the memory
- * allocators in a future version of the library */
-
-void* icalmemory_new_buffer(size_t size);
-void* icalmemory_resize_buffer(void* buf, size_t size);
-void icalmemory_free_buffer(void* buf);
-
-/* icalmemory_append_string will copy the string 'string' to the
- buffer 'buf' starting at position 'pos', reallocing 'buf' if it is
- too small. 'buf_size' is the size of 'buf' and will be changed if
- 'buf' is reallocated. 'pos' will point to the last byte of the new
- string in 'buf', usually a '\0' */
-
-/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on
- normally allocated memory, or on buffers created from
- icalmemory_new_buffer, never with buffers created by
- icalmemory_tmp_buffer. If icalmemory_append_string has to resize a
- buffer on the ring, the ring will loose track of it an you will
- have memory problems. */
-
-void icalmemory_append_string(char** buf, char** pos, size_t* buf_size,
- const char* string);
-
-/* icalmemory_append_char is similar, but is appends a character instead of a string */
-void icalmemory_append_char(char** buf, char** pos, size_t* buf_size,
- char ch);
-
-/* A wrapper around strdup. Partly to trap calls to strdup, partly
- because in -ansi, gcc on Red Hat claims that strudup is undeclared */
-char* icalmemory_strdup(const char *s);
-
-#endif /* !ICALMEMORY_H */
-
-
-
diff --git a/libical/src/libical/icalmime.c b/libical/src/libical/icalmime.c
deleted file mode 100644
index 6e11e9e326..0000000000
--- a/libical/src/libical/icalmime.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/* -*- Mode: C -*-*/
-/*======================================================================
- FILE: icalmime.c
- CREATOR: eric 26 July 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#include "icalmime.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "sspm.h"
-#include "stdlib.h"
-#include <string.h> /* For strdup */
-#include <stdio.h> /* for snprintf*/
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-
-/* These *_part routines are called by the MIME parser via the
- local_action_map */
-
-struct text_part
-{
- char* buf;
- char* buf_pos;
- size_t buf_size;
-};
-
-void* icalmime_text_new_part()
-{
-
-#define BUF_SIZE 2048
-
- struct text_part* impl;
-
- if ( ( impl = (struct text_part*)
- malloc(sizeof(struct text_part))) == 0) {
- return 0;
- }
-
- impl->buf = icalmemory_new_buffer(BUF_SIZE);
- impl->buf_pos = impl->buf;
- impl->buf_size = BUF_SIZE;
-
- return impl;
-}
-void icalmime_text_add_line(void *part,
- struct sspm_header *header,
- char* line, size_t size)
-{
- struct text_part* impl = (struct text_part*) part;
-
- icalmemory_append_string(&(impl->buf),&(impl->buf_pos),
- &(impl->buf_size),line);
-
-}
-
-void* icalmime_textcalendar_end_part(void* part)
-{
-
- struct text_part* impl = (struct text_part*) part;
- icalcomponent *c = icalparser_parse_string(impl->buf);
-
- icalmemory_free_buffer(impl->buf);
- free(impl);
-
- return c;
-
-}
-
-void* icalmime_text_end_part(void* part)
-{
- struct text_part* impl = ( struct text_part*) part;
-
- icalmemory_add_tmp_buffer(impl->buf);
- free(impl);
-
- return impl->buf;
-}
-
-void icalmime_text_free_part(void *part)
-{
- part = part;
-}
-
-
-/* Ignore Attachments for now */
-
-void* icalmime_attachment_new_part()
-{
- return 0;
-}
-void icalmime_attachment_add_line(void *part, struct sspm_header *header,
- char* line, size_t size)
-{
- part = part;
- header = header;
- line = line;
- size = size;
-}
-
-void* icalmime_attachment_end_part(void* part)
-{
- return 0;
-}
-
-void icalmime_attachment_free_part(void *part)
-{
-}
-
-
-
-
-struct sspm_action_map icalmime_local_action_map[] =
-{
- {SSPM_TEXT_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_text_new_part,icalmime_text_add_line,icalmime_textcalendar_end_part,icalmime_text_free_part},
- {SSPM_TEXT_MAJOR_TYPE,SSPM_ANY_MINOR_TYPE,icalmime_text_new_part,icalmime_text_add_line,icalmime_text_end_part,icalmime_text_free_part},
- {SSPM_TEXT_MAJOR_TYPE,SSPM_PLAIN_MINOR_TYPE,icalmime_text_new_part,icalmime_text_add_line,icalmime_text_end_part,icalmime_text_free_part},
- {SSPM_APPLICATION_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
- {SSPM_IMAGE_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
- {SSPM_AUDIO_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
- {SSPM_IMAGE_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
- {SSPM_UNKNOWN_MAJOR_TYPE,SSPM_UNKNOWN_MINOR_TYPE,0,0,0,0}
-};
-
-#define NUM_PARTS 100 /* HACK. Hard Limit */
-
-
-
-struct sspm_part* icalmime_make_part(icalcomponent* comp)
-{
- comp = comp;
- return 0;
-}
-
-char* icalmime_as_mime_string(char* icalcomponent);
-
-icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size,
- void *d),
- void *data)
-{
- struct sspm_part *parts;
- int i, last_level=0;
- icalcomponent *root=0, *parent=0, *comp=0, *last = 0;
-
- if ( (parts = (struct sspm_part *)
- malloc(NUM_PARTS*sizeof(struct sspm_part)))==0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memset(parts,0,sizeof(parts));
-
- sspm_parse_mime(parts,
- NUM_PARTS, /* Max parts */
- icalmime_local_action_map, /* Actions */
- get_string,
- data, /* data for get_string*/
- 0 /* First header */);
-
-
-
- for(i = 0; i <NUM_PARTS && parts[i].header.major != SSPM_NO_MAJOR_TYPE ; i++){
-
-#define TMPSZ 1024
- char mimetype[TMPSZ];
- char* major = sspm_major_type_string(parts[i].header.major);
- char* minor = sspm_minor_type_string(parts[i].header.minor);
-
- if(parts[i].header.minor == SSPM_UNKNOWN_MINOR_TYPE ){
- assert(parts[i].header.minor_text !=0);
- minor = parts[i].header.minor_text;
- }
-
- sprintf(mimetype,"%s/%s",major,minor);
-
- comp = icalcomponent_new(ICAL_XLICMIMEPART_COMPONENT);
-
- if(comp == 0){
- /* HACK Handle Error */
- assert(0);
- }
-
- if(parts[i].header.error!=SSPM_NO_ERROR){
- char *str;
- char* temp[256];
-
- if(parts[i].header.error==SSPM_UNEXPECTED_BOUNDARY_ERROR){
- str = "Got an unexpected boundary, possibly due to a MIME header for a MULTIPART part that is missing the Content-Type line";
- }
-
- if(parts[i].header.error==SSPM_WRONG_BOUNDARY_ERROR){
- str = "Got the wrong boundary for the opening of a MULTIPART part.";
- }
-
- if(parts[i].header.error==SSPM_NO_BOUNDARY_ERROR){
- str = "Got a multipart header that did not specify a boundary";
- }
-
- if(parts[i].header.error==SSPM_NO_HEADER_ERROR){
- str = "Did not get a header for the part. Is there a blank\
-line between the header and the previous boundary\?";
-
- }
-
- if(parts[i].header.error_text != 0){
- snprintf((char*)temp,256,
- "%s: %s",str,parts[i].header.error_text);
- } else {
- strcpy((char*)temp,str);
- }
-
- icalcomponent_add_property
- (comp,
- icalproperty_vanew_xlicerror(
- (char*)temp,
- icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_MIMEPARSEERROR),
- 0));
- }
-
- if(parts[i].header.major != SSPM_NO_MAJOR_TYPE &&
- parts[i].header.major != SSPM_UNKNOWN_MAJOR_TYPE){
-
- icalcomponent_add_property(comp,
- icalproperty_new_xlicmimecontenttype((char*)
- icalmemory_strdup(mimetype)));
-
- }
-
- if (parts[i].header.encoding != SSPM_NO_ENCODING){
-
- icalcomponent_add_property(comp,
- icalproperty_new_xlicmimeencoding(
- sspm_encoding_string(parts[i].header.encoding)));
- }
-
- if (parts[i].header.filename != 0){
- icalcomponent_add_property(comp,
- icalproperty_new_xlicmimefilename(parts[i].header.filename));
- }
-
- if (parts[i].header.content_id != 0){
- icalcomponent_add_property(comp,
- icalproperty_new_xlicmimecid(parts[i].header.content_id));
- }
-
- if (parts[i].header.charset != 0){
- icalcomponent_add_property(comp,
- icalproperty_new_xlicmimecharset(parts[i].header.charset));
- }
-
- /* Add iCal components as children of the component */
- if(parts[i].header.major == SSPM_TEXT_MAJOR_TYPE &&
- parts[i].header.minor == SSPM_CALENDAR_MINOR_TYPE &&
- parts[i].data != 0){
-
- icalcomponent_add_component(comp,
- (icalcomponent*)parts[i].data);
- parts[i].data = 0;
-
- } else if(parts[i].header.major == SSPM_TEXT_MAJOR_TYPE &&
- parts[i].header.minor != SSPM_CALENDAR_MINOR_TYPE &&
- parts[i].data != 0){
-
- /* Add other text components as "DESCRIPTION" properties */
-
- icalcomponent_add_property(comp,
- icalproperty_new_description(
- (char*)icalmemory_strdup((char*)parts[i].data)));
-
- parts[i].data = 0;
- }
-
-
- if(root!= 0 && parts[i].level == 0){
- /* We've already assigned the root, but there is another
- part at the root level. This is probably a parse
- error*/
- icalcomponent_free(comp);
- continue;
- }
-
- if(parts[i].level == last_level && last_level != 0){
- icalerror_assert(parent!=0,"No parent for adding component");
-
- icalcomponent_add_component(parent,comp);
-
- } else if (parts[i].level == last_level && last_level == 0 &&
- root == 0) {
-
- root = comp;
- parent = comp;
-
- } else if (parts[i].level > last_level){
-
- parent = last;
- icalcomponent_add_component(parent,comp);
-
- last_level = parts[i].level;
-
- } else if (parts[i].level < last_level){
-
- parent = icalcomponent_get_parent(parent);
- icalcomponent_add_component(parent,comp);
-
- last_level = parts[i].level;
- } else {
- assert(0);
- }
-
- last = comp;
- last_level = parts[i].level;
- assert(parts[i].data == 0);
- }
-
- sspm_free_parts(parts,NUM_PARTS);
- free(parts);
-
- return root;
-}
-
-
-
-int icalmime_test(char* (*get_string)(char *s, size_t size, void *d),
- void *data)
-{
- char *out;
- struct sspm_part *parts;
- int i;
-
- if ( (parts = (struct sspm_part *)
- malloc(NUM_PARTS*sizeof(struct sspm_part)))==0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memset(parts,0,sizeof(parts));
-
- sspm_parse_mime(parts,
- NUM_PARTS, /* Max parts */
- icalmime_local_action_map, /* Actions */
- get_string,
- data, /* data for get_string*/
- 0 /* First header */);
-
- for(i = 0; i <NUM_PARTS && parts[i].header.major != SSPM_NO_MAJOR_TYPE ;
- i++){
- if(parts[i].header.minor == SSPM_CALENDAR_MINOR_TYPE){
- parts[i].data = icalmemory_strdup(
- icalcomponent_as_ical_string((icalcomponent*)parts[i].data));
- }
- }
-
- sspm_write_mime(parts,NUM_PARTS,&out,"To: bob@bob.org");
-
- printf("%s\n",out);
-
- return 0;
-
-}
-
-
diff --git a/libical/src/libical/icalmime.h b/libical/src/libical/icalmime.h
deleted file mode 100644
index b22288842d..0000000000
--- a/libical/src/libical/icalmime.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalmime.h
- CREATOR: eric 26 July 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-======================================================================*/
-
-#ifndef ICALMIME_H
-#define ICALMIME_H
-
-#include "icalcomponent.h"
-#include "icalparser.h"
-
-icalcomponent* icalmime_parse( char* (*line_gen_func)(char *s, size_t size,
- void *d),
- void *data);
-
-/* The inverse of icalmime_parse, not implemented yet. Use sspm.h directly. */
-char* icalmime_as_mime_string(char* component);
-
-
-
-#endif /* !ICALMIME_H */
-
-
-
diff --git a/libical/src/libical/icalparameter.c b/libical/src/libical/icalparameter.c
deleted file mode 100644
index 7e0d15cef3..0000000000
--- a/libical/src/libical/icalparameter.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalderivedparameters.{c,h}
- CREATOR: eric 09 May 1999
-
- $Id$
- $Locker$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalderivedparameters.{c,h}
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
- ======================================================================*/
-/*#line 29 "icalparameter.c.in"*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "icalparameter.h"
-#include "icalproperty.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalparameterimpl.h"
-
-#include <stdlib.h> /* for malloc() */
-#include <errno.h>
-#include <string.h> /* for memset() */
-
-/* In icalderivedparameter */
-icalparameter* icalparameter_new_from_value_string(icalparameter_kind kind,const char* val);
-
-
-struct icalparameter_impl* icalparameter_new_impl(icalparameter_kind kind)
-{
- struct icalparameter_impl* v;
-
- if ( ( v = (struct icalparameter_impl*)
- malloc(sizeof(struct icalparameter_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy(v->id,"para");
-
- v->kind = kind;
- v->size = 0;
- v->string = 0;
- v->x_name = 0;
- v->parent = 0;
- v->data = 0;
-
- return v;
-}
-
-icalparameter*
-icalparameter_new (icalparameter_kind kind)
-{
- struct icalparameter_impl* v = icalparameter_new_impl(kind);
-
- return (icalparameter*) v;
-
-}
-
-void
-icalparameter_free (icalparameter* parameter)
-{
- struct icalparameter_impl * impl;
-
- impl = (struct icalparameter_impl*)parameter;
-
-/* HACK. This always triggers, even when parameter is non-zero
- icalerror_check_arg_rv((parameter==0),"parameter");*/
-
-
-#ifdef ICAL_FREE_ON_LIST_IS_ERROR
- icalerror_assert( (impl->parent ==0),"Tried to free a parameter that is still attached to a component. ");
-
-#else
- if(impl->parent !=0){
- return;
- }
-#endif
-
-
- if (impl->string != 0){
- free ((void*)impl->string);
- }
-
- if (impl->x_name != 0){
- free ((void*)impl->x_name);
- }
-
- memset(impl,0,sizeof(impl));
-
- impl->parent = 0;
- impl->id[0] = 'X';
- free(impl);
-}
-
-
-
-icalparameter*
-icalparameter_new_clone(icalparameter* param)
-{
- struct icalparameter_impl *old;
- struct icalparameter_impl *new;
-
- old = (struct icalparameter_impl *)param;
- new = icalparameter_new_impl(old->kind);
-
- icalerror_check_arg_rz((param!=0),"param");
-
- if (new == 0){
- return 0;
- }
-
- memcpy(new,old,sizeof(struct icalparameter_impl));
-
- if (old->string != 0){
- new->string = icalmemory_strdup(old->string);
- if (new->string == 0){
- icalparameter_free(new);
- return 0;
- }
- }
-
- if (old->x_name != 0){
- new->x_name = icalmemory_strdup(old->x_name);
- if (new->x_name == 0){
- icalparameter_free(new);
- return 0;
- }
- }
-
- return new;
-}
-
-icalparameter* icalparameter_new_from_string(const char *str)
-{
- char* eq;
- char* cpy;
- icalparameter_kind kind;
- icalparameter *param;
-
- icalerror_check_arg_rz(str != 0,"str");
-
- cpy = icalmemory_strdup(str);
-
- if (cpy == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- eq = strchr(cpy,'=');
-
- if(eq == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- *eq = '\0';
-
- eq++;
-
- kind = icalparameter_string_to_kind(cpy);
-
- if(kind == ICAL_NO_PARAMETER){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- param = icalparameter_new_from_value_string(kind,eq);
-
- if(kind == ICAL_X_PARAMETER){
- icalparameter_set_xname(param,cpy);
- }
-
- free(cpy);
-
- return param;
-
-}
-
-char*
-icalparameter_as_ical_string (icalparameter* parameter)
-{
- struct icalparameter_impl* impl;
- size_t buf_size = 1024;
- char* buf;
- char* buf_ptr;
- char *out_buf;
- const char *kind_string;
-
- icalerror_check_arg_rz( (parameter!=0), "parameter");
-
- /* Create new buffer that we can append names, parameters and a
- value to, and reallocate as needed. Later, this buffer will be
- copied to a icalmemory_tmp_buffer, which is managed internally
- by libical, so it can be given to the caller without fear of
- the caller forgetting to free it */
-
- buf = icalmemory_new_buffer(buf_size);
- buf_ptr = buf;
- impl = (struct icalparameter_impl*)parameter;
-
- if(impl->kind == ICAL_X_PARAMETER) {
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size,
- icalparameter_get_xname(impl));
-
- } else {
-
- kind_string = icalparameter_kind_to_string(impl->kind);
-
- if (impl->kind == ICAL_NO_PARAMETER ||
- impl->kind == ICAL_ANY_PARAMETER ||
- kind_string == 0)
- {
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return 0;
- }
-
-
- /* Put the parameter name into the string */
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string);
-
- }
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "=");
-
- if(impl->string !=0){
- int qm = 0;
-
- /* Encapsulate the property in quotes if necessary */
- if (strchr (impl->string, ';') != 0 || strchr (impl->string, ':') != 0) {
- icalmemory_append_char (&buf, &buf_ptr, &buf_size, '"');
- qm = 1;
- }
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, impl->string);
- if (qm == 1) {
- icalmemory_append_char (&buf, &buf_ptr, &buf_size, '"');
- }
- } else if (impl->data != 0){
- const char* str = icalparameter_enum_to_string(impl->data);
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, str);
- } else {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- /* Now, copy the buffer to a tmp_buffer, which is safe to give to
- the caller without worring about de-allocating it. */
-
- out_buf = icalmemory_tmp_buffer(strlen(buf));
- strcpy(out_buf, buf);
-
- icalmemory_free_buffer(buf);
-
- return out_buf;
-
-}
-
-
-int
-icalparameter_is_valid (icalparameter* parameter);
-
-
-icalparameter_kind
-icalparameter_isa (icalparameter* parameter)
-{
- if(parameter == 0){
- return ICAL_NO_PARAMETER;
- }
-
- return ((struct icalparameter_impl *)parameter)->kind;
-}
-
-
-int
-icalparameter_isa_parameter (void* parameter)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl *)parameter;
-
- if (parameter == 0){
- return 0;
- }
-
- if (strcmp(impl->id,"para") == 0) {
- return 1;
- } else {
- return 0;
- }
-}
-
-
-void
-icalparameter_set_xname (icalparameter* param, const char* v)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
- icalerror_check_arg_rv( (param!=0),"param");
- icalerror_check_arg_rv( (v!=0),"v");
-
- if (impl->x_name != 0){
- free((void*)impl->x_name);
- }
-
- impl->x_name = icalmemory_strdup(v);
-
- if (impl->x_name == 0){
- errno = ENOMEM;
- }
-
-}
-
-const char*
-icalparameter_get_xname (icalparameter* param)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
- icalerror_check_arg_rz( (param!=0),"param");
-
- return impl->x_name;
-}
-
-void
-icalparameter_set_xvalue (icalparameter* param, const char* v)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
-
- icalerror_check_arg_rv( (param!=0),"param");
- icalerror_check_arg_rv( (v!=0),"v");
-
- if (impl->string != 0){
- free((void*)impl->string);
- }
-
- impl->string = icalmemory_strdup(v);
-
- if (impl->string == 0){
- errno = ENOMEM;
- }
-
-}
-
-const char*
-icalparameter_get_xvalue (icalparameter* param)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
-
- icalerror_check_arg_rz( (param!=0),"param");
-
- return impl->string;
-
-}
-
-void icalparameter_set_parent(icalparameter* param,
- icalproperty* property)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
-
- icalerror_check_arg_rv( (param!=0),"param");
-
- impl->parent = property;
-}
-
-icalproperty* icalparameter_get_parent(icalparameter* param)
-{
- struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
-
- icalerror_check_arg_rz( (param!=0),"param");
-
- return impl->parent;
-}
-
-
-/* Everything below this line is machine generated. Do not edit. */
-/* ALTREP */
diff --git a/libical/src/libical/icalparameter.h b/libical/src/libical/icalparameter.h
deleted file mode 100644
index 3f3b59f049..0000000000
--- a/libical/src/libical/icalparameter.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalparam.h
- CREATOR: eric 20 March 1999
-
-
- $Id$
- $Locker$
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalparam.h
-
- ======================================================================*/
-
-#ifndef ICALPARAM_H
-#define ICALPARAM_H
-
-#include "icalderivedparameter.h"
-
-/* Declared in icalderivedparameter.h */
-/*typedef void icalparameter;*/
-
-icalparameter* icalparameter_new(icalparameter_kind kind);
-icalparameter* icalparameter_new_clone(icalparameter* p);
-
-/* Create from string of form "PARAMNAME=VALUE" */
-icalparameter* icalparameter_new_from_string(const char* value);
-
-/* Create from just the value, the part after the "=" */
-icalparameter* icalparameter_new_from_value_string(icalparameter_kind kind, const char* value);
-
-void icalparameter_free(icalparameter* parameter);
-
-char* icalparameter_as_ical_string(icalparameter* parameter);
-
-int icalparameter_is_valid(icalparameter* parameter);
-
-icalparameter_kind icalparameter_isa(icalparameter* parameter);
-
-int icalparameter_isa_parameter(void* param);
-
-/* Acess the name of an X parameer */
-void icalparameter_set_xname (icalparameter* param, const char* v);
-const char* icalparameter_get_xname(icalparameter* param);
-void icalparameter_set_xvalue (icalparameter* param, const char* v);
-const char* icalparameter_get_xvalue(icalparameter* param);
-
-/* Convert enumerations */
-
-const char* icalparameter_kind_to_string(icalparameter_kind kind);
-icalparameter_kind icalparameter_string_to_kind(const char* string);
-
-
-
-#endif
diff --git a/libical/src/libical/icalparameterimpl.h b/libical/src/libical/icalparameterimpl.h
deleted file mode 100644
index 2d0fdd642d..0000000000
--- a/libical/src/libical/icalparameterimpl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalparameterimpl.h
- CREATOR: eric 09 May 1999
-
- $Id$
- $Locker$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalderivedparameters.{c,h}
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
- ======================================================================*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef ICALPARAMETER_IMPL
-#define ICALPARAMETER_IMPL
-
-#include "icalparameter.h"
-#include "icalproperty.h"
-
-struct icalparameter_impl
-{
- icalparameter_kind kind;
- char id[5];
- int size;
- const char* string;
- const char* x_name;
- icalproperty* parent;
-
- int data;
-};
-
-
-#endif /*ICALPARAMETER_IMPL*/
diff --git a/libical/src/libical/icalparser.c b/libical/src/libical/icalparser.c
deleted file mode 100644
index 4a389540f0..0000000000
--- a/libical/src/libical/icalparser.c
+++ /dev/null
@@ -1,1121 +0,0 @@
-/* -*- Mode: C; tab-width: 4; c-basic-offset: 8; -*-
- ======================================================================
- FILE: icalparser.c
- CREATOR: eric 04 August 1999
-
- $Id$
- $Locker$
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Initial Developer of the Original Code is Eric Busboom
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-#include "icalparser.h"
-#include "pvl.h"
-#include "icalmemory.h"
-#include "icalerror.h"
-#include "icalvalue.h"
-#include "icalderivedparameter.h"
-#include "icalparameter.h"
-#include "icalproperty.h"
-#include "icalcomponent.h"
-
-#include <string.h> /* For strncpy & size_t */
-#include <stdio.h> /* For FILE and fgets and sprintf */
-#include <stdlib.h> /* for free */
-
-
-extern icalvalue* icalparser_yy_value;
-void set_parser_value_state(icalvalue_kind kind);
-int ical_yyparse(void);
-
-char* icalparser_get_next_char(char c, char *str, int qm);
-char* icalparser_get_next_parameter(char* line,char** end);
-char* icalparser_get_next_value(char* line, char **end, icalvalue_kind kind);
-char* icalparser_get_prop_name(char* line, char** end);
-char* icalparser_get_param_name(char* line, char **end);
-
-#define TMP_BUF_SIZE 80
-
-struct icalparser_impl
-{
- int buffer_full; /* flag indicates that temp is smaller that
- data being read into it*/
- int continuation_line; /* last line read was a continuation line */
- size_t tmp_buf_size;
- char temp[TMP_BUF_SIZE];
- icalcomponent *root_component;
- int version;
- int level;
- int lineno;
- icalparser_state state;
- pvl_list components;
-
- void *line_gen_data;
-
-};
-
-
-icalparser* icalparser_new(void)
-{
- struct icalparser_impl* impl = 0;
- if ( ( impl = (struct icalparser_impl*)
- malloc(sizeof(struct icalparser_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- impl->root_component = 0;
- impl->components = pvl_newlist();
- impl->level = 0;
- impl->state = ICALPARSER_SUCCESS;
-
- impl->tmp_buf_size = TMP_BUF_SIZE;
- impl->buffer_full = 0;
- impl->continuation_line = 0;
- impl->lineno = 0;
-
- memset(impl->temp,0, TMP_BUF_SIZE);
-
- return (icalparser*)impl;
-}
-
-
-void icalparser_free(icalparser* parser)
-{
- struct icalparser_impl* impl = (struct icalparser_impl*)parser;
- icalcomponent *c;
-
- if (impl->root_component != 0){
- icalcomponent_free(impl->root_component);
- }
-
- while( (c=pvl_pop(impl->components)) != 0){
- icalcomponent_free(c);
- }
-
- pvl_free(impl->components);
-
- free(impl);
-}
-
-void icalparser_set_gen_data(icalparser* parser, void* data)
-{
- struct icalparser_impl* impl = (struct icalparser_impl*)parser;
-
- impl->line_gen_data = data;
-}
-
-
-icalvalue* icalvalue_new_From_string_with_error(icalvalue_kind kind,
- char* str,
- icalproperty **error);
-
-
-
-char* icalparser_get_next_char(char c, char *str, int qm)
-{
- int quote_mode = 0;
- char* p;
-
-
- for(p=str; *p!=0; p++){
- if (qm == 1) {
- if ( quote_mode == 0 && *p=='"' && *(p-1) != '\\' ){
- quote_mode =1;
- continue;
- }
-
- if ( quote_mode == 1 && *p=='"' && *(p-1) != '\\' ){
- quote_mode =0;
- continue;
- }
- }
-
- if (quote_mode == 0 && *p== c && *(p-1) != '\\' ){
- return p;
- }
- }
-
- return 0;
-}
-
-/* make a new tmp buffer out of a substring */
-char* make_segment(char* start, char* end)
-{
- char *buf;
- size_t size = (size_t)end - (size_t)start;
-
- buf = icalmemory_tmp_buffer(size+1);
-
-
- strncpy(buf,start,size);
- *(buf+size) = 0;
-
- return buf;
-
-}
-
-const char* input_buffer;
-const char* input_buffer_p;
-#define min(a,b) ((a) < (b) ? (a) : (b))
-
-int icalparser_flex_input(char* buf, int max_size)
-{
- int n = min(max_size,strlen(input_buffer_p));
-
- if (n > 0){
- memcpy(buf, input_buffer_p, n);
- input_buffer_p += n;
- return n;
- } else {
- return 0;
- }
-}
-
-void icalparser_clear_flex_input(void)
-{
- input_buffer_p = input_buffer+strlen(input_buffer);
-}
-
-/* Call the flex/bison parser to parse a complex value */
-
-icalvalue* icalparser_parse_value(icalvalue_kind kind,
- const char* str, icalproperty** error)
-{
- int r;
- input_buffer_p = input_buffer = str;
-
- set_parser_value_state(kind);
- icalparser_yy_value = 0;
-
- r = ical_yyparse();
-
- /* Error. Parse failed */
- if( icalparser_yy_value == 0 || r != 0){
-
- if(icalparser_yy_value !=0){
- icalvalue_free(icalparser_yy_value);
- icalparser_yy_value = 0;
- }
-
- return 0;
- }
-
- if (error != 0){
- *error = 0;
- }
-
- return icalparser_yy_value;
-}
-
-char* icalparser_get_prop_name(char* line, char** end)
-{
- char* p;
- char* v;
- char *str;
-
- p = icalparser_get_next_char(';',line,1);
- v = icalparser_get_next_char(':',line,1);
- if (p== 0 && v == 0) {
- return 0;
- }
-
- /* There is no ';' or, it is after the ';' that marks the beginning of
- the value */
- if (v!=0 && ( p == 0 || p > v)){
- str = make_segment(line,v);
- *end = v+1;
- } else {
- str = make_segment(line,p);
- *end = p+1;
- }
-
- return str;
-}
-
-char* icalparser_get_param_name(char* line, char **end)
-{
-
- char* next;
- char* quote;
- char *str;
-
- next = icalparser_get_next_char('=',line,1);
-
- if (next == 0) {
- return 0;
- }
-
- str = make_segment(line,next);
- *end = next+1;
- if (**end == '"') {
- *end = *end+1;
- next = icalparser_get_next_char('"',*end,0);
- if (next == 0) {
- return 0;
- }
-
- *end = make_segment(*end,next);
- }
-
- return str;
-
-}
-
-char* icalparser_get_next_paramvalue(char* line, char **end)
-{
-
- char* next;
- char *str;
-
- next = icalparser_get_next_char(',',line,1);
-
- if (next == 0){
- next = (char*)(size_t)line+(size_t)strlen(line);\
- }
-
- if (next == line){
- return 0;
- } else {
- str = make_segment(line,next);
- *end = next+1;
- return str;
- }
-
-}
-
-/* A property may have multiple values, if the values are seperated by
- commas in the content line. This routine will look for the next
- comma after line and will set the next place to start searching in
- end. */
-
-char* icalparser_get_next_value(char* line, char **end, icalvalue_kind kind)
-{
-
- char* next;
- char *p;
- char *str;
- size_t length = strlen(line);
-
- p = line;
- while(1){
-
- next = icalparser_get_next_char(',',p,1);
-
- /* Unforunately, RFC2445 says that for the RECUR value, COMMA
- can both seperate digits in a list, and it can seperate
- multiple recurrence specifications. This is not a friendly
- part of the spec. This weirdness tries to
- distinguish the two uses. it is probably a HACK*/
-
- if( kind == ICAL_RECUR_VALUE ) {
- if ( next != 0 &&
- (*end+length) > next+5 &&
- strncmp(next,"FREQ",4) == 0
- ) {
- /* The COMMA was followed by 'FREQ', is it a real seperator*/
- /* Fall through */
- } else if (next != 0){
- /* Not real, get the next COMMA */
- p = next+1;
- next = 0;
- continue;
- }
- }
-
- /* If the comma is preceeded by a '\', then it is a literal and
- not a value seperator*/
-
- if ( (next!=0 && *(next-1) == '\\') ||
- (next!=0 && *(next-3) == '\\')
- )
- /*second clause for '/' is on prev line. HACK may be out of bounds */
- {
- p = next+1;
- } else {
- break;
- }
-
- }
-
- if (next == 0){
- next = (char*)(size_t)line+length;
- *end = next;
- } else {
- *end = next+1;
- }
-
- if (next == line){
- return 0;
- }
-
-
- str = make_segment(line,next);
- return str;
-
-}
-
-char* icalparser_get_next_parameter(char* line,char** end)
-{
- char *next;
- char *v;
- char *str;
-
- v = icalparser_get_next_char(':',line,1);
- next = icalparser_get_next_char(';', line,1);
-
- /* There is no ';' or, it is after the ':' that marks the beginning of
- the value */
-
- if (next == 0 || next > v) {
- next = icalparser_get_next_char(':', line,1);
- }
-
- if (next != 0) {
- str = make_segment(line,next);
- *end = next+1;
- return str;
- } else {
- *end = line;
- return 0;
- }
-}
-
-/* Get a single property line, from the property name through the
- final new line, and include any continuation lines */
-
-char* icalparser_get_line(icalparser *parser,
- char* (*line_gen_func)(char *s, size_t size, void *d))
-{
- char *line;
- char *line_p;
- struct icalparser_impl* impl = (struct icalparser_impl*)parser;
- size_t buf_size = impl->tmp_buf_size;
-
-
- line_p = line = icalmemory_new_buffer(buf_size);
- line[0] = '\0';
-
- /* Read lines by calling line_gen_func and putting the data into
- impl->temp. If the line is a continuation line ( begins with a
- space after a newline ) then append the data onto line and read
- again. Otherwise, exit the loop. */
-
- while(1) {
-
- /* The first part of the loop deals with the temp buffer,
- which was read on he last pass through the loop. The
- routine is split like this because it has to read lone line
- ahead to determine if a line is a continuation line. */
-
-
- /* The tmp buffer is not clear, so transfer the data in it to the
- output. This may be left over from a previous call */
- if (impl->temp[0] != '\0' ) {
-
- /* If the last position in the temp buffer is occupied,
- mark the buffer as full. The means we will do another
- read later, because the line is not finished */
- if (impl->temp[impl->tmp_buf_size-1] == 0 &&
- impl->temp[impl->tmp_buf_size-2] != '\n'&&
- impl->temp[impl->tmp_buf_size-2] != 0 ){
- impl->buffer_full = 1;
- } else {
- impl->buffer_full = 0;
- }
-
- /* Copy the temp to the output and clear the temp buffer. */
- if(impl->continuation_line==1){
- /* back up the pointer to erase the continuation characters */
- impl->continuation_line = 0;
- line_p--;
-
- if ( *(line_p-1) == '\r'){
- line_p--;
- }
-
- /* copy one space up to eliminate the leading space*/
- icalmemory_append_string(&line,&line_p,&buf_size,
- impl->temp+1);
-
- } else {
- icalmemory_append_string(&line,&line_p,&buf_size,impl->temp);
- }
-
- impl->temp[0] = '\0' ;
- }
-
- impl->temp[impl->tmp_buf_size-1] = 1; /* Mark end of buffer */
-
- /****** Here is where the routine gets string data ******************/
- if ((*line_gen_func)(impl->temp,impl->tmp_buf_size,impl->line_gen_data)
- ==0){/* Get more data */
-
- /* If the first position is clear, it means we didn't get
- any more data from the last call to line_ge_func*/
- if (impl->temp[0] == '\0'){
-
- if(line[0] != '\0'){
- /* There is data in the output, so fall trhough and process it*/
- break;
- } else {
- /* No data in output; return and signal that there
- is no more input*/
- free(line);
- return 0;
- }
- }
- }
-
-
- /* If the output line ends in a '\n' and the temp buffer
- begins with a ' ', then the buffer holds a continuation
- line, so keep reading. */
-
- if ( line_p > line+1 && *(line_p-1) == '\n' && impl->temp[0] == ' ') {
-
- impl->continuation_line = 1;
-
- } else if ( impl->buffer_full == 1 ) {
-
- /* The buffer was filled on the last read, so read again */
-
- } else {
-
- /* Looks like the end of this content line, so break */
- break;
- }
-
-
- }
-
- /* Erase the final newline and/or carriage return*/
- if ( line_p > line+1 && *(line_p-1) == '\n') {
- *(line_p-1) = '\0';
- if ( *(line_p-2) == '\r'){
- *(line_p-2) = '\0';
- }
-
- } else {
- *(line_p) = '\0';
- }
-
- return line;
-
-}
-
-void insert_error(icalcomponent* comp, char* text,
- char* message, icalparameter_xlicerrortype type)
-{
- char temp[1024];
-
- if (text == 0){
- snprintf(temp,1024,"%s:",message);
- } else {
- snprintf(temp,1024,"%s: %s",message,text);
- }
-
- icalcomponent_add_property
- (comp,
- icalproperty_vanew_xlicerror(
- temp,
- icalparameter_new_xlicerrortype(type),
- 0));
-}
-
-int line_is_blank(char* line){
- int i=0;
-
- for(i=0; *(line+i)!=0; i++){
- char c = *(line+i);
-
- if(c != ' ' && c != '\n' && c != '\t'){
- return 0;
- }
- }
-
- return 1;
-}
-
-icalcomponent* icalparser_parse(icalparser *parser,
- char* (*line_gen_func)(char *s, size_t size,
- void* d))
-{
-
- char* line;
- icalcomponent *c=0;
- icalcomponent *root=0;
- struct icalparser_impl *impl = (struct icalparser_impl*)parser;
- icalerrorstate es = icalerror_get_error_state(ICAL_MALFORMEDDATA_ERROR);
-
- icalerror_check_arg_rz((parser !=0),"parser");
-
- icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,ICAL_ERROR_NONFATAL);
-
- do{
- line = icalparser_get_line(parser, line_gen_func);
-
- if ((c = icalparser_add_line(parser,line)) != 0){
-
- if(icalcomponent_get_parent(c) !=0){
- /* This is bad news... assert? */
- }
-
- assert(impl->root_component == 0);
- assert(pvl_count(impl->components) ==0);
-
- if (root == 0){
- /* Just one component */
- root = c;
- } else if(icalcomponent_isa(root) != ICAL_XROOT_COMPONENT) {
- /*Got a second component, so move the two components under
- an XROOT container */
- icalcomponent *tempc = icalcomponent_new(ICAL_XROOT_COMPONENT);
- icalcomponent_add_component(tempc, root);
- icalcomponent_add_component(tempc, c);
- root = tempc;
- } else if(icalcomponent_isa(root) == ICAL_XROOT_COMPONENT) {
- /* Already have an XROOT container, so add the component
- to it*/
- icalcomponent_add_component(root, c);
-
- } else {
- /* Badness */
- assert(0);
- }
-
- c = 0;
-
- }
- if(line != 0){
- free(line);
- }
- } while ( line != 0);
-
- icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,es);
-
- return root;
-
-}
-
-
-icalcomponent* icalparser_add_line(icalparser* parser,
- char* line)
-{
- char *p;
- char *str;
- char *end;
- int vcount = 0;
- icalproperty *prop;
- icalproperty_kind prop_kind;
- icalvalue *value;
- icalvalue_kind value_kind = ICAL_NO_VALUE;
-
-
- struct icalparser_impl *impl = (struct icalparser_impl*)parser;
- icalerror_check_arg_rz((parser != 0),"parser");
-
-
- if (line == 0)
- {
- impl->state = ICALPARSER_ERROR;
- return 0;
- }
-
- if(line_is_blank(line) == 1){
- return 0;
- }
-
- /* Begin by getting the property name at the start of the line. The
- property name may end up being "BEGIN" or "END" in which case it
- is not really a property, but the marker for the start or end of
- a component */
-
- end = 0;
- str = icalparser_get_prop_name(line, &end);
-
- if (str == 0 || strlen(str) == 0 ){
- /* Could not get a property name */
- icalcomponent *tail = pvl_data(pvl_tail(impl->components));
-
- if (tail){
- insert_error(tail,line,
- "Got a data line, but could not find a property name or component begin tag",
- ICAL_XLICERRORTYPE_COMPONENTPARSEERROR);
- }
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- return 0;
- }
-
- /**********************************************************************
- * Handle begin and end of components
- **********************************************************************/
- /* If the property name is BEGIN or END, we are actually
- starting or ending a new component */
-
- if(strcmp(str,"BEGIN") == 0){
- icalcomponent *c;
- icalcomponent_kind comp_kind;
-
- impl->level++;
- str = icalparser_get_next_value(end,&end, value_kind);
-
-
- comp_kind = icalenum_string_to_component_kind(str);
-
- if (comp_kind == ICAL_NO_COMPONENT){
- c = icalcomponent_new(ICAL_XLICINVALID_COMPONENT);
- insert_error(c,str,"Parse error in component name",
- ICAL_XLICERRORTYPE_COMPONENTPARSEERROR);
- }
-
- c = icalcomponent_new(comp_kind);
-
- if (c == 0){
- c = icalcomponent_new(ICAL_XLICINVALID_COMPONENT);
- insert_error(c,str,"Parse error in component name",
- ICAL_XLICERRORTYPE_COMPONENTPARSEERROR);
- }
-
- pvl_push(impl->components,c);
-
- impl->state = ICALPARSER_BEGIN_COMP;
- return 0;
-
- } else if (strcmp(str,"END") == 0 ) {
- icalcomponent* tail;
-
- impl->level--;
- str = icalparser_get_next_value(end,&end, value_kind);
-
- /* Pop last component off of list and add it to the second-to-last*/
- impl->root_component = pvl_pop(impl->components);
-
- tail = pvl_data(pvl_tail(impl->components));
-
- if(tail != 0){
- icalcomponent_add_component(tail,impl->root_component);
- }
-
- tail = 0;
-
- /* Return the component if we are back to the 0th level */
- if (impl->level == 0){
- icalcomponent *rtrn;
-
- if(pvl_count(impl->components) != 0){
- /* There are still components on the stack -- this means
- that one of them did not have a proper "END" */
- pvl_push(impl->components,impl->root_component);
- icalparser_clean(parser); /* may reset impl->root_component*/
- }
-
- assert(pvl_count(impl->components) == 0);
-
- impl->state = ICALPARSER_SUCCESS;
- rtrn = impl->root_component;
- impl->root_component = 0;
- return rtrn;
-
- } else {
- impl->state = ICALPARSER_END_COMP;
- return 0;
- }
- }
-
-
- /* There is no point in continuing if we have not seen a
- component yet */
-
- if(pvl_data(pvl_tail(impl->components)) == 0){
- impl->state = ICALPARSER_ERROR;
- return 0;
- }
-
-
- /**********************************************************************
- * Handle property names
- **********************************************************************/
-
- /* At this point, the property name really is a property name,
- (Not a component name) so make a new property and add it to
- the component */
-
-
- prop_kind = icalproperty_string_to_kind(str);
-
- prop = icalproperty_new(prop_kind);
-
- if (prop != 0){
- icalcomponent *tail = pvl_data(pvl_tail(impl->components));
-
- if(prop_kind==ICAL_X_PROPERTY){
- icalproperty_set_x_name(prop,str);
- }
-
- icalcomponent_add_property(tail, prop);
-
- /* Set the value kind for the default for this type of
- property. This may be re-set by a VALUE parameter */
- value_kind = icalproperty_kind_to_value_kind(icalproperty_isa(prop));
-
- } else {
- icalcomponent* tail = pvl_data(pvl_tail(impl->components));
-
- insert_error(tail,str,"Parse error in property name",
- ICAL_XLICERRORTYPE_PROPERTYPARSEERROR);
-
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- return 0;
- }
-
- /**********************************************************************
- * Handle parameter values
- **********************************************************************/
-
- /* Now, add any parameters to the last property */
-
- p = 0;
- while(1) {
-
- if (*(end-1) == ':'){
- /* if the last seperator was a ":" and the value is a
- URL, icalparser_get_next_parameter will find the
- ':' in the URL, so better break now. */
- break;
- }
-
- str = icalparser_get_next_parameter(end,&end);
-
- if (str != 0){
- char* name;
- char* pvalue;
-
- icalparameter *param = 0;
- icalparameter_kind kind;
- icalcomponent *tail = pvl_data(pvl_tail(impl->components));
-
- name = icalparser_get_param_name(str,&pvalue);
-
- if (name == 0){
- /* 'tail' defined above */
- insert_error(tail, str, "Cant parse parameter name",
- ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR);
- tail = 0;
- break;
- }
-
- kind = icalparameter_string_to_kind(name);
-
- if(kind == ICAL_X_PARAMETER){
- param = icalparameter_new(ICAL_X_PARAMETER);
-
- if(param != 0){
- icalparameter_set_xname(param,name);
- icalparameter_set_xvalue(param,pvalue);
- }
-
-
- } else if (kind != ICAL_NO_PARAMETER){
- param = icalparameter_new_from_value_string(kind,pvalue);
- } else {
- /* Error. Failed to parse the parameter*/
- /* 'tail' defined above */
- insert_error(tail, str, "Cant parse parameter name",
- ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR);
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- return 0;
- }
-
- if (param == 0){
- /* 'tail' defined above */
- insert_error(tail,str,"Cant parse parameter value",
- ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR);
-
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- continue;
- }
-
- /* If it is a VALUE parameter, set the kind of value*/
- if (icalparameter_isa(param)==ICAL_VALUE_PARAMETER){
-
- value_kind = (icalvalue_kind)
- icalparameter_value_to_value_kind(
- icalparameter_get_value(param)
- );
-
- if (value_kind == ICAL_NO_VALUE){
-
- /* Ooops, could not parse the value of the
- parameter ( it was not one of the defined
- values ), so reset the value_kind */
-
- insert_error(
- tail, str,
- "Got a VALUE parameter with an unknown type",
- ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR);
- icalparameter_free(param);
-
- value_kind =
- icalproperty_kind_to_value_kind(
- icalproperty_isa(prop));
-
- icalparameter_free(param);
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- return 0;
- }
- }
-
- /* Everything is OK, so add the parameter */
- icalproperty_add_parameter(prop,param);
- tail = 0;
-
- } else { /* if ( str != 0) */
- /* If we did not get a param string, go on to looking
- for a value */
- break;
- } /* if ( str != 0) */
-
- } /* while(1) */
-
- /**********************************************************************
- * Handle values
- **********************************************************************/
-
- /* Look for values. If there are ',' characters in the values,
- then there are multiple values, so clone the current
- parameter and add one part of the value to each clone */
-
- vcount=0;
- while(1) {
- str = icalparser_get_next_value(end,&end, value_kind);
-
- if (str != 0){
-
- if (vcount > 0){
- /* Actually, only clone after the second value */
- icalproperty* clone = icalproperty_new_clone(prop);
- icalcomponent* tail = pvl_data(pvl_tail(impl->components));
-
- icalcomponent_add_property(tail, clone);
- prop = clone;
- tail = 0;
- }
-
- value = icalvalue_new_from_string(value_kind, str);
-
- /* Don't add properties without value */
- if (value == 0){
- char temp[200]; /* HACK */
-
- icalproperty_kind prop_kind = icalproperty_isa(prop);
- icalcomponent* tail = pvl_data(pvl_tail(impl->components));
-
- sprintf(temp,"Cant parse as %s value in %s property. Removing entire property",
- icalvalue_kind_to_string(value_kind),
- icalproperty_kind_to_string(prop_kind));
-
- insert_error(tail, str, temp,
- ICAL_XLICERRORTYPE_VALUEPARSEERROR);
-
- /* Remove the troublesome property */
- icalcomponent_remove_property(tail,prop);
- icalproperty_free(prop);
- prop = 0;
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- return 0;
-
- } else {
- vcount++;
- icalproperty_set_value(prop, value);
- }
-
-
- } else {
- if (vcount == 0){
- char temp[200]; /* HACK */
-
- icalproperty_kind prop_kind = icalproperty_isa(prop);
- icalcomponent *tail = pvl_data(pvl_tail(impl->components));
-
- sprintf(temp,"No value for %s property. Removing entire property",
- icalproperty_kind_to_string(prop_kind));
-
- insert_error(tail, str, temp,
- ICAL_XLICERRORTYPE_VALUEPARSEERROR);
-
- /* Remove the troublesome property */
- icalcomponent_remove_property(tail,prop);
- icalproperty_free(prop);
- prop = 0;
- tail = 0;
- impl->state = ICALPARSER_ERROR;
- return 0;
- } else {
-
- break;
- }
- }
- }
-
- /****************************************************************
- * End of component parsing.
- *****************************************************************/
-
- if (pvl_data(pvl_tail(impl->components)) == 0 &&
- impl->level == 0){
- /* HACK. Does this clause ever get executed? */
- impl->state = ICALPARSER_SUCCESS;
- assert(0);
- return impl->root_component;
- } else {
- impl->state = ICALPARSER_IN_PROGRESS;
- return 0;
- }
-
-}
-
-icalparser_state icalparser_get_state(icalparser* parser)
-{
- struct icalparser_impl* impl = (struct icalparser_impl*) parser;
- return impl->state;
-
-}
-
-icalcomponent* icalparser_clean(icalparser* parser)
-{
- struct icalparser_impl* impl = (struct icalparser_impl*) parser;
- icalcomponent *tail;
-
- icalerror_check_arg_rz((parser != 0 ),"parser");
-
- /* We won't get a clean exit if some components did not have an
- "END" tag. Clear off any component that may be left in the list */
-
- while((tail=pvl_data(pvl_tail(impl->components))) != 0){
-
- insert_error(tail," ",
- "Missing END tag for this component. Closing component at end of input.",
- ICAL_XLICERRORTYPE_COMPONENTPARSEERROR);
-
-
- impl->root_component = pvl_pop(impl->components);
- tail=pvl_data(pvl_tail(impl->components));
-
- if(tail != 0){
- if(icalcomponent_get_parent(impl->root_component)!=0){
- icalerror_warn("icalparser_clean is trying to attach a component for the second time");
- } else {
- icalcomponent_add_component(tail,impl->root_component);
- }
- }
-
- }
-
- return impl->root_component;
-
-}
-
-struct slg_data {
- const char* pos;
- const char* str;
-};
-
-char* string_line_generator(char *out, size_t buf_size, void *d)
-{
- char *n;
- size_t size;
- struct slg_data* data = (struct slg_data*)d;
-
- if(data->pos==0){
- data->pos=data->str;
- }
-
- /* If the pointer is at the end of the string, we are done */
- if (*(data->pos)==0){
- return 0;
- }
-
- n = strchr(data->pos,'\n');
-
- if (n == 0){
- size = strlen(data->pos);
- } else {
- n++; /* include newline in output */
- size = (n-data->pos);
- }
-
- if (size > buf_size-1){
- size = buf_size-1;
- }
-
-
- strncpy(out,data->pos,size);
-
- *(out+size) = '\0';
-
- data->pos += size;
-
- return out;
-}
-
-icalcomponent* icalparser_parse_string(const char* str)
-{
- icalcomponent *c;
- struct slg_data d;
- icalparser *p;
-
- icalerrorstate es = icalerror_get_error_state(ICAL_PARSE_ERROR);
-
- d.pos = 0;
- d.str = str;
-
- p = icalparser_new();
- icalparser_set_gen_data(p,&d);
-
- icalerror_set_error_state(ICAL_PARSE_ERROR,ICAL_ERROR_NONFATAL);
-
- c = icalparser_parse(p,string_line_generator);
-
- icalerror_set_error_state(ICAL_PARSE_ERROR,es);
-
- icalparser_free(p);
-
- return c;
-
-}
diff --git a/libical/src/libical/icalparser.h b/libical/src/libical/icalparser.h
deleted file mode 100644
index 5e1c88ffc0..0000000000
--- a/libical/src/libical/icalparser.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalparser.h
- CREATOR: eric 20 April 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalparser.h
-
-======================================================================*/
-
-
-#ifndef ICALPARSER_H
-#define ICALPARSER_H
-
-#include "icalenums.h"
-#include "icaltypes.h"
-#include"icalcomponent.h"
-
-#include <stdio.h> /* For FILE* */
-
-typedef void* icalparser;
-
-
-/***********************************************************************
- * Line-oriented parsing.
- *
- * Create a new parser via icalparse_new_parser, then add ines one at
- * a time with icalparse_add_line(). icalparser_add_line() will return
- * non-zero when it has finished with a component.
- ***********************************************************************/
-
-typedef enum icalparser_state {
- ICALPARSER_ERROR,
- ICALPARSER_SUCCESS,
- ICALPARSER_BEGIN_COMP,
- ICALPARSER_END_COMP,
- ICALPARSER_IN_PROGRESS
-} icalparser_state;
-
-icalparser* icalparser_new(void);
-icalcomponent* icalparser_add_line(icalparser* parser, char* str );
-icalcomponent* icalparser_clean(icalparser* parser);
-icalparser_state icalparser_get_state(icalparser* parser);
-void icalparser_free(icalparser* parser);
-
-
-/***********************************************************************
- * Message oriented parsing. icalparser_parse takes a string that
- * holds the text ( in RFC 2445 format ) and returns a pointer to an
- * icalcomponent. The caller owns the memory. line_gen_func is a
- * pointer to a function that returns one content line per invocation
- **********************************************************************/
-
-icalcomponent* icalparser_parse(icalparser *parser,
- char* (*line_gen_func)(char *s, size_t size, void *d));
-
-/* Set the data that icalparser_parse will give to the line_gen_func
- as the parameter 'd'*/
-void icalparser_set_gen_data(icalparser* parser, void* data);
-
-
-icalcomponent* icalparser_parse_string(const char* str);
-
-
-/***********************************************************************
- * Parser support functions
- ***********************************************************************/
-
-/* Use the flex/bison parser to turn a string into a value type */
-icalvalue* icalparser_parse_value(icalvalue_kind kind,
- const char* str, icalcomponent** errors);
-
-/* Given a line generator function, return a single iCal content line.*/
-char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d));
-
-char* string_line_generator(char *out, size_t buf_size, void *d);
-
-#endif /* !ICALPARSE_H */
diff --git a/libical/src/libical/icalperiod.c b/libical/src/libical/icalperiod.c
deleted file mode 100644
index 6117df526f..0000000000
--- a/libical/src/libical/icalperiod.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalperiod.c
- CREATOR: eric 02 June 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalperiod.h"
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef ICAL_NO_LIBICAL
-#define icalerror_set_errno(x)
-#define icalerror_check_arg_rv(x,y)
-#define icalerror_check_arg_re(x,y,z)
-#else
-#include "icalerror.h"
-#include "icalmemory.h"
-#endif
-
-
-
-
-struct icalperiodtype icalperiodtype_from_string (const char* str)
-{
-
- struct icalperiodtype p, null_p;
- char *s = icalmemory_strdup(str);
- char *start, *end = s;
- icalerrorstate es;
-
- /* Errors are normally generated in the following code, so save
- the error state for resoration later */
-
- icalerrorenum e = icalerrno;
-
- p.start = p.end = icaltime_null_time();
- p.duration = icaldurationtype_from_int(0);
-
- null_p = p;
-
- if(s == 0) goto error;
-
- start = s;
- end = strchr(s, '/');
-
- if(end == 0) goto error;
-
- *end = 0;
- end++;
-
- p.start = icaltime_from_string(start);
-
- if (icaltime_is_null_time(p.start)) goto error;
-
- es = icalerror_get_error_state(ICAL_MALFORMEDDATA_ERROR);
- icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,ICAL_ERROR_NONFATAL);
-
- p.end = icaltime_from_string(end);
-
- icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,es);
-
-
- if (icaltime_is_null_time(p.end)){
-
- p.duration = icaldurationtype_from_string(end);
-
- if(icaldurationtype_as_int(p.duration) == 0) goto error;
- }
-
- icalerrno = e;
-
- icalmemory_free_buffer (s);
- return p;
-
- error:
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
-
- if (s)
- icalmemory_free_buffer (s);
- return null_p;
-}
-
-
-const char* icalperiodtype_as_ical_string(struct icalperiodtype p)
-{
-
- const char* start;
- const char* end;
-
- char *buf;
- size_t buf_size = 40;
- char* buf_ptr = 0;
-
- buf = (char*)icalmemory_new_buffer(buf_size);
- buf_ptr = buf;
-
-
- start = icaltime_as_ical_string(p.start);
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, start);
-
- if(!icaltime_is_null_time(p.end)){
- end = icaltime_as_ical_string(p.end);
- } else {
- end = icaldurationtype_as_ical_string(p.duration);
- }
-
- icalmemory_append_char(&buf, &buf_ptr, &buf_size, '/');
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, end);
-
-
- return buf;
-}
-
-
-
-struct icalperiodtype icalperiodtype_null_period() {
- struct icalperiodtype p;
- p.start = icaltime_null_time();
- p.end = icaltime_null_time();
- p.duration = icaldurationtype_null_duration();
-
- return p;
-}
-int icalperiodtype_is_null_period(struct icalperiodtype p){
-
- if(icaltime_is_null_time(p.start) &&
- icaltime_is_null_time(p.end) &&
- icaldurationtype_is_null_duration(p.duration)){
- return 1;
- } else {
- return 0;
- }
-}
-
-int icalperiodtype_is_valid_period(struct icalperiodtype p){
- if(icaltime_is_valid_time(p.start) &&
- (icaltime_is_valid_time(p.end) || icaltime_is_null_time(p.end)) )
- {
- return 1;
- }
-
- return 0;
-}
-
diff --git a/libical/src/libical/icalperiod.h b/libical/src/libical/icalperiod.h
deleted file mode 100644
index 64d53237ad..0000000000
--- a/libical/src/libical/icalperiod.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalperiod.h
- CREATOR: eric 26 Jan 2001
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALPERIOD_H
-#define ICALPERIOD_H
-
-#include "icaltime.h"
-#include "icalduration.h"
-
-struct icalperiodtype
-{
- struct icaltimetype start;
- struct icaltimetype end;
- struct icaldurationtype duration;
-};
-
-struct icalperiodtype icalperiodtype_from_string (const char* str);
-
-const char* icalperiodtype_as_ical_string(struct icalperiodtype p);
-struct icalperiodtype icalperiodtype_null_period();
-int icalperiodtype_is_null_period(struct icalperiodtype p);
-int icalperiodtype_is_valid_period(struct icalperiodtype p);
-
-
-
-
-#endif /* !ICALTIME_H */
-
-
-
diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c
deleted file mode 100644
index c5638827e5..0000000000
--- a/libical/src/libical/icalproperty.c
+++ /dev/null
@@ -1,808 +0,0 @@
-/* -*- Mode: C -*- */
-
-/*======================================================================
- FILE: icalproperty.c
- CREATOR: eric 28 April 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalproperty.c
-
-======================================================================*/
-/*#line 27 "icalproperty.c.in"*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalproperty.h"
-#include "icalparameter.h"
-#include "icalcomponent.h"
-#include "pvl.h"
-#include "icalenums.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalparser.h"
-
-#include <string.h> /* For icalmemory_strdup, rindex */
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <stdio.h> /* for printf */
-#include <stdarg.h> /* for va_list, va_start, etc. */
-
-#define TMP_BUF_SIZE 1024
-
-/* Private routines for icalproperty */
-void icalvalue_set_parent(icalvalue* value,
- icalproperty* property);
-icalproperty* icalvalue_get_parent(icalvalue* value);
-
-void icalparameter_set_parent(icalparameter* param,
- icalproperty* property);
-icalproperty* icalparameter_get_parent(icalparameter* value);
-
-
-void icalproperty_set_x_name(icalproperty* prop, char* name);
-
-struct icalproperty_impl
-{
- char id[5];
- icalproperty_kind kind;
- char* x_name;
- pvl_list parameters;
- pvl_elem parameter_iterator;
- icalvalue* value;
- icalcomponent *parent;
-};
-
-void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args)
-{
-
- void* vp;
-
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- while((vp = va_arg(args, void*)) != 0) {
-
- if (icalvalue_isa_value(vp) != 0 ){
- } else if (icalparameter_isa_parameter(vp) != 0 ){
-
- icalproperty_add_parameter((icalproperty*)impl,
- (icalparameter*)vp);
- } else {
- assert(0);
- }
-
- }
-
-
-}
-
-
-struct icalproperty_impl*
-icalproperty_new_impl (icalproperty_kind kind)
-{
- struct icalproperty_impl* prop;
-
- if ( ( prop = (struct icalproperty_impl*)
- malloc(sizeof(struct icalproperty_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy(prop->id,"prop");
-
- prop->kind = kind;
- prop->parameters = pvl_newlist();
- prop->parameter_iterator = 0;
- prop->value = 0;
- prop->x_name = 0;
- prop->parent = 0;
-
- return prop;
-}
-
-
-icalproperty*
-icalproperty_new (icalproperty_kind kind)
-{
- if(kind == ICAL_NO_PROPERTY){
- return 0;
- }
-
- return (icalproperty*)icalproperty_new_impl(kind);
-}
-
-
-icalproperty*
-icalproperty_new_clone(icalproperty* prop)
-{
- struct icalproperty_impl *old = (struct icalproperty_impl*)prop;
- struct icalproperty_impl *new = icalproperty_new_impl(old->kind);
- pvl_elem p;
-
- icalerror_check_arg_rz((prop!=0),"Prop");
- icalerror_check_arg_rz((old!=0),"old");
- icalerror_check_arg_rz((new!=0),"new");
-
- if (old->value !=0) {
- new->value = icalvalue_new_clone(old->value);
- }
-
- if (old->x_name != 0) {
-
- new->x_name = icalmemory_strdup(old->x_name);
-
- if (new->x_name == 0) {
- icalproperty_free(new);
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
- }
-
- for(p=pvl_head(old->parameters);p != 0; p = pvl_next(p)){
- icalparameter *param = icalparameter_new_clone(pvl_data(p));
-
- if (param == 0){
- icalproperty_free(new);
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- pvl_push(new->parameters,param);
-
- }
-
- return new;
-
-}
-
-icalproperty* icalproperty_new_from_string(char* str)
-{
-
- size_t buf_size = 1024;
- char* buf = icalmemory_new_buffer(buf_size);
- char* buf_ptr = buf;
- icalproperty *prop;
- icalcomponent *comp;
- int errors = 0;
-
- icalerror_check_arg_rz( (str!=0),"str");
-
- /* Is this a HACK or a crafty reuse of code? */
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:VCALENDAR\n");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, str);
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "\n");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:VCALENDAR\n");
-
- comp = icalparser_parse_string(buf);
-
- if(comp == 0){
- icalerror_set_errno(ICAL_PARSE_ERROR);
- return 0;
- }
-
- errors = icalcomponent_count_errors(comp);
-
- prop = icalcomponent_get_first_property(comp,ICAL_ANY_PROPERTY);
-
- icalcomponent_remove_property(comp,prop);
-
- icalcomponent_free(comp);
- free(buf);
-
- if(errors > 0){
- icalproperty_free(prop);
- return 0;
- } else {
- return prop;
- }
-
-}
-
-void
-icalproperty_free (icalproperty* prop)
-{
- struct icalproperty_impl *p;
-
- icalparameter* param;
-
- icalerror_check_arg_rv((prop!=0),"prop");
-
- p = (struct icalproperty_impl*)prop;
-
-#ifdef ICAL_FREE_ON_LIST_IS_ERROR
- icalerror_assert( (p->parent ==0),"Tried to free a property that is still attached to a component. ");
-
-#else
- if(p->parent !=0){
- return;
- }
-#endif
-
- if (p->value != 0){
- icalvalue_set_parent(p->value,0);
- icalvalue_free(p->value);
- }
-
- while( (param = pvl_pop(p->parameters)) != 0){
- icalparameter_free(param);
- }
-
- pvl_free(p->parameters);
-
- if (p->x_name != 0) {
- free(p->x_name);
- }
-
- p->kind = ICAL_NO_PROPERTY;
- p->parameters = 0;
- p->parameter_iterator = 0;
- p->value = 0;
- p->x_name = 0;
- p->id[0] = 'X';
-
- free(p);
-
-}
-
-
-char*
-icalproperty_as_ical_string (icalproperty* prop)
-{
- icalparameter *param;
-
- /* Create new buffer that we can append names, parameters and a
- value to, and reallocate as needed. Later, this buffer will be
- copied to a icalmemory_tmp_buffer, which is managed internally
- by libical, so it can be given to the caller without fear of
- the caller forgetting to free it */
-
- const char* property_name = 0;
- size_t buf_size = 1024;
- char* buf = icalmemory_new_buffer(buf_size);
- char* buf_ptr = buf;
- icalvalue* value;
- char *out_buf;
-
- char newline[] = "\n";
-
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
-
- /* Append property name */
-
- if (impl->kind == ICAL_X_PROPERTY && impl->x_name != 0){
- property_name = impl->x_name;
- } else {
- property_name = icalproperty_kind_to_string(impl->kind);
- }
-
- if (property_name == 0 ) {
- icalerror_warn("Got a property of an unknown kind.");
- icalmemory_free_buffer(buf);
- return 0;
-
- }
-
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, property_name);
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
-
-
-
- /* Determine what VALUE parameter to include. The VALUE parameters
- are ignored in the normal parameter printing ( the block after
- this one, so we need to do it here */
- {
- const char* kind_string = 0;
-
- icalparameter *orig_val_param
- = icalproperty_get_first_parameter(prop,ICAL_VALUE_PARAMETER);
-
- icalvalue *value = icalproperty_get_value(impl);
-
- icalvalue_kind orig_kind = ICAL_NO_VALUE;
-
- icalvalue_kind this_kind = ICAL_NO_VALUE;
-
- icalvalue_kind default_kind
- = icalproperty_kind_to_value_kind(impl->kind);
-
- if(orig_val_param){
- orig_kind = (icalvalue_kind)icalparameter_get_value(orig_val_param);
- }
-
- if(value != 0){
- this_kind = icalvalue_isa(value);
- }
-
-
- if(this_kind == default_kind &&
- orig_kind != ICAL_NO_VALUE){
- /* The kind is the default, so it does not need to be
- included, but do it anyway, since it was explicit in
- the property. But, use the default, not the one
- specified in the property */
-
- kind_string = icalvalue_kind_to_string(default_kind);
-
- } else if (this_kind != default_kind && this_kind != ICAL_NO_VALUE){
- /* Not the default, so it must be specified */
- kind_string = icalvalue_kind_to_string(this_kind);
- } else {
- /* Don'tinclude the VALUE parameter at all */
- }
-
- if(kind_string!=0){
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, " ;");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, "VALUE=");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string);
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
- }
-
-
- }
-
- /* Append parameters */
- for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER);
- param != 0;
- param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) {
-
- char* kind_string = icalparameter_as_ical_string(param);
- icalparameter_kind kind = icalparameter_isa(param);
-
- if(kind==ICAL_VALUE_PARAMETER){
- continue;
- }
-
- if (kind_string == 0 ) {
- char temp[TMP_BUF_SIZE];
- snprintf(temp, TMP_BUF_SIZE,"Got a parameter of unknown kind in %s property",property_name);
- icalerror_warn(temp);
- continue;
- }
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, " ;");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string);
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
-
- }
-
- /* Append value */
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, " :");
-
- value = icalproperty_get_value(prop);
-
- if (value != 0){
- const char *str = icalvalue_as_ical_string(value);
- icalerror_assert((str !=0),"Could not get string representation of a value");
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, str);
- } else {
- icalmemory_append_string(&buf, &buf_ptr, &buf_size,"ERROR: No Value");
-
- }
-
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
-
- /* Now, copy the buffer to a tmp_buffer, which is safe to give to
- the caller without worring about de-allocating it. */
-
-
- out_buf = icalmemory_tmp_buffer(strlen(buf)+1);
- strcpy(out_buf, buf);
-
- icalmemory_free_buffer(buf);
-
- return out_buf;
-}
-
-
-
-icalproperty_kind
-icalproperty_isa (icalproperty* property)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)property;
-
- if(property != 0){
- return p->kind;
- }
-
- return ICAL_NO_PROPERTY;
-}
-
-int
-icalproperty_isa_property (void* property)
-{
- struct icalproperty_impl *impl = (struct icalproperty_impl*)property;
-
- icalerror_check_arg_rz( (property!=0), "property");
-
- if (strcmp(impl->id,"prop") == 0) {
- return 1;
- } else {
- return 0;
- }
-}
-
-
-void
-icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rv( (prop!=0),"prop");
- icalerror_check_arg_rv( (parameter!=0),"parameter");
-
- pvl_push(p->parameters, parameter);
-
-}
-
-void
-icalproperty_set_parameter (icalproperty* prop,icalparameter* parameter)
-{
- icalparameter_kind kind;
-
- icalerror_check_arg_rv( (prop!=0),"prop");
- icalerror_check_arg_rv( (parameter!=0),"parameter");
-
- kind = icalparameter_isa(parameter);
-
- icalproperty_remove_parameter(prop,kind);
-
- icalproperty_add_parameter(prop,parameter);
-}
-
-void icalproperty_set_parameter_from_string(icalproperty* prop,
- const char* name, const char* value)
-{
-
- icalparameter_kind kind;
- icalparameter *param;
-
- icalerror_check_arg_rv( (prop!=0),"prop");
- icalerror_check_arg_rv( (name!=0),"name");
- icalerror_check_arg_rv( (value!=0),"value");
-
- kind = icalparameter_string_to_kind(name);
-
- if(kind == ICAL_NO_PARAMETER){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return;
- }
-
- param = icalparameter_new_from_value_string(kind,value);
-
- if (param == 0){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return;
- }
-
- icalproperty_set_parameter(prop,param);
-
-}
-
-const char* icalproperty_get_parameter_as_string(icalproperty* prop,
- const char* name)
-{
- icalparameter_kind kind;
- icalparameter *param;
- char* str;
- char* pv;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
- icalerror_check_arg_rz( (name!=0),"name");
-
- kind = icalparameter_string_to_kind(name);
-
- if(kind == ICAL_NO_PROPERTY){
- /* icalenum_string_to_parameter_kind will set icalerrno */
- return 0;
- }
-
- param = icalproperty_get_first_parameter(prop,kind);
-
- if (param == 0){
- return 0;
- }
-
- str = icalparameter_as_ical_string(param);
-
- pv = strchr(str,'=');
-
- if(pv == 0){
- icalerror_set_errno(ICAL_INTERNAL_ERROR);
- return 0;
- }
-
- return pv+1;
-
-}
-
-void
-icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind)
-{
- pvl_elem p;
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rv((prop!=0),"prop");
-
- for(p=pvl_head(impl->parameters);p != 0; p = pvl_next(p)){
- icalparameter* param = (icalparameter *)pvl_data (p);
- if (icalparameter_isa(param) == kind) {
- pvl_remove (impl->parameters, p);
- icalparameter_free (param);
- break;
- }
- }
-}
-
-
-int
-icalproperty_count_parameters (icalproperty* prop)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
-
- if(prop != 0){
- return pvl_count(p->parameters);
- }
-
- icalerror_set_errno(ICAL_USAGE_ERROR);
- return -1;
-}
-
-
-icalparameter*
-icalproperty_get_first_parameter (icalproperty* prop, icalparameter_kind kind)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- p->parameter_iterator = pvl_head(p->parameters);
-
- if (p->parameter_iterator == 0) {
- return 0;
- }
-
- for( p->parameter_iterator = pvl_head(p->parameters);
- p->parameter_iterator !=0;
- p->parameter_iterator = pvl_next(p->parameter_iterator)){
-
- icalparameter *param = (icalparameter*)pvl_data(p->parameter_iterator);
-
- if(icalparameter_isa(param) == kind || kind == ICAL_ANY_PARAMETER){
- return param;
- }
- }
-
- return 0;
-}
-
-
-icalparameter*
-icalproperty_get_next_parameter (icalproperty* prop, icalparameter_kind kind)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- if (p->parameter_iterator == 0) {
- return 0;
- }
-
- for( p->parameter_iterator = pvl_next(p->parameter_iterator);
- p->parameter_iterator !=0;
- p->parameter_iterator = pvl_next(p->parameter_iterator)){
-
- icalparameter *param = (icalparameter*)pvl_data(p->parameter_iterator);
-
- if(icalparameter_isa(param) == kind || kind == ICAL_ANY_PARAMETER){
- return param;
- }
- }
-
- return 0;
-
-}
-
-void
-icalproperty_set_value (icalproperty* prop, icalvalue* value)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rv((prop !=0),"prop");
- icalerror_check_arg_rv((value !=0),"value");
-
- if (p->value != 0){
- icalvalue_set_parent(p->value,0);
- icalvalue_free(p->value);
- p->value = 0;
- }
-
- p->value = value;
-
- icalvalue_set_parent(value,prop);
-}
-
-
-void icalproperty_set_value_from_string(icalproperty* prop,const char* str,
- const char* type)
-{
- icalvalue *oval,*nval;
- icalvalue_kind kind = ICAL_NO_VALUE;
-
- icalerror_check_arg_rv( (prop!=0),"prop");
- icalerror_check_arg_rv( (str!=0),"str");
- icalerror_check_arg_rv( (type!=0),"type");
-
- if(strcmp(type,"NO")==0){
- /* Get the type from the value the property already has, if it exists */
- oval = icalproperty_get_value(prop);
- if(oval != 0){
- /* Use the existing value kind */
- kind = icalvalue_isa(oval);
- } else {
- /* Use the default kind for the property */
- kind = icalproperty_kind_to_value_kind(icalproperty_isa(prop));
- }
- } else {
- /* Use the given kind string */
- kind = icalvalue_string_to_kind(type);
- }
-
- if(kind == ICAL_NO_VALUE){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return;
- }
-
- nval = icalvalue_new_from_string(kind, str);
-
- if(nval == 0){
- /* icalvalue_new_from_string sets errno */
- assert(icalerrno != ICAL_NO_ERROR);
- return;
- }
-
- icalproperty_set_value(prop,nval);
-
-
-}
-
-icalvalue*
-icalproperty_get_value (icalproperty* prop)
-{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- return p->value;
-}
-
-const char* icalproperty_get_value_as_string(icalproperty* prop)
-{
- icalvalue *value;
-
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- value = impl->value;
-
- return icalvalue_as_ical_string(value);
-}
-
-
-void icalproperty_set_x_name(icalproperty* prop, char* name)
-{
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rv( (name!=0),"name");
- icalerror_check_arg_rv( (prop!=0),"prop");
-
- if (impl->x_name != 0) {
- free(impl->x_name);
- }
-
- impl->x_name = icalmemory_strdup(name);
-
- if(impl->x_name == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- }
-
-}
-
-char* icalproperty_get_x_name(icalproperty* prop){
-
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- return impl->x_name;
-}
-
-
-/* From Jonathan Yue <jonathan.yue@cp.net> */
-char* icalproperty_get_name (icalproperty* prop)
-{
-
- const char* property_name = 0;
- size_t buf_size = 256;
- char* buf = icalmemory_new_buffer(buf_size);
- char* buf_ptr = buf;
-
- struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
-
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- if (impl->kind == ICAL_X_PROPERTY && impl->x_name != 0){
- property_name = impl->x_name;
- } else {
- property_name = icalproperty_kind_to_string(impl->kind);
- }
-
- if (property_name == 0 ) {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
-
- } else {
- /* _append_string will automatically grow the buffer if
- property_name is longer than the initial buffer size */
- icalmemory_append_string(&buf, &buf_ptr, &buf_size, property_name);
- }
-
- /* Add the buffer to the temporary buffer ring -- the caller will
- not have to free the memory. */
- icalmemory_add_tmp_buffer(buf);
-
- return buf;
-}
-
-
-
-
-void icalproperty_set_parent(icalproperty* property,
- icalcomponent* component)
-{
- struct icalproperty_impl *impl = (struct icalproperty_impl*)property;
-
- icalerror_check_arg_rv( (property!=0),"property");
-
- impl->parent = component;
-}
-
-icalcomponent* icalproperty_get_parent(icalproperty* property)
-{
- struct icalproperty_impl *impl = (struct icalproperty_impl*)property;
-
- icalerror_check_arg_rz( (property!=0),"property");
-
- return impl->parent;
-}
-
-
-
-
-
-
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalproperty.h b/libical/src/libical/icalproperty.h
deleted file mode 100644
index 6f5f1bfaef..0000000000
--- a/libical/src/libical/icalproperty.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalproperty.h
- CREATOR: eric 20 March 1999
-
-
- $Id$
- $Locker$
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalparam.h
-
- ======================================================================*/
-
-
-#ifndef ICALPROPERTY_H
-#define ICALPROPERTY_H
-
-#include <time.h>
-
-
-#include "icalderivedparameter.h"
-
-#include "icalvalue.h"
-#include "icalrecur.h"
-
-/* Actually in icalderivedproperty.h:
- typedef void icalproperty; */
-
-#include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
-
-icalproperty* icalproperty_new(icalproperty_kind kind);
-
-icalproperty* icalproperty_new_clone(icalproperty * prop);
-
-icalproperty* icalproperty_new_from_string(char* str);
-
-char* icalproperty_as_ical_string(icalproperty* prop);
-
-void icalproperty_free(icalproperty* prop);
-
-icalproperty_kind icalproperty_isa(icalproperty* property);
-int icalproperty_isa_property(void* property);
-
-void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter);
-void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter);
-void icalproperty_set_parameter_from_string(icalproperty* prop,
- const char* name, const char* value);
-const char* icalproperty_get_parameter_as_string(icalproperty* prop,
- const char* name);
-
-void icalproperty_remove_parameter(icalproperty* prop,
- icalparameter_kind kind);
-
-int icalproperty_count_parameters(icalproperty* prop);
-
-/* Iterate through the parameters */
-icalparameter* icalproperty_get_first_parameter(icalproperty* prop,
- icalparameter_kind kind);
-icalparameter* icalproperty_get_next_parameter(icalproperty* prop,
- icalparameter_kind kind);
-/* Access the value of the property */
-void icalproperty_set_value(icalproperty* prop, icalvalue* value);
-void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char* kind);
-
-icalvalue* icalproperty_get_value(icalproperty* prop);
-const char* icalproperty_get_value_as_string(icalproperty* prop);
-
-/* Deal with X properties */
-
-void icalproperty_set_x_name(icalproperty* prop, char* name);
-char* icalproperty_get_x_name(icalproperty* prop);
-
-/* Return the name of the property -- the type name converted to a
- string, or the value of _get_x_name if the type is and X property */
-char* icalproperty_get_name (icalproperty* prop);
-
-icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
-
-/* Convert kinds to string and get default value type */
-
-icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
-icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
-const char* icalproperty_kind_to_string(icalproperty_kind kind);
-icalproperty_kind icalproperty_string_to_kind(const char* string);
-
-icalproperty_method icalproperty_string_to_method(const char* str);
-const char* icalproperty_method_to_string(icalproperty_method method);
-
-
-const char* icalproperty_enum_to_string(int e);
-int icalproperty_string_to_enum(const char* str);
-
-const char* icalproperty_status_to_string(icalproperty_status);
-icalproperty_status icalproperty_string_to_status(const char* string);
-
-int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
-
-
-
-
-#endif /*ICALPROPERTY_H*/
diff --git a/libical/src/libical/icalrecur.c b/libical/src/libical/icalrecur.c
deleted file mode 100644
index d998cd0e39..0000000000
--- a/libical/src/libical/icalrecur.c
+++ /dev/null
@@ -1,2353 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalrecur.c
- CREATOR: eric 16 May 2000
-
- $Id$
- $Locker$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- How this code works:
-
- Processing starts when the caller generates a new recurrence
- iterator via icalrecur_iterator_new(). This routine copies the
- recurrence rule into the iterator and extracts things like start and
- end dates. Then, it checks if the rule is legal, using some logic
- from RFC2445 and some logic that probably should be in RFC2445.
-
- Then, icalrecur_iterator_new() re-writes some of the BY*
- arrays. This involves ( via a call to setup_defaults() ) :
-
- 1) For BY rule parts with no data ( ie BYSECOND was not specified )
- copy the corresponding time part from DTSTART into the BY array. (
- So impl->by_ptrs[BY_SECOND] will then have one element if is
- originally had none ) This only happens if the BY* rule part data
- would expand the number of occurrences in the occurrence set. This
- lets the code ignore DTSTART later on and still use it to get the
- time parts that were not specified in any other way.
-
- 2) For the by rule part that are not the same interval as the
- frequency -- for HOURLY anything but BYHOUR, for instance -- copy the
- first data element from the rule part into the first occurrence. For
- example, for "INTERVAL=MONTHLY and BYHOUR=10,30", initialize the
- first time to be returned to have an hour of 10.
-
- Finally, for INTERVAL=YEARLY, the routine expands the rule to get
- all of the days specified in the rule. The code will do this for
- each new year, and this is the first expansion. This is a special
- case for the yearly interval; no other frequency gets expanded this
- way. The yearly interval is the most complex, so some special
- processing is required.
-
- After creating a new iterator, the caller will make successive calls
- to icalrecur_iterator_next() to get the next time specified by the
- rule. The main part of this routine is a switch on the frequency of
- the rule. Each different frequency is handled by a different
- routine.
-
- For example, next_hour handles the case of INTERVAL=HOURLY, and it
- is called by other routines to get the next hour. First, the routine
- tries to get the next minute part of a time with a call to
- next_minute(). If next_minute() returns 1, it has reached the end of
- its data, usually the last element of the BYMINUTE array. Then, if
- there is data in the BYHOUR array, the routine changes the hour to
- the next one in the array. If INTERVAL=HOURLY, the routine advances
- the hour by the interval.
-
- If the routine used the last hour in the BYHOUR array, and the
- INTERVAL=HOURLY, then the routine calls increment_monthday() to set
- the next month day. The increment_* routines may call higher routine
- to increment the month or year also.
-
- The code for INTERVAL=DAILY is handled by next_day(). First, the
- routine tries to get the next hour part of a time with a call to
- next_hour. If next_hour() returns 1, it has reached the end of its
- data, usually the last element of the BYHOUR array. This means that
- next_day() should increment the time to the next day. If FREQUENCY==DAILY,
- the routine increments the day by the interval; otherwise, it
- increments the day by 1.
-
- Next_day() differs from next_hour because it does not use the BYDAY
- array to select an appropriate day. Instead, it returns every day (
- incrementing by 1 if the frequency is not DAILY with INTERVAL!=1)
- Any days that are not specified in an non-empty BYDAY array are
- filtered out later.
-
- Generally, the flow of these routine is for a next_* call a next_*
- routine of a lower interval ( next_day calls next_hour) and then to
- possibly call an increment_* routine of an equal or higher
- interval. ( next_day calls increment_monthday() )
-
- When the call to the original next_* routine returns,
- icalrecur_iterator_next() will check the returned data against other
- BYrule parts to determine if is should be excluded by calling
- check_contracting_rules. Generally, a contracting rule is any with a
- larger time span than the interval. For instance, if
- INTERVAL=DAILY, BYMONTH is a contracting rule part.
-
- Check_contracting_rules() uses icalrecur_check_rulepart() to do its
- work. icalrecur_check_rulepart() uses expand_map[] to determine if a rule
- is contracting, and if it is, and if the BY rule part has some data,
- then the routine checks if the value of a component of the time is
- part of the byrule part. For instance, for "INTERVAL=DAILY;
- BYMONTH=6,10", icalrecur_check_rulepart() would check that the time value
- given to it has a month of either 6 or 10.
-
- Finally, icalrecur_iterator_next() does a few other checks on the
- time value, and if it passes, it returns the time.
-
- A note about the end_of_data flag. The flag indicates that the
- routine is at the end of its data -- the last BY rule if the routine
- is using by rules, or the last day of the week/month/year/etc if
- not.
-
- This flag is usually set early in a next_* routine and returned in
- the end. The way it is used allows the next_* routine to set the
- last time back to the first element in a BYxx rule, and then signal
- to the higer level routine to increment the next higher level. For
- instance. WITH FREQ=MONTHLY;BYDAY=TU,FR, After next_weekday_by_month
- runs though both TU and FR, it sets the week day back to TU and sets
- end_of_data to 1x. This signals next_month to increment the month.
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalrecur.h"
-
-#ifdef ICAL_NO_LIBICAL
-#define icalerror_set_errno(x)
-#define icalerror_check_arg_rv(x,y)
-#else
-#include "icalerror.h"
-#include "icalmemory.h"
-#endif
-
-#include <stdlib.h> /* for malloc */
-#include <errno.h> /* for errno */
-#include <string.h> /* for strdup and strchr*/
-#include <assert.h>
-#include <stddef.h> /* For offsetof() macro */
-
-#include "pvl.h"
-
-#define TEMP_MAX 1024
-
-
-#define BYDAYIDX impl->by_indices[BY_DAY]
-#define BYDAYPTR impl->by_ptrs[BY_DAY]
-
-#define BYMONIDX impl->by_indices[BY_MONTH]
-#define BYMONPTR impl->by_ptrs[BY_MONTH]
-
-#define BYMDIDX impl->by_indices[BY_MONTH_DAY]
-#define BYMDPTR impl->by_ptrs[BY_MONTH_DAY]
-
-#define BYWEEKIDX impl->by_indices[BY_WEEK_NO]
-#define BYWEEKPTR impl->by_ptrs[BY_WEEK_NO]
-
-const char* icalrecur_freq_to_string(icalrecurrencetype_frequency kind);
-icalrecurrencetype_frequency icalrecur_string_to_freq(const char* str);
-
-const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
-icalrecurrencetype_weekday icalrecur_string_to_weekday(const char* str);
-
-
-
-/*********************** Rule parsing routines ************************/
-
-struct icalrecur_parser {
- const char* rule;
- char* copy;
- char* this_clause;
- char* next_clause;
-
- struct icalrecurrencetype rt;
-};
-
-const char* icalrecur_first_clause(struct icalrecur_parser *parser)
-{
- char *idx;
- parser->this_clause = parser->copy;
-
- idx = strchr(parser->this_clause,';');
-
- if (idx == 0){
- parser->next_clause = 0;
- return 0;
- }
-
- *idx = 0;
- idx++;
- parser->next_clause = idx;
-
- return parser->this_clause;
-
-}
-
-const char* icalrecur_next_clause(struct icalrecur_parser *parser)
-{
- char* idx;
-
- parser->this_clause = parser->next_clause;
-
- if(parser->this_clause == 0){
- return 0;
- }
-
- idx = strchr(parser->this_clause,';');
-
- if (idx == 0){
- parser->next_clause = 0;
- } else {
-
- *idx = 0;
- idx++;
- parser->next_clause = idx;
- }
-
- return parser->this_clause;
-
-}
-
-void icalrecur_clause_name_and_value(struct icalrecur_parser *parser,
- char** name, char** value)
-{
- char *idx;
-
- *name = parser->this_clause;
-
- idx = strchr(parser->this_clause,'=');
-
- if (idx == 0){
- *name = 0;
- *value = 0;
- return;
- }
-
- *idx = 0;
- idx++;
- *value = idx;
-}
-
-void icalrecur_add_byrules(struct icalrecur_parser *parser, short *array,
- int size, char* vals)
-{
- char *t, *n;
- int i=0;
- int sign = 1;
- short v;
-
- n = vals;
-
- while(n != 0){
-
- if(i == size){
- return;
- }
-
- t = n;
-
- n = strchr(t,',');
-
- if(n != 0){
- *n = 0;
- n++;
- }
-
- /* Get optional sign. HACK. sign is not allowed for all BYxxx
- rule parts */
- if( *t == '-'){
- sign = -1;
- t++;
- } else if (*t == '+'){
- sign = 1;
- t++;
- } else {
- sign = 1;
- }
-
- v = atoi(t) * sign ;
-
-
- array[i++] = v;
- array[i] = ICAL_RECURRENCE_ARRAY_MAX;
-
- }
-
-}
-
-void icalrecur_add_bydayrules(struct icalrecur_parser *parser, const char* vals)
-{
-
- char *t, *n;
- int i=0;
- int sign = 1;
- int weekno = 0;
- icalrecurrencetype_weekday wd;
- short *array = parser->rt.by_day;
- char* end;
- char* vals_copy;
-
- vals_copy = icalmemory_strdup(vals);
-
- end = (char*)vals_copy+strlen(vals_copy);
- n = vals_copy;
-
- while(n != 0){
-
-
- t = n;
-
- n = strchr(t,',');
-
- if(n != 0){
- *n = 0;
- n++;
- }
-
- /* Get optional sign. */
- if( *t == '-'){
- sign = -1;
- t++;
- } else if (*t == '+'){
- sign = 1;
- t++;
- } else {
- sign = 1;
- }
-
- weekno = 0;
- /* Get Optional weekno */
- if( sscanf(t,"%d",&weekno) != 0){
- if (n != 0){
- int weeknolen = (n-t)-3; /* 3 -> one for \0, 2 for day name */
- /* could use abs(log10(weekno))+1, but that needs libm */
- t += weeknolen;
- } else {
- t = end -2;
- }
- }
-
- wd = icalrecur_string_to_weekday(t);
-
- array[i++] = sign* ((int)wd + 8*weekno);
- array[i] = ICAL_RECURRENCE_ARRAY_MAX;
-
- }
-
- free(vals_copy);
-
-}
-
-
-struct icalrecurrencetype icalrecurrencetype_from_string(const char* str)
-{
- struct icalrecur_parser parser;
-
- memset(&parser,0,sizeof(parser));
- icalrecurrencetype_clear(&parser.rt);
-
- icalerror_check_arg_re(str!=0,"str",parser.rt);
-
-
- /* Set up the parser struct */
- parser.rule = str;
- parser.copy = icalmemory_strdup(parser.rule);
- parser.this_clause = parser.copy;
-
- if(parser.copy == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return parser.rt;
- }
-
- /* Loop through all of the clauses */
- for(icalrecur_first_clause(&parser);
- parser.this_clause != 0;
- icalrecur_next_clause(&parser))
- {
- char *name, *value;
- icalrecur_clause_name_and_value(&parser,&name,&value);
-
- if(name == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- icalrecurrencetype_clear(&parser.rt);
- return parser.rt;
- }
-
- if (strcmp(name,"FREQ") == 0){
- parser.rt.freq = icalrecur_string_to_freq(value);
- } else if (strcmp(name,"COUNT") == 0){
- parser.rt.count = atoi(value);
- } else if (strcmp(name,"UNTIL") == 0){
- parser.rt.until = icaltime_from_string(value);
- } else if (strcmp(name,"INTERVAL") == 0){
- parser.rt.interval = atoi(value);
- } else if (strcmp(name,"WKST") == 0){
- parser.rt.week_start = icalrecur_string_to_weekday(value);
- } else if (strcmp(name,"BYSECOND") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_second,
- ICAL_BY_SECOND_SIZE,value);
- } else if (strcmp(name,"BYMINUTE") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_minute,
- ICAL_BY_MINUTE_SIZE,value);
- } else if (strcmp(name,"BYHOUR") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_hour,
- ICAL_BY_HOUR_SIZE,value);
- } else if (strcmp(name,"BYDAY") == 0){
- icalrecur_add_bydayrules(&parser,value);
- } else if (strcmp(name,"BYMONTHDAY") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_month_day,
- ICAL_BY_MONTHDAY_SIZE,value);
- } else if (strcmp(name,"BYYEARDAY") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_year_day,
- ICAL_BY_YEARDAY_SIZE,value);
- } else if (strcmp(name,"BYWEEKNO") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_week_no,
- ICAL_BY_WEEKNO_SIZE,value);
- } else if (strcmp(name,"BYMONTH") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_month,
- ICAL_BY_MONTH_SIZE,value);
- } else if (strcmp(name,"BYSETPOS") == 0){
- icalrecur_add_byrules(&parser,parser.rt.by_set_pos,
- ICAL_BY_SETPOS_SIZE,value);
- } else {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- icalrecurrencetype_clear(&parser.rt);
- return parser.rt;
- }
-
- }
-
- free(parser.copy);
-
- return parser.rt;
-
-}
-
-#ifndef ICAL_NO_LIBICAL
-
-struct { char* str;size_t offset; short limit; } recurmap[] =
-{
- {";BYSECOND=",offsetof(struct icalrecurrencetype,by_second),60},
- {";BYMINUTE=",offsetof(struct icalrecurrencetype,by_minute),60},
- {";BYHOUR=",offsetof(struct icalrecurrencetype,by_hour),24},
- {";BYDAY=",offsetof(struct icalrecurrencetype,by_day),7},
- {";BYMONTHDAY=",offsetof(struct icalrecurrencetype,by_month_day),31},
- {";BYYEARDAY=",offsetof(struct icalrecurrencetype,by_year_day),366},
- {";BYWEEKNO=",offsetof(struct icalrecurrencetype,by_week_no),52},
- {";BYMONTH=",offsetof(struct icalrecurrencetype,by_month),12},
- {";BYSETPOS=",offsetof(struct icalrecurrencetype,by_set_pos),366},
- {0,0,0},
-};
-
-/* A private routine in icalvalue.c */
-void print_date_to_string(char* str, struct icaltimetype *data);
-void print_datetime_to_string(char* str, struct icaltimetype *data);
-
-char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur)
-{
- char* str;
- char *str_p;
- size_t buf_sz = 200;
- char temp[20];
- int i,j;
-
- if(recur->freq == ICAL_NO_RECURRENCE){
- return 0;
- }
-
- str = (char*)icalmemory_tmp_buffer(buf_sz);
- str_p = str;
-
- icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ=");
- icalmemory_append_string(&str,&str_p,&buf_sz,
- icalrecur_freq_to_string(recur->freq));
-
- if(recur->until.year != 0){
-
- temp[0] = 0;
- if (recur->until.is_date)
- print_date_to_string(temp,&(recur->until));
- else
- print_datetime_to_string(temp,&(recur->until));
-
- icalmemory_append_string(&str,&str_p,&buf_sz,";UNTIL=");
- icalmemory_append_string(&str,&str_p,&buf_sz, temp);
- }
-
- if(recur->count != 0){
- sprintf(temp,"%d",recur->count);
- icalmemory_append_string(&str,&str_p,&buf_sz,";COUNT=");
- icalmemory_append_string(&str,&str_p,&buf_sz, temp);
- }
-
- if(recur->interval != 0){
- sprintf(temp,"%d",recur->interval);
- icalmemory_append_string(&str,&str_p,&buf_sz,";INTERVAL=");
- icalmemory_append_string(&str,&str_p,&buf_sz, temp);
- }
-
- for(j =0; recurmap[j].str != 0; j++){
- short* array = (short*)(recurmap[j].offset+ (size_t)recur);
- short limit = recurmap[j].limit;
-
- /* Skip unused arrays */
- if( array[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
-
- icalmemory_append_string(&str,&str_p,&buf_sz,recurmap[j].str);
-
- for(i=0;
- i< limit && array[i] != ICAL_RECURRENCE_ARRAY_MAX;
- i++){
- if (j == 3) { /* BYDAY */
- short dow = icalrecurrencetype_day_day_of_week(array[i]);
- const char *daystr = icalrecur_weekday_to_string(dow);
- short pos;
-
- pos = icalrecurrencetype_day_position(array[i]);
-
- if (pos == 0)
- icalmemory_append_string(&str,&str_p,&buf_sz,daystr);
- else {
- sprintf(temp,"%d%s",pos,daystr);
- icalmemory_append_string(&str,&str_p,&buf_sz,temp);
- }
-
- } else {
- sprintf(temp,"%d",array[i]);
- icalmemory_append_string(&str,&str_p,&buf_sz, temp);
- }
-
- if( (i+1)<limit &&array[i+1]
- != ICAL_RECURRENCE_ARRAY_MAX){
- icalmemory_append_char(&str,&str_p,&buf_sz,',');
- }
- }
- }
- }
-
- return str;
-}
-#endif
-
-
-
-/************************* occurrence iteration routiens ******************/
-
-enum byrule {
- NO_CONTRACTION = -1,
- BY_SECOND = 0,
- BY_MINUTE = 1,
- BY_HOUR = 2,
- BY_DAY = 3,
- BY_MONTH_DAY = 4,
- BY_YEAR_DAY = 5,
- BY_WEEK_NO = 6,
- BY_MONTH = 7,
- BY_SET_POS
-};
-
-
-
-struct icalrecur_iterator_impl {
-
- struct icaltimetype dtstart; /* Hack. Make into time_t */
- struct icaltimetype last; /* last time return from _iterator_next*/
- int occurrence_no; /* number of step made on t iterator */
- struct icalrecurrencetype rule;
-
- short days[366];
- short days_index;
-
- enum byrule byrule;
- short by_indices[9];
- short orig_data[9]; /* 1 if there was data in the byrule */
-
-
- short *by_ptrs[9]; /* Pointers into the by_* array elements of the rule */
-
-};
-
-int icalrecur_iterator_sizeof_byarray(short* byarray)
-{
- int array_itr;
-
- for(array_itr = 0;
- byarray[array_itr] != ICAL_RECURRENCE_ARRAY_MAX;
- array_itr++){
- }
-
- return array_itr;
-}
-
-enum expand_table {
- UNKNOWN = 0,
- CONTRACT = 1,
- EXPAND =2,
- ILLEGAL=3
-};
-
-/* The split map indicates, for a particular interval, wether a BY_*
- rule part expands the number of instances in the occcurrence set or
- contracts it. 1=> contract, 2=>expand, and 3 means the pairing is
- not allowed. */
-struct expand_split_map_struct
-{
- icalrecurrencetype_frequency frequency;
-
- /* Elements of the 'map' array correspond to the BYxxx rules:
- Second,Minute,Hour,Day,Month Day,Year Day,Week No,Month*/
-
- short map[8];
-};
-
-struct expand_split_map_struct expand_map[] =
-{
- {ICAL_SECONDLY_RECURRENCE,{1,1,1,1,1,1,1,1}},
- {ICAL_MINUTELY_RECURRENCE,{2,1,1,1,1,1,1,1}},
- {ICAL_HOURLY_RECURRENCE, {2,2,1,1,1,1,1,1}},
- {ICAL_DAILY_RECURRENCE, {2,2,2,1,1,1,1,1}},
- {ICAL_WEEKLY_RECURRENCE, {2,2,2,2,3,3,1,1}},
- {ICAL_MONTHLY_RECURRENCE, {2,2,2,2,2,3,3,1}},
- {ICAL_YEARLY_RECURRENCE, {2,2,2,2,2,2,2,2}},
- {ICAL_NO_RECURRENCE, {0,0,0,0,0,0,0,0}}
-
-};
-
-
-
-/* Check that the rule has only the two given interday byrule parts. */
-int icalrecur_two_byrule(struct icalrecur_iterator_impl* impl,
- enum byrule one,enum byrule two)
-{
- short test_array[9];
- enum byrule itr;
- int passes = 0;
-
- memset(test_array,0,9);
-
- test_array[one] = 1;
- test_array[two] = 1;
-
- for(itr = BY_DAY; itr != BY_SET_POS; itr++){
-
- if( (test_array[itr] == 0 &&
- impl->by_ptrs[itr][0] != ICAL_RECURRENCE_ARRAY_MAX
- ) ||
- (test_array[itr] == 1 &&
- impl->by_ptrs[itr][0] == ICAL_RECURRENCE_ARRAY_MAX
- )
- ) {
- /* test failed */
- passes = 0;
- }
- }
-
- return passes;
-
-}
-
-/* Check that the rule has only the one given interdat byrule parts. */
-int icalrecur_one_byrule(struct icalrecur_iterator_impl* impl,enum byrule one)
-{
- int passes = 1;
- enum byrule itr;
-
- for(itr = BY_DAY; itr != BY_SET_POS; itr++){
-
- if ((itr==one && impl->by_ptrs[itr][0] == ICAL_RECURRENCE_ARRAY_MAX) ||
- (itr!=one && impl->by_ptrs[itr][0] != ICAL_RECURRENCE_ARRAY_MAX)) {
- passes = 0;
- }
- }
-
- return passes;
-}
-
-int count_byrules(struct icalrecur_iterator_impl* impl)
-{
- int count = 0;
- enum byrule itr;
-
- for(itr = BY_DAY; itr <= BY_SET_POS; itr++){
- if(impl->by_ptrs[itr][0] != ICAL_RECURRENCE_ARRAY_MAX){
- count++;
- }
- }
-
- return count;
-}
-
-
-void setup_defaults(struct icalrecur_iterator_impl* impl,
- enum byrule byrule, icalrecurrencetype_frequency req,
- short deftime, int *timepart)
-{
-
- icalrecurrencetype_frequency freq;
- freq = impl->rule.freq;
-
- /* Re-write the BY rule arrays with data from the DTSTART time so
- we don't have to explicitly deal with DTSTART */
-
- if(impl->by_ptrs[byrule][0] == ICAL_RECURRENCE_ARRAY_MAX &&
- expand_map[freq].map[byrule] != CONTRACT){
- impl->by_ptrs[byrule][0] = deftime;
- }
-
- /* Initialize the first occurence */
- if( freq != req && expand_map[freq].map[byrule] != CONTRACT){
- *timepart = impl->by_ptrs[byrule][0];
- }
-
-
-}
-
-int has_by_data(struct icalrecur_iterator_impl* impl, enum byrule byrule){
-
- return (impl->orig_data[byrule] == 1);
-}
-
-
-int expand_year_days(struct icalrecur_iterator_impl* impl,short year);
-
-
-icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule,
- struct icaltimetype dtstart)
-{
- struct icalrecur_iterator_impl* impl;
- icalrecurrencetype_frequency freq;
-
- short days_in_month;
-
- if ( ( impl = (struct icalrecur_iterator_impl *)
- malloc(sizeof(struct icalrecur_iterator_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memset(impl,0,sizeof(struct icalrecur_iterator_impl));
-
- impl->rule = rule;
- impl->last = dtstart;
- impl->dtstart = dtstart;
- impl->days_index =0;
- impl->occurrence_no = 0;
- freq = impl->rule.freq;
-
- /* Set up convienience pointers to make the code simpler. Allows
- us to iterate through all of the BY* arrays in the rule. */
-
- impl->by_ptrs[BY_MONTH]=impl->rule.by_month;
- impl->by_ptrs[BY_WEEK_NO]=impl->rule.by_week_no;
- impl->by_ptrs[BY_YEAR_DAY]=impl->rule.by_year_day;
- impl->by_ptrs[BY_MONTH_DAY]=impl->rule.by_month_day;
- impl->by_ptrs[BY_DAY]=impl->rule.by_day;
- impl->by_ptrs[BY_HOUR]=impl->rule.by_hour;
- impl->by_ptrs[BY_MINUTE]=impl->rule.by_minute;
- impl->by_ptrs[BY_SECOND]=impl->rule.by_second;
- impl->by_ptrs[BY_SET_POS]=impl->rule.by_set_pos;
-
- memset(impl->orig_data,0,9);
-
- /* Note which by rules had data in them when the iterator was
- created. We can't use the actuall by_x arrays, because the
- empty ones will be given default values later in this
- routine. The orig_data array will be used later in has_by_data */
-
- impl->orig_data[BY_MONTH]
- = (impl->rule.by_month[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_WEEK_NO]
- =(impl->rule.by_week_no[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_YEAR_DAY]
- =(impl->rule.by_year_day[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_MONTH_DAY]
- =(impl->rule.by_month_day[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_DAY]
- = (impl->rule.by_day[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_HOUR]
- = (impl->rule.by_hour[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_MINUTE]
- = (impl->rule.by_minute[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_SECOND]
- = (impl->rule.by_second[0]!=ICAL_RECURRENCE_ARRAY_MAX);
- impl->orig_data[BY_SET_POS]
- = (impl->rule.by_set_pos[0]!=ICAL_RECURRENCE_ARRAY_MAX);
-
-
- /* Check if the recurrence rule is legal */
-
- /* If the BYYEARDAY appears, no other date rule part may appear. */
-
- if(icalrecur_two_byrule(impl,BY_YEAR_DAY,BY_MONTH) ||
- icalrecur_two_byrule(impl,BY_YEAR_DAY,BY_WEEK_NO) ||
- icalrecur_two_byrule(impl,BY_YEAR_DAY,BY_MONTH_DAY) ||
- icalrecur_two_byrule(impl,BY_YEAR_DAY,BY_DAY) ){
-
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
-
- return 0;
- }
-
- /* BYWEEKNO and BYMONTH rule parts may not both appear.*/
-
- if(icalrecur_two_byrule(impl,BY_WEEK_NO,BY_MONTH)){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
-
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- /* BYWEEKNO and BYMONTHDAY rule parts may not both appear.*/
-
- if(icalrecur_two_byrule(impl,BY_WEEK_NO,BY_MONTH_DAY)){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
-
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
-
- /*For MONTHLY recurrences (FREQ=MONTHLY) neither BYYEARDAY nor
- BYWEEKNO may appear. */
-
- if(freq == ICAL_MONTHLY_RECURRENCE &&
- icalrecur_one_byrule(impl,BY_WEEK_NO)){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
-
- /*For WEEKLY recurrences (FREQ=WEEKLY) neither BYMONTHDAY nor
- BYYEARDAY may appear. */
-
- if(freq == ICAL_WEEKLY_RECURRENCE &&
- icalrecur_one_byrule(impl,BY_MONTH_DAY )) {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- /* BYYEARDAY may only appear in YEARLY rules */
- if(freq != ICAL_YEARLY_RECURRENCE &&
- icalrecur_one_byrule(impl,BY_YEAR_DAY )) {
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- /* Rewrite some of the rules and set up defaults to make later
- processing easier. Primarily, t involves copying an element
- from the start time into the coresponding BY_* array when the
- BY_* array is empty */
-
-
- setup_defaults(impl,BY_SECOND,ICAL_SECONDLY_RECURRENCE,impl->dtstart.second,
- &(impl->last.second));
-
- setup_defaults(impl,BY_MINUTE,ICAL_MINUTELY_RECURRENCE,impl->dtstart.minute,
- &(impl->last.minute));
-
- setup_defaults(impl,BY_HOUR,ICAL_HOURLY_RECURRENCE,impl->dtstart.hour,
- &(impl->last.hour));
-
- setup_defaults(impl,BY_MONTH_DAY,ICAL_DAILY_RECURRENCE,impl->dtstart.day,
- &(impl->last.day));
-
- setup_defaults(impl,BY_MONTH,ICAL_MONTHLY_RECURRENCE,impl->dtstart.month,
- &(impl->last.month));
-
-
- if(impl->rule.freq == ICAL_WEEKLY_RECURRENCE ){
-
- if(impl->by_ptrs[BY_DAY][0] == ICAL_RECURRENCE_ARRAY_MAX){
-
- /* Weekly recurrences with no BY_DAY data should occur on the
- same day of the week as the start time . */
- impl->by_ptrs[BY_DAY][0] = icaltime_day_of_week(impl->dtstart);
-
- } else {
- /* If there is BY_DAY data, then we need to move the initial
- time to the start of the BY_DAY data. That is if the
- start time is on a Wednesday, and the rule has
- BYDAY=MO,WE,FR, move the initial time back to
- monday. Otherwise, jumping to the next week ( jumping 7
- days ahead ) will skip over some occurrences in the
- second week. */
-
- /* This is probably a HACK. There should be some more
- general way to solve this problem */
-
- short dow = impl->by_ptrs[BY_DAY][0]-icaltime_day_of_week(impl->last);
-
- if(dow < 0) {
- /* initial time is after first day of BY_DAY data */
-
- impl->last.day += dow;
- impl->last = icaltime_normalize(impl->last);
- }
- }
-
-
- }
-
- /* For YEARLY rule, begin by setting up the year days array */
-
- if(impl->rule.freq == ICAL_YEARLY_RECURRENCE){
- struct icaltimetype next;
-
- for (;;) {
- expand_year_days(impl,impl->last.year);
- if (impl->days[0] != ICAL_RECURRENCE_ARRAY_MAX)
- break;
- increment_year(impl,impl->rule.interval);
- }
-
- /* Copy the first day into last. */
- next = icaltime_from_day_of_year(impl->days[0], impl->last.year);
-
- impl->last.day = next.day;
- impl->last.month = next.month;
- }
-
-
- /* If this is a monthly interval with by day data, then we need to
- set the last value to the appropriate day of the month */
-
- if(impl->rule.freq == ICAL_MONTHLY_RECURRENCE &&
- has_by_data(impl,BY_DAY)) {
-
- short dow = icalrecurrencetype_day_day_of_week(
- impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]);
- short pos = icalrecurrencetype_day_position(
- impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]);
-
- short poscount = 0;
- days_in_month =
- icaltime_days_in_month(impl->last.month, impl->last.year);
-
- if(pos >= 0){
- /* Count up from the first day pf the month to find the
- pos'th weekday of dow ( like the second monday. ) */
-
- for(impl->last.day = 1;
- impl->last.day <= days_in_month;
- impl->last.day++){
-
- if(icaltime_day_of_week(impl->last) == dow){
- if(++poscount == pos || pos == 0){
- break;
- }
- }
- }
- } else {
- /* Count down from the last day pf the month to find the
- pos'th weekday of dow ( like the second to last monday. ) */
- pos = -pos;
- for(impl->last.day = days_in_month;
- impl->last.day != 0;
- impl->last.day--){
-
- if(icaltime_day_of_week(impl->last) == dow){
- if(++poscount == pos ){
- break;
- }
- }
- }
- }
-
-
- if(impl->last.day > days_in_month || impl->last.day == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
- }
-
-
-
- return impl;
-}
-
-
-void icalrecur_iterator_free(icalrecur_iterator* i)
-{
-
- struct icalrecur_iterator_impl* impl =
- (struct icalrecur_iterator_impl*)i;
-
- icalerror_check_arg_rv((impl!=0),"impl");
-
- free(impl);
-
-}
-
-
-void increment_year(struct icalrecur_iterator_impl* impl, int inc)
-{
- impl->last.year+=inc;
-}
-
-/* Increment month is different that the other incement_* routines --
- it figures out the interval for itself, and uses BYMONTH data if
- available. */
-void increment_month(struct icalrecur_iterator_impl* impl)
-{
- int years;
-
- if(has_by_data(impl,BY_MONTH) ){
- /* Ignore the frequency and use the byrule data */
-
- impl->by_indices[BY_MONTH]++;
-
- if (impl->by_ptrs[BY_MONTH][impl->by_indices[BY_MONTH]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
- impl->by_indices[BY_MONTH] = 0;
-
- increment_year(impl,1);
-
- }
-
- impl->last.month =
- impl->by_ptrs[BY_MONTH][impl->by_indices[BY_MONTH]];
-
- } else {
-
- int inc;
-
- if(impl->rule.freq == ICAL_MONTHLY_RECURRENCE){
- inc = impl->rule.interval;
- } else {
- inc = 1;
- }
-
- impl->last.month+=inc;
-
- /* Months are offset by one */
- impl->last.month--;
-
- years = impl->last.month / 12;
-
- impl->last.month = impl->last.month % 12;
-
- impl->last.month++;
-
- if (years != 0){
- increment_year(impl,years);
- }
- }
-}
-
-void increment_monthday(struct icalrecur_iterator_impl* impl, int inc)
-{
- int i;
-
- for(i=0; i<inc; i++){
-
- short days_in_month =
- icaltime_days_in_month(impl->last.month,impl->last.year);
-
- impl->last.day++;
-
- if (impl->last.day > days_in_month){
- impl->last.day = impl->last.day-days_in_month;
- increment_month(impl);
- }
- }
-}
-
-
-void increment_hour(struct icalrecur_iterator_impl* impl, int inc)
-{
- short days;
-
- impl->last.hour+=inc;
-
- days = impl->last.hour / 24;
- impl->last.hour = impl->last.hour % 24;
-
- if (impl->days != 0){
- increment_monthday(impl,days);
- }
-}
-
-void increment_minute(struct icalrecur_iterator_impl* impl, int inc)
-{
- short hours;
-
- impl->last.minute+=inc;
-
- hours = impl->last.minute / 60;
- impl->last.minute = impl->last.minute % 60;
-
- if (hours != 0){
- increment_hour(impl,hours);
- }
-
-}
-
-void increment_second(struct icalrecur_iterator_impl* impl, int inc)
-{
- short minutes;
-
- impl->last.second+=inc;
-
- minutes = impl->last.second / 60;
- impl->last.second = impl->last.second % 60;
-
- if (minutes != 0)
- {
- increment_minute(impl, minutes);
- }
-}
-
-#if 0
-#include "ical.h"
-void test_increment()
-{
- struct icalrecur_iterator_impl impl;
-
- impl.last = icaltime_from_string("20000101T000000Z");
-
- printf("Orig: %s\n",icaltime_as_ctime(impl.last));
-
- increment_second(&impl,5);
- printf("+ 5 sec : %s\n",icaltime_as_ctime(impl.last));
-
- increment_second(&impl,355);
- printf("+ 355 sec : %s\n",icaltime_as_ctime(impl.last));
-
- increment_minute(&impl,5);
- printf("+ 5 min : %s\n",icaltime_as_ctime(impl.last));
-
- increment_minute(&impl,360);
- printf("+ 360 min : %s\n",icaltime_as_ctime(impl.last));
- increment_hour(&impl,5);
- printf("+ 5 hours : %s\n",icaltime_as_ctime(impl.last));
- increment_hour(&impl,43);
- printf("+ 43 hours : %s\n",icaltime_as_ctime(impl.last));
- increment_monthday(&impl,3);
- printf("+ 3 days : %s\n",icaltime_as_ctime(impl.last));
- increment_monthday(&impl,600);
- printf("+ 600 days : %s\n",icaltime_as_ctime(impl.last));
-
-}
-
-#endif
-
-short next_second(struct icalrecur_iterator_impl* impl)
-{
-
- short has_by_data = (impl->by_ptrs[BY_SECOND][0]!=ICAL_RECURRENCE_ARRAY_MAX);
- short this_frequency = (impl->rule.freq == ICAL_SECONDLY_RECURRENCE);
-
- short end_of_data = 0;
-
- assert(has_by_data || this_frequency);
-
- if( has_by_data ){
- /* Ignore the frequency and use the byrule data */
-
- impl->by_indices[BY_SECOND]++;
-
- if (impl->by_ptrs[BY_SECOND][impl->by_indices[BY_SECOND]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
- impl->by_indices[BY_SECOND] = 0;
-
- end_of_data = 1;
- }
-
-
- impl->last.second =
- impl->by_ptrs[BY_SECOND][impl->by_indices[BY_SECOND]];
-
-
- } else if( !has_by_data && this_frequency ){
- /* Compute the next value from the last time and the frequency interval*/
- increment_second(impl, impl->rule.interval);
-
- }
-
- /* If we have gone through all of the seconds on the BY list, then we
- need to move to the next minute */
-
- if(has_by_data && end_of_data && this_frequency ){
- increment_minute(impl,1);
- }
-
- return end_of_data;
-
-}
-
-int next_minute(struct icalrecur_iterator_impl* impl)
-{
-
- short has_by_data = (impl->by_ptrs[BY_MINUTE][0]!=ICAL_RECURRENCE_ARRAY_MAX);
- short this_frequency = (impl->rule.freq == ICAL_MINUTELY_RECURRENCE);
-
- short end_of_data = 0;
-
- assert(has_by_data || this_frequency);
-
-
- if (next_second(impl) == 0){
- return 0;
- }
-
- if( has_by_data ){
- /* Ignore the frequency and use the byrule data */
-
- impl->by_indices[BY_MINUTE]++;
-
- if (impl->by_ptrs[BY_MINUTE][impl->by_indices[BY_MINUTE]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
-
- impl->by_indices[BY_MINUTE] = 0;
-
- end_of_data = 1;
- }
-
- impl->last.minute =
- impl->by_ptrs[BY_MINUTE][impl->by_indices[BY_MINUTE]];
-
- } else if( !has_by_data && this_frequency ){
- /* Compute the next value from the last time and the frequency interval*/
- increment_minute(impl,impl->rule.interval);
- }
-
-/* If we have gone through all of the minutes on the BY list, then we
- need to move to the next hour */
-
- if(has_by_data && end_of_data && this_frequency ){
- increment_hour(impl,1);
- }
-
- return end_of_data;
-}
-
-int next_hour(struct icalrecur_iterator_impl* impl)
-{
-
- short has_by_data = (impl->by_ptrs[BY_HOUR][0]!=ICAL_RECURRENCE_ARRAY_MAX);
- short this_frequency = (impl->rule.freq == ICAL_HOURLY_RECURRENCE);
-
- short end_of_data = 0;
-
- assert(has_by_data || this_frequency);
-
- if (next_minute(impl) == 0){
- return 0;
- }
-
- if( has_by_data ){
- /* Ignore the frequency and use the byrule data */
-
- impl->by_indices[BY_HOUR]++;
-
- if (impl->by_ptrs[BY_HOUR][impl->by_indices[BY_HOUR]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
- impl->by_indices[BY_HOUR] = 0;
-
- end_of_data = 1;
- }
-
- impl->last.hour =
- impl->by_ptrs[BY_HOUR][impl->by_indices[BY_HOUR]];
-
- } else if( !has_by_data && this_frequency ){
- /* Compute the next value from the last time and the frequency interval*/
- increment_hour(impl,impl->rule.interval);
-
- }
-
- /* If we have gone through all of the hours on the BY list, then we
- need to move to the next day */
-
- if(has_by_data && end_of_data && this_frequency ){
- increment_monthday(impl,1);
- }
-
- return end_of_data;
-
-}
-
-int next_day(struct icalrecur_iterator_impl* impl)
-{
-
- short has_by_data = (impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
- short this_frequency = (impl->rule.freq == ICAL_DAILY_RECURRENCE);
-
- assert(has_by_data || this_frequency);
-
- if (next_hour(impl) == 0){
- return 0;
- }
-
- /* Always increment through the interval, since this routine is not
- called by any other next_* routine, and the days that are
- excluded will be taken care of by restriction filtering */
-
- if(this_frequency){
- increment_monthday(impl,impl->rule.interval);
- } else {
- increment_monthday(impl,1);
- }
-
-
- return 0;
-
-}
-
-
-int next_yearday(struct icalrecur_iterator_impl* impl)
-{
-
- short has_by_data = (impl->by_ptrs[BY_YEAR_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
-
- short end_of_data = 0;
-
- assert(has_by_data );
-
- if (next_hour(impl) == 0){
- return 0;
- }
-
- impl->by_indices[BY_YEAR_DAY]++;
-
- if (impl->by_ptrs[BY_YEAR_DAY][impl->by_indices[BY_YEAR_DAY]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
- impl->by_indices[BY_YEAR_DAY] = 0;
-
- end_of_data = 1;
- }
-
- impl->last.day =
- impl->by_ptrs[BY_YEAR_DAY][impl->by_indices[BY_YEAR_DAY]];
-
- if(has_by_data && end_of_data){
- increment_year(impl,1);
- }
-
- return end_of_data;
-
-}
-
-/* This routine is only called by next_week. It is certain that BY_DAY
-has data */
-
-int next_weekday_by_week(struct icalrecur_iterator_impl* impl)
-{
-
- short end_of_data = 0;
- short start_of_week, dow;
- struct icaltimetype next;
-
- if (next_hour(impl) == 0){
- return 0;
- }
-
- assert( impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
-
- while(1) {
-
- impl->by_indices[BY_DAY]++; /* Look at next elem in BYDAY array */
-
- /* Are we at the end of the BYDAY array? */
- if (impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
-
- impl->by_indices[BY_DAY] = 0; /* Reset to 0 */
- end_of_data = 1; /* Signal that we're at the end */
- }
-
- /* Add the day of week offset to to the start of this week, and use
- that to get the next day */
- dow = impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]];
- start_of_week = icaltime_start_doy_of_week(impl->last);
-
- dow--; /*Sun is 1, not 0 */
-
- if(dow+start_of_week <1 && !end_of_data){
- /* The selected date is in the previous year. */
- continue;
- }
-
- next = icaltime_from_day_of_year(start_of_week + dow,impl->last.year);
-
- impl->last.day = next.day;
- impl->last.month = next.month;
- impl->last.year = next.year;
-
- return end_of_data;
- }
-
-}
-
-int nth_weekday(short dow, short pos, struct icaltimetype t){
-
- short days_in_month = icaltime_days_in_month(t.month,t.year);
- short end_dow, start_dow;
- short wd;
-
- if(pos >= 0){
- t.day = 1;
- start_dow = icaltime_day_of_week(t);
-
- if (pos != 0) {
- pos--;
- }
-
- /* find month day of first occurrence of dow -- such as the
- month day of the first monday */
-
- wd = dow-start_dow+1;
-
- if (wd <= 0){
- wd = wd + 7;
- }
-
- wd = wd + pos * 7;
-
- } else {
- t.day = days_in_month;
- end_dow = icaltime_day_of_week(t);
-
- pos++;
-
- /* find month day of last occurrence of dow -- such as the
- month day of the last monday */
-
- wd = (end_dow - dow);
-
- if (wd < 0){
- wd = wd+ 7;
- }
-
- wd = days_in_month - wd;
-
- wd = wd + pos * 7;
- }
-
- return wd;
-}
-
-
-int next_month(struct icalrecur_iterator_impl* impl)
-{
- int data_valid = 1;
-
- short this_frequency = (impl->rule.freq == ICAL_MONTHLY_RECURRENCE);
-
- assert( has_by_data(impl,BY_MONTH) || this_frequency);
-
- /* Iterate through the occurrences within a day. If we don't get to
- the end of the intra-day data, don't bother going to the next
- month */
-
- if (next_hour(impl) == 0){
- return data_valid; /* Signal that the data is valid */
- }
-
-
- /* Now iterate through the occurrences within a month -- by days,
- weeks or weekdays. */
-
- if(has_by_data(impl,BY_DAY) && has_by_data(impl,BY_MONTH_DAY)){
- /* Cases like: FREQ=MONTHLY;INTERVAL=1;BYDAY=FR;BYMONTHDAY=13 */
- short day, idx,j;
- short days_in_month = icaltime_days_in_month(impl->last.month,
- impl->last.year);
- /* Iterate through the remaining days in the month and check if
- each day is listed in the BY_DAY array and in the BY_MONTHDAY
- array. This seems very inneficient, but I think it is the
- simplest way to account for both BYDAY=1FR (First friday in
- month) and BYDAY=FR ( every friday in month ) */
-
- for(day = impl->last.day+1; day <= days_in_month; day++){
- for(idx = 0; BYDAYPTR[idx] != ICAL_RECURRENCE_ARRAY_MAX; idx++){
- for(j = 0; BYMDPTR[j]!=ICAL_RECURRENCE_ARRAY_MAX; j++){
- short dow =
- icalrecurrencetype_day_day_of_week(BYDAYPTR[idx]);
- short pos = icalrecurrencetype_day_position(BYDAYPTR[idx]);
- short mday = BYMDPTR[j];
- short this_dow;
-
- impl->last.day = day;
- this_dow = icaltime_day_of_week(impl->last);
-
- if( (pos == 0 && dow == this_dow && mday == day) ||
- (nth_weekday(dow,pos,impl->last) == day && mday==day)){
- goto MDEND;
- }
- }
- }
- }
-
- MDEND:
-
- if ( day > days_in_month){
- impl->last.day = 1;
- increment_month(impl);
- data_valid = 0; /* signal that impl->last is invalid */
- }
-
-
- } else if(has_by_data(impl,BY_DAY)){
- /* Cases like: FREQ=MONTHLY;INTERVAL=1;BYDAY=FR */
- /* For this case, the weekdays are relative to the
- month. BYDAY=FR -> First Friday in month, etc. */
-
- short day, idx;
- short days_in_month = icaltime_days_in_month(impl->last.month,
- impl->last.year);
-
- assert( BYDAYPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX);
-
- /* Iterate through the remaining days in the month and check if
- each day is listed in the BY_DAY array. This seems very
- inneficient, but I think it is the simplest way to account
- for both BYDAY=1FR (First friday in month) and BYDAY=FR (
- every friday in month ) */
-
- for(day = impl->last.day+1; day <= days_in_month; day++){
- for(idx = 0; BYDAYPTR[idx] != ICAL_RECURRENCE_ARRAY_MAX; idx++){
- short dow = icalrecurrencetype_day_day_of_week(BYDAYPTR[idx]);
- short pos = icalrecurrencetype_day_position(BYDAYPTR[idx]);
- short this_dow;
-
- impl->last.day = day;
- this_dow = icaltime_day_of_week(impl->last);
-
- if( (pos == 0 && dow == this_dow ) ||
- (nth_weekday(dow,pos,impl->last) == day)){
- goto DEND;
- }
- }
- }
-
- DEND:
-
- if ( day > days_in_month){
- impl->last.day = 1;
- increment_month(impl);
- data_valid = 0; /* signal that impl->last is invalid */
- }
-
- } else if (has_by_data(impl,BY_MONTH_DAY)) {
- /* Cases like: FREQ=MONTHLY;COUNT=10;BYMONTHDAY=-3 */
- short day;
-
- assert( BYMDPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX);
-
- BYMDIDX++;
-
- /* Are we at the end of the BYDAY array? */
- if (BYMDPTR[BYMDIDX] ==ICAL_RECURRENCE_ARRAY_MAX){
-
- BYMDIDX = 0; /* Reset to 0 */
- increment_month(impl);
- }
-
- day = BYMDPTR[BYMDIDX];
-
- if (day < 0) {
- day = icaltime_days_in_month(impl->last.month,impl->last.year)+
- day + 1;
- }
-
- impl->last.day = day;
-
- } else {
- increment_month(impl);
- }
-
- return data_valid; /* Signal that the data is valid */
-
-}
-
-
-int next_week(struct icalrecur_iterator_impl* impl)
-{
- short has_by_data = (impl->by_ptrs[BY_WEEK_NO][0]!=ICAL_RECURRENCE_ARRAY_MAX);
- short this_frequency = (impl->rule.freq == ICAL_WEEKLY_RECURRENCE);
- short end_of_data = 0;
-
-
- /* Increment to the next week day */
- if (next_weekday_by_week(impl) == 0){
- return 0; /* Have not reached end of week yet */
- }
-
- /* If we get here, we have incremented through the entire week, and
- can increment to the next week */
-
-
- if( has_by_data){
- /* Use the Week Number byrule data */
- int week_no;
- struct icaltimetype t;
-
- impl->by_indices[BY_WEEK_NO]++;
-
- if (impl->by_ptrs[BY_WEEK_NO][impl->by_indices[BY_WEEK_NO]]
- ==ICAL_RECURRENCE_ARRAY_MAX){
- impl->by_indices[BY_WEEK_NO] = 0;
-
- end_of_data = 1;
- }
-
- t = impl->last;
- t.month=1; /* HACK, should be setting to the date of the first week of year*/
- t.day=1;
-
- week_no = impl->by_ptrs[BY_WEEK_NO][impl->by_indices[BY_WEEK_NO]];
-
- impl->last.day += week_no*7;
-
- impl->last = icaltime_normalize(impl->last);
-
- } else if( !has_by_data && this_frequency ){
- /* If there is no BY_WEEK_NO data, just jump forward 7 days. */
- increment_monthday(impl,7*impl->rule.interval);
- }
-
-
- if(has_by_data && end_of_data && this_frequency ){
- increment_year(impl,1);
- }
-
- return end_of_data;
-
-}
-
-
-/* Expand the BYDAY rule part and return a pointer to a newly allocated list of days. */
-pvl_list expand_by_day(struct icalrecur_iterator_impl* impl,short year)
-{
- /* Try to calculate each of the occurrences. */
- int i;
- pvl_list days_list = pvl_newlist();
-
- short start_dow, end_dow, end_year_day;
- struct icaltimetype tmp = impl->last;
-
- tmp.year= year;
- tmp.month = 1;
- tmp.day = 1;
- tmp.is_date = 1;
-
- /* Find the day that 1st Jan falls on, 1 (Sun) to 7 (Sat). */
- start_dow = icaltime_day_of_week(tmp);
-
- /* Get the last day of the year*/
- tmp.year= year;
- tmp.month = 12;
- tmp.day = 31;
- tmp.is_date = 1;
-
- end_dow = icaltime_day_of_week(tmp);
- end_year_day = icaltime_day_of_year(tmp);
-
- for(i = 0; BYDAYPTR[i] != ICAL_RECURRENCE_ARRAY_MAX; i++){
- /* This is 1 (Sun) to 7 (Sat). */
- short dow =
- icalrecurrencetype_day_day_of_week(BYDAYPTR[i]);
- short pos = icalrecurrencetype_day_position(BYDAYPTR[i]);
-
- if(pos == 0){
- /* The day was specified without a position -- it is just
- a bare day of the week ( BYDAY=SU) so add all of the
- days of the year with this day-of-week*/
- int doy, tmp_start_doy;
-
- tmp_start_doy = ((dow + 7 - start_dow) % 7) + 1;
-
- for (doy = tmp_start_doy; doy <= end_year_day; doy += 7)
- pvl_push(days_list,(void*)(int)doy);
-
- } else if ( pos > 0) {
- int first;
- /* First occurrence of dow in year */
- if( dow >= start_dow) {
- first = dow - start_dow + 1;
- } else {
- first = dow - start_dow + 8;
- }
-
- pvl_push(days_list,(void*)(first+ (pos-1) * 7));
-
- } else { /* pos < 0 */
- icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR);
- }
- }
-
- return days_list;
-}
-
-
-/* For INTERVAL=YEARLY, set up the days[] array in the iterator to
- list all of the days of the current year that are specified in this
- rule. */
-
-int expand_year_days(struct icalrecur_iterator_impl* impl,short year)
-{
- int j,k;
- int days_index=0;
- struct icaltimetype t;
- int flags;
-
- t = icaltime_null_time();
-
-#define HBD(x) has_by_data(impl,x)
-
- t.is_date = 1; /* Needed to make day_of_year routines work property */
-
- memset(&t,0,sizeof(t));
- memset(impl->days,ICAL_RECURRENCE_ARRAY_MAX_BYTE,sizeof(impl->days));
-
- flags = (HBD(BY_DAY) ? 1<<BY_DAY : 0) +
- (HBD(BY_WEEK_NO) ? 1<<BY_WEEK_NO : 0) +
- (HBD(BY_MONTH_DAY) ? 1<<BY_MONTH_DAY : 0) +
- (HBD(BY_MONTH) ? 1<<BY_MONTH : 0) +
- (HBD(BY_YEAR_DAY) ? 1<<BY_YEAR_DAY : 0);
-
-
- switch(flags) {
-
- case 0: {
- /* FREQ=YEARLY; */
-
- break;
- }
- case 1<<BY_MONTH: {
- /* FREQ=YEARLY; BYMONTH=3,11*/
-
- for(j=0;impl->by_ptrs[BY_MONTH][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){
- struct icaltimetype t;
- short month = impl->by_ptrs[BY_MONTH][j];
- short doy;
-
- t = impl->dtstart;
- t.year = year;
- t.month = month;
- t.is_date = 1;
-
- doy = icaltime_day_of_year(t);
-
- impl->days[days_index++] = doy;
-
- }
- break;
- }
-
- case 1<<BY_MONTH_DAY: {
- /* FREQ=YEARLY; BYMONTHDAY=1,15*/
- for(k=0;impl->by_ptrs[BY_MONTH_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++)
- {
- short month_day = impl->by_ptrs[BY_MONTH_DAY][k];
- short doy;
-
- t = impl->dtstart;
- t.day = month_day;
- t.year = year;
- t.is_date = 1;
-
- doy = icaltime_day_of_year(t);
-
- impl->days[days_index++] = doy;
-
- }
- break;
- }
-
- case (1<<BY_MONTH_DAY) + (1<<BY_MONTH): {
- /* FREQ=YEARLY; BYMONTHDAY=1,15; BYMONTH=10 */
-
- for(j=0;impl->by_ptrs[BY_MONTH][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){
- for(k=0;impl->by_ptrs[BY_MONTH_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++)
- {
- short month = impl->by_ptrs[BY_MONTH][j];
- short month_day = impl->by_ptrs[BY_MONTH_DAY][k];
- short doy;
-
- t.day = month_day;
- t.month = month;
- t.year = year;
- t.is_date = 1;
-
- doy = icaltime_day_of_year(t);
- impl->days[days_index++] = doy;
-
- }
- }
-
- break;
- }
-
- case 1<<BY_WEEK_NO: {
- /* FREQ=YEARLY; BYWEEKNO=20,50 */
-
- struct icaltimetype t;
- short dow;
-
- t.day = impl->dtstart.day;
- t.month = impl->dtstart.month;
- t.year = year;
- t.is_date = 1;
-
- dow = icaltime_day_of_week(t);
- /* HACK Not finished */
-
- icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR);
-
- break;
- }
-
- case (1<<BY_WEEK_NO) + (1<<BY_MONTH_DAY): {
- /*FREQ=YEARLY; WEEKNO=20,50; BYMONTH= 6,11 */
- icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR);
- break;
- }
-
- case 1<<BY_DAY: {
- /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR*/
- int days_index = 0;
- pvl_elem i;
- pvl_list days = expand_by_day(impl,year);
-
-
- for(i=pvl_head(days);i!=0;i=pvl_next(i)){
- short day = (short)(int)pvl_data(i);
- impl->days[days_index++] = day;
- }
-
- pvl_free(days);
-
- break;
- }
-
- case (1<<BY_DAY)+(1<<BY_MONTH): {
- /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR; BYMONTH = 12*/
-
-
- for(j=0;impl->by_ptrs[BY_MONTH][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){
- short month = impl->by_ptrs[BY_MONTH][j];
- short days_in_month = icaltime_days_in_month(month,year);
- short first_dow, last_dow, doy_offset;
-
- struct icaltimetype t;
- memset(&t,0,sizeof(struct icaltimetype));
- t.year = year;
- t.month = month;
- t.day = 1;
- t.is_date = 1;
-
- first_dow = icaltime_day_of_week(t);
-
- /* This holds the day offset used to calculate the day of the year
- from the month day. Just add the month day to this. */
- doy_offset = icaltime_day_of_year(t) - 1;
-
- t.day = days_in_month;
- last_dow = icaltime_day_of_week(t);
-
- for(k=0;impl->by_ptrs[BY_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++){
- short day_coded = impl->by_ptrs[BY_DAY][k];
- enum icalrecurrencetype_weekday dow =
- icalrecurrencetype_day_day_of_week(day_coded);
- short pos = icalrecurrencetype_day_position(day_coded);
- short first_matching_day, last_matching_day, day, month_day;
-
- /* Calculate the first day in the month with the given weekday,
- and the last day. */
- first_matching_day = ((dow + 7 - first_dow) % 7) + 1;
- last_matching_day = days_in_month - ((last_dow + 7 - dow) % 7);
-
- if (pos == 0) {
- /* Add all of instances of the weekday within the month. */
- for (day = first_matching_day; day <= days_in_month; day += 7)
- impl->days[days_index++] = doy_offset + day;
-
- } else if (pos > 0) {
- /* Add the nth instance of the weekday within the month. */
- month_day = first_matching_day + (pos - 1) * 7;
-
- if (month_day <= days_in_month)
- impl->days[days_index++] = doy_offset + month_day;
-
- } else {
- /* Add the -nth instance of the weekday within the month.*/
- month_day = last_matching_day + (pos + 1) * 7;
-
- if (month_day > 0)
- impl->days[days_index++] = doy_offset + month_day;
- }
- }
- }
- break;
- }
-
- case (1<<BY_DAY) + (1<<BY_MONTH_DAY) : {
- /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR; BYMONTHDAY=1,15*/
-
- int days_index = 0;
- pvl_elem itr;
- pvl_list days = expand_by_day(impl,year);
-
- for(itr=pvl_head(days);itr!=0;itr=pvl_next(itr)){
- short day = (short)(int)pvl_data(itr);
- struct icaltimetype tt;
- short i,j;
-
- tt = icaltime_from_day_of_year(day,year);
-
- for(j = 0; BYMDPTR[j]!=ICAL_RECURRENCE_ARRAY_MAX; j++){
- short mday = BYMDPTR[j];
-
- if(tt.day == mday){
- impl->days[days_index++] = day;
- }
- }
-
- }
-
- pvl_free(days);
-
- break;
- }
-
- case (1<<BY_DAY) + (1<<BY_MONTH_DAY) + (1<<BY_MONTH): {
- /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR; BYMONTHDAY=10; MYMONTH=6,11*/
-
- int days_index = 0;
- pvl_elem itr;
- pvl_list days = expand_by_day(impl,year);
-
- for(itr=pvl_head(days);itr!=0;itr=pvl_next(itr)){
- short day = (short)(int)pvl_data(itr);
- struct icaltimetype tt;
- short i,j;
-
- tt = icaltime_from_day_of_year(day,year);
-
- for(i = 0; BYMONPTR[i] != ICAL_RECURRENCE_ARRAY_MAX; i++){
- for(j = 0; BYMDPTR[j]!=ICAL_RECURRENCE_ARRAY_MAX; j++){
- short mday = BYMDPTR[j];
- short month = BYMONPTR[i];
-
- if(tt.month == month && tt.day == mday){
- impl->days[days_index++] = day;
- }
- }
- }
-
- }
-
- pvl_free(days);
-
- break;
-
- }
-
- case (1<<BY_DAY) + (1<<BY_WEEK_NO) : {
- /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR; WEEKNO=20,50*/
-
- int days_index = 0;
- pvl_elem itr;
- pvl_list days = expand_by_day(impl,year);
-
- for(itr=pvl_head(days);itr!=0;itr=pvl_next(itr)){
- short day = (short)(int)pvl_data(itr);
- struct icaltimetype tt;
- short i;
-
- tt = icaltime_from_day_of_year(day,year);
-
- for(i = 0; BYWEEKPTR[i] != ICAL_RECURRENCE_ARRAY_MAX; i++){
- short weekno = BYWEEKPTR[i];
-
- if(weekno== icaltime_week_number(tt)){
- impl->days[days_index++] = day;
- }
- }
-
- }
-
- pvl_free(days);
- break;
- }
-
- case (1<<BY_DAY) + (1<<BY_WEEK_NO) + (1<<BY_MONTH_DAY): {
- /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR; WEEKNO=20,50; BYMONTHDAY=1,15*/
- icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR);
- break;
- }
-
- case 1<<BY_YEAR_DAY: {
- for(j=0;impl->by_ptrs[BY_YEAR_DAY][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){
- short doy = impl->by_ptrs[BY_YEAR_DAY][j];
- impl->days[days_index++] = doy;
- }
- break;
- }
-
- default: {
- icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR);
- break;
- }
-
- }
-
- return 0;
-}
-
-
-int next_year(struct icalrecur_iterator_impl* impl)
-{
- struct icaltimetype next;
-
- if (next_hour(impl) == 0){
- return 0;
- }
-
- if (impl->days[++impl->days_index] == ICAL_RECURRENCE_ARRAY_MAX){
- impl->days_index = 0;
-
- for (;;) {
- increment_year(impl,impl->rule.interval);
- expand_year_days(impl,impl->last.year);
- if (impl->days[0] != ICAL_RECURRENCE_ARRAY_MAX)
- break;
- }
- }
-
- next = icaltime_from_day_of_year(impl->days[impl->days_index],impl->last.year);
-
- impl->last.day = next.day;
- impl->last.month = next.month;
-
- return 1;
-}
-
-int icalrecur_check_rulepart(struct icalrecur_iterator_impl* impl,
- short v, enum byrule byrule)
-{
- int itr;
-
- if(impl->by_ptrs[byrule][0]!=ICAL_RECURRENCE_ARRAY_MAX){
- for(itr=0; impl->by_ptrs[byrule][itr]!=ICAL_RECURRENCE_ARRAY_MAX;itr++){
- if(impl->by_ptrs[byrule][itr] == v){
- return 1;
- }
- }
- }
-
- return 0;
-}
-
-int check_contract_restriction(struct icalrecur_iterator_impl* impl,
- enum byrule byrule, short v)
-{
- int pass = 0;
- int itr;
- icalrecurrencetype_frequency freq = impl->rule.freq;
-
- if(impl->by_ptrs[byrule][0]!=ICAL_RECURRENCE_ARRAY_MAX &&
- expand_map[freq].map[byrule] == CONTRACT){
- for(itr=0; impl->by_ptrs[byrule][itr]!=ICAL_RECURRENCE_ARRAY_MAX;itr++){
- if(impl->by_ptrs[byrule][itr] == v){
- pass=1;
- break;
- }
- }
-
- return pass;
- } else {
- /* This is not a contracting byrule, or it has no data, so the
- test passes*/
- return 1;
- }
-}
-
-
-int check_contracting_rules(struct icalrecur_iterator_impl* impl)
-{
-
- int day_of_week=0;
- int week_no=0;
- int year_day=0;
-
- if (
- check_contract_restriction(impl,BY_SECOND,impl->last.second) &&
- check_contract_restriction(impl,BY_MINUTE,impl->last.minute) &&
- check_contract_restriction(impl,BY_HOUR,impl->last.hour) &&
- check_contract_restriction(impl,BY_DAY,day_of_week) &&
- check_contract_restriction(impl,BY_WEEK_NO,week_no) &&
- check_contract_restriction(impl,BY_MONTH_DAY,impl->last.day) &&
- check_contract_restriction(impl,BY_MONTH,impl->last.month) &&
- check_contract_restriction(impl,BY_YEAR_DAY,year_day) )
- {
-
- return 1;
- } else {
- return 0;
- }
-}
-
-struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *itr)
-{
- int valid = 1;
- struct icalrecur_iterator_impl* impl =
- (struct icalrecur_iterator_impl*)itr;
-
- if( (impl->rule.count!=0 &&impl->occurrence_no >= impl->rule.count) ||
- (!icaltime_is_null_time(impl->rule.until) &&
- icaltime_compare(impl->last,impl->rule.until) > 0)) {
- return icaltime_null_time();
- }
-
- if(impl->occurrence_no == 0
- && icaltime_compare(impl->last,impl->dtstart) >= 0){
-
- impl->occurrence_no++;
- return impl->last;
- }
-
- do {
- valid = 1;
- switch(impl->rule.freq){
-
- case ICAL_SECONDLY_RECURRENCE: {
- next_second(impl);
- break;
- }
- case ICAL_MINUTELY_RECURRENCE: {
- next_minute(impl);
- break;
- }
- case ICAL_HOURLY_RECURRENCE: {
- next_hour(impl);
- break;
- }
- case ICAL_DAILY_RECURRENCE: {
- next_day(impl);
- break;
- }
- case ICAL_WEEKLY_RECURRENCE: {
- next_week(impl);
- break;
- }
- case ICAL_MONTHLY_RECURRENCE: {
- valid = next_month(impl);
- break;
- }
- case ICAL_YEARLY_RECURRENCE:{
- next_year(impl);
- break;
- }
- default:{
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return icaltime_null_time();
- }
- }
-
- if(impl->last.year >= 2038 ){
- /* HACK */
- return icaltime_null_time();
- }
-
- } while(!check_contracting_rules(impl)
- || icaltime_compare(impl->last,impl->dtstart) < 0
- || valid == 0);
-
-
-/* Ignore null times and times that are after the until time */
- if( !icaltime_is_null_time(impl->rule.until) &&
- icaltime_compare(impl->last,impl->rule.until) > 0 ) {
- return icaltime_null_time();
- }
-
- impl->occurrence_no++;
-
- return impl->last;
-}
-
-
-/************************** Type Routines **********************/
-
-
-void icalrecurrencetype_clear(struct icalrecurrencetype *recur)
-{
- memset(recur,ICAL_RECURRENCE_ARRAY_MAX_BYTE,
- sizeof(struct icalrecurrencetype));
-
- recur->week_start = ICAL_MONDAY_WEEKDAY;
- recur->freq = ICAL_NO_RECURRENCE;
- recur->interval = 1;
- memset(&(recur->until),0,sizeof(struct icaltimetype));
- recur->count = 0;
-}
-
-/* The 'day' element of icalrecurrencetype_weekday is encoded to allow
-reporesentation of both the day of the week ( Monday, Tueday), but
-also the Nth day of the week ( First tuesday of the month, last
-thursday of the year) These routines decode the day values.
-
-The day's position in the period ( Nth-ness) and the numerical value
-of the day are encoded together as: pos*7 + dow
-
-A position of 0 means 'any' or 'every'
-
- */
-
-enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day)
-{
- return abs(day)%8;
-}
-
-short icalrecurrencetype_day_position(short day)
-{
- short wd, pos;
-
- wd = icalrecurrencetype_day_day_of_week(day);
-
- pos = (abs(day)-wd)/8 * ((day<0)?-1:1);
-
-
- return pos;
-}
-
-
-/****************** Enumeration Routines ******************/
-
-struct {icalrecurrencetype_weekday wd; const char * str; }
-wd_map[] = {
- {ICAL_SUNDAY_WEEKDAY,"SU"},
- {ICAL_MONDAY_WEEKDAY,"MO"},
- {ICAL_TUESDAY_WEEKDAY,"TU"},
- {ICAL_WEDNESDAY_WEEKDAY,"WE"},
- {ICAL_THURSDAY_WEEKDAY,"TH"},
- {ICAL_FRIDAY_WEEKDAY,"FR"},
- {ICAL_SATURDAY_WEEKDAY,"SA"},
- {ICAL_NO_WEEKDAY,0}
-};
-
-const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind)
-{
- int i;
-
- for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) {
- if ( wd_map[i].wd == kind) {
- return wd_map[i].str;
- }
- }
-
- return 0;
-}
-
-icalrecurrencetype_weekday icalrecur_string_to_weekday(const char* str)
-{
- int i;
-
- for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) {
- if ( strcmp(str,wd_map[i].str) == 0){
- return wd_map[i].wd;
- }
- }
-
- return ICAL_NO_WEEKDAY;
-}
-
-
-
-struct {
- icalrecurrencetype_frequency kind;
- const char* str;
-} freq_map[] = {
- {ICAL_SECONDLY_RECURRENCE,"SECONDLY"},
- {ICAL_MINUTELY_RECURRENCE,"MINUTELY"},
- {ICAL_HOURLY_RECURRENCE,"HOURLY"},
- {ICAL_DAILY_RECURRENCE,"DAILY"},
- {ICAL_WEEKLY_RECURRENCE,"WEEKLY"},
- {ICAL_MONTHLY_RECURRENCE,"MONTHLY"},
- {ICAL_YEARLY_RECURRENCE,"YEARLY"},
- {ICAL_NO_RECURRENCE,0}
-};
-
-const char* icalrecur_freq_to_string(icalrecurrencetype_frequency kind)
-{
- int i;
-
- for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) {
- if ( freq_map[i].kind == kind ) {
- return freq_map[i].str;
- }
- }
- return 0;
-}
-
-icalrecurrencetype_frequency icalrecur_string_to_freq(const char* str)
-{
- int i;
-
- for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) {
- if ( strcmp(str,freq_map[i].str) == 0){
- return freq_map[i].kind;
- }
- }
- return ICAL_NO_RECURRENCE;
-}
-
-/* Fill an array with the 'count' number of occurrences generated by
- the rrule. Note that the times are returned in UTC, but the times
- are calculated in local time. YOu will have to convert the results
- back into local time before using them. */
-
-int icalrecur_expand_recurrence(char* rule, time_t start,
- int count, time_t* array)
-{
- struct icalrecurrencetype recur;
- icalrecur_iterator* ritr;
- time_t tt;
- struct icaltimetype icstart, next;
- int i = 0;
-
- memset(array, 0, count*sizeof(time_t));
-
- icstart = icaltime_from_timet(start,0);
-
- recur = icalrecurrencetype_from_string(rule);
-
- for(ritr = icalrecur_iterator_new(recur,icstart),
- next = icalrecur_iterator_next(ritr);
- !icaltime_is_null_time(next) && i < count;
- next = icalrecur_iterator_next(ritr)){
-
- tt = icaltime_as_timet(next);
-
- if (tt >= start ){
- array[i++] = tt;
- }
-
- }
-
- icalrecur_iterator_free(ritr);
-
- return 1;
-}
diff --git a/libical/src/libical/icalrecur.h b/libical/src/libical/icalrecur.h
deleted file mode 100644
index 5fcdc15a8c..0000000000
--- a/libical/src/libical/icalrecur.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalrecur.h
- CREATOR: eric 20 March 2000
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-How to use:
-
-1) Get a rule and a start time from a component
- icalproperty rrule;
- struct icalrecurrencetype recur;
- struct icaltimetype dtstart;
-
- rrule = icalcomponent_get_first_property(comp,ICAL_RRULE_PROPERTY);
- recur = icalproperty_get_rrule(rrule);
- start = icalproperty_get_dtstart(dtstart);
-
-Or, just make them up:
- recur = icalrecurrencetype_from_string("FREQ=YEARLY;BYDAY=SU,WE");
- dtstart = icaltime_from_string("19970101T123000")
-
-2) Create an iterator
- icalrecur_iterator* ritr;
- ritr = icalrecur_iterator_new(recur,start);
-
-3) Iterator over the occurrences
- struct icaltimetype next;
- while (next = icalrecur_iterator_next(ritr)
- && !icaltime_is_null_time(next){
- Do something with next
- }
-
-Note that that the time returned by icalrecur_iterator_next is in
-whatever timezone that dtstart is in.
-
-======================================================================*/
-
-#ifndef ICALRECUR_H
-#define ICALRECUR_H
-
-#include <time.h>
-#include "icaltime.h"
-
-/***********************************************************************
- * Recurrance enumerations
-**********************************************************************/
-
-typedef enum icalrecurrencetype_frequency
-{
- /* These enums are used to index an array, so don't change the
- order or the integers */
-
- ICAL_SECONDLY_RECURRENCE=0,
- ICAL_MINUTELY_RECURRENCE=1,
- ICAL_HOURLY_RECURRENCE=2,
- ICAL_DAILY_RECURRENCE=3,
- ICAL_WEEKLY_RECURRENCE=4,
- ICAL_MONTHLY_RECURRENCE=5,
- ICAL_YEARLY_RECURRENCE=6,
- ICAL_NO_RECURRENCE=7
-
-} icalrecurrencetype_frequency;
-
-typedef enum icalrecurrencetype_weekday
-{
- ICAL_NO_WEEKDAY,
- ICAL_SUNDAY_WEEKDAY,
- ICAL_MONDAY_WEEKDAY,
- ICAL_TUESDAY_WEEKDAY,
- ICAL_WEDNESDAY_WEEKDAY,
- ICAL_THURSDAY_WEEKDAY,
- ICAL_FRIDAY_WEEKDAY,
- ICAL_SATURDAY_WEEKDAY
-} icalrecurrencetype_weekday;
-
-enum {
- ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
- ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
-};
-
-
-
-/********************** Recurrence type routines **************/
-
-/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of
- the values and fields in struct icalrecurrencetype */
-
-#define ICAL_BY_SECOND_SIZE 61
-#define ICAL_BY_MINUTE_SIZE 61
-#define ICAL_BY_HOUR_SIZE 25
-#define ICAL_BY_DAY_SIZE 364 /* 7 days * 52 weeks */
-#define ICAL_BY_MONTHDAY_SIZE 32
-#define ICAL_BY_YEARDAY_SIZE 367
-#define ICAL_BY_WEEKNO_SIZE 54
-#define ICAL_BY_MONTH_SIZE 13
-#define ICAL_BY_SETPOS_SIZE 367
-
-/* Main struct for holding digested recurrence rules */
-struct icalrecurrencetype
-{
- icalrecurrencetype_frequency freq;
-
-
- /* until and count are mutually exclusive. */
- struct icaltimetype until;
- int count;
-
- short interval;
-
- icalrecurrencetype_weekday week_start;
-
- /* The BY* parameters can each take a list of values. Here I
- * assume that the list of values will not be larger than the
- * range of the value -- that is, the client will not name a
- * value more than once.
-
- * Each of the lists is terminated with the value
- * ICAL_RECURRENCE_ARRAY_MAX unless the the list is full.
- */
-
- short by_second[ICAL_BY_SECOND_SIZE];
- short by_minute[ICAL_BY_MINUTE_SIZE];
- short by_hour[ICAL_BY_HOUR_SIZE];
- short by_day[ICAL_BY_DAY_SIZE]; /* Encoded value, see below */
- short by_month_day[ICAL_BY_MONTHDAY_SIZE];
- short by_year_day[ ICAL_BY_YEARDAY_SIZE];
- short by_week_no[ICAL_BY_WEEKNO_SIZE];
- short by_month[ICAL_BY_MONTH_SIZE];
- short by_set_pos[ICAL_BY_SETPOS_SIZE];
-};
-
-
-void icalrecurrencetype_clear(struct icalrecurrencetype *r);
-
-/* The 'day' element of the by_day array is encoded to allow
-representation of both the day of the week ( Monday, Tueday), but also
-the Nth day of the week ( First tuesday of the month, last thursday of
-the year) These routines decode the day values */
-
-/* 1 == Monday, etc. */
-enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
-
-/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */
-short icalrecurrencetype_day_position(short day);
-
-
-/***********************************************************************
- * Recurrance rule parser
-**********************************************************************/
-
-/* Convert between strings ans recurrencetype structures. */
-struct icalrecurrencetype icalrecurrencetype_from_string(const char* str);
-char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur);
-
-
-/********** recurrence iteration routines ********************/
-
-typedef void icalrecur_iterator;
-
-/* Create a new recurrence rule iterator */
-icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule,
- struct icaltimetype dtstart);
-
-/* Get the next occurrence from an iterator */
-struct icaltimetype icalrecur_iterator_next(icalrecur_iterator*);
-
-/* Free the iterator */
-void icalrecur_iterator_free(icalrecur_iterator*);
-
-/* Fills array up with at most 'count' time_t values, each
- representing an occurrence time in seconds past the POSIX epoch */
-int icalrecur_expand_recurrence(char* rule, time_t start,
- int count, time_t* array);
-
-
-#endif
diff --git a/libical/src/libical/icalrestriction.c.in b/libical/src/libical/icalrestriction.c.in
deleted file mode 100644
index 454442531f..0000000000
--- a/libical/src/libical/icalrestriction.c.in
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- Mode: C -*- */
-/* ======================================================================
- File: icalrestriction.c
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
- ======================================================================*/
-/*#line 7 "icalrestriction.c.in"*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalrestriction.h"
-#include "icalenums.h"
-#include "icalerror.h"
-
-#include <assert.h>
-#include <stdio.h> /* For snprintf */
-
-#define TMP_BUF_SIZE 1024
-
-
-/* Define the structs for the restrictions. these data are filled out
-in machine generated code below */
-
-struct icalrestriction_property_record;
-
-typedef char* (*restriction_func)(struct icalrestriction_property_record* rec,icalcomponent* comp,icalproperty* prop);
-
-
-typedef struct icalrestriction_property_record {
- icalproperty_method method;
- icalcomponent_kind component;
- icalproperty_kind property;
- icalrestriction_kind restriction;
- restriction_func function;
-} icalrestriction_property_record;
-
-
-typedef struct icalrestriction_component_record {
- icalproperty_method method;
- icalcomponent_kind component;
- icalcomponent_kind subcomponent;
- icalrestriction_kind restriction;
- restriction_func function;
-} icalrestriction_component_record;
-
-icalrestriction_property_record*
-icalrestriction_get_property_restriction(icalproperty_method method,
- icalcomponent_kind component,
- icalproperty_kind property);
-icalrestriction_component_record*
-icalrestriction_get_component_restriction(icalproperty_method method,
- icalcomponent_kind component,
- icalcomponent_kind subcomponent);
-
-icalrestriction_component_record icalrestriction_component_records[];
-icalrestriction_property_record icalrestriction_property_records[];
-
-icalrestriction_property_record null_prop_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_UNKNOWN,0};
-icalrestriction_component_record null_comp_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_UNKNOWN,0};
-
-
-/* The each row gives the result of comparing a restriction against a
- count. The columns in each row represent 0,1,2+. '-1' indicates
- 'invalid, 'don't care' or 'needs more analysis' So, for
- ICAL_RESTRICTION_ONE, if there is 1 of a property with that
- restriction, it passes, but if there are 0 or 2+, it fails. */
-
-char compare_map[ICAL_RESTRICTION_UNKNOWN+1][3] = {
- { 1, 1, 1},/*ICAL_RESTRICTION_NONE*/
- { 1, 0, 0},/*ICAL_RESTRICTION_ZERO*/
- { 0, 1, 0},/*ICAL_RESTRICTION_ONE*/
- { 1, 1, 1},/*ICAL_RESTRICTION_ZEROPLUS*/
- { 0, 1, 1},/*ICAL_RESTRICTION_ONEPLUS*/
- { 1, 1, 0},/*ICAL_RESTRICTION_ZEROORONE*/
- { 1, 1, 0},/*ICAL_RESTRICTION_ONEEXCLUSIVE*/
- { 1, 1, 0},/*ICAL_RESTRICTION_ONEMUTUAL*/
- { 1, 1, 1} /*ICAL_RESTRICTION_UNKNOWN*/
-};
-
-char restr_string_map[ICAL_RESTRICTION_UNKNOWN+1][60] = {
- "unknown number",/*ICAL_RESTRICTION_NONE*/
- "0",/*ICAL_RESTRICTION_ZERO*/
- "1",/*ICAL_RESTRICTION_ONE*/
- "zero or more",/*ICAL_RESTRICTION_ZEROPLUS*/
- "one or more" ,/*ICAL_RESTRICTION_ONEPLUS*/
- "zero or one",/*ICAL_RESTRICTION_ZEROORONE*/
- "zero or one, exclusive with another property",/*ICAL_RESTRICTION_ONEEXCLUSIVE*/
- "zero or one, mutual with another property",/*ICAL_RESTRICTION_ONEMUTUAL*/
- "unknown number" /*ICAL_RESTRICTION_UNKNOWN*/
-};
-
-
-int
-icalrestriction_compare(icalrestriction_kind restr, int count){
-
- if ( restr < ICAL_RESTRICTION_NONE || restr > ICAL_RESTRICTION_UNKNOWN
- || count < 0){
- return -1;
- }
-
- if (count > 2) {
- count = 2;
- }
-
- return compare_map[restr][count];
-
-}
-
-/* Special case routines */
-
-char* icalrestriction_may_be_draft_final_canceled(
- icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop)
-{
-
- icalproperty_status stat = icalproperty_get_status(prop);
-
- if( !( stat == ICAL_STATUS_DRAFT ||
- stat == ICAL_STATUS_FINAL ||
- stat == ICAL_STATUS_CANCELLED )){
-
- return "Failed iTIP restrictions for STATUS property. Value must be one of DRAFT, FINAL, or CANCELED";
-
- }
-
- return 0;
-}
-
-char* icalrestriction_may_be_comp_need_process(
- icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop)
-{
- icalproperty_status stat = icalproperty_get_status(prop);
-
- if( !( stat == ICAL_STATUS_COMPLETED ||
- stat == ICAL_STATUS_NEEDSACTION ||
- stat == ICAL_STATUS_INPROCESS )){
-
- return "Failed iTIP restrictions for STATUS property. Value must be one of COMPLETED, NEEDS-ACTION or IN-PROCESS";
-
- }
-
- return 0;
-}
-char* icalrestriction_may_be_tent_conf(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
- icalproperty_status stat = icalproperty_get_status(prop);
-
- if( !( stat == ICAL_STATUS_TENTATIVE ||
- stat == ICAL_STATUS_CONFIRMED )){
-
- return "Failed iTIP restrictions for STATUS property. Value must be one of TENTATIVE or CONFIRMED";
-
- }
-
- return 0;
-}
-char* icalrestriction_may_be_tent_conf_cancel(
- icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop)
-{
- icalproperty_status stat = icalproperty_get_status(prop);
-
- if( !( stat == ICAL_STATUS_TENTATIVE ||
- stat == ICAL_STATUS_CONFIRMED ||
- stat == ICAL_STATUS_CANCELLED )){
-
- return "Failed iTIP restrictions for STATUS property. Value must be one of TENTATIVE, CONFIRMED or CANCELED";
-
- }
-
- return 0;
-}
-
-char* icalrestriction_must_be_cancel_if_present(
- icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop)
-{
- /* This routine will not be called if prop == 0 */
- icalproperty_status stat = icalproperty_get_status(prop);
-
- if( stat != ICAL_STATUS_CANCELLED)
- {
- return "Failed iTIP restrictions for STATUS property. Value must be CANCELLED";
-
- }
-
-
- return 0;
-}
-
-char* icalrestriction_must_be_canceled_no_attendee(
- icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop)
-{
-
- /* Hack. see rfc2446, 3.2.5 CANCEL for porperty STATUS. I don't
- understand the note */
-
- return 0;
-}
-char* icalrestriction_must_be_recurring(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
- /* Hack */
- return 0;
-}
-char* icalrestriction_must_have_duration(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
-
- if( !icalcomponent_get_first_property(comp,ICAL_DURATION_PROPERTY)){
-
- return "Failed iTIP restrictions for STATUS property. This component must have a DURATION property";
-
- }
-
- return 0;
-}
-char* icalrestriction_must_have_repeat(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
- if( !icalcomponent_get_first_property(comp,ICAL_REPEAT_PROPERTY)){
-
- return "Failed iTIP restrictions for STATUS property. This component must have a REPEAT property";
-
- }
-
- return 0;
-}
-char* icalrestriction_must_if_tz_ref(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
-
- /* Hack */
- return 0;
-}
-char* icalrestriction_no_dtend(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
-
- if( !icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){
-
- return "Failed iTIP restrictions for STATUS property. The component must not have both DURATION and DTEND";
-
- }
-
- return 0;
-}
-char* icalrestriction_no_duration(icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop){
-
- /* _no_dtend takes care of this one */
- return 0;
-}
-
-
-int icalrestriction_check_component(icalproperty_method method,
- icalcomponent* comp)
-{
- icalproperty_kind kind;
- icalcomponent_kind comp_kind;
- icalrestriction_kind restr;
- icalrestriction_property_record *prop_record;
- icalrestriction_component_record *comp_record;
- char* funcr = 0;
- icalproperty *prop;
-
- int count;
- int compare;
- int valid = 1;
-
- comp_kind = icalcomponent_isa(comp);
-
- /* Check all of the properties in this component */
-
- for(kind = ICAL_ANY_PROPERTY+1; kind != ICAL_NO_PROPERTY; kind++){
- count = icalcomponent_count_properties(comp, kind);
-
- prop_record = icalrestriction_get_property_restriction(method,
- comp_kind,
- kind);
-
- restr = prop_record->restriction;
-
- if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE ||
- restr == ICAL_RESTRICTION_ONEMUTUAL) {
-
- /* First treat is as a 0/1 restriction */
- restr = ICAL_RESTRICTION_ZEROORONE;
- compare = icalrestriction_compare(restr,count);
-
- } else {
-
- compare = icalrestriction_compare(restr,count);
- }
-
- assert(compare != -1);
-
- if (compare == 0){
- char temp[TMP_BUF_SIZE];
-
- snprintf(temp, TMP_BUF_SIZE,"Failed iTIP restrictions for %s property. Expected %s instances of the property and got %d",
- icalenum_property_kind_to_string(kind),
- restr_string_map[restr], count);
-
- icalcomponent_add_property
- (comp,
- icalproperty_vanew_xlicerror(
- temp,
- icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_INVALIDITIP),
- 0));
- }
-
-
- prop = icalcomponent_get_first_property(comp, kind);
-
- if (prop != 0 && prop_record->function !=0 ){
- funcr = prop_record->function(prop_record,comp,prop);
- }
-
- if(funcr !=0){
- icalcomponent_add_property
- (comp,
- icalproperty_vanew_xlicerror(
- funcr,
- icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_INVALIDITIP),
- 0));
-
- compare = 0;
- }
-
- valid = valid && compare;
- }
-
-
-
- return valid;
-
-
-}
-
-int icalrestriction_check(icalcomponent* outer_comp)
-{
- icalcomponent_kind comp_kind;
- icalproperty_method method;
- icalcomponent* inner_comp;
- icalproperty *method_prop;
- int valid;
-
- icalerror_check_arg_rz( (outer_comp!=0), "outer comp");
-
-
- /* Get the Method value from the outer component */
-
- comp_kind = icalcomponent_isa(outer_comp);
-
- if (comp_kind != ICAL_VCALENDAR_COMPONENT){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return 0;
- }
-
- method_prop = icalcomponent_get_first_property(outer_comp,
- ICAL_METHOD_PROPERTY);
-
- if (method_prop == 0){
- method = ICAL_METHOD_NONE;
- } else {
- method = icalproperty_get_method(method_prop);
- }
-
-
- /* Check the VCALENDAR wrapper */
- valid = icalrestriction_check_component(ICAL_METHOD_NONE,outer_comp);
-
-
- /* Now check the inner components */
-
- for(inner_comp= icalcomponent_get_first_component(outer_comp,
- ICAL_ANY_COMPONENT);
- inner_comp != 0;
- inner_comp= icalcomponent_get_next_component(outer_comp,
- ICAL_ANY_COMPONENT)){
-
- valid = valid && icalrestriction_check_component(method,inner_comp);
-
- }
-
-
- return valid;
-
-}
-
-icalrestriction_property_record*
-icalrestriction_get_property_restriction(icalproperty_method method,
- icalcomponent_kind component,
- icalproperty_kind property)
-{
- int i;
-
- for(i = 0;
- icalrestriction_property_records[i].restriction != ICAL_RESTRICTION_NONE;
- i++){
-
- if (method == icalrestriction_property_records[i].method &&
- component == icalrestriction_property_records[i].component &&
- property == icalrestriction_property_records[i].property ){
- return &icalrestriction_property_records[i];
- }
- }
-
- return &null_prop_record;
-}
-
-
-icalrestriction_component_record*
-icalrestriction_get_component_restriction(icalproperty_method method,
- icalcomponent_kind component,
- icalcomponent_kind subcomponent)
-{
-
- int i;
-
- for(i = 0;
- icalrestriction_component_records[i].restriction != ICAL_RESTRICTION_NONE;
- i++){
-
- if (method == icalrestriction_component_records[i].method &&
- component == icalrestriction_component_records[i].component &&
- subcomponent == icalrestriction_component_records[i].subcomponent ){
- return &icalrestriction_component_records[i];
- }
- }
-
- return &null_comp_record;
-}
-
diff --git a/libical/src/libical/icalrestriction.h b/libical/src/libical/icalrestriction.h
deleted file mode 100644
index 6d414db4af..0000000000
--- a/libical/src/libical/icalrestriction.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalrestriction.h
- CREATOR: eric 24 April 1999
-
- $Id$
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalrestriction.h
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
-
-======================================================================*/
-
-#include "icalproperty.h"
-#include "icalcomponent.h"
-
-#ifndef ICALRESTRICTION_H
-#define ICALRESTRICTION_H
-
-/* These must stay in this order for icalrestriction_compare to work */
-typedef enum icalrestriction_kind {
- ICAL_RESTRICTION_NONE=0, /* 0 */
- ICAL_RESTRICTION_ZERO, /* 1 */
- ICAL_RESTRICTION_ONE, /* 2 */
- ICAL_RESTRICTION_ZEROPLUS, /* 3 */
- ICAL_RESTRICTION_ONEPLUS, /* 4 */
- ICAL_RESTRICTION_ZEROORONE, /* 5 */
- ICAL_RESTRICTION_ONEEXCLUSIVE, /* 6 */
- ICAL_RESTRICTION_ONEMUTUAL, /* 7 */
- ICAL_RESTRICTION_UNKNOWN /* 8 */
-} icalrestriction_kind;
-
-int
-icalrestriction_compare(icalrestriction_kind restr, int count);
-
-
-int
-icalrestriction_is_parameter_allowed(icalproperty_kind property,
- icalparameter_kind parameter);
-
-int icalrestriction_check(icalcomponent* comp);
-
-
-#endif /* !ICALRESTRICTION_H */
-
-
-
diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c
deleted file mode 100644
index 698035537b..0000000000
--- a/libical/src/libical/icaltime.c
+++ /dev/null
@@ -1,714 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icaltime.c
- CREATOR: eric 02 June 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icaltime.h"
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef ICAL_NO_LIBICAL
-#define icalerror_set_errno(x)
-#define icalerror_check_arg_rv(x,y)
-#define icalerror_check_arg_re(x,y,z)
-#else
-#include "icalerror.h"
-#include "icalmemory.h"
-#endif
-
-#include "icaltimezone.h"
-
-
-struct icaltimetype
-icaltime_from_timet(time_t tm, int is_date)
-{
- struct icaltimetype tt = icaltime_null_time();
- struct tm t;
-
- t = *(gmtime(&tm));
-
- if(is_date == 0){
- tt.second = t.tm_sec;
- tt.minute = t.tm_min;
- tt.hour = t.tm_hour;
- } else {
- tt.second = tt.minute =tt.hour = 0 ;
- }
-
- tt.day = t.tm_mday;
- tt.month = t.tm_mon + 1;
- tt.year = t.tm_year+ 1900;
-
- tt.is_utc = 1;
- tt.is_date = is_date;
-
- return tt;
-}
-
-struct icaltimetype
-icaltime_from_timet_with_zone(time_t tm, int is_date, icaltimezone *zone)
-{
- struct icaltimetype tt;
- struct tm t;
- icaltimezone *utc_zone;
-
- utc_zone = icaltimezone_get_utc_timezone ();
-
- /* Convert the time_t to a struct tm in UTC time. We can trust gmtime
- for this. */
- t = *(gmtime(&tm));
-
- tt.year = t.tm_year + 1900;
- tt.month = t.tm_mon + 1;
- tt.day = t.tm_mday;
-
- tt.is_utc = (zone == utc_zone) ? 1 : 0;
- tt.is_date = is_date;
- tt.is_daylight = 0;
- tt.zone = NULL;
-
- if (is_date) {
- /* We don't convert DATE values between timezones. */
- tt.hour = 0;
- tt.minute = 0;
- tt.second = 0;
- } else {
- tt.hour = t.tm_hour;
- tt.minute = t.tm_min;
- tt.second = t.tm_sec;
-
- /* Use our timezone functions to convert to the required timezone. */
- icaltimezone_convert_time (&tt, utc_zone, zone);
- }
-
- return tt;
-}
-
-/* Returns the current time in the given timezone, as an icaltimetype. */
-struct icaltimetype icaltime_current_time_with_zone(icaltimezone *zone)
-{
- return icaltime_from_timet_with_zone (time (NULL), 0, zone);
-}
-
-/* Returns the current day as an icaltimetype, with is_date set. */
-struct icaltimetype icaltime_today(void)
-{
- return icaltime_from_timet_with_zone (time (NULL), 1, NULL);
-}
-
-
-/* Structure used by set_tz to hold an old value of TZ, and the new
- value, which is in memory we will have to free in unset_tz */
-/* This will hold the last "TZ=XXX" string we used with putenv(). After we
- call putenv() again to set a new TZ string, we can free the previous one.
- As far as I know, no libc implementations actually free the memory used in
- the environment variables (how could they know if it is a static string or
- a malloc'ed string?), so we have to free it ourselves. */
-static char* saved_tz = NULL;
-
-
-/* If you use set_tz(), you must call unset_tz() some time later to restore the
- original TZ. Pass unset_tz() the string that set_tz() returns. */
-char* set_tz(const char* tzid)
-{
- char *old_tz, *old_tz_copy = NULL, *new_tz;
-
- /* Get the old TZ setting and save a copy of it to return. */
- old_tz = getenv("TZ");
- if(old_tz){
- old_tz_copy = (char*)malloc(strlen (old_tz) + 4);
-
- if(old_tz_copy == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy (old_tz_copy, "TZ=");
- strcpy (old_tz_copy + 3, old_tz);
- }
-
- /* Create the new TZ string. */
- new_tz = (char*)malloc(strlen (tzid) + 4);
-
- if(new_tz == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy (new_tz, "TZ=");
- strcpy (new_tz + 3, tzid);
-
- /* Add the new TZ to the environment. */
- putenv(new_tz);
-
- /* Free any previous TZ environment string we have used. */
- if (saved_tz)
- free (saved_tz);
-
- /* Save a pointer to the TZ string we just set, so we can free it later. */
- saved_tz = new_tz;
-
- return old_tz_copy; /* This will be zero if the TZ env var was not set */
-}
-
-void unset_tz(char *tzstr)
-{
- /* restore the original environment */
-
- if(tzstr!=0){
- putenv(tzstr);
- } else {
- putenv("TZ"); /* Delete from environment */
- }
-
- /* Free any previous TZ environment string we have used. */
- if (saved_tz)
- free (saved_tz);
-
- /* Save a pointer to the TZ string we just set, so we can free it later.
- (This can possibly be NULL if there was no TZ to restore.) */
- saved_tz = tzstr;
-}
-
-time_t icaltime_as_timet(struct icaltimetype tt)
-{
- struct tm stm;
- time_t t;
-
- memset(&stm,0,sizeof( struct tm));
-
- if(icaltime_is_null_time(tt)) {
- return 0;
- }
-
- stm.tm_sec = tt.second;
- stm.tm_min = tt.minute;
- stm.tm_hour = tt.hour;
- stm.tm_mday = tt.day;
- stm.tm_mon = tt.month-1;
- stm.tm_year = tt.year-1900;
- stm.tm_isdst = -1;
-
- if(tt.is_utc == 1 || tt.is_date == 1){
- char *old_tz = set_tz("UTC");
- t = mktime(&stm);
- unset_tz(old_tz);
- } else {
- t = mktime(&stm);
- }
-
- return t;
-
-}
-
-time_t icaltime_as_timet_with_zone(struct icaltimetype tt, icaltimezone *zone)
-{
- icaltimezone *utc_zone;
- struct tm stm;
- time_t t;
- char *old_tz;
-
- utc_zone = icaltimezone_get_utc_timezone ();
-
- /* If the time is the special null time, return 0. */
- if (icaltime_is_null_time(tt)) {
- return 0;
- }
-
- /* Use our timezone functions to convert to UTC. */
- if (!tt.is_date)
- icaltimezone_convert_time (&tt, zone, utc_zone);
-
- /* Copy the icaltimetype to a struct tm. */
- memset (&stm, 0, sizeof (struct tm));
-
- stm.tm_sec = tt.second;
- stm.tm_min = tt.minute;
- stm.tm_hour = tt.hour;
- stm.tm_mday = tt.day;
- stm.tm_mon = tt.month-1;
- stm.tm_year = tt.year-1900;
- stm.tm_isdst = -1;
-
- /* Set TZ to UTC and use mktime to convert to a time_t. */
- old_tz = set_tz ("UTC");
- t = mktime (&stm);
- unset_tz (old_tz);
-
- return t;
-}
-
-char* icaltime_as_ical_string(struct icaltimetype tt)
-{
- size_t size = 17;
- char* buf = icalmemory_new_buffer(size);
-
- if(tt.is_date){
- snprintf(buf, size,"%04d%02d%02d",tt.year,tt.month,tt.day);
- } else {
- char* fmt;
- if(tt.is_utc){
- fmt = "%04d%02d%02dT%02d%02d%02dZ";
- } else {
- fmt = "%04d%02d%02dT%02d%02d%02d";
- }
- snprintf(buf, size,fmt,tt.year,tt.month,tt.day,
- tt.hour,tt.minute,tt.second);
- }
-
- icalmemory_add_tmp_buffer(buf);
-
- return buf;
-
-}
-
-
-/* Normalize the icaltime, so that all fields are within the normal range. */
-
-struct icaltimetype icaltime_normalize(struct icaltimetype tt)
-{
- icaltime_adjust (&tt, 0, 0, 0, 0);
- return tt;
-}
-
-
-#ifndef ICAL_NO_LIBICAL
-#include "icalvalue.h"
-
-struct icaltimetype icaltime_from_string(const char* str)
-{
- struct icaltimetype tt = icaltime_null_time();
- int size;
-
- icalerror_check_arg_re(str!=0,"str",icaltime_null_time());
-
- size = strlen(str);
-
- if(size == 15) { /* floating time */
- tt.is_utc = 0;
- tt.is_date = 0;
- } else if (size == 16) { /* UTC time, ends in 'Z'*/
- tt.is_utc = 1;
- tt.is_date = 0;
-
- if(str[15] != 'Z'){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return icaltime_null_time();
- }
-
- } else if (size == 8) { /* A DATE */
- tt.is_utc = 1;
- tt.is_date = 1;
- } else { /* error */
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return icaltime_null_time();
- }
-
- if(tt.is_date == 1){
- sscanf(str,"%04d%02d%02d",&tt.year,&tt.month,&tt.day);
- } else {
- char tsep;
- sscanf(str,"%04d%02d%02d%c%02d%02d%02d",&tt.year,&tt.month,&tt.day,
- &tsep,&tt.hour,&tt.minute,&tt.second);
-
- if(tsep != 'T'){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return icaltime_null_time();
- }
-
- }
-
- return tt;
-}
-#endif
-
-char ctime_str[20];
-char* icaltime_as_ctime(struct icaltimetype t)
-{
- time_t tt;
-
- tt = icaltime_as_timet(t);
- sprintf(ctime_str,"%s",ctime(&tt));
-
- ctime_str[strlen(ctime_str)-1] = 0;
-
- return ctime_str;
-}
-
-
-short days_in_month[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
-
-short icaltime_days_in_month(short month,short year)
-{
-
- int is_leap =0;
- int days = days_in_month[month];
-
- assert(month > 0);
- assert(month <= 12);
-
- if( (year % 4 == 0 && year % 100 != 0) ||
- year % 400 == 0){
- is_leap =1;
- }
-
- if( month == 2){
- days += is_leap;
- }
-
- return days;
-}
-
-/* Returns whether the specified year is a leap year. Year is the normal year,
- e.g. 2001. */
-int
-icaltime_is_leap_year (int year)
-{
- if (year <= 1752)
- return !(year % 4);
- else
- return (!(year % 4) && (year % 100)) || !(year % 400);
-}
-
-/* 1-> Sunday, 7->Saturday */
-short icaltime_day_of_week(struct icaltimetype t){
- struct tm stm;
-
- stm.tm_year = t.year - 1900;
- stm.tm_mon = t.month - 1;
- stm.tm_mday = t.day;
- stm.tm_hour = 0;
- stm.tm_min = 0;
- stm.tm_sec = 0;
- stm.tm_isdst = -1;
-
- mktime (&stm);
-
- return stm.tm_wday + 1;
-}
-
-/* Day of the year that the first day of the week (Sunday) is on.
- FIXME: Doesn't take into account different week start days. */
-short icaltime_start_doy_of_week(struct icaltimetype t){
- struct tm stm;
-
- stm.tm_year = t.year - 1900;
- stm.tm_mon = t.month - 1;
- stm.tm_mday = t.day;
- stm.tm_hour = 0;
- stm.tm_min = 0;
- stm.tm_sec = 0;
- stm.tm_isdst = -1;
-
- mktime (&stm);
-
- /* Move back to the start of the week. */
- stm.tm_mday -= stm.tm_wday;
-
- mktime (&stm);
-
- /* If we are still in the same year as the original date, we just return
- the day of the year. */
- if (t.year - 1900 == stm.tm_year){
- return stm.tm_yday+1;
- } else {
- /* return negative to indicate that start of week is in
- previous year. */
- int is_leap = 0;
- int year = stm.tm_year;
-
- if( (year % 4 == 0 && year % 100 != 0) ||
- year % 400 == 0){
- is_leap =1;
- }
-
- return (stm.tm_yday+1)-(365+is_leap);
- }
-
-}
-
-/* FIXME: Doesn't take into account the start day of the week. strftime assumes
- that weeks start on Monday. */
-short icaltime_week_number(struct icaltimetype ictt)
-{
- struct tm stm;
- int week_no;
- char str[8];
-
- stm.tm_year = ictt.year - 1900;
- stm.tm_mon = ictt.month - 1;
- stm.tm_mday = ictt.day;
- stm.tm_hour = 0;
- stm.tm_min = 0;
- stm.tm_sec = 0;
- stm.tm_isdst = -1;
-
- mktime (&stm);
-
- strftime(str,5,"%V", &stm);
-
- week_no = atoi(str);
-
- return week_no;
-}
-
-static const short days_in_year[2][13] =
-{ /* jan feb mar apr may jun jul aug sep oct nov dec */
- { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
- { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
-};
-
-/* Returns the day of the year, counting from 1 (Jan 1st). */
-short icaltime_day_of_year(struct icaltimetype t){
- int is_leap = 0;
-
- if (icaltime_is_leap_year (t.year))
- is_leap = 1;
-
- return days_in_year[is_leap][t.month - 1] + t.day;
-}
-
-
-/* Jan 1 is day #1, not 0 */
-struct icaltimetype icaltime_from_day_of_year(short doy, short year)
-{
- struct icaltimetype tt = { 0 };
- int is_leap = 0, month;
-
- tt.year = year;
- if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
- is_leap = 1;
-
- assert(doy > 0);
- assert(doy <= days_in_year[is_leap][12]);
-
- for (month = 11; month >= 0; month--) {
- if (doy > days_in_year[is_leap][month]) {
- tt.month = month + 1;
- tt.day = doy - days_in_year[is_leap][month];
- return tt;
- }
- }
-
- /* Shouldn't reach here. */
- assert (0);
-}
-
-struct icaltimetype icaltime_null_time()
-{
- struct icaltimetype t;
- memset(&t,0,sizeof(struct icaltimetype));
-
- return t;
-}
-
-
-int icaltime_is_valid_time(struct icaltimetype t){
- if(t.is_utc > 1 || t.is_utc < 0 ||
- t.year < 0 || t.year > 3000 ||
- t.is_date > 1 || t.is_date < 0){
- return 0;
- } else {
- return 1;
- }
-
-}
-
-int icaltime_is_null_time(struct icaltimetype t)
-{
- if (t.second +t.minute+t.hour+t.day+t.month+t.year == 0){
- return 1;
- }
-
- return 0;
-
-}
-
-int icaltime_compare(struct icaltimetype a, struct icaltimetype b)
-{
- int retval;
-
- if (a.year > b.year)
- retval = 1;
- else if (a.year < b.year)
- retval = -1;
-
- else if (a.month > b.month)
- retval = 1;
- else if (a.month < b.month)
- retval = -1;
-
- else if (a.day > b.day)
- retval = 1;
- else if (a.day < b.day)
- retval = -1;
-
- else if (a.hour > b.hour)
- retval = 1;
- else if (a.hour < b.hour)
- retval = -1;
-
- else if (a.minute > b.minute)
- retval = 1;
- else if (a.minute < b.minute)
- retval = -1;
-
- else if (a.second > b.second)
- retval = 1;
- else if (a.second < b.second)
- retval = -1;
-
- else
- retval = 0;
-
- return retval;
-}
-
-int
-icaltime_compare_date_only (struct icaltimetype a, struct icaltimetype b)
-{
- int retval;
-
- if (a.year > b.year)
- retval = 1;
- else if (a.year < b.year)
- retval = -1;
-
- else if (a.month > b.month)
- retval = 1;
- else if (a.month < b.month)
- retval = -1;
-
- else if (a.day > b.day)
- retval = 1;
- else if (a.day < b.day)
- retval = -1;
-
- else
- retval = 0;
-
- return retval;
-}
-
-/* These are defined in icalduration.c:
-struct icaltimetype icaltime_add(struct icaltimetype t,
- struct icaldurationtype d)
-struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
- struct icaltimetype t2)
-*/
-
-
-
-/* Adds (or subtracts) a time from a icaltimetype.
- NOTE: This function is exactly the same as icaltimezone_adjust_change()
- except for the type of the first parameter. */
-void
-icaltime_adjust (struct icaltimetype *tt,
- int days,
- int hours,
- int minutes,
- int seconds)
-{
- int second, minute, hour, day;
- int minutes_overflow, hours_overflow, days_overflow, years_overflow;
- int days_in_month;
-
- /* Add on the seconds. */
- second = tt->second + seconds;
- tt->second = second % 60;
- minutes_overflow = second / 60;
- if (tt->second < 0) {
- tt->second += 60;
- minutes_overflow--;
- }
-
- /* Add on the minutes. */
- minute = tt->minute + minutes + minutes_overflow;
- tt->minute = minute % 60;
- hours_overflow = minute / 60;
- if (tt->minute < 0) {
- tt->minute += 60;
- hours_overflow--;
- }
-
- /* Add on the hours. */
- hour = tt->hour + hours + hours_overflow;
- tt->hour = hour % 24;
- days_overflow = hour / 24;
- if (tt->hour < 0) {
- tt->hour += 24;
- days_overflow--;
- }
-
- /* Normalize the month. We do this before handling the day since we may
- need to know what month it is to get the number of days in it.
- Note that months are 1 to 12, so we have to be a bit careful. */
- if (tt->month >= 13) {
- years_overflow = (tt->month - 1) / 12;
- tt->year += years_overflow;
- tt->month -= years_overflow * 12;
- } else if (tt->month <= 0) {
- /* 0 to -11 is -1 year out, -12 to -23 is -2 years. */
- years_overflow = (tt->month / 12) - 1;
- tt->year += years_overflow;
- tt->month -= years_overflow * 12;
- }
-
- /* Add on the days. */
- day = tt->day + days + days_overflow;
- if (day > 0) {
- for (;;) {
- days_in_month = icaltime_days_in_month (tt->month, tt->year);
- if (day <= days_in_month)
- break;
-
- tt->month++;
- if (tt->month >= 13) {
- tt->year++;
- tt->month = 1;
- }
-
- day -= days_in_month;
- }
- } else {
- while (day <= 0) {
- if (tt->month == 1) {
- tt->year--;
- tt->month = 12;
- } else {
- tt->month--;
- }
-
- day += icaltime_days_in_month (tt->month, tt->year);
- }
- }
- tt->day = day;
-}
diff --git a/libical/src/libical/icaltime.h b/libical/src/libical/icaltime.h
deleted file mode 100644
index b2a536b2b5..0000000000
--- a/libical/src/libical/icaltime.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icaltime.h
- CREATOR: eric 02 June 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALTIME_H
-#define ICALTIME_H
-
-#include <time.h>
-
-/* An opaque struct representing a timezone. We declare this here to avoid
- a circular dependancy. */
-#ifndef ICALTIMEONE_DEFINED
-#define ICALTIMEONE_DEFINED
-typedef struct _icaltimezone icaltimezone;
-#endif
-
-/* icaltime_span is returned by icalcomponent_get_span() */
-struct icaltime_span {
- time_t start; /* in UTC */
- time_t end; /* in UTC */
- int is_busy; /* 1->busy time, 0-> free time */
-};
-
-
-struct icaltimetype
-{
- int year; /* Actual year, e.g. 2001. */
- int month; /* 1 (Jan) to 12 (Dec). */
- int day;
- int hour;
- int minute;
- int second;
-
- int is_utc; /* 1-> time is in UTC timezone */
-
- int is_date; /* 1 -> interpret this as date. */
-
- int is_daylight; /* 1 -> time is in daylight savings time. */
-
- const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
-};
-
-/* Convert seconds past UNIX epoch to a timetype*/
-struct icaltimetype icaltime_from_timet(time_t v, int is_date);
-
-/* Newer version of above, using timezones. */
-struct icaltimetype icaltime_from_timet_with_zone(time_t tm, int is_date,
- icaltimezone *zone);
-
-/* Returns the current time in the given timezone, as an icaltimetype. */
-struct icaltimetype icaltime_current_time_with_zone(icaltimezone *zone);
-
-/* Returns the current day as an icaltimetype, with is_date set. */
-struct icaltimetype icaltime_today(void);
-
-/* Return the time as seconds past the UNIX epoch */
-time_t icaltime_as_timet(struct icaltimetype);
-
-/* Newer version of above, using timezones. */
-time_t icaltime_as_timet_with_zone(struct icaltimetype tt, icaltimezone *zone);
-
-/* Return a string represention of the time, in RFC2445 format. The
- string is owned by libical */
-char* icaltime_as_ical_string(struct icaltimetype tt);
-
-/* Like icaltime_from_timet(), except that the input may be in seconds
- past the epoch in floating time. This routine is deprecated */
-struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc);
-
-/* Like icaltime_as_timet, but in a floating epoch. This routine is deprecated */
-int icaltime_as_int(struct icaltimetype);
-
-/* create a time from an ISO format string */
-struct icaltimetype icaltime_from_string(const char* str);
-
-/* Return a null time, which indicates no time has been set. This time represent the beginning of the epoch */
-struct icaltimetype icaltime_null_time(void);
-
-/* Return true of the time is null. */
-int icaltime_is_null_time(struct icaltimetype t);
-
-/* Returns false if the time is clearly invalid, but is not null. This
- is usually the result of creating a new time type buy not clearing
- it, or setting one of the flags to an illegal value. */
-int icaltime_is_valid_time(struct icaltimetype t);
-
-/* Reset all of the time components to be in their normal ranges. For
- instance, given a time with minutes=70, the minutes will be reduces
- to 10, and the hour incremented. This allows the caller to do
- arithmetic on times without worrying about overflow or
- underflow. */
-struct icaltimetype icaltime_normalize(struct icaltimetype t);
-
-/* Return the day of the year of the given time */
-short icaltime_day_of_year(struct icaltimetype t);
-
-/* Create a new time, given a day of year and a year. */
-struct icaltimetype icaltime_from_day_of_year(short doy, short year);
-
-/* Return the day of the week of the given time. Sunday is 1 */
-short icaltime_day_of_week(struct icaltimetype t);
-
-/* Return the day of the year for the Sunday of the week that the
- given time is within. */
-short icaltime_start_doy_of_week(struct icaltimetype t);
-
-/* Return a string with the time represented in the same format as ctime(). THe string is owned by libical */
-char* icaltime_as_ctime(struct icaltimetype);
-
-/* Return the week number for the week the given time is within */
-short icaltime_week_number(struct icaltimetype t);
-
-/* Create a new time from a weeknumber and a year. */
-struct icaltimetype icaltime_from_week_number(short week_number, short year);
-
-/* Return -1, 0, or 1 to indicate that a<b, a==b or a>b */
-int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
-
-/* like icaltime_compare, but only use the date parts. */
-int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
-
-/* Return the number of days in the given month */
-short icaltime_days_in_month(short month,short year);
-
-/* Adds or subtracts a number of days, hours, minutes and seconds. */
-void icaltime_adjust(struct icaltimetype *tt, int days, int hours,
- int minutes, int seconds);
-
-#endif /* !ICALTIME_H */
-
-
-
diff --git a/libical/src/libical/icaltimezone.c b/libical/src/libical/icaltimezone.c
deleted file mode 100644
index 17a3b437d7..0000000000
--- a/libical/src/libical/icaltimezone.c
+++ /dev/null
@@ -1,1621 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*======================================================================
- FILE: icaltimezone.h
- CREATOR: Damon Chaplin 15 March 2001
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2001, Damon Chaplin
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
-======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "icalproperty.h"
-#include "icalarray.h"
-#include "icalerror.h"
-#include "icalparser.h"
-#include "icaltimezone.h"
-
-/* This is the toplevel directory where the timezone data is installed in. */
-#define ZONEINFO_DIRECTORY PACKAGE_DATA_DIR "/zoneinfo"
-
-/* The prefix we use to uniquely identify TZIDs. */
-#define TZID_PREFIX "/softwarestudio.org/"
-#define TZID_PREFIX_LEN 20
-
-/* This is the filename of the file containing the city names and coordinates
- of all the builtin timezones. */
-#define ZONES_TAB_FILENAME "zones.tab"
-
-/* This is the number of years of extra coverage we do when expanding the
- timezone changes. */
-#define ICALTIMEZONE_EXTRA_COVERAGE 5
-
-/* This is the maximum year we will expand to. time_t values only go up to
- somewhere around 2037. */
-#define ICALTIMEZONE_MAX_YEAR 2035
-
-
-struct _icaltimezone {
- /* The unique ID of this timezone,
- e.g. "/softwarestudio.org/Olson_20010601_1/Africa/Banjul".
- This should only be used to identify a VTIMEZONE. It is not meant to
- be displayed to the user in any form. */
- char *tzid;
-
- /* The location for the timezone, e.g. "Africa/Accra" for the Olson
- database. We look for this in the "LOCATION" or "X-LIC-LOCATION"
- properties of the VTIMEZONE component. It isn't a standard property
- yet. This will be NULL if no location is found in the VTIMEZONE. */
- char *location;
-
- /* This will be set to a combination of the TZNAME properties from the last
- STANDARD and DAYLIGHT components in the VTIMEZONE, e.g. "EST/EDT".
- If they both use the same TZNAME, or only one type of component is
- found, then only one TZNAME will appear, e.g. "AZOT". If no TZNAME
- is found this will be NULL. */
- char *tznames;
-
- /* The coordinates of the city, in degrees. */
- double latitude;
- double longitude;
-
- /* The toplevel VTIMEZONE component loaded from the .ics file for this
- timezone. If we need to regenerate the changes data we need this. */
- icalcomponent *component;
-
- /* If this is not NULL it points to the builtin icaltimezone that the
- above TZID refers to. This icaltimezone should be used instead when
- accessing the timezone changes data, so that the expanded timezone
- changes data is shared between calendar components. */
- icaltimezone *builtin_timezone;
-
- /* This is the last year for which we have expanded the data to.
- If we need to calculate a date past this we need to expand the
- timezone component data from scratch. */
- int end_year;
-
- /* A dynamically-allocated array of time zone changes, sorted by the
- time of the change in local time. So we can do fast binary-searches
- to convert from local time to UTC. */
- icalarray *changes;
-};
-
-
-typedef struct _icaltimezonechange icaltimezonechange;
-
-struct _icaltimezonechange {
- /* The offset to add to UTC to get local time, in seconds. */
- int utc_offset;
-
- /* The offset to add to UTC, before this change, in seconds. */
- int prev_utc_offset;
-
- /* The time that the change came into effect, in UTC.
- Note that the prev_utc_offset applies to this local time,
- since we haven't changed to the new offset yet. */
- int year; /* Actual year, e.g. 2001. */
- char month; /* 1 (Jan) to 12 (Dec). */
- char day;
- char hour;
- char minute;
- char second;
-
- /* Whether this is STANDARD or DAYLIGHT time. */
- char is_daylight;
-};
-
-
-/* An array of icaltimezones for the builtin timezones. */
-icalarray *builtin_timezones = NULL;
-
-/* This is the special UTC timezone, which isn't in builtin_timezones. */
-icaltimezone utc_timezone = { 0 };
-
-
-
-static void icaltimezone_reset (icaltimezone *zone);
-static char* icaltimezone_get_location_from_vtimezone (icalcomponent *component);
-static char* icaltimezone_get_tznames_from_vtimezone (icalcomponent *component);
-static void icaltimezone_expand_changes (icaltimezone *zone,
- int end_year);
-static void icaltimezone_expand_vtimezone (icalcomponent *comp,
- int end_year,
- icalarray *changes);
-static int icaltimezone_compare_change_fn (const void *elem1,
- const void *elem2);
-
-static int icaltimezone_find_nearby_change (icaltimezone *zone,
- icaltimezonechange *change);
-
-static void icaltimezone_adjust_change (icaltimezonechange *tt,
- int days,
- int hours,
- int minutes,
- int seconds);
-
-static void icaltimezone_init (icaltimezone *zone);
-
-/* Gets the TZID, LOCATION/X-LIC-LOCATION, and TZNAME properties from the
- VTIMEZONE component and places them in the icaltimezone. It returns 1 on
- success, or 0 if the TZID can't be found. */
-static int icaltimezone_get_vtimezone_properties (icaltimezone *zone,
- icalcomponent *component);
-
-
-static void icaltimezone_load_builtin_timezone (icaltimezone *zone);
-
-static void icaltimezone_ensure_coverage (icaltimezone *zone,
- int end_year);
-
-
-static void icaltimezone_init_builtin_timezones(void);
-
-static void icaltimezone_parse_zone_tab (void);
-
-static char* icaltimezone_load_get_line_fn (char *s,
- size_t size,
- void *data);
-
-static void format_utc_offset (int utc_offset,
- char *buffer);
-
-
-/* Creates a new icaltimezone. */
-icaltimezone*
-icaltimezone_new (void)
-{
- icaltimezone *zone;
-
- zone = (icaltimezone*) malloc (sizeof (icaltimezone));
- if (!zone) {
- icalerror_set_errno (ICAL_NEWFAILED_ERROR);
- return;
- }
-
- icaltimezone_init (zone);
-
- return zone;
-}
-
-
-/* Frees all memory used for the icaltimezone. */
-void
-icaltimezone_free (icaltimezone *zone,
- int free_struct)
-{
- icaltimezone_reset (zone);
- if (free_struct)
- free (zone);
-}
-
-
-/* Resets the icaltimezone to the initial state, freeing most of the fields. */
-static void
-icaltimezone_reset (icaltimezone *zone)
-{
- if (zone->tzid)
- free (zone->tzid);
- if (zone->location)
- free (zone->location);
- if (zone->tznames)
- free (zone->tznames);
- if (zone->component)
- icalcomponent_free (zone->component);
- if (zone->changes)
- icalarray_free (zone->changes);
-
- icaltimezone_init (zone);
-}
-
-
-/* Initializes an icaltimezone. */
-static void
-icaltimezone_init (icaltimezone *zone)
-{
- zone->tzid = NULL;
- zone->location = NULL;
- zone->tznames = NULL;
- zone->latitude = 0.0;
- zone->longitude = 0.0;
- zone->component = NULL;
- zone->builtin_timezone = NULL;
- zone->end_year = 0;
- zone->changes = NULL;
-}
-
-
-/* Gets the TZID, LOCATION/X-LIC-LOCATION and TZNAME properties of the
- VTIMEZONE component and stores them in the icaltimezone.
- It returns 1 on success, or 0 if the TZID can't be found.
- Note that it expects the zone to be initialized or reset - it doesn't free
- any old values. */
-static int
-icaltimezone_get_vtimezone_properties (icaltimezone *zone,
- icalcomponent *component)
-{
- icalproperty *prop;
- const char *tzid, *location;
-
- prop = icalcomponent_get_first_property (component, ICAL_TZID_PROPERTY);
- if (!prop)
- return 0;
-
- /* A VTIMEZONE MUST have a TZID, or a lot of our code won't work. */
- tzid = icalproperty_get_tzid (prop);
- if (!tzid)
- return 0;
-
- zone->tzid = strdup (tzid);
- zone->component = component;
- zone->location = icaltimezone_get_location_from_vtimezone (component);
- zone->tznames = icaltimezone_get_tznames_from_vtimezone (component);
-
- return 1;
-}
-
-/* Gets the LOCATION or X-LIC-LOCATION property from a VTIMEZONE. */
-static char*
-icaltimezone_get_location_from_vtimezone (icalcomponent *component)
-{
- icalproperty *prop;
- const char *location;
- char *name;
- int found_location = 0;
-
- prop = icalcomponent_get_first_property (component,
- ICAL_LOCATION_PROPERTY);
- if (prop) {
- location = icalproperty_get_location (prop);
- if (location)
- return strdup (location);
- }
-
- prop = icalcomponent_get_first_property (component, ICAL_X_PROPERTY);
- while (prop) {
- name = icalproperty_get_x_name (prop);
- if (name && !strcmp (name, "X-LIC-LOCATION")) {
- location = icalproperty_get_x (prop);
- if (location)
- return strdup (location);
- }
- prop = icalcomponent_get_next_property (component,
- ICAL_X_PROPERTY);
- }
-
- return NULL;
-}
-
-
-/* Gets the TZNAMEs used for the last STANDARD & DAYLIGHT components in a
- VTIMEZONE. If both STANDARD and DAYLIGHT components use the same TZNAME,
- it returns that. If they use different TZNAMEs, it formats them like
- "EST/EDT". The returned string should be freed by the caller. */
-static char*
-icaltimezone_get_tznames_from_vtimezone (icalcomponent *component)
-{
- icalcomponent *comp;
- icalcomponent_kind type;
- icalproperty *prop;
- struct icaltimetype dtstart;
- struct icaldatetimeperiodtype rdate;
- const char *current_tzname;
- const char *standard_tzname = NULL, *daylight_tzname = NULL;
- struct icaltimetype standard_max_date, daylight_max_date;
- struct icaltimetype current_max_date;
-
- /* Step through the STANDARD & DAYLIGHT subcomponents. */
- comp = icalcomponent_get_first_component (component, ICAL_ANY_COMPONENT);
- while (comp) {
- type = icalcomponent_isa (comp);
- if (type == ICAL_XSTANDARD_COMPONENT
- || type == ICAL_XDAYLIGHT_COMPONENT) {
- current_max_date = icaltime_null_time ();
- current_tzname = NULL;
-
- /* Step through the properties. We want to find the TZNAME, and
- the largest DTSTART or RDATE. */
- prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY);
- while (prop) {
- switch (icalproperty_isa (prop)) {
- case ICAL_TZNAME_PROPERTY:
- current_tzname = icalproperty_get_tzname (prop);
- break;
-
- case ICAL_DTSTART_PROPERTY:
- dtstart = icalproperty_get_dtstart (prop);
- if (icaltime_compare (dtstart, current_max_date) > 0)
- current_max_date = dtstart;
-
- break;
-
- case ICAL_RDATE_PROPERTY:
- rdate = icalproperty_get_rdate (prop);
- if (icaltime_compare (rdate.time, current_max_date) > 0)
- current_max_date = rdate.time;
-
- break;
-
- default:
- break;
- }
-
- prop = icalcomponent_get_next_property (comp,
- ICAL_ANY_PROPERTY);
- }
-
- if (current_tzname) {
- if (type == ICAL_XSTANDARD_COMPONENT) {
- if (!standard_tzname
- || icaltime_compare (current_max_date,
- standard_max_date) > 0) {
- standard_max_date = current_max_date;
- standard_tzname = current_tzname;
- }
- } else {
- if (!daylight_tzname
- || icaltime_compare (current_max_date,
- daylight_max_date) > 0) {
- daylight_max_date = current_max_date;
- daylight_tzname = current_tzname;
- }
- }
- }
- }
-
- comp = icalcomponent_get_next_component (component,
- ICAL_ANY_COMPONENT);
- }
-
- /* If both standard and daylight TZNAMEs were found, if they are the same
- we return just one, else we format them like "EST/EDT". */
- if (standard_tzname && daylight_tzname) {
- int standard_len, daylight_len;
- char *tznames;
-
- if (!strcmp (standard_tzname, daylight_tzname))
- return strdup (standard_tzname);
-
- standard_len = strlen (standard_tzname);
- daylight_len = strlen (daylight_tzname);
- tznames = malloc (standard_len + daylight_len + 2);
- strcpy (tznames, standard_tzname);
- tznames[standard_len] = '/';
- strcpy (tznames + standard_len + 1, daylight_tzname);
- return tznames;
- } else {
- const char *tznames;
-
- /* If either of the TZNAMEs was found just return that, else NULL. */
- tznames = standard_tzname ? standard_tzname : daylight_tzname;
- return tznames ? strdup (tznames) : NULL;
- }
-}
-
-
-static void
-icaltimezone_ensure_coverage (icaltimezone *zone,
- int end_year)
-{
- /* When we expand timezone changes we always expand at least up to this
- year, plus ICALTIMEZONE_EXTRA_COVERAGE. */
- static int icaltimezone_minimum_expansion_year = -1;
-
- int changes_end_year;
-
- if (!zone->component)
- icaltimezone_load_builtin_timezone (zone);
-
- if (icaltimezone_minimum_expansion_year == -1) {
- struct tm *tmp_tm;
- time_t t;
-
- t = time (NULL);
- tmp_tm = localtime (&t);
- icaltimezone_minimum_expansion_year = tmp_tm->tm_year + 1900;
- }
-
- changes_end_year = end_year;
- if (changes_end_year < icaltimezone_minimum_expansion_year)
- changes_end_year = icaltimezone_minimum_expansion_year;
-
- changes_end_year += ICALTIMEZONE_EXTRA_COVERAGE;
-
- if (changes_end_year > ICALTIMEZONE_MAX_YEAR)
- changes_end_year = ICALTIMEZONE_MAX_YEAR;
-
- if (!zone->changes || zone->end_year < end_year)
- icaltimezone_expand_changes (zone, changes_end_year);
-}
-
-
-static void
-icaltimezone_expand_changes (icaltimezone *zone,
- int end_year)
-{
- icalarray *changes;
- icalcomponent *comp;
-
-#if 0
- printf ("\nExpanding changes for: %s to year: %i\n", zone->tzid, end_year);
-#endif
-
- changes = icalarray_new (sizeof (icaltimezonechange), 32);
- if (!changes)
- return;
-
- /* Scan the STANDARD and DAYLIGHT subcomponents. */
- comp = icalcomponent_get_first_component (zone->component,
- ICAL_ANY_COMPONENT);
- while (comp) {
- icaltimezone_expand_vtimezone (comp, end_year, changes);
- comp = icalcomponent_get_next_component (zone->component,
- ICAL_ANY_COMPONENT);
- }
-
- /* Sort the changes. We may have duplicates but I don't think it will
- matter. */
- icalarray_sort (changes, icaltimezone_compare_change_fn);
-
- if (zone->changes)
- icalarray_free (zone->changes);
-
- zone->changes = changes;
- zone->end_year = end_year;
-}
-
-
-static void
-icaltimezone_expand_vtimezone (icalcomponent *comp,
- int end_year,
- icalarray *changes)
-{
- icaltimezonechange change;
- icalproperty *prop;
- struct icaltimetype dtstart, occ;
- struct icalrecurrencetype rrule;
- icalrecur_iterator* rrule_iterator;
- struct icaldatetimeperiodtype rdate;
- int found_dtstart = 0, found_tzoffsetto = 0, found_tzoffsetfrom = 0;
- int has_recurrence = 0;
-
- /* First we check if it is a STANDARD or DAYLIGHT component, and
- just return if it isn't. */
- if (icalcomponent_isa (comp) == ICAL_XSTANDARD_COMPONENT)
- change.is_daylight = 0;
- else if (icalcomponent_isa (comp) == ICAL_XDAYLIGHT_COMPONENT)
- change.is_daylight = 1;
- else
- return;
-
- /* Step through each of the properties to find the DTSTART,
- TZOFFSETFROM and TZOFFSETTO. We can't expand recurrences here
- since we need these properties before we can do that. */
- prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY);
- while (prop) {
- switch (icalproperty_isa (prop)) {
- case ICAL_DTSTART_PROPERTY:
- dtstart = icalproperty_get_dtstart (prop);
- found_dtstart = 1;
- break;
- case ICAL_TZOFFSETTO_PROPERTY:
- change.utc_offset = icalproperty_get_tzoffsetto (prop);
- /*printf ("Found TZOFFSETTO: %i\n", change.utc_offset);*/
- found_tzoffsetto = 1;
- break;
- case ICAL_TZOFFSETFROM_PROPERTY:
- change.prev_utc_offset = icalproperty_get_tzoffsetfrom (prop);
- /*printf ("Found TZOFFSETFROM: %i\n", change.prev_utc_offset);*/
- found_tzoffsetfrom = 1;
- break;
- case ICAL_RDATE_PROPERTY:
- case ICAL_RRULE_PROPERTY:
- has_recurrence = 1;
- break;
- default:
- /* Just ignore any other properties. */
- break;
- }
-
- prop = icalcomponent_get_next_property (comp, ICAL_ANY_PROPERTY);
- }
-
- /* If we didn't find a DTSTART, TZOFFSETTO and TZOFFSETFROM we have to
- ignore the component. FIXME: Add an error property? */
- if (!found_dtstart || !found_tzoffsetto || !found_tzoffsetfrom)
- return;
-
-#if 0
- printf ("\n Expanding component DTSTART (Y/M/D): %i/%i/%i %i:%02i:%02i\n",
- dtstart.year, dtstart.month, dtstart.day,
- dtstart.hour, dtstart.minute, dtstart.second);
-#endif
-
- /* If the STANDARD/DAYLIGHT component has no recurrence data, we just add
- a single change for the DTSTART. */
- if (!has_recurrence) {
- change.year = dtstart.year;
- change.month = dtstart.month;
- change.day = dtstart.day;
- change.hour = dtstart.hour;
- change.minute = dtstart.minute;
- change.second = dtstart.second;
-
- /* Convert to UTC. */
- icaltimezone_adjust_change (&change, 0, 0, 0, -change.prev_utc_offset);
-
-#if 0
- printf (" Appending single DTSTART (Y/M/D): %i/%02i/%02i %i:%02i:%02i\n",
- change.year, change.month, change.day,
- change.hour, change.minute, change.second);
-#endif
-
- /* Add the change to the array. */
- icalarray_append (changes, &change);
- return;
- }
-
- /* The component has recurrence data, so we expand that now. */
- prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY);
- while (prop) {
-#if 0
- printf ("Expanding property...\n");
-#endif
- switch (icalproperty_isa (prop)) {
- case ICAL_RDATE_PROPERTY:
- rdate = icalproperty_get_rdate (prop);
- change.year = rdate.time.year;
- change.month = rdate.time.month;
- change.day = rdate.time.day;
- /* RDATEs with a DATE value inherit the time from
- the DTSTART. */
- if (rdate.time.is_date) {
- change.hour = dtstart.hour;
- change.minute = dtstart.minute;
- change.second = dtstart.second;
- } else {
- change.hour = rdate.time.hour;
- change.minute = rdate.time.minute;
- change.second = rdate.time.second;
-
- /* The spec was a bit vague about whether RDATEs were in local
- time or UTC so we support both to be safe. So if it is in
- UTC we have to add the UTC offset to get a local time. */
- if (!rdate.time.is_utc)
- icaltimezone_adjust_change (&change, 0, 0, 0,
- -change.prev_utc_offset);
- }
-
-#if 0
- printf (" Appending RDATE element (Y/M/D): %i/%02i/%02i %i:%02i:%02i\n",
- change.year, change.month, change.day,
- change.hour, change.minute, change.second);
-#endif
-
- icalarray_append (changes, &change);
- break;
- case ICAL_RRULE_PROPERTY:
- rrule = icalproperty_get_rrule (prop);
-
- /* If the rrule UNTIL value is set and is in UTC, we convert it to
- a local time, since the recurrence code has no way to convert
- it itself. */
- if (!icaltime_is_null_time (rrule.until) && rrule.until.is_utc) {
-#if 0
- printf (" Found RRULE UNTIL in UTC.\n");
-#endif
-
- /* To convert from UTC to a local time, we use the TZOFFSETFROM
- since that is the offset from UTC that will be in effect
- when each of the RRULE occurrences happens. */
- icaltime_adjust (&rrule.until, 0, 0, 0,
- change.prev_utc_offset);
- rrule.until.is_utc = 0;
- }
-
- rrule_iterator = icalrecur_iterator_new (rrule, dtstart);
- for (;;) {
- occ = icalrecur_iterator_next (rrule_iterator);
- if (occ.year > end_year || icaltime_is_null_time (occ))
- break;
-
- change.year = occ.year;
- change.month = occ.month;
- change.day = occ.day;
- change.hour = occ.hour;
- change.minute = occ.minute;
- change.second = occ.second;
-
-#if 0
- printf (" Appending RRULE element (Y/M/D): %i/%02i/%02i %i:%02i:%02i\n",
- change.year, change.month, change.day,
- change.hour, change.minute, change.second);
-#endif
-
- icaltimezone_adjust_change (&change, 0, 0, 0,
- -change.prev_utc_offset);
-
- icalarray_append (changes, &change);
- }
-
- icalrecur_iterator_free (rrule_iterator);
- break;
- default:
- break;
- }
-
- prop = icalcomponent_get_next_property (comp, ICAL_ANY_PROPERTY);
- }
-}
-
-
-/* A function to compare 2 icaltimezonechange elements, used for qsort(). */
-static int
-icaltimezone_compare_change_fn (const void *elem1,
- const void *elem2)
-{
- const icaltimezonechange *change1, *change2;
- int retval;
-
- change1 = elem1;
- change2 = elem2;
-
- if (change1->year < change2->year)
- retval = -1;
- else if (change1->year > change2->year)
- retval = 1;
-
- else if (change1->month < change2->month)
- retval = -1;
- else if (change1->month > change2->month)
- retval = 1;
-
- else if (change1->day < change2->day)
- retval = -1;
- else if (change1->day > change2->day)
- retval = 1;
-
- else if (change1->hour < change2->hour)
- retval = -1;
- else if (change1->hour > change2->hour)
- retval = 1;
-
- else if (change1->minute < change2->minute)
- retval = -1;
- else if (change1->minute > change2->minute)
- retval = 1;
-
- else if (change1->second < change2->second)
- retval = -1;
- else if (change1->second > change2->second)
- retval = 1;
-
- else
- retval = 0;
-
- return retval;
-}
-
-
-
-void
-icaltimezone_convert_time (struct icaltimetype *tt,
- icaltimezone *from_zone,
- icaltimezone *to_zone)
-{
- int utc_offset, is_daylight;
-
- /* If the time is a DATE value or both timezones are the same, or we are
- converting a floating time, we don't need to do anything. */
- if (tt->is_date || from_zone == to_zone || from_zone == NULL)
- return;
-
- /* Convert the time to UTC by getting the UTC offset and subtracting it. */
- utc_offset = icaltimezone_get_utc_offset (from_zone, tt, NULL);
- icaltime_adjust (tt, 0, 0, 0, -utc_offset);
-
- /* Now we convert the time to the new timezone by getting the UTC offset
- of our UTC time and adding it. */
- utc_offset = icaltimezone_get_utc_offset_of_utc_time (to_zone, tt,
- &is_daylight);
- tt->is_daylight = is_daylight;
- icaltime_adjust (tt, 0, 0, 0, utc_offset);
-}
-
-
-
-
-
-/* Calculates the UTC offset of a given local time in the given timezone.
- It is the number of seconds to add to UTC to get local time.
- The is_daylight flag is set to 1 if the time is in daylight-savings time. */
-int
-icaltimezone_get_utc_offset (icaltimezone *zone,
- struct icaltimetype *tt,
- int *is_daylight)
-{
- icaltimezonechange *zone_change, *prev_zone_change, tt_change, tmp_change;
- int change_num, step, utc_offset_change, cmp;
- int change_num_to_use;
- char want_daylight;
-
- if (is_daylight)
- *is_daylight = 0;
-
- /* For local times and UTC return 0. */
- if (zone == NULL || zone == &utc_timezone)
- return 0;
-
- /* Use the builtin icaltimezone if possible. */
- if (zone->builtin_timezone)
- zone = zone->builtin_timezone;
-
- /* Make sure the changes array is expanded up to the given time. */
- icaltimezone_ensure_coverage (zone, tt->year);
-
- if (!zone->changes || zone->changes->num_elements == 0)
- return 0;
-
- /* Copy the time parts of the icaltimetype to an icaltimezonechange so we
- can use our comparison function on it. */
- tt_change.year = tt->year;
- tt_change.month = tt->month;
- tt_change.day = tt->day;
- tt_change.hour = tt->hour;
- tt_change.minute = tt->minute;
- tt_change.second = tt->second;
-
- /* This should find a change close to the time, either the change before
- it or the change after it. */
- change_num = icaltimezone_find_nearby_change (zone, &tt_change);
-
- /* Sanity check. */
- icalerror_assert (change_num >= 0,
- "Negative timezone change index");
- icalerror_assert (change_num < zone->changes->num_elements,
- "Timezone change index out of bounds");
-
- /* Now move backwards or forwards to find the timezone change that applies
- to tt. It should only have to do 1 or 2 steps. */
- zone_change = icalarray_element_at (zone->changes, change_num);
- step = 1;
- change_num_to_use = -1;
- for (;;) {
- /* Copy the change, so we can adjust it. */
- tmp_change = *zone_change;
-
- /* If the clock is going backward, check if it is in the region of time
- that is used twice. If it is, use the change with the daylight
- setting which matches tt, or use standard if we don't know. */
- if (tmp_change.utc_offset < tmp_change.prev_utc_offset) {
- /* If the time change is at 2:00AM local time and the clock is
- going back to 1:00AM we adjust the change to 1:00AM. We may
- have the wrong change but we'll figure that out later. */
- icaltimezone_adjust_change (&tmp_change, 0, 0, 0,
- tmp_change.utc_offset);
- } else {
- icaltimezone_adjust_change (&tmp_change, 0, 0, 0,
- tmp_change.prev_utc_offset);
- }
-
- cmp = icaltimezone_compare_change_fn (&tt_change, &tmp_change);
-
- /* If the given time is on or after this change, then this change may
- apply, but we continue as a later change may be the right one.
- If the given time is before this change, then if we have already
- found a change which applies we can use that, else we need to step
- backwards. */
- if (cmp >= 0)
- change_num_to_use = change_num;
- else
- step = -1;
-
- /* If we are stepping backwards through the changes and we have found
- a change that applies, then we know this is the change to use so
- we exit the loop. */
- if (step == -1 && change_num_to_use != -1)
- break;
-
- change_num += step;
-
- /* If we go past the start of the changes array, then we have no data
- for this time so we return a UTC offset of 0. */
- if (change_num < 0)
- return 0;
-
- if (change_num >= zone->changes->num_elements)
- break;
-
- zone_change = icalarray_element_at (zone->changes, change_num);
- }
-
- /* If we didn't find a change to use, then we have a bug! */
- icalerror_assert (change_num_to_use != -1,
- "No applicable timezone change found");
-
- /* Now we just need to check if the time is in the overlapped region of
- time when clocks go back. */
- zone_change = icalarray_element_at (zone->changes, change_num_to_use);
-
- utc_offset_change = zone_change->utc_offset - zone_change->prev_utc_offset;
- if (utc_offset_change < 0 && change_num_to_use > 0) {
- tmp_change = *zone_change;
- icaltimezone_adjust_change (&tmp_change, 0, 0, 0,
- tmp_change.prev_utc_offset);
-
- if (icaltimezone_compare_change_fn (&tt_change, &tmp_change) < 0) {
- /* The time is in the overlapped region, so we may need to use
- either the current zone_change or the previous one. If the
- time has the is_daylight field set we use the matching change,
- else we use the change with standard time. */
- prev_zone_change = icalarray_element_at (zone->changes,
- change_num_to_use - 1);
-
- /* I was going to add an is_daylight flag to struct icaltimetype,
- but iCalendar doesn't let us distinguish between standard and
- daylight time anyway, so there's no point. So we just use the
- standard time instead. */
- want_daylight = (tt->is_daylight == 1) ? 1 : 0;
-
-#if 0
- if (zone_change->is_daylight == prev_zone_change->is_daylight)
- printf (" **** Same is_daylight setting\n");
-#endif
-
- if (zone_change->is_daylight != want_daylight
- && prev_zone_change->is_daylight == want_daylight)
- zone_change = prev_zone_change;
- }
- }
-
- /* Now we know exactly which timezone change applies to the time, so
- we can return the UTC offset and whether it is a daylight time. */
- if (is_daylight)
- *is_daylight = zone_change->is_daylight;
- return zone_change->utc_offset;
-}
-
-
-/* Calculates the UTC offset of a given UTC time in the given timezone.
- It is the number of seconds to add to UTC to get local time.
- The is_daylight flag is set to 1 if the time is in daylight-savings time. */
-int
-icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone,
- struct icaltimetype *tt,
- int *is_daylight)
-{
- icaltimezonechange *zone_change, tt_change, tmp_change;
- int change_num, step, change_num_to_use;
-
- if (is_daylight)
- *is_daylight = 0;
-
- /* For local times and UTC return 0. */
- if (zone == NULL || zone == &utc_timezone)
- return 0;
-
- /* Use the builtin icaltimezone if possible. */
- if (zone->builtin_timezone)
- zone = zone->builtin_timezone;
-
- /* Make sure the changes array is expanded up to the given time. */
- icaltimezone_ensure_coverage (zone, tt->year);
-
- if (!zone->changes || zone->changes->num_elements == 0)
- return 0;
-
- /* Copy the time parts of the icaltimetype to an icaltimezonechange so we
- can use our comparison function on it. */
- tt_change.year = tt->year;
- tt_change.month = tt->month;
- tt_change.day = tt->day;
- tt_change.hour = tt->hour;
- tt_change.minute = tt->minute;
- tt_change.second = tt->second;
-
- /* This should find a change close to the time, either the change before
- it or the change after it. */
- change_num = icaltimezone_find_nearby_change (zone, &tt_change);
-
- /* Sanity check. */
- icalerror_assert (change_num >= 0,
- "Negative timezone change index");
- icalerror_assert (change_num < zone->changes->num_elements,
- "Timezone change index out of bounds");
-
- /* Now move backwards or forwards to find the timezone change that applies
- to tt. It should only have to do 1 or 2 steps. */
- zone_change = icalarray_element_at (zone->changes, change_num);
- step = 1;
- change_num_to_use = -1;
- for (;;) {
- /* Copy the change and adjust it to UTC. */
- tmp_change = *zone_change;
-
- /* If the given time is on or after this change, then this change may
- apply, but we continue as a later change may be the right one.
- If the given time is before this change, then if we have already
- found a change which applies we can use that, else we need to step
- backwards. */
- if (icaltimezone_compare_change_fn (&tt_change, &tmp_change) >= 0)
- change_num_to_use = change_num;
- else
- step = -1;
-
- /* If we are stepping backwards through the changes and we have found
- a change that applies, then we know this is the change to use so
- we exit the loop. */
- if (step == -1 && change_num_to_use != -1)
- break;
-
- change_num += step;
-
- /* If we go past the start of the changes array, then we have no data
- for this time so we return a UTC offset of 0. */
- if (change_num < 0)
- return 0;
-
- if (change_num >= zone->changes->num_elements)
- break;
-
- zone_change = icalarray_element_at (zone->changes, change_num);
- }
-
- /* If we didn't find a change to use, then we have a bug! */
- icalerror_assert (change_num_to_use != -1,
- "No applicable timezone change found");
-
- /* Now we know exactly which timezone change applies to the time, so
- we can return the UTC offset and whether it is a daylight time. */
- zone_change = icalarray_element_at (zone->changes, change_num_to_use);
- if (is_daylight)
- *is_daylight = zone_change->is_daylight;
-
- return zone_change->utc_offset;
-}
-
-
-/* Returns the index of a timezone change which is close to the time given
- in change. */
-static int
-icaltimezone_find_nearby_change (icaltimezone *zone,
- icaltimezonechange *change)
-{
- icaltimezonechange *zone_change;
- int lower, upper, middle, cmp;
-
- /* Do a simple binary search. */
- lower = middle = 0;
- upper = zone->changes->num_elements;
-
- while (lower < upper) {
- middle = (lower + upper) >> 1;
- zone_change = icalarray_element_at (zone->changes, middle);
- cmp = icaltimezone_compare_change_fn (change, zone_change);
- if (cmp == 0)
- break;
- else if (cmp < 0)
- upper = middle;
- else
- lower = middle + 1;
- }
-
- return middle;
-}
-
-
-
-
-/* Adds (or subtracts) a time from a icaltimezonechange.
- NOTE: This function is exactly the same as icaltime_adjust()
- except for the type of the first parameter. */
-static void
-icaltimezone_adjust_change (icaltimezonechange *tt,
- int days,
- int hours,
- int minutes,
- int seconds)
-{
- int second, minute, hour, day;
- int minutes_overflow, hours_overflow, days_overflow;
- int days_in_month;
-
- /* Add on the seconds. */
- second = tt->second + seconds;
- tt->second = second % 60;
- minutes_overflow = second / 60;
- if (tt->second < 0) {
- tt->second += 60;
- minutes_overflow--;
- }
-
- /* Add on the minutes. */
- minute = tt->minute + minutes + minutes_overflow;
- tt->minute = minute % 60;
- hours_overflow = minute / 60;
- if (tt->minute < 0) {
- tt->minute += 60;
- hours_overflow--;
- }
-
- /* Add on the hours. */
- hour = tt->hour + hours + hours_overflow;
- tt->hour = hour % 24;
- days_overflow = hour / 24;
- if (tt->hour < 0) {
- tt->hour += 24;
- days_overflow--;
- }
-
- /* Add on the days. */
- day = tt->day + days + days_overflow;
- if (day > 0) {
- for (;;) {
- days_in_month = icaltime_days_in_month (tt->month, tt->year);
- if (day <= days_in_month)
- break;
-
- tt->month++;
- if (tt->month >= 13) {
- tt->year++;
- tt->month = 1;
- }
-
- day -= days_in_month;
- }
- } else {
- while (day <= 0) {
- if (tt->month == 1) {
- tt->year--;
- tt->month = 12;
- } else {
- tt->month--;
- }
-
- day += icaltime_days_in_month (tt->month, tt->year);
- }
- }
- tt->day = day;
-}
-
-
-char*
-icaltimezone_get_tzid (icaltimezone *zone)
-{
- /* If this is a floating time, without a timezone, return NULL. */
- if (!zone)
- return NULL;
-
- if (!zone->component)
- icaltimezone_load_builtin_timezone (zone);
-
- return zone->tzid;
-}
-
-
-char*
-icaltimezone_get_location (icaltimezone *zone)
-{
- /* If this is a floating time, without a timezone, return NULL. */
- if (!zone)
- return NULL;
-
- /* Note that for builtin timezones this comes from zones.tab so we don't
- need to check the timezone is loaded here. */
- return zone->location;
-}
-
-
-char*
-icaltimezone_get_tznames (icaltimezone *zone)
-{
- /* If this is a floating time, without a timezone, return NULL. */
- if (!zone)
- return NULL;
-
- if (!zone->component)
- icaltimezone_load_builtin_timezone (zone);
-
- return zone->tznames;
-}
-
-
-/* Returns the latitude of a builtin timezone. */
-double
-icaltimezone_get_latitude (icaltimezone *zone)
-{
- /* If this is a floating time, without a timezone, return 0. */
- if (!zone)
- return 0.0;
-
- /* Note that for builtin timezones this comes from zones.tab so we don't
- need to check the timezone is loaded here. */
- return zone->latitude;
-}
-
-
-/* Returns the longitude of a builtin timezone. */
-double
-icaltimezone_get_longitude (icaltimezone *zone)
-{
- /* If this is a floating time, without a timezone, return 0. */
- if (!zone)
- return 0.0;
-
- /* Note that for builtin timezones this comes from zones.tab so we don't
- need to check the timezone is loaded here. */
- return zone->longitude;
-}
-
-
-/* Returns the VTIMEZONE component of a timezone. */
-icalcomponent*
-icaltimezone_get_component (icaltimezone *zone)
-{
- /* If this is a floating time, without a timezone, return NULL. */
- if (!zone)
- return NULL;
-
- if (!zone->component)
- icaltimezone_load_builtin_timezone (zone);
-
- return zone->component;
-}
-
-
-/* Sets the VTIMEZONE component of an icaltimezone, initializing the tzid,
- location & tzname fields. It returns 1 on success or 0 on failure, i.e.
- no TZID was found. */
-int
-icaltimezone_set_component (icaltimezone *zone,
- icalcomponent *comp)
-{
- icaltimezone_reset (zone);
- return icaltimezone_get_vtimezone_properties (zone, comp);
-}
-
-
-icalarray*
-icaltimezone_array_new (void)
-{
- return icalarray_new (sizeof (icaltimezone), 16);
-}
-
-
-void
-icaltimezone_array_append_from_vtimezone (icalarray *timezones,
- icalcomponent *child)
-{
- icaltimezone zone;
-
- icaltimezone_init (&zone);
- if (icaltimezone_get_vtimezone_properties (&zone, child))
- icalarray_append (timezones, &zone);
-}
-
-
-void
-icaltimezone_array_free (icalarray *timezones)
-{
- icaltimezone *zone;
- int i;
-
- for (i = 0; i < timezones->num_elements; i++) {
- zone = icalarray_element_at (timezones, i);
- icaltimezone_free (zone, 0);
- }
-
- icalarray_free (timezones);
-}
-
-
-/*
- * BUILTIN TIMEZONE HANDLING
- */
-
-
-/* Returns an icalarray of icaltimezone structs, one for each builtin timezone.
- This will load and parse the zones.tab file to get the timezone names and
- their coordinates. It will not load the VTIMEZONE data for any timezones. */
-icalarray*
-icaltimezone_get_builtin_timezones (void)
-{
- if (!builtin_timezones)
- icaltimezone_init_builtin_timezones ();
-
- return builtin_timezones;
-}
-
-
-/* Returns a single builtin timezone, given its Olson city name. */
-icaltimezone*
-icaltimezone_get_builtin_timezone (const char *location)
-{
- icaltimezone *zone;
- int lower, upper, middle, cmp;
- char *zone_location;
-
- if (!location || !location[0])
- return NULL;
-
- if (!strcmp (location, "UTC"))
- return &utc_timezone;
-
- if (!builtin_timezones)
- icaltimezone_init_builtin_timezones ();
-
- /* Do a simple binary search. */
- lower = middle = 0;
- upper = builtin_timezones->num_elements;
-
- while (lower < upper) {
- middle = (lower + upper) >> 1;
- zone = icalarray_element_at (builtin_timezones, middle);
- zone_location = icaltimezone_get_location (zone);
- cmp = strcmp (location, zone_location);
- if (cmp == 0)
- return zone;
- else if (cmp < 0)
- upper = middle;
- else
- lower = middle + 1;
- }
-
- return NULL;
-}
-
-
-/* Returns a single builtin timezone, given its TZID. */
-icaltimezone*
-icaltimezone_get_builtin_timezone_from_tzid (const char *tzid)
-{
- int num_slashes = 0;
- const char *p, *zone_tzid;
- icaltimezone *zone;
-
- if (!tzid || !tzid[0])
- return NULL;
-
- /* Check that the TZID starts with our unique prefix. */
- if (strncmp (tzid, TZID_PREFIX, TZID_PREFIX_LEN))
- return NULL;
-
- /* Get the location, which is after the 3rd '/' character. */
- p = tzid;
- for (p = tzid; *p; p++) {
- if (*p == '/') {
- num_slashes++;
- if (num_slashes == 3)
- break;
- }
- }
-
- if (num_slashes != 3)
- return NULL;
-
- p++;
-
- /* Now we can use the function to get the builtin timezone from the
- location string. */
- zone = icaltimezone_get_builtin_timezone (p);
- if (!zone)
- return NULL;
-
- /* Check that the builtin TZID matches exactly. We don't want to return
- a different version of the VTIMEZONE. */
- zone_tzid = icaltimezone_get_tzid (zone);
- if (!strcmp (zone_tzid, tzid))
- return zone;
- else
- return NULL;
-}
-
-
-/* Returns the special UTC timezone. */
-icaltimezone*
-icaltimezone_get_utc_timezone (void)
-{
- return &utc_timezone;
-}
-
-
-
-/* This initializes the builtin timezone data, i.e. the builtin_timezones
- array and the special UTC timezone. It should be called before any
- code that uses the timezone functions. */
-static void
-icaltimezone_init_builtin_timezones (void)
-{
- /* Initialize the special UTC timezone. */
- utc_timezone.tzid = "UTC";
-
- icaltimezone_parse_zone_tab ();
-}
-
-
-/* This parses the zones.tab file containing the names and locations of the
- builtin timezones. It creates the builtin_timezones array which is an
- icalarray of icaltimezone structs. It only fills in the location, latitude
- and longtude fields; the rest are left blank. The VTIMEZONE component is
- loaded later if it is needed. The timezones in the zones.tab file are
- sorted by their name, which is useful for binary searches. */
-static void
-icaltimezone_parse_zone_tab (void)
-{
- char *filename;
- FILE *fp;
- char buf[1024]; /* Used to store each line of zones.tab as it is read. */
- char location[1024]; /* Stores the city name when parsing buf. */
- int filename_len;
- int latitude_degrees, latitude_minutes, latitude_seconds;
- int longitude_degrees, longitude_minutes, longitude_seconds;
- icaltimezone zone;
-
- icalerror_assert (builtin_timezones == NULL,
- "Parsing zones.tab file multiple times");
-
- builtin_timezones = icalarray_new (sizeof (icaltimezone), 32);
-
- filename_len = strlen (ZONEINFO_DIRECTORY) + strlen (ZONES_TAB_FILENAME)
- + 2;
-
- filename = (char*) malloc (filename_len);
- if (!filename) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- }
-
- snprintf (filename, filename_len, "%s/%s", ZONEINFO_DIRECTORY,
- ZONES_TAB_FILENAME);
-
- fp = fopen (filename, "r");
- free (filename);
- if (!fp) {
- icalerror_set_errno(ICAL_FILE_ERROR);
- return;
- }
-
- while (fgets (buf, sizeof(buf), fp)) {
- if (*buf == '#') continue;
-
- /* The format of each line is: "latitude longitude location". */
- if (sscanf (buf, "%4d%2d%2d %4d%2d%2d %s",
- &latitude_degrees, &latitude_minutes,
- &latitude_seconds,
- &longitude_degrees, &longitude_minutes,
- &longitude_seconds,
- &location) != 7) {
- fprintf (stderr, "Invalid timezone description line: %s\n", buf);
- continue;
- }
-
- icaltimezone_init (&zone);
- zone.location = strdup (location);
-
- if (latitude_degrees >= 0)
- zone.latitude = (double) latitude_degrees
- + (double) latitude_minutes / 60
- + (double) latitude_seconds / 3600;
- else
- zone.latitude = (double) latitude_degrees
- - (double) latitude_minutes / 60
- - (double) latitude_seconds / 3600;
-
- if (longitude_degrees >= 0)
- zone.longitude = (double) longitude_degrees
- + (double) longitude_minutes / 60
- + (double) longitude_seconds / 3600;
- else
- zone.longitude = (double) longitude_degrees
- - (double) longitude_minutes / 60
- - (double) longitude_seconds / 3600;
-
- icalarray_append (builtin_timezones, &zone);
-
-#if 0
- printf ("Found zone: %s %f %f\n",
- location, zone.latitude, zone.longitude);
-#endif
- }
-
- fclose (fp);
-}
-
-
-/* Loads the builtin VTIMEZONE data for the given timezone. */
-static void
-icaltimezone_load_builtin_timezone (icaltimezone *zone)
-{
- char *filename;
- int filename_len;
- FILE *fp;
- icalparser *parser;
- icalcomponent *comp, *subcomp;
-
- /* If the location isn't set, it isn't a builtin timezone. */
- if (!zone->location || !zone->location[0])
- return;
-
- filename_len = strlen (ZONEINFO_DIRECTORY) + strlen (zone->location) + 6;
-
- filename = (char*) malloc (filename_len);
- if (!filename) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- }
-
- snprintf (filename, filename_len, "%s/%s.ics", ZONEINFO_DIRECTORY,
- zone->location);
-
- fp = fopen (filename, "r");
- free (filename);
- if (!fp) {
- icalerror_set_errno(ICAL_FILE_ERROR);
- return;
- }
-
- parser = icalparser_new ();
- icalparser_set_gen_data (parser, fp);
- comp = icalparser_parse (parser, icaltimezone_load_get_line_fn);
- icalparser_free (parser);
- fclose (fp);
-
- /* Find the VTIMEZONE component inside the VCALENDAR. There should be 1. */
- subcomp = icalcomponent_get_first_component (comp,
- ICAL_VTIMEZONE_COMPONENT);
- if (!subcomp) {
- icalerror_set_errno(ICAL_PARSE_ERROR);
- return;
- }
-
- icaltimezone_get_vtimezone_properties (zone, subcomp);
-}
-
-
-/* Callback used from icalparser_parse() */
-static char *
-icaltimezone_load_get_line_fn (char *s,
- size_t size,
- void *data)
-{
- return fgets (s, size, (FILE*) data);
-}
-
-
-
-
-/*
- * DEBUGGING
- */
-
-/*
- * This outputs a list of timezone changes for the given timezone to the
- * given file, up to the maximum year given. We compare this output with the
- * output from 'vzic --dump-changes' to make sure that we are consistent.
- * (vzic is the Olson timezone database to VTIMEZONE converter.)
- *
- * The output format is:
- *
- * Zone-Name [tab] Date [tab] Time [tab] UTC-Offset
- *
- * The Date and Time fields specify the time change in UTC.
- *
- * The UTC Offset is for local (wall-clock) time. It is the amount of time
- * to add to UTC to get local time.
- */
-int
-icaltimezone_dump_changes (icaltimezone *zone,
- int max_year,
- FILE *fp)
-{
- static char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
- icaltimezonechange *zone_change;
- int change_num;
- char buffer[8];
-
- /* Make sure the changes array is expanded up to the given time. */
- icaltimezone_ensure_coverage (zone, max_year);
-
-#if 0
- printf ("Num changes: %i\n", zone->changes->num_elements);
-#endif
-
- /* This shouldn't happen. */
- if (zone->changes->num_elements == 0) {
- fprintf (fp, "%s\tNO CHANGES", zone->location);
- return;
- }
-
- zone_change = icalarray_element_at (zone->changes, 0);
-
- /* If there is just one change, and the TZOFFSETFROM and TZOFFSETTO are
- the same, meaning the zone just uses the same offset forever, we output
- the special '1 Jan 0001' date instead and return. */
- if (zone->changes->num_elements == 1
- && zone_change->prev_utc_offset == zone_change->utc_offset
- && (zone_change->year == 1600 || zone_change->year == 1601)) {
- fprintf (fp, "%s\t 1 Jan 0001\t 0:00:00", zone->location);
- format_utc_offset (zone_change->utc_offset, buffer);
- fprintf (fp, "\t%s\n", buffer);
- return;
- }
-
- /* Output the special 1 Jan 0001 change here, using the TZOFFSET_FROM
- field of the first change. */
- fprintf (fp, "%s\t 1 Jan 0001\t 0:00:00", zone->location);
- format_utc_offset (zone_change->prev_utc_offset, buffer);
- fprintf (fp, "\t%s\n", buffer);
-
- change_num = 0;
- for (change_num = 0; change_num < zone->changes->num_elements; change_num++) {
- zone_change = icalarray_element_at (zone->changes, change_num);
-
- if (zone_change->year > max_year)
- break;
-
- fprintf (fp, "%s\t%2i %s %04i\t%2i:%02i:%02i",
- zone->location,
- zone_change->day, months[zone_change->month - 1],
- zone_change->year,
- zone_change->hour, zone_change->minute, zone_change->second);
-
- /* Wall Clock Time offset from UTC. */
- format_utc_offset (zone_change->utc_offset, buffer);
- fprintf (fp, "\t%s\n", buffer);
- }
-}
-
-
-/* This formats a UTC offset as "+HHMM" or "+HHMMSS".
- buffer should have space for 8 characters. */
-static void
-format_utc_offset (int utc_offset,
- char *buffer)
-{
- char *sign = "+";
- int hours, minutes, seconds;
-
- if (utc_offset < 0) {
- utc_offset = -utc_offset;
- sign = "-";
- }
-
- hours = utc_offset / 3600;
- minutes = (utc_offset % 3600) / 60;
- seconds = utc_offset % 60;
-
- /* Sanity check. Standard timezone offsets shouldn't be much more than 12
- hours, and daylight saving shouldn't change it by more than a few hours.
- (The maximum offset is 15 hours 56 minutes at present.) */
- if (hours < 0 || hours >= 24 || minutes < 0 || minutes >= 60
- || seconds < 0 || seconds >= 60) {
- fprintf (stderr, "Warning: Strange timezone offset: H:%i M:%i S:%i\n",
- hours, minutes, seconds);
- }
-
- if (seconds == 0)
- sprintf (buffer, "%s%02i%02i", sign, hours, minutes);
- else
- sprintf (buffer, "%s%02i%02i%02i", sign, hours, minutes, seconds);
-}
diff --git a/libical/src/libical/icaltimezone.h b/libical/src/libical/icaltimezone.h
deleted file mode 100644
index 1e8ec70048..0000000000
--- a/libical/src/libical/icaltimezone.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*======================================================================
- FILE: icaltimezone.h
- CREATOR: Damon Chaplin 15 March 2001
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2001, Damon Chaplin
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
-======================================================================*/
-
-
-#ifndef ICALTIMEZONE_H
-#define ICALTIMEZONE_H
-
-#include <stdio.h> /* For FILE* */
-#include "icaltime.h"
-#include "icalarray.h"
-#include "icalcomponent.h"
-
-
-/*
- * Creating/Destroying individual icaltimezones.
- */
-
-/* Creates a new icaltimezone. */
-icaltimezone *icaltimezone_new (void);
-
-/* Frees all memory used for the icaltimezone. Set free_struct to free the
- icaltimezone struct as well. */
-void icaltimezone_free (icaltimezone *zone,
- int free_struct);
-
-
-/*
- * Accessing timezones.
- */
-
-/* Returns the array of builtin icaltimezones. */
-icalarray* icaltimezone_get_builtin_timezones (void);
-
-/* Returns a single builtin timezone, given its Olson city name. */
-icaltimezone* icaltimezone_get_builtin_timezone (const char *location);
-
-/* Returns a single builtin timezone, given its TZID. */
-icaltimezone* icaltimezone_get_builtin_timezone_from_tzid (const char *tzid);
-
-/* Returns the UTC timezone. */
-icaltimezone* icaltimezone_get_utc_timezone (void);
-
-/* Returns the TZID of a timezone. */
-char* icaltimezone_get_tzid (icaltimezone *zone);
-
-/* Returns the city name of a timezone. */
-char* icaltimezone_get_location (icaltimezone *zone);
-
-/* Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT
- components. If they are the same it will return just one, e.g. "LMT".
- If they are different it will format them like "EST/EDT". Note that this
- may also return NULL. */
-char* icaltimezone_get_tznames (icaltimezone *zone);
-
-/* Returns the latitude of a builtin timezone. */
-double icaltimezone_get_latitude (icaltimezone *zone);
-
-/* Returns the longitude of a builtin timezone. */
-double icaltimezone_get_longitude (icaltimezone *zone);
-
-/* Returns the VTIMEZONE component of a timezone. */
-icalcomponent* icaltimezone_get_component (icaltimezone *zone);
-
-/* Sets the VTIMEZONE component of an icaltimezone, initializing the tzid,
- location & tzname fields. It returns 1 on success or 0 on failure, i.e.
- no TZID was found. */
-int icaltimezone_set_component (icaltimezone *zone,
- icalcomponent *comp);
-
-/*
- * Converting times between timezones.
- */
-
-void icaltimezone_convert_time (struct icaltimetype *tt,
- icaltimezone *from_zone,
- icaltimezone *to_zone);
-
-
-/*
- * Getting offsets from UTC.
- */
-
-/* Calculates the UTC offset of a given local time in the given timezone.
- It is the number of seconds to add to UTC to get local time.
- The is_daylight flag is set to 1 if the time is in daylight-savings time. */
-int icaltimezone_get_utc_offset (icaltimezone *zone,
- struct icaltimetype *tt,
- int *is_daylight);
-
-/* Calculates the UTC offset of a given UTC time in the given timezone.
- It is the number of seconds to add to UTC to get local time.
- The is_daylight flag is set to 1 if the time is in daylight-savings time. */
-int icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone,
- struct icaltimetype *tt,
- int *is_daylight);
-
-
-
-/*
- * Handling arrays of timezones. Mainly for internal use.
- */
-icalarray* icaltimezone_array_new (void);
-
-void icaltimezone_array_append_from_vtimezone (icalarray *timezones,
- icalcomponent *child);
-void icaltimezone_array_free (icalarray *timezones);
-
-
-
-/*
- * Debugging Output.
- */
-
-/* Dumps information about changes in the timezone up to and including
- max_year. */
-int icaltimezone_dump_changes (icaltimezone *zone,
- int max_year,
- FILE *fp);
-
-#endif /* ICALTIMEZONE_H */
diff --git a/libical/src/libical/icaltypes.c b/libical/src/libical/icaltypes.c
deleted file mode 100644
index cbb574992b..0000000000
--- a/libical/src/libical/icaltypes.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icaltypes.c
- CREATOR: eric 16 May 1999
-
- $Id$
- $Locker$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icaltypes.c
-
- ======================================================================*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icaltypes.h"
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalvalueimpl.h"
-#include <stdlib.h> /* for malloc and abs() */
-#include <errno.h> /* for errno */
-#include <string.h> /* for icalmemory_strdup */
-#include <assert.h>
-
-#define TEMP_MAX 1024
-
-icalattach *
-icalattach_new_from_url (const char *url)
-{
- icalattach *attach;
- char *url_copy;
-
- icalerror_check_arg_rz ((url != NULL), "url");
-
- if ((attach = malloc (sizeof (icalattach))) == NULL) {
- errno = ENOMEM;
- return NULL;
- }
-
- if ((url_copy = strdup (url)) == NULL) {
- free (attach);
- errno = ENOMEM;
- return NULL;
- }
-
- attach->refcount = 1;
- attach->is_url = 1;
- attach->u.url.url = url_copy;
-
- return attach;
-}
-
-icalattach *
-icalattach_new_from_data (const unsigned char *data, icalattach_free_fn_t free_fn,
- void *free_fn_data)
-{
- icalattach *attach;
-
- icalerror_check_arg_rz ((data != NULL), "data");
-
- if ((attach = malloc (sizeof (icalattach))) == NULL) {
- errno = ENOMEM;
- return NULL;
- }
-
- attach->refcount = 1;
- attach->is_url = 0;
- attach->u.data.data = (unsigned char *) data;
- attach->u.data.free_fn = free_fn;
- attach->u.data.free_fn_data = free_fn_data;
-
- return attach;
-}
-
-void
-icalattach_ref (icalattach *attach)
-{
- icalerror_check_arg_rv ((attach != NULL), "attach");
- icalerror_check_arg_rv ((attach->refcount > 0), "attach->refcount > 0");
-
- attach->refcount++;
-}
-
-void
-icalattach_unref (icalattach *attach)
-{
- icalerror_check_arg_rv ((attach != NULL), "attach");
- icalerror_check_arg_rv ((attach->refcount > 0), "attach->refcount > 0");
-
- attach->refcount--;
-
- if (attach->refcount != 0)
- return;
-
- if (attach->is_url)
- free (attach->u.url.url);
- else if (attach->u.data.free_fn)
- (* attach->u.data.free_fn) (attach->u.data.data, attach->u.data.free_fn_data);
-
- free (attach);
-}
-
-int
-icalattach_get_is_url (icalattach *attach)
-{
- icalerror_check_arg_rz ((attach != NULL), "attach");
-
- return attach->is_url ? 1 : 0;
-}
-
-const char *
-icalattach_get_url (icalattach *attach)
-{
- icalerror_check_arg_rz ((attach != NULL), "attach");
- icalerror_check_arg_rz ((attach->is_url), "attach->is_url");
-
- return attach->u.url.url;
-}
-
-unsigned char *
-icalattach_get_data (icalattach *attach)
-{
- icalerror_check_arg_rz ((attach != NULL), "attach");
- icalerror_check_arg_rz ((!attach->is_url), "!attach->is_url");
-
- return attach->u.data.data;
-}
-
-
-struct icaltriggertype icaltriggertype_from_string(const char* str)
-{
-
-
- struct icaltriggertype tr, null_tr;
- int old_ieaf = icalerror_errors_are_fatal;
-
- tr.time= icaltime_null_time();
- tr.duration = icaldurationtype_from_int(0);
-
- null_tr = tr;
-
- if(str == 0) goto error;
-
-
- icalerror_errors_are_fatal = 0;
-
- tr.time = icaltime_from_string(str);
-
- icalerror_errors_are_fatal = old_ieaf;
-
- if (icaltime_is_null_time(tr.time)){
-
- tr.duration = icaldurationtype_from_string(str);
-
- if(icaldurationtype_as_int(tr.duration) == 0) goto error;
- }
-
- return tr;
-
- error:
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return null_tr;
-
-}
-
-
-struct icalreqstattype icalreqstattype_from_string(char* str)
-{
- char *p1,*p2;
- struct icalreqstattype stat;
- int major, minor;
-
- icalerror_check_arg((str != 0),"str");
-
- stat.code = ICAL_UNKNOWN_STATUS;
- stat.debug = 0;
- stat.desc = 0;
-
- /* Get the status numbers */
-
- sscanf(str, "%d.%d",&major, &minor);
-
- if (major <= 0 || minor < 0){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return stat;
- }
-
- stat.code = icalenum_num_to_reqstat(major, minor);
-
- if (stat.code == ICAL_UNKNOWN_STATUS){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return stat;
- }
-
-
- p1 = strchr(str,';');
-
- if (p1 == 0){
-/* icalerror_set_errno(ICAL_BADARG_ERROR);*/
- return stat;
- }
-
- /* Just ignore the second clause; it will be taken from inside the library
- */
-
-
-
- p2 = strchr(p1+1,';');
- if (p2 != 0 && *p2 != 0){
- stat.debug = p2+1;
- }
-
- return stat;
-
-}
-
-char* icalreqstattype_as_string(struct icalreqstattype stat)
-{
- char *temp;
-
- temp = (char*)icalmemory_tmp_buffer(TEMP_MAX);
-
- icalerror_check_arg_rz((stat.code != ICAL_UNKNOWN_STATUS),"Status");
-
- if (stat.desc == 0){
- stat.desc = icalenum_reqstat_desc(stat.code);
- }
-
- if(stat.debug != 0){
- snprintf(temp,TEMP_MAX,"%d.%d;%s;%s", icalenum_reqstat_major(stat.code),
- icalenum_reqstat_minor(stat.code),
- stat.desc, stat.debug);
-
- } else {
- snprintf(temp,TEMP_MAX,"%d.%d;%s", icalenum_reqstat_major(stat.code),
- icalenum_reqstat_minor(stat.code),
- stat.desc);
- }
-
- return temp;
-}
diff --git a/libical/src/libical/icaltypes.h b/libical/src/libical/icaltypes.h
deleted file mode 100644
index 916fef7323..0000000000
--- a/libical/src/libical/icaltypes.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icaltypes.h
- CREATOR: eric 20 March 1999
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icaltypes.h
-
-======================================================================*/
-
-#ifndef ICALTYPES_H
-#define ICALTYPES_H
-
-#include <time.h>
-#include "icalenums.h"
-#include "icaltime.h"
-#include "icalduration.h"
-#include "icalperiod.h"
-
-typedef struct icalattach_impl icalattach;
-
-typedef void (* icalattach_free_fn_t) (unsigned char *data, void *user_data);
-
-/* converts base64 to binary, fetches url and stores as binary, or
- just returns data */
-
-icalattach *icalattach_new_from_url (const char *url);
-icalattach *icalattach_new_from_data (const unsigned char *data, icalattach_free_fn_t free_fn,
- void *free_fn_data);
-
-void icalattach_ref (icalattach *attach);
-void icalattach_unref (icalattach *attach);
-
-int icalattach_get_is_url (icalattach *attach);
-const char *icalattach_get_url (icalattach *attach);
-unsigned char *icalattach_get_data (icalattach *attach);
-
-struct icalattachtype* icalattachtype_new(void);
-void icalattachtype_add_reference(struct icalattachtype* v);
-void icalattachtype_free(struct icalattachtype* v);
-
-void icalattachtype_set_url(struct icalattachtype* v, char* url);
-char* icalattachtype_get_url(struct icalattachtype* v);
-
-void icalattachtype_set_base64(struct icalattachtype* v, char* base64,
- int owns);
-char* icalattachtype_get_base64(struct icalattachtype* v);
-
-void icalattachtype_set_binary(struct icalattachtype* v, char* binary,
- int owns);
-void* icalattachtype_get_binary(struct icalattachtype* v);
-
-struct icalgeotype
-{
- float lat;
- float lon;
-};
-
-
-struct icaldatetimeperiodtype
-{
- struct icaltimetype time;
- struct icalperiodtype period;
-};
-
-
-struct icaltriggertype
-{
- struct icaltimetype time;
- struct icaldurationtype duration;
-};
-
-struct icaltriggertype icaltriggertype_from_string(const char* str);
-
-/* struct icalreqstattype. This struct contains two string pointers,
-but don't try to free either of them. The "desc" string is a pointer
-to a static table inside the library. Don't try to free it. The
-"debug" string is a pointer into the string that the called passed
-into to icalreqstattype_from_string. Don't try to free it either, and
-don't use it after the original string has been freed.
-
-BTW, you would get that original string from
-*icalproperty_get_requeststatus() or icalvalue_get_text(), when
-operating on a the value of a request_status property. */
-
-struct icalreqstattype {
-
- icalrequeststatus code;
- const char* desc;
- const char* debug;
-};
-
-struct icalreqstattype icalreqstattype_from_string(char* str);
-char* icalreqstattype_as_string(struct icalreqstattype);
-
-
-
-struct icaltimezonephase {
- const char* tzname;
- int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */
- struct icaltimetype dtstart;
- int offsetto;
- int tzoffsetfrom;
- const char* comment;
- struct icaldatetimeperiodtype rdate;
- const char* rrule;
-};
-
-
-struct icaltimezonetype {
- const char* tzid;
- struct icaltimetype last_mod;
- const char* tzurl;
-
- /* Array of phases. The end of the array is a phase with tzname == 0 */
- struct icaltimezonephase *phases;
-};
-
-void icaltimezonetype_free(struct icaltimezonetype tzt);
-
-
-#endif /* !ICALTYPES_H */
diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c
deleted file mode 100644
index b7852c3216..0000000000
--- a/libical/src/libical/icalvalue.c
+++ /dev/null
@@ -1,1245 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalvalue.c
- CREATOR: eric 02 May 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvalue.c
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
-
-======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "icalerror.h"
-#include "icalmemory.h"
-#include "icalparser.h"
-#include "icalenums.h"
-#include "icalvalueimpl.h"
-
-#include <stdlib.h> /* for malloc */
-#include <stdio.h> /* for sprintf */
-#include <string.h> /* For memset, others */
-#include <stddef.h> /* For offsetof() macro */
-#include <errno.h>
-#include <time.h> /* for mktime */
-#include <stdlib.h> /* for atoi and atof */
-#include <limits.h> /* for SHRT_MAX */
-
-#if _MAC_OS_
-#include "icalmemory_strdup.h"
-#endif
-
-#define TMP_BUF_SIZE 1024
-
-void print_datetime_to_string(char* str, struct icaltimetype *data);
-void print_date_to_string(char* str, struct icaltimetype *data);
-void print_time_to_string(char* str, struct icaltimetype *data);
-void print_recur_to_string(char* str, struct icaltimetype *data);
-
-
-struct icalvalue_impl* icalvalue_new_impl(icalvalue_kind kind){
-
- struct icalvalue_impl* v;
-
- if ( ( v = (struct icalvalue_impl*)
- malloc(sizeof(struct icalvalue_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy(v->id,"val");
-
- v->kind = kind;
- v->size = 0;
- v->parent = 0;
- v->x_value = 0;
- memset(&(v->data),0,sizeof(v->data));
-
- return v;
-
-}
-
-
-
-icalvalue*
-icalvalue_new (icalvalue_kind kind)
-{
- return (icalvalue*)icalvalue_new_impl(kind);
-}
-
-icalvalue*
-icalvalue_new_clone(icalvalue* value)
-{
- struct icalvalue_impl* new;
- struct icalvalue_impl* old = (struct icalvalue_impl*)value;
-
- new = icalvalue_new_impl(old->kind);
-
- if (new == 0){
- return 0;
- }
-
-
- strcpy(new->id, old->id);
- new->kind = old->kind;
- new->size = old->size;
-
- switch (new->kind){
- case ICAL_ATTACH_VALUE:
- case ICAL_BINARY_VALUE:
- {
- /* Hmm. We just ref the attach value, which may not be the right
- * thing to do. We cannot quite copy the data, anyways, since we
- * don't know how long it is.
- */
- new->data.v_attach = old->data.v_attach;
- if (new->data.v_attach)
- icalattach_ref (new->data.v_attach);
-
- break;
- }
-
- case ICAL_STRING_VALUE:
- case ICAL_TEXT_VALUE:
- case ICAL_CALADDRESS_VALUE:
- case ICAL_URI_VALUE:
- {
- if (old->data.v_string != 0) {
- new->data.v_string=icalmemory_strdup(old->data.v_string);
-
- if ( new->data.v_string == 0 ) {
- return 0;
- }
-
- }
- break;
- }
- case ICAL_RECUR_VALUE:
- {
- if(old->data.v_recur != 0){
- new->data.v_recur = malloc(sizeof(struct icalrecurrencetype));
-
- if(new->data.v_recur == 0){
- return 0;
- }
-
- memcpy( new->data.v_recur, old->data.v_recur,
- sizeof(struct icalrecurrencetype));
- }
- break;
- }
-
- default:
- {
- /* all of the other types are stored as values, not
- pointers, so we can just copy the whole structure. */
-
- new->data = old->data;
- }
- }
-
- return new;
-}
-
-static char* icalmemory_strdup_and_dequote(const char* str)
-{
- const char* p;
- char* out = (char*)malloc(sizeof(char) * strlen(str) +1);
- char* pout;
-
- if (out == 0){
- return 0;
- }
-
- pout = out;
-
- for (p = str; *p!=0; p++){
-
- if( *p == '\\')
- {
- p++;
- switch(*p){
- case 0:
- {
- *pout = '\0';
- break;
-
- }
- case 'n':
- case 'N':
- {
- *pout = '\n';
- break;
- }
- case 't':
- case 'T':
- {
- *pout = '\t';
- break;
- }
- case 'r':
- case 'R':
- {
- *pout = '\r';
- break;
- }
- case 'b':
- case 'B':
- {
- *pout = '\b';
- break;
- }
- case 'f':
- case 'F':
- {
- *pout = '\f';
- break;
- }
- case ';':
- case ',':
- case '"':
- case '\\':
- {
- *pout = *p;
- break;
- }
- default:
- {
- *pout = ' ';
- }
- }
- } else {
- *pout = *p;
- }
-
- pout++;
-
- }
-
- *pout = '\0';
-
- return out;
-}
-
-icalvalue* icalvalue_new_enum(icalvalue_kind kind, int x_type, const char* str)
-{
- int e = icalproperty_string_to_enum(str);
- struct icalvalue_impl *value;
-
- if(e != 0 && icalproperty_enum_belongs_to_property(
- icalproperty_value_kind_to_kind(kind),e)) {
-
- value = icalvalue_new_impl(kind);
- value->data.v_enum = e;
- } else {
- /* Make it an X value */
- value = icalvalue_new_impl(kind);
- value->data.v_enum = x_type;
- icalvalue_set_x(value,str);
- }
-
- return value;
-}
-
-
-icalvalue*
-icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* str,icalproperty** error)
-{
-
- struct icalvalue_impl *value = 0;
-
- icalerror_check_arg_rz(str!=0,"str");
-
- if (error != 0){
- *error = 0;
- }
-
- switch (kind){
- case ICAL_ATTACH_VALUE:
- {
- icalattach *attach;
-
- attach = icalattach_new_from_url (str);
- if (!attach)
- break;
-
- value = icalvalue_new_attach (attach);
- icalattach_unref (attach);
- break;
- }
-
- case ICAL_BINARY_VALUE:
- case ICAL_BOOLEAN_VALUE:
- {
- /* HACK */
- value = 0;
-
- if (error != 0){
- char temp[TMP_BUF_SIZE];
- sprintf(temp,"%s Values are not implemented",
- icalparameter_kind_to_string(kind));
- *error = icalproperty_vanew_xlicerror(
- temp,
- icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_VALUEPARSEERROR),
- 0);
- }
- break;
- }
-
-
- case ICAL_TRANSP_VALUE:
- value = icalvalue_new_enum(kind, ICAL_TRANSP_X,str);
- break;
- case ICAL_METHOD_VALUE:
- value = icalvalue_new_enum(kind, ICAL_METHOD_X,str);
- break;
- case ICAL_STATUS_VALUE:
- value = icalvalue_new_enum(kind, ICAL_STATUS_X,str);
- break;
- case ICAL_ACTION_VALUE:
- value = icalvalue_new_enum(kind, ICAL_ACTION_X,str);
- break;
- case ICAL_CLASS_VALUE:
- value = icalvalue_new_enum(kind, ICAL_CLASS_X,str);
- break;
-
-
- case ICAL_INTEGER_VALUE:
- {
- value = icalvalue_new_integer(atoi(str));
- break;
- }
-
- case ICAL_FLOAT_VALUE:
- {
- value = icalvalue_new_float(atof(str));
- break;
- }
-
- case ICAL_UTCOFFSET_VALUE:
- {
- value = icalparser_parse_value(kind,str,(icalcomponent*)0);
- break;
- }
-
- case ICAL_TEXT_VALUE:
- {
- char* dequoted_str = icalmemory_strdup_and_dequote(str);
- value = icalvalue_new_text(dequoted_str);
- free(dequoted_str);
- break;
- }
-
-
- case ICAL_STRING_VALUE:
- {
- value = icalvalue_new_string(str);
- break;
- }
-
- case ICAL_CALADDRESS_VALUE:
- {
- value = icalvalue_new_caladdress(str);
- break;
- }
-
- case ICAL_URI_VALUE:
- {
- value = icalvalue_new_uri(str);
- break;
- }
-
-
- case ICAL_GEO_VALUE:
- {
- value = 0;
- /* HACK */
-
- if (error != 0){
- char temp[TMP_BUF_SIZE];
- sprintf(temp,"GEO Values are not implemented");
- *error = icalproperty_vanew_xlicerror(
- temp,
- icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_VALUEPARSEERROR),
- 0);
- }
-
- /*icalerror_warn("Parsing GEO properties is unimplmeneted");*/
-
- break;
- }
-
- case ICAL_RECUR_VALUE:
- {
- struct icalrecurrencetype rt;
- rt = icalrecurrencetype_from_string(str);
- value = icalvalue_new_recur(rt);
- break;
- }
-
- case ICAL_TIME_VALUE:
- case ICAL_DATE_VALUE:
- case ICAL_DATETIME_VALUE:
- case ICAL_DATETIMEDATE_VALUE:
- {
- struct icaltimetype tt;
- tt = icaltime_from_string(str);
- if(!icaltime_is_null_time(tt)){
- value = icalvalue_new_impl(kind);
- value->data.v_time = tt;
- }
- break;
- }
-
- case ICAL_DATETIMEPERIOD_VALUE:
- {
- struct icaltimetype tt;
- struct icalperiodtype p;
- tt = icaltime_from_string(str);
-
- if(!icaltime_is_null_time(tt)){
- value = icalvalue_new_datetime(tt);
- break;
- }
-
- p = icalperiodtype_from_string(str);
- if (!icalperiodtype_is_null_period(p)){
- value = icalvalue_new_period(p);
- }
-
- break;
- }
-
- case ICAL_DURATION_VALUE:
- {
- struct icaldurationtype dur = icaldurationtype_from_string(str);
-
- if (icalerrno == ICAL_MALFORMEDDATA_ERROR)
- value = 0;
- else
- value = icalvalue_new_duration(dur);
-
- break;
- }
-
- case ICAL_PERIOD_VALUE:
- {
- struct icalperiodtype p;
- p = icalperiodtype_from_string(str);
-
- if(!icalperiodtype_is_null_period(p)){
- value = icalvalue_new_period(p);
- }
- break;
- }
-
- case ICAL_TRIGGER_VALUE:
- {
- struct icaltriggertype tr = icaltriggertype_from_string(str);
- value = icalvalue_new_trigger(tr);
- break;
- }
-
- default:
- {
-
- if (error != 0 ){
- char temp[TMP_BUF_SIZE];
-
- snprintf(temp,TMP_BUF_SIZE,"Unknown type for \'%s\'",str);
-
- *error = icalproperty_vanew_xlicerror(
- temp,
- icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_VALUEPARSEERROR),
- 0);
- }
-
- icalerror_warn("icalvalue_new_from_string got an unknown value type");
- value=0;
- }
- }
-
-
- if (error != 0 && *error == 0 && value == 0){
- char temp[TMP_BUF_SIZE];
-
- snprintf(temp,TMP_BUF_SIZE,"Failed to parse value: \'%s\'",str);
-
- *error = icalproperty_vanew_xlicerror(
- temp,
- icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_VALUEPARSEERROR),
- 0);
- }
-
-
- return value;
-
-}
-
-icalvalue* icalvalue_new_from_string(icalvalue_kind kind,const char* str)
-{
- return icalvalue_new_from_string_with_error(kind,str,(icalproperty*)0);
-}
-
-
-
-void
-icalvalue_free (icalvalue* value)
-{
- struct icalvalue_impl* v = (struct icalvalue_impl*)value;
-
- icalerror_check_arg_rv((value != 0),"value");
-
-#ifdef ICAL_FREE_ON_LIST_IS_ERROR
- icalerror_assert( (v->parent ==0),"This value is still attached to a property");
-
-#else
- if(v->parent !=0){
- return;
- }
-#endif
-
- if(v->x_value != 0){
- free(v->x_value);
- }
-
- switch (v->kind){
- case ICAL_BINARY_VALUE:
- case ICAL_ATTACH_VALUE: {
- if (v->data.v_attach) {
- icalattach_unref (v->data.v_attach);
- v->data.v_attach = NULL;
- }
-
- break;
- }
- case ICAL_TEXT_VALUE:
- case ICAL_CALADDRESS_VALUE:
- case ICAL_URI_VALUE:
- {
- if (v->data.v_string != 0) {
- free((void*)v->data.v_string);
- v->data.v_string = 0;
- }
- break;
- }
- case ICAL_RECUR_VALUE:
- {
- if(v->data.v_recur != 0){
- free((void*)v->data.v_recur);
- v->data.v_recur = 0;
- }
- break;
- }
-
- default:
- {
- /* Nothing to do */
- }
- }
-
- v->kind = ICAL_NO_VALUE;
- v->size = 0;
- v->parent = 0;
- memset(&(v->data),0,sizeof(v->data));
- v->id[0] = 'X';
- free(v);
-}
-
-int
-icalvalue_is_valid (icalvalue* value)
-{
- /*struct icalvalue_impl* v = (struct icalvalue_impl*)value;*/
-
- if(value == 0){
- return 0;
- }
-
- return 1;
-}
-
-char* icalvalue_binary_as_ical_string(icalvalue* value) {
-
- const char* data;
- char* str;
- icalerror_check_arg_rz( (value!=0),"value");
-
- data = icalvalue_get_binary(value);
-
- str = (char*)icalmemory_tmp_buffer(60);
- sprintf(str,"icalvalue_binary_as_ical_string is not implemented yet");
-
- return str;
-}
-
-
-#define MAX_INT_DIGITS 12 /* Enough for 2^32 + sign*/
-char* icalvalue_int_as_ical_string(icalvalue* value) {
-
- int data;
- char* str = (char*)icalmemory_tmp_buffer(MAX_INT_DIGITS);
-
- icalerror_check_arg_rz( (value!=0),"value");
-
- data = icalvalue_get_integer(value);
-
- snprintf(str,MAX_INT_DIGITS,"%d",data);
-
- return str;
-}
-
-char* icalvalue_utcoffset_as_ical_string(icalvalue* value)
-{
- int data,h,m,s;
- char sign;
- char* str = (char*)icalmemory_tmp_buffer(9);
-
- icalerror_check_arg_rz( (value!=0),"value");
-
- data = icalvalue_get_utcoffset(value);
-
- if (abs(data) == data){
- sign = '+';
- } else {
- sign = '-';
- }
-
- h = data/3600;
- m = (data - (h*3600))/ 60;
- s = (data - (h*3600) - (m*60));
-
- /* FIXME: We may want to always round to the nearest minute, to avoid
- interop problems with Outlook (2000). It doesn't like seconds here. */
- if (s == 0)
- sprintf(str,"%c%02d%02d",sign,abs(h),abs(m));
- else
- sprintf(str,"%c%02d%02d%02d",sign,abs(h),abs(m),abs(s));
-
- return str;
-}
-
-char* icalvalue_string_as_ical_string(icalvalue* value) {
-
- const char* data;
- char* str = 0;
- icalerror_check_arg_rz( (value!=0),"value");
- data = ((struct icalvalue_impl*)value)->data.v_string;
-
- str = (char*)icalmemory_tmp_buffer(strlen(data)+1);
-
- strcpy(str,data);
-
- return str;
-}
-
-
-char* icalvalue_recur_as_ical_string(icalvalue* value)
-{
- struct icalvalue_impl *impl = (struct icalvalue_impl*)value;
- struct icalrecurrencetype *recur = impl->data.v_recur;
-
- return icalrecurrencetype_as_string(recur);
-}
-
-char* icalvalue_text_as_ical_string(icalvalue* value) {
-
- char *str;
- char *str_p;
- char *rtrn;
- const char *p;
- size_t buf_sz;
- int line_length;
-
- line_length = 0;
-
- buf_sz = strlen(((struct icalvalue_impl*)value)->data.v_string)+1;
-
- str_p = str = (char*)icalmemory_new_buffer(buf_sz);
-
- if (str_p == 0){
- return 0;
- }
-
- for(p=((struct icalvalue_impl*)value)->data.v_string; *p!=0; p++){
-
- switch(*p){
- case '\n': {
- icalmemory_append_string(&str,&str_p,&buf_sz,"\\n");
- line_length+=3;
- break;
- }
-
- case '\t': {
- icalmemory_append_string(&str,&str_p,&buf_sz,"\\t");
- line_length+=3;
- break;
- }
- case '\r': {
- icalmemory_append_string(&str,&str_p,&buf_sz,"\\r");
- line_length+=3;
- break;
- }
- case '\b': {
- icalmemory_append_string(&str,&str_p,&buf_sz,"\\b");
- line_length+=3;
- break;
- }
- case '\f': {
- icalmemory_append_string(&str,&str_p,&buf_sz,"\\f");
- line_length+=3;
- break;
- }
-
- case ';':
- case ',':
- case '"':
- case '\\':{
- icalmemory_append_char(&str,&str_p,&buf_sz,'\\');
- icalmemory_append_char(&str,&str_p,&buf_sz,*p);
- line_length+=3;
- break;
- }
-
- default: {
- icalmemory_append_char(&str,&str_p,&buf_sz,*p);
- line_length++;
- }
- }
-
- if (line_length > 65 && *p == ' '){
- icalmemory_append_string(&str,&str_p,&buf_sz,"\n ");
- line_length=0;
- }
-
-
- if (line_length > 75){
- icalmemory_append_string(&str,&str_p,&buf_sz,"\n ");
- line_length=0;
- }
-
- }
-
- /* Assume the last character is not a '\0' and add one. We could
- check *str_p != 0, but that would be an uninitialized memory
- read. */
-
-
- icalmemory_append_char(&str,&str_p,&buf_sz,'\0');
-
- rtrn = icalmemory_tmp_copy(str);
-
- icalmemory_free_buffer(str);
-
- return rtrn;
-}
-
-
-char*
-icalvalue_attach_as_ical_string(icalvalue* value)
-{
- icalattach *a;
- char * str;
-
- icalerror_check_arg_rz( (value!=0),"value");
-
- a = icalvalue_get_attach(value);
-
- if (icalattach_get_is_url (a)) {
- const char *url;
-
- url = icalattach_get_url (a);
- str = icalmemory_tmp_buffer (strlen (url) + 1);
- strcpy (str, url);
- return str;
- } else
- return icalvalue_binary_as_ical_string (value);
-}
-
-
-char* icalvalue_duration_as_ical_string(icalvalue* value) {
-
- struct icaldurationtype data;
-
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_duration(value);
-
- return icaldurationtype_as_ical_string(data);
-}
-
-void print_time_to_string(char* str, struct icaltimetype *data)
-{
- char temp[20];
-
- if (data->is_utc == 1){
- sprintf(temp,"%02d%02d%02dZ",data->hour,data->minute,data->second);
- } else {
- sprintf(temp,"%02d%02d%02d",data->hour,data->minute,data->second);
- }
-
- strcat(str,temp);
-}
-
-
-char* icalvalue_time_as_ical_string(icalvalue* value) {
-
- struct icaltimetype data;
- char* str;
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_time(value);
-
- str = (char*)icalmemory_tmp_buffer(8);
-
- str[0] = 0;
- print_time_to_string(str,&data);
-
- return str;
-}
-
-void print_date_to_string(char* str, struct icaltimetype *data)
-{
- char temp[20];
-
- sprintf(temp,"%04d%02d%02d",data->year,data->month,data->day);
-
- strcat(str,temp);
-}
-
-char* icalvalue_date_as_ical_string(icalvalue* value) {
-
- struct icaltimetype data;
- char* str;
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_date(value);
-
- str = (char*)icalmemory_tmp_buffer(9);
-
- str[0] = 0;
- print_date_to_string(str,&data);
-
- return str;
-}
-
-void print_datetime_to_string(char* str, struct icaltimetype *data)
-{
- print_date_to_string(str,data);
- strcat(str,"T");
- print_time_to_string(str,data);
-}
-
-const char* icalvalue_datetime_as_ical_string(icalvalue* value) {
-
- struct icaltimetype data;
- char* str;
- icalvalue_kind kind = icalvalue_isa(value);
-
- icalerror_check_arg_rz( (value!=0),"value");
-
-
- if( !(kind == ICAL_DATETIMEDATE_VALUE ||
- kind == ICAL_DATE_VALUE ||
- kind == ICAL_DATETIME_VALUE ||
- kind == ICAL_TIME_VALUE))
- {
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return 0;
- }
-
- data = icalvalue_get_datetime(value);
-
- str = (char*)icalmemory_tmp_buffer(20);
-
- str[0] = 0;
-
- print_datetime_to_string(str,&data);
-
- return str;
-
-}
-
-
-const char* icalvalue_datetimedate_as_ical_string(icalvalue* value) {
-
- struct icaltimetype data;
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_datetime(value);
-
- if (data.is_date == 1){
- return icalvalue_date_as_ical_string(value);
- } else {
- return icalvalue_datetime_as_ical_string(value);
- }
-}
-
-
-char* icalvalue_float_as_ical_string(icalvalue* value) {
-
- float data;
- char* str;
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_float(value);
-
- str = (char*)icalmemory_tmp_buffer(15);
-
- sprintf(str,"%f",data);
-
- return str;
-}
-
-char* icalvalue_geo_as_ical_string(icalvalue* value) {
-
- struct icalgeotype data;
- char* str;
- icalerror_check_arg_rz( (value!=0),"value");
-
- data = icalvalue_get_geo(value);
-
- str = (char*)icalmemory_tmp_buffer(25);
-
- sprintf(str,"%f;%f",data.lat,data.lon);
-
- return str;
-}
-
-const char* icalvalue_datetimeperiod_as_ical_string(icalvalue* value) {
- struct icaldatetimeperiodtype dtp = icalvalue_get_datetimeperiod(value);
-
- icalerror_check_arg_rz( (value!=0),"value");
-
- if(!icaltime_is_null_time(dtp.time)){
- return icaltime_as_ical_string(dtp.time);
- } else {
- return icalperiodtype_as_ical_string(dtp.period);
- }
-}
-
-const char* icalvalue_period_as_ical_string(icalvalue* value) {
- struct icalperiodtype data;
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_period(value);
-
- return icalperiodtype_as_ical_string(data);
-
-}
-
-char* icalvalue_trigger_as_ical_string(icalvalue* value) {
-
- struct icaltriggertype data;
-
- icalerror_check_arg_rz( (value!=0),"value");
- data = icalvalue_get_trigger(value);
-
- if(!icaltime_is_null_time(data.time)){
- return icaltime_as_ical_string(data.time);
- } else {
- return icaldurationtype_as_ical_string(data.duration);
- }
-
-}
-
-const char*
-icalvalue_as_ical_string (icalvalue* value)
-{
- struct icalvalue_impl* v = (struct icalvalue_impl*)value;
-
- v=v;
-
- if(value == 0){
- return 0;
- }
-
- switch (v->kind){
-
- case ICAL_ATTACH_VALUE:
- return icalvalue_attach_as_ical_string(value);
-
- case ICAL_BINARY_VALUE:
- return icalvalue_binary_as_ical_string(value);
-
- case ICAL_BOOLEAN_VALUE:
- case ICAL_INTEGER_VALUE:
- return icalvalue_int_as_ical_string(value);
-
- case ICAL_UTCOFFSET_VALUE:
- return icalvalue_utcoffset_as_ical_string(value);
-
- case ICAL_TEXT_VALUE:
- return icalvalue_text_as_ical_string(value);
-
- case ICAL_STRING_VALUE:
- case ICAL_URI_VALUE:
- case ICAL_CALADDRESS_VALUE:
- return icalvalue_string_as_ical_string(value);
-
- case ICAL_DATE_VALUE:
- return icalvalue_date_as_ical_string(value);
- case ICAL_DATETIME_VALUE:
- return icalvalue_datetime_as_ical_string(value);
- case ICAL_DATETIMEDATE_VALUE:
- return icalvalue_datetimedate_as_ical_string(value);
- case ICAL_DURATION_VALUE:
- return icalvalue_duration_as_ical_string(value);
- case ICAL_TIME_VALUE:
- return icalvalue_time_as_ical_string(value);
-
- case ICAL_PERIOD_VALUE:
- return icalvalue_period_as_ical_string(value);
- case ICAL_DATETIMEPERIOD_VALUE:
- return icalvalue_datetimeperiod_as_ical_string(value);
-
- case ICAL_FLOAT_VALUE:
- return icalvalue_float_as_ical_string(value);
-
- case ICAL_GEO_VALUE:
- return icalvalue_geo_as_ical_string(value);
-
- case ICAL_RECUR_VALUE:
- return icalvalue_recur_as_ical_string(value);
-
- case ICAL_TRIGGER_VALUE:
- return icalvalue_trigger_as_ical_string(value);
-
- case ICAL_ACTION_VALUE:
- case ICAL_METHOD_VALUE:
- case ICAL_STATUS_VALUE:
- case ICAL_TRANSP_VALUE:
- case ICAL_CLASS_VALUE:
- if(v->x_value !=0){
- return icalmemory_tmp_copy(v->x_value);
- }
-
- return icalproperty_enum_to_string(v->data.v_enum);
-
- case ICAL_X_VALUE:
- return icalmemory_tmp_copy(v->x_value);
-
- case ICAL_NO_VALUE:
- default:
- {
- return 0;
- }
- }
-}
-
-
-icalvalue_kind
-icalvalue_isa (icalvalue* value)
-{
- struct icalvalue_impl* v = (struct icalvalue_impl*)value;
-
- if(value == 0){
- return ICAL_NO_VALUE;
- }
-
- return v->kind;
-}
-
-
-int
-icalvalue_isa_value (void* value)
-{
- struct icalvalue_impl *impl = (struct icalvalue_impl *)value;
-
- icalerror_check_arg_rz( (value!=0), "value");
-
- if (strcmp(impl->id,"val") == 0) {
- return 1;
- } else {
- return 0;
- }
-}
-
-
-int icalvalue_is_time(icalvalue* a) {
- icalvalue_kind kind = icalvalue_isa(a);
-
- if(kind == ICAL_DATETIMEDATE_VALUE ||
- kind == ICAL_DATETIME_VALUE ||
- kind == ICAL_DATE_VALUE ||
- kind == ICAL_TIME_VALUE ){
- return 1;
- }
-
- return 0;
-
-}
-
-icalparameter_xliccomparetype
-icalvalue_compare(icalvalue* a, icalvalue *b)
-{
- struct icalvalue_impl *impla = (struct icalvalue_impl *)a;
- struct icalvalue_impl *implb = (struct icalvalue_impl *)b;
-
- icalerror_check_arg_rz( (a!=0), "a");
- icalerror_check_arg_rz( (b!=0), "b");
-
- /* Not the same type; they can only be unequal */
- if( ! (icalvalue_is_time(a) && icalvalue_is_time(b)) &&
- icalvalue_isa(a) != icalvalue_isa(b)){
- return ICAL_XLICCOMPARETYPE_NOTEQUAL;
- }
-
- switch (icalvalue_isa(a)){
- case ICAL_ATTACH_VALUE:
- case ICAL_BINARY_VALUE:
- {
- if (impla->data.v_attach == implb->data.v_attach)
- return ICAL_XLICCOMPARETYPE_EQUAL;
- else
- return ICAL_XLICCOMPARETYPE_NOTEQUAL;
- }
-
- case ICAL_BOOLEAN_VALUE:
- {
- if (icalvalue_get_boolean(a) == icalvalue_get_boolean(b)){
- return ICAL_XLICCOMPARETYPE_EQUAL;
- } else {
- return ICAL_XLICCOMPARETYPE_NOTEQUAL;
- }
- }
-
- case ICAL_FLOAT_VALUE:
- {
- if (impla->data.v_float > implb->data.v_float){
- return ICAL_XLICCOMPARETYPE_GREATER;
- } else if (impla->data.v_float < implb->data.v_float){
- return ICAL_XLICCOMPARETYPE_LESS;
- } else {
- return ICAL_XLICCOMPARETYPE_EQUAL;
- }
- }
-
- case ICAL_INTEGER_VALUE:
- case ICAL_UTCOFFSET_VALUE:
- {
- if (impla->data.v_int > implb->data.v_int){
- return ICAL_XLICCOMPARETYPE_GREATER;
- } else if (impla->data.v_int < implb->data.v_int){
- return ICAL_XLICCOMPARETYPE_LESS;
- } else {
- return ICAL_XLICCOMPARETYPE_EQUAL;
- }
- }
-
- case ICAL_DURATION_VALUE:
- {
- int a = icaldurationtype_as_int(impla->data.v_duration);
- int b = icaldurationtype_as_int(implb->data.v_duration);
-
- if (a > b){
- return ICAL_XLICCOMPARETYPE_GREATER;
- } else if (a < b){
- return ICAL_XLICCOMPARETYPE_LESS;
- } else {
- return ICAL_XLICCOMPARETYPE_EQUAL;
- }
- }
-
-
- case ICAL_TEXT_VALUE:
- case ICAL_URI_VALUE:
- case ICAL_CALADDRESS_VALUE:
- case ICAL_TRIGGER_VALUE:
- case ICAL_DATE_VALUE:
- case ICAL_DATETIME_VALUE:
- case ICAL_DATETIMEDATE_VALUE:
- case ICAL_TIME_VALUE:
- case ICAL_DATETIMEPERIOD_VALUE:
- {
- int r;
-
- r = strcmp(icalvalue_as_ical_string(a),
- icalvalue_as_ical_string(b));
-
- if (r > 0) {
- return ICAL_XLICCOMPARETYPE_GREATER;
- } else if (r < 0){
- return ICAL_XLICCOMPARETYPE_LESS;
- } else {
- return ICAL_XLICCOMPARETYPE_EQUAL;
- }
-
-
- }
-
- case ICAL_METHOD_VALUE:
- {
- if (icalvalue_get_method(a) == icalvalue_get_method(b)){
- return ICAL_XLICCOMPARETYPE_EQUAL;
- } else {
- return ICAL_XLICCOMPARETYPE_NOTEQUAL;
- }
-
- }
-
- case ICAL_STATUS_VALUE:
- {
- if (icalvalue_get_status(a) == icalvalue_get_status(b)){
- return ICAL_XLICCOMPARETYPE_EQUAL;
- } else {
- return ICAL_XLICCOMPARETYPE_NOTEQUAL;
- }
-
- }
-
- case ICAL_PERIOD_VALUE:
- case ICAL_GEO_VALUE:
- case ICAL_RECUR_VALUE:
- case ICAL_NO_VALUE:
- default:
- {
- icalerror_warn("Comparison not implemented for value type");
- return ICAL_XLICCOMPARETYPE_REGEX+1; /* HACK */
- }
- }
-
-}
-
-void icalvalue_set_parent(icalvalue* value,
- icalproperty* property)
-{
- struct icalvalue_impl* v = (struct icalvalue_impl*)value;
-
- v->parent = property;
-
-}
-
-icalproperty* icalvalue_get_parent(icalvalue* value)
-{
- struct icalvalue_impl* v = (struct icalvalue_impl*)value;
-
-
- return v->parent;
-}
-
-
-
-/* The remaining interfaces are 'new', 'set' and 'get' for each of the value
- types */
-
-
-/* Everything below this line is machine generated. Do not edit. */
diff --git a/libical/src/libical/icalvalue.h b/libical/src/libical/icalvalue.h
deleted file mode 100644
index 6983c23275..0000000000
--- a/libical/src/libical/icalvalue.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalvalue.h
- CREATOR: eric 20 March 1999
-
-
- $Id$
- $Locker$
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvalue.h
-
- ======================================================================*/
-
-#ifndef ICALVALUE_H
-#define ICALVALUE_H
-
-#include <time.h>
-#include "icalenums.h"
-#include "icaltypes.h"
-#include "icalrecur.h"
-#include "icalduration.h"
-#include "icalperiod.h"
-#include "icalderivedproperty.h" /* For icalproperty_method, etc. */
-#include "icalderivedparameter.h"
-#include "icalderivedvalue.h"
-
-/* Defined in icalderivedvalue.h */
-/*typedef void icalvalue;*/
-
-icalvalue* icalvalue_new(icalvalue_kind kind);
-
-icalvalue* icalvalue_new_clone(icalvalue* value);
-
-icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str);
-
-void icalvalue_free(icalvalue* value);
-
-int icalvalue_is_valid(icalvalue* value);
-
-const char* icalvalue_as_ical_string(icalvalue* value);
-
-icalvalue_kind icalvalue_isa(icalvalue* value);
-
-int icalvalue_isa_value(void*);
-
-icalparameter_xliccomparetype icalvalue_compare(icalvalue* a, icalvalue *b);
-
-
-/* Special, non autogenerated value accessors */
-
-icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
-void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
-struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
-
-icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
-void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
-struct icaltriggertype icalvalue_get_trigger(icalvalue* value);
-
-icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
-void icalvalue_set_datetimeperiod(icalvalue* value,
- struct icaldatetimeperiodtype v);
-struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
-
-/* Convert enumerations */
-
-icalvalue_kind icalvalue_string_to_kind(const char* str);
-const char* icalvalue_kind_to_string(icalvalue_kind kind);
-
-
-#endif /*ICALVALUE_H*/
diff --git a/libical/src/libical/icalvalueimpl.h b/libical/src/libical/icalvalueimpl.h
deleted file mode 100644
index 8d39e6ca7f..0000000000
--- a/libical/src/libical/icalvalueimpl.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalvalue.c
- CREATOR: eric 02 May 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvalue.c
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
-
-======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef ICALVALUEIMPL_H
-#define ICALVALUEIMPL_H
-
-#include "icalenums.h"
-#include "icalderivedvalue.h"
-#include "icalderivedproperty.h"
-
-/* Private structure for ATTACH values */
-struct icalattach_impl {
- /* Reference count */
- int refcount;
-
- union {
- /* URL attachment data */
- struct {
- char *url;
- } url;
-
- /* Inline data */
- struct {
- unsigned char *data;
- icalattach_free_fn_t free_fn;
- void *free_fn_data;
- } data;
- } u;
-
- /* TRUE if URL, FALSE if inline data */
- unsigned int is_url : 1;
-};
-
-struct icalvalue_impl {
- icalvalue_kind kind; /*this is the kind that is visible from the outside*/
-
- char id[5];
- int size;
- icalproperty* parent;
- const char* x_value;
-
- union data {
- icalattach *v_attach;
- /* void *v_binary; */ /* use v_attach */
- const char *v_string;
- /*char *v_text;*/
- /*char *v_caladdress;*/
- /*char *v_uri;*/
- float v_float;
- int v_int;
- /*int v_boolean;*/
- /*int v_integer;*/
- struct icaldurationtype v_duration;
- /*int v_utcoffset;*/
-
- struct icalperiodtype v_period;
- /*struct icalperiodtype v_datetimeperiod;*/
- struct icalgeotype v_geo;
- /*time_t v_time;*/
- struct icaltimetype v_time;
- /*struct icaltimetype v_date;*/
- /*struct icaltimetype v_datetime;*/
- /*struct icaltimetype v_datetimedate;*/
-
- /* struct icalrecurrencetype was once included
- directly ( not referenced ) in this union, but it
- contributes 2000 bytes to every value, so now it is
- a reference*/
-
- struct icalrecurrencetype *v_recur;
- struct icaltriggertype v_trigger;
-
- int v_enum;
- /* v_enum takes care of several enumerated types including:
- icalproperty_method v_method;
- icalproperty_status v_status;
- icalproperty_action v_action;
- icalproperty_class v_class;
- icalproperty_transp v_transp;
- */
-
- } data;
-};
-
-struct icalvalue_impl *icalvalue_new_impl(icalvalue_kind kind);
-
-#endif
diff --git a/libical/src/libical/icalversion.h.in b/libical/src/libical/icalversion.h.in
deleted file mode 100644
index 5d213693e5..0000000000
--- a/libical/src/libical/icalversion.h.in
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef ICAL_VERSION_H
-#define ICAL_VERSION_H
-
-#define ICAL_PACKAGE "@PACKAGE@"
-#define ICAL_VERSION "@VERSION@"
-
-#endif
diff --git a/libical/src/libical/icalyacc.y b/libical/src/libical/icalyacc.y
deleted file mode 100644
index c78299fa2a..0000000000
--- a/libical/src/libical/icalyacc.y
+++ /dev/null
@@ -1,404 +0,0 @@
-%{
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalitip.y
- CREATOR: eric 10 June 1999
-
- DESCRIPTION:
-
- $Id: icalyacc.y,v 1.12 2001/06/14 02:50:46 damon Exp $
- $Locker: $
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
- The original code is icalitip.y
-
-
-
- =======================================================================*/
-
-#include <stdlib.h>
-#include <string.h> /* for strdup() */
-#include "icalparser.h"
-#include "pvl.h"
-
-icalvalue *icalparser_yy_value; /* Current Value */
-
-void ical_yyerror(char* s);
-void icalparser_clear_flex_input();
-int ical_yy_lex(void);
-
-/* Globals for UTCOFFSET values */
-int utc;
-int utc_b;
-int utcsign;
-
-/* Globals for DURATION values */
-struct icaldurationtype duration;
-
-/* Globals for TRIGGER values */
-struct icaltriggertype trigger;
-
-void copy_list(short* array, size_t size);
-void add_prop(icalproperty_kind);
-void icalparser_fill_date(struct tm* t, char* dstr);
-void icalparser_fill_time(struct tm* t, char* tstr);
-void set_value_type(icalvalue_kind kind);
-void set_parser_value_state();
-struct icaltimetype fill_datetime(char* d, char* t);
-void ical_yy_error(char *s); /* Don't know why I need this.... */
-int yylex(void); /* Or this. */
-
-
-
-/* Set the state of the lexer so it will interpret values ( iCAL
- VALUEs, that is, ) correctly. */
-
-%}
-
-%union {
- float v_float;
- int v_int;
- char* v_string;
-}
-
-
- /* Renaming hack */
-
-/*
-#define yymaxdepth ical_yy_maxdepth
-#define yyparse ical_yy_parse
-#define yyerror ical_yy_error
-#define yylval ical_yy_lval
-#define yychar ical_yy_char
-#define yydebug ical_yy_debug
-#define yypact ical_yy_pact
-#define yyr1 ical_yy_r1
-#define yyr2 ical_yy_r2
-#define yydef ical_yy_def
-#define yychk ical_yy_chk
-#define yypgo ical_yy_pgo
-#define yyact ical_yy_act
-#define yyexca ical_yy_exca
-#define yyerrflag ical_yy_errflag
-#define yynerrs ical_yy_nerrs
-#define yyps ical_yy_ps
-#define yypv ical_yy_pv
-#define yys ical_yy_s
-#define yy_yys ical_yy_yys
-#define yystate ical_yy_state
-#define yytmp ical_yy_tmp
-#define yyv ical_yy_v
-#define yy_yyv ical_yy_yyv
-#define yyval ical_yy_val
-#define yylloc ical_yy_lloc
-#define yyreds ical_yy_reds
-#define yytoks ical_yy_toks
-#define yylhs ical_yy_yylhs
-#define yylen ical_yy_yylen
-#define yydefred ical_yy_yydefred
-#define yydgoto ical_yy_yydgoto
-#define yydefred ical_yy_yydefred
-#define yydgoto ical_yy_yydgoto
-#define yysindex ical_yy_yysindex
-#define yyrindex ical_yy_yyrindex
-#define yygindex ical_yy_yygindex
-#define yytable ical_yy_yytable
-#define yycheck ical_yy_yycheck
-#define yyname ical_yy_yyname
-#define yyrule ical_yy_yyrule
-#define yy_scan_bytes ical_yy_scan_bytes
-#define yy_scan_string ical_yy_scan_string
-#define yy_scan_buffer ical_yy_scan_buffer
-*/
-
-/* These are redefined with the -P option to flex */
-/*
-#define yy_create_buffer ical_yy_create_buffer
-#define yy_delete_buffer ical_yy_delete_buffer
-#define yy_flex_debug ical_yy_flex_debug
-#define yy_init_buffer ical_yy_init_buffer
-#define yy_flush_buffer ical_yy_flush_buffer
-#define yy_load_buffer_state ical_yy_load_buffer_state
-#define yy_switch_to_buffer ical_yy_switch_to_buffer
-#define yyin ical_yyin
-#define yyleng ical_yyleng
-#define yylex ical_yylex
-#define yylineno ical_yylineno
-#define yyout ical_yyout
-#define yyrestart ical_yyrestart
-#define yytext ical_yytext
-#define yywrap ical_yywrap
-*/
-
-
-%token <v_string> DIGITS
-%token <v_int> INTNUMBER
-%token <v_float> FLOATNUMBER
-%token <v_string> STRING
-%token EOL EQUALS CHARACTER COLON COMMA SEMICOLON MINUS TIMESEPERATOR
-
-%token TRUE FALSE
-
-%token FREQ BYDAY BYHOUR BYMINUTE BYMONTH BYMONTHDAY BYSECOND BYSETPOS BYWEEKNO
-%token BYYEARDAY DAILY MINUTELY MONTHLY SECONDLY WEEKLY HOURLY YEARLY
-%token INTERVAL COUNT UNTIL WKST MO SA SU TU WE TH FR
-
-%token BIT8 ACCEPTED ADD AUDIO BASE64 BINARY BOOLEAN BUSY BUSYTENTATIVE
-%token BUSYUNAVAILABLE CALADDRESS CANCEL CANCELLED CHAIR CHILD COMPLETED
-%token CONFIDENTIAL CONFIRMED COUNTER DATE DATETIME DECLINECOUNTER DECLINED
-%token DELEGATED DISPLAY DRAFT DURATION EMAIL END FINAL FLOAT FREE GREGORIAN
-%token GROUP INDIVIDUAL INPROCESS INTEGER NEEDSACTION NONPARTICIPANT
-%token OPAQUE OPTPARTICIPANT PARENT PERIOD PRIVATE PROCEDURE PUBLIC PUBLISH
-%token RECUR REFRESH REPLY REQPARTICIPANT REQUEST RESOURCE ROOM SIBLING
-%token START TENTATIVE TEXT THISANDFUTURE THISANDPRIOR TIME TRANSPAENT
-%token UNKNOWN UTCOFFSET XNAME
-
-%token ALTREP CN CUTYPE DAYLIGHT DIR ENCODING EVENT FBTYPE FMTTYPE LANGUAGE
-%token MEMBER PARTSTAT RANGE RELATED RELTYPE ROLE RSVP SENTBY STANDARD URI
-
-%token TIME_CHAR UTC_CHAR
-
-
-%%
-
-value:
- date_value
- | datetime_value
- | duration_value
- | period_value
- | utcoffset_value
- | error {
- icalparser_yy_value = 0;
- icalparser_clear_flex_input();
- yyclearin;
- }
-
-
-date_value: DIGITS
- {
- struct icaltimetype stm;
-
- stm = fill_datetime($1,0);
-
- stm.hour = -1;
- stm.minute = -1;
- stm.second = -1;
- stm.is_utc = 0;
- stm.is_date = 1;
-
- icalparser_yy_value = icalvalue_new_date(stm);
- }
-
-utc_char:
- /*empty*/ {utc = 0;}
- | UTC_CHAR {utc = 1;}
-
-/* This is used in the period_value, where there may be two utc characters per rule. */
-utc_char_b:
- /*empty*/ {utc_b = 0;}
- | UTC_CHAR {utc_b = 1;}
-
-datetime_value:
- DIGITS TIME_CHAR DIGITS utc_char
- {
- struct icaltimetype stm;
- stm = fill_datetime($1, $3);
- stm.is_utc = utc;
- stm.is_date = 0;
-
- icalparser_yy_value =
- icalvalue_new_datetime(stm);
- }
-
-
-/* Duration */
-
-
-dur_date: dur_day
- | dur_day dur_time
-
-dur_week: DIGITS 'W'
- {
- duration.weeks = atoi($1);
- }
-
-dur_time: TIME_CHAR dur_hour
- {
- }
- | TIME_CHAR dur_minute
- {
- }
- | TIME_CHAR dur_second
- {
- }
-
-dur_hour: DIGITS 'H'
- {
- duration.hours = atoi($1);
- }
- | DIGITS 'H' dur_minute
- {
- duration.hours = atoi($1);
- }
-
-dur_minute: DIGITS 'M'
- {
- duration.minutes = atoi($1);
- }
- | DIGITS 'M' dur_second
- {
- duration.minutes = atoi($1);
- }
-
-dur_second: DIGITS 'S'
- {
- duration.seconds = atoi($1);
- }
-
-dur_day: DIGITS 'D'
- {
- duration.days = atoi($1);
- }
-
-dur_prefix: /* empty */
- {
- duration.is_neg = 0;
- }
- | '+'
- {
- duration.is_neg = 0;
- }
- | '-'
- {
- duration.is_neg = 1;
- }
-
-duration_value: dur_prefix 'P' dur_date
- {
- icalparser_yy_value = icalvalue_new_duration(duration);
- memset(&duration,0, sizeof(duration));
- }
- | dur_prefix 'P' dur_time
- {
- icalparser_yy_value = icalvalue_new_duration(duration);
- memset(&duration,0, sizeof(duration));
- }
- | dur_prefix 'P' dur_week
- {
- icalparser_yy_value = icalvalue_new_duration(duration);
- memset(&duration,0, sizeof(duration));
- }
-
-
-/* Period */
-
-period_value: DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b
- {
- struct icalperiodtype p;
-
- p.start = fill_datetime($1,$3);
- p.start.is_utc = utc;
- p.start.is_date = 0;
-
-
- p.end = fill_datetime($6,$8);
- p.end.is_utc = utc_b;
- p.end.is_date = 0;
-
- p.duration.days = -1;
- p.duration.weeks = -1;
- p.duration.hours = -1;
- p.duration.minutes = -1;
- p.duration.seconds = -1;
-
- icalparser_yy_value = icalvalue_new_period(p);
- }
- | DIGITS TIME_CHAR DIGITS utc_char '/' duration_value
- {
- struct icalperiodtype p;
-
- p.start = fill_datetime($1,$3);
- p.start.is_utc = utc;
- p.start.is_date = 0;
-
- p.end.year = -1;
- p.end.month = -1;
- p.end.day = -1;
- p.end.hour = -1;
- p.end.minute = -1;
- p.end.second = -1;
-
- /* The duration_value rule setes the global 'duration'
- variable, but it also creates a new value in
- icalparser_yy_value. So, free that, then copy
- 'duration' into the icalperiodtype struct. */
-
- p.duration = icalvalue_get_duration(icalparser_yy_value);
- icalvalue_free(icalparser_yy_value);
- icalparser_yy_value = 0;
-
- icalparser_yy_value = icalvalue_new_period(p);
-
- }
-
-
-trigger:
-
-
-
-/* UTC Offset */
-
-plusminus: '+' { utcsign = 1; }
- | '-' { utcsign = -1; }
-
-utcoffset_value:
- plusminus INTNUMBER INTNUMBER
- {
- icalparser_yy_value = icalvalue_new_utcoffset( utcsign * (($2*3600) + ($3*60)) );
- }
-
- | plusminus INTNUMBER INTNUMBER INTNUMBER
- {
- icalparser_yy_value = icalvalue_new_utcoffset(utcsign * (($2*3600) + ($3*60) +($4)));
- }
-
-%%
-
-struct icaltimetype fill_datetime(char* datestr, char* timestr)
-{
- struct icaltimetype stm;
-
- memset(&stm,0,sizeof(stm));
-
- if (datestr != 0){
- sscanf(datestr,"%4d%2d%2d",&(stm.year), &(stm.month),
- &(stm.day));
- }
-
- if (timestr != 0){
- sscanf(timestr,"%2d%2d%2d", &(stm.hour), &(stm.minute),
- &(stm.second));
- }
-
- return stm;
-
-}
-
-void ical_yyerror(char* s)
-{
- /*fprintf(stderr,"Parse error \'%s\'\n", s);*/
-}
-
diff --git a/libical/src/libical/pvl.c b/libical/src/libical/pvl.c
deleted file mode 100644
index 2a733e8aa9..0000000000
--- a/libical/src/libical/pvl.c
+++ /dev/null
@@ -1,761 +0,0 @@
-/*======================================================================
- FILE: pvl.c
- CREATOR: eric November, 1995
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pvl.h"
-#include <errno.h>
-#include <assert.h>
-#include <stdlib.h>
-
-
-
-/*
- struct pvl_list_t
-
- The list structure. This is the hanlde for the entire list
-
- This type is also private. Use pvl_list instead
-
- */
-
-typedef struct pvl_list_t
-{
- int MAGIC; /* Magic Identifier */
- struct pvl_elem_t *head; /* Head of list */
- struct pvl_elem_t *tail; /* Tail of list */
- int count; /* Number of items in the list */
- struct pvl_elem_t *p; /* Pointer used for iterators */
-} pvl_list_t;
-
-
-
-
-/* This global is incremented for each call to pvl_new_element(); it gives each
- * list a unique identifer */
-
-int pvl_elem_count = 0;
-int pvl_list_count = 0;
-
-
-/*----------------------------------------------------------------------
- Function: pvl_list pvl_newlist()
-
- Purpose:
-
- Creates a new list, clears the pointers and assigns a magic number
-
- Returns:
-
- Pointer to the new list
- 0 if there is no available memory.
- *----------------------------------------------------------------------*/
-
-pvl_list
-pvl_newlist()
-{
- struct pvl_list_t *L;
-
- if ( ( L = (struct pvl_list_t*)malloc(sizeof(struct pvl_list_t))) == 0)
- {
- errno = ENOMEM;
- return 0;
- }
-
- L->MAGIC = pvl_list_count;
- pvl_list_count++;
- L->head = 0;
- L->tail = 0;
- L->count = 0;
- L->p = 0;
-
- return L;
-}
-
-void
-pvl_free(pvl_list l)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
-
- pvl_clear(l);
-
- free(L);
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_new_element(void *d, struct pvl_elem_t *next,struct pvl_elem_t *prior)
-
- Purpose:
- Creates a new list element, assigns a magic number, and assigns
- the next and previous pointers.
-
- Passing in the next and previous points may seem odd, but it allos the user
- to set them while keeping the internal data hidden. In nearly all cases,
- the user is the pvl library itself.
-
- Parameters:
-
- d The data item to be stored in the list
- next Pointer value to assign to the member "next"
- prior Pointer value to assign to the member "prior"
-
- Returns:
-
- A pointer to the new element.
- 0 if there is no memory available.
-
- *----------------------------------------------------------------------*/
-
-pvl_elem
-pvl_new_element(void *d, pvl_elem next,pvl_elem prior)
-{
- struct pvl_elem_t *E;
-
- if ( ( E = (struct pvl_elem_t*)malloc(sizeof(struct pvl_elem_t))) == 0)
- {
- errno = ENOMEM;
- return 0;
- }
-
- E->MAGIC = pvl_elem_count++;
- E->d = d;
- E->next = next;
- E->prior = prior;
-
- return (pvl_elem)E;
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_unshift(pvl_list l,void *d)
-
- Purpose:
-
- Add a new element to the from of the list
-
- Parameters:
-
- l The list to add the item to
- d Pointer to the item to add
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void
-pvl_unshift(pvl_list l,void *d)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
- struct pvl_elem_t *E = pvl_new_element(d,L->head,0);
-
- if (E->next != 0)
- {
- /* Link the head node to it */
- E->next->prior = E;
- }
-
- /* move the head */
- L->head = E;
-
- /* maybe move the tail */
-
- if (L->tail == 0)
- {
- L->tail = E;
- }
-
- L->count++;
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_shift(pvl_list l)
-
- Purpose:
-
- Remove an element from the front of the list
-
- Parameters:
-
- l The list to operate on
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void*
-pvl_shift(pvl_list l)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
-
- if (L->head == 0)
- {
- return 0;
- }
-
- return pvl_remove(l,(void*)L->head);
-
-}
-
-/*----------------------------------------------------------------------
- Function: void pvl_push(pvl_list l,void *d)
-
- Purpose:
-
- Add a new item to the tail of the list
-
- Paramters:
-
- l The list to operate on
- d Pointer to the item to add
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void
-pvl_push(pvl_list l,void *d)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
- struct pvl_elem_t *E = pvl_new_element(d,0,L->tail);
-
- /* These are done in pvl_new_element
- E->next = 0;
- E->prior = L->tail;
- */
-
- if (L->tail != 0)
- {
- L->tail->next = E;
- }
-
- if (L->head == 0)
- {
- L->head = E;
- }
-
- L->tail = E;
-
- L->count++;
-
-}
-
-/*----------------------------------------------------------------------
- Function: void* pvl_pop(pvl_list l)
-
- Purpose:
-
- Remove an element from the tail of the list
-
- Paramters:
-
- l The list to operate on
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void*
-pvl_pop(pvl_list l)
-{
-
- struct pvl_list_t *L = (struct pvl_list_t *)l;
-
- if ( L->tail == 0)
- {
- return 0;
- }
-
- return pvl_remove(l,(void*) L->tail);;
-
-}
-
-
-/*----------------------------------------------------------------------
- Function: void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d)
-
- Purpose:
-
- Add a new item to a list that is ordered by a comparison function.
- This routine assumes that the list is properly ordered.
-
- l The list to operate on
- f Pointer to a comparison function
- d Pointer to data to pass to the comparison function
-
- Returns:
-
- void
-
- *----------------------------------------------------------------------*/
-
-void
-pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
-
- struct pvl_elem_t *P;
-
- L->count++;
-
- /* Empty list, add to head */
-
- if(L->head == 0)
- {
- pvl_unshift(l,d);
- return;
- }
-
- /* smaller than head, add to head */
-
- if ( ((*f)(d,L->head->d)) <= 0)
- {
- pvl_unshift(l,d);
- return;
- }
-
- /* larger than tail, add to tail */
- if ( (*f)(d,L->tail->d) >= 0)
- {
- pvl_push(l,d);
- return;
- }
-
-
- /* Search for the first element that is smaller, and add before it */
-
- for (P=L->head; P != 0; P = P->next)
- {
- if ( (*f)(P->d,d) >= 0)
- {
- pvl_insert_before(l,P,d);
- return;
- }
- }
-
- /* badness, choke */
-
- assert(0);
-
-}
-
-/*----------------------------------------------------------------------
- Function: void pvl_insert_after(pvl_list l,pvl_elem p,void *d)
-
- Purpose:
-
- Add a new item after the referenced element.
-
- Parameters:
-
- l The list to operate on
- p The list element to add the item after
- d Pointer to the item to add.
-
- Returns:
-
- void
-
- *----------------------------------------------------------------------*/
-
-void
-pvl_insert_after(pvl_list l,pvl_elem p,void *d)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
- struct pvl_elem_t *P = (struct pvl_elem_t *)p;
- struct pvl_elem_t *E = 0;
-
- L->count++;
-
- if (P == 0)
- {
- pvl_unshift(l,d);
- return;
- }
-
- if ( P == L->tail)
- {
- E = pvl_new_element(d,0,P);
- L->tail = E;
- E->prior->next = E;
- }
- else
- {
- E = pvl_new_element(d,P->next,P);
- E->next->prior = E;
- E->prior->next = E;
- }
-}
-
-/*----------------------------------------------------------------------
- Function: void pvl_insert_before(pvl_list l,pvl_elem p,void *d)
-
- Purpose:
-
- Add an item after a referenced item
-
- Parameters:
-
- l The list to operate on
- p The list element to add the item before
- d Pointer to the data to be added.
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void
-pvl_insert_before(pvl_list l,pvl_elem p,void *d)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
- struct pvl_elem_t *P = (struct pvl_elem_t *)p;
- struct pvl_elem_t *E = 0;
-
- L->count++;
-
- if (P == 0)
- {
- pvl_unshift(l,d);
- return;
- }
-
- if ( P == L->head)
- {
- E = pvl_new_element(d,P,0);
- E->next->prior = E;
- L->head = E;
- }
- else
- {
- E = pvl_new_element(d,P,P->prior);
- E->prior->next = E;
- E->next->prior = E;
- }
-}
-
-/*----------------------------------------------------------------------
- Function: void pvl_remove(pvl_list l,pvl_elem e)
-
- Purpose:
-
- Remove the referenced item from the list
-
- This routine will free the element, but not the data item that the
- element contains.
-
- Parameters:
-
- l The list to operate on
- e The element to remove.
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void*
-pvl_remove(pvl_list l,pvl_elem e)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
- struct pvl_elem_t *E = (struct pvl_elem_t *)e;
- void* data;
-
- if (E == L->head)
- {
- if (E->next != 0)
- {
- E->next->prior = 0;
- L->head = E->next;
- } else {
- /* E Also points to tail -> only one element in list */
- L->tail = 0;
- L->head = 0;
- }
- }
- else if (E == L->tail)
- {
- if (E->prior != 0)
- {
- E->prior->next = 0;
- L->tail = E->prior;
- } else {
- /* E points to the head, so it was the last element */
- /* This case should be taken care of in the previous clause */
- L->head = 0;
- L->tail = 0;
- }
- }
- else
- {
- E->prior->next = E->next;
- E->next->prior = E->prior;
- }
-
-
- L->count--;
-
- data = E->d;
-
- E->prior = 0;
- E->next = 0;
- E->d = 0;
-
- free(E);
-
- return data;
-
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v)
-
- Purpose:
-
- Return a pointer to data that satisfies a function
-
- This routine will interate through the entire list and call the
- find function for each item. It will break and return a pointer to the
- data that causes the find function to return 1.
-
- Parameters:
-
- l The list to operate on
- f Pointer to the find function
- v Pointer to constant data to pass into the function
-
- Returns:
-
- Pointer to the element that the find function found.
-
- *----------------------------------------------------------------------*/
-
-pvl_elem
-pvl_find(pvl_list l,pvl_findf f,void* v)
-{
- pvl_elem e;
-
- for (e=pvl_head(l); e!= 0; e = pvl_next(e))
- {
- if ( (*f)(((struct pvl_elem_t *)e)->d,v) == 1)
- {
- /* Save this elem for a call to find_next */
- ((struct pvl_list_t *)l)->p = e;
- return e;
- }
- }
-
- return 0;
-
-}
-/*----------------------------------------------------------------------
- Function: void* pvl_find_next(pvl_list l,pvl_findf f,void* v)
-
- Purpose:
-
- Like pvl_find(), but continues the search where the last find() or
- find_next() left off
-
- Parameters:
-
- l The list to operate on
- f Pointer to the find function
- v Pointer to constant data to pass into the function
-
- Returns:
-
- Pointer to the element that the find function found.
-
- *----------------------------------------------------------------------*/
-
-pvl_elem
-pvl_find_next(pvl_list l,pvl_findf f,void* v)
-{
-
- pvl_elem e;
-
- for (e=pvl_head(l); e!= 0; e = pvl_next(e))
- {
- if ( (*f)(((struct pvl_elem_t *)e)->d,v) == 1)
- {
- /* Save this elem for a call to find_next */
- ((struct pvl_list_t *)l)->p = e;
- return e;
- }
- }
-
- return 0;
-
-}
-
-/*----------------------------------------------------------------------
- Function: void pvl_clear(pvl_list l)
-
- Purpose:
-
- Remove the all the elements in the list. The does not free the data items
- the elements hold.
-
-
- Returns:
- *----------------------------------------------------------------------*/
-
-void
-pvl_clear(pvl_list l)
-{
- pvl_elem e = pvl_head(l);
- pvl_elem next;
-
- if (e == 0) {
- return;
- }
-
- while(e != 0)
- {
- next = pvl_next(e);
- pvl_remove(l,e);
- e = next;
- }
-}
-
-/*----------------------------------------------------------------------
- Function: int pvl_count(pvl_list l)
-
- Purpose:
-
- Returns the number of items in the list.
-
- Returns:
- *----------------------------------------------------------------------*/
-
-int
-pvl_count(pvl_list l)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
-
- return L->count;
-}
-
-
-/*----------------------------------------------------------------------
- Function: pvl_elem pvl_next(pvl_elem e)
-
- Purpose:
- Returns a pointer to the given element
-
- Returns:
- *----------------------------------------------------------------------*/
-
-pvl_elem
-pvl_next(pvl_elem e)
-{
- struct pvl_elem_t *E = (struct pvl_elem_t *)e;
-
- if (E == 0){
- return 0;
- }
-
- return (pvl_elem)E->next;
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_elem pvl_prior(pvl_elem e)
-
- Purpose:
-
- Returns a pointer to the element previous to the element given.
-
- Returns:
- *----------------------------------------------------------------------*/
-
-pvl_elem
-pvl_prior(pvl_elem e)
-{
- struct pvl_elem_t *E = (struct pvl_elem_t *)e;
-
- return (pvl_elem)E->prior;
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_elem pvl_head(pvl_list l )
-
- Purpose:
-
- Returns a pointer to the first item in the list.
-
- Returns:
- *----------------------------------------------------------------------*/
-pvl_elem
-pvl_head(pvl_list l )
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
-
- return (pvl_elem)L->head;
-}
-
-/*----------------------------------------------------------------------
- Function: pvl_elem pvl_tail(pvl_list l)
-
- Purpose:
-
- Returns a pointer to the last item in the list.
-
- Returns:
- *----------------------------------------------------------------------*/
-pvl_elem
-pvl_tail(pvl_list l)
-{
- struct pvl_list_t *L = (struct pvl_list_t *)l;
- return (pvl_elem)L->tail;
-}
-
-/*----------------------------------------------------------------------
- Function:
-
-
- Purpose:
-
-
- Returns:
- *----------------------------------------------------------------------*/
-
-#ifndef PVL_USE_MACROS
-void*
-pvl_data(pvl_elem e)
-{
- struct pvl_elem_t *E = (struct pvl_elem_t *)e;
-
- if ( e == 0){
- return 0;
- }
-
- return E->d;
-}
-#endif
-
-/*----------------------------------------------------------------------
- Function: void pvl_apply(pvl_list l,pvl_applyf f, void *v)
-
- Purpose:
-
- Call a function for every item in the list.
-
- Paramters:
-
- l The list to operate on
- f Pointer to the function to call
- v Data to pass to the function on every iteration
-
- Returns:
-
- void
- *----------------------------------------------------------------------*/
-
-void
-pvl_apply(pvl_list l,pvl_applyf f, void *v)
-{
- pvl_elem e;
-
- for (e=pvl_head(l); e!= 0; e = pvl_next(e))
- {
- (*f)(((struct pvl_elem_t *)e)->d,v);
- }
-
-}
diff --git a/libical/src/libical/pvl.h b/libical/src/libical/pvl.h
deleted file mode 100644
index 14a15a15eb..0000000000
--- a/libical/src/libical/pvl.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*======================================================================
- FILE: pvl.h
- CREATOR: eric November, 1995
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-======================================================================*/
-
-
-#ifndef __PVL_H__
-#define __PVL_H__
-
-typedef void* pvl_list;
-typedef void* pvl_elem;
-
-/*
- struct pvl_elem_t
-
- This type is private. Always use pvl_elem instead. The struct would
- not even appear in this header except to make code in the USE_MACROS
- blocks work
-
- */
-typedef struct pvl_elem_t
-{
- int MAGIC; /* Magic Identifier */
- void *d; /* Pointer to data user is storing */
- struct pvl_elem_t *next; /* Next element */
- struct pvl_elem_t *prior; /* prior element */
-} pvl_elem_t;
-
-
-
-/* This global is incremented for each call to pvl_new_element(); it gives each
- * list a unique identifer */
-
-extern int pvl_elem_count;
-extern int pvl_list_count;
-
-/* Create new lists or elements */
-pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior);
-pvl_list pvl_newlist(void);
-void pvl_free(pvl_list);
-
-/* Add, remove, or get the head of the list */
-void pvl_unshift(pvl_list l,void *d);
-void* pvl_shift(pvl_list l);
-pvl_elem pvl_head(pvl_list);
-
-/* Add, remove or get the tail of the list */
-void pvl_push(pvl_list l,void *d);
-void* pvl_pop(pvl_list l);
-pvl_elem pvl_tail(pvl_list);
-
-/* Insert elements in random places */
-typedef int (*pvl_comparef)(void* a, void* b); /* a, b are of the data type*/
-void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d);
-void pvl_insert_after(pvl_list l,pvl_elem e,void *d);
-void pvl_insert_before(pvl_list l,pvl_elem e,void *d);
-
-/* Remove an element, or clear the entire list */
-void* pvl_remove(pvl_list,pvl_elem); /* Remove element, return data */
-void pvl_clear(pvl_list); /* Remove all elements, de-allocate all data */
-
-int pvl_count(pvl_list);
-
-/* Navagate the list */
-pvl_elem pvl_next(pvl_elem e);
-pvl_elem pvl_prior(pvl_elem e);
-
-/* get the data in the list */
-#ifndef PVL_USE_MACROS
-void* pvl_data(pvl_elem);
-#else
-#define pvl_data(x) x==0 ? 0 : ((struct pvl_elem_t *)x)->d;
-#endif
-
-
-/* Find an element for which a function returns true */
-typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/
-pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v);
-pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v);
-
-/* Pass each element in the list to a function */
-typedef void (*pvl_applyf)(void* a, void* b); /*a is list elem, b is other data*/
-void pvl_apply(pvl_list l,pvl_applyf f, void *v);
-
-
-#endif /* __PVL_H__ */
-
-
-
-
-
diff --git a/libical/src/libical/sspm.c b/libical/src/libical/sspm.c
deleted file mode 100644
index 311747c8f5..0000000000
--- a/libical/src/libical/sspm.c
+++ /dev/null
@@ -1,1613 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: sspm.c Parse Mime
- CREATOR: eric 25 June 2000
-
- $Id$
- $Locker$
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Initial Developer of the Original Code is Eric Busboom
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
- ======================================================================*/
-
-#include <stdio.h>
-#include <string.h>
-#include "sspm.h"
-#include <assert.h>
-#include <ctype.h> /* for tolower */
-#include <stdlib.h> /* for malloc, free */
-#include <string.h> /* for strcasecmp */
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-#define TMP_BUF_SIZE 1024
-
-
-enum mime_state {
- UNKNOWN_STATE,
- IN_HEADER,
- END_OF_HEADER,
- IN_BODY,
- OPENING_PART,
- END_OF_PART,
- TERMINAL_END_OF_PART,
- END_OF_INPUT
-};
-
-struct mime_impl{
- struct sspm_part *parts;
- size_t max_parts;
- int part_no;
- int level;
- struct sspm_action_map *actions;
- char* (*get_string)(char *s, size_t size, void* data);
- void* get_string_data;
- char temp[TMP_BUF_SIZE];
- enum mime_state state;
-};
-
-void sspm_free_header(struct sspm_header *header);
-void* sspm_make_multipart_part(struct mime_impl *impl,struct sspm_header *header);
-void sspm_read_header(struct mime_impl *impl,struct sspm_header *header);
-
-char* sspm_strdup(char* str){
-
- char* s;
-
- s = strdup(str);
-
- return s;
-}
-
-
-struct major_content_type_map
-{
- enum sspm_major_type type;
- char* str;
-
-} major_content_type_map[] =
-{
- {SSPM_MULTIPART_MAJOR_TYPE,"multipart" },
- {SSPM_TEXT_MAJOR_TYPE,"text" },
- {SSPM_TEXT_MAJOR_TYPE,"text" },
- {SSPM_IMAGE_MAJOR_TYPE,"image" },
- {SSPM_AUDIO_MAJOR_TYPE,"audio" },
- {SSPM_VIDEO_MAJOR_TYPE,"video" },
- {SSPM_APPLICATION_MAJOR_TYPE,"application" },
- {SSPM_MULTIPART_MAJOR_TYPE,"multipart" },
- {SSPM_MESSAGE_MAJOR_TYPE,"message" },
- {SSPM_UNKNOWN_MAJOR_TYPE,"" },
-};
-
-struct minor_content_type_map
-{
- enum sspm_minor_type type;
- char* str;
-
-} minor_content_type_map[] =
-{
- {SSPM_ANY_MINOR_TYPE,"*" },
- {SSPM_PLAIN_MINOR_TYPE,"plain" },
- {SSPM_RFC822_MINOR_TYPE,"rfc822" },
- {SSPM_DIGEST_MINOR_TYPE,"digest" },
- {SSPM_CALENDAR_MINOR_TYPE,"calendar" },
- {SSPM_MIXED_MINOR_TYPE,"mixed" },
- {SSPM_RELATED_MINOR_TYPE,"related" },
- {SSPM_ALTERNATIVE_MINOR_TYPE,"alternative" },
- {SSPM_PARALLEL_MINOR_TYPE, "parallel" },
- {SSPM_UNKNOWN_MINOR_TYPE,"" }
-};
-
-
-
-struct encoding_map {
- enum sspm_encoding encoding;
- char* str;
-} sspm_encoding_map[] =
-{
- {SSPM_NO_ENCODING,""},
- {SSPM_QUOTED_PRINTABLE_ENCODING,"quoted-printable"},
- {SSPM_8BIT_ENCODING,"8bit"},
- {SSPM_7BIT_ENCODING,"7bit"},
- {SSPM_BINARY_ENCODING,"binary"},
- {SSPM_BASE64_ENCODING,"base64"},
- {SSPM_UNKNOWN_ENCODING,""}
-
-};
-
-
-char* sspm_get_parameter(char* line, char* parameter)
-{
- char *p,*s,*q;
- static char name[1024];
-
- /* Find where the parameter name is in the line */
- p = strstr(line,parameter);
-
- if( p == 0){
- return 0;
- }
-
- /* skip over the parameter name, the '=' and any blank spaces */
-
- p+=strlen(parameter);
-
- while(*p==' ' || *p == '='){
- p++;
- }
-
- /*now find the next semicolon*/
-
- s = strchr(p,';');
-
- /* Strip of leading quote */
- q = strchr(p,'\"');
-
- if(q !=0){
- p = q+1;
- }
-
- if(s != 0){
- strncpy(name,p,(size_t)s-(size_t)p);
- } else {
- strcpy(name,p);
- }
-
- /* Strip off trailing quote, if it exists */
-
- q = strrchr(name,'\"');
-
- if (q != 0){
- *q='\0';
- }
-
- return name;
-}
-
-char* sspm_property_name(char* line)
-{
- static char name[1024];
- char *c = strchr(line,':');
-
- if(c != 0){
- strncpy(name,line,(size_t)c-(size_t)line);
- name[(size_t)c-(size_t)line] = '\0';
- return name;
- } else {
- return 0;
- }
-}
-
-char* sspm_value(char* line)
-{
- static char value[1024];
-
- char *c,*s, *p;
-
- /* Find the first colon and the next semicolon */
-
- c = strchr(line,':');
- s = strchr(c,';');
-
- /* Skip the colon */
- c++;
-
- if (s == 0){
- s = c+strlen(line);
- }
-
- for(p=value; c != s; c++){
- if(*c!=' ' && *c!='\n'){
- *(p++) = *c;
- }
- }
-
- *p='\0';
-
- return value;
-
-}
-
-char *mime_headers[] = {
- "Content-Type",
- "Content-Transfer-Encoding",
- "Content-Disposition",
- "Content-Id",
- "Mime-Version",
- 0
-};
-
-
-void* sspm_default_new_part()
-{
- return 0;
-}
-void sspm_default_add_line(void *part, struct sspm_header *header,
- char* line, size_t size)
-{
-}
-
-void* sspm_default_end_part(void* part)
-{
- return 0;
-}
-
-void sspm_default_free_part(void *part)
-{
-}
-
-
-
-struct sspm_action_map sspm_action_map[] =
-{
- {SSPM_UNKNOWN_MAJOR_TYPE,SSPM_UNKNOWN_MINOR_TYPE,sspm_default_new_part,sspm_default_add_line,sspm_default_end_part,sspm_default_free_part},
-};
-
-int sspm_is_mime_header(char *line)
-{
- char *name = sspm_property_name(line);
- int i;
-
- if(name == 0){
- return 0;
- }
-
- for(i = 0; mime_headers[i] != 0; i++){
- if(strcasecmp(name, mime_headers[i]) == 0)
- return 1;
- }
-
- return 0;
-}
-
-int sspm_is_mail_header(char* line)
-{
- char *name = sspm_property_name(line);
-
- if (name != 0){
- return 1;
- }
-
- return 0;
-
-}
-
-int sspm_is_blank(char* line)
-{
- char *p;
- char c =0;
-
- for(p=line; *p!=0; p++){
- if( ! (*p == ' '|| *p == '\t' || *p=='\n') ){
- c++;
- }
- }
-
- if (c==0){
- return 1;
- }
-
- return 0;
-
-}
-
-int sspm_is_continuation_line(char* line)
-{
- if (line[0] == ' '|| line[0] == '\t' ) {
- return 1;
- }
-
- return 0;
-}
-
-int sspm_is_mime_boundary(char *line)
-{
- if( line[0] == '-' && line[1] == '-') {
- return 1;
- }
-
- return 0;
-}
-
-int sspm_is_mime_terminating_boundary(char *line)
-{
-
-
- if (sspm_is_mime_boundary(line) &&
- strstr(line,"--\n")){
- return 1;
- }
-
- return 0;
-}
-
-enum line_type {
- EMPTY,
- BLANK,
- MIME_HEADER,
- MAIL_HEADER,
- HEADER_CONTINUATION,
- BOUNDARY,
- TERMINATING_BOUNDARY,
- UNKNOWN_TYPE
-};
-
-
-enum line_type get_line_type(char* line){
-
- if (line == 0){
- return EMPTY;
- } else if(sspm_is_blank(line)){
- return BLANK;
- } else if (sspm_is_mime_header(line)){
- return MIME_HEADER;
- } else if (sspm_is_mail_header(line)){
- return MAIL_HEADER;
- } else if (sspm_is_continuation_line(line)){
- return HEADER_CONTINUATION;
- } else if (sspm_is_mime_terminating_boundary(line)){
- return TERMINATING_BOUNDARY;
- } else if (sspm_is_mime_boundary(line)) {
- return BOUNDARY;
- } else {
- return UNKNOWN_TYPE;
- }
-
-
-}
-
-
-struct sspm_action_map get_action(struct mime_impl *impl,
- enum sspm_major_type major,
- enum sspm_minor_type minor)
-{
- int i;
-
- /* Read caller suppled action map */
-
- if (impl->actions != 0){
- for(i=0; impl->actions[i].major != SSPM_UNKNOWN_MAJOR_TYPE; i++){
- if((major == impl->actions[i].major &&
- minor == impl->actions[i].minor) ||
- (major == impl->actions[i].major &&
- minor == SSPM_ANY_MINOR_TYPE)){
- return impl->actions[i];
- }
- }
- }
-
- /* Else, read default action map */
-
- for(i=0; sspm_action_map[i].major != SSPM_UNKNOWN_MAJOR_TYPE; i++){
- if((major == sspm_action_map[i].major &&
- minor == sspm_action_map[i].minor) ||
- (major == sspm_action_map[i].major &&
- minor == SSPM_ANY_MINOR_TYPE)){
- break;
- }
- }
-
- return sspm_action_map[i];
-}
-
-
-char* sspm_lowercase(char* str)
-{
- char* p = 0;
- char* new = sspm_strdup(str);
-
- if(str ==0){
- return 0;
- }
-
- for(p = new; *p!=0; p++){
- *p = tolower(*p);
- }
-
- return new;
-}
-
-enum sspm_major_type sspm_find_major_content_type(char* type)
-{
- int i;
-
- char* ltype = sspm_lowercase(type);
-
- for (i=0; major_content_type_map[i].type != SSPM_UNKNOWN_MINOR_TYPE; i++){
- if(strncmp(ltype, major_content_type_map[i].str,
- strlen(major_content_type_map[i].str))==0){
- free(ltype);
- return major_content_type_map[i].type;
- }
- }
- free(ltype);
- return major_content_type_map[i].type; /* Should return SSPM_UNKNOWN_MINOR_TYPE */
-}
-
-enum sspm_minor_type sspm_find_minor_content_type(char* type)
-{
- int i;
- char* ltype = sspm_lowercase(type);
-
- char *p = strchr(ltype,'/');
-
- if (p==0){
- return SSPM_UNKNOWN_MINOR_TYPE;
- }
-
- p++; /* Skip the '/' */
-
- for (i=0; minor_content_type_map[i].type != SSPM_UNKNOWN_MINOR_TYPE; i++){
- if(strncmp(p, minor_content_type_map[i].str,
- strlen(minor_content_type_map[i].str))==0){
- free(ltype);
- return minor_content_type_map[i].type;
- }
- }
-
- free(ltype);
- return minor_content_type_map[i].type; /* Should return SSPM_UNKNOWN_MINOR_TYPE */
-}
-
-char* sspm_major_type_string(enum sspm_major_type type)
-{
- int i;
-
- for (i=0; major_content_type_map[i].type != SSPM_UNKNOWN_MINOR_TYPE;
- i++){
-
- if(type == major_content_type_map[i].type){
- return major_content_type_map[i].str;
- }
- }
-
- return major_content_type_map[i].str; /* Should return SSPM_UNKNOWN_MINOR_TYPE */
-}
-
-char* sspm_minor_type_string(enum sspm_minor_type type)
-{
- int i;
- for (i=0; minor_content_type_map[i].type != SSPM_UNKNOWN_MINOR_TYPE;
- i++){
- if(type == minor_content_type_map[i].type){
- return minor_content_type_map[i].str;
- }
- }
-
- return minor_content_type_map[i].str; /* Should return SSPM_UNKNOWN_MINOR_TYPE */
-}
-
-
-char* sspm_encoding_string(enum sspm_encoding type)
-{
- int i;
- for (i=0; sspm_encoding_map[i].encoding != SSPM_UNKNOWN_ENCODING;
- i++){
- if(type == sspm_encoding_map[i].encoding){
- return sspm_encoding_map[i].str;
- }
- }
-
- return sspm_encoding_map[i].str; /* Should return SSPM_UNKNOWN_MINOR_TYPE */
-}
-
-/* Interpret a header line and add its data to the header
- structure. */
-void sspm_build_header(struct sspm_header *header, char* line)
-{
- char *prop;
- char *val;
-
- val = sspm_strdup(sspm_value(line));
- prop = sspm_strdup(sspm_property_name(line));
-
- if(strcmp(prop,"Content-Type") == 0){
-
- /* Create a new mime_header, fill in content-type
- and possibly boundary */
-
- char* boundary= sspm_get_parameter(line,"boundary");
-
- header->def = 0;
- header->major = sspm_find_major_content_type(val);
- header->minor = sspm_find_minor_content_type(val);
-
- if(header->minor == SSPM_UNKNOWN_MINOR_TYPE){
- char *p = strchr(val,'/');
-
- if (p != 0){
- p++; /* Skip the '/' */
-
- header->minor_text = sspm_strdup(p);
- } else {
- /* Error, malformed content type */
- header->minor_text = sspm_strdup("unknown");
- }
- }
- if (boundary != 0){
- header->boundary = sspm_strdup(boundary);
- }
-
- } else if(strcmp(prop,"Content-Transfer-Encoding")==0){
- char* encoding = sspm_value(line);
- char* lencoding = sspm_lowercase(encoding);
-
- if(strcmp(lencoding,"base64")==0){
- header->encoding = SSPM_BASE64_ENCODING;
- } else if(strcmp(lencoding,"quoted-printable")==0){
- header->encoding = SSPM_QUOTED_PRINTABLE_ENCODING;
- } else if(strcmp(lencoding,"binary")==0){
- header->encoding = SSPM_BINARY_ENCODING;
- } else if(strcmp(lencoding,"7bit")==0){
- header->encoding = SSPM_7BIT_ENCODING;
- } else if(strcmp(lencoding,"8bit")==0){
- header->encoding = SSPM_8BIT_ENCODING;
- } else {
- header->encoding = SSPM_UNKNOWN_ENCODING;
- }
-
-
- free(lencoding);
-
- header->def = 0;
-
- } else if(strcmp(prop,"Content-Id")==0){
- char* cid = sspm_value(line);
- header->content_id = sspm_strdup(cid);
- header->def = 0;
-
- }
- free(val);
- free(prop);
-}
-
-char* sspm_get_next_line(struct mime_impl *impl)
-{
- char* s;
- s = impl->get_string(impl->temp,TMP_BUF_SIZE,impl->get_string_data);
-
- if(s == 0){
- impl->state = END_OF_INPUT;
- }
- return s;
-}
-
-
-void sspm_store_part(struct mime_impl *impl, struct sspm_header header,
- int level, void *part, size_t size)
-{
-
- impl->parts[impl->part_no].header = header;
- impl->parts[impl->part_no].level = level;
- impl->parts[impl->part_no].data = part;
- impl->parts[impl->part_no].data_size = size;
- impl->part_no++;
-}
-
-void sspm_set_error(struct sspm_header* header, enum sspm_error error,
- char* message)
-{
- header->error = error;
-
- if(header->error_text!=0){
- free(header->error_text);
- }
-
- header->def = 0;
-
- if(message != 0){
- header->error_text = sspm_strdup(message);
- } else {
- header->error_text = 0;
- }
-
-}
-
-void* sspm_make_part(struct mime_impl *impl,
- struct sspm_header *header,
- struct sspm_header *parent_header,
- void **end_part,
- size_t *size)
-{
-
- /* For a single part type, read to the boundary, if there is a
- boundary. Otherwise, read until the end of input. This routine
- assumes that the caller has read the header and has left the input
- at the first blank line */
-
- char *line;
- void *part;
- int end = 0;
-
- struct sspm_action_map action = get_action(
- impl,
- header->major,
- header->minor);
-
- *size = 0;
- part =action.new_part();
-
- impl->state = IN_BODY;
-
- while(end == 0 && (line = sspm_get_next_line(impl)) != 0){
-
- if(sspm_is_mime_boundary(line)){
-
- /* If there is a boundary, then this must be a multipart
- part, so there must be a parent_header. */
- if(parent_header == 0){
- char* boundary;
- end = 1;
- *end_part = 0;
-
- sspm_set_error(header,SSPM_UNEXPECTED_BOUNDARY_ERROR,line);
-
- /* Read until the paired terminating boundary */
- if((boundary = (char*)malloc(strlen(line)+5)) == 0){
- fprintf(stderr,"Out of memory");
- abort();
- }
- strcpy(boundary,line);
- strcat(boundary,"--");
- while((line = sspm_get_next_line(impl)) != 0){
- /*printf("Error: %s\n",line);*/
- if(strcmp(boundary,line)==0){
- break;
- }
- }
- free(boundary);
-
- break;
- }
-
- if(strncmp((line+2),parent_header->boundary,
- sizeof(parent_header->boundary)) == 0){
- *end_part = action.end_part(part);
-
- if(sspm_is_mime_boundary(line)){
- impl->state = END_OF_PART;
- } else if ( sspm_is_mime_terminating_boundary(line)){
- impl->state = TERMINAL_END_OF_PART;
- }
- end = 1;
- } else {
- /* Error, this is not the correct terminating boundary*/
-
- /* read and discard until we get the right boundary. */
- char* boundary;
- char msg[256];
-
- snprintf(msg,256,
- "Expected: %s--. Got: %s",
- parent_header->boundary,line);
-
- sspm_set_error(parent_header,
- SSPM_WRONG_BOUNDARY_ERROR,msg);
-
- /* Read until the paired terminating boundary */
- if((boundary = (char*)malloc(strlen(line)+5)) == 0){
- fprintf(stderr,"Out of memory");
- abort();
- }
- strcpy(boundary,line);
- strcat(boundary,"--");
- while((line = sspm_get_next_line(impl)) != 0){
- if(strcmp(boundary,line)==0){
- break;
- }
- }
- free(boundary);
-
- }
- } else {
- char* data=0;
- char* rtrn=0;
- *size = strlen(line);
-
- data = (char*)malloc(*size+2);
- assert(data != 0);
- if (header->encoding == SSPM_BASE64_ENCODING){
- rtrn = decode_base64(data,line,size);
- } else if(header->encoding == SSPM_QUOTED_PRINTABLE_ENCODING){
- rtrn = decode_quoted_printable(data,line,size);
- }
-
- if(rtrn == 0){
- strcpy(data,line);
- }
-
- /* add a end-of-string after the data, just in case binary
- data from decode64 gets passed to a tring handling
- routine in add_line */
- data[*size+1]='\0';
-
- action.add_line(part,header,data,*size);
-
- free(data);
- }
- }
-
- if (end == 0){
- /* End the part if the input is exhausted */
- *end_part = action.end_part(part);
- }
-
- return end_part;
-}
-
-
-void* sspm_make_multipart_subpart(struct mime_impl *impl,
- struct sspm_header *parent_header)
-{
- struct sspm_header header;
- char *line;
- void* part;
- size_t size;
-
- if(parent_header->boundary == 0){
- /* Error. Multipart headers must have a boundary*/
-
- sspm_set_error(parent_header,SSPM_NO_BOUNDARY_ERROR,0);
- /* read all of the reamining lines */
- while((line = sspm_get_next_line(impl)) != 0){
- }
-
- return 0;
- }
-
-
- /* Step 1: Read the opening boundary */
-
- if(get_line_type(impl->temp) != BOUNDARY){
- while((line=sspm_get_next_line(impl)) != 0 ){
- if(sspm_is_mime_boundary(line)){
-
- assert(parent_header != 0);
-
- /* Check if it is the right boundary */
- if(!sspm_is_mime_terminating_boundary(line) &&
- strncmp((line+2),parent_header->boundary,
- sizeof(parent_header->boundary))
- == 0){
- /* The +2 in strncmp skips over the leading "--" */
-
- break;
- } else {
- /* Got the wrong boundary, so read and discard
- until we get the right boundary. */
- char* boundary;
- char msg[256];
-
- snprintf(msg,256,
- "Expected: %s. Got: %s",
- parent_header->boundary,line);
-
- sspm_set_error(parent_header,
- SSPM_WRONG_BOUNDARY_ERROR,msg);
-
- /* Read until the paired terminating boundary */
- if((boundary = (char*)malloc(strlen(line)+5)) == 0){
- fprintf(stderr,"Out of memory");
- abort();
- }
- strcpy(boundary,line);
- strcat(boundary,"--");
- while((line = sspm_get_next_line(impl)) != 0){
- if(strcmp(boundary,line)==0){
- break;
- }
- }
- free(boundary);
-
- return 0;
- }
- }
- }
- }
-
- /* Step 2: Get the part header */
- sspm_read_header(impl,&header);
-
- /* If the header is still listed as default, there was probably an
- error */
- if(header.def == 1 && header.error != SSPM_NO_ERROR){
- sspm_set_error(&header,SSPM_NO_HEADER_ERROR,0);
- return 0;
- }
-
- if(header.error!= SSPM_NO_ERROR){
- sspm_store_part(impl,header,impl->level,0,0);
- return 0;
- }
-
- /* Step 3: read the body */
-
- if(header.major == SSPM_MULTIPART_MAJOR_TYPE){
- struct sspm_header *child_header;
- child_header = &(impl->parts[impl->part_no].header);
-
- /* Store the multipart part */
- sspm_store_part(impl,header,impl->level,0,0);
-
- /* now get all of the sub-parts */
- part = sspm_make_multipart_part(impl,child_header);
-
- if(get_line_type(impl->temp) != TERMINATING_BOUNDARY){
-
- sspm_set_error(child_header,SSPM_NO_BOUNDARY_ERROR,impl->temp);
- return 0;
- }
-
- sspm_get_next_line(impl); /* Step past the terminating boundary */
-
- } else {
- sspm_make_part(impl, &header,parent_header,&part,&size);
-
- memset(&(impl->parts[impl->part_no]), 0, sizeof(struct sspm_part));
-
- sspm_store_part(impl,header,impl->level,part,size);
-
- }
-
- return part;
-}
-
-void* sspm_make_multipart_part(struct mime_impl *impl,struct sspm_header *header)
-{
- void *part=0;
-
- /* Now descend a level into each of the children of this part */
- impl->level++;
-
- /* Now we are working on the CHILD */
- memset(&(impl->parts[impl->part_no]), 0, sizeof(struct sspm_part));
-
- do{
- part = sspm_make_multipart_subpart(impl,header);
-
- if (part==0){
- /* Clean up the part in progress */
- impl->parts[impl->part_no].header.major
- = SSPM_NO_MAJOR_TYPE;
- impl->parts[impl->part_no].header.minor
- = SSPM_NO_MINOR_TYPE;
-
- }
-
-
- } while (get_line_type(impl->temp) != TERMINATING_BOUNDARY &&
- impl->state != END_OF_INPUT);
-
- impl->level--;
-
- return 0;
-}
-
-
-void sspm_read_header(struct mime_impl *impl,struct sspm_header *header)
-{
-#define BUF_SIZE 1024
-#define MAX_HEADER_LINES 25
-
- char *buf;
- char header_lines[MAX_HEADER_LINES][BUF_SIZE]; /* HACK, hard limits */
- int current_line = -1;
- int end = 0;
-
- memset(header_lines,0,sizeof(header_lines));
- memset(header,0,sizeof(struct sspm_header));
-
- /* Set up default header */
- header->def = 1;
- header->major = SSPM_TEXT_MAJOR_TYPE;
- header->minor = SSPM_PLAIN_MINOR_TYPE;
- header->error = SSPM_NO_ERROR;
- header->error_text = 0;
-
- /* Read all of the lines into memory */
- while(end==0&& (buf=sspm_get_next_line(impl)) != 0){
-
- enum line_type line_type = get_line_type(buf);
-
- switch(line_type){
- case BLANK: {
- end = 1;
- impl->state = END_OF_HEADER;
- break;
- }
-
- case MAIL_HEADER:
- case MIME_HEADER: {
- impl->state = IN_HEADER;
- current_line++;
-
- assert(strlen(buf) < BUF_SIZE);
-
- strcpy(header_lines[current_line],buf);
-
- break;
- }
-
- case HEADER_CONTINUATION: {
- char* last_line, *end;
- char *buf_start;
-
- if(current_line < 0){
- /* This is not really a continuation line, since
- we have not see any header line yet */
- sspm_set_error(header,SSPM_MALFORMED_HEADER_ERROR,buf);
- return;
- }
-
- last_line = header_lines[current_line];
- end = (char*) ( (size_t)strlen(last_line)+
- (size_t)last_line);
-
- impl->state = IN_HEADER;
-
-
- /* skip over the spaces in buf start, and remove the new
- line at the end of the lat line */
- if (last_line[strlen(last_line)-1] == '\n'){
- last_line[strlen(last_line)-1] = '\0';
- }
- buf_start = buf;
- while(*buf_start == ' ' ||*buf_start == '\t' ){
- buf_start++;
- }
-
- assert( strlen(buf_start) + strlen(last_line) < BUF_SIZE);
-
- strcat(last_line,buf_start);
-
- break;
- }
-
- default: {
- sspm_set_error(header,SSPM_MALFORMED_HEADER_ERROR,buf);
- return;
- }
- }
- }
-
-
- for(current_line = 0;
- current_line < MAX_HEADER_LINES && header_lines[current_line][0] != 0;
- current_line++){
-
- sspm_build_header(header,header_lines[current_line]);
- }
-
-
-}
-
-/* Root routine for parsing mime entries*/
-int sspm_parse_mime(struct sspm_part *parts,
- size_t max_parts,
- struct sspm_action_map *actions,
- char* (*get_string)(char *s, size_t size, void* data),
- void *get_string_data,
- struct sspm_header *first_header
- )
-{
- struct mime_impl impl;
- struct sspm_header header;
- void *part;
- int i;
-
- /* Initialize all of the data */
- memset(&impl,0,sizeof(struct mime_impl));
- memset(&header,0,sizeof(struct sspm_header));
-
- for(i = 0; i<(int)max_parts; i++){
- parts[i].header.major = SSPM_NO_MAJOR_TYPE;
- parts[i].header.minor = SSPM_NO_MINOR_TYPE;
- }
-
- impl.parts = parts;
- impl.max_parts = max_parts;
- impl.part_no = 0;
- impl.actions = actions;
- impl.get_string = get_string;
- impl.get_string_data = get_string_data;
-
- /* Read the header of the message. This will be the email header,
- unless first_header is specified. But ( HACK) that var is not
- currently being used */
- sspm_read_header(&impl,&header);
-
- if(header.major == SSPM_MULTIPART_MAJOR_TYPE){
- struct sspm_header *child_header;
- child_header = &(impl.parts[impl.part_no].header);
-
- sspm_store_part(&impl,header,impl.level,0,0);
-
- part = sspm_make_multipart_part(&impl,child_header);
-
- } else {
- void *part;
- size_t size;
- sspm_make_part(&impl, &header, 0,&part,&size);
-
- memset(&(impl.parts[impl.part_no]), 0, sizeof(struct sspm_part));
-
- sspm_store_part(&impl,header,impl.level,part,size);
- }
-
- return 0;
-}
-
-void sspm_free_parts(struct sspm_part *parts, size_t max_parts)
-{
- int i;
-
- for(i = 0; i<(int)max_parts && parts[i].header.major != SSPM_NO_MAJOR_TYPE;
- i++){
- sspm_free_header(&(parts[i].header));
- }
-}
-
-void sspm_free_header(struct sspm_header *header)
-{
- if(header->boundary!=0){
- free(header->boundary);
- }
- if(header->minor_text!=0){
- free(header->minor_text);
- }
- if(header->charset!=0){
- free(header->charset);
- }
- if(header->filename!=0){
- free(header->filename);
- }
- if(header->content_id!=0){
- free(header->content_id);
- }
- if(header->error_text!=0){
- free(header->error_text);
- }
-}
-
-/***********************************************************************
-The remaining code is beased on code from the mimelite distribution,
-which has the following notice:
-
-| Authorship:
-| Copyright (c) 1994 Gisle Hannemyr.
-| Permission is granted to hack, make and distribute copies of this
-| program as long as this copyright notice is not removed.
-| Flames, bug reports, comments and improvements to:
-| snail: Gisle Hannemyr, Brageveien 3A, 0452 Oslo, Norway
-| email: Inet: gisle@oslonett.no
-
-The code is heavily modified by Eric Busboom.
-
-***********************************************************************/
-
-char *decode_quoted_printable(char *dest,
- char *src,
- size_t *size)
-{
- int cc;
- size_t i=0;
-
- while (*src != 0 && i < *size) {
- if (*src == '=') {
-
- src++;
- if (!*src) {
- break;
- }
-
- /* remove soft line breaks*/
- if ((*src == '\n') || (*src == '\r')){
- src++;
- if ((*src == '\n') || (*src == '\r')){
- src++;
- }
- continue;
- }
-
- cc = isdigit(*src) ? (*src - '0') : (*src - 55);
- cc *= 0x10;
- src++;
- if (!*src) {
- break;
- }
- cc += isdigit(*src) ? (*src - '0') : (*src - 55);
-
- *dest = cc;
-
- } else {
- *dest = *src;
- }
-
- dest++;
- src++;
- i++;
- }
-
- *dest = '\0';
-
- *size = i;
- return(dest);
-}
-
-char *decode_base64(char *dest,
- char *src,
- size_t *size)
-{
- int cc;
- char buf[4] = {0,0,0,0};
- int p = 0;
- int valid_data = 0;
- size_t size_out=0;
-
- while (*src && p<(int)*size && (cc!= -1)) {
-
- /* convert a character into the Base64 alphabet */
- cc = *src++;
-
- if ((cc >= 'A') && (cc <= 'Z')) cc = cc - 'A';
- else if ((cc >= 'a') && (cc <= 'z')) cc = cc - 'a' + 26;
- else if ((cc >= '0') && (cc <= '9')) cc = cc - '0' + 52;
- else if (cc == '/') cc = 63;
- else if (cc == '+') cc = 62;
- else cc = -1;
-
- assert(cc<64);
-
- /* If we've reached the end, fill the remaining slots in
- the bucket and do a final conversion */
- if(cc== -1){
- if(valid_data == 0){
- return 0;
- }
-
- while(p%4!=3){
- p++;
- buf[p%4] = 0;
- }
- } else {
- buf[p%4] = cc;
- size_out++;
- valid_data = 1;
- }
-
-
- /* When we have 4 base64 letters, convert them into three
- bytes */
- if (p%4 == 3) {
- *dest++ =(buf[0]<< 2)|((buf[1] & 0x30) >> 4);
- *dest++ =((buf[1] & 0x0F) << 4)|((buf[2] & 0x3C) >> 2);
- *dest++ =((buf[2] & 0x03) << 6)|(buf[3] & 0x3F);
-
- memset(buf,0,4);
- }
-
- p++;
-
- }
- /* Calculate the size of the converted data*/
- *size = ((int)(size_out/4))*3;
- if(size_out%4 == 2) *size+=1;
- if(size_out%4 == 3) *size+=2;
-
- return(dest);
-}
-
-
-/***********************************************************************
-
- Routines to output MIME
-
-**********************************************************************/
-
-
-struct sspm_buffer {
- char* buffer;
- char* pos;
- size_t buf_size;
- int line_pos;
-};
-
-void sspm_append_string(struct sspm_buffer* buf, char* string);
-void sspm_write_part(struct sspm_buffer *buf,struct sspm_part *part, int *part_num);
-
-void sspm_append_hex(struct sspm_buffer* buf, char ch)
-{
- char tmp[3];
-
- sprintf(tmp,"=%02X",ch);
-
- sspm_append_string(buf,tmp);
-}
-
-/* a copy of icalmemory_append_char */
-void sspm_append_char(struct sspm_buffer* buf, char ch)
-{
- char *new_buf;
- char *new_pos;
-
- size_t data_length, final_length;
-
- data_length = (size_t)buf->pos - (size_t)buf->buffer;
-
- final_length = data_length + 2;
-
- if ( final_length > (size_t) buf->buf_size ) {
-
- buf->buf_size = (buf->buf_size) * 2 + final_length +1;
-
- new_buf = realloc(buf->buffer,buf->buf_size);
-
- new_pos = (void*)((size_t)new_buf + data_length);
-
- buf->pos = new_pos;
- buf->buffer = new_buf;
- }
-
- *(buf->pos) = ch;
- buf->pos += 1;
- *(buf->pos) = 0;
-}
-/* A copy of icalmemory_append_string */
-void sspm_append_string(struct sspm_buffer* buf, char* string)
-{
- char *new_buf;
- char *new_pos;
-
- size_t data_length, final_length, string_length;
-
- string_length = strlen(string);
- data_length = (size_t)buf->pos - (size_t)buf->buffer;
- final_length = data_length + string_length;
-
- if ( final_length >= (size_t) buf->buf_size) {
-
-
- buf->buf_size = (buf->buf_size) * 2 + final_length;
-
- new_buf = realloc(buf->buffer,buf->buf_size);
-
- new_pos = (void*)((size_t)new_buf + data_length);
-
- buf->pos = new_pos;
- buf->buffer = new_buf;
- }
-
- strcpy(buf->pos, string);
-
- buf->pos += string_length;
-}
-
-
-
-static int sspm_is_printable(char c)
-{
- return (c >= 33) && (c <= 126) && (c != '=');
-
-}
-
-
-void sspm_encode_quoted_printable(struct sspm_buffer *buf, char* data)
-{
- char *p;
- int lpos = 0;
-
- for(p = data; *p != 0; p++){
-
- if(sspm_is_printable(*p)){
- /* plain characters can represent themselves */
- /* RFC2045 Rule #2 */
- sspm_append_char(buf,*p);
- lpos++;
- } else if ( *p == '\t' || *p == ' ' ) {
-
- /* For tabs and spaces, only encode if they appear at the
- end of the line */
- /* RFC2045 Rule #3 */
-
- char n = *(p+1);
-
- if( n == '\n' || n == '\r'){
- sspm_append_hex(buf,*p);
- lpos += 3;
- } else {
- sspm_append_char(buf,*p);
- lpos++;
- }
-
- } else if( *p == '\n' || *p == '\r'){
- sspm_append_char(buf,*p);
-
- lpos=0;
-
- } else {
- /* All others need to be encoded */
- sspm_append_hex(buf,*p);
- lpos+=3;
- }
-
-
- /* Add line breaks */
- if (lpos > 72){
- lpos = 0;
- sspm_append_string(buf,"=\n");
- }
- }
-}
-
-static char BaseTable[64] = {
- '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','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','0','1','2','3','4','5','6','7','8','9','+','/'
-};
-
-void sspm_write_base64(struct sspm_buffer *buf, char* inbuf,int size )
-{
-
- char outbuf[4];
- int i;
-
- outbuf[0] = outbuf[1] = outbuf[2] = outbuf[3] = 65;
-
- switch(size){
-
- case 4:
- outbuf[3] = inbuf[2] & 0x3F;
-
- case 3:
- outbuf[2] = ((inbuf[1] & 0x0F) << 2) | ((inbuf[2] & 0xC0) >> 6);
-
- case 2:
- outbuf[0] = (inbuf[0] & 0xFC) >> 2;
- outbuf[1] = ((inbuf[0] & 0x03) << 4) | ((inbuf[1] & 0xF0) >> 4);
- break;
-
- default:
- assert(0);
- }
-
- for(i = 0; i < 4; i++){
-
- if(outbuf[i] == 65){
- sspm_append_char(buf,'=');
- } else {
- sspm_append_char(buf,BaseTable[(int)outbuf[i]]);
- }
- }
-}
-
-void sspm_encode_base64(struct sspm_buffer *buf, char* data, size_t size)
-{
-
- char *p;
- char inbuf[3];
- int i = 0;
- int first = 1;
- int lpos = 0;
-
- inbuf[0] = inbuf[1] = inbuf[2] = 0;
-
- for (p = data; *p !=0; p++){
-
- if (i%3 == 0 && first == 0){
-
- sspm_write_base64(buf, inbuf, 4);
- lpos+=4;
-
- inbuf[0] = inbuf[1] = inbuf[2] = 0;
- }
-
- assert(lpos%4 == 0);
-
- if (lpos == 72){
- sspm_append_string(buf,"\n");
- lpos = 0;
- }
-
- inbuf[i%3] = *p;
-
- i++;
- first = 0;
-
- }
-
-
- /* If the inbuf was not exactly filled on the last byte, we need
- to spit out the odd bytes that did get in -- either one or
- two. This will result in an output of two bytes and '==' or
- three bytes and '=', respectively */
-
- if (i%3 == 1 && first == 0){
- sspm_write_base64(buf, inbuf, 2);
- } else if (i%3 == 2 && first == 0){
- sspm_write_base64(buf, inbuf, 3);
- }
-
-}
-
-void sspm_write_header(struct sspm_buffer *buf,struct sspm_header *header)
-{
-
- int i;
- char temp[TMP_BUF_SIZE];
- char* major;
- char* minor;
-
- /* Content-type */
-
- major = sspm_major_type_string(header->major);
- minor = sspm_minor_type_string(header->minor);
-
- if(header->minor == SSPM_UNKNOWN_MINOR_TYPE ){
- assert(header->minor_text !=0);
- minor = header->minor_text;
- }
-
- sprintf(temp,"Content-Type: %s/%s",major,minor);
-
- sspm_append_string(buf,temp);
-
- if(header->boundary != 0){
- sprintf(temp,";boundary=\"%s\"",header->boundary);
- sspm_append_string(buf,temp);
- }
-
- /* Append any content type parameters */
- if(header->content_type_params != 0){
- for(i=0; *(header->content_type_params[i])!= 0;i++){
- sprintf(temp,header->content_type_params[i]);
- sspm_append_char(buf,';');
- sspm_append_string(buf,temp);
- }
- }
-
- sspm_append_char(buf,'\n');
-
- /*Content-Transfer-Encoding */
-
- if(header->encoding != SSPM_UNKNOWN_ENCODING &&
- header->encoding != SSPM_NO_ENCODING){
- sprintf(temp,"Content-Transfer-Encoding: %s\n",
- sspm_encoding_string(header->encoding));
- }
-
- sspm_append_char(buf,'\n');
-
-}
-
-void sspm_write_multipart_part(struct sspm_buffer *buf,
- struct sspm_part *parts,
- int* part_num)
-{
-
- int parent_level, level;
- struct sspm_header *header = &(parts[*part_num].header);
- /* Write the header for the multipart part */
- sspm_write_header(buf,header);
-
- parent_level = parts[*part_num].level;
-
- (*part_num)++;
-
- level = parts[*part_num].level;
-
- while(parts[*part_num].header.major != SSPM_NO_MAJOR_TYPE &&
- level == parent_level+1){
-
- assert(header->boundary);
- sspm_append_string(buf,header->boundary);
- sspm_append_char(buf,'\n');
-
- if (parts[*part_num].header.major == SSPM_MULTIPART_MAJOR_TYPE){
- sspm_write_multipart_part(buf,parts,part_num);
- } else {
- sspm_write_part(buf, &(parts[*part_num]), part_num);
- }
-
- (*part_num)++;
- level = parts[*part_num].level;
- }
-
- sspm_append_string(buf,"\n\n--");
- sspm_append_string(buf,header->boundary);
- sspm_append_string(buf,"\n");
-
- (*part_num)--; /* undo last, spurious, increment */
-}
-
-void sspm_write_part(struct sspm_buffer *buf,struct sspm_part *part,int *part_num)
-{
-
- /* Write header */
- sspm_write_header(buf,&(part->header));
-
- /* Write part data */
-
- if(part->data == 0){
- return;
- }
-
- if(part->header.encoding == SSPM_BASE64_ENCODING) {
- assert(part->data_size != 0);
- sspm_encode_base64(buf,part->data,part->data_size);
- } else if(part->header.encoding == SSPM_QUOTED_PRINTABLE_ENCODING) {
- sspm_encode_quoted_printable(buf,part->data);
- } else {
- sspm_append_string(buf,part->data);
- }
-
- sspm_append_string(buf,"\n\n");
-}
-
-int sspm_write_mime(struct sspm_part *parts,size_t num_parts,
- char **output_string, char* header)
-{
- struct sspm_buffer buf;
- int part_num =0;
-
- buf.buffer = malloc(4096);
- buf.pos = buf.buffer;
- buf.buf_size = 10;
- buf.line_pos = 0;
-
- /* write caller's header */
- if(header != 0){
- sspm_append_string(&buf,header);
- }
-
- if(buf.buffer[strlen(buf.buffer)-1] != '\n'){
- sspm_append_char(&buf,'\n');
- }
-
- /* write mime-version header */
- sspm_append_string(&buf,"Mime-Version: 1.0\n");
-
- /* End of header */
-
- /* Write body parts */
- while(parts[part_num].header.major != SSPM_NO_MAJOR_TYPE){
- if (parts[part_num].header.major == SSPM_MULTIPART_MAJOR_TYPE){
- sspm_write_multipart_part(&buf,parts,&part_num);
- } else {
- sspm_write_part(&buf, &(parts[part_num]), &part_num);
- }
-
- part_num++;
- }
-
-
- *output_string = buf.buffer;
-
- return 0;
-}
-
diff --git a/libical/src/libical/sspm.h b/libical/src/libical/sspm.h
deleted file mode 100644
index 864a23a36f..0000000000
--- a/libical/src/libical/sspm.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: sspm.h Mime Parser
- CREATOR: eric 25 June 2000
-
- $Id$
- $Locker$
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Initial Developer of the Original Code is Eric Busboom
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
- ======================================================================*/
-
-#ifndef SSPM_H
-#define SSPM_H
-
-enum sspm_major_type {
- SSPM_NO_MAJOR_TYPE,
- SSPM_TEXT_MAJOR_TYPE,
- SSPM_IMAGE_MAJOR_TYPE,
- SSPM_AUDIO_MAJOR_TYPE,
- SSPM_VIDEO_MAJOR_TYPE,
- SSPM_APPLICATION_MAJOR_TYPE,
- SSPM_MULTIPART_MAJOR_TYPE,
- SSPM_MESSAGE_MAJOR_TYPE,
- SSPM_UNKNOWN_MAJOR_TYPE
-};
-
-enum sspm_minor_type {
- SSPM_NO_MINOR_TYPE,
- SSPM_ANY_MINOR_TYPE,
- SSPM_PLAIN_MINOR_TYPE,
- SSPM_RFC822_MINOR_TYPE,
- SSPM_DIGEST_MINOR_TYPE,
- SSPM_CALENDAR_MINOR_TYPE,
- SSPM_MIXED_MINOR_TYPE,
- SSPM_RELATED_MINOR_TYPE,
- SSPM_ALTERNATIVE_MINOR_TYPE,
- SSPM_PARALLEL_MINOR_TYPE,
- SSPM_UNKNOWN_MINOR_TYPE
-};
-
-enum sspm_encoding {
- SSPM_NO_ENCODING,
- SSPM_QUOTED_PRINTABLE_ENCODING,
- SSPM_8BIT_ENCODING,
- SSPM_7BIT_ENCODING,
- SSPM_BINARY_ENCODING,
- SSPM_BASE64_ENCODING,
- SSPM_UNKNOWN_ENCODING
-};
-
-enum sspm_error{
- SSPM_NO_ERROR,
- SSPM_UNEXPECTED_BOUNDARY_ERROR,
- SSPM_WRONG_BOUNDARY_ERROR,
- SSPM_NO_BOUNDARY_ERROR,
- SSPM_NO_HEADER_ERROR,
- SSPM_MALFORMED_HEADER_ERROR
-};
-
-
-struct sspm_header
-{
- int def;
- char* boundary;
- enum sspm_major_type major;
- enum sspm_minor_type minor;
- char *minor_text;
- char ** content_type_params;
- char* charset;
- enum sspm_encoding encoding;
- char* filename;
- char* content_id;
- enum sspm_error error;
- char* error_text;
-};
-
-struct sspm_part {
- struct sspm_header header;
- int level;
- size_t data_size;
- void *data;
-};
-
-struct sspm_action_map {
- enum sspm_major_type major;
- enum sspm_minor_type minor;
- void* (*new_part)();
- void (*add_line)(void *part, struct sspm_header *header,
- char* line, size_t size);
- void* (*end_part)(void* part);
- void (*free_part)(void *part);
-};
-
-char* sspm_major_type_string(enum sspm_major_type type);
-char* sspm_minor_type_string(enum sspm_minor_type type);
-char* sspm_encoding_string(enum sspm_encoding type);
-
-int sspm_parse_mime(struct sspm_part *parts,
- size_t max_parts,
- struct sspm_action_map *actions,
- char* (*get_string)(char *s, size_t size, void* data),
- void *get_string_data,
- struct sspm_header *first_header
- );
-
-void sspm_free_parts(struct sspm_part *parts, size_t max_parts);
-
-char *decode_quoted_printable(char *dest,
- char *src,
- size_t *size);
-char *decode_base64(char *dest,
- char *src,
- size_t *size);
-
-
-int sspm_write_mime(struct sspm_part *parts,size_t num_parts,
- char **output_string, char* header);
-
-#endif /*SSPM_H*/
diff --git a/libical/src/libical/vsnprintf.c b/libical/src/libical/vsnprintf.c
deleted file mode 100644
index 6339183dd4..0000000000
--- a/libical/src/libical/vsnprintf.c
+++ /dev/null
@@ -1,167 +0,0 @@
-#ifdef __osf__
-/*
- * Revision 12: http://theos.com/~deraadt/snprintf.c
- *
- * Copyright (c) 1997 Theo de Raadt
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#if __STDC__
-#include <stdarg.h>
-#include <stdlib.h>
-#else
-#include <varargs.h>
-#endif
-#include <setjmp.h>
-
-#ifndef roundup
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
-#endif
-
-static int pgsize;
-static char *curobj;
-static sigjmp_buf bail;
-
-#define EXTRABYTES 2 /* XXX: why 2? you don't want to know */
-
-static char *
-msetup(str, n)
- char *str;
- size_t n;
-{
- char *e;
-
- if (n == 0)
- return NULL;
- if (pgsize == 0)
- pgsize = getpagesize();
- curobj = (char *)malloc(n + EXTRABYTES + pgsize * 2);
- if (curobj == NULL)
- return NULL;
- e = curobj + n + EXTRABYTES;
- e = (char *)roundup((unsigned long)e, pgsize);
- if (mprotect(e, pgsize, PROT_NONE) == -1) {
- free(curobj);
- curobj = NULL;
- return NULL;
- }
- e = e - n - EXTRABYTES;
- *e = '\0';
- return (e);
-}
-
-static void
-mcatch(int i)
-{
- siglongjmp(bail, 1);
-}
-
-static void
-mcleanup(str, n, p)
- char *str;
- size_t n;
- char *p;
-{
- strncpy(str, p, n-1);
- str[n-1] = '\0';
- if (mprotect((caddr_t)(p + n + EXTRABYTES), pgsize,
- PROT_READ|PROT_WRITE|PROT_EXEC) == -1)
- mprotect((caddr_t)(p + n + EXTRABYTES), pgsize,
- PROT_READ|PROT_WRITE);
- free(curobj);
-}
-
-int
-#if __STDC__
-vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
-#else
-vsnprintf(str, n, fmt, ap)
- char *str;
- size_t n;
- char *fmt;
- char *ap;
-#endif
-{
- struct sigaction osa, nsa;
- char *p;
- int ret = n + 1; /* if we bail, indicated we overflowed */
-
- memset(&nsa, 0, sizeof nsa);
- nsa.sa_handler = mcatch;
- sigemptyset(&nsa.sa_mask);
-
- p = msetup(str, n);
- if (p == NULL) {
- *str = '\0';
- return 0;
- }
- if (sigsetjmp(bail, 1) == 0) {
- if (sigaction(SIGSEGV, &nsa, &osa) == -1) {
- mcleanup(str, n, p);
- return (0);
- }
- ret = vsprintf(p, fmt, ap);
- }
- mcleanup(str, n, p);
- (void) sigaction(SIGSEGV, &osa, NULL);
- return (ret);
-}
-
-int
-#if __STDC__
-snprintf(char *str, size_t n, char const *fmt, ...)
-#else
-snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-
- return (vsnprintf(str, n, fmt, ap));
- va_end(ap);
-}
-
-
-#else
-
-/* ANSI C forbids an empty source file... */
-
-static void vsnprintf_dummy_func() {
- vsnprintf_dummy_func();
-}
-
-#endif
diff --git a/libical/src/libicalss/.cvsignore b/libical/src/libicalss/.cvsignore
deleted file mode 100644
index 04a3e1b036..0000000000
--- a/libical/src/libicalss/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-.deps
-Makefile.in
-*.lo
-*.la
-.libs
-y.output
-icalsslexer.c
-icalssyacc.c
-icalss.h
diff --git a/libical/src/libicalss/Makefile.am b/libical/src/libicalss/Makefile.am
deleted file mode 100644
index 9e11bc3fc8..0000000000
--- a/libical/src/libicalss/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-lib_LTLIBRARIES = libicalss.la
-
-YFLAGS =-d -v -p ss
-LFLAGS = -Pss
-LEX_OUTPUT_ROOT = lex.ss
-
-all: icalss.h
-
-INCLUDES = \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src \
- -I$(top_srcdir)/src/libical \
- -I$(top_builddir)/src/libical
-
-libicalss_la_LDFLAGS = -version-info 0:0:0
-
-libicalss_la_SOURCES = \
- icalcalendar.h \
- icalclassify.c \
- icalclassify.h \
- icalgauge.c \
- icalgauge.h \
- icalgaugeimpl.h \
- icaldirset.h \
- icaldirsetimpl.h \
- icalfileset.c \
- icalfileset.h \
- icalfilesetimpl.h \
- icalset.c \
- icalset.h \
- icalsslexer.l \
- icalssyacc.h \
- icalssyacc.y \
- icalspanlist.c \
- icalspanlist.h \
- icalmessage.c \
- icalmessage.h \
- icalcstpclient.c \
- icalcstpclient.h \
- icalcstpserver.c \
- icalcstpserver.h \
- icalcstp.c \
- icalcstp.h
-
-libicalssincludedir = $(includedir)
-
-COMBINEDHEADERS = \
- $(srcdir)/icalgauge.h \
- $(srcdir)/icalset.h \
- $(srcdir)/icalfileset.h \
- $(srcdir)/icaldirset.h \
- $(srcdir)/icalcalendar.h \
- $(srcdir)/icalclassify.h \
- $(srcdir)/icalspanlist.h \
- $(srcdir)/icalmessage.h \
- $(srcdir)/icalcstp.h \
- $(srcdir)/icalcstpclient.h \
- $(srcdir)/icalcstpserver.h
-
-
-icalss.h: $(COMBINEDHEADERS)
- cat $(COMBINEDHEADERS) | egrep -v "#include.*\"ical" \
- | egrep -v "#include.*\"pvl\.h\"" > icalss.h
-
-
-libicalssinclude_HEADERS = icalss.h
-
-CONFIG_CLEAN_FILES = y.output
-
diff --git a/libical/src/libicalss/icalcalendar.c b/libical/src/libicalss/icalcalendar.c
deleted file mode 100644
index e63b5330ad..0000000000
--- a/libical/src/libicalss/icalcalendar.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*======================================================================
- FILE: icalcalendar.c
- CREATOR: eric 23 December 1999
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- ======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-#include "icalcalendar.h"
-#include "icalset.h"
-#include "icalfileset.h"
-#include "icaldirset.h"
-#include <limits.h>
-#include <sys/stat.h> /* For mkdir, stat */
-#include <sys/types.h> /* For mkdir */
-#include <fcntl.h> /* For mkdir */
-#include <unistd.h> /* For mkdir, stat */
-#include <stdlib.h> /* for malloc */
-#include <string.h> /* for strcat */
-#include <errno.h>
-
-#define BOOKED_DIR "booked"
-#define INCOMING_FILE "incoming.ics"
-#define PROP_FILE "properties.ics"
-#define FBLIST_FILE "freebusy.ics"
-
-struct icalcalendar_impl
-{
- char* dir;
- icalcomponent* freebusy;
- icalcomponent* properties;
- icalset* booked;
- icalset* incoming;
-};
-
-struct icalcalendar_impl* icalcalendar_new_impl()
-{
- struct icalcalendar_impl* impl;
-
- if ( ( impl = (struct icalcalendar_impl*)
- malloc(sizeof(struct icalcalendar_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- return impl;
-}
-
-
-icalerrorenum icalcalendar_create(struct icalcalendar_impl* impl)
-{
- char path[PATH_MAX];
- struct stat sbuf;
- int r;
-
- icalerror_check_arg_re((impl != 0),"impl",ICAL_BADARG_ERROR);
-
- path[0] = '\0';
- strcpy(path,impl->dir);
- strcat(path,"/");
- strcat(path,BOOKED_DIR);
-
- r = stat(path,&sbuf);
-
- if( r != 0 && errno == ENOENT){
-
- if(mkdir(path,0777)!=0){
- icalerror_set_errno(ICAL_FILE_ERROR);
- return ICAL_FILE_ERROR;
- }
- }
-
- return ICAL_NO_ERROR;
-}
-
-icalcalendar* icalcalendar_new(char* dir)
-{
- struct icalcalendar_impl* impl;
-
- icalerror_check_arg_rz((dir != 0),"dir");
-
- impl = icalcalendar_new_impl();
-
- if (impl == 0){
- return 0;
- }
-
- impl->dir = (char*)strdup(dir);
- impl->freebusy = 0;
- impl->properties = 0;
- impl->booked = 0;
- impl->incoming = 0;
-
- if (icalcalendar_create(impl) != ICAL_NO_ERROR){
- free(impl);
- return 0;
- }
-
- return impl;
-}
-
-void icalcalendar_free(icalcalendar* calendar)
-{
-
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
-
- if (impl->dir !=0){
- free(impl->dir);
- }
-
- if (impl->freebusy !=0){
- icalfileset_free(impl->freebusy);
- }
-
- if (impl->properties !=0){
- icalfileset_free(impl->properties);
- }
-
- if (impl->booked !=0){
- icaldirset_free(impl->booked);
- }
-
- if (impl->incoming !=0){
- icaldirset_free(impl->incoming);
- }
-
- impl->dir = 0;
- impl->freebusy = 0;
- impl->properties = 0;
- impl->booked = 0;
- impl->incoming = 0;
-
-
- free(impl);
-}
-
-
-int icalcalendar_lock(icalcalendar* calendar)
-{
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
- return 0;
-}
-
-int icalcalendar_unlock(icalcalendar* calendar)
-{
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
- return 0;
-}
-
-int icalcalendar_islocked(icalcalendar* calendar)
-{
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
- return 0;
-}
-
-int icalcalendar_ownlock(icalcalendar* calendar)
-{
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
- return 0;
-}
-
-icalset* icalcalendar_get_booked(icalcalendar* calendar)
-{
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- char dir[PATH_MAX];
-
- icalerror_check_arg_rz((impl != 0),"impl");
-
- dir[0] = '\0';
- strcpy(dir,impl->dir);
- strcat(dir,"/");
- strcat(dir,BOOKED_DIR);
-
- if (impl->booked == 0){
- icalerror_clear_errno();
- impl->booked = icaldirset_new(dir);
- assert(icalerrno == ICAL_NO_ERROR);
- }
-
- return impl->booked;
-
-}
-
-icalset* icalcalendar_get_incoming(icalcalendar* calendar)
-{
- char path[PATH_MAX];
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
-
- path[0] = '\0';
- strcpy(path,impl->dir);
- strcat(path,"/");
- strcat(path,INCOMING_FILE);
-
- if (impl->properties == 0){
- impl->properties = icalfileset_new(path);
- }
-
- return impl->properties;
-}
-
-icalset* icalcalendar_get_properties(icalcalendar* calendar)
-{
- char path[PATH_MAX];
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
-
- path[0] = '\0';
- strcpy(path,impl->dir);
- strcat(path,"/");
- strcat(path,PROP_FILE);
-
- if (impl->properties == 0){
- impl->properties = icalfileset_new(path);
- }
-
- return impl->properties;
-}
-
-icalset* icalcalendar_get_freebusy(icalcalendar* calendar)
-{
- char path[PATH_MAX];
- struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar;
- icalerror_check_arg_rz((impl != 0),"impl");
-
- path[0] = '\0';
- strcpy(path,impl->dir);
- strcat(path,"/");
- strcat(path,FBLIST_FILE);
-
-
- if (impl->freebusy == 0){
- impl->freebusy = icalfileset_new(path);
- }
-
- return impl->freebusy;
-}
-
-
-
-
diff --git a/libical/src/libicalss/icalcalendar.h b/libical/src/libicalss/icalcalendar.h
deleted file mode 100644
index f07457c60d..0000000000
--- a/libical/src/libicalss/icalcalendar.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcalendar.h
- CREATOR: eric 23 December 1999
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALCALENDAR_H
-#define ICALCALENDAR_H
-
-#include "ical.h"
-#include "icalset.h"
-
-/* icalcalendar
- * Routines for storing calendar data in a file system. The calendar
- * has two icaldirsets, one for incoming components and one for booked
- * components. It also has interfaces to access the free/busy list
- * and a list of calendar properties */
-
-typedef void icalcalendar;
-
-icalcalendar* icalcalendar_new(char* dir);
-
-void icalcalendar_free(icalcalendar* calendar);
-
-int icalcalendar_lock(icalcalendar* calendar);
-
-int icalcalendar_unlock(icalcalendar* calendar);
-
-int icalcalendar_islocked(icalcalendar* calendar);
-
-int icalcalendar_ownlock(icalcalendar* calendar);
-
-icalset* icalcalendar_get_booked(icalcalendar* calendar);
-
-icalset* icalcalendar_get_incoming(icalcalendar* calendar);
-
-icalset* icalcalendar_get_properties(icalcalendar* calendar);
-
-icalset* icalcalendar_get_freebusy(icalcalendar* calendar);
-
-
-#endif /* !ICALCALENDAR_H */
-
-
-
diff --git a/libical/src/libicalss/icalclassify.c b/libical/src/libicalss/icalclassify.c
deleted file mode 100644
index ad2d6d6fd8..0000000000
--- a/libical/src/libicalss/icalclassify.c
+++ /dev/null
@@ -1,696 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalclassify.c
- CREATOR: ebusboom 23 aug 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ical.h"
-#include "icalclassify.h"
-#include "icalmemory.h"
-#include <ctype.h> /* For tolower() */
-#include <string.h> /* for index() */
-#include <stdlib.h> /* for malloc and free */
-
-
-
-struct icalclassify_parts {
- icalcomponent *c;
- icalproperty_method method;
- char* organizer;
- icalparameter_partstat reply_partstat;
- char* reply_attendee;
- char* uid;
- int sequence;
- struct icaltimetype dtstamp;
- struct icaltimetype recurrence_id;
-};
-
-
-char* icalclassify_lowercase(const char* str)
-{
- char* p = 0;
- char* new = icalmemory_strdup(str);
-
- if(str ==0){
- return 0;
- }
-
- for(p = new; *p!=0; p++){
- *p = tolower(*p);
- }
-
- return new;
-}
-
-/* Return a set of components that intersect in time with comp. For
-component X and Y to intersect:
- X.DTSTART < Y.DTEND && X.DTEND > Y.DTSTART
-*/
-
-
-icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp)
-{
- icalcomponent *return_set;
- icalcomponent *c;
- struct icaltime_span span,compspan;
-
- icalerror_clear_errno();
- compspan = icalcomponent_get_span(comp);
-
- if(icalerrno != ICAL_NO_ERROR){
- return 0;
- }
-
-
- return_set = icalcomponent_new(ICAL_XROOT_COMPONENT);
-
- for(c = icalset_get_first_component(set);
- c != 0;
- c = icalset_get_next_component(set)){
-
- icalerror_clear_errno();
-
- span = icalcomponent_get_span(c);
-
- if(icalerrno != ICAL_NO_ERROR){
- continue;
- }
-
- if (compspan.start < span.end &&
- compspan.end > span.start){
-
- icalcomponent *clone = icalcomponent_new_clone(c);
-
- icalcomponent_add_component(return_set,clone);
- }
- }
-
- if(icalcomponent_count_components(return_set,ICAL_ANY_COMPONENT) !=0){
- return return_set;
- } else {
- icalcomponent_free(return_set);
- return 0;
- }
-}
-
-
-
-icalproperty* icalclassify_find_attendee(icalcomponent *c,
- const char* attendee)
-{
- icalproperty *p;
- char* lattendee = icalclassify_lowercase(attendee);
- char* upn = strchr(lattendee,':');
- icalcomponent *inner = icalcomponent_get_first_real_component(c);
-
- for(p = icalcomponent_get_first_property(inner,ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(inner,ICAL_ATTENDEE_PROPERTY))
- {
- const char* this_attendee
- = icalclassify_lowercase(icalproperty_get_attendee(p));
- char* this_upn = strchr(this_attendee,':');
-
- if(this_upn == 0){
- continue;
- }
-
- if(strcmp(this_upn,upn)==0){
- return p;
- }
-
- }
-
- return 0;
-
-}
-
-void icalssutil_free_parts(struct icalclassify_parts *parts)
-{
- if(parts == 0){
- return;
- }
-
- if(parts->organizer != 0){
- free(parts->organizer);
- }
-
- if(parts->uid != 0){
- free(parts->uid);
- }
-
- if(parts->reply_attendee){
- free(parts->reply_attendee);
- }
-}
-
-void icalssutil_get_parts(icalcomponent* c,
- struct icalclassify_parts* parts)
-{
- icalproperty *p;
- icalcomponent *inner;
-
- memset(parts,0,sizeof(struct icalclassify_parts));
-
- parts->method = ICAL_METHOD_NONE;
- parts->sequence = 0;
- parts->reply_partstat = ICAL_PARTSTAT_NONE;
-
- if(c == 0){
- return;
- }
-
- parts->c = c;
-
- p = icalcomponent_get_first_property(c,ICAL_METHOD_PROPERTY);
- if(p!=0){
- parts->method = icalproperty_get_method(p);
- }
-
- inner = icalcomponent_get_first_real_component(c);
-
- p = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
- if(p!=0){
- parts->organizer = strdup(icalproperty_get_organizer(p));
- }
-
- p = icalcomponent_get_first_property(inner,ICAL_SEQUENCE_PROPERTY);
- if(p!=0){
- parts->sequence = icalproperty_get_sequence(p);
- }
-
- p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
- if(p!=0){
- parts->uid = strdup(icalproperty_get_uid(p));
- }
-
- p = icalcomponent_get_first_property(inner,ICAL_RECURRENCEID_PROPERTY);
- if(p!=0){
- parts->recurrence_id = icalproperty_get_recurrenceid(p);
- }
-
- p = icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY);
- if(p!=0){
- parts->dtstamp = icalproperty_get_dtstamp(p);
- }
-
- if(parts->method==ICAL_METHOD_REPLY){
- icalparameter *param;
- p = icalcomponent_get_first_property(inner,ICAL_ATTENDEE_PROPERTY);
-
- if(p!=0){
-
- param = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER);
-
- if(param != 0){
- parts->reply_partstat =
- icalparameter_get_partstat(param);
- }
-
- parts->reply_attendee = strdup(icalproperty_get_attendee(p));
- }
-
- }
-
-
-}
-
-
-int icalssutil_is_rescheduled(icalcomponent* a,icalcomponent* b)
-{
- icalproperty *p1,*p2;
- icalcomponent *i1,*i2;
- int i;
-
- icalproperty_kind kind_array[] = {
- ICAL_DTSTART_PROPERTY,
- ICAL_DTEND_PROPERTY,
- ICAL_DURATION_PROPERTY,
- ICAL_DUE_PROPERTY,
- ICAL_RRULE_PROPERTY,
- ICAL_RDATE_PROPERTY,
- ICAL_EXRULE_PROPERTY,
- ICAL_EXDATE_PROPERTY,
- ICAL_NO_PROPERTY
- };
-
- i1 = icalcomponent_get_first_real_component(a);
- i2 = icalcomponent_get_first_real_component(b);
-
- for(i =0; kind_array[i] != ICAL_NO_PROPERTY; i++){
- p1 = icalcomponent_get_first_property(i1,kind_array[i]);
- p2 = icalcomponent_get_first_property(i2,kind_array[i]);
-
- if( (p1!=0)^(p1!=0) ){
- /* Return true if the property exists in one component and not
- the other */
- return 1;
- }
-
- if(p1 && strcmp(icalproperty_as_ical_string(p1),
- icalproperty_as_ical_string(p2)) != 0){
- return 1;
- }
- }
-
- return 0;
-
-}
-
-#define icalclassify_pre \
- int rtrn =0;
-
-#define icalclassify_post \
- return rtrn;
-
-
-int icalclassify_publish_new(struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre;
-
- if(comp->method == ICAL_METHOD_PUBLISH &&
- match == 0){
- rtrn = 1;
- }
-
- icalclassify_post;
-
-}
-
-int icalclassify_publish_update(struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre;
-
- if(comp->method == ICAL_METHOD_PUBLISH &&
- match !=0 ){
- rtrn = 1;
- }
-
- icalclassify_post;
-
-}
-
-int icalclassify_publish_freebusy(struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre;
-
- if(comp->method == ICAL_METHOD_PUBLISH &&
- match == 0){
- rtrn = 1;
- }
-
- icalclassify_post;
-
-}
-
-
-int icalclassify_request_new(struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- /* Method is REQUEST, and there is no match */
-
- icalclassify_pre
-
- if(match->c==0 && comp->method == ICAL_METHOD_REQUEST){
- rtrn = 1;
- }
-
- icalclassify_post
-
-}
-
-int icalclassify_request_update(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- /* REQUEST method, Higher SEQUENCE than match, and all
- time-related properties are unchanged */
-
- icalclassify_pre
-
- if (match != 0 &&
- comp->sequence >= match->sequence &&
- !icalssutil_is_rescheduled(comp->c,match->c)){
- rtrn = 1;
- }
-
- icalclassify_post
-
-}
-
-int icalclassify_request_reschedule(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- /* REQUEST method, Higher SEQUENCE than match, and one or more
- time-related properties are changed */
- icalclassify_pre
-
- if (match->c != 0 &&
- comp->sequence > match->sequence &&
- icalssutil_is_rescheduled(comp->c,match->c)){
- rtrn = 1;
- }
-
- icalclassify_post
-
-}
-
-int icalclassify_request_delegate(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
-
- if (match->c != 0 &&
- comp->sequence > match->sequence &&
- icalssutil_is_rescheduled(comp->c,match->c)){
- rtrn = 1;
- }
-
- icalclassify_post
-
-}
-
-int icalclassify_request_new_organizer(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- /* Organizer has changed between match and component */
- icalclassify_pre
-
- icalclassify_post
-
-}
-
-int icalclassify_request_status(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- icalclassify_post
-}
-
-int icalclassify_request_forward(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- icalclassify_post
-}
-
-int icalclassify_request_freebusy(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- icalclassify_post
-}
-
-int icalclassify_reply_accept(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalproperty* attendee;
- icalclassify_pre;
-
- attendee = icalclassify_find_attendee(match->c,comp->reply_attendee);
-
- if(attendee != 0&&
- comp->reply_partstat == ICAL_PARTSTAT_ACCEPTED){
- rtrn = 1;
- }
-
- icalclassify_post
-}
-int icalclassify_reply_decline(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalproperty* attendee;
- icalclassify_pre;
-
- attendee = icalclassify_find_attendee(match->c,comp->reply_attendee);
-
-
- if( attendee != 0 &&
- comp->reply_partstat == ICAL_PARTSTAT_DECLINED){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_reply_crasher_accept(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalproperty* attendee;
- icalclassify_pre;
-
- attendee= icalclassify_find_attendee(match->c,comp->reply_attendee);
-
- if(attendee == 0 &&
- comp->reply_partstat == ICAL_PARTSTAT_ACCEPTED){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_reply_crasher_decline(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalparameter_partstat partstat;
- icalproperty* attendee;
- icalclassify_pre;
-
-
- attendee = icalclassify_find_attendee(match->c,comp->reply_attendee);
-
- if(attendee == 0 &&
- comp->reply_partstat == ICAL_PARTSTAT_DECLINED){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_add_instance(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- if(comp->method == ICAL_METHOD_ADD){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_cancel_event(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- if(comp->method == ICAL_METHOD_CANCEL){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_cancel_instance(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- if(comp->method == ICAL_METHOD_CANCEL){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_cancel_all(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- if(comp->method == ICAL_METHOD_CANCEL){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_refesh(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- if(comp->method == ICAL_METHOD_REFRESH){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_counter(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
- if(comp->method == ICAL_METHOD_COUNTER){
- rtrn = 1;
- }
- icalclassify_post
-}
-int icalclassify_delinecounter(
- struct icalclassify_parts *comp,
- struct icalclassify_parts *match,
- const char* user)
-{
- icalclassify_pre
-
- if(comp->method == ICAL_METHOD_DECLINECOUNTER){
- rtrn = 1;
- }
-
- icalclassify_post
-}
-
-struct icalclassify_map {
- icalproperty_method method;
- int (*fn)(struct icalclassify_parts *comp,struct icalclassify_parts *match, const char* user);
- ical_class class;
-} icalclassify_map[] =
-{ {ICAL_METHOD_PUBLISH,icalclassify_publish_new,ICAL_PUBLISH_NEW_CLASS},
- {ICAL_METHOD_PUBLISH,icalclassify_publish_update,ICAL_PUBLISH_UPDATE_CLASS},
- {ICAL_METHOD_PUBLISH,icalclassify_publish_freebusy,ICAL_PUBLISH_FREEBUSY_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_new,ICAL_REQUEST_NEW_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_update,ICAL_REQUEST_UPDATE_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_reschedule,ICAL_REQUEST_RESCHEDULE_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_delegate,ICAL_REQUEST_DELEGATE_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_new_organizer,ICAL_REQUEST_NEW_ORGANIZER_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_forward,ICAL_REQUEST_FORWARD_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_status,ICAL_REQUEST_STATUS_CLASS},
- {ICAL_METHOD_REQUEST,icalclassify_request_freebusy,ICAL_REQUEST_FREEBUSY_CLASS},
-
- {ICAL_METHOD_REPLY,icalclassify_reply_accept,ICAL_REPLY_ACCEPT_CLASS},
- {ICAL_METHOD_REPLY,icalclassify_reply_decline,ICAL_REPLY_DECLINE_CLASS},
- {ICAL_METHOD_REPLY,icalclassify_reply_crasher_accept,ICAL_REPLY_CRASHER_ACCEPT_CLASS},
- {ICAL_METHOD_REPLY,icalclassify_reply_crasher_decline,ICAL_REPLY_CRASHER_DECLINE_CLASS},
-
- {ICAL_METHOD_ADD,icalclassify_add_instance,ICAL_ADD_INSTANCE_CLASS},
-
- {ICAL_METHOD_CANCEL,icalclassify_cancel_event,ICAL_CANCEL_EVENT_CLASS},
- {ICAL_METHOD_CANCEL,icalclassify_cancel_instance,ICAL_CANCEL_INSTANCE_CLASS},
- {ICAL_METHOD_CANCEL,icalclassify_cancel_all,ICAL_CANCEL_ALL_CLASS},
-
- {ICAL_METHOD_REFRESH,icalclassify_refesh,ICAL_REFRESH_CLASS},
- {ICAL_METHOD_COUNTER,icalclassify_counter,ICAL_COUNTER_CLASS},
- {ICAL_METHOD_DECLINECOUNTER,icalclassify_delinecounter,ICAL_DECLINECOUNTER_CLASS},
- {ICAL_METHOD_NONE,0,ICAL_NO_CLASS}
-};
-
-
-ical_class icalclassify(icalcomponent* c,icalcomponent* match,
- const char* user)
-{
- icalcomponent *inner;
- icalproperty *p;
- icalproperty_method method;
- ical_class class = ICAL_UNKNOWN_CLASS;
-
- int i;
-
- struct icalclassify_parts comp_parts;
- struct icalclassify_parts match_parts;
-
- inner = icalcomponent_get_first_real_component(c);
-
- if (inner == 0) {
- return ICAL_NO_CLASS;
- }
-
- icalssutil_get_parts(c,&comp_parts);
- icalssutil_get_parts(match,&match_parts);
-
- /* Determine if the incoming component is obsoleted by the match */
- if(match != 0 && (
- comp_parts.method == ICAL_METHOD_REQUEST
- )){
- assert ( ! ((comp_parts.dtstamp.is_utc==1)^
- (match_parts.dtstamp.is_utc==1)));
-
- if( comp_parts.sequence<match_parts.sequence &&
- icaltime_compare(comp_parts.dtstamp,match_parts.dtstamp)>0)
- {
- /* comp has a smaller sequence and a later DTSTAMP */
- return ICAL_MISSEQUENCED_CLASS;
- }
-
- if( (comp_parts.sequence<match_parts.sequence )
- /*&&icaltime_compare(comp_parts.dtstamp,match_parts.dtstamp)<=0*/
- ||
- ( comp_parts.sequence == match_parts.sequence &&
- icaltime_compare(comp_parts.dtstamp,match_parts.dtstamp)<=0)){
-
- return ICAL_OBSOLETE_CLASS;
- }
-
- }
-
- p = icalcomponent_get_first_property(c,ICAL_METHOD_PROPERTY);
- if (p == 0) {
- return ICAL_UNKNOWN_CLASS;
- }
- method = icalproperty_get_method(p);
-
- for (i =0; icalclassify_map[i].method != ICAL_METHOD_NONE; i++){
- if(icalclassify_map[i].method == method){
- if( (*(icalclassify_map[i].fn))(&comp_parts,&match_parts,user)==1){
- class = icalclassify_map[i].class;
- break;
- }
- }
- }
-
- icalssutil_free_parts(&comp_parts);
- icalssutil_free_parts(&match_parts);
-
- return class;
-
-}
diff --git a/libical/src/libicalss/icalclassify.h b/libical/src/libicalss/icalclassify.h
deleted file mode 100644
index ae76434378..0000000000
--- a/libical/src/libicalss/icalclassify.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalclassify.h
- CREATOR: eric 21 Aug 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- =========================================================================*/
-
-#ifndef ICALCLASSIFY_H
-#define ICALCLASSIFY_H
-
-#include "ical.h"
-#include "icalset.h"
-
-
-typedef enum icalclass {
- ICAL_NO_CLASS,
- ICAL_PUBLISH_NEW_CLASS,
- ICAL_PUBLISH_UPDATE_CLASS,
- ICAL_PUBLISH_FREEBUSY_CLASS,
- ICAL_REQUEST_NEW_CLASS,
- ICAL_REQUEST_UPDATE_CLASS,
- ICAL_REQUEST_RESCHEDULE_CLASS,
- ICAL_REQUEST_DELEGATE_CLASS,
- ICAL_REQUEST_NEW_ORGANIZER_CLASS,
- ICAL_REQUEST_FORWARD_CLASS,
- ICAL_REQUEST_STATUS_CLASS,
- ICAL_REQUEST_FREEBUSY_CLASS,
- ICAL_REPLY_ACCEPT_CLASS,
- ICAL_REPLY_DECLINE_CLASS,
- ICAL_REPLY_CRASHER_ACCEPT_CLASS,
- ICAL_REPLY_CRASHER_DECLINE_CLASS,
- ICAL_ADD_INSTANCE_CLASS,
- ICAL_CANCEL_EVENT_CLASS,
- ICAL_CANCEL_INSTANCE_CLASS,
- ICAL_CANCEL_ALL_CLASS,
- ICAL_REFRESH_CLASS,
- ICAL_COUNTER_CLASS,
- ICAL_DECLINECOUNTER_CLASS,
- ICAL_MALFORMED_CLASS,
- ICAL_OBSOLETE_CLASS, /* 21 */
- ICAL_MISSEQUENCED_CLASS, /* 22 */
- ICAL_UNKNOWN_CLASS /* 23 */
-} ical_class;
-
-ical_class icalclassify(icalcomponent* c,icalcomponent* match,
- const char* user);
-
-icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp);
-
-#endif /* ICALCLASSIFY_H*/
-
-
-
-
-
diff --git a/libical/src/libicalss/icalcomponent.h b/libical/src/libicalss/icalcomponent.h
deleted file mode 100644
index 9e0e9f5a9f..0000000000
--- a/libical/src/libicalss/icalcomponent.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcomponent.h
- CREATOR: eric 20 March 1999
-
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
- The original code is icalcomponent.h
-
-======================================================================*/
-
-#ifndef ICALCOMPONENT_H
-#define ICALCOMPONENT_H
-
-#include "icalproperty.h"
-#include "icalvalue.h"
-#include "icalenums.h" /* defines icalcomponent_kind */
-
-typedef void icalcomponent;
-
-icalcomponent* icalcomponent_new(icalcomponent_kind kind);
-icalcomponent* icalcomponent_new_clone(icalcomponent* component);
-icalcomponent* icalcomponent_new_from_string(char* str);
-icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...);
-void icalcomponent_free(icalcomponent* component);
-
-char* icalcomponent_as_ical_string(icalcomponent* component);
-
-int icalcomponent_is_valid(icalcomponent* component);
-
-icalcomponent_kind icalcomponent_isa(icalcomponent* component);
-
-int icalcomponent_isa_component (void* component);
-
-/*
- * Working with properties
- */
-
-void icalcomponent_add_property(icalcomponent* component,
- icalproperty* property);
-
-void icalcomponent_remove_property(icalcomponent* component,
- icalproperty* property);
-
-int icalcomponent_count_properties(icalcomponent* component,
- icalproperty_kind kind);
-
-/* Iterate through the properties */
-icalproperty* icalcomponent_get_current_property(icalcomponent* component);
-
-icalproperty* icalcomponent_get_first_property(icalcomponent* component,
- icalproperty_kind kind);
-icalproperty* icalcomponent_get_next_property(icalcomponent* component,
- icalproperty_kind kind);
-
-/* Return a null-terminated array of icalproperties*/
-
-icalproperty** icalcomponent_get_properties(icalcomponent* component,
- icalproperty_kind kind);
-
-
-/*
- * Working with components
- */
-
-
-void icalcomponent_add_component(icalcomponent* parent,
- icalcomponent* child);
-
-void icalcomponent_remove_component(icalcomponent* parent,
- icalcomponent* child);
-
-int icalcomponent_count_components(icalcomponent* component,
- icalcomponent_kind kind);
-
-/* Iterate through components */
-icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
-
-icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
- icalcomponent_kind kind);
-icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
- icalcomponent_kind kind);
-
-/* Return a null-terminated array of icalproperties*/
-icalproperty** icalcomponent_get_component(icalcomponent* component,
- icalproperty_kind kind);
-
-/* Working with embedded error properties */
-
-int icalcomponent_count_errors(icalcomponent* component);
-void icalcomponent_strip_errors(icalcomponent* component);
-
-
-/* Internal operations. You don't see these... */
-icalcomponent* icalcomponent_get_parent(icalcomponent* component);
-void icalcomponent_set_parent(icalcomponent* component,
- icalcomponent* parent);
-
-#endif /* !ICALCOMPONENT_H */
-
-
-
diff --git a/libical/src/libicalss/icalcsdb.h b/libical/src/libicalss/icalcsdb.h
deleted file mode 100644
index 4619b94fd0..0000000000
--- a/libical/src/libicalss/icalcsdb.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcsdb.h Calendar Server Database
- CREATOR: eric 23 December 1999
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
-======================================================================*/
-
-#ifndef ICALCSDB_H
-#define ICALCSDB_H
-
-#include "ical.h"
-
-typedef void icalcsdb;
-
-icalcsdb* icalcsdb_new(char* path);
-
-void icalcsdb_free(icalcsdb* csdb);
-
-icalerrorenum icalcsdb_create(icalcsdb* db, char* calid);
-
-icalerrorenum icalcsdb_delete(icalcsdb* db, char* calid);
-
-icalerrorenum icalcsdb_move(icalcsdb* db, char* oldcalid, char* newcalid);
-
-icalerrorenum icalcsdb_noop(icalcsdb* db);
-
-char* icalcsdb_generateuid(icalcsdb* db);
-
-icalcomponent* icalcsdb_expand_upn(icalcsdb* db, char* upn);
-icalcomponent* icalcsdb_expand_calid(icalcsdb* db, char* calid);
-
-icalerrorenum icalcsbd_senddata(icalcsdb* db, icalcomponent* comp);
-
-icalset* icalcsdb_get_calendar(icalcsdb* db, char* calid,
- icalcomponent *gauge);
-
-icalset* icalcsdb_get_vcars(icalcsdb* db);
-
-icalset* icalcsdb_get_properties(icalcsdb* db);
-
-icalset* icalcsdb_get_capabilities(icalcsdb* db);
-
-icalset* icalcsdb_get_timezones(icalcsdb* db);
-
-
-#endif /* !ICALCSDB_H */
-
-
-
diff --git a/libical/src/libicalss/icalcstp.c b/libical/src/libicalss/icalcstp.c
deleted file mode 100644
index 3b212b424a..0000000000
--- a/libical/src/libicalss/icalcstp.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalcstps.c
- CREATOR: ebusboom 23 Jun 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ical.h"
-#include "icalcstp.h"
-#include "pvl.h"
-
-#include <sys/types.h> /* For send(), others */
-#include <sys/socket.h> /* For send(), others. */
-#include <unistd.h> /* For alarm */
-#include <errno.h>
-#include <stdlib.h> /* for malloc */
-#include <string.h>
-
-
-struct command_map {
- enum icalcstp_command command;
- char *str;
-} command_map[] =
-{
- {ICAL_ABORT_COMMAND,"ABORT"},
- {ICAL_AUTHENTICATE_COMMAND,"AUTHENTICATE"},
- {ICAL_CAPABILITY_COMMAND,"CAPABILITY"},
- {ICAL_CONTINUE_COMMAND,"CONTINUE"},
- {ICAL_CALIDEXPAND_COMMAND,"CALIDEXPAND"},
- {ICAL_IDENTIFY_COMMAND,"IDENTIFY"},
- {ICAL_DISCONNECT_COMMAND,"DISCONNECT"},
- {ICAL_SENDDATA_COMMAND,"SENDDATA"},
- {ICAL_STARTTLS_COMMAND,"STARTTLS"},
- {ICAL_UPNEXPAND_COMMAND,"UPNEXPAND"},
- {ICAL_UNKNOWN_COMMAND,"UNKNOWN"}
-};
-
-
-icalcstp_command icalcstp_line_command(char* line)
-{
- int i;
-
- for(i = 0; command_map[i].command != ICAL_UNKNOWN_COMMAND; i++){
- size_t l = strlen(command_map[i].str);
-
- if(strncmp(line, command_map[i].str, l) == 0){
- return command_map[i].command;
- }
-
- }
-
- return ICAL_UNKNOWN_COMMAND;
-}
-
-icalrequeststatus icalcstp_line_response_code(char* line)
-{
- struct icalreqstattype rs;
-
- rs = icalreqstattype_from_string(line);
-
- return rs.code;
-}
-
-int icalcstp_line_is_endofdata(char* line)
-{
- if(line[0] == '.' && line[1] == '\n'){
- return 1;
- }
-
- return 0;
-
-}
-
-int icalcstp_line_is_mime(char* line)
-{
-}
-
-
-const char* icalcstp_command_to_string(icalcstp_command command){
-
- int i;
-
- for(i = 0; command_map[i].command != ICAL_UNKNOWN_COMMAND; i++){
- size_t l = strlen(command_map[i].str);
-
- if(command_map[i].command == command){
- return command_map[i].str;
- }
-
- }
-
- return command_map[i].str;
-
-}
-
diff --git a/libical/src/libicalss/icalcstp.h b/libical/src/libicalss/icalcstp.h
deleted file mode 100644
index dfc361830e..0000000000
--- a/libical/src/libicalss/icalcstp.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcstp.h
- CREATOR: eric 20 April 1999
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalcstp.h
-
-======================================================================*/
-
-
-#ifndef ICALCSTP_H
-#define ICALCSTP_H
-
-#include "ical.h"
-
-
-/* Connection state, from the state machine in RFC2445 */
-enum cstps_state {
- NO_STATE,
- CONNECTED,
- AUTHENTICATED,
- IDENTIFIED,
- DISCONNECTED,
- RECEIVE
-};
-
-/* CSTP Commands that a client can issue to a server */
-typedef enum icalcstp_command {
- ICAL_ABORT_COMMAND,
- ICAL_AUTHENTICATE_COMMAND,
- ICAL_CAPABILITY_COMMAND,
- ICAL_CONTINUE_COMMAND,
- ICAL_CALIDEXPAND_COMMAND,
- ICAL_IDENTIFY_COMMAND,
- ICAL_DISCONNECT_COMMAND,
- ICAL_SENDDATA_COMMAND,
- ICAL_STARTTLS_COMMAND,
- ICAL_UPNEXPAND_COMMAND,
- ICAL_COMPLETE_COMMAND,
- ICAL_UNKNOWN_COMMAND
-} icalcstp_command;
-
-
-
-/* A statement is a combination of command or response code and a
- component that the server and client exchage with each other. */
-struct icalcstp_statement {
- icalcstp_command command;
- char* str_data; /* If non-NUll use as arguments to command */
- int int_data; /* If non-NULL use as arguments to command */
-
- icalrequeststatus code;
-
- icalcomponent* data;
-};
-
-const char* icalcstp_command_to_string(icalcstp_command command);
-icalcstp_command icalcstp_string_to_command(const char* str);
-
-#endif /* !ICALCSTP_H */
-
-
-
diff --git a/libical/src/libicalss/icalcstpclient.c b/libical/src/libicalss/icalcstpclient.c
deleted file mode 100644
index d53d53f568..0000000000
--- a/libical/src/libicalss/icalcstpclient.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalcstps.c
- CREATOR: ebusboom 23 Jun 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ical.h"
-#include "icalcstp.h"
-#include "icalcstpclient.h"
-#include "pvl.h"
-
-#include <sys/types.h> /* For send(), others */
-#include <sys/socket.h> /* For send(), others. */
-#include <unistd.h> /* For alarm */
-#include <errno.h>
-#include <stdlib.h> /* for malloc */
-#include <string.h>
-
-#define EOL "\n"
-
-
-/* Client state machine */
-
-typedef enum icalcstpc_line_type {
- ICALCSTPC_RESPONSE_CODE_LINE,
- ICALCSTPC_TERMINATOR_LINE,
- ICALCSTPC_APPLICATION_DATA_LINE
-} icalcstpc_line_type;
-
-typedef enum icalcstpc_state {
- ICALCSTPC_SEND_STATE,
- ICALCSTPC_RESPONSE_CODE_STATE,
- ICALCSTPC_RESPONSE_DATA_STATE
-} icalcstpc_state;
-
-
-
-struct icalcstpc_impl {
- int timeout;
- icalparser *parser;
- icalcstp_command command;
- icalcstpc_state state;
- char* next_output;
- char* next_input;
-};
-
-icalcstpc* icalcstpc_new()
-{
- struct icalcstpc_impl *impl;
-
- impl = malloc(sizeof(struct icalcstpc_impl));
-
- if(impl == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memset(impl,0,sizeof(struct icalcstpc_impl));
-
- return impl;
-}
-
-void icalcstpc_free(icalcstpc* cstpc)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstpc;
-
- if(impl->next_output != 0){
- free(impl->next_output);
- }
-
- if(impl->next_input != 0){
- free(impl->next_input);
- }
-
-
- if(impl->parser != 0){
- icalparser_free(impl->parser);
- }
-}
-
-/* Get the next string to send to the server */
-char* icalcstpc_next_output(icalcstpc* cstp, char * line)
-{
- char* out;
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
- if(impl->next_output == 0){
- return 0;
- }
-
- out = impl->next_output;
-
- impl->next_output = 0;
-
- icalmemory_add_tmp_buffer(out);
-
- return out;
-}
-
-/* process the next string sent by the server */
-int icalcstpc_next_input(icalcstpc* cstp, char* line)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
- icalcstpc_line_type line_type;
-
- if(icalcstp_line_is_endofdata(line) || line == 0){
- return 0;
- }
-
- switch (impl->command){
- case ICAL_ABORT_COMMAND:{
- break;
- }
- case ICAL_AUTHENTICATE_COMMAND:{
- break;
- }
- case ICAL_CAPABILITY_COMMAND:{
- break;
- }
- case ICAL_CONTINUE_COMMAND:{
- break;
- }
- case ICAL_CALIDEXPAND_COMMAND:{
- break;
- }
- case ICAL_IDENTIFY_COMMAND:{
- break;
- }
- case ICAL_DISCONNECT_COMMAND:{
- break;
- }
- case ICAL_SENDDATA_COMMAND:{
- break;
- }
- case ICAL_STARTTLS_COMMAND:{
- break;
- }
- case ICAL_UPNEXPAND_COMMAND:{
- break;
- }
- case ICAL_COMPLETE_COMMAND:{
- break;
- }
- case ICAL_UNKNOWN_COMMAND:{
- break;
- }
- default:
- break;
- }
-}
-
-/* After icalcstpc_next_input returns a 0, there are responses
- ready. use these to get them */
-icalcstpc_response icalcstpc_first_response(icalcstpc* cstp)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
-}
-
-
-icalcstpc_response icalcstpc_next_response(icalcstpc* cstp)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-}
-
-
-int icalcstpc_set_timeout(icalcstpc* cstp, int sec)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-}
-
-icalerrorenum icalcstpc_abort(icalcstpc* cstp)
-{
- struct icalcstpc_impl* impl = (struct icalcstpc_impl*)cstp;
-
- icalerror_check_arg_re(cstp!=0,"cstp",ICAL_BADARG_ERROR);
-
- impl->next_output = "ABORT\n";
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpclient_setup_output(icalcstpc* cstp, size_t sz)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
- if(impl->next_output != 0){
- icalerror_set_errno(ICAL_USAGE_ERROR);
- return ICAL_USAGE_ERROR;
- }
-
- impl->next_output = malloc(sz);
-
- if(impl->next_output == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return ICAL_NEWFAILED_ERROR;
- }
-
- return ICAL_NO_ERROR;
-
-}
-
-icalerrorenum icalcstpc_authenticate(icalcstpc* cstp, char* mechanism,
- char* data, char* f(char*))
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
- char* command_str;
- icalerrorenum error;
- size_t sz;
-
- icalerror_check_arg_re(cstp!=0,"cstp",ICAL_BADARG_ERROR);
- icalerror_check_arg_re(mechanism!=0,"mechanism",ICAL_BADARG_ERROR);
- icalerror_check_arg_re(data!=0,"data",ICAL_BADARG_ERROR);
- icalerror_check_arg_re(f!=0,"f",ICAL_BADARG_ERROR);
-
- impl->command = ICAL_AUTHENTICATE_COMMAND;
-
- command_str = icalcstp_command_to_string(impl->command);
-
- sz = strlen(command_str) + strlen(mechanism) + strlen(data) + 4;
-
- if((error=icalcstpclient_setup_output(cstp,sz)) != ICAL_NO_ERROR){
- return error;
- }
-
- sprintf(impl->next_output,"%s %s %s%s",command_str,mechanism,data,EOL);
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_capability(icalcstpc* cstp)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
- char* command_str;
- icalerrorenum error;
- size_t sz;
-
- icalerror_check_arg_re(cstp!=0,"cstp",ICAL_BADARG_ERROR);
-
- impl->command = ICAL_CAPABILITY_COMMAND;
-
- command_str = icalcstp_command_to_string(impl->command);
-
- sz = strlen(command_str);
-
- if((error=icalcstpclient_setup_output(cstp,sz)) != ICAL_NO_ERROR){
- return error;
- }
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_calidexpand(icalcstpc* cstp,char* calid)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
- impl->command = ICAL_CALIDEXPAND_COMMAND;
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_continue(icalcstpc* cstp, unsigned int time)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
- impl->command = ICAL_CONTINUE_COMMAND;
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_disconnect(icalcstpc* cstp)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
-
- impl->command = ICAL_DISCONNECT_COMMAND;
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_identify(icalcstpc* cstp, char* id)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
-
- impl->command = ICAL_IDENTIFY_COMMAND;
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_starttls(icalcstpc* cstp, char* command,
- char* data, char * f(char*))
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
- impl->command = ICAL_STARTTLS_COMMAND;
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_upnexpand(icalcstpc* cstp,char* calid)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
-
- impl->command = ICAL_UPNEXPAND_COMMAND;
-
- return ICAL_NO_ERROR;
-}
-
-icalerrorenum icalcstpc_sendata(icalcstpc* cstp, unsigned int time,
- icalcomponent *comp)
-{
- struct icalcstpc_impl *impl = (struct icalcstpc_impl *)cstp;
-
- impl->command = ICAL_SENDDATA_COMMAND;
-
- return ICAL_NO_ERROR;
-}
-
-
-
-
diff --git a/libical/src/libicalss/icalcstpclient.h b/libical/src/libicalss/icalcstpclient.h
deleted file mode 100644
index 8d9d0c904c..0000000000
--- a/libical/src/libicalss/icalcstpclient.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcstpclient.h
- CREATOR: eric 4 Feb 01
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalcstp.h
-
-======================================================================*/
-
-
-#ifndef ICALCSTPC_H
-#define ICALCSTPC_H
-
-#include "ical.h"
-#include "icalcstp.h"
-
-/********************** Client (Sender) Interfaces **************************/
-
-/* How to use:
-
- 1) Construct a new icalcstpc
- 2) Issue a command by calling one of the command routines.
- 3) Repeat until both call icalcstpc_next_output and
- icalcstpc_next_input return 0:
- 3a) Call icalcstpc_next_output. Send string to server.
- 3b) Get string from server, & give to icalcstp_next_input()
- 4) Iterate with icalcstpc_first_response & icalcstp_next_response to
- get the servers responses
- 5) Repeat at #2
-*/
-
-
-typedef void icalcstpc;
-
-/* Response code sent by the server. */
-typedef struct icalcstpc_response {
- icalrequeststatus code;
- char *arg; /* These strings are owned by libical */
- char *debug_text;
- char *more_text;
- void* result;
-} icalcstpc_response;
-
-
-icalcstpc* icalcstpc_new();
-
-void icalcstpc_free(icalcstpc* cstpc);
-
-int icalcstpc_set_timeout(icalcstpc* cstp, int sec);
-
-
-/* Get the next string to send to the server */
-char* icalcstpc_next_output(icalcstpc* cstp, char* line);
-
-/* process the next string from the server */
-int icalcstpc_next_input(icalcstpc* cstp, char * line);
-
-/* After icalcstpc_next_input returns a 0, there are responses
- ready. use these to get them */
-icalcstpc_response icalcstpc_first_response(icalcstpc* cstp);
-icalcstpc_response icalcstpc_next_response(icalcstpc* cstp);
-
-/* Issue a command */
-icalerrorenum icalcstpc_abort(icalcstpc* cstp);
-icalerrorenum icalcstpc_authenticate(icalcstpc* cstp, char* mechanism,
- char* init_data, char* f(char*) );
-icalerrorenum icalcstpc_capability(icalcstpc* cstp);
-icalerrorenum icalcstpc_calidexpand(icalcstpc* cstp,char* calid);
-icalerrorenum icalcstpc_continue(icalcstpc* cstp, unsigned int time);
-icalerrorenum icalcstpc_disconnect(icalcstpc* cstp);
-icalerrorenum icalcstpc_identify(icalcstpc* cstp, char* id);
-icalerrorenum icalcstpc_starttls(icalcstpc* cstp, char* command,
- char* init_data, char* f(char*));
-icalerrorenum icalcstpc_senddata(icalcstpc* cstp, unsigned int time,
- icalcomponent *comp);
-icalerrorenum icalcstpc_upnexpand(icalcstpc* cstp,char* calid);
-icalerrorenum icalcstpc_sendata(icalcstpc* cstp, unsigned int time,
- icalcomponent *comp);
-
-
-#endif /* !ICALCSTPC_H */
-
-
-
diff --git a/libical/src/libicalss/icalcstpserver.c b/libical/src/libicalss/icalcstpserver.c
deleted file mode 100644
index 1a6ed7b976..0000000000
--- a/libical/src/libicalss/icalcstpserver.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalcstpserver.c
- CREATOR: ebusboom 13 Feb 01
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ical.h"
-#include "icalcstp.h"
-#include "icalcstpserver.h"
-#include "pvl.h"
-
-#include <sys/types.h> /* For send(), others */
-#include <sys/socket.h> /* For send(), others. */
-#include <unistd.h> /* For alarm */
-#include <errno.h>
-#include <stdlib.h> /* for malloc */
-#include <string.h>
-
-
-
-struct icalcstps_impl {
- int timeout;
- icalparser *parser;
- enum cstps_state major_state;
- struct icalcstps_commandfp commandfp;
-};
-
-
-
-
-/* This state machine is a Mealy-type: actions occur on the
- transitions, not in the states.
-
- Here is the state machine diagram from the CAP draft:
-
-
- STARTTLS /
- CAPABILITY
- +-------+
- | | +---------------+
- | +-----------+ AUTHENTICATE | |
- +-->| Connected |-------------->| Authenticated |
- +-----------+ | |
- | +---------------+
- | |
- | |
- | |
- | | +-----+ STARTTLS /
- | V | | CAPABILITY /
- | +---------------+ | IDENTIFY
- | | |<-+
- | | Identified |<----+
- | +--------| | |
- | | +---------------+ | command
- | | | | completes
- V |DISCONNECT | |
- +--------------+ | |SENDDATA |
- | Disconnected |<--+ | |
- +--------------+ | | ABORT
- A | |
- | V |
- | DISCONNECT +---------------+ |
- +--------------------| Receive |--+
- | |<--+
- +---------------+ |
- | | CONTINUTE
- +----+
-
- In this implmenetation, the transition from CONNECTED to IDENTIFIED
- is non-standard. The spec specifies that on the ATHENTICATE
- command, the machine transitions from CONNECTED to AUTHENTICATED,
- and then immediately goes to IDENTIFIED. This makes AUTHENTICATED a
- useless state, so I removed it */
-
-struct state_table {
- enum cstps_state major_state;
- enum icalcstp_command command;
- void (*action)();
- enum cstps_state next_state;
-
-} server_state_table[] =
-{
- { CONNECTED, ICAL_CAPABILITY_COMMAND , 0, CONNECTED},
- { CONNECTED, ICAL_AUTHENTICATE_COMMAND , 0, IDENTIFIED}, /* Non-standard */
- { IDENTIFIED, ICAL_STARTTLS_COMMAND, 0, IDENTIFIED},
- { IDENTIFIED, ICAL_IDENTIFY_COMMAND, 0, IDENTIFIED},
- { IDENTIFIED, ICAL_CAPABILITY_COMMAND, 0, IDENTIFIED},
- { IDENTIFIED, ICAL_SENDDATA_COMMAND, 0, RECEIVE},
- { IDENTIFIED, ICAL_DISCONNECT_COMMAND, 0, DISCONNECTED},
- { DISCONNECTED, 0, 0, 0},
- { RECEIVE, ICAL_DISCONNECT_COMMAND, 0, DISCONNECTED},
- { RECEIVE, ICAL_CONTINUE_COMMAND, 0, RECEIVE},
- { RECEIVE, ICAL_ABORT_COMMAND , 0, IDENTIFIED},
- { RECEIVE, ICAL_COMPLETE_COMMAND , 0, IDENTIFIED}
-};
-
-
-/**********************************************************************/
-
-
-
-icalcstps* icalcstps_new(struct icalcstps_commandfp cfp)
-{
- struct icalcstps_impl* impl;
-
- if ( ( impl = (struct icalcstps_impl*)
- malloc(sizeof(struct icalcstps_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- impl->commandfp = cfp;
- impl->timeout = 10;
-
- return (icalcstps*)impl;
-
-}
-
-void icalcstps_free(icalcstps* cstp);
-
-int icalcstps_set_timeout(icalcstps* cstp, int sec)
-{
- struct icalcstps_impl *impl = (struct icalcstps_impl *) cstp;
-
- icalerror_check_arg_rz( (cstp!=0), "cstp");
-
- impl->timeout = sec;
-
- return sec;
-}
-
-typedef struct icalcstps_response {
- icalrequeststatus code;
- char caluid[1024];
- void* result;
-} icalcstps_response;
-
-
-icalerrorenum prep_abort(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_authenticate(struct icalcstps_impl* impl, char* data)
-{ return ICAL_NO_ERROR;
-}
-icalerrorenum prep_capability(struct icalcstps_impl* impl, char* data)
-{ return ICAL_NO_ERROR;
-}
-icalerrorenum prep_calidexpand(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_continue(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_disconnect(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_identify(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_starttls(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_upnexpand(struct icalcstps_impl* impl, char* data)
-{
- return ICAL_NO_ERROR;
-}
-icalerrorenum prep_sendata(struct icalcstps_impl* impl, char* data)
-{ return ICAL_NO_ERROR;
-}
-
-char* icalcstps_process_incoming(icalcstps* cstp, char* input)
-{
- struct icalcstps_impl *impl = (struct icalcstps_impl *) cstp;
- char *i;
- char *cmd_or_resp;
- char *data;
- char *input_cpy;
- icalerrorenum error;
-
- icalerror_check_arg_rz(cstp !=0,"cstp");
- icalerror_check_arg_rz(input !=0,"input");
-
- if ((input_cpy = (char*)strdup(input)) == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- i = (char*)strstr(" ",input_cpy);
-
- cmd_or_resp = input_cpy;
-
- if (i != 0){
- *i = '\0';
- data = ++i;
- } else {
- data = 0;
- }
-
- printf("cmd: %s\n",cmd_or_resp);
- printf("data: %s\n",data);
-
- /* extract the command, look up in the state table, and dispatch
- to the proper handler */
-
- if(strcmp(cmd_or_resp,"ABORT") == 0){
- error = prep_abort(impl,data);
- } else if(strcmp(cmd_or_resp,"AUTHENTICATE") == 0){
- error = prep_authenticate(impl,data);
- } else if(strcmp(cmd_or_resp,"CAPABILITY") == 0){
- error = prep_capability(impl,data);
- } else if(strcmp(cmd_or_resp,"CALIDEXPAND") == 0){
- error = prep_calidexpand(impl,data);
- } else if(strcmp(cmd_or_resp,"CONTINUE") == 0){
- error = prep_continue(impl,data);
- } else if(strcmp(cmd_or_resp,"DISCONNECT") == 0){
- error = prep_disconnect(impl,data);
- } else if(strcmp(cmd_or_resp,"IDENTIFY") == 0){
- error = prep_identify(impl,data);
- } else if(strcmp(cmd_or_resp,"STARTTLS") == 0){
- error = prep_starttls(impl,data);
- } else if(strcmp(cmd_or_resp,"UPNEXPAND") == 0){
- error = prep_upnexpand(impl,data);
- } else if(strcmp(cmd_or_resp,"SENDDATA") == 0){
- error = prep_sendata(impl,data);
- }
-
- return 0;
-}
-
- /* Read data until we get a end of data marker */
-
-
-
-struct icalcstps_server_stubs {
- icalerrorenum (*abort)(icalcstps* cstp);
- icalerrorenum (*authenticate)(icalcstps* cstp, char* mechanism,
- char* data);
- icalerrorenum (*calidexpand)(icalcstps* cstp, char* calid);
- icalerrorenum (*capability)(icalcstps* cstp);
- icalerrorenum (*cont)(icalcstps* cstp, unsigned int time);
- icalerrorenum (*identify)(icalcstps* cstp, char* id);
- icalerrorenum (*disconnect)(icalcstps* cstp);
- icalerrorenum (*sendata)(icalcstps* cstp, unsigned int time,
- icalcomponent *comp);
- icalerrorenum (*starttls)(icalcstps* cstp, char* command,
- char* data);
- icalerrorenum (*upnexpand)(icalcstps* cstp, char* upn);
- icalerrorenum (*unknown)(icalcstps* cstp, char* command, char* data);
-};
-
diff --git a/libical/src/libicalss/icalcstpserver.h b/libical/src/libicalss/icalcstpserver.h
deleted file mode 100644
index 6fa2254b2e..0000000000
--- a/libical/src/libicalss/icalcstpserver.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalcstpserver.h
- CREATOR: eric 13 Feb 01
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalcstp.h
-
-======================================================================*/
-
-
-#ifndef ICALCSTPS_H
-#define ICALCSTPS_H
-
-#include "ical.h"
-
-
-/********************** Server (Reciever) Interfaces *************************/
-
-/* On the server side, the caller will recieve data from the incoming
- socket and pass it to icalcstps_next_input. The caller then takes
- the return from icalcstps_next_outpu and sends it out through the
- socket. This gives the caller a point of control. If the cstp code
- connected to the socket itself, it would be hard for the caller to
- do anything else after the cstp code was started.
-
- All of the server and client command routines will generate
- response codes. On the server side, these responses will be turned
- into text and sent to the client. On the client side, the reponse
- is the one sent from the server.
-
- Since each command can return multiple responses, the responses are
- stored in the icalcstps object and are accesses by
- icalcstps_first_response() and icalcstps_next_response()
-
- How to use:
-
- 1) Construct a new icalcstps, bound to your code via stubs
- 2) Repeat forever:
- 2a) Get string from client & give to icalcstps_next_input()
- 2b) Repeat until icalcstp_next_output returns 0:
- 2b1) Call icalcstps_next_output.
- 2b2) Send string to client.
-*/
-
-
-
-typedef void icalcstps;
-
-/* Pointers to the rountines that
- icalcstps_process_incoming will call when it recognizes a CSTP
- command in the data. BTW, the CONTINUE command is named 'cont'
- because 'continue' is a C keyword */
-
-struct icalcstps_commandfp {
- icalerrorenum (*abort)(icalcstps* cstp);
- icalerrorenum (*authenticate)(icalcstps* cstp, char* mechanism,
- char* data);
- icalerrorenum (*calidexpand)(icalcstps* cstp, char* calid);
- icalerrorenum (*capability)(icalcstps* cstp);
- icalerrorenum (*cont)(icalcstps* cstp, unsigned int time);
- icalerrorenum (*identify)(icalcstps* cstp, char* id);
- icalerrorenum (*disconnect)(icalcstps* cstp);
- icalerrorenum (*sendata)(icalcstps* cstp, unsigned int time,
- icalcomponent *comp);
- icalerrorenum (*starttls)(icalcstps* cstp, char* command,
- char* data);
- icalerrorenum (*upnexpand)(icalcstps* cstp, char* upn);
- icalerrorenum (*unknown)(icalcstps* cstp, char* command, char* data);
-};
-
-
-
-icalcstps* icalcstps_new(struct icalcstps_commandfp stubs);
-
-void icalcstps_free(icalcstps* cstp);
-
-int icalcstps_set_timeout(icalcstps* cstp, int sec);
-
-/* Get the next string to send to the client */
-char* icalcstps_next_output(icalcstps* cstp);
-
-/* process the next string from the client */
-int icalcstps_next_input(icalcstps* cstp);
-
-#endif /* ICALCSTPS */
diff --git a/libical/src/libicalss/icaldirset.c b/libical/src/libicalss/icaldirset.c
deleted file mode 100644
index 3a7b9cfdd9..0000000000
--- a/libical/src/libicalss/icaldirset.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icaldirset.c
- CREATOR: eric 28 November 1999
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-
-/*
-
- icaldirset manages a database of ical components and offers
- interfaces for reading, writting and searching for components.
-
- icaldirset groups components in to clusters based on their DTSTAMP
- time -- all components that start in the same month are grouped
- together in a single file. All files in a sotre are kept in a single
- directory.
-
- The primary interfaces are icaldirset_first and icaldirset_next. These
- routine iterate through all of the components in the store, subject
- to the current gauge. A gauge is an icalcomponent that is tested
- against other componets for a match. If a gauge has been set with
- icaldirset_select, icaldirset_first and icaldirset_next will only
- return componentes that match the gauge.
-
- The Store generated UIDs for all objects that are stored if they do
- not already have a UID. The UID is the name of the cluster (month &
- year as MMYYYY) plus a unique serial number. The serial number is
- stored as a property of the cluster.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-#include "ical.h"
-#include "icaldirset.h"
-#include "pvl.h"
-#include "icalerror.h"
-#include "icalparser.h"
-#include "icaldirset.h"
-#include "icalfileset.h"
-#include "icalfilesetimpl.h"
-#include "icalgauge.h"
-
-#include <limits.h> /* For PATH_MAX */
-#include <dirent.h> /* for opendir() */
-#include <errno.h>
-#include <sys/types.h> /* for opendir() */
-#include <sys/stat.h> /* for stat */
-#include <unistd.h> /* for stat, getpid */
-#include <time.h> /* for clock() */
-#include <stdlib.h> /* for rand(), srand() */
-#include <sys/utsname.h> /* for uname */
-#include <string.h> /* for strdup */
-#include "icaldirsetimpl.h"
-
-
-struct icaldirset_impl* icaldirset_new_impl()
-{
- struct icaldirset_impl* impl;
-
- if ( ( impl = (struct icaldirset_impl*)
- malloc(sizeof(struct icaldirset_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy(impl->id,ICALDIRSET_ID);
-
- return impl;
-}
-
-const char* icaldirset_path(icaldirset* cluster)
-{
- struct icaldirset_impl *impl = icaldirset_new_impl();
-
- return impl->dir;
-
-}
-
-void icaldirset_mark(icaldirset* store)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
-
- icalfileset_mark(impl->cluster);
-}
-
-
-icalerrorenum icaldirset_commit(icaldirset* store)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
-
- return icalfileset_commit(impl->cluster);
-
-}
-
-void icaldirset_lock(const char* dir)
-{
-}
-
-
-void icaldirset_unlock(const char* dir)
-{
-}
-
-/* Load the contents of the store directory into the store's internal directory list*/
-icalerrorenum icaldirset_read_directory(struct icaldirset_impl* impl)
-{
- struct dirent *de;
- DIR* dp;
- char *str;
-
- dp = opendir(impl->dir);
-
- if ( dp == 0) {
- icalerror_set_errno(ICAL_FILE_ERROR);
- return ICAL_FILE_ERROR;
- }
-
- /* clear contents of directory list */
- while((str = pvl_pop(impl->directory))){
- free(str);
- }
-
- /* load all of the cluster names in the directory list */
- for(de = readdir(dp);
- de != 0;
- de = readdir(dp)){
-
- /* Remove known directory names '.' and '..'*/
- if (strcmp(de->d_name,".") == 0 ||
- strcmp(de->d_name,"..") == 0 ){
- continue;
- }
-
- pvl_push(impl->directory, (void*)strdup(de->d_name));
- }
-
- closedir(dp);
-
- return ICAL_NO_ERROR;
-}
-
-icaldirset* icaldirset_new(const char* dir)
-{
- struct icaldirset_impl *impl = icaldirset_new_impl();
- struct stat sbuf;
-
- if (impl == 0){
- return 0;
- }
-
- icalerror_check_arg_rz( (dir!=0), "dir");
-
- if (stat(dir,&sbuf) != 0){
- icalerror_set_errno(ICAL_FILE_ERROR);
- return 0;
- }
-
- /* dir is not the name of a direectory*/
- if (!S_ISDIR(sbuf.st_mode)){
- icalerror_set_errno(ICAL_USAGE_ERROR);
- return 0;
- }
-
- icaldirset_lock(dir);
-
- impl = icaldirset_new_impl();
-
- if (impl ==0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- impl->directory = pvl_newlist();
- impl->directory_iterator = 0;
- impl->dir = (char*)strdup(dir);
- impl->gauge = 0;
- impl->first_component = 0;
- impl->cluster = 0;
-
- icaldirset_read_directory(impl);
-
- return (icaldirset*) impl;
-}
-
-void icaldirset_free(icaldirset* s)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)s;
- char* str;
-
- icaldirset_unlock(impl->dir);
-
- if(impl->dir !=0){
- free(impl->dir);
- }
-
- if(impl->gauge !=0){
- icalcomponent_free(impl->gauge);
- }
-
- if(impl->cluster !=0){
- icalfileset_free(impl->cluster);
- }
-
- while(impl->directory !=0 && (str=pvl_pop(impl->directory)) != 0){
- free(str);
- }
-
- if(impl->directory != 0){
- pvl_free(impl->directory);
- }
-
- impl->directory = 0;
- impl->directory_iterator = 0;
- impl->dir = 0;
- impl->gauge = 0;
- impl->first_component = 0;
-
- free(impl);
-
-}
-
-/* icaldirset_next_uid_number updates a serial number in the Store
- directory in a file called SEQUENCE */
-
-int icaldirset_next_uid_number(icaldirset* store)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
- char sequence = 0;
- char temp[128];
- char filename[ICAL_PATH_MAX];
- char *r;
- FILE *f;
- struct stat sbuf;
-
- icalerror_check_arg_rz( (store!=0), "store");
-
- sprintf(filename,"%s/%s",impl->dir,"SEQUENCE");
-
- /* Create the file if it does not exist.*/
- if (stat(filename,&sbuf) == -1 || !S_ISREG(sbuf.st_mode)){
-
- f = fopen(filename,"w");
- if (f != 0){
- fprintf(f,"0");
- fclose(f);
- } else {
- icalerror_warn("Can't create SEQUENCE file in icaldirset_next_uid_number");
- return 0;
- }
-
- }
-
- if ( (f = fopen(filename,"r+")) != 0){
-
- rewind(f);
- r = fgets(temp,128,f);
-
- if (r == 0){
- sequence = 1;
- } else {
- sequence = atoi(temp)+1;
- }
-
- rewind(f);
-
- fprintf(f,"%d",sequence);
-
- fclose(f);
-
- return sequence;
-
- } else {
- icalerror_warn("Can't create SEQUENCE file in icaldirset_next_uid_number");
- return 0;
- }
-
-}
-
-icalerrorenum icaldirset_next_cluster(icaldirset* store)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
- char path[ICAL_PATH_MAX];
-
- if (impl->directory_iterator == 0){
- icalerror_set_errno(ICAL_INTERNAL_ERROR);
- return ICAL_INTERNAL_ERROR;
- }
- impl->directory_iterator = pvl_next(impl->directory_iterator);
-
- if (impl->directory_iterator == 0){
- /* There are no more clusters */
- if(impl->cluster != 0){
- icalfileset_free(impl->cluster);
- impl->cluster = 0;
- }
- return ICAL_NO_ERROR;
- }
-
- sprintf(path,"%s/%s",impl->dir,(char*)pvl_data(impl->directory_iterator));
-
- icalfileset_free(impl->cluster);
-
- impl->cluster = icalfileset_new(path);
-
- return icalerrno;
-}
-
-void icaldirset_add_uid(icaldirset* store, icaldirset* comp)
-{
- char uidstring[ICAL_PATH_MAX];
- icalproperty *uid;
- struct utsname unamebuf;
-
- icalerror_check_arg_rv( (store!=0), "store");
- icalerror_check_arg_rv( (comp!=0), "comp");
-
- uid = icalcomponent_get_first_property(comp,ICAL_UID_PROPERTY);
-
- if (uid == 0) {
-
- uname(&unamebuf);
-
- sprintf(uidstring,"%d-%s",(int)getpid(),unamebuf.nodename);
-
- uid = icalproperty_new_uid(uidstring);
- icalcomponent_add_property(comp,uid);
- } else {
-
- strcpy(uidstring,icalproperty_get_uid(uid));
- }
-}
-
-
-/* This assumes that the top level component is a VCALENDAR, and there
- is an inner component of type VEVENT, VTODO or VJOURNAL. The inner
- component must have a DTAMP property */
-
-icalerrorenum icaldirset_add_component(icaldirset* store, icaldirset* comp)
-{
- struct icaldirset_impl *impl;
- char clustername[ICAL_PATH_MAX];
- icalproperty *dt;
- icalvalue *v;
- struct icaltimetype tm;
- icalerrorenum error = ICAL_NO_ERROR;
- icalcomponent *inner;
-
- impl = (struct icaldirset_impl*)store;
- icalerror_check_arg_rz( (store!=0), "store");
- icalerror_check_arg_rz( (comp!=0), "comp");
-
- errno = 0;
-
- icaldirset_add_uid(store,comp);
-
- /* Determine which cluster this object belongs in. This is a HACK */
-
- for(inner = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
- inner != 0;
- inner = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
-
- dt = icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY);
-
- if (dt != 0){
- break;
- }
- }
-
- if (dt == 0){
-
- for(inner = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
- inner != 0;
- inner = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
-
- dt = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY);
-
- if (dt != 0){
- break;
- }
- }
-
- }
-
- if (dt == 0){
-
-
- icalerror_warn("The component does not have a DTSTAMP or DTSTART property, so it cannot be added to the store");
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return ICAL_BADARG_ERROR;
- }
-
- v = icalproperty_get_value(dt);
-
- tm = icalvalue_get_datetime(v);
-
- snprintf(clustername,ICAL_PATH_MAX,"%s/%04d%02d",impl->dir,tm.year,tm.month);
-
- /* Load the cluster and insert the object */
-
- if(impl->cluster != 0 &&
- strcmp(clustername,icalfileset_path(impl->cluster)) != 0 ){
- icalfileset_free(impl->cluster);
- impl->cluster = 0;
- }
-
- if (impl->cluster == 0){
- impl->cluster = icalfileset_new(clustername);
-
- if (impl->cluster == 0){
- error = icalerrno;
- }
- }
-
- if (error != ICAL_NO_ERROR){
- icalerror_set_errno(error);
- return error;
- }
-
- /* Add the component to the cluster */
-
- icalfileset_add_component(impl->cluster,comp);
-
- icalfileset_mark(impl->cluster);
-
- return ICAL_NO_ERROR;
-}
-
-/* Remove a component in the current cluster. HACK. This routine is a
- "friend" of icalfileset, and breaks its encapsulation. It was
- either do it this way, or add several layers of interfaces that had
- no other use. */
-icalerrorenum icaldirset_remove_component(icaldirset* store, icaldirset* comp)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
-
- struct icalfileset_impl *filesetimpl =
- (struct icalfileset_impl*)impl->cluster;
-
- icalcomponent *filecomp = filesetimpl->cluster;
-
- icalcompiter i;
- int found = 0;
-
- icalerror_check_arg_re((store!=0),"store",ICAL_BADARG_ERROR);
- icalerror_check_arg_re((comp!=0),"comp",ICAL_BADARG_ERROR);
- icalerror_check_arg_re((impl->cluster!=0),"Cluster pointer",ICAL_USAGE_ERROR);
-
- for(i = icalcomponent_begin_component(filecomp,ICAL_ANY_COMPONENT);
- icalcompiter_deref(&i)!= 0; icalcompiter_next(&i)){
-
- icalcomponent *this = icalcompiter_deref(&i);
-
- if (this == comp){
- found = 1;
- break;
- }
- }
-
- if (found != 1){
- icalerror_warn("icaldirset_remove_component: component is not part of current cluster");
- icalerror_set_errno(ICAL_USAGE_ERROR);
- return ICAL_USAGE_ERROR;
- }
-
- icalfileset_remove_component(impl->cluster,comp);
-
- icalfileset_mark(impl->cluster);
-
- /* If the removal emptied the fileset, get the next fileset */
- if( icalfileset_count_components(impl->cluster,ICAL_ANY_COMPONENT)==0){
-
- icalerrorenum error = icaldirset_next_cluster(store);
-
- if(impl->cluster != 0 && error == ICAL_NO_ERROR){
- icalfileset_get_first_component(impl->cluster);
- } else {
- /* HACK. Not strictly correct for impl->cluster==0 */
- return error;
- }
- } else {
- /* Do nothing */
- }
-
- return ICAL_NO_ERROR;
-}
-
-
-
-int icaldirset_count_components(icaldirset* store,
- icalcomponent_kind kind)
-{
- /* HACK, not implemented */
-
- assert(0);
-
- return 0;
-}
-
-
-icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c)
-{
- fprintf(stderr," icaldirset_fetch_match is not implemented\n");
- assert(0);
-}
-
-
-icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid)
-{
- icalcomponent *gauge;
- icalcomponent *old_gauge;
- icalcomponent *c;
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
-
- icalerror_check_arg_rz( (store!=0), "store");
- icalerror_check_arg_rz( (uid!=0), "uid");
-
- gauge =
- icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_uid(
- uid,
- icalparameter_new_xliccomparetype(
- ICAL_XLICCOMPARETYPE_EQUAL),
- 0),
- 0),
- 0);
-
- old_gauge = impl->gauge;
- impl->gauge = gauge;
-
- c= icaldirset_get_first_component(store);
-
- impl->gauge = old_gauge;
-
- icalcomponent_free(gauge);
-
- return c;
-}
-
-
-int icaldirset_has_uid(icaldirset* store, const char* uid)
-{
- icalcomponent *c;
-
- icalerror_check_arg_rz( (store!=0), "store");
- icalerror_check_arg_rz( (uid!=0), "uid");
-
- /* HACK. This is a temporary implementation. _has_uid should use a
- database, and _fetch should use _has_uid, not the other way
- around */
- c = icaldirset_fetch(store,uid);
-
- return c!=0;
-
-}
-
-
-icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge)
- {
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
-
- icalerror_check_arg_re( (store!=0), "store",ICAL_BADARG_ERROR);
- icalerror_check_arg_re( (gauge!=0), "gauge",ICAL_BADARG_ERROR);
-
- if (!icalcomponent_is_valid(gauge)){
- return ICAL_BADARG_ERROR;
- }
-
- impl->gauge = gauge;
-
- return ICAL_NO_ERROR;
-}
-
-
-icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *old,
- icalcomponent *new)
-{
- assert(0);
- return ICAL_NO_ERROR; /* HACK, not implemented */
-
-}
-
-
-void icaldirset_clear(icaldirset* store)
-{
-
- assert(0);
- return;
- /* HACK, not implemented */
-}
-
-icalcomponent* icaldirset_get_current_component(icaldirset* store)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
-
- if(impl->cluster == 0){
- icaldirset_get_first_component(store);
- }
-
- return icalfileset_get_current_component(impl->cluster);
-
-}
-
-
-icalcomponent* icaldirset_get_first_component(icaldirset* store)
-{
- struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
- icalerrorenum error;
- char path[ICAL_PATH_MAX];
-
- error = icaldirset_read_directory(impl);
-
- if (error != ICAL_NO_ERROR){
- icalerror_set_errno(error);
- return 0;
- }
-
- impl->directory_iterator = pvl_head(impl->directory);
-
- if (impl->directory_iterator == 0){
- icalerror_set_errno(error);
- return 0;
- }
-
- snprintf(path,ICAL_PATH_MAX,"%s/%s",impl->dir,(char*)pvl_data(impl->directory_iterator));
-
- /* If the next cluster we need is different than the current cluster,
- delete the current one and get a new one */
-
- if(impl->cluster != 0 && strcmp(path,icalfileset_path(impl->cluster)) != 0 ){
- icalfileset_free(impl->cluster);
- impl->cluster = 0;
- }
-
- if (impl->cluster == 0){
- impl->cluster = icalfileset_new(path);
-
- if (impl->cluster == 0){
- error = icalerrno;
- }
- }
-
- if (error != ICAL_NO_ERROR){
- icalerror_set_errno(error);
- return 0;
- }
-
- impl->first_component = 1;
-
- return icaldirset_get_next_component(store);
-}
-
-icalcomponent* icaldirset_get_next_component(icaldirset* store)
-{
- struct icaldirset_impl *impl;
- icalcomponent *c;
- icalerrorenum error;
-
- icalerror_check_arg_rz( (store!=0), "store");
-
- impl = (struct icaldirset_impl*)store;
-
- if(impl->cluster == 0){
-
- icalerror_warn("icaldirset_get_next_component called with a NULL cluster (Caller must call icaldirset_get_first_component first");
- icalerror_set_errno(ICAL_USAGE_ERROR);
- return 0;
-
- }
-
- /* Set the component iterator for the following for loop */
- if (impl->first_component == 1){
- icalfileset_get_first_component(impl->cluster);
- impl->first_component = 0;
- } else {
- icalfileset_get_next_component(impl->cluster);
- }
-
-
- while(1){
- /* Iterate through all of the objects in the cluster*/
- for( c = icalfileset_get_current_component(impl->cluster);
- c != 0;
- c = icalfileset_get_next_component(impl->cluster)){
-
- /* If there is a gauge defined and the component does not
- pass the gauge, skip the rest of the loop */
-
-#if 0 /* HACK */
- if (impl->gauge != 0 && icalgauge_test(c,impl->gauge) == 0){
- continue;
- }
-#else
- assert(0); /* icalgauge_test needs to be fixed */
-#endif
- /* Either there is no gauge, or the component passed the
- gauge, so return it*/
-
- return c;
- }
-
- /* Fell through the loop, so the component we want is not
- in this cluster. Load a new cluster and try again.*/
-
- error = icaldirset_next_cluster(store);
-
- if(impl->cluster == 0 || error != ICAL_NO_ERROR){
- /* No more clusters */
- return 0;
- } else {
- c = icalfileset_get_first_component(impl->cluster);
-
- return c;
- }
-
- }
-
- return 0; /* Should never get here */
-}
-
-
-
-
-
-
-
diff --git a/libical/src/libicalss/icaldirset.h b/libical/src/libicalss/icaldirset.h
deleted file mode 100644
index 7d205ecf0a..0000000000
--- a/libical/src/libicalss/icaldirset.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icaldirset.h
- CREATOR: eric 28 November 1999
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALDIRSET_H
-#define ICALDIRSET_H
-
-#include "ical.h"
-
-/* icaldirset Routines for storing, fetching, and searching for ical
- * objects in a database */
-
-typedef void icaldirset;
-
-
-icaldirset* icaldirset_new(const char* path);
-
-void icaldirset_free(icaldirset* store);
-
-const char* icaldirset_path(icaldirset* store);
-
-/* Mark the cluster as changed, so it will be written to disk when it
- is freed. Commit writes to disk immediately*/
-void icaldirset_mark(icaldirset* store);
-icalerrorenum icaldirset_commit(icaldirset* store);
-
-icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent* comp);
-icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent* comp);
-
-int icaldirset_count_components(icaldirset* store,
- icalcomponent_kind kind);
-
-/* Restrict the component returned by icaldirset_first, _next to those
- that pass the gauge. _clear removes the gauge. */
-icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge);
-void icaldirset_clear(icaldirset* store);
-
-/* Get a component by uid */
-icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid);
-int icaldirset_has_uid(icaldirset* store, const char* uid);
-icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c);
-
-/* Modify components according to the MODIFY method of CAP. Works on
- the currently selected components. */
-icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc,
- icalcomponent *newc);
-
-/* Iterate through the components. If a guage has been defined, these
- will skip over components that do not pass the gauge */
-
-icalcomponent* icaldirset_get_current_component(icaldirset* store);
-icalcomponent* icaldirset_get_first_component(icaldirset* store);
-icalcomponent* icaldirset_get_next_component(icaldirset* store);
-
-#endif /* !ICALDIRSET_H */
-
-
-
diff --git a/libical/src/libicalss/icaldirsetimpl.h b/libical/src/libicalss/icaldirsetimpl.h
deleted file mode 100644
index 0e69ba2f2e..0000000000
--- a/libical/src/libicalss/icaldirsetimpl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icaldirsetimpl.h
- CREATOR: eric 21 Aug 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-/* This definition is in its own file so it can be kept out of the
- main header file, but used by "friend classes" like icalset*/
-
-#define ICALDIRSET_ID "dset"
-
-struct icaldirset_impl
-{
- char id[5]; /* "dset" */
- char* dir;
- icalcomponent* gauge;
- icaldirset* cluster;
- int first_component;
- pvl_list directory;
- pvl_elem directory_iterator;
-};
diff --git a/libical/src/libicalss/icalfileset.c b/libical/src/libicalss/icalfileset.c
deleted file mode 100644
index b6e3430f7d..0000000000
--- a/libical/src/libicalss/icalfileset.c
+++ /dev/null
@@ -1,637 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalfileset.c
- CREATOR: eric 23 December 1999
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalfileset.h"
-#include "icalgauge.h"
-#include <errno.h>
-#include <sys/stat.h> /* for stat */
-#include <unistd.h> /* for stat, getpid */
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h> /* for fcntl */
-#include <unistd.h> /* for fcntl */
-#include "icalfilesetimpl.h"
-
-extern int errno;
-
-int icalfileset_lock(icalfileset *cluster);
-int icalfileset_unlock(icalfileset *cluster);
-icalerrorenum icalfileset_read_file(icalfileset* cluster, mode_t mode);
-int icalfileset_filesize(icalfileset* cluster);
-
-icalerrorenum icalfileset_create_cluster(const char *path);
-
-icalfileset* icalfileset_new_impl()
-{
- struct icalfileset_impl* impl;
-
- if ( ( impl = (struct icalfileset_impl*)
- malloc(sizeof(struct icalfileset_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- errno = ENOMEM;
- return 0;
- }
-
- memset(impl,0,sizeof(struct icalfileset_impl));
-
- strcpy(impl->id,ICALFILESET_ID);
-
- return impl;
-}
-
-
-icalfileset* icalfileset_new(const char* path)
-{
- return icalfileset_new_open(path, O_RDWR|O_CREAT, 0664);
-}
-
-icalfileset* icalfileset_new_open(const char* path, int flags, mode_t mode)
-{
- struct icalfileset_impl *impl = icalfileset_new_impl();
- struct icaltimetype tt;
- off_t cluster_file_size;
-
- memset(&tt,0,sizeof(struct icaltimetype));
-
- icalerror_clear_errno();
- icalerror_check_arg_rz( (path!=0), "path");
-
- if (impl == 0){
- return 0;
- }
-
- impl->path = strdup(path);
-
- cluster_file_size = icalfileset_filesize(impl);
-
- if(cluster_file_size < 0){
- icalfileset_free(impl);
- return 0;
- }
-
- impl->fd = open(impl->path,flags, mode);
-
- if (impl->fd < 0){
- icalerror_set_errno(ICAL_FILE_ERROR);
- icalfileset_free(impl);
- return 0;
- }
-
- icalfileset_lock(impl);
-
- if(cluster_file_size > 0 ){
- icalerrorenum error;
- if((error = icalfileset_read_file(impl,mode))!= ICAL_NO_ERROR){
- icalfileset_free(impl);
- return 0;
- }
- }
-
- if(impl->cluster == 0){
- impl->cluster = icalcomponent_new(ICAL_XROOT_COMPONENT);
- }
-
- return impl;
-}
-
-char* icalfileset_read_from_file(char *s, size_t size, void *d)
-{
-
- char* p = s;
- int fd = (int)d;
-
- /* Simulate fgets -- read single characters and stop at '\n' */
-
- for(p=s; p<s+size-1;p++){
-
- if(read(fd,p,1) != 1 || *p=='\n'){
- p++;
- break;
- }
- }
-
- *p = '\0';
-
- if(*s == 0){
- return 0;
- } else {
- return s;
- }
-
-}
-
-
-icalerrorenum icalfileset_read_file(icalfileset* cluster,mode_t mode)
-{
-
- icalparser *parser;
-
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
-
- parser = icalparser_new();
- icalparser_set_gen_data(parser,(void*)impl->fd);
- impl->cluster = icalparser_parse(parser,icalfileset_read_from_file);
- icalparser_free(parser);
-
- if (impl->cluster == 0 || icalerrno != ICAL_NO_ERROR){
- icalerror_set_errno(ICAL_PARSE_ERROR);
- return ICAL_PARSE_ERROR;
- }
-
- if (icalcomponent_isa(impl->cluster) != ICAL_XROOT_COMPONENT){
- /* The parser got a single component, so it did not put it in
- an XROOT. */
- icalcomponent *cl = impl->cluster;
- impl->cluster = icalcomponent_new(ICAL_XROOT_COMPONENT);
- icalcomponent_add_component(impl->cluster,cl);
- }
-
- return ICAL_NO_ERROR;
-
-}
-
-int icalfileset_filesize(icalfileset* cluster)
-{
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
- int cluster_file_size;
- struct stat sbuf;
-
- if (stat(impl->path,&sbuf) != 0){
-
- /* A file by the given name does not exist, or there was
- another error */
- cluster_file_size = 0;
- if (errno == ENOENT) {
- /* It was because the file does not exist */
- return 0;
- } else {
- /* It was because of another error */
- icalerror_set_errno(ICAL_FILE_ERROR);
- return -1;
- }
- } else {
- /* A file by the given name exists, but is it a regular file? */
-
- if (!S_ISREG(sbuf.st_mode)){
- /* Nope, not a regular file */
- icalerror_set_errno(ICAL_FILE_ERROR);
- return -1;
- } else {
- /* Lets assume that it is a file of the right type */
- return sbuf.st_size;
- }
- }
-
- /*return -1; not reached*/
-}
-
-void icalfileset_free(icalfileset* cluster)
-{
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_rv((cluster!=0),"cluster");
-
- if (impl->cluster != 0){
- icalfileset_commit(cluster);
- icalcomponent_free(impl->cluster);
- impl->cluster=0;
- }
-
- if(impl->fd > 0){
- icalfileset_unlock(impl);
- close(impl->fd);
- impl->fd = -1;
- }
-
- if(impl->path != 0){
- free(impl->path);
- impl->path = 0;
- }
-
- free(impl);
-}
-
-const char* icalfileset_path(icalfileset* cluster)
-{
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
- icalerror_check_arg_rz((cluster!=0),"cluster");
-
- return impl->path;
-}
-
-
-int icalfileset_lock(icalfileset *cluster)
-{
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
- struct flock lock;
- int rtrn;
-
- icalerror_check_arg_rz((impl->fd>0),"impl->fd");
- errno = 0;
- lock.l_type = F_WRLCK; /* F_RDLCK, F_WRLCK, F_UNLCK */
- lock.l_start = 0; /* byte offset relative to l_whence */
- lock.l_whence = SEEK_SET; /* SEEK_SET, SEEK_CUR, SEEK_END */
- lock.l_len = 0; /* #bytes (0 means to EOF) */
-
- rtrn = fcntl(impl->fd, F_SETLKW, &lock);
-
- return rtrn;
-}
-
-int icalfileset_unlock(icalfileset *cluster)
-{
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
- struct flock lock;
- icalerror_check_arg_rz((impl->fd>0),"impl->fd");
-
- lock.l_type = F_WRLCK; /* F_RDLCK, F_WRLCK, F_UNLCK */
- lock.l_start = 0; /* byte offset relative to l_whence */
- lock.l_whence = SEEK_SET; /* SEEK_SET, SEEK_CUR, SEEK_END */
- lock.l_len = 0; /* #bytes (0 means to EOF) */
-
- return (fcntl(impl->fd, F_UNLCK, &lock));
-
-}
-
-#ifdef ICAL_SAFESAVES
-int icalfileset_safe_saves=1;
-#else
-int icalfileset_safe_saves=0;
-#endif
-
-icalerrorenum icalfileset_commit(icalfileset* cluster)
-{
- char tmp[ICAL_PATH_MAX];
- char *str;
- icalcomponent *c;
- off_t write_size=0;
-
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_re((impl!=0),"cluster",ICAL_BADARG_ERROR);
-
- icalerror_check_arg_re((impl->fd>0),"impl->fd is invalid",
- ICAL_INTERNAL_ERROR) ;
-
- if (impl->changed == 0 ){
- return ICAL_NO_ERROR;
- }
-
- if(icalfileset_safe_saves == 1){
- snprintf(tmp,ICAL_PATH_MAX,"cp %s %s.bak",impl->path,impl->path);
-
- if(system(tmp) < 0){
- icalerror_set_errno(ICAL_FILE_ERROR);
- return ICAL_FILE_ERROR;
- }
- }
-
- if(lseek(impl->fd,SEEK_SET,0) < 0){
- icalerror_set_errno(ICAL_FILE_ERROR);
- return ICAL_FILE_ERROR;
- }
-
- for(c = icalcomponent_get_first_component(impl->cluster,ICAL_ANY_COMPONENT);
- c != 0;
- c = icalcomponent_get_next_component(impl->cluster,ICAL_ANY_COMPONENT)){
- int sz;
-
- str = icalcomponent_as_ical_string(c);
-
- sz=write(impl->fd,str,strlen(str));
-
- if ( sz != strlen(str)){
- perror("write");
- icalerror_set_errno(ICAL_FILE_ERROR);
- return ICAL_FILE_ERROR;
- }
-
- write_size += sz;
- }
-
- impl->changed = 0;
-
- if(ftruncate(impl->fd,write_size) < 0){
- return ICAL_FILE_ERROR;
- }
-
- return ICAL_NO_ERROR;
-
-}
-
-void icalfileset_mark(icalfileset* cluster){
-
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_rv((impl!=0),"cluster");
-
- impl->changed = 1;
-
-}
-
-icalcomponent* icalfileset_get_component(icalfileset* cluster){
- struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_re((impl!=0),"cluster",ICAL_BADARG_ERROR);
-
- return impl->cluster;
-}
-
-
-/* manipulate the components in the cluster */
-
-icalerrorenum icalfileset_add_component(icalfileset *cluster,
- icalcomponent* child)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_re((cluster!=0),"cluster", ICAL_BADARG_ERROR);
- icalerror_check_arg_re((child!=0),"child",ICAL_BADARG_ERROR);
-
- icalcomponent_add_component(impl->cluster,child);
-
- icalfileset_mark(cluster);
-
- return ICAL_NO_ERROR;
-
-}
-
-icalerrorenum icalfileset_remove_component(icalfileset *cluster,
- icalcomponent* child)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_re((cluster!=0),"cluster",ICAL_BADARG_ERROR);
- icalerror_check_arg_re((child!=0),"child",ICAL_BADARG_ERROR);
-
- icalcomponent_remove_component(impl->cluster,child);
-
- icalfileset_mark(cluster);
-
- return ICAL_NO_ERROR;
-}
-
-int icalfileset_count_components(icalfileset *cluster,
- icalcomponent_kind kind)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
-
- if(cluster == 0){
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return -1;
- }
-
- return icalcomponent_count_components(impl->cluster,kind);
-}
-
-icalerrorenum icalfileset_select(icalfileset* set, icalgauge* gauge)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)set;
-
- icalerror_check_arg_re(gauge!=0,"guage",ICAL_BADARG_ERROR);
-
- impl->gauge = gauge;
-
- return ICAL_NO_ERROR;
-}
-
-void icalfileset_clear(icalfileset* gauge)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)gauge;
-
- impl->gauge = 0;
-
-}
-
-icalcomponent* icalfileset_fetch(icalfileset* store,const char* uid)
-{
- icalcompiter i;
- struct icalfileset_impl* impl = (struct icalfileset_impl*)store;
-
- for(i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
- icalcompiter_deref(&i)!= 0; icalcompiter_next(&i)){
-
- icalcomponent *this = icalcompiter_deref(&i);
- icalcomponent *inner = icalcomponent_get_first_real_component(this);
- icalcomponent *p;
- const char *this_uid;
-
- if(inner != 0){
- p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
- this_uid = icalproperty_get_uid(p);
-
- if(this_uid==0){
- icalerror_warn("icalfileset_fetch found a component with no UID");
- continue;
- }
-
- if (strcmp(uid,this_uid)==0){
- return this;
- }
- }
- }
-
- return 0;
-}
-
-int icalfileset_has_uid(icalfileset* store,const char* uid)
-{
- assert(0); /* HACK, not implemented */
- return 0;
-}
-
-/******* support routines for icalfileset_fetch_match *********/
-
-struct icalfileset_id{
- char* uid;
- char* recurrence_id;
- int sequence;
-};
-
-void icalfileset_id_free(struct icalfileset_id *id)
-{
- if(id->recurrence_id != 0){
- free(id->recurrence_id);
- }
-
- if(id->uid != 0){
- free(id->uid);
- }
-
-}
-
-struct icalfileset_id icalfileset_get_id(icalcomponent* comp)
-{
-
- icalcomponent *inner;
- struct icalfileset_id id;
- icalproperty *p;
-
- inner = icalcomponent_get_first_real_component(comp);
-
- p = icalcomponent_get_first_property(inner, ICAL_UID_PROPERTY);
-
- assert(p!= 0);
-
- id.uid = strdup(icalproperty_get_uid(p));
-
- p = icalcomponent_get_first_property(inner, ICAL_SEQUENCE_PROPERTY);
-
- if(p == 0) {
- id.sequence = 0;
- } else {
- id.sequence = icalproperty_get_sequence(p);
- }
-
- p = icalcomponent_get_first_property(inner, ICAL_RECURRENCEID_PROPERTY);
-
- if (p == 0){
- id.recurrence_id = 0;
- } else {
- icalvalue *v;
- v = icalproperty_get_value(p);
- id.recurrence_id = strdup(icalvalue_as_ical_string(v));
-
- assert(id.recurrence_id != 0);
- }
-
- return id;
-}
-
-/* Find the component that is related to the given
- component. Currently, it just matches based on UID and
- RECURRENCE-ID */
-icalcomponent* icalfileset_fetch_match(icalfileset* set, icalcomponent *comp)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)set;
- icalcompiter i;
-
- struct icalfileset_id comp_id, match_id;
-
- comp_id = icalfileset_get_id(comp);
-
- for(i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
- icalcompiter_deref(&i)!= 0; icalcompiter_next(&i)){
-
- icalcomponent *match = icalcompiter_deref(&i);
-
- match_id = icalfileset_get_id(match);
-
- if(strcmp(comp_id.uid, match_id.uid) == 0 &&
- ( comp_id.recurrence_id ==0 ||
- strcmp(comp_id.recurrence_id, match_id.recurrence_id) ==0 )){
-
- /* HACK. What to do with SEQUENCE? */
-
- icalfileset_id_free(&match_id);
- icalfileset_id_free(&comp_id);
- return match;
-
- }
-
- icalfileset_id_free(&match_id);
- }
-
- icalfileset_id_free(&comp_id);
- return 0;
-
-}
-
-
-icalerrorenum icalfileset_modify(icalfileset* store, icalcomponent *old,
- icalcomponent *new)
-{
- assert(0); /* HACK, not implemented */
- return ICAL_NO_ERROR;
-}
-
-
-/* Iterate through components */
-icalcomponent* icalfileset_get_current_component (icalfileset* cluster)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
-
- icalerror_check_arg_rz((cluster!=0),"cluster");
-
- return icalcomponent_get_current_component(impl->cluster);
-}
-
-
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
- icalcomponent *c=0;
-
- icalerror_check_arg_rz((cluster!=0),"cluster");
-
- do {
- if (c == 0){
- c = icalcomponent_get_first_component(impl->cluster,
- ICAL_ANY_COMPONENT);
- } else {
- c = icalcomponent_get_next_component(impl->cluster,
- ICAL_ANY_COMPONENT);
- }
-
- if(c != 0 && (impl->gauge == 0 ||
- icalgauge_compare(impl->gauge,c) == 1)){
- return c;
- }
-
- } while(c != 0);
-
-
- return 0;
-}
-
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster)
-{
- struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
- icalcomponent *c;
-
- icalerror_check_arg_rz((cluster!=0),"cluster");
-
- do {
- c = icalcomponent_get_next_component(impl->cluster,
- ICAL_ANY_COMPONENT);
-
- if(c != 0 && (impl->gauge == 0 ||
- icalgauge_compare(impl->gauge,c) == 1)){
- return c;
- }
-
- } while(c != 0);
-
-
- return 0;
-}
-
diff --git a/libical/src/libicalss/icalfileset.h b/libical/src/libicalss/icalfileset.h
deleted file mode 100644
index c785921463..0000000000
--- a/libical/src/libicalss/icalfileset.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalfileset.h
- CREATOR: eric 23 December 1999
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALFILESET_H
-#define ICALFILESET_H
-
-#include "ical.h"
-#include "icalset.h"
-#include "icalgauge.h"
-#include <sys/types.h> /* For open() flags and mode */
-#include <sys/stat.h> /* For open() flags and mode */
-#include <fcntl.h> /* For open() flags and mode */
-
-extern int icalfileset_safe_saves;
-
-typedef void icalfileset;
-
-
-/* icalfileset
- icalfilesetfile
- icalfilesetdir
-*/
-
-
-icalfileset* icalfileset_new(const char* path);
-
-/* Like _new, but takes open() flags for opening the file */
-icalfileset* icalfileset_new_open(const char* path,
- int flags, mode_t mode);
-
-void icalfileset_free(icalfileset* cluster);
-
-const char* icalfileset_path(icalfileset* cluster);
-
-/* Mark the cluster as changed, so it will be written to disk when it
- is freed. Commit writes to disk immediately. */
-void icalfileset_mark(icalfileset* cluster);
-icalerrorenum icalfileset_commit(icalfileset* cluster);
-
-icalerrorenum icalfileset_add_component(icalfileset* cluster,
- icalcomponent* child);
-
-icalerrorenum icalfileset_remove_component(icalfileset* cluster,
- icalcomponent* child);
-
-int icalfileset_count_components(icalfileset* cluster,
- icalcomponent_kind kind);
-
-/* Restrict the component returned by icalfileset_first, _next to those
- that pass the gauge. _clear removes the gauge */
-icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge);
-void icalfileset_clear(icalfileset* store);
-
-/* Get and search for a component by uid */
-icalcomponent* icalfileset_fetch(icalfileset* cluster, const char* uid);
-int icalfileset_has_uid(icalfileset* cluster, const char* uid);
-icalcomponent* icalfileset_fetch_match(icalfileset* set, icalcomponent *c);
-
-
-/* Modify components according to the MODIFY method of CAP. Works on
- the currently selected components. */
-icalerrorenum icalfileset_modify(icalfileset* store, icalcomponent *oldcomp,
- icalcomponent *newcomp);
-
-/* Iterate through components. If a guage has been defined, these
- will skip over components that do not pass the gauge */
-
-icalcomponent* icalfileset_get_current_component (icalfileset* cluster);
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster);
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster);
-/* Return a reference to the internal component. You probably should
- not be using this. */
-
-icalcomponent* icalfileset_get_component(icalfileset* cluster);
-
-
-#endif /* !ICALFILESET_H */
-
-
-
diff --git a/libical/src/libicalss/icalfilesetimpl.h b/libical/src/libicalss/icalfilesetimpl.h
deleted file mode 100644
index fcd3415121..0000000000
--- a/libical/src/libicalss/icalfilesetimpl.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalfilesetimpl.h
- CREATOR: eric 23 December 1999
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalgauge.h"
-
-/* This definition is in its own file so it can be kept out of the
- main header file, but used by "friend classes" like icaldirset*/
-
-#define ICALFILESET_ID "fset"
-
-struct icalfileset_impl {
-
- char id[5]; /*fset*/
- char *path;
- icalcomponent* cluster;
- icalgauge* gauge;
- int changed;
- int fd; /* file descriptor */
-};
-
diff --git a/libical/src/libicalss/icalgauge.c b/libical/src/libicalss/icalgauge.c
deleted file mode 100644
index b958ecfc9d..0000000000
--- a/libical/src/libicalss/icalgauge.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalgauge.c
- CREATOR: eric 23 December 1999
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#include "ical.h"
-#include "icalgauge.h"
-#include "icalgaugeimpl.h"
-#include <stdlib.h>
-
-extern char* input_buffer;
-extern char* input_buffer_p;
-int ssparse(void);
-
-struct icalgauge_impl *icalss_yy_gauge;
-
-icalgauge* icalgauge_new_from_sql(char* sql)
-{
- struct icalgauge_impl *impl;
-
- int r;
-
- if ( ( impl = (struct icalgauge_impl*)
- malloc(sizeof(struct icalgauge_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- impl->select = pvl_newlist();
- impl->from = pvl_newlist();
- impl->where = pvl_newlist();
-
- icalss_yy_gauge = impl;
-
- input_buffer_p = input_buffer = sql;
- r = ssparse();
-
- return impl;
-}
-
-
-void icalgauge_free(icalgauge* gauge)
-{
- struct icalgauge_impl *impl = (struct icalgauge_impl*)gauge;
- struct icalgauge_where *w;
-
- assert(impl->select != 0);
- assert(impl->where != 0);
- assert(impl->from != 0);
-
- if(impl->select){
- while( (w=pvl_pop(impl->select)) != 0){
- if(w->value != 0){
- free(w->value);
- }
- free(w);
- }
- pvl_free(impl->select);
- }
-
- if(impl->where){
- while( (w=pvl_pop(impl->where)) != 0){
-
- if(w->value != 0){
- free(w->value);
- }
- free(w);
- }
- pvl_free(impl->where);
- }
-
- if(impl->from){
- pvl_free(impl->from);
- }
-
-}
-
-/* Convert a VQUERY component into a gauge */
-icalcomponent* icalgauge_make_gauge(icalcomponent* query);
-
-/* icaldirset_test compares a component against a gauge, and returns
- true if the component passes the test
-
- The gauge is a VCALENDAR component that specifies how to test the
- target components. The guage holds a collection of VEVENT, VTODO or
- VJOURNAL sub-components. Each of the sub-components has a
- collection of properties that are compared to corresponding
- properties in the target component, according to the
- X-LIC-COMPARETYPE parameters to the gauge's properties.
-
- When a gauge has several sub-components, the results of testing the
- target against each of them is ORed together - the target
- component will pass if it matches any of the sub-components in the
- gauge. However, the results of matching the properties in a
- sub-component are ANDed -- the target must match every property in
- a gauge sub-component to match the sub-component.
-
- Here is an example:
-
- BEGIN:XROOT
- DTSTART;X-LIC-COMPARETYPE=LESS:19981025T020000
- ORGANIZER;X-LIC-COMPARETYPE=EQUAL:mrbig@host.com
- END:XROOT
- BEGIN:XROOT
- LOCATION;X-LIC-COMPARETYPE=EQUAL:McNary's Pub
- END:XROOT
-
- This gauge has two sub-components; one which will match a VEVENT
- based on start time, and organizer, and another that matches based
- on LOCATION. A target component will pass the test if it matched
- either of the sub-components.
-
- */
-
-
-int icalgauge_compare_recurse(icalcomponent* comp, icalcomponent* gauge)
-{
- int pass = 1,localpass = 0;
- icalproperty *p;
- icalcomponent *child,*subgauge;
- icalcomponent_kind gaugekind, compkind;
-
- icalerror_check_arg_rz( (comp!=0), "comp");
- icalerror_check_arg_rz( (gauge!=0), "gauge");
-
- gaugekind = icalcomponent_isa(gauge);
- compkind = icalcomponent_isa(comp);
-
- if( ! (gaugekind == compkind || gaugekind == ICAL_ANY_COMPONENT) ){
- return 0;
- }
-
- /* Test properties. For each property in the gauge, search through
- the component for a similar property. If one is found, compare
- the two properties value with the comparison specified in the
- gauge with the X-LIC-COMPARETYPE parameter */
-
- for(p = icalcomponent_get_first_property(gauge,ICAL_ANY_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(gauge,ICAL_ANY_PROPERTY)){
-
- icalproperty* targetprop;
- icalparameter* compareparam;
- icalparameter_xliccomparetype compare;
- int rel; /* The relationship between the gauge and target values.*/
-
- /* Extract the comparison type from the gauge. If there is no
- comparison type, assume that it is "EQUAL" */
-
- compareparam = icalproperty_get_first_parameter(
- p,
- ICAL_XLICCOMPARETYPE_PARAMETER);
-
- if (compareparam!=0){
- compare = icalparameter_get_xliccomparetype(compareparam);
- } else {
- compare = ICAL_XLICCOMPARETYPE_EQUAL;
- }
-
- /* Find a property in the component that has the same type
- as the gauge property. HACK -- multiples of a single
- property type in the gauge will match only the first
- instance in the component */
-
- targetprop = icalcomponent_get_first_property(comp,
- icalproperty_isa(p));
-
- if(targetprop != 0){
-
- /* Compare the values of the gauge property and the target
- property */
-
- rel = icalvalue_compare(icalproperty_get_value(p),
- icalproperty_get_value(targetprop));
-
- /* Now see if the comparison is equavalent to the comparison
- specified in the gauge */
-
- if (rel == compare){
- localpass++;
- } else if (compare == ICAL_XLICCOMPARETYPE_LESSEQUAL &&
- ( rel == ICAL_XLICCOMPARETYPE_LESS ||
- rel == ICAL_XLICCOMPARETYPE_EQUAL)) {
- localpass++;
- } else if (compare == ICAL_XLICCOMPARETYPE_GREATEREQUAL &&
- ( rel == ICAL_XLICCOMPARETYPE_GREATER ||
- rel == ICAL_XLICCOMPARETYPE_EQUAL)) {
- localpass++;
- } else if (compare == ICAL_XLICCOMPARETYPE_NOTEQUAL &&
- ( rel == ICAL_XLICCOMPARETYPE_GREATER ||
- rel == ICAL_XLICCOMPARETYPE_LESS)) {
- localpass++;
- } else {
- localpass = 0;
- }
-
- pass = pass && (localpass>0);
- }
- }
-
- /* Test subcomponents. Look for a child component that has a
- counterpart in the gauge. If one is found, recursively call
- icaldirset_test */
-
- for(subgauge = icalcomponent_get_first_component(gauge,ICAL_ANY_COMPONENT);
- subgauge != 0;
- subgauge = icalcomponent_get_next_component(gauge,ICAL_ANY_COMPONENT)){
-
- gaugekind = icalcomponent_isa(subgauge);
-
- if (gaugekind == ICAL_ANY_COMPONENT){
- child = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
- } else {
- child = icalcomponent_get_first_component(comp,gaugekind);
- }
-
- if(child !=0){
- localpass = icalgauge_compare_recurse(child,subgauge);
- pass = pass && localpass;
- } else {
- pass = 0;
- }
- }
-
- return pass;
-}
-
-
-int icalgauge_compare(icalgauge* gauge,icalcomponent* comp)
-{
-
- struct icalgauge_impl *impl = (struct icalgauge_impl*)gauge;
- icalcomponent *inner;
- int local_pass = 0;
- int last_clause = 1, this_clause = 1;
- pvl_elem e;
-
- icalerror_check_arg_rz( (comp!=0), "comp");
- icalerror_check_arg_rz( (gauge!=0), "gauge");
-
- inner = icalcomponent_get_first_real_component(comp);
-
- if(inner == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return 0;
- }
-
-
- /* Check that this component is one of the FROM types */
- local_pass = 0;
- for(e = pvl_head(impl->from);e!=0;e=pvl_next(e)){
- icalcomponent_kind k = (icalcomponent_kind)pvl_data(e);
-
- if(k == icalcomponent_isa(inner)){
- local_pass=1;
- }
- }
-
- if(local_pass == 0){
- return 0;
- }
-
-
- /* Check each where clause against the component */
- for(e = pvl_head(impl->where);e!=0;e=pvl_next(e)){
- struct icalgauge_where *w = pvl_data(e);
- icalcomponent *sub_comp;
- icalvalue *v;
- icalproperty *prop;
- icalvalue_kind vk;
-
- if(w->prop == ICAL_NO_PROPERTY || w->value == 0){
- icalerror_set_errno(ICAL_INTERNAL_ERROR);
- return 0;
- }
-
- /* First, create a value from the gauge */
- vk = icalenum_property_kind_to_value_kind(w->prop);
-
- if(vk == ICAL_NO_VALUE){
- icalerror_set_errno(ICAL_INTERNAL_ERROR);
- return 0;
- }
-
- v = icalvalue_new_from_string(vk,w->value);
-
- if (v == 0){
- /* Keep error set by icalvalue_from-string*/
- return 0;
- }
-
- /* Now find the corresponding property in the component,
- descending into a sub-component if necessary */
-
- if(w->comp == ICAL_NO_COMPONENT){
- sub_comp = inner;
- } else {
- sub_comp = icalcomponent_get_first_component(inner,w->comp);
- if(sub_comp == 0){
- return 0;
- }
- }
-
- this_clause = 0;
- local_pass = 0;
- for(prop = icalcomponent_get_first_property(sub_comp,w->prop);
- prop != 0;
- prop = icalcomponent_get_next_property(sub_comp,w->prop)){
- icalvalue* prop_value;
- icalgaugecompare relation;
-
- prop_value = icalproperty_get_value(prop);
-
- relation = (icalgaugecompare)icalvalue_compare(prop_value,v);
-
- if (relation == w->compare){
- local_pass++;
- } else if (w->compare == ICALGAUGECOMPARE_LESSEQUAL &&
- ( relation == ICALGAUGECOMPARE_LESS ||
- relation == ICALGAUGECOMPARE_EQUAL)) {
- local_pass++;
- } else if (w->compare == ICALGAUGECOMPARE_GREATEREQUAL &&
- ( relation == ICALGAUGECOMPARE_GREATER ||
- relation == ICALGAUGECOMPARE_EQUAL)) {
- local_pass++;
- } else if (w->compare == ICALGAUGECOMPARE_NOTEQUAL &&
- ( relation == ICALGAUGECOMPARE_GREATER ||
- relation == ICALGAUGECOMPARE_LESS)) {
- local_pass++;
- } else {
- local_pass = 0;
- }
- }
-
- this_clause = local_pass > 0 ? 1 : 0;
-
- /* Now look at the logic operator for this clause to see how
- the value should be merge with the previous clause */
-
- if(w->logic == ICALGAUGELOGIC_AND){
- last_clause = this_clause && last_clause;
- } else if(w->logic == ICALGAUGELOGIC_AND) {
- last_clause = this_clause || last_clause;
- } else {
- last_clause = this_clause;
- }
- }
-
- return last_clause;
-
-}
-
-
-void icalgauge_dump(icalcomponent* gauge)
-{
-
- pvl_elem *p;
- struct icalgauge_impl *impl = (struct icalgauge_impl*)gauge;
-
-
- printf("--- Select ---\n");
- for(p = pvl_head(impl->select);p!=0;p=pvl_next(p)){
- struct icalgauge_where *w = pvl_data(p);
-
- if(w->comp != ICAL_NO_COMPONENT){
- printf("%s ",icalenum_component_kind_to_string(w->comp));
- }
-
- if(w->prop != ICAL_NO_PROPERTY){
- printf("%s ",icalenum_property_kind_to_string(w->prop));
- }
-
- if (w->compare != ICALGAUGECOMPARE_NONE){
- printf("%d ",w->compare);
- }
-
-
- if (w->value!=0){
- printf("%s",w->value);
- }
-
-
- printf("\n");
- }
-
- printf("--- From ---\n");
- for(p = pvl_head(impl->from);p!=0;p=pvl_next(p)){
- icalcomponent_kind k = (icalcomponent_kind)pvl_data(p);
-
- printf("%s\n",icalenum_component_kind_to_string(k));
- }
-
- printf("--- Where ---\n");
- for(p = pvl_head(impl->where);p!=0;p=pvl_next(p)){
- struct icalgauge_where *w = pvl_data(p);
-
- if(w->logic != ICALGAUGELOGIC_NONE){
- printf("%d ",w->logic);
- }
-
- if(w->comp != ICAL_NO_COMPONENT){
- printf("%s ",icalenum_component_kind_to_string(w->comp));
- }
-
- if(w->prop != ICAL_NO_PROPERTY){
- printf("%s ",icalenum_property_kind_to_string(w->prop));
- }
-
- if (w->compare != ICALGAUGECOMPARE_NONE){
- printf("%d ",w->compare);
- }
-
-
- if (w->value!=0){
- printf("%s",w->value);
- }
-
-
- printf("\n");
- }
-
-
-}
-
diff --git a/libical/src/libicalss/icalgauge.h b/libical/src/libicalss/icalgauge.h
deleted file mode 100644
index 1caf0ac7d1..0000000000
--- a/libical/src/libicalss/icalgauge.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalgauge.h
- CREATOR: eric 23 December 1999
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALGAUGE_H
-#define ICALGAUGE_H
-
-typedef void icalgauge;
-
-icalgauge* icalgauge_new_from_sql(char* sql);
-
-void icalgauge_free(icalgauge* gauge);
-
-char* icalgauge_as_sql(icalcomponent* gauge);
-
-void icalgauge_dump(icalcomponent* gauge);
-
-/* Return true is comp matches the gauge. The component must be in
- cannonical form -- a VCALENDAR with one VEVENT, VTODO or VJOURNAL
- sub component */
-int icalgauge_compare(icalgauge* g, icalcomponent* comp);
-
-/* Clone the component, but only return the properties specified in
- the gauge */
-icalcomponent* icalgauge_new_clone(icalgauge* g, icalcomponent* comp);
-
-#endif /* ICALGAUGE_H*/
diff --git a/libical/src/libicalss/icalgaugeimpl.h b/libical/src/libicalss/icalgaugeimpl.h
deleted file mode 100644
index 73a2813242..0000000000
--- a/libical/src/libicalss/icalgaugeimpl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalgaugeimpl.h
- CREATOR: eric 09 Aug 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-======================================================================*/
-
-#include "ical.h"
-
-#include "pvl.h"
-
-typedef enum icalgaugecompare {
- ICALGAUGECOMPARE_EQUAL=ICAL_XLICCOMPARETYPE_EQUAL,
- ICALGAUGECOMPARE_LESS=ICAL_XLICCOMPARETYPE_LESS,
- ICALGAUGECOMPARE_LESSEQUAL=ICAL_XLICCOMPARETYPE_LESSEQUAL,
- ICALGAUGECOMPARE_GREATER=ICAL_XLICCOMPARETYPE_GREATER,
- ICALGAUGECOMPARE_GREATEREQUAL=ICAL_XLICCOMPARETYPE_GREATEREQUAL,
- ICALGAUGECOMPARE_NOTEQUAL=ICAL_XLICCOMPARETYPE_NOTEQUAL,
- ICALGAUGECOMPARE_REGEX=ICAL_XLICCOMPARETYPE_REGEX,
- ICALGAUGECOMPARE_NONE=0
-} icalgaugecompare;
-
-typedef enum icalgaugelogic {
- ICALGAUGELOGIC_NONE,
- ICALGAUGELOGIC_AND,
- ICALGAUGELOGIC_OR
-} icalgaugelogic;
-
-
-struct icalgauge_where {
- icalgaugelogic logic;
- icalcomponent_kind comp;
- icalproperty_kind prop;
- icalgaugecompare compare;
- char* value;
-};
-
-struct icalgauge_impl
-{
-
- pvl_list select; /*Of icalgaugecompare, using only prop and comp fields*/
- pvl_list from; /* List of component_kinds, as integers */
- pvl_list where; /* List of icalgaugecompare */
-};
-
-
diff --git a/libical/src/libicalss/icalmessage.c b/libical/src/libicalss/icalmessage.c
deleted file mode 100644
index e1e8d8015c..0000000000
--- a/libical/src/libicalss/icalmessage.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalmessage.c
- CREATOR: ebusboom 07 Nov 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "icalmessage.h"
-#include "icalenums.h"
-#include <ctype.h> /* for tolower()*/
-#include <string.h> /* for strstr */
-#include <stdlib.h> /* for free(), malloc() */
-icalcomponent* icalmessage_get_inner(icalcomponent* comp)
-{
- if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){
- return icalcomponent_get_first_real_component(comp);
- } else {
- return comp;
- }
-}
-
-char* lowercase(const char* str)
-{
- char* p = 0;
- char* n = icalmemory_strdup(str);
-
- if(str ==0){
- return 0;
- }
-
- for(p = n; *p!=0; p++){
- *p = tolower(*p);
- }
-
- return n;
-}
-
-icalproperty* icalmessage_find_attendee(icalcomponent* comp, const char* user)
-{
- icalcomponent *inner = icalmessage_get_inner(comp);
- icalproperty *p,*attendee = 0;
- char* luser = lowercase(user);
-
- for(p = icalcomponent_get_first_property(inner, ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(inner, ICAL_ATTENDEE_PROPERTY)
- ){
-
- char* lattendee;
-
- lattendee = lowercase(icalproperty_get_attendee(p));
-
- if (strstr(lattendee,user) != 0){
- attendee = p;
- break;
- }
-
- free(lattendee);
-
- }
-
- free(luser);
-
- return attendee;
-
-}
-
-void icalmessage_copy_properties(icalcomponent* to, icalcomponent* from,
- icalproperty_kind kind)
-{
- icalcomponent *to_inner = icalmessage_get_inner(to);
- icalcomponent *from_inner = icalmessage_get_inner(from);
-
- if (to_inner == 0 && from_inner == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- return;
- }
-
- if(!icalcomponent_get_first_property(from_inner,kind)){
- return;
- }
-
- icalcomponent_add_property(to_inner,
- icalproperty_new_clone(
- icalcomponent_get_first_property(
- from_inner,
- kind)
- )
- );
-}
-
-icalcomponent *icalmessage_new_reply_base(icalcomponent* c,
- const char* user,
- const char* msg)
-{
- icalproperty *attendee;
- char tmp[45];
-
- icalcomponent *reply = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_method(ICAL_METHOD_REPLY),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstamp(icaltime_from_timet(time(0),0)),
- 0),
- 0);
-
- icalcomponent *inner = icalmessage_get_inner(reply);
-
- icalerror_check_arg_rz(c,"c");
-
- icalmessage_copy_properties(reply,c,ICAL_UID_PROPERTY);
- icalmessage_copy_properties(reply,c,ICAL_ORGANIZER_PROPERTY);
- icalmessage_copy_properties(reply,c,ICAL_RECURRENCEID_PROPERTY);
- icalmessage_copy_properties(reply,c,ICAL_SUMMARY_PROPERTY);
- icalmessage_copy_properties(reply,c,ICAL_SEQUENCE_PROPERTY);
-
- icalcomponent_set_dtstamp(reply,icaltime_from_timet(time(0),0));
-
- if(msg != 0){
- icalcomponent_add_property(inner,icalproperty_new_comment(msg));
- }
-
- /* Copy this user's attendee property */
-
- attendee = icalmessage_find_attendee(c,user);
-
- if (attendee == 0){
- icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
- icalcomponent_free(reply);
- return 0;
- }
-
- icalcomponent_add_property(inner,icalproperty_new_clone(attendee));
-
- /* Add PRODID and VERSION */
-
- icalcomponent_add_property(reply,icalproperty_new_version("2.0"));
-
- sprintf(tmp,
- "-//SoftwareStudio//NONSGML %s %s //EN",PACKAGE,VERSION);
- icalcomponent_add_property(reply,icalproperty_new_prodid(tmp));
-
- return reply;
-
-}
-
-icalcomponent* icalmessage_new_accept_reply(icalcomponent* c,
- const char* user,
- const char* msg)
-{
-
- icalcomponent *reply;
- icalproperty *attendee;
- icalcomponent *inner;
-
- icalerror_check_arg_rz(c,"c");
-
- reply = icalmessage_new_reply_base(c,user,msg);
-
- if(reply == 0){
- return 0;
- }
-
- inner = icalmessage_get_inner(reply);
-
- attendee = icalcomponent_get_first_property(inner,
- ICAL_ATTENDEE_PROPERTY);
-
- icalproperty_set_parameter(attendee,
- icalparameter_new_partstat(ICAL_PARTSTAT_ACCEPTED));
-
- return reply;
-}
-
-icalcomponent* icalmessage_new_decline_reply(icalcomponent* c,
- const char* user,
- const char* msg)
-{
- icalcomponent *reply;
- icalproperty *attendee;
- icalcomponent *inner;
-
- icalerror_check_arg_rz(c,"c");
-
- reply = icalmessage_new_reply_base(c,user,msg);
- inner = icalmessage_get_inner(reply);
- if(reply == 0){
- return 0;
- }
-
- attendee = icalcomponent_get_first_property(inner,
- ICAL_ATTENDEE_PROPERTY);
-
- icalproperty_set_parameter(attendee,
- icalparameter_new_partstat(ICAL_PARTSTAT_DECLINED));
-
- return reply;
-}
-
-/* New is modified version of old */
-icalcomponent* icalmessage_new_counterpropose_reply(icalcomponent* oldc,
- icalcomponent* newc,
- const char* user,
- const char* msg)
-{
- icalcomponent *reply;
-
- icalerror_check_arg_rz(oldc,"oldc");
- icalerror_check_arg_rz(newc,"newc");
-
- reply = icalcomponent_new_clone(newc);
-
- icalcomponent_set_method(reply,ICAL_METHOD_COUNTER);
-
- return newc;
-
-}
-
-
-icalcomponent* icalmessage_new_delegate_reply(icalcomponent* c,
- const char* user,
- const char* delegatee,
- const char* msg)
-{
-
- icalcomponent *reply;
- icalproperty *attendee;
- icalcomponent *inner;
-
- icalerror_check_arg_rz(c,"c");
-
- reply = icalmessage_new_reply_base(c,user,msg);
- inner = icalmessage_get_inner(reply);
- if(reply == 0){
- return 0;
- }
-
- attendee = icalcomponent_get_first_property(inner,
- ICAL_ATTENDEE_PROPERTY);
-
- icalproperty_set_parameter(attendee,
- icalparameter_new_partstat(ICAL_PARTSTAT_DELEGATED));
-
- icalproperty_set_parameter(attendee,
- icalparameter_new_delegatedto(delegatee));
-
- return reply;
-
-}
-
-icalcomponent* icalmessage_new_delegate_request(icalcomponent* c,
- const char* user,
- const char* delegatee,
- const char* msg)
-{
-
- icalcomponent *reply;
- icalproperty *attendee;
- icalcomponent *inner;
-
- icalerror_check_arg_rz(c,"c");
-
- reply = icalmessage_new_reply_base(c,user,msg);
- inner = icalmessage_get_inner(reply);
-
- if(reply == 0){
- return 0;
- }
-
- icalcomponent_set_method(reply,ICAL_METHOD_REQUEST);
-
- attendee = icalcomponent_get_first_property(inner,
- ICAL_ATTENDEE_PROPERTY);
-
- icalproperty_set_parameter(attendee,
- icalparameter_new_partstat(ICAL_PARTSTAT_DELEGATED));
-
- icalproperty_set_parameter(attendee,
- icalparameter_new_delegatedto(delegatee));
-
- icalcomponent_add_property(
- inner,
- icalproperty_vanew_attendee(
- delegatee,
- icalparameter_new_delegatedfrom(
- icalproperty_get_attendee(attendee)
- ),
- 0
- )
- );
-
-
- return reply;
-
-}
-
-
-icalcomponent* icalmessage_new_cancel_event(icalcomponent* c,
- const char* user,
- const char* msg);
-icalcomponent* icalmessage_new_cancel_instance(icalcomponent* c,
- const char* user,
- const char* msg);
-icalcomponent* icalmessage_new_cancel_all(icalcomponent* c,
- const char* user,
- const char* msg);
-
-
-
-icalcomponent* icalmessage_new_error_reply(icalcomponent* c,
- const char* user,
- const char* msg,
- const char* debug,
- icalrequeststatus code)
-{
- icalcomponent *reply;
- icalcomponent *inner, *cinner;
- struct icalreqstattype rs;
-
- icalerror_check_arg_rz(c,"c");
-
- reply = icalmessage_new_reply_base(c,user,msg);
- inner = icalmessage_get_inner(reply);
- cinner = icalmessage_get_inner(c);
- if(reply == 0){
- return 0;
- }
-
- if( code != ICAL_UNKNOWN_STATUS){
- rs.code = code;
- rs.debug = debug;
-
- icalcomponent_add_property(inner,
- icalproperty_new_requeststatus(
- icalreqstattype_as_string(rs)
- )
- );
- } else { /* code == ICAL_UNKNOWN_STATUS */
-
- /* Copy all of the request status properties */
- icalproperty *p;
- for(p = icalcomponent_get_first_property(cinner,
- ICAL_REQUESTSTATUS_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(cinner,
- ICAL_REQUESTSTATUS_PROPERTY)){
-
-
- icalcomponent_add_property(inner,icalproperty_new_clone(p));
- }
- }
-
- return reply;
-}
diff --git a/libical/src/libicalss/icalmessage.h b/libical/src/libicalss/icalmessage.h
deleted file mode 100644
index 24f1c9f243..0000000000
--- a/libical/src/libicalss/icalmessage.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalmessage.h
- CREATOR: eric 07 Nov 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- =========================================================================*/
-
-#include "ical.h"
-
-#ifndef ICALMESSAGE_H
-#define ICALMESSAGE_H
-
-
-icalcomponent* icalmessage_new_accept_reply(icalcomponent* c,
- const char* user,
- const char* msg);
-
-icalcomponent* icalmessage_new_decline_reply(icalcomponent* c,
- const char* user,
- const char* msg);
-
-/* New is modified version of old */
-icalcomponent* icalmessage_new_counterpropose_reply(icalcomponent* oldc,
- icalcomponent* newc,
- const char* user,
- const char* msg);
-
-
-icalcomponent* icalmessage_new_delegate_reply(icalcomponent* c,
- const char* user,
- const char* delegatee,
- const char* msg);
-
-
-icalcomponent* icalmessage_new_cancel_event(icalcomponent* c,
- const char* user,
- const char* msg);
-icalcomponent* icalmessage_new_cancel_instance(icalcomponent* c,
- const char* user,
- const char* msg);
-icalcomponent* icalmessage_new_cancel_all(icalcomponent* c,
- const char* user,
- const char* msg);
-
-
-icalcomponent* icalmessage_new_error_reply(icalcomponent* c,
- const char* user,
- const char* msg,
- const char* debug,
- icalrequeststatus rs);
-
-
-#endif /* ICALMESSAGE_H*/
diff --git a/libical/src/libicalss/icalset.c b/libical/src/libicalss/icalset.c
deleted file mode 100644
index 2120609928..0000000000
--- a/libical/src/libicalss/icalset.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalset.c
- CREATOR: eric 17 Jul 2000
-
-
- Icalset is the "base class" for representations of a collection of
- iCal components. Derived classes (actually delegates) include:
-
- icalfileset Store components in a single file
- icaldirset Store components in multiple files in a directory
- icalheapset Store components on the heap
- icalmysqlset Store components in a mysql database.
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#include "ical.h"
-#include "icalset.h"
-#include "icalfileset.h"
-#include "icalfilesetimpl.h"
-#include "icaldirset.h"
-#include "icaldirsetimpl.h"
-#include <stdlib.h>
-/*#include "icalheapset.h"*/
-/*#include "icalmysqlset.h"*/
-
-#define ICALSET_ID "set "
-
-struct icalset_fp {
- void (*free)(icalset* set);
- const char* (*path)(icalset* set);
- void (*mark)(icalset* set);
- icalerrorenum (*commit)(icalset* set);
- icalerrorenum (*add_component)(icalset* set, icalcomponent* comp);
- icalerrorenum (*remove_component)(icalset* set, icalcomponent* comp);
- int (*count_components)(icalset* set,
- icalcomponent_kind kind);
- icalerrorenum (*select)(icalset* set, icalcomponent* gauge);
- void (*clear)(icalset* set);
- icalcomponent* (*fetch)(icalset* set, const char* uid);
- icalcomponent* (*fetch_match)(icalset* set, icalcomponent *comp);
- int (*has_uid)(icalset* set, const char* uid);
- icalerrorenum (*modify)(icalset* set, icalcomponent *old,
- icalcomponent *new);
- icalcomponent* (*get_current_component)(icalset* set);
- icalcomponent* (*get_first_component)(icalset* set);
- icalcomponent* (*get_next_component)(icalset* set);
-};
-
-struct icalset_fp icalset_dirset_fp = {
- icaldirset_free,
- icaldirset_path,
- icaldirset_mark,
- icaldirset_commit,
- icaldirset_add_component,
- icaldirset_remove_component,
- icaldirset_count_components,
- icaldirset_select,
- icaldirset_clear,
- icaldirset_fetch,
- icaldirset_fetch_match,
- icaldirset_has_uid,
- icaldirset_modify,
- icaldirset_get_current_component,
- icaldirset_get_first_component,
- icaldirset_get_next_component
-};
-
-
-struct icalset_fp icalset_fileset_fp = {
- icalfileset_free,
- icalfileset_path,
- icalfileset_mark,
- icalfileset_commit,
- icalfileset_add_component,
- icalfileset_remove_component,
- icalfileset_count_components,
- icalfileset_select,
- icalfileset_clear,
- icalfileset_fetch,
- icalfileset_fetch_match,
- icalfileset_has_uid,
- icalfileset_modify,
- icalfileset_get_current_component,
- icalfileset_get_first_component,
- icalfileset_get_next_component
-};
-
-struct icalset_impl {
-
- char id[5]; /* "set " */
-
- void *derived_impl;
- struct icalset_fp *fp;
-};
-
-/* Figure out what was actually passed in as the set. This could be a
- set or and of the derived types such as dirset or fileset. Note
- this routine returns a value, not a reference, to avoid memory
- leaks in the methods */
-struct icalset_impl icalset_get_impl(icalset* set)
-{
- struct icalset_impl impl;
-
- memset(&impl,0,sizeof(impl));
- icalerror_check_arg_re( (set!=0),"set",impl);
-
- if(strcmp((char*)set,ICALSET_ID)==0) {
- /* It is actually a set, so just sent the reference back out. */
- return *(struct icalset_impl*)set;
- } else if(strcmp((char*)set,ICALFILESET_ID)==0) {
- /* Make a new set from the fileset */
- impl.fp = &icalset_fileset_fp;
- impl.derived_impl = set;
- strcpy(impl.id,ICALFILESET_ID);/* HACK. Is this necessary? */
- return impl;
- } else if(strcmp((char*)set,ICALDIRSET_ID)==0) {
- /* Make a new set from the dirset */
- impl.fp = &icalset_dirset_fp;
- impl.derived_impl = set;
- strcpy(impl.id,ICALDIRSET_ID);/* HACK. Is this necessary? */
- return impl;
- } else {
- /* The type of set is unknown, so throw an error */
- icalerror_assert((0),"Unknown set type");
- return impl;
- }
-}
-
-
-struct icalset_impl* icalset_new_impl()
-{
-
- struct icalset_impl* impl;
-
- if ( ( impl = (struct icalset_impl*)
- malloc(sizeof(struct icalset_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- strcpy(impl->id,ICALSET_ID);
-
- impl->derived_impl = 0;
- impl->fp = 0;
-
- return impl;
-}
-
-struct icalset_impl* icalset_new_file_from_ref(icalfileset *fset)
-{
- struct icalset_impl *impl = icalset_new_impl();
-
- icalerror_check_arg_rz( (fset!=0),"fset");
-
- if(impl == 0){
- free(impl);
- return 0;
- }
-
- impl->derived_impl = fset;
-
- if (impl->derived_impl == 0){
- free(impl);
- return 0;
- }
-
- impl->fp = &icalset_fileset_fp;
-
- return (struct icalset_impl*)impl;
-}
-
-icalset* icalset_new_file(const char* path)
-{
- icalfileset *fset = icalfileset_new(path);
-
- if(fset == 0){
- return 0;
- }
-
- return (icalset*)icalset_new_file_from_ref(fset);
-}
-
-icalset* icalset_new_dir_from_ref(icaldirset *dset)
-{
-
- struct icalset_impl *impl = icalset_new_impl();
-
- icalerror_check_arg_rz( (dset!=0),"dset");
-
- if(impl == 0){
- return 0;
- }
-
- impl->derived_impl = dset;
-
- if (impl->derived_impl == 0){
- free(impl);
- return 0;
- }
-
- impl->fp = &icalset_dirset_fp;
-
- return impl;
-}
-
-icalset* icalset_new_dir(const char* path)
-{
- icaldirset *dset = icaldirset_new(path);
-
- if(dset == 0){
- return 0;
- }
-
- return icalset_new_dir_from_ref(dset);
-}
-
-icalset* icalset_new_heap(void)
-{
- struct icalset_impl *impl = icalset_new_impl();
-
-
- if(impl == 0){
- free(impl);
- return 0;
- }
-
- return 0;
-}
-
-icalset* icalset_new_mysql(const char* path)
-{
- struct icalset_impl *impl = icalset_new_impl();
-
- if(impl == 0){
- free(impl);
- return 0;
- }
-
- return 0;
-}
-
-void icalset_free(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- (*(impl.fp->free))(impl.derived_impl);
-
- if(strcmp((char*)set,ICALSET_ID)) {
- free(set);
- }
-}
-
-const char* icalset_path(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->path))(impl.derived_impl);
-}
-
-void icalset_mark(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- (*(impl.fp->mark))(impl.derived_impl);
-}
-
-icalerrorenum icalset_commit(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->commit))(impl.derived_impl);
-}
-
-icalerrorenum icalset_add_component(icalset* set, icalcomponent* comp)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->add_component))(impl.derived_impl,comp);
-}
-
-icalerrorenum icalset_remove_component(icalset* set, icalcomponent* comp)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->remove_component))(impl.derived_impl,comp);
-}
-
-int icalset_count_components(icalset* set,icalcomponent_kind kind)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->count_components))(impl.derived_impl,kind);
-}
-
-icalerrorenum icalset_select(icalset* set, icalcomponent* gauge)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->select))(impl.derived_impl,gauge);
-}
-
-void icalset_clear(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- (*(impl.fp->clear))(impl.derived_impl);
-}
-
-icalcomponent* icalset_fetch(icalset* set, const char* uid)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->fetch))(impl.derived_impl,uid);
-}
-
-icalcomponent* icalset_fetch_match(icalset* set, icalcomponent *comp)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->fetch_match))(impl.derived_impl,comp);
-}
-
-
-int icalset_has_uid(icalset* set, const char* uid)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->has_uid))(impl.derived_impl,uid);
-}
-
-icalerrorenum icalset_modify(icalset* set, icalcomponent *old,
- icalcomponent *new)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->modify))(impl.derived_impl,old,new);
-}
-
-icalcomponent* icalset_get_current_component(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->get_current_component))(impl.derived_impl);
-}
-
-icalcomponent* icalset_get_first_component(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->get_first_component))(impl.derived_impl);
-}
-
-icalcomponent* icalset_get_next_component(icalset* set)
-{
- struct icalset_impl impl = icalset_get_impl(set);
- return (*(impl.fp->get_next_component))(impl.derived_impl);
-}
-
-
-
-
diff --git a/libical/src/libicalss/icalset.h b/libical/src/libicalss/icalset.h
deleted file mode 100644
index 7b083dae24..0000000000
--- a/libical/src/libicalss/icalset.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalset.h
- CREATOR: eric 28 November 1999
-
-
- Icalset is the "base class" for representations of a collection of
- iCal components. Derived classes (actually delegatees) include:
-
- icalfileset Store componetns in a single file
- icaldirset Store components in multiple files in a directory
- icalheapset Store components on the heap
- icalmysqlset Store components in a mysql database.
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
-======================================================================*/
-
-#ifndef ICALSET_H
-#define ICALSET_H
-
-#include <limits.h> /* For PATH_MAX */
-#include "ical.h"
-#include "icalerror.h"
-
-#ifdef PATH_MAX
-#define ICAL_PATH_MAX PATH_MAX
-#else
-#define ICAL_PATH_MAX 1024
-#endif
-
-
-
-
-typedef void icalset;
-
-typedef enum icalset_kind {
- ICAL_FILE_SET,
- ICAL_DIR_SET,
- ICAL_HEAP_SET,
- ICAL_MYSQL_SET,
- ICAL_CAP_SET
-} icalset_kind;
-
-
-/* Create a specific derived type of set */
-icalset* icalset_new_file(const char* path);
-icalset* icalset_new_dir(const char* path);
-icalset* icalset_new_heap(void);
-icalset* icalset_new_mysql(const char* path);
-/*icalset* icalset_new_cap(icalcstp* cstp);*/
-
-void icalset_free(icalset* set);
-
-const char* icalset_path(icalset* set);
-
-/* Mark the cluster as changed, so it will be written to disk when it
- is freed. Commit writes to disk immediately*/
-void icalset_mark(icalset* set);
-icalerrorenum icalset_commit(icalset* set);
-
-icalerrorenum icalset_add_component(icalset* set, icalcomponent* comp);
-icalerrorenum icalset_remove_component(icalset* set, icalcomponent* comp);
-
-int icalset_count_components(icalset* set,
- icalcomponent_kind kind);
-
-/* Restrict the component returned by icalset_first, _next to those
- that pass the gauge. _clear removes the gauge. */
-icalerrorenum icalset_select(icalset* set, icalcomponent* gauge);
-void icalset_clear_select(icalset* set);
-
-/* Get a component by uid */
-icalcomponent* icalset_fetch(icalset* set, const char* uid);
-int icalset_has_uid(icalset* set, const char* uid);
-icalcomponent* icalset_fetch_match(icalset* set, icalcomponent *c);
-
-/* Modify components according to the MODIFY method of CAP. Works on
- the currently selected components. */
-icalerrorenum icalset_modify(icalset* set, icalcomponent *oldc,
- icalcomponent *newc);
-
-/* Iterate through the components. If a guage has been defined, these
- will skip over components that do not pass the gauge */
-
-icalcomponent* icalset_get_current_component(icalset* set);
-icalcomponent* icalset_get_first_component(icalset* set);
-icalcomponent* icalset_get_next_component(icalset* set);
-
-#endif /* !ICALSET_H */
-
-
-
diff --git a/libical/src/libicalss/icalspanlist.c b/libical/src/libicalss/icalspanlist.c
deleted file mode 100644
index cab6a81c68..0000000000
--- a/libical/src/libicalss/icalspanlist.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalspanlist.c
- CREATOR: ebusboom 23 aug 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ical.h"
-#include "icalspanlist.h"
-#include "pvl.h"
-#include <stdlib.h> /* for free and malloc */
-
-struct icalspanlist_impl {
- pvl_list spans;
-};
-
-int compare_span(void* a, void* b)
-{
- struct icaltime_span *span_a = (struct icaltime_span *)a ;
- struct icaltime_span *span_b = (struct icaltime_span *)b ;
-
- if(span_a->start == span_b->start){
- return 0;
- } else if(span_a->start < span_b->start){
- return -1;
- } else { /*if(span_a->start > span->b.start)*/
- return 1;
- }
-}
-
-icalcomponent* icalspanlist_get_inner(icalcomponent* comp)
-{
- if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){
- return icalcomponent_get_first_real_component(comp);
- } else {
- return comp;
- }
-}
-
-
-void print_span(int c, struct icaltime_span span );
-
-
-/* Make a free list from a set of component */
-icalspanlist* icalspanlist_new(icalset *set,
- struct icaltimetype start,
- struct icaltimetype end)
-{
- struct icaltime_span range;
- pvl_elem itr;
- icalcomponent *c,*inner;
- icalcomponent_kind kind, inner_kind;
- struct icalspanlist_impl *sl;
- struct icaltime_span *freetime;
-
- if ( ( sl = (struct icalspanlist_impl*)
- malloc(sizeof(struct icalspanlist_impl))) == 0) {
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- sl->spans = pvl_newlist();
-
- range.start = icaltime_as_timet(start);
- range.end = icaltime_as_timet(end);
-
- printf("Range start: %s",ctime(&range.start));
- printf("Range end : %s",ctime(&range.end));
-
-
- /* Get a list of spans of busy time from the events in the set
- and order the spans based on the start time */
-
- for(c = icalset_get_first_component(set);
- c != 0;
- c = icalset_get_next_component(set)){
-
- struct icaltime_span span;
-
- kind = icalcomponent_isa(c);
- inner = icalcomponent_get_inner(c);
-
- if(!inner){
- continue;
- }
-
- inner_kind = icalcomponent_isa(inner);
-
- if( kind != ICAL_VEVENT_COMPONENT &&
- inner_kind != ICAL_VEVENT_COMPONENT){
- continue;
- }
-
- icalerror_clear_errno();
-
- span = icalcomponent_get_span(c);
- span.is_busy = 1;
-
- if(icalerrno != ICAL_NO_ERROR){
- continue;
- }
-
- if ((range.start < span.end && icaltime_is_null_time(end)) ||
- (range.start < span.end && range.end > span.start )){
-
- struct icaltime_span *s;
-
- if ((s=(struct icaltime_span *)
- malloc(sizeof(struct icaltime_span))) == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- memcpy(s,&span,sizeof(span));
-
- pvl_insert_ordered(sl->spans,compare_span,(void*)s);
-
- }
- }
-
- /* Now Fill in the free time spans. loop through the spans. if the
- start of the range is not within the span, create a free entry
- that runs from the start of the range to the start of the
- span. */
-
- for( itr = pvl_head(sl->spans);
- itr != 0;
- itr = pvl_next(itr))
- {
- struct icaltime_span *s = (icalproperty*)pvl_data(itr);
-
- if ((freetime=(struct icaltime_span *)
- malloc(sizeof(struct icaltime_span))) == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- if(range.start < s->start){
- freetime->start = range.start;
- freetime->end = s->start;
-
- freetime->is_busy = 0;
-
-
- pvl_insert_ordered(sl->spans,compare_span,(void*)freetime);
- } else {
- free(freetime);
- }
-
- range.start = s->end;
- }
-
- /* If the end of the range is null, then assume that everything
- after the last item in the calendar is open and add a span
- that indicates this */
-
- if( icaltime_is_null_time(end)){
- struct icaltime_span* last_span;
-
- last_span = pvl_data(pvl_tail(sl->spans));
-
- if (last_span != 0){
-
- if ((freetime=(struct icaltime_span *)
- malloc(sizeof(struct icaltime_span))) == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- freetime->is_busy = 0;
- freetime->start = last_span->end;
- freetime->end = freetime->start;
- pvl_insert_ordered(sl->spans,compare_span,(void*)freetime);
- }
- }
-
-
- return sl;
-
-}
-
-void icalspanlist_free(icalspanlist* s)
-{
- struct icaltime_span *span;
- struct icalspanlist_impl* impl = (struct icalspanlist_impl*)s;
-
- while( (span=pvl_pop(impl->spans)) != 0){
- free(span);
- }
-
- pvl_free(impl->spans);
-
- impl->spans = 0;
-}
-
-
-void icalspanlist_dump(icalspanlist* s){
-
- int i = 0;
- struct icalspanlist_impl* sl = (struct icalspanlist_impl*)s;
- pvl_elem itr;
-
- for( itr = pvl_head(sl->spans);
- itr != 0;
- itr = pvl_next(itr))
- {
- struct icaltime_span *s = (icalproperty*)pvl_data(itr);
-
- printf("#%02d %d start: %s",++i,s->is_busy,ctime(&s->start));
- printf(" end : %s",ctime(&s->end));
-
- }
-}
-
-icalcomponent* icalspanlist_make_free_list(icalspanlist* sl);
-icalcomponent* icalspanlist_make_busy_list(icalspanlist* sl);
-
-struct icalperiodtype icalspanlist_next_free_time(icalspanlist* sl,
- struct icaltimetype t)
-{
- struct icalspanlist_impl* impl = (struct icalspanlist_impl*)sl;
- pvl_elem itr;
- struct icalperiodtype period;
- struct icaltime_span *s;
-
- time_t rangett= icaltime_as_timet(t);
-
- period.start = icaltime_null_time();
- period.end = icaltime_null_time();
-
- /* Is the reference time before the first span? If so, assume
- that the reference time is free */
- itr = pvl_head(impl->spans);
- s = (icalproperty*)pvl_data(itr);
-
- if (s == 0){
- /* No elements in span */
- return period;
- }
-
- if(rangett <s->start ){
- /* End of period is start of first span if span is busy, end
- of the span if it is free */
- period.start = t;
-
- if (s->is_busy == 0){
- period.end = icaltime_from_timet(s->start,0);
- } else {
- period.end = icaltime_from_timet(s->end,0);
- }
-
- return period;
- }
-
- /* Otherwise, find the first free span that contains the
- reference time. */
-
- for( itr = pvl_head(impl->spans);
- itr != 0;
- itr = pvl_next(itr))
- {
- s = (icalproperty*)pvl_data(itr);
-
- if(s->is_busy == 0 && s->start >= rangett &&
- ( rangett < s->end || s->end == s->start)){
-
- if (rangett < s->start){
- period.start = icaltime_from_timet(s->start,0);
- } else {
- period.start = icaltime_from_timet(rangett,0);
- }
-
- period.end = icaltime_from_timet(s->end,0);
-
- return period;
- }
-
- }
-
- period.start = icaltime_null_time();
- period.end = icaltime_null_time();
-
- return period;
-}
-
-struct icalperiodtype icalspanlist_next_busy_time(icalspanlist* sl,
- struct icaltimetype t);
-
diff --git a/libical/src/libicalss/icalspanlist.h b/libical/src/libicalss/icalspanlist.h
deleted file mode 100644
index 83cb1c8a6d..0000000000
--- a/libical/src/libicalss/icalspanlist.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalspanlist.h
- CREATOR: eric 21 Aug 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- =========================================================================*/
-#ifndef ICALSPANLIST_H
-#define ICALSPANLIST_H
-
-#include "ical.h"
-#include "icalset.h"
-
-typedef void icalspanlist;
-
-/* Make a free list from a set of component. Start and end should be in UTC */
-icalspanlist* icalspanlist_new(icalset *set,
- struct icaltimetype start,
- struct icaltimetype end);
-
-void icalspanlist_free(icalspanlist* spl);
-
-icalcomponent* icalspanlist_make_free_list(icalspanlist* sl);
-icalcomponent* icalspanlist_make_busy_list(icalspanlist* sl);
-
-/* Get first free or busy time after time t. all times are in UTC */
-struct icalperiodtype icalspanlist_next_free_time(icalspanlist* sl,
- struct icaltimetype t);
-struct icalperiodtype icalspanlist_next_busy_time(icalspanlist* sl,
- struct icaltimetype t);
-
-void icalspanlist_dump(icalspanlist* s);
-
-#endif
-
-
-
diff --git a/libical/src/libicalss/icalsslexer.l b/libical/src/libicalss/icalsslexer.l
deleted file mode 100644
index 848a9bc74f..0000000000
--- a/libical/src/libicalss/icalsslexer.l
+++ /dev/null
@@ -1,113 +0,0 @@
-%{
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalsslexer.l
- CREATOR: eric 8 Aug 2000
-
- DESCRIPTION:
-
- $Id: icalsslexer.l,v 1.1.1.2 2001/01/23 19:20:41 jpr Exp $
- $Locker: $
-
-(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
- ======================================================================*/
-
-#include "icalssyacc.h"
-#include "icalgaugeimpl.h"
-#include "assert.h"
-
-#include <string.h> /* For strdup() */
-
-int icalparser_flex_input(char* buf, int max_size);
-void icalparser_clear_flex_input();
-
-#undef YY_INPUT
-#define YY_INPUT(b,r,ms) ( r= icalparser_flex_input(b,ms))
-
-#undef SS_FATAL_ERROR
-#define SS_FATAL_ERROR(msg) sserror(msg)
-
-
-%}
-
-crlf \x0D?\x0A
-space [ ]
-qsafechar [^\x00-\x1F\"]
-safechar [^\x00-\x1F\"\:\;\,]
-tsafechar [\x20-\x21\x23-\x2B\x2D-\x39\x3C-\x5B\x5D-\x7E]
-valuechar [^\x00-\x08\x10-\x1F]
-xname X-[a-zA-Z0-9\-]+
-xname2 [a-zA-Z0-9\-\ ]
-paramtext {safechar}+
-value {valuechar}+
-quotedstring \"{qsafechar}+\"
-digit [0-9]
-
-%array /* Make yytext an array. Slow, but handy. HACK */
-
-%option caseless
-
-%s sql string_value
-
-
-
-%%
-
-%{
-%}
-
-
-SELECT { return SELECT; }
-FROM { return FROM; }
-WHERE { return WHERE; }
-, { return COMMA; }
-"=" { return EQUALS; }
-"!=" { return NOTEQUALS; }
-"<" { return LESS; }
-">" { return GREATER; }
-"<=" { return LESSEQUALS; }
-">=" { return GREATEREQUALS; }
-AND { return AND; }
-OR { return OR; }
-\' { return QUOTE; }
-[ \t\n\r]+ ;
-; { return EOL; }
-\'[\*A-Za-z0-9\-\.]+\' {
- int c = input();
- unput(c);
- if(c!='\''){
- sslval.v_string= icalmemory_tmp_copy(sstext);
- return STRING;
- } else {
- /*ssmore();*/
- }
-}
-
-[\*A-Za-z0-9\-\.]+ { sslval.v_string= icalmemory_tmp_copy(sstext);
- return STRING; }
-
-
-. { return yytext[0]; }
-
-%%
-
-int sswrap()
-{
- return 1;
-}
-
diff --git a/libical/src/libicalss/icalssutil.c b/libical/src/libicalss/icalssutil.c
deleted file mode 100644
index 8db141d41d..0000000000
--- a/libical/src/libicalss/icalssutil.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalssutil.c
- CREATOR: ebusboom 23 aug 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- ======================================================================*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
diff --git a/libical/src/libicalss/icalssutil.h b/libical/src/libicalss/icalssutil.h
deleted file mode 100644
index 3890da6a11..0000000000
--- a/libical/src/libicalss/icalssutil.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C -*- */
-/*======================================================================
- FILE: icalssutil.h
- CREATOR: eric 21 Aug 2000
-
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
-
- =========================================================================*/
-
-#include "ical.h"
-
diff --git a/libical/src/libicalss/icalssyacc.h b/libical/src/libicalss/icalssyacc.h
deleted file mode 100644
index 9a933dc735..0000000000
--- a/libical/src/libicalss/icalssyacc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-typedef union {
- char* v_string;
-} YYSTYPE;
-#define STRING 257
-#define SELECT 258
-#define FROM 259
-#define WHERE 260
-#define COMMA 261
-#define QUOTE 262
-#define EQUALS 263
-#define NOTEQUALS 264
-#define LESS 265
-#define GREATER 266
-#define LESSEQUALS 267
-#define GREATEREQUALS 268
-#define AND 269
-#define OR 270
-#define EOL 271
-#define END 272
-
-
-extern YYSTYPE sslval;
diff --git a/libical/src/libicalss/icalssyacc.y b/libical/src/libicalss/icalssyacc.y
deleted file mode 100644
index 047b158e93..0000000000
--- a/libical/src/libicalss/icalssyacc.y
+++ /dev/null
@@ -1,245 +0,0 @@
-%{
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icalssyacc.y
- CREATOR: eric 08 Aug 2000
-
- DESCRIPTION:
-
- $Id: icalssyacc.y,v 1.1.1.2 2001/01/23 19:20:41 jpr Exp $
- $Locker: $
-
-(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
- ======================================================================*/
-
-#include <stdlib.h>
-#include <string.h> /* for strdup() */
-#include <limits.h> /* for SHRT_MAX*/
-#include "ical.h"
-#include "pvl.h"
-#include "icalgauge.h"
-#include "icalgaugeimpl.h"
-
-
-extern struct icalgauge_impl *icalss_yy_gauge;
-
-void ssyacc_add_where(struct icalgauge_impl* impl, char* prop,
- icalgaugecompare compare , char* value);
-void ssyacc_add_select(struct icalgauge_impl* impl, char* str1);
-void ssyacc_add_from(struct icalgauge_impl* impl, char* str1);
-void set_logic(struct icalgauge_impl* impl,icalgaugelogic l);
-void sserror(char *s); /* Don't know why I need this.... */
-
-
-
-%}
-
-%union {
- char* v_string;
-}
-
-
-%token <v_string> STRING
-%token SELECT FROM WHERE COMMA QUOTE EQUALS NOTEQUALS LESS GREATER LESSEQUALS
-%token GREATEREQUALS AND OR EOL END
-
-%%
-
-query_min: SELECT select_list FROM from_list WHERE where_list
- | error {
- icalparser_clear_flex_input();
- yyclearin;
- }
- ;
-
-select_list:
- STRING {ssyacc_add_select(icalss_yy_gauge,$1);}
- | select_list COMMA STRING {ssyacc_add_select(icalss_yy_gauge,$3);}
- ;
-
-
-from_list:
- STRING {ssyacc_add_from(icalss_yy_gauge,$1);}
- | from_list COMMA STRING {ssyacc_add_from(icalss_yy_gauge,$3);}
- ;
-
-where_clause:
- /* Empty */
- | STRING EQUALS STRING {ssyacc_add_where(icalss_yy_gauge,$1,ICALGAUGECOMPARE_EQUAL,$3); }
-
- | STRING NOTEQUALS STRING {ssyacc_add_where(icalss_yy_gauge,$1,ICALGAUGECOMPARE_NOTEQUAL,$3); }
- | STRING LESS STRING {ssyacc_add_where(icalss_yy_gauge,$1,ICALGAUGECOMPARE_LESS,$3); }
- | STRING GREATER STRING {ssyacc_add_where(icalss_yy_gauge,$1,ICALGAUGECOMPARE_GREATER,$3); }
- | STRING LESSEQUALS STRING {ssyacc_add_where(icalss_yy_gauge,$1,ICALGAUGECOMPARE_LESSEQUAL,$3); }
- | STRING GREATEREQUALS STRING {ssyacc_add_where(icalss_yy_gauge,$1,ICALGAUGECOMPARE_GREATEREQUAL,$3); }
- ;
-
-where_list:
- where_clause {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_NONE);}
- | where_list AND where_clause {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_AND);}
- | where_list OR where_clause {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_OR);}
- ;
-
-
-%%
-
-void ssyacc_add_where(struct icalgauge_impl* impl, char* str1,
- icalgaugecompare compare , char* value_str)
-{
-
- struct icalgauge_where *where;
- char *compstr, *propstr, *c, *s,*l;
-
- if ( (where = malloc(sizeof(struct icalgauge_where))) ==0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- }
-
- memset(where,0,sizeof(struct icalgauge_where));
- where->logic = ICALGAUGELOGIC_NONE;
- where->compare = ICALGAUGECOMPARE_NONE;
- where->comp = ICAL_NO_COMPONENT;
- where->prop = ICAL_NO_PROPERTY;
-
- /* remove enclosing quotes */
- s = value_str;
- if(*s == '\''){
- s++;
- }
- l = s+strlen(s)-1;
- if(*l == '\''){
- *l=0;
- }
-
- where->value = strdup(s);
-
- /* Is there a period in str1 ? If so, the string specified both a
- component and a property*/
- if( (c = strrchr(str1,'.')) != 0){
- compstr = str1;
- propstr = c+1;
- *c = '\0';
- } else {
- compstr = 0;
- propstr = str1;
- }
-
-
- /* Handle the case where a component was specified */
- if(compstr != 0){
- where->comp = icalenum_string_to_component_kind(compstr);
- } else {
- where->comp = ICAL_NO_COMPONENT;
- }
-
- where->prop = icalenum_string_to_property_kind(propstr);
-
- where->compare = compare;
-
- if(where->value == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- free(where->value);
- return;
- }
-
- pvl_push(impl->where,where);
-}
-
-void set_logic(struct icalgauge_impl* impl,icalgaugelogic l)
-{
- pvl_elem e = pvl_tail(impl->where);
- struct icalgauge_where *where = pvl_data(e);
-
- where->logic = l;
-
-}
-
-
-
-void ssyacc_add_select(struct icalgauge_impl* impl, char* str1)
-{
- char *c, *compstr, *propstr;
- struct icalgauge_where *where;
-
- /* Uses only the prop and comp fields of the where structure */
- if ( (where = malloc(sizeof(struct icalgauge_where))) ==0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return;
- }
-
- memset(where,0,sizeof(struct icalgauge_where));
- where->logic = ICALGAUGELOGIC_NONE;
- where->compare = ICALGAUGECOMPARE_NONE;
- where->comp = ICAL_NO_COMPONENT;
- where->prop = ICAL_NO_PROPERTY;
-
- /* Is there a period in str1 ? If so, the string specified both a
- component and a property*/
- if( (c = strrchr(str1,'.')) != 0){
- compstr = str1;
- propstr = c+1;
- *c = '\0';
- } else {
- compstr = 0;
- propstr = str1;
- }
-
-
- /* Handle the case where a component was specified */
- if(compstr != 0){
- where->comp = icalenum_string_to_component_kind(compstr);
- } else {
- where->comp = ICAL_NO_COMPONENT;
- }
-
-
- /* If the property was '*', then accept all properties */
- if(strcmp("*",propstr) == 0) {
- where->prop = ICAL_ANY_PROPERTY;
- } else {
- where->prop = icalenum_string_to_property_kind(propstr);
- }
-
-
- if(where->prop == ICAL_NO_PROPERTY){
- icalgauge_free(where);
- icalerror_set_errno(ICAL_BADARG_ERROR);
- return;
- }
-
- pvl_push(impl->select,where);
-}
-
-void ssyacc_add_from(struct icalgauge_impl* impl, char* str1)
-{
- icalcomponent_kind ckind;
-
- ckind = icalenum_string_to_component_kind(str1);
-
- if(ckind == ICAL_NO_COMPONENT){
- assert(0);
- }
-
- pvl_push(impl->from,(void*)ckind);
-
-}
-
-
-void sserror(char *s){
- fprintf(stderr,"Parse error \'%s\'\n", s);
-}
diff --git a/libical/src/libicalvcal/.cvsignore b/libical/src/libicalvcal/.cvsignore
deleted file mode 100644
index 533caa2f3d..0000000000
--- a/libical/src/libicalvcal/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-*.la
-*.lo
-.libs
-.deps
-Makefile
-Makefile.in
-libtool
-ltconfig
-ltmain.sh
-stamp-h
-stamp-h.in
-vcc.c \ No newline at end of file
diff --git a/libical/src/libicalvcal/Makefile.am b/libical/src/libicalvcal/Makefile.am
deleted file mode 100644
index c409347d14..0000000000
--- a/libical/src/libicalvcal/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-lib_LTLIBRARIES = libicalvcal.la
-
-INCLUDES = \
- -I$(top_builddir) \
- -I$(top_srcdir)/src/libical \
- -I$(top_builddir)/src/libical \
- -I$(top_srcdir)/src/libicalss
-
-libicalvcal_la_LDFLAGS = -version-info 0:0:0
-
-libicalvcal_la_SOURCES = \
- icalvcal.c \
- vcc.y \
- vobject.c \
- vcaltmp.c
-
-libicalvcalincludedir = $(includedir)/libicalvcal
-
-libicalvcalinclude_HEADERS = \
- icalvcal.h \
- port.h \
- vcc.h \
- vobject.h \
- vcaltmp.h
-
-EXTRA_DIST = \
- README.TXT \
- vcaltest.c \
- vctest.c
diff --git a/libical/src/libicalvcal/README.TXT b/libical/src/libicalvcal/README.TXT
deleted file mode 100644
index c8ce8b0979..0000000000
--- a/libical/src/libicalvcal/README.TXT
+++ /dev/null
@@ -1,951 +0,0 @@
-NOTE: If you used the earlier APIs released by Versit
-then you will want to look at the document "migrate.doc"
-included with this package. It contains a discussion of
-the differences between the old API and this one.
-
-----------------------------------------------------------------
-
-The vCard/vCalendar C interface is implemented in the set
-of files as follows:
-
-vcc.y, yacc source, and vcc.c, the yacc output you will use
-implements the core parser
-
-vobject.c implements an API that insulates the caller from
-the parser and changes in the vCard/vCalendar BNF
-
-port.h defines compilation environment dependent stuff
-
-vcc.h and vobject.h are header files for their .c counterparts
-
-vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
-which you may find useful.
-
-test.c is a standalone test driver that exercises some of
-the features of the APIs provided. Invoke test.exe on a
-VCARD/VCALENDAR input text file and you will see the pretty
-print output of the internal representation (this pretty print
-output should give you a good idea of how the internal
-representation looks like -- there is one such output in the
-following too). Also, a file with the .out suffix is generated
-to show that the internal representation can be written back
-in the original text format.
-
------------------------------------------------------------------
-
-
- VObject for VCard/VCalendar
-
-Table of Contents
-=================
-1. VObject
-2. Internal Representations of VCard/VCalendar
-3. Iterating Through VObject's Properties or Values
-4. Pretty Printing a VObject Tree
-5. Building A VObject Representation of A VCard/VCalendar
-6. Converting A VObject Representation Into Its Textual Representation
-7. Miscellaneous Notes On VObject APIs usages
-8. Brief descriptions of each APIs
-9. Additional Programming Notes.
-
-This document is mainly about the VObject and its APIs. The main
-use of a VObject is to represent a VCard or a VCalendar inside
-a program. However, its use is not limited to aforemention as it
-can represent an arbitrary information that makes up of a tree or
-forest of properties/values.
-
-1. VObject
- =======
-A VObject can have a name (id) and a list of associated properties and
-a value. Each property is itself a VObject.
-
-2. Internal Representations of VCard/VCalendar
- ===========================================
-A list of VCard or a VCalendar is represented by a list of VObjects.
-The name (id) of the VObjects in the list is either VCCardProp or
-VCCalProp. Each of these VObjects can have a list of properties.
-Since a property is represented as a VObject, each of these properties
-can have a name, a list of properties, and a value.
-
-For example, the input file "vobject.vcf":
-
-BEGIN:VCARD
-N:Alden;Roland
-FN:Roland H. Alden
-ORG:AT&T;Versit Project Office
-TITLE:Consultant
-EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
-EMAIL;INTERNET:ralden@sfgate.com
-EMAIL;MCIMail:242-2200
-LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-Suite 2208=0A=
-One Pine Street=0A=
-San Francisco, CA 94111
-LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-Suite 2208=0A=
-One Pine Street=0A=
-San Francisco, CA 94111=0A=
-U.S.A.
-TEL;WORK;PREF;MSG:+1 415 296 9106
-TEL;WORK;FAX:+1 415 296 9016
-TEL;MSG;CELL:+1 415 608 5981
-ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
-SOUND:ROW-LAND H ALL-DIN
-LOGO;GIF;BASE64:
- R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
- QjExMSEhIRAQEO///87v9973/73n95zW71K13jGl1nvG50Kt3iGc1gCMzq3e94zO
- 7xCU1nO952O15wAAACwAAAAApgBOAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv
- /8CgcEj8QTaeywWTyWCUno2kSK0KI5tLc8vtNi+WiHVMlj0mFK96nalsxOW4fPSw
- cNj4tQc+7xcjGh4WExJTJYUTFkp3eU0eEH6RkpOUlTARhRoWm5ydFpCWoS0QEqAu
- ARKaHRcVjV0borEoFl0cSre4Sq67FA+yvwAeTU8XHZ7HmxS6u2wVfMCVpAE3pJoW
- ylrMptDcOqSF4OHg3eQ5pInInb7lcc86mNbLzBXsZbRfUOn6ucyNHvVWJHCpQFDf
- MWwEEzLqx2YCQCqF3OnItClJNmYcJD7cSAKTuI/gtnEcOQKkyVIk6/+ds5CkFcMM
- 61LiENikwi1jBnNyuvUSjwWZOS5uIZarqNFcNl32XMMB6I06GgoJ+bZp1ZKeDl8E
- +MC1K1cBIhZ4HUu2LAsCZdOWRQDt20lxIlccSHsgrNq7Xc/ixcsWmNu34WKyYJCW
- gQjCe9XqTZy2L4pv04gg2sSKSc8OLgTcBSuWsdkVaD2TdXyiQxebFyjo1Gnx6tJm
- LuaqrdtZtNfFtruSNmF5IKujwIsmJbjwtRqNJhrcNVw79wcRAgogmE4ArIjQzj/s
- JvHAGCFDQR4UqigPK4sBe62XwO51OwADiMcqUG+iOdcFAL+hW20BfAoEexlwAnu6
- mZDAXQ1EVh//WfhxJB5gIbHgwFgOTOiVAgOuVQKAfKFg3weGwSBYFZMp4hpDGKyA
- 3lgJKECWgiMQyBVpW+0V4oJjNfhCNkR1IgWEb21QlRK9GdfFCgeOZYBsXgm4noYj
- GEBhAQHYh0J8XenoQnFGdrkUciJY6FUAK15ogozakcBhliKsyZWHDMZQ0wWC/Aim
- DB6h01KRr/lXQgFxAqDcWDACgCZpUnrVQJtjwTnWjS6MWAYqqfDnSaEkJOlVXQBo
- 2pWTMUJ53WgAuPncCR9q6VQMAYjZlXWJmknCoSUM2p4BC+SaKwG88hoZlvfFMM4f
- hQh5TXkv+RklWYtC91mopJIAKFkJlDAW/wF25ShnLbeo5gmQ+1FGkJdrKCuCi2OR
- BuwHBcwqKgABrMtVAgpem61XkLbAJ7n8uiIpvGVhO4KpH1QLbbpqLheZvQCkGoNL
- thSzSTg2UGVBBzbtaxwKsYrmgLvRAlCmWgwMAADD66rKAgR3XlGspcdkZYK8ibU7
- asgEl+XAyB8I7PCqMWiWncGGimpfAgO4ypXSPpOVLwsRCDJxRD2AoyeRRv5kApO5
- fXwzwvfOKLKtaTWtbQxccmGLTZy8xYlVSvXbhbk0M2YzrYfJJ0K8m+V9NgxpyC04
- UycI/aiuiH9Y8NftDUwWp1Wm5UABnAUKwwRsPFGBt4Oc9PZvGvNLwf8JOZt8Arpe
- eY23yDovwIDiBX74NAsPVLDJj3Hh4JEExsKcjrlKf9DsCVx3ZfLqAKBuG1s/A90C
- z2KjYHjjyPOdG1spz6BBUr+BcUxUb1nDCTa/VZD2Uv+YkLPAKJC9dNEh7628WgqI
- ybzlaA+ufxMa6bxC6ciLUQLcx5UGIAAsAkDA6wQkOxrcY39yo4cQMNWCAPTKV1R4
- wPkgaBxzOc8FtMiF1NoGoXBRJjgoPApmPsjCFlbMdzCM4TFy50IXxI2DPcHAv2rY
- gghsEIeu8CAPW6ABIPYEFkOsAeaMyIz0JfGJUExBBGRIRX0IMYovWCIT1eBELNpA
- i1vcgta8iANPCIQOghzQABl30J0tXqBla4wjFLFQxZzAUY42CIAd5OYBCuKxB2c4
- I0b28EcrQKADgmSKB9RYyDhA4BqCxIBqrtjIMTwoFeCjYSU3KZMQAAA7
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-PRODID:-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-START:19960523T120000
-END:19960523T130000
-SUBTYPE:PHONE CALL
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-DESCRIPTION:VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland
-END:VEVENT
-BEGIN:VEVENT
-START:19960523T113000
-END:19960523T115500
-SUBTYPE:LUNCH
-SUMMARY:Eat in the cafeteria today
-END:VEVENT
-END:VCALENDAR
-
-END:VCARD
-
-
-will conceptually be be represented as
- vcard
- VCNameProp
- VCFamilyNameProp=Alden
- VCGivenNameProp=Roland
- VCFullNameProp=Roland H.Alden
- ....
-
-note that
- EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
-will be represented as:
- VCEmailAddress=sf!rincon!ralden@alden.attmail.com
- VCWork
- VCPreferred
- VCInternet
-where the lower level properties are properties of the property
-VCEmailAddress.
-
-Groupings are flattened out in the VObject representation such
-that:
- a.b:blah
- a.c:blahblah
-are represented as:
- b=blah
- VCGrouping=a
- c=blahblah
- VCGrouping=a
-i.e. one can read the above as:
- the property "b" has value "blah" and property "VCGrouping"
- with the value "a".
- the property "c" has value "blahblah" and property "VCGrouping"
- with the value "a".
-likewise, multi-level groupings are flatten similarly. e.g.
- a.b.c:blah
- a.b.e:blahblah
--->
- c=blah
- VCGrouping=b
- VCGrouping=a
- e=blahblah
- VCGrouping=b
- VCGrouping=a
-which read:
- the property "c" has value "blah" and property "VCGrouping"
- with the value "b" which has property "VCGrouping"
- with value "a".
- the property "e" has value "blahblah" and property "VCGrouping"
- with the value "b" which has property "VCGrouping"
- with value "a".
-
-3. Iterating Through VObject's Properties or Values
- ================================================
-The following is a skeletal form of iterating through
-all properties of a vobject, o:
-
- // assume the object of interest, o, is of type VObject
- VObjectIterator i;
- initPropIterator(&i,o);
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- // ... do something with "each" property
- }
-
-Use the API vObjectName() to access a VObject's name.
-Use the API vObjectValueType() to determine if a VObject has
- a value. For VCard/VCalendar application, you
- should not need this function as practically
- all values are either of type VCVT_USTRINGZ or
- VCVT_RAW (i.e set by setVObjectUStringZValue and
- setVObjectAnyValue APIs respectively), and the
- value returned by calls to vObjectUStringZValue
- and vObjectAnyValue are 0 if a VObject has no
- value. (There is a minor exception where VObject with
- VCDataSizeProp has value that is set by
- setVObjectLongValue).
-Use the APIs vObject???Value() to access a VObject's value.
- where ??? is the expected type.
-Use the APIs setvObject???Value() to set or modify a VObject's value.
- where ??? is the expected type.
-Use the API isAPropertyOf() to query if a name match the name of
- a property of a VObject. Since isAPropertyOf() return
- the matching property, we can use that to retrieve
- a property and subsequently the value of the property.
-
-4. Pretty Printing a VObject Tree
- ==============================
-VObject tree can be pretty printed with the printVObject() function.
-The output of pretty printing a VObject representation of the input
-test file "vobject.vcf" is shown below. Note that the indentation
-indicates the tree hirerarchy where the immediate children nodes
-of a parent node is all at the same indentation level and the
-immediate children nodes are the immediate properties of the
-associated parent nodes. In the following, {N,FN,ORG,TITLE,...}
-are immediate properties of VCARD. {F and G} are properties of N
-with value {"Alden" and "Roland"} respectively; FN has no property
-but has the value "Roland H. Alden"; EMAIL has value and
-the properties WORK, PREF, and INTERNET.
-
-
-VCARD
- N
- F="Alden"
- G="Roland"
- FN="Roland H. Alden"
- ORG
- ORGNAME="AT&T"
- OUN="Versit Project Office"
- TITLE="Consultant"
- EMAIL="sf!rincon!ralden@alden.attmail.com"
- WORK
- PREF
- INTERNET
- EMAIL="ralden@sfgate.com"
- INTERNET
- EMAIL="242-2200"
- MCIMail
- LABEL="Roland H. Alden
- Suite 2208
- One Pine Street
- San Francisco, CA 94111"
- DOM
- POSTAL
- PARCEL
- HOME
- WORK
- QP
- LABEL="Roland H. Alden
- Suite 2208
- One Pine Street
- San Francisco, CA 94111
- U.S.A."
- POSTAL
- PARCEL
- HOME
- WORK
- QP
- TEL="+1 415 296 9106"
- WORK
- PREF
- MSG
- TEL="+1 415 296 9016"
- WORK
- FAX
- TEL="+1 415 608 5981"
- MSG
- CELL
- ADR
- EXT ADD="Suite 2208"
- STREET="One Pine Street"
- L="San Francisco"
- R="CA"
- PC="94111"
- C="U.S.A."
- SOUND="ROW-LAND H ALL-DIN"
- LOGO=[raw data]
- GIF
- BASE64
- DataSize=1482
-VCALENDAR
- DCREATED="19960523T100522"
- PRODID="-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN"
- VERSION="0.3"
- VEVENT
- START="19960523T120000"
- END="19960523T130000"
- SUBTYPE="PHONE CALL"
- SUMMARY="VERSIT PDI PR Teleconference/Interview"
- DESCRIPTION="VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland"
- VEVENT
- START="19960523T113000"
- END="19960523T115500"
- SUBTYPE="LUNCH"
- SUMMARY="Eat in the cafeteria today"
-
-5. Building A VObject Representation of A VCard/VCalendar
- ======================================================
-The parser in vcc.y converts an input file with one or more
-VCard/VCalendar that is in their textual representation
-into their corresponding VObject representation.
-
-VObject representation of a VCard/VCalendar can also be built
-directly with calls to the VObject building APIs. e.g.
-
- VObject *prop;
- VObject *vcard = newVObject(VCCardProp);
- prop = addProp(vcard,VCNameProp);
- addPropValue(prop,VCFamilyNameProp,"Alden");
- addPropValue(prop,VCGivenNameProp,"Roland");
- addPropValue(vcard,VCFullNameProp,"Roland H. Alden");
- ....
-
-6. Converting A VObject Representation Into Its Textual Representation
- ===================================================================
-The VObject representation can be converted back to its textual
-representation via the call to writeVObject() or writeMemVObject()
-API. e.g.
- a. to write to a file:
- // assume vcard is of type VObject
- FILE *fp = fopen("alden.vcf","w");
- writeVObject(fp,vcard);
- a. to write to memory, and let the API allocate the required memory.
- char* clipboard = writeVObject(0,0,vcard);
- ... do something to clipboard
- free(clipboard);
- b. to write to a user allocated buffer:
- char clipboard[16384];
- int len = 16384;
- char *buf = writeVObject(clipboard,&len,vcard);
- ... buf will be equal to clipboard if the write
- is successful otherwise 0.
-
-In the case of writing to memory, the memory buffer can be either
-allocated by the API or the user. If the user allocate the
-memory for the buffer, then the length of the buffer needs to be
-communicated to the API via a variable. The variable passed as
-the length argument will be overwritten with the actual size
-of the text output. A 0 return value from writeMemVObject()
-indicates an error which could be caused by overflowing the
-size of the buffer or lack of heap memory.
-
-7. Miscellaneous Notes On VObject APIs usages
- ==========================================
-a. vcc.h -- contains basic interfaces to the parser:
- VObject* Parse_MIME(const char *input, unsigned long len);
- VObject* Parse_MIME_FromFile(FILE *file);
- -- both of this return a null-terminated list of
- VObject that is either a VCARD or VCALENDAR.
- To iterate through this list, do
- VObject *t, *v;
- v = Parse_Mime_FromFile(fp);
- while (v) {
- // ... do something to v.
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
- note that call to cleanVObject will release
- resource used to represent the VObject.
-
-b. vobject.h -- contains basic interfaces to the VObject APIs.
- see the header for more details.
- The structure of VObject is purposely (hiddened) not exposed
- to the user. Every access has to be done via
- the APIs. This way, if we need to change the
- structure or implementation, the client need not
- recompile as long as the interfaces remain the
- same.
-
-c. values of a property is determined by the property definition
- itself. The vobject APIs does not attempt to enforce
- any of such definition. It is the consumer responsibility
- to know what value is expected from a property. e.g
- most properties have unicode string value, so to access
- the value of these type of properties, you will use
- the vObjectUStringZValue() to read the value and
- setVObjectUStringZValue() to set or modify the value.
- Refer to the VCard and VCalendar specifications for
- the definition of each property.
-
-d. properties name (id) are case incensitive.
-
-8. Brief descriptions of each APIs
- ===============================
- * the predefined properties' names (id) are listed under vobject.h
- each is of the form VC*Prop. e.g.
- #define VC7bitProp "7BIT"
- #define VCAAlarmProp "AALARM"
- ....
-
- * consumer of a VObject can only define pointers to VObject.
-
- * a variable of type VObjectIterator, say "i", can be used to iterate
- through a VObject's properties, say "o". The APIs related to
- VObjectIterator are:
- void initPropIterator(VObjectIterator *i, VObject *o);
- -- e.g. usage
- initPropIterator(&i,o);
- int moreIteration(VObjectIterator *i);
- -- e.g. usage
- while (moreIteration(&i)) { ... }
- VObject* nextVObject(VObjectIterator *i);
- -- e.g. usage
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- }
-
- * VObject can be chained together to form a list. e.g. of such
- use is in the parser where the return value of the parser is
- a link list of VObject. A link list of VObject can be
- built by:
- void addList(VObject **o, VObject *p);
- and iterated by
- VObject* nextVObjectInList(VObject *o);
- -- next VObjectInList return 0 if the list
- is exhausted.
-
- * the following APIs are mainly used to construct a VObject tree:
- VObject* newVObject(const char *id);
- -- used extensively internally by VObject APIs but when
- used externally, its use is mainly limited to the
- construction of top level object (e.g. an object
- with VCCardProp or VCCalendarProp id).
-
- void deleteVObject(VObject *p);
- -- to deallocate single VObject, for most user, use
- cleanVObject(VObject *o) instead for freeing all
- resources associated with the VObject.
-
- char* dupStr(const char *s, unsigned int size);
- -- duplicate a string s. If size is 0, the string is
- assume to be a null-terminated.
-
- void deleteStr(const char *p);
- -- used to deallocate a string allocated by dupStr();
-
- void setVObjectName(VObject *o, const char* id);
- -- set the id of VObject o. This function is not
- normally used by the user. The setting of id
- is normally done as part of other APIs (e.g.
- addProp()).
-
- void setVObjectStringZValue(VObject *o, const char *s);
- -- set a string value of a VObject.
-
- void setVObjectUStringZValue(VObject *o, const wchar_t *s);
- -- set a Unicode string value of a VObject.
-
- void setVObjectIntegerValue(VObject *o, unsigned int i);
- -- set an integer value of a VObject.
-
- void setVObjectLongValue(VObject *o, unsigned long l);
- -- set an long integer value of a VObject.
-
- void setVObjectAnyValue(VObject *o, void *t);
- -- set any value of a VObject. The value type is
- unspecified.
-
- VObject* setValueWithSize(VObject *prop, void *val, unsigned int size);
- -- set a raw data (stream of bytes) value of a VObject
- whose size is size. The internal VObject representation
- is
- this object = val
- VCDataSizeProp=size
- i.e. the value val will be attached to the VObject prop
- and a property of VCDataSize whose value is size
- is also added to the object.
-
- void setVObjectVObjectValue(VObject *o, VObject *p);
- -- set a VObject as the value of another VObject.
-
- const char* vObjectName(VObject *o);
- -- retrieve the VObject's Name (i.e. id).
-
- const char* vObjectStringZValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- null-terminated string.
-
- const wchar_t* vObjectUStringZValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- null-terminated unicode string.
-
- unsigned int vObjectIntegerValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- integer.
-
- unsigned long vObjectLongValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- long integer.
-
- void* vObjectAnyValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- any value.
-
- VObject* vObjectVObjectValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- a VObject.
-
- VObject* addVObjectProp(VObject *o, VObject *p);
- -- add a VObject p as a property of VObject o.
- (not normally used externally for building a
- VObject).
-
- VObject* addProp(VObject *o, const char *id);
- -- add a property whose name is id to VObject o.
-
- VObject* addPropValue(VObject *o, const char *id, const char *v);
- -- add a property whose name is id and whose value
- is a null-terminated string to VObject o.
-
- VObject* addPropSizedValue(VObject *o, const char *id,
- const char *v, unsigned int size);
- -- add a property whose name is id and whose value
- is a stream of bytes of size size, to VObject o.
-
- VObject* addGroup(VObject *o, const char *g);
- -- add a group g to VObject o.
- e.g. if g is a.b.c, you will have
- o
- c
- VCGroupingProp=b
- VCGroupingProp=a
- and the object c is returned.
-
- VObject* isAPropertyOf(VObject *o, const char *id);
- -- query if a property by the name id is in o and
- return the VObject that represent that property.
-
- void printVObject(VObject *o);
- -- pretty print VObject o to stdout (for debugging use).
-
- void writeVObject(FILE *fp, VObject *o);
- -- convert VObject o to its textual representation and
- write it to file.
-
- char* writeMemVObject(char *s, int *len, VObject *o);
- -- convert VObject o to its textual representation and
- write it to memory. If s is 0, then memory required
- to hold the textual representation will be allocated
- by this API. If a variable len is passed, len will
- be overwriten with the byte size of the textual
- representation. If s is non-zero, then s has to
- be a user allocated buffer whose size has be passed
- in len as a variable. Memory allocated by the API
- has to be freed with call to free. The return value
- of this API is either the user supplied buffer,
- the memory allocated by the API, or 0 (in case of
- failure).
-
- void cleanStrTbl();
- -- this function has to be called when all
- VObject has been destroyed.
-
- void cleanVObject(VObject *o);
- -- release all resources used by VObject o.
-
- wchar_t* fakeUnicode(const char *ps, int *bytes);
- -- convert char* to wchar_t*.
-
- extern int uStrLen(const wchar_t *u);
- -- length of unicode u.
-
- char *fakeCString(const wchar_t *u);
- -- convert wchar_t to CString (blindly assumes that
- this could be done).
-
-9. Additional Programming Notes
- ============================
-In the following notes, please refers to the listing
-of Example.vcf and its VObject Representation
-(shown at the end of this section).
-
-* Handling the Return Value of the VCard/VCalendar Parser
- The example input text file contains two root VObjects
- (a VCalendar and a VCard). The output of the VCard/VCalendar
- parser is a null-terminated list of VObjects. For this
- particular input file, the list will have two VObjects.
- The following shows a template for iterating through the
- output of the Parser:
-
- VObject *t, *v;
- v = Parse_Mime_fromFileName("example.vcf");
- while (v) {
- // currently, v will either be a VCard or a VCalendar
- // do whatever your application need to do to
- // v here ...
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
-
-* Iterating Through a VCard/VCalendar VObject
- From the VObject APIs point of view, a VCard VObject
- is the same as a VCalendar VObject. However, the application
- needs to know what are in a VCard or a VCalendar.
- For example, A VCalendar VObject can have VCDCreatedProp,
- a VCGEOLocationProp, etc, and one or more VCEventProp and
- or VCTodoProp. The VCEventProp and VCTodoProp can have
- many properties of their own, which in turn could have
- more properties (e.g. VCDAlarmProp can be a VCEventProp
- VObject's property, and VCRunTimeProp can be a
- VCDAlarmProp VObject's property. Because a VObject tree
- can be arbitrarily complex, in general, to process all
- properties and values of a VObject tree, a recursive walk
- is desirable. An example recursive VObject tree walk
- can be found in the vobject.c source lines for printVObject*
- and writeVObject* APIs. Depending on what the application need
- to do with a VCard or a VCalendar, a recursive walk
- of the VObject tree may or may not be desirable. An example
- template of a non-recursive walk is shown below:
-
- void processVCardVCalendar(char *inputFile)
- {
- VObject *t, *v;
- v = Parse_Mime_fromFileName(inputFile);
- while (v) {
- char *n = vObjectName(v);
- if (strcmp(n,VCCardProp) == 0) {
- do_VCard(v);
- }
- else if (strcmp(n,VCCalendarProp) == 0) {
- do_VCalendar(v);
- }
- else {
- // don't know how to handle anything else!
- }
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
- }
-
- void do_VCard(VObject *vcard)
- {
- VObjectIterator t;
- initPropIterator(&t,vcard);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- // The primarly purpose of this example is to
- // show how to iterate through a VCard VObject,
- // it is not meant to be efficient at all.
- char *n = vObjectName(eachProp);
- if (strcmp(n,VCNameProp)==0) {
- do_name(eachProp);
- }
- else if (strcmp(n,VCEmailProp)==0) {
- do_email(eachProp);
- }
- else if (strcmp(n,VCLabelProp)==0) {
- do_label(eachProp);
- }
- else if ....
- }
- }
-
- void do_VCalendar(VObject *vcal)
- {
- VObjectIterator t;
- initPropIterator(&t,vcard);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- // The primarly purpose of this example is to
- // show how to iterate through a VCalendar VObject,
- // it is not meant to be efficient at all.
- char *n = vObjectName(eachProp);
- if (strcmp(n,VCDCreatedProp)==0) {
- do_DCreated(eachProp);
- }
- else if (strcmp(n,VCVersionProp)==0) {
- do_Version(eachProp);
- }
- else if (strcmp(n,VCTodoProp)==0) {
- do_Todo(eachProp);
- }
- else if (strcmp(n,VCEventProp)==0) {
- do_Event(eachProp);
- }
- else if ....
- }
- }
-
- void do_Todo(VObject *vtodo) { ... }
-
- void do_Event(VObject *vevent) { ... }
-
- ...
-
-* Property's Values and Properties
- The VObject APIs do not attempt to check for the
- correctness of the values of a property. Nor do they
- will prevent the user from attaching a non-VCard/VCalendar
- standard property to a VCard/VCalendar property. Take
- the example of line [11] of the example, "O.K" is not
- a valid value of VCStatusProp. It is up to the application
- to accept or reject the value of a property.
-
-* Output of printVObject
- PrintVObject pretty prints a VObject tree in human
- readable form. See the listing at the end of the file
- for an example output of printVObject on the example
- input file "Example.vcf".
-
- Note that binary data are not shown in the output of
- printVObject. Instead, a note is made ([raw data]) to
- indicate that there exists such a binary data.
-
-* Note on Binary Data
- When the value of a property is a binary data, it is only
- useful to know the size of the binary data.
-
- In the case of the VCard/VCalendar parser, it chooses
- to represent the size information as a separate property
- called VCDataSizeProp whose value is the size of the binary
- data. The APIs sequence to construct the VObject subtree
- of line [44] of Example.vcf is
-
- // VObject *vcard;
- VObject *p1 = addProp(vcard,VCLogoProp);
- (void) addProp(p1,VCGIFProp);
- (void) addProp(p1,VCBASE64Prop);
- VObject *p2 = addProp(p1,VCDataSizeProp);
- (void) setVObjectLongValue(p2,1482);
- setVObjectAnyValue(vcard,...pointer to binary data);
-
- Note the presence of VCBase64Prop will cause the
- writeVObject API to output the binary data as BASE64 text.
- For VCard/VCalendar application, having the VCBase64Prop
- property is pratically always neccessary for property with
- binary data as its value.
-
-* Note on Quoted-Printable String
- String value with embedded newline are written out as
- quoted-prinatable string. It is therefore important
- to mark a property with a string value that has
- one or more embedded newlines, with the VCQutedPrintableProp
- property. e.g.
-
- // VObject *root;
- char *msg="To be\nor\nnot to be";
- VObject *p = addPropValue(root,VCDescriptionProp,msg);
- // the following is how you mark a property with
- // a property. In this case, the marker is
- // VCQuotedPrintableProp
- addProp(p,VCQuotedPrintableProp);
-
-* Note on Unicode
- Although, the current parser takes ASCII text file only,
- string values are all stored as Unicode in the VObject tree.
- For now, when using the VObject APIs to construct a
- VObject tree, one should always convert ASCII string value
- to a Unicode string value:
-
- // VObject *root;
- VObject *p = addProp(root,VCSomeProp);
- setVObjectUStringZValue(p,fakeUnicode(someASCIIStringZvalue));
-
- An API is provided to simplify the above process:
-
- addPropValue(root,VCSomeProp,someASCIIStringZValue);
-
- Note that someASCIISTringZValue is automatically converted to
- Unicode by addPropValue API, where as, the former code
- sequence do an explicit call to fakeUnicode.
-
- To read back the value, one should use the vObjectUStringZValue
- API not vObjectStringZValue API. The value returned by the
- vObjectUStringZValue API is a Unicode string. If the application
- do not know how to handle Unicode string, it can use the
- fakeCString API to convert it back to ASCII string (as long
- as the conversion is meaningful).
-
- Note that fakeCString return a heap allocated memory. It is
- important to call deleteStr on fakeCString return value if
- it is not longer required (or there will be memory leak).
-
- NOTE: Unfortunately, at the point when this document is written,
- there is still no consensus on how Unicode is to be handled
- in the textual representation of VCard/VCalendar. So, there
- is no version of writeVObject and the parser to output and
- input Unicode textual representation of VCard/VCalendar.
-
-
-Example.vcf
------------
-line
-number Input Text (example.vcf)
------- ----------
-1 BEGIN:VCALENDAR
-2 DCREATED:19961102T100522
-3 GEO:0,0
-4 VERSION:1.0
-5 BEGIN:VEVENT
-6 DTSTART:19961103T000000
-7 DTEND:20000101T000000
-8 DESCRIPTION;QUOTED-PRINTABLE:To be =0A=
-9 or =0A=
-10 not to be
-11 STATUS:O.K.
-12 X-ACTION:No action required
-13 DALARM:19961103T114500;5;3;Enjoy
-14 MALARM:19970101T120000;;;johny@nowhere.com;Call Mom.
-15 END:VEVENT
-16
-17 BEGIN:VTODO
-18 DUE:19960614T0173000
-19 DESCRIPTION:Relex.
-20 END:VTODO
-21
-22 END:VCALENDAR
-23
-24 BEGIN:VCARD
-25 N:Alden;Roland
-26 FN:Roland H. Alden
-27 ORG:AT&T;Versit Project Office
-28 TITLE:Consultant
-29 EMAIL;WORK;PREF;INTERNET:ralden@ralden.com
-30 LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-31 Suite 2208=0A=
-32 One Pine Street=0A=
-33 San Francisco, CA 94111
-34 LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-35 Suite 2208=0A=
-36 One Pine Street=0A=
-37 San Francisco, CA 94111=0A=
-38 U.S.A.
-39 TEL;WORK;PREF;MSG:+1 415 296 9106
-40 TEL;WORK;FAX:+1 415 296 9016
-41 TEL;MSG;CELL:+1 415 608 5981
-42 ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
-43 SOUND:ROW-LAND H ALL-DIN
-44 LOGO;GIF;BASE64:
-45 R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
- ... 30 lines of BASE64 data not shown here.
-76 END:VCARD
-
-
-VObject Representation of Example.vcf:
--------------------------------------
-line
-in
-text
-file VObject Tree as Printed by printVObject API
----- -------------------------------------------
-1 VCALENDAR
-2 DCREATED="19961102T100522"
-3 GEO="0,0"
-4 VERSION="1.0"
-5 VEVENT
-6 DTSTART="19961103T000000"
-7 DTEND="20000101T000000"
-8 DESCRIPTION="To be
-9 or
-10 not to be"
-8 QUOTED-PRINTABLE
-11 STATUS="O.K."
-12 X-ACTION="No action required"
-13 DALARM
-13 RUNTIME="19961103T114500"
-13 SNOOZETIME="5"
-13 REPEATCOUNT="3"
-13 DISPLAYSTRING="Enjoy"
-14 MALARM
-14 RUNTIME="19970101T120000"
-14 EMAIL="johny@nowhere.com"
-14 NOTE="Call Mom"
-17 VTODO
-18 DUE="19960614T0173000"
-19 DESCRIPTION="Relex."
-24 VCARD
-25 N
-25 F="Alden"
-25 G="Roland"
-26 FN="Roland H. Alden"
-27 ORG
-27 ORGNAME="AT&T"
-27 OUN="Versit Project Office"
-28 TITLE="Consultant"
-29 EMAIL="ralden@alden.com"
-29 WORK
-29 PREF
-29 INTERNET
-30 LABEL="Roland H. Alden
-31 Suite 2208
-32 One Pine Street
-33 San Francisco, CA 94111"
-30 DOM
-30 POSTAL
-30 PARCEL
-30 HOME
-30 WORK
-30 QUOTED-PRINTABLE
-34 LABEL="Roland H. Alden
-35 Suite 2208
-36 One Pine Street
-37 San Francisco, CA 94111
-38 U.S.A."
-34 POSTAL
-34 PARCEL
-34 HOME
-34 WORK
-34 QUOTED-PRINTABLE
-39 TEL="+1 415 296 9106"
-39 WORK
-39 PREF
-39 MSG
-40 TEL="+1 415 296 9016"
-40 WORK
-40 FAX
-41 TEL="+1 415 608 5981"
-41 MSG
-41 CELL
-42 ADR
-42 EXT ADD="Suite 2208"
-42 STREET="One Pine Street"
-42 L="San Francisco"
-42 R="CA"
-42 PC="94111"
-42 C="U.S.A."
-43 SOUND="ROW-LAND H ALL-DIN"
-44 LOGO=[raw data]
-44 GIF
-44 BASE64
-44 DATASIZE=1482
-
diff --git a/libical/src/libicalvcal/icalvcal.c b/libical/src/libicalvcal/icalvcal.c
deleted file mode 100644
index 24c3155178..0000000000
--- a/libical/src/libicalvcal/icalvcal.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*======================================================================
- FILE: icalvcal.c
- CREATOR: eric 25 May 00
-
- $Id$
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvcal.c
-
-
-
- The icalvcal_convert routine calls icalvcal_traverse_objects to do
- its work.s his routine steps through through all of the properties
- and components of a VObject. For each name of a property or a
- component, icalvcal_traverse_objects looks up the name in
- conversion_table[]. This table indicates wether the name is of a
- component or a property, lists a routine to handle conversion, and
- has extra data for the conversion.
-
- The conversion routine will create new iCal components or properties
- and add them to the iCal component structure.
-
- The most common conversion routine is dc_prop. This routine converts
- properties for which the text representation of the vCal component
- is identical the iCal representation.
-
- ======================================================================*/
-
-#include "icalvcal.h"
-#include <string.h>
-
-enum datatype {
- COMPONENT,
- PROPERTY,
- PARAMETER,
- UNSUPPORTED
-};
-
-
-struct conversion_table_struct {
- char* vcalname;
- enum datatype type;
- void* (*conversion_func)(int icaltype, VObject *o);
- int icaltype;
-};
-
-struct conversion_table_struct conversion_table[];
-void* dc_prop(int icaltype, VObject *object);
-
-static void icalvcal_traverse_objects(VObject *object,icalcomponent* last_comp,
- icalproperty* last_prop)
-{
- VObjectIterator iterator;
- char* name = "[No Name]";
- icalcomponent* subc = 0;
- int i;
-
- if ( vObjectName(object)== 0){
- printf("ERROR, object has no name");
- assert(0);
- return;
- }
-
- name = (char*)vObjectName(object);
-
- /* Lookup this object in the conversion table */
- for (i = 0; conversion_table[i].vcalname != 0; i++){
- if(strcmp(conversion_table[i].vcalname, name) == 0){
- break;
- }
- }
-
- /* Did not find the object. It may be an X-property, or an unknown
- property */
- if (conversion_table[i].vcalname == 0){
-
- /* Handle X properties */
- if(strncmp(name, "X-",2) == 0){
- icalproperty* prop = (icalproperty*)dc_prop(ICAL_X_PROPERTY,object);
- icalproperty_set_x_name(prop,name);
- icalcomponent_add_property(last_comp,prop);
- } else {
- assert(0);
- return;
- }
-
- } else {
-
- /* The vCal property is in the table, and it is not an X
- property, so try to convert it to an iCal component,
- property or parameter. */
-
- switch(conversion_table[i].type){
-
-
- case COMPONENT: {
- subc =
- (icalcomponent*)(conversion_table[i].conversion_func
- (conversion_table[i].icaltype,
- object));
-
- icalcomponent_add_component(last_comp,subc);
-
- assert(subc!=0);
-
- break;
- }
-
- case PROPERTY: {
-
- if (vObjectValueType(object) &&
- conversion_table[i].conversion_func != 0 ) {
-
- icalproperty* prop =
- (icalproperty*)(conversion_table[i].conversion_func
- (conversion_table[i].icaltype,
- object));
-
- icalcomponent_add_property(last_comp,prop);
- last_prop = prop;
-
- }
- break;
- }
-
- case PARAMETER: {
- break;
- }
-
- case UNSUPPORTED: {
-
- /* If the property is listed as UNSUPPORTED, insert a
- X_LIC_ERROR property to note this fact. */
-
- char temp[1024];
- char* message = "Unsupported vCal property";
- icalparameter *error_param;
- icalproperty *error_prop;
-
- snprintf(temp,1024,"%s: %s",message,name);
-
- error_param = icalparameter_new_xlicerrortype(
- ICAL_XLICERRORTYPE_UNKNOWNVCALPROPERROR
- );
-
- error_prop = icalproperty_new_xlicerror(temp);
- icalproperty_add_parameter(error_prop, error_param);
-
- icalcomponent_add_property(last_comp,error_prop);
-
- break;
- }
- }
- }
-
-
- /* Now, step down into the next vCalproperty */
-
- initPropIterator(&iterator,object);
- while (moreIteration(&iterator)) {
- VObject *eachProp = nextVObject(&iterator);
-
- /* If 'object' is a component, then the next traversal down
- should use it as the 'last_comp' */
-
- if(subc!=0){
- icalvcal_traverse_objects(eachProp,subc,last_prop);
-
- } else {
- icalvcal_traverse_objects(eachProp,last_comp,last_prop);
- }
- }
-}
-
-icalcomponent* icalvcal_convert(VObject *object){
-
- char* name = (char*)vObjectName(object);
- icalcomponent* container = icalcomponent_new(ICAL_XROOT_COMPONENT);
- icalcomponent* root;
-
- icalerror_check_arg_rz( (object!=0),"Object");
-
- /* The root object must be a VCALENDAR */
- if(*name==0 || strcmp(name,VCCalProp) != 0){
- return 0; /* HACK. Should return an error */
- }
-
-
- icalvcal_traverse_objects(object,container,0);
-
- /* HACK. I am using the extra 'container' component because I am
- lazy. I know there is a way to get rid of it, but I did not care
- to find it. */
-
- root = icalcomponent_get_first_component(container,ICAL_ANY_COMPONENT);
-
- icalcomponent_remove_component(container, root);
- icalcomponent_free(container);
-
- return root;
-
-}
-
-/* comp() is useful for most components, but alarm, daylight and
- * timezone are different. In vcal, they are properties, and in ical,
- * they are components. Although because of the way that vcal treats
- * everything as a property, alarm_comp() daylight_comp() and
- * timezone_comp() may not really be necessary, I think it would be
- * easier to use them. */
-
-void* comp(int icaltype, VObject *o)
-{
- icalcomponent_kind kind = (icalcomponent_kind)icaltype;
-
- icalcomponent* c = icalcomponent_new(kind);
-
- return (void* )c;
-}
-
-void* alarm_comp(int icaltype, VObject *o)
-{
- icalcomponent_kind kind = (icalcomponent_kind)icaltype;
-
- icalcomponent* c = icalcomponent_new(kind);
-
- return (void*)c;
-}
-
-void* daylight_comp(int icaltype, VObject *o)
-{
- icalcomponent_kind kind = (icalcomponent_kind)icaltype;
-
- icalcomponent* c = icalcomponent_new(kind);
-
- return (void*)c;
-}
-
-void* timezone_comp(int icaltype, VObject *o)
-{
- icalcomponent_kind kind = (icalcomponent_kind)icaltype;
-
- icalcomponent* c = icalcomponent_new(kind);
-
- return (void*)c;
-}
-
-
-/* These #defines indicate conversion routines that are not defined yet. */
-
-#define categories_prop 0
-#define transp_prop 0
-#define status_prop 0
-
-#define parameter 0
-#define rsvp_parameter 0
-
-
-
-/* directly convertable property. The string representation of vcal is
- the same as ical */
-
-void* dc_prop(int icaltype, VObject *object)
-{
- icalproperty_kind kind = (icalproperty_kind)icaltype;
- icalproperty *prop;
- icalvalue *value;
- icalvalue_kind value_kind;
- char *s,*t=0;
-
- prop = icalproperty_new(kind);
-
- value_kind =
- icalenum_property_kind_to_value_kind(
- icalproperty_isa(prop));
-
-
- switch (vObjectValueType(object)) {
- case VCVT_USTRINGZ: {
- s = t = fakeCString(vObjectUStringZValue(object));
- break;
- }
- case VCVT_STRINGZ: {
- s = (char*)vObjectStringZValue(object);
- break;
- }
- }
-
- value = icalvalue_new_from_string(value_kind,s);
-
- if(t!=0){
- deleteStr(t);
- }
-
- icalproperty_set_value(prop,value);
-
- return (void*)prop;
-}
-
-
-/* My extraction program screwed up, so this table does not have all
-of the vcal properties in it. I didn't feel like re-doing the entire
-table, so you'll have to find the missing properties the hard way --
-the code will assert */
-
-struct conversion_table_struct conversion_table[] =
-{
-{VCCalProp, COMPONENT, comp, ICAL_VCALENDAR_COMPONENT},
-{VCTodoProp, COMPONENT, comp, ICAL_VTODO_COMPONENT},
-{VCEventProp, COMPONENT, comp, ICAL_VEVENT_COMPONENT},
-{VCAAlarmProp, COMPONENT, alarm_comp, ICAL_XAUDIOALARM_COMPONENT},
-{VCDAlarmProp, COMPONENT, alarm_comp, ICAL_XDISPLAYALARM_COMPONENT},
-{VCMAlarmProp, COMPONENT, alarm_comp, ICAL_XEMAILALARM_COMPONENT},
-{VCPAlarmProp, COMPONENT, alarm_comp, ICAL_XPROCEDUREALARM_COMPONENT},
-{VCDayLightProp, COMPONENT, daylight_comp,0},
-{VCTimeZoneProp, COMPONENT, timezone_comp, ICAL_VTIMEZONE_COMPONENT},
-{VCProdIdProp, PROPERTY, dc_prop, ICAL_PRODID_PROPERTY},
-{VCClassProp, PROPERTY, dc_prop, ICAL_CLASS_PROPERTY},
-{VCDCreatedProp, PROPERTY, dc_prop, ICAL_CREATED_PROPERTY},
-{VCDescriptionProp, PROPERTY, dc_prop, ICAL_DESCRIPTION_PROPERTY},
-{VCAttendeeProp, PROPERTY, dc_prop, ICAL_ATTENDEE_PROPERTY},
-{VCCategoriesProp, PROPERTY, categories_prop,ICAL_CATEGORIES_PROPERTY},
-{VCDTendProp, PROPERTY, dc_prop, ICAL_DTEND_PROPERTY},
-{VCDTstartProp, PROPERTY, dc_prop, ICAL_DTSTART_PROPERTY},
-{VCDueProp, PROPERTY, dc_prop, ICAL_DUE_PROPERTY},
-{VCLocationProp, PROPERTY, dc_prop, ICAL_LOCATION_PROPERTY},
-{VCSummaryProp, PROPERTY, dc_prop, ICAL_SUMMARY_PROPERTY},
-{VCVersionProp, PROPERTY, dc_prop, ICAL_VERSION_PROPERTY},
-{VCTranspProp, PROPERTY, transp_prop, ICAL_TRANSP_PROPERTY},
-{VCUniqueStringProp, PROPERTY, dc_prop, ICAL_UID_PROPERTY},
-{VCURLProp, PROPERTY, dc_prop, ICAL_URL_PROPERTY},
-{VCLastModifiedProp, PROPERTY, dc_prop, ICAL_LASTMODIFIED_PROPERTY},
-{VCSequenceProp, PROPERTY, dc_prop, ICAL_SEQUENCE_PROPERTY},
-{VCPriorityProp, PROPERTY, dc_prop, ICAL_PRIORITY_PROPERTY},
-{VCStatusProp, PROPERTY, status_prop, ICAL_STATUS_PROPERTY},
-{VCRSVPProp, UNSUPPORTED, rsvp_parameter,ICAL_RSVP_PARAMETER },
-{VCEncodingProp, UNSUPPORTED, parameter, ICAL_ENCODING_PARAMETER},
-{VCRoleProp, UNSUPPORTED, parameter, ICAL_ROLE_PARAMETER},
-{VCStatusProp, UNSUPPORTED, parameter, ICAL_STATUS_PROPERTY},
-{VCQuotedPrintableProp,UNSUPPORTED,0, 0},
-{VC7bitProp, UNSUPPORTED,0, 0},
-{VC8bitProp, UNSUPPORTED,0, 0},
-{VCAdditionalNamesProp,UNSUPPORTED,0, 0},
-{VCAdrProp, UNSUPPORTED,0, 0},
-{VCAgentProp, UNSUPPORTED,0, 0},
-{VCAIFFProp, UNSUPPORTED,0, 0},
-{VCAOLProp, UNSUPPORTED,0, 0},
-{VCAppleLinkProp, UNSUPPORTED,0, 0},
-{VCAttachProp, UNSUPPORTED,0, 0},
-{VCATTMailProp, UNSUPPORTED,0, 0},
-{VCAudioContentProp, UNSUPPORTED,0, 0},
-{VCAVIProp, UNSUPPORTED,0, 0},
-{VCBase64Prop, UNSUPPORTED,0, 0},
-{VCBBSProp, UNSUPPORTED,0, 0},
-{VCBirthDateProp, UNSUPPORTED,0, 0},
-{VCBMPProp, UNSUPPORTED,0, 0},
-{VCBodyProp, UNSUPPORTED,0, 0},
-{VCCaptionProp, UNSUPPORTED,0, 0},
-{VCCarProp, UNSUPPORTED,0, 0},
-{VCCellularProp, UNSUPPORTED,0, 0},
-{VCCGMProp, UNSUPPORTED,0, 0},
-{VCCharSetProp, UNSUPPORTED,0, 0},
-{VCCIDProp, UNSUPPORTED,0, 0},
-{VCCISProp, UNSUPPORTED,0, 0},
-{VCCityProp, UNSUPPORTED,0, 0},
-{VCCommentProp, UNSUPPORTED,0, 0},
-{VCCompletedProp, UNSUPPORTED,0, 0},
-{VCCountryNameProp, UNSUPPORTED,0, 0},
-{VCDataSizeProp, UNSUPPORTED,0, 0},
-{VCDeliveryLabelProp, UNSUPPORTED,0, 0},
-{VCDIBProp, UNSUPPORTED,0, 0},
-{VCDisplayStringProp, UNSUPPORTED,0, 0},
-{VCDomesticProp, UNSUPPORTED,0, 0},
-{VCEmailAddressProp, UNSUPPORTED,0, 0},
-{VCEndProp, UNSUPPORTED,0, 0},
-{VCEWorldProp, UNSUPPORTED,0, 0},
-{VCExNumProp, UNSUPPORTED,0, 0},
-{VCExpDateProp, UNSUPPORTED,0, 0},
-{VCExpectProp, UNSUPPORTED,0, 0},
-{VCFamilyNameProp, UNSUPPORTED,0, 0},
-{VCFaxProp, UNSUPPORTED,0, 0},
-{VCFullNameProp, UNSUPPORTED,0, 0},
-{VCGeoProp, UNSUPPORTED,0, 0},
-{VCGeoLocationProp, UNSUPPORTED,0, 0},
-{VCGIFProp, UNSUPPORTED,0, 0},
-{VCGivenNameProp, UNSUPPORTED,0, 0},
-{VCGroupingProp, UNSUPPORTED,0, 0},
-{VCHomeProp, UNSUPPORTED,0, 0},
-{VCIBMMailProp, UNSUPPORTED,0, 0},
-{VCInlineProp, UNSUPPORTED,0, 0},
-{VCInternationalProp, UNSUPPORTED,0, 0},
-{VCInternetProp, UNSUPPORTED,0, 0},
-{VCISDNProp, UNSUPPORTED,0, 0},
-{VCJPEGProp, UNSUPPORTED,0, 0},
-{VCLanguageProp, UNSUPPORTED,0, 0},
-{VCLastRevisedProp, UNSUPPORTED,0, 0},
-{VCLogoProp, UNSUPPORTED,0, 0},
-{VCMailerProp, UNSUPPORTED,0, 0},
-{VCMCIMailProp, UNSUPPORTED,0, 0},
-{VCMessageProp, UNSUPPORTED,0, 0},
-{VCMETProp, UNSUPPORTED,0, 0},
-{VCModemProp, UNSUPPORTED,0, 0},
-{VCMPEG2Prop, UNSUPPORTED,0, 0},
-{VCMPEGProp, UNSUPPORTED,0, 0},
-{VCMSNProp, UNSUPPORTED,0, 0},
-{VCNamePrefixesProp, UNSUPPORTED,0, 0},
-{VCNameProp, UNSUPPORTED,0, 0},
-{VCNameSuffixesProp, UNSUPPORTED,0, 0},
-{VCNoteProp, UNSUPPORTED,0, 0},
-{VCOrgNameProp, UNSUPPORTED,0, 0},
-{VCOrgProp, UNSUPPORTED,0, 0},
-{VCOrgUnit2Prop, UNSUPPORTED,0, 0},
-{VCOrgUnit3Prop, UNSUPPORTED,0, 0},
-{VCOrgUnit4Prop, UNSUPPORTED,0, 0},
-{VCOrgUnitProp, UNSUPPORTED,0, 0},
-{VCPagerProp, UNSUPPORTED,0, 0},
-{VCParcelProp, UNSUPPORTED,0, 0},
-{VCPartProp, UNSUPPORTED,0, 0},
-{VCPCMProp, UNSUPPORTED,0, 0},
-{VCPDFProp, UNSUPPORTED,0, 0},
-{VCPGPProp, UNSUPPORTED,0, 0},
-{VCPhotoProp, UNSUPPORTED,0, 0},
-{VCPICTProp, UNSUPPORTED,0, 0},
-{VCPMBProp, UNSUPPORTED,0, 0},
-{VCPostalBoxProp, UNSUPPORTED,0, 0},
-{VCPostalCodeProp, UNSUPPORTED,0, 0},
-{VCPostalProp, UNSUPPORTED,0, 0},
-{VCPowerShareProp, UNSUPPORTED,0, 0},
-{VCPreferredProp, UNSUPPORTED,0, 0},
-{VCProcedureNameProp, UNSUPPORTED,0, 0},
-{VCProdigyProp, UNSUPPORTED,0, 0},
-{VCPronunciationProp, UNSUPPORTED,0, 0},
-{VCPSProp, UNSUPPORTED,0, 0},
-{VCPublicKeyProp, UNSUPPORTED,0, 0},
-{VCQPProp, UNSUPPORTED,0, 0},
-{VCQuickTimeProp, UNSUPPORTED,0, 0},
-{VCRDateProp, UNSUPPORTED,0, 0},
-{VCRegionProp, UNSUPPORTED,0, 0},
-{VCRepeatCountProp, UNSUPPORTED,0, 0},
-{VCResourcesProp, UNSUPPORTED,0, 0},
-{VCRNumProp, UNSUPPORTED,0, 0},
-{VCRRuleProp, UNSUPPORTED,0, 0},
-{VCRunTimeProp, UNSUPPORTED,0, 0},
-{VCSnoozeTimeProp, UNSUPPORTED,0, 0},
-{VCStartProp, UNSUPPORTED,0, 0},
-{VCStreetAddressProp, UNSUPPORTED,0, 0},
-{VCSubTypeProp, UNSUPPORTED,0, 0},
-{VCTelephoneProp, UNSUPPORTED,0, 0},
-{VCTIFFProp, UNSUPPORTED,0, 0},
-{VCTitleProp, UNSUPPORTED,0, 0},
-{VCTLXProp, UNSUPPORTED,0, 0},
-{VCURLValueProp, UNSUPPORTED,0, 0},
-{VCValueProp, UNSUPPORTED,0, 0},
-{VCVideoProp, UNSUPPORTED,0, 0},
-{VCVoiceProp, UNSUPPORTED,0, 0},
-{VCWAVEProp, UNSUPPORTED,0, 0},
-{VCWMFProp, UNSUPPORTED,0, 0},
-{VCWorkProp, UNSUPPORTED,0, 0},
-{VCX400Prop, UNSUPPORTED,0, 0},
-{VCX509Prop, UNSUPPORTED,0, 0},
-{VCXRuleProp, UNSUPPORTED,0, 0},
-{0,0,0,0}
-};
-
-
-#if 0
- switch (vObjectValueType(object)) {
- case VCVT_USTRINGZ: {
- char c;
- char *t,*s;
- s = t = fakeCString(vObjectUStringZValue(object));
- printf(" ustringzstring:%s\n",s);
- deleteStr(s);
- break;
- }
- case VCVT_STRINGZ: {
- char c;
- const char *s = vObjectStringZValue(object);
- printf(" stringzstring:%s\n",s);
- break;
- }
- case VCVT_UINT:
- {
- int i = vObjectIntegerValue(object);
- printf(" int:%d\n",i);
- break;
- }
- case VCVT_ULONG:
- {
- long l = vObjectLongValue(object);
- printf(" int:%d\n",l);
- break;
- }
- case VCVT_VOBJECT:
- {
- printf("ERROR, should not get here\n");
- break;
- }
- case VCVT_RAW:
- case 0:
- default:
- break;
- }
-
-#endif
diff --git a/libical/src/libicalvcal/icalvcal.h b/libical/src/libicalvcal/icalvcal.h
deleted file mode 100644
index f2316c2d0f..0000000000
--- a/libical/src/libicalvcal/icalvcal.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C -*-*/
-/*======================================================================
- FILE: icalvcal.h
- CREATOR: eric 25 May 00
-
-
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The original code is icalvcal.h
-
-
-======================================================================*/
-
-#ifndef ICALVCAL_H
-#define ICALVCAL_H
-
-#include "ical.h"
-#include "vcc.h"
-
-/* Convert a vObject into an icalcomponent */
-
-icalcomponent* icalvcal_convert(VObject *object);
-
-#endif /* !ICALVCAL_H */
-
-
-
diff --git a/libical/src/libicalvcal/port.h b/libical/src/libicalvcal/port.h
deleted file mode 100644
index 1768beebd8..0000000000
--- a/libical/src/libicalvcal/port.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-#ifndef __PORT_H__
-#define __PORT_H__ 1
-
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-/* some of these #defines are commented out because */
-/* Visual C++ sets them on the compiler command line instead */
-
-/* #define _DEBUG */
-/* #define WIN32 */
-/* #define WIN16 */
-/* #define _WINDOWS */
-/* #define __MWERKS__ */
-/* #define INCLUDEMFC */
-
-#define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
-#define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
-
-/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
-are globally unique IDs which can be used to generate clipboard format
-ID's as per the requirements of a specific platform. For example, in
-Windows they are used as the parameter in a call to RegisterClipboardFormat.
-For example:
-
- CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
-
-*/
-
-#define vCardMimeType "text/x-vCard"
-#define vCalendarMimeType "text/x-vCalendar"
-
-#define DLLEXPORT(t) t
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#define stricmp strcasecmp
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __PORT_H__ */
diff --git a/libical/src/libicalvcal/vcaltest.c b/libical/src/libicalvcal/vcaltest.c
deleted file mode 100644
index 5528aab1d1..0000000000
--- a/libical/src/libicalvcal/vcaltest.c
+++ /dev/null
@@ -1,118 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "vcaltmp.h"
-
-#if 0
-This testcase would generate a file call "frankcal.vcf" with
-the following content:
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-GEO:37.24,-17.87
-PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-DTSTART:19960523T120000
-DTEND:19960523T130000
-DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A=
-With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A=
-activities with European Press representatives.
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-SUBTYPE:PHONE CALL
-STATUS:CONFIRMED
-TRANSP:19960523T100522-4000F100582713-009251
-UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2
-DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!;
-MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!;
-PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2;
-X-LDC-OR2-OLE:c:\temp\agenda.doc
-END:VEVENT
-
-BEGIN:VTODO
-DUE:19960614T0173000
-DESCRIPTION:Review VCalendar helper API.
-END:VTODO
-
-END:VCALENDAR
-
-#endif
-
-FILE *cfp;
-
-void testVcalAPIs() {
- FILE *fp;
- VObject *vcal, *vevent;
-#if _CONSOLE
- cfp = stdout;
-#else
- cfp = fopen("vcaltest.out","w");
-#endif
- if (cfp == 0) return;
- vcal = vcsCreateVCal(
- "19960523T100522",
- "37.24,-17.87",
- "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN",
- 0,
- "0.3"
- );
-
- vevent = vcsAddEvent(
- vcal,
- "19960523T120000",
- "19960523T130000",
- "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.",
- "VERSIT PDI PR Teleconference/Interview",
- "PHONE CALL",
- 0,
- "CONFIRMED",
- "19960523T100522-4000F100582713-009251",
- "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2",
- 0
- );
-
- vcsAddDAlarm(vevent, "19960523T114500", "5", "3",
- "Your Telecon Starts At Noon!!!");
- vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com",
- "Remember 05/23 Noon Telecon!!!");
- vcsAddPAlarm(vevent, "19960523T115500", 0 ,0,
- "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2");
-
- addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc");
-
- vcsAddTodo(
- vcal,
- 0,
- "19960614T0173000",
- 0,
- "Review VCalendar helper API.",
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- );
-
- /* now do something to the resulting VObject */
- /* pretty print on stdout for fun */
- printVObject(cfp,vcal);
- /* open the output text file */
-
-#define OUTFILE "frankcal.vcf"
-
- fp = fopen(OUTFILE, "w");
- if (fp) {
- /* write it in text form */
- writeVObject(fp,vcal);
- fclose(fp);
- }
- else {
- fprintf(cfp,"open output file '%s' failed\n", OUTFILE);
- }
- if (cfp != stdout) fclose(cfp);
- }
-
-void main() {
- testVcalAPIs();
- }
-
diff --git a/libical/src/libicalvcal/vcaltmp.c b/libical/src/libicalvcal/vcaltmp.c
deleted file mode 100644
index ccb21a649a..0000000000
--- a/libical/src/libicalvcal/vcaltmp.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
-This module provides some helper APIs for creating
-a VCalendar object.
-
-Note on APIs:
- 1. The APIs does not attempt to verify if the arguments
- passed are correct.
- 2. Where the argument to an API is not applicable, pass
- the value 0.
- 3. See the test program at the bottom of this file as an
- example of usage.
- 4. This code calls APIs in vobject.c.
-
-*/
-
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-
-#include <stdio.h>
-#include <string.h>
-#include "vcaltmp.h"
-
-
-DLLEXPORT(VObject*) vcsCreateVCal(
- char *date_created,
- char *location,
- char *product_id,
- char *time_zone,
- char *version
- )
- {
- VObject *vcal = newVObject(VCCalProp);
-#define Z(p,v) if (v) addPropValue(vcal,p,v);
- Z(VCDCreatedProp, date_created);
- Z(VCLocationProp, location)
- Z(VCProdIdProp, product_id)
- Z(VCTimeZoneProp, time_zone)
- Z(VCVersionProp, version)
-#undef Z
- return vcal;
- }
-
-
-DLLEXPORT(VObject*) vcsAddEvent(
- VObject *vcal,
- char *start_date_time,
- char *end_date_time,
- char *description,
- char *summary,
- char *categories,
- char *classification,
- char *status,
- char *transparency,
- char *uid,
- char *url
- )
- {
- VObject *vevent = addProp(vcal,VCEventProp);
-#define Z(p,v) if (v) addPropValue(vevent,p,v);
- Z(VCDTstartProp,start_date_time);
- Z(VCDTendProp,end_date_time);
- if (description) {
- VObject *p = addPropValue(vevent,VCDescriptionProp,description);
- if (strchr(description,'\n'))
- addProp(p,VCQuotedPrintableProp);
- }
- Z(VCSummaryProp,summary);
- Z(VCCategoriesProp,categories);
- Z(VCClassProp,classification);
- Z(VCStatusProp,status);
- Z(VCTranspProp,transparency);
- Z(VCUniqueStringProp,uid);
- Z(VCURLProp,url);
-#undef Z
- return vevent;
- }
-
-
-DLLEXPORT(VObject*) vcsAddTodo(
- VObject *vcal,
- char *start_date_time,
- char *due_date_time,
- char *date_time_complete,
- char *description,
- char *summary,
- char *priority,
- char *classification,
- char *status,
- char *uid,
- char *url
- )
- {
- VObject *vtodo = addProp(vcal,VCTodoProp);
-#define Z(p,v) if (v) addPropValue(vtodo,p,v);
- Z(VCDTstartProp,start_date_time);
- Z(VCDueProp,due_date_time);
- Z(VCCompletedProp,date_time_complete);
- if (description) {
- VObject *p = addPropValue(vtodo,VCDescriptionProp,description);
- if (strchr(description,'\n'))
- addProp(p,VCQuotedPrintableProp);
- }
- Z(VCSummaryProp,summary);
- Z(VCPriorityProp,priority);
- Z(VCClassProp,classification);
- Z(VCStatusProp,status);
- Z(VCUniqueStringProp,uid);
- Z(VCURLProp,url);
-#undef Z
- return vtodo;
- }
-
-
-DLLEXPORT(VObject*) vcsAddAAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *audio_content
- )
- {
- VObject *aalarm= addProp(vevent,VCAAlarmProp);
-#define Z(p,v) if (v) addPropValue(aalarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCAudioContentProp,audio_content);
-#undef Z
- return aalarm;
- }
-
-
-DLLEXPORT(VObject*) vcsAddMAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *email_address,
- char *note
- )
- {
- VObject *malarm= addProp(vevent,VCMAlarmProp);
-#define Z(p,v) if (v) addPropValue(malarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCEmailAddressProp,email_address);
- Z(VCNoteProp,note);
-#undef Z
- return malarm;
- }
-
-
-DLLEXPORT(VObject*) vcsAddDAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *display_string
- )
- {
- VObject *dalarm= addProp(vevent,VCDAlarmProp);
-#define Z(p,v) if (v) addPropValue(dalarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCDisplayStringProp,display_string);
-#undef Z
- return dalarm;
- }
-
-
-DLLEXPORT(VObject*) vcsAddPAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *procedure_name
- )
- {
- VObject *palarm= addProp(vevent,VCPAlarmProp);
-#define Z(p,v) if (v) addPropValue(palarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCProcedureNameProp,procedure_name);
-#undef Z
- return palarm;
- }
-
-
-#ifdef _TEST
-
-#if 0
-This testcase would generate a file call "frankcal.vcf" with
-the following content:
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-GEO:37.24,-17.87
-PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-DTSTART:19960523T120000
-DTEND:19960523T130000
-DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A=
-With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A=
-activities with European Press representatives.
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-CATEGORIES:PHONE CALL
-STATUS:CONFIRMED
-TRANSP:19960523T100522-4000F100582713-009251
-UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2
-DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!;
-MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!;
-PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2;
-X-LDC-OR2-OLE:c:\temp\agenda.doc
-END:VEVENT
-
-BEGIN:VTODO
-DUE:19960614T0173000
-DESCRIPTION:Review VCalendar helper API.
-END:VTODO
-
-END:VCALENDAR
-
-#endif
-
-void testVcalAPIs() {
- FILE *fp;
- VObject *vcal = vcsCreateVCal(
- "19960523T100522",
- "37.24,-17.87",
- "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN",
- 0,
- "0.3"
- );
-
- VObject *vevent = vcsAddEvent(
- vcal,
- "19960523T120000",
- "19960523T130000",
- "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.",
- "VERSIT PDI PR Teleconference/Interview",
- "PHONE CALL",
- 0,
- "CONFIRMED",
- "19960523T100522-4000F100582713-009251",
- "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2",
- 0
- );
-
- vcsAddDAlarm(vevent, "19960523T114500", "5", "3",
- "Your Telecon Starts At Noon!!!");
- vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com",
- "Remember 05/23 Noon Telecon!!!");
- vcsAddPAlarm(vevent, "19960523T115500", 0 ,0,
- "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2");
-
- addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc");
-
- vcsAddTodo(
- vcal,
- 0,
- "19960614T0173000",
- 0,
- "Review VCalendar helper API.",
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- );
-
- /* now do something to the resulting VObject */
- /* pretty print on stdout for fun */
- printVObject(vcal);
- /* open the output text file */
-
-#define OUTFILE "frankcal.vcf"
-
- fp = fopen(OUTFILE, "w");
- if (fp) {
- /* write it in text form */
- writeVObject(fp,vcal);
- fclose(fp);
- }
- else {
- printf("open output file '%s' failed\n", OUTFILE);
- }
- }
-
-void main() {
- testVcalAPIs();
- }
-
-#endif
-
-
-/* end of source file vcaltmp.c */
diff --git a/libical/src/libicalvcal/vcaltmp.h b/libical/src/libicalvcal/vcaltmp.h
deleted file mode 100644
index 4c4afde963..0000000000
--- a/libical/src/libicalvcal/vcaltmp.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-#include "vcc.h"
-
-#ifndef __VCALTMP_H__
-#define __VCALTMP_H__
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-extern DLLEXPORT(VObject*) vcsCreateVCal(
- char *date_created,
- char *location,
- char *product_id,
- char *time_zone,
- char *version
- );
-
-extern DLLEXPORT(VObject*) vcsAddEvent(
- VObject *vcal,
- char *start_date_time,
- char *end_date_time,
- char *description,
- char *summary,
- char *categories,
- char *classification,
- char *status,
- char *transparency,
- char *uid,
- char *url
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddTodo(
- VObject *vcal,
- char *start_date_time,
- char *due_date_time,
- char *date_time_complete,
- char *description,
- char *summary,
- char *priority,
- char *classification,
- char *status,
- char *uid,
- char *url
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddAAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *audio_content
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddMAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *email_address,
- char *note
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddDAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *display_string
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddPAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *procedure_name
- );
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __VCALTMP_H__ */
-
-
diff --git a/libical/src/libicalvcal/vcc.h b/libical/src/libicalvcal/vcc.h
deleted file mode 100644
index 0e52034710..0000000000
--- a/libical/src/libicalvcal/vcc.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-#ifndef __VCC_H__
-#define __VCC_H__ 1
-
-#include "vobject.h"
-
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-typedef void (*MimeErrorHandler)(char *);
-
-extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
-
-extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
-extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
-
-
-/* NOTE regarding Parse_MIME_FromFile
-The function above, Parse_MIME_FromFile, comes in two flavors,
-neither of which is exported from the DLL. Each version takes
-a CFile or FILE* as a parameter, neither of which can be
-passed across a DLL interface (at least that is my experience).
-If you are linking this code into your build directly then
-you may find them a more convenient API that the other flavors
-that take a file name. If you use them with the DLL LIB you
-will get a link error.
-*/
-
-
-#if INCLUDEMFC
-extern VObject* Parse_MIME_FromFile(CFile *file);
-#else
-extern VObject* Parse_MIME_FromFile(FILE *file);
-#endif
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __VCC_H__ */
-
diff --git a/libical/src/libicalvcal/vcc.y b/libical/src/libicalvcal/vcc.y
deleted file mode 100644
index 70feefab57..0000000000
--- a/libical/src/libicalvcal/vcc.y
+++ /dev/null
@@ -1,1176 +0,0 @@
-%{
-
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
- * src: vcc.c
- * doc: Parser for vCard and vCalendar. Note that this code is
- * generated by a yacc parser generator. Generally it should not
- * be edited by hand. The real source is vcc.y. The #line directives
- * can be commented out here to make it easier to trace through
- * in a debugger. However, if a bug is found it should
- * be fixed in vcc.y and this file regenerated.
- */
-
-
-/* debugging utilities */
-#if __DEBUG
-#define DBG_(x) printf x
-#else
-#define DBG_(x)
-#endif
-
-/**** External Functions ****/
-
-/* assign local name to parser variables and functions so that
- we can use more than one yacc based parser.
-*/
-
-#define yyparse mime_parse
-#define yylex mime_lex
-#define yyerror mime_error
-#define yychar mime_char
-/* #define p_yyval p_mime_val */
-#undef yyval
-#define yyval mime_yyval
-/* #define p_yylval p_mime_lval */
-#undef yylval
-#define yylval mime_yylval
-#define yydebug mime_debug
-#define yynerrs mime_nerrs
-#define yyerrflag mime_errflag
-#define yyss mime_ss
-#define yyssp mime_ssp
-#define yyvs mime_vs
-#define yyvsp mime_vsp
-#define yylhs mime_lhs
-#define yylen mime_len
-#define yydefred mime_defred
-#define yydgoto mime_dgoto
-#define yysindex mime_sindex
-#define yyrindex mime_rindex
-#define yygindex mime_gindex
-#define yytable mime_table
-#define yycheck mime_check
-#define yyname mime_name
-#define yyrule mime_rule
-#define YYPREFIX "mime_"
-
-
-#ifndef _NO_LINE_FOLDING
-#define _SUPPORT_LINE_FOLDING 1
-#endif
-
-/* undef below if compile with MFC */
-/* #define INCLUDEMFC 1 */
-
-#if defined(WIN32) || defined(_WIN32)
-#ifdef INCLUDEMFC
-#include <afx.h>
-#endif
-#endif
-
-#include <string.h>
-#ifndef __MWERKS__
-#include <malloc.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include "vcc.h"
-
-/**** Types, Constants ****/
-
-#define YYDEBUG 1 /* 1 to compile in some debugging code */
-#define MAXTOKEN 256 /* maximum token (line) length */
-#define YYSTACKSIZE 50 /* ~unref ? */
-#define MAXLEVEL 10 /* max # of nested objects parseable */
- /* (includes outermost) */
-
-
-/**** Global Variables ****/
-int mime_lineNum, mime_numErrors; /* yyerror() can use these */
-static VObject* vObjList;
-static VObject *curProp;
-static VObject *curObj;
-static VObject* ObjStack[MAXLEVEL];
-static int ObjStackTop;
-
-
-/* A helpful utility for the rest of the app. */
-#if __CPLUSPLUS__
-extern "C" {
-#endif
-
- extern void Parse_Debug(const char *s);
- static void yyerror(char *s);
-
-#if __CPLUSPLUS__
- };
-#endif
-
-int yyparse();
-
-enum LexMode {
- L_NORMAL,
- L_VCARD,
- L_VCAL,
- L_VEVENT,
- L_VTODO,
- L_VALUES,
- L_BASE64,
- L_QUOTED_PRINTABLE
- };
-
-/**** Private Forward Declarations ****/
-static int pushVObject(const char *prop);
-static VObject* popVObject();
-static void lexPopMode(int top);
-static int lexWithinMode(enum LexMode mode);
-static void lexPushMode(enum LexMode mode);
-static void enterProps(const char *s);
-static void enterAttr(const char *s1, const char *s2);
-static void enterValues(const char *value);
-static void mime_error_(char *s);
-
-%}
-
-/***************************************************************************/
-/*** The grammar ****/
-/***************************************************************************/
-
-%union {
- char *str;
- VObject *vobj;
- }
-
-%token
- EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE
- BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL
- BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO
- ID
-
-/*
- * NEWLINE is the token that would occur outside a vCard,
- * while LINESEP is the token that would occur inside a vCard.
- */
-
-%token <str>
- STRING ID
-
-%type <str> name value
-
-%type <vobj> vcard vcal vobject
-
-%start mime
-
-%%
-
-
-mime: vobjects
- ;
-
-vobjects: vobject
- { addList(&vObjList, $1); curObj = 0; }
- vobjects
- | vobject
- { addList(&vObjList, $1); curObj = 0; }
- ;
-
-vobject: vcard
- | vcal
- ;
-
-vcard:
- BEGIN_VCARD
- {
- lexPushMode(L_VCARD);
- if (!pushVObject(VCCardProp)) YYERROR;
- }
- items END_VCARD
- {
- lexPopMode(0);
- $$ = popVObject();
- }
- | BEGIN_VCARD
- {
- lexPushMode(L_VCARD);
- if (!pushVObject(VCCardProp)) YYERROR;
- }
- END_VCARD
- {
- lexPopMode(0);
- $$ = popVObject();
- }
- ;
-
-items: item items
- | item
- ;
-
-item: prop COLON
- {
- lexPushMode(L_VALUES);
- }
- values LINESEP
- {
- if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
- lexPopMode(0);
- lexPopMode(0);
- }
- | error
- ;
-
-prop: name
- {
- enterProps($1);
- }
- attr_params
- | name
- {
- enterProps($1);
- }
- ;
-
-attr_params: attr_param attr_params
- | attr_param
- ;
-
-attr_param: SEMICOLON attr
- ;
-
-attr: name
- {
- enterAttr($1,0);
- }
- | name EQ name
- {
- enterAttr($1,$3);
-
- }
- ;
-
-name: ID
- ;
-
-values: value SEMICOLON { enterValues($1); } values
- | value
- { enterValues($1); }
- ;
-
-value: STRING
- | { $$ = 0; }
- ;
-
-vcal:
- BEGIN_VCAL
- { if (!pushVObject(VCCalProp)) YYERROR; }
- calitems
- END_VCAL
- { $$ = popVObject(); }
- | BEGIN_VCAL
- { if (!pushVObject(VCCalProp)) YYERROR; }
- END_VCAL
- { $$ = popVObject(); }
- ;
-
-calitems: calitem calitems
- | calitem
- ;
-
-calitem:
- eventitem
- | todoitem
- | items
- ;
-
-eventitem:
- BEGIN_VEVENT
- {
- lexPushMode(L_VEVENT);
- if (!pushVObject(VCEventProp)) YYERROR;
- }
- items
- END_VEVENT
- {
- lexPopMode(0);
- popVObject();
- }
- | BEGIN_VEVENT
- {
- lexPushMode(L_VEVENT);
- if (!pushVObject(VCEventProp)) YYERROR;
- }
- END_VEVENT
- {
- lexPopMode(0);
- popVObject();
- }
- ;
-
-todoitem:
- BEGIN_VTODO
- {
- lexPushMode(L_VTODO);
- if (!pushVObject(VCTodoProp)) YYERROR;
- }
- items
- END_VTODO
- {
- lexPopMode(0);
- popVObject();
- }
- | BEGIN_VTODO
- {
- lexPushMode(L_VTODO);
- if (!pushVObject(VCTodoProp)) YYERROR;
- }
- END_VTODO
- {
- lexPopMode(0);
- popVObject();
- }
- ;
-
-%%
-static int pushVObject(const char *prop)
- {
- VObject *newObj;
- if (ObjStackTop == MAXLEVEL)
- return FALSE;
-
- ObjStack[++ObjStackTop] = curObj;
-
- if (curObj) {
- newObj = addProp(curObj,prop);
- curObj = newObj;
- }
- else
- curObj = newVObject(prop);
-
- return TRUE;
- }
-
-
-/* This pops the recently built vCard off the stack and returns it. */
-static VObject* popVObject()
- {
- VObject *oldObj;
- if (ObjStackTop < 0) {
- yyerror("pop on empty Object Stack\n");
- return 0;
- }
- oldObj = curObj;
- curObj = ObjStack[ObjStackTop--];
-
- return oldObj;
- }
-
-
-static void enterValues(const char *value)
- {
- if (fieldedProp && *fieldedProp) {
- if (value) {
- addPropValue(curProp,*fieldedProp,value);
- }
- /* else this field is empty, advance to next field */
- fieldedProp++;
- }
- else {
- if (value) {
- setVObjectUStringZValue_(curProp,fakeUnicode(value,0));
- }
- }
- deleteStr(value);
- }
-
-static void enterProps(const char *s)
- {
- curProp = addGroup(curObj,s);
- deleteStr(s);
- }
-
-static void enterAttr(const char *s1, const char *s2)
- {
- const char *p1, *p2;
- p1 = lookupProp_(s1);
- if (s2) {
- VObject *a;
- p2 = lookupProp_(s2);
- a = addProp(curProp,p1);
- setVObjectStringZValue(a,p2);
- }
- else
- addProp(curProp,p1);
- if (stricmp(p1,VCBase64Prop) == 0 || (s2 && stricmp(p2,VCBase64Prop)==0))
- lexPushMode(L_BASE64);
- else if (stricmp(p1,VCQuotedPrintableProp) == 0
- || (s2 && stricmp(p2,VCQuotedPrintableProp)==0))
- lexPushMode(L_QUOTED_PRINTABLE);
- deleteStr(s1); deleteStr(s2);
- }
-
-
-#define MAX_LEX_LOOKAHEAD_0 32
-#define MAX_LEX_LOOKAHEAD 64
-#define MAX_LEX_MODE_STACK_SIZE 10
-#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop])
-
-struct LexBuf {
- /* input */
-#ifdef INCLUDEMFC
- CFile *inputFile;
-#else
- FILE *inputFile;
-#endif
- char *inputString;
- unsigned long curPos;
- unsigned long inputLen;
- /* lookahead buffer */
- /* -- lookahead buffer is short instead of char so that EOF
- / can be represented correctly.
- */
- unsigned long len;
- short buf[MAX_LEX_LOOKAHEAD];
- unsigned long getPtr;
- /* context stack */
- unsigned long lexModeStackTop;
- enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE];
- /* token buffer */
- unsigned long maxToken;
- char *strs;
- unsigned long strsLen;
- } lexBuf;
-
-static void lexPushMode(enum LexMode mode)
- {
- if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1))
- yyerror("lexical context stack overflow");
- else {
- lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode;
- }
- }
-
-static void lexPopMode(int top)
- {
- /* special case of pop for ease of error recovery -- this
- version will never underflow */
- if (top)
- lexBuf.lexModeStackTop = 0;
- else
- if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
- }
-
-static int lexWithinMode(enum LexMode mode) {
- unsigned long i;
- for (i=0;i<lexBuf.lexModeStackTop;i++)
- if (mode == lexBuf.lexModeStack[i]) return 1;
- return 0;
- }
-
-static char lexGetc_()
- {
- /* get next char from input, no buffering. */
- if (lexBuf.curPos == lexBuf.inputLen)
- return EOF;
- else if (lexBuf.inputString)
- return *(lexBuf.inputString + lexBuf.curPos++);
- else {
-#ifdef INCLUDEMFC
- char result;
- return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF;
-#else
- return fgetc(lexBuf.inputFile);
-#endif
- }
- }
-
-static int lexGeta()
- {
- ++lexBuf.len;
- return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
- }
-
-static int lexGeta_(int i)
- {
- ++lexBuf.len;
- return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
- }
-
-static void lexSkipLookahead() {
- if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
- /* don't skip EOF. */
- lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
- lexBuf.len--;
- }
- }
-
-static int lexLookahead() {
- int c = (lexBuf.len)?
- lexBuf.buf[lexBuf.getPtr]:
- lexGeta();
- /* do the \r\n -> \n or \r -> \n translation here */
- if (c == '\r') {
- int a = (lexBuf.len>1)?
- lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]:
- lexGeta_(1);
- if (a == '\n') {
- lexSkipLookahead();
- }
- lexBuf.buf[lexBuf.getPtr] = c = '\n';
- }
- else if (c == '\n') {
- int a = (lexBuf.len>1)?
- lexBuf.buf[lexBuf.getPtr+1]:
- lexGeta_(1);
- if (a == '\r') {
- lexSkipLookahead();
- }
- lexBuf.buf[lexBuf.getPtr] = '\n';
- }
- return c;
- }
-
-static int lexGetc() {
- int c = lexLookahead();
- if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
- /* EOF will remain in lookahead buffer */
- lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
- lexBuf.len--;
- }
- return c;
- }
-
-static void lexSkipLookaheadWord() {
- if (lexBuf.strsLen <= lexBuf.len) {
- lexBuf.len -= lexBuf.strsLen;
- lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
- }
- }
-
-static void lexClearToken()
- {
- lexBuf.strsLen = 0;
- }
-
-static void lexAppendc(int c)
- {
- lexBuf.strs[lexBuf.strsLen] = c;
- /* append up to zero termination */
- if (c == 0) return;
- lexBuf.strsLen++;
- if (lexBuf.strsLen > lexBuf.maxToken) {
- /* double the token string size */
- lexBuf.maxToken <<= 1;
- lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);
- }
- }
-
-static char* lexStr() {
- return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
- }
-
-static void lexSkipWhite() {
- int c = lexLookahead();
- while (c == ' ' || c == '\t') {
- lexSkipLookahead();
- c = lexLookahead();
- }
- }
-
-static char* lexGetWord() {
- int c;
- lexSkipWhite();
- lexClearToken();
- c = lexLookahead();
- while (c != EOF && !strchr("\t\n ;:=",c)) {
- lexAppendc(c);
- lexSkipLookahead();
- c = lexLookahead();
- }
- lexAppendc(0);
- return lexStr();
- }
-
-static void lexPushLookaheadc(int c) {
- int putptr;
- /* can't putback EOF, because it never leaves lookahead buffer */
- if (c == EOF) return;
- putptr = (int)lexBuf.getPtr - 1;
- if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
- lexBuf.getPtr = putptr;
- lexBuf.buf[putptr] = c;
- lexBuf.len += 1;
- }
-
-static char* lexLookaheadWord() {
- /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0
- / and thing bigger than that will stop the lookahead and return 0;
- / leading white spaces are not recoverable.
- */
- int c;
- int len = 0;
- int curgetptr = 0;
- lexSkipWhite();
- lexClearToken();
- curgetptr = (int)lexBuf.getPtr; /* remember! */
- while (len < (MAX_LEX_LOOKAHEAD_0)) {
- c = lexGetc();
- len++;
- if (c == EOF || strchr("\t\n ;:=", c)) {
- lexAppendc(0);
- /* restore lookahead buf. */
- lexBuf.len += len;
- lexBuf.getPtr = curgetptr;
- return lexStr();
- }
- else
- lexAppendc(c);
- }
- lexBuf.len += len; /* char that has been moved to lookahead buffer */
- lexBuf.getPtr = curgetptr;
- return 0;
- }
-
-#ifdef _SUPPORT_LINE_FOLDING
-static void handleMoreRFC822LineBreak(int c) {
- /* suport RFC 822 line break in cases like
- * ADR: foo;
- * morefoo;
- * more foo;
- */
- if (c == ';') {
- int a;
- lexSkipLookahead();
- /* skip white spaces */
- a = lexLookahead();
- while (a == ' ' || a == '\t') {
- lexSkipLookahead();
- a = lexLookahead();
- }
- if (a == '\n') {
- lexSkipLookahead();
- a = lexLookahead();
- if (a == ' ' || a == '\t') {
- /* continuation, throw away all the \n and spaces read so
- * far
- */
- lexSkipWhite();
- lexPushLookaheadc(';');
- }
- else {
- lexPushLookaheadc('\n');
- lexPushLookaheadc(';');
- }
- }
- else {
- lexPushLookaheadc(';');
- }
- }
- }
-
-static char* lexGet1Value() {
- int c;
- lexSkipWhite();
- c = lexLookahead();
- lexClearToken();
- while (c != EOF && c != ';') {
- if (c == '\n') {
- int a;
- lexSkipLookahead();
- a = lexLookahead();
- if (a == ' ' || a == '\t') {
- lexAppendc(' ');
- lexSkipLookahead();
- }
- else {
- lexPushLookaheadc('\n');
- break;
- }
- }
- else {
- lexAppendc(c);
- lexSkipLookahead();
- }
- c = lexLookahead();
- }
- lexAppendc(0);
- handleMoreRFC822LineBreak(c);
- return c==EOF?0:lexStr();
- }
-#endif
-
-
-static int match_begin_name(int end) {
- char *n = lexLookaheadWord();
- int token = ID;
- if (n) {
- if (!stricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
- else if (!stricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
- else if (!stricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
- else if (!stricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
- deleteStr(n);
- return token;
- }
- return 0;
- }
-
-
-#ifdef INCLUDEMFC
-void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile)
-#else
-void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
-#endif
- {
- /* initialize lex mode stack */
- lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL;
-
- /* iniatialize lex buffer. */
- lexBuf.inputString = (char*) inputstring;
- lexBuf.inputLen = inputlen;
- lexBuf.curPos = 0;
- lexBuf.inputFile = inputfile;
-
- lexBuf.len = 0;
- lexBuf.getPtr = 0;
-
- lexBuf.maxToken = MAXTOKEN;
- lexBuf.strs = (char*)malloc(MAXTOKEN);
- lexBuf.strsLen = 0;
-
- }
-
-static void finiLex() {
- free(lexBuf.strs);
- }
-
-
-/* This parses and converts the base64 format for binary encoding into
- * a decoded buffer (allocated with new). See RFC 1521.
- */
-static char * lexGetDataFromBase64()
- {
- unsigned long bytesLen = 0, bytesMax = 0;
- int quadIx = 0, pad = 0;
- unsigned long trip = 0;
- unsigned char b;
- int c;
- unsigned char *bytes = NULL;
- unsigned char *oldBytes = NULL;
-
- DBG_(("db: lexGetDataFromBase64\n"));
- while (1) {
- c = lexGetc();
- if (c == '\n') {
- ++mime_lineNum;
- if (lexLookahead() == '\n') {
- /* a '\n' character by itself means end of data */
- break;
- }
- else continue; /* ignore '\n' */
- }
- else {
- if ((c >= 'A') && (c <= 'Z'))
- b = (unsigned char)(c - 'A');
- else if ((c >= 'a') && (c <= 'z'))
- b = (unsigned char)(c - 'a') + 26;
- else if ((c >= '0') && (c <= '9'))
- b = (unsigned char)(c - '0') + 52;
- else if (c == '+')
- b = 62;
- else if (c == '/')
- b = 63;
- else if (c == '=') {
- b = 0;
- pad++;
- } else if ((c == ' ') || (c == '\t')) {
- continue;
- } else { /* error condition */
- if (bytes) free(bytes);
- else if (oldBytes) free(oldBytes);
- /* error recovery: skip until 2 adjacent newlines. */
- DBG_(("db: invalid character 0x%x '%c'\n", c,c));
- if (c != EOF) {
- c = lexGetc();
- while (c != EOF) {
- if (c == '\n' && lexLookahead() == '\n') {
- ++mime_lineNum;
- break;
- }
- c = lexGetc();
- }
- }
- return NULL;
- }
- trip = (trip << 6) | b;
- if (++quadIx == 4) {
- unsigned char outBytes[3];
- int numOut;
- int i;
- for (i = 0; i < 3; i++) {
- outBytes[2-i] = (unsigned char)(trip & 0xFF);
- trip >>= 8;
- }
- numOut = 3 - pad;
- if (bytesLen + numOut > bytesMax) {
- if (!bytes) {
- bytesMax = 1024;
- bytes = (unsigned char*)malloc((size_t)bytesMax);
- }
- else {
- bytesMax <<= 2;
- oldBytes = bytes;
- bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax);
- }
- if (bytes == 0) {
- mime_error("out of memory while processing BASE64 data\n");
- }
- }
- if (bytes) {
- memcpy(bytes + bytesLen, outBytes, numOut);
- bytesLen += numOut;
- }
- trip = 0;
- quadIx = 0;
- }
- }
- } /* while */
- DBG_(("db: bytesLen = %d\n", bytesLen));
- /* kludge: all this won't be necessary if we have tree form
- representation */
- if (bytes) {
- setValueWithSize(curProp,bytes,(unsigned int)bytesLen);
- free(bytes);
- }
- else if (oldBytes) {
- setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen);
- free(oldBytes);
- }
- return 0;
- }
-
-static int match_begin_end_name(int end) {
- int token;
- lexSkipWhite();
- if (lexLookahead() != ':') return ID;
- lexSkipLookahead();
- lexSkipWhite();
- token = match_begin_name(end);
- if (token == ID) {
- lexPushLookaheadc(':');
- DBG_(("db: ID '%s'\n", yylval.str));
- return ID;
- }
- else if (token != 0) {
- lexSkipLookaheadWord();
- deleteStr(yylval.str);
- DBG_(("db: begin/end %d\n", token));
- return token;
- }
- return 0;
- }
-
-static char* lexGetQuotedPrintable()
- {
- char cur;
-
- lexClearToken();
- do {
- cur = lexGetc();
- switch (cur) {
- case '=': {
- int c = 0;
- int next[2];
- int i;
- for (i = 0; i < 2; i++) {
- next[i] = lexGetc();
- if (next[i] >= '0' && next[i] <= '9')
- c = c * 16 + next[i] - '0';
- else if (next[i] >= 'A' && next[i] <= 'F')
- c = c * 16 + next[i] - 'A' + 10;
- else
- break;
- }
- if (i == 0) {
- /* single '=' follow by LINESEP is continuation sign? */
- if (next[0] == '\n') {
- ++mime_lineNum;
- }
- else {
- lexPushLookaheadc('=');
- goto EndString;
- }
- }
- else if (i == 1) {
- lexPushLookaheadc(next[1]);
- lexPushLookaheadc(next[0]);
- lexAppendc('=');
- } else {
- lexAppendc(c);
- }
- break;
- } /* '=' */
- case '\n': {
- lexPushLookaheadc('\n');
- goto EndString;
- }
- case (char)EOF:
- break;
- default:
- lexAppendc(cur);
- break;
- } /* switch */
- } while (cur != (char)EOF);
-
-EndString:
- lexAppendc(0);
- return lexStr();
- } /* LexQuotedPrintable */
-
-int yylex() {
-
- int lexmode = LEXMODE();
- if (lexmode == L_VALUES) {
- int c = lexGetc();
- if (c == ';') {
- DBG_(("db: SEMICOLON\n"));
- lexPushLookaheadc(c);
-#ifdef _SUPPORT_LINE_FOLDING
- handleMoreRFC822LineBreak(c);
-#endif
- lexSkipLookahead();
- return SEMICOLON;
- }
- else if (strchr("\n",c)) {
- ++mime_lineNum;
- /* consume all line separator(s) adjacent to each other */
- c = lexLookahead();
- while (strchr("\n",c)) {
- lexSkipLookahead();
- c = lexLookahead();
- ++mime_lineNum;
- }
- DBG_(("db: LINESEP\n"));
- return LINESEP;
- }
- else {
- char *p = 0;
- lexPushLookaheadc(c);
- if (lexWithinMode(L_BASE64)) {
- /* get each char and convert to bin on the fly... */
- p = lexGetDataFromBase64();
- yylval.str = p;
- return STRING;
- }
- else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
- p = lexGetQuotedPrintable();
- }
- else {
-#ifdef _SUPPORT_LINE_FOLDING
- p = lexGet1Value();
-#else
- p = lexGetStrUntil(";\n");
-#endif
- }
- if (p) {
- DBG_(("db: STRING: '%s'\n", p));
- yylval.str = p;
- return STRING;
- }
- else return 0;
- }
- }
- else {
- /* normal mode */
- while (1) {
- int c = lexGetc();
- switch(c) {
- case ':': {
- /* consume all line separator(s) adjacent to each other */
- /* ignoring linesep immediately after colon. */
-/* c = lexLookahead();
- while (strchr("\n",c)) {
- lexSkipLookahead();
- c = lexLookahead();
- ++mime_lineNum;
- }*/
- DBG_(("db: COLON\n"));
- return COLON;
- }
- case ';':
- DBG_(("db: SEMICOLON\n"));
- return SEMICOLON;
- case '=':
- DBG_(("db: EQ\n"));
- return EQ;
- /* ignore whitespace in this mode */
- case '\t':
- case ' ': continue;
- case '\n': {
- ++mime_lineNum;
- continue;
- }
- case EOF: return 0;
- break;
- default: {
- lexPushLookaheadc(c);
- if (isalpha(c)) {
- char *t = lexGetWord();
- yylval.str = t;
- if (!stricmp(t, "begin")) {
- return match_begin_end_name(0);
- }
- else if (!stricmp(t,"end")) {
- return match_begin_end_name(1);
- }
- else {
- DBG_(("db: ID '%s'\n", t));
- return ID;
- }
- }
- else {
- /* unknow token */
- return 0;
- }
- break;
- }
- }
- }
- }
- return 0;
- }
-
-
-/***************************************************************************/
-/*** Public Functions ****/
-/***************************************************************************/
-
-static VObject* Parse_MIMEHelper()
- {
- ObjStackTop = -1;
- mime_numErrors = 0;
- mime_lineNum = 1;
- vObjList = 0;
- curObj = 0;
-
- if (yyparse() != 0)
- return 0;
-
- finiLex();
- return vObjList;
- }
-
-DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
- {
- initLex(input, len, 0);
- return Parse_MIMEHelper();
- }
-
-
-#if INCLUDEMFC
-
-DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file)
- {
- unsigned long startPos;
- VObject *result;
-
- initLex(0,-1,file);
- startPos = file->GetPosition();
- if (!(result = Parse_MIMEHelper()))
- file->Seek(startPos, CFile::begin);
- return result;
- }
-
-#else
-
-VObject* Parse_MIME_FromFile(FILE *file)
- {
- VObject *result;
- long startPos;
-
- initLex(0,(unsigned long)-1,file);
- startPos = ftell(file);
- if (!(result = Parse_MIMEHelper())) {
- fseek(file,startPos,SEEK_SET);
- }
- return result;
- }
-
-DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
- {
- FILE *fp = fopen(fname,"r");
- if (fp) {
- VObject* o = Parse_MIME_FromFile(fp);
- fclose(fp);
- return o;
- }
- else {
- char msg[256];
- snprintf(msg, sizeof(msg), "can't open file '%s' for reading\n", fname);
- mime_error_(msg);
- return 0;
- }
- }
-
-#endif
-
-
-static MimeErrorHandler mimeErrorHandler;
-
-DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me)
- {
- mimeErrorHandler = me;
- }
-
-static void mime_error(char *s)
- {
- char msg[256];
- if (mimeErrorHandler) {
- sprintf(msg,"%s at line %d", s, mime_lineNum);
- mimeErrorHandler(msg);
- }
- }
-
-static void mime_error_(char *s)
- {
- if (mimeErrorHandler) {
- mimeErrorHandler(s);
- }
- }
-
diff --git a/libical/src/libicalvcal/vctest.c b/libical/src/libicalvcal/vctest.c
deleted file mode 100644
index 7975d1e200..0000000000
--- a/libical/src/libicalvcal/vctest.c
+++ /dev/null
@@ -1,95 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include "vcc.h"
-
-FILE *cfp;
-
-void myMimeErrorHandler(char *s)
-{
- printf("%s\n", s);
-}
-
-void main(int argc, char **argv)
-{
- int testmem = 0;
-
- char * foo[2] = {"foo","alden.vcf"};
-
-argc = 2;
-argv = foo;
-
-#ifdef _CONSOLE
- cfp = stdout;
- registerMimeErrorHandler(myMimeErrorHandler);
-#else
- cfp = fopen("vctest.out", "w");
- if (!cfp) return;
-#endif
- ++argv;
- while (--argc) {
- FILE *fp;
- if (strcmp(*argv,"-testmem") == 0) {
- testmem = 1;
- argv++;
- continue;
- }
- fprintf(cfp,"processing %s\n",*argv);
- fp = fopen(*argv,"r");
- if (!fp) {
- fprintf(cfp,"error opening file\n");
- }
- else {
- VObject *v, *t;
- FILE *ofp;
- char buf[256];
- char *p;
- strcpy(buf,*argv);
- p = strchr(buf,'.');
- if (p) *p = 0;
- strcat(buf,".out");
- fprintf(cfp,"reading text input from '%s'...\n", *argv);
- /*v = Parse_MIME_FromFile(fp); */
- v = Parse_MIME_FromFileName(*argv);
- writeVObjectToFile(buf,v);
- cleanVObject(v);
-
- /*
- fprintf(cfp,"pretty print internal format of '%s'...\n", *argv);
- ofp = fopen(buf,"w");
- while (v) {
- printVObject(cfp,v);
- if (testmem) {
- char *s, *p;
- fprintf(cfp,"test writing to mem...\n");
- p = s = writeMemVObject(0,0,v);
- if (s) {
- while (*s) {
- fputc(*s,ofp);
- s++;
- }
- free(p);
- }
- }
- else {
- writeVObject(ofp,v);
- }
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
-
- fclose(ofp);
- fclose(fp);
- */
- }
-
- cleanStrTbl();
- argv++;
-
- }
-
- if (cfp != stdout) fclose(cfp);
-
-}
-
diff --git a/libical/src/libicalvcal/vobject.c b/libical/src/libicalvcal/vobject.c
deleted file mode 100644
index d685b04278..0000000000
--- a/libical/src/libicalvcal/vobject.c
+++ /dev/null
@@ -1,1452 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
- * src: vobject.c
- * doc: vobject and APIs to construct vobject, APIs pretty print
- * vobject, and convert a vobject into its textual representation.
- */
-
-#ifndef MWERKS
-#include <malloc.h>
-#endif
-
-#include "vobject.h"
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-
-
-#define NAME_OF(o) o->id
-#define VALUE_TYPE(o) o->valType
-#define STRINGZ_VALUE_OF(o) o->val.strs
-#define USTRINGZ_VALUE_OF(o) o->val.ustrs
-#define INTEGER_VALUE_OF(o) o->val.i
-#define LONG_VALUE_OF(o) o->val.l
-#define ANY_VALUE_OF(o) o->val.any
-#define VOBJECT_VALUE_OF(o) o->val.vobj
-
-typedef union ValueItem {
- const char *strs;
- const wchar_t *ustrs;
- unsigned int i;
- unsigned long l;
- void *any;
- VObject *vobj;
- } ValueItem;
-
-struct VObject {
- VObject *next;
- const char *id;
- VObject *prop;
- unsigned short valType;
- ValueItem val;
- };
-
-typedef struct StrItem StrItem;
-
-struct StrItem {
- StrItem *next;
- const char *s;
- unsigned int refCnt;
- };
-
-const char** fieldedProp;
-
-
-
-/*----------------------------------------------------------------------
- The following functions involve with memory allocation:
- newVObject
- deleteVObject
- dupStr
- deleteStr
- newStrItem
- deleteStrItem
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(VObject*) newVObject_(const char *id)
-{
- VObject *p = (VObject*)malloc(sizeof(VObject));
- p->next = 0;
- p->id = id;
- p->prop = 0;
- VALUE_TYPE(p) = 0;
- ANY_VALUE_OF(p) = 0;
- return p;
-}
-
-DLLEXPORT(VObject*) newVObject(const char *id)
-{
- return newVObject_(lookupStr(id));
-}
-
-DLLEXPORT(void) deleteVObject(VObject *p)
-{
- unUseStr(p->id);
- free(p);
-}
-
-DLLEXPORT(char*) dupStr(const char *s, unsigned int size)
-{
- char *t;
- if (size == 0) {
- size = strlen(s);
- }
- t = (char*)malloc(size+1);
- if (t) {
- memcpy(t,s,size);
- t[size] = 0;
- return t;
- }
- else {
- return (char*)0;
- }
-}
-
-DLLEXPORT(void) deleteStr(const char *p)
-{
- if (p) free((void*)p);
-}
-
-
-static StrItem* newStrItem(const char *s, StrItem *next)
-{
- StrItem *p = (StrItem*)malloc(sizeof(StrItem));
- p->next = next;
- p->s = s;
- p->refCnt = 1;
- return p;
-}
-
-static void deleteStrItem(StrItem *p)
-{
- free((void*)p);
-}
-
-
-/*----------------------------------------------------------------------
- The following function provide accesses to VObject's value.
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(const char*) vObjectName(VObject *o)
-{
- return NAME_OF(o);
-}
-
-DLLEXPORT(void) setVObjectName(VObject *o, const char* id)
-{
- NAME_OF(o) = id;
-}
-
-DLLEXPORT(const char*) vObjectStringZValue(VObject *o)
-{
- return STRINGZ_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s)
-{
- STRINGZ_VALUE_OF(o) = dupStr(s,0);
- VALUE_TYPE(o) = VCVT_STRINGZ;
-}
-
-DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
-{
- STRINGZ_VALUE_OF(o) = s;
- VALUE_TYPE(o) = VCVT_STRINGZ;
-}
-
-DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o)
-{
- return USTRINGZ_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s)
-{
- USTRINGZ_VALUE_OF(o) = (wchar_t*) dupStr((char*)s,(uStrLen(s)+1)*2);
- VALUE_TYPE(o) = VCVT_USTRINGZ;
-}
-
-DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s)
-{
- USTRINGZ_VALUE_OF(o) = s;
- VALUE_TYPE(o) = VCVT_USTRINGZ;
-}
-
-DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o)
-{
- return INTEGER_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
-{
- INTEGER_VALUE_OF(o) = i;
- VALUE_TYPE(o) = VCVT_UINT;
-}
-
-DLLEXPORT(unsigned long) vObjectLongValue(VObject *o)
-{
- return LONG_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
-{
- LONG_VALUE_OF(o) = l;
- VALUE_TYPE(o) = VCVT_ULONG;
-}
-
-DLLEXPORT(void*) vObjectAnyValue(VObject *o)
-{
- return ANY_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
-{
- ANY_VALUE_OF(o) = t;
- VALUE_TYPE(o) = VCVT_RAW;
-}
-
-DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o)
-{
- return VOBJECT_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
-{
- VOBJECT_VALUE_OF(o) = p;
- VALUE_TYPE(o) = VCVT_VOBJECT;
-}
-
-DLLEXPORT(int) vObjectValueType(VObject *o)
-{
- return VALUE_TYPE(o);
-}
-
-
-/*----------------------------------------------------------------------
- The following functions can be used to build VObject.
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p)
-{
- /* circular link list pointed to tail */
- /*
- o {next,id,prop,val}
- V
- pn {next,id,prop,val}
- V
- ...
- p1 {next,id,prop,val}
- V
- pn
- -->
- o {next,id,prop,val}
- V
- pn {next,id,prop,val}
- V
- p {next,id,prop,val}
- ...
- p1 {next,id,prop,val}
- V
- pn
- */
-
- VObject *tail = o->prop;
- if (tail) {
- p->next = tail->next;
- o->prop = tail->next = p;
- }
- else {
- o->prop = p->next = p;
- }
- return p;
-}
-
-DLLEXPORT(VObject*) addProp(VObject *o, const char *id)
-{
- return addVObjectProp(o,newVObject(id));
-}
-
-DLLEXPORT(VObject*) addProp_(VObject *o, const char *id)
-{
- return addVObjectProp(o,newVObject_(id));
-}
-
-DLLEXPORT(void) addList(VObject **o, VObject *p)
-{
- p->next = 0;
- if (*o == 0) {
- *o = p;
- }
- else {
- VObject *t = *o;
- while (t->next) {
- t = t->next;
- }
- t->next = p;
- }
-}
-
-DLLEXPORT(VObject*) nextVObjectInList(VObject *o)
-{
- return o->next;
-}
-
-DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size)
-{
- VObject *sizeProp;
- setVObjectAnyValue(prop, val);
- sizeProp = addProp(prop,VCDataSizeProp);
- setVObjectLongValue(sizeProp, size);
- return prop;
-}
-
-DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size)
-{
- void *p = dupStr((const char *)val,size);
- return setValueWithSize_(prop,p,p?size:0);
-}
-
-DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
-{
- i->start = o->prop;
- i->next = 0;
-}
-
-DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
-{
- i->start = o->next;
- i->next = 0;
-}
-
-DLLEXPORT(int) moreIteration(VObjectIterator *i)
-{
- return (i->start && (i->next==0 || i->next!=i->start));
-}
-
-DLLEXPORT(VObject*) nextVObject(VObjectIterator *i)
-{
- if (i->start && i->next != i->start) {
- if (i->next == 0) {
- i->next = i->start->next;
- return i->next;
- }
- else {
- i->next = i->next->next;
- return i->next;
- }
- }
- else return (VObject*)0;
-}
-
-DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id)
-{
- VObjectIterator i;
- initPropIterator(&i,o);
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- if (!stricmp(id,each->id))
- return each;
- }
- return (VObject*)0;
-}
-
-DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
-{
- /*
- a.b.c
- -->
- prop(c)
- prop(VCGrouping=b)
- prop(VCGrouping=a)
- */
- char *dot = strrchr(g,'.');
- if (dot) {
- VObject *p, *t;
- char *gs, *n = dot+1;
- gs = dupStr(g,0); /* so we can write to it. */
- /* used to be
- * t = p = addProp_(o,lookupProp_(n));
- */
- t = p = addProp_(o,lookupProp(n));
- dot = strrchr(gs,'.');
- *dot = 0;
- do {
- dot = strrchr(gs,'.');
- if (dot) {
- n = dot+1;
- *dot=0;
- }
- else
- n = gs;
- /* property(VCGroupingProp=n);
- * and the value may have VCGrouping property
- */
- t = addProp(t,VCGroupingProp);
- setVObjectStringZValue(t,lookupProp_(n));
- } while (n != gs);
- deleteStr(gs);
- return p;
- }
- else
- return addProp_(o,lookupProp(g));
-}
-
-DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v)
-{
- VObject *prop;
- prop = addProp(o,p);
- setVObjectUStringZValue_(prop, fakeUnicode(v,0));
- return prop;
-}
-
-DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v,
- unsigned int size)
-{
- VObject *prop;
- prop = addProp(o,p);
- setValueWithSize_(prop, (void*)v, size);
- return prop;
-}
-
-DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v,
- unsigned int size)
-{
- return addPropSizedValue_(o,p,dupStr(v,size),size);
-}
-
-
-
-/*----------------------------------------------------------------------
- The following pretty print a VObject
- ----------------------------------------------------------------------*/
-
-static void printVObject_(FILE *fp, VObject *o, int level);
-
-static void indent(FILE *fp, int level)
-{
- int i;
- for (i=0;i<level*4;i++) {
- fputc(' ', fp);
- }
-}
-
-static void printValue(FILE *fp, VObject *o, int level)
-{
- switch (VALUE_TYPE(o)) {
- case VCVT_USTRINGZ: {
- char c;
- char *t,*s;
- s = t = fakeCString(USTRINGZ_VALUE_OF(o));
- fputc('"',fp);
- while (c=*t,c) {
- fputc(c,fp);
- if (c == '\n') indent(fp,level+2);
- t++;
- }
- fputc('"',fp);
- deleteStr(s);
- break;
- }
- case VCVT_STRINGZ: {
- char c;
- const char *s = STRINGZ_VALUE_OF(o);
- fputc('"',fp);
- while (c=*s,c) {
- fputc(c,fp);
- if (c == '\n') indent(fp,level+2);
- s++;
- }
- fputc('"',fp);
- break;
- }
- case VCVT_UINT:
- fprintf(fp,"%d", INTEGER_VALUE_OF(o)); break;
- case VCVT_ULONG:
- fprintf(fp,"%ld", LONG_VALUE_OF(o)); break;
- case VCVT_RAW:
- fprintf(fp,"[raw data]"); break;
- case VCVT_VOBJECT:
- fprintf(fp,"[vobject]\n");
- printVObject_(fp,VOBJECT_VALUE_OF(o),level+1);
- break;
- case 0:
- fprintf(fp,"[none]"); break;
- default:
- fprintf(fp,"[unknown]"); break;
- }
-}
-
-static void printNameValue(FILE *fp,VObject *o, int level)
-{
- indent(fp,level);
- if (NAME_OF(o)) {
- fprintf(fp,"%s", NAME_OF(o));
- }
- if (VALUE_TYPE(o)) {
- fputc('=',fp);
- printValue(fp,o, level);
- }
- fprintf(fp,"\n");
-}
-
-static void printVObject_(FILE *fp, VObject *o, int level)
- {
- VObjectIterator t;
- if (o == 0) {
- fprintf(fp,"[NULL]\n");
- return;
- }
- printNameValue(fp,o,level);
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- printVObject_(fp,eachProp,level+1);
- }
- }
-
-void printVObject(FILE *fp,VObject *o)
-{
- printVObject_(fp,o,0);
-}
-
-DLLEXPORT(void) printVObjectToFile(char *fname,VObject *o)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- printVObject(fp,o);
- fclose(fp);
- }
-}
-
-DLLEXPORT(void) printVObjectsToFile(char *fname,VObject *list)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- while (list) {
- printVObject(fp,list);
- list = nextVObjectInList(list);
- }
- fclose(fp);
- }
-}
-
-DLLEXPORT(void) cleanVObject(VObject *o)
-{
- if (o == 0) return;
- if (o->prop) {
- /* destroy time: cannot use the iterator here.
- Have to break the cycle in the circular link
- list and turns it into regular NULL-terminated
- list -- since at some point of destruction,
- the reference entry for the iterator to work
- will not longer be valid.
- */
- VObject *p;
- p = o->prop->next;
- o->prop->next = 0;
- do {
- VObject *t = p->next;
- cleanVObject(p);
- p = t;
- } while (p);
- }
- switch (VALUE_TYPE(o)) {
- case VCVT_USTRINGZ:
- case VCVT_STRINGZ:
- case VCVT_RAW:
- /* assume they are all allocated by malloc. */
- free((char*)STRINGZ_VALUE_OF(o));
- break;
- case VCVT_VOBJECT:
- cleanVObject(VOBJECT_VALUE_OF(o));
- break;
- }
- deleteVObject(o);
-}
-
-DLLEXPORT(void) cleanVObjects(VObject *list)
-{
- while (list) {
- VObject *t = list;
- list = nextVObjectInList(list);
- cleanVObject(t);
- }
-}
-
-/*----------------------------------------------------------------------
- The following is a String Table Facilities.
- ----------------------------------------------------------------------*/
-
-#define STRTBLSIZE 255
-
-static StrItem *strTbl[STRTBLSIZE];
-
-static unsigned int hashStr(const char *s)
-{
- unsigned int h = 0;
- int i;
- for (i=0;s[i];i++) {
- h += s[i]*i;
- }
- return h % STRTBLSIZE;
-}
-
-DLLEXPORT(const char*) lookupStr(const char *s)
-{
- StrItem *t;
- unsigned int h = hashStr(s);
- if ((t = strTbl[h]) != 0) {
- do {
- if (stricmp(t->s,s) == 0) {
- t->refCnt++;
- return t->s;
- }
- t = t->next;
- } while (t);
- }
- s = dupStr(s,0);
- strTbl[h] = newStrItem(s,strTbl[h]);
- return s;
-}
-
-DLLEXPORT(void) unUseStr(const char *s)
-{
- StrItem *t, *p;
- unsigned int h = hashStr(s);
- if ((t = strTbl[h]) != 0) {
- p = t;
- do {
- if (stricmp(t->s,s) == 0) {
- t->refCnt--;
- if (t->refCnt == 0) {
- if (p == strTbl[h]) {
- strTbl[h] = t->next;
- }
- else {
- p->next = t->next;
- }
- deleteStr(t->s);
- deleteStrItem(t);
- return;
- }
- }
- p = t;
- t = t->next;
- } while (t);
- }
-}
-
-DLLEXPORT(void) cleanStrTbl()
-{
- int i;
- for (i=0; i<STRTBLSIZE;i++) {
- StrItem *t = strTbl[i];
- while (t) {
- StrItem *p;
- deleteStr(t->s);
- p = t;
- t = t->next;
- deleteStrItem(p);
- } while (t);
- strTbl[i] = 0;
- }
-}
-
-
-struct PreDefProp {
- const char *name;
- const char *alias;
- const char** fields;
- unsigned int flags;
- };
-
-/* flags in PreDefProp */
-#define PD_BEGIN 0x1
-#define PD_INTERNAL 0x2
-
-static const char *adrFields[] = {
- VCPostalBoxProp,
- VCExtAddressProp,
- VCStreetAddressProp,
- VCCityProp,
- VCRegionProp,
- VCPostalCodeProp,
- VCCountryNameProp,
- 0
-};
-
-static const char *nameFields[] = {
- VCFamilyNameProp,
- VCGivenNameProp,
- VCAdditionalNamesProp,
- VCNamePrefixesProp,
- VCNameSuffixesProp,
- NULL
- };
-
-static const char *orgFields[] = {
- VCOrgNameProp,
- VCOrgUnitProp,
- VCOrgUnit2Prop,
- VCOrgUnit3Prop,
- VCOrgUnit4Prop,
- NULL
- };
-
-static const char *AAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCAudioContentProp,
- 0
- };
-
-/* ExDate -- has unamed fields */
-/* RDate -- has unamed fields */
-
-static const char *DAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCDisplayStringProp,
- 0
- };
-
-static const char *MAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCEmailAddressProp,
- VCNoteProp,
- 0
- };
-
-static const char *PAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCProcedureNameProp,
- 0
- };
-
-static struct PreDefProp propNames[] = {
- { VC7bitProp, 0, 0, 0 },
- { VC8bitProp, 0, 0, 0 },
- { VCAAlarmProp, 0, AAlarmFields, 0 },
- { VCAdditionalNamesProp, 0, 0, 0 },
- { VCAdrProp, 0, adrFields, 0 },
- { VCAgentProp, 0, 0, 0 },
- { VCAIFFProp, 0, 0, 0 },
- { VCAOLProp, 0, 0, 0 },
- { VCAppleLinkProp, 0, 0, 0 },
- { VCAttachProp, 0, 0, 0 },
- { VCAttendeeProp, 0, 0, 0 },
- { VCATTMailProp, 0, 0, 0 },
- { VCAudioContentProp, 0, 0, 0 },
- { VCAVIProp, 0, 0, 0 },
- { VCBase64Prop, 0, 0, 0 },
- { VCBBSProp, 0, 0, 0 },
- { VCBirthDateProp, 0, 0, 0 },
- { VCBMPProp, 0, 0, 0 },
- { VCBodyProp, 0, 0, 0 },
- { VCBusinessRoleProp, 0, 0, 0 },
- { VCCalProp, 0, 0, PD_BEGIN },
- { VCCaptionProp, 0, 0, 0 },
- { VCCardProp, 0, 0, PD_BEGIN },
- { VCCarProp, 0, 0, 0 },
- { VCCategoriesProp, 0, 0, 0 },
- { VCCellularProp, 0, 0, 0 },
- { VCCGMProp, 0, 0, 0 },
- { VCCharSetProp, 0, 0, 0 },
- { VCCIDProp, VCContentIDProp, 0, 0 },
- { VCCISProp, 0, 0, 0 },
- { VCCityProp, 0, 0, 0 },
- { VCClassProp, 0, 0, 0 },
- { VCCommentProp, 0, 0, 0 },
- { VCCompletedProp, 0, 0, 0 },
- { VCContentIDProp, 0, 0, 0 },
- { VCCountryNameProp, 0, 0, 0 },
- { VCDAlarmProp, 0, DAlarmFields, 0 },
- { VCDataSizeProp, 0, 0, PD_INTERNAL },
- { VCDayLightProp, 0, 0, 0 },
- { VCDCreatedProp, 0, 0, 0 },
- { VCDeliveryLabelProp, 0, 0, 0 },
- { VCDescriptionProp, 0, 0, 0 },
- { VCDIBProp, 0, 0, 0 },
- { VCDisplayStringProp, 0, 0, 0 },
- { VCDomesticProp, 0, 0, 0 },
- { VCDTendProp, 0, 0, 0 },
- { VCDTstartProp, 0, 0, 0 },
- { VCDueProp, 0, 0, 0 },
- { VCEmailAddressProp, 0, 0, 0 },
- { VCEncodingProp, 0, 0, 0 },
- { VCEndProp, 0, 0, 0 },
- { VCEventProp, 0, 0, PD_BEGIN },
- { VCEWorldProp, 0, 0, 0 },
- { VCExNumProp, 0, 0, 0 },
- { VCExpDateProp, 0, 0, 0 },
- { VCExpectProp, 0, 0, 0 },
- { VCExtAddressProp, 0, 0, 0 },
- { VCFamilyNameProp, 0, 0, 0 },
- { VCFaxProp, 0, 0, 0 },
- { VCFullNameProp, 0, 0, 0 },
- { VCGeoLocationProp, 0, 0, 0 },
- { VCGeoProp, 0, 0, 0 },
- { VCGIFProp, 0, 0, 0 },
- { VCGivenNameProp, 0, 0, 0 },
- { VCGroupingProp, 0, 0, 0 },
- { VCHomeProp, 0, 0, 0 },
- { VCIBMMailProp, 0, 0, 0 },
- { VCInlineProp, 0, 0, 0 },
- { VCInternationalProp, 0, 0, 0 },
- { VCInternetProp, 0, 0, 0 },
- { VCISDNProp, 0, 0, 0 },
- { VCJPEGProp, 0, 0, 0 },
- { VCLanguageProp, 0, 0, 0 },
- { VCLastModifiedProp, 0, 0, 0 },
- { VCLastRevisedProp, 0, 0, 0 },
- { VCLocationProp, 0, 0, 0 },
- { VCLogoProp, 0, 0, 0 },
- { VCMailerProp, 0, 0, 0 },
- { VCMAlarmProp, 0, MAlarmFields, 0 },
- { VCMCIMailProp, 0, 0, 0 },
- { VCMessageProp, 0, 0, 0 },
- { VCMETProp, 0, 0, 0 },
- { VCModemProp, 0, 0, 0 },
- { VCMPEG2Prop, 0, 0, 0 },
- { VCMPEGProp, 0, 0, 0 },
- { VCMSNProp, 0, 0, 0 },
- { VCNamePrefixesProp, 0, 0, 0 },
- { VCNameProp, 0, nameFields, 0 },
- { VCNameSuffixesProp, 0, 0, 0 },
- { VCNoteProp, 0, 0, 0 },
- { VCOrgNameProp, 0, 0, 0 },
- { VCOrgProp, 0, orgFields, 0 },
- { VCOrgUnit2Prop, 0, 0, 0 },
- { VCOrgUnit3Prop, 0, 0, 0 },
- { VCOrgUnit4Prop, 0, 0, 0 },
- { VCOrgUnitProp, 0, 0, 0 },
- { VCPagerProp, 0, 0, 0 },
- { VCPAlarmProp, 0, PAlarmFields, 0 },
- { VCParcelProp, 0, 0, 0 },
- { VCPartProp, 0, 0, 0 },
- { VCPCMProp, 0, 0, 0 },
- { VCPDFProp, 0, 0, 0 },
- { VCPGPProp, 0, 0, 0 },
- { VCPhotoProp, 0, 0, 0 },
- { VCPICTProp, 0, 0, 0 },
- { VCPMBProp, 0, 0, 0 },
- { VCPostalBoxProp, 0, 0, 0 },
- { VCPostalCodeProp, 0, 0, 0 },
- { VCPostalProp, 0, 0, 0 },
- { VCPowerShareProp, 0, 0, 0 },
- { VCPreferredProp, 0, 0, 0 },
- { VCPriorityProp, 0, 0, 0 },
- { VCProcedureNameProp, 0, 0, 0 },
- { VCProdIdProp, 0, 0, 0 },
- { VCProdigyProp, 0, 0, 0 },
- { VCPronunciationProp, 0, 0, 0 },
- { VCPSProp, 0, 0, 0 },
- { VCPublicKeyProp, 0, 0, 0 },
- { VCQPProp, VCQuotedPrintableProp, 0, 0 },
- { VCQuickTimeProp, 0, 0, 0 },
- { VCQuotedPrintableProp, 0, 0, 0 },
- { VCRDateProp, 0, 0, 0 },
- { VCRegionProp, 0, 0, 0 },
- { VCRelatedToProp, 0, 0, 0 },
- { VCRepeatCountProp, 0, 0, 0 },
- { VCResourcesProp, 0, 0, 0 },
- { VCRNumProp, 0, 0, 0 },
- { VCRoleProp, 0, 0, 0 },
- { VCRRuleProp, 0, 0, 0 },
- { VCRSVPProp, 0, 0, 0 },
- { VCRunTimeProp, 0, 0, 0 },
- { VCSequenceProp, 0, 0, 0 },
- { VCSnoozeTimeProp, 0, 0, 0 },
- { VCStartProp, 0, 0, 0 },
- { VCStatusProp, 0, 0, 0 },
- { VCStreetAddressProp, 0, 0, 0 },
- { VCSubTypeProp, 0, 0, 0 },
- { VCSummaryProp, 0, 0, 0 },
- { VCTelephoneProp, 0, 0, 0 },
- { VCTIFFProp, 0, 0, 0 },
- { VCTimeZoneProp, 0, 0, 0 },
- { VCTitleProp, 0, 0, 0 },
- { VCTLXProp, 0, 0, 0 },
- { VCTodoProp, 0, 0, PD_BEGIN },
- { VCTranspProp, 0, 0, 0 },
- { VCUniqueStringProp, 0, 0, 0 },
- { VCURLProp, 0, 0, 0 },
- { VCURLValueProp, 0, 0, 0 },
- { VCValueProp, 0, 0, 0 },
- { VCVersionProp, 0, 0, 0 },
- { VCVideoProp, 0, 0, 0 },
- { VCVoiceProp, 0, 0, 0 },
- { VCWAVEProp, 0, 0, 0 },
- { VCWMFProp, 0, 0, 0 },
- { VCWorkProp, 0, 0, 0 },
- { VCX400Prop, 0, 0, 0 },
- { VCX509Prop, 0, 0, 0 },
- { VCXRuleProp, 0, 0, 0 },
- { 0,0,0,0 }
- };
-
-
-static struct PreDefProp* lookupPropInfo(const char* str)
-{
- /* brute force for now, could use a hash table here. */
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (stricmp(str, propNames[i].name) == 0) {
- return &propNames[i];
- }
-
- return 0;
-}
-
-
-DLLEXPORT(const char*) lookupProp_(const char* str)
-{
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (stricmp(str, propNames[i].name) == 0) {
- const char* s;
- s = propNames[i].alias?propNames[i].alias:propNames[i].name;
- return lookupStr(s);
- }
- return lookupStr(str);
-}
-
-
-DLLEXPORT(const char*) lookupProp(const char* str)
-{
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (stricmp(str, propNames[i].name) == 0) {
- const char *s;
- fieldedProp = propNames[i].fields;
- s = propNames[i].alias?propNames[i].alias:propNames[i].name;
- return lookupStr(s);
- }
- fieldedProp = 0;
- return lookupStr(str);
-}
-
-
-/*----------------------------------------------------------------------
- APIs to Output text form.
- ----------------------------------------------------------------------*/
-#define OFILE_REALLOC_SIZE 256
-typedef struct OFile {
- FILE *fp;
- char *s;
- int len;
- int limit;
- int alloc:1;
- int fail:1;
- } OFile;
-
-#if 0
-static void appendsOFile(OFile *fp, const char *s)
-{
- int slen;
- if (fp->fail) return;
- slen = strlen(s);
- if (fp->fp) {
- fwrite(s,1,slen,fp->fp);
- }
- else {
-stuff:
- if (fp->len + slen < fp->limit) {
- memcpy(fp->s+fp->len,s,slen);
- fp->len += slen;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen;
- fp->s = (char *) realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-
-static void appendcOFile(OFile *fp, char c)
-{
- if (fp->fail) return;
- if (fp->fp) {
- fputc(c,fp->fp);
- }
- else {
-stuff:
- if (fp->len+1 < fp->limit) {
- fp->s[fp->len] = c;
- fp->len++;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- fp->s = (char *) realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-#else
-static void appendcOFile_(OFile *fp, char c)
-{
- if (fp->fail) return;
- if (fp->fp) {
- fputc(c,fp->fp);
- }
- else {
-stuff:
- if (fp->len+1 < fp->limit) {
- fp->s[fp->len] = c;
- fp->len++;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- fp->s = realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-
-static void appendcOFile(OFile *fp, char c)
-{
- if (c == '\n') {
- /* write out as <CR><LF> */
- appendcOFile_(fp,0xd);
- appendcOFile_(fp,0xa);
- }
- else
- appendcOFile_(fp,c);
-}
-
-static void appendsOFile(OFile *fp, const char *s)
-{
- int i, slen;
- slen = strlen(s);
- for (i=0; i<slen; i++) {
- appendcOFile(fp,s[i]);
- }
-}
-
-#endif
-
-static void initOFile(OFile *fp, FILE *ofp)
-{
- fp->fp = ofp;
- fp->s = 0;
- fp->len = 0;
- fp->limit = 0;
- fp->alloc = 0;
- fp->fail = 0;
-}
-
-static void initMemOFile(OFile *fp, char *s, int len)
-{
- fp->fp = 0;
- fp->s = s;
- fp->len = 0;
- fp->limit = s?len:0;
- fp->alloc = s?0:1;
- fp->fail = 0;
-}
-
-
-static int writeBase64(OFile *fp, unsigned char *s, long len)
-{
- long cur = 0;
- int i, numQuads = 0;
- unsigned long trip;
- unsigned char b;
- char quad[5];
-#define MAXQUADS 16
-
- quad[4] = 0;
-
- while (cur < len) {
- /* collect the triplet of bytes into 'trip' */
- trip = 0;
- for (i = 0; i < 3; i++) {
- b = (cur < len) ? *(s + cur) : 0;
- cur++;
- trip = trip << 8 | b;
- }
- /* fill in 'quad' with the appropriate four characters */
- for (i = 3; i >= 0; i--) {
- b = (unsigned char)(trip & 0x3F);
- trip = trip >> 6;
- if ((3 - i) < (cur - len))
- quad[i] = '='; /* pad char */
- else if (b < 26) quad[i] = (char)b + 'A';
- else if (b < 52) quad[i] = (char)(b - 26) + 'a';
- else if (b < 62) quad[i] = (char)(b - 52) + '0';
- else if (b == 62) quad[i] = '+';
- else quad[i] = '/';
- }
- /* now output 'quad' with appropriate whitespace and line ending */
- appendsOFile(fp, (numQuads == 0 ? " " : ""));
- appendsOFile(fp, quad);
- appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : "")));
- numQuads = (numQuads + 1) % MAXQUADS;
- }
- appendcOFile(fp,'\n');
-
- return 1;
-}
-
-static void writeString(OFile *fp, const char *s)
-{
- appendsOFile(fp,s);
-}
-
-static void writeQPString(OFile *fp, const char *s)
-{
- char buf[4];
- int count=0;
- const char *p = s;
-
- while (*p) {
- /* break up lines biggger than 75 chars */
- if(count >=74){
- count=0;
- appendsOFile(fp,"=\n");
- }
-
- /* escape any non ASCII characters and '=' as per rfc1521 */
- if (*p<= 0x1f || *p >=0x7f || *p == '=' ) {
- sprintf(buf,"=%02X",(unsigned char)*p);
- appendsOFile(fp,buf);
- count+=3;
- } else {
- appendcOFile(fp,*p);
- count++;
- }
- p++;
- }
-}
-
-
-
-static void writeVObject_(OFile *fp, VObject *o);
-
-static void writeValue(OFile *fp, VObject *o, unsigned long size,int quote)
-{
- if (o == 0) return;
- switch (VALUE_TYPE(o)) {
- case VCVT_USTRINGZ: {
- char *s = fakeCString(USTRINGZ_VALUE_OF(o));
- if(quote) writeQPString(fp, s);
- else writeString(fp,s);
- deleteStr(s);
- break;
- }
- case VCVT_STRINGZ: {
- if(quote) writeQPString(fp, STRINGZ_VALUE_OF(o));
- else writeString(fp,STRINGZ_VALUE_OF(o));
- break;
- }
- case VCVT_UINT: {
- char buf[16];
- sprintf(buf,"%u", INTEGER_VALUE_OF(o));
- appendsOFile(fp,buf);
- break;
- }
- case VCVT_ULONG: {
- char buf[16];
- sprintf(buf,"%lu", LONG_VALUE_OF(o));
- appendsOFile(fp,buf);
- break;
- }
- case VCVT_RAW: {
- appendcOFile(fp,'\n');
- writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
- break;
- }
- case VCVT_VOBJECT:
- appendcOFile(fp,'\n');
- writeVObject_(fp,VOBJECT_VALUE_OF(o));
- break;
- }
-}
-
-static void writeAttrValue(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- pi = lookupPropInfo(NAME_OF(o));
- if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
- appendcOFile(fp,';');
- appendsOFile(fp,NAME_OF(o));
- }
- else
- appendcOFile(fp,';');
- if (VALUE_TYPE(o)) {
- appendcOFile(fp,'=');
- writeValue(fp,o,0,0);
- }
-}
-
-static void writeGroup(OFile *fp, VObject *o)
-{
- char buf1[256];
- char buf2[256];
- strcpy(buf1,NAME_OF(o));
- while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
- strcpy(buf2,STRINGZ_VALUE_OF(o));
- strcat(buf2,".");
- strcat(buf2,buf1);
- strcpy(buf1,buf2);
- }
- appendsOFile(fp,buf1);
-}
-
-static int inList(const char **list, const char *s)
-{
- if (list == 0) return 0;
- while (*list) {
- if (stricmp(*list,s) == 0) return 1;
- list++;
- }
- return 0;
-}
-
-static void writeProp(OFile *fp, VObject *o)
-{
- int isQuoted=0;
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- VObjectIterator t;
- const char **fields_ = 0;
- pi = lookupPropInfo(NAME_OF(o));
- if (pi && ((pi->flags & PD_BEGIN) != 0)) {
- writeVObject_(fp,o);
- return;
- }
- if (isAPropertyOf(o,VCGroupingProp))
- writeGroup(fp,o);
- else
- appendsOFile(fp,NAME_OF(o));
- if (pi) fields_ = pi->fields;
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- const char *s;
- VObject *eachProp = nextVObject(&t);
- s = NAME_OF(eachProp);
- if (stricmp(VCGroupingProp,s) && !inList(fields_,s))
- writeAttrValue(fp,eachProp);
- if (stricmp(VCQPProp,s)==0 || stricmp(VCQuotedPrintableProp,s)==0)
- isQuoted=1;
- }
- if (fields_) {
- int i = 0, n = 0;
- const char** fields = fields_;
- /* output prop as fields */
- appendcOFile(fp,':');
- while (*fields) {
- VObject *t = isAPropertyOf(o,*fields);
- i++;
- if (t) n = i;
- fields++;
- }
- fields = fields_;
- for (i=0;i<n;i++) {
- writeValue(fp,isAPropertyOf(o,*fields),0,isQuoted);
- fields++;
- if (i<(n-1)) appendcOFile(fp,';');
- }
- }
- }
-
- if (VALUE_TYPE(o)) {
- unsigned long size = 0;
- VObject *p = isAPropertyOf(o,VCDataSizeProp);
- if (p) size = LONG_VALUE_OF(p);
- appendcOFile(fp,':');
- writeValue(fp,o,size,isQuoted);
- }
-
- appendcOFile(fp,'\n');
-}
-
-static void writeVObject_(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- pi = lookupPropInfo(NAME_OF(o));
-
- if (pi && ((pi->flags & PD_BEGIN) != 0)) {
- VObjectIterator t;
- const char *begin = NAME_OF(o);
- appendsOFile(fp,"BEGIN:");
- appendsOFile(fp,begin);
- appendcOFile(fp,'\n');
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- writeProp(fp, eachProp);
- }
- appendsOFile(fp,"END:");
- appendsOFile(fp,begin);
- appendsOFile(fp,"\n\n");
- }
- }
-}
-
-void writeVObject(FILE *fp, VObject *o)
-{
- OFile ofp;
- initOFile(&ofp,fp);
- writeVObject_(&ofp,o);
-}
-
-DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- writeVObject(fp,o);
- fclose(fp);
- }
-}
-
-DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- while (list) {
- writeVObject(fp,list);
- list = nextVObjectInList(list);
- }
- fclose(fp);
- }
-}
-
-DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o)
-{
- OFile ofp;
- initMemOFile(&ofp,s,len?*len:0);
- writeVObject_(&ofp,o);
- if (len) *len = ofp.len;
- appendcOFile(&ofp,0);
- return ofp.s;
-}
-
-DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list)
-{
- OFile ofp;
- initMemOFile(&ofp,s,len?*len:0);
- while (list) {
- writeVObject_(&ofp,list);
- list = nextVObjectInList(list);
- }
- if (len) *len = ofp.len;
- appendcOFile(&ofp,0);
- return ofp.s;
-}
-
-/*----------------------------------------------------------------------
- APIs to do fake Unicode stuff.
- ----------------------------------------------------------------------*/
-DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes)
-{
- wchar_t *r, *pw;
- int len = strlen(ps)+1;
-
- pw = r = (wchar_t*)malloc(sizeof(wchar_t)*len);
- if (bytes)
- *bytes = len * sizeof(wchar_t);
-
- while (*ps) {
- if (*ps == '\n')
- *pw = (wchar_t)0x2028;
- else if (*ps == '\r')
- *pw = (wchar_t)0x2029;
- else
- *pw = (wchar_t)(unsigned char)*ps;
- ps++; pw++;
- }
- *pw = (wchar_t)0;
-
- return r;
-}
-
-DLLEXPORT(int) uStrLen(const wchar_t *u)
-{
- int i = 0;
- while (*u != (wchar_t)0) { u++; i++; }
- return i;
-}
-
-DLLEXPORT(char*) fakeCString(const wchar_t *u)
-{
- char *s, *t;
- int len = uStrLen(u) + 1;
- t = s = (char*)malloc(len);
- while (*u) {
- if (*u == (wchar_t)0x2028)
- *t = '\n';
- else if (*u == (wchar_t)0x2029)
- *t = '\r';
- else
- *t = (char)*u;
- u++; t++;
- }
- *t = 0;
- return s;
-}
-
-/* end of source file vobject.c */
diff --git a/libical/src/libicalvcal/vobject.h b/libical/src/libicalvcal/vobject.h
deleted file mode 100644
index bc31dc8297..0000000000
--- a/libical/src/libicalvcal/vobject.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
-
-The vCard/vCalendar C interface is implemented in the set
-of files as follows:
-
-vcc.y, yacc source, and vcc.c, the yacc output you will use
-implements the core parser
-
-vobject.c implements an API that insulates the caller from
-the parser and changes in the vCard/vCalendar BNF
-
-port.h defines compilation environment dependent stuff
-
-vcc.h and vobject.h are header files for their .c counterparts
-
-vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
-which you may find useful.
-
-test.c is a standalone test driver that exercises some of
-the features of the APIs provided. Invoke test.exe on a
-VCARD/VCALENDAR input text file and you will see the pretty
-print output of the internal representation (this pretty print
-output should give you a good idea of how the internal
-representation looks like -- there is one such output in the
-following too). Also, a file with the .out suffix is generated
-to show that the internal representation can be written back
-in the original text format.
-
-For more information on this API see the readme.txt file
-which accompanied this distribution.
-
- Also visit:
-
- http://www.versit.com
- http://www.ralden.com
-
-*/
-
-
-#ifndef __VOBJECT_H__
-#define __VOBJECT_H__ 1
-
-
-#include "port.h"
-#include <stdlib.h>
-#include <stdio.h>
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-
-#define VC7bitProp "7BIT"
-#define VC8bitProp "8BIT"
-#define VCAAlarmProp "AALARM"
-#define VCAdditionalNamesProp "ADDN"
-#define VCAdrProp "ADR"
-#define VCAgentProp "AGENT"
-#define VCAIFFProp "AIFF"
-#define VCAOLProp "AOL"
-#define VCAppleLinkProp "APPLELINK"
-#define VCAttachProp "ATTACH"
-#define VCAttendeeProp "ATTENDEE"
-#define VCATTMailProp "ATTMAIL"
-#define VCAudioContentProp "AUDIOCONTENT"
-#define VCAVIProp "AVI"
-#define VCBase64Prop "BASE64"
-#define VCBBSProp "BBS"
-#define VCBirthDateProp "BDAY"
-#define VCBMPProp "BMP"
-#define VCBodyProp "BODY"
-#define VCBusinessRoleProp "ROLE"
-#define VCCalProp "VCALENDAR"
-#define VCCaptionProp "CAP"
-#define VCCardProp "VCARD"
-#define VCCarProp "CAR"
-#define VCCategoriesProp "CATEGORIES"
-#define VCCellularProp "CELL"
-#define VCCGMProp "CGM"
-#define VCCharSetProp "CS"
-#define VCCIDProp "CID"
-#define VCCISProp "CIS"
-#define VCCityProp "L"
-#define VCClassProp "CLASS"
-#define VCCommentProp "NOTE"
-#define VCCompletedProp "COMPLETED"
-#define VCContentIDProp "CONTENT-ID"
-#define VCCountryNameProp "C"
-#define VCDAlarmProp "DALARM"
-#define VCDataSizeProp "DATASIZE"
-#define VCDayLightProp "DAYLIGHT"
-#define VCDCreatedProp "DCREATED"
-#define VCDeliveryLabelProp "LABEL"
-#define VCDescriptionProp "DESCRIPTION"
-#define VCDIBProp "DIB"
-#define VCDisplayStringProp "DISPLAYSTRING"
-#define VCDomesticProp "DOM"
-#define VCDTendProp "DTEND"
-#define VCDTstartProp "DTSTART"
-#define VCDueProp "DUE"
-#define VCEmailAddressProp "EMAIL"
-#define VCEncodingProp "ENCODING"
-#define VCEndProp "END"
-#define VCEventProp "VEVENT"
-#define VCEWorldProp "EWORLD"
-#define VCExNumProp "EXNUM"
-#define VCExpDateProp "EXDATE"
-#define VCExpectProp "EXPECT"
-#define VCExtAddressProp "EXT ADD"
-#define VCFamilyNameProp "F"
-#define VCFaxProp "FAX"
-#define VCFullNameProp "FN"
-#define VCGeoProp "GEO"
-#define VCGeoLocationProp "GEO"
-#define VCGIFProp "GIF"
-#define VCGivenNameProp "G"
-#define VCGroupingProp "Grouping"
-#define VCHomeProp "HOME"
-#define VCIBMMailProp "IBMMail"
-#define VCInlineProp "INLINE"
-#define VCInternationalProp "INTL"
-#define VCInternetProp "INTERNET"
-#define VCISDNProp "ISDN"
-#define VCJPEGProp "JPEG"
-#define VCLanguageProp "LANG"
-#define VCLastModifiedProp "LAST-MODIFIED"
-#define VCLastRevisedProp "REV"
-#define VCLocationProp "LOCATION"
-#define VCLogoProp "LOGO"
-#define VCMailerProp "MAILER"
-#define VCMAlarmProp "MALARM"
-#define VCMCIMailProp "MCIMAIL"
-#define VCMessageProp "MSG"
-#define VCMETProp "MET"
-#define VCModemProp "MODEM"
-#define VCMPEG2Prop "MPEG2"
-#define VCMPEGProp "MPEG"
-#define VCMSNProp "MSN"
-#define VCNamePrefixesProp "NPRE"
-#define VCNameProp "N"
-#define VCNameSuffixesProp "NSUF"
-#define VCNoteProp "NOTE"
-#define VCOrgNameProp "ORGNAME"
-#define VCOrgProp "ORG"
-#define VCOrgUnit2Prop "OUN2"
-#define VCOrgUnit3Prop "OUN3"
-#define VCOrgUnit4Prop "OUN4"
-#define VCOrgUnitProp "OUN"
-#define VCPagerProp "PAGER"
-#define VCPAlarmProp "PALARM"
-#define VCParcelProp "PARCEL"
-#define VCPartProp "PART"
-#define VCPCMProp "PCM"
-#define VCPDFProp "PDF"
-#define VCPGPProp "PGP"
-#define VCPhotoProp "PHOTO"
-#define VCPICTProp "PICT"
-#define VCPMBProp "PMB"
-#define VCPostalBoxProp "BOX"
-#define VCPostalCodeProp "PC"
-#define VCPostalProp "POSTAL"
-#define VCPowerShareProp "POWERSHARE"
-#define VCPreferredProp "PREF"
-#define VCPriorityProp "PRIORITY"
-#define VCProcedureNameProp "PROCEDURENAME"
-#define VCProdIdProp "PRODID"
-#define VCProdigyProp "PRODIGY"
-#define VCPronunciationProp "SOUND"
-#define VCPSProp "PS"
-#define VCPublicKeyProp "KEY"
-#define VCQPProp "QP"
-#define VCQuickTimeProp "QTIME"
-#define VCQuotedPrintableProp "QUOTED-PRINTABLE"
-#define VCRDateProp "RDATE"
-#define VCRegionProp "R"
-#define VCRelatedToProp "RELATED-TO"
-#define VCRepeatCountProp "REPEATCOUNT"
-#define VCResourcesProp "RESOURCES"
-#define VCRNumProp "RNUM"
-#define VCRoleProp "ROLE"
-#define VCRRuleProp "RRULE"
-#define VCRSVPProp "RSVP"
-#define VCRunTimeProp "RUNTIME"
-#define VCSequenceProp "SEQUENCE"
-#define VCSnoozeTimeProp "SNOOZETIME"
-#define VCStartProp "START"
-#define VCStatusProp "STATUS"
-#define VCStreetAddressProp "STREET"
-#define VCSubTypeProp "SUBTYPE"
-#define VCSummaryProp "SUMMARY"
-#define VCTelephoneProp "TEL"
-#define VCTIFFProp "TIFF"
-#define VCTimeZoneProp "TZ"
-#define VCTitleProp "TITLE"
-#define VCTLXProp "TLX"
-#define VCTodoProp "VTODO"
-#define VCTranspProp "TRANSP"
-#define VCUniqueStringProp "UID"
-#define VCURLProp "URL"
-#define VCURLValueProp "URLVAL"
-#define VCValueProp "VALUE"
-#define VCVersionProp "VERSION"
-#define VCVideoProp "VIDEO"
-#define VCVoiceProp "VOICE"
-#define VCWAVEProp "WAVE"
-#define VCWMFProp "WMF"
-#define VCWorkProp "WORK"
-#define VCX400Prop "X400"
-#define VCX509Prop "X509"
-#define VCXRuleProp "XRULE"
-
-/* Extensions */
-
-#define XPilotIdProp "X-PILOTID"
-#define XPilotStatusProp "X-PILOTSTAT"
-
-typedef struct VObject VObject;
-
-typedef struct VObjectIterator {
- VObject* start;
- VObject* next;
- } VObjectIterator;
-
-extern DLLEXPORT(VObject*) newVObject(const char *id);
-extern DLLEXPORT(void) deleteVObject(VObject *p);
-extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
-extern DLLEXPORT(void) deleteStr(const char *p);
-extern DLLEXPORT(void) unUseStr(const char *s);
-
-extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
-extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
-extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
-extern DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s);
-extern DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s);
-extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
-extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
-extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
-extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
-extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
-
-extern DLLEXPORT(const char*) vObjectName(VObject *o);
-extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
-extern DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o);
-extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
-extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
-extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
-extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
-extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
-
-extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
-extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
-extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
-extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
-extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
-extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
-extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
-extern DLLEXPORT(void) addList(VObject **o, VObject *p);
-
-extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
-
-extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
-extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
-extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
-extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
-
-extern DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o);
-extern DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list);
-
-extern DLLEXPORT(const char*) lookupStr(const char *s);
-extern DLLEXPORT(void) cleanStrTbl();
-
-extern DLLEXPORT(void) cleanVObject(VObject *o);
-extern DLLEXPORT(void) cleanVObjects(VObject *list);
-
-extern DLLEXPORT(const char*) lookupProp(const char* str);
-extern DLLEXPORT(const char*) lookupProp_(const char* str);
-
-extern DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes);
-extern DLLEXPORT(int) uStrLen(const wchar_t *u);
-extern DLLEXPORT(char*) fakeCString(const wchar_t *u);
-
-extern DLLEXPORT(void) printVObjectToFile(char *fname,VObject *o);
-extern DLLEXPORT(void) printVObjectsToFile(char *fname,VObject *list);
-extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
-extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
-
-extern DLLEXPORT(int) vObjectValueType(VObject *o);
-
-/* return type of vObjectValueType: */
-#define VCVT_NOVALUE 0
- /* if the VObject has no value associated with it. */
-#define VCVT_STRINGZ 1
- /* if the VObject has value set by setVObjectStringZValue. */
-#define VCVT_USTRINGZ 2
- /* if the VObject has value set by setVObjectUStringZValue. */
-#define VCVT_UINT 3
- /* if the VObject has value set by setVObjectIntegerValue. */
-#define VCVT_ULONG 4
- /* if the VObject has value set by setVObjectLongValue. */
-#define VCVT_RAW 5
- /* if the VObject has value set by setVObjectAnyValue. */
-#define VCVT_VOBJECT 6
- /* if the VObject has value set by setVObjectVObjectValue. */
-
-extern const char** fieldedProp;
-
-/* NOTE regarding printVObject and writeVObject
-
-The functions below are not exported from the DLL because they
-take a FILE* as a parameter, which cannot be passed across a DLL
-interface (at least that is my experience). Instead you can use
-their companion functions which take file names or pointers
-to memory. However, if you are linking this code into
-your build directly then you may find them a more convenient API
-and you can go ahead and use them. If you try to use them with
-the DLL LIB you will get a link error.
-*/
-extern void printVObject(FILE *fp,VObject *o);
-extern void writeVObject(FILE *fp, VObject *o);
-
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __VOBJECT_H__ */
-
-
diff --git a/libical/src/python/.cvsignore b/libical/src/python/.cvsignore
deleted file mode 100644
index 3dda72986f..0000000000
--- a/libical/src/python/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/libical/src/python/ChangeLog b/libical/src/python/ChangeLog
deleted file mode 100644
index 7b16306ce5..0000000000
--- a/libical/src/python/ChangeLog
+++ /dev/null
@@ -1,109 +0,0 @@
-2001-03-13 Eric Busboom <eric@softwarestudio.org>
-
- * Component.py Added Component.property()
-
-2001-03-10 Patrick Lewis <plewis@inetarena.com>
-
- * Added __str__ method to Collection.Collection
-
- * Component.Component can now be initialized without arguments
-
- * Made _singular_property and _multiple_properties (in Component)
- useful for nearly all the specific component interfaces
-
- * Changed Property.Attendee and Property.Organizer to allow creation
- with no arguments
-
- * Filled in Todo skeleton
-
- * Added test function for an Event
-
-
-2001-03-05 Eric Busboom <eric@softwarestudio.org>
-
- * Property.py Added a lot of exception code to signal failure to
- create a Property.
-
- * DerivedProperties.py Added derived property classes for RDATE
- and TRIGGER, two properties that can have one of two value types.
-
-
-2001-03-04 Eric Busboom <eric@softwarestudio.org>
-
- * Property.pm Added Property.ConstructorFailedError exception
-
- * Component.pm fixed bug in Collection.__setslice__. "," used
- instead of ":"
-
-2001-03-04 Patrick Lewis <plewis@inetarena.com>
-
- * Split Libical.py file into Component.py, Property.py, Collection.py,
- and Store.py
-
- * Added test_* functions to test.py
-
- * Changed component bindings to return a Collection when objects can
- have multiple values
-
- * Changed Component object to allow for creation of an object without
- an initial string
-
- * Added Todo and Journal events
-
-2001-02-28 Eric Busboom <eric@softwarestudio.org>
-
- * Property Remove most internal data. The property now work
- alsmost entirely off of the icalproperty that it holds a reference
- to. Made changes in all derived Properties to accomodate the
- change.
-
- * Property Added __del__
-
- * Component Component.properties() now caches properties that it
- constructs, so two calls to properties() to that get the same
- icalproperty will also get the same Property.
-
- * Property Added Property.__cmp__ to test equality of properties
- based on ical string values
-
-2001-02-27 Eric Busboom <eric@softwarestudio.org>
-
- * Property Added Property.ref() to set/get the reference to the
- Property's internal icalproperty
-
- * Property Property._update_value now changes the icalproperty
- value if a reference has been set.
-
- * Component re-instituted Component.properties(). The routine now
- adds a 'ref' key to the dict that holds the python pointer
- string. The C hex value of the pointer is in the 'pid' key
-
-
-2001-02-27 Patrick Lewis <plewis@inetarena.com>
-
- * Backed out changes to Component removing comp_p;
- Component.comp_p should be restored
-
-2001-02-26 Eric Busboom <eric@softwarestudio.org>
-
- * Period Added test routine,test_period()
-
- * Period implemented methods in period
-
- * Time Addedd addition and subtraction operators
-
-2001-02-25 Eric Busboom <eric@softwarestudio.org>
-
- * Libical.py Added test routine for time, time_test()
-
- * Libical.py Remove end of line chars ('\r\n" ) from
- Property._str__. Caller should add these lines itself
-
- * Liical.py CHanges Time._update_values to set time VALUE type
- based on use of is_date, rather than length of string.
-
- * Libical.py Removed call to _update_value in TIme::timezone
-
-
- * Libical.py changed update_value to _update_value
-
diff --git a/libical/src/python/Collection.py b/libical/src/python/Collection.py
deleted file mode 100644
index 48092aadaa..0000000000
--- a/libical/src/python/Collection.py
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: Collection.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-from types import *
-
-class Collection:
- """A group of components that can be modified somewhat like a list.
-
- Usage:
- Collection(componet, propSequence)
-
- component is a Component object
- propSequence is a list or tuple of Property (or subclass of Property)
- of objects already in component
- """
-
- def __init__(self, component, propSequence):
- self._properties = list(propSequence[:])
- self._component = component
-
- def __getslice__(self, beg, end):
- return Collection(self._component, self._properties[beg:end])
-
- def __setslice__(self, beg, end, sequence):
-
- if not isinstance(sequence,ListType):
- raise TypeError, "must assign list (not instance) to slice"
-
- oldProps = self._properties[beg:end]
-
- for p in oldProps:
- self._component.remove_property(p)
-
- self._properties[beg:end] = sequence
- for p in sequence:
- self._component.add_property(p)
-
- def __getitem__(self, i):
- return self._properties[i]
-
- def __setitem__(self, i, prop):
- self._component.remove_property(self._properties[i])
- self._component.add_property(prop)
- self._properties[i]=prop
-
- def __delitem__(self, i):
- self._component.remove_property(self._properties[i])
- del self._properties[i]
-
- def __len__(self):
- return len(self._properties)
-
- def __str__(self):
- s = "[ "
- if len(self._properties) > 0:
- s = s + str(self._properties[0])
- for p in self._properties[1:]:
- s = "%s, %s" % (s, p)
- s = s + " ]"
- return s
-
- def append(self, property):
- self._properties.append(property)
- self._component.add_property(property)
-
-class ComponentCollection:
-
- def __init__(self, parent, componentSequence):
- self._parent = parent
- self._components = list(componentSequence[:])
-
- def __getslice__(self, beg, end):
- return ComponentCollection(self._parent, self._components[beg:end])
-
- def __setslice__(self, beg, end, sequence):
- oldComps = self._components[beg:end]
- self._components.__setslice__(beg, end, sequence)
- for c in sequence:
- self._components.addComponent(c)
- for c in oldComps:
- self._parent.remove_component(c)
-
- def __getitem__(self, i):
- return self._components[i]
-
- def __setitem__(self, i, prop):
- self._parent.remove_component(self._components[i])
- self._parent.add_property(prop)
- self._components[i]=prop
-
- def __delitem__(self, i):
- self._parent.remove_componet(self._components[i])
- del self._components[i]
-
- def __len__(self):
- return len(self._components)
-
- def append(self, property):
- self._components.append(property)
- self._parent.addComponent(property)
diff --git a/libical/src/python/Component.py b/libical/src/python/Component.py
deleted file mode 100644
index f4399f6c20..0000000000
--- a/libical/src/python/Component.py
+++ /dev/null
@@ -1,670 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: Component.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-from LibicalWrap import *
-from types import *
-from Property import *
-from Collection import *
-
-class Component:
-
- def __init__(self,str=None, component_kind="ANY", ref=None):
-
- if ref != None:
- self._ref = ref
- else:
- self._ref = None
- if str != None:
- self._ref = icalparser_parse_string(str)
- else:
- kind = icalenum_string_to_component_kind(component_kind)
- self._ref = icalcomponent_new(kind)
-
- self.cached_props = {}
-
- def __del__(self):
- if self._ref != None and \
- icalcomponent_get_parent(self._ref) != None:
-
- for k in self.cached_props.keys():
- del self.cached_props[k]
-
- icalcomponent_free(self._ref)
- self._ref = None
-
- def _prop_from_ref(self,p):
-
- d_string = icallangbind_property_eval_string(p,":")
- d = eval(d_string)
- d['ref'] = p
-
- if not self.cached_props.has_key(p):
-
- if d['value_type'] == 'DATE-TIME' or d['value_type'] == 'DATE':
- prop = Time(d,)
- elif d['value_type'] == 'PERIOD':
- prop = Period(d)
- elif d['value_type'] == 'DURATION':
- prop = Duration(d)
- elif d['name'] == 'ATTACH':
- prop = Attach(d)
- elif d['name'] == 'ATTENDEE':
- prop = Attendee(d)
- elif d['name'] == 'ORGANIZER':
- prop = Organizer(d)
- else:
- prop=Property(ref=p)
-
- self.cached_props[p] = prop
-
- def property(self, type):
-
- p = icallangbind_get_first_property(self._ref,type)
-
- if p !='NULL':
- self._prop_from_ref(p)
- prop = self.cached_props[p]
- return prop
- else :
- return None
-
- def properties(self,type='ANY'):
- """
- Return a list of Property instances, each representing a
- property of the type 'type.'
- """
-
- props = []
-
- p = icallangbind_get_first_property(self._ref,type)
-
- while p !='NULL':
- self._prop_from_ref(p)
- prop = self.cached_props[p]
- props.append(prop)
- p = icallangbind_get_next_property(self._ref,type)
-
- return Collection(self,props)
-
- def add_property(self, prop):
- "Adds the property object to the component."
-
- if not isinstance(prop,Property):
- raise TypeError
-
- prop_p = prop.ref()
-
- if not prop_p:
- s = str(prop)
- prop_p = icalproperty_new_from_string(s)
-
- if prop_p == 'NULL':
- raise "Bad property string: " + s
-
- prop.ref(prop_p)
-
- if icalproperty_get_parent(prop_p)=='NULL':
- icalcomponent_add_property(self._ref, prop_p)
- elif icalproperty_get_parent(prop_p) != self._ref:
- raise "Property is already a child of another component"
-
-
- def remove_property(self,prop):
-
- if prop.ref() and self.cached_props.has_key(prop.ref()):
-
- del self.cached_props[prop.ref()]
- icalcomponent_remove_property(self._ref,prop.ref())
-
- def components(self,type='ANY'):
- comps = []
-
- return comps
-
- def add_component(self, componentObj):
- "Adds a child component."
- pass
-
-
- def remove_component(self, component):
- "Removes a child component"
- pass
-
- def as_ical_string(self):
- return self.__str__()
-
- def __str__(self):
-
- return icalcomponent_as_ical_string(self._ref)
-
-
-
-def NewComponent(comp):
- "Converts a string or C icalcomponent into the right component object."
-
- wasStr=0 # Were we passed a string or an icalcomponent?
-
- if isinstance (comp, StringType):
- compStr = comp
- comp = icalparser_parse_string(comp)
- wasStr=1
- else:
- compStr = icalcomponent_as_ical_string(comp)
-
- kind = icalcomponent_isa(comp)
- kindStr = icalenum_component_kind_to_string(kind)
- # Do I need to free kind? (I think not).
-
- if kindStr == 'VEVENT':
- newComp = Event(compStr)
- elif kindStr == 'VTODO':
- newComp = Todo(compStr)
- elif kindStr == 'VJOURNAL':
- newComp = Journal(compstr)
- else:
- newComp = Component(compStr)
-
- # I don't think I need to free the component created when passed a string,
- # as it wasn't created with a _new function.
-
- return newComp
-
-
-class GenericComponent(Component):
-
- def __init__(self):
-
- # Component.__init__(self, str) # Call from subclasses
- self._recurrence_set=None
-
- def _singular_property(self, name, value_type, value=None,
- property_obj=None, enumerated_values=None):
- """Sets or gets the value of a method which exists once per Component.
-
- This is a constructor method for properties without a strictly defined
- object."""
-
- curr_properties = self.properties(name)
-
- # Get the value
- if value==None:
- if len(curr_properties) == 0:
- return None
- elif len(curr_properties) == 1:
- return curr_properties[0].value()
- else:
- raise ValueError, "too many properties of type %s" % propType
-
- # Set the value
- else:
- # Check if value is in enumerated_values
- if enumerated_values:
- value = upper(value)
- if value not in enumerated_values:
- raise ValueError, "%s is not one of %s" \
- % (value, enumerated_values)
-
- # Create the new property
- if property_obj:
- if not isinstance(value, property_obj):
- # Create a special property_obj property
- if property_obj == Time:
- p = Time(value, name)
- ## p.value_type(value_type)
- else:
- p = property_obj()
- ## p.value_type(value_type)
- p.value(value)
- else:
- p = value # value is already a property_obj
- else:
- # Create a generic property
- p = Property(name)
- ## p.value_type(value_type)
- p.value(value)
-
- if len(curr_properties) == 1:
- self.remove_property(curr_properties[0])
- elif len(curr_properties) > 1:
- raise ValueError, "too many properties of type %s" % propType
-
- self.add_property(p)
-
- def method(self, v=None):
- "Sets or returns the value of the METHOD property."
- return self._singular_property("METHOD", "TEXT", v)
-
- def prodid(self, v=None):
- "Sets or returns the value of the PRODID property."
- return self._singular_property("PRODID", "TEXT", v)
-
- def calscale(self, v=None):
- "Sets or returns the value of the CALSCALE property."
- return self._singular_property("CALSCALE", "TEXT", v)
-
- def class_prop(self, v=None): # Class is a reserved word
- "Sets or returns the value of the CLASS property."
- if v!=None:
- v = upper(v)
- return self._singular_property('CLASS', 'TEXT', v)
-
- def created(self, v=None):
- """Sets or returns the value of the CREATED property.
-
- Usage:
- created(time_obj) # Set the value using a Time object
- created('19970101T123000Z') # Set using an iCalendar string
- created(982362522) # Set using seconds
- created() # Return an iCalendar string
- """
- return self._singular_property("CREATED", "DATE-TIME", v, Time)
-
- def description(self, v=None):
- "Sets or returns the value of the DESCRIPTION property."
- return self._singular_property("DESCRIPTION", "TEXT", v)
-
- def dtstamp(self, v=None):
- """Sets or returns the value of the DTSTAMP property.
-
- Usage:
- dtstamp(time_obj) # Set the value using a Time object
- dtstamp('19970101T123000Z')# Set using an iCalendar string
- dtstamp(982362522) # Set using seconds
- dtstamp() # Return an iCalendar string
- """
- return self._singular_property("DTSTAMP", "DATE-TIME", v, Time)
-
- def dtstart(self, v=None):
- """Sets or returns the value of the DTSTART property.
-
- Usage:
- dtstart(time_obj) # Set the value using a Time object
- dtstart('19970101T123000Z') # Set the value as an iCalendar string
- dtstart(982362522) # Set the value using seconds (time_t)
- dtstart() # Return the time as an iCalendar string
- """
- return self._singular_property("DTSTART", "DATE-TIME", v, Time)
-
- def last_modified(self, v=None):
- """Sets or returns the value of the LAST-MODIFIED property.
-
- Usage:
- lastmodified(time_obj) # Set the value using a Time object
- lastmodified('19970101T123000Z')# Set using an iCalendar string
- lastmodified(982362522) # Set using seconds
- lastmodified() # Return an iCalendar string
- """
- return self._singular_property("LAST-MODIFIED", "DATE-TIME", v, Time)
-
- def organizer(self, v=None):
- """Sets or gets the value of the ORGANIZER property.
-
- Usage:
- organizer(orgObj) # Set value using an organizer object
- organizer('MAILTO:jd@not.com') # Set value using a CAL-ADDRESS string
- organizer() # Return a CAL-ADDRESS string
- """
- return self._singular_property('ORGANIZER', 'CAL-ADDRESS', v,
- Organizer)
-
- def recurrence_id(self, v=None):
- """Sets or gets the value for the RECURRENCE-ID property.
-
- Usage:
- recurrence_id(recIdObj) # Set using a Recurrence_Id object
- recurrence_id("19700801T133000") # Set using an iCalendar string
- recurrence_id(8349873494) # Set using seconds from epoch
- recurrence_id() # Return an iCalendar string
- """
- return self._singular_property('RECURRENCE-ID', 'DATE-TIME', v,
- Recurrence_Id)
-
- def sequence(self, v=None):
- """Sets or gets the SEQUENCE value of the Event.
-
- Usage:
- sequence(1) # Set the value using an integer
- sequence('2') # Set the value using a string containing an integer
- sequence() # Return an integer
- """
- if isinstance(v, StringType):
- v = int(str)
- return self._singular_property('SEQUENCE', 'INTEGER', v)
-
- def summary(self, v=None):
- "Sets or gets the SUMMARY value of the Event."
- return self._singular_property('SUMMARY', 'TEXT', v)
-
- def uid(self, v=None):
- "Sets or gets the UID of the Event."
- return self._singular_property('UID', 'TEXT', v)
-
- def url(self, v=None):
- """Sets or returns the URL property."""
- return self._singular_property('URL', 'URI', v)
-
- ####
- # Not quite sure if this is how we want to handle recurrence rules, but
- # this is a start.
-
- def recurrence_set(self):
- "Returns the Events RecurrenceSet object."
- if self._recurrence_set == None: # i.e haven't initialized one
- self._recurrence_set = RecurrenceSet()
- return self._recurrence_set
-
- ###
- # Alarm interface. Returns an ComponentCollection.
-
- def alarms(self, values=None):
- """Sets or returns ALARM components.
-
- Examples:
- alarms((alarm1,)) # Set using Alarm component
- alarms() # Returns an ComponentCollection of all Alarms
- """
- if values!=None:
- for alarm in values:
- self.addComponent(alarm)
- else:
- return ComponentCollection(self, self.components('VALARM'))
-
- ####
- # Methods that deal with Properties that can occur multiple times are
- # below. They use the Collection class to return their Properties.
-
- def _multiple_properties(self, name, value_type, values,
- property_obj=None):
- "Processes set/get for Properties that can have multiple instances."
-
- # Set value
- if values!=None:
- if not isinstance(values, TupleType) \
- and not isinstance(values, ListType):
- raise TypeError, "%s is not a tuple or list."
-
- # Delete old properties
- for p in self.properties(name):
- self.remove_property(p)
-
- for v in values:
- if property_obj: # Specialized properties
- if not isinstance(v, property_obj): # Make new object
- new_prop = property_obj()
- new_prop.value(v)
- else: # Use existing object
- new_prop = v
- else: # Generic properties
- new_prop= Property()
- new_prop.name(name)
- # new_prop.value_type(value_type)
- new_prop.value(v)
-
- self.add_property(new_prop)
-
- # Get value
- else:
- return Collection(self, self.properties(name))
-
- def attachments(self, values=None):
- """Sets or returns a Collection of Attach properties.
-
- 'values' can be a sequence containing URLs (strings) and/or file-ish
- objects.
- """
- return self._multiple_properties("ATTACH", "", value, Attach)
-
- def attendees(self, value=None):
- """Sets attendees or returns a Collection of Attendee objects.
-
- If setting the attendees, pass a sequence as the argument.
- Examples:
- # Set using Attendee objects
- attendees((attObj1, attObj2))
- # Set using a CAL-ADDRESS string
- attendees(['MAILTO:jdoe@somewhere.com'])
- # Set using a combination of Attendee objects and strings
- attendees(['MAILTO:jdoe@somewhere.com', attObj1])
- # Returns a list of Attendee objects
- attendees()
-
- When setting the attendees, any previous Attendee objects in the Event
- are overwritten. If you want to add to the Attendees, one way to do it
- is:
-
- attendees().append(Attendee('MAILTO:jdoe@nothere.com'))
- """
- return self._multiple_properties("ATTENDEE", "", value, Attendee)
-
- def categories(self, value=None):
- """Sets categories or returns a Collection of CATEGORIES properties.
-
- If setting the categories, pass a sequence as the argument.
- Examples:
- # Set using string[s]
- categories(('APPOINTMENT', 'EDUCATION'))
- # Returns a list of Category properites
- categories()
-
- When setting the attendees, any previous category Properties in the
- Event are overwritten. If you want to add to the categories, one way
- to do it is:
-
- new_cat=Property('CATEGORIES')
- new_cat.value_type('TEXT')
- new_cat.value('PERSONAL')
- categories().append(new_cat)
- """
- return self._multiple_properties("CATEGORIES", "TEXT", value)
-
- def comments(self, value=None):
- "Sets or returns a Collection of COMMENT properties."
- return self._multiple_properties('COMMENT', 'TEXT', value)
-
- def contacts(self, value=None):
- "Sets or returns a Collection of CONTACT properties."
- return self._multiple_properties('CONTACT', 'TEXT', value)
-
- def related_tos(self, value=None):
- "Sets or returns a Collectoin of RELATED-TO properties."
- return self._multiple_properties('RELATED-TO', 'TEXT', value)
-
-
-class Event(GenericComponent):
- "The iCalendar Event object."
-
- def __init__(self, str=None):
- Component.__init__(self, str, "VEVENT")
- GenericComponent.__init__(self)
-
- def component_type(self):
- "Returns the type of component for the object."
- return "VEVENT"
-
- def clone(self):
- "Returns a copy of the object."
- return Event(self.asIcalString())
-
- def dtend(self, v=None):
- """Sets or returns the value of the DTEND property.
-
- Usage:
- dtend(time_obj) # Set the value using a Time object
- dtend('19970101T123000Z') # Set the value as an iCalendar string
- dtend(982362522) # Set the value using seconds (time_t)
- dtend() # Return the time as an iCalendar string
-
- If the dtend value is being set and duration() has a value, the
- duration property will be removed.
- """
- if v != None:
- duration = self.properties('DURATION')
- for d in duration: # Clear DURATION properties
- self.remove_property(d)
- return self._singular_property("DTEND", "DATE-TIME", v, Time)
-
- def duration(self, v=None):
- """Sets or returns the value of the duration property.
-
- Usage:
- duration(dur_obj) # Set the value using a Duration object
- duration("P3DT12H") # Set value as an iCalendar string
- duration(3600) # Set duration using seconds
- duration() # Return duration as an iCalendar string
-
- If the duration value is being set and dtend() has a value, the dtend
- property will be removed.
- """
-
- if v != None:
- dtend = self.properites('DTEND')
- for d in dtend:
- self.remove_property(d) # Clear DTEND properties
- return self._singular_property("DURATION", "DURATION", v, Duration)
-
- def status(self, v=None):
- "Sets or returns the value of the STATUS property."
-
- # These values are only good for VEVENT components (i.e. don't copy
- # & paste into VTODO or VJOURNAL
- valid_values=('TENTATIVE', 'CONFIRMED', 'CANCELLED')
- return self._singular_property("STATUS", "TEXT", v,
- enumerated_values=valid_values)
-
- def geo(self, v=None):
- """Sets or returns the value of the GEO property.
-
- Usage:
- geo(value) or
- geo() # Returns the icalendar string
-
- 'value' is either a icalendar GEO string or a sequence with two 'float'
- numbers.
-
- Examples:
- geo('40.232;-115.9531') # Set value using string
- geo((40.232, -115.9531)) # Set value using a sequence
- geo() # Returns "40.232;-115.9531"
-
- To get the GEO property represented as a tuple and numbers instead of
- the iCalendar string, use geo_get_tuple().
- """
-
- if isinstance(v, ListType) or isinstance(v, TupleType):
- v = "%s;%s" % (float(v[0]), float(v[1]))
- return self._singular_property("GEO", "FLOAT", v)
-
- def geo_get_tuple(self):
- """Returns the GEO property as a tuple."""
-
- geo = self.geo()
- geo = split(geo, ';')
- return float(geo[0]), float(geo[1])
-
- def location(self, v=None):
- """Sets or returns the LOCATION property."""
- return self._singular_property("LOCATION", "TEXT", v)
-
- def transp(self, v=None):
- """Sets or returns the TRANSP property."""
- ok_values = ('OPAQUE', 'TRANSPARENT')
- return self._singular_property('TRANSP', 'TEXT', v,
- enumerated_values=ok_values)
-
- def resources(self, v=None):
- pass
-
-class Todo(GenericComponent):
- "The iCalendar TODO component."
-
- def component_type(self):
- "Returns the type of component for the object."
- return "VTODO"
-
- def clone(self):
- "Returns a copy of the object."
- return Todo(self.asIcalString())
-
- def completed(self, value=None):
- return self._singular_property('COMPLETED', 'DATE-TIME', value, Time)
-
- def geo(self, value=None):
- if isinstance(v, ListType) or isinstance(v, TupleType):
- v = "%s;%s" % (float(v[0]), float(v[1]))
- return self._singular_property("GEO", "FLOAT", value)
-
- def location(self, value=None):
- return self._singular_property('LOCATION', 'TEXT', value)
-
- def percent(self, value=None):
- if value!=None:
- value = str(int(value))
- return self._singular_property('PERCENT', 'INTEGER', value)
-
- def status(self, value=None):
- if value!=None:
- value=upper(value)
- ok_values = ('NEEDS-ACTION', 'COMPLETED', 'IN-PROCESS', 'CANCELLED')
- return self._singular_property('STATUS', 'TEXT', value,
- enumerated_values=ok_values)
-
- def due(self, value=None):
- if value != None:
- duration = self.properties('DURATION')
- for d in duration:
- self.remove_property(d) # Clear DURATION properties
- return self._singular_property('DUE', 'DATE-TIME', value, Time)
-
- def duration(self, value=None):
- if value != None:
- due = self.properites('DUE')
- for d in due:
- self.remove_property(d) # Clear DUE properties
- return self._singular_property("DURATION", "DURATION", value, Duration)
-
- def resources():
- pass
-
-
-class Journal(GenericComponent):
- "The iCalendar JOURNAL component."
-
- def component_type(self):
- "Returns the type of component for the object."
- return "VJOURNAL"
-
- def clone(self):
- "Returns a copy of the object."
- return Journal(self.asIcalString())
-
- def status(self, v=None):
- if v!=None:
- v = upper(v)
- ok_values=('DRAFT', 'FINAL', 'CANCELLED')
- return self._singular_property('STATUS', 'TEXT', v,
- enumerated_values=ok_values)
-
diff --git a/libical/src/python/DerivedProperties.py b/libical/src/python/DerivedProperties.py
deleted file mode 100644
index b557a1f7d7..0000000000
--- a/libical/src/python/DerivedProperties.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: DerivedProperties.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-from Property import Time, Period, Duration
-
-def RDate(arg):
-
- class RDate_Time(Time):
- def __init__(self,arg): Time.__init__(self,arg,"RDATE")
-
- class RDate_Period(Period):
- def __init__(self,arg): Period.__init__(self,arg,"RDATE")
-
- p = None
- for c in [RDate_Time, RDate_Period]:
- try: return c(arg)
- except Property.ConstructorFailedError, d: pass
- raise Property.ConstructorFailedError("Failed to construct RDATE from "+str(arg))
-
-
-def Trigger(arg):
- class Trigger_Time(Time):
- def __init__(self,arg): Time.__init__(self,arg,"TRIGGER")
-
- class Trigger_Duration(Duration):
- def __init__(self,arg): Duration.__init__(self,arg,"TRIGGER")
-
- p = None
- for c in [Trigger_Duration, Trigger_Time]:
- try: return c(arg)
- except Property.ConstructorFailedError, d: pass
- raise Property.ConstructorFailedError("Failed to construct TRIGGER from "+str(arg))
-
-
-
diff --git a/libical/src/python/Libical.py b/libical/src/python/Libical.py
deleted file mode 100644
index 78a0fff8ff..0000000000
--- a/libical/src/python/Libical.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: Libical.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-
-import LibicalWrap
-
-from Component import Component, NewComponent, Event, Todo, Journal
-
-# Will eventually remove Time for real Property events
-from Property import Property, Time, Duration, Period, Attendee, Organizer, \
- Recurrence_Id, Attach, RecurrenceSet
-
-from DerivedProperties import RDate, Trigger
-
-from Store import Store, FileStore
diff --git a/libical/src/python/LibicalWrap.i b/libical/src/python/LibicalWrap.i
deleted file mode 100644
index c6b6740383..0000000000
--- a/libical/src/python/LibicalWrap.i
+++ /dev/null
@@ -1,352 +0,0 @@
-/* -*- Mode: C -*-*/
-/*======================================================================
- FILE: ical.i
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
-
- Contributions from:
- Graham Davison (g.m.davison@computer.org)
-
- ======================================================================*/
-
-%module LibicalWrap
-
-
-%{
-#include "ical.h"
-#include "icalss.h"
-
-#include <sys/types.h> /* for size_t */
-#include <time.h>
-
-%}
-
-
-#include "fcntl.h" /* For Open flags */
-
-typedef void icalcomponent;
-typedef void icalproperty;
-
-icalcomponent* icalparser_parse_string(char* str);
-
-
-icalcomponent* icalcomponent_new(int kind);
-icalcomponent* icalcomponent_new_clone(icalcomponent* component);
-icalcomponent* icalcomponent_new_from_string(char* str);
-
-char* icalcomponent_as_ical_string(icalcomponent* component);
-
-void icalcomponent_free(icalcomponent* component);
-int icalcomponent_count_errors(icalcomponent* component);
-void icalcomponent_strip_errors(icalcomponent* component);
-void icalcomponent_convert_errors(icalcomponent* component);
-
-icalproperty* icalcomponent_get_current_property(icalcomponent* component);
-
-icalproperty* icalcomponent_get_first_property(icalcomponent* component,
- int kind);
-icalproperty* icalcomponent_get_next_property(icalcomponent* component,
- int kind);
-
-icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
-
-icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
- int kind);
-icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
- int kind);
-
-void icalcomponent_add_property(icalcomponent* component,
- icalproperty* property);
-
-void icalcomponent_remove_property(icalcomponent* component,
- icalproperty* property);
-
-
-icalcomponent* icalcomponent_get_parent(icalcomponent* component);
-int icalcomponent_isa(icalcomponent* component);
-
-int icalrestriction_check(icalcomponent* comp);
-
-
-/* actually takes icalproperty_kind */
-icalproperty* icalproperty_new(int kind);
-
-icalproperty* icalproperty_new_from_string(char* str);
-
-char* icalproperty_as_ical_string(icalproperty *prop);
-
-void icalproperty_set_parameter_from_string(icalproperty* prop,
- const char* name, const char* value);
-void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char * kind);
-
-const char* icalproperty_get_value_as_string(icalproperty* prop);
-const char* icalproperty_get_parameter_as_string(icalproperty* prop,
- const char* name);
-
-
-icalcomponent* icalproperty_get_parent(icalproperty* property);
-
-int icalerror_supress(const char* error);
-void icalerror_restore(const char* error, int es);
-char* icalerror_perror();
-void icalerror_clear_errno(void);
-
-const char* icalproperty_kind_to_string(int kind);
-int icalproperty_string_to_kind(const char* string);
-int icalproperty_kind_to_value_kind(int kind);
-
-const char* icalvalue_kind_to_string(int kind);
-int icalvalue_string_to_kind(const char* str);
-
-const char* icalparameter_kind_to_string(int kind);
-int icalparameter_string_to_kind(const char* string);
-
-const char* icalenum_component_kind_to_string(int kind);
-int icalenum_string_to_component_kind(const char* string);
-
-int* icallangbind_new_array(int size);
-void icallangbind_free_array(int* array);
-int icallangbind_access_array(int* array, int index);
-
-
-
-int icalrecur_expand_recurrence(char* rule, int start,
- int count, int* array);
-
-
-/* Iterate through properties and components using strings for the kind */
-icalproperty* icallangbind_get_first_property(icalcomponent *c,
- const char* prop);
-
-icalproperty* icallangbind_get_next_property(icalcomponent *c,
- const char* prop);
-
-icalcomponent* icallangbind_get_first_component(icalcomponent *c,
- const char* comp);
-
-icalcomponent* icallangbind_get_next_component(icalcomponent *c,
- const char* comp);
-
-
-/* Return a string that can be evaluated in perl or python to
- generated a hash that holds the property's name, value and
- parameters. Sep is the hash seperation string, "=>" for perl and
- ":" for python */
-const char* icallangbind_property_eval_string(icalproperty* prop, char* sep);
-
-int icallangbind_string_to_open_flag(const char* str);
-
-/***********************************************************************
- Time routines
-***********************************************************************/
-
-
-struct icaltimetype
-{
- int year;
- int month;
- int day;
- int hour;
- int minute;
- int second;
-
- int is_utc; /* 1-> time is in UTC timezone */
-
- int is_date; /* 1 -> interpret this as date. */
-
- const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
-};
-
-
-/* Convert seconds past UNIX epoch to a timetype*/
-struct icaltimetype icaltime_from_timet(int v, int is_date);
-
-/* Return the time as seconds past the UNIX epoch */
-/* Normally, this returns a time_t, but SWIG tries to turn that type
- into a pointer */
-int icaltime_as_timet(struct icaltimetype);
-
-/* Return a string represention of the time, in RFC2445 format. The
- string is owned by libical */
-char* icaltime_as_ical_string(struct icaltimetype tt);
-
-/* create a time from an ISO format string */
-struct icaltimetype icaltime_from_string(const char* str);
-
-/* Routines for handling timezones */
-/* Return the offset of the named zone as seconds. tt is a time
- indicating the date for which you want the offset */
-int icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
-
-/* convert tt, of timezone tzid, into a utc time. Does nothing if the
- time is already UTC. */
-struct icaltimetype icaltime_as_utc(struct icaltimetype tt,
- const char* tzid);
-
-/* convert tt, a time in UTC, into a time in timezone tzid */
-struct icaltimetype icaltime_as_zone(struct icaltimetype tt,
- const char* tzid);
-
-/* Return a null time, which indicates no time has been set. This time represent the beginning of the epoch */
-struct icaltimetype icaltime_null_time(void);
-
-/* Return true of the time is null. */
-int icaltime_is_null_time(struct icaltimetype t);
-
-/* Returns false if the time is clearly invalid, but is not null. This
- is usually the result of creating a new time type buy not clearing
- it, or setting one of the flags to an illegal value. */
-int icaltime_is_valid_time(struct icaltimetype t);
-
-/* Reset all of the time components to be in their normal ranges. For
- instance, given a time with minutes=70, the minutes will be reduces
- to 10, and the hour incremented. This allows the caller to do
- arithmetic on times without worrying about overflow or
- underflow. */
-struct icaltimetype icaltime_normalize(struct icaltimetype t);
-
-/* Return the day of the year of the given time */
-short icaltime_day_of_year(struct icaltimetype t);
-
-/* Create a new time, given a day of year and a year. */
-struct icaltimetype icaltime_from_day_of_year(short doy, short year);
-
-/* Return the day of the week of the given time. Sunday is 0 */
-short icaltime_day_of_week(struct icaltimetype t);
-
-/* Return the day of the year for the Sunday of the week that the
- given time is within. */
-short icaltime_start_doy_of_week(struct icaltimetype t);
-
-/* Return a string with the time represented in the same format as ctime(). THe string is owned by libical */
-char* icaltime_as_ctime(struct icaltimetype);
-
-/* Return the week number for the week the given time is within */
-short icaltime_week_number(struct icaltimetype t);
-
-/* Return -1, 0, or 1 to indicate that a<b, a==b or a>b */
-int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
-
-/* like icaltime_compare, but only use the date parts. */
-int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
-
-/* Return the number of days in the given month */
-short icaltime_days_in_month(short month,short year);
-
-
-/***********************************************************************
- Duration Routines
-***********************************************************************/
-
-
-struct icaldurationtype
-{
- int is_neg;
- unsigned int days;
- unsigned int weeks;
- unsigned int hours;
- unsigned int minutes;
- unsigned int seconds;
-};
-
-struct icaldurationtype icaldurationtype_from_int(int t);
-struct icaldurationtype icaldurationtype_from_string(const char*);
-int icaldurationtype_as_int(struct icaldurationtype duration);
-char* icaldurationtype_as_ical_string(struct icaldurationtype d);
-struct icaldurationtype icaldurationtype_null_duration();
-int icaldurationtype_is_null_duration(struct icaldurationtype d);
-
-struct icaltimetype icaltime_add(struct icaltimetype t,
- struct icaldurationtype d);
-
-struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
- struct icaltimetype t2);
-
-
-/***********************************************************************
- Period Routines
-***********************************************************************/
-
-
-struct icalperiodtype
-{
- struct icaltimetype start;
- struct icaltimetype end;
- struct icaldurationtype duration;
-};
-
-struct icalperiodtype icalperiodtype_from_string (const char* str);
-
-const char* icalperiodtype_as_ical_string(struct icalperiodtype p);
-struct icalperiodtype icalperiodtype_null_period();
-int icalperiodtype_is_null_period(struct icalperiodtype p);
-int icalperiodtype_is_valid_period(struct icalperiodtype p);
-
-
-/***********************************************************************
- Storage Routines
-***********************************************************************/
-
-icalfileset* icalfileset_new(const char* path);
-
-/* Like _new, but takes open() flags for opening the file */
-icalfileset* icalfileset_new_open(const char* path,
- int flags, int mode);
-
-void icalfileset_free(icalfileset* cluster);
-
-const char* icalfileset_path(icalfileset* cluster);
-
-/* Mark the cluster as changed, so it will be written to disk when it
- is freed. Commit writes to disk immediately. */
-void icalfileset_mark(icalfileset* cluster);
-icalerrorenum icalfileset_commit(icalfileset* cluster);
-
-icalerrorenum icalfileset_add_component(icalfileset* cluster,
- icalcomponent* child);
-
-icalerrorenum icalfileset_remove_component(icalfileset* cluster,
- icalcomponent* child);
-
-int icalfileset_count_components(icalfileset* cluster,
- icalcomponent_kind kind);
-
-/* Restrict the component returned by icalfileset_first, _next to those
- that pass the gauge. _clear removes the gauge */
-icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge);
-void icalfileset_clear(icalfileset* store);
-
-/* Get and search for a component by uid */
-icalcomponent* icalfileset_fetch(icalfileset* cluster, const char* uid);
-int icalfileset_has_uid(icalfileset* cluster, const char* uid);
-icalcomponent* icalfileset_fetch_match(icalfileset* set, icalcomponent *c);
-
-
-/* Modify components according to the MODIFY method of CAP. Works on
- the currently selected components. */
-icalerrorenum icalfileset_modify(icalfileset* store, icalcomponent *oldcomp,
- icalcomponent *newcomp);
-
-/* Iterate through components. If a guage has been defined, these
- will skip over components that do not pass the gauge */
-
-icalcomponent* icalfileset_get_current_component (icalfileset* cluster);
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster);
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster);
-/* Return a reference to the internal component. You probably should
- not be using this. */
-
-icalcomponent* icalfileset_get_component(icalfileset* cluster);
diff --git a/libical/src/python/Makefile.am b/libical/src/python/Makefile.am
deleted file mode 100644
index 8eaf4a74cb..0000000000
--- a/libical/src/python/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-
-lib_LTLIBRARIES = libLibicalWrap.la
-
-libLibicalWrap_la_SOURCES = LibicalWrap.c
-
-INCLUDES = \
- -I$(top_builddir) \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src \
- -I$(top_srcdir)/src/libical \
- -I$(top_builddir)/src/libical \
- -I$(top_srcdir)/src/libicalss \
- $(PY_CFLAGS)
-
-LDADD = ../libical/libical.la ../libicalss/libicalss.la
-
-all: LibicalWrap.so
-
-LibicalWrap.c: LibicalWrap.i
- swig -python -o LibicalWrap.c LibicalWrap.i
-
-# This part should be done with libtool, but I don't know how to do
-# it. Libtool needs to generate a shared library in this directory
-# regardless of the value of AM_DISABLE_SHARED
-LibicalWrap.so: LibicalWrap.c
- ld -shared -o LibicalWrap.so LibicalWrap.o ../libical/.libs/libical.a ../libicalss/.libs/libicalss.a
-
-CLEANFILES = LibicalWrap.c LibicalWrap_wrap.doc Libical.pyc LibicalWrap.so
-
-EXTRA_DIST = \
-Libical.py \
-LibicalWrap.i \
-python-binding.txt \
-test.py \
-Collection.py \
-Component.py \
-DerivedProperties.py \
-Property.py \
-Store.py \
-ChangeLog
-
-
diff --git a/libical/src/python/Property.py b/libical/src/python/Property.py
deleted file mode 100644
index d63b265525..0000000000
--- a/libical/src/python/Property.py
+++ /dev/null
@@ -1,839 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: Property.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-from LibicalWrap import *
-from types import *
-import regsub
-import base64
-from string import index, upper
-
-#def icalerror_supress(arg):
-# pass
-
-#def icalerror_restore(a,b):
-# pass
-
-def error_type():
- error = icalerror_perror()
- return error[:index(error,':')]
-
-class Property:
- """ Represent any iCalendar Property.
-
- Usage:
- Property(dict)
-
- Where:
- dict is a dictionary with keys of 'name', 'value_type', and 'value'.
- In addition, parameter:parameter value entries may be included.
- """
-
- class ConstructorFailedError(Exception):
- "Failed to construct a property"
-
- class UpdateFailedError(Exception):
- "Failed to update the value of a property"
-
-
- def __init__(self, type = None, ref = None):
-
-
- assert(ref == None or isinstance(ref,StringType))
- assert(type == None or isinstance(type,StringType))
-
- self._ref = None
-
- if ref != None:
- self._ref = ref
- elif type != None:
- kind = icalproperty_string_to_kind(type)
- self._ref = icalproperty_new(kind)
-
-
- if self._ref == None or self._ref == 'NULL':
- raise Property.ConstructorFailedError("Failed to construct Property")
-
- self._deleted = 0;
-
-
- # Initialize all of the required keys
-
-
- def __del__(self):
-
- self._deleted = 1;
-
- if not self._deleted and \
- self.ref() and \
- icalproperty_get_parent(self.ref()) == 'NULL':
-
- icalproperty_free(self.ref())
-
- def name(self,v=None):
- """ Return the name of the property """
- str = icalproperty_as_ical_string(self._ref)
-
- idx = index(str, '\n')
-
- return str[:idx]
-
- def ref(self,v=None):
- """ Return the internal reference to the libical icalproperty """
- if(v != None):
-
- if not self._deleted and self._ref and \
- icalproperty_get_parent(self._ref) == 'NULL':
-
- icalproperty_free(self._ref)
-
- self._ref = v
-
- return self._ref
-
-
- def value(self,v=None, kind = None):
- """ Return the RFC2445 representation of the value """
-
- if(v != None):
-
- if kind != None:
- # Get the default kind of value for this property
- default_kind = icalvalue_kind_to_string(icalproperty_kind_to_value_kind(icalproperty_string_to_kind(self.name())))
-
- if(kind != default_kind):
- self.__setitem__('VALUE',kind)
- vt = kind
- elif self.__getitem__('VALUE'):
- vt = self.__getitem__('VALUE')
- else:
- vt = 'NO' # Use the kind of the existing value
-
-
- icalerror_clear_errno()
-
- #e1=icalerror_supress("MALFORMEDDATA")
- icalproperty_set_value_from_string(self._ref,v,vt)
- #icalerror_restore("MALFORMEDDATA",e1)
-
- if error_type() != "NO":
- raise Property.UpdateFailedError(error_type())
-
- s = icalproperty_get_value_as_string(self._ref)
- assert(s == v)
-
- return icalproperty_get_value_as_string(self._ref)
-
- def parameters(self):
-
- d_string = icallangbind_property_eval_string(self._ref,":")
- dict = eval(d_string)
-
- desc_keys = ('name', 'value', 'value_type', 'pid', 'ref', 'deleted' )
-
- def foo(k,d=dict):
- if d.has_key(k): del d[k]
-
- map( foo, desc_keys)
-
- return filter(lambda p, s=self: s[p] != None, dict.keys())
-
-
- def as_ical_string(self):
-
- return icalproperty_as_ical_string(self._ref)
-
- def __getitem__(self,key):
- """ Return property values by name """
- key = upper(key)
-
- str = icalproperty_get_parameter_as_string(self._ref,key)
-
- if(str == 'NULL'): return None
-
- return str
-
- def __setitem__(self,key,value):
- """ Set Property Values by Name """
- key = upper(key)
-
- icalproperty_set_parameter_from_string(self._ref,key,value)
-
- return self.__getitem__(key)
-
- def __str__(self):
-
- str = self.as_ical_string()
- return regsub.gsub('\r?\n ?','',str)
-
- def __cmp__(self, other):
- s_str = str(self)
- o_str = str(other)
-
- return cmp(s_str,o_str)
-
-
-class Time(Property):
- """ Represent iCalendar DATE, TIME and DATE-TIME """
- def __init__(self, arg, name="DTSTART"):
- """
- Create a new Time from a string or number of seconds past the
- POSIX epoch
-
- Time("19970325T123000Z") Construct from an iCalendar string
- Time(8349873494) Construct from seconds past POSIX epoch
-
- """
- e1=icalerror_supress("MALFORMEDDATA")
- e2=icalerror_supress("BADARG")
-
- if isinstance(arg, DictType):
- # Dictionary -- used for creating from Component
- self.tt = icaltime_from_string(arg['value'])
- Property.__init__(self, ref=arg['ref'])
- else:
- if isinstance(arg, StringType):
- # Create from an iCal string
- self.tt = icaltime_from_string(arg)
- elif isinstance(arg, IntType) or \
- isinstance(arg, FloatType):
- # Create from seconds past the POSIX epoch
- self.tt = icaltime_from_timet(int(arg),0)
- elif isinstance(arg, Time):
- # Copy an instance
- self.tt = arg.tt
- else:
- self.tt = icaltime_null_time()
-
- Property.__init__(self,type=name)
-
- icalerror_restore("MALFORMEDDATA",e1)
- icalerror_restore("BADARG",e2)
-
- if icaltime_is_null_time(self.tt):
- raise Property.ConstructorFailedError("Failed to construct a Time")
-
- try:
- self._update_value()
- except Property.UpdateFailedError:
- raise Property.ConstructorFailedError("Failed to construct a Time")
-
- def _update_value(self):
- self.tt = icaltime_normalize(self.tt)
- self.value(icaltime_as_ical_string(self.tt),"DATE-TIME")
-
- def valid(self):
- " Return true if this is a valid time "
- return not icaltime_is_null_time(self.tt)
-
- def utc_seconds(self,v=None):
- """ Return or set time in seconds past POSIX epoch"""
- if (v!=None):
- self.tt = icaltime_from_timet(v,0)
- self._update_value()
-
- return icaltime_as_timet(self.tt)
-
- def is_utc(self,v=None):
- """ Return or set boolean indicating if time is in UTC """
- if(v != None):
- icaltimetype_is_utc_set(self.tt,v)
- self._update_value()
- return icaltimetype_is_utc_get(self.tt)
-
- def is_date(self,v=None):
- """ Return or set boolean indicating if time is actually a date """
- if(v != None):
- icaltimetype_is_date_set(self.tt,v)
- self._update_value()
- return icaltimetype_is_date_get(self.tt)
-
- def timezone(self,v=None):
- """ Return or set the timezone string for this time """
-
- if (v != None):
- assert(isinstance(v,StringType) )
- self['TZID'] = v
- return self['TZID']
-
- def second(self,v=None):
- """ Get or set the seconds component of this time """
- if(v != None):
- icaltimetype_second_set(self.tt,v)
- self._update_value()
- return icaltimetype_second_get(self.tt)
-
- def minute(self,v=None):
- """ Get or set the minute component of this time """
- if(v != None):
- icaltimetype_minute_set(self.tt,v)
- self._update_value()
- return icaltimetype_minute_get(self.tt)
-
- def hour(self,v=None):
- """ Get or set the hour component of this time """
- if(v != None):
- icaltimetype_hour_set(self.tt,v)
- self._update_value()
- return icaltimetype_hour_get(self.tt)
-
- def day(self,v=None):
- """ Get or set the month day component of this time """
- if(v != None):
- icaltimetype_day_set(self.tt,v)
- self._update_value()
- return icaltimetype_day_get(self.tt)
-
- def month(self,v=None):
- """ Get or set the month component of this time. January is month 1 """
- if(v != None):
- icaltimetype_month_set(self.tt,v)
- self._update_value()
- return icaltimetype_month_get(self.tt)
-
- def year(self,v=None):
- """ Get or set the year component of this time """
- if(v != None):
- icaltimetype_year_set(self.tt,v)
- self._update_value()
-
- return icaltimetype_year_get(self.tt)
-
-
-
- def __add__(self,o):
-
- other = Duration(o,"DURATION")
-
- if not other.valid():
- return Duration(0,"DURATION")
-
- seconds = self.utc_seconds() + other.seconds()
-
- new = Time(seconds,self.name())
- new.timezone(self.timezone())
- new.is_utc(self.is_utc())
-
- return new
-
- def __radd_(self,o):
- return self.__add__(o)
-
-
- def __sub__(self,o):
-
-
- if isinstance(o,Time):
- # Subtract a time from this time and return a duration
- seconds = self.utc_seconds() - other.utc_seconds()
- return Duration(seconds)
- elif isinstance(o,Duration):
- # Subtract a duration from this time and return a time
- other = Duration(o)
- if(not other.valid()):
- return Time()
-
- seconds = self.utc_seconds() - other.seconds()
- return Time(seconds)
- else:
- raise TypeError, "subtraction with Time reqires Time or Duration"
-
-class Duration(Property):
- """
- Represent a length of time, like 3 minutes, or 6 days, 20 seconds.
-
-
- """
-
- def __init__(self, arg, name="DURATION"):
- """
- Create a new duration from an RFC2445 string or number of seconds.
- Construct the duration from an iCalendar string or a number of seconds.
-
- Duration("P3DT2H34M45S") Construct from an iCalendar string
- Duration(3660) Construct from seconds
- """
-
- self.dur = None
-
- e=icalerror_supress("MALFORMEDDATA")
-
- if isinstance(arg, DictType):
-
- self.dur = icaldurationtype_from_string(arg['value'])
- Property.__init__(self,ref=arg['ref'])
- else:
- if isinstance(arg, StringType):
- self.dur = icaldurationtype_from_string(arg)
- elif isinstance(arg, IntType):
- self.dur = icaldurationtype_from_int(arg)
- elif isinstance(arg,Duration):
- self.dur = arg.dur
- else:
- self.dur = icaldurationtype_null_duration()
-
- Property.__init__(self,type=name)
-
- icalerror_restore("MALFORMEDDATA",e)
-
- if self.dur == None or icaldurationtype_is_null_duration(self.dur):
- raise Property.ConstructorFailedError("Failed to construct Duration from " +str(arg))
-
- try:
- self._update_value()
- except Property.UpdateFailedError:
- raise Property.ConstructorFailedError("Failed to construct Duration from " + str(arg))
-
- def _update_value(self):
-
- self.value(icaldurationtype_as_ical_string(self.dur),"DURATION")
-
- def valid(self):
- "Return true if this is a valid duration"
-
- return not icaldurationtype_is_null_duration(self.dur)
-
- def seconds(self,v=None):
- """Return or set duration in seconds"""
- if(v != None):
- self.dur = icaldurationtype_from_int(v);
- self.dict['value'] = icaltimedurationtype_as_ical_string(self.dur)
- return icaldurationtype_as_int(self.dur)
-
-
-class Period(Property):
- """Represent a span of time"""
- def __init__(self,arg,name='FREEBUSY'):
- """ """
-
- Property.__init__(self, type = name)
-
- self.pt=None
-
- #icalerror_clear_errno()
- e1=icalerror_supress("MALFORMEDDATA")
- e2=icalerror_supress("BADARG")
-
- if isinstance(arg, DictType):
-
-
- es=icalerror_supress("MALFORMEDDATA")
- self.pt = icalperiodtype_from_string(arg['value'])
- icalerror_restore("MALFORMEDDATA",es)
-
- Property.__init__(self, ref=arg['ref'])
- else:
- if isinstance(arg, StringType):
-
- self.pt = icalperiodtype_from_string(arg)
-
- else:
- self.pt = icalperiodtype_null_period()
-
- Property.__init__(self,type=name)
-
- icalerror_restore("MALFORMEDDATA",e1)
- icalerror_restore("BADARG",e2)
-
-
- if self.pt == None or icalperiodtype_is_null_period(self.pt):
- raise Property.ConstructorFailedError("Failed to construct Period")
-
-
- try:
- self._update_value()
- except Property.UpdateFailedError:
- raise Property.ConstructorFailedError("Failed to construct Period")
-
- def _end_is_duration(self):
- dur = icalperiodtype_duration_get(self.pt)
- if not icaldurationtype_is_null_duration(dur):
- return 1
- return 0
-
- def _end_is_time(self):
- end = icalperiodtype_end_get(self.pt)
- if not icaltime_is_null_time(end):
- return 1
- return 0
-
- def _update_value(self):
-
- self.value(icalperiodtype_as_ical_string(self.pt),"PERIOD")
-
-
- def valid(self):
- "Return true if this is a valid period"
-
- return not icalperiodtype_is_null_period(self.dur)
-
- def start(self,v=None):
- """
- Return or set start time of the period. The start time may be
- expressed as an RFC2445 format string or an instance of Time.
- The return value is an instance of Time
- """
-
- if(v != None):
- if isinstance(t,Time):
- t = v
- elif isinstance(t,StringType) or isinstance(t,IntType):
- t = Time(v,"DTSTART")
- else:
- raise TypeError
-
- icalperiodtype_start_set(self.pt,t.tt)
-
- self._update_value()
-
-
- return Time(icaltime_as_timet(icalperiodtype_start_get(self.pt)),
- "DTSTART")
-
- def end(self,v=None):
- """
- Return or set end time of the period. The end time may be
- expressed as an RFC2445 format string or an instance of Time.
- The return value is an instance of Time.
-
- If the Period has a duration set, but not an end time, this
- method will caluculate the end time from the duration. """
-
- if(v != None):
-
- if isinstance(t,Time):
- t = v
- elif isinstance(t,StringType) or isinstance(t,IntType):
- t = Time(v)
- else:
- raise TypeError
-
- if(self._end_is_duration()):
- start = icaltime_as_timet(icalperiodtype_start_get(self.pt))
- dur = t.utc_seconds()-start;
- icalperiodtype_duration_set(self.pt,
- icaldurationtype_from_int(dur))
- else:
- icalperiodtype_end_set(self.pt,t.tt)
-
- self._update_value()
-
- if(self._end_is_time()):
- rt = Time(icaltime_as_timet(icalperiodtype_end_get(self.pt)),
- 'DTEND')
- rt.timezone(self.timezone())
- return rt
- elif(self._end_is_duration()):
- start = icaltime_as_timet(icalperiodtype_start_get(self.pt))
- dur = icaldurationtype_as_int(icalperiodtype_duration_get(self.pt))
- rt = Time(start+dur,'DTEND')
- rt.timezone(self.timezone())
- return rt
- else:
- return Time({},'DTEND')
-
-
-
- def duration(self,v=None):
- """
- Return or set the duration of the period. The duration may be
- expressed as an RFC2445 format string or an instance of Duration.
- The return value is an instance of Duration.
-
- If the period has an end time set, but not a duration, this
- method will calculate the duration from the end time. """
-
- if(v != None):
-
- if isinstance(t,Duration):
- d = v
- elif isinstance(t,StringType) or isinstance(t,IntType):
- d = Duration(v)
- else:
- raise TypeError
-
- if(self._end_is_time()):
- start = icaltime_as_timet(icalperiodtype_start_get(self.pt))
- end = start + d.seconds()
-
- icalperiodtype_end_set(self.pt,icaltime_from_timet(end,0))
- else:
- icalperiodtype_duration_set(self.pt,d.dur)
-
- if(self._end_is_time()):
- start =icaltime_as_timet(icalperiodtype_start_get(self.pt))
- end = icaltime_as_timet(icalperiodtype_end_get(self.pt))
-
- print "End is time " + str(end-start)
-
- return Duration(end-start,"DURATION")
-
- elif(self._end_is_duration()):
- dur = icaldurationtype_as_int(
- icalperiodtype_duration_get(self.pt))
-
- return Duration(dur,"DURATION")
- else:
-
-
- return Duration(0,"DURATION")
-
-
- def timezone(self,v=None):
- """ Return or set the timezone string for this time """
- if (v != None):
- self['TZID'] = v
- return self['TZID']
-
-class Attendee(Property):
- """Class for Attendee properties.
-
- Usage:
- Attendee([dict])
- Attendee([address])
-
- Where:
- dict is an optional dictionary with keys of
- 'value': CAL-ADDRESS string and any parameter: parameter_value entries.
- 'name' and 'value_type' entries in dict are ignored and automatically set
- with the appropriate values.
- address is the CAL-ADDRESS (string) of the Attendee
- """
-
- def __init__(self, arg={}):
-
- assert(isinstance(arg,DictType))
-
- ref = None
-
- if arg!={}:
- ref = arg['ref']
-
- Property.__init__(self,type='ATTENDEE',ref=ref)
-
- def _doParam(self, parameter, v):
- if v!=None:
- self[parameter]=v
- return self[parameter]
-
- # Methods for accessing enumerated parameters
- def cn(self, v=None): self._doParam('CN', v)
- def cutype(self, v=None): self._doParam('CUTYPE', v)
- def dir(self, v=None): self._doParam('DIR', v)
- def delegated_from(self, v=None): self._doParam('DELEGATED-FROM', v)
- def delegated_to(self, v=None): self._doParam('DELEGATED-TO', v)
- def language(self, v=None): self._doParam('LANGUAGE', v)
- def member(self, v=None): self._doParam('MEMBER', v)
- def partstat(self, v=None): self._doParam('PARTSTAT', v)
- def role(self, v=None): self._doParam('ROLE', v)
- def rsvp(self, v=None): self._doParam('RSVP', v)
- def sent_by(self, v=None): self._doParam('SENT-BY', v)
-
-
-class Organizer(Property):
- """Class for Organizer property.
- """
-
- def __init__(self, arg={}):
-
- assert(isinstance(arg, DictType))
-
- ref = None
- if arg != {}:
- ref = arg['ref']
- Property.__init__(self, type='ORGANIZER', ref=ref)
-
-## param_t = ( 'CN', 'DIR', 'SENT-BY', 'LANGUAGE' )
-## for param in param_t:
-## self[param] = None
-## if value != None:
-## self.value(value)
-
-
- def _doParam(self, parameter, v):
- if v!=None:
- self[parameter]=v
- return self[parameter]
-
- def name(self):
- "Return the name of the property."
- return Property.name(self)
-
- def value_type(self):
- "Return the value type of the property."
- return self._desc['value_type']
-
- # Methods for accessing enumerated parameters
- def cn(self, v=None): self._doParam('CN', v)
- def dir(self, v=None): self._doParam('DIR', v)
- def language(self, v=None): self._doParam('LANGUAGE', v)
- def sent_by(self, v=None): self._doParam('SENT-BY', v)
-
-class Recurrence_Id(Time):
- """Class for RECURRENCE-ID property.
-
- Usage:
- Reccurence_Id(dict) # A normal property dictionary
- Reccurence_Id("19960401") # An iCalendar string
- Reccurence_Id(8349873494) # Seconds from epoch
-
- If the 'dict' constructor is used, 'name' and 'value_type'
- entries in dict are ignored and automatically set with the appropriate
- values.
- """
-
- def __init__(self, dict={}):
- Time.__init__(self, dict)
- Property.name(self, 'RECURRENCE-ID')
-
- def name(self):
- return Property.name(self)
-
- def _doParam(self, parameter, v):
- if v!=None:
- self[parameter]=v
- return self[parameter]
-
- # Enumerated parameters
- def value_parameter(self, v=None):
- """Sets or gets the VALUE parameter value.
-
- The value passed should be either "DATE-TIME" or "DATE". Setting this
- parameter has no impact on the property's value_type. Doing something
- like:
-
- rid=Recurrence_Id("19960401") # Sets value & makes value_type="DATE"
- rid.value_parameter("DATE-TIME") # Sets the parameter VALUE=DATE-TIME
-
- Would be allowed (even though it is wrong), so pay attention.
- Verifying the component will reveal the error.
- """
- if v!=None and v!="DATE" and v!="DATE-TIME":
- raise ValueError, "%s is an invalid VALUE parameter value" % str(v)
- self._doParam("VALUE", v)
-
- def tzid(self, v=None):
- "Sets or gets the TZID parameter value."
- self._doParam("TZID", v)
-
- def range_parameter(self, v=None): # 'range' is a builtin function
- "Sets or gets the RANGE parameter value."
- if v!=None and v!="THISANDPRIOR" and v!= "THISANDFUTURE":
- raise ValueError, "%s is an invalid RANGE parameter value" % str(v)
- self._doParam("RANGE", v)
-
-class Attach(Property):
- """A class representing an ATTACH property.
-
- Usage:
- Attach(uriString [, parameter_dict])
- Attach(fileObj [, parameter_dict])
- """
-
- def __init__(self, value=None, parameter_dict={}):
- Property.__init__(self, parameter_dict)
- Property.name(self, 'ATTACH')
- self.value(value)
-
- def value(self, v=None):
- "Returns or sets the value of the property."
- if v != None:
- if isinstance(v, StringType): # Is a URI
- self._desc['value']=v
- Property.value_type(self, 'URI')
- else:
- try:
- tempStr = v.read()
- except:
- raise TypeError,"%s must be a URL string or file-ish type"\
- % str(v)
- self._desc['value'] = base64.encodestring(tempStr)
- Property.value_type(self, 'BINARY')
- else:
- return self._desc['value']
-
- def name(self):
- "Returns the name of the property."
- return Property.name(self)
-
- def value_type(self):
- return Property.value_type(self)
-
- def fmttype(self, v=None):
- "Gets or sets the FMTYPE parameter."
- if v!= None:
- self['FMTTYPE']=v
- else:
- return self['FMTTYPE']
-
-class RecurrenceSet:
- """
- Represents a set of event occurrences. This
- class controls a component's RRULE, EXRULE, RDATE and EXDATE
- properties and can produce from them a set of occurrences.
- """
-
- def __init__(self):
- pass
-
- def include(self, **params):
- """
- Include a date or rule to the set.
-
- Use date= or pass in a
- Time instance to include a date. Included dates will add an
- RDATE property or will remove an EXDATE property of the same
- date.
-
- Use rule= or pass in a string to include a rule. Included
- rules with either add a RRULE property or remove an EXRULE
- property.
-
- """
- pass
-
- def exclude(self, **params):
- """
- Exclude date or rule to the set.
-
- Use date= or pass in a Time instance to exclude a
- date. Excluded dates will add an EXDATE property or will remove
- an RDATE property of the same date.
-
- Use rule= or pass in a string to exclude a rule. Excluded
- rules with either add an EXRULE property or remove an RRULE
- property.
-
- """
- pass
-
- def occurrences(self, count=None):
- """
- Return 'count' occurrences as a tuple of Time instances.
- """
- pass
-
-
diff --git a/libical/src/python/Store.py b/libical/src/python/Store.py
deleted file mode 100644
index 6d13bd5211..0000000000
--- a/libical/src/python/Store.py
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: Store.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-from LibicalWrap import *
-from Error import LibicalError
-from Component import Component
-
-class Store:
- """
- Base class for several component storage methods
- """
-
- class AddFailedError(LibicalError):
- "Failed to add a property to the file store"
-
- class ConstructorFailedError(LibicalError):
- "Failed to create a Store "
-
- def __init__(self):
- pass
-
- def path(self):
- pass
-
- def mark(self):
- pass
-
- def commit(self):
- pass
-
- def add_component(self, comp):
- pass
-
- def remove_component(self, comp):
- pass
-
- def count_components(self, kind):
- pass
-
- def select(self, gauge):
- pass
-
- def clearSelect(self):
- pass
-
- def fetch(self, uid):
- pass
-
- def fetchMatch(self, comp):
- pass
-
- def modify(self, oldc, newc):
- pass
-
- def current_component(self):
- pass
-
- def first_component(self):
- pass
-
- def next_component(self):
- pass
-
-
-class FileStore(Store):
-
- def __init__(self, file,mode="r",flags=0664):
-
- _flags = icallangbind_string_to_open_flag(mode)
-
-
- if _flags == -1:
- raise Store.ConstructorFailedError("Illegal value for mode: "+mode)
-
- e1=icalerror_supress("FILE")
- self._ref = icalfileset_new_open(file,_flags,flags)
- icalerror_restore("FILE",e1)
-
- print self._ref
-
- if self._ref == None or self._ref == 'NULL':
- raise Store.ConstructorFailedError(file)
-
- def __del__(self):
- icalfileset_free(self._ref)
-
- def path(self):
- return icalfileset_path(self._ref)
-
- def mark(self):
- icalfileset_mark(self._ref)
-
- def commit(self):
- icalfileset_commit(self._ref)
-
- def add_component(self, comp):
- if not isinstance(comp,Component):
- raise Store.AddFailedError("Argument is not a component")
-
- error = icalfileset_add_component(self._ref,comp)
-
- def remove_component(self, comp):
- if not isinstance(comp,Component):
- raise Store.AddFailedError("Argument is not a component")
-
- error = icalfileset_remove_component(self._ref,comp)
-
-
-
- def count_components(self, kind):
- pass
-
- def select(self, gauge):
- pass
-
- def clearSelect(self):
- pass
-
- def fetch(self, uid):
- pass
-
- def fetchMatch(self, comp):
- pass
-
- def modify(self, oldc, newc):
- pass
-
- def current_component(self):
- comp_ref = icalfileset_get_current_component(self._ref)
-
- if comp_ref == None:
- return None
-
- return Component(ref=comp_ref)
-
- def first_component(self):
- comp_ref = icalfileset_get_first_component(self._ref)
-
- if comp_ref == None:
- return None
-
- return Component(ref=comp_ref)
-
- def next_component(self):
-
- comp_ref = icalfileset_get_next_component(self._ref)
-
- if comp_ref == None:
- return None
-
- return Component(ref=comp_ref)
-
diff --git a/libical/src/python/python-binding.txt b/libical/src/python/python-binding.txt
deleted file mode 100644
index 7fc9e066bf..0000000000
--- a/libical/src/python/python-binding.txt
+++ /dev/null
@@ -1,434 +0,0 @@
-
-Classes for python binding to libical
-(Indentation indicates inheritance)
-
- Component
- Event
- JournalEntry
- Todo
- FreeBusy
- Timezone
- Alarm
- AudioAlarm
- EmailAlarm
- ProcedureAlarm
- DisplayAlarm
-
- Property
- Attendee
- Organizer
- Status
- Error
-
- Time
- Period
- Date
- RecurrenceSet
-
- Timezone
- TimezonePhase
-
- Store
- FileStore
- DirStore
- CAPStore
- HeapStore
- MySQLStore
-
-
-
-Component is the central class in the design. The component can be
-though of as a container for child components and properties, or as
-representation of a specific kind of iCal object. The first
-interface offers general property and component accessors, and the
-second treats some types of objects in a special way.
-
-The general interface offers simple manipulators for child property
-and components, and it only works with immediate children. So, given
-the Component:
-
- BEGIN:VCALENDAR
- METHOD:PUBLISH
- BEGIN:VEVENT
- BEGIN:VALARM
- COMMENT: An Alarm
- END:VALARM
- END:VEVENT
- END:VCALENDAR
-
-A caller would have to descend three levels to access the COMMENT
-property in the alarm, but only one to access the METHOD property.
-
-Libical is almost entirely dedicated to the general interface; it
-includes all of the *get_first_*, *_next_next_*, *_add_* and *_remove_*
-routines.
-
-The specific interface works with derived classes of Property and
-Component. In this interface, the caller could get the COMMENT in the
-alarm in the example in two steps. First the caller would ask the
-Event object for its alarms, then then the caller would ask the first
-Alarm object for its comment.
-
-The Specific interface is part of the
-derived classes of Component. This interface names all of the types of
-properties and components that can be accessed from the derived
-component type.
-
-In libical, the specific interface is primarily the "convenience
-routines in icalcomponent.h, such as:
-
-
- struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp);
- void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v);
-
- void icalcomponent_set_duration(icalcomponent* comp,
- struct icaldurationtype v);
- struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp);
-
-These routines are smarter and do more work than the general
-interface. From the general interface, you can set the DTEND
-property of a component by creating the property and adding it to a
-component. But, if the component already has a DURATION property, then
-this is an error -- a component can't have both.
-
-icalcomponent_set_dtend determines if the component already has a
-DURATION. If it does, it substracts the dtstart time from the new
-dtend time and sets the duration to that. Otherwise, it creates aor
-changes the DTEND.
-
-Also, icalcomponent_set_duration works the same regardless if the
-component is a VCALENDAR or a VEVENT. If it is a VCALENDAR, the
-routine descends into the VEVENT before making any changes. If it is
-allready a VEVENT ( or VTODO or VJOURNAL ) the routine just makes the
-changes. With icalcomponent_add_property, you need to do this check
-yourself.
-
-( There should probably be a class between Component
-and Event ,JournalEntry and Todo that names all of the properties and
-components. Then Event, JournalEntry and Todo would remove the
-accessors that did not apply to them. )
-
-Parameters are accessed as dictionaries from Property or as attributes
-of a derived class of Property. Both the names and the values of the
-parameters are strings.
-
-The Store hierarchy is a interface to various ways to store iCal
-components. Each of these has the same interface as its corresponding
-libical module:
-
- FileStore icalfileset Store iCal components in a single file
- DirStore icaldirset Use multiple files, one per month of
- DTSTART
- CAPStore Access components in a CAP server
- HeapStore Components stored in memory
- MySQLStore Components stored in a MySQL
- database.
-
-The only iCal value objects that will be implemented as Python classes
-are Time, Duration and Period. RecurrenceSet handles recurrence
-rules. It replaces the properties RRULE, RDATE, EXRULE and EXDATE.
-
-(Not all of the libical modules are implemented )
-
-
-How to Use the library
-----------------------
-
-The most common usecases will be something like this:
-
-1)Caller opens a Store object on a file, server or database. The
-caller retrieves one or more component. Some of the components will be
-booked on the user's calendar. Other components will be messages that
-other users have sent, like requests for meetings.
-
-2) The caller will use the Specific interface ( using methods specific
-to each property ) to example the component and decide what to do with
-it.
-
-3) Rarely, the caller will access the general interface to do things
-that the specific interface has not implemented or cannot manage
-well.
-
-4) Cller may create a new component, using a combination of the
-general and specific interfaces. The caller may send the message to
-another user via mail, or may submit it to the user's CAP server with
-the CAPStore class.
-
-
-Following are the methods in each of the classes.
-
-Component
- Construct from string
- output string in ical form
-
- Get a Property by type
- Get a set of Properties by type
- Remove a Property by reference
-
- Get a Component by type
- Get a set of Components by type
- Remove a Component by reference
-
- Validate the component ( insert properties for errors )
- Count error properties
- Remove error properties
- Convert error properties into REQUEST-STATUS properties
-
-Event, JournalEntry, Todo
-
- Construct from string
- output string in ical form
-
- There are get/set accessors for every property. These are
- listed in a later section
-
-
-FreeBusy
-
- Construct from string
- Construct from arguments
- output string in ical form
-
- Accessors for the following properties. See below for return
- types for these properties:
-
- method
- prodid
- attendee
- dtstamp
- dtstart
- freebusy
- organizer
- uid
- comment
- contact
- request-status
- url
- duration
- sequence
-
-TimezonePhase
-
- Construct from string
- Construct from arguments
- output string in ical form
-
- Accessors for the following properties. See below for return
- types for these properties:
-
- tzname
- offsetto
- offsetfrom
- rrule
- rdate
- comment
-
-TimeZone
-
- Construct from string
- Construct from arguments
- output string in ical form
-
- Accessors for the following properties. See below for return
- types for these properties:
-
- tzid
- last-modified
- tzurl
- standard (returns TimezonePhase)
- daylight (returns TimezonePhase)
-
-
-Property
-
- Construct from string
- Construct from arguments
- output string in ical form
-
- Dictionary access to parameters
-
- Get/set value
-
-Attendee
-
- Construct from string
- Construct from arguments
- output string in ical form
-
- Access to the following properties and parameters:
- cuid
- cutype
- member
- role
- rsvp
- delto
- delfrom
- sentby
- cn
- dir
- language
-
-Organizer
-
- Access to the following properties:
- common_name
- dir
- sentby
- language
-
-
-Time
-Date
-Period
-
- Same interfaces as libical modules.
-
-RecurenceSet
- I don't know -- need to think about it more.
-
-Store
- Similar methods to the icalset modules.
-
-
-RFC2445 Properties
-
-This is a list of all of the RFC2445 properties and their associated
-VALUE type.
-
-
-Property Value
-----------------------------
-CALSCALE TEXT
-METHOD TEXT
-PRODID TEXT
-VERSION TEXT
-CATEGORIES TEXT
-CLASS TEXT
-COMMENT TEXT
-DESCRIPTION TEXT
-LOCATION TEXT
-PERCENT-COMPLETE INTEGER
-PRIORITY INTEGER
-RESOURCES TEXT
-STATUS STATUS
-SUMMARY TEXT
-COMPLETED DATE-TIME
-FREEBUSY PERIOD
-TRANSP TEXT
-TZNAME TEXT
-TZOFFSETFROM UTC-OFFSET
-TZOFFSETTO UTC-OFFSET
-TZURL URI
-TZID TEXT
-ATTENDEE CAL-ADDRESS
-CONTACT TEXT
-ORGANIZER CAL-ADDRESS
-RELATED-TO TEXT
-URL URI
-UID TEXT
-EXRULE RECUR
-RRULE RECUR
-ACTION TEXT
-REPEAT INTEGER
-CREATED DATE-TIME
-DTSTAMP DATE-TIME
-LAST-MODIFIED DATE-TIME
-SEQUENCE INTEGER
-X TEXT
-REQUEST-STATUS STRING
-ATTACH URL, BINARY
-GEO FLOAT
-DTEND DATE-TIME
-DUE DATE-TIME
-DTSTART DATE-TIME
-RECURRENCE-ID DATE-TIME
-EXDATE DATE-TIME
-RDATE DATE-TIME, PERIOD
-TRIGGER DATE-TIME, DURATION
-DURATION DURATION
-
-Some of the properties can appear multiple times in a component, other
-can appear only once. For a particular component, the number of times
-a property can apper may also change with the METHOD property
-associated with the component. This list shows which properties can
-appear multiple times for some ( but not all ) combinations of
-component type and METHOD value:
-
-ATTACH
-ATTENDEE
-CATEGORIES
-COMMENT
-CONTACT
-EXDATE
-EXRULE
-FREEBUSY
-NONE
-RDATE
-RELATEDTO
-REQUESTSTATUS
-RESOURCES
-RRULE
-TZNAME
-TZURL
-X
-
-
-This is a list of the value types and their associated python return
-types. A lowercased return type is a python builtin, and an
-uppercase-first-letter is a class in the library:
-
-
-Value Return Type
------------------------------------
-BINARY file
-BOOLEAN number
-CAL-ADDRESS string
-DATE Time
-DATE-TIME Time
-DURATION Duration
-FLOAT number
-GEO tuple
-INTEGER number
-METHOD string
-PERIOD Period
-RECUR RecurrenceSet
-TEXT string
-TIME Time
-URI string
-UTC-OFFSET number
-STATUS string
-X string
-
-
-I suspect that the Component class should use the three previous
-tables to create the property accessor methods on the fly. If the
-method generation system is general enough, we could also use it for
-other classes, such as Alarm, Timezone, Attendee, Organizer and
-Freebusy.
-
-
-Memory Handling
----------------
-
-One of the things that made the perl binding to libcal difficult was
-that if a Component (in perl) returns a reference to a child Component
-(in perl), the child Component (in perl) will contain a reference to a
-libical component. When the caller is done with the child component in
-perl, the caller just drops it and lets perl reclaim the memory.
-
-The destructor for Component needs to free the libical component that
-it holds a reference to, but the child's libical component is still
-being used by libical. So perl frees the libical component and later,
-libical tries to reference freed memory.
-
-The situation is actually a little better than that, because libical
-will throw an error when you try to free a component that is still
-attached to a parent.
-
-So, the perl library has to be able to determine when the destructor
-should free a libical component or not. The perl library calls
-icalcomponent_get_parent(), and if is it non-zero, it does not free
-the component.
-
-It is not hard, just more code, and something to watch out for.
-
diff --git a/libical/src/python/test.py b/libical/src/python/test.py
deleted file mode 100644
index 1fdf515408..0000000000
--- a/libical/src/python/test.py
+++ /dev/null
@@ -1,373 +0,0 @@
-#!/usr/bin/env python
-# -*- Mode: python -*-
-#======================================================================
-# FILE: test.py
-# CREATOR: eric
-#
-# DESCRIPTION:
-#
-#
-# $Id$
-# $Locker$
-#
-# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org>
-# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#======================================================================
-
-from Libical import *
-
-def error_type():
- error = icalerror_perror()
- return error[:index(error,':')]
-
-comp_str = """
-BEGIN:VEVENT
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com
-COMMENT: When in the course of writting comments and nonsense text\, it
- becomes necessary to insert a newline
-DTSTART:19972512T120000
-DTSTART:19970101T120000Z
-DTSTART:19970101
-DURATION:P3DT4H25M
-FREEBUSY:19970101T120000/19970101T120000
-FREEBUSY:19970101T120000/PT3H
-FREEBUSY:19970101T120000/PT3H
-END:VEVENT"""
-
-
-def test_property():
-
- print "--------------------------- Test Property ----------------------"
-
- liw = LibicalWrap
- icalprop = liw.icalproperty_new_from_string("ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com")
-
- print liw.icalproperty_as_ical_string(icalprop)
-
- p = Property(ref=icalprop)
-
- print p.name()
- print p.parameters()
- print p['ROLE']
-
- p['ROLE'] = 'INDIVIDUAL'
-
- print p['ROLE']
-
- print p.value()
- p.value("mailto:Bob@bob.com")
- print p.value()
-
-
- print p.as_ical_string()
-
- try:
- p = Property()
- except Property.ConstructorFailedError:
- pass
- else:
- assert(0)
-
-def test_time():
- "Test routine"
-
- print"-------------------Test Time --------------------------------"
-
- t = Time("19970325T123010Z",'DTSTART')
-
- assert(t.year() == 1997)
- assert(t.month() == 3)
- assert(t.day() == 25)
- assert(t.hour() == 12)
- assert(t.minute() == 30)
- assert(t.second() == 10)
- assert(t.is_utc())
- assert(not t.is_date())
-
- print t
-
- t.timezone("America/Los_Angeles")
- print str(t)
- assert(str(t)=='DTSTART;TZID=America/Los_Angeles:19970325T123010Z')
-
- t.second(t.second()+80)
-
- print t
-
- assert(t.minute() == 31)
- assert(t.second() == 30)
-
- d = Duration(3600,"DURATION")
- t2 = t + d
-
- print t2
- assert(t2.hour() == 13)
-
- t2 = t - d
-
- print t2
- assert(isinstance(t2,Time))
- assert(t2.hour() == 11)
-
-
-def test_period():
-
- print"-------------------Test Period--------------------------------"
-
- p = Period("19970101T180000Z/19970101T233000Z")
-
- print p
-
-
- assert(str(p) == 'FREEBUSY:19970101T180000Z/19970101T233000Z')
-
- print p.start()
- assert(str(p.start()) == 'DTSTART:19970101T180000Z')
-
- print p.end()
- assert(str(p.end()) == 'DTEND:19970101T233000Z')
-
- print p.duration()
- assert(str(p.duration()) == 'DURATION:PT5H30M')
- p = None
-
- p = Period("19970101T180000Z/PT5H30M")
- print p
-
- print p.start()
- assert(str(p.start()) == 'DTSTART:19970101T180000Z')
-
- print p.end()
- assert(str(p.end()) == 'DTEND:19970101T233000Z')
-
- print p.duration()
- assert(str(p.duration()) == 'DURATION:PT5H30M')
-
-
-def test_duration():
-
- print "-------------- Test Duration ----------------"
-
- # Ical string
-
- d = Duration("P3DT4H25M")
-
- print str(d)
-
- assert(str(d) == "DURATION:P3DT4H25M")
-
- print d.seconds()
-
- assert(d.seconds() == 275100)
-
- # seconds
-
- d = Duration(-275100)
-
- print str(d)
-
- assert(str(d) == "DURATION:-P3DT4H25M")
-
- print d.seconds()
-
- assert(d.seconds() == -275100)
-
- #error
-
- try:
- d = Duration("P10WT7M")
- print str(d)
- assert(0)
- except: pass
-
- try:
- d = Duration("Pgiberish")
- print str(d)
- assert(0)
- except:
- pass
-
-
-
-def test_attach():
-
- file = open('littlefile.txt')
- attachProp = Attach(file)
- file.close()
- attachProp.fmttype('text/ascii')
- print "\n" + attachProp.name()
- print attachProp.value_type()
- print attachProp.fmttype()
- attachProp['fmttype']=None
- print "Calling value()"
- print attachProp.value()
- print "Calling asIcalString()"
- print attachProp.as_ical_string()
-
-
-def test_component():
-
- print "------------------- Test Component ----------------------"
-
-
- c = Component(comp_str);
-
- props = c.properties()
-
- for p in props:
- print p.as_ical_string()
-
- dtstart = c.properties('DTSTART')[0]
-
- print dtstart
-
- print "\n Orig hour: ", dtstart.hour()
- assert(dtstart.hour() == 12)
-
- dtstart.hour(dtstart.hour() + 5)
-
- print "\n New hour: ", dtstart.hour()
- assert(dtstart.hour() == 17)
-
- attendee = c.properties('ATTENDEE')[0]
-
- print attendee
-
- t = Time("20011111T123030")
- t.name('DTEND')
-
- c.add_property(t)
-
-
- print c
-
- dtstart1 = c.properties('DTSTART')[0]
- dtstart2 = c.properties('DTSTART')[0]
- dtstart3 = c.property('DTSTART')
-
- assert(dtstart1 is dtstart2)
- assert(dtstart1 == dtstart2)
-
- assert(dtstart1 is dtstart3)
- assert(dtstart1 == dtstart3)
-
-
- p = Property(type="SUMMARY");
- p.value("This is a summary")
-
- c.properties().append(p)
-
- print c.as_ical_string()
-
- p = c.properties("SUMMARY")[0]
- assert(p!=None);
- print str(p)
- assert(str(p) == "SUMMARY:This is a summary")
-
- c.properties()[:] = [p]
-
- print c.as_ical_string()
-
-
-def test_event():
- print "------------ Event Class ----------------------"
- event = Event()
- event.created("20010313T123000Z")
- #print "created =", event.created()
- assert (event.created() == "20010313T123000Z")
-
- event.organizer("MAILTO:j_doe@nowhere.com")
- org = event.properties('ORGANIZER')[0]
- #print org.cn()
- org.cn('Jane Doe')
- assert (isinstance(org, Organizer))
- #print "organizer =", event.organizer()
- assert (event.organizer() == "MAILTO:j_doe@nowhere.com")
-
- event.dtstart("20010401T183000Z")
- #print "dtstart =", event.dtstart()
- assert (event.dtstart()=="20010401T183000Z")
-
- dtend = Time('20010401T190000Z', 'DTEND')
- event.dtend(dtend)
- assert (event.dtend()==dtend.value())
- assert (event.dtend() == '20010401T190000Z')
-
- att = Attendee()
- att.value('jsmith@nothere.com')
- event.attendees(('ef_hutton@listenup.com', att))
-
- event.description("A short description. Longer ones break things.")
- event.status('TeNtAtIvE')
-
- print event.as_ical_string()
-
-
-def test_derivedprop():
-
- print "------------ Derived Properties -----------------"
-
- p = RDate("20011111T123030")
-
- print str(p)
-
-
- p = RDate("19970101T120000/19970101T123000")
-
- print str(p)
-
- try:
- p = RDate("P3DT4H25M")
- print str(p)
- assert(0)
- except: pass
-
-
- p = Trigger("P3DT4H25M")
-
- print str(p)
-
- p = Trigger("20011111T123030")
-
- print str(p)
-
- try:
- p = Trigger("19970101T120000/19970101T123000")
- print str(p)
- assert(0)
- except: pass
-
-
-def run_tests():
- test_property()
-
- test_time()
-
- test_period()
-
- test_component()
-
- test_duration()
-
- test_derivedprop()
-
- test_event()
-
- #test_attach()
-
-
-
-if __name__ == "__main__":
- run_tests()
-
diff --git a/libical/src/test/.cvsignore b/libical/src/test/.cvsignore
deleted file mode 100644
index ed72bfe59f..0000000000
--- a/libical/src/test/.cvsignore
+++ /dev/null
@@ -1,18 +0,0 @@
-*.la
-*.lo
-.libs
-Makefile
-Makefile.in
-.deps
-.libs
-copycluster
-regression
-parser
-findobj
-storage
-stow
-recur
-testmime
-testvcal
-
-
diff --git a/libical/src/test/Makefile.am b/libical/src/test/Makefile.am
deleted file mode 100644
index d4fa33c040..0000000000
--- a/libical/src/test/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-
-noinst_PROGRAMS = copycluster regression parser storage stow recur testmime testvcal process testclassify
-
-LDADD = ../libicalss/.libs/libicalss.a ../libicalvcal/.libs/libicalvcal.a ../libical/.libs/libical.a
-
-INCLUDES = \
- -I. \
- -I../libicalvcal \
- -I$(srcdir)/../libicalvcal \
- -I$(srcdir) \
- -I../libical \
- -I$(srcdir)/../libical \
- -I../libicalss \
- -I$(srcdir)/../libicalss
-
-copycluster_SOURCES = copycluster.c
-regression_SOURCES = regression.c
-parser_SOURCES = icaltestparser.c
-storage_SOURCES = storage.c
-stow_SOURCES = stow.c
-testvcal_SOURCES = testvcal.c
-recur_SOURCES = recur.c
-testmime_SOURCES = testmime.c
-process_SOURCES = process.c
-testclassify_SOURCES = testclassify.c
diff --git a/libical/src/test/copycluster.c b/libical/src/test/copycluster.c
deleted file mode 100644
index 4eefc37758..0000000000
--- a/libical/src/test/copycluster.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: copycluster.c
- CREATOR: eric 15 January 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#include <stdio.h> /* for printf */
-#include "ical.h"
-#include "icalss.h"
-#include "icalfileset.h"
-#include <errno.h>
-#include <string.h> /* For strerror */
-#include <signal.h> /* for signal */
-#include <unistd.h> /* for alarm */
-#include "icalrestriction.h"
-
-static void sig_alrm(int i){
- fprintf(stderr,"Could not get lock on file\n");
- exit(1);
-}
-/* This program copies a file that holds iCal components to an other file. */
-
-
-void usage(char* arg0) {
- printf("usage: %s cluster-file1 cluster-file2\n",arg0);
-}
-
-int main(int c, char *argv[]){
-
- icalfileset *clusterin, *clusterout;
- icalcomponent *itr;
- int count=0;
- int tostdout = 0;
-
- if(c < 2 || c > 3){
- usage(argv[0]);
- exit(1);
- }
-
- if (c == 2){
- tostdout = 1;
- }
-
-
- icalerror_set_error_state(ICAL_PARSE_ERROR, ICAL_ERROR_NONFATAL);
-
-
- signal(SIGALRM,sig_alrm);
-
- alarm(0);
- clusterin = icalfileset_new(argv[1]);
- alarm(0);
-
- if (clusterin == 0){
- printf("Could not open input cluster \"%s\"",argv[1]);
-
- exit(1);
- }
-
- if (!tostdout){
- clusterout = icalfileset_new(argv[2]);
- if (clusterout == 0){
- printf("Could not open output cluster \"%s\"\n",argv[2]);
- exit(1);
- }
- }
-
-
- for (itr = icalset_get_first_component(clusterin);
- itr != 0;
- itr = icalset_get_next_component(clusterin)){
-
- icalerror_set_error_state(ICAL_BADARG_ERROR, ICAL_ERROR_NONFATAL);
- icalrestriction_check(itr);
- icalerror_set_error_state(ICAL_BADARG_ERROR, ICAL_ERROR_DEFAULT);
-
- if (itr != 0){
-
- if(tostdout){
-
- printf("--------------\n%s\n",icalcomponent_as_ical_string(itr));
-
- } else {
-
- icalfileset_add_component(clusterout,
- icalcomponent_new_clone(itr));
- }
-
- count++;
-
- } else {
- printf("Got NULL component");
- }
- }
-
-
- printf("Transfered %d components\n",count);
-
- icalfileset_free(clusterin);
-
- if (!tostdout){
- icalfileset_mark(clusterout);
- icalfileset_free(clusterout);
- }
-
- return 0;
-}
-
-
diff --git a/libical/src/test/findobj.c b/libical/src/test/findobj.c
deleted file mode 100644
index c31101c33d..0000000000
--- a/libical/src/test/findobj.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: findobj.c
- CREATOR: eric 11 February 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#include <stdio.h> /* for printf */
-#include "ical.h"
-#include "icalcalendar.h"
-#include "icaldirset.h"
-#include <errno.h>
-#include <string.h> /* For strerror */
-#include "icalrestriction.h"
-
-/* This program finds an object stored in a calendar */
-
-void usage(char* arg0) {
- printf("usage: %s calendar-dir uid\n",arg0);
-}
-
-int main(int c, char *argv[]){
-
- icalcalendar *cal;
- icaldirset *booked;
- icalcomponent *itr;
-
- if(c < 2 || c > 3){
- usage(argv[0]);
- exit(1);
- }
-
- cal = icalcalendar_new(argv[1]);
-
- if(cal == 0){
- fprintf(stderr,"%s: error in opening calendar \"%s\": %s. errno is \"%s\"\n",
- argv[0],argv[1],icalerror_strerror(icalerrno),
- strerror(errno));
- }
-
- booked = icalcalendar_get_booked(cal);
-
- itr = icaldirset_fetch(booked,argv[2]);
-
-
- if(itr != 0){
- printf("%s",icalcomponent_as_ical_string(itr));
- }
-
- return 0;
-}
-
diff --git a/libical/src/test/icaltestparser.c b/libical/src/test/icaltestparser.c
deleted file mode 100644
index e5973e0d4a..0000000000
--- a/libical/src/test/icaltestparser.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: icaltestparser.c
- CREATOR: eric 20 June 1999
-
- $Id$
- $Locker$
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
- The original code is icaltestparser.c
-
-
- (C) COPYRIGHT 1999 The Software Studio.
- http://www.softwarestudio.org
-
- ======================================================================*/
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include "ical.h"
-
-#include <stdlib.h>
-
-char str[] = "BEGIN:VCALENDAR\
-PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\
-VERSION:2.0\
-BEGIN:VTIMEZONE\
-TZID:US-Eastern\
-BEGIN:STANDARD\
-DTSTART:19990404T020000\
-RDATE:19990u404xT020000\
-TZOFFSETFROM:-0500\
-TZOFFSETTO:-0400\
-END:STANDARD\
-BEGIN:DAYLIGHT\
-DTSTART:19990404T020000\
-RDATE:19990404T020000\
-TZOFFSETFROM:-0500\
-TZOFFSETTO:-0400\
-TZNAME:EDT\
-Dkjhgri:derhvnv;\
-BEGIN:dfkjh\
-END:dfdfkjh\
-END:DAYLIGHT\
-END:VTIMEZONE\
-BEGIN:VEVENT\
-GEO:Bongo\
-DTSTAMP:19980309T231000Z\
-UID:guid-1.host1.com\
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP\
- :MAILTO:employee-A@host.com\
-DESCRIPTION:Project XYZ Review Meeting\
-CATEGORIES:MEETING\
-CLASS:PUBLIC\
-CREATED:19980309T130000Z\
-SUMMARY:XYZ Project Review\
-DTSTART;TZID=US-Eastern:19980312T083000\
-DTEND;TZID=US-Eastern:19980312T093000\
-LOCATION:1CP Conference Room 4350\
-END:VEVENT\
-END:VCALENDAR\
-";
-
-extern int yydebug;
-
-/* Have the parser fetch data from stdin */
-
-char* read_stream(char *s, size_t size, void *d)
-{
- char *c = fgets(s,size, (FILE*)d);
-
- return c;
-
-}
-
-
-
-int main(int argc, char* argv[])
-{
-
- char* line;
- FILE* stream;
- icalcomponent *c;
- icalparser *parser = icalparser_new();
-
- stream = fopen(argv[1],"r");
-
- assert(stream != 0);
-
- icalparser_set_gen_data(parser,stream);
-
- do{
-
- line = icalparser_get_line(parser,read_stream);
-
- c = icalparser_add_line(parser,line);
-
-
- if (c != 0){
- /*icalcomponent_convert_errors(c);*/
- printf("%s",icalcomponent_as_ical_string(c));
- printf("\n---------------\n");
- icalcomponent_free(c);
- }
-
- } while ( line != 0);
-
- return 0;
- }
diff --git a/libical/src/test/process.c b/libical/src/test/process.c
deleted file mode 100644
index 56f1c65fb1..0000000000
--- a/libical/src/test/process.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: process.c
- CREATOR: eric 11 February 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- ======================================================================*/
-
-#include <stdio.h> /* for printf */
-#include "ical.h"
-#include "icalss.h"
-#include <errno.h>
-#include <string.h> /* For strerror */
-#include <stdlib.h> /* for free */
-
-struct class_map {
- ical_class class;
- char *str;
-} class_map[] = {
- {ICAL_NO_CLASS,"No class"},
- {ICAL_PUBLISH_NEW_CLASS,"New Publish"},
- {ICAL_PUBLISH_UPDATE_CLASS,"New Publish"},
- {ICAL_REQUEST_NEW_CLASS,"New request"},
- {ICAL_REQUEST_UPDATE_CLASS,"Update"},
- {ICAL_REQUEST_RESCHEDULE_CLASS,"Reschedule"},
- {ICAL_REQUEST_DELEGATE_CLASS,"Delegate"},
- {ICAL_REQUEST_NEW_ORGANIZER_CLASS,"New Organizer"},
- {ICAL_REQUEST_FORWARD_CLASS,"Forward"},
- {ICAL_REQUEST_STATUS_CLASS,"Status request"},
- {ICAL_REPLY_ACCEPT_CLASS,"Accept reply"},
- {ICAL_REPLY_DECLINE_CLASS,"Decline reply"},
- {ICAL_REPLY_CRASHER_ACCEPT_CLASS,"Crasher's accept reply"},
- {ICAL_REPLY_CRASHER_DECLINE_CLASS,"Crasher's decline reply"},
- {ICAL_ADD_INSTANCE_CLASS,"Add instance"},
- {ICAL_CANCEL_EVENT_CLASS,"Cancel event"},
- {ICAL_CANCEL_INSTANCE_CLASS,"Cancel instance"},
- {ICAL_CANCEL_ALL_CLASS,"Cancel all instances"},
- {ICAL_REFRESH_CLASS,"Refresh"},
- {ICAL_COUNTER_CLASS,"Counter"},
- {ICAL_DECLINECOUNTER_CLASS,"Decline counter"},
- {ICAL_MALFORMED_CLASS,"Malformed"},
- {ICAL_OBSOLETE_CLASS,"Obsolete"},
- {ICAL_MISSEQUENCED_CLASS,"Missequenced"},
- {ICAL_UNKNOWN_CLASS,"Unknown"}
-};
-
-char* find_class_string(ical_class class)
-{
- int i;
-
- for (i = 0;class_map[i].class != ICAL_UNKNOWN_CLASS;i++){
- if (class_map[i].class == class){
- return class_map[i].str;
- }
- }
-
- return "Unknown";
-}
-
-void send_message(icalcomponent *reply,const char* this_user)
-{
- printf("From: %s\n\n%s\n",this_user,icalcomponent_as_ical_string(reply));
-
-
-}
-
-
-int main(int argc, char* argv[])
-{
- icalcomponent *c, *next_c;
- int i=0;
- char *class_string;
- int dont_remove;
-
- icalset* f = icalset_new_file("../../test-data/process-incoming.ics");
- icalset* trash = icalset_new_file("trash.ics");
- icalset* cal = icalset_new_file("../../test-data/process-calendar.ics");
- icalset* out = icalset_new_file("outgoing.ics");
-
- const char* this_user = "alice@cal.softwarestudio.org";
-
- assert(f!= 0);
- assert(cal!=0);
- assert(trash!=0);
- assert(out!=0);
-
-
- /* Foreach incoming message */
- for(c=icalset_get_first_component(f);c!=0;c = next_c){
-
- ical_class class;
- icalcomponent *match;
- icalcomponent *inner;
- icalcomponent *reply = 0;
-
- assert(c!=0);
-
- inner = icalcomponent_get_first_real_component(c);
-
- i++;
- reply = 0;
- dont_remove = 0;
-
- if(inner == 0){
- printf("Bad component, no inner\n %s\n",
- icalcomponent_as_ical_string(c));
- continue;
- }
-
- /* Find a booked component that is matched to the incoming
- message, based on the incoming component's UID, SEQUENCE
- and RECURRENCE-ID*/
-
- match = icalset_fetch_match(cal,c);
-
- class = icalclassify(c,match,this_user);
-
- class_string = find_class_string(class);
-
- /* Print out the notes associated with the incoming component
- and the matched component in the */
- {
- const char *c_note=0;
- const char *m_note=0;
- icalproperty *p;
-
- for(p = icalcomponent_get_first_property(c,ICAL_X_PROPERTY);
- p!= 0;
- p = icalcomponent_get_next_property(c,ICAL_X_PROPERTY)){
-
- if(strcmp(icalproperty_get_x_name(p),"X-LIC-NOTE")==0){
- c_note = icalproperty_get_x(p);
- }
- }
-
- if (match != 0){
- for(p = icalcomponent_get_first_property(match,
- ICAL_X_PROPERTY);
- p!= 0;
- p = icalcomponent_get_next_property(match,
- ICAL_X_PROPERTY)){
- if(strcmp(icalproperty_get_x_name(p),"X-LIC-NOTE")==0){
- m_note = icalproperty_get_x(p);
- }
- }
- }
-
- if(c_note != 0){
- printf("Incoming: %s\n",c_note);
- }
- if(m_note != 0){
- printf("Match : %s\n",m_note);
- }
- }
-
- /* Main processing structure */
-
- switch (class){
- case ICAL_NO_CLASS: {
- char temp[1024];
- /* Huh? Return an error to sender */
- icalrestriction_check(c);
- icalcomponent_convert_errors(c);
-
- snprintf(temp,1024,"I can't understand the component you sent. \n Here is the component you sent, possibly with error messages:\n %s",icalcomponent_as_ical_string(c));
-
- reply = icalmessage_new_error_reply(
- c,
- this_user,
- temp,
- "",
- ICAL_UNKNOWN_STATUS
- );
-
-
-
- break;
- }
- case ICAL_PUBLISH_NEW_CLASS: {
-
- /* Don't accept published events from anyone but
- self. If self, fall through to ICAL_REQUEST_NEW_CLASS */
-
-
-
- }
- case ICAL_REQUEST_NEW_CLASS: {
-
- /* Book the new component if it does not overlap
- anything. If the time is busy and the start time is
- an even modulo 4, delegate to
- bob@cal.softwarestudio.org. If the time is busy and
- is 1 modulo 4, counterpropose for the first
- available free time. Otherwise, deline the meeting */
-
- icalcomponent *overlaps;
- overlaps = icalclassify_find_overlaps(cal,c);
-
- if(overlaps == 0){
- /* No overlaps, book the meeting */
-/* icalset_add_component(cal,icalcomponent_new_clone(c));*/
-
- /* Return a reply */
- reply = icalmessage_new_accept_reply(c,this_user,
- "I can make it to this meeting");
-
- icalset_add_component(out,reply);
-
- } else {
- /* There was a conflict, so delegate, counterpropose
- or decline it */
- struct icaltimetype dtstart
- = icalcomponent_get_dtstart(c);
-
- if(dtstart.hour%4 == 0){
- /* Delegate the meeting */
- reply = icalmessage_new_delegate_reply(c,
- this_user,
- "bob@cal.softwarestudio.org",
- "Unfortunately, I have another commitment that \
-conflicts with this meeting. I am delegating my attendance to Bob. ");
-
- icalset_add_component(out,reply);
-
- } else if (dtstart.hour%4 == 1) {
- /* Counter propose to next available time */
- icalcomponent *newc;
- struct icalperiodtype next_time;
-
- icalspanlist *spanl =
- icalspanlist_new(cal,dtstart,
- icaltime_null_time());
-
- next_time = icalspanlist_next_free_time(
- spanl,icalcomponent_get_dtstart(c));
-
- newc = icalcomponent_new_clone(c);
-
- icalcomponent_set_dtstart(newc,next_time.start);
-
-
- /* Hack, the duration of the counterproposed
- meeting may be longer than the free time
- available */
- icalcomponent_set_duration(newc,
- icalcomponent_get_duration(c));
-
- reply = icalmessage_new_counterpropose_reply(c,
- newc,
- this_user,
- "Unfortunately, I have another commitment that \
-conflicts with this meeting. I am proposing a time that works better for me.");
-
- icalset_add_component(out,reply);
-
- } else {
- /* Decline the meeting */
-
- reply = icalmessage_new_decline_reply(c,
- this_user,
- "I can't make it to this meeting");
-
- icalset_add_component(out,reply);
-
- }
-
-
- }
- break;
- }
- case ICAL_PUBLISH_FREEBUSY_CLASS: {
- /* Store the busy time information in a file named after
- the sender */
- break;
- }
-
- case ICAL_PUBLISH_UPDATE_CLASS: {
- /* Only accept publish updates from self. If self, fall
- throught to ICAL_REQUEST_UPDATE_CLASS */
- }
-
- case ICAL_REQUEST_UPDATE_CLASS: {
- /* always accept the changes */
- break;
- }
-
- case ICAL_REQUEST_RESCHEDULE_CLASS: {
- /* Use same rules as REQUEST_NEW */
- icalcomponent *overlaps;
- overlaps = icalclassify_find_overlaps(cal,c);
-
- break;
- }
- case ICAL_REQUEST_DELEGATE_CLASS: {
-
- break;
- }
- case ICAL_REQUEST_NEW_ORGANIZER_CLASS: {
- break;
- }
- case ICAL_REQUEST_FORWARD_CLASS: {
- break;
- }
- case ICAL_REQUEST_STATUS_CLASS: {
- break;
- }
-
- case ICAL_REQUEST_FREEBUSY_CLASS: {
- break;
- }
- case ICAL_REPLY_ACCEPT_CLASS: {
- /* Change the PARTSTAT of the sender */
- break;
- }
- case ICAL_REPLY_DECLINE_CLASS: {
- /* Change the PARTSTAT of the sender */
- break;
- }
- case ICAL_REPLY_CRASHER_ACCEPT_CLASS: {
- /* Add the crasher to the ATTENDEE list with the
- appropriate PARTSTAT */
- break;
- }
- case ICAL_REPLY_CRASHER_DECLINE_CLASS: {
- /* Add the crasher to the ATTENDEE list with the
- appropriate PARTSTAT */
- break;
- }
- case ICAL_ADD_INSTANCE_CLASS: {
- break;
- }
- case ICAL_CANCEL_EVENT_CLASS: {
- /* Remove the component */
- break;
- }
- case ICAL_CANCEL_INSTANCE_CLASS: {
- break;
- }
- case ICAL_CANCEL_ALL_CLASS: {
- /* Remove the component */
- break;
- }
- case ICAL_REFRESH_CLASS: {
- /* Resend the latest copy of the request */
- break;
- }
- case ICAL_COUNTER_CLASS: {
- break;
- }
- case ICAL_DECLINECOUNTER_CLASS: {
- break;
- }
- case ICAL_MALFORMED_CLASS: {
- /* Send back an error */
- break;
- }
- case ICAL_OBSOLETE_CLASS: {
- printf(" ** Got an obsolete component:\n%s",
- icalcomponent_as_ical_string(c));
- /* Send back an error */
- break;
- }
- case ICAL_MISSEQUENCED_CLASS: {
- printf(" ** Got a missequenced component:\n%s",
- icalcomponent_as_ical_string(c));
- /* Send back an error */
- break;
- }
- case ICAL_UNKNOWN_CLASS: {
- printf(" ** Don't know what to do with this component:\n%s",
- icalcomponent_as_ical_string(c));
- /* Send back an error */
- break;
- }
- }
-
-#if(0)
- if (reply != 0){
-
- /* Don't send the reply if the RSVP parameter indicates not to*/
- icalcomponent *reply_inner;
- icalproperty *attendee;
- icalparameter *rsvp;
-
- reply_inner = icalcomponent_get_first_real_component(reply);
- attendee = icalcomponent_get_first_property(reply_inner,
- ICAL_ATTENDEE_PROPERTY);
- rsvp = icalproperty_get_first_parameter(attendee,
- ICAL_RSVP_PARAMETER);
-
- if(rsvp == 0 || icalparameter_get_rsvp(rsvp) == 1){
- icalrestriction_check(reply);
- send_message(reply,this_user);
- }
-
- icalcomponent_free(reply);
- }
-#endif
-
- if(reply !=0){
- printf("%s\n",icalcomponent_as_ical_string(reply));
- }
-
- next_c = icalset_get_next_component(f);
-
- if(dont_remove == 0){
- /*icalset_remove_component(f,c);
- icalset_add_component(trash,c);*/
- }
- }
-
-#if (0)
-
- for(c = icalset_get_first_component(out);
- c!=0;
- c = icalset_get_next_component(out)){
-
- printf("%s",icalcomponent_as_ical_string(c));
-
- }
-#endif
-
- icalset_free(f);
- icalset_free(trash);
- icalset_free(cal);
- icalset_free(out);
-
- return 0;
-}
-
-
diff --git a/libical/src/test/recur.c b/libical/src/test/recur.c
deleted file mode 100644
index f4d9a38647..0000000000
--- a/libical/src/test/recur.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: recur.c
- CREATOR: ebusboom 8jun00
-
- DESCRIPTION:
-
- Test program for expanding recurrences. Run as:
-
- ./recur ../../test-data/recur.txt
-
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- ======================================================================*/
-
-#include "ical.h"
-#include <assert.h>
-#include <string.h> /* for strdup */
-#include <stdlib.h> /* for malloc */
-#include <stdio.h> /* for printf */
-#include <time.h> /* for time() */
-#include <signal.h> /* for signal */
-#include <unistd.h> /* for alarm */
-#include "icalmemory.h"
-#include "icaldirset.h"
-#include "icalfileset.h"
-
-static void sig_alrm(int i){
- fprintf(stderr,"Could not get lock on file\n");
- exit(1);
-}
-
-int main(int argc, char *argv[])
-{
- icalfileset *cin;
- struct icaltimetype start, next;
- icalcomponent *itr;
- icalproperty *desc, *dtstart, *rrule;
- struct icalrecurrencetype recur;
- icalrecur_iterator* ritr;
- time_t tt;
- char* file;
-
- icalerror_set_error_state(ICAL_PARSE_ERROR, ICAL_ERROR_NONFATAL);
-
- signal(SIGALRM,sig_alrm);
-
-
- if (argc <= 1){
- file = "../../test-data/recur.txt";
- } else if (argc == 2){
- file = argv[1];
- } else {
- fprintf(stderr,"usage: recur [input file]\n");
- exit(1);
- }
-
- alarm(300); /* to get file lock */
- cin = icalfileset_new(file);
- alarm(0);
-
- if(cin == 0){
- fprintf(stderr,"recur: can't open file %s\n",file);
- exit(1);
- }
-
-
- for (itr = icalfileset_get_first_component(cin);
- itr != 0;
- itr = icalfileset_get_next_component(cin)){
-
- desc = icalcomponent_get_first_property(itr,ICAL_DESCRIPTION_PROPERTY);
- dtstart = icalcomponent_get_first_property(itr,ICAL_DTSTART_PROPERTY);
- rrule = icalcomponent_get_first_property(itr,ICAL_RRULE_PROPERTY);
-
- if (desc == 0 || dtstart == 0 || rrule == 0){
- printf("\n******** Error in input component ********\n");
- printf("The following component is malformed:\n %s\n",
- icalcomponent_as_ical_string(itr));
- continue;
- }
-
- printf("\n\n#### %s\n",icalproperty_get_description(desc));
- printf("#### %s\n",icalvalue_as_ical_string(icalproperty_get_value(rrule)));
- recur = icalproperty_get_rrule(rrule);
- start = icalproperty_get_dtstart(dtstart);
-
- ritr = icalrecur_iterator_new(recur,start);
-
- tt = icaltime_as_timet(start);
-
- printf("#### %s\n",ctime(&tt ));
-
- for(ritr = icalrecur_iterator_new(recur,start),
- next = icalrecur_iterator_next(ritr);
- !icaltime_is_null_time(next);
- next = icalrecur_iterator_next(ritr)){
-
- tt = icaltime_as_timet(next);
-
- printf(" %s",ctime(&tt ));
-
- }
-
- }
-
- return 0;
-}
diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c
deleted file mode 100644
index 08696207f2..0000000000
--- a/libical/src/test/regression.c
+++ /dev/null
@@ -1,3605 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: regression.c
- CREATOR: eric 03 April 1999
-
- DESCRIPTION:
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
- The original code is regression.c
-
-
- ======================================================================*/
-
-#include "ical.h"
-#include "icalss.h"
-
-#include <assert.h>
-#include <string.h> /* for strdup */
-#include <stdlib.h> /* for malloc */
-#include <stdio.h> /* for printf */
-#include <time.h> /* for time() */
-#include <unistd.h> /* for unlink, fork */
-#include <sys/wait.h> /* For waitpid */
-#include <sys/types.h> /* For wait pid */
-#include <sys/time.h> /* for select */
-
-
-/* For GNU libc, strcmp appears to be a macro, so using strcmp in
- assert results in incomprehansible assertion messages. This
- eliminates the problem */
-
-int regrstrcmp(const char* a, const char* b){
- return strcmp(a,b);
-}
-
-/* This example creates and minipulates the ical object that appears
- * in rfc 2445, page 137 */
-
-char str[] = "BEGIN:VCALENDAR\
-PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\
-VERSION:2.0\
-BEGIN:VTIMEZONE\
-TZID:US-Eastern\
-BEGIN:STANDARD\
-DTSTART:19981025T020000\
-RDATE:19981025T020000\
-TZOFFSETFROM:-0400\
-TZOFFSETTO:-0500\
-TZNAME:EST\
-END:STANDARD\
-BEGIN:DAYLIGHT\
-DTSTART:19990404T020000\
-RDATE:19990404T020000\
-TZOFFSETFROM:-0500\
-TZOFFSETTO:-0400\
-TZNAME:EDT\
-END:DAYLIGHT\
-END:VTIMEZONE\
-BEGIN:VEVENT\
-DTSTAMP:19980309T231000Z\
-UID:guid-1.host1.com\
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\
-DESCRIPTION:Project XYZ Review Meeting\
-CATEGORIES:MEETING\
-CLASS:PUBLIC\
-CREATED:19980309T130000Z\
-SUMMARY:XYZ Project Review\
-DTSTART;TZID=US-Eastern:19980312T083000\
-DTEND;TZID=US-Eastern:19980312T093000\
-LOCATION:1CP Conference Room 4350\
-END:VEVENT\
-BEGIN:BOOGA\
-DTSTAMP:19980309T231000Z\
-X-LIC-FOO:Booga\
-DTSTOMP:19980309T231000Z\
-UID:guid-1.host1.com\
-END:BOOGA\
-END:VCALENDAR";
-
-
-icalcomponent* create_simple_component()
-{
-
- icalcomponent* calendar;
- struct icalperiodtype rtime;
-
- rtime.start = icaltime_from_timet( time(0),0);
- rtime.end = icaltime_from_timet( time(0),0);
-
- rtime.end.hour++;
-
-
-
- /* Create calendar and add properties */
- calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
-
-
- icalcomponent_add_property(
- calendar,
- icalproperty_new_version("2.0")
- );
-
- printf("%s\n",icalcomponent_as_ical_string(calendar));
-
- return calendar;
-
-}
-
-/* Create a new component */
-icalcomponent* create_new_component()
-{
-
- icalcomponent* calendar;
- icalcomponent* timezone;
- icalcomponent* tzc;
- icalcomponent* event;
- struct icaltimetype atime = icaltime_from_timet( time(0),0);
- struct icaldatetimeperiodtype rtime;
- icalproperty* property;
-
- rtime.period.start = icaltime_from_timet( time(0),0);
- rtime.period.end = icaltime_from_timet( time(0),0);
- rtime.period.end.hour++;
- rtime.time = icaltime_null_time();
-
-
-
- /* Create calendar and add properties */
- calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
-
-
- icalcomponent_add_property(
- calendar,
- icalproperty_new_version("2.0")
- );
-
- icalcomponent_add_property(
- calendar,
- icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN")
- );
-
- /* Create a timezone object and add it to the calendar */
-
- timezone = icalcomponent_new(ICAL_VTIMEZONE_COMPONENT);
-
- icalcomponent_add_property(
- timezone,
- icalproperty_new_tzid("US_Eastern")
- );
-
- /* Add a sub-component of the timezone */
- tzc = icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT);
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_dtstart(atime)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_rdate(rtime)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_tzoffsetfrom(-4.0)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_tzoffsetto(-5.0)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_tzname("EST")
- );
-
- icalcomponent_add_component(timezone,tzc);
-
- icalcomponent_add_component(calendar,timezone);
-
- /* Add a second subcomponent */
- tzc = icalcomponent_new(ICAL_XSTANDARD_COMPONENT);
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_dtstart(atime)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_rdate(rtime)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_tzoffsetfrom(-4.0)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_tzoffsetto(-5.0)
- );
-
- icalcomponent_add_property(
- tzc,
- icalproperty_new_tzname("EST")
- );
-
- icalcomponent_add_component(timezone,tzc);
-
- /* Add an event */
-
- event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
-
- icalcomponent_add_property(
- event,
- icalproperty_new_dtstamp(atime)
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_uid("guid-1.host1.com")
- );
-
- /* add a property that has parameters */
- property = icalproperty_new_organizer("mrbig@host.com");
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_role(ICAL_ROLE_CHAIR)
- );
-
- icalcomponent_add_property(event,property);
-
- /* add another property that has parameters */
- property = icalproperty_new_attendee("employee-A@host.com");
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT)
- );
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_rsvp(ICAL_RSVP_TRUE)
- );
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP)
- );
-
- icalcomponent_add_property(event,property);
-
-
- /* more properties */
-
- icalcomponent_add_property(
- event,
- icalproperty_new_description("Project XYZ Review Meeting")
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_categories("MEETING")
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_class("PUBLIC")
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_created(atime)
- );
-
- icalcomponent_add_property(
- event,
- icalproperty_new_summary("XYZ Project Review")
- );
-
-
- property = icalproperty_new_dtstart(atime);
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_tzid("US-Eastern")
- );
-
- icalcomponent_add_property(event,property);
-
-
- property = icalproperty_new_dtend(atime);
-
- icalproperty_add_parameter(
- property,
- icalparameter_new_tzid("US-Eastern")
- );
-
- icalcomponent_add_property(event,property);
-
- icalcomponent_add_property(
- event,
- icalproperty_new_location("1CP Conference Room 4350")
- );
-
- icalcomponent_add_component(calendar,event);
-
- printf("%s\n",icalcomponent_as_ical_string(calendar));
-
- icalcomponent_free(calendar);
-
- return 0;
-}
-
-
-/* Create a new component, using the va_args list */
-
-icalcomponent* create_new_component_with_va_args()
-{
-
- icalcomponent* calendar;
- struct icaltimetype atime = icaltime_from_timet( time(0),0);
- struct icaldatetimeperiodtype rtime;
-
- rtime.period.start = icaltime_from_timet( time(0),0);
- rtime.period.end = icaltime_from_timet( time(0),0);
- rtime.period.end.hour++;
- rtime.time = icaltime_null_time();
-
- calendar =
- icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
- icalcomponent_vanew(
- ICAL_VTIMEZONE_COMPONENT,
- icalproperty_new_tzid("US_Eastern"),
- icalcomponent_vanew(
- ICAL_XDAYLIGHT_COMPONENT,
- icalproperty_new_dtstart(atime),
- icalproperty_new_rdate(rtime),
- icalproperty_new_tzoffsetfrom(-4.0),
- icalproperty_new_tzoffsetto(-5.0),
- icalproperty_new_tzname("EST"),
- 0
- ),
- icalcomponent_vanew(
- ICAL_XSTANDARD_COMPONENT,
- icalproperty_new_dtstart(atime),
- icalproperty_new_rdate(rtime),
- icalproperty_new_tzoffsetfrom(-5.0),
- icalproperty_new_tzoffsetto(-4.0),
- icalproperty_new_tzname("EST"),
- 0
- ),
- 0
- ),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstamp(atime),
- icalproperty_new_uid("guid-1.host1.com"),
- icalproperty_vanew_organizer(
- "mrbig@host.com",
- icalparameter_new_role(ICAL_ROLE_CHAIR),
- 0
- ),
- icalproperty_vanew_attendee(
- "employee-A@host.com",
- icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
- icalparameter_new_rsvp(ICAL_RSVP_TRUE),
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
- 0
- ),
- icalproperty_new_description("Project XYZ Review Meeting"),
- icalproperty_new_categories("MEETING"),
- icalproperty_new_class("PUBLIC"),
- icalproperty_new_created(atime),
- icalproperty_new_summary("XYZ Project Review"),
- icalproperty_vanew_dtstart(
- atime,
- icalparameter_new_tzid("US-Eastern"),
- 0
- ),
- icalproperty_vanew_dtend(
- atime,
- icalparameter_new_tzid("US-Eastern"),
- 0
- ),
- icalproperty_new_location("1CP Conference Room 4350"),
- 0
- ),
- 0
- );
-
- printf("%s\n",icalcomponent_as_ical_string(calendar));
-
-
- icalcomponent_free(calendar);
-
- return 0;
-}
-
-
-/* Return a list of all attendees who are required. */
-
-char** get_required_attendees(icalproperty* event)
-{
- icalproperty* p;
- icalparameter* parameter;
-
- char **attendees;
- int max = 10;
- int c = 0;
-
- attendees = malloc(max * (sizeof (char *)));
-
- assert(event != 0);
- assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
-
- for(
- p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
- ) {
-
- parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER);
-
- if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT)
- {
- attendees[c++] = icalmemory_strdup(icalproperty_get_attendee(p));
-
- if (c >= max) {
- max *= 2;
- attendees = realloc(attendees, max * (sizeof (char *)));
- }
-
- }
- }
-
- return attendees;
-}
-
-/* If an attendee has a PARTSTAT of NEEDSACTION or has no PARTSTAT
- parameter, change it to TENTATIVE. */
-
-void update_attendees(icalproperty* event)
-{
- icalproperty* p;
- icalparameter* parameter;
-
-
- assert(event != 0);
- assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
-
- for(
- p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
- ) {
-
- parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER);
-
- if (parameter == 0) {
-
- icalproperty_add_parameter(
- p,
- icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
- );
-
- } else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) {
-
- icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER);
-
- icalparameter_free(parameter);
-
- icalproperty_add_parameter(
- p,
- icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
- );
- }
-
- }
-}
-
-
-void test_values()
-{
- icalvalue *v;
- icalvalue *copy;
-
- v = icalvalue_new_caladdress("cap://value/1");
- printf("caladdress 1: %s\n",icalvalue_get_caladdress(v));
- icalvalue_set_caladdress(v,"cap://value/2");
- printf("caladdress 2: %s\n",icalvalue_get_caladdress(v));
- printf("String: %s\n",icalvalue_as_ical_string(v));
-
- copy = icalvalue_new_clone(v);
- printf("Clone: %s\n",icalvalue_as_ical_string(v));
- icalvalue_free(v);
- icalvalue_free(copy);
-
-
- v = icalvalue_new_boolean(1);
- printf("caladdress 1: %d\n",icalvalue_get_boolean(v));
- icalvalue_set_boolean(v,2);
- printf("caladdress 2: %d\n",icalvalue_get_boolean(v));
- printf("String: %s\n",icalvalue_as_ical_string(v));
-
- copy = icalvalue_new_clone(v);
- printf("Clone: %s\n",icalvalue_as_ical_string(v));
- icalvalue_free(v);
- icalvalue_free(copy);
-
-
- v = icalvalue_new_date(icaltime_from_timet( time(0),0));
- printf("date 1: %s\n",icalvalue_as_ical_string(v));
- icalvalue_set_date(v,icaltime_from_timet( time(0)+3600,0));
- printf("date 2: %s\n",icalvalue_as_ical_string(v));
-
- copy = icalvalue_new_clone(v);
- printf("Clone: %s\n",icalvalue_as_ical_string(v));
- icalvalue_free(v);
- icalvalue_free(copy);
-
-
- v = icalvalue_new(-1);
-
- printf("Invalid type: %p\n",v);
-
- if (v!=0) icalvalue_free(v);
-
- assert(ICAL_BOOLEAN_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_BOOLEAN));
- assert(ICAL_UTCOFFSET_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_UTCOFFSET));
- assert(ICAL_RECUR_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_RECUR));
- assert(ICAL_CALADDRESS_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_CALADDRESS));
- assert(ICAL_PERIOD_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_PERIOD));
- assert(ICAL_BINARY_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_BINARY));
- assert(ICAL_TEXT_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_TEXT));
- assert(ICAL_DURATION_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_DURATION));
- assert(ICAL_INTEGER_VALUE == icalparameter_value_to_value_kind(ICAL_VALUE_INTEGER));
- assert(ICAL_TIME_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_TIME));
- assert(ICAL_URI_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_URI));
- assert(ICAL_FLOAT_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_FLOAT));
- assert(ICAL_X_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_X));
- assert(ICAL_DATETIME_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_DATETIME));
- assert(ICAL_DATE_VALUE ==
- icalparameter_value_to_value_kind(ICAL_VALUE_DATE));
-
- /* v = icalvalue_new_caladdress(0);
-
- printf("Bad string: %p\n",v);
-
- if (v!=0) icalvalue_free(v); */
-
-}
-
-void test_properties()
-{
- icalproperty *prop;
- icalparameter *param;
-
- icalproperty *clone;
-
- prop = icalproperty_vanew_comment(
- "Another Comment",
- icalparameter_new_cn("A Common Name 1"),
- icalparameter_new_cn("A Common Name 2"),
- icalparameter_new_cn("A Common Name 3"),
- icalparameter_new_cn("A Common Name 4"),
- 0);
-
- for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER);
- param != 0;
- param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) {
-
- printf("Prop parameter: %s\n",icalparameter_get_cn(param));
- }
-
- printf("Prop value: %s\n",icalproperty_get_comment(prop));
-
-
- printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop));
-
- clone = icalproperty_new_clone(prop);
-
- printf("Clone:\n %s\n",icalproperty_as_ical_string(prop));
-
- icalproperty_free(clone);
- icalproperty_free(prop);
-
- prop = icalproperty_new(-1);
-
- printf("Invalid type: %p\n",prop);
-
- if (prop!=0) icalproperty_free(prop);
-
- /*
- prop = icalproperty_new_method(0);
-
- printf("Bad string: %p\n",prop);
-
-
- if (prop!=0) icalproperty_free(prop);
- */
-}
-
-void test_parameters()
-{
- icalparameter *p;
- int i;
- int enums[] = {ICAL_CUTYPE_INDIVIDUAL,ICAL_CUTYPE_RESOURCE,ICAL_FBTYPE_BUSY,ICAL_PARTSTAT_NEEDSACTION,ICAL_ROLE_NONPARTICIPANT,ICAL_XLICCOMPARETYPE_LESSEQUAL,ICAL_XLICERRORTYPE_MIMEPARSEERROR,-1};
-
- char* str1 = "A Common Name";
-
- p = icalparameter_new_cn(str1);
-
- printf("Common Name: %s\n",icalparameter_get_cn(p));
-
- assert(regrstrcmp(str1,icalparameter_get_cn(p)) == 0);
-
- printf("As String: %s\n",icalparameter_as_ical_string(p));
-
- assert(regrstrcmp(icalparameter_as_ical_string(p),"CN=A Common Name")==0);
-
- icalparameter_free(p);
-
-
- p = icalparameter_new_from_string("PARTSTAT=ACCEPTED");
- assert(icalparameter_isa(p) == ICAL_PARTSTAT_PARAMETER);
- assert(icalparameter_get_partstat(p) == ICAL_PARTSTAT_ACCEPTED);
-
- p = icalparameter_new_from_string("ROLE=CHAIR");
- assert(icalparameter_isa(p) == ICAL_ROLE_PARAMETER);
- assert(icalparameter_get_partstat(p) == ICAL_ROLE_CHAIR);
-
- p = icalparameter_new_from_string("PARTSTAT=X-FOO");
- assert(icalparameter_isa(p) == ICAL_PARTSTAT_PARAMETER);
- assert(icalparameter_get_partstat(p) == ICAL_PARTSTAT_X);
-
- p = icalparameter_new_from_string("X-PARAM=X-FOO");
- assert(icalparameter_isa(p) == ICAL_X_PARAMETER);
-
-
- for (i=0;enums[i] != -1; i++){
-
- printf("%s\n",icalparameter_enum_to_string(enums[i]));
- assert(icalparameter_string_to_enum(
- icalparameter_enum_to_string(enums[i]))==enums[i]);
- }
-
-
-}
-
-
-void test_components()
-{
-
- icalcomponent* c;
- icalcomponent* child;
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
- icalproperty_vanew_comment(
- "A Comment",
- icalparameter_new_cn("A Common Name 1"),
- 0),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_description("This is an event"),
- icalproperty_vanew_comment(
- "Another Comment",
- icalparameter_new_cn("A Common Name 1"),
- icalparameter_new_cn("A Common Name 2"),
- icalparameter_new_cn("A Common Name 3"),
- icalparameter_new_cn("A Common Name 4"),
- 0),
- icalproperty_vanew_xlicerror(
- "This is only a test",
- icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR),
- 0),
-
- 0
- ),
- 0
- );
-
- printf("Original Component:\n%s\n\n",icalcomponent_as_ical_string(c));
-
- child = icalcomponent_get_first_component(c,ICAL_VEVENT_COMPONENT);
-
- printf("Child Component:\n%s\n\n",icalcomponent_as_ical_string(child));
-
- icalcomponent_free(c);
-
-}
-
-void test_memory()
-{
- size_t bufsize = 256;
- int i;
- char *p;
-
- char S1[] = "1) When in the Course of human events, ";
- char S2[] = "2) it becomes necessary for one people to dissolve the political bands which have connected them with another, ";
- char S3[] = "3) and to assume among the powers of the earth, ";
- char S4[] = "4) the separate and equal station to which the Laws of Nature and of Nature's God entitle them, ";
- char S5[] = "5) a decent respect to the opinions of mankind requires that they ";
- char S6[] = "6) should declare the causes which impel them to the separation. ";
- char S7[] = "7) We hold these truths to be self-evident, ";
- char S8[] = "8) that all men are created equal, ";
-
-/* char S9[] = "9) that they are endowed by their Creator with certain unalienable Rights, ";
- char S10[] = "10) that among these are Life, Liberty, and the pursuit of Happiness. ";
- char S11[] = "11) That to secure these rights, Governments are instituted among Men, ";
- char S12[] = "12) deriving their just powers from the consent of the governed. ";
-*/
-
-
- char *f, *b1, *b2, *b3, *b4, *b5, *b6, *b7, *b8;
-
-#define BUFSIZE 1024
-
- f = icalmemory_new_buffer(bufsize);
- p = f;
- b1 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b1, S1);
- icalmemory_append_string(&f, &p, &bufsize, b1);
-
- b2 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b2, S2);
- icalmemory_append_string(&f, &p, &bufsize, b2);
-
- b3 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b3, S3);
- icalmemory_append_string(&f, &p, &bufsize, b3);
-
- b4 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b4, S4);
- icalmemory_append_string(&f, &p, &bufsize, b4);
-
- b5 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b5, S5);
- icalmemory_append_string(&f, &p, &bufsize, b5);
-
- b6 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b6, S6);
- icalmemory_append_string(&f, &p, &bufsize, b6);
-
- b7 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b7, S7);
- icalmemory_append_string(&f, &p, &bufsize, b7);
-
- b8 = icalmemory_tmp_buffer(BUFSIZE);
- strcpy(b8, S8);
- icalmemory_append_string(&f, &p, &bufsize, b8);
-
-
- printf("1: %p %s \n",b1,b1);
- printf("2: %p %s\n",b2,b2);
- printf("3: %p %s\n",b3,b3);
- printf("4: %p %s\n",b4,b4);
- printf("5: %p %s\n",b5,b5);
- printf("6: %p %s\n",b6,b6);
- printf("7: %p %s\n",b7,b7);
- printf("8: %p %s\n",b8,b8);
-
-
- printf("Final: %s\n", f);
-
- printf("Final buffer size: %d\n",bufsize);
-
- free(f);
-
- bufsize = 4;
-
- f = icalmemory_new_buffer(bufsize);
-
- memset(f,0,bufsize);
- p = f;
-
- icalmemory_append_char(&f, &p, &bufsize, 'a');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'b');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'c');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'd');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'e');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'f');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'g');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'h');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'i');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'j');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'a');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'b');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'c');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'd');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'e');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'f');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'g');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'h');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'i');
- printf("Char-by-Char buffer: %s\n", f);
- icalmemory_append_char(&f, &p, &bufsize, 'j');
- printf("Char-by-Char buffer: %s\n", f);
-
- for(i=0; i<100; i++){
- f = icalmemory_tmp_buffer(bufsize);
-
- assert(f!=0);
-
- memset(f,0,bufsize);
- sprintf(f,"%d",i);
- }
-}
-
-
-int test_store()
-{
-
- icalcomponent *c, *gauge;
- icalerrorenum error;
- icalcomponent *next, *itr;
- icalfileset* cluster;
- struct icalperiodtype rtime;
- icaldirset *s = icaldirset_new("store");
- int i;
-
- rtime.start = icaltime_from_timet( time(0),0);
-
- cluster = icalfileset_new("clusterin.vcd");
-
- if (cluster == 0){
- printf("Failed to create cluster: %s\n",icalerror_strerror(icalerrno));
- return 0;
- }
-
-#define NUMCOMP 4
-
- /* Duplicate every component in the cluster NUMCOMP times */
-
- icalerror_clear_errno();
-
- for (i = 1; i<NUMCOMP+1; i++){
-
- /*rtime.start.month = i%12;*/
- rtime.start.month = i;
- rtime.end = rtime.start;
- rtime.end.hour++;
-
- for (itr = icalfileset_get_first_component(cluster);
- itr != 0;
- itr = icalfileset_get_next_component(cluster)){
- icalcomponent *clone;
- icalproperty *p;
-
-
- if(icalcomponent_isa(itr) != ICAL_VEVENT_COMPONENT){
- continue;
- }
-
- assert(itr != 0);
-
- /* Change the dtstart and dtend times in the component
- pointed to by Itr*/
-
- clone = icalcomponent_new_clone(itr);
- assert(icalerrno == ICAL_NO_ERROR);
- assert(clone !=0);
-
- /* DTSTART*/
- p = icalcomponent_get_first_property(clone,ICAL_DTSTART_PROPERTY);
- assert(icalerrno == ICAL_NO_ERROR);
-
- if (p == 0){
- p = icalproperty_new_dtstart(rtime.start);
- icalcomponent_add_property(clone,p);
- } else {
- icalproperty_set_dtstart(p,rtime.start);
- }
- assert(icalerrno == ICAL_NO_ERROR);
-
- /* DTEND*/
- p = icalcomponent_get_first_property(clone,ICAL_DTEND_PROPERTY);
- assert(icalerrno == ICAL_NO_ERROR);
-
- if (p == 0){
- p = icalproperty_new_dtstart(rtime.end);
- icalcomponent_add_property(clone,p);
- } else {
- icalproperty_set_dtstart(p,rtime.end);
- }
- assert(icalerrno == ICAL_NO_ERROR);
-
- printf("\n----------\n%s\n---------\n",icalcomponent_as_ical_string(clone));
-
- error = icaldirset_add_component(s,clone);
-
- assert(icalerrno == ICAL_NO_ERROR);
-
- }
-
- }
-
- gauge =
- icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_summary(
- "Submit Income Taxes",
- icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
- 0),
- 0),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_summary(
- "Bastille Day Party",
- icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
- 0),
- 0),
- 0);
-
-#if 0
-
-
- icaldirset_select(s,gauge);
-
- for(c = icaldirset_first(s); c != 0; c = icaldirset_next(s)){
-
- printf("Got one! (%d)\n", count++);
-
- if (c != 0){
- printf("%s", icalcomponent_as_ical_string(c));;
- if (icaldirset_store(s2,c) == 0){
- printf("Failed to write!\n");
- }
- icalcomponent_free(c);
- } else {
- printf("Failed to get component\n");
- }
- }
-
-
- icaldirset_free(s2);
-#endif
-
-
- for(c = icaldirset_get_first_component(s);
- c != 0;
- c = next){
-
- next = icaldirset_get_next_component(s);
-
- if (c != 0){
- /*icaldirset_remove_component(s,c);*/
- printf("%s", icalcomponent_as_ical_string(c));;
- } else {
- printf("Failed to get component\n");
- }
-
-
- }
-
- icaldirset_free(s);
- return 0;
-}
-
-int test_compare()
-{
- icalvalue *v1, *v2;
-
- v1 = icalvalue_new_caladdress("cap://value/1");
- v2 = icalvalue_new_clone(v1);
-
- printf("%d\n",icalvalue_compare(v1,v2));
-
- v1 = icalvalue_new_caladdress("A");
- v2 = icalvalue_new_caladdress("B");
-
- printf("%d\n",icalvalue_compare(v1,v2));
-
- v1 = icalvalue_new_caladdress("B");
- v2 = icalvalue_new_caladdress("A");
-
- printf("%d\n",icalvalue_compare(v1,v2));
-
- v1 = icalvalue_new_integer(5);
- v2 = icalvalue_new_integer(5);
-
- printf("%d\n",icalvalue_compare(v1,v2));
-
- v1 = icalvalue_new_integer(5);
- v2 = icalvalue_new_integer(10);
-
- printf("%d\n",icalvalue_compare(v1,v2));
-
- v1 = icalvalue_new_integer(10);
- v2 = icalvalue_new_integer(5);
-
- printf("%d\n",icalvalue_compare(v1,v2));
-
- return 0;
-}
-
-void test_restriction()
-{
- icalcomponent *comp;
- struct icaltimetype atime = icaltime_from_timet( time(0),0);
- int valid;
-
- struct icaldatetimeperiodtype rtime;
-
- rtime.period.start = icaltime_from_timet( time(0),0);
- rtime.period.end = icaltime_from_timet( time(0),0);
- rtime.period.end.hour++;
- rtime.time = icaltime_null_time();
-
- comp =
- icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
- icalproperty_new_method(ICAL_METHOD_REQUEST),
- icalcomponent_vanew(
- ICAL_VTIMEZONE_COMPONENT,
- icalproperty_new_tzid("US_Eastern"),
- icalcomponent_vanew(
- ICAL_XDAYLIGHT_COMPONENT,
- icalproperty_new_dtstart(atime),
- icalproperty_new_rdate(rtime),
- icalproperty_new_tzoffsetfrom(-4.0),
- icalproperty_new_tzoffsetto(-5.0),
- icalproperty_new_tzname("EST"),
- 0
- ),
- icalcomponent_vanew(
- ICAL_XSTANDARD_COMPONENT,
- icalproperty_new_dtstart(atime),
- icalproperty_new_rdate(rtime),
- icalproperty_new_tzoffsetfrom(-5.0),
- icalproperty_new_tzoffsetto(-4.0),
- icalproperty_new_tzname("EST"),
- 0
- ),
- 0
- ),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstamp(atime),
- icalproperty_new_uid("guid-1.host1.com"),
- icalproperty_vanew_organizer(
- "mrbig@host.com",
- icalparameter_new_role(ICAL_ROLE_CHAIR),
- 0
- ),
- icalproperty_vanew_attendee(
- "employee-A@host.com",
- icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
- icalparameter_new_rsvp(ICAL_RSVP_TRUE),
- icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
- 0
- ),
- icalproperty_new_description("Project XYZ Review Meeting"),
- icalproperty_new_categories("MEETING"),
- icalproperty_new_class("PUBLIC"),
- icalproperty_new_created(atime),
- icalproperty_new_summary("XYZ Project Review"),
- /* icalproperty_new_dtstart(
- atime,
- icalparameter_new_tzid("US-Eastern"),
- 0
- ),*/
- icalproperty_vanew_dtend(
- atime,
- icalparameter_new_tzid("US-Eastern"),
- 0
- ),
- icalproperty_new_location("1CP Conference Room 4350"),
- 0
- ),
- 0
- );
-
- valid = icalrestriction_check(comp);
-
- printf("#### %d ####\n%s\n",valid, icalcomponent_as_ical_string(comp));
-
-}
-
-#if 0
-void test_calendar()
-{
- icalcomponent *comp;
- icalfileset *c;
- icaldirset *s;
- icalcalendar* calendar = icalcalendar_new("calendar");
- icalerrorenum error;
- struct icaltimetype atime = icaltime_from_timet( time(0),0);
-
- comp = icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_description("This is an event"),
- icalproperty_new_dtstart(atime),
- icalproperty_vanew_comment(
- "Another Comment",
- icalparameter_new_cn("A Common Name 1"),
- icalparameter_new_cn("A Common Name 2"),
- icalparameter_new_cn("A Common Name 3"),
- icalparameter_new_cn("A Common Name 4"),
- 0),
- icalproperty_vanew_xlicerror(
- "This is only a test",
- icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR),
- 0),
-
- 0);
-
-
- s = icalcalendar_get_booked(calendar);
-
- error = icaldirset_add_component(s,comp);
-
- assert(error == ICAL_NO_ERROR);
-
- c = icalcalendar_get_properties(calendar);
-
- error = icalfileset_add_component(c,icalcomponent_new_clone(comp));
-
- assert(error == ICAL_NO_ERROR);
-
- icalcalendar_free(calendar);
-
-}
-#endif
-
-void test_increment(void);
-
-void print_occur(struct icalrecurrencetype recur, struct icaltimetype start)
-{
- struct icaltimetype next;
- icalrecur_iterator* ritr;
-
- time_t tt = icaltime_as_timet(start);
-
- printf("#### %s\n",icalrecurrencetype_as_string(&recur));
- printf("#### %s\n",ctime(&tt ));
-
- for(ritr = icalrecur_iterator_new(recur,start),
- next = icalrecur_iterator_next(ritr);
- !icaltime_is_null_time(next);
- next = icalrecur_iterator_next(ritr)){
-
- tt = icaltime_as_timet(next);
-
- printf(" %s",ctime(&tt ));
-
- }
-
- icalrecur_iterator_free(ritr);
-}
-
-void test_recur()
-{
- struct icalrecurrencetype rt;
- struct icaltimetype start;
- time_t array[25];
- int i;
-
- rt = icalrecurrencetype_from_string("FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA");
- start = icaltime_from_string("19970905T090000Z");
-
- print_occur(rt,start);
-
- printf("\n Using icalrecur_expand_recurrence\n");
-
- icalrecur_expand_recurrence("FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA",
- icaltime_as_timet(start),
- 25,
- array);
-
- for(i =0; array[i] != 0 && i < 25 ; i++){
-
- printf(" %s",ctime(&(array[i])));
- }
-
-
-/* test_increment();*/
-
-}
-
-void test_expand_recurrence(){
-
- time_t arr[10];
- time_t now = 931057385;
- int i;
- icalrecur_expand_recurrence( "FREQ=MONTHLY;BYDAY=MO,WE", now,
- 5, arr );
-
- printf("Start %s",ctime(&now) );
- for (i=0; i<5; i++)
- {
- printf("i=%d %s\n", i, ctime(&arr[i]) );
- }
-
-}
-
-
-
-enum byrule {
- NO_CONTRACTION = -1,
- BY_SECOND = 0,
- BY_MINUTE = 1,
- BY_HOUR = 2,
- BY_DAY = 3,
- BY_MONTH_DAY = 4,
- BY_YEAR_DAY = 5,
- BY_WEEK_NO = 6,
- BY_MONTH = 7,
- BY_SET_POS
-};
-
-struct icalrecur_iterator_impl {
-
- struct icaltimetype dtstart;
- struct icaltimetype last; /* last time return from _iterator_next*/
- int occurrence_no; /* number of step made on this iterator */
- struct icalrecurrencetype rule;
-
- short days[366];
- short days_index;
-
- enum byrule byrule;
- short by_indices[9];
-
-
- short *by_ptrs[9]; /* Pointers into the by_* array elements of the rule */
-};
-
-void icalrecurrencetype_test()
-{
- icalvalue *v = icalvalue_new_from_string(
- ICAL_RECUR_VALUE,
- "FREQ=YEARLY;UNTIL=20060101T000000;INTERVAL=2;BYDAY=SU,WE;BYSECOND=15,30; BYMONTH=1,6,11");
-
- struct icalrecurrencetype r = icalvalue_get_recur(v);
- struct icaltimetype t = icaltime_from_timet( time(0), 0);
- struct icaltimetype next;
- time_t tt;
-
- struct icalrecur_iterator_impl* itr
- = (struct icalrecur_iterator_impl*) icalrecur_iterator_new(r,t);
-
- do {
-
- next = icalrecur_iterator_next(itr);
- tt = icaltime_as_timet(next);
-
- printf("%s",ctime(&tt ));
-
- } while( ! icaltime_is_null_time(next));
-
-}
-
-/* From Federico Mena Quintero <federico@ximian.com> */
-void test_recur_parameter_bug(){
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ical.h>
-
- static const char test_icalcomp_str[] =
-"BEGIN:VEVENT\r\n"
-"RRULE\r\n"
-" ;X-EVOLUTION-ENDDATE=20030209T081500\r\n"
-" :FREQ=DAILY;COUNT=10;INTERVAL=6\r\n"
-"END:VEVENT\r\n";
-
- icalcomponent *icalcomp;
- icalproperty *prop;
- struct icalrecurrencetype recur;
- int n_errors;
-
- icalcomp = icalparser_parse_string ((char *) test_icalcomp_str);
- if (!icalcomp) {
- fprintf (stderr, "main(): could not parse the component\n");
- exit (EXIT_FAILURE);
- }
-
- printf("%s\n\n",icalcomponent_as_ical_string(icalcomp));
-
- n_errors = icalcomponent_count_errors (icalcomp);
- if (n_errors) {
- icalproperty *p;
-
- for (p = icalcomponent_get_first_property (icalcomp,
- ICAL_XLICERROR_PROPERTY);
- p;
- p = icalcomponent_get_next_property (icalcomp,
- ICAL_XLICERROR_PROPERTY)) {
- char *str;
-
- str = icalproperty_as_ical_string (p);
- fprintf (stderr, "error: %s\n", str);
- }
- }
-
- prop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY);
- if (!prop) {
- fprintf (stderr, "main(): could not get the RRULE property");
- exit (EXIT_FAILURE);
- }
-
- recur = icalproperty_get_rrule (prop);
-
- printf("%s\n",icalrecurrencetype_as_string(&recur));
-
-}
-
-
-void test_duration()
-{
-
-
- struct icaldurationtype d;
-
- d = icaldurationtype_from_string("PT8H30M");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 30600);
-
- d = icaldurationtype_from_string("-PT8H30M");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == -30600);
-
- d = icaldurationtype_from_string("PT10H10M10S");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 36610);
-
- d = icaldurationtype_from_string("P7W");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 4233600);
-
- d = icaldurationtype_from_string("P2DT8H30M");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 203400);
-
- icalerror_errors_are_fatal = 0;
-
- d = icaldurationtype_from_string("P-2DT8H30M");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 0);
-
- d = icaldurationtype_from_string("P7W8H");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 0);
-
- d = icaldurationtype_from_string("T10H");
- printf("%s\n",icaldurationtype_as_ical_string(d));
- assert(icaldurationtype_as_int(d) == 0);
-
-
- icalerror_errors_are_fatal = 1;
-
-}
-
-void test_period()
-{
-
- struct icalperiodtype p;
- icalvalue *v;
-
- p = icalperiodtype_from_string("19971015T050000Z/PT8H30M");
- printf("%s\n",icalperiodtype_as_ical_string(p));
- assert(strcmp(icalperiodtype_as_ical_string(p),
- "19971015T050000Z/PT8H30M") == 0);
-
- p = icalperiodtype_from_string("19971015T050000Z/19971015T060000Z");
- printf("%s\n",icalperiodtype_as_ical_string(p));
- assert(strcmp(icalperiodtype_as_ical_string(p),
- "19971015T050000Z/19971015T060000Z") == 0);
-
- p = icalperiodtype_from_string("19970101T120000/PT3H");
- printf("%s\n",icalperiodtype_as_ical_string(p));
- assert(strcmp(icalperiodtype_as_ical_string(p),
- "19970101T120000/PT3H") == 0);
-
- v = icalvalue_new_from_string(ICAL_PERIOD_VALUE,"19970101T120000/PT3H");
- printf("%s\n",icalvalue_as_ical_string(v));
- assert(strcmp(icalvalue_as_ical_string(v),
- "19970101T120000/PT3H") == 0);
-
-
-}
-
-void test_strings(){
-
- icalvalue *v;
-
- v = icalvalue_new_text("foo;bar;bats");
-
- printf("%s\n",icalvalue_as_ical_string(v));
-
- icalvalue_free(v);
-
- v = icalvalue_new_text("foo\\;b\nar\\;ba\tts");
-
- printf("%s\n",icalvalue_as_ical_string(v));
-
- icalvalue_free(v);
-
-
-}
-
-void test_requeststat()
-{
- icalrequeststatus s;
- struct icalreqstattype st, st2;
- char temp[1024];
-
- s = icalenum_num_to_reqstat(2,1);
-
- assert(s == ICAL_2_1_FALLBACK_STATUS);
-
- assert(icalenum_reqstat_major(s) == 2);
- assert(icalenum_reqstat_minor(s) == 1);
-
- printf("2.1: %s\n",icalenum_reqstat_desc(s));
-
- st.code = s;
- st.debug = "booga";
- st.desc = 0;
-
- printf("%s\n",icalreqstattype_as_string(st));
-
- st.desc = " A non-standard description";
-
- printf("%s\n",icalreqstattype_as_string(st));
-
-
- st.desc = 0;
-
- sprintf(temp,"%s\n",icalreqstattype_as_string(st));
-
-
- st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.;booga");
-
- printf("%d -- %d -- %s -- %s\n",icalenum_reqstat_major(st2.code),
- icalenum_reqstat_minor(st2.code),
- icalenum_reqstat_desc(st2.code),
- st2.debug);
-
- st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.;booga");
- printf("%s\n",icalreqstattype_as_string(st2));
-
- st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.;");
- printf("%s\n",icalreqstattype_as_string(st2));
-
- st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.");
- printf("%s\n",icalreqstattype_as_string(st2));
-
- st2 = icalreqstattype_from_string("2.1;");
- printf("%s\n",icalreqstattype_as_string(st2));
-
- st2 = icalreqstattype_from_string("2.1");
- printf("%s\n",icalreqstattype_as_string(st2));
-
-#ifndef ICAL_ERRORS_ARE_FATAL
- st2 = icalreqstattype_from_string("16.4");
- assert(st2.code == ICAL_UNKNOWN_STATUS);
-
- st2 = icalreqstattype_from_string("1.");
- assert(st2.code == ICAL_UNKNOWN_STATUS);
-#endif
-}
-
-char ictt_str[1024];
-char* ictt_as_string(struct icaltimetype t)
-{
-
- sprintf(ictt_str,"%02d-%02d-%02d %02d:%02d:%02d%s",t.year,t.month,t.day,
- t.hour,t.minute,t.second,t.is_utc?" Z":"");
-
- return ictt_str;
-}
-
-
-char* ical_timet_string(time_t t)
-{
- struct tm stm = *(gmtime(&t));
-
- sprintf(ictt_str,"%02d-%02d-%02d %02d:%02d:%02d Z",stm.tm_year+1900,
- stm.tm_mon+1,stm.tm_mday,stm.tm_hour,stm.tm_min,stm.tm_sec);
-
- return ictt_str;
-
-}
-
-void do_test_time(char* zone)
-{
- struct icaltimetype ictt, icttutc, icttutczone, icttdayl,
- icttla, icttny,icttphoenix, icttlocal, icttnorm;
- time_t tt,tt2, tt_p200;
- int offset_la, offset_tz;
- icalvalue *v;
- short day_of_week,start_day_of_week, day_of_year;
-
- icalerror_errors_are_fatal = 0;
-
- ictt = icaltime_from_string("20001103T183030Z");
-
- tt = icaltime_as_timet(ictt);
-
- assert(tt==973276230); /* Fri Nov 3 10:30:30 PST 2000 in PST
- Fri Nov 3 18:30:30 PST 2000 in UTC */
-
- offset_la = icaltime_utc_offset(ictt,"America/Los_Angeles");
- offset_tz = icaltime_utc_offset(ictt, zone);
-
- printf(" Normalize \n");
- printf("Orig (ical) : %s\n", ictt_as_string(ictt));
- icttnorm = ictt;
- icttnorm.second -= 60 * 60 * 24 * 5;
- icttnorm = icaltime_normalize(icttnorm);
- printf("-5d in sec : %s\n", ictt_as_string(icttnorm));
- icttnorm.day += 60;
- icttnorm = icaltime_normalize(icttnorm);
- printf("+60 d : %s\n", ictt_as_string(icttnorm));
-
-
- printf("\n As time_t \n");
-
- tt2 = icaltime_as_timet(ictt);
- printf("20001103T183030Z (timet): %s\n",ical_timet_string(tt2));
- printf("20001103T183030Z : %s\n",ictt_as_string(ictt));
- assert(tt2 == tt);
-
- icttlocal = icaltime_from_string("20001103T183030");
- tt2 = icaltime_as_timet(icttlocal);
- printf("20001103T183030 (timet): %s\n",ical_timet_string(tt2));
- printf("20001103T183030 : %s\n",ictt_as_string(icttlocal));
- assert(tt-tt2 == offset_tz);
-
- printf("\n From time_t \n");
-
- printf("Orig : %s\n",ical_timet_string(tt));
- printf("As utc : %s\n", ictt_as_string(ictt));
-
- icttlocal = icaltime_as_zone(ictt,zone);
- printf("As local : %s\n", ictt_as_string(icttlocal));
-
-
- printf("\n Convert to and from lib c \n");
-
- printf("System time is: %s\n",ical_timet_string(tt));
-
- v = icalvalue_new_datetime(ictt);
-
- printf("System time from libical: %s\n",icalvalue_as_ical_string(v));
-
- tt2 = icaltime_as_timet(ictt);
- printf("Converted back to libc: %s\n",ical_timet_string(tt2));
-
- printf("\n Incrementing time \n");
-
- icttnorm = ictt;
-
- icttnorm.year++;
- tt2 = icaltime_as_timet(icttnorm);
- printf("Add a year: %s\n",ical_timet_string(tt2));
-
- icttnorm.month+=13;
- tt2 = icaltime_as_timet(icttnorm);
- printf("Add 13 months: %s\n",ical_timet_string(tt2));
-
- icttnorm.second+=90;
- tt2 = icaltime_as_timet(icttnorm);
- printf("Add 90 seconds: %s\n",ical_timet_string(tt2));
-
- printf("\n Day Of week \n");
-
- day_of_week = icaltime_day_of_week(ictt);
- start_day_of_week = icaltime_start_doy_of_week(ictt);
- day_of_year = icaltime_day_of_year(ictt);
-
-
- printf("Today is day of week %d, day of year %d\n",day_of_week,day_of_year);
- printf("Week started n doy of %d\n",start_day_of_week);
- assert(day_of_week == 6);
- assert(day_of_year == 308);
- assert(start_day_of_week == 303 );
-
- printf("\n TimeZone Conversions \n");
-
- icttla = icaltime_as_zone(ictt,"America/Los_Angeles");
- assert(icttla.hour == 10);
-
- icttutc = icaltime_as_utc(icttla,"America/Los_Angeles");
- assert(icaltime_compare(icttla,
- icaltime_from_string("20001103T103030"))==0);
-
- icttutczone = icaltime_as_zone(ictt,"Etc/GMT0");
- icttutczone.is_utc = 1;
- assert(icaltime_compare(icttutc, icttutczone) == 0);
- assert(icaltime_compare(icttutc, ictt) == 0);
-
- icttny = icaltime_as_zone(ictt,"America/New_York");
-
- icttphoenix = icaltime_as_zone(ictt,"America/Phoenix");
-
- printf("Orig (ctime): %s\n", ical_timet_string(tt) );
- printf("Orig (ical) : %s\n", ictt_as_string(ictt));
- printf("UTC : %s\n", ictt_as_string(icttutc));
- printf("Los Angeles : %s\n", ictt_as_string(icttla));
- printf("Phoenix : %s\n", ictt_as_string(icttphoenix));
- printf("New York : %s\n", ictt_as_string(icttny));
-
-
- /* Daylight savings test for New York */
- printf("\n Daylight Savings \n");
-
- printf("Orig (ctime): %s\n", ical_timet_string(tt) );
- printf("Orig (ical) : %s\n", ictt_as_string(ictt));
- printf("NY : %s\n", ictt_as_string(icttny));
-
- assert(strcmp(ictt_as_string(icttny),"2000-11-03 13:30:30")==0);
-
- tt_p200 = tt + 200 * 24 * 60 * 60 ; /* Add 200 days */
-
- icttdayl = icaltime_from_timet(tt_p200,0);
- icttny = icaltime_as_zone(icttdayl,"America/New_York");
-
- printf("Orig +200d : %s\n", ical_timet_string(tt_p200) );
- printf("NY+200D : %s\n", ictt_as_string(icttny));
-
- assert(strcmp(ictt_as_string(icttny),"2001-05-22 14:30:30")==0);
-
- /* Daylight savings test for Los Angeles */
-
- icttla = icaltime_as_zone(ictt,"America/Los_Angeles");
-
- printf("\nOrig (ctime): %s\n", ical_timet_string(tt) );
- printf("Orig (ical) : %s\n", ictt_as_string(ictt));
- printf("LA : %s\n", ictt_as_string(icttla));
-
- assert(strcmp(ictt_as_string(icttla),"2000-11-03 10:30:30")==0);
-
- icttla = icaltime_as_zone(icttdayl,"America/Los_Angeles");
-
- printf("Orig +200d : %s\n", ical_timet_string(tt_p200) );
- printf("LA+200D : %s\n", ictt_as_string(icttla));
-
- assert(strcmp(ictt_as_string(icttla),"2001-05-22 11:30:30")==0);
-
- icalerror_errors_are_fatal = 1;
-}
-
-void test_iterators()
-{
- icalcomponent *c,*inner,*next;
- icalcompiter i;
-
- c= icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_version("1"),0),
- icalcomponent_vanew(ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_version("2"),0),
- icalcomponent_vanew(ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_version("3"),0),
- icalcomponent_vanew(ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_version("4"),0),
- icalcomponent_vanew(ICAL_VTODO_COMPONENT,
- icalproperty_vanew_version("5"),0),
- icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT,
- icalproperty_vanew_version("6"),0),
- icalcomponent_vanew(ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_version("7"),0),
- icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT,
- icalproperty_vanew_version("8"),0),
- icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT,
- icalproperty_vanew_version("9"),0),
- icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT,
- icalproperty_vanew_version("10"),0),
- 0);
-
- printf("1: ");
-
- /* List all of the VEVENTS */
- for(i = icalcomponent_begin_component(c,ICAL_VEVENT_COMPONENT);
- icalcompiter_deref(&i)!= 0; icalcompiter_next(&i)){
-
- icalcomponent *this = icalcompiter_deref(&i);
-
- icalproperty *p =
- icalcomponent_get_first_property(this,
- ICAL_VERSION_PROPERTY);
- const char* s = icalproperty_get_version(p);
-
- printf("%s ",s);
-
- }
-
- printf("\n2: ");
-
-#if 0
- for(inner = icalcomponent_get_first_component(c,ICAL_VEVENT_COMPONENT);
- inner != 0;
- inner = next){
-
- next = icalcomponent_get_next_component(c,ICAL_VEVENT_COMPONENT);
-
- icalcomponent_remove_component(c,inner);
-
- icalcomponent_free(inner);
- }
-#endif
-
- /* Delete all of the VEVENTS */
- /* reset iterator */
- icalcomponent_get_first_component(c,ICAL_VEVENT_COMPONENT);
-
- while((inner=icalcomponent_get_current_component(c)) != 0 ){
- if(icalcomponent_isa(inner) == ICAL_VEVENT_COMPONENT){
- icalcomponent_remove_component(c,inner);
- } else {
- icalcomponent_get_next_component(c,ICAL_VEVENT_COMPONENT);
- }
- }
-
-
-
- /* List all remaining components */
- for(inner = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT);
- inner != 0;
- inner = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT)){
-
-
- icalproperty *p =
- icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY);
-
- const char* s = icalproperty_get_version(p);
-
- printf("%s ",s);
- }
-
- printf("\n3: ");
-
-
- /* Remove all remaining components */
- for(inner = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT);
- inner != 0;
- inner = next){
-
- icalcomponent *this;
- icalproperty *p;
- const char* s;
- next = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT);
-
- p=icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY);
- s = icalproperty_get_version(p);
- printf("rem:%s ",s);
-
- icalcomponent_remove_component(c,inner);
-
- this = icalcomponent_get_current_component(c);
-
- if(this != 0){
- p=icalcomponent_get_first_property(this,ICAL_VERSION_PROPERTY);
- s = icalproperty_get_version(p);
- printf("next:%s; ",s);
- }
-
- icalcomponent_free(inner);
- }
-
- printf("\n4: ");
-
-
- /* List all remaining components */
- for(inner = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT);
- inner != 0;
- inner = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT)){
-
- icalproperty *p =
- icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY);
-
- const char* s = icalproperty_get_version(p);
-
- printf("%s ",s);
- }
-
- printf("\n");
-}
-
-
-
-char* test_set_tz(const char* tzid)
-{
- char *tzstr = 0;
- char *tmp;
-
- /* Put the new time zone into the environment */
- if(getenv("TZ") != 0){
- tzstr = (char*)icalmemory_strdup(getenv("TZ"));
-
- if(tzstr == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
- }
-
- tmp = (char*)malloc(1024);
-
- if(tmp == 0){
- icalerror_set_errno(ICAL_NEWFAILED_ERROR);
- return 0;
- }
-
- snprintf(tmp,1024,"TZ=%s",tzid);
-
- /* HACK. In some libc versions, putenv gives the string to the
- system and in some it gives a copy, so the following might be a
- memory leak. THe linux man page says that glibc2.1.2 take
- ownership ( no leak) while BSD4.4 uses a copy ( A leak ) */
- putenv(tmp);
-
- return tzstr; /* This will be zero if the TZ env var was not set */
-}
-
-void test_unset_tz(char* tzstr)
-{
- /* restore the original environment */
-
- if(tzstr!=0){
- char temp[1024];
- snprintf(temp,1024,"TZ=%s",tzstr);
- putenv(temp);
- free(tzstr);
- } else {
- putenv("TZ"); /* Delete from environment */
- }
-}
-
-
-void test_time()
-{
- char zones[6][40] = { "America/Los_Angeles","America/New_York","Europe/London","Asia/Shanghai", ""};
- int i;
- char* old_tz;
- int orig_month;
- time_t tt;
- struct tm stm;
-
- tt = time(0);
-
- stm = *(localtime(&tt));
-
- orig_month = stm.tm_mon;
-
- do_test_time(0);
-
- old_tz = test_set_tz(zones[0]);
-
- for(i = 0; zones[i][0] != 0; i++){
-
- if(zones[i][0] != 0){
- test_set_tz(zones[i]);
- }
-
- printf(" ######### Timezone: %s ############\n",zones[i]);
-
- do_test_time(zones[i]);
-
- }
-
- test_unset_tz(old_tz);
-
-}
-
-
-void test_icalset()
-{
- icalcomponent *c;
-
- icalset* f = icalset_new_file("2446.ics");
- icalset* d = icalset_new_dir("outdir");
-
- assert(f!=0);
- assert(d!=0);
-
- for(c = icalset_get_first_component(f);
- c != 0;
- c = icalset_get_next_component(f)){
-
- icalcomponent *clone;
-
- clone = icalcomponent_new_clone(c);
-
- icalset_add_component(d,clone);
-
- printf(" class %d\n",icalclassify(c,0,"user"));
-
- }
-}
-
-void test_classify()
-{
- icalcomponent *c,*match;
-
- icalset* f = icalset_new_file("../../test-data/classify.ics");
-
- assert(f!=0);
-
- c = icalset_get_first_component(f);
- match = icalset_get_next_component(f);
-
- printf("Class %d\n",icalclassify(c,match,"A@example.com"));
-
-
-}
-
-void print_span(int c, struct icaltime_span span ){
-
- printf("#%02d start: %s\n",c,ical_timet_string(span.start));
- printf(" end : %s\n",ical_timet_string(span.end));
-
-}
-
-struct icaltimetype icaltime_as_local(struct icaltimetype tt) {
- return icaltime_as_zone(tt,0);
-}
-
-void test_span()
-{
- time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000,
- Sat Nov 4 15:00:00 PST 2000 */
- time_t tm2 = 973382400; /*Sat Nov 5 00:00:00 UTC 2000
- Sat Nov 4 16:00:00 PST 2000 */
- struct icaldurationtype dur;
- struct icaltime_span span;
- icalcomponent *c;
-
- memset(&dur,0,sizeof(dur));
- dur.minutes = 30;
-
- span.start = tm1;
- span.end = tm2;
- print_span(0,span);
-
- /* Specify save timezone as in commend above */
- c =
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(
- icaltime_as_local(icaltime_from_timet(tm1,0)),
- icalparameter_new_tzid("US/Pacific"),0),
- icalproperty_vanew_dtend(
- icaltime_as_local(icaltime_from_timet(tm2,0)),
- icalparameter_new_tzid("US/Pacific"),0),
- 0
- );
-
- printf("%s\n",icalcomponent_as_ical_string(c));
-
- span = icalcomponent_get_span(c);
-
- print_span(1,span);
-
- icalcomponent_free(c);
-
- /* Use machine's local timezone. Same as above if run in US/Pacific */
- c =
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0),0),
- icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),0),
- 0
- );
-
- span = icalcomponent_get_span(c);
-
- print_span(2,span);
-
- icalcomponent_free(c);
-
- /* Specify different timezone */
- c =
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(
- icaltime_as_local(icaltime_from_timet(tm1,0)),
- icalparameter_new_tzid("US/Eastern"),0),
- icalproperty_vanew_dtend(
- icaltime_as_local(icaltime_from_timet(tm2,0)),
- icalparameter_new_tzid("US/Eastern"),0),
- 0
- );
- span = icalcomponent_get_span(c);
- print_span(3,span);
-
- icalcomponent_free(c);
-
-
- /* Specify different timezone for start and end*/
- c =
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(
- icaltime_as_local(icaltime_from_timet(tm1,0)),
- icalparameter_new_tzid("US/Eastern"),0),
- icalproperty_vanew_dtend(
- icaltime_as_local(icaltime_from_timet(tm2,0)),
- icalparameter_new_tzid("US/Pacific"),0),
- 0
- );
- span = icalcomponent_get_span(c);
- print_span(4,span);
-
- icalcomponent_free(c);
-
- /* Use Duration */
- c =
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(
- icaltime_as_local(icaltime_from_timet(tm1,0)),
- icalparameter_new_tzid("US/Pacific"),0),
- icalproperty_new_duration(dur),
-
- 0
- );
- span = icalcomponent_get_span(c);
- print_span(5,span);
-
- icalcomponent_free(c);
-
-
-#ifndef ICAL_ERRORS_ARE_FATAL
- /* Both UTC and Timezone -- an error */
- icalerror_clear_errno();
- c =
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0),
- icalparameter_new_tzid("US/Eastern"),0),
- icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),
- icalparameter_new_tzid("US/Eastern"),0),
- 0
- );
-
- span = icalcomponent_get_span(c);
- assert(icalerrno != ICAL_NO_ERROR);
-
- icalcomponent_free(c);
-
-#endif /*ICAL_ERRORS_ARE_FATAL*/
-
-}
-
-icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp);
-
-void test_overlaps()
-{
-
-#if 0 /* Hack, not working right now */
- icalcomponent *cset,*c;
- icalset *set;
- time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000,
- Sat Nov 4 15:00:00 PST 2000 */
- time_t tm2 = 973382400; /*Sat Nov 5 00:00:00 UTC 2000
- Sat Nov 4 16:00:00 PST 2000 */
-
- time_t hh = 1800; /* one half hour */
-
- set = icalset_new_file("../../test-data/overlaps.ics");
-
- printf("-- 1 -- \n");
- c = icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),0),
- icalproperty_vanew_dtend(icaltime_from_timet(tm2-hh,0),0),
- 0
- );
-
- cset = icalclassify_find_overlaps(set,c);
-
- printf("%s\n",icalcomponent_as_ical_string(cset));
-
- printf("-- 2 -- \n");
- c = icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),0),
- icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),0),
- 0
- );
-
- cset = icalclassify_find_overlaps(set,c);
-
- printf("%s\n",icalcomponent_as_ical_string(cset));
-
- printf("-- 3 -- \n");
- c = icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_dtstart(icaltime_from_timet(tm1+5*hh,0),0),
- icalproperty_vanew_dtend(icaltime_from_timet(tm2+5*hh,0),0),
- 0
- );
-
- cset = icalclassify_find_overlaps(set,c);
-
- printf("%s\n",icalcomponent_as_ical_string(cset));
-
-#endif
-
-}
-
-void test_fblist()
-{
- icalspanlist *sl;
- icalset* set = icalset_new_file("../../test-data/spanlist.ics");
- struct icalperiodtype period;
-
- sl = icalspanlist_new(set,
- icaltime_from_string("19970324T120000Z"),
- icaltime_from_string("19990424T020000Z"));
-
- printf("Restricted spanlist\n");
- icalspanlist_dump(sl);
-
- period= icalspanlist_next_free_time(sl,
- icaltime_from_string("19970801T120000Z"));
-
-
- printf("Next Free time: %s\n",icaltime_as_ctime(period.start));
- printf(" %s\n",icaltime_as_ctime(period.end));
-
-
- icalspanlist_free(sl);
-
- printf("Unrestricted spanlist\n");
-
- sl = icalspanlist_new(set,
- icaltime_from_string("19970324T120000Z"),
- icaltime_null_time());
-
- printf("Restricted spanlist\n");
-
- icalspanlist_dump(sl);
-
- period= icalspanlist_next_free_time(sl,
- icaltime_from_string("19970801T120000Z"));
-
-
- printf("Next Free time: %s\n",icaltime_as_ctime(period.start));
- printf(" %s\n",icaltime_as_ctime(period.end));
-
-
- icalspanlist_free(sl);
-
-
-}
-
-void test_convenience(){
-
- icalcomponent *c;
- int duration;
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(icaltime_from_string("19970801T120000")),
- icalproperty_new_dtend(icaltime_from_string("19970801T130000")),
- 0
- ),
- 0);
-
- printf("** 1 DTSTART and DTEND **\n%s\n\n",
- icalcomponent_as_ical_string(c));
-
- duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60;
-
- printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
- printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
- printf("Dur: %d m\n",duration);
-
- icalcomponent_free(c);
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(icaltime_from_string("19970801T120000Z")),
- icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")),
- 0
- ),
- 0);
-
- printf("\n** 2 DTSTART and DURATION **\n%s\n\n",
- icalcomponent_as_ical_string(c));
-
- duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60;
-
- printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
- printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
- printf("Dur: %d m\n",duration);
-
- icalcomponent_free(c);
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(icaltime_from_string("19970801T120000")),
- icalproperty_new_dtend(icaltime_from_string("19970801T130000")),
- 0
- ),
- 0);
-
- icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M"));
-
- printf("** 3 DTSTART and DTEND, Set DURATION **\n%s\n\n",
- icalcomponent_as_ical_string(c));
-
- duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60;
-
- printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
- printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
- printf("Dur: %d m\n",duration);
-
- icalcomponent_free(c);
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(icaltime_from_string("19970801T120000Z")),
- icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")),
- 0
- ),
- 0);
-
- icalcomponent_set_dtend(c,icaltime_from_string("19970801T133000Z"));
-
- printf("\n** 4 DTSTART and DURATION, set DTEND **\n%s\n\n",
- icalcomponent_as_ical_string(c));
-
- duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60;
-
- printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
- printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
- printf("Dur: %d m\n",duration);
-
- icalcomponent_free(c);
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- 0
- ),
- 0);
-
- icalcomponent_set_dtstart(c,icaltime_from_string("19970801T120000Z"));
- icalcomponent_set_dtend(c,icaltime_from_string("19970801T133000Z"));
-
- printf("\n** 5 Set DTSTART and DTEND **\n%s\n\n",
- icalcomponent_as_ical_string(c));
-
-
- duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60;
-
- printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
- printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
- printf("Dur: %d m\n",duration);
-
- icalcomponent_free(c);
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- 0
- ),
- 0);
-
-
- icalcomponent_set_dtstart(c,icaltime_from_string("19970801T120000Z"));
- icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M"));
-
- printf("\n** 6 Set DTSTART and DURATION **\n%s\n\n",
- icalcomponent_as_ical_string(c));
-
-
- duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60;
-
- printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
- printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
- printf("Dur: %d m\n",duration);
-
- icalcomponent_free(c);
-
-}
-
-void test_time_parser()
-{
- struct icaltimetype tt;
-
- icalerror_errors_are_fatal = 0;
-
- tt = icaltime_from_string("19970101T1000");
- assert(icaltime_is_null_time(tt));
-
- tt = icaltime_from_string("19970101X100000");
- assert(icaltime_is_null_time(tt));
-
- tt = icaltime_from_string("19970101T100000");
- assert(!icaltime_is_null_time(tt));
- printf("%s\n",icaltime_as_ctime(tt));
-
- tt = icaltime_from_string("19970101T100000Z");
- assert(!icaltime_is_null_time(tt));
- printf("%s\n",icaltime_as_ctime(tt));
-
- tt = icaltime_from_string("19970101");
- assert(!icaltime_is_null_time(tt));
- printf("%s\n",icaltime_as_ctime(tt));
-
- icalerror_errors_are_fatal = 1;
-
-}
-
-void test_recur_parser()
-{
- struct icalrecurrencetype rt;
-
- printf("FREQ=YEARLY;UNTIL=20000131T090000Z;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,SA\n");
-
- rt = icalrecurrencetype_from_string("FREQ=YEARLY;UNTIL=20000131T090000Z;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,SA");
-
- printf("%s\n\n",icalrecurrencetype_as_string(&rt));
-
- printf("FREQ=DAILY;COUNT=3;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,S\n");
-
- rt = icalrecurrencetype_from_string("FREQ=DAILY;COUNT=3;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,SA");
-
- printf("%s\n",icalrecurrencetype_as_string(&rt));
-
-}
-
-char* ical_strstr(const char *haystack, const char *needle){
- return strstr(haystack,needle);
-}
-
-void test_doy()
-{
- struct icaltimetype tt1, tt2;
- short doy;
-
- tt1 = icaltime_from_string("19950301");
- doy = icaltime_day_of_year(tt1);
- tt2 = icaltime_from_day_of_year(doy,1995);
- printf("%d %s %s\n",doy, icaltime_as_ctime(tt1),icaltime_as_ctime(tt2));
- assert(tt2.day == 1 && tt2.month == 3);
- assert(doy == 60);
-
- tt1 = icaltime_from_string("19960301");
- doy = icaltime_day_of_year(tt1);
- tt2 = icaltime_from_day_of_year(doy,1996);
- printf("%d %s %s\n",doy, icaltime_as_ctime(tt1),icaltime_as_ctime(tt2));
- assert(tt2.day == 1 && tt2.month == 3);
- assert(doy == 61);
-
- tt1 = icaltime_from_string("19970301");
- doy = icaltime_day_of_year(tt1);
- tt2 = icaltime_from_day_of_year(doy,1997);
- printf("%d %s %s\n",doy, icaltime_as_ctime(tt1),icaltime_as_ctime(tt2));
- assert(tt2.day == 1 && tt2.month == 3);
- assert(doy == 60);
-
-}
-
-
-void test_x(){
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ical.h>
-
- static const char test_icalcomp_str[] =
-"BEGIN:VEVENT\r\n"
-"RRULE\r\n"
-" ;X-EVOLUTION-ENDDATE=20030209T081500\r\n"
-" :FREQ=DAILY;COUNT=10;INTERVAL=6\r\n"
-"X-COMMENT;X-FOO=BAR: Booga\r\n"
-"END:VEVENT\r\n";
-
- icalcomponent *icalcomp;
- icalproperty *prop;
- struct icalrecurrencetype recur;
- int n_errors;
-
- icalcomp = icalparser_parse_string ((char *) test_icalcomp_str);
- if (!icalcomp) {
- fprintf (stderr, "main(): could not parse the component\n");
- exit (EXIT_FAILURE);
- }
-
- printf("%s\n\n",icalcomponent_as_ical_string(icalcomp));
-
- n_errors = icalcomponent_count_errors (icalcomp);
- if (n_errors) {
- icalproperty *p;
-
- for (p = icalcomponent_get_first_property (icalcomp,
- ICAL_XLICERROR_PROPERTY);
- p;
- p = icalcomponent_get_next_property (icalcomp,
- ICAL_XLICERROR_PROPERTY)) {
- char *str;
-
- str = icalproperty_as_ical_string (p);
- fprintf (stderr, "error: %s\n", str);
- }
- }
-
- prop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY);
- if (!prop) {
- fprintf (stderr, "main(): could not get the RRULE property");
- exit (EXIT_FAILURE);
- }
-
- recur = icalproperty_get_rrule (prop);
-
- printf("%s\n",icalrecurrencetype_as_string(&recur));
-
-}
-
-void test_gauge_sql() {
-
-
- icalgauge *g;
-
- printf("\nSELECT DTSTART,DTEND,COMMENT FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5\n");
-
- g = icalgauge_new_from_sql("SELECT DTSTART,DTEND,COMMENT FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5");
-
- icalgauge_dump(g);
-
- icalgauge_free(g);
-
- printf("\nSELECT * FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5 OR METHOD != 'CREATE'\n");
-
- g = icalgauge_new_from_sql("SELECT * FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5 OR METHOD != 'CREATE'");
-
- icalgauge_dump(g);
-
- icalgauge_free(g);
-
-}
-
-void test_gauge_compare() {
-
- icalgauge *g;
- icalcomponent *c;
-
- /* Equality */
-
- c = icalcomponent_vanew(ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(
- icaltime_from_string("20000101T000002")),0),0);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000002'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART = '20000101T000002'\n");
- assert(c!=0);
- assert(g!=0);
-
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000001'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART = '20000101T000001'\n");
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 0);
-
- icalgauge_free(g);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART != '20000101T000003'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART != '20000101T000003'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
-
- /* Less than */
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART < '20000101T000003'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART < '20000101T000003'\n");
-
- assert(icalgauge_compare(g,c) == 1);
-
- assert(g!=0);
- icalgauge_free(g);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART < '20000101T000002'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART < '20000101T000002'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 0);
-
- icalgauge_free(g);
-
- /* Greater than */
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000001'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART > '20000101T000001'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000002'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART > '20000101T000002'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 0);
-
- icalgauge_free(g);
-
-
- /* Greater than or Equal to */
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000002'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000002'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000003'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000003'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 0);
-
- icalgauge_free(g);
-
- /* Less than or Equal to */
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000002'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000002'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000001'");
-
- printf("SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000001'\n");
-
-
- assert(g!=0);
- assert(icalgauge_compare(g,c) == 0);
-
- icalgauge_free(g);
-
- icalcomponent_free(c);
-
-
- /* Complex comparisions */
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_method(ICAL_METHOD_REQUEST),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(
- icaltime_from_string("20000101T000002")),
- icalproperty_new_comment("foo"),
- icalcomponent_vanew(
- ICAL_VALARM_COMPONENT,
- icalproperty_new_dtstart(
- icaltime_from_string("20000101T120000")),
-
- 0),
- 0),
- 0);
-
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE VALARM.DTSTART = '20000101T120000'");
-
- printf("SELECT * FROM VEVENT WHERE VALARM.DTSTART = '20000101T120000'\n");
-
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE COMMENT = 'foo'");
-
- printf("SELECT * FROM VEVENT WHERE COMMENT = 'foo'\n");
-
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
-
- g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE COMMENT = 'foo' AND VALARM.DTSTART = '20000101T120000'");
-
- printf("SELECT * FROM VEVENT WHERE COMMENT = 'foo' AND VALARM.DTSTART = '20000101T120000'\n");
-
- assert(icalgauge_compare(g,c) == 1);
-
- icalgauge_free(g);
-
- icalcomponent_free(c);
-
-}
-
-icalcomponent* make_component(int i){
-
- icalcomponent *c;
-
- struct icaltimetype t = icaltime_from_string("20000101T120000Z");
-
- t.day += i;
-
- icaltime_normalize(t);
-
- c = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_method(ICAL_METHOD_REQUEST),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_dtstart(t),
- 0),
- 0);
-
- assert(c != 0);
-
- return c;
-
-}
-void test_fileset()
-{
- icalfileset *fs;
- icalcomponent *c;
- int i;
- char *path = "test_fileset.ics";
- icalgauge *g = icalgauge_new_from_sql(
- "SELECT * FROM VEVENT WHERE DTSTART > '20000103T120000Z' AND DTSTART <= '20000106T120000Z'");
-
-
- unlink(path);
-
- fs = icalfileset_new(path);
-
- assert(fs != 0);
-
- for (i = 0; i!= 10; i++){
- c = make_component(i);
- icalfileset_add_component(fs,c);
- }
-
- icalfileset_commit(fs);
-
- icalfileset_free(fs);
- fs = icalfileset_new(path);
-
-
- printf("== No Selections \n");
-
- for (c = icalfileset_get_first_component(fs);
- c != 0;
- c = icalfileset_get_next_component(fs)){
- struct icaltimetype t = icalcomponent_get_dtstart(c);
-
- printf("%s\n",icaltime_as_ctime(t));
- }
-
- icalfileset_select(fs,g);
-
- printf("\n== DTSTART > '20000103T120000Z' AND DTSTART <= '20000106T120000Z' \n");
-
- for (c = icalfileset_get_first_component(fs);
- c != 0;
- c = icalfileset_get_next_component(fs)){
- struct icaltimetype t = icalcomponent_get_dtstart(c);
-
- printf("%s\n",icaltime_as_ctime(t));
- }
-
- icalfileset_free(fs);
-
-}
-
-void microsleep(int us)
-{
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = us;
-
- select(0,0,0,0,&tv);
-
-}
-
-
-void test_file_locks()
-{
- pid_t pid;
- char *path = "test_fileset_locktest.ics";
- icalfileset *fs;
- icalcomponent *c, *c2;
- struct icaldurationtype d;
- int i;
- int final,sec;
-
- icalfileset_safe_saves = 1;
-
- icalerror_clear_errno();
-
- unlink(path);
-
- fs = icalfileset_new(path);
-
- if(icalfileset_get_first_component(fs)==0){
- c = make_component(0);
-
- d = icaldurationtype_from_int(1);
-
- icalcomponent_set_duration(c,d);
-
- icalfileset_add_component(fs,c);
-
- c2 = icalcomponent_new_clone(c);
-
- icalfileset_add_component(fs,c2);
-
- icalfileset_commit(fs);
- }
-
- icalfileset_free(fs);
-
- assert(icalerrno == ICAL_NO_ERROR);
-
- pid = fork();
-
- assert(pid >= 0);
-
- if(pid == 0){
- /*child*/
- int i;
-
- microsleep(rand()/(RAND_MAX/100));
-
- for(i = 0; i< 50; i++){
- fs = icalfileset_new(path);
-
-
- assert(fs != 0);
-
- c = icalfileset_get_first_component(fs);
-
- assert(c!=0);
-
- d = icalcomponent_get_duration(c);
- d = icaldurationtype_from_int(icaldurationtype_as_int(d)+1);
-
- icalcomponent_set_duration(c,d);
- icalcomponent_set_summary(c,"Child");
-
- c2 = icalcomponent_new_clone(c);
- icalcomponent_set_summary(c2,"Child");
- icalfileset_add_component(fs,c2);
-
- icalfileset_mark(fs);
- icalfileset_commit(fs);
-
- icalfileset_free(fs);
-
- microsleep(rand()/(RAND_MAX/20));
-
-
- }
-
- exit(0);
-
- } else {
- /* parent */
- int i;
-
- for(i = 0; i< 50; i++){
- fs = icalfileset_new(path);
-
- assert(fs != 0);
-
- c = icalfileset_get_first_component(fs);
-
- assert(c!=0);
-
- d = icalcomponent_get_duration(c);
- d = icaldurationtype_from_int(icaldurationtype_as_int(d)+1);
-
- icalcomponent_set_duration(c,d);
- icalcomponent_set_summary(c,"Parent");
-
- c2 = icalcomponent_new_clone(c);
- icalcomponent_set_summary(c2,"Parent");
- icalfileset_add_component(fs,c2);
-
- icalfileset_mark(fs);
- icalfileset_commit(fs);
- icalfileset_free(fs);
-
- putc('.',stdout);
- fflush(stdout);
-
- }
- }
-
- assert(waitpid(pid,0,0)==pid);
-
-
- fs = icalfileset_new(path);
-
- i=1;
-
- c = icalfileset_get_first_component(fs);
- final = icaldurationtype_as_int(icalcomponent_get_duration(c));
- for (c = icalfileset_get_next_component(fs);
- c != 0;
- c = icalfileset_get_next_component(fs)){
- struct icaldurationtype d = icalcomponent_get_duration(c);
- sec = icaldurationtype_as_int(d);
-
- /*printf("%d,%d ",i,sec);*/
- assert(i == sec);
- i++;
- }
-
- printf("\nFinal: %d\n",final);
-
-
- assert(sec == final);
-}
-
-void test_action()
-{
- icalcomponent *c;
- icalproperty *p;
-
- static const char test_icalcomp_str[] =
-"BEGIN:VEVENT\n"
-"ACTION:EMAIL\n"
-"ACTION:PROCEDURE\n"
-"ACTION:AUDIO\n"
-"ACTION:FUBAR\n"
-"END:VEVENT\r\n";
-
-
- c = icalparser_parse_string ((char *) test_icalcomp_str);
- if (!c) {
- fprintf (stderr, "main(): could not parse the component\n");
- exit (EXIT_FAILURE);
- }
-
- printf("%s\n\n",icalcomponent_as_ical_string(c));
-
- p = icalcomponent_get_first_property(c,ICAL_ACTION_PROPERTY);
-
- assert(icalproperty_get_action(p) == ICAL_ACTION_EMAIL);
-
- p = icalcomponent_get_next_property(c,ICAL_ACTION_PROPERTY);
-
- assert(icalproperty_get_action(p) == ICAL_ACTION_PROCEDURE);
-
- p = icalcomponent_get_next_property(c,ICAL_ACTION_PROPERTY);
-
- assert(icalproperty_get_action(p) == ICAL_ACTION_AUDIO);
-
- p = icalcomponent_get_next_property(c,ICAL_ACTION_PROPERTY);
-
- assert(icalproperty_get_action(p) == ICAL_ACTION_X);
- assert(regrstrcmp(icalvalue_get_x(icalproperty_get_value(p)), "FUBAR")==0);
-
-
-}
-
-
-
-void test_trigger()
-{
-
- struct icaltriggertype tr;
- icalcomponent *c;
- icalproperty *p;
- char* str;
-
- static const char test_icalcomp_str[] =
-"BEGIN:VEVENT\n"
-"TRIGGER;VALUE=DATE-TIME:19980403T120000\n"
-"TRIGGER:-PT15M\n"
-"TRIGGER:19980403T120000\n"
-"TRIGGER;VALUE=DURATION:-PT15M\n"
-"END:VEVENT\r\n";
-
-
- c = icalparser_parse_string ((char *) test_icalcomp_str);
- if (!c) {
- fprintf (stderr, "main(): could not parse the component\n");
- exit (EXIT_FAILURE);
- }
-
- printf("%s\n\n",icalcomponent_as_ical_string(c));
-
- for(p = icalcomponent_get_first_property(c,ICAL_TRIGGER_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(c,ICAL_TRIGGER_PROPERTY)){
- tr = icalproperty_get_trigger(p);
-
- if(!icaltime_is_null_time(tr.time)){
- printf("value=DATE-TIME:%s\n", icaltime_as_ical_string(tr.time));
- } else {
- printf("value=DURATION:%s\n", icaldurationtype_as_ical_string(tr.duration));
- }
- }
-
- /* Trigger, as a DATETIME */
- tr.duration = icaldurationtype_null_duration();
- tr.time = icaltime_from_string("19970101T120000");
- p = icalproperty_new_trigger(tr);
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
- /* TRIGGER, as a DURATION */
- tr.time = icaltime_null_time();
- tr.duration = icaldurationtype_from_string("P3DT3H50M45S");
- p = icalproperty_new_trigger(tr);
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DURATION\n :P3DT3H50M45S\n",str) == 0);
- icalproperty_free(p);
-
- /* TRIGGER, as a DATETIME, VALUE=DATETIME*/
- tr.duration = icaldurationtype_null_duration();
- tr.time = icaltime_from_string("19970101T120000");
- p = icalproperty_new_trigger(tr);
- icalproperty_add_parameter(p,icalparameter_new_value( ICAL_VALUE_DATETIME));
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
- /*TRIGGER, as a DURATION, VALUE=DATETIME */
- tr.time = icaltime_null_time();
- tr.duration = icaldurationtype_from_string("P3DT3H50M45S");
- p = icalproperty_new_trigger(tr);
- icalproperty_add_parameter(p,icalparameter_new_value( ICAL_VALUE_DATETIME ));
-
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DURATION\n :P3DT3H50M45S\n",str) == 0);
- icalproperty_free(p);
-
- /* TRIGGER, as a DATETIME, VALUE=DURATION*/
- tr.duration = icaldurationtype_null_duration();
- tr.time = icaltime_from_string("19970101T120000");
- p = icalproperty_new_trigger(tr);
- icalproperty_add_parameter(p,icalparameter_new_value( ICAL_VALUE_DURATION));
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
- /*TRIGGER, as a DURATION, VALUE=DURATION */
- tr.time = icaltime_null_time();
- tr.duration = icaldurationtype_from_string("P3DT3H50M45S");
- p = icalproperty_new_trigger(tr);
- icalproperty_add_parameter(p,icalparameter_new_value( ICAL_VALUE_DURATION));
-
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DURATION\n :P3DT3H50M45S\n",str) == 0);
- icalproperty_free(p);
-
-
- /* TRIGGER, as a DATETIME, VALUE=BINARY */
- tr.duration = icaldurationtype_null_duration();
- tr.time = icaltime_from_string("19970101T120000");
- p = icalproperty_new_trigger(tr);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY));
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
- /*TRIGGER, as a DURATION, VALUE=BINARY */
- tr.time = icaltime_null_time();
- tr.duration = icaldurationtype_from_string("P3DT3H50M45S");
- p = icalproperty_new_trigger(tr);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY));
-
- str = icalproperty_as_ical_string(p);
-
- printf("%s\n",str);
- assert(regrstrcmp("TRIGGER\n ;VALUE=DURATION\n :P3DT3H50M45S\n",str) == 0);
- icalproperty_free(p);
-
-
-
-}
-
-void test_rdate()
-{
-
- struct icaldatetimeperiodtype dtp;
- icalproperty *p;
- char* str;
- struct icalperiodtype period;
-
- period.start = icaltime_from_string("19970101T120000");
- period.end = icaltime_null_time();
- period.duration = icaldurationtype_from_string("PT3H10M15S");
-
- /* RDATE, as DATE-TIME */
- dtp.time = icaltime_from_string("19970101T120000");
- dtp.period = icalperiodtype_null_period();
- p = icalproperty_new_rdate(dtp);
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
-
- /* RDATE, as PERIOD */
- dtp.time = icaltime_null_time();
- dtp.period = period;
- p = icalproperty_new_rdate(dtp);
-
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=PERIOD\n :19970101T120000/PT3H10M15S\n",str) == 0);
- icalproperty_free(p);
-
- /* RDATE, as DATE-TIME, VALUE=DATE-TIME */
- dtp.time = icaltime_from_string("19970101T120000");
- dtp.period = icalperiodtype_null_period();
- p = icalproperty_new_rdate(dtp);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_DATETIME));
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
-
- /* RDATE, as PERIOD, VALUE=DATE-TIME */
- dtp.time = icaltime_null_time();
- dtp.period = period;
- p = icalproperty_new_rdate(dtp);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_DATETIME));
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=PERIOD\n :19970101T120000/PT3H10M15S\n",str) == 0);
- icalproperty_free(p);
-
-
- /* RDATE, as DATE-TIME, VALUE=PERIOD */
- dtp.time = icaltime_from_string("19970101T120000");
- dtp.period = icalperiodtype_null_period();
- p = icalproperty_new_rdate(dtp);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_PERIOD));
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
-
- /* RDATE, as PERIOD, VALUE=PERIOD */
- dtp.time = icaltime_null_time();
- dtp.period = period;
- p = icalproperty_new_rdate(dtp);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_PERIOD));
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=PERIOD\n :19970101T120000/PT3H10M15S\n",str) == 0);
- icalproperty_free(p);
-
-
- /* RDATE, as DATE-TIME, VALUE=BINARY */
- dtp.time = icaltime_from_string("19970101T120000");
- dtp.period = icalperiodtype_null_period();
- p = icalproperty_new_rdate(dtp);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY));
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=DATE-TIME\n :19970101T120000\n",str) == 0);
- icalproperty_free(p);
-
-
- /* RDATE, as PERIOD, VALUE=BINARY */
- dtp.time = icaltime_null_time();
- dtp.period = period;
- p = icalproperty_new_rdate(dtp);
- icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY));
- str = icalproperty_as_ical_string(p);
- printf("%s\n",str);
- assert(regrstrcmp("RDATE\n ;VALUE=PERIOD\n :19970101T120000/PT3H10M15S\n",str) == 0);
- icalproperty_free(p);
-
-
-}
-
-
-void test_langbind()
-{
- icalcomponent *c, *inner;
- icalproperty *p;
-
- static const char test_str[] =
-"BEGIN:VEVENT\n"
-"ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\n"
-"COMMENT: Comment that \n spans a line\n"
-"DTSTART:19970101T120000\n"
-"DTSTART:19970101T120000Z\n"
-"DTSTART:19970101\n"
-"DURATION:P3DT4H25M\n"
-"FREEBUSY:19970101T120000/19970101T120000\n"
-"FREEBUSY:19970101T120000/P3DT4H25M\n"
-"END:VEVENT\n";
-
-
- printf("%s\n",test_str);
-
- c = icalparser_parse_string(test_str);
- inner = icalcomponent_get_inner(c);
-
-
- for(
- p = icallangbind_get_first_property(inner,"ANY");
- p != 0;
- p = icallangbind_get_next_property(inner,"ANY")
- ) {
-
- printf("%s\n",icallangbind_property_eval_string(p,":"));
- }
-
-
-
- p = icalcomponent_get_first_property(inner,ICAL_ATTENDEE_PROPERTY);
-
- icalproperty_set_parameter_from_string(p,"CUTYPE","INDIVIDUAL");
-
- printf("%s\n",icalproperty_as_ical_string(p));
-
-
- icalproperty_set_value_from_string(p,"mary@foo.org","TEXT");
-
- printf("%s\n",icalproperty_as_ical_string(p));
-
-}
-
-void test_property_parse()
-{
- icalproperty *p;
-
- p= icalproperty_new_from_string(
- "ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com");
-
- assert (p != 0);
- printf("%s\n",icalproperty_as_ical_string(p));
-
-
- p= icalproperty_new_from_string("DTSTART:19970101T120000Z\n");
-
- assert (p != 0);
- printf("%s\n",icalproperty_as_ical_string(p));
-
-}
-
-
-void test_value_parameter()
-{
-
- icalcomponent *c;
- icalproperty *p;
- icalparameter *param;
-
- static const char test_icalcomp_str[] =
-"BEGIN:VEVENT\n"
-"DTSTART;VALUE=DATE-TIME:19971123T123000\n"
-"DTSTART;VALUE=DATE:19971123\n"
-"DTSTART;VALUE=FOO:19971123T123000\n"
-"END:VEVENT\n";
-
- c = icalparser_parse_string ((char *) test_icalcomp_str);
- if (!c) {
- fprintf (stderr, "main(): could not parse the component\n");
- exit (EXIT_FAILURE);
- }
-
- printf("%s",icalcomponent_as_ical_string(c));
-
- p = icalcomponent_get_first_property(c,ICAL_DTSTART_PROPERTY);
- param = icalproperty_get_first_parameter(p,ICAL_VALUE_PARAMETER);
- assert(icalparameter_get_value(param) == ICAL_VALUE_DATETIME);
-
- p = icalcomponent_get_next_property(c,ICAL_DTSTART_PROPERTY);
- param = icalproperty_get_first_parameter(p,ICAL_VALUE_PARAMETER);
- assert(icalparameter_get_value(param) == ICAL_VALUE_DATE);
-
-}
-
-
-void test_x_property()
-{
- icalproperty *p;
-
- p= icalproperty_new_from_string(
- "X-LIC-PROPERTY: This is a note");
-
- printf("%s\n",icalproperty_as_ical_string(p));
-
- assert(icalproperty_isa(p) == ICAL_X_PROPERTY);
- assert(regrstrcmp(icalproperty_get_x_name(p),"X-LIC-PROPERTY")==0);
- assert(regrstrcmp(icalproperty_get_x(p)," This is a note")==0);
-
-}
-
-int main(int argc, char *argv[])
-{
- int c;
- extern char *optarg;
- extern int optopt;
- int errflg=0;
- char* program_name = strrchr(argv[0],'/');
- int ttime=0, trecur=0,tspan=0, tmisc=0, tgauge = 0, tfile = 0,
- tbasic = 0;
-
- if(argc==1) {
- ttime = trecur = tspan = tmisc = tgauge = tfile = tbasic = 1;
- }
-
- while ((c = getopt(argc, argv, "t:s:r:m:g:f:b:")) != -1) {
- switch (c) {
-
- case 'b': {
- tbasic = atoi(optarg);
- break;
- }
-
- case 't': {
- ttime = atoi(optarg);
- break;
- }
-
- case 's': {
- tspan = atoi(optarg);
- break;
- }
-
- case 'r': {
- trecur = atoi(optarg);
- break;
- }
-
-
- case 'm': {
- tmisc = atoi(optarg);
- break;
- }
-
-
- case 'g': {
- tgauge = atoi(optarg);
- break;
- }
-
- case 'f': {
- tfile = atoi(optarg);
- break;
- }
-
- case ':': {/* Option given without an operand */
- fprintf(stderr,
- "%s: Option -%c requires an operand\n",
- program_name,optopt);
- errflg++;
- break;
- }
- case '?': {
- errflg++;
- }
-
- }
-
- }
-
-
- if(ttime==1 || ttime==2){
- printf("\n------------Test time parser ----------\n");
- test_time_parser();
-
- }
-
- if(ttime==1 || ttime==3){
- printf("\n------------Test time----------------\n");
- test_time();
- }
-
- if(ttime==1 || ttime==4){
- printf("\n------------Test day of year---------\n");
- test_doy();
- }
-
- if(ttime==1 || ttime==5){
- printf("\n------------Test duration---------------\n");
- test_duration();
- }
-
- if(ttime==1 || ttime==6){
- printf("\n------------Test period ----------------\n");
- test_period();
- }
-
-
-
- if(trecur==1 || trecur==2){
- printf("\n------------Test recur parser ----------\n");
- test_recur_parser();
- }
-
- if(trecur==1 || trecur==3){
- printf("\n------------Test recur---------------\n");
- test_recur();
- }
-
- if(trecur==1 || trecur==4){
- printf("\n------------Test parameter bug---------\n");
- test_recur_parameter_bug();
- }
-
- if(trecur==1 || trecur==5){
- printf("\n------------Test Array Expansion---------\n");
- test_expand_recurrence();
- }
-
-
-
-
- if(tspan==1 || tspan==2){
- printf("\n------------Test FBlist------------\n");
- test_fblist();
- }
-
- if(tspan==1 || tspan==3){
- printf("\n------------Test Overlaps------------\n");
- test_overlaps();
- }
-
- if(tspan==1 || tspan==4){
- printf("\n------------Test Span----------------\n");
- test_span();
- }
-
- if(tgauge == 1 || tgauge == 2){
- printf("\n------------Test Gauge SQL----------------\n");
- test_gauge_sql();
- }
-
- if(tgauge == 1 || tgauge == 3){
- printf("\n------------Test Gauge Compare--------------\n");
- test_gauge_compare();
- }
-
- if(tfile ==1 || tfile == 2){
- printf("\n------------Test File Set--------------\n");
- test_fileset();
- }
-
- if(tfile ==1 || tfile == 3){
- printf("\n------------Test File Locks--------------\n");
- test_file_locks();
- }
-
-
-
- if(tmisc == 1 || tmisc == 2){
- printf("\n------------Test X Props and Params--------\n");
- test_x();
- }
-
- if(tmisc == 1 || tmisc == 3){
- printf("\n------------Test Trigger ------------------\n");
- test_trigger();
- }
-
- if(tmisc == 1 || tmisc == 4){
-
- printf("\n------------Test Restriction---------------\n");
- test_restriction();
- }
-
- if(tmisc == 1 || tmisc == 5){
-
- printf("\n------------Test RDATE---------------\n");
- test_rdate();
- }
-
- if(tmisc == 1 || tmisc == 6){
-
- printf("\n------------Test language binding---------------\n");
- test_langbind();
- }
-
-
- if(tmisc == 1 || tmisc == 7){
-
- printf("\n------------Test property parser---------------\n");
- test_property_parse();
- }
-
- if(tmisc == 1 || tmisc == 8){
- printf("\n------------Test Action ------------------\n");
- test_action();
- }
-
- if(tmisc == 1 || tmisc == 9){
- printf("\n------------Test Value Parameter ------------------\n");
- test_value_parameter();
- }
-
- if(tmisc == 1 || tmisc == 10){
- printf("\n------------Test X property ------------------\n");
- test_x_property();
- }
-
-
- if(tbasic == 1 || tbasic == 2){
- printf("\n------------Test Values---------------\n");
- test_values();
- }
-
- if(tbasic == 1 || tbasic == 3){
- printf("\n------------Test Parameters-----------\n");
- test_parameters();
- }
-
- if(tbasic == 1 || tbasic == 4){
- printf("\n------------Test Properties-----------\n");
- test_properties();
- }
-
- if(tbasic == 1 || tbasic == 5){
- printf("\n------------Test Components ----------\n");
- test_components();
- }
-
- if(tmisc == 1){
-
- printf("\n------------Test Convenience ------------\n");
- test_convenience();
-
-
- printf("\n------------Test classify ---------------\n");
- test_classify();
-
-
- printf("\n------------Test Iterators-----------\n");
- test_iterators();
-
-
- printf("\n-----------Test request status-------\n");
- test_requeststat();
-
- printf("\n------------Test strings---------------\n");
- test_strings();
-
- printf("\n------------Test Compare---------------\n");
- test_compare();
-
- printf("\n------------Create Components --------\n");
- create_new_component();
-
- printf("\n----- Create Components with vaargs ---\n");
- create_new_component_with_va_args();
-
- printf("\n------------Test Memory---------------\n");
- test_memory();
- }
-
- return 0;
-}
-
-
-
diff --git a/libical/src/test/storage.c b/libical/src/test/storage.c
deleted file mode 100644
index 2d8bc586f4..0000000000
--- a/libical/src/test/storage.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: usecases.c
- CREATOR: eric 03 April 1999
-
- DESCRIPTION:
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 1999 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The original author is Eric Busboom
- The original code is usecases.c
-
-
- ======================================================================*/
-
-#include "ical.h"
-#include <assert.h>
-#include <string.h> /* for strdup */
-#include <stdlib.h> /* for malloc */
-#include <stdio.h> /* for printf */
-#include <time.h> /* for time() */
-#include "icalmemory.h"
-#include "icaldirset.h"
-#include "icalfileset.h"
-#include "icalerror.h"
-#include "icalrestriction.h"
-#include "icalcalendar.h"
-
-#define OUTPUT_FILE "filesetout.ics"
-
-char str[] = "BEGIN:VCALENDAR\n\
-PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\n\
-VERSION:2.0\n\
-BEGIN:VTIMEZONE\n\
-TZID:US-Eastern\n\
-BEGIN:STANDARD\n\
-DTSTART:19981025T020000\n\
-RDATE:19981025T020000\n\
-TZOFFSETFROM:-0400\n\
-TZOFFSETTO:-0500\n\
-TZNAME:EST\n\
-END:STANDARD\n\
-BEGIN:DAYLIGHT\n\
-DTSTART:19990404T020000\n\
-RDATE:19990404T020000\n\
-TZOFFSETFROM:-0500\n\
-TZOFFSETTO:-0400\n\
-TZNAME:EDT\n\
-END:DAYLIGHT\n\
-END:VTIMEZONE\n\
-BEGIN:VEVENT\n\
-DTSTAMP:19980309T231000Z\n\
-UID:guid-1.host1.com\n\
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\n\
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\n\
-DESCRIPTION:Project XYZ Review Meeting\n\
-CATEGORIES:MEETING\n\
-CLASS:PUBLIC\n\
-CREATED:19980309T130000Z\n\
-SUMMARY:XYZ Project Review\n\
-DTSTART;TZID=US-Eastern:19980312T083000\n\
-DTEND;TZID=US-Eastern:19980312T093000\n\
-LOCATION:1CP Conference Room 4350\n\
-END:VEVENT\n\
-BEGIN:BOOGA\n\
-DTSTAMP:19980309T231000Z\n\
-X-LIC-FOO:Booga\n\
-DTSTOMP:19980309T231000Z\n\
-UID:guid-1.host1.com\n\
-END:BOOGA\n\
-END:VCALENDAR";
-
-char str2[] = "BEGIN:VCALENDAR\n\
-PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\n\
-VERSION:2.0\n\
-BEGIN:VEVENT\n\
-DTSTAMP:19980309T231000Z\n\
-UID:guid-1.host1.com\n\
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\n\
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\n\
-DESCRIPTION:Project XYZ Review Meeting\n\
-CATEGORIES:MEETING\n\
-CLASS:PUBLIC\n\
-CREATED:19980309T130000Z\n\
-SUMMARY:XYZ Project Review\n\
-DTSTART;TZID=US-Eastern:19980312T083000\n\
-DTEND;TZID=US-Eastern:19980312T093000\n\
-LOCATION:1CP Conference Room 4350\n\
-END:VEVENT\n\
-END:VCALENDAR\n\
-";
-
-
-void test_fileset()
-{
- icalfileset *cout;
- int month = 0;
- int count=0;
- struct icaltimetype start, end;
- icalcomponent *c,*clone, *itr;
-
- start = icaltime_from_timet( time(0),0);
- end = start;
- end.hour++;
-
- cout = icalfileset_new(OUTPUT_FILE);
- assert(cout != 0);
-
- c = icalparser_parse_string(str2);
- assert(c != 0);
-
- /* Add data to the file */
-
- for(month = 1; month < 10; month++){
- icalcomponent *event;
- icalproperty *dtstart, *dtend;
-
- cout = icalfileset_new(OUTPUT_FILE);
- assert(cout != 0);
-
- start.month = month;
- end.month = month;
-
- clone = icalcomponent_new_clone(c);
- assert(clone !=0);
- event = icalcomponent_get_first_component(clone,ICAL_VEVENT_COMPONENT);
- assert(event != 0);
-
- dtstart = icalcomponent_get_first_property(event,ICAL_DTSTART_PROPERTY);
- assert(dtstart!=0);
- icalproperty_set_dtstart(dtstart,start);
-
- dtend = icalcomponent_get_first_property(event,ICAL_DTEND_PROPERTY);
- assert(dtend!=0);
- icalproperty_set_dtend(dtend,end);
-
- icalfileset_add_component(cout,clone);
- icalfileset_commit(cout);
-
- icalfileset_free(cout);
-
- }
-
-
- /* Print them out */
-
-
- cout = icalfileset_new(OUTPUT_FILE);
- assert(cout != 0);
-
- for (itr = icalfileset_get_first_component(cout);
- itr != 0;
- itr = icalfileset_get_next_component(cout)){
-
- icalcomponent *event;
- icalproperty *dtstart, *dtend;
-
- count++;
-
- event = icalcomponent_get_first_component(itr,ICAL_VEVENT_COMPONENT);
-
- dtstart = icalcomponent_get_first_property(event,ICAL_DTSTART_PROPERTY);
- dtend = icalcomponent_get_first_property(event,ICAL_DTEND_PROPERTY);
-
- printf("%d %s %s\n",count, icalproperty_as_ical_string(dtstart),
- icalproperty_as_ical_string(dtend));
-
- }
-
- /* Remove all of them */
-
- icalfileset_free(cout);
-
- cout = icalfileset_new(OUTPUT_FILE);
- assert(cout != 0);
-
- for (itr = icalfileset_get_first_component(cout);
- itr != 0;
- itr = icalfileset_get_next_component(cout)){
-
-
- icalfileset_remove_component(cout, itr);
- }
-
- icalfileset_free(cout);
-
-
- /* Print them out again */
-
- cout = icalfileset_new(OUTPUT_FILE);
- assert(cout != 0);
- count =0;
-
- for (itr = icalfileset_get_first_component(cout);
- itr != 0;
- itr = icalfileset_get_next_component(cout)){
-
- icalcomponent *event;
- icalproperty *dtstart, *dtend;
-
- count++;
-
- event = icalcomponent_get_first_component(itr,ICAL_VEVENT_COMPONENT);
-
- dtstart = icalcomponent_get_first_property(event,ICAL_DTSTART_PROPERTY);
- dtend = icalcomponent_get_first_property(event,ICAL_DTEND_PROPERTY);
-
- printf("%d %s %s\n",count, icalproperty_as_ical_string(dtstart),
- icalproperty_as_ical_string(dtend));
-
- }
-
- icalfileset_free(cout);
-
-
-}
-
-
-
-int test_dirset()
-{
-
- icalcomponent *c, *gauge;
- icalerrorenum error;
- icalcomponent *itr;
- icalfileset* cluster;
- struct icalperiodtype rtime;
- icaldirset *s = icaldirset_new("store");
- int i;
-
- assert(s != 0);
-
- rtime.start = icaltime_from_timet( time(0),0);
-
- cluster = icalfileset_new(OUTPUT_FILE);
-
- assert(cluster != 0);
-
-#define NUMCOMP 4
-
- /* Duplicate every component in the cluster NUMCOMP times */
-
- icalerror_clear_errno();
-
- for (i = 1; i<NUMCOMP+1; i++){
-
- /*rtime.start.month = i%12;*/
- rtime.start.month = i;
- rtime.end = rtime.start;
- rtime.end.hour++;
-
- for (itr = icalfileset_get_first_component(cluster);
- itr != 0;
- itr = icalfileset_get_next_component(cluster)){
- icalcomponent *clone, *inner;
- icalproperty *p;
-
- inner = icalcomponent_get_first_component(itr,ICAL_VEVENT_COMPONENT);
- if (inner == 0){
- continue;
- }
-
- /* Change the dtstart and dtend times in the component
- pointed to by Itr*/
-
- clone = icalcomponent_new_clone(itr);
- inner = icalcomponent_get_first_component(itr,ICAL_VEVENT_COMPONENT);
-
- assert(icalerrno == ICAL_NO_ERROR);
- assert(inner !=0);
-
- /* DTSTART*/
- p = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY);
- assert(icalerrno == ICAL_NO_ERROR);
-
- if (p == 0){
- p = icalproperty_new_dtstart(rtime.start);
- icalcomponent_add_property(inner,p);
- } else {
- icalproperty_set_dtstart(p,rtime.start);
- }
- assert(icalerrno == ICAL_NO_ERROR);
-
- /* DTEND*/
- p = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
- assert(icalerrno == ICAL_NO_ERROR);
-
- if (p == 0){
- p = icalproperty_new_dtstart(rtime.end);
- icalcomponent_add_property(inner,p);
- } else {
- icalproperty_set_dtstart(p,rtime.end);
- }
- assert(icalerrno == ICAL_NO_ERROR);
-
- printf("\n----------\n%s\n---------\n",icalcomponent_as_ical_string(inner));
-
- error = icaldirset_add_component(s,
- icalcomponent_new_clone(itr));
-
- assert(icalerrno == ICAL_NO_ERROR);
-
- }
-
- }
-
- gauge =
- icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_summary(
- "Submit Income Taxes",
- icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
- 0),
- 0),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_vanew_summary(
- "Bastille Day Party",
- icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
- 0),
- 0),
- 0);
-
-#if 0
-
-
- icaldirset_select(s,gauge);
-
- for(c = icaldirset_first(s); c != 0; c = icaldirset_next(s)){
-
- printf("Got one! (%d)\n", count++);
-
- if (c != 0){
- printf("%s", icalcomponent_as_ical_string(c));;
- if (icaldirset_store(s2,c) == 0){
- printf("Failed to write!\n");
- }
- icalcomponent_free(c);
- } else {
- printf("Failed to get component\n");
- }
- }
-
-
- icaldirset_free(s2);
-#endif
-
-
- for(c = icaldirset_get_first_component(s);
- c != 0;
- c = icaldirset_get_next_component(s)){
-
- if (c != 0){
- printf("%s", icalcomponent_as_ical_string(c));;
- } else {
- printf("Failed to get component\n");
- }
-
- }
-
- /* Remove all of the components */
- i=0;
- while((c=icaldirset_get_current_component(s)) != 0 ){
- i++;
-
- icaldirset_remove_component(s,c);
- }
-
-
- icaldirset_free(s);
- return 0;
-}
-
-#if 0
-void test_calendar()
-{
- icalcomponent *comp;
- icalfileset *c;
- icaldirset *s;
- icalcalendar* calendar = icalcalendar_new("calendar");
- icalerrorenum error;
- struct icaltimetype atime = icaltime_from_timet( time(0),0,0);
-
- comp = icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_version("2.0"),
- icalproperty_new_description("This is an event"),
- icalproperty_new_dtstart(atime),
- icalproperty_vanew_comment(
- "Another Comment",
- icalparameter_new_cn("A Common Name 1"),
- icalparameter_new_cn("A Common Name 2"),
- icalparameter_new_cn("A Common Name 3"),
- icalparameter_new_cn("A Common Name 4"),
- 0),
- icalproperty_vanew_xlicerror(
- "This is only a test",
- icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR),
- 0),
-
- 0);
-
-
- s = icalcalendar_get_booked(calendar);
-
- error = icaldirset_add_component(s,comp);
-
- assert(error == ICAL_NO_ERROR);
-
- c = icalcalendar_get_properties(calendar);
-
- error = icalfileset_add_component(c,icalcomponent_new_clone(comp));
-
- assert(error == ICAL_NO_ERROR);
-
- icalcalendar_free(calendar);
-
-}
-#endif
-
-
-int main(int argc, char *argv[])
-{
-
-/* printf("\n------------Test File Set---------------\n");
- test_fileset(); */
-
- printf("\n------------Test Dir Set---------------\n");
- test_dirset();
-
-#if 0
-
-
- printf("\n------------Test Calendar---------------\n");
- test_calendar();
-
-#endif
-
- return 0;
-}
-
-
-
diff --git a/libical/src/test/stow.c b/libical/src/test/stow.c
deleted file mode 100644
index e676c677f3..0000000000
--- a/libical/src/test/stow.c
+++ /dev/null
@@ -1,866 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: stow.c
- CREATOR: eric 29 April 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The Initial Developer of the Original Code is Eric Busboom
-
- ======================================================================*/
-
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h> /* for PATH_MAX */
-#include <assert.h>
-#include <stdlib.h>
-#include <sys/utsname.h> /* for uname */
-#include <sys/stat.h> /* for stat */
-#include <unistd.h> /* for stat, getpid, getopt */
-#include <pwd.h> /* For getpwent */
-#include <sys/types.h> /* For getpwent */
-#include <ctype.h> /* for tolower */
-
-#include "ical.h"
-#include "icalcalendar.h"
-#include "icalfileset.h"
-#include "icalmime.h"
-
-char* program_name;
-#define TMPSIZE 2048
-#define SENDMAIL "/usr/lib/sendmail -t"
-
-void usage(char *message);
-
-#ifndef PATH_MAX
-#define PATH_MAX 256 /* HACK */
-#endif
-
-
-enum options {
- STORE_IN_FILE,
- STORE_IN_DB,
- INPUT_IS_MIME,
- INPUT_IS_ICAL,
- INPUT_FROM_STDIN,
- INPUT_FROM_FILE,
- ERRORS_TO_STDOUT,
- ERRORS_TO_ORGANIZER
-};
-
-struct options_struct
-{
- enum options storage;
- enum options input_type;
- enum options input_source;
- enum options errors;
- char* input_file;
- char* calid;
- char* output_file;
-};
-
-
-enum file_type
-{
- ERROR,
- NO_FILE,
- DIRECTORY,
- REGULAR,
- OTHER
-};
-
-enum file_type test_file(char *path)
-{
- struct stat sbuf;
- enum file_type type;
-
- errno = 0;
-
- /* Check if the path already exists and if it is a directory*/
- if (stat(path,&sbuf) != 0){
-
- /* A file by the given name does not exist, or there was
- another error */
- if(errno == ENOENT)
- {
- type = NO_FILE;
- } else {
- type = ERROR;
- }
-
- } else {
- /* A file by the given name exists, but is it a directory? */
-
- if (S_ISDIR(sbuf.st_mode)){
- type = DIRECTORY;
- } else if(S_ISREG(sbuf.st_mode)){
- type = REGULAR;
- } else {
- type = OTHER;
- }
- }
-
- return type;
-}
-
-char* lowercase(const char* str)
-{
- char* p = 0;
- char* new = strdup(str);
-
- if(str ==0){
- return 0;
- }
-
- for(p = new; *p!=0; p++){
- *p = tolower(*p);
- }
-
- return new;
-}
-
-#if 0
-char* get_local_attendee(struct options_struct *opt)
-{
- char attendee[PATH_MAX];
-
- if(opt->calid){
-
- strncpy(attendee,opt->calid,PATH_MAX);
-
- } else {
-
- char* user = getenv("USER");
- struct utsname uts;
- uname(&utget_option);
- /* HACK nodename may not be a fully qualified domain name */
- snprintf(attendee,PATH_MAX,"%s@%s",user,uts.nodename);
-
- }
-
- return lowercase(attendee);
-}
-#endif
-
-
-icalcomponent* get_first_real_component(icalcomponent *comp)
-{
- icalcomponent *c;
-
- for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
- c != 0;
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
- if (icalcomponent_isa(c) == ICAL_VEVENT_COMPONENT ||
- icalcomponent_isa(c) == ICAL_VTODO_COMPONENT ||
- icalcomponent_isa(c) == ICAL_VJOURNAL_COMPONENT )
- {
- return c;
- }
- }
-
- return 0;
-}
-
-
-
-char* make_mime(char* to, const char* from, const char* subject,
- const char* text_message, const char* method,
- const char* ical_message)
-{
- size_t size = strlen(to)+strlen(from)+strlen(subject)+
- strlen(text_message)+ strlen(ical_message)+TMPSIZE;
-
- char mime_part_1[TMPSIZE];
- char mime_part_2[TMPSIZE];
- char content_id[TMPSIZE];
- char boundary[TMPSIZE];
- struct utsname uts;
- char* m;
-
-
- if ((m = malloc(sizeof(char)*size)) == 0){
- fprintf(stderr,"%s: Can't allocate memory: %s\n",program_name,strerror(errno));
- exit(1);
- }
-
- uname(&uts);
-
- srand(time(0)<<getpid());
- sprintf(content_id,"%d-%d@%s",(int)time(0),rand(),uts.nodename);
- sprintf(boundary,"%d-%d-%s",(int)time(0),rand(),uts.nodename);
-
- sprintf(mime_part_1,"Content-ID: %s\n\
-Content-type: text/plain\n\
-Content-Description: Text description of error message\n\n\
-%s\n\n--%s",
- content_id,text_message,boundary);
-
- if(ical_message != 0 && method != 0){
- sprintf(mime_part_2,"Content-ID: %s\n\
-Content-type: text/calendar; method=%s\n\
-Content-Description: iCal component reply\n\n\
-%s\n\n--%s--",
- content_id,method,ical_message,boundary);
- }
-
- sprintf(m,"To: %s\n\
-From: %s\n\
-Subject: %s\n\
-MIME-Version: 1.0\n\
-Content-ID: %s\n\
-Content-Type: multipart/mixed; boundary=\"%s\"\n\
-\n\
- This is a multimedia message in MIME format\n\
-\n\
---%s\n\
-%s\n\
-",
- to,from,subject,content_id,boundary,boundary,
- mime_part_1);
-
- if(ical_message != 0 && method != 0){
- strcat(m, mime_part_2);
- } else {
- strcat(m,"--\n");
- }
-
- return m;
-}
-
-/* The incoming component had fatal errors */
-void return_failure(icalcomponent* comp, char* message,
- struct options_struct *opt)
-{
- char* local_attendee = opt->calid;
- FILE* p;
-
- icalcomponent *inner = get_first_real_component(comp);
-
- icalproperty *organizer_prop = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
- const char *organizer = icalproperty_get_organizer(organizer_prop);
-
- organizer += 7;
-
- if (opt->errors == ERRORS_TO_ORGANIZER){
- p = popen(SENDMAIL,"w");
- } else {
- p = stdout;
- }
-
- if(p == 0){
- fprintf(stderr,
- "%s: fatal. Could not open pipe to sendmail (\"%s\") \n",
- program_name,SENDMAIL);
- exit(1);
- }
-
- fputs(make_mime(organizer, local_attendee, "iMIP error",
- message, "reply",
- icalcomponent_as_ical_string(comp)),p);
-
- if (opt->errors == ERRORS_TO_ORGANIZER){
- pclose(p);
- }
-}
-
-/* The program had a fatal error and could not process the incoming component*/
-void return_error(icalcomponent* comp, char* message, struct options_struct *opt)
-{
-
-
- fputs(make_mime("Dest", "Source", "iMIP system failure",
- message, 0,0),stdout);
-
-}
-
-icalcomponent* make_reply(icalcomponent *comp, icalproperty *return_status,
- struct options_struct *opt)
-
-{
- icalcomponent *reply, *rinner;
- icalcomponent *inner = get_first_real_component(comp);
- icalproperty *p=0;
- char* local_attendee = opt->calid;
- char attendee[TMPSIZE];
-
- char prodid[TMPSIZE];
-
- snprintf(attendee,TMPSIZE,"mailto:%s",local_attendee);
-
- snprintf(prodid,TMPSIZE,"-//Softwarestudio.org//%s version %s//EN",ICAL_PACKAGE,ICAL_VERSION);
-
- /* Create the base component */
- reply = icalcomponent_vanew(
- ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_version(strdup("2.0")),
- icalproperty_new_prodid(strdup(prodid)),
- icalproperty_new_method(ICAL_METHOD_REPLY),
- icalcomponent_vanew(
- ICAL_VEVENT_COMPONENT,
- icalproperty_new_clone(
- icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY)),
- icalproperty_new_clone(
- icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY)),
- icalproperty_new_clone(
- icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY)),
- icalproperty_new_attendee(attendee),
- 0),
- 0);
-
-
- /* Convert errors into request-status properties and transfers
- them to the reply component */
-
- icalcomponent_convert_errors(comp);
-
- rinner = get_first_real_component(reply);
-
- for(p = icalcomponent_get_first_property(inner,
- ICAL_REQUESTSTATUS_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(inner,
- ICAL_REQUESTSTATUS_PROPERTY)){
-
- icalcomponent_add_property(rinner,icalproperty_new_clone(p));
- }
-
- if(return_status != 0){
- icalcomponent_add_property(rinner, return_status);
- }
-
- return reply;
-
-}
-
-int check_attendee(icalproperty *p, struct options_struct *opt){
- const char* s = icalproperty_get_attendee(p);
- char* lower_attendee = lowercase(s);
- char* local_attendee = opt->calid;
-
- /* Check that attendee begins with "mailto:" */
- if (strncmp(lower_attendee,"mailto:",7) == 0){
- /* skip over the mailto: part */
- lower_attendee += 7;
-
- if(strcmp(lower_attendee,local_attendee) == 0){
- return 1;
- }
-
- lower_attendee -= 7;
-
- free(lower_attendee);
- }
-
- return 0;
-}
-
-char static_component_error_str[PATH_MAX];
-char* check_component(icalcomponent* comp, icalproperty **return_status,
- struct options_struct *opt)
-{
- char* component_error_str=0;
- icalcomponent* inner;
- int errors = 0;
- icalproperty *p;
- int found_attendee = 0;
-
- *return_status = 0;
-
- /* This do/while loop only executes once because it is being used
- to fake exceptions */
-
- do {
-
- /* Check that we actually got a component */
- if(comp == 0){
- strcpy(static_component_error_str,
- "Did not find a component");
- component_error_str = static_component_error_str;
- break;
- }
-
- /* Check that the root component is a VCALENDAR */
- if(icalcomponent_isa(comp) != ICAL_VCALENDAR_COMPONENT){
- strcpy(static_component_error_str,
- "Root component is not a VCALENDAR");
- component_error_str = static_component_error_str;
- break;
- }
-
-
- /* Check that the component has a METHOD */
-
- if (icalcomponent_get_first_property(comp,ICAL_METHOD_PROPERTY) == 0)
- {
- strcpy(static_component_error_str,
- "Component does not have a METHOD property");
- component_error_str = static_component_error_str;
- break;
- }
-
- inner = get_first_real_component(comp);
-
-
- /* Check that the compopnent has an organizer */
- if(icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY) == 0){
- fprintf(stderr,"%s: fatal. Component does not have an ORGANIZER property\n",program_name);
-
- exit(1);
- }
-
-
- /* Check for this user as an attendee or organizer */
-
- for(p = icalcomponent_get_first_property(inner,ICAL_ATTENDEE_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(inner,ICAL_ATTENDEE_PROPERTY)){
-
- found_attendee += check_attendee(p,opt);
- }
-
- for(p = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(inner,ICAL_ORGANIZER_PROPERTY)){
-
- found_attendee += check_attendee(p,opt);
- }
-
- if (found_attendee == 0){
- struct icalreqstattype rs;
- char* rs_string;
- memset(static_component_error_str,0,PATH_MAX);
-
- snprintf(static_component_error_str,PATH_MAX,
- "This target user (%s) is not listed as an attendee or organizer",
- opt->calid );
- component_error_str = static_component_error_str;
-
- rs.code = ICAL_3_7_INVCU_STATUS;
- rs.desc = 0;
- rs.debug = component_error_str;
- rs_string = icalreqstattype_as_string(rs);
-
- *return_status = icalproperty_new_requeststatus(rs_string);
-
- break;
- }
-
-
-
- /* Check that the component passes iTIP restrictions */
-
- errors = icalcomponent_count_errors(comp);
- icalrestriction_check(comp);
-
- if(errors != icalcomponent_count_errors(comp)){
- snprintf(static_component_error_str,PATH_MAX,
- "The component does not conform to iTIP restrictions.\n Here is the original component; look at the X-LIC-ERROR properties\nfor details\n\n%s",icalcomponent_as_ical_string(comp));
- component_error_str = static_component_error_str;
- break;
- }
-
-
-
- } while(0);
-
- return component_error_str;
-}
-
-
-void usage(char *message)
-{
- fprintf(stderr,"Usage: %s [-emdcn] [-i inputfile] [-o outputfile] [-u calid]\n",program_name);
- fprintf(stderr,"-e\tInput data is encapsulated in a MIME Message \n\
--m\tInput is raw iCal \n\
--i\tSpecify input file. Otherwise, input comes from stdin\n\
--o\tSpecify file to save incoming message to\n\
--d\tSpecify database to send data to\n\
--u\tSet the calid to store the data to\n\
--n\tSend errors to stdout instead of organizer\n\
-");
-
-}
-
-
-void get_options(int argc, char* argv[], struct options_struct *opt)
-{
- int c;
- extern char *optarg;
- extern int optind, optopt;
- int errflg=0;
-
- opt->storage = STORE_IN_FILE;
- opt->input_source = INPUT_FROM_STDIN;
- opt->input_type = INPUT_IS_ICAL;
- opt->input_file = 0;
- opt->errors = ERRORS_TO_ORGANIZER;
- opt->calid = 0;
- opt->output_file = 0;
-
-
- while ((c = getopt(argc, argv, "nemu:o:d:b:c:i:")) != -1) {
- switch (c) {
- case 'e': { /* Input data is MIME encapsulated */
- opt->input_type = INPUT_IS_MIME;
- break;
- }
- case 'm': { /* Input is iCal. Default*/
- opt->input_type = INPUT_IS_ICAL;
- break;
- }
- case 'i': { /* Input comes from named file */
- opt->input_source = INPUT_FROM_FILE;
- opt->input_file = strdup(optarg);
- break;
- }
- case 'o': { /* Output goes to named file. Default*/
- opt->output_file = strdup(optarg);
- opt->storage = STORE_IN_FILE;
- break;
- }
- case 'd': { /* Output goes to database */
- fprintf(stderr,"%s: option -d is unimplmented\n",program_name);
- opt->storage = STORE_IN_DB;
- errflg++;
- break;
- }
- case 'c': {
-
- break;
- }
- case 'u': { /* Set the calid for the output database or
- file. Default is user name of user running
- program */
- opt->calid = strdup(optarg);
- break;
- }
-
- case 'n': { /* Dump error to stdout. Default is to
- send error to the organizer specified
- in the iCal data */
- opt->errors = ERRORS_TO_STDOUT;
- break;
- }
-
- case ':': {/* Option given without an operand */
- fprintf(stderr,
- "%s: Option -%c requires an operand\n",
- program_name,optopt);
- errflg++;
- break;
- }
- case '?': {
- errflg++;
- }
-
- }
-
- if (errflg >0){
- usage("");
- exit(1);
- }
- }
-
- if(opt->calid == 0){
- /* If no calid specified, use username */
- char attendee[PATH_MAX];
- char* user = getenv("USER");
- struct utsname uts;
- uname(&uts);
- /* HACK nodename may not be a fully qualified domain name */
- snprintf(attendee,PATH_MAX,"%s@%s",user,uts.nodename);
-
- opt->calid = lowercase(attendee);
- }
-
- if(opt->storage == STORE_IN_FILE &&
- opt->output_file ==0){
- char file[PATH_MAX];
- char* user = getenv("USER");
- struct passwd *pw;
-
- if(!user){
- fprintf(stderr,"%s: Can't get username. Try explicitly specifing the output file with -o", program_name);
- exit(1);
- }
-
- /* Find password entry for user */
- while( (pw = getpwent())!=0){
- if(strcmp(user,pw->pw_name)==0){
- break;
- }
- }
-
- if(pw==0){
- fprintf(stderr,"%s: Can't get get password entry for user \"%s\" Try explicitly specifing the output file with -o",
- program_name,user);
- exit(1);
- }
-
- if(pw->pw_dir==0){
- fprintf(stderr,"%s: User \"%s\" has no home directory. Try explicitly specifing the output file with -o",
- program_name, user);
- exit(1);
- }
-
- snprintf(file,PATH_MAX,"%s/.facs/%s",pw->pw_dir,opt->calid);
-
- opt->output_file = strdup(file);
- }
-
-
- /* Now try to create the calendar directory if it does
- not exist */
-
- if(opt->storage == STORE_IN_FILE ) {
- char * p;
- char* facspath = strdup(opt->output_file);
- enum file_type type;
-
- /* Cut off the last slash to make it just a directoy */
-
- p = strrchr(facspath,'/');
-
- if (p == 0){
- fprintf(stderr,"%s: Invalid calendar filename \"%s\"",
- program_name,facspath);
- exit(1);
- }
-
- *p='\0';
-
- type = test_file(facspath);
-
- errno = 0;
- if (type == NO_FILE){
-
- if(mkdir(facspath,0775) != 0){
- fprintf(stderr,
- "%s: Failed to create calendar directory %s: %s\n",
- program_name,facspath, strerror(errno));
- exit(1);
- } else {
- fprintf(stderr,"%s: Creating calendar directory %s\n",
- program_name,facspath);
- }
-
- } else if(type==REGULAR || type == ERROR){
- fprintf(stderr,"%s: Cannot create calendar directory %s\n",
- program_name,facspath);
- exit(1);
- }
- }
-}
-
-char* check_options(struct options_struct *opt)
-{
- return 0;
-}
-
-void store_component(icalcomponent *comp, struct options_struct *opt)
-{
- icalerrorenum error;
-
-
- if(opt->storage == STORE_IN_FILE){
- icalfileset *fs = icalfileset_new(opt->output_file);
-
- if (fs == 0){
- fprintf(stderr,
- "%s: Failed to get incoming component directory: %s\n",
- program_name, icalerror_strerror(icalerrno));
- exit(1);
- }
-
-
- error = icalfileset_add_component(fs,comp);
-
- if (error != ICAL_NO_ERROR){
- fprintf(stderr,"%s: Failed to write incoming component: %s\n",
- program_name, icalerror_strerror(icalerrno));
- exit(1);
- }
-
- error = icalfileset_commit(fs);
-
- if (error != ICAL_NO_ERROR){
- fprintf(stderr,"%s: Failed to commit incoming cluster: %s\n",
- program_name, icalerror_strerror(icalerrno));
- exit(1);
- }
-
- icalfileset_free(fs);
-
- return;
- } else {
- assert(0);
- }
-}
-
-char* read_stream(char *s, size_t size, void *d)
-{
- char *c = fgets(s,size, (FILE*)d);
-
- return c;
-}
-
-icalcomponent* read_nonmime_component(struct options_struct *opt)
-{
- FILE *stream;
- icalcomponent *comp;
- icalparser* parser = icalparser_new();
- char* line;
-
- if(opt->input_source == INPUT_FROM_FILE){
- stream = fopen(opt->input_file,"r");
-
- if (stream == 0){
- perror("Can't open input file");
- exit(1);
- }
-
- } else {
- stream = stdin;
- }
-
- assert(stream != 0);
- icalparser_set_gen_data(parser,stream);
-
- do {
- line = icalparser_get_line(parser,read_stream);
-
- comp = icalparser_add_line(parser,line);
-
- if (comp != 0){
- return comp;
- }
-
- } while ( line != 0);
-
- if(opt->input_source == INPUT_FROM_FILE){
- fclose(stream);
- }
-
-
- return comp;
- }
-
-icalcomponent* find_vcalendar(icalcomponent* comp)
-{
- icalcomponent *c,*rtrn;
-
- for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
- c != 0;
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
-
- if(icalcomponent_isa(c) == ICAL_VCALENDAR_COMPONENT){
- icalcomponent_remove_component(comp,c);
- return c;
- }
-
- if((rtrn=find_vcalendar(c)) != 0){
- return rtrn;
- }
- }
-
- return 0;
-}
-
-icalcomponent* read_mime_component(struct options_struct *opt)
-{
- icalcomponent *comp,*mimecomp;
- FILE* stream;
-
- if(opt->input_source == INPUT_FROM_FILE){
- stream = fopen(opt->input_file,"r");
-
- if (stream == 0){
- perror("Can't open input file");
- exit(1);
- }
-
- } else {
- stream = stdin;
- }
-
- assert(stream != 0);
-
- mimecomp = icalmime_parse(read_stream,(void*)stream);
-
- /* now find the iCal component embedded within the mime component */
- comp = find_vcalendar(mimecomp);
-
-
- if(comp == 0){
- return 0;
- }
-
- return comp;
-}
-
-icalcomponent* read_component(struct options_struct *opt)
-{
- if(opt->input_type == INPUT_IS_MIME){
- return read_mime_component(opt);
- } else if (opt->input_type == INPUT_IS_ICAL){
- return read_nonmime_component(opt);
- } else {
- fprintf(stderr,"%s: Internal Error; unknown option for input_type\n",
- program_name);
- exit(1);
- }
-}
-
-int main(int argc, char* argv[] )
-{
- char* options_error_str;
- char* component_error_str;
- icalcomponent* comp, *reply;
- struct options_struct opt;
- icalproperty *return_status;
-
- program_name = strrchr(argv[0],'/');
-
- get_options(argc, argv, &opt);
-
- if ( (options_error_str = check_options(&opt)) != 0 ){
- usage(options_error_str);
- exit(1);
- }
-
- comp = read_component(&opt);
-
- if ( (component_error_str =
- check_component(comp,&return_status,&opt)) != 0){
- reply = make_reply(comp,return_status,&opt);
- return_failure(reply, component_error_str, &opt);
- icalcomponent_free(reply);
- exit(0);
- }
-
- store_component(comp,&opt);
-
-
- /* Don't free the component comp, since it is now part of the
- store, and will be freed there */
-
- exit(0);
-}
-
diff --git a/libical/src/test/testclassify.c b/libical/src/test/testclassify.c
deleted file mode 100644
index 2c6c785dfa..0000000000
--- a/libical/src/test/testclassify.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: testclassify.c
- CREATOR: eric 11 February 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#include <stdio.h> /* for printf */
-#include "ical.h"
-#include <errno.h>
-#include <string.h> /* For strerror */
-#include "icalset.h"
-#include "icalclassify.h"
-
-
-struct class_map {
- ical_class class;
- char *str;
-} class_map[] = {
- {ICAL_NO_CLASS,"No class"},
- {ICAL_PUBLISH_NEW_CLASS,"New Publish"},
- {ICAL_PUBLISH_UPDATE_CLASS,"Update Publish"},
- {ICAL_REQUEST_NEW_CLASS,"New request"},
- {ICAL_REQUEST_UPDATE_CLASS,"Update"},
- {ICAL_REQUEST_RESCHEDULE_CLASS,"Reschedule"},
- {ICAL_REQUEST_DELEGATE_CLASS,"Delegate"},
- {ICAL_REQUEST_NEW_ORGANIZER_CLASS,"New Organizer"},
- {ICAL_REQUEST_FORWARD_CLASS,"Forward"},
- {ICAL_REQUEST_STATUS_CLASS,"Status request"},
- {ICAL_REPLY_ACCEPT_CLASS,"Accept reply"},
- {ICAL_REPLY_DECLINE_CLASS,"Decline reply"},
- {ICAL_REPLY_CRASHER_ACCEPT_CLASS,"Crasher's accept reply"},
- {ICAL_REPLY_CRASHER_DECLINE_CLASS,"Crasher's decline reply"},
- {ICAL_ADD_INSTANCE_CLASS,"Add instance"},
- {ICAL_CANCEL_EVENT_CLASS,"Cancel event"},
- {ICAL_CANCEL_INSTANCE_CLASS,"Cancel instance"},
- {ICAL_CANCEL_ALL_CLASS,"Cancel all instances"},
- {ICAL_REFRESH_CLASS,"Refresh"},
- {ICAL_COUNTER_CLASS,"Counter"},
- {ICAL_DECLINECOUNTER_CLASS,"Decline counter"},
- {ICAL_MALFORMED_CLASS,"Malformed"},
- {ICAL_OBSOLETE_CLASS,"Obsolete"},
- {ICAL_MISSEQUENCED_CLASS,"Missequenced"},
- {ICAL_UNKNOWN_CLASS,"Unknown"}
-};
-
-char* find_class_string(ical_class class)
-{
- int i;
-
- for (i = 0;class_map[i].class != ICAL_UNKNOWN_CLASS;i++){
- if (class_map[i].class == class){
- return class_map[i].str;
- }
- }
-
- return "Unknown";
-}
-
-
-int main(int argc, char* argv[])
-{
- icalcomponent *c;
- int i=0;
-
- icalset* f = icalset_new_file("../../test-data/incoming.ics");
- icalset* cal = icalset_new_file("../../test-data/calendar.ics");
-
- assert(f!= 0);
- assert(cal!=0);
-
-
- /* Foreach incoming message */
- for(c=icalset_get_first_component(f);c!=0;
- c=icalset_get_next_component(f)){
-
- ical_class class;
- icalcomponent *match;
- icalcomponent *inner = icalcomponent_get_first_real_component(c);
- icalcomponent *p;
- const char *this_uid;
- const char *i_x_note=0;
- const char *c_x_note=0;
-
- i++;
-
- if(inner == 0){
- continue;
- }
-
- p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
- this_uid = icalproperty_get_uid(p);
-
- assert(this_uid != 0);
-
- /* Find a booked component that is matched to the incoming
- message, based on the incoming component's UID, SEQUENCE
- and RECURRENCE-ID*/
-
- match = icalset_fetch(cal,this_uid);
-
- class = icalclassify(c,match,"A@example.com");
-
- for(p = icalcomponent_get_first_property(c,ICAL_X_PROPERTY);
- p!= 0;
- p = icalcomponent_get_next_property(c,ICAL_X_PROPERTY)){
- if(strcmp(icalproperty_get_x_name(p),"X-LIC-NOTE")==0){
- i_x_note = icalproperty_get_x(p);
- }
- }
-
-
- if(i_x_note == 0){
- i_x_note = "None";
- }
-
- for(p = icalcomponent_get_first_property(match,ICAL_X_PROPERTY);
- p!= 0;
- p = icalcomponent_get_next_property(match,ICAL_X_PROPERTY)){
- if(strcmp(icalproperty_get_x_name(p),"X-LIC-NOTE")==0){
- c_x_note = icalproperty_get_x(p);
- }
- }
-
- if(c_x_note == 0){
- c_x_note = "None";
- }
-
-
- printf("Test %d\nIncoming: %s\nMatched: %s\nClassification: %s\n\n",i,i_x_note,c_x_note,find_class_string(class));
- }
-
- return 0;
-}
-
-
diff --git a/libical/src/test/testmime.c b/libical/src/test/testmime.c
deleted file mode 100644
index 5dfc3b7d31..0000000000
--- a/libical/src/test/testmime.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE:
- CREATOR: eric 25 June 2000
-
- $Id$
- $Locker$
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Initial Developer of the Original Code is Eric Busboom
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
- ======================================================================*/
-
-#include "ical.h"
-#include "sspm.h"
-#include "icalmime.h"
-#include <stdlib.h> /* For rand */
-#include <string.h> /* for strrchr, strdup*/
-#include <unistd.h> /* for getopt */
-
-/*int sspm_parse_mime(struct sspm_part *parts,
- size_t max_parts,
- struct sspm_action_map *actions,
- char* (*get_string)(char *s, size_t size, void* data),
- void *get_string_data,
- struct sspm_header *first_header
- );
-*/
-
-
-
-char* major_type_string[] = {
- "TEXT",
- "IMAGE",
- "AUDIO",
- "VIDEO",
- "APPLICATION",
- "MULTIPART",
- "MESSAGE",
- "UNKNOWN",
- "NO"
-};
-
-char* minor_type_string[] = {
- "ANY",
- "PLAIN",
- "RFC822",
- "DIGEST",
- "CALENDAR",
- "MIXED",
- "RELATED",
- "ALTERNATIVE",
- "PARALLEL",
- "UNKNOWN",
- "NO"
-};
-
-
-char* read_stream(char *s, size_t size, void *d)
-{
- char *c = fgets(s,size, (FILE*)d);
-
- return c;
-
-}
-
-
-int main(int argc, char* argv[]) {
-
- FILE *f;
- int c;
- extern char *optarg;
- extern int optind, optopt;
- int errflg=0;
- char* program_name;
-
- struct options{
- int normal;
- int stress;
- int base64;
- int qp;
- int sleep;
- int count;
- char* input_file;
- } opt;
-
- memset(&opt,0,sizeof(opt));
-
- program_name = (char*)strrchr((char*)argv[0],'/');
- program_name++;
-
- while ((c = getopt(argc, argv, "nsbqi:S:c:")) != -1) {
- switch (c) {
- case 'i': { /* Input comes from named file */
- opt.input_file = strdup(optarg);
- break;
- }
- case 'n':{ /* Normal */
-
- if(opt.stress+opt.base64+opt.qp != 0){
- fprintf(stderr,
- "%s: Use only one of n,s,b and q\n",
- program_name);
- }
- opt.normal = 1;
- break;
- }
- case 's':{ /* Stress-test*/
- if(opt.base64+opt.normal+opt.qp != 0){
- fprintf(stderr,
- "%s: Use only one of n,s,b and q\n",
- program_name);
- }
- opt.stress = 1;
- break;
- }
- case 'b':{ /* test base64 decoding*/
- if(opt.stress+opt.normal+opt.qp != 0){
- fprintf(stderr,
- "%s: Use only one of n,s,b and q\n",
- program_name);
- }
- opt.base64 = 1;
- break;
- }
- case 'q':{ /* test quoted-printable decoding*/
- if(opt.stress+opt.base64+opt.normal != 0){
- fprintf(stderr,
- "%s: Use only one of n,s,b and q\n",
- program_name);
- }
- opt.qp = 1;
- break;
- }
- case 'S':{ /* sleep at end of run */
- opt.sleep = atoi(optarg);
- break;
- }
-
- case 'c':{ /* number of iterations of stress test */
- opt.count = atoi(optarg);
- break;
- }
-
- case ':': {/* Option given without an operand */
- fprintf(stderr,
- "%s: Option -%c requires an operand\n",
- program_name,optopt);
- errflg++;
- break;
- }
- case '?': {
- errflg++;
- }
- }
- }
-
- if (errflg >0){
- fprintf(stderr,"Usage: %s [-n|-s|-b|-q] [-i input_file]\n",
- program_name);
- exit(1);
- }
-
- if(opt.stress+opt.base64+opt.normal+opt.qp == 0){
- fprintf(stderr,
- "%s: Must have one of n,s,b or q\n",
- program_name);
- }
-
- if(opt.input_file){
- f = fopen(opt.input_file,"r");
- if (f == 0){
- fprintf(stderr,"Could not open input file \"%s\"\n",
- opt.input_file);
- exit(1);
- }
- } else {
- f = stdin;
- }
-
-
-
- if(opt.normal == 1){
- icalcomponent *c;
-
- c = icalmime_parse(read_stream,f);
-
- printf("%s\n",icalcomponent_as_ical_string(c));
-
- icalcomponent_free(c);
-
- } else if (opt.stress==1 ){
- /* Read file in by lines, then randomize the lines into a
- string buffer */
-
- char *array[1024];
- char temp[1024];
- char *buf;
- int i,last;
- int size;
- int non_rand;
- int rand_lines;
- int r;
- int j;
- icalcomponent *c;
- struct slg_data {
- char* pos;
- char* str;
- } d;
-
- for(i=0; !feof(f); i++){
- fgets(temp,1024,f);
- array[i] = strdup(temp);
- size += strlen(temp);
- }
- last = i;
-
- buf = malloc(size*2);
- assert(buf != 0);
-
-
- for(j=0; j<opt.count; j++){
-
- srand(j);
- memset(buf,0,size*2);
- /* First insert some non-randomized lines */
- non_rand = ((float)rand()/(float)RAND_MAX) * last;
- for(i=0;i<non_rand;i++){
- strcat(buf,array[i]);
- }
-
- /* Then, insert some lines at random */
-
- rand_lines = last - non_rand;
-
- for(i=0;i<rand_lines;i++){
- srand(i);
- r = ((float)rand()/(float)RAND_MAX) * rand_lines;
- strcat(buf,array[r+non_rand]);
-
- }
-
- d.pos = 0;
- d.str = buf;
-
- c = icalmime_parse(string_line_generator,&d);
-
- printf("%s\n",icalcomponent_as_ical_string(c));
-
- icalcomponent_free(c);
-
- }
-
- free(buf);
-
- for(i=0; i<last; i++){
- free(array[i]);
- }
-
- } else if(opt.qp == 1){
- char str[4096];
- char conv[4096];
-
- memset(str,0,4096);
-
- while(!feof(f) && fgets(str,4096,f)!=0){
- size_t size;
-
- size = strlen(str);
- memset(conv,0,4096);
- decode_quoted_printable(conv,str,&size);
-
- conv[size] = '\0';
- printf("%s",conv);
- memset(str,0,4096);
-
- }
- } else if (opt.base64 == 1) {
- char str[4096];
- char conv[4096];
-
- memset(str,0,4096);
-
- while(!feof(f) && fgets(str,4096,f)!=0){
- size_t size;
-
- size = strlen(str);
- memset(conv,0,4096);
- decode_base64(conv,str,&size);
-
- conv[size] = '\0';
- printf("%s",conv);
- memset(str,0,4096);
-
- }
- }
-
- if (opt.sleep != 0){
- sleep(opt.sleep);
- }
-
- if( opt.input_file != 0){
- free(opt.input_file);
- }
-
- icalmemory_free_ring();
-
- return 0;
-
-}
-
-
-
-
-
-
-
-
diff --git a/libical/src/test/testvcal.c b/libical/src/test/testvcal.c
deleted file mode 100644
index f82adffcc8..0000000000
--- a/libical/src/test/testvcal.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C -*-
- ======================================================================
- FILE: vcal.c
- CREATOR: eric 26 May 2000
-
- $Id$
- $Locker$
-
- (C) COPYRIGHT 2000 Eric Busboom
- http://www.softwarestudio.org
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
- ======================================================================*/
-
-#include "icalvcal.h"
-#include <stdio.h>
-
-/* Given a vCal data file as its first argument, this program will
- print out an equivalent iCal component.
-
- For instance:
-
- ./testvcal ../../test-data/user-cal.vcf
-
-*/
-
-int main(int argc, char* argv[])
-{
- VObject *vcal = 0;
- icalcomponent *comp;
- char* file;
-
- if (argc != 2){
- file = "../../test-data/user-cal.vcf";
- } else {
- file = argv[1];
- }
-
-
- vcal = Parse_MIME_FromFileName(file);
-
- assert(vcal != 0);
-
- comp = icalvcal_convert(vcal);
-
- printf("%s\n",icalcomponent_as_ical_string(comp));
-
- return 0;
-}
-
-
diff --git a/libical/test-data/.cvsignore b/libical/test-data/.cvsignore
deleted file mode 100644
index b840c21800..0000000000
--- a/libical/test-data/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile \ No newline at end of file
diff --git a/libical/test-data/0 b/libical/test-data/0
deleted file mode 100644
index ed915ad582..0000000000
--- a/libical/test-data/0
+++ /dev/null
@@ -1,7 +0,0 @@
-BEGIN:VCALENDAR
-BEGIN:VEVENT
-SUMMARY:Bastille Day Party This option indicates that xauth should attempt to break any authority file locks before proceeding.
-SUMMARY:Bastille Day Party This option indicates that xauth should
- attempt to break any authority file locks before proceeding.
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/1 b/libical/test-data/1
deleted file mode 100644
index a4d078d47b..0000000000
--- a/libical/test-data/1
+++ /dev/null
@@ -1,38 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:"-//RDU Software//NONSGML HandCal//EN"
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:US-Eastern
-BEGIN:STANDARD
-DTSTART:19981025T020000
-RDATE:19981025T020000
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTAR: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
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:mailto:Employee-B@HOST.com
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MailTo:Eric@Agony.Qualcomm.com
-DESCRIPTION:Project XYZ Review Meeting
-CATEGORIES:MEETING
-CLASS:PUBLIC
-CREATED:19980309T130000Z
-SUMMARY:XYZ Project Review
-DTSTAR;TZID=US-Eastern:19980312T083000
-DTEND;TZID=US-Eastern:19980312T093000
-LOCATION:1CP Conference Room 4350
-END:VEVENT
-END:VCALENDAR
-
diff --git a/libical/test-data/1.1 b/libical/test-data/1.1
deleted file mode 100644
index a7c92c33bd..0000000000
--- a/libical/test-data/1.1
+++ /dev/null
@@ -1,13 +0,0 @@
-BEGIN:VCALENDAR
-DURATION:P15DT5H0M20S
-DURATION:P7W
-URL;CN=John Smith:http://example.com/urivalue.html
-X-SKI-TITLE;RSVP=TRUE: This is an extension property
-SUMMARY:"No Property"
-SUMMARY;RSVP=TRUE;RSVP=FALSE:Calendaring Interoperability Planning Meeting
-SUMMARY;ALTREP=This is an xname:altrep
-SUMMARY;CUTYPE=DESCRIPTION is a keyword:Xname parameter
-DTEND:19990605
-DTSTART:19990605T103012
-CATEGORIES;RSVP=TRUE;RSVP=FALSE:one,two
-END:VCALENDAR
diff --git a/libical/test-data/2 b/libical/test-data/2
deleted file mode 100644
index 50ba609ab3..0000000000
--- a/libical/test-data/2
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-METHOD:xyz
-VERSION:2.0
-PRODID:-//ABC Corporation//NONSGML
- My Product//EN
-BEGIN:VEVENT
-DTSTAMP:19970324T1200Z
-SEQUENCE:0
-UID:uid3@host1.com
-ORGANIZER:MAILTO:jdoe@host1.com
-ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com
-DTSTART:19970324T123000Z
-DTEND:19970324T210000Z
-CATEGORIES:MEETING,PROJECT
-CLASS:PUBLIC
-SUMMARY:Calendaring Interoperability Planning Meeting
-DESCRIPTION:Discuss how we can test c&s interoperability\n
- using iCalendar and other IETF standards.
-LOCATION:LDB Lobby
-ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/conf/bkgrnd.ps
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/2445.ics b/libical/test-data/2445.ics
deleted file mode 100644
index ecf6f106ff..0000000000
--- a/libical/test-data/2445.ics
+++ /dev/null
@@ -1,331 +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
-END:VCALENDAR
-
-BEGIN:VEVENT
-UID:19970901T130000Z-123401@host.com
-DTSTAMP:19970901T130000Z
-DTSTART:19970903T163000Z
-DTEND:19970903T190000Z
-SUMMARY:Annual Employee Review
-CLASS:PRIVATE
-CATEGORIES:BUSINESS,HUMAN RESOURCES
-END:VEVENT
-
-BEGIN:VEVENT
-UID:19970901T130000Z-123402@host.com
-DTSTAMP:19970901T130000Z
-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:19970901T130000Z
-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:19970901T130000Z
-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:19970901T130000Z
-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
-DTSTART:19971015T050000Z
-DTEND:19971016T050000Z
-FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M,
- 19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M
-URL:http://host2.com/pub/busy/jpublic-01.ifb
-COMMENT:This iCalendar file contains busy time information for
- the next three months.
-END:VFREEBUSY
-
-BEGIN:VFREEBUSY
-ORGANIZER:jsmith@host.com
-DTSTART:19980313T141711Z
-DTEND:19980410T141711Z
-FREEBUSY:19980314T233000Z/19980315T003000Z
-FREEBUSY:19980316T153000Z/19980316T163000Z
-FREEBUSY:19980318T030000Z/19980318T040000Z
-URL:http://www.host.com/calendar/busytime/jsmith.ifb
-END:VFREEBUSY
-BEGIN:VTIMEZONE
-TZID:US-Eastern
-LAST-MODIFIED:19870101T000000Z
-BEGIN:STANDARD
-DTSTART:19971026T020000
-RDATE:19971026T020000
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19971026T020000
-RDATE:19970406T020000
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VTIMEZONE
-TZID:US-Eastern
-LAST-MODIFIED:19870101T000000Z
-TZURL:http://zones.stds_r_us.net/tz/US-Eastern
-BEGIN:STANDARD
-DTSTART:19671029T020000
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VTIMEZONE
-TZID:US--Fictitious-Eastern
-LAST-MODIFIED:19870101T000000Z
-BEGIN:STANDARD
-DTSTART:19671029T020000
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VTIMEZONE
-TZID:US--Fictitious-Eastern
-LAST-MODIFIED:19870101T000000Z
-BEGIN:STANDARD
-DTSTART:19671029T020000
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-DTSTART:19990424T020000
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VALARM
-TRIGGER;VALUE=DATE-TIME:19970317T133000Z
-REPEAT:4
-DURATION:PT15M
-ACTION:AUDIO
-ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud
-END:VALARM
-BEGIN:VALARM
-TRIGGER:-PT30M
-REPEAT:2
-DURATION:PT15M
-ACTION:DISPLAY
-DESCRIPTION:Breakfast meeting with executive\n
- team at 8:30 AM EST.
-END:VALARM
-BEGIN:VALARM
-TRIGGER:-P2D
-ACTION:EMAIL
-ATTENDEE:MAILTO:john_doe@host.com
-SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING ***
-DESCRIPTION:A draft agenda needs to be sent out to the attendees
- to the weekly managers meeting (MGR-LIST). Attached is a
- pointer the document template for the agenda file.
-ATTACH;FMTTYPE=application/binary:http://host.com/templates/agen
- da.doc
-END:VALARM
-BEGIN:VALARM
-TRIGGER;VALUE=DATE-TIME:19980101T050000Z
-REPEAT:23
-DURATION:PT1H
-ACTION:PROCEDURE
-ATTACH;FMTTYPE=application/binary:ftp://host.com/novo-
- procs/felizano.exe
-END:VALARM
-
-BEGIN:VCALENDAR
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:US-Eastern
-BEGIN:STANDARD
-DTSTART:19981025T020000
-RDATE:19981025T020000
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19990404T020000
-RDATE:19990404T020000
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VEVENT
-DTSTAMP:19980309T231000Z
-UID:guid-1.host1.com
-ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
- MAILTO:employee-A@host.com
-DESCRIPTION:Project XYZ Review Meeting
-CATEGORIES:MEETING
-CLASS:PUBLIC
-CREATED:19980309T130000Z
-SUMMARY:XYZ Project Review
-DTSTART;TZID=US-Eastern:19980312T083000
-DTEND;TZID=US-Eastern:19980312T093000
-LOCATION:1CP Conference Room 4350
-END:VEVENT
-END:VCALENDAR
-
-
-BEGIN:VCALENDAR
-METHOD:PUBLISH
-VERSION:2.0
-PRODID:-//ABC Corporation//NONSGML My Product//EN
-BEGIN:VEVENT
-DTSTAMP:19970324T120000Z
-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
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//ABC Corporation//NONSGML My Product//EN
-BEGIN:VTODO
-DTSTAMP:19980130T134500Z
-SEQUENCE:2
-UID:uid4@host1.com
-ORGANIZER:MAILTO:unclesam@us.gov
-ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic@host.com
-DUE:19980415T235959
-STATUS:NEEDS-ACTION
-SUMMARY:Submit Income Taxes
-BEGIN:VALARM
-ACTION:AUDIO
-TRIGGER:P1DT25M
-ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-
- files/ssbanner.aud
-REPEAT:4
-DURATION:PT1H
-END:VALARM
-END:VTODO
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//ABC Corporation//NONSGML My Product//EN
-BEGIN:VJOURNAL
-DTSTAMP:19970324T120000Z
-UID:uid5@host1.com
-ORGANIZER:MAILTO:jsmith@host.com
-STATUS:DRAFT
-CLASS:PUBLIC
-CATEGORIES:Project Report, XYZ, Weekly Meeting
-DESCRIPTION:Project xyz Review Meeting Minutes\n
- Agenda\n1. Review of project version 1.0 requirements.\n2.
- Definition
- of project processes.\n3. Review of project schedule.\n
- Participants: John Smith\, Jane Doe\, Jim Dandy\n-It was
- decided that the requirements need to be signed off by
- product marketing.\n-Project processes were accepted.\n
- -Project schedule needs to account for scheduled holidays
- and employee vacation time. Check with HR for specific
- dates.\n-New schedule will be distributed by Friday.\n-
- Next weeks meeting is cancelled. No meeting until 3/23.
-END:VJOURNAL
-END:VCALENDAR
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//RDU Software//NONSGML HandCal//EN
-BEGIN:VFREEBUSY
-ORGANIZER:MAILTO:jsmith@host.com
-DTSTART:19980313T141711Z
-DTEND:19980410T141711Z
-FREEBUSY:19980314T233000Z/19980315T003000Z
-FREEBUSY:19980316T153000Z/19980316T163000Z
-FREEBUSY:19980318T030000Z/19980318T040000Z
-URL:http://www.host.com/calendar/busytime/jsmith.ifb
-END:VFREEBUSY
-END:VCALENDAR
diff --git a/libical/test-data/2446.ics b/libical/test-data/2446.ics
deleted file mode 100644
index c6e2359aa1..0000000000
--- a/libical/test-data/2446.ics
+++ /dev/null
@@ -1,1006 +0,0 @@
-
-BEGIN:VCALENDAR
-METHOD:PUBLISH
-PRODID:-//ACME/DesktopCalendar//EN
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-DTSTART:19970701T200000Z
-DTSTAMP:19970611T190000Z
-SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
-UID:0981234-1234234-23@example.com
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-METHOD:PUBLISH
-VERSION:2.0
-PRODID:-//ACME/DesktopCalendar//EN
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-DTSTAMP:19970612T190000Z
-DTSTART:19970701T210000Z
-DTEND:19970701T230000Z
-SEQUENCE:1
-UID:0981234-1234234-23@example.com
-SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-METHOD:CANCEL
-VERSION:2.0
-PRODID:-//ACME/DesktopCalendar//EN
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-COMMENT:DUKES forfeit the game
-SEQUENCE:2
-UID:0981234-1234234-23@example.com
-DTSTAMP:19970613T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:PUBLISH
-CALSCALE:GREGORIAN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:America-Chicago
-TZURL:http://zones.stds_r_us.net/tz/America-Chicago
-BEGIN:STANDARD
-DTSTART:19671029T020000
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-ATTACH:http://www.dukes.com/
-CATEGORIES:SPORTS EVENT,ENTERTAINMENT
-CLASS:PRIVATE
-DESCRIPTION:MIDWAY STADIUM\n
- Big time game. MUST see.\n
- Expected duration:2 hours\n
-DTEND;TZID=America-Chicago:19970701T180000
-DTSTART;TZID=America-Chicago:19970702T160000
-DTSTAMP:19970614T190000Z
-STATUS:CONFIRMED
-LOCATION;VALUE=URI:http://www.midwaystadium.com/
-PRIORITY:2
-RESOURCES:SCOREBOARD
-SEQUENCE:3
-SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
-UID:0981234-1234234-23@example.com
-RELATED-TO:0981234-1234234-14@example.com
-BEGIN:VALARM
-TRIGGER:-PT2H
-ACTION:DISPLAY
-DESCRIPTION:You should be leaving for the game now.
-END:VALARM
-BEGIN:VALARM
-TRIGGER:-PT30M
-ACTION:AUDIO
-END:VALARM
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:PUBLISH
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-DTSTAMP:19970614T190000Z
-UID:0981234-1234234-23@example.com
-DTSTART;VALUE=DATE:19970714
-RRULE:FREQ=YEARLY;INTERVAL=1
-SUMMARY: Bastille Day
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19970611T190000Z
-DTSTART:19970701T200000Z
-DTEND:19970701T200000Z
-SUMMARY:Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VEVENT
-ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com
-ORGANIZER:MAILTO:A@example.com
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970612T190000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE;
- CUTYPE=ROOM:Mailto:Conf@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTART:19970701T180000Z
-DTEND:19970701T190000Z
-SUMMARY:Phone Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-DTSTAMP:19970613T190000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-DTSTART:19970701T190000Z
-DTEND:19970701T200000Z
-SUMMARY:Discuss the Merits of the election results
-LOCATION:Green Conference Room
-UID:calsrv.example.com-873970198738777a@example.com
-SEQUENCE:0
-DTSTAMP:19970611T190000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:COUNTER
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-DTSTART:19970701T160000Z
-DTEND:19970701T190000Z
-DTSTAMP:19970612T190000Z
-SUMMARY:Discuss the Merits of the election results
-LOCATION:Green Conference Room
-COMMENT:This time works much better and I think the big conference
- room is too big
-UID:calsrv.example.com-873970198738777a@example.com
-SEQUENCE:0
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-DTSTAMP:19970613T190000Z
-DTSTART:19970701T160000Z
-DTEND:19970701T190000Z
-SUMMARY:Discuss the Merits of the election results - changed to
- meet B's schedule
-LOCATION:Green Conference Room
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:DECLINECOUNTER
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-COMMENT:Sorry\, I cannot change this meeting time
-UID:calsrv.example.com-873970198738777@example.com
-DTSTAMP:19970614T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:MAILTO:A@Example.com
-ATTENDEE;PARTSTAT=DELEGATED;DELEGATED-
- TO="Mailto:E@example.com":Mailto:C@example.com
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970611T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;PARTSTAT=DELEGATED;DELEGATED-
- TO="Mailto:E@example.com":Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;
- DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com
-DTSTART:19970701T180000Z
-DTEND:19970701T200000Z
-SUMMARY:Phone Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-STATUS:CONFIRMED
-DTSTAMP:19970611T190000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:MAILTO:A@Example.com
-ATTENDEE;PARTSTAT=ACCEPTED;DELEGATED-
- FROM="Mailto:C@example.com":Mailto:E@example.com
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970614T190000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:MAILTO:A@Example.com
-ATTENDEE;PARTSTAT=DELEGATED;
- DELEGATED-TO="Mailto:E@example.com":Mailto:C@example.com
-COMMENT:Sorry\, I will be out of town at that time.
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970614T190000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:MAILTO:A@Example.com
-ATTENDEE;PARTSTAT=DECLINED;
- DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com
-ATTENDEE;RSVP=TRUE:Mailto:C@example.com
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-SUMMARY:Phone Conference
-DTSTART:19970701T180000Z
-DTEND:19970701T200000Z
-DTSTAMP:19970614T200000Z
-COMMENT:DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOUR
- INVITATION
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:CANCEL
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:A@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-COMMENT:Mr. B cannot attend. It's raining. Lets cancel.
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-STATUS:CANCELLED
-DTSTAMP:19970613T190000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:CANCEL
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE:mailto:B@example.com
-COMMENT:You're off the hook for this meeting
-UID:calsrv.example.com-873970198738777@example.com
-DTSTAMP:19970613T193000Z
-SEQUENCE:1
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-ATTENDEE;CUTYPE=ROOM:CR_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;
- RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19970611T190000Z
-DTSTART:19970701T200000Z
-DTEND:19970701T203000Z
-SUMMARY:Phone Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:2
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:B@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-DTSTAMP:19970611T190000Z
-DTSTART:19970701T200000Z
-DTEND:19970701T203000Z
-RRULE:FREQ=WEEKLY
-SUMMARY:Phone Conference
-UID:123456@example.com
-SEQUENCE:1
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-VERSION:2.0
-METHOD:PUBLISH
-BEGIN:VFREEBUSY
-DTSTAMP:19980101T124100Z
-ORGANIZER:MAILTO:A@Example.com
-DTSTART:19980101T124200Z
-DTEND:19980107T124200Z
-FREEBUSY:19980101T180000Z/19980101T190000Z
-FREEBUSY:19980103T020000Z/19980103T050000Z
-FREEBUSY:19980107T020000Z/19980107T050000Z
-FREEBUSY:19980113T000000Z/19980113T010000Z
-FREEBUSY:19980115T190000Z/19980115T200000Z
-FREEBUSY:19980115T220000Z/19980115T230000Z
-FREEBUSY:19980116T013000Z/19980116T043000Z
-END:VFREEBUSY
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VFREEBUSY
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-ATTENDEE:Mailto:C@example.com
-DTSTAMP:19970613T190000Z
-DTSTART:19970701T080000Z
-DTEND:19970701T200000
-UID:calsrv.example.com-873970198738777@example.com
-END:VFREEBUSY
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VFREEBUSY
-ORGANIZER:MAILTO:A@example.com
-ATTENDEE:Mailto:B@example.com
-DTSTART:19970701T080000Z
-DTEND:19970701T200000Z
-UID:calsrv.example.com-873970198738777@example.com
-FREEBUSY:19970701T090000Z/PT1H,19970701T140000Z/PT30M
-DTSTAMP:19970613T190030Z
-END:VFREEBUSY
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:America-SanJose
-TZURL:http://zones.stds_r_us.net/tz/America-SanJose
-BEGIN:STANDARD
-DTSTART:19671029T020000
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-END:STANDARD
-BEGIN:DAYLIGHT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-END:DAYLIGHT
-END:VTIMEZONE
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:A@example.COM
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:B@example.fr
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:c@example.jp
-DTSTAMP:19970613T190030Z
-DTSTART;TZID=America-SanJose:19970701T140000
-DTEND;TZID=America-SanJose:19970701T150000
-RRULE:FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU
-RDATE;TZID=America-SanJose:19970910T140000
-EXDATE;TZID=America-SanJose:19970909T140000
-EXDATE;TZID=America-SanJose:19971028T140000
-SUMMARY:Weekly Phone Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1.com
-SEQUENCE:0
-RRULE:FREQ=MONTHLY;BYMONTHDAY=1;UNTIL=19980901T210000Z
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-ATTENDEE:Mailto:C@example.com
-ATTENDEE:Mailto:D@example.com
-DESCRIPTION:IETF-C&S Conference Call
-CLASS:PUBLIC
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970601T210000Z
-DTEND:19970601T220000Z
-LOCATION:Conference Call
-DTSTAMP:19970526T083000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1com
-RECURRENCE-ID:19970701T210000Z
-SEQUENCE:1
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-ATTENDEE:Mailto:C@example.com
-ATTENDEE:Mailto:D@example.com
-DESCRIPTION:IETF-C&S Conference Call
-CLASS:PUBLIC
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970703T210000Z
-DTEND:19970703T220000Z
-LOCATION:Conference Call
-DTSTAMP:19970626T093000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:CANCEL
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1.com
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-ATTENDEE:Mailto:C@example.com
-ATTENDEE:Mailto:D@example.com
-RECURRENCE-ID:19970801T210000Z
-SEQUENCE:2
-STATUS:CANCELLED
-DTSTAMP:19970721T093000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:CANCEL
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1.com
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-ATTENDEE:Mailto:C@example.com
-ATTENDEE:Mailto:D@example.com
-DTSTAMP:19970721T103000Z
-STATUS:CANCELLED
-SEQUENCE:3
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1.com
-RECURRENCE-ID;RANGE=THISANDFUTURE:19970901T210000Z
-SEQUENCE:3
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE:Mailto:D@example.com
-DESCRIPTION:IETF-C&S Discussion
-CLASS:PUBLIC
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970901T210000Z
-DTEND:19970901T220000Z
-LOCATION:Building 32\, Microsoft\, Seattle\, WA
-DTSTAMP:19970526T083000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:ADD
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:4
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE:Mailto:D@example.com
-DESCRIPTION:IETF-C&S Conference Call
-CLASS:PUBLIC
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970715T210000Z
-DTEND:19970715T220000Z
-LOCATION:Conference Call
-DTSTAMP:19970629T093000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:0
-RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=TU
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980303T210000Z
-DTEND:19980303T220000Z
-LOCATION:The White Room
-DTSTAMP:19980301T093000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:ADD
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:7
-RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=TH
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980303T210000Z
-DTEND:19980303T220000Z
-DTSTAMP:19980303T193000Z
-LOCATION:The Usual conference room
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:7
-RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=TU,TH
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980303T210000Z
-DTEND:19980303T220000Z
-DTSTAMP:19980303T193000Z
-LOCATION:The White Room
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:0
-RDATE:19980304T180000Z
-RDATE:19980311T180000Z
-RDATE:19980318T180000Z
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980304T180000Z
-DTEND:19980304T200000Z
-DTSTAMP:19980303T193000Z
-LOCATION:Conference Room A
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:1
-RECURRENCE-ID:19980311T180000Z
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980311T160000Z
-DTEND:19980311T180000Z
-DTSTAMP:19980306T193000Z
-LOCATION:The Small conference room
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:ADD
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:2
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980315T180000Z
-DTEND:19980315T200000Z
-DTSTAMP:19980307T193000Z
-LOCATION:Conference Room A
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:123456789@host1.com
-SEQUENCE:2
-RDATE:19980304T180000Z
-RDATE:19980311T160000Z
-RDATE:19980315T180000Z
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980304T180000Z
-DTEND:19980304T200000Z
-DTSTAMP:19980303T193000Z
-LOCATION:Conference Room A
-STATUS:CONFIRMED
-END:VEVENT
-BEGIN:VEVENT
-SEQUENCE:2
-RECURRENCE-ID:19980311T160000Z
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-SUMMARY:Review Accounts
-DTSTART:19980311T160000Z
-DTEND:19980304T180000Z
-DTSTAMP:19980306T193000Z
-ORGANIZER:Mailto:A@example.com
-LOCATION:The Small conference room
-UID:guid-1@host1.com
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:COUNTER
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1.com
-RECURRENCE-ID:19970715T210000Z
-SEQUENCE:4
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;RSVP=TRUE:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE:Mailto:D@example.com
-DESCRIPTION:IETF-C&S Conference Call
-CLASS:PUBLIC
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970715T220000Z
-DTEND:19970715T230000Z
-LOCATION:Conference Call
-COMMENT:May we bump this by an hour? I have a conflict
-DTSTAMP:19970629T094000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:guid-1@host1.com
-SEQUENCE:0
-RRULE:FREQ=MONTHLY;BYMONTHDAY=1
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE:Mailto:D@example.com
-DESCRIPTION:IETF-C&S Conference Call
-CLASS:PUBLIC
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970601T210000Z
-DTEND:19970601T220000Z
-DTSTAMP:19970602T094000Z
-LOCATION:Conference Call
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//RDU Software//NONSGML HandCal//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-REQUEST-STATUS:2.8;Repeating event ignored. Scheduled as a single
- event;RRULE
-REQUEST-STATUS:3.0;Invalid Property Name;FOO
-UID:guid-1@host1.com
-SEQUENCE:0
-DTSTAMP:19970603T094000Z
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE:Mailto:D@example.com
-DTSTART:19970701T170000Z
-DUE:19970722T170000Z
-PRIORITY:1
-SUMMARY:Create the requirements document
-UID:calsrv.example.com-873970198738777-00@example.com
-SEQUENCE:0
-DTSTAMP:19970717T200000Z
-STATUS:NEEDS-ACTION
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com
-UID:calsrv.example.com-873970198738777-00@example.com
-COMMENT:I'll send you my input by e-mail
-SEQUENCE:0
-DTSTAMP:19970717T203000Z
-REQUEST-STATUS:2.0;Success
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-UID:calsrv.example.com-873970198738777-00@example.com
-SUMMARY:Create the requirements document
-PRIORITY:1
-SEQUENCE:0
-STATUS:IN-PROCESS
-DTSTART:19970701T170000Z
-DTSTAMP:19970717T230000Z
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:MAILTO:A@example.com
-ATTENDEE;PARTSTAT=IN-PROCESS:Mailto:B@example.com
-PERCENT-COMPLETE:75
-REQUEST-STATUS:2.0
-UID:calsrv.example.com-873970198738777-00@example.com
-DTSTAMP:19970717T233000Z
-SEQUENCE:0
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:MAILTO:A@example.com
-ATTENDEE;PARTSTAT=COMPLETED:Mailto:D@example.com
-UID:calsrv.example.com-873970198738777-00@example.com
-REQUEST-STATUS:2.0
-DTSTAMP:19970717T233000Z
-SEQUENCE:0
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;PARTSTAT=IN-PROCESS;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-DTSTART:19970701T170000Z
-DUE:19970722T170000Z
-PRIORITY:1
-SUMMARY:Create the requirements document
-UID:calsrv.example.com-873970198738777-00@example.com
-SEQUENCE:1
-DTSTAMP:19970718T100000Z
-STATUS:IN-PROCESS
-PERCENT-COMPLETE:40
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VTODO
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR
-DTSTART:19980101T100000
-DUE:19980103T100000
-SUMMARY:Send Status Reports to Area Managers
-UID:calsrv.example.com-873970198738777-00@example.com
-SEQUENCE:0
-DTSTAMP:19970717T200000Z
-STATUS:NEEDS-ACTION
-PRIORITY:1
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VTODO
-ATTENDEE;PARTSTAT=IN-PROCESS:Mailto:B@example.com
-PERCENT-COMPLETE:75
-UID:calsrv.example.com-873970198738777-00@example.com
-DTSTAMP:19970717T233000Z
-RECURRENCE-ID:19980101T170000Z
-SEQUENCE:1
-ORGANIZER:MAILTO:A@Example.com
-REQUEST-STATUS:2.0
-END:VTODO
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:PUBLISH
-PRODID:-//ACME/DesktopCalendar//EN
-VERSION:2.0
-BEGIN:VJOURNAL
-DTSTART:19971002T200000Z
-DTSTAMP:19971002T200000Z
-ORGANIZER:MAILTO:A@Example.com
-SUMMARY:Phone conference minutes
-DESCRIPTION:The editors meeting was held on October 1\, 1997.
- Details are in the attached document.
-UID:0981234-1234234-2410@example.com
-RELATED-TO:0981234-1234234-2402-35@example.com
-ATTACH:ftp://ftp.example.com/pub/ed/minutes100197.txt
-END:VJOURNAL
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//RDU Software//NONSGML HandCal//EN
-METHOD:REFRESH
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-UID: guid-1-12345@host1.com
-DTSTAMP:19970603T094000
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-METHOD:REQUEST
-PRODID:-//RDU Software//NONSGML HandCal//EN
-VERSION:2.0
-BEGIN:VEVENT
-UID:acme-12345@host1.com
-SEQUENCE:3
-RRULE:FREQ=WEEKLY
-RDATE;VALUE=PERIOD:19970819T210000Z/19970819T220000Z
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-DESCRIPTION:IETF-C&S Conference Call
-SUMMARY:IETF Calendaring Working Group Meeting
-DTSTART:19970801T210000Z
-DTEND:19970801T220000Z
-RECURRENCE-ID:19970809T210000Z
-DTSTAMP:19970726T083000
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-BEGIN:VCALENDAR
-PRODID:-//RDU Software//NONSGML HandCal//EN
-METHOD:REFRESH
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE:Mailto:B@example.com
-UID:acme-12345@host1.com
-DTSTAMP:19970603T094000
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/3 b/libical/test-data/3
deleted file mode 100644
index 008373ebfa..0000000000
--- a/libical/test-data/3
+++ /dev/null
@@ -1,21 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//ABC Corporation//NONSGML My Product//EN
-BEGIN:VTODO
-DTSTAMP:19980130T134500Z
-SEQUENCE:2
-UID:uid4@host1.com
-ORGANIZER:MAILTO:unclesam@us.gov
-ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic@host.com
-DUE:19980415T235959
-STATUS:NEEDS-ACTION
-SUMMARY:Submit Income Taxes
-BEGIN:VALARM
-ACTION:AUDIO
-TRIGGER;VALUE=DATE-TIME:19980403T120000
-ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud
-REPEAT:4
-DURATION:PT1H
-END:VALARM
-END:VTODO
-END:VCALENDAR
diff --git a/libical/test-data/4 b/libical/test-data/4
deleted file mode 100644
index 59c3d6917b..0000000000
--- a/libical/test-data/4
+++ /dev/null
@@ -1,23 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//ABC Corporation//NONSGML My Product//EN
-BEGIN:VJOURNAL
-DTSTAMP:19970324T120000Z
-UID:uid5@host1.com
-ORGANIZER:MAILTO:jsmith@host.com
-STATUS:DRAFT
-CLASS:PUBLIC
-CATEGORIES:Project Report, XYZ: Weekly Meeting
-DESCRIPTION:Project xyz Review Meeting Minutes\n
- Agenda\n1. Review of project version 1.0 requirements.\n2.
- Definition
- of project processes.\n3. Review of project schedule.\n
- Participants: John Smith\, Jane Doe\, Jim Dandy\n-It was
- decided that the requirements need to be signed off by
- product marketing.\n-Project processes were accepted.\n
- -Project schedule needs to account for scheduled holidays
- and employee vacation time. Check with HR for specific
- dates.\n-New schedule will be distributed by Friday.\n-
- Next weeks meeting is cancelled. No meeting until 3/23.
-END:VJOURNAL
-END:VCALENDAR
diff --git a/libical/test-data/5 b/libical/test-data/5
deleted file mode 100644
index ba1fd09f7f..0000000000
--- a/libical/test-data/5
+++ /dev/null
@@ -1,16 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//RDU Software//NONSGML HandCal//EN
-BEGIN:VFREEBUSY
-ORGANIZER:MAILTO:jsmith@host.com
-DTSTART:19980313T141711Z
-DTEND:19980410T141711
-FREEBUSY:19980314T233000Z/19980315T003000Z
-FREEBUSY:19980316T153000Z/19980316T163000Z
-FREEBUSY:19980318T030000/19980318T040000,19980318T030000/19980318T040000
-URL:http://www.host.com/calendar/busytime/jsmith.ifb
-END:VFREEBUSY
-END:VCALENDAR
-
-
-
diff --git a/libical/test-data/6 b/libical/test-data/6
deleted file mode 100644
index 753bd2b66c..0000000000
--- a/libical/test-data/6
+++ /dev/null
@@ -1,12 +0,0 @@
-BEGIN:VCALENDAR
-METHOD:PUBLISH
-PRODID:-//ACME/DesktopCalendar//EN
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-DTSTART:19970701T200000Z
-DTSTAMP:19970611T190000Z
-SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
-UID:0981234-1234234-23@example.com
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/7 b/libical/test-data/7
deleted file mode 100644
index 0a255fc514..0000000000
--- a/libical/test-data/7
+++ /dev/null
@@ -1,14 +0,0 @@
-BEGIN:VCALENDAR
-METHOD:PUBLISH
-VERSION:2.0
-PRODID:-//ACME/DesktopCalendar//EN
-BEGIN:VEVENT
-ORGANIZER:mailto:a@example.com
-DTSTAMP:19970612T190000Z
-DTSTART:19970701T210000Z
-DTEND:19970701T230000Z
-SEQUENCE:1
-UID:0981234-1234234-23@example.com
-SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/Makefile.am b/libical/test-data/Makefile.am
deleted file mode 100644
index c3475a9c31..0000000000
--- a/libical/test-data/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-EXTRA_DIST = \
-0 \
-1 \
-1.1 \
-2 \
-2445.ics \
-2446.ics \
-3 \
-4 \
-5 \
-6 \
-7 \
-smallcluster.ics \
-recur.txt \
-user-cal.vcf \
-complex-mime.txt \
-simple-mime.txt \
-stresstest.ics \
-classify.ics \
-incoming.ics \
-process-incoming.ics \
-calendar.ics \
-restriction.ics \
-overlaps.ics
-
-
diff --git a/libical/test-data/calendar.ics b/libical/test-data/calendar.ics
deleted file mode 100644
index 63b0a93838..0000000000
--- a/libical/test-data/calendar.ics
+++ /dev/null
@@ -1,47 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:CREATE
-X-LIC-NOTE: #C1. Rescheduled by #I1\ and updated by #I2
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19970611T190000Z
-DTSTART:19970701T190000Z
-DTEND:19970701T1930000Z
-SUMMARY:Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-X-LIC-NOTE: #C2. The test user is the organizer.
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE;
- CUTYPE=ROOM:Mailto:Conf@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTART:19970701T180000Z
-DTEND:19970701T190000Z
-SUMMARY:Phone Conference
-UID:calsrv.example.com-873970198738785@example.com
-SEQUENCE:0
-DTSTAMP:19970613T190000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
diff --git a/libical/test-data/classify.ics b/libical/test-data/classify.ics
deleted file mode 100644
index c7c5a1e438..0000000000
--- a/libical/test-data/classify.ics
+++ /dev/null
@@ -1,43 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19970611T190000Z
-DTSTART:19960701T200000Z
-DTEND:19970701T200000Z
-SUMMARY:Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19950611T190000Z
-DTSTART:19970701T200000Z
-DTEND:19970701T200000Z
-SUMMARY:Conference in the park
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/complex-mime.txt b/libical/test-data/complex-mime.txt
deleted file mode 100644
index 32cb106dfd..0000000000
--- a/libical/test-data/complex-mime.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-From: foo1@example.com
-MIME-Version: 1.0
-To: foo2@example.com,foo3@example.com
-Subject: REQUEST - Phone Conference
-Content-Type:multipart/related;boundary="--FEE3790DC7E35189CA67CE2C"
-
-----FEE3790DC7E35189CA67CE2C
-Content-Type: multipart/alternative;
- boundary="--00FEE3790DC7E35189CA67CE2C00"
-
-----00FEE3790DC7E35189CA67CE2C00
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-When: 7/1/1997 10:00PM PDT- 7/1/97 10:30 PM PDT
-Where:
-Organizer: foo1@example.com
-Summary: Let's discuss the attached document
-
-
-----00FEE3790DC7E35189CA67CE2C00
-Content-Type:text/calendar; method=REQUEST; charset=US-ASCII;
- Component=vevent
-Content-Transfer-Encoding: quoted-printable
-Content-Disposition: attachment; filename="event.vcs"
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-VERSION:2.0
-METHOD:REQUEST
-BEGIN:VEVENT
-ORGANIZER:foo1@example.com
-ATTENDEE;RSVP=3DTRUE;ROLE=3DREQ-PARTICIPANT;CUTYPE=3DGROUP:MAILTO:employe=
-e-A@host.com
-ATTENDEE;RSVP=3DTRUE;ROLE=3DREQ-PARTICIPANT;CUTYPE=3DGROUP:mailto:Employe=
-e-B@HOST.com
-ATTENDEE;RSVP=3DTRUE;ROLE=3DREQ-PARTICIPANT;CUTYPE=3DGROUP:MailTo:Eric@Ag=
-ony.Busboom.org
-DTSTAMP:19970611T190000Z
-DTSTART:19970621T170000Z
-DTEND:199706211T173000Z
-SUMMARY:Let's discuss the attached document
-UID:calsvr.example.com-873970198738777-8aa
-SEQUENCE:0
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-----00FEE3790DC7E35189CA67CE2C00
-Content-Type:text/calendar; method=REQUEST; charset=US-ASCII;
- Component=vevent
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="event.vcs"
-
-QkVHSU46VkNBTEVOREFSClBST0RJRDotLy9BQ01FL0Rlc2t0b3BDYWxlbmRhci8vRU4KVkVS
-U0lPTjoyLjAKQkVHSU46VkVWRU5UCk9SR0FOSVpFUjpmb28xQGV4YW1wbGUuY29tCkFUVEVO
-REVFO1JTVlA9VFJVRTtST0xFPVJFUS1QQVJUSUNJUEFOVDtDVVRZUEU9R1JPVVA6TUFJTFRP
-OmVtcGxveWVlLUFAaG9zdC5jb20KQVRURU5ERUU7UlNWUD1UUlVFO1JPTEU9UkVRLVBBUlRJ
-Q0lQQU5UO0NVVFlQRT1HUk9VUDptYWlsdG86RW1wbG95ZWUtQkBIT1NULmNvbQpBVFRFTkRF
-RTtSU1ZQPVRSVUU7Uk9MRT1SRVEtUEFSVElDSVBBTlQ7Q1VUWVBFPUdST1VQOk1haWxUbzpF
-cmljQEFnb255LlF1YWxjb21tLmNvbQpEVFNUQU1QOjE5OTcwNjExVDE5MDAwMFoKRFRTVEFS
-VDoxOTk3MDYyMVQxNzAwMDBaCkRURU5EOjE5OTcwNjIxMVQxNzMwMDBaClNVTU1BUlk6TGV0
-J3MgZGlzY3VzcyB0aGUgYXR0YWNoZWQgZG9jdW1lbnQKVUlEOmNhbHN2ci5leGFtcGxlLmNv
-bS04NzM5NzAxOTg3Mzg3NzctOGFhClNFUVVFTkNFOjAKU1RBVFVTOkNPTkZJUk1FRApFTkQ6
-VkVWRU5UCkVORDpWQ0FMRU5EQVIK
-
-
-----00FEE3790DC7E35189CA67CE2C00--
-
-----FEE3790DC7E35189CA67CE2C
-Content-Type: application/msword; name="FieldReport.doc"
-Content-Transfer-Encoding: base64
-Content-Disposition: inline; filename="FieldReport.doc"
-Content-ID: <calsvr.example.com-12345aaa>
-
-
-R0lGODdhTAQZAJEAAFVVVd3d3e4AAP///ywAAAAATAQZAAAC/5yPOSLhD6OctNqLs94XqAG
-4kiW5omm6sq27gvH8kzX9o1y+s73/g8MCofEovGITCoxKMbyCR16cNSq9YrNarfcrvdriIH
-5LL5jE6rxc3G+v2cguf0uv2Oz+v38L7/DxgoOKjURnjIIbe3yNjo+AgZWYVIWWl5iZnJY6J.
-
-----FEE3790DC7E35189CA67CE2C--
diff --git a/libical/test-data/incoming.ics b/libical/test-data/incoming.ics
deleted file mode 100644
index c598dfa6bf..0000000000
--- a/libical/test-data/incoming.ics
+++ /dev/null
@@ -1,168 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-X-LIC-NOTE: #I1. Reschedules C1
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19970611T190000Z
-DTSTART:19970701T200000Z
-DTEND:19970701T2000000Z
-SUMMARY:Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:2
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-X-LIC-NOTE: #I2. Updates C1
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTAMP:19970611T193000Z
-DTSTART:19970701T190000Z
-DTEND:19970701T1930000Z
-SUMMARY: Pool party
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:2
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REQUEST
-X-LIC-NOTE: #I2: This is an obsolete request\, otherwise identical to #I1
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE;
- CUTYPE=ROOM:Mailto:Conf@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-DTSTART:19960701T180000Z
-DTEND:19970701T190000Z
-SUMMARY:Phone Conference
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-DTSTAMP:19960613T190000Z
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-X-LIC-NOTE: #I3: User B is accepting A's request\, #C2
-VERSION:2.0
-BEGIN:VEVENT
-ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com
-ORGANIZER:MAILTO:A@example.com
-UID:calsrv.example.com-873970198738785@example.com
-SEQUENCE:1
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970612T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-X-LIC-NOTE: #I4: User C is rejecting A's request\, #C2
-VERSION:2.0
-BEGIN:VEVENT
-ATTENDEE;PARTSTAT=DECLINED:Mailto:C@example.com
-ORGANIZER:MAILTO:A@example.com
-UID:calsrv.example.com-873970198738785@example.com
-SEQUENCE:1
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970612T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-X-LIC-NOTE: #I5: Crasher X is accepting A's request\, #C2
-VERSION:2.0
-BEGIN:VEVENT
-ATTENDEE;PARTSTAT=ACCEPTED:Mailto:X@example.com
-ORGANIZER:MAILTO:A@example.com
-UID:calsrv.example.com-873970198738785@example.com
-SEQUENCE:1
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970612T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-X-LIC-NOTE: #I6: Crasher Y is declining A's request\, #C2
-VERSION:2.0
-BEGIN:VEVENT
-ATTENDEE;PARTSTAT=DECLINED:Mailto:Y@example.com
-ORGANIZER:MAILTO:A@example.com
-UID:calsrv.example.com-873970198738785@example.com
-SEQUENCE:1
-REQUEST-STATUS:2.0;Success
-DTSTAMP:19970612T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:CANCEL
-X-LIC-NOTE: #I7: Cancel #c1
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:A@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:B@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com
-ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com
-COMMENT:Mr. B cannot attend. It's raining. Lets cancel.
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-UID:calsrv.example.com-873970198738777@example.com
-STATUS:CANCELLED
-DTSTAMP:19970613T190000Z
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:COUNTER
-X-LIC-NOTE: #I8. Counter to #C1. Changed DTEND to DURATION.
-VERSION:2.0
-BEGIN:VEVENT
-DTSTAMP:19970611T190000Z
-DTSTART:19970701T190000Z
-DURATION:PT2H
-ORGANIZER:Mailto:B@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com
-SUMMARY:Conference
-COMMENT: I think the conference should be 2 hours long
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:1
-END:VEVENT
-END:VCALENDAR
-
diff --git a/libical/test-data/overlaps.ics b/libical/test-data/overlaps.ics
deleted file mode 100644
index 57a5c57cc3..0000000000
--- a/libical/test-data/overlaps.ics
+++ /dev/null
@@ -1,32 +0,0 @@
-BEGIN:VEVENT
-DTSTART
- :20001104T150000
-DTEND
- :20001104T160000
-END:VEVENT
-
-BEGIN:VEVENT
-DTSTART
- :20001104T153000
-DTEND
- :20001104T163000
-END:VEVENT
-BEGIN:VEVENT
-DTSTART
- :20001104T160000
-DTEND
- :20001104T170000
-END:VEVENT
-BEGIN:VEVENT
-DTSTART
- :20001104T163000
-DTEND
- :20001104T173000
-END:VEVENT
-BEGIN:VEVENT
-DTSTART
- :20001104T170000
-DTEND
- :20001104T180000
-END:VEVENT
-
diff --git a/libical/test-data/process-incoming.ics b/libical/test-data/process-incoming.ics
deleted file mode 100644
index 5f66fb69c7..0000000000
--- a/libical/test-data/process-incoming.ics
+++ /dev/null
@@ -1,107 +0,0 @@
-BEGIN:VCALENDAR
-X-LIC-NOTE: Overlap with Slot 1\, 1200 to 1300\, should be delegated
-METHOD
- :REQUEST
-VERSION
- :2.0
-BEGIN:VEVENT
-ORGANIZER
- :Mailto:bob@cal.softwarestudio.org
-ATTENDEE
- ;ROLE=CHAIR
- ;CUTYPE=INDIVIDUAL
- ;CN=Alice
- :Mailto:alice@cal.softwarestudio.org
-ATTENDEE
- ;RSVP=TRUE
- ;CUTYPE=INDIVIDUAL
- ;CN=B
- :Mailto:B@example.com
-DTSTAMP
- :19970611T030000Z
-DTSTART
- :19970701T120000Z
-DTEND
- :19970701T1300Z
-SUMMARY
- : Overlap 1
-UID
- :calsrv.example.com-873970198738703@example.com
-SEQUENCE
- :0
-STATUS
- :CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-X-LIC-NOTE: Overlap with Slot 2\, 1300 to 1400\, should be counterproposed
-METHOD
- :REQUEST
-VERSION
- :2.0
-BEGIN:VEVENT
-ORGANIZER
- :Mailto:bob@cal.softwarestudio.org
-ATTENDEE
- ;ROLE=CHAIR
- ;CUTYPE=INDIVIDUAL
- ;CN=Alice
- :Mailto:alice@cal.softwarestudio.org
-ATTENDEE
- ;RSVP=TRUE
- ;CUTYPE=INDIVIDUAL
- ;CN=B
- :Mailto:B@example.com
-DTSTAMP
- :19970611T040000Z
-DTSTART
- :19970701T13000Z
-DTEND
- :19970701T140000Z
-SUMMARY
- :Overlap 2
-UID
- :calsrv.example.com-873970198738704@example.com
-SEQUENCE
- :0
-STATUS
- :CONFIRMED
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-X-LIC-NOTE: Overlap with Slot 3\, 1400 to 1500\, should be declined
-METHOD
- :REQUEST
-VERSION
- :2.0
-BEGIN:VEVENT
-ORGANIZER
- :Mailto:bob@cal.softwarestudio.org
-ATTENDEE
- ;ROLE=CHAIR
- ;CUTYPE=INDIVIDUAL
- ;CN=Alice
- :Mailto:alice@cal.softwarestudio.org
-ATTENDEE
- ;RSVP=TRUE
- ;CUTYPE=INDIVIDUAL
- ;CN=B
- :Mailto:B@example.com
-DTSTAMP
- :19970611T050000Z
-DTSTART
- :19970701T140000Z
-DTEND
- :19970701T150000Z
-SUMMARY
- :Overlap 3
-UID
- :calsrv.example.com-873970198738705@example.com
-SEQUENCE
- :0
-STATUS
- :CONFIRMED
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/recur.txt b/libical/test-data/recur.txt
deleted file mode 100644
index f158a2a96b..0000000000
--- a/libical/test-data/recur.txt
+++ /dev/null
@@ -1,404 +0,0 @@
-BEGIN:VEVENT
-DESCRIPTION
- :Daily for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=DAILY;COUNT=10;INTERVAL=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Daily until December 24\, 1997:
-DTSTART
- ;TZID=US-Eastern
- :19971215T090000
-RRULE
- :FREQ=DAILY;UNTIL=19971224T000000Z;INTERVAL=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every other day - forever:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=DAILY;COUNT=10;INTERVAL=2
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every 10 days\, 5 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=DAILY;COUNT=5;INTERVAL=10
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Daily for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=DAILY;COUNT=10;INTERVAL=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every day in January\, for 3 years
-DTSTART
- ;TZID=US-Eastern
- :19980101T090000
-RRULE
- :FREQ=YEARLY;UNTIL=20000131T090000Z;INTERVAL=1;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYMONTH=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Everyday in January\, for 3 years:
-DTSTART
- ;TZID=US-Eastern
- :19980101T090000
-RRULE
- :FREQ=DAILY;UNTIL=20000131T090000Z;INTERVAL=1;BYMONTH=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Weekly for 10 occurrences
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;COUNT=10;INTERVAL=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Weekly until December 24\, 1997
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;UNTIL=19971224T000000Z;INTERVAL=1
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every other week - forever:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;INTERVAL=2;COUNT=10
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Weekly on Tuesday and Thursday for 5 weeks:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;UNTIL=19971007T000000Z;INTERVAL=1;BYDAY=TU,TH
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Weekly on Tuesday and Thursday for 5 weeks:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;COUNT=10;INTERVAL=1;BYDAY=TU,TH
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every other week on Monday\, Wednesday and Friday until December
- 24\,1997\, but starting on Tuesday\, September 2\, 1997:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;BYDAY=MO,WE,FR;WKST=SU
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every other week on Tuesday and Thursday\, for 8 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=WEEKLY;COUNT=8;INTERVAL=2;BYDAY=TU,TH
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monthly on the 1st Friday for ten occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970905T090000
-RRULE
- :FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYDAY=FR
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monthly on the 1st Friday until December 24\, 1997:
-DTSTART
- ;TZID=US-Eastern
- :19970905T090000
-RRULE
- :FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=1FR
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every other month on the 1st and last Sunday of the month for 10 occurrences
- :
-DTSTART
- ;TZID=US-Eastern
- :19970907T090000
-RRULE
- :FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monthly on the second to last Monday of the month for 6 months:
-DTSTART
- ;TZID=US-Eastern
- :19970922T090000
-RRULE
- :FREQ=MONTHLY;COUNT=6;INTERVAL=1;BYDAY=-2MO
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monthly on the third to the last day of the month\, forever:
-DTSTART
- ;TZID=US-Eastern
- :19970928T090000
-RRULE
- :FREQ=MONTHLY;INTERVAL=1;COUNT=10;BYMONTHDAY=-3
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monthly on the 2nd and 15th of the month for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYMONTHDAY=2,15
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monthly on the first and last day of the month for 10 occurrences:\n
-DTSTART
- ;TZID=US-Eastern
- :19970930T090000
-RRULE
- :FREQ=MONTHLY;COUNT=10;INTERVAL=1;BYMONTHDAY=1,-1
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 18 months on the 10th thru 15th of the month for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970910T090000
-RRULE
- :FREQ=MONTHLY;COUNT=10;INTERVAL=18;BYMONTHDAY=10,11,12,13,14,15
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every Tuesday\, every other month:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=TU
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Yearly in June and July for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970610T090000
-RRULE
- :FREQ=YEARLY;COUNT=10;INTERVAL=1;BYMONTH=6,7
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every other year on January\, February\, and March for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970310T090000
-RRULE
- :FREQ=YEARLY;COUNT=10;INTERVAL=2;BYMONTH=1,2,3
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 3rd year on the 1st\, 100th and 200th day for 10 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970101T090000
-RRULE
- :FREQ=YEARLY;COUNT=10;INTERVAL=3;BYYEARDAY=1,100,200
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 20th Monday of the year\, forever:
-DTSTART
- ;TZID=US-Eastern
- :19970519T090000
-RRULE
- :FREQ=YEARLY;INTERVAL=1;COUNT=10;BYDAY=20MO
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Monday of week number 20 (where the default start of the week is Monday)\,
- forever:
-DTSTART
- ;TZID=US-Eastern
- :19970512T090000
-RRULE
- :FREQ=YEARLY;INTERVAL=1;COUNT=10;BYDAY=MO;BYWEEKNO=20
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every Thursday in March\, forever:
-DTSTART
- ;TZID=US-Eastern
- :19970313T090000
-RRULE
- :FREQ=YEARLY;INTERVAL=1;COUNT=10;BYDAY=TH;BYMONTH=3
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every Thursday\, but only during June\, July\, and August\, forever:
-DTSTART
- ;TZID=US-Eastern
- :19970605T090000
-RRULE
- :FREQ=YEARLY;INTERVAL=1;COUNT=10;BYDAY=TH;BYMONTH=6,7,8
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every Friday the 13th\, forever:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=MONTHLY;INTERVAL=1;COUNT=10;BYDAY=FR;BYMONTHDAY=13
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :The first Saturday that follows the first Sunday of the month\,
-DTSTART
- ;TZID=US-Eastern
- :19970913T090000
-RRULE
- :FREQ=MONTHLY;INTERVAL=1;COUNT=10;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :Every four years\, the first Tuesday after a Monday in November\,
- forever (U.S. Presidential Election day):
-DTSTART
- ;TZID=US-Eastern
- :19961105T090000
-RRULE
- :FREQ=YEARLY;INTERVAL=4;COUNT=10;BYDAY=TU;BYMONTHDAY=2,3,4,5,6,7,8;BYMONTH=11
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :The 3rd instance into the month of one of Tuesday\, Wednesday or
- Thursday\, for the next 3 months:
-DTSTART
- ;TZID=US-Eastern
- :19970904T090000
-RRULE
- :FREQ=MONTHLY;COUNT=3;INTERVAL=1;BYDAY=TU,WE,TH;BYSETPOS=3
-END:VEVENT
-
-BEGIN:VEVENT
-DESCRIPTION
- :The 2nd to last weekday of the month:
-DTSTART
- ;TZID=US-Eastern
- :19970929T090000
-RRULE
- :FREQ=MONTHLY;INTERVAL=1;COUNT=10;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 3 hours from 9:00 AM to 5:00 PM on a specific day:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=HOURLY;UNTIL=19970902T170000Z;INTERVAL=3
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 15 minutes for 6 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=MINUTELY;COUNT=6;INTERVAL=15
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every hour and a half for 4 occurrences:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=MINUTELY;COUNT=4;INTERVAL=90
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 20 minutes from 9:00 AM to 4:40 PM every day:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=DAILY;COUNT=20;INTERVAL=1;BYMINUTE=0,20,40;BYHOUR=9,10,11,12,13,14,15,16
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :Every 20 minutes from 9:00 AM to 4:40 PM every day:
-DTSTART
- ;TZID=US-Eastern
- :19970902T090000
-RRULE
- :FREQ=MINUTELY;COUNT=20;INTERVAL=20;BYHOUR=9,10,11,12,13,14,15,16
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :An example where the days generated makes a difference because of
- WKST:
-DTSTART
- ;TZID=US-Eastern
- :19970805T090000
-RRULE
- :FREQ=WEEKLY;COUNT=4;INTERVAL=2;BYDAY=TU,SU
-END:VEVENT
-BEGIN:VEVENT
-DESCRIPTION
- :An example where the days generated makes a difference because of
- WKST. Changing only WKST from MO to SU yields different results...
-DTSTART
- ;TZID=US-Eastern
- :19970805T090000
-RRULE
- :FREQ=WEEKLY;COUNT=4;INTERVAL=2;BYDAY=TU,SU
-END:VEVENT
-
diff --git a/libical/test-data/restriction.ics b/libical/test-data/restriction.ics
deleted file mode 100644
index b06493bbb3..0000000000
--- a/libical/test-data/restriction.ics
+++ /dev/null
@@ -1,49 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//hacksw/handcal//NONSGML v1.0//EN
-METHOD: REQUEST
-BEGIN:VEVENT
-UID:19970901T130000Z-123401@host.com
-DTSTAMP:19970901T1300Z
-DTSTART:19970903T163000Z
-DTEND:19970903T190000Z
-DURATION:PT15M
-SUMMARY:Annual Employee Review
-CLASS:PRIVATE
-CATEGORIES:BUSINESS,HUMAN RESOURCES
-STATUS:TENTATIVE
-END:VEVENT
-END:VCALENDAR
-
-
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//hacksw/handcal//NONSGML v1.0//EN
-METHOD: PUBLISHca
-BEGIN:VEVENT
-RECURRENCE-ID:19970701T210000Z
-RECURRENCE-ID:19970701T210000Z
-SEQUENCE:0
-SEQUENCE:1
-CATEGORIES: A
-CATEGORIES: B
-CLASS: A
-CLASS: B
-ATTENDEE: BOB
-REQUEST-STATUS: 3.0
-END:VEVENT
-END:VCALENDAR
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-METHOD:REPLY
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:MAILTO:A@Example.com
-ATTENDEE;PARTSTAT=DELEGATED;DELEGATED-
- TO="Mailto:E@example.com":Mailto:C@example.com
-UID:calsrv.example.com-873970198738777@example.com
-SEQUENCE:0
-DTSTAMP:19970611T190000Z
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/simple-mime.txt b/libical/test-data/simple-mime.txt
deleted file mode 100644
index aa7113a82f..0000000000
--- a/libical/test-data/simple-mime.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-From: foo1@example.com
-MIME-Version: 1.0
-To: foo2@example.com,foo3@example.com
-Subject: REQUEST - Phone Conference
-Content-Type:text/calendar; method=REQUEST; charset=US-ASCII;
- Component=vevent
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="event.vcs"
-
-BEGIN:VCALENDAR
-PRODID:-//ACME/DesktopCalendar//EN
-VERSION:2.0
-BEGIN:VEVENT
-ORGANIZER:foo1@example.com
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:mailto:Employee-B@HOST.com
-ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MailTo:Eric@Agony.Qualcomm.com
-DTSTAMP:19970611T190000Z
-DTSTART:19970621T170000Z
-DTEND:199706211T173000Z
-SUMMARY:Let's discuss the attached document
-UID:calsvr.example.com-873970198738777-8aa
-SEQUENCE:0
-STATUS:CONFIRMED
-END:VEVENT
-END:VCALENDAR
diff --git a/libical/test-data/smallcluster.ics b/libical/test-data/smallcluster.ics
deleted file mode 100644
index 2902136bab..0000000000
--- a/libical/test-data/smallcluster.ics
+++ /dev/null
@@ -1,13 +0,0 @@
-BEGIN:VCALENDAR
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//hacksw/handcal//NONSGML v1.0//EN
-BEGIN:VEVENT
-DTSTART
- :19970714T170000Z
-DTEND:19970715T035959Z
-SUMMARY:Bastille Day Party
-RRULE:FREQ=YEARLY;UNTIL=123456T123456;BYSETPOS=-1,2,-3,4,-5,6,-7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,4,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54;BYSECOND=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,4,25,26
-END:VEVENT
-END:VCALENDAR
-END:VCALENDAR
diff --git a/libical/test-data/stresstest.ics b/libical/test-data/stresstest.ics
deleted file mode 100644
index f64cf6bbc9..0000000000
--- a/libical/test-data/stresstest.ics
+++ /dev/null
@@ -1,178 +0,0 @@
-BEGIN:VCALENDAR
-ACTION:AUDIO
-ACTION:
-ACTION:~!@#$%^&*()_+}{:"<>?/.,
-ATTACH:ftp://ftp.example.com/~pub%eof/ed/minutes100197.txt
-ATTACH:http://www.dukes.com/
-ATTENDEE:MAILTO:john_doe@host.com
-ATTENDEE:;john_public@host2.com
-ATTENDEE:MAILTO:john_public@host2.com
-ATTENDEE:Mailto:B@example.com
-ATTENDEE;PARTSTAT=ACCEPTED;PARTSTAT=DECLINED:Mailto:B@example.com
-ATTENDEE;PARTSTAT=*&^*&:Mailto:B@example.com
-ATTENDEE;ROLE=CHAIR:Mailto:A@example.com
-ATTENDEE;ROLE=ATTENDEE:Mailto:A@example.com
-ATTENDEE;ROLE=CHAIR;RSVP=TRUE:Mailto:A@example.com
-ATTENDEE;ROLE=NONPARTICIPANT;RSVP=NO:Mailto:E@example.com
-ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com
-ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com
-ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:Bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@example.com
-CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION;ANNIVERSARY,PERSONAL,SPECIAL OCCASION;ANNIVERSARY,PERSONAL,SPECIAL OCCASION;
-CATEGORIES;RSVP=TRUE;RSVP=FALSE:one,two
-CLASS:PUBLIC
-COMMENT:DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOUR
- DUKES forfeit the game
- I'll send you my input by e-mail
- May we bump this by an hour? I have a conflict
- Mr. B cannot attend. It's raining. Lets cancel.
-Sorry, I cannot change this meeting time
-Sorry, I will be out of town at that time.
-This iCalendar file contains busy time information for
-COMMENT:This time works much better and I think the big conference
-COMMENT:You're off the hook for this meeting
-CREATED:19980309T130000Z
-CREATED:19980309T130000
-CREATED:19980309T13000
-CREATED:19980309T1300
-CREATED:19980309T130
-CREATED:19980309T13
-CREATED:19980309T1
-CREATED:19980309T
-CREATED:19980309
-CREATED:1998030
-CREATED:199803
-CREATED:19980
-CREATED:1998
-CREATED:199
-CREATED:19
-CREATED:1
-CREATED:
-DTSTAMP:9999999T9999999X
-DTSTART:T103012
-DTSTART;VALUE=DATE:19970317
-DTSTART;VALUE=TIME:19970714
-DUE:19980415T235959
-DUE:19980415T235959
-DURATION:P15DT5H0M20S
-DURATION:P7W7W8w
-DURATION:PT15M
-DURATION:PT1H
-FREEBUSY:19970701T090000Z/PT1H,19970701T140000Z/PT30M,19980101T180000Z/19980101T190000Z,19980103T020000Z/19980103T050000Z,19980107T020000Z/19980107T050000Z
-FREEBUSY:19980318T030000Z/19980318T040000Z
-FREEBUSY:19980318T030000Z/19980318T040000
-FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M,
-LOCATION;VALUE=URI:http://www.midwaystadium.com/
-METHOD:ADD
-METHOD:DESTROY
-METHOD:xyz
-METHOD:X-LIC-METHOD
-PERCENT-COMPLETE:40
-PERCENT-COMPLETE:.75
-PERCENT-COMPLETE:0
-PRIORITY:1
-PRIORITY:2
-PRIORITY:134645983456666098345624598726459872445897345987
-PRODID:"-//RDU Software//NONSGML HandCal//EN"
-PRODID:'-//ABC Corporation//NONSGML '
-PRODID:-//ABC Corporation;foo//NONSGML My Product//EN
-RDATE:19970406T020000
-RDATE:19971026T020000
-RDATE:19980304T180000Z
-RDATE:19980304T180000Z
-RDATE:19980311T160000Z
-RDATE:19980311T180000Z
-RDATE:19980315T180000Z
-RDATE:19980318T180000Z
-RDATE:19981025T020000
-RDATE:19981025T020000
-RDATE:19990404T020000
-RDATE:19990404T020000
-RDATE;VALUE=PERIOD:19970819T210000Z/199700819T220000Z
-RECURRENCE-ID:19970701T210000Z
-RECURRENCE-ID:19970715T210000Z
-RECURRENCE-ID:19970801T210000Z
-RECURRENCE-ID:19970809T210000Z
-RECURRENCE-ID:19980101T170000Z
-RECURRENCE-ID:19980311T160000Z
-RECURRENCE-ID:19980311T180000Z
-RECURRENCE-ID;RANGE=THISANDFUTURE:19970901T210000Z
-RELATED-TO:0981234-1234234-14@example.com
-RELATED-TO:0981234-1234234-2402-35@example.com
-REPEAT:2
-REPEAT:23
-REPEAT:4
-REPEAT:4
-REPEAT:4
-REQUEST-STATUS:2.0;Success
-REQUEST-STATUS:2.0;Success
-REQUEST-STATUS:2.0;Success
-REQUEST-STATUS:2.0;Success
-REQUEST-STATUS:2.0;Success
-REQUEST-STATUS:2.8;Repeating event ignored. Scheduled as a single
-REQUEST-STATUS:3.0;Invalid Property Name;FOO
-RESOURCES:SCOREBOARD
-RRULE:FREQ=MONTHLY;BYMONTHDAY=1
-RRULE:FREQ=MONTHLY;BYMONTHDAY=1;UNTIL=19980901T210000Z
-RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR
-RRULE:FREQ=WEEKLY
-RRULE:FREQ=WEEKLY
-RRULE:FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU
-RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=TU
-RRULE:FREQ=YEARLY
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
-RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
-RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
-RRULE:FREQ=YEARLY;INTERVAL=1
-RRULE:WKST=SU;BYDAY=TH;FREQ=WEEKLY
-RRULE:WKST=SU;BYDAY=TU,TH;FREQ=WEEKLY
-SCALE:GREGORIAN
-SEQUENCE:0
-SEQUENCE:.03486
-SEQUENCE:dflkjhfg
-SEQUENCE:
-SEQUENCE:7
-STATUS:CANCELLED
-STATUS:NEEDS-ACTION
-STATUS:Needs Action
-SUMMARY: Bastille Day
-SUMMARY:"No Property"
-SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING ***
-SUMMARY:1996 Income Tax Preparation
-SUMMARY:Annual Employee Review
-SUMMARY:Bastille Day Party
-SUMMARY:Calendaring Interoperability Planning Meeting
-SUMMARY:Calendaring Interoperability Planning Meeting
-SUMMARY;RSVP=TRUE;RSVP=FALSE:Calendaring Interoperability Planning Meeting
-TRANSP:TRANSPARENT
-TRIGGER:-P2D
-TRIGGER:-PT2H
-TRIGGER:-PT30M
-TRIGGER:-PT30M
-TRIGGER;VALUE=DATE-TIME:19970317T133000Z
-TRIGGER;VALUE=DATE-TIME:19980101T050000Z
-TRIGGER;VALUE=DATE-TIME:19980403T120000
-TRIGGER;VALUE=DATE-TIME:19980403T120000Z
-TZID:America-Chicago
-TZID:America-SanJose
-TZNAME:PST
-TZOFFSETFROM:-0600
-TZOFFSETFROM:0700
-TZOFFSETFROM:4.56
-TZURL:http://zones.stds_r_us.net/tz/America-Chicago
-TZURL:http://zones.stds_r_us.net/tz/America-SanJose
-TZURL:http://zones.stds_r_us.net/tz/US-Eastern
-UID:uid5@host1.com
-URL:http://www.host.com/calendar/busytime/jsmith.ifb
-VERSION:2.0
-VERSION:.0
-VERSION:2.0.0.0
-X-SKI-TITLE;RSVP=TRUE: This is an extension property
-END:VCALENDAR \ No newline at end of file
diff --git a/libical/test-data/user-cal.vcf b/libical/test-data/user-cal.vcf
deleted file mode 100644
index 3cf005fa21..0000000000
--- a/libical/test-data/user-cal.vcf
+++ /dev/null
@@ -1,76 +0,0 @@
-BEGIN:VCALENDAR
-X-COMMENT: This file was contributed by Ola Lundqvist <olalu526@student.liu.se>
-PRODID:-//GNOME//NONSGML GnomeCalendar//EN
-TZ:CEST
-VERSION:1.1.4
-BEGIN:VEVENT
-UID:20000511T125528-23888-500-1-494
-SEQUENCE:-1
-DTSTART:20000530T150000
-DTEND:20000530T170000
-DCREATED:20000524T125250
-LAST-MODIFIED:20000524T125250
-SUMMARY:Omphalic for ataraxia
-STATUS:NEEDS ACTION
-CLASS:PUBLIC
-PRIORITY:0
-TRANSP:0
-ORGNAME:ola
-X-PILOTID:4441126
-X-PILOTSTAT:0
-END:VEVENT
-
-BEGIN:VEVENT
-UID:20000511T125528-23888-500-1-492
-SEQUENCE:-1
-DTSTART:20000529T130000
-DTEND:20000529T130000
-DCREATED:20000524T125250
-LAST-MODIFIED:20000524T125250
-SUMMARY:Eurphrates et filistu
-STATUS:NEEDS ACTION
-CLASS:PUBLIC
-PRIORITY:0
-TRANSP:0
-ORGNAME:ola
-X-PILOTID:4441124
-X-PILOTSTAT:0
-END:VEVENT
-
-BEGIN:VEVENT
-UID:20000524T125250-1004-500-1-13
-SEQUENCE:-1
-DTSTART:20000528T000000
-DTEND:20000528T235900
-DCREATED:20000524T125250
-LAST-MODIFIED:20000524T125250
-SUMMARY:Calaphgyian, napiform malefactors
-STATUS:NEEDS ACTION
-CLASS:PUBLIC
-PRIORITY:0
-TRANSP:0
-ORGNAME:ola
-X-PILOTID:4441156
-X-PILOTSTAT:0
-END:VEVENT
-
-BEGIN:VEVENT
-UID:20000524T125250-1004-500-1-12
-SEQUENCE:-1
-DTSTART:20000527T150000
-DTEND:20000527T160000
-DCREATED:20000524T125250
-LAST-MODIFIED:20000524T125250
-SUMMARY: aphasiac puntildictus
-STATUS:NEEDS ACTION
-CLASS:PUBLIC
-PRIORITY:0
-TRANSP:0
-ORGNAME:ola
-X-PILOTID:4441155
-X-PILOTSTAT:0
-END:VEVENT
-
-
-END:VCALENDAR
-
diff --git a/libical/zoneinfo/.cvsignore b/libical/zoneinfo/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/libical/zoneinfo/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/libical/zoneinfo/Africa/Abidjan.ics b/libical/zoneinfo/Africa/Abidjan.ics
deleted file mode 100644
index a98c9d082c..0000000000
--- a/libical/zoneinfo/Africa/Abidjan.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Abidjan
-X-LIC-LOCATION:Africa/Abidjan
-BEGIN:STANDARD
-TZOFFSETFROM:-0016
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Accra.ics b/libical/zoneinfo/Africa/Accra.ics
deleted file mode 100644
index c6dd66fbb3..0000000000
--- a/libical/zoneinfo/Africa/Accra.ics
+++ /dev/null
@@ -1,41 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Accra
-X-LIC-LOCATION:Africa/Accra
-BEGIN:STANDARD
-TZOFFSETFROM:-0001
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19180101T000000
-RDATE:19180101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0020
-TZNAME:GHST
-DTSTART:19360901T000000
-RDATE:19360901T000000
-RDATE:19370901T000000
-RDATE:19380901T000000
-RDATE:19390901T000000
-RDATE:19400901T000000
-RDATE:19410901T000000
-RDATE:19420901T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0020
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19361231T000000
-RDATE:19361231T000000
-RDATE:19371231T000000
-RDATE:19381231T000000
-RDATE:19391231T000000
-RDATE:19401231T000000
-RDATE:19411231T000000
-RDATE:19421231T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Addis_Ababa.ics b/libical/zoneinfo/Africa/Addis_Ababa.ics
deleted file mode 100644
index 4e30d5939e..0000000000
--- a/libical/zoneinfo/Africa/Addis_Ababa.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Addis_Ababa
-X-LIC-LOCATION:Africa/Addis_Ababa
-BEGIN:STANDARD
-TZOFFSETFROM:+0235
-TZOFFSETTO:+0235
-TZNAME:ADMT
-DTSTART:18700101T000000
-RDATE:18700101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0235
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19360505T000000
-RDATE:19360505T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Algiers.ics b/libical/zoneinfo/Africa/Algiers.ics
deleted file mode 100644
index ff24bcc63c..0000000000
--- a/libical/zoneinfo/Africa/Algiers.ics
+++ /dev/null
@@ -1,90 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Algiers
-X-LIC-LOCATION:Africa/Algiers
-BEGIN:STANDARD
-TZOFFSETFROM:+0012
-TZOFFSETTO:+0009
-TZNAME:PMT
-DTSTART:18910315T000100
-RDATE:18910315T000100
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0009
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19110311T000000
-RDATE:19110311T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19160614T230000
-RDATE:19160614T230000
-RDATE:19170324T230000
-RDATE:19180309T230000
-RDATE:19190301T230000
-RDATE:19200214T230000
-RDATE:19210314T230000
-RDATE:19390911T230000
-RDATE:19710425T230000
-RDATE:19770506T000000
-RDATE:19800425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19161002T000000
-RDATE:19161002T000000
-RDATE:19171008T000000
-RDATE:19181007T000000
-RDATE:19191006T000000
-RDATE:19201024T000000
-RDATE:19210622T000000
-RDATE:19391119T010000
-RDATE:19461007T000000
-RDATE:19630414T000000
-RDATE:19710927T000000
-RDATE:19791026T000000
-RDATE:19801031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400225T020000
-RDATE:19400225T020000
-RDATE:19560129T000000
-RDATE:19810501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19440403T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19780324T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19441008T020000
-RDATE:19441008T020000
-RDATE:19450916T010000
-RDATE:19780922T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19771021T000000
-RDATE:19771021T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Asmera.ics b/libical/zoneinfo/Africa/Asmera.ics
deleted file mode 100644
index 1523be5eb8..0000000000
--- a/libical/zoneinfo/Africa/Asmera.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Asmera
-X-LIC-LOCATION:Africa/Asmera
-BEGIN:STANDARD
-TZOFFSETFROM:+0236
-TZOFFSETTO:+0236
-TZNAME:AMT
-DTSTART:18700101T000000
-RDATE:18700101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0236
-TZOFFSETTO:+0235
-TZNAME:ADMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0235
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19360505T000000
-RDATE:19360505T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Bamako.ics b/libical/zoneinfo/Africa/Bamako.ics
deleted file mode 100644
index 6b59d87644..0000000000
--- a/libical/zoneinfo/Africa/Bamako.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Bamako
-X-LIC-LOCATION:Africa/Bamako
-BEGIN:STANDARD
-TZOFFSETFROM:-0032
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19340226T000000
-RDATE:19340226T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19600620T000000
-RDATE:19600620T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Bangui.ics b/libical/zoneinfo/Africa/Bangui.ics
deleted file mode 100644
index b92b1509e1..0000000000
--- a/libical/zoneinfo/Africa/Bangui.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Bangui
-X-LIC-LOCATION:Africa/Bangui
-BEGIN:STANDARD
-TZOFFSETFROM:+0114
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Banjul.ics b/libical/zoneinfo/Africa/Banjul.ics
deleted file mode 100644
index 28cce135bd..0000000000
--- a/libical/zoneinfo/Africa/Banjul.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Banjul
-X-LIC-LOCATION:Africa/Banjul
-BEGIN:STANDARD
-TZOFFSETFROM:-0107
-TZOFFSETTO:-0107
-TZNAME:BMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0107
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19350101T000000
-RDATE:19350101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19640101T000000
-RDATE:19640101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Bissau.ics b/libical/zoneinfo/Africa/Bissau.ics
deleted file mode 100644
index 84c52dfd33..0000000000
--- a/libical/zoneinfo/Africa/Bissau.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Bissau
-X-LIC-LOCATION:Africa/Bissau
-BEGIN:STANDARD
-TZOFFSETFROM:-0102
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19110526T000000
-RDATE:19110526T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19750101T000000
-RDATE:19750101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Blantyre.ics b/libical/zoneinfo/Africa/Blantyre.ics
deleted file mode 100644
index cc7cd4d5fb..0000000000
--- a/libical/zoneinfo/Africa/Blantyre.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Blantyre
-X-LIC-LOCATION:Africa/Blantyre
-BEGIN:STANDARD
-TZOFFSETFROM:+0220
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Brazzaville.ics b/libical/zoneinfo/Africa/Brazzaville.ics
deleted file mode 100644
index 1f548000ae..0000000000
--- a/libical/zoneinfo/Africa/Brazzaville.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Brazzaville
-X-LIC-LOCATION:Africa/Brazzaville
-BEGIN:STANDARD
-TZOFFSETFROM:+0101
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Bujumbura.ics b/libical/zoneinfo/Africa/Bujumbura.ics
deleted file mode 100644
index 50689ba5bf..0000000000
--- a/libical/zoneinfo/Africa/Bujumbura.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Bujumbura
-X-LIC-LOCATION:Africa/Bujumbura
-BEGIN:STANDARD
-TZOFFSETFROM:+0157
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Cairo.ics b/libical/zoneinfo/Africa/Cairo.ics
deleted file mode 100644
index 790c62d659..0000000000
--- a/libical/zoneinfo/Africa/Cairo.ics
+++ /dev/null
@@ -1,130 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Cairo
-X-LIC-LOCATION:Africa/Cairo
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19950428T000000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1FR
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19950929T000000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYMONTHDAY=25,26,27,28,29,30;BYDAY=FR
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=1;BYDAY=FR
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0205
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19001001T000000
-RDATE:19001001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19400715T000000
-RDATE:19400715T000000
-RDATE:19410415T000000
-RDATE:19420401T000000
-RDATE:19430401T000000
-RDATE:19440401T000000
-RDATE:19450416T000000
-RDATE:19570510T000000
-RDATE:19580501T000000
-RDATE:19590501T010000
-RDATE:19600501T010000
-RDATE:19610501T010000
-RDATE:19620501T010000
-RDATE:19630501T010000
-RDATE:19640501T010000
-RDATE:19650501T010000
-RDATE:19660501T010000
-RDATE:19670501T010000
-RDATE:19680501T010000
-RDATE:19690501T010000
-RDATE:19700501T010000
-RDATE:19710501T010000
-RDATE:19720501T010000
-RDATE:19730501T010000
-RDATE:19740501T010000
-RDATE:19750501T010000
-RDATE:19760501T010000
-RDATE:19770501T010000
-RDATE:19780501T010000
-RDATE:19790501T010000
-RDATE:19800501T010000
-RDATE:19810501T010000
-RDATE:19820725T010000
-RDATE:19830712T010000
-RDATE:19840501T010000
-RDATE:19850501T010000
-RDATE:19860501T010000
-RDATE:19870501T010000
-RDATE:19880501T010000
-RDATE:19890506T010000
-RDATE:19900501T010000
-RDATE:19910501T010000
-RDATE:19920501T010000
-RDATE:19930501T010000
-RDATE:19940501T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19401001T000000
-RDATE:19401001T000000
-RDATE:19410916T000000
-RDATE:19421027T000000
-RDATE:19431101T000000
-RDATE:19441101T000000
-RDATE:19451101T000000
-RDATE:19571001T000000
-RDATE:19581001T000000
-RDATE:19590930T030000
-RDATE:19600930T030000
-RDATE:19610930T030000
-RDATE:19620930T030000
-RDATE:19630930T030000
-RDATE:19640930T030000
-RDATE:19650930T030000
-RDATE:19661001T030000
-RDATE:19671001T030000
-RDATE:19681001T030000
-RDATE:19691001T030000
-RDATE:19701001T030000
-RDATE:19711001T030000
-RDATE:19721001T030000
-RDATE:19731001T030000
-RDATE:19741001T030000
-RDATE:19751001T030000
-RDATE:19761001T030000
-RDATE:19771001T030000
-RDATE:19781001T030000
-RDATE:19791001T030000
-RDATE:19801001T030000
-RDATE:19811001T030000
-RDATE:19821001T030000
-RDATE:19831001T030000
-RDATE:19841001T030000
-RDATE:19851001T030000
-RDATE:19861001T030000
-RDATE:19871001T030000
-RDATE:19881001T030000
-RDATE:19891001T030000
-RDATE:19901001T030000
-RDATE:19911001T030000
-RDATE:19921001T030000
-RDATE:19931001T030000
-RDATE:19941001T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Casablanca.ics b/libical/zoneinfo/Africa/Casablanca.ics
deleted file mode 100644
index cac828054c..0000000000
--- a/libical/zoneinfo/Africa/Casablanca.ics
+++ /dev/null
@@ -1,51 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Casablanca
-X-LIC-LOCATION:Africa/Casablanca
-BEGIN:STANDARD
-TZOFFSETFROM:-0030
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19131026T000000
-RDATE:19131026T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19390912T000000
-RDATE:19390912T000000
-RDATE:19400225T000000
-RDATE:19500611T000000
-RDATE:19670603T120000
-RDATE:19740624T000000
-RDATE:19760501T000000
-RDATE:19770501T000000
-RDATE:19780601T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19391119T000000
-RDATE:19391119T000000
-RDATE:19451118T000000
-RDATE:19501029T000000
-RDATE:19671001T000000
-RDATE:19740901T000000
-RDATE:19760801T000000
-RDATE:19770928T000000
-RDATE:19780804T000000
-RDATE:19860101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19840316T000000
-RDATE:19840316T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Ceuta.ics b/libical/zoneinfo/Africa/Ceuta.ics
deleted file mode 100644
index a4174c24ae..0000000000
--- a/libical/zoneinfo/Africa/Ceuta.ics
+++ /dev/null
@@ -1,99 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Ceuta
-X-LIC-LOCATION:Africa/Ceuta
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19860330T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0021
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19180506T230000
-RDATE:19180506T230000
-RDATE:19240416T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19670603T120000
-RDATE:19740624T000000
-RDATE:19760501T000000
-RDATE:19770501T000000
-RDATE:19780601T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19181007T230000
-RDATE:19181007T230000
-RDATE:19241005T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19671001T000000
-RDATE:19740901T000000
-RDATE:19760801T000000
-RDATE:19770928T000000
-RDATE:19780804T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19240101T000000
-RDATE:19240101T000000
-RDATE:19290101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19840316T000000
-RDATE:19840316T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19860101T000000
-RDATE:19860101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19860928T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Conakry.ics b/libical/zoneinfo/Africa/Conakry.ics
deleted file mode 100644
index 9c8e5473fd..0000000000
--- a/libical/zoneinfo/Africa/Conakry.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Conakry
-X-LIC-LOCATION:Africa/Conakry
-BEGIN:STANDARD
-TZOFFSETFROM:-0055
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19340226T000000
-RDATE:19340226T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19600101T000000
-RDATE:19600101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Dakar.ics b/libical/zoneinfo/Africa/Dakar.ics
deleted file mode 100644
index 364c064fcf..0000000000
--- a/libical/zoneinfo/Africa/Dakar.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Dakar
-X-LIC-LOCATION:Africa/Dakar
-BEGIN:STANDARD
-TZOFFSETFROM:-0110
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19410601T000000
-RDATE:19410601T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Dar_es_Salaam.ics b/libical/zoneinfo/Africa/Dar_es_Salaam.ics
deleted file mode 100644
index 276b6830ac..0000000000
--- a/libical/zoneinfo/Africa/Dar_es_Salaam.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Dar_es_Salaam
-X-LIC-LOCATION:Africa/Dar_es_Salaam
-BEGIN:STANDARD
-TZOFFSETFROM:+0237
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19310101T000000
-RDATE:19310101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0245
-TZNAME:BEAUT
-DTSTART:19480101T000000
-RDATE:19480101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0245
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19610101T000000
-RDATE:19610101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Djibouti.ics b/libical/zoneinfo/Africa/Djibouti.ics
deleted file mode 100644
index 4796d31195..0000000000
--- a/libical/zoneinfo/Africa/Djibouti.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Djibouti
-X-LIC-LOCATION:Africa/Djibouti
-BEGIN:STANDARD
-TZOFFSETFROM:+0253
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Douala.ics b/libical/zoneinfo/Africa/Douala.ics
deleted file mode 100644
index fd791a6b8d..0000000000
--- a/libical/zoneinfo/Africa/Douala.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Douala
-X-LIC-LOCATION:Africa/Douala
-BEGIN:STANDARD
-TZOFFSETFROM:+0039
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/El_Aaiun.ics b/libical/zoneinfo/Africa/El_Aaiun.ics
deleted file mode 100644
index a84f2d9ce2..0000000000
--- a/libical/zoneinfo/Africa/El_Aaiun.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/El_Aaiun
-X-LIC-LOCATION:Africa/El_Aaiun
-BEGIN:STANDARD
-TZOFFSETFROM:-0053
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19340101T000000
-RDATE:19340101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19760414T000000
-RDATE:19760414T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Freetown.ics b/libical/zoneinfo/Africa/Freetown.ics
deleted file mode 100644
index 304453c10a..0000000000
--- a/libical/zoneinfo/Africa/Freetown.ics
+++ /dev/null
@@ -1,81 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Freetown
-X-LIC-LOCATION:Africa/Freetown
-BEGIN:STANDARD
-TZOFFSETFROM:-0053
-TZOFFSETTO:-0053
-TZNAME:FMT
-DTSTART:18820101T000000
-RDATE:18820101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0053
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19130601T000000
-RDATE:19130601T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:-0020
-TZNAME:SLST
-DTSTART:19350601T000000
-RDATE:19350601T000000
-RDATE:19360601T000000
-RDATE:19370601T000000
-RDATE:19380601T000000
-RDATE:19390601T000000
-RDATE:19400601T000000
-RDATE:19410601T000000
-RDATE:19420601T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0020
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19351001T000000
-RDATE:19351001T000000
-RDATE:19361001T000000
-RDATE:19371001T000000
-RDATE:19381001T000000
-RDATE:19391001T000000
-RDATE:19401001T000000
-RDATE:19411001T000000
-RDATE:19421001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19570101T000000
-RDATE:19570101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:SLST
-DTSTART:19570601T000000
-RDATE:19570601T000000
-RDATE:19580601T000000
-RDATE:19590601T000000
-RDATE:19600601T000000
-RDATE:19610601T000000
-RDATE:19620601T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19570901T000000
-RDATE:19570901T000000
-RDATE:19580901T000000
-RDATE:19590901T000000
-RDATE:19600901T000000
-RDATE:19610901T000000
-RDATE:19620901T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Gaborone.ics b/libical/zoneinfo/Africa/Gaborone.ics
deleted file mode 100644
index bb819a4152..0000000000
--- a/libical/zoneinfo/Africa/Gaborone.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Gaborone
-X-LIC-LOCATION:Africa/Gaborone
-BEGIN:STANDARD
-TZOFFSETFROM:+0144
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:18850101T000000
-RDATE:18850101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:CAST
-DTSTART:19430919T020000
-RDATE:19430919T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19440319T020000
-RDATE:19440319T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Harare.ics b/libical/zoneinfo/Africa/Harare.ics
deleted file mode 100644
index 708c502a1f..0000000000
--- a/libical/zoneinfo/Africa/Harare.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Harare
-X-LIC-LOCATION:Africa/Harare
-BEGIN:STANDARD
-TZOFFSETFROM:+0204
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Johannesburg.ics b/libical/zoneinfo/Africa/Johannesburg.ics
deleted file mode 100644
index a6e3a048cd..0000000000
--- a/libical/zoneinfo/Africa/Johannesburg.ics
+++ /dev/null
@@ -1,38 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Johannesburg
-X-LIC-LOCATION:Africa/Johannesburg
-BEGIN:STANDARD
-TZOFFSETFROM:+0152
-TZOFFSETTO:+0130
-TZNAME:SAST
-DTSTART:18920208T000000
-RDATE:18920208T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0130
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:SAST
-DTSTART:19420920T020000
-RDATE:19420920T020000
-RDATE:19430919T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19430321T020000
-RDATE:19430321T020000
-RDATE:19440319T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Kampala.ics b/libical/zoneinfo/Africa/Kampala.ics
deleted file mode 100644
index 045780b227..0000000000
--- a/libical/zoneinfo/Africa/Kampala.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Kampala
-X-LIC-LOCATION:Africa/Kampala
-BEGIN:STANDARD
-TZOFFSETFROM:+0210
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19280701T000000
-RDATE:19280701T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0230
-TZNAME:BEAT
-DTSTART:19300101T000000
-RDATE:19300101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0230
-TZOFFSETTO:+0245
-TZNAME:BEAUT
-DTSTART:19480101T000000
-RDATE:19480101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0245
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19570101T000000
-RDATE:19570101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Khartoum.ics b/libical/zoneinfo/Africa/Khartoum.ics
deleted file mode 100644
index 864d19f624..0000000000
--- a/libical/zoneinfo/Africa/Khartoum.ics
+++ /dev/null
@@ -1,66 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Khartoum
-X-LIC-LOCATION:Africa/Khartoum
-BEGIN:STANDARD
-TZOFFSETFROM:+0210
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19310101T000000
-RDATE:19310101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:CAST
-DTSTART:19700501T000000
-RDATE:19700501T000000
-RDATE:19710430T000000
-RDATE:19720430T000000
-RDATE:19730429T000000
-RDATE:19740428T000000
-RDATE:19750427T000000
-RDATE:19760425T000000
-RDATE:19770424T000000
-RDATE:19780430T000000
-RDATE:19790429T000000
-RDATE:19800427T000000
-RDATE:19810426T000000
-RDATE:19820425T000000
-RDATE:19830424T000000
-RDATE:19840429T000000
-RDATE:19850428T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19701015T000000
-RDATE:19701015T000000
-RDATE:19711015T000000
-RDATE:19721015T000000
-RDATE:19731015T000000
-RDATE:19741015T000000
-RDATE:19751015T000000
-RDATE:19761015T000000
-RDATE:19771015T000000
-RDATE:19781015T000000
-RDATE:19791015T000000
-RDATE:19801015T000000
-RDATE:19811015T000000
-RDATE:19821015T000000
-RDATE:19831015T000000
-RDATE:19841015T000000
-RDATE:19851015T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:20000115T120000
-RDATE:20000115T120000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Kigali.ics b/libical/zoneinfo/Africa/Kigali.ics
deleted file mode 100644
index 7aa05885e3..0000000000
--- a/libical/zoneinfo/Africa/Kigali.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Kigali
-X-LIC-LOCATION:Africa/Kigali
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19350601T000000
-RDATE:19350601T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Kinshasa.ics b/libical/zoneinfo/Africa/Kinshasa.ics
deleted file mode 100644
index 917878501a..0000000000
--- a/libical/zoneinfo/Africa/Kinshasa.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Kinshasa
-X-LIC-LOCATION:Africa/Kinshasa
-BEGIN:STANDARD
-TZOFFSETFROM:+0101
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:18971109T000000
-RDATE:18971109T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Lagos.ics b/libical/zoneinfo/Africa/Lagos.ics
deleted file mode 100644
index 656e00263a..0000000000
--- a/libical/zoneinfo/Africa/Lagos.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Lagos
-X-LIC-LOCATION:Africa/Lagos
-BEGIN:STANDARD
-TZOFFSETFROM:+0014
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19190901T000000
-RDATE:19190901T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Libreville.ics b/libical/zoneinfo/Africa/Libreville.ics
deleted file mode 100644
index 1b7f78c182..0000000000
--- a/libical/zoneinfo/Africa/Libreville.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Libreville
-X-LIC-LOCATION:Africa/Libreville
-BEGIN:STANDARD
-TZOFFSETFROM:+0038
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Lome.ics b/libical/zoneinfo/Africa/Lome.ics
deleted file mode 100644
index be516248ce..0000000000
--- a/libical/zoneinfo/Africa/Lome.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Lome
-X-LIC-LOCATION:Africa/Lome
-BEGIN:STANDARD
-TZOFFSETFROM:+0005
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:18930101T000000
-RDATE:18930101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Luanda.ics b/libical/zoneinfo/Africa/Luanda.ics
deleted file mode 100644
index 65476c4a66..0000000000
--- a/libical/zoneinfo/Africa/Luanda.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Luanda
-X-LIC-LOCATION:Africa/Luanda
-BEGIN:STANDARD
-TZOFFSETFROM:+0053
-TZOFFSETTO:+0052
-TZNAME:LMT
-DTSTART:18920101T000000
-RDATE:18920101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0052
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19110526T000000
-RDATE:19110526T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Lubumbashi.ics b/libical/zoneinfo/Africa/Lubumbashi.ics
deleted file mode 100644
index b96b311c22..0000000000
--- a/libical/zoneinfo/Africa/Lubumbashi.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Lubumbashi
-X-LIC-LOCATION:Africa/Lubumbashi
-BEGIN:STANDARD
-TZOFFSETFROM:+0150
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:18971109T000000
-RDATE:18971109T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Lusaka.ics b/libical/zoneinfo/Africa/Lusaka.ics
deleted file mode 100644
index 15faf7febf..0000000000
--- a/libical/zoneinfo/Africa/Lusaka.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Lusaka
-X-LIC-LOCATION:Africa/Lusaka
-BEGIN:STANDARD
-TZOFFSETFROM:+0153
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Malabo.ics b/libical/zoneinfo/Africa/Malabo.ics
deleted file mode 100644
index f942c2cbc0..0000000000
--- a/libical/zoneinfo/Africa/Malabo.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Malabo
-X-LIC-LOCATION:Africa/Malabo
-BEGIN:STANDARD
-TZOFFSETFROM:+0035
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19631215T000000
-RDATE:19631215T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Maputo.ics b/libical/zoneinfo/Africa/Maputo.ics
deleted file mode 100644
index 2c77238a59..0000000000
--- a/libical/zoneinfo/Africa/Maputo.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Maputo
-X-LIC-LOCATION:Africa/Maputo
-BEGIN:STANDARD
-TZOFFSETFROM:+0210
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Maseru.ics b/libical/zoneinfo/Africa/Maseru.ics
deleted file mode 100644
index 76b868634a..0000000000
--- a/libical/zoneinfo/Africa/Maseru.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Maseru
-X-LIC-LOCATION:Africa/Maseru
-BEGIN:STANDARD
-TZOFFSETFROM:+0150
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:SAST
-DTSTART:19430919T020000
-RDATE:19430919T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19440319T020000
-RDATE:19440319T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Mbabane.ics b/libical/zoneinfo/Africa/Mbabane.ics
deleted file mode 100644
index 2272cf4dc3..0000000000
--- a/libical/zoneinfo/Africa/Mbabane.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Mbabane
-X-LIC-LOCATION:Africa/Mbabane
-BEGIN:STANDARD
-TZOFFSETFROM:+0204
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Mogadishu.ics b/libical/zoneinfo/Africa/Mogadishu.ics
deleted file mode 100644
index 7193cb7474..0000000000
--- a/libical/zoneinfo/Africa/Mogadishu.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Mogadishu
-X-LIC-LOCATION:Africa/Mogadishu
-BEGIN:STANDARD
-TZOFFSETFROM:+0301
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:18931101T000000
-RDATE:18931101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0230
-TZNAME:BEAT
-DTSTART:19310101T000000
-RDATE:19310101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0230
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19570101T000000
-RDATE:19570101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Monrovia.ics b/libical/zoneinfo/Africa/Monrovia.ics
deleted file mode 100644
index 31977bfaf1..0000000000
--- a/libical/zoneinfo/Africa/Monrovia.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Monrovia
-X-LIC-LOCATION:Africa/Monrovia
-BEGIN:STANDARD
-TZOFFSETFROM:-0043
-TZOFFSETTO:-0043
-TZNAME:MMT
-DTSTART:18820101T000000
-RDATE:18820101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0043
-TZOFFSETTO:-0044
-TZNAME:LRT
-DTSTART:19190301T000000
-RDATE:19190301T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0044
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19720501T000000
-RDATE:19720501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Nairobi.ics b/libical/zoneinfo/Africa/Nairobi.ics
deleted file mode 100644
index 7a97641377..0000000000
--- a/libical/zoneinfo/Africa/Nairobi.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Nairobi
-X-LIC-LOCATION:Africa/Nairobi
-BEGIN:STANDARD
-TZOFFSETFROM:+0227
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19280701T000000
-RDATE:19280701T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0230
-TZNAME:BEAT
-DTSTART:19300101T000000
-RDATE:19300101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0230
-TZOFFSETTO:+0245
-TZNAME:BEAUT
-DTSTART:19400101T000000
-RDATE:19400101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0245
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19600101T000000
-RDATE:19600101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Ndjamena.ics b/libical/zoneinfo/Africa/Ndjamena.ics
deleted file mode 100644
index 0e808a982c..0000000000
--- a/libical/zoneinfo/Africa/Ndjamena.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Ndjamena
-X-LIC-LOCATION:Africa/Ndjamena
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WAST
-DTSTART:19791014T000000
-RDATE:19791014T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19800308T000000
-RDATE:19800308T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Niamey.ics b/libical/zoneinfo/Africa/Niamey.ics
deleted file mode 100644
index 7cc21a3794..0000000000
--- a/libical/zoneinfo/Africa/Niamey.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Niamey
-X-LIC-LOCATION:Africa/Niamey
-BEGIN:STANDARD
-TZOFFSETFROM:+0008
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19340226T000000
-RDATE:19340226T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19600101T000000
-RDATE:19600101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Nouakchott.ics b/libical/zoneinfo/Africa/Nouakchott.ics
deleted file mode 100644
index bcb6c9ef74..0000000000
--- a/libical/zoneinfo/Africa/Nouakchott.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Nouakchott
-X-LIC-LOCATION:Africa/Nouakchott
-BEGIN:STANDARD
-TZOFFSETFROM:-0104
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:WAT
-DTSTART:19340226T000000
-RDATE:19340226T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19601128T000000
-RDATE:19601128T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Ouagadougou.ics b/libical/zoneinfo/Africa/Ouagadougou.ics
deleted file mode 100644
index a7ee15ae1c..0000000000
--- a/libical/zoneinfo/Africa/Ouagadougou.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Ouagadougou
-X-LIC-LOCATION:Africa/Ouagadougou
-BEGIN:STANDARD
-TZOFFSETFROM:-0006
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Porto-Novo.ics b/libical/zoneinfo/Africa/Porto-Novo.ics
deleted file mode 100644
index de3f7202a8..0000000000
--- a/libical/zoneinfo/Africa/Porto-Novo.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Porto-Novo
-X-LIC-LOCATION:Africa/Porto-Novo
-BEGIN:STANDARD
-TZOFFSETFROM:+0010
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19340226T000000
-RDATE:19340226T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Sao_Tome.ics b/libical/zoneinfo/Africa/Sao_Tome.ics
deleted file mode 100644
index e0729cfb33..0000000000
--- a/libical/zoneinfo/Africa/Sao_Tome.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Sao_Tome
-X-LIC-LOCATION:Africa/Sao_Tome
-BEGIN:STANDARD
-TZOFFSETFROM:+0027
-TZOFFSETTO:-0037
-TZNAME:LMT
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0037
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Timbuktu.ics b/libical/zoneinfo/Africa/Timbuktu.ics
deleted file mode 100644
index 01d8193584..0000000000
--- a/libical/zoneinfo/Africa/Timbuktu.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Timbuktu
-X-LIC-LOCATION:Africa/Timbuktu
-BEGIN:STANDARD
-TZOFFSETFROM:-0012
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Tripoli.ics b/libical/zoneinfo/Africa/Tripoli.ics
deleted file mode 100644
index 075631445f..0000000000
--- a/libical/zoneinfo/Africa/Tripoli.ics
+++ /dev/null
@@ -1,67 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Tripoli
-X-LIC-LOCATION:Africa/Tripoli
-BEGIN:STANDARD
-TZOFFSETFROM:+0053
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19511014T020000
-RDATE:19511014T020000
-RDATE:19531009T020000
-RDATE:19550930T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850406T000000
-RDATE:19860404T000000
-RDATE:19870401T000000
-RDATE:19880401T000000
-RDATE:19890401T000000
-RDATE:19970404T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19520101T000000
-RDATE:19520101T000000
-RDATE:19540101T000000
-RDATE:19560101T000000
-RDATE:19820101T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19841001T000000
-RDATE:19851001T000000
-RDATE:19861003T000000
-RDATE:19871001T000000
-RDATE:19881001T000000
-RDATE:19891001T000000
-RDATE:19960930T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19590101T000000
-RDATE:19590101T000000
-RDATE:19900504T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19971004T000000
-RDATE:19971004T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Tunis.ics b/libical/zoneinfo/Africa/Tunis.ics
deleted file mode 100644
index 618af2a244..0000000000
--- a/libical/zoneinfo/Africa/Tunis.ics
+++ /dev/null
@@ -1,58 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Tunis
-X-LIC-LOCATION:Africa/Tunis
-BEGIN:STANDARD
-TZOFFSETFROM:+0041
-TZOFFSETTO:+0009
-TZNAME:PMT
-DTSTART:18810512T000000
-RDATE:18810512T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0009
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19110311T000000
-RDATE:19110311T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19390415T230000
-RDATE:19390415T230000
-RDATE:19400225T230000
-RDATE:19420309T000000
-RDATE:19430329T020000
-RDATE:19430425T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19770430T000000
-RDATE:19780501T000000
-RDATE:19880601T000000
-RDATE:19890326T000000
-RDATE:19900501T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19391119T000000
-RDATE:19391119T000000
-RDATE:19411006T000000
-RDATE:19421102T030000
-RDATE:19430417T020000
-RDATE:19431004T020000
-RDATE:19441008T000000
-RDATE:19450916T000000
-RDATE:19770924T010000
-RDATE:19781001T010000
-RDATE:19880925T010000
-RDATE:19890924T010000
-RDATE:19900930T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Africa/Windhoek.ics b/libical/zoneinfo/Africa/Windhoek.ics
deleted file mode 100644
index e39cfe22a8..0000000000
--- a/libical/zoneinfo/Africa/Windhoek.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Africa/Windhoek
-X-LIC-LOCATION:Africa/Windhoek
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WAST
-DTSTART:19940904T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19950402T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0108
-TZOFFSETTO:+0130
-TZNAME:SWAT
-DTSTART:18920208T000000
-RDATE:18920208T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0130
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19030301T000000
-RDATE:19030301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:SAST
-DTSTART:19420920T020000
-RDATE:19420920T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:SAST
-DTSTART:19430321T020000
-RDATE:19430321T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:CAT
-DTSTART:19900321T000000
-RDATE:19900321T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WAT
-DTSTART:19940403T000000
-RDATE:19940403T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Adak.ics b/libical/zoneinfo/America/Adak.ics
deleted file mode 100644
index 3ed7ea9a3b..0000000000
--- a/libical/zoneinfo/America/Adak.ics
+++ /dev/null
@@ -1,130 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Adak
-X-LIC-LOCATION:America/Adak
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-1000
-TZNAME:HAST
-DTSTART:19841028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-0900
-TZNAME:HADT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1213
-TZOFFSETTO:-1147
-TZNAME:LMT
-DTSTART:18671018T000000
-RDATE:18671018T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1147
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19000820T120000
-RDATE:19000820T120000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19420101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1000
-TZNAME:NWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1000
-TZNAME:NPT
-DTSTART:19450814T130000
-RDATE:19450814T130000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:BST
-DTSTART:19670401T000000
-RDATE:19670401T000000
-RDATE:19690101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1000
-TZNAME:BDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1100
-TZNAME:BST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1000
-TZNAME:HAST
-DTSTART:19831030T020000
-RDATE:19831030T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-0900
-TZNAME:HADT
-DTSTART:19840429T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Anchorage.ics b/libical/zoneinfo/America/Anchorage.ics
deleted file mode 100644
index 989da1e8e7..0000000000
--- a/libical/zoneinfo/America/Anchorage.ics
+++ /dev/null
@@ -1,124 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Anchorage
-X-LIC-LOCATION:America/Anchorage
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19841028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1400
-TZOFFSETTO:-1000
-TZNAME:LMT
-DTSTART:18671018T000000
-RDATE:18671018T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1000
-TZNAME:CAT
-DTSTART:19000820T120000
-RDATE:19000820T120000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-0900
-TZNAME:CAWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0900
-TZNAME:CAWT
-DTSTART:19450814T140000
-RDATE:19450814T140000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-1000
-TZNAME:CAT
-DTSTART:19450930T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1000
-TZNAME:AHST
-DTSTART:19670401T000000
-RDATE:19670401T000000
-RDATE:19690101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-0900
-TZNAME:AHDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-1000
-TZNAME:AHST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19831030T020000
-RDATE:19831030T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19840429T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Anguilla.ics b/libical/zoneinfo/America/Anguilla.ics
deleted file mode 100644
index 263279e378..0000000000
--- a/libical/zoneinfo/America/Anguilla.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Anguilla
-X-LIC-LOCATION:America/Anguilla
-BEGIN:STANDARD
-TZOFFSETFROM:-0412
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19120302T000000
-RDATE:19120302T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Antigua.ics b/libical/zoneinfo/America/Antigua.ics
deleted file mode 100644
index 95117eae2c..0000000000
--- a/libical/zoneinfo/America/Antigua.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Antigua
-X-LIC-LOCATION:America/Antigua
-BEGIN:STANDARD
-TZOFFSETFROM:-0407
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19120302T000000
-RDATE:19120302T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19510101T000000
-RDATE:19510101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Araguaina.ics b/libical/zoneinfo/America/Araguaina.ics
deleted file mode 100644
index 3095450b15..0000000000
--- a/libical/zoneinfo/America/Araguaina.ics
+++ /dev/null
@@ -1,91 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Araguaina
-X-LIC-LOCATION:America/Araguaina
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:20001008T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=2SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:20010218T000000
-RRULE:FREQ=YEARLY;BYMONTH=2;BYDAY=3SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0313
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-RDATE:19951015T000000
-RDATE:19961006T000000
-RDATE:19971006T000000
-RDATE:19981011T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-RDATE:19960211T000000
-RDATE:19970216T000000
-RDATE:19980301T000000
-RDATE:19990221T000000
-RDATE:20000227T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19900917T000000
-RDATE:19900917T000000
-RDATE:19950914T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Aruba.ics b/libical/zoneinfo/America/Aruba.ics
deleted file mode 100644
index 41737ca441..0000000000
--- a/libical/zoneinfo/America/Aruba.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Aruba
-X-LIC-LOCATION:America/Aruba
-BEGIN:STANDARD
-TZOFFSETFROM:-0440
-TZOFFSETTO:-0430
-TZNAME:ANT
-DTSTART:19120212T000000
-RDATE:19120212T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0430
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19650101T000000
-RDATE:19650101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Asuncion.ics b/libical/zoneinfo/America/Asuncion.ics
deleted file mode 100644
index ecad36209b..0000000000
--- a/libical/zoneinfo/America/Asuncion.ics
+++ /dev/null
@@ -1,106 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Asuncion
-X-LIC-LOCATION:America/Asuncion
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:PYST
-DTSTART:19961006T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:PYT
-DTSTART:19980301T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0351
-TZOFFSETTO:-0351
-TZNAME:AMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0351
-TZOFFSETTO:-0400
-TZNAME:PYT
-DTSTART:19311010T000000
-RDATE:19311010T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:PYT
-DTSTART:19721001T000000
-RDATE:19721001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:PYT
-DTSTART:19740401T000000
-RDATE:19740401T000000
-RDATE:19760301T000000
-RDATE:19770301T000000
-RDATE:19780301T000000
-RDATE:19790401T000000
-RDATE:19800401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850401T000000
-RDATE:19860401T000000
-RDATE:19870401T000000
-RDATE:19880401T000000
-RDATE:19890401T000000
-RDATE:19900401T000000
-RDATE:19910401T000000
-RDATE:19920301T000000
-RDATE:19930331T000000
-RDATE:19940227T000000
-RDATE:19950226T000000
-RDATE:19960301T000000
-RDATE:19970223T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:PYT
-DTSTART:19750301T000000
-RDATE:19750301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:PYST
-DTSTART:19751001T000000
-RDATE:19751001T000000
-RDATE:19761001T000000
-RDATE:19771001T000000
-RDATE:19781001T000000
-RDATE:19791001T000000
-RDATE:19801001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19841001T000000
-RDATE:19851001T000000
-RDATE:19861001T000000
-RDATE:19871001T000000
-RDATE:19881001T000000
-RDATE:19891022T000000
-RDATE:19901001T000000
-RDATE:19911006T000000
-RDATE:19921005T000000
-RDATE:19931001T000000
-RDATE:19941001T000000
-RDATE:19951001T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Barbados.ics b/libical/zoneinfo/America/Barbados.ics
deleted file mode 100644
index 1b0883f7af..0000000000
--- a/libical/zoneinfo/America/Barbados.ics
+++ /dev/null
@@ -1,42 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Barbados
-X-LIC-LOCATION:America/Barbados
-BEGIN:STANDARD
-TZOFFSETFROM:-0358
-TZOFFSETTO:-0358
-TZNAME:BMT
-DTSTART:19240101T000000
-RDATE:19240101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0358
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19320101T000000
-RDATE:19320101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19770612T020000
-RDATE:19770612T020000
-RDATE:19780416T020000
-RDATE:19790415T020000
-RDATE:19800420T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19771002T020000
-RDATE:19771002T020000
-RDATE:19781001T020000
-RDATE:19790930T020000
-RDATE:19800925T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Belem.ics b/libical/zoneinfo/America/Belem.ics
deleted file mode 100644
index 73ad3d6924..0000000000
--- a/libical/zoneinfo/America/Belem.ics
+++ /dev/null
@@ -1,62 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Belem
-X-LIC-LOCATION:America/Belem
-BEGIN:STANDARD
-TZOFFSETFROM:-0314
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19880912T000000
-RDATE:19880912T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Belize.ics b/libical/zoneinfo/America/Belize.ics
deleted file mode 100644
index 7533b1b0d6..0000000000
--- a/libical/zoneinfo/America/Belize.ics
+++ /dev/null
@@ -1,93 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Belize
-X-LIC-LOCATION:America/Belize
-BEGIN:STANDARD
-TZOFFSETFROM:-0553
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19120401T000000
-RDATE:19120401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0530
-TZNAME:CHDT
-DTSTART:19181006T000000
-RDATE:19181006T000000
-RDATE:19191005T000000
-RDATE:19201003T000000
-RDATE:19211002T000000
-RDATE:19221008T000000
-RDATE:19231007T000000
-RDATE:19241005T000000
-RDATE:19251004T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19301005T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19331008T000000
-RDATE:19341007T000000
-RDATE:19351006T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391008T000000
-RDATE:19401006T000000
-RDATE:19411005T000000
-RDATE:19421004T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0530
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19190209T000000
-RDATE:19190209T000000
-RDATE:19200215T000000
-RDATE:19210213T000000
-RDATE:19220212T000000
-RDATE:19230211T000000
-RDATE:19240210T000000
-RDATE:19250215T000000
-RDATE:19260214T000000
-RDATE:19270213T000000
-RDATE:19280212T000000
-RDATE:19290210T000000
-RDATE:19300209T000000
-RDATE:19310215T000000
-RDATE:19320214T000000
-RDATE:19330212T000000
-RDATE:19340211T000000
-RDATE:19350210T000000
-RDATE:19360209T000000
-RDATE:19370214T000000
-RDATE:19380213T000000
-RDATE:19390212T000000
-RDATE:19400211T000000
-RDATE:19410209T000000
-RDATE:19420215T000000
-RDATE:19430214T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19731205T000000
-RDATE:19731205T000000
-RDATE:19821218T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19740209T000000
-RDATE:19740209T000000
-RDATE:19830212T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Boa_Vista.ics b/libical/zoneinfo/America/Boa_Vista.ics
deleted file mode 100644
index 932b02f265..0000000000
--- a/libical/zoneinfo/America/Boa_Vista.ics
+++ /dev/null
@@ -1,67 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Boa_Vista
-X-LIC-LOCATION:America/Boa_Vista
-BEGIN:STANDARD
-TZOFFSETFROM:-0403
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AMST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19991003T000000
-RDATE:20001008T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:20000227T000000
-RDATE:20001015T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19880912T000000
-RDATE:19880912T000000
-RDATE:19990930T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Bogota.ics b/libical/zoneinfo/America/Bogota.ics
deleted file mode 100644
index 7f41fa9bdf..0000000000
--- a/libical/zoneinfo/America/Bogota.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Bogota
-X-LIC-LOCATION:America/Bogota
-BEGIN:STANDARD
-TZOFFSETFROM:-0456
-TZOFFSETTO:-0456
-TZNAME:BMT
-DTSTART:18840313T000000
-RDATE:18840313T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0456
-TZOFFSETTO:-0500
-TZNAME:COT
-DTSTART:19141123T000000
-RDATE:19141123T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:COST
-DTSTART:19920502T000000
-RDATE:19920502T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:COT
-DTSTART:19921231T000000
-RDATE:19921231T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Boise.ics b/libical/zoneinfo/America/Boise.ics
deleted file mode 100644
index bb8461cc96..0000000000
--- a/libical/zoneinfo/America/Boise.ics
+++ /dev/null
@@ -1,114 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Boise
-X-LIC-LOCATION:America/Boise
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19751026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0745
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19230513T020000
-RDATE:19230513T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:MPT
-DTSTART:19450814T170000
-RDATE:19450814T170000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-RDATE:19671029T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19670430T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19740101T000000
-RDATE:19740101T000000
-RDATE:19740203T020000
-RDATE:19741027T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Buenos_Aires.ics b/libical/zoneinfo/America/Buenos_Aires.ics
deleted file mode 100644
index b616995c7d..0000000000
--- a/libical/zoneinfo/America/Buenos_Aires.ics
+++ /dev/null
@@ -1,131 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Buenos_Aires
-X-LIC-LOCATION:America/Buenos_Aires
-BEGIN:STANDARD
-TZOFFSETFROM:-0354
-TZOFFSETTO:-0417
-TZNAME:CMT
-DTSTART:18941101T000000
-RDATE:18941101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19301201T000000
-RDATE:19301201T000000
-RDATE:19311015T000000
-RDATE:19321101T000000
-RDATE:19331101T000000
-RDATE:19341101T000000
-RDATE:19351101T000000
-RDATE:19361101T000000
-RDATE:19371101T000000
-RDATE:19381101T000000
-RDATE:19391101T000000
-RDATE:19400701T000000
-RDATE:19411015T000000
-RDATE:19431015T000000
-RDATE:19461001T000000
-RDATE:19631215T000000
-RDATE:19641015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19320301T000000
-RDATE:19330301T000000
-RDATE:19340301T000000
-RDATE:19350301T000000
-RDATE:19360301T000000
-RDATE:19370301T000000
-RDATE:19380301T000000
-RDATE:19390301T000000
-RDATE:19400301T000000
-RDATE:19410615T000000
-RDATE:19430801T000000
-RDATE:19460301T000000
-RDATE:19631001T000000
-RDATE:19640301T000000
-RDATE:19650301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881201T000000
-RDATE:19891015T000000
-RDATE:19901021T000000
-RDATE:19911020T000000
-RDATE:19921018T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-RDATE:19860314T000000
-RDATE:19870213T000000
-RDATE:19880207T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-RDATE:19910303T000000
-RDATE:19920301T000000
-RDATE:19930307T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19991003T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:20000303T000000
-RDATE:20000303T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Cambridge_Bay.ics b/libical/zoneinfo/America/Cambridge_Bay.ics
deleted file mode 100644
index 52aa72f73e..0000000000
--- a/libical/zoneinfo/America/Cambridge_Bay.ics
+++ /dev/null
@@ -1,136 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Cambridge_Bay
-X-LIC-LOCATION:America/Cambridge_Bay
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:20020407T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:20021027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-RDATE:20011028T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T020000
-RDATE:19880403T020000
-RDATE:19890402T020000
-RDATE:19900401T020000
-RDATE:19910407T020000
-RDATE:19920405T020000
-RDATE:19930404T020000
-RDATE:19940403T020000
-RDATE:19950402T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:20010401T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0500
-TZNAME:MDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19991031T020000
-RDATE:19991031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20000402T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20001029T020000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20001105T000000
-RDATE:20001105T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Cancun.ics b/libical/zoneinfo/America/Cancun.ics
deleted file mode 100644
index 8a983eef3e..0000000000
--- a/libical/zoneinfo/America/Cancun.ics
+++ /dev/null
@@ -1,83 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Cancun
-X-LIC-LOCATION:America/Cancun
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20010506T020000
-RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20010930T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0547
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19220101T001256
-RDATE:19220101T001256
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19811223T000000
-RDATE:19811223T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19960407T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19961027T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19980802T020000
-RDATE:19980802T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19981025T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19990404T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19991031T020000
-RDATE:19991031T020000
-RDATE:20001029T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Caracas.ics b/libical/zoneinfo/America/Caracas.ics
deleted file mode 100644
index c8a2245be0..0000000000
--- a/libical/zoneinfo/America/Caracas.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Caracas
-X-LIC-LOCATION:America/Caracas
-BEGIN:STANDARD
-TZOFFSETFROM:-0428
-TZOFFSETTO:-0428
-TZNAME:CMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0428
-TZOFFSETTO:-0430
-TZNAME:VET
-DTSTART:19120212T000000
-RDATE:19120212T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0430
-TZOFFSETTO:-0400
-TZNAME:VET
-DTSTART:19650101T000000
-RDATE:19650101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Catamarca.ics b/libical/zoneinfo/America/Catamarca.ics
deleted file mode 100644
index 2e4816c357..0000000000
--- a/libical/zoneinfo/America/Catamarca.ics
+++ /dev/null
@@ -1,130 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Catamarca
-X-LIC-LOCATION:America/Catamarca
-BEGIN:STANDARD
-TZOFFSETFROM:-0423
-TZOFFSETTO:-0417
-TZNAME:CMT
-DTSTART:18941101T000000
-RDATE:18941101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19301201T000000
-RDATE:19301201T000000
-RDATE:19311015T000000
-RDATE:19321101T000000
-RDATE:19331101T000000
-RDATE:19341101T000000
-RDATE:19351101T000000
-RDATE:19361101T000000
-RDATE:19371101T000000
-RDATE:19381101T000000
-RDATE:19391101T000000
-RDATE:19400701T000000
-RDATE:19411015T000000
-RDATE:19431015T000000
-RDATE:19461001T000000
-RDATE:19631215T000000
-RDATE:19641015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19320301T000000
-RDATE:19330301T000000
-RDATE:19340301T000000
-RDATE:19350301T000000
-RDATE:19360301T000000
-RDATE:19370301T000000
-RDATE:19380301T000000
-RDATE:19390301T000000
-RDATE:19400301T000000
-RDATE:19410615T000000
-RDATE:19430801T000000
-RDATE:19460301T000000
-RDATE:19631001T000000
-RDATE:19640301T000000
-RDATE:19650301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881201T000000
-RDATE:19891015T000000
-RDATE:19911020T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-RDATE:19860314T000000
-RDATE:19870213T000000
-RDATE:19880207T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-RDATE:19920301T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19900701T000000
-RDATE:19900701T000000
-RDATE:19910701T000000
-RDATE:19920701T000000
-RDATE:20000303T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19991003T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Cayenne.ics b/libical/zoneinfo/America/Cayenne.ics
deleted file mode 100644
index e405ff629c..0000000000
--- a/libical/zoneinfo/America/Cayenne.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Cayenne
-X-LIC-LOCATION:America/Cayenne
-BEGIN:STANDARD
-TZOFFSETFROM:-0329
-TZOFFSETTO:-0400
-TZNAME:GFT
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:GFT
-DTSTART:19671001T000000
-RDATE:19671001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Cayman.ics b/libical/zoneinfo/America/Cayman.ics
deleted file mode 100644
index 1715b0fc5a..0000000000
--- a/libical/zoneinfo/America/Cayman.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Cayman
-X-LIC-LOCATION:America/Cayman
-BEGIN:STANDARD
-TZOFFSETFROM:-0526
-TZOFFSETTO:-0507
-TZNAME:KMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0507
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19120201T000000
-RDATE:19120201T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Chicago.ics b/libical/zoneinfo/America/Chicago.ics
deleted file mode 100644
index 50f1df65b9..0000000000
--- a/libical/zoneinfo/America/Chicago.ics
+++ /dev/null
@@ -1,170 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Chicago
-X-LIC-LOCATION:America/Chicago
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19551030T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0551
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19200613T020000
-RDATE:19210327T020000
-RDATE:19220430T020000
-RDATE:19230429T020000
-RDATE:19240427T020000
-RDATE:19250426T020000
-RDATE:19260425T020000
-RDATE:19270424T020000
-RDATE:19280429T020000
-RDATE:19290428T020000
-RDATE:19300427T020000
-RDATE:19310426T020000
-RDATE:19320424T020000
-RDATE:19330430T020000
-RDATE:19340429T020000
-RDATE:19350428T020000
-RDATE:19370425T020000
-RDATE:19380424T020000
-RDATE:19390430T020000
-RDATE:19400428T020000
-RDATE:19410427T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19201031T020000
-RDATE:19211030T020000
-RDATE:19220924T020000
-RDATE:19230930T020000
-RDATE:19240928T020000
-RDATE:19250927T020000
-RDATE:19260926T020000
-RDATE:19270925T020000
-RDATE:19280930T020000
-RDATE:19290929T020000
-RDATE:19300928T020000
-RDATE:19310927T020000
-RDATE:19320925T020000
-RDATE:19330924T020000
-RDATE:19340930T020000
-RDATE:19350929T020000
-RDATE:19361115T020000
-RDATE:19370926T020000
-RDATE:19380925T020000
-RDATE:19390924T020000
-RDATE:19400929T020000
-RDATE:19410928T020000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19670101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19360301T020000
-RDATE:19360301T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Chihuahua.ics b/libical/zoneinfo/America/Chihuahua.ics
deleted file mode 100644
index 15023f34da..0000000000
--- a/libical/zoneinfo/America/Chihuahua.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Chihuahua
-X-LIC-LOCATION:America/Chihuahua
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:20010506T020000
-RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:20010930T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0704
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19211231T235540
-RDATE:19211231T235540
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19270610T230000
-RDATE:19270610T230000
-RDATE:19310501T230000
-RDATE:19320401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19301115T000000
-RDATE:19301115T000000
-RDATE:19311001T000000
-RDATE:19980405T030000
-RDATE:19991031T020000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19960101T000000
-RDATE:19960101T000000
-RDATE:19980101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19960407T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19961027T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19981025T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19990404T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Cordoba.ics b/libical/zoneinfo/America/Cordoba.ics
deleted file mode 100644
index 39544553c5..0000000000
--- a/libical/zoneinfo/America/Cordoba.ics
+++ /dev/null
@@ -1,126 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Cordoba
-X-LIC-LOCATION:America/Cordoba
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0417
-TZNAME:CMT
-DTSTART:18941101T000000
-RDATE:18941101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19301201T000000
-RDATE:19301201T000000
-RDATE:19311015T000000
-RDATE:19321101T000000
-RDATE:19331101T000000
-RDATE:19341101T000000
-RDATE:19351101T000000
-RDATE:19361101T000000
-RDATE:19371101T000000
-RDATE:19381101T000000
-RDATE:19391101T000000
-RDATE:19400701T000000
-RDATE:19411015T000000
-RDATE:19431015T000000
-RDATE:19461001T000000
-RDATE:19631215T000000
-RDATE:19641015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19320301T000000
-RDATE:19330301T000000
-RDATE:19340301T000000
-RDATE:19350301T000000
-RDATE:19360301T000000
-RDATE:19370301T000000
-RDATE:19380301T000000
-RDATE:19390301T000000
-RDATE:19400301T000000
-RDATE:19410615T000000
-RDATE:19430801T000000
-RDATE:19460301T000000
-RDATE:19631001T000000
-RDATE:19640301T000000
-RDATE:19650301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881201T000000
-RDATE:19891015T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-RDATE:19860314T000000
-RDATE:19870213T000000
-RDATE:19880207T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19900701T000000
-RDATE:19900701T000000
-RDATE:20000303T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19991003T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Costa_Rica.ics b/libical/zoneinfo/America/Costa_Rica.ics
deleted file mode 100644
index d999a65645..0000000000
--- a/libical/zoneinfo/America/Costa_Rica.ics
+++ /dev/null
@@ -1,42 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Costa_Rica
-X-LIC-LOCATION:America/Costa_Rica
-BEGIN:STANDARD
-TZOFFSETFROM:-0536
-TZOFFSETTO:-0536
-TZNAME:SJMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0536
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19210115T000000
-RDATE:19210115T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19790225T000000
-RDATE:19790225T000000
-RDATE:19800224T000000
-RDATE:19910119T000000
-RDATE:19920118T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19790603T000000
-RDATE:19790603T000000
-RDATE:19800601T000000
-RDATE:19910701T000000
-RDATE:19920315T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Cuiaba.ics b/libical/zoneinfo/America/Cuiaba.ics
deleted file mode 100644
index 8584ada2b4..0000000000
--- a/libical/zoneinfo/America/Cuiaba.ics
+++ /dev/null
@@ -1,93 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Cuiaba
-X-LIC-LOCATION:America/Cuiaba
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AMST
-DTSTART:20001008T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=2SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:20010218T000000
-RRULE:FREQ=YEARLY;BYMONTH=2;BYDAY=3SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0344
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AMST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-RDATE:19901021T000000
-RDATE:19911020T000000
-RDATE:19921025T000000
-RDATE:19931017T000000
-RDATE:19941016T000000
-RDATE:19951015T000000
-RDATE:19961006T000000
-RDATE:19971006T000000
-RDATE:19981011T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-RDATE:19910217T000000
-RDATE:19920209T000000
-RDATE:19930131T000000
-RDATE:19940220T000000
-RDATE:19950219T000000
-RDATE:19960211T000000
-RDATE:19970216T000000
-RDATE:19980301T000000
-RDATE:19990221T000000
-RDATE:20000227T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Curacao.ics b/libical/zoneinfo/America/Curacao.ics
deleted file mode 100644
index 32dc4fa2b3..0000000000
--- a/libical/zoneinfo/America/Curacao.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Curacao
-X-LIC-LOCATION:America/Curacao
-BEGIN:STANDARD
-TZOFFSETFROM:-0436
-TZOFFSETTO:-0430
-TZNAME:ANT
-DTSTART:19120212T000000
-RDATE:19120212T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0430
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19650101T000000
-RDATE:19650101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Dawson.ics b/libical/zoneinfo/America/Dawson.ics
deleted file mode 100644
index 7100a72eb5..0000000000
--- a/libical/zoneinfo/America/Dawson.ics
+++ /dev/null
@@ -1,87 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Dawson
-X-LIC-LOCATION:America/Dawson
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19801026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0918
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19000820T000000
-RDATE:19000820T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:YDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:YWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0700
-TZNAME:YDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19731028T000000
-RDATE:19731028T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19800427T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Dawson_Creek.ics b/libical/zoneinfo/America/Dawson_Creek.ics
deleted file mode 100644
index c3ae9daec6..0000000000
--- a/libical/zoneinfo/America/Dawson_Creek.ics
+++ /dev/null
@@ -1,102 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Dawson_Creek
-X-LIC-LOCATION:America/Dawson_Creek
-BEGIN:STANDARD
-TZOFFSETFROM:-0801
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19600925T020000
-RDATE:19610924T020000
-RDATE:19621028T020000
-RDATE:19631027T020000
-RDATE:19641025T020000
-RDATE:19651031T020000
-RDATE:19661030T020000
-RDATE:19671029T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19470101T000000
-RDATE:19470101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19720830T020000
-RDATE:19720830T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Denver.ics b/libical/zoneinfo/America/Denver.ics
deleted file mode 100644
index 036d516125..0000000000
--- a/libical/zoneinfo/America/Denver.ics
+++ /dev/null
@@ -1,90 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Denver
-X-LIC-LOCATION:America/Denver
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19651031T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-RDATE:19200101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19670101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210327T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19201031T020000
-RDATE:19210522T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:MPT
-DTSTART:19450814T170000
-RDATE:19450814T170000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Detroit.ics b/libical/zoneinfo/America/Detroit.ics
deleted file mode 100644
index b8a94b6790..0000000000
--- a/libical/zoneinfo/America/Detroit.ics
+++ /dev/null
@@ -1,94 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Detroit
-X-LIC-LOCATION:America/Detroit
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19761031T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0532
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19050101T000000
-RDATE:19050101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19150515T020000
-RDATE:19150515T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19420101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19730101T000000
-RDATE:19750101T000000
-RDATE:19750427T020000
-RDATE:19751026T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:EPT
-DTSTART:19450814T190000
-RDATE:19450814T190000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-RDATE:19480926T020000
-RDATE:19671029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19480425T020000
-RDATE:19480425T020000
-RDATE:19670614T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Dominica.ics b/libical/zoneinfo/America/Dominica.ics
deleted file mode 100644
index fcf6513ae4..0000000000
--- a/libical/zoneinfo/America/Dominica.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Dominica
-X-LIC-LOCATION:America/Dominica
-BEGIN:STANDARD
-TZOFFSETFROM:-0406
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110701T000100
-RDATE:19110701T000100
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Edmonton.ics b/libical/zoneinfo/America/Edmonton.ics
deleted file mode 100644
index da5f7cd086..0000000000
--- a/libical/zoneinfo/America/Edmonton.ics
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Edmonton
-X-LIC-LOCATION:America/Edmonton
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19721029T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0734
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19060901T000000
-RDATE:19060901T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190413T020000
-RDATE:19200425T020000
-RDATE:19210424T020000
-RDATE:19220430T020000
-RDATE:19230429T020000
-RDATE:19470427T020000
-RDATE:19670430T020000
-RDATE:19690427T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19190527T020000
-RDATE:19201031T020000
-RDATE:19210925T020000
-RDATE:19220924T020000
-RDATE:19230930T020000
-RDATE:19450930T020000
-RDATE:19470928T020000
-RDATE:19671029T020000
-RDATE:19691026T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Eirunepe.ics b/libical/zoneinfo/America/Eirunepe.ics
deleted file mode 100644
index d9abf667a3..0000000000
--- a/libical/zoneinfo/America/Eirunepe.ics
+++ /dev/null
@@ -1,66 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Eirunepe
-X-LIC-LOCATION:America/Eirunepe
-BEGIN:STANDARD
-TZOFFSETFROM:-0439
-TZOFFSETTO:-0500
-TZNAME:ACT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:ACST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19931017T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:ACT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19940220T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:ACT
-DTSTART:19880912T000000
-RDATE:19880912T000000
-RDATE:19930928T000000
-RDATE:19940922T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/El_Salvador.ics b/libical/zoneinfo/America/El_Salvador.ics
deleted file mode 100644
index 4b72a4269a..0000000000
--- a/libical/zoneinfo/America/El_Salvador.ics
+++ /dev/null
@@ -1,31 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/El_Salvador
-X-LIC-LOCATION:America/El_Salvador
-BEGIN:STANDARD
-TZOFFSETFROM:-0557
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19210101T000000
-RDATE:19210101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19870503T000000
-RDATE:19870503T000000
-RDATE:19880501T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19870927T000000
-RDATE:19870927T000000
-RDATE:19880925T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Fortaleza.ics b/libical/zoneinfo/America/Fortaleza.ics
deleted file mode 100644
index 1b84eca7d1..0000000000
--- a/libical/zoneinfo/America/Fortaleza.ics
+++ /dev/null
@@ -1,71 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Fortaleza
-X-LIC-LOCATION:America/Fortaleza
-BEGIN:STANDARD
-TZOFFSETFROM:-0234
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-RDATE:19991003T000000
-RDATE:20001008T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-RDATE:20000227T000000
-RDATE:20001022T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19900917T000000
-RDATE:19900917T000000
-RDATE:19990930T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Glace_Bay.ics b/libical/zoneinfo/America/Glace_Bay.ics
deleted file mode 100644
index 308cb0ad83..0000000000
--- a/libical/zoneinfo/America/Glace_Bay.ics
+++ /dev/null
@@ -1,71 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Glace_Bay
-X-LIC-LOCATION:America/Glace_Bay
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19721029T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19020615T000000
-RDATE:19020615T000000
-RDATE:19530101T000000
-RDATE:19540101T000000
-RDATE:19720101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19530426T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-RDATE:19530927T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Godthab.ics b/libical/zoneinfo/America/Godthab.ics
deleted file mode 100644
index 9d437433c1..0000000000
--- a/libical/zoneinfo/America/Godthab.ics
+++ /dev/null
@@ -1,58 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Godthab
-X-LIC-LOCATION:America/Godthab
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:WGST
-DTSTART:19810328T220000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=24,25,26,27,28,29,30;BYDAY=SA
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:WGT
-DTSTART:19961026T230000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=24,25,26,27,28,29,30;BYDAY=SA
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0327
-TZOFFSETTO:-0300
-TZNAME:WGT
-DTSTART:19160728T000000
-RDATE:19160728T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:WGT
-DTSTART:19800406T020000
-RDATE:19800406T020000
-RDATE:19800927T220000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:WGT
-DTSTART:19810926T230000
-RDATE:19810926T230000
-RDATE:19820925T230000
-RDATE:19830924T230000
-RDATE:19840929T230000
-RDATE:19850928T230000
-RDATE:19860927T230000
-RDATE:19870926T230000
-RDATE:19880924T230000
-RDATE:19890923T230000
-RDATE:19900929T230000
-RDATE:19910928T230000
-RDATE:19920926T230000
-RDATE:19930925T230000
-RDATE:19940924T230000
-RDATE:19950923T230000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Goose_Bay.ics b/libical/zoneinfo/America/Goose_Bay.ics
deleted file mode 100644
index 9b09af0a9b..0000000000
--- a/libical/zoneinfo/America/Goose_Bay.ics
+++ /dev/null
@@ -1,221 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Goose_Bay
-X-LIC-LOCATION:America/Goose_Bay
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19890402T000100
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19891029T000100
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0402
-TZOFFSETTO:-0331
-TZNAME:NST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0331
-TZOFFSETTO:-0231
-TZNAME:NST
-DTSTART:19170408T020000
-RDATE:19170408T020000
-RDATE:19180414T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0231
-TZOFFSETTO:-0331
-TZNAME:NST
-DTSTART:19170917T020000
-RDATE:19170917T020000
-RDATE:19181031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0331
-TZOFFSETTO:-0331
-TZNAME:NST
-DTSTART:19190101T000000
-RDATE:19190101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0331
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19350330T000000
-RDATE:19350330T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19360101T000000
-RDATE:19360101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0230
-TZNAME:NDT
-DTSTART:19360510T000000
-RDATE:19360510T000000
-RDATE:19370509T000000
-RDATE:19380508T000000
-RDATE:19390514T000000
-RDATE:19400512T000000
-RDATE:19410511T000000
-RDATE:19460512T020000
-RDATE:19470511T020000
-RDATE:19480509T020000
-RDATE:19490508T020000
-RDATE:19500514T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0230
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19361004T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391001T000000
-RDATE:19401006T000000
-RDATE:19411005T000000
-RDATE:19421231T000000
-RDATE:19430905T000000
-RDATE:19440902T000000
-RDATE:19451007T020000
-RDATE:19461006T020000
-RDATE:19471005T020000
-RDATE:19481003T020000
-RDATE:19491002T020000
-RDATE:19501008T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19601030T020000
-RDATE:19611029T020000
-RDATE:19621028T020000
-RDATE:19631027T020000
-RDATE:19641025T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0230
-TZNAME:NWT
-DTSTART:19420301T000000
-RDATE:19420301T000000
-RDATE:19430530T000000
-RDATE:19440710T000000
-RDATE:19450101T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19660315T020000
-RDATE:19660315T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19660424T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T000100
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19661030T020000
-RDATE:19661030T020000
-RDATE:19671029T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T000100
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0200
-TZNAME:ADDT
-DTSTART:19880403T000100
-RDATE:19880403T000100
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19881030T000100
-RDATE:19881030T000100
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Grand_Turk.ics b/libical/zoneinfo/America/Grand_Turk.ics
deleted file mode 100644
index 7c5f01a72a..0000000000
--- a/libical/zoneinfo/America/Grand_Turk.ics
+++ /dev/null
@@ -1,50 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Grand_Turk
-X-LIC-LOCATION:America/Grand_Turk
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19791028T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T000000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0445
-TZOFFSETTO:-0507
-TZNAME:KMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0507
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19120201T000000
-RDATE:19120201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19790429T000000
-RDATE:19790429T000000
-RDATE:19800427T000000
-RDATE:19810426T000000
-RDATE:19820425T000000
-RDATE:19830424T000000
-RDATE:19840429T000000
-RDATE:19850428T000000
-RDATE:19860427T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Grenada.ics b/libical/zoneinfo/America/Grenada.ics
deleted file mode 100644
index 0f1f7599f4..0000000000
--- a/libical/zoneinfo/America/Grenada.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Grenada
-X-LIC-LOCATION:America/Grenada
-BEGIN:STANDARD
-TZOFFSETFROM:-0407
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Guadeloupe.ics b/libical/zoneinfo/America/Guadeloupe.ics
deleted file mode 100644
index 2eae62a47b..0000000000
--- a/libical/zoneinfo/America/Guadeloupe.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Guadeloupe
-X-LIC-LOCATION:America/Guadeloupe
-BEGIN:STANDARD
-TZOFFSETFROM:-0406
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110608T000000
-RDATE:19110608T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Guatemala.ics b/libical/zoneinfo/America/Guatemala.ics
deleted file mode 100644
index e884163c82..0000000000
--- a/libical/zoneinfo/America/Guatemala.ics
+++ /dev/null
@@ -1,33 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Guatemala
-X-LIC-LOCATION:America/Guatemala
-BEGIN:STANDARD
-TZOFFSETFROM:-0602
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181005T000000
-RDATE:19181005T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19731125T000000
-RDATE:19731125T000000
-RDATE:19830521T000000
-RDATE:19910323T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19740224T000000
-RDATE:19740224T000000
-RDATE:19830922T000000
-RDATE:19910907T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Guayaquil.ics b/libical/zoneinfo/America/Guayaquil.ics
deleted file mode 100644
index 2200e0d9ad..0000000000
--- a/libical/zoneinfo/America/Guayaquil.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Guayaquil
-X-LIC-LOCATION:America/Guayaquil
-BEGIN:STANDARD
-TZOFFSETFROM:-0519
-TZOFFSETTO:-0514
-TZNAME:QMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0514
-TZOFFSETTO:-0500
-TZNAME:ECT
-DTSTART:19310101T000000
-RDATE:19310101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Guyana.ics b/libical/zoneinfo/America/Guyana.ics
deleted file mode 100644
index d78a89b2b5..0000000000
--- a/libical/zoneinfo/America/Guyana.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Guyana
-X-LIC-LOCATION:America/Guyana
-BEGIN:STANDARD
-TZOFFSETFROM:-0353
-TZOFFSETTO:-0345
-TZNAME:GBGT
-DTSTART:19150301T000000
-RDATE:19150301T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0345
-TZOFFSETTO:-0345
-TZNAME:GYT
-DTSTART:19660526T000000
-RDATE:19660526T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0345
-TZOFFSETTO:-0300
-TZNAME:GYT
-DTSTART:19750731T000000
-RDATE:19750731T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:GYT
-DTSTART:19910101T000000
-RDATE:19910101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Halifax.ics b/libical/zoneinfo/America/Halifax.ics
deleted file mode 100644
index 825bbbf0a4..0000000000
--- a/libical/zoneinfo/America/Halifax.ics
+++ /dev/null
@@ -1,155 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Halifax
-X-LIC-LOCATION:America/Halifax
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19621028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0414
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19020615T000000
-RDATE:19020615T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19160401T000000
-RDATE:19160401T000000
-RDATE:19180414T020000
-RDATE:19200509T000000
-RDATE:19210506T000000
-RDATE:19220430T000000
-RDATE:19230506T000000
-RDATE:19240504T000000
-RDATE:19250503T000000
-RDATE:19260516T000000
-RDATE:19270501T000000
-RDATE:19280513T000000
-RDATE:19290512T000000
-RDATE:19300511T000000
-RDATE:19310510T000000
-RDATE:19330430T000000
-RDATE:19340520T000000
-RDATE:19350602T000000
-RDATE:19360601T000000
-RDATE:19370502T000000
-RDATE:19380501T000000
-RDATE:19390528T000000
-RDATE:19400505T000000
-RDATE:19410504T000000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19161001T000000
-RDATE:19161001T000000
-RDATE:19181031T020000
-RDATE:19200829T000000
-RDATE:19210905T000000
-RDATE:19220905T000000
-RDATE:19230904T000000
-RDATE:19240915T000000
-RDATE:19250928T000000
-RDATE:19260913T000000
-RDATE:19270926T000000
-RDATE:19280909T000000
-RDATE:19290903T000000
-RDATE:19300915T000000
-RDATE:19310928T000000
-RDATE:19331002T000000
-RDATE:19340916T000000
-RDATE:19350930T000000
-RDATE:19360914T000000
-RDATE:19370927T000000
-RDATE:19380926T000000
-RDATE:19390925T000000
-RDATE:19400930T000000
-RDATE:19410929T000000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19320926T000000
-RDATE:19320926T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Havana.ics b/libical/zoneinfo/America/Havana.ics
deleted file mode 100644
index f23b3a2c9a..0000000000
--- a/libical/zoneinfo/America/Havana.ics
+++ /dev/null
@@ -1,128 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Havana
-X-LIC-LOCATION:America/Havana
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:CST
-DTSTART:19981025T010000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:CDT
-DTSTART:20000402T000000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0529
-TZOFFSETTO:-0530
-TZNAME:HMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0530
-TZOFFSETTO:-0500
-TZNAME:CST
-DTSTART:19250719T120000
-RDATE:19250719T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:CDT
-DTSTART:19280610T000000
-RDATE:19280610T000000
-RDATE:19400602T000000
-RDATE:19410601T000000
-RDATE:19420607T000000
-RDATE:19450603T000000
-RDATE:19460602T000000
-RDATE:19650601T000000
-RDATE:19660529T000000
-RDATE:19670408T000000
-RDATE:19680414T000000
-RDATE:19690427T000000
-RDATE:19700426T000000
-RDATE:19710425T000000
-RDATE:19720430T000000
-RDATE:19730429T000000
-RDATE:19740428T000000
-RDATE:19750427T000000
-RDATE:19760425T000000
-RDATE:19770424T000000
-RDATE:19780507T000000
-RDATE:19790318T000000
-RDATE:19800316T000000
-RDATE:19810510T000000
-RDATE:19820509T000000
-RDATE:19830508T000000
-RDATE:19840506T000000
-RDATE:19850505T000000
-RDATE:19860316T000000
-RDATE:19870315T000000
-RDATE:19880320T000000
-RDATE:19890319T000000
-RDATE:19900401T000000
-RDATE:19910407T000000
-RDATE:19920405T000000
-RDATE:19930404T000000
-RDATE:19940403T000000
-RDATE:19950402T000000
-RDATE:19960407T000000
-RDATE:19970406T000000
-RDATE:19980329T000000
-RDATE:19990328T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:CST
-DTSTART:19281010T000000
-RDATE:19281010T000000
-RDATE:19400901T000000
-RDATE:19410907T000000
-RDATE:19420906T000000
-RDATE:19450902T000000
-RDATE:19460901T000000
-RDATE:19650930T000000
-RDATE:19661002T000000
-RDATE:19670910T000000
-RDATE:19680908T000000
-RDATE:19691026T000000
-RDATE:19701025T000000
-RDATE:19711031T000000
-RDATE:19721008T000000
-RDATE:19731008T000000
-RDATE:19741008T000000
-RDATE:19751026T000000
-RDATE:19761031T000000
-RDATE:19771030T000000
-RDATE:19781008T000000
-RDATE:19791014T000000
-RDATE:19801012T000000
-RDATE:19811011T000000
-RDATE:19821010T000000
-RDATE:19831009T000000
-RDATE:19841014T000000
-RDATE:19851013T000000
-RDATE:19861012T000000
-RDATE:19871011T000000
-RDATE:19881009T000000
-RDATE:19891008T000000
-RDATE:19901014T000000
-RDATE:19911013T010000
-RDATE:19921011T010000
-RDATE:19931010T010000
-RDATE:19941009T010000
-RDATE:19951008T010000
-RDATE:19961006T010000
-RDATE:19971012T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Hermosillo.ics b/libical/zoneinfo/America/Hermosillo.ics
deleted file mode 100644
index c3e67d82a3..0000000000
--- a/libical/zoneinfo/America/Hermosillo.ics
+++ /dev/null
@@ -1,66 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Hermosillo
-X-LIC-LOCATION:America/Hermosillo
-BEGIN:STANDARD
-TZOFFSETFROM:-0724
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19211231T233608
-RDATE:19211231T233608
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19270610T230000
-RDATE:19270610T230000
-RDATE:19310501T230000
-RDATE:19320401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19301115T000000
-RDATE:19301115T000000
-RDATE:19311001T000000
-RDATE:19420424T000000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19490114T000000
-RDATE:19490114T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19700101T000000
-RDATE:19700101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19960407T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19990101T000000
-RDATE:19990101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Indiana/Indianapolis.ics b/libical/zoneinfo/America/Indiana/Indianapolis.ics
deleted file mode 100644
index 8dc82b603a..0000000000
--- a/libical/zoneinfo/America/Indiana/Indianapolis.ics
+++ /dev/null
@@ -1,108 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Indiana/Indianapolis
-X-LIC-LOCATION:America/Indiana/Indianapolis
-BEGIN:STANDARD
-TZOFFSETFROM:-0545
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19410622T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19410928T020000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19570929T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19550424T020000
-RDATE:19550424T020000
-RDATE:19580427T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19690101T000000
-RDATE:19690101T000000
-RDATE:19710101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Indiana/Knox.ics b/libical/zoneinfo/America/Indiana/Knox.ics
deleted file mode 100644
index 7351eb3b1a..0000000000
--- a/libical/zoneinfo/America/Indiana/Knox.ics
+++ /dev/null
@@ -1,147 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Indiana/Knox
-X-LIC-LOCATION:America/Indiana/Knox
-BEGIN:STANDARD
-TZOFFSETFROM:-0546
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T020000
-RDATE:19880403T020000
-RDATE:19890402T020000
-RDATE:19900401T020000
-RDATE:19910407T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19450930T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19551030T020000
-RDATE:19561028T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19591025T020000
-RDATE:19601030T020000
-RDATE:19611029T020000
-RDATE:19631027T020000
-RDATE:19671029T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19470101T000000
-RDATE:19470101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19620429T020000
-RDATE:19620429T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19911027T020000
-RDATE:19911027T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Indiana/Marengo.ics b/libical/zoneinfo/America/Indiana/Marengo.ics
deleted file mode 100644
index 88dbdb5314..0000000000
--- a/libical/zoneinfo/America/Indiana/Marengo.ics
+++ /dev/null
@@ -1,116 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Indiana/Marengo
-X-LIC-LOCATION:America/Indiana/Marengo
-BEGIN:STANDARD
-TZOFFSETFROM:-0545
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19510429T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19450930T020000
-RDATE:19510930T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19600925T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19510101T000000
-RDATE:19510101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19610430T020000
-RDATE:19610430T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19690101T000000
-RDATE:19690101T000000
-RDATE:19741027T020000
-RDATE:19760101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19750223T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19751026T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19740106T020000
-RDATE:19740106T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Indiana/Vevay.ics b/libical/zoneinfo/America/Indiana/Vevay.ics
deleted file mode 100644
index 721c5d5d1b..0000000000
--- a/libical/zoneinfo/America/Indiana/Vevay.ics
+++ /dev/null
@@ -1,81 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Indiana/Vevay
-X-LIC-LOCATION:America/Indiana/Vevay
-BEGIN:STANDARD
-TZOFFSETFROM:-0540
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19540425T020000
-RDATE:19540425T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19690101T000000
-RDATE:19690101T000000
-RDATE:19730101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Indianapolis.ics b/libical/zoneinfo/America/Indianapolis.ics
deleted file mode 100644
index 649dddbfec..0000000000
--- a/libical/zoneinfo/America/Indianapolis.ics
+++ /dev/null
@@ -1,108 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Indianapolis
-X-LIC-LOCATION:America/Indianapolis
-BEGIN:STANDARD
-TZOFFSETFROM:-0545
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19410622T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19410928T020000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19570929T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19550424T020000
-RDATE:19550424T020000
-RDATE:19580427T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19690101T000000
-RDATE:19690101T000000
-RDATE:19710101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Inuvik.ics b/libical/zoneinfo/America/Inuvik.ics
deleted file mode 100644
index 308a875b38..0000000000
--- a/libical/zoneinfo/America/Inuvik.ics
+++ /dev/null
@@ -1,87 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Inuvik
-X-LIC-LOCATION:America/Inuvik
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19801026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0854
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0600
-TZNAME:PDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19790429T020000
-RDATE:19790429T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19800427T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Iqaluit.ics b/libical/zoneinfo/America/Iqaluit.ics
deleted file mode 100644
index 6e50a683f0..0000000000
--- a/libical/zoneinfo/America/Iqaluit.ics
+++ /dev/null
@@ -1,127 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Iqaluit
-X-LIC-LOCATION:America/Iqaluit
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:20010401T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20011028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0434
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T020000
-RDATE:19880403T020000
-RDATE:19890402T020000
-RDATE:19900401T020000
-RDATE:19910407T020000
-RDATE:19920405T020000
-RDATE:19930404T020000
-RDATE:19940403T020000
-RDATE:19950402T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0300
-TZNAME:EDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19991031T020000
-RDATE:19991031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20000402T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20001029T020000
-RDATE:20001029T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Jamaica.ics b/libical/zoneinfo/America/Jamaica.ics
deleted file mode 100644
index 6588151af4..0000000000
--- a/libical/zoneinfo/America/Jamaica.ics
+++ /dev/null
@@ -1,61 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Jamaica
-X-LIC-LOCATION:America/Jamaica
-BEGIN:STANDARD
-TZOFFSETFROM:-0507
-TZOFFSETTO:-0507
-TZNAME:KMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0507
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19120201T000000
-RDATE:19120201T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19740428T020000
-RDATE:19740428T020000
-RDATE:19741027T020000
-RDATE:19840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19750223T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19751026T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Jujuy.ics b/libical/zoneinfo/America/Jujuy.ics
deleted file mode 100644
index 823f0f087e..0000000000
--- a/libical/zoneinfo/America/Jujuy.ics
+++ /dev/null
@@ -1,148 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Jujuy
-X-LIC-LOCATION:America/Jujuy
-BEGIN:STANDARD
-TZOFFSETFROM:-0421
-TZOFFSETTO:-0417
-TZNAME:CMT
-DTSTART:18941101T000000
-RDATE:18941101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19301201T000000
-RDATE:19301201T000000
-RDATE:19311015T000000
-RDATE:19321101T000000
-RDATE:19331101T000000
-RDATE:19341101T000000
-RDATE:19351101T000000
-RDATE:19361101T000000
-RDATE:19371101T000000
-RDATE:19381101T000000
-RDATE:19391101T000000
-RDATE:19400701T000000
-RDATE:19411015T000000
-RDATE:19431015T000000
-RDATE:19461001T000000
-RDATE:19631215T000000
-RDATE:19641015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19320301T000000
-RDATE:19330301T000000
-RDATE:19340301T000000
-RDATE:19350301T000000
-RDATE:19360301T000000
-RDATE:19370301T000000
-RDATE:19380301T000000
-RDATE:19390301T000000
-RDATE:19400301T000000
-RDATE:19410615T000000
-RDATE:19430801T000000
-RDATE:19460301T000000
-RDATE:19631001T000000
-RDATE:19640301T000000
-RDATE:19650301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-RDATE:19921018T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881201T000000
-RDATE:19891015T000000
-RDATE:19901021T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-RDATE:19860314T000000
-RDATE:19870213T000000
-RDATE:19880207T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0400
-TZNAME:WART
-DTSTART:19910303T000000
-RDATE:19910303T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:WARST
-DTSTART:19911006T000000
-RDATE:19911006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:WART
-DTSTART:19920315T000000
-RDATE:19920315T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19991003T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:20000303T000000
-RDATE:20000303T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Juneau.ics b/libical/zoneinfo/America/Juneau.ics
deleted file mode 100644
index 4724bcb77a..0000000000
--- a/libical/zoneinfo/America/Juneau.ics
+++ /dev/null
@@ -1,117 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Juneau
-X-LIC-LOCATION:America/Juneau
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19841028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1502
-TZOFFSETTO:-0858
-TZNAME:LMT
-DTSTART:18671018T000000
-RDATE:18671018T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0858
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19000820T120000
-RDATE:19000820T120000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19420101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19690101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:PPT
-DTSTART:19450814T160000
-RDATE:19450814T160000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19831030T020000
-RDATE:19831030T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19840429T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Kentucky/Louisville.ics b/libical/zoneinfo/America/Kentucky/Louisville.ics
deleted file mode 100644
index 0ffdcc655f..0000000000
--- a/libical/zoneinfo/America/Kentucky/Louisville.ics
+++ /dev/null
@@ -1,153 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Kentucky/Louisville
-X-LIC-LOCATION:America/Kentucky/Louisville
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19751026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0543
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19210501T020000
-RDATE:19410427T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19210901T020000
-RDATE:19410928T020000
-RDATE:19450930T020000
-RDATE:19460602T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19561028T020000
-RDATE:19571027T020000
-RDATE:19581026T020000
-RDATE:19591025T020000
-RDATE:19601030T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19210101T000000
-RDATE:19210101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19480425T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19740106T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19610723T020000
-RDATE:19610723T020000
-RDATE:19680101T000000
-RDATE:19741027T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19680428T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19681027T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Kentucky/Monticello.ics b/libical/zoneinfo/America/Kentucky/Monticello.ics
deleted file mode 100644
index c2f49e9b63..0000000000
--- a/libical/zoneinfo/America/Kentucky/Monticello.ics
+++ /dev/null
@@ -1,140 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Kentucky/Monticello
-X-LIC-LOCATION:America/Kentucky/Monticello
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:20010401T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20011028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0539
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T020000
-RDATE:19880403T020000
-RDATE:19890402T020000
-RDATE:19900401T020000
-RDATE:19910407T020000
-RDATE:19920405T020000
-RDATE:19930404T020000
-RDATE:19940403T020000
-RDATE:19950402T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19450930T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19460101T000000
-RDATE:19460101T000000
-RDATE:19680101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20001029T020000
-RDATE:20001029T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/La_Paz.ics b/libical/zoneinfo/America/La_Paz.ics
deleted file mode 100644
index a713fc6fc5..0000000000
--- a/libical/zoneinfo/America/La_Paz.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/La_Paz
-X-LIC-LOCATION:America/La_Paz
-BEGIN:STANDARD
-TZOFFSETFROM:-0433
-TZOFFSETTO:-0433
-TZNAME:LPMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0433
-TZOFFSETTO:-0333
-TZNAME:BOST
-DTSTART:19311015T000000
-RDATE:19311015T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0333
-TZOFFSETTO:-0400
-TZNAME:BOT
-DTSTART:19320321T000000
-RDATE:19320321T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Lima.ics b/libical/zoneinfo/America/Lima.ics
deleted file mode 100644
index afb1f2244e..0000000000
--- a/libical/zoneinfo/America/Lima.ics
+++ /dev/null
@@ -1,46 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Lima
-X-LIC-LOCATION:America/Lima
-BEGIN:STANDARD
-TZOFFSETFROM:-0508
-TZOFFSETTO:-0509
-TZNAME:LMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0509
-TZOFFSETTO:-0500
-TZNAME:PET
-DTSTART:19080728T000000
-RDATE:19080728T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:PEST
-DTSTART:19380101T000000
-RDATE:19380101T000000
-RDATE:19380925T000000
-RDATE:19390924T000000
-RDATE:19870101T000000
-RDATE:19900101T000000
-RDATE:19940101T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:PET
-DTSTART:19380401T000000
-RDATE:19380401T000000
-RDATE:19390326T000000
-RDATE:19400324T000000
-RDATE:19870401T000000
-RDATE:19900401T000000
-RDATE:19940401T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Los_Angeles.ics b/libical/zoneinfo/America/Los_Angeles.ics
deleted file mode 100644
index 6a92d66dbf..0000000000
--- a/libical/zoneinfo/America/Los_Angeles.ics
+++ /dev/null
@@ -1,119 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Los_Angeles
-X-LIC-LOCATION:America/Los_Angeles
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19621028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0753
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19480314T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19450930T020000
-RDATE:19490101T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19600925T020000
-RDATE:19610924T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:PPT
-DTSTART:19450814T160000
-RDATE:19450814T160000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19460101T000000
-RDATE:19460101T000000
-RDATE:19670101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Louisville.ics b/libical/zoneinfo/America/Louisville.ics
deleted file mode 100644
index 9f36ef0768..0000000000
--- a/libical/zoneinfo/America/Louisville.ics
+++ /dev/null
@@ -1,153 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Louisville
-X-LIC-LOCATION:America/Louisville
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19751026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0543
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19210501T020000
-RDATE:19410427T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19210901T020000
-RDATE:19410928T020000
-RDATE:19450930T020000
-RDATE:19460602T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19561028T020000
-RDATE:19571027T020000
-RDATE:19581026T020000
-RDATE:19591025T020000
-RDATE:19601030T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19210101T000000
-RDATE:19210101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19480425T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19740106T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19610723T020000
-RDATE:19610723T020000
-RDATE:19680101T000000
-RDATE:19741027T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19680428T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19681027T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Maceio.ics b/libical/zoneinfo/America/Maceio.ics
deleted file mode 100644
index afa940a628..0000000000
--- a/libical/zoneinfo/America/Maceio.ics
+++ /dev/null
@@ -1,75 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Maceio
-X-LIC-LOCATION:America/Maceio
-BEGIN:STANDARD
-TZOFFSETFROM:-0223
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-RDATE:19951015T000000
-RDATE:19991003T000000
-RDATE:20001008T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-RDATE:19960211T000000
-RDATE:20000227T000000
-RDATE:20001022T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19900917T000000
-RDATE:19900917T000000
-RDATE:19951013T000000
-RDATE:19960904T000000
-RDATE:19990930T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Managua.ics b/libical/zoneinfo/America/Managua.ics
deleted file mode 100644
index 2021d4b9e7..0000000000
--- a/libical/zoneinfo/America/Managua.ics
+++ /dev/null
@@ -1,50 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Managua
-X-LIC-LOCATION:America/Managua
-BEGIN:STANDARD
-TZOFFSETFROM:-0545
-TZOFFSETTO:-0545
-TZNAME:MMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0545
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19340623T000000
-RDATE:19340623T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19730501T000000
-RDATE:19730501T000000
-RDATE:19930101T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19750216T000000
-RDATE:19750216T000000
-RDATE:19790625T000000
-RDATE:19800623T000000
-RDATE:19920924T000000
-RDATE:19981201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19790318T000000
-RDATE:19790318T000000
-RDATE:19800316T000000
-RDATE:19920101T040000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Manaus.ics b/libical/zoneinfo/America/Manaus.ics
deleted file mode 100644
index fa53698fbe..0000000000
--- a/libical/zoneinfo/America/Manaus.ics
+++ /dev/null
@@ -1,60 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Manaus
-X-LIC-LOCATION:America/Manaus
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-RDATE:19880912T000000
-RDATE:19930928T000000
-RDATE:19940922T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AMST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19931017T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19940220T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Martinique.ics b/libical/zoneinfo/America/Martinique.ics
deleted file mode 100644
index 37c9a69860..0000000000
--- a/libical/zoneinfo/America/Martinique.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Martinique
-X-LIC-LOCATION:America/Martinique
-BEGIN:STANDARD
-TZOFFSETFROM:-0404
-TZOFFSETTO:-0404
-TZNAME:FFMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0404
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110501T000000
-RDATE:19110501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19800406T000000
-RDATE:19800406T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19800928T000000
-RDATE:19800928T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Mazatlan.ics b/libical/zoneinfo/America/Mazatlan.ics
deleted file mode 100644
index fbce907017..0000000000
--- a/libical/zoneinfo/America/Mazatlan.ics
+++ /dev/null
@@ -1,77 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Mazatlan
-X-LIC-LOCATION:America/Mazatlan
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:20010506T020000
-RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:20010930T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0706
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19211231T235420
-RDATE:19211231T235420
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19270610T230000
-RDATE:19270610T230000
-RDATE:19310501T230000
-RDATE:19320401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19301115T000000
-RDATE:19301115T000000
-RDATE:19311001T000000
-RDATE:19420424T000000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19490114T000000
-RDATE:19490114T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19700101T000000
-RDATE:19700101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19960407T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Mendoza.ics b/libical/zoneinfo/America/Mendoza.ics
deleted file mode 100644
index d5a10583cf..0000000000
--- a/libical/zoneinfo/America/Mendoza.ics
+++ /dev/null
@@ -1,148 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Mendoza
-X-LIC-LOCATION:America/Mendoza
-BEGIN:STANDARD
-TZOFFSETFROM:-0435
-TZOFFSETTO:-0417
-TZNAME:CMT
-DTSTART:18941101T000000
-RDATE:18941101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19301201T000000
-RDATE:19301201T000000
-RDATE:19311015T000000
-RDATE:19321101T000000
-RDATE:19331101T000000
-RDATE:19341101T000000
-RDATE:19351101T000000
-RDATE:19361101T000000
-RDATE:19371101T000000
-RDATE:19381101T000000
-RDATE:19391101T000000
-RDATE:19400701T000000
-RDATE:19411015T000000
-RDATE:19431015T000000
-RDATE:19461001T000000
-RDATE:19631215T000000
-RDATE:19641015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19320301T000000
-RDATE:19330301T000000
-RDATE:19340301T000000
-RDATE:19350301T000000
-RDATE:19360301T000000
-RDATE:19370301T000000
-RDATE:19380301T000000
-RDATE:19390301T000000
-RDATE:19400301T000000
-RDATE:19410615T000000
-RDATE:19430801T000000
-RDATE:19460301T000000
-RDATE:19631001T000000
-RDATE:19640301T000000
-RDATE:19650301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-RDATE:19921018T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881201T000000
-RDATE:19891015T000000
-RDATE:19901021T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-RDATE:19860314T000000
-RDATE:19870213T000000
-RDATE:19880207T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0400
-TZNAME:WART
-DTSTART:19910303T000000
-RDATE:19910303T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:WARST
-DTSTART:19911015T000000
-RDATE:19911015T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:WART
-DTSTART:19920301T000000
-RDATE:19920301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19991003T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:20000303T000000
-RDATE:20000303T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Menominee.ics b/libical/zoneinfo/America/Menominee.ics
deleted file mode 100644
index a65124d19d..0000000000
--- a/libical/zoneinfo/America/Menominee.ics
+++ /dev/null
@@ -1,98 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Menominee
-X-LIC-LOCATION:America/Menominee
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19731028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0550
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18850918T120000
-RDATE:18850918T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19460428T020000
-RDATE:19660424T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19661030T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CPT
-DTSTART:19450814T180000
-RDATE:19450814T180000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19460101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19690427T020000
-RDATE:19690427T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19730429T020000
-RDATE:19730429T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Merida.ics b/libical/zoneinfo/America/Merida.ics
deleted file mode 100644
index 042aac0d76..0000000000
--- a/libical/zoneinfo/America/Merida.ics
+++ /dev/null
@@ -1,59 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Merida
-X-LIC-LOCATION:America/Merida
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20010506T020000
-RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20010930T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0558
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19220101T000132
-RDATE:19220101T000132
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19811223T000000
-RDATE:19811223T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19821202T000000
-RDATE:19821202T000000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19960407T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Mexico_City.ics b/libical/zoneinfo/America/Mexico_City.ics
deleted file mode 100644
index c1a8c25230..0000000000
--- a/libical/zoneinfo/America/Mexico_City.ics
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Mexico_City
-X-LIC-LOCATION:America/Mexico_City
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20010506T020000
-RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20010930T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0637
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19220101T002324
-RDATE:19220101T002324
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19270610T230000
-RDATE:19270610T230000
-RDATE:19310501T230000
-RDATE:19320401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19301115T000000
-RDATE:19301115T000000
-RDATE:19311001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19390205T000000
-RDATE:19390205T000000
-RDATE:19401209T000000
-RDATE:19500212T000000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19390625T000000
-RDATE:19390625T000000
-RDATE:19410401T000000
-RDATE:19440501T000000
-RDATE:19500730T000000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19431216T000000
-RDATE:19431216T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Miquelon.ics b/libical/zoneinfo/America/Miquelon.ics
deleted file mode 100644
index cc2f5b5b70..0000000000
--- a/libical/zoneinfo/America/Miquelon.ics
+++ /dev/null
@@ -1,55 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Miquelon
-X-LIC-LOCATION:America/Miquelon
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:PMST
-DTSTART:19811025T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:PMDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0345
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110515T000000
-RDATE:19110515T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:PMST
-DTSTART:19800501T000000
-RDATE:19800501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:PMST
-DTSTART:19801026T020000
-RDATE:19801026T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:PMDT
-DTSTART:19810426T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Monterrey.ics b/libical/zoneinfo/America/Monterrey.ics
deleted file mode 100644
index e70d3398cc..0000000000
--- a/libical/zoneinfo/America/Monterrey.ics
+++ /dev/null
@@ -1,61 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Monterrey
-X-LIC-LOCATION:America/Monterrey
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20010506T020000
-RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20010930T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0641
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19211231T231844
-RDATE:19211231T231844
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19880101T000000
-RDATE:19880101T000000
-RDATE:19890101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19880403T020000
-RDATE:19880403T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19881030T020000
-RDATE:19881030T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20001029T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Montevideo.ics b/libical/zoneinfo/America/Montevideo.ics
deleted file mode 100644
index 5bf4adc20e..0000000000
--- a/libical/zoneinfo/America/Montevideo.ics
+++ /dev/null
@@ -1,133 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Montevideo
-X-LIC-LOCATION:America/Montevideo
-BEGIN:STANDARD
-TZOFFSETFROM:-0345
-TZOFFSETTO:-0345
-TZNAME:MMT
-DTSTART:18980628T000000
-RDATE:18980628T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0345
-TZOFFSETTO:-0330
-TZNAME:UYT
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0300
-TZNAME:UYHST
-DTSTART:19231002T000000
-RDATE:19231002T000000
-RDATE:19241001T000000
-RDATE:19251001T000000
-RDATE:19331029T000000
-RDATE:19341028T000000
-RDATE:19351027T000000
-RDATE:19361101T000000
-RDATE:19371031T000000
-RDATE:19381030T000000
-RDATE:19391029T000000
-RDATE:19401027T000000
-RDATE:19420101T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0330
-TZNAME:UYT
-DTSTART:19240401T000000
-RDATE:19240401T000000
-RDATE:19250401T000000
-RDATE:19260401T000000
-RDATE:19340401T000000
-RDATE:19350331T000000
-RDATE:19360329T000000
-RDATE:19370328T000000
-RDATE:19380327T000000
-RDATE:19390326T000000
-RDATE:19400331T000000
-RDATE:19410330T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0330
-TZNAME:UYT
-DTSTART:19410801T000000
-RDATE:19410801T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:UYST
-DTSTART:19421214T000000
-RDATE:19421214T000000
-RDATE:19590524T000000
-RDATE:19600117T000000
-RDATE:19650404T000000
-RDATE:19660403T000000
-RDATE:19670402T000000
-RDATE:19720424T000000
-RDATE:19771204T000000
-RDATE:19791001T000000
-RDATE:19871214T000000
-RDATE:19881211T000000
-RDATE:19891029T000000
-RDATE:19901021T000000
-RDATE:19911027T000000
-RDATE:19921018T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:UYT
-DTSTART:19430314T000000
-RDATE:19430314T000000
-RDATE:19591115T000000
-RDATE:19600306T000000
-RDATE:19650926T000000
-RDATE:19661031T000000
-RDATE:19671031T000000
-RDATE:19720815T000000
-RDATE:19761001T000000
-RDATE:19780401T000000
-RDATE:19800501T000000
-RDATE:19880314T000000
-RDATE:19890312T000000
-RDATE:19900304T000000
-RDATE:19910303T000000
-RDATE:19920301T000000
-RDATE:19930228T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0230
-TZNAME:UYHST
-DTSTART:19680527T000000
-RDATE:19680527T000000
-RDATE:19690527T000000
-RDATE:19700527T000000
-RDATE:19740310T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0230
-TZOFFSETTO:-0300
-TZNAME:UYT
-DTSTART:19681202T000000
-RDATE:19681202T000000
-RDATE:19691202T000000
-RDATE:19701202T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0230
-TZOFFSETTO:-0200
-TZNAME:UYST
-DTSTART:19741222T000000
-RDATE:19741222T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Montreal.ics b/libical/zoneinfo/America/Montreal.ics
deleted file mode 100644
index 5f0e1ba454..0000000000
--- a/libical/zoneinfo/America/Montreal.ics
+++ /dev/null
@@ -1,139 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Montreal
-X-LIC-LOCATION:America/Montreal
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19571027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0454
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19180414T020000
-RDATE:19190331T023000
-RDATE:19200502T023000
-RDATE:19210501T020000
-RDATE:19220430T020000
-RDATE:19240517T020000
-RDATE:19250503T020000
-RDATE:19260502T020000
-RDATE:19270501T000000
-RDATE:19280429T000000
-RDATE:19290428T000000
-RDATE:19300427T000000
-RDATE:19310426T000000
-RDATE:19320501T000000
-RDATE:19330430T000000
-RDATE:19340429T000000
-RDATE:19350428T000000
-RDATE:19360426T000000
-RDATE:19370425T000000
-RDATE:19380424T000000
-RDATE:19390430T000000
-RDATE:19400428T000000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19170424T000000
-RDATE:19170424T000000
-RDATE:19181031T020000
-RDATE:19191025T023000
-RDATE:19201003T023000
-RDATE:19211002T023000
-RDATE:19221001T023000
-RDATE:19240928T023000
-RDATE:19250927T023000
-RDATE:19260926T023000
-RDATE:19270925T000000
-RDATE:19280930T000000
-RDATE:19290929T000000
-RDATE:19300928T000000
-RDATE:19310927T000000
-RDATE:19320925T000000
-RDATE:19331001T000000
-RDATE:19340930T000000
-RDATE:19350929T000000
-RDATE:19360927T000000
-RDATE:19370926T000000
-RDATE:19380925T000000
-RDATE:19390924T000000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19491030T020000
-RDATE:19501029T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Montserrat.ics b/libical/zoneinfo/America/Montserrat.ics
deleted file mode 100644
index c5734bc141..0000000000
--- a/libical/zoneinfo/America/Montserrat.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Montserrat
-X-LIC-LOCATION:America/Montserrat
-BEGIN:STANDARD
-TZOFFSETFROM:-0409
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110701T000100
-RDATE:19110701T000100
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Nassau.ics b/libical/zoneinfo/America/Nassau.ics
deleted file mode 100644
index 46a8130bfb..0000000000
--- a/libical/zoneinfo/America/Nassau.ics
+++ /dev/null
@@ -1,58 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Nassau
-X-LIC-LOCATION:America/Nassau
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19641025T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0509
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19120302T000000
-RDATE:19120302T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19640426T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/New_York.ics b/libical/zoneinfo/America/New_York.ics
deleted file mode 100644
index 4f555b2f82..0000000000
--- a/libical/zoneinfo/America/New_York.ics
+++ /dev/null
@@ -1,164 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/New_York
-X-LIC-LOCATION:America/New_York
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19551030T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0456
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210424T020000
-RDATE:19220430T020000
-RDATE:19230429T020000
-RDATE:19240427T020000
-RDATE:19250426T020000
-RDATE:19260425T020000
-RDATE:19270424T020000
-RDATE:19280429T020000
-RDATE:19290428T020000
-RDATE:19300427T020000
-RDATE:19310426T020000
-RDATE:19320424T020000
-RDATE:19330430T020000
-RDATE:19340429T020000
-RDATE:19350428T020000
-RDATE:19360426T020000
-RDATE:19370425T020000
-RDATE:19380424T020000
-RDATE:19390430T020000
-RDATE:19400428T020000
-RDATE:19410427T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19201031T020000
-RDATE:19210925T020000
-RDATE:19220924T020000
-RDATE:19230930T020000
-RDATE:19240928T020000
-RDATE:19250927T020000
-RDATE:19260926T020000
-RDATE:19270925T020000
-RDATE:19280930T020000
-RDATE:19290929T020000
-RDATE:19300928T020000
-RDATE:19310927T020000
-RDATE:19320925T020000
-RDATE:19330924T020000
-RDATE:19340930T020000
-RDATE:19350929T020000
-RDATE:19360927T020000
-RDATE:19370926T020000
-RDATE:19380925T020000
-RDATE:19390924T020000
-RDATE:19400929T020000
-RDATE:19410928T020000
-RDATE:19450930T020000
-RDATE:19460929T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19670101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:EPT
-DTSTART:19450814T190000
-RDATE:19450814T190000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Nipigon.ics b/libical/zoneinfo/America/Nipigon.ics
deleted file mode 100644
index 6a4e2faf62..0000000000
--- a/libical/zoneinfo/America/Nipigon.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Nipigon
-X-LIC-LOCATION:America/Nipigon
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19741027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0553
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Nome.ics b/libical/zoneinfo/America/Nome.ics
deleted file mode 100644
index cc946a48d4..0000000000
--- a/libical/zoneinfo/America/Nome.ics
+++ /dev/null
@@ -1,130 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Nome
-X-LIC-LOCATION:America/Nome
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19841028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1258
-TZOFFSETTO:-1102
-TZNAME:LMT
-DTSTART:18671018T000000
-RDATE:18671018T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1102
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19000820T120000
-RDATE:19000820T120000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19420101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1000
-TZNAME:NWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1000
-TZNAME:NPT
-DTSTART:19450814T130000
-RDATE:19450814T130000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:BST
-DTSTART:19670401T000000
-RDATE:19670401T000000
-RDATE:19690101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1000
-TZNAME:BDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1100
-TZNAME:BST
-DTSTART:19691026T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19831030T020000
-RDATE:19831030T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19840429T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Noronha.ics b/libical/zoneinfo/America/Noronha.ics
deleted file mode 100644
index a651399dab..0000000000
--- a/libical/zoneinfo/America/Noronha.ics
+++ /dev/null
@@ -1,66 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Noronha
-X-LIC-LOCATION:America/Noronha
-BEGIN:STANDARD
-TZOFFSETFROM:-0210
-TZOFFSETTO:-0200
-TZNAME:FNT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0100
-TZNAME:FNST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:-0200
-TZNAME:FNT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0200
-TZNAME:FNT
-DTSTART:19900917T000000
-RDATE:19900917T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Panama.ics b/libical/zoneinfo/America/Panama.ics
deleted file mode 100644
index 96c458ac26..0000000000
--- a/libical/zoneinfo/America/Panama.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Panama
-X-LIC-LOCATION:America/Panama
-BEGIN:STANDARD
-TZOFFSETFROM:-0518
-TZOFFSETTO:-0520
-TZNAME:PMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0520
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19080422T000000
-RDATE:19080422T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Pangnirtung.ics b/libical/zoneinfo/America/Pangnirtung.ics
deleted file mode 100644
index 70f6eec364..0000000000
--- a/libical/zoneinfo/America/Pangnirtung.ics
+++ /dev/null
@@ -1,145 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Pangnirtung
-X-LIC-LOCATION:America/Pangnirtung
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:20010401T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20011028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0423
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T020000
-RDATE:19880403T020000
-RDATE:19890402T020000
-RDATE:19900401T020000
-RDATE:19910407T020000
-RDATE:19920405T020000
-RDATE:19930404T020000
-RDATE:19940403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0200
-TZNAME:ADDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19950402T020000
-RDATE:19950402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19951029T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19960407T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19991031T020000
-RDATE:19991031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20000402T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20001029T020000
-RDATE:20001029T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Paramaribo.ics b/libical/zoneinfo/America/Paramaribo.ics
deleted file mode 100644
index 8de7f644fc..0000000000
--- a/libical/zoneinfo/America/Paramaribo.ics
+++ /dev/null
@@ -1,37 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Paramaribo
-X-LIC-LOCATION:America/Paramaribo
-BEGIN:STANDARD
-TZOFFSETFROM:-0341
-TZOFFSETTO:-0341
-TZNAME:PMT
-DTSTART:19110101T000000
-RDATE:19110101T000000
-RDATE:19350101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0341
-TZOFFSETTO:-0330
-TZNAME:NEGT
-DTSTART:19451001T000000
-RDATE:19451001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0330
-TZNAME:SRT
-DTSTART:19751120T000000
-RDATE:19751120T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0300
-TZNAME:SRT
-DTSTART:19841001T000000
-RDATE:19841001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Phoenix.ics b/libical/zoneinfo/America/Phoenix.ics
deleted file mode 100644
index 142d3eb44c..0000000000
--- a/libical/zoneinfo/America/Phoenix.ics
+++ /dev/null
@@ -1,51 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Phoenix
-X-LIC-LOCATION:America/Phoenix
-BEGIN:STANDARD
-TZOFFSETFROM:-0728
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19670430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19440101T000100
-RDATE:19671029T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19440317T000100
-RDATE:19440317T000100
-RDATE:19441001T000100
-RDATE:19670101T000000
-RDATE:19680101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Port-au-Prince.ics b/libical/zoneinfo/America/Port-au-Prince.ics
deleted file mode 100644
index 1247808003..0000000000
--- a/libical/zoneinfo/America/Port-au-Prince.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Port-au-Prince
-X-LIC-LOCATION:America/Port-au-Prince
-BEGIN:STANDARD
-TZOFFSETFROM:-0449
-TZOFFSETTO:-0449
-TZNAME:PPMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0449
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19170124T120000
-RDATE:19170124T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19830508T000000
-RDATE:19830508T000000
-RDATE:19840429T000000
-RDATE:19850428T000000
-RDATE:19860427T000000
-RDATE:19870426T000000
-RDATE:19880403T010000
-RDATE:19890402T010000
-RDATE:19900401T010000
-RDATE:19910407T010000
-RDATE:19920405T010000
-RDATE:19930404T010000
-RDATE:19940403T010000
-RDATE:19950402T010000
-RDATE:19960407T010000
-RDATE:19970406T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19831030T000000
-RDATE:19831030T000000
-RDATE:19841028T000000
-RDATE:19851027T000000
-RDATE:19861026T000000
-RDATE:19871025T000000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Port_of_Spain.ics b/libical/zoneinfo/America/Port_of_Spain.ics
deleted file mode 100644
index 299a2d52f8..0000000000
--- a/libical/zoneinfo/America/Port_of_Spain.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Port_of_Spain
-X-LIC-LOCATION:America/Port_of_Spain
-BEGIN:STANDARD
-TZOFFSETFROM:-0406
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19120302T000000
-RDATE:19120302T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Porto_Velho.ics b/libical/zoneinfo/America/Porto_Velho.ics
deleted file mode 100644
index 5a98dd333f..0000000000
--- a/libical/zoneinfo/America/Porto_Velho.ics
+++ /dev/null
@@ -1,62 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Porto_Velho
-X-LIC-LOCATION:America/Porto_Velho
-BEGIN:STANDARD
-TZOFFSETFROM:-0416
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AMST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:AMT
-DTSTART:19880912T000000
-RDATE:19880912T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Puerto_Rico.ics b/libical/zoneinfo/America/Puerto_Rico.ics
deleted file mode 100644
index 810d470747..0000000000
--- a/libical/zoneinfo/America/Puerto_Rico.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Puerto_Rico
-X-LIC-LOCATION:America/Puerto_Rico
-BEGIN:STANDARD
-TZOFFSETFROM:-0424
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:18990328T120000
-RDATE:18990328T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:AWT
-DTSTART:19420503T000000
-RDATE:19420503T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Rainy_River.ics b/libical/zoneinfo/America/Rainy_River.ics
deleted file mode 100644
index c45cbe4d00..0000000000
--- a/libical/zoneinfo/America/Rainy_River.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Rainy_River
-X-LIC-LOCATION:America/Rainy_River
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19741027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0618
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Rankin_Inlet.ics b/libical/zoneinfo/America/Rankin_Inlet.ics
deleted file mode 100644
index 2ebb9adcfa..0000000000
--- a/libical/zoneinfo/America/Rankin_Inlet.ics
+++ /dev/null
@@ -1,123 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Rankin_Inlet
-X-LIC-LOCATION:America/Rankin_Inlet
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:20020407T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20021027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0609
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T020000
-RDATE:19880403T020000
-RDATE:19890402T020000
-RDATE:19900401T020000
-RDATE:19910407T020000
-RDATE:19920405T020000
-RDATE:19930404T020000
-RDATE:19940403T020000
-RDATE:19950402T020000
-RDATE:19960407T020000
-RDATE:19970406T020000
-RDATE:19980405T020000
-RDATE:19990404T020000
-RDATE:20000402T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20010401T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0400
-TZNAME:CDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:20001029T020000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:20011028T020000
-RDATE:20011028T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Recife.ics b/libical/zoneinfo/America/Recife.ics
deleted file mode 100644
index 9765636487..0000000000
--- a/libical/zoneinfo/America/Recife.ics
+++ /dev/null
@@ -1,71 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Recife
-X-LIC-LOCATION:America/Recife
-BEGIN:STANDARD
-TZOFFSETFROM:-0220
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-RDATE:19991003T000000
-RDATE:20001008T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-RDATE:20000227T000000
-RDATE:20001015T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19900917T000000
-RDATE:19900917T000000
-RDATE:19990930T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Regina.ics b/libical/zoneinfo/America/Regina.ics
deleted file mode 100644
index 2b5eb4a344..0000000000
--- a/libical/zoneinfo/America/Regina.ics
+++ /dev/null
@@ -1,92 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Regina
-X-LIC-LOCATION:America/Regina
-BEGIN:STANDARD
-TZOFFSETFROM:-0659
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19050901T000000
-RDATE:19050901T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19300504T000000
-RDATE:19310503T000000
-RDATE:19320501T000000
-RDATE:19330507T000000
-RDATE:19340506T000000
-RDATE:19370411T000000
-RDATE:19380410T000000
-RDATE:19390409T000000
-RDATE:19400414T000000
-RDATE:19410413T000000
-RDATE:19460414T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19301005T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19331001T000000
-RDATE:19341007T000000
-RDATE:19371010T000000
-RDATE:19381002T000000
-RDATE:19391008T000000
-RDATE:19401013T000000
-RDATE:19411012T000000
-RDATE:19450930T020000
-RDATE:19461013T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19591025T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19600424T020000
-RDATE:19600424T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Rio_Branco.ics b/libical/zoneinfo/America/Rio_Branco.ics
deleted file mode 100644
index 3b3a06a10d..0000000000
--- a/libical/zoneinfo/America/Rio_Branco.ics
+++ /dev/null
@@ -1,62 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Rio_Branco
-X-LIC-LOCATION:America/Rio_Branco
-BEGIN:STANDARD
-TZOFFSETFROM:-0431
-TZOFFSETTO:-0500
-TZNAME:ACT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:ACST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631209T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:ACT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640301T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:ACT
-DTSTART:19880912T000000
-RDATE:19880912T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Rosario.ics b/libical/zoneinfo/America/Rosario.ics
deleted file mode 100644
index d3d2820cc0..0000000000
--- a/libical/zoneinfo/America/Rosario.ics
+++ /dev/null
@@ -1,128 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Rosario
-X-LIC-LOCATION:America/Rosario
-BEGIN:STANDARD
-TZOFFSETFROM:-0403
-TZOFFSETTO:-0417
-TZNAME:CMT
-DTSTART:18941101T000000
-RDATE:18941101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0417
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19200501T000000
-RDATE:19200501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19301201T000000
-RDATE:19301201T000000
-RDATE:19311015T000000
-RDATE:19321101T000000
-RDATE:19331101T000000
-RDATE:19341101T000000
-RDATE:19351101T000000
-RDATE:19361101T000000
-RDATE:19371101T000000
-RDATE:19381101T000000
-RDATE:19391101T000000
-RDATE:19400701T000000
-RDATE:19411015T000000
-RDATE:19431015T000000
-RDATE:19461001T000000
-RDATE:19631215T000000
-RDATE:19641015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19320301T000000
-RDATE:19330301T000000
-RDATE:19340301T000000
-RDATE:19350301T000000
-RDATE:19360301T000000
-RDATE:19370301T000000
-RDATE:19380301T000000
-RDATE:19390301T000000
-RDATE:19400301T000000
-RDATE:19410615T000000
-RDATE:19430801T000000
-RDATE:19460301T000000
-RDATE:19631001T000000
-RDATE:19640301T000000
-RDATE:19650301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881201T000000
-RDATE:19891015T000000
-RDATE:19901021T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-RDATE:19860314T000000
-RDATE:19870213T000000
-RDATE:19880207T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-RDATE:19910303T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19910701T000000
-RDATE:19910701T000000
-RDATE:20000303T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19991003T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Santiago.ics b/libical/zoneinfo/America/Santiago.ics
deleted file mode 100644
index 79456ff357..0000000000
--- a/libical/zoneinfo/America/Santiago.ics
+++ /dev/null
@@ -1,145 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Santiago
-X-LIC-LOCATION:America/Santiago
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:CLST
-DTSTART:19991010T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=9,10,11,12,13,14,15;BYDAY=SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:CLT
-DTSTART:20000312T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=9,10,11,12,13,14,15;BYDAY=SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0443
-TZOFFSETTO:-0443
-TZNAME:SMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0443
-TZOFFSETTO:-0500
-TZNAME:CLT
-DTSTART:19100101T000000
-RDATE:19100101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:CLST
-DTSTART:19180901T000000
-RDATE:19180901T000000
-RDATE:19270901T000000
-RDATE:19280901T000000
-RDATE:19290901T000000
-RDATE:19300901T000000
-RDATE:19310901T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:CLT
-DTSTART:19190702T000000
-RDATE:19190702T000000
-RDATE:19280401T000000
-RDATE:19290401T000000
-RDATE:19300401T000000
-RDATE:19310401T000000
-RDATE:19320401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:CLT
-DTSTART:19320901T000000
-RDATE:19320901T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:CLST
-DTSTART:19661009T000000
-RDATE:19661009T000000
-RDATE:19671015T000000
-RDATE:19681013T000000
-RDATE:19691012T000000
-RDATE:19701011T000000
-RDATE:19711010T000000
-RDATE:19721015T000000
-RDATE:19731014T000000
-RDATE:19741013T000000
-RDATE:19751012T000000
-RDATE:19761010T000000
-RDATE:19771009T000000
-RDATE:19781015T000000
-RDATE:19791014T000000
-RDATE:19801012T000000
-RDATE:19811011T000000
-RDATE:19821010T000000
-RDATE:19831009T000000
-RDATE:19841014T000000
-RDATE:19851013T000000
-RDATE:19861012T000000
-RDATE:19871011T000000
-RDATE:19881009T000000
-RDATE:19891015T000000
-RDATE:19901014T000000
-RDATE:19911013T000000
-RDATE:19921011T000000
-RDATE:19931010T000000
-RDATE:19941009T000000
-RDATE:19951015T000000
-RDATE:19961013T000000
-RDATE:19971012T000000
-RDATE:19980927T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:CLT
-DTSTART:19670312T000000
-RDATE:19670312T000000
-RDATE:19680310T000000
-RDATE:19690309T000000
-RDATE:19700315T000000
-RDATE:19710314T000000
-RDATE:19720312T000000
-RDATE:19730311T000000
-RDATE:19740310T000000
-RDATE:19750309T000000
-RDATE:19760314T000000
-RDATE:19770313T000000
-RDATE:19780312T000000
-RDATE:19790311T000000
-RDATE:19800309T000000
-RDATE:19810315T000000
-RDATE:19820314T000000
-RDATE:19830313T000000
-RDATE:19840311T000000
-RDATE:19850310T000000
-RDATE:19860309T000000
-RDATE:19870315T000000
-RDATE:19880313T000000
-RDATE:19890312T000000
-RDATE:19900311T000000
-RDATE:19910310T000000
-RDATE:19920315T000000
-RDATE:19930314T000000
-RDATE:19940313T000000
-RDATE:19950312T000000
-RDATE:19960310T000000
-RDATE:19970309T000000
-RDATE:19980315T000000
-RDATE:19990404T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Santo_Domingo.ics b/libical/zoneinfo/America/Santo_Domingo.ics
deleted file mode 100644
index 0bc0803690..0000000000
--- a/libical/zoneinfo/America/Santo_Domingo.ics
+++ /dev/null
@@ -1,67 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Santo_Domingo
-X-LIC-LOCATION:America/Santo_Domingo
-BEGIN:STANDARD
-TZOFFSETFROM:-0440
-TZOFFSETTO:-0440
-TZNAME:SDMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0440
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19330401T120000
-RDATE:19330401T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19661030T000000
-RDATE:19661030T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19670228T000000
-RDATE:19670228T000000
-RDATE:20001029T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0430
-TZNAME:EHDT
-DTSTART:19691026T000000
-RDATE:19691026T000000
-RDATE:19701025T000000
-RDATE:19711031T000000
-RDATE:19721029T000000
-RDATE:19731028T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0430
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19700221T000000
-RDATE:19700221T000000
-RDATE:19710120T000000
-RDATE:19720121T000000
-RDATE:19730121T000000
-RDATE:19740121T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19741027T000000
-RDATE:19741027T000000
-RDATE:20001203T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Sao_Paulo.ics b/libical/zoneinfo/America/Sao_Paulo.ics
deleted file mode 100644
index 795d01289f..0000000000
--- a/libical/zoneinfo/America/Sao_Paulo.ics
+++ /dev/null
@@ -1,100 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Sao_Paulo
-X-LIC-LOCATION:America/Sao_Paulo
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:20001008T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=2SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:20010218T000000
-RRULE:FREQ=YEARLY;BYMONTH=2;BYDAY=3SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0306
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:BRST
-DTSTART:19311003T110000
-RDATE:19311003T110000
-RDATE:19321003T000000
-RDATE:19491201T000000
-RDATE:19501201T000000
-RDATE:19511201T000000
-RDATE:19521201T000000
-RDATE:19631023T000000
-RDATE:19650131T000000
-RDATE:19651201T000000
-RDATE:19661101T000000
-RDATE:19671101T000000
-RDATE:19851102T000000
-RDATE:19861025T000000
-RDATE:19871025T000000
-RDATE:19881016T000000
-RDATE:19891015T000000
-RDATE:19901021T000000
-RDATE:19911020T000000
-RDATE:19921025T000000
-RDATE:19931017T000000
-RDATE:19941016T000000
-RDATE:19951015T000000
-RDATE:19961006T000000
-RDATE:19971006T000000
-RDATE:19981011T000000
-RDATE:19991003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19320401T000000
-RDATE:19320401T000000
-RDATE:19330401T000000
-RDATE:19500416T010000
-RDATE:19510401T000000
-RDATE:19520401T000000
-RDATE:19530301T000000
-RDATE:19640101T000000
-RDATE:19650331T000000
-RDATE:19660301T000000
-RDATE:19670301T000000
-RDATE:19680301T000000
-RDATE:19860315T000000
-RDATE:19870214T000000
-RDATE:19880207T000000
-RDATE:19890129T000000
-RDATE:19900211T000000
-RDATE:19910217T000000
-RDATE:19920209T000000
-RDATE:19930131T000000
-RDATE:19940220T000000
-RDATE:19950219T000000
-RDATE:19960211T000000
-RDATE:19970216T000000
-RDATE:19980301T000000
-RDATE:19990221T000000
-RDATE:20000227T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:BRT
-DTSTART:19640301T000000
-RDATE:19640301T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Scoresbysund.ics b/libical/zoneinfo/America/Scoresbysund.ics
deleted file mode 100644
index 297c8543e3..0000000000
--- a/libical/zoneinfo/America/Scoresbysund.ics
+++ /dev/null
@@ -1,71 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Scoresbysund
-X-LIC-LOCATION:America/Scoresbysund
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:EGST
-DTSTART:19820328T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:EGT
-DTSTART:19961027T010000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0129
-TZOFFSETTO:-0200
-TZNAME:CGT
-DTSTART:19160728T000000
-RDATE:19160728T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0100
-TZNAME:CGST
-DTSTART:19800406T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:-0200
-TZNAME:CGT
-DTSTART:19800928T030000
-RDATE:19800928T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0200
-TZOFFSETTO:+0000
-TZNAME:EGST
-DTSTART:19810328T230000
-RDATE:19810328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:EGT
-DTSTART:19810927T010000
-RDATE:19810927T010000
-RDATE:19820926T010000
-RDATE:19830925T010000
-RDATE:19840930T010000
-RDATE:19850929T010000
-RDATE:19860928T010000
-RDATE:19870927T010000
-RDATE:19880925T010000
-RDATE:19890924T010000
-RDATE:19900930T010000
-RDATE:19910929T010000
-RDATE:19920927T010000
-RDATE:19930926T010000
-RDATE:19940925T010000
-RDATE:19950924T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Shiprock.ics b/libical/zoneinfo/America/Shiprock.ics
deleted file mode 100644
index 6bb1df4603..0000000000
--- a/libical/zoneinfo/America/Shiprock.ics
+++ /dev/null
@@ -1,90 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Shiprock
-X-LIC-LOCATION:America/Shiprock
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19651031T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:18831118T120000
-RDATE:18831118T120000
-RDATE:19200101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19670101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180331T020000
-RDATE:19180331T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210327T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191026T020000
-RDATE:19201031T020000
-RDATE:19210522T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0600
-TZNAME:MPT
-DTSTART:19450814T170000
-RDATE:19450814T170000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/St_Johns.ics b/libical/zoneinfo/America/St_Johns.ics
deleted file mode 100644
index 8eb699b7e7..0000000000
--- a/libical/zoneinfo/America/St_Johns.ics
+++ /dev/null
@@ -1,222 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/St_Johns
-X-LIC-LOCATION:America/St_Johns
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0230
-TZNAME:NDT
-DTSTART:19890402T000100
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0230
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19891029T000100
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0331
-TZOFFSETTO:-0331
-TZNAME:NST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0331
-TZOFFSETTO:-0231
-TZNAME:NDT
-DTSTART:19170408T020000
-RDATE:19170408T020000
-RDATE:19180414T020000
-RDATE:19190505T230000
-RDATE:19200502T230000
-RDATE:19210501T230000
-RDATE:19220507T230000
-RDATE:19230506T230000
-RDATE:19240504T230000
-RDATE:19250503T230000
-RDATE:19260502T230000
-RDATE:19270501T230000
-RDATE:19280506T230000
-RDATE:19290505T230000
-RDATE:19300504T230000
-RDATE:19310503T230000
-RDATE:19320501T230000
-RDATE:19330507T230000
-RDATE:19340506T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0231
-TZOFFSETTO:-0331
-TZNAME:NST
-DTSTART:19170917T020000
-RDATE:19170917T020000
-RDATE:19181031T020000
-RDATE:19190812T230000
-RDATE:19201031T230000
-RDATE:19211030T230000
-RDATE:19221029T230000
-RDATE:19231028T230000
-RDATE:19241026T230000
-RDATE:19251025T230000
-RDATE:19261031T230000
-RDATE:19271030T230000
-RDATE:19281028T230000
-RDATE:19291027T230000
-RDATE:19301026T230000
-RDATE:19311025T230000
-RDATE:19321030T230000
-RDATE:19331029T230000
-RDATE:19341028T230000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0331
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19350330T000000
-RDATE:19350330T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0230
-TZNAME:NDT
-DTSTART:19350505T230000
-RDATE:19350505T230000
-RDATE:19360510T000000
-RDATE:19370509T000000
-RDATE:19380508T000000
-RDATE:19390514T000000
-RDATE:19400512T000000
-RDATE:19410511T000000
-RDATE:19460512T020000
-RDATE:19470511T020000
-RDATE:19480509T020000
-RDATE:19490508T020000
-RDATE:19500514T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-RDATE:19870405T000100
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0230
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19351027T230000
-RDATE:19351027T230000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391001T000000
-RDATE:19401006T000000
-RDATE:19411005T000000
-RDATE:19421231T000000
-RDATE:19430905T000000
-RDATE:19440902T000000
-RDATE:19451007T020000
-RDATE:19461006T020000
-RDATE:19471005T020000
-RDATE:19481003T020000
-RDATE:19491002T020000
-RDATE:19501008T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19601030T020000
-RDATE:19611029T020000
-RDATE:19621028T020000
-RDATE:19631027T020000
-RDATE:19641025T020000
-RDATE:19651031T020000
-RDATE:19661030T020000
-RDATE:19671029T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T000100
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0230
-TZNAME:NWT
-DTSTART:19420301T000000
-RDATE:19420301T000000
-RDATE:19430530T000000
-RDATE:19440710T000000
-RDATE:19450101T000000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0330
-TZOFFSETTO:-0130
-TZNAME:NDDT
-DTSTART:19880403T000100
-RDATE:19880403T000100
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0130
-TZOFFSETTO:-0330
-TZNAME:NST
-DTSTART:19881030T000100
-RDATE:19881030T000100
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/St_Kitts.ics b/libical/zoneinfo/America/St_Kitts.ics
deleted file mode 100644
index d4dffd7d1b..0000000000
--- a/libical/zoneinfo/America/St_Kitts.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/St_Kitts
-X-LIC-LOCATION:America/St_Kitts
-BEGIN:STANDARD
-TZOFFSETFROM:-0411
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19120302T000000
-RDATE:19120302T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/St_Lucia.ics b/libical/zoneinfo/America/St_Lucia.ics
deleted file mode 100644
index 1d0a652fe5..0000000000
--- a/libical/zoneinfo/America/St_Lucia.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/St_Lucia
-X-LIC-LOCATION:America/St_Lucia
-BEGIN:STANDARD
-TZOFFSETFROM:-0404
-TZOFFSETTO:-0404
-TZNAME:CMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0404
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/St_Thomas.ics b/libical/zoneinfo/America/St_Thomas.ics
deleted file mode 100644
index e0c39362b9..0000000000
--- a/libical/zoneinfo/America/St_Thomas.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/St_Thomas
-X-LIC-LOCATION:America/St_Thomas
-BEGIN:STANDARD
-TZOFFSETFROM:-0420
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/St_Vincent.ics b/libical/zoneinfo/America/St_Vincent.ics
deleted file mode 100644
index f45b9703c8..0000000000
--- a/libical/zoneinfo/America/St_Vincent.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/St_Vincent
-X-LIC-LOCATION:America/St_Vincent
-BEGIN:STANDARD
-TZOFFSETFROM:-0405
-TZOFFSETTO:-0405
-TZNAME:KMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0405
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Swift_Current.ics b/libical/zoneinfo/America/Swift_Current.ics
deleted file mode 100644
index 9d3e4ebb38..0000000000
--- a/libical/zoneinfo/America/Swift_Current.ics
+++ /dev/null
@@ -1,67 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Swift_Current
-X-LIC-LOCATION:America/Swift_Current
-BEGIN:STANDARD
-TZOFFSETFROM:-0711
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19050901T000000
-RDATE:19050901T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19570428T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19571027T020000
-RDATE:19591025T020000
-RDATE:19600925T020000
-RDATE:19610924T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19460428T020000
-RDATE:19460428T020000
-RDATE:19461013T020000
-RDATE:19500101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19720430T020000
-RDATE:19720430T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Tegucigalpa.ics b/libical/zoneinfo/America/Tegucigalpa.ics
deleted file mode 100644
index 2e13540d7d..0000000000
--- a/libical/zoneinfo/America/Tegucigalpa.ics
+++ /dev/null
@@ -1,31 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Tegucigalpa
-X-LIC-LOCATION:America/Tegucigalpa
-BEGIN:STANDARD
-TZOFFSETFROM:-0549
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19210401T000000
-RDATE:19210401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19870503T000000
-RDATE:19870503T000000
-RDATE:19880501T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19870927T000000
-RDATE:19870927T000000
-RDATE:19880925T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Thule.ics b/libical/zoneinfo/America/Thule.ics
deleted file mode 100644
index 548dcb8841..0000000000
--- a/libical/zoneinfo/America/Thule.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Thule
-X-LIC-LOCATION:America/Thule
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19930404T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19931031T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0435
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19160728T000000
-RDATE:19160728T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Thunder_Bay.ics b/libical/zoneinfo/America/Thunder_Bay.ics
deleted file mode 100644
index d2ec74727c..0000000000
--- a/libical/zoneinfo/America/Thunder_Bay.ics
+++ /dev/null
@@ -1,79 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Thunder_Bay
-X-LIC-LOCATION:America/Thunder_Bay
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19741027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0557
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0400
-TZNAME:EWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0500
-TZNAME:EST
-DTSTART:19700101T000000
-RDATE:19700101T000000
-RDATE:19730101T000000
-RDATE:19740101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Tijuana.ics b/libical/zoneinfo/America/Tijuana.ics
deleted file mode 100644
index 4a8a53a032..0000000000
--- a/libical/zoneinfo/America/Tijuana.ics
+++ /dev/null
@@ -1,98 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Tijuana
-X-LIC-LOCATION:America/Tijuana
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19761031T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0748
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19220101T001156
-RDATE:19220101T001156
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19240101T000000
-RDATE:19240101T000000
-RDATE:19301115T000000
-RDATE:19310930T000000
-RDATE:19451112T000000
-RDATE:19490114T000000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19600925T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19270610T230000
-RDATE:19270610T230000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19310401T000000
-RDATE:19310401T000000
-RDATE:19480405T000000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PWT
-DTSTART:19420424T000000
-RDATE:19420424T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19540101T000000
-RDATE:19540101T000000
-RDATE:19610101T000000
-RDATE:19760101T000000
-RDATE:19960101T000000
-RDATE:20010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Tortola.ics b/libical/zoneinfo/America/Tortola.ics
deleted file mode 100644
index 8af94543fd..0000000000
--- a/libical/zoneinfo/America/Tortola.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Tortola
-X-LIC-LOCATION:America/Tortola
-BEGIN:STANDARD
-TZOFFSETFROM:-0418
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Vancouver.ics b/libical/zoneinfo/America/Vancouver.ics
deleted file mode 100644
index d2097010eb..0000000000
--- a/libical/zoneinfo/America/Vancouver.ics
+++ /dev/null
@@ -1,108 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Vancouver
-X-LIC-LOCATION:America/Vancouver
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19621028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0812
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19460428T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500430T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19610430T020000
-RDATE:19620429T020000
-RDATE:19630428T020000
-RDATE:19640426T020000
-RDATE:19650425T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19181031T020000
-RDATE:19181031T020000
-RDATE:19450930T020000
-RDATE:19461013T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500924T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19590927T020000
-RDATE:19600925T020000
-RDATE:19610924T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Whitehorse.ics b/libical/zoneinfo/America/Whitehorse.ics
deleted file mode 100644
index a3336d186f..0000000000
--- a/libical/zoneinfo/America/Whitehorse.ics
+++ /dev/null
@@ -1,87 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Whitehorse
-X-LIC-LOCATION:America/Whitehorse
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19801026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19000820T000000
-RDATE:19000820T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:YDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:YWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0700
-TZNAME:YDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19660701T020000
-RDATE:19660701T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0700
-TZNAME:PDT
-DTSTART:19800427T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Winnipeg.ics b/libical/zoneinfo/America/Winnipeg.ics
deleted file mode 100644
index 53f12b33b4..0000000000
--- a/libical/zoneinfo/America/Winnipeg.ics
+++ /dev/null
@@ -1,129 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Winnipeg
-X-LIC-LOCATION:America/Winnipeg
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19871025T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0629
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:18870716T000000
-RDATE:18870716T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CDT
-DTSTART:19160423T000000
-RDATE:19160423T000000
-RDATE:19180414T020000
-RDATE:19370516T020000
-RDATE:19460512T020000
-RDATE:19470427T020000
-RDATE:19480425T020000
-RDATE:19490424T020000
-RDATE:19500501T020000
-RDATE:19510429T020000
-RDATE:19520427T020000
-RDATE:19530426T020000
-RDATE:19540425T020000
-RDATE:19550424T020000
-RDATE:19560429T020000
-RDATE:19570428T020000
-RDATE:19580427T020000
-RDATE:19590426T020000
-RDATE:19600424T020000
-RDATE:19630428T020000
-RDATE:19660424T020000
-RDATE:19670430T020000
-RDATE:19680428T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:CST
-DTSTART:19160917T000000
-RDATE:19160917T000000
-RDATE:19181031T020000
-RDATE:19370926T020000
-RDATE:19450930T020000
-RDATE:19461013T020000
-RDATE:19470928T020000
-RDATE:19480926T020000
-RDATE:19490925T020000
-RDATE:19500930T020000
-RDATE:19510930T020000
-RDATE:19520928T020000
-RDATE:19530927T020000
-RDATE:19540926T020000
-RDATE:19550925T020000
-RDATE:19560930T020000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19591025T020000
-RDATE:19600925T020000
-RDATE:19630922T020000
-RDATE:19661030T020000
-RDATE:19671029T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:CWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Yakutat.ics b/libical/zoneinfo/America/Yakutat.ics
deleted file mode 100644
index eabe19ab43..0000000000
--- a/libical/zoneinfo/America/Yakutat.ics
+++ /dev/null
@@ -1,110 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Yakutat
-X-LIC-LOCATION:America/Yakutat
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:AKST
-DTSTART:19831030T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1441
-TZOFFSETTO:-0919
-TZNAME:LMT
-DTSTART:18671018T000000
-RDATE:18671018T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0919
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19000820T120000
-RDATE:19000820T120000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19420101T000000
-RDATE:19420101T000000
-RDATE:19460101T000000
-RDATE:19690101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:YWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0800
-TZNAME:YPT
-DTSTART:19450814T150000
-RDATE:19450814T150000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0800
-TZOFFSETTO:-0900
-TZNAME:YST
-DTSTART:19450930T020000
-RDATE:19450930T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:YDT
-DTSTART:19690427T020000
-RDATE:19690427T020000
-RDATE:19700426T020000
-RDATE:19710425T020000
-RDATE:19720430T020000
-RDATE:19730429T020000
-RDATE:19740106T020000
-RDATE:19750223T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0800
-TZNAME:AKDT
-DTSTART:19840429T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/America/Yellowknife.ics b/libical/zoneinfo/America/Yellowknife.ics
deleted file mode 100644
index d2b37ac2ee..0000000000
--- a/libical/zoneinfo/America/Yellowknife.ics
+++ /dev/null
@@ -1,74 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/America/Yellowknife
-X-LIC-LOCATION:America/Yellowknife
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19801026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0737
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MDT
-DTSTART:19180414T020000
-RDATE:19180414T020000
-RDATE:19190525T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19181027T020000
-RDATE:19181027T020000
-RDATE:19191101T000000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:MWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0500
-TZNAME:MDDT
-DTSTART:19650425T000000
-RDATE:19650425T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0700
-TZNAME:MST
-DTSTART:19651031T020000
-RDATE:19651031T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/Casey.ics b/libical/zoneinfo/Antarctica/Casey.ics
deleted file mode 100644
index e0d55d1497..0000000000
--- a/libical/zoneinfo/Antarctica/Casey.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/Casey
-X-LIC-LOCATION:Antarctica/Casey
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0800
-TZNAME:WST
-DTSTART:19690101T000000
-RDATE:19690101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/Davis.ics b/libical/zoneinfo/Antarctica/Davis.ics
deleted file mode 100644
index b52ff317c0..0000000000
--- a/libical/zoneinfo/Antarctica/Davis.ics
+++ /dev/null
@@ -1,23 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/Davis
-X-LIC-LOCATION:Antarctica/Davis
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0700
-TZNAME:DAVT
-DTSTART:19570113T000000
-RDATE:19570113T000000
-RDATE:19690201T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0000
-TZNAME:zzz
-DTSTART:19641101T000000
-RDATE:19641101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/DumontDUrville.ics b/libical/zoneinfo/Antarctica/DumontDUrville.ics
deleted file mode 100644
index adbeb67a12..0000000000
--- a/libical/zoneinfo/Antarctica/DumontDUrville.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/DumontDUrville
-X-LIC-LOCATION:Antarctica/DumontDUrville
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+1000
-TZNAME:PMT
-DTSTART:19470101T000000
-RDATE:19470101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+0000
-TZNAME:zzz
-DTSTART:19520114T000000
-RDATE:19520114T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+1000
-TZNAME:DDUT
-DTSTART:19561101T000000
-RDATE:19561101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/Mawson.ics b/libical/zoneinfo/Antarctica/Mawson.ics
deleted file mode 100644
index 95d03c89a1..0000000000
--- a/libical/zoneinfo/Antarctica/Mawson.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/Mawson
-X-LIC-LOCATION:Antarctica/Mawson
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0600
-TZNAME:MAWT
-DTSTART:19540213T000000
-RDATE:19540213T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/McMurdo.ics b/libical/zoneinfo/Antarctica/McMurdo.ics
deleted file mode 100644
index 9cdd42a08b..0000000000
--- a/libical/zoneinfo/Antarctica/McMurdo.ics
+++ /dev/null
@@ -1,72 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/McMurdo
-X-LIC-LOCATION:Antarctica/McMurdo
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19900318T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=3SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:NZDT
-DTSTART:19901007T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19560101T000000
-RDATE:19560101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:NZDT
-DTSTART:19741103T020000
-RDATE:19741103T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891008T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19750223T030000
-RDATE:19750223T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820307T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860302T030000
-RDATE:19870301T030000
-RDATE:19880306T030000
-RDATE:19890305T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/Palmer.ics b/libical/zoneinfo/Antarctica/Palmer.ics
deleted file mode 100644
index e1d7dff5a2..0000000000
--- a/libical/zoneinfo/Antarctica/Palmer.ics
+++ /dev/null
@@ -1,130 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/Palmer
-X-LIC-LOCATION:Antarctica/Palmer
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:CLST
-DTSTART:19991010T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=9,10,11,12,13,14,15;BYDAY=SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:CLT
-DTSTART:20000312T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=9,10,11,12,13,14,15;BYDAY=SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19650101T000000
-RDATE:19650101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19650301T000000
-RDATE:19650301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ARST
-DTSTART:19651015T000000
-RDATE:19651015T000000
-RDATE:19661015T000000
-RDATE:19671001T000000
-RDATE:19681006T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:ART
-DTSTART:19660301T000000
-RDATE:19660301T000000
-RDATE:19670401T000000
-RDATE:19680407T000000
-RDATE:19690406T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19691005T000000
-RDATE:19691005T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:ARST
-DTSTART:19740123T000000
-RDATE:19740123T000000
-RDATE:19741006T000000
-RDATE:19751005T000000
-RDATE:19761003T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:ART
-DTSTART:19740501T000000
-RDATE:19740501T000000
-RDATE:19750406T000000
-RDATE:19760404T000000
-RDATE:19770403T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:CLT
-DTSTART:19820501T000000
-RDATE:19820501T000000
-RDATE:19830313T000000
-RDATE:19840311T000000
-RDATE:19850310T000000
-RDATE:19860309T000000
-RDATE:19870315T000000
-RDATE:19880313T000000
-RDATE:19890312T000000
-RDATE:19900311T000000
-RDATE:19910310T000000
-RDATE:19920315T000000
-RDATE:19930314T000000
-RDATE:19940313T000000
-RDATE:19950312T000000
-RDATE:19960310T000000
-RDATE:19970309T000000
-RDATE:19980315T000000
-RDATE:19990404T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:CLST
-DTSTART:19821010T000000
-RDATE:19821010T000000
-RDATE:19831009T000000
-RDATE:19841014T000000
-RDATE:19851013T000000
-RDATE:19861012T000000
-RDATE:19871011T000000
-RDATE:19881009T000000
-RDATE:19891015T000000
-RDATE:19901014T000000
-RDATE:19911013T000000
-RDATE:19921011T000000
-RDATE:19931010T000000
-RDATE:19941009T000000
-RDATE:19951015T000000
-RDATE:19961013T000000
-RDATE:19971012T000000
-RDATE:19980927T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/South_Pole.ics b/libical/zoneinfo/Antarctica/South_Pole.ics
deleted file mode 100644
index ca9648187a..0000000000
--- a/libical/zoneinfo/Antarctica/South_Pole.ics
+++ /dev/null
@@ -1,72 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/South_Pole
-X-LIC-LOCATION:Antarctica/South_Pole
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19900318T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=3SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:NZDT
-DTSTART:19901007T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19560101T000000
-RDATE:19560101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:NZDT
-DTSTART:19741103T020000
-RDATE:19741103T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891008T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19750223T030000
-RDATE:19750223T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820307T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860302T030000
-RDATE:19870301T030000
-RDATE:19880306T030000
-RDATE:19890305T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/Syowa.ics b/libical/zoneinfo/Antarctica/Syowa.ics
deleted file mode 100644
index 5999970728..0000000000
--- a/libical/zoneinfo/Antarctica/Syowa.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/Syowa
-X-LIC-LOCATION:Antarctica/Syowa
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0300
-TZNAME:SYOT
-DTSTART:19570129T000000
-RDATE:19570129T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Antarctica/Vostok.ics b/libical/zoneinfo/Antarctica/Vostok.ics
deleted file mode 100644
index c78d9cca5d..0000000000
--- a/libical/zoneinfo/Antarctica/Vostok.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Antarctica/Vostok
-X-LIC-LOCATION:Antarctica/Vostok
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0600
-TZNAME:VOST
-DTSTART:19571216T000000
-RDATE:19571216T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Arctic/Longyearbyen.ics b/libical/zoneinfo/Arctic/Longyearbyen.ics
deleted file mode 100644
index 0c65cdf091..0000000000
--- a/libical/zoneinfo/Arctic/Longyearbyen.ics
+++ /dev/null
@@ -1,89 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Arctic/Longyearbyen
-X-LIC-LOCATION:Arctic/Longyearbyen
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0043
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160522T010000
-RDATE:19160522T010000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19590315T020000
-RDATE:19600320T020000
-RDATE:19610319T020000
-RDATE:19620318T020000
-RDATE:19630317T020000
-RDATE:19640315T020000
-RDATE:19650425T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19160930T000000
-RDATE:19160930T000000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451001T030000
-RDATE:19590920T030000
-RDATE:19600918T030000
-RDATE:19610917T030000
-RDATE:19620916T030000
-RDATE:19630915T030000
-RDATE:19640920T030000
-RDATE:19650919T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400810T230000
-RDATE:19400810T230000
-RDATE:19421102T020000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Aden.ics b/libical/zoneinfo/Asia/Aden.ics
deleted file mode 100644
index e683a4b908..0000000000
--- a/libical/zoneinfo/Asia/Aden.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Aden
-X-LIC-LOCATION:Asia/Aden
-BEGIN:STANDARD
-TZOFFSETFROM:+0301
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Almaty.ics b/libical/zoneinfo/Asia/Almaty.ics
deleted file mode 100644
index 77d1bd1ce5..0000000000
--- a/libical/zoneinfo/Asia/Almaty.ics
+++ /dev/null
@@ -1,87 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Almaty
-X-LIC-LOCATION:Asia/Almaty
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:ALMST
-DTSTART:19920329T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:ALMT
-DTSTART:19961027T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0508
-TZOFFSETTO:+0500
-TZNAME:ALMT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:ALMT
-DTSTART:19570301T000000
-RDATE:19570301T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:ALMST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:ALMT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:ALMST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:ALMT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Amman.ics b/libical/zoneinfo/Asia/Amman.ics
deleted file mode 100644
index 7e37c9beee..0000000000
--- a/libical/zoneinfo/Asia/Amman.ics
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Amman
-X-LIC-LOCATION:Asia/Amman
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19990930T010000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1TH
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:20000330T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1TH
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0224
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19310101T000000
-RDATE:19310101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19730606T000000
-RDATE:19730606T000000
-RDATE:19740501T000000
-RDATE:19750501T000000
-RDATE:19760501T000000
-RDATE:19770501T000000
-RDATE:19780430T000000
-RDATE:19850401T000000
-RDATE:19860404T000000
-RDATE:19870403T000000
-RDATE:19880401T000000
-RDATE:19890508T000000
-RDATE:19900427T000000
-RDATE:19910417T000000
-RDATE:19920410T000000
-RDATE:19930402T000000
-RDATE:19940401T000000
-RDATE:19950407T000000
-RDATE:19960405T000000
-RDATE:19970404T000000
-RDATE:19980403T000000
-RDATE:19990701T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19731001T000000
-RDATE:19731001T000000
-RDATE:19741001T000000
-RDATE:19751001T000000
-RDATE:19761101T000000
-RDATE:19771001T000000
-RDATE:19780930T000000
-RDATE:19851001T000000
-RDATE:19861003T000000
-RDATE:19871002T000000
-RDATE:19881007T000000
-RDATE:19891006T000000
-RDATE:19901005T000000
-RDATE:19910927T000000
-RDATE:19921002T000000
-RDATE:19931001T000000
-RDATE:19940916T000000
-RDATE:19950915T010000
-RDATE:19960920T010000
-RDATE:19970919T010000
-RDATE:19980918T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Anadyr.ics b/libical/zoneinfo/Asia/Anadyr.ics
deleted file mode 100644
index 078bdfd2e0..0000000000
--- a/libical/zoneinfo/Asia/Anadyr.ics
+++ /dev/null
@@ -1,112 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Anadyr
-X-LIC-LOCATION:Asia/Anadyr
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:ANAST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:ANAT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1150
-TZOFFSETTO:+1200
-TZNAME:ANAT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:ANAT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1400
-TZNAME:ANAST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1400
-TZOFFSETTO:+1300
-TZNAME:ANAT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1300
-TZNAME:ANAST
-DTSTART:19820401T000000
-RDATE:19820401T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:ANAT
-DTSTART:19821001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:ANAST
-DTSTART:19830401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1200
-TZNAME:ANAST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:ANAT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:ANAT
-DTSTART:19920119T020000
-RDATE:19920119T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Aqtau.ics b/libical/zoneinfo/Asia/Aqtau.ics
deleted file mode 100644
index 21c58a1796..0000000000
--- a/libical/zoneinfo/Asia/Aqtau.ics
+++ /dev/null
@@ -1,115 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Aqtau
-X-LIC-LOCATION:Asia/Aqtau
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AQTST
-DTSTART:19960331T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:AQTT
-DTSTART:19961027T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0321
-TZOFFSETTO:+0400
-TZNAME:SHET
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:SHET
-DTSTART:19570301T000000
-RDATE:19570301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:SHEST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:SHET
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:AQTST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:AQTT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AQTT
-DTSTART:19920119T020000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:AQTST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-RDATE:19950326T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:AQTT
-DTSTART:19920927T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0400
-TZNAME:AQTT
-DTSTART:19950924T000000
-RDATE:19950924T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Aqtobe.ics b/libical/zoneinfo/Asia/Aqtobe.ics
deleted file mode 100644
index 8ccc835978..0000000000
--- a/libical/zoneinfo/Asia/Aqtobe.ics
+++ /dev/null
@@ -1,99 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Aqtobe
-X-LIC-LOCATION:Asia/Aqtobe
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:AQTST
-DTSTART:19920329T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:AQTT
-DTSTART:19961027T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0349
-TZOFFSETTO:+0400
-TZNAME:AKT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AKT
-DTSTART:19570301T000000
-RDATE:19570301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:AKST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:AKT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:AKTST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:AQTT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AQTT
-DTSTART:19920119T020000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:AQTT
-DTSTART:19920927T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Ashgabat.ics b/libical/zoneinfo/Asia/Ashgabat.ics
deleted file mode 100644
index 97bcd11177..0000000000
--- a/libical/zoneinfo/Asia/Ashgabat.ics
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Ashgabat
-X-LIC-LOCATION:Asia/Ashgabat
-BEGIN:STANDARD
-TZOFFSETFROM:+0354
-TZOFFSETTO:+0400
-TZNAME:ASHT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:ASHT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:ASHST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:ASHT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:ASHST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:ASHT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:TMT
-DTSTART:19911027T000000
-RDATE:19911027T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:TMT
-DTSTART:19920119T020000
-RDATE:19920119T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Baghdad.ics b/libical/zoneinfo/Asia/Baghdad.ics
deleted file mode 100644
index f28d5ed22f..0000000000
--- a/libical/zoneinfo/Asia/Baghdad.ics
+++ /dev/null
@@ -1,66 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Baghdad
-X-LIC-LOCATION:Asia/Baghdad
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:ADT
-DTSTART:19910401T030000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYMONTHDAY=1
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19911001T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=1
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0258
-TZOFFSETTO:+0258
-TZNAME:BMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0258
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19180101T000000
-RDATE:19180101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:ADT
-DTSTART:19820501T000000
-RDATE:19820501T000000
-RDATE:19830331T000000
-RDATE:19840401T000000
-RDATE:19850401T000000
-RDATE:19860330T010000
-RDATE:19870329T010000
-RDATE:19880327T010000
-RDATE:19890326T010000
-RDATE:19900325T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19821001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19841001T000000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Bahrain.ics b/libical/zoneinfo/Asia/Bahrain.ics
deleted file mode 100644
index 0b57443fdf..0000000000
--- a/libical/zoneinfo/Asia/Bahrain.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Bahrain
-X-LIC-LOCATION:Asia/Bahrain
-BEGIN:STANDARD
-TZOFFSETFROM:+0322
-TZOFFSETTO:+0400
-TZNAME:GST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19720601T000000
-RDATE:19720601T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Baku.ics b/libical/zoneinfo/Asia/Baku.ics
deleted file mode 100644
index 2afcb8145e..0000000000
--- a/libical/zoneinfo/Asia/Baku.ics
+++ /dev/null
@@ -1,126 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Baku
-X-LIC-LOCATION:Asia/Baku
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AZST
-DTSTART:19970330T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:AZT
-DTSTART:19971026T010000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0319
-TZOFFSETTO:+0300
-TZNAME:BAKT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:BAKT
-DTSTART:19570301T000000
-RDATE:19570301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:BAKST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:BAKT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:BAKST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:AZT
-DTSTART:19910830T000000
-RDATE:19910830T000000
-RDATE:19920926T230000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:AZT
-DTSTART:19910929T020000
-RDATE:19910929T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:AZST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:AZT
-DTSTART:19920927T020000
-RDATE:19920927T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:AZT
-DTSTART:19960101T000000
-RDATE:19960101T000000
-RDATE:19970101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AZST
-DTSTART:19960331T050000
-RDATE:19960331T050000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:AZT
-DTSTART:19961027T060000
-RDATE:19961027T060000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Bangkok.ics b/libical/zoneinfo/Asia/Bangkok.ics
deleted file mode 100644
index e4f0d5115e..0000000000
--- a/libical/zoneinfo/Asia/Bangkok.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Bangkok
-X-LIC-LOCATION:Asia/Bangkok
-BEGIN:STANDARD
-TZOFFSETFROM:+0642
-TZOFFSETTO:+0642
-TZNAME:BMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0642
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19200401T000000
-RDATE:19200401T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Beirut.ics b/libical/zoneinfo/Asia/Beirut.ics
deleted file mode 100644
index 681d8f8fa9..0000000000
--- a/libical/zoneinfo/Asia/Beirut.ics
+++ /dev/null
@@ -1,97 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Beirut
-X-LIC-LOCATION:Asia/Beirut
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19930328T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19991031T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0222
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19200328T000000
-RDATE:19200328T000000
-RDATE:19210403T000000
-RDATE:19220326T000000
-RDATE:19230422T000000
-RDATE:19570501T000000
-RDATE:19580501T000000
-RDATE:19590501T000000
-RDATE:19600501T000000
-RDATE:19610501T000000
-RDATE:19720622T000000
-RDATE:19730501T000000
-RDATE:19740501T000000
-RDATE:19750501T000000
-RDATE:19760501T000000
-RDATE:19770501T000000
-RDATE:19780430T000000
-RDATE:19840501T000000
-RDATE:19850501T000000
-RDATE:19860501T000000
-RDATE:19870501T000000
-RDATE:19880601T000000
-RDATE:19890510T000000
-RDATE:19900501T000000
-RDATE:19910501T000000
-RDATE:19920501T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19201025T000000
-RDATE:19201025T000000
-RDATE:19211003T000000
-RDATE:19221008T000000
-RDATE:19230916T000000
-RDATE:19571001T000000
-RDATE:19581001T000000
-RDATE:19591001T000000
-RDATE:19601001T000000
-RDATE:19611001T000000
-RDATE:19721001T000000
-RDATE:19731001T000000
-RDATE:19741001T000000
-RDATE:19751001T000000
-RDATE:19761001T000000
-RDATE:19771001T000000
-RDATE:19780930T000000
-RDATE:19841016T000000
-RDATE:19851016T000000
-RDATE:19861016T000000
-RDATE:19871016T000000
-RDATE:19881016T000000
-RDATE:19891016T000000
-RDATE:19901016T000000
-RDATE:19911016T000000
-RDATE:19921004T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19960929T000000
-RDATE:19970928T000000
-RDATE:19980927T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Bishkek.ics b/libical/zoneinfo/Asia/Bishkek.ics
deleted file mode 100644
index 9fb4e183b1..0000000000
--- a/libical/zoneinfo/Asia/Bishkek.ics
+++ /dev/null
@@ -1,98 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Bishkek
-X-LIC-LOCATION:Asia/Bishkek
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:KGST
-DTSTART:19970330T023000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:KGT
-DTSTART:19971026T023000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0458
-TZOFFSETTO:+0500
-TZNAME:FRUT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:FRUT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:FRUST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:FRUT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:FRUST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:KGT
-DTSTART:19910831T020000
-RDATE:19910831T020000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19960929T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:KGST
-DTSTART:19920412T000000
-RDATE:19920412T000000
-RDATE:19930411T000000
-RDATE:19940410T000000
-RDATE:19950409T000000
-RDATE:19960407T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Brunei.ics b/libical/zoneinfo/Asia/Brunei.ics
deleted file mode 100644
index bc4e7dd701..0000000000
--- a/libical/zoneinfo/Asia/Brunei.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Brunei
-X-LIC-LOCATION:Asia/Brunei
-BEGIN:STANDARD
-TZOFFSETFROM:+0740
-TZOFFSETTO:+0730
-TZNAME:BNT
-DTSTART:19260301T000000
-RDATE:19260301T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:BNT
-DTSTART:19330101T000000
-RDATE:19330101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Calcutta.ics b/libical/zoneinfo/Asia/Calcutta.ics
deleted file mode 100644
index b35a487e1d..0000000000
--- a/libical/zoneinfo/Asia/Calcutta.ics
+++ /dev/null
@@ -1,37 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Calcutta
-X-LIC-LOCATION:Asia/Calcutta
-BEGIN:STANDARD
-TZOFFSETFROM:+0553
-TZOFFSETTO:+0553
-TZNAME:HMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0553
-TZOFFSETTO:+0630
-TZNAME:BURT
-DTSTART:19411001T000000
-RDATE:19411001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19420515T000000
-RDATE:19420515T000000
-RDATE:19451015T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0630
-TZNAME:IST
-DTSTART:19420901T000000
-RDATE:19420901T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Chungking.ics b/libical/zoneinfo/Asia/Chungking.ics
deleted file mode 100644
index f093f4cc10..0000000000
--- a/libical/zoneinfo/Asia/Chungking.ics
+++ /dev/null
@@ -1,46 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Chungking
-X-LIC-LOCATION:Asia/Chungking
-BEGIN:STANDARD
-TZOFFSETFROM:+0706
-TZOFFSETTO:+0700
-TZNAME:CHUT
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19800501T000000
-RDATE:19800501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:CDT
-DTSTART:19860504T000000
-RDATE:19860504T000000
-RDATE:19870412T000000
-RDATE:19880410T000000
-RDATE:19890416T000000
-RDATE:19900415T000000
-RDATE:19910414T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19860914T000000
-RDATE:19860914T000000
-RDATE:19870913T000000
-RDATE:19880911T000000
-RDATE:19890917T000000
-RDATE:19900916T000000
-RDATE:19910915T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Colombo.ics b/libical/zoneinfo/Asia/Colombo.ics
deleted file mode 100644
index ee9e00e4c9..0000000000
--- a/libical/zoneinfo/Asia/Colombo.ics
+++ /dev/null
@@ -1,57 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Colombo
-X-LIC-LOCATION:Asia/Colombo
-BEGIN:STANDARD
-TZOFFSETFROM:+0519
-TZOFFSETTO:+0520
-TZNAME:MMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0520
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19060101T000000
-RDATE:19060101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0600
-TZNAME:IHST
-DTSTART:19420105T000000
-RDATE:19420105T000000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0630
-TZNAME:IST
-DTSTART:19420901T000000
-RDATE:19420901T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19451016T020000
-RDATE:19451016T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0630
-TZNAME:LKT
-DTSTART:19960525T000000
-RDATE:19960525T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0600
-TZNAME:LKT
-DTSTART:19961026T003000
-RDATE:19961026T003000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Damascus.ics b/libical/zoneinfo/Asia/Damascus.ics
deleted file mode 100644
index be7cf6b974..0000000000
--- a/libical/zoneinfo/Asia/Damascus.ics
+++ /dev/null
@@ -1,108 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Damascus
-X-LIC-LOCATION:Asia/Damascus
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19941001T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=1
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19990401T000000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYMONTHDAY=1
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0225
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19200418T020000
-RDATE:19200418T020000
-RDATE:19210417T020000
-RDATE:19220416T020000
-RDATE:19230415T020000
-RDATE:19620429T020000
-RDATE:19630501T020000
-RDATE:19640501T020000
-RDATE:19650501T020000
-RDATE:19660424T020000
-RDATE:19670501T020000
-RDATE:19680501T020000
-RDATE:19690501T020000
-RDATE:19700501T020000
-RDATE:19710501T020000
-RDATE:19720501T020000
-RDATE:19730501T020000
-RDATE:19740501T020000
-RDATE:19750501T020000
-RDATE:19760501T020000
-RDATE:19770501T020000
-RDATE:19780501T020000
-RDATE:19830409T020000
-RDATE:19840409T020000
-RDATE:19860216T020000
-RDATE:19870301T020000
-RDATE:19880315T020000
-RDATE:19890331T020000
-RDATE:19900401T020000
-RDATE:19910401T000000
-RDATE:19920408T000000
-RDATE:19930326T000000
-RDATE:19940401T000000
-RDATE:19950401T000000
-RDATE:19960401T000000
-RDATE:19970331T000000
-RDATE:19980330T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19201003T020000
-RDATE:19201003T020000
-RDATE:19211002T020000
-RDATE:19221001T020000
-RDATE:19231007T020000
-RDATE:19621001T020000
-RDATE:19630930T020000
-RDATE:19641001T020000
-RDATE:19650930T020000
-RDATE:19661001T020000
-RDATE:19671001T020000
-RDATE:19681001T020000
-RDATE:19691001T020000
-RDATE:19701001T020000
-RDATE:19711001T020000
-RDATE:19721001T020000
-RDATE:19731001T020000
-RDATE:19741001T020000
-RDATE:19751001T020000
-RDATE:19761001T020000
-RDATE:19770901T020000
-RDATE:19780901T020000
-RDATE:19831001T020000
-RDATE:19841001T020000
-RDATE:19861009T020000
-RDATE:19871031T020000
-RDATE:19881031T020000
-RDATE:19891001T020000
-RDATE:19900930T020000
-RDATE:19911001T000000
-RDATE:19921001T000000
-RDATE:19930925T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Dhaka.ics b/libical/zoneinfo/Asia/Dhaka.ics
deleted file mode 100644
index eb43fd154f..0000000000
--- a/libical/zoneinfo/Asia/Dhaka.ics
+++ /dev/null
@@ -1,50 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Dhaka
-X-LIC-LOCATION:Asia/Dhaka
-BEGIN:STANDARD
-TZOFFSETFROM:+0602
-TZOFFSETTO:+0553
-TZNAME:HMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0553
-TZOFFSETTO:+0630
-TZNAME:BURT
-DTSTART:19411001T000000
-RDATE:19411001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19420515T000000
-RDATE:19420515T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0630
-TZNAME:BURT
-DTSTART:19420901T000000
-RDATE:19420901T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0600
-TZNAME:DACT
-DTSTART:19510930T000000
-RDATE:19510930T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:BDT
-DTSTART:19710326T000000
-RDATE:19710326T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Dili.ics b/libical/zoneinfo/Asia/Dili.ics
deleted file mode 100644
index 9d8a9ed55b..0000000000
--- a/libical/zoneinfo/Asia/Dili.ics
+++ /dev/null
@@ -1,43 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Dili
-X-LIC-LOCATION:Asia/Dili
-BEGIN:STANDARD
-TZOFFSETFROM:+0822
-TZOFFSETTO:+0800
-TZNAME:TPT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420221T230000
-RDATE:19420221T230000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0900
-TZNAME:TPT
-DTSTART:19450801T000000
-RDATE:19450801T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CIT
-DTSTART:19760503T000000
-RDATE:19760503T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:TPT
-DTSTART:20000917T000000
-RDATE:20000917T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Dubai.ics b/libical/zoneinfo/Asia/Dubai.ics
deleted file mode 100644
index 3382004b71..0000000000
--- a/libical/zoneinfo/Asia/Dubai.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Dubai
-X-LIC-LOCATION:Asia/Dubai
-BEGIN:STANDARD
-TZOFFSETFROM:+0341
-TZOFFSETTO:+0400
-TZNAME:GST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Dushanbe.ics b/libical/zoneinfo/Asia/Dushanbe.ics
deleted file mode 100644
index a631ef8e98..0000000000
--- a/libical/zoneinfo/Asia/Dushanbe.ics
+++ /dev/null
@@ -1,68 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Dushanbe
-X-LIC-LOCATION:Asia/Dushanbe
-BEGIN:STANDARD
-TZOFFSETFROM:+0435
-TZOFFSETTO:+0500
-TZNAME:DUST
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:DUST
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:DUSST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:DUST
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:DUSST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:TJT
-DTSTART:19910909T030000
-RDATE:19910909T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Gaza.ics b/libical/zoneinfo/Asia/Gaza.ics
deleted file mode 100644
index 7c86e8619f..0000000000
--- a/libical/zoneinfo/Asia/Gaza.ics
+++ /dev/null
@@ -1,132 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Gaza
-X-LIC-LOCATION:Asia/Gaza
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19990416T000000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=3FR
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19991015T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=3FR
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0218
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19001001T000000
-RDATE:19001001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EET
-DTSTART:19400601T000000
-RDATE:19400601T000000
-RDATE:19430401T020000
-RDATE:19440401T000000
-RDATE:19450416T000000
-RDATE:19460416T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19421101T000000
-RDATE:19421101T000000
-RDATE:19431101T000000
-RDATE:19441101T000000
-RDATE:19451101T020000
-RDATE:19461101T000000
-RDATE:19571001T000000
-RDATE:19581001T000000
-RDATE:19590930T030000
-RDATE:19600930T030000
-RDATE:19610930T030000
-RDATE:19620930T030000
-RDATE:19630930T030000
-RDATE:19640930T030000
-RDATE:19650930T030000
-RDATE:19661001T030000
-RDATE:19960920T010000
-RDATE:19970919T010000
-RDATE:19980918T010000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19480515T000000
-RDATE:19480515T000000
-RDATE:19960101T000000
-RDATE:19990101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19570510T000000
-RDATE:19570510T000000
-RDATE:19580501T000000
-RDATE:19590501T010000
-RDATE:19600501T010000
-RDATE:19610501T010000
-RDATE:19620501T010000
-RDATE:19630501T010000
-RDATE:19640501T010000
-RDATE:19650501T010000
-RDATE:19660501T010000
-RDATE:19670501T010000
-RDATE:19960405T000000
-RDATE:19970404T000000
-RDATE:19980403T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:IST
-DTSTART:19670605T000000
-RDATE:19670605T000000
-RDATE:19741013T000000
-RDATE:19750831T000000
-RDATE:19850915T000000
-RDATE:19860907T000000
-RDATE:19870913T000000
-RDATE:19880903T000000
-RDATE:19890903T000000
-RDATE:19900826T000000
-RDATE:19910901T000000
-RDATE:19920906T000000
-RDATE:19930905T000000
-RDATE:19940828T000000
-RDATE:19950903T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:IDT
-DTSTART:19740707T000000
-RDATE:19740707T000000
-RDATE:19750420T000000
-RDATE:19850414T000000
-RDATE:19860518T000000
-RDATE:19870415T000000
-RDATE:19880409T000000
-RDATE:19890430T000000
-RDATE:19900325T000000
-RDATE:19910324T000000
-RDATE:19920329T000000
-RDATE:19930402T000000
-RDATE:19940401T000000
-RDATE:19950331T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Harbin.ics b/libical/zoneinfo/Asia/Harbin.ics
deleted file mode 100644
index 6680921d18..0000000000
--- a/libical/zoneinfo/Asia/Harbin.ics
+++ /dev/null
@@ -1,61 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Harbin
-X-LIC-LOCATION:Asia/Harbin
-BEGIN:STANDARD
-TZOFFSETFROM:+0827
-TZOFFSETTO:+0830
-TZNAME:HART
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0830
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19320301T000000
-RDATE:19320301T000000
-RDATE:19800501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:HART
-DTSTART:19400101T000000
-RDATE:19400101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0830
-TZNAME:HART
-DTSTART:19660501T000000
-RDATE:19660501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:CDT
-DTSTART:19860504T000000
-RDATE:19860504T000000
-RDATE:19870412T000000
-RDATE:19880410T000000
-RDATE:19890416T000000
-RDATE:19900415T000000
-RDATE:19910414T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19860914T000000
-RDATE:19860914T000000
-RDATE:19870913T000000
-RDATE:19880911T000000
-RDATE:19890917T000000
-RDATE:19900916T000000
-RDATE:19910915T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Hong_Kong.ics b/libical/zoneinfo/Asia/Hong_Kong.ics
deleted file mode 100644
index 860afd1909..0000000000
--- a/libical/zoneinfo/Asia/Hong_Kong.ics
+++ /dev/null
@@ -1,95 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Hong_Kong
-X-LIC-LOCATION:Asia/Hong_Kong
-BEGIN:STANDARD
-TZOFFSETFROM:+0737
-TZOFFSETTO:+0800
-TZNAME:HKT
-DTSTART:19041030T000000
-RDATE:19041030T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:HKST
-DTSTART:19460420T033000
-RDATE:19460420T033000
-RDATE:19470413T033000
-RDATE:19480502T033000
-RDATE:19490403T033000
-RDATE:19500402T033000
-RDATE:19510401T033000
-RDATE:19520406T033000
-RDATE:19530405T033000
-RDATE:19540321T033000
-RDATE:19550320T033000
-RDATE:19560318T033000
-RDATE:19570324T033000
-RDATE:19580323T033000
-RDATE:19590322T033000
-RDATE:19600320T033000
-RDATE:19610319T033000
-RDATE:19620318T033000
-RDATE:19630324T033000
-RDATE:19640322T033000
-RDATE:19650418T033000
-RDATE:19660417T033000
-RDATE:19670416T033000
-RDATE:19680421T033000
-RDATE:19690420T033000
-RDATE:19700419T033000
-RDATE:19710418T033000
-RDATE:19720416T033000
-RDATE:19730422T033000
-RDATE:19740421T033000
-RDATE:19750420T033000
-RDATE:19760418T033000
-RDATE:19770417T033000
-RDATE:19790513T033000
-RDATE:19800511T033000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:HKT
-DTSTART:19461201T033000
-RDATE:19461201T033000
-RDATE:19471230T033000
-RDATE:19481031T033000
-RDATE:19491030T033000
-RDATE:19501029T033000
-RDATE:19511028T033000
-RDATE:19521026T033000
-RDATE:19531101T033000
-RDATE:19541031T033000
-RDATE:19551106T033000
-RDATE:19561104T033000
-RDATE:19571103T033000
-RDATE:19581102T033000
-RDATE:19591101T033000
-RDATE:19601106T033000
-RDATE:19611105T033000
-RDATE:19621104T033000
-RDATE:19631103T033000
-RDATE:19641101T033000
-RDATE:19651017T033000
-RDATE:19661016T033000
-RDATE:19671022T033000
-RDATE:19681020T033000
-RDATE:19691019T033000
-RDATE:19701018T033000
-RDATE:19711017T033000
-RDATE:19721022T033000
-RDATE:19731021T033000
-RDATE:19741020T033000
-RDATE:19751019T033000
-RDATE:19761017T033000
-RDATE:19771016T033000
-RDATE:19791021T033000
-RDATE:19801019T033000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Hovd.ics b/libical/zoneinfo/Asia/Hovd.ics
deleted file mode 100644
index b12c4ba8c1..0000000000
--- a/libical/zoneinfo/Asia/Hovd.ics
+++ /dev/null
@@ -1,68 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Hovd
-X-LIC-LOCATION:Asia/Hovd
-BEGIN:STANDARD
-TZOFFSETFROM:+0607
-TZOFFSETTO:+0600
-TZNAME:HOVT
-DTSTART:19050801T000000
-RDATE:19050801T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:HOVT
-DTSTART:19780101T000000
-RDATE:19780101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:HOVST
-DTSTART:19830401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19910331T020000
-RDATE:19920329T020000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-RDATE:19960331T020000
-RDATE:19970330T020000
-RDATE:19980329T020000
-RDATE:20010427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:HOVT
-DTSTART:19831001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-RDATE:19960929T030000
-RDATE:19970928T030000
-RDATE:19980927T030000
-RDATE:20010928T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Irkutsk.ics b/libical/zoneinfo/Asia/Irkutsk.ics
deleted file mode 100644
index 49294097b5..0000000000
--- a/libical/zoneinfo/Asia/Irkutsk.ics
+++ /dev/null
@@ -1,95 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Irkutsk
-X-LIC-LOCATION:Asia/Irkutsk
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:IRKST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:IRKT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0657
-TZOFFSETTO:+0657
-TZNAME:IMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0657
-TZOFFSETTO:+0700
-TZNAME:IRKT
-DTSTART:19200125T000000
-RDATE:19200125T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:IRKT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:IRKST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:IRKT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0800
-TZNAME:IRKST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:IRKT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Istanbul.ics b/libical/zoneinfo/Asia/Istanbul.ics
deleted file mode 100644
index 9f6cca5aa6..0000000000
--- a/libical/zoneinfo/Asia/Istanbul.ics
+++ /dev/null
@@ -1,161 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Istanbul
-X-LIC-LOCATION:Asia/Istanbul
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19910331T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0156
-TZOFFSETTO:+0157
-TZNAME:IMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0157
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19101001T000000
-RDATE:19101001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19160501T000000
-RDATE:19160501T000000
-RDATE:19200328T000000
-RDATE:19210403T000000
-RDATE:19220326T000000
-RDATE:19240513T000000
-RDATE:19250501T000000
-RDATE:19400630T000000
-RDATE:19401201T000000
-RDATE:19420401T000000
-RDATE:19450402T000000
-RDATE:19460601T000000
-RDATE:19470420T000000
-RDATE:19480418T000000
-RDATE:19490410T000000
-RDATE:19500419T000000
-RDATE:19510422T000000
-RDATE:19620715T000000
-RDATE:19640515T000000
-RDATE:19700503T000000
-RDATE:19710502T000000
-RDATE:19720507T000000
-RDATE:19730603T010000
-RDATE:19740331T020000
-RDATE:19750330T000000
-RDATE:19760601T000000
-RDATE:19770403T000000
-RDATE:19780402T000000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19161001T000000
-RDATE:19161001T000000
-RDATE:19201025T000000
-RDATE:19211003T000000
-RDATE:19221008T000000
-RDATE:19241001T000000
-RDATE:19251001T000000
-RDATE:19401005T000000
-RDATE:19410921T000000
-RDATE:19421101T000000
-RDATE:19451008T000000
-RDATE:19461001T000000
-RDATE:19471005T000000
-RDATE:19481003T000000
-RDATE:19491002T000000
-RDATE:19501008T000000
-RDATE:19511008T000000
-RDATE:19621008T000000
-RDATE:19641001T000000
-RDATE:19701004T000000
-RDATE:19711003T000000
-RDATE:19721008T000000
-RDATE:19731104T030000
-RDATE:19741103T050000
-RDATE:19751026T000000
-RDATE:19761031T000000
-RDATE:19771016T000000
-RDATE:19850928T000000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T040000
-RDATE:19920927T040000
-RDATE:19930926T040000
-RDATE:19940925T040000
-RDATE:19950924T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:TRT
-DTSTART:19781015T000000
-RDATE:19781015T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:TRST
-DTSTART:19790401T030000
-RDATE:19790401T030000
-RDATE:19800406T030000
-RDATE:19810329T030000
-RDATE:19820328T030000
-RDATE:19830731T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:TRT
-DTSTART:19791015T000000
-RDATE:19791015T000000
-RDATE:19801013T000000
-RDATE:19811012T000000
-RDATE:19821011T000000
-RDATE:19831002T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19850420T000000
-RDATE:19850420T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19860101T000000
-RDATE:19860101T000000
-RDATE:19910101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Jakarta.ics b/libical/zoneinfo/Asia/Jakarta.ics
deleted file mode 100644
index d26c298d40..0000000000
--- a/libical/zoneinfo/Asia/Jakarta.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Jakarta
-X-LIC-LOCATION:Asia/Jakarta
-BEGIN:STANDARD
-TZOFFSETFROM:+0707
-TZOFFSETTO:+0707
-TZNAME:JMT
-DTSTART:18670810T000000
-RDATE:18670810T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0707
-TZOFFSETTO:+0720
-TZNAME:JAVT
-DTSTART:19231231T234712
-RDATE:19231231T234712
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0720
-TZOFFSETTO:+0730
-TZNAME:WIT
-DTSTART:19321101T000000
-RDATE:19321101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420323T000000
-RDATE:19420323T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0730
-TZNAME:WIT
-DTSTART:19450801T000000
-RDATE:19450801T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:WIT
-DTSTART:19480501T000000
-RDATE:19480501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0730
-TZNAME:WIT
-DTSTART:19500501T000000
-RDATE:19500501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0700
-TZNAME:WIT
-DTSTART:19640101T000000
-RDATE:19640101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Jayapura.ics b/libical/zoneinfo/Asia/Jayapura.ics
deleted file mode 100644
index 5a166a50b8..0000000000
--- a/libical/zoneinfo/Asia/Jayapura.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Jayapura
-X-LIC-LOCATION:Asia/Jayapura
-BEGIN:STANDARD
-TZOFFSETFROM:+0923
-TZOFFSETTO:+0900
-TZNAME:EIT
-DTSTART:19321101T000000
-RDATE:19321101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19440101T000000
-RDATE:19440101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0930
-TZOFFSETTO:+0900
-TZNAME:EIT
-DTSTART:19640101T000000
-RDATE:19640101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Jerusalem.ics b/libical/zoneinfo/Asia/Jerusalem.ics
deleted file mode 100644
index 69cc2d4bbd..0000000000
--- a/libical/zoneinfo/Asia/Jerusalem.ics
+++ /dev/null
@@ -1,135 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Jerusalem
-X-LIC-LOCATION:Asia/Jerusalem
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:IDT
-DTSTART:20050401T010000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYMONTHDAY=1
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:IST
-DTSTART:20051001T010000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYMONTHDAY=1
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0221
-TZOFFSETTO:+0221
-TZNAME:JMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0221
-TZOFFSETTO:+0200
-TZNAME:IST
-DTSTART:19180101T000000
-RDATE:19180101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:IDT
-DTSTART:19400601T000000
-RDATE:19400601T000000
-RDATE:19430401T020000
-RDATE:19440401T000000
-RDATE:19450416T000000
-RDATE:19460416T020000
-RDATE:19490501T000000
-RDATE:19500416T000000
-RDATE:19510401T000000
-RDATE:19520420T020000
-RDATE:19530412T020000
-RDATE:19540613T000000
-RDATE:19550611T020000
-RDATE:19560603T000000
-RDATE:19570429T020000
-RDATE:19740707T000000
-RDATE:19750420T000000
-RDATE:19850414T000000
-RDATE:19860518T000000
-RDATE:19870415T000000
-RDATE:19880409T000000
-RDATE:19890430T000000
-RDATE:19900325T000000
-RDATE:19910324T000000
-RDATE:19920329T000000
-RDATE:19930402T000000
-RDATE:19940401T000000
-RDATE:19950331T000000
-RDATE:19960315T000000
-RDATE:19970321T000000
-RDATE:19980320T000000
-RDATE:19990402T020000
-RDATE:20000414T020000
-RDATE:20010409T010000
-RDATE:20020329T010000
-RDATE:20030328T010000
-RDATE:20040407T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:IST
-DTSTART:19421101T000000
-RDATE:19421101T000000
-RDATE:19431101T000000
-RDATE:19441101T000000
-RDATE:19451101T020000
-RDATE:19461101T000000
-RDATE:19481101T020000
-RDATE:19491101T020000
-RDATE:19500915T030000
-RDATE:19511111T030000
-RDATE:19521019T030000
-RDATE:19530913T030000
-RDATE:19540912T000000
-RDATE:19550911T000000
-RDATE:19560930T030000
-RDATE:19570922T000000
-RDATE:19741013T000000
-RDATE:19750831T000000
-RDATE:19850915T000000
-RDATE:19860907T000000
-RDATE:19870913T000000
-RDATE:19880903T000000
-RDATE:19890903T000000
-RDATE:19900826T000000
-RDATE:19910901T000000
-RDATE:19920906T000000
-RDATE:19930905T000000
-RDATE:19940828T000000
-RDATE:19950903T000000
-RDATE:19960916T000000
-RDATE:19970914T000000
-RDATE:19980906T000000
-RDATE:19990903T020000
-RDATE:20001006T010000
-RDATE:20010924T010000
-RDATE:20021007T010000
-RDATE:20031003T010000
-RDATE:20040922T010000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0400
-TZNAME:IDDT
-DTSTART:19480523T000000
-RDATE:19480523T000000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:IDT
-DTSTART:19480901T000000
-RDATE:19480901T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Kabul.ics b/libical/zoneinfo/Asia/Kabul.ics
deleted file mode 100644
index 365403842b..0000000000
--- a/libical/zoneinfo/Asia/Kabul.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Kabul
-X-LIC-LOCATION:Asia/Kabul
-BEGIN:STANDARD
-TZOFFSETFROM:+0437
-TZOFFSETTO:+0400
-TZNAME:AFT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0430
-TZNAME:AFT
-DTSTART:19450101T000000
-RDATE:19450101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Kamchatka.ics b/libical/zoneinfo/Asia/Kamchatka.ics
deleted file mode 100644
index 3da0955457..0000000000
--- a/libical/zoneinfo/Asia/Kamchatka.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Kamchatka
-X-LIC-LOCATION:Asia/Kamchatka
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:PETST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:PETT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1035
-TZOFFSETTO:+1100
-TZNAME:PETT
-DTSTART:19221110T000000
-RDATE:19221110T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:PETT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:PETST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:PETT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1200
-TZNAME:PETST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:PETT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Karachi.ics b/libical/zoneinfo/Asia/Karachi.ics
deleted file mode 100644
index e3266acfb2..0000000000
--- a/libical/zoneinfo/Asia/Karachi.ics
+++ /dev/null
@@ -1,43 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Karachi
-X-LIC-LOCATION:Asia/Karachi
-BEGIN:STANDARD
-TZOFFSETFROM:+0428
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19070101T000000
-RDATE:19070101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0630
-TZNAME:IST
-DTSTART:19420901T000000
-RDATE:19420901T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19451015T000000
-RDATE:19451015T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0500
-TZNAME:KART
-DTSTART:19510930T000000
-RDATE:19510930T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:PKT
-DTSTART:19710326T000000
-RDATE:19710326T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Kashgar.ics b/libical/zoneinfo/Asia/Kashgar.ics
deleted file mode 100644
index 2f96299289..0000000000
--- a/libical/zoneinfo/Asia/Kashgar.ics
+++ /dev/null
@@ -1,53 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Kashgar
-X-LIC-LOCATION:Asia/Kashgar
-BEGIN:STANDARD
-TZOFFSETFROM:+0504
-TZOFFSETTO:+0530
-TZNAME:KAST
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0500
-TZNAME:KAST
-DTSTART:19400101T000000
-RDATE:19400101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19800501T000000
-RDATE:19800501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:CDT
-DTSTART:19860504T000000
-RDATE:19860504T000000
-RDATE:19870412T000000
-RDATE:19880410T000000
-RDATE:19890416T000000
-RDATE:19900415T000000
-RDATE:19910414T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19860914T000000
-RDATE:19860914T000000
-RDATE:19870913T000000
-RDATE:19880911T000000
-RDATE:19890917T000000
-RDATE:19900916T000000
-RDATE:19910915T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Katmandu.ics b/libical/zoneinfo/Asia/Katmandu.ics
deleted file mode 100644
index 1b0a88eccc..0000000000
--- a/libical/zoneinfo/Asia/Katmandu.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Katmandu
-X-LIC-LOCATION:Asia/Katmandu
-BEGIN:STANDARD
-TZOFFSETFROM:+0541
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0545
-TZNAME:NPT
-DTSTART:19860101T000000
-RDATE:19860101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Krasnoyarsk.ics b/libical/zoneinfo/Asia/Krasnoyarsk.ics
deleted file mode 100644
index 49e9a9b041..0000000000
--- a/libical/zoneinfo/Asia/Krasnoyarsk.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Krasnoyarsk
-X-LIC-LOCATION:Asia/Krasnoyarsk
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:KRAST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:KRAT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0611
-TZOFFSETTO:+0600
-TZNAME:KRAT
-DTSTART:19200106T000000
-RDATE:19200106T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:KRAT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:KRAST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:KRAT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0700
-TZNAME:KRAST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:KRAT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Kuala_Lumpur.ics b/libical/zoneinfo/Asia/Kuala_Lumpur.ics
deleted file mode 100644
index b6d1886793..0000000000
--- a/libical/zoneinfo/Asia/Kuala_Lumpur.ics
+++ /dev/null
@@ -1,57 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Kuala_Lumpur
-X-LIC-LOCATION:Asia/Kuala_Lumpur
-BEGIN:STANDARD
-TZOFFSETFROM:+0647
-TZOFFSETTO:+0655
-TZNAME:SMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0655
-TZOFFSETTO:+0700
-TZNAME:MALT
-DTSTART:19050601T000000
-RDATE:19050601T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0720
-TZNAME:MALT
-DTSTART:19330101T000000
-RDATE:19330101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0720
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420215T000000
-RDATE:19420215T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0720
-TZNAME:MALT
-DTSTART:19450902T000000
-RDATE:19450902T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0720
-TZOFFSETTO:+0730
-TZNAME:MALT
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:MYT
-DTSTART:19820501T000000
-RDATE:19820501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Kuching.ics b/libical/zoneinfo/Asia/Kuching.ics
deleted file mode 100644
index 50a35e6962..0000000000
--- a/libical/zoneinfo/Asia/Kuching.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Kuching
-X-LIC-LOCATION:Asia/Kuching
-BEGIN:STANDARD
-TZOFFSETFROM:+0721
-TZOFFSETTO:+0730
-TZNAME:BORT
-DTSTART:19260301T000000
-RDATE:19260301T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:BORT
-DTSTART:19330101T000000
-RDATE:19330101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0820
-TZNAME:BORTST
-DTSTART:19350914T000000
-RDATE:19350914T000000
-RDATE:19360914T000000
-RDATE:19370914T000000
-RDATE:19380914T000000
-RDATE:19390914T000000
-RDATE:19400914T000000
-RDATE:19410914T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0820
-TZOFFSETTO:+0800
-TZNAME:BORT
-DTSTART:19351214T000000
-RDATE:19351214T000000
-RDATE:19361214T000000
-RDATE:19371214T000000
-RDATE:19381214T000000
-RDATE:19391214T000000
-RDATE:19401214T000000
-RDATE:19411214T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420101T000000
-RDATE:19420101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:BORT
-DTSTART:19450902T000000
-RDATE:19450902T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0800
-TZNAME:MYT
-DTSTART:19820501T000000
-RDATE:19820501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Kuwait.ics b/libical/zoneinfo/Asia/Kuwait.ics
deleted file mode 100644
index ecf3b9ee66..0000000000
--- a/libical/zoneinfo/Asia/Kuwait.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Kuwait
-X-LIC-LOCATION:Asia/Kuwait
-BEGIN:STANDARD
-TZOFFSETFROM:+0312
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Macao.ics b/libical/zoneinfo/Asia/Macao.ics
deleted file mode 100644
index 9e4deba37a..0000000000
--- a/libical/zoneinfo/Asia/Macao.ics
+++ /dev/null
@@ -1,74 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Macao
-X-LIC-LOCATION:Asia/Macao
-BEGIN:STANDARD
-TZOFFSETFROM:+0734
-TZOFFSETTO:+0800
-TZNAME:MOT
-DTSTART:19120101T000000
-RDATE:19120101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:MOST
-DTSTART:19610319T033000
-RDATE:19610319T033000
-RDATE:19620318T033000
-RDATE:19630317T000000
-RDATE:19640322T033000
-RDATE:19650321T000000
-RDATE:19660417T033000
-RDATE:19670416T033000
-RDATE:19680421T033000
-RDATE:19690420T033000
-RDATE:19700419T033000
-RDATE:19710418T033000
-RDATE:19720416T000000
-RDATE:19730415T000000
-RDATE:19740421T000000
-RDATE:19750420T033000
-RDATE:19760418T033000
-RDATE:19770417T033000
-RDATE:19780416T000000
-RDATE:19790415T000000
-RDATE:19800420T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:MOT
-DTSTART:19611105T033000
-RDATE:19611105T033000
-RDATE:19621104T033000
-RDATE:19631103T033000
-RDATE:19641101T033000
-RDATE:19651031T000000
-RDATE:19661016T033000
-RDATE:19671022T033000
-RDATE:19681020T033000
-RDATE:19691019T033000
-RDATE:19701018T033000
-RDATE:19711017T033000
-RDATE:19721015T000000
-RDATE:19731021T000000
-RDATE:19741020T033000
-RDATE:19751019T033000
-RDATE:19761017T033000
-RDATE:19771016T033000
-RDATE:19781015T000000
-RDATE:19791021T000000
-RDATE:19801019T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19991220T000000
-RDATE:19991220T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Magadan.ics b/libical/zoneinfo/Asia/Magadan.ics
deleted file mode 100644
index fa83cb769a..0000000000
--- a/libical/zoneinfo/Asia/Magadan.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Magadan
-X-LIC-LOCATION:Asia/Magadan
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:MAGST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:MAGT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1003
-TZOFFSETTO:+1000
-TZNAME:MAGT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:MAGT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:MAGST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:MAGT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1100
-TZNAME:MAGST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:MAGT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Manila.ics b/libical/zoneinfo/Asia/Manila.ics
deleted file mode 100644
index fdf8b25712..0000000000
--- a/libical/zoneinfo/Asia/Manila.ics
+++ /dev/null
@@ -1,48 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Manila
-X-LIC-LOCATION:Asia/Manila
-BEGIN:STANDARD
-TZOFFSETFROM:-1556
-TZOFFSETTO:+0804
-TZNAME:LMT
-DTSTART:18441231T000000
-RDATE:18441231T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0804
-TZOFFSETTO:+0800
-TZNAME:PHT
-DTSTART:18990511T000000
-RDATE:18990511T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:PHST
-DTSTART:19361101T000000
-RDATE:19361101T000000
-RDATE:19540412T000000
-RDATE:19780322T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:PHT
-DTSTART:19370201T000000
-RDATE:19370201T000000
-RDATE:19441101T000000
-RDATE:19540701T000000
-RDATE:19780921T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420501T000000
-RDATE:19420501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Muscat.ics b/libical/zoneinfo/Asia/Muscat.ics
deleted file mode 100644
index 2cec32291e..0000000000
--- a/libical/zoneinfo/Asia/Muscat.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Muscat
-X-LIC-LOCATION:Asia/Muscat
-BEGIN:STANDARD
-TZOFFSETFROM:+0354
-TZOFFSETTO:+0400
-TZNAME:GST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Nicosia.ics b/libical/zoneinfo/Asia/Nicosia.ics
deleted file mode 100644
index 143cc193d7..0000000000
--- a/libical/zoneinfo/Asia/Nicosia.ics
+++ /dev/null
@@ -1,96 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Nicosia
-X-LIC-LOCATION:Asia/Nicosia
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19990328T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19991031T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0213
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19211114T000000
-RDATE:19211114T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19750413T000000
-RDATE:19750413T000000
-RDATE:19760515T000000
-RDATE:19770403T000000
-RDATE:19780402T000000
-RDATE:19790401T000000
-RDATE:19800406T000000
-RDATE:19810329T000000
-RDATE:19820328T000000
-RDATE:19830327T000000
-RDATE:19840325T000000
-RDATE:19850331T000000
-RDATE:19860330T000000
-RDATE:19870329T000000
-RDATE:19880327T000000
-RDATE:19890326T000000
-RDATE:19900325T000000
-RDATE:19910331T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-RDATE:19950326T000000
-RDATE:19960331T000000
-RDATE:19970330T000000
-RDATE:19980329T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19751012T000000
-RDATE:19751012T000000
-RDATE:19761011T000000
-RDATE:19770925T000000
-RDATE:19781002T000000
-RDATE:19790930T000000
-RDATE:19800928T000000
-RDATE:19810927T000000
-RDATE:19820926T000000
-RDATE:19830925T000000
-RDATE:19840930T000000
-RDATE:19850929T000000
-RDATE:19860928T000000
-RDATE:19870927T000000
-RDATE:19880925T000000
-RDATE:19890924T000000
-RDATE:19900930T000000
-RDATE:19910929T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19960929T000000
-RDATE:19970928T000000
-RDATE:19980901T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19981025T030000
-RDATE:19981025T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Novosibirsk.ics b/libical/zoneinfo/Asia/Novosibirsk.ics
deleted file mode 100644
index 15d258ab0b..0000000000
--- a/libical/zoneinfo/Asia/Novosibirsk.ics
+++ /dev/null
@@ -1,102 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Novosibirsk
-X-LIC-LOCATION:Asia/Novosibirsk
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:NOVST
-DTSTART:19940327T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:NOVT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0532
-TZOFFSETTO:+0600
-TZNAME:NOVT
-DTSTART:19191214T060000
-RDATE:19191214T060000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:NOVT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:NOVST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-RDATE:19930328T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:NOVT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0700
-TZNAME:NOVST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:NOVT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0600
-TZNAME:NOVT
-DTSTART:19930523T000000
-RDATE:19930523T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:NOVT
-DTSTART:19930926T020000
-RDATE:19930926T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Omsk.ics b/libical/zoneinfo/Asia/Omsk.ics
deleted file mode 100644
index 3b5ac69af4..0000000000
--- a/libical/zoneinfo/Asia/Omsk.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Omsk
-X-LIC-LOCATION:Asia/Omsk
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:OMSST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:OMST
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0454
-TZOFFSETTO:+0500
-TZNAME:OMST
-DTSTART:19191114T000000
-RDATE:19191114T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:OMST
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:OMSST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:OMST
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:OMSST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:OMST
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Phnom_Penh.ics b/libical/zoneinfo/Asia/Phnom_Penh.ics
deleted file mode 100644
index 58464d58bc..0000000000
--- a/libical/zoneinfo/Asia/Phnom_Penh.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Phnom_Penh
-X-LIC-LOCATION:Asia/Phnom_Penh
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0706
-TZNAME:SMT
-DTSTART:19060609T000000
-RDATE:19060609T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0706
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19110311T000100
-RDATE:19110311T000100
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:ICT
-DTSTART:19120501T000000
-RDATE:19120501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19310501T000000
-RDATE:19310501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Pontianak.ics b/libical/zoneinfo/Asia/Pontianak.ics
deleted file mode 100644
index d629f65ea6..0000000000
--- a/libical/zoneinfo/Asia/Pontianak.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Pontianak
-X-LIC-LOCATION:Asia/Pontianak
-BEGIN:STANDARD
-TZOFFSETFROM:+0717
-TZOFFSETTO:+0717
-TZNAME:PMT
-DTSTART:19080501T000000
-RDATE:19080501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0717
-TZOFFSETTO:+0730
-TZNAME:WIT
-DTSTART:19321101T000000
-RDATE:19321101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420129T000000
-RDATE:19420129T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0730
-TZNAME:WIT
-DTSTART:19450801T000000
-RDATE:19450801T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:WIT
-DTSTART:19480501T000000
-RDATE:19480501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0730
-TZNAME:WIT
-DTSTART:19500501T000000
-RDATE:19500501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:CIT
-DTSTART:19640101T000000
-RDATE:19640101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:WIT
-DTSTART:19880101T000000
-RDATE:19880101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Pyongyang.ics b/libical/zoneinfo/Asia/Pyongyang.ics
deleted file mode 100644
index 62c925eb8a..0000000000
--- a/libical/zoneinfo/Asia/Pyongyang.ics
+++ /dev/null
@@ -1,44 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Pyongyang
-X-LIC-LOCATION:Asia/Pyongyang
-BEGIN:STANDARD
-TZOFFSETFROM:+0823
-TZOFFSETTO:+0830
-TZNAME:KST
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0830
-TZOFFSETTO:+0900
-TZNAME:KST
-DTSTART:19041201T000000
-RDATE:19041201T000000
-RDATE:19320101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0830
-TZNAME:KST
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:KST
-DTSTART:19540321T000000
-RDATE:19540321T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:KST
-DTSTART:19610810T000000
-RDATE:19610810T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Qatar.ics b/libical/zoneinfo/Asia/Qatar.ics
deleted file mode 100644
index cd9ead1246..0000000000
--- a/libical/zoneinfo/Asia/Qatar.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Qatar
-X-LIC-LOCATION:Asia/Qatar
-BEGIN:STANDARD
-TZOFFSETFROM:+0326
-TZOFFSETTO:+0400
-TZNAME:GST
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19720601T000000
-RDATE:19720601T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Rangoon.ics b/libical/zoneinfo/Asia/Rangoon.ics
deleted file mode 100644
index 4d4062c77c..0000000000
--- a/libical/zoneinfo/Asia/Rangoon.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Rangoon
-X-LIC-LOCATION:Asia/Rangoon
-BEGIN:STANDARD
-TZOFFSETFROM:+0625
-TZOFFSETTO:+0625
-TZNAME:RMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0625
-TZOFFSETTO:+0630
-TZNAME:BURT
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420501T000000
-RDATE:19420501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0630
-TZNAME:MMT
-DTSTART:19450503T000000
-RDATE:19450503T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Riyadh.ics b/libical/zoneinfo/Asia/Riyadh.ics
deleted file mode 100644
index 1ba7574b31..0000000000
--- a/libical/zoneinfo/Asia/Riyadh.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Riyadh
-X-LIC-LOCATION:Asia/Riyadh
-BEGIN:STANDARD
-TZOFFSETFROM:+0307
-TZOFFSETTO:+0300
-TZNAME:AST
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Saigon.ics b/libical/zoneinfo/Asia/Saigon.ics
deleted file mode 100644
index 40d07dfff3..0000000000
--- a/libical/zoneinfo/Asia/Saigon.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Saigon
-X-LIC-LOCATION:Asia/Saigon
-BEGIN:STANDARD
-TZOFFSETFROM:+0707
-TZOFFSETTO:+0706
-TZNAME:SMT
-DTSTART:19060609T000000
-RDATE:19060609T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0706
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19110311T000100
-RDATE:19110311T000100
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:ICT
-DTSTART:19120501T000000
-RDATE:19120501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19310501T000000
-RDATE:19310501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Samarkand.ics b/libical/zoneinfo/Asia/Samarkand.ics
deleted file mode 100644
index 02e0b50c62..0000000000
--- a/libical/zoneinfo/Asia/Samarkand.ics
+++ /dev/null
@@ -1,97 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Samarkand
-X-LIC-LOCATION:Asia/Samarkand
-BEGIN:STANDARD
-TZOFFSETFROM:+0427
-TZOFFSETTO:+0400
-TZNAME:SAMT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:SAMT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:SAMST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:TAST
-DTSTART:19811001T000000
-RDATE:19811001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:TASST
-DTSTART:19820401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:TAST
-DTSTART:19821001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:TASST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:UZT
-DTSTART:19910901T000000
-RDATE:19910901T000000
-RDATE:19920926T230000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:UZT
-DTSTART:19910929T020000
-RDATE:19910929T020000
-RDATE:19920101T000000
-RDATE:19930101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:UZST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Seoul.ics b/libical/zoneinfo/Asia/Seoul.ics
deleted file mode 100644
index 8150cd704d..0000000000
--- a/libical/zoneinfo/Asia/Seoul.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Seoul
-X-LIC-LOCATION:Asia/Seoul
-BEGIN:STANDARD
-TZOFFSETFROM:+0828
-TZOFFSETTO:+0830
-TZNAME:KST
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0830
-TZOFFSETTO:+0900
-TZNAME:KST
-DTSTART:19041201T000000
-RDATE:19041201T000000
-RDATE:19320101T000000
-RDATE:19681001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0830
-TZNAME:KST
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:KST
-DTSTART:19540321T000000
-RDATE:19540321T000000
-RDATE:19600913T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:KDT
-DTSTART:19600515T000000
-RDATE:19600515T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0830
-TZNAME:KST
-DTSTART:19610810T000000
-RDATE:19610810T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1000
-TZNAME:KDT
-DTSTART:19870510T000000
-RDATE:19870510T000000
-RDATE:19880508T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+0900
-TZNAME:KST
-DTSTART:19871011T000000
-RDATE:19871011T000000
-RDATE:19881009T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Shanghai.ics b/libical/zoneinfo/Asia/Shanghai.ics
deleted file mode 100644
index 87a555bac8..0000000000
--- a/libical/zoneinfo/Asia/Shanghai.ics
+++ /dev/null
@@ -1,50 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Shanghai
-X-LIC-LOCATION:Asia/Shanghai
-BEGIN:STANDARD
-TZOFFSETFROM:+0806
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:CDT
-DTSTART:19400603T000000
-RDATE:19400603T000000
-RDATE:19410316T000000
-RDATE:19860504T000000
-RDATE:19870412T000000
-RDATE:19880410T000000
-RDATE:19890416T000000
-RDATE:19900415T000000
-RDATE:19910414T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19401001T000000
-RDATE:19401001T000000
-RDATE:19411001T000000
-RDATE:19860914T000000
-RDATE:19870913T000000
-RDATE:19880911T000000
-RDATE:19890917T000000
-RDATE:19900916T000000
-RDATE:19910915T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19490101T000000
-RDATE:19490101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Singapore.ics b/libical/zoneinfo/Asia/Singapore.ics
deleted file mode 100644
index 5639c223a3..0000000000
--- a/libical/zoneinfo/Asia/Singapore.ics
+++ /dev/null
@@ -1,64 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Singapore
-X-LIC-LOCATION:Asia/Singapore
-BEGIN:STANDARD
-TZOFFSETFROM:+0655
-TZOFFSETTO:+0655
-TZNAME:SMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0655
-TZOFFSETTO:+0700
-TZNAME:MALT
-DTSTART:19050601T000000
-RDATE:19050601T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0720
-TZNAME:MALT
-DTSTART:19330101T000000
-RDATE:19330101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0720
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420215T000000
-RDATE:19420215T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0720
-TZNAME:MALT
-DTSTART:19450902T000000
-RDATE:19450902T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0720
-TZOFFSETTO:+0730
-TZNAME:MALT
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0730
-TZNAME:SGT
-DTSTART:19650809T000000
-RDATE:19650809T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0730
-TZOFFSETTO:+0800
-TZNAME:SGT
-DTSTART:19820501T000000
-RDATE:19820501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Taipei.ics b/libical/zoneinfo/Asia/Taipei.ics
deleted file mode 100644
index bab9ce34e4..0000000000
--- a/libical/zoneinfo/Asia/Taipei.ics
+++ /dev/null
@@ -1,67 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Taipei
-X-LIC-LOCATION:Asia/Taipei
-BEGIN:STANDARD
-TZOFFSETFROM:+0806
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:18960101T000000
-RDATE:18960101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:CDT
-DTSTART:19450501T000000
-RDATE:19450501T000000
-RDATE:19460501T000000
-RDATE:19470501T000000
-RDATE:19480501T000000
-RDATE:19490501T000000
-RDATE:19500501T000000
-RDATE:19510501T000000
-RDATE:19520301T000000
-RDATE:19530401T000000
-RDATE:19540401T000000
-RDATE:19550401T000000
-RDATE:19560401T000000
-RDATE:19570401T000000
-RDATE:19580401T000000
-RDATE:19590401T000000
-RDATE:19600601T000000
-RDATE:19610601T000000
-RDATE:19740401T000000
-RDATE:19750401T000000
-RDATE:19800630T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19451001T000000
-RDATE:19451001T000000
-RDATE:19461001T000000
-RDATE:19471001T000000
-RDATE:19481001T000000
-RDATE:19491001T000000
-RDATE:19501001T000000
-RDATE:19511001T000000
-RDATE:19521101T000000
-RDATE:19531101T000000
-RDATE:19541101T000000
-RDATE:19551001T000000
-RDATE:19561001T000000
-RDATE:19571001T000000
-RDATE:19581001T000000
-RDATE:19591001T000000
-RDATE:19601001T000000
-RDATE:19611001T000000
-RDATE:19741001T000000
-RDATE:19751001T000000
-RDATE:19800930T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Tashkent.ics b/libical/zoneinfo/Asia/Tashkent.ics
deleted file mode 100644
index 53b49e74b9..0000000000
--- a/libical/zoneinfo/Asia/Tashkent.ics
+++ /dev/null
@@ -1,85 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Tashkent
-X-LIC-LOCATION:Asia/Tashkent
-BEGIN:STANDARD
-TZOFFSETFROM:+0437
-TZOFFSETTO:+0500
-TZNAME:TAST
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:TAST
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0700
-TZNAME:TASST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0600
-TZNAME:TAST
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0600
-TZNAME:TASST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:UZT
-DTSTART:19910901T000000
-RDATE:19910901T000000
-RDATE:19920926T230000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:UZT
-DTSTART:19910929T020000
-RDATE:19910929T020000
-RDATE:19920101T000000
-RDATE:19930101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:UZST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Tbilisi.ics b/libical/zoneinfo/Asia/Tbilisi.ics
deleted file mode 100644
index df860a4f3c..0000000000
--- a/libical/zoneinfo/Asia/Tbilisi.ics
+++ /dev/null
@@ -1,138 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Tbilisi
-X-LIC-LOCATION:Asia/Tbilisi
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:GET
-DTSTART:19971026T000000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:GEST
-DTSTART:19980329T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0259
-TZOFFSETTO:+0259
-TZNAME:TBMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0259
-TZOFFSETTO:+0300
-TZNAME:TBIT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:TBIT
-DTSTART:19570301T000000
-RDATE:19570301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:TBIST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:TBIT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:TBIST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:GET
-DTSTART:19910409T000000
-RDATE:19910409T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:GET
-DTSTART:19910929T020000
-RDATE:19910929T020000
-RDATE:19920101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:GEST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:GET
-DTSTART:19940925T000000
-RDATE:19940925T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:GEST
-DTSTART:19950326T000000
-RDATE:19950326T000000
-RDATE:19960331T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:GET
-DTSTART:19950924T000000
-RDATE:19950924T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:GEST
-DTSTART:19961027T000000
-RDATE:19961027T000000
-RDATE:19970330T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Tehran.ics b/libical/zoneinfo/Asia/Tehran.ics
deleted file mode 100644
index 2f6fbb5be1..0000000000
--- a/libical/zoneinfo/Asia/Tehran.ics
+++ /dev/null
@@ -1,160 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Tehran
-X-LIC-LOCATION:Asia/Tehran
-BEGIN:STANDARD
-TZOFFSETFROM:+0326
-TZOFFSETTO:+0326
-TZNAME:TMT
-DTSTART:19160101T000000
-RDATE:19160101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0326
-TZOFFSETTO:+0330
-TZNAME:IRT
-DTSTART:19460101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0330
-TZOFFSETTO:+0400
-TZNAME:IRT
-DTSTART:19771101T000000
-RDATE:19771101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:IRST
-DTSTART:19780321T000000
-RDATE:19780321T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:IRT
-DTSTART:19781021T000000
-RDATE:19781021T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0330
-TZNAME:IRT
-DTSTART:19790101T000000
-RDATE:19790101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0330
-TZOFFSETTO:+0430
-TZNAME:IRST
-DTSTART:19790321T000000
-RDATE:19790321T000000
-RDATE:19800321T000000
-RDATE:19910503T000000
-RDATE:19920321T000000
-RDATE:19930321T000000
-RDATE:19940321T000000
-RDATE:19950321T000000
-RDATE:19960320T000000
-RDATE:19970321T000000
-RDATE:19980321T000000
-RDATE:19990321T000000
-RDATE:20000320T000000
-RDATE:20010321T000000
-RDATE:20020321T000000
-RDATE:20030321T000000
-RDATE:20040320T000000
-RDATE:20050321T000000
-RDATE:20060321T000000
-RDATE:20070321T000000
-RDATE:20080320T000000
-RDATE:20090321T000000
-RDATE:20100321T000000
-RDATE:20110321T000000
-RDATE:20120320T000000
-RDATE:20130321T000000
-RDATE:20140321T000000
-RDATE:20150321T000000
-RDATE:20160320T000000
-RDATE:20170321T000000
-RDATE:20180321T000000
-RDATE:20190321T000000
-RDATE:20200320T000000
-RDATE:20210321T000000
-RDATE:20220321T000000
-RDATE:20230321T000000
-RDATE:20240320T000000
-RDATE:20250320T000000
-RDATE:20260321T000000
-RDATE:20270321T000000
-RDATE:20280320T000000
-RDATE:20290320T000000
-RDATE:20300321T000000
-RDATE:20310321T000000
-RDATE:20320320T000000
-RDATE:20330320T000000
-RDATE:20340321T000000
-RDATE:20350321T000000
-RDATE:20360320T000000
-RDATE:20370320T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0430
-TZOFFSETTO:+0330
-TZNAME:IRT
-DTSTART:19790919T000000
-RDATE:19790919T000000
-RDATE:19800923T000000
-RDATE:19910920T010000
-RDATE:19920923T000000
-RDATE:19930923T000000
-RDATE:19940923T000000
-RDATE:19950923T000000
-RDATE:19960922T000000
-RDATE:19970923T000000
-RDATE:19980923T000000
-RDATE:19990923T000000
-RDATE:20000922T000000
-RDATE:20010923T000000
-RDATE:20020923T000000
-RDATE:20030923T000000
-RDATE:20040922T000000
-RDATE:20050923T000000
-RDATE:20060923T000000
-RDATE:20070923T000000
-RDATE:20080922T000000
-RDATE:20090923T000000
-RDATE:20100923T000000
-RDATE:20110923T000000
-RDATE:20120922T000000
-RDATE:20130923T000000
-RDATE:20140923T000000
-RDATE:20150923T000000
-RDATE:20160922T000000
-RDATE:20170923T000000
-RDATE:20180923T000000
-RDATE:20190923T000000
-RDATE:20200922T000000
-RDATE:20210923T000000
-RDATE:20220923T000000
-RDATE:20230923T000000
-RDATE:20240922T000000
-RDATE:20250922T000000
-RDATE:20260923T000000
-RDATE:20270923T000000
-RDATE:20280922T000000
-RDATE:20290922T000000
-RDATE:20300923T000000
-RDATE:20310923T000000
-RDATE:20320922T000000
-RDATE:20330922T000000
-RDATE:20340923T000000
-RDATE:20350923T000000
-RDATE:20360922T000000
-RDATE:20370922T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Thimphu.ics b/libical/zoneinfo/Asia/Thimphu.ics
deleted file mode 100644
index c3826f058d..0000000000
--- a/libical/zoneinfo/Asia/Thimphu.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Thimphu
-X-LIC-LOCATION:Asia/Thimphu
-BEGIN:STANDARD
-TZOFFSETFROM:+0559
-TZOFFSETTO:+0530
-TZNAME:IST
-DTSTART:19470815T000000
-RDATE:19470815T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0530
-TZOFFSETTO:+0600
-TZNAME:BTT
-DTSTART:19871001T000000
-RDATE:19871001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Tokyo.ics b/libical/zoneinfo/Asia/Tokyo.ics
deleted file mode 100644
index fc519fbd1d..0000000000
--- a/libical/zoneinfo/Asia/Tokyo.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Tokyo
-X-LIC-LOCATION:Asia/Tokyo
-BEGIN:STANDARD
-TZOFFSETFROM:+0919
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:18880101T001900
-RDATE:18880101T001900
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0900
-TZNAME:CJT
-DTSTART:18960101T000000
-RDATE:18960101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19380101T000000
-RDATE:19380101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Ujung_Pandang.ics b/libical/zoneinfo/Asia/Ujung_Pandang.ics
deleted file mode 100644
index eda13fcb7d..0000000000
--- a/libical/zoneinfo/Asia/Ujung_Pandang.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Ujung_Pandang
-X-LIC-LOCATION:Asia/Ujung_Pandang
-BEGIN:STANDARD
-TZOFFSETFROM:+0758
-TZOFFSETTO:+0758
-TZNAME:MMT
-DTSTART:19200101T000000
-RDATE:19200101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0758
-TZOFFSETTO:+0800
-TZNAME:CIT
-DTSTART:19321101T000000
-RDATE:19321101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420209T000000
-RDATE:19420209T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CIT
-DTSTART:19450801T000000
-RDATE:19450801T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Ulaanbaatar.ics b/libical/zoneinfo/Asia/Ulaanbaatar.ics
deleted file mode 100644
index e4a4b44632..0000000000
--- a/libical/zoneinfo/Asia/Ulaanbaatar.ics
+++ /dev/null
@@ -1,68 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Ulaanbaatar
-X-LIC-LOCATION:Asia/Ulaanbaatar
-BEGIN:STANDARD
-TZOFFSETFROM:+0708
-TZOFFSETTO:+0700
-TZNAME:ULAT
-DTSTART:19050801T000000
-RDATE:19050801T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:ULAT
-DTSTART:19780101T000000
-RDATE:19780101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:ULAST
-DTSTART:19830401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19910331T020000
-RDATE:19920329T020000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-RDATE:19960331T020000
-RDATE:19970330T020000
-RDATE:19980329T020000
-RDATE:20010427T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:ULAT
-DTSTART:19831001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-RDATE:19960929T030000
-RDATE:19970928T030000
-RDATE:19980927T030000
-RDATE:20010928T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Urumqi.ics b/libical/zoneinfo/Asia/Urumqi.ics
deleted file mode 100644
index 582f951694..0000000000
--- a/libical/zoneinfo/Asia/Urumqi.ics
+++ /dev/null
@@ -1,46 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Urumqi
-X-LIC-LOCATION:Asia/Urumqi
-BEGIN:STANDARD
-TZOFFSETFROM:+0550
-TZOFFSETTO:+0600
-TZNAME:URUT
-DTSTART:19280101T000000
-RDATE:19280101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19800501T000000
-RDATE:19800501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:CDT
-DTSTART:19860504T000000
-RDATE:19860504T000000
-RDATE:19870412T000000
-RDATE:19880410T000000
-RDATE:19890416T000000
-RDATE:19900415T000000
-RDATE:19910414T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:CST
-DTSTART:19860914T000000
-RDATE:19860914T000000
-RDATE:19870913T000000
-RDATE:19880911T000000
-RDATE:19890917T000000
-RDATE:19900916T000000
-RDATE:19910915T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Vientiane.ics b/libical/zoneinfo/Asia/Vientiane.ics
deleted file mode 100644
index 248c36628d..0000000000
--- a/libical/zoneinfo/Asia/Vientiane.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Vientiane
-X-LIC-LOCATION:Asia/Vientiane
-BEGIN:STANDARD
-TZOFFSETFROM:+0650
-TZOFFSETTO:+0706
-TZNAME:SMT
-DTSTART:19060609T000000
-RDATE:19060609T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0706
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19110311T000100
-RDATE:19110311T000100
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0700
-TZOFFSETTO:+0800
-TZNAME:ICT
-DTSTART:19120501T000000
-RDATE:19120501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0700
-TZNAME:ICT
-DTSTART:19310501T000000
-RDATE:19310501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Vladivostok.ics b/libical/zoneinfo/Asia/Vladivostok.ics
deleted file mode 100644
index 45029ae050..0000000000
--- a/libical/zoneinfo/Asia/Vladivostok.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Vladivostok
-X-LIC-LOCATION:Asia/Vladivostok
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:VLAST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:VLAT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0848
-TZOFFSETTO:+0900
-TZNAME:VLAT
-DTSTART:19221115T000000
-RDATE:19221115T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1000
-TZNAME:VLAT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:VLAST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:VLAT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:VLASST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+0900
-TZNAME:VLAST
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Yakutsk.ics b/libical/zoneinfo/Asia/Yakutsk.ics
deleted file mode 100644
index 8841e6433f..0000000000
--- a/libical/zoneinfo/Asia/Yakutsk.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Yakutsk
-X-LIC-LOCATION:Asia/Yakutsk
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1000
-TZNAME:YAKST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+0900
-TZNAME:YAKT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0839
-TZOFFSETTO:+0800
-TZNAME:YAKT
-DTSTART:19191215T000000
-RDATE:19191215T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:YAKT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1000
-TZNAME:YAKST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+0900
-TZNAME:YAKT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0900
-TZNAME:YAKST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:YAKT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Yekaterinburg.ics b/libical/zoneinfo/Asia/Yekaterinburg.ics
deleted file mode 100644
index 5f15a2a0ab..0000000000
--- a/libical/zoneinfo/Asia/Yekaterinburg.ics
+++ /dev/null
@@ -1,106 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Yekaterinburg
-X-LIC-LOCATION:Asia/Yekaterinburg
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:YEKST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:YEKT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0402
-TZOFFSETTO:+0400
-TZNAME:SVET
-DTSTART:19190715T040000
-RDATE:19190715T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:SVET
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:SVEST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:SVET
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0500
-TZNAME:SVEST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:SVET
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:YEKT
-DTSTART:19920119T020000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:YEKST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0600
-TZOFFSETTO:+0500
-TZNAME:YEKT
-DTSTART:19920926T230000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Asia/Yerevan.ics b/libical/zoneinfo/Asia/Yerevan.ics
deleted file mode 100644
index 0bfdf1bbf2..0000000000
--- a/libical/zoneinfo/Asia/Yerevan.ics
+++ /dev/null
@@ -1,110 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Asia/Yerevan
-X-LIC-LOCATION:Asia/Yerevan
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:AMST
-DTSTART:19970330T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:AMT
-DTSTART:19971026T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0258
-TZOFFSETTO:+0300
-TZNAME:YERT
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:YERT
-DTSTART:19570301T000000
-RDATE:19570301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:YERST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:YERT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:YERST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:AMT
-DTSTART:19910923T000000
-RDATE:19910923T000000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:AMT
-DTSTART:19910929T020000
-RDATE:19910929T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:AMST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:AMT
-DTSTART:19950924T030000
-RDATE:19950924T030000
-RDATE:19970101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Azores.ics b/libical/zoneinfo/Atlantic/Azores.ics
deleted file mode 100644
index 87766b4ed4..0000000000
--- a/libical/zoneinfo/Atlantic/Azores.ics
+++ /dev/null
@@ -1,223 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Azores
-X-LIC-LOCATION:Atlantic/Azores
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:AZOST
-DTSTART:19940327T000000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:AZOT
-DTSTART:19961027T010000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0143
-TZOFFSETTO:-0155
-TZNAME:HMT
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0155
-TZOFFSETTO:-0200
-TZNAME:AZOT
-DTSTART:19110524T000000
-RDATE:19110524T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0100
-TZNAME:AZOST
-DTSTART:19160617T230000
-RDATE:19160617T230000
-RDATE:19170228T230000
-RDATE:19180301T230000
-RDATE:19190228T230000
-RDATE:19200229T230000
-RDATE:19210228T230000
-RDATE:19240416T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19310418T230000
-RDATE:19320402T230000
-RDATE:19340407T230000
-RDATE:19350330T230000
-RDATE:19360418T230000
-RDATE:19370403T230000
-RDATE:19380326T230000
-RDATE:19390415T230000
-RDATE:19400224T230000
-RDATE:19410405T230000
-RDATE:19420314T230000
-RDATE:19430313T230000
-RDATE:19440311T230000
-RDATE:19450310T230000
-RDATE:19460406T230000
-RDATE:19470406T020000
-RDATE:19480404T020000
-RDATE:19490403T020000
-RDATE:19510401T020000
-RDATE:19520406T020000
-RDATE:19530405T020000
-RDATE:19540404T020000
-RDATE:19550403T020000
-RDATE:19560401T020000
-RDATE:19570407T020000
-RDATE:19580406T020000
-RDATE:19590405T020000
-RDATE:19600403T020000
-RDATE:19610402T020000
-RDATE:19620401T020000
-RDATE:19630407T020000
-RDATE:19640405T020000
-RDATE:19650404T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:-0200
-TZNAME:AZOT
-DTSTART:19161101T010000
-RDATE:19161101T010000
-RDATE:19171015T000000
-RDATE:19181015T000000
-RDATE:19191015T000000
-RDATE:19201015T000000
-RDATE:19211015T000000
-RDATE:19241015T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19341007T000000
-RDATE:19351006T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391119T000000
-RDATE:19401006T000000
-RDATE:19411006T000000
-RDATE:19421025T000000
-RDATE:19431031T000000
-RDATE:19441029T000000
-RDATE:19451028T000000
-RDATE:19461006T000000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19511007T030000
-RDATE:19521005T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-RDATE:19571006T030000
-RDATE:19581005T030000
-RDATE:19591004T030000
-RDATE:19601002T030000
-RDATE:19611001T030000
-RDATE:19621007T030000
-RDATE:19631006T030000
-RDATE:19641004T030000
-RDATE:19651003T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:AZOMT
-DTSTART:19420425T230000
-RDATE:19420425T230000
-RDATE:19430417T230000
-RDATE:19440422T230000
-RDATE:19450421T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:AZOST
-DTSTART:19420816T000000
-RDATE:19420816T000000
-RDATE:19430829T000000
-RDATE:19440827T000000
-RDATE:19450826T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0100
-TZNAME:AZOT
-DTSTART:19660403T020000
-RDATE:19660403T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:AZOST
-DTSTART:19770327T000000
-RDATE:19770327T000000
-RDATE:19780402T000000
-RDATE:19790401T000000
-RDATE:19800330T000000
-RDATE:19810329T010000
-RDATE:19820328T010000
-RDATE:19830327T020000
-RDATE:19840325T010000
-RDATE:19850331T010000
-RDATE:19860330T010000
-RDATE:19870329T010000
-RDATE:19880327T010000
-RDATE:19890326T010000
-RDATE:19900325T010000
-RDATE:19910331T010000
-RDATE:19920329T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:AZOT
-DTSTART:19770925T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T020000
-RDATE:19800928T020000
-RDATE:19810927T020000
-RDATE:19820926T020000
-RDATE:19830925T020000
-RDATE:19840930T020000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-RDATE:19910929T020000
-RDATE:19930328T010000
-RDATE:19940925T010000
-RDATE:19950924T010000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19920927T020000
-RDATE:19920927T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:-0100
-TZNAME:AZOT
-DTSTART:19930926T000000
-RDATE:19930926T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Bermuda.ics b/libical/zoneinfo/Atlantic/Bermuda.ics
deleted file mode 100644
index aae2cc46e0..0000000000
--- a/libical/zoneinfo/Atlantic/Bermuda.ics
+++ /dev/null
@@ -1,48 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Bermuda
-X-LIC-LOCATION:Atlantic/Bermuda
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19741027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19870405T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0419
-TZOFFSETTO:-0400
-TZNAME:AST
-DTSTART:19300101T020000
-RDATE:19300101T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:ADT
-DTSTART:19740428T020000
-RDATE:19740428T020000
-RDATE:19750427T020000
-RDATE:19760425T020000
-RDATE:19770424T020000
-RDATE:19780430T020000
-RDATE:19790429T020000
-RDATE:19800427T020000
-RDATE:19810426T020000
-RDATE:19820425T020000
-RDATE:19830424T020000
-RDATE:19840429T020000
-RDATE:19850428T020000
-RDATE:19860427T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Canary.ics b/libical/zoneinfo/Atlantic/Canary.ics
deleted file mode 100644
index 737e6b8926..0000000000
--- a/libical/zoneinfo/Atlantic/Canary.ics
+++ /dev/null
@@ -1,65 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Canary
-X-LIC-LOCATION:Atlantic/Canary
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19810329T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19961027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0102
-TZOFFSETTO:-0100
-TZNAME:CANT
-DTSTART:19220301T000000
-RDATE:19220301T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19460930T010000
-RDATE:19460930T010000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19800406T000000
-RDATE:19800406T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19800928T020000
-RDATE:19800928T020000
-RDATE:19810927T020000
-RDATE:19820926T020000
-RDATE:19830925T020000
-RDATE:19840930T020000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-RDATE:19910929T020000
-RDATE:19920927T020000
-RDATE:19930926T020000
-RDATE:19940925T020000
-RDATE:19950924T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Cape_Verde.ics b/libical/zoneinfo/Atlantic/Cape_Verde.ics
deleted file mode 100644
index 59c9b7f4e4..0000000000
--- a/libical/zoneinfo/Atlantic/Cape_Verde.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Cape_Verde
-X-LIC-LOCATION:Atlantic/Cape_Verde
-BEGIN:STANDARD
-TZOFFSETFROM:-0134
-TZOFFSETTO:-0200
-TZNAME:CVT
-DTSTART:19070101T000000
-RDATE:19070101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0100
-TZNAME:CVST
-DTSTART:19420901T000000
-RDATE:19420901T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:-0200
-TZNAME:CVT
-DTSTART:19451015T000000
-RDATE:19451015T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0100
-TZNAME:CVT
-DTSTART:19751125T020000
-RDATE:19751125T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Faeroe.ics b/libical/zoneinfo/Atlantic/Faeroe.ics
deleted file mode 100644
index 3877690814..0000000000
--- a/libical/zoneinfo/Atlantic/Faeroe.ics
+++ /dev/null
@@ -1,57 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Faeroe
-X-LIC-LOCATION:Atlantic/Faeroe
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19810329T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19961027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0027
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19080111T000000
-RDATE:19080111T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19810101T000000
-RDATE:19810101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19810927T020000
-RDATE:19810927T020000
-RDATE:19820926T020000
-RDATE:19830925T020000
-RDATE:19840930T020000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-RDATE:19910929T020000
-RDATE:19920927T020000
-RDATE:19930926T020000
-RDATE:19940925T020000
-RDATE:19950924T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Jan_Mayen.ics b/libical/zoneinfo/Atlantic/Jan_Mayen.ics
deleted file mode 100644
index ff5e959c88..0000000000
--- a/libical/zoneinfo/Atlantic/Jan_Mayen.ics
+++ /dev/null
@@ -1,89 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Jan_Mayen
-X-LIC-LOCATION:Atlantic/Jan_Mayen
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0043
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160522T010000
-RDATE:19160522T010000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19590315T020000
-RDATE:19600320T020000
-RDATE:19610319T020000
-RDATE:19620318T020000
-RDATE:19630317T020000
-RDATE:19640315T020000
-RDATE:19650425T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19160930T000000
-RDATE:19160930T000000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451001T030000
-RDATE:19590920T030000
-RDATE:19600918T030000
-RDATE:19610917T030000
-RDATE:19620916T030000
-RDATE:19630915T030000
-RDATE:19640920T030000
-RDATE:19650919T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400810T230000
-RDATE:19400810T230000
-RDATE:19421102T020000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Madeira.ics b/libical/zoneinfo/Atlantic/Madeira.ics
deleted file mode 100644
index 646b72a324..0000000000
--- a/libical/zoneinfo/Atlantic/Madeira.ics
+++ /dev/null
@@ -1,201 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Madeira
-X-LIC-LOCATION:Atlantic/Madeira
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19840325T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19961027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0108
-TZOFFSETTO:-0108
-TZNAME:FMT
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0108
-TZOFFSETTO:-0100
-TZNAME:MADT
-DTSTART:19110524T000000
-RDATE:19110524T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:MADST
-DTSTART:19160617T230000
-RDATE:19160617T230000
-RDATE:19170228T230000
-RDATE:19180301T230000
-RDATE:19190228T230000
-RDATE:19200229T230000
-RDATE:19210228T230000
-RDATE:19240416T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19310418T230000
-RDATE:19320402T230000
-RDATE:19340407T230000
-RDATE:19350330T230000
-RDATE:19360418T230000
-RDATE:19370403T230000
-RDATE:19380326T230000
-RDATE:19390415T230000
-RDATE:19400224T230000
-RDATE:19410405T230000
-RDATE:19420314T230000
-RDATE:19430313T230000
-RDATE:19440311T230000
-RDATE:19450310T230000
-RDATE:19460406T230000
-RDATE:19470406T020000
-RDATE:19480404T020000
-RDATE:19490403T020000
-RDATE:19510401T020000
-RDATE:19520406T020000
-RDATE:19530405T020000
-RDATE:19540404T020000
-RDATE:19550403T020000
-RDATE:19560401T020000
-RDATE:19570407T020000
-RDATE:19580406T020000
-RDATE:19590405T020000
-RDATE:19600403T020000
-RDATE:19610402T020000
-RDATE:19620401T020000
-RDATE:19630407T020000
-RDATE:19640405T020000
-RDATE:19650404T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:MADT
-DTSTART:19161101T010000
-RDATE:19161101T010000
-RDATE:19171015T000000
-RDATE:19181015T000000
-RDATE:19191015T000000
-RDATE:19201015T000000
-RDATE:19211015T000000
-RDATE:19241015T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19341007T000000
-RDATE:19351006T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391119T000000
-RDATE:19401006T000000
-RDATE:19411006T000000
-RDATE:19421025T000000
-RDATE:19431031T000000
-RDATE:19441029T000000
-RDATE:19451028T000000
-RDATE:19461006T000000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19511007T030000
-RDATE:19521005T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-RDATE:19571006T030000
-RDATE:19581005T030000
-RDATE:19591004T030000
-RDATE:19601002T030000
-RDATE:19611001T030000
-RDATE:19621007T030000
-RDATE:19631006T030000
-RDATE:19641004T030000
-RDATE:19651003T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:MADMT
-DTSTART:19420425T230000
-RDATE:19420425T230000
-RDATE:19430417T230000
-RDATE:19440422T230000
-RDATE:19450421T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:MADST
-DTSTART:19420816T000000
-RDATE:19420816T000000
-RDATE:19430829T000000
-RDATE:19440827T000000
-RDATE:19450826T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19660403T020000
-RDATE:19660403T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19770327T000000
-RDATE:19770327T000000
-RDATE:19780402T000000
-RDATE:19790401T000000
-RDATE:19800330T000000
-RDATE:19810329T010000
-RDATE:19820328T010000
-RDATE:19830327T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19770925T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T020000
-RDATE:19800928T020000
-RDATE:19810927T020000
-RDATE:19820926T020000
-RDATE:19830925T020000
-RDATE:19840930T020000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-RDATE:19910929T020000
-RDATE:19920927T020000
-RDATE:19930926T020000
-RDATE:19940925T020000
-RDATE:19950924T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Reykjavik.ics b/libical/zoneinfo/Atlantic/Reykjavik.ics
deleted file mode 100644
index 7f57a095a8..0000000000
--- a/libical/zoneinfo/Atlantic/Reykjavik.ics
+++ /dev/null
@@ -1,103 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Reykjavik
-X-LIC-LOCATION:Atlantic/Reykjavik
-BEGIN:STANDARD
-TZOFFSETFROM:-0127
-TZOFFSETTO:-0128
-TZNAME:RMT
-DTSTART:18370101T000000
-RDATE:18370101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0128
-TZOFFSETTO:-0100
-TZNAME:IST
-DTSTART:19080101T000000
-RDATE:19080101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:ISST
-DTSTART:19170219T230000
-RDATE:19170219T230000
-RDATE:19180219T230000
-RDATE:19390429T230000
-RDATE:19400225T020000
-RDATE:19410302T010000
-RDATE:19420308T010000
-RDATE:19430307T010000
-RDATE:19440305T010000
-RDATE:19450304T010000
-RDATE:19460303T010000
-RDATE:19470406T010000
-RDATE:19480404T010000
-RDATE:19490403T010000
-RDATE:19500402T010000
-RDATE:19510401T010000
-RDATE:19520406T010000
-RDATE:19530405T010000
-RDATE:19540404T010000
-RDATE:19550403T010000
-RDATE:19560401T010000
-RDATE:19570407T010000
-RDATE:19580406T010000
-RDATE:19590405T010000
-RDATE:19600403T010000
-RDATE:19610402T010000
-RDATE:19620401T010000
-RDATE:19630407T010000
-RDATE:19640405T010000
-RDATE:19650404T010000
-RDATE:19660403T010000
-RDATE:19670402T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:-0100
-TZNAME:IST
-DTSTART:19171021T010000
-RDATE:19171021T010000
-RDATE:19181116T010000
-RDATE:19391129T020000
-RDATE:19401103T020000
-RDATE:19411102T020000
-RDATE:19421025T020000
-RDATE:19431024T020000
-RDATE:19441022T020000
-RDATE:19451028T020000
-RDATE:19461027T020000
-RDATE:19471026T020000
-RDATE:19481024T020000
-RDATE:19491030T020000
-RDATE:19501022T020000
-RDATE:19511028T020000
-RDATE:19521026T020000
-RDATE:19531025T020000
-RDATE:19541024T020000
-RDATE:19551023T020000
-RDATE:19561028T020000
-RDATE:19571027T020000
-RDATE:19581026T020000
-RDATE:19591025T020000
-RDATE:19601023T020000
-RDATE:19611022T020000
-RDATE:19621028T020000
-RDATE:19631027T020000
-RDATE:19641025T020000
-RDATE:19651024T020000
-RDATE:19661023T020000
-RDATE:19671029T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19680407T010000
-RDATE:19680407T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/South_Georgia.ics b/libical/zoneinfo/Atlantic/South_Georgia.ics
deleted file mode 100644
index b530ea0be4..0000000000
--- a/libical/zoneinfo/Atlantic/South_Georgia.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/South_Georgia
-X-LIC-LOCATION:Atlantic/South_Georgia
-BEGIN:STANDARD
-TZOFFSETFROM:-0226
-TZOFFSETTO:-0200
-TZNAME:GST
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/St_Helena.ics b/libical/zoneinfo/Atlantic/St_Helena.ics
deleted file mode 100644
index f0755f9b7e..0000000000
--- a/libical/zoneinfo/Atlantic/St_Helena.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/St_Helena
-X-LIC-LOCATION:Atlantic/St_Helena
-BEGIN:STANDARD
-TZOFFSETFROM:-0023
-TZOFFSETTO:-0023
-TZNAME:JMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0023
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19510101T000000
-RDATE:19510101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Atlantic/Stanley.ics b/libical/zoneinfo/Atlantic/Stanley.ics
deleted file mode 100644
index b2e3610fbf..0000000000
--- a/libical/zoneinfo/Atlantic/Stanley.ics
+++ /dev/null
@@ -1,120 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Atlantic/Stanley
-X-LIC-LOCATION:Atlantic/Stanley
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:FKT
-DTSTART:20010415T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=3SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:FKST
-DTSTART:20010902T020000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0351
-TZOFFSETTO:-0351
-TZNAME:SMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0351
-TZOFFSETTO:-0400
-TZNAME:FKT
-DTSTART:19120312T000000
-RDATE:19120312T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:FKST
-DTSTART:19370926T000000
-RDATE:19370926T000000
-RDATE:19380925T000000
-RDATE:19391001T000000
-RDATE:19400929T000000
-RDATE:19410928T000000
-RDATE:19420927T000000
-RDATE:19860914T000000
-RDATE:19870913T000000
-RDATE:19880911T000000
-RDATE:19890910T000000
-RDATE:19900909T000000
-RDATE:19910915T000000
-RDATE:19920913T000000
-RDATE:19930912T000000
-RDATE:19940911T000000
-RDATE:19950910T000000
-RDATE:19960915T000000
-RDATE:19970914T000000
-RDATE:19980913T000000
-RDATE:19990912T000000
-RDATE:20000910T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0400
-TZNAME:FKT
-DTSTART:19380320T000000
-RDATE:19380320T000000
-RDATE:19390319T000000
-RDATE:19400324T000000
-RDATE:19410323T000000
-RDATE:19420322T000000
-RDATE:19430101T000000
-RDATE:19860420T000000
-RDATE:19870419T000000
-RDATE:19880417T000000
-RDATE:19890416T000000
-RDATE:19900422T000000
-RDATE:19910421T000000
-RDATE:19920419T000000
-RDATE:19930418T000000
-RDATE:19940417T000000
-RDATE:19950416T000000
-RDATE:19960421T000000
-RDATE:19970420T000000
-RDATE:19980419T000000
-RDATE:19990418T000000
-RDATE:20000416T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0400
-TZOFFSETTO:-0300
-TZNAME:FKT
-DTSTART:19830501T000000
-RDATE:19830501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0200
-TZNAME:FKST
-DTSTART:19830925T000000
-RDATE:19830925T000000
-RDATE:19840916T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0200
-TZOFFSETTO:-0300
-TZNAME:FKT
-DTSTART:19840429T000000
-RDATE:19840429T000000
-RDATE:19850428T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0300
-TZOFFSETTO:-0300
-TZNAME:FKST
-DTSTART:19850915T000000
-RDATE:19850915T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Adelaide.ics b/libical/zoneinfo/Australia/Adelaide.ics
deleted file mode 100644
index bcb7c3c056..0000000000
--- a/libical/zoneinfo/Australia/Adelaide.ics
+++ /dev/null
@@ -1,102 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Adelaide
-X-LIC-LOCATION:Australia/Adelaide
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0930
-TZOFFSETTO:+1030
-TZNAME:CST
-DTSTART:19871025T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1030
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19950326T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0914
-TZOFFSETTO:+0900
-TZNAME:CST
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:18990501T000000
-RDATE:18990501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0930
-TZOFFSETTO:+1030
-TZNAME:CST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861019T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1030
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19720227T030000
-RDATE:19730304T030000
-RDATE:19740303T030000
-RDATE:19750302T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820307T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860316T030000
-RDATE:19870315T030000
-RDATE:19880320T030000
-RDATE:19890319T030000
-RDATE:19900318T030000
-RDATE:19910303T030000
-RDATE:19920322T030000
-RDATE:19930307T030000
-RDATE:19940320T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0930
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19710101T000000
-RDATE:19710101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Brisbane.ics b/libical/zoneinfo/Australia/Brisbane.ics
deleted file mode 100644
index 899154d476..0000000000
--- a/libical/zoneinfo/Australia/Brisbane.ics
+++ /dev/null
@@ -1,50 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Brisbane
-X-LIC-LOCATION:Australia/Brisbane
-BEGIN:STANDARD
-TZOFFSETFROM:+1012
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19711031T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19720227T030000
-RDATE:19900304T030000
-RDATE:19910303T030000
-RDATE:19920301T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19710101T000000
-RDATE:19710101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Broken_Hill.ics b/libical/zoneinfo/Australia/Broken_Hill.ics
deleted file mode 100644
index 983a03f258..0000000000
--- a/libical/zoneinfo/Australia/Broken_Hill.ics
+++ /dev/null
@@ -1,116 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Broken_Hill
-X-LIC-LOCATION:Australia/Broken_Hill
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0930
-TZOFFSETTO:+1030
-TZNAME:CST
-DTSTART:19871025T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1030
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:20010325T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0926
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+0900
-TZNAME:CST
-DTSTART:18960823T000000
-RDATE:18960823T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:18990501T000000
-RDATE:18990501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0930
-TZOFFSETTO:+1030
-TZNAME:CST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861019T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1030
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19720227T030000
-RDATE:19730304T030000
-RDATE:19740303T030000
-RDATE:19750302T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820404T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860316T030000
-RDATE:19870315T030000
-RDATE:19880320T030000
-RDATE:19890319T030000
-RDATE:19900304T030000
-RDATE:19910303T030000
-RDATE:19920301T030000
-RDATE:19930307T030000
-RDATE:19940306T030000
-RDATE:19950305T030000
-RDATE:19960331T030000
-RDATE:19970330T030000
-RDATE:19980329T030000
-RDATE:19990328T030000
-RDATE:20000101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0930
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19710101T000000
-RDATE:19710101T000000
-RDATE:20000326T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Darwin.ics b/libical/zoneinfo/Australia/Darwin.ics
deleted file mode 100644
index 927700e350..0000000000
--- a/libical/zoneinfo/Australia/Darwin.ics
+++ /dev/null
@@ -1,42 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Darwin
-X-LIC-LOCATION:Australia/Darwin
-BEGIN:STANDARD
-TZOFFSETFROM:+0843
-TZOFFSETTO:+0900
-TZNAME:CST
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:18990501T000000
-RDATE:18990501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0930
-TZOFFSETTO:+1030
-TZNAME:CST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1030
-TZOFFSETTO:+0930
-TZNAME:CST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Hobart.ics b/libical/zoneinfo/Australia/Hobart.ics
deleted file mode 100644
index 03f027f472..0000000000
--- a/libical/zoneinfo/Australia/Hobart.ics
+++ /dev/null
@@ -1,114 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Hobart
-X-LIC-LOCATION:Australia/Hobart
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19910331T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:20011007T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0949
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950901T000000
-RDATE:18950901T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:19161001T020000
-RDATE:19161001T020000
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19671001T020000
-RDATE:19681027T020000
-RDATE:19691026T020000
-RDATE:19701025T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861019T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911006T020000
-RDATE:19921004T020000
-RDATE:19931003T020000
-RDATE:19941002T020000
-RDATE:19951001T020000
-RDATE:19961006T020000
-RDATE:19971005T020000
-RDATE:19981004T020000
-RDATE:19991003T020000
-RDATE:20000827T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19170201T000000
-RDATE:19170201T000000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19680331T030000
-RDATE:19690309T030000
-RDATE:19700308T030000
-RDATE:19710314T030000
-RDATE:19720227T030000
-RDATE:19730304T030000
-RDATE:19740303T030000
-RDATE:19750302T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820328T030000
-RDATE:19830327T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860302T030000
-RDATE:19870315T030000
-RDATE:19880320T030000
-RDATE:19890319T030000
-RDATE:19900318T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19670101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Lindeman.ics b/libical/zoneinfo/Australia/Lindeman.ics
deleted file mode 100644
index 2f5c3aaed3..0000000000
--- a/libical/zoneinfo/Australia/Lindeman.ics
+++ /dev/null
@@ -1,55 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Lindeman
-X-LIC-LOCATION:Australia/Lindeman
-BEGIN:STANDARD
-TZOFFSETFROM:+0956
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19711031T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19720227T030000
-RDATE:19900304T030000
-RDATE:19910303T030000
-RDATE:19920301T030000
-RDATE:19930307T030000
-RDATE:19940306T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19710101T000000
-RDATE:19710101T000000
-RDATE:19920701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Lord_Howe.ics b/libical/zoneinfo/Australia/Lord_Howe.ics
deleted file mode 100644
index 4417f771e0..0000000000
--- a/libical/zoneinfo/Australia/Lord_Howe.ics
+++ /dev/null
@@ -1,94 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Lord_Howe
-X-LIC-LOCATION:Australia/Lord_Howe
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1030
-TZNAME:LHST
-DTSTART:19960331T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1030
-TZOFFSETTO:+1100
-TZNAME:LHST
-DTSTART:20011028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1036
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1030
-TZNAME:LHST
-DTSTART:19810301T000000
-RDATE:19810301T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1030
-TZOFFSETTO:+1130
-TZNAME:LHST
-DTSTART:19811025T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1130
-TZOFFSETTO:+1030
-TZNAME:LHST
-DTSTART:19820307T020000
-RDATE:19820307T020000
-RDATE:19830306T020000
-RDATE:19840304T020000
-RDATE:19850303T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1030
-TZOFFSETTO:+1100
-TZNAME:LHST
-DTSTART:19851027T020000
-RDATE:19851027T020000
-RDATE:19861019T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20000827T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1030
-TZNAME:LHST
-DTSTART:19860316T020000
-RDATE:19860316T020000
-RDATE:19870315T020000
-RDATE:19880320T020000
-RDATE:19890319T020000
-RDATE:19900304T020000
-RDATE:19910303T020000
-RDATE:19920301T020000
-RDATE:19930307T020000
-RDATE:19940306T020000
-RDATE:19950305T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Melbourne.ics b/libical/zoneinfo/Australia/Melbourne.ics
deleted file mode 100644
index bd200a3c29..0000000000
--- a/libical/zoneinfo/Australia/Melbourne.ics
+++ /dev/null
@@ -1,109 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Melbourne
-X-LIC-LOCATION:Australia/Melbourne
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19950326T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:20011028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0940
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861019T020000
-RDATE:19871018T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20000827T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19720227T030000
-RDATE:19730304T030000
-RDATE:19740303T030000
-RDATE:19750302T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820307T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860316T030000
-RDATE:19870315T030000
-RDATE:19880320T030000
-RDATE:19890319T030000
-RDATE:19900318T030000
-RDATE:19910303T030000
-RDATE:19920301T030000
-RDATE:19930307T030000
-RDATE:19940306T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19710101T000000
-RDATE:19710101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Perth.ics b/libical/zoneinfo/Australia/Perth.ics
deleted file mode 100644
index a26663df1e..0000000000
--- a/libical/zoneinfo/Australia/Perth.ics
+++ /dev/null
@@ -1,46 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Perth
-X-LIC-LOCATION:Australia/Perth
-BEGIN:STANDARD
-TZOFFSETFROM:+0743
-TZOFFSETTO:+0800
-TZNAME:WST
-DTSTART:18951201T000000
-RDATE:18951201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0900
-TZNAME:WST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19741027T020000
-RDATE:19831030T020000
-RDATE:19911117T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+0800
-TZNAME:WST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19750302T030000
-RDATE:19840304T030000
-RDATE:19920301T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0800
-TZOFFSETTO:+0800
-TZNAME:WST
-DTSTART:19430701T000000
-RDATE:19430701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Australia/Sydney.ics b/libical/zoneinfo/Australia/Sydney.ics
deleted file mode 100644
index 6ab33a0b7d..0000000000
--- a/libical/zoneinfo/Australia/Sydney.ics
+++ /dev/null
@@ -1,110 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Australia/Sydney
-X-LIC-LOCATION:Australia/Sydney
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19960331T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:20011028T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1005
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1100
-TZNAME:EST
-DTSTART:19170101T000100
-RDATE:19170101T000100
-RDATE:19420101T020000
-RDATE:19420927T020000
-RDATE:19431003T020000
-RDATE:19711031T020000
-RDATE:19721029T020000
-RDATE:19731028T020000
-RDATE:19741027T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861019T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931031T020000
-RDATE:19941030T020000
-RDATE:19951029T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-RDATE:19991031T020000
-RDATE:20000827T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19170325T020000
-RDATE:19170325T020000
-RDATE:19420329T020000
-RDATE:19430328T020000
-RDATE:19440326T020000
-RDATE:19720227T030000
-RDATE:19730304T030000
-RDATE:19740303T030000
-RDATE:19750302T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820404T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860316T030000
-RDATE:19870315T030000
-RDATE:19880320T030000
-RDATE:19890319T030000
-RDATE:19900304T030000
-RDATE:19910303T030000
-RDATE:19920301T030000
-RDATE:19930307T030000
-RDATE:19940306T030000
-RDATE:19950305T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:EST
-DTSTART:19710101T000000
-RDATE:19710101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Amsterdam.ics b/libical/zoneinfo/Europe/Amsterdam.ics
deleted file mode 100644
index 96dc8eef52..0000000000
--- a/libical/zoneinfo/Europe/Amsterdam.ics
+++ /dev/null
@@ -1,164 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Amsterdam
-X-LIC-LOCATION:Europe/Amsterdam
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0020
-TZOFFSETTO:+0020
-TZNAME:AMT
-DTSTART:18350101T000000
-RDATE:18350101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0020
-TZOFFSETTO:+0120
-TZNAME:NST
-DTSTART:19160501T000000
-RDATE:19160501T000000
-RDATE:19170416T020000
-RDATE:19180401T020000
-RDATE:19190407T020000
-RDATE:19200405T020000
-RDATE:19210404T020000
-RDATE:19220326T020000
-RDATE:19230601T020000
-RDATE:19240330T020000
-RDATE:19250605T020000
-RDATE:19260515T020000
-RDATE:19270515T020000
-RDATE:19280515T020000
-RDATE:19290515T020000
-RDATE:19300515T020000
-RDATE:19310515T020000
-RDATE:19320522T020000
-RDATE:19330515T020000
-RDATE:19340515T020000
-RDATE:19350515T020000
-RDATE:19360515T020000
-RDATE:19370522T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0120
-TZOFFSETTO:+0020
-TZNAME:AMT
-DTSTART:19161001T000000
-RDATE:19161001T000000
-RDATE:19170917T030000
-RDATE:19180930T030000
-RDATE:19190929T030000
-RDATE:19200927T030000
-RDATE:19210926T030000
-RDATE:19221008T030000
-RDATE:19231007T030000
-RDATE:19241005T030000
-RDATE:19251004T030000
-RDATE:19261003T030000
-RDATE:19271002T030000
-RDATE:19281007T030000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0120
-TZOFFSETTO:+0120
-TZNAME:NEST
-DTSTART:19370701T000000
-RDATE:19370701T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0120
-TZOFFSETTO:+0020
-TZNAME:NET
-DTSTART:19371003T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391008T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0020
-TZOFFSETTO:+0120
-TZNAME:NEST
-DTSTART:19380515T020000
-RDATE:19380515T020000
-RDATE:19390515T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0020
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400517T000000
-RDATE:19400517T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-RDATE:19770101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19770403T020000
-RDATE:19780402T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450916T030000
-RDATE:19770925T030000
-RDATE:19781001T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Andorra.ics b/libical/zoneinfo/Europe/Andorra.ics
deleted file mode 100644
index 71490c4776..0000000000
--- a/libical/zoneinfo/Europe/Andorra.ics
+++ /dev/null
@@ -1,53 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Andorra
-X-LIC-LOCATION:Europe/Andorra
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19850331T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0006
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19460930T000000
-RDATE:19460930T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19850929T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Athens.ics b/libical/zoneinfo/Europe/Athens.ics
deleted file mode 100644
index b02b2c45f6..0000000000
--- a/libical/zoneinfo/Europe/Athens.ics
+++ /dev/null
@@ -1,122 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Athens
-X-LIC-LOCATION:Europe/Athens
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19810329T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0135
-TZOFFSETTO:+0135
-TZNAME:AMT
-DTSTART:18950914T000000
-RDATE:18950914T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0135
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19160728T000100
-RDATE:19160728T000100
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19320707T000000
-RDATE:19320707T000000
-RDATE:19410407T000000
-RDATE:19520701T000000
-RDATE:19750412T000000
-RDATE:19760411T020000
-RDATE:19770403T020000
-RDATE:19780402T020000
-RDATE:19790401T090000
-RDATE:19800401T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19320901T000000
-RDATE:19320901T000000
-RDATE:19521102T000000
-RDATE:19751126T010000
-RDATE:19761010T030000
-RDATE:19770926T030000
-RDATE:19780924T040000
-RDATE:19790929T020000
-RDATE:19800928T000000
-RDATE:19810927T040000
-RDATE:19820926T040000
-RDATE:19830925T040000
-RDATE:19840930T040000
-RDATE:19850929T040000
-RDATE:19860928T040000
-RDATE:19870927T040000
-RDATE:19880925T040000
-RDATE:19890924T040000
-RDATE:19900930T040000
-RDATE:19910929T040000
-RDATE:19920927T040000
-RDATE:19930926T040000
-RDATE:19940925T040000
-RDATE:19950924T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410430T000000
-RDATE:19410430T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T030000
-RDATE:19421102T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430330T000000
-RDATE:19430330T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T000000
-RDATE:19431004T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19440404T000000
-RDATE:19440404T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19810101T000000
-RDATE:19810101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Belfast.ics b/libical/zoneinfo/Europe/Belfast.ics
deleted file mode 100644
index 42c2e06ab4..0000000000
--- a/libical/zoneinfo/Europe/Belfast.ics
+++ /dev/null
@@ -1,220 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Belfast
-X-LIC-LOCATION:Europe/Belfast
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19810329T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19961027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0024
-TZOFFSETTO:-0025
-TZNAME:DMT
-DTSTART:18800802T000000
-RDATE:18800802T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0025
-TZOFFSETTO:+0035
-TZNAME:IST
-DTSTART:19160521T020000
-RDATE:19160521T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0035
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19161001T030000
-RDATE:19161001T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19170408T020000
-RDATE:19170408T020000
-RDATE:19180324T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210403T020000
-RDATE:19220326T020000
-RDATE:19230422T020000
-RDATE:19240413T020000
-RDATE:19250419T020000
-RDATE:19260418T020000
-RDATE:19270410T020000
-RDATE:19280422T020000
-RDATE:19290421T020000
-RDATE:19300413T020000
-RDATE:19310419T020000
-RDATE:19320417T020000
-RDATE:19330409T020000
-RDATE:19340422T020000
-RDATE:19350414T020000
-RDATE:19360419T020000
-RDATE:19370418T020000
-RDATE:19380410T020000
-RDATE:19390416T020000
-RDATE:19400225T020000
-RDATE:19460414T020000
-RDATE:19470316T020000
-RDATE:19480314T020000
-RDATE:19490403T020000
-RDATE:19500416T020000
-RDATE:19510415T020000
-RDATE:19520420T020000
-RDATE:19530419T020000
-RDATE:19540411T020000
-RDATE:19550417T020000
-RDATE:19560422T020000
-RDATE:19570414T020000
-RDATE:19580420T020000
-RDATE:19590419T020000
-RDATE:19600410T020000
-RDATE:19610326T020000
-RDATE:19620325T020000
-RDATE:19630331T020000
-RDATE:19640322T020000
-RDATE:19650321T020000
-RDATE:19660320T020000
-RDATE:19670319T020000
-RDATE:19680218T020000
-RDATE:19720319T020000
-RDATE:19730318T020000
-RDATE:19740317T020000
-RDATE:19750316T020000
-RDATE:19760321T020000
-RDATE:19770320T020000
-RDATE:19780319T020000
-RDATE:19790318T020000
-RDATE:19800316T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19170917T030000
-RDATE:19170917T030000
-RDATE:19180930T030000
-RDATE:19190929T030000
-RDATE:19201025T030000
-RDATE:19211003T030000
-RDATE:19221008T030000
-RDATE:19230916T030000
-RDATE:19240921T030000
-RDATE:19251004T030000
-RDATE:19261003T030000
-RDATE:19271002T030000
-RDATE:19281007T030000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391119T030000
-RDATE:19451007T030000
-RDATE:19461006T030000
-RDATE:19471102T030000
-RDATE:19481031T030000
-RDATE:19491030T030000
-RDATE:19501022T030000
-RDATE:19511021T030000
-RDATE:19521026T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-RDATE:19571006T030000
-RDATE:19581005T030000
-RDATE:19591004T030000
-RDATE:19601002T030000
-RDATE:19611029T030000
-RDATE:19621028T030000
-RDATE:19631027T030000
-RDATE:19641025T030000
-RDATE:19651024T030000
-RDATE:19661023T030000
-RDATE:19671029T030000
-RDATE:19711031T030000
-RDATE:19721029T030000
-RDATE:19731028T030000
-RDATE:19741027T030000
-RDATE:19751026T030000
-RDATE:19761024T030000
-RDATE:19771023T030000
-RDATE:19781029T030000
-RDATE:19791028T030000
-RDATE:19801026T030000
-RDATE:19811025T020000
-RDATE:19821024T020000
-RDATE:19831023T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881023T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931024T020000
-RDATE:19941023T020000
-RDATE:19951022T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:BDST
-DTSTART:19410504T020000
-RDATE:19410504T020000
-RDATE:19420405T020000
-RDATE:19430404T020000
-RDATE:19440402T020000
-RDATE:19450402T020000
-RDATE:19470413T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19410810T030000
-RDATE:19410810T030000
-RDATE:19420809T030000
-RDATE:19430815T030000
-RDATE:19440917T030000
-RDATE:19450715T030000
-RDATE:19470810T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19681027T000000
-RDATE:19681027T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19960101T000000
-RDATE:19960101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Belgrade.ics b/libical/zoneinfo/Europe/Belgrade.ics
deleted file mode 100644
index b04ec3744f..0000000000
--- a/libical/zoneinfo/Europe/Belgrade.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Belgrade
-X-LIC-LOCATION:Europe/Belgrade
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19830327T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0122
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410418T230000
-RDATE:19410418T230000
-RDATE:19421102T020000
-RDATE:19821127T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450508T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450916T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Berlin.ics b/libical/zoneinfo/Europe/Berlin.ics
deleted file mode 100644
index ac4fd9e39f..0000000000
--- a/libical/zoneinfo/Europe/Berlin.ics
+++ /dev/null
@@ -1,103 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Berlin
-X-LIC-LOCATION:Europe/Berlin
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0053
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18930401T000000
-RDATE:18930401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460414T020000
-RDATE:19470406T020000
-RDATE:19480418T020000
-RDATE:19490410T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19180916T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451118T030000
-RDATE:19461007T030000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:CEMT
-DTSTART:19450531T030000
-RDATE:19450531T030000
-RDATE:19470511T030000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19450923T030000
-RDATE:19450923T030000
-RDATE:19470629T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19800101T000000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Bratislava.ics b/libical/zoneinfo/Europe/Bratislava.ics
deleted file mode 100644
index c04634e4cc..0000000000
--- a/libical/zoneinfo/Europe/Bratislava.ics
+++ /dev/null
@@ -1,96 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Bratislava
-X-LIC-LOCATION:Europe/Bratislava
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0058
-TZOFFSETTO:+0058
-TZNAME:PMT
-DTSTART:18500101T000000
-RDATE:18500101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0058
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18911001T000000
-RDATE:18911001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450408T020000
-RDATE:19460506T020000
-RDATE:19470420T020000
-RDATE:19480418T020000
-RDATE:19490409T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19180916T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19440917T030000
-RDATE:19451118T030000
-RDATE:19461006T030000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19790101T000000
-RDATE:19790101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Brussels.ics b/libical/zoneinfo/Europe/Brussels.ics
deleted file mode 100644
index 987004c129..0000000000
--- a/libical/zoneinfo/Europe/Brussels.ics
+++ /dev/null
@@ -1,158 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Brussels
-X-LIC-LOCATION:Europe/Brussels
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0018
-TZOFFSETTO:+0018
-TZNAME:BMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0018
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:18920501T120000
-RDATE:18920501T120000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19141108T000000
-RDATE:19141108T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19160501T000000
-RDATE:19160501T000000
-RDATE:19161001T010000
-RDATE:19400520T030000
-RDATE:19421102T020000
-RDATE:19440917T020000
-RDATE:19770101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19170416T020000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460519T020000
-RDATE:19770403T020000
-RDATE:19780402T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19170917T030000
-RDATE:19170917T030000
-RDATE:19180916T030000
-RDATE:19431004T030000
-RDATE:19440903T000000
-RDATE:19450916T030000
-RDATE:19461007T030000
-RDATE:19770925T030000
-RDATE:19781001T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19181111T120000
-RDATE:19181111T120000
-RDATE:19191005T000000
-RDATE:19201024T000000
-RDATE:19211026T000000
-RDATE:19221008T000000
-RDATE:19231007T000000
-RDATE:19241005T000000
-RDATE:19251004T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T030000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391119T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19190301T230000
-RDATE:19190301T230000
-RDATE:19200214T230000
-RDATE:19210314T230000
-RDATE:19220325T230000
-RDATE:19230421T230000
-RDATE:19240329T230000
-RDATE:19250404T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290421T020000
-RDATE:19300413T020000
-RDATE:19310419T020000
-RDATE:19320403T020000
-RDATE:19330326T020000
-RDATE:19340408T020000
-RDATE:19350331T020000
-RDATE:19360419T020000
-RDATE:19370404T020000
-RDATE:19380327T020000
-RDATE:19390416T020000
-RDATE:19400225T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Bucharest.ics b/libical/zoneinfo/Europe/Bucharest.ics
deleted file mode 100644
index fcedb76f44..0000000000
--- a/libical/zoneinfo/Europe/Bucharest.ics
+++ /dev/null
@@ -1,109 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Bucharest
-X-LIC-LOCATION:Europe/Bucharest
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19970330T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19971026T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0144
-TZOFFSETTO:+0144
-TZNAME:BMT
-DTSTART:18911001T000000
-RDATE:18911001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0144
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19310724T000000
-RDATE:19310724T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19320521T000000
-RDATE:19320521T000000
-RDATE:19330402T000000
-RDATE:19340408T000000
-RDATE:19350407T000000
-RDATE:19360405T000000
-RDATE:19370404T000000
-RDATE:19380403T000000
-RDATE:19390402T000000
-RDATE:19790527T000000
-RDATE:19800405T230000
-RDATE:19810329T020000
-RDATE:19820328T020000
-RDATE:19830327T020000
-RDATE:19840325T020000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19910331T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-RDATE:19950326T000000
-RDATE:19960331T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19321002T010000
-RDATE:19321002T010000
-RDATE:19331001T010000
-RDATE:19341007T010000
-RDATE:19351006T010000
-RDATE:19361004T010000
-RDATE:19371003T010000
-RDATE:19381002T010000
-RDATE:19391001T010000
-RDATE:19790930T000000
-RDATE:19800928T010000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T010000
-RDATE:19920927T010000
-RDATE:19930926T010000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19961027T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910101T000000
-RDATE:19910101T000000
-RDATE:19940101T000000
-RDATE:19970101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Budapest.ics b/libical/zoneinfo/Europe/Budapest.ics
deleted file mode 100644
index b315ccb41e..0000000000
--- a/libical/zoneinfo/Europe/Budapest.ics
+++ /dev/null
@@ -1,101 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Budapest
-X-LIC-LOCATION:Europe/Budapest
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0116
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18901001T000000
-RDATE:18901001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180401T030000
-RDATE:19190415T030000
-RDATE:19200405T030000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450501T230000
-RDATE:19460331T020000
-RDATE:19470406T020000
-RDATE:19480404T020000
-RDATE:19490410T020000
-RDATE:19500417T020000
-RDATE:19540523T000000
-RDATE:19550523T000000
-RDATE:19560603T000000
-RDATE:19570602T010000
-RDATE:19800406T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19180929T030000
-RDATE:19190915T030000
-RDATE:19200930T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451103T000000
-RDATE:19461006T030000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19501023T030000
-RDATE:19541003T000000
-RDATE:19551003T000000
-RDATE:19560930T000000
-RDATE:19570929T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19180101T000000
-RDATE:19180101T000000
-RDATE:19410406T020000
-RDATE:19421102T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Chisinau.ics b/libical/zoneinfo/Europe/Chisinau.ics
deleted file mode 100644
index ec9dab97d3..0000000000
--- a/libical/zoneinfo/Europe/Chisinau.ics
+++ /dev/null
@@ -1,167 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Chisinau
-X-LIC-LOCATION:Europe/Chisinau
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19970330T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19971026T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0155
-TZOFFSETTO:+0155
-TZNAME:CMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0155
-TZOFFSETTO:+0144
-TZNAME:BMT
-DTSTART:19180215T000000
-RDATE:19180215T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0144
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19310724T000000
-RDATE:19310724T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19320521T000000
-RDATE:19320521T000000
-RDATE:19330402T000000
-RDATE:19340408T000000
-RDATE:19350407T000000
-RDATE:19360405T000000
-RDATE:19370404T000000
-RDATE:19380403T000000
-RDATE:19390402T000000
-RDATE:19400815T000000
-RDATE:19910331T020000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-RDATE:19950326T000000
-RDATE:19960331T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19321002T010000
-RDATE:19321002T010000
-RDATE:19331001T010000
-RDATE:19341007T010000
-RDATE:19351006T010000
-RDATE:19361004T010000
-RDATE:19371003T010000
-RDATE:19381002T010000
-RDATE:19391001T010000
-RDATE:19900506T000000
-RDATE:19910929T030000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19961027T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410717T000000
-RDATE:19410717T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19440824T000000
-RDATE:19440824T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19900101T000000
-RDATE:19900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910101T000000
-RDATE:19910101T000000
-RDATE:19920101T000000
-RDATE:19970101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Copenhagen.ics b/libical/zoneinfo/Europe/Copenhagen.ics
deleted file mode 100644
index 7078f3dc76..0000000000
--- a/libical/zoneinfo/Europe/Copenhagen.ics
+++ /dev/null
@@ -1,88 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Copenhagen
-X-LIC-LOCATION:Europe/Copenhagen
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0050
-TZNAME:CMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18940401T000000
-RDATE:18940401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160514T230000
-RDATE:19160514T230000
-RDATE:19400515T000000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460501T020000
-RDATE:19470504T020000
-RDATE:19480509T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19160930T230000
-RDATE:19160930T230000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450815T030000
-RDATE:19460901T030000
-RDATE:19470810T030000
-RDATE:19480808T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19800101T000000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Dublin.ics b/libical/zoneinfo/Europe/Dublin.ics
deleted file mode 100644
index 30f8ceaa9b..0000000000
--- a/libical/zoneinfo/Europe/Dublin.ics
+++ /dev/null
@@ -1,201 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Dublin
-X-LIC-LOCATION:Europe/Dublin
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:IST
-DTSTART:19810329T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19961027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0025
-TZOFFSETTO:-0025
-TZNAME:DMT
-DTSTART:18800802T000000
-RDATE:18800802T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0025
-TZOFFSETTO:+0035
-TZNAME:IST
-DTSTART:19160521T020000
-RDATE:19160521T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0035
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19161001T030000
-RDATE:19161001T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19170408T020000
-RDATE:19170408T020000
-RDATE:19180324T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19170917T030000
-RDATE:19170917T030000
-RDATE:19180930T030000
-RDATE:19190929T030000
-RDATE:19201025T030000
-RDATE:19211003T030000
-RDATE:19221008T030000
-RDATE:19230916T030000
-RDATE:19240921T030000
-RDATE:19251004T030000
-RDATE:19261003T030000
-RDATE:19271002T030000
-RDATE:19281007T030000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391119T030000
-RDATE:19461006T020000
-RDATE:19471102T020000
-RDATE:19491030T030000
-RDATE:19501022T030000
-RDATE:19511021T030000
-RDATE:19521026T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-RDATE:19571006T030000
-RDATE:19581005T030000
-RDATE:19591004T030000
-RDATE:19601002T030000
-RDATE:19611029T030000
-RDATE:19621028T030000
-RDATE:19631027T030000
-RDATE:19641025T030000
-RDATE:19651024T030000
-RDATE:19661023T030000
-RDATE:19671029T030000
-RDATE:19711031T030000
-RDATE:19721029T030000
-RDATE:19731028T030000
-RDATE:19741027T030000
-RDATE:19751026T030000
-RDATE:19761024T030000
-RDATE:19771023T030000
-RDATE:19781029T030000
-RDATE:19791028T030000
-RDATE:19801026T030000
-RDATE:19811025T020000
-RDATE:19821024T020000
-RDATE:19831023T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881023T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931024T020000
-RDATE:19941023T020000
-RDATE:19951022T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19211206T000000
-RDATE:19211206T000000
-RDATE:19480418T020000
-RDATE:19481031T020000
-RDATE:19960101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:IST
-DTSTART:19220326T020000
-RDATE:19220326T020000
-RDATE:19230422T020000
-RDATE:19240413T020000
-RDATE:19250419T020000
-RDATE:19260418T020000
-RDATE:19270410T020000
-RDATE:19280422T020000
-RDATE:19290421T020000
-RDATE:19300413T020000
-RDATE:19310419T020000
-RDATE:19320417T020000
-RDATE:19330409T020000
-RDATE:19340422T020000
-RDATE:19350414T020000
-RDATE:19360419T020000
-RDATE:19370418T020000
-RDATE:19380410T020000
-RDATE:19390416T020000
-RDATE:19400225T020000
-RDATE:19470316T020000
-RDATE:19490403T020000
-RDATE:19500416T020000
-RDATE:19510415T020000
-RDATE:19520420T020000
-RDATE:19530419T020000
-RDATE:19540411T020000
-RDATE:19550417T020000
-RDATE:19560422T020000
-RDATE:19570414T020000
-RDATE:19580420T020000
-RDATE:19590419T020000
-RDATE:19600410T020000
-RDATE:19610326T020000
-RDATE:19620325T020000
-RDATE:19630331T020000
-RDATE:19640322T020000
-RDATE:19650321T020000
-RDATE:19660320T020000
-RDATE:19670319T020000
-RDATE:19680218T020000
-RDATE:19720319T020000
-RDATE:19730318T020000
-RDATE:19740317T020000
-RDATE:19750316T020000
-RDATE:19760321T020000
-RDATE:19770320T020000
-RDATE:19780319T020000
-RDATE:19790318T020000
-RDATE:19800316T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:IST
-DTSTART:19681027T000000
-RDATE:19681027T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Gibraltar.ics b/libical/zoneinfo/Europe/Gibraltar.ics
deleted file mode 100644
index be699d799c..0000000000
--- a/libical/zoneinfo/Europe/Gibraltar.ics
+++ /dev/null
@@ -1,171 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Gibraltar
-X-LIC-LOCATION:Europe/Gibraltar
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19820328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0021
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:18800802T000000
-RDATE:18800802T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19160521T020000
-RDATE:19160521T020000
-RDATE:19170408T020000
-RDATE:19180324T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210403T020000
-RDATE:19220326T020000
-RDATE:19230422T020000
-RDATE:19240413T020000
-RDATE:19250419T020000
-RDATE:19260418T020000
-RDATE:19270410T020000
-RDATE:19280422T020000
-RDATE:19290421T020000
-RDATE:19300413T020000
-RDATE:19310419T020000
-RDATE:19320417T020000
-RDATE:19330409T020000
-RDATE:19340422T020000
-RDATE:19350414T020000
-RDATE:19360419T020000
-RDATE:19370418T020000
-RDATE:19380410T020000
-RDATE:19390416T020000
-RDATE:19400225T020000
-RDATE:19460414T020000
-RDATE:19470316T020000
-RDATE:19480314T020000
-RDATE:19490403T020000
-RDATE:19500416T020000
-RDATE:19510415T020000
-RDATE:19520420T020000
-RDATE:19530419T020000
-RDATE:19540411T020000
-RDATE:19550417T020000
-RDATE:19560422T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19161001T030000
-RDATE:19161001T030000
-RDATE:19170917T030000
-RDATE:19180930T030000
-RDATE:19190929T030000
-RDATE:19201025T030000
-RDATE:19211003T030000
-RDATE:19221008T030000
-RDATE:19230916T030000
-RDATE:19240921T030000
-RDATE:19251004T030000
-RDATE:19261003T030000
-RDATE:19271002T030000
-RDATE:19281007T030000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391119T030000
-RDATE:19451007T030000
-RDATE:19461006T030000
-RDATE:19471102T030000
-RDATE:19481031T030000
-RDATE:19491030T030000
-RDATE:19501022T030000
-RDATE:19511021T030000
-RDATE:19521026T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:BDST
-DTSTART:19410504T020000
-RDATE:19410504T020000
-RDATE:19420405T020000
-RDATE:19430404T020000
-RDATE:19440402T020000
-RDATE:19450402T020000
-RDATE:19470413T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19410810T030000
-RDATE:19410810T030000
-RDATE:19420809T030000
-RDATE:19430815T030000
-RDATE:19440917T030000
-RDATE:19450715T030000
-RDATE:19470810T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19570414T020000
-RDATE:19570414T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19820101T000000
-RDATE:19820101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19820926T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Helsinki.ics b/libical/zoneinfo/Europe/Helsinki.ics
deleted file mode 100644
index ef8760832e..0000000000
--- a/libical/zoneinfo/Europe/Helsinki.ics
+++ /dev/null
@@ -1,72 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Helsinki
-X-LIC-LOCATION:Europe/Helsinki
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19810329T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0140
-TZOFFSETTO:+0140
-TZNAME:HMT
-DTSTART:18780531T000000
-RDATE:18780531T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0140
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19210501T000000
-RDATE:19210501T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19420403T000000
-RDATE:19420403T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19421003T000000
-RDATE:19421003T000000
-RDATE:19810927T040000
-RDATE:19820926T040000
-RDATE:19830925T040000
-RDATE:19840930T040000
-RDATE:19850929T040000
-RDATE:19860928T040000
-RDATE:19870927T040000
-RDATE:19880925T040000
-RDATE:19890924T040000
-RDATE:19900930T040000
-RDATE:19910929T040000
-RDATE:19920927T040000
-RDATE:19930926T040000
-RDATE:19940925T040000
-RDATE:19950924T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19810329T020000
-RDATE:19810329T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Istanbul.ics b/libical/zoneinfo/Europe/Istanbul.ics
deleted file mode 100644
index 67f10b0235..0000000000
--- a/libical/zoneinfo/Europe/Istanbul.ics
+++ /dev/null
@@ -1,161 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Istanbul
-X-LIC-LOCATION:Europe/Istanbul
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19910331T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0156
-TZOFFSETTO:+0157
-TZNAME:IMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0157
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19101001T000000
-RDATE:19101001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19160501T000000
-RDATE:19160501T000000
-RDATE:19200328T000000
-RDATE:19210403T000000
-RDATE:19220326T000000
-RDATE:19240513T000000
-RDATE:19250501T000000
-RDATE:19400630T000000
-RDATE:19401201T000000
-RDATE:19420401T000000
-RDATE:19450402T000000
-RDATE:19460601T000000
-RDATE:19470420T000000
-RDATE:19480418T000000
-RDATE:19490410T000000
-RDATE:19500419T000000
-RDATE:19510422T000000
-RDATE:19620715T000000
-RDATE:19640515T000000
-RDATE:19700503T000000
-RDATE:19710502T000000
-RDATE:19720507T000000
-RDATE:19730603T010000
-RDATE:19740331T020000
-RDATE:19750330T000000
-RDATE:19760601T000000
-RDATE:19770403T000000
-RDATE:19780402T000000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19161001T000000
-RDATE:19161001T000000
-RDATE:19201025T000000
-RDATE:19211003T000000
-RDATE:19221008T000000
-RDATE:19241001T000000
-RDATE:19251001T000000
-RDATE:19401005T000000
-RDATE:19410921T000000
-RDATE:19421101T000000
-RDATE:19451008T000000
-RDATE:19461001T000000
-RDATE:19471005T000000
-RDATE:19481003T000000
-RDATE:19491002T000000
-RDATE:19501008T000000
-RDATE:19511008T000000
-RDATE:19621008T000000
-RDATE:19641001T000000
-RDATE:19701004T000000
-RDATE:19711003T000000
-RDATE:19721008T000000
-RDATE:19731104T030000
-RDATE:19741103T050000
-RDATE:19751026T000000
-RDATE:19761031T000000
-RDATE:19771016T000000
-RDATE:19850928T000000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T040000
-RDATE:19920927T040000
-RDATE:19930926T040000
-RDATE:19940925T040000
-RDATE:19950924T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:TRT
-DTSTART:19781015T000000
-RDATE:19781015T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:TRST
-DTSTART:19790401T030000
-RDATE:19790401T030000
-RDATE:19800406T030000
-RDATE:19810329T030000
-RDATE:19820328T030000
-RDATE:19830731T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:TRT
-DTSTART:19791015T000000
-RDATE:19791015T000000
-RDATE:19801013T000000
-RDATE:19811012T000000
-RDATE:19821011T000000
-RDATE:19831002T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19850420T000000
-RDATE:19850420T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19860101T000000
-RDATE:19860101T000000
-RDATE:19910101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Kaliningrad.ics b/libical/zoneinfo/Europe/Kaliningrad.ics
deleted file mode 100644
index 7295f42b1c..0000000000
--- a/libical/zoneinfo/Europe/Kaliningrad.ics
+++ /dev/null
@@ -1,138 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Kaliningrad
-X-LIC-LOCATION:Europe/Kaliningrad
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0122
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18930401T000000
-RDATE:18930401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19180916T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CET
-DTSTART:19450101T000000
-RDATE:19450101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:CEST
-DTSTART:19450429T000000
-RDATE:19450429T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:CET
-DTSTART:19451101T000000
-RDATE:19451101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19460101T000000
-RDATE:19460101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910929T030000
-RDATE:19910929T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Kiev.ics b/libical/zoneinfo/Europe/Kiev.ics
deleted file mode 100644
index a06aefec1c..0000000000
--- a/libical/zoneinfo/Europe/Kiev.ics
+++ /dev/null
@@ -1,143 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Kiev
-X-LIC-LOCATION:Europe/Kiev
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19950326T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0202
-TZOFFSETTO:+0202
-TZNAME:KMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0202
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410920T000000
-RDATE:19410920T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19431106T000000
-RDATE:19431106T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19900101T000000
-RDATE:19900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19900701T020000
-RDATE:19900701T020000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19920101T000000
-RDATE:19920101T000000
-RDATE:19950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Lisbon.ics b/libical/zoneinfo/Europe/Lisbon.ics
deleted file mode 100644
index 3ba0579ad8..0000000000
--- a/libical/zoneinfo/Europe/Lisbon.ics
+++ /dev/null
@@ -1,228 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Lisbon
-X-LIC-LOCATION:Europe/Lisbon
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19970330T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19971026T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0037
-TZOFFSETTO:-0037
-TZNAME:LMT
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0037
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19110524T000000
-RDATE:19110524T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19160617T230000
-RDATE:19160617T230000
-RDATE:19170228T230000
-RDATE:19180301T230000
-RDATE:19190228T230000
-RDATE:19200229T230000
-RDATE:19210228T230000
-RDATE:19240416T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19310418T230000
-RDATE:19320402T230000
-RDATE:19340407T230000
-RDATE:19350330T230000
-RDATE:19360418T230000
-RDATE:19370403T230000
-RDATE:19380326T230000
-RDATE:19390415T230000
-RDATE:19400224T230000
-RDATE:19410405T230000
-RDATE:19420314T230000
-RDATE:19430313T230000
-RDATE:19440311T230000
-RDATE:19450310T230000
-RDATE:19460406T230000
-RDATE:19470406T020000
-RDATE:19480404T020000
-RDATE:19490403T020000
-RDATE:19510401T020000
-RDATE:19520406T020000
-RDATE:19530405T020000
-RDATE:19540404T020000
-RDATE:19550403T020000
-RDATE:19560401T020000
-RDATE:19570407T020000
-RDATE:19580406T020000
-RDATE:19590405T020000
-RDATE:19600403T020000
-RDATE:19610402T020000
-RDATE:19620401T020000
-RDATE:19630407T020000
-RDATE:19640405T020000
-RDATE:19650404T020000
-RDATE:19770327T000000
-RDATE:19780402T000000
-RDATE:19790401T000000
-RDATE:19800330T000000
-RDATE:19810329T010000
-RDATE:19820328T010000
-RDATE:19830327T020000
-RDATE:19840325T010000
-RDATE:19850331T010000
-RDATE:19860330T010000
-RDATE:19870329T010000
-RDATE:19880327T010000
-RDATE:19890326T010000
-RDATE:19900325T010000
-RDATE:19910331T010000
-RDATE:19920329T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19161101T010000
-RDATE:19161101T010000
-RDATE:19171015T000000
-RDATE:19181015T000000
-RDATE:19191015T000000
-RDATE:19201015T000000
-RDATE:19211015T000000
-RDATE:19241015T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19341007T000000
-RDATE:19351006T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391119T000000
-RDATE:19401006T000000
-RDATE:19411006T000000
-RDATE:19421025T000000
-RDATE:19431031T000000
-RDATE:19441029T000000
-RDATE:19451028T000000
-RDATE:19461006T000000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19511007T030000
-RDATE:19521005T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-RDATE:19571006T030000
-RDATE:19581005T030000
-RDATE:19591004T030000
-RDATE:19601002T030000
-RDATE:19611001T030000
-RDATE:19621007T030000
-RDATE:19631006T030000
-RDATE:19641004T030000
-RDATE:19651003T030000
-RDATE:19760926T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T020000
-RDATE:19800928T020000
-RDATE:19810927T020000
-RDATE:19820926T020000
-RDATE:19830925T020000
-RDATE:19840930T020000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-RDATE:19910929T020000
-RDATE:19960331T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WEMT
-DTSTART:19420425T230000
-RDATE:19420425T230000
-RDATE:19430417T230000
-RDATE:19440422T230000
-RDATE:19450421T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19420816T000000
-RDATE:19420816T000000
-RDATE:19430829T000000
-RDATE:19440827T000000
-RDATE:19450826T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19660403T020000
-RDATE:19660403T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19920927T020000
-RDATE:19920927T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19930328T020000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19930926T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19961027T010000
-RDATE:19961027T010000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Ljubljana.ics b/libical/zoneinfo/Europe/Ljubljana.ics
deleted file mode 100644
index 78e02798bb..0000000000
--- a/libical/zoneinfo/Europe/Ljubljana.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Ljubljana
-X-LIC-LOCATION:Europe/Ljubljana
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19830327T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0122
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410418T230000
-RDATE:19410418T230000
-RDATE:19421102T020000
-RDATE:19821127T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450508T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450916T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/London.ics b/libical/zoneinfo/Europe/London.ics
deleted file mode 100644
index 7b4ad5f03b..0000000000
--- a/libical/zoneinfo/Europe/London.ics
+++ /dev/null
@@ -1,208 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/London
-X-LIC-LOCATION:Europe/London
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19810329T010000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19961027T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0001
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:18471201T000000
-RDATE:18471201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19160521T020000
-RDATE:19160521T020000
-RDATE:19170408T020000
-RDATE:19180324T020000
-RDATE:19190330T020000
-RDATE:19200328T020000
-RDATE:19210403T020000
-RDATE:19220326T020000
-RDATE:19230422T020000
-RDATE:19240413T020000
-RDATE:19250419T020000
-RDATE:19260418T020000
-RDATE:19270410T020000
-RDATE:19280422T020000
-RDATE:19290421T020000
-RDATE:19300413T020000
-RDATE:19310419T020000
-RDATE:19320417T020000
-RDATE:19330409T020000
-RDATE:19340422T020000
-RDATE:19350414T020000
-RDATE:19360419T020000
-RDATE:19370418T020000
-RDATE:19380410T020000
-RDATE:19390416T020000
-RDATE:19400225T020000
-RDATE:19460414T020000
-RDATE:19470316T020000
-RDATE:19480314T020000
-RDATE:19490403T020000
-RDATE:19500416T020000
-RDATE:19510415T020000
-RDATE:19520420T020000
-RDATE:19530419T020000
-RDATE:19540411T020000
-RDATE:19550417T020000
-RDATE:19560422T020000
-RDATE:19570414T020000
-RDATE:19580420T020000
-RDATE:19590419T020000
-RDATE:19600410T020000
-RDATE:19610326T020000
-RDATE:19620325T020000
-RDATE:19630331T020000
-RDATE:19640322T020000
-RDATE:19650321T020000
-RDATE:19660320T020000
-RDATE:19670319T020000
-RDATE:19680218T020000
-RDATE:19720319T020000
-RDATE:19730318T020000
-RDATE:19740317T020000
-RDATE:19750316T020000
-RDATE:19760321T020000
-RDATE:19770320T020000
-RDATE:19780319T020000
-RDATE:19790318T020000
-RDATE:19800316T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19161001T030000
-RDATE:19161001T030000
-RDATE:19170917T030000
-RDATE:19180930T030000
-RDATE:19190929T030000
-RDATE:19201025T030000
-RDATE:19211003T030000
-RDATE:19221008T030000
-RDATE:19230916T030000
-RDATE:19240921T030000
-RDATE:19251004T030000
-RDATE:19261003T030000
-RDATE:19271002T030000
-RDATE:19281007T030000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391119T030000
-RDATE:19451007T030000
-RDATE:19461006T030000
-RDATE:19471102T030000
-RDATE:19481031T030000
-RDATE:19491030T030000
-RDATE:19501022T030000
-RDATE:19511021T030000
-RDATE:19521026T030000
-RDATE:19531004T030000
-RDATE:19541003T030000
-RDATE:19551002T030000
-RDATE:19561007T030000
-RDATE:19571006T030000
-RDATE:19581005T030000
-RDATE:19591004T030000
-RDATE:19601002T030000
-RDATE:19611029T030000
-RDATE:19621028T030000
-RDATE:19631027T030000
-RDATE:19641025T030000
-RDATE:19651024T030000
-RDATE:19661023T030000
-RDATE:19671029T030000
-RDATE:19711031T030000
-RDATE:19721029T030000
-RDATE:19731028T030000
-RDATE:19741027T030000
-RDATE:19751026T030000
-RDATE:19761024T030000
-RDATE:19771023T030000
-RDATE:19781029T030000
-RDATE:19791028T030000
-RDATE:19801026T030000
-RDATE:19811025T020000
-RDATE:19821024T020000
-RDATE:19831023T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881023T020000
-RDATE:19891029T020000
-RDATE:19901028T020000
-RDATE:19911027T020000
-RDATE:19921025T020000
-RDATE:19931024T020000
-RDATE:19941023T020000
-RDATE:19951022T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:BDST
-DTSTART:19410504T020000
-RDATE:19410504T020000
-RDATE:19420405T020000
-RDATE:19430404T020000
-RDATE:19440402T020000
-RDATE:19450402T020000
-RDATE:19470413T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19410810T030000
-RDATE:19410810T030000
-RDATE:19420809T030000
-RDATE:19430815T030000
-RDATE:19440917T030000
-RDATE:19450715T030000
-RDATE:19470810T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:BST
-DTSTART:19681027T000000
-RDATE:19681027T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0000
-TZNAME:GMT
-DTSTART:19960101T000000
-RDATE:19960101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Luxembourg.ics b/libical/zoneinfo/Europe/Luxembourg.ics
deleted file mode 100644
index 9c087c4e5e..0000000000
--- a/libical/zoneinfo/Europe/Luxembourg.ics
+++ /dev/null
@@ -1,161 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Luxembourg
-X-LIC-LOCATION:Europe/Luxembourg
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0025
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19040601T000000
-RDATE:19040601T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160514T230000
-RDATE:19160514T230000
-RDATE:19170428T230000
-RDATE:19180415T020000
-RDATE:19450402T020000
-RDATE:19460519T020000
-RDATE:19770403T020000
-RDATE:19780402T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T010000
-RDATE:19180916T030000
-RDATE:19440918T030000
-RDATE:19450916T030000
-RDATE:19461007T030000
-RDATE:19770925T030000
-RDATE:19781001T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19181125T000000
-RDATE:19181125T000000
-RDATE:19191005T030000
-RDATE:19201024T020000
-RDATE:19211026T020000
-RDATE:19221008T010000
-RDATE:19231007T020000
-RDATE:19241005T010000
-RDATE:19251004T010000
-RDATE:19261003T010000
-RDATE:19271002T010000
-RDATE:19281007T010000
-RDATE:19291006T030000
-RDATE:19301005T030000
-RDATE:19311004T030000
-RDATE:19321002T030000
-RDATE:19331008T030000
-RDATE:19341007T030000
-RDATE:19351006T030000
-RDATE:19361004T030000
-RDATE:19371003T030000
-RDATE:19381002T030000
-RDATE:19391119T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19190301T230000
-RDATE:19190301T230000
-RDATE:19200214T230000
-RDATE:19210314T230000
-RDATE:19220325T230000
-RDATE:19230421T230000
-RDATE:19240329T230000
-RDATE:19250405T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19300413T020000
-RDATE:19310419T020000
-RDATE:19320403T020000
-RDATE:19330326T020000
-RDATE:19340408T020000
-RDATE:19350331T020000
-RDATE:19360419T020000
-RDATE:19370404T020000
-RDATE:19380327T020000
-RDATE:19390416T020000
-RDATE:19400225T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:WET
-DTSTART:19400514T030000
-RDATE:19400514T030000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19770101T000000
-RDATE:19770101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Madrid.ics b/libical/zoneinfo/Europe/Madrid.ics
deleted file mode 100644
index 0d7a79376e..0000000000
--- a/libical/zoneinfo/Europe/Madrid.ics
+++ /dev/null
@@ -1,136 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Madrid
-X-LIC-LOCATION:Europe/Madrid
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0015
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19170505T230000
-RDATE:19170505T230000
-RDATE:19180415T230000
-RDATE:19190405T230000
-RDATE:19240416T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19370522T230000
-RDATE:19380322T230000
-RDATE:19390415T230000
-RDATE:19400316T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19171007T000000
-RDATE:19171007T000000
-RDATE:19181007T000000
-RDATE:19191007T000000
-RDATE:19241005T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391008T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WEMT
-DTSTART:19420502T230000
-RDATE:19420502T230000
-RDATE:19430417T230000
-RDATE:19440415T230000
-RDATE:19450414T230000
-RDATE:19460413T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19420902T000000
-RDATE:19420902T000000
-RDATE:19431004T000000
-RDATE:19441011T000000
-RDATE:19450930T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19460930T000000
-RDATE:19460930T000000
-RDATE:19490930T010000
-RDATE:19741006T010000
-RDATE:19751005T010000
-RDATE:19760926T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19490430T230000
-RDATE:19490430T230000
-RDATE:19740413T230000
-RDATE:19750419T230000
-RDATE:19760327T230000
-RDATE:19770402T230000
-RDATE:19780402T230000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19790101T000000
-RDATE:19790101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Malta.ics b/libical/zoneinfo/Europe/Malta.ics
deleted file mode 100644
index d371d9f3d7..0000000000
--- a/libical/zoneinfo/Europe/Malta.ics
+++ /dev/null
@@ -1,117 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Malta
-X-LIC-LOCATION:Europe/Malta
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0058
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18931102T000000
-RDATE:18931102T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160603T000000
-RDATE:19160603T000000
-RDATE:19170401T000000
-RDATE:19180310T000000
-RDATE:19190302T000000
-RDATE:19200321T000000
-RDATE:19400615T000000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460317T020000
-RDATE:19470316T000000
-RDATE:19480229T020000
-RDATE:19660522T000000
-RDATE:19670528T000000
-RDATE:19680526T000000
-RDATE:19690601T000000
-RDATE:19700531T000000
-RDATE:19710523T000000
-RDATE:19720528T000000
-RDATE:19730331T000000
-RDATE:19740421T000000
-RDATE:19750420T020000
-RDATE:19760418T020000
-RDATE:19770417T020000
-RDATE:19780416T020000
-RDATE:19790415T020000
-RDATE:19800331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170930T010000
-RDATE:19181006T010000
-RDATE:19191005T010000
-RDATE:19200919T010000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450915T010000
-RDATE:19461006T030000
-RDATE:19471005T010000
-RDATE:19481003T030000
-RDATE:19660925T000000
-RDATE:19670924T000000
-RDATE:19680922T000000
-RDATE:19690928T000000
-RDATE:19700927T000000
-RDATE:19710926T010000
-RDATE:19721001T000000
-RDATE:19730929T010000
-RDATE:19740916T010000
-RDATE:19750921T020000
-RDATE:19760919T020000
-RDATE:19770918T020000
-RDATE:19780917T020000
-RDATE:19790916T020000
-RDATE:19800921T020000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19810101T000000
-RDATE:19810101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Minsk.ics b/libical/zoneinfo/Europe/Minsk.ics
deleted file mode 100644
index 3158526171..0000000000
--- a/libical/zoneinfo/Europe/Minsk.ics
+++ /dev/null
@@ -1,135 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Minsk
-X-LIC-LOCATION:Europe/Minsk
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0150
-TZOFFSETTO:+0150
-TZNAME:MMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0150
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19440703T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410628T000000
-RDATE:19410628T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19900101T000000
-RDATE:19900101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910929T030000
-RDATE:19910929T030000
-RDATE:19920927T010000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Monaco.ics b/libical/zoneinfo/Europe/Monaco.ics
deleted file mode 100644
index 07fa276b85..0000000000
--- a/libical/zoneinfo/Europe/Monaco.ics
+++ /dev/null
@@ -1,163 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Monaco
-X-LIC-LOCATION:Europe/Monaco
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0030
-TZOFFSETTO:+0009
-TZNAME:PMT
-DTSTART:18910315T000000
-RDATE:18910315T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0009
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19110311T000000
-RDATE:19110311T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19160614T230000
-RDATE:19160614T230000
-RDATE:19170324T230000
-RDATE:19180309T230000
-RDATE:19190301T230000
-RDATE:19200214T230000
-RDATE:19210314T230000
-RDATE:19220325T230000
-RDATE:19230526T230000
-RDATE:19240329T230000
-RDATE:19250404T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19300412T230000
-RDATE:19310418T230000
-RDATE:19320402T230000
-RDATE:19330325T230000
-RDATE:19340407T230000
-RDATE:19350330T230000
-RDATE:19360418T230000
-RDATE:19370403T230000
-RDATE:19380326T230000
-RDATE:19390415T230000
-RDATE:19400225T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19161002T000000
-RDATE:19161002T000000
-RDATE:19171008T000000
-RDATE:19181007T000000
-RDATE:19191006T000000
-RDATE:19201024T000000
-RDATE:19211026T000000
-RDATE:19221008T000000
-RDATE:19231007T000000
-RDATE:19241005T000000
-RDATE:19251004T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19301005T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19331008T000000
-RDATE:19341007T000000
-RDATE:19351006T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391119T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WEMT
-DTSTART:19410505T000000
-RDATE:19410505T000000
-RDATE:19420309T000000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19411006T000000
-RDATE:19411006T000000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441008T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19450916T030000
-RDATE:19450916T030000
-RDATE:19760926T010000
-RDATE:19770925T030000
-RDATE:19781001T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19760328T010000
-RDATE:19760328T010000
-RDATE:19770403T020000
-RDATE:19780402T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19770101T000000
-RDATE:19770101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Moscow.ics b/libical/zoneinfo/Europe/Moscow.ics
deleted file mode 100644
index 8414cf7ada..0000000000
--- a/libical/zoneinfo/Europe/Moscow.ics
+++ /dev/null
@@ -1,155 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Moscow
-X-LIC-LOCATION:Europe/Moscow
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0230
-TZOFFSETTO:+0230
-TZNAME:MMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0230
-TZOFFSETTO:+0231
-TZNAME:MMT
-DTSTART:19160703T000000
-RDATE:19160703T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0231
-TZOFFSETTO:+0331
-TZNAME:MST
-DTSTART:19170701T230000
-RDATE:19170701T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0331
-TZOFFSETTO:+0231
-TZNAME:MMT
-DTSTART:19171228T000000
-RDATE:19171228T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0231
-TZOFFSETTO:+0431
-TZNAME:MDST
-DTSTART:19180531T220000
-RDATE:19180531T220000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0431
-TZOFFSETTO:+0331
-TZNAME:MST
-DTSTART:19180916T010000
-RDATE:19180916T010000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0331
-TZOFFSETTO:+0431
-TZNAME:MDST
-DTSTART:19190531T230000
-RDATE:19190531T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0431
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19190701T020000
-RDATE:19190701T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19190816T000000
-RDATE:19190816T000000
-RDATE:19211001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19210214T230000
-RDATE:19210214T230000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:MSD
-DTSTART:19210320T230000
-RDATE:19210320T230000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19210901T000000
-RDATE:19210901T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19221001T000000
-RDATE:19221001T000000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19920119T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Nicosia.ics b/libical/zoneinfo/Europe/Nicosia.ics
deleted file mode 100644
index 7f51413423..0000000000
--- a/libical/zoneinfo/Europe/Nicosia.ics
+++ /dev/null
@@ -1,96 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Nicosia
-X-LIC-LOCATION:Europe/Nicosia
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19990328T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19991031T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0213
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19211114T000000
-RDATE:19211114T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19750413T000000
-RDATE:19750413T000000
-RDATE:19760515T000000
-RDATE:19770403T000000
-RDATE:19780402T000000
-RDATE:19790401T000000
-RDATE:19800406T000000
-RDATE:19810329T000000
-RDATE:19820328T000000
-RDATE:19830327T000000
-RDATE:19840325T000000
-RDATE:19850331T000000
-RDATE:19860330T000000
-RDATE:19870329T000000
-RDATE:19880327T000000
-RDATE:19890326T000000
-RDATE:19900325T000000
-RDATE:19910331T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-RDATE:19950326T000000
-RDATE:19960331T000000
-RDATE:19970330T000000
-RDATE:19980329T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19751012T000000
-RDATE:19751012T000000
-RDATE:19761011T000000
-RDATE:19770925T000000
-RDATE:19781002T000000
-RDATE:19790930T000000
-RDATE:19800928T000000
-RDATE:19810927T000000
-RDATE:19820926T000000
-RDATE:19830925T000000
-RDATE:19840930T000000
-RDATE:19850929T000000
-RDATE:19860928T000000
-RDATE:19870927T000000
-RDATE:19880925T000000
-RDATE:19890924T000000
-RDATE:19900930T000000
-RDATE:19910929T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19960929T000000
-RDATE:19970928T000000
-RDATE:19980901T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19981025T030000
-RDATE:19981025T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Oslo.ics b/libical/zoneinfo/Europe/Oslo.ics
deleted file mode 100644
index 6e0dadd6fc..0000000000
--- a/libical/zoneinfo/Europe/Oslo.ics
+++ /dev/null
@@ -1,89 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Oslo
-X-LIC-LOCATION:Europe/Oslo
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0043
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160522T010000
-RDATE:19160522T010000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19590315T020000
-RDATE:19600320T020000
-RDATE:19610319T020000
-RDATE:19620318T020000
-RDATE:19630317T020000
-RDATE:19640315T020000
-RDATE:19650425T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19160930T000000
-RDATE:19160930T000000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451001T030000
-RDATE:19590920T030000
-RDATE:19600918T030000
-RDATE:19610917T030000
-RDATE:19620916T030000
-RDATE:19630915T030000
-RDATE:19640920T030000
-RDATE:19650919T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400810T230000
-RDATE:19400810T230000
-RDATE:19421102T020000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Paris.ics b/libical/zoneinfo/Europe/Paris.ics
deleted file mode 100644
index 3e3b506d02..0000000000
--- a/libical/zoneinfo/Europe/Paris.ics
+++ /dev/null
@@ -1,162 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Paris
-X-LIC-LOCATION:Europe/Paris
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0009
-TZOFFSETTO:+0009
-TZNAME:PMT
-DTSTART:18910315T000100
-RDATE:18910315T000100
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0009
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19110311T000100
-RDATE:19110311T000100
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0100
-TZNAME:WEST
-DTSTART:19160614T230000
-RDATE:19160614T230000
-RDATE:19170324T230000
-RDATE:19180309T230000
-RDATE:19190301T230000
-RDATE:19200214T230000
-RDATE:19210314T230000
-RDATE:19220325T230000
-RDATE:19230526T230000
-RDATE:19240329T230000
-RDATE:19250404T230000
-RDATE:19260417T230000
-RDATE:19270409T230000
-RDATE:19280414T230000
-RDATE:19290420T230000
-RDATE:19300412T230000
-RDATE:19310418T230000
-RDATE:19320402T230000
-RDATE:19330325T230000
-RDATE:19340407T230000
-RDATE:19350330T230000
-RDATE:19360418T230000
-RDATE:19370403T230000
-RDATE:19380326T230000
-RDATE:19390415T230000
-RDATE:19400225T020000
-RDATE:19441008T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19161002T000000
-RDATE:19161002T000000
-RDATE:19171008T000000
-RDATE:19181007T000000
-RDATE:19191006T000000
-RDATE:19201024T000000
-RDATE:19211026T000000
-RDATE:19221008T000000
-RDATE:19231007T000000
-RDATE:19241005T000000
-RDATE:19251004T000000
-RDATE:19261003T000000
-RDATE:19271002T000000
-RDATE:19281007T000000
-RDATE:19291006T000000
-RDATE:19301005T000000
-RDATE:19311004T000000
-RDATE:19321002T000000
-RDATE:19331008T000000
-RDATE:19341007T000000
-RDATE:19351006T000000
-RDATE:19361004T000000
-RDATE:19371003T000000
-RDATE:19381002T000000
-RDATE:19391119T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400614T230000
-RDATE:19400614T230000
-RDATE:19421102T020000
-RDATE:19770101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19760328T010000
-RDATE:19770403T020000
-RDATE:19780402T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19450916T030000
-RDATE:19760926T010000
-RDATE:19770925T030000
-RDATE:19781001T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0000
-TZNAME:WET
-DTSTART:19440825T000000
-RDATE:19440825T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:WEMT
-DTSTART:19450402T020000
-RDATE:19450402T020000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Prague.ics b/libical/zoneinfo/Europe/Prague.ics
deleted file mode 100644
index d9a497a8c4..0000000000
--- a/libical/zoneinfo/Europe/Prague.ics
+++ /dev/null
@@ -1,96 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Prague
-X-LIC-LOCATION:Europe/Prague
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0058
-TZOFFSETTO:+0058
-TZNAME:PMT
-DTSTART:18500101T000000
-RDATE:18500101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0058
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18911001T000000
-RDATE:18911001T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450408T020000
-RDATE:19460506T020000
-RDATE:19470420T020000
-RDATE:19480418T020000
-RDATE:19490409T020000
-RDATE:19790401T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19180916T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19440917T030000
-RDATE:19451118T030000
-RDATE:19461006T030000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19491002T030000
-RDATE:19790930T030000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19790101T000000
-RDATE:19790101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Riga.ics b/libical/zoneinfo/Europe/Riga.ics
deleted file mode 100644
index 2f0c019ce2..0000000000
--- a/libical/zoneinfo/Europe/Riga.ics
+++ /dev/null
@@ -1,173 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Riga
-X-LIC-LOCATION:Europe/Riga
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:20010325T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:20011028T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0136
-TZOFFSETTO:+0136
-TZNAME:RMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0136
-TZOFFSETTO:+0236
-TZNAME:LST
-DTSTART:19180415T020000
-RDATE:19180415T020000
-RDATE:19190401T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0236
-TZOFFSETTO:+0136
-TZNAME:RMT
-DTSTART:19180916T030000
-RDATE:19180916T030000
-RDATE:19190522T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0136
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19260511T000000
-RDATE:19260511T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19400805T000000
-RDATE:19400805T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410701T000000
-RDATE:19410701T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19441013T000000
-RDATE:19441013T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19890326T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19890924T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-RDATE:19960929T030000
-RDATE:19971026T040000
-RDATE:19981025T040000
-RDATE:19991031T040000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19900325T020000
-RDATE:19900325T020000
-RDATE:19910331T020000
-RDATE:19920329T020000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-RDATE:19960331T020000
-RDATE:19970330T030000
-RDATE:19980329T030000
-RDATE:19990328T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19970121T000000
-RDATE:19970121T000000
-RDATE:20000229T000000
-RDATE:20010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Rome.ics b/libical/zoneinfo/Europe/Rome.ics
deleted file mode 100644
index 4523ed89f3..0000000000
--- a/libical/zoneinfo/Europe/Rome.ics
+++ /dev/null
@@ -1,125 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Rome
-X-LIC-LOCATION:Europe/Rome
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0050
-TZNAME:RMT
-DTSTART:18660922T000000
-RDATE:18660922T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18931101T000000
-RDATE:18931101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160603T000000
-RDATE:19160603T000000
-RDATE:19170401T000000
-RDATE:19180310T000000
-RDATE:19190302T000000
-RDATE:19200321T000000
-RDATE:19400615T000000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460317T020000
-RDATE:19470316T000000
-RDATE:19480229T020000
-RDATE:19660522T000000
-RDATE:19670528T000000
-RDATE:19680526T000000
-RDATE:19690601T000000
-RDATE:19700531T000000
-RDATE:19710523T000000
-RDATE:19720528T000000
-RDATE:19730603T000000
-RDATE:19740526T000000
-RDATE:19750601T000000
-RDATE:19760530T000000
-RDATE:19770522T000000
-RDATE:19780528T000000
-RDATE:19790527T000000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170930T010000
-RDATE:19181006T010000
-RDATE:19191005T010000
-RDATE:19200919T010000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19440701T000000
-RDATE:19450915T010000
-RDATE:19461006T030000
-RDATE:19471005T010000
-RDATE:19481003T030000
-RDATE:19660925T000000
-RDATE:19670924T000000
-RDATE:19680922T000000
-RDATE:19690928T000000
-RDATE:19700927T000000
-RDATE:19710926T010000
-RDATE:19721001T000000
-RDATE:19730930T000000
-RDATE:19740929T000000
-RDATE:19750928T010000
-RDATE:19760926T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T010000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19440917T000000
-RDATE:19440917T000000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Samara.ics b/libical/zoneinfo/Europe/Samara.ics
deleted file mode 100644
index afbe8dd53f..0000000000
--- a/libical/zoneinfo/Europe/Samara.ics
+++ /dev/null
@@ -1,124 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Samara
-X-LIC-LOCATION:Europe/Samara
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:SAMST
-DTSTART:19930328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:SAMT
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0321
-TZOFFSETTO:+0300
-TZNAME:KUYT
-DTSTART:19190701T020000
-RDATE:19190701T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:KUYT
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:KUYST
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:KUYT
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:KUYST
-DTSTART:19890326T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:KUYT
-DTSTART:19890924T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:KUYST
-DTSTART:19900325T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:KUYST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:KUYT
-DTSTART:19910929T030000
-RDATE:19910929T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:SAMT
-DTSTART:19911020T030000
-RDATE:19911020T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0500
-TZNAME:SAMST
-DTSTART:19920328T230000
-RDATE:19920328T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0400
-TZNAME:SAMT
-DTSTART:19920926T230000
-RDATE:19920926T230000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/San_Marino.ics b/libical/zoneinfo/Europe/San_Marino.ics
deleted file mode 100644
index 741ec82fbe..0000000000
--- a/libical/zoneinfo/Europe/San_Marino.ics
+++ /dev/null
@@ -1,125 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/San_Marino
-X-LIC-LOCATION:Europe/San_Marino
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0050
-TZNAME:RMT
-DTSTART:18660922T000000
-RDATE:18660922T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18931101T000000
-RDATE:18931101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160603T000000
-RDATE:19160603T000000
-RDATE:19170401T000000
-RDATE:19180310T000000
-RDATE:19190302T000000
-RDATE:19200321T000000
-RDATE:19400615T000000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460317T020000
-RDATE:19470316T000000
-RDATE:19480229T020000
-RDATE:19660522T000000
-RDATE:19670528T000000
-RDATE:19680526T000000
-RDATE:19690601T000000
-RDATE:19700531T000000
-RDATE:19710523T000000
-RDATE:19720528T000000
-RDATE:19730603T000000
-RDATE:19740526T000000
-RDATE:19750601T000000
-RDATE:19760530T000000
-RDATE:19770522T000000
-RDATE:19780528T000000
-RDATE:19790527T000000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170930T010000
-RDATE:19181006T010000
-RDATE:19191005T010000
-RDATE:19200919T010000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19440701T000000
-RDATE:19450915T010000
-RDATE:19461006T030000
-RDATE:19471005T010000
-RDATE:19481003T030000
-RDATE:19660925T000000
-RDATE:19670924T000000
-RDATE:19680922T000000
-RDATE:19690928T000000
-RDATE:19700927T000000
-RDATE:19710926T010000
-RDATE:19721001T000000
-RDATE:19730930T000000
-RDATE:19740929T000000
-RDATE:19750928T010000
-RDATE:19760926T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T010000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19440917T000000
-RDATE:19440917T000000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Sarajevo.ics b/libical/zoneinfo/Europe/Sarajevo.ics
deleted file mode 100644
index 389e7f98f9..0000000000
--- a/libical/zoneinfo/Europe/Sarajevo.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Sarajevo
-X-LIC-LOCATION:Europe/Sarajevo
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19830327T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0122
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410418T230000
-RDATE:19410418T230000
-RDATE:19421102T020000
-RDATE:19821127T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450508T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450916T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Simferopol.ics b/libical/zoneinfo/Europe/Simferopol.ics
deleted file mode 100644
index 2461700b9f..0000000000
--- a/libical/zoneinfo/Europe/Simferopol.ics
+++ /dev/null
@@ -1,151 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Simferopol
-X-LIC-LOCATION:Europe/Simferopol
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19980329T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19981025T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0216
-TZOFFSETTO:+0216
-TZNAME:SMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0216
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19300621T000000
-RDATE:19300621T000000
-RDATE:19440413T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19411101T000000
-RDATE:19411101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19950326T000000
-RDATE:19960331T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19950924T000000
-RDATE:19961027T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19900101T000000
-RDATE:19900101T000000
-RDATE:19940501T000000
-RDATE:19940925T000000
-RDATE:19970101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19900701T020000
-RDATE:19900701T020000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19970330T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19920101T000000
-RDATE:19920101T000000
-RDATE:19971026T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19960331T040000
-RDATE:19960331T040000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Skopje.ics b/libical/zoneinfo/Europe/Skopje.ics
deleted file mode 100644
index d39d373590..0000000000
--- a/libical/zoneinfo/Europe/Skopje.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Skopje
-X-LIC-LOCATION:Europe/Skopje
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19830327T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0122
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410418T230000
-RDATE:19410418T230000
-RDATE:19421102T020000
-RDATE:19821127T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450508T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450916T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Sofia.ics b/libical/zoneinfo/Europe/Sofia.ics
deleted file mode 100644
index 23a5a1fbc3..0000000000
--- a/libical/zoneinfo/Europe/Sofia.ics
+++ /dev/null
@@ -1,116 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Sofia
-X-LIC-LOCATION:Europe/Sofia
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19970330T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19971026T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0133
-TZOFFSETTO:+0157
-TZNAME:IMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0157
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:18941130T000000
-RDATE:18941130T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19450402T030000
-RDATE:19450402T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19790331T230000
-RDATE:19790331T230000
-RDATE:19800405T230000
-RDATE:19810404T230000
-RDATE:19820403T230000
-RDATE:19830327T020000
-RDATE:19840325T020000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-RDATE:19910331T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-RDATE:19950326T000000
-RDATE:19960331T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19791001T010000
-RDATE:19791001T010000
-RDATE:19800929T010000
-RDATE:19810927T020000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T000000
-RDATE:19961027T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910101T000000
-RDATE:19910101T000000
-RDATE:19970101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Stockholm.ics b/libical/zoneinfo/Europe/Stockholm.ics
deleted file mode 100644
index 36c4002b36..0000000000
--- a/libical/zoneinfo/Europe/Stockholm.ics
+++ /dev/null
@@ -1,68 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Stockholm
-X-LIC-LOCATION:Europe/Stockholm
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0112
-TZOFFSETTO:+0100
-TZNAME:SET
-DTSTART:18790101T000000
-RDATE:18790101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19000101T000000
-RDATE:19000101T000000
-RDATE:19800101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160514T230000
-RDATE:19160514T230000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Tallinn.ics b/libical/zoneinfo/Europe/Tallinn.ics
deleted file mode 100644
index 2acfa865cc..0000000000
--- a/libical/zoneinfo/Europe/Tallinn.ics
+++ /dev/null
@@ -1,151 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Tallinn
-X-LIC-LOCATION:Europe/Tallinn
-BEGIN:STANDARD
-TZOFFSETFROM:+0139
-TZOFFSETTO:+0139
-TZNAME:TMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0139
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19180201T000000
-RDATE:19180201T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19180415T020000
-RDATE:19180415T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19180916T030000
-RDATE:19180916T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0139
-TZNAME:TMT
-DTSTART:19190701T000000
-RDATE:19190701T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0139
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19210501T000000
-RDATE:19210501T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19400806T000000
-RDATE:19400806T000000
-RDATE:19440922T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410915T000000
-RDATE:19410915T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19890326T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19890924T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-RDATE:19961027T030000
-RDATE:19971026T030000
-RDATE:19980922T000000
-RDATE:19991031T040000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19900325T020000
-RDATE:19900325T020000
-RDATE:19910331T020000
-RDATE:19920329T020000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-RDATE:19960331T020000
-RDATE:19970330T020000
-RDATE:19980329T020000
-RDATE:19990328T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19981025T030000
-RDATE:19981025T030000
-RDATE:19991101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Tirane.ics b/libical/zoneinfo/Europe/Tirane.ics
deleted file mode 100644
index f8c4437cd3..0000000000
--- a/libical/zoneinfo/Europe/Tirane.ics
+++ /dev/null
@@ -1,85 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Tirane
-X-LIC-LOCATION:Europe/Tirane
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19850331T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0119
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19140101T000000
-RDATE:19140101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19400616T000000
-RDATE:19400616T000000
-RDATE:19430329T020000
-RDATE:19740504T000000
-RDATE:19750501T000000
-RDATE:19760502T000000
-RDATE:19770508T000000
-RDATE:19780506T000000
-RDATE:19790505T000000
-RDATE:19800503T000000
-RDATE:19810426T000000
-RDATE:19820502T000000
-RDATE:19830418T000000
-RDATE:19840401T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T030000
-RDATE:19421102T030000
-RDATE:19430410T030000
-RDATE:19741002T000000
-RDATE:19751002T000000
-RDATE:19761003T000000
-RDATE:19771002T000000
-RDATE:19781001T000000
-RDATE:19790930T000000
-RDATE:19801004T000000
-RDATE:19810927T000000
-RDATE:19821003T000000
-RDATE:19831001T000000
-RDATE:19840701T000000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19840930T020000
-RDATE:19840930T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Uzhgorod.ics b/libical/zoneinfo/Europe/Uzhgorod.ics
deleted file mode 100644
index 58ab2c48c1..0000000000
--- a/libical/zoneinfo/Europe/Uzhgorod.ics
+++ /dev/null
@@ -1,146 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Uzhgorod
-X-LIC-LOCATION:Europe/Uzhgorod
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19950326T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0129
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18901001T000000
-RDATE:18901001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400101T000000
-RDATE:19400101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19400401T020000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441026T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19441001T000000
-RDATE:19441001T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19450629T000000
-RDATE:19450629T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19900101T000000
-RDATE:19900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19900701T020000
-RDATE:19900701T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910331T030000
-RDATE:19910331T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19920101T000000
-RDATE:19920101T000000
-RDATE:19950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19920927T000000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T040000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Vaduz.ics b/libical/zoneinfo/Europe/Vaduz.ics
deleted file mode 100644
index c7cb663184..0000000000
--- a/libical/zoneinfo/Europe/Vaduz.ics
+++ /dev/null
@@ -1,57 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Vaduz
-X-LIC-LOCATION:Europe/Vaduz
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0038
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18940601T000000
-RDATE:18940601T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19810101T000000
-RDATE:19810101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19810927T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Vatican.ics b/libical/zoneinfo/Europe/Vatican.ics
deleted file mode 100644
index fa1015b813..0000000000
--- a/libical/zoneinfo/Europe/Vatican.ics
+++ /dev/null
@@ -1,125 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Vatican
-X-LIC-LOCATION:Europe/Vatican
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0050
-TZNAME:RMT
-DTSTART:18660922T000000
-RDATE:18660922T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0050
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18931101T000000
-RDATE:18931101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160603T000000
-RDATE:19160603T000000
-RDATE:19170401T000000
-RDATE:19180310T000000
-RDATE:19190302T000000
-RDATE:19200321T000000
-RDATE:19400615T000000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460317T020000
-RDATE:19470316T000000
-RDATE:19480229T020000
-RDATE:19660522T000000
-RDATE:19670528T000000
-RDATE:19680526T000000
-RDATE:19690601T000000
-RDATE:19700531T000000
-RDATE:19710523T000000
-RDATE:19720528T000000
-RDATE:19730603T000000
-RDATE:19740526T000000
-RDATE:19750601T000000
-RDATE:19760530T000000
-RDATE:19770522T000000
-RDATE:19780528T000000
-RDATE:19790527T000000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170930T010000
-RDATE:19181006T010000
-RDATE:19191005T010000
-RDATE:19200919T010000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19440701T000000
-RDATE:19450915T010000
-RDATE:19461006T030000
-RDATE:19471005T010000
-RDATE:19481003T030000
-RDATE:19660925T000000
-RDATE:19670924T000000
-RDATE:19680922T000000
-RDATE:19690928T000000
-RDATE:19700927T000000
-RDATE:19710926T010000
-RDATE:19721001T000000
-RDATE:19730930T000000
-RDATE:19740929T000000
-RDATE:19750928T010000
-RDATE:19760926T010000
-RDATE:19770925T010000
-RDATE:19781001T010000
-RDATE:19790930T010000
-RDATE:19800928T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19440917T000000
-RDATE:19440917T000000
-RDATE:19800101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Vienna.ics b/libical/zoneinfo/Europe/Vienna.ics
deleted file mode 100644
index 4d6d608b3f..0000000000
--- a/libical/zoneinfo/Europe/Vienna.ics
+++ /dev/null
@@ -1,85 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Vienna
-X-LIC-LOCATION:Europe/Vienna
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0105
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18930401T000000
-RDATE:18930401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19200405T020000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450402T020000
-RDATE:19460414T020000
-RDATE:19470406T020000
-RDATE:19480418T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19180616T030000
-RDATE:19200913T030000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451118T030000
-RDATE:19461006T030000
-RDATE:19471005T030000
-RDATE:19481003T030000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19810101T000000
-RDATE:19810101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Vilnius.ics b/libical/zoneinfo/Europe/Vilnius.ics
deleted file mode 100644
index bbb6448e52..0000000000
--- a/libical/zoneinfo/Europe/Vilnius.ics
+++ /dev/null
@@ -1,155 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Vilnius
-X-LIC-LOCATION:Europe/Vilnius
-BEGIN:STANDARD
-TZOFFSETFROM:+0141
-TZOFFSETTO:+0124
-TZNAME:WMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0124
-TZOFFSETTO:+0136
-TZNAME:KMT
-DTSTART:19170101T000000
-RDATE:19170101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0136
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19191010T000000
-RDATE:19191010T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19200712T000000
-RDATE:19200712T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19201009T000000
-RDATE:19201009T000000
-RDATE:19431004T030000
-RDATE:19980329T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19400803T000000
-RDATE:19400803T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410624T000000
-RDATE:19410624T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19990328T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19440801T000000
-RDATE:19440801T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19910331T020000
-RDATE:19910331T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910929T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-RDATE:19961027T030000
-RDATE:19971026T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920329T020000
-RDATE:19920329T020000
-RDATE:19930328T020000
-RDATE:19940327T020000
-RDATE:19950326T020000
-RDATE:19960331T020000
-RDATE:19970330T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19980101T000000
-RDATE:19980101T000000
-RDATE:19991031T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Warsaw.ics b/libical/zoneinfo/Europe/Warsaw.ics
deleted file mode 100644
index bf83a37b71..0000000000
--- a/libical/zoneinfo/Europe/Warsaw.ics
+++ /dev/null
@@ -1,157 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Warsaw
-X-LIC-LOCATION:Europe/Warsaw
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19990328T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19991031T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0124
-TZOFFSETTO:+0124
-TZNAME:WMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0124
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19150805T000000
-RDATE:19150805T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19160430T230000
-RDATE:19160430T230000
-RDATE:19170416T020000
-RDATE:19180415T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450429T000000
-RDATE:19460414T000000
-RDATE:19470504T000000
-RDATE:19480418T000000
-RDATE:19570602T010000
-RDATE:19580330T010000
-RDATE:19590531T010000
-RDATE:19600403T010000
-RDATE:19610528T010000
-RDATE:19620527T010000
-RDATE:19630526T010000
-RDATE:19640531T010000
-RDATE:19770403T010000
-RDATE:19780402T010000
-RDATE:19790401T010000
-RDATE:19800406T010000
-RDATE:19810329T010000
-RDATE:19820328T010000
-RDATE:19830327T010000
-RDATE:19840325T010000
-RDATE:19850331T010000
-RDATE:19860330T010000
-RDATE:19870329T010000
-RDATE:19880327T010000
-RDATE:19890326T010000
-RDATE:19900325T010000
-RDATE:19910331T010000
-RDATE:19920329T010000
-RDATE:19930328T010000
-RDATE:19940327T010000
-RDATE:19950326T010000
-RDATE:19960331T010000
-RDATE:19970330T010000
-RDATE:19980329T010000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19161001T010000
-RDATE:19161001T010000
-RDATE:19170917T030000
-RDATE:19220601T000000
-RDATE:19431004T030000
-RDATE:19441001T000000
-RDATE:19451101T000000
-RDATE:19460907T000000
-RDATE:19471005T000000
-RDATE:19481003T000000
-RDATE:19570929T020000
-RDATE:19580928T020000
-RDATE:19591004T020000
-RDATE:19601002T020000
-RDATE:19611001T020000
-RDATE:19620930T020000
-RDATE:19630929T020000
-RDATE:19640927T020000
-RDATE:19770925T020000
-RDATE:19781001T020000
-RDATE:19790930T020000
-RDATE:19800928T020000
-RDATE:19810927T020000
-RDATE:19820926T020000
-RDATE:19830925T020000
-RDATE:19840930T020000
-RDATE:19850929T020000
-RDATE:19860928T020000
-RDATE:19870927T020000
-RDATE:19880925T020000
-RDATE:19890924T020000
-RDATE:19900930T020000
-RDATE:19910929T020000
-RDATE:19920927T020000
-RDATE:19930926T020000
-RDATE:19940925T020000
-RDATE:19950924T020000
-RDATE:19961027T020000
-RDATE:19971026T020000
-RDATE:19981025T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19180916T030000
-RDATE:19180916T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19190415T020000
-RDATE:19190415T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19190916T030000
-RDATE:19190916T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19400623T020000
-RDATE:19400623T020000
-RDATE:19421102T020000
-RDATE:19441004T020000
-RDATE:19990101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Zagreb.ics b/libical/zoneinfo/Europe/Zagreb.ics
deleted file mode 100644
index 0d2675a4c1..0000000000
--- a/libical/zoneinfo/Europe/Zagreb.ics
+++ /dev/null
@@ -1,69 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Zagreb
-X-LIC-LOCATION:Europe/Zagreb
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19830327T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0122
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18840101T000000
-RDATE:18840101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410418T230000
-RDATE:19410418T230000
-RDATE:19421102T020000
-RDATE:19821127T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-RDATE:19440403T020000
-RDATE:19450508T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19450916T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Zaporozhye.ics b/libical/zoneinfo/Europe/Zaporozhye.ics
deleted file mode 100644
index 2a3ef11435..0000000000
--- a/libical/zoneinfo/Europe/Zaporozhye.ics
+++ /dev/null
@@ -1,138 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Zaporozhye
-X-LIC-LOCATION:Europe/Zaporozhye
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19950326T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19961027T040000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0221
-TZOFFSETTO:+0220
-TZNAME:CUT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0220
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19240502T000000
-RDATE:19240502T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19300621T000000
-RDATE:19300621T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19410825T000000
-RDATE:19410825T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19421102T020000
-RDATE:19421102T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19430329T020000
-RDATE:19430329T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19431004T030000
-RDATE:19431004T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19431025T000000
-RDATE:19431025T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:MSD
-DTSTART:19810401T000000
-RDATE:19810401T000000
-RDATE:19820401T000000
-RDATE:19830401T000000
-RDATE:19840401T000000
-RDATE:19850331T020000
-RDATE:19860330T020000
-RDATE:19870329T020000
-RDATE:19880327T020000
-RDATE:19890326T020000
-RDATE:19900325T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:MSK
-DTSTART:19811001T000000
-RDATE:19811001T000000
-RDATE:19821001T000000
-RDATE:19831001T000000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910331T020000
-RDATE:19910331T020000
-RDATE:19920927T000000
-RDATE:19930926T000000
-RDATE:19940925T000000
-RDATE:19950924T040000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0200
-TZNAME:EET
-DTSTART:19910929T000000
-RDATE:19910929T000000
-RDATE:19950101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-TZNAME:EEST
-DTSTART:19920329T000000
-RDATE:19920329T000000
-RDATE:19930328T000000
-RDATE:19940327T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Europe/Zurich.ics b/libical/zoneinfo/Europe/Zurich.ics
deleted file mode 100644
index 0421226570..0000000000
--- a/libical/zoneinfo/Europe/Zurich.ics
+++ /dev/null
@@ -1,76 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Europe/Zurich
-X-LIC-LOCATION:Europe/Zurich
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0034
-TZOFFSETTO:+0030
-TZNAME:BMT
-DTSTART:18480912T000000
-RDATE:18480912T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0030
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:18940601T000000
-RDATE:18940601T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-TZNAME:CEST
-DTSTART:19401102T000000
-RDATE:19401102T000000
-RDATE:19410504T020000
-RDATE:19420503T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19401231T000000
-RDATE:19401231T000000
-RDATE:19411005T000000
-RDATE:19421004T000000
-RDATE:19810927T030000
-RDATE:19820926T030000
-RDATE:19830925T030000
-RDATE:19840930T030000
-RDATE:19850929T030000
-RDATE:19860928T030000
-RDATE:19870927T030000
-RDATE:19880925T030000
-RDATE:19890924T030000
-RDATE:19900930T030000
-RDATE:19910929T030000
-RDATE:19920927T030000
-RDATE:19930926T030000
-RDATE:19940925T030000
-RDATE:19950924T030000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-TZNAME:CET
-DTSTART:19810101T000000
-RDATE:19810101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Antananarivo.ics b/libical/zoneinfo/Indian/Antananarivo.ics
deleted file mode 100644
index c14e44b16d..0000000000
--- a/libical/zoneinfo/Indian/Antananarivo.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Antananarivo
-X-LIC-LOCATION:Indian/Antananarivo
-BEGIN:STANDARD
-TZOFFSETFROM:+0310
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0400
-TZNAME:EAST
-DTSTART:19540227T230000
-RDATE:19540227T230000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+0400
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19540530T000000
-RDATE:19540530T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Chagos.ics b/libical/zoneinfo/Indian/Chagos.ics
deleted file mode 100644
index 0858ce79fa..0000000000
--- a/libical/zoneinfo/Indian/Chagos.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Chagos
-X-LIC-LOCATION:Indian/Chagos
-BEGIN:STANDARD
-TZOFFSETFROM:+0500
-TZOFFSETTO:+0600
-TZNAME:IOT
-DTSTART:19960101T000000
-RDATE:19960101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Christmas.ics b/libical/zoneinfo/Indian/Christmas.ics
deleted file mode 100644
index 01a6cf314d..0000000000
--- a/libical/zoneinfo/Indian/Christmas.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Christmas
-X-LIC-LOCATION:Indian/Christmas
-BEGIN:STANDARD
-TZOFFSETFROM:+0703
-TZOFFSETTO:+0700
-TZNAME:CXT
-DTSTART:18950201T000000
-RDATE:18950201T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Cocos.ics b/libical/zoneinfo/Indian/Cocos.ics
deleted file mode 100644
index 47ce80510a..0000000000
--- a/libical/zoneinfo/Indian/Cocos.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Cocos
-X-LIC-LOCATION:Indian/Cocos
-BEGIN:STANDARD
-TZOFFSETFROM:+0630
-TZOFFSETTO:+0630
-TZNAME:CCT
-DTSTART:16010101T000000
-RDATE:16010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Comoro.ics b/libical/zoneinfo/Indian/Comoro.ics
deleted file mode 100644
index 66847d3a44..0000000000
--- a/libical/zoneinfo/Indian/Comoro.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Comoro
-X-LIC-LOCATION:Indian/Comoro
-BEGIN:STANDARD
-TZOFFSETFROM:+0253
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Kerguelen.ics b/libical/zoneinfo/Indian/Kerguelen.ics
deleted file mode 100644
index e129df45cc..0000000000
--- a/libical/zoneinfo/Indian/Kerguelen.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Kerguelen
-X-LIC-LOCATION:Indian/Kerguelen
-BEGIN:STANDARD
-TZOFFSETFROM:+0000
-TZOFFSETTO:+0500
-TZNAME:TFT
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Mahe.ics b/libical/zoneinfo/Indian/Mahe.ics
deleted file mode 100644
index 572df29a14..0000000000
--- a/libical/zoneinfo/Indian/Mahe.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Mahe
-X-LIC-LOCATION:Indian/Mahe
-BEGIN:STANDARD
-TZOFFSETFROM:+0342
-TZOFFSETTO:+0400
-TZNAME:SCT
-DTSTART:19060601T000000
-RDATE:19060601T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Maldives.ics b/libical/zoneinfo/Indian/Maldives.ics
deleted file mode 100644
index 51f6e072c8..0000000000
--- a/libical/zoneinfo/Indian/Maldives.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Maldives
-X-LIC-LOCATION:Indian/Maldives
-BEGIN:STANDARD
-TZOFFSETFROM:+0454
-TZOFFSETTO:+0454
-TZNAME:MMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0454
-TZOFFSETTO:+0500
-TZNAME:MVT
-DTSTART:19600101T000000
-RDATE:19600101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Mauritius.ics b/libical/zoneinfo/Indian/Mauritius.ics
deleted file mode 100644
index 18b6f924d0..0000000000
--- a/libical/zoneinfo/Indian/Mauritius.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Mauritius
-X-LIC-LOCATION:Indian/Mauritius
-BEGIN:STANDARD
-TZOFFSETFROM:+0350
-TZOFFSETTO:+0400
-TZNAME:MUT
-DTSTART:19070101T000000
-RDATE:19070101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Mayotte.ics b/libical/zoneinfo/Indian/Mayotte.ics
deleted file mode 100644
index 2e9fc0f09d..0000000000
--- a/libical/zoneinfo/Indian/Mayotte.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Mayotte
-X-LIC-LOCATION:Indian/Mayotte
-BEGIN:STANDARD
-TZOFFSETFROM:+0301
-TZOFFSETTO:+0300
-TZNAME:EAT
-DTSTART:19110701T000000
-RDATE:19110701T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Indian/Reunion.ics b/libical/zoneinfo/Indian/Reunion.ics
deleted file mode 100644
index ab8479b9ea..0000000000
--- a/libical/zoneinfo/Indian/Reunion.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Indian/Reunion
-X-LIC-LOCATION:Indian/Reunion
-BEGIN:STANDARD
-TZOFFSETFROM:+0342
-TZOFFSETTO:+0400
-TZNAME:RET
-DTSTART:19110601T000000
-RDATE:19110601T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Makefile.am b/libical/zoneinfo/Makefile.am
deleted file mode 100644
index 662a0b9f4e..0000000000
--- a/libical/zoneinfo/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-
-zoneinfodatadir = $(datadir)/$(PACKAGE)/zoneinfo
-
-zoneinfodata_DATA = zones.tab
-
-DIRS = \
- Africa \
- America \
- America/Indiana \
- America/Kentucky \
- Antarctica \
- Arctic \
- Asia \
- Atlantic \
- Australia \
- Europe \
- Indian \
- Pacific
-
-
-install-data-local:
- @$(NORMAL_INSTALL)
- for dir in $(DIRS); do \
- $(mkinstalldirs) $(DESTDIR)$(datadir)/$(PACKAGE)/zoneinfo/$$dir; \
- for tzfile in $(srcdir)/$$dir/*.ics; do \
- $(INSTALL_DATA) $$tzfile $(DESTDIR)$(datadir)/$(PACKAGE)/zoneinfo/$$dir; \
- done \
- done
-
-dist-hook:
- for dir in $(DIRS); do \
- mkdir $(distdir)/$$dir; \
- for tzfile in $(srcdir)/$$dir/*.ics; do \
- cp -p $$tzfile $(distdir)/$$dir; \
- done \
- done
-
-EXTRA_DIST = $(zoneinfodata_DATA)
diff --git a/libical/zoneinfo/Pacific/Apia.ics b/libical/zoneinfo/Pacific/Apia.ics
deleted file mode 100644
index 898d8957c9..0000000000
--- a/libical/zoneinfo/Pacific/Apia.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Apia
-X-LIC-LOCATION:Pacific/Apia
-BEGIN:STANDARD
-TZOFFSETFROM:+1233
-TZOFFSETTO:-1127
-TZNAME:LMT
-DTSTART:18790705T000000
-RDATE:18790705T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1127
-TZOFFSETTO:-1130
-TZNAME:SAMT
-DTSTART:19110101T000000
-RDATE:19110101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1130
-TZOFFSETTO:-1100
-TZNAME:WST
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Auckland.ics b/libical/zoneinfo/Pacific/Auckland.ics
deleted file mode 100644
index 40f40b1776..0000000000
--- a/libical/zoneinfo/Pacific/Auckland.ics
+++ /dev/null
@@ -1,117 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Auckland
-X-LIC-LOCATION:Pacific/Auckland
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19900318T030000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=3SU
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:NZDT
-DTSTART:19901007T020000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1139
-TZOFFSETTO:+1130
-TZNAME:NZST
-DTSTART:18680101T000000
-RDATE:18680101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1130
-TZOFFSETTO:+1200
-TZNAME:NZHDT
-DTSTART:19271126T020000
-RDATE:19271126T020000
-RDATE:19281104T020000
-RDATE:19291030T020000
-RDATE:19301012T020000
-RDATE:19311011T020000
-RDATE:19321009T020000
-RDATE:19331008T020000
-RDATE:19340930T020000
-RDATE:19350929T020000
-RDATE:19360927T020000
-RDATE:19370926T020000
-RDATE:19380925T020000
-RDATE:19390924T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1130
-TZNAME:NZST
-DTSTART:19280304T020000
-RDATE:19280304T020000
-RDATE:19290303T020000
-RDATE:19300316T020000
-RDATE:19310315T020000
-RDATE:19320320T020000
-RDATE:19330319T020000
-RDATE:19340429T020000
-RDATE:19350428T020000
-RDATE:19360426T020000
-RDATE:19370425T020000
-RDATE:19380424T020000
-RDATE:19390430T020000
-RDATE:19400428T020000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1130
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19400929T020000
-RDATE:19400929T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:NZDT
-DTSTART:19741103T020000
-RDATE:19741103T020000
-RDATE:19751026T020000
-RDATE:19761031T020000
-RDATE:19771030T020000
-RDATE:19781029T020000
-RDATE:19791028T020000
-RDATE:19801026T020000
-RDATE:19811025T020000
-RDATE:19821031T020000
-RDATE:19831030T020000
-RDATE:19841028T020000
-RDATE:19851027T020000
-RDATE:19861026T020000
-RDATE:19871025T020000
-RDATE:19881030T020000
-RDATE:19891008T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:NZST
-DTSTART:19750223T030000
-RDATE:19750223T030000
-RDATE:19760307T030000
-RDATE:19770306T030000
-RDATE:19780305T030000
-RDATE:19790304T030000
-RDATE:19800302T030000
-RDATE:19810301T030000
-RDATE:19820307T030000
-RDATE:19830306T030000
-RDATE:19840304T030000
-RDATE:19850303T030000
-RDATE:19860302T030000
-RDATE:19870301T030000
-RDATE:19880306T030000
-RDATE:19890305T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Chatham.ics b/libical/zoneinfo/Pacific/Chatham.ics
deleted file mode 100644
index e4039080af..0000000000
--- a/libical/zoneinfo/Pacific/Chatham.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Chatham
-X-LIC-LOCATION:Pacific/Chatham
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1245
-TZOFFSETTO:+1345
-TZNAME:CHADT
-DTSTART:19901007T024500
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1345
-TZOFFSETTO:+1245
-TZNAME:CHAST
-DTSTART:19910317T034500
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=3SU
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Easter.ics b/libical/zoneinfo/Pacific/Easter.ics
deleted file mode 100644
index fd10c37041..0000000000
--- a/libical/zoneinfo/Pacific/Easter.ics
+++ /dev/null
@@ -1,133 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Easter
-X-LIC-LOCATION:Pacific/Easter
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EASST
-DTSTART:19991009T220000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=2SA
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:EAST
-DTSTART:20000311T220000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SA
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0717
-TZOFFSETTO:-0717
-TZNAME:MMT
-DTSTART:18900101T000000
-RDATE:18900101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0717
-TZOFFSETTO:-0700
-TZNAME:EAST
-DTSTART:19320901T000000
-RDATE:19320901T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:EASST
-DTSTART:19661008T210000
-RDATE:19661008T210000
-RDATE:19671014T210000
-RDATE:19681012T210000
-RDATE:19691011T210000
-RDATE:19701010T210000
-RDATE:19711009T210000
-RDATE:19721014T210000
-RDATE:19731013T210000
-RDATE:19741012T210000
-RDATE:19751011T210000
-RDATE:19761009T210000
-RDATE:19771008T210000
-RDATE:19781014T210000
-RDATE:19791013T210000
-RDATE:19801011T210000
-RDATE:19811010T210000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0700
-TZNAME:EAST
-DTSTART:19670311T210000
-RDATE:19670311T210000
-RDATE:19680309T210000
-RDATE:19690308T210000
-RDATE:19700314T210000
-RDATE:19710313T210000
-RDATE:19720311T210000
-RDATE:19730310T210000
-RDATE:19740309T210000
-RDATE:19750308T210000
-RDATE:19760313T210000
-RDATE:19770312T210000
-RDATE:19780311T210000
-RDATE:19790310T210000
-RDATE:19800308T210000
-RDATE:19810314T210000
-RDATE:19820313T210000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0700
-TZOFFSETTO:-0600
-TZNAME:EAST
-DTSTART:19820314T000000
-RDATE:19820314T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0600
-TZOFFSETTO:-0500
-TZNAME:EASST
-DTSTART:19821009T220000
-RDATE:19821009T220000
-RDATE:19831008T220000
-RDATE:19841013T220000
-RDATE:19851012T220000
-RDATE:19861011T220000
-RDATE:19871010T220000
-RDATE:19881008T220000
-RDATE:19891014T220000
-RDATE:19901013T220000
-RDATE:19911012T220000
-RDATE:19921010T220000
-RDATE:19931009T220000
-RDATE:19941008T220000
-RDATE:19951014T220000
-RDATE:19961012T220000
-RDATE:19971011T220000
-RDATE:19980926T220000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:EAST
-DTSTART:19830312T220000
-RDATE:19830312T220000
-RDATE:19840310T220000
-RDATE:19850309T220000
-RDATE:19860308T220000
-RDATE:19870314T220000
-RDATE:19880312T220000
-RDATE:19890311T220000
-RDATE:19900310T220000
-RDATE:19910309T220000
-RDATE:19920314T220000
-RDATE:19930313T220000
-RDATE:19940312T220000
-RDATE:19950311T220000
-RDATE:19960309T220000
-RDATE:19970308T220000
-RDATE:19980314T220000
-RDATE:19990403T220000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Efate.ics b/libical/zoneinfo/Pacific/Efate.ics
deleted file mode 100644
index 0f6381cdd5..0000000000
--- a/libical/zoneinfo/Pacific/Efate.ics
+++ /dev/null
@@ -1,47 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Efate
-X-LIC-LOCATION:Pacific/Efate
-BEGIN:STANDARD
-TZOFFSETFROM:+1113
-TZOFFSETTO:+1100
-TZNAME:VUT
-DTSTART:19120113T000000
-RDATE:19120113T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:VUST
-DTSTART:19830925T000000
-RDATE:19830925T000000
-RDATE:19841023T000000
-RDATE:19850929T000000
-RDATE:19860928T000000
-RDATE:19870927T000000
-RDATE:19880925T000000
-RDATE:19890924T000000
-RDATE:19900923T000000
-RDATE:19910929T000000
-RDATE:19921025T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:VUT
-DTSTART:19840325T000000
-RDATE:19840325T000000
-RDATE:19850324T000000
-RDATE:19860323T000000
-RDATE:19870329T000000
-RDATE:19880327T000000
-RDATE:19890326T000000
-RDATE:19900325T000000
-RDATE:19910324T000000
-RDATE:19920126T000000
-RDATE:19930124T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Enderbury.ics b/libical/zoneinfo/Pacific/Enderbury.ics
deleted file mode 100644
index b56c680815..0000000000
--- a/libical/zoneinfo/Pacific/Enderbury.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Enderbury
-X-LIC-LOCATION:Pacific/Enderbury
-BEGIN:STANDARD
-TZOFFSETFROM:-1124
-TZOFFSETTO:-1200
-TZNAME:PHOT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1200
-TZOFFSETTO:-1100
-TZNAME:PHOT
-DTSTART:19791001T000000
-RDATE:19791001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:+1300
-TZNAME:PHOT
-DTSTART:19950101T000000
-RDATE:19950101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Fakaofo.ics b/libical/zoneinfo/Pacific/Fakaofo.ics
deleted file mode 100644
index bb5445d15e..0000000000
--- a/libical/zoneinfo/Pacific/Fakaofo.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Fakaofo
-X-LIC-LOCATION:Pacific/Fakaofo
-BEGIN:STANDARD
-TZOFFSETFROM:-1125
-TZOFFSETTO:-1000
-TZNAME:TKT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Fiji.ics b/libical/zoneinfo/Pacific/Fiji.ics
deleted file mode 100644
index e5ac6d8f7f..0000000000
--- a/libical/zoneinfo/Pacific/Fiji.ics
+++ /dev/null
@@ -1,31 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Fiji
-X-LIC-LOCATION:Pacific/Fiji
-BEGIN:STANDARD
-TZOFFSETFROM:+1154
-TZOFFSETTO:+1200
-TZNAME:FJT
-DTSTART:19151026T000000
-RDATE:19151026T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1300
-TZNAME:FJST
-DTSTART:19981101T020000
-RDATE:19981101T020000
-RDATE:19991107T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1200
-TZNAME:FJT
-DTSTART:19990228T030000
-RDATE:19990228T030000
-RDATE:20000227T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Funafuti.ics b/libical/zoneinfo/Pacific/Funafuti.ics
deleted file mode 100644
index ad01334553..0000000000
--- a/libical/zoneinfo/Pacific/Funafuti.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Funafuti
-X-LIC-LOCATION:Pacific/Funafuti
-BEGIN:STANDARD
-TZOFFSETFROM:+1157
-TZOFFSETTO:+1200
-TZNAME:TVT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Galapagos.ics b/libical/zoneinfo/Pacific/Galapagos.ics
deleted file mode 100644
index aa700ae957..0000000000
--- a/libical/zoneinfo/Pacific/Galapagos.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Galapagos
-X-LIC-LOCATION:Pacific/Galapagos
-BEGIN:STANDARD
-TZOFFSETFROM:-0558
-TZOFFSETTO:-0500
-TZNAME:ECT
-DTSTART:19310101T000000
-RDATE:19310101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0500
-TZOFFSETTO:-0600
-TZNAME:GALT
-DTSTART:19860101T000000
-RDATE:19860101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Gambier.ics b/libical/zoneinfo/Pacific/Gambier.ics
deleted file mode 100644
index cf6edc58d8..0000000000
--- a/libical/zoneinfo/Pacific/Gambier.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Gambier
-X-LIC-LOCATION:Pacific/Gambier
-BEGIN:STANDARD
-TZOFFSETFROM:-0900
-TZOFFSETTO:-0900
-TZNAME:GAMT
-DTSTART:19121001T000000
-RDATE:19121001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Guadalcanal.ics b/libical/zoneinfo/Pacific/Guadalcanal.ics
deleted file mode 100644
index 785515e0fe..0000000000
--- a/libical/zoneinfo/Pacific/Guadalcanal.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Guadalcanal
-X-LIC-LOCATION:Pacific/Guadalcanal
-BEGIN:STANDARD
-TZOFFSETFROM:+1040
-TZOFFSETTO:+1100
-TZNAME:SBT
-DTSTART:19121001T000000
-RDATE:19121001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Guam.ics b/libical/zoneinfo/Pacific/Guam.ics
deleted file mode 100644
index ab1b479075..0000000000
--- a/libical/zoneinfo/Pacific/Guam.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Guam
-X-LIC-LOCATION:Pacific/Guam
-BEGIN:STANDARD
-TZOFFSETFROM:-1421
-TZOFFSETTO:+0939
-TZNAME:LMT
-DTSTART:18441231T000000
-RDATE:18441231T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0939
-TZOFFSETTO:+1000
-TZNAME:GST
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:ChST
-DTSTART:20001223T000000
-RDATE:20001223T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Honolulu.ics b/libical/zoneinfo/Pacific/Honolulu.ics
deleted file mode 100644
index 060c65b54f..0000000000
--- a/libical/zoneinfo/Pacific/Honolulu.ics
+++ /dev/null
@@ -1,51 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Honolulu
-X-LIC-LOCATION:Pacific/Honolulu
-BEGIN:STANDARD
-TZOFFSETFROM:-1031
-TZOFFSETTO:-1030
-TZNAME:HST
-DTSTART:19000101T120000
-RDATE:19000101T120000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1030
-TZOFFSETTO:-0930
-TZNAME:HDT
-DTSTART:19330430T020000
-RDATE:19330430T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0930
-TZOFFSETTO:-1030
-TZNAME:HST
-DTSTART:19330521T020000
-RDATE:19330521T020000
-RDATE:19450930T020000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1030
-TZOFFSETTO:-0930
-TZNAME:HWT
-DTSTART:19420209T020000
-RDATE:19420209T020000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-0930
-TZOFFSETTO:-0930
-TZNAME:HPT
-DTSTART:19450814T133000
-RDATE:19450814T133000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-1030
-TZOFFSETTO:-1000
-TZNAME:HST
-DTSTART:19470608T020000
-RDATE:19470608T020000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Johnston.ics b/libical/zoneinfo/Pacific/Johnston.ics
deleted file mode 100644
index d0ec02b59f..0000000000
--- a/libical/zoneinfo/Pacific/Johnston.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Johnston
-X-LIC-LOCATION:Pacific/Johnston
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:-1000
-TZNAME:HST
-DTSTART:16010101T000000
-RDATE:16010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Kiritimati.ics b/libical/zoneinfo/Pacific/Kiritimati.ics
deleted file mode 100644
index 5c57dc546b..0000000000
--- a/libical/zoneinfo/Pacific/Kiritimati.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Kiritimati
-X-LIC-LOCATION:Pacific/Kiritimati
-BEGIN:STANDARD
-TZOFFSETFROM:-1029
-TZOFFSETTO:-1040
-TZNAME:LINT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1040
-TZOFFSETTO:-1000
-TZNAME:LINT
-DTSTART:19791001T000000
-RDATE:19791001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1000
-TZOFFSETTO:+1400
-TZNAME:LINT
-DTSTART:19950101T000000
-RDATE:19950101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Kosrae.ics b/libical/zoneinfo/Pacific/Kosrae.ics
deleted file mode 100644
index 41281f6f6e..0000000000
--- a/libical/zoneinfo/Pacific/Kosrae.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Kosrae
-X-LIC-LOCATION:Pacific/Kosrae
-BEGIN:STANDARD
-TZOFFSETFROM:+1052
-TZOFFSETTO:+1100
-TZNAME:KOST
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:KOST
-DTSTART:19691001T000000
-RDATE:19691001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:KOST
-DTSTART:19990101T000000
-RDATE:19990101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Kwajalein.ics b/libical/zoneinfo/Pacific/Kwajalein.ics
deleted file mode 100644
index 93bb514cd1..0000000000
--- a/libical/zoneinfo/Pacific/Kwajalein.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Kwajalein
-X-LIC-LOCATION:Pacific/Kwajalein
-BEGIN:STANDARD
-TZOFFSETFROM:+1109
-TZOFFSETTO:+1100
-TZNAME:MHT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:-1200
-TZNAME:KWAT
-DTSTART:19691001T000000
-RDATE:19691001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1200
-TZOFFSETTO:+1200
-TZNAME:MHT
-DTSTART:19930820T000000
-RDATE:19930820T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Majuro.ics b/libical/zoneinfo/Pacific/Majuro.ics
deleted file mode 100644
index c327b315bd..0000000000
--- a/libical/zoneinfo/Pacific/Majuro.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Majuro
-X-LIC-LOCATION:Pacific/Majuro
-BEGIN:STANDARD
-TZOFFSETFROM:+1125
-TZOFFSETTO:+1100
-TZNAME:MHT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:MHT
-DTSTART:19691001T000000
-RDATE:19691001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Marquesas.ics b/libical/zoneinfo/Pacific/Marquesas.ics
deleted file mode 100644
index 21646fb51e..0000000000
--- a/libical/zoneinfo/Pacific/Marquesas.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Marquesas
-X-LIC-LOCATION:Pacific/Marquesas
-BEGIN:STANDARD
-TZOFFSETFROM:-0918
-TZOFFSETTO:-0930
-TZNAME:MART
-DTSTART:19121001T000000
-RDATE:19121001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Midway.ics b/libical/zoneinfo/Pacific/Midway.ics
deleted file mode 100644
index abdd8293b9..0000000000
--- a/libical/zoneinfo/Pacific/Midway.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Midway
-X-LIC-LOCATION:Pacific/Midway
-BEGIN:STANDARD
-TZOFFSETFROM:-1149
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:BST
-DTSTART:19670401T000000
-RDATE:19670401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:SST
-DTSTART:19831130T000000
-RDATE:19831130T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Nauru.ics b/libical/zoneinfo/Pacific/Nauru.ics
deleted file mode 100644
index 3f24d64820..0000000000
--- a/libical/zoneinfo/Pacific/Nauru.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Nauru
-X-LIC-LOCATION:Pacific/Nauru
-BEGIN:STANDARD
-TZOFFSETFROM:+1108
-TZOFFSETTO:+1130
-TZNAME:NRT
-DTSTART:19210115T000000
-RDATE:19210115T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1130
-TZOFFSETTO:+0900
-TZNAME:JST
-DTSTART:19420315T000000
-RDATE:19420315T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1130
-TZNAME:NRT
-DTSTART:19440815T000000
-RDATE:19440815T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1130
-TZOFFSETTO:+1200
-TZNAME:NRT
-DTSTART:19790501T000000
-RDATE:19790501T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Niue.ics b/libical/zoneinfo/Pacific/Niue.ics
deleted file mode 100644
index 5e22f8d36f..0000000000
--- a/libical/zoneinfo/Pacific/Niue.ics
+++ /dev/null
@@ -1,29 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Niue
-X-LIC-LOCATION:Pacific/Niue
-BEGIN:STANDARD
-TZOFFSETFROM:-1120
-TZOFFSETTO:-1120
-TZNAME:NUT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1120
-TZOFFSETTO:-1130
-TZNAME:NUT
-DTSTART:19510101T000000
-RDATE:19510101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1130
-TZOFFSETTO:-1100
-TZNAME:NUT
-DTSTART:19781001T000000
-RDATE:19781001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Norfolk.ics b/libical/zoneinfo/Pacific/Norfolk.ics
deleted file mode 100644
index 4de72ee9fb..0000000000
--- a/libical/zoneinfo/Pacific/Norfolk.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Norfolk
-X-LIC-LOCATION:Pacific/Norfolk
-BEGIN:STANDARD
-TZOFFSETFROM:+1112
-TZOFFSETTO:+1112
-TZNAME:NMT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1112
-TZOFFSETTO:+1130
-TZNAME:NFT
-DTSTART:19510101T000000
-RDATE:19510101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Noumea.ics b/libical/zoneinfo/Pacific/Noumea.ics
deleted file mode 100644
index b286c5beff..0000000000
--- a/libical/zoneinfo/Pacific/Noumea.ics
+++ /dev/null
@@ -1,33 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Noumea
-X-LIC-LOCATION:Pacific/Noumea
-BEGIN:STANDARD
-TZOFFSETFROM:+1106
-TZOFFSETTO:+1100
-TZNAME:NCT
-DTSTART:19120113T000000
-RDATE:19120113T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1100
-TZOFFSETTO:+1200
-TZNAME:NCST
-DTSTART:19771204T000000
-RDATE:19771204T000000
-RDATE:19781203T000000
-RDATE:19961201T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1200
-TZOFFSETTO:+1100
-TZNAME:NCT
-DTSTART:19780227T000000
-RDATE:19780227T000000
-RDATE:19790227T000000
-RDATE:19970302T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Pago_Pago.ics b/libical/zoneinfo/Pacific/Pago_Pago.ics
deleted file mode 100644
index 0be03a38df..0000000000
--- a/libical/zoneinfo/Pacific/Pago_Pago.ics
+++ /dev/null
@@ -1,43 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Pago_Pago
-X-LIC-LOCATION:Pacific/Pago_Pago
-BEGIN:STANDARD
-TZOFFSETFROM:+1237
-TZOFFSETTO:-1123
-TZNAME:LMT
-DTSTART:18790705T000000
-RDATE:18790705T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1123
-TZOFFSETTO:-1130
-TZNAME:SAMT
-DTSTART:19110101T000000
-RDATE:19110101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1130
-TZOFFSETTO:-1100
-TZNAME:NST
-DTSTART:19500101T000000
-RDATE:19500101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:BST
-DTSTART:19670401T000000
-RDATE:19670401T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-1100
-TZOFFSETTO:-1100
-TZNAME:SST
-DTSTART:19831130T000000
-RDATE:19831130T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Palau.ics b/libical/zoneinfo/Pacific/Palau.ics
deleted file mode 100644
index f92ebe325f..0000000000
--- a/libical/zoneinfo/Pacific/Palau.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Palau
-X-LIC-LOCATION:Pacific/Palau
-BEGIN:STANDARD
-TZOFFSETFROM:+0858
-TZOFFSETTO:+0900
-TZNAME:PWT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Pitcairn.ics b/libical/zoneinfo/Pacific/Pitcairn.ics
deleted file mode 100644
index 7e5f4ed768..0000000000
--- a/libical/zoneinfo/Pacific/Pitcairn.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Pitcairn
-X-LIC-LOCATION:Pacific/Pitcairn
-BEGIN:STANDARD
-TZOFFSETFROM:-0840
-TZOFFSETTO:-0830
-TZNAME:PNT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:-0830
-TZOFFSETTO:-0800
-TZNAME:PST
-DTSTART:19980427T000000
-RDATE:19980427T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Ponape.ics b/libical/zoneinfo/Pacific/Ponape.ics
deleted file mode 100644
index 71a1670ca6..0000000000
--- a/libical/zoneinfo/Pacific/Ponape.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Ponape
-X-LIC-LOCATION:Pacific/Ponape
-BEGIN:STANDARD
-TZOFFSETFROM:+1033
-TZOFFSETTO:+1100
-TZNAME:PONT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Port_Moresby.ics b/libical/zoneinfo/Pacific/Port_Moresby.ics
deleted file mode 100644
index 37eac9d6f5..0000000000
--- a/libical/zoneinfo/Pacific/Port_Moresby.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Port_Moresby
-X-LIC-LOCATION:Pacific/Port_Moresby
-BEGIN:STANDARD
-TZOFFSETFROM:+0949
-TZOFFSETTO:+0949
-TZNAME:PMMT
-DTSTART:18800101T000000
-RDATE:18800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0949
-TZOFFSETTO:+1000
-TZNAME:PGT
-DTSTART:18950101T000000
-RDATE:18950101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Rarotonga.ics b/libical/zoneinfo/Pacific/Rarotonga.ics
deleted file mode 100644
index e0b3d7b13b..0000000000
--- a/libical/zoneinfo/Pacific/Rarotonga.ics
+++ /dev/null
@@ -1,59 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Rarotonga
-X-LIC-LOCATION:Pacific/Rarotonga
-BEGIN:STANDARD
-TZOFFSETFROM:-1039
-TZOFFSETTO:-1030
-TZNAME:CKT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1030
-TZOFFSETTO:-0930
-TZNAME:CKHST
-DTSTART:19781112T000000
-RDATE:19781112T000000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:-0930
-TZOFFSETTO:-1000
-TZNAME:CKT
-DTSTART:19790304T000000
-RDATE:19790304T000000
-RDATE:19800302T000000
-RDATE:19810301T000000
-RDATE:19820307T000000
-RDATE:19830306T000000
-RDATE:19840304T000000
-RDATE:19850303T000000
-RDATE:19860302T000000
-RDATE:19870301T000000
-RDATE:19880306T000000
-RDATE:19890305T000000
-RDATE:19900304T000000
-RDATE:19910303T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:-1000
-TZOFFSETTO:-0930
-TZNAME:CKHST
-DTSTART:19791028T000000
-RDATE:19791028T000000
-RDATE:19801026T000000
-RDATE:19811025T000000
-RDATE:19821031T000000
-RDATE:19831030T000000
-RDATE:19841028T000000
-RDATE:19851027T000000
-RDATE:19861026T000000
-RDATE:19871025T000000
-RDATE:19881030T000000
-RDATE:19891029T000000
-RDATE:19901028T000000
-END:DAYLIGHT
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Saipan.ics b/libical/zoneinfo/Pacific/Saipan.ics
deleted file mode 100644
index d99da03b98..0000000000
--- a/libical/zoneinfo/Pacific/Saipan.ics
+++ /dev/null
@@ -1,36 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Saipan
-X-LIC-LOCATION:Pacific/Saipan
-BEGIN:STANDARD
-TZOFFSETFROM:-1417
-TZOFFSETTO:+0943
-TZNAME:LMT
-DTSTART:18441231T000000
-RDATE:18441231T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0943
-TZOFFSETTO:+0900
-TZNAME:MPT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1000
-TZNAME:MPT
-DTSTART:19691001T000000
-RDATE:19691001T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1000
-TZOFFSETTO:+1000
-TZNAME:ChST
-DTSTART:20001223T000000
-RDATE:20001223T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Tahiti.ics b/libical/zoneinfo/Pacific/Tahiti.ics
deleted file mode 100644
index aebc7bb936..0000000000
--- a/libical/zoneinfo/Pacific/Tahiti.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Tahiti
-X-LIC-LOCATION:Pacific/Tahiti
-BEGIN:STANDARD
-TZOFFSETFROM:-0958
-TZOFFSETTO:-1000
-TZNAME:TAHT
-DTSTART:19121001T000000
-RDATE:19121001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Tarawa.ics b/libical/zoneinfo/Pacific/Tarawa.ics
deleted file mode 100644
index edfe2237b9..0000000000
--- a/libical/zoneinfo/Pacific/Tarawa.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Tarawa
-X-LIC-LOCATION:Pacific/Tarawa
-BEGIN:STANDARD
-TZOFFSETFROM:+1132
-TZOFFSETTO:+1200
-TZNAME:GILT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Tongatapu.ics b/libical/zoneinfo/Pacific/Tongatapu.ics
deleted file mode 100644
index a39ac4b40c..0000000000
--- a/libical/zoneinfo/Pacific/Tongatapu.ics
+++ /dev/null
@@ -1,45 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Tongatapu
-X-LIC-LOCATION:Pacific/Tongatapu
-BEGIN:STANDARD
-TZOFFSETFROM:+1219
-TZOFFSETTO:+1220
-TZNAME:TOT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1220
-TZOFFSETTO:+1300
-TZNAME:TOT
-DTSTART:19410101T000000
-RDATE:19410101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1300
-TZNAME:TOT
-DTSTART:19990101T000000
-RDATE:19990101T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZOFFSETFROM:+1300
-TZOFFSETTO:+1400
-TZNAME:TOST
-DTSTART:19991007T020000
-RDATE:19991007T020000
-RDATE:20001104T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZOFFSETFROM:+1400
-TZOFFSETTO:+1300
-TZNAME:TOT
-DTSTART:20000319T030000
-RDATE:20000319T030000
-RDATE:20010127T030000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Truk.ics b/libical/zoneinfo/Pacific/Truk.ics
deleted file mode 100644
index da6287e1ea..0000000000
--- a/libical/zoneinfo/Pacific/Truk.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Truk
-X-LIC-LOCATION:Pacific/Truk
-BEGIN:STANDARD
-TZOFFSETFROM:+1007
-TZOFFSETTO:+1000
-TZNAME:TRUT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Wake.ics b/libical/zoneinfo/Pacific/Wake.ics
deleted file mode 100644
index f42060f149..0000000000
--- a/libical/zoneinfo/Pacific/Wake.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Wake
-X-LIC-LOCATION:Pacific/Wake
-BEGIN:STANDARD
-TZOFFSETFROM:+1106
-TZOFFSETTO:+1200
-TZNAME:WAKT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Wallis.ics b/libical/zoneinfo/Pacific/Wallis.ics
deleted file mode 100644
index 29e7309802..0000000000
--- a/libical/zoneinfo/Pacific/Wallis.ics
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Wallis
-X-LIC-LOCATION:Pacific/Wallis
-BEGIN:STANDARD
-TZOFFSETFROM:+1215
-TZOFFSETTO:+1200
-TZNAME:WFT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/Pacific/Yap.ics b/libical/zoneinfo/Pacific/Yap.ics
deleted file mode 100644
index 9801a988c9..0000000000
--- a/libical/zoneinfo/Pacific/Yap.ics
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN:VCALENDAR
-PRODID:-//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:/softwarestudio.org/Olson_20010831_3/Pacific/Yap
-X-LIC-LOCATION:Pacific/Yap
-BEGIN:STANDARD
-TZOFFSETFROM:+0913
-TZOFFSETTO:+0900
-TZNAME:YAPT
-DTSTART:19010101T000000
-RDATE:19010101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZOFFSETFROM:+0900
-TZOFFSETTO:+1000
-TZNAME:YAPT
-DTSTART:19691001T000000
-RDATE:19691001T000000
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
diff --git a/libical/zoneinfo/zones.tab b/libical/zoneinfo/zones.tab
deleted file mode 100644
index 5c35c4c06c..0000000000
--- a/libical/zoneinfo/zones.tab
+++ /dev/null
@@ -1,373 +0,0 @@
-+0051900 -0040200 Africa/Abidjan
-+0053300 +0001300 Africa/Accra
-+0090200 +0384200 Africa/Addis_Ababa
-+0364700 +0030300 Africa/Algiers
-+0152000 +0385300 Africa/Asmera
-+0123900 -0080000 Africa/Bamako
-+0042200 +0183500 Africa/Bangui
-+0132800 -0163900 Africa/Banjul
-+0115100 -0153500 Africa/Bissau
--0154700 +0350000 Africa/Blantyre
--0041600 +0151700 Africa/Brazzaville
--0032300 +0292200 Africa/Bujumbura
-+0300300 +0311500 Africa/Cairo
-+0333900 -0073500 Africa/Casablanca
-+0355300 -0051900 Africa/Ceuta
-+0093100 -0134300 Africa/Conakry
-+0144000 -0172600 Africa/Dakar
--0064800 +0391700 Africa/Dar_es_Salaam
-+0113600 +0430900 Africa/Djibouti
-+0040300 +0094200 Africa/Douala
-+0270900 -0131200 Africa/El_Aaiun
-+0083000 -0131500 Africa/Freetown
--0254500 +0255500 Africa/Gaborone
--0175000 +0310300 Africa/Harare
--0261500 +0280000 Africa/Johannesburg
-+0001900 +0322500 Africa/Kampala
-+0153600 +0323200 Africa/Khartoum
--0015700 +0300400 Africa/Kigali
--0041800 +0151800 Africa/Kinshasa
-+0062700 +0032400 Africa/Lagos
-+0002300 +0092700 Africa/Libreville
-+0060800 +0011300 Africa/Lome
--0084800 +0131400 Africa/Luanda
--0114000 +0272800 Africa/Lubumbashi
--0152500 +0281700 Africa/Lusaka
-+0034500 +0084700 Africa/Malabo
--0255800 +0323500 Africa/Maputo
--0292800 +0273000 Africa/Maseru
--0261800 +0310600 Africa/Mbabane
-+0020400 +0452200 Africa/Mogadishu
-+0061800 -0104700 Africa/Monrovia
--0011700 +0364900 Africa/Nairobi
-+0120700 +0150300 Africa/Ndjamena
-+0133100 +0020700 Africa/Niamey
-+0180600 -0155700 Africa/Nouakchott
-+0122200 -0013100 Africa/Ouagadougou
-+0062900 +0023700 Africa/Porto-Novo
-+0002000 +0064400 Africa/Sao_Tome
-+0144600 -0030100 Africa/Timbuktu
-+0325400 +0131100 Africa/Tripoli
-+0364800 +0101100 Africa/Tunis
--0223400 +0170600 Africa/Windhoek
-+0515248 -1763929 America/Adak
-+0611305 -1495401 America/Anchorage
-+0181200 -0630400 America/Anguilla
-+0170300 -0614800 America/Antigua
--0071200 -0481200 America/Araguaina
-+0123000 -0685800 America/Aruba
--0251600 -0574000 America/Asuncion
-+0130600 -0593700 America/Barbados
--0012700 -0482900 America/Belem
-+0173000 -0881200 America/Belize
-+0024900 -0604000 America/Boa_Vista
-+0043600 -0740500 America/Bogota
-+0433649 -1161209 America/Boise
--0343600 -0582700 America/Buenos_Aires
-+0690300 -1050500 America/Cambridge_Bay
-+0210500 -0864600 America/Cancun
-+0103000 -0665600 America/Caracas
--0282800 -0654700 America/Catamarca
-+0045600 -0522000 America/Cayenne
-+0191800 -0812300 America/Cayman
-+0415100 -0873900 America/Chicago
-+0283800 -1060500 America/Chihuahua
--0312400 -0641100 America/Cordoba
-+0095600 -0840500 America/Costa_Rica
--0153500 -0560500 America/Cuiaba
-+0121100 -0690000 America/Curacao
-+0640400 -1392500 America/Dawson
-+0594600 -1201400 America/Dawson_Creek
-+0394421 -1045903 America/Denver
-+0421953 -0830245 America/Detroit
-+0151800 -0612400 America/Dominica
-+0533300 -1132800 America/Edmonton
--0064000 -0695200 America/Eirunepe
-+0134200 -0891200 America/El_Salvador
--0034300 -0383000 America/Fortaleza
-+0461200 -0595700 America/Glace_Bay
-+0641100 -0514400 America/Godthab
-+0532000 -0602500 America/Goose_Bay
-+0212800 -0710800 America/Grand_Turk
-+0120300 -0614500 America/Grenada
-+0161400 -0613200 America/Guadeloupe
-+0143800 -0903100 America/Guatemala
--0021000 -0795000 America/Guayaquil
-+0064800 -0581000 America/Guyana
-+0443900 -0633600 America/Halifax
-+0230800 -0822200 America/Havana
-+0290400 -1105800 America/Hermosillo
-+0394606 -0860929 America/Indiana/Indianapolis
-+0411745 -0863730 America/Indiana/Knox
-+0382232 -0862041 America/Indiana/Marengo
-+0384452 -0850402 America/Indiana/Vevay
-+0394606 -0860929 America/Indianapolis
-+0682500 -1133000 America/Inuvik
-+0634400 -0682800 America/Iqaluit
-+0180000 -0764800 America/Jamaica
--0241100 -0651800 America/Jujuy
-+0581807 -1342511 America/Juneau
-+0381515 -0854534 America/Kentucky/Louisville
-+0364947 -0845057 America/Kentucky/Monticello
--0163000 -0680900 America/La_Paz
--0120300 -0770300 America/Lima
-+0340308 -1181434 America/Los_Angeles
-+0381515 -0854534 America/Louisville
--0094000 -0354300 America/Maceio
-+0120900 -0861700 America/Managua
--0030800 -0600100 America/Manaus
-+0143600 -0610500 America/Martinique
-+0231300 -1062500 America/Mazatlan
--0325300 -0684900 America/Mendoza
-+0450628 -0873651 America/Menominee
-+0205800 -0893700 America/Merida
-+0192400 -0990900 America/Mexico_City
-+0470300 -0562000 America/Miquelon
-+0254000 -1001900 America/Monterrey
--0345300 -0561100 America/Montevideo
-+0453100 -0733400 America/Montreal
-+0164400 -0621300 America/Montserrat
-+0250500 -0772100 America/Nassau
-+0404251 -0740023 America/New_York
-+0490100 -0881600 America/Nipigon
-+0643004 -1652423 America/Nome
--0035100 -0322500 America/Noronha
-+0085800 -0793200 America/Panama
-+0660800 -0654400 America/Pangnirtung
-+0055000 -0551000 America/Paramaribo
-+0332654 -1120424 America/Phoenix
-+0183200 -0722000 America/Port-au-Prince
-+0103900 -0613100 America/Port_of_Spain
--0084600 -0635400 America/Porto_Velho
-+0182806 -0660622 America/Puerto_Rico
-+0484300 -0942900 America/Rainy_River
-+0624500 -0921000 America/Rankin_Inlet
--0080300 -0345400 America/Recife
-+0502400 -1043900 America/Regina
--0095800 -0674800 America/Rio_Branco
--0325700 -0604000 America/Rosario
--0332700 -0704000 America/Santiago
-+0182800 -0695400 America/Santo_Domingo
--0233200 -0463700 America/Sao_Paulo
-+0703000 -0221500 America/Scoresbysund
-+0364708 -1084111 America/Shiprock
-+0473400 -0524300 America/St_Johns
-+0171800 -0624300 America/St_Kitts
-+0140100 -0610000 America/St_Lucia
-+0182100 -0645600 America/St_Thomas
-+0130900 -0611400 America/St_Vincent
-+0501700 -1075000 America/Swift_Current
-+0140600 -0871300 America/Tegucigalpa
-+0763400 -0684700 America/Thule
-+0482300 -0891500 America/Thunder_Bay
-+0323200 -1170100 America/Tijuana
-+0182700 -0643700 America/Tortola
-+0491600 -1230700 America/Vancouver
-+0604300 -1350300 America/Whitehorse
-+0495300 -0970900 America/Winnipeg
-+0593249 -1394338 America/Yakutat
-+0622700 -1142100 America/Yellowknife
--0661700 +1103100 Antarctica/Casey
--0683500 +0775800 Antarctica/Davis
--0664000 +1400100 Antarctica/DumontDUrville
--0673600 +0625300 Antarctica/Mawson
--0775000 +1663600 Antarctica/McMurdo
--0644800 -0640600 Antarctica/Palmer
--0900000 +0000000 Antarctica/South_Pole
--0690022 +0393524 Antarctica/Syowa
--0782400 +1065400 Antarctica/Vostok
-+0780000 +0160000 Arctic/Longyearbyen
-+0124500 +0451200 Asia/Aden
-+0431500 +0765700 Asia/Almaty
-+0315700 +0355600 Asia/Amman
-+0644500 +1772900 Asia/Anadyr
-+0443100 +0501600 Asia/Aqtau
-+0501700 +0571000 Asia/Aqtobe
-+0375700 +0582300 Asia/Ashgabat
-+0332100 +0442500 Asia/Baghdad
-+0262300 +0503500 Asia/Bahrain
-+0402300 +0495100 Asia/Baku
-+0134500 +1003100 Asia/Bangkok
-+0335300 +0353000 Asia/Beirut
-+0425400 +0743600 Asia/Bishkek
-+0045600 +1145500 Asia/Brunei
-+0223200 +0882200 Asia/Calcutta
-+0293400 +1063500 Asia/Chungking
-+0065600 +0795100 Asia/Colombo
-+0333000 +0361800 Asia/Damascus
-+0234300 +0902500 Asia/Dhaka
--0083300 +1253500 Asia/Dili
-+0251800 +0551800 Asia/Dubai
-+0383500 +0684800 Asia/Dushanbe
-+0313000 +0342800 Asia/Gaza
-+0454500 +1264100 Asia/Harbin
-+0221700 +1140900 Asia/Hong_Kong
-+0480100 +0913900 Asia/Hovd
-+0521600 +1042000 Asia/Irkutsk
-+0410100 +0285800 Asia/Istanbul
--0061000 +1064800 Asia/Jakarta
--0023200 +1404200 Asia/Jayapura
-+0314600 +0351400 Asia/Jerusalem
-+0343100 +0691200 Asia/Kabul
-+0530100 +1583900 Asia/Kamchatka
-+0245200 +0670300 Asia/Karachi
-+0392900 +0755900 Asia/Kashgar
-+0274300 +0851900 Asia/Katmandu
-+0560100 +0925000 Asia/Krasnoyarsk
-+0031000 +1014200 Asia/Kuala_Lumpur
-+0013300 +1102000 Asia/Kuching
-+0292000 +0475900 Asia/Kuwait
-+0221400 +1133500 Asia/Macao
-+0593400 +1504800 Asia/Magadan
-+0143500 +1210000 Asia/Manila
-+0233600 +0583500 Asia/Muscat
-+0351000 +0332200 Asia/Nicosia
-+0550200 +0825500 Asia/Novosibirsk
-+0550000 +0732400 Asia/Omsk
-+0113300 +1045500 Asia/Phnom_Penh
-+0000200 +1092000 Asia/Pontianak
-+0390100 +1254500 Asia/Pyongyang
-+0251700 +0513200 Asia/Qatar
-+0164700 +0961000 Asia/Rangoon
-+0243800 +0464300 Asia/Riyadh
-+0104500 +1064000 Asia/Saigon
-+0394000 +0664800 Asia/Samarkand
-+0373300 +1265800 Asia/Seoul
-+0311400 +1212800 Asia/Shanghai
-+0011700 +1035100 Asia/Singapore
-+0250300 +1213000 Asia/Taipei
-+0412000 +0691800 Asia/Tashkent
-+0414300 +0444900 Asia/Tbilisi
-+0354000 +0512600 Asia/Tehran
-+0272800 +0893900 Asia/Thimphu
-+0353916 +1394441 Asia/Tokyo
--0050700 +1192400 Asia/Ujung_Pandang
-+0475500 +1065300 Asia/Ulaanbaatar
-+0434800 +0873500 Asia/Urumqi
-+0175800 +1023600 Asia/Vientiane
-+0431000 +1315600 Asia/Vladivostok
-+0620000 +1294000 Asia/Yakutsk
-+0565100 +0603600 Asia/Yekaterinburg
-+0401100 +0443000 Asia/Yerevan
-+0374400 -0254000 Atlantic/Azores
-+0321700 -0644600 Atlantic/Bermuda
-+0280600 -0152400 Atlantic/Canary
-+0145500 -0233100 Atlantic/Cape_Verde
-+0620100 -0064600 Atlantic/Faeroe
-+0705900 -0080500 Atlantic/Jan_Mayen
-+0323800 -0165400 Atlantic/Madeira
-+0640900 -0215100 Atlantic/Reykjavik
--0541600 -0363200 Atlantic/South_Georgia
--0155500 -0054200 Atlantic/St_Helena
--0514200 -0575100 Atlantic/Stanley
--0345500 +1383500 Australia/Adelaide
--0272800 +1530200 Australia/Brisbane
--0315700 +1412700 Australia/Broken_Hill
--0122800 +1305000 Australia/Darwin
--0425300 +1471900 Australia/Hobart
--0201600 +1490000 Australia/Lindeman
--0313300 +1590500 Australia/Lord_Howe
--0374900 +1445800 Australia/Melbourne
--0315700 +1155100 Australia/Perth
--0335200 +1511300 Australia/Sydney
-+0522200 +0045400 Europe/Amsterdam
-+0423000 +0013100 Europe/Andorra
-+0375800 +0234300 Europe/Athens
-+0543500 -0055500 Europe/Belfast
-+0445000 +0203000 Europe/Belgrade
-+0523000 +0132200 Europe/Berlin
-+0480900 +0170700 Europe/Bratislava
-+0505000 +0042000 Europe/Brussels
-+0442600 +0260600 Europe/Bucharest
-+0473000 +0190500 Europe/Budapest
-+0470000 +0285000 Europe/Chisinau
-+0554000 +0123500 Europe/Copenhagen
-+0532000 -0061500 Europe/Dublin
-+0360800 -0052100 Europe/Gibraltar
-+0601000 +0245800 Europe/Helsinki
-+0410100 +0285800 Europe/Istanbul
-+0544300 +0203000 Europe/Kaliningrad
-+0502600 +0303100 Europe/Kiev
-+0384300 -0090800 Europe/Lisbon
-+0460300 +0143100 Europe/Ljubljana
-+0512830 +0001845 Europe/London
-+0493600 +0060900 Europe/Luxembourg
-+0402400 -0034100 Europe/Madrid
-+0355400 +0143100 Europe/Malta
-+0535400 +0273400 Europe/Minsk
-+0434200 +0072300 Europe/Monaco
-+0554500 +0373500 Europe/Moscow
-+0351000 +0332200 Europe/Nicosia
-+0595500 +0104500 Europe/Oslo
-+0485200 +0022000 Europe/Paris
-+0500500 +0142600 Europe/Prague
-+0565700 +0240600 Europe/Riga
-+0415400 +0122900 Europe/Rome
-+0531200 +0500900 Europe/Samara
-+0435500 +0122800 Europe/San_Marino
-+0435200 +0182500 Europe/Sarajevo
-+0445700 +0340600 Europe/Simferopol
-+0415900 +0212600 Europe/Skopje
-+0424100 +0231900 Europe/Sofia
-+0592000 +0180300 Europe/Stockholm
-+0592500 +0244500 Europe/Tallinn
-+0412000 +0195000 Europe/Tirane
-+0483700 +0221800 Europe/Uzhgorod
-+0470900 +0093100 Europe/Vaduz
-+0415400 +0122700 Europe/Vatican
-+0481300 +0162000 Europe/Vienna
-+0544100 +0251900 Europe/Vilnius
-+0521500 +0210000 Europe/Warsaw
-+0454800 +0155800 Europe/Zagreb
-+0475000 +0351000 Europe/Zaporozhye
-+0472300 +0083200 Europe/Zurich
--0185500 +0473100 Indian/Antananarivo
--0072000 +0722500 Indian/Chagos
--0102500 +1054300 Indian/Christmas
--0121000 +0965500 Indian/Cocos
--0114100 +0431600 Indian/Comoro
--0492110 +0701303 Indian/Kerguelen
--0044000 +0552800 Indian/Mahe
-+0041000 +0733000 Indian/Maldives
--0201000 +0573000 Indian/Mauritius
--0124700 +0451400 Indian/Mayotte
--0205200 +0552800 Indian/Reunion
--0135000 -1714400 Pacific/Apia
--0365200 +1744600 Pacific/Auckland
--0435500 -1763000 Pacific/Chatham
--0271000 -1092700 Pacific/Easter
--0174000 +1682500 Pacific/Efate
--0030800 -1710500 Pacific/Enderbury
--0092200 -1711400 Pacific/Fakaofo
--0180800 +1782500 Pacific/Fiji
--0083100 +1791300 Pacific/Funafuti
-+0005400 -0893600 Pacific/Galapagos
--0230800 -1345700 Pacific/Gambier
--0093200 +1601200 Pacific/Guadalcanal
-+0132800 +1444500 Pacific/Guam
-+0211825 -1575130 Pacific/Honolulu
-+0170000 -1683000 Pacific/Johnston
-+0015200 -1572000 Pacific/Kiritimati
-+0051900 +1625900 Pacific/Kosrae
-+0090500 +1672000 Pacific/Kwajalein
-+0070900 +1711200 Pacific/Majuro
--0090000 -1393000 Pacific/Marquesas
-+0281300 -1772200 Pacific/Midway
-+0003100 +1665500 Pacific/Nauru
--0190100 +1695500 Pacific/Niue
--0290300 +1675800 Pacific/Norfolk
--0221600 +1653000 Pacific/Noumea
--0141600 -1704200 Pacific/Pago_Pago
-+0072000 +1342900 Pacific/Palau
--0250400 -1300500 Pacific/Pitcairn
-+0065800 +1581300 Pacific/Ponape
--0093000 +1471000 Pacific/Port_Moresby
--0211400 -1594600 Pacific/Rarotonga
-+0151200 +1454500 Pacific/Saipan
--0173200 -1493400 Pacific/Tahiti
-+0012500 +1730000 Pacific/Tarawa
--0211000 +1751000 Pacific/Tongatapu
-+0072500 +1514700 Pacific/Truk
-+0191700 +1663700 Pacific/Wake
--0131800 -1761000 Pacific/Wallis
-+0093100 +1380800 Pacific/Yap
diff --git a/libversit/.cvsignore b/libversit/.cvsignore
deleted file mode 100644
index 36a99050c8..0000000000
--- a/libversit/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-vcc.c
-vcc.lo
-vobject.lo
-vcaltmp.lo
-libversit.la \ No newline at end of file
diff --git a/libversit/Makefile.am b/libversit/Makefile.am
deleted file mode 100644
index 5d42636c1c..0000000000
--- a/libversit/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-
-noinst_LTLIBRARIES = libversit.la
-
-libversit_la_SOURCES = \
- vcc.y \
- vcc.h \
- vobject.c \
- vobject.h \
- port.h \
- vcaltmp.c \
- vcaltmp.h
-
-EXTRA_DIST = README.TXT vcaltest.c vctest.c
-
-YFLAGS=-pversit_
diff --git a/libversit/README.TXT b/libversit/README.TXT
deleted file mode 100644
index c8ce8b0979..0000000000
--- a/libversit/README.TXT
+++ /dev/null
@@ -1,951 +0,0 @@
-NOTE: If you used the earlier APIs released by Versit
-then you will want to look at the document "migrate.doc"
-included with this package. It contains a discussion of
-the differences between the old API and this one.
-
-----------------------------------------------------------------
-
-The vCard/vCalendar C interface is implemented in the set
-of files as follows:
-
-vcc.y, yacc source, and vcc.c, the yacc output you will use
-implements the core parser
-
-vobject.c implements an API that insulates the caller from
-the parser and changes in the vCard/vCalendar BNF
-
-port.h defines compilation environment dependent stuff
-
-vcc.h and vobject.h are header files for their .c counterparts
-
-vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
-which you may find useful.
-
-test.c is a standalone test driver that exercises some of
-the features of the APIs provided. Invoke test.exe on a
-VCARD/VCALENDAR input text file and you will see the pretty
-print output of the internal representation (this pretty print
-output should give you a good idea of how the internal
-representation looks like -- there is one such output in the
-following too). Also, a file with the .out suffix is generated
-to show that the internal representation can be written back
-in the original text format.
-
------------------------------------------------------------------
-
-
- VObject for VCard/VCalendar
-
-Table of Contents
-=================
-1. VObject
-2. Internal Representations of VCard/VCalendar
-3. Iterating Through VObject's Properties or Values
-4. Pretty Printing a VObject Tree
-5. Building A VObject Representation of A VCard/VCalendar
-6. Converting A VObject Representation Into Its Textual Representation
-7. Miscellaneous Notes On VObject APIs usages
-8. Brief descriptions of each APIs
-9. Additional Programming Notes.
-
-This document is mainly about the VObject and its APIs. The main
-use of a VObject is to represent a VCard or a VCalendar inside
-a program. However, its use is not limited to aforemention as it
-can represent an arbitrary information that makes up of a tree or
-forest of properties/values.
-
-1. VObject
- =======
-A VObject can have a name (id) and a list of associated properties and
-a value. Each property is itself a VObject.
-
-2. Internal Representations of VCard/VCalendar
- ===========================================
-A list of VCard or a VCalendar is represented by a list of VObjects.
-The name (id) of the VObjects in the list is either VCCardProp or
-VCCalProp. Each of these VObjects can have a list of properties.
-Since a property is represented as a VObject, each of these properties
-can have a name, a list of properties, and a value.
-
-For example, the input file "vobject.vcf":
-
-BEGIN:VCARD
-N:Alden;Roland
-FN:Roland H. Alden
-ORG:AT&T;Versit Project Office
-TITLE:Consultant
-EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
-EMAIL;INTERNET:ralden@sfgate.com
-EMAIL;MCIMail:242-2200
-LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-Suite 2208=0A=
-One Pine Street=0A=
-San Francisco, CA 94111
-LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-Suite 2208=0A=
-One Pine Street=0A=
-San Francisco, CA 94111=0A=
-U.S.A.
-TEL;WORK;PREF;MSG:+1 415 296 9106
-TEL;WORK;FAX:+1 415 296 9016
-TEL;MSG;CELL:+1 415 608 5981
-ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
-SOUND:ROW-LAND H ALL-DIN
-LOGO;GIF;BASE64:
- R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
- QjExMSEhIRAQEO///87v9973/73n95zW71K13jGl1nvG50Kt3iGc1gCMzq3e94zO
- 7xCU1nO952O15wAAACwAAAAApgBOAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv
- /8CgcEj8QTaeywWTyWCUno2kSK0KI5tLc8vtNi+WiHVMlj0mFK96nalsxOW4fPSw
- cNj4tQc+7xcjGh4WExJTJYUTFkp3eU0eEH6RkpOUlTARhRoWm5ydFpCWoS0QEqAu
- ARKaHRcVjV0borEoFl0cSre4Sq67FA+yvwAeTU8XHZ7HmxS6u2wVfMCVpAE3pJoW
- ylrMptDcOqSF4OHg3eQ5pInInb7lcc86mNbLzBXsZbRfUOn6ucyNHvVWJHCpQFDf
- MWwEEzLqx2YCQCqF3OnItClJNmYcJD7cSAKTuI/gtnEcOQKkyVIk6/+ds5CkFcMM
- 61LiENikwi1jBnNyuvUSjwWZOS5uIZarqNFcNl32XMMB6I06GgoJ+bZp1ZKeDl8E
- +MC1K1cBIhZ4HUu2LAsCZdOWRQDt20lxIlccSHsgrNq7Xc/ixcsWmNu34WKyYJCW
- gQjCe9XqTZy2L4pv04gg2sSKSc8OLgTcBSuWsdkVaD2TdXyiQxebFyjo1Gnx6tJm
- LuaqrdtZtNfFtruSNmF5IKujwIsmJbjwtRqNJhrcNVw79wcRAgogmE4ArIjQzj/s
- JvHAGCFDQR4UqigPK4sBe62XwO51OwADiMcqUG+iOdcFAL+hW20BfAoEexlwAnu6
- mZDAXQ1EVh//WfhxJB5gIbHgwFgOTOiVAgOuVQKAfKFg3weGwSBYFZMp4hpDGKyA
- 3lgJKECWgiMQyBVpW+0V4oJjNfhCNkR1IgWEb21QlRK9GdfFCgeOZYBsXgm4noYj
- GEBhAQHYh0J8XenoQnFGdrkUciJY6FUAK15ogozakcBhliKsyZWHDMZQ0wWC/Aim
- DB6h01KRr/lXQgFxAqDcWDACgCZpUnrVQJtjwTnWjS6MWAYqqfDnSaEkJOlVXQBo
- 2pWTMUJ53WgAuPncCR9q6VQMAYjZlXWJmknCoSUM2p4BC+SaKwG88hoZlvfFMM4f
- hQh5TXkv+RklWYtC91mopJIAKFkJlDAW/wF25ShnLbeo5gmQ+1FGkJdrKCuCi2OR
- BuwHBcwqKgABrMtVAgpem61XkLbAJ7n8uiIpvGVhO4KpH1QLbbpqLheZvQCkGoNL
- thSzSTg2UGVBBzbtaxwKsYrmgLvRAlCmWgwMAADD66rKAgR3XlGspcdkZYK8ibU7
- asgEl+XAyB8I7PCqMWiWncGGimpfAgO4ypXSPpOVLwsRCDJxRD2AoyeRRv5kApO5
- fXwzwvfOKLKtaTWtbQxccmGLTZy8xYlVSvXbhbk0M2YzrYfJJ0K8m+V9NgxpyC04
- UycI/aiuiH9Y8NftDUwWp1Wm5UABnAUKwwRsPFGBt4Oc9PZvGvNLwf8JOZt8Arpe
- eY23yDovwIDiBX74NAsPVLDJj3Hh4JEExsKcjrlKf9DsCVx3ZfLqAKBuG1s/A90C
- z2KjYHjjyPOdG1spz6BBUr+BcUxUb1nDCTa/VZD2Uv+YkLPAKJC9dNEh7628WgqI
- ybzlaA+ufxMa6bxC6ciLUQLcx5UGIAAsAkDA6wQkOxrcY39yo4cQMNWCAPTKV1R4
- wPkgaBxzOc8FtMiF1NoGoXBRJjgoPApmPsjCFlbMdzCM4TFy50IXxI2DPcHAv2rY
- gghsEIeu8CAPW6ABIPYEFkOsAeaMyIz0JfGJUExBBGRIRX0IMYovWCIT1eBELNpA
- i1vcgta8iANPCIQOghzQABl30J0tXqBla4wjFLFQxZzAUY42CIAd5OYBCuKxB2c4
- I0b28EcrQKADgmSKB9RYyDhA4BqCxIBqrtjIMTwoFeCjYSU3KZMQAAA7
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-PRODID:-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-START:19960523T120000
-END:19960523T130000
-SUBTYPE:PHONE CALL
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-DESCRIPTION:VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland
-END:VEVENT
-BEGIN:VEVENT
-START:19960523T113000
-END:19960523T115500
-SUBTYPE:LUNCH
-SUMMARY:Eat in the cafeteria today
-END:VEVENT
-END:VCALENDAR
-
-END:VCARD
-
-
-will conceptually be be represented as
- vcard
- VCNameProp
- VCFamilyNameProp=Alden
- VCGivenNameProp=Roland
- VCFullNameProp=Roland H.Alden
- ....
-
-note that
- EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
-will be represented as:
- VCEmailAddress=sf!rincon!ralden@alden.attmail.com
- VCWork
- VCPreferred
- VCInternet
-where the lower level properties are properties of the property
-VCEmailAddress.
-
-Groupings are flattened out in the VObject representation such
-that:
- a.b:blah
- a.c:blahblah
-are represented as:
- b=blah
- VCGrouping=a
- c=blahblah
- VCGrouping=a
-i.e. one can read the above as:
- the property "b" has value "blah" and property "VCGrouping"
- with the value "a".
- the property "c" has value "blahblah" and property "VCGrouping"
- with the value "a".
-likewise, multi-level groupings are flatten similarly. e.g.
- a.b.c:blah
- a.b.e:blahblah
--->
- c=blah
- VCGrouping=b
- VCGrouping=a
- e=blahblah
- VCGrouping=b
- VCGrouping=a
-which read:
- the property "c" has value "blah" and property "VCGrouping"
- with the value "b" which has property "VCGrouping"
- with value "a".
- the property "e" has value "blahblah" and property "VCGrouping"
- with the value "b" which has property "VCGrouping"
- with value "a".
-
-3. Iterating Through VObject's Properties or Values
- ================================================
-The following is a skeletal form of iterating through
-all properties of a vobject, o:
-
- // assume the object of interest, o, is of type VObject
- VObjectIterator i;
- initPropIterator(&i,o);
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- // ... do something with "each" property
- }
-
-Use the API vObjectName() to access a VObject's name.
-Use the API vObjectValueType() to determine if a VObject has
- a value. For VCard/VCalendar application, you
- should not need this function as practically
- all values are either of type VCVT_USTRINGZ or
- VCVT_RAW (i.e set by setVObjectUStringZValue and
- setVObjectAnyValue APIs respectively), and the
- value returned by calls to vObjectUStringZValue
- and vObjectAnyValue are 0 if a VObject has no
- value. (There is a minor exception where VObject with
- VCDataSizeProp has value that is set by
- setVObjectLongValue).
-Use the APIs vObject???Value() to access a VObject's value.
- where ??? is the expected type.
-Use the APIs setvObject???Value() to set or modify a VObject's value.
- where ??? is the expected type.
-Use the API isAPropertyOf() to query if a name match the name of
- a property of a VObject. Since isAPropertyOf() return
- the matching property, we can use that to retrieve
- a property and subsequently the value of the property.
-
-4. Pretty Printing a VObject Tree
- ==============================
-VObject tree can be pretty printed with the printVObject() function.
-The output of pretty printing a VObject representation of the input
-test file "vobject.vcf" is shown below. Note that the indentation
-indicates the tree hirerarchy where the immediate children nodes
-of a parent node is all at the same indentation level and the
-immediate children nodes are the immediate properties of the
-associated parent nodes. In the following, {N,FN,ORG,TITLE,...}
-are immediate properties of VCARD. {F and G} are properties of N
-with value {"Alden" and "Roland"} respectively; FN has no property
-but has the value "Roland H. Alden"; EMAIL has value and
-the properties WORK, PREF, and INTERNET.
-
-
-VCARD
- N
- F="Alden"
- G="Roland"
- FN="Roland H. Alden"
- ORG
- ORGNAME="AT&T"
- OUN="Versit Project Office"
- TITLE="Consultant"
- EMAIL="sf!rincon!ralden@alden.attmail.com"
- WORK
- PREF
- INTERNET
- EMAIL="ralden@sfgate.com"
- INTERNET
- EMAIL="242-2200"
- MCIMail
- LABEL="Roland H. Alden
- Suite 2208
- One Pine Street
- San Francisco, CA 94111"
- DOM
- POSTAL
- PARCEL
- HOME
- WORK
- QP
- LABEL="Roland H. Alden
- Suite 2208
- One Pine Street
- San Francisco, CA 94111
- U.S.A."
- POSTAL
- PARCEL
- HOME
- WORK
- QP
- TEL="+1 415 296 9106"
- WORK
- PREF
- MSG
- TEL="+1 415 296 9016"
- WORK
- FAX
- TEL="+1 415 608 5981"
- MSG
- CELL
- ADR
- EXT ADD="Suite 2208"
- STREET="One Pine Street"
- L="San Francisco"
- R="CA"
- PC="94111"
- C="U.S.A."
- SOUND="ROW-LAND H ALL-DIN"
- LOGO=[raw data]
- GIF
- BASE64
- DataSize=1482
-VCALENDAR
- DCREATED="19960523T100522"
- PRODID="-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN"
- VERSION="0.3"
- VEVENT
- START="19960523T120000"
- END="19960523T130000"
- SUBTYPE="PHONE CALL"
- SUMMARY="VERSIT PDI PR Teleconference/Interview"
- DESCRIPTION="VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland"
- VEVENT
- START="19960523T113000"
- END="19960523T115500"
- SUBTYPE="LUNCH"
- SUMMARY="Eat in the cafeteria today"
-
-5. Building A VObject Representation of A VCard/VCalendar
- ======================================================
-The parser in vcc.y converts an input file with one or more
-VCard/VCalendar that is in their textual representation
-into their corresponding VObject representation.
-
-VObject representation of a VCard/VCalendar can also be built
-directly with calls to the VObject building APIs. e.g.
-
- VObject *prop;
- VObject *vcard = newVObject(VCCardProp);
- prop = addProp(vcard,VCNameProp);
- addPropValue(prop,VCFamilyNameProp,"Alden");
- addPropValue(prop,VCGivenNameProp,"Roland");
- addPropValue(vcard,VCFullNameProp,"Roland H. Alden");
- ....
-
-6. Converting A VObject Representation Into Its Textual Representation
- ===================================================================
-The VObject representation can be converted back to its textual
-representation via the call to writeVObject() or writeMemVObject()
-API. e.g.
- a. to write to a file:
- // assume vcard is of type VObject
- FILE *fp = fopen("alden.vcf","w");
- writeVObject(fp,vcard);
- a. to write to memory, and let the API allocate the required memory.
- char* clipboard = writeVObject(0,0,vcard);
- ... do something to clipboard
- free(clipboard);
- b. to write to a user allocated buffer:
- char clipboard[16384];
- int len = 16384;
- char *buf = writeVObject(clipboard,&len,vcard);
- ... buf will be equal to clipboard if the write
- is successful otherwise 0.
-
-In the case of writing to memory, the memory buffer can be either
-allocated by the API or the user. If the user allocate the
-memory for the buffer, then the length of the buffer needs to be
-communicated to the API via a variable. The variable passed as
-the length argument will be overwritten with the actual size
-of the text output. A 0 return value from writeMemVObject()
-indicates an error which could be caused by overflowing the
-size of the buffer or lack of heap memory.
-
-7. Miscellaneous Notes On VObject APIs usages
- ==========================================
-a. vcc.h -- contains basic interfaces to the parser:
- VObject* Parse_MIME(const char *input, unsigned long len);
- VObject* Parse_MIME_FromFile(FILE *file);
- -- both of this return a null-terminated list of
- VObject that is either a VCARD or VCALENDAR.
- To iterate through this list, do
- VObject *t, *v;
- v = Parse_Mime_FromFile(fp);
- while (v) {
- // ... do something to v.
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
- note that call to cleanVObject will release
- resource used to represent the VObject.
-
-b. vobject.h -- contains basic interfaces to the VObject APIs.
- see the header for more details.
- The structure of VObject is purposely (hiddened) not exposed
- to the user. Every access has to be done via
- the APIs. This way, if we need to change the
- structure or implementation, the client need not
- recompile as long as the interfaces remain the
- same.
-
-c. values of a property is determined by the property definition
- itself. The vobject APIs does not attempt to enforce
- any of such definition. It is the consumer responsibility
- to know what value is expected from a property. e.g
- most properties have unicode string value, so to access
- the value of these type of properties, you will use
- the vObjectUStringZValue() to read the value and
- setVObjectUStringZValue() to set or modify the value.
- Refer to the VCard and VCalendar specifications for
- the definition of each property.
-
-d. properties name (id) are case incensitive.
-
-8. Brief descriptions of each APIs
- ===============================
- * the predefined properties' names (id) are listed under vobject.h
- each is of the form VC*Prop. e.g.
- #define VC7bitProp "7BIT"
- #define VCAAlarmProp "AALARM"
- ....
-
- * consumer of a VObject can only define pointers to VObject.
-
- * a variable of type VObjectIterator, say "i", can be used to iterate
- through a VObject's properties, say "o". The APIs related to
- VObjectIterator are:
- void initPropIterator(VObjectIterator *i, VObject *o);
- -- e.g. usage
- initPropIterator(&i,o);
- int moreIteration(VObjectIterator *i);
- -- e.g. usage
- while (moreIteration(&i)) { ... }
- VObject* nextVObject(VObjectIterator *i);
- -- e.g. usage
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- }
-
- * VObject can be chained together to form a list. e.g. of such
- use is in the parser where the return value of the parser is
- a link list of VObject. A link list of VObject can be
- built by:
- void addList(VObject **o, VObject *p);
- and iterated by
- VObject* nextVObjectInList(VObject *o);
- -- next VObjectInList return 0 if the list
- is exhausted.
-
- * the following APIs are mainly used to construct a VObject tree:
- VObject* newVObject(const char *id);
- -- used extensively internally by VObject APIs but when
- used externally, its use is mainly limited to the
- construction of top level object (e.g. an object
- with VCCardProp or VCCalendarProp id).
-
- void deleteVObject(VObject *p);
- -- to deallocate single VObject, for most user, use
- cleanVObject(VObject *o) instead for freeing all
- resources associated with the VObject.
-
- char* dupStr(const char *s, unsigned int size);
- -- duplicate a string s. If size is 0, the string is
- assume to be a null-terminated.
-
- void deleteStr(const char *p);
- -- used to deallocate a string allocated by dupStr();
-
- void setVObjectName(VObject *o, const char* id);
- -- set the id of VObject o. This function is not
- normally used by the user. The setting of id
- is normally done as part of other APIs (e.g.
- addProp()).
-
- void setVObjectStringZValue(VObject *o, const char *s);
- -- set a string value of a VObject.
-
- void setVObjectUStringZValue(VObject *o, const wchar_t *s);
- -- set a Unicode string value of a VObject.
-
- void setVObjectIntegerValue(VObject *o, unsigned int i);
- -- set an integer value of a VObject.
-
- void setVObjectLongValue(VObject *o, unsigned long l);
- -- set an long integer value of a VObject.
-
- void setVObjectAnyValue(VObject *o, void *t);
- -- set any value of a VObject. The value type is
- unspecified.
-
- VObject* setValueWithSize(VObject *prop, void *val, unsigned int size);
- -- set a raw data (stream of bytes) value of a VObject
- whose size is size. The internal VObject representation
- is
- this object = val
- VCDataSizeProp=size
- i.e. the value val will be attached to the VObject prop
- and a property of VCDataSize whose value is size
- is also added to the object.
-
- void setVObjectVObjectValue(VObject *o, VObject *p);
- -- set a VObject as the value of another VObject.
-
- const char* vObjectName(VObject *o);
- -- retrieve the VObject's Name (i.e. id).
-
- const char* vObjectStringZValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- null-terminated string.
-
- const wchar_t* vObjectUStringZValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- null-terminated unicode string.
-
- unsigned int vObjectIntegerValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- integer.
-
- unsigned long vObjectLongValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- long integer.
-
- void* vObjectAnyValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- any value.
-
- VObject* vObjectVObjectValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- a VObject.
-
- VObject* addVObjectProp(VObject *o, VObject *p);
- -- add a VObject p as a property of VObject o.
- (not normally used externally for building a
- VObject).
-
- VObject* addProp(VObject *o, const char *id);
- -- add a property whose name is id to VObject o.
-
- VObject* addPropValue(VObject *o, const char *id, const char *v);
- -- add a property whose name is id and whose value
- is a null-terminated string to VObject o.
-
- VObject* addPropSizedValue(VObject *o, const char *id,
- const char *v, unsigned int size);
- -- add a property whose name is id and whose value
- is a stream of bytes of size size, to VObject o.
-
- VObject* addGroup(VObject *o, const char *g);
- -- add a group g to VObject o.
- e.g. if g is a.b.c, you will have
- o
- c
- VCGroupingProp=b
- VCGroupingProp=a
- and the object c is returned.
-
- VObject* isAPropertyOf(VObject *o, const char *id);
- -- query if a property by the name id is in o and
- return the VObject that represent that property.
-
- void printVObject(VObject *o);
- -- pretty print VObject o to stdout (for debugging use).
-
- void writeVObject(FILE *fp, VObject *o);
- -- convert VObject o to its textual representation and
- write it to file.
-
- char* writeMemVObject(char *s, int *len, VObject *o);
- -- convert VObject o to its textual representation and
- write it to memory. If s is 0, then memory required
- to hold the textual representation will be allocated
- by this API. If a variable len is passed, len will
- be overwriten with the byte size of the textual
- representation. If s is non-zero, then s has to
- be a user allocated buffer whose size has be passed
- in len as a variable. Memory allocated by the API
- has to be freed with call to free. The return value
- of this API is either the user supplied buffer,
- the memory allocated by the API, or 0 (in case of
- failure).
-
- void cleanStrTbl();
- -- this function has to be called when all
- VObject has been destroyed.
-
- void cleanVObject(VObject *o);
- -- release all resources used by VObject o.
-
- wchar_t* fakeUnicode(const char *ps, int *bytes);
- -- convert char* to wchar_t*.
-
- extern int uStrLen(const wchar_t *u);
- -- length of unicode u.
-
- char *fakeCString(const wchar_t *u);
- -- convert wchar_t to CString (blindly assumes that
- this could be done).
-
-9. Additional Programming Notes
- ============================
-In the following notes, please refers to the listing
-of Example.vcf and its VObject Representation
-(shown at the end of this section).
-
-* Handling the Return Value of the VCard/VCalendar Parser
- The example input text file contains two root VObjects
- (a VCalendar and a VCard). The output of the VCard/VCalendar
- parser is a null-terminated list of VObjects. For this
- particular input file, the list will have two VObjects.
- The following shows a template for iterating through the
- output of the Parser:
-
- VObject *t, *v;
- v = Parse_Mime_fromFileName("example.vcf");
- while (v) {
- // currently, v will either be a VCard or a VCalendar
- // do whatever your application need to do to
- // v here ...
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
-
-* Iterating Through a VCard/VCalendar VObject
- From the VObject APIs point of view, a VCard VObject
- is the same as a VCalendar VObject. However, the application
- needs to know what are in a VCard or a VCalendar.
- For example, A VCalendar VObject can have VCDCreatedProp,
- a VCGEOLocationProp, etc, and one or more VCEventProp and
- or VCTodoProp. The VCEventProp and VCTodoProp can have
- many properties of their own, which in turn could have
- more properties (e.g. VCDAlarmProp can be a VCEventProp
- VObject's property, and VCRunTimeProp can be a
- VCDAlarmProp VObject's property. Because a VObject tree
- can be arbitrarily complex, in general, to process all
- properties and values of a VObject tree, a recursive walk
- is desirable. An example recursive VObject tree walk
- can be found in the vobject.c source lines for printVObject*
- and writeVObject* APIs. Depending on what the application need
- to do with a VCard or a VCalendar, a recursive walk
- of the VObject tree may or may not be desirable. An example
- template of a non-recursive walk is shown below:
-
- void processVCardVCalendar(char *inputFile)
- {
- VObject *t, *v;
- v = Parse_Mime_fromFileName(inputFile);
- while (v) {
- char *n = vObjectName(v);
- if (strcmp(n,VCCardProp) == 0) {
- do_VCard(v);
- }
- else if (strcmp(n,VCCalendarProp) == 0) {
- do_VCalendar(v);
- }
- else {
- // don't know how to handle anything else!
- }
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
- }
-
- void do_VCard(VObject *vcard)
- {
- VObjectIterator t;
- initPropIterator(&t,vcard);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- // The primarly purpose of this example is to
- // show how to iterate through a VCard VObject,
- // it is not meant to be efficient at all.
- char *n = vObjectName(eachProp);
- if (strcmp(n,VCNameProp)==0) {
- do_name(eachProp);
- }
- else if (strcmp(n,VCEmailProp)==0) {
- do_email(eachProp);
- }
- else if (strcmp(n,VCLabelProp)==0) {
- do_label(eachProp);
- }
- else if ....
- }
- }
-
- void do_VCalendar(VObject *vcal)
- {
- VObjectIterator t;
- initPropIterator(&t,vcard);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- // The primarly purpose of this example is to
- // show how to iterate through a VCalendar VObject,
- // it is not meant to be efficient at all.
- char *n = vObjectName(eachProp);
- if (strcmp(n,VCDCreatedProp)==0) {
- do_DCreated(eachProp);
- }
- else if (strcmp(n,VCVersionProp)==0) {
- do_Version(eachProp);
- }
- else if (strcmp(n,VCTodoProp)==0) {
- do_Todo(eachProp);
- }
- else if (strcmp(n,VCEventProp)==0) {
- do_Event(eachProp);
- }
- else if ....
- }
- }
-
- void do_Todo(VObject *vtodo) { ... }
-
- void do_Event(VObject *vevent) { ... }
-
- ...
-
-* Property's Values and Properties
- The VObject APIs do not attempt to check for the
- correctness of the values of a property. Nor do they
- will prevent the user from attaching a non-VCard/VCalendar
- standard property to a VCard/VCalendar property. Take
- the example of line [11] of the example, "O.K" is not
- a valid value of VCStatusProp. It is up to the application
- to accept or reject the value of a property.
-
-* Output of printVObject
- PrintVObject pretty prints a VObject tree in human
- readable form. See the listing at the end of the file
- for an example output of printVObject on the example
- input file "Example.vcf".
-
- Note that binary data are not shown in the output of
- printVObject. Instead, a note is made ([raw data]) to
- indicate that there exists such a binary data.
-
-* Note on Binary Data
- When the value of a property is a binary data, it is only
- useful to know the size of the binary data.
-
- In the case of the VCard/VCalendar parser, it chooses
- to represent the size information as a separate property
- called VCDataSizeProp whose value is the size of the binary
- data. The APIs sequence to construct the VObject subtree
- of line [44] of Example.vcf is
-
- // VObject *vcard;
- VObject *p1 = addProp(vcard,VCLogoProp);
- (void) addProp(p1,VCGIFProp);
- (void) addProp(p1,VCBASE64Prop);
- VObject *p2 = addProp(p1,VCDataSizeProp);
- (void) setVObjectLongValue(p2,1482);
- setVObjectAnyValue(vcard,...pointer to binary data);
-
- Note the presence of VCBase64Prop will cause the
- writeVObject API to output the binary data as BASE64 text.
- For VCard/VCalendar application, having the VCBase64Prop
- property is pratically always neccessary for property with
- binary data as its value.
-
-* Note on Quoted-Printable String
- String value with embedded newline are written out as
- quoted-prinatable string. It is therefore important
- to mark a property with a string value that has
- one or more embedded newlines, with the VCQutedPrintableProp
- property. e.g.
-
- // VObject *root;
- char *msg="To be\nor\nnot to be";
- VObject *p = addPropValue(root,VCDescriptionProp,msg);
- // the following is how you mark a property with
- // a property. In this case, the marker is
- // VCQuotedPrintableProp
- addProp(p,VCQuotedPrintableProp);
-
-* Note on Unicode
- Although, the current parser takes ASCII text file only,
- string values are all stored as Unicode in the VObject tree.
- For now, when using the VObject APIs to construct a
- VObject tree, one should always convert ASCII string value
- to a Unicode string value:
-
- // VObject *root;
- VObject *p = addProp(root,VCSomeProp);
- setVObjectUStringZValue(p,fakeUnicode(someASCIIStringZvalue));
-
- An API is provided to simplify the above process:
-
- addPropValue(root,VCSomeProp,someASCIIStringZValue);
-
- Note that someASCIISTringZValue is automatically converted to
- Unicode by addPropValue API, where as, the former code
- sequence do an explicit call to fakeUnicode.
-
- To read back the value, one should use the vObjectUStringZValue
- API not vObjectStringZValue API. The value returned by the
- vObjectUStringZValue API is a Unicode string. If the application
- do not know how to handle Unicode string, it can use the
- fakeCString API to convert it back to ASCII string (as long
- as the conversion is meaningful).
-
- Note that fakeCString return a heap allocated memory. It is
- important to call deleteStr on fakeCString return value if
- it is not longer required (or there will be memory leak).
-
- NOTE: Unfortunately, at the point when this document is written,
- there is still no consensus on how Unicode is to be handled
- in the textual representation of VCard/VCalendar. So, there
- is no version of writeVObject and the parser to output and
- input Unicode textual representation of VCard/VCalendar.
-
-
-Example.vcf
------------
-line
-number Input Text (example.vcf)
------- ----------
-1 BEGIN:VCALENDAR
-2 DCREATED:19961102T100522
-3 GEO:0,0
-4 VERSION:1.0
-5 BEGIN:VEVENT
-6 DTSTART:19961103T000000
-7 DTEND:20000101T000000
-8 DESCRIPTION;QUOTED-PRINTABLE:To be =0A=
-9 or =0A=
-10 not to be
-11 STATUS:O.K.
-12 X-ACTION:No action required
-13 DALARM:19961103T114500;5;3;Enjoy
-14 MALARM:19970101T120000;;;johny@nowhere.com;Call Mom.
-15 END:VEVENT
-16
-17 BEGIN:VTODO
-18 DUE:19960614T0173000
-19 DESCRIPTION:Relex.
-20 END:VTODO
-21
-22 END:VCALENDAR
-23
-24 BEGIN:VCARD
-25 N:Alden;Roland
-26 FN:Roland H. Alden
-27 ORG:AT&T;Versit Project Office
-28 TITLE:Consultant
-29 EMAIL;WORK;PREF;INTERNET:ralden@ralden.com
-30 LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-31 Suite 2208=0A=
-32 One Pine Street=0A=
-33 San Francisco, CA 94111
-34 LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-35 Suite 2208=0A=
-36 One Pine Street=0A=
-37 San Francisco, CA 94111=0A=
-38 U.S.A.
-39 TEL;WORK;PREF;MSG:+1 415 296 9106
-40 TEL;WORK;FAX:+1 415 296 9016
-41 TEL;MSG;CELL:+1 415 608 5981
-42 ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
-43 SOUND:ROW-LAND H ALL-DIN
-44 LOGO;GIF;BASE64:
-45 R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
- ... 30 lines of BASE64 data not shown here.
-76 END:VCARD
-
-
-VObject Representation of Example.vcf:
--------------------------------------
-line
-in
-text
-file VObject Tree as Printed by printVObject API
----- -------------------------------------------
-1 VCALENDAR
-2 DCREATED="19961102T100522"
-3 GEO="0,0"
-4 VERSION="1.0"
-5 VEVENT
-6 DTSTART="19961103T000000"
-7 DTEND="20000101T000000"
-8 DESCRIPTION="To be
-9 or
-10 not to be"
-8 QUOTED-PRINTABLE
-11 STATUS="O.K."
-12 X-ACTION="No action required"
-13 DALARM
-13 RUNTIME="19961103T114500"
-13 SNOOZETIME="5"
-13 REPEATCOUNT="3"
-13 DISPLAYSTRING="Enjoy"
-14 MALARM
-14 RUNTIME="19970101T120000"
-14 EMAIL="johny@nowhere.com"
-14 NOTE="Call Mom"
-17 VTODO
-18 DUE="19960614T0173000"
-19 DESCRIPTION="Relex."
-24 VCARD
-25 N
-25 F="Alden"
-25 G="Roland"
-26 FN="Roland H. Alden"
-27 ORG
-27 ORGNAME="AT&T"
-27 OUN="Versit Project Office"
-28 TITLE="Consultant"
-29 EMAIL="ralden@alden.com"
-29 WORK
-29 PREF
-29 INTERNET
-30 LABEL="Roland H. Alden
-31 Suite 2208
-32 One Pine Street
-33 San Francisco, CA 94111"
-30 DOM
-30 POSTAL
-30 PARCEL
-30 HOME
-30 WORK
-30 QUOTED-PRINTABLE
-34 LABEL="Roland H. Alden
-35 Suite 2208
-36 One Pine Street
-37 San Francisco, CA 94111
-38 U.S.A."
-34 POSTAL
-34 PARCEL
-34 HOME
-34 WORK
-34 QUOTED-PRINTABLE
-39 TEL="+1 415 296 9106"
-39 WORK
-39 PREF
-39 MSG
-40 TEL="+1 415 296 9016"
-40 WORK
-40 FAX
-41 TEL="+1 415 608 5981"
-41 MSG
-41 CELL
-42 ADR
-42 EXT ADD="Suite 2208"
-42 STREET="One Pine Street"
-42 L="San Francisco"
-42 R="CA"
-42 PC="94111"
-42 C="U.S.A."
-43 SOUND="ROW-LAND H ALL-DIN"
-44 LOGO=[raw data]
-44 GIF
-44 BASE64
-44 DATASIZE=1482
-
diff --git a/libversit/port.h b/libversit/port.h
deleted file mode 100644
index 1768beebd8..0000000000
--- a/libversit/port.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-#ifndef __PORT_H__
-#define __PORT_H__ 1
-
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-/* some of these #defines are commented out because */
-/* Visual C++ sets them on the compiler command line instead */
-
-/* #define _DEBUG */
-/* #define WIN32 */
-/* #define WIN16 */
-/* #define _WINDOWS */
-/* #define __MWERKS__ */
-/* #define INCLUDEMFC */
-
-#define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
-#define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
-
-/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
-are globally unique IDs which can be used to generate clipboard format
-ID's as per the requirements of a specific platform. For example, in
-Windows they are used as the parameter in a call to RegisterClipboardFormat.
-For example:
-
- CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
-
-*/
-
-#define vCardMimeType "text/x-vCard"
-#define vCalendarMimeType "text/x-vCalendar"
-
-#define DLLEXPORT(t) t
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#define stricmp strcasecmp
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __PORT_H__ */
diff --git a/libversit/vcaltest.c b/libversit/vcaltest.c
deleted file mode 100644
index 5528aab1d1..0000000000
--- a/libversit/vcaltest.c
+++ /dev/null
@@ -1,118 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "vcaltmp.h"
-
-#if 0
-This testcase would generate a file call "frankcal.vcf" with
-the following content:
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-GEO:37.24,-17.87
-PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-DTSTART:19960523T120000
-DTEND:19960523T130000
-DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A=
-With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A=
-activities with European Press representatives.
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-SUBTYPE:PHONE CALL
-STATUS:CONFIRMED
-TRANSP:19960523T100522-4000F100582713-009251
-UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2
-DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!;
-MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!;
-PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2;
-X-LDC-OR2-OLE:c:\temp\agenda.doc
-END:VEVENT
-
-BEGIN:VTODO
-DUE:19960614T0173000
-DESCRIPTION:Review VCalendar helper API.
-END:VTODO
-
-END:VCALENDAR
-
-#endif
-
-FILE *cfp;
-
-void testVcalAPIs() {
- FILE *fp;
- VObject *vcal, *vevent;
-#if _CONSOLE
- cfp = stdout;
-#else
- cfp = fopen("vcaltest.out","w");
-#endif
- if (cfp == 0) return;
- vcal = vcsCreateVCal(
- "19960523T100522",
- "37.24,-17.87",
- "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN",
- 0,
- "0.3"
- );
-
- vevent = vcsAddEvent(
- vcal,
- "19960523T120000",
- "19960523T130000",
- "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.",
- "VERSIT PDI PR Teleconference/Interview",
- "PHONE CALL",
- 0,
- "CONFIRMED",
- "19960523T100522-4000F100582713-009251",
- "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2",
- 0
- );
-
- vcsAddDAlarm(vevent, "19960523T114500", "5", "3",
- "Your Telecon Starts At Noon!!!");
- vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com",
- "Remember 05/23 Noon Telecon!!!");
- vcsAddPAlarm(vevent, "19960523T115500", 0 ,0,
- "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2");
-
- addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc");
-
- vcsAddTodo(
- vcal,
- 0,
- "19960614T0173000",
- 0,
- "Review VCalendar helper API.",
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- );
-
- /* now do something to the resulting VObject */
- /* pretty print on stdout for fun */
- printVObject(cfp,vcal);
- /* open the output text file */
-
-#define OUTFILE "frankcal.vcf"
-
- fp = fopen(OUTFILE, "w");
- if (fp) {
- /* write it in text form */
- writeVObject(fp,vcal);
- fclose(fp);
- }
- else {
- fprintf(cfp,"open output file '%s' failed\n", OUTFILE);
- }
- if (cfp != stdout) fclose(cfp);
- }
-
-void main() {
- testVcalAPIs();
- }
-
diff --git a/libversit/vcaltmp.c b/libversit/vcaltmp.c
deleted file mode 100644
index ccb21a649a..0000000000
--- a/libversit/vcaltmp.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
-This module provides some helper APIs for creating
-a VCalendar object.
-
-Note on APIs:
- 1. The APIs does not attempt to verify if the arguments
- passed are correct.
- 2. Where the argument to an API is not applicable, pass
- the value 0.
- 3. See the test program at the bottom of this file as an
- example of usage.
- 4. This code calls APIs in vobject.c.
-
-*/
-
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-
-#include <stdio.h>
-#include <string.h>
-#include "vcaltmp.h"
-
-
-DLLEXPORT(VObject*) vcsCreateVCal(
- char *date_created,
- char *location,
- char *product_id,
- char *time_zone,
- char *version
- )
- {
- VObject *vcal = newVObject(VCCalProp);
-#define Z(p,v) if (v) addPropValue(vcal,p,v);
- Z(VCDCreatedProp, date_created);
- Z(VCLocationProp, location)
- Z(VCProdIdProp, product_id)
- Z(VCTimeZoneProp, time_zone)
- Z(VCVersionProp, version)
-#undef Z
- return vcal;
- }
-
-
-DLLEXPORT(VObject*) vcsAddEvent(
- VObject *vcal,
- char *start_date_time,
- char *end_date_time,
- char *description,
- char *summary,
- char *categories,
- char *classification,
- char *status,
- char *transparency,
- char *uid,
- char *url
- )
- {
- VObject *vevent = addProp(vcal,VCEventProp);
-#define Z(p,v) if (v) addPropValue(vevent,p,v);
- Z(VCDTstartProp,start_date_time);
- Z(VCDTendProp,end_date_time);
- if (description) {
- VObject *p = addPropValue(vevent,VCDescriptionProp,description);
- if (strchr(description,'\n'))
- addProp(p,VCQuotedPrintableProp);
- }
- Z(VCSummaryProp,summary);
- Z(VCCategoriesProp,categories);
- Z(VCClassProp,classification);
- Z(VCStatusProp,status);
- Z(VCTranspProp,transparency);
- Z(VCUniqueStringProp,uid);
- Z(VCURLProp,url);
-#undef Z
- return vevent;
- }
-
-
-DLLEXPORT(VObject*) vcsAddTodo(
- VObject *vcal,
- char *start_date_time,
- char *due_date_time,
- char *date_time_complete,
- char *description,
- char *summary,
- char *priority,
- char *classification,
- char *status,
- char *uid,
- char *url
- )
- {
- VObject *vtodo = addProp(vcal,VCTodoProp);
-#define Z(p,v) if (v) addPropValue(vtodo,p,v);
- Z(VCDTstartProp,start_date_time);
- Z(VCDueProp,due_date_time);
- Z(VCCompletedProp,date_time_complete);
- if (description) {
- VObject *p = addPropValue(vtodo,VCDescriptionProp,description);
- if (strchr(description,'\n'))
- addProp(p,VCQuotedPrintableProp);
- }
- Z(VCSummaryProp,summary);
- Z(VCPriorityProp,priority);
- Z(VCClassProp,classification);
- Z(VCStatusProp,status);
- Z(VCUniqueStringProp,uid);
- Z(VCURLProp,url);
-#undef Z
- return vtodo;
- }
-
-
-DLLEXPORT(VObject*) vcsAddAAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *audio_content
- )
- {
- VObject *aalarm= addProp(vevent,VCAAlarmProp);
-#define Z(p,v) if (v) addPropValue(aalarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCAudioContentProp,audio_content);
-#undef Z
- return aalarm;
- }
-
-
-DLLEXPORT(VObject*) vcsAddMAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *email_address,
- char *note
- )
- {
- VObject *malarm= addProp(vevent,VCMAlarmProp);
-#define Z(p,v) if (v) addPropValue(malarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCEmailAddressProp,email_address);
- Z(VCNoteProp,note);
-#undef Z
- return malarm;
- }
-
-
-DLLEXPORT(VObject*) vcsAddDAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *display_string
- )
- {
- VObject *dalarm= addProp(vevent,VCDAlarmProp);
-#define Z(p,v) if (v) addPropValue(dalarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCDisplayStringProp,display_string);
-#undef Z
- return dalarm;
- }
-
-
-DLLEXPORT(VObject*) vcsAddPAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *procedure_name
- )
- {
- VObject *palarm= addProp(vevent,VCPAlarmProp);
-#define Z(p,v) if (v) addPropValue(palarm,p,v);
- Z(VCRunTimeProp,run_time);
- Z(VCSnoozeTimeProp,snooze_time);
- Z(VCRepeatCountProp,repeat_count);
- Z(VCProcedureNameProp,procedure_name);
-#undef Z
- return palarm;
- }
-
-
-#ifdef _TEST
-
-#if 0
-This testcase would generate a file call "frankcal.vcf" with
-the following content:
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-GEO:37.24,-17.87
-PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-DTSTART:19960523T120000
-DTEND:19960523T130000
-DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A=
-With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A=
-activities with European Press representatives.
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-CATEGORIES:PHONE CALL
-STATUS:CONFIRMED
-TRANSP:19960523T100522-4000F100582713-009251
-UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2
-DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!;
-MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!;
-PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2;
-X-LDC-OR2-OLE:c:\temp\agenda.doc
-END:VEVENT
-
-BEGIN:VTODO
-DUE:19960614T0173000
-DESCRIPTION:Review VCalendar helper API.
-END:VTODO
-
-END:VCALENDAR
-
-#endif
-
-void testVcalAPIs() {
- FILE *fp;
- VObject *vcal = vcsCreateVCal(
- "19960523T100522",
- "37.24,-17.87",
- "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN",
- 0,
- "0.3"
- );
-
- VObject *vevent = vcsAddEvent(
- vcal,
- "19960523T120000",
- "19960523T130000",
- "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.",
- "VERSIT PDI PR Teleconference/Interview",
- "PHONE CALL",
- 0,
- "CONFIRMED",
- "19960523T100522-4000F100582713-009251",
- "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2",
- 0
- );
-
- vcsAddDAlarm(vevent, "19960523T114500", "5", "3",
- "Your Telecon Starts At Noon!!!");
- vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com",
- "Remember 05/23 Noon Telecon!!!");
- vcsAddPAlarm(vevent, "19960523T115500", 0 ,0,
- "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2");
-
- addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc");
-
- vcsAddTodo(
- vcal,
- 0,
- "19960614T0173000",
- 0,
- "Review VCalendar helper API.",
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- );
-
- /* now do something to the resulting VObject */
- /* pretty print on stdout for fun */
- printVObject(vcal);
- /* open the output text file */
-
-#define OUTFILE "frankcal.vcf"
-
- fp = fopen(OUTFILE, "w");
- if (fp) {
- /* write it in text form */
- writeVObject(fp,vcal);
- fclose(fp);
- }
- else {
- printf("open output file '%s' failed\n", OUTFILE);
- }
- }
-
-void main() {
- testVcalAPIs();
- }
-
-#endif
-
-
-/* end of source file vcaltmp.c */
diff --git a/libversit/vcaltmp.h b/libversit/vcaltmp.h
deleted file mode 100644
index 4c4afde963..0000000000
--- a/libversit/vcaltmp.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-#include "vcc.h"
-
-#ifndef __VCALTMP_H__
-#define __VCALTMP_H__
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-extern DLLEXPORT(VObject*) vcsCreateVCal(
- char *date_created,
- char *location,
- char *product_id,
- char *time_zone,
- char *version
- );
-
-extern DLLEXPORT(VObject*) vcsAddEvent(
- VObject *vcal,
- char *start_date_time,
- char *end_date_time,
- char *description,
- char *summary,
- char *categories,
- char *classification,
- char *status,
- char *transparency,
- char *uid,
- char *url
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddTodo(
- VObject *vcal,
- char *start_date_time,
- char *due_date_time,
- char *date_time_complete,
- char *description,
- char *summary,
- char *priority,
- char *classification,
- char *status,
- char *uid,
- char *url
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddAAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *audio_content
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddMAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *email_address,
- char *note
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddDAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *display_string
- );
-
-
-extern DLLEXPORT(VObject*) vcsAddPAlarm(
- VObject *vevent,
- char *run_time,
- char *snooze_time,
- char *repeat_count,
- char *procedure_name
- );
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __VCALTMP_H__ */
-
-
diff --git a/libversit/vcc.h b/libversit/vcc.h
deleted file mode 100644
index 0e52034710..0000000000
--- a/libversit/vcc.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-#ifndef __VCC_H__
-#define __VCC_H__ 1
-
-#include "vobject.h"
-
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-typedef void (*MimeErrorHandler)(char *);
-
-extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
-
-extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
-extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
-
-
-/* NOTE regarding Parse_MIME_FromFile
-The function above, Parse_MIME_FromFile, comes in two flavors,
-neither of which is exported from the DLL. Each version takes
-a CFile or FILE* as a parameter, neither of which can be
-passed across a DLL interface (at least that is my experience).
-If you are linking this code into your build directly then
-you may find them a more convenient API that the other flavors
-that take a file name. If you use them with the DLL LIB you
-will get a link error.
-*/
-
-
-#if INCLUDEMFC
-extern VObject* Parse_MIME_FromFile(CFile *file);
-#else
-extern VObject* Parse_MIME_FromFile(FILE *file);
-#endif
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __VCC_H__ */
-
diff --git a/libversit/vcc.y b/libversit/vcc.y
deleted file mode 100644
index 4cf92c5a3f..0000000000
--- a/libversit/vcc.y
+++ /dev/null
@@ -1,1262 +0,0 @@
-%{
-
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
- * src: vcc.c
- * doc: Parser for vCard and vCalendar. Note that this code is
- * generated by a yacc parser generator. Generally it should not
- * be edited by hand. The real source is vcc.y. The #line directives
- * can be commented out here to make it easier to trace through
- * in a debugger. However, if a bug is found it should
- * be fixed in vcc.y and this file regenerated.
- */
-
-
-/* debugging utilities */
-#if __DEBUG
-#define DBG_(x) printf x
-#else
-#define DBG_(x)
-#endif
-
-/**** External Functions ****/
-
-/* assign local name to parser variables and functions so that
- we can use more than one yacc based parser.
-*/
-
-#define yyparse mime_parse
-#define yylex mime_lex
-#define yyerror mime_error
-#define yychar mime_char
-/* #define p_yyval p_mime_val */
-#undef yyval
-#define yyval mime_yyval
-/* #define p_yylval p_mime_lval */
-#undef yylval
-#define yylval mime_yylval
-#define yydebug mime_debug
-#define yynerrs mime_nerrs
-#define yyerrflag mime_errflag
-#define yyss mime_ss
-#define yyssp mime_ssp
-#define yyvs mime_vs
-#define yyvsp mime_vsp
-#define yylhs mime_lhs
-#define yylen mime_len
-#define yydefred mime_defred
-#define yydgoto mime_dgoto
-#define yysindex mime_sindex
-#define yyrindex mime_rindex
-#define yygindex mime_gindex
-#define yytable mime_table
-#define yycheck mime_check
-#define yyname mime_name
-#define yyrule mime_rule
-#define YYPREFIX "mime_"
-
-
-#ifndef _NO_LINE_FOLDING
-#define _SUPPORT_LINE_FOLDING 1
-#endif
-
-/* undef below if compile with MFC */
-/* #define INCLUDEMFC 1 */
-
-#if defined(WIN32) || defined(_WIN32)
-#ifdef INCLUDEMFC
-#include <afx.h>
-#endif
-#endif
-
-#include <string.h>
-#ifndef __MWERKS__
-#include <malloc.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include "vcc.h"
-
-static int yylex(void);
-static void yyerror(char *s);
-
-/**** Types, Constants ****/
-
-#define YYDEBUG 1 /* 1 to compile in some debugging code */
-#define MAXTOKEN 256 /* maximum token (line) length */
-#define YYSTACKSIZE 50 /* ~unref ? */
-#define MAXLEVEL 10 /* max # of nested objects parseable */
- /* (includes outermost) */
-
-
-/**** Global Variables ****/
-int mime_lineNum, mime_numErrors; /* yyerror() can use these */
-static VObject* vObjList;
-static VObject *curProp;
-static VObject *curObj;
-static VObject* ObjStack[MAXLEVEL];
-static int ObjStackTop;
-
-
-/* A helpful utility for the rest of the app. */
-#if __CPLUSPLUS__
-extern "C" {
-#endif
-
- extern void Parse_Debug(const char *s);
- extern void yyerror(char *s);
-
-#if __CPLUSPLUS__
- };
-#endif
-
-int yyparse(void);
-
-enum LexMode {
- L_NORMAL,
- L_VCARD,
- L_VCAL,
- L_VEVENT,
- L_VTODO,
- L_VALUES,
- L_BASE64,
- L_QUOTED_PRINTABLE
- };
-
-/**** Private Forward Declarations ****/
-static int pushVObject(const char *prop);
-static VObject* popVObject(void);
-#ifndef _SUPPORT_LINE_FOLDING
-static char* lexDataFromBase64(void);
-#endif
-static void lexPopMode(int top);
-static int lexWithinMode(enum LexMode mode);
-static void lexPushMode(enum LexMode mode);
-static void enterProps(const char *s);
-static void enterAttr(const char *s1, const char *s2);
-#if 0
-static void enterValues(const char *value);
-#endif
-static void mime_error_(char *s);
- static void appendValue(const char *value);
-
-%}
-
-/***************************************************************************/
-/*** The grammar ****/
-/***************************************************************************/
-
-%union {
- char *str;
- VObject *vobj;
- }
-
-%token
- EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE
- BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL
- BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO
- ID
-
-/*
- * NEWLINE is the token that would occur outside a vCard,
- * while LINESEP is the token that would occur inside a vCard.
- */
-
-%token <str>
- STRING ID
-
-%type <str> name value
-
-%type <vobj> vcard vcal vobject
-
-%start mime
-
-%%
-
-
-mime: vobjects
- ;
-
-vobjects: vobject
- { addList(&vObjList, $1); curObj = 0; }
- vobjects
- | vobject
- { addList(&vObjList, $1); curObj = 0; }
- ;
-
-vobject: vcard
- | vcal
- ;
-
-vcard:
- BEGIN_VCARD
- {
- lexPushMode(L_VCARD);
- if (!pushVObject(VCCardProp)) YYERROR;
- }
- items END_VCARD
- {
- lexPopMode(0);
- $$ = popVObject();
- }
- | BEGIN_VCARD
- {
- lexPushMode(L_VCARD);
- if (!pushVObject(VCCardProp)) YYERROR;
- }
- END_VCARD
- {
- lexPopMode(0);
- $$ = popVObject();
- }
- ;
-
-items: item items
- | item
- ;
-
-item: prop COLON
- {
- lexPushMode(L_VALUES);
- }
- values LINESEP
- {
- if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
- lexPopMode(0);
- lexPopMode(0);
- }
- | error
- ;
-
-prop: name
- {
- enterProps($1);
- }
- attr_params
- | name
- {
- enterProps($1);
- }
- ;
-
-attr_params: attr_param attr_params
- | attr_param
- ;
-
-attr_param: SEMICOLON attr
- ;
-
-attr: name
- {
- enterAttr($1,0);
- }
- | name EQ name
- {
- enterAttr($1,$3);
-
- }
- ;
-
-name: ID
- ;
-
-values: value SEMICOLON { appendValue($1); } values
- | value
- { appendValue($1); }
- ;
-
-value: STRING
- | { $$ = 0; }
- ;
-
-vcal:
- BEGIN_VCAL
- { if (!pushVObject(VCCalProp)) YYERROR; }
- calitems
- END_VCAL
- { $$ = popVObject(); }
- | BEGIN_VCAL
- { if (!pushVObject(VCCalProp)) YYERROR; }
- END_VCAL
- { $$ = popVObject(); }
- ;
-
-calitems: calitem calitems
- | calitem
- ;
-
-calitem:
- eventitem
- | todoitem
- | items
- ;
-
-eventitem:
- BEGIN_VEVENT
- {
- lexPushMode(L_VEVENT);
- if (!pushVObject(VCEventProp)) YYERROR;
- }
- items
- END_VEVENT
- {
- lexPopMode(0);
- popVObject();
- }
- | BEGIN_VEVENT
- {
- lexPushMode(L_VEVENT);
- if (!pushVObject(VCEventProp)) YYERROR;
- }
- END_VEVENT
- {
- lexPopMode(0);
- popVObject();
- }
- ;
-
-todoitem:
- BEGIN_VTODO
- {
- lexPushMode(L_VTODO);
- if (!pushVObject(VCTodoProp)) YYERROR;
- }
- items
- END_VTODO
- {
- lexPopMode(0);
- popVObject();
- }
- | BEGIN_VTODO
- {
- lexPushMode(L_VTODO);
- if (!pushVObject(VCTodoProp)) YYERROR;
- }
- END_VTODO
- {
- lexPopMode(0);
- popVObject();
- }
- ;
-
-%%
-/* ///////////////////////////////////////////////////////////////////////// */
-static int pushVObject(const char *prop)
- {
- VObject *newObj;
- if (ObjStackTop == MAXLEVEL)
- return FALSE;
-
- ObjStack[++ObjStackTop] = curObj;
-
- if (curObj) {
- newObj = addProp(curObj,prop);
- curObj = newObj;
- }
- else
- curObj = newVObject(prop);
-
- return TRUE;
- }
-
-
-/* ///////////////////////////////////////////////////////////////////////// */
-/* This pops the recently built vCard off the stack and returns it. */
-static VObject* popVObject()
- {
- VObject *oldObj;
- if (ObjStackTop < 0) {
- yyerror("pop on empty Object Stack\n");
- return 0;
- }
- oldObj = curObj;
- curObj = ObjStack[ObjStackTop--];
-
- return oldObj;
- }
-
-static void appendValue(const char *value)
-{
- char *p1, *p2;
- wchar_t *p3;
- int i;
-
- if (fieldedProp && *fieldedProp) {
- if (value) {
- addPropValue(curProp, *fieldedProp, value);
- }
- /* else this field is empty, advance to next field */
- fieldedProp++;
- } else {
- if (value) {
- if (vObjectUStringZValue(curProp)) {
- p1 = fakeCString(vObjectUStringZValue(curProp));
- p2 = malloc(sizeof(char *) * (strlen(p1)+strlen(value)+1));
- strcpy(p2, p1);
- deleteStr(p1);
-
- i = strlen(p2);
- p2[i] = ';';
- p2[i+1] = '\0';
- p2 = strcat(p2, value);
- p3 = (wchar_t *) vObjectUStringZValue(curProp);
- free(p3);
- setVObjectUStringZValue_(curProp,fakeUnicode(p2,0));
- deleteStr(p2);
- } else {
- setVObjectUStringZValue_(curProp,fakeUnicode(value,0));
- }
- }
- }
- deleteStr(value);
-}
-
-#if 0
-static void enterValues(const char *value)
- {
- if (fieldedProp && *fieldedProp) {
- if (value) {
- addPropValue(curProp,*fieldedProp,value);
- }
- /* else this field is empty, advance to next field */
- fieldedProp++;
- }
- else {
- if (value) {
- setVObjectUStringZValue_(curProp,fakeUnicode(value,0));
- }
- }
- deleteStr(value);
- }
-#endif
-
-static void enterProps(const char *s)
- {
- curProp = addGroup(curObj,s);
- deleteStr(s);
- }
-
-static void enterAttr(const char *s1, const char *s2)
- {
- const char *p1, *p2 = NULL;
- p1 = lookupProp_(s1);
- if (s2) {
- VObject *a;
- p2 = lookupProp_(s2);
- a = addProp(curProp,p1);
- setVObjectStringZValue(a,p2);
- }
- else
- addProp(curProp,p1);
- if (stricmp(p1,VCBase64Prop) == 0 || (s2 && stricmp(p2,VCBase64Prop)==0))
- lexPushMode(L_BASE64);
- else if (stricmp(p1,VCQuotedPrintableProp) == 0
- || (s2 && stricmp(p2,VCQuotedPrintableProp)==0))
- lexPushMode(L_QUOTED_PRINTABLE);
- deleteStr(s1); deleteStr(s2);
- }
-
-
-#define MAX_LEX_LOOKAHEAD_0 32
-#define MAX_LEX_LOOKAHEAD 64
-#define MAX_LEX_MODE_STACK_SIZE 10
-#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop])
-
-struct LexBuf {
- /* input */
-#ifdef INCLUDEMFC
- CFile *inputFile;
-#else
- FILE *inputFile;
-#endif
- char *inputString;
- unsigned long curPos;
- unsigned long inputLen;
- /* lookahead buffer */
- /* -- lookahead buffer is int instead of char so that EOF
- / can be represented correctly.
- */
- unsigned long len;
- int buf[MAX_LEX_LOOKAHEAD];
- unsigned long getPtr;
- /* context stack */
- unsigned long lexModeStackTop;
- enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE];
- /* token buffer */
- unsigned long maxToken;
- char *strs;
- unsigned long strsLen;
- } lexBuf;
-
-static void lexPushMode(enum LexMode mode)
- {
- if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1))
- yyerror("lexical context stack overflow");
- else {
- lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode;
- }
- }
-
-static void lexPopMode(int top)
- {
- /* special case of pop for ease of error recovery -- this
- version will never underflow */
- if (top)
- lexBuf.lexModeStackTop = 0;
- else
- if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
- }
-
-static int lexWithinMode(enum LexMode mode) {
- unsigned long i;
- for (i=0;i<lexBuf.lexModeStackTop;i++)
- if (mode == lexBuf.lexModeStack[i]) return 1;
- return 0;
- }
-
-static int lexGetc_()
- {
- /* get next char from input, no buffering. */
- if (lexBuf.curPos == lexBuf.inputLen)
- return EOF;
- else if (lexBuf.inputString)
- return *(lexBuf.inputString + lexBuf.curPos++);
- else {
-#ifdef INCLUDEMFC
- char result;
- return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF;
-#else
- return fgetc(lexBuf.inputFile);
-#endif
- }
- }
-
-static int lexGeta()
- {
- ++lexBuf.len;
- return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
- }
-
-static int lexGeta_(int i)
- {
- ++lexBuf.len;
- return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
- }
-
-static void lexSkipLookahead() {
- if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
- /* don't skip EOF. */
- lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
- lexBuf.len--;
- }
- }
-
-static int lexLookahead() {
- int c = (lexBuf.len)?
- lexBuf.buf[lexBuf.getPtr]:
- lexGeta();
- /* do the \r\n -> \n or \r -> \n translation here */
- if (c == '\r') {
- int a = (lexBuf.len>1)?
- lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]:
- lexGeta_(1);
- if (a == '\n') {
- lexSkipLookahead();
- }
- lexBuf.buf[lexBuf.getPtr] = c = '\n';
- }
- else if (c == '\n') {
- int a = (lexBuf.len>1)?
- lexBuf.buf[lexBuf.getPtr+1]:
- lexGeta_(1);
- if (a == '\r') {
- lexSkipLookahead();
- }
- lexBuf.buf[lexBuf.getPtr] = '\n';
- }
- return c;
- }
-
-static int lexGetc() {
- int c = lexLookahead();
- if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
- /* EOF will remain in lookahead buffer */
- lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
- lexBuf.len--;
- }
- return c;
- }
-
-static void lexSkipLookaheadWord() {
- if (lexBuf.strsLen <= lexBuf.len) {
- lexBuf.len -= lexBuf.strsLen;
- lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
- }
- }
-
-static void lexClearToken()
- {
- lexBuf.strsLen = 0;
- }
-
-static void lexAppendc(int c)
- {
- lexBuf.strs[lexBuf.strsLen] = c;
- /* append up to zero termination */
- if (c == 0) return;
- lexBuf.strsLen++;
- if (lexBuf.strsLen >= lexBuf.maxToken) {
- /* double the token string size */
- lexBuf.maxToken <<= 1;
- lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);
- }
- }
-
-static char* lexStr() {
- return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
- }
-
-static void lexSkipWhite() {
- int c = lexLookahead();
- while (c == ' ' || c == '\t') {
- lexSkipLookahead();
- c = lexLookahead();
- }
- }
-
-static char* lexGetWord() {
- int c;
- lexSkipWhite();
- lexClearToken();
- c = lexLookahead();
- while (c != EOF && !strchr("\t\n ;:=",c)) {
- lexAppendc(c);
- lexSkipLookahead();
- c = lexLookahead();
- }
- lexAppendc(0);
- return lexStr();
- }
-
-#if 0
-static void lexPushLookahead(char *s, int len) {
- int putptr;
- if (len == 0) len = strlen(s);
- putptr = (int)lexBuf.getPtr - len;
- /* this function assumes that length of word to push back
- / is not greater than MAX_LEX_LOOKAHEAD.
- */
- if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
- lexBuf.getPtr = putptr;
- while (*s) {
- lexBuf.buf[putptr] = *s++;
- putptr = (putptr + 1) % MAX_LEX_LOOKAHEAD;
- }
- lexBuf.len += len;
- }
-#endif
-
-static void lexPushLookaheadc(int c) {
- int putptr;
- /* can't putback EOF, because it never leaves lookahead buffer */
- if (c == EOF) return;
- putptr = (int)lexBuf.getPtr - 1;
- if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
- lexBuf.getPtr = putptr;
- lexBuf.buf[putptr] = c;
- lexBuf.len += 1;
- }
-
-static char* lexLookaheadWord() {
- /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0
- / and thing bigger than that will stop the lookahead and return 0;
- / leading white spaces are not recoverable.
- */
- int c;
- int len = 0;
- int curgetptr = 0;
- lexSkipWhite();
- lexClearToken();
- curgetptr = (int)lexBuf.getPtr; /* remember! */
- while (len < (MAX_LEX_LOOKAHEAD_0)) {
- c = lexGetc();
- len++;
- if (c == EOF || strchr("\t\n ;:=", c)) {
- lexAppendc(0);
- /* restore lookahead buf. */
- lexBuf.len += len;
- lexBuf.getPtr = curgetptr;
- return lexStr();
- }
- else
- lexAppendc(c);
- }
- lexBuf.len += len; /* char that has been moved to lookahead buffer */
- lexBuf.getPtr = curgetptr;
- return 0;
- }
-
-#ifdef _SUPPORT_LINE_FOLDING
-static void handleMoreRFC822LineBreak(int c) {
- /* suport RFC 822 line break in cases like
- * ADR: foo;
- * morefoo;
- * more foo;
- */
- if (c == ';') {
- int a;
- lexSkipLookahead();
- /* skip white spaces */
- a = lexLookahead();
- while (a == ' ' || a == '\t') {
- lexSkipLookahead();
- a = lexLookahead();
- }
- if (a == '\n') {
- lexSkipLookahead();
- a = lexLookahead();
- if (a == ' ' || a == '\t') {
- /* continuation, throw away all the \n and spaces read so
- * far
- */
- lexSkipWhite();
- lexPushLookaheadc(';');
- }
- else {
- lexPushLookaheadc('\n');
- lexPushLookaheadc(';');
- }
- }
- else {
- lexPushLookaheadc(';');
- }
- }
- }
-
-static char* lexGet1Value() {
- int c;
- lexSkipWhite();
- c = lexLookahead();
- lexClearToken();
- while (c != EOF && c != ';') {
- if (c == '\n') {
- int a;
- lexSkipLookahead();
- a = lexLookahead();
- if (a == ' ' || a == '\t') {
- lexAppendc(' ');
- lexSkipLookahead();
- }
- else {
- lexPushLookaheadc('\n');
- break;
- }
- }
- else {
- lexAppendc(c);
- lexSkipLookahead();
- }
- c = lexLookahead();
- }
- lexAppendc(0);
- handleMoreRFC822LineBreak(c);
- return c==EOF?0:lexStr();
- }
-#endif
-
-#ifndef _SUPPORT_LINE_FOLDING
-static char* lexGetStrUntil(char *termset) {
- int c = lexLookahead();
- lexClearToken();
- while (c != EOF && !strchr(termset,c)) {
- lexAppendc(c);
- lexSkipLookahead();
- c = lexLookahead();
- }
- lexAppendc(0);
- return c==EOF?0:lexStr();
- }
-#endif
-
-static int match_begin_name(int end) {
- char *n = lexLookaheadWord();
- int token = ID;
- if (n) {
- if (!stricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
- else if (!stricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
- else if (!stricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
- else if (!stricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
- deleteStr(n);
- return token;
- }
- return 0;
- }
-
-
-#ifdef INCLUDEMFC
-static void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile)
-#else
-static void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
-#endif
- {
- /* initialize lex mode stack */
- lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL;
-
- /* iniatialize lex buffer. */
- lexBuf.inputString = (char*) inputstring;
- lexBuf.inputLen = inputlen;
- lexBuf.curPos = 0;
- lexBuf.inputFile = inputfile;
-
- lexBuf.len = 0;
- lexBuf.getPtr = 0;
-
- lexBuf.maxToken = MAXTOKEN;
- lexBuf.strs = (char*)malloc(MAXTOKEN);
- lexBuf.strsLen = 0;
-
- }
-
-static void finiLex() {
- free(lexBuf.strs);
- }
-
-
-/* ///////////////////////////////////////////////////////////////////////// */
-/* This parses and converts the base64 format for binary encoding into
- * a decoded buffer (allocated with new). See RFC 1521.
- */
-static char * lexGetDataFromBase64()
- {
- unsigned long bytesLen = 0, bytesMax = 0;
- int quadIx = 0, pad = 0;
- unsigned long trip = 0;
- unsigned char b;
- int c;
- unsigned char *bytes = NULL;
- unsigned char *oldBytes = NULL;
-
- DBG_(("db: lexGetDataFromBase64\n"));
- while (1) {
- c = lexGetc();
- if (c == '\n') {
- ++mime_lineNum;
- if (lexLookahead() == '\n') {
- /* a '\n' character by itself means end of data */
- break;
- }
- else continue; /* ignore '\n' */
- }
- else {
- if ((c >= 'A') && (c <= 'Z'))
- b = (unsigned char)(c - 'A');
- else if ((c >= 'a') && (c <= 'z'))
- b = (unsigned char)(c - 'a') + 26;
- else if ((c >= '0') && (c <= '9'))
- b = (unsigned char)(c - '0') + 52;
- else if (c == '+')
- b = 62;
- else if (c == '/')
- b = 63;
- else if (c == '=') {
- b = 0;
- pad++;
- } else if ((c == ' ') || (c == '\t')) {
- continue;
- } else { /* error condition */
- if (bytes) free(bytes);
- else if (oldBytes) free(oldBytes);
- /* error recovery: skip until 2 adjacent newlines. */
- DBG_(("db: invalid character 0x%x '%c'\n", c,c));
- if (c != EOF) {
- c = lexGetc();
- while (c != EOF) {
- if (c == '\n' && lexLookahead() == '\n') {
- ++mime_lineNum;
- break;
- }
- c = lexGetc();
- }
- }
- return NULL;
- }
- trip = (trip << 6) | b;
- if (++quadIx == 4) {
- unsigned char outBytes[3];
- int numOut;
- int i;
- for (i = 0; i < 3; i++) {
- outBytes[2-i] = (unsigned char)(trip & 0xFF);
- trip >>= 8;
- }
- numOut = 3 - pad;
- if (bytesLen + numOut > bytesMax) {
- if (!bytes) {
- bytesMax = 1024;
- bytes = (unsigned char*)malloc((size_t)bytesMax);
- }
- else {
- bytesMax <<= 2;
- oldBytes = bytes;
- bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax);
- }
- if (bytes == 0) {
- mime_error("out of memory while processing BASE64 data\n");
- }
- }
- if (bytes) {
- memcpy(bytes + bytesLen, outBytes, numOut);
- bytesLen += numOut;
- }
- trip = 0;
- quadIx = 0;
- }
- }
- } /* while */
- DBG_(("db: bytesLen = %d\n", bytesLen));
- /* kludge: all this won't be necessary if we have tree form
- representation */
- if (bytes) {
- setValueWithSize(curProp,bytes,(unsigned int)bytesLen);
- free(bytes);
- }
- else if (oldBytes) {
- setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen);
- free(oldBytes);
- }
- return 0;
- }
-
-static int match_begin_end_name(int end) {
- int token;
- lexSkipWhite();
- if (lexLookahead() != ':') return ID;
- lexSkipLookahead();
- lexSkipWhite();
- token = match_begin_name(end);
- if (token == ID) {
- lexPushLookaheadc(':');
- DBG_(("db: ID '%s'\n", yylval.str));
- return ID;
- }
- else if (token != 0) {
- lexSkipLookaheadWord();
- deleteStr(yylval.str);
- DBG_(("db: begin/end %d\n", token));
- return token;
- }
- return 0;
- }
-
-static char* lexGetQuotedPrintable()
- {
- int cur;
-
- lexClearToken();
- do {
- cur = lexGetc();
- switch (cur) {
- case '=': {
- int c = 0;
- int next[2];
- int i;
- for (i = 0; i < 2; i++) {
- next[i] = lexGetc();
- if (next[i] >= '0' && next[i] <= '9')
- c = c * 16 + next[i] - '0';
- else if (next[i] >= 'A' && next[i] <= 'F')
- c = c * 16 + next[i] - 'A' + 10;
- else
- break;
- }
- if (i == 0) {
- /* single '=' follow by LINESEP is continuation sign? */
- if (next[0] == '\n') {
- ++mime_lineNum;
- }
- else {
- lexPushLookaheadc('=');
- goto EndString;
- }
- }
- else if (i == 1) {
- lexPushLookaheadc(next[1]);
- lexPushLookaheadc(next[0]);
- lexAppendc('=');
- } else {
- lexAppendc(c);
- }
- break;
- } /* '=' */
- case '\n':
- case ';':
- {
- lexPushLookaheadc(cur);
- goto EndString;
- }
- case EOF:
- break;
- default:
- lexAppendc(cur);
- break;
- } /* switch */
- } while (cur != EOF);
-
-EndString:
- lexAppendc(0);
- return lexStr();
- } /* LexQuotedPrintable */
-
-static int yylex() {
- int lexmode = LEXMODE();
- if (lexmode == L_VALUES) {
- int c = lexGetc();
- if (c == ';') {
- DBG_(("db: SEMICOLON\n"));
- lexPushLookaheadc(c);
-#ifdef _SUPPORT_LINE_FOLDING
- handleMoreRFC822LineBreak(c);
-#endif
- lexSkipLookahead();
- return SEMICOLON;
- }
- else if (strchr("\n",c)) {
- ++mime_lineNum;
- /* consume all line separator(s) adjacent to each other */
- c = lexLookahead();
- while (strchr("\n",c)) {
- lexSkipLookahead();
- c = lexLookahead();
- ++mime_lineNum;
- }
- DBG_(("db: LINESEP\n"));
- return LINESEP;
- }
- else {
- char *p = 0;
- lexPushLookaheadc(c);
- if (lexWithinMode(L_BASE64)) {
- /* get each char and convert to bin on the fly... */
- p = lexGetDataFromBase64();
- yylval.str = p;
- return STRING;
- }
- else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
- p = lexGetQuotedPrintable();
- }
- else {
-#ifdef _SUPPORT_LINE_FOLDING
- p = lexGet1Value();
-#else
- p = lexGetStrUntil(";\n");
-#endif
- }
- if (p) {
- DBG_(("db: STRING: '%s'\n", p));
- yylval.str = p;
- return STRING;
- }
- else return 0;
- }
- }
- else {
- /* normal mode */
- while (1) {
- int c = lexGetc();
- switch(c) {
- case ':': {
- /* consume all line separator(s) adjacent to each other */
- /* ignoring linesep immediately after colon. */
-/* c = lexLookahead();
- while (strchr("\n",c)) {
- lexSkipLookahead();
- c = lexLookahead();
- ++mime_lineNum;
- }*/
- DBG_(("db: COLON\n"));
- return COLON;
- }
- case ';':
- DBG_(("db: SEMICOLON\n"));
- return SEMICOLON;
- case '=':
- DBG_(("db: EQ\n"));
- return EQ;
- /* ignore whitespace in this mode */
- case '\t':
- case ' ': continue;
- case '\n': {
- ++mime_lineNum;
- continue;
- }
- case EOF: return 0;
- break;
- default: {
- lexPushLookaheadc(c);
- if (isalpha(c)) {
- char *t = lexGetWord();
- yylval.str = t;
- if (!stricmp(t, "begin")) {
- return match_begin_end_name(0);
- }
- else if (!stricmp(t,"end")) {
- return match_begin_end_name(1);
- }
- else {
- DBG_(("db: ID '%s'\n", t));
- return ID;
- }
- }
- else {
- /* unknow token */
- return 0;
- }
- break;
- }
- }
- }
- }
- return 0;
- }
-
-
-/***************************************************************************/
-/*** Public Functions ****/
-/***************************************************************************/
-
-static VObject* Parse_MIMEHelper()
- {
- ObjStackTop = -1;
- mime_numErrors = 0;
- mime_lineNum = 1;
- vObjList = 0;
- curObj = 0;
-
- if (yyparse() != 0) {
- finiLex();
- return 0;
- }
-
- finiLex();
- return vObjList;
- }
-
-/* ///////////////////////////////////////////////////////////////////////// */
-DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
- {
- initLex(input, len, 0);
- return Parse_MIMEHelper();
- }
-
-
-#if INCLUDEMFC
-
-DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file)
- {
- unsigned long startPos;
- VObject *result;
-
- initLex(0,-1,file);
- startPos = file->GetPosition();
- if (!(result = Parse_MIMEHelper()))
- file->Seek(startPos, CFile::begin);
- return result;
- }
-
-#else
-
-VObject* Parse_MIME_FromFile(FILE *file)
- {
- VObject *result;
- long startPos;
-
- initLex(0,(unsigned long)-1,file);
- startPos = ftell(file);
- if (!(result = Parse_MIMEHelper())) {
- fseek(file,startPos,SEEK_SET);
- }
- return result;
- }
-
-DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
- {
- FILE *fp = fopen(fname,"r");
- if (fp) {
- VObject* o = Parse_MIME_FromFile(fp);
- fclose(fp);
- return o;
- }
- else {
- char msg[256];
- snprintf(msg, sizeof(msg), "can't open file '%s' for reading\n", fname);
- mime_error_(msg);
- return 0;
- }
- }
-
-#endif
-
-/* ///////////////////////////////////////////////////////////////////////// */
-
-static MimeErrorHandler mimeErrorHandler;
-
-DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me)
- {
- mimeErrorHandler = me;
- }
-
-static void mime_error(char *s)
- {
- char msg[256];
- if (mimeErrorHandler) {
- sprintf(msg,"%s at line %d", s, mime_lineNum);
- mimeErrorHandler(msg);
- }
- }
-
-static void mime_error_(char *s)
- {
- if (mimeErrorHandler) {
- mimeErrorHandler(s);
- }
- }
-
-
diff --git a/libversit/vctest.c b/libversit/vctest.c
deleted file mode 100644
index 7975d1e200..0000000000
--- a/libversit/vctest.c
+++ /dev/null
@@ -1,95 +0,0 @@
-
-#include <stdio.h>
-#include <string.h>
-#include "vcc.h"
-
-FILE *cfp;
-
-void myMimeErrorHandler(char *s)
-{
- printf("%s\n", s);
-}
-
-void main(int argc, char **argv)
-{
- int testmem = 0;
-
- char * foo[2] = {"foo","alden.vcf"};
-
-argc = 2;
-argv = foo;
-
-#ifdef _CONSOLE
- cfp = stdout;
- registerMimeErrorHandler(myMimeErrorHandler);
-#else
- cfp = fopen("vctest.out", "w");
- if (!cfp) return;
-#endif
- ++argv;
- while (--argc) {
- FILE *fp;
- if (strcmp(*argv,"-testmem") == 0) {
- testmem = 1;
- argv++;
- continue;
- }
- fprintf(cfp,"processing %s\n",*argv);
- fp = fopen(*argv,"r");
- if (!fp) {
- fprintf(cfp,"error opening file\n");
- }
- else {
- VObject *v, *t;
- FILE *ofp;
- char buf[256];
- char *p;
- strcpy(buf,*argv);
- p = strchr(buf,'.');
- if (p) *p = 0;
- strcat(buf,".out");
- fprintf(cfp,"reading text input from '%s'...\n", *argv);
- /*v = Parse_MIME_FromFile(fp); */
- v = Parse_MIME_FromFileName(*argv);
- writeVObjectToFile(buf,v);
- cleanVObject(v);
-
- /*
- fprintf(cfp,"pretty print internal format of '%s'...\n", *argv);
- ofp = fopen(buf,"w");
- while (v) {
- printVObject(cfp,v);
- if (testmem) {
- char *s, *p;
- fprintf(cfp,"test writing to mem...\n");
- p = s = writeMemVObject(0,0,v);
- if (s) {
- while (*s) {
- fputc(*s,ofp);
- s++;
- }
- free(p);
- }
- }
- else {
- writeVObject(ofp,v);
- }
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
-
- fclose(ofp);
- fclose(fp);
- */
- }
-
- cleanStrTbl();
- argv++;
-
- }
-
- if (cfp != stdout) fclose(cfp);
-
-}
-
diff --git a/libversit/vobject.c b/libversit/vobject.c
deleted file mode 100644
index d685b04278..0000000000
--- a/libversit/vobject.c
+++ /dev/null
@@ -1,1452 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
- * src: vobject.c
- * doc: vobject and APIs to construct vobject, APIs pretty print
- * vobject, and convert a vobject into its textual representation.
- */
-
-#ifndef MWERKS
-#include <malloc.h>
-#endif
-
-#include "vobject.h"
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-
-
-#define NAME_OF(o) o->id
-#define VALUE_TYPE(o) o->valType
-#define STRINGZ_VALUE_OF(o) o->val.strs
-#define USTRINGZ_VALUE_OF(o) o->val.ustrs
-#define INTEGER_VALUE_OF(o) o->val.i
-#define LONG_VALUE_OF(o) o->val.l
-#define ANY_VALUE_OF(o) o->val.any
-#define VOBJECT_VALUE_OF(o) o->val.vobj
-
-typedef union ValueItem {
- const char *strs;
- const wchar_t *ustrs;
- unsigned int i;
- unsigned long l;
- void *any;
- VObject *vobj;
- } ValueItem;
-
-struct VObject {
- VObject *next;
- const char *id;
- VObject *prop;
- unsigned short valType;
- ValueItem val;
- };
-
-typedef struct StrItem StrItem;
-
-struct StrItem {
- StrItem *next;
- const char *s;
- unsigned int refCnt;
- };
-
-const char** fieldedProp;
-
-
-
-/*----------------------------------------------------------------------
- The following functions involve with memory allocation:
- newVObject
- deleteVObject
- dupStr
- deleteStr
- newStrItem
- deleteStrItem
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(VObject*) newVObject_(const char *id)
-{
- VObject *p = (VObject*)malloc(sizeof(VObject));
- p->next = 0;
- p->id = id;
- p->prop = 0;
- VALUE_TYPE(p) = 0;
- ANY_VALUE_OF(p) = 0;
- return p;
-}
-
-DLLEXPORT(VObject*) newVObject(const char *id)
-{
- return newVObject_(lookupStr(id));
-}
-
-DLLEXPORT(void) deleteVObject(VObject *p)
-{
- unUseStr(p->id);
- free(p);
-}
-
-DLLEXPORT(char*) dupStr(const char *s, unsigned int size)
-{
- char *t;
- if (size == 0) {
- size = strlen(s);
- }
- t = (char*)malloc(size+1);
- if (t) {
- memcpy(t,s,size);
- t[size] = 0;
- return t;
- }
- else {
- return (char*)0;
- }
-}
-
-DLLEXPORT(void) deleteStr(const char *p)
-{
- if (p) free((void*)p);
-}
-
-
-static StrItem* newStrItem(const char *s, StrItem *next)
-{
- StrItem *p = (StrItem*)malloc(sizeof(StrItem));
- p->next = next;
- p->s = s;
- p->refCnt = 1;
- return p;
-}
-
-static void deleteStrItem(StrItem *p)
-{
- free((void*)p);
-}
-
-
-/*----------------------------------------------------------------------
- The following function provide accesses to VObject's value.
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(const char*) vObjectName(VObject *o)
-{
- return NAME_OF(o);
-}
-
-DLLEXPORT(void) setVObjectName(VObject *o, const char* id)
-{
- NAME_OF(o) = id;
-}
-
-DLLEXPORT(const char*) vObjectStringZValue(VObject *o)
-{
- return STRINGZ_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s)
-{
- STRINGZ_VALUE_OF(o) = dupStr(s,0);
- VALUE_TYPE(o) = VCVT_STRINGZ;
-}
-
-DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
-{
- STRINGZ_VALUE_OF(o) = s;
- VALUE_TYPE(o) = VCVT_STRINGZ;
-}
-
-DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o)
-{
- return USTRINGZ_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s)
-{
- USTRINGZ_VALUE_OF(o) = (wchar_t*) dupStr((char*)s,(uStrLen(s)+1)*2);
- VALUE_TYPE(o) = VCVT_USTRINGZ;
-}
-
-DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s)
-{
- USTRINGZ_VALUE_OF(o) = s;
- VALUE_TYPE(o) = VCVT_USTRINGZ;
-}
-
-DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o)
-{
- return INTEGER_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
-{
- INTEGER_VALUE_OF(o) = i;
- VALUE_TYPE(o) = VCVT_UINT;
-}
-
-DLLEXPORT(unsigned long) vObjectLongValue(VObject *o)
-{
- return LONG_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
-{
- LONG_VALUE_OF(o) = l;
- VALUE_TYPE(o) = VCVT_ULONG;
-}
-
-DLLEXPORT(void*) vObjectAnyValue(VObject *o)
-{
- return ANY_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
-{
- ANY_VALUE_OF(o) = t;
- VALUE_TYPE(o) = VCVT_RAW;
-}
-
-DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o)
-{
- return VOBJECT_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
-{
- VOBJECT_VALUE_OF(o) = p;
- VALUE_TYPE(o) = VCVT_VOBJECT;
-}
-
-DLLEXPORT(int) vObjectValueType(VObject *o)
-{
- return VALUE_TYPE(o);
-}
-
-
-/*----------------------------------------------------------------------
- The following functions can be used to build VObject.
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p)
-{
- /* circular link list pointed to tail */
- /*
- o {next,id,prop,val}
- V
- pn {next,id,prop,val}
- V
- ...
- p1 {next,id,prop,val}
- V
- pn
- -->
- o {next,id,prop,val}
- V
- pn {next,id,prop,val}
- V
- p {next,id,prop,val}
- ...
- p1 {next,id,prop,val}
- V
- pn
- */
-
- VObject *tail = o->prop;
- if (tail) {
- p->next = tail->next;
- o->prop = tail->next = p;
- }
- else {
- o->prop = p->next = p;
- }
- return p;
-}
-
-DLLEXPORT(VObject*) addProp(VObject *o, const char *id)
-{
- return addVObjectProp(o,newVObject(id));
-}
-
-DLLEXPORT(VObject*) addProp_(VObject *o, const char *id)
-{
- return addVObjectProp(o,newVObject_(id));
-}
-
-DLLEXPORT(void) addList(VObject **o, VObject *p)
-{
- p->next = 0;
- if (*o == 0) {
- *o = p;
- }
- else {
- VObject *t = *o;
- while (t->next) {
- t = t->next;
- }
- t->next = p;
- }
-}
-
-DLLEXPORT(VObject*) nextVObjectInList(VObject *o)
-{
- return o->next;
-}
-
-DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size)
-{
- VObject *sizeProp;
- setVObjectAnyValue(prop, val);
- sizeProp = addProp(prop,VCDataSizeProp);
- setVObjectLongValue(sizeProp, size);
- return prop;
-}
-
-DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size)
-{
- void *p = dupStr((const char *)val,size);
- return setValueWithSize_(prop,p,p?size:0);
-}
-
-DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
-{
- i->start = o->prop;
- i->next = 0;
-}
-
-DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
-{
- i->start = o->next;
- i->next = 0;
-}
-
-DLLEXPORT(int) moreIteration(VObjectIterator *i)
-{
- return (i->start && (i->next==0 || i->next!=i->start));
-}
-
-DLLEXPORT(VObject*) nextVObject(VObjectIterator *i)
-{
- if (i->start && i->next != i->start) {
- if (i->next == 0) {
- i->next = i->start->next;
- return i->next;
- }
- else {
- i->next = i->next->next;
- return i->next;
- }
- }
- else return (VObject*)0;
-}
-
-DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id)
-{
- VObjectIterator i;
- initPropIterator(&i,o);
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- if (!stricmp(id,each->id))
- return each;
- }
- return (VObject*)0;
-}
-
-DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
-{
- /*
- a.b.c
- -->
- prop(c)
- prop(VCGrouping=b)
- prop(VCGrouping=a)
- */
- char *dot = strrchr(g,'.');
- if (dot) {
- VObject *p, *t;
- char *gs, *n = dot+1;
- gs = dupStr(g,0); /* so we can write to it. */
- /* used to be
- * t = p = addProp_(o,lookupProp_(n));
- */
- t = p = addProp_(o,lookupProp(n));
- dot = strrchr(gs,'.');
- *dot = 0;
- do {
- dot = strrchr(gs,'.');
- if (dot) {
- n = dot+1;
- *dot=0;
- }
- else
- n = gs;
- /* property(VCGroupingProp=n);
- * and the value may have VCGrouping property
- */
- t = addProp(t,VCGroupingProp);
- setVObjectStringZValue(t,lookupProp_(n));
- } while (n != gs);
- deleteStr(gs);
- return p;
- }
- else
- return addProp_(o,lookupProp(g));
-}
-
-DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v)
-{
- VObject *prop;
- prop = addProp(o,p);
- setVObjectUStringZValue_(prop, fakeUnicode(v,0));
- return prop;
-}
-
-DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v,
- unsigned int size)
-{
- VObject *prop;
- prop = addProp(o,p);
- setValueWithSize_(prop, (void*)v, size);
- return prop;
-}
-
-DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v,
- unsigned int size)
-{
- return addPropSizedValue_(o,p,dupStr(v,size),size);
-}
-
-
-
-/*----------------------------------------------------------------------
- The following pretty print a VObject
- ----------------------------------------------------------------------*/
-
-static void printVObject_(FILE *fp, VObject *o, int level);
-
-static void indent(FILE *fp, int level)
-{
- int i;
- for (i=0;i<level*4;i++) {
- fputc(' ', fp);
- }
-}
-
-static void printValue(FILE *fp, VObject *o, int level)
-{
- switch (VALUE_TYPE(o)) {
- case VCVT_USTRINGZ: {
- char c;
- char *t,*s;
- s = t = fakeCString(USTRINGZ_VALUE_OF(o));
- fputc('"',fp);
- while (c=*t,c) {
- fputc(c,fp);
- if (c == '\n') indent(fp,level+2);
- t++;
- }
- fputc('"',fp);
- deleteStr(s);
- break;
- }
- case VCVT_STRINGZ: {
- char c;
- const char *s = STRINGZ_VALUE_OF(o);
- fputc('"',fp);
- while (c=*s,c) {
- fputc(c,fp);
- if (c == '\n') indent(fp,level+2);
- s++;
- }
- fputc('"',fp);
- break;
- }
- case VCVT_UINT:
- fprintf(fp,"%d", INTEGER_VALUE_OF(o)); break;
- case VCVT_ULONG:
- fprintf(fp,"%ld", LONG_VALUE_OF(o)); break;
- case VCVT_RAW:
- fprintf(fp,"[raw data]"); break;
- case VCVT_VOBJECT:
- fprintf(fp,"[vobject]\n");
- printVObject_(fp,VOBJECT_VALUE_OF(o),level+1);
- break;
- case 0:
- fprintf(fp,"[none]"); break;
- default:
- fprintf(fp,"[unknown]"); break;
- }
-}
-
-static void printNameValue(FILE *fp,VObject *o, int level)
-{
- indent(fp,level);
- if (NAME_OF(o)) {
- fprintf(fp,"%s", NAME_OF(o));
- }
- if (VALUE_TYPE(o)) {
- fputc('=',fp);
- printValue(fp,o, level);
- }
- fprintf(fp,"\n");
-}
-
-static void printVObject_(FILE *fp, VObject *o, int level)
- {
- VObjectIterator t;
- if (o == 0) {
- fprintf(fp,"[NULL]\n");
- return;
- }
- printNameValue(fp,o,level);
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- printVObject_(fp,eachProp,level+1);
- }
- }
-
-void printVObject(FILE *fp,VObject *o)
-{
- printVObject_(fp,o,0);
-}
-
-DLLEXPORT(void) printVObjectToFile(char *fname,VObject *o)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- printVObject(fp,o);
- fclose(fp);
- }
-}
-
-DLLEXPORT(void) printVObjectsToFile(char *fname,VObject *list)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- while (list) {
- printVObject(fp,list);
- list = nextVObjectInList(list);
- }
- fclose(fp);
- }
-}
-
-DLLEXPORT(void) cleanVObject(VObject *o)
-{
- if (o == 0) return;
- if (o->prop) {
- /* destroy time: cannot use the iterator here.
- Have to break the cycle in the circular link
- list and turns it into regular NULL-terminated
- list -- since at some point of destruction,
- the reference entry for the iterator to work
- will not longer be valid.
- */
- VObject *p;
- p = o->prop->next;
- o->prop->next = 0;
- do {
- VObject *t = p->next;
- cleanVObject(p);
- p = t;
- } while (p);
- }
- switch (VALUE_TYPE(o)) {
- case VCVT_USTRINGZ:
- case VCVT_STRINGZ:
- case VCVT_RAW:
- /* assume they are all allocated by malloc. */
- free((char*)STRINGZ_VALUE_OF(o));
- break;
- case VCVT_VOBJECT:
- cleanVObject(VOBJECT_VALUE_OF(o));
- break;
- }
- deleteVObject(o);
-}
-
-DLLEXPORT(void) cleanVObjects(VObject *list)
-{
- while (list) {
- VObject *t = list;
- list = nextVObjectInList(list);
- cleanVObject(t);
- }
-}
-
-/*----------------------------------------------------------------------
- The following is a String Table Facilities.
- ----------------------------------------------------------------------*/
-
-#define STRTBLSIZE 255
-
-static StrItem *strTbl[STRTBLSIZE];
-
-static unsigned int hashStr(const char *s)
-{
- unsigned int h = 0;
- int i;
- for (i=0;s[i];i++) {
- h += s[i]*i;
- }
- return h % STRTBLSIZE;
-}
-
-DLLEXPORT(const char*) lookupStr(const char *s)
-{
- StrItem *t;
- unsigned int h = hashStr(s);
- if ((t = strTbl[h]) != 0) {
- do {
- if (stricmp(t->s,s) == 0) {
- t->refCnt++;
- return t->s;
- }
- t = t->next;
- } while (t);
- }
- s = dupStr(s,0);
- strTbl[h] = newStrItem(s,strTbl[h]);
- return s;
-}
-
-DLLEXPORT(void) unUseStr(const char *s)
-{
- StrItem *t, *p;
- unsigned int h = hashStr(s);
- if ((t = strTbl[h]) != 0) {
- p = t;
- do {
- if (stricmp(t->s,s) == 0) {
- t->refCnt--;
- if (t->refCnt == 0) {
- if (p == strTbl[h]) {
- strTbl[h] = t->next;
- }
- else {
- p->next = t->next;
- }
- deleteStr(t->s);
- deleteStrItem(t);
- return;
- }
- }
- p = t;
- t = t->next;
- } while (t);
- }
-}
-
-DLLEXPORT(void) cleanStrTbl()
-{
- int i;
- for (i=0; i<STRTBLSIZE;i++) {
- StrItem *t = strTbl[i];
- while (t) {
- StrItem *p;
- deleteStr(t->s);
- p = t;
- t = t->next;
- deleteStrItem(p);
- } while (t);
- strTbl[i] = 0;
- }
-}
-
-
-struct PreDefProp {
- const char *name;
- const char *alias;
- const char** fields;
- unsigned int flags;
- };
-
-/* flags in PreDefProp */
-#define PD_BEGIN 0x1
-#define PD_INTERNAL 0x2
-
-static const char *adrFields[] = {
- VCPostalBoxProp,
- VCExtAddressProp,
- VCStreetAddressProp,
- VCCityProp,
- VCRegionProp,
- VCPostalCodeProp,
- VCCountryNameProp,
- 0
-};
-
-static const char *nameFields[] = {
- VCFamilyNameProp,
- VCGivenNameProp,
- VCAdditionalNamesProp,
- VCNamePrefixesProp,
- VCNameSuffixesProp,
- NULL
- };
-
-static const char *orgFields[] = {
- VCOrgNameProp,
- VCOrgUnitProp,
- VCOrgUnit2Prop,
- VCOrgUnit3Prop,
- VCOrgUnit4Prop,
- NULL
- };
-
-static const char *AAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCAudioContentProp,
- 0
- };
-
-/* ExDate -- has unamed fields */
-/* RDate -- has unamed fields */
-
-static const char *DAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCDisplayStringProp,
- 0
- };
-
-static const char *MAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCEmailAddressProp,
- VCNoteProp,
- 0
- };
-
-static const char *PAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCProcedureNameProp,
- 0
- };
-
-static struct PreDefProp propNames[] = {
- { VC7bitProp, 0, 0, 0 },
- { VC8bitProp, 0, 0, 0 },
- { VCAAlarmProp, 0, AAlarmFields, 0 },
- { VCAdditionalNamesProp, 0, 0, 0 },
- { VCAdrProp, 0, adrFields, 0 },
- { VCAgentProp, 0, 0, 0 },
- { VCAIFFProp, 0, 0, 0 },
- { VCAOLProp, 0, 0, 0 },
- { VCAppleLinkProp, 0, 0, 0 },
- { VCAttachProp, 0, 0, 0 },
- { VCAttendeeProp, 0, 0, 0 },
- { VCATTMailProp, 0, 0, 0 },
- { VCAudioContentProp, 0, 0, 0 },
- { VCAVIProp, 0, 0, 0 },
- { VCBase64Prop, 0, 0, 0 },
- { VCBBSProp, 0, 0, 0 },
- { VCBirthDateProp, 0, 0, 0 },
- { VCBMPProp, 0, 0, 0 },
- { VCBodyProp, 0, 0, 0 },
- { VCBusinessRoleProp, 0, 0, 0 },
- { VCCalProp, 0, 0, PD_BEGIN },
- { VCCaptionProp, 0, 0, 0 },
- { VCCardProp, 0, 0, PD_BEGIN },
- { VCCarProp, 0, 0, 0 },
- { VCCategoriesProp, 0, 0, 0 },
- { VCCellularProp, 0, 0, 0 },
- { VCCGMProp, 0, 0, 0 },
- { VCCharSetProp, 0, 0, 0 },
- { VCCIDProp, VCContentIDProp, 0, 0 },
- { VCCISProp, 0, 0, 0 },
- { VCCityProp, 0, 0, 0 },
- { VCClassProp, 0, 0, 0 },
- { VCCommentProp, 0, 0, 0 },
- { VCCompletedProp, 0, 0, 0 },
- { VCContentIDProp, 0, 0, 0 },
- { VCCountryNameProp, 0, 0, 0 },
- { VCDAlarmProp, 0, DAlarmFields, 0 },
- { VCDataSizeProp, 0, 0, PD_INTERNAL },
- { VCDayLightProp, 0, 0, 0 },
- { VCDCreatedProp, 0, 0, 0 },
- { VCDeliveryLabelProp, 0, 0, 0 },
- { VCDescriptionProp, 0, 0, 0 },
- { VCDIBProp, 0, 0, 0 },
- { VCDisplayStringProp, 0, 0, 0 },
- { VCDomesticProp, 0, 0, 0 },
- { VCDTendProp, 0, 0, 0 },
- { VCDTstartProp, 0, 0, 0 },
- { VCDueProp, 0, 0, 0 },
- { VCEmailAddressProp, 0, 0, 0 },
- { VCEncodingProp, 0, 0, 0 },
- { VCEndProp, 0, 0, 0 },
- { VCEventProp, 0, 0, PD_BEGIN },
- { VCEWorldProp, 0, 0, 0 },
- { VCExNumProp, 0, 0, 0 },
- { VCExpDateProp, 0, 0, 0 },
- { VCExpectProp, 0, 0, 0 },
- { VCExtAddressProp, 0, 0, 0 },
- { VCFamilyNameProp, 0, 0, 0 },
- { VCFaxProp, 0, 0, 0 },
- { VCFullNameProp, 0, 0, 0 },
- { VCGeoLocationProp, 0, 0, 0 },
- { VCGeoProp, 0, 0, 0 },
- { VCGIFProp, 0, 0, 0 },
- { VCGivenNameProp, 0, 0, 0 },
- { VCGroupingProp, 0, 0, 0 },
- { VCHomeProp, 0, 0, 0 },
- { VCIBMMailProp, 0, 0, 0 },
- { VCInlineProp, 0, 0, 0 },
- { VCInternationalProp, 0, 0, 0 },
- { VCInternetProp, 0, 0, 0 },
- { VCISDNProp, 0, 0, 0 },
- { VCJPEGProp, 0, 0, 0 },
- { VCLanguageProp, 0, 0, 0 },
- { VCLastModifiedProp, 0, 0, 0 },
- { VCLastRevisedProp, 0, 0, 0 },
- { VCLocationProp, 0, 0, 0 },
- { VCLogoProp, 0, 0, 0 },
- { VCMailerProp, 0, 0, 0 },
- { VCMAlarmProp, 0, MAlarmFields, 0 },
- { VCMCIMailProp, 0, 0, 0 },
- { VCMessageProp, 0, 0, 0 },
- { VCMETProp, 0, 0, 0 },
- { VCModemProp, 0, 0, 0 },
- { VCMPEG2Prop, 0, 0, 0 },
- { VCMPEGProp, 0, 0, 0 },
- { VCMSNProp, 0, 0, 0 },
- { VCNamePrefixesProp, 0, 0, 0 },
- { VCNameProp, 0, nameFields, 0 },
- { VCNameSuffixesProp, 0, 0, 0 },
- { VCNoteProp, 0, 0, 0 },
- { VCOrgNameProp, 0, 0, 0 },
- { VCOrgProp, 0, orgFields, 0 },
- { VCOrgUnit2Prop, 0, 0, 0 },
- { VCOrgUnit3Prop, 0, 0, 0 },
- { VCOrgUnit4Prop, 0, 0, 0 },
- { VCOrgUnitProp, 0, 0, 0 },
- { VCPagerProp, 0, 0, 0 },
- { VCPAlarmProp, 0, PAlarmFields, 0 },
- { VCParcelProp, 0, 0, 0 },
- { VCPartProp, 0, 0, 0 },
- { VCPCMProp, 0, 0, 0 },
- { VCPDFProp, 0, 0, 0 },
- { VCPGPProp, 0, 0, 0 },
- { VCPhotoProp, 0, 0, 0 },
- { VCPICTProp, 0, 0, 0 },
- { VCPMBProp, 0, 0, 0 },
- { VCPostalBoxProp, 0, 0, 0 },
- { VCPostalCodeProp, 0, 0, 0 },
- { VCPostalProp, 0, 0, 0 },
- { VCPowerShareProp, 0, 0, 0 },
- { VCPreferredProp, 0, 0, 0 },
- { VCPriorityProp, 0, 0, 0 },
- { VCProcedureNameProp, 0, 0, 0 },
- { VCProdIdProp, 0, 0, 0 },
- { VCProdigyProp, 0, 0, 0 },
- { VCPronunciationProp, 0, 0, 0 },
- { VCPSProp, 0, 0, 0 },
- { VCPublicKeyProp, 0, 0, 0 },
- { VCQPProp, VCQuotedPrintableProp, 0, 0 },
- { VCQuickTimeProp, 0, 0, 0 },
- { VCQuotedPrintableProp, 0, 0, 0 },
- { VCRDateProp, 0, 0, 0 },
- { VCRegionProp, 0, 0, 0 },
- { VCRelatedToProp, 0, 0, 0 },
- { VCRepeatCountProp, 0, 0, 0 },
- { VCResourcesProp, 0, 0, 0 },
- { VCRNumProp, 0, 0, 0 },
- { VCRoleProp, 0, 0, 0 },
- { VCRRuleProp, 0, 0, 0 },
- { VCRSVPProp, 0, 0, 0 },
- { VCRunTimeProp, 0, 0, 0 },
- { VCSequenceProp, 0, 0, 0 },
- { VCSnoozeTimeProp, 0, 0, 0 },
- { VCStartProp, 0, 0, 0 },
- { VCStatusProp, 0, 0, 0 },
- { VCStreetAddressProp, 0, 0, 0 },
- { VCSubTypeProp, 0, 0, 0 },
- { VCSummaryProp, 0, 0, 0 },
- { VCTelephoneProp, 0, 0, 0 },
- { VCTIFFProp, 0, 0, 0 },
- { VCTimeZoneProp, 0, 0, 0 },
- { VCTitleProp, 0, 0, 0 },
- { VCTLXProp, 0, 0, 0 },
- { VCTodoProp, 0, 0, PD_BEGIN },
- { VCTranspProp, 0, 0, 0 },
- { VCUniqueStringProp, 0, 0, 0 },
- { VCURLProp, 0, 0, 0 },
- { VCURLValueProp, 0, 0, 0 },
- { VCValueProp, 0, 0, 0 },
- { VCVersionProp, 0, 0, 0 },
- { VCVideoProp, 0, 0, 0 },
- { VCVoiceProp, 0, 0, 0 },
- { VCWAVEProp, 0, 0, 0 },
- { VCWMFProp, 0, 0, 0 },
- { VCWorkProp, 0, 0, 0 },
- { VCX400Prop, 0, 0, 0 },
- { VCX509Prop, 0, 0, 0 },
- { VCXRuleProp, 0, 0, 0 },
- { 0,0,0,0 }
- };
-
-
-static struct PreDefProp* lookupPropInfo(const char* str)
-{
- /* brute force for now, could use a hash table here. */
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (stricmp(str, propNames[i].name) == 0) {
- return &propNames[i];
- }
-
- return 0;
-}
-
-
-DLLEXPORT(const char*) lookupProp_(const char* str)
-{
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (stricmp(str, propNames[i].name) == 0) {
- const char* s;
- s = propNames[i].alias?propNames[i].alias:propNames[i].name;
- return lookupStr(s);
- }
- return lookupStr(str);
-}
-
-
-DLLEXPORT(const char*) lookupProp(const char* str)
-{
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (stricmp(str, propNames[i].name) == 0) {
- const char *s;
- fieldedProp = propNames[i].fields;
- s = propNames[i].alias?propNames[i].alias:propNames[i].name;
- return lookupStr(s);
- }
- fieldedProp = 0;
- return lookupStr(str);
-}
-
-
-/*----------------------------------------------------------------------
- APIs to Output text form.
- ----------------------------------------------------------------------*/
-#define OFILE_REALLOC_SIZE 256
-typedef struct OFile {
- FILE *fp;
- char *s;
- int len;
- int limit;
- int alloc:1;
- int fail:1;
- } OFile;
-
-#if 0
-static void appendsOFile(OFile *fp, const char *s)
-{
- int slen;
- if (fp->fail) return;
- slen = strlen(s);
- if (fp->fp) {
- fwrite(s,1,slen,fp->fp);
- }
- else {
-stuff:
- if (fp->len + slen < fp->limit) {
- memcpy(fp->s+fp->len,s,slen);
- fp->len += slen;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen;
- fp->s = (char *) realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-
-static void appendcOFile(OFile *fp, char c)
-{
- if (fp->fail) return;
- if (fp->fp) {
- fputc(c,fp->fp);
- }
- else {
-stuff:
- if (fp->len+1 < fp->limit) {
- fp->s[fp->len] = c;
- fp->len++;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- fp->s = (char *) realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-#else
-static void appendcOFile_(OFile *fp, char c)
-{
- if (fp->fail) return;
- if (fp->fp) {
- fputc(c,fp->fp);
- }
- else {
-stuff:
- if (fp->len+1 < fp->limit) {
- fp->s[fp->len] = c;
- fp->len++;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- fp->s = realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-
-static void appendcOFile(OFile *fp, char c)
-{
- if (c == '\n') {
- /* write out as <CR><LF> */
- appendcOFile_(fp,0xd);
- appendcOFile_(fp,0xa);
- }
- else
- appendcOFile_(fp,c);
-}
-
-static void appendsOFile(OFile *fp, const char *s)
-{
- int i, slen;
- slen = strlen(s);
- for (i=0; i<slen; i++) {
- appendcOFile(fp,s[i]);
- }
-}
-
-#endif
-
-static void initOFile(OFile *fp, FILE *ofp)
-{
- fp->fp = ofp;
- fp->s = 0;
- fp->len = 0;
- fp->limit = 0;
- fp->alloc = 0;
- fp->fail = 0;
-}
-
-static void initMemOFile(OFile *fp, char *s, int len)
-{
- fp->fp = 0;
- fp->s = s;
- fp->len = 0;
- fp->limit = s?len:0;
- fp->alloc = s?0:1;
- fp->fail = 0;
-}
-
-
-static int writeBase64(OFile *fp, unsigned char *s, long len)
-{
- long cur = 0;
- int i, numQuads = 0;
- unsigned long trip;
- unsigned char b;
- char quad[5];
-#define MAXQUADS 16
-
- quad[4] = 0;
-
- while (cur < len) {
- /* collect the triplet of bytes into 'trip' */
- trip = 0;
- for (i = 0; i < 3; i++) {
- b = (cur < len) ? *(s + cur) : 0;
- cur++;
- trip = trip << 8 | b;
- }
- /* fill in 'quad' with the appropriate four characters */
- for (i = 3; i >= 0; i--) {
- b = (unsigned char)(trip & 0x3F);
- trip = trip >> 6;
- if ((3 - i) < (cur - len))
- quad[i] = '='; /* pad char */
- else if (b < 26) quad[i] = (char)b + 'A';
- else if (b < 52) quad[i] = (char)(b - 26) + 'a';
- else if (b < 62) quad[i] = (char)(b - 52) + '0';
- else if (b == 62) quad[i] = '+';
- else quad[i] = '/';
- }
- /* now output 'quad' with appropriate whitespace and line ending */
- appendsOFile(fp, (numQuads == 0 ? " " : ""));
- appendsOFile(fp, quad);
- appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : "")));
- numQuads = (numQuads + 1) % MAXQUADS;
- }
- appendcOFile(fp,'\n');
-
- return 1;
-}
-
-static void writeString(OFile *fp, const char *s)
-{
- appendsOFile(fp,s);
-}
-
-static void writeQPString(OFile *fp, const char *s)
-{
- char buf[4];
- int count=0;
- const char *p = s;
-
- while (*p) {
- /* break up lines biggger than 75 chars */
- if(count >=74){
- count=0;
- appendsOFile(fp,"=\n");
- }
-
- /* escape any non ASCII characters and '=' as per rfc1521 */
- if (*p<= 0x1f || *p >=0x7f || *p == '=' ) {
- sprintf(buf,"=%02X",(unsigned char)*p);
- appendsOFile(fp,buf);
- count+=3;
- } else {
- appendcOFile(fp,*p);
- count++;
- }
- p++;
- }
-}
-
-
-
-static void writeVObject_(OFile *fp, VObject *o);
-
-static void writeValue(OFile *fp, VObject *o, unsigned long size,int quote)
-{
- if (o == 0) return;
- switch (VALUE_TYPE(o)) {
- case VCVT_USTRINGZ: {
- char *s = fakeCString(USTRINGZ_VALUE_OF(o));
- if(quote) writeQPString(fp, s);
- else writeString(fp,s);
- deleteStr(s);
- break;
- }
- case VCVT_STRINGZ: {
- if(quote) writeQPString(fp, STRINGZ_VALUE_OF(o));
- else writeString(fp,STRINGZ_VALUE_OF(o));
- break;
- }
- case VCVT_UINT: {
- char buf[16];
- sprintf(buf,"%u", INTEGER_VALUE_OF(o));
- appendsOFile(fp,buf);
- break;
- }
- case VCVT_ULONG: {
- char buf[16];
- sprintf(buf,"%lu", LONG_VALUE_OF(o));
- appendsOFile(fp,buf);
- break;
- }
- case VCVT_RAW: {
- appendcOFile(fp,'\n');
- writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
- break;
- }
- case VCVT_VOBJECT:
- appendcOFile(fp,'\n');
- writeVObject_(fp,VOBJECT_VALUE_OF(o));
- break;
- }
-}
-
-static void writeAttrValue(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- pi = lookupPropInfo(NAME_OF(o));
- if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
- appendcOFile(fp,';');
- appendsOFile(fp,NAME_OF(o));
- }
- else
- appendcOFile(fp,';');
- if (VALUE_TYPE(o)) {
- appendcOFile(fp,'=');
- writeValue(fp,o,0,0);
- }
-}
-
-static void writeGroup(OFile *fp, VObject *o)
-{
- char buf1[256];
- char buf2[256];
- strcpy(buf1,NAME_OF(o));
- while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
- strcpy(buf2,STRINGZ_VALUE_OF(o));
- strcat(buf2,".");
- strcat(buf2,buf1);
- strcpy(buf1,buf2);
- }
- appendsOFile(fp,buf1);
-}
-
-static int inList(const char **list, const char *s)
-{
- if (list == 0) return 0;
- while (*list) {
- if (stricmp(*list,s) == 0) return 1;
- list++;
- }
- return 0;
-}
-
-static void writeProp(OFile *fp, VObject *o)
-{
- int isQuoted=0;
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- VObjectIterator t;
- const char **fields_ = 0;
- pi = lookupPropInfo(NAME_OF(o));
- if (pi && ((pi->flags & PD_BEGIN) != 0)) {
- writeVObject_(fp,o);
- return;
- }
- if (isAPropertyOf(o,VCGroupingProp))
- writeGroup(fp,o);
- else
- appendsOFile(fp,NAME_OF(o));
- if (pi) fields_ = pi->fields;
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- const char *s;
- VObject *eachProp = nextVObject(&t);
- s = NAME_OF(eachProp);
- if (stricmp(VCGroupingProp,s) && !inList(fields_,s))
- writeAttrValue(fp,eachProp);
- if (stricmp(VCQPProp,s)==0 || stricmp(VCQuotedPrintableProp,s)==0)
- isQuoted=1;
- }
- if (fields_) {
- int i = 0, n = 0;
- const char** fields = fields_;
- /* output prop as fields */
- appendcOFile(fp,':');
- while (*fields) {
- VObject *t = isAPropertyOf(o,*fields);
- i++;
- if (t) n = i;
- fields++;
- }
- fields = fields_;
- for (i=0;i<n;i++) {
- writeValue(fp,isAPropertyOf(o,*fields),0,isQuoted);
- fields++;
- if (i<(n-1)) appendcOFile(fp,';');
- }
- }
- }
-
- if (VALUE_TYPE(o)) {
- unsigned long size = 0;
- VObject *p = isAPropertyOf(o,VCDataSizeProp);
- if (p) size = LONG_VALUE_OF(p);
- appendcOFile(fp,':');
- writeValue(fp,o,size,isQuoted);
- }
-
- appendcOFile(fp,'\n');
-}
-
-static void writeVObject_(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- pi = lookupPropInfo(NAME_OF(o));
-
- if (pi && ((pi->flags & PD_BEGIN) != 0)) {
- VObjectIterator t;
- const char *begin = NAME_OF(o);
- appendsOFile(fp,"BEGIN:");
- appendsOFile(fp,begin);
- appendcOFile(fp,'\n');
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- writeProp(fp, eachProp);
- }
- appendsOFile(fp,"END:");
- appendsOFile(fp,begin);
- appendsOFile(fp,"\n\n");
- }
- }
-}
-
-void writeVObject(FILE *fp, VObject *o)
-{
- OFile ofp;
- initOFile(&ofp,fp);
- writeVObject_(&ofp,o);
-}
-
-DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- writeVObject(fp,o);
- fclose(fp);
- }
-}
-
-DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
-{
- FILE *fp = fopen(fname,"w");
- if (fp) {
- while (list) {
- writeVObject(fp,list);
- list = nextVObjectInList(list);
- }
- fclose(fp);
- }
-}
-
-DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o)
-{
- OFile ofp;
- initMemOFile(&ofp,s,len?*len:0);
- writeVObject_(&ofp,o);
- if (len) *len = ofp.len;
- appendcOFile(&ofp,0);
- return ofp.s;
-}
-
-DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list)
-{
- OFile ofp;
- initMemOFile(&ofp,s,len?*len:0);
- while (list) {
- writeVObject_(&ofp,list);
- list = nextVObjectInList(list);
- }
- if (len) *len = ofp.len;
- appendcOFile(&ofp,0);
- return ofp.s;
-}
-
-/*----------------------------------------------------------------------
- APIs to do fake Unicode stuff.
- ----------------------------------------------------------------------*/
-DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes)
-{
- wchar_t *r, *pw;
- int len = strlen(ps)+1;
-
- pw = r = (wchar_t*)malloc(sizeof(wchar_t)*len);
- if (bytes)
- *bytes = len * sizeof(wchar_t);
-
- while (*ps) {
- if (*ps == '\n')
- *pw = (wchar_t)0x2028;
- else if (*ps == '\r')
- *pw = (wchar_t)0x2029;
- else
- *pw = (wchar_t)(unsigned char)*ps;
- ps++; pw++;
- }
- *pw = (wchar_t)0;
-
- return r;
-}
-
-DLLEXPORT(int) uStrLen(const wchar_t *u)
-{
- int i = 0;
- while (*u != (wchar_t)0) { u++; i++; }
- return i;
-}
-
-DLLEXPORT(char*) fakeCString(const wchar_t *u)
-{
- char *s, *t;
- int len = uStrLen(u) + 1;
- t = s = (char*)malloc(len);
- while (*u) {
- if (*u == (wchar_t)0x2028)
- *t = '\n';
- else if (*u == (wchar_t)0x2029)
- *t = '\r';
- else
- *t = (char)*u;
- u++; t++;
- }
- *t = 0;
- return s;
-}
-
-/* end of source file vobject.c */
diff --git a/libversit/vobject.h b/libversit/vobject.h
deleted file mode 100644
index bc31dc8297..0000000000
--- a/libversit/vobject.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
-
-The vCard/vCalendar C interface is implemented in the set
-of files as follows:
-
-vcc.y, yacc source, and vcc.c, the yacc output you will use
-implements the core parser
-
-vobject.c implements an API that insulates the caller from
-the parser and changes in the vCard/vCalendar BNF
-
-port.h defines compilation environment dependent stuff
-
-vcc.h and vobject.h are header files for their .c counterparts
-
-vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
-which you may find useful.
-
-test.c is a standalone test driver that exercises some of
-the features of the APIs provided. Invoke test.exe on a
-VCARD/VCALENDAR input text file and you will see the pretty
-print output of the internal representation (this pretty print
-output should give you a good idea of how the internal
-representation looks like -- there is one such output in the
-following too). Also, a file with the .out suffix is generated
-to show that the internal representation can be written back
-in the original text format.
-
-For more information on this API see the readme.txt file
-which accompanied this distribution.
-
- Also visit:
-
- http://www.versit.com
- http://www.ralden.com
-
-*/
-
-
-#ifndef __VOBJECT_H__
-#define __VOBJECT_H__ 1
-
-
-#include "port.h"
-#include <stdlib.h>
-#include <stdio.h>
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-extern "C" {
-#endif
-
-
-#define VC7bitProp "7BIT"
-#define VC8bitProp "8BIT"
-#define VCAAlarmProp "AALARM"
-#define VCAdditionalNamesProp "ADDN"
-#define VCAdrProp "ADR"
-#define VCAgentProp "AGENT"
-#define VCAIFFProp "AIFF"
-#define VCAOLProp "AOL"
-#define VCAppleLinkProp "APPLELINK"
-#define VCAttachProp "ATTACH"
-#define VCAttendeeProp "ATTENDEE"
-#define VCATTMailProp "ATTMAIL"
-#define VCAudioContentProp "AUDIOCONTENT"
-#define VCAVIProp "AVI"
-#define VCBase64Prop "BASE64"
-#define VCBBSProp "BBS"
-#define VCBirthDateProp "BDAY"
-#define VCBMPProp "BMP"
-#define VCBodyProp "BODY"
-#define VCBusinessRoleProp "ROLE"
-#define VCCalProp "VCALENDAR"
-#define VCCaptionProp "CAP"
-#define VCCardProp "VCARD"
-#define VCCarProp "CAR"
-#define VCCategoriesProp "CATEGORIES"
-#define VCCellularProp "CELL"
-#define VCCGMProp "CGM"
-#define VCCharSetProp "CS"
-#define VCCIDProp "CID"
-#define VCCISProp "CIS"
-#define VCCityProp "L"
-#define VCClassProp "CLASS"
-#define VCCommentProp "NOTE"
-#define VCCompletedProp "COMPLETED"
-#define VCContentIDProp "CONTENT-ID"
-#define VCCountryNameProp "C"
-#define VCDAlarmProp "DALARM"
-#define VCDataSizeProp "DATASIZE"
-#define VCDayLightProp "DAYLIGHT"
-#define VCDCreatedProp "DCREATED"
-#define VCDeliveryLabelProp "LABEL"
-#define VCDescriptionProp "DESCRIPTION"
-#define VCDIBProp "DIB"
-#define VCDisplayStringProp "DISPLAYSTRING"
-#define VCDomesticProp "DOM"
-#define VCDTendProp "DTEND"
-#define VCDTstartProp "DTSTART"
-#define VCDueProp "DUE"
-#define VCEmailAddressProp "EMAIL"
-#define VCEncodingProp "ENCODING"
-#define VCEndProp "END"
-#define VCEventProp "VEVENT"
-#define VCEWorldProp "EWORLD"
-#define VCExNumProp "EXNUM"
-#define VCExpDateProp "EXDATE"
-#define VCExpectProp "EXPECT"
-#define VCExtAddressProp "EXT ADD"
-#define VCFamilyNameProp "F"
-#define VCFaxProp "FAX"
-#define VCFullNameProp "FN"
-#define VCGeoProp "GEO"
-#define VCGeoLocationProp "GEO"
-#define VCGIFProp "GIF"
-#define VCGivenNameProp "G"
-#define VCGroupingProp "Grouping"
-#define VCHomeProp "HOME"
-#define VCIBMMailProp "IBMMail"
-#define VCInlineProp "INLINE"
-#define VCInternationalProp "INTL"
-#define VCInternetProp "INTERNET"
-#define VCISDNProp "ISDN"
-#define VCJPEGProp "JPEG"
-#define VCLanguageProp "LANG"
-#define VCLastModifiedProp "LAST-MODIFIED"
-#define VCLastRevisedProp "REV"
-#define VCLocationProp "LOCATION"
-#define VCLogoProp "LOGO"
-#define VCMailerProp "MAILER"
-#define VCMAlarmProp "MALARM"
-#define VCMCIMailProp "MCIMAIL"
-#define VCMessageProp "MSG"
-#define VCMETProp "MET"
-#define VCModemProp "MODEM"
-#define VCMPEG2Prop "MPEG2"
-#define VCMPEGProp "MPEG"
-#define VCMSNProp "MSN"
-#define VCNamePrefixesProp "NPRE"
-#define VCNameProp "N"
-#define VCNameSuffixesProp "NSUF"
-#define VCNoteProp "NOTE"
-#define VCOrgNameProp "ORGNAME"
-#define VCOrgProp "ORG"
-#define VCOrgUnit2Prop "OUN2"
-#define VCOrgUnit3Prop "OUN3"
-#define VCOrgUnit4Prop "OUN4"
-#define VCOrgUnitProp "OUN"
-#define VCPagerProp "PAGER"
-#define VCPAlarmProp "PALARM"
-#define VCParcelProp "PARCEL"
-#define VCPartProp "PART"
-#define VCPCMProp "PCM"
-#define VCPDFProp "PDF"
-#define VCPGPProp "PGP"
-#define VCPhotoProp "PHOTO"
-#define VCPICTProp "PICT"
-#define VCPMBProp "PMB"
-#define VCPostalBoxProp "BOX"
-#define VCPostalCodeProp "PC"
-#define VCPostalProp "POSTAL"
-#define VCPowerShareProp "POWERSHARE"
-#define VCPreferredProp "PREF"
-#define VCPriorityProp "PRIORITY"
-#define VCProcedureNameProp "PROCEDURENAME"
-#define VCProdIdProp "PRODID"
-#define VCProdigyProp "PRODIGY"
-#define VCPronunciationProp "SOUND"
-#define VCPSProp "PS"
-#define VCPublicKeyProp "KEY"
-#define VCQPProp "QP"
-#define VCQuickTimeProp "QTIME"
-#define VCQuotedPrintableProp "QUOTED-PRINTABLE"
-#define VCRDateProp "RDATE"
-#define VCRegionProp "R"
-#define VCRelatedToProp "RELATED-TO"
-#define VCRepeatCountProp "REPEATCOUNT"
-#define VCResourcesProp "RESOURCES"
-#define VCRNumProp "RNUM"
-#define VCRoleProp "ROLE"
-#define VCRRuleProp "RRULE"
-#define VCRSVPProp "RSVP"
-#define VCRunTimeProp "RUNTIME"
-#define VCSequenceProp "SEQUENCE"
-#define VCSnoozeTimeProp "SNOOZETIME"
-#define VCStartProp "START"
-#define VCStatusProp "STATUS"
-#define VCStreetAddressProp "STREET"
-#define VCSubTypeProp "SUBTYPE"
-#define VCSummaryProp "SUMMARY"
-#define VCTelephoneProp "TEL"
-#define VCTIFFProp "TIFF"
-#define VCTimeZoneProp "TZ"
-#define VCTitleProp "TITLE"
-#define VCTLXProp "TLX"
-#define VCTodoProp "VTODO"
-#define VCTranspProp "TRANSP"
-#define VCUniqueStringProp "UID"
-#define VCURLProp "URL"
-#define VCURLValueProp "URLVAL"
-#define VCValueProp "VALUE"
-#define VCVersionProp "VERSION"
-#define VCVideoProp "VIDEO"
-#define VCVoiceProp "VOICE"
-#define VCWAVEProp "WAVE"
-#define VCWMFProp "WMF"
-#define VCWorkProp "WORK"
-#define VCX400Prop "X400"
-#define VCX509Prop "X509"
-#define VCXRuleProp "XRULE"
-
-/* Extensions */
-
-#define XPilotIdProp "X-PILOTID"
-#define XPilotStatusProp "X-PILOTSTAT"
-
-typedef struct VObject VObject;
-
-typedef struct VObjectIterator {
- VObject* start;
- VObject* next;
- } VObjectIterator;
-
-extern DLLEXPORT(VObject*) newVObject(const char *id);
-extern DLLEXPORT(void) deleteVObject(VObject *p);
-extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
-extern DLLEXPORT(void) deleteStr(const char *p);
-extern DLLEXPORT(void) unUseStr(const char *s);
-
-extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
-extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
-extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
-extern DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s);
-extern DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s);
-extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
-extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
-extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
-extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
-extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
-
-extern DLLEXPORT(const char*) vObjectName(VObject *o);
-extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
-extern DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o);
-extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
-extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
-extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
-extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
-extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
-
-extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
-extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
-extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
-extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
-extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
-extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
-extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
-extern DLLEXPORT(void) addList(VObject **o, VObject *p);
-
-extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
-
-extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
-extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
-extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
-extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
-
-extern DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o);
-extern DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list);
-
-extern DLLEXPORT(const char*) lookupStr(const char *s);
-extern DLLEXPORT(void) cleanStrTbl();
-
-extern DLLEXPORT(void) cleanVObject(VObject *o);
-extern DLLEXPORT(void) cleanVObjects(VObject *list);
-
-extern DLLEXPORT(const char*) lookupProp(const char* str);
-extern DLLEXPORT(const char*) lookupProp_(const char* str);
-
-extern DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes);
-extern DLLEXPORT(int) uStrLen(const wchar_t *u);
-extern DLLEXPORT(char*) fakeCString(const wchar_t *u);
-
-extern DLLEXPORT(void) printVObjectToFile(char *fname,VObject *o);
-extern DLLEXPORT(void) printVObjectsToFile(char *fname,VObject *list);
-extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
-extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
-
-extern DLLEXPORT(int) vObjectValueType(VObject *o);
-
-/* return type of vObjectValueType: */
-#define VCVT_NOVALUE 0
- /* if the VObject has no value associated with it. */
-#define VCVT_STRINGZ 1
- /* if the VObject has value set by setVObjectStringZValue. */
-#define VCVT_USTRINGZ 2
- /* if the VObject has value set by setVObjectUStringZValue. */
-#define VCVT_UINT 3
- /* if the VObject has value set by setVObjectIntegerValue. */
-#define VCVT_ULONG 4
- /* if the VObject has value set by setVObjectLongValue. */
-#define VCVT_RAW 5
- /* if the VObject has value set by setVObjectAnyValue. */
-#define VCVT_VOBJECT 6
- /* if the VObject has value set by setVObjectVObjectValue. */
-
-extern const char** fieldedProp;
-
-/* NOTE regarding printVObject and writeVObject
-
-The functions below are not exported from the DLL because they
-take a FILE* as a parameter, which cannot be passed across a DLL
-interface (at least that is my experience). Instead you can use
-their companion functions which take file names or pointers
-to memory. However, if you are linking this code into
-your build directly then you may find them a more convenient API
-and you can go ahead and use them. If you try to use them with
-the DLL LIB you will get a link error.
-*/
-extern void printVObject(FILE *fp,VObject *o);
-extern void writeVObject(FILE *fp, VObject *o);
-
-
-#if defined(__CPLUSPLUS__) || defined(__cplusplus)
-}
-#endif
-
-#endif /* __VOBJECT_H__ */
-
-
diff --git a/libwombat/.cvsignore b/libwombat/.cvsignore
deleted file mode 100644
index 6116a56ead..0000000000
--- a/libwombat/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile.in
-Makefile
-*.lo
-wombat.h
-wombat-common.c
-wombat-skels.c
-wombat-stubs.c
-.deps
-.libs
-libwombat.la
-libwombat-static.la
diff --git a/libwombat/ChangeLog b/libwombat/ChangeLog
deleted file mode 100644
index 6919fda2a9..0000000000
--- a/libwombat/ChangeLog
+++ /dev/null
@@ -1,22 +0,0 @@
-2001-06-25 Peter Williams <peterw@ximian.com>
-
- * Makefile.am (libwombat_static_la_SOURCES): Create a static
- libwombat for the conduits.
-
-2001-06-23 Jason Leach <jleach@ximian.com>
-
- * Makefile.am: builddir != srcdir fixes.
-
-2001-06-22 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: added $(ORBIT_IDL) as a dependency to the IDL
- files, so that the skels/stubs are rebuilt if a new version of
- ORBit has been installed
-
-2001-06-21 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Add some includes
-
-2001-06-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * created new directory for the libwombat library
diff --git a/libwombat/Makefile.am b/libwombat/Makefile.am
deleted file mode 100644
index 9fa5bd9c70..0000000000
--- a/libwombat/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-INCLUDES = \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- $(GNOME_INCLUDEDIR)
-
-# CORBA stuff
-
-IDLS = $(top_srcdir)/wombat/wombat.idl
-IDL_GENERATED = \
- wombat.h \
- wombat-common.c \
- wombat-skels.c \
- wombat-stubs.c
-
-$(IDLS): $(ORBIT_IDL)
-
-$(IDL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(top_srcdir)/wombat/wombat.idl
-
-# Wombat library
-lib_LTLIBRARIES = libwombat.la
-
-wombatincludedir = $(includedir)/evolution/wombat
-wombatinclude_HEADERS = \
- wombat-client.h
-
-libwombat_la_SOURCES = \
- $(IDL_GENERATED) \
- wombat-client.c \
- $(wombatinclude_HEADERS)
-
-# Static lib for pilot conduits
-
-noinst_LTLIBRARIES = libwombat-static.la
-
-libwombat_static_la_SOURCES = $(libwombat_la_SOURCES)
-libwombat_static_la_LDFLAGS = --all-static
diff --git a/libwombat/wombat-client.c b/libwombat/wombat-client.c
deleted file mode 100644
index 0087d1a9ed..0000000000
--- a/libwombat/wombat-client.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Wombat client library
- *
- * 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 "wombat-client.h"
-
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
-
-struct _WombatClientPrivate {
- WombatClientGetPasswordFn get_password;
- WombatClientForgetPasswordFn forget_password;
- gpointer fn_data;
-};
-
-static void wombat_client_class_init (WombatClientClass *klass);
-static void wombat_client_init (WombatClient *client);
-static void wombat_client_destroy (GtkObject *objct);
-
-/*
- * CORBA interface implementation
- */
-static CORBA_char *
-impl_GNOME_Evolution_WombatClient_getPassword (PortableServer_Servant servant,
- const CORBA_char *prompt,
- const CORBA_char *key,
- CORBA_Environment *ev)
-{
- WombatClient *client;
-
- client = WOMBAT_CLIENT (bonobo_x_object (servant));
- g_return_val_if_fail (WOMBAT_IS_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
-
- if (client->priv->get_password != NULL)
- return client->priv->get_password (client, prompt, key, client->priv->fn_data);
-
- return NULL;
-}
-
-static void
-impl_GNOME_Evolution_WombatClient_forgetPassword (PortableServer_Servant servant,
- const CORBA_char *key,
- CORBA_Environment *ev)
-{
- WombatClient *client;
-
- client = WOMBAT_CLIENT (bonobo_x_object (servant));
- g_return_if_fail (WOMBAT_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
-
- if (client->priv->forget_password != NULL)
- client->priv->forget_password (client, key, client->priv->fn_data);
-}
-
-/*
- * WombatClient class implementation
- */
-static void
-wombat_client_class_init (WombatClientClass *klass)
-{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);
- POA_GNOME_Evolution_WombatClient__epv *epv = &klass->epv;
-
- object_class->destroy = wombat_client_destroy;
-
- epv->getPassword = impl_GNOME_Evolution_WombatClient_getPassword;
- epv->forgetPassword = impl_GNOME_Evolution_WombatClient_forgetPassword;
-}
-
-static void
-wombat_client_init (WombatClient *client)
-{
- client->priv = g_new0 (WombatClientPrivate, 1);
-}
-
-static void
-wombat_client_destroy (GtkObject *object)
-{
- GtkObjectClass *parent_class;
- WombatClient *client = (WombatClient *) object;
-
- g_return_if_fail (WOMBAT_IS_CLIENT (client));
-
- /* free memory */
- if (client->priv != NULL) {
- g_free (client->priv);
- }
-
- /* call parent class' destroy handler */
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (PARENT_TYPE));
- if (parent_class->destroy != NULL)
- parent_class->destroy (GTK_OBJECT(client));
-}
-
-/**
- * wombat_client_get_type
- */
-GtkType
-wombat_client_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo info = {
- "WombatClient",
- sizeof (WombatClient),
- sizeof (WombatClientClass),
- (GtkClassInitFunc) wombat_client_class_init,
- (GtkObjectInitFunc) wombat_client_init,
- (GtkArgSetFunc) NULL,
- (GtkArgSetFunc) NULL
- };
- type = bonobo_x_type_unique(
- PARENT_TYPE,
- POA_GNOME_Evolution_WombatClient__init, NULL,
- GTK_STRUCT_OFFSET (WombatClientClass, epv),
- &info);
- }
- return type;
-}
-
-/**
- * wombat_client_construct
- */
-WombatClient *
-wombat_client_construct (WombatClient *client,
- WombatClientGetPasswordFn get_password_fn,
- WombatClientForgetPasswordFn forget_password_fn,
- gpointer fn_data)
-{
- g_return_val_if_fail (WOMBAT_IS_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
-
- client->priv->get_password = get_password_fn;
- client->priv->forget_password = forget_password_fn;
- client->priv->fn_data = fn_data;
-
- return client;
-}
-
-/**
- * wombat_client_new
- */
-WombatClient *
-wombat_client_new (WombatClientGetPasswordFn get_password_fn,
- WombatClientForgetPasswordFn forget_password_fn,
- gpointer fn_data)
-{
- WombatClient *client;
-
- client = WOMBAT_CLIENT (gtk_type_new (WOMBAT_TYPE_CLIENT));
- return wombat_client_construct (client,
- get_password_fn,
- forget_password_fn,
- fn_data);
-}
diff --git a/libwombat/wombat-client.h b/libwombat/wombat-client.h
deleted file mode 100644
index afec05db39..0000000000
--- a/libwombat/wombat-client.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Wombat client library
- *
- * 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 WOMBAT_CLIENT_H
-#define WOMBAT_CLIENT_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-xobject.h>
-#include "wombat.h"
-
-BEGIN_GNOME_DECLS
-
-#define WOMBAT_TYPE_CLIENT (wombat_client_get_type())
-#define WOMBAT_CLIENT(obj) GTK_CHECK_CAST(obj, WOMBAT_TYPE_CLIENT, WombatClient)
-#define WOMBAT_CLIENT_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, WOMBAT_TYPE_CLIENT, WombatClientClass)
-#define WOMBAT_IS_CLIENT(obj) GTK_CHECK_TYPE(obj, WOMBAT_TYPE_CLIENT)
-#define WOMBAT_IS_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), WOMBAT_TYPE_CLIENT))
-
-typedef struct _WombatClient WombatClient;
-typedef struct _WombatClientClass WombatClientClass;
-typedef struct _WombatClientPrivate WombatClientPrivate;
-
-struct _WombatClient {
- BonoboXObject object;
- WombatClientPrivate *priv;
-};
-
-struct _WombatClientClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_WombatClient__epv epv;
-};
-
-typedef gchar * (* WombatClientGetPasswordFn) (WombatClient *client,
- const gchar *prompt,
- const gchar *key,
- gpointer user_data);
-typedef void (* WombatClientForgetPasswordFn) (WombatClient *client,
- const gchar *key,
- gpointer user_data);
-
-GtkType wombat_client_get_type (void);
-
-WombatClient *wombat_client_construct (WombatClient *client,
- WombatClientGetPasswordFn get_password_fn,
- WombatClientForgetPasswordFn forget_password_fn,
- gpointer fn_data);
-WombatClient *wombat_client_new (WombatClientGetPasswordFn get_password_fn,
- WombatClientForgetPasswordFn forget_password_fn,
- gpointer fn_data);
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/mail/.cvsignore b/mail/.cvsignore
deleted file mode 100644
index dd1d902aa2..0000000000
--- a/mail/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-Mail-stubs.c
-Mail-skels.c
-Mail-common.c
-Mail.h
-evolution-mail
-evolution-mail.pure
-test-mail
-test-sources
-test-thread
-*.bb
-*.bbg
-*.da
-*.gcov
-GNOME_Evolution_Mail.oaf
diff --git a/mail/ChangeLog b/mail/ChangeLog
deleted file mode 100644
index 7156e72bc1..0000000000
--- a/mail/ChangeLog
+++ /dev/null
@@ -1,15871 +0,0 @@
-2001-10-02 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-account-gui.c (launch_signature_editor): Use
- `bonobo_ui_component_new_default()', not
- `bonobo_ui_component_new()'.
-
-2001-10-01 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (on_url_requested): Make sure we aren't dealing
- with a pathological message w/o a From: header.
- (ebook_callback): Properly check that the address we queried
- matches the address on the current message. (Bug #10038)
-
-2001-10-01 Iain Holmes <iain@ximian.com>
-
- * component-factory.c (component_factory_init): Check for errors.
-
- * mail.h: Change prototype for evolution_folder_info_factory_init.
-
- * folder-info.c (evolution_folder_info_factory_init): Return TRUE
- or FALSE.
-
- * mail-config.c (evolution_mail_config_factory_init): Return TRUE or
- FALSE.
-
- * mail-config.h: Change prototype for above.
-
-2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (mail_vfolder_remove_uri): replace my_list_find()
- == NULL with my_list_find() != NULL.
-
-2001-10-01 Dan Winship <danw@ximian.com>
-
- * component-factory.c (mail_load_storage_by_uri): create storages
- for providers that are STORAGE and aren't EXTERNAL, rather than
- "(STORAGE and REMOTE) or spool, maildir, or vfolder".
- (mail_remove_storage_by_uri): Use the same rule here (which makes
- it possible now to remove maildir and spool stores now, which
- weren't properly special-cased before). Remove some CamelException
- misuse.
-
- * mail-config.c (new_source_created): Fix up the broken INBOX-
- shortcut-generating assumption a little by only assuming that if
- you call camel_store_get_inbox(), that its full_name is the same
- as its path. (This happens to always be true for inboxes now, and
- will be always true by definition at some point in the future.)
- Now maildir stores get working Inbox shortcuts.
-
- * mail-send-recv.c (get_receive_type): If PROVIDER_IS_STORAGE
- then use SEND_UPDATE, if not, use SEND_RECEIVE.
-
- * mail-local.c (local_provider): The local provider is EXTERNAL.
- (The shell creates it.)
- (mail_local_reconfigure_folder): Allow reconfiguring between
- IS_LOCAL providers.
-
- * mail-accounts.c (news_delete): Don't need to check the provider
- flags here... we know nntp is a STORAGE.
-
-2001-10-01 Dan Winship <danw@ximian.com>
-
- * mail-local.c (mail_local_reconfigure_folder): Don't use
- mail_tool_get_folder_name here since that function only existed to
- be clever in a certain case that this is not.
- (reconfigure_folder_free): Remove the dialog from the hash table
- here so that it gets removed in the successfully-reconfigured case
- too. Don't unref folder_out if it never got set.
- (reconfigure_clicked): Remove the hash table code from here; it's
- in reconfigure_folder_free now.
-
- * mail-tools.c (mail_tool_get_folder_name): No longer used by
- anything.
- (mail_tool_get_folder_from_urlname): Also not used anywhere.
-
-2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): Don't pass the CREATE
- flag, we shouldn't ever need this...
-
-2001-10-01 Larry Ewing <lewing@ximian.com>
-
- * mail-identify.c (mail_identify_mime_part): if gnome-vfs returns
- application/octet-stream with the magic check, use the filename
- check instead since it at least has a chance of being useful.
-
-2001-09-28 Dan Winship <danw@ximian.com>
-
- * folder-browser-ui.c (fbui_sensitize_timeout): wrap a
- bonobo_ui_component_freeze/thaw around all of the set_props so
- they all update at once.
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (construct): Don't create checkboxes for global
- Threaded or Preview options as they are now removed.
-
-2001-09-28 <NotZed@Ximian.com>
-
- * component-factory.c (owner_set_cb): Setup vfolder storage before
- all others.
-
- * mail-local.c (mail_local_store_remove_folder): Emit
- folder_deleted event.
- (remove_find_path): Fix, compare against path, not full_name.
-
- * mail-tools.c (mail_tool_uri_to_folder): Dont
- vfolder_register_source anymore.
-
- * mail-vfolder.c (rule_changed): Changed to access
- mail_fodler_cahce to find out if the folder exist yet before
- trying to open them, also use the cache as a cache so we dont have
- to open the folder if its already been opened.
- (vfolder_register_source, register_source): Removed.
- (source_finalise): Removed,
- (check_source): Removed. All handled through diff mechanism.
- (mail_vfolder_add_uri): New function, records uri's of available
- folders, and adds them to any active vfolders if required.
- (mail_vfolder_remove_uri): New function, removes a uri from
- available folders, and checks any rules to see fi they need
- updating.
- (vfolder_adduri): New async function to add a uri to all vfolders
- that need it.
- (store_folder_deleted): oops! free user, not rule!!
-
- * mail-folder-cache.c: Add uri->folderinfo hashtable, and the
- store from which they come into the store info struct.
- Add uri to the folder_info.
- (setup_folder): Store the uri in the folderinfo.
- (setup_folder): And the uri in the folder_uri hashtable.
- (mail_note_store): Store the store in the storeinfo, and setup the
- folders_uri hashtable via the store's hash functions.
- (setup_folder): Call mail_vfolder_add_uri to note this newly setup
- folder uri.
- (store_folder_deleted): Proxy call to main thread.
- (real_folder_deleted): And tell the vfolder to remove this uri
- from its folder list.
- (setup_folder): Dont call vfolder_add_uri if noselect is set on
- the uri.
-
-2001-09-27 <NotZed@Ximian.com>
-
- * mail-vfolder.c: Removed vfolder_info struct, vfolder_storage.
- Neither used anymore.
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_account_by_transport_url): Use
- Camel to compare the urls rather than using e_url_equal which does
- all sorts of funky shit that may not work in every case.
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (mail_local_provider_init): Setup the url_hash and
- url_equal functions for the local provider.
-
- * mail-account-gui.c (mail_account_gui_save): Add code here to
- check to make sure that the Drafts and Sent folders are pointing
- to valid urls. This is kinda nasty and only really solves the case
- where the user changes, say, his imap server or
- something. Unfortunately we still have the problem where if
- account A's sent/drafts folders point to account B's store and the
- user changes the url for account B.
-
- * mail-config.c (mail_config_get_account_by_source_url): Use Camel
- to compare the urls rather than using e_url_equal which does all
- sorts of funky shit that may not work in every case.
-
-2001-09-28 Dan Winship <danw@ximian.com>
-
- * mail-mt.c (pass_got): Don't call
- mail_config_service_set_save_passwd if we didn't find a service.
-
-2001-09-27 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-config.c (add_shortcut_entry): Just add the shortcut to the
- first group.
-
-2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_add_list): Call
- folder_browser_toggle_threads() here after setting the value. This
- should fix bug #6415 and if it doesn't, then this whole deal is
- just a lost cause.
-
- * mail-mt.h: Added mail_msg_cleanup() prototype.
-
-2001-09-28 Dan Winship <danw@ximian.com>
-
- * mail-format.c (get_data_wrapper_text): Deal with
- camel_mime_filter_charset_new_convert returning NULL. (Every other
- call to it does, and something's wrong with iconv on the Sun right
- now so it keeps failing.)
-
-2001-09-27 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-mt.c (do_user_message): Always make the Cancel button the
- last one.
-
-2001-09-27 <NotZed@Ximian.com>
-
- * mail-folder-cache.c (real_note_folder): No such event finalized!
- Its finalize.
- (mail_note_store): "
-
- Fixed dan's comment a bit, info != NULL for folder_created, info==
- NULL for changed.
-
-2001-09-26 <NotZed@Ximian.com>
-
- * mail-local.c (mlf_set_message_flags): Proxy the
- set_message_flags call too. Doesn't fix the 'local folder counts
- dont update' problem, but its more correct.
-
-2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (mail_session_remember_password): Perform a
- NULL-check. Hopefully fixes bug #7874.
-
-2001-09-27 Dan Winship <danw@ximian.com>
-
- * mail-offline-handler.c (service_is_relevant): A service needs to
- be disconnected if it's remote, not already offline, and either
- connected OR connecting.
- (storage_go_offline): Don't put non-relevant stores offline. (Eg,
- don't force an IMAP store which you hadn't already connected to to
- connect and sync.)
- (storage_go_online): Likewise, don't "reconnect" stores that
- weren't connected before.
-
- * mail-ops.c (set_offline_desc): Fix the message to say
- "reconnecting" instead of "disconnecting" when appropriate.
- (mail_store_set_offline): If offline is TRUE, call
- camel_service_cancel_connect on the store. (We do this here
- because we don't want the cancel_connect request to get queued up
- behind a hanging connection attempt.)
-
-2001-09-26 Anna Marie Dirks <anna@ximian.com>
-
- * mail-config.glade: Added a "Description:" label and moved
- the source_description and transport_description labels to
- a more appropriate place.
-
-2001-09-26 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (mlfe_callback): Check for the root node here.
- Fixes Ximian bug #11029.
-
-2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (do_get_pass): Change the wording of the password
- dialog if we are getting a pgp passphrase so that users don't
- misinterpret it to mean saving the passphrase forever.
-
-2001-09-26 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (composer_get_message): strdup our "This
- message contains invalid recipients" string, since it gets freed
- later. And then don't leak the message string. (Bug #10877)
-
- * mail-format.c (write_address): Use camel_address_format,
- not camel_address_encode.
-
- * mail-display.c (html_button_press_event): Decode our URL before
- extracting the address to pop up contact info.
-
- * mail-format.c (write_address): When writing out a mailto: link,
- make sure we construct a valid URL w/ correct encoding. Make sure
- our address is properly quoted, if necessary.
-
-2001-09-26 Dan Winship <danw@ximian.com>
-
- * mail-folder-cache.c: Add a big comment explaining unread message
- counts so no one can mess them up again in the future. :-)
- (update_1folder): If info->unread_message_count is -1, don't do
- anything.
-
- * component-factory.c (component_factory_init): warn and exit if
- oaf_active_server_register returns OAF_REG_ALREADY_ACTIVE.
-
-2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (config_read): Oops, translate the fake account
- name to UTF-8.
-
-2001-09-26 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (message_list_foreach): Use
- e_tree_selected_path_foreach instead of
- e_tree_selected_row_foreach here.
-
-2001-09-27 Michael Meeks <michael@ximian.com>
-
- * mail-config.c (mail_config_init): report the
- exception on failure and abort quickly instead of hitting
- a strange assert later.
-
-2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (decode_pgp): Update to not send the
- remember-passphrase option to the context, it doesn't need it
- anymore.
- (try_inline_pgp_sig): Same.
-
- * mail-accounts.c (construct): The remember-passphrase option is
- no longer there. This can now be set on the passphrase prompt
- dialog.
- (construct): Add confirm expunge options.
-
- * mail-config.c (config_read): We no longer read-in the
- remember-passphrase state because we no longer need it.
- (mail_config_write_on_exit): We no longer save it either.
- (mail_config_get_remember_pgp_passphrase): Removed.
- (mail_config_set_remember_pgp_passphrase): Removed.
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_sign): No longer do we
- need to send the remember passphrase state to the pgp context.
- (mail_crypto_pgp_mime_part_verify): Same.
- (mail_crypto_pgp_mime_part_encrypt): Here too.
- (mail_crypto_pgp_mime_part_decrypt): And here.
-
-2001-09-25 Ettore Perazzoli <ettore@ximian.com>
-
- [Patch for Automake 1.5 compatibility pointed out by Richard
- Boulton <richard@tartarus.org>, as per #9258.]
-
- * Makefile.am (CLEANFILES): Assign directly, not with `+='.
-
-2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-folder-cache.c (update_1folder): The folder-info needs to
- take priority over the folder because of the way IMAP works (which
- is that it doesn't actually update the folders until you SELECT
- them and so when you do get_folder_info(), it doesn't actually
- SELECT the folders, it just STATUS's them).
-
-2001-09-25 <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_destroy): Deal with destroy vs
- finalise semantics. Only destroy widgets here.
- (folder_browser_finalise): object finalise function, actually
- unref/free all other objects here.
- (folder_browser_class_init): Init the finalise hook.
- (got_folder): Check if message_list == NULL -> we've been
- destroyed before the thread got a chance to finish loading the
- folder.
- (folder_browser_is_drafts): Dont use a g_return_if_fail to return
- in what could be a valid state of the object.
- (folder_browser_is_sent): Likewise.
- (folder_browser_copy): Do nothing if message_list == NULL.
-
- * main.c (main): call mail_msg_cleanup() before leaving threads.
-
- * component-factory.c (owner_unset_cb): Wait for all outstanding
- operations to finish before setting up to quit.
- (idle_quit): Wait for all outstanding ops to finish before
- cleanup.
- (unref_standard_folders): NULL out the standard folder before
- unreffing it.
-
- * mail-mt.c (mail_msg_wait_all): New function to wait for all
- outstanding thread operations.
- (mail_msg_cleanup): Destroy the io channels before we're
- finished. Also wait for all outstanding threads first. Made
- public.
- (mail_msg_init): Dont call mail_msg_cleanup atexit automatically.
-
-
-2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (get_data_wrapper_text): If the data wrapper
- contains raw text, treat the contents as if they were in the
- user's default charset and convert them to UTF-8.
-
- * component-factory.c (owner_set_cb): Throw up a warning dialog if
- we suspect the config database is corrupt.
-
- * mail-config.c (config_read): If the account name is NULL, then
- we have a corrupt config database most likely - so generate a fake
- account name and set the corrupt but to TRUE.
- (mail_config_is_corrupt): New function to find out if the config
- is suspected of being corrupted.
-
-2001-09-25 Iain Holmes <iain@ximian.com>
-
- * mail-config.c (impl_GNOME_Evolution_MailConfig_addAccount):
- Check if the transport is NULL.
-
-2001-09-25 Iain Holmes <iain@ximian.com>
-
- * mail-display.c (link_menu): Remove the Save Link as (FIXME)
- item.
-
-2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (pass_got): Only cache the password for the service if
- it has an entry in the account database. Fixes bug #10875.
-
-2001-09-24 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (filter_date): Use e_strftime_fix_am_pm instead
- of strftime.
-
-2001-09-24 <NotZed@Ximian.com>
-
- * mail-local.c (mls_get_folder): Removed unused variables.
-
- * component-factory.c (storage_create_folder): Remove unused
- variable.
-
- * mail-format.c (write_default_header): Used to write a header
- that we know about/normally print. Use a static header table to
- index these.
- (write_header): removed.
- (default_header_index): Return the index of the default header.
- (write_headers): Changed the way it writes headers a bit. Use
- write_default_header or write_text_header directly. Also try and
- use the header charset as a fallback if the header can't be
- decoded using the locale charset.
-
-2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (pass_got): Always cache POP and IMAP passwords, even
- if the user didn't tell us to. Fixes bug #10569.
-
-2001-09-21 <NotZed@Ximian.com>
-
- * mail-mt.c (mail_msg_check_error): If we have an operation that
- failed before, dont show the dialogue for the the new error. Also
- use gtk_widget_show rather than invoking another main loop. Fix
- for lazy people who like to leave their mailers running and go
- home.
-
-2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Use the mail-tools convenience
- functions to remove and restore the X-Evolution headers.
- (mail_update_subfolders): Removed.
-
-2001-09-21 <NotZed@Ximian.com>
-
- * mail-callbacks.c (mail_storage_create_folder, folder_created,
- create_folders): All made redundant by new mail-folder-cache
- code.
- (delete_folders, folder_deleted): Uh, code that isn't used
- anywhere. Removed.
-
- * component-factory.c (storage_create_folder): Dont call
- folder_created, let the folder_created event handle the update.
-
- * mail-local.c (mail_local_store_add_folder): Use url path as
- full_name, not shell path.
- (mail_local_folder_construct): Remove path argument, and use the
- full_name instead.
- (mls_get_folder): Dont lookup folderinfo in cache. Like duh the
- shell hasn't told me its there yet, smaaaart.
-
- * mail-folder-cache.c (mail_note_store): Take a new argument
- 'done' that can callback when complete. Fixed callers
- appropriately.
-
- * mail-ops.c (mail_update_subfolders): Removed. Isn't used
- anymore.
- (mail_scan_subfolders): Remove, no longer used.
-
- * mail-send-recv.c (receive_update_got_store): Remove call to
- mail_update_subfolders.
-
-2001-09-20 <NotZed@Ximian.com>
-
- * mail-vfolder.c (check_source): Dont let drafts/outbox/sent be
- added via a generic 'all local folders' rule.
-
- * component-factory.c (got_folder): trigger a folder changed
- event, so the folderinfocache stuff has a chance to see if this is
- the outbox_folder or not.
-
- * mail-folder-cache.c (update_1folder): If we have -1 unread
- count, pass that as 0 to the shell so it doesn't go bolding.
- (setup_folder): Same.
-
-2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Only add the account
- if it doesn't already exist in the config db.
-
- * mail-config.c (mail_config_find_account): New convenience
- function.
-
- * mail-config-druid.c (wizard_finish_cb): Do not add the account
- here as this is taken care of in mail_account_gui_save() since it
- has to be able to set the default account.
-
- * mail-config.c (mail_config_set_default_account): Don't allow the
- index to become invalid.
-
- * mail-account-gui.c (mail_account_gui_save): Add the account
- before setting it as the default.
-
-2001-09-20 <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_set_shell_view): Update the
- status bar here, assuming we've just been activated.
-
- * mail-ops.c (add_vtrash_info): Scan whole list, rather than
- missing the last one. Also dont assume its always the last,
- otherwise we could lose following folders.
-
-2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): Don't "note" the folder
- if we failed to get it.
-
-2001-09-20 Iain Holmes <iain@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Set the sensitivity
- of the edit buttons correctly.
-
-2001-09-20 <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_register_source): Lock around
- hashtable/list manipulation. Also dont try scan vfolder_hash if
- it hasn't been setup yet.
- (source_finalise): Lock around list access.
- (rule_changed): Lock around hash access.
- (context_rule_added): Lock around hash access.
- (context_rule_removed): "
- (rule_changed): Lock around list access.
- (all): d(x) out debug printfs
-
- * mail-local.c (storage_listener_startup): Fix for api change.
- (local_storage_new_folder_cb): Dont skip over leading / in path.
- (local_storage_removed_folder_cb): ditto.
-
- * mail-folder-cache.c (create_folders): No longer pass prefix
- between recursive calls - we have the path in the folderinfo.
- (setup_folder): No longer take path arg, we get it from
- folderinfo.
- (mail_note_folder): No longer take path arg, we use
- folder->full_name to key the folder table.
- (mail_note_store): Consolidate note_store interface, pass storage
- or corba_storage to it.
- (mail_note_local_store): Removed.
- (update_1folder): If its a vtrash folder, or the outbox_folder,
- and we have a folder, then make the 'count' the total message
- count, not unread messages count.
-
-2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (mail_local_store_add_folder): Set the folder info
- path.
-
-2001-09-20 <NotZed@Ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): Register vfolder sources
- here.
-
- * folder-browser.c (got_folder): Dont register vfolder sources
- here.
-
- * mail-ops.c (mail_get_folder): Add thread parameter. Fix callers.
- (add_unmatched_info): Scan for unmatched name and re-title.
-
- * mail-vfolder.c (vfolder_setup): Use the 'slow' queue for setting
- up vfolders.
-
- * mail-mt.c (mail_msg_init): Limit the maximum number of threads
- on the 'new' thread to 10.
- (mail_msg_init): Create a new queue 'slow' for doing slow
- operations.
-
-2001-09-20 Iain Holmes <iain@ximian.com>
-
- * mail-display.c (mail_error_write): Add a <blockquote> to make
- the error message look better.
-
-2001-09-20 <NotZed@Ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): Dont special case file:
- url's anymore.
-
- * mail-local.c: Add real_path to MailLocalFolder.
- (mail_local_folder_construct): Added path argument, setup
- full_name == path, and real_path == full_name.
- (mls_get_folder): First lookup folderinfo to confirm this folder
- exists, then use that to properly construct the folder paths.
- (mail_local_folder_reconfigure): Use real_path not full_name to
- create the store uri.
- (mlf_set_folder): Use real_path not folder_name to get real uri
- path.
-
-2001-09-19 <NotZed@Ximian.com>
-
- * mail-folder-cache.c (setup_store): Use the wrong spelling of
- finalised for the event hook.
- (real_note_folder): Use the wrong spelling of finalised for the
- event hook.
- (free_folder_info): Free the full_name parameter.
- (setup_folder):
- (real_note_folder): Key the folderinfo table on full_name, not
- path.
-
-2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (save_messages_save): Convert all textual parts to
- 8bit before saving. Fixes bug #10388.
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Oops,
- don't free memory that we don't own.
-
-2001-09-20 Dan Winship <danw@ximian.com>
-
- * mail-config.c (evolution_mail_config_factory_init): No need to
- have g_warnings here. If it's done properly, therapeutically,
- there's no danger involved.
-
-2001-09-19 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Truncate extremely long
- subjects. (inspired by bug #9158)
-
- * mail-tools.c (mail_tool_generate_forward_subject): Truncate
- extremely long subjects. (bug #9158)
-
-2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (receive_update_got_store): Here too.
-
- * component-factory.c (create_view): Call mail_note_store()
- instead of mail_scan_subfolders() here so that these folders get
- hooked up with the unread count code.
-
-2001-09-12 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Fix memory
- leak.
-
-2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Convert
- the names to the locale charset.
-
-2001-09-19 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (create_folders): Pass the actual unread
- message count, not just whether or not it's > 0. Fixes ximian
- 9089.
-
-2001-09-19 <NotZed@Ximian.com>
-
- * component-factory.c: Added missing header.
-
- * mail-local.c (mail_local_store_add_folder): Async load the
- folder we just added, so it can update the folder counts in the
- display. We just discard the folder afterwards?
-
- * mail-ops.c (mail_get_folder): Use the queued thread to get
- folders.
-
- * General cleanup of mail debug printfs.
-
- * mail-folder-cache.[ch]: Completely rewritten. Removed all calls
- to the old code everywhere they were used. Nuff said.
-
- * folder-browser.h: Add shell_view to folder_browser & api to set
- it.
-
- * folder-browser-factory.c (control_activate): Set the shell-view
- on the folder_browser.
- (control_deactivate): And clear it here.
-
- * folder-browser.c (folder_browser_destroy): Unhook from changed
- events on the folder before giving it away.
- (got_folder): Hook onto the folder-changed events.
- (folder_changed): Event hook proxy for folder_changed events
- (main_folder_changed): And the main code version.
- (update_status_bar): And the one that actually does the work.
- (on_selection_changed): Also call update_status_bar() to update
- the selection count.
- (folder_browser_set_shell_view): Implement function to set the
- shell_view on the folder_browser.
- (folder_browser_destroy): Release the shell_view here too.
-
- * mail-tools.c (mail_tool_uri_to_folder): Dont 'note' the new
- folder if its from a file: url, this is handled by hte local store
- (yeeruughck).
-
- * mail-local.c (mls_init):
- (free_info):
- (mls_finalise): Setup init/finalise funcs for the folderinfo hash.
- (local_storage_removed_folder_cb): re-enable.
-
-2001-09-18 <NotZed@Ximian.com>
-
- * mail-local.c (MailLocalStore): Add a hash table to store
- uri<>folderinfo data.
- (mail_local_store_add_folder): Add a new folderinfo to our hash.
- (mail_local_store_remove_folder): Remove a folder by uri.
- (storage_listener_startup): Add this store to those monitored by
- the folder tree.
-
-2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (do_get_pass): Make the title translatable, and also
- use the account name when possible. Sorta fixes bug #6277.
-
-2001-09-17 <NotZed@Ximian.com>
-
- * mail-send-recv.c (get_receive_type): Function to get the real
- receive tpe for ag iven url. IMAP/SPOOL/MAILDIR types just update
- their info, dont download.
- (build_dialogue):
- (mail_receive_uri): Use function above to get the right receive
- type.
-
-2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_remove_xevolution_headers): Oops, forgot
- about X-Evolution-Format.
- (mail_tool_restore_xevolution_headers): Same.
-
-2001-09-18 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (folder_browser_set_uri): Merged into
- folder_browser_new: nothing ever changes the URI of an existing
- folder browser any more.
- (folder_browser_new): Make this take a uri argument and do the
- work folder_browser_set_uri used to do, except that we set fb->uri
- right away, so that if the folder browser's control is activated
- before got_folder() gets called, then folder_browser_ui_add_list()
- will have access to the correct uri for purposes of setting
- ViewThreaded, etc. Fixes #4913.
- (got_folder): Don't set fb->uri here since it will already have
- been set. Don't call message_list_set_threaded, since it should be
- a noop now (and if it's not, it would make the message list not
- match the menu item).
-
- * folder-browser-ui.c (folder_browser_ui_add_list): Remove some
- code that was failing to work around the problems above.
-
- * message-browser.c (message_browser_new): Pass uri to
- folder_browser_new, remove call to set_uri.
-
- * folder-browser-factory.c (folder_browser_factory_new_control):
- Likewise. Also fix a s/destroy/unref/ in an error cleanup.
-
-2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (get_password): Pass a 'cache-me' argument to
- mail_get_password.
-
- * mail-mt.c (pass_got): Make less confusing...
- (mail_get_password): Now takes an argument 'cache' that allows our
- caller to determine if the user wanted to cache his/her password
- or not.
- (pass_got): Set the cache option.
-
-2001-09-18 Dan Winship <danw@ximian.com>
-
- * mail-format.c (mail_format_raw_message): Call
- mail_content_loaded here rather than blocking if the message data
- isn't available.
-
-2001-09-17 <NotZed@Ximian.com>
-
- * mail-ops.c (mail_get_folderinfo): Get folderinfo 1 at a time
- rather than all at once.
-
-2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (storage_remove_folder): Unsubscribe from
- the folder before deleting it. Also, use the url's path instead of
- the shell's path since IMAP doesn't necessarily have to use "/" as
- the dir sep.
-
- * mail-ops.c (remove_folder_get): If the store supports
- subscriptions, make sure to unsubscribe from the folder before
- deleting it.
-
-2001-09-17 <NotZed@Ximian.com>
-
- * mail-local.c (storage_listener_startup): Setup global
- corba_storage variable.
- (mls_get_folder): Set 'update lstorage' on the newly opened
- folder.
-
-2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (invisible_selection_get_callback): Do nothing if
- the selection is NULL? Maybe this is the cause of bug #6817.
-
- * mail-config.c (mail_config_folder_to_cachename): Go back to
- generating the cachename ourselves, but continue doing it the way
- the dfault implementation of camel_folder_get_uri worked.
-
-2001-09-16 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (ml_get_node_by_id): Made save_id const here.
-
-2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (pixbuf_gen_idle): Don;t destroy the pixbuf
- loader, unref it instead.
-
- * mail-config.c (mail_config_folder_to_cachename): Use
- camel_folder_get_uri().
-
-2001-09-15 <NotZed@Ximian.com>
-
- * mail-vfolder.c: Major rewrite of most of the guts, handle
- changes based on signals and events, etc. Use the main storage
- handling code that imap uses, etc.
-
- * mail-tools.c (mail_tool_uri_to_folder): Dont special case
- vfolder: anymore.
-
- * component-factory.c (owner_set_cb): use vfolder_load_storage(),
- new function to setup vfolder storage, after interaction has been
- enabled only. This might need some tweaking ...
- (storage_remove_folder): Removed all the folder lookup stuff.
- Just delete the folder based on the path passed in. There should
- be no reason this wouldn't work, right?
-
-2001-09-14 <NotZed@Ximian.com>
-
- * mail-ops.c (get_folderinfo_get): Only add vtrash folder info, if
- store supports vtrash.
-
- * component-factory.c (mail_load_storage_by_uri): Let 'vfolder'
- stores show up too.
-
-2001-09-13 <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_uri_to_folder): Open a vfolder then set
- its expression, since name?query open method is removed.
-
-2001-09-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * subscribe-dialog.c (fe_root_value_at): Return the cached value
- of camel_service_get_name so that we don't leak memory.
- (fe_real_value_at): Don't strdup the node's name.
- (folder_etree_construct): Set the service_name.
- (fe_destroy): Free the service_name.
-
- * mail-ops.c (add_vtrash_info): Free the temporary path variable
- here.
-
- * subscribe-dialog.c (store_data_new): Added a refcount variable
- so set the refcount to 1.
- (sd_got_store): Unref the store-data.
- (store_data_async_get_store): Ref the store-data.
- (store_data_ref): New function.
- (store_data_unref): New function.
- (subscribe_dialog_destroy): Instead of freeing the store-data
- here, unref it instead. We may just have an async function
- running. Set the callback function to NULL so that when the
- (remaining) async functions finish, they become no-ops.
-
- * mail-send-recv.c (build_dialogue): Revert my bar_destroy code
- and replace it with dialog_destroy instead.
-
- * mail-ops.c (mail_send_message): Append a message to any
- exception we get appending to any folders after having sent the
- message successfully saying that the message was sent successfully
- so the user doesn't misinterpret the error.
-
-2001-09-13 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Fixed double-freeing of
- EDestination vector when sending html mail to people who don't
- necessarily want it. Fixes bug #9848.
-
-2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * subscribe-dialog.c (get_short_folderinfo_desc):
- (get_short_folderinfo_get):
- (get_short_folderinfo_got):
- (get_short_folderinfo_free):
- (subscribe_get_short_folderinfo): Modified to take a FolderETree
- instead of a CamelStore (since the CamelStore is inside the
- FolderETree anyway) so that we could ref the ETree to prevent a
- race condition. Should fix bug #9827.
-
- * mail-format.c (try_inline_pgp_sig): Make sure that the
- charset_filter is non-NULL before using it since iconv may fail.
-
-2001-09-13 Larry Ewing <lewing@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): free the credits string.
-
-2001-09-12 <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_remove_cb): Fixed the remove callback
- prototype, and return the result properly using the listener.
- (vfolder_uri_to_folder): Always use the same store uri, so we dont
- create a new store for each folder.
-
-2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write_on_exit): Save transport
- passwords too. This fixes bug #3020.
-
-2001-09-11 Dan Winship <danw@ximian.com>
-
- * mail-folder-cache.c (mail_folder_cache_note_folderinfo): Don't
- set the folderinfo's unread count to 0 when camel reports -1,
- since that may overwrite a valid unread count from before.
- (get_folder_info): Do it here instead when first creating a new
- folderinfo structure.
- Should fix bug #1756.
-
-2001-09-11 Larry Ewing <lewing@ximian.com>
-
- * mail-account-gui.c (menu_file_save_cb): call menu_file_save_error
- when there is an exception while saving.
- (menu_file_save_error): pop up a dialog telling the user the file
- has not been saved.
-
-2001-09-10 <NotZed@Ximian.com>
-
- * mail-local.c (mail_local_reconfigure_folder): Dynamically create
- the folder type list from camel.
- (reconfigure_clicked): And change code to handle changes.
-
-2001-09-10 <NotZed@Ximian.com>
-
- * merged mail_local patch from peterw. Many changes.
-
-2001-09-10 Iain Holmes <iain@ximian.com>
-
- * mail-config.c (impl_GNOME_Evolution_MailConfig_addAccount): Add a
- none account if the url is empty.
-
-2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Don't use
- new_with_sig_file, that function no longer exists.
- (forward_get_composer): Same here.
-
-2001-09-10 Zbigniew Chyla <cyba@gnome.pl>
-
- * mail-config.c
- (add_shortcut_entry): Marked string for translation.
- (new_source_created): Ditto.
-
- * mail-send-recv.c
- (format_url): Marked strings for translation.
- (build_dialogue): Ditto.
-
-2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Hide the S/MIME frame
- if we don't support S/MIME.
-
- * mail-send-recv.c (build_dialogue): Attach to the destroy event
- for each progressbar using bar_destroyed as the callback.
- (bar_destroyed): New callback to unregister the timeout and set
- the send-info's bar member to NULL so we don't try to update a
- destroyed progressbar.
-
- * mail-callbacks.c (mail_generate_reply): Pass along the right
- string, this fixes bug #9518.
-
- * mail-account-gui.c (save_service): Don't save the authmech if
- the username doesn't exist. Fixes bug #9474.
-
- * mail-callbacks.c (do_edit_messages): Remove some mailer-set
- headers. Fixes bug #9462.
-
-2001-09-10 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Fix obvious dumb
- mistake in previous commit that made it *always* complain you had
- invalid recipients.
-
-2001-09-09 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Complain if we are
- trying to send to invalid recipients. (Bug #8875)
-
-2001-09-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (evolution_mail_config_wizard_factory_fn):
- We need to initialize all of the struct fields or else god knows
- what will happen later when we try to use 'em. Also set a destroy
- function for the MailConfigWizard so we don't leak it.
-
-2001-09-08 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Added.
- Shows a (hopefully) informative dialog warning you that some
- recipients might not want HTML mail (who are listed), and gives
- the option to cancel sending. (FIXME: The wording of this dialog
- could use some work.)
- (composer_get_message): Check if we are sending HTML to someone
- who might not want it, and raise the dialog if we are. Use our
- new destination-vector based api when talking to the composer.
- Touch our destinations here, boosting their use scores. This is
- the right place for this to happen --- closer to the end of the
- sending process, where incorrect/artificial use score inflation is
- less likely to occur.
-
- * mail-config.c (config_read): Added
- /Mail/Format/confirm_unwanted_html key. This flag determines
- whether or not we want to see the warning dialog when we send HTML
- mail to contacts who don't want it. Default is TRUE.
- (mail_config_write_on_exit): Write out the confirm_unwanted_html
- key.
- (mail_config_get_confirm_unwanted_html): Added.
- (mail_config_set_confirm_unwanted_html): Added.
-
-2001-09-08 Dan Winship <danw@ximian.com>
-
- * mail-display.c (mail_display_destroy): Unref the invisible,
- don't just destroy it.
-
-2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_write_authenticity): Give the full path of
- the wax-seal icons.
- (try_inline_pgp_sig): Convert the charset from UTF-8 to whatever
- charset it should be. Now takes a CamelMimePart argument as well.
- (try_uudecoding): Now takes a part argument as well.
- (try_inline_pgp): Here too.
- (try_binhex): And finally here.
- (handle_text_plain): Pass along the mime part to the try_*
- functions.
-
-2001-09-06 Chris Toshok <toshok@ximian.com>
-
- * component-factory.c (notify_listener): new function, to notify
- the bonobo listener in remove_folder/create_folder.
- (storage_create_folder): match EvolutionStorage create_folder
- signal's signature.
- (storage_remove_folder): match EvolutionStorage remove_folder
- signal's signature.
-
-2001-09-06 Dan Winship <danw@ximian.com>
-
- Fix a bunch of replying/forwarding-related formatting bugs.
-
- 2749 - Message text not included in reply, but html attachment is
- 4294 - "forward inline" should quote the same headers as the
- normal mail display
- 6100 - Reply to a forwarded email displays email headers
- 7255 - Replying to HTML message
- 7527 - replying to forwarded message w/ attachments does the wrong
- thing
-
- * mail-format.c (mail_get_message_rfc822): New function to get
- message headers and body together, for inline forwards, or replies
- containing attached messages.
- (mail_get_message_body): Redo this to always return HTML, but keep
- the "want_plain" flag, to decide whether to return HTML that looks
- like HTML or HTML that looks like plain text. Use
- mail_get_message_rfc822 to handle attached message/rfc822 parts.
- Don't include the text of vcard or icalendar attachments. Don't
- fail to include text parts just because we found an HTML part.
- (Since we're always returning HTML now, this doesn't cause
- problems any more.)
-
- * mail-tools.c (mail_tool_quote_message): Simplify greatly.
- mail_get_message_body always returns HTML now, and we let it take
- care of prepending "> "s too. We then let GtkHTML deal with
- converting the HTML to plain text if the user wants to reply in
- plain text.
- (mail_tool_forward_message): Simplify this a ton too: parts of it
- are moved into mail_get_message_rfc822 and parts are now
- unnecessary.
-
- * mail-callbacks.c (do_forward_non_attached): Call
- mail_tool_forward_message here always, and let it do the "> "
- quoting in the "quoted" case, so that we get the headers too when
- forwarding quoted. Related to bug #4294.
-
-2001-09-05 Dan Winship <danw@ximian.com>
-
- * mail-display.c (launch_cb): the "command" of a
- GnomeVFSMimeApplication can include arguments as well. Deal with
- that. Fixes support for CodeWeavers' CrossOver Plugin.
-
-2001-09-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_remove_account): Adjust the
- default_account index correctly.
-
-2001-09-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_accounts): Added a g_assert to
- make sure that config wasn't NULL. This is meant to help debug bug
- #4911 and friends.
-
- * component-factory.c (owner_set_cb): Do not mail_config_init()
- here as we've already called this in main() in main.c.
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #958, ShellComponents should not be created by factories, for
- the mailer case.]
-
- * GNOME_Evolution_Mail.oaf.in: Remove the
- GNOME_Evolution_Mail_ShellComponentFactory.
-
- * component-factory.c: Changed to not use a factory.
- (COMPONENT_FACTORY_ID): Removed.
- (COMPONENT_ID): New.
- (idle_quit): Don't unref the component_factory.
- (create_component): Renamed from `component_fn'. Take no args.
- (component_factory_init): Create the component with
- `create_component' and register it on OAF.
-
-2001-09-06 Radek Doulik <rodo@ximian.com>
-
- * everywhere updated for new mail_content_loaded definition
- (prototype)
-
-2001-09-05 Radek Doulik <rodo@ximian.com>
-
- * mail-display.c (mail_display_redisplay): increase
- redisplay_counter
- (try_part_urls): new helper function
- (try_data_urls): ditto
- (load_content_loaded): if it has stream handle available and if
- it's still valid, it writes to this stream instead of
- redisplaying, uses try_part_urls and try_data_urls
-
- * mail-display.h: added redisplay_counter to MailDisplay, I use
- it in load_content_loaded to be sure that there wasn't any
- redisplay and that remembered handle is still valid
-
- * mail-display.c (on_url_requested): don't end stream with error
- if part is not loaded yet
- (on_url_requested): don't end stream in cases when we are going to
- load image using http
- (stream_write_or_redisplay_when_loaded): new helper function,
- which is extracted from mail_display_redisplay_when_loaded. it's
- extended to handle gtkhtml stream writting
- (mail_display_redisplay_when_loaded): use
- stream_write_or_redisplay_when_loaded
- (mail_display_stream_write_when_loaded): new function, uses
- stream_write_or_redisplay_when_loaded
- struct _load_content_msg: added handle, url and redisplay_counter
- fields
-
- * mail-format.c (mail_content_loaded): added redisplay, url and
- handle parameter for case when we are loading image content and
- want it write to stream instead of redisplaying
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- * message-browser.c (message_browser_new): s/Evolution/Ximian
- Evolution/.
-
-2001-09-04 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #7542, "Crash Afer Closing".]
-
- * component-factory.c (owner_unset_cb): NULL the
- global_shell_client as the first thing here. Otherwise we might
- get into a slight race that causes the shell to crash. [Still, of
- course the shell shouldn't crash, but I haven't been able to track
- that down yet.]
-
-2001-09-04 Zbigniew Chyla <cyba@gnome.pl>
-
- Fixes #7251
-
- * mail-ops.c (add_vtrash_info): Mark "Trash" with U_(), not _().
-
-2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (fetch_mail_fetch): Unref the source folder here
- because it might be a POP folder. We do this because on store
- finalize, we now try to disconnect cleanly which means that we may
- block.
-
- * mail-send-recv.c (build_dialogue): Fix capitalization. Fixes bug
- #7486.
-
-2001-09-04 Peter Williams <peterw@ximian.com>
-
- * mail-local.c (mlf_init): Remove accidentally left-in "choke on
- this" preprocessor thingie.
- (mail_local_folder_reconfigure): Instead of creating our own local
- exception, just assert that ex != NULL.
- (*): Staticize everything that can be and remove some obnoxious
- prototypes.
-
-2001-08-31 Peter Williams <peterw@ximian.com>
-
- * mail-local.c (mail_local_reconfigure_folder): Use (NULL, NULL)
- as the arguments to g_hash_table_new instead of g_direct_foo.
- Instead of checking the URI, check MAIL_IS_LOCAL_FOLDER (fb->folder)
- to check whether we can reconfigure the folder. Instead of
- gnome_dialog_run_and_close, use gnome_dialog_run...
- (reconfigure_clicked): And deal with removing the hash table
- elements here.
- (local_storage_new_folder_cb): Set the folder's name to the
- displayName to i18nize correctly (after shell patch is applied).
-
-2001-08-30 Peter Williams <peterw@ximian.com>
-
- * mail-local.c: Rewrite as a more complete CamelStore.
-
- * component-factory.c (create_folder): We can now chuck out most
- of this function and just call mail_get_folder.
- (xfer_folder_done): If we succeeded in moving the messages, now
- delete the source folder as we should be.
- (xfer_folder): In order to do so, create a new xfer_folder_data
- struct that records the value of 'remove_source' Fix a leak by
- unreffing the source folder.
-
- * mail-ops.[ch]: We no longer need the mail_new_folder operation.
-
- * folder-browser.[ch]: Don't need the 'reconfigure' member
- anymore, because the loaded folder's URL doesn't change.
- (do_message_selected): Don't check it
- (on_right_click): Same.
- (folder_browser_set_uri): Same.
- (got_folder): Same.
-
-2001-08-31 Zbigniew Chyla <cyba@gnome.pl>
-
- * mail-vfolder.c (vfolder_create_storage): Marked string for
- translation (with U_).
-
-2001-08-28 Zbigniew Chyla <cyba@gnome.pl>
-
- * message-list.c (e_mail_address_compare): Use g_utf8_collate
- instead of g_strcasecmp for comparing names.
- (subject_compare): Replaced g_strcasecmp, isspace, var++ with
- UTF-8 counterparts.
-
-2001-08-30 Iain Holmes <iain@ximian.com>
-
- * importer/evolution-mbox-importer.c (load_file_fn): Check if it's
- a folder, if so, create a folder.
- (process_item_fn): If it was a folder created, just finish up
- importing
-
-2001-08-29 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c: Turn off debugging, remove
- spewage.
- (process_item_fn): Notify the importer if the folder isn't opened
- or created yet.
- (load_file_fn): Allow the function to continue if the folder is
- being created.
-
-2001-08-30 Peter Williams <peterw@ximian.com>
-
- Due to the introduction of mail_folder_cache_remove(), we can no
- longer assume that mail_folder_info's always exist, so we need to
- robustify a lot of this.
-
- * mail-folder-cache.c (folder_browser_destroyed): New
- function. Called when the folder browser is destroyed -- analogous
- to camel_folder_finalized.
- (mail_folder_cache_note_fb): Hook it up here.
- (struct _mail_folder_info): Add a member, mail_info_id, that
- records the get_mail operation's id, so that we can cancel it if
- we need to.
- (get_folder_info): Initialize it here.
- (get_mail_info_reply): Clear it here.
- (mail_folder_cache_remove_folder): If necessary, cancel it here.
- (mail_folder_cache_note_folder): Check it here before starting a
- new operation, just in case.
- (update_message_counts_main): Take a URI instead of a
- mail_folder_info *, in case the MFI has gotten destroyed.
- (update_message_counts): Take a quark of the URI instead of a
- mail_folder_info *, for the same reason. We use a quark instead of
- an allocated gchar * because figuring out when to free the string
- gets tricky. Then go from quark -> URI string -> MFI. Return if
- the folder is no longer valid, because this indicates that the MFI
- was removed before this signal got called. Pass a string to
- update_message_counts_main instead of an MFI.
- (camel_folder_finalized): Don't bother unhooking the signals here.
- Same change as above, but don't bother checking for a valid folder
- because we're about to make it invalid anyway.
- (message_list_built): Analogous to the above, except with the
- FolderBrowser instead of the CamelFolder.
- (selection_changed): As above.
- (folder_browser_destroyed): As above.
- (struct get_mail_info_msg): Instead of taking a mail_folder_info
- *, take a URI, for reasons explained above.
- (get_mail_info_receive): Go from URI -> MFI before doing anything.
- (get_mail_info_reply): Same.
- (get_mail_info_destroy): Free the URI.
- (get_mail_info): Take a URI and return the message id so that it
- can be cancelled if necessary.
- (mail_folder_cache_remove_folder): Disconnect from signals and
- events before removing.
- (mail_folder_cache_note_folder): Use a GQuark instead of the
- mail_folder_info * as the user_data.
- (mail_folder_cache_note_fb): Same.
- (mail_folder_cache_note_folderinfo): Little formatting change.
-
-2001-08-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-browser.c (message_browser_message_loaded): Fixed a
- memory leak.
- (message_browser_new): Added a comment as to why , after
- reparenting, we do not unref the mail_display.
- (message_browser_destroy): Don't call gtk_widget_destroy() on the
- message_list here.
-
-2001-08-30 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (remove_folder_get): Instead of removing the folder
- from the folder cache here...
- (remove_folder_got): ... do it here, in the main thread.
-
-2001-08-29 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (composer_get_message): When calling
- e_msg_composer_get_message, pass in TRUE for the 'sending' arg.
- (Part of the fix for bug #8332)
-
-2001-08-29 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c: Fix the pixmap for /commands/MessageUndelete.
-
- * component-factory.c (owner_set_cb): Toss in a call to
- mail_config_init () cause it might contribute to solving
- bug 4911, and it won't hurt.
-
-2001-08-28 Peter Williams <peterw@ximian.com>
-
- * component-factory.c (owner_unset_cb): Disable interaction once
- the shell has quit.
- (create_view): Instead of
- folder_browser_factory_new_control ("", corba_shell) when looking
- at a mailstorage folder, use create_noselect_control().
-
-2001-08-27 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-local.c: Match the studlyCapsification of
- shell/Evolution*.idl.
-
- * mail-config-druid.h: Change type of `event_source' from
- `Bonobo_EventSource *' to `Bonobo_EventSource'.
-
- * mail-accounts.c (mail_delete): Remove unused local variable
- `label'.
-
- * folder-info.c (do_get_info): `#if 0' unused variables.
-
-2001-08-27 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Check if we are trying
- to reply to a message with no From: field, and try to do something
- graceful in that case. (Bug #7028)
-
- * mail-display.c (ebook_callback): Add paranoid checks for the
- case of a message with a From: field. (Also maybe bug #7028)
-
-2001-08-27 Iain Holmes <iain@ximian.com>
-
- * mail-config-druid.c (druid_finish): Free the list and hash table.
- (druid_cancel): Free the list and hash table.
-
-2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Set the source and
- transport description labels.
- (transport_type_changed): Set the transport description label.
- (source_type_changed): Set the source description label.
-
- * mail-tools.c (mail_tool_make_message_attachment): Remove
- X-Evolution* headers.
- (mail_tool_remove_xevolution_headers): New function to convenience
- removing the X-Evolution headers.
- (mail_tool_restore_xevolution_headers): New convenience function
- to restore the X-Evolution headers.
- (mail_tool_destroy_xevolution): New function to cleanup the
- structure.
- (mail_tool_forward_message): Remove and restore the X-Evolution
- headers here too.
-
-2001-08-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (receive_update_got_store): If the store is not
- connected, scan it's subfolders first.
-
- * mail-ops.c (report_status): Call va_end() so LinuxPPC doesn't
- have a caniption.
-
-2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (launch_cb): Use the new e_mkdtemp function.
-
- * folder-browser.c (message_list_drag_data_get): Use the new
- e_mkdtemp function.
-
-2001-08-24 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #8024, Empty strings marked for translation.]
-
- * component-factory.c: Don't mark empty strings for translation.
- Rather, give descriptions and display names to types "mailstorage"
- and "vtrash".
-
-2001-08-24 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (remove_folder_get): Save the folder's full_name,
- unref it, and *then* unref the store, so that the folder has been
- closed before it gets deleted.
-
-2001-08-24 Peter Williams <peterw@ximian.com>
-
- * mail-config.c (add_shortcut_entry): Instead of using the length
- of the shortcuts list as the index for the shortcut, use -1, which
- means "last".
-
- * mail-config-druid.c (druid_finish): Remove the account adding
- stuff since that happens in wizard_finish now.
-
- * mail-config.c (add_new_storage): New function. Add a
- MailConfigAccount to the shell as a storage.
- (maybe_add_shortcut): Renamed to new_source_created.
- (new_source_created): Call add_new_storage here.
-
- * component-factory.c (mail_remove_storage_by_uri): Don't warn if
- the storage isn't remote... no point in making the caller do extra
- work.
-
-2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_set_thread_list): Don't let the uri
- be an empty string (how the fuck is this even happening in the
- first place??).
- (mail_config_get_thread_list): Same.
- (mail_config_set_show_preview): And here.
- (mail_config_get_show_preview): And finally here.
-
-2001-08-23 Larry Ewing <lewing@ximian.com>
-
- * mail-search.c (mail_search_construct): attach to the destroy
- handler to reset the tokenizer.
- (dialog_destroy_cb): reset the tokenizer here so that destroying
- the dialog with the window manager still clears the hilighted
- items.
-
-2001-08-23 Peter Williams <peterw@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Eek, let the user create
- new accounts if old_account == NULL.
-
-2001-08-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (destination_folder_handle_drop): Check to
- make sure we actually have drag data.
-
- * folder-browser.c (message_list_drag_data_received): Check to
- make sure we have valid data.
-
-2001-08-21 Christopher James Lahey <clahey@ximian.com>
-
- * Revert fix for Ximian bug #6995.
-
-2001-08-23 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (maybe_update): Record the timeout_id so we
- can cancel it if the mail_folder_info is later freed. Also obviates
- the use of the _UPDATE_QUEUED flag.
- (mail_folder_cache_remove_folder): Cancel the timeout if we need to.
- Lock around the hash table operations. Free mfi itself. Add debugging
- spew.
- (get_folder_info): Initialiae the timeout_id to 0.
-
-2001-08-22 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c (ask_confirm_for_only_bcc): Provide alternative
- text for this dialog for the case when a message has only Bcc
- recipients because of a hidden contact list's addresses being
- moved from To/Cc to Bcc.
- (composer_get_message): Try to detect when our message has only
- Bcc recipients because of moving addresses around due to a hidden
- contact list, and show the dialog with the revised wording in this
- case.
-
-2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (create_view): Don't blindly make all vtrash
- folder types have a uri of vtrash:file:/, instead only make it use
- vtrash:file:/ if it's a file: uri, else use physical_uri.
-
-2001-08-22 jacob berkman <jacob@ximian.com>
-
- * mail-display.c: rework how the e-card-popup thing has its life
- managed. we now hide the window on the Hide event and destroy it
- on the Destroy event emitted from its event source
-
-2001-08-22 Peter Williams <peterw@ximian.com>
-
- * mail-send-recv.c (set_send_status): We don't need to escape this
- for printf'ing.
-
-2001-08-22 Peter Williams <peterw@ximian.com>
-
- Prevent the user from creating two accounts with the same name.
-
- * mail-config.c (impl_GNOME_Evolution_MailConfig_addAccount):
- Abort if the account has the same name as another account.
-
- * mail-account-gui.c (mail_account_gui_save): Don't let the user
- save if the account has the same name as another account.
-
- * mail-config-druid.c (management_check): Disable the next button
- if the account name is the same as a preexisting account.
- (construct): The only part of 'pages' that was being used was the
- name. 'wizard_pages' now has the callbacks, while 'pages' is just
- an array of char *'s.
- (wizard_finish_cb): Save the account first because that's the
- right way, and try to honor mail_account_gui_save's return value.
-
- * mail-config.glade: Add a label noting that you're not allowed to
- create two accounts with the same name.
-
-2001-08-22 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c (fbui_sensitize_timeout): Check for NULL uic
- here as well.
- (fbui_sensitize_items): Up the timeout interval to 110 ms.
-
-2001-08-21 Peter Williams <peterw@ximian.com>
-
- * mail-account-editor.c (apply_changes): Honor the return value of
- mail_account_gui_save.
-
- * mail-ops.c (sync_folder_desc): Say which folder is getting
- saved.
-
-2001-08-21 Dan Winship <danw@ximian.com>
-
- * mail-identify.c (mail_identify_mime_part): Don't trust gnome-vfs
- when it says "text/plain" if gnome_vfs_mime_type_from_name says
- something different. Fixes a problem with recognizing icalendar
- attachments labeled "application/octet-stream". Also, don't bother
- asking gnome-vfs about winmail.dat attachments, since it will
- often claim that they're MPEGs due to some mis-magic.
-
-2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (mail_session_forget_password): zero-ize the
- password before freeing.
- (forget_password): Same.
-
-2001-08-21 Peter Williams <peterw@ximian.com>
-
- * message-list.c (message_list_set_folder): Don't sink the extras
- since _set_folder can get called more than once (on reconfigure.)
- (message_list_destroy): So just unref the extras here.
-
- * mail-send-recv.c (build_dialogue): Treat the spool provider like
- IMAP: update instead of performing an explicit receive.
-
-2001-08-21 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c (fbui_sensitize_items): Rename to
- fbui_real_sensitize_items. Now we queue a change and set up a
- timeout, making sure weed out redundant changes, fixing flicker.
- (fbui_sensitize_timeout): New function. The timeout.
- (fbui_real_sensitize_items): Semi-new function. Rename of old
- fbui_sensitize_items.
- (folder_browser_ui_set_selection_state): Pass the FB instead of
- only the UIC to sensitize_items.
- (folder_browser_ui_message_loaded): Same.
-
- * folder-browser.c (folder_browser_destroy): Kill the new timeout
- if it is registered.
-
- * folder-browser.h: Add some members to FolderBrowser for keeping
- track of the queue of changes.
-
-2001-08-20 Iain Holmes <iain@ximian.com>
-
- * mail-config.druid: Fix the jumping around.
-
-2001-08-20 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (remove_folder_get): Fix double-unref of the store.
-
-2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (create_folder): Modify the url and set the
- protocol to mbox rather than hacking it and prepending mbox: to
- the uri.
-
- * mail-local.c (get_folder): Don't prepend the folder_name with
- the store's path because the hash key is folder_name, not
- /folder_name.
-
-2001-08-20 Iain Holmes <iain@ximian.com>
-
- * mail-config-druid.c: Change some of the text labels.
- (create_label): Make a label instead of a GtkHTML widget.
-
-2001-08-18 Iain Holmes <iain@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_setup): Stop hiding the source
- and transport frames.
-
-2001-08-20 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-ui.c (folder_browser_setup_property_menu):
- Updated as ChangeFolderProperties is now in the
- ComponentPlaceholder.
-
-2001-08-20 Peter Williams <peterw@ximian.com>
-
- * mail-accounts.c (mail_able): Whoops, make sure that the account
- has a source before removing it or what-have-you.
-
- * subscribe-dialog.c: Add a few comments.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * folder-browser-ui.c: use new small trash icon for Delete command.
-
-2001-08-20 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-ops.c (sync_folder_desc): s/Synchronising/Synchronizing/.
-
-2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (storage_create_folder):
- camel_folder_create_folder can now return a heirachial tree so
- subscribe to down the tree.
-
-2001-08-20 Damon Chaplin <damon@ximian.com>
-
- * folder-browser-ui.c: use new Cut/Copy/Paste icons.
-
-2001-08-19 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c: Update the folder list to include a display
- name and a description.
-
-2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (do_op_status): Allow the activity to be NULL if there
- isn't a global_shell_client so that we don't try and report status
- updates when the shell is destroyed.
-
- * mail-config.c (add_shortcut_entry): Return if there isn't a
- global_shell_client.
-
- * component-factory.c (owner_set_cb): set the global_shell_client
- here and connect to the destroy signal.
-
- * mail-vfolder.c (vfolder_create_storage): Use an extern
- global_shell_client.
-
-2001-08-19 Christopher James Lahey <clahey@ximian.com>
-
- * mail-callbacks.c (delete_msg): Made delete make the cursor go
- backwards if the user is sorting by descending date. Fixes Ximian
- bug #6995. (Reverted.)
-
-2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
-
- Note: The following changes were based on Zbigniew Chyla's fixes.
-
- * mail-callbacks.c (mail_generate_reply): Convert the date string
- to UTF-8.
- (do_forward_non_attached): Same here.
-
-2001-08-05 Zbigniew Chyla <cyba@gnome.pl>
-
- * folder-info.c: Added missing #include <config.h>. (applied by Damon)
-
-2001-08-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (config_read): Change the default values for
- "always-sign" to false.
-
- * mail-callbacks.c (open_msg): if the folder is Outbox, let the
- user edit the message(s) too I guess.
-
-2001-08-18 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-ui.c: Hook the new `delete-message.png' up.
-
-2001-08-17 Damon Chaplin <damon@ximian.com>
-
- * mail-display.c (pixmap_press): stop signal emission so the GtkButton
- class method doesn't mess up the popup menu. Hopefully fixes bug #1828.
-
-2001-08-17 Zbigniew Chyla <cyba@gnome.pl>
-
- * mail-search.c (mail_search_construct): Put _() instead of N_()
- around of the "Search" string, gnome_dialog_constructv doesn't
- translate button names.
-
-2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_write_authenticity): We want wax-seal.png
- instead, since I added the png files to cvs and renamed it to
- wax-seal.png.
-
-2001-08-17 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Fix
- warnings.
-
-2001-08-17 JP Rosevear <jpr@ximian.com>
-
- * component-factory.c (owner_set_cb): don't init the config here
-
- * main.c (main): init the config here
-
-2001-08-17 JP Rosevear <jpr@ximian.com>
-
- * mail-config-druid.c: remove dead structure
-
-2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write): Save the always-sign options
- for pgp and smime.
- (config_read): Read in the always-save options for pgp and smime.
-
-2001-08-17 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.etspec: Made the default values for column
- expansions here more reasonable.
-
-2001-08-16 Iain Holmes <iain@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Add the Wizard stuff.
-
- * component-factory.c (component_fn): Init the Wizard factory.
- (mail_load_storages): Check service isn't NULL before it's been
- dereferenced.
-
- * mail-account-gui.c (mail_account_gui_setup): Only show the top level
- widget is it's not NULL.
- Change the gtk_widget_set_usizes to gtk_widget_hides.
-
- * mail-config-druid.c: Rewrite to use the EvolutionWizard stuff.
-
- * mail-config-druid.h: Add stuff to the MailConfigDruid struct.
-
- * mail-config.c (mail_config_get_default_account): Init the config if
- it's not been inited.
-
-2001-08-16 Jason Leach <jleach@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): Only starting cutting
- the signature out when we match "-- \n", so "--\n" in the middle
- of a mail won't omit the rest for a quoted reply. Bug #7454.
-
-2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (confirm_expunge): Respect the user's desire to
- be prompted to confirm that he wants to expunge the blasted
- folder. Also, don't set the usize - that's just an evil hack and
- you may find it will cut off text once the label has been
- translated.
- (create_msg_composer): In order for the security options to be
- checked when composing a new message, we must set the from account
- explicitly even though the composer hdrs sets the default from
- account and emits the signal because at that stage the composer
- hasn't yet connected to the signals and thus the bonobo menu items
- don't get set.
-
- * mail-config.c (mail_config_set_confirm_expunge): New.
- (mail_config_get_confirm_expunge): New.
-
-2001-08-16 Peter Williams <peterw@ximian.com>
-
- * subscribe-dialog.c (fe_got_children): Sort the nodes here...
- (fe_sort_folder): ... using this function.
-
- * folder-browser-ui.c (folder_browser_ui_message_loaded): Check
- for uic == NULL. I'm not sure how this could happen, but...
-
-2001-08-16 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c (folder_browser_ui_set_selection_state):
- Disable "Search Message" when more or less than exactly one
- message is selected.
-
- * subscribe-dialog.c (fe_done_subscribing): Instead of hackfully
- getting the path, use a CamelURL so that escaping is
- handled. Silly me. -- See below --
- (fe_node_to_shell_path): Use node->name and node->full_name to
- generate the the shell path of this item. Don't need to escape the
- URL, and handle cases when dir_sep != '/'
- (fe_done_subscribing): Use fe_node_to_shell_path instead of the
- CamelURL. Third time's the charm... * folder-browser-ui.c
- (folder_browser_ui_set_selection_state): Disable "Search Message"
- when more or less than exactly one message is selected.
-
- * subscribe-dialog.c (fe_done_subscribing): Instead of hackfully
- getting the path, use a CamelURL so that escaping is
- handled. Silly me. -- See below --
- (fe_node_to_shell_path): Use node->name and node->full_name to
- generate the the shell path of this item. Don't need to escape the
- URL, and handle cases when dir_sep != '/'
- (fe_done_subscribing): Use fe_node_to_shell_path instead of the
- CamelURL. Third time's the charm...
-
-2001-08-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (save_part): Remember the filename is in utf8, so
- use the e_utf8 functions to set the filename in the file selection
- dialog.
-
-2001-08-15 Peter Williams <peterw@ximian.com>
-
- * message-list.c (on_cursor_activated_idle): Always remove the
- idle and return FALSE, instead of returning TRUE if more than one
- message is selected.
-
-2001-08-15 Jason Leach <jleach@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): Stop building the quote
- after a sigdash, hence, omitting the signature from a
- reply/forward. Bug #5529.
-
-2001-08-15 Anna Marie Dirks <anna@ximian.com>
-
- * mail-callbacks.c (expunge-folders): Re-added, at Ettore's
- request, the confirm-expunge dialog.
-
-2001-08-15 Jason Leach <jleach@ximian.com>
-
- * message-list.c (message_list_init): Use ALWAYS for scroll frame
- policy because ETable acts lame with AUTOMATIC. Bug #6925.
-
-2001-08-16 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (expunge_folder): Don't confirm expunge.
-
-2001-08-15 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (register_folder_register): Remove operation
- registration/etc. Handled by mail-mt.c
-
- * message-list.c (regen_list_regen): Remove camel operation
- registration/etc.
-
-2001-08-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (load_accounts): Convert the UTF-8 account name
- string into a gtk-string before using it in the GtkCList.
-
-2001-08-14 Peter Williams <peterw@ximian.com>
-
- * mail-callbacks.c (previous_unread_msg): Make previous unread
- wrap around too.
-
- * mail-accounts.c (load_accounts): If the account is enabled,
- set a checkmark pixmap instead of a strange plus sign.
- (mail_accounts_dialog_init): Load the pixmap here.
- (mail_accounts_dialog_finalise): Free it here.
-
- * mail-accounts.h: Prototype it here.
-
-2001-08-14 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (message_list_drag_data_get): Fix the fix for
- #6722.
-
- * mail-ops.c (save_messages_save): Likewise.
- (save_part_save): Deal with the possibility that
- camel_mime_filter_charset_new_convert will return NULL (bad
- charset name). Fixes #6611.
-
-2001-08-13 Jon Trowbridge <trow@ximian.com>
-
- * mail-search.c (mail_search_construct): Disable the "search
- forward/backward" option in the search dialog. Why? Well, it
- doesn't work properly (bug #4869), and the reason it doesn't work
- is because of some scary stuff deep inside of gtkhtml that I don't
- understand at all. So since I'm paranoid, and since the GUI
- freeze is tomorrow, and since it isn't really an important feature
- at all, I'm #if 0-ing it out. If the gtkhtml stuff gets sorted
- out, we can slip it back in for 1.1.
-
-2001-08-13 Peter Williams <peterw@ximian.com>
-
- * component-factory.c (user_create_new_item_cb): New function,
- handle "user creatable items".
- (component_fn): Tell the shell that we're capable of creating
- mail messages.
-
-2001-08-13 Jason Leach <jleach@ximian.com>
-
- * mail-local.c (get_folder): Fix this so it can actually get
- folders from the hash of folders on the local store (it was
- looking up plain @folder_name, which is typically "mbox", instead
- of the full URI, /home/jleach/evolution/local/Foo/mbox).
-
- * component-factory.c (do_remove_folder): Rename to
- remove_folder_done, more fitting for it's purpose.
- (do_xfer_folder): Similar name change.
- (do_create_folder): Similar name change.
- (remove_folder): Don't notifyResult for the component here, we
- will notify with our result in remove_folder_done.
- (xfer_folder): Ditto.
-
- * mail-vfolder.c (vfolder_refresh): Create new folders with unread
- counts of "0" instead of #FALSE (which just happens to be #defined
- as zero).
-
-2001-08-13 Peter Williams <peterw@ximian.com>
-
- * mail-send-recv.c (mail_autoreceive_setup): Break most of the
- functionality into a separate function.
- (autoreceive_setup_list): Rename of mail_autoreceive_setup that is
- passed a list of accounts.
- (mail_autoreceive_setup_account): New function. Set up a single
- account using autoreceive_setup_account.
-
- * mail-send-receive.h: Prototype mail_autoreceive_setup_account.
-
- * mail-account-gui.c (mail_account_gui_save): Instead of setting
- up all accounts, set up only this source with the new
- mail_autoreceive_setup_account.
-
- * mail-config-druid.c (druid_finish): ... which means we can call
- mail_config_add_account() after the MailConfigAccount has been
- created by mail_account_gui_save() because we no longer need the
- account to be in the list for mail_autoreceive_setup()
-
- * mail-config.c (mail_config_add_account): ... which means we can
- possibly add a shortcut to the account's sources's Inbox here.
- (maybe_add_shortcut): New function. If the store is a storage, add
- a shortcut to its inbox. Hope that /INBOX exists.
- (add_shortcut_entry): New function. Creates a shortcut if it doesn't
- yet exist.
-
-2001-08-13 Peter Williams <peterw@ximian.com>
-
- * mail-account-gui.c (service_complete): Take account of the fact that
- service->path may be NULL (if service is a transport.)
-
- * mail-config-druid.c (druid_finish): Bleah, bugfix in case the
- account has no source.
-
-2001-08-13 Anna Marie Dirks <anna@ximian.com>
-
- * mail-config.glade: Changed all instances of "Wizard" and "Druid"
- to "Assistant".
-
- * mail-config-druid.c: Ditto.
-
-2001-08-13 Anna Marie Dirks <anna@ximian.com>
-
- * mail-accounts.c: Changed the title of the Mail Settings
- dialog from "Evolution Account Manager" to "Mail Settings" .
-
-2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (get_message_uid): Do some g_assert()
- action. Make sure that the node passed in is non-NULL and also
- make sure that the CamelMessageInfo gotten from the ETree is
- non-NULL.
- (get_message_info): Same here.
-
- * mail-callbacks.c (expunge_folder): Confirm that the user really
- wants to expunge.
- (save_msg_ok): Set the parent window here.
-
-2001-08-13 Peter Williams <peterw@ximian.com>
-
- * mail-config.c (remove_account_shortcuts): Remove the shortcuts
- corresponding to an account (they all point to
- evolution:/accountname/..)
- (mail_config_remove_account): When deleting the account, remove
- its shortcuts.
-
-2001-08-10 Peter Williams <peterw@ximian.com>
-
- * mail-config-druid.c (druid_finish): Whoa, fatal typo. Sorry.
-
-2001-08-13 Jason Leach <jleach@ximian.com>
-
- * mail-local.c (init_trash): Tell folder cache the path for our
- Trash is /Trash, because that's what Shell needs to hear for
- updating folders.
-
-2001-08-11 Jason Leach <jleach@ximian.com>
-
- * mail-offline-handler.c (impl_goOnline): Set the session as
- online so auto mail checking (and the composer) will be doing the
- right things when you go online. Bug #6343 and #4601.
-
- * folder-browser.c: Make the right click "Resend..." into "Edit as
- New Message...", bug #6838.
-
- * mail-accounts.h: Remove unecessary #include <camel.h>
-
- * mail.h: Removed a prototype for a non-existant
- mail_view_create().
-
-2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (build_auth_menu): Fix bug #4523 for good.
- (save_service): If service->authitem is NULL, then the user tried
- to enable authentication but the provider doesn't actually support
- it.
-
-2001-08-10 Jon Trowbridge <trow@ximian.com>
-
- * folder-browser.c: Set our ESearchBarItems subitems to NULL.
-
-2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Prepend the uri with evolution:
- to fix bug #6916.
-
-2001-08-10 Jason Leach <jleach@ximian.com>
-
- * folder-browser.c: Make the context menu for the Sent folder have
- "Resend..." instead of "Resend", to clarify that it will bring up
- a dialog needing your input rather than just blindly sending the
- message again. Also give it the 'e' accelerator. Bug #6838.
-
- * mail-callbacks.c (next_unread_msg): Since 'N' keypresses go
- through here now, use wrap-around selecting.
- (previous_unread_msg): Same for 'P' here.
-
- * message-list.c (on_cursor_activated_idle): Stop this idle timer
- when we have multiple items selected, this keeps it from loading
- and then marking the last item in your selection list as read.
- Bug #4693.
-
-2001-08-10 Peter Williams <peterw@ximian.com>
-
- * mail-accounts.c (mail_delete): Don't remove the account from the
- tree if it's not enabled.
-
-2001-08-10 Jason Leach <jleach@ximian.com>
-
- * mail-ops.c (remove_folder_get): Remove all the messages from a
- folder that's being deleted before actually doing the
- camel_store_delete_folder, so it won't leave behind an mbox file
- that's going to prevent the actual directory from being deleted,
- and strange effects like new folders with the same name being made
- in it's place. Bug #5618.
-
- * mail-folder-cache.c (mail_folder_cache_remove_folder): New
- function, a way to get something out of the folder cache, like
- folders being deleted. Bug #6878.
-
-2001-08-10 Peter Williams <peterw@ximian.com>
-
- * mail-accounts.c (news_add_destroyed): Whoops, compile fix.
-
-2001-08-10 Jason Leach <jleach@ximian.com>
-
- * mail-callbacks.c (mark_as_unseen): If marking messages as
- unread, remove the automatic mark-as-read timer. Bug #4153.
-
-2001-08-08 Peter Williams <peterw@ximian.com>
-
- * component-factory.c (mail_load_storages): Don't load the storage
- if it isn't enabled.
- (mail_remove_storage_by_uri): New function. Goes through the
- gymnastics of getting a CamelStore from the URI and calling
- mail_remove_storage. Copied from mail_delete().
- (mail_load_storage_by_uri): Break out the storage-loading part of
- mail_load_storages into a single function.
- (mail_load_storages): Just call mail_load_storage_by_uri several
- times.
-
- * mail.h: Prototype our new _by_uri functions.
-
- * mail-accounts.c (news_add_destroyed): Instead of hacking around
- mail_load_storages, call mail_load_storage_by_uri.
- (mail_delete): Move this chunk of code into
- mail_remove_storage_by_uri.
- (mail_able): Add or remove the storage as necessary, with our
- new _by_uri functions.
-
- * mail-config-druid.c (druid_finish): See news_add_destroyed above.
-
-2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_show_preview): Free dbkey if we
- don't use it.
-
- * folder-browser.c (on_right_click): Added a comment about leaking
- memory here, but we seem to not even use the 2 strings we
- strdup...is this code still under construction?
-
- * mail-ops.c (mail_send_message): Free the sent_folder_uri at the
- bottom of the function (ironically enough we were freeing it if we
- encountered an error but never free'd it on success :-)
- (get_folderinfo_got): Fixed a memory leak...this one would have
- gone away once we got rid of the debug g_warning though.
-
-2001-08-10 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (mail_transfer_messages): Dont want it to keep on
- running if it got bad arguments, want it to bloody well crash.
- (mail_append_mail): Same here.
-
-2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (mlfe_callback): Added a g_assert_not_reached() -
- I'm hoping this will help us track down the "can't delete message
- sometimes" (ie bug #6637 and friends) bugs that users have been
- reporting. If herein lies the problem, then we can expect some
- crashes and some good backtraces, hopefully.
-
-2001-08-09 Peter Williams <peterw@ximian.com>
-
- * folder-browser.c (on_key_press): The bonobo menu items now
- handle 'n' and 'p'.
- (on_key_press): 'q' as well.
-
- * message-list.c (message_list_select): Fix inline documentation.
-
-2001-08-09 Anna Marie Dirks <anna@ximian.com>
-
- Fixes bug #6918
-
- * folder-browser.c: Changed the "Store search as vFolder" menu
- item to "Create vFolder from Search".
-
-2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
-
- Fixes bug #6722
-
- * mail-ops.c (save_messages_save): Don't set the default perms
- here, let the user's umask deal with permissions.
-
- * folder-browser.c (message_list_drag_data_get): Don't set any
- default perms.
-
-2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Save the pgp and
- smime always-sign options.
-
- * mail-config.c (account_copy): Copy the always-sign options over
- too.
-
-2001-08-08 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (send_mail_send): Dont double-register this
- operation, mail-mt will do it for us.
- (get_folderinfo_get): "
- (get_folder_get): "
- (get_store_get): "
- (create_folder_get): "
- (remove_folder_get): "
- (sync_folder_sync): "
- (get_message_get): "
-
- * message-list.c (message_list_setup_etree): Free the etstate
- object after we're done using it.
-
-2001-08-08 Peter Williams <peterw@ximian.com>
-
- * subscribe-dialog.c (sc_selection_changed): New function. Set the
- sensitivity of the subscribe buttons based on whether any folders
- are selected.
- (menu_item_selected): If getting the widget for the first time,
- hook up sc_selection_changed.
-
-2001-08-08 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (mail_update_subfolders): Change this gtk_object_ref
- on the storage to a bonobo_object_ref.
-
- * component-factory.c (mail_lookup_storage): And here.
-
- * mail-vfolder.c (mail_vfolder_get_vfolder_storage): And here.
-
-2001-08-07 Ettore Perazzoli <ettore@ximian.com>
-
- * message-browser.c (set_bonobo_ui): Remove the "Customize
- Toolbar" thing.
-
-2001-08-07 Not Zed <NotZed@Ximian.com>
-
- * mail-config.c (mail_config_get_thread_list): Free the dbkey if
- we found the config option.
-
- * mail-send-recv.c (build_dialogue): Free the pretty_url after
- we've used it.
- (free_send_info): Free the 'what' string.
- (receive_done): Use free_send_info to make sure we free
- everything.
-
- * mail-ops.c (send_queue_free): Unref the filter driver when done.
- (send_queue_send): Unref the driver here too, force any long
- taking operations to run in our thread.
-
-2001-08-07 Peter Williams <peterw@ximian.com>
-
- * Revert Jeff's changes to subscribe-dialog.[ch]. It's not a widget,
- it's an object from which you can obtain a widget.
-
-2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (manage_subscriptions): Hide the app->window.
- (do_mail_print): Set the parent of the gnome-dialog to be the
- folder-browser so that when evolution is closed, the print dialog
- gets destroyed. Should fix bug #4781.
-
- * subscribe-dialog.c (subscribe_dialog_new): This should return a
- GtkWidget not a GtkObject.
-
- * mail-session.c (get_filter_driver): Update to use user's logging
- preferences.
-
- * mail-accounts.c (filter_log_toggled): New.
- (filter_log_path_changed): New.
- (construct): Get and attach signals to the filter logging option
- widgets.
-
- * mail-config.c (config_read): Read in filter logging options.
- (mail_config_write_on_exit): Save filter logging options.
- (mail_config_set_filter_log_path): Implemented.
- (mail_config_get_filter_log_path): Implemented.
- (mail_config_set_filter_log): Implemented.
- (mail_config_get_filter_log): Implemented.
-
-2001-08-07 Peter Williams <peterw@ximian.com>
-
- * subscribe-dialog.c (folder_etree_construct): Move
- fe_create_root_node farther down, so we can check for its children
- without problems.
-
- * mail-callbacks.c (folder_created): Use bonobo_object_unref on
- the storage since it's a bonobo object.
- (mail_storage_create_folder): Same.
- (folder_deleted): Same.
-
- * mail-send-recv.c (receive_update_got_store): Same.
-
- * mail-ops.c (do_update_subfolders): Same.
-
- * subscribe-dialog.c (fe_destroy): Unref the e_storage since
- lookup_store gives us a ref.
-
-2001-08-07 Peter Williams <peterw@ximian.com>
-
- * subscribe-dialog.c (folder_etree_construct): Move
- fe_create_root_node farther down, so we can check for its children
- without problems.
- (storage_tree_path): Removed, this was broken.
- (subscribe_get_short_folderinfo): Use the queued thread instead of
- the new thread.
- (subscribe_do_subscribe_folder): Same.
- (ftree_node_new_root): Don't create the path anymore; it was
- broken and there's a better way to get it now.
- (fe_got_children): Remove some debugging output.
- (fe_check_for_children): Here too.
- (fe_done_subscribing): Get the path from the URI instead of the
- ftree_node.
- (_SubscribeDialogPrivate): Add all of our useful widgets as
- members.
- (sc_refresh_pressed): Don't clear the search... that makes no
- sense now.
- (sc_search_activated): Don't set the filter radio button as active
- now; we use sensitivity instead.
- (sc_all_toggled): Make the search entry insensitive.
- (sc_filter_toggled): Make the search entry sensitive.
- (kill_default_view): New function. Gets rid of the default view
- stuff and makes all the widgetry sensitive.
- (menu_item_selected): Check if we moved off of the default view
- and, if so, call kill_default_view().
- (subscribe_dialog_construct): Initialize our new private widget
- members, and by default insensitize most of the buttons because
- they make no sense in the default view.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.glade: Added key accelerators to a bunch of the
- config options and moved the Bcc and empty-subject checkboxes to
- the composer tab where they belong.
-
- * mail-callbacks.c (providers_config): Raise the dialog if it
- exists already.
- (manage_subscriptions): Raise the dialog if it already exists.
- (main_select_first_unread): Removed (we haven't needed this code
- in ages).
- (select_first_unread): Same.
- (save_msg_ok): If the path is empty, just return.
-
- * mail-local.c (mail_local_reconfigure_folder): Raise the dialog
- if it already exists.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (expunge_folder): Set the message-display
- message to NULL if we can't get an info too.
-
-2001-08-06 Jason Leach <jleach@ximian.com>
-
- * mail-callbacks.c (create_folders): Make vtrash folders on other
- storages with a "vtrash" type, so they get the little trashcan
- icon.
-
-2001-08-06 Peter Williams <peterw@ximian.com>
-
- * subscribe-dialog.[ch]: Reimplement to be asynchronous and pretty,
- with progressive folder loading and all sorts of wonderful
- improvements.
-
- * mail-callbacks.c (manage_subscriptions): Change to reflect API
- update.
-
- * Makefile.am (etspec_DATA): Add subscribe-dialog.etspec.
- (glade_DATA): And the glade file.
-
- * subscribe-dialog.etspec: New file, break out the specification
- from inside the subscribe-dialog.c
-
- * subscribe-dialog.glade: Update this, actually use it now.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (empty_trash): Yuck. Special case whether or
- not we want to expunge all the trash folders syncronously or
- asyncronously based on whether or not we are doing Empty-On-Exit
- or emptying trash by user request respectively.
-
-2001-08-06 Jason Leach <jleach@ximian.com>
-
- * mail-folder-cache.c (make_folder_name): Removed this function,
- it's not needed anymore.
- (mail_folder_cache_note_folderinfo): Initialize mfi->unread to 0
- always, so the shell won't get sent a random int for vtrash or
- potentially other folders.
-
- * message-list.c (message_list_select): Fix a minor glitch with
- how it started a backwards wraparound at the 2nd to last message,
- skipping the very last message.
-
-2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.glade: s/character set/character encoding
-
-2001-08-05 Ettore Perazzoli <ettore@ximian.com>
-
- * message-browser.c (message_browser_message_loaded): Make the
- title of the window "subject - Message" instead of just "subject".
- Also, display "(No subject)" if the subject is NULL.
-
- [Fix #6399, 8-bit characters are not displayed in window title.]
-
- * message-browser.c (message_browser_message_loaded): Convert the
- subject from UTF-8 to GTK.
-
-2001-08-05 Ettore Perazzoli <ettore@ximian.com>
-
- [Revert the previous changes, there seems to be something wrong
- with it.]
-
- * component-factory.c (component_factory_init): Back to using
- `bonobo_generic_factory_new()'.
- (component_fn): Updated accordingly.
-
-2001-08-04 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (component_factory_init): Use
- `e_bonobo_generic_factory_multi_display_new()' instead of just
- `bonobo_generic_factory_new()'.
- (component_fn): Added @component_id arg.
-
-2001-08-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_part_is_inline): Add yet another
- special-case hack for application/pgp.
-
-2001-08-04 Jason Leach <jleach@ximian.com>
-
- * message-list.c (message_list_select): Add a @wraparound
- argument, so the 'n' and 'p' keypresses (or anything else that
- wants to) can wrap around to find the next unread.
-
- * folder-browser.c (on_key_press): Tell it to wrap around here.
-
- * mail-callbacks.c (delete_msg): Don't wrap around here (or the
- other callbacks in this file).
-
-2001-08-03 Jason Leach <jleach@ximian.com>
-
- * mail-folder-cache.c (update_idle): Updates for EvolutionStorage
- API changes.
-
- * mail-importer.c (mail_importer_create_folder): Ditto.
-
- * mail-local.c: Same here.
-
-2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (build_auth_menu): Try to restore the choice
- the user had chosen before hitting the "Check Supported Types"
- button.
-
- * mail-format.c (write_headers): Removed a no-longer-needed
- g_warning.
-
-2001-08-03 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (get_password): return the source url for
- popb4smtp auth request.
-
-2001-08-02 Jon Trowbridge <trow@ximian.com>
-
- * mail-ops.c (filter_folder_describe): Added. Provide
- description for filter_folder_op.
- (fetch_mail_describe): Added. Provide description for
- fetch_mail_op.
-
- * message-list.c (regen_list_describe): Added. Provide
- description for regen_list_op.
-
- * mail-config.c (check_service_describe): Added. Provide
- description for check_service_op.
-
- * folder-info.c (do_describe_info): Added. Provide description
- for get_info_op.
-
-2001-08-02 Larry Ewing <lewing@ximian.com>
-
- * mail-send-recv.c (format_url): handle null paths in the dialog
- so that we avoid printing NULL strings
-
-2001-08-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (filter_edit): Raise the filter-editor window
- if it's already created.
-
- * folder-browser.c (message_list_drag_data_received): I obviously
- can't spell recieved, er, received...uh, yea.
-
-2001-08-02 Jason Leach <jleach@ximian.com>
-
- * mail-config.glade: Set history_id's for the sig and html sig
- gnome file entry boxes so it can persist history, also add titles
- to the dialogs that popup when you click the "Browse..." button.
- Bug #5595.
-
-2001-08-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (vfolder_create_storage): Connect to the
- folder_remove signal on the storage.
- (vfolder_remove): New function to remove a vfolder.
- (vfolder_edit): Raise the window if it already exists.
-
-2001-08-02 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (INCLUDES): Add EVOLUTION_BUTTONSDIR to get to some
- different icons.
-
- * mail-ops.c (mail_sync_folder): Queue the folder sync operation,
- rather than running it in parallel.
-
- * mail-send-recv.c: applies anna's patch for prettier send-recv
- dialogue.
- (parse_url): Renamed to format_url, fixed callers.
- (format_url): Use camel_url_free instead of g_free, also handle
- case where we have no host (use path instead).
- (build_dialogue): Cleaned up some whitespace.
- (build_dialogue): Create the label directly with the right text,
- dont set any text in the progress bar, and save the label into the
- info struct for later updating.
- (struct _send_info): Added 'status' the label with the status
- string.
- (operation_status_timeout):
- (receive_done):
- (receive_cancel): Set the status label, not the progress format
- text.
- (hide_send_info): NULL out status too.
- (mail_receive_uri): Init status.
- (free_folder_info): Initiate a folder sync here, so we can ...
- (free_send_data): ... Remove the awful hack of iterating through
- bonobo controls to sync all open folders.
- (free_send_data): Initiate a sync of the inbox too.
- (build_dialogue): Remove set_alignment on the icon, its not a
- gtkmisc object.
-
-2001-08-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_copy): Do the Right Thing (tm)
- if the message list is not the widget in focus (which is to copy
- the text selected in the html viewer instead). Fixes bug #5868.
-
-2001-08-01 Jason Leach <jleach@ximian.com>
-
- * folder-browser-ui.c: Use the new Save As and Message Search
- icons from Jakub.
-
- * mail-callbacks.c (delete_msg): Don't move cursors around when
- deleting last message and Hide Deleted Messages isn't enabled.
- Bug #5928.
-
-2001-07-31 Anna Marie Dirks <anna@ximian.com>
-
- * mail-mt.c (do_get_pass): Changed the title of this dialog
- to "Enter Password".
-
-2001-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (do_get_pass): We are not guarenteed to have a
- non-NULL service (ie. PGP) thus check for it.
- (pass_got): And again here.
- (mail_get_password): And of course here too.
-
- * mail-format.c (decode_pgp): When writing out a CamelException to
- the HTML stream, be sure to translate it first.
- (handle_message_external_body): Convert to UTF8 here too - I know
- this function is basically a dead end right now but eventually we
- will want to do something. I mostly did this because param values
- are UTF8 encoded so we should avoid mixing and matching UTF with
- non UTF8.
- (format_mime_part): Avoid writing non-UTF8 to the HTML stream.
-
- * mail-tools.c (mail_tool_make_message_attachment): Convert
- translated strings to UTF8 here too.
- (mail_tool_forward_message): Here too.
-
-2001-07-23 Zbigniew Chyla <cyba@gnome.pl>
-
- * mail-format.c (attachment_header, write_address, decode_pgp,
- mail_write_authenticity):
- Convert translated strings to UTF8 before calling mail_html_write.
-
- I modified the patch slightly and cleaned up bits of code around
- it as well. For example, we probably want to avoid having HTML
- tags in the strings to be translated. -- fejj
-
-2001-07-30 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Restore old security
- settings from the saved configuration. Fixes bug #5710.
-
-2001-07-30 Not Zed <NotZed@Ximian.com>
-
- * mail-session.c (do_register_timeout): Actually add the timeout,
- this time in the gtk thread.
- (do_remove_timeout): And same for remove.
- (register_timeout):
- (remove_timeout): Proxy the gtk calls to the main thread, and
- wait for them to execute synchronously.
- (register_timeout): Instead of return with fail for a too small
- timeout, just increase the timeout.
-
-2001-07-27 Zbigniew Chyla <cyba@gnome.pl>
-
- * component-factory.c (populate_folder_context_menu): Added (unused)
- table with strings intended to be translated (i18n tools can't extract
- strings from XML data inside .c file).
-
-2001-07-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (focus_on_entry): Don't need this anymore.
- (do_get_pass): Since we already have the entry widget, no need to
- do the nasty focus_on_entry hack.
-
-2001-07-26 Peter Williams <peterw@ximian.com>
-
- * mail-mt.c (do_get_pass): Figure out whether we're getting the
- password for the source or the transport, and get the toggle
- button accordingly.
- (pass_got): Same.
-
- * mail-config.c (mail_config_get_account_by_transport_url): New
- function. Cut + paste + search + replace of _by_source_url.
-
- * mail-config.h: Prototype here.
-
-2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (message_list_drag_data_get): If we don't have
- any messages selected, break out. This fixes bug #5612.
-
- * component-factory.c (xfer_folder): Fixed a strstr (url,
- "noselect=yes") brokenness.
- (destination_folder_handle_motion): Same.
- (destination_folder_handle_drop): And again here.
-
- * mail-format.c (handle_application_pgp): Implemented.
- (setup_mime_tables): Setup the application/pgp handler to use
- handle_application_pgp instead of handle_text_plain.
- (handle_text_plain): Remove special-case hacks for application/pgp
- types.
-
- * mail-config.glade: beautification.
-
-2001-07-26 Peter Williams <peterw@ximian.com>
-
- * mail-mt.c (do_get_pass): Use magic to make the password
- remembering checkbutton come after the entry, visually.
-
-2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (write_headers): Respect Gtk theme colors for the
- fonts and calculate a new table gbcolor based on gtk theme
- preferences.
-
- * mail-config.glade: Label the enabled field.
-
-2001-07-26 Peter Williams <peterw@ximian.com>
-
- * message-list.etspec: Make the date column smaller and the
- subject column larger, relatively.
-
- * mail-folder-cache.c (make_folder_status): Don't display "0
- hidden".
-
- * folder-browser.c (on_key_press): Make 'q' a toggle, not one-way.
-
- * message-list.etspec: Rename "Date" column to "Sent".
-
-2001-07-25 Anna Marie Dirks <anna@ximian.com>
-
- * mail-config.glade: fixed a mis-spelling of "Fashion" in the mail
- accounts window. (See bug 5433)
-
-2001-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-session.c (make_key): Don't make the key url:item if we
- have the url, just make it url. This fixes bug #5339.
- (mail_session_set_password): Removed.
-
-2001-07-25 Peter Williams <peterw@ximian.com>
-
- * folder-browser.c (etree_key): Make it so Enter always opens the
- message in another window.
-
-2001-07-25 Peter Williams <peterw@ximian.com>
-
- * mail-mt.c (mail_get_password): Now take a CamelService parameter
- (as passed by Camel). Allows us to have a "remember password"
- checkbox that is set correctly and whose settings can be
- propagated back to the proper MailConfigService.
- (do_get_pass): Add a checkbutton allowing the user to change
- whether the password is remembered or not.
- (pass_got): Apply the setting of the "remember password"
- checkbutton (if not cancelled.)
-
- * mail-mt.h: Update the prototype here.
-
- * mail-config.c (mail_config_service_set_save_passwd): New
- function, pretty bland.
-
- * mail-config.h: Prototype our bland new function. (Get it? It's a
- pun!)
-
- * mail-session.c (get_password): Pass the service as well.
-
-2001-07-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (build_auth_menu): Now takes a
- check_supported gboolean argument saying whether or not to disable
- non-supported authtypes.
- (source_type_changed): Update for build_auth_menu.
- (transport_type_changed): Same.
- (service_check_supported): Pass in TRUE for the disable
- non-supported authtypes to build_auth_menu and also disable
- check-supported button and the authtype menu if we get a NULL
- supported auth list.
-
- * mail-callbacks.c (mail_generate_reply): Initialize `me' to NULL.
- (forward_attached): If we are only forwarding a single message,
- pass the message along as the callback data, else pass NULL.
- (do_forward_attach): Updated for changes to
- forward_get_composer().
- (do_forward_non_attached): Same.
- (forward_get_composer): Try to guess which account to forward the
- message from if the message passed in is non-NULL.
-
-2001-07-24 Peter Williams <peterw@ximian.com>
-
- * mail-config.c (mail_config_write): Um, write the HTML signature
- settings in the right place. Whoops.
-
-2001-07-24 Jason Leach <jleach@ximian.com>
-
- * mail-callbacks.c (delete_msg): If we're deleting the last
- message, select the previous, not next, which actually selects
- nothing. Fixes #5323.
-
-2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (save_part_save): Pass the O_TRUNC flag to open so
- that we don't leave trailing garbage at the end of the file if the
- new file content is shorter than the old file content.
-
- * component-factory.c (create_view): Fix for bug #5174.
-
-2001-07-24 Jason Leach <jleach@ximian.com>
-
- * mail-config.c (config_read): Match the prefix for the
- "remember_passphrase" setting with where it's being saved to
- (/Mail/Prompts), so the setting gets loaded correctly. Fixes
- #5351.
-
-2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_text_plain): check_specials if this is an
- application/pgp type as well.
-
- * mail-ops.c (add_vtrash_info): When dumping the CamelURL to a
- string, hide all the params.
-
-2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (guess_me): Do a case-insensitive comparison.
- (mail_generate_reply): Only resort to the source account's
- identity if we can't find out which identity to use based on the
- recipients of the message first.
-
- * mail-config.c (mail_config_get_default_account): Make sure to
- return the 0th account if we don't have a default. We don't want
- to return NULL.
-
- * mail-callbacks.c (empty_trash): Use mail_tool_get_trash for the
- remote store trash folders.
-
- * mail-tools.c (mail_tool_get_trash): New convenience function.
-
-2001-07-24 Jason Leach <jleach@ximian.com>
-
- * mail-config.c (config_read): get_boolean_with_default for the
- "Mark as read" timeout, not get_long_with_default. Fixes #5176.
-
-2001-07-24 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (make_folder_name): Don't display "(0 unsent)" if
- the outbox is empty.
-
- * mail-local.c (init_trash): Set up the local trash in the folder
- cache.
-
- * mail-folder-cache.c (update_idle): Make the error reporting a little
- but more descriptive.
-
-2001-07-24 Peter Williams <peterw@ximian.com>
-
- * mail-config.glade: Add new label widgets with a message that SSL
- isn't supported.
-
- * mail-account-gui.h: Add a new member to the Transport GUI struct
- for the 'SSL is not supported' message.
-
- * mail-account-gui.c (source_type_changed): Change logic to display
- a message stating that SSL isn't supported if SSL isn't supported.
- (transport_type_changed): Same.
- (mail_account_gui_new): Also load the labels for the the no-SSL
- message.
-
- * mail-accounts.c (construct): Fix typo.
-
-2001-07-24 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (create_folder): Dont call notifyResult here
- if we've just launched a thread to do the work, it calls it
- itself. This apparently breaks the importers, but thats a
- different issue.
-
-2001-07-23 Not Zed <NotZed@Ximian.com>
-
- * mail-mt.c (mail_msgport_replied): Go back to calling
- mail_msg_free here.
- (mail_msg_destroy): Remove the operation unregistration stuff.
- (mail_msg_received): And put it here, so we unregister as soon as
- the async part of the operation is complete. I thought about this
- and we should be doing this anyway so we register/unregister
- always in the same thread, although the camel_operation api
- doesn't enforce it, this *is* what it expects.
-
- * message-list.c (regen_list_regen): re-add reporting to
- rebuilding the message list. Basically fixes #4931
-
-2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-search.c (toggled_fwd_cb): Oops. Uncomment this code since
- Trow fixed GtkHTML to actually have this function now.
-
- * mail-config.glade: Fixed the "Read" to be Read in the glade file
- per menesis' request.
-
- * mail-accounts.c (construct): Give the dialog a Close button
- instead of an OK button.
- (prompt_bcc_only_toggled): New.
- (threaded_list_toggled): New.
- (show_preview_toggled): New.
- (construct): Add code for the bcc-only-prompt, threaded-list, and
- show-preview checkboxes.
-
- * mail-ops.c (transfer_messages_transfer): If the source and
- destination folders are the same, just mark the uids as undeleted
- (in case they were marked as deleted before).
-
-2001-07-23 Jon Trowbridge <trow@ximian.com>
-
- * mail-search.c (begin_cb): Carefully check for NULL everywhere,
- and do the right thing if the message we are currently looking at
- gets expunged. (Bug #4870)
-
-2001-07-23 Jason Leach <jleach@ximian.com>
-
- [Bug #5225: No UI way to mark as unimportant]
-
- * folder-browser.c (on_right_click): Do the necessary stuff to
- show or hide the correct "Mark Important" or "Mark as Unimportant"
- menu items depending on the status of messages that are selected.
-
- * folder-browser-ui.c: Add the MarkAsUnimportant verb here.
-
- * mail-callbacks.c (mark_as_unimportant): Simple function that's
- the callback for these new menu items.
-
-2001-07-22 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (remove_folder): Updated to get a @type
- argument. Return an error if the type isn't "mail".
- (xfer_folder): Likewise.
-
-2001-07-21 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c: Make types "mailstorage" and "vtrash"
- non-user-creatable.
-
-2001-07-20 Jason Leach <jleach@ximian.com>
-
- * mail-summary.c (generate_html_summary): Change this back to the
- "evolution:/local/Inbox" URI.
-
-2001-07-20 Peter Williams <peterw@ximian.com>
-
- * component-factory.c (storage_remove_folder): Don't let the user
- remove vtrash folders.
-
-2001-07-20 Peter Williams <peterw@ximian.com>
-
- * mail-mt.c (mail_msgport_replied): Fix DanW's fix. Pass the right
- arguments to mail_msg_destroy.
-
- * component-factory.c (component_fn): Don't populate the context
- menu; our only action didn't even work.
- (populate_folder_context_menu): Removed. ChangeFolderProperties
- needs a FolderBrowser which we don't have. It didn't even work
- before.
-
- * mail-local.c (mail_local_reconfigure_folder): Bring the creation
- of the hash table to the beginning to prevent warnings. Complain
- if the mailbox is non-local.
-
-2001-07-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (filter_folder_filter): Don't expunge the source
- folder if we have a cache.
-
-2001-07-20 Dan Winship <danw@ximian.com>
-
- * mail-mt.c (mail_msgport_replied): Use mail_msg_destroy rather
- than mail_msg_free, so the cancellation operation gets
- unregistered and doesn't leak two file descriptors.
-
-2001-07-19 Jason Leach <jleach@ximian.com>
-
- * mail-summary.c (generate_html_summary): Update this
- evolution:/local/ URI to evolution:/Local Folders/ to go along
- with today's shell changes.
-
-2001-07-19 Jason Leach <jleach@ximian.com>
-
- * mail-display.c: Fix #4605: "Save Image as" should be "Save Image
- as...".
-
-2001-07-19 Jason Leach <jleach@ximian.com>
-
- * mail-display.c (mail_display_new): Set the vertical scrolling
- policy for the mail display to AUTOMATIC, only get a scrollbar if
- the e-mail is longer than one frame.
-
- * folder-browser.c (my_folder_browser_init): We were setting the
- policy twice (and to two different things). Removed this one.
-
- * message-list.c (message_list_init): Set the policy for the
- message list scroll frame to be horizontal=NEVER,
- vertical=AUTOMATIC (scrollbar only if you have >1 page of
- messages).
-
-2001-07-19 Peter Williams <peterw@ximian.com>
-
- Track the NoSelect changes in Camel.
-
- * mail-callbacks.c (create_folders): We don't need to check if
- the URL is NULL or not anymore.
-
- * component-factory.c (create_noselect_control): New
- function. Create a dummy control for folders that can't contain
- messages (ie \NoSelect)
- (create_view): If the URI says the folder is noselect, make a
- dummy control. FIXME: still should merge in the global UI
- elements.
- (xfer_folder): Don't allow the operation if the destination is
- NoSelect.
- (destination_folder_handle_motion): Ditto.
- (destination_folder_handle_drop): Ditto.
-
-2001-07-19 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (reconfigure_folder_reconfigure): remvoed
- register/start/end etc code.
-
- * mail-ops.c (get_messages_desc): Add the count here.
- (get_messages_get): Remove the register/start code, its handled
- above us.
- (save_messages_desc): Added count.
- (save_messages_save): Removed register/start/end code.
-
- * mail-mt.c (mail_msg_received, mail_msg_destroy): Changed to use
- camel_operation rather than mail_status.
- (mail_msgport_received, mail_msgport_replied): Turn of the
- mail_status stuff, we dont need to report on stuff running in the
- gui thread right?
- (retrieve_shell_view_interface_from_control, set_view_data,
- mail_statusf, mail_status, mail_status_end, mail_status_start,
- status_timeout, do_del_status, set_status_op): removed now
- redundant stuff.
- (mail_msg_free): Removed reference to timeout_id.
-
-2001-07-18 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (reconfigure_folder_reconfigure): Changed to use
- camel_operation rathre than mail_status.
- (reconfigure_folder_describe): re-enabled this function.
-
- * mail-ops.c (get_messages_get): Changed to use camel-progress for
- status reporting.
- (save_messages_save): Likewise.
-
-2001-07-17 Not Zed <NotZed@Ximian.com>
-
- * mail-mt.c (struct _mail_msg_priv, destroy_objects, mail_msg_new,
- mail_msg_free, do_op_status): Changed to use an EvolutionActivityClient for
- progress.
-
-2001-07-18 Jason Leach <jleach@ximian.com>
-
- * mail-tools.h (mail_tool_get_local_inbox_url): Remove this
- prototype for a function that was removed long ago.
- (mail_tool_get_local_movemail_url): Ditto.
-
-2001-07-18 Jason Leach <jleach@ximian.com>
-
- [Simplifying how default account is stored and used internally,
- fixes possabilities of having multiple default accounts and things
- like deleting the current default account]
-
- * mail-account-gui.c (mail_account_gui_new): Update for new way of
- finding out the default account.
- (mail_account_gui_save): Ditto.
-
- * mail-accounts.c (load_accounts): Ditto.
-
- * mail-config-druid.c (make_default_account): Ditto.
-
- * mail-config.c: Added an int MailConfig::default_account, to be
- used instead of a 'default_account' boolean on each mail account.
- (mail_config_set_default_account_num): New function, facilitates
- things.
-
- * Mail.idl: removed the Account::default_account boolean.
-
-2001-07-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_generate_forward_subject): Do what was
- suggested in #4596.
-
-2001-07-18 Peter Williams <peterw@ximian.com>
-
- * mail-accounts.c (construct): Add GTK_WIDGET to the charset
- picker. Reportedly prevent a craash for someone... ?
-
- * mail-config.glade: Typo fix.
- Later: And actually fix the typo.
-
-2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (mail_delete): Setup the auto-receive here
- instead.
-
- * mail-config.c (mail_config_remove_account): Don't setup the
- auto-recv here.
-
-2001-07-17 Iain Holmes <iain@ximian.com>
-
- * mail-accounts.c (mail_able): Reset the auto receive.
-
- * mail-config.h (mail_config_remove_account): Reset the autoreceive.
-
-2001-07-17 Jason Leach <jleach@ximian.com>
-
- * mail-account-gui.c (source_type_changed): Fix for last change:
- hide the entire widget, not just the entry.
-
-2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (message_list_drag_data_recieved): Fix to
- correctly handle text/uri-lists that contain more than a single
- url.
-
- * component-factory.c (destination_folder_handle_drop): Fix to
- correctly handle text/uri-lists that contain more than a single
- url.
-
-2001-07-17 Jason Leach <jleach@ximian.com>
-
- * mail-config.glade: Make the Path: entry into a GnomeFileEntry so
- you get a nice "Browse..." button that pops up a file selector to
- locate your mbox files. Bug #3501.
-
-2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_part_toggle_displayed): Cleaned up a bit.
- (handle_multipart_encrypted): Replace the encrypted part with the
- decrypted part.
-
-2001-07-17 Iain Holmes <iain@ximian.com>
-
- * mail-accounts.c (mail_delete): Make a nicer dialog.
-
-2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (init_trash): Use CAMEL_VTRASH_NAME.
-
- * mail-ops.c (add_vtrash_info): Use CAMEL_VTRASH_NAME.
-
- * folder-browser.c: turned off some debugging
-
-2001-07-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Disallow vtrash for now...
-
- * mail-ops.c (add_vtrash_info): Use g_strcasecmp() when looking
- for a Trash folder - it may be lowercase or something funky.
- (transfer_messages_transfer): Special-case vtrash folders.
-
- * mail-local.c (init_trash): No need to specify the vfolder
- expression here. This code was moved into camel-vtrash-folder.c
- ages ago.
-
- * component-factory.c: Let VTrash folders accept/export the same
- dnd types as normal folders.
-
-2001-07-16 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (outbox_folder): prototype outbox_folder so
- we can check if a folder is it.
- (make_folder_name): If the folder is the outbox, display the count
- of total messages as "unsent".
- (make_folder_status): If the folder is the outbox, display
- "unsent" instead of "total"
-
-2001-07-16 Peter Williams <peterw@ximian.com>
-
- * mail-display.c (mail_display_redisplay): Use our own
- display_style member instead of the global setting.
- (mail_display_init): Initialize display_style.
-
- * mail-display.h: Include "mail-config.h" and add a display_style
- member.
-
- * mail-format.c (write_headers): Look at the MailDisplay's
- display_style instead of using the full_headers data.
-
- * folder-browser.c (folder_browser_set_message_display_style): Set
- the MailDisplay's display style as well as the global display
- style.
- (my_folder_browser_init): Don't save preference changes by
- default. (This is only observered wrt. the message display style
- but should apply to other items.)
-
- * folder-browser-factory.c (folder_browser_factory_new_control):
- Set this FB to save the preferences set in it.
-
- * folder-browser-ui.c (folder_browser_ui_add_message): Read our
- display's state instead of the global setting.
-
-2001-07-16 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (mail_folder_cache_set_folder_browser): DUH.
- No need to update every folder if we set the folder browser to
- NULL.
-
-2001-07-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Call
- mail_autoreceive_setup() so that any changes to the list of
- accounts will be respected the next time mail is checked.
-
-2001-07-13 Peter Williams <peterw@ximian.com>
-
- * mail-callbacks.c (expunge_folder): Segfault prevention here if
- no uid is currently loaded.
-
- * mail-vfolder.c (unlist_vfolder): New function. If a vfolder in
- our list gets finalized, NULL out info->folder (Is it wrong if
- this happens?) Also, locking issues?
- (vfolder_uri_to_folder): Hook up to the finalize event here.
-
-2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (filter_folder_filter): Updated to reflect changes in
- the filter API by passing in the provided uid cache to
- camel_filter_driver_filter_folder.
- (mail_filter_folder): Set the cache to NULL.
- (mail_fetch_mail): Set the cache to NULL.
- (fetch_mail_fetch): If a cache exists for this folder, set
- it. When we are finished filtering the incoming messages, the
- logic changes a bit. We now save the cache if keep_on_server is
- set *or* if there was an exception this way if the user's download
- gets interrupted, he won't have to download all the messages
- again.
- (fetch_mail_fetch): Oh yea, and just so if we get an exception
- with `delete' turned on, the next time the user checks mail and an
- exception *doesn't* occur, it will go back and mark all the
- messages for deletion.
-
-2001-07-12 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Check that
- the folder does exist before trying to import it.
-
-2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (expunge_folder): Force-hide all deleted
- messages before expunging.
- (expunged_folder): Restore the user's "hide deleted messages"
- preference.
-
-2001-07-12 Jason Leach <jleach@ximian.com>
-
- * mail-callbacks.c (expunge_folder): Only blank the mail display
- if the message being viewed is one of those to be expunged. Bug
- #4030.
-
-2001-07-12 Jason Leach <jleach@ximian.com>
-
- * mail-config.c (config_read): Should be saving the
- 'identity_html_signature' and 'identity_has_html_signature" keys
- in the /Mail/Accounts prefix (with the rest of the per-account
- stuff, not on it's own)
-
-2001-07-11 JP Rosevear <jpr@ximian.com>
-
- * mail-display.c (get_embedded_for_component): no longer need to
- set a my address property
-
-2001-07-10 Federico Mena Quintero <federico@ximian.com>
-
- * mail-display.c (link_copy_location): Set the CLIPBOARD selection
- as well as the primary selection so that Edit/Paste will work in
- other programs (e.g. Netscape).
- (mail_display_new): Add the target for the CLIPBOARD selection.
-
-2001-07-10 Jason Leach <jleach@ximian.com>
-
- [Bug #4305: Make the automatic mark-as-read timer optional]
-
- * mail-config.glade: Necessary changes to make the Mark as "Read"
- label a toggle button instead.
-
- * mail-accounts.c (construct): Connect to the "toggled" on our new
- toggle.
- (timeout_toggled): New callback, called from above.
-
- * mail-config.c (mail_config_get_do_seen_timeout): New.
- (mail_config_set_do_seen_timeout): New.
- (mail_config_write_on_exit): Save the preference here.
- (config_read): Load it here.
-
-2001-07-10 JP Rosevear <jpr@ximian.com>
-
- * folder-browser.c: Cosmetic patch - replace our defines with the
- e-popup ones
-
- * Makefile.am: Typo
-
-2001-07-10 Peter Williams <peterw@ximian.com>
-
- * mail-format.c (attachment_header): Took the logic of whether or
- not to make the attachment header out of the actual function.
- (mail_part_is_displayed_inline): Return if the part is being
- displayed inline (regardless of whether it is actually inline).
- (mail_part_toggle_displayed): Toggle whether it's displayed inline
- or not.
- (get_inline_flags): Determine whether the part is displayed inline
- and whether it is actually inline.
- (mail_format_mime_message): Initialize the attachment_status hash
- table.
-
- * mail-display.c (inline_cb): Instead of modifying the
- CamelMimePart, use mail_part_toggle_displayed
- (button_press): As above.
- (pixmap_press): Use mail_part_is_displayed_inline instead of
- mail_part_is_inline. Get the MailDisplay from the popup to do
- this.
-
- * mail.h: Add prototypes.
-
-2001-07-10 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: extra dist the news files
-
-2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write_on_exit): Use
- bonobo_config_set_string_wrapper.
- (mail_config_write): Same.
- (bonobo_config_set_string_wrapper): Macro wrapping
- bonobo_config_set_string that passes "" as the val if the val is
- NULL.
-
- * mail-callbacks.c (mail_generate_reply): Make sure that the
- reply-to addr i non-NULL before trying to add it to the hash
- table.
-
-2001-07-09 JP Rosevear <jpr@ximian.com>
-
- * mail-account-gui.c (get_focused_widget): fix typo so it compiles
-
-2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (setup_mime_tables): Handle application/pgp using
- the text/plain handler.
-
- * mail-account-gui.c (get_focused_widget): New function to
- determine which widget is focused.
-
- * mail-account-editor.c (apply_changes): Not only flip to the
- notebook page that wasn't finished, but also grab the focus of the
- incomplete widget.
-
- * mail-config-druid.c (source_changed): Grab the focus of the
- incomplete widget.
- (transport_prepare): And here.
- (identity_changed): Here too.
-
- * mail-account-gui.c (mail_account_gui_identity_complete): Take an
- incomplete argument so we can set which widget is incomplete and
- then the caller can focus it or whatever.
- (service_complete): Same.
- (mail_account_gui_transport_complete): And again here.
- (mail_account_gui_management_complete): And here too.
-
-2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (decode_pgp): Update to pass in the `remember'
- argument when creating a new pgp context.
- (try_inline_pgp_sig): And here...
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_sign): Update to pass
- in the `remember' argument when creating a new pgp context.
- (mail_crypto_pgp_mime_part_verify): Same.
- (mail_crypto_pgp_mime_part_encrypt): And here...
- (mail_crypto_pgp_mime_part_decrypt): And finally here.
-
- * mail-config.c (mail_config_get_remember_pgp_passphrase): New.
- (mail_config_set_remember_pgp_passphrase): New.
- (config_read): Read in the "remember passphrase" value.
- (mail_config_write_on_exit): Save the remember-passphrase value.
-
- * mail-accounts.c (construct): Allow the user to set "Remember PGP
- Passphrase".
- (remember_pgp_passphrase_toggled): Set the toggle state.
-
-2001-07-09 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (get_folderinfo_got): Check for an exception and
- print it. Call done anyway.
- (do_update_subfolders): Check for NULL info.
-
-2001-07-09 Peter Williams <peterw@ximian.com>
-
- * mail-config.c (mail_config_write): Some NULL protection for our
- strings: pgp_key, html_signature, smime_key. Probably we should do
- this for all strings. Either that or change Bonobo Config.
-
- * message-list.c (message_list_init): Explicitly initialize search
- to NULL. Bug 3951 might to be due to a problem wrt this, and it
- can't hurt.
-
-2001-07-09 Dan Winship <danw@ximian.com>
-
- * mail-display.c (save_part): g_strdup the result of
- g_get_home_dir since this variable will get free'd later.
-
- * mail-format.c (mail_lookup_handler): Use
- gnome_vfs_mime_get_short_list_applications rather than
- gnome_vfs_mime_get_default_application.
-
- * mail-display.c (pixmap_press): Construct the EPopupMenu array on
- the fly, based on the number of applications available to open the
- MIME type.
- (launch_cb): Figure out which menu item was clicked, and invoke
- the appropriate application. Ugh, messy, because of the EPopupMenu
- interface. Probably should get rewritten some day. Also, make this
- handle apps with expects_uris set too.
-
-2001-07-09 Peter Williams <peterw@ximian.com>
-
- * mail-config.c (mail_config_write): Change html_signature stuff
- over to bonobo-config -- someone forgot to do this.
-
- * mail-folder-cache.c (dm): Gave up and got rid of dm. Just
- replaced it with d(g_message()) and set G_LOG_DOMAIN.
-
-2001-07-09 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (mail_folder_cache_set_update_shellview):
- Deleted
- (as opposed to #if 0)
- (get_folder_info): Changed to assume it has the folder lock.
- (make_folder_name): Same.
- (make_folder_status): Same.
- (update_idle): Don't unlock around the make_folder_ functions.
- (*): Changed behavior wrt. get_folder_info. Lock before calling,
- but also move preconditions before -- get_folder_info can only
- return NULL if uri is NULL. Also add preconditions for other
- arguments where necessary.
-
-2001-07-07 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (on_cursor_activated_cmd): Check for new_uid !=
- NULL here before strcmping.
-
-2001-07-07 Dan Winship <danw@ximian.com>
-
- * main.c (main): Only install the segv_redirect handler if SEGV's
- handler is not currently SIG_DFL. Otherwise you get an infinite
- SEGV loop if you run with GNOME_DISABLE_CRASH_DIALOG.
-
-2001-07-07 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (message_list_select): Made this handle being
- given a row that's outside the range better.
-
-2001-07-06 Jason Leach <jleach@ximian.com>
-
- [Fix bug #1100, default account is stored strangely]
-
- * mail-config.c (mail_config_get_default_account_num): New
- function, returns the integer of the position of the default
- account, used to save which account is the default to the config
- db.
- (mail_config_write): Save the default account number here in
- "/Mail/Accounts/default_account".
- (config_read): Load in which is the default here.
-
-2001-07-06 Larry Ewing <lewing@ximian.com>
-
- * mail-callbacks.c (composer_send_cb): add a NULL check since that
- is a valid return.
-
-2001-07-06 Peter Williams <peterw@ximian.com>
-
- * mail-format.c (format_mime_part): Prevent infinite recursion when
- viewing attachments that we can't / shouldn't display but are some
- form of plaintext. Cf bug #2234
-
-2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_copy): Freeze and Thaw the
- folder.
-
-2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_copy): Mark the messages as
- Seen also.
- (folder_browser_class_init): Create an atom type for
- X-Evolution-Message selection type.
- (my_folder_browser_init): Add our multiple selection types, one of
- which is the default string type.
-
- * component-factory.c (destination_folder_handle_drop): Update to
- use the new X-Evolution-Message type format.
-
- * folder-browser.c (selection_get): Convert the
- X-Evolution-Message clipboard type to whatever format the target
- wants.
- (message_list_drag_data_get): Update because the
- X-Evolution-Message type changed.
- (folder_browser_copy): Same.
- (x_evolution_message_parse): And here too.
-
-2001-07-06 Peter Williams <peterw@ximian.com>
-
- * mail-callbacks.c (composer_postpone_cb): Don't free the psd here --
- it will be freed on the "destroy" signal.
-
- * mail-folder-cache.c (maybe_update): Instead of an idle, use a very
- short timeout in hopes of reducing the number of redundant updates.
-
- * mail-tools.c (mail_tool_uri_to_folder): Only note the folder in the
- cache if we successfully got it.
-
-2001-07-06 Jason Leach <jleach@ximian.com>
-
- * mail-callbacks.c (delete_msg): Select the very next message
- after deleting, not the next undeleted (it can make things jump
- around in annoying ways if you are deleting many messages), bug #4032.
-
- * folder-browser.c: Forgot to commit the "Mark as Important" right
- click menu item.
-
- * message-list.c (message_list_set_folder): Setup the strikeout
- column here (after we've gotten the folder) so we can disable
- strikeouts for vtrash folders, part of bug #2224.
-
-2001-07-06 Dan Winship <danw@ximian.com>
-
- * mail-folder-cache.c (mail_folder_cache_set_folder_browser): Fix
- obvious bug in previous bugfix: Pass "fb" to check_for_fb_match()
- so only the selected folder gets updated, instead of "all folders
- that haven't yet been selected".
-
-2001-07-06 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (populate_folder_context_menu): New function
- to populate the right-click menu for mail folders.
- (component_fn): Pass it to `evolution_shell_component_new()'.
-
-2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (construct): Add a checkbox for prompting when
- sending a message with an empty subject.
-
- * mail-ops.c (mail_send_message): If filtering fails, return right
- away.
-
- * mail-config.c (mail_config_set_show_preview): Okay, apparently I
- was wrong. Oh well.
- (mail_config_set_thread_list): Fix this one too.
-
-2001-07-05 Peter Williams <peterw@ximian.com>
-
- * mail-vfolder.c (vfolder_uri_to_folder): Add mail folder cache
- hookups.
-
- * Makefile.am: Remove the ridiculuous relic known as
- test-mail. Clean up a bit.
-
- * mail-vfolder.c (vfolder_uri_to_folder): Add mail folder cache
- hookups.
-
-2001-07-05 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (mail_folder_cache_set_folder_browser):
- Clear the shell view label if mailer loses focus.
-
- * mail-ops.c (do_update_subfolders_rec): Check for NULL url before
- calling folder cache functions.
-
-2001-07-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * folder-browser-ui.c (message_pixcache): set icon for
- ApplyFilters command.
-
-2001-07-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_set_show_preview): Revert Sam's
- changes.
-
- Note: Uhm, g_hash_table_lookup_extended gives us a pointer to the
- original value which we can just change to update the hash table
- without the need to re-insert - it's already there!! Also, you
- don't want to g_hash_table_insert the new value with the same key
- without at least first removing the existing bucket. And, you
- certainly don't want to g_free() the key after you insert it -
- eek!!
-
-2001-07-03 Sam Creasey <sammy@oh.verio.com>
-
- * mail-config.c (mail_config_set_show_preview): Replace value in
- config->preview_hash when it already exists. Old code never
- re-inserted into the hash, just assigned to val -- it's an int
- here, not a real pointer.
-
-2001-07-03 Joe Shaw <joe@ximian.com>
-
- * mail-callbacks.c (expunge_folder): Unset the message being displayed
- when expunging. This makes expunged messages not show in the preview
- pane when they're not there anymore. Fixes #3591.
-
-2001-07-03 Joe Shaw <joe@ximian.com>
-
- * mail-callbacks.c (mail_reply): If msg is NULL, fetch the message
- and requeue a mail_reply call. Fixes bug #3816.
- (requeue_mail_reply): Callback from mail_get_message().
-
-2001-07-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_show_preview): Use a better
- GHashTable technique that will hopefully solve some bugs and also
- use _with_default bonobo-config call.
- (mail_config_set_show_preview): No sense in removing the entry
- from the hash table and then re-inserting it. Just reset the
- value.
- (mail_config_get_thread_list): Use the same logic.
- (mail_config_set_thread_list): And again here.
-
-2001-07-03 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.c (make_folder_name, make_folder_status):
- Split make_string into these.
- (update_idle): Use (name and status) instead of (wide and thin)
- for the text.
-
-2001-07-03 Jason Leach <jleach@ximian.com>
-
- * folder-browser-ui.c: "Mark as Important" menu thingy here.
-
-2001-07-03 Peter Williams <peterw@ximian.com>
-
- * folder-browser.c (message_list_drag_data_get): Compile fixes.
- #include errno.h and gnome-dialog-utils.h. s/dirname/tmpdir/
-
-2001-07-03 Peter Williams <peterw@ximian.com>
-
- Prevent folders from appearing to have -1 new messages. Prevent
- nonactive folders from updating the title bar. Make the title bar
- update when switching to an already-opened folder.
-
- * mail-folder-cache.c (update_message_counts): Ignore the value
- for 'unread' if it is -1.
- (get_mail_info_receive): Same
- (mail_folder_cache_note_folderinfo): Same.
- (get_folder_info): Initialize 'fb' to NULL.
- (mail_folder_info): Add 'fb' member.
- (mail_folder_cache_note_fb): Change note_message_list to this.
- (update_idle): Only update the ShellView if the active folder
- browser is the same as the one that the MFI references.
- (mail_folder_cache_set_folder_browser): New function. Use it to
- set the active folder browser. NULL is okay.
- (check_for_fb_match): Called from the above. If the MFI has the
- new folder browser as its view, queue an update.
-
- * mail-folder-cache.h: Fix prototypes.
-
- * mail-callbacks.c (create_folders): Check if fi->url is nonnull.
-
- * folder-browser.c (got_folder): Change to use note_fb instead of
- note_messge_list.
-
- * folder-browser-factory.c (control_activate): Set the folder
- browser
- (control_deactivate): Clear it here.
- (fb_get_svi): Kill some inappropriately cut-n-pasted code.
-
-2001-07-03 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: Rename some of the widgets in the news config
- to not conflict with the mail config stuff, so the mail config
- druid will work again.
-
-2001-07-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (message_list_drag_data_get): Use mkdtemp if we
- have it, else use mktemp but make the code safer than it was
- previously.
-
- * mail-display.c (launch_cb): Free the template string if the
- tempdir failed to be created.
-
- * folder-browser.c (message_list_drag_data_get): Hide the URL
- passwd, auth, and params.
- (folder_browser_copy): Same.
-
-2001-07-03 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (filter_folder_filter): Don't pass a dirty exception
- to camel_folder_sync. Fixes an IMAP filtering crash.
-
-2001-07-02 Sam Creasey <sammy@oh.verio.com>
-
- * mail-account-editor-news.c: Added an MailAccountEditorNews, for
- NNTP configuratuion. Based on MailAccountEditor, but stripped.
-
- * Makefile.am: added mail-account-editor-news.c and
- mail-account-editor-news.h to SOURCES if ENABLE_NNTP is defined.
-
- * mail-accounts.c (load_news): Moved this function, and fixed some
- slight brokenness.
- (news_edit): Added functional code using MailAccountEditorNews
- (news_add): Added functional code using news_edit after
- allocation.
-
- * mail-config.glade: news_editor_window widget added. Used by
- MailAccountEditorNews.
-
- * mail-display.c (save_data_cb): Store the pathname used when
- saving messages so that the next save box will default to the
- previous path.
-
- * message-browser.c (message_browser_new): add signal handler for
- size_allocate on the message browser. Thus new windows are size
- as they were last allocated.
- (message_browser_size_allocate_cb): handler to store allocations.
-
- * message-list.c (message_list_setup_etree): connect to the
- info_changed signals for the state of the message_list->tree.
- Save the folder state to disk, so that when additional
- message_lists are created, they are consistant. e.g. the next
- buttons do the same thing in the browser, and in the message
- viewer after changing sorting options.
-
- * subscribe-dialog.c (build_tree): freeze sc->folder model while
- building the tree. Not doing so takes a very long time over 40000
- newsgroups.
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (construct): Setup the Empty Trash On Exit
- widgets.
-
- * mail-config.c (config_read): Option to emtpy trash on exit.
- (mail_config_write_on_exit): Same.
- (mail_config_set_empty_trash_on_exit): Set the option.
- (mail_config_get_empty_trash_on_exit): Get the option.
-
- * component-factory.c (owner_unset_cb): Empty the trash folders if
- the user set the "empty trash on exit" option.
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Updated for the
- mail_transfer_messages API.
-
- * folder-browser.c (message_list_drag_data_recieved): Update for
- the mail_transfer_messages API.
- (selection_received): Same.
-
- * mail-ops.c (mail_transfer_messages): Renamed from
- mail_do_transfer_messages and also added a callback/data arguments
- since we need it component_factory::xfer_folder.
-
- * component-factory.c (xfer_folder): Use mail_transfer_messages
- instead.
- (destination_folder_handle_drop): Update to pass in a NULL
- callback arg and a NULL data argument to mail_transfer_messages.
-
-2001-07-02 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (save_part): move the saving logic out of save_cb
- so that we can reuse it for the image saving code.
- (save_cb): call save_part.
- (save_url): new function to resolve an save an html url.
- (image_save_as): save function for images and. Add it to the
- link_menu, and add MASK_URL and MASK_SRC to the structure so that
- we cans show the proper menus.
- (html_button_press_event): call get_src as well to find external
- urls references. Add popup masking.
-
-2001-07-02 Peter Williams <peterw@ximian.com>
-
- * README.async: Add a warning about how wrong this document is.
-
-2001-07-02 Peter Williams <peterw@ximian.com>
-
- * mail-folder-cache.h: New file. Protoypes for the Mail Folder
- Cache, which provides a place for all the disparate pieces of the
- mailer to save bits of information about a folder. Centralizes the
- information display code.
-
- * mail-folder-cache.c: New file. Implements the Mail Folder Cache.
-
- * Makefile.am (evolution_mail_SOURCES): Add the
- mail-folder-cache.{c,h}
-
- * folder-browser-factory.c (fb_get_svi): Copy of that absurdly
- long-named function in mail-display.c that gets the
- GNOME_Evolution_ShellView.
- (control_activate): Set the ShellView for the folder cache.
-
- * folder-browser.c (got_folder): Tell the folder browser about
- this folder.
-
- * mail-callbacks.c (create_folders): Tell the folder cache about
- the new folders.
-
- * mail-local.c (reconfigure_folder_reconfigure): Don't unhook our
- events as we no longer hook them up.
- (register_folder_registered): Tell the folder cache about this
- folder's place in the local storage.
- (register_folder_register): No longer hook events; the Folder
- Cache will do this.
- (local_folder_changed, local_folder_changed_proxy): Move to
- mail-folder-cache.c
- (free_local_folder): No longer unhook events.
-
- * mail-ops.c (do_update_subfolders_rec): Instead of setting the
- folder status ourselves, inform the Folder Cache about the
- changes.
-
- * mail-tools.c (mail_tool_uri_to_folder): Replace danw's cache
- with the new Mail Folder Cache.
- (cache_folder, etc): removed.
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c: #include widgets/misc/e-charset-picker.h since
- it was moved there from libgal.
-
-2001-07-02 Peter Williams <peterw@ximian.com>
-
- * importers/evolution-mbox-importer.c (mbox_factory_fn): Kill
- irritating "Returning" g_warning.
-
-2001-07-02 Dan Winship <danw@ximian.com>
-
- * mail-session.c (get_filter_driver): Implement this, based on
- code that used to be in mail-ops.c
-
- * mail-ops.c (mail_load_filter_context, setup_filter_driver):
- Moved into MailSession::get_filter_driver.
- (filter_get_folder): Moved to mail-session.c
- (mail_filter_folder, mail_filter_on_demand, mail_fetch_mail,
- mail_send_mail, mail_send_queue): Remove FilterContext args, use
- camel_session_get_filter_driver.
-
- * mail-send-recv.c (mail_send_receive, mail_receive_uri):
- Remove FilterContexts
-
-2001-07-01 Chris Toshok <toshok@ximian.com>
-
- * subscribe-dialog.c (subscribe_dialog_gui_init): the FolderSearch
- control is in a different dockitem now.
-
-2001-07-01 Dan Winship <danw@ximian.com>
-
- * mail-tools.c (update_unread_count): Ref the folder before
- proxying the event, in case there's only one reference to it and
- it gets unreffed before the other end of the event handler runs.
- (update_unread_count_main): And unref it when we're done.
- (mail_tool_uri_to_folder): Only hold the lock around the hash
- table operations, not the entire function. Holding the lock the
- whole time can cause deadlock when resolving vfolders, and the
- CamelSession and CamelStore locks ensure that multiple threads
- calling this function will end up with the same CamelFolder object
- at the end anyway, so we just need to lock and re-check the cache
- at the end before adding the folder to the cache.
-
-2001-06-30 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-ui.c: Get MailNext/MailPrevious to use
- next-message.png and previous-message.png, respectively. Also
- change Print to use print.png.
-
-2001-06-30 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (make_popup_window): Changed to return the
- created window.
- (find_socket): Added. Copied from e-shell-view.c. The fact
- that I'm copying this bit of code all over isn't cool.
- (html_button_press_event): Properly destroy the popup window when
- the widget inside the control is destroyed.
-
- * mail-callbacks.c (addrbook_sender): Added. Implements
- the "Add sender to addressbook" right-click. (Bug #3645)
- (find_socket): Added. Copied from e-shell-view.c.
-
- * folder-browser.c: Added "Add sender to addressbook" to
- context_menu[].
-
- * mail-display.c: (handle_embedded_address_object): Removed.
- (on_object_requested): Removed handling for embedded address
- objects. (Which was obsolete crap.)
-
-2001-06-29 Larry Ewing <lewing@ximian.com>
-
- * mail-display.c (html_button_press_event): remove redundant
- logic.
-
- * mail-callbacks.c (create_msg_composer): make sure we show the
- sig file.
-
-2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c (control_deactivate): Turn folder
- syncing back on here so that IMAP folders will sync without
- needing to hit Send & Receive.
-
- * mail-callbacks.c (ask_confirm_for_only_bcc): Throw up the
- confirmation dialog.
- (composer_get_message): If the user only specified Bcc recipients,
- prompt him/her to make sure we should continue and risk the server
- adding an Apparently-To header.
-
- * mail-config.c (config_read): Read in config option for prompting
- when only Bcc recipients are specified.
- (mail_config_write_on_exit): Save the option.
- (mail_config_get_prompt_only_bcc): New.
- (mail_config_set_prompt_only_bcc): New.
-
-2001-06-29 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c (build_auth_menu): Take two authtypes lists,
- "all", and "supported", and make the unsupported authtypes grayed
- out in the menu rather than missing.
- (source_type_changed, transport_type_changed,
- service_check_supported): Update build_auth_menu calls.
-
-2001-06-29 Radek Doulik <rodo@ximian.com>
-
- * mail-account-gui.c (menu_file_save_cb): implemented plain saving
-
-2001-06-28 Radek Doulik <rodo@ximian.com>
-
- * mail-account-gui.c (load_signature): implemented plain load
- (load_signature): use e_msg_composer_get_signature_html
-
-2001-06-28 Peter Williams <peterw@ximian.com>
-
- * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal;
- this unsets the BCC recipients and so doesn't send to the Bcc'd
- people at all.
-
-2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (free_send_data): The e_iterator_get() returns
- a gconstpointer and we need a non-const BonoboControl so cast it.
-
- * mail-account-gui.c (mail_account_gui_new):
- gui->check_html_signature is GtkToggleButton not a GtkCheckButton.
-
- * folder-info.c: Added some #include's to supress warnings.
-
-2001-06-28 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-display.c: Fix case of labels in the `link_menu' so that it
- is consistent with that of the other menus in Evolution
- [i.e. "Copy Link Location" instead of "Copy Location" etc.].
-
-2001-06-28 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-display.c (invisible_selection_get_callback): New, signal
- handler for "selection_get" on the GtkInvisible widget we use for
- selections.
- (invisible_selection_clear_event_callback): New, signal handler
- for "selection_clear_event" on the same invisible widget.
- (mail_display_init): Initialize the `selection' and `invisible'
- members. Also, explicitly initialize all the other fields as
- well.
- (mail_display_destroy): Free `selection'. Destroy `invisible'.
- (link_copy_location): Re-implemented to just make the mail display
- become the owner of the primary selection.
- (on_selection_get): Remove `#if 0'ed code.
- (mail_display_new): Remove the `#if 0'ed code that would connect
- selection stuff to the HTML widget.
- (mail_display_new): Connect the signals and add the targets to the
- invisible widget.
-
- * mail-display.h: New members `selection' and `GtkInvisible' in
- `MailDisplay'.
-
-2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write_on_exit): Don't bother trying
- to save the passwd if the url is NULL.
-
- * folder-browser.c (vfolder_mlist): Strip the mlist name to fix
- bug #3732.
-
- * component-factory.c (destination_folder_handle_drop): Since we
- have an exception variable, we might as well use it when getting
- folders too.
-
- * folder-browser.c (message_list_drag_data_recieved): Call
- gtk_drag_finish.
-
-2001-06-28 Dan Winship <danw@ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): After finding a folder,
- attach to its "folder_changed" and "message_changed" signals.
- (update_unread_count, update_unread_count_main): Moved here from
- folder-browser but basically unchanged. Doing this here lets us
- get folder tree updates for folders that have had messages
- moved/copied/filtered into them, but which don't yet have a view
- associated with them.
-
- * folder-browser.c (update_unread_count, update_unread_count_main,
- etc): Moved to mail-tools.c
-
-2001-06-28 Radek Doulik <rodo@ximian.com>
-
- * mail-config.c: use new fields everywhere
-
- * mail-config.h: as below
-
- * Mail.idl: added html_signature and has_html_signature
-
-2001-06-28 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (component_fn): Register for the "mailto"
- schema.
- (handle_external_uri_cb): Callback for the "handle_external_uri"
- signal.
- (component_fn): Connect it.
-
-2001-06-27 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (component_fn): Pass NULL as the
- @external_uri_schemas argument to
- `evolution_shell_component_new()'.
-
-2001-06-27 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c: Uncomment EditSelectThread. Yaay!
-
- * mail-callbacks.c (select_thread): New function. Self-explanatory
- name. Implementation is a little hairy.
-
- * mail-callbacks.h: Prototype it here.
-
- * mail-callbacks.c (invert_selection): Here too.
- (select_all): Here too.
-
- * subscribe-dialog.c (subscribe_select_all): Update to use new
- ETree accessors.
- (subscribe_invert_selection): Here too.
-
-2001-06-27 jacob berkman <jacob@ximian.com>
-
- * folder-browser.c (save_cursor_pos): work around an e-tree bug
-
-2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c: Fixed Cut/Copy/Paste to work - it turns out I
- couldn't share a single GtkInvisible between all the
- FolderBrowser's after all.
-
-2001-06-27 Peter Williams <peterw@ximian.com>
-
- * folder-browser-factory.c (control_deactivate): Change to use
- more reality-based API below.
- Include folder-browser-ui.h too.
- (control_activate): Remove now-unused 'int state'.
-
- * folder-browser-ui.h: Changed prototypes to match changes below.
-
- * folder-browser-ui.c (folder_browser_ui_rm_message): Commented out
- to reflect reality of how this stuff works (you can't actually remove
- the pieces).
- (folder_browser_ui_rm_global): Same.
- (folder_browser_ui_rm_list): Left because here we add the view menus.
- (folder_browser_ui_add_list): ... which were moved here.
- (folder_browser_ui_rm_all): New function, does the job of old ui_rm()
-
-2001-06-26 Peter Williams <peterw@ximian.com>
-
- * folder-browser-ui.c: New file derived from
- folder-browser-factory.c. Contains the Bonobo UI code, split into
- three groups as described in ui/ChangeLog. Also contains the
- GalView stuff and the hookups into the Bonobo UI stuff.
-
- * folder-browser-factory.c: Move most of the UI stuff to
- folder-browser-ui.c.
- (control_activate): Add all three kinds of UI element to this
- folderbrowser.
- (control_deactivate): Remove all three kinds.
-
- * folder-browser-ui.h: New file. Prototypes functions to add UI
- elements to a FolderBrowser.
-
- * Makefile.am: Add folder-browser-ui.{c,h}
-
- * message-browser.c (PARENT_TYPE): Change to BONOBO_TYPE_WINDOW
- (message_browser_destroy): Chain to parent destroy function.
- (set_bonobo_ui): New function. Add the 'message' functions from
- the folder browser to our UI.
- (message_browser_close): BonoboVerbify this.
-
- * message-browser.h: Convert to BonoboWindow.
-
-2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (my_folder_browser_init): Helps if I spell
- "received" correctly.
-
- * mail-config.c (mail_config_set_thread_list): If the value is
- already in the hash table, first remove it before setting the new
- value so we don't leak.
- (mail_config_set_show_preview): Same.
-
-2001-06-26 Dan Winship <danw@ximian.com>
-
- * mail-mt.c (op_status_timeout): Don't pop up a progress dialog to
- say "I already finished this a while ago".
-
- * component-factory.c (storage_create_folder): Pass the path
- prefix to folder_created so it can add it to the folder tree in
- the right place.
-
- * mail-callbacks.c (folder_created): Take a path prefix.
-
-2001-06-26 jacob berkman <jacob@ximian.com>
-
- * mail-config.c (mail_config_get_show_preview): make ettore stop
- complaining so i can get back to work
-
-2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (message_rfc822_dnd): No longer returns a
- gboolean and also takes a CamelException.
- (destination_folder_handle_drop): Do better error checking.
-
- * folder-browser.c (my_folder_browser_init): Connect to the
- tree-drag-data-recieved signal.
- (message_list_drag_data_recieved): New function that handles the
- recieving end of the DnD event.
- (x_evolution_message_parse): New convenience function to parse the
- x-evolution-message type so that the cut/paste and DnD code can
- share it.
- (selection_received): Use x_evolution_message_parse().
-
- * mail-config.c (config_read): Read in the default show_preview
- value.
- (mail_config_write_on_exit): Save the default show_preview value
- as well as saving the individual settings for each URI that has
- been changed.
-
-2001-06-25 Joe Shaw <joe@ximian.com>
-
- * folder-browser.c (invisible_destroyed): Check to make sure that
- clipboard_selection is non-NULL before we g_byte_array_free() it.
-
-2001-06-25 jacob berkman <jacob@ximian.com>
-
- * mail-send-recv.c (free_send_data): sync folders after we've
- gotten mail
-
- * folder-browser-factory.c (control_activate): set the ui
- component on the folder browser
- (control_activate): update the view preview item
- (control_deactivate): don't sync the folder here
- (control_deactivate): unset the ui component of the folder browser
-
- * mail-callbacks.c (toggle_flags): stuff from jleach to add an
- importance keybinding
- (mark_as_important): ditto
- (toggle_as_important): again
-
- * mail-config.c (mail_config_get_show_preview):
- (mail_config_set_show_preview): basically a copy of
- get_thread_list() but for the preview pane
-
- * folder-browser.c (folder_browser_destroy): unref the our ui
- component
- (folder_browser_set_ui_component): new function for setting the ui
- component
- (save_cursor_pos):
- (set_cursor_pos): try to show the selected row when the preview
- pane is shown
- (folder_browser_set_message_preview): implement
- (folder_browser_toggle_preview): toggle the preview (duh)
- (on_key_press): add keybindings for marking as important (!), and
- hiding the preview pane (q)
- (etree_key): clean up a little bit, and make enter either show the
- preview pane or open the message
- (fb_resize_cb): only save the paned size if the preview is alread
- shown
- (folder_browser_gui_init): pass ourselves to fb_resize_cb
- (on_message_selected): only add the timeout if the preview is
- shown
-
-2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (folder_browser_destroy): Unref the invisible
- window that we use for slections.
- (folder_browser_class_init): Init the clipboard_atam type.
- (selection_get): New
- (selection_clear_event): New
- (selection_received): New
- (folder_browser_copy): New function to copy the message-list
- selection.
- (folder_browser_cut): New function to cut the message-list
- selection.
- (folder_browser_paste): New function to paste the message-list
- selection.
- (my_folder_browser_init): Initialize `invisible` if it's NULL else
- ref it - also set some signals on it.
-
- * folder-browser-factory.c: Added verbs for cut/copy/paste.
-
-2001-06-23 Jason Leach <jleach@ximian.com>
-
- * mail-local.c (local_storage_removed_folder_cb): Fixes here for
- removing folders.
-
- * mail-ops.c (remove_folder_get): Some fixes in here too.
-
-2001-06-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (config_read): Duh, we saved the charset as
- "default_charset", not "charset" - no wonder the correct charset
- menu item was never being set.
-
-2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Temporarily remove the Bcc
- header before sending the message.
-
-2001-06-21 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (html_button_press_event): Remove empty "name"
- property setting from the popup control.
-
-2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_get_message): Allow the message to be
- sent even if there are no To recipients but only as long as there
- are other recipients defined.
-
-2001-06-21 Jason Leach <jleach@ximian.com>
-
- * component-factory.c (mail_remove_storage): Deregister the
- storage from the shell so it will get removed from the folder
- tree.
-
-2001-06-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * folder-browser.c: More than one accel key is a tad
- confusing.
-
-2001-06-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c: #include "folder-browser-factory.h"
-
- * component-factory.c (mail_remove_storage): New function to
- remove an EvolutionStorage.
-
- * mail-accounts.c (mail_delete): Remove the storage from the
- folder-tree.
- (news_delete): Same.
-
-2001-06-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (destination_folder_handle_drop): Accept
- text/uri-list mime types - this allows us to drag messages from
- Nautilus into an Evolution folder.
-
- * folder-browser.c (message_list_drag_data_get): Do cleanup and
- better error handling.
-
-2001-06-19 Jon Trowbridge <trow@ximian.com>
-
- * mail-tools.c (mail_tool_do_movemail): Properly clean up the
- movemail files when no mail was received.
-
-2001-06-19 Radek Doulik <rodo@ximian.com>
-
- * mail-format.c (write_field_row_begin): add column with &nbsp;
- between header name and value
- (write_field_row_begin): hmm, use just bold &nbsp; as it looks
- better
-
-2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (destination_folder_handle_drop): Use a nice
- switch statement and use the new enum values.
-
- * mail-callbacks.c (list_add_addresses): Now takes a hash table of
- already-used-recipients so that we don't get duplicates.
- (mail_generate_reply): Pass in a rcpt_hash argument to
- list_add_addresses(). These changes fix bug #1639.
-
-2001-06-18 Dan Winship <danw@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Remove DB3_LDADD
-
-2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c: Change the drop-type "x-evolution-dnd" to
- "x-evolution-message" since we want to be able to DnD more than
- one data type ;-)
-
- * folder-browser.c: Change supported DnD drop types to disclude
- URI_LIST as that seems to crash Nautilus and seems overly
- complicated. Since I am going to be supporting message/rfc822,
- hopefully Nautilus can handle that or else maybe something like
- text/plain.
- (message_list_drag_data_get): Remove the code for URI_LIST.
-
-2001-06-14 Not Zed <NotZed@Ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): If we have a fragment in
- the url, use that as the folder name, and not the path component.
-
-2001-06-13 Not Zed <NotZed@Ximian.com>
-
- * component-factory.c (mail_load_storages): Added temp hack to let
- spool providers show up in the list.
-
-2001-06-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (my_folder_browser_init): Allow user's to
- "copy" drag & drop rather than just "move".
-
-2001-06-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (destination_folder_handle_drop): Implemented.
-
- * message-list.c (message_list_construct): Don't connect to the
- DnD signals here.
- (message_list_drag_data_get): Removed.
- (add_uid): Removed.
-
- * folder-browser.c (my_folder_browser_init): Connect to DnD signals.
- (message_list_drag_data_get): Implemented.
-
-2001-06-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Fixed misuse of an uninitialized
- variable.
-
- * component-factory.c (destination_folder_handle_drop): Implemented.
-
- * mail.h: Added prototype for evolution_folder_info_factory_init.
-
- * mail-ops.c (mail_do_transfer_messages): Now takes a const char*
- as the dest_uri. This works better all around since we strdup'd
- the string anyway.
-
-2001-06-15 Dan Winship <danw@ximian.com>
-
- * mail-format.c (mail_format_mime_message): We can't output
- "<html>" and "</html>" here because it gets called recursively to
- display message/rfc822 subparts.
- (mail_format_raw_message): Add padding to match the formatted
- display.
-
- * mail-display.c (mail_display_redisplay): Move rodo's html header
- changes from mail_format_mime_message to here.
-
-2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c (got_folder): Updated to reflect changes to
- mail_config_[g,s]et_thread_list().
- (folder_browser_toggle_threads): Same.
-
- * folder-browser-factory.c (control_activate): Updated to reflect
- changes to mail_config_[g,s]et_thread_list().
-
- * mail-config.c (mail_config_write_on_exit): Do cleanup when we're
- done.
- (mail_config_set_thread_list): Send in a URI so we can save the
- state on a per-folder basis.
- (mail_config_get_thread_list): Send in a URI so we can retrieve
- the state on a per-folder basis.
-
- * component-factory.c: Setup the accepted_dnd_types. Also added
- skeleton code for DnD.
-
-2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c: Add Reply-to-List bonobo verbs.
-
- * folder-browser.c: Add Reply-to-List menu items.
-
- * mail-callbacks.c (mail_reply): Use an enum for specifying the
- reply mode, becaus enow we can reply-to-list.
- (reply_to_list): Implement.
- (reply_to_sender): Use REPLY_SENDER.
- (reply_to_all): Use REPLY_ALL.
- (mail_generate_reply): Handle the different modes.
-
-2001-06-12 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Remove folder-info.h until iain checks it in
-
-2001-06-12 Not Zed <NotZed@Ximian.com>
-
- * mail-account-gui.c (source_type_changed): Setup default spool
- location same as for mbox mail retrieval.
-
-2001-06-08 Dan Winship <danw@ximian.com>
-
- * folder-browser-factory.c: fix some commands to match the ui file
- again.
-
-2001-06-07 Iain Holmes <iain@ximian.com>
-
- * GNOME_Evolution_Mail.oaf.in: Add server info for FolderInfo
- Remove server info for the Summary server
-
- * Mail.idl: Add a FolderInfo interface to retreive information about
- a mail folder.
-
- * Makefile.am: Remove the executive summary stuff. Add the folder-info
- files.
-
- * component-factory.c: Remove the mail-summary.h include.
- Remove summary_factory.
- (summary_fn): Remove.
- (component_factory_init): Remove the summary_factory creation.
- Initialise the info_factory.
-
-2001-06-08 Jon Trowbridge <trow@ximian.com>
-
- * mail-ops.c (mail_send_message): Reattach X-Evolution-Account
- information to the message after sending it. This way it can
- be used to set the identity properly if we later Resend the
- message.
-
- * mail-tools.c (mail_tool_get_local_movemail_path): If you had
- multiple accounts that used mboxes, and if you received mail in N
- of those accounts, you would get N copies of each of your e-mail
- messages. This is because everything was being dumped into one
- big file by movemail, and the filters would run on that file N
- times. To work around this, each mbox account now gets its own
- distinct temporary movemail file.
-
-2001-06-07 Jon Trowbridge <trow@ximian.com>
-
- * mail-ops.c (fetch_mail_fetch): Pass the original source URI
- to camel_filter_driver_filter_mbox.
- (mail_send_message): Pass NULL as the orginal source URI
- to camel_filter_driver_filter_message.
-
-2001-06-06 Jon Trowbridge <trow@ximian.com>
-
- * mail-account-gui.c (source_type_changed): Check that the chain
- of deferences in gui->account->source->url is safe. This was
- causing a segfault when adding a new account if any of the
- existing accounts had their sources set to "None".
- (i.e. gui->account->source == NULL)
-
- * mail-accounts.c (load_accounts): Check that account->source !=
- NULL before dereferencing it.
- (load_accounts): The selection is cleared when the account clist
- is rebuilt (say after a call to add), but no unselect event is
- emitted. Yes, the clist is evil. We work around this by
- explictly calling mail_unselect, our unselect signal handler.
- (Otherwise, the edit and delete buttons remain sensitive and
- accounts_row != 0, but the user can't see which row the dialog
- thinks is selected.)
- (load_news): Check the account->source != NULL before
- dereferencing it.
- (mail_unselect): If an insensitive button in a button box has the
- focus, and if you hit tab, there is a segfault deep inside of gtk.
- This is probably a gtk bug. We work around it by having the add
- button (which is always sensitive) grab the focus on an unselect.
-
-2001-06-05 Jason Leach <jleach@ximian.com>
-
- (Fix bug #3211: Should undelete when flagging a delete message as
- important)
-
- * message-list.c (on_click): When flagging a message as important,
- check to see if it's flagged as deleted, if so, undelete it.
-
- (Fix bug #314: Display URLs in statusbar on mouseover)
-
- * mail-display.c (html_on_url): New function, callback for
- GtkHTML's "on_url" signal.
-
-2001-06-05 Radek Doulik <rodo@ximian.com>
-
- * mail-format.c: make HTML and plain mails to have the same
- boundary
-
-2001-06-03 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Move `$(DB3_LDADD)' before
- libeutil.
-
-2001-06-01 Federico Mena Quintero <federico@ximian.com>
-
- * folder-browser.h (FolderBrowser): Added fields for the
- GalViewMenus and GalViewCollection, since we need to keep them
- around while the component is active.
-
- * folder-browser-factory.c (folder_browser_setup_view_menus): Plug
- leaks; unref the spec and factory. Set the view collection and
- the view menus on the FolderBrowser object.
- (folder_browser_discard_view_menus): New function.
- (control_deactivate): Discard the menus.
-
- * folder-browser.c (folder_browser_destroy): Destroy the view
- collection and the view menus.
-
-2001-06-01 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Add `$(DB3_LDADD)'.
-
-2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_save): Save the pgp and
- smime settings.
- (mail_account_gui_new): Setup the pgp and s/mime page (but disable
- the s/mime frame if we are not compiled with s/mime support).
-
- * mail-config.c (account_copy): Updated to save extra pgp and
- smime options.
- (account_destroy): Free draft/sent folder info and also the new
- pgp/smime keys.
- (config_read): Read in the pgp and s/mime config options.
- (mail_config_write): Save the account pgp and smime options.
-
-2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (source_type_changed): Call
- build_extra_conf() here too. This is when we REALLY want to call
- it anyway, not on switch-page because then we'd lose any data on
- the Receive Options page if we never switch to that page before
- applying the changes.
-
- * mail-account-editor.c (construct): Don't connect to the
- switch-page event, instead just call build_extra_conf() here with
- the source->url.
-
-2001-06-01 Dan Winship <danw@ximian.com>
-
- * mail-config.c (config_read): Fix dumb misuse of g_get_charset.
-
-2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_signed): Removed the code to
- check for the validity of an S/MIME part. Stuff works differently
- now.
-
- * mail-crypto.c: Rewrote how the S/MIME stuff is going to work.
-
-2001-05-30 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: Rename the "PGP" page back to "Other" and add
- a "default charset" option menu.
-
- * mail-config.c (config_read, mail_config_write_on_exit,
- mail_config_get_default_charset, mail_config_set_default_charset):
- Handle "default charset".
-
- * mail-accounts.c (construct): Fill in the "default_charset" menu
- with an e_charset_picker menu.
- (charset_menu_deactivate): Update the default charset.
-
-2001-05-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (list_add_addresses): Take another argument to
- ignore a certain address.
- (mail_generate_reply): Ignore references to the reply-to address
- when constructing the Cc list.
-
-2001-05-29 Jason Leach <jleach@ximian.com>
-
- * message-browser.c (message_browser_new): one-line fix for bug
- #2536: File->Close in message viewer doesn't work.
- (message_browser_new): Also replaced like 4 lines of code with a
- one-liner featuring gnome_app_create_toolbar_with_data().
-
-2001-05-28 Jason Leach <jleach@ximian.com>
-
- * mail-local.c (load_metainfo): Don't need to check if (foo!=NULL)
- before doing an xmlFreeDoc().
-
-2001-05-28 Dan Winship <danw@ximian.com>
-
- * mail-format.c (write_text_header): Fix a bug that could cause a
- crash on messages with an empty subject. Oops.
-
-2001-05-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c: Removed the etable spec string.
- (message_list_construct): Load the etable spec from a file.
-
- * folder-browser-factory.c: Load the etable spec from the file,
- not a string.
-
- * Makefile.am: Add message-list.etspec to be installed.
-
- * message-list.etspec: New file containing the ETable file
- specification.
-
- * mail-config.h: Prototype evolution_mail_config_get_type.
-
-2001-05-27 Dan Winship <danw@ximian.com>
-
- * folder-browser-factory.c: #include
- "evolution-shell-component-utils.h" rather than "e-gui-utils.h"
- for e_pixmaps_update.
-
- * subscribe-dialog.c: Likewise.
-
-2001-05-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (try_inline_pgp_sig): Fix to work properly.
- (handle_multipart_signed): Fixed a bug that caused some
- multipart/signed messages to be handled by the multipart_mixed
- handler.
-
-2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c: Added callbacks for Next/Previous
- Unread and Next/Previous Flagged message.
-
- * mail-callbacks.c (previous_flagged_msg): Implemented.
- (next_flagged_msg): Implemented.
-
-2001-05-26 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (mail_send_message, transfer_messages_transfer,
- set_offline_do): When unreffing a folder we got ourselves (as
- opposed to one passed in by the caller), sync before unreffing,
- since we might be holding the only reference to it.
- (mail_refresh_folder): New op, like mail_sync_folder, but does a
- camel_folder_refresh_info instead.
-
- * folder-browser-factory.c (control_activate): Call
- mail_refresh_folder, not mail_sync_folder. (The goal is to see new
- messages: sync used to work with imap because imap_sync was
- broken, but it doesn't work for that any more.)
-
-2001-05-25 Peter Williams <peterw@ximian.com>
-
- * Makefile.am: Reference libeshell.la instead of libeshell.a.
-
-2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c (control_activate): Disable Resend on
- non-Sent folder FolderBrowsers. Thanks to Wayne Davis for this
- patch.
-
- * component-factory.c (xfer_folder): This code should be correct
- now. Still waiting on the shell to do it's job of creating the
- metadata xml file in the destination folder though.
-
-2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (message_list_select_uid): g_strdup the uid into
- the ml->cursor_uid.
-
- * message-browser.c (message_browser_forward_msg): Use the default
- forward style.
-
-2001-05-24 Dan Winship <danw@ximian.com>
-
- * mail-identify.c (mail_identify_mime_part): If the message data
- is online, sniff the data for a MIME type first, and use the
- filename second. Makes it more reliable, and deals with the
- specific case of "application/octet-stream; name=foo.vcf" which
- gnome-vfs will identify as vcalendar, but which can also be a
- vcard.
-
-2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (try_inline_pgp_sig): Only write the message up to
- (but not including) the attached signature block.
-
-2001-05-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (composer_postpone_cb): Don't free the
- folder-info here, instead have mail_append_mail() call our new
- function, append_mail_cleanup() which'll free the
- folder-info. This fixes the problem of send-later segfaulting.
-
- * message-list.c (message_list_set_folder): Make the message-list
- respect the "hide deleted messages" setting. Fixes bug #2248.
-
- * component-factory.c (xfer_folder): New function that the shell
- component calls to copy/move a folder.
- (component_fn): Set the xfer_folder_fn argument.
-
- * mail-ops.c (mail_remove_folder): New async function to remove a
- folder. God knows if it does what the ShellComponent needs or not
- yet.
- (mail_xfer_folder): Yet another yummy async function to move or
- copy a folder to a new location.
-
- * component-factory.c (storage_remove_folder): New function for
- removing folders.
- (remove_folder): New function that the shell component calls to
- delete a folder.
- (component_fn): Set the remove_folder_fn argument.
-
-2001-05-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write_on_exit): Save the
- message-display style.
- (config_read): Read the message-display style.
-
-2001-05-22 Dan Winship <danw@ximian.com>
-
- * mail-display.c (on_url_requested): If http mode is
- HTTP_SOMETIMES, use e_book_query_address_locally to check the From
- address and load images if it's found.
-
- * mail-config.c (config_read): Default http_mode to
- MAIL_CONFIG_HTTP_SOMETIMES. Fix typo to make default forward style
- actually work.
-
-2001-05-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Use MAILER_CFLAGS and MAILER_LIBS.
-
- * message-browser.c (message_browser_folder_loaded): Instead of
- calling message_list_select_uid() here, instead connect to the
- "message_list_loaded" signal since the message-list is not built
- yet at this point.
- (message_browser_message_list_built): Call
- message_list_select_uid() here instead.
-
- * message-list.c: Lets have a new signal, MESSAGE_LIST_BUILT, that
- gets emitted when the message-list has finished being built by one
- of the built_*() functions.
- (message_list_class_init): Setup the signal stuff.
- (regen_list_regened): Emit the signal here (should this perhaps be
- moved into each of the build_*() functions instead?).
-
-2001-05-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * mail-local.c: Mark a string for translation.
-
-2001-05-18 Jon Trowbridge <trow@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Added libebook.la (which is
- now required by the composer.)
-
-2001-05-17 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (composer_postpone_cb): mark Outbox messages as
- read.
-
-2001-05-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_write_authenticity): New convenience
- function for all signature verification functions to use to
- display whether or not the signed part was authentic.
- (try_inline_pgp_sig): Use mail_write_authentic().
- (handle_multipart_signed): Add code to handle S/MIME
- multipart/signed parts and also use mail_write_authenticity().
-
-2001-05-17 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: add new icons from jimmac.
-
-2001-05-16 Dan Winship <danw@ximian.com>
-
- * mail-format.c (mail_format_raw_message): add
- E_TEXT_TO_HTML_ESCAPE_8BIT to the flags
-
-2001-05-16 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (folder_browser_is_drafts,
- folder_browser_is_sent, folder_browser_is_outbox): Functions to
- determine if a folderbrowser is one of the drafts, sent, or outbox
- folders.
- (got_folder): Pass TRUE for the "outgoing" flag to
- message_list_set_folder if this is a Sent, Drafts, or Outbox
- folder.
-
- * message-list.c (message_list_set_folder): Take a flag saying
- whether or not the folder is an "outgoing" folder.
- (message_list_setup_etree): Ditto. Use that rather than a
- hardcoded list of foldernames for deciding whether to swap From
- and To in the default layout.
-
- * mail-config.c (mail_config_folder_to_cachename): Make IMAP
- folders have unique cachenames rather than only one per store, so
- that IMAP Sent and Drafts folders don't get forced into having the
- same layout as the INBOX.
-
- * mail-callbacks.c: (is_sent_folder, is_drafts_folder): Gone.
- Replaced with simpler folder_browser_is_* routines.
- (edit_msg, resend_msg, open_msg): Use folder_browser_is_*
- routines.
-
- * mail-local.c (reconfigure_clicked): Update call to
- message_list_set_folder.
-
-2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (mail_crypto_is_smime_v3_signed): Removed (this
- now exists in camel/camel-smime.c).
- (mail_crypto_is_pkcs7_mime): Same.
- (mail_crypto_smime_part_sign): new
- (mail_crypto_smime_part_verify): new
- (mail_crypto_smime_part_encrypt): new
- (mail_crypto_smime_part_decrypt): new
- (mail_crypto_pgp_mime_part_sign): Added code to set an exception
- if the context fails to be created.
- (mail_crypto_pgp_mime_part_verify): And here...
- (mail_crypto_pgp_mime_part_encrypt): Same.
- (mail_crypto_pgp_mime_part_decrypt): And here too.
-
-2001-05-16 Dan Winship <danw@ximian.com>
-
- * mail-display.c (mail_display_redisplay): Deal with full-header
- mode in addition to source mode
-
- * mail-format.c (write_field_row_begin): Add WRITE_NOCOLUMNS flag
- to write the header in a single table cell rather than two. Output
- the second columns's "<td>" when not in NOCOLUMNS mode. Don't
- include the ":" in the passed-in header name.
- (write_date, write_address): Update for write_field_row_begin
- changes.
- (write_text_field): Genericified and updated from write_subject.
- (write_headers): Deal with both normal and full-header mode.
-
-2001-05-15 Dan Winship <danw@ximian.com>
-
- * mail-display.c (on_url_requested): Load http images if the user
- has force-loaded images too.
- (mail_display_redisplay): Update for normal/headers/source changes.
- (mail_display_load_images): New. Force HTTP image loading for the
- current message.
-
- * mail-config.c (mail_config_get_message_display_style,
- mail_config_set_message_display_style): Updated and renamed from
- mail_config_{get,set}_view_source
-
- * mail-callbacks.c (load_images): New.
-
- * folder-browser.c (folder_browser_set_message_display_style):
- Renamed and updated from folder_browser_toggle_view_source.
-
- * folder-browser-factory.c (verbs): Add ViewLoadImages.
- (control_activate): Update for normal/headers/source change to
- radio group.
-
-2001-05-15 Dan Winship <danw@ximian.com>
-
- * folder-browser-factory.c (verbs): Update for changes in
- evolution-mail.xml (many commands were renamed to better match the
- current menu layout).
- (pixcache): Refer to commands via their paths in /commands/
- rather than hardcoding their menu paths.
-
-2001-05-14 Jon Trowbridge <trow@ximian.com>
-
- * mail-search.c (mail_search_construct): Put frame around dialog
- vbox, put mail subject in that frame's label. (Patch by Duncan.)
- (mail_search_set_subject): Break out subject-setting code.
- Truncate long subjects with ellipses.
-
-2001-05-14 Duncan Mak <duncan@ximian.com>
-
- * mail-search.c (mail_search_construct): set the dialog's
- window_icon to jimmac's new find_message.xpm.
-
-2001-05-13 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Make the LDADD line longer so it actually compiles
- everything correctly.
-
-2001-05-14 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: Split "Other" page into three pages, Display,
- Composer, and PGP. Add HTML image stuff on the Display page and
- default forward style on the Composer page.
-
- * mail-config.c (mail_config_get_default_forward_style,
- mail_config_set_default_forward_style): User-specified default
- style for forwarding messages.
- (config_read, mail_config_write_on_exit): Deal with forward style.
-
- * mail-accounts.c: Handle HTML image display options and default
- forward style.
-
- * mail-callbacks.c (forward): New. Forward in the user-selected
- default style.
- (forward_inline, forward_quoted): Simplify these some. Remove the
- fallback to forward attached when forwarding multiple messages: it
- should just forward the multiple messages inline or quoted in
- those cases. (Which it doesn't yet, but that's a bug.)
-
- * folder-browser.c (context_menu): Remove "Forward inline" and
- make "Forward" call forward() rather than forward_attached().
-
- * folder-browser-factory.c: Update command/menu/toolbar/pixmap
- gunk for the "MessageForwardAttached" vs "MessageForward" split.
-
- * mail-session.c (mail_session_get_type):
- * mail-format.c (format_mime_part):
- * mail-account-gui.c (setup_service): Fix warnings.
-
- * mail-mlist-magic.c: Remove this... it's not used any more.
-
- * folder-browser.c:
- * message-browser.c: Remove references to mail-mlist-magic.h
-
-2001-05-14 Jon Trowbridge <trow@ximian.com>
-
- * folder-browser.c (folder_browser_config_search): Use secondary
- searches here, so that we control the interference between the two
- bits of searching UI.
-
-2001-05-13 Jon Trowbridge <trow@ximian.com>
-
- * mail-search.c (mail_search_construct): Destroy the MailSearch
- dialog if the underlying MailDisplay is destroyed. I don't like
- the way that label in the dialog with the message subject in it
- looks, so I've #ifdef-ed it out for now. Center the Matches
- label --- it makes the dialog look more balanced, I think.
- (dialog_clicked_cb): Changed to reflect adjusted
- ESearchingTokenizer API, using primary searches.
- (toggled_case_cb): Use the primary search API.
-
- * e-searching-tokenizer.c: Make searching routines utf8-friendly.
- Rationalize how the match begin/end markup is handled; allow for
- begin/end markup that varies by search. Add concept of primary and
- secondary matching, to disentangle possible interactions between
- search-bar searches and search-dialog searches.
-
-2001-05-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (mail_local_storage_shutdown): Get rid of this - we
- don't need it.
-
- * component-factory.c (owner_unset_cb): Don't unref the LocalStore
- - we don't own a ref on it!!
-
-2001-05-12 Duncan Mak <duncan@ximian.com>
-
- * mail-search.c (begin_cb): Updates the subject on refresh and
- sets subject to "Untitled Message" if subject is NULL.
- (mail_search_construct): Moved msg_subject to its own GtkLabel,
- sets subject to "Untitled Message" if subject is NULL. Give focus
- to entry by default. Made <enter> in entry run
- dialog_clicked_cb by setting gnome_dialog_editable_enters.
-
-2001-05-12 Gediminas Paulauskas <menesis@delfi.lt>
-
- * folder-browser-factory.c: load pixmaps for MessageCopy and
- MessageForwardAttached. Thanks Wayne Davis <wfdavis@seas.upenn.edu>
- for a patch.
-
-2001-05-11 Dan Winship <danw@ximian.com>
-
- * mail-display.c (load_http): callback to use GNOME-VFS to load
- http data.
- (on_url_requested): Handle http: URLs that refer to either MIME
- parts or web data.
- (mail_display_redisplay_when_loaded): Moved out of
- mail_content_loaded and made more generic.
-
- * mail-format.c (add_url): Handle two different kinds of URLs
- (URLs that point to CamelMimeParts and URLs that point to
- GByteArrays).
- (mail_content_loaded): Use mail_display_redisplay_when_loaded.
- (format_mime_part): Renamed from "call_handler_function". Also,
- record Content-Location if the part has one. (This is not yet 100%
- correct: it doesn't deal with relative URLs at all.)
- (handle_text_html): Use Content-Location URL rather than
- Content-ID, when available (will help deal with relative URLs once
- GtkHTML supports that better).
- (etc): Update for changes.
-
- * mail-config.c (mail_config_get_http_mode,
- mail_config_set_http_mode): get/set HTTP image downloading mode.
- (config_read, mail_config_write_on_exit): save/load that data.
-
-2001-05-11 JP Rosevear <jpr@ximian.com>
-
- * mail-importer.h: add proto
-
- * mail-importer.c (mail_importer_uninit): release and unref the
- local storage
-
- * mail-local.c (mail_local_store_finalize): use
- bonobo_object_release_unref rather than doing Bonobo_Unknow_unref
- and a corba release
- (register_folder_registered): "sink" the local_store ref to
- prevent circular ref
- (mail_local_storage_shutdown): unref the local store
-
- * mail-local.h: new proto
-
- * component-factory.c (owner_unset_cb): uninit the importer and
- shutdown the local storage
-
-2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (mail_local_reconfigure_folder): Set a title on the
- window "Reconfigure %s" where %s is the folder name. Also, don't
- allow more than one of these type windows to be opened per folder.
-
- * mail-tools.c (mail_tool_get_folder_name): Fix Danw's kludge to
- actually work :-)
-
-2001-05-11 Martha Burke <martha@ximian.com>
-
- * gui/Makefile.am: sanitize LD_ADDS and CFLAGS so the libtool
- lines are shorter (fixes problem on solaries due to sed)
-
-2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (vfolder_edit): Don't allow multiple copies of
- this to be run at a time.
-
- * mail-callbacks.c (providers_config): Don't allow multiple copies
- of this to be run at a time.
- (manage_subscriptions): Same, but this was a tad more kludgy since
- we don't gnome_dialog_run_and_close() this one. I had to make the
- widget a semi-global variable. yuck :\
- (filter_edit): Same.
-
-2001-05-11 Jon Trowbridge <trow@ximian.com>
-
- * e-searching-tokenizer.c (e_searching_tokenizer_new):
- Remove a snippet of debugging code I left in by mistake.
-
-2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (forward_inlined): If the cursor_uid is NULL,
- then we can't forward anything so just return.
- (forward_quoted): Same.
-
-2001-05-10 Jon Trowbridge <trow@ximian.com>
-
- * folder-browser.c (folder_browser_config_search): Use the
- ESearchingTokenizer to highlight search matches for folder-level
- searches. Still mildly broken, but it works for the simple cases.
-
- * mail-display.c (mail_display_new): Use our ESearchingTokenizer
- for the mail display GtkHTML widget.
-
- * mail-search.c (dialog_clicked_cb): Use the ESearchingTokenizer to
- highlight search matches.
- (mail_search_construct): Add a match count to the search dialog.
-
- * e-searching-tokenizer.c
- (e_searching_tokenizer_set_search_string): Added. A custom HTML
- tokenizer that does highlighting of search strings.
-
- * mail-config.c: No, we don't want to include
- bonobo-running-context.h... just bonobo-context.h.
-
-2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c: Fix some compiler warnings by including the
- correct bonobo headers and by using the correct bonobo types.
- (config_read): Some fixes so that we can never have an empty
- string as a URL.
-
-2001-05-10 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (on_key_press): Don't advance to the next
- undeleted message after "Delete"...
-
- * mail-callbacks.c (delete_msg): ...instead, do it here, whether
- the user used Delete, Alt+D, or the toolbar. (But only if they
- only deleted a single message.)
-
- * message-list.c (message_list_select): Don't clear the display on
- failure.
- (build_tree): Clear the display when the currently-selected
- message stops existing and we don't have an obvious message to
- select instead of it. (Eg, when deleting the last message with
- "hide deleted messages" set, or expunging while a deleted message
- is selected.)
-
-2001-05-09 Dan Winship <danw@ximian.com>
-
- * mail-offline-handler.c: New file, started by Ettore, finished by
- me, to implement the GNOME_Evolution_Offline interface.
-
- * Makefile.am (evolution_mail_SOURCES): Add
- mail-offline-handler.[ch]
-
- * mail-ops.c (mail_store_set_offline): Set a store online or
- offline.
-
- * mail-send-recv.c (auto_timeout): Don't run auto-check-for-mail
- while the session is offline.
-
- * component-factory.c (component_fn): Set up offline handler.
-
-2001-05-09 Christopher James Lahey <clahey@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Made a const
- char * here.
-
-2001-05-08 Iain Holmes <iain@ximian.com>
-
- * mail-config.[ch]: Moved all references to the Bonobo stuff into the .c file
-
-2001-05-08 Iain Holmes <iain@ximian.com>
-
- * mail-callbacks.c (filter_edit): Set the title of the dialog.
-
- * GNOME_Evolution_Mail.oaf.in: Add a reference for the MailConfig
- interface stuff.
-
- * Mail.idl: Add the MailConfig interface, and a MailFilter interface.
-
- * component-factory.c (component_factory_init): Call
- evolution_mail_config_factory_init.
-
- * mail-account-gui.c (setup_service): Just return if url == NULL,
- don't crash.
-
- * mail-config.c: #include bonobo-object.h, #include Mail.h and define
- the Config factory IID.
- Implement the MailConfig interface with a BonoboObject.
- (impl_GNOME_Evolution_MailConfig_addAccount): Convert the CORBA struct
- into the correct MailConfig structures and add the account.
- (evolution_mail_config_class_init): Initialise the class.
- (evolution_mail_config_init): This function is intentionally left blank.
-
- (evolution_mail_config_factory_fn): Create an EvolutionMailConfig object
- and return it.
- (evolution_mail_config_factory_init): Set up the bonobo factory.
-
- * mail-config.h: #include bonobo-xobject.h and Mail.h
- Declare the object structures.
-
- * importers/Makefile.am: Remove the intelligent importers.
-
- * importers/evolution-mbox-importer.c (folder_created_cb): Callback
- from when the folder is created. Opens the folder and unrefs the
- listener.
- (load_file_fn): Create the folder if it doesn't exist.
-
-2001-05-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_forward_message): Convert the Subject
- header to HTML and also make sure that the Subject, To, and From
- header values are non-NULL before feeding them into
- e_text_to_html().
-
- * mail-callbacks.c (edit_msg_internal): Free the UIDs if the user
- decides to not go through with editing all the messages he
- selected.
- (resend_msg): If the user attempts to resend more than 10
- messages, make sure he really means it.
- (do_resend_messages): Richard Zach feels that "Resend" should open
- the message(s) in a composer since he might want to edit at least
- the recipients (maybe he needs to resend because the message
- bounced the first time) and Ettore wants pretty much the same
- thing. This makes "Resend" basically the same as "Edit" but for
- previously sent messages, whereas "Edit" is only for Drafts.
-
-2001-05-08 Gediminas Paulauskas <menesis@delfi.lt>
-
- * mail-search.c: convert search entry to utf8.
-
- * mail-local.c: d() debugging message.
-
- * mail-send-recv.c: replace " ..." with "..."
-
- * Makefile.am: removed EVOLUTION_VERSION.
-
-2001-05-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c: s/HAVE_NSS/HAVE_SSL for the SSL checkbox
- stuff.
-
-2001-05-07 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (my_folder_browser_init): Connect to
- key_press_event on the GtkHTML widget.
- (etree_key): Only handle space/backspace here, pass the rest off
- to on_key_press.
- (on_key_press): Handle Delete/N/P/Menu in either MessageList or
- MailDisplay.
-
- * message-list.c (message_list_select): Grab focus if we don't
- have it.
-
-2001-05-03 Dan Winship <danw@ximian.com>
-
- * message-list.c: #include <camel/camel-file-utils.h>
-
- * mail-ops.c (get_folderinfo_get):
- * subscribe-dialog.c (build_tree): Update for
- camel_store_get_folder_info prototype change.
-
- * mail-format.c (handle_text_plain_flowed): Improve more on the
- fix from the other day: the first level of indentation adds blank
- lines, but further levels don't...
-
-2001-04-30 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (folder_browser_destroy): Unhook event handlers
- before syncing the folder, since the folder browser will have been
- destroyed by the time the sync thread completes and calls the
- signal handlers.
-
-2001-04-29 Dan Winship <danw@ximian.com>
-
- * mail-format.c (handle_text_plain_flowed): Mojo this a bit so
- that "\n\n>" gets translated to "<br><blockquote>" rather than
- "<br><br><blockquote>", since the transition to blockquote mode
- creates a blank line itself. Makes Mozilla-generated flowed
- replies look better.
-
-2001-04-27 Dan Winship <danw@ximian.com>
-
- * mail-session.c: Renamed from session.c and made to be a subclass
- of CamelSession.
-
- * mail-mt.c (mail_user_message): Renamed from mail_get_accept and
- made more general-purpose, to implement the new
- camel_session_alert_user.
-
-2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * main.c (main): No need to camel_shutdown() anymore...
-
- * mail-callbacks.c (next_msg): Don't filter on Seen status.
- (previous_msg): Same.
- (next_unread_msg): New function that does what the old callback
- next_msg callback did (only better named).
- (previous_unread_msg): Same.
-
- * message-list.c (hide_load_state): Updated to use camel-file-util
- routines.
- (hide_save_1): Same.
- (hide_save_state): And here too.
-
-2001-04-26 Dan Winship <danw@ximian.com>
-
- * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS
-
- * mail-format.c (handle_text_plain_flowed): Use <font color=...>
- to mark citations rather than italicizing them, which has never
- looked very nice. Now this is more consistent with the non-flowed
- case.
-
-2001-04-26 Jon Trowbridge <trow@ximian.com>
-
- * folder-browser-factory.c: Added "MessageSearch" verb.
-
- * mail-callbacks.c (search_msg): Added search callback.
- (are_you_sure): Added some casts to fix compiler warnings.
-
- * mail-search.c: Added. A simple search-in-message widget,
- that uses GtkHTML's searching capabilities.
-
-2001-04-25 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (are_you_sure): New foot-shooting-prevention
- helper function.
- (edit_msg_internal, view_msg): If the user has more than 10
- messages selected, ask before opening them all in separate
- windows, to protect against misclicks/typos after "select all"
- (which we've had at least two reports of now).
-
-2001-04-25 Radek Doulik <rodo@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): set object data directly
- in HTML source
-
- * mail-callbacks.c (mail_generate_reply): remove \n from citation
- (mail_generate_reply): don't use e_msg_composer_mark_text_orig
-
-2001-04-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c: Added a new signal, "message_loaded" that gets
- emitted when the message has been loaded and set on the
- mail_display.
- (folder_browser_class_init): Define the "message_loaded" signal
- stuff.
- (done_message_selected): Emit the "message_loaded" signal here.
-
- * message-browser.c (message_browser_next_msg): Do our own
- message-list manipulation. We want the next message, not the next
- unread message.
- (message_browser_prev_msg): Same here but for previous.
- (message_browser_new): Connect to the folder browser's
- "message_loaded" signal.
- (message_browser_folder_loaded): Don't connect to the
- message-list's "message_selected" signal.
- (message_browser_message_loaded): Nw callback which replaces the
- old message_browser_message_selected callback's functionality.
-
-2001-04-24 Dan Winship <danw@ximian.com>
-
- * folder-browser.c: Add accelerators to the context menu.
- (on_right_click): Use e_tree_get_cell_geometry and a
- GtkMenuPositionFunc when responding to a Menu-key press so we can
- line the menu up with the selected row rather than the cursor.
-
- * message-browser.c: include <gal/util/e-util.h> for E_MAKE_TYPE.
-
-2001-04-23 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (html_button_press_event): Check for mailto:
- links, and pop up our mail address menu when we find one.
- (make_popup_window): The main piece of code (ignoring a zillion
- little callbacks) to pop up our windows with reasonable semantics
- for having them close automatically.
- (mail_text_write): Enable converting addresses to mailto links
- in message bodies.
-
- * mail-format.c (write_address): Simplify code, removing Radek's
- <DATA> hacks. Write out addresses as mailto: links.
-
-2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (do_view_message): Use the message-browser
- widget rather than the mail-view window.
-
- * mail-view.c: Removed.
-
- * folder-browser.c: Added a folder_loaded signal.
-
- * message-browser.[c,h]: New window to solve all our message
- browsing needs. This replaces mail-view.c.
-
- * message-list.c (message_list_select_uid): New function needed by
- the new message-browser window.
-
-2001-04-23 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (save_msg): Append a "/" to the result of
- g_get_home_dir so gets the default dir it was supposed to.
-
-2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Lets do proper refcounting on
- the sent-folder. Also, g_strdup() the sent_folder_uri since we
- later free it. If we don't, then we get lovely corrupt memory.
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_sign): Make sure we
- have a context before we try and use it.
-
-2001-04-22 Gediminas Paulauskas <menesis@delfi.lt>
-
- * folder-browser.c, mail-autofilter.c, mail-callbacks.c,
- mail-ops.c, mail-summary.c, mail-vfolder.c: use system =
- EVOLUTION_DATADIR "/file" instead of g_strdup_printf. Rename
- userrules to user (and system) to be consistent.
-
- * mail-send-recv.c: set window icon to send-receive.xpm
-
-2001-04-21 Gediminas Paulauskas <menesis@delfi.lt>
-
- * mail-summary.c: translate "Mail summary".
-
-2001-04-20 Dan Winship <danw@ximian.com>
-
- * mail-config-druid.c (make_default_account): Convert the result
- of g_get_real_name() from the locale charset to UTF8. Noted by
- Petter Sundlf (NOT "Petter Sundl_" :)
-
-2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_set_pgp_type): Use a CamelPgpType.
- (mail_config_get_pgp_type): Return a CamelPgpType.
- (auto_detect_pgp_variables): auto-detect the user's pgp settings.
-
-2001-04-20 Dan Winship <danw@ximian.com>
-
- * mail-format.c (handle_text_plain): Fix a dumb thinko in my 04-11
- patch.
-
-2001-04-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * mail-ops.c: (send_mail_desc): Convert subject from utf8
- before passing it on.
-
-2001-04-20 Gediminas Paulauskas <menesis@delfi.lt>
-
- * mail-display.c: #if 0'd out my not-working selection code
-
-2001-04-19 Dan Winship <danw@ximian.com>
-
- * mail-format.c (mail_format_raw_message): Make this more raw:
- don't do URLs and citations.
-
-2001-04-18 Dan Winship <danw@ximian.com>
-
- * session.c (request_callback): Don't need to dup the string: the
- relevant gnome-dialog routine already does.
-
- * message-list.c (message_list_destroy): Free the uid_nodemap.
- (hide_save_state): Free the filename when we're done.
-
-2001-04-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (is_sent_folder): Implemented.
- (resend_msg): Use is_sent_folder().
-
-2001-04-17 Dan Winship <danw@ximian.com>
-
- * mail-mt.c (mail_msg_check_error): Fix a memory leak.
-
-2001-04-16 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/Makefile.am (INCLUDES): Add `$(EXTRA_GNOME_CFLAGS)'
- here.
-
-2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mark_all_as_seen): Mark the messages as seen,
- not unseen.
- (is_drafts_folder): New function to attempt to determine if a
- folder is a drafts folder.
- (open_msg): Use is_drafts_folder().
- (edit_msg): And here.
- (edit_msg_internal): New function that doesn't do the drafts
- checking and is only to be used internally. This should save us
- from having to doubly-check a folder to see if it's a drafts
- folder when doing an Open on the message.
- (open_msg): Call edit_msg_internal once we've established that the
- folder is a drafts folder.
-
-2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_verify): Only use
- non-NULL contexts.
- (mail_crypto_pgp_mime_part_encrypt): Same.
- (mail_crypto_pgp_mime_part_decrypt): And here too.
-
- * mail-format.c (try_inline_pgp_sig): Make sure to not use the
- context if it is NULL.
- (decode_pgp): Same.
-
- * folder-browser-factory.c: Added stuff for filtering/vfoldering
- on mailinglists.
-
-2001-04-13 Dan Winship <danw@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Remove some redundant LIBS
- variables... purify complained that the command line was too
- long. :-}
-
- * mail-account-gui.c: Plug leaks.
-
- * mail-display.c (on_url_requested): close the html stream on
- error too.
-
- * mail-ops.c (fetch_mail_fetch): Move a line around that probably
- doesn't affect anything, but it's correct.
-
- * session.c (auth_callback): Plug leak.
-
- * mail-send-recv.c (receive_status): Initialize "now".
-
-2001-04-13 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (on_cursor_activated_cmd): Only activate the
- message if the cursor has moved.
-
-2001-04-12 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (e_mail_address_new): Updated this function to be
- a correct full ordering.
- (ml_has_get_node_by_id, ml_get_node_by_id): Implemented these
- functions.
- (find_next_undeleted): Changed this to find next sorted undeleted
- message. Also, changed it so that if the current message is not
- deleted, it returns NULL.
- (build_tree, build_flat): Changed these to only set the cursor if
- the cursor is changed.
-
- * subscribe-dialog.c: Changed this to pass NULL, NULL for
- has_get_node_by_id and get_node_by_id.
-
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * session.c (auth_callback): If the service is NULL, just use the
- item as the key.
-
- * mail-crypto.c (mail_crypto_pgp_mime_part_sign): Use the
- CamelCipherHash enum.
- (mail_crypto_pgp_mime_part_verify): Use a CamelCipherValidity.
-
- * mail-format.c (try_inline_pgp_sig): Updated to use
- CamelCipherValidity instead of CamelPgpValidity.
- (handle_multipart_signed): Same.
-
-2001-04-12 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (do_message_selected, on_message_selected):
- Don't printf NULL
-
- * mail-format.c (mail_part_is_inline): Don't leak memory.
-
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (pgp_path_changed): Updated for changes to PGP
- code.
-
- * component-factory.c (owner_set_cb): Don't init openpgp anymore
- because we don't need it.
-
- * mail-crypto.c: Simply wrap the camel-pgp-mime functions (also
- renamed the functions to be prefixed with mail_crypto).
-
- * mail-format.c (handle_multipart_signed): Update to use
- camel_pgp_mime_is_rfc2015_signed() and other camel-pgp-mime
- functions.
- (handle_multipart_encrypted): Same but for rfc2015_encrypted.
- (decode_pgp): Updated to use camel-pgp-context
- (try_inline_pgp): Updated to use camel-pgp-context's.
- (try_inline_pgp_sig): Same.
-
-2001-04-11 Dan Winship <danw@ximian.com>
-
- * mail-format.c (handle_text_plain): Only look for special
- pseudo-multipart-isms (binhex, uucode, old pgp, etc) if the MIME
- type is really text/plain. Otherwise, since there's no handler for
- applciation/mac-binhex40, it gets sent to mail-identify.c, which
- thinks it's text/plain because it starts with English words, and
- so it gets sent back to the text/plain handler, which finds an
- embedded binhex part...
-
- * mail-callbacks.c (do_view_message): mark messages as seen when
- opening then in a separate window.
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * openpgp-utils.c (openpgp_encrypt): Don't g_free the recipient
- array members here because we free them in the caller.
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (pgp_mime_part_verify): Huh, somehow I forgot to
- apply the from filter when verifying signed parts. Oh well,
- probably not all that common. Fixed now though.
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (save_msg): Use the homedir as the default
- filename.
-
-2001-04-11 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (save_tree_state, message_list_setup_etree): Save
- the expanded state using the ETree built in expanded state code.
-
-2001-04-05 Not Zed <NotZed@Ximian.com>
-
- * Merge from evolution-0-10 to evolution-0-10-merge-0 into head.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * mail-account-gui.c: Add prototype for service_changed().
- * message-list.h: Remove #include <gal/e-table/e-tree-simple.h>
- since it doesn't get installed.
-
-2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * mail-config-druid.c (create_html): set content type to utf8.
- * mail-config.c (mail_config_check_service): fix warning.
- * mail-display.c (link_open_in_browser): just call on_link_clicked().
- (link_menu): Open link works.
- (link_copy_location): claim selection.
- (on_selection_get): new function, selection handler.
- (mail_display_new): connect to selection_get. FIXME: does not work.
-
-2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component-factory.c: use big trash icon, stolen from mc.
-
-2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * openpgp-utils.c (openpgp_encrypt): Add --no-tty argument to gpg.
-
-2001-04-03 Dan Winship <danw@ximian.com>
-
- * folder-browser-factory.c (control_activate): Sync the folder on
- activate.
-
- * session.c (mail_session_remember_password): Use the same
- URL-transforming rules we use when hashing the password so this
- actually works.
-
-2001-04-02 Iain Holmes <iain@ximian.com>
-
- * importers/elm-importer.c (elm_can_import): Call is_kmail to check for
- KMail files.
- (is_kmail): Checks if the given directory is a KMail directory.
-
-2001-04-02 Iain Holmes <iain@ximian.com>
-
- * importers/elm-importer.c (elm_can_import): Check for some MH files
- to make sure that the dir really is an Elm dir.
-
-2001-04-02 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c: Add a "provider_type" arg to
- MailAccountGuiService.
- (transport_needs_auth_toggled): Call service_changed if enabling
- the auth pane so the status of the "Check supported types" button
- will be correct.
- (service_check_supported): Use gsvc->provider_type, not
- CAMEL_PROVIDER_STORE.
- (mail_account_gui_new): Pass the transport as the user_data to the
- "changed" signal on transport.hostname, not the store.
- (mail_account_gui_setup): Set up provider_type fields
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component-factory.c: changed vtrash icon to trash. doh
- * folder-browser-factory.c: pixmap cache got moved from here to
- e-util/e-gui-utils.c. Changed pixmap paths according to file renames.
- Added icons for print, get mail, etc., changed get mail icon as Jacub
- suggested.
- * subscribe-dialog.c: also use new pixmap cache.
-
-2001-03-30 Dan Winship <danw@ximian.com>
-
- * mail-config.c (check_service_check): Register for cancellation.
- (mail_config_check_service): Pop up a modal dialog with a message
- and a "Cancel" button for the duration of the check.
-
-2001-03-30 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (load_file_fn): Check if
- foldername is \0.
-
- * importers/evolution-outlook-importer.c (load_file_fn): Ditto.
-
-2001-03-30 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (mail_text_write): Add (commented-out)
- E_TEXT_TO_HTML_CONVERT_ADDRESSES.
-
- * mail-config.c (mail_config_get_account_by_source_url):
- Call e_url_equal to compare URLs.
-
-2001-03-30 Dan Winship <danw@ximian.com>
-
- * component-factory.c (debug_cb): If the EvolutionShellComponent
- emits a "debug" signal, turn on camel_verbose_debug.
-
-2001-03-30 Radek Doulik <rodo@ximian.com>
-
- * mail-display.c (mail_display_redisplay): reset last_active
-
-2001-03-29 Jon Trowbridge <trow@ximian.com>
-
- * mail-callbacks.c: Added #include <time.h> to get things
- to compile.
-
- * mail-callbacks.c (mail_generate_reply): Look at the
- X-Evolution-Source header, and try to find a corresponding
- account. If this works, send the mail from this account.
- If not, use the default account.
-
- * mail-ops.c (send_queue_send): Strip out the X-Evolution-Source
- header before sending.
-
- * mail-config.c (mail_config_get_account_by_source_url): Added.
- Look up accounts by source URL.
-
-2001-03-29 Dan Winship <danw@ximian.com>
-
- * mail-format.c (call_handler_function): if called with a
- multipart that's really a 0-part, spew an error and display as
- source.
-
- * message-list.c: #include <camel/camel-vtrash-folder.h>
-
- * mail-callbacks.c: #include <libgnome/gnome-paper.h>
- for the gnome-print stuff.
-
- * mail-display.c (pixmap_press): Ignore "funky" button clicks
- (like scroll wheel scrolls)
-
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * *.*: Cleaned up #includes. Remove unneccesary includes of
- <gnome.h>, <gtk/gtk.h>, <bonobo.h> and replaced with more
- fine grained headers where needed. Also marked a bunch of
- strings for translations and added some missing prototypes.
-
-2001-03-29 Dan Winship <danw@ximian.com>
-
- * mail-account-editor.c (switch_page): Fix this so the "Receiving
- Options" page gets filled in again.
-
- * mail-send-recv.c (receive_get_folder): Doh! This was storing
- "struct _folder_info"s in the cache and then trying to read them
- back as CamelFolders. Fixicate. Fixes the "crash with 2 POP
- accounts" bug.
-
- * session.c (auth_callback): Update call to camel_url_to_string.
- (Don't include the params in the password hash table key.)
-
- * mail-config.c (mail_config_folder_to_cachename): Call
- camel_url_to_string with HIDE_PASSWORD and HIDE_PARAMS so that
- changing URL params doesn't change the cachename.
-
- * mail-ops.c (add_vtrash_info):
- * mail-local.c (reconfigure_folder_reconfigure):
- * mail-account-gui.c (save_service): Update calls to
- camel_url_to_string.
-
-2001-04-03 Dan Winship <danw@ximian.com>
-
- * folder-browser-factory.c (control_activate): Sync the folder on
- activate.
-
- * session.c (mail_session_remember_password): Use the same
- URL-transforming rules we use when hashing the password so this
- actually works.
-
-2001-04-03 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (mail_send_message): Strip header content before using it.
-
-2001-04-02 Iain Holmes <iain@ximian.com>
-
- * importers/elm-importer.c (elm_can_import): Calls is_kmail to
- check for kmail files.
- (is_kmail): Checks if the given directory is a KMail directory.
-
-2001-04-02 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c: Add a "provider_type" arg to
- MailAccountGuiService.
- (transport_needs_auth_toggled): Call service_changed if enabling
- the auth pane so the status of the "Check supported types" button
- will be correct.
- (service_check_supported): Use gsvc->provider_type, not
- CAMEL_PROVIDER_STORE.
- (mail_account_gui_new): Pass the transport as the user_data to the
- "changed" signal on transport.hostname, not the store.
- (mail_account_gui_setup): Set up provider_type fields
-
-2001-04-02 Iain Holmes <iain@ximian.com>
-
- * importers/elm-importer.c (elm_can_import): Check for some MH files
- to make sure that the dir really is an Elm dir.
-
-2001-03-30 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_toggle_hide_deleted): New
- function to listen for hide_deleted changes.
- (folder_browser_toggle_hide_deleted): Only svae the hide-deleted
- state if we are not setting a trash folder.
-
- * folder-browser-factory.c (control_activate): Set the
- hide_deleted flag appropriately/setup the menu's appropriately.
- (control_activate): Workaround to Force setting of options by
- bypassing bonobo notification, since it doesn't properly handle
- changed components.
-
- * mail-config.c (mail_config_get_hide_deleted):
- (mail_config_set_hide_deleted): New functions for
- accessing/setting the hide deleted state.
- (mail_config_write_on_exit):
- (config_read): Save/load the hide_deleted flag.
-
- * message-list.c (main_folder_changed): Oops, remember to copy
- over all the rest of the changes too if we removed some.
- (find_next_undeleted): Find the first undeleted message below us.
- This of course does not follow sorting conventions, but thats
- etree. Have to ask chris if there is a way to make it work like
- that.
- (message_list_set_hidedeleted): Check we dont set hide_delete on a
- vtrash.
- (build_tree): If the message has vanished, try and get the next
- undeleted message set, etc, if it still exists. The set_cursor()
- function seems very broken but i'm sure e-lahey will get to it
- soon.
- (build_flat): Similarly for above.
-
-2001-03-30 Dan Winship <danw@ximian.com>
-
- * mail-config.c (check_service_check): Register for cancellation.
- (mail_config_check_service): Pop up a modal dialog with a message
- and a "Cancel" button for the duration of the check.
-
- * component-factory.c (debug_cb): If the EvolutionShellComponent
- emits a "debug" signal, turn on camel_verbose_debug.
-
-2001-03-30 Radek Doulik <rodo@ximian.com>
-
- * mail-display.c (mail_display_redisplay): reset last_active
-
-2001-03-29 Dan Winship <danw@ximian.com>
-
- * mail-format.c (call_handler_function): if called with a
- multipart that's really a 0-part, spew an error and display as
- source.
-
- * mail-display.c (pixmap_press): Ignore "funky" button clicks
- (like scroll wheel scrolls)
-
-2001-03-29 Dan Winship <danw@ximian.com>
-
- * mail-account-editor.c (switch_page): Fix this so the "Receiving
- Options" page gets filled in again.
-
- * mail-send-recv.c (receive_get_folder): Doh! This was storing
- "struct _folder_info"s in the cache and then trying to read them
- back as CamelFolders. Fixicate. Fixes the "crash with 2 POP
- accounts" bug.
-
- * session.c (auth_callback): Update call to camel_url_to_string.
- (Don't include the params in the password hash table key.)
-
- * mail-config.c (mail_config_folder_to_cachename): Call
- camel_url_to_string with HIDE_PASSWORD and HIDE_PARAMS so that
- changing URL params doesn't change the cachename.
-
- * mail-ops.c (add_vtrash_info):
- * mail-local.c (reconfigure_folder_reconfigure):
- * mail-account-gui.c (save_service): Update calls to
- camel_url_to_string.
-
-2001-03-29 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (init_trash): Create a vtrash folder, not a vee folder.
-
- * folder-browser-factory.c (control_activate): Hook in the hide
- deleted thingy.
- Removed MessageHideDeleted menu stuff.
-
- * message-list.c (message_list_set_hidedeleted): New function, to
- set if we should hide deleted messages automatically/always.
- (regen_list_regen): If we have hide deleted messages turned on,
- then hide them.
- (main_message_changed): Promote to a folder_changed event with a
- change list, folder_changed has the optimisations to handle this
- appropriately.
- (main_folder_changed): IF we get changes events for
- deleted/undeleted stuff, change to added/removed events, rebuild
- if necessary.
- (message_list_set_folder): Setup the default hidedeleted state to
- be to hide everything unless it is in a vtrash folder.
-
-2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-gui.c (setup_service): Move the
- gtk_toggle_button_set_active outside the if.
-
-2001-03-28 Dan Winship <danw@ximian.com>
-
- * mail-account-gui.c (mail_account_gui_new): Set up the
- sent/drafts folder buttons.
- (folder_picker_clicked): Pop up the folder selector when sent or
- drafts is clicked.
- (mail_account_gui_save): Save the sent/drafts folders.
-
- * mail-config.c (account_copy): copy sent/drafts info
- (config_read): read sent/drafts info
- (mail_config_write): write sent/drafts info
-
- * mail-callbacks.c (composer_send_cb, composer_postpone_cb):
- split out some common code here (and fix inconsistencies). Always
- set headers on the message giving the account name, transport,
- and sent folder to use.
-
- * mail-ops.c (mail_send_message): If the message has an
- X-Evolution-Account header, use the transport/sent folder info for
- that account (assuming it still exists). Otherwise, if it has
- X-Evolution-Transport and/or X-Evolution-Fcc, use those. If not,
- use the default transport and sent folder.
- FIXME: Falls back silently to the default sent folder if it can't
- open the account-specific one...
- (send_queue_send): remove the X-Evolution-Transport, etc
- processing here, as it gets done by mail_send_message now.
- FIXME: We only sync the default sent folder.
-
- * component-factory.c (owner_set_cb): While setting up the
- standard folders, also record their URIs.
-
-2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (switch_page): Lets do some NULL checking
- here. First, make sure the gsrc isn't NULL and also make sure that
- account->source isn't NULL either.
-
- * mail-account-gui.c (mail_account_gui_setup): If there isn't a
- source_proto, make sure we select "None" as the source type.
-
-2001-03-27 Dan Winship <danw@ximian.com>
-
- * mail-config-druid.c (construct): set the initial druid button
- state after doing the mail_account_gui_setup, since that may
- invoke signal handlers that will change it.
-
- * mail-account-gui.c (mail_account_gui_new): Fill in signature and
- organization too.
- (mail_account_gui_save): Preserve the "enabled" flag on the source.
- (save_service): Don't look at authtype if the widget is
- insensitive. (Fixes the "smtp://;auth=PLAINservername" bug.)
-
-2001-03-27 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (receive_done): Use gnome-dialog-close instead
- of object_unref, for some reason it doesn't like being unref'd
- with a refcount of 1, _who knows_. Gets rid of that refcount
- warning on get mail.
-
-2001-03-27 Dan Winship <danw@ximian.com>
-
- * mail-config.glade: Probably the very last new config dialog
- ever. (Ha ha). From Anna, based on a story by me.
-
- * mail-account-gui.c: New code for the new mail-config.glade. This
- abstracts out all of the common code between the account editor
- and the druid. It also handles the spiffy new provider-specific
- config stuff.
-
- FIXME: The code to check if a service is ok or not is no longer
- there... waiting until the online/offline stuff from the shell
- appears.
-
- * mail-account-editor.c, mail-config-druid.c: These are much
- smaller now, since most of the interesting bits moved to
- mail-account-gui.c
-
- * mail-accounts.c: Add an enabled/disabled column/button to
- replace the checkbox that used to be in the editor, because it
- really makes more sense to have it out here. This looks ugly.
- Probably ought to ETable it...
- (load_accounts): Fill in the enabled column.
- (mail_select, mail_unselect): toggle the sensitivity and name of
- the Enable/Disable button appropriately
- (mail_able): Handle the enable/disable button.
-
- * mail-config.c: Remove reply-to from MailConfigIdentity since it
- didn't belong there (and wasn't being saved anyway).
- (mail_config_check_service): Simplify this a bit. This really
- needs to pop up a dialog with a "connecting..." message and a
- cancel button.
-
- * mail-ops.c (uid_cachename_hack): Kludge, copied+modified from
- mail_config_folder_to_cachename to deal with the different
- behavior of the URL code now. Will go away when the keep-on-server
- code moves.
- (get_folderinfo_get): Only pass "subscribed_only" to
- camel_store_get_folder_info if the store supports subscriptions...
-
- * mail-local.c (local_provider): Update this to reflect the
- CamelProvider structure change
-
-2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (transfer_msg): Add "vtrash" as an allowed mail
- folder type.
-
- * mail-ops.c (transfer_messages_transfer): Updated to reflect
- changes made to the move/copy API in camel-folder.c
- (add_vtrash_info): Use /Trash as the path instead of Trash.
-
- * mail-local.c (reconfigure_folder_reconfigure): Updated this too.
-
-2001-03-20 Not Zed <NotZed@Ximian.com>
-
- * mail-local.c (init_trash): Fixed vfolder_new api.
-
-2001-03-26 Dan Winship <danw@ximian.com>
-
- * mail-format.c (get_cid): Make fake content-id URLs be guaranteed
- unique: the old way (with %p on the CamelMimePart *) would
- generate duplicates if memory was freed and re-allocated the right
- way.
-
- * mail-display.c (pixbuf_gen_idle, etc): Make the thumbnail cache
- global rather than per-MailDisplay, since content-ids ought to be
- globally unique. Also, don't leak content-id strings when the
- pixbuf generation fails, and remove pixbufs from the cache after 5
- minutes.
-
- * component-factory.c (mail_load_storages): Simplify a bit using
- camel_session_get_provider.
-
- * mail-callbacks.c (empty_trash): Ditto, and fix up use of
- CamelException.
-
-2001-03-26 Radek Doulik <rodo@ximian.com>
-
- * mail-format.c (write_address): clear name and email data after
- each address
-
-2001-03-25 Dan Winship <danw@ximian.com>
-
- * component-factory.c (unref_standard_folders): Fix a bug in this
- that probably would have been noticed sooner if ETree hadn't always
- made the mailer crash before you got here. :-)
-
-2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (transport_auth_type_changed): Allow the
- authtype to be NULL.
- (transport_auth_init): If the provider allows authtypes but
- doesn't *need* one, create a "None" menu item that the user can
- choose. This should fix the bug people have been seeing recently
- since dan removed the no_authtype authmech from the smtp provider.
-
-2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * openpgp-utils.c (openpgp_verify): Default to iso-8859-1 as the
- user's charset here if it is undefined. This is a better choice
- than us-ascii.
-
-2001-03-23 Jon Trowbridge <trow@ximian.com>
-
- * mail-display.c (handle_embedded_address_object): #ifdef away
- some code I don't quite want to delete yet.
- (html_button_press_event): Remove some of Radek's placeholder
- code, replace it with code to create my AddressPopup bonobo
- control.
-
- * mail-format.c: Remove some obsolete code that if #ifdef-ed out
- a while ago.
-
- * mail-ops.c (send_queue_send): Strip out the X-Evolution-Identity
- header when sending.
-
-2001-03-23 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c: Turned on BROKEN_ETREE.
-
-2001-03-22 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-outlook-importer.c: Update for new IDL.
-
- * importers/evolution-mbox-importer.c: Update for new IDL.
-
- * importers/Makefile.am: Build the elm importer.
-
-2001-03-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (mail_double_click): New callback to handle a
- double-click event in the account clist.
- (construct): Setup the double-click event for the account list.
-
-2001-03-22 Radek Doulik <rodo@ximian.com>
-
- * mail-display.c (mail_display_new): connect to button_press_event
- and iframe_created events of GtkHTML widget
- (html_button_press_event): new signal handler, runs popup on
- address fields and on links, later we should add popups for images
- and maybe some more? any ideas?
- (html_iframe_created): new signal handler, takes care of
- connecting to button_press_event of all iframes : plus bunch of
- empty methods for popup menu items - to be implemented
- (html_motion_notify_event): new handler, highlights addresses by
- underline
- (html_enter_notify_event): take care of enter event
- (update_active): helper function, extracted from
- html_motion_notify_event
- (update_active): move to absolute coordinates
- (html_button_press_event): ditto
-
- * mail-format.c (write_address): revert back to raw HTML text,
- store name and email to Text objects, workaround gtkhtml tables
- bug (to be fixed soon ;-)
-
-2001-03-21 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-factory.c (update_pixmaps): Don't return if
- loading one image fails.
-
-2001-03-21 Dan Winship <danw@ximian.com>
-
- * mail-format.c (handle_multipart_related): Fix a bug in (illegal)
- 0-part messages
-
- * mail-config-druid.c (incoming_check, incoming_type_changed,
- transport_check, transport_type_changed): * mail-account-editor.c
- (transport_type_changed, source_check): Use the new URL part
- macros
-
- * mail-config.c (check_service_check): Use provider authtype list
- if not connecting.
-
-2001-03-20 Miguel de Icaza <miguel@ximian.com>
-
- * folder-browser-factory.c: Added new icons.
-
-2001-03-18 Miguel de Icaza <miguel@ximian.com>
-
- * folder-browser-factory.c: Remove duplicated verb.
-
-2001-03-20 Iain Holmes <iain@ximian.com>
-
- * importers/evolution-mbox-importer.c (process_item_fn): Step the
- parser so that it will import more than one message.
-
-2001-03-20 JP Rosevear <jpr@ximian.com>
-
- * importers/Makefile.am: extra dist the oaf files
-
-2001-03-20 Radek Doulik <rodo@ximian.com>
-
- * mail-tools.c (mail_tool_quote_message): set color in html
- citation
-
- * mail-config.c: added citation highlighting configuration
-
- * mail-tools.c (mail_tool_quote_message): use citation
- highlighting
-
- * mail-display.c (mail_text_write): use citation highlighting
-
-2001-03-20 Christopher James Lahey <clahey@ximian.com>
-
- * folder-browser.c (etree_key): Made this check if the control
- mask is set.
-
-2001-03-20 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (remove_node_diff, build_flat_diff): Remove the
- node before freeing the data it points to.
-
-2001-03-19 Christopher James Lahey <clahey@ximian.com>
-
- * Merged e-tree-rework-branch:
-
-2001-03-18 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c: Added has_save_id and get_save_id methods.
-
- * subscribe-dialog.c: Added arguments for
- e_tree_memory_callbacks_new of get_save_id and has_save_id to
- NULL.
-
-2001-03-16 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c: Added a call to
- e_tree_memory_set_expanded_default to TRUE. Removed all calls to
- set_expanded on nodes while the tree is frozen since this fails
- miserably now.
-
-2001-03-13 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c (message_list_get_layout): Turned off draw-grid.
-
-2001-03-09 Christopher James Lahey <clahey@ximian.com>
-
- * folder-browser-factory.c, folder-browser.c, message-list.c,
- message-list.h, subscribe-dialog.c, subscribe-dialog.h,
- mail-callbacks.c: Converted these all to use ETree instead of
- ETable.
-
-End of branch
-
-2001-03-19 Iain Holmes <iain@ximian.com>
-
- * importers/pine-importer.c: Pine intelligent mail importer.
-
- * importer/elm-importer.c: Elm imtelligent mail importer.
-
- * importer/GNOME_Evolution_Mail_(Pine|Elm)_Intelligent_Importer.oaf.in:
- Pine and Elm oafinfo files.
-
- * importer/netscape-importer.c (maybe_replace_name): Replace some invalid
- names with valid ones (Trash -> Netscape-Trash). Change some netscape names
- to Evolution names (Unsent Messages -> Outbox).
- (scan_dir): Use less variables.
- (netscape_import_file): Simplify.
-
-2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c: Removed gnome.h and ctype.h
- (send_queue_send): Don't remove the X-Evolution header here.
- (mail_send_message): Remove it here instead (so we only have to
- remove it in one place - no matter if you send a single message or
- send_queue.
-
-2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (write_headers): Write the date header.
-
- * component-factory.c (owner_unset_cb): Call
- unref_standard_folders() here instead.
-
- * folder-browser-factory.c: Add Resend Message menu item.
-
- * folder-browser.c (on_right_click): Add resend to the right-click
- menu.
-
- * mail-callbacks.c (composer_sent_cb): Unref the message.
- (composer_postpone_cb): Unref the message here too.
- (resend_msg): New callback to allow resending of messages in the
- Sent folder.
-
-2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (unref_standard_folders): unref the standard
- folders.
- (owner_set_cb): Use g_atexit() to call unref_standard_folders()
- when evolution-mail exits. This should solve the problem where
- these folders are not synced when evolution-mail closes (because
- they still had refs on them on close).
-
-2001-03-17 Not Zed <NotZed@Ximian.com>
-
- * mail-mt.c (mail_msg_free): Move the proxy event outside the lock
- (otherwise we always deadlock).
-
- * mail-local.c (reconfigure_clicked): Clear the message list
- during update inside the folder thingy. This is a hell mess, need
- to move the gui stuff to mail-callbacks and make this reconfigure
- thing a more generic func.
-
- * message-list.c (ml_value_to_string): Cleanup the logic to use
- lookup tables.
- (sort_uid_to_rows): Removed due to rewrite below.
- (build_flat_diff): Changes for node/summary/etc changes. Also do
- changed nodes too.
- (clear_tree): Free the info reference for nodes in our hashtable.
- (build_subtree): Ref the info reference in our hash/tree node.
- (on_click): Dont free message info, since we just got our ref to
- it.
- (remove_node_diff): Free messageinfo off node.
- (build_flat): Ref messageinfo.
- (message_list_set_folder): Allow a NULL folder to be set -
- i.e. clear the view.
- (message_list_set_folder): Emit a no message sleeted signal.
- (build_tree): Change cursor keeping stuff to work with new info.
-
- Turned off BROKEN_ETREE - well maybe it'll work. Check for
- duplicate messages displayed, etc.
-
-2001-03-16 Not Zed <NotZed@Ximian.com>
-
- * message-list.h: Added uid_nodemap; mapping of uid's to e-tree
- nodes.
-
- * message-list.c (build_flat): Changed to take a summary argument,
- and to store node in node map, etc, and store info's in e-tree.
- (build_subtree): Changed to store node in node map, and to store
- info's in tree directly.
- (ml_tree_value_at): Changed to get info directly from tree node,
- removed allocated return value logic.
- (ml_tree_value_at): Removed all "fake node" handling, no fake
- nodes should ever exist.
- (id_is_uid, id_is_subject, id_uid, id_subject): Removed macro's no
- longer used.
- (new_id_from_uid, new_id_from_subject): Removed no longer used.
- (get_message_uid):
- (get_message_info): Treat tree node data as messageinfo.
- (message_list_select): Dont free the messageinfo, as its part of
- our data, not retrieved from folder.
- (message_list_drag_data_get): ditto.
- (subtree_unread): Treat tree node data as messageinfo.
- (subtree_size): ditto.
- (subtree_earliest): ditto.
- (clear_tree): Reset uid_nodemap on clear.
- (save_node_state): tree nodes == messageinfo's.
- (add_node_diff): ditto.
- (remove_node_diff): ditto.
- (main_folder_changed): use uid_nodemap to lookup changed nodes.
- (main_message_changed): ditto.
-
-2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (pgp_mime_part_sign_prepare_part): New function to
- prepare the mime part and any subparts for pgp signing.
- (pgp_mime_part_sign_restore_part): New convenience function to
- undo the prepare_part.
- (pgp_mime_part_sign): Don't assume the part passed in is a leaf
- part, we could very easily get a multipart (and in fact were which
- is why people have been having unexpected results when signing
- messages with attachments) and set the encoding as if it were a
- leaf part. Use our 2 new convenience functions to set the
- encoding(s) instead.
-
-2001-03-15 Miguel de Icaza <miguel@ximian.com>
-
- * folder-browser-factory.c (folder_browser_setup_view_menus): Fix
- memory leak.
-
-2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (apply_changes): We don't care about SSL,
- yea baby...
- (apply_changes): Don't care about SSL, no baby...
- (construct): Yea, I said we don't care 'bout SSL, baby
- (construct): That's exactly what I said, uh huh...
- (transport_auth_type_changed): Set the sensitivity of the
- user/passwd entries.
- (transport_type_changed): If the hostname hasn't been set yet,
- just use "localhost" as it doesn't really matter, since all we
- need is a valid URL object.
-
- * mail-config.c: We no longer need `use_ssl' for sources and
- transports.
-
-2001-03-15 Dan Winship <danw@ximian.com>
-
- * mail-display.c (mail_display_redisplay): Remove a stray
- camel_object_ref that was causing messages to never be finalized
- if they got redisplayed (because of attachments, delayed-loading
- IMAP parts, etc)
-
-2001-03-15 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c: Added edit item to search-bar menu.
-
- * mail-callbacks.c (filter_edit): Changed for filter_editor_new()
- api addition/change.
-
- * mail-vfolder.c (vfolder_edit): Use vfolder_editor_new intead.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * session.c (mail_session_init): Tell camel to init NSS.
- (mail_session_accept_dialog): Doh! NULL terminate the list of
- buttons and show the label.
-
- * mail-mt.c (do_get_accept): Same.
-
-2001-03-14 Ettore Perazzoli <ettore@ximian.com>
-
- * importers/Makefile.am (INCLUDES): Add `-I$(top_builddir)/shell'
- and `-I$(top_srcdir)'.
-
-2001-03-13 Dan Winship <danw@ximian.com>
-
- * mail-display.c (on_url_requested): Call gtk_html_end() on the
- stream so things happen. Fixes a problem with some inline images
- (just very small ones maybe?)
-
- * importers/.cvsignore: create
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * session.c (mail_session_init): Call camel_init with the
- evolution directory passed in. Also, abort if camel cannot be
- initialized.
-
- * main.c (main): Shutdown camel.
-
-2001-03-04 Michael Meeks <michael@ximian.com>
-
- * folder-browser-factory.c (free_pixmaps): impl.
- (update_pixmaps): accelerate with cache.
-
-2001-03-13 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Removed the importers and created a subdirectory
- for them to live happily as plugins.
-
- * mail-importer.c (mail_importer_create_folder): Modified the
- function to take a BonoboListener for the callback.
- (get_importer_list): Get a list of importer plugins.
- (free_importer_list): Free the list of plugins.
- (mail_importer_init): Initalise the list of plugins.
- (main_importer_uninit): Unload the modules.
-
- * GNOME_Evolution_Mail.oaf.in: Remove the oaf_server entries for
- the importers.
-
- * importers/*: Copy the importers in here.
-
-2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write): Make the transport save
- whether or not it's supposed to use SSL as well.
- (config_read): Read in whether or not we should remember the
- transport password (for those that support SASL).
- (mail_config_write): Save whether or not to save transport
- passwords (needed for SASL enabled transports).
-
- * mail-ops.c (add_vtrash_info): Instead of always creating a new
- vTrash folder, if the store already has a Trash folder, replace it
- with the vTrash. Also, name the folder "Trash" instead of "vTrash"
- and i18nify the name.
-
-2001-03-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.h: Added protection.
-
- * folder-browser-factory.c: Add ActionsEmptyTrash. By the way -
- should we rename the bonobo verbs now that our menu structure has
- changed?
-
- * mail-callbacks.c (empty_trash): New callback to empty ALL of the
- trash folders.
-
-2001-03-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (send_queue_send): Remove our X-Evolution header
- before we send. Also don't send messages that are marked for
- deletion.
-
-2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (mail_get_accept): New async function that will be
- used for SSL certs later.
-
- * session.c (auth_callback): Changed to return a gpointer value.
- (mail_session_accept_dialog): New function to handle the new
- _ACCEPT authenticator mode.
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c: Set the Forward->Quoted callback.
- Also set the forward->Attachment callback.
-
- * mail-view.c (view_forward_msg): Specify FORWARD_ATTACHED.
-
- * mail-callbacks.c (forward_attached): Don't call
- forward_messages() anymore...never really needed to. Just handle
- it directly.
- (forward_inlined): Specify FORWARD_INLINE as the flag argument.
- (forward_quoted): New function sorta like forward_inlined except
- this forwards the message quoted.
-
- * mail-tools.c (mail_tool_forward_message): New function to
- prepare a message to be forwarded.
-
-2001-03-08 Jon Trowbridge <trow@ximian.com>
-
- * mail-format.c (write_field_row_begin): Added. Table row HTML
- broken out into its own function.
- (write_subject): Added. Emits the proper HTML for the subject
- line.
- (write_field_to_stream): #ifdef-ed out of existence.
- (write_address): Take a CamelInternetAddress and spit out an
- <object> tag with the appropriate <param>s.
-
- * mail-display.c (on_object_requested): Check for an "address"
- object. If found, call...
- (handle_embedded_address_object): ...this function, which creates
- an AddressWidget bonobo control and passes in the necessary info.
- I never really realized just quite how much GtkHTML kicks ass
- until I figured out how to make this work.
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vtrash.[c,h]: Removed from cvs
-
- * Makefile.am: Removed mail-vtrash.[c,h]
-
- * main.c: Don't #include "mail-vtrash" anymore.
-
- * component-factory.c: Add "vtrash" as a folder type we support.
- (create_view): Kludgy-kludge around the vtrash type.
- (owner_set_cb): Don't create the vTrash folder here anymore...
-
- * folder-browser.c (on_double_click): Call open_msg here so that
- it does the Right Thing (tm).
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-local.c (mail_local_store_class_init): Override the default
- init_trash() with the our custom one (since MailLocalStore doesn't
- let the CamelStore keep a hash of opened folders and instead
- keepts track of them itself).
- (init_trash): custom implementation of the init_trash method for
- MailLocalStores
- (get_folder): i18nize.
- (register_folder_registered): Don't add the folder to the vtrash
- here.
-
-2001-03-08 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (component_fn): Specify a NULL
- `EvolutionShellComponentGetDndSelectionFn'.
-
-2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-autofilter.c (filter_rule_from_message): Add an action-part
- widget.
- (filter_rule_from_mlist): Same here. This should get rid of the
- problem where people go to create a rule based on a message and
- forget to fill-in the action part.
-
-2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (mail_crypto_is_smime_v3_signed): New function to
- decide if a mime part is an S/MIME v3 signed part.
- (mail_crypto_is_pkcs7_mime): New function to decide if a mime part
- is an application/pkcs7-mime part (or an application/octet-stream
- part with application/pkcs7-mime data).
-
- * mail-account-editor.c (source_auth_init): Move the signal
- emittion to after the set_menu call so that it actually works.
- (transport_type_changed): Updated to manipulate the user/passwd
- fields for the transport.
- (construct): Updated to init the user/passwd fields for the
- transport.
- (transport_auth_init): Renamed. Also fill in the user/passwd
- fields if available.
-
-2001-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (construct): Disable the NNTP code if NNTP is
- not enabled. This prevents some runtime warnings...
-
- * mail-config-druid.c: Updated to have a transport auth page.
-
-2001-03-01 Miguel de Icaza <miguel@ximian.com>
-
- * folder-browser.c (on_right_click): Move the context menus to
- the toplevel code; Use enumerations for the various bitfield
- constants.
-
- Add support for hiding items that are not required (read/unread
- and delete/undelete).
-
- This requires my previous patch, as it assumes "Open" does the
- right thing instead of having two operations: Open and Edit.
-
-2001-02-28 Miguel de Icaza <miguel@ximian.com>
-
- * folder-browser.c (on_right_click): Removed draft folders op
- here, since open_msg now does the right thing (edit or view).
-
- * folder-browser-factory.c (update_pixmaps): Removed MessageEdit
- from here.
-
- * mail-callbacks.c (open_msg): New function, does the "right
- thing" to a message (either, edit or open).
-
- * folder-browser-factory.c: Register new command here.
- (update_pixmaps): Rename keys that have been shuffled around.
- (update_pixmaps): Rename to match new updates on xml file.
-
- Rename MessageOpenNewWindow to MessageOpen. Change action from
- "view_message" to "open_message".
-
- * mail-callbacks.c (mark_all_as_seen): New command. Marks all
- messages as seen.
-
-2001-03-06 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (get_folderinfo_got): If the folderinfo has no URL
- (ie, can't contain messages), don't add it as a vtrash source.
-
-2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c: Don't access the `active` data member of a
- GtkToggleButton directly - bad programming, shame on me.
-
- * mail-account-editor.c: Same here.
-
- * mail-accounts.c: And here too.
-
- * mail-callbacks.c (empty_subject_destroyed): And finally here.
-
- * mail-crypto.c (pgp_mime_part_sign): Correcty set the mime type
- for the multipart. Hmmm, still doesn't wrap correctly. NotZed?
- Ideas?
- (pgp_mime_part_encrypt): Here too.
-
-2001-03-03 Not Zed <NotZed@Ximian.com>
-
- * mail-tools.c: Remove very old camel lock stuff.
-
- * mail-local.c (register_folder_registered): Add the local folder
- as a potential vfolder source.
-
- * folder-browser.c (got_folder): When we have a new folder,
- register it as a potential vfolder source.
-
- * mail-vfolder.c: Added the source rule to the vfolder_info.
- (vfolder_refresh): Store the rule in the vfolder info, etc.
- (vfolder_register_source): Function to register a newly opened
- folder with us.
- (vfolder_uri_to_folder): Save the folder in the vfolder_info too.
- (source_finalise): Handle clenaup when the folder dies.
-
-2001-03-02 Not Zed <NotZed@Ximian.com>
-
- * mail-mt.c (set_stop): Check the container is not NIL before
- trying to set thje prop.
-
-2001-03-01 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_search_menu_activated): Fixes
- for changes to search bar.
- (search_save): Removed.
- (search_full): Removed.
- (search_full_clicked): Removed.
- (folder_browser_search_option_items[]): Removed.
- (folder_browser_search_query_changed): Changed for search bar
- changes.
- (folder_browser_clear_search): Removed.
-
- * mail-vfolder.c (vfolder_clone_rule): New function to clone a
- filter/search rule into a matching vfolder rule.
-
- * mail-send-recv.c (mail_receive_uri): Setup a timeout for status
- updates.
- (build_dialogue): Setup timeout id for status updates.
- (operation_status_timeout): New function to set the status via a
- timeout.
- (receive_done): Remove the timeout handler if we need to.
- (operation_status):
- (receive_status): Just update the info, and let the timeout
- handler update the gui.
- (do_free_status):
- (do_show_status): Removed gui thread status message processing.
-
-2001-02-28 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_config_search): New function to
- configure the FilterRule for the search mechanism.
-
-2001-02-27 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (folder_browser_gui_init): Setup the search bar
- as a filterbar.
- (got_folder): Set the whole search bar sensitive or not based on
- the search capability of the folder.
-
- * folder-browser.h: Changed to use efilterbar instead of esearchbar.
-
-2001-02-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (configure_mail): Return TRUE if the user
- configured his/her settings, else return FALSE.
- (check_send_configuration): If configure_mail() returns TRUE, then
- continue otherwise quit.
- (send_receive_mail): Same.
-
-2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): Set a "References"
- header no matter what if we are able to get a Message-Id. Fixes
- bug #1583.
-
- * mail-accounts.c (mail_delete): Confirm that the user REALLY
- wants to delete this account.
- (news_delete): Same.
-
- * mail-ops.c (mail_send_message): Changed the product string -
- will change it to use User-Agent once I get the RFC/DRUMS draft or
- whatever. Until then I'll stick with X-Mailer.
-
-2001-02-26 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.c (delete_msg): Mark deleted messages as "seen"
- as well so they don't count towards the unread count.
-
- * mail-view.c (view_delete_msg): ditto
-
-2001-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (owner_set_cb): Re-add the
- mail_vtrash_create() hack back in for LocalStores since there's no
- better way to register a vTrash folder on the Local Storage yet.
-
- * mail-local.c (register_folder_registered): Add folders to the
- vTrash folder here since the LocalStore does not let the parent
- CamelStore class keep it's own hash of the folders.
-
-2001-02-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * session.c (mail_session_forget_password): New function to force
- the removal of a given password.
-
- * openpgp-utils.c (openpgp_decrypt): On failure, forget the
- passphrase.
- (openpgp_encrypt): Here too. (cleaned this up a bit too)
- (openpgp_clearsign): And here.
- (openpgp_sign): Again...
-
- * mail-callbacks.c (composer_postpone_cb): Abort if the message is
- NULL (which is valid if an error occured).
- (composer_send_cb): Same.
-
-2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser.c: Toss the mail_tool_camel_lock* stuff.
- * mail-ops.c: Same.
- * mail-summary.c: Here too.
-
- * mail-tools.c (mail_tool_uri_to_folder_noex): Blown away!
- (mail_tool_filter_get_folder_func): *kapoosh*
- (mail_tool_camel_lock_up): Same.
- (mail_tool_camel_lock_down): Same.
- (mail_tool_set_uid_flags): Don't need this rubbish anymore either.
-
-2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (mail_load_storages): No longer need to
- construct the vTrash here.
- (owner_set_cb): Don't make the vTrash for the local store here.
-
- * mail-ops.c (add_vtrash_info): New function to add a vTrash
- folder info to a pre-constructed CamelFolderInfo for use in the
- get_folder_info async function.
-
-2001-02-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * main.c (main): No longer need to do a vtrash_cleanup() (it also
- doesn't exist anymore).
-
- * component-factory.c (mail_load_storages): Updated to use the new
- vtrash code.
- (owner_set_cb): Same.
-
- * mail-tools.c (mail_tool_uri_to_folder): Update to handle the
- "vtrash:" url prefix so that we can extract the REAL uri and know
- to get the trash folder.
-
- * mail-vtrash.c (mail_vtrash_add): Add the vTrash folder to the
- EvolutionStorage.
- (mail_vtrash_create): Get the store based on the uri (async) and
- then call mail_trash_add.
- (vtrash_cleanup): Removed.
- (vtrash_uri_to_folder): Removed.
- (vtrash_create): Replaced by mail_vtrash_create()
-
-2001-02-23 Iain Holmes <iain@ximian.com>
-
- * component-factory.c (owner_set_cb): Init the importer here.
-
- * mail-importer.[ch] (mail_importer_create_folder): Add a function
- that creates new folders in the shell.
- (mail_importer_init): Take in an EvolutionShellClient, and get the
- local_storage corba_object from it.
-
-2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vtrash.c (create_trash_vfolder): Come up with a unique
- store uri for each vtrash (using %p and the CamelStore we're gonna
- place it on).
- (get_trash_get): Pass in the store so we can use it for %p.
-
-2001-02-23 Not Zed <NotZed@Ximian.com>
-
- * mail-vfolder.c (vfolder_gui_add_from_mlist): Rule to add mlist
- vfolder.
-
- * mail-autofilter.c (filter_gui_add_for_mailing_list): Removed.
- (rule_from_mlist): Build a generic match rule from an mlist.
- (vfolder_rule_from_mlist): Setup the vfolder rule for an mlist.
- (filter_rule_from_mlist): Setup a filter rule fro an mlist.
- (filter_gui_add_from_mlist): GUI thingy to do the work.
-
- * folder-browser.c (on_right_click): Added vfolder on mailing list
- to filter menu.
- (on_right_click): Use header_raw_check_mailign_list instead of
- mlist magic to get the mailing list name.
- (filter_mlist): Changed to use new add_from_mlist() call.
- (vfolder_mlist): New function for vfolder from mlist.
-
- * mail-send-recv.c (build_dialogue): Only allow downloading if the
- source is enabled at this time.
- (mail_autoreceive_setup): Check for enabled sources before setting
- up autodownload.
-
-2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-accounts.c (construct): Construct the PGP Path
- GnomeFileEntry widget.
- (pgp_path_changed): Try to auto-detect which PGP type the binary
- file is based on the basename (yuck).
-
-2001-02-23 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (create_folder_get): Make op cancellable/report
- internals.
- (get_folder_get):
- (sync_folder_sync):
- (get_folderinfo_get): Make op cancellable/report internals.
-
- * mail-vtrash.c (get_trash_get): Setup the operation registration,
- and create a pseudo "start/stop" operation.
- (get_trash_free): Free store if we have it.
- (get_trash_got): Move vtrash add into here, so we execute in the
- right thread.
-
- * component-factory.c (owner_set_cb): Make trash creation async.
-
- * mail-local.c (register_folder_desc): A description of what we're
- doing.
-
- * mail-mt.c (mail_msg_new): Set status callback to operation_new.
- (mail_operation_status): Operation status function, proxy messages
- to main thread, and attempt to present a meaningful ui experience
- for operations.
-
-2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * openpgp-utils.c (openpgp_verify): Fixed memory corruption bug.
-
- * mail-format.c (try_inline_pgp_sig): Check to make sure the
- validity isn't NULL.
- (handle_multipart_signed): Check for NULL validities.
-
-2001-02-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): Protect against NULL
- uri's.
-
- * mail-vtrash.c: Do mutex locking on the global hash table - this
- should clear up some segfaults ;-)
-
- * mail-config-druid.c (druid_finish): Set the 'enabled' member of
- the source to TRUE if the URL exists else set to FALSE.
- (incoming_type_changed): If the provider chosen is "None" then
- gray-out the auto-check widgets and the check-settings, otherwise
- sensitize them.
-
- * mail-account-editor.c (construct): Added a few more settings.
- (apply_changes): Save the new settings.
-
- * mail-config.c (service_copy): Updated.
- (config_read): Read in whether or not the account is enabled.
- (mail_config_write): Save if the account is enabled or not.
-
-2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (mail_send_message): Updated to reflect changes to
- the filter-driver code.
-
-2001-02-22 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am (CAMEL_OBJS_EXTRA): Removed, no longer link with
- libcamelvee.
- (evolution_mail_LDADD): Ditto.
-
- * mail-vtrash.c: Moved camel-vee-store header ot camel levle.
-
- * mail-tools.c: Moved camel-vee-folder header to camel.
-
- * mail-local.c (local_storage_new_folder_cb): started hack for
- progress reporting, which is currently to the console.
-
- * mail-mt.c (set_stop): Set the stop button sensitivity.
- (mail_msg_received): enable/disable stop button while we're
- processing stuff in another thread.
-
- * message-list.c (ml_tree_value_at): If our uid entry vanishes
- before w'ere ready, then make a fake.
-
-2001-02-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (pgp_mime_part_verify): Changed to use
- PgpValidity.
-
- * openpgp-utils.c (openpgp_verify): Return a PgpValidity and set
- the description as UTF-8 for later use in mail-format.c when
- writing to GtkHTML.
-
- * mail-format.c (try_inline_pgp_sig): Updated to use the new
- PgpValidity code.
- (handle_multipart_signed): Updated.
-
-2001-02-21 Not Zed <NotZed@Ximian.com>
-
- * mail-callbacks.c (composer_postpone_cb): Fix for api changes to
- append_mail.
-
- * Makefile.am (evolution_mail_SOURCES): Removed mail-threads.[ch].
-
- * mail-threads.[ch]: Removed.
-
- * subscribe-dialog.c (subscribe_do_get_store): Chagned to use new
- thread stuff. This is really getting boring.
- (subscribe_do_subscribe_folder): Changed to use new thread stuff.
- Last one at last, phew.
-
- * session.c (register_callback): Changed to use new thread stuff.
- YUCK. I dropped some functionality, now the timeout callback
- return is ignored, so basically it keeps running till finished.
-
- * mail-ops.c (mail_operation_run): Removed, no longer used/needed.
- (mail_do_append_mail): Changed to use new thread stuff.
- (mail_do_transfer_messages): ditto.
-
- * mail-local.c (local_storage_new_folder_cb): Use new thread
- stuff, also only run synchronous for this operation.
- (mail_local_reconfigure_folder):
- (reconfigure_clicked): Changed to use new mail thread stuff.
-
- * mail-config.c (mail_config_check_service): Changed to use new
- thread stuff.
-
-2001-02-20 Dan Winship <danw@ximian.com>
-
- * mail-vtrash.c (get_trash_get): Pass NULL, not "/" for @top.
-
- * mail-callbacks.c (create_folders): Make this work with
- CamelStores where the separator character isn't /. folder_created
- and folder_deleted are still broken.
-
-2001-02-20 Not Zed <NotZed@Ximian.com>
-
- * mail-vtrash.c: Include the camel-vee-store.h header from the
- uninstalled copy.
-
-2001-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (mail_load_storages): Create vTrash folders
- for all remote stores as well.
-
-2001-02-20 Not Zed <NotZed@Ximian.com>
-
- * mail-vtrash.c (create_trash_vfolder): Add the auto-update flag
- to the folder open flags.
-
-2001-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-vfolder.c (mail_vfolder_get_vfolder_storage): New handy
- dandy function to ref and return the vfolder storage (will
- probably be disavowed once I figure out how to get the vTrash
- folder to show up in the EvolutionLocalStorage).
-
- * main.c (main): Call vtrash_cleanup().
-
- * mail-vtrash.c: New file.
- (vtrash_uri_to_folder): vtrash: URI handler
- (vtrash_create): Replacement async vtrash function for the old one
- in mail-ops.c
- (vtrash_cleanup): Cleanup code - unrefs the cached vtrash folders
- and free's the hashtable.
-
- * Makefile.am: Added mail-vtrash.[c,h].
-
- * mail-tools.c (mail_tool_uri_to_folder): If we have a vtrash:
- URI, call the vtrash URI handler function rather than continuing
- on. Yes, I know this is a hack and it needs to be fixed.
-
- * mail-ops.c (mail_do_setup_trash): Removed.
- (mail_trash_get): Removed.
-
- * component-factory.c (owner_set_cb): Create the vTrash folder for
- the LocalStore here.
-
- * mail-local.c (get_folder_info): Implement.
-
-2001-02-20 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (fetch_mail_fetch): Unref the driver here, in the
- subthread, so we dont block the gui while it sync's all the
- folders.
- (fetch_mail_fetched): Rewmoved above code from here.
-
-2001-02-16 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (receive_status): Dont do the thaw/freeze set here.
- (update_folders): "
-
- * mail-vfolder.c (vfolder_refresh): Setup the virtual
- 'unmatched' folder by default.
- (vfolder_uri_to_folder): HAndle UNMATCHED folder specially, it has
- no explicit sources.
-
-2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (receive_get_folder): Not sure it makes any
- difference, but lets ref the folder while the hash table is locked
- rather than after we unlock it.
-
-2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * main.c: * component-factory.c: Reverse the changes I made
- yesterday.
-
-2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * main.c (main): Have the mail-config and openpgp initialize here
- instead.
-
- * component-factory.c (owner_set_cb): No need to have mail-config
- and openpgp init here.
-
-2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (do_scan_subfolders): Use mail_storage_create_folder
-
- * mail-callbacks.c (mail_storage_create_folder): Convenience
- function so we can keep all the evolution_storage_add_new_folder()
- code in one place as much as possible.
-
- * subscribe-dialog.c (recursive_add_folder): Use 'name' rather
- than the no-description bs since that's what all the other places
- do.
-
- * mail-callbacks.c (folder_created): New callback to handle the
- "folder_created" signal - handles CamelFolderInfo's recursively.
- (folder_deleted): Same but for "folder_deleted".
-
- * component-factory.c (storage_create_folder): Instead of doing
- the evolution_storage_new_folder() stuff by hand, pass it off to
- the new callback: folder_created(). At some point this will be
- unecessary as we'll attach this callback to the "folder_created"
- signal.
-
-2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c: Wrapped the address compare functions in a
- #ifdef
- (address_compare): #ifdef the use of the smart address sorting
- code and provide a #else for using g_strcasecmp().
-
-2001-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * openpgp-utils.c (openpgp_verify): Add the --no-tty flag.
-
-2001-02-14 Dan Winship <danw@ximian.com>
-
- * mail-mlist-magic.c: Rewrite explanatory comments to use normal
- regexps rather than procmail weirdness.
- (check_sender): match "foo-owner" as well as "owner-foo".
- (check_list_post): (New) Check for "List-Post: <mailto:..."
- (mail_mlist_magic_detect_list): Iterate through an array of
- function pointers rather than calling each checker explicitly.
-
- * component-factory.c (add_storage): Connect to the
- "create_folder" signal on the storage.
- (storage_create_folder): Do folder creation.
-
-2001-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (owner_set_cb): Setup the Trash folder.
-
- * mail-ops.c (create_trash_vfolder): Do better error handling.
- (populate_folder_urls): Oops, helps to strdup the url into the
- array if we plan on freeing the data.
- (mail_get_trash): New async function that may eventually replace
- mail_do_setup_trash().
- (do_setup_trash): Do better error handling.
-
- * mail-local.c (mail_local_store_class_init): Override
- get_folder_info.
- (get_folder_info): Implement.
-
-2001-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * mail-local.c (do_reconfigure_folder): Fix some uninitialized
- variables.
-
-2001-02-12 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (build_tree): if doing a full update, save the
- cursor pos and restore it afterwards.
- (on_cursor_activated_cmd): Copy the current_uid to a new string.
- I dont know why this is required, but it is.
- (message_list_destroy): Free the cursor_uid as we're done with it.
- (build_flat): IF the current uid disappeared from the list, then
- unset the message.
- (build_tree): Likewise.
-
-2001-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write): Clean out the cruft in the
- Accounts section before writing the current accounts out to the
- config file.
-
- * mail-account-editor.c (construct): Strip the leading "/" from
- the Namespace/Path entry if the provider doesn't require absolute
- pathnames.
-
-2001-02-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * Makefile.am: xml-i18n-tools setup.
- * GNOME_Evolution_Mail.oaf.in: Mark strings for translation.
-
-2001-02-11 Dan Winship <danw@ximian.com>
-
- * mail-callbacks.[ch]: Re-add non-static forward_messages.
- mail-view.c needs it.
-
-2001-02-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (forward_inlined): Don't leak memory.
- (forward_messages): change doinline to be a gboolean argument.
-
-2001-02-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (list_add_addresses): Check the full list of
- IDs instead of just the default id and if we find an address
- matching one of the user's ids, then save it.
- (mail_generate_reply): Try to guess which account to use based
- upon the list of To and Cc addresses and pass that as the 'From'
- address to e_msg_composer_set_headers().
- (forward_get_composer): Updated to reflect changes to
- e-msg-composer.
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- * mail-config.glade.h: removed, xml-i18n-extract's the strings itself.
- * *.glade: do not output_translatable_strings
- * Makefile.am: removed *.glade.h from EXTRA_DIST.
-
-2001-02-09 Dan Winship <danw@ximian.com>
-
- * mail-local.c: Updates for CamelStore changes, small memory leak
- fixes.
- (lookup_folder): Removed (and moved into the reconfigure code)
- since this method no longer exists in CamelStore.
- (do_reconfigure_folder, etc): Update the info in the
- MailLocalStore after reconfiguring.
- (mail_local_lookup_folder): Removed
-
- * local-config.glade: fix padding of the label_format
-
- * message-list.c (ml_tree_value_at): Don't keep message infos
- reffed across calls, since this can cause badness after a
- reconfigure. Instead, just strdup the needed values and free those
- on the next call.
-
- * mail-tools.c (mail_tool_get_root_of_store): Unused, remove.
- (mail_tool_get_inbox): use camel_store_get_inbox.
-
- * evolution-outlook-importer.c (load_file_fn):
- * evolution-mbox-importer.c (load_file_fn): Use
- mail_tool_get_local_inbox() instead of mail_importer_get_folder()
-
- * mail-importer.c (mail_importer_get_folder): Removed
-
-2001-02-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (mail_generate_reply): New location for this
- function.
-
- * mail-format.c: Removed mail_generate_reply as it's ONLY ever
- used in mail-callbacks.c.
-
- * mail-ops.c (fetch_mail_fetch): Reworked some keep-mail-on-server
- logic so that we ALWAYS look for a cached array of UIDs that we
- may have downloaded previously so as not to download them again
- even if we will be deleting them off the server. This fixes bug
- #1344.
-
-2001-02-09 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (filter_folder_free): only free driver, if set.
- (fetch_mail_fetched): Unref the driver here, so it can cleanup
- before we call the 'done' callback.
-
- * component-factory.c (owner_set_cb): Add setup for mail
- autoreceive stuff.
-
- * mail-send-recv.c (free_info_data): Free the send info's from teh
- active hash, not the running list.
- (receive_done): As we finish downloads, remove them and clean them
- up, and also close the window.
- (mail_autoreceive_setup): New function to setup & maintain
- automatic download stuff.
-
-2001-02-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (construct): Set the sensitivity of the spin
- button based on the state of the checkbox.
-
- * mail-config.c (config_read): Properly do defaults here.
- (mail_config_write): Removed some of the settings being saved
- here.
- (mail_config_write_on_exit): Save those settings here instead.
-
-2001-02-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-display.c (on_object_requested): Cast the CamelMedium to a
- CamelMimePart before performing actions on it as if it were a
- CamelMimePart.
-
- * mail-config-druid.c (druid_finish): Save the auto-check settings.
- (construct): Initialize auto-check widgets.
- (mail_config_druid_get_auto_check): New function
- (mail_config_druid_get_auto_check_minutes): New functions
-
- * mail-config.c (config_read): Read in whether or not to check
- every x minutes.
- (mail_config_write): Save auto-check config data and SSL.
-
-2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-autofilter.c (rule_add_subject): Use "contains" because the
- subject might be broken into subparts and using the "is" rule will
- then fail ;-)
-
-2001-02-08 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (mail_send_receive):
- (mail_receive_uri): Init active_downloads hash if it hasn't been yet.
-
-2001-02-07 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (operation_status): Handle internal camel status return.
- (receive_done): Remove active download when done.
- (mail_receive_uri): Initiate download of a single source, with no gui.
- (build_dialogue): Mark any new items as real active downloads.
- (do_show_status): Make the progress bar optional.
-
-2001-02-06 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c: camel_cancel->camel_operation.
-
- * mail-ops.old.c: camel_cancel->camel_operation.
-
- * mail-ops.c: camel_cancel->camel_operation.
-
- * mail-mt.c: camel_cancel->camel_operation.
-
- * mail-callbacks.c (stop_threads): camel_cancel->camel_operation.
-
- * mail-mt.h: CamelCancel->CamelOperation.
-
-2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-mt.c (set_view_data): Check current_message for NULL - this
- fixes a bug running under SunOS (not a major deal tho as it's in a
- debug printf).
-
-2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_write_on_exit): Oops, save the
- seen_timeout variable.
-
-2001-02-06 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (evolution_mail_LDADD): Added libmenus.la.
-
- * folder-browser-factory.c (control_activate): Added GalView menus
- here.
-
- * message-list.c, message-list.h (message_list_get_layout): Made
- message_list_get_layout export.
-
-2001-02-06 Iain Holmes <iain@ximian.com>
-
- * mail-display.c (pixbuf_gen_idle): Set the size of the icon to 24x24
- always.
- (button_press): Function to toggle the disposition of an attachment.
- (on_object_requested): New way to indicate functions on attachments.
-
- * message-list.c (hide_load_state): Free the olduid.
-
-2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (set_defaults): Updated to checkfor
- "(none)".
-
- * mail-account-editor.c (entry_changed): Make sure the email
- address is valid.
-
- * mail-config-druid.c (identity_check): Check to make sure we have
- a valid email address.
- (is_email): New function to check a string to see if it's a valid
- email address.
-
-2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-mbox-importer.c: We are now going to use a file
- descriptor and a CamelMimeParser rather than a FILE pointer.
- (load_file_fn): Open the file descriptor and initialize the
- CamelMimeParser.
- (importer_destroy_cb): Unref the mime parser.
- (support_format_fn): Use an fd and use a case-insensitive
- comparison as well as elimate a buffer overrun.
- (process_item_fn): Process 1 CamelMimeMessage per invocation so as
- to not lock up Iain's GUI and to work similar to the way Iain
- originally coded it.
-
-2001-02-05 Christopher James Lahey <clahey@ximian.com>
-
- * evolution-mbox-importer.c, evolution-mbox-importer.h: Moved
- bonobo includes from the .c to the .h. Include
- evolution-mbox-importer.h in evolution-mbox-importer.c.
-
- * evolution-outlook-importer.c, evolution-outlook-importer.h:
- Moved bonobo includes from the .c to the .h. Include
- evolution-outlook-importer.h in evolution-outlook-importer.c.
-
- * mail-callbacks.c: Include mail-send-recv.h.
-
- * mail-local.c (mail_local_lookup_folder): Cast local_store to
- CAMEL_STORE.
-
- * mail-mt.c (mail_msg_cleanup): Make this function static.
-
- * mail-send-recv.c, mail-send-recv.h: Created mail_send_recv.h.
- Included it in mail-send-recv.c. Added a #include
- <libgnomeui/gnome-window-icon.h>.
- (mail_send_receive): Added a cast.
-
- * mail-summary.c (new_folder_cb, removed_folder_cb,
- create_summary_view): Cast the source func in calling g_idle_add.
-
-2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (try_inline_pgp_sig): New function to handle
- inline pgp-signatures.
-
- * mail-config-druid.c (construct): Keep track of the CheckSettings
- check boxes.
- (transport_next): Connect if the user says so.
- (incoming_next): Same. Also, don't jump to the next page if
- test-settings fails.
-
-2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (incoming_next): Updated to not connect when
- getting a list of authtypes.
- (transport_next): No longer connects - again, this is
- useless. Read the apply_changes argument for the reason why.
-
- * mail-account-editor.c (apply_changes): Updated. Set the
- 'connect' argument to FALSE for now, this basically means that the
- call is worthless tho so it may be best to either get rid of the
- checks altogether or else make it connect.
- (source_auth_init): Don't connect here, it's just plain annoying.
- (transport_construct_authmenu): Same here.
-
- * mail-config.c (mail_config_check_service): Now takes a connect
- argument.
-
-2001-02-03 Michael Meeks <michael@helixcode.com>
-
- * mail-local.c (load_metainfo): Fix dodgy libxml allocation
- pollution, and potential faults on NULL attributes.
-
-2001-02-02 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c (mail_send_receive): Cleaned up so we dont add
- an unecessary level of indenting.
-
- * message-list.c (ml_tree_value_at): For collapsed tree nodes,
- scan the collapses nodes for the unread and status information.
- Since we dont really have fake nodes anymore.
-
-2001-01-30 Ian Campbell <ijc25@cam.ac.uk>
-
- * message-list.c: Add support for new icons for being
- read/unread for fake root messages on threads.
-
-2001-01-30 Iain Holmes <iain@ximian.com>
-
- * mail-send-recv.c (mail_send_receive): Only allow one send and
- receive to be running at once.
- (build_dialogue): Set the icon for the window.
-
- * evolution-mbox-importer.c (support_format_fn): Only compare the first
- 5 bytes of the signature.
-
-2001-01-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * folder-browser.c: Fix typo.
-
-2001-01-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-importer.c (mail_importer_add_line): Cast the
- camel_stream_mem_new() to a CamelStreamMem.
-
-2001-01-29 JP Rosevear <jpr@ximian.com>
-
- * main.c: Return efence ifdefs to 0 for solaris build
-
-2001-01-29 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (tree_equal): Debug function to compare the tree
- we think we have, after an incremental update.
- (build_tree): Check the tree after we've built it.
- (build_tree): Oops, turn on BROKEN_ETREE again.
-
- * mail-mt.c (mail_get_password): If we are being called from the
- main gui thread, then just call the dialogue directly. Ideally we
- dont want this anyway but lets handle the case nicely.
- (mail_get_password): Try locking around the password request, to
- single-queue any password requests.
- (mail_msg_init): Push an exit handler to clean it up on completion.
-
- * mail-send-recv.c (receive_update_got_store): New function called
- when the store has been retrieved asynchronously.
- (mail_send_receive): Get the store asynchronously. This was
- causing problems where the password dialogue would try and be
- called from the main thread via a message.
-
- * mail-ops.c (mail_get_store): New function to get a store
- (a)synchronously. More or less taken from subscribe-dialog, which
- i will remove later.
- (mail_scan_subfolders): Try running the scan subfolder thing
- asynchronously, to help startup time. Not sure if this will work,
- but presumably the shell can handle the folders appearing later
- ok.
-
-2001-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (set_defaults): Turns out that I was wrong
- about the g_get_real_name mem leak, god damn glib for not
- following the const char* standard.
-
-2001-01-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (management_prepare): Use UTF-8.
- (set_defaults): Use UTF-8 and also fixed a memory leak by freeing
- the string returned by g_get_real_name().
- (mail_config_druid_get_account_name): Use UTF-8.
- (mail_config_druid_get_full_name): Same.
- (mail_config_druid_get_email_address): Same.
- (mail_config_druid_get_organization): Same.
-
- * mail-account-editor.c (apply_changes): Save UTF-8 strings rather
- than gtk strings.
- (construct): Use the UTF-8 convenience functions to set the gtk
- entries for the ID fields.
-
-2001-01-28 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): Make the OK button the
- default one.
-
- * mail-search-dialogue.c (mail_search_dialogue_init): Use stock
- buttons for OK and Cancel. Make the OK button the default one.
-
-2001-01-28 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): Set a default size for
- the window so that more rules are visible.
-
- * mail-search-dialogue.c (mail_search_dialogue_construct): Set a
- default size for the window so that more rules are visible.
-
-2001-01-28 Not Zed <NotZed@Ximian.com>
-
- * mail-display.c (write_data_to_file): Changed to use
- mail_save_part to save the data in another thread.
- (save_data_cb): Hide the fileselector once we have a button press,
- and are saving stuff.
-
- * mail-ops.c (mail_save_part): New function to save a part content
- asynchronously.
-
-2001-01-27 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser.c (etable_key): Don't handle home and end keys
- since %ETable deals with them now.
-
-2001-01-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * message-list.c (address_compare): Protect against NULL address
- pointers.
- (subject_compare): Same but for subject pointers.
-
-2001-01-27 Iain Holmes <iain@ximian.com>
-
- * mail-summary.c (create_summary_view): Applied patch from John R Sheets
- to fix some warnings.
- (idle_check): Fixed the prototype to fix some warnngs as well.
-
-2001-01-26 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-display.c (get_embedded_for_component): Try a control
- first, instead of an embeddable.
-
-2001-01-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * subscribe-dialog.c (populate_store_foreach): Check for a NULL
- service->url as we obviously can't subscribe to folders on a
- non-existant mail source :-)
- (subscribe_do_get_store): Check for a NULL url here too, not that
- we should need it anymore (due to the above fix) but it doesn't
- hurt. Also, should we wait on the thread? Probably doesn't matter.
-
-2001-01-26 Iain Holmes <iain@ximian.com>
-
- * evolution-outlook-importer.c (load_file_fn): Replace fsetpos with
- fseek and use a long instead of fpos_t.
- (process_item_fn): Same.
-
- * mail-importer.h: Add a frozen item to tell when the folder is frozen.
-
- * evolution-mbox-importer.c (process_item_fn): Fix the blank message.
- Set the frozen element.
- (importer_destroy_cb): Thaw the folder if frozen.
-
-2001-01-26 Dan Winship <danw@ximian.com>
-
- * mail-identify.c (mail_identify_mime_part): Fix an uninitialized
- variable use.
-
-2001-01-26 Jason Leach <jasonleach@usa.net>
-
- (Fixing an old FIXME)
-
- * component-factory.c (create_vfolder_storage): removing
- create_vfolder_storage, replacing call to it with
- vfolder_create_storage.
-
-2001-01-26 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (build_tree): Define BROKEN_ETREE again, till we
- get this stuff fixed better.
-
-2001-01-25 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c: Moved teh "sender contains" item to the end of
- the list, so the gui doesn't suddenly change on everyone. Fixed
- the sender-contains search string to be a valid s-exp (ha, didn't
- test it even once eh ettore?!)
- (search_save): Dont have the sender contains as the default case
- (which well, never gets called anyway), oops i guess i should've
- reviewed the patch a little more.
-
-2001-01-26 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser.c: Add a missing parenthesis to the "from
- contains" rule. Also make it the last item instead of the first
- one.
-
-2001-01-25 Iain Holmes <iain@ximian.com>
-
- * component-factory.c (component_factory_init): Init the mail
- mail importers.
-
- * mail-local.[ch] (mail_local_lookup_folder): retrieve the local
- folder given by the name.
-
- * mail-importer.[ch]: Basic functions for all importers to use.
-
- * evolution-mbox-importer.[ch]: Mbox importer.
-
-2001-01-25 Jeffrey Stedfast <fejj@ximian.com>
- The following fixes seem to clear up the problem of new mail not
- being shown in the Inbox and/or other folders where mail had been
- delivered.
-
- * mail-send-recv.c (build_dialogue): Freeze the inbox.
- (receive_get_folder): Freeze folders before dumping them into the
- hash table.
- (free_folder_info): Thaw the folder.
- (free_info_data): Thaw the Inbox.
-
-2001-01-25 Jason Leach <jasonleach@usa.net>
-
- (Don't prompt about unsaved changes for replies/forwards that have
- not actually been modified)
-
- * mail-callbacks.c (do_forward_inline): Unset the has_changed for
- the message composer.
- (do_forward_attach): Same here.
- (mail_reply): And here.
-
-2001-01-25 Dan Winship <danw@ximian.com>
-
- * mail-format.c (mail_content_loaded): Check if a message part's
- content is available, and if it's not, queue a thread that will
- load it and then queue an idle-handler redisplay of the message.
- (call_handler_function): Call mail_content_loaded() on the part
- and don't try to display it if it's currently offline.
- (get_data_wrapper_text): Simplify a bit
-
- * mail-display.c (mail_display_queue_redisplay): rename and make
- non-static.
- (mail_display_redisplay): Use a "new and improved" way of
- preserving the GtkHTML scroll location. ("new and improved" is
- code for "gross and hackish", but there should be a real interface
- for this eventually.)
- (on_url_requested): Use mail_content_loaded() and don't write out
- offline cid: URLs
-
- * mail-identify.c (mail_identify_mime_part): Use
- mail_content_loaded and don't try to identify the data if it's
- offline.
-
-2001-01-25 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Made the message list pay attention to the
- "cursor_activated" signal instead of the "cursor_change" signal.
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-factory.c (update_pixmaps): Set the print icon
- for various other items.
- (set_pixmap): Be a bit more verbose in the warning message if the
- icon isn't found [i.e. report the name of the file too].
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * folder-browser-factory.c (update_pixmaps): Set the pixmaps for
- the "/menu/Folder/FolderConfig" and "/menu/Settings/SetMailConfig"
- items.
- (set_pixmap): Don't prepend the "buttons" prefix.
- (update_pixmaps): Update accordingly.
-
-2001-01-24 Not Zed <NotZed@Ximian.com>
-
- * folder-browser.c (search_string[]): Fix the subject match
- expression, which was missing a closing ).
-
- * mail-send-recv.c (do_show_status): Escape any % signs in the
- string before setting the format string.
-
-2001-01-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.glade: Added a 3rd page to the account editor to
- allow users to set their HTML sending preference and also allow
- them to change their message status timeout.
-
- * mail-accounts.c (construct): Added handlers for the send-html
- checkbox and for the mark-message-as timeout spinbutton.
-
-2001-01-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (apply_changes): Save the source and
- transport changes whether the user can connect to the host or not.
-
-2001-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- [Applied patch from Tuomas Kuosmanen <tigert@ximian.com>]
-
- * folder-browser.c: Added enum value `ESB_SENDER_CONTAINS' as well
- as a "Sender contains" item to the search menu. Also add a
- corresponding "(match-all)" rule to the `search_string' array.
- (search_save): Handle `ESB_SENDER_CONTAINS' here.
-
-2001-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * GNOME_Evolution_Mail.oafinfo: Fixed the repo_ids so that they
- use the right syntax.
-
-2001-01-23 Dan Winship <danw@ximian.com>
-
- * folder-browser-factory.c:
- * mail-callbacks.c (send_receive_mail): Fix spelling.
-
-2001-01-24 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (fetch_mail_fetch): Set the default folder when
- copying to mbox. This is a quick fix, i might need to do a slight
- redesign to clean it up.
-
-2001-01-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-send-recv.c (build_dialogue): Make sure the source->url is
- not NULL (which is perfectly valid).
- (mail_send_receive): Where oh where should my prototype be?
- (receive_get_folder): Make sure to ref the folder before you add
- it to the hash table.
-
- * openpgp-utils.c:
- * mail-crypto.c: A few minor tweaks.
-
-2001-01-23 Not Zed <NotZed@Ximian.com>
-
- * message-list.c (build_tree): Try turning off the BROKEN_ETREE
- thing. It seems to work ok (better?) now, but if its still broken
- i'll remove it again for the next release.
-
-2001-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (set_defaults): Automagically fill in the
- user's default transport if he/she has setup previous accounts.
-
- * mail-format.c (handle_multipart_signed): Just wrote a temp way
- of reporting success/fail of PGP/MIME signature verification
- status.
-
-2001-01-22 Iain Holmes <iain@ximian.com>
-
- * evolution-outlook-importer.c: Outlook Express 4 .mbx importer.
-
- * component-factory.c (component_factory_init): initialise the
- outlook importer.
-
- * GNOME_Evolution_Mail.oafinfo: Add the details for the Outlook
- importer.
-
-2001-01-22 Dan Winship <danw@ximian.com>
-
- * mail-mt.[ch]: make mail_gui_thread non-static.
-
- * main.c (main): Set up signal handler for SEGV, BUS, FPE
- (segv_redirect): if a gnome-segv'ing signal is received in
- a thread other than mail_gui_thread, re-deliver it to that
- thread to work around a problem with the gnome segv handler.
-
-2001-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (handle_multipart_signed): Fixed to display
- subparts (other than the signature part) and started to write a
- pretty way to show if the signature verified or not.
-
-2001-01-23 Not Zed <NotZed@Ximian.com>
-
- * mail-crypto.c (pgp_mime_part_verify): Fix a double-free problem.
-
-2001-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (incoming_type_changed): Oops, danw didn't
- know 'provider' could be NULL :-)
-
-2001-01-22 Dan Winship <danw@ximian.com>
-
- * mail-config-druid.c (incoming_type_changed): Change "Path:"
- label to "Namespace:" for IMAP. Use $MAILDIR rather than $MAIL for
- Maildir. If $MAIL isn't set, guess.
-
- * component-factory.c (mail_hash_storage): Function to add a
- store/storage mapping.
- (add_storage): Use it.
-
- * mail-vfolder.c (vfolder_uri_to_folder): Use the vfolder name
- rather than the string "mbox" (which wasn't ever used for
- anything) in the vfolder URL. (Combined with the CamelVeeFolder
- change, this makes camel_folder_get_name() return a pretty name
- for vfolders now.) Call mail_hash_storage() to record the
- CamelVeeStore/vfolder_storage mapping. (Ideally, there'd only be a
- single CamelVeeStore... this is just a quick hack.)
-
- vfolders now display their unread count once you've looked at them
- once.
-
-2001-01-22 Dan Winship <danw@ximian.com>
-
- * mail-tools.h: s/filter-driver.h/camel-filter-driver.h/ and
- update first arg of mail_too_filter_get_folder_func
-
- * mail-tools.c (mail_tool_filter_get_folder_func): Update first
- arg to CamelFilterDriver *
-
- * mail-send-recv.c (receive_status):
- * mail-ops.c (send_queue_send): s/FILTER/CAMEL_FILTER/
-
- * mail-callbacks.c: Remove filter-driver.h include
-
- * mail-accounts.c: Put the news functions inside #ifdef
- ENABLE_NNTP to prevent warnings about unused statis functions.
-
- * subscribe-dialog.c (subscribe_folders, unsubscribe_folders,
- subscribe_refresh_list): Update prototype to match BONOBO_UI_VERB.
- (populate_store_list): add a de-constifying cast
-
-2001-01-22 Not Zed <NotZed@Ximian.com>
-
- * .cvsignore: Added temp profiling files.
-
- * component-factory.c (owner_set_cb): remove a warning with
- conditional news compilation.
-
- * mail-ops.h: Cleaned up the header list.
-
-2001-01-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c (mail_crypto_is_rfc2015_signed): Helps if I spell
- stuff correctly so it can pass the tests ;-)
-
-2001-01-22 Not Zed <NotZed@Ximian.com>
-
- * folder-browser-factory.c: Replace the old get_send mail with the
- new one (button).
-
- * mail-ops.c (set_x_mailer):
- (mail_load_evolution_rule_context):
- (mail_do_fetch_mail):
- (mail_do_filter_ondemand):
- (mail_send_mail_old):
- (mail_do_send_queue): All removed, (for) now lives in mail-send-recv.c.
- (load_context):
- (setup_filter_driver):
- (filter_get_folder):
- (mail_filter_folder):
- (mail_fetch_mail):
- (mail_update_subfolders):
- (mail_send_mail):
- (mail_send_queue): New equivalents of all these fundtions, moved
- from mail-send-recv.c ...
- (mail_filter_on_demand): Moved here too.
- (mail_load_filter_context): Export this.
-
- * mail-callbacks.c (apply_filters): Use the new
- mail_filter_on_demand() call.
- (send_receieve_mail): Use mail_send_receive to do the work. Add a
- little error handling here that used to be elsewhere.
- (send_queued_mail): Removed.
- (fetch_mail): Removed.
- (select_first_unread): #ifdef'd this out. Not sure if this still
- makes sense, but it doesn't get run right now anyway.
- (composer_postpone_cb): Fix the setting of message flags. You
- dont need to get them first, ever.
-
- * mail-send-recv.c (mail_send_message): Dont use
- mail_tool_send_via_transport anymore (it does nothing useful).
-
- * mail-tools.c (mail_tool_camel_lock_up): Turned into a noop.
- (mail_tool_camel_lock_down): And here too.
- (mail_tool_move_folder_contents): Removed from the code (hasn't
- bene used for ages).
- (mail_tool_send_via_transport): Removed, it doesn't save anything.
-
-2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * component-factory.c (owner_set_cb): Initialize OpenPGP.
-
- * openpgp-utils.c (openpgp_init): No longer takes a passphrase
- callback, we'll just use the mail-session one. Makes life simpler.
- (pgp_get_passphrase): Use mail_session_request_dialog().
-
- * mail-ops.c (do_send_queue): Remove the X-Evolution header before
- we send.
-
- * mail-crypto.c (pgp_mime_part_sign): Don't forget to unref the
- filters.
- (pgp_mime_part_verify): Same.
- (pgp_mime_part_encrypt): Same.
- (pgp_mime_part_decrypt): Take NotZed's advice and use
- camel_stream_mem_new_with_buffer instead of writing to a new
- stream_mem. Also use camel_data_wrapper_construct_from_stream
- instead of creating a parser and using that.
-
-2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-crypto.c: Updated header comment and fixed some ref/unref
- count problems in the various functions. Also fixed some other
- little things.
- (pgp_mime_part_encrypt): Do some canonical CRLF action before
- encrypting.
- (pgp_mime_part_sign): Make sure we are the owners of the byte
- array.
- (pgp_mime_part_verify): Same.
- (pgp_mime_part_encrypt): Same.
- (pgp_mime_part_decrypt): Same.
-
-2001-01-21 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (message_list_get_layout): Added
- draw-focus="true" and selection-mode="browse" attributes to the
- ETableSpecification.
- (message_list_construct): Removed setting the "draw_focus"
- argument since it doesn't exist any more.
-
-2001-01-21 Not Zed <NotZed@Ximian.com>
-
- * mail-mt.c (mail_msg_new): Init a cancel field in the message.
- (mail_msg_free): Free it.
- (mail_msg_cancel): New function to attempt to cancel an operation
- by id. Impelementation functions can still be uncancellable by
- not registering for cancellation, etc, or do it themselves as
- well.
-
- * mail-send-recv.c (fetch_mail_filter_folder): set folder_uid's
- properly, so we can save it later.
- (filter_folder_filter): Renamed from fetch_mail_filter_folder,
- since its going to be used for all filtering.
- (mail_fetch_mail): Changed from mail_filter_mail.
- (mail_filter_folder): New function, replaces
- mail_do_filter_ondemand functionality.
- (mail_filter_on_demand): New function, actually replaces
- mail_do_filter_ondemand.
- (receive_get_folder): Added an exception arg.
- (mail_send_message): New function to just send a message.
- (send_mail_send): Use mail_send_message.
- (send_queue_send): New send qeue code, use mail_send_message, and
- clean up some stuff.
- (mail_send_receive): Changed from mail_receive.
- (build_dialogue): Setup the sending data, as well.
- (mail_update_subfolders): New function to update folder info.
- (send_mail_send): hook into cancellation if we want.
-
-2001-01-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-ops.c (do_send_queue): Strip leading space from the
- transport url gotten from the message.
-
-2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-format.c (mail_generate_reply): If the name is empty
- string, use the address.
-
-2001-01-19 Dan Winship <danw@ximian.com>
-
- * mail-display.c (pixmap_press): Update for e_popup_menu_run
- change.
-
- * folder-browser.c (etable_key): On GDK_Menu (the menu key on
- 105-key keyboards), pop up the right-click menu.
- (on_right_click): update for e_popup_menu_run change.
-
- * subscribe-dialog.c (recursive_add_folder): New function to add a
- folder and any parents of it that don't yet exist. Fixes bugzilla
- #1028.
-
-2001-01-19 Not Zed <NotZed@Ximian.com>
-
- * mail-send-recv.c: New swanky send/recieve thingy, well it so far
- only receives (pop/mbox). Ignore all the warnings for now, and
- the ugly 'button' to run it.
-
-2001-01-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * folder-browser-factory.c: Added the next/previous toolbar
- buttons.
-
- * mail-callbacks.c (next_msg): New callback so we can have a next
- toolbar button.
- (previous_msg): Same but for previous.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (construct): Anna's dialog now supports
- SSL so we can get rid of the ssl-support checks. Also work around
- the fact that Anna's dialog doesn't have an optionmenu for the
- transport type, it's a label instead.
- (transport_type_init): Cast the transport_type widget to a
- GtkOptionMenu where appropriate as the widget that stores it is
- now generic.
- (apply_changes): Modify code to work with anna's dialog...*sigh*
- (ok_clicked): Alert the user that one or more servers failed to
- validate and allow him to continue anyway.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_set_pgp_path): New config function to
- set the path to the pgp binary.
- (mail_config_get_pgp_path): Gee I wonder...
- (mail_config_set_pgp_type): This one sets the type (ie PGP5, PGP2,
- or GnuPG - see openpgp-utils.h for values)
- (mail_config_get_pgp_type): Der.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (construct): Handle NULL source and, while
- we're at it, transport URLs. Apparently camel_url_new() and/or
- camel-url_free() don't handle NULL input well.
-
- * mail-accounts.c (load_accounts): Handle NULL source URLs.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (construct): Oops. "url && url->host"
- doesn't do much without the '?' and ':' ;-)
-
-2001-01-17 Ettore Perazzoli <ettore@ximian.com>
-
- * mail-ops.c (set_x_mailer): New function.
- (send_mail_send): Use it.
- (do_send_queue): Use it.
-
-2001-01-17 Martin Norbäck <d95mback@dtek.chalmers.se>
-
- * openpgp-utils.c (pgp_get_passphrase): Changed the word entry
- to enter, which is the correct word to use.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (ask_confirm_for_empty_subject): Update to use
- EMessageBox and to record if the user doesn't want to ever see
- this dialog again.
-
- * mail-config.c (mail_config_get_prompt_empty_subject): New config
- function.
- (mail_config_set_prompt_empty_subject): Another new one.
-
-2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (apply_changes): Modify to be able to
- handle a NULL source_url.
- (source_auth_init): Allow for a NULL source url.
- (source_check): Same.
-
- * mail-config.c (mail_config_write): Allow for NULL source
- URLs. And while we're at it, NULL transport URLs as well. Might as
- well save the use_ssl variable too.
- (config_read): Same.
-
- * mail-config-druid.c (druid_finish): Modify to allow a NULL
- source url.
- (incoming_next): Modify to check for a NULL source and jump to the
- transport page if one is encountered (this means the user decided
- not to config a source).
- (incoming_type_changed): Modify to set all widgets insensitive if
- the user selected the "None" source menu item (aka NULL provider).
- (incoming_check): Modify to allow the user to go to the next page
- when he/she has chosen "None" for their source type.
- (mail_config_druid_get_source_url): Return NULL if the provider is
- NULL.
- (mail_config_druid_get_transport_url): Same.
-
-2001-01-16 Dan Winship <danw@ximian.com>
-
- * mail-display.c (on_object_requested): Don't do thumbnails for
- offline images
-
-2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-callbacks.c (save_msg_ok): If the user hits "No", then
- don't destroy the filesel window.
-
- * mail-ops.c (save_messages_save): Open with mode 0666 as danw
- suggests.
-
-2001-01-16 Chris Toshok <toshok@helixcode.com>
-
- * component-factory.c (owner_set_cb): only load the news storage
- if ENABLE_NNTP.
-
- * mail-accounts.c (construct): if !ENABLE_NNTP, remove the news
- page from the dialog.
-
-2001-01-16 Radek Doulik <rodo@helixcode.com>
-
- * mail-format.c (mail_generate_reply): use
- e_msg_composer_mark_text_orig
-
-2001-01-16 Dan Winship <danw@ximian.com>
-
- * mail-ops.c (send_mail_send, do_send_queue): Update the X-Mailer
- header to use the string specified by configure.
-
-2001-01-16 Jason Leach <jasonleach@usa.net>
-
- * subscribe-dialog.c: removed unecessary #inlcude "e-title-bar.h"
-
-2001-01-16 Jason Leach <jasonleach@usa.net>
-
- * openpgp-utils.c (pgp_get_passphrase): Fix a string causing
- translation problems. Bug #1147.
-
-2001-01-16 Not Zed <NotZed@Ximian.com>
-
- * mail-ops.c (mail_do_fetch_mail): Setup a cancellation handle.
- (do_fetch_mail): REgister for cancellation here.
- (cleanup_fetch_mail): And unregister for cancellation here.
- (mail_get_message): Add a cancel handle.
- (get_message_get): Register/deregister for cancel.
- (get_message_free): & clean up.
-
- * mail-mt.c (mail_msg_received): Removed debuggng.
-
- * mail-callbacks.c (stop_threads): Callback for stopping.
-
- * folder-browser-factory.c: Add a stop button verb thingy.
- (control_activate): Disable the stop button by default.
-
-2001-01-15 Christopher James Lahey <clahey@ximian.com>
-
- * message-list.c, message-list.h: Change from using filters for
- date and size to using e_cell_date and e_cell_size. Moved a bunch
- of includes from the message-list.h to the message-list.c.
-
-2001-01-15 Miguel de Icaza <miguel@ximian.com>
-
- * mail-callbacks.c (configure_mail): Set the default button to
- `Yes' here.
-
-2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-account-editor.c (source_auth_init): If the preferred
- authmech isn't found, default to the first one in the list.
- (transport_construct_authmenu): This function already did the
- above but I made it simpler.
- (apply_changes): A number of cleanups.
-
-2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config-druid.c (druid_finish): Fixed mail_load_storages to
- make a mini GSList of the account, not the account->source. Oops.
-
- * mail-accounts.c (news_delete): Updated to use the remove_news()
- function.
-
- * mail-config.c (mail_config_remove_news): New convenience
- function for removing news accounts.
- (mail_config_remove_account): Pretty much the same thing.
-
- * mail-ops.c (do_send_queue): Get the X-Evolution-Transport URL
- and use that if it exists, else fall back on the default
- transport.
-
- * mail-callbacks.c (composer_postpone_cb): Set an
- X-Evolution-Transport header.
-
-2001-01-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Removed GPG_* variables.
-
- * component-factory.c (mail_load_storages): Now takes a
- 'is_account_data' variable to specify whether the sources is a
- list of accounts of a list of services. Basically, the only time
- you should pass in FALSE is when you are setting up NNTP storages.
- (add_storage): Now takes a 'name' argument that specifies the name
- to use in the storage.
- (owner_set_cb): Updated to pass TRUE for accounts and FALSE for
- news servers into mail_load_storages.
-
-2001-01-12 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Changed filter_date and filter_size to match the
- changes in gal.
-
-2001-01-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.glade: Anna's dialogs.
-
- * mail-config.c (mail_config_get_account_by_address):
- Removed. Danw and I decided on setting a X-Evolution-Transport
- header on messages going to the Outbox so we can later guess which
- transport to use when sending it.
-
- * mail-account-editor.c (apply_changes): Update to some day be
- able to support SSL.
- (construct): Update for Anna's dialogs...
-
- * subscribe-dialog.c (populate_store_list): Updated to reflect
- past changes to the mail-config API.
-
-2001-01-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (composer_send_cb): Get the account by using
- the new e_msg_composer_get_preferred_account() function. Also
- check to make sure everything is configured (in case they deleted
- their accounts while composing mail?).
-
- * mail-config.c (mail_config_get_account_by_address): New
- convenience function.
-
-2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (component_fn): Pass NULL as the
- @copy_folder_fn arg to `evolution_shell_component_new()'.
-
- * folder-browser.c (on_right_click): Removed hide menu. It
- belongs to the view menu now.
-
-2001-01-12 Miguel de Icaza <miguel@ximian.com>
-
- * message-list.c: Add strings for localization
-
- * folder-browser.c: Rename "Save" to "Store search as vFolder".
-
-2001-01-11 Miguel de Icaza <miguel@gnu.org>
-
- * mail-display.c (on_object_requested): Unref the property bag
- when we are done with it.
- (get_embedded_for_component): Moved the code to request the
- embeddable/control to a separate function.
-
-2001-01-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * mail-config.c (mail_config_get_account_by_name): New convenience
- function that I will need later when I redo the composer From
- field.
-
- * mail-display.c (on_object_requested): Update to reflect past
- changes to the mail-config API.
-
- * session.c (mail_session_set_password): strdup() the key.
-
- * mail-config-druid.c (construct): We don't want to be able to set
- the reply-to in the config druid.
- (druid_finish): Don't set a reply-to anymore.
- (mail_config_druid_finalise): Don't unref the providers.
-
- * mail-config.glade: Took out the Reply-To field in the druid.
-
-2001-01-11 Miguel de Icaza <miguel@gnu.org>
-
- * mail-config-druid.c (incoming_type_changed): Guess the default
- MAIL value for MBOX and Maildir files.
-
- * mail-callbacks.c (configure_mail): Force finalization of the
- function before returning fixing the FIXME that was there.
-
-2001-01-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c (transport_next): If the service_check
- fails, pop-up a warning dialog letting the user know he or she may
- have problems and then let them continue on with their lives.
- (incoming_next): Same (+ jump them over the auth page to the
- transport page).
-
- * mail-account-editor.c (apply_changes): Eek! Don't destroy the
- account if the connection fails, duh. This is what is causing the
- segfaults.
-
-2001-01-11 Dan Winship <danw@ximian.com>
-
- * folder-browser.c (got_folder): Connect to folder_changed as well
- as message_changed for updating unread count
-
-2001-01-10 Miguel de Icaza <miguel@helixcode.com>
-
- * GNOME_Evolution_Mail.oafinfo: Add Bonobo/ItemContainer as the
- set of supported interfaces in GNOME_Evolution_Mail_Composer
- component.
-
-2001-01-11 Dan Winship <danw@ximian.com>
-
- * mail-format.c (write_field_to_stream): Translate the header name
- to UTF8.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (configure_mail): New function that explains to
- the user why he can't do the action he requested and then procedes
- to ask if he'd like to configure his accounts now.
- (check_send_configuration): If the user doesn't have configured
- accounts, don't let him continue and call configure_mail().
- (fetch_mail): Same.
- (send_queued_mail): Same.
- (send_receieve_mail): Same.
-
- * mail-config.c (mail_config_write): Don't save a "is_configured"
- variable. Instead we'll just check to see if we have accounts - if
- yes, then configured == TRUE.
- (mail_config_is_configured): return accounts != NULL.
- (mail_config_get_default_account): Mark the first account as the
- default if none are marked.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-account-editor.c (source_auth_type_changed): Set the
- sensitivity of the Password label too.
-
- * mail-config-druid.c (transport_back): New callback to handle
- when the user hits the "back" button when on the transport
- page. This is needed to handle the case where we don't want to
- show the user the auth page (due to there being no auth choices).
- (incoming_next): If we are going to skip over the auth page, set
- the 'have_auth_page' variable to FALSE.
- (construct): Initialize the have_auth_page to TRUE.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c (incoming_type_changed): Grab the focus of
- the first widget that is sensitive.
- (transport_type_changed): Same.
- (identity_prepare): Grab the focus of the name entry.
-
- * mail-callbacks.c (send_queued_mail): Prevent Federico's segfault.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c (auth_type_changed): Clear the password
- entry if it's not allowed.
- (transport_type_changed): Clear the hostname if it is not allowed
- by the provider type.
-
- * mail-account-editor.c (transport_type_changed): If the hostname
- is allowed, clear it.
-
- * mail-config-druid.c (incoming_type_changed): Clear the contents
- of the entry boxes that are not to be used.
- (mail_config_druid_get_source_url): If the text in the entry is
- emptry string, don't set it' contents in the url.
-
-2001-01-10 Miguel de Icaza <miguel@helixcode.com>
-
- * mail-callbacks.c (print_msg): Fix proto.
- (print_preview_msg): Fix proto.
-
- * subscribe-dialog.c: Remove more UNSAFE macros.
-
-2001-01-09 Jason Leach <jasonleach@usa.net>
-
- * mail-display.c (pixmap_press): Bugfix for #1077: scrollwheel
- doesn't work while hovering over an attachment icon.
-
-2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.glade: Moved to mail-config.glade
-
- * mail-accounts.c (construct): Updated to use mail-config.glade.
-
- * mail-account-editor.c (construct): Updated to use
- mail-config.glade.
-
- * mail-config-druid.c (construct): Updated to use
- mail-config.glade.
-
- * mail.h: Added the new mail config headers.
-
-2001-01-09 Dan Winship <danw@helixcode.com>
-
- * mail-local.c (local_folder_changed_proxy): Change
- mail_op_forward_event to mail_proxy_event.
-
-2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (save_messages_save): Let the system umask determine
- the permissions of this file.
-
- * mail-config-druid.c (incoming_type_changed): Gray out the
- appropriate labels too.
- (auth_type_changed): And here.
- (transport_type_changed): Here too...
-
- * mail-account-editor.c (source_check): Gray out the appropriate
- labels too.
- (transport_type_changed): And here too.
-
-2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-account-editor.c: For all optionmenu's, set the appropriate
- 'history'.
- (keep_mail_check): Set the keep-on-server checkbutton sensitivity
- based on whether or not the store is a storage or not.
- (construct): Call keep_mail_check().
-
- * mail-config-druid.c (incoming_type_changed): Set the
- keep-on-server checkbutton sensitivity based on whether or not the
- store is a storage or not.
-
- * mail-accounts.c (construct): Make sure the dialog isn't a
- scrunched little thingy.
-
-2001-01-09 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (evolution_mail_LDFLAGS): Add -export-dynamic, so
- libglade can resolve evolution-mail symbols.
-
-2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c: Updated.
- (decode_pgp): Get rid of #ifdef PGP_PROGRAM's and handle
- appropriately.
- (handle_multipart_signed): Same.
- (handle_multipart_encrypted): Same.
-
- * Makefile.am: Added openpgp-utils.[c,h] to the build.
-
- * openpgp-utils.c: New source file containing all of the pgp
- interface code.
-
- * mail-crypto.c: Removed all of the openpgp funtions as they are
- being moved to a new file.
- (mail_crypto_is_rfc2015_signed): Renamed.
- (mail_crypto_is_rfc2015_encrypted): Renamed.
-
-2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * session.c (mail_session_set_password): New function to set the
- password for a given url.
-
- * mail-config-druid.c (druid_finish): Don't save the password in
- the source url, instead insert it into the save-password hash.
- (mail_config_druid_get_source_url): Check to make sure the
- authmech isn't "", if it is then don't set the authmech.
-
- * mail-account-editor.c (apply_changes): Don't save the password
- in the source url, instead insert it into the save-password
- hash. Also check to make sure we don't set an empty string as the
- authmech for the source or transport.
-
- * mail-accounts.c (mail_default): After reloading the accounts,
- reselect the previously selected account.
- (mail_delete): Same.
-
- * mail-config-druid.c (druid_cancel): Fixed segfault bug.
-
-2001-01-09 Radek Doulik <rodo@helixcode.com>
-
- * mail-format.c (write_headers): remove </center><p>
- (handle_text_plain): add <font size=\"-3\">&nbsp</font><br> before
- msg text
- (handle_text_plain_flowed): ditto
-
-2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-accounts.c (mail_default): Write the config data and reload
- the accounts list so the "default" tag is relocated.
- (mail_delete): Write the config data here too.
-
-2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * Makefile.am:
- * component-factory.c:
- * folder-browser-factory.c:
- * folder-browser.c:
- * mail-accounts.[c,h]:
- * mail-account-editor.[c,h]:
- * mail-callbacks.c:
- * mail-config.[c,h]:
- * mail-config-druid.[c,h]:
- * mail-config-druid.glade:
- * mail-display.c:
- * mail-format.c:
- * mail-tools.c: Brand spankin' new config druid, editor,
- and manager.
-
-2001-01-08 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c: Add an #include <errno.h>
-
-2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * Makefile.am:
- * component-factory.c:
- * folder-browser-factory.c:
- * folder-browser.c:
- * mail-callbacks.c:
- * mail-config.[c,h]:
- * mail-display.c:
- * mail-format.c:
- * mail-tools.c: Reverted mail-config changes temporarily until
- I get it working correctly.
-
-2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c: More lovely fixes...
-
- * mail-callbacks.c: Don't segfault if a default account doesn't
- exist.
-
-2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c: A bunch of fixes.
-
- * mail-accounts.c: More fixes...
-
- * mail-account-editor.c (construct): Reparent the notebook to the
- editor->vbox and set the resize policy.
-
-2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (providers_config): Use a
- gnome_dialog_run_and_close().
-
- * mail-accounts.c (construct): Reparent the notebook to the
- dialog->vbox not to the dialog itself. Also set the resize policy
- to allow the user to stretch it.
-
-2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-tools.c (mail_tool_quote_message): Updated to reflect
- changes to the mail-config API.
-
- * mail-display.c (redisplay): Updated to reflect changes to the
- mail-config API.
-
- * mail-callbacks.c (providers_config): Use the new account dialog.
-
- * mail-config-druid.c (druid_finish): Load the new storage into
- the shell.
- (mail_config_druid_new): Take a shell argument.
-
- * mail-format.c (mail_generate_reply): Updated to reflect changes
- to the mail-config API.
-
- * mail-config-druid.c: Fixed this to build.
-
- * mail-callbacks.c (check_send_configuration): Updated to reflect
- changes to the mail-config API.
- (create_msg_composer): Same.
- (forward_get_composer): Same.
- (send_queued_mail): Same.
- (composer_send_cb): Same.
-
- * mail-account-editor.c: Updated to build cleanly. *
- mail-config-druid.c: Same. * mail-accounts.c: Same.
-
- * folder-browser-factory.c (control_activate): Updated for API
- changes in mail-config.
-
- * folder-browser.c (done_message_selected): Updated for API
- changed in mail-config.
- (folder_browser_gui_init): Same.
- (got_folder): Same.
-
- * component-factory.c (owner_set_cb): After using the sources
- list, free it as it is no longer a const GSList as with the older
- mail-config code.
-
- * mail-config.c: Totally rewritten.
-
-2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-accounts.c (mail_edit): Implemented.
-
- * mail-account-editor.c (apply_clicked): Implemented.
- (ok_clicked): Implemented.
- (cancel_clicked): Implemented.
- (source_auth_type_changed): Implemented.
- (source_auth_init): Implemented.
- (transport_construct_authmenu): Implemented.
- (transport_type_changed): Updated to change regenerate the auth
- option menu.
- (construct): Attached callbacks to OK, Apply and Cancel buttons.
-
- * mail-account-editor.c (source_auth_init): Use the new
- mail_config_check_service().
-
- * mail-config-druid.c: Remove check_service() as it will be moved
- into mail-config.
-
-2001-01-06 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (message_list_select): Made it so that going to
- the next or previous message in the list will at least move one
- message, even if the current message matches the query. This
- makes 'n' go to the next unread message, even if the current
- message is unread.
-
-2001-01-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-account-editor.c: Coded a bunch of the methods.
-
-2001-01-04 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (idle_check): Check if the HTML for the current
- summary has been created, and if not then keep trying until it
- has.
- (new_folder_cb)
- (removed_folder_cb)
- (create_summary_view): Use the idle_check function to generate the
- summary.
- (create_summary_view): Don't set the HTML here. Set it via the
- pipe.
-
-2001-01-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-account-editor.[c,h]: New source files to provide an
- account editor widget.
-
- * mail-config-druid.c (auth_type_changed): Set the authproto on
- the druid so we can look it up later.
-
-2001-01-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-accounts.c (mail_add): Since the druid now handles adding
- the new account to the config, we'll just connect to the destroy
- event and show the druid.
- (mail_add_finished): Just reload the account list here.
-
- * mail-config-druid.c (druid_finish): New callback to handle the
- "finish" signal. On second thought, it seems it would be best for
- the finish callback to be here rather than in mail-accounts.c.
-
- * mail-accounts.[c,h]: Added. Contains source for the Account manager
- window. And just like mail-config-druid.c, it's not yet complete.
-
- * mail-config-druid.c (mail_config_druid_get_incoming_keep_mail):
- Renamed from _delete_mail
- (mail_config_druid_get_transport_url): New convenience function
- that replaces the get_hostname, get_protocol, etc.
- (mail_config_druid_get_source_url): Same.
-
- * mail-config-druid.glade: Changed "Delete mail from server" to
- "Keep mail on server" as this has a more positive ring to it. Both
- I and Aaron agree this is the better phrase.
-
-2001-01-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c: Fixed a few 'Oops'es.
-
- * mail-config-druid.glade: Added a "Default" button for marking an
- account as the default.
-
-2001-01-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.glade: Updated. What else can I say?
-
-2001-01-04 Dan Winship <danw@helixcode.com>
-
- * folder-browser.c (got_folder): Connect to "message_changed" on
- the folder if it's on a remote storage.
- (update_unread_count): Update the folder unread count / highlight
- in the shell when the unread message count changes
-
-2001-01-04 Not Zed <NotZed@HelixCode.com>
-
- * mail-ops.c (mail_do_send_mail): Removed old implementation.
-
- * folder-browser.c (do_message_selected): If we haven't got a real
- uid, then clear the display instead.
-
- * message-list.c (message_list_drag_data_get): Use new save
- message function, and also wait for it to finish before
- continuing.
- (folder_changed):
- (message_changed): Use mail_proxy_event instead of
- mail_do_forward.
- (mail_regen_list): New iplementation to replace the old.
- : remove <gnome.h> from headers. Dont define timeit by default.
- (main_folder_changed):
- (message_list_set_folder):
- (message_list_set_threaded):
- (message_list_set_search):
- (message_list_hide_add):
- (message_list_hide_uids):
- (message_list_hide_clear): Use mail_regen_list instead of
- mail_do_regenerate_messagelist.
- (mail_do_regenerate_messagelist): Removed the old stuff. No
- functionality changed yet, just using different thread stuff.
-
- * mail-callbacks.c (save_msg_ok): Use new save message function.
-
- * component-factory.c (create_view):
- (add_storage): Use mail_scan_subfolders to build the folder info.
- (create_folder): Use new implementation with our own callback.
- (owner_set_cb): Changed b ack to use mail_get_folder, but now wait
- for it to finish. This will let any gui still run, but also gives
- us the required synchronous operation.
- (got_folder): Callback for when the folder has been opened.
-
- * mail-ops.c (mail_get_folderinfo): New function to just get the
- folder info in another thread.
- (mail_scan_subfolders): New scan subfolder implementation that
- uses mail_get_folderinfo.
- (mail_do_scan_subfolders): Removed old implementation.
- (mail_create_folder): Nerw implementation to create a folder, only.
- (mail_do_create_folder): Removed old implementation.
- (mail_save_messages): New implementation, fixes a couple of minor
- problems, and now provides a return so it can be waited on. Also
- check that the writes worked, etc.
- (mail_do_save_messages): Remove previous implementation.
- (mail_do_flag_messages): Removed, nothing uses it.
- (mail_do_flag_messages): Removed, nothing uses it anymore.
- (mail_get_folder): REturn the operation id, so callers can wait
- for it.
- (sync_folder_desc):
- (expunge_folder_desc): Add describe functions so we know what its
- doing.
- (mail_send_mail): More generic implementation of sending mail.
-
- * mail-mt.c (mail_msg_new): Lock around seq increment. And insert
- each new message into a hash table of active messages.
- (mail_msg_init): Init the active message table.
- (mail_msg_free): Remove the message from the active message table.
- (mail_msg_wait): New function, waits for a message to be
- processed, by id.
- (mail_msg_check_error): Dont display the error if it is a
- user-cancelled operation.
- (mail_proxy_event): new implementation of mail_op_forward_event.
- Only real difference is it uses the new thread stuff, and you can
- wait for it to finish if you want.
- (mail_proxy_event): If we're already in the main thread, just call
- the function.
-
-2001-01-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config-druid.c: New source file that implements
- mail-config-druid. Note: this is not yet complete.
-
-2001-01-03 Not Zed <NotZed@HelixCode.com>
-
- * mail-view.c (view_forward_msg): Call
- mail-callbacks.c:forward_messages(), so the behaviour is the same
- as from the folder browser.
-
- * mail-callbacks.c (forward_messages): New function to forward
- messages, attached or not.
- (forward_inlined): Changed to use new forward-messages
- implementation.
- (forward_attached): Likewise.
- (do_forward_attach): Callback for forwarding as attachment, once
- we have built it.
- (do_forward_inline): Likewise, for inline, once we have retrieved
- the message.
- (forward_message): Removed.
-
- * mail-ops.c (mail_build_attachment): New function to build an
- attachment of messages.
- (mail_do_attach_message): Removed, functionality superceeded by
- above.
- (mail_do_forward_message): Removed. Likewise.
- (mail_create_folder): Started work on an alternative
- implementation of create_folder, but not sure about it yet.
-
- * mail-tools.c (mail_tool_generate_forward_subject): Remove locking.
- (mail_tool_make_message_attachment): Free the description when done.
-
-2001-01-03 Radek Doulik <rodo@helixcode.com>
-
- * mail-format.c (write_headers): add font color setting for table,
- changed border behavior
-
- * mail-display.c (redisplay): don't set body bg and text color
-
-2001-01-02 Not Zed <NotZed@HelixCode.com>
-
- * mail-callbacks.c (view_msg): Fix for mail_get_message change,
- use queue thread.
-
- * folder-browser.c (done_message_selected): Fix mail_Get_message
- calls, use new thread.
- (do_message_selected): "
-
- * mail-ops.c (mail_get_message): Add a thread argument so callers
- can specify which queue it executes on.
-
- * mail-mt.c (mail_msg_free): Fix a free order problem.
- (mail_msg_destroy): Call mail_msg_free to do the work.
- (mail_msgport_replied): "
- (mail_msgport_replied): Check/display errors if we get them.
- (mail_msgport_received): If we have a describe function, say what
- we're doing, also set busy/unbusy.
- (mail_msgport_replied): Clear busy when we get a reply.
- (mail_get_password): Unset busy.
- (mail_msg_received): Set busy as we go.
- (mail_msg_destroy): Unset busy when done.
- (mail_status): Blah blah, new status interface, the other wans't
- workable with the way the shell api works.
-
-2000-12-29 Not Zed <NotZed@HelixCode.com>
-
- * folder-browser.c (do_message_selected): If we are reconfiguring,
- just keep polling till we are done (yeah kinda shitty, but easy).
- (folder_browser_set_uri): Clear reconfigure flag here. ick.
- (got_folder): And here too.
- (on_right_click): Remove locking.
- (hide_sender): and here too.
- (hide_subject): And here.
- (on_right_click): If we are in reconfigure, then the whole menu is disabled.
-
- * mail-mt.c (status_busy_timeout): Clear the status_busy_timeout_id.
-
- * mail-local.c (local_storage_new_folder_cb): Made getting folders
- completely synchronous. The shell expects it, and it was only
- synchronous before by a sideeffect.
- (do_reconfigure_folder): Remove locking stuff.
- (do_reconfigure_folder): Use our own much simpler copying routine
- than that stupid move_folder_contents thing.
- (update_progress): Use mail_status_message() instead.
- (do_reconfigure_folder): Set the reconfigure flag during
- reconfigure & set busy flag.
- (cleanup_reconfigure_folder): clear busy flag.
-
- * mail-tools.c (mail_tool_uri_to_folder): Remove the tool_lock
- stuff.
- (mail_tool_uri_to_folder_noex): Clear exception on exit.
- (mail_tool_move_folder_contents): Get rid of this really stupid
- function that is only used in one place.
-
- * component-factory.c (owner_set_cb): Use direct calls to get the
- folders, as this code must run synchronous. Remove the event wait
- stuff.
-
- * mail-callbacks.c (edit_msg): Call mail_get_messages, and create
- the composers ourself.
- (do_edit_messages): get_messages callback, create the composers
- and connect to signals we need.
- (view_msg): Dont call do_view_messages, just call
- mail_get_messge for each to get them in parallel.
- (do_view_message): view a single message.
-
- * mail-ops.c (mail_edit_messages): Just use mail_get_messages
- for this operation. Removed the other async operation stuff.
- Changed my mind, just removed entirely.
- (mail_do_view_messages): Removed.
- (mail_do_setup_folder): Removed.
- (mail_do_scan_subfolders): Make this run synchronously, as every
- caller expects it to (even if they didn't realise).
-
-2000-12-28 Not Zed <NotZed@HelixCode.com>
-
- * mail-callbacks.c (send_queued_mail): Dont expunge the folder
- here, but in send_queue, otherwise it might execute out of order.
- (expunge_folder): Remove the talbe prechange stuff, and infact
- references to the message_list folder, as we have our own folder.
- Also, dont allow expunge if we're already expunging.
- (expunged_folder): Clkear the expunging flag if we're finished.
-
- * folder-browser-factory.c (control_deactivate): Likewise here.
- Hrm, i thought this function required a callback, silly me.
-
- * mail-tools.c (mail_tool_make_message_attachment): Remov e
- locking.
-
- * folder-browser.c (on_message_selected): Use a timeout handler so
- we dont select immediately.
- (folder_browser_set_uri): Changed to use mail_get_folder.
- (got_folder): New callback called when get_folder is finished.
- (folder_browser_destroy): Use new sync interface.
-
- * mail-ops.c (mail_get_message): New function to asynchrounously
- get a message.
- : #define out mail_tool_camel_lock stuff entirely.
- (mail_get_folder): New function to asynchrounously get a folder.
- (mail_do_load_folder): Removed, replaced by more generic function
- above.
- (mail_do_display_message): Removed, replaced by the more generic
- funciton get_message.
- (mail_get_messages): New function to get a list of messages
- asynchronously.
- (mail_sync_folder): New interface to sync a folder async.
- (mail_expunge_folder): New interface for expunging folder, with
- callback.
- (do_send_queue): Remove lock stuff, and expunge if (and only if)
- successful, also sync the sent folder while we're at it.
-
- * session.c (mail_session_request_dialog): Changed to use new
- mail_get_password call.
-
- * mail-mt.[ch]: New threading/interthread messaging framework.
-
- * main.c (main): Init the message/thread system.
-
-2001-01-02 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (mail_part_is_inline):
- (find_preferred_alternative):
- * mail-display.c (launch_cb): Use header_content_type_simple, not
- header_content_type_format.
-
-2000-12-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-crypto.c (mail_crypto_openpgp_verify): Implemented.
-
-2000-12-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (mail_do_setup_trash): New function similar to
- mail_do_setup_folder() except that this creates the Trash VFolder
- (special-case).
-
-2000-12-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_send_mail): Don't free info inside the last
- if-statement, if sent_folder doesn't exist we'll have a memory
- leak. Instead free it afterward.
-
-2000-12-29 Dan Winship <danw@helixcode.com>
-
- * mail-crypto.c: Oops. Update this for CamelContentType stuff too.
-
-2000-12-28 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (mail_part_is_inline, mail_get_message_body): Use
- CamelContentType, and use header_content_type_is instead of doing
- it by hand.
-
- (handle_text_plain):
- (handle_multipart_related):
- (find_preferred_alternative):
- (handle_message_external_body): Use CamelContentType and
- header_content_type_* functions instead of GMimeContentField.
-
- * mail-display.c (write_data_to_file, launch_cb): Use
- CamelContentType and header_content_type_* functions instead of
- GMimeContentField.
-
-2000-12-26 Iain Holmes <iain@helixcode.com>
-
- * mail-display.c (mail_display_init): Initialise the thumbnail cache.
- (mail_display_destroy): Free the cache.
- (pixbuf_gen_idle): Check the cache for a pixbuf, add the pixbuf to the
- cache if it's not there.
-
-2000-12-26 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (create_summary_view): Create a shared
- BonoboEventSource object and use it for all the objects that
- aggregate Bonobo::EventSource.
-
-2000-12-27 Dan Winship <danw@helixcode.com>
-
- * subscribe-dialog.c (setup_subscribe_folder): Use info->name, not
- input->full_name. Fixes #1029 in bugzilla.helixcode.com.
- ({setup,do,cleanup}_subscribe_folder): Update previous fix: Jeff
- had changed it to use ->full_name instead of ->name because that's
- what camel_store_subscribe_folder needed. So we need to have
- *both* names available, one for Camel, one for the shell.
-
-2000-12-24 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (filter_date): Changed this to format times in 12
- hour time instead of 24 hour time.
-
-2000-12-24 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (filter_date): Changed this to do different
- formatting of dates within the last week.
-
-2000-12-24 Not Zed <NotZed@HelixCode.com>
-
- * Merge from camel-mt-branch.
-
-2000-12-23 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (filter_date): Changed this to do different
- formatting of dates based on the current time.
-
-2000-12-23 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (message_list_get_layout): Added titles to the
- pixbuf columns.
-
-2000-12-21 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c: Added code to detect and regenerate the summary
- when a new vfolder is created or removed.
-
- * mail-vfolder.c: Export the vfolder_storage variable, so that
- the summary can add a listener to it.
-
-2000-12-05 Iain Holmes <iain@helixcode.com>
-
- * component-factory.c (factory_destroy): Wait till all views have
- gone and then destroy both factories.
-
-2000-12-21 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (pixbuf_for_mime_type): Deal with the possibility
- that we have an icon-filename listed for a MIME type, but the icon
- file doesn't actually exist. Also, if gnome-unknown.png can't be
- found, fall back. Might fix a crash people have been reporting...
-
-2000-12-18 Chris Toshok <toshok@helixcode.com>
-
- * mail-format.c (handle_multipart_encrypted): for now #ifdef
- PGP_PROGRAM falling back to handle_multipart_mixed.
- (handle_multipart_signed): same.
-
-2000-12-18 Dan Winship <danw@helixcode.com>
-
- * message-list.c (hide_save_state): Unlock camel when done to
- prevent a hang later.
-
-2000-12-18 Miguel de Icaza <miguel@helixcode.com>
-
- * mail-tools.c (mail_tool_move_folder_contents): Only update
- display every 2 seconds.
-
- * mail-ops.c (do_view_messages): Only update display every 2 seconds.
-
-2000-12-23 Not Zed <NotZed@HelixCode.com>
-
- * message-list.h (MessageList): Add a specific hide data lock.
-
- * message-list.c (message_list_drag_data_get): Do not use
- cursor_uid, but get all currentlys elected messages directly off
- the message-list.
- (message_list_destroy): Removed mail_tool_camel_lock stuff.
- (on_click): "
- (message_list_hide_add, message_list_hide_uids, hide_load_state,
- hide_save_state, message_list_hide_clear): ", but use a specfic
- lock for the hide data.
- (do_regenerate_messagelist): remove mail_tool_camel_lock stuff,
- add hide_lock where required.
- (message_list_init): Setup the hide_lock.
- (message_list_destroy): Free the hide_lock.
-
-2000-12-22 Not Zed <NotZed@HelixCode.com>
-
- * mail-ops.c (mail_do_sync_folder): Run sync in different thread
- each time. Just a quick litlte hack to check multithreading.
- There are now few operations that single-queue. Need to work out
- a way to make the allocation of threads & resources easier, so we
- dont get overwhelmed with threads, but we dont block when we dont
- have to, either.
-
- * message-list.c (main_folder_changed): If we have only changed
- events, then process them directly.
- (mail_do_regenerate_messagelist): Run regenerate in a new thread
- each time, another quick hack to check mutlithreading.
-
- * mail-view.c (view_delete_msg): Call camel folder set message
- flags directly. mail_do_set_message_flags() is now completely
- unused.
-
- * folder-browser.c (mark_msg_seen): Call camel folder
- set_message_flags directly.
-
- * mail-callbacks.c (flag_messages): New function, that just sets
- flags of all selected messages, without all that messy thread
- stuff (setting flags is in-memory).
- (mark_as_seen): Use flag_messages().
- (mark_as_unseen): "
- (undelete_msg): "
- (delete_msg): "
-
-2000-12-20 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_select): Free messageinfo lookups.
- (message_list_drag_data_get): "
- (subtree_unread): "
- (subtree_size): "
- (subtree_earliest): "
- (ml_tree_value_at): " Also, keep the message info around in a
- static variable, and ref'd, so that any internal references we
- have to it dont vanish while we're not looking. This has a couple
- of problems ... esp since we never unref the last access, although
- camel-folder-summary wont check this when its unref'd, so we're
- 'safe'.
- (save_node_state): free messageinfo lookups.
- (on_click): "
- (get_message_info): deconstify return.
-
- * mail-tools.c (mail_tool_move_folder_contents): Free messageinfo
- lookups.
-
- * mail-ops.c (do_filter_ondemand): Free messageinfo lookups.
- (do_flag_messages): "
- (do_fetch_mail): Remove mail_tool_lock stuff.
- (mail_operation_run): Quick hack to run an operation
- asynchrounously, in a brand-new thread.
-
- * folder-browser.c (on_right_click): Free messageinfo lookups.
-
-2000-12-16 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (build_tree): Always use the slow (full-update)
- version of the tree update code, to get around a bug(?) in etree.
- (build_flat): Likewise.
-
-2000-12-15 Not Zed <NotZed@HelixCode.com>
-
- * mail-display.c (write_data_to_file): Dont blindly convert all
- parts to utf8, e.g. image/jpg. We only convert text/* parts, and
- only then if required.
-
-2000-12-14 Not Zed <NotZed@HelixCode.com>
-
- * component-factory.c (create_view): cast over a warning.
-
- * folder-browser-factory.c: Add verbs for hide functions.
-
- * message-list.c (message_list_hide_clear):
- (message_list_hide_uids):
- (message_list_hide_add): Some api renaming.
- (message_list_hide_add): Allow ML_HIDE_SAME to be passed to mean
- not to change the upper/lower range at all.
- (hide_save_state): Save the state of the hide list to stable
- storage.
- (hide_load_state): Load the state of hte hide list.
- (message_list_set_folder): Load/save the state of the folder if it
- is changed/set.
- (message_list_destroy): Save the state of the folder hide list
- when done.
- (save_tree_state): If we wrote out an empty state file, simply
- remove it instead.
-
- * folder-browser.c (on_right_click): Add some hide menus.
- (hide_read): Hide read messages.
- (hide_deleted): Hide deleted messages.
- (hide_selected): Hide selected/current message.
- (hide_none): Show all hidden messages.
- (on_right_click): Lock around accesses to the message (inside
- mlist_detect_magic).
- (on_right_click): Free the mailing list name.
-
-2000-12-13 Not Zed <NotZed@HelixCode.com>
-
- * folder-browser.c (on_right_click): Add camel locking since we
- call it directly. Whoever heard of a lock you 'down' to unlock?
-
- * message-list.c (mail_do_regenerate_messagelist): Added hide
- expression, messages to hide. Fixed all callers.
- (do_regenerate_messagelist): IF we have a hide expression, search
- and remove those from the uid list. If we have a hide range,
- apply that afterwards.
- (cleanup_regenerate_messagelist): Handle freeing the hide uid
- temporary data, if required.
- (message_list_destroy): Free hide data, also lock around all camel
- object stuff.
- (message_list_length): New function to get the number of messages
- avaialble to be hidden by range.
- (message_list_set_hide): Set the hide expression and range.
- Issue: Should hiding be remembered?
- (message_list_unhide_all): Turn off all hiding.
- (message_list_hide_uids): Hide a list of uid's.
-
-2000-12-15 Dan Winship <danw@helixcode.com>
-
- * subscribe-dialog.c (folder_toggle_cb): Update this for the new
- signal handler prototype. Fixes the crash on double-click.
-
-2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (handle_multipart_signed): New callback to handle
- multipart/signed parts.
- (decode_pgp): Update to account for the cipherlen argument needed
- for openpgp_decrypt.
- (is_rfc2015): Removed as we now have a better version in
- mail-crypto.
- (handle_multipart_encrypted): Updated to use the PGP/MIME utility
- functions.
-
- * mail-crypto.c (mail_crypto_openpgp_decrypt): Don't check
- (!*plaintext) as it could be a binary stream. Now also takes a
- cipherlen argument.
- (mail_crypto_openpgp_sign): New function.
- (pgp_mime_part_sign): New function to replace a mime part with the
- pgp signed equivalent.
- (pgp_mime_part_encrypt): New function to replace a mime part with
- the pgp encrypted equivalent.
- (pgp_mime_part_decrypt): New function to decrypt a pgp encrypted
- mime part (like from pgp_mime_part_encrypt) and replace it.
- (is_rfc2015_signed): New function to determine if a mime part is
- an rfc2015 signed part.
- (is_rfc2015_encrypted): New function to determine if a mime part
- is an rfc2015 encrypted part.
- (mail_crypto_openpgp_verify): New openpgp function to verify a
- signature.
-
-2000-12-14 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-threads.c (update_active_views): Unref the iterator when
- we're done with it.
-
-2000-12-14 Larry Ewing <lewing@helixcode.com>
-
- * mail-display.c (mail_display_new): call
- gtk_html_set_default_content_type to make gkthtml default to utf-8
- when parsing. This requires gtkhtml >= the released 0.8.
-
-2000-12-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-threads.c (read_msg): Call `ui_set_busy()' before
- `ui_set_message()' so that we are sure that the
- set_busy/unset_busy calls always happen in order.
-
-2000-12-13 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser.c (my_folder_browser_init): Made the vertical
- scrollbar always be there.
-
- * message-list.c (message_list_get_layout): Changed the minimum
- width of some of the pixmap column headers.
-
-2000-12-12 Christopher James Lahey <clahey@helixcode.com>
-
- * component-factory.c (create_view): Added a cast.
-
- * mail-summary.c: Added #include "mail-summary.h". Commented out
- folder_free, summary_free, and view_destroy_cb since they're not
- used.
- (do_changed): Added a cast.
- (create_summary_view): Changed some types so that casting would be
- easier.
-
- * session.c (mail_session_remember_password): Added a cast.
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * mail-summary.h: Fix to use the right .h instead of the
- deprecated one.
-
-2000-12-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (forward_message): Attach a signature when
- forwarding, fixes bug #826.
-
-2000-12-11 Dan Winship <danw@helixcode.com>
-
- * session.c (mail_session_enable_interaction): New function to
- tell the code that it's ok (or not) to interact with the user when
- trying to authenticate to a service. Starts out turned off.
- (mail_session_request_dialog): If interaction is disabled, fail if
- the password isn't in the cache.
-
- * component-factory.c (owner_set_cb): Call
- mail_session_enable_interaction() after everything else. (This
- means that the IMAP password dialog will no longer pop up [under
- the splash screen] at startup.)
-
-2000-12-11 Dan Winship <danw@helixcode.com>
-
- * component-factory.c (create_view): Deal with "mailstorage" type
- views (top-level mail storages) by trying to fill the storage's
- folder tree again if we failed before.
- (add_storage): Create new storages with a URI and type
- "mailstorage".
-
- * mail-ops.c (cleanup_scan_subfolders): On success, mark the
- storage as having been loaded, so create_view won't try again.
-
-2000-12-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (decode_pgp): Updated to reflect arguments to the
- openpgp functions - now also takes an outlen argument.
- (try_inline_pgp): Updated.
- (handle_multipart_encrypted): Updated here too.
-
- * mail-crypto.c (crypto_exec_with_passwd): Updated to handle
- binary streams and such.
- (mail_crypto_openpgp_encrypt): Always initialize the passwd_fds
- even if we don't plan on signing. Added an 'inlen' to specify the
- length of the input data (as it could be binary). Also added a
- 'userid' argument for cases when we want to sign as well as
- encrypt.
- (mail_crypto_openpgp_decrypt): Updated to take an outlen argument
- in case the ciphertext is encrypted binary data.
- (mail_crypto_openpgp_clearsign): Added a 'hash' and 'detach'
- arguments. 'hash' allows the program to specify the preferred hash
- function (which will come in handy when generating
- PGP/MIME). 'detach' allows the program to specify whether it wants
- a detached signature or the entire signed text.
-
-2000-12-11 Dan Winship <danw@helixcode.com>
-
- * message-list.c: Remove the never-once-used BonoboObject stuff
- and make MessageList be a GtkWidget instead. Also, keep track of
- the ETable directly rather than repeatedly calling
- e_table_scrolled_get_table.
-
- * folder-browser.c (folder_browser_destroy): Use gtk methods
- rather than bonobo methods to destroy the message list.
- (on_right_click, on_double_click): These are being attached to the
- ETable directly now, so fix the first argument (which isn't being
- used anyway, but...). Ignore double-clicks on "active" columns
- (the ones where clicking does something beyond "select"), fixing
- bug #811, which is what got me started on this to begin with...
- (folder_browser_gui_init): simplify now that MessageList itself is
- a widget. Also use message_list->table rather than
- e_table_scrolled_get_table.
-
- * mail-local.c (mail_local_reconfigure_folder): Add "mail_" to
- the beginning of this function name to match its prototype and the
- other vague namespace conventions in the mailer.
-
- * mail-callbacks.c (select_all, invert_selection): Use ml->table.
- (configure_folder): s/local_reconfigure_folder/mail_&/
-
- * mail-ops.c (do_flag_messages): clean up the cleanup a bit
-
- * mail-tools.c (mail_tool_quote_message): Remove an unused
- variable.
-
-2000-12-11 Not Zed <NotZed@HelixCode.com>
-
- * local-config.glade: reordered the options and added maildir,
- mbox, maildir, mh, in that order.
-
- * mail-local.c (reconfigure_clicked): Added maildir, re-ordered to
- match the changed xml file too.
- (do_reconfigure_folder): WHoever 'threaded' this code forgot to
- check that folder_browser functions shouldn't be called here.
- (cleanup_reconfigure_folder): Call it here instead.
- (lookup_folder): Blah blah, we have to lookup the folder and
- verify its still the same format, joy. Becaause someone thought
- it would be wise to make the code 5x more complicated for no
- reason, and totally break 'mail reconfigure' in the process. i'm
- really happy about that one.
- (cleanup_register_folder): Uh, yeah, so like, the
- local_store->folders hashtable is supposed to point to like,
- LocalFolders, not CamelFolders.
- (free_local_folder): Free the localfolder struct properly.
- (free_folder): Call above to free data properly.
- (get_folder): Fix for fixing folders hashtable.
- (local_storage_removed_folder_cb): Same here.
- (local_storage_new_folder_cb): Ref the local_store when putting it
- in the local_folder.
- (cleanup_register_folder): Properly free the local_folder if the
- op failed.
- (free_local_folder): Unhook events also.
- (d): Oops, left debug turned on.
-
-2000-12-09 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (message_list_init): Change the "drawfocus"
- argument on e_table_scrolled_get_table(etable) instead of on
- etable (etable is an ETableScrolled.)
-
-2000-12-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (save_msg_ok): Check to see if the file already
- exists, if it does prompt the user to for permission to overwrite
- the file.
- (forward_message): g_strdup the cursor_uid if there is only a
- single message to be forwarded or we'll segfault later.
-
- * mail-ops.c (do_save_messages): Rewrote yet again. I'm back to
- almost an identical implementation as the first time I wrote this
- except now we write the From line which I had forgotten last
- time. This means that we no longer have to unlink the .ev-summary
- file created and we also use fewer resources (no need to create a
- CamelMboxFolder object).
-
-2000-12-08 JP Rosevear <jpr@helixcode.com>
-
- * folder-browser.c (on_double_click): the e-table double-click
- signal now has extra params
-
-2000-12-07 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (add_storage): Pass `NULL' as the
- @toplevel_node_handler_id arg in `evolution_storage_new()'.
- FIXME: We should be passing the ID of the mail component here.
- * mail-vfolder.c (vfolder_create_storage): Likewise.
-
-2000-12-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (message_list_get_layout): Set the "Size" field
- to sort using integer comparison instead of string.
- (filter_size): New function to transform a integer size into a
- more readable form.
- (ml_value_to_string): Use filter_size.
- (ml_value_is_empty): COL_SIZE is no longer a string, so handle
- this as an integer.
- (ml_initialize_value): Here too.
- (ml_free_value): And here.
- (ml_duplicate_value): And here too.
- (message_list_create_extras): Setup the size etable cell.
-
-2000-12-08 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser.c: Connect to signals on the ETable instead of
- the ETableScrolled.
-
- * subscribe-dialog.c: Used the e_table_scrolled_get_table function
- instead of accessing the variable directly.
-
-2000-12-08 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Connect to signals on the ETable instead of the
- ETableScrolled.
-
-2000-12-07 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Got rid of code referencing the ETableScrolled
- proxy functions. Changed the call to e_table_set_cursor_row to
- send a model row instead of a view row.
-
-2000-12-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (forward_message): Only do a
- message_list_foreach if we plan on attaching messages, otherwise
- just use ml->cursor_uid.
-
- * mail-ops.c (cleanup_forward_messages): If attaching multiple
- forwarded message, wrap them in a multipart/digest otherwise just
- attach the single message as a message/rfc822.
-
-2000-12-07 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (on_object_requested): Make the iTip hack spew a
- g_warning and not crash if you have no identity configured. To be
- revisited.
-
- * mail-callbacks.c: (various)
- * folder-browser.c (filter_mlist):
- * mail-autofilter.c (filter_gui_add_from_message):
- * mail-vfolder.c (vfolder_gui_add_from_message): Add some
- g_return_if_fail()s to protect from crashes until the code to
- enable/disable commands based on how many messages are selected is
- done.
-
-2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): Make the vfolder editor
- resize correctly. Fixes bug #835.
-
-2000-12-06 Dan Winship <danw@helixcode.com>
-
- Fix up shutdown so that things that should be destroyed get
- destroyed. Among other things, this fixes the bug where IMAP
- stores weren't disconnected at shutdown.
-
- * mail-threads.c (update_active_views): Update for
- folder_browser_factory_get_control_list change to EList.
-
- * folder-browser-factory.c: Turn control_list into an EList so
- that we can safely remove items from it while it's being iterated
- (which will happen as FolderBrowsers are destroyed at shutdown
- while the thread code is trying to update the status bars).
- (control_destroy_cb): Just destroy the folder_browser.
- (browser_destroy_cb): New callback for FolderBrowser destroy.
- Remove the control from control_list here instead of
- control_destroy_cb, because the controls don't seem to get
- destroyed reliably...
-
- * component-factory.c: Clean up stuff.
- (factory_destroy): Get rid of this.
- (owner_unset_cb): Schedule an idle handler to quit.
- (idle_quit): Wait for all of the FolderBrowsers to be destroyed
- and then destroy the storages and quit.
-
- * mail-summary.h (create_summary_view): Fix prototype
-
-2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (mail_config_folder_to_cachename): Use
- e_filename_make_safe (which used to be e_str_make_safe).
-
- * mail-display.c (make_safe_filename): And here.
-
- * message-list.c (message_list_drag_data_get): Here too.
-
-2000-12-06 Dan Winship <danw@helixcode.com>
-
- * mail-local.c (cleanup_register_folder): Run the folder_changed
- code on message_changed as well, so the unread message counts
- update as messages are read.
-
- * folder-browser.c: Remove bits of filter-on-demand and toolbar
- bug workaround cruft that don't do anything useful any more.
-
- * mail-ops.c (cleanup_load_folder): unref the ref we added in
- setup_load_folder.
-
-2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-display.c (write_data_to_file): Use a charset filter to
- make sure the data is written out in the charset it was meant to
- be in instead of UTF-8.
-
- * mail-format.c (mail_format_raw_message): Don't use the raw
- message body as the format argument, use "%s" instead. If the raw
- message contains %'s then it will segfault otherwise.
-
-2000-12-04 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c (service_page_item_new): Fix a typo so that
- toggling the "remember password" checkbox will activate the "OK"
- button if it was inactive.
-
-2000-12-05 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-vfolder.c (vfolder_create_storage): Updated the call to
- `evolution_storage_new()': pass NULL for @toplevel_node_uri.
-
- * component-factory.c (add_storage): Updated the call to
- `evolution_storage_new()': pass NULL for @toplevel_node_uri.
-
-2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * subscribe-dialog.c (setup_subscribe_folder): Use info->full_name
- rather than info->name so that we get the namespace part of the
- folder path as well.
-
-2000-12-04 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c: Updated to define verbs
- "MessageForwardInlined" and "MessageForwardAttached" instead of
- "MessageForwardInline" and "MessageForwardAttach".
-
- * folder-browser.c (on_right_click): Make forwarding as an
- attachment the default.
-
- * mail-callbacks.c (forward_inlined): Renamed from `forward_msg'.
- (forward_attached): Renamed from `forward_attach'.
- * mail-callbacks.h: Updated accordingly.
-
-2000-12-01 Dan Winship <danw@helixcode.com>
-
- * session.c (mail_session_remember_password): Writes out passwords
- (to .gnome_private) in our patented proprietary "Best Awesome
- Super Encryption 64" ("BASE64") format which could not possibly
- ever be cracked by even the most cryptographically knowledgeable
- five-year-olds.
- (mail_session_init): Load remembered passwords at startup.
- (mail_session_forget_passwords): Erase them from disk as well as
- memory.
-
- * mail-config.c: Add "remember_password" field to
- MailConfigService.
- (mail_config_write_on_exit): Call mail_session_remember_password
- for services with "remember_password" set.
- * mail-config-gui.c: Add "remember password" checkbox to the
- dialogs, and make it appear and disappear as appropriate.
-
- * component-factory.c (mail_load_storages): Unref the store
- regardless of whether or not we're using it, so we don't leak
- references to non-storage stores.
-
-2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (e_mail_address_new): Perform better
- error-handling.
-
-2000-12-01 Radek Doulik <rodo@helixcode.com>
-
- * mail-ops.c (mail_op_report_status): use mail_op_set_message_plain
-
- * mail-threads.c (mail_op_set_message_plain): plain version of
- mail_op_set_message, doesn't use printf, passes message untouched,
- use set_message
- (mail_op_set_message): set_message
- (set_message): helper function
-
-2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (cleanup_fetch_mail): Don't display a dialog, instead
- inform the user that there was no new mail by setting a status
- message.
-
- * message-list.c (message_list_drag_data_get): Use the new
- e_str_make_safe function.
-
- * mail-display.c (make_safe_filename): And here.
-
- * mail-config.c (mail_config_folder_to_cachename): Here too.
-
-2000-11-30 Not Zed <NotZed@HelixCode.com>
-
- * mail-ops.c (cleanup_load_folder): Set threaded view before
- setting the folder (cleanup some flash ons tartup).
-
- * message-list.c (message_list_init): Initialise a mempool for uid
- string storage.
- (new_id_from_uid): Added messagelist arg, allocate strings from
- uid_pool.
- (new_id_from_subject): Same. Fixed all callers.
- (remove_node_diff): Dont free uid here.
- (build_flat_diff): Nor here.
- (clear_tree): Flush the mempool, rather than freeing the id's
- directly.
- (free_tree_ids): Removed, no longer required.
- (free_tree_ids): Likewise.
- (message_list_init): Dont connect to the table destroy signal
- anymore to free the uid table.
- (message_list_destroy): Free the uid pool here.
- (*): Use accessors for messageid stuff.
- (content_is_attachment): Removed, no longer required.
- (ml_tree_value_at): Get the attachment flag directly from the
- summary.
- (ml_tree_value_at): For 'fake' nodes, try and do something better
- than "?" for from, to, and size.
- (subtree_size): New function, add up the total size of a subtree.
- (subtree_earliest): Get the earliest date from a subtree.
- (ml_tree_value_at): Return earliest date sent/received for fake
- nodes.
- (ml_tree_value_at): Return something to mark a fake subject line
- as a fake subject, although i dont know, i guess this buggers up
- sorting ...
- (subtree_size): Check the info node is still there.
- (subtree_earliest): Same here.
- (subtree_unread): And here. The info node might vanish if the
- folder has changed/is changing and we try and redraw stuff while
- its doing it.
- (message_list_drag_data_get): Use accessors.
-
-2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (message_list_drag_data_get): Implement.
- (message_list_init): Connect the d&d signal.
-
- * mail-ops.c (do_save_messages): Use camel a bit more to help us
- out. Don't create the file ourselves, treat it as a CamelFolder so
- we don't have to worry about formatting.
-
-2000-11-29 Dan Winship <danw@helixcode.com>
-
- * main.c (main): Remove no-longer-needed e_unicode_init.
-
- * mail-tools.c (mail_tool_quote_message): Fix the allocation here
- (again) and put a comment explaining it. (Fixes a crash when
- replying.)
-
-2000-11-28 Dan Winship <danw@helixcode.com>
-
- * component-factory.c (owner_set_cb): Wait until after setting up
- the local storage to find the Drafts/Outbox/Sent folders.
-
- * mail-ops.c (do_setup_folder): Use the file: store rather than
- mbox:.
-
-2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Added the SaveAs bonobo menu verb
- thingy.
-
- * mail-callbacks.c (save_msg): New callback for saving messages.
- (save_msg_ok):
-
- * folder-browser.c (on_right_click): Add a Save As menu item.
-
- * mail-ops.c (cleanup_save_messages): Save all emails to the path
- given.
-
-2000-11-28 Dan Winship <danw@helixcode.com>
-
- * mail-local.c (cleanup_register_folder): Fix the initial unread
- counts after the last patch.
-
-2000-11-27 Dan Winship <danw@helixcode.com>
-
- * mail-local.c (local_folder_changed): This needs to run from the
- main thread, not the camel thread, so add a proxy signal handler
- to call mail_op_forward_event. Fixes hangs (eg bugzilla #909).
-
-2000-11-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-display.c: Removed some unecessary debugging printf's
-
-2000-11-27 Dan Winship <danw@helixcode.com>
-
- * mail-config-druid.glade: Revert the new druid for now, until the
- corresponding code is done, so that the druid will work again.
-
-2000-11-21 Iain Holmes <iain@helixcode.com>
-
- * mail-config-gui.c (mail_config): Don't use the "delete-event"
- signal.
-
-2000-11-21 Iain Holmes <iain@helixcode.com>
-
- * mail-display.c (pixbuf_for_mime_type): free fm_icon.
-
- * component-factory (summary_fn): Remove the configure param.
- (factory_destroy): Made into a generic function so that the
- summary_factory can be ref-counted as well as the normal
- factory.
-
-2000-11-21 Dan Winship <danw@helixcode.com>
-
- * Makefile.am: add GPGME_CFLAGS and GPGME_LIBS
-
-2000-11-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (mail_config_view_source): New function to return
- if user wants to view message source.
- (mail_config_set_view_source): New function to set whether the
- view wants to view source.
-
- * mail-ops.c (mail_do_view_message_sources): Removed. We're not
- gonna view-source this way anymore.
-
- * folder-browser-factory.c: Removed the ViewSource bonobo verb
- from the Message menu.
- (control_activate): Added ViewSource.
-
- * folder-browser.c (on_right_click): Removed Message menu item to
- view message source.
- (folder_browser_toggle_view_source): New callback to set whether
- or not the MailDisplay shows the raw message or the pretty-ified
- message.
-
- * mail-callbacks.c: Removed view_source.
-
- * mail-display.c (redisplay): If toggle_raw is set then display
- the raw message else display the pretty formatted message.
- (mail_display_redisplay): New function to force the redisplay of a
- message.
-
- * mail-format.c (mail_format_raw_message): New function to
- write the raw message data.
-
-2000-11-21 Not Zed <NotZed@HelixCode.com>
-
- * mail-vfolder.c (vfolder_uri_to_folder): IF we dont find a
- source, clear the exception and ignore it silently. for e.g. if
- the user reconfigured their mailboxes and one of them no longer
- exists.
-
-2000-11-21 Radek Doulik <rodo@helixcode.com>
-
- * mail-display.c: #include <gtkhtml/gtkhtml-embedded.h>
-
-2000-11-21 Not Zed <NotZed@HelixCode.com>
-
- * message-thread.[ch]: Removed. No longer serves a purpose.
-
- * Makefile.am (evolution_mail_SOURCES): Removed message-thread.[ch].
-
- * message-list.c (build_subtree):
- (node_equal):
- (add_node_diff):
- (build_subtree_diff):
- (do_regenerate_messagelist):
- (cleanup_regenerate_messagelist): Changed to use camel-folder-thread.
- (message_list_set_folder): If we get set a new folder, unhook any
- events before unrefing the folder too (the folder is never reset
- currently, but this would cause problems).
- (subtree_unread): Check for uid null, wont crash, but its a bug.
- (ml_tree_value_at): If the uid is null, then fake an obviously bad
- line.
- (build_subtree): Yeah well, we can't like freeze/thaw here,
- because this is called recursive, and freeze/thaw isn't
- recursive, like pre model and post model change was.
- (build_tree): Maybe we can try it here, although i dont think
- it'll help much.
- (build_flat): And this is also a tree. yes a tree.
- (build_tree): Added changes arg. If set, then try the 'diff'
- approach, unless the tree is already empty.
- (message_list_set_threaded): Dont clear the tree here.
- (message_list_set_search): Or here.
-
-2000-11-20 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (save_node_state): Save out the md5 hash of the
- messageid as hex, since thats all we have for those nodes.
- (build_subtree): Expand the messageid to a hex string first, then
- check it.
- (add_node_diff): And the same here.
-
- * message-thread.c (thread_messages): Changed for changes to
- messageid/references items.
- (id_hash, id_equal): New functions to hash on the binary message id hash.
- (thread_messages): removed some more no longer used dead code.
-
-2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (e_mail_address_compare): New comparison function
- that will replace address_compare if/when we ever go to save the
- preparsed addresses in the ETable rather than parsing them each
- time. Also fixed it so that we should get better sorting when
- addresses don't contain name parts (I was checking for NULL but
- not '\0').
- (address_compare): Use e_mail_address_compare.
-
-2000-11-19 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (update_changed_folders): Instead of making the CORBA
- call in the dispatch thread, store the new display names and have
- cleanup_fetch_mail make the CORBA calls. Fixes deadlocks.
- (cleanup_fech_mail): Loop through the update_infos and make the
- CORBA calls.
- (setup_fetch_mail): Clear some new data items.
-
-2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Use the new quote_message
- function and make it start with "On %s, %s wrote:" since people
- seem to want that.
-
- * mail-ops.c (cleanup_forward_messages): Use the new quote_message
- function.
-
- * mail-tools.c (mail_tool_quote_message): New convenience function
- to quote a message body (since both the reply and forward code do
- similar quoting)
-
-2000-11-17 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_destroy): Before we destroy
- ourselves, unhook ourselves from the folder update events. Should
- fix a common crash on exit case.
-
-2000-11-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Added the MessageViewSource bonobo
- menu verb.
-
- * mail-ops.c (mail_do_save_messages): New async function to save
- messages as individual files in a given path.
-
-2000-11-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Added a new Forward as Attachment
- bonobo menu item verb.
-
- * mail-view.c (view_forward_msg): Updated to reflect changes to
- mail_do_forward_message(). It now forwards the message without
- attaching it - is this what we want?
-
- * mail-ops.c (mail_do_view_message_sources): New async function to
- display message source dialog windows.
- (setup_forward_messages): If we were asked not to forward the
- message(s) as attachment(s) and the user chose more than a single
- message, then default to making each message an attachment.
- (cleanup_forward_messages): If we aren't forwarding the message as
- an attachment, then quote the text and set the composer's body
- with it.
-
- * mail-callbacks.c (view_source): New callback to view the message
- source of all messages that are currently selected.
- (forward_attach): New callback to forward a message as an
- attachment (forward_msg is now for forwarding a message without it
- being an attachment).
- (forward_message): Convenience function for forwarding messages.
-
-2000-11-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * subscribe-dialog.c (subscribe_do_subscribe_folder): Take a
- 'subscribe' argument so that this can function as a subscribe AND
- unsibscribe method.
- (describe_subscribe_folder): Updated.
- (do_subscribe_folder): Updated.
- (cleanup_subscribe_folder): Updated.
- (subscribe_folder_info): Pass along a TRUE as the 'subscribe'
- param.
- (unsubscribe_folder_info): Pass along a FALSE as the 'subscribe'
- param.
-
-2000-11-13 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Removed some e_table_model calls and replaced
- them with e_tree_model calls.
-
-2000-11-12 Dan Winship <danw@helixcode.com>
-
- * mail-local.c (mail_do_register_folder): Do this the normal way
- rather than calling mail_operation_wait_for_finish. There was some
- reason for it originally, but it no longer applies. This makes
- adding new folders from the folder selection dialog no longer
- hang.
-
-2000-11-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_filter_ondemand): Sync the source folder.
-
-2000-11-11 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * evolution-mail.oafinfo:
- * mail-threads.c: (retrieve_shell_view_interface_from_control):
- 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>
-
- * Makefile.am ($(EVOLUTION_MAIL_CORBA_GENERATED)): sort include order.
-
-2000-11-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * subscribe-dialog.glade[.h]: New glade file for possibly using to
- create the subscribe dialog.
-
-2000-11-08 Radek Doulik <rodo@helixcode.com>
-
- * mail-format.c (mail_generate_reply): likewise
-
- * mail-callbacks.c (create_msg_composer): added send_html arg to
- e_msg_composer_new_with_sig_file call
-
-2000-11-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-search-dialogue.c (mail_search_dialogue_construct): Allow
- rule part to expand when the user resizes the dialog.
-
-2000-11-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (search_save): Don't handle custom searching
- anymore... we don't want this.
- (search_full): Same.
- (folder_browser_search_menu_activated): Set the search entry
- widget sensitive.
- (folder_browser_search_query_changed): Same.
-
-2000-11-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (search_full_clicked): Updated to use the
- ESearchBar object rather than the previously used search widgets.
- (search_full): Same.
- (search_save): Same. Also use enums to make it a little easier to
- read now that we have to have enums anyway.
- (folder_browser_search_menu_activated): New ESearchBar menu
- callback.
- (folder_browser_search_query_changed): New ESearchBar query
- callback. Replaces search_set()
- (folder_browser_clear_search): Updated to use the ESearchBar
- object rather than the previously used search widgets.
- (folder_browser_gui_init): Don't hand construct a search widget,
- use the new ESearchBar convenience widget.
-
- * mail-ops.c (cleanup_load_folder): Updated to reflect changes to
- FolderBrowser.
-
-2000-11-07 Jesse Pavel <jpavel@helixcode.com>
-
- * mail-display.c (pixmap_press): modified some of the EPopupMenu
- structures to account for differences in the popup menu API (as
- informed by Jeff.
- (on_object_requested): passed the user's default email address
- to the iTip control.
-
-2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (INCLUDES): Add the composer dirs.
-
-2000-11-07 Not Zed <NotZed@HelixCode.com>
-
- * mail-display.c (on_object_requested): God, I sure wish people
- would listen when i'm saying i'm changing and API. I mean
- I even mailed everyone and everything. Can't see any changelog
- either.
-
-2000-11-06 Not Zed <NotZed@HelixCode.com>
-
- * mail-autofilter.c (rule_from_message): Updates for api changes.
-
- * mail-tools.c (mail_tool_generate_forward_subject): Fixed for api
- changes. Sigh, whoever wrote the multithread code of the mailer,
- had little idea. You can't just lock for getting a const value,
- until you are finished with it, cause the owner still owns it.
- Fixed this too. Yuck, what a horrid forwarding format, can we
- change this, or make it configurable? The mail headers show who
- forwarded it, we dont need to duplicate it in that UGLY subject.
-
- * mail-format.c (write_field_to_stream): Removed some jeffness.
- dont g_strdup stuff we dont need to, and remove the
- value_is_encoded thing since we can get the unencoded address
- now.
- (write_address): New function to write an address field.
- (write_headers): Uses write_address to write addresses, cleaner,
- fixed the god-awful unreadable indenting too.
- (handle_text_plain): Use a 'smarter' printf format, so we dont
- need to allocate and copy substrings unecessarily (esp since
- they're about to be allocated any copied another few times
- anyway *sigh*).
- (write_field_to_stream): Commented out the isprint check, which
- afaik serves no purpose.
- (list_add_addresses): New function to build a list of
- display-ready addresses. Although I think the composer then uses
- these as internet-ready addresses. It should probably take a list
- of CamelAddress's if thats what it wants.
- (mail_generate_reply): Cleaned up the address list creation stuff
- a heap, and fixes for camel api changes. Also fixed a small
- memory leak as a side effect (fulladdr wasn't freed if it was the
- same as the sender).
-
- * mail-display.c (on_object_requested): Changed for interface
- changes to the from address. I think passing the encoded
- (internet version) of the address is right here.
-
-2000-11-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (on_right_click): Move filter stuff into a
- submenu of the popup menu.
-
-2000-11-06 Jesse Pavel <jpavel@helixcode.com>
-
- * mail-display.c: used Camel to parse the full address before
- passing the email address to my iTip control.
-
-2000-11-06 Dan Winship <danw@helixcode.com>
-
- First draft of folder tree unread message indication for /local
- mail folders.
-
- * mail-local.c: Add a new CamelStore subclass, MailLocalStore,
- which attaches to an Evolution_LocalStorage on one side and
- CamelSession on the other, and keeps track of local folders. Some
- of this code was previously in mail-local-storage.c, which no
- longer exists.
- (local_reconfigure_folder, etc): Various mail_op-related cleanups,
- and wrap d() around a bunch of printfs.
-
- * mail-tools.c (mail_tool_get_local_inbox_url,
- mail_tool_get_local_movemail_url): Removed
- (mail_tool_get_local_inbox): Simplified.
- (mail_tool_do_movemail): Remove unused dest_url variable.
- (mail_tool_uri_to_folder): Simplify. Now down to two cases
- (vfolder, and everything else).
-
- * component-factory.c (owner_set_cb): Pass evolution_dir to
- mail_local_storage_startup.
-
- * Makefile.am (evolution_mail_SOURCES): Remove
- mail-local-storage.[ch]
-
- * mail-summary.c: Remove mail-local-storage.h include
-
-2000-11-06 Kjartan Maraas <kmaraas@gnome.org>
-
- * mail-autofilter.c: Fix up #include <config.h>
- * mail-crypto.c: Same here.
- * mail-search-dialog.c: Here too.
- * main.c: Fix indentation of #ifdef
- * message-thread.c: Fix include.
-
-2000-11-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (delete_msg): Don't invert the flag.
- (undelete_msg): Same (when multiple messages are selected).
-
-2000-11-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Updated to have the same menu items as
- the new right-click menu - eventually these 2 menus should be the
- same.
-
- * folder-browser.c (on_right_click): Now correctly handles the
- case of multiple selection.
-
- * mail-callbacks.c (enumerate_msg): Make public so it can be used
- in other source files (it's a useful function!)
-
-2000-11-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (on_right_click): Added an "Undelete" option to
- the right-click menu and also set a mask so it was only selectable
- if the message is marked as deleted. Also set a mask for "Mark as
- Read" and "Mark as Unread".
-
- * mail-callbacks.c (undelete_msg): New callback to undelete
- messages.
-
-2000-11-03 Dan Winship <danw@helixcode.com>
-
- * message-list.c (cleanup_regenerate_messagelist): don't free the
- MessageList search when it's being reused
-
-2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-local.c (mail_local_map_uri): Don't show the passwd in the
- url string.
- (mail_tool_local_uri_to_folder): Same.
- (do_reconfigure_folder): Same.
-
-2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * Makefile.am: Added new header files.
-
- * component-factory.c (owner_set_cb):
- s/session_init/mail_session_init
-
- * session.c: Renamed public functions to mail_session_*.
- FIXME: Rename session.c to mail-session.c
-
- * folder-browser-factory.c: #include "mail-callbacks.h", #include
- "mail-session.h" and replace forget_passwords with
- mail_session_forget_passwords
-
- * mail.h: Move session prototypes to mail-session.h, Move
- mail-crypto prototypes to mail-crypto.h, Move mail-callback
- prototypes to mail-callbacks.h
-
- * mail-session.h: New header file containing public prototypes
- for session.c
-
- * mail-format.c: #include "mail-crypto.h"
-
- * mail-view.c:
- * folder-browser.c: #include "mail-callbacks.h"
-
- * mail-crypto.h: New header file containing public prototypes
- for mail-crypto.c
-
- * mail-callbacks.h: New header file containing public prototypes
- for mail-callbacks.c
-
- * message-list.c (message_list_get_layout): Set useful defaults.
- (message_list_setup_etable): Don't set the Outbox defaults on a
- folder just because it doesn't have a corresponding saved file.
-
-2000-11-03 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c (service_page_item_new): url_flags are now on
- CamelProvider, not CamelService
-
- * main.c:
- * subscribe-dialog.c:
- * mail-threads.c: Kill warnings
-
-2000-11-03 Federico Mena Quintero <federico@helixcode.com>
-
- * Makefile.am: Clean the idl-generated files properly.
-
-2000-11-03 Not Zed <NotZed@HelixCode.com>
-
- * mail-view.c: Added mail-display.h.
-
- * mail-autofilter.c: Removed unecessary headers. Who ran indent
- over this code? Sigh.
-
- * mail-ops.c (display_message_input_s): Added messagedisplay.
- (mail_do_display_message): Added messagedisplay arg.
- (mail_do_display_message): Dont bother doing another thread when
- we know we dont have a uid.
- (): Added folder-browser.h to headers. Sigh.
-
- * folder-browser-factory.c (control_activate): Setup the
- viewthreaded callback to the folder_browser function.
-
- * folder-browser.c (my_folder_browser_init): Connect to
- right_click of etable of the messagelist here.
- (on_right_click): Changed for argument changes.
- (folder_browser_toggle_threads): Changed to take a fb, and to set
- threaded mode on the messagelist.
- (my_folder_browser_init): Connect also to the double_click signal.
- (my_folder_browser_init): Connect to the message_selected signal
- of the message_list.
- (on_message_selected): Signal handler for message selected.
- (my_folder_browser_init): Fix for change to message_list_new().
-
- * message-list.h: Dont include folder-browser.h.
- (message_list_toggle_threads): Moved into folder-browser.h.
- (struct _MessageList): Removed folderbrowser.
-
- * mail.h: Dont include folder-browser.h here either, but
- mail-types.h instead.
- Moved prototypes moved into folder-browser.c into
- folder-browser.h. (vfolder_*, filter_*).
-
- * mail-display.h: Dont include folder-browser.h here, but
- mail-types.h and specific camel headers.
-
- * message-thread.c (sort_node): Invert the sort order logic so the
- list is sorted in mailbox order, not reverse mailbox order.
-
- * message-list.c (free_tree_ids): Fix a merge foo.
- (remove_node_diff): Removed unused row argument. Fixed
- callers/prototype.
- (clear_tree): pre_change on the removal of the root node.
- (build_flat): Only perform pre_change if we are rebuilding the
- whole lot. For incremental change let etable do its thing.
- (build_tree): Likewise for building the tree view. If making
- incremental updates, do them as we build it.
- (vfolder_subject):
- (vfolder_sender):
- (vfolder_recipient):
- (filter_subject):
- (filter_sender):
- (filter_recipient):
- (filter_mlist):
- (on_right_click): Moved to folder-browser.c, where they belong.
- (message_list_init): Dont connect to right_click anymore.
- (message_list_toggle_threads): Moved to folder-browser.c, renamed.
- (on_double_click): Moved to folder-browser.c
- (on_click): Set the flags directly, rather than in anothre thread,
- which is just not necessary.
- (message_list_class_init): Added a new signal 'message_selected',
- to indicate when a message was selected.
- (on_cursor_change_idle): Emit a signal, rather than directly
- triggering the display update.
- (select_row): Removed, no longer used.
- (idle_select_row): And this too.
- (select_msg): Removed as well.
- (message_list_select): Emit a signal, rather
- thandisplaying/clearing the mail-display directly.
- (mark_msg_seen): Moved to folder-browser.c
- (message_list_new): Removed folderbrowser argument.
-
-2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (on_right_click): Sync with message
- menu. Addresses bugzilla bug #778.
-
-2000-11-02 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Turn on draw grid for the main ETable (this may
- not be working in ETable itself.)
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-threads.c (mail_op_set_message): fmt argument should be
- const.
-
-2000-11-01 Dan Winship <danw@helixcode.com>
-
- Make "Get Mail" even more functional on IMAP (scans all folders),
- and do a first cut at folder tree highlighting (for IMAP/news
- only).
-
- * mail-ops.c (do_fetch_mail): For imap (sigh, we *still* shouldn't
- be hardcoding that), rescan the store's folder tree, rescan each
- changed folder for new messages, and update the shell folder tree.
- (do_scan_subfolders): Update for component-factory.c changes, and
- set folder display names and highlights appropriately when
- building the storage.
-
- * component-factory.c (add_storage): Make this static (was
- mail_add_new_storage). Use camel_service_get_name for the name
- rather than url->host. (Among other things, this lets you use a
- single machine as both an IMAP server and a news server.)
- (mail_lookup_storage): Hash storages based on their CamelStore
- rather than the URL.
- (factory_destroy): Disconnect each of the CamelStores in the
- storages_hash.
-
- * subscribe-dialog.c (cleanup_subscribe_folder):
- * mail-vfolder.c (vfolder_refresh): Pass "highlighted" flag to
- evolution_storage_new_folder
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (mail_op_report_status): Don't call the default
- logging function.
- (do_fetch_mail): Set the logfile and don't pass the logfile to
- filter_driver_set_status_func - it's purpose has been altered.
- (do_filter_ondemand): Same.
-
-2000-11-02 Not Zed <NotZed@HelixCode.com>
-
- ** Merged in camel-incremental-branch.
-
- * mail-format.c (mail_get_message_body): Jeff! Sigh.
- We should definetly not be strduping the
- content, it has already been copied and duplicated. Look at
- get_data_wrapper_text.
-
-2000-11-01 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.h: add fields search_entry and search_top.
-
- * subscribe-dialog.c: add mail-ops.c style async operations for
- getting the store (to remove deadlock in the case where a auth
- dialog is dismissed at startup and then the subscribe dialog is
- brought up), and subscribing/unsubscribing to folders. One case
- remains, that is getting the list of all folders.
- (subscribe_search): flesh out this function
- (build_tree): use the search_top field so we can search for
- groups/folders.
- (subscribe_dialog_destroy): free search_top.
- (subscribe_dialog_construct): init search_top.
-
-2000-10-30 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (generate_folder_summaries): Fix spelling :)
- Set folder->uri to NULL for the Inbox.
-
-2000-10-26 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (generate_html_summary): Add view:// uris to
- switch the display to that folder.
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Hmmm, someone can't spell Filder,
- er...I mean Filter ;-)
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-autofilter.c (rule_from_message): If the name is NULL or
- empty, then set the title to "Mail from <address>". Closes
- bugzilla bug #777. Also when filtering on Subject, set the file
- name to "Subject is <subject>" rather than just "<subject>" - I
- think this is a bit more user-friendly.
- (strip_re): Use unsigned char when passing to is<type>()
- functions from ctype.h.
- (rule_add_subject): Use the "is" rule instead of "contains".
-
-2000-11-01 Jesse Pavel <jpavel@helixcode.com>
-
- * mail-display.c: added property bag support for Bonobo
- controls, support which helps only the iTip control, currently.
-
-2000-11-01 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (pixbuf_gen_idle): Lots of fixes and
- simplifications. Should get rid of the "missing icon" problem.
- There is still a problem with some images failing to get
- thumbnails, even though they display correctly.
- (pixbuf_for_mime_type): New function to try really hard to get the
- right icon for a MIME type, including looking in mc and nautilus's
- pixmap directories.
- (on_object_requested): Always use pixbuf_gen_idle, even for
- non-image types, to prevent code duplication.
-
-2000-10-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_get_message_body): Shouldn't we be
- strdup'ing the content? This seems to fix the memory corruption
- problems.
- (mail_generate_reply): Make sure that the last char in the
- generated reply text is '\0' (when body text doesn't end with a
- \n, a random char will appear otherwise).
-
-2000-10-31 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c (do_test_service): Update for
- camel_service_disconnect change.
-
-2000-10-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-autofilter.c (filter_gui_add_for_mailing_list): Match "is"
- rather than "contains" now that we have the "is"-rule.
-
-2000-10-30 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c (config_do_query_authtypes): Redo this so that
- it works for all pages, not just the first page. (Now that this is
- finally working again, I expect Anna to finish her redesign in the
- next 15 minutes.)
- (service_page_item_new): Fix up the sizing of the Auth line to
- look more like everything else.
-
-2000-10-29 Dan Winship <danw@helixcode.com>
-
- * mail-tools.c (mail_tool_uri_to_folder): Simplify this a lot by
- making IMAP and NNTP use the same code, now that the IMAP
- namespace doesn't need special magic handling.
-
- * message-list.c (mail_do_regenerate_messagelist): Don't try to
- regenerate the message list if there is no folder. (The Bonobo UI
- code will call this as the callback for the "Threaded View"
- command.)
-
- * mail-ops.c (do_fetch_mail): Sync the folder before refreshing so
- we don't lose flag settings.
-
-2000-10-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (composer_send_cb): Check to make sure that the
- recipient list is neither NULL nor a 0-length list of addresses
- and pop up a dialog letting the user know why we are not allowing
- him/her to send the message.
-
-2000-10-26 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (write_data_to_file): Don't destroy a dialog
- after run_and_close'ing it.
-
-2000-10-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (composer_send_cb): Check for the TO recipient
- list being NULL and don't send.
-
-2000-10-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_send_mail): Don't forget to unref the
- FilterDriver.
-
- * mail-callbacks.c (apply_filters): New callback for applying
- on-demand filters. (removed the old on-demand filters callback).
-
- * mail-ops.c (do_filter_ondemand): Rewrote to apply "incoming"
- filters to all selected messages.
- (mail_do_filter_ondemand): No longer takes a FilterContext
- argument or a destination folder argument (why did we ever need
- this last one??) but now takes a uids argument.
-
- * folder-browser-factory.c: Add a MessageApplyFilters menu item.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.[ch]: Updated for the new ExecutiveSummary code.
-
- * Makefile.am: Added the summary files and the evolution-services CFLAGS
- and LIB stuff.
-
- * component-factory.c: Re-enabled the summary stuff.
-
-2000-10-25 Dan Winship <danw@helixcode.com>
-
- * main.c (main): Pass send/postpone signal handler functions to
- evolution_composer_factory_init.
-
-2000-10-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * subscribe-dialog.c (subscribe_select_all): Implemented.
- (subscribe_invert_selection): (was unselect_all) Implemented.
-
-2000-10-25 Dan Winship <danw@helixcode.com>
-
- * message-list.c: Add a "flagged" column, based on the Camel
- "flagged" flag, for assigning an arbitrary "hey, I care about
- this" flag to a message.
- (ml_tree_set_value_at): Remove
- (ml_tree_is_cell_editable): No, it's not.
- (on_click): Handle the read/unread and flagged fields via the
- click handler. Among other things, this makes it not select
- a message when you change its read status.
-
-2000-10-24 Dan Winship <danw@helixcode.com>
-
- * subscribe-dialog.c (folder_info_subscribed,
- subscribe_folder_info, unsubscribe_folder_info): Don't prepend "/"
- to the folder's full_name. Deal with hierarchy in the
- EvolutionStorage tree better.
- (storage_tree_path): Helper function to build a storage path from
- a CamelFolderInfo.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * *: Add some missing _()s and N_()s.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (INCLUDES): Update EVOLUTION_LOCALEDIR.
-
-2000-10-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_send_mail): Apply outgoing filters to the
- message.
-
-2000-10-23 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Fixed a possible error in row numberings. This
- needs to be changed quite a bit anyway, but this should make
- things slightly nicer in some cases.
-
-2000-10-23 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser.c: Made the top of the folder browser a little
- prettier.
-
- * mail-display.c, mail-vfolder.c: Made more dialogs resizable.
-
-2000-10-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-autofilter.c (filter_gui_add_from_message): Don't forget to
- set the rule source! (eg "incoming", "demand", or "outgoing")
-
-2000-10-22 Ettore Perazzoli <ettore@helixcode.com>
-
- * message-list.c (message_list_init): Always display the vertical
- scrollbar.
-
- * mail-display.c (mail_display_new): Always display the vertical
- scrollbar.
-
-2000-10-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.h: #include <camel/camel-folder.h>
-
-2000-10-20 Michael Meeks <michael@helixcode.com>
-
- * mail.h: s/BonoboUIHandler/BonoboUIComponent/
-
- * mail-callbacks.c (run_filter_ondemand): ditto.
-
- * session.c (forget_passwords): ditto.
-
-2000-10-20 Dan Winship <danw@helixcode.com>
-
- * evolution-mail.oafinfo: Declare composer factory.
-
- * main.c (main): Initialize it
-
-2000-10-19 Chris Toshok <toshok@helixcode.com>
-
- * message-list.c (nuke_uids): e-tree-model is now opaque. use the
- accessor to get the root node.
-
-2000-10-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c: #include "mail-vfolder.h"
- (vfolder_edit_vfolders): Don't call the dummy vfolder_edit
- function.
-
- * folder-browser-factory.c: s/VFolderEdit/SetVFolder
-
-2000-10-19 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c: (do_fetch_mail): For an imap store, just refresh the
- INBOX.
-
- * folder-browser-factory.c (control_deactivate): Don't sync
- non-existent folders.
- * message-list.c (nuke_uids): Don't traverse non-existent trees.
-
-2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (glade_messages): New.
- (EXTRA_DIST): Add `$(glade_messages)'.
-
-2000-10-19 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c: Clean up some old #if 0 code.
-
-2000-10-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Get the MailConfigIdentity
- *before* we create a new composer object so that we can set the
- signature file.
-
-2000-10-18 Michael Meeks <michael@helixcode.com>
-
- * folder-browser-factory.c (register_ondemand): kill.
- (create_ondemand_hooks): die.
- (control_activate): remove hook.
-
- * test-mail.c (create_container): kill old UI handler.
-
-2000-10-18 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Fixed some column widths.
-
-2000-11-02 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (get_message_info): Call get_message_uid to get
- the uid, save some duplicated code.
- (folder_changed): Handle the case of a NULL changes input.
-
- * message-thread.c (thread_messages): Removed pointless
- variable/assignment 'container'.
- (thread_messages): Try and cope with duplicate message id's.
-
-2000-11-01 Not Zed <NotZed@HelixCode.com>
-
- * mail-callbacks.c (main_select_first_unread): Changed to use 0 as
- the first row to select a message.
-
- * mail-ops.h (mail_do_regenerate_messagelist): Removed from
- header. This function is no longer public since it is really an
- internal message-list function.
-
- * folder-browser.c (search_full_clicked): Call the set_search()
- function, rather than messagelist_rebuild, which is going private.
- (search_set): Same here.
- (folder_browser_clear_search): And here.
- (etable_key): Call message_list_select() instead of
- message_list_home and message_list_end. Removing some odd code
- duplication.
-
- * message-thread.c (do_thread_messages): Moved the mail lock to
- here, rather than locking for each message lookup (which is
- useless anyway). This is still not correct either, as the tree
- references folder data ... but a bit better than it was.
- (thread_messages): Removed the mail tool lock stuff, lock in
- higher functions.
-
- * message-list.h: Added a threaded indicator to the message list
- itself.
- (threaded_view): removed a mystery variable.
-
- * message-list.c (do_regenerate_messagelist): Made the code a
- little more readable.
- (build_tree): Fixed argument to be a thread_messages struct, not a
- container.
- (cleanup_regenerate_messagelist): Free changeinfo.
- (mail_do_regenerate_messagelist): If we are adding changes to a
- flat view, we dont need to goto the other thread at all, so
- process immediately.
- (message_list_toggle_threads): Clear the tree if we're changing
- the view mode.
- (message_list_toggle_threads): And reset the rowmap, since it is no
- longer valid.
- (build_tree): If we are building into an already empty tree, just
- build into that (probably irrelevant optimisation).
- (build_subtree): Build hte subtree in the same order as we got it,
- not inverted order.
- (message_list_set_threaded): New function to select the threaded
- view/flat view.
- (mail_do_regenerate_messagelist): Removed references to
- mail_config, get it from the ml->threaded var instead.
- (message_list_destroy): No longer free the key data for the
- uid_rowmap.
- (new_id_from_uid): Convert a uid string into an id string.
- (new_id_from_subject): Likewise for subject strings.
- 'id' strings replace the 'uid:' and 'subject:' stuff with
- accessors and macros and use less memory and is more readable.
- (id_is_uid): macro to check if an id string is a uid.
- (id_uid): Returns the uid part of a uid id string.
- (id_subject): Returns the uid part of a subject id string.
- (build_subtree): Use the new id functions, and dont duplicate the
- uid in the uid rowmap, but just reference it from the tree node.
- (node_equal): Use new id functions.
- (add_node_diff): And here too.
- (remove_node_diff): And here. Also remove the uid from the
- rowmap, and dont free it anymore.
- (get_message_info): And here.
- (get_message_uid): And here.
- (subtree_unread): And here.
- (ml_tree_value_at): "
- (ml_tree_set_value_at): Noted a memory leak. do_flag_messages()
- doesn't free the contents of the uid array, just the uid array
- (well that i can tell, teh code has more problems anyway).
- (ml_tree_set_value_at): And fix the id accessors.
- (save_node_state): "
- (build_flat): Use id macros/functions. Dont alloc memory for hash
- key.
- (build_flat_diff): Use id macros.
- (build_flat_diff): Remove the hash table entry before freeing its
- key data (in the node).
- (free_key): Removed. Keys are no longer alloc'd.
- (clear_tree): When we clear the tree, also clear the uid_rowmap,
- as it is no longer valid (or contains allocated keys!).
- (free_tree_ids): Renamed from nuke_uids.
- (free_ids_cb): Renamed from nuke_uids_cb.
- (free_tree_ids): Changed arg to be a ETreeModel directly.
- (ml_tree_value_at): Map id to subject using the right macro.
- (free_tree_ids): Check we have any nodes to traverse first.
- (build_flat): Insert to row -1 to append the nodes (faster).
- (remove_node_diff): Only remove the uid rowmap entry if it is
- referencing this node (i.e. the key string is the same key string,
- not just a matching key string).
- (add_node_diff): Remove the uid rowmap entry before inserting a
- new one to force the key to be replaced. This is required as the
- tree may temporarily contain duplicate messages during the
- rebuilding phase.
- (message_list_set_search): New function, set the search string.
- Only redo the search if it has changed, etc.
- (mail_do_regenerate_messagelist): Made static. There is no need
- for external code to call this.
- (message_list_set_folder): NOP if the new folder is the same.
- (message_list_set_folder): Clear the tree before rebuilding it.
- (message_list_select): Ok, this wins the award for 'most bizarre
- interface'. Changed the start row to mean the end of the list if
- we supply -1, rather than the start of the list. Also fixed the
- endpoints (it would never select message 0 if searching
- backwards).
- (idle_select_row): Changed start row to 0 from -1.
- (message_list_end): Removed.
- (message_list_home): Removed.
- (go_to_message): Removed. message_list_select can do this.
- (message_list_select): Check that direction is one of the valid
- ones, otherwise we could be thrown for loops.
-
-2000-10-31 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (node_equal): Compares an etree node with a
- message-thread node to see if they point to the same object.
- (add_node_diff): Adds a new thread node to the etree.
- (remove_node_diff): Removed an etree node, freeing any additional
- data.
- (build_subtree_diff): Takes an existing etree definition, and a
- new thread definition and makes the etree match, using as few
- operations as possible.
- (do_regenerate_messagelist): No longer free/clear the uid/rowmap
- here.
- (regenerate_messagelist_input_t): Added a tree field - are we
- building a tree view?
- (regnerate_messagelist_data_t): Added a tree field, if we built a
- tree result. Added a changes parameter, for building diff's after
- search/etc.
- (mail_do_regenerate_messagelist): Setup the tree indicator.
- (build_flat_diff): Apply a changeset to a message list.
- (build_flat): Added a changes argument, if present, use
- build_flat_diff() to build the list.
- (do_regenerate_messagelist): If we are generating a threaded view,
- build the threaded list here, rather in another separate
- invocation.
- (cleanup_regenerate_messagelist): Call build_tree directly on the
- threaded list.
- (message_list_init): Init the uid_rowmap hash table here instead
- of somewhere odd.
- (message_list_destroy): Assume uid_rowmap exists.
- (do_regenerate_messagelist): Remove the code here that is messing
- with the message list data (search/uid_rowmap). We're in a
- different thread boys ...
-
-2000-10-26 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (cleanup_regenerate_messagelist): Fixed some
- logic to make more sense (gboolean)!pointer replaced with
- (pointer != NULL).
- (build_tree): Put the tree pre/post change stuff in here, where it
- should be.
- (build_flat): Same here.
- (cleanup_regenerate_messagelist): Remove model_changed stuff here.
- (setup_regenerate_messagelist): Remove pre_change stuff here.
-
-2000-10-20 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (main_folder_changed): Perform incremental update
- of the display for flat view.
- (ml_tree_value_at): Spit out a mroe meaningful warning when we
- can't find the uid in our tree, in the folder.
-
- * message-thread.c (thread_messages): Made public.
- (thread_messages_free): Made public.
- (thread_messages): Now we also return a struct _thread_messages,
- which is passed to other functions.
- (container_free): Renamed from thread_messages_free.
- (thread_messages_free): Take a thread_messages argument.
- (thread_messages_add): New function to add a list of uid's to the
- thread list.
- (thread_messages_remove): Likewise, for removing them.
- (cleanup_thread_messages): Change for struct changes.
- (do_thread_messages): Likewise.
-
-2000-10-19 Not Zed <NotZed@HelixCode.com>
-
- * mail-tools.c (mail_tool_do_movemail): removed unused var
-
- * folder-browser.c (search_full_clicked): Fix for api changes,
- such as it can be called an api, its mroe an utter mess infact.
- (search_set): Same.
- (search_set): And here.
- (folder_browser_clear_search): And here.
-
- * message-list.c (folder_changed): Copy and forward the changeinfo
- list to the mian thread.
- (main_folder_changed): Free the changeinfo. Todo: something smart
- with this information.
- (struct regenerate_messagelist_input_s): Added a changes field.
- (mail_do_regenerate_messagelist): Added a change list argument.
- (message_list_set_folder): Fix for mail_do_regenreate_messagelist
- api.
- (message_list_toggle_threads): Same.
-
-2000-10-18 Iain Holmes <iain@helixcode.com>
-
- * mail-config-gui.c (mail_config): Make all the CLists have passive
- titles.
- (identity_dialog): Make the default button the "OK" button, and set
- the dialog to close on pressing return on the entryboxes.
-
-2000-10-17 Iain Holmes <iain@helixcode.com>
-
- * mail-config-gui.c (service_page_item_new): Disable the optionmenu
- because it is empty.
- (service_page_item_auth_fill): Enable the optionmenu as there's stuff
- in it now.
-
- * mail-callbacks.c (reply_to_sender): Call check_send_configuration
- when we have the FolderBrowser because if it is done in mail_reply
- (with passing NULL) it will only be able to continue if the mailer
- has already been configured.
- (reply_to_all): Same.
-
-2000-10-18 Not Zed <NotZed@HelixCode.com>
-
- * folder-browser.c (folder_browser_gui_init): No, we REALLY dont
- want to perform an immediate search as the keys are pressed.
-
- * mail-display.c (on_object_requested): Kill a minor warning with
- a cast.
-
- * mail-config.c: Include mising ctype.h to kill a warning.
-
- * message-thread.c (main): Fixed the test case for api changes.
-
- * message-list.c (message_list_drag_data_get): Set some flags to
- get_folder(). I dont even think this will work because
- mail_tool_get_folder doesn't handle file url's.
-
- * mail-vfolder.c (vfolder_uri_to_folder): Pass appropriate flags.
-
- * mail-ops.c (do_setup_folder): Pass appropriate flags. Hmm,
- whats the difference between setup and create. *shrug*
- (do_create_folder): Pass appropriate flags to get_folder. Needs a
- way to specify the index flag.
-
- * mail-tools.c (mail_tool_get_folder_from_urlname): Changed create
- to flags argument.
- (mail_tool_get_local_inbox_url): Add an index argument.
- (mail_tool_get_local_inbox): honour index flag.
- (mail_tool_get_inbox): Changed for api change.
- (mail_tool_uri_to_folder): Fixed calls to store_get_folder();
-
- * mail-local.c (load_metainfo): Added an indexed field to the metainfo.
- (save_metainfo): And save it too.
- (do_reconfigure_folder): Honour index flag when creating the new
- folder. Do not open the old folder with an index at all.
- (mail_local_map_uri): Add an index argument - tells if the mbox is
- indexed.
- (mail_tool_local_uri_to_folder): Create & pass flags properly.
- (#include gnome.h): Dont include all of gnome, just what we use,
- and explicity include xml-memory, so we get xmlFree().
-
-2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (search_full_clicked): Un #if 0'd out
- (search_full): Same.
- (folder_browser_gui_init): Connect search_full and search_activate.
- (search_set): Uncomment search_full()
-
- * Makefile.am: Re-add `mail-search-dialogue.h' and
- `mail-search-dialogue.c'.
-
-2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Decode recipient names so
- that they display nicely in the To and Cc fields.
- (write_field_to_stream): Now takes another argument
- 'value_is_encoded' so that we know if we should decode that string
- before proceding onward. Since the message subject is already
- decoded before it's passed in, we don't want to decode it again
- (wasted cpu time and/or any 8bit chars will be assumed to be
- latin1 encoded and thus the decoded value will be corrupt).
-
-2000-10-16 Chris Toshok <toshok@helixcode.com>
-
- * mail-config-gui.c (service_page_get_url): only set the url->user
- field if the user string is non-NULL and not empty.
-
-2000-10-16 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_setup_etable): Uh, fixed jeff's
- wrong fix for setting the speficiation (the function changed to
- set_state(), as can be seen in the e_table-scrolled_load_state()
- call only 2 lines above).
-
-2000-10-13 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_setup_etable): oops, chose the
- wrong thing to cut out after a merge conflict.
-
-2000-10-15 Chris Toshok <toshok@helixcode.com>
-
- * message-list.c (subtree_unread): ETreePath != GNode now, use
- accessors.
- (ml_tree_value_at): same.
- (save_node_state): same.
- (save_tree_state): same.
- (nuke_uids_cb): convert to e_tree_model_node_traverse required
- type.
- (nuke_uids): g_node_traverse -> e_tree_model_node_traverse.
-
-2000-10-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * evolution-mail.oafinfo: Add "evolution:shell-component-icon"
- attribute.
-
-2000-10-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (message_list_setup_etable): Don't free the
- service name.
-
-2000-10-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): sync & expunge the source folder
- after filtering.
-
-2000-10-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (message_list_setup_etable): Create the 'spec'
- and 'extras' arguments and call e_table_scrolled_new() rather than
- set_specification as that function no longer (?) exists.
-
- Also started to add drag & drop functionality to something like
- Nautilus (but #if 0'd it out until I had time to finish it and
- till after 0.6).
-
-2000-10-12 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_setup_etable): Duh, fix the test
- for the folder name, strstr != strcmp is it.
-
-2000-10-10 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (folder_to_cachename): Removed, changed callers
- to use mail_config_folder_to_cachename instead.
-
- * mail-config.c (mail_config_folder_to_cachename): New utility
- function to get a cache name for a folder.
-
- * mail-tools.c (mail_tool_do_movemail): Changed to return the path
- to the mbox, rather than opening a folder of it.
-
- * mail-ops.c (mail_incorporate_messages): Dont bother making the
- pseudo messageinfo, filder_driver_filter_message will do it for
- us.
- (report_status): Callback to report status of filtering operation.
- (do_fetch_mail): Changed significantly - for the api changes to
- the filtering system. Also now incorporates a mailbox file
- directly, without having to import it into a camel folder first.
- (mail_incorporate_messages): Removed entirely, no longer needed.
-
- * mail-vfolder.c (vfolder_refresh): Fix for context api changes.
- (vfolder_uri_to_folder): Likewise.
-
- * folder-browser-factory.c (create_ondemand_hooks): Changed for
- api changes. Also only adds demand filters to the menu (fixed a
- small logic bug).
-
-2000-10-11 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (folder_etree_value_at): special case for
- folders with NULL urls (which aren't selected/subscribeable).
- (unsubscribe_folder_info): can't (un)subscribe from folders with
- non-NULL urls.
- (subscribe_folder_info): same.
-
-2000-10-12 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Replace To with From except in Drafts, Outbox,
- or Sent boxes. Make Subject column pay attention to text
- attributes like bold and strikethrough.
-
-2000-10-12 Iain Holmes <iain@helixcode.com>
-
- * component-factory.c: Disable the executive summary.
-
-2000-10-11 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (FOLDER_ETABLE_SPEC): set expansion to 0.0,
- minimum-width to 16, and resizable to false for the subscribed
- column.
- (folder_info_subscribed): new function so we can do the correct
- path munging.
- (subscribe_folder_info): only add the folder to the storage if
- there wasn't an exception subscribing it.
- (unsubscribe_folder_info): same, but unsubscribing.
- (folder_etree_value_at): use folder_info_subscribed.
- (folder_toggle_cb): same.
- (unsubscribe_folder_foreach): same.
- (subscribe_folder_foreach): same.
- (subscribe_dialog_gui_init): set the bold column on the text cell,
- and add the subscribed pixbuf.
-
-2000-10-11 Anna Marie Dirks <anna@helixcode.com>
- * mail-threads.c: Changed the password-getting dialog so that the
- text entry has focus.
-
-2000-10-11 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (STORE_ETABLE_SPEC): change cell type to
- "string" since we're not including it in the extras.
-
-2000-10-11 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, message-list.h, subscribe-dialog.c: Changed
- these to use the proper form for the column element.
-
-2000-10-11 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, message-list.h, subscribe-dialog.c: Updated
- these to the new ETable style of specifications.
-
-2000-10-11 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (subscribe_dialog_gui_init): convert to the
- new gal e-table stuff.
- (html_size_req):
- (html_new):
- (put_html): #if 0 out the html functions since description stuff
- isn't used and we don't want the warnings.
-
-2000-10-11 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (subscribe_dialog_gui_init): remove the html
- description stuff for now.
-
-2000-10-10 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (folder_toggle_cb): umm.. duh :) only
- subscribe if it's not subscribed, and vice versa.
- (subscribe_folder_foreach): make sure to call
- e_tree_model_node_changed.
- (unsubscribe_folder_foreach): make sure to call
- e_tree_model_node_changed.
-
-2000-10-10 Chris Toshok <toshok@helixcode.com>
-
- * mail-ops.c (setup_scan_subfolders): add a ref to input->storage
- here so that the ref/unref pattern more closely matches other
- mail-ops. also, this keeps the storage from being freed when we
- hit the unref in cleanup_scan_subfolders, which is important
- because we maintain a reference to it in the storage_hash in
- component-factory.c
-
- * subscribe-dialog.h: add storage field.
-
- * subscribe-dialog.c (subscribe_folder_info): new function,
- subscribe to a folder given it's CamelFolderInfo, and add it to
- the shell - we're generating a path from the name of the folder
- which is bad.
- (unsubscribe_folder_info): same (except we unsubscribe and remove
- from the shell).
- (storage_selected_cb): unref the currently selected storage.
- (subscribe_dialog_destroy): unref the currently selected storage.
- (subscribe_dialog_construct): sc->storage = NULL.
-
- * component-factory.c (mail_lookup_storage): new function, to look
- up a EvolutionStorage corresponding to a CamelService. we ref the
- EvolutionStorage before passing it back.
- (mail_add_new_storage): insert the storage into storages_hash if
- result is EVOLUTION_STORAGE_OK.
-
- * mail.h: add prototype for mail_lookup_storage.
-
-2000-10-10 Larry Ewing <lewing@helixcode.com>
-
- * mail-format.c (mail_generate_reply): make sure we dup the return
- value of get_reply_to or get_from when building the recipient list.
-
-2000-10-10 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (generate_html_summary): Removed the <li> from the
- HTML.
-
-2000-10-10 Cody Russell <bratsche@gnome.org>
-
- * mail-threads.c: Added #include <errno.h>
-
-2000-10-09 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c: Removed the extra arguments to rule_context_load.
-
-2000-10-09 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c, subscribe-dialog.h: use our own etable to
- display the stores, and get them from the mail-config api. put
- #if 0'ed code in place to add/remove the folders from the shell
- when they're subscribed/unsusbcribed. also, react to double
- clicks in the folder etable by toggling subscription status.
-
-2000-10-08 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (create_summary_view): Updated to use new icon code.
-
-2000-10-08 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c (generate_html_summary): Generic function to
- recreate the HTML of the summary. Checks all the folder summaries.
- (generate_folder_summarys): Create a summary of all the vfolders
- and the Inbox.
- (create_summary_view): Generate the folder summarys before the
- HTML.
-
-2000-10-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser.c: Don't #include "mail-search-dialogue.h" as
- it's missing from the repository.
- (search_full_clicked): Temporarily `#if 0'ed out.
- (search_full): Likewise.
- (folder_browser_gui_init): Don't connect `search_full'.
- (create_option_menu): Don't connect `search_menu_deactivate'.
- (folder_browser_gui_init): Don't connect `search_activate'.
- (search_set): Don't do `search_full()'.
- (folder_browser_gui_init): Likewise.
-
- * Makefile.am (evolution_mail_SOURCES): Remove
- `mail-search-dialogue.h' and `mail-search-dialogue.c' as NotZed
- forgot to put them into CVS.
-
-2000-10-06 Not Zed <NotZed@HelixCode.com>
-
- * mail-search-dialogue.c: New widget, full search dialogue for
- mail.
-
- * folder-browser.c (search_set): If we click on custom search, run
- the full search dialogue.
- (folder_browser_gui_init): Add a button to perform a full search.
- (search_full): Bring up the mail search dialogue asynchronously.
- (search_full_clicked): Handle search options.
- (folder_browser_destroy): Free the saved rule if there is one
- there.
- (search_options[]): Added a custom option option - brings up the
- full search dialogue.
- (search_set): Disable the search entry if we are doing a full
- search.
-
- * mail-vfolder.c (vfolder_create_storage): Yay, finally
- depeterised this stuff.
- (vfolder_uri_to_folder): Removed an irrelevant comment.
-
- * mail-callbacks.c (filter_edit): And here.
-
- * mail-ops.c (do_fetch_mail): And here too.
-
- * mail-autofilter.c (filter_gui_add_from_message): Fixed call to
- context_load.
- (filter_gui_add_for_mailing_list): And here too.
-
- * folder-browser-factory.c (create_ondemand_hooks): Remove that
- ondemand callback snot.
-
-2000-10-05 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_init_etable): Build the etable once
- we know what folder we are going to use.
- (save_header_state): Save the header spec to a cache file.
- (message_list_destroy): Save the header spec.
- (message_list_setup_etable): Setup the etable spec for this
- folder, from a saved version if one exists, or to suit the folder
- type (sent/received).
- (message_list_set_folder): Setup the etable here once we have a folder.
-
-2000-10-09 Michael Meeks <michael@helixcode.com>
-
- * message-list.c (message_list_toggle_threads): re-write.
-
- * folder-browser-factory.c (control_activate): update paths, need
- CVS HEAD bonobo, use a listener not a verb.
-
-2000-10-08 Miguel de Icaza <miguel@helixcode.com>
-
- * mail-ops.c (mail_incorporate_messages): Tag string for translation
- (do_flag_messages): ditto.
-
- * mail-threads.c (pipe_write): Repeates writes on EINTRS.
- (pipe_read): Repeats reads on EINTRS.
- (mail_operation_queue): Use pipe_write
- (mail_op_set_percentage): ditto.
- (mail_op_hide_progressbar): ditto.
- (mail_op_show_progressbar): ditto.
- (mail_op_set_message): ditto.
- (mail_op_get_password): ditto.
- (mail_op_error): ditto.
- (mail_op_forward_event): ditto.
- (mail_operations_terminate): ditto.
- (dispatch): use pipe_read.
- (dispatch): use pipe_write
- (dispatch): ditto.
-
- * mail-ops.c (mail_incorporate_messages): Only show message being
- incorporated every 2 seconds, to avoid a bunch of CORBA round trips.
- (do_transfer_messages): ditto.
- (do_forward_messages): ditto.
-
-2000-10-07 Miguel de Icaza <miguel@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Move the functionality to
- incorporate messages into mail_incorporate_messages.
- (mail_load_evolution_rule_context): New function. Move the
- functionality for loading the context rules to its own function.
-
-2000-10-06 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c: Fix the locking up of the mail by only calling
- camel functions from the camel thread, and ORBit functions from
- the GTK thread. Watch for the message-changed signal again.
-
- * component-factory.c (summary_fn, component_factory_init):
- Re-enabled it, cos I think it works again.
-
- * mail-display.h: Remove the pb_cache.
-
- * Makefile.am: Readd the mail-summary.[ch] files and add the
- evolution-services library to the link.
-
-2000-10-06 Chris Toshok <toshok@helixcode.com>
-
- * mail-ops.c (do_scan_subfolders): set the @subscribed_only
- parameter to TRUE, since the subscribe UI is the only interface
- that should show unsubscribed groups.
-
-2000-10-06 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (do_scan_subfolders): Add missing @subscribed_only
- parameter in the call to `camel_store_get_folder_info()'. [FALSE,
- I hope that's right.]
-
-2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (write_field_to_stream): Decode the header before
- writing it to the header box.
-
- * mail-callbacks.c (send_receieve_mail): fetch mail before
- sending, this is a temp fix for POP-before-SMTP authentication.
-
-2000-10-05 Michael Meeks <michael@helixcode.com>
-
- * component-factory.c (summary_fn, component_factory_init):
- Disable summary stuff, it appears to be badly broken.
-
- * Makefile.am (evolution_mail_SOURCES): add mail-summary.[ch]
-
- * subscribe-dialog.c (update_pixmaps): upd.
- (set_pixmap): upd.
- (subscribe_dialog_gui_init): upd.
- remove redundant and annoying forward definitions.
-
- * folder-browser-factory.c (control_deactivate): upd.
- (control_activate_cb): upd.
- (control_activate): upd.
- (set_pixmap): upd.
- (update_pixmaps): upd.
- (register_ondemand): upd.
- (create_ondemand_hooks): upd.
-
-2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (address_compare): Use CamelInternetAddress
- instead of my quick hack (aka InternetAddress).
-
-2000-10-05 Iain Holmes <iain@helixcode.com>
-
- * mail-summary.c: Don't watch for the message-changed signal.
-
-2000-10-05 Iain Holmes <iain@helixcode.com>
-
- * component-factory.c (component_factory_init): Setup the summary
- factory as well.
- (summary_fn): New function to create the ExecutiveSummaryComponent.
-
- * mail-summary.c: Create the view, and update it when something
- changes.
-
-2000-10-04 Iain Holmes <iain@helixcode.com>
-
- * mail-display.c (on_object_requested): Removed the pixbuf cache
- as it would return the pixbufs in the reverse order every so often
- and generally get all confused.
-
-2000-10-04 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (control_deactivate): Add back the
- "sync folder on leave" hack that got lost in the UIHandler merge.
-
-2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Instead of UnSelectAll, we want
- InvertSelection.
-
- * mail-callbacks.c (select_all): Finished this function.
- (invert_selection): Finished. (was unselect_all - but that's not
- what we really wanted as it'd be pointless. invert_selection is a
- much more useful callback :-)
-
-2000-10-04 Chris Toshok <toshok@helixcode.com>
-
- * mail-tools.c (mail_tool_get_root_of_store): remove news specific
- check.
- (mail_tool_uri_to_folder): news: -> nntp:
-
-2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_filter_ondemand): Don't expunge the source
- mailbox on completion.
-
-2000-10-04 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (do_scan_subfolders): Don't try to add_folders if
- get_folder_info returned NULL.
-
-2000-10-04 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_init_header): Fix the attachment
- icon width.
- (content_is_attachment): Perform some simple tests to see if the
- message contains an attachment.
- (build_subtree): Kill a pointless warning.
-
-2000-10-04 Miguel de Icaza <miguel@helixcode.com>
-
- * mail-callbacks.c (delete_msg): Added a comment to a piece of
- code that I was trying to "fix" just to find that the strange
- behaviour here that was about to be fixed, was actually a fix to
- the problem I was trying to fix.
-
- So put the original comments from Dan, and will hope that someone
- with more knowledge about this can figure why the delete key wont
- delete messages and select the next unread message.
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (subscribe_dialog_destroy): destroy our
- tree_model and remove the root node. also, release_unref our
- control and view, and unref the listener.
-
- * mail-tools.c (mail_tool_uri_to_folder): news url's contain host
- names too, now.
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c, subscribe-dialog.h: add a
- storage-set-view-listener, and add a little printf saying what
- storage was selected.
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.c (subscribe_dialog_gui_init): get
- Evolution::StorageSetView interface on our storage set view
- control, and set "show_folders" to FALSE.
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * Makefile.am (INCLUDES): add -I$(top_srcdir)/widgets/misc
-
- * subscribe-dialog.c (subscribe_dialog_gui_init): change the
- window title to Manage Subscriptions, bold subscribed folders, and
- add a title bar ala the evolution shell (but without the close
- button).
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-dialog.h: add fields for the storage set
- Bonobo_Control and Evolution_StorageSetView interfaces.
-
- * subscribe-dialog.c (subscribe_dialog_gui_init): create the uih
- as early as possible, and add the storage set view to the left
- side of the hpaned.
-
-2000-09-22 Michael Meeks <michael@helixcode.com>
-
- * folder-browser-factory.c (set_pixmap): upd.
- (control_activate): upd.
-
-2000-10-02 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c: Remove "Port" entry from source dialog. We'll
- use "host:port" like Netscape and other programs do.
- (service_page_get_url): If host ends in ":###", use that as port.
- (service_page_set_url): If URL contains a port, append it to the
- hostname, separated by a colon.
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * Makefile.am (evolution_mail_SOURCES): subscribe-control.[ch] ->
- subscribe_dialog.[ch]
-
- * mail-callbacks.c (manage_subscriptions): subscribe_control ->
- subscribe_dialog. Also, pass the shell to subscribe_dialog_new.
-
- * mail-types.h: SubscribeControl -> SubscribeDialog.
-
- * subscribe-dialog.c, subscribe-dialog.h: rename from
- subscribe-control.[ch].
-
- * subscribe-dialog.c (subscribe_dialog_construct): pass
- Evolution_Shell in.
- (subscribe_dialog_new): takes Evolution_Shell argument now.
-
-2000-10-02 Chris Toshok <toshok@helixcode.com>
-
- * message-list.c (message_list_init_renderers): remove the 2 tree
- pixbufs, so adjust the offsets to the score pixbufs. also, pass
- NULL for the open/closed pixbufs to the tree cell renderer.
-
-2000-10-02 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (mail_do_scan_subfolders, etc): Update for
- CamelFolderInfo changes.
-
- * message-list.c (message_list_destroy): Don't save_tree_state if
- there's no folder associated with the MessageList.
-
- * folder-browser.c (folder_browser_set_uri): Only call
- mail_do_load_folder if the URI is not "".
-
-2000-10-02 Iain Holmes <iain@helixcode.com>
-
- * mail-display.[ch]: Add a cache for the pixbufs, hashed on CID,
- so that we only have to make a thumbnail once.
-
-2000-10-01 Iain Holmes <iain@helixcode.com>
-
- * mail-display.c: Generate the thumbnails on an idle function so
- that the user interface isn't locked. Checks in case the widget it
- will use to display the image isn't destroyed.
-
-2000-10-01 Iain Holmes <iain@helixcode.com>
-
- * mail-display.c (on_object_requested): If the attachment is an
- image display a thumbnail of it, instead of the generic image
- icon.
-
-2000-09-29 Miguel de Icaza <miguel@helixcode.com>
-
- * folder-browser-factory.c: Add print preview verb here.
-
- * mail-callbacks.c (do_mail_print): Handle printing here, the
- complete engine.
- (mail_print_preview_msg): new. does print previewing.
- (mail_print_msg): does printing of the message.
-
-2000-09-29 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-control-factory.c, subscribe-control-factory.h: nuked.
-
- * subscribe-control.c, subscribe-control.h: lots of changes. we
- now pop up a dialog, and will have a storage set view on our left
- side, like the shell does.
-
- * mail.h: add prototype for manage_subscriptions.
-
- * mail-callbacks.c (manage_subscriptions): new function, pops up
- the subscribe dialog.
-
- * folder-browser-factory.c: add the verb for managing
- subscriptions.
-
- * Makefile.am (evolution_mail_SOURCES): add subscribe-control.[ch]
- again.
-
-2000-09-28 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-control.h (subscribe_search): added prototype.
-
- * subscribe-control.c (subscribe_search): new function.
-
- * subscribe-control-factory.c (make_folder_search_widget): new
- function, to add search widget to toolbar.
- (control_activate): create the search widget and add it to the
- toolbar.
-
-2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_send_queue): Messages should be appended to Sent
- as Seen.
- (do_send_mail): Same.
-
-2000-09-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am: Don't compile `subscribe-control' for now. It
- needs to be converted to the new UI handler code in Bonobo; it
- doesn't compile right now.
-
-2000-09-27 Chris Toshok <toshok@helixcode.com>
-
- * subscribe-control.c (subscribe_refresh_list): new function.
-
- * subscribe-control.h (subscribe_refresh_list): new prototype.
-
- * subscribe-control-factory.c (update_pixmaps): add RefreshList
- pixmap. also, add it to the verbs list.
-
-2000-09-27 Chris Toshok <toshok@helixcode.com>
-
- * mail-types.h: add SubscribeControl typedef.
-
- * Makefile.am (evolution_mail_SOURCES): add the subscribe stuff.
-
- * subscribe-control-factory.h * subscribe-control-factory.c *
- subscribe-control.c: * subscribe-control.h: Mostly mocked up
- subscribe ui.
-
-2000-09-27 Jeffrey Stedfast <fejj@helixcode.com>
- Note: We need a configuration option to specify whether to log
- filtering actions or not.
-
- * mail-ops.c (do_filter_ondemand): Updated to pass a log file
- pointer to filter_driver_run.
- (do_fetch_mail): Same.
- (mail_do_fetch_mail): Fixed a compiler warning.
-
-2000-09-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (composer_postpone_cb): Fix it so that "send
- later" will still mark a message as being replied, forwarded,
- whatever. Closes bug #568 on bugzilla.
-
-2000-09-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_filter_ondemand): If the message has been
- deleted, don't try filtering it - skip to the next message. Fixes
- bugzilla bug #639.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Shuffling (un)select all menu items to
- the Edit menu.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Added new menu items
-
- * mail-callbacks.c (mark_as_seen): New callback to mark all
- selected messages as Seen.
- (mark_as_unseen): New callback to mark all selected messages as
- Unseen.
- (select_all): New callback to select all messages (not yet
- finished)
- (unselect_all): New callback to unselect all messages (not yet
- finished)
-
-2000-09-25 Not Zed <NotZed@HelixCode.com>
-
- * message-list.c (folder_to_cachename): Function to convert a
- folder name/path to a filename for per-folder data.
- (save_tree_state):
- (load_tree_state):
- (free_tree_state): For loading/saving the state of the expansion
- of nodes in the tree.
- (message_list_destroy): Save the tree state when done.
- (save_node_state): Changed logic, we save when the node should be
- closed on startup. i.e. any new nodes with children automatically
- default to being open.
- (subtree_unread): Check for unread messages in a subtree. So
- false messages (for tree roots) are properly displayed.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (address_compare): Updated to use Nat's
- ENameWestern parser.
-
- * Makefile.am: link against e-util/ename/libename.la
-
-2000-09-25 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c: CamelException is not for compile-time errors.
- Replace lots of argument checks in setup_ functions with
- g_return_if_fails in the public functions. Also remove some
- prototypes that weren't needed because they were for static
- functions that are defined before they're used.
-
-2000-09-23 Michael Meeks <michael@helixcode.com>
-
- * folder-browser-factory.c (set_pixmap): upd.
- (control_activate): upd.
-
-2000-09-23 Ettore Perazzoli <ettore@helixcode.com>
-
- * message-list.c (internet_address_new_from_string): Skip spaces
- at the beginning of the string first before doing anything else.
- The code that follows doesn't like the first character of the
- string to be a space.
-
-2000-09-22 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (address_compare): New comparison function for
- email addresses.
- (subject_compare): New comparison function for message subjects.
- (message_list_init_header): Updated to use the new compare funcs.
-
-2000-09-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Fixed some memory
- leakage. Call free_recipients() so we don't leak memory.
-
-2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_scan_subfolders): Use the folder's full_name so
- recursive directory structures display correctly ;-)
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (do_scan_subfolders): Update for CamelFolder changes
- (subfolder_names -> subfolder_info).
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * mail-callbacks.c (create_msg_composer, compose_msg, send_to_url,
- mail_reply, forward_msg): * mail-format.c (mail_generate_reply): *
- mail-ops.c (cleanup_edit_messages):
-
- * mail-view.c (view_forward_msg): Deal with NULL composer.
-
-2000-09-18 Dan Winship <danw@helixcode.com>
-
- * main.c (main): Call gnome_vfs_init() since the composer now does
- file operations (to get the MIME type of attachments).
-
-2000-09-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c: Removed COL_ONLINE_STATUS because we don't want
- that. Renamed COL_PRIORITY to COL_SCORE and set it up to sort-of
- work, I'm not really sure which renderer I should use.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added $(EXTRA_GNOME_CFLAGS) and
- $(EXTRA_GNOME_LIBS). Removed unneeded libraries.
-
- * component-factory.c, folder-browser-factory.c, folder-browser.c,
- mail-callbacks.c, mail-config-gui.c, mail-display.c,
- mail-display.h, main.c, message-list.c, message-list.h: Fixed the
- #include lines to deal properly with gal.
-
-2000-09-16 Michael Meeks <michael@helixcode.com>
-
- * Makefile.am (INCLUDES): add datadir
-
- * folder-browser-factory.c (control_activate): use it.
-
-2000-09-15 Dan Winship <danw@helixcode.com>
-
- * mail-callbacks.c (transfer_msg): Revert **Temp fix** from below
- since the relevant shell bug has been fixed now.
-
- * mail-ops.c (do_fetch_mail): Fix the sense of the "keep on
- server" check so we're not doing this backwards. Don't
- get_message_flags, because POP doesn't support it and it's
- pointless anyway since we're setting deleted, not toggling it.
- call camel_folder_sync with expunge=TRUE so that the deletions are
- actually recorded.
-
-2000-09-15 Dan Winship <danw@helixcode.com>
-
- This bug was so much fun to fix the first time that I decided to
- fix it again.
-
- 2000-07-11 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (real_send_mail): Set the post_send_data flag
- rather than toggling it. (Maybe we'll need more control
- over it later, but for now, the only flag we set is
- "replied", and we want that set, not toggled.)
-
-2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (transfer_msg): **Temp fix** Send "" as the
- default folder to select as anything else seems to cause a
- segfault in shell's user_get_folder().
- (check_configured): A spoon full of 'line wrapping' makes the
- medicine go down, the medicine go dowwwwn...
-
-2000-09-14 Iain Holmes <terrorist@gegl.org>
-
- * mail-callbacks.c (check_configured): Ask if you want to
- configure the mail client if it isn't configured already.
- (check_send_configuration): Remove the error box if mail isn't
- configured.
- (send_queued_mail): Same.
-
-2000-09-14 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (setup_append_mail): camel_folder_append is perfectly
- happy to take a NULL info.
-
-2000-09-14 Michael Meeks <michael@helixcode.com>
-
- * folder-browser-factory.c: move fn to bonobo.
- (set_pixmap): update.
- (control_deactivate): add bonobo_ui_handler_unset_container
-
-2000-09-14 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-config-gui.h: Changed the include here because it caused
- make distcheck to fail for me. I changed it from <Evolution.h> to
- "shell/Evolution.h". This seems to have fixed things.
-
-2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Only use the cache if the user plans
- to keep_on_server.
-
-2000-09-14 Michael Meeks <michael@helixcode.com>
-
- * folder-browser-factory.c (control_deactivate): kill
- warning. (control_activate): set threaded toggle state,
- add freeze / thaw.
- (set_pixmap, fill_toolbar, update_pixmaps): update.
-
-2000-09-13 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser-factory.c: Fixed a warning (Missing include
- file.)
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- ($(EVOLUTION_MAIL_CORBA_GENERATED)): Add space after `-I'.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am: Remove `ui.xml' stuff.
-
-2000-09-12 Dan Winship <danw@helixcode.com>
-
- * mail-local-storage.c (mail_local_storage_startup): set
- folder_tree before adding the listener, since that will eventually
- invoke callbacks that will look at it.
-
- * folder-browser-factory.c (control_deactivate): sync the folder
- on deactivate.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * message-list.c (on_right_click): Also display the name of the
- mailing list in the "Filter on Mailing List" item for additional
- Coolness factor.
-
- * mail-autofilter.c (filter_gui_add_for_mailing_list): Create the
- rule with `filter_filter_new()' so that it also has an action
- part.
-
- * mail-mlist-magic.c (get_header): Use the right header name to
- retrieve the header.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * message-list.c (on_right_click): Grey out the mailing list
- filter item if `mail_mlist_magic_detect_list()' returns NULL on
- this message [i.e., if we cannot figure out a mailing list for
- this message].
- (filter_mlist): Good boys don't use F words.
-
- * mail-mlist-magic.c (check_sender): Work safely if
- `header_name_return' or `header_value_return' are NULL.
- (check_x_been_there): Likewise.
- (check_delivered_to): Likewise.
- (check_x_mailing_list): Likewise.
- (check_x_loop): Likewise.
- (get_header): Use the right header name to retrieve the header.
-
- * message-list.c (on_right_click): Mark strings for translation.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c: Use the latest, shiny, amazing TigerT
- art for the toolbar.
-
- * component-factory.c: #include "mail-local-storage.h".
- (owner_set_cb): Removed unused variable.
-
- * message-list.c (filter_sender): Made static.
- (filter_recipient): Likewise.
- (filter_subject): Likewise.
- (vfolder_recipient): Likewise.
- (vfolder_sender): Likewise.
- (vfolder_subject): Likewise.
-
- * mail.h (vfolder_subject): Removed prototype [WTF was this doing
- here?!?!].
- (vfolder_sender): Likewise.
- (vfolder_recipient): Likewise.
- (filter_subject): Likewise.
- (filter_sender): Likewise.
- (filter_recipient): Likewise.
-
- * message-list.c: Added a new "Filter on mailing list" menu item.
- (filter_mlist): Callback for this menu item. Use
- `filter_gui_add_for_mailing_list' to pop up the filter dialog with
- the appropriate rule.
-
- * mail-autofilter.c (filter_gui_add_for_mailing_list): New.
-
- * message-thread.c (dump_tree): Removed unused variable.
-
- * mail-mlist-magic.c: New.
- * mail-mlist-magic.h: New.
-
- * mail-autofilter.c (rule_match_recipients): Mark strings for
- translation.
- (rule_from_message): Likewise.
- (filter_gui_add_from_message): Likewise.
-
-2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Was trying to unhook an event from
- the wrong folder - oops.
-
-2000-09-12 Not Zed <NotZed@HelixCode.com>
-
- * message-thread.c: Reverted to version 1.15.
- (remove_node): Ok, if a node has a parent, remove it from the
- parent list, otherwise remove it from the (supplied) root list.
- (group_root_set): When we merge children, free the lost node.
- (thread_messages_free): Remove the return, run as is.
- (prune_empty): Plugged another small leak.
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (run_filter_ondemand): Updated to use the new
- mail_do_filter_ondemand.
-
- * mail-ops.c (do_fetch_mail): Update to use the new
- filter_driver_run args.
- (do_filter_ondemand): Updated to use the new filter_driver_run
- args.
- (mail_do_filter_ondemand): Take a FilterContext as a argument
- instead of a driver as we need to destroy the filter inside the
- do_filter_ondemand function and things'd get messy.
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Don't have the filter driver
- self_destruct.
-
-2000-09-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): If we're fetching from an mbox
- formatted file then we need to do some special-casing.
-
-2000-09-11 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (owner_set_cb): Call
- `mail_local_storage_startup()' to set up handling of the local
- storage.
-
- * mail-local-storage.c: New.
- * mail-local-storage.h: New.
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-display.c: Fixed some warnings.
-
-2000-09-11 Dan Winship <danw@helixcode.com>
-
- * mail-display.c, mail-format.c: Another big rewrite of this
- stuff. Now all (well, most) attachments get a small icon with a
- description and a (non-obvious) right-click pop-up menu with
- options to save, open in an external program, or show/hide inline.
-
- TODO: antialias the icon, add more options to the pop-up for
- certain MIME types, add an icon to the headers, fix PGP to work
- like everything else, fix message/external-body to work again,
- add some icon caching action, etc, etc.
-
-2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Use the CamelUIDCache so that we
- only retrieve *new* messages and also send notes to the status bar
- telling it which message we're downloading so that Ettore can
- sleep at night ;-)
-
-2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Updated to not send hook/unhook data
- to filter_driver_run as it no longer takes those args.
- (do_filter_ondemand): Same. Also wrap filtering in freeze/thaw to
- prevent signals from being queued up
-
-2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Freeze the default folder before
- filtering and thaw it afterward to prevent a ton of
- "folder_changed" signals from being queued.
-
-2000-09-08 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser.c, mail-config-gui.c, mail-ops.c: Fixed some
- warnings.
-
- * message-list.c: Added base ETableModel functions.
-
-2000-09-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Updated to pass a CamelMessageInfo
- to filter_driver_run
- (do_filter_ondemand): Same.
-
-2000-09-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_filter_ondemand): Updated to check the boolean
- return code from filter_driver_run to find out whether or not the
- message was filtered so that it can decide whether or not to
- delete the message from the source folder or not.
-
-2000-09-07 Jesse Pavel <jpavel@helixcode.com>
-
- * mail-format.c (mail_generate_reply) Changed the behavior of
- Reply-to-All so that the sender's address does not appear in
- the cc: list.
-
-2000-09-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Updated to pass an exception to
- filter_driver_run and also check the exception before deleting the
- message from the source folder.
- (do_filter_ondemand): Updated to pass an exception to
- filter_driver_run
-
-2000-09-07 Dan Winship <danw@helixcode.com>
-
- * session.c (session_init): Pass a storage dir to
- camel_session_new now.
-
- * main.c (main): Can't call session_init here now, because it
- requires evolution_dir to be set.
-
- * component-factory.c (owner_set_cb): call session_init here.
-
- * mail-ops.c (do_fetch_mail): Fix previous fix. (Free the uids,
- just do it correctly.)
-
-2000-09-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (do_fetch_mail): Don't free uids, let the camel
- folder do that when it gets finalized
-
-2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (mail_do_filter_ondemand): New async function to
- filter messages on demand.
- (do_fetch_mail): Updated to filter 1 message at a time using the
- new filter-driver code
-
- * mail-callbacks.c (composer_postpone_cb): Send NULL as the
- message info.
- (run_filter_ondemand): Use mail_do_filter_ondemand instead of
- filter_driver_run
-
- * mail-tools.c: Removed mail_tool_filter_contents_into and
- mail_tool_fetch_mail_into_searchable as they have now been
- deprecated.
-
-2000-09-06 Dan Winship <danw@helixcode.com>
-
- * message-list.c (clear_tree): set the data to NULL for the tree
- root, so nuke_uids won't try to free anything.
-
-2000-09-06 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser.c (folder_browser_new): @shell made const.
- `CORBA_Object_duplicate()' it before storing it.
- (folder_browser_destroy): Free the shell object with
- `CORBA_Object_release()', not `CORBA_free()'.
-
- * folder-browser-factory.c (folder_browser_factory_new_control):
- @shell made const.
-
-2000-09-05 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (make_safe_filename):
- * mail-format.c (handle_mystery):
- * mail-identify.c (mail_identify_mime_part):
- camel_mime_part_get_filename now deals with both
- Content-Disposition and Content-Type.
-
-2000-09-05 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (cleanup_load_folder): Check for NULL folder.
- (mail_do_setup_folder): Copy the 'name' parameter so that
- we can free it.
-
- * message-list.c (nuke_uids): Depth '-1' means "unlimited", not 0.
-
-2000-09-05 Dan Winship <danw@helixcode.com>
-
- * component-factory.c (owner_set_cb): Re-rename "Sent".
-
- * folder-browser.c (fb_resize_cb): Remove the "+ 90" here since it
- seems to break things for me, and it's not commented anyway and
- there's no excuse for adding 90 to a number with no explanation.
-
-2000-09-05 Peter Williams <peterw@helixcode.com>
-
- * folder-browser.c (folder_browser_destroy): Don't free the shell;
- it's not ours.
-
-2000-09-05 Dan Winship <danw@helixcode.com>
-
- * mail-tools.c (mail_tool_move_folder_contents): only call
- camel_folder_get_message_info if the folder has
- summary_capability. Don't hack up a fake CamelMessageInfo:
- append_message will take NULL.
-
- * mail-ops.c: Replace mail_do_setup_draftbox,
- mail_do_setup_outbox, and mail_do_setup_sentbox with
- mail_do_setup_folder.
- (do_send_mail, do_send_queue): s/sentbox_folder/sent_folder/
-
- * component-factory.c (owner_set_cb): Use mail_do_setup_folder,
- rename sentbox_folder to sent_folder, and call
- mail_operation_wait_for_finish after the setup_folder calls in
- case anything needs to use the _folder variables.
-
-2000-09-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Applied Jesse's patch that
- will append a signature to the replied message text
-
- * folder-browser-factory.c: Changed "Send & Receieve" back to "Get
- Mail" temporarily so that the toolbar buttons don't all get
- stretched to some weird proportion
-
-2000-09-03 JP Rosevear <jpr@helixcode.com>
-
- * mail-config.c (mail_config_add_news): Copy the passed in item
- before adding
- (mail_config_add_source): ditto
- (mail_config_add_identity): ditto
-
- * mail-config-gui.c (mail_config): We don't actually need a notebook
- pointer.
- (identities_edit_clicked): Don't explicitly destroy, we are using
- gtk_clist_set_data_full now
- (sources_edit_clicked): ditto
- (news_edit_clicked): ditto
- (mail_config): Use gtk_clist_set_row_data_full to kill leaks
-
-2000-09-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Change the "Get Mail" toolbar button
- to become "Send & Receieve"
-
- * mail-callbacks.c (send_queued_mail): New callback function for
- sending queued mail
- (send_receieve_mail): New callback for Send & Receieve that
- basically just calls send_queued_mail and then fetch_mail
-
- * mail-ops.c (cleanup_send_mail): Mod to be able to handle a NULL
- composer window
- (setup_send_mail): Modified to handle a NULL composer widget
- (mail_do_send_queue): New convenience async function to send all
- messages in a folder (aka all messages in a queue)
-
-2000-09-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-tools.c (mail_tool_move_folder_contents): Since POP3
- doesn't implement get_message_info, we need to check for info to
- be NULL. In this case, we need to make our own info structure to
- pass to append_message and then remember to free it
- afterward. Should we even bother with get_message_info? And if so,
- should we then implement get_message_info for POP3?
-
-2000-09-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser.c (etable_key): Make the `Home' key to move to
- the beginning of the list and `End' to the end of it, using
- `message_list_home()' and `message_list_end()'.
-
- * message-list.c (message_list_home): New.
- (message_list_end): New.
-
- * folder-browser.c (folder_browser_new): Don't ref the shell here.
- (folder_browser_destroy): Don't unref the shell. Instead,
- `CORBA_free()' the object reference.
-
- * folder-browser-factory.c (control_activate): Bind "Open in New
- Window" to `Ctrl-O'.
-
-2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
-
- * mail-config-gui.c: Use e_utf8 wrappers
-
- * main.c (main): Do e_unicode_init, so we are not confusing
- libunicode
-
-2000-09-01 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser.c: Removed a warning.
-
-2000-09-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (compose_msg): Attach a callback to the
- postpone signal
- (send_to_url): Same
- (mail_reply): Same
- (forward_msg): Same
- (composer_postpone_cb): Callback function for the postpone signal
-
- * mail-ops.c (mail_do_setup_outbox): New convenience function to
- load the Outbox folder
- (mail_do_setup_sentbox): Same, but for Sentbox.
- (do_send_mail): Now saves messages in Sentbox if sent successfully
- (mail_do_append_mail): New convenience async function for
- appending messages to a folder
-
- * component-factory.c: Added outbox_folder and sent_folder
- (owner_set_cb): Call our new convenience functions to load Outbox
- and Sentbox
-
-2000-09-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (cleanup_scan_subfolders): Update for the extra arg
- needed by `evolution_storage_new_folder()'.
- * mail-vfolder.c (vfolder_refresh): Likewise.
-
-2000-08-31 Peter Williams <peterw@helixcode.com>
-
- * folder-browser.c (folder_browser_new): Don't ref the shell:
- causes a race upon exit.
- (folder_browser_destroy): Don't unref it.
-
- * mail-config-gui.c (service_page_item_new): Add a checkbutton
- "use default port" to make life simple.
- (service_page_get_url): Honor use_default_port.
- (service_page_set_url): Set use_default_port based on the input
- URL.
- (toggle_port): New function, sets the sensitivity of the
- port entry based on "use default port"
-
- (config_do_query_authtypes): Make this asynchronous, as it
- may involve connecting to a server.
- (service_page_detect): Call the async auth querier.
- (service_page_item_new): Put the authentication stuff in if
- the url_flags have URL_ALLOW_AUTH. Call the async auth querier
- to get the info.
-
-2000-08-30 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-view.c (mail_view_create): Make the HTML widget grab the
- focus.
-
-2000-08-30 Peter Williams <peterw@helixcode.com>
-
- * mail-config-gui.c (do_test_service): Explicitly connect to
- the service again.
-
- * component-factory.c (mail_load_storages): Now that
- camel_service_get_provider exists, use it to make this function
- much simpler.
-
-2000-08-29 Peter Williams <peterw@helixcode.com>
-
- * folder-browser.c (folder_browser_new): Ref the Evolution_Shell.
- Is this correct, or is it a circular reference?
-
-2000-08-29 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (mail_do_send_mail): Update this and related
- functions to no longer take a From address. (The composer deals
- with it itself now.)
- (do_send_mail): Add the Evolution version back to the X-Mailer
- header (this change got lost in the thread migration).
-
- * mail-callbacks.c (composer_send_cb): Don't re-fetch the From
- address. It's set by the composer now. Don't free the
- post_send_data from here.
- (mail_reply): Attach to the composer's destroy signal to free the
- psd. (The current code would free it more than once if an error
- occurred while trying to send the first time.)
-
-2000-08-28 Peter Williams <peterw@helixcode.com>
-
- * mail-config-gui.c (mail_config_apply_clicked): Add new news sources,
- not only stores.
-
-2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (composer_send_cb): Free the from address when
- we're done with it. Also, e_msg_composer_hdrs_get_from returns
- alloc'd memory so don't strdup it.
-
-2000-08-28 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (do_transfer_messages): Add status messages.
- (do_flag_messages): Same.
- (do_scan_subfolders): Same.
- (do_forward_messages): Same.
- (do_view_messages): Same.
-
-2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-view.c (mail_view_create): Use `gnome_app_set_toolbar()'
- the easy way instead of doing things manually with `GnomeDock' and
- `gnome_app_add_toolbar()'.
- (MINIMUM_WIDTH): New #define.
- (MINIMUM_HEIGHT): New #define.
- (view_size_allocate_cb): New, callback for the "size_allocate"
- signal of the mail view. It saves the last allocation in a static
- `last_allocation' variable.
- (mail_view_create): Connect it.
- (set_default_size): New function. Set the default width/height to
- the last allocation width/height; if the width/height is less than
- the `MINIUM_WIDTH' or `MINIMUM_HEIGHT', use that value instead.
-
- * mail-tools.c (mail_tool_move_folder_contents): Show `i + 1', not
- `i', so that we correctlly start counting from one instead of zero.
-
-2000-08-28 Peter Williams <peterw@helixcode.com>
-
- * *.c: s,mail_dialog_run,gnome_dialog_run,g.
-
- * main.c (main): Since only the main thread is dealing with GTK+,
- free the GDK threads mutex and never worry about locking again.
-
-2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-crypto.c (mail_crypto_openpgp_encrypt): Fix to prevent
- possible buffer overflows and a logic fix.
-
-2000-08-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-crypto.c (mail_crypto_openpgp_clearsign): New crypto
- function to clearsign plaintext
-
-2000-08-27 Ariel Rios <ariel@arcavia.com>
-
- * folder-browser-factory.c (control_activate): Added bonobo menu
- handler for mark_all_deleted function.
-
- * mail.h: (mark_all_deleted): Added prototype.
-
- * mail-callbacks.c (mark_all_deleted): Added callback for marking
- all displayed messages in a folder as deleted.
-
-2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-view.c (mail_view_create): Use
- `gtk_window_set_default_size' on the toplevel instead of
- `gtk_widget_set_usize()', and make the default size smaller.
-
-2000-08-25 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-crypto.c: Fixed an uninitialized variable.
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * evolution-mail.gnorba: Kill
-
- * Makefile.am: Remove gnorba related stuff
-
-2000-08-25 Peter Williams <peterw@helixcode.com>
-
- * mail-config-gui.c (service_page_item_new): If the service wants
- a host, also let the user specify a port.
- (MailDialogServicePageItem): Add members for the port GtkEntry and
- the default port.
- (service_page_get_url): Translate the port in the entry back into
- the CamelURL.
- (service_page_set_url): Read in the port from the URL or use
- the default.
-
-2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-crypto.c (mail_crypto_openpgp_encrypt): Implemented PGP 2.x
- encryption. We only need to get the passphrase if we plan to sign
- the text, otherwise we don't need to worry about getting the
- passphrase.
-
-2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
-
- * folder-browser.c: Use e_utf8 wrappers
-
- * mail-config-gui.c: Use e_utf8 wrappers
-
-2000-08-24 Peter Williams <peterw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Add all the
- functions from message-list.c's popup menu to the main
- menu as well
-
- * message-list.c (vfolder_subject): These functions become
- public.
-
- * mail-callbacks.c (mark_all_seen): Don't call camel_folder_get_uids
- here. IMAP, for example, will try to communicate with the IMAP
- server during that call.
-
- * mail-ops.c (cleanup_fetch_mail): Tell the user
- which URL has no new mail, as they may be checking
- more than one source.
- (mail_do_flag_all_messages): New function. Flags all of
- the messages in a folder. Something of a hack. This merely
- extends the flag_messages operation; it doesn't implement
- a new one.
- (do_flag_messages et al): Fetch the uids if we need to;
- use camel_folder_free_uids if necessary, etc.
-
- * mail-tools.c (mail_tool_move_folder_contents): Add
- messages to tell the user what's going on.
-
-2000-08-24 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser-factory.c: Fixed some warnings in the uihandler
- code.
-
-2000-08-24 Peter Williams <peterw@helixcode.com>
-
- * component-factory.c (mail_load_storages): New function.
- Loads a list of URI's as mail storages, and inserts them
- into the shell's folder tree if appropriate (really, only
- puts them into the folder tree.)
- (mail_add_new_storage): Insert a storage into the folder
- tree. Not always appropriate (eg, /var/spool/mail/user is
- a storage that shouldn't be in the folder tree.)
- (create_view): Generate the Evolution_Shell and pass it
- to folder_browser_factor_new_control so that its member
- 'shell' can be set.
- (owner_set_cb): Instead of create_news_storage and
- creating the imap storages, load the news storages and
- mail storages via mail_load_storages().
-
- * folder-browser-factory.c (control_activate): Change to
- use providers_config again instead of mail_config. Pass
- the folderbrowser so that the config code knows where
- to insert the new storages if any are created. Pass
- forget_passwords the folderbriwser, too, for good luck.
- (folder_browser_factory_new_control): Take a new parameter,
- the Evolution_Shell that we belong to. The field in
- FolderBrowser has been there but was never getting set by
- anything, and we need this to be able to insert new storages
- into the shell's folder list.
-
- * folder-browser.c (folder_browser_new): Accept the
- new Evolution_Shell parameter. Set it. (Should we
- ref it or something?)
-
- * mail-config-gui.c (struct MailDruidDialog): Store an
- Evolution_Shell. With this we can insert the stores into
- the shell's folder list.
- (struct MailDialog): Same.
- (service_page_item_changed): Close a leak.
- (identity_dialog): Unswitch the Add/Edit identity titles.
- (news_dialog): Analogous to above.
- (mail_druid_finish): Add the new mail source to the shell
- view.
- (mail_config_druid): Take a new Evolution_Shell parameter
- for later use.
- (mail_config_apply_clicked): Add all the mail sources to
- the shell view.
- (mail_config): Take a new Evolution_Shell parameter.
-
- * mail-callbacks.c (check_configured): Accept a FolderBrowser
- so that we know where to put the new storages if any are
- created. Almost all the callbacks are passed a FB * anyway
- so this isn't a big deal.
- (check_send_configuration): Make sure that we're configured
- enough to be able to send mail. composer_send_cb() used to
- do this, but it would need a FolderBrowser *, and there are
- too many entry points to composer_send_cb to make this
- feasible.
- (fetch_mail): Pass the extra parm to check_configured().
- (free_psd): Move so that composer_send_cb can call this
- directly.
- (composer_send_cb): Don't check for proper configuration
- here -- it is the caller's responsiblity to call
- check_send_configuration(). Call free_psd() directly.
- (compose_msg): Call check_send_configuration().
- (send_to_url): Same. This is called from mail-display.c,
- though, and cannot reasonably be passed a FB. So: we can't
- start up the config dialog directly; the user must do it
- manually. Oh well.
- (mail_reply): Same as above.
- (forward_msg): Same as compose_msg().
- (edit_msg): Same as above.
- (providers_config): Reenable so that we can pass mail_config
- its FolderBrowser.
-
- * mail-display.c (write_data_to_file): Use the much more
- straightforward run_and_close to retrieve the user's answer,
- instead of the reply callback stuff.
-
- * mail-threads.c (mail_dialog_run): New wrapper for
- gnome_dialog_run that will take care of the GDK lock correctly.
- Far far more complicated than it should be.
- (mail_dialog_run_and_close): Analogous to above.
- (read_msg): Set inside_read_msg and unset it for the benefit
- of the two above functions. Don't bracket ourselves in
- GDK_THREADS_ENTER/_LEAVE anymore.
- (mail_operation_queue): Use mail_dialog_run_and_close.
- (show_error): As above.
- (get_password): As above.
-
- * mail-display.c (write_data_to_file): This has the only
- exception to the rule that "use mail_dialog_run(_and_close)
- instead of the gnome equivalent always." Not quite sure why
- it doesn't work here (the file selection window?).
-
- * mail-config-gui.c (identity_dialog): Change to
- mail_dialog_run_and_close.
- (source_dialog): Same as above.
- (news_dialog): Same as above.
- (cleanup_test_service): Same as above.
- (mail_config): Change to mail_dialog_run().
-
- * session.c (mail_request_dialog): Change to
- mail_dialog_run_and_close.
-
- * mail-tools.c (mail_tool_uri_to_folder_noex): As above.
-
- * mail-ops.c (cleanup_fetch_mail): As above.
-
- * mail-local.c (local_reconfigure_folder): As above.
-
- * mail-callbacks.c (check_send_configuration): As above.
- (ask_confirm_for_empty_subject): As above.
- (edit_msg): As above.
- (filter_edit): As above.
-
-2000-08-23 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Reformat a bit,
- make "Folder" appear before "Message", fill in the Message menu
- more.
-
-2000-08-23 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (describe_fetch_mail): Don't use the camel calls
- to describe the operation.
-
-2000-08-22 Peter Williams <peterw@helixcode.com>
-
- * mail-tools.c (mail_tool_get_folder_from_urlname): Don't connect
- to the service explicitly.
- (mail_tool_send_via_transport): Don't connect to the transport
- explicitly.
- (mail_tool_get_root_of_store): Same.
-
- * mail-config-gui.c (do_test_service): Just try camel_session_get_service,
- which will now connect for us.
-
- * message-thread.h: Add a note about *next being the first member
- of struct _container... if it isn't, everything goes Very Wrong.
-
- * message-thread.c (free_container): Extra debug print.
- (remove_node): Handle the case of empty containers holding the child
- that we're interested in.
- (thread_messages_free): Extra debug print.
-
-2000-08-20 Jeremy Wise <jwise@pathwaynet.com>
- * folder-browser.c: (fb_resize_cb) Added function to monitor resize
- of the e_paned in the main view.
-
-2000-08-18 Peter Williams <peterw@helixcode.com>
-
- * mail-tools.c (mail_tool_filter_contents_into): Fix a race. filter_driver_run is an
- async operation so it won't even be started by the time we sync the folders and check
- for the movemailbox to be emtpy. Thus the empty check for the movemail would fail
- 99% of the time.
-
- * mail-callbacks.c (run_filter_ondemand): Pass he new argument to the ever-mushrooming
- filter_driver_run.
-
-2000-08-17 Peter Williams <peterw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Fix menu item names.
- (register_ondemand): Put the ondemand hooks into the new folder menu.
-
-2000-08-17 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-vfolder.c (vfolder_gui_add_rule): Use stock OK/Cancel
- buttons and add i18n support.
-
- * folder-browser-factory.c (control_activate): Changed menu item
- label from "Mark all messages seen" to "Mark All Messages as
- Read". Changed capitalization of some other menu items.
- (control_activate): Put the message- and folder- related menu
- items in new "Message" and "Folder" subtrees which are created in
- the `<Component Placeholder>' item created by the shell.
- (control_deactivate): Updated accordingly.
- (control_activate): Put the filter and vfolder editors, the mail
- configuration and the "forget password" command into the
- "settings" menu.
- (control_deactivate): Updated accordingly.
-
- * mail-config-gui.c (transport_page_new): Add translation mark.
- (service_page_new): Show the menu items before appending them.
- (service_page_item_new): Use `GTK_FILL' for the "Detect supported
- types..." button.
-
- * local-config.glade: Change the apply button into an ok button.
-
-2000-08-17 Peter Williams <peterw@helixcode.com>
-
- Implement filtering on demand.
-
- * folder-browser-factory.c (register_ondemand): New function. Callback
- to put the filter-on-demand filters into the bonobo UIH;
- (create_ondemand_hooks): New function. Read in our on-demand filters
- and hook them into the UI.
- (remove_ondemand_hooks): New function. Remove the hooks when done with
- them.
- (control_activate): Call create_ondemand_hooks()
- (control_deactivate): Call remove_ondemand_hooks();
-
- * mail-callbacks.c (run_filter_ondemand): New function. Callback
- for running a filter on demand.
- (filter_edit): Pass NULLs as the new arguments to rule_context_load.
-
- * mail.h: Prototype run_filter_ondemand();
-
- * folder-browser.c (oc_destroy): New function. Iterator to destroy
- an fb_ondemand_closure.
- (folder_browser_destroy): Free the data associated with the ondemand
- menu items.
- (my_folder_browser_init): Clear the filter_ variables.
-
- * folder-browser.h: Two new members of FolderBrowser: filter_menu_paths,
- a list of fb_ondemand_closures so that the menu items can be freed and
- removed; and filter_context, a permanently loaded FilterContext for
- running the ondemand filters. Prototype the new fb_ondemand_closure
- structure.
-
- * mail-autofilter.c (filter_gui_add_from_message): Pass NULLs as the
- new parameters to rule_context_load (we don't need to hook up ondemand
- menu items...)
-
- * mail-tools.c (mail_tool_filter_get_folder_func): Rename from
- get_folder_func() and make public so mail-callbacks.c:run_filter_ondemand()
- can use it too.
- (mail_tool_filter_contents_into): Use the new name of get_folder_func.
- Pass NULLs as the extra arguments to rule_context_load. Pass the
- extra source type to filter_driver_run (only use INCOMING).
-
- * mail-tools.h: Publicly prototype mail_tool_filter_get_folder_func()
-
- * mail-vfolder.c (vfolder_create_storage): Pass NULLs as the extra
- arguments to rule_context_load.
-
- * message-list.c (message_list_init): Free our strdup'd uids when
- the table model gets destroyed.
- (nuke_uids): New function. Walk the tree nodes to free the uids.
- (nuke_uids_cb): New callback for nuke_uids();
-
-
-2000-08-16 Richard Hult <rhult@hem.passagen.se>
-
- * mail-ops.c (cleanup_display_message): Use a configurable timeout.
-
- * mail-config.c (mail_config_set_mark_as_seen_timeout): New function
- for the settable mark-as-seen timeout.
- (mail_config_mark_as_seen_timeout): Likewise.
- (mail_config_write): Write the timeout setting.
- (config_read): Read timeout setting.
-
- * mail-config-gui.c (mail_config): Add option for the settable
- mark-as-seen timeout.
- (mail_config_apply_clicked): Likewise.
- (timeout_changed): New function for the timeout setting.
-
-2000-08-16 Peter Williams <peterw@helixcode.com>
-
- * message-thread.c (walk_containers): More (default disabled)
- mem debugging here. Fix the big leaks.
-
- * mail-format.c (get_url_for_icon): Copy the url_path so that
- it can't get freed under us.
-
- * mail-threads.c (mail_operation_queue): Fix a leak.
-
- * mail-ops.c (mail_do_display_message): Fix another leak.
-
- * message-list.c (message_list_destroy): Remove the seen_id timeout
- if necessary.
-
- * mail-local.c (mail_tool_local_uri_to_folder): Fix a leak.
-
- * session.c (auth_callback): Fix a leak. Almost seems as if
- I've been using Purify...
-
-
-2000-08-15 Peter Williams <peterw@helixcode.com>
-
- * message-thread.c (alloc_container): Add support for debugging
- container allocations -- currently disabled. Make sure that
- the g_strfreev works.
-
- * message-list.c (main_message_changed): Address bug #496 --
- possible race when forwading a message_changed event.
-
- * mail-threads.c (dispatch): Close the dispatch thread's half of
- pipes when about to exit.
- (mail_operations_terminate): Close the main thread's half of the
- pipes when about to exit.
- (all): Add i18n support.
-
- * mail-tools.c (all): Add i18n support.
-
- * mail-ops.c (transfer_messages): Generalize move_messages into
- transfer_messages so that we can copy too.
- (all): Add i18n supprt where appropriate.
-
- * mail-ops.h: Prototype the new mail_do_transfer_messages.
-
- * folder-browser-factory.c: Add a UI hook for copy_msg.
-
- * mail-callbacks.c (transfer_msg): Generalize move so that it supports
- copy as well, and add a callback 'copy_msg'.
-
- * message-list.c (on_right_click): Add a right-click hook for Copy Message.
-
- * session.c (mail_request_dialog): Don't deadlock when in main thread.
-
-2000-08-14 Peter Williams <peterw@helixcode.com>
-
- * mail-threads.c (show_error): Fix the error dialogs.
- (read_msg): Re-enable them.
-
- * mail-ops.c (do_scan_subfolders): Silence a compile warning.
-
-2000-08-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-crypto.c (mail_crypto_openpgp_encrypt): Added support for
- encrypting via PGP 5.0
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (cleanup_create_folder): Release the listener object
- with `CORBA_Object_release()', not `CORBA_free()'.
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * main.c (main): Set the signal handlers for `SIGSEGV' and
- `SIGBUS' to the default ones.
-
-2000-08-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (mail_config_write): Set config->configured to
- TRUE
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-config-gui.c (mail_config_druid): Don't
- `GDK_THREADS_ENTER()'/`GDK_THREADS_LEAVE()'.
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-threads.c (update_active_views): Just iterate through all
- the controls, not just the active ones.
-
- * folder-browser-factory.c: Don't keep track of active controls.
- Rather, keep track of all of them.
- (folder_browser_factory_get_active_control_list): Removed.
- (folder_browser_factory_get_control_list): New.
-
-2000-08-13 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (evolution_mail_SOURCES): add mail-local.h
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-threads.c (read_msg): For now, don't do anything about
- errors.
-
-2000-08-13 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (add_url): Fix some freed-memory references
-
- * mail-threads.c (get_password): Don't free the prompt. It
- doesn't belong to you.
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (mail_do_create_folder): Duplicate the listener
- object.
- (cleanup_create_folder): Free the listener.
-
-2000-08-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-threads.c (get_password): Don't wrap the gnome_dialog_run
- in GDK_THREADS_ENTER/LEAVE
-
-2000-08-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c (control_destroy_cb): Remove the
- control from the active control list, if it's there.
-
- * mail.h (folder_browser_factory_new_control): Removed prototype.
- (folder_browser_factory_init): Removed prototype.
-
- * folder-browser-factory.h: New.
-
- * folder-browser-factory.c: New static variable `active_controls',
- list of the currently active controls.
- (control_activate): Add the control to it.
- (control_deactivate): Remove the control from it.
- (folder_browser_factory_get_active_control_list): New.
-
- * mail-threads.c (mail_operations_get_status): New function.
-
- * folder-browser.c (folder_browser_gui_init): Add i18n support for
- the labels.
-
- [The following is actually from a patch by Peter Williams
- <peterw@helixcode.com>.]
-
- * Removed types `PERCENTAGE', `HIDE_PBAR', `SHOW_PBAR'. New
- struct `block_info_s'. Removed all the code to create and destroy
- the progress window.
-
-2000-08-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * component-factory.c (create_news_storage): Updated to reflect
- changes to mail_do_scan_subfolders
- (create_imap_storage): Same.
-
- * mail-ops.c (mail_do_scan_subfolders): No longer takes an
- add_INBOX argument
-
-2000-08-13 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (do_scan_subfolders): Lose a reference to the store
- on purpose. To be fixed later.
-
-2000-08-12 Dan Winship <danw@helixcode.com>
-
- * component-factory.c (create_imap_storage): Take the source as a
- command-line argument rather than fetching it from mail-config.
- (owner_set_cb): Call create_imap_storage on each configured IMAP
- store.
-
- * mail-format.c (decode_pgp): Redo this so that the lock icon
- remains active after a failed decryption so you can click on it
- and try again.
- (try_inline_pgp, handle_multipart_encrypted): Put a border around
- the decrypted data.
-
- * message-list.c (cleanup_regenerate_messagelist): Don't clear the
- tree here. If two "folder_changed"s arrive in close succession,
- then one possible ordering of events is
- cleanup_regenerate_messagelist, cleanup_regenerate_messagelist,
- cleanup_thread_messages, cleanup_thread_messages. Which would
- result in the message list being filled in twice without being
- cleared in between. So don't clear it until the rebuilding
- function itself is called.
- (clear_tree): New function to empty out the ETreeModel in the
- message list.
- (build_tree): Change to simpler interface. Call clear_tree.
- (build_subtree): Does most of the work of the old build_tree
- (build_flat): Remove unused arg. Call clear_tree.
-
- * message-thread.c (cleanup_thread_messages): Update for
- build_tree interface change.
-
- * mail-ops.c (do_send_mail): Don't leak the transport.
-
- * mail-tools.c (mail_tool_get_folder_from_urlname): Don't ref the
- store returned from camel_session_get_store. It's already reffed.
- (mail_tool_get_root_of_store): Ditto.
- (mail_tool_send_via_transport): Remove some commented-out code and
- fix it to not leave the transport connected if sending fails.
-
- * mail-callbacks.c (delete_msg): Toggling a flag is an
- "instantaneous" operation, so if we're only doing one, just do it
- and return, rather than queueing it for the other thread. This
- makes the "Delete" key work correctly (move to the next message)
- again.
-
- * mail-identify.c: Remove workaround for gnome-vfs 0.2 bug.
-
- * mail-format.c (lookup_handler): Remove workaround for function
- introduced between gnome-vfs 0.2 and 0.3, since we depend on 0.3
- now.
-
-2000-08-12 Michael Meeks <michael@helixcode.com>
-
- * main.c (main): kill using_oaf assertion.
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * Makefile.am: Make it so that test-mail links
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Move menu items
- that affect a single message together, ditto with ones that
- affect multiple messages, put a separator in.
-
-2000-08-11 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-format.c, mail-tools.h, message-list.c: Fixed a warning.
-
-2000-08-11 Dan Winship <danw@helixcode.com>
-
- * mail-display.c, mail-format.c: Redo this again. Get rid of
- struct mail_format_data and move most of that info into
- MailDisplay itself, and pass the MailDisplay around. Add a GData**
- to MailDisplay, and put the urls hash table into that. Also add
- the ability to redisplay the currently-displayed message (with the
- same GData**), and add a "show_pgp" datum to it that controls
- whether or not to decrypt PGP messages, and redo the PGP stuff
- (again) to take that into account. Now you don't get the annoying
- PGP password dialog box without any warning.
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * mail-config-gui.c (service_acceptable): Make verify-service
- an asynchronous operation.
-
- * Makefile.am (noinst_PROGRAMS): Don't build test-thread
- while mail-threads.c is in flux.
-
- * mail-threads.c (mail_operation_queue): Make the error
- and query dialogs modal.
-
- * mail-local.c (update_progress): Don't use the
- temporarily-disabled mail_op_set_percentage().
-
-2000-08-11 Chris Toshok <toshok@helixcode.com>
-
- * mail-config.c (mail_config_get_default_news): use config->news
- instead of config->sources.
-
-2000-08-11 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (destroy_part): Update this for CamelObject
- (try_inline_pgp): Deal with decrypting here rather than trying to
- pawn the data off to handle_multipart_encrypted, since it most
- likely won't be correct (won't have the proper MIME headers inside
- the encrypted part).
- (handle_multipart_encrypted): Add code from Nathan Thompson-Amato
- to re-MIME-parse the decrypted data after decrypting.
-
- * mail-crypto.c (mail_crypto_openpgp_{de,en}crypt): Get the
- password here rather than having it passed in. Remove some dead
- code.
-
- * session.c (mail_request_dialog): Allow this to work in either a
- sync or an async context.
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * mail-tools.c (mail_tool_fetch_mail_into_searchable): Don't
- do the imap check here... it's a silly place.
-
- * mail-ops.c (do_fetch_mail): Do the imap check here.
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * mail-config-gui.c (service_page_new): Work around
- gtk option menu bug.
- (service_page_item_auth_fill): ditto
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * mail-threads.c (read_msg): Fix the new FORWARD_EVENT handler
- (didn't free msg, didn't write newline in the debug)
-
- * mail-local.c (local_reconfigure_folder): Make the dialog
- modal.
-
- * mail-callbacks.c (select_first_unread): Fix some warnings.
-
- * mail-threads.c (mail_op_forward_event): New function that
- writes a FORWARD_EVENT signal to the compipe, to allow Camel
- events to be handled in the main thread.
- (read_msg): Handle a FORWARD_EVENT.
-
- * mail-callbacks.c (select_first_unread): Forward the
- event into the main thread to prevent the GTK calls in the
- dispatcher thread.
- (main_select_first_unread): New name of old select_first_unread.
-
- * message-list.c (folder_changed): Same as above.
- (main_folder_changed): Same as above.
- (message_changed): Same as above.
- (main_message_changed): Same as above.
-
- * mail-format.c (free_byte_array): Note about using
- mail_op_forward_event. (cmm_destroyed): Same.
-
-2000-08-11 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_list_select): If the caller passes "-1"
- for the model row, translate that to view row 0.
-
- * message-list.c (idle_select_row):
- * mail-callbacks.c (select_first_unread): Use new
- message_list_select kludge^H^H^H^H^H^Hfeature
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * mail-config-gui.c (source_dialog): Allow the window
- to be growable
-
- * mail-config.c: use void in empty declarations
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * mail-config.c (mail_config_get_news): Change () to (void)
- if a function takes no arguments.
-
- * mail-config.h: Prototype mail_config_get_{sources,news}x
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * mail-config-gui.c (identity_dialog): iddialog, not sdialog
- (news_edit_clicked): Kill leftover c-p crud
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * mail-config-gui.c (news_edit_clicked): Check nrow, not srow.
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * mail-config-gui.c (service_acceptable): Use camel_object_unref
- instead of gtk_object_unref
- (mail_druid_finish): Use new config accessors
- (mail_config_druid): No need to call config functions
- (news_add_clicked): Increments maxnrow, not maxsrow
- (mail_config_apply_clicked): Use new config accessors
- (mail_config): ditto
-
- * component-factory.c (create_imap_storage): Use new
- config accessors
- (create_news_storage): ditto
-
- * mail-config.glade: Set news clist name correctly
-
- * mail-config.c (config_read): Rename from mail_config_read and
- made private - no one should need to do a read manually.
- (mail_config_set_send_html): New accessor
- (mail_config_add_identity): ditto
- (mail_config_get_sources): ditto
- (mail_config_add_source): ditto
- (mail_config_get_default_news): ditto
- (mail_config_get_news): ditto
- (mail_config_add_news): ditto
-
- * mail-config.h: Prototype new accessors. Config struct is now
- in mail-config.c and hidden from the world.
-
-2000-08-11 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (describe_fetch_mail): Use camel_service_get_name
- rather than showing the URL to the user.
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (do_refile_messages): Freeze the folders while moving.
- (do_flag_messages): Same.
-
- * mail-threads.c (get_password_clicked): Fix the case when the
- user /doesn't/ use escape to cancel the dialog :-/
- (show_error_clicked): Same.
-
-2000-08-11 Dan Winship <danw@helixcode.com>
-
- * mail-tools.c (mail_tool_get_folder_name): Add a function to
- return a useful name for a folder (not just "mbox" or "mh" for
- any local folder.)
-
- * mail-ops.c: Use mail_tool_get_folder_name rather than
- folder->full_name when printing folder names.
-
-2000-08-11 Not Zed <NotZed@HelixCode.com>
-
- * mail-tools.c (mail_tool_get_local_inbox_url): Properly handle
- different local file formats. The folder isn't always mbox.
- (mail_tool_do_movemail): Movemail always uses an mbox format
- however.
- (mail_tool_get_local_movemail_url): What is the mbox url, it is
- always the same type, mbox.
- (mail_tool_fetch_mail_into_searchable): Same here.
-
- * mail-local.c (mail_local_map_uri): Map a local uri to the real uri.
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser-factory.c, message-list.c, message-thread.c,
- session.c: Fixed some warnings.
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * session.c (session_init): Don't call e_setup_base_dir. It was
- wrong and it doesn't exist any more.
-
- * component-factory.c (owner_set_cb): Update for changed
- prototype, and record the evolution_homedir. Move call to
- mail_config_init here from session.c so it happens after
- evolution_dir is initialized.
-
- * mail.h: define "extern char *evolution_dir;" (formerly in
- e-util/e-setup.h)
-
- * component-factory.c, mail-callbacks.c, mail-config-gui.c,
- mail-config.c, mail-display.c, mail-format.c, mail-ops.c,
- mail-tools.c, session.c: Remove "e-util/e-setup.h" include.
-
-2000-08-10 Peter Williams <peterw@helixcode.com>
-
- * test-thread.c (queue_ops): Use mail_operations_terminate() to
- close the other thread nicely.
-
- * mail-threads.c (get_password_deleted): Handle the "close" event
- as a cancel.
- (show_error): Same.
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * mail-tools.c (mail_tool_get_folder_from_urlname): Add a
- "gboolean create" argument to pass to camel_store_get_folder.
-
- * mail-ops.c (do_create_folder, do_setup_draftbox):
- * mail-local.c (mail_tool_local_uri_to_folder):
- * mail-vfolder.c (vfolder_uri_to_folder): Add create flag to
- mail_tool_get_folder_from_urlname calls.
-
-2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-callbacks.c (composer_send_cb): Fix compile warning by
- casting the object to a CamelObject
-
-2000-08-10 Peter Williams <peterw@helixcode.com>
-
- * mail-tools.c (mail_tool_filter_contents_into): Delete the source
- folder if told to and if it's empty
- (mail_tool_get_local_movemail_path): New function.
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * mail-callbacks.c (reply_to_all): Fix a bug in the async changes.
- (This was identical to reply_to_sender.)
-
-2000-08-10 Not Zed <NotZed@HelixCode.com>
-
- * mail-local.c (do_local_reconfigure_folder): Update for
- append_message api change.
-
- * message-list.c (message_list_regenerate): Change for search api
- change.
- (ml_tree_value_at): Add a colour column, based on the colour
- assigned in the summary.
- (message_list_init_renderers): Init colour column.
-
-2000-08-09 Peter Williams <peterw@helixcode.com>
-
- * mail-display.c (part_for_url): Remove a gtk_object_get_data
-
-2000-08-09 Cody Russell <bratsche@gnome.org>
-
- * folder-browser-factory.c, mail-view.c: Make the toolbars
- honor the user's gnomecc settings for detachable toolbars.
-
-2000-08-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (composer_send_cb): Get the from address set in the
- composer, if that fails ONLY THEN get the default from mail config
-
- * mail-config.c (mail_config_get_identities): New convenience
- function for getting a list of the configured identities
-
-2000-08-09 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (on_object_requested): Support controls as well
- as embeddables.
-
-2000-08-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-view.c (mail_view_create): Changed to only take a
- FolderBrowser argument
-
- * mail-ops.c (real_view_msg): Create a new FolderBrowser for each
- message being opened in a new window. Also set the
- message_list->cursor_uid and mail_display->current_message to the
- appropriate values.
- (real_view_msg): Updated to reflect changes in the mail_view_create
-
- * message-list.c (on_right_click): Nicify a little, add in a menu
- separator between VFolder and Filter stuff.
-
- * mail-ops.c (real_view_msg): Set the UID of the message that is
- being displayed
-
-2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Use
- `GNOME_STOCK_MENU_*' things instead of `GNOME_STOCK_PIXMAP_*'
- things, that are too big and look bad.
-
-2000-08-09 Peter Williams <peterw@helixcode.com>
-
- * mail-view.c (mail_view_create): Save the top window so that on_close
- can find it [with set_data].
- (on_close): Recover the top window.
-
- * mail-threads.c (read_msg): Destroy the window instead of hiding it.
-
-2000-08-09 Not Zed <NotZed@HelixCode.com>
-
- * mail-autofilter.c (filter_gui_add_from_message): Helper function
- to add with confirm.
- (rule_match_recipients): Dont set real name if its empty for the
- filter name.
- (rule_match_subject): was cutting ] off mailing list names.
-
- * message-list.c (on_right_click): Added menu to install
- vfolders/filters from message.
-
-2000-08-09 Not Zed <NotZed@HelixCode.com>
-
- * mail-autofilter.c: New file to hold auto filter/vfolder stuff.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-display.c, mail-format.c, mail-ops.c: Fixed some warnings.
-
- * message-list.c: Fix the call to e_popup_menu_run to match the
- new signature.
-
-2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Create a "print
- message" menu item.
-
-2000-08-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (message_list_init): Attached a double_click
- signal handler
- (on_double_click): Our lovely new double_click callback. Will
- display the current selected message in a new window
-
-2000-08-08 Jeremy Wise <jwise@pathwaynet.com>
- * mail-config.[ch], folder-browser.c: Added configuration work to
- save the size of the vpaned widget. It will be functional when the
- e_paned widget emits a "resized" signal
-
-2000-08-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.h: Added void as an argument to functions not
- needing any parameters to avoid compile warnings.
-
-2000-08-08 Jeremy Wise <jwise@pathwaynet.com>
- * mail-config.[ch], main.c, folder-browser-factory.c: State of the
- threaded list toggle is now saved via gnome_config
-
-2000-08-08 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c (service_page_item_new): Attach a signal
- handler to call the "changed" function when the user clicks the
- "keep on server" checkbox.
-
-2000-08-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (view_msg): New convenience function with params of a
- normal Gtk callback function. We also now create a new
- FolderBrowser object so that the message-view window isn't tied to
- the display in the main window
- (view_message): Now calls view_msg (this function is a bonobo
- callback and can't be used with gtk widgets)
- (edit_msg): Same idea as view_msg()
- (edit_message): Again, same as view_message()
-
- * message-list.c (on_right_click): Callback for creating an
- e-popup-menu
- (message_list_init): Added a right_click event to trigger a pop-up
- menu to be displayed
-
-2000-08-08 Dan Winship <danw@helixcode.com>
-
- * mail-config-gui.c: Add "Don't delete messages from server"
- button to remote SOURCEs that aren't STORAGEs (ie, POP).
- (provider_list): Only list SOURCEs. (ie, not mh)
-
- * mail-config.c: Save/load "keep_on_server" flag.
-
- * mail-ops.c (fetch_remote_mail): New function, split out of
- real_fetch_mail. Deals with copying mail from a remote server into
- a temporary mbox, possibly using a CamelUIDCache to leave the
- messages on the server.
-
- * mail-crypto.c, mail-format.c, message-thread.c: Fix some
- compiler warnings.
-
- * mail-format.c (mail_generate_reply): Fix up format of addresses.
- (write_headers): Use CamelAddress functions to simplify this.
-
-2000-08-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-view.c: Lets get rid of the last separator in the toolbar
- until we add n/p
-
-2000-08-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-threads.c (queue_window_delete_event_cb): Callback for
- "delete_event", just doing nothing.
- (create_queue_window): Connect it to the "delete_event" signal of
- the progress dialog.
-
-2000-08-08 Peter Williams <peterw@helixcode.com>
-
- * mail-threads.c (remove_next_pending): Sanity check for
- job queue, which seems to have some issues.
- (read_msg): Make sure that the next operation isn't started
- before the last one is cleaned up.
-
- * mail-callbacks.c (fetch_mail): Fix erroneous free.
-
- * mail-config-gui.c (mail_config_druid): Wrap the gtk_main call.
-
- * mail-ops.c (do_flag_messages): Allow specification of whether
- to set the flags unconditionally or toggle their current state.
-
- * message-list.c (ml_tree_set_value_at): Toggle the seen status;
- don't set it unconditionally.
-
- * mail-callbacks.c (delete_msg): Toggle the deletion status;
- don't set it unconditionally.
-
- * mail-tools.c (mail_tool_do_movemail): Fix for undeclared tmpfd.
-
- * mail-local.c (local_reconfigure_folder): Big rewrite; make into
- an asynchronous operation. Use some mail tools to make life easy.
-
-2000-08-08 Dan Winship <danw@helixcode.com>
-
- * main.c (main): Move mail_config_init after session_init, since
- it depends on evolution_dir being set.
-
-2000-08-08 JP Rosevear <jpr@helixcode.com>
-
- * mail-ops.c (check_configured): Use config accessors
- (fetch_mail): ditto
- (composer_send_cb): ditto
- (create_msg_composer): ditto
-
- * mail-config-gui.h: Update API
-
- * mail-config.h: Update API
-
- * mail-config.c: Add accessor functions
- (mail_config_is_configured): accessor function
- (mail_config_get_default_identity): ditto
- (mail_config_get_default_source): ditto
- (mail_config_get_transport): ditto
- (mail_config_send_html): ditto
- (identity_copy): Make public
- (identity_destroy): ditto
- (identity_destroy_each): ditto
- (service_copy): ditto
- (service_destroy): ditto
- (service_destroy_each): ditto
- (mail_config_init): Rename from init_config and make public
- (mail_config_clear): Rename from clear_config and make public
- (mail_config_read): Rename from read_config and make public
- (mail_config_write): Reanme from write_config and make public
-
- * main.c (main): Call mail_config_init.
-
- * mail.h: Include mail-config-gui.h
-
- * mail-config-gui.c: Move config gui stuff here.
- (source_dialog): Kill memory leak from debug leftovers.
- Make sure returned source is NULL by default
-
-2000-08-07 Not Zed <NotZed@HelixCode.com>
-
- * mail-local.c (local_reconfigure_folder): Redone to show a
- dialogue first, and show progress of whats happening as its done.
-
- * Makefile.am (glade_DATA): Added local-config.glade, for mailbox
- reconfig dialogue.
-
-2000-08-04 Not Zed <NotZed@HelixCode.com>
-
- * folder-browser.c (mail_uri_to_folder): Use local_uri_to_folder()
- for local uri's (file://).
-
- * mail-local.c (local_uri_to_folder): Handle looking up folder
- storage type before opening the store/folder.
- (local_reconfigure_folder): Function to reconfigure the format of
- a local mailbox into another storage format.
-
- * Makefile.am (evolution_mail_SOURCES): Added mail-local.c and
- missing mail-vfolder.h.
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * Makefile.am: Added mail-view.c
-
- * folder-browser-factory.c (control_activate): Adda menu item for
- viewing the message
-
- * mail-view.c: New file containing methods for viewing messages in
- separate windows
-
- * mail-ops.c (view_message): New callback for viewing messages in
- a new window.
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * component-factory.c (real_create_generic_storage): New function
- to replace real_create_imap_storage and real_create_news_storage
- (create_imap_storage): Updated.
- (create_news_storage): Updated.
-
-2000-08-07 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (cleanup_edit_messages): New operation: edit_messages
- For continuing draft messages.
- (attach_messages): Fix accidental 0 datasize.
- (do_setup_draftbox): New operation: setup_draftbox. Soooo hacky.
-
- * mail-callbacks.c: Move fejj's edit message to the async home.
-
- * component-factory.c (owner_set_cb): Use mail_do_setup_draftbox.
-
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-display.c:
- * component-factory.c: s/strncasecmp/g_strncasecmp
-
- * mail-format.c (write_headers): Get rid of kludge around subject
- beginning with spaces.
- (mail_generate_reply): Get rid of kludge around subject beginning
- with spaces and also use g_strncasecmp instead of strncasecmp for
- portability
-
- * mail-ops.c (forward_msg): Get rid of kludges around subject
- beginning with spaces.
-
-2000-08-07 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_list_select): Clarify that the input row
- is a model row, and swap it to a view row when finding the
- next/previous row.
- (idle_select_row): Select view row 0, not model row 0.
-
- * mail-ops.c (select_first_unread): Start from view row 0, not
- model row 0.
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-format.c (mail_get_message_body): Renamed from reply_body()
- so other functions can use it
- (mail_generate_reply): Updated to reflect function name changes
-
- * mail-ops.c (real_edit_msg): Attach a callback to the send signal
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c (control_activate): New menu item under
- Actions to allow editing of messages.
-
- * mail-ops.c (edit_message): New function for editing messages.
-
- * component-factory.c (owner_set_cb): Create a global reference to
- the Drafts mbox folder for the Composer to use
-
-2000-08-06 JP Rosevear <jpr@helixcode.com>
-
- * mail-config.c (ndialog_page_undone): Desensitize ok button
- (sdialog_page_undone): ditto
- (iddialog_page_undone): ditto
- (news_page_new): Typo - news, not mail
- (transport_page_new): Typo - transport, not source
- (identity_dialog): Set undone callback
- (source_dialog): ditto
- (news_dialog): ditto
- (mail_druid_identity_undone): Desensitize next button and
- mark done flag as false
- (mail_druid_source_undone): ditto
- (mail_druid_transport_undone): ditto
- (mail_druid_identity_done): Mark done flag as true
- (mail_druid_source_done): ditto
- (mail_druid_transport_done): ditto
- (mail_druid_prepare): Use done flag to set next button
- sensitivity, fixes #467
-
-2000-08-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-crypto.c (mail_crypto_openpgp_encrypt): Added support for
- encrypting with GnuPG. Support for PGP5 and PGP2 are still in
- progress.
-
-2000-08-05 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Remove bonobo 0.15
- vs 0.15-and-a-half ifdef, since we require post-0.16 now.
-
-2000-08-04 Dan Winship <danw@helixcode.com>
-
- * mail-threads.c (mail_operation_wait_for_finish): Don't use
- "while (gtk_events_pending ()) gtk_main_iteration ();" inside
- another tight loop, because it makes the thread spin rather than
- blocking and waiting like it should.
-
-2000-08-04 Peter Williams <peterw@helixcode.com>
-
- * message-thread.c (do_thread_messages): Uninitialized variable
- fix.
-
- * mail-threads.c (read_msg): Small leak fix.
-
- * component-factory.c (owner_unset_cb): Use mail_operations_
- terminate() instead of wait_for_finish().
-
- * mail-threads.c (mail_operation_queue): Centralize the clur
- handling functions; fix a race condition where the dispatcher
- would overwrite the closure before the main thread could
- free the old one.
- (mail_operations_terminate): New function, wait for ops to
- finished and kill the other thread.
- (dispatch): changes to die when terminate is called (abort
- on NULL spec).
-
- * mail-ops.c (cleanup_display_message): Fix improper handling
- of displaying a NULL message (which means clear the message
- display).
-
-2000-08-04 Ettore Perazzoli <ettore@helixcode.com>
-
- * message-list.c (message_list_regenerate): Free the GPtrArray
- correctly instead of using `g_strfreev()'.
-
-2000-08-04 Michael Meeks <michael@helixcode.com>
-
- * folder-browser-factory.c (control_activate): release the ui_handler
- after set_container.
-
-2000-08-03 Michael Meeks <michael@helixcode.com>
-
- * mail-config.c (identity_page_new): only whack the sig in if the
- file exists.
-
- * component-factory.c (factory_fn): count running instances,
- attach destroy signal (factory_destroy): add.
-
- * main.c (main): pass orb around.
-
-2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (composer_send_cb): Yay, no more compiler warnings
-
- * mail-config.c: set config = NULL
- (provider_list) Eek! Initialize news to NULL! Also, use
- g_slist_prepend() for "performance" gains ;-)
- (init_config): Set the config member data to NULL just to be on
- the safe side
- (clear_config): Don't bother freeing slist data if the slist is
- NULL
-
-2000-08-03 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (op_forward_messages): Use the new dynamic
- operation naming.
-
- * message-thread.c (describe_thread_messages): Ditto.
-
- * message-list.c (describe_regenerate_messagelist): Ditto.
-
- * mail-threads.c (get_password_clicked): Dynamic generation
- of descriptive text for mail operations. "Opening a folder" ->
- "Opening INBOX". Supported only so far, will be implemented
- quickly.
- g_strdup() the old_message when changing the queue_window_label's
- text.
-
- * main.c (main): One more gconf reference to take out...
-
- * mail-ops.c (composer_send_cb): Check for an identity before
- sending.
-
-2000-08-03 JP Rosevear <jpr@helixcode.com>
-
- * mail-config.glade: Increase window size slightly, rename
- "Transport" to "Mail Transport"
-
- * mail-config.c (init_config): Remove gconf references
- (clear_config): ditto
- (read_config): ditto
- (write_config): ditto
- (mail_config): Null provider lists before filling them
- (mail_config_druid): ditto
- (identity_page_new): Increase spacing of vbox
- (service_page_new): ditto
-
- * Makefile.am: Remove gconf references.
-
-2000-08-02 Dan Winship <danw@helixcode.com>
-
- * mail-config.c (service_page_item_new): Make the "test settings"
- button FILL rather than SHRINK so it doesn't end up oddly-placed.
-
- * mail-config-druid.glade: Make the icon background dark blue
- like the surrounding area.
-
-2000-08-02 Peter Williams <peterw@helixcode.com>
-
- * component-factory.c (owner_unset_cb): Wait for async operations
- to finish before exiting.
-
-2000-08-02 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-ops.c, message-list.c: Emit "model_pre_change" where
- appropriate.
-
-2000-08-02 Peter Williams <peterw@helixcode.com>
-
- * mail-config.h: #ifdef _MAIL_CONFIG_H protect the header.
-
-2000-08-01 Peter Williams <peterw@helixcode.com>
-
- * mail-threads.c: Implement Solaris threads. Attempt
- to join to the thread upon exit -- hopefully prevents
- all those nasty zombie processes from popping up :-(
-
-2000-08-01 Dan Winship <danw@helixcode.com>
-
- * mail-crypto.c: New code to spawn off GPG/PGP to do stuff.
- Currently only deals with decryption. From Nathan Thompson-Amato
- <ndt@jps.net>, with bunches of changes from me.
-
- * session.c (mail_request_dialog): Expose the password dialog to
- the rest of the app (for use by the GPG/PGP code).
-
- * mail-format.c (handle_text_plain): Handle special inline data
- types. (Currently uuencoding, BinHex, and PGP encryption.) This is
- not the best way to deal with it, but it works for now.
- (try_inline_pgp): Convert an inline PGP-encrypted message into a
- multipart/encrypted part.
- (try_inline_binhex): Convert an inline BinHex attachment into an
- application/mac-binhex40 part (which we currently don't deal
- with...)
- (try_uudecoding): Convert a uuencoded attachment to an
- application/octet-stream part.
- (handle_multipart_encrypted): Deal with RFC2015 MIME-encoded PGP
- encrypted messages. (From ndt.)
-
- * mail-display.c (mail_text_write, mail_error_write): New utility
- functions.
-
- * Makefile.am (evolution_mail_SOURCES): add mail-crypto.c
-
-2000-07-31 Christopher James Lahey <clahey@helixcode.com>
-
- * component-factory.c, folder-browser.c: Fixed some warnings.
-
- * message-list.c: Made the icon column non sortable.
-
-2000-07-31 Dan Winship <danw@helixcode.com>
-
- * mail-config.c (service_page_set_url): Fix a NULL-pointer strcmp
- noticed by peterw.
-
-2000-07-31 Not Zed <NotZed@HelixCode.com>
-
- * mail-vfolder.h: Header for vfolder functions.
-
- * folder-browser.c (mail_uri_to_folder): Use new scheme to open
- vfolders.
- (search_save): New button/function to save a search as a vfolder.
-
- * mail-vfolder.c (vfolder_edit): Made asynchronous.
- (vfolder_uri_to_folder): New function for loading vfolders and
- setting up their source folders.
- (vfolder_refresh): Change shell vfolder uri's to indirect
- references rather than the real vfolder uri.
- (vfolder_gui_add_rule): Add a rule with user confirmation.
- (vfolder_create_part): Get a new part by name, for creating rules
- in code.
-
- * message-thread.c (thread_messages): Check for uid lookup
- failure, which indicates an error in the folder or calling code.
-
-2000-07-29 Not Zed <NotZed@HelixCode.com>
-
- * component-factory.c (create_view): Remove hack to pass the
- storage around.
-
- * folder-browser-factory.c (control_activate): Changed to call
- renamed vfolder editor.
-
- * mail-ops.c (vfolder_edit_vfolders): renamed from vfolder_edit,
- call new edit function.
- (vfolder_editor_clicked): Removed.
- (filter_druid_clicked):
- (filter_edit): Updated for api change.
- (real_fetch_mail): Fixed up for api change and fucked up indent.
- (filter_get_folder): callback for filter driver.
-
- * mail-vfolder.c: New file to manage virtual folders.
-
-2000-07-29 JP Rosevear <jpr@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Use new mail config stuff
-
- * component-factory.c (create_imap_storage): Use new mail config
- stuff
- (create_news_storage): ditto
-
- * evolution-mail.schemas: Gconf schema for evolution mail
-
- * mail-config-druid.glade: Gladification of config druid
-
- * mail-config.h: New header with config structs.
-
- * mail-config.c: Rewrite of GUI configuration tools to use
- new config structs. Stores multiple identities and sources now.
- Still only uses the first one found.
- (mail_config_fetch): Returns MailConfig struct to caller
- for configuration queries.
- (mail_config): Renamed function to show mail config dialog.
- (mail_config_druid): Renamed function to show mail config druid.
-
- * mail-ops.c (create_msg_composer): Use
- e_msg_composer_new_with_sig_file and new config stuff
- (check_configured): Use new config stuff
- (fetch_mail): ditto
- (composer_send_cb): ditto
-
-2000-07-28 Cody Russell <bratsche@gnome.org>
- * mail-ops.c, mail.h: Added mark_all_seen(), to mark every
- message in the list with CAMEL_MESSAGE_SEEN.
-
- * folder-browser-factory.c: Added "Actions/Mark all seen".
-
-2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c: Lets fix Dan's kludge the Right Way (tm)
- (set_service_url): Only strip off the leading "/" from the
- url->path if url->host is NULL
- (get_service_url): Only prepend a leading "/" to the path if the
- host is NULL
-
-2000-07-27 Dan Winship <danw@helixcode.com>
-
- * mail-config.c (get_service_url): toss in a kludge to deal with
- the IMAP vs mbox path problem for now.
-
-2000-07-26 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, message-list.h: Removed counting of selected
- messages.
-
-2000-07-26 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Don't create the tmp_mbox before
- calling movemail, because the external movemail requires it to not
- exist. Contrariwise, delete it in the cleanup code if it's empty.
- Update for camel_movemail interface change. Do the "No new
- messages" dialog in the mbox case as well as the remote mail
- issue.
-
-2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c: s/struct refile_data/struct move_data
- (real_move_msg): Renamed from real_refile_msg()
- (move_msg): Renamed from refile_msg()
-
- * folder-browser-factory.c: Changed Refile to Move.
-
-2000-07-26 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (lookup_handler): Update for OAF and for external
- apps as well as components.
- (handle_via_external): Handler to set up for data that can be
- displayed by an external application.
-
- * mail-display.c (on_link_clicked, etc): Refactor the save_data()
- code and add launch_external() as a handler for
- x-evolution-external URLs.
- (embeddable_destroy_cb): Remove this, since it seems like it's all
- wrong.
- (on_object_requested): Update for OAF, and fix some bugs.
-
-2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (get_service_url): Always prepend a leading "/" to
- the url->path.
- (set_service_url): Added more error checking and also strip the
- leading '/' from the url->path
- (create_identity_page): Set the signature file to the one specified in
- the identity record, else set the default path to ~/.sugnature
-
-2000-07-25 Michael Meeks <michael@helixcode.com>
-
- * mail-config.c (create_identity_page): set default signature to
- ~/.signature
-
-2000-07-25 Peter Williams <peterw@helixcode.com>
-
- * mail-ops.c (reply): Check for the case of fb->mail_display->
- current_message = NULL, which shouldn't happen, but has happened
- to me.
-
-2000-07-25 Dan Winship <danw@helixcode.com>
-
- * message-thread.c (group_root_set): Don't group together messages
- with the same non-Re: subject and no References/In-Reply-To. More
- often than not, they're unrelated. (eg, "[No subject]".)
- (thread_messages): Handle messages with no Message-Id. "This
- shouldn't happen", but it does sometimes, and it's not much code
- to make it just work.
-
-2000-07-25 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-config.c (create_service_page): Call
- `gtk_option_menu_set_menu()' as the last thing, as `GtkOptionMenu'
- is fscking broken. Also, `gtk_widget_show()' the individual menu
- items.
-
-2000-07-24 Dan Winship <danw@helixcode.com>
-
- * message-list.c (mark_msg_seen, ml_tree_set_value_at,
- message_list_regenerate): Update for CamelFolder API changes.
- (Certain functions no longer take a CamelException.)
-
- * mail-ops.c (real_fetch_mail, real_send_mail, real_delete_msg):
- ditto
-
- * component-factory.c (real_create_imap_storage,
- real_create_news_storage): ditto
-
-2000-07-24 Dan Winship <danw@helixcode.com>
-
- * component-factory.c, folder-browser-factory.c, test-mail.c:
- Remove GOAD support.
-
- * main.c: Remove GOAD support.
- (main): More "guess the build mistake" fun, this time for the
- failure to initialize Bonobo case.
-
-2000-07-24 Peter Williams <peterw@helixcode.com>
-
- * mail-tools.c (mail_tool_set_uid_flags): Change
- function to faithfully pass parameters to
- camel_folder_set_message_flags; this function is
- somewhat useless now. Other files synced with
- API change.
-
- * mail-ops.c (op_display_message): Change "display
- a message" into "retrieve a messsage" in the
- description of mail_op_display_message.
-
- * mail-threads.c (display_timeout): New function.
- Only display the progress dialog if the operation
- takes more than a second to perform.
- (hide_queue_window): New function. Hide the queue
- window as an idle function... I'm thinking maybe
- the problem with hiding it was due to us not
- being in a GTK event sequence? Perhaps it's only
- the timeout, which was not being cancelled, which
- is now.
-
- * message-list.c (get_message_uid): New function,
- copy of get_message_info, except gets only the
- UID, as that's all that most functions want, and
- we avoid a Camel call.
-
-2000-07-23 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (create_message_composer): New.
- (compose_msg): Use it.
- (send_to_url): Likewise.
- (forward_msg): Likewise.
-
- * folder-browser-factory.c (control_activate): Use `_()' instead
- of `N_()'.
-
-2000-07-21 Peter Williams <peterw@helixcode.com>
-
- * message-thread.c (setup_thread_messages): New
- operation: thread_messages, simple wrapper around
- thread_messages () and thread_messages_free();
-
- * message-list.c (cleanup_regenerate_messagelist):
- Use new thread_messages operation instead of just
- calling ... thread_messages :-)
-
- * folder-browser.c (folder_browser_destroy): Use new
- sync_folder operation instead of calling camel_folder_sync
- directly.
-
- * component-factory.c (create_folder): Changed to use
- new create_folder operation.
-
- * mail-ops.c (mail_do_create_folder): New operation: create
- folder. New operation: sync folder.
-
- * mail-format.c (cmm_destroyed): Remove the url hashtable from
- the larger hashtable when it gets destroyed.
-
- * mail-callbacks.c (fetch_mail): Pass a hook function and data
- down the chain to pick up the folder_changed and change the view.
-
- * mail-ops.c: Rename from mail-ops-new.c now that it's a little more
- solid.
- (fetch_mail): Add new options to hook and unhook an event while the
- filter driver runs. A hack, but all of the operations are to some
- extent.
- (cleanup_fetch_mail): Unref the destination folder if not NULL.
- * mail-tools.c (mail_tool_filter_contents_into): Intermediate the
- event hook/unhook hack here.
-
-2000-07-20 Peter Williams <peterw@helixcode.com>
-
- * mail-ops-new.c (setup_send_mail): Fix silly forgetting-to-ref
- problem on some sends (when not replying). Note the early exit
- path with a big comment.
-
- * message-list.c (message_list_set_folder): Don't call
- folder_changed, call mail_do_regenerate_messagelist, as
- the GDK_THREADS_ENTER in the former can deadlock us!
-
- * folder-browser.c (folder_browser_set_uri): Ah, screw it.
- Make 'load folder' asynchronous and pretend that it always
- succeeds.
-
- * mail-ops-new.c (mail_do_load_folder): New operation, loads
- a folder into a FolderBrowser.
-
- * mail-threads.c (read_msg): Check if the exception is
- a user cancel; don't complain if it is.
- (mail_operation_queue): Same.
- (dispatch_func): Same.
-
-2000-07-20 Peter Williams <peterw@helixcode.com>
-
- * mail-ops-new.c (cleanup_send_mail): Fix evil mistaken
- unref.
-
- * test-thread.c: Fit the new mail_operation_spec prototype.
-
- * mail-callbacks.c (composer_send_cb): Hide the composer upon
- start of send operation.
-
- * folder-browser.c: #include "mail-ops-new.h"
-
- * mail-threads.h: Change text fields of mail_operation_spec to
- provide two forms of the name.
-
- * mail-threads.c: Use appropriate new string fields.
- (dispatch_func): Hide the progressbar by default.
-
- * message-list.c (op_regenerate_messagelist): Fix the datasize from
- 0 -> sizeof (regenerate_messagelist_data_t). Add the new gerund and
- infinitive strings.
- (do_regenerate_messagelist): Include some code that fell between the
- cracks.
-
- * mail-ops-new.c (op_scan_subfolders): Same datasize fix for
- scan_subfolders.
- (op_forward_message): Same.
- (all): Add new gerund and inifinitive strings for mail_operation_spec.
- (cleanup_send_mail): Destroy the composer on success; re-show it on
- error. I'm so clever!
-
-2000-07-20 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (factory_fn): Updated for the new
- `evolution_shell_component_new()' arg.
-
-2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-thread.c (thread_messages): What if message info is NULL?
-
-2000-07-17 Peter Williams <peterw@helixcode.com>
-
- * component-factory.c (real_create_{imap,news}_storage): Instead of
- directly calling evolution_storage_new_folder, queue up a list of
- folders to register so that we don't do our CORBA in The Other Thread.
- (create_{imap,news}_storage): Changes ancillary to the above.
- (add_new_mailbox): New function to queue up a folder
- (cleanup_create_info): New function to dequeue the folders and free mem.
-
- * test-thread.c: s,ENABLE_BROKEN_THREADS,USE_BROKEN_THREADS -- oops
-
- * mail-format.c: (mail_lookup_url_table): New function to get the url
- table associated with a CamelMimeMessage because we can no longer
- gtk_object_get_data on it.
-
- * mail-display.c: replace 'gtk_object_get_data( message, "urls" )'
- with 'mail_lookup_url_table( message )'
-
-2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c, component-factory.c: Initial code to support
- IMAP folders that don't use "/" as a directory separator.
-
-2000-07-15 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (set_x_mailer_header): New helper function to set the
- `X-Mailer:' header to to `Evolution <version> [Developer
- Preview]".
- (real_send_mail): Call it.
-
-2000-07-14 Peter Williams <peterw@curious-george.helixcode.com>
-
- * message-list.c (message_list_set_folder): Ported to CamelObject:
- GTK_OBJECT->CAMEL_OBJECT; gtk_signal_connect->camel_object_hook_event;
- GDK_THREADS_ENTER/LEAVE around "changed" event hooks.
-
- * folder-browser.c (folder_browser_destroy): likewise.
- (mail_uri_to_folder): likewise.
- (folder_browser_load_folder): likewise.
-
-2000-07-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (evolution_mail_LDADD): Add `GCONF_LIBS'.
-
-2000-07-14 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (write_headers): put a <p> at the end of the
- header table. (I think there used to be whitespace after it, but
- then some gtkhtml change got rid of it...)
- (handle_text_plain): Don't do this <PRE>. Instead, CONVERT_NL and
- CONVERT_SPACES and wrap it in <TT>. Now if the sender didn't
- include any newlines, it will be wrapped to the width of the
- window instead of extending off into infinity.
-
-2000-07-13 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_list_destroy): Only unref the folder if
- it's been set.
-
- * folder-browser.c (folder_browser_destroy): Only sync the folder
- if it's been set.
-
-2000-07-13 Jonathan Blandford <jrb@redhat.com>
-
- * mail-config.c (create_transport):
- s/CAMEL_SERVICE_NEED_HOST/CAMEL_SERVICE_URL_NEED_HOST.
-
-2000-07-13 Dan Winship <danw@helixcode.com>
-
- * mail-config.c (add_row): Add a "gboolean required" argument, and
- set its value on the entry.
- (create_source, create_transport): Create rows for URL elements if
- the URL ALLOWs them. Mark them required if it NEEDs them.
- (service_note_doneness): Only require the required fields to be
- filled in.
-
- Now the IMAP config page allows the user to enter a path, but
- doesn't require it.
-
-2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Back to the old way to avoid
- g_warnings, yay. Also fix append to send a flags argument (0)
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * mail-config.c (providers_config_new): fix some cut & paste bung.
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * mail-format.c (setup_function_table): add "message/news" to the
- mime_function_table using the same handler as message/rfc822.
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * mail-config.glade*: add news server tab to dialog.
-
- * mail-config.c (on_NewsServerConfigDialogButton_clicked): new function.
- (on_clistNewsServers_select_row): new function.
- (on_cmdNewsServersAdd_clicked): new function.
- (on_cmdNewsServersEdit_clicked): new function.
- (on_cmdNewsServersDelete_clicked): new function.
- (providers_config_new): mirror the source tab's code to fill in
- the news server tab.
- (write_config): save out the news server.
- (create_news_server_config_dialog): new function.
- (create_news_server_page): new function.
-
-2000-07-12 Peter Williams <peterw@helixcode.com>
-
- * mail-display.c (save_data): Change from evolution_dir to
- g_get_home_dir() for default location of save file.
-
-2000-07-11 Dan Winship <danw@helixcode.com>
-
- * Update for CamelFolder API changes
-
-2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Changed to use
- camel_folder_move_message_to () rather than get_message () and then
- append_message (). This also makes it so we don't have to worry about
- fetching message flags to pass to the new append_message () method.
-
- * folder-browser.c (folder_browser_load_folder): Disable
- Search capability menu/entry if folder doesn't support it.
-
- * message-list.c (message_list_regenerate): Don't perform
- a search if the folder doesn't support it.
-
-2000-07-11 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (real_send_mail): Set the post_send_data flag rather
- than toggling it. (Maybe we'll need more control over it later,
- but for now, the only flag we set is "replied", and we want
- that set, not toggled.)
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Work with both
- current and 0.15 bonobo
-
- * kill more debugging messages
-
- * mail-ops.c (real_fetch_mail): Don't multiply free dest_url.
-
- * message-list.c (message_list_select): Update
- message_list_select_next to do either next or previous.
-
- * folder-browser.c (etable_key): Make 'n' and 'p' do next and
- previous unread message.
-
- * mail-ops.c (select_first_unread): Update.
- (real_fetch_mail): clean up a bit.
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (forward_msg): Initialize `fwd_subj' to NULL if
- `from' is NULL.
-
-2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Fixed broken POP fetching
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c: Removed variable `browsers'.
- (create_view): Don't update it.
- (owner_unset_cb): Don't sync the folders here anymore, because at
- this point the folder browser is dead already so we cannot get a
- valid list of folders from it anymore.
-
- * folder-browser.c (folder_browser_destroy): Sync the associated
- mailbox first.
-
-2000-07-10 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, message-list.h: Switched from ETable to
- ETableScrolled.
-
-2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Fixed movemail so that it too would
- deliver to Inbox.
-
-2000-07-09 Dan Winship <danw@helixcode.com>
-
- * message-list.c (get_message_info): Don't g_warn if the user
- selects a fake tree parent.
- (message_list_select_next): Ignore fake rows
- (build_tree): Store the "root_subject" for fake rows
- (ml_tree_value_at): Display the correct subject for fake rows.
- (on_cursor_change_cmd): Update for the other changes and set
- cursor_uid to NULL when the cursor is on a fake row.
-
- * mail-ops.c (reply): Don't try to reply when no (real) message is
- selected.
- (forward_msg): Ditto.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Remove setting of dnd_code since that's handled
- internally to ETable.
-
-2000-07-08 Dan Winship <danw@helixcode.com>
-
- * folder-browser.c (etable_key): Fix up the pageup/pagedown
- increment a bit.
-
- * folder-browser-factory.c (control_activate): Add a "Threaded
- Message List" item to the "View" menu.
-
- * message-list.c (message_list_toggle_threads): Handler for that.
- (build_flat): New function to build a "flat" message list using
- the tree model.
- (message_list_regenerate): Build tree or flat message list
- depending on the global setting.
-
- * message-thread.c (get_root_subject): fix a "Re:" parsing bug
-
-2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Always dump incoming messages to
- Inbox (assuming not filtered to another location).
-
-2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Move the
- "Expunge" item to the "Action" menu.
- (control_deactivate): Accordingly.
-
-2000-07-08 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (forward_msg): Deal with having multiple selected
- messages.
-
- * mail-format.c (mail_generate_forward): Removed. (Integrated into
- forward_msg)
-
-2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (build_tree): Small fix to stop uid data from
- being set on a message-list tree node when it didn't correspond
- to an actual message.
-
-2000-07-08 Dan Winship <danw@helixcode.com>
-
- * message-list.c (get_message_info): Fix Jeff's FIXME: This does
- get called with out-of-range data sometimes, so we do need the
- check. Use e_table_model_row_count to get the actual right answer.
-
-2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (get_message_info): This wasn't quite right, it
- will now work but still isn't perfect. See FIXME comment.
-
-2000-07-07 Dan Winship <danw@helixcode.com>
-
- * message-thread.c (remove_node): Add another argument "clast"
- pointing to the container before the current one in the list,
- which it can update if that turns out to be the one that it
- removed.
- (group_root_set): Update for remove_node change, and remove both
- nodes in the "subjects are common" case. Fixes a bug that would
- cause the message list to be truncated if this rule was invoked.
-
- (sort_node): sort the tree by the original order of the messages
- in the folder rather than by date.
-
-2000-07-07 Dan Winship <danw@helixcode.com>
-
- * message-list.c: Lots of changes. Store uids as node data on the
- tree nodes and use those rather than rows where possible. (The
- concept of "row" is just getting too complicated.) Get rid of the
- summary_table, because given a uid we can call
- camel_folder_get_message_info, which makes more sense than keeping
- a separate uid->row hash table ourselves.
-
- (get_message_info): update
- (get_message_row): removed
- (ml_col_cound, ml_row_count, ml_value_at, ml_set_value_at,
- ml_cell_is_editable, ml_duplicate_value, ml_free_value,
- ml_initialize_value, ml_value_is_empty, ml_value_to_string):
- Removed. We always use the tree model now.
- (message_list_init): Remove the non-tree code.
- (build_tree): store uids in the tree rather than row numbers,
- and build the message_list->uid_rowmap to map from uids to rows
- when needed.
- (message_list_regenerate): Renamed from _set_search, since it's
- used to redraw in non-search cases too.
- (message_changed): Use the uid_rowmap to get a model row number.
-
- * message-thread.c (thread_messages): Change the interface on this
- to work with the new MessageList.
-
- * folder-browser.c (search_set, folder_browser_clear_search):
- s/message_list_set_search/message_list_regenerate/
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (get_message_info): Handle a row number of -1
- properly.
-
-2000-07-06 Dan Winship <danw@helixcode.com>
-
- * message-list.c (get_message_info): Map tree model row numbers to
- summary row numbers.
- (ml_tree_value_at, ml_tree_set_value_at,
- ml_tree_is_cell_editable): So don't do that here.
-
-2000-07-06 JP Rosevear <jpr@arcavia.com>
-
- * mail-config.glade*: Glade files for the configuration dialog.
-
- * mail-config.c (providers_config_new): Build the dialog with
- glade.
-
-2000-07-06 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c, folder-browser.c, mail-ops.c,
- message-list.c: fix warnings.
-
- * main.c (main): gtkhtmllib_init is no more. Call gconf_init
- directly instead.
-
- * message-list.c (message_list_select_next): New function to
- select the first message on or after the given row that meets
- certain flag criteria.
-
- * mail-ops.c (real_fetch_mail): call message_list_select_next to
- select first unread message in current folder if it changes.
- (real_delete_msg): Remove the code to move the etable cursor. It
- only makes sense really if you deleted the message with the
- keyboard, so do it from etable_key.
-
- * folder-browser.c (etable_key): call message_list_select_next to
- select next non-deleted message after Delete.
-
- * mail-identify.c: Add a workaround for a small gnome-vfs 0.2 bug
- so we don't need to require CVS gnome-vfs.
-
-2000-07-06 Not Zed <NotZed@HelixCode.com>
-
- * message-thread.c (sort_thread): sort messages based on date for
- the initial sort order.
- (thread_messages_free): Implement.
-
- * message-list.c (message_list_init_header): Setup the subject
- renderer to a tree in tree mode.
- (on_cursor_change_cmd): For a tree model, map the view row to the
- data row.
- (build_tree): Builds the tree data structure of all messages.
- (message_list_set_search): For a tree model, build the tree here.
- (ml_tree_icon_at): Icon callback, returns nothing.
- (ml_tree_value_at):
- (ml_tree_set_value_at):
- (ml_tree_is_cell_editable): Maps tree node to data row, and calls
- the equivalent table callback
- (message_list_init_renderers): Setup the tree renderer if needed.
- (message_list_init): set the root node invisible afterall.
- (message_list_set_search): Clear the old tree before putting in a
- new one.
-
- * message-list.h: Add a tree renderer to render list, and
- tree_view indicator.
-
- * message-thread.[ch]: Code for message threading.
-
-2000-07-05 Dan Winship <danw@helixcode.com>
-
- * mail-identify.c (mail_identify_mime_part): Oops. My gnome-vfs
- was out-of-date. Update for changed function name.
-
-2000-07-05 Dan Winship <danw@helixcode.com>
-
- * mail-identify.c (mail_identify_mime_part): Use the gnomevfs
- sniff buffer interface to try to identify the MIME type when
- everything else fails.
-
- * mail-display.c (on_object_requested):
- * mail-format.c (lookup_handler, handle_undisplayable,
- handle_audio): s/gnome_mime/gnome_vfs_mime/
-
- * Makefile.am: Add gnomevfs stuff
-
-2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (create_folder): Get rid of a compiler
- warning by making sure `folder' is always initialized to some
- value for any code path.
-
-2000-07-03 Dan Winship <danw@helixcode.com>
-
- * message-list.c (select_msg): call mail_display_set_message with
- NULL if the message we tried to select doesn't exist (probably
- meaning we tried to selecte the first message and the folder is
- empty.)
-
- * mail-display.c (mail_display_set_message): deal with NULL as an
- input (meaning "undisplay previous message and display nothing").
-
-2000-07-02 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (real_fetch_mail): Remove hack to redisplay the
- inbox, since folder_changed signals will now be emitted
- appropriately.
-
- * component-factory.c (create_vfolder_storage): Fix
- filter_driver_new invocation.
-
- * Makefile.am (bin_PROGRAMS): test-mail and test-thread should be
- noinst.
-
- * mail-ops.c (real_fetch_mail):
- (vfolder_editor_clicked):
- * component-factory.c (create_vfolder_storage):
- Pass mail_uri_to_folder and rules to filter_driver_new.
-
-2000-07-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser.c (mail_uri_to_folder): Fix double freeing of the
- local exception `ex'.
-
-2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (refile_msg): Only allow type "mail" in the folder
- selection dialog.
-
-2000-07-01 Dan Winship <danw@helixcode.com>
-
- * pixmaps.h, pixmaps/*.xpm: Removed. These aren't being used any
- more. (The real pixmaps are in ../art.)
-
-2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c (get_message_info):
- (select_msg): Updated to reflect camel-folder changes.
-
- * mail-ops.c (real_fetch_mail): Modified to reflect camel-folder
- changes.
-
-2000-06-30 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (print_msg): Use gnome-print to do a print preview.
-
- * folder-browser-factory.c: Hook up "Print" button.
-
- * message-list.c (message_list_foreach): New function, a wrapper
- around e_table_selected_row_foreach, which calls the callback
- function with UIDs rather than row numbers.
-
- * folder-browser-factory.c: Remove never-used "Find" button from
- the toolbar and replace it with "Refile". (We need a better icon
- for this...). Hook up "Refile" to "refile_msg".
-
- * mail-ops.c (refile_msg): Call the shell's user_select_folder
- routine, and then use message_list_foreach and real_refile_msg to
- do the work.
- (delete_msg): Update to use message_list_foreach.
-
- * folder-browser.c (mail_uri_to_folder): new function, extracted
- from folder_browser_load_folder, to turn a URI into a folder.
- (folder_browser_load_folder): Use it.
-
-2000-06-30 Peter Williams <peterw@curious-george.helixcode.com>
-
- * component-factory.c (create_news_storage, create_imap_storage):
- Fixed to use new EvolutionShellClient proxy thingamajiggie.
-
-2000-06-30 Dan Winship <danw@helixcode.com>
-
- * message-list.c (on_row_selection): use the ETable row_selection
- signal to track how many rows are selected. Eventually we will use
- this info to disable toolbar buttons when you have too few/too
- many messages selected, but the current toolbar widget doesn't
- allow that.
-
- * message-list.h, message-list.c, mail-ops.c: Change selected_row
- and selected_uid fields of MessageList to cursor_row and
- cursor_uid to be more correct according to the new ETable
- interfaces.
-
-2000-06-30 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c: Eeek. Fix typo: add missing star in the
- declaration of `global_shell_client'.
-
-2000-06-29 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c: Replace `global_shell_interface' with
- `global_shell_client'.
-
-2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-ops.c (delete_msg): Clean up compile warnings
- (real_fetch_mail): Fetching from IMAP should do nothing
-
-2000-06-29 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-ops.c: Handle multiple deletes (change by Peter Williams.)
-
-2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser-factory.c: Changed "Send" to "Compose" to
- avoid user confusion. Compose is a little more intuitive.
- Also changed the pixmap to MAIL_NEW instead of MAIL_SND
-
- * mail-ops.c (compose_msg): Renamed to avoid confusion
-
-2000-06-29 Dan Winship <danw@helixcode.com>
-
- * component-factory.c (create_imap_storage, create_news_storage):
- remove some code incorrectly copied and pasted from
- create_vfolder_storage which caused vfolder creation to stop
- working.
-
-2000-06-29 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, mail-ops.c: Changed the name of
- e_table_select_row to e_table_set_cursor_row.
-
-2000-06-29 Peter Williams <peterw@helixcode.com>
-
- * message-list.c (message_list_init): Set the dnd_code of the
- ETableHeader to something so that Solaris sprintf doesn't die
- on a NULL string.
-
- * mail-config.c (providers_config_new): Check for a null "transport"
- string (not all OS' handle NULL strings well *cough* Solaris)
-
-2000-06-28 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (mail_generate_forward): add default subjects
-
- * component-factory.c (create_folder): Refuse to create folders
- not of type "mail", and correctly create an empty "mbox" folder
- for new folders in /local.
-
- * main.c (init_corba): Call od_assert_using_oaf() or
- od_assert_using_goad() as appropriate to make sure people didn't
- somehow trick the build system.
-
-2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * message-list.c: Added prototype for filter_date to make
- it build cleanly
-
-2000-06-27 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Made dates display grouping information
- properly.
-
-2000-06-27 Peter Williams <peterw@curious-george.helixcode.com>
-
- * message-list.c (mark_msg_seen): Need to return a value
- on error.
-
- * main.c (main): Don't start threads or enter threads if
- there's no threading! Sigh.
-
- * test-thread.c: Don't compile if no threads.
-
- * session.c: Work without broken threads.
-
- * message-list.c (filter_date): Solve the ctime_r problem the
- correct way, with the magic of autoconf.
-
-2000-06-27 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Work around mismatched ctime_r functions. This
- will be fixed.
-
-2000-06-27 Peter Williams <peterw@curious-george.helixcode.com>
-
- * mail-threads.c: Don't compile this if we don't have
- threads enabled. This should maybe be on the Makefile.am
- level.
-
-2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
-
- * component-factory.c (owner_set_cb): Put in a gross hack to
- export the shell reference elsewhere.
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Added a value_to_string handler.
-
-2000-06-26 Peter Williams <peterw@helixcode.com>
-
- * component-factory.c, mail-ops.c: #ifdef the threads stuff so
- that if USE_BROKEN_THREADS is not defined we just call the functions
- in the main thread.
-
- * mail-threads.h: Don't declare funcs if USE_BROKEN_THREADS not
- defined.
-
- * mail-threads.c: Put the query and message boxes on top so that
- you can see them.
-
-2000-06-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (error_dialog): va_start() returns void, don't
- assign it's retval to a variable.
-
-2000-06-26 Ettore Perazzoli <ettore@helixcode.com>
-
- * main.c (main): Call `GDK_THREADS_ENTER()' and
- `GDK_THREADS_LEAVE()' around the main loop as in the examples from
- the GTK+ FAQ.
-
- * mail-threads.c (DEBUG): New macro for debugging.
- (read_msg): Use it.
-
-2000-06-25 Peter Williams <peterw@helixcode.com>
-
- * Makefile.am: Clean up the various _LIBS and _CFLAGS
- to work with simpler THREADS_LIBS and THREADS_CFLAGS scheme.
-
-2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): Improved the
- code to separate the imap namespace from the folder name.
-
-2000-06-23 Peter Williams <peterw@curious-george.helixcode.com>
-
- * component-factory.c: Include e-util/e-setup.h for the
- prototype of evolution_dir; prototype create_news_storage.
- (real_create_imap_storage, real_create_news_storage): New
- functions moving the camel stuff into the async callback.
- (create_imap_storage, create_news_storage): Chopped in
- half to move camel stuff as above.
-
- * mail-ops.c: Include "mail-threads.h" for threading protos.
- (real_fetch_mail, real_send_mail, real_expunge_folder):
- New functions moving the camel stuff into the async callback.
- (async_mail_exception_dialog): A version of mail_exception_dialog
- to be called from the async handlers (just calls mail_op_error())
- (fetch_mail, expunge_folder, composer_send_cb): Cut in half to
- move camel stuff as above.
- (cleanup_send_mail): Clean up after the async real_send_mail
- with the gtk_object_destroys et al.
-
- * mail-threads.c: Instead of hiding the progress bar, make it
- zip back and forth constantly.
- (progress_timeout): New func. Timeout called to make the pbar
- shimmy.
- (timeout_toggle): New func. Turn on and off the shimmy effect.
- (check_cond): New func. Make sure that the GCond for modal
- operation is initialized before mail_op_{error,get_password}.
- (show_error_clicked, read_msg, get_password_clicked): Move
- over to timeout_toggle.
- (mail_op_error,mail_op_get_password): Add check_cond() call.
-
- * main.c: (main) Call g_thread_init.
-
- * session.c: Change auth_callback stuff over to assume that it's
- being called async. Note: no real good way to tell if this is
- the case or not.
- (request_callback): ifdef'ed out
- (evolution_auth_callback): Use mail_op_get_password.
-
-2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): Now should
- correctly get the selected folder from the given URL.
-
-2000-06-22 Chris Toshok <toshok@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): add handling for
- loading "news:" folders.
-
- * component-factory.c (create_news_storage): add a root for news
- source.
- (owner_set_cb): call create_news_storage.
-
-2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): Updated to
- prepend url-> path if it exists for that imap store.
-
- * component-factory.c (create_imap_storage): Modified to not
- prepend a hard-coded namespace.
-
-2000-06-22 Chris Toshok <toshok@helixcode.com>
-
- * mail-ops.c (fetch_mail_cleanup): new function, passed as arg to
- mail_operation_try.
- (fetch_mail): add cleanup func arg.
-
-2000-06-22 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Changed ml_value_at to return "" instead of NULL
- in some cases.
-
-2000-06-22 Peter Williams <peterw@curious-george.helixcode.com>
- * Makefile.am: Add GNOME_EXTRA_LIBS so that we get libgthread
- in our LIBS for evolution-mail.
-
- * mail-threads.c: Make the dialog boxes for error and
- question non-modal. They're modal relative to the dispatch
- thread, but before they would also eg lock up the toolbar
- buttons (while the menus, managed by another process, were
- active -- a weird effect).
-
-2000-06-22 Peter Williams <peterw@curious-george.helixcode.com>
-
- * mail-threads.[ch]: Extra argument to mail_operation_try:
- 'cleanup', a function to be called in the main thread after
- the dispatcher thread exits. gtk_object_destroy's et al may
- attempt to unmap windows so we can't do them in the dispatcher
- thread :-(
-
- * test-thread.c: Updated with demo of new argument working.
-
-2000-06-22 Peter Williams <peterw@helixcode.com>
-
- * test-thread.c (op_5): New tests for the get_password
- hook.
-
- * mail-threads.[ch]: New hook, mail_op_get_password, for
- getting a user response from an async operation. The operation
- blocks while waiting for the response. A big whole mutex
- condition threading blocking dealie to make sure that it
- works.
-
- Also the error hook creates a dialog again, which also needs
- to block its caller while we wait for the user to press ok.
-
-2000-06-22 Peter Williams <peterw@helixcode.com>
-
- * mail-threads.c (various functions): Prettify the UI
- so that the progress bar doesn't become all huge 'n stuff.
- (mail_operation_try): Now save the operation's description,
- so that we can display it later as the default message.
- (read_msg): When the operation starts set the label to its
- UI-friendly name.
- (dispatch_func): Free the saved prettyname.
-
-2000-06-21 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Removed an erroneous comment.
-
-2000-06-21 Dan Winship <danw@helixcode.com>
-
- * mail-config.c (create_transport_page): Make this not crash if
- you don't have a transport configured.
-
- * message-list.c: Update received date to work like sent date.
-
-2000-06-21 Peter Williams <peterw@helixcode.com>
-
- * mail-thread.{c,h}: New files -- a simple API for executing
- the major mail ops (fetch_mail etc) asynchronously, allowing
- the operations to send messages and update a progress bar.
-
- * test-thread.{c,h}: Tests the mail-thread API.
-
- * Makefile.am: add mail-thread.[ch] to evolution_mail_SOURCES
- and declare the test_thread noinst_PROGRAM.
-
-2000-06-21 Peter Williams <peterw@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Include "e-setup.h" to
- get the prototype for evolution_dir.
-
-2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * component-factory.c (create_imap_storage): Oops. Should
- have checked for a NULL sources.
-
-2000-06-20 Dan Winship <danw@helixcode.com>
-
- * message-list.c (mark_msg_seen): Quick hack to prevent a NULL
- pointer dereference. Things need to be cleaned up a bit more here
- though.
-
- * mail-sources.c: Oops. This should have been removed a long time
- ago.
-
-2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): Working on getting
- this to work :)
-
- * component-factory.c (create_imap_storage): Should now correctly
- construct the folder path allowing the selection of a folder.
-
-2000-06-20 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-format.c (mail_generate_reply): Declare `evolution_dir'.
- Ugly, ugly, ugly, but I am not sure where it should go instead.
-
-2000-06-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * mail-ops.c (ask_confirm_for_empty_subject): New function to ask
- confirmation for an empty subject line.
- (composer_send_cb): Use it if the subject is empty and only send
- the message if the user confirms.
-
-2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * component-factory.c (create_imap_storage): Now creates the IMAP
- storage (listing subfolders and such)
-
-2000-06-19 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (find_preferred_alternative): add an option to
- prefer text/plain.
- (reply_body): add an option to prefer text/plain
- (mail_generate_reply): Check the mail sending preferences, and
- generate a text/plain reply if the user prefers to send plain text
- (and we have a text/plain part to generate a reply from).
-
-2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (providers_config_new): Should now correctly display
- the Transport page (made it set the optionmenu correctly, before it
- would only set SMTP).
- (create_transport_page): Updated to set the page info to sendmail/smtp
- based on the url.
- (create_service_page): Had to add some code to set data on some objects
- so I could grab the objects I needed to modify in the above function.
-
-2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): started to add
- code to load an IMAP folder.
-
- * component-factory.c: Started to add a create_imap_storage
- method so that we can eventually have our IMAP store displayed
- in the tree view.
- (create_vfolder_storage): Renamed from
- create_test_storage().
- (owner_set_cb): Updated.
-
-2000-06-17 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_list_set_folder): Prevent double-freeing
- action on summary_table and uid_rowmap.
-
-2000-06-16 Dan Winship <danw@helixcode.com>
-
- * message-list.c (ml_set_value_at): Implement clicking on the
- envelope icon to set read/unread. Based on a patch by clahey.
- (select_msg): keep the timeout id for the "seen" flagging in the
- message_list structure, so ml_set_value_at can clear it so it
- doesn't re-mark a message seen after you click it unseen.
-
-2000-06-16 Dan Winship <danw@helixcode.com>
-
- * message-list.c (get_message_row): new function to do a uid to
- row mapping.
- (mark_msg_seen, select_msg, message_changed,
- message_list_set_folder): Update for Camel flag changes.
- (on_cursor_change_cmd): Rename "row_to_select" to "selected_row",
- and keep a "selected_uid" as well.
-
- * mail-ops.c (composer_send_cb): Update for Camel flag changes,
- and fix some memory-handling bugs. (Free the post_send_data when
- the composer is destroyed, not when the user clicks "send", which
- could happen never, or more than once.)
- (delete_msg): Update for Camel flag changes, and fix the "holding
- down the delete key skips some messages" bug.
-
-2000-06-15 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (fetch_mail):
- * component-factory.c (owner_unset_cb):
- * message-list.c (message_list_set_folder): Update for CamelFolder
- changes.
-
- * folder-browser.c (folder_browser_clear_search): New function to
- revert back to non-searching mode.
-
- * mail-ops.c (fetch_mail): Use folder_browser_clear_search.
-
- * mail-display.c (on_url_requested): if the document requests an
- unknown URL, it's not an error; just ignore the URL.
-
- * mail-ops.c (fetch_mail): If there's no new mail, tell the user.
-
-2000-06-14 Radek Doulik <rodo@helixcode.com>
-
- * main.c (main): call gtkhtmllib_init here
-
-2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (on_SourceConfigDialogButton_clicked): Make sure source
- is always pointing to something, so a blank is not written to the config file
- on close.
-
-2000-06-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (SHELL_OBJS): Removed.
- (evolution_mail_LDADD): Use `libeshell.a'. Also use
- `top_builddir' consistently.
-
-2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c: Got rid of sources_max_row and identities_max_row
- as they are not really needed (just use clist->rows)
- (on_cmdSourcesEdit_clicked): Modified to make 'source'
- point to the data being edited.
- (on_cmdSourcesAdd_clicked): Adds a new clist item and selects it so the
- editor knows where to stick the data when it's done.
-
-2000-06-12 Federico Mena Quintero <federico@helixcode.com>
-
- * message-list.c: Removed the ETableModel thaw handler.
-
-2000-06-12 Dan Winship <danw@helixcode.com>
-
- * folder-browser.c (folder_browser_set_uri): Return the result of
- folder_browser_load_folder.
- (get_prop, set_prop, folder_browser_properties_init): Remove. No
- longer needed.
-
- * folder-browser-factory.c (folder_browser_factory_new_control):
- Add a "uri" argument, return NULL if setting it fails.
- (folder_browser_factory_new_control): Remove property bag stuff.
- (folder_browser_factory_init, folder_browser_factory): Remove
- this, since we're using the component factory now.
-
- * component-factory.c (create_view): Update for
- folder_browser_factory_new_control change and return NOTFOUND as
- appropriate.
-
- * main.c (main): Don't call folder_browser_factory_init.
-
- * mail-format.c (mail_generate_reply): Fix the subject generation
- so we don't get "Re: Re:". This is working around something that
- may later be declared a misfeature in Camel.
-
-2000-06-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (create_folder): New stub implementation for
- the folder creation function in the EvolutionShellComponent we
- expose [it simply returns success all the time].
- (factory_fn): Pass this function to `evolution_shell_component_new'.
-
-2000-06-09 Dan Winship <danw@helixcode.com>
-
- * folder-browser.c (folder_browser_new): Add a serial number to
- FolderBrowser.
-
- * folder-browser-factory.c (control_activate, control_deactivate):
- Include fb serial number in the name of the Bonobo toolbar to
- prevent problems with disappearing toolbars. This is a kludge and
- should go away.
-
-
- * mail-ops.c (expunge_folder): display error from
- camel_folder_expunge if there is one.
-
- * message-list.c (select_row): install an idle function to
- select the row rather than doing it directly. Ugh. What a
- kludge, but at least it works now.
-
- * session.c (evolution_auth_callback): Update for
- CamelAuthCallback changes. (Uncache passwords when asked to.)
-
- * mail-ops.c (fetch_mail): close and expunge the source folder
- after copying it to a local folder.
-
-2000-06-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * component-factory.c (create_view): Updated to match the changes
- to the definition of `EvolutionShellComponentCreateFn'. If @type
- is not "mail", return an "unsupported type" error.
- (factory_fn): Pass NULL for the `remove_folder' and
- `create_folder' functions.
-
-2000-06-09 Dan Winship <danw@helixcode.com>
-
- * mail-format.c: Redo things a bit so that whitespace-only
- text parts aren't displayed. (In particular, so that
- whitespace-only subparts of multipart/mixed aren't displayed as
- separate (empty) parts.)
-
-2000-06-06 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (fetch_mail):
- * folder-browser.c (folder_browser_load_folder): Update for folder
- creation/existence changes.
-
- * message-list.c (message_list_set_folder): Remove the code to
- create the folder if it doesn't exist, since we don't want to do
- that.
-
-2000-06-05 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (composer_send_cb): Leave the composer window around
- if the message doesn't get sent.
-
-2000-06-05 Matt Loper <matt@helixcode.com>
-
- * folder-browser.c (etable_key): Allow "GDK_KP_Delete", a keypad
- delete key, to delete a message.
-
-2000-06-05 Dan Winship <danw@helixcode.com>
-
- * session.c (evolution_auth_callback): Remember passwords between
- calls.
- (forget_passwords): Callback for "Forget Passwords" menu item.
-
- * folder-browser-factory.c (control_activate):
- (control_deactivate): Add "Forget Passwords" menu item.
-
- * mail.h, mail-ops.c: fix some function prototypes
-
- * folder-browser.c (etable_key): Add "Delete" = delete message.
-
- * mail-format.c (mail_generate_forward): Update for new composer
- attachment interface.
-
-2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (providers_config_new): Added a new notebook
- page that allowed for mail format (text/plain or
- multipart/alternative)
-
-2000-06-02 Dan Winship <danw@helixcode.com>
-
- * message-list.c (filter_date): If the date in the summary is 0,
- output "?".
-
- * component-factory.c (create_view): keep a GList of folder
- browsers created
- (owner_unset_cb): Go through the list and close each folder before
- exiting so they sync their summary state, etc to disk.
-
- * mail-ops.c (fetch_mail): Use camel_service_connect, not
- connect_with_url, since we already passed the URL into
- camel_session_get_store.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Use camel_folder_free_summary instead of
- g_ptr_array_free. Unref the folder when we're done with it.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * session.c: Revert removal of e_setup_base_dir.
-
-2000-06-02 Dan Winship <danw@helixcode.com>
-
- * folder-browser.c (my_folder_browser_init): Connect to ETable's
- key_press signal.
- (etable_key): scroll mail on space/backspace.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Made sent column as wide as from column.
-
-2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c (on_cmdSourcesAdd_clicked): Changed identity_row
- to source_row as this is a Sources clist we are dealing with and
- not an identity clist
- (on_cmdSourcesEdit_clicked): same
- (on_cmdSourcesDelete_clicked): again, same
- (on_cmdSourcesEdit_clicked): Source editor now fills in data from
- the clist
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * message-list.c: Add a date column.
- (COL_SENT_WIDTH_MIN): Make this wider.
- (ml_value_at): return the sent date (as a time_t) for COL_SENT.
- (Fix COL_TO too while I'm here.)
- (ml_duplicate_value, ml_free_value, ml_initialize_value,
- ml_value_is_empty): COL_SENT is numeric now.
- (message_list_init_renderers): Create a date renderer (using
- text_filter to translate the time_t into a string).
- (message_list_init_header): Use render_date for COL_SENT.
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * session.c: Don't call e_setup_base_dir.
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (mail_generate_forward): Fix forwarding to work
- for people other than me. :) [Although apparently it doesn't
- really.]
-
- * mail-ops.c (delete_msg): Add a quick hack to move the selection
- down a row when you delete a message.
-
- * mail-format.c (handle_message_rfc822): use <blockquote> rather
- than <center><table border=1 width=95%> to frame the embedded
- message. If <pre> text in the subtable won't fit in the 95% width,
- GtkHTML will write past the border of the table (and
- <blockquote><table border=1> causes creeping updates so it's not
- usable for now).
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c (message_list_init): Turn off the grid in our
- ETable.
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (write_headers): Oops. This needs to take a
- message argument because we might be writing headers for an
- embedded message/rfc822 subpart rather than the root document.
-
-2000-06-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c: Config dialogs are completed.
- (service_acceptable): Fixed a segfault caused by duplicate
- camel_exception_free()
- (providers_config_new): Identity and Source clists are now filled in
- when the dialog is created as well as the Transport page
-
- * folder-browser-factory.c: Renamed Tool/ menu items
- Vfolder was changed to Virtual Folder and
- Configure Camel Providers was changed to Mail Configuration
-
-2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (evolution_mail_LDADD): Link with
- `libemiscwidgets.a'.
-
- * mail-display.c (mail_display_new): Use an EScrollFrame instead
- of a GtkScrolledWindow.
- (mail_display_set_message): Likewise.
-
- * mail-display.h: Replace the GtkScrolledWindow with an
- EScrollFrame.
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * component-factory.c (owner_unset_cb): Quit when the shell exits.
- This is a kludge, but a pretty necessary one until the refcounting
- bugs that keep the component from exiting properly are fixed.
-
-2000-05-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c: Partially implemented the source
- configuration, seems to segfault due to a destroyed
- gnome dialog being destroyed again in the method
- on_SourceConfigDialogButton_clicked()
-
-2000-05-31 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (free_url, handle_text_enriched,
- get_url_for_icon): Fix up memory management of x-evolution-data
- URLs so the URLs and/or their data don't get freed while there are
- still references to them.
-
- * message-list.c (message_list_init_header): redo the (unused)
- online status column to no longer refer to pixmaps that no longer
- exist.
-
-2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.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-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail-config.c: Configuration dialog now allows
- adding/editing/deleting of Identities (which leaves
- adding/editing/deleting of sources left to implement).
- The data is also saved when the dialog is exited via
- the OK button.
-
-2000-05-31 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (mail_format_mime_message): Initialize the "urls"
- hash table stored on the message and store cid and other URLs
- there rather than as object data on the message.
- (get_cid): rewrite this a bunch
- (handle_text_enriched): move the code from write_iframe_string()
- into here, since it's the only place that actually needs it.
- (handle_text_html): simplify this a lot. We can use a cid: URL
- here rather than x-evolution-data.
- (get_url_for_icon): New routine to return URLs for icons, and
- cache the results, so we don't have to keep re-reading the icon
- files (and so we can't be spoofed into reading non-icon files).
- (handle_mystery, handle_audio): use get_url_for_icon.
-
- * mail-display.c (save_data): move the CamelMimePart filename
- extracting code from get_cid to here.
- (on_link_clicked, on_object_requested): Update for cid: changes.
- (on_url_requested): Kill off the kludgy, exploitable x-gnome-icon
- URL schema, update cid and x-evolution-data to match
- mail-format.c.
-
- It should now be easier to implement RFC 2557 (Content-Location,
- etc), but that RFC still pretty much sucks.
-
-2000-05-30 Dan Winship <danw@helixcode.com>
-
- * mail-format.c: Redo this back to the old way: a single GtkHTML
- with various things inline in it. (Gets rid of flicker, simplifies
- some scrolling, selecting, and printing issues.)
- (handle_text_enriched, handle_text_html): Use <iframe>s for these,
- to protect the rest of the document from their possibily invalid
- HTML.
- (handle_via_bonobo): Use (new-and-improved) <object> tags for
- this, moving most of the work back into mail-display.c
-
- * mail-display.c (on_object_requested): Move the Bonobo embedding
- code back here again (reorganized a bit).
- (on_url_requested): add x-evolution-data handler, for iframe
- bodies.
- (mail_html_new, mail_html_end): removed
- (mail_display_set_message, mail_display_new): Update for NWO.
-
-2000-05-30 Not Zed <NotZed@HelixCode.com>
-
- * folder-browser.c (search_set): Properly encode the search string.
-
-2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail.h: Added a prototype for providers_config_new() which
- is the constructor for the configuration dialog window
-
- * mail-config.c: Added set_service_url() which is basically
- the reverse of get_service_url().
- Implemented on_cmdCamelServicesOK_clicked() - The configuration
- window will now remember the Sendmail/SMTP data that the user
- had entered in the previous session.
- Removed on_cmdCamelServicesApply_clicked() - No need for this.
-
-2000-05-30 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_changed): call
- e_table_model_row_changed, not e_table_model_changed so we do less
- work, and don't lose the current selection.
- (select_msg): Set up a timer to mark the displayed message as
- "seen" if it's selected for longer than 1.5 seconds (a number
- pulled out of Matt's butt).
- (ml_value_at): Use the MESSAGE_STATUS column for read/unread as
- well as deleted.
-
- * message-list.c: use the "new" tigert pixmaps rather than the
- older ones. Includes a "replied to" icon (which is used now), but
- no "deleted" icon (although we have the strikeout renderer for
- that now).
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, message-list.h: Added bold for unread messages.
-
-2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * mail.h: Added a prototype for providers_config()
- which is the callback for a new menu item that
- will construct a configuration dialog for the camel
- providers and identities and display it
-
- * mail-config.c: Added some code to construct the
- new providers dialog and a bunch of callbacks (most
- of which are not yet useful)
-
- * mail-ops.c: Added the code for the providers_confi()
- callback
-
- * folder-browser-factory.c: Added the
- "Tools/Camel Providers Configuration ..." menu item
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Switched to using "cursor_change" signal instead
- of "row_selection" for switching messages. Select the first row
- (still doesn't work because of ETable.) Adapt to some small
- ETable changes. Set drawfocus to FALSE.
-
-2000-05-29 Not Zed <NotZed@HelixCode.com>
-
- * folder-browser.c (folder_browser_load_folder): Hardcode the
- vfolder source to just the inbox (so at least it returns
- something).
-
- * component-factory.c (create_test_storage): Create a vfolder dir
- first, and put the folders in that.
- (create_test_storage): Create the storage as VFolders, not
- "storage_name" :)
-
-2000-05-28 Dan Winship <danw@helixcode.com>
-
- * mail-config.c (error_dialog): helper function since we need to
- set "modal" on the dialogs returned by gnome_error_dialog to make
- them work when popped up from the modal Druid.
- (service_acceptable): New function to check if the info entered on
- a store/transport page actually checks out.
- (mail_config_druid): Connect to the "next" signal on the store and
- transport pages and don't let the user continue if the data is
- bad and "check this before continuing" is checked. Also, only
- display sources/transports in the "mail" domain. (Ie, not
- "vfolder".)
-
- * mail-format.c (write_recipients_to_stream): Use `foo@bar' rather
- than `<foo@bar>' for recipient with no name.
-
- * mail-ops.c (fetch_mail): don't put up an error message if the
- user cancels the password dialog.
-
-2000-05-27 Not Zed <NotZed@HelixCode.com>
-
- * Makefile.am (SHELL_OBJS): Include mail storage so we can
- initialise folders.
-
- * component-factory.c (create_test_storage): Parses vfolder
- defintions and adds them to the storage. Definetly needs more
- work.
-
- * folder-browser-factory.c (control_activate): Add the VFolder
- druid menu item.
- (control_deactivate): And remove it.
-
- * mail-ops.c (vfolder_editor_clicked): For editing vfolder
- definitions (rather like filters, oddly enough :). Tries to
- update the shell but it doesn't seem to work properly - requires a
- mail component restart to take effect.
-
- * folder-browser.c (folder_browser_load_folder): Handle vfolder:
- urls' appropriately and map to camel. Still needs a way to tell
- the vfolder what folders to search! (all vfolders come up empty!).
-
-2000-05-28 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c, message-list.h: Added a COL_DELETED and made it
- the strikeout column for both text renderers.
-
-2000-05-27 Dan Winship <danw@helixcode.com>
-
- * mail-format.c: Various improvements:
-
- (call_handler_function, etc): Add a "mime_type" argument to the
- handlers, so that if a part is tagged as
- "application/octet-stream", and we figure out that it's really
- something else, the handler we call can know what that something
- else is.
-
- (handle_text_enriched): Small fixes to make this not do
- text/enriched-specific syntax in text/richtext or vice versa.
-
- (handle_mystery): Allow for mystery data that can't even be saved
- to disk. (ie, unrecognized external-body). Let the caller specify
- the URL to use.
-
- (handle_message_external_body): New function to deal with
- message/external-body parts. Generates URLs for anon-ftp,
- local-file, and URL access-types, and a more-useful-than-before
- descriptive message for other types.
-
- (handle_audio, handle_undisplayable): Use gnome_mime_get_value to
- try to get a description of the MIME type to display to the user
- rather than the raw form. (This will only work if the user has
- recent gnome-vfs installed. [If they don't, it works just like
- it used to.])
-
-2000-05-26 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (handle_text_html): Fix a bug (security/stability)
- in its usage of mail_html_write.
-
- * mail-ops.c (composer_send_cb, reply): set CAMEL_MESSAGE_ANSWERED
- on a message after a successful reply.
-
- * message-list.c (folder_changed): free the summary with
- camel_folder_free_summary rather than g_ptr_array_free.
-
- * mail-format.c (handle_via_bonobo): Update for PersistStream
- changes
-
-2000-05-25 Ettore Perazzoli <ettore@helixcode.com>
-
- * main.c (main): Initialize the component factory.
-
- * Makefile.am (evolution_mail_LDADD): Link with
- `evolution-shell-component.o' from the shell directory.
-
- * evolution-mail.oafinfo: Updated with the
- Evolution::ShellComponent OAFIID.
-
- * evolution-mail.gnorba: Updated with the
- Evolution::ShellComponent GOAD ID.
-
- * folder-browser-factory.c (folder_browser_factory_new_control):
- New function; code moved out from `folder_browser_factory'.
- (folder_browser_factory): Use it.
-
- * component-factory.c: New.
- * component-factory.h: New.
-
-2000-05-24 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (composer_send_cb): connect to and disconnect from
- the transport.
-
-2000-05-24 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added libepaned.a.
-
- * folder-browser.c: Switched from GtkPaned to EPaned.
-
-2000-05-23 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am: Don't link to `evolution-service-repository.o'
- anymore.
-
- * folder-browser-factory.c: Don't use crufty service-repository
- anymore.
-
-2000-05-21 Ettore Perazzoli <ettore@helixcode.com>
-
- * message-list.c (get_message_info): Made static.
- (ml_initialize_value): Return NULL to placate compiler.
-
- * folder-browser.c (folder_browser_gui_init): Add cast.
-
- * mail-display.c (mail_html_new): Don't pass an empty URL to
- `gtk_html_begin()' anymore.
-
- * mail-config.c (put_html): Don't pass an empty URL to
- `gtk_html_begin()' anymore.
-
- * mail-display.h: Updated for the new GtkHTML API that uses
- `GtkHTMLStream *' instead of `GtkHTMLStreamHandle'.
- * mail-display.c: Likewise.
- * mail-config.c: Likewise.
- * mail-format.c: Likewise.
-
-2000-05-19 NotZed <NotZed@HelixCode.com>
-
- * mail-format.c: Fixes for stream stuff.
-
- * mail-display.c (save_data_cb): Remove exception stuff on streams.
-
-2000-05-19 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Added initialize_value and value_is_empty
- callbacks.
-
-2000-05-18 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (folder_browser_factory): Remove
- development_warning (moved to shell)
-
- * message-list.c (select_msg): Update for camel_folder_get_uids
- (folder_changed, message_list_set_folder): Update for
- camel_folder_get_summary
-
- * mail-ops.c (fetch_mail): Update for camel_folder_get_uids
-
-2000-05-17 Dan Winship <danw@helixcode.com>
-
- * mail-component.c: This seems to be cruft. Nuke it.
-
- * mail-display.c (save_data_cb, save_data, on_url_requested):
- * mail-format.c (handle_text_plain_flowed, handle_text_html):
- Use camel_data_wrapper_write_to_stream rather than
- camel_data_wrapper_get_output_stream.
-
-2000-05-16 NotZed <NotZed@HelixCode.com>
-
- * mail-ops.c (filter_edit): Function to bring up the filter editor.
- (filter_druid_clicked): Save/close dialogue.
- (fetch_mail): Apply filters to incoming mail ... *hold breath*
- If we are coming from a non-indexed/searchable/etc source, then
- copy it to an mbox first. When copying mail from an mbox source,
- dont remove it aftewards, open it for append, so partially
- filtered mail isn't lost.
-
- * Makefile.am (evolution_mail_LDADD): Added libfilter.
- (INCLUDES): Add EVOLUTION_DATADIR, and fix matt's brokeneditor(tm)
- for putting spaces instead of tabs in.
-
-2000-05-16 Christopher James Lahey <clahey@helixcode.com>
-
- * mail-format.c: Removed usage of bonobo_object_destroy.
-
-2000-05-14 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Updated to work with new ETable resizing.
-
-2000-05-12 NotZed <NotZed@HelixCode.com>
-
- * mail-ops.c (fetch_mail): Use 6 X's to mkstemp, as required by
- the man page, just a temp fix, this should probably change to a
- known filename.
-
-2000-05-11 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Now that we depend
- on current gnome-libs we can make the toolbar detachable again.
-
-2000-05-11 Federico Mena Quintero <federico@helixcode.com>
-
- * folder-browser-factory.c (development_warning): Left-justify the
- message.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser-factory.c (development_warning): Made this dialog
- have fewer buttons.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * folder-browser-factory.c (development_warning): New development
- warning text from Nat.
-
-2000-05-10 Larry Ewing <lewing@helixcode.com>
-
- * mail-config.c (html_new): only set the default background color
- if style is not NULL.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Removed folder-browser-factory.h since it doesn't
- exist. Added mail-display.h, mail-types.h, pixmaps.h.
-
-2000-05-09 Matt Loper <matt@helixcode.com>
-
- * folder-browser-factory.c (control_activate): Remove "File->mail"
- menuitem.
-
- * mail-config.c (mail_config_druid): Fill in "blah blah blah".
-
-2000-05-09 Dan Winship <danw@helixcode.com>
-
- * folder-browser.c (folder_browser_load_folder): make this a
- little less kludgy. Use gnome_error_dialog rather than printf on
- errors.
-
- * mail-ops.c (fetch_mail): Fix to work with the new shell stuff...
- sorta. Will need more fixing later when the new shell framework is
- more done.
-
- * mail-config.c (finish): Call gnome_config_sync so the data
- actually gets written.
-
-2000-05-08 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (save_data_cb):
- (on_url_requested): Update for CamelStream CamelException changes.
-
- * mail-format.c: Pass NULL for a CamelException in a bunch of
- places... the user will see that the data is not being displayed,
- and there's not a lot we can do, and none of these things should
- be failing anyway. Maybe fix this later.
-
-2000-05-07 NotZed <NotZed@HelixCode.com>
-
- * message-list.c (ml_value_at): Size moved to message info, rather
- than content info structure.
-
-2000-05-07 Dan Winship <danw@helixcode.com>
-
- * message-list.c (select_msg): unref the message after displaying
- it.
-
- * mail-format.c (get_data_wrapper_text):
- (handle_text_plain_flowed):
- (handle_via_bonobo): Replace camel_stream_close calls.
-
-2000-05-07 Matt Loper <matt@helixcode.com>
-
- * folder-browser-factory.c: Changed a toolbar button from saying
- "New mail" (which suggests you might be composing new mail) to
- "Get mail".
-
-2000-05-06 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (folder_browser_factory): Don't
- hardcode "inbox" here.
-
- * folder-browser.c (folder_browser_set_uri): Don't hardcode
- "inbox" here either.
- (folder_browser_load_folder): Create a new store according to the
- folder browser's URI, and load the mbox file from that store.
- Parts of this are temporary.
-
- * session.c, mail.h: There is no longer a global store, just a
- global session.
-
- * mail-config.c, mail-ops.c: Update for default_session -> session
- change. fetch_mail is currently broken.
-
-2000-05-06 Dan Winship <danw@helixcode.com>
-
- * mail-config.c: New code to configure identity, mail source, and
- mail transport.
- (mail_config_druid): A druid using the config widgets. (Only
- allows configuration of a single identity, source, and transport.)
-
- * mail-ops.c (check_configured): New function to make sure the
- user has configured stuff, and call the druid if not.
- (fetch_mail, send_msg, send_to_url, reply, forward_msg): Call
- check_configured
- (composer_send_cb): Make this pass the message to a CamelTransport
- rather than just printing it to stdout.
-
- * folder-browser-factory.c (development_warning): Add a warning
- about sending mail, since you can do that now.
-
-2000-05-06 Chris Toshok <toshok@HelixCode.com>
-
- * .cvsignore: ignore evolution-mail.pure
-
- * Makefile.am: add support for building evolution-mail.pure
-
-2000-05-06 Dan Winship <danw@helixcode.com>
-
- * mail.h: consolidate mail-format.h, mail-identify.h, mail-ops.h,
- main.h and session.h into this new file. There's no reason to have
- a .h for every .c.
-
-2000-05-05 Anders Carlsson <andersca@gnu.org>
-
- * test-mail.c (create_container): Use the OAFIID when using an
- OAF-enabled build of bonobo.
-
-2000-05-04 NotZed <NotZed@HelixCode.com>
-
- * message-list.c (message_list_set_folder): Get the whole message
- summary right away.
- (folder_changed): And if we change too.
- (ml_row_count): Use the match count or summary table length as the
- row count.
- (get_message_info): Use array references to lookup message summary
- info. For the search result list, use the summary_search_cache to
- cache the info lookup.
- (message_list_init): Allocate the summary search cache.
- (message_list_destroy): Free the summary search cache and the
- summary table, if there is one to free.
- (message_list_set_search): Save the match count, and clear the
- summary search cache for reuse.
- (folder_changed): Re-retrieve the summary list if the folder has
- changed.
- (message_list_set_folder): Retrieve the summary list when opening
- the folder.
-
-2000-05-03 Jason Leach <leach@wam.umd.edu>
-
- * Makefile.am (evolution_mail_LDADD): s/-lunicode/$(UNICODE_LIBS)/
- in the LDADD section.
-
-2000-05-03 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (write_recipients_to_stream, write_headers): Make
- the "Cc:" field optional again. (Before, we could check if
- camel_mime_message_get_recipients returned NULL, but now we need
- to actually look into the returned CamelInternetAddress object.)
-
-2000-05-03 Larry Ewing <lewing@helixcode.com>
-
- * folder-browser.c (folder_browser_gui_init): comment out the
- changed signal for now.
-
-2000-05-02 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: set G_LOG_DOMAIN.
-
-2000-05-02 Larry Ewing <lewing@helixcode.com>
-
- * message-list.c (message_list_set_search): only free search if it
- is not NULL.
-
-2000-05-02 NotZed <NotZed@HelixCode.com>
-
- * folder-browser.c (folder_browser_gui_init): Connect the changed
- signal to search, so it searched immediately?
-
-2000-05-01 NotZed <NotZed@HelixCode.com>
-
- * pixmaps.h: Added envelope-deleted state.
-
- * folder-browser-factory.c: Setup callback for actual delete op.
- (control_activate): Setup a tool menu item to expnge deleted
- messages.
-
- * mail-ops.c (delete_msg): Toggle the delete flag on a message.
- (expunge_folder): New function to expunge deleted messages from
- the current folder.
-
- * folder-browser.c (folder_browser_gui_init): A hackish little
- quick-search entry.
- (search_activate): Perform a quick-search on the folder subject
- only.
- (folder_browser_gui_init): Add an option meny to the search line.
- (create_option_menu): Build the option menu from a table.
- (search_set): Build a search from another string whent he option
- menu or text item is changed. 5 search options are defined so
- far.
-
- * message-list.c (get_message_info): If there is an active search,
- then get the data from that ... use this instead of
- _get_message_info().
- (ml_row_count): If we have an active search, get the info from its
- result.
- (select_msg): Changed to use get_message_info, so searches work.
- (ml_value_at): And same here.
- (message_list_init_renderers): Added a 3rd state to message_status
- = deleted.
- (ml_value_at): Show the message state as deleted, if it is marked
- for deletion.
- (folder_changed): When the folder changes, update the display.
- (message_list_set_folder): Connect to the folder_changed event
- here.
- (message_changed): Callback to update the display when the message
- changes.
- (select_msg): And connect to the message_changed signal so we know
- when it cahgnes.
- (message_list_set_search): Save the search string.
- (folder_changed): If the folder changes, re-run the search,
- otherwise we may end up with invalid entries in the display.
-
- * mail-display.c: Include missing errno.h.
-
-2000-04-30 Dan Winship <danw@helixcode.com>
-
- * session.c (session_providers_init): This is no longer necessary.
-
- * mail-ops.c (fetch_mail): Remove kludge to load remote provider,
- as camel can do it by itself now.
-
-2000-04-29 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (on_link_clicked): Handle clicks on "cid" URLs by
- popping up a "Save Attachment" dialog.
-
- * mail-format.c (get_cid): if the part has a Content-Disposition
- with a filename specified, record (a sanitized version of) that on
- the wrapper when creating the cid reference, so the "save
- attachment" code can use it later.
- (handle_mystery): fix a bug in the cid generation here.
-
-2000-04-29 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (lookup_handler, etc): Improve the builtin vs
- bonobo selection code.
- (handle_mystery): Include name and Content-Description in the
- "mystery data" info, when available
- (handle_unknown_type): Call mail_identify_mime_part before
- giving up.
- (handle_undisplayable): Split out of handle_unknown_type now
- that handle_unknown_type can try alternate viewers.
- (handle_via_bonobo): Fall back to handle_undisplayable if the
- bonobo control fails.
-
- * mail-identify.c (mail_identify_mime_part): New function to
- attempt to identify a MIME part that we can't identify based on
- Content-Type alone.
-
- * mail-display.c (on_url_requested): redo the mystery data icon
- display stuff less kludgily.
-
-2000-04-28 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (write_recipients_to_stream, write_headers,
- mail_generate_reply): Update (minimally) for Camel recipient
- changes.
-
-2000-04-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * main.c (init_bonobo): Don't call `init_corba()' and don't get
- any args.
- (init_corba) [!USING_OAF]: Fix args.
-
-2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * folder-browser-factory.c: New macro `CONTROL_FACTORY_ID', which
- is #defined to a different value according to whether we are
- `USING_OAF' or not.
- (folder_browser_factory_init): Use `CONTROL_FACTORY_ID'.
-
- * test-mail.c
- (init_corba): New helper function, implemented differently
- according to `USING_OAF'.
- (main): Use `init_corba()'.
-
- * main.c
- (init_corba): New helper function, implemented differently
- according to `USING_OAF'.
- (init_bonobo): Use `init_corba()'.
-
- * Makefile.am: Install OAF stuff if `USING_OAF'. Add
- `-I$(datadir)/idl' to the `orbit-idl' command-line so that we can
- use Bonobo IDL files installed under our prefix as well. Also,
- use `$(ORBIT_IDL)' instead of hardcoded `orbit-idl'.
-
- * evolution-mail.oafinfo: New file.
-
-2000-04-27 Dan Winship <danw@helixcode.com>
-
- * mail-format.c: Move text_to_html to e-util.
-
- * mail-ops.c (send_to_url): New routine. Thin wrapper for
- e_msg_composer_new_from_url.
-
- * mail-display.c (on_link_clicked): print a warning for news or
- nntp URLs (which we'll deal with some day), and call send_to_url
- for mailto URLs.
-
- * mail-format.c (text_to_html): Improve URL conversion code.
- Recognize https, recognize "www\..*" without a prefixed "http://".
- Properly escape &, <, >, etc in URL strings. Don't be fooled by
- "mailto:", "http://", etc with no following data.
-
-2000-04-26 Dan Winship <danw@helixcode.com>
-
- * mail-format.c (text_to_html): Reorganize a bit and add a new
- flag, TEXT_TO_HTML_CONVERT_URLS to recognize and wrap URLs
- in text.
-
- * mail-display.c (mail_html_new): Add link_clicked signal handler.
- (on_link_clicked): Use gnome_url_show to launch a browser.
-
- * mail-format.c: update for CamelStream changes. Update for
- CamelMimeBodyPart -> CamelMimePart
-
-2000-04-25 Dan Winship <danw@helixcode.com>
-
- * mail-display.c, mail-format.c: Redo large chunks of this. The
- mail display now consists of a vbox in a scrolled window, in which
- we put multiple GtkHTML objects. This means broken HTML in one
- part can't corrupt other parts. The headers now scroll with the
- body. Unrecognized attachments look prettier, but still don't do
- anything, and will probably be changed later. We can also now
- display nested message/rfc822 parts and multipart/alternatives
- with multipart subparts. Oh, and text/{richtext,enriched}, since
- we had all these ancient sample messages that use it and the lack
- of support annoyed me. :)
-
- Bonobo embeddables are broken right now, but I don't think that's
- my fault.
-
- * mail-format.c (reply_body): Fix some bugs that crept into reply
- generation. This needs a lot more work to deal correctly with
- complicated bodies.
- (setup_function_table): pass unknown text subtypes to
- handle_text_plain.
- (handle_multipart_appledouble): new handler. Just ignores the
- first (application/applefile) part and tries to display the
- second part. Since the second part is usually
- application/octet-stream, this doesn't work very well still
- usually.
- (reply_body): Make this deal better with multiparts.
-
- * mail-format.c, mail-display.c: Now that we're not limited to
- a single GtkHTML for the display, there's no reason to embed
- Bonobo objects for unrecognized content-types in GtkHTML rather
- than embedded them into the vbox directly. So do that.
-
- Meanwhile, fix up the handler-selection code so that we can
- declare which built-in handlers are more desirable than external
- handlers and which are less. (Of course, eventually we'll want
- this to be customizable.) Add some cleverness to
- handle_multipart_alternative as well so it doesn't accept an
- alternative which we can display generically over one we can
- display specifically.
-
- * mail-format.c (text_to_html): add a convert_space_hack flag,
- which turns N spaces into N-1 &nbsp;s and a space.
- (handle_text_plain): Check for "format=flowed" in the
- Content-Type.
- (handle_text_plain_flowed): Spinoff of handle_text_plain to deal
- with RFC 2646 flowed text. (All the examples I can find of it
- are generated by Eudora, but it's a pretty cool idea that ought
- to be used more widely.)
-
-2000-04-23 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c: rename "send" to "send_msg", to avoid
- name clash with the tcp function. Connect the "forward" button.
-
- * mail-ops.c: rename "send" to "send_msg", to avoid name clash
- with the tcp function. Add forward_msg function.
-
- * mail-format.c (mail_generate_forward): support function for
- forward_msg. Pretty much a big kludge right now, pending the
- attachment/attachment-bar changes.
-
-2000-04-22 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (on_url_requested): Change cid expectations to
- match current camel reality.
-
- * main.c (main): call glade_gnome_init, for composer.
-
- * folder-browser-factory.c: move msg_composer_cb and
- msg_composer_send_cb to mail-ops. Attach send, reply, and "reply
- to all" buttons.
-
- * mail-ops.c (composer_send_cb, send): moved from
- folder-browser-factory.c.
- (reply_to_sender, reply_to_all): new functions to do replies.
-
- * mail-format.c (text_to_html): Add an "add_pre" flag, to make
- it wrap the output in <pre></pre>.
- (mail_generate_reply): New function to create a composer and build
- a reply in it.
-
-2000-04-21 Dan Winship <danw@helixcode.com>
-
- * mail-display.c (on_url_requested): deal with cid: URLs.
- (find_cid): helper routine for above. (This could be much better.)
- (mail_display_init): connect url_requested signal
-
- * mail-format.c (handle_multipart_related): Make this work.
-
- * mail-display.c (mail_display_set_message): ref the message we
- display, since we're going to unref it when we remove it. Fixes a
- bug that showed up with the new camel code, but it's not obvious
- if it's due to a bug or a feature in the new code.
-
-2000-04-20 NotZed <NotZed@HelixCode.com>
-
- * Makefile.am (evolution_mail_LDADD): Add libibex.la to link.
-
- * message-list.h: Removed folder summary.
-
- * message-list.c: Dont include folder-summary anymore.
- (select_msg): Changed to use folder, not summary in
- summary_get_message_info(). God this code is grotty.
- (ml_value_at): Ditto.
- (ml_value_at): Changed to use new interface. Hmm, this returns a
- static variable, that seems wrong.
- (message_list_set_folder): Remove folder summary.
- (ml_row_count): Oops, remove some debug i put there.
-
-2000-04-20 Dan Winship <danw@helixcode.com>
-
- * mail-display.c: update for bonobo change, and remove a
- now-unused variable.
-
-2000-04-17 Chris Toshok <toshok@helixcode.com>
-
- * message-list.c (on_row_selection_idle): new function, actually
- calls select_msg.
- (on_row_selection_cmd): register an idle instead of calling
- select_msg directly. this fixes the lag before the row is
- selected - selection is instantaneous now, with message loading
- happening afterward.
-
- * message-list.h: add row_to_select and an idle_id to the message
- list to make the select_msg call happen in an idle func.
-
- * message-list.c (message_list_init_renderers): no more
- e_cell_set_editable. this info always comes from the model.
-
-2000-04-14 Dan Winship <danw@helixcode.com>
-
- * mail-format.[ch]: Moved from camel/camel-formatter, and changed
- slightly. (More to come.)
-
- * html-stream.[ch]: No longer necessary. mail-format uses
- GtkHTMLStreamHandles directly.
-
- * mail-display.[ch]: update for new message formatting code.
-
-2000-04-14 Chris Toshok <toshok@helixcode.com>
-
- * folder-browser-factory.c (control_activate): use
- gnome_app_fill_toolbar_with_data, so we get the beautiful gnome
- toolbar.
-
-2000-04-14 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (development_warning): Fix up the
- warning message a bit.
- (folder_browser_factory): Make the warning bypassable.
-
-2000-04-12 Miguel de Icaza <miguel@gnu.org>
-
- * main.c (main): Call e_cursors_init.
-
-2000-04-10 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c (fetch_mail): use camel_movemail when fetching mail
- from an mbox store. This leaves behind temp files for now,
- because CamelMboxFolder::delete is too confused to use, and NotZed
- is rewriting CamelMboxFolder, so I'm not going to bother to try to
- fix it.
-
- * mail-ops.c: Add some #includes for the non-HAVE_MKSTEMP case
-
-2000-04-09 Matt Loper <matt@helixcode.com>
-
- * folder-browser.c (folder_browser_new): set folder_browser->uri
- to NULL, so that we know when to free it.
-
-2000-04-07 Miguel de Icaza <miguel@gnu.org>
-
- * message-list.c (states_pixmaps): Add more beautiful art from
- Miggue, the Diego Rivera of the next millenium.
- (message_list_init_header): Use the beautiful art.
-
- * pixmaps: Miguel rediscovers the "transparent" concept.
-
-2000-04-07 Matt Loper <matt@helixcode.com>
-
- * folder-browser.c (folder_browser_destroy): Unref the shell
- interface that we have a handle to.
-
- * folder-browser-factory.c (control_destroy_cb): New function;
- destroys a folder-browser when its control is destroyed.
- (folder_browser_factory): Hook up to the above.
-
-2000-04-07 Dan Winship <danw@helixcode.com>
-
- * mail-ops.c: new file, for toolbar/menu callbacks
- (fetch_mail): fetch mail. Doesn't do mbox locking. Many kludges.
-
- * folder-browser-factory.c (control_activate): use new fetch_mail
- function as the callback for the "New mail" icon. Rename check_cb
- to random_cb.
-
- * Makefile.am: don't build test-sources since the version in
- CVS doesn't do much and once I've fixed it it won't be a separate
- program. Add mail-ops.[ch].
-
-2000-04-06 Miguel de Icaza <miguel@gnu.org>
-
- * message-list.c: Stick pixmaps here.
-
- * mail-display.c (embeddable_destroy_cb): Replaced C++ comments
- with C comments.
-
- * message-list.c (load_internal_images): New function, loads images.
- (message_list_init_renderers): Load images, fix previous attempt
- at loading images.
-
- * Makefile.am (dist-hook): Added distribution of pixmaps.
-
- * pixmaps: New directory, used to hold the XPMs we ship with.
-
- * pixmaps/envelope-closed.xpm, pixmaps/envelope-open.xpm: Tigert's
- envelopes incorporated.
-
-2000-03-31 Miguel de Icaza <miguel@gnu.org>
-
- * message-list.c (ml_value_at): Fix miss-used variable.
-
-2000-04-01 Michael Meeks <michael@helixcode.com>
-
- * folder-browser.c (folder_browser_properties_init): update to
- new property (folder_browser_property_changed): kill.
- (get_prop, set_prop): do the donkey work + make properly RW.
-
-2000-03-31 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (folder_browser_set_shell):
- * folder-browser.c (folder_browser_new):
- * message-list.c (on_row_selection_cmd, select_msg,
- message_list_init, message_list_set_folder):
-
- remove debugging printf()s that no longer seem useful
-
-2000-03-29 Dan Winship <danw@helixcode.com>
-
- * folder-browser-factory.c (control_activate): build a toolbar.
- (control_deactivate): and hide it.
-
-2000-03-27 Chris Toshok <toshok@helixcode.com>
- * mail-display.c: quiet warnings when building in ../po
-
-2000-03-26 Miguel de Icaza <miguel@gnu.org>
-
- * folder-browser-factory.c (folder_browser_set_shell): Memory leak
- fix.
-
-2000-03-25 Dan Winship <danw@helixcode.com>
-
- * message-list.c (select_msg, ml_value_at): update for summary
- changes. Hey, neat, it really does make it more efficient.
-
-2000-03-22 Christopher James Lahey <clahey@helixcode.com>
-
- * .cvsignore: Updated .cvsignore.
-
-2000-03-21 Matt Loper <matt@helixcode.com>
-
- * mail-display.c: Minor cleanup & commenting.
-
- * folder-browser-factory.c: Minor cleanup & warning elimination.
-
-2000-03-21 bertrand <bertrand@helixcode.com>
-
- * message-list.c (ml_value_at): display message size
-
-2000-03-20 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Properly ref & sink the table and header models.
-
-2000-03-14 Dan Winship <danw@helixcode.com>
-
- * mail-sources.c: First cut at a mail source selection wizard.
- Basically a rigged demo at this point. Doesn't use camel to get
- its information, and is not yet complete or integrated with the
- mail component. Did I mention that the code is ugly?
-
-2000-03-13 bertrand <bertrand@helixcode.com>
-
- * folder-browser-factory.c (folder_browser_set_shell):
- for testing and demonstration purpose, immediately
- register a fake service.
-
-2000-03-12 bertrand <bertrand@helixcode.com>
-
- * folder-browser-factory.c (folder_browser_factory_init):
- name change.
- (control_activate_cb): when the control is activated,
- it merges its own UI with the remote UIHandler.
- (control_add_menu): sample menu merging.
- (folder_browser_factory): connect the control "activate" signal.
-
- * evolution-mail.gnorba:
- name changes
-
- * folder-browser.h: added a reference to an
- Evolution::Shell object.
-
- * folder-browser-factory.c (folder_browser_set_shell):
- (folder_browser_control_add_service_repository_interface):
- (folder_browser_factory): the folder-browser control now
- implements the Evolution/ServiceRepository interface.
-
-2000-03-07 bertrand <bertrand@helixcode.com>
-
- * folder-browser-factory.c (development_warning):
- added a warning so that the user knows that this
- version may crash his mails.
-
-2000-03-05 bertrand <bertrand@helixcode.com>
-
- * message-list.h: include a referrence to the parent
- folder browser.
-
- * message-list.c (ml_value_at): use the message summary
- from the
-
- * html-stream.c (html_stream_close): when the stream
- is closed, set the html stream to NULL
- (html_stream_write): don't write anything if the
- html handle does not exist.
- (html_stream_reset): implemented. close the current
- html handle and begins a new html parser.
-
- * session.c (session_store_new): use static exception
- here.
-
-2000-03-05 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Added a prototype message listing.
-
-2000-03-04 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Set up the column headers properly.
-
- * folder-browser.c: Show the folder_browser widget.
-
-2000-03-04 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Define ml_duplicate_value and ml_free_value
- correctly.
-
-2000-03-04 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Use g_int_compare and g_str_compare as we should
- be instead of g_int_equal and g_str_equal.
-
-2000-03-04 bertrand <bertrand@helixcode.com>
-
- * test-mail.c (main): replace the bonobo-active/gtk-main
- by bonobo-main.
- Include Gnorba headers.
- (main): don't call the container creation routine
- before we entered the main loop. Use idle for that.
-
-2000-03-04 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Change this to use the ETable widget itself
- instead of building it from all the parts.
-
-2000-03-03 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Ref the table columns since we unref them at the
- end.
-
-2000-03-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (INCLUDES): Add `$(top_srcdir)'. Also, the
- `top_srcdir' includes must come first everything else to avoid
- including installed headers instead of our fresh ones.
-
-2000-02-28 NotZed <NotZed@HelixCode.com>
-
- * Makefile.am (evolution_mail_LDADD): Fixed references to eutil.
-
-2000-02-24 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Changed to match new e_table_simple interface.
-
-2000-02-24 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_list_set_folder): update for CamelFolder
- changes
-
-2000-02-24 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Changed this to not use the "x" and "y"
- arguments to e-table-item.
-
-2000-02-23 Matt Loper <matt@helixcode.com>
-
- * message-list.c (message_list_set_folder): Check 'desc'riptions
- of exceptions.
-
-2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * message-list.c (message_list_set_folder):
- fix to show a sample correct implementation.
-
-2000-02-21 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: added -lunicode to evolution_mail_LDADD.
-
-2000-02-21 Dan Winship <danw@helixcode.com>
-
- * session.c (session_store_new): Pass a CamelAuthCallback
- (evolution_auth_callback) to camel_session_new.
-
-2000-02-21 Dan Winship <danw@helixcode.com>
-
- * session.c (session_store_new): Update session_store_new to
- deal with the fact that camel_session_get_store takes a
- CamelException now. Doesn't actually do anything with the
- exception yet, because nothing else does yet either.
-
-2000-02-19 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: added test-mail.
-
-2000-02-14 Miguel de Icaza <miguel@gnu.org>
-
- * folder-browser.c (folder_browser_load_folder): New routine,
- loads a camel folder.
- (folder_browser_set_uri): redo.
-
- * session.c: new file. Implements SessionStores to keep track of
- a Session/Store tuple.
-
-2000-02-13 Matt Loper <matt@helixcode.com>
-
- * html-stream.c (html_stream_new): Second param of gtk_html_begin
- should be "", not NULL.
- (html_stream_new): gtk_html_parse() is deprecated, so the call was
- removed.
-
- * html-stream.h: HTMLStreamClass's parent changed to
- CamelStreamClass, not CamelStream.
-
-2000-02-11 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Add the e-text directory to the includes list.
-
- * message-list.c: Change the call to e_cell_text_new, since
- there's an added argument.
-
-2000-02-09 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added libetext as libetable depends on it.
-
-2000-02-08 Iain Holmes <ih@csd.abdn.ac.uk>
-
- * Makefile.am: Changed the order of the compilation so the CORBA stuff
- was made before it was needed.
-
-2000-01-19 Miguel de Icaza <miguel@gnu.org>
-
- * Started work on the mail display engine.
-
- * html-stream.c, html-stream.h: New files, they are CamelStreams
- used to write to the GtkHTML widget.
-
diff --git a/mail/GNOME_Evolution_Mail.oaf.in b/mail/GNOME_Evolution_Mail.oaf.in
deleted file mode 100644
index b693e8863d..0000000000
--- a/mail/GNOME_Evolution_Mail.oaf.in
+++ /dev/null
@@ -1,141 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ControlFactory"
- type="exe"
- location="evolution-mail">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution mail folder factory component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Control"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_ControlFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/evolution-mail:1.0"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution mail folder display component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ShellComponent"
- type="exe"
- location="evolution-mail">
-
- <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 mail."/>
-
- <oaf_attribute name="evolution:shell-component-icon" type="string"
- value="evolution-inbox.png"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"
- type="exe"
- location="evolution-mail">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Mail Summary component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory">
-
- <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 mail executive summary component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerFactory"
- type="exe"
- location="evolution-mail">
-
- <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 Evolution composer."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Composer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_ComposerFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution:Composer:1.0"/>
- <item value="IDL:Bonobo/ItemContainer:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution mail composer."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_MailConfig_Factory"
- type="exe"
- location="evolution-mail">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/GenericFactory:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_MailConfig"
- type="factory"
- location="OAFIID:GNOME_Evolution_MailConfig_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/MailConfig:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Mail configuration interface"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_FolderInfo_Factory"
- type="exe"
- location="evolution-mail">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/GenericFactory:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_FolderInfo"
- type="factory"
- location="OAFIID:GNOME_Evolution_FolderInfo_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/FolderInfo:1.0"/>
- </oaf_attribute>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard_Factory"
- type="exe"
- location="evolution-mail">
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Wizard_Factory">
-</oaf_server>
-
-</oaf_info>
diff --git a/mail/Mail.idl b/mail/Mail.idl
deleted file mode 100644
index f68889e0c2..0000000000
--- a/mail/Mail.idl
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * mail.idl: Mail interfaces for Evolution
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-
- interface MessageList : Bonobo::Unknown {
-
- void selectMessage (in long message_number);
- void openMessage (in long message_number);
- };
-
- /*
- * FolderBrowser object.
- *
- * configuration of this widget is done trough
- * Bonobo Properties
- */
- interface FolderBrowser : Bonobo::Unknown {
- MessageList getMessageList ();
- };
-
- interface FolderInfo : Bonobo::Unknown {
- struct MessageCount {
- string path;
- long count;
- long unread;
- };
-
- void getInfo (in string foldername,
- in Bonobo::Listener listener);
- };
-
- interface MailConfig : Bonobo::Unknown {
-
- struct Identity {
- string name;
- string address;
- string organization;
- string signature;
- string html_signature;
- boolean has_html_signature;
- };
-
- struct Service {
- string url;
- boolean keep_on_server;
- boolean auto_check;
- long auto_check_time;
- boolean save_passwd;
- boolean enabled;
- };
-
- struct Account {
- string name;
-
- Identity id;
- Service source;
- Service transport;
-
- string drafts_folder_name;
- string drafts_folder_uri;
- string sent_folder_name;
- string sent_folder_uri;
- };
-
- void addAccount (in Account acc);
- };
-
- interface MailFilter : Bonobo::Unknown {
-
- void addFilter (in string rule);
-
- void removeFilter (in string rule);
- };
-};
-};
-
diff --git a/mail/Makefile.am b/mail/Makefile.am
deleted file mode 100644
index 4eaf97833a..0000000000
--- a/mail/Makefile.am
+++ /dev/null
@@ -1,173 +0,0 @@
-SUBDIRS = importers
-
-bin_PROGRAMS = evolution-mail
-
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-importerdir = $(libdir)/evolution/evolution-mail-importers/$(VERSION)
-
-INCLUDES = \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/widgets/e-text \
- -I$(top_srcdir)/widgets/misc \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir) \
- -I$(top_srcdir)/composer \
- -I$(top_builddir)/composer \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/shell/importer \
- -I$(top_builddir)/shell/importer \
- $(MAILER_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_BUTTONSDIR=\""$(buttonsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
- -DMAIL_IMPORTERSDIR=\""$(importerdir)"\" \
- -DG_LOG_DOMAIN=\"evolution-mail\"
-
-EVOLUTION_MAIL_CORBA_GENERATED = \
- Mail.h \
- Mail-common.c \
- Mail-skels.c \
- Mail-stubs.c
-
-if ENABLE_NNTP
-EVOLUTION_MAIL_NNTP = \
- mail-account-editor-news.c \
- mail-account-editor-news.h
-endif
-
-
-evolution_mail_SOURCES = \
- $(EVOLUTION_MAIL_CORBA_GENERATED) \
- $(EVOLUTION_MAIL_NNTP) \
- component-factory.c \
- component-factory.h \
- e-searching-tokenizer.c \
- e-searching-tokenizer.h \
- folder-browser.c \
- folder-browser.h \
- folder-browser-factory.c \
- folder-browser-factory.h \
- folder-browser-ui.c \
- folder-browser-ui.h \
- folder-info.c \
- mail-accounts.c \
- mail-accounts.h \
- mail-account-editor.c \
- mail-account-editor.h \
- mail-account-gui.c \
- mail-account-gui.h \
- mail-autofilter.c \
- mail-autofilter.h \
- mail-callbacks.c \
- mail-callbacks.h \
- mail-config.c \
- mail-config.h \
- mail-config-druid.c \
- mail-config-druid.h \
- mail-crypto.c \
- mail-crypto.h \
- mail-display.c \
- mail-display.h \
- mail-folder-cache.c \
- mail-folder-cache.h \
- mail-format.c \
- mail-identify.c \
- mail-importer.c \
- mail-importer.h \
- mail-local.c \
- mail-local.h \
- mail-mt.c \
- mail-mt.h \
- mail-offline-handler.c \
- mail-offline-handler.h \
- mail-ops.c \
- mail-ops.h \
- mail-search.c \
- mail-search.h \
- mail-search-dialogue.c \
- mail-search-dialogue.h \
- mail-send-recv.c \
- mail-send-recv.h \
- mail-session.c \
- mail-session.h \
- mail-tools.c \
- mail-tools.h \
- mail-types.h \
- mail-vfolder.c \
- mail-vfolder.h \
- message-browser.c \
- message-browser.h \
- main.c \
- message-list.c \
- message-list.h \
- subscribe-dialog.c \
- subscribe-dialog.h \
- mail.h
-
-evolution_mail_LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/composer/libcomposer.a \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libibex/libibex.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(MAILER_LIBS)
-
-evolution_mail_LDFLAGS = \
- -export-dynamic
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Mail.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = mail-config.glade local-config.glade subscribe-dialog.glade
-
-etspecdir = $(datadir)/evolution/etspec/
-etspec_DATA = message-list.etspec subscribe-dialog.etspec
-
-iconsdir = $(datadir)/images/evolution
-buttonsdir = $(datadir)/images/evolution/buttons
-
-$(EVOLUTION_MAIL_CORBA_GENERATED): Mail.idl
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl -I `$(GNOME_CONFIG) --cflags idl` \
- -I `$(GNOME_CONFIG) --datadir`/idl $(srcdir)/Mail.idl
-
-EXTRA_DIST = \
- Mail.idl \
- $(glade_DATA) \
- $(oaf_in_files) \
- $(oaf_DATA) \
- $(etspec_DATA) \
- mail-account-editor-news.c \
- mail-account-editor-news.h
-
-if ENABLE_PURIFY
-PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-
-all-local: evolution-mail.pure
-
-evolution-mail.pure: evolution-mail
- @rm -f evolution-mail.pure
- $(PLINK) $(evolution_mail_LDFLAGS) $(evolution_mail_OBJECTS) $(evolution_mail_LDADD) $(LIBS)
-
-endif
-
-BUILT_SOURCES = $(EVOLUTION_MAIL_CORBA_GENERATED)
-CLEANFILES = $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/mail/README.async b/mail/README.async
deleted file mode 100644
index 3966b3a97b..0000000000
--- a/mail/README.async
+++ /dev/null
@@ -1,366 +0,0 @@
-*******
-This document is absurdly, obscenely out of date. Don't read it.
-
- -- Peter Williams 7/2/2001
-*******
-
-Asynchronous Mailer Information
-Peter Williams <peterw@helixcode.com>
-8/4/2000
-
-1. INTRODUCTION
-
-It's pretty clear that the Evolution mailer needs to be asynchronous in
-some manner. Blocking the UI completely on IMAP calls or large disk reads
-is unnacceptable, and it's really nice to be able to thread the message
-view in the background, or do other things while a mailbox is downloading.
-
-The problem in making Evolution asynchronous is Camel. Camel is not
-asynchronous for a few reasons. All of its interfaces are synchronous --
-calls like camel_store_get_folder, camel_folder_get_message, etc. can
-take a very long time if they're being performed over a network or with
-a large mbox mailbox file. However, these functions have no mechanism
-for specifying that the operation is in progress but not complete, and
-no mechanism for signaling when to operation does complete.
-
-2. WHY I DIDN'T MAKE CAMEL ASYNCHRONOUS
-
-It seems like it would be a good idea, then, to rewrite Camel to be
-asynchonous. This presents several problems:
-
- * Many interfaces must be rewritten to support "completed"
- callbacks, etc. Some of these interfaces are connected to
- synchronous CORBA calls.
- * Everything must be rewritten to be asynchonous. This includes
- the CamelStore, CamelFolder, CamelMimeMessage, CamelProvider,
- every subclass thereof, and all the code that touches these.
- These include the files in camel/, mail/, filter/, and
- composer/. The change would be a complete redesign for any
- provider implementation.
- * All the work on providers (IMAP, mh, mbox, nntp) up to this
- point would be wasted. While they were being rewritten
- evolution-mail would be useless.
-
-However, it is worth noting that the solution I chose is not optimal,
-and I think that it would be worthwhile to write a libcamel2 or some
-such thing that was designed from the ground up to work asynchronously.
-Starting fresh from such a design would work, but trying to move the
-existing code over would be more trouble than it's worth.
-
-3. WHY I MADE CAMEL THREADED
-
-If Camel was not going to be made asynchronous, really the only other
-choice was to make it multithreaded. [1] No one has been particularly
-excited by this plan, as debugging and writing MT-safe code is hard.
-But there wasn't much of a choice, and I believed that a simple thread
-wrapper could be written around Camel.
-
-The important thing to know is that while Camel is multithreaded, we
-DO NOT and CANNOT share objects between threads. Instead,
-evolution-mail sends a request to a dispatching thread, which performs
-the action or queues it to be performed. (See section 4 for details)
-
-The goal that I was working towards is that there should be no calls
-to camel made, ever, in the main thread. I didn't expect to and
-didn't do this, but that was the intent.
-
-[1]. Well, we could fork off another process, but they share so much
-data that this would be pretty impractical.
-
-4. IMPLEMENTATION
-
-a. CamelObject
-
-Threading presented a major problem regarding Camel. Camel is based
-on the GTK Object system, and uses signals to communicate events. This
-is okay in a nonthreaded application, but the GTK Object system is
-not thread-safe.
-
-Particularly, signals and object allocations use static data. Using
-either one inside Camel would guarantee that we'd be stuck with
-random crashes forevermore. That's Bad (TM).
-
-There were two choices: make sure to limit our usage of GTK, or stop
-using the GTK Object system. I decided to do the latter, as the
-former would lead to a mess of "what GTK calls can we make" and
-GDK_THREADS_ENTER and accidentally calling UI functions and upgrades
-to GTK breaking everything.
-
-So I wrote a very very simple CamelObject system. It had three goals:
-
- * Be really straightforward, just encapsulate the type
- heirarchy without all that GtkArg silliness or anything.
- * Be as compatible as possible with the GTK Object system
- to make porting easy
- * Be threadsafe
-
-It supports:
-
- * Type inheritance
- * Events (signals)
- * Type checking
- * Normal refcounting
- * No unref/destroy messiness
- * Threadsafety
- * Class functions
-
-The entire code to the object system is in camel/camel-object.c. It's
-a naive implementation and not full of features, but intentionally that
-way. The main differences between GTK Objects and Camel Objects are:
-
- * s,gtk,camel,i of course
- * Finalize is no longer a GtkObjectClass function. You specify
- a finalize function along with an init function when declaring
- a type, and it is called automatically and chained automatically.
- * Declaring a type is a slightly different API
- * The signal system is replaced with a not-so-clever event system.
- Every event is equivalent to a NONE__POINTER signal. The syntax
- is slightly different: a class "declares" an event and specifies
- a name and a "prep func", that is called before the event is
- triggered and can cancel it.
- * There is only one CamelXXXClass in existence for every type.
- All objects share it.
-
-There is a shell script, tools/make-camel-object.sh that will do all of
-the common substitutions to make a file CamelObject-compatible. Usually
-all that needs to be done is move the implementation of the finalize
-event out of the class init, modify the get_type function, and replace
-signals with events.
-
-Pitfalls in the transition that I ran into were:
-
- * gtk_object_ref -> camel_object_ref or you coredump
- * some files return 'guint' instead of GtkType and must be changed
- * Remove the #include <gtk/gtk.h>
- * gtk_object_set_datas must be changed (This happened once; I
- added a static hashtable)
- * signals have to be fudged a bit to match the gpointer input
- * the BAST_CASTARD option is on, meaning failed typecasts will
- return NULL, almost guaranteeing a segfault -- gets those
- bugs fixed double-quick!
-
-b. API -- mail_operation_spec
-
-I worked by creating a very specific definition of a "mail operation"
-and wrote an engine to queue and dispatch them.
-
-A mail operation is defined by a structure mail_operation_spec
-prototyped in mail-threads.h. It comes in three logical parts -- a
-"setup" phase, executed in the main thread; a "do" phase, executed
-in the dispatch thread; and a "cleanup" phase, executed in the main
-thread. These three phases are guaranteed to be performed in order
-and atomically with respect to other mail operations.
-
-Each of these phases is represented by a function pointer in the
-mail_operation_spec structure. The function mail_operation_queue() is
-called and passed a pointer to a mail_operation_spec and a user_data-style
-pointer that fills in the operation's parameters. The "setup" callback
-is called immediately, though that may change.
-
-Each callback is passed three parameters: a pointer to the user_data,
-a pointer to the "operation data", and a pointer to a CamelException.
-The "operation data" is allocated automatically and freed when the operation
-completes. Internal data that needs to be shared between phases should
-be stored here. The size allocated is specified in the mail_operation_spec
-structure.
-
-Because all of the callbacks use Camel calls at some point, the
-CamelException is provided as utility. The dispatcher will catch exceptions
-and display error dialogs, unlike the synchronous code which lets
-exceptions fall through the cracks fairly easily.
-
-I tried to implement all the operations following this convention. Basically
-I used this skeleton code for all the operations, just filling in the
-specifics:
-
-===================================
-
-typedef struct operation_name_input_s {
- parameters to operation
-} operation_name_input_t;
-
-typedef struct operation_name_data_s {
- internal data to operation, if any
- (if none, omit the structure and set opdata_size to 0)
-} operation_name_data_t;
-
-static gchar *describe_operation_name (gpointer in_data, gboolean gerund);
-static void setup_operation_name (gpointer in_data, gpointer op_data, CamelException *ex);
-static void do_operation_name (gpointer in_data, gpointer op_data, CamelException *ex);
-static void cleanup_operation_name (gpointer in_data, gpointer op_data, CamelException *ex);
-
-static gchar *describe_operation_name (gpointer in_data, gboolean gerund)
-{
- operation_name_input_t *input = (operation_name_input_t *) in_data;
-
- if (gerund) {
- return a g_strdup'ed string describing what we're doing
- } else {
- return a g_strdup'ed string describing what we're about to do
- }
-}
-
-static void setup_operation_name (gpointer in_data, gpointer op_data, CamelException *ex)
-{
- operation_name_input_t *input = (operation_name_input_t *) in_data;
- operation_name_data_t *data = (operation_name_data_t *) op_data;
-
- verify that parameters are valid
-
- initialize op_data
-
- reference objects
-}
-
-static void do_operation_name (gpointer in_data, gpointer op_data, CamelException *ex)
-{
- operation_name_input_t *input = (operation_name_input_t *) in_data;
- operation_name_data_t *data = (operation_name_data_t *) op_data;
-
- perform camel operations
-}
-
-static void cleanup_operation_name (gpointer in_data, gpointer op_data, CamelException *ex)
-{
- operation_name_input_t *input = (operation_name_input_t *) in_data;
- operation_name_data_t *data = (operation_name_data_t *) op_data;
-
- perform UI updates
-
- free allocations
-
- dereference objects
-}
-
-static const mail_operation_spec op_operation_name = {
- describe_operation_name,
- sizeof (operation_name_data_t),
- setup_operation_name,
- do_operation_name,
- cleanup_operation_name
-};
-
-void
-mail_do_operation_name (parameters)
-{
- operation_name_input_t *input;
-
- input = g_new (operation_name_input_t, 1);
-
- store parameters in input
-
- mail_operation_queue (&op_operation_name, input, TRUE);
-}
-
-===========================================
-
-c. mail-ops.c
-
-Has been drawn and quartered. It has been split into:
-
- * mail-callbacks.c: the UI callbacks
- * mail-tools.c: useful sequences wrapping common Camel operations
- * mail-ops.c: implementations of all the mail_operation_specs
-
-An important part of mail-ops.c are the global functions
-mail_tool_camel_lock_{up,down}. These simulate a recursize mutex around
-camel. There are an extreme few, supposedly safe, calls to Camel made in
-the main thread. These functions should go around evey call to Camel or
-group thereof. I don't think they're necessary but it's nice to know
-they're there.
-
-If you look at mail-tools.c, you'll notice that all the Camel calls are
-protected with these functions. Remember that a mail tool is really
-just another Camel call, so don't use them in the main thread either.
-
-All the mail operations are implemented in mail-ops.c EXCEPT:
-
- * filter-driver.c: the filter_mail operation
- * message-list.c: the regenerate_messagelist operation
- * message-thread.c: the thread_messages operation
-
-d. Using the operations
-
-The mail operations as implemented are very specific to evolution-mail. I
-was thinking about leaving them mostly generic and then allowing extra
-callbacks to be added to perform the more specific UI touches, but this
-seemed kind of pointless.
-
-I basically looked through the code, found references to Camel, and split
-the code into three parts -- the bit before the Camel calls, the bit after,
-and the Camel calls. These were mapped onto the template, given a name,
-and added to mail-ops.c. Additionally, I simplified the common tasks that
-were taken care of in mail-tools.c, making some functions much simpler.
-
-Ninety-nine percent of the time, whatever operation is being done is being
-done in a callback, so all that has to be done is this:
-
-==================
-
-void my_callback (GtkObject *obj, gchar *uid)
-{
- camel_do_something (uid);
-}
-
-==== becomes ====
-
-void my_callback (GtkObject *obj, gchar *uid)
-{
- mail_do_do_something (uid);
-}
-
-=================
-
-There are, however, a few belligerents. Particularly, the function
-mail_uri_to_folder returns a CamelFolder and yet should really be
-asynchronous. This is called in a CORBA call that is sychronous, and
-additionally is used in the filter code.
-
-I changed the first usage to return the folder immediately but
-still fetch the CamelFolder asyncrhonously, and in the second case,
-made filtering asynchronous, so the fact that the call is synchronous
-doesn't matter.
-
-The function was renamed to mail_tool_uri_to_folder to emphasize that
-it's a synchronous Camel call.
-
-e. The dispatcher
-
-mail_operation_queue () takes its parameters and assembles them in a
-closure_t structure, which I abbreviate clur. It sets a timeout to
-display a progress window if an operation is still running one second
-later (we're not smart enough to check if it's the same operation,
-but the issue is not a big deal). The other thread and some communication
-pipes are created.
-
-The dispatcher thread sits in a loop reading from a pipe. Every time
-the main thread queues an operation, it writes the closure_t into the pipe.
-The dispatcher reads the closure, sends a STARTING message to the main
-thread (see below for explanation), calls the callback specified in the
-closure, and sends a FINISHED message. It then goes back to reading
-from its pipe; it will either block until another operation comes along,
-or find one right away and start it. This the pipe takes care of queueing
-operations.
-
-The dispatch thread communicates with the main thread with another pipe;
-however, the main thread has other things to do than read from the pipe,
-so it adds registers a GIOReader that checks for messages in the glib
-main loop. In addition to starting and finishing messages, the other
-thread can communicate to the user using messages and a progress bar.
-(This is currently implemented but unused.)
-
-5. ISSUES
-
- * Operations are queued and dequeued stupidly. Like if you click
- on one message then click on another, the first will be retrieved
- and displayed then overwritten by the second. Operations that could
- be performed at the same time safely aren't.
- * The CamelObject system is workable, but it'd be nice to work with
- something established like the GtkObject
- * The whole threading idea is not great. Concensus is that an
- asynchronous interface is the Right Thing, eventually.
- * Care still needs to be taken when designing evolution-mail code to
- work with the asynchronous mail_do_ functions
- * Some of the operations are extremely hacky.
- * IMAP's timeout to send a NOOP had to be removed because we can't
- use GTK. We need an alternative for this. \ No newline at end of file
diff --git a/mail/component-factory.c b/mail/component-factory.c
deleted file mode 100644
index 804829a491..0000000000
--- a/mail/component-factory.c
+++ /dev/null
@@ -1,1214 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- *
- * 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 <bonobo/bonobo-generic-factory.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "camel.h"
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-#include "evolution-wizard.h"
-
-#include "folder-browser-factory.h"
-#include "evolution-shell-component.h"
-#include "evolution-shell-component-dnd.h"
-#include "folder-browser.h"
-#include "mail.h" /* YUCK FIXME */
-#include "mail-config.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-offline-handler.h"
-#include "mail-local.h"
-#include "mail-session.h"
-#include "mail-mt.h"
-#include "mail-importer.h"
-#include "mail-vfolder.h" /* vfolder_create_storage */
-#include "mail-folder-cache.h"
-
-#include "component-factory.h"
-
-#include "mail-send-recv.h"
-
-char *default_drafts_folder_uri;
-CamelFolder *drafts_folder = NULL;
-char *default_sent_folder_uri;
-CamelFolder *sent_folder = NULL;
-char *default_outbox_folder_uri;
-CamelFolder *outbox_folder = NULL;
-char *evolution_dir;
-
-EvolutionShellClient *global_shell_client = NULL;
-
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_ShellComponent"
-#define SUMMARY_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ExecutiveSummaryComponentFactory"
-
-static GHashTable *storages_hash;
-static EvolutionShellComponent *shell_component;
-
-enum {
- ACCEPTED_DND_TYPE_MESSAGE_RFC822,
- ACCEPTED_DND_TYPE_X_EVOLUTION_MESSAGE,
- ACCEPTED_DND_TYPE_TEXT_URI_LIST,
-};
-
-static char *accepted_dnd_types[] = {
- "message/rfc822",
- "x-evolution-message", /* ...from an evolution message list... */
- "text/uri-list", /* ...from nautilus... */
- NULL
-};
-
-enum {
- EXPORTED_DND_TYPE_TEXT_URI_LIST,
-};
-
-static char *exported_dnd_types[] = {
- "text/uri-list", /* we have to export to nautilus as text/uri-list */
- NULL
-};
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "mail", "evolution-inbox.png", N_("Mail"), N_("Folder containing mail"), TRUE, accepted_dnd_types, exported_dnd_types },
- { "mailstorage", "evolution-inbox.png", "Mailstorage", N_("Mail storage folder (internal)"), FALSE, NULL, NULL },
- { "vtrash", "evolution-trash.png", N_("Virtual Trash"), N_("Virtual Trash folder"), FALSE, accepted_dnd_types, exported_dnd_types },
- { NULL, NULL, NULL, NULL, FALSE, NULL, NULL }
-};
-
-static const char *schema_types[] = {
- "mailto",
- NULL
-};
-
-/* EvolutionShellComponent methods and signals. */
-
-static BonoboControl *
-create_noselect_control (void)
-{
- GtkWidget *label;
-
- label = gtk_label_new (_("This folder cannot contain messages."));
- gtk_widget_show (label);
- return bonobo_control_new (label);
-}
-
-static EvolutionShellComponentResult
-create_view (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *folder_type,
- BonoboControl **control_return,
- void *closure)
-{
- EvolutionShellClient *shell_client;
- GNOME_Evolution_Shell corba_shell;
- BonoboControl *control;
-
- shell_client = evolution_shell_component_get_owner (shell_component);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-
- if (!g_strcasecmp (folder_type, "mail")) {
- const char *noselect;
- CamelURL *url;
-
- url = camel_url_new (physical_uri, NULL);
- noselect = url ? camel_url_get_param (url, "noselect") : NULL;
- if (noselect && !g_strcasecmp (noselect, "yes"))
- control = create_noselect_control ();
- else
- control = folder_browser_factory_new_control (physical_uri,
- corba_shell);
- camel_url_free (url);
- } else if (!g_strcasecmp (folder_type, "mailstorage")) {
- CamelService *store;
- EvolutionStorage *storage;
-
- store = camel_session_get_service (session, physical_uri,
- CAMEL_PROVIDER_STORE, NULL);
- if (!store)
- return EVOLUTION_SHELL_COMPONENT_NOTFOUND;
- storage = g_hash_table_lookup (storages_hash, store);
- if (!storage) {
- camel_object_unref (CAMEL_OBJECT (store));
- return EVOLUTION_SHELL_COMPONENT_NOTFOUND;
- }
-
- if (!gtk_object_get_data (GTK_OBJECT (storage), "connected"))
- mail_note_store(CAMEL_STORE(store), storage, CORBA_OBJECT_NIL, NULL, NULL);
- camel_object_unref (CAMEL_OBJECT (store));
-
- control = create_noselect_control ();
- } else if (!g_strcasecmp (folder_type, "vtrash")) {
- if (!g_strncasecmp (physical_uri, "file:", 5))
- control = folder_browser_factory_new_control ("vtrash:file:/", corba_shell);
- else
- control = folder_browser_factory_new_control (physical_uri, corba_shell);
- } else
- return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
-
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_NOTFOUND;
-
- *control_return = control;
- return EVOLUTION_SHELL_COMPONENT_OK;
-}
-
-static void
-create_folder_done (char *uri, CamelFolder *folder, void *data)
-{
- GNOME_Evolution_ShellComponentListener listener = data;
- GNOME_Evolution_ShellComponentListener_Result result;
- CORBA_Environment ev;
-
- if (folder) {
- result = GNOME_Evolution_ShellComponentListener_OK;
- } else {
- result = GNOME_Evolution_ShellComponentListener_INVALID_URI;
- }
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (listener, result, &ev);
- CORBA_Object_release (listener, &ev);
- CORBA_exception_free (&ev);
-}
-
-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);
-
- if (!strcmp (type, "mail")) {
- mail_get_folder(physical_uri, create_folder_done, CORBA_Object_duplicate (listener, &ev), mail_thread_new);
- } else {
- GNOME_Evolution_ShellComponentListener_notifyResult (
- listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
- }
-
- CORBA_exception_free (&ev);
-}
-
-static void
-remove_folder_done (char *uri, gboolean removed, void *data)
-{
- GNOME_Evolution_ShellComponentListener listener = data;
- GNOME_Evolution_ShellComponentListener_Result result;
- CORBA_Environment ev;
-
- if (removed)
- result = GNOME_Evolution_ShellComponentListener_OK;
- else
- result = GNOME_Evolution_ShellComponentListener_INVALID_URI;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (listener, result, &ev);
- CORBA_Object_release (listener, &ev);
- CORBA_exception_free (&ev);
-}
-
-static void
-remove_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);
-
- if (strcmp (type, "mail") != 0) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
- CORBA_exception_free (&ev);
- return;
- }
-
- mail_remove_folder (physical_uri, remove_folder_done, CORBA_Object_duplicate (listener, &ev));
- CORBA_exception_free (&ev);
-}
-
-typedef struct _xfer_folder_data {
- GNOME_Evolution_ShellComponentListener listener;
- gboolean remove_source;
- char *source_uri;
-} xfer_folder_data;
-
-static void
-xfer_folder_done (gboolean ok, void *data)
-{
- xfer_folder_data *xfd = (xfer_folder_data *)data;
- GNOME_Evolution_ShellComponentListener listener = xfd->listener;
- GNOME_Evolution_ShellComponentListener_Result result;
- CORBA_Environment ev;
-
- if (xfd->remove_source && ok) {
- mail_remove_folder (xfd->source_uri, remove_folder_done, xfd->listener);
- } else {
- if (ok)
- result = GNOME_Evolution_ShellComponentListener_OK;
- else
- result = GNOME_Evolution_ShellComponentListener_INVALID_URI;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult (listener, result, &ev);
- CORBA_Object_release (listener, &ev);
- CORBA_exception_free (&ev);
- }
-
- g_free (xfd->source_uri);
- g_free (xfd);
-}
-
-static void
-xfer_folder (EvolutionShellComponent *shell_component,
- const char *source_physical_uri,
- const char *destination_physical_uri,
- const char *type,
- gboolean remove_source,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
- const char *noselect;
- CamelFolder *source;
- CamelException ex;
- GPtrArray *uids;
- CamelURL *url;
-
- url = camel_url_new (destination_physical_uri, NULL);
- noselect = url ? camel_url_get_param (url, "noselect") : NULL;
-
- if (noselect && !g_strcasecmp (noselect, "yes")) {
- camel_url_free (url);
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION, &ev);
- return;
- }
-
- camel_url_free (url);
-
- if (strcmp (type, "mail") != 0) {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
- return;
- }
-
- camel_exception_init (&ex);
- source = mail_tool_uri_to_folder (source_physical_uri, &ex);
- camel_exception_clear (&ex);
-
- CORBA_exception_init (&ev);
- if (source) {
- xfer_folder_data *xfd;
-
- xfd = g_new0 (xfer_folder_data, 1);
- xfd->remove_source = remove_source;
- xfd->source_uri = g_strdup (source_physical_uri);
- xfd->listener = CORBA_Object_duplicate (listener, &ev);
-
- uids = camel_folder_get_uids (source);
- mail_transfer_messages (source, uids, remove_source, destination_physical_uri,
- xfer_folder_done, xfd);
- camel_object_unref (CAMEL_OBJECT (source));
- } else
- GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_INVALID_URI, &ev);
- CORBA_exception_free (&ev);
-}
-
-#if 0
-static void
-populate_folder_context_menu (EvolutionShellComponent *shell_component,
- BonoboUIComponent *uic,
- const char *physical_uri,
- const char *type,
- void *closure)
-{
-#ifdef TRANSLATORS_ONLY
- static char popup_xml_i18n[] = {N_("Properties..."), N_("Change this folder's properties")};
-#endif
- static char popup_xml[] =
- "<menuitem name=\"ChangeFolderProperties\" verb=\"ChangeFolderProperties\""
- " _label=\"Properties...\" _tip=\"Change this folder's properties\"/>";
-
- if (strcmp (type, "mail") != 0)
- return;
-
- bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER,
- popup_xml, NULL);
-}
-#endif
-
-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)
-{
- g_print ("should get dnd selection for %s\n", physical_uri);
-
- return NULL;
-}
-
-/* Destination side DnD */
-static CORBA_boolean
-destination_folder_handle_motion (EvolutionShellComponentDndDestinationFolder *folder,
- const char *physical_uri,
- const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context *destination_context,
- GNOME_Evolution_ShellComponentDnd_Action *suggested_action_return,
- gpointer user_data)
-{
- const char *noselect;
- CamelURL *url;
-
- g_print ("in destination_folder_handle_motion (%s)\n", physical_uri);
-
- url = camel_url_new (physical_uri, NULL);
- noselect = camel_url_get_param (url, "noselect");
-
- if (noselect && !g_strcasecmp (noselect, "yes"))
- /* uh, no way to say "illegal" */
- *suggested_action_return = GNOME_Evolution_ShellComponentDnd_ACTION_DEFAULT;
- else
- *suggested_action_return = GNOME_Evolution_ShellComponentDnd_ACTION_MOVE;
-
- camel_url_free (url);
-
- return TRUE;
-}
-
-static void
-message_rfc822_dnd (CamelFolder *dest, CamelStream *stream, CamelException *ex)
-{
- CamelMimeParser *mp;
-
- mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mp, TRUE);
- camel_mime_parser_init_with_stream (mp, stream);
-
- while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
- CamelMessageInfo *info;
- CamelMimeMessage *msg;
-
- msg = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
- camel_object_unref (CAMEL_OBJECT (msg));
- break;
- }
-
- /* append the message to the folder... */
- info = g_new0 (CamelMessageInfo, 1);
- camel_folder_append_message (dest, msg, info, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
-
- if (camel_exception_is_set (ex))
- break;
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- camel_object_unref (CAMEL_OBJECT (mp));
-}
-
-static CORBA_boolean
-destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *dest_folder,
- const char *physical_uri,
- const GNOME_Evolution_ShellComponentDnd_DestinationFolder_Context *destination_context,
- const GNOME_Evolution_ShellComponentDnd_Action action,
- const GNOME_Evolution_ShellComponentDnd_Data *data,
- gpointer user_data)
-{
- char *tmp, *url, **urls, *in, *inptr, *inend;
- gboolean retval = FALSE;
- const char *noselect;
- CamelFolder *folder;
- CamelStream *stream;
- CamelException ex;
- GPtrArray *uids;
- CamelURL *uri;
- int i, type, fd;
-
- if (action == GNOME_Evolution_ShellComponentDnd_ACTION_LINK)
- return FALSE; /* we can't create links */
-
- /* this means the drag was cancelled */
- if (!data->bytes._buffer || data->bytes._length == -1)
- return FALSE;
-
- uri = camel_url_new (physical_uri, NULL);
- noselect = uri ? camel_url_get_param (uri, "noselect") : NULL;
- if (noselect && !g_strcasecmp (noselect, "yes")) {
- camel_url_free (uri);
- return FALSE;
- }
- camel_url_free (uri);
-
- g_print ("in destination_folder_handle_drop (%s)\n", physical_uri);
-
- for (type = 0; accepted_dnd_types[type]; type++)
- if (!strcmp (destination_context->dndType, accepted_dnd_types[type]))
- break;
-
- camel_exception_init (&ex);
-
- switch (type) {
- case ACCEPTED_DND_TYPE_TEXT_URI_LIST:
- folder = mail_tool_uri_to_folder (physical_uri, NULL);
- if (!folder)
- return FALSE;
-
- tmp = g_strndup (data->bytes._buffer, data->bytes._length);
- urls = g_strsplit (tmp, "\n", 0);
- g_free (tmp);
-
- retval = TRUE;
- for (i = 0; urls[i] != NULL && retval; i++) {
- /* get the path component */
- url = g_strstrip (urls[i]);
-
- uri = camel_url_new (url, NULL);
- g_free (url);
- url = uri->path;
- uri->path = NULL;
- camel_url_free (uri);
-
- fd = open (url, O_RDONLY);
- if (fd == -1) {
- g_free (url);
- /* FIXME: okay, so what do we do in this case? */
- continue;
- }
-
- stream = camel_stream_fs_new_with_fd (fd);
- message_rfc822_dnd (folder, stream, &ex);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (folder));
-
- retval = !camel_exception_is_set (&ex);
-
- if (action == GNOME_Evolution_ShellComponentDnd_ACTION_MOVE && retval)
- unlink (url);
-
- g_free (url);
- }
-
- g_free (urls);
- break;
- case ACCEPTED_DND_TYPE_MESSAGE_RFC822:
- folder = mail_tool_uri_to_folder (physical_uri, &ex);
- if (!folder) {
- camel_exception_clear (&ex);
- return FALSE;
- }
-
- /* write the message(s) out to a CamelStream so we can use it */
- stream = camel_stream_mem_new ();
- camel_stream_write (stream, data->bytes._buffer, data->bytes._length);
- camel_stream_reset (stream);
-
- message_rfc822_dnd (folder, stream, &ex);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (folder));
- break;
- case ACCEPTED_DND_TYPE_X_EVOLUTION_MESSAGE:
- /* format: "uri uid1\0uid2\0uid3\0...\0uidn" */
-
- in = data->bytes._buffer;
- inend = in + data->bytes._length;
-
- inptr = strchr (in, ' ');
- url = g_strndup (in, inptr - in);
-
- folder = mail_tool_uri_to_folder (url, &ex);
- g_free (url);
-
- if (!folder) {
- camel_exception_clear (&ex);
- return FALSE;
- }
-
- /* split the uids */
- inptr++;
- uids = g_ptr_array_new ();
- while (inptr < inend) {
- char *start = inptr;
-
- while (inptr < inend && *inptr)
- inptr++;
-
- g_ptr_array_add (uids, g_strndup (start, inptr - start));
- inptr++;
- }
-
- mail_transfer_messages (folder, uids,
- action == GNOME_Evolution_ShellComponentDnd_ACTION_MOVE,
- physical_uri, NULL, NULL);
-
- camel_object_unref (CAMEL_OBJECT (folder));
- break;
- default:
- break;
- }
-
- camel_exception_clear (&ex);
-
- return retval;
-}
-
-
-static struct {
- char *name, **uri;
- CamelFolder **folder;
-} standard_folders[] = {
- { "Drafts", &default_drafts_folder_uri, &drafts_folder },
- { "Outbox", &default_outbox_folder_uri, &outbox_folder },
- { "Sent", &default_sent_folder_uri, &sent_folder },
-};
-
-static void
-unref_standard_folders (void)
-{
- int i;
-
- for (i = 0; i < sizeof (standard_folders) / sizeof (standard_folders[0]); i++) {
- if (standard_folders[i].folder) {
- CamelFolder *folder = *standard_folders[i].folder;
-
- *standard_folders[i].folder = NULL;
- camel_object_unref (CAMEL_OBJECT (folder));
- }
- }
-}
-
-static void
-got_folder (char *uri, CamelFolder *folder, void *data)
-{
- CamelFolder **fp = data;
-
- if (folder) {
- *fp = folder;
-
- camel_object_ref(CAMEL_OBJECT (folder));
-
- /* emit a changed event, this is a little hack so that the folderinfo cache
- will update knowing whether this is the outbox_folder or not, etc */
- if (folder == outbox_folder) {
- CamelFolderChangeInfo *changes = camel_folder_change_info_new();
-
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", changes);
- camel_folder_change_info_free(changes);
- }
- }
-}
-
-static void
-shell_client_destroy (GtkObject *object)
-{
- global_shell_client = NULL;
-}
-
-static void
-warning_clicked (GtkWidget *dialog, gpointer user_data)
-{
- gtk_widget_destroy (dialog);
-}
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- GNOME_Evolution_Shell corba_shell;
- const GSList *accounts;
-#ifdef ENABLE_NNTP
- const GSList *news;
-#endif
- int i;
-
- /* FIXME: should we ref this? */
- global_shell_client = shell_client;
- gtk_signal_connect (GTK_OBJECT (shell_client), "destroy",
- shell_client_destroy, NULL);
-
- evolution_dir = g_strdup (evolution_homedir);
- mail_session_init ();
-
- storages_hash = g_hash_table_new (NULL, NULL);
-
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-
- vfolder_load_storage(corba_shell);
-
- accounts = mail_config_get_accounts ();
- mail_load_storages (corba_shell, accounts, TRUE);
-
-#ifdef ENABLE_NNTP
- news = mail_config_get_news ();
- mail_load_storages (corba_shell, news, FALSE);
-#endif
-
- mail_local_storage_startup (shell_client, evolution_dir);
- mail_importer_init (shell_client);
-
- for (i = 0; i < sizeof (standard_folders) / sizeof (standard_folders[0]); i++) {
- *standard_folders[i].uri = g_strdup_printf ("file://%s/local/%s", evolution_dir, standard_folders[i].name);
- mail_msg_wait(mail_get_folder(*standard_folders[i].uri, got_folder, standard_folders[i].folder, mail_thread_new));
- }
-
- mail_session_enable_interaction (TRUE);
-
- mail_autoreceive_setup ();
-
- if (mail_config_is_corrupt ()) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog (_("Some of your mail settings seem corrupt, "
- "please check that everything is in order."));
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked", warning_clicked, NULL);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_widget_show (dialog);
- }
-}
-
-static void
-free_storage (gpointer service, gpointer storage, gpointer data)
-{
- camel_service_disconnect (CAMEL_SERVICE (service), TRUE, NULL);
- camel_object_unref (CAMEL_OBJECT (service));
- bonobo_object_unref (BONOBO_OBJECT (storage));
-}
-
-static gboolean
-idle_quit (gpointer user_data)
-{
- mail_msg_wait_all();
-
- if (e_list_length (folder_browser_factory_get_control_list ()))
- return TRUE;
-
- g_hash_table_foreach (storages_hash, free_storage, NULL);
- g_hash_table_destroy (storages_hash);
-
- gtk_main_quit ();
-
- return FALSE;
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
-{
- global_shell_client = NULL;
-
- if (mail_config_get_empty_trash_on_exit ())
- empty_trash (NULL, NULL, NULL);
-
- mail_msg_wait_all();
-
- unref_standard_folders ();
- mail_importer_uninit ();
-
- mail_session_enable_interaction (FALSE);
- g_idle_add_full (G_PRIORITY_LOW, idle_quit, NULL, NULL);
-}
-
-static void
-debug_cb (EvolutionShellComponent *shell_component, gpointer user_data)
-{
- extern gboolean camel_verbose_debug;
-
- camel_verbose_debug = 1;
-}
-
-static void
-handle_external_uri_cb (EvolutionShellComponent *shell_component,
- const char *uri,
- void *data)
-{
- if (strncmp (uri, "mailto:", 7) != 0) {
- /* FIXME: Exception? The EvolutionShellComponent object should
- give me a chance to do so, but currently it doesn't. */
- g_warning ("Invalid URI requested to mail component -- %s", uri);
- return;
- }
-
- /* FIXME: Sigh. This shouldn't be here. But the code is messy, so
- I'll just put it here anyway. */
- send_to_url (uri);
-}
-
-static void
-user_create_new_item_cb (EvolutionShellComponent *shell_component,
- const char *id,
- const char *parent_folder_physical_uri,
- const char *parent_folder_type,
- gpointer data)
-{
- if (!strcmp (id, "message")) {
- send_to_url (NULL);
- return;
- }
-
- g_warning ("Don't know how to create item of type \"%s\"", id);
-}
-
-static BonoboObject *
-create_component (void)
-{
- EvolutionShellComponentDndDestinationFolder *destination_interface;
- MailOfflineHandler *offline_handler;
-
- shell_component = evolution_shell_component_new (folder_types,
- schema_types,
- create_view,
- create_folder,
- remove_folder,
- xfer_folder,
- /*populate_folder_context_menu*/NULL,
- get_dnd_selection,
- NULL);
-
- destination_interface = evolution_shell_component_dnd_destination_folder_new (destination_folder_handle_motion,
- destination_folder_handle_drop,
- shell_component);
-
- bonobo_object_add_interface (BONOBO_OBJECT (shell_component),
- BONOBO_OBJECT (destination_interface));
-
- evolution_mail_config_wizard_init ();
-
- evolution_shell_component_add_user_creatable_item (shell_component, "message", _("New Mail Message"), _("New _Mail Message"), 'm');
-
- 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);
- gtk_signal_connect (GTK_OBJECT (shell_component), "debug",
- GTK_SIGNAL_FUNC (debug_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "destroy",
- GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "handle_external_uri",
- GTK_SIGNAL_FUNC (handle_external_uri_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
- GTK_SIGNAL_FUNC (user_create_new_item_cb), NULL);
-
- offline_handler = mail_offline_handler_new ();
- bonobo_object_add_interface (BONOBO_OBJECT (shell_component), BONOBO_OBJECT (offline_handler));
-
- return BONOBO_OBJECT (shell_component);
-}
-
-void
-component_factory_init (void)
-{
- BonoboObject *shell_component;
- int result;
-
- shell_component = create_component ();
- result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (shell_component));
- if (result == OAF_REG_ERROR) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's mail component."));
- exit (1);
- } else if (result == OAF_REG_ALREADY_ACTIVE) {
- g_warning ("evolution-mail is already running");
- exit (1);
- }
-
- if (evolution_mail_config_factory_init () == FALSE) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's mail config component."));
- exit (1);
- }
-
- if (evolution_folder_info_factory_init () == FALSE) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's folder info component."));
- exit (1);
- }
-}
-
-static void
-notify_listener (const Bonobo_Listener listener,
- GNOME_Evolution_Storage_Result corba_result)
-{
- CORBA_any any;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- any._type = TC_GNOME_Evolution_Storage_Result;
- any._value = &corba_result;
-
- Bonobo_Listener_event (listener, "result", &any, &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static void
-storage_create_folder (EvolutionStorage *storage,
- const Bonobo_Listener listener,
- const char *path,
- const char *type,
- const char *description,
- const char *parent_physical_uri,
- gpointer user_data)
-{
- CamelStore *store = user_data;
- CamelFolderInfo *root, *fi;
- char *name;
- CamelURL *url;
- CamelException ex;
-
- if (strcmp (type, "mail") != 0) {
- notify_listener (listener, GNOME_Evolution_Storage_UNSUPPORTED_TYPE);
- return;
- }
-
- name = strrchr (path, '/');
- if (!name++) {
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
-
- camel_exception_init (&ex);
- if (*parent_physical_uri) {
- url = camel_url_new (parent_physical_uri, NULL);
- if (!url) {
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
-
- root = camel_store_create_folder (store, url->path + 1, name, &ex);
- camel_url_free (url);
- } else
- root = camel_store_create_folder (store, NULL, name, &ex);
-
- if (camel_exception_is_set (&ex)) {
- /* FIXME: do better than this */
- camel_exception_clear (&ex);
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
-
- if (camel_store_supports_subscriptions (store)) {
- for (fi = root; fi; fi = fi->child)
- camel_store_subscribe_folder (store, fi->full_name, NULL);
- }
-
- camel_store_free_folder_info (store, root);
-
- notify_listener (listener, GNOME_Evolution_Storage_OK);
-}
-
-static void
-storage_remove_folder (EvolutionStorage *storage,
- const Bonobo_Listener listener,
- const char *path,
- const char *physical_uri,
- gpointer user_data)
-{
- CamelStore *store = user_data;
- CamelURL *url = NULL;
- /*CamelFolderInfo *fi;*/
- CamelException ex;
-
- /* FIXME: Jeff does this look right? */
-
- g_warning ("storage_remove_folder: path=\"%s\"; uri=\"%s\"", path, physical_uri);
-
- if (!path || !physical_uri || !strncmp (physical_uri, "vtrash:", 7)) {
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
-
- url = camel_url_new (physical_uri, NULL);
- if (!url) {
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
-
- if (!*path) {
- camel_url_free (url);
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
- return;
- }
-
- camel_exception_init (&ex);
-#if 0
- fi = camel_store_get_folder_info (store, url->path + 1,
- CAMEL_STORE_FOLDER_INFO_FAST, &ex);
- camel_url_free (url);
- if (camel_exception_is_set (&ex))
- goto exception;
-
- if (camel_store_supports_subscriptions (store))
- camel_store_unsubscribe_folder (store, fi->full_name, NULL);
-
- camel_store_delete_folder (store, fi->full_name, &ex);
-
- camel_store_free_folder_info (store, fi);
-#else
-
- if (camel_store_supports_subscriptions (store))
- camel_store_unsubscribe_folder (store, url->path + 1, NULL);
-
- camel_store_delete_folder (store, url->path + 1, &ex);
-
- camel_url_free (url);
- if (camel_exception_is_set (&ex))
- goto exception;
-
-#endif
-
- evolution_storage_removed_folder (storage, path);
-
- notify_listener (listener, GNOME_Evolution_Storage_OK);
- return;
-
- exception:
- /* FIXME: do better than this... */
- camel_exception_clear (&ex);
-#if 0
- if (fi)
- camel_store_free_folder_info (store, fi);
-#endif
-
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
-}
-
-static void
-add_storage (const char *name, const char *uri, CamelService *store,
- GNOME_Evolution_Shell corba_shell, CamelException *ex)
-{
- EvolutionStorage *storage;
- EvolutionStorageResult res;
-
- storage = evolution_storage_new (name, uri, "mailstorage");
- gtk_signal_connect (GTK_OBJECT (storage), "create_folder",
- GTK_SIGNAL_FUNC (storage_create_folder),
- store);
- gtk_signal_connect (GTK_OBJECT (storage), "remove_folder",
- GTK_SIGNAL_FUNC (storage_remove_folder),
- store);
-
- res = evolution_storage_register_on_shell (storage, corba_shell);
-
- switch (res) {
- case EVOLUTION_STORAGE_OK:
- mail_hash_storage (store, storage);
- mail_note_store((CamelStore *)store, storage, CORBA_OBJECT_NIL, NULL, NULL);
- /* falllll */
- case EVOLUTION_STORAGE_ERROR_ALREADYREGISTERED:
- case EVOLUTION_STORAGE_ERROR_EXISTS:
- return;
- default:
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot register storage with shell"));
- break;
- }
-}
-
-void
-mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name)
-{
- CamelException ex;
- CamelService *store;
- CamelProvider *prov;
-
- camel_exception_init (&ex);
-
- /* Load the service (don't connect!). Check its provider and
- * see if this belongs in the shell's folder list. If so, add
- * it.
- */
-
- prov = camel_session_get_provider (session, uri, &ex);
- if (prov == NULL) {
- /* FIXME: real error dialog */
- g_warning ("couldn't get service %s: %s\n", uri,
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- return;
- }
-
- if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE) ||
- (prov->flags & CAMEL_PROVIDER_IS_EXTERNAL))
- return;
-
- store = camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex);
- if (store == NULL) {
- /* FIXME: real error dialog */
- g_warning ("couldn't get service %s: %s\n", uri,
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- return;
- }
-
- if (name == NULL) {
- char *service_name;
-
- service_name = camel_service_get_name (store, TRUE);
- add_storage (service_name, uri, store, shell, &ex);
- g_free (service_name);
- } else
- add_storage (name, uri, store, shell, &ex);
-
- if (camel_exception_is_set (&ex)) {
- /* FIXME: real error dialog */
- g_warning ("Cannot load storage: %s",
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- }
-
- camel_object_unref (CAMEL_OBJECT (store));
-}
-
-/* FIXME: 'is_account_data' is an ugly hack, if we remove support for NNTP we can take it out -- fejj */
-void
-mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean is_account_data)
-{
- CamelException ex;
- const GSList *iter;
-
- camel_exception_init (&ex);
-
- /* Load each service (don't connect!). Check its provider and
- * see if this belongs in the shell's folder list. If so, add
- * it.
- */
-
- for (iter = sources; iter; iter = iter->next) {
- const MailConfigAccount *account = NULL;
- const MailConfigService *service = NULL;
- char *name;
-
- if (is_account_data) {
- account = iter->data;
- service = account->source;
- name = account->name;
- } else {
- service = iter->data;
- name = NULL;
- }
-
- if (service == NULL || service->url == NULL || service->url[0] == '\0' || !service->enabled)
- continue;
-
- mail_load_storage_by_uri (shell, service->url, name);
- }
-}
-
-void
-mail_hash_storage (CamelService *store, EvolutionStorage *storage)
-{
- camel_object_ref (CAMEL_OBJECT (store));
- g_hash_table_insert (storages_hash, store, storage);
-}
-
-EvolutionStorage*
-mail_lookup_storage (CamelStore *store)
-{
- EvolutionStorage *storage;
-
- /* Because the storages_hash holds a reference to each store
- * used as a key in it, none of them will ever be gc'ed, meaning
- * any call to camel_session_get_{service,store} with the same
- * URL will always return the same object. So this works.
- */
-
- storage = g_hash_table_lookup (storages_hash, store);
- if (storage)
- bonobo_object_ref (BONOBO_OBJECT (storage));
-
- return storage;
-}
-
-void
-mail_remove_storage (CamelStore *store)
-{
- EvolutionStorage *storage;
- EvolutionShellClient *shell_client;
- GNOME_Evolution_Shell corba_shell;
-
- /* Because the storages_hash holds a reference to each store
- * used as a key in it, none of them will ever be gc'ed, meaning
- * any call to camel_session_get_{service,store} with the same
- * URL will always return the same object. So this works.
- */
-
- storage = g_hash_table_lookup (storages_hash, store);
- g_hash_table_remove (storages_hash, store);
-
- shell_client = evolution_shell_component_get_owner (shell_component);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-
- evolution_storage_deregister_on_shell (storage, corba_shell);
-
- camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL);
- camel_object_unref (CAMEL_OBJECT (store));
-}
-
-void
-mail_remove_storage_by_uri (const char *uri)
-{
- CamelProvider *prov;
- CamelService *store;
-
- prov = camel_session_get_provider (session, uri, NULL);
- if (!prov)
- return;
- if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE) ||
- (prov->flags & CAMEL_PROVIDER_IS_EXTERNAL))
- return;
-
- store = camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL);
- if (store != NULL) {
- mail_remove_storage (CAMEL_STORE (store));
- camel_object_unref (CAMEL_OBJECT (store));
- }
-}
-
-int
-mail_storages_count (void)
-{
- return g_hash_table_size (storages_hash);
-}
-
-void
-mail_storages_foreach (GHFunc func, gpointer data)
-{
- g_hash_table_foreach (storages_hash, func, data);
-}
diff --git a/mail/component-factory.h b/mail/component-factory.h
deleted file mode 100644
index 5e583109ea..0000000000
--- a/mail/component-factory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.h
- *
- * Copyright (C) 2000 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 COMPONENT_FACTORY_H
-#define COMPONENT_FACTORY_H
-
-void component_factory_init (void);
-
-#endif
diff --git a/mail/e-attchmt.png b/mail/e-attchmt.png
deleted file mode 100644
index b4bac8db67..0000000000
--- a/mail/e-attchmt.png
+++ /dev/null
Binary files differ
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
deleted file mode 100644
index 47266fc836..0000000000
--- a/mail/e-searching-tokenizer.c
+++ /dev/null
@@ -1,986 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-searching-tokenizer.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 <ctype.h>
-#include <gal/unicode/gunicode.h>
-#include "e-searching-tokenizer.h"
-
-enum {
- EST_MATCH_SIGNAL,
- EST_LAST_SIGNAL
-};
-guint e_searching_tokenizer_signals[EST_LAST_SIGNAL] = { 0 };
-
-#define START_MAGIC "<\n>S<\n>"
-#define END_MAGIC "<\n>E<\n>"
-
-static void e_searching_tokenizer_begin (HTMLTokenizer *, gchar *);
-static void e_searching_tokenizer_end (HTMLTokenizer *);
-static gchar *e_searching_tokenizer_peek_token (HTMLTokenizer *);
-static gchar *e_searching_tokenizer_next_token (HTMLTokenizer *);
-static gboolean e_searching_tokenizer_has_more (HTMLTokenizer *);
-
-static HTMLTokenizer *e_searching_tokenizer_clone (HTMLTokenizer *);
-
-static const gchar *ignored_tags[] = { "b", "i", NULL };
-static const gchar *space_tags[] = { "br", NULL };
-
-GtkObjectClass *parent_class = NULL;
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-typedef enum {
- MATCH_FAILED = 0,
- MATCH_COMPLETE,
- MATCH_START,
- MATCH_CONTINUES,
- MATCH_END
-} MatchInfo;
-
-typedef struct _SearchInfo SearchInfo;
-struct _SearchInfo {
- gchar *search;
- gchar *current;
-
- gboolean case_sensitive;
- gboolean allow_space_tags_to_match_whitespace;
-
- gint match_size_incr;
- gchar *match_color;
- gboolean match_bold;
-};
-
-struct _ESearchingTokenizerPrivate {
- gint match_count;
- SearchInfo *search;
- GList *pending;
- GList *trash;
-
- gchar *str_primary;
- gchar *str_secondary;
- gboolean case_sensitive_primary;
- gboolean case_sensitive_secondary;
-};
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-static SearchInfo *
-search_info_new (void)
-{
- SearchInfo *si;
-
- si = g_new0 (SearchInfo, 1);
- si->case_sensitive = FALSE;
-
- si->match_size_incr = 1;
- si->match_color = g_strdup ("red");
- si->match_bold = FALSE;
-
- si->allow_space_tags_to_match_whitespace = TRUE;
-
- return si;
-}
-
-static void
-search_info_free (SearchInfo *si)
-{
- if (si) {
- g_free (si->search);
- g_free (si->match_color);
- g_free (si);
- }
-}
-
-static SearchInfo *
-search_info_clone (SearchInfo *si)
-{
- SearchInfo *new_si = NULL;
-
- if (si) {
- new_si = search_info_new ();
- new_si->search = g_strdup (si->search);
- new_si->case_sensitive = si->case_sensitive;
- }
-
- return new_si;
-}
-
-static void
-search_info_set_string (SearchInfo *si, const gchar *str)
-{
- g_return_if_fail (si);
- g_return_if_fail (str);
-
- g_free (si->search);
- si->search = g_strdup (str);
- si->current = NULL;
-}
-
-static void
-search_info_set_case_sensitivity (SearchInfo *si, gboolean flag)
-{
- g_return_if_fail (si);
-
- si->case_sensitive = flag;
-}
-
-static void
-search_info_set_match_size_increase (SearchInfo *si, gint incr)
-{
- g_return_if_fail (si);
- g_return_if_fail (incr >= 0);
-
- si->match_size_incr = incr;
-}
-
-static void
-search_info_set_match_color (SearchInfo *si, const gchar *color)
-{
- g_return_if_fail (si);
-
- g_free (si->match_color);
- si->match_color = g_strdup (color);
-}
-
-static void
-search_info_set_match_bold (SearchInfo *si, gboolean flag)
-{
- g_return_if_fail (si);
-
- si->match_bold = flag;
-}
-
-static void
-search_info_reset (SearchInfo *si)
-{
- if (si == NULL)
- return;
- si->current = NULL;
-}
-
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-static const gchar *
-find_whole (SearchInfo *si, const gchar *haystack, const gchar *needle)
-{
- const gchar *h, *n;
-
- g_return_val_if_fail (si, NULL);
- g_return_val_if_fail (haystack && needle, NULL);
- g_return_val_if_fail (g_utf8_validate (haystack, -1, NULL), NULL);
- g_return_val_if_fail (g_utf8_validate (needle, -1, NULL), NULL);
-
- while (*haystack) {
- h = haystack;
- n = needle;
- while (*h && *n) {
- gunichar c1 = g_utf8_get_char (h);
- gunichar c2 = g_utf8_get_char (n);
-
- if (!si->case_sensitive) {
- c1 = g_unichar_tolower (c1);
- c2 = g_unichar_tolower (c2);
- }
-
- if (c1 != c2)
- break;
-
- h = g_utf8_next_char (h);
- n = g_utf8_next_char (n);
- }
- if (*n == '\0')
- return haystack;
- if (*h == '\0')
- return NULL;
- haystack = g_utf8_next_char (haystack);
- }
-
- return NULL;
-}
-
-/* This is a really stupid implementation of this function. */
-static const gchar *
-find_head (SearchInfo *si, const gchar *haystack, const gchar *needle)
-{
- const gchar *h, *n;
-
- g_return_val_if_fail (si, NULL);
- g_return_val_if_fail (haystack && needle, NULL);
- g_return_val_if_fail (g_utf8_validate (haystack, -1, NULL), NULL);
- g_return_val_if_fail (g_utf8_validate (needle, -1, NULL), NULL);
-
- while (*haystack) {
- h = haystack;
- n = needle;
- while (*h && *n) {
- gunichar c1 = g_utf8_get_char (h);
- gunichar c2 = g_utf8_get_char (n);
-
- if (!si->case_sensitive) {
- c1 = g_unichar_tolower (c1);
- c2 = g_unichar_tolower (c2);
- }
-
- if (c1 != c2)
- break;
-
- h = g_utf8_next_char (h);
- n = g_utf8_next_char (n);
- }
- if (*h == '\0')
- return haystack;
- haystack = g_utf8_next_char (haystack);
- }
-
- return NULL;
-}
-
-static const gchar *
-find_partial (SearchInfo *si, const gchar *haystack, const gchar *needle)
-{
- g_return_val_if_fail (si, NULL);
- g_return_val_if_fail (haystack && needle, NULL);
- g_return_val_if_fail (g_utf8_validate (haystack, -1, NULL), NULL);
- g_return_val_if_fail (g_utf8_validate (needle, -1, NULL), NULL);
-
- while (*needle) {
- gunichar c1 = g_utf8_get_char (haystack);
- gunichar c2 = g_utf8_get_char (needle);
-
- if (!si->case_sensitive) {
- c1 = g_unichar_tolower (c1);
- c2 = g_unichar_tolower (c2);
- }
-
- if (c1 != c2)
- return NULL;
-
- needle = g_utf8_next_char (needle);
- haystack = g_utf8_next_char (haystack);
- }
- return haystack;
-}
-
-static gboolean
-tag_match (const gchar *token, const gchar *tag)
-{
- token += 2; /* Skip past TAG_ESCAPE and < */
- if (*token == '/')
- ++token;
- while (*token && *tag) {
- gunichar c1 = g_unichar_tolower (g_utf8_get_char (token));
- gunichar c2 = g_unichar_tolower (g_utf8_get_char (tag));
- if (c1 != c2)
- return FALSE;
- token = g_utf8_next_char (token);
- tag = g_utf8_next_char (tag);
- }
- return (*tag == '\0' && *token == '>');
-}
-
-static MatchInfo
-search_info_compare (SearchInfo *si, const gchar *token, gint *start_pos, gint *end_pos)
-{
- gboolean token_is_tag;
- const gchar *s;
- gint i;
-
- g_return_val_if_fail (si != NULL, MATCH_FAILED);
- g_return_val_if_fail (token != NULL, MATCH_FAILED);
- g_return_val_if_fail (start_pos != NULL, MATCH_FAILED);
- g_return_val_if_fail (end_pos != NULL, MATCH_FAILED);
-
- token_is_tag = (*token == TAG_ESCAPE);
-
- /* Try to start a new match. */
- if (si->current == NULL) {
-
- /* A match can never start on a token. */
- if (token_is_tag)
- return MATCH_FAILED;
-
- /* Check to see if the search string is entirely embedded within the token. */
- s = find_whole (si, token, si->search);
- if (s) {
- *start_pos = s - token;
- *end_pos = *start_pos + g_utf8_strlen (si->search, -1);
-
- return MATCH_COMPLETE;
- }
-
- /* Check to see if the beginning of the search string lies in this token. */
- s = find_head (si, token, si->search);
- if (s) {
- *start_pos = s - token;
- si->current = si->search;
- while (*s) {
- s = g_utf8_next_char (s);
- si->current = g_utf8_next_char (si->current);
- }
-
- return MATCH_START;
- }
-
- return MATCH_FAILED;
- }
-
- /* Try to continue a previously-started match. */
-
- /* Deal with tags that we encounter mid-match. */
- if (token_is_tag) {
-
- /* "Ignored tags" will never mess up a match. */
- for (i=0; ignored_tags[i]; ++i) {
- if (tag_match (token, ignored_tags[i]))
- return MATCH_CONTINUES;
- }
-
- /* "Space tags" only match whitespace in our ongoing match. */
- if (si->allow_space_tags_to_match_whitespace
- && g_unichar_isspace (g_utf8_get_char (si->current))) {
- for (i=0; space_tags[i]; ++i) {
- if (tag_match (token, space_tags[i])) {
- si->current = g_utf8_next_char (si->current);
- return MATCH_CONTINUES;
- }
- }
- }
-
- /* All other tags derail our match. */
- return MATCH_FAILED;
- }
-
- s = find_partial (si, token, si->current);
- if (s) {
- if (start_pos)
- *start_pos = 0;
- if (end_pos)
- *end_pos = s - token;
- return MATCH_END;
- }
-
- s = find_partial (si, si->current, token);
- if (s) {
- si->current = (gchar *) s;
- return MATCH_CONTINUES;
- }
-
- return MATCH_FAILED;
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-static void
-e_searching_tokenizer_cleanup (ESearchingTokenizer *st)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- if (st->priv->trash) {
- g_list_foreach (st->priv->trash, (GFunc) g_free, NULL);
- g_list_free (st->priv->trash);
- st->priv->trash = NULL;
- }
-
- if (st->priv->pending) {
- g_list_foreach (st->priv->pending, (GFunc) g_free, NULL);
- g_list_free (st->priv->pending);
- st->priv->pending = NULL;
- }
-}
-
-static void
-e_searching_tokenizer_destroy (GtkObject *obj)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (obj);
-
- e_searching_tokenizer_cleanup (st);
-
- search_info_free (st->priv->search);
-
- g_free (st->priv->str_primary);
- g_free (st->priv->str_secondary);
-
- g_free (st->priv);
- st->priv = NULL;
-
- if (parent_class->destroy)
- parent_class->destroy (obj);
-}
-
-static void
-e_searching_tokenizer_class_init (ESearchingTokenizerClass *klass)
-{
- GtkObjectClass *obj_class = (GtkObjectClass *) klass;
- HTMLTokenizerClass *tok_class = HTML_TOKENIZER_CLASS (klass);
-
- e_searching_tokenizer_signals[EST_MATCH_SIGNAL] =
- gtk_signal_new ("match",
- GTK_RUN_LAST,
- obj_class->type,
- GTK_SIGNAL_OFFSET (ESearchingTokenizerClass, match),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE,
- 0);
- gtk_object_class_add_signals (obj_class, e_searching_tokenizer_signals, EST_LAST_SIGNAL);
-
- obj_class->destroy = e_searching_tokenizer_destroy;
-
- tok_class->begin = e_searching_tokenizer_begin;
- tok_class->end = e_searching_tokenizer_end;
-
- tok_class->peek_token = e_searching_tokenizer_peek_token;
- tok_class->next_token = e_searching_tokenizer_next_token;
- tok_class->has_more = e_searching_tokenizer_has_more;
- tok_class->clone = e_searching_tokenizer_clone;
-
- parent_class = gtk_type_class (HTML_TYPE_TOKENIZER);
-}
-
-static void
-e_searching_tokenizer_init (ESearchingTokenizer *st)
-{
- st->priv = g_new0 (struct _ESearchingTokenizerPrivate, 1);
-}
-
-GtkType
-e_searching_tokenizer_get_type (void)
-{
- static GtkType e_searching_tokenizer_type = 0;
- if (! e_searching_tokenizer_type) {
- static GtkTypeInfo e_searching_tokenizer_info = {
- "ESearchingTokenizer",
- sizeof (ESearchingTokenizer),
- sizeof (ESearchingTokenizerClass),
- (GtkClassInitFunc) e_searching_tokenizer_class_init,
- (GtkObjectInitFunc) e_searching_tokenizer_init,
- NULL, NULL,
- (GtkClassInitFunc) NULL
- };
- e_searching_tokenizer_type = gtk_type_unique (HTML_TYPE_TOKENIZER,
- &e_searching_tokenizer_info);
- }
- return e_searching_tokenizer_type;
-}
-
-HTMLTokenizer *
-e_searching_tokenizer_new (void)
-{
- return (HTMLTokenizer *) gtk_type_new (E_TYPE_SEARCHING_TOKENIZER);
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-static GList *
-g_list_remove_head (GList *x)
-{
- GList *repl = NULL;
- if (x) {
- repl = g_list_remove_link (x, x);
- g_list_free_1 (x);
- }
- return repl;
-}
-
-/* I can't believe that there isn't a better way to do this. */
-static GList *
-g_list_insert_before (GList *list, GList *llink, gpointer data)
-{
- gint pos = g_list_position (list, llink);
- return g_list_insert (list, data, pos);
-}
-
-static gchar *
-pop_pending (ESearchingTokenizer *st)
-{
- gchar *token = NULL;
- if (st->priv->pending) {
- token = (gchar *) st->priv->pending->data;
- st->priv->trash = g_list_prepend (st->priv->trash, token);
- st->priv->pending = g_list_remove_head (st->priv->pending);
- }
- return token;
-}
-
-static inline void
-add_pending (ESearchingTokenizer *st, gchar *tok)
-{
- st->priv->pending = g_list_append (st->priv->pending, tok);
-}
-
-static void
-add_pending_match_begin (ESearchingTokenizer *st, SearchInfo *si)
-{
- gchar *size_str = NULL;
- gchar *color_str= NULL;
-
- if (si->match_size_incr > 0)
- size_str = g_strdup_printf (" size=+%d", si->match_size_incr);
- if (si->match_color)
- color_str = g_strdup_printf (" color=%s", si->match_color);
-
- if (size_str || color_str)
- add_pending (st, g_strdup_printf ("%c<font%s%s>",
- TAG_ESCAPE,
- size_str ? size_str : "",
- color_str ? color_str : ""));
-
- g_free (size_str);
- g_free (color_str);
-
- if (si->match_bold)
- add_pending (st, g_strdup_printf ("%c<b>", TAG_ESCAPE));
-}
-
-static void
-add_pending_match_end (ESearchingTokenizer *st, SearchInfo *si)
-{
- if (si->match_bold)
- add_pending (st, g_strdup_printf ("%c</b>", TAG_ESCAPE));
-
- if (si->match_size_incr > 0 || si->match_color)
- add_pending (st, g_strdup_printf ("%c</font>", TAG_ESCAPE));
-}
-
-static void
-add_to_trash (ESearchingTokenizer *st, gchar *txt)
-{
- st->priv->trash = g_list_prepend (st->priv->trash, txt);
-}
-
-static gchar *
-get_next_token (ESearchingTokenizer *st)
-{
- HTMLTokenizer *ht = HTML_TOKENIZER (st);
- HTMLTokenizerClass *klass = HTML_TOKENIZER_CLASS (parent_class);
-
- return klass->has_more (ht) ? klass->next_token (ht) : NULL;
-}
-
-/*
- * Move the matched part of the queue into pending, replacing the start and end placeholders by
- * the appropriate tokens.
- */
-static GList *
-queue_matched (ESearchingTokenizer *st, SearchInfo *si, GList *q)
-{
- GList *qh = q;
- gboolean post_start = FALSE;
-
- while (q != NULL) {
- GList *q_next = g_list_next (q);
- if (!strcmp ((gchar *) q->data, START_MAGIC)) {
- add_pending_match_begin (st, si);
- post_start = TRUE;
- } else if (!strcmp ((gchar *) q->data, END_MAGIC)) {
- add_pending_match_end (st, si);
- q_next = NULL;
- } else {
- gboolean is_tag = *((gchar *)q->data) == TAG_ESCAPE;
- if (is_tag && post_start)
- add_pending_match_end (st, si);
- add_pending (st, g_strdup ((gchar *) q->data));
- if (is_tag && post_start)
- add_pending_match_begin (st, si);
- }
- qh = g_list_remove_link (qh, q);
- g_list_free_1 (q);
- q = q_next;
- }
-
- return qh;
-}
-
-/*
- * Strip the start and end placeholders out of the queue.
- */
-static GList *
-queue_match_failed (ESearchingTokenizer *st, GList *q)
-{
- GList *qh = q;
-
- /* If we do find the START_MAGIC token in the queue, we want
- to drop everything up to and including the token immediately
- following START_MAGIC. */
- while (q != NULL && strcmp ((gchar *) q->data, START_MAGIC))
- q = g_list_next (q);
- if (q) {
- q = g_list_next (q);
- /* If there is no token following START_MAGIC, something is
- very wrong. */
- if (q == NULL) {
- g_assert_not_reached ();
- }
- }
-
- /* Otherwise we just want to just drop the the first token. */
- if (q == NULL)
- q = qh;
-
- /* Now move everything up to and including q to pending. */
- while (qh && qh != q) {
- if (strcmp ((gchar *) qh->data, START_MAGIC))
- add_pending (st, g_strdup (qh->data));
- qh = g_list_remove_head (qh);
- }
- if (qh == q) {
- if (strcmp ((gchar *) qh->data, START_MAGIC))
- add_pending (st, g_strdup (qh->data));
- qh = g_list_remove_head (qh);
- }
-
- return qh;
-}
-
-static void
-matched (ESearchingTokenizer *st)
-{
- ++st->priv->match_count;
- gtk_signal_emit (GTK_OBJECT (st), e_searching_tokenizer_signals[EST_MATCH_SIGNAL]);
-}
-
-static void
-get_pending_tokens (ESearchingTokenizer *st)
-{
- GList *queue = NULL;
- gchar *token = NULL;
- MatchInfo result;
- gint start_pos, end_pos;
- GList *start_after = NULL;
-
- /* Get an initial token into the queue. */
- token = get_next_token (st);
- if (token) {
- queue = g_list_append (queue, token);
- }
-
- while (queue) {
- GList *q;
- gboolean finished = FALSE;
- search_info_reset (st->priv->search);
-
- if (start_after) {
- q = g_list_next (start_after);
- start_after = NULL;
- } else {
- q = queue;
- }
-
- while (q) {
- GList *q_next = g_list_next (q);
- token = (gchar *) q->data;
-
- result = search_info_compare (st->priv->search, token, &start_pos, &end_pos);
-
- switch (result) {
-
- case MATCH_FAILED:
-
- queue = queue_match_failed (st, queue);
-
- finished = TRUE;
- break;
-
- case MATCH_COMPLETE:
-
- if (start_pos != 0)
- add_pending (st, g_strndup (token, start_pos));
- add_pending_match_begin (st, st->priv->search);
- add_pending (st, g_strndup (token+start_pos, end_pos-start_pos));
- add_pending_match_end (st, st->priv->search);
- if (*(token+end_pos)) {
- queue->data = g_strdup (token+end_pos);
- add_to_trash (st, (gchar *) queue->data);
- } else {
- queue = g_list_remove_head (queue);
- }
-
- matched (st);
-
- finished = TRUE;
- break;
-
- case MATCH_START: {
-
- gchar *s1 = g_strndup (token, start_pos);
- gchar *s2 = g_strdup (START_MAGIC);
- gchar *s3 = g_strdup (token+start_pos);
-
- queue = g_list_insert_before (queue, q, s1);
- queue = g_list_insert_before (queue, q, s2);
- queue = g_list_insert_before (queue, q, s3);
-
- add_to_trash (st, s1);
- add_to_trash (st, s2);
- add_to_trash (st, s3);
-
- queue = g_list_remove_link (queue, q);
-
- finished = FALSE;
- break;
- }
-
- case MATCH_CONTINUES:
- /* Do nothing... */
- finished = FALSE;
- break;
-
- case MATCH_END: {
- gchar *s1 = g_strndup (token, end_pos);
- gchar *s2 = g_strdup (END_MAGIC);
- gchar *s3 = g_strdup (token+end_pos);
-
- queue = g_list_insert_before (queue, q, s1);
- queue = g_list_insert_before (queue, q, s2);
- queue = g_list_insert_before (queue, q, s3);
-
- add_to_trash (st, s1);
- add_to_trash (st, s2);
- add_to_trash (st, s3);
-
- queue = g_list_remove_link (queue, q);
- queue = queue_matched (st, st->priv->search, queue);
-
- matched (st);
-
- finished = TRUE;
- break;
- }
-
- default:
- g_assert_not_reached ();
- }
-
- /* If we reach the end of the queue but we aren't finished, try to pull in another
- token and stick it onto the end. */
- if (q_next == NULL && !finished) {
- gchar *next_token = get_next_token (st);
- if (next_token) {
- queue = g_list_append (queue, next_token);
- q_next = g_list_last (queue);
- }
- }
- q = finished ? NULL : q_next;
-
- } /* while (q) */
-
- if (!finished && queue) { /* ...we add the token at the head of the queue to pending and try again. */
- add_pending (st, g_strdup ((gchar *) queue->data));
- queue = g_list_remove_head (queue);
- }
-
- } /* while (queue) */
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-static void
-e_searching_tokenizer_begin (HTMLTokenizer *t, gchar *content_type)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t);
- SearchInfo *si;
-
- if (st->priv->search == NULL && (st->priv->str_primary || st->priv->str_secondary)) {
- st->priv->search = search_info_new ();
- }
- si = st->priv->search;
-
-
- if (st->priv->str_primary) {
-
- search_info_set_string (si, st->priv->str_primary);
- search_info_set_case_sensitivity (si, st->priv->case_sensitive_primary);
-
- search_info_set_match_color (si, "red");
- search_info_set_match_size_increase (si, 1);
- search_info_set_match_bold (si, TRUE);
-
- } else if (st->priv->str_secondary) {
-
- search_info_set_string (si, st->priv->str_secondary);
- search_info_set_case_sensitivity (si, st->priv->case_sensitive_secondary);
-
- search_info_set_match_color (si, "purple");
- search_info_set_match_size_increase (si, 1);
- search_info_set_match_bold (si, TRUE);
-
- } else {
-
- search_info_free (st->priv->search);
- st->priv->search = NULL;
-
- }
-
- e_searching_tokenizer_cleanup (st);
- search_info_reset (st->priv->search);
-
- st->priv->match_count = 0;
-
- HTML_TOKENIZER_CLASS (parent_class)->begin (t, content_type);
-}
-
-static void
-e_searching_tokenizer_end (HTMLTokenizer *t)
-{
- e_searching_tokenizer_cleanup (E_SEARCHING_TOKENIZER (t));
-
- HTML_TOKENIZER_CLASS (parent_class)->end (t);
-}
-
-static gchar *
-e_searching_tokenizer_peek_token (HTMLTokenizer *tok)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
-
- /* If no search is active, just use the default method. */
- if (st->priv->search == NULL)
- return HTML_TOKENIZER_CLASS (parent_class)->peek_token (tok);
-
- if (st->priv->pending == NULL)
- get_pending_tokens (st);
- return st->priv->pending ? (gchar *) st->priv->pending->data : NULL;
-}
-
-static gchar *
-e_searching_tokenizer_next_token (HTMLTokenizer *tok)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
-
- /* If no search is active, just use the default method. */
- if (st->priv->search == NULL)
- return HTML_TOKENIZER_CLASS (parent_class)->next_token (tok);
-
- if (st->priv->pending == NULL)
- get_pending_tokens (st);
- return pop_pending (st);
-}
-
-static gboolean
-e_searching_tokenizer_has_more (HTMLTokenizer *tok)
-{
- ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
-
- /* If no search is active, pending will always be NULL and thus
- we'll always fall back to using the default method. */
-
- return st->priv->pending || HTML_TOKENIZER_CLASS (parent_class)->has_more (tok);
-}
-
-static HTMLTokenizer *
-e_searching_tokenizer_clone (HTMLTokenizer *tok)
-{
- ESearchingTokenizer *orig_st = E_SEARCHING_TOKENIZER (tok);
- ESearchingTokenizer *new_st = E_SEARCHING_TOKENIZER (e_searching_tokenizer_new ());
-
- if (new_st->priv->search) {
- search_info_free (new_st->priv->search);
- }
-
- new_st->priv->search = search_info_clone (orig_st->priv->search);
-
- gtk_signal_connect_object (GTK_OBJECT (new_st),
- "match",
- GTK_SIGNAL_FUNC (matched),
- GTK_OBJECT (orig_st));
-
- return HTML_TOKENIZER (new_st);
-}
-/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
-
-static gboolean
-only_whitespace (const gchar *p)
-{
- gunichar c;
- g_return_val_if_fail (p, FALSE);
-
- while (*p && g_unichar_validate (c = g_utf8_get_char (p))) {
- if (!g_unichar_isspace (c))
- return FALSE;
- p = g_utf8_next_char (p);
- }
- return TRUE;
-}
-
-void
-e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *st, const gchar *search_str)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- g_free (st->priv->str_primary);
- st->priv->str_primary = NULL;
-
- if (search_str != NULL
- && g_utf8_validate (search_str, -1, NULL)
- && !only_whitespace (search_str)) {
-
- st->priv->str_primary = g_strdup (search_str);
- }
-}
-
-void
-e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *st, gboolean is_case_sensitive)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- st->priv->case_sensitive_primary = is_case_sensitive;
-}
-
-void
-e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- g_free (st->priv->str_secondary);
- st->priv->str_secondary = NULL;
-
- if (search_str != NULL
- && g_utf8_validate (search_str, -1, NULL)
- && !only_whitespace (search_str)) {
-
- st->priv->str_secondary = g_strdup (search_str);
- }
-}
-
-void
-e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *st, gboolean is_case_sensitive)
-{
- g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
- st->priv->case_sensitive_secondary = is_case_sensitive;
-}
-
-gint
-e_searching_tokenizer_match_count (ESearchingTokenizer *st)
-{
- g_return_val_if_fail (st && E_IS_SEARCHING_TOKENIZER (st), -1);
-
- return st->priv->match_count;
-}
-
-
-
diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h
deleted file mode 100644
index 7852548c04..0000000000
--- a/mail/e-searching-tokenizer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-searching-tokenizer.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_SEARCHING_TOKENIZER_H__
-#define __E_SEARCHING_TOKENIZER_H__
-
-#include <glib.h>
-#include <gtkhtml/htmltokenizer.h>
-
-#define E_TYPE_SEARCHING_TOKENIZER (e_searching_tokenizer_get_type ())
-#define E_SEARCHING_TOKENIZER(o) (GTK_CHECK_CAST ((o), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizer))
-#define E_SEARCHING_TOKENIZER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerClass))
-#define E_IS_SEARCHING_TOKENIZER(o) (GTK_CHECK_TYPE ((o), E_TYPE_SEARCHING_TOKENIZER))
-#define E_IS_SEARCHING_TOKENIZER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TYPE_SEARCHING_TOKENIZER))
-
-typedef struct _ESearchingTokenizer ESearchingTokenizer;
-typedef struct _ESearchingTokenizerClass ESearchingTokenizerClass;
-
-struct _ESearchingTokenizerPrivate;
-
-struct _ESearchingTokenizer {
- HTMLTokenizer parent;
-
- struct _ESearchingTokenizerPrivate *priv;
-};
-
-struct _ESearchingTokenizerClass {
- HTMLTokenizerClass parent_class;
-
- void (*match) (ESearchingTokenizer *);
-};
-
-GtkType e_searching_tokenizer_get_type (void);
-
-HTMLTokenizer *e_searching_tokenizer_new (void);
-
-/* For now, just a simple API */
-
-void e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *, const gchar *);
-void e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive);
-
-void e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *, const gchar *);
-void e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive);
-
-
-gint e_searching_tokenizer_match_count (ESearchingTokenizer *);
-
-
-#endif /* __E_SEARCHING_TOKENIZER_H__ */
-
diff --git a/mail/evolution-mbox-importer.c b/mail/evolution-mbox-importer.c
deleted file mode 100644
index 0e18fb6732..0000000000
--- a/mail/evolution-mbox-importer.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-mbox-importer.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "evolution-mbox-importer.h"
-
-#include <stdio.h>
-
-#include <importer/evolution-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include "mail-importer.h"
-#include "mail-tools.h"
-
-#include <camel/camel.h>
-
-typedef struct {
- MailImporter importer; /* Parent */
-
- char *filename;
- int num;
- CamelMimeParser *mp;
-} MboxImporter;
-
-
-/* EvolutionImporter methods */
-
-static void
-process_item_fn (EvolutionImporter *eimporter,
- CORBA_Object listener,
- void *closure,
- CORBA_Environment *ev)
-{
- MboxImporter *mbi = (MboxImporter *) closure;
- MailImporter *importer = (MailImporter *) mbi;
- gboolean done = FALSE;
- CamelException *ex;
-
- ex = camel_exception_new ();
-
- if (camel_mime_parser_step (mbi->mp, 0, 0) == HSCAN_FROM) {
- /* Import the next message */
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
-
- msg = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mbi->mp) == -1) {
- g_warning ("Failed message %d", mbi->num);
- camel_object_unref (CAMEL_OBJECT (msg));
- done = TRUE;
- }
-
- /* write the mesg */
- info = g_new0 (CamelMessageInfo, 1);
- camel_folder_append_message (importer->folder, msg, info, ex);
- g_free (info);
- camel_object_unref (CAMEL_OBJECT (msg));
- if (camel_exception_is_set (ex)) {
- g_warning ("Failed message %d", mbi->num);
- done = TRUE;
- }
-
- if (!done) {
- mbi->num++;
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mbi->mp, 0, 0);
- }
- } else {
- /* all messages have now been imported */
- camel_folder_sync (importer->folder, FALSE, ex);
- camel_folder_thaw (importer->folder);
- importer->frozen = FALSE;
- done = TRUE;
- }
-
- camel_exception_free (ex);
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_OK,
- !done, ev);
- return;
-}
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- char signature[6];
- gboolean ret = FALSE;
- int fd, n;
-
- fd = open (filename, O_RDONLY);
- if (fd == -1)
- return FALSE;
-
- n = read (fd, signature, 5);
- if (n > 0) {
- signature[n] = '\0';
- if (!g_strncasecmp (signature, "From ", 5))
- ret = TRUE;
- }
-
- close (fd);
-
- return ret;
-}
-
-static void
-importer_destroy_cb (GtkObject *object,
- MboxImporter *mbi)
-{
- MailImporter *importer;
-
- importer = (MailImporter *) mbi;
- if (importer->frozen) {
- CamelException *ex;
-
- ex = camel_exception_new ();
- camel_folder_sync (importer->folder, FALSE, ex);
- camel_exception_free (ex);
-
- camel_folder_thaw (importer->folder);
- }
-
- if (importer->folder)
- camel_object_unref (CAMEL_OBJECT (importer->folder));
-
- g_free (mbi->filename);
- if (mbi->mp)
- camel_object_unref (CAMEL_OBJECT (mbi->mp));
-
- g_free (mbi);
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *eimporter,
- const char *filename,
- void *closure)
-{
- MboxImporter *mbi;
- MailImporter *importer;
- int fd;
-
- mbi = (MboxImporter *) closure;
- importer = (MailImporter *) mbi;
-
- mbi->filename = g_strdup (filename);
-
- fd = open (filename, O_RDONLY);
- if (fd == -1) {
- g_warning ("Cannot open file");
- return FALSE;
- }
-
- mbi->mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mbi->mp, TRUE);
- if (camel_mime_parser_init_with_fd (mbi->mp, fd) == -1) {
- g_warning ("Unable to process spool folder");
- goto fail;
- }
-
- importer->mstream = NULL;
- importer->folder = mail_tool_get_local_inbox (NULL);
-
- if (importer->folder == NULL) {
- g_print ("Bad folder\n");
- goto fail;
- }
-
- camel_folder_freeze (importer->folder);
- importer->frozen = TRUE;
-
- g_warning ("Okay, so everything is now ready to import that mbox file!");
-
- return TRUE;
-
- fail:
- camel_object_unref (CAMEL_OBJECT (mbi->mp));
- mbi->mp = NULL;
-
- return FALSE;
-}
-
-BonoboObject *
-mbox_factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionImporter *importer;
- MboxImporter *mbox;
-
- mbox = g_new0 (MboxImporter, 1);
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, mbox);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), mbox);
-
- return BONOBO_OBJECT (importer);
-}
diff --git a/mail/evolution-mbox-importer.h b/mail/evolution-mbox-importer.h
deleted file mode 100644
index 20b56b81eb..0000000000
--- a/mail/evolution-mbox-importer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-mbox-importer.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#ifndef _EVOLUTION_MBOX_IMPORTER_H_
-#define _EVOLUTION_MBOX_IMPORTER_H_
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#define MBOX_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory"
-
-BonoboObject *mbox_factory_fn (BonoboGenericFactory *_factory,
- void *closure);
-
-#endif
diff --git a/mail/evolution-outlook-importer.c b/mail/evolution-outlook-importer.c
deleted file mode 100644
index 5ab83ba609..0000000000
--- a/mail/evolution-outlook-importer.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-outlook-importer.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-
-#include <importer/evolution-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include <camel/camel-exception.h>
-
-#include "evolution-outlook-importer.h"
-
-#include "mail-importer.h"
-#include "mail-tools.h"
-
-#include <camel/camel-exception.h>
-
-extern char *evolution_dir;
-typedef struct {
- MailImporter importer;
-
- char *filename;
- gboolean oe4; /* Is file OE4 or not? */
- FILE *handle;
- long pos;
- off_t size;
-
- gboolean busy;
-} OutlookImporter;
-
-struct oe_msg_segmentheader {
- int self;
- int increase;
- int include;
- int next;
- int usenet;
-};
-
-typedef struct oe_msg_segmentheader oe_msg_segmentheader;
-
-
-/* EvolutionImporter methods */
-
-/* Based on code from liboe 0.92 (STABLE)
- Copyright (C) 2000 Stephan B. Nedregrd (stephan@micropop.com)
- Modified 2001 Iain Holmes <iain@ximian.com>
- Copyright (C) 2001 Ximian, Inc. */
-
-static void
-process_item_fn (EvolutionImporter *eimporter,
- CORBA_Object listener,
- void *closure,
- CORBA_Environment *ev)
-{
- OutlookImporter *oli = (OutlookImporter *) closure;
- MailImporter *importer = (MailImporter *) oli;
- oe_msg_segmentheader *header;
- gboolean more = TRUE;
- char *cb, *sfull, *s;
- long end_pos = 0;
- int i;
-
- if (oli->busy == TRUE) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_BUSY,
- more, ev);
- return;
- }
-
- oli->busy = TRUE;
- header = g_new (oe_msg_segmentheader, 1);
- fread (header, 16, 1, oli->handle);
-
- /* Write a From line */
- mail_importer_add_line (importer,
- "From evolution-outlook-importer", FALSE);
- end_pos = oli->pos + header->include;
- if (end_pos >= oli->size) {
- end_pos = oli->size;
- more = FALSE;
- }
-
- oli->pos += 4;
-
- cb = g_new (char, 4);
- sfull = g_new (char, 65536);
- s = sfull;
-
- while (oli->pos < end_pos) {
- fread (cb, 1, 4, oli->handle);
- for (i = 0; i < 4; i++, oli->pos++) {
- if (*(cb + i ) != 0x0d) {
- *s++ = *(cb + i);
-
- if (*(cb + i) == 0x0a) {
- *s = '\0';
- mail_importer_add_line (importer,
- sfull, FALSE);
- s = sfull;
- }
- }
- }
- }
-
- if (s != sfull) {
- *s = '\0';
- mail_importer_add_line (importer, sfull, FALSE);
- s = sfull;
- }
-
- mail_importer_add_line (importer, "\n", TRUE);
-
- oli->pos = end_pos;
- fseek (oli->handle, oli->pos, SEEK_SET);
-
- g_free (header);
- g_free (sfull);
- g_free (cb);
-
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_OK,
- more, ev);
- if (more == FALSE) {
- CamelException *ex;
-
- ex = camel_exception_new ();
- camel_folder_thaw (importer->folder);
- camel_folder_sync (importer->folder, FALSE, ex);
- camel_exception_free (ex);
- fclose (oli->handle);
- oli->handle = NULL;
- }
-
- oli->busy = FALSE;
- return;
-}
-
-
-/* EvolutionImporterFactory methods */
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- FILE *handle;
- int signature[4];
-
- /* Outlook Express sniffer.
- Taken from liboe 0.92 (STABLE)
- Copyright (C) 2000 Stephan B. Nedregrd (stephan@micropop.com) */
-
- handle = fopen (filename, "rb");
- if (handle == NULL)
- return FALSE; /* Can't open file: Can't support it :) */
-
- /* SIGNATURE */
- fread (&signature, 16, 1, handle);
- if ((signature[0]!=0xFE12ADCF) || /* OE 5 & OE 5 BETA SIGNATURE */
- (signature[1]!=0x6F74FDC5) ||
- (signature[2]!=0x11D1E366) ||
- (signature[3]!=0xC0004E9A)) {
- if ((signature[0]==0x36464D4A) &&
- (signature[1]==0x00010003)) /* OE4 SIGNATURE */ {
- fclose (handle);
- return TRUE; /* OE 4 */
- }
- fclose (handle);
- return FALSE; /* Not Outlook 4 or 5 */
- }
-
- fclose (handle);
- return FALSE; /* Can't handle OE 5 yet */
-}
-
-static void
-importer_destroy_cb (GtkObject *object,
- OutlookImporter *oli)
-{
- MailImporter *importer;
-
- importer = (MailImporter *) oli;
- if (importer->folder)
- camel_object_unref (CAMEL_OBJECT (importer->folder));
-
- g_free (oli->filename);
- if (oli->handle)
- fclose (oli->handle);
-
- g_free (oli);
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *eimporter,
- const char *filename,
- void *closure)
-{
- OutlookImporter *oli;
- MailImporter *importer;
- struct stat buf;
- long pos = 0x54;
-
- oli = (OutlookImporter *) closure;
- importer = (MailImporter *) oli;
-
- oli->filename = g_strdup (filename);
- /* Will return TRUE if oe4 format */
- oli->oe4 = support_format_fn (NULL, filename, NULL);
- if (oli->oe4 == FALSE) {
- g_warning ("Not OE4 format");
- return FALSE;
- }
-
- oli->handle = fopen (filename, "rb");
- if (oli->handle == NULL) {
- g_warning ("Cannot open the file");
- return FALSE;
- }
-
- /* Get size of file */
- if (stat (filename, &buf) == -1) {
- g_warning ("Cannot stat file");
- return FALSE;
- }
-
- oli->size = buf.st_size;
-
- /* Set the fposition to the begining */
- fseek (oli->handle, pos, SEEK_SET);
- oli->pos = pos;
-
- importer->mstream = NULL;
-
- importer->folder = mail_tool_get_local_inbox (NULL);
-
- if (importer->folder == NULL){
- g_warning ("Bad folder");
- return FALSE;
- }
-
- camel_folder_freeze (importer->folder);
- oli->busy = FALSE;
- return TRUE;
-}
-
-BonoboObject *
-outlook_factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionImporter *importer;
- OutlookImporter *oli;
-
- oli = g_new0 (OutlookImporter, 1);
-
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, oli);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), oli);
-
- return BONOBO_OBJECT (importer);
-}
-
-
-
diff --git a/mail/evolution-outlook-importer.h b/mail/evolution-outlook-importer.h
deleted file mode 100644
index 75515d2972..0000000000
--- a/mail/evolution-outlook-importer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-outlook-importer.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#ifndef _EVOLUTION_OUTLOOK_IMPORTER_H_
-#define _EVOLUTION_OUTLOOK_IMPORTER_H_
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#define OUTLOOK_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory"
-
-BonoboObject *outlook_factory_fn (BonoboGenericFactory *_factory,
- void *closure);
-
-#endif
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
deleted file mode 100644
index e0f808f149..0000000000
--- a/mail/folder-browser-factory.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser-factory.c: A Bonobo Control factory for Folder Browsers
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "widgets/menus/gal-view-menus.h"
-
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-
-#include "folder-browser-factory.h"
-
-#include "folder-browser.h"
-#include "folder-browser-ui.h"
-#include "mail.h"
-#include "mail-callbacks.h"
-#include "shell/Evolution.h"
-#include "mail-config.h"
-#include "mail-ops.h"
-#include "mail-session.h"
-#include "mail-folder-cache.h"
-
-#include "evolution-shell-component-utils.h"
-#include "camel/camel-vtrash-folder.h"
-
-/* The FolderBrowser BonoboControls we have. */
-static EList *control_list = NULL;
-
-/* copied from mail-display.c for now.... */
-static GNOME_Evolution_ShellView
-fb_get_svi (BonoboControl *control)
-{
- Bonobo_ControlFrame control_frame;
- GNOME_Evolution_ShellView shell_view_interface;
- CORBA_Environment ev;
-
- 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)
- g_warning ("Control frame doesn't have Evolution/ShellView.");
-
- return shell_view_interface;
-}
-
-static void
-control_activate (BonoboControl *control,
- BonoboUIComponent *uic,
- FolderBrowser *fb)
-{
- GtkWidget *folder_browser;
- Bonobo_UIContainer container;
-
- container = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (uic, container);
- bonobo_object_release_unref (container, NULL);
-
- g_assert (container == bonobo_ui_component_get_container (uic));
- g_return_if_fail (container != CORBA_OBJECT_NIL);
-
- folder_browser = bonobo_control_get_widget (control);
- folder_browser_set_ui_component (FOLDER_BROWSER (folder_browser), uic);
-
- folder_browser_ui_add_global (fb);
- folder_browser_ui_add_list (fb);
- folder_browser_ui_add_message (fb);
-
- folder_browser_set_shell_view(fb, fb_get_svi (control));
-
- if (fb->folder)
- mail_refresh_folder (fb->folder, NULL, NULL);
-}
-
-static void
-control_deactivate (BonoboControl *control,
- BonoboUIComponent *uic,
- FolderBrowser *fb)
-{
- folder_browser_ui_rm_list (fb);
- folder_browser_ui_rm_all (fb);
-
- if (fb->folder)
- mail_sync_folder (fb->folder, NULL, NULL);
-
- folder_browser_set_ui_component (fb, NULL);
- folder_browser_set_shell_view (fb, CORBA_OBJECT_NIL);
-}
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
- gpointer user_data)
-{
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- if (activate)
- control_activate (control, uic, user_data);
- else
- control_deactivate (control, uic, user_data);
-}
-
-static void
-control_destroy_cb (BonoboControl *control,
- GtkObject *folder_browser)
-{
- gtk_object_destroy (folder_browser);
-}
-
-static void
-browser_destroy_cb (FolderBrowser *fb,
- BonoboControl *control)
-{
- EIterator *it;
-
- /* We do this from browser_destroy_cb rather than
- * control_destroy_cb because currently, the controls
- * don't seem to all get destroyed properly at quit
- * time (but the widgets get destroyed by X). FIXME.
- */
-
- for (it = e_list_get_iterator (control_list); e_iterator_is_valid (it); e_iterator_next (it)) {
- if (e_iterator_get (it) == control) {
- e_iterator_delete (it);
- break;
- }
- }
- gtk_object_unref (GTK_OBJECT (it));
-}
-
-BonoboControl *
-folder_browser_factory_new_control (const char *uri,
- const GNOME_Evolution_Shell shell)
-{
- BonoboControl *control;
- GtkWidget *folder_browser;
-
- folder_browser = folder_browser_new (shell, uri);
- if (folder_browser == NULL)
- return NULL;
-
- FOLDER_BROWSER (folder_browser)->pref_master = TRUE; /* save UI settings changed in this FB */
-
- gtk_widget_show (folder_browser);
-
- control = bonobo_control_new (folder_browser);
-
- if (control == NULL) {
- gtk_object_unref (GTK_OBJECT (folder_browser));
- return NULL;
- }
-
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- control_activate_cb, folder_browser);
-
- gtk_signal_connect (GTK_OBJECT (control), "destroy",
- control_destroy_cb, folder_browser);
- gtk_signal_connect (GTK_OBJECT (folder_browser), "destroy",
- browser_destroy_cb, control);
-
- if (!control_list)
- control_list = e_list_new (NULL, NULL, NULL);
-
- e_list_append (control_list, control);
-
- return control;
-}
-
-EList *
-folder_browser_factory_get_control_list (void)
-{
- if (!control_list)
- control_list = e_list_new (NULL, NULL, NULL);
- return control_list;
-}
diff --git a/mail/folder-browser-factory.h b/mail/folder-browser-factory.h
deleted file mode 100644
index a279e6abd0..0000000000
--- a/mail/folder-browser-factory.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser-factory.c: A Bonobo Control factory for Folder Browsers
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#ifndef _FOLDER_BROWSER_FACTORY_H
-#define _FOLDER_BROWSER_FACTORY_H
-
-#include <bonobo/bonobo-control.h>
-#include "Evolution.h"
-#include "e-util/e-list.h"
-
-BonoboControl *folder_browser_factory_new_control (const char *uri,
- const GNOME_Evolution_Shell shell);
-EList *folder_browser_factory_get_control_list (void);
-
-#endif /* _FOLDER_BROWSER_FACTORY_H */
diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c
deleted file mode 100644
index 662fd98de3..0000000000
--- a/mail/folder-browser-ui.c
+++ /dev/null
@@ -1,587 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser-ui.c: Sets up the Bonobo UI for FolderBrowsers
- *
- * Author:
- * Peter Williams <peterw@ximian.com>
- *
- * (C) 2001 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h> /* gnome_util_prepend_user_home */
-
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include "widgets/menus/gal-view-menus.h" /* GalView stuff */
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-
-#include "mail-callbacks.h" /* almost all the verbs */
-#include "mail-session.h" /* mail_session_forget_passwords */
-
-#include "folder-browser-ui.h"
-
-#include "evolution-shell-component-utils.h" /* Pixmap stuff */
-#include "camel/camel-vtrash-folder.h" /* vtrash checking */
-
-/*
- * Add with 'folder_browser'
- */
-
-static BonoboUIVerb message_verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("MailNext", next_msg),
- BONOBO_UI_UNSAFE_VERB ("MailNextFlagged", next_flagged_msg),
- BONOBO_UI_UNSAFE_VERB ("MailNextUnread", next_unread_msg),
-/* BONOBO_UI_UNSAFE_VERB ("MailNextThread", next_thread),*/
- BONOBO_UI_UNSAFE_VERB ("MailPrevious", previous_msg),
- BONOBO_UI_UNSAFE_VERB ("MailPreviousFlagged", previous_flagged_msg),
- BONOBO_UI_UNSAFE_VERB ("MailPreviousUnread", previous_unread_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageApplyFilters", apply_filters),
- BONOBO_UI_UNSAFE_VERB ("MessageCopy", copy_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageDelete", delete_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageForward", forward),
- BONOBO_UI_UNSAFE_VERB ("MessageForwardAttached", forward_attached),
- BONOBO_UI_UNSAFE_VERB ("MessageForwardInline", forward_inline),
- BONOBO_UI_UNSAFE_VERB ("MessageForwardQuoted", forward_quoted),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsRead", mark_as_seen),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnRead", mark_as_unseen),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsImportant", mark_as_important),
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnimportant", mark_as_unimportant),
- BONOBO_UI_UNSAFE_VERB ("MessageMove", move_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageOpen", open_message),
- BONOBO_UI_UNSAFE_VERB ("MessageReplyAll", reply_to_all),
- BONOBO_UI_UNSAFE_VERB ("MessageReplyList", reply_to_list),
- BONOBO_UI_UNSAFE_VERB ("MessageReplySender", reply_to_sender),
- BONOBO_UI_UNSAFE_VERB ("MessageResend", resend_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageSaveAs", save_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageSearch", search_msg),
- BONOBO_UI_UNSAFE_VERB ("MessageUndelete", undelete_msg),
- BONOBO_UI_UNSAFE_VERB ("PrintMessage", print_msg),
- BONOBO_UI_UNSAFE_VERB ("PrintPreviewMessage", print_preview_msg),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterMailingList", filter_mlist),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterRecipient", filter_recipient),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterSender", filter_sender),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilterSubject", filter_subject),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderMailingList", vfolder_mlist),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderRecipient", vfolder_recipient),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSender", vfolder_sender),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSubject", vfolder_subject),
- BONOBO_UI_UNSAFE_VERB ("ViewLoadImages", load_images),
- /* ViewHeaders stuff is a radio */
-
- BONOBO_UI_VERB_END
-};
-
-static BonoboUIVerb list_verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("EditCut", folder_browser_cut),
- BONOBO_UI_UNSAFE_VERB ("EditCopy", folder_browser_copy),
- BONOBO_UI_UNSAFE_VERB ("EditPaste", folder_browser_paste),
- BONOBO_UI_UNSAFE_VERB ("EditInvertSelection", invert_selection),
- BONOBO_UI_UNSAFE_VERB ("EditSelectAll", select_all),
- BONOBO_UI_UNSAFE_VERB ("EditSelectThread", select_thread),
- BONOBO_UI_UNSAFE_VERB ("ChangeFolderProperties", configure_folder),
- BONOBO_UI_UNSAFE_VERB ("FolderExpunge", expunge_folder),
- /* HideDeleted is a toggle */
- BONOBO_UI_UNSAFE_VERB ("MessageMarkAllAsRead", mark_all_as_seen),
- BONOBO_UI_UNSAFE_VERB ("ViewHideRead", hide_read),
- BONOBO_UI_UNSAFE_VERB ("ViewHideSelected", hide_selected),
- BONOBO_UI_UNSAFE_VERB ("ViewShowAll", hide_none),
- /* ViewThreaded is a toggle */
-
- BONOBO_UI_VERB_END
-};
-
-static BonoboUIVerb global_verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("EmptyTrash", empty_trash),
- BONOBO_UI_UNSAFE_VERB ("ForgetPasswords", mail_session_forget_passwords),
- BONOBO_UI_UNSAFE_VERB ("MailCompose", compose_msg),
- BONOBO_UI_UNSAFE_VERB ("MailGetSend", send_receive_mail),
- BONOBO_UI_UNSAFE_VERB ("MailStop", stop_threads),
- BONOBO_UI_UNSAFE_VERB ("ToolsFilters", filter_edit),
- BONOBO_UI_UNSAFE_VERB ("ToolsSettings", providers_config),
- BONOBO_UI_UNSAFE_VERB ("ToolsSubscriptions", manage_subscriptions),
- BONOBO_UI_UNSAFE_VERB ("ToolsVFolders", vfolder_edit_vfolders),
- /* ViewPreview is a toggle */
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap message_pixcache [] = {
- E_PIXMAP ("/commands/PrintMessage", "print.xpm"),
- E_PIXMAP ("/commands/PrintPreviewMessage", "print-preview.xpm"),
- E_PIXMAP ("/commands/MessageDelete", "evolution-trash-mini.png"),
- E_PIXMAP ("/commands/MessageUndelete", "undelete_message-16.png"),
- E_PIXMAP ("/commands/MessageCopy", "copy_16_message.xpm"),
- E_PIXMAP ("/commands/MessageMove", "move_message.xpm"),
- E_PIXMAP ("/commands/MessageReplyAll", "reply_to_all.xpm"),
- E_PIXMAP ("/commands/MessageReplySender", "reply.xpm"),
- E_PIXMAP ("/commands/MessageForward", "forward.xpm"),
- E_PIXMAP ("/commands/MessageApplyFilters", "apply-filters-16.xpm"),
- E_PIXMAP ("/commands/MessageSearch", "search-16.png"),
- E_PIXMAP ("/commands/MessageSaveAs", "save-as-16.png"),
-
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplySender", "buttons/reply.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageReplyAll", "buttons/reply-to-all.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageForward", "buttons/forward.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/PrintMessage", "buttons/print.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageMove", "buttons/move-message.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageCopy", "buttons/copy-message.png"),
- E_PIXMAP ("/Toolbar/MailMessageToolbar/MessageDelete", "buttons/delete-message.png"),
-
- E_PIXMAP ("/Toolbar/MailNextButtons/MailNext", "buttons/next-message.png"),
- E_PIXMAP ("/Toolbar/MailNextButtons/MailPrevious", "buttons/previous-message.png"),
-
- E_PIXMAP_END
-};
-
-static EPixmap list_pixcache [] = {
- E_PIXMAP ("/commands/ChangeFolderProperties", "configure_16_folder.xpm"),
- E_PIXMAP ("/commands/ViewHideRead", "hide_read_messages.xpm"),
- E_PIXMAP ("/commands/ViewHideSelected", "hide_selected_messages.xpm"),
- E_PIXMAP ("/commands/ViewShowAll", "show_all_messages.xpm"),
-
- E_PIXMAP ("/commands/EditCut", "16_cut.png"),
- E_PIXMAP ("/commands/EditCopy", "16_copy.png"),
- E_PIXMAP ("/commands/EditPaste", "16_paste.png"),
-
- E_PIXMAP_END
-};
-
-static EPixmap global_pixcache [] = {
- E_PIXMAP ("/commands/MailCompose", "new-message.xpm"),
- E_PIXMAP ("/commands/MailGetSend", "send-receive.xpm"),
- E_PIXMAP ("/commands/ToolsSettings", "configure_16_mail.xpm"),
-
- E_PIXMAP ("/Toolbar/MailGetSend", "buttons/send-24-receive.png"),
- E_PIXMAP ("/Toolbar/MailCompose", "buttons/compose-message.png"),
-
- E_PIXMAP_END
-};
-
-static void ui_add (FolderBrowser *fb,
- const gchar *name,
- BonoboUIVerb verb[],
- EPixmap pixcache[])
-{
- BonoboUIComponent *uic = fb->uicomp;
- gchar *file;
-
- bonobo_ui_component_add_verb_list_with_data (uic, verb, fb);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- file = g_strconcat ("evolution-mail-", name, ".xml", NULL);
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, file, "evolution-mail");
- g_free (file);
-
- e_pixmaps_update (uic, pixcache);
-
- bonobo_ui_component_thaw (uic, NULL);
-}
-
-/* more complex stuff */
-
-static void
-display_view(GalViewCollection *collection,
- GalView *view,
- gpointer data)
-{
- FolderBrowser *fb = data;
- if (GAL_IS_VIEW_ETABLE(view)) {
- e_tree_set_state_object(fb->message_list->tree, GAL_VIEW_ETABLE(view)->state);
- }
-}
-
-static void
-folder_browser_setup_view_menus (FolderBrowser *fb,
- BonoboUIComponent *uic)
-{
- GalViewFactory *factory;
- ETableSpecification *spec;
- char *local_dir;
-
- g_assert (fb->view_collection == NULL);
- g_assert (fb->view_menus == NULL);
-
- fb->view_collection = gal_view_collection_new();
-
- local_dir = gnome_util_prepend_user_home ("/evolution/views/mail/");
- gal_view_collection_set_storage_directories(
- fb->view_collection,
- EVOLUTION_DATADIR "/evolution/views/mail/",
- local_dir);
- g_free (local_dir);
-
- spec = e_table_specification_new();
- e_table_specification_load_from_file(spec, EVOLUTION_ETSPECDIR "/message-list.etspec");
-
- factory = gal_view_factory_etable_new (spec);
- gtk_object_unref (GTK_OBJECT (spec));
- gal_view_collection_add_factory (fb->view_collection, factory);
- gtk_object_unref (GTK_OBJECT (factory));
-
- gal_view_collection_load(fb->view_collection);
-
- fb->view_menus = gal_view_menus_new(fb->view_collection);
- gal_view_menus_apply(fb->view_menus, uic, NULL);
- gtk_signal_connect(GTK_OBJECT(fb->view_collection), "display_view",
- display_view, fb);
-}
-
-/* Gets rid of the view collection and view menus objects */
-static void
-folder_browser_discard_view_menus (FolderBrowser *fb)
-{
- g_assert (fb->view_collection != NULL);
- g_assert (fb->view_menus != NULL);
-
- gtk_object_unref (GTK_OBJECT (fb->view_collection));
- fb->view_collection = NULL;
-
- gtk_object_unref (GTK_OBJECT (fb->view_menus));
- fb->view_menus = NULL;
-}
-
-static void
-folder_browser_setup_property_menu (FolderBrowser *fb,
- BonoboUIComponent *uic)
-{
- char *name, *base = NULL;
-
- if (fb->uri)
- base = g_basename (fb->uri);
-
- if (base && base [0] != 0)
- name = g_strdup_printf (_("Properties for \"%s\""), base);
- else
- name = g_strdup (_("Properties"));
-
- bonobo_ui_component_set_prop (
- uic, "/menu/File/Folder/ComponentPlaceholder/ChangeFolderProperties",
- "label", name, NULL);
- g_free (name);
-}
-
-/* Must be in the same order as MailConfigDisplayStyle */
-/* used in folder-browser.c as well (therefore not static) */
-char *message_display_styles[] = {
- "/commands/ViewNormal",
- "/commands/ViewFullHeaders",
- "/commands/ViewSource"
-};
-
-/* public */
-
-void
-folder_browser_ui_add_message (FolderBrowser *fb)
-{
- int state;
- BonoboUIComponent *uic = fb->uicomp;
- FolderBrowserSelectionState prev_state;
-
- ui_add (fb, "message", message_verbs, message_pixcache);
-
- /* Display Style */
-
- state = fb->mail_display->display_style;
- bonobo_ui_component_set_prop (uic, message_display_styles[state],
- "state", "1", NULL);
- bonobo_ui_component_add_listener (uic, "ViewNormal", folder_browser_set_message_display_style, fb);
- bonobo_ui_component_add_listener (uic, "ViewFullHeaders", folder_browser_set_message_display_style, fb);
- bonobo_ui_component_add_listener (uic, "ViewSource", folder_browser_set_message_display_style, fb);
- /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */
- folder_browser_set_message_display_style (uic, strrchr (message_display_styles[state], '/') + 1,
- Bonobo_UIComponent_STATE_CHANGED, "1", fb);
-
- /* Resend Message */
-
- if (fb->folder && !folder_browser_is_sent (fb))
- bonobo_ui_component_set_prop (uic, "/commands/MessageResend", "sensitive", "0", NULL);
-
- /* sensitivity of message-specific commands */
-
- prev_state = fb->selection_state;
- fb->selection_state = FB_SELSTATE_UNDEFINED;
- folder_browser_ui_set_selection_state (fb, prev_state);
-}
-
-/*
-void
-folder_browser_ui_rm_message (FolderBrowser *fb)
-{
- ui_rm (fb, "message", message_verbs, message_pixcache);
-}
-*/
-
-void
-folder_browser_ui_add_list (FolderBrowser *fb)
-{
- int state;
- BonoboUIComponent *uic = fb->uicomp;
-
- ui_add (fb, "list", list_verbs, list_pixcache);
-
- /* Hide Deleted */
- if (fb->folder && CAMEL_IS_VTRASH_FOLDER (fb->folder)) {
- bonobo_ui_component_set_prop (uic, "/commands/HideDeleted", "sensitive", "0", NULL);
- state = FALSE;
- } else {
- state = mail_config_get_hide_deleted ();
- }
- bonobo_ui_component_set_prop (uic, "/commands/HideDeleted", "state", state ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (uic, "HideDeleted", folder_browser_toggle_hide_deleted, fb);
- /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */
- folder_browser_toggle_hide_deleted (uic, "", Bonobo_UIComponent_STATE_CHANGED,
- state ? "1" : "0", fb);
-
- /* Threaded toggle */
- state = mail_config_get_thread_list (FOLDER_BROWSER (fb)->uri);
- bonobo_ui_component_set_prop (uic, "/commands/ViewThreaded", "state", state ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (uic, "ViewThreaded", folder_browser_toggle_threads, fb);
- /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */
- folder_browser_toggle_threads (uic, "", Bonobo_UIComponent_STATE_CHANGED,
- state ? "1" : "0", fb);
-
- /* Property menu */
- folder_browser_setup_property_menu (fb, fb->uicomp);
-
- /* View menu */
- folder_browser_setup_view_menus (fb, fb->uicomp);
-}
-
-void
-folder_browser_ui_rm_list (FolderBrowser *fb)
-{
- /* View menu */
- folder_browser_discard_view_menus (fb);
-}
-
-void
-folder_browser_ui_add_global (FolderBrowser *fb)
-{
- int state;
- BonoboUIComponent *uic = fb->uicomp;
-
- ui_add (fb, "global", global_verbs, global_pixcache);
-
- /* (Pre)view toggle */
-
- state = mail_config_get_show_preview (FOLDER_BROWSER (fb)->uri);
- bonobo_ui_component_set_prop (uic, "/commands/ViewPreview", "state", state ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (uic, "ViewPreview", folder_browser_toggle_preview, fb);
- /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */
- folder_browser_toggle_preview (uic, "", Bonobo_UIComponent_STATE_CHANGED, state ? "1" : "0", fb);
-
- /* Stop button */
-
- bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", "0", NULL);
-}
-
-/*
-void
-folder_browser_ui_rm_global (FolderBrowser *fb)
-{
-}
-*/
-
-void
-folder_browser_ui_rm_all (FolderBrowser *fb)
-{
- BonoboUIComponent *uic = fb->uicomp;
-
- bonobo_ui_component_rm (uic, "/", NULL);
- bonobo_ui_component_unset_container (uic);
-}
-
-struct sensitize_data {
- const char **items;
- gboolean enable;
-};
-
-static void
-fbui_real_sensitize_items (BonoboUIComponent *uic, const char **items, gboolean enable)
-{
- int i;
- char name_buf[256]; /* this should really be large enough */
- char *value;
-
- if (enable)
- value = "1";
- else
- value = "0";
-
- for (i = 0; items[i]; i++) {
- sprintf (name_buf, "/commands/%s", items[i]);
- bonobo_ui_component_set_prop (uic, name_buf, "sensitive", value, NULL);
- }
-}
-
-static gboolean
-fbui_sensitize_timeout (gpointer data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (data);
- BonoboUIComponent *uic = fb->uicomp;
- GSList *iter;
- struct sensitize_data *sd;
-
- if (uic)
- bonobo_ui_component_freeze (uic, NULL);
- for (iter = fb->sensitize_changes; iter; iter = iter->next) {
- sd = (struct sensitize_data *) iter->data;
-
- /* if UIC == NULL, we could just return TRUE, but we don't
- * know when UIC is going to come back... when it does,
- * the UI stuff will be reset, so no problem.
- */
-
- if (uic)
- fbui_real_sensitize_items (uic, sd->items, sd->enable);
- g_free (sd);
- }
- if (uic)
- bonobo_ui_component_thaw (uic, NULL);
-
- g_slist_free (fb->sensitize_changes);
- fb->sensitize_changes = NULL;
- fb->sensitize_timeout_id = 0;
- return FALSE;
-}
-
-static void
-fbui_sensitize_items (FolderBrowser *fb, const char **items, gboolean enable)
-{
- struct sensitize_data *sd;
- GSList *iter;
-
- /* If we're already updating these items, save an update by
- * changing the item in the list. */
-
- for (iter = fb->sensitize_changes; iter; iter = iter->next) {
- sd = (struct sensitize_data *) iter->data;
-
- if (sd->items == items)
- break;
- }
-
- if (iter == NULL) {
- sd = g_new (struct sensitize_data, 1);
- sd->items = items;
- sd->enable = enable;
-
- fb->sensitize_changes = g_slist_prepend (fb->sensitize_changes, sd);
- } else {
- /* Redundant, but shuts up the compiler. */
- sd = (struct sensitize_data *) iter->data;
- sd->enable = enable;
- }
-
- if (fb->sensitize_timeout_id == 0)
- fb->sensitize_timeout_id = g_timeout_add (110, fbui_sensitize_timeout, fb);
-}
-
-static const char *message_pane_enables[] = {
- /* these only work if there's a message in the message pane
- * (preview pane). This state is independent of how many are
- * selected. */
- "PrintMessage", "PrintPreviewMessage",
- "ViewFullHeaders", "ViewLoadImages", "ViewNormal", "ViewSource",
-
- NULL
-};
-
-void
-folder_browser_ui_set_selection_state (FolderBrowser *fb, FolderBrowserSelectionState state)
-{
- /* We'd like to keep the number of changes to be minimal cause
- * this is a lot of corba traffic. So we break these sets of commands into bits:
- *
- * Also remember that everything defaults to sensitized
- *
- * Disable:
- * NONE = none_disables + multiple_disables
- * SINGLE = [nothing disabled]
- * MULTIPLE = multiple_disables
- * UNDEFINED = [nothing disabled]
- */
-
- static const char *none_disables[] = {
- /* actions that work on > 0 messages */
- "MessageApplyFilters",
- "MessageCopy", "MessageMove",
- "MessageDelete", "MessageUndelete",
- "MessageMarkAsRead", "MessageMarkAsUnRead",
- "MessageMarkAsImportant", "MessageMarkAsUnimportant",
- "MessageOpen", "MessageSaveAs",
- "MessageForward", "MessageForwardAttached",
-
- "EditCut", "EditCopy", "EditPaste", "ViewHideSelected",
-
- NULL
- };
-
- static const char *multiple_disables[] = {
- /* actions that work on exactly 1 message */
- "MessageReplyAll", "MessageReplyList", "MessageReplySender", "MessageResend",
- "MessageForwardInline", "MessageForwardQuoted", "MessageSearch",
-
- "ToolsFilterMailingList", "ToolsFilterRecipient", "ToolsFilterSender",
- "ToolsFilterSubject", "ToolsVFolderMailingList", "ToolsVFolderRecipient",
- "ToolsVFolderSender", "ToolsVFolderSubject",
-
- /* moving around -- if we have more than one message selected, it
- * doesn't behave very. If people complain, it isn't a problem
- * to put these commands in none_disables tho. */
- "MailNext", "MailNextFlagged", "MailNextUnread", "MailNextThread",
- "MailPrevious", "MailPreviousFlagged", "MailPreviousUnread",
-
- NULL
- };
-
- /* assumes that all the appropriate XML's have been loaded */
-
- if (state == fb->selection_state)
- return;
-
- switch (state) {
- case FB_SELSTATE_NONE:
- fbui_sensitize_items (fb, none_disables, FALSE);
- if (fb->selection_state != FB_SELSTATE_MULTIPLE)
- fbui_sensitize_items (fb, multiple_disables, FALSE);
- break;
- case FB_SELSTATE_SINGLE:
- if (fb->selection_state != FB_SELSTATE_UNDEFINED)
- fbui_sensitize_items (fb, multiple_disables, TRUE);
- if (fb->selection_state == FB_SELSTATE_NONE)
- fbui_sensitize_items (fb, none_disables, TRUE);
- break;
- case FB_SELSTATE_MULTIPLE:
- if (fb->selection_state == FB_SELSTATE_NONE)
- fbui_sensitize_items (fb, none_disables, TRUE);
- else
- fbui_sensitize_items (fb, multiple_disables, FALSE);
- break;
- case FB_SELSTATE_UNDEFINED:
- printf ("changing to undefined selection state? hah!\n");
- return;
- }
-
- if (fb->loaded_uid == NULL)
- fbui_sensitize_items (fb, message_pane_enables, FALSE);
-
- fb->selection_state = state;
-}
-
-void
-folder_browser_ui_message_loaded (FolderBrowser *fb)
-{
- BonoboUIComponent *uic = fb->uicomp;
-
- if (fb->loaded_uid == NULL && uic)
- fbui_sensitize_items (fb, message_pane_enables, TRUE);
-}
diff --git a/mail/folder-browser-ui.h b/mail/folder-browser-ui.h
deleted file mode 100644
index 8bd0d13c1c..0000000000
--- a/mail/folder-browser-ui.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser-ui.c: Sets up the Bonobo UI for FolderBrowsers
- *
- * Author:
- * Peter Williams <peterw@ximian.com>
- *
- * (C) 2001 Ximian, Inc.
- */
-
-#ifndef _FOLDER_BROWSER_UI_H
-#define _FOLDER_BROWSER_UI_H
-
-#include "folder-browser.h"
-
-void folder_browser_ui_add_message (FolderBrowser *fb);
-void folder_browser_ui_add_list (FolderBrowser *fb);
-void folder_browser_ui_add_global (FolderBrowser *fb);
-
-void folder_browser_ui_rm_list (FolderBrowser *fb);
-void folder_browser_ui_rm_all (FolderBrowser *fb);
-
-/* these affect the sensitivity of UI elements */
-void folder_browser_ui_set_selection_state (FolderBrowser *fb, FolderBrowserSelectionState state);
-void folder_browser_ui_message_loaded (FolderBrowser *fb);
-
-#endif /* _FOLDER_BROWSER_UI_H */
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
deleted file mode 100644
index a3249c8064..0000000000
--- a/mail/folder-browser.c
+++ /dev/null
@@ -1,1995 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser.c: Folder browser top level component
- *
- * Author:
- * Miguel de Icaza (miguel@kernel.org)
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkinvisible.h>
-#include <gal/e-paned/e-vpaned.h>
-#include <gal/e-table/e-table.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <libgnomeui/gnome-dialog-util.h>
-
-#include <gtkhtml/htmlengine.h>
-#include <gtkhtml/htmlengine-edit-cut-and-paste.h>
-
-#include "filter/vfolder-rule.h"
-#include "filter/vfolder-context.h"
-#include "filter/filter-option.h"
-#include "filter/filter-input.h"
-
-#include "mail-search-dialogue.h"
-#include "e-util/e-sexp.h"
-#include "e-util/e-mktemp.h"
-#include "folder-browser.h"
-#include "e-searching-tokenizer.h"
-#include "mail.h"
-#include "mail-callbacks.h"
-#include "mail-tools.h"
-#include "message-list.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-#include "mail-autofilter.h"
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "folder-browser-ui.h"
-
-#include "mail-local.h"
-#include "mail-config.h"
-
-#include <camel/camel-vtrash-folder.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-mem.h>
-
-#define d(x)
-
-#define PARENT_TYPE (gtk_table_get_type ())
-
-static void folder_changed(CamelObject *o, void *event_data, void *data);
-static void main_folder_changed(CamelObject *o, void *event_data, void *data);
-
-#define X_EVOLUTION_MESSAGE_TYPE "x-evolution-message"
-#define MESSAGE_RFC822_TYPE "message/rfc822"
-#define TEXT_URI_LIST_TYPE "text/uri-list"
-#define TEXT_PLAIN_TYPE "text/plain"
-
-/* Drag & Drop types */
-enum DndTargetType {
- DND_TARGET_TYPE_X_EVOLUTION_MESSAGE,
- DND_TARGET_TYPE_MESSAGE_RFC822,
- DND_TARGET_TYPE_TEXT_URI_LIST,
-};
-
-static GtkTargetEntry drag_types[] = {
- { X_EVOLUTION_MESSAGE_TYPE, 0, DND_TARGET_TYPE_X_EVOLUTION_MESSAGE },
- { MESSAGE_RFC822_TYPE, 0, DND_TARGET_TYPE_MESSAGE_RFC822 },
- { TEXT_URI_LIST_TYPE, 0, DND_TARGET_TYPE_TEXT_URI_LIST },
-};
-
-static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]);
-
-enum PasteTargetType {
- PASTE_TARGET_TYPE_X_EVOLUTION_MESSAGE,
- PASTE_TARGET_TYPE_TEXT_PLAIN,
-};
-
-static GtkTargetPair paste_types[] = {
- { 0, 0, PASTE_TARGET_TYPE_X_EVOLUTION_MESSAGE },
- { GDK_SELECTION_TYPE_STRING, 0, PASTE_TARGET_TYPE_TEXT_PLAIN },
-};
-
-static const int num_paste_types = sizeof (paste_types) / sizeof (paste_types[0]);
-
-static GdkAtom clipboard_atom = GDK_NONE;
-
-static GtkObjectClass *folder_browser_parent_class;
-
-enum {
- FOLDER_LOADED,
- MESSAGE_LOADED,
- LAST_SIGNAL
-};
-
-static guint folder_browser_signals [LAST_SIGNAL] = {0, };
-
-static void
-folder_browser_finalise (GtkObject *object)
-{
- FolderBrowser *folder_browser;
- CORBA_Environment ev;
-
- folder_browser = FOLDER_BROWSER(object);
-
- CORBA_exception_init (&ev);
-
- if (folder_browser->search_full)
- gtk_object_unref (GTK_OBJECT (folder_browser->search_full));
-
- if (folder_browser->sensitize_timeout_id)
- g_source_remove (folder_browser->sensitize_timeout_id);
-
- if (folder_browser->shell != CORBA_OBJECT_NIL) {
- CORBA_Object_release (folder_browser->shell, &ev);
- folder_browser->shell = CORBA_OBJECT_NIL;
- }
-
- if (folder_browser->shell_view != CORBA_OBJECT_NIL) {
- CORBA_Object_release(folder_browser->shell_view, &ev);
- folder_browser->shell_view = CORBA_OBJECT_NIL;
- }
-
- if (folder_browser->uicomp)
- bonobo_object_unref (BONOBO_OBJECT (folder_browser->uicomp));
-
- g_free (folder_browser->uri);
- folder_browser->uri = NULL;
-
- if (folder_browser->folder) {
- camel_object_unhook_event(CAMEL_OBJECT(folder_browser->folder), "folder_changed",
- folder_changed, folder_browser);
- camel_object_unhook_event(CAMEL_OBJECT(folder_browser->folder), "message_changed",
- folder_changed, folder_browser);
- mail_sync_folder (folder_browser->folder, NULL, NULL);
- camel_object_unref (CAMEL_OBJECT (folder_browser->folder));
- folder_browser->folder = NULL;
- }
-
- CORBA_exception_free (&ev);
-
- if (folder_browser->view_collection) {
- gtk_object_unref (GTK_OBJECT (folder_browser->view_collection));
- folder_browser->view_collection = NULL;
- }
-
- if (folder_browser->view_menus) {
- gtk_object_unref (GTK_OBJECT (folder_browser->view_menus));
- folder_browser->view_menus = NULL;
- }
-
- gtk_object_unref (GTK_OBJECT (folder_browser->invisible));
- folder_browser->invisible = NULL;
-
- if (folder_browser->clipboard_selection)
- g_byte_array_free (folder_browser->clipboard_selection, TRUE);
-
- folder_browser_parent_class->finalize(object);
-}
-
-static void
-folder_browser_destroy (GtkObject *object)
-{
- FolderBrowser *folder_browser;
-
- folder_browser = FOLDER_BROWSER (object);
-
- if (folder_browser->message_list) {
- gtk_widget_destroy (GTK_WIDGET (folder_browser->message_list));
- folder_browser->message_list = NULL;
- }
-
- if (folder_browser->mail_display) {
- gtk_widget_destroy (GTK_WIDGET (folder_browser->mail_display));
- folder_browser->mail_display = NULL;
- }
-
- folder_browser_parent_class->destroy (object);
-}
-
-static void
-folder_browser_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = folder_browser_destroy;
- object_class->finalize = folder_browser_finalise;
-
- folder_browser_parent_class = gtk_type_class (PARENT_TYPE);
-
- folder_browser_signals[FOLDER_LOADED] =
- gtk_signal_new ("folder_loaded",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (FolderBrowserClass, folder_loaded),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1, GTK_TYPE_STRING);
-
- folder_browser_signals[MESSAGE_LOADED] =
- gtk_signal_new ("message_loaded",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (FolderBrowserClass, message_loaded),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1, GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, folder_browser_signals, LAST_SIGNAL);
-
- /* clipboard atom */
- if (!clipboard_atom)
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
-
- if (!paste_types[0].target)
- paste_types[0].target = gdk_atom_intern (X_EVOLUTION_MESSAGE_TYPE, FALSE);
-}
-
-static void
-add_uid (MessageList *ml, const char *uid, gpointer data)
-{
- g_ptr_array_add ((GPtrArray *) data, g_strdup (uid));
-}
-
-static void
-message_list_drag_data_get (ETree *tree, int row, ETreePath path, int col,
- GdkDragContext *context, GtkSelectionData *selection_data,
- guint info, guint time, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- GPtrArray *uids = NULL;
- int i;
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, add_uid, uids);
- if (uids->len == 0) {
- g_ptr_array_free (uids, TRUE);
- return;
- }
-
- switch (info) {
- case DND_TARGET_TYPE_TEXT_URI_LIST:
- {
- const char *filename, *tmpdir;
- CamelMimeMessage *message;
- CamelStream *stream;
- char *uri_list;
- int fd;
-
- tmpdir = e_mkdtemp ("drag-n-drop-XXXXXX");
-
- if (!tmpdir) {
- char *msg = g_strdup_printf (_("Could not create temporary "
- "directory: %s"),
- g_strerror (errno));
- gnome_error_dialog (msg);
- /* cleanup and abort */
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
- return;
- }
-
- message = camel_folder_get_message (fb->folder, uids->pdata[0], NULL);
- g_free (uids->pdata[0]);
-
- if (uids->len == 1) {
- filename = camel_mime_message_get_subject (message);
- if (!filename)
- filename = "Unknown";
- } else
- filename = "mbox";
-
- uri_list = g_strdup_printf ("file://%s/%s", tmpdir, filename);
-
- fd = open (uri_list + 7, O_WRONLY | O_CREAT);
- if (fd == -1) {
- /* cleanup and abort */
- camel_object_unref (CAMEL_OBJECT (message));
- for (i = 1; i < uids->len; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
- g_free (uri_list);
- return;
- }
-
- stream = camel_stream_fs_new_with_fd (fd);
-
- camel_stream_write (stream, "From - \n", 8);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_object_unref (CAMEL_OBJECT (message));
- for (i = 1; i < uids->len; i++) {
- message = camel_folder_get_message (fb->folder, uids->pdata[i], NULL);
- camel_stream_write (stream, "From - \n", 8);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_object_unref (CAMEL_OBJECT (message));
- g_free (uids->pdata[i]);
- }
-
- camel_object_unref (CAMEL_OBJECT (stream));
-
- gtk_selection_data_set (selection_data, selection_data->target, 8,
- uri_list, strlen (uri_list));
- g_free (uri_list);
- }
- break;
- case DND_TARGET_TYPE_MESSAGE_RFC822:
- {
- /* FIXME: this'll be fucking slow for the user... pthread this? */
- CamelStream *stream;
- GByteArray *bytes;
-
- bytes = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), bytes);
-
- for (i = 0; i < uids->len; i++) {
- CamelMimeMessage *message;
-
- message = camel_folder_get_message (fb->folder, uids->pdata[i], NULL);
- g_free (uids->pdata[i]);
-
- if (message) {
- camel_stream_write (stream, "From - \n", 8);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_object_unref (CAMEL_OBJECT (message));
- }
- }
-
- g_ptr_array_free (uids, TRUE);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- gtk_selection_data_set (selection_data, selection_data->target, 8,
- bytes->data, bytes->len);
-
- g_byte_array_free (bytes, FALSE);
- }
- break;
- case DND_TARGET_TYPE_X_EVOLUTION_MESSAGE:
- {
- GByteArray *array;
-
- /* format: "uri uid1\0uid2\0uid3\0...\0uidn" */
-
- /* write the uri portion */
- array = g_byte_array_new ();
- g_byte_array_append (array, fb->uri, strlen (fb->uri));
- g_byte_array_append (array, " ", 1);
-
- /* write the uids */
- for (i = 0; i < uids->len; i++) {
- g_byte_array_append (array, uids->pdata[i], strlen (uids->pdata[i]));
- g_free (uids->pdata[i]);
-
- if (i + 1 < uids->len)
- g_byte_array_append (array, "", 1);
- }
-
- g_ptr_array_free (uids, TRUE);
-
- gtk_selection_data_set (selection_data, selection_data->target, 8,
- array->data, array->len);
-
- g_byte_array_free (array, FALSE);
- }
- break;
- default:
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
- break;
- }
-}
-
-static void
-message_rfc822_dnd (CamelFolder *dest, CamelStream *stream, CamelException *ex)
-{
- CamelMimeParser *mp;
-
- mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mp, TRUE);
- camel_mime_parser_init_with_stream (mp, stream);
-
- while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
- CamelMessageInfo *info;
- CamelMimeMessage *msg;
-
- msg = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
- camel_object_unref (CAMEL_OBJECT (msg));
- break;
- }
-
- /* append the message to the folder... */
- info = g_new0 (CamelMessageInfo, 1);
- camel_folder_append_message (dest, msg, info, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
-
- if (camel_exception_is_set (ex))
- break;
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- camel_object_unref (CAMEL_OBJECT (mp));
-}
-
-static CamelFolder *
-x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids)
-{
- /* format: "uri uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend, *uri;
- CamelFolder *folder;
-
- if (in == NULL)
- return NULL;
-
- inend = in + inlen;
-
- inptr = strchr (in, ' ');
- uri = g_strndup (in, inptr - in);
-
- folder = mail_tool_uri_to_folder (uri, NULL);
- g_free (uri);
-
- if (!folder)
- return NULL;
-
- /* split the uids */
- inptr++;
- *uids = g_ptr_array_new ();
- while (inptr < inend) {
- char *start = inptr;
-
- while (inptr < inend && *inptr)
- inptr++;
-
- g_ptr_array_add (*uids, g_strndup (start, inptr - start));
- inptr++;
- }
-
- return folder;
-}
-
-static void
-message_list_drag_data_received (ETree *tree, int row, ETreePath path, int col,
- GdkDragContext *context, gint x, gint y,
- GtkSelectionData *selection_data, guint info,
- guint time, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- CamelFolder *folder = NULL;
- char *tmp, *url, **urls;
- GPtrArray *uids = NULL;
- CamelStream *stream;
- CamelException ex;
- CamelURL *uri;
- int i, fd;
-
- /* this means we are receiving no data */
- if (!selection_data->data || selection_data->length == -1)
- return;
-
- camel_exception_init (&ex);
-
- switch (info) {
- case DND_TARGET_TYPE_TEXT_URI_LIST:
- tmp = g_strndup (selection_data->data, selection_data->length);
- urls = g_strsplit (tmp, "\n", 0);
- g_free (tmp);
-
- for (i = 0; urls[i] != NULL; i++) {
- /* get the path component */
- url = g_strstrip (urls[i]);
-
- uri = camel_url_new (url, NULL);
- g_free (url);
- url = uri->path;
- uri->path = NULL;
- camel_url_free (uri);
-
- fd = open (url, O_RDONLY);
- if (fd == -1) {
- g_free (url);
- /* FIXME: okay, what do we do in this case? */
- continue;
- }
-
- stream = camel_stream_fs_new_with_fd (fd);
- message_rfc822_dnd (fb->folder, stream, &ex);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (context->action == GDK_ACTION_MOVE && !camel_exception_is_set (&ex))
- unlink (url);
-
- g_free (url);
- }
-
- g_free (urls);
- break;
- case DND_TARGET_TYPE_MESSAGE_RFC822:
- /* write the message(s) out to a CamelStream so we can use it */
- stream = camel_stream_mem_new ();
- camel_stream_write (stream, selection_data->data, selection_data->length);
- camel_stream_reset (stream);
-
- message_rfc822_dnd (fb->folder, stream, &ex);
- camel_object_unref (CAMEL_OBJECT (stream));
- break;
- case DND_TARGET_TYPE_X_EVOLUTION_MESSAGE:
- folder = x_evolution_message_parse (selection_data->data, selection_data->length, &uids);
- if (folder == NULL)
- goto fail;
-
- if (uids == NULL) {
- camel_object_unref (CAMEL_OBJECT (folder));
- goto fail;
- }
-
- mail_transfer_messages (folder, uids, context->action == GDK_ACTION_MOVE,
- fb->uri, NULL, NULL);
-
- camel_object_unref (CAMEL_OBJECT (folder));
- break;
- }
-
- camel_exception_clear (&ex);
-
- gtk_drag_finish (context, TRUE, TRUE, GDK_CURRENT_TIME);
-
- fail:
- camel_exception_clear (&ex);
-
- gtk_drag_finish (context, FALSE, TRUE, GDK_CURRENT_TIME);
-}
-
-static void
-selection_get (GtkWidget *widget, GtkSelectionData *selection_data,
- guint info, guint time_stamp, FolderBrowser *fb)
-{
- if (fb->clipboard_selection == NULL)
- return;
-
- switch (info) {
- default:
- case PASTE_TARGET_TYPE_TEXT_PLAIN:
- {
- /* FIXME: this'll be fucking slow for the user... pthread this? */
- CamelFolder *source;
- CamelStream *stream;
- GByteArray *bytes;
- GPtrArray *uids;
- int i;
-
- bytes = fb->clipboard_selection;
-
- /* Note: source should == fb->folder, but we might as well use `source' instead of fb->folder */
- source = x_evolution_message_parse (bytes->data, bytes->len, &uids);
- if (source == NULL)
- return;
-
- if (uids == NULL) {
- camel_object_unref (CAMEL_OBJECT (source));
- return;
- }
-
- bytes = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), bytes);
-
- for (i = 0; i < uids->len; i++) {
- CamelMimeMessage *message;
-
- message = camel_folder_get_message (source, uids->pdata[i], NULL);
- g_free (uids->pdata[i]);
-
- if (message) {
- camel_stream_write (stream, "From - \n", 8);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_object_unref (CAMEL_OBJECT (message));
- }
- }
-
- g_ptr_array_free (uids, TRUE);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (source));
-
- gtk_selection_data_set (selection_data, selection_data->target, 8,
- bytes->data, bytes->len);
-
- g_byte_array_free (bytes, FALSE);
- }
- break;
- case PASTE_TARGET_TYPE_X_EVOLUTION_MESSAGE:
- /* we already have our data in the correct form */
- gtk_selection_data_set (selection_data,
- selection_data->target, 8,
- fb->clipboard_selection->data,
- fb->clipboard_selection->len);
- break;
- }
-}
-
-static void
-selection_clear_event (GtkWidget *widget, GdkEventSelection *event, FolderBrowser *fb)
-{
- if (fb->clipboard_selection != NULL) {
- g_byte_array_free (fb->clipboard_selection, TRUE);
- fb->clipboard_selection = NULL;
- }
-}
-
-static void
-selection_received (GtkWidget *widget, GtkSelectionData *selection_data,
- guint time, FolderBrowser *fb)
-{
- CamelFolder *source = NULL;
- GPtrArray *uids = NULL;
-
- if (selection_data == NULL || selection_data->length == -1)
- return;
-
- source = x_evolution_message_parse (selection_data->data, selection_data->length, &uids);
- if (source == NULL)
- return;
-
- if (uids == NULL) {
- camel_object_unref (CAMEL_OBJECT (source));
- return;
- }
-
- mail_transfer_messages (source, uids, FALSE, fb->uri, NULL, NULL);
-
- camel_object_unref (CAMEL_OBJECT (source));
-}
-
-void
-folder_browser_copy (GtkWidget *menuitem, FolderBrowser *fb)
-{
- GPtrArray *uids = NULL;
- GByteArray *bytes;
- gboolean cut;
- int i;
-
- if (fb->message_list == NULL)
- return;
-
- cut = menuitem == NULL;
-
- if (!GTK_WIDGET_HAS_FOCUS (fb->message_list)) {
- /* Copy text from the HTML Engine */
- html_engine_copy (fb->mail_display->html->engine);
- return;
- }
-
- if (fb->clipboard_selection) {
- g_byte_array_free (fb->clipboard_selection, TRUE);
- fb->clipboard_selection = NULL;
- }
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, add_uid, uids);
-
- /* format: "uri uid1\0uid2\0uid3\0...\0uidn" */
-
- /* write the uri portion */
- bytes = g_byte_array_new ();
- g_byte_array_append (bytes, fb->uri, strlen (fb->uri));
- g_byte_array_append (bytes, " ", 1);
-
- /* write the uids */
- camel_folder_freeze (fb->folder);
- for (i = 0; i < uids->len; i++) {
- if (cut) {
- camel_folder_set_message_flags (fb->folder, uids->pdata[i],
- CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED,
- CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED);
- }
- g_byte_array_append (bytes, uids->pdata[i], strlen (uids->pdata[i]));
- g_free (uids->pdata[i]);
-
- if (i + 1 < uids->len)
- g_byte_array_append (bytes, "", 1);
- }
- camel_folder_thaw (fb->folder);
-
- g_ptr_array_free (uids, TRUE);
-
- fb->clipboard_selection = bytes;
-
- gtk_selection_owner_set (fb->invisible, clipboard_atom, GDK_CURRENT_TIME);
-}
-
-void
-folder_browser_cut (GtkWidget *menuitem, FolderBrowser *fb)
-{
- folder_browser_copy (NULL, fb);
-}
-
-void
-folder_browser_paste (GtkWidget *menuitem, FolderBrowser *fb)
-{
- gtk_selection_convert (fb->invisible, clipboard_atom,
- paste_types[0].target,
- GDK_CURRENT_TIME);
-}
-
-/* all this crap so we can give the user a whoopee doo status bar */
-static void
-update_status_bar(FolderBrowser *fb)
-{
- CORBA_Environment ev;
- int tmp;
- GString *work;
- extern CamelFolder *outbox_folder;
-
- if (fb->folder == NULL
- || fb->message_list == NULL
- || fb->shell_view == CORBA_OBJECT_NIL)
- return;
-
- work = g_string_new("");
- g_string_sprintfa(work, _("%d new"), camel_folder_get_unread_message_count(fb->folder));
- tmp = message_list_hidden(fb->message_list);
- if (tmp) {
- g_string_append(work, _(", "));
- g_string_sprintfa(work, _("%d hidden"), tmp);
- }
- tmp = e_selection_model_selected_count(e_tree_get_selection_model(fb->message_list->tree));
- if (tmp) {
- g_string_append(work, _(", "));
- g_string_sprintfa(work, _("%d selected"), tmp);
- }
- tmp = camel_folder_get_message_count(fb->folder);
- g_string_append(work, _(", "));
- if (fb->folder == outbox_folder)
- g_string_sprintfa(work, _("%d unsent"), tmp);
- else
- g_string_sprintfa(work, _("%d total"), tmp);
-
- CORBA_exception_init(&ev);
- GNOME_Evolution_ShellView_setFolderBarLabel(fb->shell_view, work->str, &ev);
- CORBA_exception_free(&ev);
-
- g_string_free(work, TRUE);
-}
-
-static void main_folder_changed(CamelObject *o, void *event_data, void *data)
-{
- FolderBrowser *fb = data;
-
- update_status_bar(fb);
-}
-
-static void folder_changed(CamelObject *o, void *event_data, void *data)
-{
- mail_msg_wait(mail_proxy_event(main_folder_changed, o, event_data, data));
-}
-
-static void
-got_folder(char *uri, CamelFolder *folder, void *data)
-{
- FolderBrowser *fb = data;
-
- d(printf ("got folder '%s' = %p\n", uri, folder));
-
- if (fb->message_list == NULL)
- goto done;
-
- fb->folder = folder;
- if (folder == NULL)
- goto done;
-
- camel_object_ref (CAMEL_OBJECT (folder));
-
- gtk_widget_set_sensitive (GTK_WIDGET (fb->search), camel_folder_has_search_capability (folder));
- message_list_set_folder (fb->message_list, folder,
- folder_browser_is_drafts (fb) ||
- folder_browser_is_sent (fb) ||
- folder_browser_is_outbox (fb));
-
- camel_object_hook_event(CAMEL_OBJECT(fb->folder), "folder_changed",
- folder_changed, fb);
- camel_object_hook_event(CAMEL_OBJECT(fb->folder), "message_changed",
- folder_changed, fb);
-
- /* when loading a new folder, nothing is selected initially */
-
- if (fb->uicomp)
- folder_browser_ui_set_selection_state (fb, FB_SELSTATE_NONE);
-
- done:
- gtk_object_unref (GTK_OBJECT (fb));
-
- gtk_signal_emit (GTK_OBJECT (fb), folder_browser_signals [FOLDER_LOADED], fb->uri);
-}
-
-void
-folder_browser_set_ui_component (FolderBrowser *fb, BonoboUIComponent *uicomp)
-{
- g_return_if_fail (IS_FOLDER_BROWSER (fb));
-
- if (fb->uicomp)
- bonobo_object_unref (BONOBO_OBJECT (fb->uicomp));
-
- if (uicomp)
- bonobo_object_ref (BONOBO_OBJECT (uicomp));
-
- fb->uicomp = uicomp;
-}
-
-void
-folder_browser_set_shell_view(FolderBrowser *fb, GNOME_Evolution_ShellView shell_view)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init(&ev);
- if (fb->shell_view != CORBA_OBJECT_NIL)
- CORBA_Object_release(fb->shell_view, &ev);
- CORBA_exception_free(&ev);
-
- fb->shell_view = CORBA_Object_duplicate(shell_view, &ev);
- CORBA_exception_free(&ev);
-
- /* small hack, at this point we've just been activated */
- if (fb->shell_view != CORBA_OBJECT_NIL)
- update_status_bar(fb);
-}
-
-extern CamelFolder *drafts_folder, *sent_folder, *outbox_folder;
-
-/**
- * folder_browser_is_drafts:
- * @fb: a FolderBrowser
- *
- * Return value: %TRUE if @fb refers to /local/Drafts or any other
- * configured Drafts folder.
- **/
-gboolean
-folder_browser_is_drafts (FolderBrowser *fb)
-{
- const GSList *accounts;
- MailConfigAccount *account;
-
- g_return_val_if_fail (IS_FOLDER_BROWSER (fb), FALSE);
-
- if (fb->uri == NULL)
- return FALSE;
-
- if (fb->folder == drafts_folder)
- return TRUE;
-
- accounts = mail_config_get_accounts ();
- while (accounts) {
- account = accounts->data;
- if (account->drafts_folder_uri &&
- !strcmp (account->drafts_folder_uri, fb->uri))
- return TRUE;
- accounts = accounts->next;
- }
-
- return FALSE;
-}
-
-/**
- * folder_browser_is_sent:
- * @fb: a FolderBrowser
- *
- * Return value: %TRUE if @fb refers to /local/Sent or any other
- * configured Sent folder.
- **/
-gboolean
-folder_browser_is_sent (FolderBrowser *fb)
-{
- const GSList *accounts;
- MailConfigAccount *account;
-
- g_return_val_if_fail (IS_FOLDER_BROWSER (fb), FALSE);
-
- if (fb->uri == NULL)
- return FALSE;
-
- if (fb->folder == sent_folder)
- return TRUE;
-
- accounts = mail_config_get_accounts ();
- while (accounts) {
- account = accounts->data;
- if (account->sent_folder_uri &&
- !strcmp (account->sent_folder_uri, fb->uri))
- return TRUE;
- accounts = accounts->next;
- }
-
- return FALSE;
-}
-
-/**
- * folder_browser_is_outbox:
- * @fb: a FolderBrowser
- *
- * Return value: %TRUE if @fb refers to /local/Outbox or any other
- * configured Outbox folder.
- **/
-gboolean
-folder_browser_is_outbox (FolderBrowser *fb)
-{
- /* There can be only one. */
- return fb->folder == outbox_folder;
-}
-
-static int
-save_cursor_pos (FolderBrowser *fb)
-{
- ETreePath node;
- GtkAdjustment *adj;
- int row, y, height;
-
- node = e_tree_get_cursor (fb->message_list->tree);
- if (!node)
- return -1;
-
- row = e_tree_row_of_node (fb->message_list->tree, node);
-
- if (row == -1)
- return 0;
-
- e_tree_get_cell_geometry (fb->message_list->tree, row, 0,
- NULL, &y, NULL, &height);
-
- adj = e_scroll_frame_get_vadjustment (E_SCROLL_FRAME (fb->message_list));
- y += adj->value - ((mail_config_get_paned_size () - height) / 2);
-
- return y;
-}
-
-static void
-set_cursor_pos (FolderBrowser *fb, int y)
-{
- GtkAdjustment *adj;
-
- if (y == -1)
- return;
-
- adj = e_scroll_frame_get_vadjustment (E_SCROLL_FRAME (fb->message_list));
- gtk_adjustment_set_value (adj, (gfloat)y);
-}
-
-static gboolean do_message_selected(FolderBrowser *fb);
-
-void
-folder_browser_set_message_preview (FolderBrowser *folder_browser, gboolean show_message_preview)
-{
- if (folder_browser->preview_shown == show_message_preview)
- return;
-
- folder_browser->preview_shown = show_message_preview;
-
- if (show_message_preview) {
- int y;
- y = save_cursor_pos (folder_browser);
- e_paned_set_position (E_PANED (folder_browser->vpaned),
- mail_config_get_paned_size ());
- gtk_widget_show (GTK_WIDGET (folder_browser->mail_display));
- do_message_selected (folder_browser);
- set_cursor_pos (folder_browser, y);
- } else {
- e_paned_set_position (E_PANED (folder_browser->vpaned),
- 10000);
- gtk_widget_hide (GTK_WIDGET (folder_browser->mail_display));
- mail_display_set_message(folder_browser->mail_display, NULL);
- }
-}
-
-enum {
- ESB_SAVE,
-};
-
-static ESearchBarItem folder_browser_search_menu_items[] = {
- E_FILTERBAR_RESET,
- E_FILTERBAR_SAVE,
- { N_("Create vFolder from Search"), ESB_SAVE, NULL },
- E_FILTERBAR_EDIT,
- { NULL, -1, NULL }
-};
-
-static void
-folder_browser_search_menu_activated (ESearchBar *esb, int id, FolderBrowser *fb)
-{
- EFilterBar *efb = (EFilterBar *)esb;
-
- d(printf("menu activated\n"));
-
- switch (id) {
- case ESB_SAVE:
- d(printf("Save vfolder\n"));
- if (efb->current_query) {
- FilterRule *rule = vfolder_clone_rule(efb->current_query);
-
- filter_rule_set_source(rule, FILTER_SOURCE_INCOMING);
- vfolder_rule_add_source((VfolderRule *)rule, fb->uri);
- vfolder_gui_add_rule((VfolderRule *)rule);
- }
- break;
- }
-}
-
-static void
-folder_browser_config_search (EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (data);
- ESearchingTokenizer *st;
- GList *partl;
-
- st = E_SEARCHING_TOKENIZER (fb->mail_display->html->engine->ht);
-
- e_searching_tokenizer_set_secondary_search_string (st, NULL);
-
- /* we scan the parts of a rule, and set all the types we know about to the query string */
- partl = rule->parts;
- while (partl) {
- FilterPart *part = partl->data;
-
- if (!strcmp(part->name, "subject")) {
- FilterInput *input = (FilterInput *)filter_part_find_element(part, "subject");
- if (input)
- filter_input_set_value(input, query);
- } else if (!strcmp(part->name, "body")) {
- FilterInput *input = (FilterInput *)filter_part_find_element(part, "word");
- if (input)
- filter_input_set_value(input, query);
- e_searching_tokenizer_set_secondary_search_string (st, query);
- } else if(!strcmp(part->name, "sender")) {
- FilterInput *input = (FilterInput *)filter_part_find_element(part, "sender");
- if (input)
- filter_input_set_value(input, query);
- }
-
- partl = partl->next;
- }
-
- d(printf("configuring search for search string '%s', rule is '%s'\n", query, rule->name));
-
- mail_display_redisplay (fb->mail_display, FALSE);
-}
-
-static void
-folder_browser_search_query_changed (ESearchBar *esb, FolderBrowser *fb)
-{
- char *search_word;
-
- d(printf("query changed\n"));
-
- gtk_object_get (GTK_OBJECT (esb),
- "query", &search_word,
- NULL);
-
- message_list_set_search (fb->message_list, search_word);
-
- d(printf("query is %s\n", search_word));
- g_free(search_word);
- return;
-}
-
-void
-folder_browser_toggle_preview (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- FolderBrowser *fb = user_data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- mail_config_set_show_preview (fb->uri, atoi (state));
- folder_browser_set_message_preview (fb, atoi (state));
-}
-
-void
-folder_browser_toggle_threads (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- FolderBrowser *fb = user_data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- mail_config_set_thread_list (fb->uri, atoi (state));
- message_list_set_threaded (fb->message_list, atoi (state));
-}
-
-void
-folder_browser_toggle_hide_deleted (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- FolderBrowser *fb = user_data;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- if (!(fb->folder && CAMEL_IS_VTRASH_FOLDER(fb->folder)))
- mail_config_set_hide_deleted (atoi (state));
- message_list_set_hidedeleted (fb->message_list, atoi (state));
-}
-
-void
-folder_browser_set_message_display_style (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- extern char *message_display_styles[];
- FolderBrowser *fb = user_data;
- int i;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED || atoi(state) == 0)
- return;
-
- for (i = 0; i < MAIL_CONFIG_DISPLAY_MAX; i++) {
- if (strstr (message_display_styles[i], path)) {
- fb->mail_display->display_style = i;
- mail_display_redisplay (fb->mail_display, TRUE);
-
- if (fb->pref_master)
- mail_config_set_message_display_style (i);
- return;
- }
- }
-}
-
-void
-vfolder_subject (GtkWidget *w, FolderBrowser *fb)
-{
- vfolder_gui_add_from_message (fb->mail_display->current_message, AUTO_SUBJECT, fb->uri);
-}
-
-void
-vfolder_sender (GtkWidget *w, FolderBrowser *fb)
-{
- vfolder_gui_add_from_message (fb->mail_display->current_message, AUTO_FROM, fb->uri);
-}
-
-void
-vfolder_recipient (GtkWidget *w, FolderBrowser *fb)
-{
- vfolder_gui_add_from_message (fb->mail_display->current_message, AUTO_TO, fb->uri);
-}
-
-void
-vfolder_mlist (GtkWidget *w, FolderBrowser *fb)
-{
- char *name;
-
- g_return_if_fail (fb->mail_display->current_message != NULL);
-
- name = header_raw_check_mailing_list(&((CamelMimePart *)fb->mail_display->current_message)->headers);
- if (name) {
- g_strstrip (name);
- vfolder_gui_add_from_mlist(fb->mail_display->current_message, name, fb->uri);
- g_free(name);
- }
-}
-
-void
-filter_subject (GtkWidget *w, FolderBrowser *fb)
-{
- filter_gui_add_from_message (fb->mail_display->current_message, AUTO_SUBJECT);
-}
-
-void
-filter_sender (GtkWidget *w, FolderBrowser *fb)
-{
- filter_gui_add_from_message (fb->mail_display->current_message, AUTO_FROM);
-}
-
-void
-filter_recipient (GtkWidget *w, FolderBrowser *fb)
-{
- filter_gui_add_from_message (fb->mail_display->current_message, AUTO_TO);
-}
-
-void
-filter_mlist (GtkWidget *w, FolderBrowser *fb)
-{
- char *name;
-
- g_return_if_fail (fb->mail_display->current_message != NULL);
-
- name = header_raw_check_mailing_list(&((CamelMimePart *)fb->mail_display->current_message)->headers);
- if (name) {
- filter_gui_add_from_mlist(name);
- g_free(name);
- }
-}
-
-void
-hide_none(GtkWidget *w, FolderBrowser *fb)
-{
- message_list_hide_clear(fb->message_list);
-}
-
-void
-hide_selected(GtkWidget *w, FolderBrowser *fb)
-{
- GPtrArray *uids;
- int i;
-
- uids = g_ptr_array_new();
- message_list_foreach(fb->message_list, enumerate_msg, uids);
- message_list_hide_uids(fb->message_list, uids);
- for (i=0; i<uids->len; i++)
- g_free(uids->pdata[i]);
- g_ptr_array_free(uids, TRUE);
-}
-
-void
-hide_deleted(GtkWidget *w, FolderBrowser *fb)
-{
- MessageList *ml = fb->message_list;
-
- message_list_hide_add(ml, "(match-all (system-flag \"deleted\"))", ML_HIDE_SAME, ML_HIDE_SAME);
-}
-
-void
-hide_read(GtkWidget *w, FolderBrowser *fb)
-{
- MessageList *ml = fb->message_list;
-
- message_list_hide_add(ml, "(match-all (system-flag \"seen\"))", ML_HIDE_SAME, ML_HIDE_SAME);
-}
-
-/* dum de dum, about the 3rd copy of this function throughout the mailer/camel */
-static const char *
-strip_re(const char *subject)
-{
- const unsigned char *s, *p;
-
- s = (unsigned char *) subject;
-
- 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 == ':') {
- s = p + 1;
- } else
- break;
- } else
- break;
- }
- return (char *) s;
-}
-
-void
-hide_subject(GtkWidget *w, FolderBrowser *fb)
-{
- const char *subject;
- GString *expr;
-
- if (fb->mail_display->current_message) {
- subject = camel_mime_message_get_subject(fb->mail_display->current_message);
- if (subject) {
- subject = strip_re(subject);
- if (subject && subject[0]) {
- expr = g_string_new("(match-all (header-contains \"subject\" ");
- e_sexp_encode_string(expr, subject);
- g_string_append(expr, "))");
- message_list_hide_add(fb->message_list, expr->str, ML_HIDE_SAME, ML_HIDE_SAME);
- g_string_free(expr, TRUE);
- return;
- }
- }
- }
-}
-
-void
-hide_sender(GtkWidget *w, FolderBrowser *fb)
-{
- const CamelInternetAddress *from;
- const char *real, *addr;
- GString *expr;
-
- if (fb->mail_display->current_message) {
- from = camel_mime_message_get_from(fb->mail_display->current_message);
- if (camel_internet_address_get(from, 0, &real, &addr)) {
- expr = g_string_new("(match-all (header-contains \"from\" ");
- e_sexp_encode_string(expr, addr);
- g_string_append(expr, "))");
- message_list_hide_add(fb->message_list, expr->str, ML_HIDE_SAME, ML_HIDE_SAME);
- g_string_free(expr, TRUE);
- return;
- }
- }
-}
-
-enum {
- SELECTION_SET = 2,
- CAN_MARK_READ = 4,
- CAN_MARK_UNREAD = 8,
- CAN_DELETE = 16,
- CAN_UNDELETE = 32,
- IS_MAILING_LIST = 64,
- CAN_RESEND = 128,
- CAN_MARK_IMPORTANT = 256,
- CAN_MARK_UNIMPORTANT = 512
-};
-
-#define MLIST_VFOLDER (3)
-#define MLIST_FILTER (8)
-
-static EPopupMenu filter_menu[] = {
- { N_("VFolder on _Subject"), NULL,
- GTK_SIGNAL_FUNC (vfolder_subject), NULL,
- SELECTION_SET },
- { N_("VFolder on Se_nder"), NULL,
- GTK_SIGNAL_FUNC (vfolder_sender), NULL,
- SELECTION_SET },
- { N_("VFolder on _Recipients"), NULL,
- GTK_SIGNAL_FUNC (vfolder_recipient), NULL,
- SELECTION_SET },
- { N_("VFolder on Mailing _List"), NULL,
- GTK_SIGNAL_FUNC (vfolder_mlist), NULL,
- SELECTION_SET | IS_MAILING_LIST },
-
- E_POPUP_SEPARATOR,
-
- { N_("Filter on Sub_ject"), NULL,
- GTK_SIGNAL_FUNC (filter_subject), NULL,
- SELECTION_SET },
- { N_("Filter on Sen_der"), NULL,
- GTK_SIGNAL_FUNC (filter_sender), NULL,
- SELECTION_SET },
- { N_("Filter on Re_cipients"), NULL,
- GTK_SIGNAL_FUNC (filter_recipient), NULL,
- SELECTION_SET },
- { N_("Filter on _Mailing List"), NULL,
- GTK_SIGNAL_FUNC (filter_mlist), NULL,
- SELECTION_SET | IS_MAILING_LIST },
-
- E_POPUP_TERMINATOR
-};
-
-
-static EPopupMenu context_menu[] = {
- { N_("_Open"), NULL,
- GTK_SIGNAL_FUNC (open_msg), NULL, 0 },
- { N_("_Edit as New Message..."), NULL,
- GTK_SIGNAL_FUNC (resend_msg), NULL, CAN_RESEND },
- { N_("_Save As..."), NULL,
- GTK_SIGNAL_FUNC (save_msg), NULL, 0 },
- { N_("_Print"), NULL,
- GTK_SIGNAL_FUNC (print_msg), NULL, 0 },
-
- E_POPUP_SEPARATOR,
-
- { N_("_Reply to Sender"), NULL,
- GTK_SIGNAL_FUNC (reply_to_sender), NULL, 0 },
- { N_("Reply to _List"), NULL,
- GTK_SIGNAL_FUNC (reply_to_list), NULL, 0 },
- { N_("Reply to _All"), NULL,
- GTK_SIGNAL_FUNC (reply_to_all), NULL, 0 },
- { N_("_Forward"), NULL,
- GTK_SIGNAL_FUNC (forward), NULL, 0 },
- { "", NULL, (NULL), NULL, 0 },
- { N_("Mar_k as Read"), NULL,
- GTK_SIGNAL_FUNC (mark_as_seen), NULL, CAN_MARK_READ },
- { N_("Mark as U_nread"), NULL,
- GTK_SIGNAL_FUNC (mark_as_unseen), NULL, CAN_MARK_UNREAD },
- { N_("Mark as _Important"), NULL,
- GTK_SIGNAL_FUNC (mark_as_important), NULL, CAN_MARK_IMPORTANT },
- { N_("Mark as Unim_portant"), NULL,
- GTK_SIGNAL_FUNC (mark_as_unimportant), NULL, CAN_MARK_UNIMPORTANT },
-
- E_POPUP_SEPARATOR,
-
- { N_("_Move to Folder..."), NULL,
- GTK_SIGNAL_FUNC (move_msg), NULL, 0 },
- { N_("_Copy to Folder..."), NULL,
- GTK_SIGNAL_FUNC (copy_msg), NULL, 0 },
- { N_("_Delete"), NULL,
- GTK_SIGNAL_FUNC (delete_msg), NULL, CAN_DELETE },
- { N_("_Undelete"), NULL,
- GTK_SIGNAL_FUNC (undelete_msg), NULL, CAN_UNDELETE },
-
- E_POPUP_SEPARATOR,
-
- { N_("Add Sender to Address Book"), NULL,
- GTK_SIGNAL_FUNC (addrbook_sender), NULL, 0 },
- { "", NULL,
- GTK_SIGNAL_FUNC (NULL), NULL, 0 },
-
- { N_("Apply Filters"), NULL,
- GTK_SIGNAL_FUNC (apply_filters), NULL, 0 },
- { "", NULL,
- GTK_SIGNAL_FUNC (NULL), NULL, 0 },
- { N_("Create Ru_le From Message"), NULL,
- GTK_SIGNAL_FUNC (NULL), filter_menu, SELECTION_SET },
-
- E_POPUP_TERMINATOR
-};
-
-
-struct cmpf_data {
- ETree *tree;
- int row, col;
-};
-
-static void
-context_menu_position_func (GtkMenu *menu, gint *x, gint *y,
- gpointer user_data)
-{
- int tx, ty, tw, th;
- struct cmpf_data *closure = user_data;
-
- gdk_window_get_origin (GTK_WIDGET (closure->tree)->window, x, y);
- e_tree_get_cell_geometry (closure->tree, closure->row, closure->col,
- &tx, &ty, &tw, &th);
- *x += tx + tw / 2;
- *y += ty + th / 2;
-}
-
-/* handle context menu over message-list */
-static gint
-on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, FolderBrowser *fb)
-{
- extern CamelFolder *sent_folder;
- CamelMessageInfo *info;
- GPtrArray *uids;
- int enable_mask = 0;
- int hide_mask = 0;
- int i;
- char *mailing_list_name = NULL;
- char *subject_match = NULL, *from_match = NULL;
- GtkMenu *menu;
-
- if (fb->folder != sent_folder) {
- enable_mask |= CAN_RESEND;
- hide_mask |= CAN_RESEND;
- }
-
- if (fb->mail_display->current_message == NULL) {
- enable_mask |= SELECTION_SET;
- mailing_list_name = NULL;
- } else {
- /* FIXME: we are leaking subject_match and from_match...what do we use them for anyway??? */
- const char *subject, *real, *addr;
- const CamelInternetAddress *from;
-
- mailing_list_name = header_raw_check_mailing_list(
- &((CamelMimePart *)fb->mail_display->current_message)->headers);
-
- subject = camel_mime_message_get_subject (fb->mail_display->current_message);
- if (subject && (subject = strip_re (subject)) && subject[0])
- subject_match = g_strdup (subject);
-
- from = camel_mime_message_get_from (fb->mail_display->current_message);
- if (from && camel_internet_address_get (from, 0, &real, &addr) && addr && addr[0])
- from_match = g_strdup (addr);
- }
-
- /* get a list of uids */
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, enumerate_msg, uids);
- if (uids->len >= 1) {
- /* gray-out any items we don't need */
- gboolean have_deleted = FALSE;
- gboolean have_undeleted = FALSE;
- gboolean have_seen = FALSE;
- gboolean have_unseen = FALSE;
- gboolean have_important = FALSE;
- gboolean have_unimportant = FALSE;
-
- for (i = 0; i < uids->len; i++) {
- info = camel_folder_get_message_info (fb->folder, uids->pdata[i]);
- if (info == NULL)
- continue;
-
- if (info->flags & CAMEL_MESSAGE_SEEN)
- have_seen = TRUE;
- else
- have_unseen = TRUE;
-
- if (info->flags & CAMEL_MESSAGE_DELETED)
- have_deleted = TRUE;
- else
- have_undeleted = TRUE;
-
- if (info->flags & CAMEL_MESSAGE_FLAGGED)
- have_important = TRUE;
- else
- have_unimportant = TRUE;
-
- camel_folder_free_message_info (fb->folder, info);
-
- if (have_seen && have_unseen && have_deleted && have_undeleted)
- break;
- }
-
- if (!have_unseen)
- enable_mask |= CAN_MARK_READ;
- if (!have_seen)
- enable_mask |= CAN_MARK_UNREAD;
-
- if (!have_undeleted)
- enable_mask |= CAN_DELETE;
- if (!have_deleted)
- enable_mask |= CAN_UNDELETE;
-
- if (!have_unimportant)
- enable_mask |= CAN_MARK_IMPORTANT;
- if (!have_important)
- enable_mask |= CAN_MARK_UNIMPORTANT;
-
- /*
- * Hide items that wont get used.
- */
- if (!(have_unseen && have_seen)){
- if (have_seen)
- hide_mask |= CAN_MARK_READ;
- else
- hide_mask |= CAN_MARK_UNREAD;
- }
-
- if (!(have_undeleted && have_deleted)){
- if (have_deleted)
- hide_mask |= CAN_DELETE;
- else
- hide_mask |= CAN_UNDELETE;
- }
-
- if (!(have_important && have_unimportant)){
- if (have_important)
- hide_mask |= CAN_MARK_IMPORTANT;
- else
- hide_mask |= CAN_MARK_UNIMPORTANT;
- }
- }
-
- /* free uids */
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
-
- /* generate the "Filter on Mailing List menu item name */
- if (mailing_list_name == NULL) {
- enable_mask |= IS_MAILING_LIST;
- filter_menu[MLIST_FILTER].name = g_strdup (_("Filter on Mailing List"));
- filter_menu[MLIST_VFOLDER].name = g_strdup (_("VFolder on Mailing List"));
- } else {
- filter_menu[MLIST_FILTER].name = g_strdup_printf (_("Filter on Mailing List (%s)"), mailing_list_name);
- filter_menu[MLIST_VFOLDER].name = g_strdup_printf (_("VFolder on Mailing List (%s)"), mailing_list_name);
- g_free(mailing_list_name);
- }
-
- menu = e_popup_menu_create (context_menu, enable_mask, hide_mask, fb);
- e_auto_kill_popup_menu_on_hide (menu);
-
- if (event->type == GDK_KEY_PRESS) {
- struct cmpf_data closure;
-
- closure.tree = tree;
- closure.row = row;
- closure.col = col;
- gtk_menu_popup (menu, NULL, NULL, context_menu_position_func,
- &closure, 0, event->key.time);
- } else {
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
- event->button.button, event->button.time);
- }
-
- g_free (filter_menu[MLIST_FILTER].name);
- g_free (filter_menu[MLIST_VFOLDER].name);
-
- return TRUE;
-}
-
-static gint
-on_key_press (GtkWidget *widget, GdkEventKey *key, gpointer data)
-{
- FolderBrowser *fb = data;
- ETreePath *path;
- int row;
-
- if (key->state & GDK_CONTROL_MASK)
- return FALSE;
-
- path = e_tree_get_cursor (fb->message_list->tree);
- row = e_tree_row_of_node (fb->message_list->tree, path);
-
- switch (key->keyval) {
- case GDK_Delete:
- case GDK_KP_Delete:
- delete_msg (NULL, fb);
- return TRUE;
-
- case GDK_Menu:
- on_right_click (fb->message_list->tree, row, path, 2,
- (GdkEvent *)key, fb);
- return TRUE;
- case '!':
- toggle_as_important (NULL, fb, NULL);
- return TRUE;
- }
-
- return FALSE;
-}
-
-static int
-etree_key (ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, FolderBrowser *fb)
-{
- GtkAdjustment *vadj;
- gfloat page_size;
-
- if ((ev->key.state & GDK_CONTROL_MASK) != 0)
- return FALSE;
-
- vadj = e_scroll_frame_get_vadjustment (fb->mail_display->scroll);
- page_size = vadj->page_size - vadj->step_increment;
-
- switch (ev->key.keyval) {
- case GDK_space:
- if (vadj->value < vadj->upper - vadj->page_size - page_size)
- vadj->value += page_size;
- else
- vadj->value = vadj->upper - vadj->page_size;
- gtk_adjustment_value_changed (vadj);
- break;
- case GDK_BackSpace:
- if (vadj->value > vadj->lower + page_size)
- vadj->value -= page_size;
- else
- vadj->value = vadj->lower;
- gtk_adjustment_value_changed (vadj);
- break;
- case GDK_Return:
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- open_msg (NULL, fb);
- break;
- default:
- return on_key_press ((GtkWidget *)tree, (GdkEventKey *)ev, fb);
- }
-
- return TRUE;
-}
-
-static void
-on_double_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, FolderBrowser *fb)
-{
- /* Ignore double-clicks on columns where single-click doesn't
- * just select.
- */
- if (MESSAGE_LIST_COLUMN_IS_ACTIVE (col))
- return;
-
- open_msg (NULL, fb);
-}
-
-static void
-on_selection_changed (GtkObject *obj, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- FolderBrowserSelectionState state;
-
- /* we can get this signal at strange times...
- * if no uicomp, don't even bother */
-
- if (fb->uicomp == NULL)
- return;
-
- switch (e_selection_model_selected_count (E_SELECTION_MODEL (obj))) {
- case 0:
- state = FB_SELSTATE_NONE;
- break;
- case 1:
- state = FB_SELSTATE_SINGLE;
- break;
- default:
- state = FB_SELSTATE_MULTIPLE;
- break;
- }
-
- folder_browser_ui_set_selection_state (fb, state);
-
- update_status_bar(fb);
-}
-
-static void
-fb_resize_cb (GtkWidget *w, GtkAllocation *a, FolderBrowser *fb)
-{
- if (fb->preview_shown)
- mail_config_set_paned_size (a->height);
-}
-
-static void
-folder_browser_gui_init (FolderBrowser *fb)
-{
- ESelectionModel *esm;
-
- /* The panned container */
- fb->vpaned = e_vpaned_new ();
- gtk_widget_show (fb->vpaned);
-
- gtk_table_attach (GTK_TABLE (fb), fb->vpaned,
- 0, 1, 1, 3,
- GTK_FILL | GTK_EXPAND,
- GTK_FILL | GTK_EXPAND,
- 0, 0);
-
- /* quick-search bar */
- {
- RuleContext *rc = (RuleContext *)rule_context_new ();
- char *user = g_strdup_printf ("%s/searches.xml", evolution_dir);
- /* we reuse the vfolder types here, they should match */
- char *system = EVOLUTION_DATADIR "/evolution/vfoldertypes.xml";
-
- rule_context_add_part_set ((RuleContext *)rc, "partset", filter_part_get_type (),
- rule_context_add_part, rule_context_next_part);
-
- rule_context_add_rule_set ((RuleContext *)rc, "ruleset", filter_rule_get_type (),
- rule_context_add_rule, rule_context_next_rule);
-
- fb->search = e_filter_bar_new (rc, system, user, folder_browser_config_search, fb);
- e_search_bar_set_menu ((ESearchBar *)fb->search, folder_browser_search_menu_items);
- /*e_search_bar_set_option((ESearchBar *)fb->search, folder_browser_search_option_items);*/
- g_free (user);
- gtk_object_unref (GTK_OBJECT (rc));
- }
-
- gtk_widget_show (GTK_WIDGET (fb->search));
-
- gtk_signal_connect (GTK_OBJECT (fb->search), "query_changed",
- GTK_SIGNAL_FUNC (folder_browser_search_query_changed), fb);
- gtk_signal_connect (GTK_OBJECT (fb->search), "menu_activated",
- GTK_SIGNAL_FUNC (folder_browser_search_menu_activated), fb);
-
-
- gtk_table_attach (GTK_TABLE (fb), GTK_WIDGET (fb->search),
- 0, 1, 0, 1,
- GTK_FILL | GTK_EXPAND,
- 0,
- 0, 0);
-
- esm = e_tree_get_selection_model (E_TREE (fb->message_list->tree));
- gtk_signal_connect (GTK_OBJECT (esm), "selection_changed", on_selection_changed, fb);
- fb->selection_state = FB_SELSTATE_NONE; /* default to none */
-
- e_paned_add1 (E_PANED (fb->vpaned), GTK_WIDGET (fb->message_list));
- gtk_widget_show (GTK_WIDGET (fb->message_list));
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list), "size_allocate",
- GTK_SIGNAL_FUNC (fb_resize_cb), fb);
-
- e_paned_add2 (E_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
- e_paned_set_position (E_PANED (fb->vpaned), mail_config_get_paned_size ());
- gtk_widget_show (GTK_WIDGET (fb->mail_display));
- gtk_widget_show (GTK_WIDGET (fb));
-}
-
-/* mark the message seen if the current message still matches */
-static gint
-do_mark_seen (gpointer data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (data);
-
- if (fb->new_uid && fb->loaded_uid && !strcmp (fb->new_uid, fb->loaded_uid)) {
- camel_folder_set_message_flags (fb->folder, fb->new_uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- }
-
- return FALSE;
-}
-
-/* callback when we have the message to display, after async loading it (see below) */
-/* if we have pending uid's, it means another was selected before we finished displaying
- the last one - so we cycle through and start loading the pending one immediately now */
-static void
-done_message_selected (CamelFolder *folder, char *uid, CamelMimeMessage *msg, void *data)
-{
- FolderBrowser *fb = data;
- int timeout = mail_config_get_mark_as_seen_timeout ();
-
- if (folder != fb->folder)
- return;
-
- mail_display_set_message (fb->mail_display, (CamelMedium *)msg);
- folder_browser_ui_message_loaded (fb);
-
- /* FIXME: should this signal be emitted here?? */
- gtk_signal_emit (GTK_OBJECT (fb), folder_browser_signals [MESSAGE_LOADED], uid);
-
- /* pain, if we have pending stuff, re-run */
- if (fb->pending_uid) {
- g_free (fb->loading_uid);
- fb->loading_uid = fb->pending_uid;
- fb->pending_uid = NULL;
-
- mail_get_message (fb->folder, fb->loading_uid, done_message_selected, fb, mail_thread_new);
- return;
- }
-
- g_free (fb->loaded_uid);
- fb->loaded_uid = fb->loading_uid;
- fb->loading_uid = NULL;
-
- /* if we are still on the same message, do the 'idle read' thing */
- if (fb->seen_id)
- gtk_timeout_remove (fb->seen_id);
-
- if (mail_config_get_do_seen_timeout () && msg) {
- if (timeout > 0)
- fb->seen_id = gtk_timeout_add (timeout, do_mark_seen, fb);
- else
- do_mark_seen (fb);
- }
-}
-
-/* ok we waited enough, display it anyway (see below) */
-static gboolean
-do_message_selected (FolderBrowser *fb)
-{
- d(printf ("selecting uid %s (delayed)\n", fb->new_uid ? fb->new_uid : "NONE"));
-
- fb->loading_id = 0;
-
- /* if we are loading, then set a pending, but leave the loading, coudl cancel here (?) */
- if (fb->loading_uid) {
- g_free (fb->pending_uid);
- fb->pending_uid = g_strdup (fb->new_uid);
- } else {
- if (fb->new_uid) {
- fb->loading_uid = g_strdup (fb->new_uid);
- mail_get_message (fb->folder, fb->loading_uid, done_message_selected, fb, mail_thread_new);
- } else {
- mail_display_set_message (fb->mail_display, NULL);
- }
- }
-
- return FALSE;
-}
-
-/* when a message is selected, wait a while before trying to display it */
-static void
-on_message_selected (MessageList *ml, const char *uid, FolderBrowser *fb)
-{
- d(printf ("selecting uid %s (direct)\n", uid ? uid : "NONE"));
-
- if (fb->loading_id != 0)
- gtk_timeout_remove (fb->loading_id);
-
- g_free (fb->new_uid);
- fb->new_uid = g_strdup (uid);
-
- if (fb->preview_shown)
- fb->loading_id = gtk_timeout_add (100, (GtkFunction)do_message_selected, fb);
-}
-
-static void
-folder_browser_init (GtkObject *object)
-{
-}
-
-static void
-my_folder_browser_init (GtkObject *object)
-{
- FolderBrowser *fb = FOLDER_BROWSER (object);
- int i;
-
- fb->view_collection = NULL;
- fb->view_menus = NULL;
-
- fb->pref_master = FALSE;
-
- /*
- * Setup parent class fields.
- */
- GTK_TABLE (fb)->homogeneous = FALSE;
- gtk_table_resize (GTK_TABLE (fb), 1, 2);
-
- /*
- * Our instance data
- */
- fb->message_list = (MessageList *)message_list_new ();
- fb->mail_display = (MailDisplay *)mail_display_new ();
-
- fb->preview_shown = TRUE;
-
- gtk_signal_connect (GTK_OBJECT (fb->mail_display->html),
- "key_press_event", GTK_SIGNAL_FUNC (on_key_press), fb);
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list->tree),
- "key_press", GTK_SIGNAL_FUNC (etree_key), fb);
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list->tree),
- "right_click", GTK_SIGNAL_FUNC (on_right_click), fb);
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list->tree),
- "double_click", GTK_SIGNAL_FUNC (on_double_click), fb);
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list), "message_selected",
- on_message_selected, fb);
-
- /* drag & drop */
- e_tree_drag_source_set (fb->message_list->tree, GDK_BUTTON1_MASK,
- drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY);
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list->tree), "tree_drag_data_get",
- GTK_SIGNAL_FUNC (message_list_drag_data_get), fb);
-
- e_tree_drag_dest_set (fb->message_list->tree, GTK_DEST_DEFAULT_ALL,
- drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY);
-
- gtk_signal_connect (GTK_OBJECT (fb->message_list->tree), "tree_drag_data_received",
- GTK_SIGNAL_FUNC (message_list_drag_data_received), fb);
-
- /* cut, copy & paste */
- fb->invisible = gtk_invisible_new ();
-
- for (i = 0; i < num_paste_types; i++)
- gtk_selection_add_target (fb->invisible, clipboard_atom,
- paste_types[i].target,
- paste_types[i].info);
-
- gtk_signal_connect (GTK_OBJECT (fb->invisible),
- "selection_get",
- GTK_SIGNAL_FUNC (selection_get),
- (gpointer) fb);
- gtk_signal_connect (GTK_OBJECT (fb->invisible),
- "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear_event),
- (gpointer) fb);
- gtk_signal_connect (GTK_OBJECT (fb->invisible),
- "selection_received",
- GTK_SIGNAL_FUNC (selection_received),
- (gpointer) fb);
-
- folder_browser_gui_init (fb);
-}
-
-GtkWidget *
-folder_browser_new (const GNOME_Evolution_Shell shell, const char *uri)
-{
- CORBA_Environment ev;
- FolderBrowser *folder_browser;
-
- CORBA_exception_init (&ev);
-
- folder_browser = gtk_type_new (folder_browser_get_type ());
-
- my_folder_browser_init (GTK_OBJECT (folder_browser));
-
- folder_browser->shell = CORBA_Object_duplicate (shell, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- folder_browser->shell = CORBA_OBJECT_NIL;
- gtk_widget_destroy (GTK_WIDGET (folder_browser));
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- folder_browser->uri = g_strdup (uri);
- gtk_object_ref (GTK_OBJECT (folder_browser));
- mail_get_folder(folder_browser->uri, got_folder, folder_browser, mail_thread_new);
-
- return GTK_WIDGET (folder_browser);
-}
-
-
-E_MAKE_TYPE (folder_browser, "FolderBrowser", FolderBrowser, folder_browser_class_init, folder_browser_init, PARENT_TYPE);
diff --git a/mail/folder-browser.h b/mail/folder-browser.h
deleted file mode 100644
index 1e10b907a9..0000000000
--- a/mail/folder-browser.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-
-#ifndef _FOLDER_BROWSER_H_
-#define _FOLDER_BROWSER_H_
-
-#include <gtk/gtktable.h>
-#include "camel/camel-stream.h"
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <widgets/misc/e-filter-bar.h>
-#include "widgets/menus/gal-view-menus.h"
-#include "filter/filter-rule.h"
-#include "filter/filter-context.h" /*eek*/
-#include "message-list.h"
-#include "mail-display.h"
-#include "mail-types.h"
-#include "shell/Evolution.h"
-
-
-#define FOLDER_BROWSER_TYPE (folder_browser_get_type ())
-#define FOLDER_BROWSER(o) (GTK_CHECK_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser))
-#define FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), FOLDER_BROWSER_TYPE, FolderBrowserClass))
-#define IS_FOLDER_BROWSER(o) (GTK_CHECK_TYPE ((o), FOLDER_BROWSER_TYPE))
-#define IS_FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), FOLDER_BROWSER_TYPE))
-
-typedef enum _FolderBrowserSelectionState {
- FB_SELSTATE_NONE,
- FB_SELSTATE_SINGLE,
- FB_SELSTATE_MULTIPLE,
- FB_SELSTATE_UNDEFINED
-} FolderBrowserSelectionState;
-
-struct _FolderBrowser {
- GtkTable parent;
-
- BonoboPropertyBag *properties;
-
- GNOME_Evolution_Shell shell;
- GNOME_Evolution_ShellView shell_view;
-
- BonoboUIComponent *uicomp;
-
- /*
- * The current URI being displayed by the FolderBrowser
- */
- char *uri;
- CamelFolder *folder;
- int unread_count; /* last known unread message count */
-
- /* async loading stuff */
- char *loading_uid;/* what uid am i loading now */
- char *pending_uid; /* what uid should i load next */
- char *new_uid; /* place to save the next uid during idle timeout */
- char *loaded_uid; /* what we have loaded */
- guint loading_id, seen_id;
-
- /* a folder we are expunging, dont use other than to compare the pointer value */
- CamelFolder *expunging;
-
- MessageList *message_list;
- MailDisplay *mail_display;
- GtkWidget *vpaned;
-
- EFilterBar *search;
- FilterRule *search_full; /* if we have a full search active */
-
- gboolean preview_shown;
- gboolean threaded;
- gboolean pref_master;
-
- FolderBrowserSelectionState selection_state;
- GSList *sensitize_changes;
- int sensitize_timeout_id;
-
- /* View collection and the menu handler object */
- GalViewCollection *view_collection;
- GalViewMenus *view_menus;
-
- GtkWidget *invisible;
- GByteArray *clipboard_selection;
-};
-
-
-typedef struct {
- GtkTableClass parent_class;
-
- /* signals */
- void (*folder_loaded) (FolderBrowser *fb, const char *uri);
- void (*message_loaded) (FolderBrowser *fb, const char *uid);
-} FolderBrowserClass;
-
-struct fb_ondemand_closure {
- FilterRule *rule;
- FolderBrowser *fb;
- gchar *path;
-};
-
-GtkType folder_browser_get_type (void);
-GtkWidget *folder_browser_new (const GNOME_Evolution_Shell shell,
- const char *uri);
-
-void folder_browser_set_ui_component (FolderBrowser *fb, BonoboUIComponent *uicomp);
-void folder_browser_set_shell_view (FolderBrowser *fb, GNOME_Evolution_ShellView shell_view);
-
-void folder_browser_set_message_preview (FolderBrowser *folder_browser,
- gboolean show_message_preview);
-void folder_browser_clear_search (FolderBrowser *fb);
-
-void folder_browser_cut (GtkWidget *widget, FolderBrowser *fb);
-void folder_browser_copy (GtkWidget *widget, FolderBrowser *fb);
-void folder_browser_paste (GtkWidget *widget, FolderBrowser *fb);
-
-/* callbacks for functions on the folder-browser */
-void vfolder_subject (GtkWidget *w, FolderBrowser *fb);
-void vfolder_sender (GtkWidget *w, FolderBrowser *fb);
-void vfolder_recipient (GtkWidget *w, FolderBrowser *fb);
-void vfolder_mlist (GtkWidget *w, FolderBrowser *fb);
-
-void filter_subject (GtkWidget *w, FolderBrowser *fb);
-void filter_sender (GtkWidget *w, FolderBrowser *fb);
-void filter_recipient (GtkWidget *w, FolderBrowser *fb);
-void filter_mlist (GtkWidget *w, FolderBrowser *fb);
-
-void hide_read(GtkWidget *w, FolderBrowser *fb);
-void hide_deleted(GtkWidget *w, FolderBrowser *fb);
-void hide_selected(GtkWidget *w, FolderBrowser *fb);
-void hide_none(GtkWidget *w, FolderBrowser *fb);
-void hide_subject(GtkWidget *w, FolderBrowser *fb);
-void hide_sender(GtkWidget *w, FolderBrowser *fb);
-
-void folder_browser_toggle_preview (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data);
-
-void folder_browser_toggle_threads (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data);
-
-void folder_browser_toggle_hide_deleted (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data);
-
-void folder_browser_set_message_display_style (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data);
-
-gboolean folder_browser_is_drafts (FolderBrowser *fb);
-gboolean folder_browser_is_sent (FolderBrowser *fb);
-gboolean folder_browser_is_outbox (FolderBrowser *fb);
-
-#endif /* _FOLDER_BROWSER_H_ */
diff --git a/mail/folder-info.c b/mail/folder-info.c
deleted file mode 100644
index 268efe5e77..0000000000
--- a/mail/folder-info.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * folder-info.c: Implementation of GNOME_Evolution_FolderInfo
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "Mail.h"
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-
-#include <bonobo/bonobo-xobject.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-exception.h>
-
-#include "mail.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-
-#define FOLDER_INFO_IID "OAFIID:GNOME_Evolution_FolderInfo_Factory"
-
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
-static BonoboObjectClass *parent_class = NULL;
-
-typedef struct _EvolutionFolderInfo EvolutionFolderInfo;
-typedef struct _EvolutionFolderInfoClass EvolutionFolderInfoClass;
-
-struct _EvolutionFolderInfo {
- BonoboXObject parent;
-};
-
-struct _EvolutionFolderInfoClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_FolderInfo__epv epv;
-};
-
-/* MT stuff */
-struct _folder_info_msg {
- struct _mail_msg msg;
-
- Bonobo_Listener listener;
- char *foldername;
-
- int read;
- int unread;
-};
-
-static GtkType evolution_folder_info_get_type (void);
-
-static char *
-do_describe_info (struct _mail_msg *mm, gint complete)
-{
- return g_strdup (_("Getting Folder Information"));
-}
-
-static void
-do_get_info (struct _mail_msg *mm)
-{
- struct _folder_info_msg *m = (struct _folder_info_msg *) mm;
- CamelFolder *folder;
- CamelException *ex;
-#if 0
- char *uri_dup;
- char *foldername, *start, *end;
- char *storage, *protocol, *uri;
- /* Fixme: Do other stuff. Different stuff to the stuff below */
- uri_dup = g_strdup (m->foldername);
- start = uri_dup + 11;
- g_warning ("Start: %s", start);
-
- end = strrchr (start, '/');
- if (end == NULL) {
- g_warning ("Bugger");
- return;
- }
-
- storage = g_strndup (start, end - start);
- start = end + 1;
- foldername = g_strdup (start);
-
- g_free (uri_dup);
-
- /* Work out the protocol.
- The storage is going to start as local, or vfolder, or an imap
- server. */
- g_warning ("Storage: %s", storage);
- if (strncmp (storage, "local", 5) == 0) {
- char *evolution_dir;
- char *proto;
-
- evolution_dir = gnome_util_prepend_user_home ("evolution/local");
- proto = g_strconcat ("file://", evolution_dir, NULL);
- uri = e_path_to_physical (proto, foldername);
- g_free (evolution_dir);
- g_free (proto);
-
- } else if (strncmp (storage, "vfolder", 7) == 0) {
- uri = g_strconcat ("vfolder://", foldername, NULL);
- } else {
- uri = g_strconcat ("imap://", storage, foldername, NULL);
- }
-#endif
-
- ex = camel_exception_new ();
- folder = mail_tool_uri_to_folder (m->foldername, ex);
- if (camel_exception_is_set (ex)) {
- g_warning ("Camel exception: %s", camel_exception_get_description (ex));
- }
-
- camel_exception_free (ex);
-
- m->read = camel_folder_get_message_count (folder);
- m->unread = camel_folder_get_unread_message_count (folder);
-}
-
-static void
-do_got_info (struct _mail_msg *mm)
-{
- struct _folder_info_msg *m = (struct _folder_info_msg *) mm;
- CORBA_Environment ev;
- CORBA_any a;
- GNOME_Evolution_FolderInfo_MessageCount count;
-
- g_print ("You've got mail: %d, %d\n", m->read, m->unread);
-
- count.path = m->foldername;
- count.count = m->read;
- count.unread = m->unread;
-
- a._type = (CORBA_TypeCode) TC_GNOME_Evolution_FolderInfo_MessageCount;
- a._value = &count;
-
- CORBA_exception_init (&ev);
- Bonobo_Listener_event (m->listener, "youve-got-mail", &a, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Got exception on listener: %s", CORBA_exception_id (&ev));
- }
- CORBA_exception_free (&ev);
-}
-
-static void
-do_free_info (struct _mail_msg *mm)
-{
- struct _folder_info_msg *m = (struct _folder_info_msg *) mm;
-
- g_free (m->foldername);
-}
-
-struct _mail_msg_op get_info_op = {
- do_describe_info,
- do_get_info,
- do_got_info,
- do_free_info,
-};
-
-typedef struct {
- int read;
- int unread;
-} MailFolderInfo;
-
-/* Returns a MailFolderInfo struct or NULL on error */
-static void
-mail_get_info (const char *foldername,
- Bonobo_Listener listener)
-{
- CORBA_Environment ev;
- struct _folder_info_msg *m;
-
- m = mail_msg_new (&get_info_op, NULL, sizeof (*m));
-
- g_print ("Folder: %s", foldername);
- m->foldername = g_strdup (foldername);
-
- CORBA_exception_init (&ev);
- m->listener = bonobo_object_dup_ref (listener, &ev);
- CORBA_exception_free (&ev);
-
- e_thread_put (mail_thread_new, (EMsg *) m);
-}
-
-static void
-impl_GNOME_Evolution_FolderInfo_getInfo (PortableServer_Servant servant,
- const CORBA_char *foldername,
- const Bonobo_Listener listener,
- CORBA_Environment *ev)
-{
- mail_get_info (foldername, listener);
-}
-
-static void
-evolution_folder_info_class_init (EvolutionFolderInfoClass *klass)
-{
- POA_GNOME_Evolution_FolderInfo__epv *epv = &klass->epv;
-
- parent_class = gtk_type_class (PARENT_TYPE);
- epv->getInfo = impl_GNOME_Evolution_FolderInfo_getInfo;
-}
-
-static void
-evolution_folder_info_init (EvolutionFolderInfo *info)
-{
-}
-
-BONOBO_X_TYPE_FUNC_FULL (EvolutionFolderInfo,
- GNOME_Evolution_FolderInfo,
- PARENT_TYPE,
- evolution_folder_info);
-
-static BonoboObject *
-evolution_folder_info_factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionFolderInfo *info;
-
- info = gtk_type_new (evolution_folder_info_get_type ());
- return BONOBO_OBJECT (info);
-}
-
-gboolean
-evolution_folder_info_factory_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (FOLDER_INFO_IID,
- evolution_folder_info_factory_fn,
- NULL);
-
- if (factory == NULL) {
- g_warning ("Error starting FolderInfo");
- return FALSE;
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
- return TRUE;
-}
diff --git a/mail/importers/.cvsignore b/mail/importers/.cvsignore
deleted file mode 100644
index ee1568b9e0..0000000000
--- a/mail/importers/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.bb
-*.bbg
-*.da
-*.gcov
-*.oaf
-*.lo
-*.la \ No newline at end of file
diff --git a/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in b/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in
deleted file mode 100644
index b9da9ce3c8..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory"
- type="exe"
- location="evolution-mail">
-
- <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 mbox into Evolution"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Mbox_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Mbox_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="MBox (mbox)"/>
- <oaf_attribute name="description" type="string"
- _value="Imports mbox files into Evolution"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in b/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in
deleted file mode 100644
index 66317e3d7a..0000000000
--- a/mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory"
- type="exe"
- location="evolution-mail">
-
- <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 Outlook Express 4 mails into Evolution"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Outlook_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Outlook_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="Outlook Express 4 (.mbx)"/>
- <oaf_attribute name="description" type="string"
- _value="Imports Outlook Express 4 files into Evolution"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am
deleted file mode 100644
index 48200aa909..0000000000
--- a/mail/importers/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-importersdir = $(pkglibdir)/evolution-mail-importers/$(VERSION)
-
-importers_LTLIBRARIES = liboutlook.la libmbox.la
-
-INCLUDES = -I.. \
- -I$(srcdir)/.. \
- -I$(top_srcdir) \
- -I$(top_srcdir)/shell \
- -I$(top_builddir)/shell \
- -I$(includedir) \
- $(EXTRA_GNOME_CFLAGS) \
- -DG_LOG_DOMAIN=\"evolution-mail-importer\"
-
-liboutlook_la_SOURCES = \
- evolution-outlook-importer.c
-liboutlook_la_LDFLAGS = -version-info 0:0:0
-
-libmbox_la_SOURCES = evolution-mbox-importer.c
-libmbox_la_LDFLAGS = -version-info 0:0:0
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Mail_Mbox_Importer.oaf.in \
- GNOME_Evolution_Mail_Outlook_Importer.oaf.in
-
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-EXTRA_DIST = $(oaf_in_files) $(oaf_DATA)
-
-@XML_I18N_MERGE_OAF_RULE@
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
deleted file mode 100644
index 5c3062236e..0000000000
--- a/mail/importers/evolution-mbox-importer.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-mbox-importer.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#include <camel/camel-exception.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-mime-part.h>
-
-#include <importer/evolution-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include "mail/mail-importer.h"
-#include "mail-tools.h"
-
-#include "e-util/e-path.h"
-
-/* #define IMPORTER_DEBUG */
-#ifdef IMPORTER_DEBUG
-#define IN g_print ("=====> %s (%d)\n", __FUNCTION__, __LINE__)
-#define OUT g_print ("<==== %s (%d)\n", __FUNCTION__, __LINE__)
-#else
-#define IN
-#define OUT
-#endif
-
-#define MBOX_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory"
-
-typedef struct {
- MailImporter importer; /* Parent */
-
- char *filename;
- int num;
- CamelMimeParser *mp;
- gboolean is_folder;
-} MboxImporter;
-
-void mail_importer_module_init (void);
-
-/* EvolutionImporter methods */
-
-static void
-process_item_fn (EvolutionImporter *eimporter,
- CORBA_Object listener,
- void *closure,
- CORBA_Environment *ev)
-{
- MboxImporter *mbi = (MboxImporter *) closure;
- MailImporter *importer = (MailImporter *) mbi;
- gboolean done = FALSE;
- CamelException *ex;
-
- if (importer->folder == NULL) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_NOT_READY,
- TRUE, ev);
- return;
- }
-
- if (mbi->is_folder == TRUE) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_OK,
- FALSE, ev);
- return;
- }
-
- ex = camel_exception_new ();
- if (camel_mime_parser_step (mbi->mp, 0, 0) == HSCAN_FROM) {
- /* Import the next message */
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
-
- IN;
- msg = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg),
- mbi->mp) == -1) {
- g_warning ("Failed message %d", mbi->num);
- camel_object_unref (CAMEL_OBJECT (msg));
- done = TRUE;
- }
-
- /* write the mesg */
- info = g_new0 (CamelMessageInfo, 1);
- camel_folder_append_message (importer->folder, msg, info, ex);
- g_free (info);
- camel_object_unref (CAMEL_OBJECT (msg));
- if (camel_exception_is_set (ex)) {
- g_warning ("Failed message %d", mbi->num);
- done = TRUE;
- }
- OUT;
- } else {
- IN;
- /* all messages have now been imported */
- camel_folder_sync (importer->folder, FALSE, ex);
- camel_folder_thaw (importer->folder);
- importer->frozen = FALSE;
- done = TRUE;
- OUT;
- }
-
- if (!done) {
- camel_mime_parser_step (mbi->mp, 0, 0);
- }
-
- camel_exception_free (ex);
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_OK,
- !done, ev);
- return;
-}
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- char signature[6];
- gboolean ret = FALSE;
- int fd, n;
-
- fd = open (filename, O_RDONLY);
- if (fd == -1)
- return FALSE;
-
- n = read (fd, signature, 5);
- if (n > 0) {
- signature[n] = '\0';
- if (!g_strncasecmp (signature, "From ", 5))
- ret = TRUE;
- }
-
- close (fd);
-
- return ret;
-}
-
-static void
-importer_destroy_cb (GtkObject *object,
- MboxImporter *mbi)
-{
- MailImporter *importer;
-
- importer = (MailImporter *) mbi;
- if (importer->frozen) {
- camel_folder_sync (importer->folder, FALSE, NULL);
- camel_folder_thaw (importer->folder);
- }
-
- if (importer->folder)
- camel_object_unref (CAMEL_OBJECT (importer->folder));
-
- g_free (mbi->filename);
- if (mbi->mp)
- camel_object_unref (CAMEL_OBJECT (mbi->mp));
-
- g_free (mbi);
-}
-
-static void
-folder_created_cb (BonoboListener *listener,
- const char *event_name,
- const BonoboArg *event_data,
- CORBA_Environment *ev,
- MailImporter *importer)
-{
- char *fullpath;
- GNOME_Evolution_Storage_FolderResult *result;
- CamelException *ex;
-
- if (strcmp (event_name, "evolution-shell:folder_created") != 0) {
- return; /* Unknown event */
- }
-
- result = event_data->_value;
- fullpath = g_strconcat ("file://", result->path, NULL);
-
- ex = camel_exception_new ();
- importer->folder = mail_tool_uri_to_folder (fullpath, ex);
-
- if (camel_exception_is_set (ex)) {
- g_warning ("Error opening %s", fullpath);
- camel_exception_free (ex);
-
- g_free (fullpath);
- return;
- }
-
- g_free (fullpath);
- bonobo_object_unref (BONOBO_OBJECT (listener));
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *eimporter,
- const char *filename,
- const char *folderpath,
- void *closure)
-{
- MboxImporter *mbi;
- MailImporter *importer;
- gboolean delayed = FALSE;
- struct stat buf;
- int fd;
-
- mbi = (MboxImporter *) closure;
- importer = (MailImporter *) mbi;
-
- mbi->filename = g_strdup (filename);
-
- fd = open (filename, O_RDONLY);
- if (fd == -1) {
- g_warning ("Cannot open file");
- return FALSE;
- }
-
- fstat (fd, &buf);
- if (S_ISREG (buf.st_mode)) {
- mbi->mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mbi->mp, TRUE);
- if (camel_mime_parser_init_with_fd (mbi->mp, fd) == -1) {
- g_warning ("Unable to process spool folder");
- goto fail;
- }
- mbi->is_folder = FALSE;
- } else {
- mbi->is_folder = TRUE;
- }
-
- importer->mstream = NULL;
- if (folderpath == NULL || *folderpath == '\0') {
- importer->folder = mail_tool_get_local_inbox (NULL);
- } else {
- char *parent, *tmp, *fullpath, *homedir;
- const char *name;
- BonoboListener *listener;
- CamelException *ex;
-
- tmp = gnome_util_prepend_user_home ("evolution/local");
- homedir = g_strconcat ("file://", tmp, NULL);
- g_free (tmp);
-
- fullpath = e_path_to_physical (homedir, folderpath);
- ex = camel_exception_new ();
- importer->folder = mail_tool_uri_to_folder (fullpath, ex);
- g_free (homedir);
-
- if (camel_exception_is_set (ex) || importer->folder == NULL) {
- /* Make a new directory */
- name = strrchr (folderpath, '/');
- if (name == NULL) {
- parent = g_strdup ("/");
- name = folderpath;
- } else {
- name += 1;
- parent = g_dirname (folderpath);
- }
-
- listener = bonobo_listener_new (NULL, NULL);
- gtk_signal_connect (GTK_OBJECT (listener), "event-notify",
- GTK_SIGNAL_FUNC (folder_created_cb),
- importer);
-
- mail_importer_create_folder (parent, name, NULL, listener);
- camel_exception_free (ex);
- ex = camel_exception_new ();
- importer->folder = mail_tool_uri_to_folder (fullpath, ex);
- delayed = TRUE;
- g_free (parent);
- }
- camel_exception_free (ex);
- g_free (fullpath);
- }
-
- if (importer->folder == NULL && delayed == FALSE){
- g_print ("Bad folder\n");
- goto fail;
- }
-
- if (importer->folder != NULL) {
- camel_folder_freeze (importer->folder);
- importer->frozen = TRUE;
- }
-
- return TRUE;
-
- fail:
- camel_object_unref (CAMEL_OBJECT (mbi->mp));
- mbi->mp = NULL;
-
- return FALSE;
-}
-
-static BonoboObject *
-mbox_factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionImporter *importer;
- MboxImporter *mbox;
-
- mbox = g_new0 (MboxImporter, 1);
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, mbox);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), mbox);
-
- return BONOBO_OBJECT (importer);
-}
-
-/* Entry point */
-void
-mail_importer_module_init (void)
-{
- static gboolean initialised = FALSE;
- BonoboGenericFactory *factory;
-
- if (initialised == TRUE)
- return;
-
- factory = bonobo_generic_factory_new (MBOX_FACTORY_IID,
- mbox_factory_fn, NULL);
-
- if (factory == NULL)
- g_warning ("Could not initialise Outlook importer factory.");
-
- initialised = TRUE;
-}
-
diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c
deleted file mode 100644
index 50e386a388..0000000000
--- a/mail/importers/evolution-outlook-importer.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* evolution-outlook-importer.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#include <stdio.h>
-
-#include <importer/evolution-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#include <camel/camel-exception.h>
-
-#include "e-util/e-memory.h"
-
-#include "mail-importer.h"
-#include "mail-tools.h"
-
-
-#define OUTLOOK_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Outlook_ImporterFactory"
-
-extern char *evolution_dir;
-typedef struct {
- MailImporter importer;
-
- char *filename;
- gboolean oe4; /* Is file OE4 or not? */
- FILE *handle;
- long pos;
- off_t size;
-
- gboolean busy;
-} OutlookImporter;
-
-struct oe_msg_segmentheader {
- int self;
- int increase;
- int include;
- int next;
- int usenet;
-};
-
-typedef struct oe_msg_segmentheader oe_msg_segmentheader;
-
-/* Prototype */
-
-void mail_importer_module_init (void);
-
-
-/* EvolutionImporter methods */
-
-/* Based on code from liboe 0.92 (STABLE)
- Copyright (C) 2000 Stephan B. Nedregrd (stephan@micropop.com)
- Modified 2001 Iain Holmes <iain@ximian.com>
- Copyright (C) 2001 Ximian, Inc. */
-
-static void
-process_item_fn (EvolutionImporter *eimporter,
- CORBA_Object listener,
- void *closure,
- CORBA_Environment *ev)
-{
- OutlookImporter *oli = (OutlookImporter *) closure;
- MailImporter *importer = (MailImporter *) oli;
- oe_msg_segmentheader *header;
- gboolean more = TRUE;
- char *cb, *sfull, *s;
- long end_pos = 0;
- int i;
-
- if (oli->busy == TRUE) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_BUSY,
- more, ev);
- return;
- }
-
- oli->busy = TRUE;
- header = g_new (oe_msg_segmentheader, 1);
- fread (header, 16, 1, oli->handle);
-
- /* Write a From line */
- mail_importer_add_line (importer,
- "From evolution-outlook-importer", FALSE);
- end_pos = oli->pos + header->include;
- if (end_pos >= oli->size) {
- end_pos = oli->size;
- more = FALSE;
- }
-
- oli->pos += 4;
-
- cb = g_new (char, 4);
- sfull = g_new (char, 65536);
- s = sfull;
-
- while (oli->pos < end_pos) {
- fread (cb, 1, 4, oli->handle);
- for (i = 0; i < 4; i++, oli->pos++) {
- if (*(cb + i ) != 0x0d) {
- *s++ = *(cb + i);
-
- if (*(cb + i) == 0x0a) {
- *s = '\0';
- mail_importer_add_line (importer,
- sfull, FALSE);
- s = sfull;
- }
- }
- }
- }
-
- if (s != sfull) {
- *s = '\0';
- mail_importer_add_line (importer, sfull, FALSE);
- s = sfull;
- }
-
- mail_importer_add_line (importer, "\n", TRUE);
-
- oli->pos = end_pos;
- fseek (oli->handle, oli->pos, SEEK_SET);
-
- g_free (header);
- g_free (sfull);
- g_free (cb);
-
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_OK,
- more, ev);
- if (more == FALSE) {
- CamelException *ex;
-
- ex = camel_exception_new ();
- camel_folder_thaw (importer->folder);
- camel_folder_sync (importer->folder, FALSE, ex);
- camel_exception_free (ex);
- fclose (oli->handle);
- oli->handle = NULL;
- }
-
- oli->busy = FALSE;
- return;
-}
-
-
-/* EvolutionImporterFactory methods */
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- FILE *handle;
- int signature[4];
-
- /* Outlook Express sniffer.
- Taken from liboe 0.92 (STABLE)
- Copyright (C) 2000 Stephan B. Nedregrd (stephan@micropop.com) */
-
- handle = fopen (filename, "rb");
- if (handle == NULL)
- return FALSE; /* Can't open file: Can't support it :) */
-
- /* SIGNATURE */
- fread (&signature, 16, 1, handle);
- if ((signature[0]!=0xFE12ADCF) || /* OE 5 & OE 5 BETA SIGNATURE */
- (signature[1]!=0x6F74FDC5) ||
- (signature[2]!=0x11D1E366) ||
- (signature[3]!=0xC0004E9A)) {
- if ((signature[0]==0x36464D4A) &&
- (signature[1]==0x00010003)) /* OE4 SIGNATURE */ {
- fclose (handle);
- return TRUE; /* OE 4 */
- }
- fclose (handle);
- return FALSE; /* Not Outlook 4 or 5 */
- }
-
- fclose (handle);
- return FALSE; /* Can't handle OE 5 yet */
-}
-
-static void
-importer_destroy_cb (GtkObject *object,
- OutlookImporter *oli)
-{
- MailImporter *importer;
-
- importer = (MailImporter *) oli;
- if (importer->folder)
- camel_object_unref (CAMEL_OBJECT (importer->folder));
-
- g_free (oli->filename);
- if (oli->handle)
- fclose (oli->handle);
-
- g_free (oli);
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *eimporter,
- const char *filename,
- const char *folderpath,
- void *closure)
-{
- OutlookImporter *oli;
- MailImporter *importer;
- struct stat buf;
- long pos = 0x54;
-
- oli = (OutlookImporter *) closure;
- importer = (MailImporter *) oli;
-
- oli->filename = g_strdup (filename);
- /* Will return TRUE if oe4 format */
- oli->oe4 = support_format_fn (NULL, filename, NULL);
- if (oli->oe4 == FALSE) {
- g_warning ("Not OE4 format");
- return FALSE;
- }
-
- oli->handle = fopen (filename, "rb");
- if (oli->handle == NULL) {
- g_warning ("Cannot open the file");
- return FALSE;
- }
-
- /* Get size of file */
- if (stat (filename, &buf) == -1) {
- g_warning ("Cannot stat file");
- return FALSE;
- }
-
- oli->size = buf.st_size;
-
- /* Set the fposition to the begining */
- fseek (oli->handle, pos, SEEK_SET);
- oli->pos = pos;
-
- importer->mstream = NULL;
-
- if (folderpath == NULL || *folderpath == '\0')
- importer->folder = mail_tool_get_local_inbox (NULL);
- else
- importer->folder = mail_tool_uri_to_folder (folderpath, NULL);
-
- if (importer->folder == NULL){
- g_warning ("Bad folder");
- return FALSE;
- }
-
- camel_folder_freeze (importer->folder);
- oli->busy = FALSE;
- return TRUE;
-}
-
-static BonoboObject *
-outlook_factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionImporter *importer;
- OutlookImporter *oli;
-
- oli = g_new0 (OutlookImporter, 1);
-
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, oli);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), oli);
-
- return BONOBO_OBJECT (importer);
-}
-
-/* Entry point */
-void
-mail_importer_module_init (void)
-{
- static gboolean initialised = FALSE;
- BonoboGenericFactory *factory;
-
- if (initialised == TRUE)
- return;
-
- factory = bonobo_generic_factory_new (OUTLOOK_FACTORY_IID,
- outlook_factory_fn, NULL);
-
- if (factory == NULL)
- g_warning ("Could not initialise Outlook importer factory.");
-
- initialised = TRUE;
-}
-
-
diff --git a/mail/local-config.glade b/mail/local-config.glade
deleted file mode 100644
index 7a2dbc2862..0000000000
--- a/mail/local-config.glade
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Mail</name>
- <program_name>mail</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>dialog_format</name>
- <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>apply_format</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>cancel_format</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame_format</name>
- <label>Mailbox Format</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>table1</name>
- <border_width>2</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>2</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>New store format:</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>label1</name>
- <label>Current store format:</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>label_format</name>
- <label>mbox</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>8</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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>option_format</name>
- <can_focus>True</can_focus>
- <items>mbox
-maildir
-mh
-</items>
- <initial_choice>0</initial_choice>
- <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>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>Note: When converting between mailbox formats, a failure
-(such as lack of disk space) may not be automatically
-recoverable. Please use this feature with care.</label>
- <justify>GTK_JUSTIFY_LEFT</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>
-
-</GTK-Interface>
diff --git a/mail/mail-account-editor-news.c b/mail/mail-account-editor-news.c
deleted file mode 100644
index 1c980a9d6d..0000000000
--- a/mail/mail-account-editor-news.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Cloned from mail-account-editor by Sam Creasey <sammy@oh.verio.com>
- *
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@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 <stdlib.h>
-#include <string.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <camel/camel-url.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "mail-account-editor-news.h"
-#include "mail-session.h"
-
-static void mail_account_editor_news_class_init (MailAccountEditorNewsClass *class);
-static void mail_account_editor_news_finalize (GtkObject *obj);
-
-static GnomeDialogClass *parent_class;
-
-
-GtkType
-mail_account_editor_news_get_type ()
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "MailAccountEditorNews",
- sizeof (MailAccountEditorNews),
- sizeof (MailAccountEditorNewsClass),
- (GtkClassInitFunc) mail_account_editor_news_class_init,
- (GtkObjectInitFunc) NULL,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gnome_dialog_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-mail_account_editor_news_class_init (MailAccountEditorNewsClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (gnome_dialog_get_type ());
-
- object_class->finalize = mail_account_editor_news_finalize;
-}
-
-static void
-mail_account_editor_news_finalize (GtkObject *obj)
-{
- MailAccountEditorNews *editor = (MailAccountEditorNews *) obj;
-
- gtk_object_unref (GTK_OBJECT (editor->xml));
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-static gboolean
-apply_changes(MailAccountEditorNews *editor)
-{
-
- CamelURL *url;
- GtkEntry *service_ent;
-
- service_ent = GTK_ENTRY(glade_xml_get_widget(editor->xml, "source_name"));
- url = g_new0 (CamelURL, 1);
-
- url->protocol = g_strdup("nntp");
- url->host = g_strdup(gtk_entry_get_text(service_ent));
- if(strlen(url->host) == 0) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You have not filled in all of the required information."));
- camel_url_free(url);
- return FALSE;
- }
-
- if(editor->service->url == NULL)
- mail_config_add_news(editor->service);
-
- editor->service->url = camel_url_to_string(url, 0);
-
- mail_config_write();
- return TRUE;
-}
-
-static void
-apply_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditorNews *editor = data;
-
- apply_changes (editor);
-}
-
-static void
-ok_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditorNews *editor = data;
-
- if (apply_changes (editor))
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-static void
-cancel_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditorNews *editor = data;
-
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-MailAccountEditorNews *
-mail_account_editor_news_new (MailConfigService *service)
-{
- MailAccountEditorNews *editor;
- GtkEntry *service_ent;
-
- editor = (MailAccountEditorNews *) gtk_type_new (mail_account_editor_news_get_type ());
-
- editor->service = service;
- editor->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL);
-
- /* get our toplevel widget and reparent it */
- editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->xml, "news_editor_notebook"));
- gtk_widget_reparent (GTK_WIDGET (editor->notebook), GNOME_DIALOG (editor)->vbox);
-
- /* give our dialog an OK button and title */
- gtk_window_set_title (GTK_WINDOW (editor), _("Evolution News Editor"));
- gtk_window_set_policy (GTK_WINDOW (editor), FALSE, TRUE, TRUE);
- gtk_window_set_modal (GTK_WINDOW (editor), TRUE);
- gnome_dialog_append_buttons (GNOME_DIALOG (editor),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_APPLY,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 0 /* OK */,
- GTK_SIGNAL_FUNC (ok_clicked),
- editor);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 1 /* APPLY */,
- GTK_SIGNAL_FUNC (apply_clicked),
- editor);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 2 /* CANCEL */,
- GTK_SIGNAL_FUNC (cancel_clicked),
- editor);
-
- if(service->url) {
- CamelURL *url;
-
- url = camel_url_new(service->url, NULL);
-
- if(url->host) {
- service_ent = GTK_ENTRY(glade_xml_get_widget(editor->xml, "source_name"));
- gtk_entry_set_text(service_ent, url->host);
- }
-
- camel_url_free(url);
- }
-
- return editor;
-}
diff --git a/mail/mail-account-editor-news.h b/mail/mail-account-editor-news.h
deleted file mode 100644
index 69e5194c6d..0000000000
--- a/mail/mail-account-editor-news.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Cloned from mail-account-editor by Sam Creasey <sammy@oh.verio.com>
- *
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 2001 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 MAIL_ACCOUNT_EDITOR_NEWS_H
-#define MAIL_ACCOUNT_EDITOR_NEWS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <gtk/gtk.h>
-#include <glade/glade-xml.h>
-#include <camel/camel-provider.h>
-
-#include "mail-config.h"
-
-#define MAIL_ACCOUNT_EDITOR_NEWS_TYPE (mail_account_editor_news_get_type ())
-#define MAIL_ACCOUNT_EDITOR_NEWS(o) (GTK_CHECK_CAST ((o), MAIL_ACCOUNT_EDITOR_NEWS_TYPE, MailAccountEditorNews))
-#define MAIL_ACCOUNT_EDITOR_NEWS_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_ACCOUNT_EDITOR_NEWS_TYPE, MailAccountEditorNewsClass))
-#define MAIL_IS_ACCOUNT_EDITOR_NEWS(o) (GTK_CHECK_TYPE ((o), MAIL_ACCOUNT_EDITOR_NEWS_TYPE))
-#define MAIL_IS_ACCOUNT_EDITOR_NEWS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_NEWS_TYPE))
-
-struct _MailAccountEditorNews {
- GnomeDialog parent;
-
- GladeXML *xml;
- MailConfigService *service;
- GtkNotebook *notebook;
-};
-
-typedef struct _MailAccountEditorNews MailAccountEditorNews;
-
-typedef struct {
- GnomeDialogClass parent_class;
-
- /* signals */
-
-} MailAccountEditorNewsClass;
-
-GtkType mail_account_editor_news_get_type (void);
-
-MailAccountEditorNews *mail_account_editor_news_new (MailConfigService *service);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNT_EDITOR_NEWS_H */
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
deleted file mode 100644
index cc30da00b0..0000000000
--- a/mail/mail-account-editor.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@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 <stdlib.h>
-#include <string.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <camel/camel-url.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "mail-account-editor.h"
-#include "mail-session.h"
-
-static void mail_account_editor_class_init (MailAccountEditorClass *class);
-static void mail_account_editor_finalize (GtkObject *obj);
-
-static GnomeDialogClass *parent_class;
-
-
-GtkType
-mail_account_editor_get_type ()
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "MailAccountEditor",
- sizeof (MailAccountEditor),
- sizeof (MailAccountEditorClass),
- (GtkClassInitFunc) mail_account_editor_class_init,
- (GtkObjectInitFunc) NULL,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gnome_dialog_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-mail_account_editor_class_init (MailAccountEditorClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (gnome_dialog_get_type ());
-
- object_class->finalize = mail_account_editor_finalize;
-}
-
-static void
-mail_account_editor_finalize (GtkObject *obj)
-{
- MailAccountEditor *editor = (MailAccountEditor *) obj;
-
- mail_account_gui_destroy (editor->gui);
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-static gboolean
-apply_changes (MailAccountEditor *editor)
-{
- MailConfigAccount *account;
- GtkWidget *incomplete;
- int page = -1;
-
- if (!mail_account_gui_identity_complete (editor->gui, &incomplete) ||
- !mail_account_gui_management_complete (editor->gui, &incomplete))
- page = 0;
- else if (!mail_account_gui_source_complete (editor->gui, &incomplete))
- page = 1;
- else if (!mail_account_gui_transport_complete (editor->gui, &incomplete))
- page = 3;
-
- if (page != -1) {
- gtk_notebook_set_page (editor->notebook, page);
- gtk_widget_grab_focus (incomplete);
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You have not filled in all of the required information."));
- return FALSE;
- }
-
- if (mail_account_gui_save (editor->gui) == FALSE)
- return FALSE;
-
- /* FIXME: uh, what the hell is this for? */
- account = editor->gui->account;
-
- /* save any changes we may have */
- mail_config_write ();
-
- /* FIXME: #1549: if the account was a remote store, delete it from the folder-tree and re-add it */
- /* FIXME: preferably, we'd only do this if there were changes... oh well */
-
- return TRUE;
-}
-
-static void
-apply_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditor *editor = data;
-
- apply_changes (editor);
-}
-
-static void
-ok_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditor *editor = data;
-
- if (apply_changes (editor))
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-static void
-cancel_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditor *editor = data;
-
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-static void
-construct (MailAccountEditor *editor, MailConfigAccount *account)
-{
- MailConfigService *source = account->source;
-
- editor->gui = mail_account_gui_new (account);
-
- /* get our toplevel widget and reparent it */
- editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->gui->xml, "account_editor_notebook"));
- gtk_widget_reparent (GTK_WIDGET (editor->notebook), GNOME_DIALOG (editor)->vbox);
-
- /* give our dialog an OK button and title */
- gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
- gtk_window_set_policy (GTK_WINDOW (editor), FALSE, TRUE, TRUE);
- gtk_window_set_modal (GTK_WINDOW (editor), TRUE);
- gnome_dialog_append_buttons (GNOME_DIALOG (editor),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_APPLY,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 0 /* OK */,
- GTK_SIGNAL_FUNC (ok_clicked),
- editor);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 1 /* APPLY */,
- GTK_SIGNAL_FUNC (apply_clicked),
- editor);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 2 /* CANCEL */,
- GTK_SIGNAL_FUNC (cancel_clicked),
- editor);
-
- mail_account_gui_setup (editor->gui, GTK_WIDGET (editor));
-
- mail_account_gui_build_extra_conf (editor->gui, source->url);
-}
-
-MailAccountEditor *
-mail_account_editor_new (MailConfigAccount *account)
-{
- MailAccountEditor *new;
-
- new = (MailAccountEditor *) gtk_type_new (mail_account_editor_get_type ());
- construct (new, account);
-
- return new;
-}
diff --git a/mail/mail-account-editor.h b/mail/mail-account-editor.h
deleted file mode 100644
index c033ea86cb..0000000000
--- a/mail/mail-account-editor.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 MAIL_ACCOUNT_EDITOR_H
-#define MAIL_ACCOUNT_EDITOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include "mail-account-gui.h"
-
-#define MAIL_ACCOUNT_EDITOR_TYPE (mail_account_editor_get_type ())
-#define MAIL_ACCOUNT_EDITOR(o) (GTK_CHECK_CAST ((o), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditor))
-#define MAIL_ACCOUNT_EDITOR_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditorClass))
-#define MAIL_IS_ACCOUNT_EDITOR(o) (GTK_CHECK_TYPE ((o), MAIL_ACCOUNT_EDITOR_TYPE))
-#define MAIL_IS_ACCOUNT_EDITOR_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_TYPE))
-
-struct _MailAccountEditor {
- GnomeDialog parent;
-
- MailAccountGui *gui;
- GtkNotebook *notebook;
-};
-
-typedef struct _MailAccountEditor MailAccountEditor;
-
-typedef struct {
- GnomeDialogClass parent_class;
-
- /* signals */
-
-} MailAccountEditorClass;
-
-GtkType mail_account_editor_get_type (void);
-
-MailAccountEditor *mail_account_editor_new (MailConfigAccount *account);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNT_EDITOR_H */
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
deleted file mode 100644
index d9a0da12c5..0000000000
--- a/mail/mail-account-gui.c
+++ /dev/null
@@ -1,1722 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * 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 <stdarg.h>
-
-#include <bonobo.h>
-#include <bonobo/bonobo-stream-memory.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "shell/evolution-shell-client.h"
-#include "mail-account-gui.h"
-#include "mail-session.h"
-#include "mail-send-recv.h"
-#include "e-msg-composer.h"
-
-#define d(x)
-
-extern char *default_drafts_folder_uri, *default_sent_folder_uri;
-
-static void save_service (MailAccountGuiService *gsvc, GHashTable *extra_conf, MailConfigService *service);
-static void service_changed (GtkEntry *entry, gpointer user_data);
-
-static gboolean
-is_email (const char *address)
-{
- const char *at, *hname;
-
- at = strchr (address, '@');
- /* make sure we have an '@' and that it's not the first or last char */
- if (!at || at == address || *(at + 1) == '\0')
- return FALSE;
-
- hname = at + 1;
- /* make sure the first and last chars aren't '.' */
- if (*hname == '.' || hname[strlen (hname) - 1] == '.')
- return FALSE;
-
- return strchr (hname, '.') != NULL;
-}
-
-static GtkWidget *
-get_focused_widget (GtkWidget *def, ...)
-{
- GtkWidget *widget, *ret = NULL;
- va_list args;
-
- va_start (args, def);
- widget = va_arg (args, GtkWidget *);
- while (widget) {
- if (GTK_WIDGET_HAS_FOCUS (widget)) {
- ret = widget;
- break;
- }
-
- widget = va_arg (args, GtkWidget *);
- }
- va_end (args);
-
- if (ret)
- return ret;
- else
- return def;
-}
-
-gboolean
-mail_account_gui_identity_complete (MailAccountGui *gui, GtkWidget **incomplete)
-{
- char *text;
-
- text = gtk_entry_get_text (gui->full_name);
- if (!text || !*text) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (gui->full_name),
- GTK_WIDGET (gui->email_address),
- NULL);
- return FALSE;
- }
-
- text = gtk_entry_get_text (gui->email_address);
- if (!text || !is_email (text)) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (gui->email_address),
- GTK_WIDGET (gui->full_name),
- NULL);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-service_complete (MailAccountGuiService *service, GtkWidget **incomplete)
-{
- const CamelProvider *prov = service->provider;
- char *text;
- GtkWidget *path;
-
- if (!prov)
- return TRUE;
-
- /* transports don't have a path */
- if (service->path)
- path = GTK_WIDGET (service->path);
- else
- path = NULL;
-
- if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST)) {
- text = gtk_entry_get_text (service->hostname);
- if (!text || !*text) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (service->hostname),
- GTK_WIDGET (service->username),
- path,
- NULL);
- return FALSE;
- }
- }
-
- if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_USER)) {
- text = gtk_entry_get_text (service->username);
- if (!text || !*text) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (service->username),
- GTK_WIDGET (service->hostname),
- path,
- NULL);
- return FALSE;
- }
- }
-
- if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH)) {
- if (!path) {
- d(printf ("aagh, transports aren't supposed to have paths.\n"));
- return TRUE;
- }
-
- text = gtk_entry_get_text (service->path);
- if (!text || !*text) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (service->path),
- GTK_WIDGET (service->hostname),
- GTK_WIDGET (service->username),
- NULL);
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-gboolean
-mail_account_gui_source_complete (MailAccountGui *gui, GtkWidget **incomplete)
-{
- return service_complete (&gui->source, incomplete);
-}
-
-gboolean
-mail_account_gui_transport_complete (MailAccountGui *gui, GtkWidget **incomplete)
-{
- if (!service_complete (&gui->transport, incomplete))
- return FALSE;
-
- /* FIXME? */
- if (gtk_toggle_button_get_active (gui->transport_needs_auth) &&
- CAMEL_PROVIDER_ALLOWS (gui->transport.provider, CAMEL_URL_PART_USER)) {
- char *text = gtk_entry_get_text (gui->transport.username);
-
- if (!text || !*text) {
- if (incomplete)
- *incomplete = get_focused_widget (GTK_WIDGET (gui->transport.username),
- GTK_WIDGET (gui->transport.hostname),
- NULL);
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
-gboolean
-mail_account_gui_management_complete (MailAccountGui *gui, GtkWidget **incomplete)
-{
- char *text;
-
- text = gtk_entry_get_text (gui->account_name);
- if (text && *text)
- return TRUE;
-
- if (incomplete)
- *incomplete = GTK_WIDGET (gui->account_name);
-
- return FALSE;
-}
-
-
-static void
-service_authtype_changed (GtkWidget *widget, gpointer user_data)
-{
- MailAccountGuiService *service = user_data;
- CamelServiceAuthType *authtype;
-
- service->authitem = widget;
- authtype = gtk_object_get_data (GTK_OBJECT (widget), "authtype");
-
- gtk_widget_set_sensitive (GTK_WIDGET (service->remember), authtype->need_password);
-}
-
-static void
-build_auth_menu (MailAccountGuiService *service, GList *all_authtypes,
- GList *supported_authtypes, gboolean check_supported)
-{
- GtkWidget *menu, *item, *first = NULL;
- CamelServiceAuthType *current, *authtype, *sauthtype;
- int history = 0, i;
- GList *l, *s;
-
- if (service->authitem)
- current = gtk_object_get_data (GTK_OBJECT (service->authitem), "authtype");
- else
- current = NULL;
-
- service->authitem = NULL;
-
- menu = gtk_menu_new ();
-
- for (l = all_authtypes, i = 0; l; l = l->next, i++) {
- authtype = l->data;
-
- item = gtk_menu_item_new_with_label (_(authtype->name));
- for (s = supported_authtypes; s; s = s->next) {
- sauthtype = s->data;
- if (!strcmp (authtype->name, sauthtype->name))
- break;
- }
-
- if (check_supported && !s) {
- gtk_widget_set_sensitive (item, FALSE);
- } else if (current && !strcmp (authtype->name, current->name)) {
- first = item;
- history = i;
- } else if (!first) {
- first = item;
- history = i;
- }
-
- gtk_object_set_data (GTK_OBJECT (item), "authtype", authtype);
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- service_authtype_changed, service);
-
- gtk_menu_append (GTK_MENU (menu), item);
-
- gtk_widget_show (item);
- }
-
- gtk_option_menu_remove_menu (service->authtype);
- gtk_option_menu_set_menu (service->authtype, menu);
-
- if (first) {
- gtk_option_menu_set_history (service->authtype, history);
- gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", service);
- }
-}
-
-static void
-source_type_changed (GtkWidget *widget, gpointer user_data)
-{
- MailAccountGui *gui = user_data;
- GtkWidget *file_entry, *label, *frame, *dwidget = NULL;
- CamelProvider *provider;
-
- provider = gtk_object_get_data (GTK_OBJECT (widget), "provider");
-
- gui->source.provider = provider;
-
- if (provider)
- gtk_label_set_text (gui->source.description, provider->description);
- else
- gtk_label_set_text (gui->source.description, "");
-
- frame = glade_xml_get_widget (gui->xml, "source_frame");
- if (provider) {
- gtk_widget_show (frame);
-
- /* hostname */
- label = glade_xml_get_widget (gui->xml, "source_host_label");
-
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST)) {
- dwidget = GTK_WIDGET (gui->source.hostname);
- gtk_widget_show (GTK_WIDGET (gui->source.hostname));
- gtk_widget_show (label);
- } else {
- gtk_widget_hide (GTK_WIDGET (gui->source.hostname));
- gtk_widget_hide (label);
- }
-
- /* username */
- label = glade_xml_get_widget (gui->xml, "source_user_label");
-
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_USER)) {
- if (!dwidget)
- dwidget = GTK_WIDGET (gui->source.username);
- gtk_widget_show (GTK_WIDGET (gui->source.username));
- gtk_widget_show (label);
- } else {
- gtk_widget_hide (GTK_WIDGET (gui->source.username));
- gtk_widget_hide (label);
- }
-
- /* path */
- label = glade_xml_get_widget (gui->xml, "source_path_label");
- file_entry = glade_xml_get_widget (gui->xml, "source_path_entry");
-
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PATH)) {
- if (!dwidget)
- dwidget = GTK_WIDGET (gui->source.path);
-
- if (!strcmp (provider->protocol, "mbox")
- || !strcmp(provider->protocol, "spool")) {
- char *path;
-
- if (getenv ("MAIL"))
- path = g_strdup (getenv ("MAIL"));
- else
- path = g_strdup_printf (SYSTEM_MAIL_DIR "/%s", g_get_user_name ());
- gtk_entry_set_text (gui->source.path, path);
- g_free (path);
- } else if (!strcmp (provider->protocol, "maildir") &&
- getenv ("MAILDIR")) {
- gtk_entry_set_text (gui->source.path, getenv ("MAILDIR"));
- } else {
- gtk_entry_set_text (gui->source.path, "");
- }
-
- gtk_widget_show (GTK_WIDGET (file_entry));
- gtk_widget_show (label);
- } else {
- gtk_entry_set_text (gui->source.path, "");
- gtk_widget_hide (GTK_WIDGET (file_entry));
- gtk_widget_hide (label);
- }
-
- /* ssl */
-#ifdef HAVE_SSL
- if (provider && provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL)
- gtk_widget_show (GTK_WIDGET (gui->source.use_ssl));
- else
- gtk_widget_hide (GTK_WIDGET (gui->source.use_ssl));
- gtk_widget_hide (GTK_WIDGET (gui->source.no_ssl));
-#else
- gtk_widget_hide (GTK_WIDGET (gui->source.use_ssl));
- gtk_widget_show (GTK_WIDGET (gui->source.no_ssl));
-#endif
-
- /* auth */
- frame = glade_xml_get_widget (gui->xml, "source_auth_frame");
- if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
- build_auth_menu (&gui->source, provider->authtypes, NULL, FALSE);
- gtk_widget_show (frame);
- } else
- gtk_widget_hide (frame);
- } else {
- gtk_widget_hide (frame);
- frame = glade_xml_get_widget (gui->xml, "source_auth_frame");
- gtk_widget_hide (frame);
- }
-
- gtk_signal_emit_by_name (GTK_OBJECT (gui->source.username), "changed");
-
- if (dwidget)
- gtk_widget_grab_focus (dwidget);
-
- mail_account_gui_build_extra_conf (gui, gui && gui->account && gui->account->source ? gui->account->source->url : NULL);
-}
-
-
-static void
-transport_needs_auth_toggled (GtkToggleButton *toggle, gpointer data)
-{
- MailAccountGui *gui = data;
- gboolean need = gtk_toggle_button_get_active (toggle);
- GtkWidget *widget;
-
- widget = glade_xml_get_widget (gui->xml, "transport_auth_frame");
- gtk_widget_set_sensitive (widget, need);
- if (need)
- service_changed (NULL, &gui->transport);
-}
-
-static void
-transport_type_changed (GtkWidget *widget, gpointer user_data)
-{
- MailAccountGui *gui = user_data;
- CamelProvider *provider;
- GtkWidget *label, *frame;
-
- provider = gtk_object_get_data (GTK_OBJECT (widget), "provider");
- gui->transport.provider = provider;
-
- /* description */
- if (provider)
- gtk_label_set_text (gui->transport.description, provider->description);
- else
- gtk_label_set_text (gui->transport.description, "");
-
- frame = glade_xml_get_widget (gui->xml, "transport_frame");
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST) ||
- (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH) &&
- !CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_AUTH))) {
- gtk_widget_show (frame);
-
- label = glade_xml_get_widget (gui->xml, "transport_host_label");
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST)) {
- gtk_widget_grab_focus (GTK_WIDGET (gui->transport.hostname));
- gtk_widget_show (GTK_WIDGET (gui->transport.hostname));
- gtk_widget_show (label);
- } else {
- gtk_widget_hide (GTK_WIDGET (gui->transport.hostname));
- gtk_widget_hide (label);
- }
-
- /* ssl */
-#ifdef HAVE_SSL
- if (provider && provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL)
- gtk_widget_show (GTK_WIDGET (gui->transport.use_ssl));
- else
- gtk_widget_hide (GTK_WIDGET (gui->transport.use_ssl));
- gtk_widget_hide (GTK_WIDGET (gui->transport.no_ssl));
-#else
- gtk_widget_hide (GTK_WIDGET (gui->transport.use_ssl));
- gtk_widget_show (GTK_WIDGET (gui->transport.no_ssl));
-#endif
-
- /* auth */
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH) &&
- !CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_AUTH))
- gtk_widget_show (GTK_WIDGET (gui->transport_needs_auth));
- else
- gtk_widget_hide (GTK_WIDGET (gui->transport_needs_auth));
- } else
- gtk_widget_hide (frame);
-
- frame = glade_xml_get_widget (gui->xml, "transport_auth_frame");
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
- gtk_widget_show (frame);
-
- label = glade_xml_get_widget (gui->xml, "transport_user_label");
- if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_USER)) {
- gtk_widget_show (GTK_WIDGET (gui->transport.username));
- gtk_widget_show (label);
- } else {
- gtk_widget_hide (GTK_WIDGET (gui->transport.username));
- gtk_widget_hide (label);
- }
-
- build_auth_menu (&gui->transport, provider->authtypes, NULL, FALSE);
- transport_needs_auth_toggled (gui->transport_needs_auth, gui);
- } else
- gtk_widget_hide (frame);
-
- gtk_signal_emit_by_name (GTK_OBJECT (gui->transport.hostname), "changed");
-}
-
-static void
-service_changed (GtkEntry *entry, gpointer user_data)
-{
- MailAccountGuiService *service = user_data;
-
- gtk_widget_set_sensitive (GTK_WIDGET (service->check_supported),
- service_complete (service, NULL));
-}
-
-static void
-service_check_supported (GtkButton *button, gpointer user_data)
-{
- MailAccountGuiService *gsvc = user_data;
- MailConfigService *service;
- GList *authtypes = NULL;
-
- service = g_new0 (MailConfigService, 1);
- save_service (gsvc, NULL, service);
-
- if (mail_config_check_service (service->url, gsvc->provider_type, &authtypes)) {
- build_auth_menu (gsvc, gsvc->provider->authtypes, authtypes, TRUE);
- if (!authtypes) {
- /* provider doesn't support any authtypes */
- gtk_widget_set_sensitive (GTK_WIDGET (gsvc->check_supported), FALSE);
- }
- g_list_free (authtypes);
- }
-
- service_destroy (service);
-}
-
-
-static void
-toggle_sensitivity (GtkToggleButton *toggle, GtkWidget *widget)
-{
- gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (toggle));
-}
-
-static void
-setup_toggle (GtkWidget *widget, const char *depname, MailAccountGui *gui)
-{
- GtkToggleButton *toggle;
-
- if (!strcmp (depname, "UNIMPLEMENTED")) {
- gtk_widget_set_sensitive (widget, FALSE);
- return;
- }
-
- toggle = g_hash_table_lookup (gui->extra_config, depname);
- gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
- GTK_SIGNAL_FUNC (toggle_sensitivity),
- widget);
- toggle_sensitivity (toggle, widget);
-}
-
-void
-mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
-{
- CamelURL *url;
- GtkWidget *mailcheck_frame, *main_vbox, *cur_vbox;
- CamelProviderConfEntry *entries;
- GList *children, *child;
- char *name;
- int i;
-
- if (url_string)
- url = camel_url_new (url_string, NULL);
- else
- url = NULL;
-
- main_vbox = glade_xml_get_widget (gui->xml, "extra_vbox");
-
- mailcheck_frame = glade_xml_get_widget (gui->xml, "extra_mailcheck_frame");
-
- /* Remove any additional mailcheck items. */
- children = gtk_container_children (GTK_CONTAINER (mailcheck_frame));
- if (children) {
- cur_vbox = children->data;
- g_list_free (children);
- children = gtk_container_children (GTK_CONTAINER (cur_vbox));
- for (child = children; child; child = child->next) {
- if (child != children) {
- gtk_container_remove (GTK_CONTAINER (cur_vbox),
- child->data);
- }
- }
- g_list_free (children);
- }
-
- /* Remove the contents of the extra_vbox except for the
- * mailcheck_frame.
- */
- children = gtk_container_children (GTK_CONTAINER (main_vbox));
- for (child = children; child; child = child->next) {
- if (child != children) {
- gtk_container_remove (GTK_CONTAINER (main_vbox),
- child->data);
- }
- }
- g_list_free (children);
-
- if (!gui->source.provider) {
- gtk_widget_set_sensitive (main_vbox, FALSE);
- if (url)
- camel_url_free (url);
- return;
- } else
- gtk_widget_set_sensitive (main_vbox, TRUE);
-
- /* Set up our hash table. */
- if (gui->extra_config)
- g_hash_table_destroy (gui->extra_config);
- gui->extra_config = g_hash_table_new (g_str_hash, g_str_equal);
-
- entries = gui->source.provider->extra_conf;
- if (!entries)
- goto done;
-
- cur_vbox = main_vbox;
- for (i = 0; ; i++) {
- switch (entries[i].type) {
- case CAMEL_PROVIDER_CONF_SECTION_START:
- {
- GtkWidget *frame;
-
- if (entries[i].name && !strcmp (entries[i].name, "mailcheck"))
- cur_vbox = glade_xml_get_widget (gui->xml, "extra_mailcheck_vbox");
- else {
- frame = gtk_frame_new (_(entries[i].text));
- gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
- cur_vbox = gtk_vbox_new (FALSE, 4);
- gtk_container_set_border_width (GTK_CONTAINER (cur_vbox), 4);
- gtk_container_add (GTK_CONTAINER (frame), cur_vbox);
- }
- break;
- }
- case CAMEL_PROVIDER_CONF_SECTION_END:
- cur_vbox = main_vbox;
- break;
-
- case CAMEL_PROVIDER_CONF_CHECKBOX:
- {
- GtkWidget *checkbox;
- gboolean active;
-
- checkbox = gtk_check_button_new_with_label (_(entries[i].text));
- if (url)
- active = camel_url_get_param (url, entries[i].name) != NULL;
- else
- active = atoi (entries[i].value);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), active);
- gtk_box_pack_start (GTK_BOX (cur_vbox), checkbox, FALSE, FALSE, 0);
- g_hash_table_insert (gui->extra_config, entries[i].name, checkbox);
- if (entries[i].depname)
- setup_toggle (checkbox, entries[i].depname, gui);
- break;
- }
-
- case CAMEL_PROVIDER_CONF_ENTRY:
- {
- GtkWidget *hbox, *label, *entry;
- const char *text;
-
- hbox = gtk_hbox_new (FALSE, 8);
- label = gtk_label_new (_(entries[i].text));
- entry = gtk_entry_new ();
- if (url)
- text = camel_url_get_param (url, entries[i].name);
- else
- text = entries[i].value;
- if (text)
- gtk_entry_set_text (GTK_ENTRY (entry), text);
-
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (cur_vbox), hbox, FALSE, FALSE, 0);
- g_hash_table_insert (gui->extra_config, entries[i].name, entry);
- if (entries[i].depname) {
- setup_toggle (entry, entries[i].depname, gui);
- setup_toggle (label, entries[i].depname, gui);
- }
- break;
- }
-
- case CAMEL_PROVIDER_CONF_CHECKSPIN:
- {
- GtkWidget *hbox, *checkbox, *spin, *label;
- GtkObject *adj;
- char *data, *pre, *post, *p;
- double min, def, max;
- gboolean enable;
-
- data = _(entries[i].text);
- p = strstr (data, "%s");
- g_return_if_fail (p != NULL);
-
- pre = g_strndup (data, p - data);
- post = p + 2;
-
- data = entries[i].value;
- enable = *data++ == 'y';
- g_return_if_fail (*data == ':');
- min = strtod (++data, &data);
- g_return_if_fail (*data == ':');
- def = strtod (++data, &data);
- g_return_if_fail (*data == ':');
- max = strtod (++data, NULL);
-
- if (url) {
- const char *val;
-
- val = camel_url_get_param (url, entries[i].name);
- if (!val)
- enable = FALSE;
- else {
- enable = TRUE;
- def = atof (val);
- }
- }
-
- hbox = gtk_hbox_new (FALSE, 0);
- checkbox = gtk_check_button_new_with_label (pre);
- g_free (pre);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), enable);
- adj = gtk_adjustment_new (def, min, max, 1, 1, 1);
- spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
- label = gtk_label_new (post);
-
- gtk_box_pack_start (GTK_BOX (hbox), checkbox, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 4);
-
- gtk_box_pack_start (GTK_BOX (cur_vbox), hbox, FALSE, FALSE, 0);
- g_hash_table_insert (gui->extra_config, entries[i].name, checkbox);
- name = g_strdup_printf ("%s_value", entries[i].name);
- g_hash_table_insert (gui->extra_config, name, spin);
- if (entries[i].depname) {
- setup_toggle (checkbox, entries[i].depname, gui);
- setup_toggle (spin, entries[i].depname, gui);
- setup_toggle (label, entries[i].depname, gui);
- }
- break;
- }
-
- case CAMEL_PROVIDER_CONF_END:
- goto done;
- }
- }
-
- done:
- gtk_widget_show_all (main_vbox);
- if (url)
- camel_url_free (url);
-}
-
-static void
-extract_values (MailAccountGuiService *source, GHashTable *extra_config, CamelURL *url)
-{
- CamelProviderConfEntry *entries;
- GtkToggleButton *toggle;
- GtkEntry *entry;
- GtkSpinButton *spin;
- char *name;
- int i;
-
- if (!source->provider || !source->provider->extra_conf)
- return;
- entries = source->provider->extra_conf;
-
- for (i = 0; ; i++) {
- if (entries[i].depname) {
- toggle = g_hash_table_lookup (extra_config, entries[i].depname);
- if (!toggle || !gtk_toggle_button_get_active (toggle))
- continue;
- }
-
- switch (entries[i].type) {
- case CAMEL_PROVIDER_CONF_CHECKBOX:
- toggle = g_hash_table_lookup (extra_config, entries[i].name);
- if (gtk_toggle_button_get_active (toggle))
- camel_url_set_param (url, entries[i].name, "");
- break;
-
- case CAMEL_PROVIDER_CONF_ENTRY:
- entry = g_hash_table_lookup (extra_config, entries[i].name);
- camel_url_set_param (url, entries[i].name, gtk_entry_get_text (entry));
- break;
-
- case CAMEL_PROVIDER_CONF_CHECKSPIN:
- toggle = g_hash_table_lookup (extra_config, entries[i].name);
- if (!gtk_toggle_button_get_active (toggle))
- break;
- name = g_strdup_printf ("%s_value", entries[i].name);
- spin = g_hash_table_lookup (extra_config, name);
- g_free (name);
- name = g_strdup_printf ("%d", gtk_spin_button_get_value_as_int (spin));
- camel_url_set_param (url, entries[i].name, name);
- g_free (name);
- break;
-
- case CAMEL_PROVIDER_CONF_END:
- return;
-
- default:
- break;
- }
- }
-}
-
-
-extern EvolutionShellClient *global_shell_client;
-
-static void
-set_folder_picker_label (GtkButton *button, const char *name)
-{
- char *string;
-
- string = e_utf8_to_gtk_string (GTK_WIDGET (button), name);
- gtk_label_set_text (GTK_LABEL (GTK_BIN (button)->child), string);
- g_free (string);
-}
-
-static void
-folder_picker_clicked (GtkButton *button, gpointer user_data)
-{
- MailAccountGuiFolder *folder = user_data;
- const char *allowed_types[] = { "mail", NULL };
- char *physical_uri, *evolution_uri;
-
- physical_uri = evolution_uri = NULL;
- evolution_shell_client_user_select_folder (
- global_shell_client, _("Select Folder"), folder->uri,
- allowed_types, &evolution_uri, &physical_uri);
- if (!physical_uri || !*physical_uri) {
- g_free (physical_uri);
- g_free (evolution_uri);
- return;
- }
-
- g_free (folder->uri);
- folder->uri = physical_uri;
- g_free (folder->name);
- folder->name = g_strdup (g_basename (evolution_uri));
- g_free (evolution_uri);
- set_folder_picker_label (button, folder->name);
-}
-
-
-static gboolean
-setup_service (MailAccountGuiService *gsvc, MailConfigService *service)
-{
- CamelURL *url = camel_url_new (service->url, NULL);
- gboolean has_auth = FALSE;
-
- if (url == NULL)
- return FALSE;
-
- if (url->user && CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_USER))
- gtk_entry_set_text (gsvc->username, url->user);
-
- if (url->host && CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_HOST)) {
- char *hostname;
-
- if (url->port)
- hostname = g_strdup_printf ("%s:%d", url->host, url->port);
- else
- hostname = g_strdup (url->host);
-
- gtk_entry_set_text (gsvc->hostname, hostname);
- g_free (hostname);
- }
-
- if (url->path && CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_PATH))
- gtk_entry_set_text (gsvc->path, url->path);
-
- if (gsvc->provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) {
- gboolean use_ssl = camel_url_get_param (url, "use_ssl") != NULL;
- gtk_toggle_button_set_active (gsvc->use_ssl, use_ssl);
- }
-
- if (url->authmech && CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_AUTH)) {
- GList *children, *item;
- CamelServiceAuthType *authtype;
- int i;
-
- children = gtk_container_children (GTK_CONTAINER (gtk_option_menu_get_menu (gsvc->authtype)));
- for (item = children, i = 0; item; item = item->next, i++) {
- authtype = gtk_object_get_data (item->data, "authtype");
- if (!authtype)
- continue;
- if (!strcmp (authtype->authproto, url->authmech)) {
- gtk_option_menu_set_history (gsvc->authtype, i);
- gtk_signal_emit_by_name (item->data, "activate");
- break;
- }
- }
- g_list_free (children);
-
- has_auth = TRUE;
- }
- camel_url_free (url);
-
- gtk_toggle_button_set_active (gsvc->remember, service->save_passwd);
-
- return has_auth;
-}
-
-static gint
-provider_compare (const CamelProvider *p1, const CamelProvider *p2)
-{
- /* sort providers based on "location" (ie. local or remote) */
- if (p1->flags & CAMEL_PROVIDER_IS_REMOTE) {
- if (p2->flags & CAMEL_PROVIDER_IS_REMOTE)
- return 0;
- return -1;
- } else {
- if (p2->flags & CAMEL_PROVIDER_IS_REMOTE)
- return 1;
- return 0;
- }
-}
-
-/*
- * Signature editor
- *
- */
-
-struct _ESignatureEditor {
- MailAccountGui *gui;
- GtkWidget *win;
- GtkWidget *control;
-
- gchar *filename;
- gboolean html;
- gboolean has_changed;
-};
-typedef struct _ESignatureEditor ESignatureEditor;
-
-#define E_SIGNATURE_EDITOR(o) ((ESignatureEditor *) o)
-
-#define DEFAULT_WIDTH 600
-#define DEFAULT_HEIGHT 500
-
-enum { REPLY_YES = 0, REPLY_NO, REPLY_CANCEL };
-
-static void
-destroy_editor (ESignatureEditor *editor)
-{
- gtk_widget_destroy (editor->win);
- g_free (editor->filename);
- g_free (editor);
-}
-
-static void
-menu_file_save_error (BonoboUIComponent *uic, CORBA_Environment *ev) {
- e_notice (GTK_WINDOW (uic), GNOME_MESSAGE_BOX_ERROR,
- _("Could not save signature file."));
-
- g_warning ("Exception while saving signature (%s)",
- bonobo_exception_get_text (ev));
-}
-
-static void
-menu_file_save_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- ESignatureEditor *editor;
- Bonobo_PersistFile pfile_iface;
- CORBA_Environment ev;
-
- editor = E_SIGNATURE_EDITOR (data);
- if (editor->html) {
- CORBA_exception_init (&ev);
-
- pfile_iface = bonobo_object_client_query_interface (bonobo_widget_get_server (BONOBO_WIDGET (editor->control)),
- "IDL:Bonobo/PersistFile:1.0", NULL);
- Bonobo_PersistFile_save (pfile_iface, editor->filename, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- menu_file_save_error (uic, &ev);
-
- CORBA_exception_free (&ev);
- } else {
- BonoboStream *stream;
- CORBA_Environment ev;
- Bonobo_PersistStream pstream_iface;
-
- CORBA_exception_init (&ev);
-
- stream = bonobo_stream_open (BONOBO_IO_DRIVER_FS, editor->filename,
- Bonobo_Storage_WRITE | Bonobo_Storage_CREATE, 0);
-
- pstream_iface = bonobo_object_client_query_interface
- (bonobo_widget_get_server (BONOBO_WIDGET (editor->control)),
- "IDL:Bonobo/PersistStream:1.0", NULL);
-
- Bonobo_PersistStream_save (pstream_iface,
- (Bonobo_Stream) bonobo_object_corba_objref (BONOBO_OBJECT (stream)),
- "text/plain", &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- menu_file_save_error (uic, &ev);
-
- CORBA_exception_free (&ev);
- bonobo_object_unref (BONOBO_OBJECT (stream));
- }
-}
-
-static void
-exit_dialog_cb (int reply, ESignatureEditor *editor)
-{
- switch (reply) {
- case REPLY_YES:
- menu_file_save_cb (NULL, editor, NULL);
- destroy_editor (editor);
- break;
- case REPLY_NO:
- destroy_editor (editor);
- break;
- case REPLY_CANCEL:
- default:
- }
-}
-
-static void
-do_exit (ESignatureEditor *editor)
-{
- if (editor->has_changed) {
- GtkWidget *dialog;
- GtkWidget *label;
- gint button;
-
- dialog = gnome_dialog_new (_("Save signature"),
- GNOME_STOCK_BUTTON_YES, /* Save */
- GNOME_STOCK_BUTTON_NO, /* Don't save */
- GNOME_STOCK_BUTTON_CANCEL, /* Cancel */
- NULL);
-
- label = gtk_label_new (_("This signature has been changed, but hasn't been saved.\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 (editor->win));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- exit_dialog_cb (button, editor);
- } else
- destroy_editor (editor);
-}
-
-static void
-menu_file_close_cb (BonoboUIComponent *uic, gpointer data, const gchar *path)
-{
- ESignatureEditor *editor;
-
- editor = E_SIGNATURE_EDITOR (data);
- do_exit (editor);
-}
-
-static BonoboUIVerb verbs [] = {
-
- BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
- BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static void
-load_signature (ESignatureEditor *editor)
-{
- CORBA_Environment ev;
-
- if (editor->html) {
- Bonobo_PersistFile pfile_iface;
-
- pfile_iface = bonobo_object_client_query_interface (bonobo_widget_get_server (BONOBO_WIDGET (editor->control)),
- "IDL:Bonobo/PersistFile:1.0", NULL);
- CORBA_exception_init (&ev);
- Bonobo_PersistFile_load (pfile_iface, editor->filename, &ev);
- CORBA_exception_free (&ev);
- } else {
- Bonobo_PersistStream pstream_iface;
- BonoboStream *stream;
- gchar *data, *html;
-
- data = e_msg_composer_get_sig_file_content (editor->filename, FALSE);
- html = g_strdup_printf ("<PRE>\n%s", data);
- g_free (data);
-
- pstream_iface = bonobo_object_client_query_interface
- (bonobo_widget_get_server (BONOBO_WIDGET (editor->control)),
- "IDL:Bonobo/PersistStream:1.0", NULL);
- CORBA_exception_init (&ev);
- stream = bonobo_stream_mem_create (html, strlen (html), TRUE, FALSE);
-
- if (stream == NULL) {
- g_warning ("Couldn't create memory stream\n");
- } else {
- BonoboObject *stream_object;
- Bonobo_Stream corba_stream;
-
- stream_object = BONOBO_OBJECT (stream);
- corba_stream = bonobo_object_corba_objref (stream_object);
- Bonobo_PersistStream_load (pstream_iface, corba_stream,
- "text/html", &ev);
- }
-
- Bonobo_Unknown_unref (pstream_iface, &ev);
- CORBA_Object_release (pstream_iface, &ev);
- CORBA_exception_free (&ev);
- bonobo_object_unref (BONOBO_OBJECT (stream));
-
- g_free (html);
- }
-}
-
-static void
-launch_signature_editor (MailAccountGui *gui, const gchar *filename, gboolean html)
-{
- ESignatureEditor *editor;
- BonoboUIComponent *component;
- BonoboUIContainer *container;
- gchar *title;
-
- if (!filename || !*filename)
- return;
-
- editor = g_new0 (ESignatureEditor, 1);
-
- editor->html = html;
- editor->filename = g_strdup (filename);
-
- title = g_strdup_printf ("Edit %ssignature (%s)", html ? "HTML " : "", filename);
- editor->win = bonobo_window_new ("e-sig-editor", title);
- editor->gui = gui;
- gtk_window_set_default_size (GTK_WINDOW (editor->win), DEFAULT_WIDTH, DEFAULT_HEIGHT);
- gtk_window_set_policy (GTK_WINDOW (editor->win), FALSE, TRUE, FALSE);
- gtk_window_set_modal (GTK_WINDOW (editor->win), TRUE);
- g_free (title);
-
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (editor->win));
-
- component = bonobo_ui_component_new_default ();
- bonobo_ui_component_set_container (component, bonobo_object_corba_objref (BONOBO_OBJECT (container)));
- bonobo_ui_component_add_verb_list_with_data (component, verbs, editor);
- bonobo_ui_util_set_ui (component, EVOLUTION_DATADIR, "evolution-signature-editor.xml", "evolution-signature-editor");
-
- editor->control = bonobo_widget_new_control ("OAFIID:GNOME_GtkHTML_Editor",
- bonobo_ui_component_get_container (component));
-
- if (editor->control == NULL) {
- g_warning ("Cannot get 'OAFIID:GNOME_GtkHTML_Editor'.");
-
- destroy_editor (editor);
- return;
- }
-
- load_signature (editor);
-
- bonobo_window_set_contents (BONOBO_WINDOW (editor->win), editor->control);
- bonobo_widget_set_property (BONOBO_WIDGET (editor->control), "FormatHTML", html, NULL);
- gtk_widget_show (GTK_WIDGET (editor->win));
- gtk_widget_show (GTK_WIDGET (editor->control));
- gtk_widget_grab_focus (editor->control);
-}
-
-static void
-edit_signature (GtkWidget *w, MailAccountGui *gui)
-{
- launch_signature_editor (gui, gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->signature))), FALSE);
-}
-
-static void
-edit_html_signature (GtkWidget *w, MailAccountGui *gui)
-{
- launch_signature_editor (gui, gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->html_signature))), TRUE);
-}
-
-static void
-signature_changed (GtkWidget *entry, MailAccountGui *gui)
-{
- gtk_widget_set_sensitive (GTK_WIDGET (gui->edit_signature),
- *gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->signature))) != 0);
-}
-
-static void
-html_signature_changed (GtkWidget *entry, MailAccountGui *gui)
-{
- gtk_widget_set_sensitive (GTK_WIDGET (gui->edit_html_signature),
- *gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->html_signature))) != 0);
-}
-
-MailAccountGui *
-mail_account_gui_new (MailConfigAccount *account)
-{
- MailAccountGui *gui;
-
- gui = g_new0 (MailAccountGui, 1);
- gui->account = account;
- gui->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL);
-
- /* Management */
- gui->account_name = GTK_ENTRY (glade_xml_get_widget (gui->xml, "management_name"));
- gui->default_account = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "management_default"));
- if (account->name)
- e_utf8_gtk_entry_set_text (gui->account_name, account->name);
- if (!mail_config_get_default_account ()
- || (account == mail_config_get_default_account ()))
- gtk_toggle_button_set_active (gui->default_account, TRUE);
-
- /* Identity */
- gui->full_name = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_full_name"));
- gui->email_address = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_address"));
- gui->organization = GTK_ENTRY (glade_xml_get_widget (gui->xml, "identity_organization"));
- gui->signature = GNOME_FILE_ENTRY (glade_xml_get_widget (gui->xml, "fileentry_signature"));
- gui->html_signature = GNOME_FILE_ENTRY (glade_xml_get_widget (gui->xml, "fileentry_html_signature"));
- gui->has_html_signature = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "check_html_signature"));
- gnome_file_entry_set_default_path (gui->signature, g_get_home_dir ());
- gnome_file_entry_set_default_path (gui->html_signature, g_get_home_dir ());
- gui->edit_signature = GTK_BUTTON (glade_xml_get_widget (gui->xml, "button_edit_signature"));
- gtk_widget_set_sensitive (GTK_WIDGET (gui->edit_signature), FALSE);
- gui->edit_html_signature = GTK_BUTTON (glade_xml_get_widget (gui->xml, "button_edit_html_signature"));
- gtk_widget_set_sensitive (GTK_WIDGET (gui->edit_html_signature), FALSE);
-
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (gui->signature)), "changed", signature_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (gui->html_signature)), "changed",
- html_signature_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->edit_signature), "clicked", edit_signature, gui);
- gtk_signal_connect (GTK_OBJECT (gui->edit_html_signature), "clicked", edit_html_signature, gui);
-
- if (account->id) {
- if (account->id->name)
- e_utf8_gtk_entry_set_text (gui->full_name, account->id->name);
- if (account->id->address)
- gtk_entry_set_text (gui->email_address, account->id->address);
- if (account->id->organization)
- e_utf8_gtk_entry_set_text (gui->organization, account->id->organization);
- if (account->id->signature) {
- gnome_file_entry_set_default_path (gui->signature, account->id->signature);
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->signature)),
- account->id->signature);
- }
- if (account->id->html_signature) {
- gnome_file_entry_set_default_path (gui->html_signature, account->id->html_signature);
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (gui->html_signature)),
- account->id->html_signature);
- }
- gtk_toggle_button_set_active (gui->has_html_signature, account->id->has_html_signature);
- }
-
- /* Source */
- gui->source.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_type_omenu"));
- gui->source.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "source_description"));
- gui->source.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_host"));
- gtk_signal_connect (GTK_OBJECT (gui->source.hostname), "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
- gui->source.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_user"));
- gtk_signal_connect (GTK_OBJECT (gui->source.username), "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
- gui->source.path = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_path"));
- gtk_signal_connect (GTK_OBJECT (gui->source.path), "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
- gui->source.use_ssl = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "source_use_ssl"));
- gui->source.no_ssl = glade_xml_get_widget (gui->xml, "source_ssl_disabled");
- gui->source.authtype = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_auth_omenu"));
- gui->source.remember = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "source_remember_password"));
- gui->source.check_supported = GTK_BUTTON (glade_xml_get_widget (gui->xml, "source_check_supported"));
- gtk_signal_connect (GTK_OBJECT (gui->source.check_supported), "clicked",
- GTK_SIGNAL_FUNC (service_check_supported), &gui->source);
- gui->source_auto_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "extra_auto_check"));
- gui->source_auto_check_min = GTK_SPIN_BUTTON (glade_xml_get_widget (gui->xml, "extra_auto_check_min"));
-
- /* Transport */
- gui->transport.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_type_omenu"));
- gui->transport.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "transport_description"));
- gui->transport.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_host"));
- gtk_signal_connect (GTK_OBJECT (gui->transport.hostname), "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->transport);
- gui->transport.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_user"));
- gtk_signal_connect (GTK_OBJECT (gui->transport.username), "changed",
- GTK_SIGNAL_FUNC (service_changed), &gui->source);
- gui->transport.use_ssl = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "transport_use_ssl"));
- gui->transport.no_ssl = glade_xml_get_widget (gui->xml, "transport_ssl_disabled");
- gui->transport_needs_auth = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "transport_needs_auth"));
- gtk_signal_connect (GTK_OBJECT (gui->transport_needs_auth), "toggled", transport_needs_auth_toggled, gui);
- gui->transport.authtype = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_auth_omenu"));
- gui->transport.remember = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "transport_remember_password"));
- gui->transport.check_supported = GTK_BUTTON (glade_xml_get_widget (gui->xml, "transport_check_supported"));
- gtk_signal_connect (GTK_OBJECT (gui->transport.check_supported), "clicked",
- GTK_SIGNAL_FUNC (service_check_supported), &gui->transport);
-
- /* Drafts folder */
- gui->drafts_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "drafts_button"));
- gtk_signal_connect (GTK_OBJECT (gui->drafts_folder_button), "clicked",
- GTK_SIGNAL_FUNC (folder_picker_clicked), &gui->drafts_folder);
- if (account->drafts_folder_uri) {
- gui->drafts_folder.uri = g_strdup (account->drafts_folder_uri);
- gui->drafts_folder.name = g_strdup (account->drafts_folder_name);
- } else {
- gui->drafts_folder.uri = g_strdup (default_drafts_folder_uri);
- gui->drafts_folder.name = g_strdup (strrchr (default_drafts_folder_uri, '/') + 1);
- }
- set_folder_picker_label (gui->drafts_folder_button, gui->drafts_folder.name);
-
- /* Sent folder */
- gui->sent_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "sent_button"));
- gtk_signal_connect (GTK_OBJECT (gui->sent_folder_button), "clicked",
- GTK_SIGNAL_FUNC (folder_picker_clicked), &gui->sent_folder);
- if (account->sent_folder_uri) {
- gui->sent_folder.uri = g_strdup (account->sent_folder_uri);
- gui->sent_folder.name = g_strdup (account->sent_folder_name);
- } else {
- gui->sent_folder.uri = g_strdup (default_sent_folder_uri);
- gui->sent_folder.name = g_strdup (strrchr (default_sent_folder_uri, '/') + 1);
- }
- set_folder_picker_label (gui->sent_folder_button, gui->sent_folder.name);
-
- /* Security */
- gui->pgp_key = GTK_ENTRY (glade_xml_get_widget (gui->xml, "pgp_key"));
- if (account->pgp_key)
- e_utf8_gtk_entry_set_text (gui->pgp_key, account->pgp_key);
- gui->pgp_encrypt_to_self = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_encrypt_to_self"));
- gtk_toggle_button_set_active (gui->pgp_encrypt_to_self, account->pgp_encrypt_to_self);
- gui->pgp_always_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_always_sign"));
- gtk_toggle_button_set_active (gui->pgp_always_sign, account->pgp_always_sign);
- gui->smime_key = GTK_ENTRY (glade_xml_get_widget (gui->xml, "smime_key"));
- if (account->smime_key)
- e_utf8_gtk_entry_set_text (gui->smime_key, account->smime_key);
- gui->smime_encrypt_to_self = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "smime_encrypt_to_self"));
- gtk_toggle_button_set_active (gui->smime_encrypt_to_self, account->smime_encrypt_to_self);
- gui->smime_always_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "smime_always_sign"));
- gtk_toggle_button_set_active (gui->smime_always_sign, account->smime_always_sign);
-
-#if !defined(HAVE_NSS) || !defined(SMIME_SUPPORTED)
- {
- /* Since we don't have NSS, hide the S/MIME config options */
- GtkWidget *frame;
-
- frame = glade_xml_get_widget (gui->xml, "smime_frame");
- gtk_widget_set_sensitive (frame, FALSE);
- }
-#endif
-
- return gui;
-}
-
-void
-mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
-{
- GtkWidget *stores, *transports, *item;
- GtkWidget *fstore = NULL, *ftransport = NULL;
- int si = 0, hstore = 0, ti = 0, htransport = 0;
- int max_width = 0;
- char *max_authname = NULL;
- char *source_proto, *transport_proto;
- GList *providers, *l;
-
- if (gui->account->source && gui->account->source->url) {
- source_proto = gui->account->source->url;
- source_proto = g_strndup (source_proto, strcspn (source_proto, ":"));
- } else
- source_proto = NULL;
-
- if (gui->account->transport && gui->account->transport->url) {
- transport_proto = gui->account->transport->url;
- transport_proto = g_strndup (transport_proto, strcspn (transport_proto, ":"));
- } else
- transport_proto = NULL;
-
- /* Construct source/transport option menus */
- stores = gtk_menu_new ();
- transports = gtk_menu_new ();
- providers = camel_session_list_providers (session, TRUE);
-
- /* sort the providers, remote first */
- providers = g_list_sort (providers, (GCompareFunc) provider_compare);
-
- for (l = providers; l; l = l->next) {
- CamelProvider *provider = l->data;
-
- if (strcmp (provider->domain, "mail"))
- continue;
-
- item = NULL;
- if (provider->object_types[CAMEL_PROVIDER_STORE] && provider->flags & CAMEL_PROVIDER_IS_SOURCE) {
- item = gtk_menu_item_new_with_label (_(provider->name));
- gtk_object_set_data (GTK_OBJECT (item), "provider", provider);
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (source_type_changed),
- gui);
-
- gtk_menu_append (GTK_MENU (stores), item);
-
- gtk_widget_show (item);
-
- if (!fstore) {
- fstore = item;
- hstore = si;
- }
-
- if (source_proto && !g_strcasecmp (provider->protocol, source_proto)) {
- fstore = item;
- hstore = si;
- }
-
- si++;
- }
-
- if (provider->object_types[CAMEL_PROVIDER_TRANSPORT]) {
- item = gtk_menu_item_new_with_label (_(provider->name));
- gtk_object_set_data (GTK_OBJECT (item), "provider", provider);
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (transport_type_changed),
- gui);
-
- gtk_menu_append (GTK_MENU (transports), item);
-
- gtk_widget_show (item);
-
- if (!ftransport) {
- ftransport = item;
- htransport = ti;
- }
-
- if (transport_proto && !g_strcasecmp (provider->protocol, transport_proto)) {
- ftransport = item;
- htransport = ti;
- }
-
- ti++;
- }
-
- if (item && provider->authtypes) {
- GdkFont *font = GTK_WIDGET (item)->style->font;
- CamelServiceAuthType *at;
- int width;
- GList *a;
-
- for (a = provider->authtypes; a; a = a->next) {
- at = a->data;
-
- width = gdk_string_width (font, _(at->name));
- if (width > max_width) {
- max_authname = _(at->name);
- max_width = width;
- }
- }
- }
- }
- g_list_free (providers);
-
- /* add a "None" option to the stores menu */
- item = gtk_menu_item_new_with_label (_("None"));
- gtk_object_set_data (GTK_OBJECT (item), "provider", NULL);
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (source_type_changed),
- gui);
-
- gtk_menu_append (GTK_MENU (stores), item);
-
- gtk_widget_show (item);
-
- if (!fstore || !source_proto) {
- fstore = item;
- hstore = si;
- }
-
- /* set the menus on the optionmenus */
- gtk_option_menu_remove_menu (gui->source.type);
- gtk_option_menu_set_menu (gui->source.type, stores);
- gtk_option_menu_set_history (gui->source.type, hstore);
-
- gtk_option_menu_remove_menu (gui->transport.type);
- gtk_option_menu_set_menu (gui->transport.type, transports);
- gtk_option_menu_set_history (gui->transport.type, htransport);
-
- /* Force the authmenus to the width of the widest element */
- if (max_authname) {
- GtkWidget *menu;
- GtkRequisition size_req;
-
- menu = gtk_menu_new ();
- item = gtk_menu_item_new_with_label (max_authname);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show_all (menu);
- gtk_option_menu_set_menu (gui->source.authtype, menu);
- gtk_widget_show (GTK_WIDGET (gui->source.authtype));
- gtk_widget_size_request (GTK_WIDGET (gui->source.authtype),
- &size_req);
-
- gtk_widget_set_usize (GTK_WIDGET (gui->source.authtype),
- size_req.width, -1);
- gtk_widget_set_usize (GTK_WIDGET (gui->transport.authtype),
- size_req.width, -1);
- }
-
- if (top != NULL) {
- gtk_widget_show_all (top);
- }
-
- if (fstore)
- gtk_signal_emit_by_name (GTK_OBJECT (fstore), "activate", gui);
-
- if (ftransport)
- gtk_signal_emit_by_name (GTK_OBJECT (ftransport), "activate", gui);
-
- if (source_proto) {
- setup_service (&gui->source, gui->account->source);
- gui->source.provider_type = CAMEL_PROVIDER_STORE;
- g_free (source_proto);
- if (gui->account->source->auto_check) {
- gtk_toggle_button_set_active (gui->source_auto_check, TRUE);
- gtk_spin_button_set_value (gui->source_auto_check_min,
- gui->account->source->auto_check_time);
- }
- }
-
- if (transport_proto) {
- if (setup_service (&gui->transport, gui->account->transport))
- gtk_toggle_button_set_active (gui->transport_needs_auth, TRUE);
- gui->transport.provider_type = CAMEL_PROVIDER_TRANSPORT;
- g_free (transport_proto);
- }
-}
-
-static void
-save_service (MailAccountGuiService *gsvc, GHashTable *extra_config,
- MailConfigService *service)
-{
- CamelURL *url;
- char *str;
-
- if (!gsvc->provider) {
- g_free (service->url);
- service->url = NULL;
- return;
- }
-
- url = g_new0 (CamelURL, 1);
- url->protocol = g_strdup (gsvc->provider->protocol);
-
- if (CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_USER)) {
- str = gtk_entry_get_text (gsvc->username);
- if (str && *str)
- url->user = g_strdup (str);
- }
-
- if (CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_AUTH) &&
- GTK_WIDGET_IS_SENSITIVE (gsvc->authtype) && gsvc->authitem && url->user) {
- CamelServiceAuthType *authtype;
-
- authtype = gtk_object_get_data (GTK_OBJECT (gsvc->authitem), "authtype");
- if (authtype && authtype->authproto && *authtype->authproto)
- url->authmech = g_strdup (authtype->authproto);
-
- service->save_passwd = gtk_toggle_button_get_active (gsvc->remember);
- }
-
- if (CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_HOST)) {
- char *pport;
-
- str = gtk_entry_get_text (gsvc->hostname);
- if (str && *str) {
- pport = strchr (str, ':');
- if (pport) {
- url->host = g_strndup (str, pport - str);
- url->port = atoi (pport + 1);
- } else
- url->host = g_strdup (str);
- }
- }
-
- if (CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_PATH)) {
- str = gtk_entry_get_text (gsvc->path);
- if (str && *str)
- url->path = g_strdup (str);
- }
-
- if (gsvc->provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) {
- if (gtk_toggle_button_get_active (gsvc->use_ssl))
- camel_url_set_param (url, "use_ssl", "");
- }
-
- if (extra_config)
- extract_values (gsvc, extra_config, url);
-
- g_free (service->url);
- service->url = camel_url_to_string (url, 0);
-
- /* Temporary until keep_on_server moves into the POP provider */
- if (camel_url_get_param (url, "keep_on_server"))
- service->keep_on_server = TRUE;
-
- camel_url_free (url);
-}
-
-gboolean
-mail_account_gui_save (MailAccountGui *gui)
-{
- MailConfigAccount *account = gui->account;
- const MailConfigAccount *old_account;
- CamelProvider *provider = NULL;
- CamelURL *source_url = NULL, *url;
- gchar *new_name;
- gboolean old_enabled;
-
- if (!mail_account_gui_identity_complete (gui, NULL) ||
- !mail_account_gui_source_complete (gui, NULL) ||
- !mail_account_gui_transport_complete (gui, NULL) ||
- !mail_account_gui_management_complete (gui, NULL))
- return FALSE;
-
- /* this would happen at an inconvenient time in the druid,
- * but the druid performs its own check so this can't happen
- * here. */
-
- new_name = e_utf8_gtk_entry_get_text (gui->account_name);
- old_account = mail_config_get_account_by_name (new_name);
-
- if (old_account && old_account != account) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("You may not create two accounts with the same name."));
- return FALSE;
- }
-
- g_free (account->name);
- account->name = new_name;
-
- /* construct the identity */
- identity_destroy (account->id);
- account->id = g_new0 (MailConfigIdentity, 1);
- account->id->name = e_utf8_gtk_entry_get_text (gui->full_name);
- account->id->address = e_utf8_gtk_entry_get_text (gui->email_address);
- account->id->organization = e_utf8_gtk_entry_get_text (gui->organization);
- account->id->signature = gnome_file_entry_get_full_path (gui->signature, TRUE);
- account->id->html_signature = gnome_file_entry_get_full_path (gui->html_signature, TRUE);
- account->id->has_html_signature = gtk_toggle_button_get_active (gui->has_html_signature);
-
- old_enabled = account->source && account->source->enabled;
- service_destroy (account->source);
- account->source = g_new0 (MailConfigService, 1);
- save_service (&gui->source, gui->extra_config, account->source);
- if (account->source && account->source->url) {
- provider = camel_session_get_provider (session, account->source->url, NULL);
- source_url = provider ? camel_url_new (account->source->url, NULL) : NULL;
-
- if (old_enabled)
- account->source->enabled = TRUE;
- }
- account->source->auto_check = gtk_toggle_button_get_active (gui->source_auto_check);
- if (account->source->auto_check)
- account->source->auto_check_time = gtk_spin_button_get_value_as_int (gui->source_auto_check_min);
-
- service_destroy (account->transport);
- account->transport = g_new0 (MailConfigService, 1);
- save_service (&gui->transport, NULL, account->transport);
-
- /* Check to make sure that the Drafts folder uri is "valid" before assigning it */
- url = source_url ? camel_url_new (gui->drafts_folder.uri, NULL) : NULL;
- if (mail_config_get_account_by_source_url (gui->drafts_folder.uri) ||
- (url && provider->url_equal (source_url, url))) {
- g_free (account->drafts_folder_name);
- account->drafts_folder_name = g_strdup (gui->drafts_folder.name);
- g_free (account->drafts_folder_uri);
- account->drafts_folder_uri = g_strdup (gui->drafts_folder.uri);
- } else {
- /* assign defaults - the uri is unknown to us (probably pointed to an old source url) */
- g_free (account->drafts_folder_name);
- account->drafts_folder_name = g_strdup (strrchr (default_drafts_folder_uri, '/') + 1);
- g_free (account->drafts_folder_uri);
- account->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
- }
-
- if (url)
- camel_url_free (url);
-
- /* Check to make sure that the Sent folder uri is "valid" before assigning it */
- url = camel_url_new (gui->drafts_folder.uri, NULL);
- if (mail_config_get_account_by_source_url (gui->sent_folder.uri) ||
- (url && provider->url_equal (source_url, url))) {
- g_free (account->sent_folder_name);
- account->sent_folder_name = g_strdup (gui->sent_folder.name);
- g_free (account->sent_folder_uri);
- account->sent_folder_uri = g_strdup (gui->sent_folder.uri);
- } else {
- /* assign defaults - the uri is unknown to us (probably pointed to an old source url) */
- g_free (account->sent_folder_name);
- account->sent_folder_name = g_strdup (strrchr (default_sent_folder_uri, '/') + 1);
- g_free (account->sent_folder_uri);
- account->sent_folder_uri = g_strdup (default_sent_folder_uri);
- }
-
- if (url)
- camel_url_free (url);
-
- if (source_url)
- camel_url_free (source_url);
-
- g_free (account->pgp_key);
- account->pgp_key = e_utf8_gtk_entry_get_text (gui->pgp_key);
- account->pgp_encrypt_to_self = gtk_toggle_button_get_active (gui->pgp_encrypt_to_self);
- account->pgp_always_sign = gtk_toggle_button_get_active (gui->pgp_always_sign);
- g_free (account->smime_key);
- account->smime_key = e_utf8_gtk_entry_get_text (gui->smime_key);
- account->smime_encrypt_to_self = gtk_toggle_button_get_active (gui->smime_encrypt_to_self);
- account->smime_always_sign = gtk_toggle_button_get_active (gui->smime_always_sign);
-
- if (!mail_config_find_account (account))
- mail_config_add_account (account);
- if (gtk_toggle_button_get_active (gui->default_account))
- mail_config_set_default_account (account);
-
- mail_autoreceive_setup_account (account->source);
-
- return TRUE;
-}
-
-void
-mail_account_gui_destroy (MailAccountGui *gui)
-{
- gtk_object_unref (GTK_OBJECT (gui->xml));
- if (gui->extra_config)
- g_hash_table_destroy (gui->extra_config);
- g_free (gui->drafts_folder.name);
- g_free (gui->drafts_folder.uri);
- g_free (gui->sent_folder.name);
- g_free (gui->sent_folder.uri);
- g_free (gui);
-}
diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h
deleted file mode 100644
index 5536182d60..0000000000
--- a/mail/mail-account-gui.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@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 MAIL_ACCOUNT_GUI_H
-#define MAIL_ACCOUNT_GUI_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtk.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <glade/glade-xml.h>
-#include <camel/camel-provider.h>
-
-#include "mail-config.h"
-
-typedef struct {
- GtkOptionMenu *type;
- GtkLabel *description;
- GtkEntry *hostname;
- GtkEntry *username;
- GtkEntry *path;
- GtkToggleButton *use_ssl;
- GtkWidget *no_ssl;
- GtkOptionMenu *authtype;
- GtkWidget *authitem;
- GtkToggleButton *remember;
- GtkButton *check_supported;
-
- CamelProvider *provider;
- CamelProviderType provider_type;
-} MailAccountGuiService;
-
-typedef struct {
- char *name, *uri;
-} MailAccountGuiFolder;
-
-typedef struct {
- GtkWidget *top;
- MailConfigAccount *account;
- GladeXML *xml;
-
- /* identity */
- GtkEntry *full_name;
- GtkEntry *email_address;
- GtkEntry *organization;
- GnomeFileEntry *signature;
- GnomeFileEntry *html_signature;
- GtkToggleButton *has_html_signature;
- GtkButton *edit_signature;
- GtkButton *edit_html_signature;
-
- /* incoming mail */
- MailAccountGuiService source;
- GtkToggleButton *source_auto_check;
- GtkSpinButton *source_auto_check_min;
-
- /* extra incoming config */
- GHashTable *extra_config;
-
- /* outgoing mail */
- MailAccountGuiService transport;
- GtkToggleButton *transport_needs_auth;
-
- /* account management */
- GtkEntry *account_name;
- GtkToggleButton *default_account;
-
- /* special folders */
- GtkButton *drafts_folder_button;
- MailAccountGuiFolder drafts_folder;
- GtkButton *sent_folder_button;
- MailAccountGuiFolder sent_folder;
-
- /* Security */
- GtkEntry *pgp_key;
- GtkToggleButton *pgp_encrypt_to_self;
- GtkToggleButton *pgp_always_sign;
- GtkEntry *smime_key;
- GtkToggleButton *smime_encrypt_to_self;
- GtkToggleButton *smime_always_sign;
-} MailAccountGui;
-
-
-MailAccountGui *mail_account_gui_new (MailConfigAccount *account);
-void mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top);
-gboolean mail_account_gui_save (MailAccountGui *gui);
-void mail_account_gui_destroy (MailAccountGui *gui);
-
-gboolean mail_account_gui_identity_complete (MailAccountGui *gui, GtkWidget **incomplete);
-gboolean mail_account_gui_source_complete (MailAccountGui *gui, GtkWidget **incomplete);
-gboolean mail_account_gui_transport_complete (MailAccountGui *gui, GtkWidget **incomplete);
-gboolean mail_account_gui_management_complete (MailAccountGui *gui, GtkWidget **incomplete);
-
-void mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNT_GUI_H */
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
deleted file mode 100644
index 0bc9191743..0000000000
--- a/mail/mail-accounts.c
+++ /dev/null
@@ -1,948 +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 <stdlib.h>
-#include <string.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <camel/camel-url.h>
-#include <camel/camel-pgp-context.h>
-
-#include <gal/widgets/e-unicode.h>
-
-#include "widgets/misc/e-charset-picker.h"
-
-#include "mail.h"
-#include "mail-accounts.h"
-#include "mail-config.h"
-#include "mail-config-druid.h"
-#include "mail-account-editor.h"
-#ifdef ENABLE_NNTP
-#include "mail-account-editor-news.h"
-#endif
-#include "mail-send-recv.h"
-#include "mail-session.h"
-
-#include "art/mark.xpm"
-
-static void mail_accounts_dialog_class_init (MailAccountsDialogClass *class);
-static void mail_accounts_dialog_init (MailAccountsDialog *dialog);
-static void mail_accounts_dialog_finalise (GtkObject *obj);
-static void mail_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data);
-
-
-static GnomeDialogClass *parent_class;
-
-GtkType
-mail_accounts_dialog_get_type ()
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "MailAccountsDialog",
- sizeof (MailAccountsDialog),
- sizeof (MailAccountsDialogClass),
- (GtkClassInitFunc) mail_accounts_dialog_class_init,
- (GtkObjectInitFunc) mail_accounts_dialog_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gnome_dialog_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-mail_accounts_dialog_class_init (MailAccountsDialogClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (gnome_dialog_get_type ());
-
- object_class->finalize = mail_accounts_dialog_finalise;
- /* override methods */
-
-}
-
-static void
-mail_accounts_dialog_init (MailAccountsDialog *o)
-{
- GdkPixbuf *pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm);
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &(o->mark_pixmap), &(o->mark_bitmap), 128);
- gdk_pixbuf_unref (pixbuf);
-}
-
-static void
-mail_accounts_dialog_finalise (GtkObject *obj)
-{
- MailAccountsDialog *dialog = (MailAccountsDialog *) obj;
-
- gtk_object_unref (GTK_OBJECT (dialog->gui));
- gdk_pixmap_unref (dialog->mark_pixmap);
- gdk_bitmap_unref (dialog->mark_bitmap);
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-static void
-load_accounts (MailAccountsDialog *dialog)
-{
- const MailConfigAccount *account, *default_account;
- const GSList *node = dialog->accounts;
- int i = 0;
-
- gtk_clist_freeze (dialog->mail_accounts);
-
- gtk_clist_clear (dialog->mail_accounts);
-
- default_account = mail_config_get_default_account ();
-
- while (node) {
- CamelURL *url;
- char *text[3];
-
- account = node->data;
-
- if (account->source && account->source->url)
- url = camel_url_new (account->source->url, NULL);
- else
- url = NULL;
-
- text[0] = "";
- text[1] = e_utf8_to_gtk_string (GTK_WIDGET (dialog->mail_accounts), account->name);
- text[2] = g_strdup_printf ("%s%s", url && url->protocol ? url->protocol : _("None"),
- (account == default_account) ? _(" (default)") : "");
-
- if (url)
- camel_url_free (url);
-
- gtk_clist_append (dialog->mail_accounts, text);
- g_free (text[1]);
- g_free (text[2]);
-
- if (account->source->enabled)
- gtk_clist_set_pixmap (dialog->mail_accounts, i, 0,
- dialog->mark_pixmap,
- dialog->mark_bitmap);
-
- /* set the account on the row */
- gtk_clist_set_row_data (dialog->mail_accounts, i, (gpointer) account);
-
- node = node->next;
- i++;
- }
-
- gtk_clist_thaw (dialog->mail_accounts);
-
- /*
- * The selection gets cleared when we rebuild the clist, but no
- * unselect event is emitted. So we simulate it here.
- * I hate the clist.
- */
- mail_unselect (dialog->mail_accounts, 0, 0, NULL, dialog);
-}
-
-
-/* mail callbacks */
-static void
-mail_select (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- MailConfigAccount *account = gtk_clist_get_row_data (clist, row);
-
- dialog->accounts_row = row;
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), TRUE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_delete), TRUE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_default), TRUE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_able), TRUE);
- if (account->source && account->source->enabled)
- gtk_label_set_text (GTK_LABEL (GTK_BIN (dialog->mail_able)->child), _("Disable"));
- else
- gtk_label_set_text (GTK_LABEL (GTK_BIN (dialog->mail_able)->child), _("Enable"));
-}
-
-static void
-mail_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data)
-{
- MailAccountsDialog *dialog = data;
-
- dialog->accounts_row = -1;
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_delete), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_default), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_able), FALSE);
-
- /*
- * If an insensitive button in a button box has the focus, and if you hit tab,
- * there is a segfault. I think that this might be a gtk bug. Anyway, this
- * is a workaround.
- */
- gtk_widget_grab_focus (GTK_WIDGET (dialog->mail_add));
-}
-
-static void
-mail_add_finished (GtkWidget *widget, gpointer data)
-{
- /* Either Cancel or Finished was clicked in the druid so reload the accounts */
- MailAccountsDialog *dialog = data;
-
- dialog->accounts = mail_config_get_accounts ();
- load_accounts (dialog);
-}
-
-static void
-mail_add (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- MailConfigDruid *druid;
-
- druid = mail_config_druid_new (dialog->shell);
- gtk_signal_connect (GTK_OBJECT (druid), "destroy",
- GTK_SIGNAL_FUNC (mail_add_finished), dialog);
-
- gtk_widget_show (GTK_WIDGET (druid));
-}
-
-static void
-mail_editor_destroyed (GtkWidget *widget, gpointer data)
-{
- load_accounts (MAIL_ACCOUNTS_DIALOG (data));
-}
-
-static void
-mail_edit (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
-
- if (dialog->accounts_row >= 0) {
- MailConfigAccount *account;
- MailAccountEditor *editor;
-
- account = gtk_clist_get_row_data (dialog->mail_accounts, dialog->accounts_row);
- editor = mail_account_editor_new (account);
- gtk_signal_connect (GTK_OBJECT (editor), "destroy",
- GTK_SIGNAL_FUNC (mail_editor_destroyed),
- dialog);
- gtk_widget_show (GTK_WIDGET (editor));
- }
-}
-
-static void
-mail_double_click (GtkWidget *widget, GdkEventButton *event, gpointer data)
-{
- if (event->type == GDK_2BUTTON_PRESS)
- mail_edit (NULL, data);
-}
-
-static void
-mail_delete (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- MailConfigAccount *account;
- GnomeDialog *confirm;
- int ans;
-
- if (dialog->accounts_row < 0)
- return;
-
- confirm = GNOME_DIALOG (gnome_message_box_new (_("Are you sure you want to delete this account?"),
- GNOME_MESSAGE_BOX_QUESTION,
- NULL));
- gnome_dialog_append_button_with_pixmap (confirm, _("Delete"), GNOME_STOCK_BUTTON_YES);
- gnome_dialog_append_button_with_pixmap (confirm, _("Don't delete"), GNOME_STOCK_BUTTON_NO);
- gtk_window_set_policy (GTK_WINDOW (confirm), TRUE, TRUE, TRUE);
- gtk_window_set_modal (GTK_WINDOW (confirm), TRUE);
- gtk_window_set_title (GTK_WINDOW (confirm), _("Really delete account?"));
- gnome_dialog_set_parent (confirm, GTK_WINDOW (dialog));
- ans = gnome_dialog_run_and_close (confirm);
-
- if (ans == 0) {
- int sel, row, len;
-
- sel = dialog->accounts_row;
-
- account = gtk_clist_get_row_data (dialog->mail_accounts, sel);
-
- /* remove it from the folder-tree in the shell */
- if (account->source && account->source->url && account->source->enabled)
- mail_remove_storage_by_uri (account->source->url);
-
- /* remove it from the config file */
- dialog->accounts = mail_config_remove_account (account);
- mail_config_write ();
- mail_autoreceive_setup ();
-
- gtk_clist_remove (dialog->mail_accounts, sel);
-
- len = dialog->accounts ? g_slist_length ((GSList *) dialog->accounts) : 0;
- if (len > 0) {
- row = sel >= len ? len - 1 : sel;
- load_accounts (dialog);
- gtk_clist_select_row (dialog->mail_accounts, row, 0);
- } else {
- dialog->accounts_row = -1;
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_delete), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_default), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_able), FALSE);
- }
- }
-}
-
-static void
-mail_default (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- const MailConfigAccount *account;
-
- if (dialog->accounts_row >= 0) {
- int row;
-
- row = dialog->accounts_row;
- account = gtk_clist_get_row_data (dialog->mail_accounts, row);
- mail_config_set_default_account (account);
- mail_config_write ();
- load_accounts (dialog);
- gtk_clist_select_row (dialog->mail_accounts, row, 0);
- }
-}
-
-static void
-mail_able (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- const MailConfigAccount *account;
-
- if (dialog->accounts_row >= 0) {
- int row;
-
- row = dialog->accounts_row;
- account = gtk_clist_get_row_data (dialog->mail_accounts, row);
- account->source->enabled = !account->source->enabled;
-
- if (account->source && account->source->url) {
- if (account->source->enabled)
- mail_load_storage_by_uri (dialog->shell, account->source->url, account->name);
- else
- mail_remove_storage_by_uri (account->source->url);
- }
-
- mail_autoreceive_setup ();
- mail_config_write ();
- load_accounts (dialog);
- gtk_clist_select_row (dialog->mail_accounts, row, 0);
- }
-}
-
-#ifdef ENABLE_NNTP
-static void
-load_news (MailAccountsDialog *dialog)
-{
- const MailConfigService *service;
- const GSList *node = dialog->news;
- int i = 0;
-
- gtk_clist_freeze (dialog->news_accounts);
-
- gtk_clist_clear (dialog->news_accounts);
-
- while (node) {
- CamelURL *url;
- gchar *text[1];
-
- service = node->data;
-
- if (service->url)
- url = camel_url_new (service->url, NULL);
- else
- url = NULL;
-
- text[0] = g_strdup_printf ("%s", url && url->host ? url->host : _("None"));
-
- if (url)
- camel_url_free (url);
-
- gtk_clist_append (dialog->news_accounts, text);
- g_free (text[0]);
-
- /* set the account on the row */
- gtk_clist_set_row_data (dialog->news_accounts, i, (gpointer) service);
-
- node = node->next;
- i++;
- }
-
- gtk_clist_thaw (dialog->news_accounts);
-}
-
-
-/* news callbacks */
-static void
-news_select (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data)
-{
- MailAccountsDialog *dialog = data;
-
- dialog->news_row = row;
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_edit), TRUE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_delete), TRUE);
-}
-
-static void
-news_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data)
-{
- MailAccountsDialog *dialog = data;
-
- dialog->news_row = -1;
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_delete), FALSE);
-}
-
-static void
-news_editor_destroyed (GtkWidget *widget, gpointer data)
-{
- load_news (MAIL_ACCOUNTS_DIALOG (data));
-}
-
-
-static void
-news_edit (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
-
- if (dialog->news_row >= 0) {
- MailConfigService *service;
- MailAccountEditorNews *editor;
-
- service = gtk_clist_get_row_data (dialog->news_accounts, dialog->news_row);
- editor = mail_account_editor_news_new (service);
- gtk_signal_connect (GTK_OBJECT (editor), "destroy",
- GTK_SIGNAL_FUNC (news_editor_destroyed),
- dialog);
- gtk_widget_show (GTK_WIDGET (editor));
- }
-}
-
-static void
-news_add_destroyed (GtkWidget *widget, gpointer data)
-{
-
- gpointer *send = data;
- MailAccountsDialog *dialog;
- MailConfigService *service;
-
- service = send[0];
- dialog = send[1];
- g_free(send);
-
- dialog->news = mail_config_get_news ();
- load_news (dialog);
-
- mail_load_storage_by_uri(dialog->shell, service->url, NULL);
-
- dialog->news = mail_config_get_news ();
- load_news (dialog);
-
-}
-
-static void
-news_add (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- MailConfigService *service;
- MailAccountEditorNews *editor;
- gpointer *send;
-
- send = g_new(gpointer, 2);
-
- service = g_new0 (MailConfigService, 1);
- service->url = NULL;
-
- editor = mail_account_editor_news_new (service);
- send[0] = service;
- send[1] = dialog;
- gtk_signal_connect (GTK_OBJECT (editor), "destroy",
- GTK_SIGNAL_FUNC (news_add_destroyed),
- send);
- gtk_widget_show (GTK_WIDGET (editor));
-}
-
-static void
-news_delete (GtkButton *button, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- MailConfigService *server;
- GnomeDialog *confirm;
- GtkWidget *label;
- int ans;
-
- if (dialog->news_row < 0)
- return;
-
- confirm = GNOME_DIALOG (gnome_dialog_new (_("Are you sure you want to delete this news account?"),
- GNOME_STOCK_BUTTON_YES, GNOME_STOCK_BUTTON_NO, NULL));
- gtk_window_set_policy (GTK_WINDOW (confirm), TRUE, TRUE, TRUE);
- gtk_window_set_modal (GTK_WINDOW (confirm), TRUE);
- label = gtk_label_new (_("Are you sure you want to delete this news account?"));
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (confirm->vbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gnome_dialog_set_parent (confirm, GTK_WINDOW (dialog));
- ans = gnome_dialog_run_and_close (confirm);
-
- if (ans == 0) {
- int row, len;
-
- server = gtk_clist_get_row_data (dialog->news_accounts, dialog->news_row);
-
- /* remove it from the folder-tree in the shell */
- if (server && server->url) {
- CamelProvider *prov;
- CamelException ex;
-
- camel_exception_init (&ex);
- prov = camel_session_get_provider (session, server->url, &ex);
- if (prov != NULL && prov->flags & CAMEL_PROVIDER_IS_STORAGE &&
- prov->flags & CAMEL_PROVIDER_IS_REMOTE) {
- CamelService *store;
-
- store = camel_session_get_service (session, server->url,
- CAMEL_PROVIDER_STORE, &ex);
- if (store != NULL) {
- g_warning ("removing news storage: %s", server->url);
- mail_remove_storage (CAMEL_STORE (store));
- camel_object_unref (CAMEL_OBJECT (store));
- }
- } else
- g_warning ("%s is not a remote news storage.", server->url);
- camel_exception_clear (&ex);
- }
-
- /* remove it from the config file */
- dialog->news = mail_config_remove_news (server);
- mail_config_write ();
-
- gtk_clist_remove (dialog->news_accounts, dialog->news_row);
-
- len = dialog->news ? g_slist_length ((GSList *) dialog->news) : 0;
- if (len > 0) {
- row = dialog->news_row;
- row = row >= len ? len - 1 : row;
- gtk_clist_select_row (dialog->news_accounts, row, 0);
- } else {
- dialog->news_row = -1;
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_delete), FALSE);
- }
- }
-}
-#endif /* ENABLE_NNTP */
-
-/* temp widget callbacks */
-static void
-send_html_toggled (GtkToggleButton *button, gpointer data)
-{
- mail_config_set_send_html (gtk_toggle_button_get_active (button));
-}
-
-static void
-citation_highlight_toggled (GtkToggleButton *button, gpointer data)
-{
- mail_config_set_citation_highlight (gtk_toggle_button_get_active (button));
-}
-
-static void
-timeout_toggled (GtkToggleButton *button, gpointer data)
-{
- mail_config_set_do_seen_timeout (gtk_toggle_button_get_active (button));
-}
-
-static void
-citation_color_set (GnomeColorPicker *cp, guint r, guint g, guint b, guint a)
-{
- guint32 rgb;
-
- rgb = r >> 8;
- rgb <<= 8;
- rgb |= g >> 8;
- rgb <<= 8;
- rgb |= b >> 8;
-
- mail_config_set_citation_color (rgb);
-}
-
-/* FIXME: */
-
-static void
-timeout_changed (GtkEntry *entry, gpointer data)
-{
- MailAccountsDialog *dialog = data;
- gint val;
-
- val = (gint) (gtk_spin_button_get_value_as_float (dialog->timeout) * 1000);
-
- mail_config_set_mark_as_seen_timeout (val);
-}
-
-static void
-pgp_path_changed (GtkEntry *entry, gpointer data)
-{
- const char *path, *bin;
- CamelPgpType type = CAMEL_PGP_TYPE_NONE;
-
- path = gtk_entry_get_text (entry);
- bin = g_basename (path);
-
- /* FIXME: This detection should be better */
- if (!strcmp (bin, "pgp"))
- type = CAMEL_PGP_TYPE_PGP2;
- else if (!strcmp (bin, "pgpv") || !strcmp (bin, "pgpe") || !strcmp (bin, "pgpk") || !strcmp (bin, "pgps"))
- type = CAMEL_PGP_TYPE_PGP5;
- else if (!strncmp (bin, "gpg", 3))
- type = CAMEL_PGP_TYPE_GPG;
-
- mail_config_set_pgp_path (path && *path ? path : NULL);
- mail_config_set_pgp_type (type);
-}
-
-static void
-filter_log_path_changed (GtkEntry *entry, gpointer data)
-{
- const char *path;
-
- path = gtk_entry_get_text (entry);
-
- mail_config_set_filter_log_path (path && *path ? path : NULL);
-}
-
-static void
-set_color (GnomeColorPicker *cp)
-{
- guint32 rgb = mail_config_get_citation_color ();
-
- gnome_color_picker_set_i8 (cp, (rgb & 0xff0000) >> 16, (rgb & 0xff00) >> 8, rgb & 0xff, 0xff);
-}
-
-static void
-images_radio_toggled (GtkWidget *radio, gpointer data)
-{
- MailAccountsDialog *dialog = data;
-
- if (radio == (GtkWidget *)dialog->images_always)
- mail_config_set_http_mode (MAIL_CONFIG_HTTP_ALWAYS);
- else if (radio == (GtkWidget *)dialog->images_sometimes)
- mail_config_set_http_mode (MAIL_CONFIG_HTTP_SOMETIMES);
- else
- mail_config_set_http_mode (MAIL_CONFIG_HTTP_NEVER);
-}
-
-static void
-empty_trash_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_empty_trash_on_exit (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-
-static void
-prompt_empty_subject_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_prompt_empty_subject (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-
-static void
-prompt_bcc_only_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_prompt_only_bcc (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-
-#if 0
-/* Note: Please see construct() for a reason as to why these 2 options are disabled */
-static void
-thread_list_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_thread_list (NULL, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-
-static void
-show_preview_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_show_preview (NULL, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-#endif
-
-static void
-filter_log_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_filter_log (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-
-static void
-confirm_expunge_toggled (GtkWidget *toggle, gpointer data)
-{
- mail_config_set_confirm_expunge (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
-}
-
-static void
-forward_style_activated (GtkWidget *item, gpointer data)
-{
- int style = GPOINTER_TO_INT (data);
-
- mail_config_set_default_forward_style (style);
-}
-
-static void
-attach_forward_style_signal (GtkWidget *item, gpointer data)
-{
- int *num = data;
-
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- forward_style_activated, GINT_TO_POINTER (*num));
- (*num)++;
-}
-
-static void
-charset_menu_deactivate (GtkWidget *menu, gpointer data)
-{
- char *charset;
-
- charset = e_charset_picker_get_charset (menu);
- if (charset) {
- mail_config_set_default_charset (charset);
- g_free (charset);
- }
-}
-
-static void
-construct (MailAccountsDialog *dialog)
-{
- GladeXML *gui;
- GtkWidget *notebook, *menu;
- int num;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL);
- dialog->gui = gui;
-
- /* get our toplevel widget */
- notebook = glade_xml_get_widget (gui, "notebook");
-
- /* reparent */
- gtk_widget_reparent (notebook, GNOME_DIALOG (dialog)->vbox);
-
- /* give our dialog an Close button and title */
- gtk_window_set_title (GTK_WINDOW (dialog), _("Mail Settings"));
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, TRUE);
- gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300);
- gnome_dialog_append_button (GNOME_DIALOG (dialog), GNOME_STOCK_BUTTON_CLOSE);
-
- dialog->mail_accounts = GTK_CLIST (glade_xml_get_widget (gui, "clistAccounts"));
- gtk_signal_connect (GTK_OBJECT (dialog->mail_accounts), "select-row",
- GTK_SIGNAL_FUNC (mail_select), dialog);
- gtk_signal_connect (GTK_OBJECT (dialog->mail_accounts), "unselect-row",
- GTK_SIGNAL_FUNC (mail_unselect), dialog);
- gtk_signal_connect (GTK_OBJECT (dialog->mail_accounts), "button_press_event",
- mail_double_click, dialog);
- dialog->mail_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdMailAdd"));
- gtk_signal_connect (GTK_OBJECT (dialog->mail_add), "clicked",
- GTK_SIGNAL_FUNC (mail_add), dialog);
- dialog->mail_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdMailEdit"));
- gtk_signal_connect (GTK_OBJECT (dialog->mail_edit), "clicked",
- GTK_SIGNAL_FUNC (mail_edit), dialog);
- dialog->mail_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdMailDelete"));
- gtk_signal_connect (GTK_OBJECT (dialog->mail_delete), "clicked",
- GTK_SIGNAL_FUNC (mail_delete), dialog);
- dialog->mail_default = GTK_BUTTON (glade_xml_get_widget (gui, "cmdMailDefault"));
- gtk_signal_connect (GTK_OBJECT (dialog->mail_default), "clicked",
- GTK_SIGNAL_FUNC (mail_default), dialog);
- dialog->mail_able = GTK_BUTTON (glade_xml_get_widget (gui, "cmdMailAble"));
- gtk_signal_connect (GTK_OBJECT (dialog->mail_able), "clicked",
- GTK_SIGNAL_FUNC (mail_able), dialog);
-
-#ifdef ENABLE_NNTP
- dialog->news_accounts = GTK_CLIST (glade_xml_get_widget (gui, "clistNews"));
- gtk_signal_connect (GTK_OBJECT (dialog->news_accounts), "select-row",
- GTK_SIGNAL_FUNC (news_select), dialog);
- gtk_signal_connect (GTK_OBJECT (dialog->news_accounts), "unselect-row",
- GTK_SIGNAL_FUNC (news_unselect), dialog);
- dialog->news_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdNewsAdd"));
- gtk_signal_connect (GTK_OBJECT (dialog->news_add), "clicked",
- GTK_SIGNAL_FUNC (news_add), dialog);
- dialog->news_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdNewsEdit"));
- gtk_signal_connect (GTK_OBJECT (dialog->news_edit), "clicked",
- GTK_SIGNAL_FUNC (news_edit), dialog);
- dialog->news_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdNewsDelete"));
- gtk_signal_connect (GTK_OBJECT (dialog->news_delete), "clicked",
- GTK_SIGNAL_FUNC (news_delete), dialog);
-#else
- /* remove the news tab since we don't support nntp */
- gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), 1);
-#endif
-
- /* Display page */
- dialog->citation_highlight = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chckHighlightCitations"));
- gtk_toggle_button_set_active (dialog->citation_highlight, mail_config_get_citation_highlight ());
- gtk_signal_connect (GTK_OBJECT (dialog->citation_highlight), "toggled",
- GTK_SIGNAL_FUNC (citation_highlight_toggled), dialog);
- dialog->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerCitations"));
- set_color (dialog->citation_color);
- gtk_signal_connect (GTK_OBJECT (dialog->citation_color), "color_set",
- GTK_SIGNAL_FUNC (citation_color_set), dialog);
-
- dialog->timeout_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "checkMarkTimeout"));
- gtk_toggle_button_set_active (dialog->timeout_toggle, mail_config_get_do_seen_timeout ());
- gtk_signal_connect (GTK_OBJECT (dialog->timeout_toggle), "toggled",
- GTK_SIGNAL_FUNC (timeout_toggled), dialog);
-
- dialog->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout"));
- gtk_spin_button_set_value (dialog->timeout, (1.0 * mail_config_get_mark_as_seen_timeout ()) / 1000.0);
- gtk_signal_connect (GTK_OBJECT (dialog->timeout), "changed",
- GTK_SIGNAL_FUNC (timeout_changed), dialog);
-
- dialog->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radioImagesNever"));
- gtk_toggle_button_set_active (dialog->images_never, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_NEVER);
- gtk_signal_connect (GTK_OBJECT (dialog->images_never), "toggled",
- GTK_SIGNAL_FUNC (images_radio_toggled), dialog);
- dialog->images_sometimes = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radioImagesSometimes"));
- gtk_toggle_button_set_active (dialog->images_sometimes, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_SOMETIMES);
- gtk_signal_connect (GTK_OBJECT (dialog->images_sometimes), "toggled",
- GTK_SIGNAL_FUNC (images_radio_toggled), dialog);
- dialog->images_always = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radioImagesAlways"));
- gtk_toggle_button_set_active (dialog->images_always, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_ALWAYS);
- gtk_signal_connect (GTK_OBJECT (dialog->images_always), "toggled",
- GTK_SIGNAL_FUNC (images_radio_toggled), dialog);
-
-#if 0
- /* These options are disabled because they are completely non-intuitive and evil */
- dialog->thread_list = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkThreadedList"));
- gtk_toggle_button_set_active (dialog->thread_list, mail_config_get_thread_list (NULL));
- gtk_signal_connect (GTK_OBJECT (dialog->thread_list), "toggled",
- GTK_SIGNAL_FUNC (thread_list_toggled), dialog);
-
- dialog->show_preview = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowPreview"));
- gtk_toggle_button_set_active (dialog->show_preview, mail_config_get_show_preview (NULL));
- gtk_signal_connect (GTK_OBJECT (dialog->show_preview), "toggled",
- GTK_SIGNAL_FUNC (show_preview_toggled), dialog);
-#endif
-
- /* Composer page */
- dialog->send_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSendHTML"));
- gtk_toggle_button_set_active (dialog->send_html, mail_config_get_send_html ());
- gtk_signal_connect (GTK_OBJECT (dialog->send_html), "toggled",
- GTK_SIGNAL_FUNC (send_html_toggled), dialog);
-
- dialog->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle"));
- gtk_option_menu_set_history (dialog->forward_style, mail_config_get_default_forward_style ());
- /* Hm. This sucks... */
- num = 0;
- gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (dialog->forward_style)),
- attach_forward_style_signal, &num);
-
- dialog->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
- gtk_toggle_button_set_active (dialog->prompt_empty_subject, mail_config_get_prompt_empty_subject ());
- gtk_signal_connect (GTK_OBJECT (dialog->prompt_empty_subject), "toggled",
- GTK_SIGNAL_FUNC (prompt_empty_subject_toggled), dialog);
-
- dialog->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly"));
- gtk_toggle_button_set_active (dialog->prompt_bcc_only, mail_config_get_prompt_only_bcc ());
- gtk_signal_connect (GTK_OBJECT (dialog->prompt_bcc_only), "toggled",
- GTK_SIGNAL_FUNC (prompt_bcc_only_toggled), dialog);
-
- /* Other page */
- dialog->pgp_path = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "filePgpPath"));
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (dialog->pgp_path)),
- mail_config_get_pgp_path ());
- gnome_file_entry_set_default_path (dialog->pgp_path, mail_config_get_pgp_path ());
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (dialog->pgp_path)),
- "changed", GTK_SIGNAL_FUNC (pgp_path_changed), dialog);
-
- dialog->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
- menu = e_charset_picker_new (mail_config_get_default_charset ());
- gtk_option_menu_set_menu (dialog->charset, GTK_WIDGET (menu));
- gtk_signal_connect (GTK_OBJECT (menu), "deactivate",
- GTK_SIGNAL_FUNC (charset_menu_deactivate), NULL);
-
- dialog->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
- gtk_toggle_button_set_active (dialog->empty_trash, mail_config_get_empty_trash_on_exit ());
- gtk_signal_connect (GTK_OBJECT (dialog->empty_trash), "toggled",
- GTK_SIGNAL_FUNC (empty_trash_toggled), dialog);
-
- dialog->filter_log = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkFilterLog"));
- gtk_toggle_button_set_active (dialog->filter_log, mail_config_get_filter_log ());
- gtk_signal_connect (GTK_OBJECT (dialog->filter_log), "toggled",
- GTK_SIGNAL_FUNC (filter_log_toggled), dialog);
-
- dialog->filter_log_path = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileFilterLog"));
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (dialog->filter_log_path)),
- mail_config_get_filter_log_path ());
- gnome_file_entry_set_default_path (dialog->filter_log_path, mail_config_get_filter_log_path ());
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (dialog->filter_log_path)),
- "changed", GTK_SIGNAL_FUNC (filter_log_path_changed), dialog);
-
- dialog->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge"));
- gtk_toggle_button_set_active (dialog->confirm_expunge, mail_config_get_confirm_expunge ());
- gtk_signal_connect (GTK_OBJECT (dialog->confirm_expunge), "toggled",
- GTK_SIGNAL_FUNC (confirm_expunge_toggled), dialog);
-
- /* now to fill in the clists */
- dialog->accounts_row = -1;
- dialog->accounts = mail_config_get_accounts ();
- if (dialog->accounts) {
- load_accounts (dialog);
- gtk_clist_select_row (dialog->mail_accounts, 0, 0);
- } else {
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_delete), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_default), FALSE);
- }
-
-#ifdef ENABLE_NNTP
- dialog->news_row = -1;
- dialog->news = mail_config_get_news ();
- if (dialog->news) {
- load_news (dialog);
- gtk_clist_select_row (dialog->news_accounts, 0, 0);
- } else {
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_edit), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (dialog->news_delete), FALSE);
- }
-#endif /* ENABLE_NNTP */
-}
-
-MailAccountsDialog *
-mail_accounts_dialog_new (GNOME_Evolution_Shell shell)
-{
- MailAccountsDialog *new;
-
- new = (MailAccountsDialog *) gtk_type_new (mail_accounts_dialog_get_type ());
- construct (new);
- new->shell = shell;
-
- return new;
-}
diff --git a/mail/mail-accounts.h b/mail/mail-accounts.h
deleted file mode 100644
index e9e4423807..0000000000
--- a/mail/mail-accounts.h
+++ /dev/null
@@ -1,121 +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 MAIL_ACCOUNTS_H
-#define MAIL_ACCOUNTS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtkclist.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkspinbutton.h>
-#include <libgnomeui/gnome-color-picker.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <glade/glade.h>
-#include <shell/Evolution.h>
-
-#define MAIL_ACCOUNTS_DIALOG_TYPE (mail_accounts_dialog_get_type ())
-#define MAIL_ACCOUNTS_DIALOG(o) (GTK_CHECK_CAST ((o), MAIL_ACCOUNTS_DIALOG_TYPE, MailAccountsDialog))
-#define MAIL_ACCOUNTS_DIALOG_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_ACCOUNTS_DIALOG_TYPE, MailAccountsDialogClass))
-#define IS_MAIL_ACCOUNTS_DIALOG(o) (GTK_CHECK_TYPE ((o), MAIL_ACCOUNTS_DIALOG_TYPE))
-#define IS_MAIL_ACCOUNTS_DIALOG_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNTS_DIALOG_TYPE))
-
-struct _MailAccountsDialog {
- GnomeDialog parent;
-
- GNOME_Evolution_Shell shell;
-
- GladeXML *gui;
-
- const GSList *accounts;
- gint accounts_row;
-
- /* Accounts page */
- GtkCList *mail_accounts;
- GtkButton *mail_add;
- GtkButton *mail_edit;
- GtkButton *mail_delete;
- GtkButton *mail_default;
- GtkButton *mail_able;
-
- const GSList *news;
- gint news_row;
-
- /* News page */
- GtkCList *news_accounts;
- GtkButton *news_add;
- GtkButton *news_edit;
- GtkButton *news_delete;
-
- /* Display page */
- GtkToggleButton *citation_highlight;
- GnomeColorPicker *citation_color;
- GtkToggleButton *timeout_toggle;
- GtkSpinButton *timeout;
- GtkToggleButton *images_always, *images_sometimes, *images_never;
- /*GtkToggleButton *thread_list;*/
- /*GtkToggleButton *show_preview;*/
-
- /* Composer page */
- GtkToggleButton *send_html;
- GtkOptionMenu *forward_style;
- GtkOptionMenu *charset;
- GtkToggleButton *prompt_empty_subject;
- GtkToggleButton *prompt_bcc_only;
-
- /* Other page */
- GtkToggleButton *empty_trash;
- GtkToggleButton *filter_log;
- GnomeFileEntry *filter_log_path;
- GtkToggleButton *confirm_expunge;
-
- /* PGP page */
- GnomeFileEntry *pgp_path;
-
- /* Pixmaps for the clist */
- GdkPixmap *mark_pixmap;
- GdkBitmap *mark_bitmap;
-};
-
-typedef struct _MailAccountsDialog MailAccountsDialog;
-
-typedef struct {
- GnomeDialogClass parent_class;
-
- /* signals */
-
-} MailAccountsDialogClass;
-
-GtkType mail_accounts_dialog_get_type (void);
-
-MailAccountsDialog *mail_accounts_dialog_new (GNOME_Evolution_Shell shell);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNTS_H */
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
deleted file mode 100644
index 93bb30b595..0000000000
--- a/mail/mail-autofilter.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-autofilter.c
- *
- * 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.
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Ettore Perazzoli <ettore@ximian.com>
- */
-
-/* Code for autogenerating rules or filters from a message. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <libgnomeui/gnome-popup-menu.h>
-
-#include "mail-vfolder.h"
-#include "mail-autofilter.h"
-
-#include "camel/camel.h"
-
-#include "filter/vfolder-context.h"
-#include "filter/vfolder-rule.h"
-#include "filter/vfolder-editor.h"
-
-#include "filter/filter-context.h"
-#include "filter/filter-filter.h"
-#include "filter/filter-editor.h"
-#include "filter/filter-option.h"
-
-static void
-rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddress *iaddr)
-{
- FilterPart *part;
- FilterElement *element;
- int i;
- const char *real, *addr;
- char *namestr;
-
- /* address types etc should handle multiple values */
- for (i = 0; camel_internet_address_get (iaddr, i, &real, &addr); i++) {
- part = rule_context_create_part (context, "to");
- filter_rule_add_part ((FilterRule *)rule, part);
- element = filter_part_find_element (part, "recipient-type");
- filter_option_set_current ((FilterOption *)element, "contains");
- element = filter_part_find_element (part, "recipient");
- filter_input_set_value ((FilterInput *)element, addr);
-
- namestr = g_strdup_printf (_("Mail to %s"), real && real[0] ? real : addr);
- filter_rule_set_name (rule, namestr);
- g_free (namestr);
- }
-}
-
-
-/* remove 're' part of a subject */
-static const char *
-strip_re (const char *subject)
-{
- const unsigned char *s, *p;
-
- s = (unsigned char *) subject;
-
- 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 == ':') {
- s = p + 1;
- } else
- break;
- } else
- break;
- }
- return (char *) s;
-}
-
-#if 0
-int
-reg_match (char *str, char *regstr)
-{
- regex_t reg;
- int error;
- int ret;
-
- error = regcomp(&reg, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB);
- if (error != 0) {
- return 0;
- }
- error = regexec(&reg, str, 0, NULL, 0);
- regfree(&reg);
- return (error == 0);
-}
-#endif
-
-static void
-rule_add_subject (RuleContext *context, FilterRule *rule, const char *text)
-{
- FilterPart *part;
- FilterElement *element;
-
- /* dont match on empty strings ever */
- if (*text == 0)
- return;
- part = rule_context_create_part (context, "subject");
- filter_rule_add_part ((FilterRule *)rule, part);
- element = filter_part_find_element (part, "subject-type");
- filter_option_set_current ((FilterOption *)element, "contains");
- element = filter_part_find_element (part, "subject");
- filter_input_set_value ((FilterInput *)element, text);
-}
-
-static void
-rule_add_sender (RuleContext *context, FilterRule *rule, const char *text)
-{
- FilterPart *part;
- FilterElement *element;
-
- /* dont match on empty strings ever */
- if (*text == 0)
- return;
- part = rule_context_create_part (context, "sender");
- filter_rule_add_part ((FilterRule *)rule, part);
- element = filter_part_find_element (part, "sender-type");
- filter_option_set_current ((FilterOption *)element, "contains");
- element = filter_part_find_element (part, "sender");
- filter_input_set_value ((FilterInput *)element, text);
-}
-
-/* do a bunch of things on the subject to try and detect mailing lists, remove
- unneeded stuff, etc */
-static void
-rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
-{
- const char *s;
- const char *s1, *s2;
- char *tmp;
-
- s = strip_re (subject);
- /* dont match on empty subject */
- if (*s == 0)
- return;
-
- /* [blahblah] is probably a mailing list, match on it separately */
- s1 = strchr (s, '[');
- s2 = strchr (s, ']');
- if (s1 && s2 && s1 < s2) {
- /* probably a mailing list, match on the mailing list name */
- tmp = alloca (s2 - s1 + 2);
- memcpy (tmp, s1, s2 - s1 + 1);
- tmp[s2 - s1 + 1] = 0;
- g_strstrip (tmp);
- rule_add_subject (context, rule, tmp);
- s = s2 + 1;
- }
- /* Froblah: at the start is probably something important (e.g. bug number) */
- s1 = strchr (s, ':');
- if (s1) {
- tmp = alloca (s1 - s + 1);
- memcpy (tmp, s, s1-s);
- tmp[s1 - s] = 0;
- g_strstrip (tmp);
- rule_add_subject (context, rule, tmp);
- s = s1+1;
- }
-
- /* just lump the rest together */
- tmp = alloca (strlen (s) + 1);
- strcpy (tmp, s);
- g_strstrip (tmp);
- rule_add_subject (context, rule, tmp);
-}
-
-static void
-rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags)
-{
- CamelInternetAddress *addr;
-
- rule->grouping = FILTER_GROUP_ANY;
-
- if (flags & AUTO_SUBJECT) {
- char *namestr;
-
- rule_match_subject (context, rule, msg->subject);
-
- namestr = g_strdup_printf (_("Subject is %s"), strip_re (msg->subject));
- filter_rule_set_name (rule, namestr);
- g_free (namestr);
- }
- /* should parse the from address into an internet address? */
- if (flags & AUTO_FROM) {
- const CamelInternetAddress *from;
- int i;
- const char *name, *addr;
- char *namestr;
-
- from = camel_mime_message_get_from(msg);
- for (i=0;camel_internet_address_get(from, i, &name, &addr); i++) {
- rule_add_sender(context, rule, addr);
- if (name==NULL || name[0]==0)
- name = addr;
- namestr = g_strdup_printf(_("Mail from %s"), name);
- filter_rule_set_name(rule, namestr);
- g_free(namestr);
- }
- }
- if (flags & AUTO_TO) {
- addr = (CamelInternetAddress *)camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_TO);
- rule_match_recipients (context, rule, addr);
- addr = (CamelInternetAddress *)camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_CC);
- rule_match_recipients (context, rule, addr);
- }
-}
-
-FilterRule *
-vfolder_rule_from_message (VfolderContext *context, CamelMimeMessage *msg, int flags, const char *source)
-{
- VfolderRule *rule;
-
- rule = vfolder_rule_new ();
- vfolder_rule_add_source (rule, source);
- rule_from_message ((FilterRule *)rule, (RuleContext *)context, msg, flags);
-
- return (FilterRule *)rule;
-}
-
-FilterRule *
-filter_rule_from_message (FilterContext *context, CamelMimeMessage *msg, int flags)
-{
- FilterFilter *rule;
- FilterPart *part;
-
- rule = filter_filter_new ();
- rule_from_message ((FilterRule *)rule, (RuleContext *)context, msg, flags);
-
- part = filter_context_next_action (context, NULL);
- filter_filter_add_action (rule, filter_part_clone (part));
-
- return (FilterRule *)rule;
-}
-
-static void
-rule_from_mlist(FilterRule *rule, RuleContext *context, const char *mlist)
-{
- FilterPart *part;
- FilterElement *element;
- char *rule_name;
-
- part = rule_context_create_part(context, "mlist");
- filter_rule_add_part(rule, part);
-
- element = filter_part_find_element(part, "mlist-type");
- filter_option_set_current((FilterOption *)element, "is");
-
- element = filter_part_find_element (part, "mlist");
- filter_input_set_value((FilterInput *)element, mlist);
-
- rule_name = g_strdup_printf(_("%s mailing list"), mlist);
- filter_rule_set_name((FilterRule *) rule, rule_name);
- g_free (rule_name);
-}
-
-FilterRule *
-vfolder_rule_from_mlist(VfolderContext *context, const char *mlist, const char *source)
-{
- VfolderRule *rule;
-
- rule = vfolder_rule_new ();
- vfolder_rule_add_source (rule, source);
- rule_from_mlist((FilterRule *)rule, (RuleContext *)context, mlist);
-
- return (FilterRule *)rule;
-}
-
-FilterRule *
-filter_rule_from_mlist (FilterContext *context, const char *mlist)
-{
- FilterFilter *rule;
- FilterPart *part;
-
- rule = filter_filter_new ();
- rule_from_mlist((FilterRule *)rule, (RuleContext *)context, mlist);
-
- part = filter_context_next_action (context, NULL);
- filter_filter_add_action (rule, filter_part_clone (part));
-
- return (FilterRule *)rule;
-}
-
-void
-filter_gui_add_from_message (CamelMimeMessage *msg, int flags)
-{
- FilterContext *fc;
- char *user, *system;
- FilterRule *rule;
- extern char *evolution_dir;
-
- g_return_if_fail (msg != NULL);
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/filters.xml", evolution_dir);
- system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
- rule_context_load ((RuleContext *)fc, system, user);
- rule = filter_rule_from_message (fc, msg, flags);
-
- filter_rule_set_source (rule, FILTER_SOURCE_INCOMING);
-
- rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), user);
- g_free (user);
- gtk_object_unref (GTK_OBJECT (fc));
-}
-
-void
-filter_gui_add_from_mlist (const char *mlist)
-{
- FilterContext *fc;
- char *user, *system;
- FilterRule *rule;
- extern char *evolution_dir;
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/filters.xml", evolution_dir);
- system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
- rule_context_load ((RuleContext *)fc, system, user);
- rule = filter_rule_from_mlist(fc, mlist);
-
- filter_rule_set_source (rule, FILTER_SOURCE_INCOMING);
-
- rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), user);
- g_free (user);
- gtk_object_unref (GTK_OBJECT (fc));
-}
diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h
deleted file mode 100644
index 588e5c5f3a..0000000000
--- a/mail/mail-autofilter.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-autofilter.h
- *
- * 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.
- *
- * Authors:
- * Michael Zucchi <notzed@ximian.com>
- * Ettore Perazzoli <ettore@ximian.com>
- */
-
-#ifndef _MAIL_AUTOFILTER_H
-#define _MAIL_AUTOFILTER_H
-
-#include <filter/filter-rule.h>
-#include <filter/filter-context.h>
-#include <filter/vfolder-context.h>
-#include <camel/camel-mime-message.h>
-
-enum {
- AUTO_SUBJECT = 1,
- AUTO_FROM = 2,
- AUTO_TO = 4
-};
-
-FilterRule *vfolder_rule_from_message(VfolderContext *context, CamelMimeMessage *msg, int flags, const char *source);
-FilterRule *filter_rule_from_message(FilterContext *context, CamelMimeMessage *msg, int flags);
-FilterRule *vfolder_rule_from_mlist(VfolderContext *context, const char *mlist, const char *source);
-FilterRule *filter_rule_from_mlist(FilterContext *context, const char *mlist);
-
-/* easiest place to put this */
-
-void filter_gui_add_from_message (CamelMimeMessage *msg,
- int flags);
-void filter_gui_add_from_mlist (const char *mlist);
-
-#endif
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
deleted file mode 100644
index 449b21f35c..0000000000
--- a/mail/mail-callbacks.c
+++ /dev/null
@@ -1,2271 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-ops.c: callbacks for the mail toolbar/menus */
-
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * Peter Williams <peterw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 <errno.h>
-#include <time.h>
-#include <libgnome/gnome-paper.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnome/gnome-paper.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-socket.h>
-#include <gal/e-table/e-table.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-#include <filter/filter-editor.h>
-#include "mail.h"
-#include "message-browser.h"
-#include "mail-callbacks.h"
-#include "mail-config.h"
-#include "mail-accounts.h"
-#include "mail-config-druid.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-local.h"
-#include "mail-search.h"
-#include "mail-send-recv.h"
-#include "mail-vfolder.h"
-#include "mail-folder-cache.h"
-#include "folder-browser.h"
-#include "subscribe-dialog.h"
-#include "e-messagebox.h"
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-
-#include "evolution-shell-client.h"
-
-#ifndef HAVE_MKSTEMP
-#include <fcntl.h>
-#include <sys/stat.h>
-#endif
-
-struct post_send_data {
- CamelFolder *folder;
- gchar *uid;
- guint32 flags;
-};
-
-static void
-druid_destroyed (void)
-{
- gtk_main_quit ();
-}
-
-static gboolean
-configure_mail (FolderBrowser *fb)
-{
- MailConfigDruid *druid;
-
- if (fb) {
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (
- _("You have not configured the mail client.\n"
- "You need to do this before you can send,\n"
- "receive or compose mail.\n"
- "Would you like to configure it now?"),
- GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO, NULL);
-
- /*
- * Focus YES
- */
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gtk_widget_grab_focus (GTK_WIDGET (GNOME_DIALOG (dialog)->buttons->data));
-
- gnome_dialog_set_parent (GNOME_DIALOG (dialog),
- GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (fb), GTK_TYPE_WINDOW)));
-
- switch (gnome_dialog_run_and_close (GNOME_DIALOG (dialog))) {
- case 0:
- druid = mail_config_druid_new (fb->shell);
- gtk_signal_connect (GTK_OBJECT (druid), "destroy",
- GTK_SIGNAL_FUNC (druid_destroyed), NULL);
- gtk_widget_show (GTK_WIDGET (druid));
- gtk_grab_add (GTK_WIDGET (druid));
- gtk_main ();
- break;
- case 1:
- default:
- break;
- }
- }
-
- return mail_config_is_configured ();
-}
-
-static gboolean
-check_send_configuration (FolderBrowser *fb)
-{
- const MailConfigAccount *account;
-
- /* Check general */
- if (!mail_config_is_configured ()) {
- if (!configure_mail (fb))
- return FALSE;
- }
-
- /* Get the default account */
- account = mail_config_get_default_account ();
-
- /* Check for an identity */
- if (!account) {
- GtkWidget *message;
-
- message = gnome_warning_dialog_parented (_("You need to configure an identity\n"
- "before you can compose mail."),
- GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (fb),
- GTK_TYPE_WINDOW)));
- gnome_dialog_run_and_close (GNOME_DIALOG (message));
- return FALSE;
- }
-
- /* Check for a transport */
- if (!account->transport || !account->transport->url) {
- GtkWidget *message;
-
- message = gnome_warning_dialog_parented (_("You need to configure a mail transport\n"
- "before you can compose mail."),
- GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (fb),
- GTK_TYPE_WINDOW)));
- gnome_dialog_run_and_close (GNOME_DIALOG (message));
- return FALSE;
- }
-
- return TRUE;
-}
-
-void
-send_receive_mail (GtkWidget *widget, gpointer user_data)
-{
- const MailConfigAccount *account;
-
- if (!mail_config_is_configured ()) {
- if (!configure_mail (FOLDER_BROWSER (user_data)))
- return;
- }
-
- account = mail_config_get_default_account ();
- if (!account || !account->transport) {
- GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data), GTK_TYPE_WINDOW);
- gnome_error_dialog_parented (_("You have not set a mail transport method"), GTK_WINDOW (win));
- return;
- }
-
- mail_send_receive ();
-}
-
-static void
-msgbox_destroyed (GtkWidget *widget, gpointer data)
-{
- gboolean *show_again = data;
- GtkWidget *checkbox;
-
- checkbox = e_message_box_get_checkbox (E_MESSAGE_BOX (widget));
- *show_again = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox));
-}
-
-static gboolean
-ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recipients)
-{
- gboolean show_again = TRUE;
- GString *str;
- GtkWidget *mbox;
- gint i, button;
-
- if (!mail_config_get_confirm_unwanted_html ()) {
- g_message ("doesn't want to see confirm html messages!");
- return TRUE;
- }
-
- /* FIXME: this wording sucks */
- str = g_string_new (_("You are sending an HTML-formatted message, but the following recipients "
- "do not want HTML-formatted mail:\n"));
- for (i = 0; recipients[i] != NULL; ++i) {
- if (!e_destination_get_html_mail_pref (recipients[i])) {
- const char *name;
- char *buf;
-
- name = e_destination_get_textrep (recipients[i]);
- buf = e_utf8_to_locale_string (name);
-
- g_string_sprintfa (str, " %s\n", buf);
- g_free (buf);
- }
- }
-
- g_string_append (str, _("Send anyway?"));
-
- mbox = e_message_box_new (str->str,
- E_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- g_string_free (str, TRUE);
-
- gtk_signal_connect (GTK_OBJECT (mbox), "destroy",
- msgbox_destroyed, &show_again);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (mbox));
-
- if (!show_again) {
- mail_config_set_confirm_unwanted_html (show_again);
- g_message ("don't show HTML warning again");
- }
-
- if (button == 0)
- return TRUE;
- else
- return FALSE;
-}
-
-static gboolean
-ask_confirm_for_empty_subject (EMsgComposer *composer)
-{
- /* FIXME: EMessageBox should really handle this stuff
- automagically. What Miguel thinks would be nice is to pass
- in a unique id which could be used as a key in the config
- file and the value would be an int. -1 for always show or
- the button pressed otherwise. This probably means we'd have
- to write e_messagebox_run () */
- gboolean show_again = TRUE;
- GtkWidget *mbox;
- int button;
-
- if (!mail_config_get_prompt_empty_subject ())
- return TRUE;
-
- mbox = e_message_box_new (_("This message has no subject.\nReally send?"),
- E_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (mbox), "destroy",
- msgbox_destroyed, &show_again);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (mbox));
-
- mail_config_set_prompt_empty_subject (show_again);
-
- if (button == 0)
- return TRUE;
- else
- return FALSE;
-}
-
-static gboolean
-ask_confirm_for_only_bcc (EMsgComposer *composer, gboolean hidden_list_case)
-{
- /* FIXME: EMessageBox should really handle this stuff
- automagically. What Miguel thinks would be nice is to pass
- in a message-id which could be used as a key in the config
- file and the value would be an int. -1 for always show or
- the button pressed otherwise. This probably means we'd have
- to write e_messagebox_run () */
- gboolean show_again = TRUE;
- GtkWidget *mbox;
- int button;
- const gchar *first_text;
- gchar *message_text;
-
- if (!mail_config_get_prompt_only_bcc ())
- return TRUE;
-
- /* If the user is mailing a hidden contact list, it is possible for
- them to create a message with only Bcc recipients without really
- realizing it. To try to avoid being totally confusing, I've changed
- this dialog to provide slightly different text in that case, to
- better explain what the hell is going on. */
-
- if (hidden_list_case) {
- first_text = _("Since the contact list you are sending to "
- "is configured to hide the list's addresses, "
- "this message will contain only Bcc recipients.");
- } else {
- first_text = _("This message contains only Bcc recipients.");
- }
-
- message_text = g_strdup_printf ("%s\n%s", first_text,
- _("It is possible that the mail server may reveal the recipients "
- "by adding an Apparently-To header.\nSend anyway?"));
-
- mbox = e_message_box_new (message_text,
- E_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (mbox), "destroy",
- msgbox_destroyed, &show_again);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (mbox));
-
- mail_config_set_prompt_only_bcc (show_again);
-
- g_free (message_text);
-
- if (button == 0)
- return TRUE;
- else
- return FALSE;
-}
-
-static void
-free_psd (GtkWidget *composer, gpointer user_data)
-{
- struct post_send_data *psd = user_data;
-
- if (psd->folder)
- camel_object_unref (CAMEL_OBJECT (psd->folder));
- if (psd->uid)
- g_free (psd->uid);
- g_free (psd);
-}
-
-struct _send_data {
- EMsgComposer *composer;
- struct post_send_data *psd;
-};
-
-static void
-composer_sent_cb (char *uri, CamelMimeMessage *message, gboolean sent, void *data)
-{
- struct _send_data *send = data;
-
- if (sent) {
- if (send->psd) {
- camel_folder_set_message_flags (send->psd->folder, send->psd->uid,
- send->psd->flags, send->psd->flags);
- }
- gtk_widget_destroy (GTK_WIDGET (send->composer));
- } else {
- gtk_widget_show (GTK_WIDGET (send->composer));
- gtk_object_unref (GTK_OBJECT (send->composer));
- }
-
- g_free (send);
- camel_object_unref (CAMEL_OBJECT (message));
-}
-
-static CamelMimeMessage *
-composer_get_message (EMsgComposer *composer)
-{
- static char *recipient_type[] = {
- CAMEL_RECIPIENT_TYPE_TO,
- CAMEL_RECIPIENT_TYPE_CC,
- CAMEL_RECIPIENT_TYPE_BCC
- };
- const CamelInternetAddress *iaddr;
- const MailConfigAccount *account;
- CamelMimeMessage *message;
- const char *subject;
- int num_addrs, i;
- EDestination **recipients;
-
- message = e_msg_composer_get_message (composer);
- if (message == NULL)
- return NULL;
-
- recipients = e_msg_composer_get_recipients (composer);
-
- /* Check for invalid recipients */
- if (recipients) {
- gboolean have_invalid = FALSE;
- gchar *msg, *new_msg;
- GtkWidget *message_box;
-
- for (i = 0; recipients[i] && !have_invalid; ++i) {
- if (!e_destination_is_valid (recipients[i]))
- have_invalid = TRUE;
- }
-
- if (have_invalid) {
- msg = g_strdup (_("This message contains invalid recipients:"));
- for (i = 0; recipients[i]; ++i) {
- if (!e_destination_is_valid (recipients[i])) {
- new_msg = g_strdup_printf ("%s\n %s", msg,
- e_destination_get_address (recipients[i]));
- g_free (msg);
- msg = new_msg;
- }
- }
-
- new_msg = e_utf8_from_locale_string (msg);
- g_free (msg);
- msg = new_msg;
-
- message_box = gnome_message_box_new (msg, GNOME_MESSAGE_BOX_WARNING, GNOME_STOCK_BUTTON_OK, NULL);
- g_free (msg);
-
- gnome_dialog_run_and_close (GNOME_DIALOG (message_box));
-
- camel_object_unref (CAMEL_OBJECT (message));
- message = NULL;
- goto finished;
- }
- }
-
- /* Check for recipients */
- for (num_addrs = 0, i = 0; i < 3; i++) {
- iaddr = camel_mime_message_get_recipients (message, recipient_type[i]);
- num_addrs += iaddr ? camel_address_length (CAMEL_ADDRESS (iaddr)) : 0;
- }
-
- /* I'm sensing a lack of love, er, I mean recipients. */
- if (num_addrs == 0) {
- GtkWidget *message_box;
-
- message_box = gnome_message_box_new (_("You must specify recipients in order to "
- "send this message."),
- GNOME_MESSAGE_BOX_WARNING,
- GNOME_STOCK_BUTTON_OK,
- NULL);
-
- gnome_dialog_run_and_close (GNOME_DIALOG (message_box));
-
- camel_object_unref (CAMEL_OBJECT (message));
- message = NULL;
- goto finished;
- }
-
- if (iaddr && num_addrs == camel_address_length (CAMEL_ADDRESS (iaddr))) {
- /* this means that the only recipients are Bcc's */
-
- /* OK, this is an abusive hack. If someone sends a mail with a
- hidden contact list on to to: line and no other recipients,
- they will unknowingly create a message with only bcc: recipients.
- We try to detect this and pass a flag to ask_confirm_for_only_bcc,
- so that it can present the user with a dialog whose text has been
- modified to reflect this situation. */
-
- const gchar *to_header = camel_medium_get_header (CAMEL_MEDIUM (message), CAMEL_RECIPIENT_TYPE_TO);
- gboolean hidden_list_case = FALSE;
-
- if (to_header && !strcmp (to_header, "Undisclosed-Recipient:;"))
- hidden_list_case = TRUE;
-
- if (!ask_confirm_for_only_bcc (composer, hidden_list_case)) {
- camel_object_unref (CAMEL_OBJECT (message));
- message = NULL;
- goto finished;
- }
- }
-
- /* Only show this warning if our default is to send html. If it isn't, we've
- manually switched into html mode in the composer and (presumably) had a good
- reason for doing this. */
- if (e_msg_composer_get_send_html (composer)
- && mail_config_get_send_html ()
- && mail_config_get_confirm_unwanted_html ()) {
- gboolean html_problem = FALSE;
- for (i = 0; recipients[i] != NULL && !html_problem; ++i) {
- if (! e_destination_get_html_mail_pref (recipients[i]))
- html_problem = TRUE;
- }
-
- if (html_problem) {
- html_problem = ! ask_confirm_for_unwanted_html_mail (composer, recipients);
- if (html_problem) {
- camel_object_unref (CAMEL_OBJECT (message));
- message = NULL;
- goto finished;
- }
- }
- }
-
- /* Check for no subject */
- subject = camel_mime_message_get_subject (message);
- if (subject == NULL || subject[0] == '\0') {
- if (!ask_confirm_for_empty_subject (composer)) {
- camel_object_unref (CAMEL_OBJECT (message));
- message = NULL;
- goto finished;
- }
- }
-
- /* Add info about the sending account */
- account = e_msg_composer_get_preferred_account (composer);
- if (account) {
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Account", account->name);
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", account->transport->url);
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", account->sent_folder_uri);
- }
-
- /* Get the message recipients and 'touch' them, boosting their use scores */
- recipients = e_msg_composer_get_recipients (composer);
- e_destination_touchv (recipients);
-
- finished:
- e_destination_freev (recipients);
- return message;
-}
-
-void
-composer_send_cb (EMsgComposer *composer, gpointer data)
-{
- const MailConfigService *transport;
- CamelMimeMessage *message;
- struct post_send_data *psd = data;
- struct _send_data *send;
-
- if (!mail_config_is_configured ()) {
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog_parented (_("You must configure an account before you "
- "can send this email."),
- GTK_WINDOW (composer));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- return;
- }
-
- message = composer_get_message (composer);
- if (!message)
- return;
-
- transport = mail_config_get_default_transport ();
- if (!transport)
- return;
-
- send = g_malloc (sizeof (*send));
- send->psd = psd;
- send->composer = composer;
- gtk_object_ref (GTK_OBJECT (composer));
- gtk_widget_hide (GTK_WIDGET (composer));
- mail_send_mail (transport->url, message, composer_sent_cb, send);
-}
-
-static void
-append_mail_cleanup (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data)
-{
- camel_message_info_free (info);
-}
-
-void
-composer_postpone_cb (EMsgComposer *composer, gpointer data)
-{
- extern CamelFolder *outbox_folder;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- struct post_send_data *psd = data;
-
- message = composer_get_message (composer);
- if (message == NULL)
- return;
- info = camel_message_info_new ();
- info->flags = CAMEL_MESSAGE_SEEN;
-
- mail_append_mail (outbox_folder, message, info, append_mail_cleanup, NULL);
- camel_object_unref (CAMEL_OBJECT (message));
-
- if (psd)
- camel_folder_set_message_flags (psd->folder, psd->uid, psd->flags, psd->flags);
-
- gtk_widget_destroy (GTK_WIDGET (composer));
-}
-
-static GtkWidget *
-create_msg_composer (const char *url)
-{
- const MailConfigAccount *account;
- gboolean send_html;
- EMsgComposer *composer;
-
- account = mail_config_get_default_account ();
- send_html = mail_config_get_send_html ();
-
- composer = url ? e_msg_composer_new_from_url (url) : e_msg_composer_new ();
-
- if (composer) {
- e_msg_composer_hdrs_set_from_account (E_MSG_COMPOSER_HDRS (composer->hdrs), account->name);
- e_msg_composer_set_send_html (composer, send_html);
- e_msg_composer_show_sig_file (composer);
- }
-
- return GTK_WIDGET (composer);
-}
-
-void
-compose_msg (GtkWidget *widget, gpointer user_data)
-{
- GtkWidget *composer;
-
- if (!check_send_configuration (FOLDER_BROWSER (user_data)))
- return;
-
- composer = create_msg_composer (NULL);
- if (!composer)
- return;
-
- gtk_signal_connect (GTK_OBJECT (composer), "send",
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (composer), "postpone",
- GTK_SIGNAL_FUNC (composer_postpone_cb), NULL);
-
- gtk_widget_show (composer);
-}
-
-/* Send according to a mailto (RFC 2368) URL. */
-void
-send_to_url (const char *url)
-{
- GtkWidget *composer;
-
- /* FIXME: no way to get folder browser? Not without
- * big pain in the ass, as far as I can tell */
- if (!check_send_configuration (NULL))
- return;
-
- composer = create_msg_composer (url);
- if (!composer)
- return;
-
- gtk_signal_connect (GTK_OBJECT (composer), "send",
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (composer), "postpone",
- GTK_SIGNAL_FUNC (composer_postpone_cb), NULL);
-
- gtk_widget_show (composer);
-}
-
-static GList *
-list_add_addresses (GList *list, const CamelInternetAddress *cia, const GSList *accounts,
- GHashTable *rcpt_hash, const MailConfigAccount **me,
- const char *ignore_addr)
-{
- const char *name, *addr;
- const GSList *l;
- gboolean notme;
- int i;
-
- for (i = 0; camel_internet_address_get (cia, i, &name, &addr); i++) {
- /* Make sure we don't want to ignore this address */
- if (!ignore_addr || g_strcasecmp (ignore_addr, addr)) {
-
- /* Here I'll check to see if the cc:'d address is the address
- of the sender, and if so, don't add it to the cc: list; this
- is to fix Bugzilla bug #455. */
- notme = TRUE;
- l = accounts;
- while (l) {
- const MailConfigAccount *acnt = l->data;
-
- if (!strcmp (acnt->id->address, addr)) {
- notme = FALSE;
- if (me && !*me)
- *me = acnt;
- break;
- }
-
- l = l->next;
- }
-
- if (notme && !g_hash_table_lookup (rcpt_hash, addr)) {
- EDestination *dest;
-
- dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, addr);
-
- list = g_list_append (list, dest);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
- }
- }
- }
-
- return list;
-}
-
-static const MailConfigAccount *
-guess_me (const CamelInternetAddress *to, const CamelInternetAddress *cc, const GSList *accounts)
-{
- const char *name, *addr;
- const GSList *l;
- gboolean notme;
- char *full;
- int i;
-
- if (to) {
- for (i = 0; camel_internet_address_get (to, i, &name, &addr); i++) {
- full = camel_internet_address_format_address (name, addr);
- l = accounts;
- while (l) {
- const MailConfigAccount *acnt = l->data;
-
- if (!g_strcasecmp (acnt->id->address, addr)) {
- notme = FALSE;
- return acnt;
- }
-
- l = l->next;
- }
- }
- }
-
- if (cc) {
- for (i = 0; camel_internet_address_get (cc, i, &name, &addr); i++) {
- full = camel_internet_address_format_address (name, addr);
- l = accounts;
- while (l) {
- const MailConfigAccount *acnt = l->data;
-
- if (!g_strcasecmp (acnt->id->address, addr)) {
- notme = FALSE;
- return acnt;
- }
-
- l = l->next;
- }
- }
- }
-
- return NULL;
-}
-
-static EMsgComposer *
-mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char *uid, int mode)
-{
- const CamelInternetAddress *reply_to, *sender, *to_addrs, *cc_addrs;
- const char *name = NULL, *address = NULL, *source = NULL;
- const char *message_id, *references, *reply_addr = NULL;
- char *text, *subject, date_str[100], *format;
- const MailConfigAccount *me = NULL;
- const GSList *accounts = NULL;
- GList *to = NULL, *cc = NULL;
- EDestination **tov, **ccv;
- EMsgComposer *composer;
- time_t date;
- const int max_subject_length = 1024;
-
- composer = e_msg_composer_new ();
- if (!composer)
- return NULL;
-
- sender = camel_mime_message_get_from (message);
- if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
- camel_internet_address_get (sender, 0, &name, &address);
- } else {
- name = _("an unknown sender");
- }
-
- date = camel_mime_message_get_date (message, NULL);
-
- strftime (date_str, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),
- localtime (&date));
- format = e_utf8_from_locale_string (date_str);
- text = mail_tool_quote_message (message, format, name && *name ? name : address);
- g_free (format);
-
- if (text) {
- e_msg_composer_set_body_text (composer, text);
- g_free (text);
- }
-
- /* Set the recipients */
- accounts = mail_config_get_accounts ();
-
- to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
-
- if (mode == REPLY_LIST) {
- CamelMessageInfo *info;
- const char *mlist;
- int i, max, len;
-
- info = camel_folder_get_message_info (folder, uid);
- mlist = camel_message_info_mlist (info);
-
- if (mlist) {
- /* look through the recipients to find the *real* mailing list address */
- len = strlen (mlist);
-
- to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- max = camel_address_length (CAMEL_ADDRESS (to_addrs));
- for (i = 0; i < max; i++) {
- camel_internet_address_get (to_addrs, i, &name, &address);
- if (!g_strncasecmp (address, mlist, len))
- break;
- }
-
- if (i == max) {
- cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
- max = camel_address_length (CAMEL_ADDRESS (cc_addrs));
- for (i = 0; i < max; i++) {
- camel_internet_address_get (cc_addrs, i, &name, &address);
- if (!g_strncasecmp (address, mlist, len))
- break;
- }
- }
-
- if (address && i != max) {
- EDestination *dest;
-
- dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, address);
-
- to = g_list_append (to, dest);
- }
- }
-
- me = guess_me (to_addrs, cc_addrs, accounts);
- } else {
- GHashTable *rcpt_hash;
-
- rcpt_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- reply_to = camel_mime_message_get_reply_to (message);
- if (!reply_to)
- reply_to = camel_mime_message_get_from (message);
- if (reply_to) {
- /* Get the Reply-To address so we can ignore references to it in the Cc: list */
- if (camel_internet_address_get (reply_to, 0, &name, &reply_addr)) {
- EDestination *dest;
-
- dest = e_destination_new ();
- e_destination_set_name (dest, name);
- e_destination_set_email (dest, reply_addr);
- g_message (">>>>>>>>>> [%s] [%s]", name, reply_addr);
- to = g_list_append (to, dest);
- g_hash_table_insert (rcpt_hash, (char *) reply_addr, GINT_TO_POINTER (1));
- }
- }
-
- if (mode == REPLY_ALL) {
- cc = list_add_addresses (cc, to_addrs, accounts, rcpt_hash, &me, NULL);
- cc = list_add_addresses (cc, cc_addrs, accounts, rcpt_hash, me ? NULL : &me, reply_addr);
- } else {
- me = guess_me (to_addrs, cc_addrs, accounts);
- }
-
- g_hash_table_destroy (rcpt_hash);
- }
-
- if (me == NULL) {
- /* as a last resort, set the replying account (aka me)
- to the account this was fetched from */
- source = camel_mime_message_get_source (message);
- me = mail_config_get_account_by_source_url (source);
- }
-
- /* Set the subject of the new message. */
- subject = (char *)camel_mime_message_get_subject (message);
- if (!subject)
- subject = g_strdup ("");
- else {
- if (!g_strncasecmp (subject, "Re: ", 4))
- subject = g_strndup (subject, max_subject_length);
- else {
- if (strlen (subject) < max_subject_length)
- subject = g_strdup_printf ("Re: %s", subject);
- else
- subject = g_strdup_printf ("Re: %.*s...", max_subject_length, subject);
- }
- }
-
- tov = e_destination_list_to_vector (to);
- ccv = e_destination_list_to_vector (cc);
-
- g_list_free (to);
- g_list_free (cc);
-
- e_msg_composer_set_headers (composer, me ? me->name : NULL, tov, ccv, NULL, subject);
-
- e_destination_freev (tov);
- e_destination_freev (ccv);
-
- g_free (subject);
-
- /* Add In-Reply-To and References. */
- message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id");
- references = camel_medium_get_header (CAMEL_MEDIUM (message), "References");
- if (message_id) {
- char *reply_refs;
-
- e_msg_composer_add_header (composer, "In-Reply-To", message_id);
-
- if (references)
- reply_refs = g_strdup_printf ("%s %s", references, message_id);
- else
- reply_refs = g_strdup (message_id);
-
- e_msg_composer_add_header (composer, "References", reply_refs);
- g_free (reply_refs);
- } else if (references) {
- e_msg_composer_add_header (composer, "References", references);
- }
-
- return composer;
-}
-
-static void
-requeue_mail_reply (CamelFolder *folder, char *uid, CamelMimeMessage *msg, void *data)
-{
- int mode = GPOINTER_TO_INT (data);
-
- mail_reply (folder, msg, uid, mode);
-}
-
-void
-mail_reply (CamelFolder *folder, CamelMimeMessage *msg, const char *uid, int mode)
-{
- EMsgComposer *composer;
- struct post_send_data *psd;
-
- g_return_if_fail (folder != NULL);
- g_return_if_fail (uid != NULL);
-
- if (!msg) {
- mail_get_message (folder, uid, requeue_mail_reply,
- GINT_TO_POINTER (mode), mail_thread_new);
- return;
- }
-
- psd = g_new (struct post_send_data, 1);
- psd->folder = folder;
- camel_object_ref (CAMEL_OBJECT (psd->folder));
- psd->uid = g_strdup (uid);
- psd->flags = CAMEL_MESSAGE_ANSWERED;
-
- composer = mail_generate_reply (folder, msg, uid, mode);
- if (!composer)
- return;
-
- gtk_signal_connect (GTK_OBJECT (composer), "send",
- GTK_SIGNAL_FUNC (composer_send_cb), psd);
- gtk_signal_connect (GTK_OBJECT (composer), "postpone",
- GTK_SIGNAL_FUNC (composer_postpone_cb), psd);
- gtk_signal_connect (GTK_OBJECT (composer), "destroy",
- GTK_SIGNAL_FUNC (free_psd), psd);
-
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
-}
-
-void
-reply_to_sender (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- if (!check_send_configuration (fb))
- return;
-
- mail_reply (fb->folder, fb->mail_display->current_message,
- fb->message_list->cursor_uid, REPLY_SENDER);
-}
-
-void
-reply_to_list (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- if (!check_send_configuration (fb))
- return;
-
- mail_reply (fb->folder, fb->mail_display->current_message,
- fb->message_list->cursor_uid, REPLY_LIST);
-}
-
-void
-reply_to_all (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- if (!check_send_configuration (fb))
- return;
-
- mail_reply (fb->folder, fb->mail_display->current_message,
- fb->message_list->cursor_uid, REPLY_ALL);
-}
-
-void
-enumerate_msg (MessageList *ml, const char *uid, gpointer data)
-{
- g_ptr_array_add ((GPtrArray *) data, g_strdup (uid));
-}
-
-
-static EMsgComposer *
-forward_get_composer (CamelMimeMessage *message, const char *subject)
-{
- const MailConfigAccount *account = NULL;
- EMsgComposer *composer;
-
- if (message) {
- const CamelInternetAddress *to_addrs, *cc_addrs;
- const GSList *accounts = NULL;
-
- accounts = mail_config_get_accounts ();
- to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
-
- account = guess_me (to_addrs, cc_addrs, accounts);
-
- if (!account) {
- const char *source;
-
- source = camel_mime_message_get_source (message);
- account = mail_config_get_account_by_source_url (source);
- }
- }
-
- if (!account)
- account = mail_config_get_default_account ();
-
- composer = e_msg_composer_new ();
- if (composer) {
- gtk_signal_connect (GTK_OBJECT (composer), "send",
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (composer), "postpone",
- GTK_SIGNAL_FUNC (composer_postpone_cb), NULL);
- e_msg_composer_set_headers (composer, account->name, NULL, NULL, NULL, subject);
- } else {
- g_warning ("Could not create composer");
- }
-
- return composer;
-}
-
-static void
-do_forward_non_attached (CamelFolder *folder, char *uid, CamelMimeMessage *message, void *data)
-{
- char *subject, *text;
- MailConfigForwardStyle style = GPOINTER_TO_INT (data);
-
- if (!message)
- return;
-
- subject = mail_tool_generate_forward_subject (message);
- text = mail_tool_forward_message (message, style == MAIL_CONFIG_FORWARD_QUOTED);
-
- if (text) {
- EMsgComposer *composer = forward_get_composer (message, subject);
- if (composer) {
- e_msg_composer_set_body_text (composer, text);
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
- }
- g_free (text);
- }
-
- g_free (subject);
-}
-
-static void
-forward_message (FolderBrowser *fb, MailConfigForwardStyle style)
-{
- if (!fb->message_list->cursor_uid)
- return;
- if (!check_send_configuration (fb))
- return;
-
- mail_get_message (fb->folder, fb->message_list->cursor_uid,
- do_forward_non_attached, GINT_TO_POINTER (style),
- mail_thread_new);
-}
-
-void
-forward_inline (GtkWidget *widget, gpointer user_data)
-{
- forward_message (user_data, MAIL_CONFIG_FORWARD_INLINE);
-}
-
-void
-forward_quoted (GtkWidget *widget, gpointer user_data)
-{
- forward_message (user_data, MAIL_CONFIG_FORWARD_QUOTED);
-}
-
-static void
-do_forward_attach (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data)
-{
- CamelMimeMessage *message = data;
-
- if (part) {
- EMsgComposer *composer = forward_get_composer (message, subject);
- if (composer) {
- e_msg_composer_attach (composer, part);
- gtk_widget_show (GTK_WIDGET (composer));
- e_msg_composer_unset_changed (composer);
- }
- }
-}
-
-void
-forward_attached (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = (FolderBrowser *)user_data;
- GPtrArray *uids;
-
- if (!check_send_configuration (fb))
- return;
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, enumerate_msg, uids);
- mail_build_attachment (fb->message_list->folder, uids, do_forward_attach,
- uids->len == 1 ? fb->mail_display->current_message : NULL);
-}
-
-void
-forward (GtkWidget *widget, gpointer user_data)
-{
- MailConfigForwardStyle style = mail_config_get_default_forward_style ();
-
- if (style == MAIL_CONFIG_FORWARD_ATTACHED)
- forward_attached (widget, user_data);
- else
- forward_message (user_data, style);
-}
-
-static void
-transfer_msg (GtkWidget *widget, gpointer user_data, gboolean delete_from_source)
-{
- FolderBrowser *fb = user_data;
- MessageList *ml = fb->message_list;
- GPtrArray *uids;
- char *uri, *physical, *path;
- char *desc;
- const char *allowed_types[] = { "mail", /*"vtrash",*/ NULL };
- extern EvolutionShellClient *global_shell_client;
- static char *last = NULL;
-
- if (last == NULL)
- last = g_strdup ("");
-
- if (delete_from_source)
- desc = _("Move message(s) to");
- else
- desc = _("Copy message(s) to");
-
- evolution_shell_client_user_select_folder (global_shell_client, desc, last,
- allowed_types, &uri, &physical);
- if (!uri)
- return;
-
- path = strchr (uri, '/');
- if (path && strcmp (last, path) != 0) {
- g_free (last);
- last = g_strdup_printf ("evolution:%s", path);
- }
- g_free (uri);
-
- uids = g_ptr_array_new ();
- message_list_foreach (ml, enumerate_msg, uids);
- mail_transfer_messages (ml->folder, uids, delete_from_source,
- physical, NULL, NULL);
-}
-
-void
-move_msg (GtkWidget *widget, gpointer user_data)
-{
- transfer_msg (widget, user_data, TRUE);
-}
-
-void
-copy_msg (GtkWidget *widget, gpointer user_data)
-{
- transfer_msg (widget, user_data, FALSE);
-}
-
-/* Copied from e-shell-view.c */
-static GtkWidget *
-find_socket (GtkContainer *container)
-{
- GList *children, *tmp;
-
- children = gtk_container_children (container);
- while (children) {
- if (BONOBO_IS_SOCKET (children->data))
- return children->data;
- else if (GTK_IS_CONTAINER (children->data)) {
- GtkWidget *socket = find_socket (children->data);
- if (socket)
- return socket;
- }
- tmp = children->next;
- g_list_free_1 (children);
- children = tmp;
- }
- return NULL;
-}
-
-void
-addrbook_sender (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- CamelMimeMessage *msg = NULL;
- const CamelInternetAddress *addr;
- gchar *addr_str;
- GtkWidget *win;
- GtkWidget *control;
- GtkWidget *socket;
-
- if (fb && fb->mail_display)
- msg = fb->mail_display->current_message;
-
- if (msg == NULL)
- return;
-
- addr = camel_mime_message_get_from (msg);
- if (addr == NULL)
- return;
-
- addr_str = camel_address_format (CAMEL_ADDRESS (addr));
-
- win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title (GTK_WINDOW (win), _("Sender"));
-
- control = bonobo_widget_new_control ("OAFIID:GNOME_Evolution_Addressbook_AddressPopup",
- CORBA_OBJECT_NIL);
- bonobo_widget_set_property (BONOBO_WIDGET (control),
- "email", addr_str,
- NULL);
-
- socket = find_socket (GTK_CONTAINER (control));
- gtk_signal_connect_object (GTK_OBJECT (socket),
- "destroy",
- GTK_SIGNAL_FUNC (gtk_widget_destroy),
- GTK_OBJECT (win));
-
- gtk_container_add (GTK_CONTAINER (win), control);
- gtk_widget_show_all (win);
-}
-
-void
-apply_filters (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- MessageList *ml = fb->message_list;
- GPtrArray *uids;
-
- uids = g_ptr_array_new ();
- message_list_foreach (ml, enumerate_msg, uids);
-
- mail_filter_on_demand(fb->folder, uids);
-}
-
-void
-select_all (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- MessageList *ml = fb->message_list;
- ESelectionModel *etsm = e_tree_get_selection_model (ml->tree);
-
- if (ml->folder == NULL)
- return;
-
- e_selection_model_select_all (etsm);
-}
-
-/* Thread selection */
-
-typedef struct thread_select_info {
- MessageList *ml;
- GPtrArray *paths;
-} thread_select_info_t;
-
-static gboolean
-select_node (ETreeModel *tm, ETreePath path, gpointer user_data)
-{
- thread_select_info_t *tsi = (thread_select_info_t *) user_data;
-
- g_ptr_array_add (tsi->paths, path);
- return FALSE; /*not done yet*/
-}
-
-static void
-thread_select_foreach (ETreePath path, gpointer user_data)
-{
- thread_select_info_t *tsi = (thread_select_info_t *) user_data;
- ETreeModel *tm = tsi->ml->model;
- ETreePath node;
-
- /* @path part of the initial selection. If it has children,
- * we select them as well. If it doesn't, we select its siblings and
- * their children (ie, the current node must be inside the thread
- * that the user wants to mark.
- */
-
- if (e_tree_model_node_get_first_child (tm, path))
- node = path;
- else {
- node = e_tree_model_node_get_parent (tm, path);
-
- /* Let's make an exception: if no parent, then we're about
- * to mark the whole tree. No. */
- if (e_tree_model_node_is_root (tm, node))
- node = path;
- }
-
- e_tree_model_node_traverse (tm, node, select_node, tsi);
-}
-
-void
-select_thread (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- MessageList *ml = fb->message_list;
- ETreeSelectionModel *selection_model;
- thread_select_info_t tsi;
- int i;
-
- if (ml->folder == NULL)
- return;
-
- /* For every selected item, select the thread containing it.
- * We can't alter the selection while iterating through it,
- * so build up a list of paths.
- */
-
- tsi.ml = ml;
- tsi.paths = g_ptr_array_new ();
-
- e_tree_selected_path_foreach (ml->tree, thread_select_foreach, &tsi);
-
- selection_model = E_TREE_SELECTION_MODEL (e_tree_get_selection_model (ml->tree));
-
- for (i = 0; i < tsi.paths->len; i++)
- e_tree_selection_model_add_to_selection (selection_model,
- tsi.paths->pdata[i]);
- g_ptr_array_free (tsi.paths, TRUE);
-}
-
-void
-invert_selection (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- MessageList *ml = fb->message_list;
- ESelectionModel *etsm = e_tree_get_selection_model (ml->tree);
-
- if (ml->folder == NULL)
- return;
-
- e_selection_model_invert_selection (etsm);
-}
-
-/* flag all selected messages. Return number flagged */
-static int
-flag_messages (FolderBrowser *fb, guint32 mask, guint32 set)
-{
- MessageList *ml = fb->message_list;
- GPtrArray *uids;
- int i;
-
- if (ml->folder == NULL)
- return 0;
-
- /* could just use specific callback but i'm lazy */
- uids = g_ptr_array_new ();
- message_list_foreach (ml, enumerate_msg, uids);
- camel_folder_freeze (ml->folder);
- for (i = 0; i < uids->len; i++) {
- camel_folder_set_message_flags (ml->folder, uids->pdata[i], mask, set);
- g_free (uids->pdata[i]);
- }
- camel_folder_thaw (ml->folder);
-
- g_ptr_array_free (uids, TRUE);
-
- return i;
-}
-
-static int
-toggle_flags (FolderBrowser *fb, guint32 mask)
-{
- MessageList *ml = fb->message_list;
- GPtrArray *uids;
- int i;
-
- if (ml->folder == NULL)
- return 0;
-
- /* could just use specific callback but i'm lazy */
- uids = g_ptr_array_new ();
- message_list_foreach (ml, enumerate_msg, uids);
- camel_folder_freeze (ml->folder);
- for (i = 0; i < uids->len; i++) {
- gint flags;
-
- flags = camel_folder_get_message_flags (ml->folder, uids->pdata[i]);
-
- if (flags & mask)
- camel_folder_set_message_flags (ml->folder, uids->pdata[i], mask, 0);
- else {
- if ((mask & CAMEL_MESSAGE_FLAGGED) && (flags & CAMEL_MESSAGE_DELETED))
- camel_folder_set_message_flags (ml->folder, uids->pdata[i], CAMEL_MESSAGE_DELETED, 0);
- camel_folder_set_message_flags (ml->folder, uids->pdata[i], mask, mask);
- }
-
- g_free (uids->pdata[i]);
- }
- camel_folder_thaw (ml->folder);
-
- g_ptr_array_free (uids, TRUE);
-
- return i;
-}
-
-void
-mark_as_seen (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-}
-
-void
-mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- /* Remove the automatic mark-as-read timer first */
- if (fb->seen_id) {
- gtk_timeout_remove (fb->seen_id);
- fb->seen_id = 0;
- }
-
- flag_messages (fb, CAMEL_MESSAGE_SEEN, 0);
-}
-
-void
-mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- select_all (uih, user_data, path);
- flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
-}
-
-void
-mark_as_important (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_DELETED, 0);
- flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED);
-}
-
-void
-mark_as_unimportant (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_FLAGGED, 0);
-}
-
-void
-toggle_as_important (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- toggle_flags (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_FLAGGED);
-}
-
-static void
-do_edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
-{
- /*FolderBrowser *fb = data;*/
- int i;
-
- for (i = 0; i < messages->len; i++) {
- EMsgComposer *composer;
- XEvolution *hdrs;
-
- hdrs = mail_tool_remove_xevolution_headers (messages->pdata[i]);
- mail_tool_destroy_xevolution (hdrs);
- camel_medium_remove_header (CAMEL_MEDIUM (messages->pdata[i]), "X-Mailer");
-
- composer = e_msg_composer_new_with_message (messages->pdata[i]);
-
- if (composer) {
- gtk_signal_connect (GTK_OBJECT (composer), "send",
- composer_send_cb, NULL);
- gtk_signal_connect (GTK_OBJECT (composer), "postpone",
- composer_postpone_cb, NULL);
-
- gtk_widget_show (GTK_WIDGET (composer));
- }
- }
-}
-
-static gboolean
-are_you_sure (const char *msg, GPtrArray *uids, FolderBrowser *fb)
-{
- GtkWidget *window = gtk_widget_get_ancestor (GTK_WIDGET (fb), GTK_TYPE_WINDOW);
- GtkWidget *dialog;
- char *buf;
- int button, i;
-
- buf = g_strdup_printf (msg, uids->len);
- dialog = gnome_ok_cancel_dialog_parented (buf, NULL, NULL, (GtkWindow *)window);
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- if (button != 0) {
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
- }
-
- return button == 0;
-}
-
-static void
-edit_msg_internal (FolderBrowser *fb)
-{
- GPtrArray *uids;
-
- if (!check_send_configuration (fb))
- return;
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, enumerate_msg, uids);
-
- if (uids->len > 10 && !are_you_sure (_("Are you sure you want to edit all %d messages?"), uids, fb)) {
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
-
- return;
- }
-
- mail_get_messages (fb->folder, uids, do_edit_messages, fb);
-}
-
-void
-edit_msg (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- if (!folder_browser_is_drafts (fb)) {
- GtkWidget *message;
-
- message = gnome_warning_dialog (_("You may only edit messages saved\n"
- "in the Drafts folder."));
- gnome_dialog_run_and_close (GNOME_DIALOG (message));
- return;
- }
-
- edit_msg_internal (fb);
-}
-
-static void
-do_resend_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
-{
- int i;
-
- for (i = 0; i < messages->len; i++) {
- /* generate a new Message-Id because they need to be unique */
- camel_mime_message_set_message_id (messages->pdata[i], NULL);
- }
-
- /* "Resend" should open up the composer to let the user edit the message */
- do_edit_messages (folder, uids, messages, data);
-}
-
-
-
-void
-resend_msg (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- GPtrArray *uids;
-
- if (!folder_browser_is_sent (fb)) {
- GtkWidget *message;
-
- message = gnome_warning_dialog (_("You may only resend messages\n"
- "in the Sent folder."));
- gnome_dialog_run_and_close (GNOME_DIALOG (message));
- return;
- }
-
- if (!check_send_configuration (fb))
- return;
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, enumerate_msg, uids);
-
- if (uids->len > 10 && !are_you_sure (_("Are you sure you want to resend all %d messages?"), uids, fb)) {
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
-
- return;
- }
-
- mail_get_messages (fb->folder, uids, do_resend_messages, fb);
-}
-
-void
-search_msg (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- GtkWidget *w;
-
- if (fb->mail_display->current_message == NULL) {
- gtk_widget_show_all (gnome_warning_dialog (_("No Message Selected")));
- return;
- }
-
- w = mail_search_new (fb->mail_display);
- gtk_widget_show_all (w);
-}
-
-void
-load_images (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- mail_display_load_images (fb->mail_display);
-}
-
-static void
-save_msg_ok (GtkWidget *widget, gpointer user_data)
-{
- CamelFolder *folder;
- GPtrArray *uids;
- const char *path;
- int fd, ret = 0;
-
- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (user_data));
- if (path[0] == '\0')
- return;
-
- fd = open (path, O_RDONLY);
- if (fd != -1) {
- GtkWidget *dialog;
- GtkWidget *text;
-
- close (fd);
-
- dialog = gnome_dialog_new (_("Overwrite file?"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- gtk_widget_set_parent (dialog, GTK_WIDGET (user_data));
- text = gtk_label_new (_("A file by that name already exists.\nOverwrite it?"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), text, TRUE, TRUE, 4);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
- gtk_widget_show (text);
-
- ret = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- }
-
- if (ret == 0) {
- folder = gtk_object_get_data (GTK_OBJECT (user_data), "folder");
- uids = gtk_object_get_data (GTK_OBJECT (user_data), "uids");
- gtk_object_remove_no_notify (GTK_OBJECT (user_data), "uids");
- mail_save_messages (folder, uids, path, NULL, NULL);
- gtk_widget_destroy (GTK_WIDGET (user_data));
- }
-}
-
-static void
-save_msg_destroy (gpointer user_data)
-{
- GPtrArray *uids = user_data;
-
- if (uids) {
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
- }
-}
-
-void
-save_msg (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- GtkFileSelection *filesel;
- GPtrArray *uids;
- char *title, *path;
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, enumerate_msg, uids);
-
- if (uids->len == 1)
- title = _("Save Message As...");
- else
- title = _("Save Messages As...");
-
- filesel = GTK_FILE_SELECTION (gtk_file_selection_new (title));
- path = g_strdup_printf ("%s/", g_get_home_dir ());
- gtk_file_selection_set_filename (filesel, path);
- g_free (path);
- gtk_object_set_data_full (GTK_OBJECT (filesel), "uids", uids, save_msg_destroy);
- gtk_object_set_data (GTK_OBJECT (filesel), "folder", fb->folder);
- gtk_signal_connect (GTK_OBJECT (filesel->ok_button),
- "clicked", GTK_SIGNAL_FUNC (save_msg_ok), filesel);
- gtk_signal_connect_object (GTK_OBJECT (filesel->cancel_button),
- "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
- GTK_OBJECT (filesel));
-
- gtk_widget_show (GTK_WIDGET (filesel));
-}
-
-void
-delete_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int deleted, row;
-
- deleted = flag_messages (fb, CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
- CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
-
- /* Select the next message if we are only deleting one message */
- if (deleted) {
- row = e_tree_row_of_node (fb->message_list->tree,
- e_tree_get_cursor (fb->message_list->tree));
-
- /* If this is the last message and deleted messages
- are hidden, select the previous */
- if ((row+1 == e_tree_row_count (fb->message_list->tree))
- && mail_config_get_hide_deleted ())
- message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_PREVIOUS,
- 0, CAMEL_MESSAGE_DELETED, FALSE);
- else
- message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT,
- 0, 0, FALSE);
- }
-}
-
-void
-undelete_msg (GtkWidget *button, gpointer user_data)
-{
- flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_DELETED, 0);
-}
-
-void
-next_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int row;
-
- row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT, 0, 0, FALSE);
-}
-
-void
-next_unread_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int row;
-
- row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_NEXT,
- 0, CAMEL_MESSAGE_SEEN, TRUE);
-}
-
-void
-next_flagged_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int row;
-
- row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_NEXT,
- CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, FALSE);
-}
-
-void
-previous_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int row;
-
- row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_PREVIOUS,
- 0, 0, FALSE);
-}
-
-void
-previous_unread_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int row;
-
- row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_PREVIOUS,
- 0, CAMEL_MESSAGE_SEEN, FALSE);
-}
-
-void
-previous_flagged_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- int row;
-
- row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_PREVIOUS,
- CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, TRUE);
-}
-
-struct _expunged_folder_data {
- FolderBrowser *fb;
- gboolean hidedeleted;
-};
-
-static void
-expunged_folder (CamelFolder *f, void *data)
-{
- FolderBrowser *fb = ((struct _expunged_folder_data *) data)->fb;
- gboolean hidedeleted = ((struct _expunged_folder_data *) data)->hidedeleted;
-
- fb->expunging = NULL;
- message_list_set_hidedeleted (fb->message_list, hidedeleted);
-
- g_free (data);
-}
-
-static gboolean
-confirm_expunge (void)
-{
- GtkWidget *dialog, *label, *checkbox;
- int button;
-
- if (!mail_config_get_confirm_expunge ())
- return TRUE;
-
- dialog = gnome_dialog_new (_("Warning"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
-
- label = gtk_label_new (_("This operation will permanently erase all messages marked as deleted. If you continue, you will not be able to recover these messages.\n\nReally erase these messages?"));
-
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 4);
-
- checkbox = gtk_check_button_new_with_label (_("Do not ask me again."));
- gtk_object_ref (GTK_OBJECT (checkbox));
- gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 4);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- if (button == 0 && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
- mail_config_set_confirm_expunge (FALSE);
-
- gtk_object_unref (GTK_OBJECT (checkbox));
-
- if (button == 0)
- return TRUE;
- else
- return FALSE;
-}
-
-void
-expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
-
- if (fb->folder && (fb->expunging == NULL || fb->folder != fb->expunging) && confirm_expunge ()) {
- struct _expunged_folder_data *data;
- CamelMessageInfo *info;
-
- data = g_malloc (sizeof (*data));
- data->fb = fb;
- data->hidedeleted = fb->message_list->hidedeleted;
-
- /* hide the deleted messages so user can't click on them while we expunge */
- message_list_set_hidedeleted (fb->message_list, TRUE);
-
- /* Only blank the mail display if the message being
- viewed is one of those to be expunged */
- if (fb->loaded_uid) {
- info = camel_folder_get_message_info (fb->folder, fb->loaded_uid);
-
- if (!info || info->flags & CAMEL_MESSAGE_DELETED)
- mail_display_set_message (fb->mail_display, NULL);
- }
-
- fb->expunging = fb->folder;
- mail_expunge_folder (fb->folder, expunged_folder, data);
- }
-}
-
-/********************** Begin Filter Editor ********************/
-
-static GtkWidget *filter_editor = NULL;
-
-static void
-filter_editor_destroy (GtkWidget *dialog, gpointer user_data)
-{
- filter_editor = NULL;
-}
-
-static void
-filter_editor_clicked (GtkWidget *dialog, int button, FolderBrowser *fb)
-{
- FilterContext *fc;
-
- if (button == 0) {
- char *user;
-
- fc = gtk_object_get_data (GTK_OBJECT (dialog), "context");
- user = g_strdup_printf ("%s/filters.xml", evolution_dir);
- rule_context_save ((RuleContext *)fc, user);
- g_free (user);
- }
-
- if (button != -1) {
- gnome_dialog_close (GNOME_DIALOG (dialog));
- }
-}
-
-static const char *filter_source_names[] = {
- "incoming",
- "outgoing",
- NULL,
-};
-
-void
-filter_edit (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- FilterContext *fc;
- char *user, *system;
-
- if (filter_editor) {
- gdk_window_raise (GTK_WIDGET (filter_editor)->window);
- return;
- }
-
- fc = filter_context_new ();
- user = g_strdup_printf ("%s/filters.xml", evolution_dir);
- system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
- rule_context_load ((RuleContext *)fc, system, user);
- g_free (user);
-
- if (((RuleContext *)fc)->error) {
- GtkWidget *dialog;
- gchar *err;
-
- err = g_strdup_printf (_("Error loading filter information:\n%s"),
- ((RuleContext *)fc)->error);
- dialog = gnome_warning_dialog (err);
- g_free (err);
-
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- return;
- }
-
- filter_editor = (GtkWidget *)filter_editor_new (fc, filter_source_names);
- gtk_window_set_title (GTK_WINDOW (filter_editor), _("Filters"));
-
- gtk_object_set_data_full (GTK_OBJECT (filter_editor), "context", fc, (GtkDestroyNotify)gtk_object_unref);
- gtk_signal_connect (GTK_OBJECT (filter_editor), "clicked", filter_editor_clicked, fb);
- gtk_signal_connect (GTK_OBJECT (filter_editor), "destroy", filter_editor_destroy, NULL);
- gtk_widget_show (GTK_WIDGET (filter_editor));
-}
-
-/********************** End Filter Editor ********************/
-
-void
-vfolder_edit_vfolders (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- vfolder_edit ();
-}
-
-void
-providers_config (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- static MailAccountsDialog *dialog = NULL;
-
- if (!dialog) {
- dialog = mail_accounts_dialog_new ((FOLDER_BROWSER (user_data))->shell);
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- dialog = NULL;
- } else {
- gdk_window_raise (GTK_WIDGET (dialog)->window);
- }
-}
-
-/*
- * FIXME: This routine could be made generic, by having a closure
- * function plus data, and having the whole process be taken care
- * of for you
- */
-static void
-do_mail_print (FolderBrowser *fb, gboolean preview)
-{
- GnomePrintContext *print_context;
- GnomePrintMaster *print_master;
- GnomePrintDialog *dialog;
- GnomePrinter *printer = NULL;
- int copies = 1;
- int collate = FALSE;
-
- if (!preview) {
- dialog = GNOME_PRINT_DIALOG (gnome_print_dialog_new (_("Print Message"),
- GNOME_PRINT_DIALOG_COPIES));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), GNOME_PRINT_PRINT);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (fb));
-
- switch (gnome_dialog_run (GNOME_DIALOG (dialog))) {
- case GNOME_PRINT_PRINT:
- break;
- case GNOME_PRINT_PREVIEW:
- preview = TRUE;
- break;
- case -1:
- return;
- default:
- gnome_dialog_close (GNOME_DIALOG (dialog));
- return;
- }
-
- gnome_print_dialog_get_copies (dialog, &copies, &collate);
- printer = gnome_print_dialog_get_printer (dialog);
- gnome_dialog_close (GNOME_DIALOG (dialog));
- }
-
- print_master = gnome_print_master_new ();
-
-/* FIXME: set paper size gnome_print_master_set_paper (print_master, */
-
- if (printer)
- gnome_print_master_set_printer (print_master, printer);
- gnome_print_master_set_copies (print_master, copies, collate);
- print_context = gnome_print_master_get_context (print_master);
- gtk_html_print (fb->mail_display->html, print_context);
- gnome_print_master_close (print_master);
-
- if (preview){
- gboolean landscape = FALSE;
- GnomePrintMasterPreview *preview;
-
- preview = gnome_print_master_preview_new_with_orientation (
- print_master, _("Print Preview"), landscape);
- gtk_widget_show (GTK_WIDGET (preview));
- } else {
- int result = gnome_print_master_print (print_master);
-
- if (result == -1){
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Printing of message failed"));
- }
- }
- gtk_object_unref (GTK_OBJECT (print_master));
-}
-
-void
-print_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = user_data;
-
- do_mail_print (fb, FALSE);
-}
-
-void
-print_preview_msg (GtkWidget *button, gpointer user_data)
-{
- FolderBrowser *fb = user_data;
-
- do_mail_print (fb, TRUE);
-}
-
-/******************** Begin Subscription Dialog ***************************/
-
-static GtkObject *subscribe_dialog = NULL;
-
-static void
-subscribe_dialog_destroy (GtkWidget *widget, gpointer user_data)
-{
- subscribe_dialog = NULL;
-}
-
-void
-manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- if (!subscribe_dialog) {
- subscribe_dialog = subscribe_dialog_new ();
- gtk_signal_connect (GTK_OBJECT (subscribe_dialog), "destroy",
- subscribe_dialog_destroy, NULL);
-
- subscribe_dialog_run_and_close (SUBSCRIBE_DIALOG (subscribe_dialog));
- gtk_object_unref (GTK_OBJECT (subscribe_dialog));
- } else {
- gdk_window_raise (SUBSCRIBE_DIALOG (subscribe_dialog)->app->window);
- }
-}
-
-/******************** End Subscription Dialog ***************************/
-
-void
-configure_folder (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- FolderBrowser *fb = FOLDER_BROWSER(user_data);
-
- mail_local_reconfigure_folder(fb);
-}
-
-static void
-do_view_message (CamelFolder *folder, char *uid, CamelMimeMessage *message, void *data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (data);
-
- if (message && fb) {
- GtkWidget *mb;
-
- camel_folder_set_message_flags (folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- mb = message_browser_new (fb->shell, fb->uri, uid);
- gtk_widget_show (mb);
- }
-}
-
-void
-view_msg (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- GPtrArray *uids;
- int i;
-
- if (!fb->folder)
- return;
-
- uids = g_ptr_array_new ();
- message_list_foreach (fb->message_list, enumerate_msg, uids);
-
- if (uids->len > 10 && !are_you_sure (_("Are you sure you want to open all %d messages in separate windows?"), uids, fb))
- return;
-
- for (i = 0; i < uids->len; i++) {
- mail_get_message (fb->folder, uids->pdata [i], do_view_message, fb, mail_thread_queued);
- g_free (uids->pdata [i]);
- }
- g_ptr_array_free (uids, TRUE);
-}
-
-void
-open_msg (GtkWidget *widget, gpointer user_data)
-{
- FolderBrowser *fb = FOLDER_BROWSER (user_data);
- extern CamelFolder *outbox_folder;
-
- if (folder_browser_is_drafts (fb) || fb->folder == outbox_folder)
- edit_msg_internal (fb);
- else
- view_msg (NULL, user_data);
-}
-
-void
-open_message (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- open_msg (NULL, user_data);
-}
-
-void
-edit_message (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- edit_msg (NULL, user_data);
-}
-
-void
-stop_threads (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- camel_operation_cancel (NULL);
-}
-
-static void
-empty_trash_expunged_cb (CamelFolder *folder, void *data)
-{
- camel_object_unref (CAMEL_OBJECT (folder));
-}
-
-void
-empty_trash (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- MailConfigAccount *account;
- CamelProvider *provider;
- CamelFolder *vtrash;
- const GSList *accounts;
- CamelException ex;
- gboolean async;
-
- /* the only time all three args are NULL is for empty-on-exit */
- async = !(uih == NULL && user_data == NULL && path == NULL);
-
- camel_exception_init (&ex);
-
- /* expunge all remote stores */
- accounts = mail_config_get_accounts ();
- while (accounts) {
- account = accounts->data;
-
- /* make sure this is a valid source */
- if (account->source && account->source->url) {
- provider = camel_session_get_provider (session, account->source->url, &ex);
- if (provider) {
- /* make sure this store is a remote store */
- if (provider->flags & CAMEL_PROVIDER_IS_STORAGE &&
- provider->flags & CAMEL_PROVIDER_IS_REMOTE) {
- vtrash = mail_tool_get_trash (account->source->url, &ex);
-
- if (vtrash) {
- if (async)
- mail_expunge_folder (vtrash, empty_trash_expunged_cb, NULL);
- else
- camel_folder_sync (vtrash, TRUE, NULL);
- }
- }
- }
-
- /* clear the exception for the next round */
- camel_exception_clear (&ex);
- }
- accounts = accounts->next;
- }
-
- /* Now empty the local trash folder */
- vtrash = mail_tool_get_trash ("file:/", &ex);
- if (vtrash) {
- if (async)
- mail_expunge_folder (vtrash, empty_trash_expunged_cb, NULL);
- else
- camel_folder_sync (vtrash, TRUE, NULL);
- }
-
- camel_exception_clear (&ex);
-}
diff --git a/mail/mail-callbacks.h b/mail/mail-callbacks.h
deleted file mode 100644
index 42d3004c38..0000000000
--- a/mail/mail-callbacks.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 MAIL_CALLBACKS_H
-#define MAIL_CALLBACKS_H
-
-#include <camel/camel.h>
-#include "composer/e-msg-composer.h"
-#include <mail/mail-types.h>
-#include "evolution-storage.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-/* these are the possible modes for replying */
-enum {
- REPLY_SENDER,
- REPLY_LIST,
- REPLY_ALL
-};
-
-void enumerate_msg (MessageList *ml, const char *uid, gpointer data);
-
-void fetch_mail (GtkWidget *widget, gpointer user_data);
-void send_queued_mail (GtkWidget *widget, gpointer user_data);
-void send_receive_mail (GtkWidget *widget, gpointer user_data);
-
-void compose_msg (GtkWidget *widget, gpointer user_data);
-void send_to_url (const char *url);
-
-void forward_inline (GtkWidget *widget, gpointer user_data);
-void forward_quoted (GtkWidget *widget, gpointer user_data);
-void forward_attached (GtkWidget *widget, gpointer user_data);
-void forward (GtkWidget *widget, gpointer user_data);
-
-void reply_to_sender (GtkWidget *widget, gpointer user_data);
-void reply_to_list (GtkWidget *widget, gpointer user_data);
-void reply_to_all (GtkWidget *widget, gpointer user_data);
-
-void delete_msg (GtkWidget *widget, gpointer user_data);
-void undelete_msg (GtkWidget *widget, gpointer user_data);
-void move_msg (GtkWidget *widget, gpointer user_data);
-void copy_msg (GtkWidget *widget, gpointer user_data);
-void addrbook_sender (GtkWidget *widget, gpointer user_data);
-void apply_filters (GtkWidget *widget, gpointer user_data);
-void print_msg (GtkWidget *widget, gpointer user_data);
-void print_preview_msg (GtkWidget *widget, gpointer user_data);
-void edit_msg (GtkWidget *widget, gpointer user_data);
-void open_msg (GtkWidget *widget, gpointer user_data);
-void save_msg (GtkWidget *widget, gpointer user_data);
-void view_msg (GtkWidget *widget, gpointer user_data);
-void view_source (GtkWidget *widget, gpointer user_data);
-void next_msg (GtkWidget *widget, gpointer user_data);
-void next_unread_msg (GtkWidget *widget, gpointer user_data);
-void next_flagged_msg (GtkWidget *widget, gpointer user_data);
-void previous_msg (GtkWidget *widget, gpointer user_data);
-void previous_unread_msg (GtkWidget *widget, gpointer user_data);
-void previous_flagged_msg (GtkWidget *widget, gpointer user_data);
-void resend_msg (GtkWidget *widget, gpointer user_data);
-void search_msg (GtkWidget *widget, gpointer user_data);
-void load_images (GtkWidget *widget, gpointer user_data);
-
-void select_all (BonoboUIComponent *uih, void *user_data, const char *path);
-void select_thread (BonoboUIComponent *uih, void *user_data, const char *path);
-void invert_selection (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_important (BonoboUIComponent *uih, void *user_data, const char *path);
-void mark_as_unimportant (BonoboUIComponent *uih, void *user_data, const char *path);
-void toggle_as_important (BonoboUIComponent *uih, void *user_data, const char *path);
-
-void edit_message (BonoboUIComponent *uih, void *user_data, const char *path);
-void open_message (BonoboUIComponent *uih, void *user_data, const char *path);
-void expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path);
-void filter_edit (BonoboUIComponent *uih, void *user_data, const char *path);
-void vfolder_edit_vfolders (BonoboUIComponent *uih, void *user_data, const char *path);
-void providers_config (BonoboUIComponent *uih, void *user_data, const char *path);
-void manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path);
-
-void configure_folder (BonoboUIComponent *uih, void *user_data, const char *path);
-
-void stop_threads (BonoboUIComponent *uih, void *user_data, const char *path);
-
-void empty_trash (BonoboUIComponent *uih, void *user_data, const char *path);
-
-void mail_reply (CamelFolder *folder, CamelMimeMessage *msg, const char *uid, int mode);
-
-void composer_send_cb (EMsgComposer *composer, gpointer data);
-void composer_postpone_cb (EMsgComposer *composer, gpointer data);
-
-void forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean inline);
-
-/* CamelStore callbacks */
-void folder_created (CamelStore *store, const char *prefix, CamelFolderInfo *fi);
-void folder_deleted (CamelStore *store, CamelFolderInfo *fi);
-
-void mail_storage_create_folder (EvolutionStorage *storage, CamelStore *store, CamelFolderInfo *fi);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! MAIL_CALLBACKS_H */
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
deleted file mode 100644
index d86cfae3d4..0000000000
--- a/mail/mail-config-druid.c
+++ /dev/null
@@ -1,916 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- * Iain Holmes <iain@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/types.h>
-#include <sys/utsname.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-druid.h>
-#include <libgnomeui/gnome-druid-page-standard.h>
-#include <glade/glade.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gal/widgets/e-unicode.h>
-#include "mail-config-druid.h"
-#include "mail-config.h"
-#include "mail-ops.h"
-#include "mail.h"
-#include "mail-session.h"
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-
-#include <evolution-wizard.h>
-
-static void mail_config_druid_class_init (MailConfigDruidClass *class);
-static void mail_config_druid_finalize (GtkObject *obj);
-
-static GtkWindowClass *parent_class;
-
-/* These globals need fixed FIXME FIXME FIXME FIXME*/
-static GHashTable *page_hash = NULL;
-static GList *page_list = NULL;
-static EvolutionWizard *account_wizard;
-
-#define WIZARD_IID "OAFIID:GNOME_Evolution_Mail_Wizard_Factory"
-
-typedef struct {
- MailAccountGui *gui;
-
- MailConfigAccount *account;
- EvolutionWizard *wizard;
-
- gboolean identity_copied;
- CamelProvider *last_source;
-} MailConfigWizard;
-
-GtkType
-mail_config_druid_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "MailConfigDruid",
- sizeof (MailConfigDruid),
- sizeof (MailConfigDruidClass),
- (GtkClassInitFunc) mail_config_druid_class_init,
- (GtkObjectInitFunc) NULL,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gtk_window_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-mail_config_druid_class_init (MailConfigDruidClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (gtk_window_get_type ());
-
- /* override methods */
- object_class->finalize = mail_config_druid_finalize;
-}
-
-static void
-mail_config_druid_finalize (GtkObject *obj)
-{
- MailConfigDruid *druid = (MailConfigDruid *) obj;
- CORBA_Environment ev;
-
- gtk_object_destroy (GTK_OBJECT (druid->xml));
-
- CORBA_exception_init (&ev);
- Bonobo_EventSource_removeListener ((Bonobo_EventSource) druid->event_source, druid->id, &ev);
- CORBA_exception_free (&ev);
-
- bonobo_object_release_unref ((Bonobo_Unknown) druid->event_source, &ev);
- bonobo_object_unref (BONOBO_OBJECT (druid->listener));
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-
-static struct {
- char *name;
- char *text;
-} info[] = {
- { "identity_html",
- N_("Please enter your name and email address below. The \"optional\" fields below do not need to be filled in,\nunless you wish to include this information in email you send.") },
- { "source_html",
- N_("Please enter information about your incoming mail server below. If you are not sure, ask your system\nadministrator or Internet Service Provider.") },
- { "extra_html",
- N_("Please select among the following options") },
- { "transport_html",
- N_("Please enter information about the way you will send mail. If you are not sure, ask your system\nadministrator or Internet Service Provider.") },
- { "management_html",
- N_("You are almost done with the mail configuration process. The identity, incoming mail server and\noutgoing mail transport method which you provided will be grouped together to\nmake an Evolution mail account. Please enter a name for this account in the space below.\nThis name will be used for display purposes only.") }
-};
-static int num_info = (sizeof (info) / sizeof (info[0]));
-
-static GtkWidget *
-create_label (const char *name)
-{
- GtkWidget *widget, *align;
- int i;
-
- for (i = 0; i < num_info; i++) {
- if (!strcmp (name, info[i].name))
- break;
- }
- g_return_val_if_fail (i != num_info, NULL);
-
- widget = gtk_label_new (_(info[i].text));
-
- align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
- gtk_container_add (GTK_CONTAINER (align), widget);
-
- gtk_widget_show_all (align);
- return align;
-}
-
-static void
-druid_cancel (GnomeDruid *druid, gpointer user_data)
-{
- MailConfigDruid *config = user_data;
- GNOME_Evolution_Wizard wiz;
- CORBA_Environment ev;
-
- wiz = bonobo_object_corba_objref (BONOBO_OBJECT (account_wizard));
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Wizard_notifyAction (wiz, 0, GNOME_Evolution_Wizard_CANCEL, &ev);
- CORBA_exception_free (&ev);
-
- if (page_list != NULL) {
- g_list_free (page_list);
- page_list = NULL;
- }
-
- if (page_hash != NULL) {
- g_hash_table_destroy (page_hash);
- page_hash = NULL;
- }
-
- gtk_widget_destroy (GTK_WIDGET (config));
-}
-
-static void
-druid_finish (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
-{
- MailConfigDruid *druid = user_data;
-
- gtk_object_set_data (GTK_OBJECT (account_wizard), "account-data", NULL);
- if (page_list != NULL) {
- g_list_free (page_list);
- page_list = NULL;
- }
-
- if (page_hash != NULL) {
- g_hash_table_destroy (page_hash);
- page_hash = NULL;
- }
-
- gtk_widget_destroy (GTK_WIDGET (druid));
-}
-
-/* Identity Page */
-static void
-identity_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *gui = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- next_sensitive = mail_account_gui_identity_complete (gui->gui, &incomplete);
-
- evolution_wizard_set_buttons_sensitive (gui->wizard, TRUE, next_sensitive, TRUE, NULL);
-
- if (!next_sensitive)
- gtk_widget_grab_focus (incomplete);
-}
-
-static void
-identity_prepare (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
-
- gtk_widget_grab_focus (GTK_WIDGET (gui->gui->full_name));
- identity_changed (NULL, data);
-}
-
-static gboolean
-identity_next (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
-
- if (!gui->identity_copied) {
- char *username;
-
- /* Copy the username part of the email address into
- * the Username field of the source and transport pages.
- */
- username = gtk_entry_get_text (gui->gui->email_address);
- username = g_strndup (username, strcspn (username, "@"));
- gtk_entry_set_text (gui->gui->source.username, username);
- gtk_entry_set_text (gui->gui->transport.username, username);
- g_free (username);
-
- gui->identity_copied = TRUE;
- }
-
- return FALSE;
-}
-
-/* Incoming mail Page */
-static void
-source_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *gui = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- next_sensitive = mail_account_gui_source_complete (gui->gui, &incomplete);
-
- evolution_wizard_set_buttons_sensitive (gui->wizard, TRUE, next_sensitive, TRUE, NULL);
-
- if (!next_sensitive)
- gtk_widget_grab_focus (incomplete);
-}
-
-static void
-source_prepare (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
-
- source_changed (NULL, gui);
-}
-
-static gboolean
-source_next (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
- GtkWidget *transport_page;
-
- /* FIXME: if online, check that the data is good. */
-
- if (gui->gui->source.provider && gui->gui->source.provider->extra_conf)
- return FALSE;
-
- /* Otherwise, skip to transport page. */
- transport_page = glade_xml_get_widget (gui->gui->xml, "transport_page");
- evolution_wizard_set_page (gui->wizard, 3, NULL);
-#if 0
- gnome_druid_set_page (config->druid, GNOME_DRUID_PAGE (transport_page));
-#endif
-
- return TRUE;
-}
-
-/* Extra Config Page */
-static void
-extra_prepare (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
-
- if (gui->gui->source.provider != gui->last_source) {
- gui->last_source = gui->gui->source.provider;
- mail_account_gui_build_extra_conf (gui->gui, NULL);
- }
-}
-
-/* Transport Page */
-static void
-transport_prepare (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- next_sensitive = mail_account_gui_transport_complete (gui->gui, &incomplete);
-
- evolution_wizard_set_buttons_sensitive (gui->wizard, TRUE, next_sensitive, TRUE, NULL);
-
- if (!next_sensitive)
- gtk_widget_grab_focus (incomplete);
-}
-
-static gboolean
-transport_next (EvolutionWizard *wizard, gpointer data)
-{
- /* FIXME: if online, check that the data is good. */
- return FALSE;
-}
-
-static gboolean
-transport_back (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
-
- if (gui->gui->source.provider && gui->gui->source.provider->extra_conf)
- return FALSE;
- else {
- evolution_wizard_set_page (wizard, 1, NULL);
- return TRUE;
- }
-}
-
-static void
-transport_changed (GtkWidget *widget, gpointer data)
-{
- transport_prepare (NULL, data);
-}
-
-/* Management page */
-static void
-management_check (MailConfigWizard *wizard)
-{
- gboolean next_sensitive;
- char *text;
-
- text = gtk_entry_get_text (wizard->gui->account_name);
- next_sensitive = text && *text;
-
- /* no accounts with the same name */
- if (next_sensitive && mail_config_get_account_by_name (text))
- next_sensitive = FALSE;
-
- evolution_wizard_set_buttons_sensitive (wizard->wizard, TRUE,
- next_sensitive, TRUE, NULL);
-}
-
-static void
-management_prepare (EvolutionWizard *wizard, gpointer data)
-{
- MailConfigWizard *gui = data;
- char *name;
-
- name = gtk_entry_get_text (gui->gui->email_address);
- if (name && *name)
- gtk_entry_set_text (gui->gui->account_name, name);
-
- management_check (gui);
-}
-
-static void
-management_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *gui = data;
-
- management_check (gui);
-}
-
-static MailConfigAccount *
-make_account (void)
-{
- MailConfigAccount *account;
- char *name, *user;
- struct utsname uts;
-
- account = g_new0 (MailConfigAccount, 1);
-
- account->id = g_new0 (MailConfigIdentity, 1);
- name = g_get_real_name ();
- account->id->name = e_utf8_from_locale_string (name);
- user = getenv ("USER");
- if (user && !uname (&uts) && strchr (uts.nodename, '.'))
- account->id->address = g_strdup_printf ("%s@%s", user, uts.nodename);
-
- if (mail_config_get_default_transport ())
- account->transport = service_copy (mail_config_get_default_transport ());
-
- return account;
-}
-
-static const char *pages[] = {
- "identity_page",
- "source_page",
- "extra_page",
- "transport_page",
- "management_page",
- "finish_page",
- NULL
-};
-
-static int
-page_to_num (gpointer page)
-{
- gpointer r;
-
- r = g_hash_table_lookup (page_hash, page);
- if (r == NULL) {
- return 0;
- }
-
- return GPOINTER_TO_INT (r);
-}
-
-static gboolean
-next_func (GnomeDruidPage *page,
- GnomeDruid *druid,
- gpointer data)
-{
- GNOME_Evolution_Wizard wiz;
- CORBA_Environment ev;
- int pagenum;
-
- wiz = bonobo_object_corba_objref (BONOBO_OBJECT (account_wizard));
- CORBA_exception_init (&ev);
-
- pagenum = page_to_num (page);
- GNOME_Evolution_Wizard_notifyAction (wiz, pagenum, GNOME_Evolution_Wizard_NEXT, &ev);
- CORBA_exception_free (&ev);
- return FALSE;
-}
-
-static gboolean
-prepare_func (GnomeDruidPage *page,
- GnomeDruid *druid,
- gpointer data)
-{
- GNOME_Evolution_Wizard wiz;
- CORBA_Environment ev;
- int pagenum;
-
- wiz = bonobo_object_corba_objref (BONOBO_OBJECT (account_wizard));
- CORBA_exception_init (&ev);
-
- pagenum = page_to_num (page);
- GNOME_Evolution_Wizard_notifyAction (wiz, pagenum, GNOME_Evolution_Wizard_PREPARE, &ev);
- CORBA_exception_free (&ev);
- return FALSE;
-}
-
-static gboolean
-back_func (GnomeDruidPage *page,
- GnomeDruid *druid,
- gpointer data)
-{
- GNOME_Evolution_Wizard wiz;
- CORBA_Environment ev;
- int pagenum;
-
- wiz = bonobo_object_corba_objref (BONOBO_OBJECT (account_wizard));
- CORBA_exception_init (&ev);
-
- pagenum = page_to_num (page);
- GNOME_Evolution_Wizard_notifyAction (wiz, pagenum, GNOME_Evolution_Wizard_BACK, &ev);
- CORBA_exception_free (&ev);
- return FALSE;
-}
-
-static gboolean
-finish_func (GnomeDruidPage *page,
- GnomeDruid *druid,
- gpointer data)
-{
- GNOME_Evolution_Wizard wiz;
- CORBA_Environment ev;
- int pagenum;
-
- wiz = bonobo_object_corba_objref (BONOBO_OBJECT (account_wizard));
- CORBA_exception_init (&ev);
-
- pagenum = page_to_num (page);
- GNOME_Evolution_Wizard_notifyAction (wiz, 0, GNOME_Evolution_Wizard_FINISH, &ev);
- CORBA_exception_free (&ev);
-
- druid_finish (page, druid, data);
- return FALSE;
-}
-
-static void
-wizard_listener_event (BonoboListener *listener,
- char *event_name,
- BonoboArg *event_data,
- CORBA_Environment *ev,
- MailConfigDruid *druid)
-{
- CORBA_short buttons, pagenum;
- GnomeDruidPage *page;
-
- if (strcmp (event_name, EVOLUTION_WIZARD_SET_BUTTONS_SENSITIVE) == 0) {
- buttons = (int) *((CORBA_short *)event_data->_value);
- gnome_druid_set_buttons_sensitive (GNOME_DRUID (druid->druid),
- (buttons & 4) >> 2,
- (buttons & 2) >> 1,
- (buttons & 1));
- } else if (strcmp (event_name, EVOLUTION_WIZARD_SET_SHOW_FINISH) == 0) {
- gnome_druid_set_show_finish (GNOME_DRUID (druid->druid),
- (gboolean) *((CORBA_boolean *)event_data->_value));
- } else if (strcmp (event_name, EVOLUTION_WIZARD_SET_PAGE) == 0) {
- pagenum = (int) *((CORBA_short *) event_data->_value);
-
- page = g_list_nth_data (page_list, pagenum - 1);
- gnome_druid_set_page (GNOME_DRUID (druid->druid), page);
- }
-}
-
-static void
-construct (MailConfigDruid *druid)
-{
- GtkWidget *widget;
- GNOME_Evolution_Wizard corba_wizard;
- Bonobo_Listener corba_listener;
- CORBA_Environment ev;
- int i;
-
- /* Start account wizard */
- CORBA_exception_init (&ev);
- corba_wizard = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Mail_Wizard", 0, NULL, &ev);
- CORBA_exception_free (&ev);
- g_assert (account_wizard != NULL);
-
- druid->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL);
- /* get our toplevel widget and reparent it */
- widget = glade_xml_get_widget (druid->xml, "druid");
- gtk_widget_reparent (widget, GTK_WIDGET (druid));
-
- druid->druid = GNOME_DRUID (widget);
-
- /* set window title */
- gtk_window_set_title (GTK_WINDOW (druid), _("Evolution Account Assistant"));
- gtk_window_set_policy (GTK_WINDOW (druid), FALSE, TRUE, FALSE);
- gtk_window_set_modal (GTK_WINDOW (druid), TRUE);
- gtk_object_set (GTK_OBJECT (druid), "type", GTK_WINDOW_DIALOG, NULL);
-
-
- druid->listener = bonobo_listener_new (NULL, NULL);
- gtk_signal_connect (GTK_OBJECT (druid->listener), "event-notify",
- GTK_SIGNAL_FUNC (wizard_listener_event), druid);
- corba_listener = bonobo_object_corba_objref (BONOBO_OBJECT (druid->listener));
- CORBA_exception_init (&ev);
- druid->event_source = (Bonobo_Unknown) bonobo_object_query_interface (
- BONOBO_OBJECT (account_wizard), "IDL:Bonobo/EventSource:1.0");
- g_assert (druid->event_source != CORBA_OBJECT_NIL);
- druid->id = Bonobo_EventSource_addListener ((Bonobo_EventSource) druid->event_source, corba_listener, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Error adding listener (%s)",
- CORBA_exception_id (&ev));
- }
- CORBA_exception_free (&ev);
-
- if (page_hash != NULL) {
- g_hash_table_destroy (page_hash);
- }
- page_hash = g_hash_table_new (NULL, NULL);
- for (i = 0; pages[i] != NULL; i++) {
- GtkWidget *page;
- GnomeDruidPageStandard *dpage;
-
- page = glade_xml_get_widget (druid->xml, pages[i]);
- /* Store pages */
- g_hash_table_insert (page_hash, page, GINT_TO_POINTER (i));
- page_list = g_list_append (page_list, page);
-
- gtk_signal_connect (GTK_OBJECT (page), "next",
- GTK_SIGNAL_FUNC (next_func), druid);
- gtk_signal_connect (GTK_OBJECT (page), "prepare",
- GTK_SIGNAL_FUNC (prepare_func), druid);
- gtk_signal_connect (GTK_OBJECT (page), "back",
- GTK_SIGNAL_FUNC (back_func), druid);
-
- gtk_signal_connect (GTK_OBJECT (page), "finish",
- GTK_SIGNAL_FUNC (finish_func), druid);
-
- if (i != 5) {
- Bonobo_Control control;
- GtkWidget *w;
- CORBA_Environment ev;
-
- dpage = GNOME_DRUID_PAGE_STANDARD (page);
-
- CORBA_exception_init (&ev);
- control = GNOME_Evolution_Wizard_getControl (corba_wizard, i, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Error getting page %d: %s", i,
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- continue;
- }
-
- w = bonobo_widget_new_control_from_objref (control,
- CORBA_OBJECT_NIL);
- gtk_box_pack_start (GTK_BOX (dpage->vbox), w, TRUE,
- TRUE, 0);
- gtk_widget_show_all (w);
- }
- }
- gtk_signal_connect (GTK_OBJECT (druid->druid), "cancel", druid_cancel, druid);
-
- gnome_druid_set_buttons_sensitive (druid->druid, FALSE, TRUE, TRUE);
-}
-
-MailConfigDruid *
-mail_config_druid_new (GNOME_Evolution_Shell shell)
-{
- MailConfigDruid *new;
-
- new = (MailConfigDruid *) gtk_type_new (mail_config_druid_get_type ());
- construct (new);
- new->shell = shell;
-
- return new;
-}
-
-static BonoboControl *
-get_fn (EvolutionWizard *wizard,
- int page_num,
- void *closure)
-{
- MailConfigWizard *gui = closure;
- BonoboControl *control;
- GtkWidget *vbox, *widget;
- static gboolean first_time = TRUE;
-
- if (gui->gui == NULL) {
- if (gui->account == NULL) {
- gui->account = make_account ();
- gtk_object_set_data (GTK_OBJECT (wizard), "account-data",
- gui->account);
- }
-
- gui->gui = mail_account_gui_new (gui->account);
-
- /* set up signals, etc */
- gtk_signal_connect (GTK_OBJECT (gui->gui->account_name),
- "changed", management_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->full_name),
- "changed", identity_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->email_address),
- "changed", identity_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->source.hostname),
- "changed", source_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->source.username),
- "changed", source_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->source.path),
- "changed", source_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->transport.hostname),
- "changed", transport_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->transport.username),
- "changed", transport_changed, gui);
- first_time = TRUE;
- }
-
- /* Fill in the druid pages */
- vbox = gtk_vbox_new (FALSE, 0);
- switch (page_num) {
- case 0:
- widget = create_label ("identity_html");
- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- widget = glade_xml_get_widget (gui->gui->xml, "identity_required_frame");
- gtk_widget_reparent (widget, vbox);
- gtk_box_set_child_packing (GTK_BOX (vbox), widget, FALSE, FALSE, 0, GTK_PACK_START);
- widget = glade_xml_get_widget (gui->gui->xml, "identity_optional_frame");
- gtk_widget_reparent (widget, vbox);
- gtk_box_set_child_packing (GTK_BOX (vbox), widget, FALSE, FALSE, 0, GTK_PACK_START);
- break;
-
- case 1:
- widget = create_label ("source_html");
- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- widget = glade_xml_get_widget (gui->gui->xml, "source_vbox");
- gtk_widget_reparent (widget, vbox);
- gtk_widget_show (widget);
- break;
-
- case 2:
- widget = create_label ("extra_html");
- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- widget = glade_xml_get_widget (gui->gui->xml, "extra_vbox");
- gtk_widget_reparent (widget, vbox);
- break;
-
- case 3:
- widget = create_label ("transport_html");
- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- widget = glade_xml_get_widget (gui->gui->xml, "transport_vbox");
- gtk_widget_reparent (widget, vbox);
- gtk_widget_show (widget);
- break;
-
- case 4:
- widget = glade_xml_get_widget (gui->gui->xml, "management_frame");
- gtk_widget_reparent (widget, vbox);
- break;
-
- default:
- return NULL;
- }
-
- gtk_widget_show (vbox);
- control = bonobo_control_new (vbox);
-
- if (first_time) {
- mail_account_gui_setup (gui->gui, NULL);
- first_time = FALSE;
- }
- return control;
-}
-
-static struct {
- GtkSignalFunc next_func;
- GtkSignalFunc prepare_func;
- GtkSignalFunc back_func;
- GtkSignalFunc finish_func;
- GtkSignalFunc help_func;
-} wizard_pages[] = {
- { GTK_SIGNAL_FUNC (identity_next),
- GTK_SIGNAL_FUNC (identity_prepare),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL) },
- { GTK_SIGNAL_FUNC (source_next),
- GTK_SIGNAL_FUNC (source_prepare),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL) },
- { GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (extra_prepare),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL) },
- { GTK_SIGNAL_FUNC (transport_next),
- GTK_SIGNAL_FUNC (transport_prepare),
- GTK_SIGNAL_FUNC (transport_back),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL) },
- { GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (management_prepare),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL),
- GTK_SIGNAL_FUNC (NULL) }
-};
-
-static void
-wizard_next_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *gui)
-{
- if (wizard_pages[page_num].next_func != NULL) {
- wizard_pages[page_num].next_func (wizard, gui);
- }
-}
-
-static void
-wizard_prepare_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *gui)
-{
- if (wizard_pages[page_num].prepare_func != NULL) {
- wizard_pages[page_num].prepare_func (wizard, gui);
- }
-}
-
-static void
-wizard_back_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *gui)
-{
- if (wizard_pages[page_num].back_func != NULL) {
- wizard_pages[page_num].back_func (wizard, gui);
- }
-}
-
-static void
-wizard_finish_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *w)
-{
- MailAccountGui *gui = w->gui;
-
- /* Save the settings for that account */
- if (mail_account_gui_save (gui) == FALSE)
- /* problem. Um, how to keep the druid alive? */
- return;
-
- if (gui->account->source)
- gui->account->source->enabled = TRUE;
-
- /* Write out the config info */
- mail_config_write ();
- mail_account_gui_destroy (gui);
- w->gui = NULL;
- w->account = NULL;
-}
-
-static void
-wizard_cancel_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *gui)
-{
- mail_account_gui_destroy (gui->gui);
- gui->gui = NULL;
-}
-
-static void
-wizard_help_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *gui)
-{
-}
-
-static void
-wizard_free (MailConfigWizard *wizard)
-{
- if (wizard->gui)
- mail_account_gui_destroy (wizard->gui);
-
- if (wizard->account)
- account_destroy (wizard->account);
-
- g_free (wizard);
-}
-
-static BonoboObject *
-evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionWizard *wizard;
- MailConfigAccount *account;
- MailConfigWizard *gui;
-
- account = make_account ();
-
- gui = g_new (MailConfigWizard, 1);
- gui->gui = NULL;
- gui->account = account;
- gui->identity_copied = FALSE;
- gui->last_source = NULL;
-
- wizard = evolution_wizard_new (get_fn, 5, gui);
- account_wizard = wizard;
-
- gtk_object_set_data_full (GTK_OBJECT (account_wizard),
- "account-data", gui,
- (GtkDestroyNotify) wizard_free);
- gui->wizard = wizard;
-
- gtk_signal_connect (GTK_OBJECT (wizard), "next",
- GTK_SIGNAL_FUNC (wizard_next_cb), gui);
- gtk_signal_connect (GTK_OBJECT (wizard), "prepare",
- GTK_SIGNAL_FUNC (wizard_prepare_cb), gui);
- gtk_signal_connect (GTK_OBJECT (wizard), "back",
- GTK_SIGNAL_FUNC (wizard_back_cb), gui);
- gtk_signal_connect (GTK_OBJECT (wizard), "finish",
- GTK_SIGNAL_FUNC (wizard_finish_cb), gui);
- gtk_signal_connect (GTK_OBJECT (wizard), "cancel",
- GTK_SIGNAL_FUNC (wizard_cancel_cb), gui);
- gtk_signal_connect (GTK_OBJECT (wizard), "help",
- GTK_SIGNAL_FUNC (wizard_help_cb), gui);
-
- return BONOBO_OBJECT (wizard);
-}
-
-void
-evolution_mail_config_wizard_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (WIZARD_IID,
- evolution_mail_config_wizard_factory_fn, NULL);
-
- if (factory == NULL) {
- g_warning ("Error starting factory");
- return;
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h
deleted file mode 100644
index c88f3f9f99..0000000000
--- a/mail/mail-config-druid.h
+++ /dev/null
@@ -1,91 +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 MAIL_CONFIG_DRUID_H
-#define MAIL_CONFIG_DRUID_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <libgnomeui/gnome-druid.h>
-#include <libgnomeui/gnome-file-entry.h>
-#include <glade/glade.h>
-#include <camel.h>
-#include <bonobo/bonobo-listener.h>
-#include "shell/Evolution.h"
-#include "mail-account-gui.h"
-
-#define MAIL_CONFIG_DRUID_TYPE (mail_config_druid_get_type ())
-#define MAIL_CONFIG_DRUID(o) (GTK_CHECK_CAST ((o), MAIL_CONFIG_DRUID_TYPE, MailConfigDruid))
-#define MAIL_CONFIG_DRUID_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_CONFIG_DRUID_TYPE, MailConfigDruidClass))
-#define MAIL_IS_CONFIG_DRUID(o) (GTK_CHECK_TYPE ((o), MAIL_CONFIG_DRUID_TYPE))
-#define MAIL_IS_CONFIG_DRUID_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_CONFIG_DRUID_TYPE))
-
-typedef struct {
- GtkWindow parent;
-
- GnomeDruid *druid;
- MailAccountGui *gui;
- GladeXML *xml;
-
- GNOME_Evolution_Shell shell;
- gboolean identity_copied;
- CamelProvider *last_source;
-
- int id;
- BonoboListener *listener;
- Bonobo_EventSource event_source;
-} MailConfigDruid;
-
-typedef struct {
- GtkWindowClass parent_class;
-
- /* signals */
-
-} MailConfigDruidClass;
-
-GtkType mail_config_druid_get_type (void);
-
-MailConfigDruid *mail_config_druid_new (GNOME_Evolution_Shell shell);
-
-char *mail_config_druid_get_account_name (MailConfigDruid *druid);
-gboolean mail_config_druid_get_default_account (MailConfigDruid *druid);
-
-char *mail_config_druid_get_source_url (MailConfigDruid *druid);
-
-gboolean mail_config_druid_get_keep_mail_on_server (MailConfigDruid *druid);
-gboolean mail_config_druid_get_save_source_password (MailConfigDruid *druid);
-gboolean mail_config_druid_get_auto_check (MailConfigDruid *druid);
-gint mail_config_druid_get_auto_check_minutes (MailConfigDruid *druid);
-
-char *mail_config_druid_get_transport_url (MailConfigDruid *druid);
-gboolean mail_config_druid_get_save_transport_password (MailConfigDruid *druid);
-gboolean mail_config_druid_get_transport_requires_auth (MailConfigDruid *druid);
-void evolution_mail_config_wizard_init (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_CONFIG_DRUID_H */
diff --git a/mail/mail-config.c b/mail/mail-config.c
deleted file mode 100644
index 17a3a25550..0000000000
--- a/mail/mail-config.c
+++ /dev/null
@@ -1,2093 +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 <pwd.h>
-#include <ctype.h>
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-config.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gtkhtml/gtkhtml.h>
-#include <glade/glade.h>
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <shell/evolution-shell-client.h>
-
-#include <gal/util/e-util.h>
-#include <gal/unicode/gunicode.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <e-util/e-html-utils.h>
-#include <e-util/e-url.h>
-#include <e-util/e-unicode-i18n.h>
-#include "mail.h"
-#include "mail-config.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-
-#include "Mail.h"
-
-typedef struct {
- Bonobo_ConfigDatabase db;
-
- gboolean corrupt;
-
- gboolean show_preview;
- gboolean thread_list;
- gboolean hide_deleted;
- gint paned_size;
- gboolean send_html;
- gboolean confirm_unwanted_html;
- gboolean citation_highlight;
- guint32 citation_color;
- gboolean prompt_empty_subject;
- gboolean prompt_only_bcc;
- gboolean confirm_expunge;
- gboolean do_seen_timeout;
- gint seen_timeout;
- gboolean empty_trash_on_exit;
-
- GSList *accounts;
- gint default_account;
-
- GSList *news;
-
- char *pgp_path;
- CamelPgpType pgp_type;
-
- MailConfigHTTPMode http_mode;
- MailConfigForwardStyle default_forward_style;
- MailConfigDisplayStyle message_display_style;
- char *default_charset;
-
- GHashTable *threaded_hash;
- GHashTable *preview_hash;
-
- gboolean filter_log;
- char *filter_log_path;
-} MailConfig;
-
-static MailConfig *config = NULL;
-
-#define MAIL_CONFIG_IID "OAFIID:GNOME_Evolution_MailConfig_Factory"
-
-/* Prototypes */
-static void config_read (void);
-static void mail_config_set_default_account_num (gint new_default);
-
-
-/* Identity */
-MailConfigIdentity *
-identity_copy (const MailConfigIdentity *id)
-{
- MailConfigIdentity *new;
-
- g_return_val_if_fail (id != NULL, NULL);
-
- new = g_new0 (MailConfigIdentity, 1);
- new->name = g_strdup (id->name);
- new->address = g_strdup (id->address);
- new->organization = g_strdup (id->organization);
- new->signature = g_strdup (id->signature);
- new->html_signature = g_strdup (id->html_signature);
- new->has_html_signature = id->has_html_signature;
-
- return new;
-}
-
-void
-identity_destroy (MailConfigIdentity *id)
-{
- if (!id)
- return;
-
- g_free (id->name);
- g_free (id->address);
- g_free (id->organization);
- g_free (id->signature);
- g_free (id->html_signature);
-
- g_free (id);
-}
-
-/* Service */
-MailConfigService *
-service_copy (const MailConfigService *source)
-{
- MailConfigService *new;
-
- g_return_val_if_fail (source != NULL, NULL);
-
- new = g_new0 (MailConfigService, 1);
- new->url = g_strdup (source->url);
- new->keep_on_server = source->keep_on_server;
- new->auto_check = source->auto_check;
- new->auto_check_time = source->auto_check_time;
- new->enabled = source->enabled;
- new->save_passwd = source->save_passwd;
-
- return new;
-}
-
-void
-service_destroy (MailConfigService *source)
-{
- if (!source)
- return;
-
- g_free (source->url);
-
- g_free (source);
-}
-
-void
-service_destroy_each (gpointer item, gpointer data)
-{
- service_destroy ((MailConfigService *)item);
-}
-
-/* Account */
-MailConfigAccount *
-account_copy (const MailConfigAccount *account)
-{
- MailConfigAccount *new;
-
- g_return_val_if_fail (account != NULL, NULL);
-
- new = g_new0 (MailConfigAccount, 1);
- new->name = g_strdup (account->name);
-
- new->id = identity_copy (account->id);
- new->source = service_copy (account->source);
- new->transport = service_copy (account->transport);
-
- new->drafts_folder_name = g_strdup (account->drafts_folder_name);
- new->drafts_folder_uri = g_strdup (account->drafts_folder_uri);
- new->sent_folder_name = g_strdup (account->sent_folder_name);
- new->sent_folder_uri = g_strdup (account->sent_folder_uri);
-
- new->pgp_key = g_strdup (account->pgp_key);
- new->pgp_encrypt_to_self = account->pgp_encrypt_to_self;
- new->pgp_always_sign = account->pgp_always_sign;
-
- new->smime_key = g_strdup (account->smime_key);
- new->smime_encrypt_to_self = account->smime_encrypt_to_self;
- new->smime_always_sign = account->smime_always_sign;
-
- return new;
-}
-
-void
-account_destroy (MailConfigAccount *account)
-{
- if (!account)
- return;
-
- g_free (account->name);
-
- identity_destroy (account->id);
- service_destroy (account->source);
- service_destroy (account->transport);
-
- g_free (account->drafts_folder_name);
- g_free (account->drafts_folder_uri);
- g_free (account->sent_folder_name);
- g_free (account->sent_folder_uri);
-
- g_free (account->pgp_key);
- g_free (account->smime_key);
-
- g_free (account);
-}
-
-void
-account_destroy_each (gpointer item, gpointer data)
-{
- account_destroy ((MailConfigAccount *)item);
-}
-
-/* Config struct routines */
-void
-mail_config_init (void)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
-
- if (config)
- return;
-
- CORBA_exception_init (&ev);
-
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
-
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- char *err;
- g_error ("Very serious error, cannot activate config database '%s'",
- (err = bonobo_exception_get_text (&ev)));
- g_free (err);
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- config = g_new0 (MailConfig, 1);
-
- config->db = db;
-
- config_read ();
-}
-
-void
-mail_config_clear (void)
-{
- if (!config)
- return;
-
- if (config->accounts) {
- g_slist_foreach (config->accounts, account_destroy_each, NULL);
- g_slist_free (config->accounts);
- config->accounts = NULL;
- }
-
- if (config->news) {
- g_slist_foreach (config->news, service_destroy_each, NULL);
- g_slist_free (config->news);
- config->news = NULL;
- }
-}
-
-static void
-config_read (void)
-{
- int len, i, default_num;
-
- mail_config_clear ();
-
- len = bonobo_config_get_long_with_default (config->db,
- "/Mail/Accounts/num", 0, NULL);
-
- for (i = 0; i < len; i++) {
- MailConfigAccount *account;
- MailConfigIdentity *id;
- MailConfigService *source;
- MailConfigService *transport;
- char *path, *val;
-
- account = g_new0 (MailConfigAccount, 1);
- path = g_strdup_printf ("/Mail/Accounts/account_name_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val) {
- account->name = val;
- } else {
- g_free (val);
- account->name = g_strdup_printf (U_("Account %d"), i + 1);
- config->corrupt = TRUE;
- }
-
- path = g_strdup_printf ("/Mail/Accounts/account_drafts_folder_name_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- account->drafts_folder_name = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/account_drafts_folder_uri_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- account->drafts_folder_uri = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/account_sent_folder_name_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- account->sent_folder_name = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/account_sent_folder_uri_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- account->sent_folder_uri = val;
- else
- g_free (val);
-
- /* get the pgp info */
- path = g_strdup_printf ("/Mail/Accounts/account_pgp_key_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- account->pgp_key = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/account_pgp_always_sign_%d", i);
- account->pgp_always_sign = bonobo_config_get_boolean_with_default (
- config->db, path, FALSE, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_pgp_encrypt_to_self_%d", i);
- account->pgp_encrypt_to_self = bonobo_config_get_boolean_with_default (
- config->db, path, TRUE, NULL);
- g_free (path);
-
- /* get the s/mime info */
- path = g_strdup_printf ("/Mail/Accounts/account_smime_key_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- account->smime_key = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/account_smime_always_sign_%d", i);
- account->smime_always_sign = bonobo_config_get_boolean_with_default (
- config->db, path, FALSE, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_smime_encrypt_to_self_%d", i);
- account->smime_encrypt_to_self = bonobo_config_get_boolean_with_default (
- config->db, path, TRUE, NULL);
- g_free (path);
-
- /* get the identity info */
- id = g_new0 (MailConfigIdentity, 1);
- path = g_strdup_printf ("/Mail/Accounts/identity_name_%d", i);
- id->name = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_address_%d", i);
- id->address = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_organization_%d", i);
- id->organization = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_signature_%d", i);
- id->signature = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- path = g_strdup_printf ("/Mail/Accounts/identity_html_signature_%d", i);
- id->html_signature = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- path = g_strdup_printf ("/Mail/Accounts/identity_has_html_signature_%d", i);
- id->has_html_signature = bonobo_config_get_boolean_with_default (
- config->db, path, FALSE, NULL);
- g_free (path);
-
- /* get the source */
- source = g_new0 (MailConfigService, 1);
-
- path = g_strdup_printf ("/Mail/Accounts/source_url_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- source->url = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/source_keep_on_server_%d", i);
- source->keep_on_server = bonobo_config_get_boolean (config->db, path, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_auto_check_%d", i);
- source->auto_check = bonobo_config_get_boolean_with_default (
- config->db, path, FALSE, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_auto_check_time_%d", i);
- source->auto_check_time = bonobo_config_get_long_with_default (
- config->db, path, -1, NULL);
-
- if (source->auto_check && source->auto_check_time <= 0) {
- source->auto_check_time = 5;
- source->auto_check = FALSE;
- }
-
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_enabled_%d", i);
- source->enabled = bonobo_config_get_boolean_with_default (
- config->db, path, TRUE, NULL);
- g_free (path);
-
- path = g_strdup_printf
- ("/Mail/Accounts/source_save_passwd_%d", i);
- source->save_passwd = bonobo_config_get_boolean_with_default (
- config->db, path, TRUE, NULL);
- g_free (path);
-
- /* get the transport */
- transport = g_new0 (MailConfigService, 1);
- path = g_strdup_printf ("/Mail/Accounts/transport_url_%d", i);
- val = bonobo_config_get_string (config->db, path, NULL);
- g_free (path);
- if (val && *val)
- transport->url = val;
- else
- g_free (val);
-
- path = g_strdup_printf ("/Mail/Accounts/transport_save_passwd_%d", i);
- transport->save_passwd = bonobo_config_get_boolean (config->db, path, NULL);
- g_free (path);
-
- account->id = id;
- account->source = source;
- account->transport = transport;
-
- config->accounts = g_slist_append (config->accounts, account);
- }
-
- default_num = bonobo_config_get_long_with_default (config->db,
- "/Mail/Accounts/default_account", 0, NULL);
-
- mail_config_set_default_account_num (default_num);
-
-#ifdef ENABLE_NNTP
- /* News */
-
- len = bonobo_config_get_long_with_default (config->db,
- "/News/Sources/num", 0, NULL);
- for (i = 0; i < len; i++) {
- MailConfigService *n;
- gchar *path, *r;
-
- path = g_strdup_printf ("/News/Sources/url_%d", i);
-
- if ((r = bonobo_config_get_string (config->db, path, NULL))) {
- n = g_new0 (MailConfigService, 1);
- n->url = r;
- config->news = g_slist_append (config->news, n);
- }
-
- g_free (path);
-
- }
-#endif
-
- /* Format */
- config->send_html = bonobo_config_get_boolean_with_default (config->db,
- "/Mail/Format/send_html", FALSE, NULL);
-
- /* Confirm Sending Unwanted HTML */
- config->confirm_unwanted_html = bonobo_config_get_boolean_with_default (config->db,
- "/Mail/Format/confirm_unwanted_html", TRUE, NULL);
-
- /* Citation */
- config->citation_highlight = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Display/citation_highlight", TRUE, NULL);
-
- config->citation_color = bonobo_config_get_long_with_default (
- config->db, "/Mail/Display/citation_color", 0x737373, NULL);
-
- /* Mark as seen toggle */
- config->do_seen_timeout = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Display/do_seen_timeout", TRUE, NULL);
-
- /* Mark as seen timeout */
- config->seen_timeout = bonobo_config_get_long_with_default (config->db,
- "/Mail/Display/seen_timeout", 1500, NULL);
-
- /* Show Messages Threaded */
- config->thread_list = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Display/thread_list", FALSE, NULL);
-
- config->show_preview = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Display/preview_pane", TRUE, NULL);
-
- /* Hide deleted automatically */
- config->hide_deleted = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Display/hide_deleted", FALSE, NULL);
-
- /* Size of vpaned in mail view */
- config->paned_size = bonobo_config_get_long_with_default (config->db,
- "/Mail/Display/paned_size", 200, NULL);
-
- /* Empty Subject */
- config->prompt_empty_subject = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Prompts/empty_subject", TRUE, NULL);
-
- /* Only Bcc */
- config->prompt_only_bcc = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Prompts/only_bcc", TRUE, NULL);
-
- /* Expunge */
- config->confirm_expunge = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Prompts/confirm_expunge", TRUE, NULL);
-
- /* PGP/GPG */
- config->pgp_path = bonobo_config_get_string (config->db,
- "/Mail/PGP/path", NULL);
-
- config->pgp_type = bonobo_config_get_long_with_default (config->db,
- "/Mail/PGP/type", CAMEL_PGP_TYPE_NONE, NULL);
-
- /* HTTP images */
- config->http_mode = bonobo_config_get_long_with_default (config->db,
- "/Mail/Display/http_images", MAIL_CONFIG_HTTP_SOMETIMES, NULL);
-
- /* Forwarding */
- config->default_forward_style = bonobo_config_get_long_with_default (
- config->db, "/Mail/Format/default_forward_style",
- MAIL_CONFIG_FORWARD_ATTACHED, NULL);
-
- /* Message Display */
- config->message_display_style = bonobo_config_get_long_with_default (
- config->db, "/Mail/Format/message_display_style",
- MAIL_CONFIG_DISPLAY_NORMAL, NULL);
-
- /* Default charset */
- config->default_charset = bonobo_config_get_string (config->db,
- "/Mail/Format/default_charset", NULL);
-
- if (!config->default_charset) {
- g_get_charset (&config->default_charset);
- if (!config->default_charset ||
- !g_strcasecmp (config->default_charset, "US-ASCII"))
- config->default_charset = g_strdup ("ISO-8859-1");
- else
- config->default_charset = g_strdup (config->default_charset);
- }
-
- /* Trash folders */
- config->empty_trash_on_exit = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Trash/empty_on_exit", FALSE, NULL);
-
- /* Filter logging */
- config->filter_log = bonobo_config_get_boolean_with_default (
- config->db, "/Mail/Filters/log", FALSE, NULL);
-
- config->filter_log_path = bonobo_config_get_string (
- config->db, "/Mail/Filters/log_path", NULL);
-}
-
-#define bonobo_config_set_string_wrapper(db, path, val, ev) bonobo_config_set_string (db, path, val ? val : "", ev)
-
-void
-mail_config_write (void)
-{
- CORBA_Environment ev;
- int len, i, default_num;
-
- /* Accounts */
-
- if (!config)
- return;
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_removeDir (config->db, "/Mail/Accounts", &ev);
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_removeDir (config->db, "/News/Sources", &ev);
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (config->db, &ev);
-
- len = g_slist_length (config->accounts);
- bonobo_config_set_long (config->db,
- "/Mail/Accounts/num", len, NULL);
-
- default_num = mail_config_get_default_account_num ();
- bonobo_config_set_long (config->db,
- "/Mail/Accounts/default_account", default_num, NULL);
-
- for (i = 0; i < len; i++) {
- MailConfigAccount *account;
- char *path;
-
- account = g_slist_nth_data (config->accounts, i);
-
- /* account info */
- path = g_strdup_printf ("/Mail/Accounts/account_name_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->name, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_drafts_folder_name_%d", i);
- bonobo_config_set_string_wrapper (config->db, path,
- account->drafts_folder_name, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_drafts_folder_uri_%d", i);
- bonobo_config_set_string_wrapper (config->db, path,
- account->drafts_folder_uri, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_sent_folder_name_%d", i);
- bonobo_config_set_string_wrapper (config->db, path,
- account->sent_folder_name, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_sent_folder_uri_%d", i);
- bonobo_config_set_string_wrapper (config->db, path,
- account->sent_folder_uri, NULL);
- g_free (path);
-
- /* account pgp options */
- path = g_strdup_printf ("/Mail/Accounts/account_pgp_key_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->pgp_key, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_pgp_always_sign_%d", i);
- bonobo_config_set_boolean (config->db, path, account->pgp_always_sign, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_pgp_encrypt_to_self_%d", i);
- bonobo_config_set_boolean (config->db, path,
- account->pgp_encrypt_to_self, NULL);
- g_free (path);
-
- /* account s/mime options */
- path = g_strdup_printf ("/Mail/Accounts/account_smime_key_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->smime_key, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_smime_always_sign_%d", i);
- bonobo_config_set_boolean (config->db, path, account->smime_always_sign, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/account_smime_encrypt_to_self_%d", i);
- bonobo_config_set_boolean (config->db, path, account->smime_encrypt_to_self, NULL);
- g_free (path);
-
- /* identity info */
- path = g_strdup_printf ("/Mail/Accounts/identity_name_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->id->name, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_address_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->id->address, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_organization_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->id->organization, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_signature_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->id->signature, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_html_signature_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->id->html_signature, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/identity_has_html_signature_%d", i);
- bonobo_config_set_boolean (config->db, path, account->id->has_html_signature, NULL);
- g_free (path);
-
- /* source info */
- path = g_strdup_printf ("/Mail/Accounts/source_url_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->source->url, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_keep_on_server_%d", i);
- bonobo_config_set_boolean (config->db, path, account->source->keep_on_server, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_auto_check_%d", i);
- bonobo_config_set_boolean (config->db, path, account->source->auto_check, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_auto_check_time_%d", i);
- bonobo_config_set_long (config->db, path, account->source->auto_check_time, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_enabled_%d", i);
- bonobo_config_set_boolean (config->db, path, account->source->enabled, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/source_save_passwd_%d", i);
- bonobo_config_set_boolean (config->db, path, account->source->save_passwd, NULL);
- g_free (path);
-
- /* transport info */
- path = g_strdup_printf ("/Mail/Accounts/transport_url_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, account->transport->url, NULL);
- g_free (path);
-
- path = g_strdup_printf ("/Mail/Accounts/transport_save_passwd_%d", i);
- bonobo_config_set_boolean (config->db, path, account->transport->save_passwd, NULL);
- g_free (path);
- }
-
-#ifdef ENABLE_NNTP
- /* News */
-
- len = g_slist_length (config->news);
- bonobo_config_set_long (config->db, "/News/Sources/num", len, NULL);
- for (i = 0; i < len; i++) {
- MailConfigService *n;
- gchar *path;
-
- n = g_slist_nth_data (config->news, i);
-
- path = g_strdup_printf ("/News/Sources/url_%d", i);
- bonobo_config_set_string_wrapper (config->db, path, n->url, NULL);
- g_free (path);
- }
-
-#endif
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (config->db, &ev);
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-hash_save_state (gpointer key, gpointer value, gpointer user_data)
-{
- char *path;
- gboolean bool = GPOINTER_TO_INT (value);
-
- path = g_strconcat ("/Mail/", (char *)user_data, "/", (char *)key,
- NULL);
- bonobo_config_set_boolean (config->db, path, bool, NULL);
- g_free (path);
- g_free (key);
-
- return TRUE;
-}
-
-void
-mail_config_write_on_exit (void)
-{
- CORBA_Environment ev;
- MailConfigAccount *account;
- const GSList *accounts;
-
- /* Show Messages Threaded */
- bonobo_config_set_boolean (config->db, "/Mail/Display/thread_list",
- config->thread_list, NULL);
-
- /* Show Message Preview */
- bonobo_config_set_boolean (config->db, "/Mail/Display/preview_pane",
- config->show_preview, NULL);
-
- /* Hide deleted automatically */
- bonobo_config_set_boolean (config->db, "/Mail/Display/hide_deleted",
- config->hide_deleted, NULL);
-
- /* Size of vpaned in mail view */
- bonobo_config_set_long (config->db, "/Mail/Display/paned_size",
- config->paned_size, NULL);
-
- /* Mark as seen toggle */
- bonobo_config_set_boolean (config->db, "/Mail/Display/do_seen_timeout",
- config->do_seen_timeout, NULL);
- /* Mark as seen timeout */
- bonobo_config_set_long (config->db, "/Mail/Display/seen_timeout",
- config->seen_timeout, NULL);
-
- /* Format */
- bonobo_config_set_boolean (config->db, "/Mail/Format/send_html",
- config->send_html, NULL);
-
- /* Confirm Sending Unwanted HTML */
- bonobo_config_set_boolean (config->db, "/Mail/Format/confirm_unwanted_html",
- config->confirm_unwanted_html, NULL);
-
- /* Citation */
- bonobo_config_set_boolean (config->db,
- "/Mail/Display/citation_highlight",
- config->citation_highlight, NULL);
-
- bonobo_config_set_long (config->db, "/Mail/Display/citation_color",
- config->citation_color, NULL);
-
- /* Empty Subject */
- bonobo_config_set_boolean (config->db, "/Mail/Prompts/empty_subject",
- config->prompt_empty_subject, NULL);
-
- /* Only Bcc */
- bonobo_config_set_boolean (config->db, "/Mail/Prompts/only_bcc",
- config->prompt_only_bcc, NULL);
-
- /* Expunge */
- bonobo_config_set_boolean (config->db, "/Mail/Prompts/confirm_expunge",
- config->confirm_expunge, NULL);
-
- /* PGP/GPG */
- bonobo_config_set_string_wrapper (config->db, "/Mail/PGP/path",
- config->pgp_path, NULL);
-
- bonobo_config_set_long (config->db, "/Mail/PGP/type",
- config->pgp_type, NULL);
-
- /* HTTP images */
- bonobo_config_set_long (config->db, "/Mail/Display/http_images",
- config->http_mode, NULL);
-
- /* Forwarding */
- bonobo_config_set_long (config->db,
- "/Mail/Format/default_forward_style",
- config->default_forward_style, NULL);
-
- /* Message Display */
- bonobo_config_set_long (config->db,
- "/Mail/Format/message_display_style",
- config->message_display_style, NULL);
-
- /* Default charset */
- bonobo_config_set_string_wrapper (config->db, "/Mail/Format/default_charset",
- config->default_charset, NULL);
-
- /* Trash folders */
- bonobo_config_set_boolean (config->db, "/Mail/Trash/empty_on_exit",
- config->empty_trash_on_exit, NULL);
-
- /* Filter logging */
- bonobo_config_set_boolean (config->db, "/Mail/Filters/log",
- config->filter_log, NULL);
-
- bonobo_config_set_string_wrapper (config->db, "/Mail/Filters/log_path",
- config->filter_log_path, NULL);
-
- g_hash_table_foreach_remove (config->threaded_hash,
- hash_save_state, "Threads");
-
- g_hash_table_foreach_remove (config->preview_hash,
- hash_save_state, "Preview");
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (config->db, &ev);
- CORBA_exception_free (&ev);
-
- /* Passwords */
- /* fixme: still depends on gnome-config */
- gnome_config_private_clean_section ("/Evolution/Passwords");
- accounts = mail_config_get_accounts ();
- for ( ; accounts; accounts = accounts->next) {
- account = accounts->data;
- if (account->source->save_passwd && account->source->url)
- mail_session_remember_password (account->source->url);
-
- if (account->transport->save_passwd && account->transport->url)
- mail_session_remember_password (account->transport->url);
- }
- gnome_config_sync ();
-
- /* now do cleanup */
- mail_config_clear ();
-}
-
-/* Accessor functions */
-gboolean
-mail_config_is_configured (void)
-{
- return config->accounts != NULL;
-}
-
-gboolean
-mail_config_is_corrupt (void)
-{
- return config->corrupt;
-}
-
-static char *
-uri_to_key (const char *uri)
-{
- char *rval, *ptr;
-
- if (!uri)
- return NULL;
-
- rval = g_strdup (uri);
-
- for (ptr = rval; *ptr; ptr++)
- if (*ptr == '/' || *ptr == ':')
- *ptr = '_';
-
- return rval;
-}
-
-gboolean
-mail_config_get_empty_trash_on_exit (void)
-{
- return config->empty_trash_on_exit;
-}
-
-void
-mail_config_set_empty_trash_on_exit (gboolean value)
-{
- config->empty_trash_on_exit = value;
-}
-
-gboolean
-mail_config_get_show_preview (const char *uri)
-{
- if (uri && *uri) {
- gpointer key, val;
- char *dbkey;
-
- dbkey = uri_to_key (uri);
-
- if (!config->preview_hash)
- config->preview_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (!g_hash_table_lookup_extended (config->preview_hash, dbkey, &key, &val)) {
- gboolean value;
- char *str;
-
- str = g_strdup_printf ("/Mail/Preview/%s", dbkey);
- value = bonobo_config_get_boolean_with_default (config->db, str, TRUE, NULL);
- g_free (str);
-
- g_hash_table_insert (config->preview_hash, dbkey,
- GINT_TO_POINTER (value));
-
- return value;
- } else {
- g_free (dbkey);
- return GPOINTER_TO_INT (val);
- }
- }
-
- /* return the default value */
-
- return config->show_preview;
-}
-
-void
-mail_config_set_show_preview (const char *uri, gboolean value)
-{
- if (uri && *uri) {
- char *dbkey = uri_to_key (uri);
- gpointer key, val;
-
- if (!config->preview_hash)
- config->preview_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (g_hash_table_lookup_extended (config->preview_hash, dbkey, &key, &val)) {
- g_hash_table_insert (config->preview_hash, dbkey,
- GINT_TO_POINTER (value));
- g_free (dbkey);
- } else {
- g_hash_table_insert (config->preview_hash, dbkey,
- GINT_TO_POINTER (value));
- }
- } else
- config->show_preview = value;
-}
-
-gboolean
-mail_config_get_thread_list (const char *uri)
-{
- if (uri && *uri) {
- gpointer key, val;
- char *dbkey;
-
- dbkey = uri_to_key (uri);
-
- if (!config->threaded_hash)
- config->threaded_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (!g_hash_table_lookup_extended (config->threaded_hash, dbkey, &key, &val)) {
- gboolean value;
- char *str;
-
- str = g_strdup_printf ("/Mail/Threads/%s", dbkey);
- value = bonobo_config_get_boolean_with_default (config->db, str, FALSE, NULL);
- g_free (str);
-
- g_hash_table_insert (config->threaded_hash, dbkey,
- GINT_TO_POINTER (value));
-
- return value;
- } else {
- g_free(dbkey);
- return GPOINTER_TO_INT (val);
- }
- }
-
- /* return the default value */
-
- return config->thread_list;
-}
-
-void
-mail_config_set_thread_list (const char *uri, gboolean value)
-{
- if (uri && *uri) {
- char *dbkey = uri_to_key (uri);
- gpointer key, val;
-
- if (!config->threaded_hash)
- config->threaded_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (g_hash_table_lookup_extended (config->threaded_hash, dbkey, &key, &val)) {
- g_hash_table_insert (config->threaded_hash, dbkey,
- GINT_TO_POINTER (value));
- g_free (dbkey);
- } else {
- g_hash_table_insert (config->threaded_hash, dbkey,
- GINT_TO_POINTER (value));
- }
- } else
- config->thread_list = value;
-}
-
-gboolean
-mail_config_get_filter_log (void)
-{
- return config->filter_log;
-}
-
-void
-mail_config_set_filter_log (gboolean value)
-{
- config->filter_log = value;
-}
-
-const char *
-mail_config_get_filter_log_path (void)
-{
- return config->filter_log_path;
-}
-
-void
-mail_config_set_filter_log_path (const char *path)
-{
- g_free (config->filter_log_path);
- config->filter_log_path = g_strdup (path);
-}
-
-gboolean
-mail_config_get_hide_deleted (void)
-{
- return config->hide_deleted;
-}
-
-void
-mail_config_set_hide_deleted (gboolean value)
-{
- config->hide_deleted = value;
-}
-
-gint
-mail_config_get_paned_size (void)
-{
- return config->paned_size;
-}
-
-void
-mail_config_set_paned_size (gint value)
-{
- config->paned_size = value;
-}
-
-gboolean
-mail_config_get_send_html (void)
-{
- return config->send_html;
-}
-
-void
-mail_config_set_send_html (gboolean send_html)
-{
- config->send_html = send_html;
-}
-
-gboolean
-mail_config_get_confirm_unwanted_html (void)
-{
- return config->confirm_unwanted_html;
-}
-
-void
-mail_config_set_confirm_unwanted_html (gboolean confirm)
-{
- config->confirm_unwanted_html = confirm;
-}
-
-gboolean
-mail_config_get_citation_highlight (void)
-{
- return config->citation_highlight;
-}
-
-void
-mail_config_set_citation_highlight (gboolean citation_highlight)
-{
- config->citation_highlight = citation_highlight;
-}
-
-guint32
-mail_config_get_citation_color (void)
-{
- return config->citation_color;
-}
-
-void
-mail_config_set_citation_color (guint32 citation_color)
-{
- config->citation_color = citation_color;
-}
-
-gboolean
-mail_config_get_do_seen_timeout (void)
-{
- return config->do_seen_timeout;
-}
-
-void
-mail_config_set_do_seen_timeout (gboolean do_seen_timeout)
-{
- config->do_seen_timeout = do_seen_timeout;
-}
-
-gint
-mail_config_get_mark_as_seen_timeout (void)
-{
- return config->seen_timeout;
-}
-
-void
-mail_config_set_mark_as_seen_timeout (gint timeout)
-{
- config->seen_timeout = timeout;
-}
-
-gboolean
-mail_config_get_prompt_empty_subject (void)
-{
- return config->prompt_empty_subject;
-}
-
-void
-mail_config_set_prompt_empty_subject (gboolean value)
-{
- config->prompt_empty_subject = value;
-}
-
-gboolean
-mail_config_get_prompt_only_bcc (void)
-{
- return config->prompt_only_bcc;
-}
-
-void
-mail_config_set_prompt_only_bcc (gboolean value)
-{
- config->prompt_only_bcc = value;
-}
-
-gboolean
-mail_config_get_confirm_expunge (void)
-{
- return config->confirm_expunge;
-}
-
-void
-mail_config_set_confirm_expunge (gboolean value)
-{
- config->confirm_expunge = value;
-}
-
-
-struct {
- char *bin;
- CamelPgpType type;
-} binaries[] = {
- { "gpg", CAMEL_PGP_TYPE_GPG },
- { "pgpv", CAMEL_PGP_TYPE_PGP5 },
- { "pgp", CAMEL_PGP_TYPE_PGP2 },
- { NULL, CAMEL_PGP_TYPE_NONE }
-};
-
-/* FIXME: what about PGP 6.x? And I assume we want to "prefer" GnuPG
- over the other, which is done now, but after that do we have a
- order-of-preference for the rest? */
-static void
-auto_detect_pgp_variables (void)
-{
- CamelPgpType type = CAMEL_PGP_TYPE_NONE;
- const char *PATH, *path;
- char *pgp = NULL;
-
- PATH = getenv ("PATH");
-
- path = PATH;
- while (path && *path && !type) {
- const char *pend = strchr (path, ':');
- char *dirname;
- int i;
-
- if (pend) {
- /* don't even think of using "." */
- if (!strncmp (path, ".", pend - path)) {
- path = pend + 1;
- continue;
- }
-
- dirname = g_strndup (path, pend - path);
- path = pend + 1;
- } else {
- /* don't even think of using "." */
- if (!strcmp (path, "."))
- break;
-
- dirname = g_strdup (path);
- path = NULL;
- }
-
- for (i = 0; binaries[i].bin; i++) {
- struct stat st;
-
- pgp = g_strdup_printf ("%s/%s", dirname, binaries[i].bin);
- /* make sure the file exists *and* is executable? */
- if (stat (pgp, &st) != -1 && st.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)) {
- type = binaries[i].type;
- break;
- }
-
- g_free (pgp);
- pgp = NULL;
- }
-
- g_free (dirname);
- }
-
- if (pgp && type) {
- mail_config_set_pgp_path (pgp);
- mail_config_set_pgp_type (type);
- }
-
- g_free (pgp);
-}
-
-CamelPgpType
-mail_config_get_pgp_type (void)
-{
- if (!config->pgp_path || !config->pgp_type)
- auto_detect_pgp_variables ();
-
- return config->pgp_type;
-}
-
-void
-mail_config_set_pgp_type (CamelPgpType pgp_type)
-{
- config->pgp_type = pgp_type;
-}
-
-const char *
-mail_config_get_pgp_path (void)
-{
- if (!config->pgp_path || !config->pgp_type)
- auto_detect_pgp_variables ();
-
- return config->pgp_path;
-}
-
-void
-mail_config_set_pgp_path (const char *pgp_path)
-{
- g_free (config->pgp_path);
-
- config->pgp_path = g_strdup (pgp_path);
-}
-
-MailConfigHTTPMode
-mail_config_get_http_mode (void)
-{
- return config->http_mode;
-}
-
-void
-mail_config_set_http_mode (MailConfigHTTPMode mode)
-{
- config->http_mode = mode;
-}
-
-MailConfigForwardStyle
-mail_config_get_default_forward_style (void)
-{
- return config->default_forward_style;
-}
-
-void
-mail_config_set_default_forward_style (MailConfigForwardStyle style)
-{
- config->default_forward_style = style;
-}
-
-MailConfigDisplayStyle
-mail_config_get_message_display_style (void)
-{
- return config->message_display_style;
-}
-
-void
-mail_config_set_message_display_style (MailConfigDisplayStyle style)
-{
- config->message_display_style = style;
-}
-
-const char *
-mail_config_get_default_charset (void)
-{
- return config->default_charset;
-}
-
-void
-mail_config_set_default_charset (const char *charset)
-{
- g_free (config->default_charset);
- config->default_charset = g_strdup (charset);
-}
-
-
-gboolean
-mail_config_find_account (const MailConfigAccount *account)
-{
- return g_slist_find (config->accounts, (gpointer) account) != NULL;
-}
-
-const MailConfigAccount *
-mail_config_get_default_account (void)
-{
- MailConfigAccount *account;
-
- if (config == NULL) {
- mail_config_init ();
- }
-
- if (!config->accounts)
- return NULL;
-
- account = g_slist_nth_data (config->accounts,
- config->default_account);
-
- /* Looks like we have no default, so make the first account
- the default */
- if (account == NULL) {
- mail_config_set_default_account_num (0);
- account = config->accounts->data;
- }
-
- return account;
-}
-
-const MailConfigAccount *
-mail_config_get_account_by_name (const char *account_name)
-{
- /* FIXME: this should really use a hash */
- const MailConfigAccount *account;
- GSList *l;
-
- l = config->accounts;
- while (l) {
- account = l->data;
- if (account && !strcmp (account->name, account_name))
- return account;
-
- l = l->next;
- }
-
- return NULL;
-}
-
-const MailConfigAccount *
-mail_config_get_account_by_source_url (const char *source_url)
-{
- const MailConfigAccount *account;
- CamelProvider *provider;
- CamelURL *source;
- GSList *l;
-
- g_return_val_if_fail (source_url != NULL, NULL);
-
- provider = camel_session_get_provider (session, source_url, NULL);
- if (!provider)
- return NULL;
-
- source = camel_url_new (source_url, NULL);
- if (!source)
- return NULL;
-
- l = config->accounts;
- while (l) {
- account = l->data;
-
- if (account && account->source && account->source->url) {
- CamelURL *url;
-
- url = camel_url_new (account->source->url, NULL);
- if (url && provider->url_equal (url, source)) {
- camel_url_free (url);
- camel_url_free (source);
- return account;
- }
-
- if (url)
- camel_url_free (url);
- }
-
- l = l->next;
- }
-
- camel_url_free (source);
-
- return NULL;
-}
-
-const MailConfigAccount *
-mail_config_get_account_by_transport_url (const char *transport_url)
-{
- const MailConfigAccount *account;
- CamelProvider *provider;
- CamelURL *transport;
- GSList *l;
-
- g_return_val_if_fail (transport_url != NULL, NULL);
-
- provider = camel_session_get_provider (session, transport_url, NULL);
- if (!provider)
- return NULL;
-
- transport = camel_url_new (transport_url, NULL);
- if (!transport)
- return NULL;
-
- l = config->accounts;
- while (l) {
- account = l->data;
-
- if (account && account->transport && account->transport->url) {
- CamelURL *url;
-
- url = camel_url_new (account->transport->url, NULL);
- if (url && provider->url_equal (url, transport)) {
- camel_url_free (url);
- camel_url_free (transport);
- return account;
- }
-
- if (url)
- camel_url_free (url);
- }
-
- l = l->next;
- }
-
- camel_url_free (transport);
-
- return NULL;
-}
-
-const GSList *
-mail_config_get_accounts (void)
-{
- g_assert (config != NULL);
-
- return config->accounts;
-}
-
-static void
-add_shortcut_entry (const char *name, const char *uri, const char *type)
-{
- extern EvolutionShellClient *global_shell_client;
- CORBA_Environment ev;
- GNOME_Evolution_Shortcuts shortcuts_interface;
- GNOME_Evolution_Shortcuts_Group *the_group;
- GNOME_Evolution_Shortcuts_Shortcut *the_shortcut;
- int i;
-
- if (!global_shell_client)
- return;
-
- CORBA_exception_init (&ev);
-
- shortcuts_interface = evolution_shell_client_get_shortcuts_interface (global_shell_client);
- if (CORBA_Object_is_nil (shortcuts_interface, &ev)) {
- g_warning ("No ::Shortcut interface on the shell");
- CORBA_exception_free (&ev);
- return;
- }
-
- the_group = GNOME_Evolution_Shortcuts_getGroup (shortcuts_interface, 0, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception getting first group: %s", ev._repo_id);
- CORBA_exception_free (&ev);
- return;
- }
-
- the_shortcut = NULL;
- for (i = 0; i < the_group->shortcuts._length; i++) {
- GNOME_Evolution_Shortcuts_Shortcut *iter;
-
- iter = the_group->shortcuts._buffer + i;
- if (!strcmp (iter->name, name)) {
- the_shortcut = iter;
- break;
- }
- }
-
- if (the_shortcut == NULL) {
- the_shortcut = GNOME_Evolution_Shortcuts_Shortcut__alloc ();
- the_shortcut->name = CORBA_string_dup (name);
- the_shortcut->uri = CORBA_string_dup (uri);
- the_shortcut->type = CORBA_string_dup (type);
-
- GNOME_Evolution_Shortcuts_add (shortcuts_interface,
- 0, -1, /* "end of list" */
- the_shortcut,
- &ev);
-
- CORBA_free (the_shortcut);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_warning ("Exception creating shortcut \"%s\": %s", name, ev._repo_id);
- }
-
- CORBA_free (the_group);
- CORBA_exception_free (&ev);
-}
-
-static void
-add_new_storage (const char *url, const char *name)
-{
- extern EvolutionShellClient *global_shell_client;
- GNOME_Evolution_Shell corba_shell;
-
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (global_shell_client));
- mail_load_storage_by_uri (corba_shell, url, name);
-}
-
-static void
-new_source_created (MailConfigAccount *account)
-{
- CamelProvider *prov;
- CamelFolder *inbox;
- CamelException ex;
- gchar *name;
- gchar *url;
-
- /* no source, don't bother. */
- if (!account->source || !account->source->url)
- return;
-
- camel_exception_init (&ex);
- prov = camel_session_get_provider (session, account->source->url, &ex);
- if (camel_exception_is_set (&ex)) {
- g_warning ("Configured provider that doesn't exist?");
- camel_exception_clear (&ex);
- return;
- }
-
- /* not a storage, don't bother. */
- if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE))
- return;
-
- inbox = mail_tool_get_inbox (account->source->url, &ex);
- if (camel_exception_is_set (&ex)) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Could not get inbox for new mail store:\n%s\n"
- "No shortcut will be created."),
- camel_exception_get_description (&ex));
- camel_exception_clear (&ex);
- return;
- }
-
- if (inbox) {
- /* Create the shortcut. FIXME: This only works if the
- * full name matches the path.
- */
- name = g_strdup_printf (U_("%s: Inbox"), account->name);
- url = g_strdup_printf ("evolution:/%s/%s", account->name,
- inbox->full_name);
- add_shortcut_entry (name, url, "mail");
- g_free (name);
- g_free (url);
-
- /* If we unref inbox here, it will disconnect from the
- * store, but then add_new_storage will reconnect. So
- * we'll keep holding the ref until after that.
- */
- }
-
- if (!(prov->flags & CAMEL_PROVIDER_IS_EXTERNAL)) {
- /* add the storage to the folder tree */
- add_new_storage (account->source->url, account->name);
- }
-
- if (inbox)
- camel_object_unref (CAMEL_OBJECT (inbox));
-}
-
-void
-mail_config_add_account (MailConfigAccount *account)
-{
- config->accounts = g_slist_append (config->accounts, account);
-
- if (account->source && account->source->url)
- new_source_created (account);
-}
-
-static void
-remove_account_shortcuts (MailConfigAccount *account)
-{
- extern EvolutionShellClient *global_shell_client;
- CORBA_Environment ev;
- GNOME_Evolution_Shortcuts shortcuts_interface;
- GNOME_Evolution_Shortcuts_GroupList *groups;
- int i, j, len;;
-
- CORBA_exception_init (&ev);
-
- shortcuts_interface = evolution_shell_client_get_shortcuts_interface (global_shell_client);
- if (CORBA_Object_is_nil (shortcuts_interface, &ev)) {
- g_warning ("No ::Shortcut interface on the shell");
- CORBA_exception_free (&ev);
- return;
- }
-
- groups = GNOME_Evolution_Shortcuts__get_groups (shortcuts_interface, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception getting the groups: %s", ev._repo_id);
- CORBA_exception_free (&ev);
- return;
- }
-
- len = strlen (account->name);
-
- for (i = 0; i < groups->_length; i++) {
- GNOME_Evolution_Shortcuts_Group *iter;
-
- iter = groups->_buffer + i;
-
- for (j = 0; j < iter->shortcuts._length; j++) {
- GNOME_Evolution_Shortcuts_Shortcut *sc;
-
- sc = iter->shortcuts._buffer + j;
-
- /* "evolution:/" = 11 */
- if (!strncmp (sc->uri + 11, account->name, len)) {
- GNOME_Evolution_Shortcuts_remove (shortcuts_interface, i, j, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception removing shortcut \"%s\": %s", sc->name, ev._repo_id);
- break;
- }
- }
- }
- }
-
- CORBA_exception_free (&ev);
- CORBA_free (groups);
-}
-
-const GSList *
-mail_config_remove_account (MailConfigAccount *account)
-{
- int index;
-
- /* Removing the current default, so make the first account the
- default */
- if (account == mail_config_get_default_account ()) {
- config->default_account = 0;
- } else {
- /* adjust the default to make sure it points to the same one */
- index = g_slist_index (config->accounts, account);
- if (config->default_account > index)
- config->default_account--;
- }
-
- config->accounts = g_slist_remove (config->accounts, account);
- remove_account_shortcuts (account);
- account_destroy (account);
-
- return config->accounts;
-}
-
-gint
-mail_config_get_default_account_num (void)
-{
- return config->default_account;
-}
-
-static void
-mail_config_set_default_account_num (gint new_default)
-{
- config->default_account = new_default;
-}
-
-void
-mail_config_set_default_account (const MailConfigAccount *account)
-{
- int index;
-
- index = g_slist_index (config->accounts, (void *) account);
- if (index == -1)
- return;
-
- config->default_account = index;
-
- return;
-}
-
-const MailConfigIdentity *
-mail_config_get_default_identity (void)
-{
- const MailConfigAccount *account;
-
- account = mail_config_get_default_account ();
- if (account)
- return account->id;
- else
- return NULL;
-}
-
-const MailConfigService *
-mail_config_get_default_transport (void)
-{
- const MailConfigAccount *account;
-
- account = mail_config_get_default_account ();
- if (account)
- return account->transport;
- else
- return NULL;
-}
-
-const MailConfigService *
-mail_config_get_default_news (void)
-{
- if (!config->news)
- return NULL;
-
- return (MailConfigService *)config->news->data;
-}
-
-const GSList *
-mail_config_get_news (void)
-{
- return config->news;
-}
-
-void
-mail_config_add_news (MailConfigService *news)
-{
- config->news = g_slist_append (config->news, news);
-}
-
-const GSList *
-mail_config_remove_news (MailConfigService *news)
-{
- config->news = g_slist_remove (config->news, news);
- service_destroy (news);
-
- return config->news;
-}
-
-GSList *
-mail_config_get_sources (void)
-{
- const GSList *accounts;
- GSList *sources = NULL;
-
- accounts = mail_config_get_accounts ();
- while (accounts) {
- const MailConfigAccount *account = accounts->data;
-
- if (account->source)
- sources = g_slist_append (sources, account->source);
-
- accounts = accounts->next;
- }
-
- return sources;
-}
-
-void
-mail_config_service_set_save_passwd (MailConfigService *service, gboolean save_passwd)
-{
- service->save_passwd = save_passwd;
-}
-
-char *
-mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix)
-{
- CamelService *service = CAMEL_SERVICE (folder->parent_store);
- char *service_url, *url, *filename;
-
- service_url = camel_url_to_string (service->url, CAMEL_URL_HIDE_ALL);
- url = g_strdup_printf ("%s/%s", service_url, folder->full_name);
- g_free (service_url);
-
- e_filename_make_safe (url);
-
- filename = g_strdup_printf ("%s/config/%s%s", evolution_dir, prefix, url);
- g_free (url);
-
- return filename;
-}
-
-
-/* Async service-checking/authtype-lookup code. */
-struct _check_msg {
- struct _mail_msg msg;
-
- const char *url;
- CamelProviderType type;
- GList **authtypes;
- gboolean *success;
-};
-
-static char *
-check_service_describe (struct _mail_msg *mm, int complete)
-{
- return g_strdup (_("Checking Service"));
-}
-
-static void
-check_service_check (struct _mail_msg *mm)
-{
- struct _check_msg *m = (struct _check_msg *)mm;
- CamelService *service = NULL;
-
- camel_operation_register(mm->cancel);
-
- service = camel_session_get_service (session, m->url, m->type, &mm->ex);
- if (!service) {
- camel_operation_unregister(mm->cancel);
- return;
- }
-
- if (m->authtypes)
- *m->authtypes = camel_service_query_auth_types (service, &mm->ex);
- else
- camel_service_connect (service, &mm->ex);
-
- camel_object_unref (CAMEL_OBJECT (service));
- *m->success = !camel_exception_is_set(&mm->ex);
-
- camel_operation_unregister(mm->cancel);
-}
-
-static struct _mail_msg_op check_service_op = {
- check_service_describe,
- check_service_check,
- NULL,
- NULL
-};
-
-static void
-check_cancelled (GnomeDialog *dialog, int button, gpointer data)
-{
- int *msg_id = data;
-
- mail_msg_cancel (*msg_id);
-}
-
-/**
- * mail_config_check_service:
- * @url: service url
- * @type: provider type
- * @authtypes: set to list of supported authtypes on return if non-%NULL.
- *
- * Checks the service for validity. If @authtypes is non-%NULL, it will
- * be filled in with a list of supported authtypes.
- *
- * Return value: %TRUE on success or %FALSE on error.
- **/
-gboolean
-mail_config_check_service (const char *url, CamelProviderType type, GList **authtypes)
-{
- gboolean ret = FALSE;
- struct _check_msg *m;
- int id;
- GtkWidget *dialog, *label;
-
- m = mail_msg_new(&check_service_op, NULL, sizeof(*m));
- m->url = url;
- m->type = type;
- m->authtypes = authtypes;
- m->success = &ret;
-
- id = m->msg.seq;
- e_thread_put(mail_thread_queued, (EMsg *)m);
-
- dialog = gnome_dialog_new (_("Connecting to server..."),
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- label = gtk_label_new (_("Connecting to server..."));
- gtk_box_pack_start (GTK_BOX(GNOME_DIALOG (dialog)->vbox),
- label, TRUE, TRUE, 10);
- gnome_dialog_set_close (GNOME_DIALOG (dialog), FALSE);
- gtk_signal_connect (GTK_OBJECT (dialog), "clicked",
- GTK_SIGNAL_FUNC (check_cancelled), &id);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_widget_show_all (dialog);
-
- mail_msg_wait(id);
-
- gtk_widget_destroy (dialog);
-
- return ret;
-}
-
-/* MailConfig Bonobo object */
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
-static BonoboObjectClass *parent_class = NULL;
-
-/* For the bonobo object */
-typedef struct _EvolutionMailConfig EvolutionMailConfig;
-typedef struct _EvolutionMailConfigClass EvolutionMailConfigClass;
-
-struct _EvolutionMailConfig {
- BonoboXObject parent;
-};
-
-struct _EvolutionMailConfigClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_MailConfig__epv epv;
-};
-
-static void
-impl_GNOME_Evolution_MailConfig_addAccount (PortableServer_Servant servant,
- const GNOME_Evolution_MailConfig_Account *account,
- CORBA_Environment *ev)
-{
- GNOME_Evolution_MailConfig_Service source, transport;
- GNOME_Evolution_MailConfig_Identity id;
- MailConfigAccount *mail_account;
- MailConfigService *mail_service;
- MailConfigIdentity *mail_id;
-
- if (mail_config_get_account_by_name (account->name)) {
- /* FIXME: we need an exception. */
- return;
- }
-
- mail_account = g_new0 (MailConfigAccount, 1);
- mail_account->name = g_strdup (account->name);
-
- /* Copy ID */
- id = account->id;
- mail_id = g_new0 (MailConfigIdentity, 1);
- mail_id->name = g_strdup (id.name);
- mail_id->address = g_strdup (id.address);
- mail_id->organization = g_strdup (id.organization);
- mail_id->signature = g_strdup (id.signature);
- mail_id->html_signature = g_strdup (id.html_signature);
- mail_id->has_html_signature = id.has_html_signature;
-
- mail_account->id = mail_id;
-
- /* Copy source */
- source = account->source;
- mail_service = g_new0 (MailConfigService, 1);
- if (source.url == NULL || strcmp (source.url, "none://") == 0) {
- mail_service->url = NULL;
- } else {
- mail_service->url = g_strdup (source.url);
- }
- mail_service->keep_on_server = source.keep_on_server;
- mail_service->auto_check = source.auto_check;
- mail_service->auto_check_time = source.auto_check_time;
- mail_service->save_passwd = source.save_passwd;
- mail_service->enabled = source.enabled;
-
- mail_account->source = mail_service;
-
- /* Copy transport */
- transport = account->transport;
- mail_service = g_new0 (MailConfigService, 1);
- if (transport.url == NULL) {
- mail_service->url = NULL;
- } else {
- mail_service->url = g_strdup (transport.url);
- }
- mail_service->url = g_strdup (transport.url);
- mail_service->keep_on_server = transport.keep_on_server;
- mail_service->auto_check = transport.auto_check;
- mail_service->auto_check_time = transport.auto_check_time;
- mail_service->save_passwd = transport.save_passwd;
- mail_service->enabled = transport.enabled;
-
- mail_account->transport = mail_service;
-
- /* Add new account */
- mail_config_add_account (mail_account);
-}
-
-static void
-evolution_mail_config_class_init (EvolutionMailConfigClass *klass)
-{
- POA_GNOME_Evolution_MailConfig__epv *epv = &klass->epv;
-
- parent_class = gtk_type_class (PARENT_TYPE);
- epv->addAccount = impl_GNOME_Evolution_MailConfig_addAccount;
-}
-
-static void
-evolution_mail_config_init (EvolutionMailConfig *config)
-{
-}
-
-BONOBO_X_TYPE_FUNC_FULL (EvolutionMailConfig,
- GNOME_Evolution_MailConfig,
- PARENT_TYPE,
- evolution_mail_config);
-
-static BonoboObject *
-evolution_mail_config_factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionMailConfig *config;
-
- config = gtk_type_new (evolution_mail_config_get_type ());
- return BONOBO_OBJECT (config);
-}
-
-gboolean
-evolution_mail_config_factory_init (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (MAIL_CONFIG_IID,
- evolution_mail_config_factory_fn,
- NULL);
- if (factory == NULL) {
- g_warning ("Error starting MailConfig");
- return FALSE;
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
- return TRUE;
-}
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
deleted file mode 100644
index 7fd41db234..0000000000
--- a/mail/mail-config.glade
+++ /dev/null
@@ -1,3078 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>config</name>
- <program_name>config</program_name>
- <directory></directory>
- <source_directory>src</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>GtkWindow</class>
- <name>druid_window</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>GnomeDruid</class>
- <name>druid</name>
-
- <widget>
- <class>GnomeDruidPageStart</class>
- <name>druidpagestart1</name>
- <title>Mail Configuration</title>
- <text>Welcome to the Evolution Mail Configuration Assistant.
-
-Click &quot;Next&quot; to begin. </text>
- <title_color>255,255,255</title_color>
- <text_color>0,0,0</text_color>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <textbox_color>255,255,255</textbox_color>
- <logo_image>mail-config-druid.png</logo_image>
- </widget>
-
- <widget>
- <class>GnomeDruidPageStandard</class>
- <name>identity_page</name>
- <title>Identity</title>
- <title_color>255,255,255</title_color>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <logo_image>mail-config-druid-identity.png</logo_image>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDruidPageStandard:vbox</child_name>
- <name>druid_identity_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeDruidPageStandard</class>
- <name>source_page</name>
- <title>Receiving Email</title>
- <title_color>255,255,255</title_color>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <logo_image>mail-config-druid-receive.png</logo_image>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDruidPageStandard:vbox</child_name>
- <name>druid_source_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeDruidPageStandard</class>
- <name>extra_page</name>
- <title>Receiving Email</title>
- <title_color>255,255,255</title_color>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <logo_image>mail-config-druid-receive.png</logo_image>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDruidPageStandard:vbox</child_name>
- <name>druid_extra_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeDruidPageStandard</class>
- <name>transport_page</name>
- <title>Sending Email</title>
- <title_color>255,255,255</title_color>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <logo_image>mail-config-druid-send.png</logo_image>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDruidPageStandard:vbox</child_name>
- <name>druid_transport_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeDruidPageStandard</class>
- <name>management_page</name>
- <title>Account Management</title>
- <title_color>255,255,255</title_color>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <logo_image>mail-config-druid-account-name.png</logo_image>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDruidPageStandard:vbox</child_name>
- <name>druid_management_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeDruidPageFinish</class>
- <name>finish_page</name>
- <title>Done</title>
- <text>Congratulations, your mail configuration is complete.
-
-You are now ready to send and receive email
-using Evolution.
-
-Click &quot;Finish&quot; to save your settings.</text>
- <background_color>0,0,0</background_color>
- <logo_background_color>0,0,0</logo_background_color>
- <textbox_color>255,255,255</textbox_color>
- <text_color>0,0,0</text_color>
- <title_color>255,255,255</title_color>
- <logo_image>thankyou.png</logo_image>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>account_editor_window</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>GtkNotebook</class>
- <name>account_editor_notebook</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>
-
- <widget>
- <class>GtkVBox</class>
- <name>identity_vbox</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>management_frame</name>
- <border_width>3</border_width>
- <label>Account Information</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>vbox31</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox24</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>management_name_label</name>
- <label>_Name:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>management_name</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>management_name</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>GtkCheckButton</class>
- <name>management_default</name>
- <can_focus>True</can_focus>
- <label>Make this my _default account</label>
- <active>False</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>identity_required_frame</name>
- <border_width>3</border_width>
- <label>Required Information</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>table1</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkEntry</class>
- <name>identity_full_name</name>
- <width>80</width>
- <height>20</height>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>50</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>identity_address</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>50</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>identity_address_label</name>
- <label>_Email Address:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>identity_address</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>identity_full_name_label</name>
- <label>_Full Name:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>identity_full_name</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>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>identity_optional_frame</name>
- <border_width>3</border_width>
- <label>Optional Information</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>table2</name>
- <border_width>4</border_width>
- <rows>3</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>fileentry_signature</name>
- <history_id>sig-file-gnome-entry</history_id>
- <max_saved>10</max_saved>
- <title>Signature file:</title>
- <directory>False</directory>
- <modal>False</modal>
- <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>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>entry_signature</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>GtkLabel</class>
- <name>identity_organization_label</name>
- <label>_Organization:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>7</xpad>
- <ypad>0</ypad>
- <default_focus_target>identity_organization</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>GtkCheckButton</class>
- <name>check_html_signature</name>
- <can_focus>True</can_focus>
- <label>_HTML Signature:</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <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>GnomeFileEntry</class>
- <name>fileentry_html_signature</name>
- <history_id>html-sig-file-gnome-entry</history_id>
- <max_saved>10</max_saved>
- <title>HTML signature file:</title>
- <directory>False</directory>
- <modal>False</modal>
- <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>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>entry_html_signature</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>GtkLabel</class>
- <name>identity_signature_label</name>
- <label>_Signature file:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>7</xpad>
- <ypad>0</ypad>
- <default_focus_target>entry_signature</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>identity_organization</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>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>GtkButton</class>
- <name>button_edit_signature</name>
- <can_focus>True</can_focus>
- <label>Edit...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button_edit_html_signature</name>
- <can_focus>True</can_focus>
- <label>Edit...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label31</name>
- <label>Identity</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>source_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <border_width>3</border_width>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>2</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>source_type_label</name>
- <label>Server Type: </label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>2</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>GtkOptionMenu</class>
- <name>source_type_omenu</name>
- <can_focus>True</can_focus>
- <items>POP
-IMAPv4
-Standard Unix mbox
-Qmail maildir
-None
-</items>
- <initial_choice>1</initial_choice>
- <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>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox58</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label46</name>
- <label>Description:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>2</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>source_description</name>
- <label>description</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>GtkFrame</class>
- <name>source_frame</name>
- <border_width>3</border_width>
- <label>Configuration</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>table4</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>
-
- <widget>
- <class>GtkLabel</class>
- <name>source_host_label</name>
- <label>_Host:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>source_host</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>source_user_label</name>
- <label>_Username:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>source_user</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>source_host</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>
- <class>GtkEntry</class>
- <name>source_user</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>GtkLabel</class>
- <name>source_path_label</name>
- <label>_Path:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>source_path</default_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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>source_use_ssl</name>
- <can_focus>True</can_focus>
- <label>Use secure connection (_SSL)</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>source_path_entry</name>
- <max_saved>10</max_saved>
- <title>Mailbox location</title>
- <directory>False</directory>
- <modal>False</modal>
- <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>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>source_path</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>
- <class>GtkFrame</class>
- <name>source_auth_frame</name>
- <border_width>3</border_width>
- <label>Authentication</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>vbox60</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox44</name>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>source_auth_label</name>
- <label>Authentication Type: </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>source_auth_omenu</name>
- <can_focus>True</can_focus>
- <items>Password
-Kerberos
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>source_check_supported</name>
- <can_focus>True</can_focus>
- <label>_Check for supported types</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>source_remember_password</name>
- <can_focus>True</can_focus>
- <label>_Remember this password</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>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label32</name>
- <label>Receiving Mail</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>extra_vbox</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>extra_mailcheck_frame</name>
- <label>Checking for new mail</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>extra_mailcheck_vbox</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox53</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>extra_auto_check</name>
- <can_focus>True</can_focus>
- <label>_Automatically check for new mail every</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>extra_auto_check_min</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>10</value>
- <lower>1</lower>
- <upper>1440</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>GtkLabel</class>
- <name>label36</name>
- <label>minute(s)</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>label33</name>
- <label>Receiving Options</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>transport_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table5</name>
- <border_width>3</border_width>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>2</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>transport_type_label</name>
- <label>Server Type: </label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>2</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>GtkOptionMenu</class>
- <name>transport_type_omenu</name>
- <can_focus>True</can_focus>
- <items>SMTP
-Sendmail
-</items>
- <initial_choice>0</initial_choice>
- <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>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox59</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label50</name>
- <label>Description:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0</yalign>
- <xpad>2</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>transport_description</name>
- <label>description</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>transport_frame</name>
- <border_width>3</border_width>
- <label>Server Configuration</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>vbox12</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table6</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>transport_host_label</name>
- <label>_Host:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>transport_host</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>transport_host</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>GtkCheckButton</class>
- <name>transport_use_ssl</name>
- <can_focus>True</can_focus>
- <label>Use secure connection (_SSL)</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>transport_ssl_disabled</name>
- <sensitive>False</sensitive>
- <label>(SSL is not supported in this build of evolution)</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>GtkCheckButton</class>
- <name>transport_needs_auth</name>
- <can_focus>True</can_focus>
- <label>Server requires _authentication</label>
- <active>False</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>transport_auth_frame</name>
- <border_width>3</border_width>
- <label>Authentication</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>vbox61</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox49</name>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>transport_auth_label</name>
- <label>Authentication Type: </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>transport_auth_omenu</name>
- <can_focus>True</can_focus>
- <items>Password
-Kerberos
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>transport_check_supported</name>
- <can_focus>True</can_focus>
- <label> _Check for supported types </label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox52</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>transport_user_label</name>
- <label>_Username:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>transport_user</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>transport_user</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>GtkCheckButton</class>
- <name>transport_remember_password</name>
- <can_focus>True</can_focus>
- <label>_Remember this password</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>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label34</name>
- <label>Sending Mail</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>folders_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>folders_frame</name>
- <border_width>3</border_width>
- <label>Sent and Draft Messages</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>table7</name>
- <border_width>3</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>drafts_label</name>
- <label>Drafts folder:</label>
- <justify>GTK_JUSTIFY_RIGHT</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>sent_label</name>
- <label>Sent messages folder:</label>
- <justify>GTK_JUSTIFY_RIGHT</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>GtkButton</class>
- <name>sent_button</name>
- <can_focus>True</can_focus>
- <label>Sent</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>GtkButton</class>
- <name>drafts_button</name>
- <can_focus>True</can_focus>
- <label>Drafts</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label35</name>
- <label>Special Folders</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>security_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>pgp_frame</name>
- <border_width>4</border_width>
- <label>Pretty Good Privacy</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>pgp_table</name>
- <border_width>3</border_width>
- <rows>3</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>pgp_key_id_label</name>
- <label>PGP Key ID:</label>
- <justify>GTK_JUSTIFY_RIGHT</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>GtkEntry</class>
- <name>pgp_key</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>
- <class>GtkCheckButton</class>
- <name>pgp_encrypt_to_self</name>
- <can_focus>True</can_focus>
- <label>Always encrypt to myself when sending encrypted mail</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>pgp_always_sign</name>
- <can_focus>True</can_focus>
- <label>Always sign outgoing messages when using this account</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <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>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>smime_frame</name>
- <border_width>4</border_width>
- <label>Secure MIME</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>smime_table</name>
- <border_width>3</border_width>
- <rows>3</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>smime_key_label</name>
- <label>Certificate ID:</label>
- <justify>GTK_JUSTIFY_RIGHT</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>GtkEntry</class>
- <name>smime_key</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>
- <class>GtkCheckButton</class>
- <name>smime_encrypt_to_self</name>
- <can_focus>True</can_focus>
- <label>Always encrypt to myself when sending encrypyed mail</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>digital_ids</name>
- <can_focus>True</can_focus>
- <label>Digital IDs...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <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>GtkCheckButton</class>
- <name>smime_always_sign</name>
- <can_focus>True</can_focus>
- <label>Always sign outgoing messages when using this account</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <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>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeHRef</class>
- <name>get_digital_id</name>
- <can_focus>True</can_focus>
- <url>http://www.verisign.com/products/class1/index.html</url>
- <label>Get Digital ID...</label>
- <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>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>lblSecurity</name>
- <label>Security</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>GtkWindow</class>
- <name>news_editor_window</name>
- <visible>False</visible>
- <title>newswindow1</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>GtkNotebook</class>
- <name>news_editor_notebook</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>
-
- <widget>
- <class>GtkVBox</class>
- <name>news_vbox</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>news_frame</name>
- <border_width>3</border_width>
- <label>Source Information</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>vbox31</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox24</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>source_name_label</name>
- <label>NNTP Server:</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>source_name</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>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label38</name>
- <label>Source</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>GtkWindow</class>
- <name>mail_accounts_window</name>
- <visible>False</visible>
- <title>Mail Settings</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>GtkNotebook</class>
- <name>notebook</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>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox54</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <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>clistAccounts</name>
- <can_focus>True</can_focus>
- <columns>3</columns>
- <column_widths>53,145,38</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>lblEnable</name>
- <label>Enabled</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>lblAccount</name>
- <label>Account</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>lblType</name>
- <label>Type</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>GtkVBox</class>
- <name>vbox62</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label52</name>
- <label>
-</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>GtkVButtonBox</class>
- <name>vbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>0</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>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>cmdMailAdd</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>cmdMailEdit</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>cmdMailDelete</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox3</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>0</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>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>cmdMailDefault</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>De_fault</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>cmdMailAble</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>E_nable</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>accounts_config_label</name>
- <label>Accounts</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>hbox37</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <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>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clistNews</name>
- <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_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>lblSources</name>
- <label>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>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox2</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>0</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>cmdNewsAdd</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>cmdNewsEdit</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>cmdNewsDelete</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>news_config_label</name>
- <label>News</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>vbox38</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox42</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>chckHighlightCitations</name>
- <can_focus>True</can_focus>
- <label>_Highlight citations with</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpickerCitations</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label> color</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>hbox38</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkMarkTimeout</name>
- <can_focus>True</can_focus>
- <label>_Mark messages as Read 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>spinMarkTimeout</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>1</digits>
- <numeric>True</numeric>
- <update_policy>GTK_UPDATE_IF_VALID</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1.5</value>
- <lower>0</lower>
- <upper>10</upper>
- <step>0.1</step>
- <page>1</page>
- <page_size>1</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>lblSeconds</name>
- <label>seconds.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame1</name>
- <label>In HTML mail</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>vbox65</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radioImagesNever</name>
- <can_focus>True</can_focus>
- <label>_Never load images off the net</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>images</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radioImagesSometimes</name>
- <can_focus>True</can_focus>
- <label>_Load images if sender is in addressbook</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>images</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radioImagesAlways</name>
- <can_focus>True</can_focus>
- <label>_Always load images off the net</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>images</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>display_config_label</name>
- <label>Display</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>vbox63</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>chkSendHTML</name>
- <can_focus>True</can_focus>
- <label>_Send mail in HTML format by default.</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox55</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label39</name>
- <label>Default Forward style is: </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>omenuForwardStyle</name>
- <can_focus>True</can_focus>
- <items>Attachment
-Inline
-Quoted
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>chkPromptEmptySubject</name>
- <can_focus>True</can_focus>
- <label>Prompt when sending messages with an _empty subject</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>chkPromptBccOnly</name>
- <can_focus>True</can_focus>
- <label>Prompt when sending messages with only _Bcc recipients defined</label>
- <active>True</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>composer_config_label</name>
- <label>Composer</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>vbox64</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox41</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>lblPgpPath</name>
- <label>_PGP binary path:</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>combo-entry1</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>filePgpPath</name>
- <max_saved>10</max_saved>
- <title>Select PGP binary</title>
- <directory>False</directory>
- <modal>True</modal>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry: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>
- <class>GtkHBox</class>
- <name>hbox56</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>lblCharset</name>
- <label>Default character encoding: </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>omenuCharset</name>
- <can_focus>True</can_focus>
- <items>placeholder
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>chkEmptyTrashOnExit</name>
- <can_focus>True</can_focus>
- <label>_Empty trash folders on exit</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox57</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>chkFilterLog</name>
- <can_focus>True</can_focus>
- <label>_Log filter actions to:</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>fileFilterLog</name>
- <max_saved>10</max_saved>
- <title>Select Filter Log file...</title>
- <directory>False</directory>
- <modal>True</modal>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>combo-entry2</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>
- <class>GtkCheckButton</class>
- <name>chkConfirmExpunge</name>
- <can_focus>True</can_focus>
- <label>Confirm when Expunging a folder</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>other_config_label</name>
- <label>Other</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/mail/mail-config.h b/mail/mail-config.h
deleted file mode 100644
index 1264a8cbc3..0000000000
--- a/mail/mail-config.h
+++ /dev/null
@@ -1,215 +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 MAIL_CONFIG_H
-#define MAIL_CONFIG_H
-
-#include <glib.h>
-#include <camel/camel.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct {
- gchar *name;
- gchar *address;
- gchar *organization;
- gchar *signature;
- gchar *html_signature;
- gboolean has_html_signature;
-} MailConfigIdentity;
-
-typedef struct {
- gchar *url;
- gboolean keep_on_server;
- gboolean auto_check;
- gint auto_check_time;
- gboolean save_passwd;
- gboolean enabled;
-} MailConfigService;
-
-typedef struct {
- gchar *name;
-
- MailConfigIdentity *id;
- MailConfigService *source;
- MailConfigService *transport;
-
- gchar *drafts_folder_name, *drafts_folder_uri;
- gchar *sent_folder_name, *sent_folder_uri;
-
- gchar *pgp_key;
- gboolean pgp_encrypt_to_self;
- gboolean pgp_always_sign;
-
- gchar *smime_key;
- gboolean smime_encrypt_to_self;
- gboolean smime_always_sign;
-} MailConfigAccount;
-
-typedef enum {
- MAIL_CONFIG_HTTP_NEVER, MAIL_CONFIG_HTTP_SOMETIMES,
- MAIL_CONFIG_HTTP_ALWAYS
-} MailConfigHTTPMode;
-
-typedef enum {
- MAIL_CONFIG_FORWARD_ATTACHED, MAIL_CONFIG_FORWARD_INLINE,
- MAIL_CONFIG_FORWARD_QUOTED
-} MailConfigForwardStyle;
-
-typedef enum {
- MAIL_CONFIG_DISPLAY_NORMAL, MAIL_CONFIG_DISPLAY_FULL_HEADERS,
- MAIL_CONFIG_DISPLAY_SOURCE,
- MAIL_CONFIG_DISPLAY_MAX
-} MailConfigDisplayStyle;
-
-/* Identities */
-MailConfigIdentity *identity_copy (const MailConfigIdentity *id);
-void identity_destroy (MailConfigIdentity *id);
-
-/* Services */
-MailConfigService *service_copy (const MailConfigService *source);
-void service_destroy (MailConfigService *source);
-void service_destroy_each (gpointer item, gpointer data);
-
-/* Accounts */
-MailConfigAccount *account_copy (const MailConfigAccount *account);
-void account_destroy (MailConfigAccount *account);
-void account_destroy_each (gpointer item, gpointer data);
-
-/* Configuration */
-void mail_config_init (void);
-void mail_config_clear (void);
-void mail_config_write (void);
-void mail_config_write_on_exit (void);
-
-/* General Accessor functions */
-gboolean mail_config_is_configured (void);
-gboolean mail_config_is_corrupt (void);
-
-gboolean mail_config_get_filter_log (void);
-void mail_config_set_filter_log (gboolean value);
-const char *mail_config_get_filter_log_path (void);
-void mail_config_set_filter_log_path (const char *path);
-
-gboolean mail_config_get_empty_trash_on_exit (void);
-void mail_config_set_empty_trash_on_exit (gboolean value);
-
-gboolean mail_config_get_thread_list (const char *uri);
-void mail_config_set_thread_list (const char *uri, gboolean value);
-
-gboolean mail_config_get_show_preview (const char *uri);
-void mail_config_set_show_preview (const char *uri, gboolean value);
-
-gboolean mail_config_get_hide_deleted (void);
-void mail_config_set_hide_deleted (gboolean value);
-
-gint mail_config_get_paned_size (void);
-void mail_config_set_paned_size (gint size);
-
-gboolean mail_config_get_send_html (void);
-void mail_config_set_send_html (gboolean send_html);
-
-gboolean mail_config_get_confirm_unwanted_html (void);
-void mail_config_set_confirm_unwanted_html (gboolean html_warning);
-
-gboolean mail_config_get_citation_highlight (void);
-void mail_config_set_citation_highlight (gboolean);
-
-guint32 mail_config_get_citation_color (void);
-void mail_config_set_citation_color (guint32);
-
-gint mail_config_get_do_seen_timeout (void);
-void mail_config_set_do_seen_timeout (gboolean do_seen_timeout);
-
-gint mail_config_get_mark_as_seen_timeout (void);
-void mail_config_set_mark_as_seen_timeout (gint timeout);
-
-gboolean mail_config_get_prompt_empty_subject (void);
-void mail_config_set_prompt_empty_subject (gboolean value);
-
-gboolean mail_config_get_prompt_only_bcc (void);
-void mail_config_set_prompt_only_bcc (gboolean value);
-
-gboolean mail_config_get_confirm_expunge (void);
-void mail_config_set_confirm_expunge (gboolean value);
-
-CamelPgpType mail_config_get_pgp_type (void);
-void mail_config_set_pgp_type (CamelPgpType pgp_type);
-
-const char *mail_config_get_pgp_path (void);
-void mail_config_set_pgp_path (const char *pgp_path);
-
-MailConfigHTTPMode mail_config_get_http_mode (void);
-void mail_config_set_http_mode (MailConfigHTTPMode);
-
-MailConfigForwardStyle mail_config_get_default_forward_style (void);
-void mail_config_set_default_forward_style (MailConfigForwardStyle style);
-
-MailConfigDisplayStyle mail_config_get_message_display_style (void);
-void mail_config_set_message_display_style (MailConfigDisplayStyle style);
-
-const char *mail_config_get_default_charset (void);
-void mail_config_set_default_charset (const char *charset);
-
-void mail_config_service_set_save_passwd (MailConfigService *service, gboolean save_passwd);
-
-gboolean mail_config_find_account (const MailConfigAccount *account);
-const MailConfigAccount *mail_config_get_default_account (void);
-gint mail_config_get_default_account_num (void);
-const MailConfigAccount *mail_config_get_account_by_name (const char *account_name);
-const MailConfigAccount *mail_config_get_account_by_source_url (const char *url);
-const MailConfigAccount *mail_config_get_account_by_transport_url (const char *url);
-const GSList *mail_config_get_accounts (void);
-void mail_config_add_account (MailConfigAccount *account);
-const GSList *mail_config_remove_account (MailConfigAccount *account);
-
-void mail_config_set_default_account (const MailConfigAccount *account);
-
-const MailConfigIdentity *mail_config_get_default_identity (void);
-const MailConfigService *mail_config_get_default_transport (void);
-
-const MailConfigService *mail_config_get_default_news (void);
-const GSList *mail_config_get_news (void);
-void mail_config_add_news (MailConfigService *news);
-const GSList *mail_config_remove_news (MailConfigService *news);
-GtkType evolution_mail_config_get_type (void);
-
-/* convenience functions to help ease the transition over to the new codebase */
-GSList *mail_config_get_sources (void);
-
-/* static utility functions */
-char *mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix);
-
-gboolean mail_config_check_service (const char *url, CamelProviderType type, GList **authtypes);
-
-
-
-gboolean evolution_mail_config_factory_init (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_CONFIG_H */
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
deleted file mode 100644
index bad81e5539..0000000000
--- a/mail/mail-crypto.c
+++ /dev/null
@@ -1,300 +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 <stdlib.h>
-#include <string.h>
-
-#include "mail-crypto.h"
-#include "mail-session.h"
-#include "mail-config.h"
-
-
-/**
- * mail_crypto_pgp_mime_part_sign:
- * @mime_part: a MIME part that will be replaced by a pgp signed part
- * @userid: userid to sign with
- * @hash: one of CAMEL_CIPHER_HASH_MD5 or CAMEL_CIPHER_HASH_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
-mail_crypto_pgp_mime_part_sign (CamelMimePart **mime_part, const char *userid, CamelCipherHash hash, CamelException *ex)
-{
- CamelPgpContext *context;
-
- context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
- mail_config_get_pgp_path ());
-
- if (context) {
- camel_pgp_mime_part_sign (context, mime_part, userid, hash, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a PGP signature context."));
-}
-
-
-/**
- * mail_crypto_pgp_mime_part_verify:
- * @mime_part: a multipart/signed MIME Part
- * @ex: exception
- *
- * Returns a CamelCipherValidity on success or NULL on fail.
- **/
-CamelCipherValidity *
-mail_crypto_pgp_mime_part_verify (CamelMimePart *mime_part, CamelException *ex)
-{
- CamelCipherValidity *valid = NULL;
- CamelPgpContext *context;
-
- context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
- mail_config_get_pgp_path ());
-
- if (context) {
- valid = camel_pgp_mime_part_verify (context, mime_part, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a PGP verification context."));
-
- return valid;
-}
-
-
-/**
- * mail_crypto_pgp_mime_part_encrypt:
- * @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/encrypted. On failure,
- * #ex will be set and #part will remain untouched.
- **/
-void
-mail_crypto_pgp_mime_part_encrypt (CamelMimePart **mime_part, GPtrArray *recipients, CamelException *ex)
-{
- CamelPgpContext *context;
-
- context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
- mail_config_get_pgp_path ());
-
- if (context) {
- camel_pgp_mime_part_encrypt (context, mime_part, recipients, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a PGP encryption context."));
-}
-
-
-/**
- * mail_crypto_pgp_mime_part_decrypt:
- * @mime_part: a multipart/encrypted MIME Part
- * @ex: exception
- *
- * Returns the decrypted MIME Part on success or NULL on fail.
- **/
-CamelMimePart *
-mail_crypto_pgp_mime_part_decrypt (CamelMimePart *mime_part, CamelException *ex)
-{
- CamelPgpContext *context;
- CamelMimePart *part = NULL;
-
- context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
- mail_config_get_pgp_path ());
-
- if (context) {
- part = camel_pgp_mime_part_decrypt (context, mime_part, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a PGP decryption context."));
-
- return part;
-}
-
-
-/**
- * mail_crypto_smime_sign:
- * @message: MIME message to sign
- * @userid: userid to sign with
- * @signing_time: Include signing time
- * @detached: create detached signature
- * @ex: exception which will be set if there are any errors.
- *
- * Returns a S/MIME message in compliance with rfc2633. Returns %NULL
- * on failure and @ex will be set.
- **/
-CamelMimeMessage *
-mail_crypto_smime_sign (CamelMimeMessage *message, const char *userid,
- gboolean signing_time, gboolean detached,
- CamelException *ex)
-{
- CamelSMimeContext *context = NULL;
- CamelMimeMessage *mesg = NULL;
-
-#ifdef HAVE_NSS
- context = camel_smime_context_new (session, NULL);
-#endif
-
- if (context) {
- mesg = camel_cms_sign (CAMEL_CMS_CONTEXT (context), message,
- userid, signing_time, detached, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a S/MIME signature context."));
-
- return mesg;
-}
-
-
-/**
- * mail_crypto_smime_certsonly:
- * @message: MIME message
- * @userid: userid
- * @recipients: recipients
- * @ex: exception
- *
- * Returns a S/MIME message.
- **/
-CamelMimeMessage *
-mail_crypto_smime_certsonly (CamelMimeMessage *message, const char *userid,
- GPtrArray *recipients, CamelException *ex)
-{
- CamelSMimeContext *context = NULL;
- CamelMimeMessage *mesg = NULL;
-
-#ifdef HAVE_NSS
- context = camel_smime_context_new (session, NULL);
-#endif
-
- if (context) {
- mesg = camel_cms_certsonly (CAMEL_CMS_CONTEXT (context), message,
- userid, recipients, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a S/MIME certsonly context."));
-
- return mesg;
-}
-
-/**
- * mail_crypto_smime_encrypt:
- * @message: MIME message
- * @userid: userid
- * @recipients: recipients
- * @ex: exception
- *
- * Returns a S/MIME message.
- **/
-CamelMimeMessage *
-mail_crypto_smime_encrypt (CamelMimeMessage *message, const char *userid,
- GPtrArray *recipients, CamelException *ex)
-{
- CamelSMimeContext *context = NULL;
- CamelMimeMessage *mesg = NULL;
-
-#ifdef HAVE_NSS
- context = camel_smime_context_new (session, NULL);
-#endif
-
- if (context) {
- mesg = camel_cms_encrypt (CAMEL_CMS_CONTEXT (context), message,
- userid, recipients, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a S/MIME encryption context."));
-
- return mesg;
-}
-
-/**
- * mail_crypto_smime_envelope:
- * @message: MIME message
- * @userid: userid
- * @recipients: recipients
- * @ex: exception
- *
- * Returns a S/MIME message.
- **/
-CamelMimeMessage *
-mail_crypto_smime_envelope (CamelMimeMessage *message, const char *userid,
- GPtrArray *recipients, CamelException *ex)
-{
- CamelSMimeContext *context = NULL;
- CamelMimeMessage *mesg = NULL;
-
-#ifdef HAVE_NSS
- context = camel_smime_context_new (session, NULL);
-#endif
-
- if (context) {
- mesg = camel_cms_envelope (CAMEL_CMS_CONTEXT (context), message,
- userid, recipients, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a S/MIME envelope context."));
-
- return mesg;
-}
-
-/**
- * mail_crypto_smime_decode:
- * @message: MIME message
- * @info: pointer to a CamelCMSValidityInfo structure (or %NULL)
- * @ex: exception
- *
- * Returns a decoded S/MIME message.
- **/
-CamelMimeMessage *
-mail_crypto_smime_decode (CamelMimeMessage *message, CamelCMSValidityInfo **info,
- CamelException *ex)
-{
- CamelSMimeContext *context = NULL;
- CamelMimeMessage *mesg = NULL;
-
-#ifdef HAVE_NSS
- context = camel_smime_context_new (session, NULL);
-#endif
-
- if (context) {
- mesg = camel_cms_decode (CAMEL_CMS_CONTEXT (context),
- message, info, ex);
- camel_object_unref (CAMEL_OBJECT (context));
- } else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create a S/MIME decode context."));
-
- return mesg;
-}
diff --git a/mail/mail-crypto.h b/mail/mail-crypto.h
deleted file mode 100644
index 4b77cc0f72..0000000000
--- a/mail/mail-crypto.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 MAIL_CRYPTO_H
-#define MAIL_CRYPTO_H
-
-#include <camel/camel.h>
-#include <camel/camel-pgp-mime.h>
-#include <camel/camel-smime-context.h>
-#include <camel/camel-smime-utils.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus } */
-
-/* PGP/MIME convenience wrappers */
-void mail_crypto_pgp_mime_part_sign (CamelMimePart **mime_part,
- const char *userid,
- CamelCipherHash hash,
- CamelException *ex);
-
-CamelCipherValidity *mail_crypto_pgp_mime_part_verify (CamelMimePart *mime_part,
- CamelException *ex);
-
-void mail_crypto_pgp_mime_part_encrypt (CamelMimePart **mime_part,
- GPtrArray *recipients,
- CamelException *ex);
-
-CamelMimePart *mail_crypto_pgp_mime_part_decrypt (CamelMimePart *mime_part,
- CamelException *ex);
-
-/* S/MIME v3 convenience wrappers */
-CamelMimeMessage *mail_crypto_smime_sign (CamelMimeMessage *message, const char *userid,
- gboolean signing_time, gboolean detached,
- CamelException *ex);
-
-CamelMimeMessage *mail_crypto_smime_certsonly (CamelMimeMessage *message, const char *userid,
- GPtrArray *recipients, CamelException *ex);
-
-CamelMimeMessage *mail_crypto_smime_encrypt (CamelMimeMessage *message, const char *userid,
- GPtrArray *recipients, CamelException *ex);
-
-CamelMimeMessage *mail_crypto_smime_envelope (CamelMimeMessage *message, const char *userid,
- GPtrArray *recipients, CamelException *ex);
-
-CamelMimeMessage *mail_crypto_smime_decode (CamelMimeMessage *message,
- CamelCMSValidityInfo **info, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! MAIL_CRYPTO_H */
diff --git a/mail/mail-display.c b/mail/mail-display.c
deleted file mode 100644
index a950bace5d..0000000000
--- a/mail/mail-display.c
+++ /dev/null
@@ -1,2015 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * mail-display.c: Mail display widget
- *
- * Author:
- * Miguel de Icaza
- * Bertrand Guiheneuf (bg@aful.org)
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <libgnorba/gnorba.h>
-#include <libgnomevfs/gnome-vfs-mime-info.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <bonobo/bonobo-control-frame.h>
-#include <bonobo/bonobo-stream-memory.h>
-#include <bonobo/bonobo-ui-toolbar-icon.h>
-#include <bonobo/bonobo-widget.h>
-#include <bonobo/bonobo-socket.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gdk-pixbuf-loader.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-unicode.h>
-#include <gtk/gtkinvisible.h>
-#include <gtkhtml/gtkhtml-embedded.h>
-#include <gtkhtml/htmlengine.h> /* XXX */
-#include <gtkhtml/htmlobject.h> /* XXX */
-#include <gtkhtml/htmltext.h> /* XXX */
-#include <gtkhtml/htmlinterval.h> /* XXX */
-
-#include "e-util/e-html-utils.h"
-#include "e-util/e-mktemp.h"
-#include "addressbook/backend/ebook/e-book-util.h"
-
-#include "e-searching-tokenizer.h"
-#include "folder-browser-factory.h"
-#include "mail-display.h"
-#include "mail-config.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
-#include "mail.h"
-
-#include "art/empty.xpm"
-
-#define PARENT_TYPE (gtk_vbox_get_type ())
-
-static GtkObjectClass *mail_display_parent_class;
-
-struct _PixbufLoader {
- CamelDataWrapper *wrapper; /* The data */
- CamelStream *mstream;
- GdkPixbufLoader *loader;
- GtkHTMLEmbedded *eb;
- char *type; /* Type of data, in case the conversion fails */
- char *cid; /* Strdupped on creation, but not freed until
- the hashtable is destroyed */
- GtkWidget *pixmap;
- guint32 destroy_id;
-};
-static GHashTable *thumbnail_cache = NULL;
-
-static gchar *save_pathname = NULL; /* preserves last directory in save dialog */
-
-/*----------------------------------------------------------------------*
- * Callbacks
- *----------------------------------------------------------------------*/
-
-static void
-write_data_written(CamelMimePart *part, char *name, int done, void *data)
-{
- int *ret = data;
-
- /* should we popup a dialogue to say its done too? */
- *ret = done;
-}
-
-static gboolean
-write_data_to_file (CamelMimePart *part, const char *name, gboolean unique)
-{
- int fd;
- int ret = FALSE;
-
- g_return_val_if_fail (CAMEL_IS_MIME_PART (part), FALSE);
-
- fd = open (name, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
- if (fd == -1 && errno == EEXIST && !unique) {
- GtkWidget *dlg;
- GtkWidget *text;
-
- dlg = gnome_dialog_new (_("Overwrite file?"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
- text = gtk_label_new (_("A file by that name already exists.\nOverwrite it?"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), text, TRUE, TRUE, 4);
- gtk_window_set_policy(GTK_WINDOW(dlg), FALSE, TRUE, FALSE);
- gtk_widget_show (text);
-
- if (gnome_dialog_run_and_close (GNOME_DIALOG (dlg)) != 0)
- return FALSE;
- }
-
- if (fd != -1)
- close (fd);
-
- /* should this have progress of what its doing? */
- mail_msg_wait (mail_save_part (part, name, write_data_written, &ret));
-
- return ret;
-}
-
-static char *
-make_safe_filename (const char *prefix,CamelMimePart *part)
-{
- const char *name = NULL;
- char *safe, *p;
-
- if (part) {
- name = camel_mime_part_get_filename (part);
- }
-
- if (!name) {
- /* This is a filename. Translators take note. */
- name = _("attachment");
- }
-
- p = strrchr (name, '/');
- if (p)
- safe = g_strdup_printf ("%s%s", prefix, p);
- else
- safe = g_strdup_printf ("%s/%s", prefix, name);
-
- p = strrchr (safe, '/') + 1;
- if (p)
- e_filename_make_safe (p);
-
- return safe;
-}
-
-static void
-save_data_cb (GtkWidget *widget, gpointer user_data)
-{
- GtkFileSelection *file_select = (GtkFileSelection *)
- gtk_widget_get_ancestor (widget, GTK_TYPE_FILE_SELECTION);
- gchar *p;
-
- /* uh, this doesn't really feel right, but i dont know what to do better */
- gtk_widget_hide (GTK_WIDGET (file_select));
- write_data_to_file (user_data,
- gtk_file_selection_get_filename (file_select),
- FALSE);
-
- /* preserve the pathname */
- g_free(save_pathname);
- save_pathname = g_strdup(gtk_file_selection_get_filename(file_select));
- if((p = strrchr(save_pathname, '/')) != NULL)
- p[0] = 0;
- else {
- g_free(save_pathname);
- save_pathname = NULL;
- }
-
- gtk_widget_destroy (GTK_WIDGET (file_select));
-}
-
-static gboolean
-idle_redisplay (gpointer data)
-{
- MailDisplay *md = data;
-
- md->idle_id = 0;
- mail_display_redisplay (md, FALSE);
- return FALSE;
-}
-
-void
-mail_display_queue_redisplay (MailDisplay *md)
-{
- if (!md->idle_id) {
- md->idle_id = g_idle_add_full (G_PRIORITY_LOW, idle_redisplay,
- md, NULL);
- }
-}
-
-static void
-on_link_clicked (GtkHTML *html, const char *url, MailDisplay *md)
-{
- if (!g_strncasecmp (url, "news:", 5) ||
- !g_strncasecmp (url, "nntp:", 5))
- g_warning ("Can't handle news URLs yet.");
- else if (!g_strncasecmp (url, "mailto:", 7))
- send_to_url (url);
- else if (!strcmp (url, "x-evolution-decode-pgp:")) {
- g_datalist_set_data (md->data, "show_pgp",
- GINT_TO_POINTER (1));
- mail_display_queue_redisplay (md);
- } else
- gnome_url_show (url);
-}
-
-static void
-save_part (CamelMimePart *part)
-{
- GtkFileSelection *file_select;
- char *filename;
-
- if (save_pathname == NULL)
- save_pathname = g_strdup (g_get_home_dir ());
-
- filename = make_safe_filename (save_pathname, part);
-
- file_select = GTK_FILE_SELECTION (
- gtk_file_selection_new (_("Save Attachment")));
- gtk_file_selection_set_filename (file_select, filename);
- /* set the GtkEntry with the locale filename by breaking abstraction */
- e_utf8_gtk_entry_set_text (GTK_ENTRY (file_select->selection_entry), g_basename (filename));
- g_free (filename);
-
- gtk_signal_connect (GTK_OBJECT (file_select->ok_button), "clicked",
- GTK_SIGNAL_FUNC (save_data_cb), part);
- gtk_signal_connect_object (GTK_OBJECT (file_select->cancel_button),
- "clicked",
- GTK_SIGNAL_FUNC (gtk_widget_destroy),
- GTK_OBJECT (file_select));
-
- gtk_widget_show (GTK_WIDGET (file_select));
-}
-
-static void
-save_cb (GtkWidget *widget, gpointer user_data)
-{
- CamelMimePart *part = gtk_object_get_data (GTK_OBJECT (user_data), "CamelMimePart");
-
- save_part (part);
-}
-
-static void
-launch_cb (GtkWidget *widget, gpointer user_data)
-{
- CamelMimePart *part = gtk_object_get_data (user_data, "CamelMimePart");
- MailMimeHandler *handler;
- GList *apps, *children, *c;
- GnomeVFSMimeApplication *app;
- char *command, *filename;
- const char *tmpdir;
-
- handler = mail_lookup_handler (gtk_object_get_data (user_data, "mime_type"));
- g_return_if_fail (handler != NULL && handler->applications != NULL);
-
- /* Yum. Too bad EPopupMenu doesn't allow per-item closures. */
- children = gtk_container_children (GTK_CONTAINER (widget->parent));
- g_return_if_fail (children != NULL && children->next != NULL && children->next->next != NULL);
-
- for (c = children->next->next, apps = handler->applications; c && apps; c = c->next, apps = apps->next) {
- if (c->data == widget)
- break;
- }
- g_list_free (children);
- g_return_if_fail (c != NULL && apps != NULL);
- app = apps->data;
-
- tmpdir = e_mkdtemp ("evolution.XXXXXX");
-
- if (!tmpdir) {
- char *msg = g_strdup_printf (_("Could not create temporary "
- "directory: %s"),
- g_strerror (errno));
- gnome_error_dialog (msg);
- g_free (msg);
- return;
- }
-
- filename = make_safe_filename (tmpdir, part);
-
- if (!write_data_to_file (part, filename, TRUE)) {
- g_free (filename);
- return;
- }
-
- command = g_strdup_printf ("%s %s%s &", app->command,
- app->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS ? "file:" : "",
- filename);
- system (command);
- g_free (command);
- g_free (filename);
-}
-
-static void
-inline_cb (GtkWidget *widget, gpointer user_data)
-{
- MailDisplay *md = gtk_object_get_data (user_data, "MailDisplay");
- CamelMimePart *part = gtk_object_get_data (user_data, "CamelMimePart");
-
- mail_part_toggle_displayed (part, md);
- mail_display_queue_redisplay (md);
-}
-
-static void
-button_press (GtkWidget *widget, CamelMimePart *part)
-{
- MailDisplay *md;
-
- md = gtk_object_get_data (GTK_OBJECT (widget), "MailDisplay");
- if (md == NULL) {
- g_warning ("No MailDisplay on button!");
- return;
- }
-
- mail_part_toggle_displayed (part, md);
- mail_display_queue_redisplay (md);
-}
-
-static gboolean
-pixmap_press (GtkWidget *widget, GdkEventButton *event, EScrollFrame *user_data)
-{
- EPopupMenu *menu;
- EPopupMenu save_item = { N_("Save to Disk..."), NULL,
- GTK_SIGNAL_FUNC (save_cb), NULL, 0 };
- EPopupMenu view_item = { N_("View Inline"), NULL,
- GTK_SIGNAL_FUNC (inline_cb), NULL, 2 };
- EPopupMenu open_item = { N_("Open in %s..."), NULL,
- GTK_SIGNAL_FUNC (launch_cb), NULL, 1 };
- MailDisplay *md;
- CamelMimePart *part;
- MailMimeHandler *handler;
- int mask = 0, i, nitems;
-
-#ifdef USE_OLD_DISPLAY_STYLE
- if (event->button != 3) {
- gtk_propagate_event (GTK_WIDGET (user_data),
- (GdkEvent *)event);
- return TRUE;
- }
-#endif
-
- if (event->button != 1 && event->button != 3) {
- gtk_propagate_event (GTK_WIDGET (user_data),
- (GdkEvent *)event);
- return TRUE;
- }
-
- /* Stop the signal, since we don't want the button's class method to
- mess up our popup. */
- gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
-
- part = gtk_object_get_data (GTK_OBJECT (widget), "CamelMimePart");
- handler = mail_lookup_handler (gtk_object_get_data (GTK_OBJECT (widget),
- "mime_type"));
-
- if (handler && handler->applications)
- nitems = g_list_length (handler->applications) + 2;
- else
- nitems = 3;
- menu = g_new0 (EPopupMenu, nitems + 1);
-
- /* Save item */
- memcpy (&menu[0], &save_item, sizeof (menu[0]));
- menu[0].name = _(menu[0].name);
-
- /* Inline view item */
- memcpy (&menu[1], &view_item, sizeof (menu[1]));
- if (handler && handler->builtin) {
- md = gtk_object_get_data (GTK_OBJECT (widget), "MailDisplay");
-
- if (!mail_part_is_displayed_inline (part, md)) {
- if (handler->component) {
- OAF_Property *prop;
- char *name;
-
- prop = oaf_server_info_prop_find (
- handler->component, "name");
- if (!prop) {
- prop = oaf_server_info_prop_find (
- handler->component,
- "description");
- }
- if (prop && prop->v._d == OAF_P_STRING)
- name = prop->v._u.value_string;
- else
- name = "bonobo";
- menu[1].name = g_strdup_printf (
- _("View Inline (via %s)"), name);
- } else
- menu[1].name = g_strdup (_(menu[1].name));
- } else
- menu[1].name = g_strdup (_("Hide"));
- } else {
- menu[1].name = g_strdup (_(menu[1].name));
- mask |= 2;
- }
-
- /* External views */
- if (handler && handler->applications) {
- GnomeVFSMimeApplication *app;
- GList *apps;
- int i;
-
- apps = handler->applications;
- for (i = 2; i < nitems; i++, apps = apps->next) {
- app = apps->data;
- memcpy (&menu[i], &open_item, sizeof (menu[i]));
- menu[i].name = g_strdup_printf (_(menu[i].name), app->name);
- }
- } else {
- memcpy (&menu[2], &open_item, sizeof (menu[2]));
- menu[2].name = g_strdup_printf (_(menu[2].name),
- _("External Viewer"));
- mask |= 1;
- }
-
- e_popup_menu_run (menu, (GdkEvent *)event, mask, 0, widget);
-
- for (i = 1; i < nitems; i++)
- g_free (menu[i].name);
- g_free (menu);
- return TRUE;
-}
-
-static GdkPixbuf *
-pixbuf_for_mime_type (const char *mime_type)
-{
- const char *icon_name;
- char *filename = NULL;
- GdkPixbuf *pixbuf = NULL;
-
- 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) {
- pixbuf = gdk_pixbuf_new_from_file (filename);
- g_free (filename);
- }
-
- if (!pixbuf) {
- filename = gnome_pixmap_file ("gnome-unknown.png");
- if (filename) {
- pixbuf = gdk_pixbuf_new_from_file (filename);
- g_free (filename);
- } else {
- g_warning ("Could not get any icon for %s!",mime_type);
- pixbuf = gdk_pixbuf_new_from_xpm_data (
- (const char **)empty_xpm);
- }
- }
-
- return pixbuf;
-}
-
-static gboolean
-pixbuf_uncache (gpointer key)
-{
- GdkPixbuf *pixbuf;
-
- pixbuf = g_hash_table_lookup (thumbnail_cache, key);
- gdk_pixbuf_unref (pixbuf);
- g_hash_table_remove (thumbnail_cache, key);
- g_free (key);
- return FALSE;
-}
-
-static gint
-pixbuf_gen_idle (struct _PixbufLoader *pbl)
-{
- GdkPixbuf *pixbuf, *mini;
- gboolean error = FALSE;
- char tmp[4096];
- int len, width, height, ratio;
- gpointer orig_key;
-
- /* Get the pixbuf from the cache */
- if (g_hash_table_lookup_extended (thumbnail_cache, pbl->cid,
- &orig_key, (gpointer *)&mini)) {
- width = gdk_pixbuf_get_width (mini);
- height = gdk_pixbuf_get_height (mini);
-
- bonobo_ui_toolbar_icon_set_pixbuf (
- BONOBO_UI_TOOLBAR_ICON (pbl->pixmap), mini);
- gtk_widget_set_usize (pbl->pixmap, width, height);
-
- /* Restart the cache-cleaning timer */
- g_source_remove_by_user_data (orig_key);
- g_timeout_add (5 * 60 * 1000, pixbuf_uncache, orig_key);
-
- if (pbl->loader) {
- gdk_pixbuf_loader_close (pbl->loader);
- gtk_object_destroy (GTK_OBJECT (pbl->loader));
- camel_object_unref (CAMEL_OBJECT (pbl->mstream));
- }
- gtk_signal_disconnect (GTK_OBJECT (pbl->eb), pbl->destroy_id);
- g_free (pbl->type);
- g_free (pbl->cid);
- g_free (pbl);
-
- return FALSE;
- }
-
- /* Not in cache, so get a pixbuf from the wrapper */
-
- if (!GTK_IS_WIDGET (pbl->pixmap)) {
- /* Widget has died */
- if (pbl->mstream)
- camel_object_unref (CAMEL_OBJECT (pbl->mstream));
-
- if (pbl->loader) {
- gdk_pixbuf_loader_close (pbl->loader);
- gtk_object_destroy (GTK_OBJECT (pbl->loader));
- }
-
- g_free (pbl->type);
- g_free (pbl->cid);
- g_free (pbl);
- return FALSE;
- }
-
- if (pbl->mstream) {
- if (pbl->loader == NULL)
- pbl->loader = gdk_pixbuf_loader_new ();
-
- len = camel_stream_read (pbl->mstream, tmp, 4096);
- if (len > 0) {
- error = !gdk_pixbuf_loader_write (pbl->loader, tmp, len);
- if (!error)
- return TRUE;
- } else if (!camel_stream_eos (pbl->mstream))
- error = TRUE;
- }
-
- if (error || !pbl->mstream)
- pixbuf = pixbuf_for_mime_type (pbl->type);
- else
- pixbuf = gdk_pixbuf_loader_get_pixbuf (pbl->loader);
-
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
-
- if (width >= height) {
- if (width > 24) {
- ratio = width / 24;
- width = 24;
- height /= ratio;
- }
- } else {
- if (height > 24) {
- ratio = height / 24;
- height = 24;
- width /= ratio;
- }
- }
-
- mini = gdk_pixbuf_scale_simple (pixbuf, width, height,
- GDK_INTERP_BILINEAR);
- if (error || !pbl->mstream)
- gdk_pixbuf_unref (pixbuf);
- bonobo_ui_toolbar_icon_set_pixbuf (
- BONOBO_UI_TOOLBAR_ICON (pbl->pixmap), mini);
- gtk_widget_set_usize (pbl->pixmap, 24, 24);
-
- /* Add the pixbuf to the cache */
- g_hash_table_insert (thumbnail_cache, pbl->cid, mini);
- g_timeout_add (5 * 60 * 1000, pixbuf_uncache, pbl->cid);
-
- gtk_signal_disconnect (GTK_OBJECT (pbl->eb), pbl->destroy_id);
- if (pbl->loader) {
- gdk_pixbuf_loader_close (pbl->loader);
- gtk_object_unref (GTK_OBJECT (pbl->loader));
- camel_object_unref (CAMEL_OBJECT (pbl->mstream));
- }
- g_free (pbl->type);
- g_free (pbl);
- return FALSE;
-}
-
-/* Stop the idle function and free the pbl structure
- as the widget that the pixbuf was to be rendered to
- has died on us. */
-static void
-embeddable_destroy_cb (GtkObject *embeddable,
- struct _PixbufLoader *pbl)
-{
- g_idle_remove_by_data (pbl);
- if (pbl->mstream)
- camel_object_unref (CAMEL_OBJECT (pbl->mstream));
-
- if (pbl->loader) {
- gdk_pixbuf_loader_close (pbl->loader);
- gtk_object_destroy (GTK_OBJECT (pbl->loader));
- }
-
- g_free (pbl->type);
- g_free (pbl->cid);
- g_free (pbl);
-};
-
-static GtkWidget *
-get_embedded_for_component (const char *iid, MailDisplay *md)
-{
- GtkWidget *embedded;
- BonoboControlFrame *control_frame;
- Bonobo_PropertyBag prop_bag;
-
- /*
- * First try a control.
- */
- embedded = bonobo_widget_new_control (iid, NULL);
- if (embedded == NULL) {
- /*
- * No control, try an embeddable instead.
- */
- embedded = bonobo_widget_new_subdoc (iid, NULL);
- if (embedded != NULL) {
- /* FIXME: as of bonobo 0.18, there's an extra
- * client_site dereference in the BonoboWidget
- * destruction path that we have to balance out to
- * prevent problems.
- */
- bonobo_object_ref (BONOBO_OBJECT(bonobo_widget_get_client_site (
- BONOBO_WIDGET (embedded))));
-
- return embedded;
- }
- }
-
- if (embedded == NULL)
- return NULL;
-
- control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (embedded));
-
- prop_bag = bonobo_control_frame_get_control_property_bag ( control_frame, NULL );
-
- if (prop_bag != CORBA_OBJECT_NIL){
- CORBA_Environment ev;
- /*
- * Now we can take care of business. Currently, the only control
- * that needs something passed to it through a property bag is
- * the iTip control, and it needs only the From email address,
- * but perhaps in the future we can generalize this section of code
- * to pass a bunch of useful things to all embedded controls.
- */
- const CamelInternetAddress *from;
- char *from_address;
-
- CORBA_exception_init (&ev);
-
- from = camel_mime_message_get_from (md->current_message);
- from_address = camel_address_encode((CamelAddress *)from);
- bonobo_property_bag_client_set_value_string (
- prop_bag, "from_address",
- from_address, &ev);
- g_free(from_address);
-
- Bonobo_Unknown_unref (prop_bag, &ev);
- CORBA_exception_free (&ev);
- }
-
- return embedded;
-}
-
-static void *
-save_url (MailDisplay *md, const char *url)
-{
- GHashTable *urls;
- CamelMimePart *part;
-
- urls = g_datalist_get_data (md->data, "part_urls");
- g_return_val_if_fail (urls != NULL, NULL);
-
- part = g_hash_table_lookup (urls, url);
- if (part) {
- CamelDataWrapper *data;
-
- g_return_val_if_fail (CAMEL_IS_MIME_PART (part), NULL);
-
- data = camel_medium_get_content_object ((CamelMedium *)part);
- if (!mail_content_loaded (data, md, TRUE, NULL, NULL)) {
- return NULL;
- }
-
- save_part (part);
- return NULL;
- }
-
- g_warning ("part not found");
-#if 0
- urls = g_datalist_get_data (md->data, "data_urls");
- g_return_val_if_fail (urls != NULL, NULL);
-
- /* See if it's some piece of cached data */
- ba = g_hash_table_lookup (urls, url);
- if (ba) {
- return ba;
- }
-#endif
- return NULL;
-}
-
-static gboolean
-on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
-{
- MailDisplay *md = data;
- GHashTable *urls;
- CamelMedium *medium;
- CamelDataWrapper *wrapper;
- OAF_ServerInfo *component;
- GtkWidget *embedded;
- BonoboObjectClient *server;
- Bonobo_PersistStream persist;
- CORBA_Environment ev;
- GByteArray *ba;
- CamelStream *cstream;
- BonoboStream *bstream;
- char *cid;
-
- cid = eb->classid;
-
- if (!strncmp (cid, "popup:", 6))
- cid += 6;
- if (strncmp (cid, "cid:", 4) != 0)
- return FALSE;
-
- urls = g_datalist_get_data (md->data, "part_urls");
- g_return_val_if_fail (urls != NULL, FALSE);
-
- medium = g_hash_table_lookup (urls, cid);
- g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), FALSE);
-
- if (cid != eb->classid) {
- /* This is a part wrapper */
-#ifdef USE_OLD_DISPLAY_STYLE
- GtkWidget *ebox;
-#else
- GtkWidget *button, *mainbox, *hbox, *arrow, *popup;
- MailMimeHandler *handler;
-#endif
- struct _PixbufLoader *pbl;
-
- pbl = g_new0 (struct _PixbufLoader, 1);
- if (g_strncasecmp (eb->type, "image/", 6) == 0) {
- CamelDataWrapper *content;
-
- content = camel_medium_get_content_object (medium);
- if (!camel_data_wrapper_is_offline (content)) {
- pbl->mstream = camel_stream_mem_new ();
- camel_data_wrapper_write_to_stream (content, pbl->mstream);
- camel_stream_reset (pbl->mstream);
- }
- }
- pbl->type = g_strdup (eb->type);
- pbl->cid = g_strdup (cid);
- pbl->pixmap = bonobo_ui_toolbar_icon_new ();
- pbl->eb = eb;
- pbl->destroy_id = gtk_signal_connect (GTK_OBJECT (eb),
- "destroy",
- embeddable_destroy_cb,
- pbl);
-
- g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc)pixbuf_gen_idle,
- pbl, NULL);
-
-#ifdef USE_OLD_DISPLAY_STYLE
- ebox = gtk_event_box_new ();
- gtk_widget_set_sensitive (GTK_WIDGET (ebox), TRUE);
- gtk_widget_add_events (GTK_WIDGET (ebox),
- GDK_BUTTON_PRESS_MASK);
- gtk_object_set_data (GTK_OBJECT (ebox), "MailDisplay", md);
- gtk_object_set_data (GTK_OBJECT (ebox), "CamelMimePart",
- medium);
- gtk_object_set_data_full (GTK_OBJECT (ebox), "mime_type",
- g_strdup (eb->type),
- (GDestroyNotify)g_free);
-
- gtk_signal_connect (GTK_OBJECT (ebox), "button_press_event",
- GTK_SIGNAL_FUNC (pixmap_press), md->scroll);
-
- gtk_container_add (GTK_CONTAINER (ebox), pbl->pixmap);
- gtk_widget_show_all (ebox);
- gtk_container_add (GTK_CONTAINER (eb), ebox);
-#else
- mainbox = gtk_hbox_new (FALSE, 0);
-
- button = gtk_button_new ();
- gtk_object_set_data (GTK_OBJECT (button), "MailDisplay", md);
-
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (button_press), medium);
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
-
- if (mail_part_is_displayed_inline (CAMEL_MIME_PART (medium), md)) {
- arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_DOWN);
- } else {
- arrow = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_FORWARD);
- }
- gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), pbl->pixmap, TRUE, TRUE, 0);
- gtk_container_add (GTK_CONTAINER (button), hbox);
-
- popup = gtk_button_new ();
- gtk_container_add (GTK_CONTAINER (popup),
- gtk_arrow_new (GTK_ARROW_DOWN,
- GTK_SHADOW_ETCHED_IN));
-
- gtk_object_set_data (GTK_OBJECT (popup), "MailDisplay", md);
- gtk_object_set_data (GTK_OBJECT (popup), "CamelMimePart",
- medium);
- gtk_object_set_data_full (GTK_OBJECT (popup), "mime_type",
- g_strdup (eb->type),
- (GDestroyNotify)g_free);
-
- gtk_signal_connect (GTK_OBJECT (popup), "button_press_event",
- GTK_SIGNAL_FUNC (pixmap_press), md->scroll);
-
- gtk_box_pack_start (GTK_BOX (mainbox), button, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (mainbox), popup, TRUE, TRUE, 0);
- gtk_widget_show_all (mainbox);
-
- handler = mail_lookup_handler (eb->type);
- if (handler && handler->builtin) {
- gtk_widget_set_sensitive (button, TRUE);
- } else {
- gtk_widget_set_sensitive (button, FALSE);
- }
-
- gtk_container_add (GTK_CONTAINER (eb), mainbox);
-#endif
-
- return TRUE;
- }
-
- component = gnome_vfs_mime_get_default_component (eb->type);
- if (!component)
- return FALSE;
-
- embedded = get_embedded_for_component (component->iid, md);
- CORBA_free (component);
- if (!embedded)
- return FALSE;
-
- server = bonobo_widget_get_server (BONOBO_WIDGET (embedded));
- persist = (Bonobo_PersistStream) bonobo_object_client_query_interface (
- server, "IDL:Bonobo/PersistStream:1.0", NULL);
- if (persist == CORBA_OBJECT_NIL) {
- gtk_object_sink (GTK_OBJECT (embedded));
- return FALSE;
- }
-
- /* Write the data to a CamelStreamMem... */
- ba = g_byte_array_new ();
- cstream = camel_stream_mem_new_with_byte_array (ba);
- wrapper = camel_medium_get_content_object (medium);
- camel_data_wrapper_write_to_stream (wrapper, cstream);
-
- /* ...convert the CamelStreamMem to a BonoboStreamMem... */
- bstream = bonobo_stream_mem_create (ba->data, ba->len, TRUE, FALSE);
- camel_object_unref (CAMEL_OBJECT (cstream));
-
- /* ...and hydrate the PersistStream from the BonoboStream. */
- CORBA_exception_init (&ev);
- Bonobo_PersistStream_load (persist,
- bonobo_object_corba_objref (
- BONOBO_OBJECT (bstream)),
- eb->type, &ev);
- bonobo_object_unref (BONOBO_OBJECT (bstream));
- Bonobo_Unknown_unref (persist, &ev);
- CORBA_Object_release (persist, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- gtk_object_sink (GTK_OBJECT (embedded));
- CORBA_exception_free (&ev);
- return FALSE;
- }
- CORBA_exception_free (&ev);
-
- gtk_widget_show (embedded);
- gtk_container_add (GTK_CONTAINER (eb), embedded);
-
- return TRUE;
-}
-
-static void
-load_http (MailDisplay *md, gpointer data)
-{
- char *url = data;
- GHashTable *urls;
- GnomeVFSHandle *handle;
- GnomeVFSFileSize read;
- GByteArray *ba;
- char buf[8192];
-
- urls = g_datalist_get_data (md->data, "data_urls");
- ba = g_hash_table_lookup (urls, url);
- g_return_if_fail (ba != NULL);
-
- if (gnome_vfs_open (&handle, url, GNOME_VFS_OPEN_READ) != GNOME_VFS_OK) {
-#if 0
- printf ("failed to open %s\n", url);
-#endif
- g_free (url);
- return;
- }
-
- while (gnome_vfs_read (handle, buf, sizeof (buf), &read) == GNOME_VFS_OK)
- g_byte_array_append (ba, buf, read);
- gnome_vfs_close (handle);
-
-#if 0
- if (!ba->len)
- printf ("no data in %s\n", url);
-#endif
-
- g_free (url);
-}
-
-static void
-ebook_callback (EBook *book, const gchar *addr, ECard *card, gpointer data)
-{
- MailDisplay *md = data;
-
- if (card && md->current_message) {
- const CamelInternetAddress *from = camel_mime_message_get_from (md->current_message);
- const char *md_name = NULL, *md_addr = NULL;
-
- /* We are extra anal, in case we are dealing with some sort of pathological message
- w/o a From: header. */
- if (from != NULL && camel_internet_address_get (from, 0, &md_name, &md_addr)) {
- if (md_addr != NULL && !strcmp (addr, md_addr))
- mail_display_load_images (md);
- }
- }
-}
-
-static void
-on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle,
- gpointer user_data)
-{
- MailDisplay *md = user_data;
- GHashTable *urls;
- CamelMedium *medium;
- GByteArray *ba;
-
- urls = g_datalist_get_data (md->data, "part_urls");
- g_return_if_fail (urls != NULL);
-
- /* See if it refers to a MIME part (cid: or http:) */
- medium = g_hash_table_lookup (urls, url);
- if (medium) {
- CamelDataWrapper *data;
- CamelStream *stream_mem;
-
- g_return_if_fail (CAMEL_IS_MEDIUM (medium));
-
- data = camel_medium_get_content_object (medium);
- if (!mail_content_loaded (data, md, FALSE, url, handle))
- return;
-
- ba = g_byte_array_new ();
- stream_mem = camel_stream_mem_new_with_byte_array (ba);
- camel_data_wrapper_write_to_stream (data, stream_mem);
- /* printf ("-- begin --\n");
- printf (ba->data);
- printf ("-- end --\n"); */
- gtk_html_write (html, handle, ba->data, ba->len);
- camel_object_unref (CAMEL_OBJECT (stream_mem));
-
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
- return;
- }
-
- urls = g_datalist_get_data (md->data, "data_urls");
- g_return_if_fail (urls != NULL);
-
- /* See if it's some piece of cached data */
- ba = g_hash_table_lookup (urls, url);
- if (ba) {
- if (ba->len) {
- gtk_html_write (html, handle, ba->data, ba->len);
- /* printf ("-- begin --\n");
- printf (ba->data);
- printf ("-- end --\n"); */
- }
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
- return;
- }
-
- /* See if it's something we can load. */
- if (strncmp (url, "http:", 5) == 0) {
- if (mail_config_get_http_mode () == MAIL_CONFIG_HTTP_ALWAYS ||
- g_datalist_get_data (md->data, "load_images")) {
- ba = g_byte_array_new ();
- g_hash_table_insert (urls, g_strdup (url), ba);
- mail_display_stream_write_when_loaded (md, ba, url, load_http, handle,
- g_strdup (url));
- } else if (mail_config_get_http_mode () == MAIL_CONFIG_HTTP_SOMETIMES &&
- !g_datalist_get_data (md->data, "checking_from")) {
- const CamelInternetAddress *from = camel_mime_message_get_from (md->current_message);
- const char *name, *addr;
-
- g_datalist_set_data (md->data, "checking_from",
- GINT_TO_POINTER (1));
-
- /* Make sure we aren't deal w/ some sort of a pathological message w/o a From: header */
- if (from != NULL && camel_internet_address_get (from, 0, &name, &addr))
- e_book_query_address_locally (addr, ebook_callback, md);
- else
- gtk_html_end (html, handle, GTK_HTML_STREAM_ERROR);
- }
- }
-}
-
-struct _load_content_msg {
- struct _mail_msg msg;
-
- MailDisplay *display;
-
- GtkHTMLStream *handle;
- gint redisplay_counter;
- gchar *url;
- CamelMimeMessage *message;
- void (*callback)(MailDisplay *, gpointer);
- gpointer data;
-};
-
-static char *
-load_content_desc (struct _mail_msg *mm, int done)
-{
- return g_strdup (_("Loading message content"));
-}
-
-static void
-load_content_load (struct _mail_msg *mm)
-{
- struct _load_content_msg *m = (struct _load_content_msg *)mm;
-
- m->callback (m->display, m->data);
-}
-
-static gboolean
-try_part_urls (struct _load_content_msg *m)
-{
- GHashTable *urls;
- CamelMedium *medium;
- GByteArray *ba;
-
- urls = g_datalist_get_data (m->display->data, "part_urls");
- g_return_val_if_fail (urls != NULL, FALSE);
-
- /* See if it refers to a MIME part (cid: or http:) */
- medium = g_hash_table_lookup (urls, m->url);
- if (medium) {
- CamelDataWrapper *data;
- CamelStream *stream_mem;
-
- g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), FALSE);
-
- data = camel_medium_get_content_object (medium);
- if (!mail_content_loaded (data, m->display, FALSE, m->url, m->handle)) {
- g_warning ("This code should not be reached\n");
- return TRUE;
- }
-
- ba = g_byte_array_new ();
- stream_mem = camel_stream_mem_new_with_byte_array (ba);
- camel_data_wrapper_write_to_stream (data, stream_mem);
- /* printf ("-- begin --\n");
- printf (ba->data);
- printf ("-- end --\n"); */
- gtk_html_write (m->display->html, m->handle, ba->data, ba->len);
- camel_object_unref (CAMEL_OBJECT (stream_mem));
-
- gtk_html_end (m->display->html, m->handle, GTK_HTML_STREAM_OK);
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-try_data_urls (struct _load_content_msg *m)
-{
- GHashTable *urls;
- GByteArray *ba;
-
- urls = g_datalist_get_data (m->display->data, "data_urls");
- ba = g_hash_table_lookup (urls, m->url);
-
- printf ("url: %s data: %p len: %d\n", m->url, ba, ba ? ba->len : -1);
- if (ba) {
- if (ba->len) {
- printf ("writing ...\n");
- gtk_html_write (m->display->html, m->handle, ba->data, ba->len);
- }
- gtk_html_end (m->display->html, m->handle, GTK_HTML_STREAM_OK);
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-load_content_loaded (struct _mail_msg *mm)
-{
- struct _load_content_msg *m = (struct _load_content_msg *)mm;
-
- if (m->display->current_message == m->message) {
- if (m->handle) {
- printf ("handle: %p orig: %d actual: %d\n", m->handle,
- m->redisplay_counter,
- m->display->redisplay_counter);
- if (m->redisplay_counter == m->display->redisplay_counter) {
- if (!try_part_urls (m) && !try_data_urls (m))
- gtk_html_end (m->display->html, m->handle, GTK_HTML_STREAM_ERROR);
- }
- } else
- mail_display_redisplay (m->display, FALSE);
- }
-}
-
-static void
-load_content_free (struct _mail_msg *mm)
-{
- struct _load_content_msg *m = (struct _load_content_msg *)mm;
-
- g_free (m->url);
- gtk_object_unref (GTK_OBJECT (m->display));
- camel_object_unref (CAMEL_OBJECT (m->message));
-}
-
-static struct _mail_msg_op load_content_op = {
- load_content_desc,
- load_content_load,
- load_content_loaded,
- load_content_free,
-};
-
-static void
-stream_write_or_redisplay_when_loaded (MailDisplay *md,
- gconstpointer key,
- const gchar *url,
- void (*callback)(MailDisplay *, gpointer),
- GtkHTMLStream *handle,
- gpointer data)
-{
- struct _load_content_msg *m;
- GHashTable *loading;
-
- loading = g_datalist_get_data (md->data, "loading");
- if (loading) {
- if (g_hash_table_lookup (loading, key))
- return;
- } else {
- loading = g_hash_table_new (NULL, NULL);
- g_datalist_set_data_full (md->data, "loading", loading,
- (GDestroyNotify)g_hash_table_destroy);
- }
- g_hash_table_insert (loading, (gpointer)key, GINT_TO_POINTER (1));
-
- m = mail_msg_new (&load_content_op, NULL, sizeof (*m));
- m->display = md;
- m->handle = handle;
- m->url = g_strdup (url);
- m->redisplay_counter = md->redisplay_counter;
- gtk_object_ref (GTK_OBJECT (m->display));
- m->message = md->current_message;
- camel_object_ref (CAMEL_OBJECT (m->message));
- m->callback = callback;
- m->data = data;
-
- e_thread_put (mail_thread_queued, (EMsg *)m);
- return;
-}
-
-void
-mail_display_stream_write_when_loaded (MailDisplay *md,
- gconstpointer key,
- const gchar *url,
- void (*callback)(MailDisplay *, gpointer),
- GtkHTMLStream *handle,
- gpointer data)
-{
- stream_write_or_redisplay_when_loaded (md, key, url, callback, handle, data);
-}
-
-void
-mail_display_redisplay_when_loaded (MailDisplay *md,
- gconstpointer key,
- void (*callback)(MailDisplay *, gpointer),
- gpointer data)
-{
- stream_write_or_redisplay_when_loaded (md, key, NULL, callback, NULL, data);
-}
-
-void
-mail_html_write (GtkHTML *html, GtkHTMLStream *stream,
- const char *format, ...)
-{
- char *buf;
- va_list ap;
-
- va_start (ap, format);
- buf = g_strdup_vprintf (format, ap);
- va_end (ap);
- gtk_html_write (html, stream, buf, strlen (buf));
- /* printf (buf); */
- g_free (buf);
-}
-
-void
-mail_text_write (GtkHTML *html, GtkHTMLStream *stream,
- const char *format, ...)
-{
- char *buf, *htmltext;
- va_list ap;
-
- va_start (ap, format);
- buf = g_strdup_vprintf (format, ap);
- va_end (ap);
-
- htmltext = e_text_to_html_full (buf,
- E_TEXT_TO_HTML_CONVERT_URLS |
- E_TEXT_TO_HTML_CONVERT_ADDRESSES |
- E_TEXT_TO_HTML_CONVERT_NL |
- E_TEXT_TO_HTML_CONVERT_SPACES |
- (mail_config_get_citation_highlight () ? E_TEXT_TO_HTML_MARK_CITATION : 0),
- mail_config_get_citation_color ());
- gtk_html_write (html, stream, "<tt>", 4);
- gtk_html_write (html, stream, htmltext, strlen (htmltext));
- gtk_html_write (html, stream, "</tt>", 5);
- g_free (htmltext);
- g_free (buf);
-}
-
-void
-mail_error_write (GtkHTML *html, GtkHTMLStream *stream,
- const char *format, ...)
-{
- char *buf, *htmltext;
- va_list ap;
-
- va_start (ap, format);
- buf = g_strdup_vprintf (format, ap);
- va_end (ap);
-
- htmltext = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL);
- gtk_html_write (html, stream, "<blockquote><em><font color=red>", 32);
- gtk_html_write (html, stream, htmltext, strlen (htmltext));
- gtk_html_write (html, stream, "</font></em></blockquote>", 29);
- g_free (htmltext);
- g_free (buf);
-}
-
-static void
-clear_data (CamelObject *object, gpointer event_data, gpointer user_data)
-{
- GData *data = user_data;
-
- g_datalist_clear (&data);
-}
-
-/**
- * mail_display_redisplay:
- * @mail_display: the mail display object
- * @unscroll: specifies whether or not to lose current scroll
- *
- * Force a redraw of the message display.
- **/
-void
-mail_display_redisplay (MailDisplay *md, gboolean unscroll)
-{
- md->last_active = NULL;
- md->redisplay_counter ++;
- /* printf ("md %p redisplay %d\n", md, md->redisplay_counter); */
-
- md->stream = gtk_html_begin (GTK_HTML (md->html));
- if (!unscroll) {
- /* This is a hack until there's a clean way to do this. */
- GTK_HTML (md->html)->engine->newPage = FALSE;
- }
-
- mail_html_write (md->html, md->stream, "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\">\n</head>\n");
- mail_html_write (md->html, md->stream, "<body marginwidth=0 marginheight=0>\n");
-
- if (md->current_message) {
- if (md->display_style == MAIL_CONFIG_DISPLAY_SOURCE)
- mail_format_raw_message (md->current_message, md);
- else
- mail_format_mime_message (md->current_message, md);
- }
-
- mail_html_write (md->html, md->stream, "</body></html>\n");
- gtk_html_end (md->html, md->stream, GTK_HTML_STREAM_OK);
- md->stream = NULL;
-}
-
-
-/**
- * mail_display_set_message:
- * @mail_display: the mail display object
- * @medium: the input camel medium, or %NULL
- *
- * Makes the mail_display object show the contents of the medium
- * param.
- **/
-void
-mail_display_set_message (MailDisplay *md, CamelMedium *medium)
-{
- /* For the moment, we deal only with CamelMimeMessage, but in
- * the future, we should be able to deal with any medium.
- */
- if (medium && !CAMEL_IS_MIME_MESSAGE (medium))
- return;
-
- /* Clean up from previous message. */
- if (md->current_message)
- camel_object_unref (CAMEL_OBJECT (md->current_message));
-
- md->current_message = (CamelMimeMessage*)medium;
-
- g_datalist_init (md->data);
- mail_display_redisplay (md, TRUE);
- if (medium) {
- camel_object_hook_event (CAMEL_OBJECT (medium), "finalize",
- clear_data, *(md->data));
- }
-}
-
-/**
- * mail_display_load_images:
- * @md: the mail display object
- *
- * Load all HTTP images in the current message
- **/
-void
-mail_display_load_images (MailDisplay *md)
-{
- g_datalist_set_data (md->data, "load_images", GINT_TO_POINTER (1));
- mail_display_redisplay (md, FALSE);
-}
-
-/*----------------------------------------------------------------------*
- * Standard Gtk+ Class functions
- *----------------------------------------------------------------------*/
-
-static void
-mail_display_init (GtkObject *object)
-{
- MailDisplay *mail_display = MAIL_DISPLAY (object);
-
- mail_display->current_message = NULL;
- mail_display->scroll = NULL;
- mail_display->html = NULL;
- mail_display->redisplay_counter = 0;
- mail_display->stream = NULL;
- mail_display->last_active = NULL;
- mail_display->idle_id = 0;
- mail_display->selection = NULL;
- mail_display->current_message = NULL;
- mail_display->data = NULL;
-
- mail_display->invisible = gtk_invisible_new ();
-
- mail_display->display_style = mail_config_get_message_display_style ();
-}
-
-static void
-mail_display_destroy (GtkObject *object)
-{
- MailDisplay *mail_display = MAIL_DISPLAY (object);
-
- g_free (mail_display->selection);
-
- g_datalist_clear (mail_display->data);
- g_free (mail_display->data);
-
- gtk_widget_unref (mail_display->invisible);
-
- mail_display_parent_class->destroy (object);
-}
-
-static void
-invisible_selection_get_callback (GtkWidget *widget,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- void *data)
-{
- MailDisplay *display;
-
- display = MAIL_DISPLAY (data);
-
- if (!display->selection)
- return;
-
- g_assert (info == 1);
-
- gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, 8,
- display->selection, strlen (display->selection));
-}
-
-static gint
-invisible_selection_clear_event_callback (GtkWidget *widget,
- GdkEventSelection *event,
- void *data)
-{
- MailDisplay *display;
-
- display = MAIL_DISPLAY (data);
-
- g_free (display->selection);
- display->selection = NULL;
-
- return TRUE;
-}
-
-static void
-mail_display_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = mail_display_destroy;
- mail_display_parent_class = gtk_type_class (PARENT_TYPE);
-
- thumbnail_cache = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-link_open_in_browser (GtkWidget *w, MailDisplay *mail_display)
-{
- on_link_clicked (mail_display->html, mail_display->html->pointer_url,
- mail_display);
-}
-
-static void
-link_save_as (GtkWidget *w, MailDisplay *mail_display)
-{
- g_print ("FIXME save %s\n", mail_display->html->pointer_url);
-}
-
-static void
-link_copy_location (GtkWidget *w, MailDisplay *mail_display)
-{
- GdkAtom clipboard_atom;
-
- g_free (mail_display->selection);
- mail_display->selection = g_strdup (mail_display->html->pointer_url);
-
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
- if (clipboard_atom == GDK_NONE)
- return; /* failed */
-
- /* We don't check the return values of the following since there is not
- * much we can do if we cannot assert the selection.
- */
-
- gtk_selection_owner_set (GTK_WIDGET (mail_display->invisible),
- GDK_SELECTION_PRIMARY,
- GDK_CURRENT_TIME);
- gtk_selection_owner_set (GTK_WIDGET (mail_display->invisible),
- clipboard_atom,
- GDK_CURRENT_TIME);
-}
-
-static void
-image_save_as (GtkWidget *w, MailDisplay *mail_display)
-{
- const char *src;
-
- src = gtk_object_get_data (GTK_OBJECT (mail_display), "current_src_uri");
-
- g_warning ("loading uri=%s", src);
-
- save_url (mail_display, src);
-}
-
-enum {
- /*
- * This is used to mask the link specific menu items.
- */
- MASK_URL = 1,
-
- /*
- * This is used to mask src specific menu items.
- */
- MASK_SRC = 2
-};
-
-#define SEPARATOR { "", NULL, (NULL), NULL, 0 }
-#define TERMINATOR { NULL, NULL, (NULL), NULL, 0 }
-
-static EPopupMenu link_menu [] = {
- { N_("Open Link in Browser"), NULL,
- GTK_SIGNAL_FUNC (link_open_in_browser), NULL, MASK_URL },
- { N_("Copy Link Location"), NULL,
- GTK_SIGNAL_FUNC (link_copy_location), NULL, MASK_URL },
-#if 0
- { N_("Save Link as (FIXME)"), NULL,
- GTK_SIGNAL_FUNC (link_save_as), NULL, MASK_URL },
-#endif
- { N_("Save Image as..."), NULL,
- GTK_SIGNAL_FUNC (image_save_as), NULL, MASK_SRC },
-
- TERMINATOR
-};
-
-
-/*
- * Create a window and popup our widget, with reasonable semantics for the popup
- * disappearing, etc.
- */
-
-typedef struct _PopupInfo PopupInfo;
-struct _PopupInfo {
- GtkWidget *w;
- GtkWidget *win;
- guint destroy_timeout;
- guint widget_destroy_handle;
- gboolean hidden;
-};
-
-/* Aiieee! Global Data! */
-static GtkWidget *the_popup = NULL;
-
-static void
-popup_info_free (PopupInfo *pop)
-{
- if (pop) {
- if (pop->destroy_timeout)
- gtk_timeout_remove (pop->destroy_timeout);
-
- g_free (pop);
- }
-}
-
-static void
-popup_window_destroy_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *pop = (PopupInfo *) user_data;
-
- the_popup = NULL;
-
- popup_info_free (pop);
-}
-
-static gint
-popup_timeout_cb (gpointer user_data)
-{
- PopupInfo *pop = (PopupInfo *) user_data;
-
- pop->destroy_timeout = 0;
- gtk_widget_destroy (pop->win);
-
- return 0;
-}
-
-static gint
-popup_enter_cb (GtkWidget *w, GdkEventCrossing *ev, gpointer user_data)
-{
- PopupInfo *pop = (PopupInfo *) user_data;
-
- if (pop->destroy_timeout)
- gtk_timeout_remove (pop->destroy_timeout);
- pop->destroy_timeout = 0;
-
- return 0;
-}
-
-static gint
-popup_leave_cb (GtkWidget *w, GdkEventCrossing *ev, gpointer user_data)
-{
- PopupInfo *pop = (PopupInfo *) user_data;
-
- if (pop->destroy_timeout)
- gtk_timeout_remove (pop->destroy_timeout);
-
- if (!pop->hidden)
- pop->destroy_timeout = gtk_timeout_add (500, popup_timeout_cb, pop);
-
- return 0;
-}
-
-static void
-popup_realize_cb (GtkWidget *widget, gpointer user_data)
-{
- PopupInfo *pop = (PopupInfo *) user_data;
-
- gtk_widget_add_events (pop->win, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
-
- if (pop->destroy_timeout == 0) {
- if (!pop->hidden) {
- pop->destroy_timeout = gtk_timeout_add (5000, popup_timeout_cb, pop);
- } else {
- pop->destroy_timeout = 0;
- }
- }
-}
-
-static void
-popup_size_allocate_cb (GtkWidget *widget, GtkAllocation *alloc, gpointer user_data)
-{
- gint x, y, w, h, xmax, ymax;
-
- xmax = gdk_screen_width ();
- ymax = gdk_screen_height ();
-
- gdk_window_get_pointer (NULL, &x, &y, NULL);
- w = alloc->width;
- h = alloc->height;
- x = CLAMP (x - w/2, 0, xmax - w);
- y = CLAMP (y - h/2, 0, ymax - h);
- gtk_widget_set_uposition (widget, x, y);
-
-}
-
-static PopupInfo *
-make_popup_window (GtkWidget *w)
-{
- PopupInfo *pop = g_new0 (PopupInfo, 1);
- GtkWidget *fr;
-
- /* Only allow for one popup at a time. Ugly. */
- if (the_popup)
- gtk_widget_destroy (the_popup);
-
- pop->w = w;
- the_popup = pop->win = gtk_window_new (GTK_WINDOW_POPUP);
- fr = gtk_frame_new (NULL);
-
- gtk_container_add (GTK_CONTAINER (pop->win), fr);
- gtk_container_add (GTK_CONTAINER (fr), w);
-
- gtk_window_set_policy (GTK_WINDOW (pop->win), FALSE, FALSE, FALSE);
-
- gtk_signal_connect (GTK_OBJECT (pop->win),
- "destroy",
- GTK_SIGNAL_FUNC (popup_window_destroy_cb),
- pop);
- gtk_signal_connect (GTK_OBJECT (pop->win),
- "enter_notify_event",
- GTK_SIGNAL_FUNC (popup_enter_cb),
- pop);
- gtk_signal_connect (GTK_OBJECT (pop->win),
- "leave_notify_event",
- GTK_SIGNAL_FUNC (popup_leave_cb),
- pop);
- gtk_signal_connect_after (GTK_OBJECT (pop->win),
- "realize",
- GTK_SIGNAL_FUNC (popup_realize_cb),
- pop);
- gtk_signal_connect (GTK_OBJECT (pop->win),
- "size_allocate",
- GTK_SIGNAL_FUNC (popup_size_allocate_cb),
- pop);
-
- gtk_widget_show (w);
- gtk_widget_show (fr);
- gtk_widget_show (pop->win);
-
- return pop;
-}
-
-static void
-listener_cb (BonoboListener *listener,
- char *event_name,
- CORBA_any *any,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- PopupInfo *pop;
- char *type;
-
- pop = user_data;
-
- if (pop->destroy_timeout)
- gtk_timeout_remove (pop->destroy_timeout);
- pop->destroy_timeout = 0;
-
- type = bonobo_event_subtype (event_name);
-
- if (!strcmp (type, "Destroy")) {
- gtk_widget_destroy (GTK_WIDGET (pop->win));
- } else if (!strcmp (type, "Hide")) {
- pop->hidden = TRUE;
- gtk_widget_hide (GTK_WIDGET (pop->win));
- }
-
- g_free (type);
-}
-
-static int
-html_button_press_event (GtkWidget *widget, GdkEventButton *event, MailDisplay *mail_display)
-{
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- if (event->type == GDK_BUTTON_PRESS) {
- if (event->button == 3) {
- HTMLEngine *e;
- HTMLPoint *point;
- GtkWidget *popup_thing;
-
- e = GTK_HTML (widget)->engine;
- point = html_engine_get_point_at (e, event->x + e->x_offset, event->y + e->y_offset, FALSE);
-
- if (point) {
- const gchar *url;
- const gchar *src;
-
- url = html_object_get_url (point->object);
- src = html_object_get_src (point->object);
-
- if (url && !g_strncasecmp (url, "mailto:", 7)) {
- PopupInfo *pop;
- gchar *url_decoded = g_strdup (url);
- camel_url_decode (url_decoded);
-
- popup_thing = bonobo_widget_new_control ("OAFIID:GNOME_Evolution_Addressbook_AddressPopup",
- CORBA_OBJECT_NIL);
-
- bonobo_widget_set_property (BONOBO_WIDGET (popup_thing),
- "email", url_decoded+7,
- NULL);
- g_free (url_decoded);
-
- pop = make_popup_window (popup_thing);
-
- bonobo_event_source_client_add_listener (
- bonobo_widget_get_objref (BONOBO_WIDGET (popup_thing)),
- listener_cb, NULL, NULL, pop);
-
- } else if (url || src) {
- gint hide_mask = 0;
-
- if (!url)
- hide_mask |= MASK_URL;
-
- if (!src)
- hide_mask |= MASK_SRC;
-
- g_free (gtk_object_get_data (GTK_OBJECT (mail_display), "current_src_uri"));
- gtk_object_set_data (GTK_OBJECT (mail_display), "current_src_uri", g_strdup (src));
-
- e_popup_menu_run (link_menu, (GdkEvent *) event, 0, hide_mask, mail_display);
-
- }
-
- html_point_destroy (point);
- }
-
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-static inline void
-set_underline (HTMLEngine *e, HTMLObject *o, gboolean underline)
-{
- HTMLText *text = HTML_TEXT (o);
-
- html_text_set_font_style (text, e, underline
- ? html_text_get_font_style (text) | GTK_HTML_FONT_STYLE_UNDERLINE
- : html_text_get_font_style (text) & ~GTK_HTML_FONT_STYLE_UNDERLINE);
- html_engine_queue_draw (e, o);
-}
-
-static void
-update_active (GtkWidget *widget, gint x, gint y, MailDisplay *mail_display)
-{
- HTMLEngine *e;
- HTMLPoint *point;
- const gchar *email;
-
- e = GTK_HTML (widget)->engine;
-
- point = html_engine_get_point_at (e, x + e->x_offset, y + e->y_offset, FALSE);
- if (mail_display->last_active && (!point || mail_display->last_active != point->object)) {
- set_underline (e, HTML_OBJECT (mail_display->last_active), FALSE);
- mail_display->last_active = NULL;
- }
- if (point) {
- email = (const gchar *) html_object_get_data (point->object, "email");
- if (email && html_object_is_text (point->object)) {
- set_underline (e, point->object, TRUE);
- mail_display->last_active = point->object;
- }
- html_point_destroy (point);
- }
-}
-
-static gint
-html_enter_notify_event (GtkWidget *widget, GdkEventCrossing *event, MailDisplay *mail_display)
-{
- update_active (widget, event->x, event->y, mail_display);
-
- return TRUE;
-}
-
-static gint
-html_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, MailDisplay *mail_display)
-{
- gint x, y;
-
- g_return_val_if_fail (widget != NULL, 0);
- g_return_val_if_fail (GTK_IS_HTML (widget), 0);
- g_return_val_if_fail (event != NULL, 0);
-
- if (event->is_hint)
- gdk_window_get_pointer (GTK_LAYOUT (widget)->bin_window, &x, &y, NULL);
- else {
- x = event->x;
- y = event->y;
- }
-
- update_active (widget, x, y, mail_display);
-
- return TRUE;
-}
-
-static void
-html_iframe_created (GtkWidget *w, GtkHTML *iframe, MailDisplay *mail_display)
-{
- gtk_signal_connect (GTK_OBJECT (iframe), "button_press_event",
- GTK_SIGNAL_FUNC (html_button_press_event), mail_display);
- gtk_signal_connect (GTK_OBJECT (iframe), "motion_notify_event",
- GTK_SIGNAL_FUNC (html_motion_notify_event), mail_display);
- gtk_signal_connect (GTK_OBJECT (iframe), "enter_notify_event",
- GTK_SIGNAL_FUNC (html_enter_notify_event), mail_display);
-}
-
-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;
-
- 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),
- "mail_threads_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 (const char *message, int busy)
-{
- EList *controls;
- EIterator *it;
-
- controls = folder_browser_factory_get_control_list ();
- for (it = e_list_get_iterator (controls); e_iterator_is_valid (it); e_iterator_next (it)) {
- BonoboControl *control;
- GNOME_Evolution_ShellView shell_view_interface;
- CORBA_Environment ev;
-
- control = BONOBO_CONTROL (e_iterator_get (it));
-
- shell_view_interface = gtk_object_get_data (GTK_OBJECT (control), "mail_threads_shell_view_interface");
-
- if (shell_view_interface == CORBA_OBJECT_NIL)
- shell_view_interface = retrieve_shell_view_interface_from_control (control);
-
- CORBA_exception_init (&ev);
-
- if (shell_view_interface != CORBA_OBJECT_NIL) {
-
- if (message != NULL)
- GNOME_Evolution_ShellView_setMessage (shell_view_interface,
- message[0] ? message: "",
- busy,
- &ev);
- }
-
- CORBA_exception_free (&ev);
-
- /* yeah we only set the first one. Why? Because it seems to leave
- random ones lying around otherwise. Shrug. */
- break;
- }
- gtk_object_unref (GTK_OBJECT(it));
-}
-
-/* For now show every url but possibly limit it to showing only http:
- or ftp: urls */
-static void
-html_on_url (GtkHTML *html,
- const char *url,
- MailDisplay *mail_display)
-{
- static char *previous_url = NULL;
-
- /* This all looks silly but yes, this is the proper way to mix
- GtkHTML's on_url with BonoboUIComponent statusbar */
- if (!url || (previous_url && (strcmp (url, previous_url) != 0)))
- set_status_message ("", FALSE);
- if (url) {
- set_status_message (url, FALSE);
- g_free (previous_url);
- previous_url = g_strdup (url);
- }
-}
-
-GtkWidget *
-mail_display_new (void)
-{
- MailDisplay *mail_display = gtk_type_new (mail_display_get_type ());
- GtkWidget *scroll, *html;
- GdkAtom clipboard_atom;
-
- gtk_box_set_homogeneous (GTK_BOX (mail_display), FALSE);
- gtk_widget_show (GTK_WIDGET (mail_display));
-
- scroll = e_scroll_frame_new (NULL, NULL);
- e_scroll_frame_set_policy (E_SCROLL_FRAME (scroll),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (scroll), GTK_SHADOW_IN);
- gtk_box_pack_start_defaults (GTK_BOX (mail_display), GTK_WIDGET (scroll));
- gtk_widget_show (GTK_WIDGET (scroll));
-
- html = gtk_html_new ();
- html_engine_set_tokenizer (GTK_HTML (html)->engine, e_searching_tokenizer_new ());
-
- gtk_html_set_default_content_type (GTK_HTML (html),
- "text/html; charset=utf-8");
-
- gtk_html_set_editable (GTK_HTML (html), FALSE);
- gtk_signal_connect (GTK_OBJECT (html), "url_requested",
- GTK_SIGNAL_FUNC (on_url_requested),
- mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "object_requested",
- GTK_SIGNAL_FUNC (on_object_requested),
- mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "link_clicked",
- GTK_SIGNAL_FUNC (on_link_clicked),
- mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "button_press_event",
- GTK_SIGNAL_FUNC (html_button_press_event), mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "motion_notify_event",
- GTK_SIGNAL_FUNC (html_motion_notify_event), mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "enter_notify_event",
- GTK_SIGNAL_FUNC (html_enter_notify_event), mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "iframe_created",
- GTK_SIGNAL_FUNC (html_iframe_created), mail_display);
- gtk_signal_connect (GTK_OBJECT (html), "on_url",
- GTK_SIGNAL_FUNC (html_on_url), mail_display);
-
- gtk_container_add (GTK_CONTAINER (scroll), html);
- gtk_widget_show (GTK_WIDGET (html));
-
- gtk_signal_connect (GTK_OBJECT (mail_display->invisible), "selection_get",
- GTK_SIGNAL_FUNC (invisible_selection_get_callback), mail_display);
- gtk_signal_connect (GTK_OBJECT (mail_display->invisible), "selection_clear_event",
- GTK_SIGNAL_FUNC (invisible_selection_clear_event_callback), mail_display);
-
- gtk_selection_add_target (mail_display->invisible,
- GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 1);
-
- clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
- if (clipboard_atom != GDK_NONE)
- gtk_selection_add_target (mail_display->invisible,
- clipboard_atom, GDK_SELECTION_TYPE_STRING, 1);
-
- mail_display->scroll = E_SCROLL_FRAME (scroll);
- mail_display->html = GTK_HTML (html);
- mail_display->stream = NULL;
- mail_display->last_active = NULL;
- mail_display->data = g_new0 (GData *, 1);
- g_datalist_init (mail_display->data);
-
- return GTK_WIDGET (mail_display);
-}
-
-E_MAKE_TYPE (mail_display, "MailDisplay", MailDisplay, mail_display_class_init, mail_display_init, PARENT_TYPE);
diff --git a/mail/mail-display.h b/mail/mail-display.h
deleted file mode 100644
index 5a6b76c257..0000000000
--- a/mail/mail-display.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#ifndef _MAIL_DISPLAY_H_
-#define _MAIL_DISPLAY_H_
-
-#include <gtk/gtkvbox.h>
-#include <gtkhtml/gtkhtml.h>
-
-#include <gal/widgets/e-scroll-frame.h>
-
-#include <camel/camel-stream.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-medium.h>
-
-#include "mail-types.h"
-#include "mail-config.h" /*display_style*/
-
-#define MAIL_DISPLAY_TYPE (mail_display_get_type ())
-#define MAIL_DISPLAY(o) (GTK_CHECK_CAST ((o), MAIL_DISPLAY_TYPE, MailDisplay))
-#define MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_DISPLAY_TYPE, MailDisplayClass))
-#define IS_MAIL_DISPLAY(o) (GTK_CHECK_TYPE ((o), MAIL_DISPLAY_TYPE))
-#define IS_MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_DISPLAY_TYPE))
-
-struct _MailDisplay {
- GtkVBox parent;
-
- EScrollFrame *scroll;
- GtkHTML *html;
- GtkHTMLStream *stream;
- gint redisplay_counter;
- gpointer last_active;
- guint idle_id;
-
- char *selection;
-
- CamelMimeMessage *current_message;
- GData **data;
-
- /* Sigh. This shouldn't be needed. I haven't figured out why it is
- though. */
- GtkWidget *invisible;
-
- MailConfigDisplayStyle display_style;
-};
-
-typedef struct {
- GtkVBoxClass parent_class;
-} MailDisplayClass;
-
-GtkType mail_display_get_type (void);
-GtkWidget * mail_display_new (void);
-
-void mail_display_queue_redisplay (MailDisplay *mail_display);
-void mail_display_redisplay (MailDisplay *mail_display, gboolean unscroll);
-void mail_display_redisplay_when_loaded (MailDisplay *md,
- gconstpointer key,
- void (*callback)(MailDisplay *, gpointer),
- gpointer data);
-void mail_display_stream_write_when_loaded (MailDisplay *md,
- gconstpointer key,
- const gchar *url,
- void (*callback)(MailDisplay *, gpointer),
- GtkHTMLStream *handle,
- gpointer data);
-
-void mail_display_set_message (MailDisplay *mail_display,
- CamelMedium *medium);
-
-void mail_display_load_images (MailDisplay *mail_display);
-
-
-void mail_html_write (GtkHTML *html,
- GtkHTMLStream *stream,
- const char *format, ...);
-void mail_text_write (GtkHTML *html,
- GtkHTMLStream *stream,
- const char *format, ...);
-void mail_error_write (GtkHTML *html,
- GtkHTMLStream *stream,
- const char *format, ...);
-
-#endif /* _MAIL_DISPLAY_H_ */
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
deleted file mode 100644
index 5d5f81e2a9..0000000000
--- a/mail/mail-folder-cache.c
+++ /dev/null
@@ -1,458 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Peter Williams <peterw@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000,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
-
-#ifdef G_LOG_DOMAIN
-#undef G_LOG_DOMAIN
-#endif
-#define G_LOG_DOMAIN "folder tree"
-
-#include <pthread.h>
-
-#include <bonobo/bonobo-exception.h>
-#include <camel/camel-store.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-vtrash-folder.h>
-
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-
-#define d(x)
-
-/* note that many things are effectively serialised by having them run in
- the main loop thread which they need to do because of corba/gtk calls */
-#define LOCK(x) pthread_mutex_lock(&x)
-#define UNLOCK(x) pthread_mutex_unlock(&x)
-
-static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER;
-
-struct _folder_info {
- struct _store_info *store_info; /* 'parent' link */
-
- char *path; /* shell path */
- char *name; /* shell display name? */
- char *full_name; /* full name of folder/folderinfo */
- char *uri; /* uri of folder */
-
- CamelFolder *folder; /* if known */
-};
-
-struct _store_info {
- GHashTable *folders; /* by full_name */
- GHashTable *folders_uri; /* by uri */
-
- CamelStore *store; /* the store for these folders */
-
- /* only 1 should be set */
- EvolutionStorage *storage;
- GNOME_Evolution_Storage corba_storage;
-};
-
-static GHashTable *stores;
-
-/* This is how unread counts work (and don't work):
- *
- * camel_folder_unread_message_count() only gives a correct answer if
- * the store is paying attention to the folder. (Some stores always
- * pay attention to all folders, but IMAP can only pay attention to
- * one folder at a time.) But it doesn't have any way to know when
- * it's lying, so it's only safe to call it when you know for sure
- * that the store is paying attention to the folder, such as when it's
- * just been created, or you get a folder_changed or message_changed
- * signal on it.
- *
- * camel_store_get_folder_info() always gives correct answers for the
- * folders it checks, but it can also return -1 for a folder, meaning
- * it didn't check, and so you should stick with your previous answer.
- *
- * update_1folder is called from three places: with info != NULL when
- * the folder is created (or get_folder_info), with info == NULL when
- * a folder changed event is emitted.
- *
- * So if info is NULL, camel_folder_unread_message_count is correct,
- * and if it's not NULL and its unread_message_count isn't -1, then
- * it's correct. */
-
-static void
-update_1folder(struct _folder_info *mfi, CamelFolderInfo *info)
-{
- struct _store_info *si;
- CamelFolder *folder;
- int unread = -1;
- CORBA_Environment ev;
- extern CamelFolder *outbox_folder;
-
- si = mfi->store_info;
-
- LOCK(info_lock);
- folder = mfi->folder;
- if (folder) {
- if (CAMEL_IS_VTRASH_FOLDER (folder) || folder == outbox_folder) {
- unread = camel_folder_get_message_count(folder);
- } else {
- if (info)
- unread = info->unread_message_count;
- else
- unread = camel_folder_get_unread_message_count (folder);
- }
- } else if (info)
- unread = info->unread_message_count;
- UNLOCK(info_lock);
- if (unread == -1)
- return;
-
- if (si->storage == NULL) {
- d(printf("Updating existing (local) folder: %s (%d unread) folder=%p\n", mfi->path, unread, folder));
- CORBA_exception_init(&ev);
- GNOME_Evolution_Storage_updateFolder(si->corba_storage, mfi->path, mfi->name, unread, &ev);
- CORBA_exception_free(&ev);
- } else {
- d(printf("Updating existing folder: %s (%d unread)\n", mfi->path, unread));
- evolution_storage_update_folder(si->storage, mfi->path, mfi->name, unread);
- }
-}
-
-static void
-setup_folder(CamelFolderInfo *fi, struct _store_info *si)
-{
- struct _folder_info *mfi;
- char *type;
- CamelStore *store;
-
- LOCK(info_lock);
- mfi = g_hash_table_lookup(si->folders, fi->full_name);
- if (mfi) {
- UNLOCK(info_lock);
- update_1folder(mfi, fi);
- } else {
- /* always 'add it', but only 'add it' to non-local stores */
- d(printf("Adding new folder: %s (%s) %d unread\n", fi->path, fi->url, fi->unread_message_count));
- mfi = g_malloc0(sizeof(*mfi));
- mfi->path = g_strdup(fi->path);
- mfi->name = g_strdup(fi->name);
- mfi->full_name = g_strdup(fi->full_name);
- mfi->uri = g_strdup(fi->url);
- mfi->store_info = si;
- g_hash_table_insert(si->folders, mfi->full_name, mfi);
- g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
- store = si->store;
- camel_object_ref((CamelObject *)store);
- UNLOCK(info_lock);
-
- if (si->storage != NULL) {
- int unread = (fi->unread_message_count==-1)?0:fi->unread_message_count;
-
- type = (strncmp(fi->url, "vtrash:", 7)==0)?"vtrash":"mail";
- evolution_storage_new_folder(si->storage, mfi->path, mfi->name, type,
- fi->url, mfi->name, unread);
- }
-
- if (strstr(fi->url, ";noselect") == NULL)
- mail_vfolder_add_uri(store, fi->url);
-
- camel_object_unref((CamelObject *)store);
- }
-}
-
-static void
-real_folder_changed(CamelFolder *folder, void *event_data, void *data)
-{
- struct _folder_info *mfi = data;
-
- update_1folder(mfi, NULL);
-}
-
-static void
-folder_changed(CamelObject *o, gpointer event_data, gpointer user_data)
-{
- struct _folder_info *mfi = user_data;
-
- if (mfi->folder != CAMEL_FOLDER(o))
- return;
-
- d(printf("Fodler changed!\n"));
- mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_changed, o, NULL, mfi));
-}
-
-static void
-folder_finalised(CamelObject *o, gpointer event_data, gpointer user_data)
-{
- struct _folder_info *mfi = user_data;
-
- d(printf("Folder finalised!\n"));
- mfi->folder = NULL;
-}
-
-static void
-real_note_folder(CamelFolder *folder, void *event_data, void *data)
-{
- CamelStore *store = folder->parent_store;
- struct _store_info *si;
- struct _folder_info *mfi;
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- UNLOCK(info_lock);
- if (si == NULL) {
- g_warning("Adding a folder `%s' to a store %p which hasn't been added yet?\n", folder->full_name, store);
- camel_object_unref((CamelObject *)folder);
- return;
- }
-
- LOCK(info_lock);
- mfi = g_hash_table_lookup(si->folders, folder->full_name);
- UNLOCK(info_lock);
-
- if (mfi == NULL) {
- g_warning("Adding a folder `%s' that I dont know about yet?", folder->full_name);
- camel_object_unref((CamelObject *)folder);
- return;
- }
-
- /* dont do anything if we already have this */
- if (mfi->folder == folder)
- return;
-
- mfi->folder = folder;
- update_1folder(mfi, NULL);
-
- camel_object_hook_event((CamelObject *)folder, "folder_changed", folder_changed, mfi);
- camel_object_hook_event((CamelObject *)folder, "message_changed", folder_changed, mfi);
- camel_object_hook_event((CamelObject *)folder, "finalize", folder_finalised, mfi);
-
- camel_object_unref((CamelObject *)folder);
-}
-
-void mail_note_folder(CamelFolder *folder)
-{
- if (stores == NULL) {
- g_warning("Adding a folder `%s' to a store which hasn't been added yet?\n", folder->full_name);
- return;
- }
-
- camel_object_ref((CamelObject *)folder);
- mail_proxy_event((CamelObjectEventHookFunc)real_note_folder, (CamelObject *)folder, NULL, NULL);
-}
-
-static void
-real_folder_created(CamelStore *store, void *event_data, CamelFolderInfo *fi)
-{
- struct _store_info *si;
-
- (printf("real_folder_created: %s (%s)\n", fi->full_name, fi->url));
-
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- UNLOCK(info_lock);
- if (si)
- setup_folder(fi, si);
- else
- /* leaks, so what */
- g_warning("real_folder_created: can't find store: %s\n",
- camel_url_to_string(((CamelService *)store)->url, 0));
-}
-
-static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
-{
- CamelFolderInfo *info = event_data;
-
- d(printf("folder added: %s\n", info->full_name));
- d(printf("uri = '%s'\n", info->url));
-
- /* dont need to copy info since we're waiting for it to complete */
- mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_created, o, NULL, info));
-}
-
-static void
-real_folder_deleted(CamelStore *store, void *event_data, CamelFolderInfo *fi)
-{
- (printf("real_folder_deleted: %s (%s)\n", fi->full_name, fi->url));
-
- if (strstr(fi->url, ";noselect") == NULL)
- mail_vfolder_remove_uri(store, fi->url);
-}
-
-static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
-{
- CamelStore *store = (CamelStore *)o;
- CamelFolderInfo *info = event_data;
-
- store = store;
- info = info;
-
- /* should really remove it? */
- d(printf("folder deleted: %s\n", info->full_name));
-
- mail_msg_wait(mail_proxy_event((CamelObjectEventHookFunc)real_folder_deleted, o, NULL, info));
-}
-
-static void
-free_folder_info(char *path, struct _folder_info *info, void *data)
-{
- g_free(info->path);
- g_free(info->name);
- g_free(info->full_name);
- g_free(info->uri);
-}
-
-static void
-store_finalised(CamelObject *o, void *event_data, void *data)
-{
- CamelStore *store = (CamelStore *)o;
- struct _store_info *si;
-
- d(printf("store finalised!!\n"));
- LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si) {
- g_hash_table_remove(stores, store);
- g_hash_table_foreach(si->folders, (GHFunc)free_folder_info, NULL);
- g_hash_table_destroy(si->folders);
- g_free(si);
- }
- UNLOCK(info_lock);
-}
-
-static void
-create_folders(CamelFolderInfo *fi, struct _store_info *si)
-{
- printf("Setup new folder: %s\n", fi->url);
-
- setup_folder(fi, si);
-
- if (fi->child)
- create_folders(fi->child, si);
- if (fi->sibling)
- create_folders(fi->sibling, si);
-}
-
-struct _update_data {
- struct _store_info *si;
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
-};
-
-static void
-update_folders(CamelStore *store, CamelFolderInfo *info, void *data)
-{
- struct _update_data *ud = data;
-
- if (info) {
- if (ud->si->storage)
- gtk_object_set_data (GTK_OBJECT (ud->si->storage), "connected", GINT_TO_POINTER (TRUE));
- create_folders(info, ud->si);
- }
- if (ud->done)
- ud->done(store, info, ud->data);
- g_free(ud);
-}
-
-void
-mail_note_store(CamelStore *store, EvolutionStorage *storage, GNOME_Evolution_Storage corba_storage,
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
-{
- struct _store_info *si;
- struct _update_data *ud;
-
- g_assert(CAMEL_IS_STORE(store));
- g_assert(pthread_self() == mail_gui_thread);
- g_assert(storage != NULL || corba_storage != CORBA_OBJECT_NIL);
-
- LOCK(info_lock);
-
- if (stores == NULL)
- stores = g_hash_table_new(NULL, NULL);
-
- si = g_hash_table_lookup(stores, store);
- if (si == NULL) {
-
- d(printf("Noting a new store: %p: %s\n", store, camel_url_to_string(((CamelService *)store)->url, 0)));
-
- /* FIXME: Need to ref the storages & store or something?? */
-
- si = g_malloc0(sizeof(*si));
- si->folders = g_hash_table_new(g_str_hash, g_str_equal);
- si->folders_uri = g_hash_table_new(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->hash_folder_name,
- CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name);
- si->storage = storage;
- si->corba_storage = corba_storage;
- si->store = store;
- g_hash_table_insert(stores, store, si);
-
- camel_object_hook_event((CamelObject *)store, "folder_created", store_folder_created, NULL);
- camel_object_hook_event((CamelObject *)store, "folder_deleted", store_folder_deleted, NULL);
- camel_object_hook_event((CamelObject *)store, "finalize", store_finalised, NULL);
- }
-
- UNLOCK(info_lock);
-
- ud = g_malloc(sizeof(*ud));
- ud->si = si;
- ud->done = done;
- ud->data = data;
-
- mail_get_folderinfo(store, update_folders, ud);
-}
-
-struct _find_info {
- const char *uri;
- struct _folder_info *fi;
-};
-
-/* look up on each storeinfo using proper hash function for that stores uri's */
-static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si, struct _find_info *fi)
-{
- if (fi->fi == NULL)
- fi->fi = g_hash_table_lookup(si->folders_uri, fi->uri);
-}
-
-/* returns TRUE if the uri is available, folderp is set to a
- reffed folder if the folder has also already been opened */
-int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp)
-{
- struct _find_info fi = { uri, NULL };
-
- if (stores == NULL)
- return FALSE;
-
- LOCK(info_lock);
- g_hash_table_foreach(stores, (GHFunc)storeinfo_find_folder_info, &fi);
- if (folderp) {
- if (fi.fi && fi.fi->folder) {
- *folderp = fi.fi->folder;
- camel_object_ref((CamelObject *)*folderp);
- } else {
- *folderp = NULL;
- }
- }
- UNLOCK(info_lock);
-
- return fi.fi != NULL;
-}
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
deleted file mode 100644
index 92cbfa6739..0000000000
--- a/mail/mail-folder-cache.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-folder-cache.h: Stores information about open folders */
-
-/*
- * Authors: Peter Williams <peterw@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000,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 _MAIL_FOLDER_CACHE_H
-#define _MAIL_FOLDER_CACHE_H
-
-#include <shell/evolution-storage.h>
-
-/* Add a store whose folders should appear in the shell
- The folders are scanned from the store, and/or added at
- runtime via the folder_created event */
-void
-mail_note_store(CamelStore *store, EvolutionStorage *storage, GNOME_Evolution_Storage corba_storage,
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data);
-
-/* When a folder has been opened, notify it for watching.
- The folder must have already been created on the store (which has already been noted)
- before the folder can be opened
- */
-void mail_note_folder(struct _CamelFolder *folder);
-
-/* Returns true if a folder is available (yet), and also sets *folderp (if supplied)
- to a (referenced) copy of the folder if it has already been opened */
-int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp);
-
-#endif
diff --git a/mail/mail-format.c b/mail/mail-format.c
deleted file mode 100644
index a82f249267..0000000000
--- a/mail/mail-format.c
+++ /dev/null
@@ -1,2401 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2000, 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h> /* for isprint */
-#include <string.h> /* for strstr */
-#include <fcntl.h>
-
-#include <liboaf/liboaf.h>
-#include <libgnome/libgnome.h>
-#include <libgnomevfs/gnome-vfs-mime-info.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-pgp-mime.h>
-#include <camel/camel-stream-null.h>
-#include <shell/e-setup.h>
-#include <e-util/e-html-utils.h>
-
-#include "mail.h"
-#include "mail-tools.h"
-#include "mail-display.h"
-#include "mail-mt.h"
-#include "mail-crypto.h"
-
-static char *get_data_wrapper_text (CamelDataWrapper *data);
-
-static char *try_inline_pgp (char *start, CamelMimePart *part, MailDisplay *md);
-static char *try_inline_pgp_sig (char *start, CamelMimePart *part, MailDisplay *md);
-static char *try_uudecoding (char *start, CamelMimePart *part, MailDisplay *md);
-static char *try_inline_binhex (char *start, CamelMimePart *part, MailDisplay *md);
-
-static void decode_pgp (CamelStream *ciphertext, CamelStream *plaintext, MailDisplay *md);
-
-static gboolean handle_text_plain (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_text_plain_flowed (char *text,
- MailDisplay *md);
-static gboolean handle_text_enriched (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_text_html (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_image (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_multipart_mixed (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_multipart_related (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_multipart_alternative (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_multipart_appledouble (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_multipart_encrypted (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_multipart_signed (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_message_rfc822 (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-static gboolean handle_message_external_body (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-
-#ifdef APPLICATION_PGP_IS_NO_LONGER_SUPPORTED
-static gboolean handle_application_pgp (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-#endif /* APPLICATION_PGP_IS_NO_LONGER_SUPPORTED */
-
-static gboolean handle_via_bonobo (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-
-/* writes the header info for a mime message into an html stream */
-static void write_headers (CamelMimeMessage *message, MailDisplay *md);
-
-/* dispatch html printing via mimetype */
-static gboolean format_mime_part (CamelMimePart *part, MailDisplay *md);
-
-static void
-free_url (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- if (data)
- g_byte_array_free (value, TRUE);
-}
-
-static void
-free_part_urls (gpointer urls)
-{
- g_hash_table_foreach (urls, free_url, NULL);
- g_hash_table_destroy (urls);
-}
-
-static void
-free_data_urls (gpointer urls)
-{
- g_hash_table_foreach (urls, free_url, GINT_TO_POINTER (1));
- g_hash_table_destroy (urls);
-}
-
-static char *
-add_url (const char *kind, char *url, gpointer data, MailDisplay *md)
-{
- GHashTable *urls;
- gpointer old_key, old_value;
-
- urls = g_datalist_get_data (md->data, kind);
- g_return_val_if_fail (urls != NULL, NULL);
- if (g_hash_table_lookup_extended (urls, url, &old_key, &old_value)) {
- g_free (url);
- url = old_key;
- }
- g_hash_table_insert (urls, url, data);
- return url;
-}
-
-/**
- * mail_format_mime_message:
- * @mime_message: the input mime message
- * @md: the MailDisplay to render into
- *
- * Writes a CamelMimeMessage out into a MailDisplay
- **/
-void
-mail_format_mime_message (CamelMimeMessage *mime_message, MailDisplay *md)
-{
- GHashTable *urls;
-
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (mime_message));
-
- urls = g_datalist_get_data (md->data, "part_urls");
- if (!urls) {
- urls = g_hash_table_new (g_str_hash, g_str_equal);
- g_datalist_set_data_full (md->data, "part_urls", urls,
- free_part_urls);
- }
- urls = g_datalist_get_data (md->data, "data_urls");
- if (!urls) {
- urls = g_hash_table_new (g_str_hash, g_str_equal);
- g_datalist_set_data_full (md->data, "data_urls", urls,
- free_data_urls);
- }
-
- /* ok, so they're not urls. so sue me. */
- urls = g_datalist_get_data (md->data, "attachment_states");
- if (!urls) {
- urls = g_hash_table_new (g_direct_hash, g_direct_equal);
- g_datalist_set_data_full (md->data, "attachment_states", urls,
- (GDestroyNotify) g_hash_table_destroy);
- }
-
- write_headers (mime_message, md);
- format_mime_part (CAMEL_MIME_PART (mime_message), md);
-}
-
-
-/**
- * mail_format_raw_message:
- * @mime_message: the input mime message
- * @md: the MailDisplay to render into
- *
- * Writes a CamelMimeMessage source out into a MailDisplay
- **/
-void
-mail_format_raw_message (CamelMimeMessage *mime_message, MailDisplay *md)
-{
- char *text, *html;
-
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (mime_message));
-
- if (!mail_content_loaded (CAMEL_DATA_WRAPPER (mime_message), md,
- TRUE, NULL, NULL))
- return;
-
- mail_html_write (md->html, md->stream, "<table cellspacing=0 cellpadding=10 width=\"100%%\"><tr><td><tt>\n");
-
- text = get_data_wrapper_text (CAMEL_DATA_WRAPPER (mime_message));
- html = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_SPACES | E_TEXT_TO_HTML_ESCAPE_8BIT);
- g_free (text);
- gtk_html_write (md->html, md->stream, html, strlen (html));
- g_free (html);
-
- mail_html_write (md->html, md->stream, "</tt></td></tr></table>");
-}
-
-static const char *
-get_cid (CamelMimePart *part, MailDisplay *md)
-{
- char *cid;
- static int fake_cid_counter = 0;
-
- /* If we have a real Content-ID, use it. If we don't,
- * make a (syntactically invalid, unique) fake one.
- */
- if (camel_mime_part_get_content_id (part)) {
- cid = g_strdup_printf ("cid:%s",
- camel_mime_part_get_content_id (part));
- } else
- cid = g_strdup_printf ("cid:@@@%d", fake_cid_counter++);
-
- return add_url ("part_urls", cid, part, md);
-}
-
-static const char *
-get_location (CamelMimePart *part, MailDisplay *md)
-{
- const char *loc;
-
- /* FIXME: relative URLs */
- loc = camel_mime_part_get_content_location (part);
- if (!loc)
- return NULL;
-
- return add_url ("part_urls", g_strdup (loc), part, md);
-}
-
-static const char *
-get_url_for_icon (const char *icon_name, MailDisplay *md)
-{
- char *icon_path, buf[1024], *url;
- int fd, nread;
- GByteArray *ba;
-
- /* FIXME: cache */
-
- if (*icon_name == '/')
- icon_path = g_strdup (icon_name);
- else {
- icon_path = gnome_pixmap_file (icon_name);
- if (!icon_path)
- return "file:///dev/null";
- }
-
- fd = open (icon_path, O_RDONLY);
- g_free (icon_path);
- if (fd == -1)
- return "file:///dev/null";
-
- ba = g_byte_array_new ();
- while (1) {
- nread = read (fd, buf, sizeof (buf));
- if (nread < 1)
- break;
- g_byte_array_append (ba, buf, nread);
- }
- close (fd);
-
- url = g_strdup_printf ("x-evolution-data:%p", ba);
- return add_url ("data_urls", url, ba, md);
-}
-
-
-static GHashTable *mime_handler_table, *mime_function_table;
-
-static void
-setup_mime_tables (void)
-{
- mime_handler_table = g_hash_table_new (g_str_hash, g_str_equal);
- mime_function_table = g_hash_table_new (g_str_hash, g_str_equal);
-
- g_hash_table_insert (mime_function_table, "text/plain",
- handle_text_plain);
- g_hash_table_insert (mime_function_table, "text/richtext",
- handle_text_enriched);
- g_hash_table_insert (mime_function_table, "text/enriched",
- handle_text_enriched);
- g_hash_table_insert (mime_function_table, "text/html",
- handle_text_html);
-
- g_hash_table_insert (mime_function_table, "image/gif",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/jpeg",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/png",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-png",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/tiff",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-bmp",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/bmp",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-cmu-raster",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-ico",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-portable-anymap",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-portable-bitmap",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-portable-graymap",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-portable-pixmap",
- handle_image);
- g_hash_table_insert (mime_function_table, "image/x-xpixmap",
- handle_image);
-
- g_hash_table_insert (mime_function_table, "message/rfc822",
- handle_message_rfc822);
- g_hash_table_insert (mime_function_table, "message/news",
- handle_message_rfc822);
- g_hash_table_insert (mime_function_table, "message/external-body",
- handle_message_external_body);
-
- g_hash_table_insert (mime_function_table, "multipart/alternative",
- handle_multipart_alternative);
- g_hash_table_insert (mime_function_table, "multipart/related",
- handle_multipart_related);
- g_hash_table_insert (mime_function_table, "multipart/mixed",
- handle_multipart_mixed);
- g_hash_table_insert (mime_function_table, "multipart/appledouble",
- handle_multipart_appledouble);
- g_hash_table_insert (mime_function_table, "multipart/encrypted",
- handle_multipart_encrypted);
- g_hash_table_insert (mime_function_table, "multipart/signed",
- handle_multipart_signed);
-
-#ifdef APPLICATION_PGP_IS_NO_LONGER_SUPPORTED
- /* Some broken mailers, such as The Bat! send pgp
- * signed/encrypted messages with a content-type of
- * application/pgp which basically means it's a text/plain but
- * either signed or encrypted. */
- g_hash_table_insert (mime_function_table, "application/pgp",
- handle_application_pgp);
-#endif /* APPLICATION_PGP_IS_NO_LONGER_SUPPORTED */
-
- /* RFC 2046 says unrecognized text subtypes can be treated
- * as text/plain (as long as you recognize the character set),
- * and unrecognized multipart subtypes as multipart/mixed. */
- g_hash_table_insert (mime_function_table, "text/*",
- handle_text_plain);
- g_hash_table_insert (mime_function_table, "multipart/*",
- handle_multipart_mixed);
-}
-
-static gboolean
-component_supports (OAF_ServerInfo *component, const char *mime_type)
-{
- OAF_Property *prop;
- CORBA_sequence_CORBA_string stringv;
- int i;
-
- prop = oaf_server_info_prop_find (component,
- "bonobo:supported_mime_types");
- if (!prop || prop->v._d != OAF_P_STRINGV)
- return FALSE;
-
- stringv = prop->v._u.value_stringv;
- for (i = 0; i < stringv._length; i++) {
- if (!g_strcasecmp (mime_type, stringv._buffer[i]))
- return TRUE;
- }
- return FALSE;
-}
-
-/**
- * mail_lookup_handler:
- * @mime_type: a MIME type
- *
- * Looks up the MIME type in its own tables and GNOME-VFS's and returns
- * a MailMimeHandler structure detailing the component, application,
- * and built-in handlers (if any) for that MIME type. (If the component
- * is non-%NULL, the built-in handler will always be handle_via_bonobo().)
- * The MailMimeHandler's @generic field is set if the match was for the
- * MIME supertype rather than the exact type.
- *
- * Return value: a MailMimeHandler (which should not be freed), or %NULL
- * if no handlers are available.
- **/
-MailMimeHandler *
-mail_lookup_handler (const char *mime_type)
-{
- MailMimeHandler *handler;
- char *mime_type_main;
-
- if (mime_handler_table == NULL)
- setup_mime_tables ();
-
- /* See if we've already found it. */
- handler = g_hash_table_lookup (mime_handler_table, mime_type);
- if (handler)
- return handler;
-
- /* No. Create a new one and look up application and full type
- * handler. If we find a builtin, create the handler and
- * register it.
- */
- handler = g_new0 (MailMimeHandler, 1);
- handler->applications =
- gnome_vfs_mime_get_short_list_applications (mime_type);
- handler->builtin =
- g_hash_table_lookup (mime_function_table, mime_type);
-
- if (handler->builtin) {
- handler->generic = FALSE;
- goto reg;
- }
-
- /* Try for a exact component match. */
- handler->component = gnome_vfs_mime_get_default_component (mime_type);
- if (handler->component &&
- component_supports (handler->component, mime_type)) {
- handler->generic = FALSE;
- handler->builtin = handle_via_bonobo;
- goto reg;
- }
-
- /* Try for a generic builtin match. */
- mime_type_main = g_strdup_printf ("%.*s/*",
- (int)strcspn (mime_type, "/"),
- mime_type);
- handler->builtin = g_hash_table_lookup (mime_function_table,
- mime_type_main);
- g_free (mime_type_main);
-
- if (handler->builtin) {
- handler->generic = TRUE;
- if (handler->component) {
- CORBA_free (handler->component);
- handler->component = NULL;
- }
- goto reg;
- }
-
- /* Try for a generic component match. */
- if (handler->component) {
- handler->generic = TRUE;
- handler->builtin = handle_via_bonobo;
- goto reg;
- }
-
- /* If we at least got an application, use that. */
- if (handler->applications) {
- handler->generic = TRUE;
- goto reg;
- }
-
- /* Nada. */
- g_free (handler);
- return NULL;
-
- reg:
- g_hash_table_insert (mime_handler_table, g_strdup (mime_type),
- handler);
- return handler;
-}
-
-/* An "anonymous" MIME part is one that we shouldn't call attention
- * to the existence of, but simply display.
- */
-static gboolean
-is_anonymous (CamelMimePart *part, const char *mime_type)
-{
- if (!g_strncasecmp (mime_type, "multipart/", 10) ||
- !g_strncasecmp (mime_type, "message/", 8))
- return TRUE;
-
- if (!g_strncasecmp (mime_type, "text/", 5) &&
- !camel_mime_part_get_filename (part))
- return TRUE;
-
- return FALSE;
-}
-
-/**
- * mail_part_is_inline:
- * @part: a CamelMimePart
- *
- * Return value: whether or not the part should/will be displayed inline.
- **/
-gboolean
-mail_part_is_inline (CamelMimePart *part)
-{
- const char *disposition;
- CamelContentType *content_type;
- char *type;
- gboolean anon;
-
- /* If it has an explicit disposition, return that. */
- disposition = camel_mime_part_get_disposition (part);
- if (disposition)
- return g_strcasecmp (disposition, "inline") == 0;
-
- /* Certain types should default to inline. FIXME: this should
- * be customizable.
- */
- content_type = camel_mime_part_get_content_type (part);
- if (!header_content_type_is (content_type, "message", "*"))
- return TRUE;
-
-#ifdef APPLICATION_PGP_IS_NO_LONGER_SUPPORTED
- /* The Bat! and possibly a few other broken mailers send application/pgp
- * parts instead of following rfc2015 because they SUCK!!! Since this part
- * is really a text/plain part, we should show it inline.
- */
- if (!header_content_type_is (content_type, "application", "pgp"))
- return TRUE;
-#endif /* APPLICATION_PGP_IS_NO_LONGER_SUPPORTED */
-
- /* Otherwise, display it inline if it's "anonymous", and
- * as an attachment otherwise.
- */
- type = header_content_type_simple (content_type);
- anon = is_anonymous (part, type);
- g_free (type);
-
- return anon;
-}
-
-enum inline_states {
- I_VALID = (1 << 0),
- I_ACTUALLY = (1 << 1),
- I_DISPLAYED = (1 << 2)
-};
-
-static gint
-get_inline_flags (CamelMimePart *part, MailDisplay *md)
-{
- GHashTable *asht;
- gint val;
-
- /* check if we already know. */
-
- asht = g_datalist_get_data (md->data, "attachment_states");
- val = GPOINTER_TO_INT (g_hash_table_lookup (asht, part));
- if (val)
- return val;
-
- /* ok, we don't know. Figure it out. */
-
- if (mail_part_is_inline (part))
- val = (I_VALID | I_ACTUALLY | I_DISPLAYED);
- else
- val = (I_VALID);
-
- g_hash_table_insert (asht, part, GINT_TO_POINTER (val));
-
- return val;
-}
-
-gboolean
-mail_part_is_displayed_inline (CamelMimePart *part, MailDisplay *md)
-{
- return (gboolean) (get_inline_flags (part, md) & I_DISPLAYED);
-}
-
-void
-mail_part_toggle_displayed (CamelMimePart *part, MailDisplay *md)
-{
- GHashTable *asht = g_datalist_get_data (md->data, "attachment_states");
- gpointer ostate, opart;
- gint state;
-
- if (g_hash_table_lookup_extended (asht, part, &opart, &ostate)) {
- g_hash_table_remove (asht, part);
-
- state = GPOINTER_TO_INT (ostate);
-
- if (state & I_DISPLAYED)
- state &= ~I_DISPLAYED;
- else
- state |= I_DISPLAYED;
- } else {
- state = I_VALID | I_DISPLAYED;
- }
-
- g_hash_table_insert (asht, part, GINT_TO_POINTER (state));
-}
-
-
-static void
-attachment_header (CamelMimePart *part, const char *mime_type, MailDisplay *md)
-{
- const char *info;
- char *htmlinfo;
- char *fmt;
-
- /* Start the table, create the pop-up object. */
- mail_html_write (md->html, md->stream,
- "<table cellspacing=0 cellpadding=0>"
- "<tr><td><table width=10 cellspacing=0 cellpadding=0><tr><td></td></tr></table></td>"
- "<td><object classid=\"popup:%s\" type=\"%s\"></object></td>"
- "<td><table width=3 cellspacing=0 cellpadding=0><tr><td></td></tr></table></td>"
- "<td><font size=-1>",
- get_cid (part, md), mime_type);
-
- /* Write the MIME type */
- info = gnome_vfs_mime_get_value (mime_type, "description");
- htmlinfo = e_text_to_html (info ? info : mime_type, 0);
- fmt = e_utf8_from_locale_string (_("%s attachment"));
- mail_html_write (md->html, md->stream, fmt, htmlinfo);
- g_free (fmt);
- g_free (htmlinfo);
-
- /* Write the name, if we have it. */
- info = camel_mime_part_get_filename (part);
- if (info) {
- htmlinfo = e_text_to_html (info, 0);
- mail_html_write (md->html, md->stream, " (%s)", htmlinfo);
- g_free (htmlinfo);
- }
-
- /* Write a description, if we have one. */
- info = camel_mime_part_get_description (part);
- if (info) {
- htmlinfo = e_text_to_html (info, E_TEXT_TO_HTML_CONVERT_URLS);
- mail_html_write (md->html, md->stream, ", \"%s\"", htmlinfo);
- g_free (htmlinfo);
- }
-
-#if 0
- /* Describe the click action, if any. */
- if (action) {
- mail_html_write (md->html, md->stream,
- "<br>Click on the icon to %s.", action);
- }
-#endif
-
- mail_html_write (md->html, md->stream,
- "</font></td></tr><tr><td height=10><table height=10 cellspacing=0 cellpadding=0>"
- "<tr><td></td></tr></table></td></tr></table>\n");
-}
-
-static gboolean
-format_mime_part (CamelMimePart *part, MailDisplay *md)
-{
- CamelDataWrapper *wrapper;
- char *mime_type;
- MailMimeHandler *handler;
- gboolean output;
- int inline_flags;
-
- /* Record URLs associated with this part */
- get_cid (part, md);
- get_location (part, md);
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- if (CAMEL_IS_MULTIPART (wrapper) &&
- camel_multipart_get_number (CAMEL_MULTIPART (wrapper)) == 0) {
- char *mesg;
-
- mesg = e_utf8_from_locale_string (_("Could not parse MIME message. Displaying as source."));
- mail_error_write (md->html, md->stream, "%s", mesg);
- g_free (mesg);
- if (mail_content_loaded (wrapper, md, TRUE, NULL, NULL))
- handle_text_plain (part, "text/plain", md);
- return TRUE;
- }
-
- mime_type = camel_data_wrapper_get_mime_type (wrapper);
- g_strdown (mime_type);
-
- handler = mail_lookup_handler (mime_type);
- if (!handler) {
- char *id_type;
-
- /* Special case MIME types that we know that we can't
- * display but are some kind of plain text to prevent
- * evil infinite recursion.
- */
-
- if (!strcmp (mime_type, "application/mac-binhex40")) {
- handler = NULL;
- } else {
- id_type = mail_identify_mime_part (part, md);
- if (id_type) {
- g_free (mime_type);
- mime_type = id_type;
- handler = mail_lookup_handler (id_type);
- }
- }
- }
-
- inline_flags = get_inline_flags (part, md);
-
- /* No header for anonymous inline parts. */
- if (!((inline_flags & I_ACTUALLY) && is_anonymous (part, mime_type)))
- attachment_header (part, mime_type, md);
-
- if (handler && handler->builtin && inline_flags & I_DISPLAYED &&
- mail_content_loaded (wrapper, md, TRUE, NULL, NULL))
- output = (*handler->builtin) (part, mime_type, md);
- else
- output = TRUE;
-
- g_free (mime_type);
- return output;
-}
-
-/* flags for write_field_to_stream */
-enum {
- WRITE_BOLD=1,
- WRITE_NOCOLUMNS=2,
-};
-
-static void
-write_field_row_begin (const char *name, gint flags, GtkHTML *html, GtkHTMLStream *stream)
-{
- char *encoded_name;
- gboolean bold = (flags & WRITE_BOLD);
- gboolean nocolumns = (flags & WRITE_NOCOLUMNS);
-
- encoded_name = e_utf8_from_gtk_string (GTK_WIDGET (html), name);
-
- if (nocolumns) {
- mail_html_write (html, stream, "<tr><td>%s%s:%s ",
- bold ? "<b>" : "", encoded_name,
- bold ? "</b>" : "");
- } else {
- mail_html_write (html, stream,
- "<tr><%s align=\"right\" valign=\"top\">%s:"
- "<b>&nbsp;</%s><td>",
- bold ? "th" : "td", encoded_name, bold ? "th" : "td");
- }
-
- g_free (encoded_name);
-}
-
-static void
-write_date (CamelMimeMessage *message, int flags, GtkHTML *html, GtkHTMLStream *stream)
-{
- char *datestr;
- time_t date;
- int offset;
-
- write_field_row_begin (_("Date"), flags, html, stream);
-
- date = camel_mime_message_get_date (message, &offset);
- datestr = header_format_date (date, offset);
-
- mail_html_write (html, stream, "%s</td> </tr>", datestr);
-
- g_free (datestr);
-}
-
-static void
-write_text_header (const char *name, const char *value, int flags, GtkHTML *html, GtkHTMLStream *stream)
-{
- char *encoded;
-
- if (value && *value)
- encoded = e_text_to_html (value, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
- else
- encoded = "";
-
- write_field_row_begin (name, flags, html, stream);
-
- mail_html_write (html, stream, "%s</td> </tr>", encoded);
-
- if (value && *value)
- g_free (encoded);
-}
-
-static gchar *
-elide_quotes (const gchar *str)
-{
- gchar *cpy = g_strdup (str);
- gchar *c = cpy;
-
- if (c) {
- while (*c) {
- if (*c != '"')
- ++c;
- }
- }
- return cpy;
-}
-
-static void
-write_address (MailDisplay *md, const CamelInternetAddress *addr, const char *field_name, int flags)
-{
- const char *name, *email;
- gint i;
-
- if (addr == NULL || !camel_internet_address_get (addr, 0, NULL, NULL))
- return;
-
- write_field_row_begin (field_name, flags, md->html, md->stream);
-
- i = 0;
- while (camel_internet_address_get (addr, i, &name, &email)) {
- CamelInternetAddress *subaddr;
- gchar *addr_txt, *addr_url;
- gboolean have_name = name && *name;
- gboolean have_email = email && *email;
- gchar *name_arg = NULL;
- gchar *email_arg = NULL;
- gchar *name_disp = NULL;
- gchar *email_disp = NULL;
-
- subaddr = camel_internet_address_new ();
- camel_internet_address_add (subaddr, name, email);
- addr_txt = camel_address_format (CAMEL_ADDRESS (subaddr));
- addr_url = camel_url_encode (addr_txt, TRUE, NULL);
- camel_object_unref (CAMEL_OBJECT (subaddr));
-
- if (have_name) {
- name_disp = e_text_to_html (name, 0);
- }
-
- if (have_email) {
- email_arg = elide_quotes (email); /* should never be an issue */
- email_disp = e_text_to_html (email, 0);
- }
-
- if (i)
- mail_html_write (md->html, md->stream, ", ");
-
- if (have_email || have_name) {
- if (!have_email) {
- email_arg = g_strdup ("???");
- email_disp = g_strdup ("???");
- }
-
- mail_html_write (md->html, md->stream,
- "%s &lt;<a href=\"mailto:%s\">%s</a>&gt;",
- have_name ? name_disp : "",
- addr_url,
- email_disp);
-
- } else {
- char *str;
-
- str = e_utf8_from_locale_string (_("Bad Address"));
- mail_html_write (md->html, md->stream, "<i>%s</i>", str);
- g_free (str);
- }
-
- g_free (name_arg);
- g_free (email_arg);
- g_free (name_disp);
- g_free (email_disp);
- g_free (addr_txt);
- g_free (addr_url);
-
- i++;
- }
- mail_html_write (md->html, md->stream, "</td></tr>");
-}
-
-/* order of these must match write_header code */
-static char *default_headers[] = {
- "From", "Reply-To", "To", "Cc", "Subject", "Date",
-};
-
-/* return index of header in default_headers array */
-static int
-default_header_index(const char *name)
-{
- int i;
-
- for (i=0;i<sizeof(default_headers)/sizeof(default_headers[0]);i++)
- if (!g_strcasecmp(name, default_headers[i]))
- return i;
-
- return -1;
-}
-
-/* index is index of header in default_headers array */
-static void
-write_default_header(CamelMimeMessage *message, MailDisplay *md, int index, int flags)
-{
- switch(index) {
- case 0:
- write_address (md, camel_mime_message_get_from (message), _("From"), flags | WRITE_BOLD);
- break;
- case 1:
- write_address (md, camel_mime_message_get_reply_to (message), _("Reply-To"), flags);
- break;
- case 2:
- write_address(md, camel_mime_message_get_recipients(message, CAMEL_RECIPIENT_TYPE_TO),
- _("To"), flags | WRITE_BOLD);
- break;
- case 3:
- write_address (md, camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC),
- _("Cc"), flags | WRITE_BOLD);
- break;
- case 4:
- write_text_header (_("Subject"), camel_mime_message_get_subject (message),
- flags | WRITE_BOLD, md->html, md->stream);
- break;
- case 5:
- write_date (message, flags | WRITE_BOLD, md->html, md->stream);
- break;
- default:
- g_assert_not_reached();
- }
-}
-
-#define COLOR_IS_LIGHT(r, g, b) ((r + g + b) > (128 * 3))
-
-static void
-write_headers (CamelMimeMessage *message, MailDisplay *md)
-{
- gboolean full = (md->display_style == MAIL_CONFIG_DISPLAY_FULL_HEADERS);
- char bgcolor[7], fontcolor[7];
- GtkStyle *style = NULL;
- int i;
-
- /* My favorite thing to do...much around with colors so we respect people's stupid themes */
- style = gtk_widget_get_style (GTK_WIDGET (md->html));
- if (style) {
- int state = GTK_WIDGET_STATE (GTK_WIDGET (md->html));
- gushort r, g, b;
-
- r = style->base[state].red / 256;
- g = style->base[state].green / 256;
- b = style->base[state].blue / 256;
-
- if (COLOR_IS_LIGHT (r, g, b)) {
- r *= 0.92;
- g *= 0.92;
- b *= 0.92;
- } else {
- r = 255 - (0.92 * (255 - r));
- g = 255 - (0.92 * (255 - g));
- b = 255 - (0.92 * (255 - b));
- }
-
- sprintf (bgcolor, "%.2X%.2X%.2X", r, g, b);
-
- r = style->text[state].red;
- g = style->text[state].green / 256;
- b = style->text[state].blue / 256;
-
- sprintf (fontcolor, "%.2X%.2X%.2X", r, g, b);
- } else {
- strcpy (bgcolor, "EEEEEE");
- strcpy (fontcolor, "000000");
- }
-
- mail_html_write (md->html, md->stream,
- "<table width=\"100%%\" cellpadding=0 cellspacing=0>"
- "<tr><td colspan=3 height=10><table height=10 cellpadding=0 cellspacing=0>"
- "<tr><td></td></tr></table></td></tr>"
- "<tr><td><table width=10 cellpadding=0 cellspacing=0><tr><td></td></tr></table></td>"
- "<td width=\"100%%\"><font color=\"#%s\">"
- "<table bgcolor=\"#000000\" width=\"100%%\" "
- "cellspacing=0 cellpadding=1><tr><td>"
- "<table bgcolor=\"#%s\" width=\"100%%\" cellpadding=0 cellspacing=0>"
- "<tr><td><table>\n", fontcolor, bgcolor);
-
- if (full) {
- struct _header_raw *header;
- const char *charset;
- CamelContentType *ct;
- char *value;
-
- ct = camel_mime_part_get_content_type(CAMEL_MIME_PART(message));
- charset = header_content_type_param(ct, "charset");
- charset = camel_charset_to_iconv(charset);
-
- header = CAMEL_MIME_PART(message)->headers;
- while (header) {
- i = default_header_index(header->name);
- if (i == -1) {
- value = header_decode_string(header->value, charset);
- write_text_header(header->name, value, WRITE_NOCOLUMNS, md->html, md->stream);
- g_free(value);
- } else
- write_default_header(message, md, i, WRITE_NOCOLUMNS);
- header = header->next;
- }
- } else {
- for (i=0;i<sizeof(default_headers)/sizeof(default_headers[0]);i++)
- write_default_header(message, md, i, 0);
- }
-
- mail_html_write (md->html, md->stream,
- "</table></td></tr></table></td></tr></table></font></td>"
- "<td><table width=10 cellpadding=0 cellspacing=0><tr><td></td></tr></table></td></tr>"
- "</table>\n");
-}
-
-static void
-load_offline_content (MailDisplay *md, gpointer data)
-{
- CamelDataWrapper *wrapper = data;
- CamelStream *stream;
-
- stream = camel_stream_null_new ();
- camel_data_wrapper_write_to_stream (wrapper, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (wrapper));
-}
-
-gboolean
-mail_content_loaded (CamelDataWrapper *wrapper, MailDisplay *md, gboolean redisplay, const gchar *url, GtkHTMLStream *handle)
-{
- if (!camel_data_wrapper_is_offline (wrapper))
- return TRUE;
-
- camel_object_ref (CAMEL_OBJECT (wrapper));
- if (redisplay)
- mail_display_redisplay_when_loaded (md, wrapper, load_offline_content, wrapper);
- else
- mail_display_stream_write_when_loaded (md, wrapper, url, load_offline_content, handle, wrapper);
-
- return FALSE;
-}
-
-/* Return the contents of a data wrapper, or %NULL if it contains only
- * whitespace.
- */
-static char *
-get_data_wrapper_text (CamelDataWrapper *wrapper)
-{
- CamelStream *memstream;
- CamelStreamFilter *filtered_stream;
- GByteArray *ba;
- char *text, *end;
-
- memstream = camel_stream_mem_new ();
- ba = g_byte_array_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (memstream), ba);
-
- filtered_stream = camel_stream_filter_new_with_stream (memstream);
- camel_object_unref (CAMEL_OBJECT (memstream));
-
- if (wrapper->rawtext) {
- CamelMimeFilterCharset *filter;
- const char *charset;
-
- charset = mail_config_get_default_charset ();
- filter = camel_mime_filter_charset_new_convert (charset, "utf-8");
- if (filter) {
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (filter));
- camel_object_unref (CAMEL_OBJECT (filter));
- }
- }
-
- camel_data_wrapper_write_to_stream (wrapper, CAMEL_STREAM (filtered_stream));
- camel_stream_flush (CAMEL_STREAM (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
-
- for (text = ba->data, end = text + ba->len; text < end; text++) {
- if (!isspace ((unsigned char)*text))
- break;
- }
-
- if (text >= end) {
- g_byte_array_free (ba, TRUE);
- return NULL;
- }
-
- g_byte_array_append (ba, "", 1);
- text = ba->data;
- g_byte_array_free (ba, FALSE);
-
- return text;
-}
-
-/*----------------------------------------------------------------------*
- * Mime handling functions
- *----------------------------------------------------------------------*/
-
-struct {
- char *start;
- char * (*handler) (char *start, CamelMimePart *part, MailDisplay *md);
-} text_specials[] = {
- { "-----BEGIN PGP MESSAGE-----\n", try_inline_pgp },
- { "-----BEGIN PGP SIGNED MESSAGE-----\n", try_inline_pgp_sig },
- { "begin ", try_uudecoding },
- { "(This file must be converted with BinHex 4.0)\n", try_inline_binhex }
-};
-#define NSPECIALS (sizeof (text_specials) / sizeof (*text_specials))
-
-static gboolean
-handle_text_plain (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- char *text, *p, *start;
- CamelContentType *type;
- gboolean check_specials;
- const char *format;
- int i;
-
- text = get_data_wrapper_text (wrapper);
- if (!text)
- return FALSE;
-
- /* Check for RFC 2646 flowed text. */
- type = camel_mime_part_get_content_type (part);
- format = header_content_type_param (type, "format");
- if (format && !g_strcasecmp (format, "flowed"))
- return handle_text_plain_flowed (text, md);
-
- mail_html_write (md->html, md->stream,
- "\n<!-- text/plain -->\n"
- "<table cellspacing=0 cellpadding=10 width=\"100%%\"><tr><td>\n");
-
- /* Only look for binhex and stuff if this is real text/plain.
- * (and not, say, application/mac-binhex40 that mail-identify
- * has decided to call text/plain because it starts with English
- * text...)
- */
- check_specials = !g_strcasecmp (mime_type, "text/plain");
-
- p = text;
- while (p && check_specials) {
- /* Look for special cases. */
- for (i = 0; i < NSPECIALS; i++) {
- start = strstr (p, text_specials[i].start);
- if (start && (start == p || start[-1] == '\n'))
- break;
- }
- if (!start)
- break;
-
- /* Deal with special case */
- if (start != p) {
- /* the %.*s thing just grabs upto start-p chars; go read ANSI C */
- mail_text_write (md->html, md->stream, "%.*s", start-p, p);
- }
-
- p = text_specials[i].handler (start, part, md);
- if (p == start) {
- /* Oops. That failed. Output this line normally and
- * skip over it.
- */
- p = strchr (start, '\n');
- if (!p++)
- break;
- mail_text_write (md->html, md->stream, "%.*s", p-start, start);
- } else if (p)
- mail_html_write (md->html, md->stream, "<hr>");
- }
- /* Finish up (or do the whole thing if there were no specials). */
- if (p)
- mail_text_write (md->html, md->stream, "%s", p);
-
- g_free (text);
- mail_html_write (md->html, md->stream, "</td></tr></table>\n");
-
- return TRUE;
-}
-
-#ifdef APPLICATION_PGP_IS_NO_LONGER_SUPPORTED
-/* This is a special-case hack from broken mailers such as The Bat! */
-static gboolean
-handle_application_pgp (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- const char *format, *xaction;
- CamelMimePart *mime_part;
- CamelContentType *type;
- char *text;
-
- /* Check the format and x-action parameters. */
- type = camel_mime_part_get_content_type (part);
- format = header_content_type_param (type, "format");
- xaction = header_content_type_param (type, "x-action");
-
- /* We don't know how to handle non-text broken-pgp'd mime parts */
- if (g_strcasecmp (format, "text") != 0)
- return FALSE;
-
- text = get_data_wrapper_text (wrapper);
- if (!text)
- return FALSE;
-
- mime_part = camel_mime_part_new ();
- if (!g_strcasecmp (xaction, "sign")) {
- camel_mime_part_set_content (mime_part, text, strlen (text), "text/plain");
- } else {
- CamelStream *ciphertext, *plaintext;
- GByteArray *buffer;
-
- ciphertext = camel_stream_mem_new ();
- camel_stream_write (ciphertext, text, strlen (text));
- camel_stream_reset (ciphertext);
-
- plaintext = camel_stream_mem_new ();
- decode_pgp (ciphertext, plaintext, md);
- camel_object_unref (CAMEL_OBJECT (ciphertext));
-
- buffer = CAMEL_STREAM_MEM (plaintext)->buffer;
-
- camel_mime_part_set_content (mime_part, buffer->data, buffer->len, "text/plain");
- camel_object_unref (CAMEL_OBJECT (plaintext));
- }
-
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)));
- camel_object_unref (CAMEL_OBJECT (mime_part));
-
- return handle_text_plain (part, "text/plain", md);
-}
-#endif /* APPLICATION_PGP_IS_NO_LONGER_SUPPORTED */
-
-static gboolean
-handle_text_plain_flowed (char *buf, MailDisplay *md)
-{
- char *text, *line, *eol, *p;
- int prevquoting = 0, quoting, len, br_pending = 0;
- guint32 citation_color = mail_config_get_citation_color ();
-
- mail_html_write (md->html, md->stream,
- "\n<!-- text/plain, flowed -->\n"
- "<table cellspacing=0 cellpadding=10 width=\"100%%\"><tr><td>\n<tt>\n");
-
- for (line = buf; *line; line = eol + 1) {
- /* Process next line */
- eol = strchr (line, '\n');
- if (eol)
- *eol = '\0';
-
- quoting = 0;
- for (p = line; *p == '>'; p++)
- quoting++;
- if (quoting != prevquoting) {
- if (prevquoting == 0) {
- mail_html_write (md->html, md->stream,
- "<font color=\"#%06x\">",
- citation_color);
- if (br_pending)
- br_pending--;
- }
- while (quoting > prevquoting) {
- mail_html_write (md->html, md->stream,
- "<blockquote>");
- prevquoting++;
- }
- while (quoting < prevquoting) {
- mail_html_write (md->html, md->stream,
- "</blockquote>");
- prevquoting--;
- }
- if (quoting == 0) {
- mail_html_write (md->html, md->stream,
- "</font>\n");
- if (br_pending)
- br_pending--;
- }
- }
-
- if (*p == ' ')
- p++;
- len = strlen (p);
- if (len == 0) {
- br_pending++;
- continue;
- }
-
- while (br_pending) {
- mail_html_write (md->html, md->stream, "<br>\n");
- br_pending--;
- }
-
- /* replace '<' with '&lt;', etc. */
- text = e_text_to_html (p, E_TEXT_TO_HTML_CONVERT_SPACES |
- E_TEXT_TO_HTML_CONVERT_URLS);
- if (text && *text)
- mail_html_write (md->html, md->stream, "%s", text);
- g_free (text);
-
- if (p[len - 1] != ' ' || !strcmp (p, "-- "))
- br_pending++;
-
- if (!eol)
- break;
- }
- g_free (buf);
-
- mail_html_write (md->html, md->stream, "</tt>\n</td></tr></table>\n");
-
- return TRUE;
-}
-
-static CamelMimePart *
-fake_mime_part_from_data (const char *data, int len, const char *type)
-{
- CamelStream *memstream;
- CamelDataWrapper *wrapper;
- CamelMimePart *part;
-
- memstream = camel_stream_mem_new_with_buffer (data, len);
- wrapper = camel_data_wrapper_new ();
- camel_data_wrapper_construct_from_stream (wrapper, memstream);
- camel_data_wrapper_set_mime_type (wrapper, type);
- camel_object_unref (CAMEL_OBJECT (memstream));
- 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, "inline");
- return part;
-}
-
-static void
-destroy_part (CamelObject *root, gpointer event_data, gpointer user_data)
-{
- camel_object_unref (user_data);
-}
-
-static void
-decode_pgp (CamelStream *ciphertext, CamelStream *plaintext, MailDisplay *md)
-{
- CamelException ex;
-
- camel_exception_init (&ex);
-
- /* FIXME: multipart parts */
- if (g_datalist_get_data (md->data, "show_pgp")) {
- CamelPgpContext *ctx;
-
- ctx = camel_pgp_context_new (session, mail_config_get_pgp_type (),
- mail_config_get_pgp_path ());
-
- if (ctx) {
- camel_pgp_decrypt (ctx, ciphertext, plaintext, &ex);
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_stream_reset (plaintext);
- } else {
- camel_exception_setv (&ex, CAMEL_EXCEPTION_SYSTEM,
- _("No GPG/PGP program configured."));
- }
-
- if (!camel_exception_is_set (&ex))
- return;
- }
-
- mail_html_write (md->html, md->stream,
- "<table><tr valign=top><td>"
- "<a href=\"x-evolution-decode-pgp:\">"
- "<img src=\"%s\"></a></td><td>",
- get_url_for_icon ("gnome-lockscreen.png", md));
-
- if (camel_exception_is_set (&ex)) {
- char *str;
-
- str = e_utf8_from_locale_string (_("Encrypted message not displayed"));
- mail_html_write (md->html, md->stream, "%s<br><br>\n", str);
- g_free (str);
-
- str = e_utf8_from_locale_string (camel_exception_get_description (&ex));
- mail_error_write (md->html, md->stream, "%s", str);
- camel_exception_clear (&ex);
- g_free (str);
- } else {
- char *str1, *str2;
-
- str1 = e_utf8_from_locale_string (_("Encrypted message"));
- str2 = e_utf8_from_locale_string (_("Click icon to decrypt."));
- mail_html_write (md->html, md->stream, "%s<br><br>\n%s",
- str1, str2);
- g_free (str1);
- g_free (str2);
- }
-
- mail_html_write (md->html, md->stream, "</td></tr></table>");
-}
-
-static char *
-try_inline_pgp (char *start, CamelMimePart *part, MailDisplay *md)
-{
- CamelStream *ciphertext, *plaintext;
- GByteArray *buffer;
- char *end;
-
- end = strstr (start, "-----END PGP MESSAGE-----");
- if (!end)
- return start;
-
- end += strlen ("-----END PGP MESSAGE-----") - 1;
-
- mail_html_write (md->html, md->stream, "<hr>");
-
- ciphertext = camel_stream_mem_new ();
- camel_stream_write (ciphertext, start, end - start);
- camel_stream_reset (ciphertext);
-
- plaintext = camel_stream_mem_new ();
- decode_pgp (ciphertext, plaintext, md);
- camel_object_unref (CAMEL_OBJECT (ciphertext));
-
- buffer = CAMEL_STREAM_MEM (plaintext)->buffer;
- if (buffer && buffer->len) {
- mail_html_write (md->html, md->stream,
- "<table width=\"100%%\" border=2 "
- "cellpadding=4><tr><td>");
- mail_text_write (md->html, md->stream, "%.*s", buffer->len, buffer->data);
- mail_html_write (md->html, md->stream, "</td></tr></table>");
- }
-
- camel_object_unref (CAMEL_OBJECT (plaintext));
-
- return end;
-}
-
-static void
-mail_write_authenticity (MailDisplay *md, CamelCipherValidity *valid)
-{
- char *str;
-
- /* Now display the "seal-of-authenticity" or something... */
- if (valid && camel_cipher_validity_get_valid (valid)) {
- str = e_utf8_from_locale_string (
- _("This message is digitally signed and "
- "has been found to be authentic."));
- mail_html_write (md->html, md->stream,
- "<hr>\n<table><tr valign=top>"
- "<td><img src=\"%s\"></td>"
- "<td><font size=-1>%s<br><br>",
- get_url_for_icon (EVOLUTION_ICONSDIR "/wax-seal.png", md),
- str);
- g_free (str);
- } else {
- str = e_utf8_from_locale_string (
- _("This message is digitally signed but can "
- "not be proven to be authentic."));
- mail_html_write (md->html, md->stream,
- "<hr>\n<table><tr valign=top>"
- "<td><img src=\"%s\"></td>"
- "<td><font size=-1>%s<br><br>",
- get_url_for_icon (EVOLUTION_ICONSDIR "/wax-seal-broken.png", md),
- str);
- g_free (str);
- }
-
- if (valid && camel_cipher_validity_get_description (valid)) {
- mail_error_write (md->html, md->stream, "%s",
- camel_cipher_validity_get_description (valid));
- mail_html_write (md->html, md->stream, "<br><br>");
- }
-}
-
-static char *
-try_inline_pgp_sig (char *start, CamelMimePart *part, MailDisplay *md)
-{
- CamelCipherValidity *valid = NULL;
- CamelPgpContext *context;
- char *msg_start, *pgp_start, *sig_start, *sig_end;
-
- pgp_start = strstr (start, "-----BEGIN PGP SIGNED MESSAGE-----");
- if (pgp_start) {
- /* skip over -----BEGIN PGP SIGNED MESSAGE----- */
- msg_start = strchr (pgp_start, '\n');
- if (!msg_start++)
- return start;
-
- /* skip over Hash: header */
- msg_start = strchr (msg_start, '\n');
- if (!msg_start++)
- return start;
- } else {
- /* Some MUAs don't enclose the signed text in
- -----BEGIN PGP SIGNED MESSAGE----- */
- msg_start = start;
- }
-
- /* find the beginning of the signature block */
- sig_start = strstr (msg_start, "-----BEGIN PGP SIGNATURE-----");
- if (!sig_start)
- return start;
-
- /* find the end of the pgp signature block */
- sig_end = strstr (sig_start, "-----END PGP SIGNATURE-----");
- if (!sig_end)
- return start;
-
- sig_end += strlen ("-----END PGP SIGNATURE-----") + 1;
-
- mail_html_write (md->html, md->stream, "<hr>");
-
- context = camel_pgp_context_new (session, mail_config_get_pgp_type (),
- mail_config_get_pgp_path ());
-
- if (context) {
- CamelMimeFilterCharset *charset_filter;
- CamelStreamFilter *filtered_stream;
- CamelStream *ciphertext;
- CamelContentType *type;
- const char *charset;
- CamelException *ex;
-
- ex = camel_exception_new ();
-
- ciphertext = camel_stream_mem_new ();
-
- type = camel_mime_part_get_content_type (part);
- charset = header_content_type_param (type, "charset");
- if (!charset)
- charset = mail_config_get_default_charset ();
-
- filtered_stream = camel_stream_filter_new_with_stream (ciphertext);
- charset_filter = camel_mime_filter_charset_new_convert ("utf-8", charset);
- if (charset_filter) {
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (charset_filter));
- camel_object_unref (CAMEL_OBJECT (charset_filter));
- }
-
- camel_stream_write (CAMEL_STREAM (filtered_stream), pgp_start, sig_end - pgp_start);
- camel_stream_flush (CAMEL_STREAM (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
-
- camel_stream_reset (ciphertext);
-
- valid = camel_pgp_verify (context, ciphertext, NULL, ex);
- camel_object_unref (CAMEL_OBJECT (ciphertext));
- camel_object_unref (CAMEL_OBJECT (context));
-
- camel_exception_free (ex);
- }
-
- mail_text_write (md->html, md->stream, "%.*s", sig_start - msg_start, msg_start);
-
- mail_write_authenticity (md, valid);
-
- mail_html_write (md->html, md->stream, "</font></td></table>");
-
- camel_cipher_validity_free (valid);
-
- return sig_end;
-}
-
-static char *
-try_uudecoding (char *start, CamelMimePart *mime_part, MailDisplay *md)
-{
- int mode, len, state = 0;
- char *filename, *estart, *p, *out, uulen = 0;
- guint32 save = 0;
- CamelMimePart *part;
-
- /* Make sure it's a real uudecode begin line:
- * begin [0-7]+ .*
- */
- mode = strtoul (start + 6, &p, 8);
- if (p == start + 6 || *p != ' ')
- return start;
- estart = strchr (start, '\n');
- if (!estart)
- return start;
-
- while (isspace ((unsigned char)*p))
- p++;
- filename = g_strndup (p, estart++ - p);
-
- /* Make sure there's an end line. */
- p = strstr (p, "\nend\n");
- if (!p) {
- g_free (filename);
- return start;
- }
-
- out = g_malloc (p - estart);
- len = uudecode_step (estart, p - estart, out, &state, &save, &uulen);
-
- part = fake_mime_part_from_data (out, len, "application/octet-stream");
- g_free (out);
- camel_mime_part_set_filename (part, filename);
- g_free (filename);
- camel_object_hook_event (CAMEL_OBJECT (md->current_message),
- "finalize", destroy_part, part);
-
- mail_html_write (md->html, md->stream, "<hr>");
- format_mime_part (part, md);
-
- return p + 4;
-}
-
-static char *
-try_inline_binhex (char *start, CamelMimePart *mime_part, MailDisplay *md)
-{
- char *p;
- CamelMimePart *part;
-
- /* Find data start. */
- p = strstr (start, "\n:");
- if (!p)
- return start;
-
- /* And data end. */
- p = strchr (p + 2, ':');
- if (!p || (*(p + 1) != '\n' && *(p + 1) != '\0'))
- return start;
- p += 2;
-
- part = fake_mime_part_from_data (start, p - start,
- "application/mac-binhex40");
- camel_object_hook_event (CAMEL_OBJECT (md->current_message),
- "finalize", destroy_part, part);
-
- mail_html_write (md->html, md->stream, "<hr>");
- format_mime_part (part, md);
-
- return p;
-}
-
-/* text/enriched (RFC 1896) or text/richtext (included in RFC 1341) */
-static gboolean
-handle_text_enriched (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- static GHashTable *translations = NULL;
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- GString *string;
- GByteArray *ba;
- char *text, *p, *xed;
- int len, nofill = 0;
- gboolean enriched;
-
- if (!translations) {
- translations = g_hash_table_new (g_strcase_hash,
- g_strcase_equal);
- g_hash_table_insert (translations, "bold", "<b>");
- g_hash_table_insert (translations, "/bold", "</b>");
- g_hash_table_insert (translations, "italic", "<i>");
- g_hash_table_insert (translations, "/italic", "</i>");
- g_hash_table_insert (translations, "fixed", "<tt>");
- g_hash_table_insert (translations, "/fixed", "</tt>");
- g_hash_table_insert (translations, "smaller", "<font size=-1>");
- g_hash_table_insert (translations, "/smaller", "</font>");
- g_hash_table_insert (translations, "bigger", "<font size=+1>");
- g_hash_table_insert (translations, "/bigger", "</font>");
- g_hash_table_insert (translations, "underline", "<u>");
- g_hash_table_insert (translations, "/underline", "</u>");
- g_hash_table_insert (translations, "center", "<p align=center>");
- g_hash_table_insert (translations, "/center", "</p>");
- g_hash_table_insert (translations, "flushleft", "<p align=left>");
- g_hash_table_insert (translations, "/flushleft", "</p>");
- g_hash_table_insert (translations, "flushright", "<p align=right>");
- g_hash_table_insert (translations, "/flushright", "</p>");
- g_hash_table_insert (translations, "excerpt", "<blockquote>");
- g_hash_table_insert (translations, "/excerpt", "</blockquote>");
- g_hash_table_insert (translations, "paragraph", "<p>");
- g_hash_table_insert (translations, "signature", "<address>");
- g_hash_table_insert (translations, "/signature", "</address>");
- g_hash_table_insert (translations, "comment", "<!-- ");
- g_hash_table_insert (translations, "/comment", " -->");
- g_hash_table_insert (translations, "param", "<!-- ");
- g_hash_table_insert (translations, "/param", " -->");
- g_hash_table_insert (translations, "np", "<hr>");
- }
-
- text = get_data_wrapper_text (wrapper);
- if (!text)
- return FALSE;
-
- if (!g_strcasecmp (mime_type, "text/richtext")) {
- enriched = FALSE;
- mail_html_write (md->html, md->stream,
- "\n<!-- text/richtext -->\n");
- } else {
- enriched = TRUE;
- mail_html_write (md->html, md->stream,
- "\n<!-- text/enriched -->\n");
- }
-
- /* This is not great code, but I don't feel like fixing it right
- * now. I mean, it's just text/enriched...
- */
- p = text;
- string = g_string_sized_new (2 * strlen (p));
-
- while (p) {
- len = strcspn (p, " <>&\n");
- if (len)
- g_string_sprintfa (string, "%.*s", len, p);
-
- p += len;
- if (!*p)
- break;
-
- switch (*p++) {
- case ' ':
- while (*p == ' ') {
- g_string_append (string, "&nbsp;");
- p++;
- }
- g_string_append (string, " ");
- break;
- case '\n':
- g_string_append (string, " ");
- if (enriched && nofill <= 0) {
- while (*p == '\n') {
- g_string_append (string, "<br>");
- p++;
- }
- }
- break;
- case '>':
- g_string_append (string, "&gt;");
- break;
- case '&':
- g_string_append (string, "&amp;");
- break;
- case '<':
- if (enriched) {
- if (*p == '<') {
- g_string_append (string, "&lt;");
- p++;
- break;
- }
- } else {
- if (strncmp (p, "lt>", 3) == 0) {
- g_string_append (string, "&lt;");
- p += 3;
- break;
- } else if (strncmp (p, "nl>", 3) == 0) {
- g_string_append (string, "<br>");
- p += 3;
- break;
- }
- }
-
- if (strncmp (p, "nofill>", 7) == 0) {
- nofill++;
- g_string_append (string, "<pre>");
- } else if (strncmp (p, "/nofill>", 8) == 0) {
- nofill--;
- g_string_append (string, "</pre>");
- } else {
- char *copy, *match;
-
- len = strcspn (p, ">");
- copy = g_strndup (p, len);
- match = g_hash_table_lookup (translations,
- copy);
- g_free (copy);
- if (match)
- g_string_append (string, match);
- }
-
- p = strchr (p, '>');
- if (p)
- p++;
- }
- }
- g_free (text);
-
- ba = g_byte_array_new ();
- g_byte_array_append (ba, (const guint8 *)string->str,
- strlen (string->str));
- g_string_free (string, TRUE);
-
- xed = g_strdup_printf ("x-evolution-data:%p", part);
- mail_html_write (md->html, md->stream,
- "<iframe src=\"%s\" frameborder=0 scrolling=no>"
- "</iframe>", xed);
- add_url ("data_urls", xed, ba, md);
-
- return TRUE;
-}
-
-static gboolean
-handle_text_html (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- const char *location;
-
- mail_html_write (md->html, md->stream, "\n<!-- text/html -->\n");
-
- /* FIXME: deal with relative URLs */
- location = get_location (part, md);
- if (!location)
- location = get_cid (part, md);
- mail_html_write (md->html, md->stream,
- "<iframe src=\"%s\" frameborder=0 scrolling=no>"
- "</iframe>", location);
- return TRUE;
-}
-
-static gboolean
-handle_image (CamelMimePart *part, const char *mime_type, MailDisplay *md)
-{
- mail_html_write (md->html, md->stream, "<img hspace=10 vspace=10 src=\"%s\">",
- get_cid (part, md));
- return TRUE;
-}
-
-static gboolean
-handle_multipart_mixed (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- CamelMultipart *mp;
- int i, nparts;
- gboolean output = FALSE;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
- mp = CAMEL_MULTIPART (wrapper);
-
- nparts = camel_multipart_get_number (mp);
- for (i = 0; i < nparts; i++) {
- if (i != 0 && output)
- mail_html_write (md->html, md->stream,
- "<table cellspacing=0 cellpadding=10 width=\"100%%\"><tr><td width=\"100%%\">"
- "<hr noshadow size=1></td></tr></table>\n");
-
- part = camel_multipart_get_part (mp, i);
-
- output = format_mime_part (part, md);
- }
-
- return TRUE;
-}
-
-static gboolean
-handle_multipart_encrypted (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper;
- CamelMimePart *mime_part;
- CamelException ex;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
-
- /* Currently we only handle RFC2015-style PGP encryption. */
- if (!camel_pgp_mime_is_rfc2015_encrypted (part))
- return handle_multipart_mixed (part, mime_type, md);
-
- camel_exception_init (&ex);
- mime_part = mail_crypto_pgp_mime_part_decrypt (part, &ex);
-
- if (camel_exception_is_set (&ex)) {
- /* I guess we just treat this as a multipart/mixed */
- camel_exception_clear (&ex);
- return handle_multipart_mixed (part, mime_type, md);
- } else {
- /* replace the encrypted part with the decrypted part */
- /* FIXME: will this cause problems anywhere? -- seems to work okay so far */
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)));
- camel_object_unref (CAMEL_OBJECT (mime_part));
-
- /* and continue on our merry way... */
- return format_mime_part (part, md);
- }
-}
-
-static gboolean
-handle_multipart_signed (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper;
- CamelMultipart *mp;
- CamelException *ex;
- gboolean output = FALSE;
- CamelCipherValidity *valid;
- int nparts, i;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
-
- ex = camel_exception_new ();
-
- if (camel_pgp_mime_is_rfc2015_signed (part)) {
- valid = mail_crypto_pgp_mime_part_verify (part, ex);
- } else {
- camel_exception_free (ex);
- return handle_multipart_mixed (part, mime_type, md);
- }
-
- if (!valid) {
- camel_exception_free (ex);
- return handle_multipart_mixed (part, mime_type, md);
- }
-
- camel_exception_free (ex);
-
- /* now display all the subparts (there should be only 1) *except* the signature (last part) */
- mp = CAMEL_MULTIPART (wrapper);
-
- nparts = camel_multipart_get_number (mp);
- for (i = 0; i < nparts - 1; i++) {
- if (i != 0 && output)
- mail_html_write (md->html, md->stream,
- "<table cellspacing=0 cellpadding=10 width=\"100%%\"><tr><td width=\"100%%\">"
- "<hr noshadow size=1></td></tr></table>\n");
-
- part = camel_multipart_get_part (mp, i);
-
- output = format_mime_part (part, md);
- }
-
- mail_write_authenticity (md, valid);
- camel_cipher_validity_free (valid);
-
- mail_html_write (md->html, md->stream, "</font></td></table>");
-
- return TRUE;
-}
-
-/* As seen in RFC 2387! */
-static gboolean
-handle_multipart_related (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- CamelMultipart *mp;
- CamelMimePart *body_part, *display_part = NULL;
- CamelContentType *content_type;
- const char *start;
- int i, nparts;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
-
- mp = CAMEL_MULTIPART (wrapper);
- nparts = camel_multipart_get_number (mp);
-
- content_type = camel_mime_part_get_content_type (part);
- start = header_content_type_param (content_type, "start");
- if (start) {
- int len;
-
- /* The "start" parameter includes <>s, which Content-Id
- * does not.
- */
- len = strlen (start) - 2;
-
- for (i = 0; i < nparts; i++) {
- const char *cid;
-
- body_part = camel_multipart_get_part (mp, i);
- cid = camel_mime_part_get_content_id (body_part);
-
- if (!strncmp (cid, start + 1, len) &&
- strlen (cid) == len) {
- display_part = body_part;
- break;
- }
- }
- } else {
- /* No start parameter, so it defaults to the first part. */
- display_part = camel_multipart_get_part (mp, 0);
- }
-
- if (!display_part) {
- /* Oops. Hrmph. */
- return handle_multipart_mixed (part, mime_type, md);
- }
-
- /* Record the Content-ID/Content-Location of any non-displayed parts. */
- for (i = 0; i < nparts; i++) {
- body_part = camel_multipart_get_part (mp, i);
- if (body_part == display_part)
- continue;
-
- get_cid (body_part, md);
- get_location (body_part, md);
- }
-
- /* Now, display the displayed part. */
- return format_mime_part (display_part, md);
-}
-
-/* RFC 2046 says "display the last part that you are able to display". */
-static CamelMimePart *
-find_preferred_alternative (CamelMultipart *multipart, gboolean want_plain)
-{
- int i, nparts;
- CamelMimePart *preferred_part = NULL;
- MailMimeHandler *handler;
-
- nparts = camel_multipart_get_number (multipart);
- for (i = 0; i < nparts; i++) {
- CamelMimePart *part = camel_multipart_get_part (multipart, i);
- CamelContentType *type = camel_mime_part_get_content_type (part);
- char *mime_type = header_content_type_simple (type);
-
- g_strdown (mime_type);
- if (want_plain && !strcmp (mime_type, "text/plain"))
- return part;
- handler = mail_lookup_handler (mime_type);
- if (handler && (!preferred_part || !handler->generic))
- preferred_part = part;
- g_free (mime_type);
- }
-
- return preferred_part;
-}
-
-static gboolean
-handle_multipart_alternative (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- CamelMultipart *multipart;
- CamelMimePart *mime_part;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
-
- multipart = CAMEL_MULTIPART (wrapper);
-
- mime_part = find_preferred_alternative (multipart, FALSE);
- if (mime_part)
- return format_mime_part (mime_part, md);
- else
- return handle_multipart_mixed (part, mime_type, md);
-}
-
-/* RFC 1740 */
-static gboolean
-handle_multipart_appledouble (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
- CamelMultipart *multipart;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
-
- multipart = CAMEL_MULTIPART (wrapper);
-
- /* The first part is application/applefile and is not useful
- * to us. The second part _may_ be displayable data. Most
- * likely it's application/octet-stream though.
- */
- part = camel_multipart_get_part (multipart, 1);
- return format_mime_part (part, md);
-}
-
-static gboolean
-handle_message_rfc822 (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelDataWrapper *wrapper =
- camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (wrapper), FALSE);
-
- mail_html_write (md->html, md->stream, "<blockquote>");
- mail_format_mime_message (CAMEL_MIME_MESSAGE (wrapper), md);
- mail_html_write (md->html, md->stream, "</blockquote>");
-
- return TRUE;
-}
-
-static gboolean
-handle_message_external_body (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- CamelContentType *type;
- const char *access_type;
- char *url = NULL, *desc = NULL;
- char *fmt;
-
- type = camel_mime_part_get_content_type (part);
- access_type = header_content_type_param (type, "access-type");
- if (!access_type)
- goto fallback;
-
- if (!g_strcasecmp (access_type, "ftp") ||
- !g_strcasecmp (access_type, "anon-ftp")) {
- const char *name, *site, *dir, *mode, *ftype;
- char *path;
-
- name = header_content_type_param (type, "name");
- site = header_content_type_param (type, "site");
- if (name == NULL || site == NULL)
- goto fallback;
- dir = header_content_type_param (type, "directory");
- mode = header_content_type_param (type, "mode");
-
- /* Generate the path. */
- if (dir) {
- const char *p = dir + strlen (dir);
-
- path = g_strdup_printf ("%s%s%s%s",
- *dir == '/' ? "" : "/",
- dir,
- *p == '/' ? "" : "/",
- name);
- } else {
- path = g_strdup_printf ("%s%s",
- *name == '/' ? "" : "/",
- name);
- }
-
- if (mode && *mode == 'A')
- ftype = ";type=A";
- else if (mode && *mode == 'I')
- ftype = ";type=I";
- else
- ftype = "";
-
- url = g_strdup_printf ("ftp://%s%s%s", site, path, ftype);
- g_free (path);
- fmt = e_utf8_from_locale_string (_("Pointer to FTP site (%s)"));
- desc = g_strdup_printf (fmt, url);
- g_free (fmt);
- } else if (!g_strcasecmp (access_type, "local-file")) {
- const char *name, *site;
-
- name = header_content_type_param (type, "name");
- if (name == NULL)
- goto fallback;
- site = header_content_type_param (type, "site");
-
- url = g_strdup_printf ("file://%s%s", *name == '/' ? "" : "/",
- name);
- if (site) {
- fmt = e_utf8_from_locale_string (_("Pointer to local file (%s) "
- "valid at site \"%s\""));
- desc = g_strdup_printf (fmt, name, site);
- g_free (fmt);
- } else {
- fmt = e_utf8_from_locale_string (_("Pointer to local file (%s)"));
- desc = g_strdup_printf (fmt, name);
- g_free (fmt);
- }
- } else if (!g_strcasecmp (access_type, "URL")) {
- const char *urlparam;
- char *s, *d;
-
- /* RFC 2017 */
-
- urlparam = header_content_type_param (type, "url");
- if (urlparam == NULL)
- goto fallback;
-
- /* For obscure MIMEy reasons, the URL may be split into
- * multiple words, and needs to be rejoined. (The URL
- * must have any real whitespace %-encoded, so we just
- * get rid of all of it.
- */
- url = g_strdup (urlparam);
- s = d = url;
-
- while (*s) {
- if (!isspace ((unsigned char)*s))
- *d++ = *s;
- s++;
- }
- *d = *s;
-
- fmt = e_utf8_from_locale_string (_("Pointer to remote data (%s)"));
- desc = g_strdup_printf (fmt, url);
- g_free (fmt);
- }
-
- fallback:
- if (!desc) {
- if (access_type) {
- fmt = e_utf8_from_locale_string (_("Pointer to unknown external data "
- "(\"%s\" type)"));
- desc = g_strdup_printf (fmt, access_type);
- g_free (fmt);
- } else
- desc = e_utf8_from_locale_string (_("Malformed external-body part."));
- }
-
-#if 0 /* FIXME */
- handle_mystery (part, md, url, "gnome-globe.png", desc,
- url ? "open it in a browser" : NULL);
-#endif
-
- g_free (desc);
- g_free (url);
- return TRUE;
-}
-
-static gboolean
-handle_via_bonobo (CamelMimePart *part, const char *mime_type,
- MailDisplay *md)
-{
- mail_html_write (md->html, md->stream,
- "<object classid=\"%s\" type=\"%s\"></object>",
- get_cid (part, md), mime_type);
- return TRUE;
-}
-
-/**
- * mail_get_message_rfc822:
- * @message: the message
- * @want_plain: whether the caller prefers plain to html
- * @cite: whether or not to cite the message text
- *
- * See mail_get_message_body() below for more details.
- *
- * Return value: an HTML string representing the text parts of @message.
- **/
-static char *
-mail_get_message_rfc822 (CamelMimeMessage *message, gboolean want_plain, gboolean cite)
-{
- CamelDataWrapper *contents;
- GString *retval;
- const CamelInternetAddress *cia;
- char *text, *citation, *buf, *html;
- time_t date_val;
- int offset;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- text = mail_get_message_body (contents, want_plain, cite);
- if (!text)
- text = g_strdup ("");
- citation = cite ? "&gt; " : "";
- retval = g_string_new (NULL);
-
- /* Kludge: if text starts with "<PRE>", wrap it around the
- * headers too so we won't get a blank line between them for the
- * <P> to <PRE> switch.
- */
- if (!g_strncasecmp (text, "<pre>", 5))
- g_string_sprintfa (retval, "<PRE>");
-
- /* create credits */
- cia = camel_mime_message_get_from (message);
- buf = camel_address_format (CAMEL_ADDRESS (cia));
- if (buf) {
- html = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
- g_string_sprintfa (retval, "%s<b>From:</b> %s<br>",
- citation, html);
- g_free (html);
- g_free (buf);
- }
-
- cia = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
- buf = camel_address_format (CAMEL_ADDRESS (cia));
- if (buf) {
- html = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
- g_string_sprintfa (retval, "%s<b>To:</b> %s<br>",
- citation, html);
- g_free (html);
- g_free (buf);
- }
-
- cia = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
- buf = camel_address_format (CAMEL_ADDRESS (cia));
- if (buf) {
- html = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
- g_string_sprintfa (retval, "%s<b>Cc:</b> %s<br>",
- citation, html);
- g_free (html);
- g_free (buf);
- }
-
- buf = (char *) camel_mime_message_get_subject (message);
- if (buf) {
- html = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
- g_string_sprintfa (retval, "%s<b>Subject:</b> %s<br>",
- citation, html);
- g_free (html);
- }
-
- date_val = camel_mime_message_get_date (message, &offset);
- buf = header_format_date (date_val, offset);
- html = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
- g_string_sprintfa (retval, "%s<b>Date:</b> %s<br>", citation, html);
- g_free (html);
-
- if (!g_strncasecmp (text, "<pre>", 5))
- g_string_sprintfa (retval, "%s<br>%s", citation, text + 5);
- else
- g_string_sprintfa (retval, "%s<br>%s", citation, text);
- g_free (text);
-
- buf = retval->str;
- g_string_free (retval, FALSE);
- return buf;
-}
-
-/**
- * mail_get_message_body:
- * @data: the message or mime part content
- * @want_plain: whether the caller prefers plain to html
- * @cite: whether or not to cite the message text
- *
- * This creates an HTML string representing @data. If @want_plain is %TRUE,
- * it will be an HTML string that looks like a text/plain representation
- * of @data (but it will still be HTML).
- *
- * If @cite is %TRUE, the message will be cited as a reply, using "> "s.
- *
- * Return value: the HTML string, which the caller must free, or
- * %NULL if @data doesn't include any data which should be forwarded or
- * replied to.
- **/
-char *
-mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cite)
-{
- CamelMultipart *mp;
- CamelMimePart *subpart;
- int i, nparts;
- char *subtext, *old, *div;
- char *text = NULL;
- CamelContentType *mime_type;
-
- mime_type = camel_data_wrapper_get_mime_type_field (data);
-
- /* If it is message/rfc822 or message/news, extract the
- * important headers and recursively process the body.
- */
- if (header_content_type_is (mime_type, "message", "rfc822") ||
- header_content_type_is (mime_type, "message", "news"))
- return mail_get_message_rfc822 (CAMEL_MIME_MESSAGE (data), want_plain, cite);
-
- /* If it's a vcard or icalendar, ignore it. */
- if (header_content_type_is (mime_type, "text", "x-vcard") ||
- header_content_type_is (mime_type, "text", "calendar"))
- return NULL;
-
- /* Get the body data for other text/ or message/ types */
- if (header_content_type_is (mime_type, "text", "*") ||
- header_content_type_is (mime_type, "message", "*")) {
- text = get_data_wrapper_text (data);
- if (text && !header_content_type_is (mime_type, "text", "html")) {
- char *html = e_text_to_html (text, E_TEXT_TO_HTML_PRE | (cite ? E_TEXT_TO_HTML_CITE : 0));
- g_free (text);
- text = html;
- }
- return text;
- }
-
- /* If it's not message and it's not text, and it's not
- * multipart, we don't want to deal with it.
- */
- if (!header_content_type_is (mime_type, "multipart", "*"))
- return NULL;
-
- mp = CAMEL_MULTIPART (data);
-
- if (header_content_type_is (mime_type, "multipart", "alternative")) {
- /* Pick our favorite alternative and reply to it. */
-
- subpart = find_preferred_alternative (mp, want_plain);
- if (!subpart)
- return NULL;
-
- data = camel_medium_get_content_object (CAMEL_MEDIUM (subpart));
- return mail_get_message_body (data, want_plain, cite);
- }
-
- /* Otherwise, concatenate all the parts that we can. */
- if (want_plain) {
- if (cite)
- div = "<br>\n&gt; ----<br>\n&gt; <br>\n";
- else
- div = "<br>\n----<br>\n<br>\n";
- } else
- div = "<br><hr><br>";
-
- nparts = camel_multipart_get_number (mp);
- for (i = 0; i < nparts; i++) {
- subpart = camel_multipart_get_part (mp, i);
-
- data = camel_medium_get_content_object (CAMEL_MEDIUM (subpart));
- subtext = mail_get_message_body (data, want_plain, cite);
- if (!subtext)
- continue;
-
- if (text) {
- old = text;
- text = g_strdup_printf ("%s%s%s", old, div, subtext);
- g_free (subtext);
- g_free (old);
- } else
- text = subtext;
- }
-
- return text;
-}
diff --git a/mail/mail-identify.c b/mail/mail-identify.c
deleted file mode 100644
index 5d0b5f1a69..0000000000
--- a/mail/mail-identify.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2000, 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 <stdlib.h>
-#include <string.h>
-
-#include <glib.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-#include <libgnomevfs/gnome-vfs-mime-sniff-buffer.h>
-#include "mail.h"
-
-static const char *identify_by_magic (CamelDataWrapper *data, MailDisplay *md);
-
-/**
- * mail_identify_mime_part:
- * @part: a CamelMimePart
- * @md: the MailDisplay @part is being shown in
- *
- * Try to identify the MIME type of the data in @part (which presumably
- * doesn't have a useful Content-Type).
- *
- * Return value: the MIME type, which the caller must free, or %NULL
- * if it could not be identified.
- **/
-char *
-mail_identify_mime_part (CamelMimePart *part, MailDisplay *md)
-{
- const char *filename, *name_type = NULL, *magic_type = NULL;
- CamelDataWrapper *data;
-
- filename = camel_mime_part_get_filename (part);
- if (filename) {
- /* GNOME-VFS will misidentify TNEF attachments as MPEG */
- if (!strcmp (filename, "winmail.dat"))
- return g_strdup ("application/vnd.ms-tnef");
-
- name_type = gnome_vfs_mime_type_from_name_or_default (filename, NULL);
- }
-
- data = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- if (!camel_data_wrapper_is_offline (data))
- magic_type = identify_by_magic (data, md);
-
- if (magic_type && name_type) {
- /* If GNOME-VFS doesn't recognize the data by magic, but it
- * contains English words, it will call it text/plain. If the
- * filename-based check came up with something different, use
- * that instead.
- */
- if (!strcmp (magic_type, "text/plain"))
- return g_strdup (name_type);
-
- /* If if returns "application/octet-stream" try to
- * do better with the filename check.
- */
- if (!strcmp (magic_type, "application/octet-stream"))
- return g_strdup (name_type);
- }
-
- /* If the MIME part data was online, and the magic check
- * returned something, use that, since it's more reliable.
- */
- if (magic_type)
- return g_strdup (magic_type);
-
- /* Otherwise try guessing based on the filename */
- if (name_type)
- return g_strdup (name_type);
-
- /* Another possibility to try is the x-mac-type / x-mac-creator
- * parameter to Content-Type used by some Mac email clients. That
- * would require a Mac type to mime type conversion table.
- */
-
- /* If the data part is offline, then we didn't try magic
- * before, so force it to be loaded so we can try again later.
- * FIXME: In a perfect world, we would not load the content
- * just to identify the MIME type.
- */
- if (camel_data_wrapper_is_offline (data))
- mail_content_loaded (data, md, TRUE, NULL, NULL);
-
- return NULL;
-}
-
-static const char *
-identify_by_magic (CamelDataWrapper *data, MailDisplay *md)
-{
- GnomeVFSMimeSniffBuffer *sniffer;
- CamelStream *memstream;
- const char *type;
- GByteArray *ba;
-
- ba = g_byte_array_new ();
- memstream = camel_stream_mem_new_with_byte_array (ba);
- camel_data_wrapper_write_to_stream (data, memstream);
- if (ba->len) {
- sniffer = gnome_vfs_mime_sniff_buffer_new_from_memory (ba->data, ba->len);
- type = gnome_vfs_get_mime_type_for_buffer (sniffer);
- gnome_vfs_mime_sniff_buffer_free (sniffer);
- } else
- type = NULL;
- camel_object_unref (CAMEL_OBJECT (memstream));
-
- return type;
-}
diff --git a/mail/mail-importer.c b/mail/mail-importer.c
deleted file mode 100644
index cfe7476ef2..0000000000
--- a/mail/mail-importer.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-importer.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <dirent.h>
-#include <gmodule.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <evolution-storage.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-exception.h>
-
-#include "mail-importer.h"
-#include "mail-local.h"
-#include "mail.h"
-
-
-static GList *importer_modules = NULL;
-
-extern char *evolution_dir;
-
-static GNOME_Evolution_Storage local_storage = NULL;
-
-/* Prototype */
-
-void mail_importer_uninit (void);
-
-/**
- * mail_importer_create_folder:
- * parent_path: The path of the parent folder.
- * name: The name of the folder to be created.
- * description: A description of the folder.
- * listener: A BonoboListener for notification.
- *
- * Attempts to create the folder @parent_path/@name. When the folder has been
- * created, or there is an error, the "evolution-shell:folder-created" event is
- * emitted on @listener. The BonoboArg that is sent to @listener is a
- * GNOME_Evolution_Storage_FolderResult which has two elements: result and path.
- * Result contains the error code, or success, and path contains the complete
- * physical path to the newly created folder.
- */
-void
-mail_importer_create_folder (const char *parent_path,
- const char *name,
- const char *description,
- const BonoboListener *listener)
-{
- Bonobo_Listener corba_listener;
- CORBA_Environment ev;
- char *path, *physical;
- char *real_description;
-
- g_return_if_fail (local_storage != NULL);
- g_return_if_fail (listener != NULL);
- g_return_if_fail (BONOBO_IS_LISTENER (listener));
-
- path = g_concat_dir_and_file (parent_path, name);
- physical = g_strdup_printf ("file://%s/local/%s", evolution_dir,
- parent_path);
-
- corba_listener = bonobo_object_corba_objref (BONOBO_OBJECT (listener));
-
- /* Darn CORBA wanting non-NULL values for strings */
- real_description = CORBA_string_dup (description ? description : "");
-
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Storage_asyncCreateFolder (local_storage,
- path, "mail",
- real_description, physical,
- corba_listener, &ev);
- CORBA_exception_free (&ev);
- g_free (path);
- g_free (physical);
-}
-
-/**
- * mail_importer_add_line:
- * importer: A MailImporter structure.
- * str: Next line of the mbox.
- * finished: TRUE if @str is the last line of the message.
- *
- * Adds lines to the message until it is finished, and then adds
- * the complete message to the folder.
- */
-void
-mail_importer_add_line (MailImporter *importer,
- const char *str,
- gboolean finished)
-{
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
- CamelException *ex;
-
- if (importer->mstream == NULL) {
- importer->mstream = CAMEL_STREAM_MEM (camel_stream_mem_new ());
- }
-
- camel_stream_write (CAMEL_STREAM (importer->mstream), str,
- strlen (str));
-
- if (finished == FALSE)
- return;
-
- camel_stream_reset (CAMEL_STREAM (importer->mstream));
- info = g_new0 (CamelMessageInfo, 1);
- info->flags = CAMEL_MESSAGE_SEEN;
-
- msg = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
- CAMEL_STREAM (importer->mstream));
-
- camel_object_unref (CAMEL_OBJECT (importer->mstream));
- importer->mstream = NULL;
-
- ex = camel_exception_new ();
- camel_folder_append_message (importer->folder, msg, info, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
-
- camel_exception_free (ex);
- g_free (info);
-}
-
-/* module management */
-static GList *
-get_importer_list (void)
-{
- DIR *dir;
- struct dirent *d;
- GList *importers_ret = NULL;
-
- dir = opendir (MAIL_IMPORTERSDIR);
- if (!dir) {
- g_warning ("No importers dir: %s", MAIL_IMPORTERSDIR);
- return NULL;
- }
-
- while ((d = readdir (dir))) {
- char *path, *ext;
-
- ext = strchr (d->d_name, '.');
- if (!ext || strcmp (ext, ".so") != 0)
- continue;
-
- path = g_concat_dir_and_file (MAIL_IMPORTERSDIR, d->d_name);
- importers_ret = g_list_prepend (importers_ret, path);
- }
-
- closedir (dir);
- return importers_ret;
-}
-
-static void
-free_importer_list (GList *list)
-{
- for (; list; list = list->next) {
- g_free (list->data);
- }
-
- g_list_free (list);
-}
-
-/**
- * mail_importer_init:
- *
- * Initialises all the importers
- */
-void
-mail_importer_init (EvolutionShellClient *client)
-{
- GList *importers, *l;
-
- if (importer_modules != NULL) {
- return;
- }
-
- local_storage = evolution_shell_client_get_local_storage (client);
-
- if (!g_module_supported ()) {
- g_warning ("Could not initialise the importers as module loading"
- " is not supported on this system");
- return;
- }
-
- importers = get_importer_list ();
- if (importers == NULL)
- return;
-
- for (l = importers; l; l = l->next) {
- GModule *module;
-
- module = g_module_open (l->data, 0);
- if (!module) {
- g_warning ("Could not load: %s: %s", (char *) l->data,
- g_module_error ());
- } else {
- void *(*mail_importer_module_init) ();
-
- if (!g_module_symbol (module, "mail_importer_module_init",
- (gpointer *)&mail_importer_module_init)) {
- g_warning ("Could not load %s: No initialisation",
- (char *) l->data);
- g_module_close (module);
- }
-
- mail_importer_module_init ();
- importer_modules = g_list_prepend (importer_modules, module);
- }
- }
-
- free_importer_list (importers);
-}
-
-/**
- * mail_importer_uninit:
- *
- * Unloads all the modules.
- */
-void
-mail_importer_uninit (void)
-{
- CORBA_Environment ev;
- GList *l;
-
- for (l = importer_modules; l; l = l->next) {
- g_module_close (l->data);
- }
-
- g_list_free (importer_modules);
- importer_modules = NULL;
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (local_storage, &ev);
- local_storage = NULL;
- CORBA_exception_free (&ev);
-}
-
diff --git a/mail/mail-importer.h b/mail/mail-importer.h
deleted file mode 100644
index 23b555d6b8..0000000000
--- a/mail/mail-importer.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-importer.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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.
- */
-
-#ifndef __MAIL_IMPORTER_H__
-#define __MAIL_IMPORTER_H__
-
-#include <bonobo/bonobo-listener.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-stream-mem.h>
-#include <evolution-shell-client.h>
-
-typedef struct _MailImporter MailImporter;
-struct _MailImporter {
- CamelFolder *folder;
- CamelStreamMem *mstream;
-
- gboolean frozen; /* Is folder frozen? */
-};
-
-void mail_importer_init (EvolutionShellClient *client);
-void mail_importer_uninit (void);
-
-void mail_importer_add_line (MailImporter *importer,
- const char *str,
- gboolean finished);
-void mail_importer_create_folder (const char *parent_path,
- const char *name,
- const char *description,
- const BonoboListener *listener);
-#endif
diff --git a/mail/mail-local.c b/mail/mail-local.c
deleted file mode 100644
index 759c464737..0000000000
--- a/mail/mail-local.c
+++ /dev/null
@@ -1,1262 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-local.c: Local mailbox support. */
-
-/*
- * Authors:
- * Michael Zucchi <NotZed@ximian.com>
- * Peter Williams <peterw@ximian.com>
- * Ettore Perazzoli <ettore@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2000 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 <unistd.h>
-#include <errno.h>
-
-#include <gnome-xml/xmlmemory.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <glade/glade.h>
-
-#include "gal/widgets/e-gui-utils.h"
-#include "e-util/e-path.h"
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-#include "evolution-shell-component.h"
-#include "evolution-storage-listener.h"
-
-#include "camel/camel.h"
-
-#include "mail.h"
-#include "mail-local.h"
-#include "mail-tools.h"
-#include "folder-browser.h"
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "mail-vfolder.h"
-#include "mail-ops.h"
-
-#define d(x)
-
-/* sigh, required for passing around to some functions */
-static GNOME_Evolution_Storage local_corba_storage = CORBA_OBJECT_NIL;
-
-/* ** MailLocalStore ** (protos) ************************************************** */
-
-#define MAIL_LOCAL_STORE_TYPE (mail_local_store_get_type ())
-#define MAIL_LOCAL_STORE(obj) (CAMEL_CHECK_CAST((obj), MAIL_LOCAL_STORE_TYPE, MailLocalStore))
-#define MAIL_LOCAL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), MAIL_LOCAL_STORE_TYPE, MailLocalStoreClass))
-#define MAIL_IS_LOCAL_STORE(o) (CAMEL_CHECK_TYPE((o), MAIL_LOCAL_STORE_TYPE))
-
-typedef struct {
- CamelStore parent_object;
-
- /* stores CamelFolderInfo's of the folders we're supposed to know about, by uri */
- GHashTable *folder_infos;
- GMutex *folder_info_lock;
-
-} MailLocalStore;
-
-typedef struct {
- CamelStoreClass parent_class;
-} MailLocalStoreClass;
-
-static CamelType mail_local_store_get_type (void);
-
-static MailLocalStore *global_local_store;
-
-/* ** MailLocalFolder ** (protos) ************************************************* */
-
-#define MAIL_LOCAL_FOLDER_TYPE (mail_local_folder_get_type ())
-#define MAIL_LOCAL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), MAIL_LOCAL_FOLDER_TYPE, MailLocalFolder))
-#define MAIL_LOCAL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), MAIL_LOCAL_FOLDER_TYPE, MailLocalFolderClass))
-#define MAIL_IS_LOCAL_FOLDER(o) (CAMEL_CHECK_TYPE((o), MAIL_LOCAL_FOLDER_TYPE))
-
-#define LOCAL_STORE_LOCK(folder) (g_mutex_lock (((MailLocalStore *)folder)->folder_info_lock))
-#define LOCAL_STORE_UNLOCK(folder) (g_mutex_unlock (((MailLocalStore *)folder)->folder_info_lock))
-
-struct _local_meta {
- char *path; /* path of metainfo */
-
- char *format; /* format of mailbox */
- char *name; /* name of actual mbox */
- int indexed; /* is body indexed? */
-};
-
-typedef struct {
- CamelFolder parent_object;
-
- CamelFolder *real_folder;
- CamelStore *real_store;
-
- char *real_path;
-
- struct _local_meta *meta;
-
- GMutex *real_folder_lock; /* no way to use the CamelFolder's lock, so... */
-} MailLocalFolder;
-
-typedef struct {
- CamelFolderClass parent_class;
-} MailLocalFolderClass;
-
-static CamelType mail_local_folder_get_type (void);
-
-#ifdef ENABLE_THREADS
-#define LOCAL_FOLDER_LOCK(folder) (g_mutex_lock (((MailLocalFolder *)folder)->real_folder_lock))
-#define LOCAL_FOLDER_UNLOCK(folder) (g_mutex_unlock (((MailLocalFolder *)folder)->real_folder_lock))
-#else
-#define LOCAL_FOLDER_LOCK(folder)
-#define LOCAL_FOLDER_UNLOCK(folder)
-#endif
-
-/* ** MailLocalFolder ************************************************************* */
-
-static struct _local_meta *
-load_metainfo(const char *path)
-{
- xmlDocPtr doc;
- xmlNodePtr node;
- struct _local_meta *meta;
-
- d(printf("Loading folder metainfo from : %s\n", path));
-
- meta = g_malloc0(sizeof(*meta));
- meta->path = g_strdup(path);
-
- doc = xmlParseFile(path);
- if (doc == NULL)
- goto dodefault;
-
- node = doc->root;
- if (strcmp(node->name, "folderinfo"))
- goto dodefault;
-
- node = node->childs;
- while (node) {
- if (!strcmp(node->name, "folder")) {
- char *index, *txt;
-
- txt = xmlGetProp(node, "type");
- meta->format = g_strdup(txt?txt:"mbox");
- xmlFree(txt);
-
- txt = xmlGetProp(node, "name");
- meta->name = g_strdup(txt?txt:"mbox");
- xmlFree(txt);
-
- index = xmlGetProp(node, "index");
- if (index) {
- meta->indexed = atoi(index);
- xmlFree(index);
- } else
- meta->indexed = TRUE;
-
- }
- node = node->next;
- }
- xmlFreeDoc(doc);
- return meta;
-
- dodefault:
- meta->format = g_strdup("mbox"); /* defaults */
- meta->name = g_strdup("mbox");
- meta->indexed = TRUE;
- xmlFreeDoc(doc);
- return meta;
-}
-
-static void
-free_metainfo(struct _local_meta *meta)
-{
- g_free(meta->path);
- g_free(meta->format);
- g_free(meta->name);
- g_free(meta);
-}
-
-static gboolean
-save_metainfo(struct _local_meta *meta)
-{
- xmlDocPtr doc;
- xmlNodePtr root, node;
- int ret;
-
- d(printf("Saving folder metainfo to : %s\n", meta->path));
-
- doc = xmlNewDoc("1.0");
- root = xmlNewDocNode(doc, NULL, "folderinfo", NULL);
- xmlDocSetRootElement(doc, root);
-
- node = xmlNewChild(root, NULL, "folder", NULL);
- xmlSetProp(node, "type", meta->format);
- xmlSetProp(node, "name", meta->name);
- xmlSetProp(node, "index", meta->indexed?"1":"0");
-
- ret = xmlSaveFile(meta->path, doc);
- xmlFreeDoc(doc);
-
- return ret;
-}
-
-/* forward a bunch of functions to the real folder. This pretty
- * much sucks but I haven't found a better way of doing it.
- */
-
-/* We need to do it without having locked our folder, otherwise
- we can get sync hangs with vfolders/trash */
-static void
-mlf_refresh_info(CamelFolder *folder, CamelException *ex)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_refresh_info(f, ex);
- camel_object_unref((CamelObject *)f);
-}
-
-static void
-mlf_sync(CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_sync(f, expunge, ex);
- camel_object_unref((CamelObject *)f);
-}
-
-static void
-mlf_expunge(CamelFolder *folder, CamelException *ex)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_expunge(f, ex);
- camel_object_unref((CamelObject *)f);
-}
-
-static void
-mlf_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, CamelException *ex)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_append_message(f, message, info, ex);
- camel_object_unref((CamelObject *)f);
-}
-
-static CamelMimeMessage *
-mlf_get_message(CamelFolder *folder, const char *uid, CamelException *ex)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelMimeMessage *ret;
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- ret = camel_folder_get_message(f, uid, ex);
- camel_object_unref((CamelObject *)f);
-
- return ret;
-}
-
-static GPtrArray *
-mlf_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER (folder);
- GPtrArray *ret;
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- ret = camel_folder_search_by_expression(f, expression, ex);
- camel_object_unref((CamelObject *)f);
-
- return ret;
-}
-
-static void
-mlf_search_free(CamelFolder *folder, GPtrArray *result)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_search_free(f, result);
- camel_object_unref((CamelObject *)f);
-}
-
-static void
-mlf_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_set_message_flags(mlf->real_folder, uid, flags, set);
- camel_object_unref((CamelObject *)f);
-}
-
-static void
-mlf_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_set_message_user_flag(mlf->real_folder, uid, name, value);
- camel_object_unref((CamelObject *)f);
-}
-
-static void
-mlf_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER(folder);
- CamelFolder *f;
-
- LOCAL_FOLDER_LOCK(mlf);
- f = mlf->real_folder;
- camel_object_ref((CamelObject *)f);
- LOCAL_FOLDER_UNLOCK(mlf);
-
- camel_folder_set_message_user_tag(mlf->real_folder, uid, name, value);
- camel_object_unref((CamelObject *)f);
-}
-
-/* and, conversely, forward the real folder's signals. */
-
-static void
-mlf_proxy_message_changed(CamelObject *real_folder, gpointer event_data, gpointer user_data)
-{
- camel_object_trigger_event((CamelObject *)user_data, "message_changed", event_data);
-}
-
-static void
-mlf_proxy_folder_changed(CamelObject *real_folder, gpointer event_data, gpointer user_data)
-{
- camel_object_trigger_event((CamelObject *)user_data, "folder_changed", event_data);
-}
-
-static void
-mlf_unset_folder (MailLocalFolder *mlf)
-{
- CamelFolder *folder = (CamelFolder *)mlf;
-
- g_assert(mlf->real_folder);
-
- camel_object_unhook_event(CAMEL_OBJECT(mlf->real_folder),
- "message_changed",
- mlf_proxy_message_changed,
- mlf);
- camel_object_unhook_event(CAMEL_OBJECT(mlf->real_folder),
- "folder_changed",
- mlf_proxy_folder_changed,
- mlf);
-
- camel_object_unref((CamelObject *)folder->summary);
- folder->summary = NULL;
- camel_object_unref((CamelObject *)mlf->real_folder);
- mlf->real_folder = NULL;
- camel_object_unref((CamelObject *)mlf->real_store);
- mlf->real_store = NULL;
-
- folder->permanent_flags = 0;
- folder->has_summary_capability = 0;
- folder->has_search_capability = 0;
-}
-
-static gboolean
-mlf_set_folder(MailLocalFolder *mlf, guint32 flags, CamelException *ex)
-{
- CamelFolder *folder = (CamelFolder *)mlf;
- char *uri;
-
- g_assert(mlf->real_folder == NULL);
-
- uri = g_strdup_printf("%s:%s%s", mlf->meta->format, ((CamelService *)folder->parent_store)->url->path, mlf->real_path);
- d(printf("opening real store: %s\n", uri));
- mlf->real_store = camel_session_get_store(session, uri, ex);
- g_free(uri);
- if (mlf->real_store == NULL)
- return FALSE;
-
- if (mlf->meta->indexed)
- flags |= CAMEL_STORE_FOLDER_BODY_INDEX;
-
- mlf->real_folder = camel_store_get_folder(mlf->real_store, mlf->meta->name, flags, ex);
- if (mlf->real_folder == NULL)
- return FALSE;
-
- if (mlf->real_folder->has_summary_capability) {
- folder->summary = mlf->real_folder->summary;
- camel_object_ref((CamelObject *)mlf->real_folder->summary);
- }
-
- folder->permanent_flags = mlf->real_folder->permanent_flags;
- folder->has_summary_capability = mlf->real_folder->has_summary_capability;
- folder->has_search_capability = mlf->real_folder->has_search_capability;
-
- camel_object_hook_event((CamelObject *)mlf->real_folder, "message_changed", mlf_proxy_message_changed, mlf);
- camel_object_hook_event((CamelObject *)mlf->real_folder, "folder_changed", mlf_proxy_folder_changed, mlf);
-
- return TRUE;
-}
-
-static void
-mlf_class_init (CamelObjectClass *camel_object_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_object_class);
-
- /* override all the functions subclassed in providers/local/ */
-
- camel_folder_class->refresh_info = mlf_refresh_info;
- camel_folder_class->sync = mlf_sync;
- camel_folder_class->expunge = mlf_expunge;
- camel_folder_class->append_message = mlf_append_message;
- camel_folder_class->get_message = mlf_get_message;
- camel_folder_class->search_free = mlf_search_free;
-
- camel_folder_class->search_by_expression = mlf_search_by_expression;
- camel_folder_class->set_message_flags = mlf_set_message_flags;
- camel_folder_class->set_message_user_flag = mlf_set_message_user_flag;
- camel_folder_class->set_message_user_tag = mlf_set_message_user_tag;
-}
-
-static void
-mlf_init (CamelObject *obj)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER (obj);
-
-#ifdef ENABLE_THREADS
- mlf->real_folder_lock = g_mutex_new();
-#endif
-}
-
-static void
-mlf_finalize (CamelObject *obj)
-{
- MailLocalFolder *mlf = MAIL_LOCAL_FOLDER (obj);
-
- if (mlf->real_folder)
- mlf_unset_folder(mlf);
-
- free_metainfo(mlf->meta);
-
-#ifdef ENABLE_THREADS
- g_mutex_free (mlf->real_folder_lock);
-#endif
-}
-
-static CamelType
-mail_local_folder_get_type (void)
-{
- static CamelType mail_local_folder_type = CAMEL_INVALID_TYPE;
-
- if (mail_local_folder_type == CAMEL_INVALID_TYPE) {
- mail_local_folder_type = camel_type_register(CAMEL_FOLDER_TYPE,
- "MailLocalFolder",
- sizeof (MailLocalFolder),
- sizeof (MailLocalFolderClass),
- mlf_class_init,
- NULL,
- mlf_init,
- mlf_finalize);
- }
-
- return mail_local_folder_type;
-}
-
-static MailLocalFolder *
-mail_local_folder_construct(MailLocalFolder *mlf, MailLocalStore *parent_store, const char *full_name, CamelException *ex)
-{
- const char *name;
- char *metapath;
-
- name = strrchr(full_name, '/');
- if (name == NULL)
- name = full_name;
- name = name + 1;
-
- d(printf("constructing local folder: full = %s, name = %s\n", full_name, name));
-
- camel_folder_construct(CAMEL_FOLDER (mlf), CAMEL_STORE(parent_store), full_name, name);
-
- mlf->real_path = g_strdup(((CamelFolder *)mlf)->full_name);
-
- metapath = g_strdup_printf("%s/%s/local-metadata.xml", ((CamelService *)parent_store)->url->path, full_name);
- mlf->meta = load_metainfo(metapath);
- g_free(metapath);
-
- return mlf;
-}
-
-static gboolean
-mail_local_folder_reconfigure (MailLocalFolder *mlf, const char *new_format, CamelException *ex)
-{
- CamelStore *fromstore = NULL;
- CamelFolder *fromfolder = NULL;
- char *oldformat = NULL;
- char *tmpname;
- char *store_uri;
- GPtrArray *uids;
- int real_folder_frozen = FALSE;
-
- camel_operation_start(NULL, _("Reconfiguring folder"));
-
- /* first things first */
- g_assert (ex);
- LOCAL_FOLDER_LOCK (mlf);
-
- /* first, 'close' the old folder */
- if (mlf->real_folder) {
- camel_folder_sync(mlf->real_folder, FALSE, ex);
- if (camel_exception_is_set (ex))
- goto cleanup;
- mlf_unset_folder(mlf);
- }
-
- store_uri = g_strdup_printf("%s:%s%s", mlf->meta->format,
- ((CamelService *)((CamelFolder *)mlf)->parent_store)->url->path, mlf->real_path);
- fromstore = camel_session_get_store(session, store_uri, ex);
- g_free(store_uri);
- if (fromstore == NULL)
- goto cleanup;
-
- oldformat = mlf->meta->format;
- mlf->meta->format = g_strdup(new_format);
-
- /* rename the old mbox and open it again, without indexing */
- tmpname = g_strdup_printf ("%s_reconfig", mlf->meta->name);
- d(printf("renaming %s to %s, and opening it\n", mlf->meta->name, tmpname));
-
- camel_store_rename_folder(fromstore, mlf->meta->name, tmpname, ex);
- if (camel_exception_is_set(ex))
- goto cleanup;
-
- /* we dont need to set the create flag ... or need an index if it has one */
- fromfolder = camel_store_get_folder(fromstore, tmpname, 0, ex);
- if (fromfolder == NULL || camel_exception_is_set(ex)) {
- /* try and recover ... */
- camel_exception_clear(ex);
- camel_store_rename_folder(fromstore, tmpname, mlf->meta->name, ex);
- goto cleanup;
- }
-
- /* create a new mbox */
- d(printf("Creating the destination mbox\n"));
-
- if (!mlf_set_folder(mlf, CAMEL_STORE_FOLDER_CREATE, ex)) {
- d(printf("cannot open destination folder\n"));
- /* try and recover ... */
- camel_exception_clear(ex);
- camel_store_rename_folder(fromstore, tmpname, mlf->meta->name, ex);
- goto cleanup;
- }
-
- real_folder_frozen = TRUE;
- camel_folder_freeze(mlf->real_folder);
-
- uids = camel_folder_get_uids(fromfolder);
- camel_folder_move_messages_to(fromfolder, uids, mlf->real_folder, ex);
- camel_folder_free_uids(fromfolder, uids);
- if (camel_exception_is_set(ex))
- goto cleanup;
-
- camel_folder_expunge(fromfolder, ex);
-
- d(printf("delete old mbox ...\n"));
- camel_object_unref(CAMEL_OBJECT(fromfolder));
- fromfolder = NULL;
- camel_store_delete_folder(fromstore, tmpname, ex);
-
- /* switch format */
- g_free(oldformat);
- oldformat = NULL;
- if (save_metainfo(mlf->meta) == FALSE) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot save folder metainfo; "
- "you'll probably find you can't\n"
- "open this folder anymore: %s: %s"),
- mlf->meta->path, strerror(errno));
- }
-
- cleanup:
- if (oldformat) {
- g_free(mlf->meta->format);
- mlf->meta->format = oldformat;
- }
- if (mlf->real_folder == NULL)
- mlf_set_folder (mlf, CAMEL_STORE_FOLDER_CREATE, ex);
- if (fromfolder)
- camel_object_unref((CamelObject *)fromfolder);
- if (fromstore)
- camel_object_unref((CamelObject *)fromstore);
-
- LOCAL_FOLDER_UNLOCK (mlf);
-
- if (real_folder_frozen)
- camel_folder_thaw(mlf->real_folder);
-
- camel_operation_end(NULL);
-
- return !camel_exception_is_set(ex);
-}
-
-/* ******************************************************************************** */
-
-static CamelObjectClass *local_store_parent_class = NULL;
-
-static CamelFolder *
-mls_get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- MailLocalStore *local_store = MAIL_LOCAL_STORE (store);
- MailLocalFolder *folder;
-
- d(printf("--LOCAL-- get_folder: %s\n", folder_name));
-
- folder = (MailLocalFolder *)camel_object_new(MAIL_LOCAL_FOLDER_TYPE);
- folder = mail_local_folder_construct(folder, local_store, folder_name, ex);
- if (folder == NULL)
- return NULL;
-
- if (!mlf_set_folder(folder, flags, ex)) {
- camel_object_unref(CAMEL_OBJECT(folder));
- return NULL;
- }
-
- if (flags & CAMEL_STORE_FOLDER_CREATE) {
- if (save_metainfo(folder->meta) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot save folder metainfo to %s: %s"),
- folder->meta->path, strerror(errno));
- camel_object_unref(CAMEL_OBJECT (folder));
- return NULL;
- }
- }
-
- return (CamelFolder *)folder;
-}
-
-static void
-mls_delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CamelStore *real_store;
- char *metapath, *uri;
- CamelException local_ex;
- struct _local_meta *meta;
-
- d(printf("Deleting folder: %s %s\n", ((CamelService *)store)->url->path, folder_name));
-
- camel_exception_init(&local_ex);
-
- /* find the real store for this folder, and proxy the call */
- metapath = g_strdup_printf("%s%s/local-metadata.xml", ((CamelService *)store)->url->path, folder_name);
- meta = load_metainfo(metapath);
- uri = g_strdup_printf("%s:%s%s", meta->format, ((CamelService *)store)->url->path, folder_name);
- real_store = (CamelStore *)camel_session_get_service(session, uri, CAMEL_PROVIDER_STORE, ex);
- g_free(uri);
- if (real_store == NULL) {
- g_free(metapath);
- free_metainfo(meta);
- return;
- }
-
- camel_store_delete_folder(real_store, meta->name, &local_ex);
- if (camel_exception_is_set(&local_ex)) {
- camel_exception_xfer(ex, &local_ex);
- g_free(metapath);
- free_metainfo(meta);
- return;
- }
-
- free_metainfo(meta);
-
- if (unlink(metapath) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot delete folder metadata %s: %s"),
- metapath, strerror(errno));
- }
-
- g_free(metapath);
-}
-
-static char *
-mls_get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup("local");
-
- return g_strdup("Local mail folders");
-}
-
-static void
-mls_init (MailLocalStore *mls, MailLocalStoreClass *mlsclass)
-{
- mls->folder_infos = g_hash_table_new(g_str_hash, g_str_equal);
- mls->folder_info_lock = g_mutex_new();
-}
-
-static void
-free_info(void *key, void *value, void *data)
-{
- CamelFolderInfo *info = value;
-
- camel_folder_info_free (info);
-}
-
-static void
-mls_finalise(MailLocalStore *mls)
-{
- g_hash_table_foreach(mls->folder_infos, (GHFunc)free_info, NULL);
- g_hash_table_destroy(mls->folder_infos);
- g_mutex_free(mls->folder_info_lock);
-}
-
-static void
-mls_class_init (CamelObjectClass *camel_object_class)
-{
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_object_class);
- CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_object_class);
-
- /* virtual method overload -- the bare minimum */
- camel_service_class->get_name = mls_get_name;
- camel_store_class->get_folder = mls_get_folder;
- camel_store_class->delete_folder = mls_delete_folder;
-
- local_store_parent_class = camel_type_get_global_classfuncs (CAMEL_STORE_TYPE);
-}
-
-static CamelType
-mail_local_store_get_type (void)
-{
- static CamelType mail_local_store_type = CAMEL_INVALID_TYPE;
-
- if (mail_local_store_type == CAMEL_INVALID_TYPE) {
- mail_local_store_type = camel_type_register (
- CAMEL_STORE_TYPE, "MailLocalStore",
- sizeof (MailLocalStore),
- sizeof (MailLocalStoreClass),
- (CamelObjectClassInitFunc) mls_class_init,
- NULL,
- (CamelObjectInitFunc) mls_init,
- (CamelObjectFinalizeFunc) mls_finalise);
- }
-
- return mail_local_store_type;
-}
-
-static void mail_local_store_add_folder(MailLocalStore *mls, const char *uri, const char *path, const char *name)
-{
- CamelFolderInfo *info = NULL;
- CamelURL *url;
-
- d(printf("Shell adding folder: '%s' path = '%s'\n", uri, path));
-
- url = camel_url_new(uri, NULL);
- if (url == NULL) {
- g_warning("Shell trying to add invalid folder url: %s", uri);
- return;
- }
- if (url->path == NULL || url->path[0] == 0) {
- g_warning("Shell trying to add invalid folder url: %s", uri);
- camel_url_free(url);
- return;
- }
-
- LOCAL_STORE_LOCK(mls);
-
- if (g_hash_table_lookup(mls->folder_infos, uri)) {
- g_warning("Shell trying to add a folder I already have!");
- } else {
- info = g_malloc0(sizeof(*info));
- info->url = g_strdup(uri);
- info->full_name = g_strdup(url->path+1);
- info->name = g_strdup(name);
- info->unread_message_count = -1;
- info->path = g_strdup (path);
- g_hash_table_insert(mls->folder_infos, info->url, info);
- }
-
- LOCAL_STORE_UNLOCK(mls);
-
- camel_url_free(url);
-
- if (info) {
- /* FIXME: should copy info, so we dont get a removed while we're using it? */
- camel_object_trigger_event((CamelObject *)mls, "folder_created", info);
-
- /* this is just so the folder is opened at least once to setup the folder
- counts etc in the display. Joy eh? The result is discarded. */
- mail_get_folder(uri, NULL, NULL, mail_thread_queued_slow);
- }
-}
-
-struct _search_info {
- const char *path;
- CamelFolderInfo *info;
-};
-
-static void
-remove_find_path(char *uri, CamelFolderInfo *info, struct _search_info *data)
-{
- if (!strcmp(info->path, data->path))
- data->info = info;
-}
-
-static void mail_local_store_remove_folder(MailLocalStore *mls, const char *path)
-{
- struct _search_info data = { path, NULL };
-
- /* we're keyed on uri, not path, so have to search for it manually */
-
- LOCAL_STORE_LOCK(mls);
- g_hash_table_foreach(mls->folder_infos, (GHFunc)remove_find_path, &data);
- if (data.info)
- g_hash_table_remove(mls->folder_infos, data.info->url);
- LOCAL_STORE_UNLOCK(mls);
-
- if (data.info) {
- camel_object_trigger_event((CamelObject *)mls, "folder_deleted", data.info);
-
- g_free(data.info->url);
- g_free(data.info->full_name);
- g_free(data.info->name);
- g_free(data.info);
- }
-}
-
-/* ** Local Provider ************************************************************** */
-
-static CamelProvider local_provider = {
- "file", "Local mail", NULL, "mail",
- CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_EXTERNAL,
- CAMEL_URL_NEED_PATH,
- /* ... */
-};
-
-/* There's only one "file:" store. */
-static guint
-non_hash (gconstpointer key)
-{
- return 0;
-}
-
-static gint
-non_equal (gconstpointer a, gconstpointer b)
-{
- return TRUE;
-}
-
-static void
-mail_local_provider_init (void)
-{
- /* Register with Camel to handle file: URLs */
- local_provider.object_types[CAMEL_PROVIDER_STORE] = MAIL_LOCAL_STORE_TYPE;
-
- local_provider.service_cache = g_hash_table_new (non_hash, non_equal);
- local_provider.url_hash = non_hash;
- local_provider.url_equal = non_equal;
- camel_session_register_provider (session, &local_provider);
-}
-
-/* ** Local Storage Listener ****************************************************** */
-
-static void
-local_storage_destroyed_cb (EvolutionStorageListener *storage_listener,
- void *data)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (data, &ev);
- CORBA_exception_free (&ev);
-}
-
-
-static void
-local_storage_new_folder_cb (EvolutionStorageListener *storage_listener,
- const char *path,
- const GNOME_Evolution_Folder *folder,
- void *data)
-{
- if (strcmp (folder->type, "mail") != 0)
- return;
-
- d(printf("Local folder new:\n"));
- d(printf(" path = '%s'\n uri = '%s'\n display = '%s'\n",
- path, folder->physicalUri, folder->displayName));
-
- mail_local_store_add_folder(global_local_store, folder->physicalUri, path, folder->displayName);
-
- /* are we supposed to say anything about it? */
-}
-
-
-static void
-local_storage_removed_folder_cb (EvolutionStorageListener *storage_listener,
- const char *path,
- void *data)
-{
- d(printf("Local folder remove:\n"));
- d(printf(" path = '%s'\n", path));
-
- mail_local_store_remove_folder(global_local_store, path);
-}
-
-static void
-storage_listener_startup (EvolutionShellClient *shellclient)
-{
- EvolutionStorageListener *local_storage_listener;
- GNOME_Evolution_StorageListener corba_local_storage_listener;
- GNOME_Evolution_Storage corba_storage;
- CORBA_Environment ev;
-
- d(printf("---- CALLING STORAGE LISTENER STARTUP ---\n"));
-
- local_corba_storage = corba_storage = evolution_shell_client_get_local_storage (shellclient);
- if (corba_storage == CORBA_OBJECT_NIL) {
- g_warning ("No local storage available from shell client!");
- return;
- }
-
- /* setup to record this store's changes */
- mail_note_store((CamelStore *)global_local_store, NULL, local_corba_storage, NULL, NULL);
-
- local_storage_listener = evolution_storage_listener_new ();
- corba_local_storage_listener = evolution_storage_listener_corba_objref (
- local_storage_listener);
-
- gtk_signal_connect (GTK_OBJECT (local_storage_listener),
- "destroyed",
- GTK_SIGNAL_FUNC (local_storage_destroyed_cb),
- corba_storage);
- gtk_signal_connect (GTK_OBJECT (local_storage_listener),
- "new_folder",
- GTK_SIGNAL_FUNC (local_storage_new_folder_cb),
- corba_storage);
- gtk_signal_connect (GTK_OBJECT (local_storage_listener),
- "removed_folder",
- GTK_SIGNAL_FUNC (local_storage_removed_folder_cb),
- corba_storage);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Storage_addListener (corba_storage,
- corba_local_storage_listener, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Cannot add a listener to the Local Storage.");
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
-}
-
-/* ** The rest ******************************************************************** */
-
-void
-mail_local_storage_startup (EvolutionShellClient *shellclient, const char *evolution_path)
-{
- mail_local_provider_init ();
-
- global_local_store = MAIL_LOCAL_STORE(camel_session_get_service (session, "file:/", CAMEL_PROVIDER_STORE, NULL));
-
- if (!global_local_store) {
- g_warning ("No local store!");
- return;
- }
-
- storage_listener_startup (shellclient);
-}
-
-
-/*----------------------------------------------------------------------
- * Local folder reconfiguration stuff
- *----------------------------------------------------------------------*/
-
-/*
- open new
- copy old->new
- close old
- rename old oldsave
- rename new old
- open oldsave
- delete oldsave
-
- close old
- rename oldtmp
- open new
- open oldtmp
- copy oldtmp new
- close oldtmp
- close oldnew
-
-*/
-
-/* we should have our own progress bar for this */
-
-struct _reconfigure_msg {
- struct _mail_msg msg;
-
- FolderBrowser *fb;
- char *newtype;
- GtkWidget *frame;
- GtkWidget *apply;
- GtkWidget *cancel;
- GtkOptionMenu *optionlist;
- CamelFolder *folder_out;
-};
-
-/* hash table of folders that the user has a reconfig-folder dialog for */
-static GHashTable *reconfigure_folder_hash = NULL;
-
-static char *
-reconfigure_folder_describe (struct _mail_msg *mm, int done)
-{
- struct _reconfigure_msg *m = (struct _reconfigure_msg *)mm;
-
- return g_strdup_printf (_("Changing folder \"%s\" to \"%s\" format"),
- m->fb->uri,
- m->newtype);
-}
-
-static void
-reconfigure_folder_reconfigure (struct _mail_msg *mm)
-{
- struct _reconfigure_msg *m = (struct _reconfigure_msg *)mm;
- CamelFolder *local_folder = NULL;
-
- d(printf("reconfiguring folder: %s to type %s\n", m->fb->uri, m->newtype));
-
- if (strncmp (m->fb->uri, "file:", 5)) {
- camel_exception_setv (&mm->ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("%s may not be reconfigured because it is not a local folder"),
- m->fb->uri);
- return;
- }
-
- local_folder = mail_tool_uri_to_folder (m->fb->uri, &mm->ex);
- if (camel_exception_is_set (&mm->ex)) {
- g_warning ("Can't resolve URI \"%s\" for reconfiguration!", m->fb->uri);
- return;
- }
-
- mail_local_folder_reconfigure (MAIL_LOCAL_FOLDER (local_folder), m->newtype, &mm->ex);
- m->folder_out = local_folder;
-}
-
-static void
-reconfigure_folder_reconfigured (struct _mail_msg *mm)
-{
- struct _reconfigure_msg *m = (struct _reconfigure_msg *)mm;
- /*char *uri;*/
-
- if (camel_exception_is_set (&mm->ex)) {
- gnome_error_dialog (_("If you can no longer open this mailbox, then\n"
- "you may need to repair it manually."));
- }
-
- message_list_set_folder (m->fb->message_list, m->folder_out, FALSE);
-}
-
-static void
-reconfigure_folder_free (struct _mail_msg *mm)
-{
- struct _reconfigure_msg *m = (struct _reconfigure_msg *)mm;
-
- /* remove this folder from our hash since we are done with it */
- g_hash_table_remove (reconfigure_folder_hash, m->fb->folder);
- if (g_hash_table_size (reconfigure_folder_hash) == 0) {
- /* additional cleanup */
- g_hash_table_destroy (reconfigure_folder_hash);
- reconfigure_folder_hash = NULL;
- }
-
- if (m->folder_out)
- camel_object_unref (CAMEL_OBJECT (m->folder_out));
- gtk_object_unref (GTK_OBJECT (m->fb));
- g_free (m->newtype);
-}
-
-static struct _mail_msg_op reconfigure_folder_op = {
- reconfigure_folder_describe,
- reconfigure_folder_reconfigure,
- reconfigure_folder_reconfigured,
- reconfigure_folder_free,
-};
-
-static void
-reconfigure_clicked (GnomeDialog *dialog, int button, struct _reconfigure_msg *m)
-{
- if (button == 0) {
- GtkWidget *menu, *item;
-
- /* hack to clear the message list during update */
- /* we need to do this because the message list caches
- * CamelMessageInfos from the old folder. */
- message_list_set_folder(m->fb->message_list, NULL, FALSE);
-
- menu = gtk_option_menu_get_menu(m->optionlist);
- item = gtk_menu_get_active(GTK_MENU(menu));
- m->newtype = g_strdup(gtk_object_get_data((GtkObject *)item, "type"));
-
- gtk_widget_set_sensitive (m->frame, FALSE);
- gtk_widget_set_sensitive (m->apply, FALSE);
- gtk_widget_set_sensitive (m->cancel, FALSE);
-
- e_thread_put (mail_thread_queued, (EMsg *)m);
- } else
- mail_msg_free ((struct _mail_msg *)m);
-
- if (button != -1)
- gnome_dialog_close (dialog);
-}
-
-void
-mail_local_reconfigure_folder (FolderBrowser *fb)
-{
- GladeXML *gui;
- GnomeDialog *gd;
- struct _reconfigure_msg *m;
- char *title;
- GList *p;
- GtkWidget *menu;
- char *currentformat;
- int index=0, history=0;
-
- if (fb->folder == NULL) {
- g_warning ("Trying to reconfigure nonexistant folder");
- return;
- }
-
- if (!reconfigure_folder_hash)
- reconfigure_folder_hash = g_hash_table_new (NULL, NULL);
-
- if ((gd = g_hash_table_lookup (reconfigure_folder_hash, fb->folder))) {
- gdk_window_raise (GTK_WIDGET (gd)->window);
- return;
- }
-
- /* check if we can work on this folder */
- if (!MAIL_IS_LOCAL_FOLDER (fb->folder)) {
- e_notice (NULL, GNOME_MESSAGE_BOX_WARNING,
- _("You cannot change the format of a non-local folder."));
- return;
- }
-
- m = mail_msg_new (&reconfigure_folder_op, NULL, sizeof (*m));
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/local-config.glade", "dialog_format");
- gd = (GnomeDialog *)glade_xml_get_widget (gui, "dialog_format");
-
- title = g_strdup_printf (_("Reconfigure /%s"),
- camel_folder_get_full_name (fb->folder));
- gtk_window_set_title (GTK_WINDOW (gd), title);
- g_free (title);
-
- m->frame = glade_xml_get_widget (gui, "frame_format");
- m->apply = glade_xml_get_widget (gui, "apply_format");
- m->cancel = glade_xml_get_widget (gui, "cancel_format");
- m->optionlist = (GtkOptionMenu *)glade_xml_get_widget (gui, "option_format");
- m->newtype = NULL;
- m->fb = fb;
- m->folder_out = NULL;
- gtk_object_ref (GTK_OBJECT (fb));
-
- /* dynamically create the folder type list from camel */
- /* we assume the list is static and never freed */
- currentformat = MAIL_LOCAL_FOLDER (fb->folder)->meta->format;
- p = camel_session_list_providers(session, TRUE);
- menu = gtk_menu_new();
- while (p) {
- CamelProvider *cp = p->data;
-
- /* we only want local providers */
- if (cp->flags & CAMEL_PROVIDER_IS_LOCAL) {
- GtkWidget *item;
- char *label;
-
- if (strcmp(cp->protocol, currentformat) == 0)
- history = index;
-
- label = g_strdup_printf("%s (%s)", cp->protocol, _(cp->name));
- item = gtk_menu_item_new_with_label(label);
- g_free(label);
- gtk_object_set_data((GtkObject *)item, "type", cp->protocol);
- gtk_widget_show(item);
- gtk_menu_append(GTK_MENU(menu), item);
- index++;
- }
- p = p->next;
- }
- gtk_option_menu_remove_menu (GTK_OPTION_MENU(m->optionlist));
- gtk_option_menu_set_menu (GTK_OPTION_MENU(m->optionlist), menu);
- gtk_option_menu_set_history(GTK_OPTION_MENU(m->optionlist), history);
-
- gtk_label_set_text ((GtkLabel *)glade_xml_get_widget (gui, "label_format"),
- MAIL_LOCAL_FOLDER (fb->folder)->meta->format);
-
- gtk_signal_connect (GTK_OBJECT (gd), "clicked", reconfigure_clicked, m);
- gtk_object_unref (GTK_OBJECT (gui));
-
- g_hash_table_insert (reconfigure_folder_hash, (gpointer) fb->folder, (gpointer) gd);
-
- gnome_dialog_run (GNOME_DIALOG (gd));
-}
diff --git a/mail/mail-local.h b/mail/mail-local.h
deleted file mode 100644
index 54950a38b3..0000000000
--- a/mail/mail-local.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-local.h: Local mailbox support. */
-
-/*
- * Authors:
- * Michael Zucchi <NotZed@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2000 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 _MAIL_LOCAL_H
-#define _MAIL_LOCAL_H
-
-#include "evolution-shell-client.h"
-#include "folder-browser.h"
-
-void mail_local_storage_startup (EvolutionShellClient *shellclient,
- const char *evolution_path);
-
-void mail_local_reconfigure_folder (FolderBrowser *fb);
-
-#endif
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
deleted file mode 100644
index 58b43c3b2e..0000000000
--- a/mail/mail-mt.c
+++ /dev/null
@@ -1,992 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <unistd.h>
-#include <pthread.h>
-
-#include <glib.h>
-
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkcheckbutton.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-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "folder-browser-factory.h"
-#include "e-util/e-msgport.h"
-#include "camel/camel-operation.h"
-
-#include "evolution-activity-client.h"
-
-#include "mail-config.h"
-#include "camel/camel-url.h"
-#include "mail-mt.h"
-
-/*#define MALLOC_CHECK*/
-#define d(x)
-
-static void set_stop(int sensitive);
-static void mail_enable_stop(void);
-static void mail_disable_stop(void);
-static void mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void *data);
-
-#define MAIL_MT_LOCK(x) pthread_mutex_lock(&x)
-#define MAIL_MT_UNLOCK(x) pthread_mutex_unlock(&x)
-
-extern EvolutionShellClient *global_shell_client;
-
-/* background operation status stuff */
-struct _mail_msg_priv {
- int activity_state; /* sigh sigh sigh, we need to keep track of the state external to the
- pointer itself for locking/race conditions */
- EvolutionActivityClient *activity;
-};
-
-/* This is used for the mail status bar, cheap and easy */
-#include "art/mail-new.xpm"
-
-static GdkPixbuf *progress_icon[2] = { NULL, NULL };
-
-/* mail_msg stuff */
-static unsigned int mail_msg_seq; /* sequence number of each message */
-static GHashTable *mail_msg_active; /* table of active messages, must hold mail_msg_lock to access */
-static pthread_mutex_t mail_msg_lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t mail_msg_cond = PTHREAD_COND_INITIALIZER;
-
-pthread_t mail_gui_thread;
-
-static void mail_msg_destroy(EThread *e, EMsg *msg, void *data);
-
-void *mail_msg_new(mail_msg_op_t *ops, EMsgPort *reply_port, size_t size)
-{
- struct _mail_msg *msg;
-
- MAIL_MT_LOCK(mail_msg_lock);
-
- msg = g_malloc0(size);
- msg->ops = ops;
- msg->seq = mail_msg_seq++;
- msg->msg.reply_port = reply_port;
- msg->cancel = camel_operation_new(mail_operation_status, (void *)msg->seq);
- camel_exception_init(&msg->ex);
- msg->priv = g_malloc0(sizeof(*msg->priv));
-
- g_hash_table_insert(mail_msg_active, (void *)msg->seq, msg);
-
- d(printf("New message %p\n", msg));
-
- MAIL_MT_UNLOCK(mail_msg_lock);
-
- return msg;
-}
-
-/* either destroy the progress (in event_data), or the whole dialogue (in data) */
-static void destroy_objects(CamelObject *o, void *event_data, void *data)
-{
- if (event_data)
- gtk_object_unref(event_data);
-}
-
-#ifdef MALLOC_CHECK
-#include <mcheck.h>
-
-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
-
-void mail_msg_free(void *msg)
-{
- struct _mail_msg *m = msg;
- void *activity = NULL;
-
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
- d(printf("Free message %p\n", msg));
-
- if (m->ops->destroy_msg)
- m->ops->destroy_msg(m);
-
- MAIL_MT_LOCK(mail_msg_lock);
-
- g_hash_table_remove(mail_msg_active, (void *)m->seq);
- pthread_cond_broadcast(&mail_msg_cond);
-
- /* We need to make sure we dont lose a reference here YUCK YUCK */
- /* This is tightly integrated with the code in do_op_status,
- as it closely relates to the CamelOperation setup in msg_new() above */
- if (m->priv->activity_state == 1) {
- m->priv->activity_state = 3; /* tell the other thread
- * to free it itself (yuck yuck) */
- MAIL_MT_UNLOCK(mail_msg_lock);
- return;
- } else {
- activity = m->priv->activity;
- }
-
- MAIL_MT_UNLOCK(mail_msg_lock);
-
- camel_operation_unref(m->cancel);
- camel_exception_clear(&m->ex);
- /*g_free(m->priv->what);*/
- g_free(m->priv);
- g_free(m);
-
- if (activity)
- mail_proxy_event(destroy_objects, NULL, activity, NULL);
-}
-
-/* hash table of ops->dialogue of active errors */
-static GHashTable *active_errors = NULL;
-
-static void error_gone(GtkObject *o, void *data)
-{
- g_hash_table_remove(active_errors, data);
-}
-
-void mail_msg_check_error(void *msg)
-{
- struct _mail_msg *m = msg;
- char *what = NULL;
- char *text;
- GnomeDialog *gd;
-
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
-
- if (!camel_exception_is_set(&m->ex)
- || m->ex.id == CAMEL_EXCEPTION_USER_CANCEL)
- return;
-
- if (active_errors == NULL)
- active_errors = g_hash_table_new(NULL, NULL);
-
- if (m->ops->describe_msg)
- what = m->ops->describe_msg(m, FALSE);
-
- if (what) {
- text = g_strdup_printf(_("Error while '%s':\n%s"), what, camel_exception_get_description(&m->ex));
- g_free (what);
- } else
- text = g_strdup_printf(_("Error while performing operation:\n%s"), camel_exception_get_description(&m->ex));
-
- /* check to see if we have dialogue already running for this operation */
- /* we key on the operation pointer, which is at least accurate enough
- for the operation type, although it could be on a different object. */
- if (g_hash_table_lookup(active_errors, m->ops)) {
- g_warning("Error occured while existing dialogue active:\n%s", text);
- g_free(text);
- return;
- }
-
- gd = (GnomeDialog *)gnome_error_dialog(text);
- g_hash_table_insert(active_errors, m->ops, gd);
- g_free(text);
- gtk_signal_connect((GtkObject *)gd, "destroy", error_gone, m->ops);
- gnome_dialog_set_close(gd, TRUE);
- gtk_widget_show((GtkWidget *)gd);
-}
-
-void mail_msg_cancel(unsigned int msgid)
-{
- struct _mail_msg *m;
-
- MAIL_MT_LOCK(mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active, (void *)msgid);
-
- if (m)
- camel_operation_cancel(m->cancel);
-
- MAIL_MT_UNLOCK(mail_msg_lock);
-}
-
-
-/* waits for a message to be finished processing (freed)
- the messageid is from struct _mail_msg->seq */
-void mail_msg_wait(unsigned int msgid)
-{
- struct _mail_msg *m;
- int ismain = pthread_self() == mail_gui_thread;
-
- if (ismain) {
- MAIL_MT_LOCK(mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active, (void *)msgid);
- while (m) {
- MAIL_MT_UNLOCK(mail_msg_lock);
- gtk_main_iteration();
- MAIL_MT_LOCK(mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active, (void *)msgid);
- }
- MAIL_MT_UNLOCK(mail_msg_lock);
- } else {
- MAIL_MT_LOCK(mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active, (void *)msgid);
- while (m) {
- pthread_cond_wait(&mail_msg_cond, &mail_msg_lock);
- m = g_hash_table_lookup(mail_msg_active, (void *)msgid);
- }
- MAIL_MT_UNLOCK(mail_msg_lock);
- }
-}
-
-void mail_msg_wait_all(void)
-{
- int ismain = pthread_self() == mail_gui_thread;
-
- if (ismain) {
- MAIL_MT_LOCK(mail_msg_lock);
- while (g_hash_table_size(mail_msg_active) > 0) {
- MAIL_MT_UNLOCK(mail_msg_lock);
- gtk_main_iteration();
- MAIL_MT_LOCK(mail_msg_lock);
- }
- MAIL_MT_UNLOCK(mail_msg_lock);
- } else {
- MAIL_MT_LOCK(mail_msg_lock);
- while (g_hash_table_size(mail_msg_active) > 0) {
- pthread_cond_wait(&mail_msg_cond, &mail_msg_lock);
- }
- MAIL_MT_UNLOCK(mail_msg_lock);
- }
-}
-
-EMsgPort *mail_gui_port;
-static GIOChannel *mail_gui_channel;
-EMsgPort *mail_gui_reply_port;
-static GIOChannel *mail_gui_reply_channel;
-
-/* a couple of global threads available */
-EThread *mail_thread_queued; /* for operations that can (or should) be queued */
-EThread *mail_thread_queued_slow; /* for operations that can (or should) be queued, but take a long time */
-EThread *mail_thread_new; /* for operations that should run in a new thread each time */
-
-static gboolean
-mail_msgport_replied(GIOChannel *source, GIOCondition cond, void *d)
-{
- EMsgPort *port = (EMsgPort *)d;
- mail_msg_t *m;
-
- while (( m = (mail_msg_t *)e_msgport_get(port))) {
-
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
-
- if (m->ops->reply_msg)
- m->ops->reply_msg(m);
- mail_msg_check_error(m);
- mail_msg_free(m);
- }
-
- return TRUE;
-}
-
-static gboolean
-mail_msgport_received(GIOChannel *source, GIOCondition cond, void *d)
-{
- EMsgPort *port = (EMsgPort *)d;
- mail_msg_t *m;
-
- while (( m = (mail_msg_t *)e_msgport_get(port))) {
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
-
- if (m->ops->receive_msg)
- m->ops->receive_msg(m);
- if (m->msg.reply_port)
- e_msgport_reply((EMsg *)m);
- else {
- if (m->ops->reply_msg)
- m->ops->reply_msg(m);
- mail_msg_free(m);
- }
- }
-
- return TRUE;
-}
-
-static void
-mail_msg_destroy(EThread *e, EMsg *msg, void *data)
-{
- mail_msg_t *m = (mail_msg_t *)msg;
-
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
-
- mail_msg_free(m);
-}
-
-static void
-mail_msg_received(EThread *e, EMsg *msg, void *data)
-{
- mail_msg_t *m = (mail_msg_t *)msg;
-
-#ifdef MALLOC_CHECK
- checkmem(m);
- checkmem(m->cancel);
- checkmem(m->priv);
-#endif
-
- if (m->ops->describe_msg) {
- char *text = m->ops->describe_msg(m, FALSE);
-
- d(printf("message received at thread\n"));
- camel_operation_register(m->cancel);
- camel_operation_start(m->cancel, "%s", text);
- g_free(text);
- }
-
- if (m->ops->receive_msg) {
- mail_enable_stop();
- m->ops->receive_msg(m);
- mail_disable_stop();
- }
-
- if (m->ops->describe_msg) {
- camel_operation_end(m->cancel);
- camel_operation_unregister(m->cancel);
- }
-}
-
-void mail_msg_cleanup(void)
-{
- mail_msg_wait_all();
-
- e_thread_destroy(mail_thread_queued_slow);
- e_thread_destroy(mail_thread_queued);
- e_thread_destroy(mail_thread_new);
-
- g_io_channel_unref(mail_gui_channel);
- g_io_channel_unref(mail_gui_reply_channel);
-
- e_msgport_destroy(mail_gui_port);
- e_msgport_destroy(mail_gui_reply_port);
-}
-
-void mail_msg_init(void)
-{
- mail_gui_reply_port = e_msgport_new();
- mail_gui_reply_channel = g_io_channel_unix_new(e_msgport_fd(mail_gui_reply_port));
- g_io_add_watch(mail_gui_reply_channel, G_IO_IN, mail_msgport_replied, mail_gui_reply_port);
-
- mail_gui_port = e_msgport_new();
- mail_gui_channel = g_io_channel_unix_new(e_msgport_fd(mail_gui_port));
- g_io_add_watch(mail_gui_channel, G_IO_IN, mail_msgport_received, mail_gui_port);
-
- mail_thread_queued = e_thread_new(E_THREAD_QUEUE);
- e_thread_set_msg_destroy(mail_thread_queued, mail_msg_destroy, 0);
- e_thread_set_msg_received(mail_thread_queued, mail_msg_received, 0);
- e_thread_set_reply_port(mail_thread_queued, mail_gui_reply_port);
-
- mail_thread_queued_slow = e_thread_new(E_THREAD_QUEUE);
- e_thread_set_msg_destroy(mail_thread_queued_slow, mail_msg_destroy, 0);
- e_thread_set_msg_received(mail_thread_queued_slow, mail_msg_received, 0);
- e_thread_set_reply_port(mail_thread_queued_slow, mail_gui_reply_port);
-
- mail_thread_new = e_thread_new(E_THREAD_NEW);
- e_thread_set_msg_destroy(mail_thread_new, mail_msg_destroy, 0);
- e_thread_set_msg_received(mail_thread_new, mail_msg_received, 0);
- e_thread_set_reply_port(mail_thread_new, mail_gui_reply_port);
- e_thread_set_queue_limit(mail_thread_new, 10);
-
- mail_msg_active = g_hash_table_new(NULL, NULL);
- mail_gui_thread = pthread_self();
-}
-
-/* ********************************************************************** */
-
-/* locks */
-static pthread_mutex_t status_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/* ********************************************************************** */
-
-struct _pass_msg {
- struct _mail_msg msg;
- const char *prompt;
- gboolean secret;
- gboolean *cache;
- char *result;
- char *service_url;
- GtkWidget *check;
-};
-
-static void
-pass_got (char *string, void *data)
-{
- struct _pass_msg *m = data;
-
- if (string) {
- MailConfigService *service = NULL;
- const MailConfigAccount *mca;
- gboolean remember;
-
- m->result = g_strdup (string);
-
- remember = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (m->check));
- if (m->service_url) {
- mca = mail_config_get_account_by_source_url (m->service_url);
- if (mca) {
- service = mca->source;
- } else {
- mca = mail_config_get_account_by_transport_url (m->service_url);
- if (mca)
- service = mca->transport;
- }
-
- if (service)
- mail_config_service_set_save_passwd (service, remember);
-
- if (mca) {
- mail_config_service_set_save_passwd (service, remember);
-
- /* set `remember' to TRUE because people don't want to have to
- re-enter their passwords for this session even if they told
- us not to cache their passwords in the dialog...*sigh* */
- remember = TRUE;
- }
- }
-
- if (m->cache)
- *(m->cache) = remember;
- }
-}
-
-static void
-do_get_pass (struct _mail_msg *mm)
-{
- struct _pass_msg *m = (struct _pass_msg *)mm;
- const MailConfigAccount *mca = NULL;
- GtkWidget *dialogue;
- GtkWidget *check, *entry;
- GList *children, *iter;
- gboolean show;
- char *title;
-
- /* this api is just awful ... hence the hacks */
- dialogue = gnome_request_dialog (m->secret, m->prompt, NULL,
- 0, pass_got, m, NULL);
-
- /* Remember the password? */
- check = gtk_check_button_new_with_label (m->service_url ? _("Remember this password") :
- _("Remember this password for the remainder of this session"));
- show = TRUE;
-
- if (m->service_url) {
- mca = mail_config_get_account_by_source_url (m->service_url);
- if (mca)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), mca->source->save_passwd);
- else {
- mca = mail_config_get_account_by_transport_url (m->service_url);
- if (mca)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), mca->transport->save_passwd);
- else {
- d(printf ("Cannot figure out which account owns URL \"%s\"\n", m->service_url));
- show = FALSE;
- }
- }
- }
-
- if (show)
- gtk_widget_show (check);
-
- /* do some dirty stuff to put the checkbutton after the entry */
- entry = NULL;
- children = gtk_container_children (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox));
-
- for (iter = children; iter; iter = iter->next) {
- if (GTK_IS_ENTRY (iter->data)) {
- entry = GTK_WIDGET (iter->data);
- break;
- }
- }
-
- g_list_free (children);
-
- if (entry) {
- gtk_object_ref (GTK_OBJECT (entry));
- gtk_container_remove (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox), entry);
- }
-
- gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox),
- check, TRUE, FALSE, 0);
-
- if (entry) {
- gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), entry, TRUE, FALSE, 0);
- gtk_widget_grab_focus (entry);
- gtk_object_unref (GTK_OBJECT (entry));
- }
-
- m->check = check;
-
- /* hrm, we can't run this async since the gui_port from which we're called
- will reply to our message for us */
-
- if (mca) {
- char *name;
-
- name = e_utf8_to_gtk_string (GTK_WIDGET (dialogue), mca->name);
- title = g_strdup_printf (_("Enter Password for %s"), name);
- g_free (name);
- } else
- title = g_strdup (_("Enter Password"));
-
- gtk_window_set_title (GTK_WINDOW (dialogue), title);
- g_free (title);
-
- gnome_dialog_run_and_close ((GnomeDialog *)dialogue);
-
- /*gtk_widget_show(dialogue);*/
-}
-
-static void
-do_free_pass(struct _mail_msg *mm)
-{
- /*struct _pass_msg *m = (struct _pass_msg *)mm;*/
-
- /* the string is passed out so we dont need to free it */
-}
-
-struct _mail_msg_op get_pass_op = {
- NULL,
- do_get_pass,
- NULL,
- do_free_pass,
-};
-
-/* returns the password, or NULL if cancelled */
-char *
-mail_get_password (CamelService *service, const char *prompt, gboolean secret, gboolean *cache)
-{
- char *ret;
- struct _pass_msg *m, *r;
- EMsgPort *pass_reply;
-
- pass_reply = e_msgport_new ();
-
- m = mail_msg_new (&get_pass_op, pass_reply, sizeof (struct _pass_msg));
-
- m->prompt = prompt;
- m->secret = secret;
- m->cache = cache;
- if (service) {
- m->service_url = camel_url_to_string (service->url, CAMEL_URL_HIDE_ALL);
- } else
- m->service_url = NULL;
-
- if (pthread_self () == mail_gui_thread) {
- do_get_pass ((struct _mail_msg *)m);
- r = m;
- } else {
- static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-
- /* we want this single-threaded, this is the easiest way to do it without blocking ? */
- pthread_mutex_lock (&lock);
- e_msgport_put (mail_gui_port, (EMsg *)m);
- e_msgport_wait (pass_reply);
- r = (struct _pass_msg *)e_msgport_get (pass_reply);
- pthread_mutex_unlock (&lock);
- }
-
- g_assert (r == m);
-
- ret = m->result;
-
- g_free (m->service_url);
- mail_msg_free (m);
- e_msgport_destroy (pass_reply);
-
- return ret;
-}
-
-/* ******************** */
-
-/* ********************************************************************** */
-
-struct _user_message_msg {
- struct _mail_msg msg;
- const char *type;
- const char *prompt;
- gboolean allow_cancel;
- gboolean result;
-};
-
-static void
-do_user_message (struct _mail_msg *mm)
-{
- struct _user_message_msg *m = (struct _user_message_msg *)mm;
- int dialog_result;
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (m->prompt, m->type,
- GNOME_STOCK_BUTTON_OK,
- m->allow_cancel ? GNOME_STOCK_BUTTON_CANCEL : NULL,
- NULL);
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 1);
- gtk_window_set_policy (GTK_WINDOW (dialog), TRUE, TRUE, TRUE);
-
- /* hrm, we can't run this async since the gui_port from which we're called
- will reply to our message for us */
- dialog_result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- if (dialog_result == -1 || dialog_result == 1)
- m->result = FALSE;
- else
- m->result = TRUE;
-}
-
-struct _mail_msg_op user_message_op = {
- NULL,
- do_user_message,
- NULL,
- NULL,
-};
-
-/* prompt the user with a yes/no question and return the response */
-gboolean
-mail_user_message (const char *type, const char *prompt, gboolean allow_cancel)
-{
- struct _user_message_msg *m, *r;
- EMsgPort *user_message_reply;
- gboolean accept;
-
- user_message_reply = e_msgport_new ();
-
- m = mail_msg_new (&user_message_op, user_message_reply, sizeof (*m));
-
- m->type = type;
- m->prompt = prompt;
- m->allow_cancel = allow_cancel;
-
- if (pthread_self () == mail_gui_thread) {
- do_user_message ((struct _mail_msg *)m);
- r = m;
- } else {
- static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-
- /* we want this single-threaded, this is the easiest way to do it without blocking ? */
- pthread_mutex_lock (&lock);
- e_msgport_put (mail_gui_port, (EMsg *)m);
- e_msgport_wait (user_message_reply);
- r = (struct _user_message_msg *)e_msgport_get (user_message_reply);
- pthread_mutex_unlock (&lock);
- }
-
- g_assert (r == m);
-
- accept = m->result;
-
- mail_msg_free (m);
- e_msgport_destroy (user_message_reply);
-
- return accept;
-}
-
-/* ******************** */
-
-struct _proxy_msg {
- struct _mail_msg msg;
- CamelObjectEventHookFunc func;
- CamelObject *o;
- void *event_data;
- void *data;
-};
-
-static void
-do_proxy_event(struct _mail_msg *mm)
-{
- struct _proxy_msg *m = (struct _proxy_msg *)mm;
-
- m->func(m->o, m->event_data, m->data);
-}
-
-struct _mail_msg_op proxy_event_op = {
- NULL,
- do_proxy_event,
- NULL,
- NULL,
-};
-
-int mail_proxy_event(CamelObjectEventHookFunc func, CamelObject *o, void *event_data, void *data)
-{
- struct _proxy_msg *m;
- int id;
- int ismain = pthread_self() == mail_gui_thread;
-
- if (ismain) {
- func(o, event_data, data);
- /* id of -1 is 'always finished' */
- return -1;
- } else {
- /* we dont have a reply port for this, we dont care when/if it gets executed, just queue it */
- m = mail_msg_new(&proxy_event_op, NULL, sizeof(*m));
- m->func = func;
- m->o = o;
- m->event_data = event_data;
- m->data = data;
-
- id = m->msg.seq;
- e_msgport_put(mail_gui_port, (EMsg *)m);
- return id;
- }
-}
-
-/* ********************************************************************** */
-/* locked via status_lock */
-static int busy_state;
-
-static void do_set_busy(struct _mail_msg *mm)
-{
- set_stop(busy_state > 0);
-}
-
-struct _mail_msg_op set_busy_op = {
- NULL,
- do_set_busy,
- NULL,
- NULL,
-};
-
-static void mail_enable_stop(void)
-{
- struct _mail_msg *m;
-
- MAIL_MT_LOCK(status_lock);
- busy_state++;
- if (busy_state == 1) {
- m = mail_msg_new(&set_busy_op, NULL, sizeof(*m));
- e_msgport_put(mail_gui_port, (EMsg *)m);
- }
- MAIL_MT_UNLOCK(status_lock);
-}
-
-static void mail_disable_stop(void)
-{
- struct _mail_msg *m;
-
- MAIL_MT_LOCK(status_lock);
- busy_state--;
- if (busy_state == 0) {
- m = mail_msg_new(&set_busy_op, NULL, sizeof(*m));
- e_msgport_put(mail_gui_port, (EMsg *)m);
- }
- MAIL_MT_UNLOCK(status_lock);
-}
-
-/* ******************************************************************************** */
-
-struct _op_status_msg {
- struct _mail_msg msg;
-
- struct _CamelOperation *op;
- char *what;
- int pc;
- void *data;
-};
-
-static void do_op_status(struct _mail_msg *mm)
-{
- struct _op_status_msg *m = (struct _op_status_msg *)mm;
- struct _mail_msg *msg;
- struct _mail_msg_priv *data;
- char *out, *p, *o, c;
- int pc;
- EvolutionActivityClient *activity;
-
- g_assert (mail_gui_thread == pthread_self ());
-
- MAIL_MT_LOCK (mail_msg_lock);
-
- msg = g_hash_table_lookup (mail_msg_active, m->data);
- if (msg == NULL) {
- MAIL_MT_UNLOCK (mail_msg_lock);
- return;
- }
-
- data = msg->priv;
-
- out = alloca (strlen (m->what) * 2 + 1);
- o = out;
- p = m->what;
- while ((c = *p++)) {
- if (c == '%')
- *o++ = '%';
- *o++ = c;
- }
- *o = 0;
-
- pc = m->pc;
-
- /* so whats all this crap about:
- * When we call activity_client, we have a chance of coming
- * back to code that will call mail_msg_new or one of many
- * calls which may deadlock us. So we need to call corba
- * outside of the lock. The activity_state thing is so we can
- * properly lock data->activity without having to hold a lock
- * ... of course we have to be careful in the free function to
- * keep track of it too.
- */
- if (data->activity == NULL && global_shell_client) {
- char *clientid, *what;
- int display;
-
- /* its being created/removed? well leave it be */
- if (data->activity_state == 1 || data->activity_state == 3) {
- MAIL_MT_UNLOCK (mail_msg_lock);
- return;
- } else {
- data->activity_state = 1;
-
- if (progress_icon[0] == NULL)
- progress_icon[0] = gdk_pixbuf_new_from_xpm_data ((const char **)mail_new_xpm);
-
- MAIL_MT_UNLOCK (mail_msg_lock);
- clientid = g_strdup_printf ("%p", msg);
- if (msg->ops->describe_msg)
- what = msg->ops->describe_msg (msg, FALSE);
- else
- what = _("Working");
-
- if (global_shell_client) {
- activity = evolution_activity_client_new (global_shell_client, clientid,
- progress_icon, what, TRUE,
- &display);
- } else {
- activity = NULL;
- }
-
- if (msg->ops->describe_msg)
- g_free (what);
- g_free (clientid);
-
- MAIL_MT_LOCK (mail_msg_lock);
- if (data->activity_state == 3) {
- MAIL_MT_UNLOCK (mail_msg_lock);
- if (activity)
- gtk_object_unref (GTK_OBJECT (activity));
- camel_operation_unref (msg->cancel);
- camel_exception_clear (&msg->ex);
- g_free (msg->priv);
- g_free (msg);
- } else {
- data->activity_state = 2;
- data->activity = activity;
- MAIL_MT_UNLOCK (mail_msg_lock);
- }
- return;
- }
- }
-
- activity = data->activity;
- if (activity) {
- gtk_object_ref (GTK_OBJECT (activity));
- MAIL_MT_UNLOCK (mail_msg_lock);
-
- evolution_activity_client_update (activity, out, (double)(pc/100.0));
- gtk_object_unref (GTK_OBJECT (activity));
- }
-}
-
-static void
-do_op_status_free (struct _mail_msg *mm)
-{
- struct _op_status_msg *m = (struct _op_status_msg *)mm;
-
- g_free (m->what);
-}
-
-struct _mail_msg_op op_status_op = {
- NULL,
- do_op_status,
- NULL,
- do_op_status_free,
-};
-
-static void
-mail_operation_status (struct _CamelOperation *op, const char *what, int pc, void *data)
-{
- struct _op_status_msg *m;
-
- d(printf("got operation statys: %s %d%%\n", what, pc));
-
- m = mail_msg_new(&op_status_op, NULL, sizeof(*m));
- m->op = op;
- m->what = g_strdup(what);
- switch (pc) {
- case CAMEL_OPERATION_START:
- pc = 0;
- break;
- case CAMEL_OPERATION_END:
- pc = 100;
- break;
- }
- m->pc = pc;
- m->data = data;
- e_msgport_put(mail_gui_port, (EMsg *)m);
-}
-
-/* ******************** */
-
-static void
-set_stop(int sensitive)
-{
- EList *controls;
- EIterator *it;
- static int last = FALSE;
-
- if (last == sensitive)
- return;
-
- controls = folder_browser_factory_get_control_list ();
- for (it = e_list_get_iterator (controls); e_iterator_is_valid (it); e_iterator_next (it)) {
- BonoboControl *control;
- BonoboUIComponent *uic;
-
- control = BONOBO_CONTROL (e_iterator_get (it));
- uic = bonobo_control_get_ui_component (control);
- if (uic == CORBA_OBJECT_NIL || bonobo_ui_component_get_container(uic) == CORBA_OBJECT_NIL)
- continue;
-
- bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", sensitive?"1":"0", NULL);
- }
- gtk_object_unref(GTK_OBJECT(it));
- last = sensitive;
-}
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
deleted file mode 100644
index 07616fab50..0000000000
--- a/mail/mail-mt.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000, 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 _MAIL_MT
-#define _MAIL_MT
-
-#include <pthread.h>
-#include "camel/camel-exception.h"
-#include "e-util/e-msgport.h"
-#include "camel/camel-object.h"
-#include "camel/camel-operation.h"
-
-typedef struct _mail_msg {
- EMsg msg; /* parent type */
- struct _mail_msg_op *ops; /* operation functions */
- unsigned int seq; /* seq number for synchronisation */
- CamelOperation *cancel; /* a cancellation/status handle */
- CamelException ex; /* an initialised camel exception, upto the caller to use this */
- struct _mail_msg_priv *priv; /* private for internal use */
-} mail_msg_t;
-
-/* callback functions for thread message */
-typedef struct _mail_msg_op {
- char *(*describe_msg)(struct _mail_msg *msg, int complete);
-
- void (*receive_msg)(struct _mail_msg *msg); /* message received */
- void (*reply_msg)(struct _mail_msg *msg); /* message replied */
- void (*destroy_msg)(struct _mail_msg *msg); /* finalise message */
-} mail_msg_op_t;
-
-/* setup ports */
-void mail_msg_init(void);
-void mail_msg_cleanup (void);
-
-/* allocate a new message */
-void *mail_msg_new(mail_msg_op_t *ops, EMsgPort *reply_port, size_t size);
-void mail_msg_free(void *msg);
-void mail_msg_check_error(void *msg);
-void mail_msg_cancel(unsigned int msgid);
-void mail_msg_wait(unsigned int msgid);
-void mail_msg_wait_all(void);
-
-/* request a string/password */
-char *mail_get_password (CamelService *service, const char *prompt,
- gboolean secret, gboolean *cache);
-
-/* present information and get an ok (or possibly cancel)
- * "type" is as for gnome_message_box_new();
- */
-gboolean mail_user_message (const char *type, const char *prompt, gboolean allow_cancel);
-
-/* forward a camel event (or other call) to the gui thread */
-int mail_proxy_event(CamelObjectEventHookFunc func, CamelObject *o, void *event_data, void *data);
-
-/* a message port that receives messages in the gui thread, used for sending port */
-extern EMsgPort *mail_gui_port;
-/* a message port that receives messages in the gui thread, used for the reply port */
-extern EMsgPort *mail_gui_reply_port;
-
-/* some globally available threads */
-extern EThread *mail_thread_queued; /* for operations that can (or should) be queued */
-extern EThread *mail_thread_new; /* for operations that should run in a new thread each time */
-extern EThread *mail_thread_queued_slow; /* for operations that can (or should) be queued, but take a long time */
-
-/* The main thread. */
-extern pthread_t mail_gui_thread;
-
-
-#endif /* ! _MAIL_MT */
diff --git a/mail/mail-offline-handler.c b/mail/mail-offline-handler.c
deleted file mode 100644
index e613bb394f..0000000000
--- a/mail/mail-offline-handler.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-offline-handler.c
- *
- * 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:
- * Ettore Perazzoli <ettore@ximian.com>
- * Dan Winship <danw@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "mail-offline-handler.h"
-#include "mail.h"
-#include "mail-ops.h"
-
-#include <gtk/gtkmain.h>
-
-#include <gal/util/e-util.h>
-
-#define PARENT_TYPE bonobo_x_object_get_type ()
-static BonoboXObjectClass *parent_class = NULL;
-
-struct _MailOfflineHandlerPrivate {
- GNOME_Evolution_OfflineProgressListener listener_interface;
-};
-
-static gboolean
-service_is_relevant (CamelService *service, gboolean going_offline)
-{
- if (!(service->provider->flags & CAMEL_PROVIDER_IS_REMOTE) ||
- (service->provider->flags & CAMEL_PROVIDER_IS_EXTERNAL))
- return FALSE;
-
- if (CAMEL_IS_DISCO_STORE (service) && going_offline &&
- camel_disco_store_status (CAMEL_DISCO_STORE (service)) == CAMEL_DISCO_STORE_OFFLINE)
- return FALSE;
-
- return service->status != CAMEL_SERVICE_DISCONNECTED;
-}
-
-static void
-add_connection (gpointer key, gpointer data, gpointer user_data)
-{
- CamelService *service = key;
- GNOME_Evolution_ConnectionList *list = user_data;
-
- if (!service_is_relevant (service, TRUE))
- return;
-
- list->_buffer[list->_length].hostName = CORBA_string_dup (service->url->host);
- list->_buffer[list->_length].type = CORBA_string_dup (service->provider->name);
- list->_length++;
-}
-
-static GNOME_Evolution_ConnectionList *
-create_connection_list (void)
-{
- GNOME_Evolution_ConnectionList *list;
-
- list = GNOME_Evolution_ConnectionList__alloc ();
- list->_length = 0;
- list->_maximum = mail_storages_count ();
- list->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (list->_maximum);
-
- mail_storages_foreach (add_connection, list);
-
- return list;
-}
-
-/* GNOME::Evolution::Offline methods. */
-
-static CORBA_boolean
-impl__get_isOffline (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- return !camel_session_is_online (session);
-}
-
-static void
-impl_prepareForOffline (PortableServer_Servant servant,
- GNOME_Evolution_ConnectionList **active_connection_list,
- CORBA_Environment *ev)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
-
- offline_handler = MAIL_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- *active_connection_list = create_connection_list ();
-}
-
-static void
-went_offline (CamelStore *store, void *data)
-{
- MailOfflineHandler *offline_handler = data;
- MailOfflineHandlerPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_ConnectionList *connection_list;
-
- priv = offline_handler->priv;
-
- connection_list = create_connection_list ();
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface, connection_list, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_warning ("Error updating offline progress");
-
- CORBA_exception_free (&ev);
-
- /* CORBA_free (connection_list); */
-}
-
-static void
-storage_go_offline (gpointer key, gpointer value, gpointer data)
-{
- CamelStore *store = key;
- MailOfflineHandler *offline_handler = data;
-
- if (service_is_relevant (CAMEL_SERVICE (store), TRUE))
- mail_store_set_offline (store, TRUE, went_offline, offline_handler);
-}
-
-static void
-impl_goOffline (PortableServer_Servant servant,
- const GNOME_Evolution_OfflineProgressListener progress_listener,
- CORBA_Environment *ev)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
-
- offline_handler = MAIL_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- priv->listener_interface = CORBA_Object_duplicate (progress_listener, ev);
-
- /* This will disable further auto-mail-check action. */
- camel_session_set_online (session, FALSE);
-
- /* FIXME: If send/receive active, wait for it to finish */
-
- mail_storages_foreach (storage_go_offline, offline_handler);
-}
-
-static void
-storage_go_online (gpointer key, gpointer value, gpointer data)
-{
- CamelStore *store = key;
-
- if (service_is_relevant (CAMEL_SERVICE (store), FALSE))
- mail_store_set_offline (store, FALSE, NULL, NULL);
-}
-
-static void
-impl_goOnline (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
-
- offline_handler = MAIL_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- /* Enable auto-mail-checking */
- camel_session_set_online (session, TRUE);
-
- mail_storages_foreach (storage_go_online, NULL);
-}
-
-/* GtkObject methods. */
-
-static void
-impl_destroy (GtkObject *object)
-{
- MailOfflineHandler *offline_handler;
- MailOfflineHandlerPrivate *priv;
-
- offline_handler = MAIL_OFFLINE_HANDLER (object);
- priv = offline_handler->priv;
-
- if (priv->listener_interface != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- CORBA_Object_release (priv->listener_interface, &ev);
- CORBA_exception_free (&ev);
- }
-
- g_free (priv);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-/* GTK+ type initialization. */
-
-static void
-mail_offline_handler_class_init (MailOfflineHandlerClass *klass)
-{
- GtkObjectClass *object_class;
- POA_GNOME_Evolution_Offline__epv *epv;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = impl_destroy;
-
- epv = & klass->epv;
- epv->_get_isOffline = impl__get_isOffline;
- epv->prepareForOffline = impl_prepareForOffline;
- epv->goOffline = impl_goOffline;
- epv->goOnline = impl_goOnline;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-mail_offline_handler_init (MailOfflineHandler *offline_handler)
-{
- MailOfflineHandlerPrivate *priv;
-
- priv = g_new (MailOfflineHandlerPrivate, 1);
- priv->listener_interface = CORBA_OBJECT_NIL;
-
- offline_handler->priv = priv;
-}
-
-MailOfflineHandler *
-mail_offline_handler_new (void)
-{
- MailOfflineHandler *new;
-
- new = gtk_type_new (mail_offline_handler_get_type ());
-
- return new;
-}
-
-BONOBO_X_TYPE_FUNC_FULL (MailOfflineHandler, GNOME_Evolution_Offline, PARENT_TYPE, mail_offline_handler);
diff --git a/mail/mail-offline-handler.h b/mail/mail-offline-handler.h
deleted file mode 100644
index 6026805a5a..0000000000
--- a/mail/mail-offline-handler.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-offline-handler.h
- *
- * 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.
- *
- * Author: Ettore Perazzoli <ettore@ximian.com>
- */
-
-#ifndef _MAIL_OFFLINE_HANDLER_H_
-#define _MAIL_OFFLINE_HANDLER_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-xobject.h>
-#include "Evolution.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define MAIL_TYPE_OFFLINE_HANDLER (mail_offline_handler_get_type ())
-#define MAIL_OFFLINE_HANDLER(obj) (GTK_CHECK_CAST ((obj), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandler))
-#define MAIL_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), MAIL_TYPE_OFFLINE_HANDLER, MailOfflineHandlerClass))
-#define MAIL_IS_OFFLINE_HANDLER(obj) (GTK_CHECK_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
-#define MAIL_IS_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), MAIL_TYPE_OFFLINE_HANDLER))
-
-
-typedef struct _MailOfflineHandler MailOfflineHandler;
-typedef struct _MailOfflineHandlerPrivate MailOfflineHandlerPrivate;
-typedef struct _MailOfflineHandlerClass MailOfflineHandlerClass;
-
-struct _MailOfflineHandler {
- BonoboXObject parent;
-
- MailOfflineHandlerPrivate *priv;
-};
-
-struct _MailOfflineHandlerClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Offline__epv epv;
-};
-
-
-GtkType mail_offline_handler_get_type (void);
-MailOfflineHandler *mail_offline_handler_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _MAIL_OFFLINE_HANDLER_H_ */
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
deleted file mode 100644
index 8867ecb140..0000000000
--- a/mail/mail-ops.c
+++ /dev/null
@@ -1,2148 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-ops.c: callbacks for the mail toolbar/menus */
-
-/*
- * Authors: Dan Winship <danw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- * Peter Williams <peterw@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000,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 <errno.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-#include <camel/camel-mime-filter-from.h>
-#include <camel/camel-operation.h>
-#include <camel/camel-vtrash-folder.h>
-#include <camel/camel-vee-store.h>
-#include "mail.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-#include "composer/e-msg-composer.h"
-#include "folder-browser.h"
-#include "e-util/e-html-utils.h"
-#include "e-util/e-unicode-i18n.h"
-
-#include "filter/filter-filter.h"
-
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-
-#define d(x) x
-
-/* used for both just filtering a folder + uid's, and for filtering a whole folder */
-/* used both for fetching mail, and for filtering mail */
-struct _filter_mail_msg {
- struct _mail_msg msg;
-
- CamelFolder *source_folder; /* where they come from */
- GPtrArray *source_uids; /* uids to copy, or NULL == copy all */
- CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */
- CamelOperation *cancel;
- CamelFilterDriver *driver;
- int delete; /* delete messages after filtering them? */
- CamelFolder *destination; /* default destination for any messages, NULL for none */
-};
-
-/* since fetching also filters, we subclass the data here */
-struct _fetch_mail_msg {
- struct _filter_mail_msg fmsg;
-
- CamelOperation *cancel; /* we have our own cancellation struct, the other should be empty */
- int keep; /* keep on server? */
-
- char *source_uri;
-
- void (*done)(char *source, void *data);
- void *data;
-};
-
-static char *
-filter_folder_describe (struct _mail_msg *mm, int complete)
-{
- return g_strdup (_("Filtering Folder"));
-}
-
-/* filter a folder, or a subset thereof, uses source_folder/source_uids */
-/* this is shared with fetch_mail */
-static void
-filter_folder_filter (struct _mail_msg *mm)
-{
- struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
- CamelFolder *folder;
- GPtrArray *uids, *folder_uids = NULL;
-
- if (m->cancel)
- camel_operation_register (m->cancel);
-
- folder = m->source_folder;
-
- if (folder == NULL || camel_folder_get_message_count (folder) == 0) {
- if (m->cancel)
- camel_operation_unregister (m->cancel);
- return;
- }
-
- if (m->destination) {
- camel_folder_freeze (m->destination);
- camel_filter_driver_set_default_folder (m->driver, m->destination);
- }
-
- camel_folder_freeze (folder);
-
- if (m->source_uids)
- uids = m->source_uids;
- else
- folder_uids = uids = camel_folder_get_uids (folder);
-
- camel_filter_driver_filter_folder (m->driver, folder, m->cache, uids, m->delete, &mm->ex);
-
- if (folder_uids)
- camel_folder_free_uids (folder, folder_uids);
-
- /* sync and expunge */
- if (!m->cache)
- camel_folder_sync (folder, TRUE, camel_exception_is_set (&mm->ex) ? NULL : &mm->ex);
- camel_folder_thaw (folder);
-
- if (m->destination)
- camel_folder_thaw (m->destination);
-
- if (m->cancel)
- camel_operation_unregister (m->cancel);
-}
-
-static void
-filter_folder_filtered (struct _mail_msg *mm)
-{
-}
-
-static void
-filter_folder_free (struct _mail_msg *mm)
-{
- struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
- int i;
-
- if (m->source_folder)
- camel_object_unref (CAMEL_OBJECT (m->source_folder));
-
- if (m->source_uids) {
- for (i = 0; i < m->source_uids->len; i++)
- g_free (m->source_uids->pdata[i]);
-
- g_ptr_array_free (m->source_uids, TRUE);
- }
-
- if (m->cancel)
- camel_operation_unref (m->cancel);
-
- if (m->destination)
- camel_object_unref (CAMEL_OBJECT (m->destination));
-
- if (m->driver)
- camel_object_unref (CAMEL_OBJECT (m->driver));
-}
-
-static struct _mail_msg_op filter_folder_op = {
- filter_folder_describe, /* we do our own progress reporting? */
- filter_folder_filter,
- filter_folder_filtered,
- filter_folder_free,
-};
-
-void
-mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
- const char *type, CamelOperation *cancel)
-{
- struct _filter_mail_msg *m;
-
- m = mail_msg_new (&filter_folder_op, NULL, sizeof (*m));
- m->source_folder = source_folder;
- camel_object_ref (CAMEL_OBJECT (source_folder));
- m->source_uids = uids;
- m->cache = NULL;
- m->delete = FALSE;
- if (cancel) {
- m->cancel = cancel;
- camel_operation_ref (cancel);
- }
-
- m->driver = camel_session_get_filter_driver (session, type, NULL);
-
- e_thread_put (mail_thread_new, (EMsg *)m);
-}
-
-/* convenience function for it */
-void
-mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids)
-{
- mail_filter_folder (folder, uids, FILTER_SOURCE_INCOMING, NULL);
-}
-
-/* ********************************************************************** */
-
-/* Temporary workaround for various issues. Gone before 0.11 */
-static char *
-uid_cachename_hack (CamelStore *store)
-{
- CamelURL *url = CAMEL_SERVICE (store)->url;
- char *encoded_url, *filename;
-
- encoded_url = g_strdup_printf ("pop://%s%s%s@%s/", url->user,
- url->authmech ? ";auth=" : "",
- url->authmech ? url->authmech : "",
- url->host);
- e_filename_make_safe (encoded_url);
-
- filename = g_strdup_printf ("%s/config/cache-%s", evolution_dir, encoded_url);
- g_free (encoded_url);
-
- return filename;
-}
-
-static char *
-fetch_mail_describe (struct _mail_msg *mm, int complete)
-{
- return g_strdup (_("Fetching Mail"));
-}
-
-static void
-fetch_mail_fetch (struct _mail_msg *mm)
-{
- struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
- struct _filter_mail_msg *fm = (struct _filter_mail_msg *)mm;
- int i;
-
- if (m->cancel)
- camel_operation_register (m->cancel);
-
- if ((fm->destination = mail_tool_get_local_inbox (&mm->ex)) == NULL) {
- if (m->cancel)
- camel_operation_unregister (m->cancel);
- return;
- }
-
- /* FIXME: this should support keep_on_server too, which would then perform a spool
- access thingy, right? problem is matching raw messages to uid's etc. */
- if (!strncmp (m->source_uri, "mbox:", 5)) {
- char *path = mail_tool_do_movemail (m->source_uri, &mm->ex);
-
- if (path && !camel_exception_is_set (&mm->ex)) {
- camel_folder_freeze (fm->destination);
- camel_filter_driver_set_default_folder (fm->driver, fm->destination);
- camel_filter_driver_filter_mbox (fm->driver, path, m->source_uri, &mm->ex);
- camel_folder_thaw (fm->destination);
-
- if (!camel_exception_is_set (&mm->ex))
- unlink (path);
- }
- g_free (path);
- } else {
- CamelFolder *folder = fm->source_folder = mail_tool_get_inbox (m->source_uri, &mm->ex);
-
- if (folder) {
- /* this handles 'keep on server' stuff, if we have any new uid's to copy
- across, we need to copy them to a new array 'cause of the way fetch_mail_free works */
- CamelUIDCache *cache = NULL;
- char *cachename;
-
- cachename = uid_cachename_hack (folder->parent_store);
- cache = camel_uid_cache_new (cachename);
- g_free (cachename);
-
- if (cache) {
- GPtrArray *folder_uids, *cache_uids, *uids;
-
- folder_uids = camel_folder_get_uids (folder);
- cache_uids = camel_uid_cache_get_new_uids (cache, folder_uids);
- if (cache_uids) {
- /* need to copy this, sigh */
- fm->source_uids = uids = g_ptr_array_new ();
- g_ptr_array_set_size (uids, cache_uids->len);
- for (i = 0; i < cache_uids->len; i++)
- uids->pdata[i] = g_strdup (cache_uids->pdata[i]);
- camel_uid_cache_free_uids (cache_uids);
-
- fm->cache = cache;
- filter_folder_filter (mm);
-
- /* if we are not to delete the messages or there was an
- * exception, save the UID cache */
- if (!fm->delete || camel_exception_is_set (&mm->ex))
- camel_uid_cache_save (cache);
-
- /* if we are deleting off the server and no exception occured
- * then iterate through the folder uids and mark them all
- * for deletion. */
- if (fm->delete && !camel_exception_is_set (&mm->ex)) {
- camel_folder_freeze (folder);
-
- for (i = 0; i < folder_uids->len; i++)
- camel_folder_delete_message (folder, folder_uids->pdata[i]);
-
- /* sync and expunge */
- camel_folder_sync (folder, TRUE, &mm->ex);
-
- camel_folder_thaw (folder);
- }
- }
- camel_uid_cache_destroy (cache);
- camel_folder_free_uids (folder, folder_uids);
- } else {
- filter_folder_filter (mm);
- }
-
- /* we unref the source folder here since we
- may now block in finalize (we try to
- disconnect cleanly) */
- camel_object_unref (CAMEL_OBJECT (fm->source_folder));
- fm->source_folder = NULL;
- }
- }
-
- if (m->cancel)
- camel_operation_unregister (m->cancel);
-
- /* we unref this here as it may have more work to do (syncing
- folders and whatnot) before we are really done */
- /* should this be cancellable too? (i.e. above unregister above) */
- camel_object_unref (CAMEL_OBJECT (fm->driver));
- fm->driver = NULL;
-}
-
-static void
-fetch_mail_fetched (struct _mail_msg *mm)
-{
- struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
-
- if (m->done)
- m->done (m->source_uri, m->data);
-}
-
-static void
-fetch_mail_free (struct _mail_msg *mm)
-{
- struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
-
- g_free (m->source_uri);
- if (m->cancel)
- camel_operation_unref (m->cancel);
-
- filter_folder_free (mm);
-}
-
-static struct _mail_msg_op fetch_mail_op = {
- fetch_mail_describe, /* we do our own progress reporting */
- fetch_mail_fetch,
- fetch_mail_fetched,
- fetch_mail_free,
-};
-
-/* ouch, a 'do everything' interface ... */
-void
-mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(char *source, void *data), void *data)
-{
- struct _fetch_mail_msg *m;
- struct _filter_mail_msg *fm;
-
- m = mail_msg_new (&fetch_mail_op, NULL, sizeof (*m));
- fm = (struct _filter_mail_msg *)m;
- m->source_uri = g_strdup (source);
- fm->delete = !keep;
- fm->cache = NULL;
- if (cancel) {
- m->cancel = cancel;
- camel_operation_ref (cancel);
- }
- m->done = done;
- m->data = data;
-
- fm->driver = camel_session_get_filter_driver (session, type, NULL);
- camel_filter_driver_set_folder_func (fm->driver, get_folder, get_data);
- if (status)
- camel_filter_driver_set_status_func (fm->driver, status, status_data);
-
- e_thread_put (mail_thread_new, (EMsg *)m);
-}
-
-/* ********************************************************************** */
-/* sending stuff */
-/* ** SEND MAIL *********************************************************** */
-
-extern CamelFolder *sent_folder;
-
-/* send 1 message to a specific transport */
-static void
-mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilterDriver *driver, CamelException *ex)
-{
- CamelMessageInfo *info;
- CamelTransport *xport = NULL;
- CamelFolder *folder;
- const char *version, *header;
- gchar *acct_header;
- char *transport_url = NULL, *sent_folder_uri = NULL;
- XEvolution *xev;
-
- if (SUB_VERSION[0] == '\0')
- version = "Evolution/" VERSION " (Preview Release)";
- else
- version = "Evolution/" VERSION SUB_VERSION " (Preview Release)";
- camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer", version);
- camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-
- /* Get information about the account this was composed by. */
- acct_header = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"));
- if (acct_header) {
- const MailConfigAccount *account;
-
- account = mail_config_get_account_by_name (acct_header);
- if (account) {
- transport_url = g_strdup (account->transport->url);
- sent_folder_uri = g_strdup (account->sent_folder_uri);
- }
- }
-
- if (!transport_url) {
- header = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Transport");
- if (header)
- transport_url = g_strstrip (g_strdup (header));
- }
-
- if (!sent_folder_uri) {
- header = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc");
- if (header)
- sent_folder_uri = g_strstrip (g_strdup (header));
- }
-
- xport = camel_session_get_transport (session, transport_url ? transport_url : destination, ex);
- g_free (transport_url);
- if (!xport) {
- g_free (sent_folder_uri);
- return;
- }
-
- xev = mail_tool_remove_xevolution_headers (message);
- camel_transport_send (xport, CAMEL_MEDIUM (message), ex);
- mail_tool_restore_xevolution_headers (message, xev);
- mail_tool_destroy_xevolution (xev);
-
- camel_object_unref (CAMEL_OBJECT (xport));
- if (camel_exception_is_set (ex)) {
- g_free (sent_folder_uri);
- return;
- }
-
- /* post-process */
- info = camel_message_info_new ();
- info->flags = CAMEL_MESSAGE_SEEN;
-
- /* Re-attach account header */
- if (acct_header) {
- camel_medium_add_header (CAMEL_MEDIUM (message), "X-Evolution-Account", acct_header);
- g_free (acct_header);
- }
-
- if (driver) {
- camel_filter_driver_filter_message (driver, message, info,
- NULL, NULL, NULL, "", ex);
-
- if (camel_exception_is_set (ex)) {
- char *description;
- ExceptionId id;
-
- id = camel_exception_get_id (ex);
- description = g_strdup (camel_exception_get_description (ex));
- camel_exception_setv (ex, id, "%s\n%s", description,
- _("However, the message was successfully sent."));
- g_free (description);
-
- camel_message_info_free (info);
- return;
- }
- }
-
- if (sent_folder_uri) {
- folder = mail_tool_uri_to_folder (sent_folder_uri, NULL);
- g_free (sent_folder_uri);
- if (!folder) {
- /* FIXME */
- camel_object_ref (CAMEL_OBJECT (sent_folder));
- folder = sent_folder;
- }
- } else {
- camel_object_ref (CAMEL_OBJECT (sent_folder));
- folder = sent_folder;
- }
-
- if (folder) {
- camel_folder_append_message (folder, message, info, ex);
- if (camel_exception_is_set (ex)) {
- char *description;
- ExceptionId id;
-
- id = camel_exception_get_id (ex);
- description = g_strdup (camel_exception_get_description (ex));
- camel_exception_setv (ex, id, "%s\n%s", description,
- _("However, the message was successfully sent."));
- g_free (description);
- }
-
- camel_folder_sync (folder, FALSE, NULL);
- camel_object_unref (CAMEL_OBJECT (folder));
- }
-
- camel_message_info_free (info);
-}
-
-/* ********************************************************************** */
-
-struct _send_mail_msg {
- struct _mail_msg msg;
-
- CamelFilterDriver *driver;
- char *destination;
- CamelMimeMessage *message;
-
- void (*done)(char *uri, CamelMimeMessage *message, gboolean sent, void *data);
- void *data;
-};
-
-static char *
-send_mail_desc (struct _mail_msg *mm, int done)
-{
- struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
- char *subject;
- const char *subject_utf8;
-
- subject_utf8 = camel_mime_message_get_subject (m->message);
-
- if (subject_utf8) {
- char *desc;
-
- subject = e_utf8_to_locale_string (subject_utf8);
- desc = g_strdup_printf (_("Sending \"%s\""), subject);
- g_free (subject);
- return desc;
- } else
- return g_strdup (_("Sending message"));
-}
-
-static void
-send_mail_send (struct _mail_msg *mm)
-{
- struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
-
- mail_send_message (m->message, m->destination, m->driver, &mm->ex);
-}
-
-static void
-send_mail_sent (struct _mail_msg *mm)
-{
- struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
-
- if (m->done)
- m->done (m->destination, m->message, !camel_exception_is_set (&mm->ex), m->data);
-}
-
-static void
-send_mail_free (struct _mail_msg *mm)
-{
- struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
-
- camel_object_unref (CAMEL_OBJECT (m->message));
- g_free (m->destination);
-}
-
-static struct _mail_msg_op send_mail_op = {
- send_mail_desc,
- send_mail_send,
- send_mail_sent,
- send_mail_free,
-};
-
-int
-mail_send_mail (const char *uri, CamelMimeMessage *message,
- void (*done) (char *uri, CamelMimeMessage *message, gboolean sent, void *data),
- void *data)
-{
- struct _send_mail_msg *m;
- int id;
-
- m = mail_msg_new (&send_mail_op, NULL, sizeof (*m));
- m->destination = g_strdup (uri);
- m->message = message;
- camel_object_ref (CAMEL_OBJECT (message));
- m->data = data;
- m->done = done;
-
- id = m->msg.seq;
-
- m->driver = camel_session_get_filter_driver (session, FILTER_SOURCE_OUTGOING, NULL);
-
- e_thread_put (mail_thread_new, (EMsg *)m);
- return id;
-}
-
-/* ** SEND MAIL QUEUE ***************************************************** */
-
-struct _send_queue_msg {
- struct _mail_msg msg;
-
- CamelFolder *queue;
- char *destination;
-
- CamelFilterDriver *driver;
- CamelOperation *cancel;
-
- /* we use camelfilterstatusfunc, even though its not the filter doing it */
- CamelFilterStatusFunc *status;
- void *status_data;
-
- void (*done)(char *destination, void *data);
- void *data;
-};
-
-static void
-report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, int pc, const char *desc, ...)
-{
- va_list ap;
- char *str;
-
- if (m->status) {
- va_start (ap, desc);
- str = g_strdup_vprintf (desc, ap);
- va_end (ap);
- m->status (m->driver, status, pc, str, m->status_data);
- g_free (str);
- }
-}
-
-static void
-send_queue_send(struct _mail_msg *mm)
-{
- struct _send_queue_msg *m = (struct _send_queue_msg *)mm;
- extern CamelFolder *sent_folder; /* FIXME */
- GPtrArray *uids;
- int i;
-
- d(printf("sending queue\n"));
-
- uids = camel_folder_get_uids (m->queue);
- if (uids == NULL || uids->len == 0)
- return;
-
- if (m->cancel)
- camel_operation_register (m->cancel);
-
- for (i = 0; i < uids->len; i++) {
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- int pc = (100 * i) / uids->len;
-
- report_status (m, CAMEL_FILTER_STATUS_START, pc, _("Sending message %d of %d"), i+1, uids->len);
-
- info = camel_folder_get_message_info (m->queue, uids->pdata[i]);
- if (info && info->flags & CAMEL_MESSAGE_DELETED)
- continue;
-
- message = camel_folder_get_message (m->queue, uids->pdata[i], &mm->ex);
- if (camel_exception_is_set (&mm->ex))
- break;
-
- mail_send_message (message, m->destination, m->driver, &mm->ex);
-
- if (camel_exception_is_set (&mm->ex))
- break;
-
- camel_folder_set_message_flags (m->queue, uids->pdata[i], CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
- }
-
- if (camel_exception_is_set (&mm->ex))
- report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d of %d"), i+1, uids->len);
- else
- report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Complete."));
-
- if (m->driver) {
- camel_object_unref((CamelObject *)m->driver);
- m->driver = NULL;
- }
-
- camel_folder_free_uids (m->queue, uids);
-
- if (!camel_exception_is_set (&mm->ex))
- camel_folder_expunge (m->queue, &mm->ex);
-
- if (sent_folder)
- camel_folder_sync (sent_folder, FALSE, NULL);
-
- if (m->cancel)
- camel_operation_unregister (m->cancel);
-}
-
-static void
-send_queue_sent(struct _mail_msg *mm)
-{
- struct _send_queue_msg *m = (struct _send_queue_msg *)mm;
-
- if (m->done)
- m->done(m->destination, m->data);
-}
-
-static void
-send_queue_free(struct _mail_msg *mm)
-{
- struct _send_queue_msg *m = (struct _send_queue_msg *)mm;
-
- if (m->driver)
- camel_object_unref((CamelObject *)m->driver);
- camel_object_unref((CamelObject *)m->queue);
- g_free(m->destination);
- if (m->cancel)
- camel_operation_unref(m->cancel);
-}
-
-static struct _mail_msg_op send_queue_op = {
- NULL, /* do our own reporting, as with fetch mail */
- send_queue_send,
- send_queue_sent,
- send_queue_free,
-};
-
-/* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */
-void
-mail_send_queue(CamelFolder *queue, const char *destination,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(char *destination, void *data), void *data)
-{
- struct _send_queue_msg *m;
-
- m = mail_msg_new(&send_queue_op, NULL, sizeof(*m));
- m->queue = queue;
- camel_object_ref((CamelObject *)queue);
- m->destination = g_strdup(destination);
- if (cancel) {
- m->cancel = cancel;
- camel_operation_ref(cancel);
- }
- m->status = status;
- m->status_data = status_data;
- m->done = done;
- m->data = data;
-
- m->driver = camel_session_get_filter_driver (session, type, NULL);
- camel_filter_driver_set_folder_func (m->driver, get_folder, get_data);
-
- e_thread_put(mail_thread_new, (EMsg *)m);
-}
-
-/* ** APPEND MESSAGE TO FOLDER ******************************************** */
-
-struct _append_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
-
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data);
- void *data;
-};
-
-static char *
-append_mail_desc (struct _mail_msg *mm, int done)
-{
- return g_strdup (_("Saving message to folder"));
-}
-
-static void
-append_mail_append (struct _mail_msg *mm)
-{
- struct _append_msg *m = (struct _append_msg *)mm;
-
- camel_mime_message_set_date(m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
- camel_folder_append_message(m->folder, m->message, m->info, &mm->ex);
-}
-
-static void
-append_mail_appended (struct _mail_msg *mm)
-{
- struct _append_msg *m = (struct _append_msg *)mm;
-
- if (m->done)
- m->done(m->folder, m->message, m->info, !camel_exception_is_set(&mm->ex), m->data);
-}
-
-static void
-append_mail_free (struct _mail_msg *mm)
-{
- struct _append_msg *m = (struct _append_msg *)mm;
-
- camel_object_unref((CamelObject *)m->message);
- camel_object_unref((CamelObject *)m->folder);
-}
-
-static struct _mail_msg_op append_mail_op = {
- append_mail_desc,
- append_mail_append,
- append_mail_appended,
- append_mail_free
-};
-
-void
-mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data),
- void *data)
-{
- struct _append_msg *m;
-
- g_assert(CAMEL_IS_FOLDER (folder));
- g_assert(CAMEL_IS_MIME_MESSAGE (message));
-
- m = mail_msg_new (&append_mail_op, NULL, sizeof (*m));
- m->folder = folder;
- camel_object_ref (CAMEL_OBJECT (folder));
- m->message = message;
- camel_object_ref (CAMEL_OBJECT (message));
- m->info = info;
-
- m->done = done;
- m->data = data;
-
- e_thread_put (mail_thread_new, (EMsg *)m);
-}
-
-/* ** TRANSFER MESSAGES **************************************************** */
-
-struct _transfer_msg {
- struct _mail_msg msg;
-
- CamelFolder *source;
- GPtrArray *uids;
- gboolean delete;
- char *dest_uri;
-
- void (*done)(gboolean ok, void *data);
- void *data;
-};
-
-static char *
-transfer_messages_desc (struct _mail_msg *mm, int done)
-{
- struct _transfer_msg *m = (struct _transfer_msg *)mm;
-
- return g_strdup_printf(m->delete?_("Moving messages to %s"):_("Copying messages to %s"),
- m->dest_uri);
-
-}
-
-static void
-transfer_messages_transfer (struct _mail_msg *mm)
-{
- struct _transfer_msg *m = (struct _transfer_msg *)mm;
- CamelFolder *dest;
- char *desc;
- void (*func) (CamelFolder *, GPtrArray *,
- CamelFolder *,
- CamelException *);
-
- if (m->delete) {
- func = camel_folder_move_messages_to;
- desc = _("Moving");
- } else {
- func = camel_folder_copy_messages_to;
- desc = _("Copying");
- }
-
- dest = mail_tool_uri_to_folder (m->dest_uri, &mm->ex);
- if (camel_exception_is_set (&mm->ex))
- return;
-
- camel_folder_freeze (m->source);
- camel_folder_freeze (dest);
-
- if (CAMEL_IS_VTRASH_FOLDER (dest)) {
- if (m->delete) {
- int i;
-
- /* Just mark all the messages as deleted */
- for (i = 0; i < m->uids->len; i++)
- camel_folder_delete_message (m->source, m->uids->pdata[i]);
- } else {
- /* no-op - can't copy messages to*/
- }
- } else {
- if (dest == m->source) {
- int i;
-
- /* Undelete the messages if they are marked as deleted */
- for (i = 0; i < m->uids->len; i++)
- camel_folder_set_message_flags (m->source, m->uids->pdata[i],
- CAMEL_MESSAGE_DELETED, 0);
- } else {
- (func) (m->source, m->uids, dest, &mm->ex);
- }
- }
-
- camel_folder_thaw (m->source);
- camel_folder_thaw (dest);
- camel_folder_sync (dest, FALSE, NULL);
- camel_object_unref (CAMEL_OBJECT (dest));
-}
-
-static void
-transfer_messages_transferred (struct _mail_msg *mm)
-{
- struct _transfer_msg *m = (struct _transfer_msg *)mm;
-
- if (m->done)
- m->done (!camel_exception_is_set (&mm->ex), m->data);
-}
-
-static void
-transfer_messages_free (struct _mail_msg *mm)
-{
- struct _transfer_msg *m = (struct _transfer_msg *)mm;
- int i;
-
- camel_object_unref (CAMEL_OBJECT (m->source));
- g_free (m->dest_uri);
- for (i = 0; i < m->uids->len; i++)
- g_free (m->uids->pdata[i]);
- g_ptr_array_free (m->uids, TRUE);
-
-}
-
-static struct _mail_msg_op transfer_messages_op = {
- transfer_messages_desc,
- transfer_messages_transfer,
- transfer_messages_transferred,
- transfer_messages_free,
-};
-
-void
-mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
- gboolean delete_from_source,
- const char *dest_uri,
- void (*done) (gboolean ok, void *data),
- void *data)
-{
- struct _transfer_msg *m;
-
- g_assert(CAMEL_IS_FOLDER (source));
- g_assert(uids != NULL);
- g_assert(dest_uri != NULL);
-
- m = mail_msg_new(&transfer_messages_op, NULL, sizeof(*m));
- m->source = source;
- camel_object_ref (CAMEL_OBJECT (source));
- m->uids = uids;
- m->delete = delete_from_source;
- m->dest_uri = g_strdup (dest_uri);
- m->done = done;
- m->data = data;
-
- e_thread_put(mail_thread_queued, (EMsg *)m);
-}
-
-/* ** SCAN SUBFOLDERS ***************************************************** */
-
-struct _get_folderinfo_msg {
- struct _mail_msg msg;
-
- CamelStore *store;
- CamelFolderInfo *info;
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
-};
-
-static char *
-get_folderinfo_desc (struct _mail_msg *mm, int done)
-{
- struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
- char *ret, *name;
-
- name = camel_service_get_name((CamelService *)m->store, TRUE);
- ret = g_strdup_printf(_("Scanning folders in \"%s\""), name);
- g_free(name);
- return ret;
-}
-
-static void
-add_vtrash_info (CamelStore *store, CamelFolderInfo *info)
-{
- CamelFolderInfo *fi, *vtrash, *parent;
- char *uri, *path;
- CamelURL *url;
-
- g_return_if_fail (info != NULL);
-
- parent = NULL;
- for (fi = info; fi; fi = fi->sibling) {
- if (!strcmp (fi->name, CAMEL_VTRASH_NAME))
- break;
- parent = fi;
- }
-
- /* create our vTrash URL */
- url = camel_url_new (info->url, NULL);
- path = g_strdup_printf ("/%s", CAMEL_VTRASH_NAME);
- camel_url_set_path (url, path);
- g_free (path);
- uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (url);
-
- if (fi) {
- /* We're going to replace the physical Trash folder with our vTrash folder */
- vtrash = fi;
- g_free (vtrash->full_name);
- g_free (vtrash->name);
- g_free (vtrash->url);
- } else {
- /* There wasn't a Trash folder so create a new folder entry */
- vtrash = g_new0 (CamelFolderInfo, 1);
-
- g_assert(parent != NULL);
-
- /* link it into the right spot */
- vtrash->sibling = parent->sibling;
- parent->sibling = vtrash;
- }
-
- /* Fill in the new fields */
- vtrash->full_name = g_strdup (U_("Trash"));
- vtrash->name = g_strdup(vtrash->full_name);
- vtrash->url = g_strdup_printf ("vtrash:%s", uri);
- vtrash->unread_message_count = -1;
- vtrash->path = g_strdup_printf("/%s", vtrash->name);
- g_free (uri);
-}
-
-static void
-add_unmatched_info(CamelFolderInfo *fi)
-{
- for (; fi; fi = fi->sibling) {
- if (!strcmp(fi->full_name, CAMEL_UNMATCHED_NAME)) {
- g_free(fi->name);
- fi->name = g_strdup(U_("Unmatched"));
- g_free(fi->path);
- fi->path = g_strdup_printf("/%s", fi->name);
- break;
- }
- }
-}
-
-static void
-get_folderinfo_get (struct _mail_msg *mm)
-{
- struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
- guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
-
- if (camel_store_supports_subscriptions (m->store))
- flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
- m->info = camel_store_get_folder_info (m->store, NULL, flags, &mm->ex);
- if (m->info) {
- if (m->info->url && (m->store->flags & CAMEL_STORE_VTRASH))
- add_vtrash_info(m->store, m->info);
- if (CAMEL_IS_VEE_STORE(m->store))
- add_unmatched_info(m->info);
- }
-}
-
-static void
-get_folderinfo_got (struct _mail_msg *mm)
-{
- struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
-
- if (camel_exception_is_set (&mm->ex)) {
- char *url;
-
- url = camel_service_get_url (CAMEL_SERVICE (m->store));
- g_warning ("Error getting folder info from store at %s: %s",
- url, camel_exception_get_description (&mm->ex));
- g_free (url);
- }
-
- /* 'done' is probably guaranteed to fail, but... */
-
- if (m->done)
- m->done (m->store, m->info, m->data);
-}
-
-static void
-get_folderinfo_free (struct _mail_msg *mm)
-{
- struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
-
- if (m->info)
- camel_store_free_folder_info(m->store, m->info);
- camel_object_unref((CamelObject *)m->store);
-}
-
-static struct _mail_msg_op get_folderinfo_op = {
- get_folderinfo_desc,
- get_folderinfo_get,
- get_folderinfo_got,
- get_folderinfo_free,
-};
-
-int
-mail_get_folderinfo (CamelStore *store, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
-{
- struct _get_folderinfo_msg *m;
- int id;
-
- m = mail_msg_new(&get_folderinfo_op, NULL, sizeof(*m));
- m->store = store;
- camel_object_ref((CamelObject *)store);
- m->done = done;
- m->data = data;
- id = m->msg.seq;
-
- e_thread_put(mail_thread_queued, (EMsg *)m);
-
- return id;
-}
-
-/* ** ATTACH MESSAGES ****************************************************** */
-
-struct _build_data {
- void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data);
- void *data;
-};
-
-static void
-do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
-{
- struct _build_data *d = data;
- CamelMultipart *multipart;
- CamelMimePart *part;
- char *subject;
- int i;
-
- if (messages->len == 0) {
- d->done(folder, messages, NULL, NULL, d->data);
- g_free(d);
- return;
- }
-
- if (messages->len == 1) {
- part = mail_tool_make_message_attachment(messages->pdata[0]);
- } else {
- multipart = camel_multipart_new();
- camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multipart), "multipart/digest");
- camel_multipart_set_boundary(multipart, NULL);
-
- for (i=0;i<messages->len;i++) {
- part = mail_tool_make_message_attachment(messages->pdata[i]);
- camel_multipart_add_part(multipart, part);
- camel_object_unref((CamelObject *)part);
- }
- part = camel_mime_part_new();
- camel_medium_set_content_object(CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER(multipart));
- camel_object_unref((CamelObject *)multipart);
-
- camel_mime_part_set_description(part, _("Forwarded messages"));
- }
-
- subject = mail_tool_generate_forward_subject(messages->pdata[0]);
- d->done(folder, messages, part, subject, d->data);
- g_free(subject);
- camel_object_unref((CamelObject *)part);
-
- g_free(d);
-}
-
-void
-mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data)
-{
- struct _build_data *d;
-
- d = g_malloc(sizeof(*d));
- d->done = done;
- d->data = data;
- mail_get_messages(folder, uids, do_build_attachment, d);
-}
-
-/* ** LOAD FOLDER ********************************************************* */
-
-/* there hsould be some way to merge this and create folder, since both can
- presumably create a folder ... */
-
-struct _get_folder_msg {
- struct _mail_msg msg;
-
- char *uri;
- CamelFolder *folder;
- void (*done) (char *uri, CamelFolder *folder, void *data);
- void *data;
-};
-
-static char *
-get_folder_desc (struct _mail_msg *mm, int done)
-{
- struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
- return g_strdup_printf(_("Opening folder %s"), m->uri);
-}
-
-static void
-get_folder_get (struct _mail_msg *mm)
-{
- struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
- m->folder = mail_tool_uri_to_folder (m->uri, &mm->ex);
-}
-
-static void
-get_folder_got (struct _mail_msg *mm)
-{
- struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
- if (m->done)
- m->done (m->uri, m->folder, m->data);
-}
-
-static void
-get_folder_free (struct _mail_msg *mm)
-{
- struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
- g_free (m->uri);
- if (m->folder)
- camel_object_unref (CAMEL_OBJECT (m->folder));
-}
-
-static struct _mail_msg_op get_folder_op = {
- get_folder_desc,
- get_folder_get,
- get_folder_got,
- get_folder_free,
-};
-
-int
-mail_get_folder (const char *uri, void (*done)(char *uri, CamelFolder *folder, void *data), void *data, EThread *thread)
-{
- struct _get_folder_msg *m;
- int id;
-
- m = mail_msg_new(&get_folder_op, NULL, sizeof(*m));
- m->uri = g_strdup (uri);
- m->data = data;
- m->done = done;
-
- id = m->msg.seq;
- e_thread_put(thread, (EMsg *)m);
- return id;
-}
-
-/* ** GET STORE ******************************************************* */
-
-struct _get_store_msg {
- struct _mail_msg msg;
-
- char *uri;
- CamelStore *store;
- void (*done) (char *uri, CamelStore *store, void *data);
- void *data;
-};
-
-static char *
-get_store_desc (struct _mail_msg *mm, int done)
-{
- struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
- return g_strdup_printf(_("Opening store %s"), m->uri);
-}
-
-static void
-get_store_get (struct _mail_msg *mm)
-{
- struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
- m->store = camel_session_get_store (session, m->uri, &mm->ex);
-}
-
-static void
-get_store_got (struct _mail_msg *mm)
-{
- struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
- if (m->done)
- m->done (m->uri, m->store, m->data);
-}
-
-static void
-get_store_free (struct _mail_msg *mm)
-{
- struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
- g_free (m->uri);
- if (m->store)
- camel_object_unref (CAMEL_OBJECT (m->store));
-}
-
-static struct _mail_msg_op get_store_op = {
- get_store_desc,
- get_store_get,
- get_store_got,
- get_store_free,
-};
-
-int
-mail_get_store (const char *uri, void (*done) (char *uri, CamelStore *store, void *data), void *data)
-{
- struct _get_store_msg *m;
- int id;
-
- m = mail_msg_new (&get_store_op, NULL, sizeof (*m));
- m->uri = g_strdup (uri);
- m->data = data;
- m->done = done;
-
- id = m->msg.seq;
- e_thread_put (mail_thread_new, (EMsg *)m);
- return id;
-}
-
-/* ** REMOVE FOLDER ******************************************************* */
-
-struct _remove_folder_msg {
- struct _mail_msg msg;
-
- char *uri;
- gboolean removed;
- void (*done) (char *uri, gboolean removed, void *data);
- void *data;
-};
-
-static char *
-remove_folder_desc (struct _mail_msg *mm, int done)
-{
- struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
-
- return g_strdup_printf (_("Removing folder %s"), m->uri);
-}
-
-static void
-remove_folder_get (struct _mail_msg *mm)
-{
- struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
- CamelStore *store;
- CamelFolder *folder;
- GPtrArray *uids;
- int i;
-
- m->removed = FALSE;
-
- folder = mail_tool_uri_to_folder (m->uri, &mm->ex);
- if (!folder)
- return;
-
- store = folder->parent_store;
-
- /* Delete every message in this folder, then expunge it */
- uids = camel_folder_get_uids (folder);
- for (i = 0; i < uids->len; i++)
- camel_folder_delete_message (folder, uids->pdata[i]);
- camel_folder_sync (folder, TRUE, NULL);
- camel_folder_free_uids (folder, uids);
-
- /* if the store supports subscriptions, unsubscribe from this folder... */
- if (camel_store_supports_subscriptions (store))
- camel_store_unsubscribe_folder (store, folder->full_name, NULL);
-
- /* Then delete the folder from the store */
- camel_store_delete_folder (store, folder->full_name, &mm->ex);
- m->removed = !camel_exception_is_set (&mm->ex);
- camel_object_unref (CAMEL_OBJECT (folder));
-}
-
-static void
-remove_folder_got (struct _mail_msg *mm)
-{
- struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
-
- if (m->removed) {
- /* FIXME: Remove this folder from the folder cache ??? */
- }
-
- if (m->done)
- m->done (m->uri, m->removed, m->data);
-}
-
-static void
-remove_folder_free (struct _mail_msg *mm)
-{
- struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
-
- g_free (m->uri);
-}
-
-static struct _mail_msg_op remove_folder_op = {
- remove_folder_desc,
- remove_folder_get,
- remove_folder_got,
- remove_folder_free,
-};
-
-void
-mail_remove_folder (const char *uri, void (*done) (char *uri, gboolean removed, void *data), void *data)
-{
- struct _remove_folder_msg *m;
-
- m = mail_msg_new (&remove_folder_op, NULL, sizeof (*m));
- m->uri = g_strdup (uri);
- m->data = data;
- m->done = done;
-
- e_thread_put (mail_thread_new, (EMsg *)m);
-}
-
-/* ** SYNC FOLDER ********************************************************* */
-
-struct _sync_folder_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- void (*done) (CamelFolder *folder, void *data);
- void *data;
-};
-
-static char *sync_folder_desc(struct _mail_msg *mm, int done)
-{
- struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
-
- return g_strdup_printf (_("Storing folder \'%s\'"),
- camel_folder_get_full_name (m->folder));
-}
-
-static void sync_folder_sync(struct _mail_msg *mm)
-{
- struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
-
- camel_folder_sync(m->folder, FALSE, &mm->ex);
-}
-
-static void sync_folder_synced(struct _mail_msg *mm)
-{
- struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
-
- if (m->done)
- m->done(m->folder, m->data);
-}
-
-static void sync_folder_free(struct _mail_msg *mm)
-{
- struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
-
- camel_object_unref((CamelObject *)m->folder);
-}
-
-static struct _mail_msg_op sync_folder_op = {
- sync_folder_desc,
- sync_folder_sync,
- sync_folder_synced,
- sync_folder_free,
-};
-
-void
-mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
-{
- struct _sync_folder_msg *m;
-
- m = mail_msg_new(&sync_folder_op, NULL, sizeof(*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_queued, (EMsg *)m);
-}
-
-/* ******************************************************************************** */
-
-static char *refresh_folder_desc(struct _mail_msg *mm, int done)
-{
- return g_strdup(_("Refreshing folder"));
-}
-
-static void refresh_folder_refresh(struct _mail_msg *mm)
-{
- struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
-
- camel_folder_refresh_info(m->folder, &mm->ex);
-}
-
-/* we just use the sync stuff where we can, since it would be the same */
-static struct _mail_msg_op refresh_folder_op = {
- refresh_folder_desc,
- refresh_folder_refresh,
- sync_folder_synced,
- sync_folder_free,
-};
-
-void
-mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
-{
- struct _sync_folder_msg *m;
-
- m = mail_msg_new(&refresh_folder_op, NULL, sizeof(*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_new, (EMsg *)m);
-}
-
-/* ******************************************************************************** */
-
-static char *expunge_folder_desc(struct _mail_msg *mm, int done)
-{
- return g_strdup(_("Expunging folder"));
-}
-
-static void expunge_folder_expunge(struct _mail_msg *mm)
-{
- struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
-
- camel_folder_expunge(m->folder, &mm->ex);
-}
-
-/* we just use the sync stuff where we can, since it would be the same */
-static struct _mail_msg_op expunge_folder_op = {
- expunge_folder_desc,
- expunge_folder_expunge,
- sync_folder_synced,
- sync_folder_free,
-};
-
-void
-mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
-{
- struct _sync_folder_msg *m;
-
- m = mail_msg_new(&expunge_folder_op, NULL, sizeof(*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_new, (EMsg *)m);
-}
-
-/* ** GET MESSAGE(s) ***************************************************** */
-
-struct _get_message_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- char *uid;
- void (*done) (CamelFolder *folder, char *uid, CamelMimeMessage *msg, void *data);
- void *data;
- CamelMimeMessage *message;
- CamelOperation *cancel;
-};
-
-static char *get_message_desc(struct _mail_msg *mm, int done)
-{
- struct _get_message_msg *m = (struct _get_message_msg *)mm;
-
- return g_strdup_printf(_("Retrieving message %s"), m->uid);
-}
-
-static void get_message_get(struct _mail_msg *mm)
-{
- struct _get_message_msg *m = (struct _get_message_msg *)mm;
-
- m->message = camel_folder_get_message(m->folder, m->uid, &mm->ex);
-}
-
-static void get_message_got(struct _mail_msg *mm)
-{
- struct _get_message_msg *m = (struct _get_message_msg *)mm;
-
- if (m->done)
- m->done(m->folder, m->uid, m->message, m->data);
-}
-
-static void get_message_free(struct _mail_msg *mm)
-{
- struct _get_message_msg *m = (struct _get_message_msg *)mm;
-
- g_free(m->uid);
- camel_object_unref((CamelObject *)m->folder);
- camel_operation_unref(m->cancel);
-}
-
-static struct _mail_msg_op get_message_op = {
- get_message_desc,
- get_message_get,
- get_message_got,
- get_message_free,
-};
-
-void
-mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, char *uid, CamelMimeMessage *msg, void *data), void *data, EThread *thread)
-{
- struct _get_message_msg *m;
-
- m = mail_msg_new(&get_message_op, NULL, sizeof(*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->uid = g_strdup(uid);
- m->data = data;
- m->done = done;
- m->cancel = camel_operation_new(NULL, NULL);
-
- e_thread_put(thread, (EMsg *)m);
-}
-
-/* ********************************************************************** */
-
-struct _get_messages_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- GPtrArray *uids;
- GPtrArray *messages;
-
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data);
- void *data;
-};
-
-static char * get_messages_desc(struct _mail_msg *mm, int done)
-{
- struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
-
- return g_strdup_printf(_("Retrieving %d message(s)"), m->uids->len);
-}
-
-static void get_messages_get(struct _mail_msg *mm)
-{
- struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
- int i;
- CamelMimeMessage *message;
-
- for (i=0; i<m->uids->len; i++) {
- int pc = ((i+1) * 100) / m->uids->len;
-
- message = camel_folder_get_message(m->folder, m->uids->pdata[i], &mm->ex);
- camel_operation_progress(mm->cancel, pc);
- if (message == NULL)
- break;
-
- g_ptr_array_add(m->messages, message);
- }
-}
-
-static void get_messages_got(struct _mail_msg *mm)
-{
- struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
-
- if (m->done)
- m->done(m->folder, m->uids, m->messages, m->data);
-}
-
-static void get_messages_free(struct _mail_msg *mm)
-{
- struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
- int i;
-
- for (i=0;i<m->uids->len;i++)
- g_free(m->uids->pdata[i]);
- g_ptr_array_free(m->uids, TRUE);
- for (i=0;i<m->messages->len;i++) {
- if (m->messages->pdata[i])
- camel_object_unref((CamelObject *)m->messages->pdata[i]);
- }
- g_ptr_array_free(m->messages, TRUE);
- camel_object_unref((CamelObject *)m->folder);
-}
-
-static struct _mail_msg_op get_messages_op = {
- get_messages_desc,
- get_messages_get,
- get_messages_got,
- get_messages_free,
-};
-
-void
-mail_get_messages(CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
- void *data)
-{
- struct _get_messages_msg *m;
-
- m = mail_msg_new(&get_messages_op, NULL, sizeof(*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->uids = uids;
- m->messages = g_ptr_array_new();
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_new, (EMsg *)m);
-}
-
-/* ** SAVE MESSAGES ******************************************************* */
-
-struct _save_messages_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- GPtrArray *uids;
- char *path;
- void (*done)(CamelFolder *folder, GPtrArray *uids, char *path, void *data);
- void *data;
-};
-
-static char *save_messages_desc(struct _mail_msg *mm, int done)
-{
- struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
-
- return g_strdup_printf(_("Saving %d messsage(s)"), m->uids->len);
-}
-
-/* tries to build a From line, based on message headers */
-/* this is a copy directly from camel-mbox-summary.c */
-
-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"
-};
-
-static char *
-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;
- 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;
-}
-
-static void
-save_prepare_part (CamelMimePart *mime_part)
-{
- 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);
-
- save_prepare_part (part);
- }
- } else {
- if (CAMEL_IS_MIME_MESSAGE (wrapper)) {
- /* prepare the message parts' subparts */
- save_prepare_part (CAMEL_MIME_PART (wrapper));
- } else {
- CamelContentType *type;
-
- /* We want to save textual parts as 8bit instead of encoded */
- type = camel_data_wrapper_get_mime_type_field (wrapper);
- if (header_content_type_is (type, "text", "*"))
- camel_mime_part_set_encoding (mime_part, CAMEL_MIME_PART_ENCODING_8BIT);
- }
- }
-}
-
-static void
-save_messages_save (struct _mail_msg *mm)
-{
- struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilterFrom *from_filter;
- CamelStream *stream;
- int fd, i;
- char *from;
-
- fd = open (m->path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
- if (fd == -1) {
- camel_exception_setv(&mm->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unable to create output file: %s\n %s"), m->path, strerror(errno));
- return;
- }
-
- stream = camel_stream_fs_new_with_fd(fd);
- from_filter = camel_mime_filter_from_new();
- filtered_stream = camel_stream_filter_new_with_stream(stream);
- camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter);
- camel_object_unref((CamelObject *)from_filter);
-
- for (i=0; i<m->uids->len; i++) {
- CamelMimeMessage *message;
- int pc = ((i+1) * 100) / m->uids->len;
-
- message = camel_folder_get_message(m->folder, m->uids->pdata[i], &mm->ex);
- camel_operation_progress(mm->cancel, pc);
- if (message == NULL)
- break;
-
- save_prepare_part (CAMEL_MIME_PART (message));
-
- /* we need to flush after each stream write since we are writing to the same fd */
- from = build_from(((CamelMimePart *)message)->headers);
- if (camel_stream_write_string(stream, from) == -1
- || camel_stream_flush(stream) == -1
- || camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, (CamelStream *)filtered_stream) == -1
- || camel_stream_flush((CamelStream *)filtered_stream) == -1) {
- camel_exception_setv(&mm->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error saving messages to: %s:\n %s"), m->path, strerror(errno));
- g_free(from);
- camel_object_unref((CamelObject *)message);
- break;
- }
- g_free(from);
- camel_object_unref((CamelObject *)message);
- }
-
- camel_object_unref((CamelObject *)filtered_stream);
- camel_object_unref((CamelObject *)stream);
-}
-
-static void save_messages_saved(struct _mail_msg *mm)
-{
- struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
-
- if (m->done)
- m->done(m->folder, m->uids, m->path, m->data);
-}
-
-static void save_messages_free(struct _mail_msg *mm)
-{
- struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
- int i;
-
- for (i=0;i<m->uids->len;i++)
- g_free(m->uids->pdata[i]);
- g_ptr_array_free(m->uids, TRUE);
- camel_object_unref((CamelObject *)m->folder);
- g_free(m->path);
-}
-
-static struct _mail_msg_op save_messages_op = {
- save_messages_desc,
- save_messages_save,
- save_messages_saved,
- save_messages_free,
-};
-
-int
-mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), void *data)
-{
- struct _save_messages_msg *m;
- int id;
-
- m = mail_msg_new(&save_messages_op, NULL, sizeof(*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->uids = uids;
- m->path = g_strdup(path);
- m->data = data;
- m->done = done;
-
- id = m->msg.seq;
- e_thread_put(mail_thread_new, (EMsg *)m);
-
- return id;
-}
-
-/* ** SAVE PART ******************************************************* */
-
-struct _save_part_msg {
- struct _mail_msg msg;
-
- CamelMimePart *part;
- char *path;
- void (*done)(CamelMimePart *part, char *path, int saved, void *data);
- void *data;
-};
-
-static char *save_part_desc(struct _mail_msg *mm, int done)
-{
- return g_strdup(_("Saving attachment"));
-}
-
-static void
-save_part_save (struct _mail_msg *mm)
-{
- struct _save_part_msg *m = (struct _save_part_msg *)mm;
- CamelMimeFilterCharset *charsetfilter;
- CamelContentType *content_type;
- CamelStreamFilter *filtered_stream;
- CamelStream *stream_fs;
- CamelDataWrapper *data;
- const char *charset;
-
- stream_fs = camel_stream_fs_new_with_name (m->path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (stream_fs == NULL) {
- camel_exception_setv (&mm->ex, 1, _("Cannot create output file: %s:\n %s"), m->path,
- g_strerror (errno));
- return;
- }
-
- /* we only convert text/ parts, and we only convert if we have to
- null charset param == us-ascii == utf8 always, and utf8 == utf8 obviously */
- /* this will also let "us-ascii that isn't really" parts pass out in
- proper format, without us trying to treat it as what it isn't, which is
- the same algorithm camel uses */
-
- data = camel_medium_get_content_object (CAMEL_MEDIUM (m->part));
- content_type = camel_mime_part_get_content_type (m->part);
- if (header_content_type_is (content_type, "text", "*")
- && (charset = header_content_type_param (content_type, "charset"))
- && g_strcasecmp (charset, "utf-8") != 0) {
- charsetfilter = camel_mime_filter_charset_new_convert ("utf-8", charset);
- filtered_stream = camel_stream_filter_new_with_stream (stream_fs);
- if (charsetfilter) {
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (charsetfilter));
- camel_object_unref (CAMEL_OBJECT (charsetfilter));
- }
- } else {
- /* no we can't use a CAMEL_BLAH() cast here, since its not true, HOWEVER
- we only treat it as a normal stream from here on, so it is OK */
- filtered_stream = (CamelStreamFilter *)stream_fs;
- camel_object_ref (CAMEL_OBJECT (stream_fs));
- }
-
- if (camel_data_wrapper_write_to_stream (data, CAMEL_STREAM (filtered_stream)) == -1
- || camel_stream_flush (CAMEL_STREAM (filtered_stream)) == -1)
- camel_exception_setv (&mm->ex, 1, _("Could not write data: %s"), g_strerror (errno));
-
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (stream_fs));
-}
-
-static void
-save_part_saved (struct _mail_msg *mm)
-{
- struct _save_part_msg *m = (struct _save_part_msg *)mm;
-
- if (m->done)
- m->done (m->part, m->path, !camel_exception_is_set (&mm->ex), m->data);
-}
-
-static void
-save_part_free (struct _mail_msg *mm)
-{
- struct _save_part_msg *m = (struct _save_part_msg *)mm;
-
- camel_object_unref (CAMEL_OBJECT (m->part));
- g_free (m->path);
-}
-
-static struct _mail_msg_op save_part_op = {
- save_part_desc,
- save_part_save,
- save_part_saved,
- save_part_free,
-};
-
-int
-mail_save_part (CamelMimePart *part, const char *path,
- void (*done)(CamelMimePart *part, char *path, int saved, void *data), void *data)
-{
- struct _save_part_msg *m;
- int id;
-
- m = mail_msg_new (&save_part_op, NULL, sizeof (*m));
- m->part = part;
- camel_object_ref (CAMEL_OBJECT (part));
- m->path = g_strdup (path);
- m->data = data;
- m->done = done;
-
- id = m->msg.seq;
- e_thread_put (mail_thread_queued, (EMsg *)m);
-
- return id;
-}
-
-
-/* ** GO OFFLINE ***************************************************** */
-
-struct _set_offline_msg {
- struct _mail_msg msg;
-
- CamelStore *store;
- gboolean offline;
- void (*done)(CamelStore *store, void *data);
- void *data;
-};
-
-static char *set_offline_desc(struct _mail_msg *mm, int done)
-{
- struct _set_offline_msg *m = (struct _set_offline_msg *)mm;
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
-
- msg = g_strdup_printf (m->offline ? _("Disconnecting from %s") :
- _("Reconnecting to %s"), service_name);
- g_free (service_name);
- return msg;
-}
-
-static void set_offline_do(struct _mail_msg *mm)
-{
- struct _set_offline_msg *m = (struct _set_offline_msg *)mm;
-
- if (!CAMEL_IS_DISCO_STORE (m->store) ||
- !camel_disco_store_can_work_offline (CAMEL_DISCO_STORE (m->store))) {
- if (m->offline) {
- camel_service_disconnect (CAMEL_SERVICE (m->store),
- TRUE, &mm->ex);
- }
- return;
- }
-
- if (m->offline && camel_disco_store_status (CAMEL_DISCO_STORE (m->store)) == CAMEL_DISCO_STORE_ONLINE) {
- CamelFolder *inbox;
-
- /* FIXME. Something more generic here... (bug 10755) */
- inbox = camel_store_get_inbox (m->store, NULL);
- if (inbox) {
- camel_disco_folder_prepare_for_offline (
- CAMEL_DISCO_FOLDER (inbox),
- "(match-all (not (system-flag \"Seen\")))",
- &mm->ex);
- camel_folder_sync (inbox, FALSE, NULL);
- camel_object_unref (CAMEL_OBJECT (inbox));
- if (camel_exception_is_set (&mm->ex))
- return;
- }
- }
-
- camel_disco_store_set_status (CAMEL_DISCO_STORE (m->store),
- m->offline ? CAMEL_DISCO_STORE_OFFLINE :
- CAMEL_DISCO_STORE_ONLINE, &mm->ex);
-}
-
-static void set_offline_done(struct _mail_msg *mm)
-{
- struct _set_offline_msg *m = (struct _set_offline_msg *)mm;
-
- if (m->done)
- m->done(m->store, m->data);
-}
-
-static void set_offline_free(struct _mail_msg *mm)
-{
- struct _set_offline_msg *m = (struct _set_offline_msg *)mm;
-
- camel_object_unref((CamelObject *)m->store);
-}
-
-static struct _mail_msg_op set_offline_op = {
- set_offline_desc,
- set_offline_do,
- set_offline_done,
- set_offline_free,
-};
-
-void
-mail_store_set_offline (CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data)
-{
- struct _set_offline_msg *m;
-
- /* Cancel any pending connect first so the set_offline_op
- * thread won't get queued behind a hung connect op.
- */
- if (offline)
- camel_service_cancel_connect (CAMEL_SERVICE (store));
-
- m = mail_msg_new(&set_offline_op, NULL, sizeof(*m));
- m->store = store;
- camel_object_ref((CamelObject *)store);
- m->offline = offline;
- m->data = data;
- m->done = done;
-
- e_thread_put(mail_thread_queued, (EMsg *)m);
-}
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
deleted file mode 100644
index bc5a15df9a..0000000000
--- a/mail/mail-ops.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Peter Williams <peterw@ximian.com>
- * Michael Zucchi <notzed@ximian.com>
- *
- * Copyright 2000, 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 MAIL_OPS_H
-#define MAIL_OPS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include "camel/camel-folder.h"
-#include "camel/camel-filter-driver.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-operation.h"
-
-#include "evolution-storage.h" /*EvolutionStorage */
-#include "e-util/e-msgport.h"
-
-void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data),
- void *data);
-
-void mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
- gboolean delete_from_source,
- const char *dest_uri,
- void (*done) (gboolean ok, void *data),
- void *data);
-
-/* get a single message, asynchronously */
-void mail_get_message (CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, char *uid, CamelMimeMessage *msg, void *data),
- void *data,
- EThread *thread);
-
-/* get several messages */
-void mail_get_messages (CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
- void *data);
-
-/* same for a folder */
-int mail_get_folder (const char *uri,
- void (*done) (char *uri, CamelFolder *folder, void *data), void *data,
- EThread *thread);
-
-/* and for a store */
-int mail_get_store (const char *uri,
- void (*done) (char *uri, CamelStore *store, void *data), void *data);
-
-/* build an attachment */
-void mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages,
- CamelMimePart *part, char *subject, void *data),
- void *data);
-
-void mail_sync_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
-
-void mail_refresh_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
-
-void mail_expunge_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
-
-/* get folder info asynchronously */
-int mail_get_folderinfo (CamelStore *store,
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data),
- void *data);
-
-/* remove an existing folder */
-void mail_remove_folder (const char *uri,
- void (*done) (char *uri, gboolean removed, void *data),
- void *data);
-
-/* transfer (copy/move) a folder */
-void mail_xfer_folder (const char *src_uri, const char *dest_uri, gboolean remove_source,
- void (*done) (char *src_uri, char *dest_uri, gboolean remove_source,
- CamelFolder *folder, void *data),
- void *data);
-
-/* save messages */
-int mail_save_messages (CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data),
- void *data);
-
-int mail_save_part (CamelMimePart *part, const char *path,
- void (*done)(CamelMimePart *part, char *path, int saved, void *data),
- void *data);
-
-int mail_send_mail (const char *uri, CamelMimeMessage *message,
- void (*done) (char *uri, CamelMimeMessage *message, gboolean sent, void *data),
- void *data);
-
-/* scan subfolders and add them to the storage, synchronous */
-/* FIXME: Move this to component-factory.c */
-void mail_scan_subfolders (CamelStore *store, EvolutionStorage *storage);
-/* not sure about this one though */
-int mail_update_subfolders (CamelStore *store, EvolutionStorage *storage,
- void (*done)(CamelStore *, void *data),
- void *data);
-
-/* yeah so this is messy, but it does a lot, maybe i can consolidate all user_data's to be the one */
-void mail_send_queue (CamelFolder *queue, const char *destination,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(char *destination, void *data),
- void *data);
-
-void mail_fetch_mail (const char *source, int keep,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(char *source, void *data),
- void *data);
-
-void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
- const char *type, CamelOperation *cancel);
-
-/* convenience function for above */
-void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids);
-
-/* Work Offline */
-void mail_store_set_offline (CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_OPS_H */
diff --git a/mail/mail-search-dialogue.c b/mail/mail-search-dialogue.c
deleted file mode 100644
index 0f633edeba..0000000000
--- a/mail/mail-search-dialogue.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2000, 2001 Ximian, 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 <glib.h>
-#include <gtk/gtkentry.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-
-#include "mail-search-dialogue.h"
-
-static void mail_search_dialogue_class_init (MailSearchDialogueClass *class);
-static void mail_search_dialogue_init (MailSearchDialogue *gspaper);
-static void mail_search_dialogue_finalise (GtkObject *obj);
-
-static GnomeDialogClass *parent_class;
-
-guint
-mail_search_dialogue_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "MailSearchDialogue",
- sizeof(MailSearchDialogue),
- sizeof(MailSearchDialogueClass),
- (GtkClassInitFunc)mail_search_dialogue_class_init,
- (GtkObjectInitFunc)mail_search_dialogue_init,
- (GtkArgSetFunc)NULL,
- (GtkArgGetFunc)NULL
- };
-
- type = gtk_type_unique (gnome_dialog_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-mail_search_dialogue_class_init (MailSearchDialogueClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)class;
- parent_class = gtk_type_class (gnome_dialog_get_type ());
-
- object_class->finalize = mail_search_dialogue_finalise;
- /* override methods */
-
-}
-
-static void
-mail_search_dialogue_construct (MailSearchDialogue *o, FilterRule *rule)
-{
- FilterPart *part;
- GnomeDialog *dialogue = GNOME_DIALOG (o);
-
- gtk_window_set_policy (GTK_WINDOW (dialogue), FALSE, TRUE, FALSE);
- gtk_window_set_default_size (GTK_WINDOW (dialogue), 500, 400);
-
- o->context = rule_context_new ();
- rule_context_add_part_set (o->context, "partset", filter_part_get_type (),
- rule_context_add_part, rule_context_next_part);
- rule_context_load (o->context, EVOLUTION_DATADIR "/evolution/vfoldertypes.xml", "");
- if (rule) {
- o->rule = rule;
- o->guts = filter_rule_get_widget (o->rule, o->context);
- } else {
- o->rule = filter_rule_new ();
- part = rule_context_next_part (o->context, NULL);
- if (part == NULL) {
- g_warning ("Problem loading search: no parts to load");
- o->guts = gtk_entry_new ();
- } else {
- filter_rule_add_part (o->rule, filter_part_clone (part));
- o->guts = filter_rule_get_widget (o->rule, o->context);
- }
- }
-
- gtk_widget_show (o->guts);
- gtk_box_pack_start (GTK_BOX (dialogue->vbox), o->guts, TRUE, TRUE, 0);
-}
-
-static void
-mail_search_dialogue_init (MailSearchDialogue *o)
-{
- GnomeDialog *dialogue = GNOME_DIALOG (o);
-
- gnome_dialog_append_buttons (dialogue,
- GNOME_STOCK_BUTTON_OK,
- _("_Search"),
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gnome_dialog_set_default (dialogue, 0);
-}
-
-
-static void
-mail_search_dialogue_finalise (GtkObject *obj)
-{
- MailSearchDialogue *o = (MailSearchDialogue *)obj;
-
- if (o->context)
- gtk_object_unref (GTK_OBJECT (o->context));
- if (o->rule)
- gtk_object_unref (GTK_OBJECT (o->rule));
-
- ((GtkObjectClass *)(parent_class))->finalize(obj);
-}
-
-/**
- * mail_search_dialogue_new:
- *
- * Create a new MailSearchDialogue object.
- *
- * Return value: A new #MailSearchDialogue object.
- **/
-MailSearchDialogue *
-mail_search_dialogue_new ()
-{
- MailSearchDialogue *o = (MailSearchDialogue *)gtk_type_new (mail_search_dialogue_get_type ());
- mail_search_dialogue_construct (o, NULL);
- return o;
-}
-
-MailSearchDialogue *
-mail_search_dialogue_new_with_rule (FilterRule *rule)
-{
- MailSearchDialogue *o = (MailSearchDialogue *)gtk_type_new (mail_search_dialogue_get_type ());
- if (rule)
- gtk_object_ref (GTK_OBJECT (rule));
- mail_search_dialogue_construct (o, rule);
- return o;
-}
-
-/**
- * mail_search_dialogue_get_query:
- * @msd:
- *
- * Get the query string represting the current search criterea.
- *
- * Return value:
- **/
-char *
-mail_search_dialogue_get_query (MailSearchDialogue *msd)
-{
- GString *out = g_string_new ("");
- char *ret;
-
- filter_rule_build_code (msd->rule, out);
- ret = out->str;
- g_string_free (out, FALSE);
- return ret;
-}
diff --git a/mail/mail-search-dialogue.h b/mail/mail-search-dialogue.h
deleted file mode 100644
index 9e87928e10..0000000000
--- a/mail/mail-search-dialogue.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2000 Ximian 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 _MAIL_SEARCH_DIALOGUE_H
-#define _MAIL_SEARCH_DIALOGUE_H
-
-#include <gtk/gtkwidget.h>
-#include <libgnomeui/gnome-dialog.h>
-
-#include "filter/rule-context.h"
-#include "filter/filter-rule.h"
-
-#define MAIL_SEARCH_DIALOGUE(obj) GTK_CHECK_CAST (obj, mail_search_dialogue_get_type (), MailSearchDialogue)
-#define MAIL_SEARCH_DIALOGUE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, mail_search_dialogue_get_type (), MailSearchDialogueClass)
-#define IS_MAIL_SEARCH_DIALOGUE(obj) GTK_CHECK_TYPE (obj, mail_search_dialogue_get_type ())
-
-typedef struct _MailSearchDialogue MailSearchDialogue;
-typedef struct _MailSearchDialogueClass MailSearchDialogueClass;
-
-struct _MailSearchDialogue {
- GnomeDialog parent;
-
- RuleContext *context;
- FilterRule *rule;
- GtkWidget *guts;
-};
-
-struct _MailSearchDialogueClass {
- GnomeDialogClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-guint mail_search_dialogue_get_type (void);
-MailSearchDialogue *mail_search_dialogue_new (void);
-MailSearchDialogue *mail_search_dialogue_new_with_rule(FilterRule *rule);
-
-/* methods */
-char *mail_search_dialogue_get_query(MailSearchDialogue *msd);
-
-#endif /* ! _MAIL_SEARCH_DIALOGUE_H */
-
diff --git a/mail/mail-search.c b/mail/mail-search.c
deleted file mode 100644
index aadbd1a2a0..0000000000
--- a/mail/mail-search.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * mail-search.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "mail-search.h"
-#include "e-searching-tokenizer.h"
-#include <gal/widgets/e-unicode.h>
-#include <gtkhtml/gtkhtml-search.h>
-#include <gtkhtml/htmlengine.h>
-#include <libgnomeui/gnome-window-icon.h>
-
-static GtkObjectClass *parent_class;
-
-static void
-mail_search_destroy (GtkObject *obj)
-{
- MailSearch *ms = MAIL_SEARCH (obj);
-
- gtk_signal_disconnect (GTK_OBJECT (ms->mail->html->engine->ht),
- ms->match_handler);
- gtk_signal_disconnect (GTK_OBJECT (ms->mail->html->engine->ht),
- ms->begin_handler);
-
- g_free (ms->last_search);
- gtk_object_unref (GTK_OBJECT (ms->mail));
-}
-
-static void
-mail_search_class_init (MailSearchClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gnome_dialog_get_type ()));
-
- object_class->destroy = mail_search_destroy;
-}
-
-static void
-mail_search_init (MailSearch *ms)
-{
-
-}
-
-GtkType
-mail_search_get_type (void)
-{
- static GtkType mail_search_type = 0;
-
- if (! mail_search_type) {
- GtkTypeInfo mail_search_info = {
- "MailSearch",
- sizeof (MailSearch),
- sizeof (MailSearchClass),
- (GtkClassInitFunc) mail_search_class_init,
- (GtkObjectInitFunc) mail_search_init,
- NULL, NULL, /* mysteriously reserved */
- (GtkClassInitFunc) NULL
- };
-
- mail_search_type = gtk_type_unique (gnome_dialog_get_type (), &mail_search_info);
- }
-
- return mail_search_type;
-}
-
-/*
- * Convenience
- */
-
-static ESearchingTokenizer *
-mail_search_tokenizer (MailSearch *ms)
-{
- return E_SEARCHING_TOKENIZER (ms->mail->html->engine->ht);
-}
-
-static void
-mail_search_redisplay_message (MailSearch *ms)
-{
- mail_display_redisplay (ms->mail, FALSE);
-}
-
-static void
-mail_search_set_subject (MailSearch *ms, const gchar *subject)
-{
- gchar *utf8_subject = NULL;
- gchar *gtk_subject = NULL;
-
- if (subject && *subject) {
-
- utf8_subject = g_strdup (subject);
-
- if (g_utf8_validate (utf8_subject, -1, NULL)) {
-
- const gint ARBITRARY_CUTOFF = 40;
-
- if (g_utf8_strlen (utf8_subject, -1) > ARBITRARY_CUTOFF) {
- gchar *p = g_utf8_offset_to_pointer (utf8_subject, ARBITRARY_CUTOFF);
- strcpy (p, "...");
- }
-
- } else {
- /* If the subject contains bad utf8, don't show anything in the frame label. */
- g_free (utf8_subject);
- utf8_subject = NULL;
- }
-
- if (utf8_subject)
- gtk_subject = e_utf8_to_gtk_string (GTK_WIDGET (ms->msg_frame), utf8_subject);
-
- } else {
-
- gtk_subject = g_strdup (_("(Untitled Message)"));
-
- }
-
- gtk_frame_set_label (GTK_FRAME (ms->msg_frame), gtk_subject);
-
- g_free (gtk_subject);
- g_free (utf8_subject);
-}
-
-/*
- * Construct Objects
- */
-
-static void
-toggled_case_cb (GtkToggleButton *b, MailSearch *ms)
-{
- ms->case_sensitive = gtk_toggle_button_get_active (b);
-
- e_searching_tokenizer_set_primary_case_sensitivity (mail_search_tokenizer (ms),
- ms->case_sensitive);
- mail_search_redisplay_message (ms);
-
-}
-
-#if 0
-static void
-toggled_fwd_cb (GtkToggleButton *b, MailSearch *ms)
-{
- ms->search_forward = gtk_toggle_button_get_active (b);
- gtk_html_engine_search_set_forward (ms->mail->html, ms->search_forward);
-}
-#endif
-
-static void
-dialog_destroy_cb (GtkWidget *w, MailSearch *ms)
-{
- ESearchingTokenizer *st = mail_search_tokenizer (ms);
-
- e_searching_tokenizer_set_primary_search_string (st, NULL);
- mail_search_redisplay_message (ms);
-}
-
-static void
-dialog_clicked_cb (GtkWidget *w, gint button_number, MailSearch *ms)
-{
- ESearchingTokenizer *st = mail_search_tokenizer (ms);
-
- if (button_number == 0) { /* "Search" */
-
- char *search_text, *tmp;
-
- tmp = gtk_editable_get_chars (GTK_EDITABLE (ms->entry), 0, -1);
-
- g_strstrip (tmp);
- search_text = e_utf8_from_gtk_string ((GtkWidget *) ms->entry, tmp);
- g_free (tmp);
-
- if (search_text && *search_text) {
-
- if (ms->last_search && !strcmp (ms->last_search, search_text)) {
-
- if (! gtk_html_engine_search_next (ms->mail->html)) {
- g_free (ms->last_search);
- ms->last_search = NULL;
- }
-
- } else {
-
- g_free (ms->last_search);
- ms->last_search = NULL;
-
- e_searching_tokenizer_set_primary_search_string (st, search_text);
- e_searching_tokenizer_set_primary_case_sensitivity (st, ms->case_sensitive);
-
- mail_search_redisplay_message (ms);
-
- if (gtk_html_engine_search (ms->mail->html, search_text,
- ms->case_sensitive, ms->search_forward,
- FALSE)) {
- ms->last_search = g_strdup (search_text);
- }
- }
- }
-
-
- g_free (search_text);
-
- } else if (button_number == 1) { /* "Close" */
- gtk_widget_destroy (w);
- }
-}
-
-static void
-begin_cb (ESearchingTokenizer *st, gchar *foo, MailSearch *ms)
-{
- const gchar *subject;
-
- if (ms && ms->mail && ms->mail->current_message) {
-
- subject = ms->mail->current_message->subject;
-
- if (subject == NULL)
- subject = _("Untitled Message");
-
- } else {
-
- subject = _("Empty Message");
-
- }
-
- gtk_label_set_text (GTK_LABEL (ms->count_label), "0");
- mail_search_set_subject (ms, subject);
-}
-
-static void
-match_cb (ESearchingTokenizer *st, MailSearch *ms)
-{
- gchar buf[16];
- g_snprintf (buf, 16, "%d", e_searching_tokenizer_match_count (st));
- gtk_label_set_text (GTK_LABEL (ms->count_label), buf);
-}
-
-void
-mail_search_construct (MailSearch *ms, MailDisplay *mail)
-{
- const gchar *buttons[] = { _("Search"),
- GNOME_STOCK_BUTTON_CLOSE,
- NULL };
- gchar *title = NULL;
-
- GtkWidget *find_hbox;
- GtkWidget *matches_hbox;
- GtkWidget *toggles_hbox;
- GtkWidget *frame_vbox;
-
- GtkWidget *entry;
- GtkWidget *count_label;
- GtkWidget *case_check;
-#if 0
- GtkWidget *fwd_check;
-#endif
-
- GtkWidget *msg_hbox;
- GtkWidget *msg_frame;
-
- g_return_if_fail (ms != NULL && IS_MAIL_SEARCH (ms));
- g_return_if_fail (mail != NULL && IS_MAIL_DISPLAY (mail));
-
- /* Basic set-up */
-
- ms->mail = mail;
- gtk_object_ref (GTK_OBJECT (mail));
-
- title = g_strdup (_("Find in Message"));
-
- gnome_dialog_constructv (GNOME_DIALOG (ms), title, buttons);
- g_free (title);
-
- ms->search_forward = TRUE;
- ms->case_sensitive = FALSE;
-
- ms->begin_handler = gtk_signal_connect (GTK_OBJECT (ms->mail->html->engine->ht),
- "begin",
- GTK_SIGNAL_FUNC (begin_cb),
- ms);
- ms->match_handler = gtk_signal_connect (GTK_OBJECT (ms->mail->html->engine->ht),
- "match",
- GTK_SIGNAL_FUNC (match_cb),
- ms);
-
- /* Construct the dialog contents. */
-
- msg_hbox = gtk_hbox_new (FALSE, 0);
- find_hbox = gtk_hbox_new (FALSE, 0);
- matches_hbox = gtk_hbox_new (FALSE, 0);
- toggles_hbox = gtk_hbox_new (FALSE, 0);
- frame_vbox = gtk_vbox_new (FALSE, 0);
-
- entry = gtk_entry_new ();
- count_label = gtk_label_new ("0");
-
- msg_frame = gtk_frame_new (NULL);
-
- case_check = gtk_check_button_new_with_label (_("Case Sensitive"));
-#if 0
- fwd_check = gtk_check_button_new_with_label (_("Search Forward"));
-#endif
-
- ms->entry = entry;
- ms->count_label = count_label;
-
- ms->msg_frame = msg_frame;
-
- if (mail->current_message->subject && *mail->current_message->subject)
- mail_search_set_subject (ms, mail->current_message->subject);
- else
- mail_search_set_subject (ms, NULL);
-
-#if 0
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fwd_check), ms->search_forward);
-#endif
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (case_check), ms->case_sensitive);
-
- gtk_box_pack_start (GTK_BOX (msg_hbox), GTK_WIDGET (msg_frame), FALSE, FALSE, 3);
-
- gtk_box_pack_start (GTK_BOX (find_hbox), gtk_label_new (_("Find:")), FALSE, FALSE, 3);
- gtk_box_pack_start (GTK_BOX (find_hbox), entry, TRUE, TRUE, 3);
- gtk_box_pack_start (GTK_BOX (matches_hbox), gtk_hbox_new (FALSE, 0), TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (matches_hbox), gtk_label_new (_("Matches:")), FALSE, FALSE, 3);
- gtk_box_pack_start (GTK_BOX (matches_hbox), count_label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (matches_hbox), gtk_hbox_new (FALSE, 0), TRUE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (toggles_hbox), case_check, FALSE, FALSE, 4);
-
- /*
- * Disabling the forward/backward search button because there are problems with it
- * (related to how gtkhtml handles searches), the GUI freeze is upon us, and I
- * don't know if they'll get resolved for 1.0. Hopefully getting this fixed can
- * be a 1.1 item.
- */
-
-#if 0
- gtk_box_pack_start (GTK_BOX (toggles_hbox), fwd_check, FALSE, FALSE, 4);
-#endif
-
- gtk_box_pack_start (GTK_BOX (frame_vbox), find_hbox, TRUE, TRUE, 8);
- gtk_box_pack_start (GTK_BOX (frame_vbox), matches_hbox, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (frame_vbox), toggles_hbox, TRUE, TRUE, 0);
-
- gtk_container_add (GTK_CONTAINER (GTK_FRAME (msg_frame)), GTK_WIDGET (frame_vbox));
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ms)->vbox), msg_hbox, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ms)->vbox), GTK_WIDGET (GTK_FRAME (msg_frame)), TRUE, TRUE, 0);
-
- gtk_widget_grab_focus (entry); /* Give focus to entry by default */
- gnome_dialog_set_default (GNOME_DIALOG (ms), 0);
- gnome_dialog_editable_enters (GNOME_DIALOG (ms), GTK_EDITABLE(entry)); /* Make <enter> run the search */
- gnome_window_icon_set_from_file (GTK_WINDOW (GNOME_DIALOG (ms)), EVOLUTION_ICONSDIR "/find-message.xpm");
-
- gtk_widget_show_all (msg_hbox);
- gtk_widget_show_all (find_hbox);
- gtk_widget_show_all (matches_hbox);
- gtk_widget_show_all (toggles_hbox);
-
- /* Hook up signals */
-
- gtk_signal_connect (GTK_OBJECT (case_check),
- "toggled",
- GTK_SIGNAL_FUNC (toggled_case_cb),
- ms);
-#if 0
- gtk_signal_connect (GTK_OBJECT (fwd_check),
- "toggled",
- GTK_SIGNAL_FUNC (toggled_fwd_cb),
- ms);
-#endif
- gtk_signal_connect (GTK_OBJECT (ms),
- "clicked",
- GTK_SIGNAL_FUNC (dialog_clicked_cb),
- ms);
-
- gtk_signal_connect_object (GTK_OBJECT (ms),
- "destroy",
- GTK_SIGNAL_FUNC (dialog_destroy_cb),
- GTK_OBJECT (ms));
-
- gtk_signal_connect_object (GTK_OBJECT (ms->mail),
- "destroy",
- GTK_SIGNAL_FUNC (gtk_widget_destroy),
- GTK_OBJECT (ms));
-}
-
-GtkWidget *
-mail_search_new (MailDisplay *mail)
-{
- gpointer ptr;
-
- g_return_val_if_fail (mail && IS_MAIL_DISPLAY (mail), NULL);
-
- ptr = gtk_type_new (mail_search_get_type ());
- mail_search_construct (MAIL_SEARCH (ptr), mail);
-
- return GTK_WIDGET (ptr);
-}
-
diff --git a/mail/mail-search.h b/mail/mail-search.h
deleted file mode 100644
index 8c7797b83a..0000000000
--- a/mail/mail-search.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * mail-search.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 _MAIL_SEARCH_H_
-#define _MAIL_SEARCH_H_
-
-#ifdef _cplusplus
-extern "C" {
-#pragma }
-#endif /* _cplusplus */
-
-#include <gnome.h>
-#include "mail-display.h"
-
-#define MAIL_SEARCH_TYPE (mail_search_get_type ())
-#define MAIL_SEARCH(o) (GTK_CHECK_CAST ((o), MAIL_SEARCH_TYPE, MailSearch))
-#define MAIL_SEARCH_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), MAIL_SEARCH_TYPE, MailSearch))
-#define IS_MAIL_SEARCH(o) (GTK_CHECK_TYPE ((o), MAIL_SEARCH_TYPE))
-#define IS_MAIL_SEARCH_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_SEARCH_TYPE))
-
-typedef struct _MailSearch MailSearch;
-typedef struct _MailSearchClass MailSearchClass;
-
-struct _MailSearch {
- GnomeDialog parent;
-
- MailDisplay *mail;
-
- GtkWidget *entry;
- GtkWidget *msg_frame;
- GtkWidget *count_label;
-
- gboolean search_forward, case_sensitive;
- gchar *last_search;
-
- guint begin_handler;
- guint match_handler;
-};
-
-struct _MailSearchClass {
- GnomeDialogClass parent_class;
-
-};
-
-GtkType mail_search_get_type (void);
-
-void mail_search_construct (MailSearch *, MailDisplay *);
-GtkWidget *mail_search_new (MailDisplay *);
-
-
-#ifdef _cplusplus
-}
-#endif /* _cplusplus */
-
-#endif /* _MAIL_SEARCH_H_ */
-
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
deleted file mode 100644
index d1d619b0dd..0000000000
--- a/mail/mail-send-recv.c
+++ /dev/null
@@ -1,836 +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. (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>
-
-/* for the dialogue stuff */
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-window-icon.h>
-
-#include "filter/filter-filter.h"
-#include "camel/camel-filter-driver.h"
-#include "camel/camel-folder.h"
-#include "camel/camel-operation.h"
-
-#include "evolution-storage.h"
-
-#include "mail.h"
-#include "mail-mt.h"
-#include "mail-config.h"
-#include "mail-session.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-send-recv.h"
-#include "mail-folder-cache.h"
-
-#define d(x)
-
-/* ms between status updates to the gui */
-#define STATUS_TIMEOUT (250)
-
-/* send/receive email */
-
-/* ********************************************************************** */
-/* This stuff below is independent of the stuff above */
-
-/* this stuff is used to keep track of which folders filters have accessed, and
- what not. the thaw/refreeze thing doesn't really seem to work though */
-struct _folder_info {
- char *uri;
- CamelFolder *folder;
- time_t update;
- int count; /* how many times updated, to slow it down as we go, if we have lots */
-};
-
-struct _send_data {
- GList *infos;
-
- GnomeDialog *gd;
- int cancelled;
-
- CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */
- time_t inbox_update;
-
- GMutex *lock;
- GHashTable *folders;
-
- GHashTable *active; /* send_info's by uri */
-};
-
-typedef enum {
- SEND_RECEIVE, /* receiver */
- SEND_SEND, /* sender */
- SEND_UPDATE, /* imap-like 'just update folder info' */
-} send_info_t ;
-
-typedef enum {
- SEND_ACTIVE,
- SEND_CANCELLED,
- SEND_COMPLETE
-} send_state_t;
-
-struct _send_info {
- send_info_t type; /* 0 = fetch, 1 = send */
- CamelOperation *cancel;
- char *uri;
- int keep;
- send_state_t state;
- GtkProgressBar *bar;
- GtkButton *stop;
- GtkLabel *status;
-
- int timeout_id;
- char *what;
- int pc;
-
- /*time_t update;*/
- struct _send_data *data;
-};
-
-static struct _send_data *send_data = NULL;
-
-static struct _send_data *setup_send_data(void)
-{
- struct _send_data *data;
-
- if (send_data == NULL) {
- send_data = data = g_malloc0(sizeof(*data));
- data->lock = g_mutex_new();
- data->folders = g_hash_table_new(g_str_hash, g_str_equal);
- data->inbox = mail_tool_get_local_inbox(NULL);
- data->active = g_hash_table_new(g_str_hash, g_str_equal);
- }
- return send_data;
-}
-
-static void
-receive_cancel(GtkButton *button, struct _send_info *info)
-{
- if (info->state == SEND_ACTIVE) {
- camel_operation_cancel(info->cancel);
- if (info->status)
- gtk_label_set_text(info->status, _("Cancelling..."));
- info->state = SEND_CANCELLED;
- }
- if (info->stop)
- gtk_widget_set_sensitive((GtkWidget *)info->stop, FALSE);
-}
-
-static void
-free_folder_info(void *key, struct _folder_info *info, void *data)
-{
- /*camel_folder_thaw (info->folder); */
- mail_sync_folder(info->folder, NULL, NULL);
- camel_object_unref((CamelObject *)info->folder);
- g_free(info->uri);
-}
-
-static void free_send_info(void *key, struct _send_info *info, void *data)
-{
- d(printf("Freeing send info %p\n", info));
- g_free(info->uri);
- camel_operation_unref(info->cancel);
- if (info->timeout_id != 0)
- gtk_timeout_remove(info->timeout_id);
- g_free(info->what);
- g_free(info);
-}
-
-static void
-free_send_data(void)
-{
- struct _send_data *data = send_data;
-
- g_assert(g_hash_table_size(data->active) == 0);
-
- if (data->inbox) {
- mail_sync_folder(data->inbox, NULL, NULL);
- /*camel_folder_thaw (data->inbox); */
- camel_object_unref((CamelObject *)data->inbox);
- }
- g_list_free(data->infos);
- g_hash_table_foreach(data->active, (GHFunc)free_send_info, NULL);
- g_hash_table_destroy(data->active);
- g_hash_table_foreach(data->folders, (GHFunc)free_folder_info, NULL);
- g_hash_table_destroy(data->folders);
- g_mutex_free(data->lock);
- g_free(data);
- send_data = NULL;
-}
-
-static void cancel_send_info(void *key, struct _send_info *info, void *data)
-{
- receive_cancel(info->stop, info);
-}
-
-static void hide_send_info(void *key, struct _send_info *info, void *data)
-{
- info->stop = NULL;
- info->bar = NULL;
- info->status = NULL;
-
- if (info->timeout_id != 0) {
- gtk_timeout_remove (info->timeout_id);
- info->timeout_id = 0;
- }
-}
-
-static void
-dialog_destroy (GtkProgressBar *bar, struct _send_data *data)
-{
- g_hash_table_foreach (data->active, (GHFunc) hide_send_info, NULL);
- data->gd = NULL;
-}
-
-static void
-dialogue_clicked(GnomeDialog *gd, int button, struct _send_data *data)
-{
- switch(button) {
- case 0:
- d(printf("cancelled whole thing\n"));
- if (!data->cancelled) {
- data->cancelled = TRUE;
- g_hash_table_foreach(data->active, (GHFunc)cancel_send_info, NULL);
- }
- gnome_dialog_set_sensitive(gd, 0, FALSE);
- break;
- case -1: /* dialogue vanished, so make out its just hidden */
- d(printf("hiding dialogue\n"));
- g_hash_table_foreach(data->active, (GHFunc)hide_send_info, NULL);
- data->gd = NULL;
- break;
- }
-}
-
-static void operation_status(CamelOperation *op, const char *what, int pc, void *data);
-static int operation_status_timeout(void *data);
-
-static char *
-format_url(const char *internal_url)
-{
- CamelURL *url;
- char *pretty_url;
-
- url = camel_url_new(internal_url, NULL);
- if (url->host)
- pretty_url = g_strdup_printf(_("Server: %s, Type: %s"), url->host, url->protocol);
- else if (url->path)
- pretty_url = g_strdup_printf(_("Path: %s, Type: %s"), url->path, url->protocol);
- else
- pretty_url = g_strdup_printf(_("Type: %s"), url->protocol);
-
- camel_url_free(url);
-
- return pretty_url;
-}
-
-static send_info_t get_receive_type(const char *url)
-{
- CamelProvider *provider;
-
- provider = camel_session_get_provider (session, url, NULL);
- if (provider->flags & CAMEL_PROVIDER_IS_STORAGE)
- return SEND_UPDATE;
- else
- return SEND_RECEIVE;
-}
-
-static struct _send_data *
-build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
-{
- GnomeDialog *gd;
- GtkTable *table;
- int row;
- GList *list = NULL;
- struct _send_data *data;
- GtkWidget *send_icon, *recv_icon;
- GtkLabel *label, *status_label;
- GtkProgressBar *bar;
- GtkButton *stop;
- GtkHSeparator *line;
- struct _send_info *info;
- char *pretty_url;
-
- data = setup_send_data ();
-
- gd = (GnomeDialog *)gnome_dialog_new (_("Send & Receive Mail"), NULL);
- gnome_dialog_append_button_with_pixmap (gd, _("Cancel All"), GNOME_STOCK_BUTTON_CANCEL);
-
- gtk_window_set_policy (GTK_WINDOW (gd), FALSE, FALSE, FALSE);
- gnome_window_icon_set_from_file (GTK_WINDOW (gd), EVOLUTION_ICONSDIR "/send-receive.xpm");
-
- table = (GtkTable *)gtk_table_new (g_slist_length (sources), 4, FALSE);
- gtk_box_pack_start (GTK_BOX (gd->vbox), GTK_WIDGET (table), TRUE, TRUE, 0);
-
- row = 0;
- while (sources) {
- MailConfigService *source = sources->data;
-
- if (!source->url || !source->enabled) {
- sources = sources->next;
- continue;
- }
-
- /* see if we have an outstanding download active */
- info = g_hash_table_lookup (data->active, source->url);
- if (info == NULL) {
- info = g_malloc0 (sizeof (*info));
- info->type = get_receive_type(source->url);
- d(printf("adding source %s\n", source->url));
-
- info->uri = g_strdup (source->url);
- info->keep = source->keep_on_server;
- info->cancel = camel_operation_new (operation_status, info);
- info->state = SEND_ACTIVE;
- info->timeout_id = gtk_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- g_hash_table_insert (data->active, info->uri, info);
- list = g_list_prepend (list, info);
- } else if (info->bar != NULL) {
- /* incase we get the same source pop up again */
- sources = sources->next;
- continue;
- } else if (info->timeout_id == 0)
- info->timeout_id = gtk_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- recv_icon = gnome_pixmap_new_from_file (EVOLUTION_BUTTONSDIR "/receive-24.png");
-
- pretty_url = format_url (source->url);
- label = (GtkLabel *)gtk_label_new (pretty_url);
- g_free (pretty_url);
-
- bar = (GtkProgressBar *)gtk_progress_bar_new ();
- gtk_progress_set_show_text (GTK_PROGRESS (bar), FALSE);
-
- stop = (GtkButton *)gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
- status_label = (GtkLabel *)gtk_label_new ((info->type == SEND_UPDATE) ? _("Updating...") :
- _("Waiting..."));
-
- /* gtk_object_set (data->label, "bold", TRUE, NULL); */
- gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
- gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
-
- gtk_table_attach (table, (GtkWidget *)recv_icon, 0, 1, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, (GtkWidget *)label, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, (GtkWidget *)bar, 2, 3, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, (GtkWidget *)stop, 3, 4, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, (GtkWidget *)status_label, 1, 2, row+1, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
-
- info->bar = bar;
- info->status = status_label;
- info->stop = stop;
- info->data = data;
-
- gtk_signal_connect (GTK_OBJECT (stop), "clicked", receive_cancel, info);
- sources = sources->next;
- row = row + 2;
- }
-
- line = (GtkHSeparator *)gtk_hseparator_new ();
- gtk_table_attach (table, GTK_WIDGET (line), 0, 4, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 3, 3);
- row++;
- gtk_widget_show_all (GTK_WIDGET (table));
-
- if (outbox) {
- info = g_hash_table_lookup (data->active, destination);
- if (info == NULL) {
- info = g_malloc0 (sizeof (*info));
- info->type = SEND_SEND;
- d(printf("adding dest %s\n", destination));
-
- info->uri = g_strdup (destination);
- info->keep = FALSE;
- info->cancel = camel_operation_new (operation_status, info);
- info->state = SEND_ACTIVE;
- info->timeout_id = gtk_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- g_hash_table_insert (data->active, info->uri, info);
- list = g_list_prepend (list, info);
- } else if (info->timeout_id == 0)
- info->timeout_id = gtk_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
- send_icon = gnome_pixmap_new_from_file (EVOLUTION_BUTTONSDIR "/send-24.png");
-
- pretty_url = format_url (destination);
- label = (GtkLabel *)gtk_label_new (pretty_url);
- g_free (pretty_url);
-
- bar = (GtkProgressBar *)gtk_progress_bar_new ();
- stop = (GtkButton *)gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
- status_label = (GtkLabel *)gtk_label_new (_("Waiting..."));
-
- gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
- gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
- gtk_progress_set_show_text (GTK_PROGRESS (bar), FALSE);
-
- gtk_table_attach (table, GTK_WIDGET (send_icon), 0, 1, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, GTK_WIDGET (label), 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, GTK_WIDGET (bar), 2, 3, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, GTK_WIDGET (stop), 3, 4, row, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
- gtk_table_attach (table, GTK_WIDGET (status_label), 1, 2, row+1, row+2, GTK_EXPAND | GTK_FILL, 0, 3, 1);
-
- info->bar = bar;
- info->stop = stop;
- info->data = data;
- info->status = status_label;
-
- gtk_signal_connect (GTK_OBJECT (stop), "clicked", receive_cancel, info);
- gtk_widget_show_all (GTK_WIDGET (table));
- }
-
- gtk_widget_show (GTK_WIDGET (gd));
-
- gtk_signal_connect (GTK_OBJECT (gd), "clicked", dialogue_clicked, data);
- gtk_signal_connect (GTK_OBJECT (gd), "destroy", dialog_destroy, data);
-
- data->infos = list;
- data->gd = gd;
-
- return data;
-}
-
-static void
-update_folders(char *uri, struct _folder_info *info, void *data)
-{
- time_t now = *((time_t *)data);
-
- d(printf("checking update for folder: %s\n", info->uri));
-
- /* let it flow through to the folders every 10 seconds */
- /* we back off slowly as we progress */
- if (now > info->update+10+info->count*5) {
- d(printf("upating a folder: %s\n", info->uri));
- /*camel_folder_thaw(info->folder);
- camel_folder_freeze(info->folder);*/
- info->update = now;
- info->count++;
- }
-}
-
-static void set_send_status(struct _send_info *info, const char *desc, int pc)
-{
- /* FIXME: LOCK */
- g_free(info->what);
- info->what = g_strdup(desc);
- info->pc = pc;
-}
-
-static void
-receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, void *data)
-{
- struct _send_info *info = data;
- time_t now = time(0);
-
- /* let it flow through to the folder, every now and then too? */
- g_hash_table_foreach(info->data->folders, (GHFunc)update_folders, &now);
-
- if (info->data->inbox && now > info->data->inbox_update+20) {
- d(printf("updating inbox too\n"));
- /* this doesn't seem to work right :( */
- /*camel_folder_thaw(info->data->inbox);
- camel_folder_freeze(info->data->inbox);*/
- info->data->inbox_update = now;
- }
-
- /* we just pile them onto the port, assuming it can handle it.
- We could also have a receiver port and see if they've been processed
- yet, so if this is necessary its not too hard to add */
- /* the mail_gui_port receiver will free everything for us */
- switch (status) {
- case CAMEL_FILTER_STATUS_START:
- case CAMEL_FILTER_STATUS_END:
- set_send_status(info, desc, pc);
- break;
- default:
- break;
- }
-}
-
-static int operation_status_timeout(void *data)
-{
- struct _send_info *info = data;
-
- if (info->bar) {
- gtk_progress_set_percentage((GtkProgress *)info->bar, (gfloat)(info->pc/100.0));
- gtk_label_set_text(info->status, info->what);
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* for camel operation status */
-static void operation_status(CamelOperation *op, const char *what, int pc, void *data)
-{
- struct _send_info *info = data;
-
- /*printf("Operation '%s', percent %d\n");*/
- switch (pc) {
- case CAMEL_OPERATION_START:
- pc = 0;
- break;
- case CAMEL_OPERATION_END:
- pc = 100;
- break;
- }
-
- set_send_status(info, what, pc);
-}
-
-/* when receive/send is complete */
-static void
-receive_done (char *uri, void *data)
-{
- struct _send_info *info = data;
-
- if (info->bar) {
- gtk_progress_set_percentage((GtkProgress *)info->bar, (gfloat)1.0);
-
- switch(info->state) {
- case SEND_CANCELLED:
- gtk_label_set_text(info->status, _("Cancelled."));
- break;
- default:
- info->state = SEND_COMPLETE;
- gtk_label_set_text(info->status, _("Complete."));
- }
- }
-
- if (info->stop)
- gtk_widget_set_sensitive((GtkWidget *)info->stop, FALSE);
-
- /* remove/free this active download */
- d(printf("%s: freeing info %p\n", __FUNCTION__, info));
- g_hash_table_remove(info->data->active, info->uri);
- info->data->infos = g_list_remove(info->data->infos, info);
-
- if (g_hash_table_size(info->data->active) == 0) {
- if (info->data->gd)
- gnome_dialog_close(info->data->gd);
- free_send_data();
- }
-
- free_send_info(NULL, info, NULL);
-}
-
-/* same for updating */
-static void
-receive_update_done(CamelStore *store, CamelFolderInfo *info, void *data)
-{
- receive_done("", data);
-}
-
-/* although we dont do anythign smart here yet, there is no need for this interface to
- be available to anyone else.
- This can also be used to hook into which folders are being updated, and occasionally
- let them refresh */
-static CamelFolder *
-receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
-{
- struct _send_info *info = data;
- CamelFolder *folder;
- struct _folder_info *oldinfo;
- char *oldkey;
-
- g_mutex_lock(info->data->lock);
- oldinfo = g_hash_table_lookup(info->data->folders, uri);
- g_mutex_unlock(info->data->lock);
- if (oldinfo) {
- camel_object_ref((CamelObject *)oldinfo->folder);
- return oldinfo->folder;
- }
- folder = mail_tool_uri_to_folder(uri, ex);
- if (!folder)
- return NULL;
-
- /* we recheck that the folder hasn't snuck in while we were loading it... */
- /* and we assume the newer one is the same, but unref the old one anyway */
- g_mutex_lock(info->data->lock);
-
- if (g_hash_table_lookup_extended(info->data->folders, uri, (void **)&oldkey, (void **)&oldinfo)) {
- camel_object_unref((CamelObject *)oldinfo->folder);
- oldinfo->folder = folder;
- } else {
- /*camel_folder_freeze (folder); */
- oldinfo = g_malloc0(sizeof(*oldinfo));
- oldinfo->folder = folder;
- oldinfo->uri = g_strdup(uri);
- g_hash_table_insert(info->data->folders, oldinfo->uri, oldinfo);
- }
-
- camel_object_ref (CAMEL_OBJECT (folder));
-
- g_mutex_unlock(info->data->lock);
-
- return folder;
-}
-
-static void
-receive_update_got_store (char *uri, CamelStore *store, void *data)
-{
- struct _send_info *info = data;
-
- if (store) {
- EvolutionStorage *storage = mail_lookup_storage (store);
-
- if (storage) {
- mail_note_store(store, storage, CORBA_OBJECT_NIL, receive_update_done, info);
- /*bonobo_object_unref (BONOBO_OBJECT (storage));*/
- } else {
- receive_done ("", info);
- }
- } else {
- receive_done ("", info);
- }
-}
-
-void mail_send_receive (void)
-{
- GSList *sources;
- GList *scan;
- static GtkWidget *gd = NULL;
- struct _send_data *data;
- extern CamelFolder *outbox_folder;
- const MailConfigAccount *account;
-
- if (gd != NULL) {
- g_assert(GTK_WIDGET_REALIZED(gd));
- gdk_window_show(gd->window);
- gdk_window_raise(gd->window);
- return;
- }
-
- sources = mail_config_get_sources();
- if (!sources)
- return;
- account = mail_config_get_default_account();
- if (!account || !account->transport)
- return;
-
- /* what to do about pop before smtp ?
- Well, probably hook into receive_done or receive_status on
- the right pop account, and when it is, then kick off the
- smtp one. */
- data = build_dialogue(sources, outbox_folder, account->transport->url);
- scan = data->infos;
- gd = GTK_WIDGET(data->gd);
- gtk_signal_connect((GtkObject *)gd, "destroy", gtk_widget_destroyed, &gd);
- while (scan) {
- struct _send_info *info = scan->data;
-
- switch(info->type) {
- case SEND_RECEIVE:
- mail_fetch_mail(info->uri, info->keep,
- FILTER_SOURCE_INCOMING,
- info->cancel,
- receive_get_folder, info,
- receive_status, info,
- receive_done, info);
- break;
- case SEND_SEND:
- /* todo, store the folder in info? */
- mail_send_queue(outbox_folder, info->uri,
- FILTER_SOURCE_OUTGOING,
- info->cancel,
- receive_get_folder, info,
- receive_status, info,
- receive_done, info);
- break;
- case SEND_UPDATE:
- /* FIXME: error reporting? */
- mail_get_store(info->uri, receive_update_got_store, info);
- break;
- }
- scan = scan->next;
- }
-}
-
-struct _auto_data {
- char *uri;
- int keep; /* keep on server flag */
- int period; /* in seconds */
- int timeout_id;
-};
-
-static GHashTable *auto_active;
-
-static gboolean
-auto_timeout(void *data)
-{
- struct _auto_data *info = data;
-
- if (camel_session_is_online(session))
- mail_receive_uri(info->uri, info->keep);
-
- return TRUE;
-}
-
-static void auto_setup_set(void *key, struct _auto_data *info, GHashTable *set)
-{
- g_hash_table_insert(set, info->uri, info);
-}
-
-static void auto_clean_set(void *key, struct _auto_data *info, GHashTable *set)
-{
- d(printf("removing auto-check for %s %p\n", info->uri, info));
- g_hash_table_remove(set, info->uri);
- gtk_timeout_remove(info->timeout_id);
- g_free(info->uri);
- g_free(info);
-}
-
-/* call to setup initial, and after changes are made to the config */
-/* FIXME: Need a cleanup funciton for when object is deactivated */
-static void
-autoreceive_setup_list(GSList *sources, gboolean clear_absent)
-{
- GHashTable *set_hash;
-
- if (!sources)
- return;
-
- if (auto_active == NULL)
- auto_active = g_hash_table_new(g_str_hash, g_str_equal);
-
- set_hash = g_hash_table_new(g_str_hash, g_str_equal);
- g_hash_table_foreach(auto_active, (GHFunc)auto_setup_set, set_hash);
-
- while (sources) {
- MailConfigService *source = sources->data;
- if (source->url && source->auto_check && source->enabled) {
- struct _auto_data *info;
-
- d(printf("setting up auto-receive mail for : %s\n", source->url));
-
- g_hash_table_remove(set_hash, source->url);
- info = g_hash_table_lookup(auto_active, source->url);
- if (info) {
- info->keep = source->keep_on_server;
- if (info->period != source->auto_check_time*60) {
- info->period = source->auto_check_time*60;
- gtk_timeout_remove(info->timeout_id);
- info->timeout_id = gtk_timeout_add(info->period*1000, auto_timeout, info);
- }
- } else {
- info = g_malloc0(sizeof(*info));
- info->uri = g_strdup(source->url);
- info->keep = source->keep_on_server;
- info->period = source->auto_check_time*60;
- info->timeout_id = gtk_timeout_add(info->period*1000, auto_timeout, info);
- g_hash_table_insert(auto_active, info->uri, info);
- /* If we do this at startup, it can cause the logon dialogue to be hidden,
- so lets not */
- /*mail_receive_uri(source->url, source->keep_on_server);*/
- }
- }
-
- sources = sources->next;
- }
-
- if (clear_absent)
- g_hash_table_foreach(set_hash, (GHFunc)auto_clean_set, auto_active);
- g_hash_table_destroy(set_hash);
-}
-
-void
-mail_autoreceive_setup (void)
-{
- autoreceive_setup_list (mail_config_get_sources(), TRUE);
-}
-
-void
-mail_autoreceive_setup_account (MailConfigService *service)
-{
- GSList list;
-
- list.data = service;
- list.next = NULL;
-
- autoreceive_setup_list (&list, FALSE);
-}
-
-/* we setup the download info's in a hashtable, if we later need to build the gui, we insert
- them in to add them. */
-void
-mail_receive_uri (const char *uri, int keep)
-{
- struct _send_info *info;
- struct _send_data *data;
- extern CamelFolder *outbox_folder;
-
- data = setup_send_data();
- info = g_hash_table_lookup(data->active, uri);
- if (info != NULL) {
- d(printf("download of %s still in progress\n", uri));
- return;
- }
-
- d(printf("starting non-interactive download of '%s'\n", uri));
-
- info = g_malloc0 (sizeof (*info));
- info->type = get_receive_type(uri);
- info->bar = NULL;
- info->status = NULL;
- info->uri = g_strdup (uri);
- info->keep = keep;
- info->cancel = camel_operation_new (operation_status, info);
- info->stop = NULL;
- info->data = data;
- info->state = SEND_ACTIVE;
- info->timeout_id = 0;
-
- d(printf("Adding new info %p\n", info));
-
- g_hash_table_insert (data->active, info->uri, info);
-
- switch (info->type) {
- case SEND_RECEIVE:
- mail_fetch_mail (info->uri, info->keep,
- FILTER_SOURCE_INCOMING,
- info->cancel,
- receive_get_folder, info,
- receive_status, info,
- receive_done, info);
- break;
- case SEND_SEND:
- /* todo, store the folder in info? */
- mail_send_queue (outbox_folder, info->uri,
- FILTER_SOURCE_OUTGOING,
- info->cancel,
- receive_get_folder, info,
- receive_status, info,
- receive_done, info);
- break;
- case SEND_UPDATE:
- /* FIXME: error reporting? */
- mail_get_store (info->uri, receive_update_got_store, info);
- break;
- }
-}
diff --git a/mail/mail-send-recv.h b/mail/mail-send-recv.h
deleted file mode 100644
index 8cfea07f60..0000000000
--- a/mail/mail-send-recv.h
+++ /dev/null
@@ -1,45 +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. (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 MAIL_SEND_RECV_H
-#define MAIL_SEND_RECV_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "mail-config.h"
-
-/* send/receive all uri's */
-void mail_send_receive(void);
-/* receive a single uri */
-void mail_receive_uri(const char *uri, int keep);
-/* setup auto receive stuff */
-void mail_autoreceive_setup(void);
-void mail_autoreceive_setup_account(MailConfigService *source);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! MAIL_SEND_RECV_H */
diff --git a/mail/mail-session.c b/mail/mail-session.c
deleted file mode 100644
index 9c5907443e..0000000000
--- a/mail/mail-session.c
+++ /dev/null
@@ -1,513 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-session.c: handles the session information and resource manipulation */
-/*
- * 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 <stdlib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-config.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include "camel/camel-filter-driver.h"
-#include "filter/filter-context.h"
-#include "filter/filter-filter.h"
-#include "mail.h"
-#include "mail-session.h"
-#include "mail-tools.h"
-#include "mail-mt.h"
-
-CamelSession *session;
-
-
-#define MAIL_SESSION_TYPE (mail_session_get_type ())
-#define MAIL_SESSION(obj) (CAMEL_CHECK_CAST((obj), MAIL_SESSION_TYPE, MailSession))
-#define MAIL_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), MAIL_SESSION_TYPE, MailSessionClass))
-#define MAIL_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), MAIL_SESSION_TYPE))
-
-
-typedef struct _MailSession {
- CamelSession parent_object;
-
- GHashTable *passwords;
- gboolean interaction_enabled;
- FILE *filter_logfile;
-} MailSession;
-
-typedef struct _MailSessionClass {
- CamelSessionClass parent_class;
-
-} MailSessionClass;
-
-
-static char *get_password (CamelSession *session, const char *prompt,
- gboolean secret, CamelService *service,
- const char *item, CamelException *ex);
-static void forget_password (CamelSession *session, CamelService *service,
- const char *item, CamelException *ex);
-static gboolean alert_user (CamelSession *session, CamelSessionAlertType type,
- const char *prompt, gboolean cancel);
-static guint register_timeout (CamelSession *session, guint32 interval,
- CamelTimeoutCallback cb, gpointer camel_data);
-static gboolean remove_timeout (CamelSession *session, guint handle);
-static CamelFilterDriver *get_filter_driver (CamelSession *session,
- const char *type,
- CamelException *ex);
-
-
-static char *decode_base64 (char *base64);
-
-static void
-init (MailSession *session)
-{
- char *key, *value;
- void *iter;
-
- session->passwords = g_hash_table_new (g_str_hash, g_str_equal);
-
- iter = gnome_config_private_init_iterator ("/Evolution/Passwords");
- if (iter) {
- while (gnome_config_iterator_next (iter, &key, &value)) {
- g_hash_table_insert (session->passwords,
- decode_base64 (key),
- decode_base64 (value));
- g_free (key);
- g_free (value);
- }
- }
-}
-
-static void
-class_init (MailSessionClass *mail_session_class)
-{
- CamelSessionClass *camel_session_class =
- CAMEL_SESSION_CLASS (mail_session_class);
-
- /* virtual method override */
- camel_session_class->get_password = get_password;
- camel_session_class->forget_password = forget_password;
- camel_session_class->alert_user = alert_user;
- camel_session_class->register_timeout = register_timeout;
- camel_session_class->remove_timeout = remove_timeout;
- camel_session_class->get_filter_driver = get_filter_driver;
-}
-
-static CamelType
-mail_session_get_type (void)
-{
- static CamelType mail_session_type = CAMEL_INVALID_TYPE;
-
- if (mail_session_type == CAMEL_INVALID_TYPE) {
- mail_session_type = camel_type_register (
- camel_session_get_type (),
- "MailSession",
- sizeof (MailSession),
- sizeof (MailSessionClass),
- (CamelObjectClassInitFunc) class_init,
- NULL,
- (CamelObjectInitFunc) init,
- NULL);
- }
-
- return mail_session_type;
-}
-
-
-static char *
-make_key (CamelService *service, const char *item)
-{
- char *key;
-
- if (service)
- key = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
- else
- key = g_strdup (item);
-
- return key;
-}
-
-static char *
-get_password (CamelSession *session, const char *prompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
-{
- MailSession *mail_session = MAIL_SESSION (session);
- gboolean cache = TRUE;
- char *key, *ans;
-
- if (!strcmp (item, "popb4smtp_uri")) {
- char *url = camel_url_to_string(service->url, 0);
- const MailConfigAccount *account = mail_config_get_account_by_transport_url(url);
-
- g_free(url);
- if (account == NULL)
- return NULL;
-
- return g_strdup(account->source->url);
- }
-
- key = make_key (service, item);
- if (!key)
- return NULL;
-
- ans = g_hash_table_lookup (mail_session->passwords, key);
- if (ans) {
- g_free (key);
- return g_strdup (ans);
- }
-
- if (!mail_session->interaction_enabled ||
- !(ans = mail_get_password (service, prompt, secret, &cache))) {
- g_free (key);
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("User canceled operation."));
- return NULL;
- }
-
- if (cache)
- g_hash_table_insert (mail_session->passwords, key, g_strdup (ans));
-
- return ans;
-}
-
-static void
-forget_password (CamelSession *session, CamelService *service,
- const char *item, CamelException *ex)
-{
- MailSession *mail_session = MAIL_SESSION (session);
- char *key = make_key (service, item);
- gpointer old_key, old_data;
-
- if (!g_hash_table_lookup_extended (mail_session->passwords, key,
- &old_key, &old_data))
- return;
-
- g_hash_table_remove (mail_session->passwords, key);
- memset (old_data, 0, strlen (old_data));
- g_free (old_data);
- g_free (old_key);
-}
-
-static gboolean
-alert_user (CamelSession *session, CamelSessionAlertType type,
- const char *prompt, gboolean cancel)
-{
- MailSession *mail_session = MAIL_SESSION (session);
- const char *message_type = NULL;
-
- if (!mail_session->interaction_enabled)
- return FALSE;
-
- switch (type) {
- case CAMEL_SESSION_ALERT_INFO:
- message_type = GNOME_MESSAGE_BOX_INFO;
- break;
- case CAMEL_SESSION_ALERT_WARNING:
- message_type = GNOME_MESSAGE_BOX_WARNING;
- break;
- case CAMEL_SESSION_ALERT_ERROR:
- message_type = GNOME_MESSAGE_BOX_ERROR;
- break;
- }
- return mail_user_message (message_type, prompt, cancel);
-}
-
-/* ******************** */
-
-struct _timeout_data {
- CamelTimeoutCallback cb;
- guint32 interval;
- void *camel_data;
- int result;
-};
-
-struct _timeout_msg {
- struct _mail_msg msg;
-
- CamelTimeoutCallback cb;
- gpointer camel_data;
-};
-
-static void
-timeout_timeout (struct _mail_msg *mm)
-{
- struct _timeout_msg *m = (struct _timeout_msg *)mm;
-
- /* we ignore the callback result, do we care?? no. */
- m->cb (m->camel_data);
-}
-
-static struct _mail_msg_op timeout_op = {
- NULL,
- timeout_timeout,
- NULL,
- NULL,
-};
-
-static gboolean
-camel_timeout (gpointer data)
-{
- struct _timeout_data *td = data;
- struct _timeout_msg *m;
-
- m = mail_msg_new (&timeout_op, NULL, sizeof (*m));
-
- m->cb = td->cb;
- m->camel_data = td->camel_data;
-
- e_thread_put (mail_thread_queued, (EMsg *)m);
-
- return TRUE;
-}
-
-static void
-do_register_timeout(CamelObject *o, void *edata, void *data)
-{
- struct _timeout_data *td = (struct _timeout_data *)edata;
-
- td->result = gtk_timeout_add_full(td->interval, camel_timeout, NULL, td, g_free);
-}
-
-static void
-do_remove_timeout(CamelObject *o, void *edata, void *data)
-{
- gtk_timeout_remove(*((int *)edata));
-}
-
-static guint
-register_timeout (CamelSession *session, guint32 interval, CamelTimeoutCallback cb, gpointer camel_data)
-{
- struct _timeout_data *td;
-
- /* We do this because otherwise the timeout can get called
- * more often than the dispatch thread can get rid of it,
- * leading to timeout calls piling up, and we don't have a
- * good way to watch the return values. It's not cool.
- */
- if (interval < 1000) {
- g_warning("Timeout %u too small, increased to 1000", interval);
- interval = 1000;
- }
-
- /* This is extremely messy, we need to proxy to gtk thread for this */
- td = g_malloc (sizeof (*td));
- td->interval = interval;
- td->result = 0;
- td->cb = cb;
- td->camel_data = camel_data;
-
- mail_msg_wait(mail_proxy_event(do_register_timeout, (CamelObject *)session, td, NULL));
-
- if (td->result == 0) {
- g_free(td);
- return 0;
- }
-
- return td->result;
-}
-
-static gboolean
-remove_timeout (CamelSession *session, guint handle)
-{
- mail_msg_wait(mail_proxy_event(do_remove_timeout, (CamelObject *)session, &handle, NULL));
-
- return TRUE;
-}
-
-static CamelFolder *
-get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
-{
- return mail_tool_uri_to_folder(uri, ex);
-}
-
-static CamelFilterDriver *
-get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
-{
- CamelFilterDriver *driver;
- RuleContext *fc;
- GString *fsearch, *faction;
- FilterRule *rule = NULL;
- char *user, *system;
-
- user = g_strdup_printf ("%s/filters.xml", evolution_dir);
- system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
- fc = (RuleContext *)filter_context_new ();
- rule_context_load (fc, system, user);
- g_free (user);
-
- driver = camel_filter_driver_new ();
- camel_filter_driver_set_folder_func (driver, get_folder, NULL);
-
- if (mail_config_get_filter_log ()) {
- MailSession *ms = (MailSession *)session;
-
- if (ms->filter_logfile == NULL) {
- const char *filename;
-
- filename = mail_config_get_filter_log_path ();
- if (filename)
- ms->filter_logfile = fopen (filename, "a+");
- }
- if (ms->filter_logfile)
- camel_filter_driver_set_logfile (driver, ms->filter_logfile);
- }
-
- fsearch = g_string_new ("");
- faction = g_string_new ("");
-
- while ((rule = rule_context_next_rule (fc, rule, type))) {
- g_string_truncate (fsearch, 0);
- g_string_truncate (faction, 0);
-
- filter_rule_build_code (rule, fsearch);
- filter_filter_build_action ((FilterFilter *)rule, faction);
-
- camel_filter_driver_add_rule (driver, rule->name,
- fsearch->str, faction->str);
- }
-
- g_string_free (fsearch, TRUE);
- g_string_free (faction, TRUE);
-
- gtk_object_unref (GTK_OBJECT (fc));
- return driver;
-}
-
-
-static char *
-decode_base64 (char *base64)
-{
- char *plain, *pad = "==";
- int len, out, state, save;
-
- len = strlen (base64);
- plain = g_malloc0 (len);
- state = save = 0;
- out = base64_decode_step (base64, len, plain, &state, &save);
- if (len % 4) {
- base64_decode_step (pad, 4 - len % 4, plain + out,
- &state, &save);
- }
-
- return plain;
-}
-
-static void
-maybe_remember_password (gpointer key, gpointer password, gpointer url)
-{
- char *path, *key64, *pass64;
- int len, state, save;
-
- len = strlen (url);
- if (strncmp (key, url, len) != 0)
- return;
-
- len = strlen (key);
- key64 = g_malloc0 ((len + 2) * 4 / 3 + 1);
- state = save = 0;
- base64_encode_close (key, len, FALSE, key64, &state, &save);
- path = g_strdup_printf ("/Evolution/Passwords/%s", key64);
- g_free (key64);
-
- len = strlen (password);
- pass64 = g_malloc0 ((len + 2) * 4 / 3 + 1);
- state = save = 0;
- base64_encode_close (password, len, FALSE, pass64, &state, &save);
-
- gnome_config_private_set_string (path, pass64);
- g_free (path);
- g_free (pass64);
-}
-
-void
-mail_session_remember_password (const char *url_string)
-{
- GHashTable *passwords = MAIL_SESSION (session)->passwords;
- CamelURL *url;
- char *simple_url;
-
- if (!passwords)
- return;
-
- url = camel_url_new (url_string, NULL);
- simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
- camel_url_free (url);
-
- g_hash_table_foreach (passwords, maybe_remember_password, simple_url);
- g_free (simple_url);
-}
-
-void
-mail_session_forget_password (const char *key)
-{
- GHashTable *passwords = MAIL_SESSION (session)->passwords;
- gpointer okey, value;
-
- if (g_hash_table_lookup_extended (passwords, key, &okey, &value)) {
- g_hash_table_remove (passwords, key);
- memset (value, 0, strlen (value));
- g_free (okey);
- g_free (value);
- }
-}
-
-void
-mail_session_init (void)
-{
- char *camel_dir;
-
- if (camel_init (evolution_dir, TRUE) != 0)
- exit (0);
-
- session = CAMEL_SESSION (camel_object_new (MAIL_SESSION_TYPE));
-
- camel_dir = g_strdup_printf ("%s/mail", evolution_dir);
- camel_session_construct (session, camel_dir);
- g_free (camel_dir);
-}
-
-void
-mail_session_enable_interaction (gboolean enable)
-{
- MAIL_SESSION (session)->interaction_enabled = enable;
-}
-
-static gboolean
-free_entry (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- memset (value, 0, strlen (value));
- g_free (value);
- return TRUE;
-}
-
-void
-mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
- const char *path)
-{
- GHashTable *passwords = MAIL_SESSION (session)->passwords;
-
- g_hash_table_foreach_remove (passwords, free_entry, NULL);
- gnome_config_private_clean_section ("/Evolution/Passwords");
- gnome_config_sync ();
-}
diff --git a/mail/mail-session.h b/mail/mail-session.h
deleted file mode 100644
index d23c4eaaf3..0000000000
--- a/mail/mail-session.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 MAIL_SESSION_H
-#define MAIL_SESSION_H
-
-#include <glib.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <camel/camel-session.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-void mail_session_init (void);
-void mail_session_enable_interaction (gboolean enable);
-char *mail_session_request_dialog (const char *prompt, gboolean secret,
- const char *key, gboolean async);
-gboolean mail_session_accept_dialog (const char *prompt, const char *key,
- gboolean async);
-void mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
- const char *path);
-void mail_session_remember_password (const char *url);
-
-void mail_session_forget_password (const char *key);
-
-extern CamelSession *session;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! MAIL_SESSION_H */
diff --git a/mail/mail-summary.c b/mail/mail-summary.c
deleted file mode 100644
index 0b8e64a592..0000000000
--- a/mail/mail-summary.c
+++ /dev/null
@@ -1,523 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-summary.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 <bonobo/bonobo-property-bag.h>
-
-#include "camel.h"
-#include "mail.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-#include "mail-summary.h"
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-#include "evolution-storage-listener.h"
-
-#include "filter/vfolder-context.h"
-
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-html-view.h>
-#include <gal/widgets/e-unicode.h>
-
-typedef struct {
- CamelFolder *folder;
-
- char *name;
- char *uri;
- int total, unread;
-} FolderSummary;
-
-typedef struct {
- BonoboObject *component;
- BonoboObject *view;
- EvolutionStorageListener *listener;
-
- GHashTable *folder_to_summary;
- FolderSummary **folders;
- int numfolders;
-
- char *title;
- char *icon;
-
- guint idle;
- gboolean in_summary;
-} MailSummary;
-
-#define SUMMARY_IN() g_print ("IN: %s: %d\n", __FUNCTION__, __LINE__);
-#define SUMMARY_OUT() g_print ("OUT: %s: %d\n", __FUNCTION__, __LINE__);
-
-static int queue_len = 0;
-
-extern char *evolution_dir;
-extern EvolutionStorage *vfolder_storage;
-
-#define MAIN_READER main_compipe[0]
-#define MAIN_WRITER main_compipe[1]
-#define DISPATCH_READER dispatch_compipe[0]
-#define DISPATCH_WRITER dispatch_compipe[1]
-
-static int main_compipe[2] = {-1, -1};
-static int dispatch_compipe[2] = {-1, -1};
-
-GIOChannel *summary_chan_reader = NULL;
-
-static gboolean do_changed (MailSummary *summary);
-
-enum {
- PROPERTY_TITLE,
- PROPERTY_ICON
-};
-
-/* Read a message from the pipe */
-static gboolean
-read_msg (GIOChannel *source,
- GIOCondition condition,
- gpointer user_data)
-{
- MailSummary *summary;
- int size;
-
- summary = g_new0 (MailSummary, 1);
- g_io_channel_read (source, (gchar *) summary,
- sizeof (MailSummary) / sizeof (gchar), &size);
-
- if (size != sizeof (MailSummary)) {
- g_warning (_("Incomplete message written on pipe!"));
- return TRUE;
- }
-
- do_changed (summary);
- g_free (summary);
-
- return TRUE;
-}
-
-/* check_compipes: */
-static void
-check_compipes (void)
-{
- if (MAIN_READER < 0) {
- if (pipe (main_compipe) < 0) {
- g_warning ("Call to pipe failed");
- return;
- }
-
- summary_chan_reader = g_io_channel_unix_new (MAIN_READER);
- g_io_add_watch (summary_chan_reader, G_IO_IN, read_msg, NULL);
- }
-
- if (DISPATCH_READER < 0) {
- if (pipe (dispatch_compipe) < 0) {
- g_warning ("Call to pipe failed");
- return;
- }
- }
-}
-
-static void
-folder_free (FolderSummary *folder)
-{
- g_free (folder->name);
- g_free (folder->uri);
-}
-
-static void
-summary_free (MailSummary *summary)
-{
- int i;
-
- for (i = 0; i < summary->numfolders; i++){
- folder_free (summary->folders[i]);
- }
-
- g_free (summary->folders);
- g_free (summary->title);
- g_free (summary->icon);
-
- g_hash_table_destroy (summary->folder_to_summary);
-}
-
-static void
-view_destroy_cb (GtkObject *object,
- MailSummary *summary)
-{
- summary_free (summary);
- g_free (summary);
-}
-
-static char *
-generate_html_summary (MailSummary *summary)
-{
- char *ret_html = NULL, *tmp;
- FolderSummary *fs;
- int i;
-
- summary->in_summary = TRUE;
- /* Inbox first */
- fs = summary->folders[0];
-
- g_print ("%p: %p\n", fs, fs->name);
- g_print ("unread: %d\n", fs->unread);
- g_print ("total: %d\n", fs->total);
-
- tmp = g_strdup_printf ("<table><tr><td><b><a href=\"view://evolution:/local/Inbox\">%s</a>:</b>"
- "<td align=\"right\">%d/%d</td></tr>",
- fs->name, fs->unread, fs->total);
-
- ret_html = g_strdup (tmp);
- for (i = 1; i < summary->numfolders; i++) {
- char *tmp2;
-
- fs = summary->folders[i];
- tmp2 = g_strdup_printf ("<tr><td><a href=\"view://%s\">%s</a>:</td>"
- "<td align=\"right\">%d/%d</td></tr>",
- fs->uri, fs->name, fs->unread, fs->total);
-
- tmp = ret_html;
- ret_html = g_strconcat (ret_html, tmp2, NULL);
- g_free (tmp);
- g_free (tmp2);
- }
-
- tmp = ret_html;
- ret_html = g_strconcat (ret_html, "</table>", NULL);
- g_free (tmp);
-
- summary->in_summary = FALSE;
- return ret_html;
-}
-
-static gboolean
-do_changed (MailSummary *summary)
-{
- char *ret_html;
-
- ret_html = generate_html_summary (summary);
- executive_summary_html_view_set_html(EXECUTIVE_SUMMARY_HTML_VIEW(summary->view), (const char *) ret_html);
- g_free (ret_html);
-
- summary->idle = 0;
- return TRUE;
-}
-
-/* These two callbacks are called from the Camel thread,
- which can't make any CORBA calls, or else ORBit locks up,
- and likewise the thread that can call ORBit, cannot call
- camel.
-
- So, when the callbacks are triggered, they generate a MailSummary
- structure and write this onto a pipe. The ORBit calling thread
- detects when something is written to the pipe and creates its own
- MailSummary structure, and calls the appropriate CORBA calls.
-
- Same theory as mail-threads.c, but a lot less complicated
- as there is only one way communication, and only one type of message
-*/
-static void
-folder_changed_cb (CamelObject *folder,
- gpointer event_data,
- gpointer user_data)
-{
- MailSummary *summary;
- FolderSummary *fs;
-
- summary = (MailSummary *) user_data;
- fs = g_hash_table_lookup (summary->folder_to_summary, folder);
- if (fs == NULL) {
- g_warning ("%s: Unknown folder", __FUNCTION__);
- return;
- }
-
- fs->total = camel_folder_get_message_count (fs->folder);
- fs->unread = camel_folder_get_unread_message_count (fs->folder);
-
- write (MAIN_WRITER, summary, sizeof (MailSummary));
- queue_len++;
-
- return;
-}
-
-static void
-message_changed_cb (CamelObject *folder,
- gpointer event_data,
- gpointer user_data)
-{
- MailSummary *summary;
- FolderSummary *fs;
-
- summary = (MailSummary *)user_data;
- fs = g_hash_table_lookup (summary->folder_to_summary, folder);
- if (fs == NULL) {
- g_warning ("%s: Unknown folder.", __FUNCTION__);
- return;
- }
-
- fs->unread = camel_folder_get_unread_message_count (fs->folder);
- fs->total = camel_folder_get_message_count (fs->folder);
-
- write (MAIN_WRITER, summary, sizeof (MailSummary));
- queue_len++;
-
- return;
-}
-
-static void
-generate_folder_summaries (MailSummary *summary)
-{
- int numfolders = 1; /* Always at least the Inbox */
- char *user, *system;
- FilterRule *rule;
- VfolderContext *context;
- FolderSummary *fs;
- CamelException *ex;
- int i;
-
- user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
- system = EVOLUTION_DATADIR "/evolution/vfoldertypes.xml";
-
- context = vfolder_context_new ();
- rule_context_load ((RuleContext *)context, system, user);
- g_free (user);
-
- rule = NULL;
- while ((rule = rule_context_next_rule ((RuleContext *)context, rule, NULL))){
- g_print ("rule->name: %s\n", rule->name);
- numfolders++;
- }
-
- if (summary->folders != NULL) {
- int i;
-
- for (i = 0; i < summary->numfolders; i++){
- folder_free (summary->folders[i]);
- }
-
- g_free (summary->folders);
- }
-
- summary->folders = g_new (FolderSummary *, numfolders);
-
- /* Inbox */
- fs = summary->folders[0] = g_new (FolderSummary, 1);
- fs->name = g_strdup ("Inbox");
- g_print ("%p: %s(%p)\n", fs, fs->name, fs->name);
- fs->uri = NULL;
- ex = camel_exception_new ();
- fs->folder = mail_tool_get_local_inbox (ex);
-
- fs->total = camel_folder_get_message_count (fs->folder);
- fs->unread = camel_folder_get_unread_message_count (fs->folder);
- camel_exception_free (ex);
- camel_object_hook_event (CAMEL_OBJECT (fs->folder), "folder_changed",
- (CamelObjectEventHookFunc) folder_changed_cb,
- summary);
- camel_object_hook_event (CAMEL_OBJECT (fs->folder), "message_changed",
- (CamelObjectEventHookFunc) message_changed_cb,
- summary);
- g_hash_table_insert (summary->folder_to_summary, fs->folder, fs);
-
-
- summary->numfolders = 1;
-
- for (i = 1, rule = NULL; i < numfolders; i++) {
- char *uri;
-
- ex = camel_exception_new ();
- fs = summary->folders[i] = g_new (FolderSummary, 1);
- rule = rule_context_next_rule ((RuleContext *)context, rule, NULL);
- fs->name = g_strdup (rule->name);
-
- uri = g_strconcat ("vfolder:", rule->name, NULL);
- fs->folder = vfolder_uri_to_folder (uri, ex);
- fs->uri = g_strconcat ("evolution:/VFolders/", rule->name, NULL);
- g_free (uri);
-
- fs->total = camel_folder_get_message_count (fs->folder);
- fs->unread = camel_folder_get_unread_message_count (fs->folder);
-
- /* Connect to each folder */
- camel_object_hook_event (CAMEL_OBJECT (fs->folder),
- "folder_changed",
- (CamelObjectEventHookFunc) folder_changed_cb,
- summary);
- camel_object_hook_event (CAMEL_OBJECT (fs->folder),
- "message_changed",
- (CamelObjectEventHookFunc) message_changed_cb,
- summary);
- g_hash_table_insert (summary->folder_to_summary, fs->folder, fs);
- summary->numfolders++;
-
- camel_exception_free (ex);
- }
-
- gtk_object_destroy (GTK_OBJECT (context));
-}
-
-static void
-get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- MailSummary *summary = (MailSummary *) user_data;
-
- switch (arg_id) {
- case PROPERTY_TITLE:
- BONOBO_ARG_SET_STRING (arg, summary->title);
- break;
-
- case PROPERTY_ICON:
- BONOBO_ARG_SET_STRING (arg, summary->icon);
- break;
-
- default:
- break;
- }
-}
-
-/* This code may play with the threads wrongly...
- if the mail component locks when you use the summary
- remove this define */
-#define DETECT_NEW_VFOLDERS
-#ifdef DETECT_NEW_VFOLDERS
-
-/* Check that we can generate a new summary
- and keep coming back until we can. */
-static gboolean
-idle_check (gpointer data)
-{
- MailSummary *summary = (MailSummary *) data;
-
- if (summary->in_summary == TRUE)
- return TRUE;
-
- generate_folder_summaries (summary);
- write (MAIN_WRITER, summary, sizeof (MailSummary));
- queue_len++;
- summary->idle = 0;
-
- return FALSE;
-}
-
-static void
-new_folder_cb (EvolutionStorageListener *listener,
- const char *path,
- const GNOME_Evolution_Folder *folder,
- MailSummary *summary)
-{
- g_print ("New folder: %s\n", path);
-
- if (summary->idle == 0)
- summary->idle = g_idle_add ((GSourceFunc) idle_check, summary);
-}
-
-static void
-removed_folder_cb (EvolutionStorageListener *listener,
- const char *path,
- MailSummary *summary)
-{
- g_print ("Removed folder: %s\n", path);
-
- if (summary->idle == 0)
- summary->idle = g_idle_add ((GSourceFunc) idle_check, summary);
-}
-#endif
-
-BonoboObject *
-create_summary_view (ExecutiveSummaryComponentFactory *_factory,
- void *closure)
-{
- GNOME_Evolution_Storage corba_local_objref;
- GNOME_Evolution_StorageListener corba_object;
- CORBA_Environment ev;
- BonoboObject *component, *view;
- BonoboPropertyBag *bag;
- BonoboEventSource *event_source;
- MailSummary *summary;
-
- summary = g_new (MailSummary, 1);
- summary->folders = 0;
- summary->in_summary = FALSE;
- summary->folder_to_summary = g_hash_table_new (NULL, NULL);
- summary->title = e_utf8_from_locale_string (_("Mail Summary"));
- summary->icon = g_strdup ("envelope.png");
- summary->idle = 0;
-
- check_compipes ();
-
- component = executive_summary_component_new ();
- summary->component = component;
-
- event_source = bonobo_event_source_new ();
-
- view = executive_summary_html_view_new_full (event_source);
- bonobo_object_add_interface (component, view);
- summary->view = view;
- gtk_signal_connect (GTK_OBJECT (view), "destroy",
- GTK_SIGNAL_FUNC (view_destroy_cb), summary);
-
- bag = bonobo_property_bag_new_full (get_property, NULL,
- event_source, summary);
- bonobo_property_bag_add (bag,
- "window_title", PROPERTY_TITLE,
- BONOBO_ARG_STRING, NULL,
- "The title of this component's window",
- BONOBO_PROPERTY_READABLE);
- bonobo_property_bag_add (bag,
- "window_icon", PROPERTY_ICON,
- BONOBO_ARG_STRING, NULL,
- "The icon for this component's window",
- BONOBO_PROPERTY_READABLE);
- bonobo_object_add_interface (component, BONOBO_OBJECT(bag));
-
-#ifdef DETECT_NEW_VFOLDERS
- summary->listener = evolution_storage_listener_new ();
- gtk_signal_connect (GTK_OBJECT (summary->listener), "new_folder",
- GTK_SIGNAL_FUNC (new_folder_cb), summary);
- gtk_signal_connect (GTK_OBJECT (summary->listener), "removed_folder",
- GTK_SIGNAL_FUNC (removed_folder_cb), summary);
-
- corba_object = evolution_storage_listener_corba_objref (summary->listener);
-
- CORBA_exception_init (&ev);
- corba_local_objref = bonobo_object_corba_objref (BONOBO_OBJECT (vfolder_storage));
-
- GNOME_Evolution_Storage_addListener (corba_local_objref,
- corba_object, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Cannot add a listener to the vfolder storage.");
- }
- CORBA_exception_free (&ev);
-#endif
-
- if (summary->idle == 0)
- summary->idle = g_idle_add ((GSourceFunc) idle_check, summary);
-
- return component;
-}
diff --git a/mail/mail-summary.h b/mail/mail-summary.h
deleted file mode 100644
index d9f098303f..0000000000
--- a/mail/mail-summary.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* mail-summary.h
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * 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 __MAIL_SUMMARY_H__
-#define __MAIL_SUMMARY_H__
-
-#include <evolution-services/executive-summary-component.h>
-
-BonoboObject *create_summary_view (ExecutiveSummaryComponentFactory *factory,
- void *closure);
-
-#endif
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
deleted file mode 100644
index 83b787019d..0000000000
--- a/mail/mail-tools.c
+++ /dev/null
@@ -1,401 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * Peter Williams <peterw@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2000 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 <unistd.h>
-#include <pthread.h>
-#include <ctype.h>
-#include <errno.h>
-#include <gal/widgets/e-unicode.h>
-#include "camel/camel.h"
-#include "camel/camel-vee-folder.h"
-#include "mail-vfolder.h"
-#include "filter/vfolder-rule.h"
-#include "filter/vfolder-context.h"
-#include "filter/filter-option.h"
-#include "filter/filter-input.h"
-#include "mail.h" /*session*/
-#include "mail-tools.h"
-#include "mail-local.h"
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "e-util/e-html-utils.h"
-
-/* **************************************** */
-
-gchar *
-mail_tool_get_local_movemail_path (void)
-{
- static gint count = 0;
- static pthread_mutex_t movemail_path_lock = PTHREAD_MUTEX_INITIALIZER;
- gint my_count;
-
- /* Ah, the joys of being multi-threaded... */
- pthread_mutex_lock (&movemail_path_lock);
- my_count = count;
- ++count;
- pthread_mutex_unlock (&movemail_path_lock);
-
- return g_strdup_printf ("%s/local/Inbox/movemail.%d", evolution_dir, my_count);
-}
-
-CamelFolder *
-mail_tool_get_local_inbox (CamelException *ex)
-{
- gchar *url;
- CamelFolder *folder;
-
- url = g_strdup_printf("file://%s/local/Inbox", evolution_dir);
- folder = mail_tool_uri_to_folder (url, ex);
- g_free (url);
- return folder;
-}
-
-CamelFolder *
-mail_tool_get_inbox (const gchar *url, CamelException *ex)
-{
- CamelStore *store;
- CamelFolder *folder;
-
- store = camel_session_get_store (session, url, ex);
- if (!store)
- return NULL;
-
- folder = camel_store_get_inbox (store, ex);
- camel_object_unref (CAMEL_OBJECT (store));
-
- return folder;
-}
-
-CamelFolder *
-mail_tool_get_trash (const gchar *url, CamelException *ex)
-{
- CamelStore *store;
- CamelFolder *trash;
-
- store = camel_session_get_store (session, url, ex);
- if (!store)
- return NULL;
-
- trash = camel_store_get_trash (store, ex);
- camel_object_unref (CAMEL_OBJECT (store));
-
- return trash;
-}
-
-/* why is this function so stupidly complex when allthe work is done elsehwere? */
-char *
-mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
-{
- gchar *dest_path;
- const gchar *source;
- struct stat sb;
-#ifndef MOVEMAIL_PATH
- int tmpfd;
-#endif
- g_return_val_if_fail (strncmp (source_url, "mbox:", 5) == 0, NULL);
-
- /* Set up our destination. */
- dest_path = mail_tool_get_local_movemail_path();
-
- /* Create a new movemail mailbox file of 0 size */
-
-#ifndef MOVEMAIL_PATH
- tmpfd = open (dest_path, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
-
- if (tmpfd == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create temporary mbox `%s': %s"),
- dest_path, g_strerror (errno));
- g_free (dest_path);
- return NULL;
- }
-
- close (tmpfd);
-#endif
-
- /* Skip over "mbox:" plus host part (if any) of url. */
- source = source_url + 5;
- if (!strncmp (source, "//", 2))
- source = strchr (source + 2, '/');
-
- /* Movemail from source (source_url) to dest_path */
- camel_movemail (source, dest_path, ex);
-
- if (stat (dest_path, &sb) < 0 || sb.st_size == 0) {
- unlink (dest_path); /* Clean up the movemail.foo file. */
- g_free (dest_path);
- return NULL;
- }
-
- if (camel_exception_is_set (ex)) {
- g_free (dest_path);
- return NULL;
- }
-
- return dest_path;
-}
-
-char *
-mail_tool_generate_forward_subject (CamelMimeMessage *msg)
-{
- const char *subject;
- char *fwd_subj;
- const int max_subject_length = 1024;
-
- subject = camel_mime_message_get_subject(msg);
-
- if (subject && *subject) {
- /* Truncate insanely long subjects */
- if (strlen (subject) < max_subject_length)
- fwd_subj = g_strdup_printf ("[Fwd: %s]", subject);
- else
- fwd_subj = g_strdup_printf ("[Fwd: %.*s...]", max_subject_length, subject);
- } else {
- const CamelInternetAddress *from;
- char *fromstr;
-
- from = camel_mime_message_get_from (msg);
- if (from) {
- fromstr = camel_address_format (CAMEL_ADDRESS (from));
- fwd_subj = g_strdup_printf ("[Fwd: %s]", fromstr);
- g_free (fromstr);
- } else
- fwd_subj = g_strdup ("[Fwd: No Subject]");
- }
-
- return fwd_subj;
-}
-
-XEvolution *
-mail_tool_remove_xevolution_headers (CamelMimeMessage *message)
-{
- XEvolution *xev;
-
- xev = g_new (XEvolution, 1);
- xev->flags = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution"));
- xev->source = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Source"));
- xev->transport = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Transport"));
- xev->account = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"));
- xev->fcc = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc"));
- xev->format = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Format"));
-
- /* rip off the X-Evolution* headers */
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution");
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Source");
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Transport");
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Account");
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc");
- camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Format");
-
- return xev;
-}
-
-void
-mail_tool_restore_xevolution_headers (CamelMimeMessage *message, XEvolution *xev)
-{
- if (xev->flags)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution", xev->flags);
- if (xev->source)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Source", xev->source);
- if (xev->transport)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", xev->transport);
- if (xev->account)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Account", xev->account);
- if (xev->fcc)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", xev->fcc);
- if (xev->format)
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Format", xev->format);
-}
-
-void
-mail_tool_destroy_xevolution (XEvolution *xev)
-{
- g_free (xev->flags);
- g_free (xev->source);
- g_free (xev->transport);
- g_free (xev->account);
- g_free (xev->fcc);
- g_free (xev);
-}
-
-CamelMimePart *
-mail_tool_make_message_attachment (CamelMimeMessage *message)
-{
- CamelMimePart *part;
- const char *subject;
- XEvolution *xev;
- char *desc;
-
- subject = camel_mime_message_get_subject (message);
- if (subject) {
- char *fmt;
-
- fmt = e_utf8_from_locale_string (_("Forwarded message - %s"));
- desc = g_strdup_printf (fmt, subject);
- g_free (fmt);
- } else {
- desc = e_utf8_from_locale_string (_("Forwarded message"));
- }
-
- /* rip off the X-Evolution headers */
- xev = mail_tool_remove_xevolution_headers (message);
- mail_tool_destroy_xevolution (xev);
-
- part = camel_mime_part_new ();
- camel_mime_part_set_disposition (part, "inline");
- camel_mime_part_set_description (part, desc);
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- CAMEL_DATA_WRAPPER (message));
- camel_mime_part_set_content_type (part, "message/rfc822");
- g_free (desc);
-
- return part;
-}
-
-CamelFolder *
-mail_tool_uri_to_folder (const char *uri, CamelException *ex)
-{
- CamelURL *url;
- CamelStore *store = NULL;
- CamelFolder *folder = NULL;
- int offset = 0;
-
- g_return_val_if_fail (uri != NULL, NULL);
-
- /* This hack is still needed for file:/ since it's its own EvolutionStorage type */
- if (!strncmp (uri, "vtrash:", 7))
- offset = 7;
-
- url = camel_url_new (uri + offset, ex);
- if (!url) {
- return NULL;
- }
-
- store = camel_session_get_store (session, uri + offset, ex);
- if (store) {
- const char *name;
-
- /* if we have a fragment, then the path is actually used by the store,
- so the fragment is the path to the folder instead */
- if (url->fragment) {
- name = url->fragment;
- } else {
- if (url->path && *url->path)
- name = url->path + 1;
- else
- name = "";
- }
-
- if (offset)
- folder = camel_store_get_trash (store, ex);
- else
- folder = camel_store_get_folder (store, name, 0, ex);
- camel_object_unref (CAMEL_OBJECT (store));
- }
-
- if (folder)
- mail_note_folder (folder);
-
- camel_url_free (url);
-
- return folder;
-}
-
-/**
- * mail_tool_quote_message:
- * @message: mime message to quote
- * @fmt: credits format - example: "On %s, %s wrote:\n"
- * @Varargs: arguments
- *
- * Returns an allocated buffer containing the quoted message.
- */
-gchar *
-mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...)
-{
- CamelDataWrapper *contents;
- gboolean want_plain;
- gchar *text;
-
- want_plain = !mail_config_get_send_html ();
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- /* We pass "want_plain" for "cite", since if it's HTML, we'll
- * do the citing ourself below.
- */
- text = mail_get_message_body (contents, want_plain, want_plain);
-
- /* Set the quoted reply text. */
- if (text) {
- gchar *ret_text, *credits = NULL;
-
- /* create credits */
- if (fmt) {
- va_list ap;
-
- va_start (ap, fmt);
- credits = g_strdup_vprintf (fmt, ap);
- va_end (ap);
- }
-
- ret_text = g_strdup_printf ("%s<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->"
- "<font color=\"%06x\">\n%s%s%s</font>"
- "<!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->",
- credits ? credits : "",
- mail_config_get_citation_color (),
- want_plain ? "" : "<blockquote><i>",
- text,
- want_plain ? "" : "</i></blockquote>");
- g_free (text);
- g_free (credits);
- return ret_text;
- }
-
- return NULL;
-}
-
-/**
- * mail_tool_forward_message:
- * @message: mime message to forward
- * @quoted: whether to forwarded it quoted (%TRUE) or inline (%FALSE)
- *
- * Returns an allocated buffer containing the forwarded message.
- */
-gchar *
-mail_tool_forward_message (CamelMimeMessage *message, gboolean quoted)
-{
- gchar *title, *body, *ret;
-
- body = mail_get_message_body (CAMEL_DATA_WRAPPER (message),
- !mail_config_get_send_html (),
- quoted);
- title = e_utf8_from_locale_string (_("Forwarded Message"));
- ret = g_strdup_printf ("-----%s-----<br>%s", title, body ? body : "");
- g_free (title);
- g_free (body);
- return ret;
-}
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
deleted file mode 100644
index 7d795cafa5..0000000000
--- a/mail/mail-tools.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Peter Williams <peterw@ximian.com>
- *
- * Copyright 2000 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 MAIL_TOOLS_H
-#define MAIL_TOOLS_H
-
-#include <camel/camel.h>
-#include <camel/camel-filter-driver.h> /*eek*/
-
-typedef struct _xevolution {
- char *flags;
- char *source;
- char *transport;
- char *account;
- char *fcc;
- char *format;
-} XEvolution;
-
-/* Get the filename for our movemail folder or storage */
-gchar *mail_tool_get_local_movemail_path (void);
-
-/* Get the CamelFolder for the local inbox */
-CamelFolder *mail_tool_get_local_inbox (CamelException *ex);
-
-/* Get the "inbox" for a url (uses global session) */
-CamelFolder *mail_tool_get_inbox (const gchar *url, CamelException *ex);
-
-/* Get the "trash" for a url (uses global session) */
-CamelFolder *mail_tool_get_trash (const gchar *url, CamelException *ex);
-
-/* Does a camel_movemail into the local movemail folder
- * and returns the path to the new movemail folder that was created. which shoudl be freed later */
-char *
-mail_tool_do_movemail (const gchar *source_url, CamelException *ex);
-
-/* Transfers all the messages from source into dest;
- * source is emptied and synced. */
-void
-mail_tool_move_folder_contents (CamelFolder *source, CamelFolder *dest, gboolean use_cache, CamelException *ex);
-
-XEvolution *mail_tool_remove_xevolution_headers (CamelMimeMessage *message);
-void mail_tool_restore_xevolution_headers (CamelMimeMessage *message, XEvolution *xev);
-void mail_tool_destroy_xevolution (XEvolution *xev);
-
-/* Generates the subject for a message forwarding @msg */
-gchar *
-mail_tool_generate_forward_subject (CamelMimeMessage *msg);
-
-/* Make a message into an attachment */
-CamelMimePart *
-mail_tool_make_message_attachment (CamelMimeMessage *message);
-
-/* Parse the ui into a real CamelFolder any way we know how. */
-CamelFolder *
-mail_tool_uri_to_folder (const char *uri, CamelException *ex);
-
-GHashTable *
-mail_lookup_url_table (CamelMimeMessage *mime_message);
-
-gchar *mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...);
-
-gchar *mail_tool_forward_message (CamelMimeMessage *message, gboolean quoted);
-
-#endif
diff --git a/mail/mail-types.h b/mail/mail-types.h
deleted file mode 100644
index 6bcd77df5b..0000000000
--- a/mail/mail-types.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Copyright 2000 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 MAIL_TYPES_H
-#define MAIL_TYPES_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-
-typedef struct _FolderBrowser FolderBrowser;
-typedef struct _MessageBrowser MessageBrowser;
-typedef struct _SubscribeDialog SubscribeDialog;
-typedef struct _MessageList MessageList;
-typedef struct _MailDisplay MailDisplay;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_TYPES_H */
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
deleted file mode 100644
index 4bb56e8983..0000000000
--- a/mail/mail-vfolder.c
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- Copyright 2000, 2001 Ximian Inc.
-
- Author: Michael Zucchi <notzed@ximian.com>
-
- code for managing vfolders
-
- NOTE: dont run this through fucking indent.
-*/
-
-#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-stock.h>
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-
-#include "evolution-shell-component.h"
-#include "folder-browser.h"
-#include "mail-vfolder.h"
-#include "mail-tools.h"
-#include "mail-autofilter.h"
-#include "mail-folder-cache.h"
-#include "mail.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
-
-#include "camel/camel.h"
-#include "camel/camel-remote-store.h"
-#include "camel/camel-vee-folder.h"
-#include "camel/camel-vee-store.h"
-
-#include "filter/vfolder-context.h"
-#include "filter/vfolder-editor.h"
-
-#include "e-util/e-unicode-i18n.h"
-
-#define d(x) x
-
-static VfolderContext *context; /* context remains open all time */
-static CamelStore *vfolder_store; /* the 1 static vfolder store */
-
-/* lock for accessing shared resources (below) */
-static pthread_mutex_t vfolder_lock = PTHREAD_MUTEX_INITIALIZER;
-
-static GList *source_folders_remote; /* list of source folder uri's - remote ones */
-static GList *source_folders_local; /* list of source folder uri's - local ones */
-static GHashTable *vfolder_hash;
-
-extern EvolutionShellClient *global_shell_client;
-
-/* more globals ... */
-extern char *evolution_dir;
-extern CamelSession *session;
-
-static void rule_changed(FilterRule *rule, CamelFolder *folder);
-
-#define LOCK() pthread_mutex_lock(&vfolder_lock);
-#define UNLOCK() pthread_mutex_unlock(&vfolder_lock);
-
-/* ********************************************************************** */
-
-struct _setup_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- char *query;
- GList *sources_uri;
- GList *sources_folder;
-};
-
-static char *
-vfolder_setup_desc(struct _mail_msg *mm, int done)
-{
- struct _setup_msg *m = (struct _setup_msg *)mm;
-
- return g_strdup_printf(_("Setting up vfolder: %s"), m->folder->full_name);
-}
-
-static void
-vfolder_setup_do(struct _mail_msg *mm)
-{
- struct _setup_msg *m = (struct _setup_msg *)mm;
- GList *l, *list = NULL;
- CamelFolder *folder;
-
- d(printf("Setting up vfolder: %s\n", m->folder->full_name));
-
- camel_vee_folder_set_expression((CamelVeeFolder *)m->folder, m->query);
-
- l = m->sources_uri;
- while (l) {
- (printf(" Adding uri: %s\n", (char *)l->data));
- folder = mail_tool_uri_to_folder(l->data, &mm->ex);
- if (folder) {
- list = g_list_append(list, folder);
- } else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
- camel_exception_clear(&mm->ex);
- }
- l = l->next;
- }
-
- l = m->sources_folder;
- while (l) {
- d(printf(" Adding folder: %s\n", ((CamelFolder *)l->data)->full_name));
- camel_object_ref((CamelObject *)l->data);
- list = g_list_append(list, l->data);
- l = l->next;
- }
-
- camel_vee_folder_set_folders((CamelVeeFolder *)m->folder, list);
-
- l = list;
- while (l) {
- camel_object_unref((CamelObject *)l->data);
- l = l->next;
- }
- g_list_free(list);
-}
-
-static void
-vfolder_setup_done(struct _mail_msg *mm)
-{
- struct _setup_msg *m = (struct _setup_msg *)mm;
-
- m = m;
-}
-
-static void
-vfolder_setup_free (struct _mail_msg *mm)
-{
- struct _setup_msg *m = (struct _setup_msg *)mm;
- GList *l;
-
- camel_object_unref((CamelObject *)m->folder);
- g_free(m->query);
-
- l = m->sources_uri;
- while (l) {
- g_free(l->data);
- l = l->next;
- }
- g_list_free(m->sources_uri);
-
- l = m->sources_folder;
- while (l) {
- camel_object_unref(l->data);
- l = l->next;
- }
- g_list_free(m->sources_folder);
-}
-
-static struct _mail_msg_op vfolder_setup_op = {
- vfolder_setup_desc,
- vfolder_setup_do,
- vfolder_setup_done,
- vfolder_setup_free,
-};
-
-static int
-vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder)
-{
- struct _setup_msg *m;
- int id;
-
- m = mail_msg_new(&vfolder_setup_op, NULL, sizeof (*m));
- m->folder = folder;
- camel_object_ref((CamelObject *)folder);
- m->query = g_strdup(query);
- m->sources_uri = sources_uri;
- m->sources_folder = sources_folder;
-
- id = m->msg.seq;
- e_thread_put(mail_thread_queued_slow, (EMsg *)m);
-
- return id;
-}
-
-/* ********************************************************************** */
-
-struct _adduri_msg {
- struct _mail_msg msg;
-
- char *uri;
- GList *folders;
-};
-
-static char *
-vfolder_adduri_desc(struct _mail_msg *mm, int done)
-{
- struct _adduri_msg *m = (struct _adduri_msg *)mm;
-
- return g_strdup_printf(_("Updating vfolders for uri: %s"), m->uri);
-}
-
-static void
-vfolder_adduri_do(struct _mail_msg *mm)
-{
- struct _adduri_msg *m = (struct _adduri_msg *)mm;
- GList *l;
- CamelFolder *folder;
- extern CamelFolder *drafts_folder, *outbox_folder, *sent_folder;
-
- d(printf("Adding uri to vfolder: %s\n", m->uri));
-
- if (!mail_note_get_folder_from_uri(m->uri, &folder)) {
- g_warning("Folder '%s' disappeared while I was adding it to my vfolder", m->uri);
- return;
- }
-
- if (folder == NULL)
- folder = mail_tool_uri_to_folder(m->uri, &mm->ex);
-
- if (folder != NULL) {
- if (folder != drafts_folder && folder != outbox_folder && folder != sent_folder) {
- l = m->folders;
- while (l) {
- camel_vee_folder_add_folder((CamelVeeFolder *)l->data, folder);
- l = l->next;
- }
- }
- camel_object_unref((CamelObject *)folder);
- }
-}
-
-static void
-vfolder_adduri_done(struct _mail_msg *mm)
-{
- struct _adduri_msg *m = (struct _adduri_msg *)mm;
-
- m = m;
-}
-
-static void
-vfolder_adduri_free (struct _mail_msg *mm)
-{
- struct _adduri_msg *m = (struct _adduri_msg *)mm;
-
- g_list_foreach(m->folders, (GFunc)camel_object_unref, NULL);
- g_list_free(m->folders);
- g_free(m->uri);
-}
-
-static struct _mail_msg_op vfolder_adduri_op = {
- vfolder_adduri_desc,
- vfolder_adduri_do,
- vfolder_adduri_done,
- vfolder_adduri_free,
-};
-
-static int
-vfolder_adduri(const char *uri, GList *folders)
-{
- struct _adduri_msg *m;
- int id;
-
- m = mail_msg_new(&vfolder_adduri_op, NULL, sizeof (*m));
- m->folders = folders;
- m->uri = g_strdup(uri);
-
- id = m->msg.seq;
- e_thread_put(mail_thread_queued_slow, (EMsg *)m);
-
- return id;
-}
-
-/* ********************************************************************** */
-
-/* So, uh, apparently g_list_find_custom expect the compare func to return 0 to mean true? */
-static GList *
-my_list_find(GList *l, const char *uri, GCompareFunc cmp)
-{
- while (l) {
- if (cmp(l->data, uri))
- break;
- l = l->next;
- }
- return l;
-}
-
-/* called when a new uri becomes available */
-void
-mail_vfolder_add_uri(CamelStore *store, const char *uri)
-{
- FilterRule *rule;
- const char *source;
- CamelVeeFolder *vf;
- GList *folders = NULL;
- int remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
- GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name;
-
- if (CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7))
- return;
-
- LOCK();
-
- printf("Adding uri to check: %s\n", uri);
-
- /* maintain the source folders lists for changed rules later on */
- if (remote) {
- if (my_list_find(source_folders_remote, (void *)uri, uri_cmp) == NULL)
- source_folders_remote = g_list_prepend(source_folders_remote, g_strdup(uri));
- } else {
- if (my_list_find(source_folders_local, (void *)uri, uri_cmp) == NULL)
- source_folders_local = g_list_prepend(source_folders_local, g_strdup(uri));
- }
-
- rule = NULL;
- while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
- int found = FALSE;
-
- if (rule->source
- && ((!strcmp(rule->source, "local") && !remote)
- || (!strcmp(rule->source, "remote_active") && remote)
- || (!strcmp(rule->source, "local_remote_active"))))
- found = TRUE;
-
- /* we check using the store uri_cmp since its more accurate */
- source = NULL;
- while ( !found && (source = vfolder_rule_next_source((VfolderRule *)rule, source)) )
- found = uri_cmp(uri, source);
-
- if (found) {
- vf = g_hash_table_lookup(vfolder_hash, rule->name);
- g_assert(vf);
- camel_object_ref((CamelObject *)vf);
- folders = g_list_prepend(folders, vf);
- }
- }
-
- UNLOCK();
-
- if (folders != NULL)
- vfolder_adduri(uri, folders);
-}
-
-/* called when a uri is removed from a store */
-void
-mail_vfolder_remove_uri(CamelStore *store, const char *uri)
-{
- int remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
- GCompareFunc uri_cmp = CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->compare_folder_name;
- GList *link;
- FilterRule *rule;
- const char *source;
- CamelVeeFolder *vf;
- GString *changed;
-
- if (CAMEL_IS_VEE_STORE(store) || !strncmp(uri, "vtrash:", 7))
- return;
-
- printf("Removing uri to check: %s\n", uri);
-
- g_assert(pthread_self() == mail_gui_thread);
-
- changed = g_string_new("");
-
- LOCK();
-
- /* maintain remote/local lists */
- if (remote) {
- if ((link = my_list_find(source_folders_remote, (void *)uri, uri_cmp)) != NULL) {
- g_free(link->data);
- source_folders_remote = g_list_remove_link(source_folders_remote, link);
- }
- } else {
- if ((link = my_list_find(source_folders_local, (void *)uri, uri_cmp)) != NULL) {
- g_free(link->data);
- source_folders_local = g_list_remove_link(source_folders_local, link);
- }
- }
-
- printf("vfolder remove uri: %s\n", uri);
-
- /* check to see if a rule needs updating, if it does, make out it changed which will re-build it */
- rule = NULL;
- while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
- int found = FALSE;
-
- source = NULL;
- while ( !found && (source = vfolder_rule_next_source((VfolderRule *)rule, source)) )
- found = uri_cmp(uri, source);
-
- if (found
- || (rule->source
- && ((!strcmp(rule->source, "local") && !remote)
- || (!strcmp(rule->source, "remote_active") && remote)
- || (!strcmp(rule->source, "local_remote_active"))))) {
-
- vf = g_hash_table_lookup(vfolder_hash, rule->name);
- g_assert(vf);
- if (source) {
- vfolder_rule_remove_source((VfolderRule *)rule, source);
- g_string_sprintfa(changed, " %s\n", rule->name);
- } else
- rule_changed(rule, (CamelFolder *)vf);
- }
- }
-
- UNLOCK();
-
- if (changed->str[0]) {
- GnomeDialog *gd;
- char *text, *user;
-
- text = g_strdup_printf(_("The following vFolder(s):\n%s"
- "Used the removed folder:\n '%s'\n"
- "And have been updated."),
- changed->str, uri);
-
- gd = (GnomeDialog *)gnome_warning_dialog(text);
- g_free(text);
- gnome_dialog_set_close(gd, TRUE);
- gtk_widget_show((GtkWidget *)gd);
-
- user = g_strdup_printf("%s/vfolders.xml", evolution_dir);
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- }
-
- g_string_free(changed, TRUE);
-}
-
-/* called when a uri is renamed in a store */
-#if 0
-void
-mail_vfolder_rename_uri(CamelStore *store, const char *from, const char *to)
-{
- printf("vfolder rename uri: %s to %s\n", from, to);
-}
-#endif
-
-/* ********************************************************************** */
-
-static void context_rule_added(RuleContext *ctx, FilterRule *rule);
-
-static void
-rule_changed(FilterRule *rule, CamelFolder *folder)
-{
- const char *sourceuri;
- GList *l;
- GList *sources_uri = NULL, *sources_folder = NULL;
- GString *query;
- int i;
- CamelFolder *newfolder;
-
- /* if the folder has changed name, then add it, then remove the old manually */
- if (strcmp(folder->full_name, rule->name) != 0) {
- char *path, *key;
- CamelFolder *old;
-
- gtk_signal_disconnect_by_func((GtkObject *)rule, rule_changed, folder);
-
- context_rule_added((RuleContext *)context, rule);
-
- /* TODO: remove folder from folder info cache? */
-
- path = g_strdup_printf("/%s", folder->full_name);
- evolution_storage_removed_folder(mail_lookup_storage(vfolder_store), path);
- g_free(path);
-
- LOCK();
- if (g_hash_table_lookup_extended(vfolder_hash, folder->full_name, (void **)&key, (void **)&old)) {
- g_hash_table_remove(vfolder_hash, key);
- g_free(key);
- UNLOCK();
- camel_object_unref((CamelObject *)folder);
- } else {
- UNLOCK();
- g_warning("couldn't find a vfolder rule in our table? %s", folder->full_name);
- }
-
- return;
- }
-
- d(printf("Filter rule changed? for folder '%s'!!\n", folder->name));
-
- /* find any (currently available) folders, and add them to the ones to open */
- sourceuri = NULL;
- while ( (sourceuri = vfolder_rule_next_source((VfolderRule *)rule, sourceuri)) ) {
- if (mail_note_get_folder_from_uri(sourceuri, &newfolder)) {
- if (newfolder)
- sources_folder = g_list_append(sources_folder, newfolder);
- else
- sources_uri = g_list_append(sources_uri, g_strdup(sourceuri));
- }
- }
-
- /* check the remote/local uri lists for any other uri's that should be looked at */
- if (rule->source) {
- LOCK();
- for (i=0;i<2;i++) {
- if (i==0 && (!strcmp(rule->source, "local") || !strcmp(rule->source, "local_remote_active")))
- l = source_folders_local;
- else if (i==1 && (!strcmp(rule->source, "remote_active") || !strcmp(rule->source, "local_remote_active")))
- l = source_folders_remote;
- else
- l = NULL;
-
- while (l) {
- if (mail_note_get_folder_from_uri(l->data, &newfolder)) {
- if (newfolder)
- sources_folder = g_list_append(sources_folder, newfolder);
- else
- sources_uri = g_list_append(sources_uri, g_strdup(sourceuri));
- } else {
- printf(" -> No such folder?\n");
- }
- l = l->next;
- }
- }
- UNLOCK();
- }
-
- query = g_string_new("");
- filter_rule_build_code(rule, query);
-
- vfolder_setup(folder, query->str, sources_uri, sources_folder);
-
- g_string_free(query, TRUE);
-}
-
-static void context_rule_added(RuleContext *ctx, FilterRule *rule)
-{
- CamelFolder *folder;
-
- d(printf("rule added: %s\n", rule->name));
-
- /* this always runs quickly */
- folder = camel_store_get_folder(vfolder_store, rule->name, 0, NULL);
- if (folder) {
- gtk_signal_connect((GtkObject *)rule, "changed", rule_changed, folder);
-
- LOCK();
- g_hash_table_insert(vfolder_hash, g_strdup(rule->name), folder);
- UNLOCK();
-
- mail_note_folder(folder);
- rule_changed(rule, folder);
- }
-}
-
-static void context_rule_removed(RuleContext *ctx, FilterRule *rule)
-{
- char *key, *path;
- CamelFolder *folder;
-
- d(printf("rule removed; %s\n", rule->name));
-
- /* TODO: remove from folder info cache? */
-
- path = g_strdup_printf("/%s", rule->name);
- evolution_storage_removed_folder(mail_lookup_storage(vfolder_store), path);
- g_free(path);
-
- LOCK();
- if (g_hash_table_lookup_extended(vfolder_hash, rule->name, (void **)&key, (void **)&folder)) {
- g_hash_table_remove(vfolder_hash, key);
- g_free(key);
- UNLOCK();
- camel_object_unref((CamelObject *)folder);
- } else
- UNLOCK();
-
- camel_store_delete_folder(vfolder_store, rule->name, NULL);
-}
-
-static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
-{
- CamelStore *store = (CamelStore *)o;
- CamelFolderInfo *info = event_data;
-
- store = store;
- info = info;
-}
-
-static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
-{
- CamelStore *store = (CamelStore *)o;
- CamelFolderInfo *info = event_data;
- FilterRule *rule;
- char *user;
-
- d(printf("Folder deleted: %s\n", info->name));
- store = store;
-
- /* delete it from our list */
- rule = rule_context_find_rule((RuleContext *)context, info->name, NULL);
- if (rule) {
- /* We need to stop listening to removed events, otherwise we'll try and remove it again */
- gtk_signal_disconnect_by_func((GtkObject *)context, context_rule_removed, context);
- rule_context_remove_rule((RuleContext *)context, rule);
- gtk_object_unref((GtkObject *)rule);
- gtk_signal_connect((GtkObject *)context, "rule_removed", context_rule_removed, context);
-
- user = g_strdup_printf("%s/vfolders.xml", evolution_dir);
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- } else {
- g_warning("Cannot find rule for deleted vfolder '%s'", info->name);
- }
-}
-
-void
-vfolder_load_storage(GNOME_Evolution_Shell shell)
-{
- char *user, *storeuri;
- FilterRule *rule;
-
- vfolder_hash = g_hash_table_new(g_str_hash, g_str_equal);
-
- /* first, create the vfolder store, and set it up */
- storeuri = g_strdup_printf("vfolder:%s/vfolder", evolution_dir);
- vfolder_store = camel_session_get_store(session, storeuri, NULL);
- if (vfolder_store == NULL) {
- g_warning("Cannot open vfolder store - no vfolders available");
- return;
- }
-
- camel_object_hook_event((CamelObject *)vfolder_store, "folder_created",
- (CamelObjectEventHookFunc)store_folder_created, NULL);
- camel_object_hook_event((CamelObject *)vfolder_store, "folder_deleted",
- (CamelObjectEventHookFunc)store_folder_deleted, NULL);
-
- d(printf("got store '%s' = %p\n", storeuri, vfolder_store));
- mail_load_storage_by_uri(shell, storeuri, U_("VFolders"));
-
- /* load our rules */
- user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
- context = vfolder_context_new ();
- if (rule_context_load ((RuleContext *)context, EVOLUTION_DATADIR "/evolution/vfoldertypes.xml", user) != 0) {
- g_warning("cannot load vfolders: %s\n", ((RuleContext *)context)->error);
- }
- g_free (user);
-
- gtk_signal_connect((GtkObject *)context, "rule_added", context_rule_added, context);
- gtk_signal_connect((GtkObject *)context, "rule_removed", context_rule_removed, context);
-
- /* and setup the rules we have */
- rule = NULL;
- while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
- context_rule_added((RuleContext *)context, rule);
- }
-
- g_free(storeuri);
-}
-
-static GtkWidget *vfolder_editor = NULL;
-
-static void
-vfolder_editor_destroy (GtkWidget *widget, gpointer user_data)
-{
- vfolder_editor = NULL;
-}
-
-static void
-vfolder_editor_clicked (GtkWidget *dialog, int button, void *data)
-{
- if (button == 0) {
- char *user;
-
- user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
- rule_context_save ((RuleContext *)context, user);
- g_free (user);
- }
- if (button != -1) {
- gnome_dialog_close (GNOME_DIALOG (dialog));
- }
-}
-
-void
-vfolder_edit (void)
-{
- if (vfolder_editor) {
- gdk_window_raise (GTK_WIDGET (vfolder_editor)->window);
- return;
- }
-
- vfolder_editor = GTK_WIDGET (vfolder_editor_new (context));
- gtk_signal_connect (GTK_OBJECT (vfolder_editor), "clicked", vfolder_editor_clicked, NULL);
- gtk_signal_connect (GTK_OBJECT (vfolder_editor), "destroy", vfolder_editor_destroy, NULL);
- gtk_widget_show (vfolder_editor);
-}
-
-static void
-new_rule_clicked(GtkWidget *w, int button, void *data)
-{
- if (button == 0) {
- char *user;
- FilterRule *rule = gtk_object_get_data((GtkObject *)w, "rule");
-
- gtk_object_ref((GtkObject *)rule);
- rule_context_add_rule((RuleContext *)context, rule);
- user = g_strdup_printf("%s/vfolders.xml", evolution_dir);
- rule_context_save((RuleContext *)context, user);
- g_free(user);
- }
- if (button != -1) {
- gnome_dialog_close((GnomeDialog *)w);
- }
-}
-
-FilterPart *
-vfolder_create_part(const char *name)
-{
- return rule_context_create_part((RuleContext *)context, name);
-}
-
-/* clones a filter/search rule into a matching vfolder rule (assuming the same system definitions) */
-FilterRule *
-vfolder_clone_rule(FilterRule *in)
-{
- FilterRule *rule = (FilterRule *)vfolder_rule_new();
- xmlNodePtr xml;
-
- xml = filter_rule_xml_encode(in);
- filter_rule_xml_decode(rule, xml, (RuleContext *)context);
- xmlFreeNodeList(xml);
-
- return rule;
-}
-
-/* adds a rule with a gui */
-void
-vfolder_gui_add_rule(VfolderRule *rule)
-{
- GtkWidget *w;
- GnomeDialog *gd;
-
- w = filter_rule_get_widget((FilterRule *)rule, (RuleContext *)context);
-
- gd = (GnomeDialog *)gnome_dialog_new(_("New VFolder"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gnome_dialog_set_default (gd, 0);
-
- gtk_window_set_policy(GTK_WINDOW(gd), FALSE, TRUE, FALSE);
- gtk_window_set_default_size (GTK_WINDOW (gd), 500, 500);
- gtk_box_pack_start((GtkBox *)gd->vbox, w, TRUE, TRUE, 0);
- gtk_widget_show((GtkWidget *)gd);
- gtk_object_set_data_full((GtkObject *)gd, "rule", rule, (GtkDestroyNotify)gtk_object_unref);
- gtk_signal_connect((GtkObject *)gd, "clicked", new_rule_clicked, NULL);
- gtk_widget_show((GtkWidget *)gd);
-}
-
-void
-vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *source)
-{
- VfolderRule *rule;
-
- g_return_if_fail (msg != NULL);
-
- rule = (VfolderRule*)vfolder_rule_from_message(context, msg, flags, source);
- vfolder_gui_add_rule(rule);
-}
-
-void
-vfolder_gui_add_from_mlist(CamelMimeMessage *msg, const char *mlist, const char *source)
-{
- VfolderRule *rule;
-
- g_return_if_fail (msg != NULL);
-
- rule = (VfolderRule*)vfolder_rule_from_mlist(context, mlist, source);
- vfolder_gui_add_rule(rule);
-}
-
-EvolutionStorage *
-mail_vfolder_get_vfolder_storage (void)
-{
- return mail_lookup_storage(vfolder_store);
-}
diff --git a/mail/mail-vfolder.h b/mail/mail-vfolder.h
deleted file mode 100644
index d27698bfdd..0000000000
--- a/mail/mail-vfolder.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#ifndef _MAIL_VFOLDER_H
-#define _MAIL_VFOLDER_H
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-#include "evolution-shell-component.h"
-
-#include "camel/camel-folder.h"
-#include "camel/camel-mime-message.h"
-#include "filter/vfolder-rule.h"
-#include "filter/filter-part.h"
-
-void vfolder_load_storage(GNOME_Evolution_Shell shell);
-
-void vfolder_edit (void);
-FilterPart *vfolder_create_part (const char *name);
-FilterRule *vfolder_clone_rule (FilterRule *in);
-void vfolder_gui_add_rule (VfolderRule *rule);
-void vfolder_gui_add_from_message (CamelMimeMessage *msg, int flags, const char *source);
-void vfolder_gui_add_from_mlist (CamelMimeMessage *msg, const char *mlist, const char *source);
-
-/* add a uri that is now available to vfolders */
-void mail_vfolder_add_uri(CamelStore *store, const char *uri);
-
-/* remove a uri that should be removed from vfolders */
-void mail_vfolder_remove_uri(CamelStore *store, const char *uri);
-
-EvolutionStorage *mail_vfolder_get_vfolder_storage (void);
-
-#endif
diff --git a/mail/mail.h b/mail/mail.h
deleted file mode 100644
index 81f0d7174f..0000000000
--- a/mail/mail.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright 2000, 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.
- */
-
-/* This file is a F*CKING MESS. Shame to us! */
-
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <gtkhtml/gtkhtml.h>
-#include <camel/camel.h>
-#include <composer/e-msg-composer.h>
-#include <shell/evolution-storage.h>
-#include "mail-accounts.h"
-#include "mail-account-editor.h"
-#include "mail-callbacks.h"
-#include "mail-config.h"
-#include "mail-config-druid.h"
-/*#include "folder-browser.h"*/
-#include "mail-session.h"
-#include "mail-types.h"
-
-extern char *evolution_dir;
-
-/* mail-format */
-void mail_format_mime_message (CamelMimeMessage *mime_message,
- MailDisplay *md);
-void mail_format_raw_message (CamelMimeMessage *mime_message,
- MailDisplay *md);
-gboolean mail_content_loaded (CamelDataWrapper *wrapper,
- MailDisplay *display,
- gboolean redisplay,
- const gchar *url,
- GtkHTMLStream *handle);
-
-typedef gboolean (*MailMimeHandlerFn) (CamelMimePart *part,
- const char *mime_type,
- MailDisplay *md);
-typedef struct {
- gboolean generic;
- OAF_ServerInfo *component;
- GList *applications;
- MailMimeHandlerFn builtin;
-} MailMimeHandler;
-MailMimeHandler *mail_lookup_handler (const char *mime_type);
-
-gboolean mail_part_is_inline (CamelMimePart *part);
-gboolean mail_part_is_displayed_inline (CamelMimePart *part, MailDisplay *md);
-void mail_part_toggle_displayed (CamelMimePart *part, MailDisplay *md);
-
-char *mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboolean cite);
-
-/* mail-identify */
-char *mail_identify_mime_part (CamelMimePart *part, MailDisplay *md);
-
-/* component factory for lack of a better place */
-void mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name);
-/*takes a GSList of MailConfigServices */
-void mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean is_account_data);
-
-void mail_hash_storage (CamelService *store, EvolutionStorage *storage);
-EvolutionStorage *mail_lookup_storage (CamelStore *store);
-void mail_remove_storage_by_uri (const char *uri);
-void mail_remove_storage (CamelStore *store);
-void mail_storages_foreach (GHFunc func, gpointer data);
-int mail_storages_count (void);
-
-gboolean evolution_folder_info_factory_init (void);
-
diff --git a/mail/main.c b/mail/main.c
deleted file mode 100644
index dc2042f19b..0000000000
--- a/mail/main.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * main.c: The core of the mail component
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <signal.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnomeui/gnome-init.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object-directory.h>
-#include <glade/glade.h>
-#include <liboaf/liboaf.h>
-#include <libgnomevfs/gnome-vfs.h>
-
-#ifdef GTKHTML_HAVE_GCONF
-#include <gconf/gconf.h>
-#endif
-
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-cursors.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "component-factory.h"
-#include "composer/evolution-composer.h"
-#include "mail.h"
-#include "mail-mt.h"
-
-/*#define DO_MCHECK*/
-
-#ifdef DO_MCHECK
-static int blowup(int status)
-{
- switch(status) {
- case 1:
- printf("Double free failure\n");
- break;
- case 2:
- printf("Memory clobbered before block\n");
- break;
- case 3:
- printf("Memory clobbered after block\n");
- break;
- }
- abort();
- return status;
-}
-#endif
-
-/* The GNOME SEGV handler will lose if it's not run from the main Gtk
- * thread. So if we crash in another thread, redirect the signal.
- */
-static void (*gnome_segv_handler) (int);
-
-static void
-segv_redirect (int sig)
-{
- if (pthread_self () == mail_gui_thread)
- gnome_segv_handler (sig);
- else {
- pthread_kill (mail_gui_thread, sig);
- pthread_exit (NULL);
- }
-}
-
-int
-main (int argc, char *argv [])
-{
- CORBA_ORB orb;
- struct sigaction sa, osa;
-
-#ifdef DO_MCHECK
- /* used to make elfence work */
-#if 0
- free (malloc (10));
-#else
- /*mtrace();*/
- mcheck(blowup);
-#endif
-#endif
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- g_thread_init (NULL);
-
- gnome_init_with_popt_table ("evolution-mail-component", VERSION,
- argc, argv, oaf_popt_options, 0, NULL);
-
- sigaction (SIGSEGV, NULL, &osa);
- if (osa.sa_handler != SIG_DFL) {
- sa.sa_flags = 0;
- sigemptyset (&sa.sa_mask);
- sa.sa_handler = segv_redirect;
- sigaction (SIGSEGV, &sa, NULL);
- sigaction (SIGBUS, &sa, NULL);
- sigaction (SIGFPE, &sa, NULL);
- gnome_segv_handler = osa.sa_handler;
- }
-
- orb = oaf_init (argc, argv);
-
- if (bonobo_init (orb, CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL) == FALSE) {
- g_error ("Mail component could not initialize Bonobo.\n"
- "If there was a warning message about the "
- "RootPOA, it probably means\nyou compiled "
- "Bonobo against GOAD instead of OAF.");
- }
-
-#ifdef GTKHTML_HAVE_GCONF
- gconf_init (argc, argv, NULL);
-#endif
-
- glade_gnome_init ();
-
- gnome_vfs_init ();
-
- e_cursors_init ();
-
- mail_config_init ();
- mail_msg_init ();
-
- component_factory_init ();
- evolution_composer_factory_init (composer_send_cb,
- composer_postpone_cb);
-
- if (gdk_threads_mutex) {
- g_mutex_free (gdk_threads_mutex);
- gdk_threads_mutex = NULL;
- }
-
- GDK_THREADS_ENTER ();
- bonobo_main ();
-
- mail_msg_cleanup();
-
- GDK_THREADS_LEAVE ();
-
- mail_config_write_on_exit ();
-
- return 0;
-}
diff --git a/mail/message-browser.c b/mail/message-browser.c
deleted file mode 100644
index 6d7ef49398..0000000000
--- a/mail/message-browser.c
+++ /dev/null
@@ -1,262 +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 <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include "message-browser.h"
-
-#include "mail.h"
-#include "mail-callbacks.h"
-#include "mail-tools.h"
-#include "message-list.h"
-#include "mail-ops.h"
-#include "mail-vfolder.h"
-#include "mail-autofilter.h"
-#include "mail-mt.h"
-
-#include "mail-local.h"
-#include "mail-config.h"
-
-#include "folder-browser-ui.h"
-
-#define d(x) x
-
-#define MINIMUM_WIDTH 600
-#define MINIMUM_HEIGHT 400
-
-#define PARENT_TYPE BONOBO_TYPE_WINDOW
-
-/* Size of the window last time it was changed. */
-static GtkAllocation last_allocation = { 0, 0 };
-
-static BonoboWindowClass *message_browser_parent_class;
-
-static void
-message_browser_destroy (GtkObject *object)
-{
- MessageBrowser *message_browser;
-
- message_browser = MESSAGE_BROWSER (object);
-
- gtk_object_unref (GTK_OBJECT (message_browser->fb));
-
- if (GTK_OBJECT_CLASS (message_browser_parent_class)->destroy)
- (GTK_OBJECT_CLASS (message_browser_parent_class)->destroy) (object);
-}
-
-static void
-message_browser_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = message_browser_destroy;
-
- message_browser_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-message_browser_init (GtkObject *object)
-{
-
-}
-
-/* UI callbacks */
-
-static void
-message_browser_close (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- gtk_widget_destroy (GTK_WIDGET (user_data));
-}
-
-static BonoboUIVerb
-browser_verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("MessageBrowserClose", message_browser_close),
- BONOBO_UI_VERB_END
-};
-
-/* FB message loading hookups */
-
-static void
-message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrowser *mb)
-{
- CamelMimeMessage *message;
- char *subject = NULL;
- char *title;
-
- message = fb->mail_display->current_message;
-
- if (message)
- subject = (char *) camel_mime_message_get_subject (message);
-
- if (subject != NULL)
- subject = e_utf8_to_gtk_string (GTK_WIDGET (mb), subject);
- else
- subject = g_strdup (_("(No subject)"));
-
- title = g_strdup_printf (_("%s - Message"), subject);
- g_free (subject);
-
- gtk_window_set_title (GTK_WINDOW (mb), title);
-
- g_free (title);
-}
-
-static void
-message_browser_message_list_built (MessageList *ml, MessageBrowser *mb)
-{
- const char *uid = gtk_object_get_data (GTK_OBJECT (mb), "uid");
-
- message_list_select_uid (ml, uid);
-}
-
-static void
-message_browser_folder_loaded (FolderBrowser *fb, const char *uri, MessageBrowser *mb)
-{
- gtk_signal_connect (GTK_OBJECT (fb->message_list), "message_list_built",
- message_browser_message_list_built, mb);
-}
-
-static void
-message_browser_size_allocate_cb (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- last_allocation = *allocation;
-
-}
-
-/* Construction */
-
-static void
-set_default_size (GtkWidget *widget)
-{
- int width, height;
-
- width = MAX (MINIMUM_WIDTH, last_allocation.width);
- height = MAX (MINIMUM_HEIGHT, last_allocation.height);
-
- gtk_window_set_default_size (GTK_WINDOW (widget), width, height);
-}
-
-static void
-set_bonobo_ui (GtkWidget *widget, FolderBrowser *fb)
-{
- BonoboUIContainer *uicont;
- BonoboUIComponent *uic;
- CORBA_Environment ev;
-
- uicont = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (uicont, BONOBO_WINDOW (widget));
-
- uic = bonobo_ui_component_new_default ();
- bonobo_ui_component_set_container (uic, BONOBO_OBJREF (uicont));
- folder_browser_set_ui_component (fb, uic);
-
- /* Load our UI */
-
- bonobo_ui_component_freeze (uic, NULL);
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, "evolution-mail-messagedisplay.xml", "evolution-mail");
-
- /* Load the appropriate UI stuff from the folder browser */
-
- folder_browser_ui_add_message (fb);
-
- /* We just opened the message! We don't need to open it again. */
-
- CORBA_exception_init (&ev);
- bonobo_ui_component_rm (uic, "/menu/File/FileOps/MessageOpen", &ev);
- if (BONOBO_EX (&ev))
- g_warning ("Couldn't remove message open item. Weird. Error: %s",
- bonobo_exception_get_text (&ev));
- CORBA_exception_free (&ev);
-
- /* Add the Close item */
-
- bonobo_ui_component_add_verb_list_with_data (uic, browser_verbs, widget);
-
- /* Done */
-
- bonobo_ui_component_thaw (uic, NULL);
-
-}
-
-GtkWidget *
-message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const char *uid)
-{
- GtkWidget *vbox;
- MessageBrowser *new;
- FolderBrowser *fb;
-
- new = gtk_type_new (MESSAGE_BROWSER_TYPE);
- new = (MessageBrowser *) bonobo_window_construct (BONOBO_WINDOW (new), "Ximian Evolution", "");
- if (!new) {
- g_warning ("Failed to construct Bonobo window!");
- return NULL;
- }
-
- gtk_object_set_data_full (GTK_OBJECT (new), "uid", g_strdup (uid), g_free);
-
- fb = FOLDER_BROWSER (folder_browser_new (shell, uri));
- new->fb = fb;
-
- set_bonobo_ui (GTK_WIDGET (new), fb);
-
- /* some evil hackery action... */
- vbox = gtk_vbox_new (TRUE, 0);
- gtk_widget_ref (GTK_WIDGET (fb->mail_display));
- gtk_widget_reparent (GTK_WIDGET (fb->mail_display), vbox);
- /* Note: normally we'd unref the fb->mail_display now, except
- that if we do then our refcounts will not be in
- harmony... both the fb *and* the message-browser need to
- own a ref on the mail_display. */
- gtk_widget_show (GTK_WIDGET (fb->mail_display));
- gtk_widget_show (vbox);
-
- gtk_signal_connect (GTK_OBJECT (new), "size_allocate",
- GTK_SIGNAL_FUNC (message_browser_size_allocate_cb), NULL);
-
- bonobo_window_set_contents (BONOBO_WINDOW (new), vbox);
- gtk_widget_grab_focus (GTK_WIDGET (MAIL_DISPLAY (fb->mail_display)->html));
-
- set_default_size (GTK_WIDGET (new));
-
- /* more evil hackery... */
- gtk_signal_connect (GTK_OBJECT (fb), "folder_loaded",
- message_browser_folder_loaded, new);
-
- gtk_signal_connect (GTK_OBJECT (fb), "message_loaded",
- message_browser_message_loaded, new);
-
- return GTK_WIDGET (new);
-}
-
-/* Fin */
-
-E_MAKE_TYPE (message_browser, "MessageBrowser", MessageBrowser, message_browser_class_init,
- message_browser_init, PARENT_TYPE);
diff --git a/mail/message-browser.h b/mail/message-browser.h
deleted file mode 100644
index 208396bff4..0000000000
--- a/mail/message-browser.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 _MESSAGE_BROWSER_H_
-#define _MESSAGE_BROWSER_H_
-
-#include <gnome.h>
-#include <bonobo/bonobo-win.h>
-
-#include <camel/camel-folder.h>
-#include "folder-browser.h"
-#include "mail-display.h"
-#include "mail-types.h"
-
-#define MESSAGE_BROWSER_TYPE (message_browser_get_type ())
-#define MESSAGE_BROWSER(o) (GTK_CHECK_CAST ((o), MESSAGE_BROWSER_TYPE, MessageBrowser))
-#define MESSAGE_BROWSER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MESSAGE_BROWSER_TYPE, MessageBrowserClass))
-#define IS_MESSAGE_BROWSER(o) (GTK_CHECK_TYPE ((o), MESSAGE_BROWSER_TYPE))
-#define IS_MESSAGE_BROWSER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MESSAGE_BROWSER_TYPE))
-
-struct _MessageBrowser {
- BonoboWindow parent;
-
- /*
- * The current URI being displayed by the MessageBrowser
- */
- FolderBrowser *fb;
-};
-
-
-typedef struct {
- BonoboWindowClass parent_class;
-
-} MessageBrowserClass;
-
-GtkType message_browser_get_type (void);
-
-GtkWidget *message_browser_new (const GNOME_Evolution_Shell shell,
- const char *uri, const char *uid);
-
-#endif /* _MESSAGE_BROWSER_H_ */
-
diff --git a/mail/message-list.c b/mail/message-list.c
deleted file mode 100644
index f78e4beb99..0000000000
--- a/mail/message-list.c
+++ /dev/null
@@ -1,2540 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * message-list.c: Displays the messages.
- * Implements CORBA's Evolution::MessageList
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- * Bertrand Guiheneuf (bg@aful.org)
- * And just about everyone else in evolution ...
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <ctype.h>
-
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-cell-toggle.h>
-#include <gal/e-table/e-cell-checkbox.h>
-#include <gal/e-table/e-cell-tree.h>
-#include <gal/e-table/e-cell-date.h>
-#include <gal/e-table/e-cell-size.h>
-#include <gal/e-table/e-tree-memory.h>
-#include <gal/e-table/e-tree-memory-callbacks.h>
-#include <gal/unicode/gunicode.h>
-
-#include <camel/camel-exception.h>
-#include <camel/camel-file-utils.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-thread.h>
-#include <camel/camel-vtrash-folder.h>
-#include <e-util/ename/e-name-western.h>
-#include <e-util/e-memory.h>
-
-#include "mail-config.h"
-#include "message-list.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "Mail.h"
-
-#include "art/mail-new.xpm"
-#include "art/mail-read.xpm"
-#include "art/mail-replied.xpm"
-#include "art/attachment.xpm"
-#include "art/priority-high.xpm"
-#include "art/empty.xpm"
-#include "art/score-lowest.xpm"
-#include "art/score-lower.xpm"
-#include "art/score-low.xpm"
-#include "art/score-normal.xpm"
-#include "art/score-high.xpm"
-#include "art/score-higher.xpm"
-#include "art/score-highest.xpm"
-
-/*#define TIMEIT */
-
-#ifdef TIMEIT
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-
-#define d(x)
-#define t(x)
-
-/*
- * Default sizes for the ETable display
- *
- */
-#define N_CHARS(x) (CHAR_WIDTH * (x))
-
-#define COL_ICON_WIDTH (16)
-#define COL_ATTACH_WIDTH (16)
-#define COL_CHECK_BOX_WIDTH (16)
-#define COL_FROM_EXPANSION (24.0)
-#define COL_FROM_WIDTH_MIN (32)
-#define COL_SUBJECT_EXPANSION (30.0)
-#define COL_SUBJECT_WIDTH_MIN (32)
-#define COL_SENT_EXPANSION (24.0)
-#define COL_SENT_WIDTH_MIN (32)
-#define COL_RECEIVED_EXPANSION (20.0)
-#define COL_RECEIVED_WIDTH_MIN (32)
-#define COL_TO_EXPANSION (24.0)
-#define COL_TO_WIDTH_MIN (32)
-#define COL_SIZE_EXPANSION (6.0)
-#define COL_SIZE_WIDTH_MIN (32)
-
-#define PARENT_TYPE (e_tree_scrolled_get_type ())
-
-/* #define SMART_ADDRESS_COMPARE */
-
-#ifdef SMART_ADDRESS_COMPARE
-struct _EMailAddress {
- ENameWestern *wname;
- gchar *address;
-};
-
-typedef struct _EMailAddress EMailAddress;
-#endif /* SMART_ADDRESS_COMPARE */
-
-static ETreeScrolledClass *message_list_parent_class;
-
-static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data);
-static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list);
-static char *filter_date (time_t date);
-static char *filter_size (int size);
-
-static void folder_changed (CamelObject *o, gpointer event_data, gpointer user_data);
-static void message_changed (CamelObject *o, gpointer event_data, gpointer user_data);
-
-static void hide_save_state(MessageList *ml);
-static void hide_load_state(MessageList *ml);
-
-/* note: @changes is owned/freed by the caller */
-/*static void mail_do_regenerate_messagelist (MessageList *list, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);*/
-static void mail_regen_list(MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);
-
-static void clear_info(char *key, ETreePath *node, MessageList *ml);
-
-enum {
- MESSAGE_SELECTED,
- MESSAGE_LIST_BUILT,
- LAST_SIGNAL
-};
-
-static guint message_list_signals [LAST_SIGNAL] = {0, };
-
-static struct {
- char **image_base;
- GdkPixbuf *pixbuf;
-} states_pixmaps [] = {
- { mail_new_xpm, NULL },
- { mail_read_xpm, NULL },
- { mail_replied_xpm, NULL },
-/* FIXME: Replace these with pixmaps for multiple_read and multiple_unread */
- { mail_new_xpm, NULL },
- { mail_read_xpm, NULL },
- { empty_xpm, NULL },
- { attachment_xpm, NULL },
- { priority_high_xpm, NULL },
- { score_lowest_xpm, NULL },
- { score_lower_xpm, NULL },
- { score_low_xpm, NULL },
- { score_normal_xpm, NULL },
- { score_high_xpm, NULL },
- { score_higher_xpm, NULL },
- { score_highest_xpm, NULL },
- { NULL, NULL }
-};
-
-#ifdef SMART_ADDRESS_COMPARE
-static EMailAddress *
-e_mail_address_new (const char *address)
-{
- CamelInternetAddress *cia;
- EMailAddress *new;
- const char *name = NULL, *addr = NULL;
-
- cia = camel_internet_address_new ();
- if (camel_address_unformat (CAMEL_ADDRESS (cia), address) == -1) {
- camel_object_unref (CAMEL_OBJECT (cia));
- return NULL;
- }
- camel_internet_address_get (cia, 0, &name, &addr);
-
- new = g_new (EMailAddress, 1);
- new->address = g_strdup (addr);
- if (name && *name) {
- new->wname = e_name_western_parse (name);
- } else {
- new->wname = NULL;
- }
-
- camel_object_unref (CAMEL_OBJECT (cia));
-
- return new;
-}
-
-static void
-e_mail_address_free (EMailAddress *addr)
-{
- g_return_if_fail (addr != NULL);
-
- g_free (addr->address);
- if (addr->wname)
- e_name_western_free (addr->wname);
- g_free (addr);
-}
-
-static gint
-e_mail_address_compare (gconstpointer address1, gconstpointer address2)
-{
- const EMailAddress *addr1 = address1;
- const EMailAddress *addr2 = address2;
- gint retval;
-
- g_return_val_if_fail (addr1 != NULL, 1);
- g_return_val_if_fail (addr2 != NULL, -1);
-
- if (!addr1->wname && !addr2->wname) {
- /* have to compare addresses, one or both don't have names */
- g_return_val_if_fail (addr1->address != NULL, 1);
- g_return_val_if_fail (addr2->address != NULL, -1);
-
- return g_strcasecmp (addr1->address, addr2->address);
- }
-
- if (!addr1->wname)
- return -1;
- if (!addr2->wname)
- return 1;
-
- if (!addr1->wname->last && !addr2->wname->last) {
- /* neither has a last name - default to address? */
- /* FIXME: what do we compare next? */
- g_return_val_if_fail (addr1->address != NULL, 1);
- g_return_val_if_fail (addr2->address != NULL, -1);
-
- return g_strcasecmp (addr1->address, addr2->address);
- }
-
- if (!addr1->wname->last)
- return -1;
- if (!addr2->wname->last)
- return 1;
-
- retval = g_utf8_collate (addr1->wname->last, addr2->wname->last);
- if (retval)
- return retval;
-
- /* last names are identical - compare first names */
-
- if (!addr1->wname->first && !addr2->wname->first)
- return g_strcasecmp (addr1->address, addr2->address);
-
- if (!addr1->wname->first)
- return -1;
- if (!addr2->wname->first)
- return 1;
-
- retval = g_utf8_collate (addr1->wname->first, addr2->wname->first);
- if (retval)
- return retval;
-
- return g_strcasecmp (addr1->address, addr2->address);
-}
-#endif /* SMART_ADDRESS_COMPARE */
-
-static gint
-address_compare (gconstpointer address1, gconstpointer address2)
-{
-#ifdef SMART_ADDRESS_COMPARE
- EMailAddress *addr1, *addr2;
-#endif /* SMART_ADDRESS_COMPARE */
- gint retval;
-
- g_return_val_if_fail (address1 != NULL, 1);
- g_return_val_if_fail (address2 != NULL, -1);
-
-#ifdef SMART_ADDRESS_COMPARE
- addr1 = e_mail_address_new (address1);
- addr2 = e_mail_address_new (address2);
- retval = e_mail_address_compare (addr1, addr2);
- e_mail_address_free (addr1);
- e_mail_address_free (addr2);
-#else
- retval = g_utf8_collate ((const char *) address1, (const char *) address2);
-#endif /* SMART_ADDRESS_COMPARE */
-
- return retval;
-}
-
-static gint
-subject_compare (gconstpointer subject1, gconstpointer subject2)
-{
- char *sub1;
- char *sub2;
-
- g_return_val_if_fail (subject1 != NULL, 1);
- g_return_val_if_fail (subject2 != NULL, -1);
-
- /* trim off any "Re:"'s at the beginning of subject1 */
- sub1 = (char *) subject1;
- while (!g_strncasecmp (sub1, "Re:", 3)) {
- sub1 += 3;
- /* jump over any spaces */
- while (*sub1 && g_unichar_isspace (g_utf8_get_char (sub1)))
- sub1 = g_utf8_next_char (sub1);
- }
-
- /* trim off any "Re:"'s at the beginning of subject2 */
- sub2 = (char *) subject2;
- while (!g_strncasecmp (sub2, "Re:", 3)) {
- sub2 += 3;
- while (*sub2 && g_unichar_isspace (g_utf8_get_char (sub2)))
- sub2 = g_utf8_next_char (sub2);
- }
-
- /* jump over any spaces */
- while (*sub1 && g_unichar_isspace (g_utf8_get_char (sub1)))
- sub1 = g_utf8_next_char (sub1);
- while (*sub2 && g_unichar_isspace (g_utf8_get_char (sub2)))
- sub2 = g_utf8_next_char (sub2);
-
- return g_utf8_collate (sub1, sub2);
-}
-
-static gchar *
-filter_size (gint size)
-{
- gfloat fsize;
-
- if (size < 1024) {
- return g_strdup_printf ("%d", size);
- } else {
- fsize = ((gfloat) size) / 1024.0;
- if (fsize < 1024.0) {
- return g_strdup_printf ("%.2f K", fsize);
- } else {
- fsize /= 1024.0;
- return g_strdup_printf ("%.2f M", fsize);
- }
- }
-}
-
-/* Gets the uid of the message displayed at a given view row */
-static const char *
-get_message_uid (MessageList *message_list, ETreePath node)
-{
- CamelMessageInfo *info;
-
- g_assert (node != NULL);
- info = e_tree_memory_node_get_data (E_TREE_MEMORY (message_list->model), node);
- /* correct me if I'm wrong, but this should never be NULL, should it? */
- g_assert (info != NULL);
-
- return camel_message_info_uid (info);
-}
-
-/* Gets the CamelMessageInfo for the message displayed at the given
- * view row.
- */
-static CamelMessageInfo *
-get_message_info (MessageList *message_list, ETreePath node)
-{
- CamelMessageInfo *info;
-
- g_assert (node != NULL);
- info = e_tree_memory_node_get_data (E_TREE_MEMORY (message_list->model), node);
- g_assert (info != NULL);
-
- return info;
-}
-
-/**
- * message_list_select:
- * @message_list: a MessageList
- * @base_row: the (model) row to start from
- * @direction: the direction to search in
- * @flags: a set of flag values
- * @mask: a mask for comparing against @flags
- * @wraparound: if %TRUE, go back to the beginning for
- * the next match if necessary.
- *
- * This moves the message list selection to a suitable row. @base_row
- * lists the first (model) row to try, but as a special case, model
- * row -1 is mapped to the last row. @flags and @mask combine to specify
- * what constitutes a suitable row. @direction is
- * %MESSAGE_LIST_SELECT_NEXT if it should find the next matching
- * message, or %MESSAGE_LIST_SELECT_PREVIOUS if it should find the
- * previous. If no suitable row is found, the selection will be
- * unchanged.
- **/
-void
-message_list_select (MessageList *message_list,
- int base_row,
- MessageListSelectDirection direction,
- guint32 flags,
- guint32 mask,
- gboolean wraparound)
-{
- CamelMessageInfo *info;
- int vrow, last;
- ETree *et = message_list->tree;
-
- if (!GTK_WIDGET_HAS_FOCUS (message_list))
- gtk_widget_grab_focus (GTK_WIDGET (message_list));
-
- switch (direction) {
- case MESSAGE_LIST_SELECT_PREVIOUS:
- last = -1;
- break;
- case MESSAGE_LIST_SELECT_NEXT:
- last = e_tree_row_count (message_list->tree);
- if (last <= base_row)
- return;
- break;
- default:
- g_warning("Invalid argument to message_list_select");
- return;
- }
-
- /* If it's -1, we want the last view row, not the last model row. */
- /* model_to_view_row etc simply dont work for sorted views. Sigh. */
- if (base_row == -1)
- vrow = e_tree_row_count(message_list->tree) - 1;
- else
- vrow = e_tree_model_to_view_row (et, base_row);
-
- if (base_row <= -1)
- return;
- /* This means that we'll move at least one message in 'direction'. */
- if (vrow != last)
- vrow += direction;
-
- /* We don't know whether to use < or > due to "direction" */
- while (vrow != last) {
- ETreePath node = e_tree_node_at_row (et, vrow);
-
- info = get_message_info (message_list, node);
-
- if (info && (info->flags & mask) == flags) {
- e_tree_set_cursor (et, node);
-
- gtk_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED],
- camel_message_info_uid (info));
- return;
- }
- vrow += direction;
- }
-
- if (wraparound) {
- if (direction > 0)
- message_list_select (message_list, 0,
- direction, flags, mask, FALSE);
- else
- message_list_select (message_list, e_tree_row_count (et),
- direction, flags, mask, FALSE);
- }
-}
-
-
-/**
- * message_list_select_uid:
- * @message_list:
- * @uid:
- *
- * Selects the message with the given UID.
- **/
-void
-message_list_select_uid (MessageList *message_list, const char *uid)
-{
- ETreePath node;
-
- node = g_hash_table_lookup (message_list->uid_nodemap, uid);
- if (node) {
- CamelMessageInfo *info;
-
- info = get_message_info (message_list, node);
- e_tree_set_cursor (message_list->tree, node);
-
- g_free (message_list->cursor_uid);
- message_list->cursor_uid = g_strdup (camel_message_info_uid (info));
-
- gtk_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED],
- camel_message_info_uid (info));
- } else {
- g_free (message_list->cursor_uid);
- message_list->cursor_uid = NULL;
- gtk_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED], NULL);
- }
-}
-
-/*
- * SimpleTableModel::col_count
- */
-static int
-ml_column_count (ETreeModel *etm, void *data)
-{
- return COL_LAST;
-}
-
-/*
- * SimpleTableModel::has_save_id
- */
-static gboolean
-ml_has_save_id (ETreeModel *etm, void *data)
-{
- return TRUE;
-}
-
-/*
- * SimpleTableModel::get_save_id
- */
-static char *
-ml_get_save_id (ETreeModel *etm, ETreePath path, void *data)
-{
- CamelMessageInfo *info;
-
- info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path);
- if (info == NULL)
- return g_strdup("root");
- return g_strdup (camel_message_info_uid(info));
-}
-
-/*
- * SimpleTableModel::has_save_id
- */
-static gboolean
-ml_has_get_node_by_id (ETreeModel *etm, void *data)
-{
- return TRUE;
-}
-
-/*
- * SimpleTableModel::get_save_id
- */
-static ETreePath
-ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data)
-{
- MessageList *ml;
-
- ml = data;
-
- if (!strcmp (save_id, "root"))
- return e_tree_model_get_root (etm);
-
- return g_hash_table_lookup(ml->uid_nodemap, save_id);
-}
-
-static void *
-ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
-{
- switch (col){
- case COL_MESSAGE_STATUS:
- case COL_FLAGGED:
- case COL_SCORE:
- case COL_ATTACHMENT:
- case COL_DELETED:
- case COL_UNREAD:
- case COL_SENT:
- case COL_RECEIVED:
- case COL_SIZE:
- return (void *) value;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- return g_strdup (value);
-
- default:
- g_assert_not_reached ();
- }
- return NULL;
-}
-
-static void
-ml_free_value (ETreeModel *etm, int col, void *value, void *data)
-{
- switch (col){
- case COL_MESSAGE_STATUS:
- case COL_FLAGGED:
- case COL_SCORE:
- case COL_ATTACHMENT:
- case COL_DELETED:
- case COL_UNREAD:
- case COL_SENT:
- case COL_RECEIVED:
- case COL_SIZE:
- break;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- g_free (value);
- break;
- default:
- g_assert_not_reached ();
- }
-}
-
-static void *
-ml_initialize_value (ETreeModel *etm, int col, void *data)
-{
- switch (col){
- case COL_MESSAGE_STATUS:
- case COL_FLAGGED:
- case COL_SCORE:
- case COL_ATTACHMENT:
- case COL_DELETED:
- case COL_UNREAD:
- case COL_SENT:
- case COL_RECEIVED:
- case COL_SIZE:
- return NULL;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- return g_strdup("");
- default:
- g_assert_not_reached ();
- }
-
- return NULL;
-}
-
-static gboolean
-ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
-{
- switch (col){
- case COL_MESSAGE_STATUS:
- case COL_FLAGGED:
- case COL_SCORE:
- case COL_ATTACHMENT:
- case COL_DELETED:
- case COL_UNREAD:
- case COL_SENT:
- case COL_RECEIVED:
- case COL_SIZE:
- return value == NULL;
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- return !(value && *(char *)value);
- default:
- g_assert_not_reached ();
- return FALSE;
- }
-}
-
-static const char *status_map[] = {
- N_("Unseen"),
- N_("Seen"),
- N_("Answered"),
- N_("Multiple Unseen Messages"),
- N_("Multiple Messages"),
-};
-
-static const char *score_map[] = {
- N_("Lowest"),
- N_("Lower"),
- N_("Low"),
- N_("Normal"),
- N_("High"),
- N_("Higher"),
- N_("Highest"),
-};
-
-static char *
-ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
-{
- unsigned int i;
-
- switch (col){
- case COL_MESSAGE_STATUS:
- i = (unsigned int)value;
- if (i > 4)
- return g_strdup("");
- return g_strdup(_(status_map[i]));
-
- case COL_SCORE:
- i = (unsigned int)value + 3;
- if (i > 6)
- i = 3;
- return g_strdup(_(score_map[i]));
-
- case COL_ATTACHMENT:
- case COL_FLAGGED:
- case COL_DELETED:
- case COL_UNREAD:
- return g_strdup_printf("%d", (int) value);
-
- case COL_SENT:
- case COL_RECEIVED:
- return filter_date (GPOINTER_TO_INT(value));
-
- case COL_SIZE:
- return filter_size (GPOINTER_TO_INT(value));
-
- case COL_FROM:
- case COL_SUBJECT:
- case COL_TO:
- return g_strdup (value);
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-static GdkPixbuf *
-ml_tree_icon_at (ETreeModel *etm, ETreePath path, void *model_data)
-{
- /* we dont really need an icon ... */
- return NULL;
-}
-
-/* return true if there are any unread messages in the subtree */
-static int
-subtree_unread(MessageList *ml, ETreePath node)
-{
- CamelMessageInfo *info;
- ETreePath child;
-
- while (node) {
- info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
- g_assert(info);
-
- if (!(info->flags & CAMEL_MESSAGE_SEEN))
- return TRUE;
-
- if ((child = e_tree_model_node_get_first_child (E_TREE_MODEL (ml->model), node)))
- if (subtree_unread(ml, child))
- return TRUE;
- node = e_tree_model_node_get_next (ml->model, node);
- }
- return FALSE;
-}
-
-static int
-subtree_size(MessageList *ml, ETreePath node)
-{
- CamelMessageInfo *info;
- int size = 0;
- ETreePath child;
-
- while (node) {
- info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
- g_assert(info);
-
- size += info->size;
- if ((child = e_tree_model_node_get_first_child (E_TREE_MODEL (ml->model), node)))
- size += subtree_size(ml, child);
-
- node = e_tree_model_node_get_next (ml->model, node);
- }
- return size;
-}
-
-static time_t
-subtree_earliest(MessageList *ml, ETreePath node, int sent)
-{
- CamelMessageInfo *info;
- time_t earliest = 0, date;
- ETreePath *child;
-
- while (node) {
- info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
- g_assert(info);
-
- if (sent)
- date = info->date_sent;
- else
- date = info->date_received;
-
- if (earliest == 0 || date < earliest)
- earliest = date;
-
- if ((child = e_tree_model_node_get_first_child (ml->model, node))) {
- date = subtree_earliest(ml, child, sent);
- if (earliest == 0 || (date != 0 && date < earliest))
- earliest = date;
- }
-
- node = e_tree_model_node_get_next (ml->model, node);
- }
-
- return earliest;
-}
-
-static void *
-ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
-{
- MessageList *message_list = model_data;
- CamelMessageInfo *msg_info;
-
- /* retrieve the message information array */
- msg_info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path);
- g_assert(msg_info);
-
- switch (col){
- case COL_MESSAGE_STATUS: {
- ETreePath child;
-
- /* if a tree is collapsed, then scan its insides for details */
- child = e_tree_model_node_get_first_child(etm, path);
- if (child && !e_tree_node_is_expanded(message_list->tree, path)) {
- if (subtree_unread(message_list, child))
- return (void *)3;
- else
- return (void *)4;
- }
-
- if (msg_info->flags & CAMEL_MESSAGE_ANSWERED)
- return GINT_TO_POINTER (2);
- else if (msg_info->flags & CAMEL_MESSAGE_SEEN)
- return GINT_TO_POINTER (1);
- else
- return GINT_TO_POINTER (0);
- break;
- }
- case COL_FLAGGED:
- return GINT_TO_POINTER ((msg_info->flags & CAMEL_MESSAGE_FLAGGED) != 0);
- case COL_SCORE: {
- const char *tag;
- int score = 0;
-
- tag = camel_tag_get ((CamelTag **) &msg_info->user_tags, "score");
- if (tag)
- score = atoi (tag);
-
- return GINT_TO_POINTER (score);
- }
- case COL_ATTACHMENT:
- return GINT_TO_POINTER ((msg_info->flags & CAMEL_MESSAGE_ATTACHMENTS) != 0);
- case COL_FROM:
- return (void *)camel_message_info_from(msg_info);
- case COL_SUBJECT:
- return (void *)camel_message_info_subject(msg_info);
- case COL_SENT:
- return GINT_TO_POINTER (msg_info->date_sent);
- case COL_RECEIVED:
- return GINT_TO_POINTER (msg_info->date_received);
- case COL_TO:
- return (void *)camel_message_info_to(msg_info);
- case COL_SIZE:
- return GINT_TO_POINTER (msg_info->size);
- case COL_DELETED:
- return GINT_TO_POINTER ((msg_info->flags & CAMEL_MESSAGE_DELETED) != 0);
- case COL_UNREAD: {
- ETreePath child;
-
- child = e_tree_model_node_get_first_child(etm, path);
- if (child && !e_tree_node_is_expanded(message_list->tree, path)
- && (msg_info->flags & CAMEL_MESSAGE_SEEN)) {
- return (void *)subtree_unread(message_list, child);
- }
-
- return GINT_TO_POINTER (!(msg_info->flags & CAMEL_MESSAGE_SEEN));
- }
- case COL_COLOUR: {
- const char *colour;
-
- colour = camel_tag_get ((CamelTag **) &msg_info->user_tags, "colour");
- if (colour == NULL && msg_info->flags & CAMEL_MESSAGE_FLAGGED)
- /* FIXME: extract from the xpm somehow. */
- colour = "#A7453E";
- return (void *)colour;
- }
- }
-
- g_assert_not_reached ();
-
- return NULL;
-}
-
-static void
-ml_tree_set_value_at (ETreeModel *etm, ETreePath path, int col,
- const void *val, void *model_data)
-{
- g_assert_not_reached ();
-}
-
-static gboolean
-ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_data)
-{
- return FALSE;
-}
-
-static void
-message_list_init_images (void)
-{
- int i;
-
- /*
- * Only load once, and share
- */
- if (states_pixmaps [0].pixbuf)
- return;
-
- for (i = 0; states_pixmaps [i].image_base; i++){
- states_pixmaps [i].pixbuf = gdk_pixbuf_new_from_xpm_data (
- (const char **) states_pixmaps [i].image_base);
- }
-}
-
-static char *
-filter_date (time_t date)
-{
- time_t nowdate = time(NULL);
- time_t yesdate;
- struct tm then, now, yesterday;
- char buf[26];
- gboolean done = FALSE;
-
- if (date == 0)
- return g_strdup (_("?"));
-
- localtime_r (&date, &then);
- localtime_r (&nowdate, &now);
- if (then.tm_mday == now.tm_mday &&
- then.tm_mon == now.tm_mon &&
- then.tm_year == now.tm_year) {
- e_strftime_fix_am_pm (buf, 26, _("Today %l:%M %p"), &then);
- done = TRUE;
- }
- if (!done) {
- yesdate = nowdate - 60 * 60 * 24;
- localtime_r (&yesdate, &yesterday);
- if (then.tm_mday == yesterday.tm_mday &&
- then.tm_mon == yesterday.tm_mon &&
- then.tm_year == yesterday.tm_year) {
- e_strftime_fix_am_pm (buf, 26, _("Yesterday %l:%M %p"), &then);
- done = TRUE;
- }
- }
- if (!done) {
- int i;
- for (i = 2; i < 7; i++) {
- yesdate = nowdate - 60 * 60 * 24 * i;
- localtime_r (&yesdate, &yesterday);
- if (then.tm_mday == yesterday.tm_mday &&
- then.tm_mon == yesterday.tm_mon &&
- then.tm_year == yesterday.tm_year) {
- e_strftime_fix_am_pm (buf, 26, _("%a %l:%M %p"), &then);
- done = TRUE;
- break;
- }
- }
- }
- if (!done) {
- if (then.tm_year == now.tm_year) {
- e_strftime_fix_am_pm (buf, 26, _("%b %d %l:%M %p"), &then);
- } else {
- e_strftime_fix_am_pm (buf, 26, _("%b %d %Y"), &then);
- }
- }
-#if 0
-#ifdef CTIME_R_THREE_ARGS
- ctime_r (&date, buf, 26);
-#else
- ctime_r (&date, buf);
-#endif
-#endif
-
- return g_strdup (buf);
-}
-
-static ETableExtras *
-message_list_create_extras (void)
-{
- int i;
- GdkPixbuf *images [7];
- ETableExtras *extras;
- ECell *cell;
-
- extras = e_table_extras_new();
- e_table_extras_add_pixbuf(extras, "status", states_pixmaps [0].pixbuf);
- e_table_extras_add_pixbuf(extras, "score", states_pixmaps [13].pixbuf);
- e_table_extras_add_pixbuf(extras, "attachment", states_pixmaps [6].pixbuf);
- e_table_extras_add_pixbuf(extras, "flagged", states_pixmaps [7].pixbuf);
-
- e_table_extras_add_compare(extras, "address_compare", address_compare);
- e_table_extras_add_compare(extras, "subject_compare", subject_compare);
-
- for (i = 0; i < 5; i++)
- images [i] = states_pixmaps [i].pixbuf;
-
- e_table_extras_add_cell(extras, "render_message_status", e_cell_toggle_new (0, 5, images));
-
- for (i = 0; i < 2; i++)
- images [i] = states_pixmaps [i + 5].pixbuf;
-
- e_table_extras_add_cell(extras, "render_attachment", e_cell_toggle_new (0, 2, images));
-
- images [1] = states_pixmaps [7].pixbuf;
- e_table_extras_add_cell(extras, "render_flagged", e_cell_toggle_new (0, 2, images));
-
- for (i = 0; i < 7; i++)
- images[i] = states_pixmaps [i + 7].pixbuf;
-
- e_table_extras_add_cell(extras, "render_score", e_cell_toggle_new (0, 7, images));
-
- /* date cell */
- cell = e_cell_date_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "bold_column", COL_UNREAD,
- "color_column", COL_COLOUR,
- NULL);
- e_table_extras_add_cell(extras, "render_date", cell);
-
- /* text cell */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "bold_column", COL_UNREAD,
- "color_column", COL_COLOUR,
- NULL);
- e_table_extras_add_cell(extras, "render_text", cell);
-
- e_table_extras_add_cell(extras, "render_tree",
- e_cell_tree_new (NULL, NULL, /* let the tree renderer default the pixmaps */
- TRUE, cell));
-
- /* size cell */
- cell = e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT);
- gtk_object_set (GTK_OBJECT (cell),
- "bold_column", COL_UNREAD,
- "color_column", COL_COLOUR,
- NULL);
- e_table_extras_add_cell(extras, "render_size", cell);
-
- return extras;
-}
-
-static void
-save_tree_state(MessageList *ml)
-{
- char *filename;
-
- if (ml->folder == NULL || ml->tree == NULL)
- return;
-
- filename = mail_config_folder_to_cachename(ml->folder, "et-header-");
- e_tree_save_state(ml->tree, filename);
- g_free(filename);
-
- filename = mail_config_folder_to_cachename(ml->folder, "et-expanded-");
- e_tree_save_expanded_state(ml->tree, filename);
- g_free(filename);
-}
-
-static void
-sort_info_changed (GtkWidget *widget, MessageList *ml)
-{
- save_tree_state(ml);
-}
-
-static void
-message_list_setup_etree (MessageList *message_list, gboolean outgoing)
-{
- ETableState *etstate;
-
- /* build the spec based on the folder, and possibly from a saved file */
- /* otherwise, leave default */
- if (message_list->folder) {
- char *path;
- char *name;
- struct stat st;
-
- name = camel_service_get_name (CAMEL_SERVICE (message_list->folder->parent_store), TRUE);
- d(printf ("folder name is '%s'\n", name));
-
- path = mail_config_folder_to_cachename (message_list->folder, "et-header-");
- if (path && stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
- /* build based on saved file */
- e_tree_load_state (message_list->tree, path);
- } else if (outgoing) {
- /* Swap From/To for Drafts, Sent, Outbox */
- char *state = "<ETableState>"
- "<column source=\"0\"/> <column source=\"1\"/> "
- "<column source=\"8\"/> <column source=\"5\"/> "
- "<column source=\"6\"/> <grouping> </grouping> </ETableState>";
-
- e_tree_set_state (message_list->tree, state);
- }
- g_free (path);
-
- path = mail_config_folder_to_cachename (message_list->folder, "et-expanded-");
- if (path && stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
- /* build based on saved file */
- e_tree_load_expanded_state (message_list->tree, path);
- }
- g_free (path);
-
- g_free (name);
-
- etstate = e_tree_get_state_object (message_list->tree);
- gtk_signal_connect (GTK_OBJECT (etstate->sort_info),
- "sort_info_changed",
- GTK_SIGNAL_FUNC (sort_info_changed),
- message_list);
- gtk_signal_connect (GTK_OBJECT (etstate->sort_info),
- "group_info_changed",
- GTK_SIGNAL_FUNC (sort_info_changed),
- message_list);
-
- gtk_object_unref (GTK_OBJECT (etstate));
- }
-}
-
-/*
- * GtkObject::init
- */
-static void
-message_list_init (GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
-
- e_scroll_frame_set_policy (E_SCROLL_FRAME (message_list),
- GTK_POLICY_NEVER,
- GTK_POLICY_ALWAYS);
-
- message_list->hidden = NULL;
- message_list->hidden_pool = NULL;
- message_list->hide_before = ML_HIDE_NONE_START;
- message_list->hide_after = ML_HIDE_NONE_END;
-
- message_list->search = NULL;
-
- message_list->hide_lock = g_mutex_new();
-
- message_list->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-message_list_destroy (GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
-
- if (message_list->folder) {
- save_tree_state(message_list);
- hide_save_state(message_list);
-
- camel_object_unhook_event((CamelObject *)message_list->folder, "folder_changed",
- folder_changed, message_list);
- camel_object_unhook_event((CamelObject *)message_list->folder, "message_changed",
- message_changed, message_list);
- camel_object_unref (CAMEL_OBJECT (message_list->folder));
- }
-
- gtk_object_unref (GTK_OBJECT (message_list->extras));
- gtk_object_unref (GTK_OBJECT (message_list->model));
-
- if (message_list->idle_id != 0)
- g_source_remove (message_list->idle_id);
-
- if (message_list->seen_id)
- gtk_timeout_remove (message_list->seen_id);
-
- if (message_list->hidden) {
- g_hash_table_destroy(message_list->hidden);
- e_mempool_destroy(message_list->hidden_pool);
- message_list->hidden = NULL;
- message_list->hidden_pool = NULL;
- }
-
- if (message_list->uid_nodemap) {
- g_hash_table_foreach(message_list->uid_nodemap, (GHFunc)clear_info, message_list);
- g_hash_table_destroy (message_list->uid_nodemap);
- }
-
- g_free(message_list->cursor_uid);
-
- g_mutex_free(message_list->hide_lock);
-
- GTK_OBJECT_CLASS (message_list_parent_class)->destroy (object);
-}
-
-/*
- * GtkObjectClass::init
- */
-static void
-message_list_class_init (GtkObjectClass *object_class)
-{
- message_list_parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = message_list_destroy;
-
- message_list_signals[MESSAGE_SELECTED] =
- gtk_signal_new ("message_selected",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (MessageListClass, message_selected),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1, GTK_TYPE_STRING);
-
- message_list_signals[MESSAGE_LIST_BUILT] =
- gtk_signal_new ("message_list_built",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (MessageListClass, message_list_built),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals(object_class, message_list_signals, LAST_SIGNAL);
-
- message_list_init_images ();
-}
-
-static void
-message_list_construct (MessageList *message_list)
-{
- message_list->model =
- e_tree_memory_callbacks_new (ml_tree_icon_at,
-
- ml_column_count,
-
- ml_has_save_id,
- ml_get_save_id,
-
- ml_has_get_node_by_id,
- ml_get_node_by_id,
-
- ml_tree_value_at,
- ml_tree_set_value_at,
- ml_tree_is_cell_editable,
-
- ml_duplicate_value,
- ml_free_value,
- ml_initialize_value,
- ml_value_is_empty,
- ml_value_to_string,
-
- message_list);
- gtk_object_ref (GTK_OBJECT (message_list->model));
- gtk_object_sink (GTK_OBJECT (message_list->model));
-
- e_tree_memory_set_expanded_default(E_TREE_MEMORY(message_list->model), TRUE);
-
- /*
- * The etree
- */
- message_list->extras = message_list_create_extras ();
- e_tree_scrolled_construct_from_spec_file (E_TREE_SCROLLED (message_list),
- message_list->model,
- message_list->extras,
- EVOLUTION_ETSPECDIR "/message-list.etspec",
- NULL);
-
- message_list->tree = e_tree_scrolled_get_tree(E_TREE_SCROLLED (message_list));
- e_tree_root_node_set_visible (message_list->tree, FALSE);
-
- gtk_signal_connect (GTK_OBJECT (message_list->tree), "cursor_activated",
- GTK_SIGNAL_FUNC (on_cursor_activated_cmd),
- message_list);
-
- gtk_signal_connect (GTK_OBJECT (message_list->tree), "click",
- GTK_SIGNAL_FUNC (on_click), message_list);
-}
-
-GtkWidget *
-message_list_new (void)
-{
- MessageList *message_list;
-
- message_list = MESSAGE_LIST (gtk_widget_new (message_list_get_type (),
- "hadjustment", NULL,
- "vadjustment", NULL,
- NULL));
- message_list_construct (message_list);
-
- return GTK_WIDGET (message_list);
-}
-
-static void
-clear_info(char *key, ETreePath *node, MessageList *ml)
-{
- CamelMessageInfo *info;
-
- info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
- camel_folder_free_message_info(ml->folder, info);
-}
-
-static void
-clear_tree (MessageList *ml)
-{
- ETreeModel *etm = ml->model;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- printf("Clearing tree\n");
- gettimeofday(&start, NULL);
-#endif
-
- /* we also reset the uid_rowmap since it is no longer useful/valid anyway */
- if (ml->folder)
- g_hash_table_foreach (ml->uid_nodemap, (GHFunc)clear_info, ml);
- g_hash_table_destroy (ml->uid_nodemap);
- ml->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (ml->tree_root) {
- /* we should be frozen already */
- e_tree_memory_node_remove (E_TREE_MEMORY(etm), ml->tree_root);
- }
-
- ml->tree_root = e_tree_memory_node_insert (E_TREE_MEMORY(etm), NULL, 0, NULL);
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Clearing tree took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
-#endif
-
-}
-
-/* we try and find something that isn't deleted in our tree
- there is actually no assurance that we'll find somethign that will
- still be there next time, but its probably going to work most of the time */
-static char *
-find_next_undeleted (MessageList *ml)
-{
- ETreePath node;
- int last;
- int vrow;
- ETree *et = ml->tree;
- CamelMessageInfo *info;
-
- node = g_hash_table_lookup (ml->uid_nodemap, ml->cursor_uid);
- if (node == NULL)
- return NULL;
-
- info = get_message_info (ml, node);
- if (info && (info->flags & CAMEL_MESSAGE_DELETED) == 0) {
- return NULL;
- }
-
- last = e_tree_row_count (ml->tree);
-
- /* model_to_view_row etc simply dont work for sorted views. Sigh. */
- vrow = e_tree_row_of_node (et, node);
-
- /* We already checked this node. */
- vrow ++;
-
- while (vrow < last) {
- CamelMessageInfo *info;
-
- node = e_tree_node_at_row (et, vrow);
- info = get_message_info (ml, node);
- if (info && (info->flags & CAMEL_MESSAGE_DELETED) == 0) {
- return g_strdup (camel_message_info_uid (info));
- }
- vrow ++;
- }
-
- return NULL;
-}
-
-/* only call if we have a tree model */
-/* builds the tree structure */
-static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row);
-
-static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row);
-
-static void
-build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *changes)
-{
- int row = 0;
- ETreeModel *etm = ml->model;
- ETreePath *top;
- char *saveuid = NULL;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- printf("Building tree\n");
- gettimeofday(&start, NULL);
-#endif
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Loading tree state took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
-#endif
-
- if (ml->tree_root == NULL) {
- ml->tree_root = e_tree_memory_node_insert(E_TREE_MEMORY(etm), NULL, 0, NULL);
- }
-
- if (ml->cursor_uid) {
- if (ml->hidedeleted) {
- saveuid = find_next_undeleted(ml);
- }
- }
-
-#define BROKEN_ETREE /* avoid some broken code in etree(?) by not using the incremental update */
-
- top = e_tree_model_node_get_first_child(etm, ml->tree_root);
-#ifndef BROKEN_ETREE
- if (top == NULL || changes == NULL) {
-#endif
- e_tree_memory_freeze(E_TREE_MEMORY(etm));
- clear_tree (ml);
-
- build_subtree(ml, ml->tree_root, thread->tree, &row);
-
- e_tree_memory_thaw(E_TREE_MEMORY(etm));
-#ifndef BROKEN_ETREE
- } else {
- static int tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
-
- build_subtree_diff(ml, ml->tree_root, top, thread->tree, &row);
- top = e_tree_model_node_get_first_child(etm, ml->tree_root);
- tree_equal(ml->model, top, thread->tree);
- }
-#endif
-
- if (saveuid) {
- ETreePath *node = g_hash_table_lookup(ml->uid_nodemap, saveuid);
- if (node == NULL) {
- g_free(ml->cursor_uid);
- ml->cursor_uid = NULL;
- gtk_signal_emit((GtkObject *)ml, message_list_signals[MESSAGE_SELECTED], NULL);
- } else {
- e_tree_set_cursor(ml->tree, node);
- }
- g_free(saveuid);
- } else if (ml->cursor_uid && !g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) {
- g_free(ml->cursor_uid);
- ml->cursor_uid = NULL;
- gtk_signal_emit((GtkObject *)ml, message_list_signals[MESSAGE_SELECTED], NULL);
- }
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Building tree took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
-#endif
-
-}
-
-/* this is about 20% faster than build_subtree_diff,
- entirely because e_tree_model_node_insert(xx, -1 xx)
- is faster than inserting to the right row :( */
-/* Otherwise, this code would probably go as it does the same thing essentially */
-static void
-build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row)
-{
- ETreeModel *tree = ml->model;
- ETreePath node;
-
- while (c) {
- /* phantom nodes no longer allowed */
- g_assert(c->message);
-
- node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (void *)c->message);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node);
- camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message);
-
- if (c->child) {
- build_subtree(ml, node, c->child, row);
- }
- c = c->next;
- }
-}
-
-/* compares a thread tree node with the etable tree node to see if they point to
- the same object */
-static int
-node_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
-{
- CamelMessageInfo *info;
-
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(etm), ap);
-
- if (bp->message && strcmp(camel_message_info_uid(info), camel_message_info_uid(bp->message))==0)
- return 1;
-
- return 0;
-}
-
-#ifndef BROKEN_ETREE
-/* debug function - compare the two trees to see if they are the same */
-static int
-tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
-{
- CamelMessageInfo *info;
-
- while (ap && bp) {
- if (!node_equal(etm, ap, bp)) {
- g_warning("Nodes in tree differ");
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(etm), ap);
- printf("table uid = %s\n", camel_message_info_uid(info));
- printf("camel uid = %s\n", camel_message_info_uid(bp->message));
- return FALSE;
- } else {
- if (!tree_equal(etm, e_tree_model_node_get_first_child(etm, ap), bp->child))
- return FALSE;
- }
- bp = bp->next;
- ap = e_tree_model_node_get_next(etm, ap);
- }
-
- if (ap || bp) {
- g_warning("Tree differs, out of nodes in one branch");
- if (ap) {
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(etm), ap);
- if (info)
- printf("table uid = %s\n", camel_message_info_uid(info));
- else
- printf("info is empty?\n");
- }
- if (bp) {
- printf("camel uid = %s\n", camel_message_info_uid(bp->message));
- return FALSE;
- }
- return FALSE;
- }
- return TRUE;
-}
-#endif
-
-/* adds a single node, retains save state, and handles adding children if required */
-static void
-add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row, int myrow)
-{
- ETreeModel *etm = ml->model;
- ETreePath node;
-
- g_assert(c->message);
-
- /* we just update the hashtable key, umm, does this leak the info on the message node? */
- g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(c->message));
- node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (void *)c->message);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node);
- camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message);
- (*row)++;
-
- if (c->child) {
- build_subtree_diff(ml, node, NULL, c->child, row);
- }
-}
-
-/* removes node, children recursively and all associated data */
-static void
-remove_node_diff(MessageList *ml, ETreePath node, int depth)
-{
- ETreeModel *etm = ml->model;
- ETreePath cp, cn;
- CamelMessageInfo *info;
-
- t(printf("Removing node: %s\n", (char *)e_tree_memory_node_get_data(etm, node)));
-
- /* we depth-first remove all node data's ... */
- cp = e_tree_model_node_get_first_child(etm, node);
- while (cp) {
- cn = e_tree_model_node_get_next(etm, cp);
- remove_node_diff(ml, cp, depth+1);
- cp = cn;
- }
-
- /* and the rowid entry - if and only if it is referencing this node */
- info = e_tree_memory_node_get_data(E_TREE_MEMORY (etm), node);
-
- /* and only at the toplevel, remove the node (etree should optimise this remove somewhat) */
- if (depth == 0)
- e_tree_memory_node_remove(E_TREE_MEMORY(etm), node);
-
- g_assert(info);
- g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(info));
- camel_folder_free_message_info(ml->folder, info);
-}
-
-/* applies a new tree structure to an existing tree, but only by changing things
- that have changed */
-static void
-build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row)
-{
- ETreeModel *etm = ml->model;
- ETreePath ap, *ai, *at, *tmp;
- CamelFolderThreadNode *bp, *bi, *bt;
- int i, j, myrow = 0;
-
- ap = path;
- bp = c;
-
- while (ap || bp) {
- t(printf("Processing row: %d (subtree row %d)\n", *row, myrow));
- if (ap == NULL) {
- t(printf("out of old nodes\n"));
- /* ran out of old nodes - remaining nodes are added */
- add_node_diff(ml, parent, ap, bp, row, myrow);
- myrow++;
- bp = bp->next;
- } else if (bp == NULL) {
- t(printf("out of new nodes\n"));
- /* ran out of new nodes - remaining nodes are removed */
- tmp = e_tree_model_node_get_next(etm, ap);
- remove_node_diff(ml, ap, 0);
- ap = tmp;
- } else if (node_equal(etm, ap, bp)) {
- /*t(printf("nodes match, verify\n"));*/
- /* matching nodes, verify details/children */
-#if 0
- if (bp->message) {
- char *olduid;
- int oldrow;
- /* if this is a message row, check/update the row id map */
- if (g_hash_table_lookup_extended(ml->uid_rowmap, camel_message_info_uid(bp->message), (void *)&olduid, (void *)&oldrow)) {
- if (oldrow != (*row)) {
- g_hash_table_insert(ml->uid_rowmap, olduid, (void *)(*row));
- }
- } else {
- g_warning("Cannot find uid %s in table?", camel_message_info_uid(bp->message));
- /*g_assert_not_reached();*/
- }
- }
-#endif
- *row = (*row)+1;
- myrow++;
- tmp = e_tree_model_node_get_first_child(etm, ap);
- /* make child lists match (if either has one) */
- if (bp->child || tmp) {
- build_subtree_diff(ml, ap, tmp, bp->child, row);
- }
- ap = e_tree_model_node_get_next(etm, ap);
- bp = bp->next;
- } else {
- t(printf("searching for matches\n"));
- /* we have to scan each side for a match */
- bi = bp->next;
- ai = e_tree_model_node_get_next(etm, ap);
- for (i=1;bi!=NULL;i++,bi=bi->next) {
- if (node_equal(etm, ap, bi))
- break;
- }
- for (j=1;ai!=NULL;j++,ai=e_tree_model_node_get_next(etm, ai)) {
- if (node_equal(etm, ai, bp))
- break;
- }
- if (i<j) {
- /* smaller run of new nodes - must be nodes to add */
- if (bi) {
- bt = bp;
- while (bt != bi) {
- t(printf("adding new node 0\n"));
- add_node_diff(ml, parent, NULL, bt, row, myrow);
- myrow++;
- bt = bt->next;
- }
- bp = bi;
- } else {
- t(printf("adding new node 1\n"));
- /* no match in new nodes, add one, try next */
- add_node_diff(ml, parent, NULL, bp, row, myrow);
- myrow++;
- bp = bp->next;
- }
- } else {
- /* bigger run of old nodes - must be nodes to remove */
- if (ai) {
- at = ap;
- while (at != ai) {
- t(printf("removing old node 0\n"));
- tmp = e_tree_model_node_get_next(etm, at);
- remove_node_diff(ml, at, 0);
- at = tmp;
- }
- ap = ai;
- } else {
- t(printf("adding new node 2\n"));
- /* didn't find match in old nodes, must be new node? */
- add_node_diff(ml, parent, NULL, bp, row, myrow);
- myrow++;
- bp = bp->next;
-#if 0
- tmp = e_tree_model_node_get_next(etm, ap);
- remove_node_diff(etm, ap, 0);
- ap = tmp;
-#endif
- }
- }
- }
- }
-}
-
-#ifndef BROKEN_ETREE
-static void build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes);
-#endif
-
-static void
-build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
-{
- ETreeModel *etm = ml->model;
- ETreePath node;
- char *saveuid = NULL;
- int i;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- printf("Building flat\n");
- gettimeofday(&start, NULL);
-#endif
-
- if (ml->cursor_uid) {
- if (ml->hidedeleted) {
- saveuid = find_next_undeleted(ml);
- }
- }
-
-#ifndef BROKEN_ETREE
- if (changes) {
- build_flat_diff(ml, changes);
- } else {
-#endif
- e_tree_memory_freeze(E_TREE_MEMORY(etm));
- clear_tree (ml);
- for (i = 0; i < summary->len; i++) {
- CamelMessageInfo *info = summary->pdata[i];
-
- node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), ml->tree_root, -1, info);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(info), node);
- camel_folder_ref_message_info(ml->folder, info);
- }
- e_tree_memory_thaw(E_TREE_MEMORY(etm));
-
-#ifndef BROKEN_ETREE
- }
-#endif
-
- if (saveuid) {
- ETreePath *node = g_hash_table_lookup(ml->uid_nodemap, saveuid);
- if (node == NULL) {
- g_free(ml->cursor_uid);
- ml->cursor_uid = NULL;
- gtk_signal_emit((GtkObject *)ml, message_list_signals[MESSAGE_SELECTED], NULL);
- } else {
- e_tree_set_cursor(ml->tree, node);
- }
- g_free(saveuid);
- }
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Building flat took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
-#endif
-
-}
-
-#ifndef BROKEN_ETREE
-
-static void
-build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
-{
- int i;
- ETreePath node;
- CamelMessageInfo *info;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- gettimeofday(&start, NULL);
-#endif
-
- printf("updating changes to display\n");
-
- /* remove individual nodes? */
- d(printf("Removing messages from view:\n"));
- for (i=0;i<changes->uid_removed->len;i++) {
- node = g_hash_table_lookup(ml->uid_nodemap, changes->uid_removed->pdata[i]);
- if (node) {
- info = e_tree_memory_node_get_data(E_TREE_MEMORY(ml->model), node);
- e_tree_memory_node_remove(E_TREE_MEMORY(ml->model), node);
- camel_folder_free_message_info(ml->folder, info);
- g_hash_table_remove(ml->uid_nodemap, changes->uid_removed->pdata[i]);
- }
- }
-
- /* add new nodes? - just append to the end */
- d(printf("Adding messages to view:\n"));
- for (i=0;i<changes->uid_added->len;i++) {
- info = camel_folder_get_message_info (ml->folder, changes->uid_added->pdata[i]);
- if (info) {
- d(printf(" %s\n", (char *)changes->uid_added->pdata[i]));
- node = e_tree_memory_node_insert (E_TREE_MEMORY (ml->model), ml->tree_root, -1, info);
- g_hash_table_insert (ml->uid_nodemap, (void *)camel_message_info_uid (info), node);
- }
- }
-
- /* and update changes too */
- d(printf("Changing messages to view:\n"));
- for (i = 0; i < changes->uid_changed->len; i++) {
- ETreePath *node = g_hash_table_lookup (ml->uid_nodemap, changes->uid_changed->pdata[i]);
- if (node)
- e_tree_model_node_data_changed (ml->model, node);
- }
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Inserting changes took %ld.%03ld seconds\n", diff / 1000, diff % 1000);
-#endif
-
-}
-#endif /* ! BROKEN_ETREE */
-
-static void
-main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- MessageList *ml = MESSAGE_LIST (user_data);
- CamelFolderChangeInfo *changes = (CamelFolderChangeInfo *)event_data, *newchanges;
- CamelMessageInfo *info;
- CamelFolder *folder = (CamelFolder *)o;
- int i;
-
- d(printf("folder changed event, changes = %p\n", changes));
- if (changes) {
- d(printf("changed = %d added = %d removed = %d\n",
- changes->uid_changed->len, changes->uid_added->len, changes->uid_removed->len));
-
- /* check if the hidden state has changed, if so modify accordingly, then regenerate */
- if (ml->hidedeleted) {
- newchanges = camel_folder_change_info_new ();
-
- for (i = 0; i < changes->uid_changed->len; i++) {
- ETreePath node = g_hash_table_lookup (ml->uid_nodemap, changes->uid_changed->pdata[i]);
-
- info = camel_folder_get_message_info (folder, changes->uid_changed->pdata[i]);
- if (node != NULL && info != NULL && (info->flags & CAMEL_MESSAGE_DELETED) != 0) {
- camel_folder_change_info_remove_uid (newchanges, changes->uid_changed->pdata[i]);
- } else if (node == NULL && info != NULL && (info->flags & CAMEL_MESSAGE_DELETED) == 0) {
- camel_folder_change_info_add_uid (newchanges, changes->uid_changed->pdata[i]);
- } else {
- camel_folder_change_info_change_uid (newchanges, changes->uid_changed->pdata[i]);
- }
- camel_folder_free_message_info (folder, info);
- }
-
- if (newchanges->uid_added->len > 0 || newchanges->uid_removed->len > 0) {
- for (i = 0; i < changes->uid_added->len; i++)
- camel_folder_change_info_add_uid (newchanges, changes->uid_added->pdata[i]);
- for (i = 0; i < changes->uid_removed->len; i++)
- camel_folder_change_info_remove_uid (newchanges, changes->uid_removed->pdata[i]);
- camel_folder_change_info_free (changes);
- changes = newchanges;
- } else {
- camel_folder_change_info_free (newchanges);
- }
- }
-
- if (changes->uid_added->len == 0 && changes->uid_removed->len == 0 && changes->uid_changed->len < 100) {
- for (i = 0; i < changes->uid_changed->len; i++) {
- ETreePath node = g_hash_table_lookup (ml->uid_nodemap, changes->uid_changed->pdata[i]);
- if (node)
- e_tree_model_node_data_changed (ml->model, node);
- }
-
- camel_folder_change_info_free (changes);
- return;
- }
- }
-
- mail_regen_list (ml, ml->search, NULL, changes);
-}
-
-static void
-folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- /* similarly to message_changed, copy the change list and propagate it to
- the main thread and free it */
- CamelFolderChangeInfo *changes;
-
- if (event_data) {
- changes = camel_folder_change_info_new();
- camel_folder_change_info_cat(changes, (CamelFolderChangeInfo *)event_data);
- } else {
- changes = NULL;
- }
- mail_proxy_event (main_folder_changed, o, changes, user_data);
-}
-
-static void
-main_message_changed (CamelObject *o, gpointer uid, gpointer user_data)
-{
- MessageList *ml = MESSAGE_LIST (user_data);
- CamelFolderChangeInfo *changes;
-
- changes = camel_folder_change_info_new();
- camel_folder_change_info_change_uid(changes, uid);
- main_folder_changed(o, changes, ml);
- g_free(uid);
-}
-
-static void
-message_changed (CamelObject *o, gpointer event_data, gpointer user_data)
-{
- /* Here we copy the data because our thread may free the copy that we would reference.
- * The other thread would be passed a uid parameter that pointed to freed data.
- * We copy it and free it in the handler.
- */
- mail_proxy_event (main_message_changed, o, g_strdup ((gchar *)event_data), user_data);
-}
-
-void
-message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, gboolean outgoing)
-{
- CamelException ex;
-
- g_return_if_fail (message_list != NULL);
- g_return_if_fail (IS_MESSAGE_LIST (message_list));
-
- if (message_list->folder == camel_folder)
- return;
-
- camel_exception_init (&ex);
-
- clear_tree(message_list);
-
- if (message_list->folder) {
- hide_save_state(message_list);
- camel_object_unhook_event((CamelObject *)message_list->folder, "folder_changed",
- folder_changed, message_list);
- camel_object_unhook_event((CamelObject *)message_list->folder, "message_changed",
- message_changed, message_list);
- camel_object_unref (CAMEL_OBJECT (message_list->folder));
- }
-
- message_list->folder = camel_folder;
-
- if (message_list->cursor_uid) {
- g_free(message_list->cursor_uid);
- message_list->cursor_uid = NULL;
- gtk_signal_emit((GtkObject *)message_list, message_list_signals[MESSAGE_SELECTED], NULL);
- }
-
- if (camel_folder) {
- /* Setup the strikeout effect for non-vtrash folders */
- if (!CAMEL_IS_VTRASH_FOLDER (camel_folder)) {
- ECell *cell;
-
- cell = e_table_extras_get_cell (message_list->extras, "render_date");
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", COL_DELETED,
- NULL);
-
- cell = e_table_extras_get_cell (message_list->extras, "render_text");
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", COL_DELETED,
- NULL);
-
- cell = e_table_extras_get_cell (message_list->extras, "render_size");
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", COL_DELETED,
- NULL);
- }
-
- /* Build the etree suitable for this folder */
- message_list_setup_etree (message_list, outgoing);
-
- camel_object_hook_event (CAMEL_OBJECT (camel_folder), "folder_changed",
- folder_changed, message_list);
- camel_object_hook_event (CAMEL_OBJECT (camel_folder), "message_changed",
- message_changed, message_list);
-
- camel_object_ref (CAMEL_OBJECT (camel_folder));
-
- message_list->hidedeleted = mail_config_get_hide_deleted () &&
- !(CAMEL_IS_VTRASH_FOLDER (camel_folder));
-
- hide_load_state (message_list);
- mail_regen_list (message_list, message_list->search, NULL, NULL);
- }
-}
-
-E_MAKE_TYPE (message_list, "MessageList", MessageList, message_list_class_init, message_list_init, PARENT_TYPE);
-
-static gboolean
-on_cursor_activated_idle (gpointer data)
-{
- MessageList *message_list = data;
- ESelectionModel *esm = e_tree_get_selection_model (message_list->tree);
- gint selected = e_selection_model_selected_count (esm);
-
- if (selected == 1) {
- printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid);
- gtk_signal_emit (GTK_OBJECT (message_list),
- message_list_signals[MESSAGE_SELECTED], message_list->cursor_uid);
- }
-
- message_list->idle_id = 0;
- return FALSE;
-}
-
-static void
-on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data)
-{
- MessageList *message_list = MESSAGE_LIST (user_data);
- const char *new_uid;
-
- if (path == NULL)
- new_uid = NULL;
- else
- new_uid = get_message_uid (message_list, path);
-
- if (message_list->cursor_uid != NULL && new_uid != NULL && !strcmp (message_list->cursor_uid, new_uid))
- return;
-
- message_list->cursor_row = row;
- g_free (message_list->cursor_uid);
- message_list->cursor_uid = g_strdup (new_uid);
-
- if (!message_list->idle_id) {
- message_list->idle_id =
- g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle,
- message_list, NULL);
- }
-}
-
-static gint
-on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list)
-{
- int flag;
- CamelMessageInfo *info;
-
- if (col == COL_MESSAGE_STATUS)
- flag = CAMEL_MESSAGE_SEEN;
- else if (col == COL_FLAGGED)
- flag = CAMEL_MESSAGE_FLAGGED;
- else
- return FALSE;
-
- info = get_message_info (list, path);
- if (info == NULL) {
- return FALSE;
- }
-
- /* If a message was marked as deleted and the user flags it as important, undelete it */
- if (col == COL_FLAGGED && (info->flags & CAMEL_MESSAGE_DELETED))
- flag |= CAMEL_MESSAGE_DELETED;
-
- camel_folder_set_message_flags (list->folder, camel_message_info_uid (info), flag, ~info->flags);
-
- if (flag == CAMEL_MESSAGE_SEEN && list->seen_id) {
- gtk_timeout_remove (list->seen_id);
- list->seen_id = 0;
- }
-
- return TRUE;
-}
-
-struct message_list_foreach_data {
- MessageList *message_list;
- MessageListForeachFunc callback;
- gpointer user_data;
-};
-
-static void
-mlfe_callback (ETreePath path, gpointer user_data)
-{
- struct message_list_foreach_data *mlfe_data = user_data;
- const char *uid;
-
- if (e_tree_model_node_is_root (mlfe_data->message_list->model, path))
- return;
-
- uid = get_message_uid (mlfe_data->message_list,
- path);
- if (uid) {
- mlfe_data->callback (mlfe_data->message_list, uid,
- mlfe_data->user_data);
- } else {
- /* FIXME: could this the cause of bug #6637 and friends? */
- g_warning ("I wonder if this could be the cause of bug #6637 and friends?");
- g_assert_not_reached ();
- }
-}
-
-void
-message_list_foreach (MessageList *message_list,
- MessageListForeachFunc callback,
- gpointer user_data)
-{
- struct message_list_foreach_data mlfe_data;
-
- mlfe_data.message_list = message_list;
- mlfe_data.callback = callback;
- mlfe_data.user_data = user_data;
- e_tree_selected_path_foreach (message_list->tree,
- mlfe_callback, &mlfe_data);
-}
-
-/* set whether we are in threaded view or flat view */
-void
-message_list_set_threaded (MessageList *ml, gboolean threaded)
-{
- if (ml->threaded != threaded) {
- ml->threaded = threaded;
-
- mail_regen_list (ml, ml->search, NULL, NULL);
- }
-}
-
-void
-message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted)
-{
- if (ml->folder && CAMEL_IS_VTRASH_FOLDER (ml->folder))
- hidedeleted = FALSE;
-
- if (ml->hidedeleted != hidedeleted) {
- ml->hidedeleted = hidedeleted;
-
- mail_regen_list (ml, ml->search, NULL, NULL);
- }
-}
-
-void
-message_list_set_search (MessageList *ml, const char *search)
-{
- if (search == NULL || search[0] == '\0')
- if (ml->search == NULL || ml->search[0] == '\0')
- return;
-
- if (search != NULL && ml->search != NULL && strcmp (search, ml->search) == 0)
- return;
-
- mail_regen_list (ml, search, NULL, NULL);
-}
-
-/* returns the number of messages displayable *after* expression hiding has taken place */
-unsigned int
-message_list_length (MessageList *ml)
-{
- return ml->hide_unhidden;
-}
-
-/* returns number of hidden messages */
-unsigned int
-message_list_hidden(MessageList *ml)
-{
- unsigned int hidden = 0;
-
- MESSAGE_LIST_LOCK (ml, hide_lock);
- if (ml->hidden)
- hidden = g_hash_table_size (ml->hidden);
- MESSAGE_LIST_UNLOCK (ml, hide_lock);
-
- return hidden;
-}
-
-
-/* add a new expression to hide, or set the range.
- @expr: A new search expression - all matching messages will be hidden. May be %NULL.
- @lower: Use ML_HIDE_NONE_START to specify no messages hidden from the start of the list.
- @upper: Use ML_HIDE_NONE_END to specify no message hidden from the end of the list.
-
- For either @upper or @lower, use ML_HIDE_SAME, to keep the previously set hide range.
- If either range is negative, then the range is taken from the end of the available list
- of messages, once other hiding has been performed. Use message_list_length() to find out
- how many messages are available for hiding.
-
- Example: hide_add(ml, NULL, -100, ML_HIDE_NONE_END) -> hide all but the last (most recent)
- 100 messages.
-*/
-void
-message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper)
-{
- MESSAGE_LIST_LOCK (ml, hide_lock);
-
- if (lower != ML_HIDE_SAME)
- ml->hide_before = lower;
- if (upper != ML_HIDE_SAME)
- ml->hide_after = upper;
-
- MESSAGE_LIST_UNLOCK (ml, hide_lock);
-
- mail_regen_list (ml, ml->search, expr, NULL);
-}
-
-/* hide specific uid's */
-void
-message_list_hide_uids (MessageList *ml, GPtrArray *uids)
-{
- int i;
- char *uid;
-
- /* first see if we need to do any work, if so, then do it all at once */
- for (i = 0; i < uids->len; i++) {
- if (g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i])) {
- MESSAGE_LIST_LOCK (ml, hide_lock);
- if (ml->hidden == NULL) {
- ml->hidden = g_hash_table_new (g_str_hash, g_str_equal);
- ml->hidden_pool = e_mempool_new (512, 256, E_MEMPOOL_ALIGN_BYTE);
- }
-
- uid = e_mempool_strdup (ml->hidden_pool, uids->pdata[i]);
- g_hash_table_insert (ml->hidden, uid, uid);
- for ( ; i < uids->len; i++) {
- if (g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i])) {
- uid = e_mempool_strdup (ml->hidden_pool, uids->pdata[i]);
- g_hash_table_insert (ml->hidden, uid, uid);
- }
- }
- MESSAGE_LIST_UNLOCK (ml, hide_lock);
- mail_regen_list (ml, ml->search, NULL, NULL);
- break;
- }
- }
-}
-
-/* no longer hide any messages */
-void
-message_list_hide_clear (MessageList *ml)
-{
- MESSAGE_LIST_LOCK (ml, hide_lock);
- if (ml->hidden) {
- g_hash_table_destroy (ml->hidden);
- e_mempool_destroy (ml->hidden_pool);
- ml->hidden = NULL;
- ml->hidden_pool = NULL;
- }
- ml->hide_before = ML_HIDE_NONE_START;
- ml->hide_after = ML_HIDE_NONE_END;
- MESSAGE_LIST_UNLOCK (ml, hide_lock);
-
- mail_regen_list (ml, ml->search, NULL, NULL);
-}
-
-#define HIDE_STATE_VERSION (1)
-
-/* version 1 file is:
- uintf 1
- uintf hide_before
- uintf hide_after
- string* uids
-*/
-
-static void
-hide_load_state (MessageList *ml)
-{
- char *filename;
- FILE *in;
- guint32 version, lower, upper;
-
- filename = mail_config_folder_to_cachename(ml->folder, "hidestate-");
- in = fopen(filename, "r");
- if (in) {
- camel_file_util_decode_fixed_int32 (in, &version);
- if (version == HIDE_STATE_VERSION) {
- MESSAGE_LIST_LOCK(ml, hide_lock);
- if (ml->hidden == NULL) {
- ml->hidden = g_hash_table_new(g_str_hash, g_str_equal);
- ml->hidden_pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
- }
- camel_file_util_decode_fixed_int32 (in, &lower);
- ml->hide_before = lower;
- camel_file_util_decode_fixed_int32 (in, &upper);
- ml->hide_after = upper;
- while (!feof(in)) {
- char *olduid, *uid;
-
- if (camel_file_util_decode_string (in, &olduid) != -1) {
- uid = e_mempool_strdup(ml->hidden_pool, olduid);
- g_free (olduid);
- g_hash_table_insert(ml->hidden, uid, uid);
- }
- }
- MESSAGE_LIST_UNLOCK(ml, hide_lock);
- }
- fclose(in);
- }
- g_free(filename);
-}
-
-static void
-hide_save_1 (char *uid, char *keydata, FILE *out)
-{
- camel_file_util_encode_string (out, uid);
-}
-
-/* save the hide state. Note that messages are hidden by uid, if the uid's change, then
- this will become invalid, but is easy to reset in the ui */
-static void
-hide_save_state (MessageList *ml)
-{
- char *filename;
- FILE *out;
-
- MESSAGE_LIST_LOCK(ml, hide_lock);
-
- filename = mail_config_folder_to_cachename(ml->folder, "hidestate-");
- if (ml->hidden == NULL && ml->hide_before == ML_HIDE_NONE_START && ml->hide_after == ML_HIDE_NONE_END) {
- unlink(filename);
- } else if ((out = fopen (filename, "w"))) {
- camel_file_util_encode_fixed_int32 (out, HIDE_STATE_VERSION);
- camel_file_util_encode_fixed_int32 (out, ml->hide_before);
- camel_file_util_encode_fixed_int32 (out, ml->hide_after);
- if (ml->hidden)
- g_hash_table_foreach(ml->hidden, (GHFunc)hide_save_1, out);
- fclose(out);
- }
- g_free (filename);
-
- MESSAGE_LIST_UNLOCK(ml, hide_lock);
-}
-
-/* ** REGENERATE MESSAGELIST ********************************************** */
-struct _regen_list_msg {
- struct _mail_msg msg;
-
- MessageList *ml;
- char *search;
- char *hideexpr;
- CamelFolderChangeInfo *changes;
- gboolean dotree; /* we are building a tree */
- gboolean hidedel; /* we want to/dont want to show deleted messages */
- CamelFolderThread *tree;
-
- CamelFolder *folder;
- GPtrArray *summary;
-};
-
-/*
- maintain copy of summary
-
- any new messages added
- any removed removed, etc.
-
- use vfolder to implement searches ???
-
- */
-
-static char *
-regen_list_describe (struct _mail_msg *mm, gint complete)
-{
- return g_strdup (_("Generating message list"));
-}
-
-static void
-regen_list_regen (struct _mail_msg *mm)
-{
- struct _regen_list_msg *m = (struct _regen_list_msg *)mm;
- GPtrArray *uids, *uidnew, *showuids;
- CamelMessageInfo *info;
- int i;
-
- if (m->search)
- uids = camel_folder_search_by_expression (m->folder, m->search, &mm->ex);
- else
- uids = camel_folder_get_uids (m->folder);
-
- if (camel_exception_is_set (&mm->ex))
- return;
-
- /* perform hiding */
- if (m->hideexpr) {
- uidnew = camel_folder_search_by_expression (m->ml->folder, m->hideexpr, &mm->ex);
- /* well, lets not abort just because this faileld ... */
- camel_exception_clear (&mm->ex);
-
- if (uidnew) {
- MESSAGE_LIST_LOCK(m->ml, hide_lock);
-
- if (m->ml->hidden == NULL) {
- m->ml->hidden = g_hash_table_new (g_str_hash, g_str_equal);
- m->ml->hidden_pool = e_mempool_new (512, 256, E_MEMPOOL_ALIGN_BYTE);
- }
-
- for (i = 0; i < uidnew->len; i++) {
- if (g_hash_table_lookup (m->ml->hidden, uidnew->pdata[i]) == 0) {
- char *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]);
- g_hash_table_insert (m->ml->hidden, uid, uid);
- }
- }
-
- MESSAGE_LIST_UNLOCK(m->ml, hide_lock);
-
- camel_folder_search_free (m->ml->folder, uidnew);
- }
- }
-
- MESSAGE_LIST_LOCK(m->ml, hide_lock);
-
- m->ml->hide_unhidden = uids->len;
-
- /* what semantics do we want from hide_before, hide_after?
- probably <0 means measure from the end of the list */
-
- /* perform uid hiding */
- if (m->ml->hidden || m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) {
- int start, end;
- uidnew = g_ptr_array_new ();
-
- /* first, hide matches */
- if (m->ml->hidden) {
- for (i = 0; i < uids->len; i++) {
- if (g_hash_table_lookup (m->ml->hidden, uids->pdata[i]) == 0)
- g_ptr_array_add (uidnew, uids->pdata[i]);
- }
- }
-
- /* then calculate the subrange visible and chop it out */
- m->ml->hide_unhidden = uidnew->len;
-
- if (m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) {
- GPtrArray *uid2 = g_ptr_array_new ();
-
- start = m->ml->hide_before;
- if (start < 0)
- start += m->ml->hide_unhidden;
- end = m->ml->hide_after;
- if (end < 0)
- end += m->ml->hide_unhidden;
-
- start = MAX(start, 0);
- end = MIN(end, uidnew->len);
- for (i = start; i < end; i++) {
- g_ptr_array_add (uid2, uidnew->pdata[i]);
- }
-
- g_ptr_array_free (uidnew, TRUE);
- uidnew = uid2;
- }
- showuids = uidnew;
- } else {
- uidnew = NULL;
- showuids = uids;
- }
-
- MESSAGE_LIST_UNLOCK(m->ml, hide_lock);
-
- m->summary = g_ptr_array_new ();
- for (i = 0; i < showuids->len; i++) {
- info = camel_folder_get_message_info (m->folder, showuids->pdata[i]);
- if (info) {
- /* FIXME: should this be taken account of in above processing? */
- if (m->hidedel && (info->flags & CAMEL_MESSAGE_DELETED) != 0)
- camel_folder_free_message_info (m->folder, info);
- else
- g_ptr_array_add (m->summary, info);
- }
- }
-
- if (uidnew)
- g_ptr_array_free (uidnew, TRUE);
-
- if (m->search)
- camel_folder_search_free (m->folder, uids);
- else
- camel_folder_free_uids (m->folder, uids);
-
- if (m->dotree)
- m->tree = camel_folder_thread_messages_new_summary (m->summary);
- else
- m->tree = NULL;
-}
-
-static void
-regen_list_regened (struct _mail_msg *mm)
-{
- struct _regen_list_msg *m = (struct _regen_list_msg *)mm;
-
- if (m->summary == NULL)
- return;
-
- if (m->dotree)
- build_tree (m->ml, m->tree, m->changes);
- else
- build_flat (m->ml, m->summary, m->changes);
-
- gtk_signal_emit (GTK_OBJECT (m->ml), message_list_signals[MESSAGE_LIST_BUILT]);
-}
-
-static void
-regen_list_free (struct _mail_msg *mm)
-{
- struct _regen_list_msg *m = (struct _regen_list_msg *)mm;
- int i;
-
- if (m->summary) {
- for (i = 0; i < m->summary->len; i++)
- camel_folder_free_message_info (m->folder, m->summary->pdata[i]);
- g_ptr_array_free (m->summary, TRUE);
- }
-
- if (m->tree)
- camel_folder_thread_messages_destroy (m->tree);
-
- if (m->ml->search && m->ml->search != m->search)
- g_free (m->ml->search);
- m->ml->search = m->search;
-
- g_free (m->hideexpr);
-
- camel_object_unref (CAMEL_OBJECT (m->folder));
-
- if (m->changes)
- camel_folder_change_info_free (m->changes);
-
- gtk_object_unref (GTK_OBJECT (m->ml));
-}
-
-static struct _mail_msg_op regen_list_op = {
- regen_list_describe,
- regen_list_regen,
- regen_list_regened,
- regen_list_free,
-};
-
-static void
-mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes)
-{
- struct _regen_list_msg *m;
-
- if (ml->folder == NULL)
- return;
-
-#ifndef BROKEN_ETREE
- /* this can sometimes crash,so ... */
-
- /* see if we need to goto the child thread at all anyway */
- /* currently the only case is the flat view with updates and no search */
- if (hideexpr == NULL && search == NULL && changes != NULL && !ml->threaded) {
- build_flat_diff(ml, changes);
- camel_folder_change_info_free(changes);
- return;
- }
-#endif
-
- m = mail_msg_new (&regen_list_op, NULL, sizeof (*m));
- m->ml = ml;
- m->search = g_strdup (search);
- m->hideexpr = g_strdup (hideexpr);
- m->changes = changes;
- m->dotree = ml->threaded;
- m->hidedel = ml->hidedeleted;
- gtk_object_ref (GTK_OBJECT (ml));
- m->folder = ml->folder;
- camel_object_ref (CAMEL_OBJECT (m->folder));
-
- e_thread_put (mail_thread_new, (EMsg *)m);
-}
diff --git a/mail/message-list.etspec b/mail/message-list.etspec
deleted file mode 100644
index 5f80afcbb1..0000000000
--- a/mail/message-list.etspec
+++ /dev/null
@@ -1,17 +0,0 @@
-<ETableSpecification cursor-mode="line" draw-grid="false" draw-focus="true" selection-mode="browse">
- <ETableColumn model_col= "0" _title="Status" pixbuf="status" expansion="0.0" minimum_width="18" resizable="false" cell="render_message_status" compare="integer" sortable="false"/>
- <ETableColumn model_col= "1" _title="Flagged" pixbuf="flagged" expansion="0.0" minimum_width="18" resizable="false" cell="render_flagged" compare="integer"/>
- <ETableColumn model_col= "2" _title="Score" pixbuf="score" expansion="0.0" minimum_width="18" resizable="false" cell="render_score" compare="integer"/>
- <ETableColumn model_col= "3" _title="Attachment" pixbuf="attachment" expansion="0.0" minimum_width="18" resizable="false" cell="render_attachment" compare="integer" sortable="false"/>
- <ETableColumn model_col= "4" _title="From" expansion="1.0" minimum_width="32" resizable="true" cell="render_text" compare="address_compare"/>
- <ETableColumn model_col= "5" _title="Subject" expansion="1.6" minimum_width="32" resizable="true" cell="render_tree" compare="subject_compare"/>
- <ETableColumn model_col= "6" _title="Sent" expansion="0.4" minimum_width="32" resizable="true" cell="render_date" compare="integer"/>
- <ETableColumn model_col= "7" _title="Received" expansion="0.4" minimum_width="32" resizable="true" cell="render_date" compare="integer"/>
- <ETableColumn model_col= "8" _title="To" expansion="1.0" minimum_width="32" resizable="true" cell="render_text" compare="address_compare"/>
- <ETableColumn model_col= "9" _title="Size" expansion="0.2" minimum_width="32" resizable="true" cell="render_size" compare="integer"/>
- <ETableState>
- <column source="0"/> <column source="3"/> <column source="1"/>
- <column source="4"/> <column source="5" expansion="1.60"/> <column source="6" expansion="0.40"/>
- <grouping> </grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/mail/message-list.h b/mail/message-list.h
deleted file mode 100644
index 380d57d46d..0000000000
--- a/mail/message-list.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _MESSAGE_LIST_H_
-#define _MESSAGE_LIST_H_
-
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-tree-scrolled.h>
-#include "mail-types.h"
-
-#define MESSAGE_LIST_TYPE (message_list_get_type ())
-#define MESSAGE_LIST(o) (GTK_CHECK_CAST ((o), MESSAGE_LIST_TYPE, MessageList))
-#define MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MESSAGE_LIST_TYPE, MessageListClass))
-#define IS_MESSAGE_LIST(o) (GTK_CHECK_TYPE ((o), MESSAGE_LIST_TYPE))
-#define IS_MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MESSAGE_LIST_TYPE))
-
-enum {
- COL_MESSAGE_STATUS,
- COL_FLAGGED,
- COL_SCORE,
- COL_ATTACHMENT,
- COL_FROM,
- COL_SUBJECT,
- COL_SENT,
- COL_RECEIVED,
- COL_TO,
- COL_SIZE,
-
- COL_LAST,
-
- /* Invisible columns */
- COL_DELETED,
- COL_UNREAD,
- COL_COLOUR,
-};
-
-#define MESSAGE_LIST_COLUMN_IS_ACTIVE(col) (col == COL_MESSAGE_STATUS || \
- col == COL_FLAGGED)
-
-#define ML_HIDE_NONE_START (0)
-#define ML_HIDE_NONE_END (2147483647)
-/* dont change */
-#define ML_HIDE_SAME (2147483646)
-
-struct _MessageList {
- ETreeScrolled parent;
-
- /* The table */
- ETreeModel *model;
- ETree *tree;
- ETreePath tree_root;
- ETableExtras *extras;
-
- /* The folder */
- CamelFolder *folder;
-
- GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */
-
- /* UID's to hide. Keys in the mempool */
- /* IMPORTANT: You MUST have obtained the hide lock, to operate on this data */
- GHashTable *hidden;
- struct _EMemPool *hidden_pool;
- int hide_unhidden, /* total length, before hiding */
- hide_before, hide_after; /* hide ranges of messages */
-
- /* Current search string, or %NULL */
- char *search;
-
- /* Are we displaying threaded view? */
- gboolean threaded;
- /* do we automatically hide deleted messages? */
- gboolean hidedeleted;
-
- /* Where the ETree cursor is. */
- int cursor_row;
- char *cursor_uid;
-
- /* Row-selection and seen-marking timers */
- guint idle_id, seen_id;
-
- /* locks */
- GMutex *hide_lock; /* for any 'hide' info above */
-};
-
-typedef struct {
- ETreeScrolledClass parent_class;
-
- /* signals - select a message */
- void (*message_selected) (MessageList *ml, const char *uid);
- void (*message_list_built) (MessageList *ml);
-} MessageListClass;
-
-typedef void (*MessageListForeachFunc) (MessageList *message_list,
- const char *uid,
- gpointer user_data);
-
-typedef enum {
- MESSAGE_LIST_SELECT_NEXT = 1,
- MESSAGE_LIST_SELECT_PREVIOUS = -1
-} MessageListSelectDirection;
-
-GtkType message_list_get_type (void);
-GtkWidget *message_list_new (void);
-void message_list_set_folder (MessageList *message_list,
- CamelFolder *camel_folder,
- gboolean outgoing);
-
-void message_list_foreach (MessageList *message_list,
- MessageListForeachFunc callback,
- gpointer user_data);
-
-void message_list_select (MessageList *message_list,
- int base_row,
- MessageListSelectDirection direction,
- guint32 flags,
- guint32 mask,
- gboolean wraparound);
-
-void message_list_select_uid (MessageList *message_list,
- const char *uid);
-
-/* info */
-unsigned int message_list_length(MessageList *ml);
-unsigned int message_list_hidden(MessageList *ml);
-
-/* hide specific messages */
-void message_list_hide_add(MessageList *ml, const char *expr, unsigned int lower, unsigned int upper);
-void message_list_hide_uids(MessageList *ml, GPtrArray *uids);
-void message_list_hide_clear(MessageList *ml);
-
-void message_list_set_threaded(MessageList *ml, gboolean threaded);
-void message_list_set_hidedeleted(MessageList *ml, gboolean hidedeleted);
-void message_list_set_search(MessageList *ml, const char *search);
-
-#define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l)
-#define MESSAGE_LIST_UNLOCK(m, l) g_mutex_unlock(((MessageList *)m)->l)
-
-#endif /* _MESSAGE_LIST_H_ */
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
deleted file mode 100644
index d007bfee50..0000000000
--- a/mail/subscribe-dialog.c
+++ /dev/null
@@ -1,1655 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* subscribe-dialog.c: Subscribe dialog */
-/*
- * Authors: Chris Toshok <toshok@ximian.com>
- * Peter Williams <peterw@ximian.com>
- *
- * Copyright 2000 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 <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <gal/e-table/e-cell-toggle.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-cell-tree.h>
-
-#include <gal/e-table/e-tree-scrolled.h>
-#include <gal/e-table/e-tree-memory-callbacks.h>
-#include <gal/e-table/e-tree.h>
-
-#include <pthread.h>
-
-#include "evolution-shell-component-utils.h"
-#include "mail.h"
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "camel/camel-exception.h"
-#include "camel/camel-store.h"
-#include "camel/camel-session.h"
-#include "subscribe-dialog.h"
-
-#include "art/empty.xpm"
-#include "art/mark.xpm"
-
-#define d(x) x
-
-/* Things to test.
- * - Feature
- * + How to check that it works.
- *
- * - Proper stores displayed
- * + Skip stores that don't support subscriptions
- * + Skip disabled stores
- * - Changing subscription status
- * + Select single folder, double-click row -> toggled
- * + Select multiple folders, press subscribe -> all selected folders end up subscribed
- * - (un)Subscribing from/to already (un)subscribed folder
- * + Check that no IMAP command is sent
- * - Switching views between stores
- * + Proper tree shown
- * - No crashes when buttons are pressed with "No store" screen
- * + obvious
- * - Restoring filter settings when view switched
- * + Enter search, change view, change back -> filter checked and search entry set
- * + Clear search, change view, change back -> "all" checked
- * - Cancelling in middle of get_store
- * + Enter invalid hostname, open dialog, click Close
- * - Cancelling in middle if listing
- * + Open large directory, click Close
- * - Cancelling in middle of subscription op
- * + How to test?
- * - Test with both IMAP and NNTP
- * + obvious
- * - Verify that refresh view works
- * + obvious
- * - No unnecessary tree rebuilds
- * + Show All folders, change filter with empty search -> no tree rebuild
- * + Converse
- * - No out of date tree
- * + Show All Folders, change to filter with a search -> tree rebuild
- * - Tree construction logic (mostly IMAP-specific terminology)
- * + Tree is created progressively
- * + No wasted LIST responses
- * + No extraneous LIST commands
- * + Specifying "folder names begin with" works
- * + Always show folders below IMAP namespace (no escaping the namespace)
- * + Don't allow subscription to NoSelect folders
- * + IMAP accounts always show INBOX
- * - Shell interactions
- * + Folders are properly created / delete from folder tree when subscribed / unsubscribed
- * + Folders with spaces in names / 8bit chars
- * + Toplevel as well as subfolders
- * + Mail Folder Cache doesn't complain
- * - No ETable wackiness
- * + Verify columns cannot be DnD'd
- * + Alphabetical order always
- * - UI cleanliness
- * + Keybindings work
- * + Some widget has focus by default
- * + Escape / enter work
- * + Close button works
- */
-
-/* FIXME: we should disable/enable the subscribe/unsubscribe buttons as
- * appropriate when only a single message is selected. We need a
- * mechanism to learn when the selected folder's subscription status
- * changes, so when the user double-clicks it (eg) the buttons can
- * (de)sensitize appropriately. See Ximian bug #7673.
- */
-
-/*#define NEED_TOGGLE_SELECTION*/
-
-typedef struct _FolderETree FolderETree;
-typedef struct _FolderETreeClass FolderETreeClass;
-
-struct _FolderETree {
- ETreeMemory parent;
- ETreePath root;
-
- GHashTable *scan_ops;
- GHashTable *subscribe_ops;
-
- CamelStore *store;
- EvolutionStorage *e_storage;
- char *service_name;
- char *search;
-};
-
-struct _FolderETreeClass {
- ETreeMemoryClass parent;
-};
-
-static GtkObjectClass *folder_etree_parent_class = NULL;
-
-typedef struct _FolderETreeExtras FolderETreeExtras;
-typedef struct _FolderETreeExtrasClass FolderETreeExtrasClass;
-
-enum {
- FOLDER_COL_SUBSCRIBED,
- FOLDER_COL_NAME,
- FOLDER_COL_LAST
-};
-
-struct _FolderETreeExtras {
- ETableExtras parent;
- GdkPixbuf *toggles[2];
-};
-
-struct _FolderETreeExtrasClass {
- ETableExtrasClass parent;
-};
-
-static GtkObjectClass *ftree_extras_parent_class = NULL;
-
-/* util */
-
-static void
-recursive_add_folder (EvolutionStorage *storage, const char *path, const char *name, const char *url)
-{
- char *parent, *pname, *p;
-
- p = strrchr (path, '/');
- if (p && p != path) {
- parent = g_strndup (path, p - path);
- if (!evolution_storage_folder_exists (storage, parent)) {
- p = strrchr (parent, '/');
- if (p)
- pname = g_strdup (p + 1);
- else
- pname = g_strdup ("");
- recursive_add_folder (storage, parent, pname, "");
- g_free (pname);
- }
- g_free (parent);
- }
-
- evolution_storage_new_folder (storage, path, name, "mail", url, name, FALSE);
-}
-
-/* ** Get one level of folderinfo ****************************************** */
-
-typedef void (*SubscribeShortFolderinfoFunc) (CamelStore *store, char *prefix, CamelFolderInfo *info, gpointer data);
-
-int subscribe_get_short_folderinfo (FolderETree *ftree, const char *prefix,
- SubscribeShortFolderinfoFunc func, gpointer user_data);
-
-struct _get_short_folderinfo_msg {
- struct _mail_msg msg;
-
- char *prefix;
-
- FolderETree *ftree;
- CamelFolderInfo *info;
-
- SubscribeShortFolderinfoFunc func;
- gpointer user_data;
-};
-
-static char *
-get_short_folderinfo_desc (struct _mail_msg *mm, int done)
-{
- struct _get_short_folderinfo_msg *m = (struct _get_short_folderinfo_msg *) mm;
- char *ret, *name;
-
- name = camel_service_get_name (CAMEL_SERVICE (m->ftree->store), TRUE);
-
- if (m->prefix)
- ret = g_strdup_printf (_("Scanning folders under %s on \"%s\""), m->prefix, name);
- else
- ret = g_strdup_printf (_("Scanning root-level folders on \"%s\""), name);
-
- g_free (name);
- return ret;
-}
-
-static void
-get_short_folderinfo_get (struct _mail_msg *mm)
-{
- struct _get_short_folderinfo_msg *m = (struct _get_short_folderinfo_msg *) mm;
-
- camel_operation_register (mm->cancel);
- m->info = camel_store_get_folder_info (m->ftree->store, m->prefix, CAMEL_STORE_FOLDER_INFO_FAST, &mm->ex);
- camel_operation_unregister (mm->cancel);
-}
-
-static void
-get_short_folderinfo_got (struct _mail_msg *mm)
-{
- struct _get_short_folderinfo_msg *m = (struct _get_short_folderinfo_msg *) mm;
-
- if (camel_exception_is_set (&mm->ex))
- g_warning ("Error getting folder info from store at %s: %s",
- camel_service_get_url (CAMEL_SERVICE (m->ftree->store)),
- camel_exception_get_description (&mm->ex));
-
- /* 'done' is probably guaranteed to fail, but... */
-
- if (m->func)
- m->func (m->ftree->store, m->prefix, m->info, m->user_data);
-}
-
-static void
-get_short_folderinfo_free (struct _mail_msg *mm)
-{
- struct _get_short_folderinfo_msg *m = (struct _get_short_folderinfo_msg *) mm;
-
- camel_store_free_folder_info (m->ftree->store, m->info);
- gtk_object_unref (GTK_OBJECT (m->ftree));
-
- g_free (m->prefix); /* may be NULL but that's ok */
-}
-
-static struct _mail_msg_op get_short_folderinfo_op = {
- get_short_folderinfo_desc,
- get_short_folderinfo_get,
- get_short_folderinfo_got,
- get_short_folderinfo_free,
-};
-
-int
-subscribe_get_short_folderinfo (FolderETree *ftree,
- const char *prefix,
- SubscribeShortFolderinfoFunc func,
- gpointer user_data)
-{
- struct _get_short_folderinfo_msg *m;
- int id;
-
- m = mail_msg_new (&get_short_folderinfo_op, NULL, sizeof(*m));
-
- m->ftree = ftree;
- gtk_object_ref (GTK_OBJECT (ftree));
-
- if (prefix)
- m->prefix = g_strdup (prefix);
- else
- m->prefix = NULL;
-
- m->func = func;
- m->user_data = user_data;
-
- id = m->msg.seq;
- e_thread_put (mail_thread_queued, (EMsg *)m);
- return id;
-}
-
-/* ** Subscribe folder operation **************************************** */
-
-typedef void (*SubscribeFolderCallback) (const char *, const char *, gboolean, gboolean, gpointer);
-
-struct _subscribe_msg {
- struct _mail_msg msg;
-
- CamelStore *store;
- gboolean subscribe;
- char *full_name;
- char *name;
-
- SubscribeFolderCallback cb;
- gpointer cb_data;
-};
-
-static char *
-subscribe_folder_desc (struct _mail_msg *mm, int done)
-{
- struct _subscribe_msg *m = (struct _subscribe_msg *) mm;
-
- if (m->subscribe)
- return g_strdup_printf (_("Subscribing to folder \"%s\""), m->name);
- else
- return g_strdup_printf (_("Unsubscribing to folder \"%s\""), m->name);
-}
-
-static void
-subscribe_folder_subscribe (struct _mail_msg *mm)
-{
- struct _subscribe_msg *m = (struct _subscribe_msg *) mm;
-
- if (m->subscribe)
- camel_store_subscribe_folder (m->store, m->full_name, &mm->ex);
- else
- camel_store_unsubscribe_folder (m->store, m->full_name, &mm->ex);
-}
-
-static void
-subscribe_folder_subscribed (struct _mail_msg *mm)
-{
- struct _subscribe_msg *m = (struct _subscribe_msg *) mm;
-
- if (m->cb)
- (m->cb) (m->full_name, m->name, m->subscribe,
- !camel_exception_is_set (&mm->ex), m->cb_data);
-}
-
-static void
-subscribe_folder_free (struct _mail_msg *mm)
-{
- struct _subscribe_msg *m = (struct _subscribe_msg *) mm;
-
- g_free (m->name);
- g_free (m->full_name);
-
- camel_object_unref (CAMEL_OBJECT (m->store));
-}
-
-static struct _mail_msg_op subscribe_folder_op = {
- subscribe_folder_desc,
- subscribe_folder_subscribe,
- subscribe_folder_subscribed,
- subscribe_folder_free,
-};
-
-static int
-subscribe_do_subscribe_folder (CamelStore *store, const char *full_name, const char *name,
- gboolean subscribe, SubscribeFolderCallback cb, gpointer cb_data)
-{
- struct _subscribe_msg *m;
- int id;
-
- g_return_val_if_fail (CAMEL_IS_STORE (store), 0);
- g_return_val_if_fail (full_name, 0);
-
- m = mail_msg_new (&subscribe_folder_op, NULL, sizeof(*m));
- m->store = store;
- m->subscribe = subscribe;
- m->name = g_strdup (name);
- m->full_name = g_strdup (full_name);
- m->cb = cb;
- m->cb_data = cb_data;
-
- camel_object_ref (CAMEL_OBJECT (store));
-
- id = m->msg.seq;
- e_thread_put (mail_thread_queued, (EMsg *)m);
- return id;
-}
-
-/* ** FolderETree Extras *************************************************** */
-
-static void
-fete_destroy (GtkObject *object)
-{
- FolderETreeExtras *extras = (FolderETreeExtras *) object;
-
- gdk_pixbuf_unref (extras->toggles[0]);
- gdk_pixbuf_unref (extras->toggles[1]);
-
- ftree_extras_parent_class->destroy (object);
-}
-
-static void
-fete_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = fete_destroy;
-
- ftree_extras_parent_class = gtk_type_class (E_TABLE_EXTRAS_TYPE);
-}
-
-static void
-fete_init (GtkObject *object)
-{
- FolderETreeExtras *extras = (FolderETreeExtras *) object;
- ECell *cell;
- ECell *text_cell;
-
- /* text column */
-
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- text_cell = cell;
- gtk_object_set (GTK_OBJECT (cell),
- "bold_column", FOLDER_COL_SUBSCRIBED,
- NULL);
- e_table_extras_add_cell (E_TABLE_EXTRAS (extras), "cell_text", cell);
-
- /* toggle column */
-
- extras->toggles[0] = gdk_pixbuf_new_from_xpm_data ((const char **)empty_xpm);
- extras->toggles[1] = gdk_pixbuf_new_from_xpm_data ((const char **)mark_xpm);
- cell = e_cell_toggle_new (0, 2, extras->toggles);
- e_table_extras_add_cell (E_TABLE_EXTRAS (extras), "cell_toggle", cell);
-
- /* tree cell */
-
- cell = e_cell_tree_new (NULL, NULL, TRUE, text_cell);
- e_table_extras_add_cell (E_TABLE_EXTRAS (extras), "cell_tree", cell);
-
- /* misc */
-
- e_table_extras_add_pixbuf (E_TABLE_EXTRAS (extras), "subscribed-image", extras->toggles[1]);
-}
-
-/* naughty! */
-static
-E_MAKE_TYPE (fete, "FolderETreeExtras", FolderETreeExtras, fete_class_init, fete_init, E_TABLE_EXTRAS_TYPE);
-
-/* ** Global Extras ******************************************************** */
-
-static FolderETreeExtras *global_extras = NULL;
-
-static void
-global_extras_destroyed (GtkObject *obj, gpointer user_data)
-{
- global_extras = NULL;
-}
-
-static ETableExtras *
-subscribe_get_global_extras (void)
-{
- if (global_extras == NULL) {
- global_extras = gtk_type_new (fete_get_type());
- gtk_object_ref (GTK_OBJECT (global_extras));
- gtk_object_sink (GTK_OBJECT (global_extras));
- gtk_signal_connect (GTK_OBJECT (global_extras), "destroy",
- global_extras_destroyed, NULL);
- }
-
- gtk_object_ref (GTK_OBJECT (global_extras));
- return E_TABLE_EXTRAS (global_extras);
-}
-
-/* ** Folder Tree Node ***************************************************** */
-
-typedef struct _ftree_node ftree_node;
-
-struct _ftree_node {
- guint8 flags;
- char *cache;
- int uri_offset;
- int full_name_offset;
-
- /* format: {name}{\0}{uri}{\0}{full_name}{\0}
- * (No braces). */
- char data[1];
-};
-
-#define FTREE_NODE_GOT_CHILDREN (1 << 0)
-#define FTREE_NODE_SUBSCRIBABLE (1 << 1)
-#define FTREE_NODE_SUBSCRIBED (1 << 2)
-#define FTREE_NODE_ROOT (1 << 3)
-
-static ftree_node *
-ftree_node_new_root (const char *prefix)
-{
- ftree_node *node;
- size_t size;
-
- if (prefix == NULL)
- prefix = "";
-
- size = sizeof (ftree_node) + strlen (prefix) + 1;
-
- node = g_malloc (size);
- node->flags = FTREE_NODE_ROOT;
- node->uri_offset = 0;
- node->full_name_offset = 1;
- node->data[0] = '\0';
- strcpy (node->data + 1, prefix);
-
- return node;
-}
-
-static ftree_node *
-ftree_node_new (CamelStore *store, CamelFolderInfo *fi)
-{
- ftree_node *node;
- int uri_offset, full_name_offset;
- size_t size;
- CamelURL *url;
-
- uri_offset = strlen (fi->name) + 1;
- full_name_offset = uri_offset + strlen (fi->url) + 1;
- size = full_name_offset + strlen (fi->full_name);
-
- /* - 1 for sizeof(node.data) but +1 for terminating \0 */
- node = g_malloc (sizeof (*node) + size);
-
- node->cache = NULL;
-
- /* Noselect? */
-
- url = camel_url_new (fi->url, NULL);
- if (camel_url_get_param (url, "noselect"))
- node->flags = 0;
- else
- node->flags = FTREE_NODE_SUBSCRIBABLE;
- camel_url_free (url);
-
- /* subscribed? */
-
- if (camel_store_folder_subscribed (store, fi->full_name))
- node->flags |= FTREE_NODE_SUBSCRIBED;
-
- /* Copy strings */
-
- node->uri_offset = uri_offset;
- node->full_name_offset = full_name_offset;
-
- strcpy (node->data, fi->name);
- strcpy (node->data + uri_offset, fi->url);
- strcpy (node->data + full_name_offset, fi->full_name);
-
- /* Done */
-
- return node;
-}
-
-#define ftree_node_subscribable(node) ( ((ftree_node *) (node))->flags & FTREE_NODE_SUBSCRIBABLE )
-#define ftree_node_subscribed(node) ( ((ftree_node *) (node))->flags & FTREE_NODE_SUBSCRIBED )
-#define ftree_node_get_name(node) ( ((ftree_node *) (node))->data )
-#define ftree_node_get_full_name(node) ( ((ftree_node *) (node))->data + ((ftree_node *) (node))->full_name_offset )
-#define ftree_node_get_uri(node) ( ((ftree_node *) (node))->data + ((ftree_node *) (node))->uri_offset )
-
-/* ** Folder Tree Model **************************************************** */
-
-/* A subscribe or scan operation */
-
-typedef struct _ftree_op_data ftree_op_data;
-
-struct _ftree_op_data {
- FolderETree *ftree;
- ETreePath path;
- ftree_node *data;
- int handle;
-};
-
-
-/* ETreeModel functions */
-
-static int
-fe_column_count (ETreeModel *etm)
-{
- return FOLDER_COL_LAST;
-}
-
-static void *
-fe_duplicate_value (ETreeModel *etm, int col, const void *val)
-{
- return g_strdup (val);
-}
-
-static void
-fe_free_value (ETreeModel *etm, int col, void *val)
-{
- g_free (val);
-}
-
-static void*
-fe_init_value (ETreeModel *etm, int col)
-{
- return g_strdup ("");
-}
-
-static gboolean
-fe_value_is_empty (ETreeModel *etm, int col, const void *val)
-{
- return !(val && *(char *)val);
-}
-
-static char *
-fe_value_to_string (ETreeModel *etm, int col, const void *val)
-{
- return g_strdup (val);
-}
-
-static GdkPixbuf *
-fe_icon_at (ETreeModel *etree, ETreePath path)
-{
- return NULL; /* XXX no icons for now */
-}
-
-static gpointer
-fe_root_value_at (FolderETree *ftree, int col)
-{
- switch (col) {
- case FOLDER_COL_NAME:
- return ftree->service_name;
- case FOLDER_COL_SUBSCRIBED:
- return GINT_TO_POINTER (0);
- default:
- printf ("Oh no, unimplemented column %d in subscribe dialog\n", col);
- }
-
- return NULL;
-}
-
-static gpointer
-fe_real_value_at (FolderETree *ftree, int col, gpointer data)
-{
- switch (col) {
- case FOLDER_COL_NAME:
- return ftree_node_get_name (data);
- case FOLDER_COL_SUBSCRIBED:
- if (ftree_node_subscribed (data))
- return GINT_TO_POINTER (1);
- return GINT_TO_POINTER (0);
- default:
- printf ("Oh no, unimplemented column %d in subscribe dialog\n", col);
- }
-
- return NULL;
-}
-
-static void *
-fe_value_at (ETreeModel *etree, ETreePath path, int col)
-{
- FolderETree *ftree = (FolderETree *) etree;
- gpointer node_data;
-
- if (path == ftree->root)
- return fe_root_value_at (ftree, col);
-
- node_data = e_tree_memory_node_get_data (E_TREE_MEMORY (etree), path);
- return fe_real_value_at (ftree, col, node_data);
-}
-
-static void
-fe_set_value_at (ETreeModel *etree, ETreePath path, int col, const void *val)
-{
- /* nothing */
-}
-
-static gboolean
-fe_return_false (void)
-{
- return FALSE;
-}
-
-static gint
-fe_sort_folder (ETreeMemory *etmm, ETreePath left, ETreePath right, gpointer user_data)
-{
- ftree_node *n_left, *n_right;
-
- n_left = e_tree_memory_node_get_data (etmm, left);
- n_right = e_tree_memory_node_get_data (etmm, right);
-
- return g_strcasecmp (ftree_node_get_name (n_left), ftree_node_get_name (n_right));
-}
-
-/* scanning */
-
-static void
-fe_got_children (CamelStore *store, char *prefix, CamelFolderInfo *info, gpointer data)
-{
- ftree_op_data *closure = (ftree_op_data *) data;
-
- if (!info) /* cancelled */
- return;
-
- if (!prefix)
- prefix = "";
-
- for ( ; info; info = info->sibling) {
- ETreePath child_path;
- ftree_node *node;
-
- if (strcmp (info->full_name, prefix) == 0)
- continue;
-
- node = ftree_node_new (store, info);
- child_path = e_tree_memory_node_insert (E_TREE_MEMORY (closure->ftree),
- closure->path,
- 0,
- node);
- e_tree_memory_sort_node (E_TREE_MEMORY (closure->ftree),
- closure->path,
- fe_sort_folder,
- NULL);
- }
-
- if (closure->data)
- closure->data->flags |= FTREE_NODE_GOT_CHILDREN;
-
- g_hash_table_remove (closure->ftree->scan_ops, closure->path);
- g_free (closure);
-}
-
-static void
-fe_check_for_children (FolderETree *ftree, ETreePath path)
-{
- ftree_op_data *closure;
- ftree_node *node;
- char *prefix;
-
- node = e_tree_memory_node_get_data (E_TREE_MEMORY (ftree), path);
-
- /* have we already gotten these children? */
- if (node->flags & FTREE_NODE_GOT_CHILDREN)
- return;
-
- /* or we're loading them right now? */
- if (g_hash_table_lookup (ftree->scan_ops, path))
- return;
-
- /* figure out our search prefix */
- if (path == ftree->root)
- prefix = ftree->search;
- else
- prefix = ftree_node_get_full_name (node);
-
- closure = g_new (ftree_op_data, 1);
- closure->ftree = ftree;
- closure->path = path;
- closure->data = node;
- closure->handle = -1;
-
- g_hash_table_insert (ftree->scan_ops, path, closure);
-
- /* FIXME. Tiny race possiblity I guess. */
-
- closure->handle = subscribe_get_short_folderinfo (ftree, prefix, fe_got_children, closure);
-}
-
-static void
-fe_create_root_node (FolderETree *ftree)
-{
- ftree_node *node;
-
- node = ftree_node_new_root (ftree->search);
- ftree->root = e_tree_memory_node_insert (E_TREE_MEMORY(ftree), NULL, 0, node);
- fe_check_for_children (ftree, ftree->root);
-}
-
-static ETreePath
-fe_get_first_child (ETreeModel *model, ETreePath path)
-{
- ETreePath child_path;
-
- child_path = E_TREE_MODEL_CLASS (folder_etree_parent_class)->get_first_child (model, path);
- if (child_path)
- fe_check_for_children ((FolderETree *) model, child_path);
- else
- fe_check_for_children ((FolderETree *) model, path);
- return child_path;
-}
-
-/* subscribing */
-
-static char *
-fe_node_to_shell_path (ftree_node *node)
-{
- char *path = NULL;
- int name_len, full_name_len;
-
- name_len = strlen (ftree_node_get_name (node));
- full_name_len = strlen (ftree_node_get_full_name (node));
-
- if (name_len != full_name_len) {
- char *full_name;
- char *iter;
- char sep;
-
- /* so, we don't know the heirarchy separator. But
- * full_name = blahXblahXname, where X = separator
- * and name = .... name. So we can determine it.
- * (imap_store->dir_sep isn't really private, I guess,
- * so we could use that if we had the store. But also
- * we don't "know" that it is an IMAP store anyway.)
- */
-
- full_name = ftree_node_get_full_name (node);
- sep = full_name[full_name_len - (name_len + 1)];
-
- if (sep != '/') {
- path = g_malloc (full_name_len + 2);
- path[0] = '/';
- strcpy (path + 1, full_name);
- while ((iter = strchr (path, sep)) != NULL)
- *iter = '/';
- }
- }
-
- if (!path)
- path = g_strdup_printf ("/%s", ftree_node_get_full_name (node));
-
- return path;
-}
-
-static void
-fe_done_subscribing (const char *full_name, const char *name, gboolean subscribe, gboolean success, gpointer user_data)
-{
- ftree_op_data *closure = (ftree_op_data *) user_data;
-
- if (success) {
- char *path;
-
- path = fe_node_to_shell_path (closure->data);
-
- if (subscribe) {
- closure->data->flags |= FTREE_NODE_SUBSCRIBED;
- recursive_add_folder (closure->ftree->e_storage,
- path, name,
- ftree_node_get_uri (closure->data));
- } else {
- closure->data->flags &= ~FTREE_NODE_SUBSCRIBED;
-
- /* FIXME: recursively remove folder as well? Possible? */
- evolution_storage_removed_folder (closure->ftree->e_storage, path);
- }
-
- g_free (path);
- e_tree_model_node_data_changed (E_TREE_MODEL (closure->ftree), closure->path);
- }
-
- g_hash_table_remove (closure->ftree->subscribe_ops, closure->path);
- g_free (closure);
-}
-
-/* cleanup */
-
-static gboolean
-fe_cancel_op_foreach (gpointer key, gpointer value, gpointer user_data)
-{
- /*FolderETree *ftree = (FolderETree *) user_data;*/
- ftree_op_data *closure = (ftree_op_data *) value;
-
- if (closure->handle != -1)
- mail_msg_cancel (closure->handle);
- else
- printf ("aaagh, annoying race condition in fe_cancel_op_foreach.\n");
-
- g_free (value);
- return TRUE;
-}
-
-static void
-fe_kill_current_tree (FolderETree *ftree)
-{
- g_hash_table_foreach_remove (ftree->scan_ops, fe_cancel_op_foreach, ftree);
- g_assert (g_hash_table_size (ftree->scan_ops) == 0);
-}
-
-static void
-fe_destroy (GtkObject *obj)
-{
- FolderETree *ftree = (FolderETree *) (obj);
-
- fe_kill_current_tree (ftree);
-
- g_hash_table_foreach_remove (ftree->subscribe_ops, fe_cancel_op_foreach, ftree);
-
- g_hash_table_destroy (ftree->scan_ops);
- g_hash_table_destroy (ftree->subscribe_ops);
-
- camel_object_unref (CAMEL_OBJECT (ftree->store));
- bonobo_object_unref (BONOBO_OBJECT (ftree->e_storage));
-
- g_free (ftree->search);
- g_free (ftree->service_name);
-}
-
-typedef gboolean (*bool_func_1) (ETreeModel *, ETreePath, int);
-typedef gboolean (*bool_func_2) (ETreeModel *);
-
-static void
-folder_etree_class_init (GtkObjectClass *klass)
-{
- ETreeModelClass *etree_model_class = E_TREE_MODEL_CLASS (klass);
-
- folder_etree_parent_class = gtk_type_class (E_TREE_MEMORY_TYPE);
-
- klass->destroy = fe_destroy;
-
- etree_model_class->value_at = fe_value_at;
- etree_model_class->set_value_at = fe_set_value_at;
- etree_model_class->column_count = fe_column_count;
- etree_model_class->duplicate_value = fe_duplicate_value;
- etree_model_class->free_value = fe_free_value;
- etree_model_class->initialize_value = fe_init_value;
- etree_model_class->value_is_empty = fe_value_is_empty;
- etree_model_class->value_to_string = fe_value_to_string;
- etree_model_class->icon_at = fe_icon_at;
- etree_model_class->is_editable = (bool_func_1) fe_return_false;
- etree_model_class->has_save_id = (bool_func_2) fe_return_false;
- etree_model_class->has_get_node_by_id = (bool_func_2) fe_return_false;
- etree_model_class->get_first_child = fe_get_first_child;
-}
-
-static void
-folder_etree_init (GtkObject *object)
-{
- FolderETree *ftree = (FolderETree *) object;
-
- e_tree_memory_set_node_destroy_func (E_TREE_MEMORY (ftree), (GFunc) g_free, ftree);
-
- ftree->scan_ops = g_hash_table_new (g_direct_hash, g_direct_equal);
- ftree->subscribe_ops = g_hash_table_new (g_direct_hash, g_direct_equal);
-
- ftree->search = g_strdup ("");
-}
-
-static FolderETree *
-folder_etree_construct (FolderETree *ftree,
- CamelStore *store)
-{
- e_tree_memory_construct (E_TREE_MEMORY (ftree));
-
- ftree->store = store;
- camel_object_ref (CAMEL_OBJECT (store));
-
- ftree->service_name = camel_service_get_name (CAMEL_SERVICE (store), FALSE);
-
- ftree->e_storage = mail_lookup_storage (store); /* this gives us a ref */
-
- fe_create_root_node (ftree);
-
- return ftree;
-}
-
-static
-E_MAKE_TYPE (folder_etree, "FolderETree", FolderETree, folder_etree_class_init, folder_etree_init, E_TREE_MEMORY_TYPE);
-
-/* public */
-
-static FolderETree *
-folder_etree_new (CamelStore *store)
-{
- FolderETree *ftree;
-
- ftree = gtk_type_new (folder_etree_get_type());
- ftree = folder_etree_construct (ftree, store);
- return ftree;
-}
-
-static void
-folder_etree_clear_tree (FolderETree *ftree)
-{
- e_tree_memory_freeze (E_TREE_MEMORY (ftree));
- e_tree_memory_node_remove (E_TREE_MEMORY (ftree), ftree->root);
- fe_create_root_node (ftree);
- e_tree_memory_thaw (E_TREE_MEMORY (ftree));
-}
-
-static void
-folder_etree_set_search (FolderETree *ftree, const char *search)
-{
- if (!strcmp (search, ftree->search))
- return;
-
- g_free (ftree->search);
- ftree->search = g_strdup (search);
-
- folder_etree_clear_tree (ftree);
-}
-
-
-static int
-folder_etree_path_set_subscription (FolderETree *ftree, ETreePath path, gboolean subscribe)
-{
- ftree_op_data *closure;
- ftree_node *node;
-
- /* already in progress? */
-
- if (g_hash_table_lookup (ftree->subscribe_ops, path))
- return 0;
-
- /* noselect? */
-
- node = e_tree_memory_node_get_data (E_TREE_MEMORY (ftree), path);
-
- if (!ftree_node_subscribable (node))
- return -1;
-
- /* noop? */
-
- /* uh, this should be a not XOR or something */
- if ((ftree_node_subscribed (node) && subscribe) ||
- (!ftree_node_subscribed (node) && !subscribe))
- return 0;
-
- closure = g_new (ftree_op_data, 1);
- closure->ftree = ftree;
- closure->path = path;
- closure->data = node;
- closure->handle = -1;
-
- g_hash_table_insert (ftree->subscribe_ops, path, closure);
-
- closure->handle = subscribe_do_subscribe_folder (ftree->store,
- ftree_node_get_full_name (node),
- ftree_node_get_name (node),
- subscribe,
- fe_done_subscribing,
- closure);
- return 0;
-}
-
-static int
-folder_etree_path_toggle_subscription (FolderETree *ftree, ETreePath path)
-{
- ftree_node *node = e_tree_memory_node_get_data (E_TREE_MEMORY (ftree), path);
-
- if (ftree_node_subscribed (node))
- return folder_etree_path_set_subscription (ftree, path, FALSE);
- else
- return folder_etree_path_set_subscription (ftree, path, TRUE);
-}
-
-/* ** StoreData ************************************************************ */
-
-typedef struct _StoreData StoreData;
-
-typedef void (*StoreDataStoreFunc) (StoreData *, CamelStore *, gpointer);
-
-struct _StoreData {
- int refcount;
- char *uri;
-
- FolderETree *ftree;
- CamelStore *store;
-
- int request_id;
-
- GtkWidget *widget;
- StoreDataStoreFunc store_func;
- gpointer store_data;
-};
-
-static StoreData *
-store_data_new (const char *uri)
-{
- StoreData *sd;
-
- sd = g_new0 (StoreData, 1);
- sd->refcount = 1;
- sd->uri = g_strdup (uri);
-
- return sd;
-}
-
-static void
-store_data_free (StoreData *sd)
-{
- if (sd->request_id)
- mail_msg_cancel (sd->request_id);
-
- if (sd->widget)
- gtk_object_unref (GTK_OBJECT (sd->widget));
-
- if (sd->ftree)
- gtk_object_unref (GTK_OBJECT (sd->ftree));
-
- if (sd->store)
- camel_object_unref (CAMEL_OBJECT (sd->store));
-
- g_free (sd->uri);
- g_free (sd);
-}
-
-static void
-store_data_ref (StoreData *sd)
-{
- sd->refcount++;
-}
-
-static void
-store_data_unref (StoreData *sd)
-{
- if (sd->refcount <= 1) {
- store_data_free (sd);
- } else {
- sd->refcount--;
- }
-}
-
-static void
-sd_got_store (char *uri, CamelStore *store, gpointer user_data)
-{
- StoreData *sd = (StoreData *) user_data;
-
- sd->store = store;
-
- if (store) /* we can have exceptions getting the store... server is down, eg */
- camel_object_ref (CAMEL_OBJECT (sd->store));
-
- /* uh, so we might have a problem if this operation is cancelled. Unsure. */
- sd->request_id = 0;
-
- if (sd->store_func)
- (sd->store_func) (sd, sd->store, sd->store_data);
-
- store_data_unref (sd);
-}
-
-static void
-store_data_async_get_store (StoreData *sd, StoreDataStoreFunc func, gpointer user_data)
-{
- if (sd->request_id) {
- printf ("Already loading store, nooping\n");
- return;
- }
-
- if (sd->store) {
- /* um, is this the best behavior? */
- func (sd, sd->store, user_data);
- return;
- }
-
- sd->store_func = func;
- sd->store_data = user_data;
- store_data_ref (sd);
- sd->request_id = mail_get_store (sd->uri, sd_got_store, sd);
-}
-
-static void
-store_data_cancel_get_store (StoreData *sd)
-{
- g_return_if_fail (sd->request_id);
-
- mail_msg_cancel (sd->request_id);
- sd->request_id = 0;
-}
-
-static void
-sd_toggle_cb (ETree *tree, int row, ETreePath path, int col, GdkEvent *event, gpointer user_data)
-{
- StoreData *sd = (StoreData *) user_data;
-
- folder_etree_path_toggle_subscription (sd->ftree, path);
-}
-
-static GtkWidget *
-store_data_get_widget (StoreData *sd)
-{
- GtkWidget *tree;
-
- if (!sd->store) {
- d(printf ("store data can't get widget before getting store.\n"));
- return NULL;
- }
-
- if (sd->widget)
- return sd->widget;
-
- sd->ftree = folder_etree_new (sd->store);
-
- /* You annoy me, etree! */
- tree = gtk_widget_new (E_TREE_SCROLLED_TYPE,
- "hadjustment", NULL,
- "vadjustment", NULL,
- NULL);
-
- tree = (GtkWidget *) e_tree_scrolled_construct_from_spec_file (E_TREE_SCROLLED (tree),
- E_TREE_MODEL (sd->ftree),
- subscribe_get_global_extras (),
- EVOLUTION_ETSPECDIR "/subscribe-dialog.etspec",
- NULL);
- e_tree_root_node_set_visible (e_tree_scrolled_get_tree(E_TREE_SCROLLED(tree)), TRUE);
- gtk_signal_connect (GTK_OBJECT (e_tree_scrolled_get_tree(E_TREE_SCROLLED (tree))),
- "double_click", GTK_SIGNAL_FUNC (sd_toggle_cb), sd);
-
- gtk_object_unref (GTK_OBJECT (global_extras));
-
- sd->widget = tree;
- gtk_object_ref (GTK_OBJECT (sd->widget));
-
- return sd->widget;
-}
-
-typedef struct _selection_closure {
- StoreData *sd;
- enum { SET, CLEAR, TOGGLE } mode;
-} selection_closure;
-
-static void
-sd_subscribe_folder_foreach (int model_row, gpointer closure)
-{
- selection_closure *sc = (selection_closure *) closure;
- StoreData *sd = sc->sd;
- ETree *tree = e_tree_scrolled_get_tree(E_TREE_SCROLLED(sd->widget));
- ETreePath path = e_tree_node_at_row (tree, model_row);
-
- /* ignore results */
- switch (sc->mode) {
- case SET:
- folder_etree_path_set_subscription (sd->ftree, path, TRUE);
- break;
- case CLEAR:
- folder_etree_path_set_subscription (sd->ftree, path, FALSE);
- break;
- case TOGGLE:
- folder_etree_path_toggle_subscription (sd->ftree, path);
- break;
- }
-}
-
-static void
-store_data_selection_set_subscription (StoreData *sd, gboolean subscribe)
-{
- selection_closure sc;
- ETree *tree;
-
- sc.sd = sd;
- if (subscribe)
- sc.mode = SET;
- else
- sc.mode = CLEAR;
-
- tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (sd->widget));
- e_tree_selected_row_foreach (tree, sd_subscribe_folder_foreach, &sc);
-}
-
-#ifdef NEED_TOGGLE_SELECTION
-static void
-store_data_selection_toggle_subscription (StoreData *sd)
-{
- selection_closure sc;
- ETree *tree;
-
- sc.sd = sd;
- sc.mode = TOGGLE;
-
- tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (sd->widget));
- e_tree_selected_row_foreach (tree, sd_subscribe_folder_foreach, &sc);
-}
-#endif
-
-static gboolean
-store_data_mid_request (StoreData *sd)
-{
- return (gboolean) sd->request_id;
-}
-
-/* ** yaay, SubscribeDialog ******************************************************* */
-
-#define PARENT_TYPE (gtk_object_get_type ())
-
-#ifdef JUST_FOR_TRANSLATORS
-static char *str = N_("Folder");
-#endif
-
-#define STORE_DATA_KEY "store-data"
-
-struct _SubscribeDialogPrivate {
- GladeXML *xml;
- GList *store_list;
-
- StoreData *current_store;
- GtkWidget *current_widget;
-
- GtkWidget *default_widget;
- GtkWidget *none_item;
- GtkWidget *search_entry;
- GtkWidget *hbox;
- GtkWidget *filter_radio, *all_radio;
- GtkWidget *sub_button, *unsub_button, *refresh_button;
-};
-
-static GtkObjectClass *subscribe_dialog_parent_class;
-
-static void
-sc_refresh_pressed (GtkWidget *widget, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
-
- if (sc->priv->current_store)
- folder_etree_clear_tree (sc->priv->current_store->ftree);
-}
-
-static void
-sc_search_activated (GtkWidget *widget, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- StoreData *store = sc->priv->current_store;
- char *search;
-
- if (!store)
- return;
-
- search = e_utf8_gtk_entry_get_text (GTK_ENTRY (widget));
- folder_etree_set_search (store->ftree, search);
-}
-
-static void
-sc_subscribe_pressed (GtkWidget *widget, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- StoreData *store = sc->priv->current_store;
-
- if (!store)
- return;
-
- store_data_selection_set_subscription (store, TRUE);
-}
-
-static void
-sc_unsubscribe_pressed (GtkWidget *widget, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- StoreData *store = sc->priv->current_store;
-
- if (!store)
- return;
-
- store_data_selection_set_subscription (store, FALSE);
-}
-
-static void
-sc_all_toggled (GtkWidget *widget, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- StoreData *store = sc->priv->current_store;
-
- if (!store)
- return;
-
- if (GTK_TOGGLE_BUTTON (widget)->active) {
- gtk_widget_set_sensitive (sc->priv->search_entry, FALSE);
- folder_etree_set_search (store->ftree, "");
- }
-}
-
-static void
-sc_filter_toggled (GtkWidget *widget, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- StoreData *store = sc->priv->current_store;
-
- if (!store)
- return;
-
- if (GTK_TOGGLE_BUTTON (widget)->active) {
- gtk_widget_set_sensitive (sc->priv->search_entry, TRUE);
- sc_search_activated (sc->priv->search_entry, sc);
- }
-}
-
-static void
-populate_store_foreach (MailConfigService *service, SubscribeDialog *sc)
-{
- StoreData *sd;
-
- if (service->url == NULL || service->enabled == FALSE)
- return;
-
- sd = store_data_new (service->url);
- sc->priv->store_list = g_list_prepend (sc->priv->store_list, sd);
-}
-
-static void
-kill_default_view (SubscribeDialog *sc)
-{
- gtk_widget_hide (sc->priv->none_item);
-
- /* the entry will be set sensitive when one of the
- * radio buttons is activated, if necessary. */
-
- gtk_widget_set_sensitive (sc->priv->all_radio, TRUE);
- gtk_widget_set_sensitive (sc->priv->filter_radio, TRUE);
- gtk_widget_set_sensitive (sc->priv->sub_button, TRUE);
- gtk_widget_set_sensitive (sc->priv->unsub_button, TRUE);
- gtk_widget_set_sensitive (sc->priv->refresh_button, TRUE);
-}
-
-static void
-sc_selection_changed (GtkObject *obj, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- gboolean sensitive;
-
- if (e_selection_model_selected_count (E_SELECTION_MODEL (obj)))
- sensitive = TRUE;
- else
- sensitive = FALSE;
-
- gtk_widget_set_sensitive (sc->priv->sub_button, sensitive);
- gtk_widget_set_sensitive (sc->priv->unsub_button, sensitive);
-}
-
-static void
-menu_item_selected (GtkMenuItem *item, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
- StoreData *sd = gtk_object_get_data (GTK_OBJECT (item), STORE_DATA_KEY);
-
- g_return_if_fail (sd);
-
- if (sd->widget == NULL) {
- GtkWidget *widget;
- ESelectionModel *esm;
- ETree *tree;
-
- widget = store_data_get_widget (sd);
- gtk_box_pack_start (GTK_BOX (sc->priv->hbox), widget, TRUE, TRUE, 0);
-
- tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (widget));
- esm = e_tree_get_selection_model (tree);
- gtk_signal_connect (GTK_OBJECT (esm), "selection_changed", sc_selection_changed, sc);
- sc_selection_changed ((GtkObject *)esm, sc);
- }
-
- if (sc->priv->current_widget == sc->priv->default_widget)
- kill_default_view (sc);
-
- gtk_widget_hide (sc->priv->current_widget);
- gtk_widget_show (sd->widget);
- sc->priv->current_widget = sd->widget;
- sc->priv->current_store = sd;
-
- if (*sd->ftree->search) {
- e_utf8_gtk_entry_set_text (GTK_ENTRY (sc->priv->search_entry), sd->ftree->search);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sc->priv->filter_radio), TRUE);
- } else {
- e_utf8_gtk_entry_set_text (GTK_ENTRY (sc->priv->search_entry), "");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sc->priv->all_radio), TRUE);
- }
-}
-
-static void
-dummy_item_selected (GtkMenuItem *item, gpointer user_data)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (user_data);
-
- gtk_widget_hide (sc->priv->current_widget);
- gtk_widget_show (sc->priv->default_widget);
- sc->priv->current_widget = sc->priv->default_widget;
- sc->priv->current_store = NULL;
-
- e_utf8_gtk_entry_set_text (GTK_ENTRY (sc->priv->search_entry), "");
-}
-
-/* wonderful */
-
-static void
-got_sd_store (StoreData *sd, CamelStore *store, gpointer data)
-{
- if (store && camel_store_supports_subscriptions (store))
- gtk_widget_show (GTK_WIDGET (data));
-}
-
-/* FIXME: if there aren't any stores that are subscribable, the option
- * menu will only have the "No server selected" item and the user will
- * be confused. */
-
-static void
-populate_store_list (SubscribeDialog *sc)
-{
- const GSList *news;
- GSList *sources;
- GList *iter;
- GtkWidget *menu;
- GtkWidget *omenu;
-
- sources = mail_config_get_sources ();
- g_slist_foreach (sources, (GFunc) populate_store_foreach, sc);
- g_slist_free (sources);
-
- news = mail_config_get_news ();
- g_slist_foreach ((GSList *) news, (GFunc) populate_store_foreach, sc);
-
- menu = gtk_menu_new ();
-
- for (iter = sc->priv->store_list; iter; iter = iter->next) {
- GtkWidget *item;
- CamelURL *url;
- char *string;
-
- url = camel_url_new (((StoreData *) iter->data)->uri, NULL);
- string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (url);
- item = gtk_menu_item_new_with_label (string);
- store_data_async_get_store (iter->data, got_sd_store, item);
- gtk_object_set_data (GTK_OBJECT (item), STORE_DATA_KEY, iter->data);
- gtk_signal_connect (GTK_OBJECT (item), "activate", menu_item_selected, sc);
- g_free (string);
-
- gtk_menu_prepend (GTK_MENU (menu), item);
- }
-
- sc->priv->none_item = gtk_menu_item_new_with_label (_("No server has been selected"));
- gtk_signal_connect (GTK_OBJECT (sc->priv->none_item), "activate", dummy_item_selected, sc);
- gtk_widget_show (sc->priv->none_item);
- gtk_menu_prepend (GTK_MENU (menu), sc->priv->none_item);
-
- gtk_widget_show (menu);
-
- omenu = glade_xml_get_widget (sc->priv->xml, "store_menu");
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-}
-
-static void
-subscribe_dialog_destroy (GtkObject *object)
-{
- SubscribeDialog *sc;
- GList *iter;
-
- sc = SUBSCRIBE_DIALOG (object);
-
- for (iter = sc->priv->store_list; iter; iter = iter->next) {
- StoreData *data = iter->data;
-
- if (store_data_mid_request (data))
- store_data_cancel_get_store (data);
-
- data->store_func = NULL;
-
- store_data_unref (data);
- }
-
- g_list_free (sc->priv->store_list);
-
- gtk_object_unref (GTK_OBJECT (sc->priv->xml));
-
- g_free (sc->priv);
-
- subscribe_dialog_parent_class->destroy (object);
-}
-
-static void
-subscribe_dialog_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = subscribe_dialog_destroy;
-
- subscribe_dialog_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-subscribe_dialog_init (GtkObject *object)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (object);
-
- sc->priv = g_new0 (SubscribeDialogPrivate, 1);
-}
-
-static GtkWidget *
-sc_create_default_widget (void)
-{
- GtkWidget *label;
- GtkWidget *viewport;
-
- label = gtk_label_new (_("Please select a server."));
- gtk_widget_show (label);
-
- viewport = gtk_viewport_new (NULL, NULL);
- gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_IN);
- gtk_container_add (GTK_CONTAINER (viewport), label);
-
- return viewport;
-}
-
-static void
-subscribe_dialog_construct (GtkObject *object)
-{
- SubscribeDialog *sc = SUBSCRIBE_DIALOG (object);
-
- /* Load the XML */
-
- sc->priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/subscribe-dialog.glade", NULL);
-
- sc->app = glade_xml_get_widget (sc->priv->xml, "Manage Subscriptions");
- sc->priv->hbox = glade_xml_get_widget (sc->priv->xml, "tree_box");
- sc->priv->search_entry = glade_xml_get_widget (sc->priv->xml, "search_entry");
- sc->priv->filter_radio = glade_xml_get_widget (sc->priv->xml, "filter_radio");
- sc->priv->all_radio = glade_xml_get_widget (sc->priv->xml, "all_radio");
- sc->priv->sub_button = glade_xml_get_widget (sc->priv->xml, "subscribe_button");
- sc->priv->unsub_button = glade_xml_get_widget (sc->priv->xml, "unsubscribe_button");
- sc->priv->refresh_button = glade_xml_get_widget (sc->priv->xml, "refresh_button");
-
- /* create default view */
-
- sc->priv->default_widget = sc_create_default_widget();
- sc->priv->current_widget = sc->priv->default_widget;
- gtk_box_pack_start (GTK_BOX (sc->priv->hbox), sc->priv->default_widget, TRUE, TRUE, 0);
- gtk_widget_show (sc->priv->default_widget);
-
- gtk_widget_set_sensitive (sc->priv->all_radio, FALSE);
- gtk_widget_set_sensitive (sc->priv->filter_radio, FALSE);
- gtk_widget_set_sensitive (sc->priv->search_entry, FALSE);
- gtk_widget_set_sensitive (sc->priv->sub_button, FALSE);
- gtk_widget_set_sensitive (sc->priv->unsub_button, FALSE);
- gtk_widget_set_sensitive (sc->priv->refresh_button, FALSE);
-
- /* hook up some signals */
-
- gtk_signal_connect (GTK_OBJECT (sc->priv->search_entry), "activate", sc_search_activated, sc);
- gtk_signal_connect (GTK_OBJECT (sc->priv->sub_button), "clicked", sc_subscribe_pressed, sc);
- gtk_signal_connect (GTK_OBJECT (sc->priv->unsub_button), "clicked", sc_unsubscribe_pressed, sc);
- gtk_signal_connect (GTK_OBJECT (sc->priv->refresh_button), "clicked", sc_refresh_pressed, sc);
- gtk_signal_connect (GTK_OBJECT (sc->priv->all_radio), "toggled", sc_all_toggled, sc);
- gtk_signal_connect (GTK_OBJECT (sc->priv->filter_radio), "toggled", sc_filter_toggled, sc);
-
- /* Get the list of stores */
-
- populate_store_list (sc);
-}
-
-GtkObject *
-subscribe_dialog_new (void)
-{
- SubscribeDialog *subscribe_dialog;
-
- subscribe_dialog = gtk_type_new (SUBSCRIBE_DIALOG_TYPE);
- subscribe_dialog_construct (GTK_OBJECT (subscribe_dialog));
-
- return GTK_OBJECT (subscribe_dialog);
-}
-
-E_MAKE_TYPE (subscribe_dialog, "SubscribeDialog", SubscribeDialog, subscribe_dialog_class_init, subscribe_dialog_init, PARENT_TYPE);
-
-void
-subscribe_dialog_run_and_close (SubscribeDialog *dialog)
-{
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog->app));
-}
diff --git a/mail/subscribe-dialog.etspec b/mail/subscribe-dialog.etspec
deleted file mode 100644
index 1f5decbb36..0000000000
--- a/mail/subscribe-dialog.etspec
+++ /dev/null
@@ -1,9 +0,0 @@
-<ETableSpecification cursor-mode="line" no-headers="true">
- <ETableColumn model_col="0" pixbuf="subscribed-image" expansion="0.0" minimum_width="16" resizable="false" cell="cell_toggle" compare="integer"/>
- <ETableColumn model_col="1" _title="Folder" expansion="1.0" minimum_width="20" resizable="true" cell="cell_tree" compare="string"/>
- <ETableState>
- <column source="0"/>
- <column source="1"/>
- <grouping></grouping>
- </ETableState>
-</ETableSpecification>
diff --git a/mail/subscribe-dialog.glade b/mail/subscribe-dialog.glade
deleted file mode 100644
index 472491b3e8..0000000000
--- a/mail/subscribe-dialog.glade
+++ /dev/null
@@ -1,326 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Evolution</name>
- <program_name>evolution</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>
- <translatable_strings_file>subscribe-dialog.glade.h</translatable_strings_file>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>Manage Subscriptions</name>
- <title>Manage Subscriptions</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <default_width>484</default_width>
- <default_height>423</default_height>
- <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-vbox2</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_area2</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>button9</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>Show _folders from server: </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>store_menu</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>store_menu</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>tree_box</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>
-</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>GtkVButtonBox</class>
- <name>vbuttonbox2</name>
- <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
- <spacing>0</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>subscribe_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Subscribe</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>unsubscribe_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>_Unsubscribe</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>14</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox3</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>refresh_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label> _Refresh List </label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame1</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>GtkHBox</class>
- <name>hbox3</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>all_radio</name>
- <can_focus>True</can_focus>
- <label>All folders</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>view_type</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>filter_radio</name>
- <can_focus>True</can_focus>
- <label>Folders whose names begin with:</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>view_type</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>search_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>
- <class>GtkHButtonBox</class>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
- <spacing>30</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>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
deleted file mode 100644
index 10fa5d9f44..0000000000
--- a/mail/subscribe-dialog.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Chris Toshok <toshok@ximian.com>
- * Peter Williams <peterw@ximian.com>
- *
- * Copyright 2000 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 _SUBSCRIBE_DIALOG_H_
-#define _SUBSCRIBE_DIALOG_H_
-
-#include <gtk/gtktable.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <gal/e-table/e-tree-model.h>
-#include <gal/e-table/e-table-model.h>
-#include "shell/evolution-storage.h"
-#include "mail-types.h"
-#include "camel/camel-store.h"
-
-#define SUBSCRIBE_DIALOG_TYPE (subscribe_dialog_get_type ())
-#define SUBSCRIBE_DIALOG(o) (GTK_CHECK_CAST ((o), SUBSCRIBE_DIALOG_TYPE, SubscribeDialog))
-#define SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SUBSCRIBE_DIALOG_TYPE, SubscribeDialogClass))
-#define IS_SUBSCRIBE_DIALOG(o) (GTK_CHECK_TYPE ((o), SUBSCRIBE_DIALOG_TYPE))
-#define IS_SUBSCRIBE_DIALOG_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SUBSCRIBE_DIALOG_TYPE))
-
-typedef struct _SubscribeDialogPrivate SubscribeDialogPrivate;
-struct _SubscribeDialog {
- GtkObject parent;
-
- GtkWidget *app;
- SubscribeDialogPrivate *priv;
-};
-
-
-typedef struct {
- GtkObjectClass parent_class;
-} SubscribeDialogClass;
-
-GtkType subscribe_dialog_get_type (void);
-GtkObject *subscribe_dialog_new (void);
-void subscribe_dialog_run_and_close (SubscribeDialog *dialog);
-
-#endif /* _SUBSCRIBE_DIALOG_H_ */
diff --git a/my-evolution/.cvsignore b/my-evolution/.cvsignore
deleted file mode 100644
index ab0d765740..0000000000
--- a/my-evolution/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-Mail-stubs.c
-Mail-skels.c
-Mail-common.c
-Mail.h
-evolution-executive-summary
-evolution-executive-summary.pure
-GNOME_Evolution_Summary.oaf
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
deleted file mode 100644
index 8e8f1224ca..0000000000
--- a/my-evolution/ChangeLog
+++ /dev/null
@@ -1,887 +0,0 @@
-2001-10-02 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: add $(BONOBO_GNOME_CFLAGS) to make it compile with
- latest Bonobo, which does not install headers in
- $(gnome_prefix)/include
-
-2001-10-01 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c: Applied patch from Takuo Kitame for using charset
- from the rdf.
-
-2001-09-27 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.c (generate_html): Pass the summary to
- get_todays_uids.
- (get_todays_uids): Use the timezone stuff and use the due date instead
- of the end time.
-
-2001-09-27 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: (rdfs[]): Removed the broken RDFs
- (mail_all_select_row_cb): Don't turn on the -> button if the folder is
- already added.
- (rdf_all_select_row_cb): Ditto
- (weather_all_select_row_cb): Ditto
-
-2001-09-26 Iain Holmes <iain@ximian.com>
-
- * *.[ch]: Add correct approved copyright notices.
-
-2001-09-25 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_draw): Check if the summary is frozen, if so
- just set redraw_pending.
- (e_summary_freeze): Freeze the summary.
- (e_summary_thaw): Thaw the summary and redraw if needed.
-
- * e-summary-factory.c (control_activate): Thaw summary.
- (control_deactivate): Freeze summary.
-
-2001-09-25 Iain Holmes <iain@ximian.com>
-
- * Misc warnings cleanups.
-
- * e-summary.c (e_summary_url_requested): Check in the cache for the
- image before spawning a new thread to download it.
- (close_callback): Create a cache first time, add images to it.
-
- * e-summary-tasks.c (generate_html): Use task.png
-
-2001-09-21 Dan Winship <danw@ximian.com>
-
- * e-summary-weather.c (weather_make_html): Add missing
- width/height tags to the sunny/cloudy/etc images to make the page
- render more smoothly.
-
-2001-09-21 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (generate_html): If the appointment is in a
- different timezone set a timezone icon.
-
-2001-09-20 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences: Add Red Carpet RDF
-
-2001-09-19 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (generate_html): If the appointment has an alarm
- display a bell icon.
-
-2001-09-19 Iain Holmes <iain@ximian.com>
-
- * component-factory.c (create_view): Remove spew.
-
- * e-summary-mail.c (e_summary_mail_reconfigure): Get mail info if we
- don't already have it.
- (new_folder_cb): Only get mail info if the folder is being displayed.
-
-2001-09-19 Larry Ewing <lewing@ximian.com>
-
- * e-summary-tasks.c (generate_html): be sure to unref the
- component.
-
-2001-09-19 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.c (e_summary_tasks_protocol): Open a task editor.
- (generate_html): Embed the uid of the task in the url.
-
- * e-summary-calendar.c (e_summary_calendar_protocol): Open a calendar
- editor.
- (generate_html): Embed the uid of the task in the url.
-
-2001-09-19 Larry Ewing <lewing@ximian.com>
-
- * e-summary-rdf.c (read_callback): remove redundant if.
- (open_callback): free the previous html even if we get an error.
- (rdf_free): remove redundant null checks.
-
-2001-09-19 Dan Winship <danw@ximian.com>
-
- * e-summary.c (read_callback, etc): Hack around gdkpixbuf lossage
- by not trying to display the images incrementall. Instead, just
- wait until we've read the whole file, then display it all at once.
- Prevents garbage when rendering the icons.
-
-2001-09-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (weather_remove_clicked_cb): Select the next
- row.
- (rdf_remove_clicked_cb): Select the next row.
-
-2001-09-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (mail_remove_clicked_cb): Select the next
- folder for removal.
-
- * e-summary-mail.c (e_summary_mail_reconfigure): Don't do the hashtable
- thing to get folders. Just iterate through the list lookuping the
- folders instead. This keeps the required order.
-
-2001-09-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (mail_add_clicked_cb): Don't add folders that
- are already in the list
-
-2001-09-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c (display_doc): Verbose error reporting.
- (read_callback): Same.
- (open_callback): Same.
-
-2001-09-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-weather.c (e_summary_weather_add_location): Append the
- weather locations so they are in the right order.
-
- * e-summary-tasks.c (generate_html): If the text is null, don't print
- (null). Print "No description" instead.
-
- * e-summary-rdf.c (e_summary_rdf_add_uri): Append here as well.
-
- * e-summary-mail.c (maybe_add_to_shown): Append ici.
-
-2001-09-17 Iain Holmes <iain@ximian.com>
-
- * e-summary-weather.c (weather_make_html): Don't make the confusing
- url for the city name.
-
-2001-09-17 Iain Holmes <iain@ximian.com>
-
- * e-summary-mail.c (mail_change_notify): Only redraw the display when
- we receive a notify about a folder we are displaying
-
-2001-09-17 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (uids_to_array): Correctly use qsort.
- (e_summary_calendar_event_sort_func): Dereference the e1 and e2.
-
-2001-09-17 Federico Mena Quintero <federico@ximian.com>
-
- * e-summary.c (e_summary_init): There is no need to initialize the
- alarm system now.
-
-2001-09-14 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (uids_to_array): Create ESummaryCalEvents and
- put them in an array to get the timezone stuff right.
- (e_summary_calendar_event_sort_func): Sort the array.
- (generate_html): Use the timezone formats of things.
-
-2001-09-13 Iain Holmes <iain@ximian.com>
-
- * Locations: Removed duff Norway station
-
-2001-09-13 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: Fix slashdot problem.
-
-2001-09-10 Dan Winship <danw@ximian.com>
-
- Purification.
-
- * e-summary.c (destroy): free the protocol hash.
-
- * e-summary-rdf.c (tree_walk): plug a leak.
-
- * e-summary-weather.c (e_summary_weather_init_locations): Don't
- insert duplicates into the hash table.
-
- * e-summary-mail.c (e_summary_mail_generate_html): free old html
- before setting new
-
- * e-summary.c (e_summary_draw): free weather and rdf html strings.
-
- * e-summary-preferences.c (save_known_rdfs): free strings.
-
-2001-09-10 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: Add Memepool RDF.
-
-2001-09-06 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (e_summary_configure): Don't allow dialogs to
- be opened more than once.
- (property_box_destory_cb): NULL the window var.
-
-2001-09-05 Ettore Perazzoli <ettore@ximian.com>
-
- [Fix #958, ShellComponents should not be created by factories, for
- the Summary.]
-
- * component-factory.c (COMPONENT_FACTORY_IID): Removed.
- (COMPONENT_ID): New.
- (create_component): Renamed from `factory_fn'. No args.
- (component_factory_init): Create the BonoboObject with
- `create_component' and register it on OAF.
-
- * GNOME_Evolution_Summary.oaf.in: Remove the
- ShellComponentFactory.
-
-2001-09-05 Iain Holmes <iain@ximian.com>
-
- * Locations: Added some Caracas fixes from Mayly Sanchez.
-
-2001-09-05 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_draw): Hack to stop the display jumping to the
- top when it is redrawn.
-
-2001-09-05 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (generate_html): Check if we need to use 24hr
- format. Don't try to do fancy things with the date and time of an
- appointment.
- (locale_uses_24h_time_format): Cut and pasted from calendar.
- (e_summary_calendar_init): Get the 24hour preferences from the calendar.
-
-2001-09-04 Iain Holmes <iain@ximian.com>
-
- * Locations: Applied patch from Evert Verhellen to fix the Belgium
- stations
-
-2001-09-04 Iain Holmes <iain@ximian.com>
-
- * my-evolution.glade: Fix some accelerator clashes
-
-2001-09-04 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (add_dialog_clicked_cb): When the feed is
- added make the Apply button activate.
-
-2001-09-04 Iain Holmes <iain@ximian.com>
-
- * metar.c (weather_conditions_string): Don't return '-' if there is no
- condition, as it makes the temperature look negative.
-
-2001-08-27 Ettore Perazzoli <ettore@ximian.com>
-
- * e-summary-weather.c (weather_make_html): Make local variable
- `icon_name' const. Remove unused variable `uri'.
-
- * e-summary.h: Reformatted in GTK+ style.
- (e_summary_remove_online_connection): Added prototype.
-
- * e-summary-preferences.c (fill_mail_shown_clist): Constify local
- variable `name'.
-
- * e-summary-mail.c: #include "e-util/e-path.h". Updated to match
- the new studlyCapsification in shell/Evolution*.idl.
-
-2001-08-23 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (rdfs): Remove the 4 that don't work.
-
-2001-08-22 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.c (generate_html): Skip the task if it's completed.
-
-2001-08-22 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (mail_show_full_path_toggled): Set the
- property box to changed.
-
-2001-08-22 Iain Holmes <iain@ximian.com>
-
- * e-summary-mail.c (make_pretty_foldername): If show_full_path is TRUE
- then return the full path. Take in the ESummary as well.
- (folder_gen_html): Pass ESummary to make_pretty_foldername.
- (e_summary_mail_generate_html): Pass the ESummary to folder_gen_html.
-
- * e-summary-rdf.c (e_summary_rdf_set_online): Take in a
- GNOME_Evolution_OfflineProgressListener in case we want to do
- individual reporting of rdf's being destroyed.
- (make_connection): Call the RDF Feed a News Feed instead.
-
- * e-summary-weather.c (e_summary_weather_set_online): Same.
-
- * e-summary.c (e_summary_set_online): Pass in the
- GNOME_Evolution_OfflineProgressListener to the set_online callback.
-
- * e-summary-offline-handler.c (impl_goOffline): Pass the listener to the
- callback.
- (impl_goOnline): Pass NULL for the listener.
-
-2001-08-21 Iain Holmes <iain@ximian.com>
-
- * my-evolution-html.h: Set the text colour to black.
-
-2001-08-21 Damon Chaplin <damon@ximian.com>
-
- * e-summary-calendar.c (generate_html):
- * e-summary-tasks.c (generate_html): changed the icons. For calendar
- events we use the 'new appointment' icon from the menu. For tasks we
- use the task icon from the ETable - I wasn't sure about using the
- 'New Task' icon as it has a tick in it which may make people think it
- is complete.
-
-2001-08-19 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c: Change the type from "Summary" to "summary"
- for consistency with the other folder types.
-
-2001-08-17 Zbigniew Chyla <cyba@gnome.pl>
-
- * my-evolution/e-summary-rdf.c (make_connection):
- Marked string for translation (connection type).
-
- * my-evolution/e-summary-weather.c
- (make_url): Split into two functions: make_url and make_anchor.
- (weather_make_html): s/make_url/make_anchor/
- (make_connection): Marked connection type string for franslation,
- assign the real URI to ->hostname (using make_url), not location code.
-
-2001-08-12 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-summary-preferences.c (make_initial_weather_list),
- e-summary-weather.c (e_summary_weather_init):
- Don't hardcode the default list of stations, let translators define it
- per locale/country.
-
-2001-08-17 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (weather_all_select_row_cb): Unselect the
- row if it isn't a leaf node.
- (weather_add_clicked_cb): Return if location == NULL.
-
-2001-08-15 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_draw): Use the US format for dates (Yeeech)
-
-2001-08-15 Iain Holmes <iain@ximian.com>
-
- * e-summary.c: s/My Evolution/Summary/
-
- * e-summary-preferences.c: s/My Evolution/Summary/
-
- * component-factory.c: s/My Evolution/Summary/
-
-2001-08-13 Iain Holmes <iain@ximian.com>
-
- * e-summary-weather.c: Set the default weather stations to Boston (boo)
- and Xiamen (Yey)
-
-2001-08-13 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c: Set the default RDF to CNN
-
-2001-08-13 Jason Leach <jleach@ximian.com>
-
- * e-summary-mail.c (e_summary_mail_free): Disconnect our callbacks
- when we are freeing the ESummaryMail. Fixes #6712.
-
-2001-08-09 Anna Marie Dirks <anna@ximian.com>
-
- * my-evolution-html.h : added more padding between the vertical
- spacer and the icons for the mail/appointments/tasks summaries.
-
-2001-08-09 Anna Marie Dirks <anna@ximian.com>
-
- * my-evolution.glade : added accelerators to all useful widgets
- in this file such that this dialog can now be fully navigated from
- the keyboard.
-
- * e-summary-preferences.c : changed the construct_pixmap_button
- function to take glade xml, an hbox and pixmap, making it possible
- to use glade to define and change the keyboard accelerators, instead
- of trying to do this in the c code.
-
-2001-08-06 Damon Chaplin <damon@ximian.com>
-
- * e-summary-tasks.c (sort_uids):
- (get_todays_uids):
- (generate_html):
- * e-summary-calendar.c (sort_uids): free the CalComponentDateTime
- and icaltimetype values after finishing with them.
-
-2001-08-03 Jason Leach <jleach@ximian.com>
-
- * e-summary-mail.c (update_folder_cb): Callback for the
- EvolutionStorageListener::update_folder signal, so we can update
- mail summaries when they change. Bug #4686.
-
-2001-08-02 Jason Leach <jleach@ximian.com>
-
- * e-summary-calendar.c (generate_html): Use the new and beautiful
- icon from Jakub.
-
- * e-summary-mail.c (e_summary_mail_generate_html): Ditto.
-
- * e-summary-tasks.c (generate_html): Ditto.
-
-2001-07-23 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-summary-rdf.c (display_doc): Convert translated string to UTF8.
-
-2001-07-30 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: Remove the Wipe Trackers references.
-
- * e-summary-rdf.c: Remove the wip trackers as I'm not 100% sure what it
- does, and it didn't work.
-
- * e-summary.h: Remove the wipe_trackers boolean
-
- * my-evolution.glade: Remove the wipe trackers and shrink the New Feed
- button
-
-2001-07-30 Iain Holmes <iain@ximian.com>
-
- * e-sumary-calendar.c (generate_html): Correct the URL for the links.
-
-2001-07-27 Iain Holmes <iain@ximian.com>
-
- * Locations: Add some more German cities from s.kost@webmacher.de.
-
-2001-07-23 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (add_dialog_clicked_cb): Add the new RDF to
- the shown clist as well.
-
-2001-07-23 Iain Holmes <iain@ximian.com>
-
- * e-summary-mail.c (e_summary_mail_init): Move the storage register out
- of here into a seperate function.
- (e_summary_mail_register_storages): Register the local storage.
- (e_summary_mail_register_storage): Register a single storage.
-
-2001-07-23 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: Fix the KDE and Newsforge things. Change the
- KDE rdf to the one that the KDE person told me :)
-
-2001-07-23 Jason Leach <jleach@ximian.com>
-
- * e-summary-preferences.c: Update the url (and site name) for the
- KDE rdf. Bug #5145.
-
-2001-07-21 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c: Make the "My Evolution" folder
- non-creatable by setting the `user_creatable' member of
- `EvolutionShellComponentFolderType' to %FALSE.
-
-2001-07-20 Jason Leach <jleach@ximian.com>
-
- * e-summary-tasks.c: Revert last changes, URIs are now back to
- original in shell.
-
-2001-07-19 Jason Leach <jleach@ximian.com>
-
- * e-summary-tasks.c: Update the evolution:/local/ URI's to
- evolution:/Local Folders/ to go along with todays shell changes.
-
- * e-summary-mail.c: Ditto.
-
- * e-summary-calendar.c: Ditto.
-
-2001-07-19 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c (display_doc): Fix HTML
-
- * e-summary-mail.c (folder_gen_html): correct the folder name.
-
-2001-07-19 Iain Holmes <iain@ximian.com>
-
- * my-evolution-html.h: Set the text colour to black. Frank was claiming
- it picked the default colour from the GTK+ theme, and if it was white
- bad things happened.
-
-2001-07-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-weather.c (weather_make_html): Remove the (more) link.
-
- * e-summary.c (e_summary_draw): Don't append NULL to the GString.
-
- * e-summary-tasks.c: Remove spewage.
-
-2001-07-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-weather.c (weather_make_html): Remove spewage.
-
-2001-07-18 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_reconfigure): Reconfigure the tasks.
-
- * e-summary-tasks.c (generate_html): Obtain todays tasks.
- (get_todays_uids): Make a list of todays uids.
-
-2001-07-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (make_property_dialog): Create the image
- buttons.
- (construct_pixmap_button): Create a box with an image and text.
-
-2001-07-18 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (e_summary_configure): Set the title on the
- window. Just do a g_return_if_fail if the XML file couldn't be loaded.
-
-2001-07-16 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c (display_doc): Nicer error reporting.
-
- * e-summary-weather.c: Nicer error reporting.
-
-2001-07-13 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.c: Fix the name of the icon.
-
-2001-07-13 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (mail_add_clicked_cb): Set the property box
- to changed.
-
-2001-07-13 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-summary.c (e_summary_draw): Convert the date string to utf8 before
- appending it to HTML.
-
-2001-07-12 Iain Holmes <iain@ximian.com>
-
- * metar.c: #include <config.h>
-
-2001-07-12 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_draw): put _() around the date string.
-
- * metar.c: Put some _() around things.
-
-2001-07-12 Iain Holmes <iain@ximian.com>
-
- * my-evolution.glade: Made the weather a single selection clist.
-
-2001-07-11 Iain Holmes <iain@ximian.com>
-
- * e-summary-mail.c (e_summary_mail_generate_html): Protect with
- g_return_if_fail
-
-2001-07-11 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (destroy): Destroy the alarm.
- (e_summary_init): Init the alarm.
-
- * e-summary-mail.c (free_folder): Don't free the value.
-
-2001-07-11 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (destroy): Destroy all the subcomponents.
-
- * e-summary-rdf.c (e_summary_rdf_free): Free and stop all tranfsers
-
- * e-summary-weather.c (e_summary_weather_free): Same.
-
- * e-summary-mail.c (e_summary_mail_free): Same.
-
- * e-summary-calendar.c (e_summary_calendar_free): Same.
-
- * e-summary-tasks.c (e_summary_tasks_free): Guess what.
-
-2001-07-10 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: Correct the Register RDF url.
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_init): Connect a calendar alarm to be notified
- of when the day changes.
-
- * Makefile.am: Link with libalarm.a
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary-weather.c (weather_make_html): Get an icon for the weather.
-
- * metar.[ch] (icon_from_weather): Work out what icon for a specific
- weather type.
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c (tree_walk): Fix HTML so it doesn't give the big black
- line
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.c (generate_html): Fix same HTML bug as in calendar.
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (generate_html): Show varying times depending
- on how soon the appointment is.
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary-calendar.c (generate_html): Fix up the HTML so having
- appointments doesn't mess up the display. Set the correct length of
- time to show appointments.
-
-2001-07-09 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.c (generate_html): Make the tasks switch to the
- tasks folder when you click on them.
-
-2001-07-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-summary-preferences.c: Added #include <config.h> to get
- translations working.
-
-2001-07-06 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (str_list_from_vector): Change the delimiter
- (vector_from_str_list): Change the delimiter.
- (fill_mail_all_clist): Fill the mail folder clist.
- (fill_mail_shown_clist): Use nicer names.
- (mail_add_clicked_cb): Add folders to the shown list.
-
- * e-summary-mail.c (e_summary_mail_fill_list): Flatten the hashtable
- into the CList.
- (e_summary_mail_uri_to_name): Get the pretty name for a uri.
-
-2001-07-06 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (fill_rdf_shown_list): Attach data
- (rdf_add_clicked_cb): Allow multiple rows to be removed.
- (rdf_remove_clicked_cb): Use the data.
-
- * my-evolution.glade: Allow multiple selection in the RDF all clist.
- Only allow single selection in the shown rdf list.
-
-2001-07-05 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (rdf_new_url_clicked_cb): Change RDF to
- news feed.
-
-2001-07-05 Iain Holmes <iain@ximian.com>
-
- * my-evolution.glade: Replace a table with a vbox so that the text
- of the radio buttons can be clicked. Change RDF to News Feed
-
-2001-07-05 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (add_dialog_clicked_cb): Fix warning
- (fill_rdf_shown_clist): Fix warning.
- (calendar_one_toggled_cb): Set preferences to the right toggle button.
- (calendar_five_toggled_cb): Ditto
- (calendar_week_toggled_cb): Ditto ditto
- (calendar_month_toggled_cb): Ditto dotto
- (calendar_all_toggled_cb): Set the amount of Tasks to be shown
- (calendar_today_toggled_cb): Ditto
- (make_property_dialog): Hook up the calendar radio buttons.
- (e_summary_preferences_restore): Pass NULL as opt_default, not &ev.
-
-2001-07-05 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (e_summary_preferences_restore): Add
- My-Evolution to the namespace.
- (e_summary_preferences_save): Ditto.
-
-2001-07-05 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (e_summary_preferences_restore): Re-enabled.
- Bonobo-conf doesn't seem to like NULL for opt_ev.
-
-2001-07-03 Iain Holmes <iain@ximian.com>
-
- * e-summary-prefences.c (e_summary_preferences_restore): Disabled until
- memory corruption thing is found.
-
- * my-evolution.glade: Fix the radio button problem.
-
-2001-07-03 Iain Holmes <iain@ximian.com>
-
- * e-summary-factory.c: Fixed the Bonobo warning.
-
-2001-07-03 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (e_summary_preferences_restore): Ditch
- gnome-config and replace it with bonobo-conf.
- (e_summary_preferences_save): Ditto.
-
- * e-summary-factory.c: Use the new print.png icon.
-
- * Makefile.am: Add bonobo conf CFLAGS and LIBS
-
-2001-07-03 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_set_online): Return if summary == NULL.
- (e_summary_add_connections): Return NULL if summary == NULL.
- (e_summary_count_connections): Return 0 if summary == NULL.
-
-2001-07-02 Iain Holmes <iain@ximian.com>
-
- * e-summary-tasks.[ch]: New files for tasks.
-
- * e-summary.c: USe the tasks.
-
-2001-07-02 Iain Holmes <iain@ximian.com>
-
- * Makefile.am: Add the glade files to the EXTRA_DIST
-
-2001-07-02 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (evolution_executive_summary_SOURCES): Add
- `e-summary-preferences.h'.
-
-2001-06-30 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (fill_rdf_all_clist): Load the URLs from a
- file.
- (save_known_urls): Save the known URLs.
- (add_dialog_clicked_cb): Close the dialog on Cancel. Save the URLs on
- Ok.
- (rdf_new_url_clicked_cb): Add some labels and an entry for the name.
-
-2001-06-30 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (fill_rdf_all_clist): Fill with names
- instead of URLs.
- (find_name_for_url): Given a URL find a name for it if we know it.
- (rdf_add_clicked_cb): Add the name to the clist and the url to the
- list.
-
-2001-06-30 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (add_dialog_clicked_cb): Add the new url to
- the list.
- (rdf_new_url_clicked_cb): Create a dialog and allow the user to add
- new urls.
-
-2001-06-30 Iain Holmes <iain@ximian.com>
-
- * e-summary-rdf.c (tree_walk): Remove spewage.
- (e_summary_rdf_count):
- (e_summary_rdf_add):
- (make_connection):
- (e_summary_rdf_set_online): Callbacks for the online_handler stuff.
- (e_summary_rdf_init): Setup the offline handler stuff.
- (close_callback): Update the number of onlines there are.
-
- * e-summary-weather.c (close_callback): Update the number of onlines.
- (e_summary_weather_count): Count the number of active downloads.
- (e_summary_weather_add): Make a list of active downloads.
- (make_connection): Make connection data.
- (e_summary_weather_set_online): Set if the component is online or not.
- (e_summary_weather_init): Setup the offline handler stuff.
-
- * e-summary.c (e_summary_count_connections): Call all the callbacks
- in the various modules that have online data and count the number of
- connections.
- (e_summary_add_connections): Make a list of them all.
- (e_summary_set_online): Set the online status for each registered
- module.
- (e_summary_add_online_connection): Register a new module.
-
- * e-summary-offline-handler.[ch]: BonoboXObject implementing the
- GNOME::Evolution::Offline interface.
-
- * e-summary-factory.c (factory_fn): Create an offline handler.
-
- * Makefile.am: Compile e-summary-offline-handler.[ch]
-
-2001-06-30 Zbigniew Chyla <cyba@gnome.pl>
-
- * e-summary-calendar.c (generate_html):
- Marked strings for translation + conversion to utf8.
-
- * e-summary-mail.c
- Added missing #include <config.h>
- (e_summary_mail_generate_html):
- Marked strings for translation + conversion to utf8.
-
- * e-summary-weather.c
- (e_summary_weather_get_html, open_callback):
- Marked strings for translation + conversion to utf8.
- (weather_make_html): Fixed leaks.
-
- * e-summary-rdf.c
- (tree_walk): Fixed leaks.
- (read_callback): Marked strings for translation.
-
-2001-06-29 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_draw): Resurrect the hack to stop GtkHTML from
- returning to the top when it's redrawn.
-
-2001-06-29 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c (property_box_destroy_cb): Hook up the saving.
- (str_list_from_vector): Fix memory corruption.
- (e_summary_preferences_save): Write the preferences out to disk.
- I *always* forget that.
-
- * e-summary-mail.c (e_summary_mail_init): Init ->shown to NULL.
-
-2001-06-29 Iain Holmes <iain@ximian.com>
-
- * e-summary-preferences.c: Do everything preferences related.
-
- * my-evolution.glade: Glade file for the preferences box.
-
- * e-summary-calendar.c (e_summary_calendar_reconfigure): Stub for later
-
- * e-summary-calendar.h: Some enums for settings.
-
- * e-summary-mail.c (folder_gen_html): Change the prototype so it
- doesn't work as a hash table foreach function.
- (new_folder_cb): Fix typo in comment :)
- Create a list of folders we display.
- (remove_folder_cb): Remove the folder from the display folder list.
- (maybe_add_to_shown): Hash table foreach function to create a display
- folder list.
- (e_summary_mail_reconfigure): Recreate the mail HTML.
-
- * e-summary-rdf.c (tree_walk): Obey preferences.
- (e_summary_rdf_update): Separate the updating and downloading logic.
- (e_summary_rdf_init): Start an updating timeout.
- (e_summary_rdf_reconfigure): Recreate the RDF html.
-
- * e-summary-weather.c (e_summary_weather_update): Separate the updating
- and downloading logic.
- (e_summary_weather_init): Start timeout.
- (e_summary_weather_code_to_name): Convert code to location name.
- (e_summary_weather_ctree_fill): Fill a CTree with the location data.
- (e_summary_weather_reconfigure): Regenerate the HTML.
-
- * e-summary.c (e_summary_init): Create the preferences.
- (e_summary_reconfigure): Reconfigure the whole summary.
-
- * metar.c: Obey preferences.
-
-2001-06-27 Iain Holmes <iain@ximian.com>
-
- * e-summary-factory.c: Add the pixmaps to the menus.
- Add a new menu item for the configuration stuff.
-
-2001-06-27 Ettore Perazzoli <ettore@ximian.com>
-
- * component-factory.c (factory_fn): Pass NULL as the
- @external_uri_schemas argument to
- `evolution_shell_component_new()'.
-
-2001-06-21 Rodrigo Moya <rodrigo@ximian.com>
-
- * Makefile.am: added libwombat to LDADD
-
-2001-06-15 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Get weather.h disted
-
-2001-06-15 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Fix includes so that libical need not be installed
-
-2001-06-14 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: add my-evolution-html.h to the sources
-
-2001-06-13 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Make e-summary-type.h a source so it gets disted
-
-2001-06-08 Iain Holmes <iain@ximian.com>
-
- * e-summary.c (e_summary_init): Allow horizontal scrollbars.
-
- * e-summary-weather.c (e_summary_weather_init): Change the name of the
- protocol registered.
- (weather_make_html): Use the weather protocol instead of more.
diff --git a/my-evolution/GNOME_Evolution_Summary.oaf.in b/my-evolution/GNOME_Evolution_Summary.oaf.in
deleted file mode 100644
index 4c4e42e2b8..0000000000
--- a/my-evolution/GNOME_Evolution_Summary.oaf.in
+++ /dev/null
@@ -1,18 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Summary_ShellComponent"
- type="exe"
- location="evolution-executive-summary">
-
- <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 the executive summary."/>
-
- <oaf_attribute name="evolution:shell-component-icon" type="string"
- value="evolution-today.png"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/my-evolution/Locations b/my-evolution/Locations
deleted file mode 100644
index cf4bab94b1..0000000000
--- a/my-evolution/Locations
+++ /dev/null
@@ -1,3004 +0,0 @@
-[Main]
-regions=US CA EU AF OZ ME AS M_ AT
-
-[ME]
-name=Middle East
-states=DZ BH IR KW LB OM QA SA AE YE
-
-[ME_AE]
-name=United Arab Emirates
-loc0=Abu\\ Dhabi\\ -\\ Bateen OMAD ------ ---
-loc1=Abu\\ Dhabi OMAA ------ ---
-loc2=Al\\ Ain OMAL ------ ---
-loc3=Dubai OMDB ------ ---
-loc4=Fujairah OMFJ ------ ---
-loc5=Ras\\ Al\\ Khaimah OMRK ------ ---
-loc6=Sharjah OMSJ ------ ---
-
-[ME_QA]
-name=Qatar
-loc0=Doha OTBD ------ ---
-
-[ME_OM]
-name=Oman
-loc0=Masirah OOMA ------ ---
-loc1=Saiq OOSQ ------ ---
-loc2=Salalah OOSA ------ ---
-loc3=Seeb OOMS ------ ---
-loc4=Thumrait OOTH ------ ---
-
-[ME_YE]
-name=Yemen
-loc0=Aden OYAA ------ ---
-loc1=Hodeidah OYHD ------ ---
-loc2=Marib OYMB ------ ---
-loc3=Sana'A OYSN ------ ---
-loc4=Sayun OYSY ------ ---
-loc5=Socotra OYSQ ------ ---
-loc6=Taiz OYTZ ------ ---
-
-[ME_SA]
-name=Saudi Arabia
-loc0=Abha OEAB ------ ---
-loc1=Al\\ Ahsa OEAH ------ ---
-loc2=Al\\ Baha OEBA ------ ---
-loc3=Al\\ Qaysumah OEPA ------ ---
-loc4=Al-Jouf OESK ------ ---
-loc5=Arar OERR ------ ---
-loc6=Bisha OEBH ------ ---
-loc7=Dawadmi OEDW ------ ---
-loc8=Dhahran OEDR ------ ---
-loc9=Gassim OEGS ------ ---
-loc10=Gizan OEGN ------ ---
-loc11=Guriat OEGT ------ ---
-loc12=Hafr\\ Al-Batin OEKK ------ ---
-loc13=Hail OEHL ------ ---
-loc14=Jeddah\\ King\\ Abdul\\ Aziz\\ International\\ Airport OEJN ------ ---
-loc15=Khamis\\ Mushait OEKM ------ ---
-loc16=King\\ Khaled\\ International\\ Airport OERK ------ ---
-loc17=Madinah OEMA ------ ---
-loc18=Makkah OEMK ------ ---
-loc19=Najran OENG ------ ---
-loc20=Rafha OERF ------ ---
-loc21=Riyadh OERY ------ ---
-loc22=Sharurah OESH ------ ---
-loc23=Tabuk OETB ------ ---
-loc24=Taif OETF ------ ---
-loc25=Turaif OETR ------ ---
-loc26=Wadi\\ Al\\ Dawasser\\ Airport OEWD ------ ---
-loc27=Wejh OEWJ ------ ---
-loc28=Yenbo OEYN ------ ---
-
-[ME_DZ]
-name=Algeria
-loc0=Adrar DAUA ------ ---
-loc1=Annaba DABB ------ ---
-loc2=Constantine DABC ------ ---
-loc3=Dar-El-Beida DAAG ------ ---
-loc4=Ghardaia DAUG ------ ---
-loc5=Hassi-Messaoud DAUH ------ ---
-loc6=In\\ Amenas DAUZ ------ ---
-loc7=Oran/Es\\ Senia DAOO ------ ---
-loc8=Tamanrasset/Aguenna DAAT ------ ---
-loc9=Tebessa DABS ------ ---
-loc10=Tlemcen\\ Zenata DAON ------ ---
-
-[ME_BH]
-name=Bahrain
-loc0=Bahrain OBBI ------ ---
-
-[ME_LB]
-name=Lebanon
-loc0=Beirut OLBA ------ ---
-
-[ME_IR]
-name=Iran, Islamic Republic of
-loc0=Ahwaz OIAW ------ ---
-loc1=Bandarabbass OIKB ------ ---
-loc2=Esfahan OIFM ------ ---
-loc3=Kerman OIKK ------ ---
-loc4=Mashhad OIMM ------ ---
-loc5=Shiraz OISS ------ ---
-loc6=Tabriz OITT ------ ---
-loc7=Tehran-Mehrabad OIII ------ ---
-
-[ME_KW]
-name=Kuwait
-loc0=Kuwait OKBK ------ ---
-
-[US]
-name=United States
-states=AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MA MD MI MS MN MO MT NE NH NM NV NY ND NJ NC OH OK OR PA RI SC SD TN TX UT VT VA WA WI WV WY
-
-[US_AK]
-name=Alaska
-loc0=Adak PADK AKZ020 ---
-loc1=Ambl\\er PAFM AKZ003 ---
-loc2=Anaktuvuk PAKP AKZ001 ---
-loc3=Anchorage PANC AKZ015 ---
-loc4=Anchorage\\ -\\ Elmendorf\\ AFB PAED AKZ015 ---
-loc5=Aniak PANI AKZ010 ---
-loc6=Annette PANT ------ ---
-loc7=Barrow PABR AKZ001 ---
-loc8=Barter\\ Island PABA ------ ---
-loc9=Bethel PABE AKZ010 ---
-loc10=Bettles PABT AKZ004 ---
-loc11=Big\\ River\\ Lake PALV AKZ001 ---
-loc12=Cantwell PATW AKZ004 ---
-loc13=Cape\\ Lisburne PALU ------ ---
-loc14=Cape\\ Newenham PAEH ------ ---
-loc15=Cape\\ Romanzoff PACZ ------ ---
-loc16=Chandalar\\ Lake PALR AKZ004 ---
-loc17=Chulitna PAEC ------ ---
-loc18=Circle\\ City PACR AKZ004 ---
-loc19=Cold\\ Bay PACD AKZ020 ---
-loc20=Cordova PACV AKZ017 ---
-loc21=Dead\\ Horse PASC AKZ001 ---
-loc22=Dillingham PADL AKZ010 ---
-loc23=Dutch\\ Harbor PADU AKZ020 ---
-loc24=Elfin\\ Cove PAEL AKZ022 ---
-loc25=Emmonak PAEM ------ ---
-loc26=Fairbanks PAFA AKZ007 ---
-loc27=Farbanks/Eielson\\ AFB PAEI AKZ007 ---
-loc28=Fort\\ Greely/Allen\\ AAF PABI ------ ---
-loc29=Galbraith\\ Lake PAGB ------ ---
-loc30=Galena PAGA ------ ---
-loc31=Gambell PAGM AKZ006 ---
-loc32=Gulkana PAGK AKZ015 ---
-loc33=Gustavus PAGS AKZ024 ---
-loc34=Haines PAHN AKZ002 ---
-loc35=Hayes\\ River PAHZ ------ ---
-loc36=Healy\\ River PAHV AKZ004 ---
-loc37=Homer PAHO AKZ017 ---
-loc38=Hoonah PAOH AKZ026 ---
-loc39=Iliamna PAIL AKZ010 ---
-loc40=Juneau PAJN AKZ025 ---
-loc41=Kake PAFE AKZ026 ---
-loc42=Kenai PAEN AKZ017 ---
-loc43=Ketchikan PAKT AKZ027 ---
-loc44=King\\ Salmon PAKN AKZ016 ---
-loc45=Klawock PAKW ------ ---
-loc46=Kodiak PADQ AKZ018 ---
-loc47=Kotzebue PAOT AKZ003 ---
-loc48=Lake\\ Hood PALH ------ ---
-loc49=McCarthy PAMX AKZ017 ---
-loc50=McGrath PAMC AKZ004 ---
-loc51=Mekoryuk PAMY AKZ010 ---
-loc52=Merril\\ Field PAMR ------ ---
-loc53=Middleton\\ Island PAMD ------ ---
-loc54=Minchumina PAMH ------ ---
-loc55=Nabesna/Devil\\ Mt. PABN ------ ---
-loc56=Nenana PANN AKZ004 ---
-loc57=Nome PAOM AKZ006 ---
-loc58=Northway PAOR AKZ007 ---
-loc59=Palmer PAAQ AKZ015 ---
-loc60=Paxson PAXK AKZ017 ---
-loc61=Petersburg PAPG AKZ026 ---
-loc62=Point\\ Hope PAPO AKZ001 ---
-loc63=Point\\ Lay PPIZ AKZ001 ---
-loc64=Port\\ Alexander PAAP AKZ026 ---
-loc65=Port\\ Alsworth PALJ ------ ---
-loc66=Port\\ Heiden PAPH AKZ010 ---
-loc67=Puntilla\\ Lake PAPT ------ ---
-loc68=Saint\\ Mary's PASM AKZ010 ---
-loc69=Saint\\ Paul PASN ------ ---
-loc70=Sand\\ Point PASD AKZ020 ---
-loc71=Selanik PASK AKZ003 ---
-loc72=Seward PAWD AKZ017 ---
-loc73=Shishmaref PASH AKZ006 ---
-loc74=Sitka PASI AKZ023 ---
-loc75=Skagway PAGY AKZ026 ---
-loc76=Skwentna PASW AKZ015 ---
-loc77=Slana PADT ------ ---
-loc78=Snowshoe\\ Lake PALK ------ ---
-loc79=Soldotna PASX AKZ017 ---
-loc80=Sparrevohn PASV ------ ---
-loc81=Sutton PAJV ------ ---
-loc82=Talkeetna PATK AKZ015 ---
-loc83=Tanana PATA AKZ004 ---
-loc84=Tatalina PATL ------ ---
-loc85=Tin\\ City PATC ------ ---
-loc86=Togiak\\ Village PATG AKZ010 ---
-loc87=Umiat PAUM AKZ001 ---
-loc88=Unalakleet PAUN AKZ006 ---
-loc89=Valdez\\ 2 PAVD AKZ017 ---
-loc90=Wainwright PAFB AKZ001 ---
-loc91=Whittier PAWR AKZ015 ---
-loc92=Willow\\ Airport PAUO AKZ015 ---
-loc93=Wrangell PAWG AKZ026 ---
-loc94=Yakutat PAYA AKZ022 ---
-
-[US_AR]
-name=Arkansas
-loc0=Batesville KBVX ARZ016 ---
-loc1=Bentonville KVBT ARZ001 ---
-loc2=El\\ Dorado KELD ARZ073 ---
-loc3=Fayetteville KFYV ARZ010 085
-loc4=Flippin KFLP ARZ004 ---
-loc5=Fort\\ Smith KFSM ------ 085
-loc6=Harrison KHRO ARZ003 085
-loc7=Hot\\ Springs KHOT ARZ042 ---
-loc8=Jonesboro KJBR ARZ026 085
-loc9=Little\\ Rock KLIT ARZ044 ---
-loc10=Little\\ Rock\\ AFB KLRF ARZ044 ---
-loc11=Pine\\ Bluff KPBF ARZ056 ---
-loc12=Rogers KROG ARZ001 ---
-loc13=Siloam\\ Springs KSLG ARZ001 ---
-loc14=Stuttgart KSGT ARZ057 ---
-loc15=Texarkana KTXK ARZ070 ---
-loc16=Walnut\\ Ridge KARG ARZ017 ---
-
-[US_DC]
-name=District of Columbia
-loc0=Washington/Dulles KIAD DCZ013 dca
-loc1=Washington KDCA DCZ013 dca
-
-[US_ID]
-name=Idaho
-loc0=Boise KBOI IDZ014 ---
-loc1=Burley KBYI IDZ022 ---
-loc2=Challis KU15 IDZ018 ---
-loc3=Coeur\\ d'Alene KCOE IDZ002 ---
-loc4=Elk\\ City KP69 IDZ006 ---
-loc5=Grangeville KS80 IDZ007 ---
-loc6=Hailey-Sun\\ Valley KSUN IDZ018 ---
-loc7=Idaho\\ Falls KIDA IDZ020 ---
-loc8=Lewiston KLWS IDZ003 ---
-loc9=Malad\\ City KMLD IDZ022 ---
-loc10=Malta K77M IDZ022 ---
-loc11=McCall KMYL IDZ011 ---
-loc12=Mountain\\ Home KMUO IDZ014 ---
-loc13=Mullan KS06 IDZ004 ---
-loc14=Pocatello KPIH IDZ021 ---
-loc15=Salmon KSMN IDZ009 ---
-loc16=Salmon\\ (2) K27U IDZ009 ---
-loc17=Soda\\ Springs KU78 IDZ023 ---
-loc18=Strevell K4SV ------ ---
-loc19=Twin\\ Falls KTWF IDZ015 ---
-
-[US_IA]
-name=Iowa
-loc0=Algona KAXA IAZ005 043
-loc1=Ames KAMW IAZ048 043
-loc2=Atlantic KAIO IAZ070 ---
-loc3=Boone KBNW IAZ047 ---
-loc4=Burlington KBRL IAZ089 058
-loc5=Carroll KCIN IAZ045 ---
-loc6=Cedar\\ Rapids KCID IAZ052 ---
-loc7=Chariton KCNC IAZ084 ---
-loc8=Charles\\ City KCCY IAZ018 ---
-loc9=Clarinda KICL IAZ091 ---
-loc10=Clarion KCAV IAZ025 ---
-loc11=Clinton KCWI IAZ066 ---
-loc12=Council\\ Bluffs KCBF IAZ069 ---
-loc13=Creston KCSQ IAZ082 ---
-loc14=Davenport KDVN IAZ068 ---
-loc15=Decorah KDEH IAZ010 ---
-loc16=Denison KDNS IAZ044 ---
-loc17=Des\\ Moines KDSM IAZ060 057
-loc18=Dubuque KDBQ IAZ042 ---
-loc19=Estherville KEST IAZ004 ---
-loc20=Fairfield KFFL IAZ087 ---
-loc21=Fort\\ Dodge KFOD IAZ035 043
-loc22=Fort\\ Madison KFSW IAZ099 ---
-loc23=Iowa\\ City KIOW IAZ064 ---
-loc24=Keokuk KEOK ------ ---
-loc25=Knoxville KOXV ------ ---
-loc26=Lamoni K0Y7 IAZ094 057
-loc27=Le\\ Marine KLRJ ------ ---
-loc28=Marshalltown KMIW IAZ049 ---
-loc29=Mason\\ City KMCW IAZ017 044
-loc30=Monticello KMXO IAZ053 ---
-loc31=Muscatine KMUT IAZ067 ---
-loc32=Newton KTNU IAZ061 ---
-loc33=Oelwen KOLZ IAZ029 ---
-loc34=Orange\\ City KORC IAZ012 ---
-loc35=Ottumwa KOTM IAZ086 058
-loc36=Red\\ Oak KRDK IAZ080 ---
-loc37=Sheldon KSHL IAZ012 ---
-loc38=Shenandoah KSDA IAZ091 ---
-loc39=Sioux\\ City KSUX IAZ031 043
-loc40=Spencer KSPW IAZ014 043
-loc41=Storm\\ Lake KSLB IAZ022 ---
-loc42=Washington KAWG IAZ077 ---
-loc43=Waterloo KALO IAZ039 044
-loc44=Webster\\ City KEBS ------ ---
-
-[US_KS]
-name=Kansas
-loc0=Chanute KCNU KSZ096 084
-loc1=Concordia KCNK KSZ020 071
-loc2=Dodge\\ City KDDC KSZ078 070
-loc3=Elkhart K1K5 KSZ084 ---
-loc4=Emporia KEMP KSZ054 071
-loc5=Fort\\ Riley KFRI KSZ036 ---
-loc6=Garden\\ City KGCK KSZ063 070
-loc7=Goodland KGLD KSZ013 070
-loc8=Hays KHYS KSZ031 ---
-loc9=Hill\\ City KHLC KSZ016 070
-loc10=Hutchinson KHUT KSZ067 084
-loc11=Liberal KLBL KSZ086 ---
-loc12=Manhattan KMHK KSZ022 071
-loc13=Medicine\\ Lodge KP28 KSZ090 ---
-loc14=Olathe KOJC KSZ105 071
-loc15=Olathe/Ind. KIXD KSZ105 071
-loc16=Russell KRSL KSZ032 070
-loc17=Salina KSLN KSZ049 071
-loc18=Topeka KTOP KSZ039 071
-loc19=Topeka-Forbes\\ Field KFOE KSZ039 071
-loc20=Wichita KICT KSZ083 084
-loc21=Wichita-Jabara K3KM KSZ083 084
-loc22=Wichita-McConnell\\ AFB KIAB KSZ083 084
-
-[US_KY]
-name=Kentucky
-loc0=Bowling\\ Green KBWG KYZ071 087
-loc1=Covington KCVG KYZ092 074
-loc2=Fort\\ Campbell KHOP KYZ017 ---
-loc3=Fort\\ Knox KFTK KYZ028 ---
-loc4=Frankfort KFFT KYZ035 ---
-loc5=Henderson KEHR KYZ018 ---
-loc6=Jackson KJKL KYZ112 087
-loc7=Lexington KLEX KYZ041 074
-loc8=London KLOZ ------ 087
-loc9=Louisville KLOU KYZ030 073
-loc10=Louisville-Standiford\\ Field KSDF KYZ030 073
-loc11=Owensboro KOWB KYZ019 086
-loc12=Paducah KPAH KYZ005 ---
-loc13=Pikeville K5I3 KYZ120 ---
-loc14=Somerset KSME KYZ079 ---
-
-[US_LA]
-name=Lousiana
-loc0=Alexandria KAEX LAZ028 115
-loc1=Alexandria-Esler KESF LAZ028 115
-loc2=Amelia K7R3 ------ ---
-loc3=Barksdale KBAD ------ ---
-loc4=Baton\\ Rouge KBTR LAZ048 121
-loc5=Cameron K7R5 LAZ051 ---
-loc6=Fort\\ Polk-Leesville KPOE LAZ027 115
-loc7=Fourchon K9F2 ------ ---
-loc8=Grand\\ Isle KAXO LAZ061 ---
-loc9=Houma KHUM LAZ066 ---
-loc10=Intracoastal K7R4 LAZ052 ---
-loc11=Lafayette KLFT LAZ044 121
-loc12=Lake\\ Charles KLCH LAZ041 121
-loc13=Monroe KMLU LAZ014 ---
-loc14=New\\ Iberia KARA LAZ053 ---
-loc15=New\\ Orleans KMSY LAZ062 121
-loc16=New\\ Orleans\\ NAS KNBG LAZ062 121
-loc17=New\\ Orleans-Lakefront KNEW LAZ062 121
-loc18=Patterson KPTN ------ ---
-loc19=Salt\\ point KP92 ------ ---
-loc20=Shreveport\\ Downtown KDTN LAZ001 107
-loc21=Shreveport\\ Regional KSHV LAZ001 107
-loc22=South\\ Marsh\\ Island K7R8 LAZ053 ---
-loc23=South\\ Timbalier KS58 ------ ---
-loc24=Venice K7R1 ------ 121
-loc25=Vermillion K9R9 ------ ---
-loc26=Vicksburg KTVR ------ ---
-
-[US_ME]
-name=Maine
-loc0=Augusta KAUG MEZ021 034
-loc1=Bangor KBGR MEZ015 034
-loc2=Bar\\ Harbor KBHB MEZ029 ---
-loc3=Brunswick KNHZ MEZ024 049
-loc4=Caribou KCAR MEZ002 ---
-loc5=Clayton\\ Lake K40B ------ ---
-loc6=Frenchville KFVE MEZ002 ---
-loc7=Fryeburg KIZG ------ ---
-loc8=Greenville K3B1 MEZ010 034
-loc9=Houlton KHUL MEZ002 ---
-loc10=Lewiston KLEW MEZ020 ---
-loc11=Millinocket KMLT MEZ015 ---
-loc12=Portland KPWM MEZ024 049
-loc13=Presque\\ Isle KPQI MEZ002 ---
-loc14=Rockland KRKD MEZ027 ---
-loc15=Sanford KSFM MEZ023 ---
-loc16=Turin K3B5 ------ ---
-loc17=Waterville KWVL MEZ021 ---
-loc18=Wiscasset KIWI MEZ026 ---
-
-[US_MS]
-name=Mississippi
-loc0=Columbus KGTR MSZ031 109
-loc1=Columbus-W\\ Point-Starkville KCBM MSZ031 109
-loc2=Greenville KGLH ------ 108
-loc3=Greenwood KGWO MSZ025 108
-loc4=Gulfport KGPT MSZ081 ---
-loc5=Jackson KJAN MSZ048 108
-loc6=Laurel KPIB MSZ066 ---
-loc7=McComb KMCB MSZ070 ---
-loc8=Meridian KMEI MSZ052 109
-loc9=Meridian-Lauderdale KNMM MSZ052 109
-loc10=Natchez KHEZ MSZ060 ---
-loc11=Tupelo KTUP MSZ016 098
-loc12=Vicksburg KTVR MSZ047 ---
-
-[US_MO]
-name=Missouri
-loc0=Cape\\ Girardeau KCGI MOZ087 ---
-loc1=Columbia KCOU MOZ041 072
-loc2=Fort\\ Leonard KTBN MOZ070 072
-loc3=Grandview KGVW MOZ037 ---
-loc4=Jefferson\\ City KJEF MOZ048 072
-loc5=Joplin KJLN MOZ088 084
-loc6=Kansas\\ City KMKC MOZ037 071
-loc7=Kansas\\ City-Gladstone KMCI MOZ029 071
-loc8=Kirksville KIRK MOZ017 058
-loc9=Poplar\\ Bluff KP02 MOZ109 ---
-loc10=Sedalia KSZL MOZ045 ---
-loc11=Spickard KP35 MOZ015 ---
-loc12=Springfield KSGF MOZ095 084
-loc13=St\\ Joseph KSTJ MOZ020 057
-loc14=St\\ Louis KSTL MOZ064 stl
-loc15=St\\ Louis-Spirit KSUS MOZ064 stl
-loc16=Vichy-Rolla KVIH MOZ058 072
-
-[US_MT]
-name=Montana
-loc0=Billings KBIL MTZ035 ---
-loc1=Bozeman KBZN MTZ015 013
-loc2=Broadus K4BQ MTZ036 ---
-loc3=Butte KBTM MTZ007 013
-loc4=Cut\\ Bank KCTB MTZ010 004
-loc5=Dillon KDLN MTZ008 025
-loc6=Drummond K3DU MTZ006 013
-loc7=Glasgow KGGW MTZ017 ---
-loc8=Glendive KGDV MTZ025 ---
-loc9=Great\\ Falls KGFA MTZ012 004
-loc10=Harlowton K3HT MTZ028 ---
-loc11=Havre KHVR MTZ011 004
-loc12=Helena KHLN MTZ014 013
-loc13=Jordan KJDN MTZ022 ---
-loc14=Kalispell KFCA MTZ003 004
-loc15=Lewistown KLWT MTZ013 013
-loc16=Livingston KLVM MTZ028 013
-loc17=Miles\\ City KMLS MTZ032 ---
-loc18=Missoula KMSO MTZ005 013
-loc19=Monida KMQM ------ ---
-loc20=Sidney KSDY MTZ024 ---
-loc21=Thompson\\ Falls K3TH MTZ004 ---
-loc22=West\\ Yellowstone KWYS MTZ015 025
-loc23=West\\ Yellowstone\\ (2) KWEY MTZ015 025
-loc24=Wolf\\ Point KOLF MTZ020 ---
-
-[US_NE]
-name=Nebraska
-loc0=Ainsworth KANW NEZ008 042
-loc1=Alliance KAIA NEZ003 ---
-loc2=Beatrice KBIE NEZ089 057
-loc3=Broken\\ Bow KBBW NEZ038 056
-loc4=Burwell KK20 ------ ---
-loc5=Chadron KCDR NEZ002 041
-loc6=Columbus KOLU NEZ042 ---
-loc7=Falls\\ City KFNB NEZ093 057
-loc8=Grand\\ Island KGRI NEZ062 056
-loc9=Hastings KHSI NEZ075 056
-loc10=Imperial KIML NEZ069 055
-loc11=Imperial\\ (2) K6V1 NEZ069 055
-loc12=Kearney KEAR NEZ061 ---
-loc13=Lincoln KLNK NEZ066 057
-loc14=McCook KMCK NEZ081 056
-loc15=Mullen KMHN NEZ007 042
-loc16=Norfolk KOFK NEZ031 042
-loc17=North\\ Platte KLBF NEZ059 ---
-loc18=O'Neill KONL NEZ010 042
-loc19=Omaha KOMA NEZ052 057
-loc20=Omaha-Bellevue KOFF NEZ052 057
-loc21=Ord-Sharp KODX NEZ039 ---
-loc22=Scottsbluff KBFF NEZ019 041
-loc23=Sidney KSNY NEZ055 055
-loc24=Valentine KVTN NEZ005 042
-
-[US_NH]
-name=New Hampshire
-loc0=Berlin KBML NHZ002 034
-loc1=Concord KCON NHZ008 049
-loc2=Jaffrey KAFN NHZ011 ---
-loc3=Keene KEEN NHZ011 049
-loc4=Laconia KLCI NHZ009 049
-loc5=Lebanon KLEB NHZ003 049
-loc6=Manchester KMHT NHZ012 049
-loc7=Mt\\ Washington KMWN ------ 034
-loc8=Nashua KASH NHZ012 ---
-loc9=North\\ Conway KCWN ------ ---
-loc10=Portsmouth KPSM NHZ013 049
-loc11=Whitefield KHIE ------ ---
-
-[US_NM]
-name=New Mexico
-loc0=Alamogordo KHMN NMZ024 ---
-loc1=Albuquerque KABQ NMZ009 abq
-loc2=Carlsbad KCNM NMZ028 ---
-loc3=Clayton KCAO NMZ007 ---
-loc4=Clovis-Cannon\\ AFB KCVS NMZ021 ---
-loc5=Corona K4CR NMZ016 ---
-loc6=Cuba\\ Awrs K4SL NMZ002 ---
-loc7=Deming KDMN NMZ031 ---
-loc8=Farmington KFMN NMZ001 081
-loc9=Gallup KGUP NMZ008 093
-loc10=Grants KGNT NMZ008 093
-loc11=Hobbs KHOB NMZ029 ---
-loc12=Las\\ Vegas KLVS NMZ005 abq
-loc13=Los\\ Alamos KLAM NMZ002 081
-loc14=Moriarty K4MY NMZ011 ---
-loc15=Roswell KROW NMZ019 ---
-loc16=Ruidoso-Sierra\\ Blanca KRUI NMZ016 ---
-loc17=Santa\\ Fe KSAF NMZ011 abq
-loc18=Silver\\ City KSVC NMZ022 ---
-loc19=Socorro KONM NMZ015 ---
-loc20=Taos KE23 NMZ004 ---
-loc21=Truth\\ or\\ Consequences KTCS NMZ023 ---
-loc22=Tucumcari KTCC NMZ013 ---
-loc23=Zuni\\ Pueblo KZUN ------ ---
-
-[US_ND]
-name=North Dakota
-loc0=Bismark KBIS NDZ035 016
-loc1=Devils\\ Lake KDVL NDZ015 007
-loc2=Devils\\ Lake\\ (2) KP11 NDZ015 007
-loc3=Dickinson KDIK NDZ033 015
-loc4=Fargo KFAR NDZ039 ---
-loc5=Grand\\ Forks KGFK NDZ027 007
-loc6=Jamestown KJMS NDZ037 016
-loc7=Lidgerwood KP67 NDZ053 ---
-loc8=Minot KMOT NDZ011 007
-loc9=Minot\\ AFB KMIB NDZ011 007
-loc10=Roseglen KP24 NDZ021 ---
-loc11=Williston KISN NDZ009 006
-
-[US_OK]
-name=Oklahoma
-loc0=Altus KLTS OKZ036 ---
-loc1=Ardmore KADM OKZ046 ---
-loc2=Bartlesville KBVO OKZ054 084
-loc3=Clinton KCSM OKZ016 ---
-loc4=Enid KEND OKZ012 ---
-loc5=Enid/Woodring KWDG OKZ012 084
-loc6=Fort\\ Sill KFSI OKZ038 ---
-loc7=Gage KGAG OKZ009 ---
-loc8=Guymon KGUY ------ 082
-loc9=Hobart KHBR OKZ035 095
-loc10=Lawton KLAW OKZ038 ---
-loc11=McAlester KMLC OKZ073 ---
-loc12=Oklahoma\\ City KOKC OKZ025 095
-loc13=Oklahoma\\ City-Bethany KPWA OKZ025 095
-loc14=Oklahoma\\ City-Midwest\\ City KTIK OKZ025 095
-loc15=Page KPGO OKZ076 ---
-loc16=Ponca\\ City KPNC OKZ008 084
-loc17=Stillwater KSWO OKZ020 084
-loc18=Tulsa KTUL OKZ060 084
-
-[US_SD]
-name=South Dakota
-loc0=Aberdeen KABR SDZ006 ---
-loc1=Brookings KBKX SDZ040 ---
-loc2=Chamberlain K9V9 SDZ057 ---
-loc3=Custer K0V1 SDZ029 ---
-loc4=Huron KHON SDZ038 028
-loc5=Lemmon KY22 SDZ002 ---
-loc6=Mitchell KMHE SDZ059 028
-loc7=Mobridge KY26 SDZ009 028
-loc8=Philip KPHP SDZ032 028
-loc9=Pierre KPIR SDZ035 028
-loc10=Rapid\\ City KRAP SDZ031 027
-loc11=Rapid\\ City-Ellsworth\\ AFB KRCA SDZ031 027
-loc12=Redig KREJ SDZ001 ---
-loc13=Sioux\\ Falls KFSD SDZ062 043
-loc14=Watertown KATY SDZ020 ---
-loc15=Yankton KYKN SDZ069 043
-
-[US_UT]
-name=Utah
-loc0=Blanding K4BL UTZ022 067
-loc1=Bryce\\ Canyon KBCE UTZ020 080
-loc2=Bullfrog KU17 UTZ021 ---
-loc3=Cedar\\ City KCDC UTZ016 080
-loc4=Delta KU24 UTZ015 ---
-loc5=Dugway KDPG UTZ005 slc
-loc6=Eagle\\ Range KU16 ------ ---
-loc7=Green\\ River KU28 UTZ013 ---
-loc8=Hanksville K4HV UTZ013 067
-loc9=Logan KLGU UTZ001 ---
-loc10=Milford KMLF UTZ016 ---
-loc11=Ogden KOGD UTZ002 slc
-loc12=Ogden-Hill\\ AFB KHIF UTZ002 slc
-loc13=Price-Carbon KPUC UTZ012 067
-loc14=Provo KPVU UTZ004 slc
-loc15=Roosevelt KU67 UTZ011 ---
-loc16=St.\\ George KSGU UTZ019 080
-loc17=Salt\\ Lake\\ City KSLC UTZ003 slc
-loc18=Vernal KVEL UTZ024 ---
-loc19=Wendover KENV UTZ005 slc
-
-[US_VT]
-name=Vermont
-loc0=Ball\\ Mountain K8B3 ------ ---
-loc1=Burlington KBTV VTZ005 ---
-loc2=Canaan KVT1 ------ ---
-loc3=Enosburg\\ Falls K3B8 ------ ---
-loc4=Montpelier KMPV VTZ008 034
-loc5=Newport KNPV VTZ003 034
-loc6=Pownal K5B5 ------ ---
-loc7=Rutland KRUT VTZ011 ---
-loc8=Springfield KVSF VTZ012 ---
-loc9=St\\ Johnsbury K9B2 VTZ007 ---
-loc10=Waterbury K5B1 ------ ---
-loc11=West\\ Burke KVT2 ------ ---
-loc12=Wilmington K0B0 VTZ014 049
-
-[US_WY]
-name=Wyoming
-loc0=Big\\ Piney KBPI WYZ020 ---
-loc1=Casper KCPR WYZ064 ---
-loc2=Cheyenne KCYS WYZ069 ---
-loc3=Cody KCOD WYZ002 026
-loc4=Douglas K4DG WYZ059 ---
-loc5=Evanston KEVW WYZ021 ---
-loc6=Gillette KGCC WYZ054 026
-loc7=Jackson KJAC WYZ006 ---
-loc8=Lander KLND WYZ012 040
-loc9=Laramie KLAR WYZ066 ---
-loc10=Rawlins KRWL WYZ061 040
-loc11=Riverton KRIW WYZ013 040
-loc12=Rock\\ Springs KRKS WYZ022 ---
-loc13=Sheridan KSHR WYZ099 ---
-loc14=Worland KWRL WYZ009 026
-loc15=Yellowstone KP60 WYZ001 ---
-
-
-[US_PA]
-name=Pennsylvania
-loc0=Allentown KABE PAZ061 062
-loc1=Altoona KAOO PAZ025 061
-loc2=Bradford KBFD PAZ005 047
-loc3=Du\\ Bois KDUJ PAZ017 061
-loc4=Erie KERI PAZ002 047
-loc5=Franklin KFKL PAZ008 061
-loc6=Harrisburg KCXY PAZ057 062
-loc7=Johnstown KJST PAZ024 pit
-loc8=Lancaster KLNS PAZ066 phl
-loc9=Latrobe KLBE PAZ030 pit
-loc10=Middletown KMDT PAZ057 062
-loc11=Muir KMUI PAZ058 062
-loc12=Northeast\\ Philadelphia KPNE PAZ071 phl
-loc13=Philadelphia KPHL PAZ071 phl
-loc14=Philipsburg KPSB PAZ019 061
-loc15=Pittsburgh KPIT PAZ021 pit
-loc16=Pittsburgh-West\\ Mifflin KAGC PAZ021 pit
-loc17=Reading KRDG PAZ060 phl
-loc18=Scranton KAVP PAZ047 062
-loc19=State\\ College KUNV PAZ019 061
-loc20=Wilkes\\ -\\ Barre KAVP PAZ047 062
-loc21=Williamsport KIPT PAZ046 062
-
-[US_CA]
-name=California
-loc0=Alturas KS11 CAZ012 ---
-loc1=Arcata KACV CAZ001 ---
-loc2=Avalon KAVX ------ ---
-loc3=Bakersfield KBFL CAZ021 ---
-loc4=Beaumont KBUO CAZ056 ---
-loc5=Bicycle\\ Lake KBYS ------ ---
-loc6=Bishop KBIH CAZ026 ---
-loc7=Blue\\ Canyon KBLU ------ ---
-loc8=Blythe KBLH CAZ031 ---
-loc9=Burbank KBUR CAZ047 ---
-loc10=Camarillo KCMA CAZ040 ---
-loc11=Campo KCZZ CAZ058 ---
-loc12=Carlsbad KCRQ CAZ043 ---
-loc13=Chico KCIC CAZ016 ---
-loc14=China\\ Lake KNID CAZ028 ---
-loc15=Chino KCNO CAZ048 ---
-loc16=Concord KCCR CAZ007 ---
-loc17=Crescent\\ City KCEC CAZ001 ---
-loc18=Daggett KDAG CAZ028 ---
-loc19=Edwards\\ AFB KEDW CAZ025 ---
-loc20=El\\ Centro KNJK CAZ033 ---
-loc21=El\\ Monte KEMT CAZ047 ---
-loc22=Fairfield KSUU CAZ018 ---
-loc23=Fresno KFAT CAZ020 078
-loc24=Fresno-Chandler KFCH CAZ020 078
-loc25=Fullerton KFUL CAZ042 ---
-loc26=Hawthorne KHHR CAZ041 ---
-loc27=Hayward KHWD CAZ007 ---
-loc28=Imperial KIPL CAZ033 ---
-loc29=Imperial\\ Beach KNRS CAZ043 ---
-loc30=Inyokern KIYK CAZ025 ---
-loc31=La\\ Verne KPOC CAZ047 ---
-loc32=Lake\\ Tahoe KTVL CAZ072 ---
-loc33=Lancaster KWJF CAZ059 ---
-loc34=Lemoore KNLC CAZ021 ---
-loc35=Livermore KLVK CAZ007 ---
-loc36=Lompoc KLPC CAZ035 ---
-loc37=Long\\ Beach KLGB CAZ041 lax
-loc38=Los\\ Angeles KLAX CAZ041 lax
-loc39=Mammoth\\ Lakes KMMH CAZ073 ---
-loc40=Marysville KMYV CAZ016 ---
-loc41=Marysville-Beale\\ AFB KBAB CAZ016 ---
-loc42=McClellan KMCC ------ ---
-loc43=Merced KMCE CAZ020 ---
-loc44=Modesto KMOD CAZ019 ---
-loc45=Mojave KMHV CAZ024 ---
-loc46=Montague KSIY CAZ011 ---
-loc47=Monterey KMRY CAZ009 ---
-loc48=Mount\\ Shasta KMHS CAZ011 ---
-loc49=Mount\\ Wilson KMWS CAZ047 ---
-loc50=Mountain\\ View KNUQ CAZ006 sfo
-loc51=Napa KAPC CAZ064 ---
-loc52=Needles KEED CAZ029 ---
-loc53=Oakland KOAK CAZ007 sfo
-loc54=Oceanside KNFG CAZ043 ---
-loc55=Ontario KONT CAZ048 lax
-loc56=Oxnard KOXR CAZ040 ---
-loc57=Palm\\ Springs KPSP CAZ061 ---
-loc58=Palmdale KPMD CAZ054 ---
-loc59=Palo\\ Alto KPAO CAZ006 sfo
-loc60=Paso\\ Robles KPRB CAZ037 ---
-loc61=Point\\ Mugu KNTD ------ ---
-loc62=Point\\ Piedras\\ Blanca K87Q ------ ---
-loc63=Porterville KPTV CAZ021 ---
-loc64=Red\\ Bluff KRBL CAZ015 ---
-loc65=Redding KRDD CAZ013 ---
-loc66=Riverside KRAL CAZ048 ---
-loc67=Riverside/March\\ AFB KRIV CAZ061 ---
-loc68=Sacramento KSAC CAZ017 ---
-loc69=Sacramento-Woodland KSMF CAZ017 ---
-loc70=Salinas KSNS CAZ009 ---
-loc71=San\\ Carlos KSQL CAZ006 ---
-loc72=San\\ Diego KSAN CAZ043 san
-loc73=San\\ Diego-Santee KSEE CAZ050 san
-loc74=San\\ Diego-Brown KSDM CAZ050 san
-loc75=San\\ Diego-Miramar KNKX CAZ043 san
-loc76=San\\ Diego-Montgomery KMYF CAZ043 san
-loc77=San\\ Diego-North\\ Island KNZY ------ san
-loc78=San\\ Francisco KSFO CAZ006 sfo
-loc79=San\\ Jose-Santa\\ Clara KSJC CAZ008 sfo
-loc80=San\\ Luis\\ Obispo KSBP CAZ034 ---
-loc81=San\\ Nicholas\\ Island KNSI CAZ039 ---
-loc82=Sandberg KSDB ------ ---
-loc83=Santa\\ Ana KSNA CAZ042 lax
-loc84=Santa\\ Barbara KSBA CAZ039 lax
-loc85=Santa\\ Maria KSMX CAZ035 090
-loc86=Santa\\ Monica KSMO CAZ041 ---
-loc87=Santa\\ Rosa KSTS CAZ005 ---
-loc88=Shelter\\ Cove KO87 CAZ001 ---
-loc89=Stockton KSCK CAZ019 ---
-loc90=Tahoe\\ Valley KTVL ------ ---
-loc91=Torrance KTOA CAZ042 lax
-loc92=Truckee KTRK CAZ072 ---
-loc93=Twentynine\\ Palms KNXP CAZ028 ---
-loc94=Ukiah KUKI CAZ003 ---
-loc95=Van\\ Nuys KVNY CAZ047 ---
-loc96=Vandenberg\\ AFB KVBG CAZ039 ---
-loc97=Vandenberg\\ Range KVBG CAZ039 ---
-loc98=Visalia KVIS CAZ021 ---
-
-[US_AL]
-name=Alabama
-loc0=Anniston KANB ALZ019 ---
-loc1=Auburn KAUO ALZ047 ---
-loc2=Birmingham KBHM ALZ024 019
-loc3=Decatur KDCU ------ ---
-loc4=Dothan KDHN ALZ066 ---
-loc5=Evergreen KGZH ------ ---
-loc6=Gadsden KGAD ALZ018 ---
-loc7=Huntsville KHSV ALZ006 ---
-loc8=Mobile\\ Regional\\ Airport KMOB ALZ061 ---
-loc9=Mobile\\ Downtown KBFM ALZ061 ---
-loc10=Montgomery KMGM ALZ044 109
-loc11=Montgomery-Maxwell\\ AFB KMXF ALZ044 109
-loc12=Muscle\\ Shoals KMSL ALZ002 ---
-loc13=Ozark KOZR ALZ066 ---
-loc14=Tuscaloosa KTCL ALZ023 ---
-
-[US_AZ]
-name=Arizona
-loc0=Casa\\ Granda KCGZ AZZ028 ---
-loc1=Chandler KIWA AZZ015 ---
-loc2=Douglas KDUG AZZ030 ---
-loc3=Flagstaff KFLG AZZ015 092
-loc4=Fort\\ Huachuca KFHU AZZ035 ---
-loc5=Gila\\ Bend KGBN AZZ027 ---
-loc6=Grand\\ Canyon KGCN AZZ006 ---
-loc7=Kingman KIGM AZZ003 ---
-loc8=Mesa-Falcon\\ Field KFFZ AZZ023 ---
-loc9=Nogales K13A AZZ034 ---
-loc10=Page KPGA AZZ005 ---
-loc11=Payson K0E4 AZZ018 ---
-loc12=Phoenix KPHX AZZ023 phx
-loc13=Phoenix-Deer\\ Valley KDVT AZZ023 phx
-loc14=Phoenix-Goodyear KGYR AZZ023 phx
-loc15=Phoenix-Luke\\ AFB KLUF AZZ023 phx
-loc16=Prescott KPRC AZZ008 ---
-loc17=Safford-Municipal\\ Airport KSAD AZZ030 ---
-loc18=Scottsdale KSDL AZZ023 ---
-loc19=Show\\ Low KSOW AZZ017 ---
-loc20=Tucson KTUS AZZ033 103
-loc21=Tucson-Davis\\ AFB KDMA AZZ033 103
-loc22=Winslow KINW AZZ013 ---
-loc23=Yuma\\ MCAS KNYL AZZ025 ---
-
-[US_CO]
-name=Colorado
-loc0=Air\\ Force KAFF COZ071 ---
-loc1=Akron KAKO COZ049 ---
-loc2=Alamosa KALS COZ063 ---
-loc3=Aspen KASE COZ010 068
-loc4=Colorado\\ Springs KCOS COZ071 ---
-loc5=Cortez KCEZ COZ021 ---
-loc6=Craig KCAG COZ002 ---
-loc7=Denver KDEN COZ040 den
-loc8=Denver-Aurora KAPA COZ040 den
-loc9=Denver-Broomfield KBKF COZ040 den
-loc10=Denver-Cherry\\ Knolls KBJC COZ040 den
-loc11=Durango KDRO COZ022 ---
-loc12=Durango\\ Awrs K4V5 COZ022 ---
-loc13=Eagle KEGE COZ010 ---
-loc14=Fort\\ Carson KFCS COZ071 ---
-loc15=Fort\\ Collins KFCL COZ035 ---
-loc16=Fort\\ Collins/Lovel KFNL COZ035 ---
-loc17=Grand\\ Junction KGJT COZ006 ---
-loc18=Greeley KGXY COZ043 ---
-loc19=Gunnison KGUC COZ012 ---
-loc20=Gunnison\\ (2) K2V9 COZ012 ---
-loc21=Hayden KHDN COZ005 ---
-loc22=La\\ Junta KLHX COZ076 ---
-loc23=Lamar K4LJ COZ080 ---
-loc24=Leadville KLXV COZ012 ---
-loc25=Limon KLIC COZ047 ---
-loc26=Montrose KMTJ COZ017 ---
-loc27=Montrose\\ (2) K6V8 COZ017 ---
-loc28=Pueblo KPUB COZ073 ---
-loc29=Rifle K1V1 COZ003 ---
-loc30=Salida KS29 COZ069 ---
-loc31=Salida-Harriet K0V2 COZ069 ---
-loc32=Steamboat\\ Springs KSBS COZ005 ---
-loc33=Trinidad KTAD COZ077 ---
-loc34=Winter\\ Park KC96 COZ033 ---
-
-[US_CT]
-name=Connecticut
-loc0=Bridgeport KBDR CTZ009 hfd
-loc1=Danbury KDXR CTZ009 ---
-loc2=Groton KGON CTZ012 hfd
-loc3=Hartford KHFD CTZ002 hfd
-loc4=New\\ Haven KHVN CTZ010 ---
-loc5=Oxford KOXC CTZ010 ---
-loc6=Windsor\\ Locks KBDL CTZ002 ---
-
-[US_DE]
-name=Delaware
-loc0=Dover KDOV DEZ002 076
-loc1=Wilmington KILG DEZ001 076
-
-[US_FL]
-name=Florida
-loc0=Apalachicola KAQQ FLZ015 ---
-loc1=Bartow KBOW ------ ---
-loc2=Brooksville KBKV FLZ048 ---
-loc3=Cecil\\ NAS KNZC FLZ025 ---
-loc4=Cocoa\\ Beach KCOF FLZ047 ---
-loc5=Crestview KCEW FLZ006 ---
-loc6=Cross\\ City KCTY FLZ034 ---
-loc7=Daytona\\ Beach KDAB FLZ041 ---
-loc8=Destin KDTS ------ ---
-loc9=Eglin KEGI FLZ006 ---
-loc10=Fort\\ Lauderdale\\ (International) KFLL FLZ072 ---
-loc11=Fort\\ Lauderdale KFXE FLZ072 ---
-loc12=Fort\\ Myers\\ (Page\\ Field) KFMY FLZ065 ---
-loc13=Fort\\ Myers\\ (Southwest\\ Florida\\ International) KRSW FLZ065 ---
-loc14=Gainesville KGNV FLZ036 ---
-loc15=Homestead\\ AFB KHST FLZ074 ---
-loc16=Hurlburt KHRT ------ ---
-loc17=Jacksonville KJAX FLZ025 ---
-loc18=Jacksonville\\ NAS KNIP FLZ025 ---
-loc19=Jacksonville-Craig\\ Airport KCRG FLZ025 ---
-loc20=Key\\ West KEYW FLZ075 ---
-loc21=Key\\ West\\ NAS KNQX FLZ075 ---
-loc22=Lakeland KLAL FLZ052 ---
-loc23=Leesburg KLEE ------ ---
-loc24=Marathon KMTH FLZ075 ---
-loc25=Marianna KMAI FLZ011 ---
-loc26=Mayport KNRB FLZ025 ---
-loc27=Melbourne KMLB FLZ047 ---
-loc28=Miami KMIA FLZ074 mia
-loc29=Miami-Kendall KTMB FLZ074 mia
-loc30=Miami-Opa\\ Locka KOPF FLZ074 mia
-loc31=Milton KNSE FLZ004 ---
-loc32=Nasa\\ Shuttle KTTS ------ ---
-loc33=Naples KAPF FLZ069 ---
-loc34=New\\ Port\\ Richey KRRF FLZ051 ---
-loc35=Ocala KOCF FLZ040 ---
-loc36=Orlando KORL FLZ045 ---
-loc37=Orlando\\ (Orlando\\ International) KMCO FLZ045 ---
-loc38=Panama\\ City KPFN FLZ012 ---
-loc39=Pensacola KPNS FLZ002 ---
-loc40=Pensacola\\ NAS KNPA FLZ002 ---
-loc41=Perry-Foley K40J ------ ---
-loc42=Pompano\\ Beach KPMP ------ ---
-loc43=Punta\\ Gorda KPGD ------ ---
-loc44=Sanford KSFB FLZ046 ---
-loc45=Sarasota KSRQ FLZ060 ---
-loc46=St\\ Petersburg KSPG FLZ050 ---
-loc47=St\\ Petersburg\\ /\\ Clearwater KPIE FLZ050 ---
-loc48=Tallahassee KTLH FLZ017 ---
-loc49=Tampa KTPA FLZ051 ---
-loc50=Tampa-Macdill\\ AFB KMCF FLZ051 ---
-loc51=Titusville KTIX FLZ047 ---
-loc52=Tyndall\\ AFB KPAM ------ ---
-loc53=Valparaiso KVPS FLZ006 ---
-loc54=Valparaiso-Eglin\\ AFB KEGI FLZ006 ---
-loc55=Vero\\ Beach KVRB FLZ054 ---
-loc56=West\\ Palm\\ Beach KPBI FLZ068 ---
-loc57=Winter\\ Haven KGIF ------ ---
-
-[US_GA]
-name=Georgia
-loc0=Albany KABY GAZ125 ---
-loc1=Alma KAMG GAZ134 ---
-loc2=Athens KAHN GAZ036 atl
-loc3=Atlanta KATL GAZ033 atl
-loc4=Augusta KAGS GAZ065 ---
-loc5=Brunswick KSSI GAZ154 ---
-loc6=Columbus KCSG GAZ089 ---
-loc7=Columbus-Fort\\ Benning KLSF GAZ089 ---
-loc8=Dekalb/Peachtree KPDK ------ ---
-loc9=Hinesville KLHW ------ ---
-loc10=Fort\\ Benning KLSF GAZ090 ---
-loc11=Fort\\ Stewart KLHW GAZ138 ---
-loc12=Macon KMCN GAZ082 ---
-loc13=Marietta KMGE GAZ032 ---
-loc14=Moultrie KMGR ------ ---
-loc15=Rome-Russell KRMG GAZ019 atl
-loc16=Savannah KSAV GAZ119 ---
-loc17=Savannah-Hunter\\ AAF KSVN GAZ119 ---
-loc18=St\\ Simon's\\ Island KSSI GAZ154 ---
-loc19=Valdosta KVLD GAZ160 ---
-loc20=Valdosta-Moody\\ AFB KVAD GAZ160 ---
-loc21=Warner\\ Robins KWRB GAZ095 ---
-loc22=West\\ Atlanta KFTY GAZ033 ---
-loc23=Waycross KAYS GAZ151 ---
-
-[US_HI]
-name=Hawaii
-loc0=Barbers\\ Point PHNA HIZ002 ---
-loc1=Barking\\ Sand PHBK ------ ---
-loc2=Bradshaw\\ Field PHSF ------ ---
-loc3=Hilo PHTO HIZ004 ---
-loc4=Honolulu PHNL HIZ002 ---
-loc5=Kahului PHOG HIZ003 ---
-loc6=Kailua-Kona PHKO HIZ002 ---
-loc7=Kaneohe PHNG HIZ002 ---
-loc8=Lahaina PHJH HIZ003 ---
-loc9=Lanai PHNY HIZ003 ---
-loc10=Lihue PHLI HIZ001 ---
-loc11=Molokai PHMK HIZ005 ---
-loc12=Oahu PHHI HIZ002 ---
-
-[US_IL]
-name=Illinois
-loc0=Alton KALN ILZ100 ---
-loc1=Aurora KARR ILZ013 ---
-loc2=Belleville KBLV ILZ101 ---
-loc3=Bloomington KBMI ILZ038 ---
-loc4=Cairo KCIR ILZ092 ---
-loc5=Carbondale KMDH ILZ084 ---
-loc6=Champaign KCMI ILZ045 059
-loc7=Chicago-DuPage KDPA ILZ014 ord
-loc8=Chicago-O'Hare KORD ILZ013 ord
-loc9=Chicago-Lakefront KCGX ILZ014 ord
-loc10=Chicago-Midway KMDW ILZ014 ord
-loc11=Danville KDNV ILZ046 ---
-loc12=Decatur KDEC ILZ053 ---
-loc13=East\\ St\\ Louis KCPS ILZ101 ---
-loc14=Galesburg KGBG ILZ027 ---
-loc15=Marion KMWA ILZ085 ---
-loc16=Marseilles KMMO ILZ019 ---
-loc17=Mattoon KMTO ILZ056 ---
-loc18=Moline-Quad\\ Cities KMLI ILZ015 ---
-loc19=Mount\\ Vernon KMVN ILZ075 ---
-loc20=Peoria KPIA ILZ029 ---
-loc21=Quincy KUIN ILZ095 ---
-loc22=Rockford KRFD ILZ003 ---
-loc23=Salem KSLO ILZ070 ---
-loc24=Springfield KSPI ILZ051 ---
-
-[US_IN]
-name=Indiana
-loc0=Bloomington KBMG INZ062 ---
-loc1=Elkhart KEKM INZ005 ---
-loc2=Evansville KEVV INZ086 ---
-loc3=Fort\\ Wayne KFWA INZ018 ---
-loc4=Gary KGYY INZ001 ---
-loc5=Indianapolis KIND INZ047 ---
-loc6=Lafayette KLAF INZ029 ---
-loc7=Marion KMZZ ------ ---
-loc8=Muncie KMIE INZ041 ---
-loc9=Peru KGUS INZ023 ---
-loc10=South\\ Bend KSBN INZ004 ---
-loc11=Terre\\ Haute KHUF INZ051 ---
-
-[US_MD]
-name=Maryland
-loc0=Aberdeen KAPG ------ ---
-loc1=Andrews\\ AFB KADW MDZ013 ---
-loc2=Baltimore KMTN MDZ011 dca
-loc3=Baltimore-Glen\\ Burnie KBWI MDZ014 dca
-loc4=Cumberland KCBE ------ ---
-loc5=Fort\\ Meade KFME MDZ014 ---
-loc6=Hagerstown KHGR MDZ003 ---
-loc7=Oakland K2G4 ------ 075
-loc8=Patuxent\\ River KNHK MDZ014 ---
-loc9=Salisbury KSBY MDZ022 ---
-
-[US_MI]
-name=Michigan
-loc0=Ann\\ Arbor KARB MIZ075 dtw
-loc1=Alpena KAPN MIZ024 ---
-loc2=Battle\\ Creek KBTL MIZ073 ---
-loc3=Benton\\ Harbor KBEH ------ ---
-loc4=Chippewa\\ County KCIU MIZ008 ---
-loc5=Copper\\ Harbor KP59 MIZ003 ---
-loc6=Detroit KDET MIZ076 dtw
-loc7=Detroit-Taylor KDTW MIZ076 dtw
-loc8=Detroit/Ypsilanti KYIP MIZ075 dtw
-loc9=Escanaba KESC MIZ013 ---
-loc10=Flint KFNT MIZ061 dtw
-loc11=Grand\\ Rapids KGRR MIZ057 ---
-loc12=Hancock KCMX MIZ003 ---
-loc13=Harbor\\ Beach KP58 MIZ049 ---
-loc14=Houghton\\ Lake KHTL MIZ034 ---
-loc15=Iron\\ Mountain KIMT MIZ011 ---
-loc16=Ironwood KIWD MIZ009 ---
-loc17=Jackson KJXN MIZ074 dtw
-loc18=Kalamazoo KAZO MIZ072 045
-loc19=Lansing KLAN MIZ066 ---
-loc20=Manistee KMBL MIZ031 ---
-loc21=Marquette KMQT MIZ005 ---
-loc22=Menominee KMNM MIZ012 ---
-loc23=Mount\\ Clemens KMTC MIZ070 ---
-loc24=Muskegon KMKG MIZ050 ---
-loc25=Oscoda KOSC MIZ036 ---
-loc26=Pellston KPLN MIZ016 ---
-loc27=Pontiac KPTK MIZ069 ---
-loc28=Saginaw KMBS MIZ053 ---
-loc29=Sault\\ Ste\\ Marie KSSM MIZ008 ---
-loc30=Sawyer\\ AFB KSAW MIZ077 ---
-loc31=Seul\\ Choix\\ Pt KP75 ------ ---
-loc32=Traverse\\ City KTVC MIZ020 ---
-loc33=Ypsilanti KYIP MIZ075 dtw
-
-[US_MN]
-name=Minnesota
-loc0=Alexandria KAXN MNZ041 ---
-loc1=Bemidji KBJI MNZ009 ---
-loc2=Brainerd KBRD MNZ034 ---
-loc3=Detroit\\ Lakes KDTL MNZ027 ---
-loc4=Duluth KDLH MNZ019 ---
-loc5=Ely KELO MNZ019 ---
-loc6=Fairmont KFRM MNZ091 ---
-loc7=Fergus\\ Falls KFFM MNZ031 ---
-loc8=Grand\\ Marais KP61 MNZ021 ---
-loc9=Grand\\ Rapids KGPZ MNZ026 ---
-loc10=Hibbing KHIB MNZ019 ---
-loc11=International\\ Falls KINL MNZ010 ---
-loc12=Litchfield KY69 MNZ058 ---
-loc13=Mankato KMKT MNZ083 ---
-loc14=Marshall KMML MNZ072 ---
-loc15=Minneapolis KMSP MNZ060 msp
-loc16=Minneapolis\\ [2] KFCM MNZ060 msp
-loc17=Minneapolis\\ [3] KMIC MNZ060 msp
-loc18=Pequot\\ Lakes KP39 MNZ034 ---
-loc19=Redwood\\ Falls KRWF MNZ073 ---
-loc20=Rochester KRST MNZ087 030
-loc21=St\\ Cloud KSTC MNZ051 ---
-loc22=St\\ Paul KSTP MNZ062 ---
-loc23=Thief\\ River\\ Falls KTVF MNZ013 ---
-loc24=Warroad KD45 MNZ005 ---
-loc25=Worthington KOTG MNZ089 ---
-
-[US_NV]
-name=Nevada
-loc0=Austin KU31 NVZ012 ---
-loc1=Battle\\ Mountain KBAM NVZ012 ---
-loc2=Caliente KP38 NVZ015 ---
-loc3=Desert\\ Rock KDRA ------ ---
-loc4=Elko KEKO NVZ008 ---
-loc5=Ely KELY NVZ011 ---
-loc6=Eureka KP68 NVZ012 ---
-loc7=Fallon KNFL NVZ004 ---
-loc8=Hawthorne KHTH NVZ001 ---
-loc9=Indian\\ Springs KL63 NVZ017 ---
-loc10=Las\\ Vegas KLAS NVZ020 079
-loc11=N\\ Las\\ Vegas KLSV NVZ020 079
-loc12=Lovelock KLOL NVZ004 ---
-loc13=Owyhee KOWY NVZ007 ---
-loc14=Reno KRNO NVZ003 065
-loc15=Tonopah KTPH NVZ014 ---
-loc16=Winnemucca KWMC NVZ006 ---
-
-[US_NJ]
-name=New Jersey
-loc0=Atlantic\\ City KACY NJZ022 ---
-loc1=Belmar-Farmingdale KBLM NJZ013 ---
-loc2=Caldwell KCDW NJZ005 ---
-loc3=Lakehurst KNEL ------ ---
-loc4=Millville KMIV NJZ021 ---
-loc5=Morristown KMMU NJZ008 ---
-loc6=Mount\\ Holly KVAY ------ ---
-loc7=Newark KEWR NJZ005 ---
-loc8=Teterboro KTEB NJZ003 ---
-loc9=Trenton KTTN NJZ015 ---
-loc10=Wildwood KWWD NJZ024 ---
-loc11=Wrightstown\\ /\\ Mcguire\\ AFB KWRI NJZ019 ---
-
-[US_NC]
-name=North Carolina
-loc0=Asheville KAVL NCZ053 ---
-loc1=Cape\\ Hatteras KHAT NCZ047 ---
-loc2=Charlotte KCLT NCZ071 100
-loc3=Cherry\\ Point KNKT ------ ---
-loc4=Elizabeth\\ City KECG NCZ016 ---
-loc5=Fayetteville KFAY NCZ088 100
-loc6=Fort\\ Bragg KFBG NCZ088 ---
-loc7=Goldsboro KGSB NCZ078 ---
-loc8=Greensboro KGSO NCZ022 rdu
-loc9=Hickory KHKY NCZ056 ---
-loc10=Hoffman KHFF ------ ---
-loc11=Hot\\ Springs KHSS NCZ048 ---
-loc12=Jacksonville KOAJ NCZ098 ---
-loc13=Kinston KISO NCZ091 ---
-loc14=New\\ Bern KEWN NCZ093 ---
-loc15=New\\ River KNCA NCZ098 ---
-loc16=Pope\\ AFB KPOB NCZ088 ---
-loc17=Raleigh-Durham KRDU NCZ041 rdu
-loc18=Rocky\\ Mount KRWI NCZ028 rdu
-loc19=Stumpy\\ Point K2DP ------ ---
-loc20=Wilmington KILM NCZ101 ---
-loc21=Winston-Salem KINT NCZ021 ---
-
-[US_OH]
-name=Ohio
-loc0=Akron KCAK OHZ021 ---
-loc1=Cincinnati KLUK OHZ077 074
-loc2=Cleveland KCLE OHZ011 cle
-loc3=Cleveland-Lakefront KBKL OHZ011 cle
-loc4=Cleveland/Cuyahoga KCGF OHZ011 cle
-loc5=Columbus-Gahanna KCMH OHZ055 ---
-loc6=Columbus-OSU KOSU OHZ055 ---
-loc7=Dayton KDAY OHZ061 074
-loc8=Dayton-Fairborn KFFO OHZ061 ---
-loc9=Dayton-South\\ Airport KMGY OHZ061 ---
-loc10=Findlay KFDY OHZ017 ---
-loc11=Hamilton KHAO OHZ070 ---
-loc12=Lancaster KLHQ OHZ067 ---
-loc13=Mansfield KMFD OHZ029 ---
-loc14=Rickenbacker KLCK OHZ070 ---
-loc15=Toledo KTOL OHZ003 ---
-loc16=Willoughby KLNN OHZ012 ---
-loc17=Wilmington KILN OHZ072 ---
-loc18=Wooster KBJJ OHZ031 ---
-loc19=Youngstown KYNG OHZ033 ---
-loc20=Zanesville KZZV OHZ057 ---
-
-[US_OR]
-name=Oregon
-loc0=Astoria KAST ORZ001 ---
-loc1=Aurora K3S2 ORZ005 ---
-loc2=Baker\\ City KBKE ORZ020 ---
-loc3=Brookings K4BK ORZ003 ---
-loc4=Burns KBNO ORZ022 ---
-loc5=Cascade KCZK ORZ015 ---
-loc6=Eugene KEUG ORZ006 ---
-loc7=Hillsboro KHIO ORZ004 ---
-loc8=Klamath\\ Falls KLMT ORZ012 ---
-loc9=Lakeview K4LW ORZ015 ---
-loc10=Meacham KMEH ORZ017 ---
-loc11=Medford KMFR ORZ008 ---
-loc12=Newport KONP ORZ002 ---
-loc13=North\\ Bend KOTH ORZ003 ---
-loc14=Ontario KONO ORZ021 ---
-loc15=Pendleton KPDT ORZ017 ---
-loc16=Portland KPDX ORZ004 ---
-loc17=Redmond KRDM ORZ014 ---
-loc18=Roseburg KRBG ORZ007 ---
-loc19=Salem KSLE ORZ005 ---
-loc20=Sexton\\ Summit KSXT ORZ008 ---
-loc21=The\\ Dalles KDLS ORZ010 ---
-loc22=Troutdale KTTD ORZ004 ---
-
-[US_RI]
-name=Rhode Island
-loc0=Block\\ Island KBID RIZ006 ---
-loc1=North\\ Kingstown KOQU RIZ006 ---
-loc2=Providence KPVD RIZ002 bos
-
-[US_SC]
-name=South Carolina
-loc0=Anderson KAND SCZ010 099
-loc1=Beaufort KNBC SCZ048 ---
-loc2=Charleston KCHS SCZ050 ---
-loc3=Columbia KCAE SCZ028 100
-loc4=Columbia-McEntire KMMT SCZ028 100
-loc5=Florence KFLO SCZ032 ---
-loc6=Greenville KGMU SCZ006 099
-loc7=Greenville-Spartanburg KGSP SCZ007 099
-loc8=Myrtle\\ Beach KMYR SCZ034 ---
-loc9=N\\ Myrtle\\ Beach KCRE SCZ034 ---
-loc10=Sumter KSSC SCZ031 ---
-loc11=Sumter\\ (2) K2PJ SCZ031 ---
-
-[US_TN]
-name=Tennessee
-loc0=Bristol KTRI TNZ017 ---
-loc1=Chattanooga KCHA TNZ099 ---
-loc2=Crossville KCSV TNZ066 ---
-loc3=Dyersburg KDYR TNZ019 ---
-loc4=Jackson KMKL TNZ052 ---
-loc5=Knoxville KTYS TNZ069 087
-loc6=Knoxville-Downtown KDKX TNZ069 087
-loc7=Memphis KMEM TNZ088 097
-loc8=Memphis-NAS KNQA TNZ088 097
-loc9=Nashville KBNA TNZ027 ---
-loc10=Smyrna KMQY TNZ062 ---
-
-[US_TX]
-name=Texas
-loc0=Abilene KABI TXZ127 ---
-loc1=Alice KALI TXZ241 ---
-loc2=Amarillo KAMA TXZ017 ---
-loc3=Angleton KLBX ------ ---
-loc4=Arlington KF54 TXZ119 ---
-loc5=Austin KAUS TXZ192 113
-loc6=Beaumont-Port\\ Arthur KBPT TXZ215 ---
-loc7=Bergstrom\\ AFB KBSM TXZ192 ---
-loc8=Borger KBGD TXZ008 ---
-loc9=Brownsville KBRO TXZ255 ---
-loc10=Burnet KBMQ ------ ---
-loc11=Childress KCDS TXZ026 ---
-loc12=College\\ Station KCLL TXZ196 ---
-loc13=Conroe KCXO ------ ---
-loc14=Corpus\\ Christi KCRP TXZ243 ---
-loc15=Corpus\\ Christi\\ NAS KNGP TXZ243 ---
-loc16=Corsicana KCRS TXZ146 ---
-loc17=Cotulla KCOT TXZ229 119
-loc18=Dalhart KDHT TXZ001 ---
-loc19=Dallas-Addison KADS TXZ119 ---
-loc20=Dallas-Fort\\ Worth KDFW TXZ119 ---
-loc21=Dallas-Love\\ Field KDAL TXZ119 ---
-loc22=Dallas-Redbird KRBD TXZ119 ---
-loc23=Del\\ Rio KDRT TXZ183 ---
-loc24=Denton KDTO ------ ---
-loc25=El\\ Paso KELP TXZ055 ---
-loc26=Fort\\ Stockton KFST TXZ075 ---
-loc27=Fort\\ Worth-Meacham KFTW TXZ118 ---
-loc28=Fort\\ Worth\\ NAS KNFW TXZ118 ---
-loc29=Fort\\ Worth-Alliance KAFW TXZ118 ---
-loc30=Galveston KGLS TXZ238 ---
-loc31=Georgetown KGTU TXZ173 ---
-loc32=Greenville KGVT ------ ---
-loc33=Guadalupe\\ Pass KGDP TXZ234 ---
-loc34=Harlingen KHRL TXZ255 ---
-loc35=Hondo KHDO TXZ204 ---
-loc36=Houston-Bush KIAH TXZ213 hou
-loc37=Houston-Hooks KDWH TXZ213 hou
-loc38=Houston-Ellington\\ Field KEFD TXZ213 hou
-loc39=Houston-Clover KT02 TXZ213 hou
-loc40=Houston-Hobby KHOU TXZ213 hou
-loc41=Huntsville KUTS ------ ---
-loc42=Junction KJCT TXZ169 ---
-loc43=Killeen KILE TXZ158 113
-loc44=Killeen-Ft\\ Hood KHLR TXZ158 113
-loc45=Killeen-Gray\\ AAF KGRK TXZ158 113
-loc46=Kingsville KNQI TXZ242 ---
-loc47=Laredo KLRD TXZ239 ---
-loc48=Laughlin KDLF ------ ---
-loc49=Longview KGGG TXZ138 ---
-loc50=Lubbock KLBB TXZ035 ---
-loc51=Lufkin KLFK TXZ165 ---
-loc52=Mc\\ Gregor KPWG ------ ---
-loc53=McAllen KMFE TXZ253 ---
-loc54=Midland KMAF TXZ062 ---
-loc55=Mineral\\ Wells KMWL TXZ117 ---
-loc56=Nacogdoches KOCH TXZ152 ---
-loc57=New\\ Braunfels K3R5 TXZ207 ---
-loc58=Palacios KPSX TXZ236 ---
-loc59=Paris KPRX TXZ095 ---
-loc60=Randolph\\ AFB KRND ------ ---
-loc61=Rockport KRKP TXZ245 ---
-loc62=Sabine\\ Pass KRPE ------ ---
-loc63=San\\ Angelo KSJT TXZ072 ---
-loc64=San\\ Antonio KSAT TXZ205 119
-loc65=San\\ Antonio-Kelly\\ AFB KSKF TXZ205 119
-loc66=San\\ Antonio-Stinson KSSF TXZ205 119
-loc67=Sanderson KP07 TXZ082 ---
-loc68=Sherman-Denison KF39 TXZ093 ---
-loc69=Temple KTPL TXZ158 ---
-loc70=Terrell KTRL ------ ---
-loc71=Tyler KTYR TXZ136 ---
-loc72=Victoria KVCT TXZ234 ---
-loc73=Waco KACT TXZ159 ---
-loc74=Wichita\\ Falls KSPS TXZ086 ---
-loc75=Wink KINK TXZ060 ---
-
-[US_VA]
-name=Virginia
-loc0=Abingdon KVJI VAZ008 ---
-loc1=Ashland KOFP VAZ063 ---
-loc2=Charlottesville KCHO VAZ037 ---
-loc3=Danville KDAN VAZ044 ---
-loc4=Dublin KPSK VAZ013 ---
-loc5=Farmville KFVX VAZ061 ---
-loc6=Fort\\ Belvoir KDAA VAZ053 ---
-loc7=Fort\\ Eustis KFAF ------ ---
-loc8=Franklin KFKN VAZ092 ---
-loc9=Galax-Hillsville KHLX VAZ016 ---
-loc10=Hampton KLFI VAZ094 ---
-loc11=Hot\\ Springs KHSP VAZ020 ---
-loc12=Langley\\ AFB KLFI VAZ094 ---
-loc13=Leesburg KJYO VAZ042 ---
-loc14=Lynchburg KLYH VAZ045 ---
-loc15=Manassas KHEF VAZ052 ---
-loc16=Marion-Wytheville KMKJ VAZ009 ---
-loc17=Martinsville KMTV VAZ043 ---
-loc18=Melfa KMFV VAZ099 ---
-loc19=Newport\\ News KPHF VAZ093 ---
-loc20=Norfolk KORF VAZ093 089
-loc21=Norfolk\\ NAS KNGU VAZ093 089
-loc22=Petersburg KPTB VAZ081 ---
-loc23=Quantico KNYG VAZ052 ---
-loc24=Richmond KRIC VAZ071 089
-loc25=Roanoke KROA VAZ022 ---
-loc26=Shannon KEZF ------ ---
-loc27=Staunton KSHD VAZ025 ---
-loc28=Virginia\\ Beach KNTU VAZ098 ---
-loc29=Virginia\\ Tech\\ Airport KBCB VAZ014 ---
-loc30=Wakefield KAKQ VAZ088 ---
-loc31=Wallops\\ Island KWAL ------ ---
-loc32=Waynesboro KSHD VAZ025 ---
-loc33=Winchester KOKV VAZ028 ---
-loc34=Wise KLNP VAZ002 ---
-
-[US_WV]
-name=West Virginia
-loc0=Beckley KBKW WVZ035 ---
-loc1=Bluefield KBLF WVZ042 ---
-loc2=Charleston KCRW WVZ015 074
-loc3=Clarksburg KCKB WVZ031 ---
-loc4=Elkins KEKN WVZ047 ---
-loc5=Huntington KHTS WVZ006 ---
-loc6=Lewisburg KLWB WVZ045 ---
-loc7=Martinsburg KMRB WVZ052 ---
-loc8=Morgantown KMGW WVZ022 075
-loc9=Parkersburg KPKB WVZ009 ---
-loc10=Wheeling KHLG WVZ004 ---
-loc11=White\\ Sulphur KSSU WVZ045 ---
-
-[US_WI]
-name=Wisconsin
-loc0=Antigo KAIG WIZ019 ---
-loc1=Appleton KATW WIZ038 ---
-loc2=Eau\\ Claire KEAU WIZ028 ---
-loc3=Fond\\ Du\\ Lac KFLD WIZ051 ---
-loc4=Green\\ Bay KGRB WIZ039 ---
-loc5=Hayward KHYR WIZ008 ---
-loc6=Janesville KJVL WIZ069 ---
-loc7=Kenosha KENW WIZ072 ---
-loc8=La\\ Crosse KLSE WIZ041 ---
-loc9=Lone\\ Rock KLNR WIZ055 ---
-loc10=Madison KMSN WIZ063 045
-loc11=Manitowoc KMTW WIZ050 ---
-loc12=Marshfield KMFI WIZ035 ---
-loc13=Milwaukee KMKE WIZ066 045
-loc14=Milwaukee-Timmerman KMWC WIZ066 045
-loc15=Minocqua KARV WIZ010 ---
-loc16=Mosinee KCWA WIZ030 ---
-loc17=Oshkosh KOSH WIZ048 ---
-loc18=Phillips KPBH WIZ009 ---
-loc19=Rhinelander KRHI WIZ010 ---
-loc20=Sheboygan KSBM WIZ052 045
-loc21=Sturgeon\\ Bay KSUE WIZ022 ---
-loc22=Superior KSUW WIZ001 ---
-loc23=Volk\\ Field KVOK ------ ---
-loc24=Waukesha KUES WIZ065 ---
-loc25=Wausau KAUW WIZ030 ---
-loc26=Wisconsin\\ Rapids KISW WIZ035 ---
-
-
-[US_MA]
-name=Massachusetts
-loc0=Ashburnam K9B4 ------ ---
-loc1=Ashfield K2B5 ------ ---
-loc2=Bedford KBED MAZ005 ---
-loc3=Beverly KBVY MAZ007 ---
-loc4=Boston KBOS MAZ015 bos
-loc5=Chatham KCQX MAZ022 bos
-loc6=Chicopee\\ Falls KCEF ------ ---
-loc7=Falmouth-Otis\\ AFB KFMH MAZ022 ---
-loc8=Fitchburg KFIT ------ ---
-loc9=Hyannis KHYA MAZ022 ---
-loc10=Lawrence KLWM MAZ007 ---
-loc11=Marthas\\ Vineyard KMVY MAZ023 ---
-loc12=Nantucket KACK MAZ024 ---
-loc13=New\\ Bedford KEWB MAZ017 ---
-loc14=North\\ Adams K2B6 MAZ001 ---
-loc15=Norwood KOWD MAZ013 ---
-loc16=Orange KORE ------ ---
-loc17=Plymouth KPYM MAZ018 ---
-loc18=Provincetown KPVC ------ ---
-loc19=Taunton K9B0 ------ ---
-loc20=Westfield KBAF MAZ011 ---
-loc21=Worcester KORH MAZ012 bos
-
-[US_NY]
-name=New York
-loc0=Albany KALB NYZ052 048
-loc1=Binghamton KBGM NYZ056 ---
-loc2=Buffalo KBUF NYZ010 047
-loc3=Elmira KELM NYZ024 ---
-loc4=Farmingdale KFRG NYZ077 ---
-loc5=Fort\\ Drum KGTB NYZ007 ---
-loc6=Glens\\ Falls KGFL NYZ042 ---
-loc7=Griffiss\\ AFB KRME ------ ---
-loc8=Islip KISP NYZ080 ---
-loc9=Ithaca KITH NYZ025 048
-loc10=Jamestown KJHW NYZ019 047
-loc11=Massena KMSS NYZ026 ---
-loc12=Montgomery KMGJ NYZ067 ---
-loc13=Monticello KMSV NYZ062 ---
-loc14=New\\ York-JFK\\ Arpt KJFK NYZ076 lga
-loc15=New\\ York-La\\ Guardia KLGA NYZ076 lga
-loc16=Newburgh KSWF NYZ067 ---
-loc17=Niagara\\ Falls KIAG NYZ001 047
-loc18=Ogdensburg KOGS NYZ026 ---
-loc19=Penn\\ Yan KPEO ------ ---
-loc20=Plattsburg KPBG NYZ031 ---
-loc21=Poughkeepsie KPOU NYZ065 ---
-loc22=Rochester KROC NYZ003 047
-loc23=Saranac\\ Lake KSLK NYZ027 ---
-loc24=Schenectady KSCH NYZ049 ---
-loc25=Syracuse KSYR NYZ018 048
-loc26=Utica KUCA NYZ037 ---
-loc27=Watertown KART NYZ007 ---
-loc28=Westhampton KFOK NYZ080 ---
-loc29=White\\ Plains KHPN NYZ070 ---
-
-[US_WA]
-name=Washington
-loc0=Bellingham KBLI WAZ002 ---
-loc1=Bremerton KPWT WAZ010 ---
-loc2=Burlington K75S WAZ005 ---
-loc3=Colville K63S WAZ035 ---
-loc4=Ephrata KEPH WAZ033 ---
-loc5=Everett KPAE WAZ006 sea
-loc6=Fairchild KSKA ------ ---
-loc7=Fort\\ Lewis KGRF WAZ008 ---
-loc8=Friday\\ Harbor KFHR WAZ001 ---
-loc9=Hoquiam KHQM WAZ016 ---
-loc10=Moses\\ Lake KMWH WAZ033 ---
-loc11=Oak\\ Harbor K76S WAZ009 ---
-loc12=Olympia KOLM WAZ008 sea
-loc13=Omak K4OM WAZ038 ---
-loc14=Pasco KPSC WAZ028 ---
-loc15=Port\\ Angeles KCLM WAZ013 ---
-loc16=Pullman KPUW WAZ032 ---
-loc17=Quillayute KUIL ------ ---
-loc18=Renton KRNT WAZ007 ---
-loc19=Seattle KSEA WAZ007 sea
-loc20=Seattle-Boeing KBFI WAZ007 sea
-loc21=Shelton KSHN WAZ010 ---
-loc22=Spokane KGEG WAZ034 002
-loc23=Spokane-Parkwater KSFF WAZ034 002
-loc24=Stampede\\ Pass KSMP ------ ---
-loc25=Tacoma KTIW WAZ007 sea
-loc26=Tacoma-Lakewood KTCM WAZ007 sea
-loc27=Toledo KTDO WAZ020 ---
-loc28=Walla\\ Walla KALW WAZ029 ---
-loc29=Wenatchee KEAT WAZ038 ---
-loc30=Whidbey\\ Island KNUW WAZ009 ---
-loc31=Yakima KYKM WAZ025 ---
-
-[CA]
-name=Canada
-states=AB BC MB NB NF NS NT ON QC SK YK
-
-[CA_AB]
-name=Alberta
-loc0=Calgary CYYC ------ ---
-loc1=Edmonton CYEG ------ ---
-loc2=Edmonton/Villeneuve CZVL ------ ---
-
-[CA_BC]
-name=British Columbia
-loc0=Abbotsford CYXX ------ ---
-loc1=Comox CYQQ ------ ---
-loc2=Port\\ Hardy CYZT ------ ---
-loc3=Smithers CYYD ------ ---
-loc4=Vancouver CYVR ------ ---
-loc5=Victoria CYYJ ------ ---
-
-[CA_MB]
-name=Manitoba
-loc0=Churchill CYYQ ------ ---
-loc1=Winnipeg CYWG ------ ---
-
-[CA_NB]
-name=New Brunswick
-loc0=Chatham CYCH ------ ---
-loc1=Fredericton CYFC ------ ---
-loc2=Moncton CYQM ------ ---
-
-[CA_NF]
-name=Newfoundland
-loc0=Churchill\\ Falls KZUM ------ ---
-loc1=Gander CYQX ------ ---
-loc2=Goose\\ Bay CYYR ------ ---
-loc3=Saint\\ Anthony CYAY ------ ---
-loc4=St.\\ John's CYYT ------ ---
-loc5=Stephenville CYJT ------ ---
-
-[CA_NS]
-name=Nova Scotia
-loc0=Greenwood CYZX ------ ---
-loc1=Halifax CYHZ ------ ---
-loc2=Shearwater CYAW ------ ---
-loc3=Sydney CYQY ------ ---
-
-[CA_NT]
-name=Northwest Territories
-loc0=Frobisher CYFB ------ ---
-loc1=Iqaluit CYFB ------ ---
-loc2=Yellowknife CYZF ------ ---
-
-[CA_ON]
-name=Ontario
-loc0=Ottawa CYOW ------ ---
-loc1=Toronto CYYZ ------ 047
-loc2=Trenton CYTR ------ ---
-loc3=Windsor CYQG ------ ---
-
-[CA_QC]
-name=Quebec
-loc0=Bagotville CYBG ------ ---
-loc1=Gatineau CYND ------ ---
-loc2=La\\ Grande CYGL ------ ---
-loc3=Montreal\\ Saint-Hubert CYHU ------ ---
-loc4=Montreal\\ Mirabel CYMX ------ ---
-loc5=Montreal\\ Dorval CYUL ------ ---
-loc6=Quebec\\ City CYQB ------ ---
-loc7=Sept-Iles CYZV ------ ---
-
-[CA_SK]
-name=Saskatchewan
-loc0=Nipawin CYBU ------ ---
-loc1=Regina CYQR ------ ---
-loc2=Saskatoon CYXE ------ ---
-loc3=Swift\\ Current CYYN ------ ---
-
-[CA_YK]
-name=Yukon
-loc0=Shingle\\ Point CYUA ------ ---
-
-[EU]
-name=Europe
-states=AB OS BE BA BG CZ HR CY DK EE FI FR MK DE GI GR HU IE IS IT LV LT LU MT MD NL NO PL PT RO RU SK SI SP SE CH TR UK YU
-
-[EU_AB]
-name=Albania
-loc0=Tirana LATI ------ ---
-
-[EU_OS]
-name=Austria
-loc0=Voslau LOAV ------ ---
-loc1=Hohenems LOIH ------ ---
-loc2=Graz LOWG ------ ---
-loc3=Innsbruck LOWI ------ ---
-loc4=Klagenfurt LOWK ------ ---
-loc5=Linz LOWL ------ ---
-loc6=Salzburg LOWS ------ ---
-loc7=Wien LOWW ------ ---
-loc8=Zell\\ Am\\ See LOWZ ------ ---
-
-[EU_BE]
-name=Belgium
-loc0=Antwerpen/Deurne EBAW ------ ---
-loc1=Beauvechain EBBE ------ ---
-loc2=Brasschaat EBBT ------ ---
-loc3=Brussels-National\\ Airport EBBR ------ ---
-loc4=Charleroi-Brussels\\ South EBCI ------ ---
-loc5=Chievres EBCV ------ ---
-loc6=Elsenborn EBLB ------ ---
-loc7=Florennes EBFS ------ ---
-loc8=Kleine\\ Brogel EBBL ------ ---
-loc9=Koksijde EBFN ------ ---
-loc10=Liege EBLG ------ ---
-loc11=Oostende EBOS ------ ---
-loc12=Schaffen EBDT ------ ---
-
-[EU_BA]
-name=Bosnia-Herzegovina
-loc0=Sarajevo LQSA ------ ---
-
-[EU_BG]
-name=Bulgaria
-loc0=Burgas LBBG ------ ---
-loc1=Plovdiv LBPD ------ ---
-loc2=Sofia LBSF ------ ---
-loc3=Varna LBWN ------ ---
-
-[EU_CZ]
-name=Czech Republic
-loc0=Brno LKTB ------ ---
-loc1=Ostrava LKMT ------ ---
-loc2=Praha LKPR ------ ---
-
-[EU_HR]
-name=Croatia
-loc0=Dubrovnik LDDU ------ ---
-loc1=Pula LDPL ------ ---
-loc2=Rijeka LDRI ------ ---
-loc3=Split LDSP ------ ---
-loc4=Zadar LDZD ------ ---
-loc5=Zagreb LDZA ------ ---
-
-[EU_DK]
-name=Denmark
-loc0=Aarhus EKAH ------ ---
-loc1=Billund EKBI ------ ---
-loc2=Esbjerg EKEB ------ ---
-loc3=Karup EKKA ------ ---
-loc4=Kobenhavn/Kastrup EKCH ------ ---
-loc5=Kobenhavn/Roskilde EKRK ------ ---
-loc6=Lolland\\ Falster EKMB ------ ---
-loc7=Odense EKOD ------ ---
-loc8=Bornholm EKRN ------ ---
-loc9=Sonderborg EKSB ------ ---
-loc10=Sindal EKSN ------ ---
-loc11=Vojens/Skrydstrup EKSP ------ ---
-loc12=Skive EKSV ------ ---
-loc13=Thisted EKTS ------ ---
-loc14=Vandel EKVA ------ ---
-loc15=Kolding/Vandrup EKVD ------ ---
-loc16=Vagar EKVG ------ ---
-loc17=Stauning EKVJ ------ ---
-loc18=Vaerlose EKVL ------ ---
-loc19=Alborg EKYT ------ ---
-
-[EU_EE]
-name=Estonia
-loc0=Talinn EETN ------ ---
-
-[EU_GI]
-name=Gibraltar
-loc0=Gibraltar LXGB ------ ---
-
-[EU_IS]
-name=Iceland
-loc0=Egilsstadir BIEG ------ ---
-loc1=Keflavik BIKF ------ ---
-loc2=Reykjavik BIRK ------ ---
-
-[EU_LV]
-name=Latvia
-loc0=Riga EVRA ------ ---
-
-[EU_LT]
-name=Lithuania
-loc0=Vilnius EVRA ------ ---
-
-[EU_LU]
-name=Luxembourg
-loc0=Luxembourg ELLX ------ ---
-
-[EU_MK]
-name=FYR Macedonia
-loc0=Ohrid LWOH ------ ---
-loc1=Skopje LWSK ------ ---
-
-[EU_MT]
-name=Malta
-loc0=Luqa LMML ------ ---
-
-[EU_MD]
-name=Moldova
-loc0=Kishineu LUKK ------ ---
-
-[EU_NO]
-name=Norway
-loc0=Alesund ENAL ------ ---
-loc1=Andoya ENAN ------ ---
-loc2=Alta ENAT ------ ---
-loc3=Forde/Bringeland ENBL ------ ---
-loc4=Bronnoysund ENBN ------ ---
-loc5=Bodo ENBO ------ ---
-loc6=Bergen ENBR ------ ---
-loc7=Berlevag ENBV ------ ---
-loc8=Kristiansand/Kjevik ENCN ------ ---
-loc9=Dagali ENDI ------ ---
-loc10=Bardufoss ENDU ------ ---
-loc11=Ekofisk ENEK ------ ---
-loc12=Harstad/Narvik/Evenes ENEV ------ ---
-loc13=Fagernes ENFG ------ ---
-loc14=Floro ENFL ------ ---
-loc15=Frigg ENFR ------ ---
-loc16=Gullfax\\ C ENGC ------ ---
-loc17=Oslo/Gardenmoen ENGM ------ ---
-loc18=Haugesund ENHD ------ ---
-loc19=Hammerfest ENHF ------ ---
-loc20=Honningsvag ENHV ------ ---
-loc21=Kristiansund/Kvernberget ENKB ------ ---
-loc22=Kirkenes ENKR ------ ---
-loc23=Lista ENLI ------ ---
-loc24=Leknes ENLK ------ ---
-loc25=Mehamn ENMH ------ ---
-loc26=Molde ENML ------ ---
-loc27=Mosjoen ENMS ------ ---
-loc28=Banak ENNA ------ ---
-loc29=Narvik ENNK ------ ---
-loc30=Namsos ENNM ------ ---
-loc31=Notodden ENNO ------ ---
-loc32=Oseberg\\ A ENOA ------ ---
-loc33=Orland ENOL ------ ---
-loc34=Orsta-Volda ENOV ------ ---
-loc35=Mo\\ I\\ Rana ENRA ------ ---
-loc36=Rorvik/Ryum ENRM ------ ---
-loc37=Roros ENRO ------ ---
-loc38=Rost ENRS ------ ---
-loc39=Rygge ENRY ------ ---
-loc40=Svalbard ENSB ------ ---
-loc41=Sandane ENSD ------ ---
-loc42=Sogndal ENSG ------ ---
-loc43=Svolvaer/Helle ENSH ------ ---
-loc44=Stokmarknes/Skagen ENSK ------ ---
-loc45=Skien/Geiteryggen ENSN ------ ---
-loc46=Stord/Sorstokken ENSO ------ ---
-loc47=Sorkjosen ENSR ------ ---
-loc48=Sandnessjoen/Stokka ENST ------ ---
-loc49=Tromso/Langnes ENTC ------ ---
-loc50=Torp ENTO ------ ---
-loc51=Trondheim/Vaernes ENVA ------ ---
-loc52=Vadso ENVD ------ ---
-loc53=Stavanger/Sola ENZV ------ ---
-
-[EU_PL]
-name=Poland
-loc0=Gdansk EPGD ------ ---
-loc1=Krakow EPKK ------ ---
-loc2=Katowice EPKT ------ ---
-loc3=Poznan EPPO ------ ---
-loc4=Rzeszow EPRZ ------ ---
-loc5=Szczecin EPSC ------ ---
-loc6=Warszawa EPWA ------ ---
-
-[EU_PT]
-name=Portugal
-loc0=Beja LPBJ ------ ---
-loc1=Faro LPFR ------ ---
-loc2=Funchal LPFU ------ ---
-loc3=Lajes LPLA ------ ---
-loc4=Lisboa LPPT ------ ---
-loc5=Porto LPPR ------ ---
-loc6=Porto\\ Santo LPPS ------ ---
-loc7=Santa\\ Maria LPAZ ------ ---
-
-[EU_RO]
-name=Romania
-loc0=Arad LRAR ------ ---
-loc1=Bucuresti LRBS ------ ---
-loc2=Bucuresti-Otopeni LROP ------ ---
-loc3=Iasi LRIA ------ ---
-loc4=Kogalniceanu LRCK ------ ---
-loc5=Timisoara LRTR ------ ---
-loc6=Tirgu\\ Mures LRTM ------ ---
-loc7=Tulcea LRTC ------ ---
-
-[EU_RU]
-name=Russia
-loc0=Abakan UNAA ------ ---
-loc1=Anadyr UHMA ------ ---
-loc2=Anapa URKA ------ ---
-loc3=Arkhangelsk ULAA ------ ---
-loc4=Astrakhan URWA ------ ---
-loc5=Barnaul UNBB ------ ---
-loc6=Belgorod UUOB ------ ---
-loc7=Blagoveschensk UHBB ------ ---
-loc8=Bratsk UIBB ------ ---
-loc9=Bryansk UUBP ------ ---
-loc10=Cheboksary UWKS ------ ---
-loc11=Chelyabinsk USCC ------ ---
-loc12=Chita UIAA ------ ---
-loc13=Kliningrad UMKK ------ ---
-loc14=Kazan UWKD ------ ---
-loc15=Khabarovsk UHHH ------ ---
-loc16=Kogalym USRK ------ ---
-loc17=Krasnodar URKK ------ ---
-loc18=Krasnoyarsk UNKL ------ ---
-loc19=Magadan UHMM ------ ---
-loc20=Makhachkala URML ------ ---
-loc21=Mineralnye\\ Vody URMM ------ ---
-loc22=Moscow\\ Domodedovo UUDD ------ ---
-loc23=Moscow\\ Sheremetyevo UUEE ------ ---
-loc24=Murmansk ULMM ------ ---
-loc25=Nalchik URMN ------ ---
-loc26=Nizhny\\ Novgorod UWGG ------ ---
-loc27=Novosibirsk UNNT ------ ---
-loc28=Omsk UNOO ------ ---
-loc29=Orenburg UWOO ------ ---
-loc30=Perm USPP ------ ---
-loc31=Petropavlovsk-Kamchatsky UHPP ------ ---
-loc32=Petrozavodsk ULPB ------ ---
-loc33=Pskov ULOO ------ ---
-loc34=Raduzhny USNR ------ ---
-loc35=Rostov-Na-Donu URRR ------ ---
-loc36=Samara UWWW ------ ---
-loc37=Sankt-Peterburg ULLI ------ ---
-loc38=Saratov UWSS ------ ---
-loc39=Sochi URSS ------ ---
-loc40=Stavropol URMT ------ ---
-loc41=Syktyvkar UUYY ------ ---
-loc42=Tyumen USTR ------ ---
-loc43=Ufa UWUU ------ ---
-loc44=Ulan-Ude UIUU ------ ---
-loc45=Ulyanovsk UWLW ------ ---
-loc46=Vladikavkaz URMO ------ ---
-loc47=Vladivostok UHWW ------ ---
-loc48=Volgograd URWW ------ ---
-loc49=Voronezh UUOO ------ ---
-loc50=Yakutsk UEEE ------ ---
-loc51=Yekaterinburg USSS ------ ---
-loc52=Yuzhno-Sakhalinsk UHSS ------ ---
-
-[EU_SK]
-name=Slovakia
-loc0=Bratislava LZIB ------ ---
-loc1=Poprad LZTT ------ ---
-
-[EU_SI]
-name=Slovenia
-loc0=Ljubljana LJLJ ------ ---
-loc1=Maribor LJMB ------ ---
-loc2=Portoroz LJPZ ------ ---
-
-[EU_SE]
-name=Sweden
-loc0=Goteborg\\ (Landvetter) ESGG ------ ---
-loc1=Goteborg\\ (Save) ESGP ------ ---
-loc2=Jonkoping ESGJ ------ ---
-loc3=Kiruna ESNQ ------ ---
-loc4=Malmo/Sturup ESMS ------ ---
-loc5=Norrkoping ESSP ------ ---
-loc6=Ronneby ESDF ------ ---
-loc7=Stockholm\\ (Arlanda) ESSA ------ ---
-loc8=Stockholm\\ (Bromma) ESSB ------ ---
-loc9=Sundsvall-Harnosand ESNN ------ ---
-loc10=Umea ESNU ------ ---
-loc11=Vasteras ESOW ------ ---
-loc12=Vaxjo ESMX ------ ---
-loc13=Visby ESSV ------ ---
-
-[EU_CH]
-name=Switzerland
-loc0=Bern LSZB ------ ---
-loc1=Geneve LSGG ------ ---
-loc2=Lugano LSZA ------ ---
-loc3=Zurich LSZH ------ ---
-
-[EU_TR]
-name=Turkey
-loc0=Adana LTAF ------ ---
-loc1=Adana/Incirlik LTAG ------ ---
-loc2=Afyon LTAH ------ ---
-loc3=Amasya LTAP ------ ---
-loc4=Ankara/Esenboga LTAC ------ ---
-loc5=Ankara/Etimesgut LTAD ------ ---
-loc6=Antalya LTAI ------ ---
-loc7=Balikesir LTBF ------ ---
-loc8=Balikesir/Bandirma LTBG ------ ---
-loc9=Batman LTCJ ------ ---
-loc10=Bursa LTBE ------ ---
-loc11=Diyarbakir LTCC ------ ---
-loc12=Elazig LTCA ------ ---
-loc13=Erzurum LTCE ------ ---
-loc14=Eskisehir LTBI ------ ---
-loc15=Gaziantep LTAJ ------ ---
-loc16=Istanbul LTBA ------ ---
-loc17=Izmir/Adnan\\ Menderes LTBJ ------ ---
-loc18=Izmir/Cigli LTBL ------ ---
-loc19=Izmit LTBQ ------ ---
-loc20=Kayseri LTAU ------ ---
-loc21=Konya LTAN ------ ---
-loc22=Malatya LTAT ------ ---
-loc23=Manisa LTBT ------ ---
-loc24=Mugla/Dalaman LTBS ------ ---
-loc25=Mus LTCK ------ ---
-loc26=Samsun LTAQ ------ ---
-loc27=Sanliurfa LTCH ------ ---
-loc28=Sivas LTAR ------ ---
-loc29=Sivrihisar LTAV ------ ---
-loc30=Trabzon LTCG ------ ---
-loc31=Van LTCI ------ ---
-
-[EU_CY]
-name=Cyprus
-loc0=Akrotiri LCRA ------ ---
-loc1=Ercan LCEN ------ ---
-loc2=Larnaka LCLK ------ ---
-loc3=Paphos LCPH ------ ---
-
-[EU_FI]
-name=Finland
-loc0=Helsinki EFHK ------ ---
-loc1=Tampere EFTP ------ ---
-loc2=Turku EFTU ------ ---
-
-[EU_FR]
-name=France
-loc0=Agen LFBA ------ ---
-loc1=Ajaccio/Campo\\ dell'Oro LFKJ ------ ---
-loc2=Bale-Mulhouse LFSB ------ ---
-loc3=Bastia LFKB ------ ---
-loc4=Beauvais-Tille LFOB ------ ---
-loc5=Biarritz-Bayonne LFBZ ------ ---
-loc6=Bordeaux LFBD ------ ---
-loc7=Bourges LFLD ------ ---
-loc8=Brest LFRB ------ ---
-loc9=Caen-Carpiquet LFRK ------ ---
-loc10=Calvi-Ste-Catherine LFKC ------ ---
-loc11=Cannes-Mandelieu LFMD ------ ---
-loc12=Cazaux LFBC ------ ---
-loc13=Chambery LFLB ------ ---
-loc14=Cherbourg LFRC ------ ---
-loc15=Clermont-Ferrand LFLC ------ ---
-loc16=Colmar-Meyenheim LFSC ------ ---
-loc17=Deauville-Saint-Gatien LFRG ------ ---
-loc18=Dijon LFSD ------ ---
-loc19=Dinard LFRD ------ ---
-loc20=Dole LFGJ ------ ---
-loc21=Evreux-Fauville LFOE ------ ---
-loc22=Figari LFKF ------ ---
-loc23=Grenoble-Saint-Genoirs LFLS ------ ---
-loc24=Hyeres-Le\\ Palyvestre LFTH ------ ---
-loc25=Lannion LFRO ------ ---
-loc26=Le\\ Havre-Octeville LFOH ------ ---
-loc27=Le\\ Mans LFRM ------ ---
-loc28=Le\\ Touquet LFAT ------ ---
-loc29=Lille-Lesquin LFQQ ------ ---
-loc30=Limoges LFBL ------ ---
-loc31=Lorient-Lann-Bihoue LFRH ------ ---
-loc32=Lyon-Bron LFLY ------ ---
-loc33=Lyon-Satolas LFLL ------ ---
-loc34=Luxeuil LFSX ------ ---
-loc35=Marseille-Provence LFML ------ ---
-loc36=Metz-Frescaty LFSF ------ ---
-loc37=Monpellier-Mediterrannee LFMT ------ ---
-loc38=Mont-de-Marsan LFBM ------ ---
-loc39=Nancy-Essey LFSN ------ ---
-loc40=Nancy-Ochey LFSO ------ ---
-loc41=Nantes\\ Adlantique LFRS ------ ---
-loc42=Nice-Cote\\ d'Azur LFMN ------ ---
-loc43=Nimes-Garons LFTW ------ ---
-loc44=Paris/Charles\\ De\\ Gaulle LFPG ------ ---
-loc45=Paris/Le\\ Bourget LFPB ------ ---
-loc46=Paris/Orly LFPO ------ ---
-loc47=Pau/Pyrenees LFBP ------ ---
-loc48=Perpignan-Rivesaltes LFMP ------ ---
-loc49=Poitiers LFBI ------ ---
-loc50=Quimper LFRQ ------ ---
-loc51=Reims-Champagne LFSR ------ ---
-loc52=Rennes LFRN ------ ---
-loc53=Rouen-Valle\\ de\\ Seine LFOP ------ ---
-loc54=Saint-Brieuc-Armor LFRT ------ ---
-loc55=Saint-Dizier-Robinson LFSI ------ ---
-loc56=Saint-Etienne-Boutheon LFMH ------ ---
-loc57=Saint-Nazaire-Montoir LFRZ ------ ---
-loc58=Strasbourg LFST ------ ---
-loc59=Tarbes LFBT ------ ---
-loc60=Toul-Rosieres LFSL ------ ---
-loc61=Toulouse LFBO ------ ---
-loc62=Tours-St-Symphorien LFOT ------ ---
-loc63=Toussus-Le\\ Noble LFPN ------ ---
-loc64=Troyes/Barberey LFQB ------ ---
-loc65=Vichy-Charmeil LFLV ------ ---
-loc66=Villacoublay LFPV ------ ---
-
-[EU_DE]
-name=Germany
-loc0=Augsburg EDMA ------ ---
-loc1=Bayreuth EDQD ------ ---
-loc2=Berlin-Tegel EDDT ------ ---
-loc3=Berlin-Tempelhof EDDI ------ ---
-loc4=Braunschweig EDVE ------ ---
-loc5=Bremen EDDW ------ ---
-loc6=Dortmund-Wickede EDLW ------ ---
-loc7=Dusseldorf EDDL ------ ---
-loc8=Frankfurt/Main EDDF ------ ---
-loc9=Friedrichshafen EDNY ------ ---
-loc10=Hamburg EDDH ------ ---
-loc11=Hamburg-Finkenwerder EDHI ------ ---
-loc12=Hannover EDDV ------ ---
-loc13=Hof EDQM ------ ---
-loc14=Kassel-Calden EDVK ------ ---
-loc15=Koln/Bonn EDDK ------ ---
-loc16=Lubeck-Blankensee EDHL ------ ---
-loc17=Monchengladbach EDLN ------ ---
-loc18=Munchen EDDM ------ ---
-loc19=Munster/Osnabruck EDDG ------ ---
-loc20=Nurnberg EDDN ------ ---
-loc21=Oberpfaffenhofen EDMO ------ ---
-loc22=Paderborn-Haxterberg EDLP ------ ---
-loc23=Saarbrucken EDDR ------ ---
-loc24=Stuttgart EDDS ------ ---
-loc25=Westerland EDXW ------ ---
-loc26=Dresden-Klotzsche EDDC ------ ---
-loc27=Leipzig-Schkeuditz EDDP ------ ---
-
-[EU_GR]
-name=Greece
-loc0=Andravida LGAD ------ ---
-loc1=Alexandroupolis LGAL ------ ---
-loc2=Araxos LGRX ------ ---
-loc3=Athinai LGAT ------ ---
-loc4=Chania LGSA ------ ---
-loc5=Elefsis LGEL ------ ---
-loc6=Iraklion LGIR ------ ---
-loc7=Kalamata LGKL ------ ---
-loc8=Kavala LGKV ------ ---
-loc9=Kefallinia LGKF ------ ---
-loc10=Kerkira LGKR ------ ---
-loc11=Kos LGKO ------ ---
-loc12=Kozani LGKZ ------ ---
-loc13=Limnos LGLM ------ ---
-loc14=Mitilini LGMT ------ ---
-loc15=Mykonos LGMK ------ ---
-loc16=Preveza LGPZ ------ ---
-loc17=Rodos LGRP ------ ---
-loc18=Samos LGSM ------ ---
-loc19=Santorini LGSR ------ ---
-loc20=Skiathos LGSK ------ ---
-loc21=Thessaloniki LGTS ------ ---
-loc22=Zakinthos LGZA ------ ---
-
-[EU_HU]
-name=Hungary
-loc0=Budapest LHBP ------ ---
-loc1=Papa LHPA ------ ---
-loc2=Szombathely LHSY ------ ---
-
-[EU_IE]
-name=Ireland
-loc0=Connaught EIKN ------ ---
-loc1=Cork EICK ------ ---
-loc2=Dublin EIDW ------ ---
-loc3=Shannon EINN ------ ---
-
-[EU_IT]
-name=Italy
-loc0=Albenga LIMG ------ ---
-loc1=Alghero LIEA ------ ---
-loc2=Amendola LIBA ------ ---
-loc3=Ancona LIPY ------ ---
-loc4=Aviano LIPA ------ ---
-loc5=Bari LIBD ------ ---
-loc6=Bergamo LIME ------ ---
-loc7=Bologna LIPE ------ ---
-loc8=Bolzano LIPB ------ ---
-loc9=Brindisi LIBR ------ ---
-loc10=Cagliari LIEE ------ ---
-loc11=Capo\\ Mele LIMU ------ ---
-loc12=Catania LICC ------ ---
-loc13=Cervia LIPC ------ ---
-loc14=Crotone LIBC ------ ---
-loc15=Dobbiaco LIVD ------ ---
-loc16=Decimomannu LIED ------ ---
-loc17=Ferrara LIPF ------ ---
-loc18=Firenze LIRQ ------ ---
-loc19=Forli LIPK ------ ---
-loc20=Frontone LIVF ------ ---
-loc21=Frosinone LIRH ------ ---
-loc22=Genova LIMJ ------ ---
-loc23=Ghedi LIPL ------ ---
-loc24=Gioia\\ del\\ Colle LIBV ------ ---
-loc25=Grosseto LIRS ------ ---
-loc26=Guidonia LIRG ------ ---
-loc27=Lamezia LICA ------ ---
-loc28=Lampedusa LICD ------ ---
-loc29=Latina LIRL ------ ---
-loc30=Lecce LIBN ------ ---
-loc31=Marino\\ di\\ Ravenna LIVM ------ ---
-loc32=Milano/Linate LIML ------ ---
-loc33=Milano/Malpensa LIMC ------ ---
-loc34=Monte\\ Argentario LIQO ------ ---
-loc35=Monte\\ Bisbino LIMO ------ ---
-loc36=Monte\\ Calamita LIRX ------ ---
-loc37=Monte\\ Cimone LIVC ------ ---
-loc38=Monte\\ Malanotte LIMY ------ ---
-loc39=Monte\\ Scuro LIBQ ------ ---
-loc40=Monte\\ Terminillo LIRK ------ ---
-loc41=Napoli LIRN ------ ---
-loc42=Novara/Cameri LIMN ------ ---
-loc43=Olbia LIEO ------ ---
-loc44=Padova LIPU ------ ---
-loc45=Paganella LIVP ------ ---
-loc46=Palermo LICJ ------ ---
-loc47=Pantelleria LICG ------ ---
-loc48=Passo\\ della\\ Cisa LIMT ------ ---
-loc49=Passo\\ dei\\ Giovi LIMV ------ ---
-loc50=Passo\\ Resia LIVE ------ ---
-loc51=Passo\\ Rolle LIVR ------ ---
-loc52=Perugia LIRZ ------ ---
-loc53=Pescara LIBP ------ ---
-loc54=Piacenza LIMS ------ ---
-loc55=Pian\\ Rosa LIMH ------ ---
-loc56=Pisa LIRP ------ ---
-loc57=Pratica\\ di\\ Mare LIRE ------ ---
-loc58=Reggio\\ Calabria LICR ------ ---
-loc59=Rieti LIQN ------ ---
-loc60=Rimini LIPR ------ ---
-loc61=Rivolto LIPI ------ ---
-loc62=Roma/Ciampino LIRA ------ ---
-loc63=Roma/Fiumicino LIRF ------ ---
-loc64=Roma/Urbe LIRU ------ ---
-loc65=Ronchi\\ de'\\ Legionari LIPQ ------ ---
-loc66=Sarzana LIQW ------ ---
-loc67=Sigonella LICZ ------ ---
-loc68=Taranto LIBG ------ ---
-loc69=Tarvisio LIVO ------ ---
-loc70=Trapani LICT ------ ---
-loc71=Torino/Bric\\ Della\\ Croce LIMK ------ ---
-loc72=Torino/Caselle LIMF ------ ---
-loc73=Trevico LIRT ------ ---
-loc74=Treviso/S.Angelo LIPH ------ ---
-loc75=Treviso/Istrana LIPS ------ ---
-loc76=Trieste LIVT ------ ---
-loc77=Venezia LIPZ ------ ---
-loc78=Vicenza LIPT ------ ---
-loc79=Villafranca LIPX ------ ---
-loc80=Viterbo LIRV ------ ---
-
-[EU_NL]
-name=Netherlands
-loc0=Amsterdam EHAM ------ ---
-loc1=Deelen EHDL ------ ---
-loc2=Den\\ Helder/De\\ Kooy EHKD ------ ---
-loc3=Eindhoven EHEH ------ ---
-loc4=Gilze-Rijen EHGR ------ ---
-loc5=Groningen EHGG ------ ---
-loc6=Leeuwarden EHLW ------ ---
-loc7=Maastricht EHBK ------ ---
-loc8=Rotterdam EHRD ------ ---
-loc9=Twenthe EHTW ------ ---
-loc10=Utrecht/Soesterberg EHSB ------ ---
-loc11=Valkenburg EHVB ------ ---
-loc12=Vlieland EHVL ------ ---
-loc13=Volkel EHVK ------ ---
-loc14=Woensdrecht EHWO ------ ---
-
-[EU_SP]
-name=Spain
-loc0=Alicante LEAL ------ ---
-loc1=Almeria LEAM ------ ---
-loc2=Asturias LEAS ------ ---
-loc3=Barcelona LEBL ------ ---
-loc4=Bilbao LEBB ------ ---
-loc5=Canarias/Fuerteventura GCFV ------ ---
-loc6=Canarias/Gran\\ Canaria GCLP ------ ---
-loc7=Canarias/Hierro GCHI ------ ---
-loc8=Canarias/La\\ Palma GCLA ------ ---
-loc9=Canarias/Lanzarote GCRR ------ ---
-loc10=Canarias/Tenerife\\ Sur GCTS ------ ---
-loc11=Canarias/Tenerife\\ Norte GCXO ------ ---
-loc12=Girona LEGE ------ ---
-loc13=Granada LEGR ------ ---
-loc14=Ibiza LEIB ------ ---
-loc15=Jerez LEJR ------ ---
-loc16=La\\ Coruna LECO ------ ---
-loc17=Madrid\\ (Barajas) LEMD ------ ---
-loc18=Madrid\\ (Cuatro\\ Vientos) LEVS ------ ---
-loc19=Malaga LEMG ------ ---
-loc20=Melilla GEML ------ ---
-loc21=Menorca LEMH ------ ---
-loc22=Murcia LELC ------ ---
-loc23=Palma\\ de\\ Mallorca LEPA ------ ---
-loc24=Pamplona LEPP ------ ---
-loc25=Reus LERS ------ ---
-loc26=San\\ Sebastian LESO ------ ---
-loc27=Santander LEXJ ------ ---
-loc28=Santiago LEST ------ ---
-loc29=Sevilla LEZL ------ ---
-loc30=Valencia LEVC ------ ---
-loc31=Vigo LEVX ------ ---
-loc32=Vitoria LEVT ------ ---
-loc33=Zaragoza LEZG ------ ---
-
-[EU_UK]
-name=United Kingdom
-loc0=Aberdeen EGPD :RQPMS ---
-loc1=Alderney EGJA ------ ---
-loc2=Belfast/Aldergrove EGAA :AAPMS ---
-loc3=Belfast/Harbour EGAC :AAPMS ---
-loc4=Benbecula EGPL :RAPMS ---
-loc5=Biggin\\ Hill EGKB :RBPMS ---
-loc6=Birmingham EGBB :BBPMS ---
-loc7=Blackpool EGNH :RCPMS ---
-loc8=Boscombe\\ Down EGDM ------ ---
-loc9=Boulmer EGQM :RTPMS ---
-loc10=Bournemouth EGHH :RIPMS ---
-loc11=Bristol EGGD :RDPMS ---
-loc12=Cambridge EGSC :RNPMS- ---
-loc13=Cardiff EGFF :RGPMS ---
-loc14=Carlisle EGNC :RCPMS ---
-loc15=Coventry EGBE :BBPMS ---
-loc16=Cranfield EGTC :RIPMS ---
-loc17=Culdrose EGDR :RD2PMS ---
-loc18=Dundee EGPN :RAPMS ---
-loc19=East\\ Midlands EGNX :BBPMS ---
-loc20=Edinburgh EGPH :RAPMS ---
-loc21=Eglington/Londonderry EGAE :AAPMS ---
-loc22=Exeter EGTE :RD2PMS ---
-loc23=Glasgow EGPF :RAPMS ---
-loc24=Guernsey EGJB ------ ---
-loc25=Humberside EGNJ :RTPMS ---
-loc26=Inverness EGPE :RQPMS ---
-loc27=Isle\\ of\\ Man EGNS :RCPMS ---
-loc28=Jersey EGJJ ------ ---
-loc29=Kinloss EGQK :RQPMS ---
-loc30=Leeds\\ and\\ Bradford EGNM :RYPMS ---
-loc31=Leuchars EGQL :RQPMS ---
-loc32=Liverpool EGGP :RCPMS ---
-loc33=London/City EGLC :RBPMS ---
-loc34=London/Gatwick EGKK :RBPMS ---
-loc35=London/Heathrow EGLL :RBPMS ---
-loc36=London/Stansted EGSS :RBPMS ---
-loc37=Lossiemouth EGQS :RQPMS ---
-loc38=Luton EGGW :RBPMS ---
-loc39=Lyneham EGDL :BBPMS ---
-loc40=Manchester EGCC :RCPMS ---
-loc41=Newcastle EGNT :RTPMS ---
-loc42=Norwich EGSH :RNPMS ---
-loc43=Plymouth EGHD :RD2PMS ---
-loc44=Portland EGDP :RIPMS ---
-loc45=Prestwick EGPK :RAPMS ---
-loc46=Saint\\ Mawgan EGDG :RD2PMS ---
-loc47=Scatsta EGPM :RQPMS ---
-loc48=Scilly\\ Isles EGHE :RD2PMS ---
-loc49=Shawbury EGOS :BBPMS ---
-loc50=Shoreham EGKA :RBPMS ---
-loc51=Southampton EGHI :RIPMS ---
-loc52=Southend EGMC :RBPMS ---
-loc53=Staverton EGBJ :RDPMS ---
-loc54=Stornoway EGPO :RQPMS ---
-loc55=Sumburgh EGPB :RQPMS ---
-loc56=Tees-Side EGNV :RTPMS ---
-loc57=Tiree EGPU :RQPMS ---
-loc58=Unst EGPW :RQPMS ---
-loc59=Valley EGOV ------ ---
-loc60=Wick EGPC :RQPMS ---
-loc61=Yeovilton EGDY :RDPMS ---
-
-[EU_YU]
-name=Yugoslavia
-loc0=Beograd LYBE ------ ---
-loc1=Nis LYNI ------ ---
-loc2=Podgorica\\ Titograd LYTI ------ ---
-loc3=Podgorica LYPG ------ ---
-loc4=Pristina LYPR ------ ---
-loc5=Tivat LYTU ------ ---
-
-[AF]
-name=Africa
-states=DZ EG LY MO ZA
-
-[AF_MO]
-name=Morocco
-loc0=Rabat GMME ------ ---
-
-[AF_ZA]
-name=South Africa
-loc0=Bethlehem\\ Airport FABM ------ ---
-loc1=Bloemfontein\\ J.\\ B.\\ M.\\ Hertzog FABL ------ ---
-loc2=Cape\\ Town\\ D.\\ F.\\ Malan FACT ------ ---
-loc3=Durban\\ Louis\\ Botha FADN ------ ---
-loc4=East\\ London FAEL ------ ---
-loc5=George\\ Airport FAGG ------ ---
-loc6=Jan\\ Smuts FAJS ------ ---
-loc7=Langebaanweg FALW ------ ---
-loc8=Lichtenburg FALT ------ ---
-loc9=Pietersburg FAPB ------ ---
-loc10=Port\\ Elizabeth FAPE ------ ---
-loc11=Pretoria FAPR ------ ---
-loc12=Springbok FASB ------ ---
-loc13=Upington FAUP ------ ---
-
-[AF_LY]
-name=Libya
-loc0=Benina HLLB ------ ---
-loc1=Tripoli HLLT ------ ---
-
-[AF_EG]
-name=Egypt
-loc0=Alexandria/Nouzha HEAX ------ ---
-loc1=Asswan HESN ------ ---
-loc2=Cairo HECA ------ ---
-loc3=Luxor HELX ------ ---
-loc4=Mersa\\ Matruh HEMM ------ ---
-loc5=Port\\ Said HEPS ------ ---
-loc6=Sharm\\ El\\ Sheikhintl HESH ------ ---
-
-[AF_DZ]
-name=Algeria
-loc0=Annaba DABB ------ ---
-loc1=Constantine DABC ------ ---
-loc2=Dar-El-Beida DAAG ------ ---
-loc3=Ghardaia DAUG ------ ---
-loc4=Hassi-Messaoud DAUH ------ ---
-loc5=In\\ Amenas DAUZ ------ ---
-loc6=Oran DAOO ------ ---
-loc7=Tamanrasset DAAT ------ ---
-loc8=Tebessa DABS ------ ---
-loc9=Tlemcen\\ Zenata DAON ------ ---
-
-[OZ]
-name=Australasia
-states=AU NZ AN
-
-[OZ_AU]
-name=Australia
-loc0=Adelaide YPAD ------ ---
-loc1=Alice\\ Springs YBAS ------ ---
-loc2=Brisbane YBBN ------ ---
-loc3=Broome YBRM ------ ---
-loc4=Cairns YBCS ------ ---
-loc5=Canberra YSCB ------ ---
-loc6=Christmas\\ Island YPXM ------ ---
-loc7=Cocos\\ Island YPCC ------ ---
-loc8=Dubbo YSDU ------ ---
-loc9=Hobart YMHB ------ ---
-loc10=Learmouth YPLM ------ ---
-loc11=Melbourne YMML ------ ---
-loc12=Norfolk\\ Island YSNF ------ ---
-loc13=Perth YPPH ------ ---
-loc14=Port\\ Hedland YPPD ------ ---
-loc15=Sydney YSSY ------ ---
-loc16=Townsville YBTL ------ ---
-
-[OZ_NZ]
-name=New Zealand
-loc0=Auckland NZAA ------ ---
-loc1=Christchurch NZCH ------ ---
-loc2=Wellington NZWN ------ ---
-
-[OZ_AN]
-name=Antartica
-loc0=Williams\\ Field NZCM ------ ---
-
-[AS]
-name=Asia
-states=CN HK IN JP KR KP PK SG TW VN
-
-[AS_VN]
-name=Viet Nam
-loc=Da\\ Nang VVDN ------ ---
-loc=Ha\\ Noi VVNB ------ ---
-loc=Ho\\ Chi\\ Minh VVTS ------ ---
-
-[AS_KR]
-name=Korea, Republic of
-loc0=Camp\\ Stanley/H-207 RKSX ------ ---
-loc1=Cheju RKPC ------ ---
-loc2=Chongju\\ Ab RKTU ------ ---
-loc3=Mangilsan\\ Ab RKTM ------ ---
-loc4=Osan\\ Ab RKSO ------ ---
-loc5=Paekado RKTB ------ ---
-loc6=Paengnyongdo\\ Ab RKSP ------ ---
-loc7=Pohang\\ Ab RKTH ------ ---
-loc8=Pusan/Kimhae RKPK ------ ---
-loc9=Pyongtaek\\ Ab RKSG ------ ---
-loc10=Sangju RKTS ------ ---
-loc11=Seoul/Kimp'O\\ International\\ Airport RKSS ------ ---
-loc12=Seoul/Yongdungp'O\\ Rokaf\\ Wc RKSF ------ ---
-loc13=Seoul\\ E\\ Ab RKSM ------ ---
-loc14=Songmu\\ Ab RKTE ------ ---
-loc15=Suwon\\ Ab RKSW ------ ---
-loc16=Taegu RKTT ------ ---
-loc17=Taegu\\ Ab RKTN ------ ---
-loc18=Taejon RKTF ------ ---
-loc19=Ulsan RKPU ------ ---
-loc20=Woong\\ Cheon RKTW ------ ---
-loc21=Yechon\\ Ab RKTY ------ ---
-loc22=Yeoju\\ Range RKSU ------ ---
-loc23=Yeonpyeungdo RKSQ ------ ---
-loc24=Yongsan/H-208\\ Hp RKSY ------ ---
-loc25=Yosu RKJY ------ ---
-
-[AS_KP]
-name=Korea, Democratic People's Republic of
-loc0=Pyongyang ZKPY ------ ---
-
-[AS_HK]
-name=Hong Kong
-loc=Hong\\ Kong VHHH ------ ---
-
-[AS_PK]
-name=Pakistan
-loc0=Islamabad OPRN ------ ---
-loc1=Karachi OPKC ------ ---
-loc2=Lahore OPLA ------ ---
-loc3=Nawabshah OPNH ------ ---
-
-[AS_IN]
-name=India
-loc0=Ahmadabad VAAH ------ ---
-loc1=Amritsar VIAR ------ ---
-loc2=Bombay/Santacruz VABB ------ ---
-loc3=Calcutta/Dum\\ Dum VECC ------ ---
-loc4=Hyderabad VOHY ------ ---
-loc5=Madras/Minambakkam VOMM ------ ---
-loc6=Nagpur\\ Sonegaon VANP ------ ---
-loc7=New\\ Delhi/Palam VIDP ------ ---
-loc8=Patna VEPT ------ ---
-loc9=Thiruvananthapuram VOTV ------ ---
-loc10=Tiruchchirapalli VOTR ------ ---
-loc11=Varanasi/Babatpur VIBN ------ ---
-
-[AS_CN]
-name=People's Republic of China
-loc0=Beijing ZBAA ------ ---
-loc1=Chengdu ZUUU ------ ---
-loc2=Dalian ZYTL ------ ---
-loc3=Guangzhou ZGGG ------ ---
-loc4=Hangzhou ZSHC ------ ---
-loc5=Hong\\ Kong VHHH ------ ---
-loc6=Kunming ZPPP ------ ---
-loc7=Lanzhou ZLLL ------ ---
-loc8=Nanning ZGNN ------ ---
-loc9=Shanghai ZSSS ------ ---
-loc10=Taiyuan ZBYN ------ ---
-loc11=Tianjin ZBTJ ------ ---
-loc12=Urumqi ZWWW ------ ---
-loc13=Xiamen ZSAM ------ ---
-
-[AS_JP]
-name=Japan
-loc0=Akeno\\ Ab RJOE ------ ---
-loc1=Akita\\ Airport RJSK ------ ---
-loc2=Amami\\ Airport RJKA ------ ---
-loc3=Aomori\\ Airport RJSA ------ ---
-loc4=Asahikawa\\ Ab RJCA ------ ---
-loc5=Asahikawa\\ Airport RJEC ------ ---
-loc6=Ashiya\\ Ab RJFA ------ ---
-loc7=Atsugi\\ US\\ NAS RJTA ------ ---
-loc8=Chichijima RJAO ------ ---
-loc9=Chitose\\ Ab RJCC ------ ---
-loc10=Chitose\\ ASDF RJCJ ------ ---
-loc11=Chofu\\ Airport RJTF ------ ---
-loc12=Fuji\\ Ab RJAT ------ ---
-loc13=Fukue\\ Airport RJFE ------ ---
-loc14=Fukui\\ Airport RJNF ------ ---
-loc15=Fukuoka\\ Airport RJFF ------ ---
-loc16=Gifu\\ Ab RJNG ------ ---
-loc17=Hachijojima\\ Airport RJTH ------ ---
-loc18=Hachinohe\\ Ab RJSH ------ ---
-loc19=Hakodate\\ Airport RJCH ------ ---
-loc20=Hamamatsu\\ Ab RJNH ------ ---
-loc21=Hanamaki\\ Airport RJSI ------ ---
-loc22=Hiroshima\\ Airport RJOA ------ ---
-loc23=Hofu\\ Ab RJOF ------ ---
-loc24=Hyakuri\\ Ab RJAH ------ ---
-loc25=Ichikawa RJAI ------ ---
-loc26=Iki\\ Airport RJDB ------ ---
-loc27=Iruma\\ Ab RJTJ ------ ---
-loc28=Iwakuni\\ MCAS RJOI ------ ---
-loc29=Iwojima RJAW ------ ---
-loc30=Izumo\\ Airport RJOC ------ ---
-loc31=Kadena\\ Ab RODN ------ ---
-loc32=Kagoshima\\ Airport RJFK ------ ---
-loc33=Kamigoto RJDK ------ ---
-loc34=Kanoya\\ Ab RJFY ------ ---
-loc35=Kansai\\ International\\ Airport RJBB ------ ---
-loc36=Kasumigaura\\ Ab RJAK ------ ---
-loc37=Kasuminome\\ Ab RJSU ------ ---
-loc38=Kikai\\ Island RJKI ------ ---
-loc39=Kisarazu\\ Ab RJTK ------ ---
-loc40=Kitakyushu\\ Airport RJFR ------ ---
-loc41=Kochi\\ Airport RJOK ------ ---
-loc42=Komatsu\\ Ab RJNK ------ ---
-loc43=Komatsujima\\ Ab RJOP ------ ---
-loc44=Kumamoto\\ Airport RJFT ------ ---
-loc45=Kushiro\\ Airport RJCK ------ ---
-loc46=Matsumoto\\ Airport RJAF ------ ---
-loc47=Matsushima\\ Ab RJST ------ ---
-loc48=Matsuyama\\ Airport RJOM ------ ---
-loc49=Memambetsu\\ Airport RJCM ------ ---
-loc50=Metabaru\\ Ab RJDM ------ ---
-loc51=Miho\\ Ab RJOH ------ ---
-loc52=Minamitorishima RJAM ------ ---
-loc53=Misawa\\ Ab RJSM ------ ---
-loc54=Miyakejima\\ Airport RJTQ ------ ---
-loc55=Miyazaki\\ Airport RJFM ------ ---
-loc56=Mombetsu\\ Airport RJEB ------ ---
-loc57=Nagasaki\\ Airport RJFU ------ ---
-loc58=Nagoya\\ Airport RJNN ------ ---
-loc59=Naha\\ Airport ROAH ------ ---
-loc60=Nakashibetsu\\ Airport RJCN ------ ---
-loc61=Nankishirahama\\ Airport RJBD ------ ---
-loc62=New\\ Tokyo\\ International\\ Airport RJAA ------ ---
-loc63=Niigata\\ Airport RJSN ------ ---
-loc64=Nyutabaru\\ Ab RJFN ------ ---
-loc65=Obihiro\\ Airport RJCB ------ ---
-loc66=Oita\\ Airport RJFO ------ ---
-loc67=Ojika\\ Island RJDO ------ ---
-loc68=Okayama\\ Airport RJOB ------ ---
-loc69=Oki\\ Airport RJNO ------ ---
-loc70=Okinoerabu RJKB ------ ---
-loc71=Okushiri\\ Island RJEO ------ ---
-loc72=Ominato\\ Ab RJSO ------ ---
-loc73=Osaka\\ International\\ Airport RJOO ------ ---
-loc74=Oshima\\ Airport RJTO ------ ---
-loc75=Ozuki\\ Ab RJOZ ------ ---
-loc76=Rebun\\ Island RJCR ------ ---
-loc77=Rishiri\\ Island RJER ------ ---
-loc78=Sapporo\\ Ab RJCO ------ ---
-loc79=Sendai\\ Airport RJSS ------ ---
-loc80=Shimofusa\\ Ab RJTL ------ ---
-loc81=Shizuhama\\ Ab RJNY ------ ---
-loc82=Tachikawa\\ Ab RJTC ------ ---
-loc83=Tajima RJBT ------ ---
-loc84=Takamatsu\\ Airport RJOT ------ ---
-loc85=Tanegashima\\ Airport RJFG ------ ---
-loc86=Tateyama\\ Ab RJTE ------ ---
-loc87=Tokachi\\ GSDF RJCT ------ ---
-loc88=Tokunoshima\\ Island RJKN ------ ---
-loc89=Tokushima\\ Ab RJOS ------ ---
-loc90=Tokyo\\ Heliport RJTI ------ ---
-loc91=Tokyo\\ International\\ Airport RJTT ------ ---
-loc92=Tokyo\\ New\\ International\\ Airport RJAA ------ ---
-loc93=Tottori\\ Airport RJOR ------ ---
-loc94=Toyama\\ Airport RJNT ------ ---
-loc95=Tsuiki\\ Ab RJFZ ------ ---
-loc96=Tsushima\\ Airport RJDT ------ ---
-loc97=Utsunomiya\\ Ab RJTU ------ ---
-loc98=Wakkanai\\ Airport RJCW ------ ---
-loc99=Yakushima RJFC ------ ---
-loc100=Yamagata\\ Airport RJSC ------ ---
-loc101=Yamaguchi\\ Ube\\ Airport RJDC ------ ---
-loc102=Yao\\ Airport RJOY ------ ---
-loc103=Yokosuka\\ Fwf RJTX ------ ---
-loc104=Yokota\\ Ab RJTY ------ ---
-loc105=Zama\\ Airfield RJTR ------ ---
-
-[AS_SG]
-name=Singapore
-loc0=Singapore WSSS ------ ---
-
-[AS_TW]
-name=Taiwan
-loc0=Chia\\ Tung RCFS ------ ---
-loc1=Chiang\\ Kai\\ Shek RCTP ------ ---
-loc2=Chiayi RCKU ------ ---
-loc3=Chihhang RCQS ------ ---
-loc4=Chinmem/Shatou RCBS ------ ---
-loc5=Dongsha RCLM ------ ---
-loc6=Dongshi RCNO ------ ---
-loc7=Feng\\ Nin RCFN ------ ---
-loc8=Hengchun RCKW ------ ---
-loc9=Hsinchu RCPO ------ ---
-loc10=Hulien RCYU ------ ---
-loc11=Ilan RCMS ------ ---
-loc12=Kangshan RCAY ------ ---
-loc13=Kaohsiung RCKH ------ ---
-loc14=Makung RCQC ------ ---
-loc15=Mazu RCFG ------ ---
-loc16=Pa\\ Kuei/Bakuai RCUK ------ ---
-loc17=Pingtung\\ North RCSQ ------ ---
-loc18=Pingtung\\ South RCDC ------ ---
-loc19=Sungshan/Taipei RCSS ------ ---
-loc20=Taichung RCLG ------ ---
-loc21=Tainan RCNN ------ ---
-loc22=Taoyuan RCGM ------ ---
-loc23=Wuchia\\ Observatory RCMQ ------ ---
-
-[M_]
-name=Central and South America
-states=BS BZ KY CU CR DO SV GT HT HN JM MX NI PA AR BR BO CL CO EC PY PE SR UY VE
-
-[M__BS]
-name=Bahamas
-loc0=Freeport MYGF ------ ---
-loc1=Nassau MYNN ------ ---
-
-[M__BZ]
-name=Belize
-loc0=Belize MZBZ ------ ---
-
-[M__KY]
-name=Cayman Islands
-loc0=Grand\\ Cayman MWCR ------ ---
-
-[M__CU]
-name=Cuba
-loc0=Baracoa MUBA ------ ---
-loc1=Bayamo MUBY ------ ---
-loc2=Camaguey MUCM ------ ---
-loc3=Cayo\\ Largo\\ del\\ Sur MUCL ------ ---
-loc4=Guantanamo MUGT ------ ---
-loc5=Habana MUHA ------ ---
-loc6=Holguin MUHG ------ ---
-loc7=Las\\ Tunas MUVT ------ ---
-loc8=Manzanillo MUMZ ------ ---
-loc9=Moa MUMO ------ ---
-loc10=Nueva\\ Gerona MUNG ------ ---
-loc11=Santiago\\ de\\ Cuba MUCU ------ ---
-loc12=Varadero MUVR ------ ---
-loc13=Venezuela MUCA ------ ---
-
-[M__CR]
-name=Costa Rica
-loc0=Chacarita MRCH ------ ---
-loc1=Juan\\ Santamaria MROC ------ ---
-loc2=Liberia MRLB ------ ---
-loc3=Puerto\\ Limon MRLM ------ ---
-loc4=Tobias\\ Bolanos MRPV ------ ---
-
-[M__DO]
-name=Dominican Republic
-loc0=La\\ Romana MDLR ------ ---
-loc1=Las\\ Americas MDSD ------ ---
-loc2=Puerto\\ Plata MDPP ------ ---
-loc3=Punta\\ Cana MDPC ------ ---
-loc4=Santiago MDST ------ ---
-
-[M__SV]
-name=El Salvador
-loc0=Acajutla MSAC ------ ---
-loc1=El\\ Salvador\\ Int. MSLP ------ ---
-loc2=San\\ Miguel MSSM ------ ---
-loc3=San\\ Salvador MSSS ------ ---
-loc4=Santa\\ Ana MSSA ------ ---
-
-[M__GT]
-name=Guatemala
-loc0=Flores MGFL ------ ---
-loc1=Guatemala MGGT ------ ---
-loc2=Huehuetenango MGHT ------ ---
-loc3=Puerto\\ Barrios MGPB ------ ---
-loc4=San\\ Jose MGSJ ------ ---
-
-[M__HT]
-name=Haiti
-loc0=Port-Au-Prince MTPP ------ ---
-
-[M__HN]
-name=Honduras
-loc0=Amapala MHAM ------ ---
-loc1=Catacamas MHCA ------ ---
-loc2=Choluteca MHCH ------ ---
-loc3=La\\ Ceiba MHLC ------ ---
-loc4=La\\ Esperanza MHLE ------ ---
-loc5=La\\ Mesa MHLM ------ ---
-loc6=Nueva\\ Ocotepeque MHSC ------ ---
-loc7=Puerto\\ Lempira MHPL ------ ---
-loc8=Roatan MHRO ------ ---
-loc9=Santa\\ Rosa\\ de\\ Copan MHSR ------ ---
-loc10=Tegucigalpa MHTG ------ ---
-loc11=Tela MHTE ------ ---
-loc12=Yoro MHYR ------ ---
-
-[M__JM]
-name=Jamaica
-loc0=Kingston MKJP ------ ---
-loc1=Montego\\ Bay MKJA ------ ---
-
-[M__NI]
-name=Nicaragua
-loc0=Bluefields MNBL ------ ---
-loc1=Chinandega MNCH ------ ---
-loc2=Jinotega MNJG ------ ---
-loc3=Juigalpa MNJU ------ ---
-loc4=Managua MNMG ------ ---
-loc5=Puerto\\ Cabezas MNPC ------ ---
-loc6=Rivas MNRS ------ ---
-
-[M__PA]
-name=Panama
-loc0=Bocas\\ del\\ Toro MPBO ------ ---
-loc1=David MPDA ------ ---
-loc2=Howard\\ AFB MPHO ------ ---
-loc3=Panama MPMG ------ ---
-loc4=Santiago MPSA ------ ---
-loc5=Tocumen MPTO ------ ---
-
-[M__BO]
-name=Bolivia
-loc0=Camiri SLCA ------ ---
-loc1=Cobija SLCO ------ ---
-loc2=Cochabamba SLCB ------ ---
-loc3=Concepcion SLCP ------ ---
-loc4=La\\ Paz/Alto SLLP ------ ---
-loc5=Magdalena SLMG ------ ---
-loc6=Oruro SLOR ------ ---
-loc7=Potosi SLPO ------ ---
-loc8=Puerto\\ Suarez SLPS ------ ---
-loc9=Reyes SLRY ------ ---
-loc10=Riberalta SLRI ------ ---
-loc11=Robore SLRB ------ ---
-loc12=Rurrenabaque SLRQ ------ ---
-loc13=San\\ Ignacio\\ De\\ Velasco SLSI ------ ---
-loc14=San\\ Joaquin SLJO ------ ---
-loc15=San\\ Jose\\ De\\ Chiquitos SLJE ------ ---
-loc16=Santa\\ Ana SLSA ------ ---
-loc17=Sucre SLSU ------ ---
-loc18=Tarija SLTJ ------ ---
-loc19=Trinidad SLTR ------ ---
-loc20=Villamontes SLVM ------ ---
-loc21=Viru-Viru SLVR ------ ---
-loc22=Yacuiba SLYA ------ ---
-
-[M__CL]
-name=Chile
-loc0=Antofagasta SCFA ------ ---
-loc1=Arica SCAR ------ ---
-loc2=Concepcion SCIE ------ ---
-loc3=Iquique/Diego\\ Arac SCDA ------ ---
-loc4=Pudahuel SCEL ------ ---
-loc5=Puerto\\ Montt SCTE ------ ---
-loc6=Punta\\ Arenas SCCI ------ ---
-
-[M__CO]
-name=Colombia
-loc0=Barranquilla/Ernestocortissoz SKBQ ------ ---
-loc1=Bogota/Eldorado SKBO ------ ---
-loc2=Bucaramanga/Palonegro SKBG ------ ---
-loc3=Cali/Alfonso\\ Bonillaaragon SKCL ------ ---
-loc4=Cartagena/Rafael\\ Nunez SKCG ------ ---
-loc5=Leticia/Vasquez\\ Cobo SKLT ------ ---
-loc6=Pereira/Matecana SKPE ------ ---
-loc7=Rionegro/J.M.Cordova SKRG ------ ---
-loc8=San\\ Andres\\ Isla/Sesquicentenario SKSP ------ ---
-loc9=Santa\\ Marta/Simon\\ Bolivar SKSM ------ ---
-
-[M__EC]
-name=Ecuador
-loc0=Guayaquil/Simon\\ Bolivar SEGU ------ ---
-loc1=Manta SEMT ------ ---
-loc2=Quito/Mariscal\\ Sucre SEQU ------ ---
-
-[M__PY]
-name=Paraguay
-loc0=Asuncion SGAS ------ ---
-loc1=Guarany SGES ------ ---
-
-[M__PE]
-name=Peru
-loc0=Andahuayla SPHY ------ ---
-loc1=Arequipa SPQU ------ ---
-loc2=Ayacucho SPHO ------ ---
-loc3=Chiclayo SPHI ------ ---
-loc4=Cuzco SPZO ------ ---
-loc5=Huanuco SPNC ------ ---
-loc6=Iquitos SPQT ------ ---
-loc7=Juanjui SPJI ------ ---
-loc8=Juliaca SPJL ------ ---
-loc9=Lima-Callao SPIM ------ ---
-loc10=Pisco SPSO ------ ---
-loc11=Pucallpa SPCL ------ ---
-loc12=Puerto\\ Maldonado SPTU ------ ---
-loc13=Rioja SPJA ------ ---
-loc14=Tacna SPTN ------ ---
-loc15=Talara SPYL ------ ---
-loc16=Yurimaguas SPMS ------ ---
-
-[M__SR]
-name=Suriname
-loc0=Johan\\ A.\\ Pengel SMJP ------ ---
-
-[M__UY]
-name=Uruguay
-loc0=Artigas SUAG ------ ---
-loc1=Capitan\\ Corbeta SULS ------ ---
-loc2=Colonia SUCA ------ ---
-loc3=Durazno SUDU ------ ---
-loc4=Maldonado/Punta\\ Est SUPE ------ ---
-loc5=Melilla SUAA ------ ---
-loc6=Montevideo/Carrasco SUMU ------ ---
-loc7=Paysandu SUPU ------ ---
-loc8=Rivera SURV ------ ---
-loc9=Salto SUSO ------ ---
-loc10=Tacuarembo SUTB ------ ---
-
-[M__VE]
-name=Venezuela
-loc0=Acarigua SVAC ------ ---
-loc1=Barcelona SVBC ------ ---
-loc2=Barinas SVBI ------ ---
-loc3=Barquisimeto SVBM ------ ---
-loc4=Calabozo SVCL ------ ---
-loc5=Caracas\\ Maiquetia SVMI ------ ---
-loc6=Ciudad\\ Bolivar SVCB ------ ---
-loc7=Coro SVCR ------ ---
-loc8=Cumana SVCU ------ ---
-loc9=Guanare SVGU ------ ---
-loc10=Maracaibo-La\\ Chinita SVMC ------ ---
-loc11=Maracay-B.A.Sucre SVBS ------ ---
-loc12=Margarita SVMG ------ ---
-loc13=Mene\\ Grande SVMN ------ ---
-loc14=Merida SVMD ------ ---
-loc15=San\\ Antonio\\ Del\\ Tachira SVSA ------ ---
-loc16=San\\ Fernando\\ De\\ Apure SVSR ------ ---
-loc17=Valera* SVVL ------ ---
-loc18=Caracas\\ La\\ Carlota SVFM ----- ---
-
-[M__MX]
-name=Mexico
-loc0=Acapulco MMAA ------ ---
-loc1=Aeropuerto\\ del\\ Norte MMAN ------ ---
-loc2=Aguascaliantes MMAS ------ ---
-loc3=Bahias\\ de\\ Huatulco MMBT ------ ---
-loc4=Campeche MMCP ------ ---
-loc5=Cancun MMUN ------ ---
-loc6=Chetumal MMCM ------ ---
-loc7=Chihuahua MMCU ------ ---
-loc8=Ciudad\\ del\\ Carmen MMCE ------ ---
-loc9=Ciudad\\ Juarez MMCS ------ ---
-loc10=Ciudad\\ Obregon MMCN ------ ---
-loc11=Ciudad\\ Victoria MMCV ------ ---
-loc12=Colima MMIA ------ ---
-loc13=Cozumel MMCZ ------ ---
-loc14=Cuernavaca MMCB ------ ---
-loc15=Culiacan MMCL ------ ---
-loc16=Del\\ Bajio MMLO ------ ---
-loc17=Durango MMDO ------ ---
-loc18=Guadalajara MMGL ------ ---
-loc19=Guaymas MMGM ------ ---
-loc20=Hermosillo MMHO ------ ---
-loc21=Ixtapa MMZH ------ ---
-loc22=La\\ Paz MMLP ------ ---
-loc23=Los\\ Mochis MMLM ------ ---
-loc24=Manzanillo MMZO ------ ---
-loc25=Matamoros MMMA ------ ---
-loc26=Mazatlan MMMZ ------ ---
-loc27=Merida MMMD ------ ---
-loc28=Mexicali MMML ------ ---
-loc29=Mexico MMMX ------ ---
-loc30=Minatitlan MMMT ------ ---
-loc31=Monclova MMMV ------ ---
-loc32=Morelia MMMM ------ ---
-loc33=Monterrey MMMY ------ ---
-loc34=Nuevo\\ Laredo MMNL ------ ---
-loc35=Oaxaca MMOX ------ ---
-loc36=Piedras\\ Negras MMPG ------ ---
-loc37=Poza\\ Rica MMPA ------ ---
-loc38=Puebla MMPB ------ ---
-loc39=Puerto\\ Vallarta MMPR ------ ---
-loc40=Puerto\\ Escondido MMPS ------ ---
-loc41=Queretaro MMQT ------ ---
-loc42=Reynosa MMRX ------ ---
-loc43=Saltillo MMIO ------ ---
-loc44=San\\ Jose\\ del\\ Cabo MMSD ------ ---
-loc45=San\\ Luis\\ Potosi MMSP ------ ---
-loc46=Tampico MMTM ------ ---
-loc47=Tapachula MMTP ------ ---
-loc48=Tepic MMEP ------ ---
-loc49=Tijuana MMTJ ------ ---
-loc50=Toluca MMTO ------ ---
-loc51=Torreon MMTC ------ ---
-loc52=Tulancingo MMTL ------ ---
-loc53=Tuxtla\\ Gutierrez MMTG ------ ---
-loc54=Uruapan MMPN ------ ---
-loc55=Veracruz MMVR ------ ---
-loc56=Villahermosa MMVA ------ ---
-loc57=Zacatecas MMZC ------ ---
-
-[M__AR]
-name=Argentina
-loc0=Aeroparque SABE ------ ---
-loc1=Bahia\\ Blanca SAZB ------ ---
-loc2=Bariloche SAZS ------ ---
-loc3=Comodoro\\ Rivadavia SAVC ------ ---
-loc4=Concordia SAAC ------ ---
-loc5=Cordoba SACO ------ ---
-loc6=Corrientes SARC ------ ---
-loc7=Don\\ Torcuato SADD ------ ---
-loc8=Ezeiza SAEZ ------ ---
-loc9=Formosa SARF ------ ---
-loc10=Iguazu SARI ------ ---
-loc11=Jujuy SASJ ------ ---
-loc12=Mar\\ Del\\ Plata SAZM ------ ---
-loc13=Mendoza SAME ------ ---
-loc14=Neuquen SAZN ------ ---
-loc15=Paso\\ De\\ Los\\ Libres SARL ------ ---
-loc16=Posadas SARP ------ ---
-loc17=Resistencia SARE ------ ---
-loc18=Rio\\ Gallegos SAWG ------ ---
-loc19=Rio\\ Grande SAWE ------ ---
-loc20=Rosario SAAR ------ ---
-loc21=Salta SASA ------ ---
-loc22=San\\ Juan SANU ------ ---
-loc23=Santiago\\ Del\\ Estero SANE ------ ---
-loc24=Sauce\\ Viejo SAAV ------ ---
-loc25=Trelew SAVT ------ ---
-loc26=Tucuman SANT ------ ---
-loc27=Villa\\ Reynolds SAOR ------ ---
-
-[M__BR]
-name=Brazil
-loc0=Afonsos SBAF ------ ---
-loc1=Altamira SBHT ------ ---
-loc2=Aracaju SBAR ------ ---
-loc3=Bage SBBG ------ ---
-loc4=Bauru SBBU ------ ---
-loc5=Belem SBBE ------ ---
-loc6=Belo\\ Horizonte SBCF ------ ---
-loc7=Belo\\ Horizonte\\ Apt SBBH ------ ---
-loc8=Boa\\ Vista SBBV ------ ---
-loc9=Brasilia SBBR ------ ---
-loc10=Campinas SBKP ------ ---
-loc11=Campo\\ Grande SBCG ------ ---
-loc12=Caravelas SBCV ------ ---
-loc13=Conceicao\\ Do\\ Araguaia SBAA ------ ---
-loc14=Corumba SBCR ------ ---
-loc15=Cuiaba SBCY ------ ---
-loc16=Curitiba SBBI ------ ---
-loc17=Curitiba\\ Apt SBCT ------ ---
-loc18=Eduardo\\ Gomes\\ International SBEG ------ ---
-loc19=Fernando\\ De\\ Noronha SBFN ------ ---
-loc20=Florianopolis SBFL ------ ---
-loc21=Fortaleza SBFZ ------ ---
-loc22=Foz\\ Do\\ Iguacu SBFI ------ ---
-loc23=Galeao SBGL ------ ---
-loc24=Goiania SBGO ------ ---
-loc25=Guaratingueta SBGW ------ ---
-loc26=Guarulhos SBGR ------ ---
-loc27=Itaituba SBIH ------ ---
-loc28=Londrina SBLO ------ ---
-loc29=Macae SBME ------ ---
-loc30=Macapa SBMQ ------ ---
-loc31=Maceio SBMO ------ ---
-loc32=Manaus SBMN ------ ---
-loc33=Maraba SBMA ------ ---
-loc34=Marte SBMT ------ ---
-loc35=Natal SBNT ------ ---
-loc36=Pelotas SBPK ------ ---
-loc37=Pirassununga SBYS ------ ---
-loc38=Pocos\\ De\\ Caldas SBPC ------ ---
-loc39=Ponta\\ Pora SBPP ------ ---
-loc40=Porto\\ Alegre SBCO ------ ---
-loc41=Porto\\ Alegre\\ Apt SBPA ------ ---
-loc42=Porto\\ Velho SBPV ------ ---
-loc43=Presidente\\ Prudente SBDN ------ ---
-loc44=Recife SBRF ------ ---
-loc45=Rio\\ /\\ Jacarepagua SBJR ------ ---
-loc46=Rio\\ De\\ Janeiro SBRJ ------ ---
-loc47=Salvador SBSV ------ ---
-loc48=Santa\\ Cruz SBSC ------ ---
-loc49=Santa\\ Maria SBSM ------ ---
-loc50=Santarem SBSN ------ ---
-loc51=Santos SBST ------ ---
-loc52=Sao\\ Jose\\ Dos\\ Campo SBSJ ------ ---
-loc53=Sao\\ Luiz SBSL ------ ---
-loc54=Sao\\ Paulo SBSP ------ ---
-loc55=Tabatinga SBTT ------ ---
-loc56=Teresina SBTE ------ ---
-loc57=Tucurui SBTU ------ ---
-loc58=Uberaba SBUR ------ ---
-loc59=Uruguaiana SBUG ------ ---
-loc60=Vilhena SBVH ------ ---
-loc61=Vitoria SBVT ------ ---
-
-[AT]
-name=Atlantic
-states=AG PR
-
-[AT_PR]
-name=Puerto Rico
-loc0=Aquadilla TJBQ ------ ---
-loc1=San\\ Juan TJSJ ------ ---
-loc2=Mayaguez TJMZ ------ ---
-loc3=Ponce TJPS ------ ---
-
-[AT_AG]
-name=Antigua and Barbuda
-loc0=Antigua TAPA ------ ---
-
diff --git a/my-evolution/Makefile.am b/my-evolution/Makefile.am
deleted file mode 100644
index dabbfa8291..0000000000
--- a/my-evolution/Makefile.am
+++ /dev/null
@@ -1,104 +0,0 @@
-bin_PROGRAMS = evolution-executive-summary
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/shell \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/calendar \
- -I$(top_builddir)/calendar/cal-client \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- $(EXTRA_GNOME_CFLAGS) \
- $(GNOME_VFS_CFLAGS) \
- $(GTKHTML_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- $(BONOBO_GNOME_CFLAGS) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DG_LOG_DOMAIN=\"evolution-executive-summary\"
-
-IDLS = \
- $(top_srcdir)/mail/Mail.idl
-
-MAIL_GENERATED = \
- Mail.h \
- Mail-common.c \
- Mail-skels.c \
- Mail-stubs.c
-
-$(MAIL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) `$(GNOME_CONFIG) --cflags idl` $(top_srcdir)/mail/Mail.idl
-
-evolution_executive_summary_SOURCES = \
- $(MAIL_GENERATED) \
- component-factory.c \
- component-factory.h \
- e-summary.c \
- e-summary.h \
- e-summary-calendar.c \
- e-summary-calendar.h \
- e-summary-factory.c \
- e-summary-factory.h \
- e-summary-mail.c \
- e-summary-mail.h \
- e-summary-offline-handler.c \
- e-summary-offline-handler.h \
- e-summary-preferences.c \
- e-summary-preferences.h \
- e-summary-rdf.c \
- e-summary-rdf.h \
- e-summary-tasks.c \
- e-summary-tasks.h \
- e-summary-type.h \
- e-summary-weather.c \
- e-summary-weather.h \
- main.c \
- metar.c \
- metar.h \
- my-evolution-html.h \
- weather.h
-
-evolution_executive_summary_LDADD = \
- $(top_builddir)/calendar/gui/alarm-notify/libalarm.a \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/calendar/cal-client/libcal-client.la \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(top_builddir)/libwombat/libwombat.la \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(BONOBO_CONF_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- -lgal \
- $(GTKHTML_LIBS)
-
-Locationdir = $(datadir)/evolution
-Location_DATA = Locations
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Summary.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = my-evolution.glade
-
-@XML_I18N_MERGE_OAF_RULE@
-
-EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) $(Location_DATA) $(glade_DATA)
-
-if ENABLE_PURIFY
-PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-
-all-local: evolution-executive-summary.pure
-
-evolution-executive-summary.pure: evolution-executive-summary
- @rm -f evolution-executive-summary.pure
- $(PLINK) $(evolution_executive_summary_OBJECTS) $(evolution_executive_summary_LDADD) $(LIBS)
-
-endif
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/my-evolution/component-factory.c b/my-evolution/component-factory.c
deleted file mode 100644
index f2bd177298..0000000000
--- a/my-evolution/component-factory.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-
-#include <shell/evolution-shell-component.h>
-#include <shell/Evolution.h>
-
-#include "e-summary-factory.h"
-#include "e-summary-offline-handler.h"
-#include "component-factory.h"
-#include <gal/widgets/e-gui-utils.h>
-
-#define COMPONENT_ID "OAFIID:GNOME_Evolution_Summary_ShellComponent"
-
-static gint running_objects = 0;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "summary", "evolution-today.png", N_("Summary"), N_("Folder containing the Evolution Summary"), FALSE, NULL, NULL },
- { NULL, NULL }
-};
-
-static char *evolution_dir = NULL;
-
-/* EvolutionShellComponent methods and signals */
-
-static EvolutionShellComponentResult
-create_view (EvolutionShellComponent *shell,
- const char *physical_uri,
- const char *folder_type,
- BonoboControl **control_return,
- void *closure)
-{
- EvolutionShellClient *shell_client;
- ESummaryOfflineHandler *offline_handler;
- GNOME_Evolution_Shell corba_shell;
- BonoboControl *control;
-
- if (g_strcasecmp (folder_type, "Summary") != 0) {
- return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
- }
-
- offline_handler = gtk_object_get_data (GTK_OBJECT (shell),
- "offline-handler");
- shell_client = evolution_shell_component_get_owner (shell);
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
- control = e_summary_factory_new_control (physical_uri, corba_shell,
- offline_handler);
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_NOTFOUND;
-
- *control_return = control;
-
- return EVOLUTION_SHELL_COMPONENT_OK;
-}
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- if (evolution_dir != NULL) {
- evolution_dir = g_strdup (evolution_homedir);
- }
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- gpointer user_data)
-{
- gtk_main_quit ();
-}
-
-static void
-component_destroy (BonoboObject *factory,
- gpointer user_data)
-{
- running_objects--;
-
- if (running_objects > 0) {
- return;
- }
-
- gtk_main_quit ();
-}
-
-static BonoboObject *
-create_component (void)
-{
- EvolutionShellComponent *shell_component;
- ESummaryOfflineHandler *offline_handler;
-
- running_objects++;
-
- shell_component = evolution_shell_component_new (folder_types,
- NULL,
- create_view,
- NULL, NULL,
- NULL, NULL,
- NULL, NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "destroy",
- GTK_SIGNAL_FUNC (component_destroy), 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);
-
- offline_handler = e_summary_offline_handler_new ();
- gtk_object_set_data (GTK_OBJECT (shell_component), "offline-handler",
- offline_handler);
- bonobo_object_add_interface (BONOBO_OBJECT (shell_component), BONOBO_OBJECT (offline_handler));
-
- return BONOBO_OBJECT (shell_component);
-}
-
-void
-component_factory_init (void)
-{
- BonoboObject *object;
- int result;
-
- object = create_component ();
-
- result = oaf_active_server_register (COMPONENT_ID, bonobo_object_corba_objref (object));
- if (result == OAF_REG_ERROR) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's Executive Summary component."));
- exit (1);
- }
-}
diff --git a/my-evolution/component-factory.h b/my-evolution/component-factory.h
deleted file mode 100644
index fb1af710de..0000000000
--- a/my-evolution/component-factory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.h
- *
- * Copyright (C) 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifndef __COMPONENT_FACTORY_H__
-#define __COMPONENT_FACTORY_H__
-
-void component_factory_init (void);
-
-#endif
diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c
deleted file mode 100644
index 26336258c5..0000000000
--- a/my-evolution/e-summary-calendar.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-calendar.c
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "e-summary-calendar.h"
-#include "e-summary.h"
-#include <cal-client/cal-client.h>
-#include <cal-util/timeutil.h>
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <liboaf/liboaf.h>
-
-struct _ESummaryCalendar {
- CalClient *client;
-
- char *html;
- gboolean wants24hr;
-};
-
-const char *
-e_summary_calendar_get_html (ESummary *summary)
-{
- if (summary->calendar == NULL) {
- return NULL;
- }
-
- return summary->calendar->html;
-}
-
-typedef struct {
- char *uid;
- CalComponent *comp;
- CalComponentDateTime dt;
- icaltimezone *zone;
-} ESummaryCalEvent;
-
-/* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */
-static gboolean
-cal_component_compare_tzid (const char *tzid1, const char *tzid2)
-{
- gboolean retval = TRUE;
-
- if (tzid1) {
- if (!tzid2 || strcmp (tzid1, tzid2))
- retval = FALSE;
- } else {
- if (tzid2)
- retval = FALSE;
- }
-
- return retval;
-}
-
-gboolean
-e_cal_comp_util_compare_event_timezones (CalComponent *comp,
- CalClient *client,
- icaltimezone *zone)
-{
- CalClientGetStatus status;
- CalComponentDateTime start_datetime, end_datetime;
- const char *tzid;
- gboolean retval = FALSE;
- icaltimezone *start_zone, *end_zone;
- int offset1, offset2;
-
- tzid = icaltimezone_get_tzid (zone);
-
- cal_component_get_dtstart (comp, &start_datetime);
- cal_component_get_dtend (comp, &end_datetime);
-
- /* FIXME: DURATION may be used instead. */
- if (cal_component_compare_tzid (tzid, start_datetime.tzid)
- && cal_component_compare_tzid (tzid, end_datetime.tzid)) {
- /* If both TZIDs are the same as the given zone's TZID, then
- we know the timezones are the same so we return TRUE. */
- retval = TRUE;
- } else {
- /* If the TZIDs differ, we have to compare the UTC offsets
- of the start and end times, using their own timezones and
- the given timezone. */
- status = cal_client_get_timezone (client,
- start_datetime.tzid,
- &start_zone);
- if (status != CAL_CLIENT_GET_SUCCESS)
- goto out;
-
- offset1 = icaltimezone_get_utc_offset (start_zone,
- start_datetime.value,
- NULL);
- offset2 = icaltimezone_get_utc_offset (zone,
- start_datetime.value,
- NULL);
- if (offset1 == offset2) {
- status = cal_client_get_timezone (client,
- end_datetime.tzid,
- &end_zone);
- if (status != CAL_CLIENT_GET_SUCCESS)
- goto out;
-
- offset1 = icaltimezone_get_utc_offset (end_zone,
- end_datetime.value,
- NULL);
- offset2 = icaltimezone_get_utc_offset (zone,
- end_datetime.value,
- NULL);
- if (offset1 == offset2)
- retval = TRUE;
- }
- }
-
- out:
-
- cal_component_free_datetime (&start_datetime);
- cal_component_free_datetime (&end_datetime);
-
- return retval;
-}
-
-static int
-e_summary_calendar_event_sort_func (const void *e1,
- const void *e2)
-{
- ESummaryCalEvent *event1, *event2;
-
- event1 = *(ESummaryCalEvent **) e1;
- event2 = *(ESummaryCalEvent **) e2;
-
- if (event1->dt.value == NULL || event2->dt.value == NULL) {
- return 0;
- }
-
- return icaltime_compare (*(event1->dt.value), *(event2->dt.value));
-}
-
-static GPtrArray *
-uids_to_array (ESummary *summary,
- CalClient *client,
- GList *uids)
-{
- GList *p;
- GPtrArray *array;
-
- g_return_val_if_fail (IS_E_SUMMARY (summary), NULL);
- g_return_val_if_fail (client != NULL, NULL);
- g_return_val_if_fail (uids != NULL, NULL);
-
- array = g_ptr_array_new ();
- for (p = uids; p; p = p->next) {
- ESummaryCalEvent *event;
- CalClientGetStatus status;
-
- event = g_new (ESummaryCalEvent, 1);
-
- event->uid = g_strdup (p->data);
- status = cal_client_get_object (client, p->data, &event->comp);
- if (status != CAL_CLIENT_GET_SUCCESS) {
- g_free (event);
- continue;
- }
-
- cal_component_get_dtstart (event->comp, &event->dt);
-
- status = cal_client_get_timezone (client, event->dt.tzid, &event->zone);
- if (status != CAL_CLIENT_GET_SUCCESS) {
- gtk_object_unref (GTK_OBJECT (event->comp));
- g_free (event);
- continue;
- }
-
- icaltimezone_convert_time (event->dt.value, event->zone, summary->tz);
- g_ptr_array_add (array, event);
- }
-
- qsort (array->pdata, array->len, sizeof (ESummaryCalEvent *), e_summary_calendar_event_sort_func);
-
- return array;
-}
-
-static void
-free_event_array (GPtrArray *array)
-{
- int i;
-
- for (i = 0; i < array->len; i++) {
- ESummaryCalEvent *event;
-
- event = array->pdata[i];
- g_free (event->uid);
- gtk_object_unref (GTK_OBJECT (event->comp));
- }
-
- g_ptr_array_free (array, TRUE);
-}
-
-static gboolean
-generate_html (gpointer data)
-{
- ESummary *summary = data;
- ESummaryCalendar *calendar = summary->calendar;
- GList *uids;
- GString *string;
- char *tmp;
- time_t t, begin, end, f;
-
- t = time (NULL);
- begin = time_day_begin_with_zone (t, summary->tz);
- switch (summary->preferences->days) {
- case E_SUMMARY_CALENDAR_ONE_DAY:
- end = time_day_end_with_zone (t, summary->tz);
- break;
-
- case E_SUMMARY_CALENDAR_FIVE_DAYS:
- f = time_add_day (t, 5);
- end = time_day_end_with_zone (f, summary->tz);
- break;
-
- case E_SUMMARY_CALENDAR_ONE_WEEK:
- f = time_add_week (t, 1);
- end = time_day_end_with_zone (f, summary->tz);
- break;
-
- case E_SUMMARY_CALENDAR_ONE_MONTH:
- default:
- f = time_add_month (t, 1);
- end = time_day_end_with_zone (f, summary->tz);
- break;
- }
-
- uids = cal_client_get_objects_in_range (calendar->client,
- CALOBJ_TYPE_EVENT, begin, end);
- if (uids == NULL) {
- char *s1, *s2;
-
- s1 = e_utf8_from_locale_string (_("Appointments"));
- s2 = e_utf8_from_locale_string (_("No appointments"));
- g_free (calendar->html);
- calendar->html = g_strconcat ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Calendar\">",
- s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
- g_free (s1);
- g_free (s2);
-
- e_summary_draw (summary);
- return FALSE;
- } else {
- GPtrArray *uidarray;
- int i;
- char *s;
-
- string = g_string_new ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Calendar\">");
- s = e_utf8_from_locale_string (_("Appointments"));
- g_string_append (string, s);
- g_free (s);
- g_string_append (string, "</a></b></dt><dd>");
-
- uidarray = uids_to_array (summary, calendar->client, uids);
- for (i = 0; i < uidarray->len; i++) {
- ESummaryCalEvent *event;
- CalComponentText text;
- time_t start_t;
- struct tm *start_tm;
- char *start_str, *img;
-
- event = uidarray->pdata[i];
- cal_component_get_summary (event->comp, &text);
- start_t = icaltime_as_timet (*event->dt.value);
-
- start_str = g_new (char, 20);
- start_tm = localtime (&start_t);
- if (calendar->wants24hr == TRUE) {
- strftime (start_str, 19, _("%k%M %d %B"), start_tm);
- } else {
- strftime (start_str, 19, _("%l:%M %d %B"), start_tm);
- }
-
- if (cal_component_has_alarms (event->comp)) {
- img = "es-appointments.png";
- } else if (e_cal_comp_util_compare_event_timezones (event->comp,
- calendar->client,
- summary->tz) == FALSE) {
- img = "timezone-16.xpm";
- } else {
- img = "new_appointment.xpm";
- }
-
- tmp = g_strdup_printf ("<img align=\"middle\" src=\"%s\" "
- "alt=\"\" width=\"16\" height=\"16\"> &#160; "
- "<font size=\"-1\"><a href=\"calendar:/%s\">%s, %s</a></font><br>",
- img,
- event->uid, start_str, text.value);
- g_free (start_str);
-
- g_string_append (string, tmp);
- g_free (tmp);
- }
-
- free_event_array (uidarray);
- g_string_append (string, "</dd></dl>");
- }
-
- if (calendar->html) {
- g_free (calendar->html);
- }
- calendar->html = string->str;
- g_string_free (string, FALSE);
-
- e_summary_draw (summary);
- return FALSE;
-}
-
-static void
-cal_opened_cb (CalClient *client,
- CalClientOpenStatus status,
- ESummary *summary)
-{
- if (status == CAL_CLIENT_OPEN_SUCCESS) {
- g_idle_add (generate_html, summary);
- } else {
- /* Need to work out what to do if there's an error */
- }
-}
-static void
-obj_changed_cb (CalClient *client,
- const char *uid,
- gpointer data)
-{
- g_idle_add (generate_html, data);
-}
-
-static void
-e_summary_calendar_protocol (ESummary *summary,
- const char *uri,
- void *closure)
-{
- ESummaryCalendar *calendar;
- CORBA_Environment ev;
- const char *comp_uri;
- GNOME_Evolution_Calendar_CompEditorFactory factory;
-
- calendar = (ESummaryCalendar *) closure;
-
- comp_uri = cal_client_get_uri (calendar->client);
-
- /* Get the factory */
- CORBA_exception_init (&ev);
- factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", 0, NULL, &ev);
- if (BONOBO_EX (&ev)) {
- g_message ("%s: Could not activate the component editor factory (%s)", __FUNCTION__,
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, comp_uri, (char *)uri + 10, &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("%s: Execption while editing the component (%s)", __FUNCTION__,
- CORBA_exception_id (&ev));
- }
-
- CORBA_exception_free (&ev);
- bonobo_object_release_unref (factory, NULL);
-}
-
-static gboolean
-locale_uses_24h_time_format (void)
-{
- char s[16];
- time_t t = 0;
-
- strftime (s, sizeof s, "%p", gmtime (&t));
- return s[0] == '\0';
-}
-
-void
-e_summary_calendar_init (ESummary *summary)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- ESummaryCalendar *calendar;
- gboolean result;
- char *uri;
-
- g_return_if_fail (summary != NULL);
-
- calendar = g_new (ESummaryCalendar, 1);
- summary->calendar = calendar;
- calendar->html = NULL;
-
- calendar->client = cal_client_new ();
- if (calendar->client == NULL) {
- g_warning ("Error making the client");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (calendar->client), "cal-opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), summary);
- gtk_signal_connect (GTK_OBJECT (calendar->client), "obj-updated",
- GTK_SIGNAL_FUNC (obj_changed_cb), summary);
- gtk_signal_connect (GTK_OBJECT (calendar->client), "obj-removed",
- GTK_SIGNAL_FUNC (obj_changed_cb), summary);
-
- uri = gnome_util_prepend_user_home ("evolution/local/Calendar/calendar.ics");
- result = cal_client_open_calendar (calendar->client, uri, FALSE);
- g_free (uri);
- if (result == FALSE) {
- g_message ("Open calendar failed");
- }
-
- e_summary_add_protocol_listener (summary, "calendar", e_summary_calendar_protocol, calendar);
-
- CORBA_exception_init (&ev);
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- g_warning ("Error getting Wombat. Using defaults");
- return;
- }
-
- calendar->wants24hr = bonobo_config_get_boolean_with_default (db, "/Calendar/Display/Use24HourFormat", locale_uses_24h_time_format (), NULL);
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_calendar_reconfigure (ESummary *summary)
-{
- generate_html (summary);
-}
-
-void
-e_summary_calendar_free (ESummary *summary)
-{
- ESummaryCalendar *calendar;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- calendar = summary->calendar;
- gtk_object_unref (GTK_OBJECT (calendar->client));
- g_free (calendar->html);
-
- g_free (calendar);
- summary->calendar = NULL;
-}
diff --git a/my-evolution/e-summary-calendar.h b/my-evolution/e-summary-calendar.h
deleted file mode 100644
index 2e65f24e86..0000000000
--- a/my-evolution/e-summary-calendar.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-calendar.h
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifndef __E_SUMMARY_CALENDAR_H__
-#define __E_SUMMARY_CALENDAR_H__
-
-#include "e-summary-type.h"
-
-typedef enum _ESummaryCalendarDays {
- E_SUMMARY_CALENDAR_ONE_DAY,
- E_SUMMARY_CALENDAR_FIVE_DAYS,
- E_SUMMARY_CALENDAR_ONE_WEEK,
- E_SUMMARY_CALENDAR_ONE_MONTH
-} ESummaryCalendarDays;
-
-typedef enum _ESummaryCalendarNumTasks {
- E_SUMMARY_CALENDAR_ALL_TASKS,
- E_SUMMARY_CALENDAR_TODAYS_TASKS
-} ESummaryCalendarNumTasks;
-
-typedef struct _ESummaryCalendar ESummaryCalendar;
-
-const char *e_summary_calendar_get_html (ESummary *summary);
-void e_summary_calendar_init (ESummary *summary);
-void e_summary_calendar_reconfigure (ESummary *summary);
-void e_summary_calendar_free (ESummary *summary);
-#endif
diff --git a/my-evolution/e-summary-factory.c b/my-evolution/e-summary-factory.c
deleted file mode 100644
index 0181113a58..0000000000
--- a/my-evolution/e-summary-factory.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-factory.c
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-ui-util.h>
-
-#include "e-util/e-gui-utils.h"
-
-#include "e-summary.h"
-#include "e-summary-factory.h"
-#include "e-summary-offline-handler.h"
-#include "e-summary-preferences.h"
-#include "evolution-shell-component-utils.h" /* For E_PIXMAP */
-
-BonoboUIVerb verbs[] = {
- BONOBO_UI_VERB ("PrintMyEvolution", e_summary_print),
- BONOBO_UI_VERB ("ToolsSettings", e_summary_configure),
- BONOBO_UI_VERB ("Reload", e_summary_reload),
- BONOBO_UI_VERB_END
-};
-
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/commands/PrintMyEvolution", "print.xpm"),
- E_PIXMAP ("/commands/ToolsSettings", "configure_16_mail.xpm"),
- E_PIXMAP ("/Toolbar/PrintMyEvolution", "buttons/print.png"),
- E_PIXMAP_END
-};
-
-static void
-control_activate (BonoboControl *control,
- BonoboUIComponent *ui_component,
- ESummary *summary)
-{
- Bonobo_UIContainer container;
-
- container = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (ui_component, container);
- bonobo_object_release_unref (container, NULL);
-
- bonobo_ui_component_add_verb_list_with_data (ui_component, verbs, summary);
- bonobo_ui_component_freeze (ui_component, NULL);
-
- bonobo_ui_util_set_ui (ui_component, EVOLUTION_DATADIR,
- "my-evolution.xml", "my-evolution");
- e_pixmaps_update (ui_component, pixmaps);
-
- bonobo_ui_component_thaw (ui_component, NULL);
- e_summary_thaw (summary);
-}
-
-static void
-control_deactivate (BonoboControl *control,
- BonoboUIComponent *ui_component,
- ESummary *summary)
-{
- bonobo_ui_component_unset_container (ui_component);
- e_summary_freeze (summary);
-}
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
- ESummary *summary)
-{
- BonoboUIComponent *ui_component;
-
- ui_component = bonobo_control_get_ui_component (control);
-
- if (summary->shell_view_interface == NULL) {
- Bonobo_ControlFrame control_frame;
- CORBA_Environment ev;
-
- control_frame = bonobo_control_get_control_frame (control);
- if (control_frame == NULL) {
- goto out;
- }
-
- CORBA_exception_init (&ev);
- summary->shell_view_interface = Bonobo_Unknown_queryInterface (control_frame, "IDL:GNOME/Evolution/ShellView:1.0", &ev);
-
- if (BONOBO_EX (&ev)) {
- g_warning ("Error getting ShellView. %s", CORBA_exception_id (&ev));
- summary->shell_view_interface = CORBA_OBJECT_NIL;
- }
- CORBA_exception_free (&ev);
- }
- out:
-
- if (activate)
- control_activate (control, ui_component, summary);
- else
- control_deactivate (control, ui_component, summary);
-}
-
-static void
-control_destroy_cb (BonoboControl *control,
- ESummary *summary)
-{
- gtk_object_destroy (GTK_OBJECT (summary));
-}
-
-BonoboControl *
-e_summary_factory_new_control (const char *uri,
- const GNOME_Evolution_Shell shell,
- ESummaryOfflineHandler *handler)
-{
- BonoboControl *control;
- GtkWidget *summary;
-
- summary = e_summary_new (shell);
- if (summary == NULL) {
- return NULL;
- }
-
- e_summary_offline_handler_set_summary (handler, E_SUMMARY (summary));
- gtk_widget_show (summary);
-
- control = bonobo_control_new (summary);
-
- if (control == NULL) {
- gtk_object_destroy (GTK_OBJECT (summary));
- return NULL;
- }
-
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- control_activate_cb, summary);
- gtk_signal_connect (GTK_OBJECT (control), "destroy",
- control_destroy_cb, summary);
-
- return control;
-}
diff --git a/my-evolution/e-summary-factory.h b/my-evolution/e-summary-factory.h
deleted file mode 100644
index c8aea2d0da..0000000000
--- a/my-evolution/e-summary-factory.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-factory.h
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifndef __E_SUMMARY_FACTORY_H__
-#define __E_SUMMARY_FACTORY_H__
-
-#include "e-summary-offline-handler.h"
-
-BonoboControl *e_summary_factory_new_control (const char *uri,
- const GNOME_Evolution_Shell shell,
- ESummaryOfflineHandler *handler);
-
-#endif
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
deleted file mode 100644
index 69d7ebe611..0000000000
--- a/my-evolution/e-summary-mail.c
+++ /dev/null
@@ -1,577 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-mail.c
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <liboaf/liboaf.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "Mail.h"
-#include "e-summary.h"
-#include "e-summary-mail.h"
-
-#include "e-util/e-path.h"
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h> /* gnome_util_prepend_user_home */
-#include <gtk/gtksignal.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-listener.h>
-
-#include <Evolution.h>
-#include <evolution-storage-listener.h>
-
-#define MAIL_IID "OAFIID:GNOME_Evolution_FolderInfo"
-
-struct _ESummaryMail {
- GNOME_Evolution_FolderInfo folder_info;
- BonoboListener *listener;
- EvolutionStorageListener *storage_listener;
-
- GHashTable *folders;
- GList *shown;
- ESummaryMailMode mode;
-
- char *html;
-};
-
-typedef struct _ESummaryMailFolder {
- char *name;
- char *path;
-
- int count;
- int unread;
-
- gboolean init; /* Has this folder been initialised? */
-} ESummaryMailFolder;
-
-const char *
-e_summary_mail_get_html (ESummary *summary)
-{
- if (summary->mail == NULL) {
- return NULL;
- }
-
- return summary->mail->html;
-}
-
-/* Work out what to do with folder names */
-static char *
-make_pretty_foldername (ESummary *summary,
- const char *foldername)
-{
- char *pretty;
-
- if (summary->preferences->show_full_path == FALSE) {
- if ((pretty = strrchr (foldername, '/'))) {
- return g_strdup (pretty + 1);
- } else {
- return g_strdup (foldername);
- }
- } else {
- return g_strdup (foldername);
- }
-}
-
-static void
-folder_gen_html (ESummary *summary,
- ESummaryMailFolder *folder,
- GString *string)
-{
- char *str, *pretty_name, *uri;
-
- pretty_name = make_pretty_foldername (summary, folder->name);
- uri = g_strconcat ("evolution:/local", folder->name, NULL);
- str = g_strdup_printf ("<tr><td><a href=\"%s\"><pre>%s</pre></a></td><td align=\"Left\"><pre>%d/%d</pre></td></tr>",
- uri, pretty_name, folder->unread, folder->count);
- g_free (uri);
- g_string_append (string, str);
- g_free (pretty_name);
- g_free (str);
-}
-
-static void
-e_summary_mail_generate_html (ESummary *summary)
-{
- ESummaryMail *mail;
- GString *string;
- GList *p;
- gchar *s;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- mail = summary->mail;
- string = g_string_new ("<dl><dt><img src=\"myevo-mail-summary.png\" "
- "align=\"middle\" alt=\"\" width=\"48\" "
- "height=\"48\"> <b><a href=\"evolution:/local/Inbox\">");
- s = e_utf8_from_locale_string (_("Mail summary"));
- g_string_append (string, s);
- g_free (s);
- g_string_append (string, "</a></b></dt><dd><table numcols=\"2\" width=\"100%\">");
-
- for (p = mail->shown; p; p = p->next) {
- folder_gen_html (summary, p->data, string);
- }
-
- g_string_append (string, "</table></dd></dl>");
- g_free (mail->html);
- mail->html = string->str;
- g_string_free (string, FALSE);
-}
-
-static void
-e_summary_mail_get_info (ESummaryMail *mail,
- const char *uri,
- BonoboListener *listener)
-{
- Bonobo_Listener corba_listener;
- CORBA_Environment ev;
-
- g_return_if_fail (mail != NULL);
- g_return_if_fail (mail->folder_info != CORBA_OBJECT_NIL);
-
- corba_listener = bonobo_object_corba_objref (BONOBO_OBJECT (listener));
- CORBA_exception_init (&ev);
- GNOME_Evolution_FolderInfo_getInfo (mail->folder_info, uri ? uri : "",
- corba_listener, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Error getting info for %s:\n%s", uri,
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
- return;
-}
-
-static void
-new_folder_cb (EvolutionStorageListener *listener,
- const char *path,
- const GNOME_Evolution_Folder *folder,
- ESummary *summary)
-{
- ESummaryMail *mail;
- ESummaryMailFolder *mail_folder;
- GList *p;
-
- /* Don't care about non mail */
- if (strcmp (folder->type, "mail") != 0 ||
- strncmp (folder->physicalUri, "file://", 7) != 0) {
- return;
- }
-
- mail = summary->mail;
-
- mail_folder = g_new (ESummaryMailFolder, 1);
- mail_folder->path = g_strdup (folder->physicalUri);
- mail_folder->name = g_strdup (path);
- mail_folder->count = -1;
- mail_folder->unread = -1;
- mail_folder->init = FALSE;
-
- g_hash_table_insert (mail->folders, mail_folder->path, mail_folder);
-
- for (p = summary->preferences->display_folders; p; p = p->next) {
- char *uri;
-
- uri = g_strconcat ("file://", p->data, NULL);
- if (strcmp (uri, folder->physicalUri) == 0) {
- mail->shown = g_list_append (mail->shown, mail_folder);
- e_summary_mail_get_info (mail, mail_folder->path,
- mail->listener);
- }
- g_free (uri);
- }
-}
-
-static void
-update_folder_cb (EvolutionStorageListener *listener,
- const char *path,
- const char *display_name,
- ESummary *summary)
-{
- char *evolution_dir;
- char *proto;
- char *uri;
-
- evolution_dir = gnome_util_prepend_user_home ("evolution/local");
-
- proto = g_strconcat ("file://", evolution_dir, NULL);
- uri = e_path_to_physical (proto, path);
-
- e_summary_mail_get_info (summary->mail, uri, summary->mail->listener);
-
- g_free (uri);
- g_free (evolution_dir);
- g_free (proto);
-}
-
-static void
-remove_folder_cb (EvolutionStorageListener *listener,
- const char *path,
- ESummary *summary)
-{
- ESummaryMail *mail;
- ESummaryMailFolder *mail_folder;
- GList *p;
-
- mail = summary->mail;
- mail_folder = g_hash_table_lookup (mail->folders, path);
- if (mail_folder == NULL) {
- return;
- }
-
- /* Check if we're displaying it, because we can't display it if it
- doesn't exist :) */
- for (p = mail->shown; p; p = p->next) {
- if (p->data == mail_folder) {
- mail->shown = g_list_remove_link (mail->shown, p);
- g_list_free (p);
- }
- }
-
- g_hash_table_remove (mail->folders, path);
- g_free (mail_folder->name);
- g_free (mail_folder->path);
- g_free (mail_folder);
-}
-
-static void
-mail_change_notify (BonoboListener *listener,
- const char *name,
- const BonoboArg *arg,
- CORBA_Environment *ev,
- ESummary *summary)
-{
- GNOME_Evolution_FolderInfo_MessageCount *count;
- ESummaryMail *mail;
- ESummaryMailFolder *folder;
- GList *p;
-
- mail = summary->mail;
-
- count = arg->_value;
- folder = g_hash_table_lookup (mail->folders, count->path);
-
- if (folder == NULL) {
- return;
- }
-
- folder->count = count->count;
- folder->unread = count->unread;
- folder->init = TRUE;
-
- /* Are we displaying this folder? */
- for (p = summary->preferences->display_folders; p; p = p->next) {
- char *uri;
-
- uri = g_strconcat ("file://", p->data, NULL);
- if (strcmp (uri, folder->path) == 0) {
- /* Regen HTML */
- e_summary_mail_generate_html (summary);
- e_summary_draw (summary);
-
- g_free (uri);
- return;
- }
-
- g_free (uri);
- }
-}
-
-static void
-e_summary_mail_protocol (ESummary *summary,
- const char *uri,
- void *closure)
-{
-}
-
-static gboolean
-e_summary_mail_register_storage (ESummary *summary,
- GNOME_Evolution_Storage corba_storage)
-{
- ESummaryMail *mail;
- EvolutionStorageListener *listener;
- GNOME_Evolution_StorageListener corba_listener;
- CORBA_Environment ev;
-
- mail = summary->mail;
-
- if (mail->storage_listener == NULL) {
- mail->storage_listener = evolution_storage_listener_new ();
-
- gtk_signal_connect (GTK_OBJECT (mail->storage_listener), "new-folder",
- GTK_SIGNAL_FUNC (new_folder_cb), summary);
- gtk_signal_connect (GTK_OBJECT (mail->storage_listener), "removed-folder",
- GTK_SIGNAL_FUNC (remove_folder_cb), summary);
- gtk_signal_connect (GTK_OBJECT (mail->storage_listener), "update_folder",
- GTK_SIGNAL_FUNC (update_folder_cb), summary);
- }
- listener = mail->storage_listener;
-
- corba_listener = evolution_storage_listener_corba_objref (listener);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Storage_addListener (corba_storage, corba_listener, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Exception adding listener: %s",
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
-
- g_free (mail);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-static gboolean
-e_summary_mail_register_storages (ESummary *summary,
- GNOME_Evolution_Shell corba_shell)
-{
- GNOME_Evolution_Storage local_storage;
- CORBA_Environment ev;
-
- g_return_val_if_fail (summary != NULL, FALSE);
- g_return_val_if_fail (IS_E_SUMMARY (summary), FALSE);
-
- CORBA_exception_init (&ev);
- local_storage = GNOME_Evolution_Shell_getLocalStorage (corba_shell, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Exception getting local storage: %s",
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
-
- return FALSE;
- }
- CORBA_exception_free (&ev);
-
- if (e_summary_mail_register_storage (summary, local_storage))
- return TRUE;
- else
- return FALSE;
-}
-
-void
-e_summary_mail_init (ESummary *summary,
- GNOME_Evolution_Shell corba_shell)
-{
- ESummaryMail *mail;
- CORBA_Environment ev;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- mail = g_new0 (ESummaryMail, 1);
- summary->mail = mail;
-
- CORBA_exception_init (&ev);
- mail->folder_info = oaf_activate_from_id (MAIL_IID, 0, NULL, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Exception creating FolderInfo: %s",
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
-
- g_free (mail);
- return;
- }
-
- /* Create a BonoboListener for all the notifies. */
- mail->listener = bonobo_listener_new (NULL, NULL);
- gtk_signal_connect (GTK_OBJECT (mail->listener), "event-notify",
- GTK_SIGNAL_FUNC (mail_change_notify), summary);
-
- /* Create a hash table for the folders */
- mail->folders = g_hash_table_new (g_str_hash, g_str_equal);
- mail->shown = NULL;
-
- e_summary_mail_register_storages (summary, corba_shell);
- e_summary_add_protocol_listener (summary, "mail", e_summary_mail_protocol, mail);
- return;
-}
-
-void
-e_summary_mail_reconfigure (ESummary *summary)
-{
- ESummaryMail *mail;
- GList *old, *p;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- mail = summary->mail;
- old = mail->shown;
- mail->shown = NULL;
-
- for (p = summary->preferences->display_folders; p; p = p->next) {
- ESummaryMailFolder *folder;
- char *uri;
-
- uri = g_strconcat ("file://", p->data, NULL);
- folder = g_hash_table_lookup (mail->folders, uri);
- if (folder != NULL) {
- if (folder->init == FALSE) {
- e_summary_mail_get_info (mail, folder->path,
- mail->listener);
- }
- mail->shown = g_list_append (mail->shown, folder);
- }
-
- g_free (uri);
- }
-
- /* Free the old list */
- g_list_free (old);
-
- e_summary_mail_generate_html (summary);
- e_summary_draw (summary);
-}
-
-static void
-free_row_data (gpointer data)
-{
- ESummaryMailRowData *rd = data;
-
- g_free (rd->name);
- g_free (rd->uri);
- g_free (rd);
-}
-
-static void
-hash_to_list (gpointer key,
- gpointer value,
- gpointer data)
-{
- ESummaryMailRowData *rd;
- ESummaryMailFolder *folder;
- GList **p;
-
- p = (GList **) data;
- folder = (ESummaryMailFolder *) value;
-
- rd = g_new (ESummaryMailRowData, 1);
- rd->name = g_strdup (folder->name);
- rd->uri = g_strdup (key);
-
- *p = g_list_prepend (*p, rd);
-}
-
-static int
-str_compare (gconstpointer a,
- gconstpointer b)
-{
- ESummaryMailRowData *rda, *rdb;
-
- rda = (ESummaryMailRowData *) a;
- rdb = (ESummaryMailRowData *) b;
- return strcmp (rda->name, rdb->name);
-}
-
-void
-e_summary_mail_fill_list (GtkCList *clist,
- ESummary *summary)
-{
- ESummaryMail *mail;
- GList *names = NULL, *p;
-
- mail = summary->mail;
- if (mail == NULL) {
- return;
- }
-
- g_hash_table_foreach (mail->folders, hash_to_list, &names);
-
- names = g_list_sort (names, str_compare);
- for (p = names; p; p = p->next) {
- ESummaryMailRowData *rd;
- char *text[1];
- int row;
-
- rd = p->data;
- text[0] = rd->name + 1;
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data_full (clist, row, rd, free_row_data);
- }
-
- g_list_free (names);
-}
-
-const char *
-e_summary_mail_uri_to_name (ESummary *summary,
- const char *uri)
-{
- ESummaryMailFolder *folder;
-
- folder = g_hash_table_lookup (summary->mail->folders, uri);
- if (folder == NULL) {
- return NULL;
- } else {
- return folder->name;
- }
-}
-
-static void
-free_folder (gpointer key,
- gpointer value,
- gpointer data)
-{
- ESummaryMailFolder *folder = value;
-
- g_free (folder->name);
- g_free (folder->path);
- g_free (folder);
-}
-
-void
-e_summary_mail_free (ESummary *summary)
-{
- ESummaryMail *mail;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- mail = summary->mail;
- bonobo_object_release_unref (mail->folder_info, NULL);
- bonobo_object_unref (BONOBO_OBJECT (mail->listener));
-
- g_hash_table_foreach (mail->folders, free_folder, NULL);
- g_hash_table_destroy (mail->folders);
-
- g_free (mail->html);
-
- gtk_signal_disconnect_by_func (GTK_OBJECT (mail->storage_listener),
- GTK_SIGNAL_FUNC (new_folder_cb), summary);
- gtk_signal_disconnect_by_func (GTK_OBJECT (mail->storage_listener),
- GTK_SIGNAL_FUNC (remove_folder_cb), summary);
- gtk_signal_disconnect_by_func (GTK_OBJECT (mail->storage_listener),
- GTK_SIGNAL_FUNC (update_folder_cb), summary);
-
- g_free (mail);
- summary->mail = NULL;
-}
diff --git a/my-evolution/e-summary-mail.h b/my-evolution/e-summary-mail.h
deleted file mode 100644
index 00cf700234..0000000000
--- a/my-evolution/e-summary-mail.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-mail.h
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifndef __E_SUMMARY_MAIL_H__
-#define __E_SUMMARY_MAIL_H__
-
-#include "e-summary-type.h"
-#include <Evolution.h>
-#include <gtk/gtkclist.h>
-
-typedef enum _ESummaryMailMode ESummaryMailMode;
-enum _ESummaryMailMode {
- E_SUMMARY_MAIL_MODE_ONLY,
- E_SUMMARY_MAIL_MODE_EXCLUDING
-};
-
-typedef struct _ESummaryMailRowData ESummaryMailRowData;
-typedef struct _ESummaryMail ESummaryMail;
-
-struct _ESummaryMailRowData {
- char *name;
- char *uri;
-};
-
-const char *e_summary_mail_get_html (ESummary *summary);
-void e_summary_mail_init (ESummary *summary,
- GNOME_Evolution_Shell corba_shell);
-void e_summary_mail_reconfigure (ESummary *summary);
-void e_summary_mail_free (ESummary *summary);
-void e_summary_mail_fill_list (GtkCList *clist,
- ESummary *summary);
-const char *e_summary_mail_uri_to_name (ESummary *summary,
- const char *uri);
-#endif
diff --git a/my-evolution/e-summary-offline-handler.c b/my-evolution/e-summary-offline-handler.c
deleted file mode 100644
index b0b1bc5efc..0000000000
--- a/my-evolution/e-summary-offline-handler.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-offline-handler.c
- *
- * 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:
- * Ettore Perazzoli <ettore@ximian.com>
- * Dan Winship <danw@ximian.com>
- * Iain Holmes <iain@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-summary-offline-handler.h"
-#include "e-summary.h"
-
-#include <bonobo/bonobo-exception.h>
-#include <gtk/gtkmain.h>
-#include <gal/util/e-util.h>
-
-#define PARENT_TYPE bonobo_x_object_get_type ()
-static BonoboXObjectClass *parent_class = NULL;
-
-struct _ESummaryOfflineHandlerPriv {
- ESummary *summary;
- GNOME_Evolution_OfflineProgressListener listener_interface;
-};
-
-GNOME_Evolution_ConnectionList *
-e_summary_offline_handler_create_connection_list (ESummary *summary)
-{
- GNOME_Evolution_ConnectionList *list;
- GList *connections, *p;
-
- list = GNOME_Evolution_ConnectionList__alloc ();
- list->_length = 0;
- list->_maximum = e_summary_count_connections (summary);
- list->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (list->_maximum);
-
- connections = e_summary_add_connections (summary);
- for (p = connections; p; p = p->next) {
- ESummaryConnectionData *data;
-
- data = p->data;
- list->_buffer[list->_length].hostName = CORBA_string_dup (data->hostname);
- list->_buffer[list->_length].type = CORBA_string_dup (data->type);
- list->_length++;
-
- g_free (data->hostname);
- g_free (data->type);
- g_free (data);
- }
- g_list_free (connections);
-
- return list;
-}
-
-/* GNOME::Evolution::Offline methods. */
-static CORBA_boolean
-impl__get_isOffline (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- ESummaryOfflineHandler *offline_handler;
-
- offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- return offline_handler->priv->summary->online;
-}
-
-static void
-impl_prepareForOffline (PortableServer_Servant servant,
- GNOME_Evolution_ConnectionList **active_connection_list,
- CORBA_Environment *ev)
-{
- ESummaryOfflineHandler *offline_handler;
- ESummaryOfflineHandlerPriv *priv;
-
- offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- *active_connection_list = e_summary_offline_handler_create_connection_list (priv->summary);
-}
-
-static void
-went_offline (ESummary *summary,
- void *data)
-{
- ESummaryOfflineHandler *offline_handler = data;
- ESummaryOfflineHandlerPriv *priv;
- CORBA_Environment ev;
- GNOME_Evolution_ConnectionList *connection_list;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
- g_return_if_fail (offline_handler != NULL);
-
- priv = offline_handler->priv;
- connection_list = e_summary_offline_handler_create_connection_list (summary);
-
- CORBA_exception_init (&ev);
-
- g_warning ("Went offline");
- GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface, connection_list, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Error updating offline progress: %s",
- CORBA_exception_id (&ev));
- }
-
- CORBA_exception_free (&ev);
-}
-
-static void
-impl_goOffline (PortableServer_Servant servant,
- const GNOME_Evolution_OfflineProgressListener progress_listener,
- CORBA_Environment *ev)
-{
- ESummaryOfflineHandler *offline_handler;
- ESummaryOfflineHandlerPriv *priv;
-
- offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- priv = offline_handler->priv;
-
- priv->listener_interface = CORBA_Object_duplicate (progress_listener, ev);
-
- e_summary_set_online (priv->summary, progress_listener, FALSE, went_offline, offline_handler);
-}
-
-static void
-impl_goOnline (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- ESummaryOfflineHandler *offline_handler;
-
- offline_handler = E_SUMMARY_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
- e_summary_set_online (offline_handler->priv->summary, NULL, TRUE, NULL, NULL);
-}
-
-/* GtkObject methods */
-static void
-impl_destroy (GtkObject *object)
-{
- ESummaryOfflineHandler *offline_handler;
- ESummaryOfflineHandlerPriv *priv;
-
- offline_handler = E_SUMMARY_OFFLINE_HANDLER (object);
- priv = offline_handler->priv;
-
- if (priv == NULL) {
- return;
- }
-
- if (priv->listener_interface != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- CORBA_Object_release (priv->listener_interface, &ev);
- CORBA_exception_free (&ev);
- }
-
- gtk_object_unref (GTK_OBJECT (priv->summary));
-
- offline_handler->priv = NULL;
- g_free (priv);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL) {
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
- }
-}
-
-static void
-e_summary_offline_handler_class_init (ESummaryOfflineHandlerClass *klass)
-{
- GtkObjectClass *object_class;
- POA_GNOME_Evolution_Offline__epv *epv;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = impl_destroy;
-
- epv = &klass->epv;
- epv->_get_isOffline = impl__get_isOffline;
- epv->prepareForOffline = impl_prepareForOffline;
- epv->goOffline = impl_goOffline;
- epv->goOnline = impl_goOnline;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-e_summary_offline_handler_init (ESummaryOfflineHandler *offline_handler)
-{
- ESummaryOfflineHandlerPriv *priv;
-
- priv = g_new0 (ESummaryOfflineHandlerPriv, 1);
-
- offline_handler->priv = priv;
-}
-
-ESummaryOfflineHandler *
-e_summary_offline_handler_new (void)
-{
- ESummaryOfflineHandler *new;
-
- new = gtk_type_new (e_summary_offline_handler_get_type ());
-
- return new;
-}
-
-void
-e_summary_offline_handler_set_summary (ESummaryOfflineHandler *handler,
- ESummary *summary)
-{
- g_return_if_fail (handler != NULL);
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- handler->priv->summary = summary;
- gtk_object_ref (GTK_OBJECT (summary));
-}
-
-BONOBO_X_TYPE_FUNC_FULL (ESummaryOfflineHandler, GNOME_Evolution_Offline, PARENT_TYPE, e_summary_offline_handler);
diff --git a/my-evolution/e-summary-offline-handler.h b/my-evolution/e-summary-offline-handler.h
deleted file mode 100644
index 2118ed8e09..0000000000
--- a/my-evolution/e-summary-offline-handler.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-offline-handler.h
- *
- * 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:
- * Ettore Perazzoli <ettore@ximian.com>
- * Dan Winship <danw@ximian.com>
- * Iain Holmes <iain@ximian.com>
- */
-
-#ifndef __E_SUMMARY_OFFLINE_HANDLER_H__
-#define __E_SUMMARY_OFFLINE_HANDLER_H__
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-xobject.h>
-#include "e-summary.h"
-#include "Evolution.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif
-
-#define E_SUMMARY_TYPE_OFFLINE_HANDLER (e_summary_offline_handler_get_type ())
-#define E_SUMMARY_OFFLINE_HANDLER(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE_OFFLINE_HANDLER, ESummaryOfflineHandler))
-#define E_SUMMARY_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE_OFFLINE_HANDLER, ESummaryOfflineHandlerClass))
-
-
-typedef struct _ESummaryOfflineHandler ESummaryOfflineHandler;
-typedef struct _ESummaryOfflineHandlerPriv ESummaryOfflineHandlerPriv;
-typedef struct _ESummaryOfflineHandlerClass ESummaryOfflineHandlerClass;
-
-struct _ESummaryOfflineHandler {
- BonoboXObject parent;
-
- ESummaryOfflineHandlerPriv *priv;
-};
-
-struct _ESummaryOfflineHandlerClass {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Offline__epv epv;
-};
-
-
-GtkType e_summary_offline_handler_get_type (void);
-ESummaryOfflineHandler *e_summary_offline_handler_new (void);
-void e_summary_offline_handler_set_summary (ESummaryOfflineHandler *handler,
- ESummary *summary);
-GNOME_Evolution_ConnectionList *e_summary_offline_handler_create_connection_list (ESummary *summary);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
deleted file mode 100644
index 5dc489e7d0..0000000000
--- a/my-evolution/e-summary-preferences.c
+++ /dev/null
@@ -1,1499 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-preferences.c
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-summary.h"
-#include "e-summary-preferences.h"
-
-#include <gtk/gtk.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-config.h>
-
-#include <libgnomeui/gnome-propertybox.h>
-#include <libgnomeui/gnome-stock.h>
-
-#include <glade/glade.h>
-#include <stdio.h>
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-static void
-make_initial_mail_list (ESummaryPrefs *prefs)
-{
- char *evolution_dir;
- GList *folders;
-
- evolution_dir = gnome_util_prepend_user_home ("evolution/local");
-
- folders = g_list_append (NULL, g_strconcat (evolution_dir, "/Inbox", NULL));
- folders = g_list_append (folders, g_strconcat (evolution_dir, "/Outbox", NULL));
-
- g_free (evolution_dir);
- prefs->display_folders = folders;
-}
-
-static void
-make_initial_rdf_list (ESummaryPrefs *prefs)
-{
- GList *rdfs;
-
- rdfs = g_list_prepend (NULL, g_strdup ("http://news.gnome.org/gnome-news/rdf"));
-
- prefs->rdf_urls = rdfs;
-}
-
-static void
-make_initial_weather_list (ESummaryPrefs *prefs)
-{
- /* translators: Put here a list of codes for locations you want to
- see in My Evolution by default. You can find the list of all
- stations and their codes in Evolution sources
- (evolution/my-evolution/Locations) */
- char *default_stations = _("KBOS:ZSAM:EGAA"), **stations_v, **p;
- GList *stations = NULL;
-
- stations_v = g_strsplit (default_stations, ":", 0);
- g_assert (stations_v != NULL);
- for (p = stations_v; *p != NULL; p++) {
- stations = g_list_prepend (stations, *p);
- }
- g_free (stations_v);
-
- prefs->stations = g_list_reverse (stations);
-}
-
-/* Load the prefs off disk */
-
-static char *
-vector_from_str_list (GList *strlist)
-{
- char *vector;
- GString *str;
-
- g_return_val_if_fail (strlist != NULL, NULL);
-
- str = g_string_new ("");
- for (; strlist; strlist = strlist->next) {
- g_string_append (str, strlist->data);
-
- /* No space at end */
- if (strlist->next) {
- g_string_append (str, " !<-->! ");
- }
- }
-
- vector = str->str;
- g_string_free (str, FALSE);
-
- return vector;
-}
-
-static GList *
-str_list_from_vector (const char *vector)
-{
- GList *strlist = NULL;
- char **tokens, **t;
-
- t = tokens = g_strsplit (vector, " !<-->! ", 8196);
-
- if (tokens == NULL) {
- return NULL;
- }
-
- for (; *tokens; tokens++) {
- strlist = g_list_prepend (strlist, g_strdup (*tokens));
- }
-
- g_strfreev (t);
-
- strlist = g_list_reverse (strlist);
- return strlist;
-}
-
-gboolean
-e_summary_preferences_restore (ESummaryPrefs *prefs)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- char *vector;
-
- g_return_val_if_fail (prefs != NULL, FALSE);
-
- CORBA_exception_init (&ev);
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Error getting Wombat. Using defaults");
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
- vector = bonobo_config_get_string (db, "My-Evolution/Mail/display_folders", &ev);
- if (BONOBO_EX (&ev) || vector == NULL) {
- g_warning ("Error getting Mail/display_folders");
- CORBA_exception_free (&ev);
- bonobo_object_release_unref (db, NULL);
- return FALSE;
- }
- prefs->display_folders = str_list_from_vector (vector);
- g_free (vector);
-
- prefs->show_full_path = bonobo_config_get_boolean (db, "My-Evolution/Mail/show_full_path", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Error getting Mail/show_full_path. Using defaults");
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
-
- vector = bonobo_config_get_string (db, "My-Evolution/RDF/rdf_urls", &ev);
- if (BONOBO_EX (&ev) || vector == NULL) {
- g_warning ("Error getting RDF/rdf_urls");
- CORBA_exception_free (&ev);
- bonobo_object_release_unref (db, NULL);
- return FALSE;
- }
- prefs->rdf_urls = str_list_from_vector (vector);
- g_free (vector);
-
- prefs->rdf_refresh_time = bonobo_config_get_long_with_default (db, "My-Evolution/RDF/rdf_refresh_time", 600, NULL);
-
- prefs->limit = bonobo_config_get_long_with_default (db, "My-Evolution/RDF/limit", 10, NULL);
-
- vector = bonobo_config_get_string (db, "My-Evolution/Weather/stations", &ev);
- if (BONOBO_EX (&ev) || vector == NULL) {
- g_warning ("Error getting Weather/stations");
- CORBA_exception_free (&ev);
- bonobo_object_release_unref (db, NULL);
- return FALSE;
- }
- prefs->stations = str_list_from_vector (vector);
- g_free (vector);
-
- prefs->units = bonobo_config_get_long (db, "My-Evolution/Weather/units", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Error getting Weather/units. Using defaults");
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- prefs->weather_refresh_time = bonobo_config_get_long (db, "My-Evolution/Weather/weather_refresh_time", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Error getting Weather/weather_refresh_time. Using defaults");
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
-
- prefs->days = bonobo_config_get_long (db, "My-Evolution/Schedule/days", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Error getting Schedule/days. Using defaults");
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- prefs->show_tasks = bonobo_config_get_long (db, "My-Evolution/Schedule/show_tasks", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Error getting Schedule/show_tasks. Using defaults");
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- bonobo_object_release_unref (db, NULL);
- return TRUE;
-}
-
-/* Write prefs to disk */
-void
-e_summary_preferences_save (ESummaryPrefs *prefs)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- char *vector;
-
- g_return_if_fail (prefs != NULL);
-
- CORBA_exception_init (&ev);
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- g_warning ("Cannot save preferences");
- CORBA_exception_free (&ev);
- return;
- }
- CORBA_exception_free (&ev);
-
- vector = vector_from_str_list (prefs->display_folders);
- bonobo_config_set_string (db, "My-Evolution/Mail/display_folders", vector, NULL);
- g_free (vector);
-
- bonobo_config_set_boolean (db, "My-Evolution/Mail/show_full_path", prefs->show_full_path, NULL);
-
- vector = vector_from_str_list (prefs->rdf_urls);
- bonobo_config_set_string (db, "My-Evolution/RDF/rdf_urls", vector, NULL);
- g_free (vector);
-
- bonobo_config_set_long (db, "My-Evolution/RDF/rdf_refresh_time", prefs->rdf_refresh_time, NULL);
- bonobo_config_set_long (db, "My-Evolution/RDF/limit", prefs->limit, NULL);
-
- vector = vector_from_str_list (prefs->stations);
- bonobo_config_set_string (db, "My-Evolution/Weather/stations", vector, NULL);
- g_free (vector);
-
- bonobo_config_set_long (db, "My-Evolution/Weather/units", prefs->units, NULL);
- bonobo_config_set_long (db, "My-Evolution/Weather/weather_refresh_time", prefs->weather_refresh_time, NULL);
-
- bonobo_config_set_long (db, "My-Evolution/Schedule/days", prefs->days, NULL);
- bonobo_config_set_long (db, "My-Evolution/Schedule/show_tasks", prefs->show_tasks, NULL);
-
- CORBA_exception_init (&ev);
- Bonobo_ConfigDatabase_sync (db, &ev);
- CORBA_exception_free (&ev);
-
- bonobo_object_release_unref (db, NULL);
-}
-
-static void
-free_str_list (GList *list)
-{
- for (; list; list = list->next) {
- g_free (list->data);
- }
-}
-
-void
-e_summary_preferences_free (ESummaryPrefs *prefs)
-{
- if (prefs->display_folders) {
- free_str_list (prefs->display_folders);
- g_list_free (prefs->display_folders);
- }
-
- if (prefs->rdf_urls) {
- free_str_list (prefs->rdf_urls);
- g_list_free (prefs->rdf_urls);
- }
-
- if (prefs->stations) {
- free_str_list (prefs->stations);
- g_list_free (prefs->stations);
- }
-
- g_free (prefs);
-}
-
-static GList *
-copy_str_list (GList *list)
-{
- GList *list_copy = NULL;
-
- for (; list; list = list->next) {
- list_copy = g_list_prepend (list_copy, g_strdup (list->data));
- }
-
- list_copy = g_list_reverse (list_copy);
- return list_copy;
-}
-
-ESummaryPrefs *
-e_summary_preferences_copy (ESummaryPrefs *prefs)
-{
- ESummaryPrefs *prefs_copy;
-
- prefs_copy = g_new (ESummaryPrefs, 1);
-
- prefs_copy->display_folders = copy_str_list (prefs->display_folders);
- prefs_copy->show_full_path = prefs->show_full_path;
-
- prefs_copy->rdf_urls = copy_str_list (prefs->rdf_urls);
- prefs_copy->rdf_refresh_time = prefs->rdf_refresh_time;
- prefs_copy->limit = prefs->limit;
-
- prefs_copy->stations = copy_str_list (prefs->stations);
- prefs_copy->units = prefs->units;
- prefs_copy->weather_refresh_time = prefs->weather_refresh_time;
-
- prefs_copy->days = prefs->days;
- prefs_copy->show_tasks = prefs->show_tasks;
-
- return prefs_copy;
-}
-
-void
-e_summary_preferences_init (ESummary *summary)
-{
- ESummaryPrefs *prefs;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- summary->preferences = g_new0 (ESummaryPrefs, 1);
- summary->old_prefs = NULL;
-
- if (e_summary_preferences_restore (summary->preferences) == TRUE) {
- return;
- }
-
- prefs = summary->preferences;
- /* Defaults */
-
- /* Mail */
- make_initial_mail_list (prefs);
-
- /* RDF */
- make_initial_rdf_list (prefs);
- prefs->rdf_refresh_time = 600;
- prefs->limit = 10;
-
- /* Weather */
- make_initial_weather_list (prefs);
- prefs->units = UNITS_METRIC;
- prefs->weather_refresh_time = 600;
-
- prefs->days = E_SUMMARY_CALENDAR_ONE_DAY;
- prefs->show_tasks = E_SUMMARY_CALENDAR_ALL_TASKS;
-}
-
-struct _MailPage {
- GtkWidget *all, *shown;
- GtkWidget *fullpath;
- GtkWidget *add, *remove;
-};
-
-struct _RDFPage {
- GtkWidget *all, *shown;
- GtkWidget *refresh, *limit;
- GtkWidget *add, *remove;
- GtkWidget *new_url;
-
- GList *known;
-};
-
-struct _WeatherPage {
- GtkWidget *all, *shown;
- GtkWidget *refresh, *imperial, *metric;
- GtkWidget *add, *remove;
-
- GtkCTreeNode *selected_node;
-};
-
-struct _CalendarPage {
- GtkWidget *one, *five, *week, *month;
- GtkWidget *all, *today;
-};
-
-typedef struct _PropertyData {
- ESummary *summary;
- GnomePropertyBox *box;
- GtkWidget *new_url_entry, *new_name_entry;
- GladeXML *xml;
-
- struct _MailPage *mail;
- struct _RDFPage *rdf;
- struct _WeatherPage *weather;
- struct _CalendarPage *calendar;
-} PropertyData;
-
-struct _RDFInfo {
- char *url;
- char *name;
-};
-
-static struct _RDFInfo rdfs[] = {
- {"http://advogato.org/rss/articles.xml", "Advogato"},
- {"http://barrapunto.com/barrapunto.rdf", "Barrapunto"},
- {"http://barrapunto.com/gnome.rdf", "Barrapunto GNOME"},
- {"http://www.bsdtoday.com/backend/bt.rdf", "BSD Today"},
- {"http://beyond2000.com/b2k.rdf", "Beyond 2000"},
- {"http://www.cnn.com/cnn.rss", "CNN"},
- {"http://www.dictionary.com/wordoftheday/wotd.rss", N_("Dictionary.com Word of the Day")},
- {"http://www.dvdreview.com/rss/newschannel.rss", "DVD Review"},
- {"http://freshmeat.net/backend/fm.rdf", "Freshmeat"},
- {"http://news.gnome.org/gnome-news/rdf", "GNotices"},
- {"http://headlines.internet.com/internetnews/prod-news/news.rss", "Internet.com"},
- {"http://dot.kde.org/rdf", "KDE Dot News"},
- {"http://www.kuro5hin.org/backend.rdf", "Kuro5hin"},
- {"http://linuxgames.com/bin/mynetscape.pl", "Linux Games"},
- {"http://linux.com/mrn/jobs/latest_jobs.rss", "Linux Jobs"},
- {"http://linuxtoday.com/backend/my-netscape.rdf", "Linux Today"},
- {"http://lwn.net/headlines/rss", "Linux Weekly News"},
- {"http://www.linux.com/mrn/front_page.rss", "Linux.com"},
- {"http://memepool.com/memepool.rss", "Memepool"},
- {"http://morons.org/morons.rss", "Morons"},
- {"http://www.mozilla.org/news.rdf", "Mozilla"},
- {"http://www.mozillazine.org/contents.rdf", "Mozillazine"},
- {"http://www.fool.com/about/headlines/rss_headlines.asp", "The Motley Fool"},
- {"http://www.newsforge.com/newsforge.rss", "Newsforge"},
- {"http://www.nanotechnews.com/nano/rdf", "Nanotech News"},
- {"http://www.perl.com/pace/news.rss", "Perl.com"},
- {"http://www.pigdog.org/pigdog.rdf", "Pigdog"},
- {"http://www.python.org/channews.rdf", "Python.org"},
- {"http://www.quotationspage.com/data/mqotd.rss", N_("Quotes of the Day")},
- {"http://www.salon.com/feed/RDF/salon_use.rdf", "Salon"},
- {"http://slashdot.org/slashdot.rdf", "Slashdot"},
- {"http://www.theregister.co.uk/tonys/slashdot.rdf", "The Register"},
- {"http://www.thinkgeek.com/thinkgeek.rdf", "Think Geek"},
- {"http://www.webreference.com/webreference.rdf", "Web Reference"},
- {"http://redcarpet.ximian.com/red-carpet.rdf", "Ximian Red Carpet New"},
- {NULL, NULL}
-};
-
-static void
-free_rdf_info (struct _RDFInfo *info)
-{
- g_free (info->url);
- g_free (info->name);
- g_free (info);
-}
-
-static const char *
-find_name_for_url (PropertyData *pd,
- const char *url)
-{
- GList *p;
-
- for (p = pd->rdf->known; p; p = p->next) {
- struct _RDFInfo *info = p->data;
- if (strcmp (url, info->url) == 0) {
- return info->name;
- }
- }
-
- return url;
-}
-
-static void
-save_known_rdfs (GList *rdfs)
-{
- FILE *handle;
- char *rdf_file;
-
- rdf_file = gnome_util_prepend_user_home ("evolution/config/RDF-urls.txt");
- handle = fopen (rdf_file, "w");
- g_free (rdf_file);
-
- if (handle == NULL) {
- g_warning ("Error opening RDF-urls.txt");
- return;
- }
-
- for (; rdfs; rdfs = rdfs->next) {
- struct _RDFInfo *info;
- char *line;
-
- info = rdfs->data;
- line = g_strconcat (info->url, ",", info->name, "\n", NULL);
- fputs (line, handle);
- g_free (line);
- }
-
- fclose (handle);
-}
-
-static void
-fill_rdf_all_clist (GtkCList *clist,
- PropertyData *pd)
-{
- FILE *handle;
- int i;
- char *rdf_file, line[4096];
-
- rdf_file = gnome_util_prepend_user_home ("evolution/config/RDF-urls.txt");
- handle = fopen (rdf_file, "r");
- g_free (rdf_file);
-
- if (handle == NULL) {
- for (i = 0; rdfs[i].url; i++) {
- char *text[1];
- int row;
-
- text[0] = _(rdfs[i].name);
- row = gtk_clist_append (clist, text);
- /* We don't need to free this data as it's
- static */
- gtk_clist_set_row_data (clist, row, &rdfs[i]);
- pd->rdf->known = g_list_append (pd->rdf->known, &rdfs[i]);
- }
-
- return;
- }
-
- while (fgets (line, 4095, handle)) {
- char *text[1];
- char **tokens;
- struct _RDFInfo *info;
- int row;
-
- if (line[strlen (line) - 1] == '\n') {
- line[strlen (line) - 1] = 0;
- }
-
- tokens = g_strsplit (line, ",", 2);
- if (tokens == NULL) {
- continue;
- }
-
- info = g_new (struct _RDFInfo, 1);
- info->url = g_strdup (tokens[0]);
- info->name = g_strdup (tokens[1]);
-
- pd->rdf->known = g_list_append (pd->rdf->known, info);
- text[0] = tokens[1];
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data_full (clist, row, info,
- (GtkDestroyNotify) free_rdf_info);
- g_strfreev (tokens);
- }
-}
-
-static void
-fill_rdf_shown_clist (GtkCList *clist,
- PropertyData *pd)
-{
- GList *p;
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- char *text[1];
- int row;
-
- text[0] = (char *) find_name_for_url (pd, p->data);
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data (clist, row, p);
- }
-}
-
-static void
-fill_weather_all_ctree (GtkCTree *ctree)
-{
- e_summary_weather_ctree_fill (ctree);
-}
-
-static void
-fill_weather_shown_clist (GtkCList *clist,
- PropertyData *pd)
-{
- GList *p;
-
- for (p = pd->summary->preferences->stations; p; p = p->next) {
- char *text[1];
- char *pretty;
-
- pretty = (char *) e_summary_weather_code_to_name (p->data);
-
- text[0] = pretty;
- gtk_clist_append (clist, text);
- }
-}
-
-static void
-fill_mail_all_clist (GtkCList *clist,
- PropertyData *pd)
-{
- e_summary_mail_fill_list (clist, pd->summary);
-}
-
-static void
-fill_mail_shown_clist (GtkCList *clist,
- PropertyData *pd)
-{
- GList *p;
-
- for (p = pd->summary->preferences->display_folders; p; p = p->next) {
- char *text[1];
- char *uri;
- const char *name;
- int row;
-
- uri = g_strconcat ("file://", p->data, NULL);
- name = e_summary_mail_uri_to_name (pd->summary, uri);
- g_free (uri);
- if (name == NULL) {
- text[0] = p->data;
- } else {
- text[0] = (char *) name + 1; /* GtkCList sucks. */
- }
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data (clist, row, p);
- }
-}
-
-static void
-mail_all_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- ESummaryMailRowData *rd;
- GList *p;
-
- rd = gtk_clist_get_row_data (GTK_CLIST (pd->mail->all), row);
- if (rd == NULL) {
- return;
- }
-
- for (p = pd->summary->preferences->display_folders; p; p = p->next) {
- if (strcmp (rd->uri + 7, p->data) == 0) {
- /* Already in list */
- return;
- }
- }
-
- gtk_widget_set_sensitive (pd->mail->add, TRUE);
-}
-
-static void
-mail_all_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->mail->add, FALSE);
- }
-}
-
-static void
-mail_shown_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- gtk_widget_set_sensitive (pd->mail->remove, TRUE);
-}
-
-static void
-mail_shown_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->mail->remove, FALSE);
- }
-}
-
-static void
-mail_add_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- int row;
- ESummaryMailRowData *rd;
- char *text[1];
- GList *p;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->mail->all)->selection->data);
- rd = gtk_clist_get_row_data (GTK_CLIST (pd->mail->all), row);
- g_return_if_fail (rd != NULL);
-
- for (p = pd->summary->preferences->display_folders; p; p = p->next) {
- if (strcmp (rd->uri + 7, p->data) == 0) {
- /* Already in list */
- return;
- }
- }
-
- text[0] = rd->name + 1;
- row = gtk_clist_append (GTK_CLIST (pd->mail->shown), text);
-
- pd->summary->preferences->display_folders = g_list_append (pd->summary->preferences->display_folders,
- g_strdup (rd->uri + 7));
- gtk_clist_set_row_data (GTK_CLIST (pd->mail->shown), row, pd->summary->preferences->display_folders);
-
- gnome_property_box_changed (pd->box);
-}
-
-static void
-mail_remove_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- int row;
- GList *p;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->mail->shown)->selection->data);
- p = gtk_clist_get_row_data (GTK_CLIST (pd->mail->shown), row);
-
- gtk_clist_remove (GTK_CLIST (pd->mail->shown), row);
- pd->summary->preferences->display_folders = g_list_remove_link (pd->summary->preferences->display_folders, p);
- g_free (p->data);
- g_list_free (p);
-
- gtk_clist_select_row (GTK_CLIST (pd->mail->shown), row, 0);
- gnome_property_box_changed (pd->box);
-}
-
-static void
-mail_show_full_path_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- pd->summary->preferences->show_full_path = gtk_toggle_button_get_active (tb);
- gnome_property_box_changed (pd->box);
-}
-
-static void
-rdf_all_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- struct _RDFInfo *info;
- GList *p;
-
- info = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->all), row);
- g_return_if_fail (info != NULL);
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- if (strcmp (p->data, info->url) == 0) {
- /* Found it already */
- return;
- }
- }
-
- gtk_widget_set_sensitive (pd->rdf->add, TRUE);
-}
-
-static void
-rdf_all_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (GTK_CLIST (pd->rdf->all)->selection == NULL) {
- gtk_widget_set_sensitive (pd->rdf->add, FALSE);
- }
-}
-
-static void
-rdf_shown_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- gtk_widget_set_sensitive (pd->rdf->remove, TRUE);
-}
-
-static void
-rdf_shown_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (GTK_CLIST (pd->rdf->shown)->selection == NULL) {
- gtk_widget_set_sensitive (pd->rdf->remove, FALSE);
- }
-}
-
-static void
-rdf_add_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- struct _RDFInfo *info;
- GList *p, *rows;
- char *text[1];
- int row;
-
- for (rows = GTK_CLIST (pd->rdf->all)->selection; rows; rows = rows->next) {
- row = GPOINTER_TO_INT (rows->data);
- info = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->all), row);
-
- text[0] = info->name;
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- if (strcmp (p->data, info->url) == 0) {
- /* Found it already */
- return;
- }
- }
-
- pd->summary->preferences->rdf_urls = g_list_prepend (pd->summary->preferences->rdf_urls, g_strdup (info->url));
- row = gtk_clist_prepend (GTK_CLIST (pd->rdf->shown), text);
- gtk_clist_set_row_data (GTK_CLIST (pd->rdf->shown), row,
- pd->summary->preferences->rdf_urls);
- }
- gnome_property_box_changed (pd->box);
-}
-
-static void
-rdf_remove_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- GList *p;
- int row;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->rdf->shown)->selection->data);
- p = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->shown), row);
- gtk_clist_remove (GTK_CLIST (pd->rdf->shown), row);
-
- pd->summary->preferences->rdf_urls = g_list_remove_link (pd->summary->preferences->rdf_urls, p);
- g_free (p->data);
- g_list_free (p);
-
- gtk_clist_select_row (GTK_CLIST (pd->rdf->shown), row, 0);
- gnome_property_box_changed (pd->box);
-}
-
-static void
-add_dialog_clicked_cb (GnomeDialog *dialog,
- int button,
- PropertyData *pd)
-{
- struct _RDFInfo *info;
- char *url, *name;
- char *text[1];
- int row;
-
- if (button == 1) {
- gnome_dialog_close (dialog);
- return;
- }
-
- url = gtk_entry_get_text (GTK_ENTRY (pd->new_url_entry));
- if (url == NULL || *text == 0) {
- gnome_dialog_close (dialog);
- return;
- }
- name = gtk_entry_get_text (GTK_ENTRY (pd->new_name_entry));
- info = g_new (struct _RDFInfo, 1);
- info->url = g_strdup (url);
- info->name = name ? g_strdup (name) : g_strdup (url);
-
- text[0] = info->name;
- row = gtk_clist_append (GTK_CLIST (pd->rdf->all), text);
- gtk_clist_set_row_data_full (GTK_CLIST (pd->rdf->all), row, info,
- (GdkDestroyNotify) free_rdf_info);
- pd->rdf->known = g_list_append (pd->rdf->known, info);
-
- save_known_rdfs (pd->rdf->known);
- pd->summary->preferences->rdf_urls = g_list_prepend (pd->summary->preferences->rdf_urls, g_strdup (info->url));
- row = gtk_clist_prepend (GTK_CLIST (pd->rdf->shown), text);
- gtk_clist_set_row_data (GTK_CLIST (pd->rdf->shown), row,
- pd->summary->preferences->rdf_urls);
-
-
- gnome_property_box_changed (pd->box);
- gnome_dialog_close (dialog);
-}
-
-static void
-rdf_new_url_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- static GtkWidget *add_dialog = NULL;
- GtkWidget *label, *hbox;
-
- if (add_dialog != NULL) {
- gdk_window_raise (add_dialog->window);
- gdk_window_show (add_dialog->window);
- return;
- }
-
- add_dialog = gnome_dialog_new (_("Add a news feed"),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL, NULL);
- gtk_signal_connect (GTK_OBJECT (add_dialog), "clicked",
- GTK_SIGNAL_FUNC (add_dialog_clicked_cb), pd);
- gtk_signal_connect (GTK_OBJECT (add_dialog), "destroy",
- GTK_SIGNAL_FUNC (gtk_widget_destroyed), &add_dialog);
-
- label = gtk_label_new (_("Enter the URL of the news feed you wish to add"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), label,
- TRUE, TRUE, 0);
- hbox = gtk_hbox_new (FALSE, 2);
- label = gtk_label_new (_("Name:"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- pd->new_name_entry = gtk_entry_new ();
- gtk_box_pack_start (GTK_BOX (hbox), pd->new_name_entry, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), hbox,
- TRUE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, 2);
- label = gtk_label_new (_("URL:"));
- pd->new_url_entry = gtk_entry_new ();
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), pd->new_url_entry, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox),
- hbox, TRUE, TRUE, 0);
- gtk_widget_show_all (add_dialog);
-}
-
-static void
-rdf_refresh_value_changed_cb (GtkAdjustment *adj,
- PropertyData *pd)
-{
- pd->summary->preferences->rdf_refresh_time = (int) adj->value;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-rdf_limit_value_changed_cb (GtkAdjustment *adj,
- PropertyData *pd)
-{
- pd->summary->preferences->limit = (int) adj->value;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-weather_all_select_row_cb (GtkCTree *ctree,
- GtkCTreeNode *row,
- int column,
- PropertyData *pd)
-{
- ESummaryWeatherLocation *location;
- GList *p;
-
- location = gtk_ctree_node_get_row_data (GTK_CTREE (pd->weather->all), row);
- if (location == NULL) {
- gtk_ctree_unselect (ctree, row);
- return;
- }
-
- for (p = pd->summary->preferences->stations; p; p = p->next) {
- if (strcmp (location->code, p->data) == 0) {
- return; /* Already have it */
- }
- }
-
- gtk_widget_set_sensitive (pd->weather->add, TRUE);
- pd->weather->selected_node = row;
-}
-
-static void
-weather_all_unselect_row_cb (GtkCList *clist,
- GtkCTreeNode *row,
- int column,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->weather->add, FALSE);
- }
- pd->weather->selected_node = NULL;
-}
-
-static void
-weather_shown_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- gtk_widget_set_sensitive (pd->weather->remove, TRUE);
-}
-
-static void
-weather_shown_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->weather->remove, FALSE);
- }
-}
-
-static void
-weather_add_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- ESummaryWeatherLocation *location;
- GList *p;
- char *text[1];
-
- location = gtk_ctree_node_get_row_data (GTK_CTREE (pd->weather->all), pd->weather->selected_node);
-
- g_return_if_fail (location != NULL);
-
- for (p = pd->summary->preferences->stations; p; p = p->next) {
- if (strcmp (location->code, p->data) == 0) {
- return; /* Already have it */
- }
- }
-
- pd->summary->preferences->stations = g_list_prepend (pd->summary->preferences->stations, g_strdup (location->code));
- text[0] = location->name;
- gtk_clist_prepend (GTK_CLIST (pd->weather->shown), text);
-
- gnome_property_box_changed (pd->box);
-}
-
-static void
-weather_remove_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- int row;
- GList *p;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->weather->shown)->selection->data);
- p = g_list_nth (pd->summary->preferences->stations, row);
- gtk_clist_remove (GTK_CLIST (pd->weather->shown), row);
-
- pd->summary->preferences->stations = g_list_remove_link (pd->summary->preferences->stations, p);
- g_free (p->data);
- g_list_free (p);
-
- gtk_clist_select_row (GTK_CLIST (pd->weather->shown), row, 0);
- gnome_property_box_changed (pd->box);
-}
-
-static void
-weather_refresh_value_changed_cb (GtkAdjustment *adj,
- PropertyData *pd)
-{
- pd->summary->preferences->weather_refresh_time = (int) adj->value;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-weather_metric_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->units = UNITS_METRIC;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-weather_imperial_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->units = UNITS_IMPERIAL;
- gnome_property_box_changed (pd->box);
-}
-
-
-static void
-calendar_one_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->days = E_SUMMARY_CALENDAR_ONE_DAY;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-calendar_five_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->days = E_SUMMARY_CALENDAR_FIVE_DAYS;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-calendar_week_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->days = E_SUMMARY_CALENDAR_ONE_WEEK;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-calendar_month_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->days = E_SUMMARY_CALENDAR_ONE_MONTH;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-calendar_all_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->show_tasks = E_SUMMARY_CALENDAR_ALL_TASKS;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-calendar_today_toggled_cb (GtkToggleButton *tb,
- PropertyData *pd)
-{
- if (gtk_toggle_button_get_active (tb) == FALSE) {
- return;
- }
-
- pd->summary->preferences->show_tasks = E_SUMMARY_CALENDAR_TODAYS_TASKS;
- gnome_property_box_changed (pd->box);
-}
-
-static void
-construct_pixmap_button (GladeXML *xml,
- const char *id,
- const char *image)
-{
- GtkWidget *box, *pixmap;
-
- box = glade_xml_get_widget (xml, id);
-
- pixmap = gnome_stock_pixmap_widget (NULL, image);
- gtk_box_pack_start (GTK_BOX (box), pixmap, TRUE, TRUE, 0);
-
- gtk_widget_show (pixmap);
-}
-
-static gboolean
-make_property_dialog (PropertyData *pd)
-{
- struct _MailPage *mail;
- struct _RDFPage *rdf;
- struct _WeatherPage *weather;
- struct _CalendarPage *calendar;
-
- /* Mail */
- mail = pd->mail = g_new (struct _MailPage, 1);
-
- /* I think this should be a fancy bonobo thingy */
- mail->all = glade_xml_get_widget (pd->xml, "clist7");
- g_return_val_if_fail (mail->all != NULL, FALSE);
- fill_mail_all_clist (GTK_CLIST (mail->all), pd);
- gtk_signal_connect (GTK_OBJECT (mail->all), "select-row",
- GTK_SIGNAL_FUNC (mail_all_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (mail->all), "unselect-row",
- GTK_SIGNAL_FUNC (mail_all_unselect_row_cb), pd);
-
- mail->shown = glade_xml_get_widget (pd->xml, "clist1");
- g_return_val_if_fail (mail->shown != NULL, FALSE);
- fill_mail_shown_clist (GTK_CLIST (mail->shown), pd);
- gtk_signal_connect (GTK_OBJECT (mail->shown), "select-row",
- GTK_SIGNAL_FUNC (mail_shown_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (mail->shown), "unselect-row",
- GTK_SIGNAL_FUNC (mail_shown_unselect_row_cb), pd);
-
- mail->fullpath = glade_xml_get_widget (pd->xml, "checkbutton1");
- g_return_val_if_fail (mail->fullpath != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mail->fullpath),
- pd->summary->preferences->show_full_path);
- gtk_signal_connect (GTK_OBJECT (mail->fullpath), "toggled",
- GTK_SIGNAL_FUNC (mail_show_full_path_toggled_cb), pd);
-
- mail->add = glade_xml_get_widget (pd->xml, "button4");
- g_return_val_if_fail (mail->add != NULL, FALSE);
- construct_pixmap_button (pd->xml, "hbox-mailadd",
- GNOME_STOCK_BUTTON_NEXT);
- gtk_signal_connect (GTK_OBJECT (mail->add), "clicked",
- GTK_SIGNAL_FUNC (mail_add_clicked_cb), pd);
-
- mail->remove = glade_xml_get_widget (pd->xml, "button5");
- g_return_val_if_fail (mail->remove != NULL, FALSE);
- construct_pixmap_button (pd->xml, "hbox-mailremove",
- GNOME_STOCK_BUTTON_PREV);
- gtk_signal_connect (GTK_OBJECT (mail->remove), "clicked",
- GTK_SIGNAL_FUNC (mail_remove_clicked_cb), pd);
-
- /* RDF */
- rdf = pd->rdf = g_new (struct _RDFPage, 1);
- rdf->known = NULL;
- rdf->all = glade_xml_get_widget (pd->xml, "clist6");
- g_return_val_if_fail (rdf->all != NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->all), "select-row",
- GTK_SIGNAL_FUNC (rdf_all_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (rdf->all), "unselect-row",
- GTK_SIGNAL_FUNC (rdf_all_unselect_row_cb), pd);
- fill_rdf_all_clist (GTK_CLIST (rdf->all), pd);
-
- rdf->shown = glade_xml_get_widget (pd->xml, "clist5");
- g_return_val_if_fail (rdf->shown != NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->shown), "select-row",
- GTK_SIGNAL_FUNC (rdf_shown_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (rdf->shown), "unselect-row",
- GTK_SIGNAL_FUNC (rdf_shown_unselect_row_cb), pd);
- fill_rdf_shown_clist (GTK_CLIST (rdf->shown), pd);
-
- rdf->refresh = glade_xml_get_widget (pd->xml, "spinbutton1");
- g_return_val_if_fail (rdf->refresh != NULL, FALSE);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (rdf->refresh),
- (float) pd->summary->preferences->rdf_refresh_time);
- gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (rdf->refresh)->adjustment), "value_changed",
- GTK_SIGNAL_FUNC (rdf_refresh_value_changed_cb), pd);
-
- rdf->limit = glade_xml_get_widget (pd->xml, "spinbutton4");
- g_return_val_if_fail (rdf->limit != NULL, FALSE);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (rdf->limit),
- (float) pd->summary->preferences->limit);
- gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (rdf->limit)->adjustment), "value_changed",
- GTK_SIGNAL_FUNC (rdf_limit_value_changed_cb), pd);
-
- rdf->add = glade_xml_get_widget (pd->xml, "button9");
- g_return_val_if_fail (rdf->add != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-newsadd",
- GNOME_STOCK_BUTTON_NEXT);
- gtk_widget_set_sensitive (rdf->add, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->add), "clicked",
- GTK_SIGNAL_FUNC (rdf_add_clicked_cb), pd);
-
- rdf->remove = glade_xml_get_widget (pd->xml, "button10");
- g_return_val_if_fail (rdf->remove != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-newsremove",
- GNOME_STOCK_BUTTON_PREV);
- gtk_widget_set_sensitive (rdf->remove, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->remove), "clicked",
- GTK_SIGNAL_FUNC (rdf_remove_clicked_cb), pd);
-
- rdf->new_url = glade_xml_get_widget (pd->xml, "button11");
- g_return_val_if_fail (rdf->new_url != NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->new_url), "clicked",
- GTK_SIGNAL_FUNC (rdf_new_url_clicked_cb), pd);
-
- /* Weather */
- weather = pd->weather = g_new (struct _WeatherPage, 1);
- weather->all = glade_xml_get_widget (pd->xml, "ctree1");
- g_return_val_if_fail (weather->all != NULL, FALSE);
- fill_weather_all_ctree (GTK_CTREE (weather->all));
- gtk_signal_connect (GTK_OBJECT (weather->all), "tree-select-row",
- GTK_SIGNAL_FUNC (weather_all_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (weather->all), "tree-unselect-row",
- GTK_SIGNAL_FUNC (weather_all_unselect_row_cb), pd);
-
- weather->shown = glade_xml_get_widget (pd->xml, "clist3");
- g_return_val_if_fail (weather->shown != NULL, FALSE);
- fill_weather_shown_clist (GTK_CLIST (weather->shown), pd);
- gtk_signal_connect (GTK_OBJECT (weather->shown), "select-row",
- GTK_SIGNAL_FUNC (weather_shown_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (weather->shown), "unselect-row",
- GTK_SIGNAL_FUNC (weather_shown_unselect_row_cb), pd);
-
- weather->refresh = glade_xml_get_widget (pd->xml, "spinbutton5");
- g_return_val_if_fail (weather->refresh != NULL, FALSE);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (weather->refresh),
- (float) pd->summary->preferences->weather_refresh_time);
- gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (weather->refresh)->adjustment),
- "value-changed",
- GTK_SIGNAL_FUNC (weather_refresh_value_changed_cb),
- pd);
-
- weather->metric = glade_xml_get_widget (pd->xml, "radiobutton7");
- g_return_val_if_fail (weather->metric != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (weather->metric), (pd->summary->preferences->units == UNITS_METRIC));
- gtk_signal_connect (GTK_OBJECT (weather->metric), "toggled",
- GTK_SIGNAL_FUNC (weather_metric_toggled_cb), pd);
-
- weather->imperial = glade_xml_get_widget (pd->xml, "radiobutton8");
- g_return_val_if_fail (weather->imperial != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (weather->imperial), (pd->summary->preferences->units == UNITS_IMPERIAL));
- gtk_signal_connect (GTK_OBJECT (weather->imperial), "toggled",
- GTK_SIGNAL_FUNC (weather_imperial_toggled_cb), pd);
-
- weather->add = glade_xml_get_widget (pd->xml, "button6");
- g_return_val_if_fail (weather->add != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-weatheradd",
- GNOME_STOCK_BUTTON_NEXT);
- gtk_signal_connect (GTK_OBJECT (weather->add), "clicked",
- GTK_SIGNAL_FUNC (weather_add_clicked_cb), pd);
-
- weather->remove = glade_xml_get_widget (pd->xml, "button7");
- g_return_val_if_fail (weather->remove != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-weatherremove",
- GNOME_STOCK_BUTTON_PREV);
- gtk_signal_connect (GTK_OBJECT (weather->remove), "clicked",
- GTK_SIGNAL_FUNC (weather_remove_clicked_cb), pd);
-
- /* Calendar */
- calendar = pd->calendar = g_new (struct _CalendarPage, 1);
- calendar->one = glade_xml_get_widget (pd->xml, "radiobutton3");
- g_return_val_if_fail (calendar->one != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->one),
- (pd->summary->preferences->days == E_SUMMARY_CALENDAR_ONE_DAY));
- gtk_signal_connect (GTK_OBJECT (calendar->one), "toggled",
- GTK_SIGNAL_FUNC (calendar_one_toggled_cb), pd);
-
- calendar->five = glade_xml_get_widget (pd->xml, "radiobutton4");
- g_return_val_if_fail (calendar->five != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->five),
- (pd->summary->preferences->days == E_SUMMARY_CALENDAR_FIVE_DAYS));
- gtk_signal_connect (GTK_OBJECT (calendar->five), "toggled",
- GTK_SIGNAL_FUNC (calendar_five_toggled_cb), pd);
-
- calendar->week = glade_xml_get_widget (pd->xml, "radiobutton5");
- g_return_val_if_fail (calendar->week != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->week),
- (pd->summary->preferences->days == E_SUMMARY_CALENDAR_ONE_WEEK));
- gtk_signal_connect (GTK_OBJECT (calendar->week), "toggled",
- GTK_SIGNAL_FUNC (calendar_week_toggled_cb), pd);
-
- calendar->month = glade_xml_get_widget (pd->xml, "radiobutton6");
- g_return_val_if_fail (calendar->month != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->month),
- (pd->summary->preferences->days == E_SUMMARY_CALENDAR_ONE_MONTH));
- gtk_signal_connect (GTK_OBJECT (calendar->month), "toggled",
- GTK_SIGNAL_FUNC (calendar_month_toggled_cb), pd);
-
- calendar->all = glade_xml_get_widget (pd->xml, "radiobutton1");
- g_return_val_if_fail (calendar->all != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->all),
- (pd->summary->preferences->show_tasks == E_SUMMARY_CALENDAR_ALL_TASKS));
- gtk_signal_connect (GTK_OBJECT (calendar->all), "toggled",
- GTK_SIGNAL_FUNC (calendar_all_toggled_cb), pd);
-
- calendar->today = glade_xml_get_widget (pd->xml, "radiobutton2");
- g_return_val_if_fail (calendar->today != NULL, FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (calendar->today),
- (pd->summary->preferences->show_tasks == E_SUMMARY_CALENDAR_TODAYS_TASKS));
- gtk_signal_connect (GTK_OBJECT(calendar->today), "toggled",
- GTK_SIGNAL_FUNC (calendar_today_toggled_cb), pd);
-
- return TRUE;
-}
-
-static void
-free_property_dialog (PropertyData *pd)
-{
- if (pd->rdf) {
- g_list_free (pd->rdf->known);
- g_free (pd->rdf);
- }
- if (pd->mail) {
- g_free (pd->mail);
- }
- if (pd->weather) {
- g_free (pd->weather);
- }
- if (pd->calendar) {
- g_free (pd->calendar);
- }
-
- if (pd->xml) {
- gtk_object_unref (GTK_OBJECT (pd->xml));
- }
- if (pd->summary) {
- gtk_object_unref (GTK_OBJECT (pd->summary));
- }
-
- g_free (pd);
-}
-
-static void
-property_box_clicked_cb (GnomeDialog *dialog,
- int page_num,
- PropertyData *pd)
-{
- if (page_num == -1) {
- e_summary_reconfigure (pd->summary);
- }
-}
-
-static void
-property_box_destroy_cb (GtkObject *object,
- PropertyData *pd)
-{
- if (pd->summary->old_prefs != NULL) {
- e_summary_preferences_free (pd->summary->old_prefs);
- pd->summary->old_prefs = NULL;
- }
-
- e_summary_preferences_save (pd->summary->preferences);
- pd->summary->prefs_window = NULL;
- free_property_dialog (pd);
-}
-
-void
-e_summary_configure (BonoboUIComponent *component,
- gpointer userdata,
- const char *cname)
-{
- ESummary *summary = userdata;
- PropertyData *pd;
-
- if (summary->prefs_window != NULL) {
- gdk_window_raise (summary->prefs_window->window);
- gdk_window_show (summary->prefs_window->window);
- return;
- }
-
- pd = g_new0 (PropertyData, 1);
-
- gtk_object_ref (GTK_OBJECT (summary));
- pd->summary = summary;
-
- if (summary->old_prefs != NULL) {
- e_summary_preferences_free (summary->old_prefs);
- }
-
- summary->old_prefs = e_summary_preferences_copy (summary->preferences);
-
- pd->xml = glade_xml_new (EVOLUTION_GLADEDIR "/my-evolution.glade", NULL);
- g_return_if_fail (pd->xml != NULL);
-
- pd->box = GNOME_PROPERTY_BOX (glade_xml_get_widget (pd->xml, "dialog1"));
- summary->prefs_window = GTK_WIDGET (pd->box);
-
- gtk_window_set_title (GTK_WINDOW (pd->box), _("Summary Settings"));
- if (make_property_dialog (pd) == FALSE) {
- g_warning ("Missing some part of XML file");
- free_property_dialog (pd);
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (pd->box), "apply",
- GTK_SIGNAL_FUNC (property_box_clicked_cb), pd);
- gtk_signal_connect (GTK_OBJECT (pd->box), "destroy",
- GTK_SIGNAL_FUNC (property_box_destroy_cb), pd);
- gtk_widget_show (GTK_WIDGET (pd->box));
-}
-
diff --git a/my-evolution/e-summary-preferences.h b/my-evolution/e-summary-preferences.h
deleted file mode 100644
index 888ea794fc..0000000000
--- a/my-evolution/e-summary-preferences.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-preferences.h
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifndef __E_SUMMARY_PREFERENCES_H__
-#define __E_SUMMARY_PREFERENCES_H__
-
-#include <bonobo/bonobo-ui-component.h>
-
-gboolean e_summary_preferences_restore (ESummaryPrefs *prefs);
-void e_summary_preferences_save (ESummaryPrefs *prefs);
-void e_summary_preferences_free (ESummaryPrefs *prefs);
-ESummaryPrefs *e_summary_preferences_copy (ESummaryPrefs *prefs);
-void e_summary_configure (BonoboUIComponent *component,
- gpointer userdata,
- const char *cname);
-void e_summary_preferences_init (ESummary *summary);
-
-#endif
diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c
deleted file mode 100644
index fa12df5996..0000000000
--- a/my-evolution/e-summary-rdf.c
+++ /dev/null
@@ -1,687 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-rdf.c
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <glib.h>
-#include <gtk/gtkmain.h>
-
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-unicode.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include "e-summary.h"
-
-struct _ESummaryRDF {
- ESummaryConnection *connection;
- GList *rdfs;
-
- char *html;
- guint32 timeout;
- gboolean online;
-};
-
-typedef struct _RDF {
- char *uri;
- char *html;
- GnomeVFSAsyncHandle *handle;
- GString *string;
- char *buffer;
-
- xmlDocPtr cache;
- ESummary *summary;
-
- gboolean shown;
-} RDF;
-
-int xmlSubstituteEntitiesDefaultValue = 1;
-
-char *
-e_summary_rdf_get_html (ESummary *summary)
-{
- GList *rdfs;
- char *html;
- GString *string;
-
- if (summary->rdf == NULL) {
- return NULL;
- }
-
- string = g_string_new ("");
- for (rdfs = summary->rdf->rdfs; rdfs; rdfs = rdfs->next) {
- if (((RDF *)rdfs->data)->html == NULL) {
- continue;
- }
-
- g_string_append (string, ((RDF *)rdfs->data)->html);
- }
-
- html = string->str;
- g_string_free (string, FALSE);
- return html;
-}
-
-/************ RDF Parser *******************/
-
-static char *
-layer_find (xmlNodePtr node,
- char *match,
- char *fail)
-{
- while (node!=NULL) {
-#ifdef RDF_DEBUG
- xmlDebugDumpNode (stdout, node, 32);
- printf("%s.\n", node->name);
-#endif
- if (strcasecmp (node->name, match)==0) {
- if (node->childs != NULL && node->childs->content != NULL) {
- return node->childs->content;
- } else {
- return fail;
- }
- }
- node = node->next;
- }
- return fail;
-}
-
-static char *
-layer_find_url (xmlNodePtr node,
- char *match,
- char *fail)
-{
- char *p = layer_find (node, match, fail);
- char *r = p;
- static char *wb = NULL;
- char *w;
-
- if (wb) {
- g_free (wb);
- }
-
- wb = w = g_malloc (3 * strlen (p));
-
- if (*r == ' ') r++; /* Fix UF bug */
-
- while (*r) {
- if (strncmp (r, "&amp;", 5) == 0) {
- *w++ = '&';
- r += 5;
- continue;
- }
- if (strncmp (r, "&lt;", 4) == 0) {
- *w++ = '<';
- r += 4;
- continue;
- }
- if (strncmp (r, "&gt;", 4) == 0) {
- *w++ = '>';
- r += 4;
- continue;
- }
- if (*r == '"' || *r == ' '){
- *w++ = '%';
- *w++ = "0123456789ABCDEF"[*r/16];
- *w++ = "0123456789ABCDEF"[*r&15];
- r++;
- continue;
- }
- *w++ = *r++;
- }
- *w = 0;
- return wb;
-}
-
-static void
-tree_walk (xmlNodePtr root,
- RDF *r,
- GString *html)
-{
- xmlNodePtr walk;
- xmlNodePtr rewalk = root;
- xmlNodePtr channel = NULL;
- xmlNodePtr image = NULL;
- xmlNodePtr item[16];
- int items = 0;
- int limit;
- int i;
- char *t, *u;
- char *tmp;
-
- if (r->summary->preferences == NULL) {
- limit = 10;
- } else {
- limit = r->summary->preferences->limit;
- }
-
- /* FIXME: Need arrows */
- if (r->shown == FALSE) {
- char *p;
-
- /* FIXME: Hash table & UID */
- p = g_strdup_printf ("<font size=\"-2\"><a href=\"rdf://%d\">(+)</a></font>", GPOINTER_TO_INT (r));
- g_string_append (html, p);
- g_free (p);
- } else {
- char *p;
-
- /* FIXME: Hash table & UID */
- p = g_strdup_printf ("<font size=\"-2\"><a href=\"rdf://%d\">(-)</a></font>", GPOINTER_TO_INT (r));
- g_string_append (html, p);
- g_free (p);
- }
-
- do {
- walk = rewalk;
- rewalk = NULL;
-
- while (walk!=NULL){
-#ifdef RDF_DEBUG
- printf ("%p, %s\n", walk, walk->name);
-#endif
- if (strcasecmp (walk->name, "rdf") == 0) {
- rewalk = walk->childs;
- walk = walk->next;
- continue;
- }
- if (strcasecmp (walk->name, "rss") == 0){
- rewalk = walk->childs;
- walk = walk->next;
- continue;
- }
- /* This is the channel top level */
-#ifdef RDF_DEBUG
- printf ("Top level '%s'.\n", walk->name);
-#endif
- if (strcasecmp (walk->name, "channel") == 0) {
- channel = walk;
- rewalk = channel->childs;
- }
- if (strcasecmp (walk->name, "image") == 0) {
- image = walk;
- g_print ("Image\n");
- }
- if (strcasecmp (walk->name, "item") == 0 && items < 16) {
- item[items++] = walk;
- }
- walk = walk->next;
- }
- }
- while (rewalk);
-
- if (channel == NULL) {
- fprintf(stderr, "No channel definition.\n");
- return;
- }
-
- t = layer_find(channel->childs, "title", "");
- u = layer_find(channel->childs, "link", "");
-
- if (*u != '\0')
- g_string_sprintfa (html, "<a href=\"%s\">", u);
- if (r->cache->encoding)
- t = e_utf8_from_charset_string (r->cache->encoding, t);
- else
- t = e_utf8_from_locale_string (t);
- g_string_append (html, t);
- g_free (t);
- if (*u != '\0') {
- g_string_append (html, "</a>");
- }
- g_string_append (html, "</b></dt>");
-
- if (r->shown == FALSE) {
- g_string_append (html, "</dl>");
- return;
- }
-
- g_string_append (html, "<ul>");
-
- items = MIN (limit, items);
- for (i = 0; i < items; i++) {
- char *p = layer_find (item[i]->childs, "title", "No information");
-
- tmp = g_strdup_printf ("<LI><font size=\"-1\"><A href=\"%s\">\n", layer_find_url(item[i]->childs, "link", ""));
- g_string_append (html, tmp);
- g_free (tmp);
-
- if (r->cache->encoding)
- p = e_utf8_from_charset_string (r->cache->encoding, p);
- else
- p = e_utf8_from_locale_string (p);
- tmp = g_strdup_printf ("%s\n</A></font></li>", p);
- g_free (p);
- g_string_append (html, tmp);
- g_free (tmp);
- }
- g_string_append (html, "</UL>");
-}
-
-static void
-display_doc (RDF *r)
-{
- GString *html;
-
- html = g_string_new ("<dl><dt><img src=\"ico-rdf.png\" align=\"middle\" "
- "width=\"48\" height=\"48\">");
-
- if (r->cache == NULL) {
- char *tmp_utf, *str;
-
- str = g_strdup_printf ("<b>%s:</b><br>%s", _("Error downloading RDF"),
- r->uri);
- tmp_utf = e_utf8_from_locale_string (str);
- g_free (str);
-
- g_string_append (html, tmp_utf);
- g_string_append (html, "</dt>");
- g_free (tmp_utf);
- } else {
- tree_walk (r->cache->root, r, html);
- }
-
- g_free (r->html);
- g_string_append (html, "</dl>");
- r->html = html->str;
- g_string_free (html, FALSE);
-
- e_summary_draw (r->summary);
-}
-
-static void
-close_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- RDF *r)
-{
- ESummary *summary;
- char *xml;
- xmlDocPtr doc;
-
- summary = r->summary;
- if (summary->rdf->connection->callback) {
- ESummaryConnection *connection = summary->rdf->connection;
- connection->callback (summary, connection->callback_closure);
- }
-
- if (r->handle == NULL) {
- g_free (r->buffer);
- r->buffer = NULL;
- g_string_free (r->string, TRUE);
- r->string = NULL;
- return;
- }
-
- r->handle = NULL;
- g_free (r->buffer);
- r->buffer = NULL;
- xml = r->string->str;
- g_string_free (r->string, FALSE);
- r->string = NULL;
-
- if (r->cache != NULL) {
- xmlFreeDoc (r->cache);
- r->cache = NULL;
- }
-
- doc = xmlParseMemory (xml, strlen (xml));
-#if 0
- if (doc == NULL) {
- g_free (r->html);
- r->html = g_strdup ("<b>Error parsing XML</b>");
-
- e_summary_draw (r->summary);
- g_free (xml);
- return;
- }
-#endif
- g_free (xml);
- r->cache = doc;
-
- /* Draw it */
- display_doc (r);
-}
-
-static void
-read_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize bytes_requested,
- GnomeVFSFileSize bytes_read,
- RDF *r)
-{
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- char *str;
-
- g_free (r->html);
- str = g_strdup_printf ("<b>%s:</b><br>%s", _("Error downloading RDF"),
- r->uri);
- r->html = e_utf8_from_locale_string (str);
-
- g_free (str);
-
- e_summary_draw (r->summary);
- r->handle = NULL;
- gnome_vfs_async_close (handle,
- (GnomeVFSAsyncCloseCallback) close_callback, r);
- return;
- }
-
- if (bytes_read == 0) {
- gnome_vfs_async_close (handle,
- (GnomeVFSAsyncCloseCallback) close_callback, r);
- } else {
- *((char *) buffer + bytes_read) = 0;
- g_string_append (r->string, (const char *) buffer);
- gnome_vfs_async_read (handle, buffer, 4095,
- (GnomeVFSAsyncReadCallback) read_callback, r);
- }
-}
-
-static void
-open_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- RDF *r)
-{
- if (result != GNOME_VFS_OK) {
- char *str;
-
- g_free (r->html);
- str = g_strdup_printf ("<b>%s:</b><br>%s", _("Error downloading RDF"),
- r->uri);
- r->html = e_utf8_from_locale_string (str);
- g_free (str);
-
- display_doc (r);
- return;
- }
-
- r->string = g_string_new ("");
- r->buffer = g_new (char, 4096);
-
- gnome_vfs_async_read (handle, r->buffer, 4095,
- (GnomeVFSAsyncReadCallback) read_callback, r);
-}
-
-static gboolean
-e_summary_rdf_update (ESummary *summary)
-{
- GList *r;
-
- for (r = summary->rdf->rdfs; r; r = r->next) {
- RDF *rdf = r->data;
-
- gnome_vfs_async_open (&rdf->handle, rdf->uri,
- GNOME_VFS_OPEN_READ,
- (GnomeVFSAsyncOpenCallback) open_callback, rdf);
- }
-
- return TRUE;
-}
-
-static void
-e_summary_rdf_add_uri (ESummary *summary,
- const char *uri)
-{
- RDF *r;
-
- r = g_new0 (RDF, 1);
- r->summary = summary;
- r->uri = g_strdup (uri);
- r->shown = TRUE;
- summary->rdf->rdfs = g_list_append (summary->rdf->rdfs, r);
-}
-
-static void
-e_summary_rdf_protocol (ESummary *summary,
- const char *uri,
- void *closure)
-{
- RDF *r;
- int a;
-
- a = atoi (uri + 6);
- if (a == 0) {
- g_warning ("A == 0");
- return;
- }
-
- r = (RDF *) GINT_TO_POINTER (a);
- r->shown = !r->shown;
-
- display_doc (r);
-}
-
-static int
-e_summary_rdf_count (ESummary *summary,
- void *data)
-{
- ESummaryRDF *rdf;
- GList *p;
- int count = 0;
-
- rdf = summary->rdf;
- for (p = rdf->rdfs; p; p = p->next) {
- RDF *r = p->data;
-
- if (r->handle != NULL) {
- count++;
- }
- }
-
- return count;
-}
-
-static ESummaryConnectionData *
-make_connection (RDF *r)
-{
- ESummaryConnectionData *d;
-
- d = g_new (ESummaryConnectionData, 1);
- d->hostname = g_strdup (r->uri);
- d->type = g_strdup (_("News Feed"));
-
- return d;
-}
-
-static GList *
-e_summary_rdf_add (ESummary *summary,
- void *data)
-{
- ESummaryRDF *rdf;
- GList *p, *connections = NULL;
-
- rdf = summary->rdf;
- for (p = rdf->rdfs; p; p = p->next) {
- RDF *r = p->data;
-
- if (r->handle != NULL) {
- ESummaryConnectionData *d;
-
- d = make_connection (r);
- connections = g_list_prepend (connections, d);
- }
- }
-
- return connections;
-}
-
-static void
-rdf_free (RDF *r)
-{
- /* Stop the download */
- if (r->handle) {
- gnome_vfs_async_cancel (r->handle);
- }
-
- g_free (r->uri);
- g_free (r->html);
- g_free (r->buffer);
-
- if (r->string) {
- g_string_free (r->string, TRUE);
- }
-
- if (r->cache) {
- xmlFreeDoc (r->cache);
- }
-
- g_free (r);
-}
-
-static void
-e_summary_rdf_set_online (ESummary *summary,
- GNOME_Evolution_OfflineProgressListener progress,
- gboolean online,
- void *data)
-{
- ESummaryRDF *rdf;
-
- rdf = summary->rdf;
- if (rdf->online == online) {
- return;
- }
-
- if (online == TRUE) {
- e_summary_rdf_update (summary);
- rdf->timeout = gtk_timeout_add (summary->preferences->rdf_refresh_time * 1000,
- (GtkFunction) e_summary_rdf_update,
- summary);
- } else {
- gtk_timeout_remove (rdf->timeout);
- rdf->timeout = 0;
- }
-
- rdf->online = online;
-}
-
-void
-e_summary_rdf_init (ESummary *summary)
-{
- ESummaryPrefs *prefs;
- ESummaryRDF *rdf;
- ESummaryConnection *connection;
- int timeout;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- prefs = summary->preferences;
- rdf = g_new0 (ESummaryRDF, 1);
- summary->rdf = rdf;
-
- connection = g_new (ESummaryConnection, 1);
- connection->count = e_summary_rdf_count;
- connection->add = e_summary_rdf_add;
- connection->set_online = e_summary_rdf_set_online;
- connection->closure = NULL;
- connection->callback = NULL;
- connection->callback_closure = NULL;
-
- rdf->connection = connection;
- e_summary_add_online_connection (summary, connection);
-
- e_summary_add_protocol_listener (summary, "rdf", e_summary_rdf_protocol, rdf);
- if (prefs == NULL) {
- e_summary_rdf_add_uri (summary, "http://www.cnn.com/cnn.rss");
- timeout = 600;
- } else {
- GList *p;
-
- for (p = prefs->rdf_urls; p; p = p->next) {
- e_summary_rdf_add_uri (summary, p->data);
- }
- timeout = prefs->rdf_refresh_time;
- }
-
- e_summary_rdf_update (summary);
- rdf->timeout = gtk_timeout_add (timeout * 1000,
- (GtkFunction) e_summary_rdf_update, summary);
-
- return;
-}
-
-void
-e_summary_rdf_reconfigure (ESummary *summary)
-{
- ESummaryRDF *rdf;
- GList *old, *p;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- rdf = summary->rdf;
-
- /* Stop timeout */
- gtk_timeout_remove (rdf->timeout);
-
- for (old = rdf->rdfs; old; old = old->next) {
- RDF *r;
-
- r = old->data;
- rdf_free (r);
- }
- g_list_free (rdf->rdfs);
- rdf->rdfs = NULL;
-
- for (p = summary->preferences->rdf_urls; p; p = p->next) {
- e_summary_rdf_add_uri (summary, p->data);
- }
-
- rdf->timeout = gtk_timeout_add (summary->preferences->rdf_refresh_time * 1000, (GtkFunction) e_summary_rdf_update, summary);
- e_summary_rdf_update (summary);
-}
-
-void
-e_summary_rdf_free (ESummary *summary)
-{
- ESummaryRDF *rdf;
- GList *p;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- rdf = summary->rdf;
-
- if (rdf->timeout != 0) {
- gtk_timeout_remove (rdf->timeout);
- }
- for (p = rdf->rdfs; p; p = p->next) {
- RDF *r = p->data;
-
- rdf_free (r);
- }
- g_list_free (rdf->rdfs);
- g_free (rdf->html);
-
- e_summary_remove_online_connection (summary, rdf->connection);
- g_free (rdf->connection);
-
- g_free (rdf);
- summary->rdf = NULL;
-}
diff --git a/my-evolution/e-summary-rdf.h b/my-evolution/e-summary-rdf.h
deleted file mode 100644
index 1f6f617dcd..0000000000
--- a/my-evolution/e-summary-rdf.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-rdf.h
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifndef __E_SUMMARY_RDF_H__
-#define __E_SUMMARY_RDF_H__
-
-#include "e-summary-type.h"
-
-typedef struct _ESummaryRDF ESummaryRDF;
-
-char *e_summary_rdf_get_html (ESummary *summary);
-void e_summary_rdf_init (ESummary *summary);
-void e_summary_rdf_reconfigure (ESummary *summary);
-void e_summary_rdf_free (ESummary *summary);
-
-#endif
diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c
deleted file mode 100644
index 9ed5c6bc55..0000000000
--- a/my-evolution/e-summary-tasks.c
+++ /dev/null
@@ -1,419 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-tasks.c
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "e-summary-tasks.h"
-#include "e-summary.h"
-#include <cal-client/cal-client.h>
-#include <cal-util/timeutil.h>
-
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-object.h>
-#include <liboaf/liboaf.h>
-
-struct _ESummaryTasks {
- CalClient *client;
-
- char *html;
-};
-
-const char *
-e_summary_tasks_get_html (ESummary *summary)
-{
- if (summary->tasks == NULL) {
- return NULL;
- }
-
- return summary->tasks->html;
-}
-
-/* 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;
- CalClient *client = user_data;
- CalClientGetStatus status;
- CalComponentDateTime start_a, start_b;
- int retval;
-
- /* a after b then return > 0 */
-
- status = cal_client_get_object (client, a, &comp_a);
- if (status != CAL_CLIENT_GET_SUCCESS)
- return -1;
-
- status = cal_client_get_object (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);
-
- retval = icaltime_compare (*start_a.value, *start_b.value);
-
- cal_component_free_datetime (&start_a);
- cal_component_free_datetime (&start_b);
-
- return retval;
-}
-
-static GList *
-get_todays_uids (ESummary *summary,
- CalClient *client,
- GList *uids)
-{
- GList *today = NULL, *p;
- time_t todays_end, todays_start, t;
-
- t = time (NULL);
- todays_start = time_day_begin_with_zone (t, summary->tz);
- todays_end = time_day_end_with_zone (t, summary->tz);
-
- for (p = uids; p; p = p->next) {
- char *uid;
- CalComponent *comp;
- CalClientGetStatus status;
- CalComponentDateTime due;
- icaltimezone *zone;
- time_t endt;
-
- uid = p->data;
- status = cal_client_get_object (client, uid, &comp);
- if (status != CAL_CLIENT_GET_SUCCESS) {
- continue;
- }
-
- cal_component_get_due (comp, &due);
-
- cal_client_get_timezone (client, due.tzid, &zone);
- if (due.value != 0) {
- icaltimezone_convert_time (due.value, zone, summary->tz);
- endt = icaltime_as_timet (*due.value);
-
- if (endt >= todays_start && endt <= todays_end) {
- today = g_list_append (today, g_strdup (uid));
- }
- }
- cal_component_free_datetime (&due);
- }
-
- if (today == NULL) {
- return NULL;
- }
-
- today = cal_list_sort (today, sort_uids, client);
- return today;
-}
-
-static gboolean
-generate_html (gpointer data)
-{
- ESummary *summary = data;
- ESummaryTasks *tasks = summary->tasks;
- GList *uids, *l;
- GString *string;
- char *tmp;
- time_t t, day_begin, day_end;
-
- t = time (NULL);
- day_begin = time_day_begin (t);
- day_end = time_day_end (t);
-
- uids = cal_client_get_uids (tasks->client, CALOBJ_TYPE_TODO);
- if (summary->preferences->show_tasks == E_SUMMARY_CALENDAR_TODAYS_TASKS && uids != NULL) {
- GList *tmp;
-
- tmp = get_todays_uids (summary, tasks->client, uids);
- cal_obj_uid_list_free (uids);
-
- uids = tmp;
- }
-
- if (uids == NULL) {
- char *s1, *s2;
-
- s1 = e_utf8_from_locale_string (_("Tasks"));
- s2 = e_utf8_from_locale_string (_("No tasks"));
- g_free (tasks->html);
- tasks->html = g_strconcat ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">",
- s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
- g_free (s1);
- g_free (s2);
-
- e_summary_draw (summary);
- return FALSE;
- } else {
- char *s;
-
- string = g_string_new ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">");
- s = e_utf8_from_locale_string (_("Tasks"));
- g_string_append (string, s);
- g_free (s);
- g_string_append (string, "</a></b></dt><dd>");
- for (l = uids; l; l = l->next) {
- char *uid;
- CalComponent *comp;
- CalComponentText text;
- CalClientGetStatus status;
- struct icaltimetype *completed;
-
- uid = l->data;
- status = cal_client_get_object (tasks->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) {
- tmp = g_strdup_printf ("<img align=\"middle\" src=\"task.png\" "
- "alt=\"\" width=\"16\" height=\"16\"> &#160; "
- "<font size=\"-1\"><a href=\"tasks:/%s\">%s</a></font><br>",
- uid, text.value ? text.value : _("(No Description)"));
- } else {
-#if 0
- tmp = g_strdup_printf ("<img align=\"middle\" src=\"task.xpm\" "
- "alt=\"\" width=\"16\" height=\"16\"> &#160; "
- "<font size=\"-1\"><strike><a href=\"evolution:/local/Tasks\">%s</a></strike></font><br>",
- text.value);
-#endif
- cal_component_free_icaltimetype (completed);
- gtk_object_unref (GTK_OBJECT (comp));
- continue;
- }
-
- gtk_object_unref (GTK_OBJECT (comp));
- g_string_append (string, tmp);
- g_free (tmp);
- }
-
- cal_obj_uid_list_free (uids);
- g_string_append (string, "</dd></dl>");
- }
-
- if (tasks->html) {
- g_free (tasks->html);
- }
- tasks->html = string->str;
- g_string_free (string, FALSE);
-
- e_summary_draw (summary);
- return FALSE;
-}
-
-static void
-cal_opened_cb (CalClient *client,
- CalClientOpenStatus status,
- ESummary *summary)
-{
- if (status == CAL_CLIENT_OPEN_SUCCESS) {
- g_idle_add (generate_html, summary);
- } else {
- /* Need to work out what to do if there's an error */
- }
-}
-static void
-obj_changed_cb (CalClient *client,
- const char *uid,
- gpointer data)
-{
- g_idle_add (generate_html, data);
-}
-
-static void
-e_summary_tasks_protocol (ESummary *summary,
- const char *uri,
- void *closure)
-{
- ESummaryTasks *tasks;
- CORBA_Environment ev;
- const char *comp_uri;
- GNOME_Evolution_Calendar_CompEditorFactory factory;
-
- tasks = (ESummaryTasks *) closure;
-
- comp_uri = cal_client_get_uri (tasks->client);
-
- /* Get the factory */
- CORBA_exception_init (&ev);
- factory = oaf_activate_from_id ("OAFIID:GNOME_Evolution_Calendar_CompEditorFactory", 0, NULL, &ev);
- if (BONOBO_EX (&ev)) {
- g_message ("%s: Could not activate the component editor factory (%s)", __FUNCTION__,
- CORBA_exception_id (&ev));
- CORBA_exception_free (&ev);
- return;
- }
-
- GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, comp_uri, (char *)uri + 7, &ev);
-
- if (BONOBO_EX (&ev)) {
- g_message ("%s: Execption while editing the component (%s)", __FUNCTION__,
- CORBA_exception_id (&ev));
- }
-
- CORBA_exception_free (&ev);
- bonobo_object_release_unref (factory, NULL);
-}
-
-void
-e_summary_tasks_init (ESummary *summary)
-{
- ESummaryTasks *tasks;
- gboolean result;
- char *uri;
-
- g_return_if_fail (summary != NULL);
-
- tasks = g_new (ESummaryTasks, 1);
- summary->tasks = tasks;
- tasks->html = NULL;
-
- tasks->client = cal_client_new ();
- if (tasks->client == NULL) {
- g_warning ("Error making the client");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (tasks->client), "cal-opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), summary);
- gtk_signal_connect (GTK_OBJECT (tasks->client), "obj-updated",
- GTK_SIGNAL_FUNC (obj_changed_cb), summary);
- gtk_signal_connect (GTK_OBJECT (tasks->client), "obj-removed",
- GTK_SIGNAL_FUNC (obj_changed_cb), summary);
-
- uri = gnome_util_prepend_user_home ("evolution/local/Tasks/tasks.ics");
- result = cal_client_open_calendar (tasks->client, uri, FALSE);
- g_free (uri);
- if (result == FALSE) {
- g_message ("Open tasks failed");
- }
-
- e_summary_add_protocol_listener (summary, "tasks", e_summary_tasks_protocol, tasks);
-}
-
-void
-e_summary_tasks_reconfigure (ESummary *summary)
-{
- generate_html (summary);
-}
-
-void
-e_summary_tasks_free (ESummary *summary)
-{
- ESummaryTasks *tasks;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- tasks = summary->tasks;
- gtk_object_unref (GTK_OBJECT (tasks->client));
- g_free (tasks->html);
-
- g_free (tasks);
- summary->tasks = NULL;
-}
diff --git a/my-evolution/e-summary-tasks.h b/my-evolution/e-summary-tasks.h
deleted file mode 100644
index 465323b419..0000000000
--- a/my-evolution/e-summary-tasks.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-tasks.h
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifndef __E_SUMMARY_TASKS_H__
-#define __E_SUMMARY_TASKS_H__
-
-#include "e-summary-type.h"
-
-typedef struct _ESummaryTasks ESummaryTasks;
-
-const char *e_summary_tasks_get_html (ESummary *summary);
-void e_summary_tasks_init (ESummary *summary);
-void e_summary_tasks_reconfigure (ESummary *summary);
-void e_summary_tasks_free (ESummary *summary);
-
-#endif
diff --git a/my-evolution/e-summary-type.h b/my-evolution/e-summary-type.h
deleted file mode 100644
index 20733e6e22..0000000000
--- a/my-evolution/e-summary-type.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-type.h
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifndef __E_SUMMARY_TYPE_H__
-#define __E_SUMMARY_TYPE_H__
-
-typedef struct _ESummary ESummary;
-
-#endif
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
deleted file mode 100644
index 4ff97a8e05..0000000000
--- a/my-evolution/e-summary-weather.c
+++ /dev/null
@@ -1,836 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-weather.c
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <gtk/gtkctree.h>
-#include <gtk/gtkmain.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-config.h>
-
-#include <gal/widgets/e-unicode.h>
-
-#include <libgnomevfs/gnome-vfs.h>
-#include "e-summary.h"
-#include "e-summary-weather.h"
-#include "weather.h"
-#include "metar.h"
-
-struct _ESummaryWeather {
- ESummaryConnection *connection;
- GList *weathers;
-
- char *html;
- guint32 timeout;
-
- gboolean online;
- gboolean errorshown;
-};
-
-static GHashTable *locations_hash = NULL;
-
-char *
-e_summary_weather_get_html (ESummary *summary)
-{
- GList *weathers;
- GString *string;
- char *html;
- char *s;
-
- if (summary->weather == NULL) {
- return NULL;
- }
-
- string = g_string_new ("<dl><img src=\"ico-weather.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"><b>"
- "<a href=\"http://www.metoffice.gov.uk\">");
- s = e_utf8_from_locale_string (_("My Weather"));
- g_string_append (string, s);
- g_free (s);
- g_string_append (string, "</a></b>");
- for (weathers = summary->weather->weathers; weathers; weathers = weathers->next) {
- if (((Weather *)weathers->data)->html == NULL) {
- continue;
- }
-
- g_string_append (string, ((Weather *)weathers->data)->html);
- }
-
- g_string_append (string, "</dl>");
-
- html = string->str;
- g_string_free (string, FALSE);
-
- return html;
-}
-
-static char *
-make_url (const char *code)
-{
- return g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", code);
-}
-
-static char *
-make_anchor (const char *name, const char *code)
-{
- char *url, *anchor;
-
- url = make_url (code);
- anchor = g_strdup_printf ("<a href=\"%s\">%s</a>", url, name);
- g_free (url);
-
- return anchor;
-}
-
-static void
-weather_make_html (Weather *w)
-{
- GString *string;
- ESummaryWeatherLocation *location;
- char *sky, *temp, *cond, *s;
- const char *icon_name;
-
- icon_name = icon_from_weather (w);
- string = g_string_new ("");
- g_string_sprintf (string, "<dd><img align=\"middle\" "
- "src=\"%s\" width=\"16\" height=\"16\">&#160;<b>",
- icon_name);
- location = g_hash_table_lookup (locations_hash, w->location);
-#if 0
- if (location == NULL) {
- url = make_anchor (w->location, w->location);
- } else {
- url = make_anchor (location->name, w->location);
- }
-#endif
- if (location == NULL) {
- g_string_append (string, w->location);
- } else {
- g_string_append (string, location->name);
- }
-
-#if 0
- g_string_append (string, url);
- g_free (url);
-#endif
-
- g_string_append (string, "</b>:<blockquote><font size=\"-1\">");
- sky = (char *) weather_sky_string (w);
- temp = weather_temp_string (w);
- cond = (char *) weather_conditions_string (w);
-
- s = e_utf8_from_locale_string (sky);
- g_string_append (string, s);
- g_free (s);
- g_string_append_c (string, ' ');
- s = e_utf8_from_locale_string (cond);
- g_string_append (string, s);
- g_free (s);
- g_string_append_c (string, ' ');
- s = e_utf8_from_locale_string (temp);
- g_string_append (string, s);
- g_free (s);
- g_free (temp);
-
-#if 0
- g_string_append (string, "<font size=\"-1\">");
-
- uri = g_strdup_printf ("<a href=\"weather://%p\">", w);
- g_string_append (string, uri);
- g_free (uri);
- g_string_append (string, "(More)</a></font></font></blockquote></dd>");
-#else
- g_string_append (string, "</font></blockquote></dd>");
-#endif
- if (w->html != NULL) {
- g_free (w->html);
- }
- w->html = string->str;
- g_string_free (string, FALSE);
-
- e_summary_draw (w->summary);
-}
-
-static ESummaryWeatherLocation *
-weather_location_new (char **locdata)
-{
- ESummaryWeatherLocation *location;
-
- location = g_new (ESummaryWeatherLocation, 1);
- location->name = g_strdup (locdata[0]);
- location->code = g_strdup (locdata[1]);
- location->zone = g_strdup (locdata[2]);
- location->radar = g_strdup (locdata[3]);
-
- return location;
-}
-
-static void
-parse_metar_token (const char *token,
- gboolean in_comment,
- Weather *w)
-{
- if (in_comment == FALSE) {
- if (metar_tok_time ((char *) token, w)) {
- return;
- } else if (metar_tok_wind ((char *) token, w)) {
- return;
- } else if (metar_tok_vis ((char *) token, w)) {
- return;
- } else if (metar_tok_cloud ((char *) token, w)) {
- return;
- } else if (metar_tok_temp ((char *) token, w)) {
- return;
- } else if (metar_tok_pres ((char *) token, w)) {
- return;
- } else if (metar_tok_cond ((char *) token, w)) {
- return;
- }
- }
-}
-
-static void
-parse_metar (const char *metar,
- Weather *w)
-{
- char *metar_dup;
- char **toks;
- gint ntoks;
- gint i;
- gboolean in_remark = FALSE;
-
- metar_dup = g_strdup (metar + 6);
-
- metar_init_re ();
-
- toks = g_strsplit (metar, " ", 0);
-
- for (ntoks = 0; toks[ntoks]; ntoks++) {
- if (strcmp (toks[ntoks], "RMK") == 0) {
- in_remark = TRUE;
- }
- }
-
- for (i = ntoks - 1; i >= 0; i--) {
- if (*toks[i] != '\0') {
- if (strcmp (toks[i], "RMK") == 0) {
- in_remark = FALSE;
- } else {
- parse_metar_token (toks[i], in_remark, w);
- }
- }
- }
-
- g_strfreev (toks);
- g_free (metar_dup);
- weather_make_html (w);
-}
-
-static void
-close_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- Weather *w)
-{
- ESummary *summary;
- char *html, *metar, *end;
- char *search_str;
-
- summary = w->summary;
- if (summary->weather->connection->callback) {
- ESummaryConnection *connection = summary->weather->connection;
- connection->callback (summary, connection->callback_closure);
- }
-
- if (w->handle == NULL) {
- g_free (w->buffer);
- w->buffer = NULL;
- g_string_free (w->string, TRUE);
- w->string = NULL;
- return;
- }
-
- w->handle = NULL;
- g_free (w->buffer);
- w->buffer = NULL;
- html = w->string->str;
- g_string_free (w->string, FALSE);
- w->string = NULL;
-
- /* Find the metar data */
- search_str = g_strdup_printf ("\n%s", w->location);
- metar = strstr (html, search_str);
- if (metar == NULL) {
- g_free (search_str);
- g_free (html);
- return;
- }
-
- metar++;
- end = strchr (metar, '\n');
- if (end == NULL) {
- g_free (search_str);
- g_free (html);
- return;
- }
- *end = '\0';
-
- parse_metar (metar, w);
- g_free (html);
- g_free (search_str);
- return;
-}
-
-static void
-read_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize bytes_requested,
- GnomeVFSFileSize bytes_read,
- Weather *w)
-{
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- if (w->summary->weather->errorshown == FALSE) {
- w->html = g_strdup ("<dd><b>An error occurred while downloading weather data</b></dd>");
- w->summary->weather->errorshown = TRUE;
- } else {
- w->html = g_strdup ("<dd> </dd>");
- }
-
- e_summary_draw (w->summary);
- w->handle = NULL;
- gnome_vfs_async_close (handle,
- (GnomeVFSAsyncCloseCallback) close_callback, w);
- return;
- }
-
- if (bytes_read == 0) {
- gnome_vfs_async_close (handle,
- (GnomeVFSAsyncCloseCallback) close_callback, w);
- } else {
- *((char *) buffer + bytes_read) = 0;
- g_string_append (w->string, (const char *) buffer);
- gnome_vfs_async_read (handle, buffer, 4095,
- (GnomeVFSAsyncReadCallback) read_callback, w);
- }
-}
-
-static void
-open_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- Weather *w)
-{
- if (result != GNOME_VFS_OK) {
- if (w->summary->weather->errorshown == FALSE) {
- w->html = e_utf8_from_locale_string (_("<dd><b>The weather server could not be contacted</b></dd>"));
-
- w->summary->weather->errorshown = TRUE;
- } else {
- w->html = g_strdup ("<dd> </dd>");
- }
-
- e_summary_draw (w->summary);
- return;
- }
-
- w->string = g_string_new ("");
- w->buffer = g_new (char, 4096);
-
- gnome_vfs_async_read (handle, w->buffer, 4095,
- (GnomeVFSAsyncReadCallback) read_callback, w);
-}
-
-static void
-e_summary_weather_update (ESummary *summary)
-{
- GList *w;
-
- summary->weather->errorshown = FALSE;
- for (w = summary->weather->weathers; w; w = w->next) {
- char *uri;
- Weather *weather = w->data;
-
- uri = g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", weather->location);
-
- gnome_vfs_async_open (&weather->handle, uri, GNOME_VFS_OPEN_READ,
- (GnomeVFSAsyncOpenCallback) open_callback, weather);
- g_free (uri);
- }
-}
-
-static void
-weather_free (Weather *w)
-{
- g_return_if_fail (w != NULL);
-
- if (w->handle != NULL) {
- gnome_vfs_async_cancel (w->handle);
- }
- if (w->string) {
- g_string_free (w->string, TRUE);
- }
- if (w->buffer) {
- g_free (w->buffer);
- }
-
- g_free (w->location);
- g_free (w->html);
- g_free (w);
-}
-
-static void
-e_summary_weather_add_location (ESummary *summary,
- const char *location)
-{
- Weather *w;
-
- w = g_new0 (Weather, 1);
- w->summary = summary;
- w->location = g_strdup (location);
- summary->weather->weathers = g_list_append (summary->weather->weathers, w);
-}
-
-static gboolean
-e_summary_weather_init_locations (void)
-{
- char *key, *path;
- int nregions, iregions;
- char **regions;
-
- if (locations_hash != NULL) {
- return TRUE;
- }
-
- locations_hash = g_hash_table_new (g_str_hash, g_str_equal);
- path = g_strdup (EVOLUTION_DATADIR "/evolution/Locations");
-
- key = g_strdup_printf ("=%s=/", path);
- g_free (path);
-
- gnome_config_push_prefix (key);
- g_free (key);
-
- gnome_config_get_vector ("Main/regions", &nregions, &regions);
- for (iregions = nregions - 1; iregions >= 0; iregions--) {
- int nstates, istates;
- char **states;
- char *region_name;
- char *region_name_key;
- char *states_key;
-
- region_name_key = g_strconcat (regions[iregions], "/name", NULL);
- states_key = g_strconcat (regions[iregions], "/states", NULL);
- region_name = gnome_config_get_string (region_name_key);
-
- gnome_config_get_vector (states_key, &nstates, &states);
-
- for (istates = nstates - 1; istates >= 0; istates--) {
- void *iter;
- char *iter_key, *iter_val;
- char *state_path, *state_name_key, *state_name;
-
- state_path = g_strconcat (regions[iregions], "_", states[istates], "/", NULL);
- state_name_key = g_strconcat (state_path, "name", NULL);
- state_name = gnome_config_get_string (state_name_key);
-
- iter = gnome_config_init_iterator (state_path);
-
- while ((iter = gnome_config_iterator_next (iter, &iter_key, &iter_val)) != NULL) {
- if (strstr (iter_key, "loc") != NULL) {
- char **locdata;
- int nlocdata;
- ESummaryWeatherLocation *location;
-
- gnome_config_make_vector (iter_val,
- &nlocdata,
- &locdata);
- g_return_val_if_fail (nlocdata == 4, FALSE);
-
- if (!g_hash_table_lookup (locations_hash, locdata[1])) {
- location = weather_location_new (locdata);
- g_hash_table_insert (locations_hash,
- g_strdup (locdata[1]),
- location);
- }
-
- g_strfreev (locdata);
- }
-
- g_free (iter_key);
- g_free (iter_val);
- }
-
- g_free (state_name);
- g_free (state_path);
- g_free (state_name_key);
- }
-
- g_strfreev (states);
- g_free (region_name);
- g_free (region_name_key);
- g_free (states_key);
- }
-
- g_strfreev (regions);
- gnome_config_pop_prefix ();
-
- return TRUE;
-}
-
-static void
-e_summary_weather_protocol (ESummary *summary,
- const char *uri,
- void *closure)
-{
-
-}
-
-static int
-e_summary_weather_count (ESummary *summary,
- void *data)
-{
- ESummaryWeather *weather;
- GList *p;
- int count = 0;
-
- weather = summary->weather;
- for (p = weather->weathers; p; p = p->next) {
- Weather *w = p->data;
-
- if (w->handle != NULL) {
- count++;
- }
- }
-
- return count;
-}
-
-static ESummaryConnectionData *
-make_connection (Weather *w)
-{
- ESummaryConnectionData *data;
-
- data = g_new (ESummaryConnectionData, 1);
- data->hostname = make_url (w->location);
- data->type = g_strdup (_("Weather"));
-
- return data;
-}
-
-static GList *
-e_summary_weather_add (ESummary *summary,
- void *data)
-{
- ESummaryWeather *weather;
- GList *p, *connections = NULL;
-
- weather = summary->weather;
- for (p = weather->weathers; p; p = p->next) {
- Weather *w = p->data;
-
- if (w->handle != NULL) {
- ESummaryConnectionData *d;
-
- d = make_connection (w);
- connections = g_list_prepend (connections, d);
- }
- }
-
- return connections;
-}
-
-static void
-e_summary_weather_set_online (ESummary *summary,
- GNOME_Evolution_OfflineProgressListener listener,
- gboolean online,
- void *data)
-{
- ESummaryWeather *weather;
-
- weather = summary->weather;
- if (weather->online == online) {
- return;
- }
-
- if (online == TRUE) {
- e_summary_weather_update (summary);
- weather->timeout = gtk_timeout_add (summary->preferences->weather_refresh_time * 1000,
- (GtkFunction) e_summary_weather_update,
- summary);
- } else {
- gtk_timeout_remove (weather->timeout);
- weather->timeout = 0;
- }
-
- weather->online = online;
-}
-
-void
-e_summary_weather_init (ESummary *summary)
-{
- ESummaryPrefs *prefs;
- ESummaryWeather *weather;
- ESummaryConnection *connection;
- int timeout;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- if (e_summary_weather_init_locations () == FALSE) {
- return;
- }
-
- prefs = summary->preferences;
- weather = g_new0 (ESummaryWeather, 1);
- weather->online = TRUE;
- summary->weather = weather;
-
- connection = g_new (ESummaryConnection, 1);
- connection->count = e_summary_weather_count;
- connection->add = e_summary_weather_add;
- connection->set_online = e_summary_weather_set_online;
- connection->closure = NULL;
- connection->callback = NULL;
- connection->callback_closure = NULL;
-
- weather->connection = connection;
- e_summary_add_online_connection (summary, connection);
-
- e_summary_add_protocol_listener (summary, "weather", e_summary_weather_protocol, weather);
-
- if (prefs == NULL) {
- /* translators: Put here a list of codes for locations you want to
- see in My Evolution by default. You can find the list of all
- stations and their codes in Evolution sources
- (evolution/my-evolution/Locations) */
- char *default_stations = _("KBOS:ZSAM:EGAA"), **stations_v, **p;
-
- stations_v = g_strsplit (default_stations, ":", 0);
- g_assert (stations_v != NULL);
- for (p = stations_v; *p != NULL; p++) {
- e_summary_weather_add_location (summary, *p);
- }
- g_strfreev (stations_v);
- timeout = 600;
- } else {
- GList *p;
-
- for (p = prefs->stations; p; p = p->next) {
- e_summary_weather_add_location (summary, p->data);
- }
- timeout = prefs->weather_refresh_time;
- }
-
- e_summary_weather_update (summary);
-
- weather->timeout = gtk_timeout_add (timeout * 1000,
- (GtkFunction) e_summary_weather_update,
- summary);
- return;
-}
-
-const char *
-e_summary_weather_code_to_name (const char *code)
-{
- ESummaryWeatherLocation *location;
-
- if (locations_hash == NULL) {
- if (e_summary_weather_init_locations () == FALSE) {
- return code;
- }
- }
-
- location = g_hash_table_lookup (locations_hash, code);
- if (location == NULL) {
- return code;
- } else {
- return location->name;
- }
-}
-
-void
-e_summary_weather_ctree_fill (GtkCTree *tree)
-{
- GtkCTreeNode *region, *state, *location, *pref_loc_root;
- char *key, *path;
- int nregions, iregions;
- char **regions, *pp[1];
-
- path = g_strdup (EVOLUTION_DATADIR "/evolution/Locations");
-
- key = g_strdup_printf ("=%s=/", path);
- g_free (path);
-
- gnome_config_push_prefix (key);
- g_free (key);
-
- pp[0] = _("Regions");
- pref_loc_root = gtk_ctree_insert_node (tree, NULL, NULL, pp, 0,
- NULL, NULL, NULL, NULL,
- FALSE, TRUE);
-
- gnome_config_get_vector ("Main/regions", &nregions, &regions);
- region = NULL;
- for (iregions = nregions - 1; iregions >= 0; iregions--) {
- int nstates, istates;
- char **states;
- char *region_name;
- char *region_name_key;
- char *states_key;
-
- region_name_key = g_strconcat (regions[iregions], "/name", NULL);
- states_key = g_strconcat (regions[iregions], "/states", NULL);
- region_name = gnome_config_get_string (region_name_key);
-
- pp[0] = region_name;
- region = gtk_ctree_insert_node (tree, pref_loc_root,
- region, pp, 0, NULL,
- NULL, NULL, NULL,
- FALSE, FALSE);
-
- gnome_config_get_vector (states_key, &nstates, &states);
-
- state = NULL;
- for (istates = nstates - 1; istates >= 0; istates--) {
- void *iter;
- char *iter_key, *iter_val;
- char *state_path, *state_name_key, *state_name;
-
- state_path = g_strconcat (regions[iregions], "_", states[istates], "/", NULL);
- state_name_key = g_strconcat (state_path, "name", NULL);
- state_name = gnome_config_get_string (state_name_key);
-
- pp[0] = state_name;
- state = gtk_ctree_insert_node (tree, region,
- state, pp, 0,
- NULL, NULL,
- NULL, NULL,
- FALSE, FALSE);
-
- location = NULL;
- iter = gnome_config_init_iterator (state_path);
-
- while ((iter = gnome_config_iterator_next (iter, &iter_key, &iter_val)) != NULL) {
- if (strstr (iter_key, "loc") != NULL) {
- char **locdata;
- int nlocdata;
- ESummaryWeatherLocation *w_location;
-
- gnome_config_make_vector (iter_val,
- &nlocdata,
- &locdata);
- g_return_if_fail (nlocdata == 4);
-
- pp[0] = locdata[0];
- location = gtk_ctree_insert_node (tree, state, location, pp, 0,
- NULL, NULL, NULL, NULL, FALSE, TRUE);
- w_location = g_hash_table_lookup (locations_hash, locdata[1]);
- gtk_ctree_node_set_row_data (tree, location, w_location);
- g_strfreev (locdata);
- }
-
- g_free (iter_key);
- g_free (iter_val);
- }
-
- g_free (state_name);
- g_free (state_path);
- g_free (state_name_key);
- }
-
- g_strfreev (states);
- g_free (region_name);
- g_free (region_name_key);
- g_free (states_key);
- }
-
- g_strfreev (regions);
- gnome_config_pop_prefix ();
-
- return;
-}
-
-void
-e_summary_weather_reconfigure (ESummary *summary)
-{
- ESummaryWeather *weather;
- GList *old, *p;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- weather = summary->weather;
-
- /* Stop timeout so it doesn't occur while we're changing stuff*/
- gtk_timeout_remove (weather->timeout);
-
- for (old = weather->weathers; old; old = old->next) {
- Weather *w;
-
- w = old->data;
- weather_free (w);
- }
- g_list_free (weather->weathers);
- weather->weathers = NULL;
- for (p = summary->preferences->stations; p; p = p->next) {
- e_summary_weather_add_location (summary, p->data);
- }
-
- weather->timeout = gtk_timeout_add (summary->preferences->weather_refresh_time * 1000,
- (GtkFunction) e_summary_weather_update, summary);
- e_summary_weather_update (summary);
-}
-
-void
-e_summary_weather_free (ESummary *summary)
-{
- ESummaryWeather *weather;
- GList *p;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- weather = summary->weather;
-
- if (weather->timeout != 0) {
- gtk_timeout_remove (weather->timeout);
- }
- for (p = weather->weathers; p; p = p->next) {
- Weather *w = p->data;
-
- weather_free (w);
- }
- g_list_free (weather->weathers);
- g_free (weather->html);
-
- e_summary_remove_online_connection (summary, weather->connection);
- g_free (weather->connection);
-
- g_free (weather);
- summary->weather = NULL;
-}
-
diff --git a/my-evolution/e-summary-weather.h b/my-evolution/e-summary-weather.h
deleted file mode 100644
index 47d19ca625..0000000000
--- a/my-evolution/e-summary-weather.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-weather.h
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifndef __E_SUMMARY_WEATHER_H__
-#define __E_SUMMARY_WEATHER_H__
-
-#include <time.h>
-#include <gtk/gtkctree.h>
-#include "e-summary-type.h"
-
-typedef struct _ESummaryWeather ESummaryWeather;
-
-#define WEATHER_LOCATION_NAME_MAX_LEN 100
-#define WEATHER_LOCATION_CODE_LEN 4
-#define WEATHER_LOCATION_ZONE_LEN 7
-#define WEATHER_LOCATION_RADAR_LEN 3
-
-typedef struct _ESummaryWeatherLocation {
- char *name;
- char *code;
- char *zone;
- char *radar;
-} ESummaryWeatherLocation;
-
-typedef enum _ESummaryWeatherWindDir {
- WIND_VARIABLE,
- WIND_N,
- WIND_NNE,
- WIND_NE,
- WIND_ENE,
- WIND_E,
- WIND_ESE,
- WIND_SE,
- WIND_SSE,
- WIND_S,
- WIND_SSW,
- WIND_SW,
- WIND_WSW,
- WIND_W,
- WIND_WNW,
- WIND_NW,
- WIND_NNW
-} ESummaryWeatherWindDir;
-
-typedef enum _ESummaryWeatherSky {
- SKY_CLEAR,
- SKY_BROKEN,
- SKY_SCATTERED,
- SKY_FEW,
- SKY_OVERCAST
-} ESummaryWeatherSky;
-
-typedef enum _ESummaryWeatherConditionPhenomenon {
- PHENOMENON_NONE,
-
- PHENOMENON_DRIZZLE,
- PHENOMENON_RAIN,
- PHENOMENON_SNOW,
- PHENOMENON_SNOW_GRAINS,
- PHENOMENON_ICE_CRYSTALS,
- PHENOMENON_ICE_PELLETS,
- PHENOMENON_HAIL,
- PHENOMENON_SMALL_HAIL,
- PHENOMENON_UNKNOWN_PRECIPITATION,
-
- PHENOMENON_MIST,
- PHENOMENON_FOG,
- PHENOMENON_SMOKE,
- PHENOMENON_VOLCANIC_ASH,
- PHENOMENON_SAND,
- PHENOMENON_HAZE,
- PHENOMENON_SPRAY,
- PHENOMENON_DUST,
-
- PHENOMENON_SQUALL,
- PHENOMENON_SANDSTORM,
- PHENOMENON_DUSTSTORM,
- PHENOMENON_FUNNEL_CLOUD,
- PHENOMENON_TORNADO,
- PHENOMENON_DUST_WHIRLS
-} ESummaryWeatherConditionPhenomenon;
-
-typedef enum _ESummaryWeatherConditionQualifier {
- QUALIFIER_NONE,
-
- QUALIFIER_VICINITY,
-
- QUALIFIER_LIGHT,
- QUALIFIER_MODERATE,
- QUALIFIER_HEAVY,
- QUALIFIER_SHALLOW,
- QUALIFIER_PATCHES,
- QUALIFIER_PARTIAL,
- QUALIFIER_THUNDERSTORM,
- QUALIFIER_BLOWING,
- QUALIFIER_SHOWERS,
- QUALIFIER_DRIFTING,
- QUALIFIER_FREEZING
-} ESummaryWeatherConditionQualifier;
-
-typedef struct _ESummaryWeatherConditions {
- gboolean significant;
- ESummaryWeatherConditionPhenomenon phenomenon;
- ESummaryWeatherConditionQualifier qualifier;
-} ESummaryWeatherConditions;
-
-typedef enum _ESummaryWeatherUnits {
- UNITS_IMPERIAL,
- UNITS_METRIC
-} ESummaryWeatherUnits;
-
-typedef enum _ESummaryWeatherForecastType {
- FORECAST_STATE,
- FORECAST_ZONE
-} ESummaryWeatherForecastType;
-
-typedef double ESummaryWeatherTemperature;
-typedef int ESummaryWeatherHumidity;
-typedef int ESummaryWeatherWindSpeed;
-typedef double ESummaryWeatherPressure;
-typedef double ESummaryWeatherVisibility;
-
-typedef time_t ESummaryWeatherUpdate;
-
-char *e_summary_weather_get_html (ESummary *summary);
-void e_summary_weather_init (ESummary *summary);
-void e_summary_weather_reconfigure (ESummary *summary);
-void e_summary_weather_ctree_fill (GtkCTree *tree);
-const char *e_summary_weather_code_to_name (const char *code);
-void e_summary_weather_free (ESummary *summary);
-
-#endif
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
deleted file mode 100644
index 56ba7dd9ae..0000000000
--- a/my-evolution/e-summary.c
+++ /dev/null
@@ -1,877 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary.c
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#include <gtkhtml/htmlengine.h>
-#include <gtkhtml/htmlselection.h>
-
-#include <libgnomevfs/gnome-vfs.h>
-
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <bonobo/bonobo-listener.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo-conf/bonobo-config-database.h>
-
-#include <libgnome/gnome-paper.h>
-#include <libgnome/gnome-url.h>
-
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-
-#include <gui/alarm-notify/alarm.h>
-#include <cal-util/timeutil.h>
-
-#include "e-summary.h"
-#include "e-summary-preferences.h"
-#include "my-evolution-html.h"
-#include "Mail.h"
-
-#include <Evolution.h>
-
-#include <time.h>
-
-#define PARENT_TYPE (gtk_vbox_get_type ())
-
-extern char *evolution_dir;
-
-static GtkObjectClass *e_summary_parent_class;
-
-struct _ESummaryMailFolderInfo {
- char *name;
-
- int count;
- int unread;
-};
-
-typedef struct _DownloadInfo {
- GtkHTMLStream *stream;
- char *uri;
- char *buffer, *ptr;
- guint32 bufsize;
-} DownloadInfo;
-
-struct _ESummaryPrivate {
- GNOME_Evolution_Shell shell;
- GNOME_Evolution_ShellView shell_view_interface;
-
- GtkWidget *html_scroller;
- GtkWidget *html;
-
- GHashTable *protocol_hash;
-
- GList *connections;
-
- gpointer alarm;
-
- gboolean frozen;
- gboolean redraw_pending;
-};
-
-typedef struct _ProtocolListener {
- ESummaryProtocolListener listener;
- void *closure;
-} ProtocolListener;
-
-static GHashTable *images_cache = NULL;
-
-static void
-free_protocol (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- g_free (value);
-}
-
-static void
-destroy (GtkObject *object)
-{
- ESummary *summary;
- ESummaryPrivate *priv;
-
- summary = E_SUMMARY (object);
- priv = summary->priv;
-
- if (priv == NULL) {
- return;
- }
-
- if (summary->mail) {
- e_summary_mail_free (summary);
- }
- if (summary->calendar) {
- e_summary_calendar_free (summary);
- }
- if (summary->rdf) {
- e_summary_rdf_free (summary);
- }
- if (summary->weather) {
- e_summary_weather_free (summary);
- }
- if (summary->tasks) {
- e_summary_tasks_free (summary);
- }
-
- alarm_remove (priv->alarm);
- alarm_done ();
-
- if (priv->protocol_hash) {
- g_hash_table_foreach (priv->protocol_hash, free_protocol, NULL);
- g_hash_table_destroy (priv->protocol_hash);
- }
-
- g_free (priv);
- summary->priv = NULL;
-
- e_summary_parent_class->destroy (object);
-}
-
-void
-e_summary_draw (ESummary *summary)
-{
- GString *string;
- GtkHTMLStream *stream;
- char *html;
- char date[256], *date_utf;
- time_t t;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- if (summary->mail == NULL || summary->calendar == NULL
- || summary->rdf == NULL || summary->weather == NULL
- || summary->tasks == NULL) {
- return;
- }
-
- if (summary->priv->frozen == TRUE) {
- summary->priv->redraw_pending = TRUE;
- return;
- }
-
- string = g_string_new (HTML_1);
- t = time (NULL);
- strftime (date, 255, _("%A, %B %e %Y"), localtime (&t));
-
- date_utf = e_utf8_from_locale_string (date);
- html = g_strdup_printf (HTML_2, date_utf);
- g_free (date_utf);
- g_string_append (string, html);
- g_free (html);
- g_string_append (string, HTML_3);
-
- /* Weather and RDF stuff here */
- html = e_summary_weather_get_html (summary);
- if (html != NULL) {
- g_string_append (string, html);
- g_free (html);
- }
-
- html = e_summary_rdf_get_html (summary);
- if (html != NULL) {
- g_string_append (string, html);
- g_free (html);
- }
-
- g_string_append (string, HTML_4);
-
- html = (char *) e_summary_mail_get_html (summary);
- if (html != NULL) {
- g_string_append (string, html);
- }
-
- html = (char *) e_summary_calendar_get_html (summary);
- if (html != NULL) {
- g_string_append (string, html);
- }
-
- html = (char *) e_summary_tasks_get_html (summary);
- if (html != NULL) {
- g_string_append (string, html);
- }
-
- g_string_append (string, HTML_5);
-
- stream = gtk_html_begin (GTK_HTML (summary->priv->html));
- GTK_HTML (summary->priv->html)->engine->newPage = FALSE;
- gtk_html_write (GTK_HTML (summary->priv->html), stream, string->str, strlen (string->str));
- gtk_html_end (GTK_HTML (summary->priv->html), stream, GTK_HTML_STREAM_OK);
-
- g_string_free (string, TRUE);
-}
-
-static char *
-e_pixmap_file (const char *filename)
-{
- char *ret;
- char *edir;
-
- if (g_file_exists (filename)) {
- ret = g_strdup (filename);
-
- return ret;
- }
-
- /* Try the evolution images dir */
- edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution",
- filename);
-
- if (g_file_exists (edir)) {
- ret = g_strdup (edir);
- g_free (edir);
-
- return ret;
- }
- g_free (edir);
-
- /* Try the evolution button images dir */
- edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons",
- filename);
-
- if (g_file_exists (edir)) {
- ret = g_strdup (edir);
- g_free (edir);
-
- return ret;
- }
- g_free (edir);
-
- /* Fall back to the gnome_pixmap_file */
- ret = gnome_pixmap_file (filename);
- if (ret == NULL) {
- g_warning ("Could not find pixmap for %s", filename);
- }
-
- return ret;
-}
-
-struct _imgcache {
- char *buffer;
- int bufsize;
-};
-
-static void
-close_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer data)
-{
- DownloadInfo *info = data;
- struct _imgcache *img;
-
- if (images_cache == NULL) {
- images_cache = g_hash_table_new (g_str_hash, g_str_equal);
- }
-
- img = g_new (struct _imgcache, 1);
- img->buffer = info->buffer;
- img->bufsize = info->bufsize;
-
- g_hash_table_insert (images_cache, info->uri, img);
- g_free (info);
-}
-
-/* The way this behaves is a workaround for ximian bug 10235: loading
- * the image into gtkhtml progressively will result in garbage being
- * drawn, so we wait until we've read the whole thing and then write
- * it all at once.
- */
-static void
-read_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- gpointer buffer,
- GnomeVFSFileSize bytes_requested,
- GnomeVFSFileSize bytes_read,
- gpointer data)
-{
- DownloadInfo *info = data;
-
- if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- gtk_html_stream_close (info->stream, GTK_HTML_STREAM_ERROR);
- gnome_vfs_async_close (handle, close_callback, info);
- } else if (bytes_read == 0) {
- gtk_html_stream_write (info->stream, info->buffer, info->bufsize);
- gtk_html_stream_close (info->stream, GTK_HTML_STREAM_OK);
- gnome_vfs_async_close (handle, close_callback, info);
- } else {
- bytes_read += info->ptr - info->buffer;
- info->bufsize += 4096;
- info->buffer = g_realloc (info->buffer, info->bufsize);
- info->ptr = info->buffer + bytes_read;
- gnome_vfs_async_read (handle, info->ptr, 4095, read_callback, info);
- }
-}
-
-static void
-open_callback (GnomeVFSAsyncHandle *handle,
- GnomeVFSResult result,
- DownloadInfo *info)
-{
- if (result != GNOME_VFS_OK) {
- gtk_html_stream_close (info->stream, GTK_HTML_STREAM_ERROR);
- g_free (info->uri);
- g_free (info);
- return;
- }
-
- info->bufsize = 4096;
- info->buffer = info->ptr = g_new (char, info->bufsize);
- gnome_vfs_async_read (handle, info->buffer, 4095, read_callback, info);
-}
-
-static void
-e_summary_url_clicked (GtkHTML *html,
- const char *url,
- ESummary *summary)
-{
- char *protocol, *protocol_end;
- ProtocolListener *protocol_listener;
-
- protocol_end = strchr (url, ':');
- if (protocol_end == NULL) {
- /* No url, let gnome work it out */
- gnome_url_show (url);
- return;
- }
-
- protocol = g_strndup (url, protocol_end - url);
-
- protocol_listener = g_hash_table_lookup (summary->priv->protocol_hash,
- protocol);
- g_free (protocol);
-
- if (protocol_listener == NULL) {
- /* Again, let gnome work it out */
- gnome_url_show (url);
- return;
- }
-
- protocol_listener->listener (summary, url, protocol_listener->closure);
-}
-
-static void
-e_summary_url_requested (GtkHTML *html,
- const char *url,
- GtkHTMLStream *stream,
- ESummary *summary)
-{
- char *filename;
- GnomeVFSAsyncHandle *handle;
- DownloadInfo *info;
- struct _imgcache *img = NULL;
-
- if (strncasecmp (url, "file:", 5) == 0) {
- url += 5;
- filename = e_pixmap_file (url);
- } else if (strchr (url, ':') >= strchr (url, '/')) {
- filename = e_pixmap_file (url);
- } else {
- filename = g_strdup (url);
- }
-
- if (filename == NULL) {
- gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR);
- return;
- }
-
- if (images_cache != NULL) {
- img = g_hash_table_lookup (images_cache, filename);
- }
-
- if (img == NULL) {
- info = g_new (DownloadInfo, 1);
- info->stream = stream;
- info->uri = filename;
-
- gnome_vfs_async_open (&handle, filename, GNOME_VFS_OPEN_READ,
- (GnomeVFSAsyncOpenCallback) open_callback, info);
- } else {
- gtk_html_stream_write (stream, img->buffer, img->bufsize);
- gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
- }
-}
-
-static void
-e_summary_evolution_protocol_listener (ESummary *summary,
- const char *uri,
- void *closure)
-{
- e_summary_change_current_view (summary, uri);
-}
-
-static void
-e_summary_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = destroy;
-
- e_summary_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static void
-alarm_fn (gpointer alarm_id,
- time_t trigger,
- gpointer data)
-{
- ESummary *summary;
- time_t t, day_end;
-
- summary = data;
- t = time (NULL);
- day_end = time_day_end (t);
- summary->priv->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
-
- e_summary_reconfigure (summary);
-}
-
-#define DEFAULT_HTML "<html><head><title>Summary</title></head><body bgcolor=\"#ffffff\">hello</body></html>"
-
-static void
-e_summary_init (ESummary *summary)
-{
- Bonobo_ConfigDatabase db;
- CORBA_Environment ev;
- ESummaryPrivate *priv;
- GdkColor bgcolor = {0, 0xffff, 0xffff, 0xffff};
- time_t t, day_end;
-
- summary->priv = g_new (ESummaryPrivate, 1);
-
- priv = summary->priv;
-
- priv->frozen = FALSE;
- priv->redraw_pending = FALSE;
-
- priv->html_scroller = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- priv->html = gtk_html_new ();
- gtk_html_set_editable (GTK_HTML (priv->html), FALSE);
- gtk_html_set_default_content_type (GTK_HTML (priv->html),
- "text/html; charset=utf-8");
- gtk_html_set_default_background_color (GTK_HTML (priv->html), &bgcolor);
- gtk_html_load_from_string (GTK_HTML (priv->html), DEFAULT_HTML,
- strlen (DEFAULT_HTML));
-
- gtk_signal_connect (GTK_OBJECT (priv->html), "url-requested",
- GTK_SIGNAL_FUNC (e_summary_url_requested), summary);
- gtk_signal_connect (GTK_OBJECT (priv->html), "link-clicked",
- GTK_SIGNAL_FUNC (e_summary_url_clicked), summary);
-#if 0
- gtk_signal_connect (GTK_OBJECT (priv->html), "on-url",
- GTK_SIGNAL_FUNC (e_summary_on_url), summary);
-#endif
-
- gtk_container_add (GTK_CONTAINER (priv->html_scroller), priv->html);
- gtk_widget_show_all (priv->html_scroller);
- gtk_box_pack_start (GTK_BOX (summary), priv->html_scroller,
- TRUE, TRUE, 0);
-
- priv->protocol_hash = NULL;
- priv->connections = NULL;
-
- summary->prefs_window = NULL;
- e_summary_preferences_init (summary);
-
- CORBA_exception_init (&ev);
- db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", &ev);
- if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
- CORBA_exception_free (&ev);
- g_warning ("Error getting Wombat. Using defaults");
- return;
- }
-
- summary->timezone = bonobo_config_get_string (db, "/Calendar/Display/Timezone", NULL);
- summary->tz = icaltimezone_get_builtin_timezone (summary->timezone);
-
- bonobo_object_release_unref (db, NULL);
- CORBA_exception_free (&ev);
-
- t = time (NULL);
- if (summary->tz == NULL) {
- day_end = time_day_end (t);
- } else {
- day_end = time_day_end_with_zone (t, summary->tz);
- }
-
- priv->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
-}
-
-E_MAKE_TYPE (e_summary, "ESummary", ESummary, e_summary_class_init,
- e_summary_init, PARENT_TYPE);
-
-GtkWidget *
-e_summary_new (const GNOME_Evolution_Shell shell)
-{
- ESummary *summary;
-
- summary = gtk_type_new (e_summary_get_type ());
- summary->priv->shell = shell;
-
- e_summary_add_protocol_listener (summary, "evolution", e_summary_evolution_protocol_listener, summary);
-
- e_summary_mail_init (summary, shell);
- e_summary_calendar_init (summary);
- e_summary_tasks_init (summary);
- e_summary_rdf_init (summary);
- e_summary_weather_init (summary);
-
- e_summary_draw (summary);
-
- return GTK_WIDGET (summary);
-}
-
-static void
-do_summary_print (ESummary *summary,
- gboolean preview)
-{
- GnomePrintContext *print_context;
- GnomePrintMaster *print_master;
- GnomePrintDialog *gpd;
- GnomePrinter *printer = NULL;
- int copies = 1;
- int collate = FALSE;
-
- if (!preview) {
- gpd = GNOME_PRINT_DIALOG (gnome_print_dialog_new (_("Print Summary"), GNOME_PRINT_DIALOG_COPIES));
- gnome_dialog_set_default (GNOME_DIALOG (gpd), GNOME_PRINT_PRINT);
-
- 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;
- }
-
- gnome_print_dialog_get_copies (gpd, &copies, &collate);
- printer = gnome_print_dialog_get_printer (gpd);
- gnome_dialog_close (GNOME_DIALOG (gpd));
- }
-
- print_master = gnome_print_master_new ();
-
- if (printer) {
- gnome_print_master_set_printer (print_master, printer);
- }
- gnome_print_master_set_copies (print_master, copies, collate);
- print_context = gnome_print_master_get_context (print_master);
- gtk_html_print (GTK_HTML (summary->priv->html), print_context);
- gnome_print_master_close (print_master);
-
- if (preview) {
- gboolean landscape = FALSE;
- GnomePrintMasterPreview *preview;
-
- preview = gnome_print_master_preview_new_with_orientation (
- print_master, _("Print Preview"), landscape);
- gtk_widget_show (GTK_WIDGET (preview));
- } else {
- int result = gnome_print_master_print (print_master);
-
- if (result == -1) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Printing of Summary failed"));
- }
- }
-
- gtk_object_unref (GTK_OBJECT (print_master));
-}
-
-void
-e_summary_print (BonoboUIComponent *component,
- gpointer userdata,
- const char *cname)
-{
- ESummary *summary = userdata;
-
- do_summary_print (summary, FALSE);
-}
-
-void
-e_summary_add_protocol_listener (ESummary *summary,
- const char *protocol,
- ESummaryProtocolListener listener,
- void *closure)
-{
- ProtocolListener *old;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
- g_return_if_fail (protocol != NULL);
- g_return_if_fail (listener != NULL);
-
- if (summary->priv->protocol_hash == NULL) {
- summary->priv->protocol_hash = g_hash_table_new (g_str_hash,
- g_str_equal);
- old = NULL;
- } else {
- old = g_hash_table_lookup (summary->priv->protocol_hash, protocol);
- }
-
- if (old != NULL) {
- return;
- }
-
- old = g_new (ProtocolListener, 1);
- old->listener = listener;
- old->closure = closure;
-
- g_hash_table_insert (summary->priv->protocol_hash, g_strdup (protocol), old);
-}
-
-void
-e_summary_change_current_view (ESummary *summary,
- const char *uri)
-{
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- svi = summary->shell_view_interface;
- if (svi == NULL) {
- return;
- }
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_changeCurrentView (svi, uri, &ev);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_set_message (ESummary *summary,
- const char *message,
- gboolean busy)
-{
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- svi = summary->shell_view_interface;
- if (svi == NULL) {
- return;
- }
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_setMessage (svi, message ? message : "", busy, &ev);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_unset_message (ESummary *summary)
-{
- GNOME_Evolution_ShellView svi;
- CORBA_Environment ev;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- svi = summary->shell_view_interface;
- if (svi == NULL) {
- return;
- }
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_ShellView_unsetMessage (svi, &ev);
- CORBA_exception_free (&ev);
-}
-
-void
-e_summary_reconfigure (ESummary *summary)
-{
- if (summary->mail != NULL) {
- e_summary_mail_reconfigure (summary);
- }
-
- if (summary->rdf != NULL) {
- e_summary_rdf_reconfigure (summary);
- }
-
- if (summary->weather != NULL) {
- e_summary_weather_reconfigure (summary);
- }
-
- if (summary->calendar != NULL) {
- e_summary_calendar_reconfigure (summary);
- }
-
- if (summary->tasks != NULL) {
- e_summary_tasks_reconfigure (summary);
- }
-}
-
-void
-e_summary_reload (BonoboUIComponent *component,
- gpointer userdata,
- const char *cname)
-{
- ESummary *summary = userdata;
-
- e_summary_reconfigure (summary);
-}
-
-int
-e_summary_count_connections (ESummary *summary)
-{
- GList *p;
- int count = 0;
-
- if (summary == NULL) {
- return 0;
- }
-
- for (p = summary->priv->connections; p; p = p->next) {
- ESummaryConnection *c;
-
- c = p->data;
- count += c->count (summary, c->closure);
- }
-
- return count;
-}
-
-GList *
-e_summary_add_connections (ESummary *summary)
-{
- GList *p;
- GList *connections = NULL;
-
- if (summary == NULL) {
- return NULL;
- }
-
- for (p = summary->priv->connections; p; p = p->next) {
- ESummaryConnection *c;
- GList *r;
-
- c = p->data;
- r = c->add (summary, c->closure);
-
- connections = g_list_concat (connections, r);
- }
-
- return connections;
-}
-
-void
-e_summary_set_online (ESummary *summary,
- GNOME_Evolution_OfflineProgressListener progress,
- gboolean online,
- ESummaryOnlineCallback callback,
- void *closure)
-{
- GList *p;
-
- if (summary == NULL) {
- return;
- }
-
- for (p = summary->priv->connections; p; p = p->next) {
- ESummaryConnection *c;
-
- c = p->data;
- c->callback = callback;
- c->callback_closure = closure;
-
- c->set_online (summary, progress, online, c->closure);
- }
-}
-
-void
-e_summary_add_online_connection (ESummary *summary,
- ESummaryConnection *connection)
-{
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
- g_return_if_fail (connection != NULL);
-
- summary->priv->connections = g_list_prepend (summary->priv->connections,
- connection);
-}
-
-void
-e_summary_remove_online_connection (ESummary *summary,
- ESummaryConnection *connection)
-{
- GList *p;
-
- g_return_if_fail (summary != NULL);
- g_return_if_fail (IS_E_SUMMARY (summary));
- g_return_if_fail (connection != NULL);
-
- p = g_list_find (summary->priv->connections, connection);
- g_return_if_fail (p != NULL);
-
- summary->priv->connections = g_list_remove_link (summary->priv->connections, p);
- g_list_free (p);
-}
-
-void
-e_summary_freeze (ESummary *summary)
-{
- g_return_if_fail (IS_E_SUMMARY (summary));
-
- if (summary->priv->frozen == TRUE) {
- return;
- }
-
- summary->priv->frozen = TRUE;
-}
-
-void
-e_summary_thaw (ESummary *summary)
-{
- g_return_if_fail (IS_E_SUMMARY (summary));
- if (summary->priv->frozen == FALSE) {
- return;
- }
-
- summary->priv->frozen = FALSE;
- if (summary->priv->redraw_pending) {
- e_summary_draw (summary);
- }
-}
diff --git a/my-evolution/e-summary.h b/my-evolution/e-summary.h
deleted file mode 100644
index 5378572400..0000000000
--- a/my-evolution/e-summary.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary.h
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifndef _E_SUMMARY_H__
-#define _E_SUMMARY_H__
-
-#include <gtk/gtkvbox.h>
-#include <bonobo/bonobo-ui-component.h>
-#include "e-summary-type.h"
-#include "e-summary-mail.h"
-#include "e-summary-calendar.h"
-#include "e-summary-rdf.h"
-#include "e-summary-weather.h"
-#include "e-summary-tasks.h"
-
-#include <ical.h>
-
-#include <Evolution.h>
-
-#define E_SUMMARY_TYPE (e_summary_get_type ())
-#define E_SUMMARY(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE, ESummary))
-#define E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE, ESummaryClass))
-#define IS_E_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TYPE))
-#define IS_E_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SUMMARY_TYPE))
-
-typedef struct _ESummaryPrivate ESummaryPrivate;
-typedef struct _ESummaryClass ESummaryClass;
-typedef struct _ESummaryPrefs ESummaryPrefs;
-typedef struct _ESummaryConnection ESummaryConnection;
-typedef struct _ESummaryConnectionData ESummaryConnectionData;
-
-typedef void (* ESummaryProtocolListener) (ESummary *summary,
- const char *uri,
- void *closure);
-typedef int (* ESummaryConnectionCount) (ESummary *summary,
- void *closure);
-typedef GList *(* ESummaryConnectionAdd) (ESummary *summary,
- void *closure);
-typedef void (* ESummaryConnectionSetOnline) (ESummary *summary,
- GNOME_Evolution_OfflineProgressListener progress,
- gboolean online,
- void *closure);
-typedef void (*ESummaryOnlineCallback) (ESummary *summary,
- void *closure);
-
-struct _ESummaryConnection {
- ESummaryConnectionCount count;
- ESummaryConnectionAdd add;
- ESummaryConnectionSetOnline set_online;
- ESummaryOnlineCallback callback;
-
- void *closure;
- void *callback_closure;
-};
-
-struct _ESummaryConnectionData {
- char *hostname;
- char *type;
-};
-
-struct _ESummaryPrefs {
-
- /* Mail */
- GList *display_folders;
- gboolean show_full_path;
-
- /* RDF */
- GList *rdf_urls;
- int rdf_refresh_time;
- int limit;
-
- /* Weather */
- GList *stations;
- ESummaryWeatherUnits units;
- int weather_refresh_time;
-
- /* Schedule */
- ESummaryCalendarDays days;
- ESummaryCalendarNumTasks show_tasks;
-};
-
-struct _ESummary {
- GtkVBox parent;
-
- ESummaryPrefs *preferences;
- ESummaryPrefs *old_prefs;
-
- ESummaryMail *mail;
- ESummaryCalendar *calendar;
- ESummaryRDF *rdf;
- ESummaryWeather *weather;
- ESummaryTasks *tasks;
-
- ESummaryPrivate *priv;
-
- GNOME_Evolution_ShellView shell_view_interface;
-
- GtkWidget *prefs_window;
- gboolean online;
-
- char *timezone;
- icaltimezone *tz;
-};
-
-struct _ESummaryClass {
- GtkVBoxClass parent_class;
-};
-
-
-GtkType e_summary_get_type (void);
-GtkWidget *e_summary_new (const GNOME_Evolution_Shell shell);
-
-void e_summary_print (BonoboUIComponent *component,
- gpointer user_data,
- const char *cname);
-void e_summary_reload (BonoboUIComponent *component,
- gpointer user_data,
- const char *cname);
-void e_summary_draw (ESummary *summary);
-void e_summary_change_current_view (ESummary *summary,
- const char *uri);
-
-void e_summary_set_message (ESummary *summary,
- const char *message,
- gboolean busy);
-void e_summary_unset_message (ESummary *summary);
-
-void e_summary_add_protocol_listener (ESummary *summary,
- const char *protocol,
- ESummaryProtocolListener listener,
- void *closure);
-
-void e_summary_reconfigure (ESummary *summary);
-
-int e_summary_count_connections (ESummary *summary);
-GList *e_summary_add_connections (ESummary *summary);
-void e_summary_set_online (ESummary *summary,
- GNOME_Evolution_OfflineProgressListener listener,
- gboolean online,
- ESummaryOnlineCallback callback,
- void *closure);
-void e_summary_add_online_connection (ESummary *summary,
- ESummaryConnection *connection);
-void e_summary_remove_online_connection (ESummary *summary,
- ESummaryConnection *connection);
-
-void e_summary_freeze (ESummary *summary);
-void e_summary_thaw (ESummary *summary);
-#endif
diff --git a/my-evolution/main.c b/my-evolution/main.c
deleted file mode 100644
index a7720f8c8d..0000000000
--- a/my-evolution/main.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* main.c
- *
- * 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.
- *
- * Author: Iain Holmes
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <glib.h>
-#include <gdk/gdk.h>
-#include <gdk/gdkrgb.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>
-
-#ifdef GTKHTML_HAVE_GCONF
-#include <gconf/gconf.h>
-#endif
-
-#include <libgnomevfs/gnome-vfs.h>
-#include <glade/glade.h>
-
-#include "component-factory.h"
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- gnome_init_with_popt_table ("Evolution Executive Summary", VERSION,
- argc, argv, oaf_popt_options, 0, NULL);
- orb = oaf_init (argc, argv);
-
- gdk_rgb_init ();
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
- g_error (_("Executive summary component could not initialize Bonobo.\n"));
- exit (1);
- }
-
-#ifdef GTKHTML_HAVE_GCONF
- gconf_init (argc, argv, NULL);
-#endif
-
- glade_gnome_init ();
- gnome_vfs_init ();
-
- /* Start our component */
- component_factory_init ();
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/my-evolution/metar.c b/my-evolution/metar.c
deleted file mode 100644
index 80f1ff0ab9..0000000000
--- a/my-evolution/metar.c
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- * metar.c: Metar decoding routines.
- *
- * Originally written by Papadimitriou Spiros <spapadim+@cs.cmu.ed>
- */
-
-#include <config.h>
-#include <glib.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <regex.h>
-#include <math.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "e-summary.h"
-#include "weather.h"
-
-#include "metar.h"
-
-static regex_t metar_re[RE_NUM];
-
-/* Unit conversions and names */
-
-#define TEMP_F_TO_C(f) (((f) - 32.0) * 0.555556)
-#define TEMP_C_TO_F(c) (((c) * 1.8) + 32.0)
-#define TEMP_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("\260F") : _("\260C"))
-
-#define WINDSPEED_KNOTS_TO_KPH(knots) ((knots) * 1.851965)
-#define WINDSPEED_KPH_TO_KNOTS(kph) ((kph) * 0.539967)
-#define WINDSPEED_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("knots") : _("kph"))
-
-#define PRESSURE_INCH_TO_MM(inch) ((inch) * 25.4)
-#define PRESSURE_MM_TO_INCH(mm) ((mm) * 0.03937)
-#define PRESSURE_MBAR_TO_INCH(mbar) ((mbar) * 0.02963742)
-#define PRESSURE_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("inHg") : _("mmHg"))
-#define VISIBILITY_SM_TO_KM(sm) ((sm) * 1.609344)
-#define VISIBILITY_KM_TO_SM(km) ((km) * 0.621371)
-#define VISIBILITY_UNIT_STR(units) (((units) == UNITS_IMPERIAL) ? _("miles") : _("kilometers"))
-
-static const char *sky_str[] = {
- N_("Clear sky"),
- N_("Broken clouds"),
- N_("Scattered clouds"),
- N_("Few clouds"),
- N_("Overcast")
-};
-
-const char *
-weather_sky_string (Weather *w)
-{
- if (w->sky < 0 ||
- w->sky >= (sizeof (sky_str) / sizeof (char *))) {
- return _("Invalid");
- }
-
- return _(sky_str[(int)w->sky]);
-}
-
-static const char *wind_direction_str[] = {
- N_("Variable"),
- N_("North"), N_("North - NorthEast"), N_("Northeast"), N_("East - NorthEast"),
- N_("East"), N_("East - Southeast"), N_("Southeast"), N_("South - Southeast"),
- N_("South"), N_("South - Southwest"), N_("Southwest"), N_("West - Southwest"),
- N_("West"), N_("West - Northwest"), N_("Northwest"), N_("North - Northwest")};
-
-const char *
-weather_wind_direction_string (Weather *w)
-{
- if (w->wind < 0 ||
- w->wind >= (sizeof (wind_direction_str) / sizeof (char *))) {
- return _("Invalid");
- }
-
- return _(wind_direction_str[(int)w->wind]);
-}
-
-/*
- * Even though tedious, I switched to a 2D array for weather condition
- * strings, in order to facilitate internationalization, esp. for languages
- * with genders.
- *
- * I tried to come up with logical names for most phenomena, but I'm no
- * meteorologist, so there will undoubtedly be some stupid mistakes.
- * However, combinations that did not seem plausible (eg. I cannot imagine
- * what a "light tornado" may be like ;-) were filled in with "??". If this
- * ever comes up in the weather conditions field, let me know...
- */
-
-/*
- * Note, magic numbers, when you change the size here, make sure to change
- * the below function so that new values are recognized
- */
-static const gchar *conditions_str[24][13] = {
-/* NONE VICINITY LIGHT MODERATE HEAVY SHALLOW PATCHES PARTIAL THUNDERSTORM BLOWING SHOWERS DRIFTING FREEZING */
-/* *******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
-/* NONE */ {"", "", "", "", "", "", "", "", "", "", "", "", "", },
-/* DRIZZLE */ {N_("Drizzle"), N_("Drizzle in the vicinity"), N_("Light drizzle"), N_("Moderate drizzle"), N_("Heavy drizzle"), N_("Shallow drizzle"), N_("Patches of drizzle"), N_("Partial drizzle"), N_("Thunderstorm"), N_("Windy drizzle"), N_("Showers"), N_("Drifting drizzle"), N_("Freezing drizzle") },
-/* RAIN */ {N_("Rain"), N_("Rain in the vicinity") , N_("Light rain"), N_("Moderate rain"), N_("Heavy rain"), N_("Shallow rain"), N_("Patches of rain"), N_("Partial rainfall"), N_("Thunderstorm"), N_("Blowing rainfall"), N_("Rain showers"), N_("Drifting rain"), N_("Freezing rain") },
-/* SNOW */ {N_("Snow"), N_("Snow in the vicinity") , N_("Light snow"), N_("Moderate snow"), N_("Heavy snow"), N_("Shallow snow"), N_("Patches of snow"), N_("Partial snowfall"), N_("Snowstorm"), N_("Blowing snowfall"), N_("Snow showers"), N_("Drifting snow"), N_("Freezing snow") },
-/* SNOW_GRAINS */ {N_("Snow grains"), N_("Snow grains in the vicinity") , N_("Light snow grains"), N_("Moderate snow grains"), N_("Heavy snow grains"), N_("Shallow snow grains"), N_("Patches of snow grains"), N_("Partial snow grains"), N_("Snowstorm"), N_("Blowing snow grains"), N_("Snow grain showers"), N_("Drifting snow grains"), N_("Freezing snow grains") },
-/* ICE_CRYSTALS */ {N_("Ice crystals"), N_("Ice crystals in the vicinity") , N_("Few ice crystals"), N_("Moderate ice crystals"), N_("Heavy ice crystals"), "??", N_("Patches of ice crystals"), N_("Partial ice crystals"), N_("Ice crystal storm"), N_("Blowing ice crystals"), N_("Showers of ice crystals"), N_("Drifting ice crystals"), N_("Freezing ice crystals") },
-/* ICE_PELLETS */ {N_("Ice pellets"), N_("Ice pellets in the vicinity") , N_("Few ice pellets"), N_("Moderate ice pellets"), N_("Heavy ice pellets"), N_("Shallow ice pellets"), N_("Patches of ice pellets"), N_("Partial ice pellets"), N_("Ice pellet storm"), N_("Blowing ice pellets"), N_("Showers of ice pellets"), N_("Drifting ice pellets"), N_("Freezing ice pellets") },
-/* HAIL */ {N_("Hail"), N_("Hail in the vicinity") , N_("Light hail"), N_("Moderate hail"), N_("Heavy hail"), N_("Shallow hail"), N_("Patches of hail"), N_("Partial hail"), N_("Hailstorm"), N_("Blowing hail"), N_("Hail showers"), N_("Drifting hail"), N_("Freezing hail") },
-/* SMALL_HAIL */ {N_("Small hail"), N_("Small hail in the vicinity") , N_("Light hail"), N_("Moderate small hail"), N_("Heavy small hail"), N_("Shallow small hail"), N_("Patches of small hail"), N_("Partial small hail"), N_("Small hailstorm"), N_("Blowing small hail"), N_("Showers of small hail"), N_("Drifting small hail"), N_("Freezing small hail") },
-/* PRECIPITATION */ {N_("Unknown precipitation"), N_("Precipitation in the vicinity"), N_("Light precipitation"), N_("Moderate precipitation"), N_("Heavy precipitation"), N_("Shallow precipitation"), N_("Patches of precipitation"), N_("Partial precipitation"), N_("Unknown thunderstorm"), N_("Blowing precipitation"), N_("Showers, type unknown"), N_("Drifting precipitation"), N_("Freezing precipitation") },
-/* MIST */ {N_("Mist"), N_("Mist in the vicinity") , N_("Light mist"), N_("Moderate mist"), N_("Thick mist"), N_("Shallow mist"), N_("Patches of mist"), N_("Partial mist"), "??", N_("Mist with wind"), "??", N_("Drifting mist"), N_("Freezing mist") },
-/* FOG */ {N_("Fog"), N_("Fog in the vicinity") , N_("Light fog"), N_("Moderate fog"), N_("Thick fog"), N_("Shallow fog"), N_("Patches of fog"), N_("Partial fog"), "??", N_("Fog with wind"), "??", N_("Drifting fog"), N_("Freezing fog") },
-/* SMOKE */ {N_("Smoke"), N_("Smoke in the vicinity") , N_("Thin smoke"), N_("Moderate smoke"), N_("Thick smoke"), N_("Shallow smoke"), N_("Patches of smoke"), N_("Partial smoke"), N_("Smoke w/ thunders"), N_("Smoke with wind"), "??", N_("Drifting smoke"), "??" },
-/* VOLCANIC_ASH */ {N_("Volcanic ash"), N_("Volcanic ash in the vicinity") , "??", N_("Moderate volcanic ash"), N_("Thick volcanic ash"), N_("Shallow volcanic ash"), N_("Patches of volcanic ash"), N_("Partial volcanic ash"), N_("Volcanic ash w/ thunders"), N_("Blowing volcanic ash"), N_("Showers of volcanic ash "), N_("Drifting volcanic ash"), N_("Freezing volcanic ash") },
-/* SAND */ {N_("Sand"), N_("Sand in the vicinity") , N_("Light sand"), N_("Moderate sand"), N_("Heavy sand"), "??", N_("Patches of sand"), N_("Partial sand"), "??", N_("Blowing sand"), "", N_("Drifting sand"), "??" },
-/* HAZE */ {N_("Haze"), N_("Haze in the vicinity") , N_("Light haze"), N_("Moderate haze"), N_("Thick haze"), N_("Shallow haze"), N_("Patches of haze"), N_("Partial haze"), "??", N_("Haze with wind"), "??", N_("Drifting haze"), N_("Freezing haze") },
-/* SPRAY */ {N_("Sprays"), N_("Sprays in the vicinity") , N_("Light sprays"), N_("Moderate sprays"), N_("Heavy sprays"), N_("Shallow sprays"), N_("Patches of sprays"), N_("Partial sprays"), "??", N_("Blowing sprays"), "??", N_("Drifting sprays"), N_("Freezing sprays") },
-/* DUST */ {N_("Dust"), N_("Dust in the vicinity") , N_("Light dust"), N_("Moderate dust"), N_("Heavy dust"), "??", N_("Patches of dust"), N_("Partial dust"), "??", N_("Blowing dust"), "??", N_("Drifting dust"), "??" },
-/* SQUALL */ {N_("Squall"), N_("Squall in the vicinity") , N_("Light squall"), N_("Moderate squall"), N_("Heavy squall"), "??", "??", N_("Partial squall"), N_("Thunderous squall"), N_("Blowing squall"), "??", N_("Drifting squall"), N_("Freezing squall") },
-/* SANDSTORM */ {N_("Sandstorm"), N_("Sandstorm in the vicinity") , N_("Light standstorm"), N_("Moderate sandstorm"), N_("Heavy sandstorm"), N_("Shallow sandstorm"), "??", N_("Partial sandstorm"), N_("Thunderous sandstorm"), N_("Blowing sandstorm"), "??", N_("Drifting sandstorm"), N_("Freezing sandstorm") },
-/* DUSTSTORM */ {N_("Duststorm"), N_("Duststorm in the vicinity") , N_("Light duststorm"), N_("Moderate duststorm"), N_("Heavy duststorm"), N_("Shallow duststorm"), "??", N_("Partial duststorm"), N_("Thunderous duststorm"), N_("Blowing duststorm"), "??", N_("Drifting duststorm"), N_("Freezing duststorm") },
-/* FUNNEL_CLOUD */ {N_("Funnel cloud"), N_("Funnel cloud in the vicinity") , N_("Light funnel cloud"), N_("Moderate funnel cloud"), N_("Thick funnel cloud"), N_("Shallow funnel cloud"), N_("Patches of funnel clouds"), N_("Partial funnel clouds"), "??", N_("Funnel cloud w/ wind"), "??", N_("Drifting funnel cloud"), "??" },
-/* TORNADO */ {N_("Tornado"), N_("Tornado in the vicinity") , "??", N_("Moderate tornado"), N_("Raging tornado"), "??", "??", N_("Partial tornado"), N_("Thunderous tornado"), N_("Tornado"), "??", N_("Drifting tornado"), N_("Freezing tornado") },
-/* DUST_WHIRLS */ {N_("Dust whirls"), N_("Dust whirls in the vicinity") , N_("Light dust whirls"), N_("Moderate dust whirls"), N_("Heavy dust whirls"), N_("Shallow dust whirls"), N_("Patches of dust whirls"), N_("Partial dust whirls"), "??", N_("Blowing dust whirls"), "??", N_("Drifting dust whirls"), "??" }
-};
-
-const char *
-weather_conditions_string (Weather *w)
-{
- if (!w->cond.significant) {
- return " ";
- } else {
- if (w->cond.phenomenon >= 0 &&
- w->cond.phenomenon < 24 &&
- w->cond.qualifier >= 0 &&
- w->cond.qualifier < 13) {
- return _(conditions_str[(int)w->cond.phenomenon][(int)w->cond.qualifier]);
- } else {
- return _("Invalid");
- }
- }
-}
-
-char *
-weather_temp_string (Weather *w)
-{
- char *temp;
- ESummaryWeatherUnits units;
-
- if (w->summary->preferences == NULL) {
- units = UNITS_METRIC;
- } else {
- units = w->summary->preferences->units;
- }
-
- temp = g_strdup_printf ("%.1f%s", w->temp, TEMP_UNIT_STR (units));
- return temp;
-}
-
-void
-metar_init_re (void)
-{
- static gboolean initialized = FALSE;
- if (initialized)
- return;
- initialized = TRUE;
-
- regcomp(&metar_re[TIME_RE], TIME_RE_STR, REG_EXTENDED);
- regcomp(&metar_re[WIND_RE], WIND_RE_STR, REG_EXTENDED);
- regcomp(&metar_re[VIS_RE], VIS_RE_STR, REG_EXTENDED);
- regcomp(&metar_re[CLOUD_RE], CLOUD_RE_STR, REG_EXTENDED);
- regcomp(&metar_re[TEMP_RE], TEMP_RE_STR, REG_EXTENDED);
- regcomp(&metar_re[PRES_RE], PRES_RE_STR, REG_EXTENDED);
- regcomp(&metar_re[COND_RE], COND_RE_STR, REG_EXTENDED);
-}
-
-static inline gint
-days_in_month (gint month,
- gint year)
-{
- if (month == 1)
- return ((year % 4) == 0) ? 29 : 28;
- else if (((month <= 6) && (month % 2 == 0)) || ((month >=7) && (month % 2 != 0)))
- return 31;
- else
- return 30;
-}
-
-/* FIX - there *must* be a simpler, less stupid way to do this!... */
-static time_t
-make_time (gint date,
- gint hour,
- gint min)
-{
- struct tm *tm;
- struct tm tms;
- time_t now;
- gint loc_mday, loc_hour, gm_mday, gm_hour;
- gint hour_diff; /* local time = UTC - hour_diff */
- gint is_dst;
-
- now = time(NULL);
-
- tm = gmtime(&now);
- gm_mday = tm->tm_mday;
- gm_hour = tm->tm_hour;
- memcpy(&tms, tm, sizeof(struct tm));
-
- tm = localtime(&now);
- loc_mday = tm->tm_mday;
- loc_hour = tm->tm_hour;
- is_dst = tm->tm_isdst;
-
- /* Estimate timezone */
- if (gm_mday == loc_mday)
- hour_diff = gm_hour - loc_hour;
- else
- if ((gm_mday == loc_mday + 1) || ((gm_mday == 1) && (loc_mday >= 27)))
- hour_diff = gm_hour + (24 - loc_hour);
- else
- hour_diff = -((24 - gm_hour) + loc_hour);
-
- /* Make time */
- tms.tm_min = min;
- tms.tm_sec = 0;
- tms.tm_hour = hour - hour_diff;
- tms.tm_mday = date;
- tms.tm_isdst = is_dst;
- if (tms.tm_hour < 0) {
- tms.tm_hour += 24;
- --tms.tm_mday;
- if (tms.tm_mday < 1) {
- --tms.tm_mon;
- if (tms.tm_mon < 0) {
- tms.tm_mon = 11;
- --tms.tm_year;
- }
- tms.tm_mday = days_in_month(tms.tm_mon, tms.tm_year + 1900);
- }
- } else if (tms.tm_hour > 23) {
- tms.tm_hour -= 24;
- ++tms.tm_mday;
- if (tms.tm_mday > days_in_month(tms.tm_mon, tms.tm_year + 1900)) {
- ++tms.tm_mon;
- if (tms.tm_mon > 11) {
- tms.tm_mon = 0;
- ++tms.tm_year;
- }
- tms.tm_mday = 1;
- }
- }
-
- return mktime(&tms);
-}
-
-gboolean
-metar_tok_time (char *token,
- Weather *w)
-{
- char sday[3], shr[3], smin[3];
- int day, hour, min;
-
- if (regexec (&metar_re[TIME_RE], token, 0, NULL, 0) == REG_NOMATCH) {
- return FALSE;
- }
-
- strncpy(sday, token, 2);
- sday[2] = 0;
- day = atoi (sday);
-
- strncpy (shr, token + 2, 2);
- shr[2] = 0;
- hour = atoi (shr);
-
- strncpy (smin, token + 4, 2);
- smin[2] = 0;
- min = atoi (smin);
-
- w->update = make_time (day, hour, min);
-
- return TRUE;
-}
-
-#define CONST_DIGITS "0123456789"
-
-gboolean
-metar_tok_wind (gchar *tokp,
- Weather *w)
-{
- char sdir[4], sspd[4], sgust[4];
- int dir, spd, gust = -1;
- char *gustp;
-
- if (regexec(&metar_re[WIND_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
- return FALSE;
-
- strncpy(sdir, tokp, 3);
- sdir[3] = 0;
- dir = (!strcmp(sdir, "VRB")) ? -1 : atoi(sdir);
-
- memset(sspd, 0, sizeof(sspd));
- strncpy(sspd, tokp+3, strspn(tokp+3, CONST_DIGITS));
- spd = atoi(sspd);
-
- gustp = strchr(tokp, 'G');
- if (gustp) {
- memset(sgust, 0, sizeof(sgust));
- strncpy(sgust, gustp+1, strspn(gustp+1, CONST_DIGITS));
- gust = atoi(sgust);
- }
-
- if ((349 <= dir) && (dir <= 11))
- w->wind = WIND_N;
- else if ((12 <= dir) && (dir <= 33))
- w->wind = WIND_NNE;
- else if ((34 <= dir) && (dir <= 56))
- w->wind = WIND_NE;
- else if ((57 <= dir) && (dir <= 78))
- w->wind = WIND_ENE;
- else if ((79 <= dir) && (dir <= 101))
- w->wind = WIND_E;
- else if ((102 <= dir) && (dir <= 123))
- w->wind = WIND_ESE;
- else if ((124 <= dir) && (dir <= 146))
- w->wind = WIND_SE;
- else if ((147 <= dir) && (dir <= 168))
- w->wind = WIND_SSE;
- else if ((169 <= dir) && (dir <= 191))
- w->wind = WIND_S;
- else if ((192 <= dir) && (dir <= 213))
- w->wind = WIND_SSW;
- else if ((214 <= dir) && (dir <= 236))
- w->wind = WIND_SW;
- else if ((247 <= dir) && (dir <= 258))
- w->wind = WIND_WSW;
- else if ((259 <= dir) && (dir <= 281))
- w->wind = WIND_W;
- else if ((282 <= dir) && (dir <= 303))
- w->wind = WIND_WNW;
- else if ((304 <= dir) && (dir <= 326))
- w->wind = WIND_NW;
- else if ((327 <= dir) && (dir <= 348))
- w->wind = WIND_NNW;
-
- w->windspeed = (ESummaryWeatherWindSpeed)spd;
-
- return TRUE;
-}
-
-gboolean
-metar_tok_vis (gchar *tokp,
- Weather *w)
-{
- char *pfrac, *pend;
- char sval[4];
- int val;
-
- if (regexec(&metar_re[VIS_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
- return FALSE;
-
- pfrac = strchr(tokp, '/');
- pend = strstr(tokp, "SM");
- memset(sval, 0, sizeof(sval));
-
- if (pfrac) {
- strncpy(sval, pfrac + 1, pend - pfrac - 1);
- val = atoi(sval);
- w->visibility = (*tokp == 'M') ? 0.001 : (1.0 / ((ESummaryWeatherVisibility)val));
- } else {
- strncpy(sval, tokp, pend - tokp);
- val = atoi(sval);
- w->visibility = (ESummaryWeatherVisibility)val;
- }
-
- return TRUE;
-}
-
-gboolean
-metar_tok_cloud (gchar *tokp,
- Weather *w)
-{
- char stype[4], salt[4];
- int alt = -1;
-
- if (regexec(&metar_re[CLOUD_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
- return FALSE;
-
- strncpy(stype, tokp, 3);
- stype[3] = 0;
- if (strlen(tokp) == 6) {
- strncpy(salt, tokp+3, 3);
- salt[3] = 0;
- alt = atoi(salt); /* Altitude - currently unused */
- }
-
- if (!strcmp(stype, "CLR")) {
- w->sky = SKY_CLEAR;
- } else if (!strcmp(stype, "BKN")) {
- w->sky = SKY_BROKEN;
- } else if (!strcmp(stype, "SCT")) {
- w->sky = SKY_SCATTERED;
- } else if (!strcmp(stype, "FEW")) {
- w->sky = SKY_FEW;
- } else if (!strcmp(stype, "OVC")) {
- w->sky = SKY_OVERCAST;
- }
-
- return TRUE;
-}
-
-gboolean
-metar_tok_pres (gchar *tokp,
- Weather *w)
-{
- if (regexec(&metar_re[PRES_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
- return FALSE;
-
- if (*tokp == 'A') {
- char sintg[3], sfract[3];
- int intg, fract;
-
- strncpy(sintg, tokp+1, 2);
- sintg[2] = 0;
- intg = atoi(sintg);
-
- strncpy(sfract, tokp+3, 2);
- sfract[2] = 0;
- fract = atoi(sfract);
-
- w->pressure = (ESummaryWeatherPressure)intg + (((ESummaryWeatherPressure)fract)/100.0);
- } else { /* *tokp == 'Q' */
- gchar spres[5];
- gint pres;
-
- strncpy(spres, tokp+1, 4);
- spres[4] = 0;
- pres = atoi(spres);
-
- w->pressure = PRESSURE_MBAR_TO_INCH((ESummaryWeatherPressure)pres);
- }
-
- return TRUE;
-}
-
-/* Relative humidity computation - thanks to <Olof.Oberg@modopaper.modogroup.com> */
-
-
-static inline gint
-calc_humidity(gdouble temp,
- gdouble dewp,
- ESummaryWeatherUnits units)
-{
- gdouble esat, esurf;
-
- if (units == UNITS_IMPERIAL) {
- temp = TEMP_F_TO_C(temp);
- dewp = TEMP_F_TO_C(dewp);
- }
-
- esat = 6.11 * pow(10.0, (7.5 * temp) / (237.7 + temp));
- esurf = 6.11 * pow(10.0, (7.5 * dewp) / (237.7 + dewp));
-
- return (gint)((esurf/esat) * 100.0);
-}
-
-gboolean
-metar_tok_temp (gchar *tokp,
- Weather *w)
-{
- ESummaryWeatherUnits units;
- gchar *ptemp, *pdew, *psep;
-
- if (regexec(&metar_re[TEMP_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
- return FALSE;
-
- if (w->summary->preferences == NULL) {
- units = UNITS_METRIC;
- } else {
- units = w->summary->preferences->units;
- }
-
- psep = strchr(tokp, '/');
- *psep = 0;
- ptemp = tokp;
- pdew = psep + 1;
-
- if (units == UNITS_IMPERIAL) {
- w->temp = (*ptemp == 'M') ? TEMP_C_TO_F(-atoi(ptemp+1)) :
- TEMP_C_TO_F(atoi(ptemp));
- w->dew = (*pdew == 'M') ? TEMP_C_TO_F(-atoi(pdew+1)) :
- TEMP_C_TO_F(atoi(pdew));
- } else {
- w->temp = (*ptemp == 'M') ? -atoi(ptemp+1) : atoi(ptemp);
- w->dew = (*pdew == 'M') ? -atoi(pdew+1) : atoi (pdew);
- }
-
- w->humidity = calc_humidity(w->temp, w->dew, units);
- return TRUE;
-}
-
-gboolean
-metar_tok_cond (gchar *tokp,
- Weather *w)
-{
- char squal[3], sphen[4];
- char *pphen;
-
- if (regexec(&metar_re[COND_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
- return FALSE;
-
- if ((strlen(tokp) > 3) && ((*tokp == '+') || (*tokp == '-')))
- ++tokp; /* FIX */
-
- if ((*tokp == '+') || (*tokp == '-'))
- pphen = tokp + 1;
- else if (strlen(tokp) < 4)
- pphen = tokp;
- else
- pphen = tokp + 2;
-
- memset(squal, 0, sizeof(squal));
- strncpy(squal, tokp, pphen - tokp);
- squal[pphen - tokp] = 0;
-
- memset(sphen, 0, sizeof(sphen));
- strncpy(sphen, pphen, sizeof(sphen));
- sphen[sizeof(sphen)-1] = '\0';
-
- /* Defaults */
- w->cond.qualifier = QUALIFIER_NONE;
- w->cond.phenomenon = PHENOMENON_NONE;
- w->cond.significant = FALSE;
-
- if (!strcmp(squal, "")) {
- w->cond.qualifier = QUALIFIER_MODERATE;
- } else if (!strcmp(squal, "-")) {
- w->cond.qualifier = QUALIFIER_LIGHT;
- } else if (!strcmp(squal, "+")) {
- w->cond.qualifier = QUALIFIER_HEAVY;
- } else if (!strcmp(squal, "VC")) {
- w->cond.qualifier = QUALIFIER_VICINITY;
- } else if (!strcmp(squal, "MI")) {
- w->cond.qualifier = QUALIFIER_SHALLOW;
- } else if (!strcmp(squal, "BC")) {
- w->cond.qualifier = QUALIFIER_PATCHES;
- } else if (!strcmp(squal, "PR")) {
- w->cond.qualifier = QUALIFIER_PARTIAL;
- } else if (!strcmp(squal, "TS")) {
- w->cond.qualifier = QUALIFIER_THUNDERSTORM;
- } else if (!strcmp(squal, "BL")) {
- w->cond.qualifier = QUALIFIER_BLOWING;
- } else if (!strcmp(squal, "SH")) {
- w->cond.qualifier = QUALIFIER_SHOWERS;
- } else if (!strcmp(squal, "DR")) {
- w->cond.qualifier = QUALIFIER_DRIFTING;
- } else if (!strcmp(squal, "FZ")) {
- w->cond.qualifier = QUALIFIER_FREEZING;
- } else {
- g_return_val_if_fail(FALSE, FALSE);
- }
-
- if (!strcmp(sphen, "DZ")) {
- w->cond.phenomenon = PHENOMENON_DRIZZLE;
- } else if (!strcmp(sphen, "RA")) {
- w->cond.phenomenon = PHENOMENON_RAIN;
- } else if (!strcmp(sphen, "SN")) {
- w->cond.phenomenon = PHENOMENON_SNOW;
- } else if (!strcmp(sphen, "SG")) {
- w->cond.phenomenon = PHENOMENON_SNOW_GRAINS;
- } else if (!strcmp(sphen, "IC")) {
- w->cond.phenomenon = PHENOMENON_ICE_CRYSTALS;
- } else if (!strcmp(sphen, "PE")) {
- w->cond.phenomenon = PHENOMENON_ICE_PELLETS;
- } else if (!strcmp(sphen, "GR")) {
- w->cond.phenomenon = PHENOMENON_HAIL;
- } else if (!strcmp(sphen, "GS")) {
- w->cond.phenomenon = PHENOMENON_SMALL_HAIL;
- } else if (!strcmp(sphen, "UP")) {
- w->cond.phenomenon = PHENOMENON_UNKNOWN_PRECIPITATION;
- } else if (!strcmp(sphen, "BR")) {
- w->cond.phenomenon = PHENOMENON_MIST;
- } else if (!strcmp(sphen, "FG")) {
- w->cond.phenomenon = PHENOMENON_FOG;
- } else if (!strcmp(sphen, "FU")) {
- w->cond.phenomenon = PHENOMENON_SMOKE;
- } else if (!strcmp(sphen, "VA")) {
- w->cond.phenomenon = PHENOMENON_VOLCANIC_ASH;
- } else if (!strcmp(sphen, "SA")) {
- w->cond.phenomenon = PHENOMENON_SAND;
- } else if (!strcmp(sphen, "HZ")) {
- w->cond.phenomenon = PHENOMENON_HAZE;
- } else if (!strcmp(sphen, "PY")) {
- w->cond.phenomenon = PHENOMENON_SPRAY;
- } else if (!strcmp(sphen, "DU")) {
- w->cond.phenomenon = PHENOMENON_DUST;
- } else if (!strcmp(sphen, "SQ")) {
- w->cond.phenomenon = PHENOMENON_SQUALL;
- } else if (!strcmp(sphen, "SS")) {
- w->cond.phenomenon = PHENOMENON_SANDSTORM;
- } else if (!strcmp(sphen, "DS")) {
- w->cond.phenomenon = PHENOMENON_DUSTSTORM;
- } else if (!strcmp(sphen, "PO")) {
- w->cond.phenomenon = PHENOMENON_DUST_WHIRLS;
- } else if (!strcmp(sphen, "+FC")) {
- w->cond.phenomenon = PHENOMENON_TORNADO;
- } else if (!strcmp(sphen, "FC")) {
- w->cond.phenomenon = PHENOMENON_FUNNEL_CLOUD;
- } else {
- g_return_val_if_fail(FALSE, FALSE);
- }
-
- if ((w->cond.qualifier != QUALIFIER_NONE) || (w->cond.phenomenon != PHENOMENON_NONE))
- w->cond.significant = TRUE;
-
- return TRUE;
-}
-
-const char *
-icon_from_weather (Weather *w)
-{
- ESummaryWeatherConditions cond = w->cond;
- ESummaryWeatherSky sky = w->sky;
-
- switch (cond.phenomenon) {
- case PHENOMENON_DRIZZLE:
- case PHENOMENON_RAIN:
- case PHENOMENON_UNKNOWN_PRECIPITATION:
- case PHENOMENON_HAIL:
- case PHENOMENON_SMALL_HAIL:
- return "myweather-rain.png";
- case PHENOMENON_SNOW:
- case PHENOMENON_SNOW_GRAINS:
- case PHENOMENON_ICE_PELLETS:
- case PHENOMENON_ICE_CRYSTALS:
- return "myweather-snow.png";
- case PHENOMENON_TORNADO:
- case PHENOMENON_SQUALL:
- return "myweather-storm.png";
- case PHENOMENON_MIST:
- case PHENOMENON_FOG:
- case PHENOMENON_SMOKE:
- case PHENOMENON_VOLCANIC_ASH:
- case PHENOMENON_SAND:
- case PHENOMENON_HAZE:
- case PHENOMENON_SPRAY:
- case PHENOMENON_DUST:
- case PHENOMENON_SANDSTORM:
- case PHENOMENON_DUSTSTORM:
- case PHENOMENON_FUNNEL_CLOUD:
- case PHENOMENON_DUST_WHIRLS:
- return "myweather-fog.png";
- default:
- break;
- }
-
- switch (sky) {
- case SKY_CLEAR:
- return "myweather-sun.png";
- case SKY_BROKEN:
- case SKY_SCATTERED:
- case SKY_FEW:
- return "myweather-suncloud.png";
- case SKY_OVERCAST:
- return "myweather-clouds.png";
- default:
- break;
- }
-
- return "es-weather.png";
-}
diff --git a/my-evolution/metar.h b/my-evolution/metar.h
deleted file mode 100644
index 91ec15d2a1..0000000000
--- a/my-evolution/metar.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * metar.h
- */
-
-#ifndef __METAR_H__
-#define __METAR_H__
-
-#define TIME_RE_STR "^([0-9]{6})Z$"
-#define WIND_RE_STR "^(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?KT$"
-#define VIS_RE_STR "^(([0-9]?[0-9])|(M?1/[0-9]?[0-9]))SM$"
-#define CLOUD_RE_STR "^(CLR|BKN|SCT|FEW|OVC)([0-9]{3})?$"
-#define TEMP_RE_STR "^(M?[0-9][0-9])/(M?[0-9][0-9])$"
-#define PRES_RE_STR "^(A|Q)([0-9]{4})$"
-#define COND_RE_STR "^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|SG|IC|PE|GR|GS|UP|BR|FG|FU|VA|SA|HZ|PY|DU|SQ|SS|DS|PO|\\+?FC)$"
-
-enum {
- TIME_RE,
- WIND_RE,
- VIS_RE,
- CLOUD_RE,
- TEMP_RE,
- PRES_RE,
- COND_RE,
- RE_NUM
-};
-
-const char *weather_sky_string (Weather *w);
-char *weather_temp_string (Weather *w);
-const char *weather_conditions_string (Weather *w);
-const char *weather_wind_direction_string (Weather *w);
-const char *icon_from_weather (Weather *w);
-
-void metar_init_re (void);
-gboolean metar_tok_time (char *token,
- Weather *w);
-gboolean metar_tok_wind (char *tokp,
- Weather *w);
-gboolean metar_tok_vis (char *tokp,
- Weather *w);
-gboolean metar_tok_cloud (char *tokp,
- Weather *w);
-gboolean metar_tok_pres (char *tokp,
- Weather *w);
-gboolean metar_tok_temp (char *tokp,
- Weather *w);
-gboolean metar_tok_cond (char *tokp,
- Weather *w);
-#endif
diff --git a/my-evolution/my-evolution-html.h b/my-evolution/my-evolution-html.h
deleted file mode 100644
index bb3b45fef8..0000000000
--- a/my-evolution/my-evolution-html.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-summary-weather.c
- *
- * 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: Jakub Steiner <jimmac@ximian.com>
- * Iain Holmes <iain@ximian.com>
- */
-
-#ifdef NOT_ETTORE
-#define HTML_1 "<html><head></head><body background=\"bcg.png\" "\
-"bgcolor=\"white\" text=\"#000000\" link=\"#314e6c\" alink=\"black\" vlink=\"#314e6c\">"\
-"<img src=\"myevo.png\" alt=\"My Evolution\" width=\"200\" height=\"31\" border=\"0\"><br>"\
-"<img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"20\">"\
-"<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"\
-"<tbody><tr>"
-#else
-#define HTML_1 "<html><head></head><body background=\"bcg.png\" "\
-"bgcolor=\"white\" text=\"#000000\" link=\"#314e6c\" alink=\"black\" vlink=\"#314e6c\">"\
-"<img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"20\">"\
-"<table border=\"0\" numcols=\"5\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">"\
-"<tbody><tr>"
-#endif
-
-/* Needs a stringified date */
-#define HTML_2 "<td align=\"Right\" colspan=\"5\"><b>%s</b><br> <img src=\"empty.gif\" width=\"1\" height=\"3\"></td>"
-
-#define HTML_3 "</tr><tr><td colspan=\"5\" bgcolor=\"#000000\"><img src=\"empty.gif\" width=\"1\" height=\"1\"></td></tr>"\
-"<tr valign=\"Top\">" \
-"<td width=\"100%\">"\
-
-/* Weather stuff goes here */
-
-/* RDF Stuff goes here */
-
-#define HTML_4 "</td><td>&#160;</td><td width=\"1\" bgcolor=\"#000000\"><img src=\"empty.gif\" width=\"1\" height=\"1\"></td>"\
-"<td width=\"15\" background=\"pattern.png\">&nbsp&nbsp&nbsp</td>"\
-"<td width=\"0\" background=\"pattern.png\">"
-
-/* Mail stuff ici s'il vous plait */
-
-/* And then the calendar stuff */
-
-#ifdef NOT_ETTORE
-#define HTML_5 "<p align=\"Center\"><img src=\"evologo-big.png\" width=\"200\" height=\"216\" alt=\"\"></p><p>"\
-"<img src=\"empty.gif\" alt=\"\" width=\"290\" height=\"1\"></p></td>"\
-"<tr bgcolor=\"#000000\"><td colspan=\"\"><img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"20\"></td></tr>"\
-"</tbody></table></body></html>"
-#else
-#define HTML_5 "<img src=\"empty.gif\" alt=\"\" width=\"290\" height=\"1\"></p></td>"\
-"<tr bgcolor=\"#000000\"><td colspan=\"5\"><img src=\"empty.gif\" alt=\"\" width=\"10\" height=\"1\"></td></tr>"\
-"</tbody></table></body></html>"
-#endif
-
diff --git a/my-evolution/my-evolution.glade b/my-evolution/my-evolution.glade
deleted file mode 100644
index a8a6411c0b..0000000000
--- a/my-evolution/my-evolution.glade
+++ /dev/null
@@ -1,1490 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Project1</name>
- <program_name>project1</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>dialog1</name>
- <width>592</width>
- <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>notebook2</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>vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>All _folders:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist7</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>GtkLabel</class>
- <name>label10</name>
- <label>_Display folders:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist1</focus_target>
- <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>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <border_width>8</border_width>
- <xalign>0.5</xalign>
- <yalign>0.5</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>False</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button4</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-mailadd</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label41</name>
- <label>_Add</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button5</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-mailremove</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label42</name>
- <label> _Remove</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label11</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</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>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </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>
- <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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist1</name>
- <width>100</width>
- <height>150</height>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_EXTENDED</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>label12</name>
- <label>label27</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>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <width>100</width>
- <height>150</height>
- <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>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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist7</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>label40</name>
- <label>label40</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>GtkCheckButton</class>
- <name>checkbutton1</name>
- <border_width>3</border_width>
- <can_focus>True</can_focus>
- <label>S_how full path for folders</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>label5</name>
- <label>_Mail</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>GtkTable</class>
- <name>table3</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label19</name>
- <label>All news _feeds:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist6</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>GtkLabel</class>
- <name>label20</name>
- <label>_Displayed feeds:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist5</focus_target>
- <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>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <border_width>8</border_width>
- <xalign>0.5</xalign>
- <yalign>0.5</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>False</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button9</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-newsadd</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label43</name>
- <label>_Add</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button10</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox9</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-newsremove</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label47</name>
- <label> _Remove</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label21</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</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>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow5</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>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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist5</name>
- <width>100</width>
- <height>150</height>
- <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>label22</name>
- <label>label27</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>GtkScrolledWindow</class>
- <name>scrolledwindow6</name>
- <width>100</width>
- <height>150</height>
- <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>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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist6</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_EXTENDED</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>label23</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>GtkFrame</class>
- <name>frame2</name>
- <border_width>3</border_width>
- <label>News Feed Settings</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>table4</name>
- <border_width>3</border_width>
- <rows>2</rows>
- <columns>5</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>3</row_spacing>
- <column_spacing>3</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label25</name>
- <label>R_efresh time (seconds):</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>spinbutton1</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>label29</name>
- <label>Ma_x number of items shown:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>spinbutton4</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>False</yfill>
- </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>1e+06</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton4</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>
- <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>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button11</name>
- <can_focus>True</can_focus>
- <label>Add n_ew feed</label>
- <child>
- <left_attach>3</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>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label6</name>
- <label>_News Feeds</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>vbox8</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table2</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>Al_l stations:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>ctree1</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>GtkLabel</class>
- <name>label15</name>
- <label>_Display stations:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist3</focus_target>
- <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>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <border_width>8</border_width>
- <xalign>0.5</xalign>
- <yalign>0.5</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>False</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button6</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-weatheradd</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label45</name>
- <label>_Add</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button7</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-weatherremove</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label48</name>
- <label> _Remove</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>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</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>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow3</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>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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist3</name>
- <width>100</width>
- <height>150</height>
- <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>label17</name>
- <label>label27</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>GtkScrolledWindow</class>
- <name>scrolledwindow4</name>
- <width>100</width>
- <height>150</height>
- <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>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>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCTree</class>
- <name>ctree1</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>CTree:title</child_name>
- <name>label39</name>
- <label>label39</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>GtkFrame</class>
- <name>frame3</name>
- <border_width>3</border_width>
- <label>Weather settings</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>vbox11</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label37</name>
- <label>Units: </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>GtkRadioButton</class>
- <name>radiobutton7</name>
- <can_focus>True</can_focus>
- <label>m_etric</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>units_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton8</name>
- <can_focus>True</can_focus>
- <label>_imperial</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>units_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label38</name>
- <label>Refresh _time (seconds):</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>spinbutton5</focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton5</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>1e+06</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>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label7</name>
- <label>_Weather</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>vbox9</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame4</name>
- <border_width>3</border_width>
- <label>Calendar</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>vbox10</name>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label32</name>
- <label>How many days should the calendar display at once?</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>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton3</name>
- <can_focus>True</can_focus>
- <label>_One day</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>days_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton4</name>
- <can_focus>True</can_focus>
- <label>_Five days</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>days_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton5</name>
- <can_focus>True</can_focus>
- <label>One w_eek</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>days_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton6</name>
- <can_focus>True</can_focus>
- <label>One mont_h</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>days_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame5</name>
- <border_width>3</border_width>
- <label>Tasks </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>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton1</name>
- <can_focus>True</can_focus>
- <label>Show _all tasks</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>tasks_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton2</name>
- <can_focus>True</can_focus>
- <label>Show _today's tasks</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>tasks_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label8</name>
- <label>_Schedule</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/my-evolution/weather.h b/my-evolution/weather.h
deleted file mode 100644
index 60d184e1ee..0000000000
--- a/my-evolution/weather.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* weather.h
- *
- * 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.
- *
- * Author: Iain Holmes <iain@ximian.com>
- */
-
-#ifndef __WEATHER_H__
-#define __WEATHER_H__
-
-#include "e-summary-weather.h"
-
-#include <libgnomevfs/gnome-vfs.h>
-
-typedef struct _Weather {
- char *location;
- char *html;
- GnomeVFSAsyncHandle *handle;
- GString *string;
- char *buffer;
-
- ESummary *summary;
-
- gboolean valid;
- ESummaryWeatherLocation *loc;
- ESummaryWeatherUnits units;
- ESummaryWeatherUpdate update;
- ESummaryWeatherSky sky;
- ESummaryWeatherConditions cond;
- ESummaryWeatherTemperature temp;
- ESummaryWeatherTemperature dew;
- ESummaryWeatherHumidity humidity;
- ESummaryWeatherWindDir wind;
- ESummaryWeatherWindSpeed windspeed;
- ESummaryWeatherPressure pressure;
- ESummaryWeatherVisibility visibility;
- char *forecast;
-} Weather;
-
-#endif
diff --git a/notes/.cvsignore b/notes/.cvsignore
deleted file mode 100644
index 02b0523973..0000000000
--- a/notes/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
diff --git a/notes/GNOME_Evolution_Notes.oaf.in b/notes/GNOME_Evolution_Notes.oaf.in
deleted file mode 100644
index d65cb45412..0000000000
--- a/notes/GNOME_Evolution_Notes.oaf.in
+++ /dev/null
@@ -1,54 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Notes_controlFactory"
- type="exe"
- location="evolution-notes">
-
- <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 Notes control"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Notes_control"
- type="factory"
- location="OAFIID:GNOME_Evolution_Notes_controlFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <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_Notes_shellComponentFactory"
- type="exe"
- location="evolution-notes">
-
- <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 notes component."/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Notes_shellComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Notes_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 mail."/>
-
-</oaf_server>
-
-</oaf_info>
diff --git a/notes/Makefile.am b/notes/Makefile.am
deleted file mode 100644
index 37e2a7ea03..0000000000
--- a/notes/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-noinst_PROGRAMS = notes-test
-
-INCLUDES = \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/widgets/e-text \
- $(BONOBO_HTML_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DG_LOG_DOMAIN=\"evolution-notes\"
-
-notes_test_SOURCES = \
- e-bevel-button.c \
- e-bevel-button.h \
- e-bevel-button-util.c \
- e-bevel-button-util.h \
- e-note.c \
- e-note.h \
- test-notes.c
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Notes.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-notes_test_LDADD = \
- $(BONOBO_HTML_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-EXTRA_DIST= $(oaf_in_files) $(oaf_DATA)
diff --git a/notes/component-factory.c b/notes/component-factory.c
deleted file mode 100644
index 48b81f4071..0000000000
--- a/notes/component-factory.c
+++ /dev/null
@@ -1,155 +0,0 @@
-#include <config.h>
-
-#include <gnome.h>
-#include <bonobo.h>
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-
-#include "evolution-shell-component.h"
-
-#include "e-util/e-gui-utils.h"
-
-#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Notes_shellComponentFactory"
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "notes", "evolution-notes.png" },
- { NULL, NULL }
-};
-
-static void
-new_note_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- g_print ("new note!\n");
-}
-
-static GnomeUIInfo gnome_toolbar [] = {
- GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new note"), new_note_cb, GNOME_STOCK_PIXMAP_NEW),
- GNOMEUIINFO_END
-};
-
-#ifdef THIS_NEEDS_UPDATING_FOR_NEW_BONOBOS
-
-static void
-control_deactivate (BonoboControl *control, BonoboUIComponent *uih)
-{
- bonobo_ui_handler_dock_remove (uih, "/Toolbar");
-}
-
-static void
-control_activate (BonoboControl *control, BonoboUIComponent *uih)
-{
- Bonobo_UIContainer remote_uih;
- GtkWidget *toolbar, *toolbar_frame;
- BonoboControl *toolbar_control ;
-
- remote_uih = bonobo_control_get_remote_ui_handler (control);
- bonobo_ui_handler_set_container (uih, remote_uih);
- bonobo_object_release_unref (remote_uih, NULL);
-
- toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
- GTK_TOOLBAR_BOTH);
-
- gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar),
- gnome_toolbar,
- NULL, NULL);
-
- toolbar_frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (toolbar_frame), GTK_SHADOW_OUT);
- gtk_container_add (GTK_CONTAINER (toolbar_frame), toolbar);
- gtk_widget_show (toolbar_frame);
-
- gtk_widget_show_all (toolbar_frame);
-
- toolbar_control = bonobo_control_new (toolbar_frame);
- bonobo_ui_handler_dock_add (
- uih, "/Toolbar",
- bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)),
- GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
- GNOME_DOCK_TOP,
- 1, 1, 0);
-}
-
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate)
-{
- BonoboUIComponent *uih;
-
- uih = bonobo_control_get_ui_handler (control);
- g_assert (uih);
-
- if (activate)
- control_activate (control, uih);
- else
- control_deactivate (control, uih);
-}
-#endif
-
-static BonoboControl *
-create_view (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- void *closure)
-{
- BonoboControl * control;
-
- control = notes_factory_new_control ();
-
-#ifdef THIS_CODE_IS_TOTALY_DEAD
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- control_activate_cb, NULL);
-#endif
-
-
- return control;
-}
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient shell_client,
- gpointer user_data)
-{
- g_print ("evolution-notes: Yeeeh! We have an owner!\n"); /* FIXME */
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
-{
- g_print ("No owner anymore\n");
-}
-
-/* The factory function */
-static BonoboObject *
-notes_component_factory (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionShellComponent *shell_component;
-
- shell_component = evolution_shell_component_new (folder_types, create_view, NULL);
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
- GTK_SIGNAL_FUNC (owner_set_cb), NULL);
- 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)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, notes_component_factory, NULL);
-
- if (factory == NULL) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's notes component."));
- exit (1);
- }
-}
diff --git a/notes/component-factory.h b/notes/component-factory.h
deleted file mode 100644
index 9535ccc4ae..0000000000
--- a/notes/component-factory.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-#ifndef COMPONENT_FACTORY_H
-#define COMPONENT_FACTORY_H
-
-void component_factory_init (void);
-
-#endif
diff --git a/notes/e-bevel-button-util.c b/notes/e-bevel-button-util.c
deleted file mode 100644
index cfa01f71a2..0000000000
--- a/notes/e-bevel-button-util.c
+++ /dev/null
@@ -1,189 +0,0 @@
-#include <gtk/gtk.h>
-#include "e-bevel-button-util.h"
-
-static void rgb_to_hls (gdouble *r, gdouble *g, gdouble *b);
-static void hls_to_rgb (gdouble *h, gdouble *l, gdouble *s);
-
-void
-e_bevel_button_util_shade (GdkColor *a,
- GdkColor *b,
- gdouble k)
-{
- gdouble red;
- gdouble green;
- gdouble blue;
-
- red = (gdouble) a->red / 65535.0;
- green = (gdouble) a->green / 65535.0;
- blue = (gdouble) a->blue / 65535.0;
-
- rgb_to_hls (&red, &green, &blue);
-
- green *= k;
- if (green > 1.0)
- green = 1.0;
- else if (green < 0.0)
- green = 0.0;
-
- blue *= k;
- if (blue > 1.0)
- blue = 1.0;
- else if (blue < 0.0)
- blue = 0.0;
-
- hls_to_rgb (&red, &green, &blue);
-
- b->red = red * 65535.0;
- b->green = green * 65535.0;
- b->blue = blue * 65535.0;
-}
-
-static void
-rgb_to_hls (gdouble *r,
- gdouble *g,
- gdouble *b)
-{
- gdouble min;
- gdouble max;
- gdouble red;
- gdouble green;
- gdouble blue;
- gdouble h, l, s;
- gdouble delta;
-
- red = *r;
- green = *g;
- blue = *b;
-
- if (red > green)
- {
- if (red > blue)
- max = red;
- else
- max = blue;
-
- if (green < blue)
- min = green;
- else
- min = blue;
- }
- else
- {
- if (green > blue)
- max = green;
- else
- max = blue;
-
- if (red < blue)
- min = red;
- else
- min = blue;
- }
-
- l = (max + min) / 2;
- s = 0;
- h = 0;
-
- if (max != min)
- {
- if (l <= 0.5)
- s = (max - min) / (max + min);
- else
- s = (max - min) / (2 - max - min);
-
- delta = max -min;
- if (red == max)
- h = (green - blue) / delta;
- else if (green == max)
- h = 2 + (blue - red) / delta;
- else if (blue == max)
- h = 4 + (red - green) / delta;
-
- h *= 60;
- if (h < 0.0)
- h += 360;
- }
-
- *r = h;
- *g = l;
- *b = s;
-}
-
-static void
-hls_to_rgb (gdouble *h,
- gdouble *l,
- gdouble *s)
-{
- gdouble hue;
- gdouble lightness;
- gdouble saturation;
- gdouble m1, m2;
- gdouble r, g, b;
-
- lightness = *l;
- saturation = *s;
-
- if (lightness <= 0.5)
- m2 = lightness * (1 + saturation);
- else
- m2 = lightness + saturation - lightness * saturation;
- m1 = 2 * lightness - m2;
-
- if (saturation == 0)
- {
- *h = lightness;
- *l = lightness;
- *s = lightness;
- }
- else
- {
- hue = *h + 120;
- while (hue > 360)
- hue -= 360;
- while (hue < 0)
- hue += 360;
-
- if (hue < 60)
- r = m1 + (m2 - m1) * hue / 60;
- else if (hue < 180)
- r = m2;
- else if (hue < 240)
- r = m1 + (m2 - m1) * (240 - hue) / 60;
- else
- r = m1;
-
- hue = *h;
- while (hue > 360)
- hue -= 360;
- while (hue < 0)
- hue += 360;
-
- if (hue < 60)
- g = m1 + (m2 - m1) * hue / 60;
- else if (hue < 180)
- g = m2;
- else if (hue < 240)
- g = m1 + (m2 - m1) * (240 - hue) / 60;
- else
- g = m1;
-
- hue = *h - 120;
- while (hue > 360)
- hue -= 360;
- while (hue < 0)
- hue += 360;
-
- if (hue < 60)
- b = m1 + (m2 - m1) * hue / 60;
- else if (hue < 180)
- b = m2;
- else if (hue < 240)
- b = m1 + (m2 - m1) * (240 - hue) / 60;
- else
- b = m1;
-
- *h = r;
- *l = g;
- *s = b;
- }
-}
diff --git a/notes/e-bevel-button-util.h b/notes/e-bevel-button-util.h
deleted file mode 100644
index 759a9025cc..0000000000
--- a/notes/e-bevel-button-util.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __E_BEVEL_BUTTON_UTIL_H__
-#define __E_BEVEL_BUTTON_UTIL_H__
-
-#define LIGHTNESS_MULT 1.3
-#define DARKNESS_MULT 0.7
-
-void
-e_bevel_button_util_shade (GdkColor *a,
- GdkColor *b,
- gdouble k);
-
-#endif /* __E_BEVEL_BUTTON_UTIL_H__ */
diff --git a/notes/e-bevel-button.c b/notes/e-bevel-button.c
deleted file mode 100644
index 1d96d88531..0000000000
--- a/notes/e-bevel-button.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-#include <config.h>
-#include <gtk/gtkbutton.h>
-
-#include <gal/util/e-util.h>
-
-#include "e-bevel-button.h"
-#include "e-bevel-button-util.h"
-
-#define PARENT_TYPE GTK_TYPE_BUTTON
-
-static GtkButtonClass *parent_class = NULL;
-
-struct _EBevelButtonPrivate {
- GdkColor base_color;
- GdkColor dark_color;
- GdkColor light_color;
- GdkGC *gc;
-};
-
-static void
-e_bevel_button_paint (GtkWidget *widget, GdkRectangle *area)
-{
- EBevelButton *button;
-
- button = E_BEVEL_BUTTON (widget);
-
- if (GTK_WIDGET_DRAWABLE (widget)) {
- gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
- gdk_window_clear_area (widget->window, area->x, area->y, area->width, area->height);
-
- gdk_gc_set_foreground (button->priv->gc, &button->priv->base_color);
- gdk_draw_rectangle (widget->window,
- button->priv->gc,
- TRUE,
- 0, 0,
- widget->allocation.width, widget->allocation.height);
-
- if (GTK_BUTTON (button)->in_button) {
- gdk_gc_set_foreground (button->priv->gc,
- GTK_BUTTON (button)->button_down ?
- &button->priv->dark_color :
- &button->priv->light_color);
- gdk_draw_line (widget->window, button->priv->gc,
- 0, 0, 0, widget->allocation.height - 2);
- gdk_draw_line (widget->window, button->priv->gc,
- 0, 0, widget->allocation.width - 2, 0);
-
- gdk_gc_set_foreground (button->priv->gc,
- GTK_BUTTON (button)->button_down ?
- &button->priv->light_color :
- &button->priv->dark_color);
- gdk_draw_line (widget->window, button->priv->gc,
- widget->allocation.width - 1 , 1,
- widget->allocation.width - 1, widget->allocation.height - 1);
- gdk_draw_line (widget->window, button->priv->gc,
- 1, widget->allocation.height - 1,
- widget->allocation.width - 1, widget->allocation.height - 1);
- }
- }
-}
-
-static gint
-e_bevel_button_expose (GtkWidget *widget, GdkEventExpose *event)
-{
- GtkBin *bin;
- GdkEventExpose child_event;
-
- if (GTK_WIDGET_DRAWABLE (widget)) {
- bin = GTK_BIN (widget);
-
- e_bevel_button_paint (widget, &event->area);
-
- child_event = *event;
- if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) &&
- gtk_widget_intersect (bin->child, &event->area, &child_event.area))
- gtk_widget_event (bin->child, (GdkEvent*) &child_event);
- }
-
- return FALSE;
-}
-
-static void
-e_bevel_button_draw (GtkWidget *widget, GdkRectangle *area)
-{
- GdkRectangle child_area;
- GdkRectangle tmp_area;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (E_IS_BEVEL_BUTTON (widget));
- g_return_if_fail (area != NULL);
-
- if (GTK_WIDGET_DRAWABLE (widget)) {
- tmp_area = *area;
- tmp_area.x -= GTK_CONTAINER (widget)->border_width;
- tmp_area.y -= GTK_CONTAINER (widget)->border_width;
-
- e_bevel_button_paint (widget, &tmp_area);
-
- if (GTK_BIN (widget)->child && gtk_widget_intersect (GTK_BIN (widget)->child, &tmp_area, &child_area))
- gtk_widget_draw (GTK_BIN (widget)->child, &child_area);
- }
-}
-
-static void
-e_bevel_button_realize (GtkWidget *widget)
-{
- EBevelButton *button = E_BEVEL_BUTTON (widget);
-
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
-
- button->priv->gc = gdk_gc_new (widget->window);
-
- gdk_color_parse ("#d0d888", &button->priv->base_color);
- e_bevel_button_util_shade (&button->priv->base_color,
- &button->priv->light_color,
- LIGHTNESS_MULT);
- e_bevel_button_util_shade (&button->priv->base_color,
- &button->priv->dark_color,
- DARKNESS_MULT);
- gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->base_color, FALSE, TRUE);
- gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->light_color, FALSE, TRUE);
- gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->dark_color, FALSE, TRUE);
-}
-
-static void
-e_bevel_button_class_init (EBevelButtonClass *klass)
-{
- GtkWidgetClass *widget_class;
-
- widget_class = (GtkWidgetClass *)klass;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- widget_class->draw = e_bevel_button_draw;
- widget_class->expose_event = e_bevel_button_expose;
- widget_class->realize = e_bevel_button_realize;
-}
-
-static void
-e_bevel_button_init (EBevelButton *button)
-{
- EBevelButtonPrivate *priv;
-
- GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
-
- priv = g_new (EBevelButtonPrivate, 1);
-
- button->priv = priv;
-}
-
-GtkWidget *
-e_bevel_button_new (void)
-{
- EBevelButton *button;
-
- button = gtk_type_new (E_TYPE_BEVEL_BUTTON);
-
- return GTK_WIDGET (button);
-}
-
-E_MAKE_TYPE (e_bevel_button, "EBevelButton", EBevelButton, e_bevel_button_class_init, e_bevel_button_init, PARENT_TYPE);
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/notes/e-bevel-button.h b/notes/e-bevel-button.h
deleted file mode 100644
index 333c317b43..0000000000
--- a/notes/e-bevel-button.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-#ifndef __E_BEVEL_BUTTON_H__
-#define __E_BEVEL_BUTTON_H__
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtkbutton.h>
-
-#define E_TYPE_BEVEL_BUTTON (e_bevel_button_get_type ())
-#define E_BEVEL_BUTTON(obj) (GTK_CHECK_CAST ((obj), E_TYPE_BEVEL_BUTTON, EBevelButton))
-#define E_BEVEL_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_BEVEL_BUTTON, EBevelButtonClass))
-#define E_IS_BEVEL_BUTTON(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_BEVEL_BUTTON))
-#define E_IS_BEVEL_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_BEVEL_BUTTON))
-
-typedef struct _EBevelButton EBevelButton;
-typedef struct _EBevelButtonPrivate EBevelButtonPrivate;
-typedef struct _EBevelButtonClass EBevelButtonClass;
-
-struct _EBevelButton {
- GtkButton parent;
-
- EBevelButtonPrivate *priv;
-};
-
-struct _EBevelButtonClass {
- GtkButtonClass parent_class;
-};
-
-GtkType e_bevel_button_get_type (void);
-
-GtkWidget *e_bevel_button_new (void);
-void e_bevel_button_set_base_color (EBevelButton *button, GdkColor *color);
-
-#endif /* __E_BEVEL_BUTTON_H__ */
-
diff --git a/notes/e-note.c b/notes/e-note.c
deleted file mode 100644
index 642fd1178a..0000000000
--- a/notes/e-note.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-#include <config.h>
-#include <gnome.h>
-#include <gdk/gdkx.h>
-
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <gal/util/e-util.h>
-#include <gal/e-text/e-text.h>
-
-#include "e-note.h"
-#include "e-bevel-button.h"
-#include "e-bevel-button-util.h"
-
-#define PARENT_TYPE GTK_TYPE_WINDOW
-
-enum {
- E_NOTE_TEXT_CHANGED,
- E_NOTE_LAST_SIGNAL
-};
-
-static guint e_note_signals [E_NOTE_LAST_SIGNAL] = { 0 };
-
-static GtkWindowClass *parent_class = NULL;
-
-struct _ENotePrivate {
- GtkWidget *canvas;
-
- GnomeCanvasItem *frame;
- GnomeCanvasItem *rect;
-
- GnomeCanvasItem *text_item;
-
- GnomeCanvasItem *move_button;
- GnomeCanvasItem *close_button;
- GnomeCanvasItem *resize_button;
-
- /* Used for moving and resizing */
- gint press_x, press_y;
- gint resize_width, resize_height;
- gboolean in_drag;
-};
-
-static void
-e_note_text_changed (ETextModel *model, gpointer data)
-{
- gtk_signal_emit (GTK_OBJECT (data),
- e_note_signals [E_NOTE_TEXT_CHANGED]);
-}
-
-static gint
-e_note_resize_button_changed (GtkWidget *widget, GdkEventButton *event, gpointer data)
-{
- ENote *note = E_NOTE (data);
-
- if (event->type == GDK_BUTTON_PRESS) {
- note->priv->press_x = event->x_root;
- note->priv->press_y = event->y_root;
-
- gdk_window_get_geometry (GTK_WIDGET (note)->window, NULL, NULL,
- &note->priv->resize_width, &note->priv->resize_height, NULL);
-
- gdk_pointer_grab (widget->window,
- FALSE,
- (GDK_BUTTON1_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_RELEASE_MASK),
- NULL,
- NULL,
- GDK_CURRENT_TIME);
- note->priv->in_drag = TRUE;
-
- }
- else {
- if (note->priv->in_drag) {
- if (event->window != widget->window)
- return FALSE;
-
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
- note->priv->in_drag = FALSE;
- }
- }
-
- return TRUE;
-}
-
-static gint
-e_note_resize_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer data)
-{
- GtkWidget *window = GTK_WIDGET (data);
- ENote *note = E_NOTE (data);
- gint new_x, new_y;
- gint width, height;
-
- if (note->priv->in_drag) {
- gdk_window_get_pointer (GDK_ROOT_PARENT (), &new_x, &new_y, NULL);
-
- width = note->priv->resize_width + new_x - note->priv->press_x;
- if (width < 60)
- width = 60;
-
- height = note->priv->resize_height + new_y - note->priv->press_y;
- if (height < 60)
- height = 60;
-
- gdk_window_resize (window->window, width, height);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gint
-e_note_move_button_changed (GtkWidget *widget, GdkEventButton *event, gpointer data)
-{
- ENote *note = E_NOTE (data);
-
- if (event->button != 1)
- return FALSE;
-
- if (event->type == GDK_BUTTON_PRESS) {
- gint root_x, root_y;
-
- gdk_window_get_origin (widget->window, &root_x, &root_y);
- note->priv->press_x = root_x - event->x_root;
- note->priv->press_y = root_y - event->y_root;
-
- gdk_pointer_grab (widget->window,
- FALSE,
- (GDK_BUTTON1_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_RELEASE_MASK),
- NULL,
- NULL,
- GDK_CURRENT_TIME);
-
- note->priv->in_drag = TRUE;
- }
- else {
- if (note->priv->in_drag) {
- if (event->window != widget->window)
- return FALSE;
-
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
- note->priv->in_drag = FALSE;
- }
- }
-
- return TRUE;
-}
-
-static gint
-e_note_move_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer data)
-{
- gint new_x, new_y;
- ENote *note = E_NOTE (data);
- GtkWidget *window = GTK_WIDGET (data);
-
- if (note->priv->in_drag) {
- gdk_window_get_pointer (GDK_ROOT_PARENT (), &new_x, &new_y, NULL);
-
- new_x += note->priv->press_x;
- new_y += note->priv->press_y;
-
- gdk_window_move (window->window, new_x, new_y);
- }
-
- return TRUE;
-}
-
-static void
-e_note_canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpointer data)
-{
- ENote *note;
- gdouble height;
-
- note = E_NOTE (data);
-
- gnome_canvas_item_set (note->priv->text_item,
- "width", (gdouble) allocation->width - 10,
- NULL);
- gtk_object_get (GTK_OBJECT (note->priv->text_item),
- "height", &height,
- NULL);
- height = MAX (height, allocation->height);
- gnome_canvas_set_scroll_region (GNOME_CANVAS (note->priv->canvas), 0, 0,
- allocation->width, height);
- gnome_canvas_item_set (note->priv->frame,
- "x2", (gdouble) allocation->width - 1,
- "y2", (gdouble) allocation->height - 1,
- NULL);
- gnome_canvas_item_set (note->priv->rect,
- "x2", (gdouble) allocation->width - 1,
- "y2", (gdouble) allocation->height - 1,
- NULL);
- gnome_canvas_item_set (note->priv->move_button,
- "width", (gdouble) allocation->width - 29,
- NULL);
- gnome_canvas_item_set (note->priv->resize_button,
- "x", (gdouble) allocation->width - 23,
- "y", (gdouble) allocation->height - 23,
- NULL);
- gnome_canvas_item_set (note->priv->close_button,
- "x", (gdouble) allocation->width - 23,
- NULL);
-}
-
-static void
-e_note_realize (GtkWidget *widget)
-{
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
-
- gdk_window_set_decorations (widget->window, 0);
-}
-
-static void
-e_note_class_init (ENoteClass *klass)
-{
- GtkWidgetClass *widget_class;
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *)klass;
- widget_class = (GtkWidgetClass *)klass;
- parent_class = gtk_type_class (PARENT_TYPE);
-
- widget_class->realize = e_note_realize;
-
- e_note_signals [E_NOTE_TEXT_CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ENoteClass, text_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_note_signals, E_NOTE_LAST_SIGNAL);
-}
-
-static void
-e_note_init (ENote *note)
-{
- ENotePrivate *priv;
- GtkWidget *button;
-
- priv = g_new (ENotePrivate, 1);
-
- note->priv = priv;
-
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- priv->canvas = e_canvas_new ();
-
- gtk_widget_pop_visual ();
- gtk_widget_pop_colormap ();
-
- gtk_signal_connect (GTK_OBJECT (priv->canvas), "size_allocate",
- GTK_SIGNAL_FUNC (e_note_canvas_size_allocate), note);
- gtk_widget_show (priv->canvas);
- gtk_container_add (GTK_CONTAINER (note), priv->canvas);
-
- priv->rect = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)),
- gnome_canvas_rect_get_type (),
- "x1", 0.0,
- "y1", 0.0,
- "x2", 100.0,
- "y2", 100.0,
- "fill_color_rgba", 0xf5ffa0ff,
- NULL);
- priv->frame = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)),
- gnome_canvas_rect_get_type (),
- "x1", 0.0,
- "y1", 0.0,
- "x2", 100.0,
- "y2", 100.0,
- "outline_color", "black",
- NULL);
-
- priv->text_item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)),
- e_text_get_type (),
- "text", "",
- "font_gdk", priv->canvas->style->font,
- "fill_color", "black",
- "anchor", GTK_ANCHOR_NW,
- "clip", TRUE,
- "editable", TRUE,
- "line_wrap", TRUE,
- "width", 150.0,
- NULL);
- e_canvas_item_move_absolute(priv->text_item,
- 5.0, 25.0);
-
- gtk_signal_connect (GTK_OBJECT (E_TEXT (priv->text_item)->model), "changed",
- GTK_SIGNAL_FUNC (e_note_text_changed), note);
-
- button = e_bevel_button_new ();
- gtk_signal_connect (GTK_OBJECT (button), "button_press_event",
- GTK_SIGNAL_FUNC (e_note_move_button_changed), note);
- gtk_signal_connect (GTK_OBJECT (button), "button_release_event",
- GTK_SIGNAL_FUNC (e_note_move_button_changed), note);
- gtk_signal_connect (GTK_OBJECT (button), "motion_notify_event",
- GTK_SIGNAL_FUNC (e_note_move_motion_event), note);
- gtk_widget_show (button);
- priv->move_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)),
- gnome_canvas_widget_get_type (),
- "widget", button,
- "x", 3.0,
- "y", 3.0,
- "width", 20.0,
- "height", 20.0,
- NULL);
- button = e_bevel_button_new ();
- gtk_widget_show (button);
- priv->close_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)),
- gnome_canvas_widget_get_type (),
- "widget", button,
- "x", 3.0,
- "y", 3.0,
- "width", 20.0,
- "height", 20.0,
- NULL);
-
- button = e_bevel_button_new ();
- gtk_signal_connect (GTK_OBJECT (button), "button_press_event",
- GTK_SIGNAL_FUNC (e_note_resize_button_changed), note);
- gtk_signal_connect (GTK_OBJECT (button), "button_release_event",
- GTK_SIGNAL_FUNC (e_note_resize_button_changed), note);
- gtk_signal_connect (GTK_OBJECT (button), "motion_notify_event",
- GTK_SIGNAL_FUNC (e_note_resize_motion_event), note);
- gtk_widget_show (button);
- priv->resize_button = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (priv->canvas)),
- gnome_canvas_widget_get_type (),
- "widget", button,
- "x", 3.0,
- "y", 3.0,
- "width", 20.0,
- "height", 20.0,
- NULL);
-}
-
-void
-e_note_set_text (ENote *note, gchar *text)
-{
- g_return_if_fail (note != NULL);
- g_return_if_fail (E_IS_NOTE (note));
- g_return_if_fail (text != NULL);
-
- gnome_canvas_item_set (note->priv->text_item,
- "text", text,
- NULL);
-}
-
-gchar *
-e_note_get_text (ENote *note)
-{
- gchar *text;
-
- g_return_val_if_fail (note != NULL, NULL);
- g_return_val_if_fail (E_IS_NOTE (note), NULL);
- g_return_val_if_fail (text != NULL, NULL);
-
- gtk_object_get (GTK_OBJECT (note->priv->text_item),
- "text", &text,
- NULL);
-
- return text;
-}
-
-
-GtkWidget *
-e_note_new (void)
-{
- ENote *note;
-
- note = gtk_type_new (E_TYPE_NOTE);
-
- return GTK_WIDGET (note);
-}
-
-E_MAKE_TYPE (e_note, "ENote", ENote, e_note_class_init, e_note_init, PARENT_TYPE);
diff --git a/notes/e-note.h b/notes/e-note.h
deleted file mode 100644
index d7d4c63b95..0000000000
--- a/notes/e-note.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-#ifndef __E_NOTE_H__
-#define __E_NOTE_H__
-
-#include <config.h>
-#include <gnome.h>
-#include "e-bevel-button.h"
-
-#define E_TYPE_NOTE (e_note_get_type ())
-#define E_NOTE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_NOTE, ENote))
-#define E_NOTE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_NOTE, ENoteClass))
-#define E_IS_NOTE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_NOTE))
-#define E_IS_NOTE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_NOTE))
-
-typedef struct _ENote ENote;
-typedef struct _ENotePrivate ENotePrivate;
-typedef struct _ENoteClass ENoteClass;
-
-struct _ENote {
- GtkWindow parent;
-
- ENotePrivate *priv;
-};
-
-struct _ENoteClass {
- GtkWindowClass parent_class;
-
- void (* text_changed) (ENote *note);
-};
-
-GtkType e_note_get_type (void);
-GtkWidget *e_note_new (void);
-void e_note_set_text (ENote *note, gchar *text);
-gchar *e_note_get_text (ENote *note);
-
-#endif /* __E_NOTE_H__ */
diff --git a/notes/main.c b/notes/main.c
deleted file mode 100644
index 148b9a409d..0000000000
--- a/notes/main.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Author:
- * Anders Carlsson (andersca@gnu.org)
- *
- * (C) 2000 Ximian, Inc.
- */
-
-#include <config.h>
-#include <gnome.h>
-#include <bonobo.h>
-#include <liboaf/liboaf.h>
-
-#include "e-util/e-gui-utils.h"
-#include "component-factory.h"
-
-static void
-init_corba (gint argc, gchar **argv)
-{
- gnome_init_with_popt_table ("evolution-notes-component", VERSION, argc, argv,
- oaf_popt_options, 0, NULL);
- oaf_init (argc, argv);
-}
-
-static void
-init_bonobo (void)
-{
- if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Notes Component: Could not initialize bonobo"));
- exit (1);
- }
-}
-
-gint
-main (gint argc, gchar **argv)
-{
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- init_corba (argc, argv);
- init_bonobo ();
-
- e_setup_base_dir ();
-
- notes_factory_init ();
- component_factory_init ();
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/notes/test-notes.c b/notes/test-notes.c
deleted file mode 100644
index 41def58a24..0000000000
--- a/notes/test-notes.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-#include <config.h>
-#include <gnome.h>
-#include <gdk/gdkx.h>
-
-#include <gal/widgets/e-canvas.h>
-#include <gal/e-text/e-text.h>
-
-#include "e-note.h"
-
-void
-text_changed (GtkWidget *widget, gpointer data)
-{
- g_print ("Text changed!\n");
-}
-
-gint
-main (gint argc, gchar **argv)
-{
- GtkWidget *note;
-
- gnome_init ("NotesTest", "0.0.1", argc, argv);
-
- note = e_note_new ();
- e_note_set_text (E_NOTE (note), "This is a text note widget");
- gtk_signal_connect (GTK_OBJECT (note), "changed",
- GTK_SIGNAL_FUNC (text_changed), NULL);
-
- gtk_widget_show (note);
- gtk_main ();
-
- return 0;
-}
diff --git a/omf-install/.cvsignore b/omf-install/.cvsignore
deleted file mode 100644
index 9bd332edc9..0000000000
--- a/omf-install/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-*.omf
diff --git a/omf-install/Makefile.am b/omf-install/Makefile.am
deleted file mode 100644
index 31617e3c3e..0000000000
--- a/omf-install/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-omf_dest_dir=$(datadir)/omf/evolution
-scrollkeeper_localstate_dir = $(SCROLLKEEPER_LOCALSTATE_DIR)
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
- -for file in $(srcdir)/*.omf; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(omf_dest_dir); \
- done
- -scrollkeeper-update -p $(scrollkeeper_localstate_dir)
-
-uninstall-local:
- -for file in $(srcdir)/*.omf; do \
- basefile=`basename $$file`; \
- rm -f $(omf_dest_dir)/$$basefile; \
- done
- -rmdir $(omf_dest_dir)
- -scrollkeeper-update -p $(scrollkeeper_localstate_dir)
diff --git a/po/.cvsignore b/po/.cvsignore
deleted file mode 100644
index c2a0771f2e..0000000000
--- a/po/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.gmo
-*.mo
-Makefile
-Makefile.in
-Makefile.in.in
-POTFILES
-cat-id-tbl.c
-stamp-cat-id
-evolution.pot
-messages
diff --git a/po/ChangeLog b/po/ChangeLog
deleted file mode 100644
index 473fcee614..0000000000
--- a/po/ChangeLog
+++ /dev/null
@@ -1,2856 +0,0 @@
-2001-10-01 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.39.
-
-2001-10-01 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.39.
-
-2001-10-01 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.39.
-
-2001-10-02 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-10-01 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2001-10-01 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2001-09-30 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2001-09-29 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation from
- Jacobo Tarrio Barreiro <jtarrio@trasno.net>
-
-2001-09-29 Carlos Perell Marn <carlos@gnome-db.org>
-
- * es.po: Fixed. /s/Salir/Existe/.
-
-2001-09-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-09-29 Carlos Perell Marn <carlos@gnome-db.org>
-
- * es.po: Fixed /s/M/2 Nombre/ where M is Middle in english. A better
- translation?.
-
-2001-09-29 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2001-09-28 Dan Winship <danw@ximian.com>
-
- * de.po: Fix a printf-format bug in the translation of the "On
- DATE, PERSON wrote" string, noted on the evolution list.
-
-2001-09-28 Takuo KITAME <kitame@debian.org>
-
- * ja.po: Updated Japanese translation.
-
-2001-09-27 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-26 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation
-
-2001-09-24 Damon Chaplin <damon@ximian.com>
-
- * POTFILES.in: added calendar/cal-util/cal-util.c
-
-2001-09-26 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-09-25 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-09-24 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2001-09-24 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-24 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation with contributions from
- Jean-Nol Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-09-23 Carlos Perell Marn <carlos@gnome-db.org>
-
- * es.po: /s/Algn nuve/Algunas nuves/
-
-2001-09-23 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-09-22 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-09-22 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
- * POTFILES.in: Added camel/camel-vee-store.c and camel/camel-folder.c
-
-2001-09-21 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-19 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: reflect file additions/removals
-
-2001-09-18 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-18 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-16 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-09-16 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-16 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2001-09-15 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-09-15 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-14 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation + terminology fixes.
-
-2001-09-14 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-13 Pavel Cholakov <pavel@linux.zonebg.com>
-
- * bg.po: Bulgarian translation by Nikolay Hristov <geroy@stemo.bg>.
-
-2001-09-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-09-12 Abel Cheung <maddog@linux.org.hk>
-
- * tr.po: Modified line 3884, argument format error.
- * ro.po: Ditto, for line 3847,3852,5260,6389. Added missing
- header.
-
-2001-09-11 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-11 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-10 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * ga.po: Updated Irish file
-
-2001-09-10 Yukihiro Nakai <nakai@gnome.gr.jp>
-
- * ja.po: Update Japanese translation.
-
-2001-09-09 Abel Cheung <maddog@linux.org.hk>
-
- * zh_TW.po: New traditional Chinese translation from
- Joe Man <trmetal@yahoo.com.hk>.
-
-2001-09-09 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated German translation.
-
-2001-09-08 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation with contributions from
- Jean-Nol Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-09-07 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-09-06 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-09-06 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-09-05 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2001-09-05 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation + terminology fixes.
-
-2001-09-04 Carlos Perell Marn <carlos@gnome-db.org>
-
- * es.po: Spell check.
-
-2001-09-04 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-09-03 Federico Mena Quintero <federico@ximian.com>
-
- * POTFILES.in: Removed addressbook/gui/widgets/alphabet.glade.
-
-2001-09-03 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-09-02 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-09-02 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation from contribution of
- Jean-Nol Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-09-01 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-31 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-08-31 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation from contribution of
- Jean-Nol Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-08-30 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-08-28 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation from contribution of
- Jean-Nol Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-08-27 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-27 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-27 Zbigniew Chyla <cyba@gnome.pl>
-
- * POTFILES.in: Added shell/glade/evolution-startup-wizard.glade
-
-2001-08-26 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation from contribution of
- Jean-Nol Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>.
-
-2001-08-26 Zbigniew Chyla <cyba@gnome.pl>
-
- * POTFILES.in: Added addressbook/gui/widgets/e-addressbook-model.c
-
- * pl.po: Updated Polish translation.
-
-2001-08-24 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2001-08-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-24 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-08-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Fixes to the Swedish translation.
-
-2001-08-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-23 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-22 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.38.
-
-2001-08-22 gettextize <bug-gnu-utils@gnu.org>
-
- * Makefile.in.in: Upgrade to gettext-0.10.38.
-
-2001-08-22 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-08-21 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation a bit...
-
-2001-08-21 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-08-19 Damon Chaplin <damon@ximian.com>
-
- * en_GB.po: changed all %m/%d/%Y date formats to %d/%m/%Y.
-
-2001-08-20 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-19 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-08-17 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-08-17 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: Updated with missing files.
-
-2001-08-16 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-16 Marius Andreiana <mandreiana@yahoo.com>
-
- * ro.po: updated
-
-2001-08-14 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-08-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-08-14 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-08-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-13 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-12 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-08-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Added more missing files.
- * no.po: Updated accordingly.
-
-2001-05-08 Sami Pesonen <spesonen@dlc.fi>
- * fi.po: Updated Finnish translation by
- Jarkko Ranta <jjranta@cc.joensuu.fi>
-
-2001-08-11 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation. Also thanks to
- Mikael Hallendal for reporting a problem with the
- translation.
-
-2001-08-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Added more missing files.
- * no.po: Updated accordingly.
-
-2001-08-11 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-08-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
- * POTFILES.in: Updated.
-
-2001-08-10 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-08-09 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation. Thanks to
- Richard Hult <richard.hult@telia.com> for pointing out a
- problem with the translation.
-
-2001-08-09 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-08 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2001-08-06 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation. Thanks to
- Richard Hult <richard.hult@telia.com> for pointing out a
- problem with the translation.
-
-2001-08-05 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-04 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-08-03 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-08-03 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-08-02 Zbigniew Chyla <cyba@gnome.pl>
-
- * POTFILES.in: Added:
- addressbook/gui/contact-editor/e-contact-save-as.c
- calendar/gui/cal-search-bar.c
- calendar/pcs/query.c
- e-util/e-categories-config.c.
-
-2001-08-01 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-08-01 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-07-31 Ettore Perazzoli <ettore@ximian.com>
-
- * Updated all the .po's for the release.
-
-2001-07-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokml) translation.
-
-2001-07-30 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-30 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated German translation.
-
-2001-07-30 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-27 Damon Chaplin <damon@ximian.com>
-
- * es.po: changed strftime format translation from "%A %b de %B" to
- "%A %d de %B". It was showing the abbreviated month name instead of
- the day number.
-
-2001-07-27 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-24 Jason Leach <jleach@ximian.com>
-
- * POTFILES.in: Add shell/e-local-storage.c so "Local Folders" can
- get translated. Fixes #5385.
-
-2001-07-25 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-24 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-07-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-21 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-20 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-07-20 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-18 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-07-18 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-13 Carlos Perell Marn <carlos@gnome-db.org>
-
- * es.po: Some QA.
-
-2001-07-13 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-07-13 Kjartan Maraas <kmaraas@gnome.org>
-
- * nn.po: Updated Norwegian (nynorsk) translation.
-
-2001-07-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updating again.
-
-2001-07-13 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-07-13 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: And again. Trying to keep the translation up-to-date with
- the changes in cvs.
-
-2001-07-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation again. Hi ho.
-
-2001-07-12 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-07-12 Carlos Perell Marn <carlos@gnome-db.org>
-
- * es.po: /s/_Acciones/A_cciones
-
-2001-07-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-12 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-11 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-07-11 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-07-11 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-07-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-07-10 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-10 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Huge update to German translation.
-
-2001-07-10 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-07-10 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-10 Marius Andreiana <mandreiana@yahoo.com>
-
- * ro.po: added (thanks to Tiberiu Micu <tibimicu@gmx.net>)
-
-2001-07-10 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-09 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-09 Zbigniew Chyla <cyba@gnome.pl>
-
- * POTFILES.in: Added files:
- calendar/gui/dialogs/meeting-page.glade
- shell/glade/e-active-connection-dialog.glade
- Sorted everything.
-
- * pl.po: Updated Polish translation.
-
-2001-07-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: Huge update.
-
-2001-07-08 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-08 Zbigniew Chyla <cyba@gnome.pl>
-
- * POTFILES.in: Added:
- addressbook/gui/contact-list-editor/contact-list-editor.glade,
- addressbook/gui/contact-list-editor/e-contact-list-editor.c,
- calendar/gui/dialogs/alarm-options.c,
- calendar/gui/dialogs/alarm-options.glade,
- calendar/gui/dialogs/e-timezone-dialog.glade,
- mail/mail-folder-cache.c,
- my-evolution/my-evolution.glade
-
-2001-07-08 Hector Garcia Alvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-07-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-07 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation
- by Grkem.
-
-2001-07-06 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-07-05 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-03 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-07-02 Ettore Perazzoli <ettore@ximian.com>
-
- * sl.po: Add a missing double quote.
-
-2001-07-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Added widgets/misc/e-charset-picker.c
-
-2001-07-02 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-06-30 Zbigniew Chyla <cyba@gnome.pl>
-
- * POTFILES.in:
- Added addressbook/gui/component/e-address-popup.c,
- my-evolution/e-summary-mail.c, my-evolution/e-summary-rdf.c,
- my-evolution/e-summary-weather.c.
-
-2001-06-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Updated to reflect reality.
- * no.po: Updated Norwegian translation.
-
-2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed ui/evolution-mail.xml and replaced it with
- the 4 new evolution-mail*.xml files.
-
-2001-06-26 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-06-25 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-06-24 Chris Toshok <toshok@ximian.com>
-
- * POTFILES.in: add ui/evolution-contact-list-editor.xml, and
- correct path to the contact-editor files (to
- addressbook/gui/contact-editor)
-
-2001-06-24 Federico Mena Quintero <federico@ximian.com>
-
- * POTFILES.in: Shuffled the alarm-notify files a bit.
-
-2001-06-22 Zbigniew Chyla <chyla@gnome.pl>
-
- * POTFILES.in: Added mail/message-list.etspec.
-
-2001-06-20 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-06-20 Almer S. Tigelaar <almer@gnome.org>
-
- For Mendel Mobach <mendel@mobach.nl> :
-
- * nl.po: Updated Dutch translation.
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: remove dead file
-
-2001-06-19 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: remove dead file
-
-2001-06-19 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-06-18 Hctor Garca lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-06-18 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2001-06-18 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove more dead files
-
-2001-06-18 Ettore Perazzoli <ettore@ximian.com>
-
- * POTFILES.in: Remove `calendar/gui/calendar-summary.c' which
- doesn't get distributed anymore.
-
-2001-06-15 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation from
- Manuel A. Fernndez Montecelo <manuel@sindominio.net>
-
-2001-06-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-06-12 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-06-12 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-06-11 Damon Chaplin <damon@ximian.com>
-
- * de.po: fixed a few inconsistencies in the way times are translated.
- This caused problems parsing dates, making parts of the interface
- unusable.
-
-2001-06-11 Christopher James Lahey <clahey@ximian.com>
-
- * POTFILES.in: Added
- addressbook/gui/merging/e-card-duplicate-detected.glade and
- addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade
- here.
-
-2001-06-10 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-06-10 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-06-08 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-06-07 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-06-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-06-06 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-06-03 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-06-02 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation.
-
-2001-06-02 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-06-01 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Update list of files
-
-2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Added camel-cms-context.c
-
-2001-05-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-05-28 Andras Timar <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation
-
-2001-05-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-05-26 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * az.po: Updated Azeri file
-
-2001-05-25 Christopher James Lahey <clahey@ximian.com>
-
- * POTFILES.in: Added shell/e-storage-set-view.etspec.
-
-2001-05-23 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation
-
-2001-05-22 Andr T <timar@gnome.hu>
-
- * hu.po: Updated Hungarian translation
-
-2001-05-21 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-05-21 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * nn.po: removed 3 old entries not in utf-8
-
-2001-05-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Updated.
- * no.po: Updated Norwegian translation.
-
-2001-05-21 Szabolcs Ban <shooby@gnome.hu>
-
- * hu.po: Updated Hungarian translation by
- Andras Timar <timar@gnome.hu>
-
-2001-05-19 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated German translation.
-
-2001-05-19 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-05-16 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove importers/evolution-gnomecard-importer.c
-
-2001-05-16 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove camel/camel-pkcs7-context.c
-
-2001-05-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-05-15 Chris Toshok <toshok@ximian.com>
-
- * POTFILES.in: e-minicard-view-model.c ->
- e-addressbook-reflow-adapter.c
-
-2001-05-15 Szabolcs Ban <shooby@gnome.hu>
-
- * hu.po: Updated Hungarian translation by
- Andras Timar <timar@gnome.hu>
-
-2001-05-15 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-05-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-05-12 Gediminas Paulauskas <menesis@delfi.lt>
-
- * po/POTFILES.in: update with new/moved files.
-
-2001-05-10 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-05-08 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-05-08 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-05-07 Gediminas Paulauskas <menesis@delfi.lt>
-
- * POTFILES.in: add mail/mail-search.c
-
-2001-05-05 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2001-05-05 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-05-03 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated German translation
-
-2001-05-02 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * az.po: Updated Azeri file
-
-2001-04-29 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-04-28 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-04-28 Peter Williams <peterw@ximian.com>
-
- * POTFILES.in: Reflect Danw's move of mail/session.c to
- mail/mail-session.c
-
-2001-04-27 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-04-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation again.
-
-2001-04-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-04-25 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: Major overhaul.
-
-2001-04-25 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-04-24 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-04-24 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-04-24 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation
- by Gkem Cetin.
-
-2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Added mail/message-browser.c and removed
- mail/mail-view.c
-
-2001-04-23 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-04-23 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Updated.
-
-2001-04-23 Szabolcs Ban <shooby@gnome.hu>
-
- * hu.po: Updated translation by Andras Timar <timar@gnome.hu>
-
-2001-04-21 Almer S. Tigelaar <almer@gnome.org>
-
- For Dirk-Jan C. Binnema <dirkjan@gnome.org> :
-
- * nl.po: Updated Dutch translation
-
-2001-04-20 Szabolcs Ban <shooby@gnome.hu>
-
- * hu.po: Updated translation by Andras Timar <timar@gnome.hu>
-
-2001-04-20 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updates from Clara Tattoni <clara.tattoni@libero.it>
-
-2001-04-20 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-04-18 Richard Hult <rhult@codefactory.se>
-
- * nl.po: Fixed two fatal errors.
-
-2001-04-18 Almer S. Tigelaar <almer@gnome.org>
-
- For Dirk-Jan C. Binnema <dirkjan@gnome.org> :
-
- * nl.po: Updated Dutch translation.
-
-2001-04-18 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-04-17 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-04-17 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-04-17 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-04-15 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed openpgp-utils.c and added the camel-pgp-*.c
- files. Added camel-cipher-context.c also.
-
-2001-04-12 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-04-12 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-04-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Fixed Swedish translation. Thanks to Gan Uddeborg
- <goeran@uddeborg.pp.se>.
-
-2001-04-12 Mikael Hallendal <micke@codefactory.se>
-
- * fi.po: Removed a trailing 'k' making an error while compiling.
-
-2001-04-11 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-04-11 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-04-11 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Commit to be sure.
-
-2001-04-11 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation.
-
-2001-04-11 Christopher James Lahey <clahey@ximian.com>
-
- * POTFILES.in: Add the galview.xml files here.
-
-2001-04-08 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2001-04-04 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation
- by Gkem.
-
-2001-04-01 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Another Finnish update.
-
-2001-03-29 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-03-29 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-03-25 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-03-25 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation
- by Gkem.
-
-2001-03-22 Dan Winship <danw@ximian.com>
-
- * az.po: Change \" to ' in translations for .oaf files, since
- various bugs conspire to prevent double quotes from working there
- currently.
-
-2001-03-23 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-03-21 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-03-20 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * az.po: Updated Azeri file
-
-2001-03-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2001-03-19 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-03-18 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Small update by Gkem Cetin.
-
-2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed filter-system-flag.c.
-
-2001-03-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2001-03-15 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Update.
-
-2001-03-15 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-03-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2001-03-15 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * az.po: Added Azeri file
- * {es,fi,fr,ga,hu,nl,nn,no,sk,sl,sv}.po: corrected headers
- and/or syntax errrors
-
-2001-03-15 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-03-14 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2001-03-13 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
- * POTFILES.in: Updated with a bunch of missing files.
-
-2001-03-12 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-03-11 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-03-11 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-03-10 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed mail-vtrash.c
-
-2001-03-08 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Committed updated Turkish translation by Gkem Cetin.
-
-2001-03-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
- * POTFILES.in: Updated with a bunch of missing files.
-
-2001-03-05 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: update
-
-2001-03-04 Damon Chaplin <damon@ximian.com>
-
- * POTFILES.in: added e-util/e-time-utils.c and
- widgets/misc/e-cell-date-edit.c
-
-2001-03-02 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-03-01 Dan Winship <danw@ximian.com>
-
- * POTFILES.in: remove camel-imap-auth.c, add sasl stuff
-
-2001-02-27 JP Rosevear <jpr@ximian.com>
-
- * da.po: Correct a couple errors
-
-2001-02-25 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2001-02-24 Almer S. Tigelaar <almer@gnome.org>
-
- * nl.po: Updated Dutch translation.
-
-2001-02-24 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-02-24 Michael Meeks <michael@ximian.com>
-
- * POTFILES.in: remove stale calender oaf.in file
-
-2001-02-21 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-02-22 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2001-02-22 Gediminas Paulauskas <menesis@delfi.lt>
-
- * POTFILES.in: Removed references to camel-vee-*.c
-
-2001-02-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: Removed references to mail-threads.c
-
-2001-02-19 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-02-16 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-02-16 Matthias Warkus <mawarkus@gnome.org>
-
- * de.po: Update.
-
-2001-02-16 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-02-16 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2001-02-14 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-02-13 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation.
-
-2001-02-13 JP Rosevear <jpr@ximian.com>
-
- * POTFILES.in: Remove dead glade file that was not being disted
-
-2001-02-13 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: Added *.oaf.in files.
-
-2001-02-11 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-02-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * POTFILES.in: removed e-contact-editor-strings.h
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- * *.po: added strings from .desktop files, they are translated here
- because we use xml-i18n-tools.
- * POTFILES.in: added these *.desktop files, missing *.glade files,
- removed *.glade.h and similar files.
- * POTFILES.skip: removed all *.glade.h entries - they do not exist
- anymore.
-
-2001-02-10 Fatih Demir <kabalak@gtranslator.org>
-
- * tr.po: Took over the stable tr.po also to HEAD.
-
-2001-02-09 Anders Carlsson <andersca@codefactory.se>
-
- * sl.po: Add \n to fix a compile error.
-
-2001-02-09 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation.
-
-2001-02-09 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Updated Slovak translation.
-
-2001-02-09 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-02-08 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-02-07 Fatih Demir <kabalak@kabalak.net>
-
- * tr.po: Committed updated Turkish translation by
- Gkem Cetin.
-
-2001-02-07 Christopher R. Gabriel <cgabriel@bug.rulez.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2001-02-06 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-02-02 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-31 Szabolcs Ban <shooby@gnome.hu>
-
- * hu.po: Terminology fixes by Andras Timar <timar@gnome.hu>
-
-2001-01-30 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2001-01-29 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * sk.po: Added initial Slovak translation.
-
-2001-01-29 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-27 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-27 Julian Missig <julian@jabber.org>
-
- * POTFILES.in: Someone forgot to update this when removing a file it
- uses. This was preventing evolution from compiling...
-
-2001-01-26 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * pt_BR.po: Updated brazilian portuguese translation
-
-2001-01-26 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-26 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-24 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-24 Szabolcs Ban <shooby@gnome.hu>
-
- * hu.po: Tons of fixes by Andras and Emese (spelling,
- terminology, headers)
-
-2001-01-23 Martin Norbk <d95mback@dtek.chalmers.se>
-
- * sv.po: Updated Swedish translation.
-
-2001-01-23 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-22 Dan Winship <danw@ximian.com>
-
- * POTFILES.in: Update for filter code moves
-
-2001-01-19 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-01-19 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-18 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
- * update.sh: Removed old script.
-
-2001-01-17 Dave Camp <dave@ximian.com>
-
- * POTFILES.in: Removed addressbook/gui/widgets/test-minicard-view.c,
- camel/providers/local/camel-mbox-provider.c,
- notes/component-factory.c, notes/main.c, and
- calendar/gui/gnome-month-item.c, and calendar/gui/alarm-notify.c.
-
-2001-01-17 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-16 Martin Norbk <d95mback@dtek.chalmers.se>
-
- * sv.po: Updated Swedish translation, using xml-i18n-update.
-
-2001-01.16 Kenneth Christiansen <kenneth@gnu.org>
-
- * POTFILES.(in|skip): Updated after consulting Michael.
-
-2001-01-16 Martin Norbk <d95mback@dtek.chalmers.se>
-
- * sv.po: Updated Swedish translation, using xml-i18n-update.
-
-2001-01-16 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2001-01-15 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-15 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2001-01-15 Richard Hult <rhult@codefactory.se>
-
- * sv.po: Updated Swedish translation.
-
-2001-01-11 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-11 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2001-01-10 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * POTFILES.in: Added all the new source files and removed the old
- ones, yadda yadda.
-
-2001-01-09 Federico Mena Quintero <federico@helixcode.com>
-
- * POTFILES.in: Removed .oaf.in files until the whole of Evolution
- uses the xml-i18n-tools framework.
-
-2001-01-09 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-09 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2001-01-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2001-01-07 Benedikt Roth <Benedikt.Roth@gmx.net>
-
- * de.po: Updated German translation
-
-2001-01-07 Christophe Merlet <redfox@eikonex.org>
-
- * fr.po: Updated French translation.
-
-2001-01-06 Fatih Demir <kabalak@gmx.net>
-
- * ko.po: Committed updated Korean translation.
-
-2001-01-06 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2001-01-04 JP Rosevear <jpr@helixcode.com>
-
- * POTFILES.in: Remove non-existent file
-
-2001-01-03 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2001-01-03 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2001-01-02 Chris Toshok <toshok@helixcode.com>
-
- * POTFILES.in: add addressbook-config.c, addressbook-storage.c,
- and addressbook-config.glade.
-
-2001-01-01 Michael Meeks <michael@helixcode.com>
-
- * POTFILES.in: remove all the stale addressbook entries.
-
-2000-12-27 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-25 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-12-23 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-12-23 JP Rosevear <jpr@helixcode.com>
-
- * POTFILES.in: Remove deleted file
-
-2000-12-22 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-12-22 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-21 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-12-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-12-18 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-12-18 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-18 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-12-18 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2000-12-15 Federico Mena Quintero <federico@helixcode.com>
-
- * POTFILES.in: Removed getdate.y.
-
- * POTFILES.ignore: Ditto.
-
-2000-12-15 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-14 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-12-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
- * POTFILES.in: This too.
- * .potignore: Adjust to fit the new tools.
-
-2000-12-14 Christian Rose <menthos@menthos.com>
-
- * sv.po: Added Id tag to easier trace changes.
-
-2000-12-13 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * POTFILES.in: Update for reality. (Mostly from campd.)
-
-2000-12-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-12-11 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2000-12-06 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: updated italian translation from
- Clara Tattoni <clara.tattoni@libero.it>
-
-2000-12-05 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2000-12-04 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-12-03 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-12-03 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-12-02 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Updated Dutch translation.
-
-2000-12-01 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-30 Zbigniew Chyla <chyla@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2000-11-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2000-11-30 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-29 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-11-28 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-26 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Updated Dutch translation.
-
-2000-11-26 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2000-11-24 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-21 Federico Mena Quintero <federico@helixcode.com>
-
- * POTFILES.in: Removed gncal-todo.c.
-
-2000-11-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * POTFILES.in: Removed mail/message-thread.c and added
- camel/camel-folder-thread.c
-
-2000-11-20 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-11-19 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Updated Dutch translation.
-
-2000-11-18 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-17 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-11-17 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-17 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-16 Matthias Warkus <mawa@iname.com>
-
- * de.po: Major update.
-
-2000-11-14 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2000-11-14 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-06 Michael Meeks <michael@helixcode.com>
-
- * update.pl (GenHeaders, GeneratePot): Kill abortive
- glade file translation code. It can't cope with line
- breaks in the node content!
-
-2000-11-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-11-08 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-08 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-11-08 Akira Tagoh <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2000-11-07 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-06 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: Updated Spanish translation.
-
-2000-11-06 Dan Winship <danw@helixcode.com>
-
- * POTFILES.in: Remove mail-local-storage.c
-
-2000-11-06 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-05 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation.
-
-2000-11-05 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-05 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-05 Michael Meeks <michael@helixcode.com>
-
- * POTFILES.in: update all of ui/*.h to ui/*.xml
-
- * Makefile.i18npatch: sort out the xml bits.
-
- * ui-extract.pl: add from Kenneth.
-
- * update.pl: Update to the version in bonobo.
-
-2000-11-04 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2000-11-04 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-11-03 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-02 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-11-02 Christopher James Lahey <clahey@helixcode.com>
-
- * fi.po: Fixed a missing ".
-
-2000-11-02 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2000-11-02 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-11-01 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Updated Lithuanian translation.
-
-2000-11-01 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * ca.po: Updated Catalan file
-
-2000-10-31 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2000-10-31 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-10-31 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Updated Dutch translation.
-
-2000-10-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: updated this.
- * no.po: Updated this too.
-
-2000-10-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2000-10-30 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-10-30 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: more updates from Clara Tattoni <clara.tattoni@libero.it>
-
-2000-10-30 Federico Mena Quintero <federico@helixcode.com>
-
- * pl.po: Removed spurious character that kept it from building.
-
-2000-10-30 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2000-10-29 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated Italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2000-10-29 Zbigniew Chyla <cyba@gnome.pl>
-
- * pl.po: Updated Polish translation.
-
-2000-10-29 Matthias Warkus <mawa@iname.com>
-
- * de.po: Update.
-
-2000-10-28 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * ca.po: Added Catalan file
-
-2000-10-26 Joaquim Fellmann <joaquim@mail.dotcom.fr>
-
- * fr.po: Updated French translation.
-
-2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian (bokm) translation.
-
-2000-10-26 Matthias Warkus <mawa@iname.com>
-
- * de.po: Huge update. Still not all of the "Could/Cannot" stuff
- fixed to correct "...konnte nicht...werden" translation.
-
-2000-10-26 Joaquim Fellmann <joaquim@mail.dotcom.fr>
-
- * fr.po: Updated French translation.
-
-2000-10-25 Christopher R. Gabriel <cgabriel@softwarelibero.org>
-
- * it.po: Updated Italian translation from Clara Tattoni
- <clara.tattoni@libero.it>
-
-2000-10-25 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2000-10-25 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2000-10-24 Dan Winship <danw@helixcode.com>
-
- * POTFILES.in: Add lots of camel and filter files.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * POTFILES.in: Remove removed composer files
-
-2000-10-22 Robert Brady <rwb197@zepler.org>
-
- * en_GB.po: Added British translation.
-
-2000-10-20 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2000-10-19 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-10-19 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2000-10-19 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-10-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Updated for the upcoming release.
- * no.po: Same here.
-
-2000-10-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * nn.po: Added Norwegian (nynorsk) translation.
- * no.po: Updated Norwegian (bokm) translation.
-
-2000-10-14 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Updated Dutch translation.
-
-2000-10-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Added ui/*.h
-
-2000-10-14 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-10-13 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-10-13 Matthias Warkus <mawa@iname.com>
-
- * de.po: Updated.
-
-2000-10-10 Gediminas Paulauskas <menesis@delfi.lt>
-
- * lt.po: Added Lithuanian translation.
-
-2000-10-10 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
-
-2000-10-10 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-10-08 Htor Garc Alvarez <hector@scouts-es.org>
-
- * es.po: updated Spanish translation.
-
-2000-10-08 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-10-08 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation.
-
-2000-10-08 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-10-06 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Minors french translation updates.
-
-2000-10-06 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-10-05 Htor Garc Alvarez <hector@scouts-es.org>
-
- * es.po: updated Spanish translation.
-
-2000-10-04 Htor Garc Alvarez <hector@scouts-es.org>
-
- * es.po: updated Spanish translation.
-
-2000-10-04 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-10-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-10-03 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: updated Spanish translation.
-
-2000-10-02 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: updated French translation.
-
-2000-10-02 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-10-01 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-09-29 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-09-28 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-09-28 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-09-27 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-09-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Completed the Swedish translation.
-
-2000-09-25 Christophe Merlet <christophe@merlet.net>
-
- * POTFILES.in: Reverted somes changes. Oups :(
-
-2000-09-25 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Updated Finnish translation.
-
-2000-09-25 Christophe Merlet <christophe@merlet.net>
-
- * fr.po: Updated French translation.
- * POTFILES.in: Updated files list
-
-2000-09-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-20 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-09-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * POTFILES.in: Removed files that have been moved to gal.
-
-2000-09-16 Ettore Perazzoli <ettore@helixcode.com>
-
- * POTFILES.in: `alphabet.glade.h' is now in
- `addressbook/gui/widgets'.
-
-2000-09-14 Michael Meeks <michael@helixcode.com>
-
- * POTFILES.in: s/minicard/widgets/
-
-2000-09-12 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: corrected some mistakes
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * POTFILES.in: Removed some files that are not there anymore.
-
-2000-09-12 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2000-09-12 Richard Hult <rhult@codefactory.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-09-12 Jarkko Ranta <jjranta@cc.joensuu.fi>
-
- * fi.po: Added Finnish translation.
-
-2000-09-12 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-09-11 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-10 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Made a small correction to dutch translation.
-
-2000-09-10 Almer S. Tigelaar <almer1@dds.nl>
-
- * nl.po: Update Dutch translation.
-
-2000-09-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-09 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2000-09-09 Kai Lahmann <kl@linuxfaqs.de>
-
- * nl.po: Updated dutch translation from Dennis Smit <synap@area101.penguin.nl>
-
-2000-09-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-04 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-09-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-01 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-09-29 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-08-29 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-29 Akira TAGOH <tagoh@gnome.gr.jp>
-
- * ja.po: Updated Japanese translation.
-
-2000-08-27 Joaquim Fellmann <joaquim@hrnet.fr>
-
- * fr.po: Updated French translation.
-
-2000-08-27 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-26 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation.
-
-2000-08-25 Christopher James Lahey <clahey@helixcode.com>
-
- * POTFILES.in: Remove add addressbook/demo files from this.
-
-2000-08-25 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-23 Richard Hult <rhult@hem.passagen.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-08-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-08-19 Matthias Warkus <mawa@iname.com>
-
- * de.po: Updated.
-
-2000-08-19 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
- * POTFILES.in: Added missing files that are in the build.
-
-2000-08-17 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-17 Kai Lahmann <kl@linuxfaqs.de>
-
- * de.po: Updated German translation
-
-2000-08-16 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-13 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
- * POTFILES.in: Added missing files that are in the build.
-
-2000-08-12 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
- * POTFILES.in: Added missing files that are in the build. Sorted in alphabet order
-
-
-2000-08-11 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-10 Akira TAGOH <at@ue-spacy.com>
-
- * ja.po: Updated Japanese translation.
-
-2000-08-08 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-07 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Added missing files that are in the build.
- * no.po: Updated Norwegian translation.
-
-2000-08-07 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-08-05 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-08-04 Szabolcs BAN <shooby@gnome.hu>
-
- * hu.po: Updated Hungarian translations.
-
-2000-08-03 Alastair McKinstry <mckinstry@computer.org>
-
- * ga.po: Add Irish translation.
-
-2000-08-02 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * es.po,hu.po,it.po,sl.po: various syntax checkings (missing %s, %S
- instead of %s etc)
-
-2000-07-30 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-07-28 Szabolcs BAN <shooby@gnome.hu>
-
- * hu.po: Updated Hungarian translations.
-
-2000-07-27 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-07-27 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-07-26 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-07-24 Matthias Warkus <mawa@iname.com>
-
- * de.po: Updated German translation.
-
-2000-07-24 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-07-24 Szabolcs BAN <shooby@gnome.hu>
-
- * hu.po: updated Hungarian translations...
-
-2000-07-24 Federico Mena Quintero <federico@helixcode.com>
-
- * it.po: Added missing \n.
-
-2000-07-23 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-07-23 Ettore Perazzoli <ettore@helixcode.com>
-
- * it.po: Updated Italian translation from Clara Tattoni
- <clara.tattoni@libero.it>.
-
-2000-07-21 Szabolcs BAN <shooby@gnome.hu>
-
- * hu.po: updated Hungarian translations...
-
-2000-07-21 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Fixed an error.
-
-2000-07-19 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-07-16 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation.
-
-2000-07-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-07-16 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-07-15 Matthias Warkus <mawa@iname.com>
-
- * de.po: Updated. Should be complete and pretty usable.
-
-2000-07-13 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-07-13 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-07-10 Federico Mena Quintero <federico@helixcode.com>
-
- * POTFILES.in: Removed several calendar/gui files that are no
- longer there.
-
-2000-07-09 Federico Mena Quintero <federico@helixcode.com>
-
- * POTFILES.in: Removed calendar/gui/evolution-calendar-control.c
-
-2000-07-09 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-07-09 Matthias Warkus <mawa@iname.com>
-
- * de.po: Rough cut at a complete German translation. Still needs a
- lot of love.
-
-2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
-
- * POTFILES.in: Removed `e-select-names.c' and
- `select-name.glade.h' which were removed by Chris' commit.
-
-2000-06-30 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-29 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-28 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Added a load of missing files.
- * no.po: Updated Norwegian translation.
-
-2000-06-27 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-24 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-21 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-06-20 Jesus Bravo Alvarez <jba@pobox.com>
-
- * pt.po: Updated Portuguese translation from
- Tiago Antao <tiagoantao@bigfoot.com>
-
-2000-06-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * it.po: Italian translation from Clara Tattoni
- <clara.tattoni@libero.it>.
-
-2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * POTFILES.in: why the heck was
- camel/providers/imap/imap.c listed? Oh well, 'tis
- removed now...
-
-2000-06-17 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-06-13 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-11 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-11 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-06-10 Zbigniew Chyla <chyla@buy.pl>
-
- * pl.po: Added Polish translation.
-
-2000-06-10 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-06-09 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-06-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Updated Norwegian translation.
-
-2000-06-06 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Finished it [ what about the caveat message?
- Translating it is much fun ;) ].
-
-2000-06-05 Kenneth Christiansen <kenneth@gnu.org>
-
- * README.tools: Added readme file, which explains the
- use of the newly checked in po tools.
-
- hmm, looking forward to tomorrow...viva los compleas!
- :)
-
-2000-06-05 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: A quick-update ( not fully finished ).
-
-2000-06-04 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-06-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * it.po: New. Just a skeleton.
-
- * de.po: New, from Kai Lahmann <kl@linuxfaqs.de>.
-
- * POTFILES.in: Updated.
-
-2000-06-04 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-06-03 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-06-02 Jesus Bravo Alvarez <jba@pobox.com>
-
- * pt.po: Added Portuguese translation from
- Tiago Antao <tiagoantao@bigfoot.com>
-
-2000-06-01 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-05-28 Fatih Demir <kabalak@gmx.net>
-
- * tr.po: Updated the Turkish translation.
-
-2000-05-28 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-05-27 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-05-26 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-23 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-23 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-05-22 Yukihiro Nakai <nakai@gnome.gr.jp>
-
- * ja.po: Update from Akira TAGOH.
-
-2000-05-18 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-18 Yukihiro Nakai <nakai@gnome.gr.jp>
-
- * ja.po: Update from Akira TAGOH.
-
-2000-05-14 Valek Filippov <frob@df.ru>
-
- * ru.po: updated russian translation.
-
-2000-05-14 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-05-13 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-05-13 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-13 Valek Filippov <frob@df.ru>
-
- * POTFILES.in: added *.glade.h and *-strings.h files.
- * ru.po: updated russian translation.
-
-2000-05-12 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-05-12 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * POTFILES.in: Removed mail/mail-component.c.
-
-2000-05-09 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
- * update.sh: Updated.
-
-2000-05-08 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * New update.sh script from Kenneth.
-
-2000-05-08 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-05-08 Htor Garc lvarez <hector@scouts-es.org>
-
- * es.po: added translation to spanish.
-
-2000-05-07 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-07 Ettore Perazzoli <ettore@helixcode.com>
-
- * POTFILES.in: Remove `shell/e-shell-shortcut.c'.
-
-2000-05-05 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Updated Galician translation.
-
-2000-05-04 Fatih Demir <kabalak@gmx.net>
-
- * tr.po : Updated the Turkish translation .
-
-2000-05-03 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-05-03 Valek Filippov <frob@df.ru>
-
- * ru.po: updated.
-
-2000-05-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * POTFILES.in: Removed `shell/e-service.c'.
-
-2000-05-02 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-05-01 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-04-30 Arjan Scherpenisse <acscherp@wins.uva.nl>
-
- * nl.po: Added Dutch translation
-
-2000-04-25 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-04-21 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-04-20 Fatih Demir <kabalak@gmx.net>
-
- * tr.po : Added the Turkish translation .
-
-2000-04-20 Yukihiro Nakai <nakai@gnome.gr.jp>
-
- * ja.po: Initial Japanese translation from Akira Tagoh
-
-2000-04-19 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * da.po: Updated Danish file
-
-2000-04-19 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-04-18 Vincent Renardias <vincent@redhat.com>
-
- * fr.po: creation.
-
-2000-04-18 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-04-15 Valek Filippov <frob@df.ru>
-
- * ru.po: Updated russian translation.
-
-2000-04-15 Ettore Perazzoli <ettore@helixcode.com>
-
- * POTFILES.in: Removed `libversit/vcc.c' as its auto-generated and
- breaks.
-
-2000-04-12 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * da.po: Updated Danish file
-
-2000-04-10 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Updated Norwegian translation.
-
-2000-04-08 Jesus Bravo Alvarez <jba@pobox.com>
-
- * gl.po: Added Galician translation.
-
-2000-04-07 Yuri Syrota <rasta@renome.rovno.ua>
-
- * uk.po: Updated Ukrainian translation.
-
-2000-04-06 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-04-04 Spiros Papadimitriou <spapadim+@cs.cmu.edu>
-
- * el.po: Added Greek translation.
-
-2000-04-04 Kjartan Maraas <kmaraas@online.no>
-
- * da.po: Added Danish translation from Kenneth Christiansen
- <kenneth@ripen.dk>.
- * no.po: Updated Norwegian translation.
- * ru.po: Added Russian translation from Valek Filippov
- <frob@df.ru>.
-
-2000-04-04 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-04-04 Yuri Syrota <rasta@renome.rovno.ua>
-
- * uk.po: Added Ukrainian translation.
-
-2000-04-03 Richard Hult <rhult@hem.passagen.se>
-
- * sv.po: Updated Swedish translation.
-
-2000-04-03 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * sv.po: Added Swedish translation.
-
-2000-04-01 Kjartan Maraas <kmaraas@online.no>
-
- * no.po: Added Norwegian translation.
-
-2000-04-01 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: Added evolution.pot.
-
-2000-03-27 Federico Mena Quintero <federico@helixcode.com>
-
- * POTFILES.in: Removed the calendar files for now.
-
-1998-07-23 Nuno Ferreira <nmrf@rnl.ist.utl.pt>
-
- * pt.po: Added Portuguese translation.
-
-1996-06-12 Tristan Tarrant <ttarrant@suntlc.etnoteam.it>
-
- * it.po : Italian translations added
diff --git a/po/Makefile.i18npatch b/po/Makefile.i18npatch
deleted file mode 100644
index 98837e85c2..0000000000
--- a/po/Makefile.i18npatch
+++ /dev/null
@@ -1,63 +0,0 @@
---- Makefile.in.in.clean Sat Oct 28 15:31:52 2000
-+++ Makefile.in.in Sat Oct 28 16:11:18 2000
-@@ -33,7 +33,9 @@
- GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
- MSGFMT = @MSGFMT@
- XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
--MSGMERGE = PATH=../src:$$PATH msgmerge
-+MSGMERGE = PATH=$(top_srcdir)/po:../src:$$PATH perl $(top_srcdir)/po/update.pl --dist
-+GENPOT = PATH=$(top_srcdir)/po:../src:$$PATH perl $(top_srcdir)/po/update.pl --pot
-+GENHEAD = PATH=$(top_srcdir)/po:../src:$$PATH perl $(top_srcdir)/po/update.pl --headers
-
- DEFS = @DEFS@
- CFLAGS = @CFLAGS@
-@@ -47,7 +49,7 @@
- POFILES = @POFILES@
- GMOFILES = @GMOFILES@
- DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
--stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
-+stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) update.pl ui-extract.pl
-
- POTFILES = \
-
-@@ -83,12 +85,7 @@
- all-no:
-
- $(srcdir)/$(PACKAGE).pot: $(POTFILES)
-- $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
-- --add-comments --keyword=_ --keyword=N_ \
-- --files-from=$(srcdir)/POTFILES.in \
-- && test ! -f $(PACKAGE).po \
-- || ( rm -f $(srcdir)/$(PACKAGE).pot \
-- && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
-+ $(GENPOT)
-
- $(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
- $(srcdir)/stamp-cat-id: $(PACKAGE).pot
-@@ -214,18 +211,21 @@
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
-- mv $$lang.po $$lang.old.po; \
-+ cp $$lang.po $$lang.old.po; \
- echo "$$lang:"; \
-- if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
-- rm -f $$lang.old.po; \
-+ if $(MSGMERGE) $$lang; then \
-+ rm -f $$lang.old.po; \
- else \
- echo "msgmerge for $$cat failed!"; \
-- rm -f $$lang.po; \
- mv $$lang.old.po $$lang.po; \
- fi; \
- done
-
--POTFILES: POTFILES.in
-+.headerlock:
-+ $(GENHEAD)
-+ touch .headerlock
-+
-+POTFILES: POTFILES.in .headerlock
- ( if test 'x$(srcdir)' != 'x.'; then \
- posrcprefix='$(top_srcdir)/'; \
- else \
diff --git a/po/POTFILES.in b/po/POTFILES.in
deleted file mode 100644
index 14859e3a35..0000000000
--- a/po/POTFILES.in
+++ /dev/null
@@ -1,328 +0,0 @@
-addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in
-addressbook/backend/ebook/e-card-simple.c
-addressbook/backend/ebook/e-card.c
-addressbook/backend/ebook/e-destination.c
-addressbook/backend/ebook/load-gnomecard-addressbook.c
-addressbook/backend/ebook/load-pine-addressbook.c
-addressbook/backend/ebook/test-client-list.c
-addressbook/backend/ebook/test-client.c
-addressbook/backend/pas/pas-backend-file.c
-addressbook/backend/pas/pas-backend-ldap.c
-addressbook/conduit/address-conduit.c
-addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
-addressbook/gui/component/addressbook-component.c
-addressbook/gui/component/addressbook-config.c
-addressbook/gui/component/addressbook-config.glade
-addressbook/gui/component/addressbook-factory.c
-addressbook/gui/component/addressbook-storage.c
-addressbook/gui/component/addressbook.c
-addressbook/gui/component/e-address-popup.c
-addressbook/gui/component/e-address-widget.c
-addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in
-addressbook/gui/component/select-names/e-select-names-popup.c
-addressbook/gui/component/select-names/e-select-names.c
-addressbook/gui/component/select-names/select-names.glade
-addressbook/gui/contact-editor/contact-editor.glade
-addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade
-addressbook/gui/contact-editor/e-contact-editor.c
-addressbook/gui/contact-editor/e-contact-quick-add.c
-addressbook/gui/contact-editor/e-contact-save-as.c
-addressbook/gui/contact-editor/fulladdr.glade
-addressbook/gui/contact-editor/fullname.glade
-addressbook/gui/contact-list-editor/contact-list-editor.glade
-addressbook/gui/contact-list-editor/e-contact-list-editor.c
-addressbook/gui/merging/e-card-duplicate-detected.glade
-addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade
-addressbook/gui/search/e-addressbook-search-dialog.c
-addressbook/gui/widgets/e-addressbook-model.c
-addressbook/gui/widgets/e-addressbook-reflow-adapter.c
-addressbook/gui/widgets/e-addressbook-table-adapter.c
-addressbook/gui/widgets/e-addressbook-util.c
-addressbook/gui/widgets/e-addressbook-view.c
-addressbook/gui/widgets/e-minicard-control.c
-addressbook/gui/widgets/e-minicard-view.c
-addressbook/gui/widgets/e-minicard.c
-addressbook/gui/widgets/gal-view-factory-minicard.c
-addressbook/printing/e-contact-print.glade
-addressbook/printing/e-contact-print.c
-addressbook/printing/e-contact-print-envelope.c
-calendar/cal-util/cal-util.c
-calendar/cal-util/timeutil.c
-calendar/conduits/calendar/calendar-conduit.c
-calendar/conduits/todo/todo-conduit.c
-calendar/gui/GNOME_Evolution_Calendar.oaf.in
-calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in
-calendar/gui/alarm-notify/alarm-notify-dialog.c
-calendar/gui/alarm-notify/alarm-notify.glade
-calendar/gui/alarm-notify/alarm-queue.c
-calendar/gui/alarm-notify/notify-main.c
-calendar/gui/calendar-commands.c
-calendar/gui/calendar-model.c
-calendar/gui/calendar-view-factory.c
-calendar/gui/cal-search-bar.c
-calendar/gui/component-factory.c
-calendar/gui/control-factory.c
-calendar/gui/dialogs/alarm-options.c
-calendar/gui/dialogs/alarm-options.glade
-calendar/gui/dialogs/alarm-page.c
-calendar/gui/dialogs/alarm-page.glade
-calendar/gui/dialogs/cal-prefs-dialog.glade
-calendar/gui/dialogs/cancel-comp.c
-calendar/gui/dialogs/changed-comp.c
-calendar/gui/dialogs/comp-editor-util.c
-calendar/gui/dialogs/comp-editor.c
-calendar/gui/dialogs/delete-comp.c
-calendar/gui/dialogs/e-delegate-dialog.glade
-calendar/gui/dialogs/event-editor.c
-calendar/gui/dialogs/event-page.glade
-calendar/gui/dialogs/meeting-page.c
-calendar/gui/dialogs/meeting-page.etspec
-calendar/gui/dialogs/meeting-page.glade
-calendar/gui/dialogs/recurrence-page.c
-calendar/gui/dialogs/recurrence-page.glade
-calendar/gui/dialogs/save-comp.c
-calendar/gui/dialogs/schedule-page.c
-calendar/gui/dialogs/schedule-page.glade
-calendar/gui/dialogs/send-comp.c
-calendar/gui/dialogs/task-details-page.glade
-calendar/gui/dialogs/task-editor.c
-calendar/gui/dialogs/task-page.glade
-calendar/gui/e-calendar-table.c
-calendar/gui/e-calendar-table.etspec
-calendar/gui/e-day-view-time-item.c
-calendar/gui/e-day-view-top-item.c
-calendar/gui/e-day-view.c
-calendar/gui/e-itip-control.c
-calendar/gui/e-itip-control.glade
-calendar/gui/e-meeting-model.c
-calendar/gui/e-meeting-time-sel-item.c
-calendar/gui/e-meeting-time-sel.c
-calendar/gui/e-meeting-time-sel.etspec
-calendar/gui/e-tasks.c
-calendar/gui/e-week-view-main-item.c
-calendar/gui/e-week-view.c
-calendar/gui/gnome-cal.c
-calendar/gui/goto-dialog.glade
-calendar/gui/goto.c
-calendar/gui/itip-utils.c
-calendar/gui/main.c
-calendar/gui/print.c
-calendar/gui/tasks-control.c
-calendar/gui/tasks-migrate.c
-calendar/gui/weekday-picker.c
-calendar/pcs/query.c
-camel/camel-cipher-context.c
-camel/camel-cms-context.h
-camel/camel-disco-diary.c
-camel/camel-disco-store.c
-camel/camel-filter-driver.c
-camel/camel-filter-search.c
-camel/camel-folder.c
-camel/camel-folder-search.c
-camel/camel-lock-client.c
-camel/camel-lock.c
-camel/camel-movemail.c
-camel/camel-pgp-context.c
-camel/camel-pgp-mime.c
-camel/camel-provider.c
-camel/camel-remote-store.c
-camel/camel-sasl-anonymous.c
-camel/camel-sasl-cram-md5.c
-camel/camel-sasl-digest-md5.c
-camel/camel-sasl-kerberos4.c
-camel/camel-sasl-login.c
-camel/camel-sasl-plain.c
-camel/camel-sasl-popb4smtp.c
-camel/camel-search-private.c
-camel/camel-service.c
-camel/camel-session.c
-camel/camel-smime-context.c
-camel/camel-store.c
-camel/camel-tcp-stream-openssl.c
-camel/camel-tcp-stream-ssl.c
-camel/camel-url.c
-camel/camel-vee-folder.c
-camel/camel-vee-store.c
-camel/camel-vtrash-folder.c
-#camel/providers/cache/camel-cache-map.c
-#camel/providers/cache/camel-cache-store.c
-camel/providers/imap/camel-imap-command.c
-camel/providers/imap/camel-imap-folder.c
-camel/providers/imap/camel-imap-message-cache.c
-camel/providers/imap/camel-imap-provider.c
-camel/providers/imap/camel-imap-store.c
-camel/providers/local/camel-local-provider.c
-camel/providers/local/camel-local-store.c
-camel/providers/local/camel-local-summary.c
-camel/providers/local/camel-maildir-folder.c
-camel/providers/local/camel-maildir-store.c
-camel/providers/local/camel-maildir-summary.c
-camel/providers/local/camel-mbox-folder.c
-camel/providers/local/camel-mbox-store.c
-camel/providers/local/camel-mbox-summary.c
-camel/providers/local/camel-mh-folder.c
-camel/providers/local/camel-mh-store.c
-camel/providers/local/camel-mh-summary.c
-camel/providers/local/camel-spool-folder.c
-camel/providers/local/camel-spool-store.c
-camel/providers/local/camel-spool-summary.c
-camel/providers/nntp/camel-nntp-auth.c
-camel/providers/nntp/camel-nntp-folder.c
-camel/providers/nntp/camel-nntp-grouplist.c
-camel/providers/nntp/camel-nntp-provider.c
-camel/providers/nntp/camel-nntp-store.c
-camel/providers/pop3/camel-pop3-folder.c
-camel/providers/pop3/camel-pop3-provider.c
-camel/providers/pop3/camel-pop3-store.c
-camel/providers/sendmail/camel-sendmail-provider.c
-camel/providers/sendmail/camel-sendmail-transport.c
-camel/providers/smtp/camel-smtp-provider.c
-camel/providers/smtp/camel-smtp-transport.c
-composer/e-msg-composer-attachment-bar.c
-composer/e-msg-composer-attachment.c
-composer/e-msg-composer-attachment.glade
-composer/e-msg-composer-hdrs.c
-composer/e-msg-composer-select-file.c
-composer/e-msg-composer.c
-composer/evolution-composer.c
-data/evolution.desktop.in
-data/evolution.keys.in
-default_user/searches.xml
-e-util/e-categories-config.c
-e-util/e-time-utils.c
-filter/filter-datespec.c
-filter/filter-editor.c
-filter/filter-filter.c
-filter/filter-folder.c
-filter/filter-input.c
-filter/filter-option.c
-filter/filter-part.c
-filter/filter-rule.c
-filter/filter.glade
-filter/libfilter-i18n.h
-filter/rule-editor.c
-filter/score-editor.c
-filter/score-rule.c
-filter/vfolder-editor.c
-filter/vfolder-rule.c
-importers/GNOME_Evolution_Elm_Intelligent_Importer.oaf.in
-importers/GNOME_Evolution_Netscape_Intelligent_Importer.oaf.in
-importers/GNOME_Evolution_Pine_Intelligent_Importer.oaf.in
-importers/elm-importer.c
-importers/evolution-gnomecard-importer.c
-importers/netscape-importer.c
-importers/pine-importer.c
-mail/GNOME_Evolution_Mail.oaf.in
-mail/component-factory.c
-mail/folder-browser-factory.c
-mail/folder-browser-ui.c
-mail/folder-browser.c
-mail/folder-info.c
-mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in
-mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in
-mail/local-config.glade
-mail/mail-account-editor-news.c
-mail/mail-account-editor.c
-mail/mail-account-gui.c
-mail/mail-accounts.c
-mail/mail-autofilter.c
-mail/mail-callbacks.c
-mail/mail-config-druid.c
-mail/mail-config.c
-mail/mail-config.glade
-mail/mail-crypto.c
-mail/mail-display.c
-mail/mail-folder-cache.c
-mail/mail-format.c
-mail/mail-local.c
-mail/mail-mt.c
-mail/mail-ops.c
-mail/mail-search-dialogue.c
-mail/mail-search.c
-mail/mail-search.c
-mail/mail-send-recv.c
-mail/mail-session.c
-mail/mail-tools.c
-mail/mail-vfolder.c
-mail/message-browser.c
-mail/message-list.c
-mail/message-list.etspec
-mail/subscribe-dialog.c
-mail/subscribe-dialog.etspec
-mail/subscribe-dialog.glade
-my-evolution/GNOME_Evolution_Summary.oaf.in
-my-evolution/component-factory.c
-my-evolution/e-summary-calendar.c
-my-evolution/e-summary-mail.c
-my-evolution/e-summary-preferences.c
-my-evolution/e-summary-rdf.c
-my-evolution/e-summary-tasks.c
-my-evolution/e-summary-weather.c
-my-evolution/e-summary.c
-my-evolution/main.c
-my-evolution/metar.c
-my-evolution/my-evolution.glade
-shell/GNOME_Evolution_Shell.oaf.in
-shell/e-activity-handler.c
-shell/e-local-storage.c
-shell/e-setup.c
-shell/e-shell-folder-commands.c
-shell/e-shell-folder-creation-dialog.c
-shell/e-shell-folder-selection-dialog.c
-shell/e-shell-folder-title-bar.c
-shell/e-shell-importer.c
-shell/e-shell-offline-handler.c
-shell/e-shell-startup-wizard.c
-shell/e-shell-view-menu.c
-shell/e-shell-view.c
-shell/e-shell.c
-shell/e-shortcuts-view.c
-shell/e-shortcuts.c
-shell/e-storage-set-view.c
-shell/e-storage-set-view.etspec
-shell/e-storage.c
-shell/e-summary-storage.c
-shell/e-task-widget.c
-shell/glade/e-active-connection-dialog.glade
-shell/glade/e-shell-folder-creation-dialog.glade
-shell/glade/evolution-startup-wizard.glade
-shell/importer/import.glade
-shell/importer/intelligent.c
-shell/main.c
-ui/evolution-addressbook.xml
-ui/evolution-calendar.xml
-ui/evolution-comp-editor.xml
-ui/evolution-contact-editor.xml
-ui/evolution-contact-list-editor.xml
-ui/evolution-event-editor.xml
-ui/evolution-executive-summary.xml
-ui/evolution-mail-global.xml
-ui/evolution-mail-list.xml
-ui/evolution-mail-message.xml
-ui/evolution-mail-messagedisplay.xml
-ui/evolution-message-composer.xml
-ui/evolution-signature-editor.xml
-ui/evolution-subscribe.xml
-ui/evolution-task-editor.xml
-ui/evolution-tasks.xml
-ui/evolution.xml
-ui/my-evolution.xml
-views/addressbook/galview.xml
-views/calendar/galview.xml
-views/mail/galview.xml
-views/tasks/galview.xml
-widgets/e-timezone-dialog/e-timezone-dialog.c
-widgets/e-timezone-dialog/e-timezone-dialog.glade
-widgets/menus/gal-view-menus.c
-widgets/misc/e-calendar-item.c
-widgets/misc/e-calendar.c
-widgets/misc/e-cell-date-edit.c
-widgets/misc/e-charset-picker.c
-widgets/misc/e-clipped-label.c
-widgets/misc/e-dateedit.c
-widgets/misc/e-filter-bar.c
-widgets/misc/e-filter-bar.h
-widgets/misc/e-messagebox.c
-widgets/misc/e-search-bar.c
-wombat/GNOME_Evolution_Wombat.oaf.in
-wombat/wombat.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
deleted file mode 100644
index a19f3656bc..0000000000
--- a/po/POTFILES.skip
+++ /dev/null
@@ -1,10 +0,0 @@
-tests/ui-tests/store_listing.glade
-addressbook/gui/component/select-names/recipient.glade
-addressbook/gui/widgets/test-minicard-view.c
-calendar/gui/alarm-notify.c
-calendar/gui/getdate.c
-camel/providers/local/camel-mbox-provider.c
-cmdline/compose.c
-notes/component-factory.c
-notes/main.c
-tests/ui-tests/message-browser.c
diff --git a/po/az.po b/po/az.po
deleted file mode 100644
index c5e9b35a3d..0000000000
--- a/po/az.po
+++ /dev/null
@@ -1,15640 +0,0 @@
-# -------------------------------------------------------
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Vasif Ismailoglu MD <azerb_linux@hotmail.com>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution 0.3.1\n"
-"POT-Creation-Date: 2001-10-01 19:06-0400\n"
-"PO-Revision-Date: 2001-05-23 00:10GMT +0200\n"
-"Last-Translator: Vasif İsmayıloğlu MD <azerb_linux@hotmail.com>\n"
-"Language-Team: Azerbaijani Turkish <linuxaz@azerimal.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 0.8\n"
-
-#: addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in.h:1
-#, fuzzy
-msgid "Factory to import VCard files into Evolution."
-msgstr "'GnomeCard' fayllarını 'Evolution' içinə gətirən e'malatxana."
-
-#: addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in.h:2
-#, fuzzy
-msgid "Imports VCard files into Evolution."
-msgstr "'GnomeCard' fayllarını 'Evolution' içinə gətirir."
-
-#: addressbook/backend/ebook/e-card-simple.c:58
-#: addressbook/gui/widgets/e-addressbook-view.c:868
-msgid "File As"
-msgstr "Fərqli faylla"
-
-#: addressbook/backend/ebook/e-card-simple.c:59
-msgid "Name"
-msgstr "Ad"
-
-#: addressbook/backend/ebook/e-card-simple.c:60
-#: addressbook/gui/widgets/e-addressbook-view.c:870
-msgid "Email"
-msgstr "ePoçt"
-
-#: addressbook/backend/ebook/e-card-simple.c:61
-#: addressbook/gui/contact-editor/e-contact-editor.c:1609
-msgid "Primary"
-msgstr "İlk"
-
-#: addressbook/backend/ebook/e-card-simple.c:61
-#, fuzzy
-msgid "Prim"
-msgstr "İlk"
-
-#: addressbook/backend/ebook/e-card-simple.c:62
-#: addressbook/backend/ebook/e-card-simple.c:92
-#: addressbook/gui/contact-editor/e-contact-editor.c:1594
-#: addressbook/gui/widgets/e-addressbook-view.c:902
-msgid "Assistant"
-msgstr "Köməkçi"
-
-#: addressbook/backend/ebook/e-card-simple.c:63
-#: addressbook/backend/ebook/e-card-simple.c:68
-#: addressbook/gui/contact-editor/e-contact-editor.c:1595
-#: addressbook/gui/contact-editor/e-contact-editor.c:1662
-msgid "Business"
-msgstr "Məslək"
-
-#: addressbook/backend/ebook/e-card-simple.c:63
-#: addressbook/backend/ebook/e-card-simple.c:68
-#, fuzzy
-msgid "Bus"
-msgstr "Məşğul"
-
-#: addressbook/backend/ebook/e-card-simple.c:64
-#: addressbook/gui/contact-editor/e-contact-editor.c:1598
-msgid "Callback"
-msgstr "Geri axtarma"
-
-#: addressbook/backend/ebook/e-card-simple.c:65
-#: addressbook/gui/contact-editor/e-contact-editor.c:1600
-msgid "Company"
-msgstr "Şirkət"
-
-#: addressbook/backend/ebook/e-card-simple.c:65
-#, fuzzy
-msgid "Comp"
-msgstr "Köçürt"
-
-#: addressbook/backend/ebook/e-card-simple.c:66
-#: addressbook/backend/ebook/e-card-simple.c:69
-#: addressbook/gui/contact-editor/e-contact-editor.c:1601
-#: addressbook/gui/contact-editor/e-contact-editor.c:1663
-msgid "Home"
-msgstr "Ev"
-
-#: addressbook/backend/ebook/e-card-simple.c:67
-#: addressbook/gui/widgets/e-addressbook-view.c:877
-msgid "Organization"
-msgstr "Şirkət"
-
-#: addressbook/backend/ebook/e-card-simple.c:67
-#, fuzzy
-msgid "Org"
-msgstr ""
-"\n"
-"Quruluş:\t"
-
-#: addressbook/backend/ebook/e-card-simple.c:70
-#: addressbook/gui/contact-editor/e-contact-editor.c:1605
-msgid "Mobile"
-msgstr "Cib telefonu"
-
-#: addressbook/backend/ebook/e-card-simple.c:71
-#: addressbook/gui/contact-editor/e-contact-editor.c:1599
-msgid "Car"
-msgstr "Maşın"
-
-#: addressbook/backend/ebook/e-card-simple.c:72
-#: addressbook/gui/contact-editor/e-contact-editor.c:1597
-#: addressbook/gui/widgets/e-addressbook-view.c:882
-msgid "Business Fax"
-msgstr "Məsləki Faks"
-
-#: addressbook/backend/ebook/e-card-simple.c:72
-#, fuzzy
-msgid "Bus Fax"
-msgstr "Məsləki Faks"
-
-#: addressbook/backend/ebook/e-card-simple.c:73
-#: addressbook/gui/contact-editor/e-contact-editor.c:1603
-#: addressbook/gui/widgets/e-addressbook-view.c:883
-msgid "Home Fax"
-msgstr "Ev faksı"
-
-#: addressbook/backend/ebook/e-card-simple.c:74
-#: addressbook/gui/contact-editor/e-contact-editor.c:1596
-msgid "Business 2"
-msgstr "2.nci Məslək"
-
-#: addressbook/backend/ebook/e-card-simple.c:74
-#, fuzzy
-msgid "Bus 2"
-msgstr "Məşğul"
-
-#: addressbook/backend/ebook/e-card-simple.c:75
-#: addressbook/gui/contact-editor/e-contact-editor.c:1602
-msgid "Home 2"
-msgstr "2.nci ev"
-
-#: addressbook/backend/ebook/e-card-simple.c:76
-#: addressbook/gui/contact-editor/e-contact-editor.c:1604
-#: addressbook/gui/widgets/e-addressbook-view.c:886
-msgid "ISDN"
-msgstr "ISDN"
-
-#: addressbook/backend/ebook/e-card-simple.c:77
-#: addressbook/backend/ebook/e-card-simple.c:83
-#: addressbook/gui/contact-editor/e-contact-editor.c:1606
-#: addressbook/gui/contact-editor/e-contact-editor.c:1664
-#: mail/mail-config.glade.h:52
-msgid "Other"
-msgstr "Başqa"
-
-#: addressbook/backend/ebook/e-card-simple.c:78
-#: addressbook/gui/contact-editor/e-contact-editor.c:1607
-#: addressbook/gui/widgets/e-addressbook-view.c:888
-msgid "Other Fax"
-msgstr "Başqa faks"
-
-#: addressbook/backend/ebook/e-card-simple.c:79
-#: addressbook/gui/contact-editor/e-contact-editor.c:1608
-#: addressbook/gui/widgets/e-addressbook-view.c:889
-msgid "Pager"
-msgstr "Peycer"
-
-#: addressbook/backend/ebook/e-card-simple.c:80
-#: addressbook/gui/contact-editor/e-contact-editor.c:1610
-#: addressbook/gui/widgets/e-addressbook-view.c:890
-msgid "Radio"
-msgstr "Radio"
-
-#: addressbook/backend/ebook/e-card-simple.c:81
-#: addressbook/gui/contact-editor/e-contact-editor.c:1611
-#: addressbook/gui/widgets/e-addressbook-view.c:891
-msgid "Telex"
-msgstr "Teleks"
-
-#: addressbook/backend/ebook/e-card-simple.c:82
-#: addressbook/gui/widgets/e-addressbook-view.c:892
-msgid "TTY"
-msgstr "TTY"
-
-#: addressbook/backend/ebook/e-card-simple.c:84
-#: addressbook/gui/component/e-address-popup.c:476
-#: addressbook/gui/contact-editor/e-contact-editor.c:1637
-#: addressbook/gui/widgets/e-addressbook-view.c:894
-msgid "Email 2"
-msgstr "2.nci ePoçt ünvanı"
-
-#: addressbook/backend/ebook/e-card-simple.c:85
-#: addressbook/gui/component/e-address-popup.c:486
-#: addressbook/gui/contact-editor/e-contact-editor.c:1638
-#: addressbook/gui/widgets/e-addressbook-view.c:895
-msgid "Email 3"
-msgstr "3.ncü ePoçt ünvanı"
-
-#: addressbook/backend/ebook/e-card-simple.c:86
-#: addressbook/gui/widgets/e-addressbook-view.c:896
-msgid "Web Site"
-msgstr "Web Səhifəsi"
-
-#: addressbook/backend/ebook/e-card-simple.c:86
-msgid "Url"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:87
-#: addressbook/gui/widgets/e-addressbook-view.c:897
-msgid "Department"
-msgstr "Bölmə"
-
-#: addressbook/backend/ebook/e-card-simple.c:87
-msgid "Dep"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:88
-#: addressbook/gui/widgets/e-addressbook-view.c:898
-msgid "Office"
-msgstr "İdarə"
-
-#: addressbook/backend/ebook/e-card-simple.c:88
-#, fuzzy
-msgid "Off"
-msgstr "İdarə"
-
-#: addressbook/backend/ebook/e-card-simple.c:89
-#: addressbook/gui/widgets/e-addressbook-view.c:899
-msgid "Title"
-msgstr "Başlıq"
-
-#: addressbook/backend/ebook/e-card-simple.c:90
-#: addressbook/gui/widgets/e-addressbook-view.c:900
-msgid "Profession"
-msgstr "Məslək"
-
-#: addressbook/backend/ebook/e-card-simple.c:90
-msgid "Prof"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:91
-#: addressbook/gui/widgets/e-addressbook-view.c:901
-msgid "Manager"
-msgstr "İdarəci"
-
-#: addressbook/backend/ebook/e-card-simple.c:91
-#, fuzzy
-msgid "Man"
-msgstr "May"
-
-#: addressbook/backend/ebook/e-card-simple.c:92
-msgid "Ass"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:93
-#: addressbook/gui/widgets/e-addressbook-view.c:903
-msgid "Nickname"
-msgstr "Ləqəb"
-
-#: addressbook/backend/ebook/e-card-simple.c:93
-#, fuzzy
-msgid "Nick"
-msgstr "Ləqəb"
-
-#: addressbook/backend/ebook/e-card-simple.c:94
-#: addressbook/gui/widgets/e-addressbook-view.c:904
-msgid "Spouse"
-msgstr "Yoldaş"
-
-#: addressbook/backend/ebook/e-card-simple.c:95
-#: addressbook/gui/widgets/e-addressbook-view.c:905
-msgid "Note"
-msgstr "Qeyd"
-
-#: addressbook/backend/ebook/e-card-simple.c:96
-#, fuzzy
-msgid "Calendar URI"
-msgstr "Təqvim"
-
-#: addressbook/backend/ebook/e-card-simple.c:96
-msgid "CALUri"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:97
-#: addressbook/gui/widgets/e-addressbook-view.c:906
-msgid "Free-busy URL"
-msgstr "Sərbəst/məşğul URL"
-
-#: addressbook/backend/ebook/e-card-simple.c:97
-msgid "FBUrl"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:98
-#, fuzzy
-msgid "Anniversary"
-msgstr "_İl dönümü :"
-
-#: addressbook/backend/ebook/e-card-simple.c:98
-msgid "Anniv"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:99
-#, fuzzy
-msgid "Birth Date"
-msgstr ""
-"\n"
-"Ad günü: "
-
-#: addressbook/backend/ebook/e-card-simple.c:102
-#: calendar/gui/e-calendar-table.etspec.h:4
-msgid "Categories"
-msgstr "Kateqoriyalar"
-
-#: addressbook/backend/ebook/e-card-simple.c:103
-#, fuzzy
-msgid "Family Name"
-msgstr "Tam Ad"
-
-#: addressbook/backend/ebook/e-card.c:3564
-msgid "Card: "
-msgstr "Kart: "
-
-#: addressbook/backend/ebook/e-card.c:3566
-msgid ""
-"\n"
-"Name: "
-msgstr ""
-"\n"
-"Ad: "
-
-#: addressbook/backend/ebook/e-card.c:3567
-msgid ""
-"\n"
-" Prefix: "
-msgstr ""
-"\n"
-" Prefiks:\t"
-
-#: addressbook/backend/ebook/e-card.c:3568
-msgid ""
-"\n"
-" Given: "
-msgstr ""
-"\n"
-" Verilən:\t"
-
-#: addressbook/backend/ebook/e-card.c:3569
-msgid ""
-"\n"
-" Additional: "
-msgstr ""
-"\n"
-" Əlavə: "
-
-#: addressbook/backend/ebook/e-card.c:3570
-msgid ""
-"\n"
-" Family: "
-msgstr ""
-"\n"
-" Ailə:\t"
-
-#: addressbook/backend/ebook/e-card.c:3571
-msgid ""
-"\n"
-" Suffix: "
-msgstr ""
-"\n"
-" Suffiks:\t"
-
-#: addressbook/backend/ebook/e-card.c:3585
-msgid ""
-"\n"
-"Birth Date: "
-msgstr ""
-"\n"
-"Ad günü: "
-
-#: addressbook/backend/ebook/e-card.c:3596
-msgid ""
-"\n"
-"Address:"
-msgstr ""
-"\n"
-"Ünvan:"
-
-#: addressbook/backend/ebook/e-card.c:3598
-msgid ""
-"\n"
-" Postal Box: "
-msgstr ""
-"\n"
-" Poçt Qutusu:\t"
-
-#: addressbook/backend/ebook/e-card.c:3599
-msgid ""
-"\n"
-" Ext: "
-msgstr ""
-"\n"
-" Əlavə:\t"
-
-#: addressbook/backend/ebook/e-card.c:3600
-msgid ""
-"\n"
-" Street: "
-msgstr ""
-"\n"
-" Küçə:\t"
-
-#: addressbook/backend/ebook/e-card.c:3601
-msgid ""
-"\n"
-" City: "
-msgstr ""
-"\n"
-" Şəhər:\t"
-
-#: addressbook/backend/ebook/e-card.c:3602
-msgid ""
-"\n"
-" Region: "
-msgstr ""
-"\n"
-" Rayon:\t"
-
-#: addressbook/backend/ebook/e-card.c:3603
-msgid ""
-"\n"
-" Postal Code: "
-msgstr ""
-"\n"
-" Poçt Kodu:\t"
-
-#: addressbook/backend/ebook/e-card.c:3604
-msgid ""
-"\n"
-" Country: "
-msgstr ""
-"\n"
-" Ölkə:\t"
-
-#: addressbook/backend/ebook/e-card.c:3617
-msgid ""
-"\n"
-"Delivery Label: "
-msgstr ""
-"\n"
-"Təslim Etiketi: "
-
-#: addressbook/backend/ebook/e-card.c:3629
-msgid ""
-"\n"
-"Telephones:\n"
-msgstr ""
-"\n"
-"Telefonlar:\n"
-
-#: addressbook/backend/ebook/e-card.c:3632
-msgid ""
-"\n"
-"Telephone:"
-msgstr ""
-"\n"
-"Telefon:"
-
-#: addressbook/backend/ebook/e-card.c:3656
-msgid ""
-"\n"
-"E-mail:\n"
-msgstr ""
-"\n"
-"ePoçt:\n"
-
-#: addressbook/backend/ebook/e-card.c:3659
-msgid ""
-"\n"
-"E-mail:"
-msgstr ""
-"\n"
-"ePoçt:"
-
-#: addressbook/backend/ebook/e-card.c:3678
-msgid ""
-"\n"
-"Mailer: "
-msgstr ""
-"\n"
-"Göndərici: "
-
-#: addressbook/backend/ebook/e-card.c:3684
-msgid ""
-"\n"
-"Time Zone: "
-msgstr ""
-"\n"
-"Zaman zolağı: "
-
-#: addressbook/backend/ebook/e-card.c:3692
-msgid ""
-"\n"
-"Geo Location: "
-msgstr ""
-"\n"
-"Coğrafi Yerləşmə: "
-
-#: addressbook/backend/ebook/e-card.c:3696
-msgid ""
-"\n"
-"Business Role: "
-msgstr ""
-"\n"
-"Məslək:\t"
-
-#: addressbook/backend/ebook/e-card.c:3708
-msgid ""
-"\n"
-"Org: "
-msgstr ""
-"\n"
-"Quruluş:\t"
-
-#: addressbook/backend/ebook/e-card.c:3709
-msgid ""
-"\n"
-" Name: "
-msgstr ""
-"\n"
-" Ad:\t"
-
-#: addressbook/backend/ebook/e-card.c:3710
-msgid ""
-"\n"
-" Unit: "
-msgstr ""
-"\n"
-" Bölmə:\t"
-
-#: addressbook/backend/ebook/e-card.c:3711
-msgid ""
-"\n"
-" Unit2: "
-msgstr ""
-"\n"
-" Bölmə2:\t"
-
-#: addressbook/backend/ebook/e-card.c:3712
-msgid ""
-"\n"
-" Unit3: "
-msgstr ""
-"\n"
-" Bölmə3:\t"
-
-#: addressbook/backend/ebook/e-card.c:3713
-msgid ""
-"\n"
-" Unit4: "
-msgstr ""
-"\n"
-" Bölmə4:\t"
-
-#: addressbook/backend/ebook/e-card.c:3717
-msgid ""
-"\n"
-"Categories: "
-msgstr ""
-"\n"
-"Kateqoriyalar:\t"
-
-#: addressbook/backend/ebook/e-card.c:3718
-msgid ""
-"\n"
-"Comment: "
-msgstr ""
-"\n"
-"İzahat:\t"
-
-#. 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);
-#. }
-#: addressbook/backend/ebook/e-card.c:3731
-msgid ""
-"\n"
-"Unique String: "
-msgstr ""
-"\n"
-"Yeganə Kəlimə:\t"
-
-#: addressbook/backend/ebook/e-card.c:3734
-msgid ""
-"\n"
-"Public Key: "
-msgstr ""
-"\n"
-"Ümumi Açar:\t"
-
-#: addressbook/backend/ebook/e-card.c:4087
-#, fuzzy
-msgid "Multiple VCards"
-msgstr "Çoxlu İsmarıc"
-
-#: addressbook/backend/ebook/e-card.c:4095
-#, fuzzy, c-format
-msgid "VCard for %s"
-msgstr "%s üçün parol girin"
-
-#: addressbook/backend/ebook/load-gnomecard-addressbook.c:21
-#: addressbook/backend/ebook/load-pine-addressbook.c:22
-#: addressbook/backend/ebook/test-client-list.c:23
-#: addressbook/backend/ebook/test-client.c:33
-#: addressbook/conduit/address-conduit.c:1167
-#: addressbook/gui/component/addressbook-factory.c:48
-#: calendar/conduits/calendar/calendar-conduit.c:1262
-#: calendar/conduits/todo/todo-conduit.c:1034
-#: calendar/gui/alarm-notify/notify-main.c:78 calendar/gui/main.c:63
-msgid "Could not initialize Bonobo"
-msgstr "Bonoboyu başlada bilmədim"
-
-#: addressbook/backend/pas/pas-backend-file.c:257
-#: addressbook/backend/pas/pas-backend-ldap.c:2047
-#, fuzzy
-msgid "Searching..."
-msgstr "Axtar"
-
-#: addressbook/backend/pas/pas-backend-file.c:259
-#, fuzzy
-msgid "Loading..."
-msgstr "Gözlənilir ..."
-
-#. need a different error message here.
-#: addressbook/backend/pas/pas-backend-file.c:268
-#, fuzzy
-msgid "Error in search expression."
-msgstr ""
-"İşə salıcı axtarış ifadəsi darama xətası:%s:\n"
-"%s"
-
-#: addressbook/backend/pas/pas-backend-ldap.c:467
-#, fuzzy
-msgid "Connecting to LDAP server..."
-msgstr "Vericiyə bağlantı qurulur..."
-
-#: addressbook/backend/pas/pas-backend-ldap.c:477
-#, fuzzy
-msgid "Unable to connect to LDAP server."
-msgstr ""
-"IMAP vericisinə tanıdılma xətası.\n"
-"%s\n"
-"\n"
-
-#: addressbook/backend/pas/pas-backend-ldap.c:493
-#, fuzzy
-msgid "Waiting for connection to LDAP server..."
-msgstr "Vericiyə bağlantı qurulur..."
-
-#: addressbook/backend/pas/pas-backend-ldap.c:862
-#, fuzzy
-msgid "Adding card to LDAP server..."
-msgstr "Vericiyə bağlantı qurulur..."
-
-#: addressbook/backend/pas/pas-backend-ldap.c:959
-#, fuzzy
-msgid "Removing card from LDAP server..."
-msgstr "Təqvim yüklənir..."
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1064
-msgid "Modifying card from LDAP server..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1992
-msgid "Receiving LDAP search results..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1997
-msgid "Restarting search."
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:204
-msgid "Cursor could not be loaded\n"
-msgstr "Ox yüklənə bilmədi\n"
-
-#: addressbook/conduit/address-conduit.c:217
-msgid "EBook not loaded\n"
-msgstr "eKitab yüklənmədi\n"
-
-#: addressbook/conduit/address-conduit.c:731
-#: calendar/conduits/calendar/calendar-conduit.c:837
-#: calendar/conduits/todo/todo-conduit.c:609
-msgid "Could not start wombat server"
-msgstr "Wombat xidməti başladıla bilmədi"
-
-#: addressbook/conduit/address-conduit.c:732
-#: calendar/conduits/calendar/calendar-conduit.c:838
-#: calendar/conduits/todo/todo-conduit.c:610
-msgid "Could not start wombat"
-msgstr "Wombatı başlada bilmədim"
-
-#: addressbook/conduit/address-conduit.c:762
-#: addressbook/conduit/address-conduit.c:765
-msgid "Could not read pilot's Address application block"
-msgstr "Pilot Ünvan əlavələri bloku oxuna bilmədi"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:1
-msgid "A Bonobo control for an address popup."
-msgstr "Bonobonun ünvan nümayiş etdirmə vasitəsi."
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:2
-msgid "A Bonobo control for displaying an address."
-msgstr "Bonobonun ünvan nümayiş etdirmə vasitəsi."
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:3
-msgid "A sample Bonobo control which displays an addressbook."
-msgstr "Ünvan dəftəri göstərən nümunəvi Bonobo idarəsi."
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:4
-msgid "Control that displays an Evolution addressbook minicard."
-msgstr "Evolution ünvan dəftəri kiçik kartlarını göstərən idarə."
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:5
-msgid "Evolution Addressbook minicard viewer"
-msgstr "Evolution Ünvan Dəftəri kiçik kart nümaiyişi"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:6
-msgid "Evolution component for handling contacts."
-msgstr "Əlaqələri idarə edici 'Evolution' əlavəsi."
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:7
-msgid "Factory for the Addressbook Minicard control"
-msgstr "'Evolution'un Ünvan Dəftəri Kiçik Kart e'malatxanası"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:8
-msgid "Factory for the Addressbook's address displayer"
-msgstr "Ünvan Dəftəriidə ünvan göstərici"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:9
-msgid "Factory for the Addressbook's address popup"
-msgstr "Ünvan Dəftərində ünvan göstərici e'malatxanası"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:10
-msgid "Factory for the sample Addressbook control"
-msgstr "Nümunəvi ünvan dəftəri idarəsi e'malatxanası"
-
-#: addressbook/gui/component/addressbook-component.c:66
-#: calendar/gui/dialogs/comp-editor-util.c:289
-#: calendar/gui/dialogs/comp-editor-util.c:345 shell/e-local-storage.c:173
-#: shell/e-shortcuts.c:1062
-#, fuzzy
-msgid "Contacts"
-msgstr "_Əlaqə"
-
-#: addressbook/gui/component/addressbook-component.c:66
-#, fuzzy
-msgid "Folder containing contact information"
-msgstr ""
-"Süzgəc mə'lumatını yükləmə xətası:\n"
-"%s"
-
-#: addressbook/gui/component/addressbook-component.c:68
-msgid "LDAP Server"
-msgstr "LDAP Vericisi"
-
-#: addressbook/gui/component/addressbook-component.c:68
-#, fuzzy
-msgid "LDAP server containing contact information"
-msgstr ""
-"Süzgəc mə'lumatını yükləmə xətası:\n"
-"%s"
-
-#: addressbook/gui/component/addressbook-component.c:411
-#: ui/evolution-addressbook.xml.h:11
-#, fuzzy
-msgid "New Contact"
-msgstr "Yeni əlaqə"
-
-#: addressbook/gui/component/addressbook-component.c:411
-#, fuzzy
-msgid "New _Contact"
-msgstr "Yeni əlaqə"
-
-#: addressbook/gui/component/addressbook-component.c:412
-#, fuzzy
-msgid "New Contact List"
-msgstr "Yeni əlaqə"
-
-#: addressbook/gui/component/addressbook-component.c:412
-#, fuzzy
-msgid "New Contact _List"
-msgstr "Yeni əlaqə"
-
-#: addressbook/gui/component/addressbook-config.c:188
-msgid "Edit Addressbook"
-msgstr "Ünvan dəftərini düzəlt"
-
-#: addressbook/gui/component/addressbook-config.glade.h:1
-msgid "389"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:2
-#, fuzzy
-msgid "Account Name"
-msgstr "Hesab"
-
-#: addressbook/gui/component/addressbook-config.glade.h:3
-msgid "Add Addressbook"
-msgstr "Ünvan dəftəri əlavə et"
-
-#: addressbook/gui/component/addressbook-config.glade.h:4
-msgid "Addressbook Sources"
-msgstr "Ünvan Dəftəri Qaynağı"
-
-#: addressbook/gui/component/addressbook-config.glade.h:5
-#, fuzzy
-msgid "Advanced"
-msgstr "Ətraflı..."
-
-#: addressbook/gui/component/addressbook-config.glade.h:6
-msgid "Base"
-msgstr "Əsas"
-
-#: addressbook/gui/component/addressbook-config.glade.h:7
-#: calendar/gui/dialogs/task-editor.c:172
-#, fuzzy
-msgid "Basic"
-msgstr "Əsas"
-
-#: addressbook/gui/component/addressbook-config.glade.h:8
-#, fuzzy
-msgid "De_lete"
-msgstr "Sil"
-
-#: addressbook/gui/component/addressbook-config.glade.h:9
-msgid "One"
-msgstr "Bir"
-
-#: addressbook/gui/component/addressbook-config.glade.h:10
-#, fuzzy
-msgid "Search _base:"
-msgstr "Axtarış Hərəkəti ..."
-
-#: addressbook/gui/component/addressbook-config.glade.h:11
-#, fuzzy
-msgid "Search s_cope: "
-msgstr "Axtarış Hərəkəti ..."
-
-#: addressbook/gui/component/addressbook-config.glade.h:12
-#, fuzzy
-msgid "Server Name"
-msgstr "Ad Seç"
-
-#: addressbook/gui/component/addressbook-config.glade.h:13
-#, fuzzy
-msgid "Sub"
-msgstr "Baz."
-
-#: addressbook/gui/component/addressbook-config.glade.h:14
-msgid "The information below is required in order to add an addressbook. "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:15
-msgid "This information is not required for most ldap servers. "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:16
-msgid ""
-"This information is used by your ldap server to specify which nodes are used "
-"in a search. Contact your server administrator for more information."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:17
-msgid ""
-"This is the base node for all your searches on the ldap server. Contact your "
-"server administrator for more information."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:18
-msgid "This is the name of the server where your addressbook is located."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:19
-msgid "This is the port that your ldap server uses."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:20
-msgid ""
-"This name will be used to identify your account. It is for display purposes "
-"only."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:21
-#, fuzzy
-msgid "_Account name:"
-msgstr "Hesab İdarəsi"
-
-#: addressbook/gui/component/addressbook-config.glade.h:22
-#: addressbook/gui/contact-editor/contact-editor.glade.h:19
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:4
-#: calendar/gui/dialogs/alarm-page.glade.h:8 filter/filter.glade.h:7
-#: mail/mail-config.glade.h:91 my-evolution/my-evolution.glade.h:20
-msgid "_Add"
-msgstr "_Əlavə Et"
-
-#: addressbook/gui/component/addressbook-config.glade.h:23
-#: filter/filter.glade.h:9 mail/mail-config.glade.h:96
-#: ui/evolution-addressbook.xml.h:34 ui/evolution-calendar.xml.h:39
-#: ui/evolution-mail-list.xml.h:25 ui/evolution-mail-messagedisplay.xml.h:6
-#: ui/evolution-message-composer.xml.h:47
-#: ui/evolution-signature-editor.xml.h:6 ui/evolution-subscribe.xml.h:10
-#: ui/evolution-tasks.xml.h:16
-msgid "_Edit"
-msgstr "_Düzəlt"
-
-#: addressbook/gui/component/addressbook-config.glade.h:24
-#, fuzzy
-msgid "_My server requires authentication"
-msgstr "Verici tanıtmaya ehtiyac hiss edər"
-
-#: addressbook/gui/component/addressbook-config.glade.h:25
-#, fuzzy
-msgid "_Port:"
-msgstr "Qapı:"
-
-#: addressbook/gui/component/addressbook-config.glade.h:26
-#, fuzzy
-msgid "_Server name:"
-msgstr "Verici İsmarıcı:"
-
-#: addressbook/gui/component/addressbook-storage.c:163
-msgid "Other Contacts"
-msgstr "Digər Əlaqələr"
-
-#: addressbook/gui/component/addressbook.c:407
-#, fuzzy, c-format
-msgid "Please enter your email address and password for access to %s"
-msgstr "%s üçün %s parol kalimanizi lürfən girin"
-
-#: addressbook/gui/component/addressbook.c:415
-#, fuzzy
-msgid "LDAP Authentication"
-msgstr "Tanıtma"
-
-#: addressbook/gui/component/addressbook.c:426
-msgid "Email Address:"
-msgstr "ePoçt Ünvanı: "
-
-#: addressbook/gui/component/addressbook.c:439
-#, fuzzy
-msgid "Password:"
-msgstr "Parol"
-
-#: addressbook/gui/component/addressbook.c:502
-msgid "Unable to open addressbook"
-msgstr "Ünvan dəftərini aça bilmədim"
-
-#: addressbook/gui/component/addressbook.c:509
-msgid ""
-"We were unable to open this addressbook. This either\n"
-"means you have entered an incorrect URI, or the LDAP server\n"
-"is down"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:514
-msgid ""
-"This version of Evolution does not have LDAP support\n"
-"compiled in to it. If you want to use LDAP in Evolution\n"
-"you must compile the program from the CVS sources after\n"
-"retrieving OpenLDAP from the link below.\n"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:522
-msgid ""
-"We were unable to open this addressbook. Please check that the\n"
-"path exists and that you have permission to access it."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:663
-#: calendar/gui/cal-search-bar.c:55
-msgid "Any field contains"
-msgstr "Daxil edən hər hansı üzv"
-
-#: addressbook/gui/component/addressbook.c:664
-msgid "Name contains"
-msgstr "Ad daxil edən"
-
-#: addressbook/gui/component/addressbook.c:665
-msgid "Email contains"
-msgstr "ePoçt daxil edən"
-
-#: addressbook/gui/component/addressbook.c:666
-#: calendar/gui/cal-search-bar.c:59
-#, fuzzy
-msgid "Category is"
-msgstr "Kateqoriyalar"
-
-#. We attach subitems below
-#: addressbook/gui/component/addressbook.c:667 widgets/misc/e-filter-bar.h:97
-#: widgets/misc/e-filter-bar.h:104
-msgid "Advanced..."
-msgstr "Ətraflı..."
-
-#. All, unmatched, separator
-#: addressbook/gui/component/addressbook.c:897
-#: calendar/gui/cal-search-bar.c:412
-#, fuzzy
-msgid "Any Category"
-msgstr "Kateqoriyalar:"
-
-#: addressbook/gui/component/addressbook.c:939
-msgid "The URI that the Folder Browser will display"
-msgstr "Qovluq Səyyahını göstərəcək olan URI"
-
-#.
-#. * This is the code for the UI thingie that lets you manipulate the e-mail
-#. * addresses (and *only* the e-mail addresses) associated with an existing
-#. * card.
-#.
-#: addressbook/gui/component/e-address-popup.c:178
-#, fuzzy
-msgid "(none)"
-msgstr "( Adsızdır )"
-
-#: addressbook/gui/component/e-address-popup.c:466
-#: addressbook/gui/contact-editor/contact-editor.glade.h:17
-#: addressbook/gui/contact-editor/e-contact-editor.c:1636
-msgid "Primary Email"
-msgstr "İlk ePoçt ünvanı"
-
-#: addressbook/gui/component/e-address-popup.c:579
-#, fuzzy
-msgid "Select an Action"
-msgstr "Fayl seç"
-
-#: addressbook/gui/component/e-address-popup.c:585
-#, fuzzy, c-format
-msgid "Create a new contact \"%s\""
-msgstr "Yeni bir hesab yarat"
-
-#: addressbook/gui/component/e-address-popup.c:597
-#, c-format
-msgid "Add address to existing contact \"%s\""
-msgstr ""
-
-#: addressbook/gui/component/e-address-popup.c:859
-#, fuzzy
-msgid "Querying Addressbook..."
-msgstr "Ünvan dəftərini düzəlt"
-
-#: addressbook/gui/component/e-address-popup.c:934
-#: addressbook/gui/component/e-address-widget.c:388
-#: addressbook/gui/component/select-names/e-select-names-popup.c:307
-msgid "Edit Contact Info"
-msgstr "Əlaqə Mə'lumatını Düzəlt"
-
-#: addressbook/gui/component/e-address-popup.c:963
-#: addressbook/gui/component/e-address-widget.c:424
-#: addressbook/gui/component/select-names/e-select-names-popup.c:486
-msgid "Add to Contacts"
-msgstr "Əlaqələrə Əlavə Et"
-
-#: addressbook/gui/component/e-address-popup.c:1006
-#, fuzzy
-msgid "Merge E-Mail Address"
-msgstr "ePoçt Ünvanı: "
-
-#: addressbook/gui/component/e-address-widget.c:365
-msgid "Disable Queries"
-msgstr "Sorğuları Bağla"
-
-#: addressbook/gui/component/e-address-widget.c:365
-msgid "Enable Queries (Dangerous!)"
-msgstr "Sorğuları Fəallaşdır (Təhlükəlidir!)"
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in.h:1
-msgid "Evolution's addressbook name selection interface."
-msgstr "Evolution Ünvan Dəftəri ad seçmə ara üzü."
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in.h:2
-msgid "Factory for the Addressbook's name selection interface"
-msgstr "Evolution Ünvan Dəftəri ad seçmə ara üzü e'malatxanası"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:164
-#: addressbook/gui/component/select-names/e-select-names.c:764
-#: composer/e-msg-composer-attachment-bar.c:477 filter/filter-filter.c:436
-#: filter/filter-rule.c:613 shell/e-shortcuts-view.c:181
-msgid "Remove"
-msgstr "Sil"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:179
-msgid "Remove All"
-msgstr "Hamısını Sil"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:203
-#, fuzzy
-msgid "Send HTML Mail?"
-msgstr "E-poçt Göndərilir"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:406
-#, fuzzy
-msgid "Edit Contact List"
-msgstr "_Əlaqə"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:424
-#, fuzzy
-msgid "Unnamed Contact List"
-msgstr "Digər Əlaqələr"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:441
-#, c-format
-msgid "(%d not shown)"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:507
-#, fuzzy
-msgid "Unnamed Contact"
-msgstr "Digər Əlaqələr"
-
-#: addressbook/gui/component/select-names/e-select-names.c:521
-msgid ""
-"Evolution is unable to get the addressbook local storage. This may have been "
-"caused by the evolution-addressbook component crashing. To help us better "
-"understand and ultimately resolve this problem, please send an e-mail to Jon "
-"Trowbridge <trow@ximian.com> with a detailed description of the "
-"circumstances under which this error occurred. Thank you."
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names.c:598
-msgid "Select Contacts from Addressbook"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:1
-#, fuzzy
-msgid "C_ontaining:"
-msgstr "daxil edir"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:2
-#, fuzzy
-msgid "Co_ntacts:"
-msgstr "_Əlaqə"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:3
-#, fuzzy
-msgid "F_ind"
-msgstr "Axtar"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:4
-msgid "Select Names"
-msgstr "Ad Seç"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:5
-msgid "Show contacts matching the following criteria:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:6
-#, fuzzy
-msgid "_Category:"
-msgstr "Kateqoriyalar:"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:7
-#, fuzzy
-msgid "_Folder:"
-msgstr "_Qovluq"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:8
-#, fuzzy
-msgid "_Message Recipients:"
-msgstr "Alıcılar Siyahısı :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:1
-msgid "Anni_versary:"
-msgstr "_İl dönümü :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:2
-msgid "B_usiness"
-msgstr "_Məslək"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:3
-msgid "Business _Fax"
-msgstr "Məsləki _Faks"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:4
-#: calendar/gui/dialogs/event-page.glade.h:3
-#: calendar/gui/dialogs/task-page.glade.h:1
-msgid "Ca_tegories..."
-msgstr "Nö_vlər..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:5
-msgid "Collaboration"
-msgstr ""
-
-#. Construct the app
-#: addressbook/gui/contact-editor/contact-editor.glade.h:6
-#: addressbook/gui/contact-editor/e-contact-editor.c:1241
-msgid "Contact Editor"
-msgstr "Əlaqə düzəldicisi"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:7
-#: calendar/gui/dialogs/task-editor.c:177
-msgid "Details"
-msgstr "Ətraflı"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:8
-#, fuzzy
-msgid "F_ree/Busy URL:"
-msgstr "Sərbəst/məşğul URL"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:9
-#, fuzzy
-msgid "File A_s:"
-msgstr "Fərqli fayllalə:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:10
-msgid "General"
-msgstr "Ümumi"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:11
-msgid ""
-"If this person publishes free/busy or other calendar information on the "
-"Internet, enter the address\n"
-"of that information here."
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:13
-msgid "New phone type"
-msgstr "Yeni telefon növü"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:14
-msgid "No_tes:"
-msgstr "_Qeydlər:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:15
-#, fuzzy
-msgid "Organi_zation:"
-msgstr "Orqanizasiya"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:16
-msgid "Phone Types"
-msgstr "Telefon Növləri"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:18
-msgid "Wants to receive _HTML mail"
-msgstr "_HTML ePoçtlarını qəbul edir"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:20
-msgid "_Address..."
-msgstr "_Ünvan..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:21
-msgid "_Assistant's name:"
-msgstr "_Köməkçi adı :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:22
-msgid "_Birthday:"
-msgstr "_Ad günü :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:23
-msgid "_Business"
-msgstr "_Məslək"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:24
-#: calendar/gui/dialogs/event-page.glade.h:12
-#: calendar/gui/dialogs/task-page.glade.h:10
-msgid "_Contacts..."
-msgstr "_Əlaqələr ..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:25
-#: calendar/gui/dialogs/alarm-page.glade.h:9
-#: calendar/gui/dialogs/meeting-page.c:834 filter/filter.glade.h:8
-#: mail/folder-browser.c:1406 mail/mail-config.glade.h:95
-#: ui/evolution-calendar.xml.h:38 ui/evolution-mail-message.xml.h:88
-#: ui/evolution-tasks.xml.h:15 ui/evolution.xml.h:35
-msgid "_Delete"
-msgstr "_Sil"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:26
-msgid "_Department:"
-msgstr "_Bölmə :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:27
-msgid "_Full Name..."
-msgstr "_Tam Ad ..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:28
-msgid "_Home"
-msgstr "_Ev"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:29
-msgid "_Job title:"
-msgstr "Məslək _izahı:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:30
-msgid "_Manager's Name:"
-msgstr "_İdarəcinin Adı :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:31
-msgid "_Mobile"
-msgstr "_Cib"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:32
-msgid "_Nickname:"
-msgstr "_Ləqəb :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:33
-msgid "_Office:"
-msgstr "_İdarə :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:34
-msgid "_Profession:"
-msgstr "_Məslək :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:35
-#, fuzzy
-msgid "_Public Calendar URL:"
-msgstr "Təqvim"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:36
-msgid "_Spouse:"
-msgstr "_Yoldaş:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:37
-msgid "_This is the mailing address"
-msgstr "_Bu ePoçt ünvanıdır"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:38
-#, fuzzy
-msgid "_Web page address:"
-msgstr "Web səhifəsi :"
-
-#: addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade.h:1
-#, fuzzy
-msgid ""
-"Are you sure you want\n"
-"to delete this contact?"
-msgstr "Bu hesabı həqiqətən də silmək istəyirsiniz?"
-
-#: addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade.h:3
-msgid "Delete Contact?"
-msgstr "Əlaqəni Silimmi?"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:759
-msgid "This contact belongs to these categories:"
-msgstr "Bu üzv bu kateqoriyalara aitdir:"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1612
-msgid "TTY/TDD"
-msgstr "TTY/TDD"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:2234
-#, fuzzy, c-format
-msgid "Could not find widget for a field: `%s'"
-msgstr "`%s' Qovluq mündəricat faylı silinə bilmir: %s"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:283
-msgid "Contact Quick-Add"
-msgstr "Cəld Əlaqə Əlavəsi"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:285
-msgid "Edit Full"
-msgstr "Hamısını Düzəlt"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:311
-#: addressbook/gui/widgets/e-addressbook-view.c:869
-msgid "Full Name"
-msgstr "Tam Ad"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:317
-msgid "E-mail"
-msgstr "ePoçt"
-
-#: addressbook/gui/contact-editor/e-contact-save-as.c:137
-#, c-format
-msgid ""
-"%s already exists\n"
-"Do you want to overwrite it?"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:1
-msgid "Address _2:"
-msgstr "Ünvan _2:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:2
-#, fuzzy
-msgid "Afghanistan"
-msgstr "Köməkçi"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:3
-msgid "Albania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:4
-msgid "Algeria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:5
-msgid "American Samoa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:6
-msgid "Andorra"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:7
-msgid "Angola"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:8
-msgid "Anguilla"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:9
-#, fuzzy
-msgid "Antarctica"
-msgstr "Avtomatik"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:10
-msgid "Antigua And Barbuda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:11
-#, fuzzy
-msgid "Argentina"
-msgstr "İstiqamət"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:12
-msgid "Armenia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:13
-msgid "Aruba"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:14
-msgid "Australia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:15
-#, fuzzy
-msgid "Austria"
-msgstr "Avqust"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:16
-msgid "Azerbaijan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:17
-msgid "Bahamas"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:18
-msgid "Bahrain"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:19
-msgid "Bangladesh"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:20
-msgid "Barbados"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:21
-#, fuzzy
-msgid "Belarus"
-msgstr "il"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:22
-msgid "Belgium"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:23
-#, fuzzy
-msgid "Belize"
-msgstr "Böyüklük"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:24
-#, fuzzy
-msgid "Benin"
-msgstr "Göndərilir"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:25
-msgid "Bermuda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:26
-msgid "Bhutan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:27
-msgid "Bolivia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:28
-msgid "Bosnia And Herzegowina"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:29
-msgid "Botswana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:30
-msgid "Bouvet Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:31
-#, fuzzy
-msgid "Brazil"
-msgstr "ePoçt"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:32
-msgid "British Indian Ocean Territory"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:33
-msgid "British Virgin Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:34
-msgid "Brunei Darussalam"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:35
-msgid "Bulgaria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:36
-msgid "Burkina Faso"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:37
-msgid "Burundi"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:38
-msgid "Cambodia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:39
-msgid "Cameroon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:40
-msgid "Canada"
-msgstr "Kanada"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:41
-msgid "Cape Verde"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:42
-msgid "Cayman Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:43
-msgid "Central African Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:44
-#, fuzzy
-msgid "Chad"
-msgstr "Stul"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:45
-msgid "Check Address"
-msgstr "Ünvanı Yoxla"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:46
-#, fuzzy
-msgid "Chile"
-msgstr "Fayl"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:47
-#, fuzzy
-msgid "China"
-msgstr "Stul"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:48
-msgid "Christmas Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:49
-msgid "Cocos (Keeling) Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:50
-msgid "Colombia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:51
-#, fuzzy
-msgid "Comoros"
-msgstr "Rənglər"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:52
-#, fuzzy
-msgid "Congo"
-msgstr "Köçürdülür"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:53
-msgid "Cook Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:54
-msgid "Costa Rica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:55
-msgid "Cote d'Ivoire"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:56
-msgid "Countr_y:"
-msgstr "Öl_kə:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:57
-msgid "Croatia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:58
-msgid "Cuba"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:59
-msgid "Cyprus"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:60
-msgid "Czech Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:61
-msgid "Denmark"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:62
-msgid "Djibouti"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:63
-msgid "Dominica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:64
-msgid "Dominican Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:65
-msgid "East Timor"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:66
-msgid "Ecuador"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:67
-msgid "Egypt"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:68
-msgid "El Salvador"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:69
-msgid "Equatorial Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:70
-msgid "Eritrea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:71
-msgid "Estonia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:72
-msgid "Ethiopia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:73
-msgid "Falkland Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:74
-msgid "Faroe Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:75
-msgid "Fiji"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:76
-msgid "Finland"
-msgstr "Finlandiya"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:77
-#, fuzzy
-msgid "France"
-msgstr "Ləğv Edildi"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:78
-msgid "French Guiana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:79
-msgid "French Polynesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:80
-msgid "French Southern Territories"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:81
-msgid "Gabon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:82
-msgid "Gambia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:83
-msgid "Georgia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:84
-msgid "Germany"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:85
-msgid "Ghana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:86
-msgid "Gibraltar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:87
-#, fuzzy
-msgid "Greece"
-msgstr "həftə"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:88
-#, fuzzy
-msgid "Greenland"
-msgstr "Finlandiya"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:89
-#, fuzzy
-msgid "Grenada"
-msgstr "Kanada"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:90
-msgid "Guadeloupe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:91
-#, fuzzy
-msgid "Guam"
-msgstr "am"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:92
-msgid "Guatemala"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:93
-#, fuzzy
-msgid "Guinea"
-msgstr "Ümumi"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:94
-msgid "Guinea-bissau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:95
-msgid "Guyana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:96
-#, fuzzy
-msgid "Haiti"
-msgstr "ePoçt"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:97
-msgid "Heard And McDonald Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:98
-msgid "Holy See"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:99
-#, fuzzy
-msgid "Honduras"
-msgstr "saat"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:100
-msgid "Hong Kong"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:101
-#, fuzzy
-msgid "Hungary"
-msgstr "Bazar"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:102
-msgid "Iceland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:103
-msgid "India"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:104
-msgid "Indonesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:105
-msgid "Ireland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:106
-msgid "Israel"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:107
-msgid "Italy"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:108
-msgid "Jamaica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:109
-msgid "Japan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:110
-msgid "Jordan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:111
-msgid "Kazakhstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:112
-msgid "Kenya"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:113
-msgid "Kiribati"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:114
-msgid "Kuwait"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:115
-msgid "Kyrgyzstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:116
-#, fuzzy
-msgid "Laos"
-msgstr "Ən Alçaq"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:117
-msgid "Latvia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:118
-msgid "Lebanon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:119
-#, fuzzy
-msgid "Lesotho"
-msgstr "Ən Alçaq"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:120
-#, fuzzy
-msgid "Liberia"
-msgstr "Aprel"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:121
-msgid "Liechtenstein"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:122
-msgid "Lithuania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:123
-msgid "Luxembourg"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:124
-#, fuzzy
-msgid "Macau"
-msgstr "Mart"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:125
-msgid "Macedonia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:126
-msgid "Madagascar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:127
-#, fuzzy
-msgid "Malawi"
-msgstr "ePoçt"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:128
-msgid "Malaysia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:129
-msgid "Maldives"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:130
-#, fuzzy
-msgid "Mali"
-msgstr "ePoçt"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:131
-#, fuzzy
-msgid "Malta"
-msgstr "ePoçt"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:132
-msgid "Marshall Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:133
-msgid "Martinique"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:134
-msgid "Mauritania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:135
-#, fuzzy
-msgid "Mauritius"
-msgstr "Kənarlar"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:136
-#, fuzzy
-msgid "Mayotte"
-msgstr "May"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:137
-msgid "Mexico"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:138
-msgid "Micronesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:139
-#, fuzzy
-msgid "Monaco"
-msgstr "Bazar ertəsi"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:140
-msgid "Mongolia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:141
-msgid "Montserrat"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:142
-msgid "Morocco"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:143
-#, fuzzy
-msgid "Mozambique"
-msgstr "Cib telefonu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:144
-#, fuzzy
-msgid "Myanmar"
-msgstr "İdarəci"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:145
-msgid "Namibia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:146
-msgid "Nauru"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:147
-#, fuzzy
-msgid "Nepal"
-msgstr "Yeni Məktub"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:148
-#, fuzzy
-msgid "Netherlands"
-msgstr "İl_gəyi Seç"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:149
-msgid "Netherlands Antilles"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:150
-#, fuzzy
-msgid "New Caledonia"
-msgstr "Yeni əlaqə"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:151
-#, fuzzy
-msgid "New Zealand"
-msgstr "Yeni Məktub"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:152
-msgid "Nicaragua"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:153
-#, fuzzy
-msgid "Niger"
-msgstr "Yüksək"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:154
-#, fuzzy
-msgid "Nigeria"
-msgstr "Aprel"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:155
-#, fuzzy
-msgid "Niue"
-msgstr "dəqiqə"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:156
-msgid "Norfolk Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:157
-msgid "Northern Mariana Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:158
-#, fuzzy
-msgid "Norway"
-msgstr "İndi"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:159
-msgid "Oman"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:160
-#, fuzzy
-msgid "Pakistan"
-msgstr "Yapışdır"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:161
-msgid "Palau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:162
-#, fuzzy
-msgid "Panama"
-msgstr "Kanada"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:163
-msgid "Papua New Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:164
-msgid "Paraguay"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:165
-#, fuzzy
-msgid "Peru"
-msgstr "Kağız"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:166
-msgid "Philippines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:167
-msgid "Pitcairn"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:168
-#, fuzzy
-msgid "Poland"
-msgstr "Finlandiya"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:169
-#, fuzzy
-msgid "Portugal"
-msgstr "Portret"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:170
-msgid "Puerto Rico"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:171
-#, fuzzy
-msgid "Qatar"
-msgstr "sonra"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:172
-msgid "Republic Of Korea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:173
-msgid "Republic Of Moldova"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:174
-#, fuzzy
-msgid "Reunion"
-msgstr "Bölmələr :"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:175
-msgid "Romania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:176
-msgid "Russian Federation"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:177
-#, fuzzy
-msgid "Rwanda"
-msgstr "Kanada"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:178
-msgid "Saint Kitts And Nevis"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:179
-msgid "Saint Lucia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:180
-msgid "Saint Vincent And The Grena-dines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:181
-#, fuzzy
-msgid "Samoa"
-msgstr "Xal"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:182
-msgid "San Marino"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:183
-msgid "Sao Tome And Principe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:184
-msgid "Saudi Arabia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:185
-#, fuzzy
-msgid "Senegal"
-msgstr "Ümumi"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:186
-#, fuzzy
-msgid "Seychelles"
-msgstr ""
-"Vaxt\n"
-"Planlaşdır"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:187
-msgid "Sierra Leone"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:188
-msgid "Singapore"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:189
-msgid "Slovakia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:190
-msgid "Slovenia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:191
-msgid "Solomon Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:192
-#, fuzzy
-msgid "Somalia"
-msgstr "Normal"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:193
-msgid "South Africa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:194
-msgid "South Georgia And The South Sandwich Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:195
-#, fuzzy
-msgid "Spain"
-msgstr "Göndər"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:196
-msgid "Sri Lanka"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:197
-msgid "St. Helena"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:198
-msgid "St. Pierre And Miquelon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:199
-#, fuzzy
-msgid "Sudan"
-msgstr "Baz"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:200
-#, fuzzy
-msgid "Suriname"
-msgstr "Ləqəb"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:201
-msgid "Svalbard And Jan Mayen Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:202
-#, fuzzy
-msgid "Swaziland"
-msgstr "Finlandiya"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:203
-#, fuzzy
-msgid "Sweden"
-msgstr "Görülmüş"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:204
-msgid "Switzerland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:205
-#, fuzzy
-msgid "Taiwan"
-msgstr "Radio"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:206
-#, fuzzy
-msgid "Tajikistan"
-msgstr "Vəzifə"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:207
-#, fuzzy
-msgid "Thailand"
-msgstr "Finlandiya"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:208
-#, fuzzy
-msgid "Togo"
-msgstr "Gn:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:209
-msgid "Tokelau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:210
-#, fuzzy
-msgid "Tonga"
-msgstr "Bugün"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:211
-msgid "Trinidad And Tobago"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:212
-msgid "Tunisia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:213
-#, fuzzy
-msgid "Turkey"
-msgstr "Ç.a"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:214
-#, fuzzy
-msgid "Turkmenistan"
-msgstr "Zibil Qutusu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:215
-msgid "Turks And Caicos Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:216
-msgid "Tuvalu"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:217
-msgid "U.S. Virgin Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:218
-#, fuzzy
-msgid "Uganda"
-msgstr "Kanada"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:219
-msgid "Ukraine"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:220
-msgid "United Arab Emirates"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:221
-msgid "United Kingdom"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:222
-msgid "United Republic Of Tanzania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:223
-#, fuzzy
-msgid "United States"
-msgstr "Çoxlu İsmarıc"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:224
-msgid "United States Minor Outlying Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:225
-msgid "Uruguay"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:226
-msgid "Uzbekistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:227
-msgid "Vanuatu"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:228
-msgid "Venezuela"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:229
-#, fuzzy
-msgid "Viet Nam"
-msgstr "Ad Seç"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:230
-msgid "Wallis And Futuna Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:231
-msgid "Western Sahara"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:232
-#, fuzzy
-msgid "Yemen"
-msgstr "Görülmüş"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:233
-msgid "Yugoslavia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:234
-msgid "Zambia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:235
-msgid "Zimbabwe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:236
-msgid "_Address:"
-msgstr "_Ünvan :"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:237
-msgid "_City:"
-msgstr "_Şəhər:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:238
-msgid "_PO Box:"
-msgstr "_Poçt Qutusu:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:239
-msgid "_State/Province:"
-msgstr "_Vilayət"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:240
-msgid "_ZIP Code:"
-msgstr "_ZIP Kodu:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:1
-msgid "Check Full Name"
-msgstr "Tam adı yoxla"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:2
-msgid "Dr."
-msgstr "Dr."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:3
-msgid "Esq."
-msgstr "Esq."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:4
-msgid "I"
-msgstr "I"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:5
-msgid "II"
-msgstr "II"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:6
-msgid "III"
-msgstr "III"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:7
-msgid "Jr."
-msgstr "Jr."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:8
-msgid "Miss"
-msgstr "Miss"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:9
-msgid "Mr."
-msgstr "Mr."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:10
-msgid "Mrs."
-msgstr "Mrs."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:11
-msgid "Ms."
-msgstr "Ms."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:12
-msgid "Sr."
-msgstr "Sr."
-
-#: addressbook/gui/contact-editor/fullname.glade.h:13
-msgid "_First:"
-msgstr "_Ad :"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:14
-msgid "_Last:"
-msgstr "_Soyad :"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:15
-msgid "_Middle:"
-msgstr "_Orta ad:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:16
-msgid "_Suffix:"
-msgstr "_Suffiks:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:17
-msgid "_Title:"
-msgstr "B_aşlıq:"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:1
-#, fuzzy
-msgid "List _name:"
-msgstr "Fayl adı :"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:2
-#, fuzzy
-msgid "Members"
-msgstr "Dekabr"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:3
-msgid "Type an email address or drag a contact into the list below:"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:5
-msgid "_Hide addresses when sending mail to this list"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:6
-#: calendar/gui/dialogs/recurrence-page.glade.h:12 filter/filter.glade.h:10
-#, fuzzy
-msgid "_Remove"
-msgstr "Sil"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:7
-#, fuzzy
-msgid "contact-list-editor"
-msgstr "Əlaqə düzəldicisi"
-
-#. Construct the app
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:229
-#, fuzzy
-msgid "Contact List Editor"
-msgstr "Əlaqə düzəldicisi"
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:1
-msgid "Add Anyway"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:2
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:4
-msgid "Duplicate Contact Detected"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:3
-#, fuzzy
-msgid "New Contact:"
-msgstr "Yeni əlaqə"
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:4
-#, fuzzy
-msgid "Original Contact:"
-msgstr "Digər Əlaqələr"
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:5
-msgid ""
-"The name or email address of this contact already exists\n"
-"in this folder. Would you like to add it anyway?"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:1
-#, fuzzy
-msgid "Change Anyway"
-msgstr "Digər Əlaqələr"
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:2
-#, fuzzy
-msgid "Changed Contact:"
-msgstr "Digər Əlaqələr"
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:3
-msgid "Conflicting Contact:"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:5
-msgid ""
-"The changed email or name of this contact already\n"
-"exists in this folder. Would you like to add it anyway?"
-msgstr ""
-
-#: addressbook/gui/search/e-addressbook-search-dialog.c:146
-#: widgets/misc/e-filter-bar.c:243
-msgid "Advanced Search"
-msgstr "Ətraflı Axtarış"
-
-#: addressbook/gui/search/e-addressbook-search-dialog.c:152
-#: mail/mail-search.c:264
-msgid "Search"
-msgstr "Axtar"
-
-#: addressbook/gui/widgets/e-addressbook-model.c:121
-#, fuzzy
-msgid "No cards"
-msgstr "Başlamayıb"
-
-#: addressbook/gui/widgets/e-addressbook-model.c:124
-#, fuzzy
-msgid "1 card"
-msgstr "Təqvimi çap et"
-
-#: addressbook/gui/widgets/e-addressbook-model.c:127
-#, fuzzy, c-format
-msgid "%d cards"
-msgstr "%d saniyə"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:138
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:267
-#: addressbook/gui/widgets/e-addressbook-view.c:691
-#: addressbook/gui/widgets/e-addressbook-view.c:753
-#: addressbook/gui/widgets/e-addressbook-view.c:1422
-#: ui/evolution-addressbook.xml.h:19
-msgid "Save as VCard"
-msgstr "VCard olaraq qeyd et"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:266
-#: ui/evolution-message-composer.xml.h:13
-msgid "Open"
-msgstr "Aç"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:268
-#: addressbook/gui/widgets/e-addressbook-view.c:754
-#: ui/evolution-addressbook.xml.h:10
-#, fuzzy
-msgid "Forward Contact"
-msgstr "Fərqli Çatdır"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:269
-#: addressbook/gui/widgets/e-addressbook-view.c:755
-#, fuzzy
-msgid "Send Message to Contact"
-msgstr "Əlaqəyə yeni bir ismarıc göndər"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:270
-#: addressbook/gui/widgets/e-addressbook-view.c:756
-#: ui/evolution-addressbook.xml.h:16 ui/evolution-comp-editor.xml.h:8
-#: ui/evolution-contact-editor.xml.h:4 ui/evolution-mail-message.xml.h:63
-#: ui/my-evolution.xml.h:2
-msgid "Print"
-msgstr "Çap Et"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:272
-#: addressbook/gui/widgets/e-addressbook-view.c:758
-msgid "Print Envelope"
-msgstr "Zərfi Çap Et"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:274
-#: addressbook/gui/widgets/e-addressbook-view.c:760 filter/libfilter-i18n.h:11
-#: mail/mail-accounts.c:281 ui/evolution-addressbook.xml.h:8
-#: ui/evolution-comp-editor.xml.h:4 ui/evolution-contact-editor.xml.h:2
-#: ui/evolution-contact-list-editor.xml.h:2 ui/evolution-mail-message.xml.h:16
-#: ui/evolution-tasks.xml.h:8
-msgid "Delete"
-msgstr "Sil"
-
-#: addressbook/gui/widgets/e-addressbook-table-adapter.c:128
-#: addressbook/gui/widgets/e-addressbook-util.c:68
-#: addressbook/gui/widgets/e-minicard.c:452
-#, fuzzy
-msgid "Error modifying card"
-msgstr "%s yüklənərkən xəta oldu"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:34
-#, fuzzy
-msgid "Success"
-msgstr "Qaynaqlar"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:35
-#: camel/providers/imap/camel-imap-command.c:340 shell/e-shell.c:1702
-#: shell/e-storage.c:520
-msgid "Unknown error"
-msgstr "Namə'lum xəta"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:36
-#, fuzzy
-msgid "Repository offline"
-msgstr "Xətdən Qopuq İşlə"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:37 shell/e-storage.c:510
-msgid "Permission denied"
-msgstr "Qadağandır"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:38
-#, fuzzy
-msgid "Card not found"
-msgstr "Fayl tapıla bilmədi"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:39
-msgid "Card ID already exists"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-util.c:40
-#, fuzzy
-msgid "Protocol not supported"
-msgstr "Əməliyyat dəstəklənmir"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:41
-#: calendar/gui/calendar-model.c:726 calendar/gui/calendar-model.c:1247
-#: calendar/gui/dialogs/task-details-page.glade.h:3
-#: calendar/gui/e-calendar-table.c:461 camel/camel-service.c:598
-#: camel/camel-service.c:634
-msgid "Cancelled"
-msgstr "Ləğv Edildi"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:42
-#, fuzzy
-msgid "Other error"
-msgstr "G/Ç xətası"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:59
-#, fuzzy
-msgid "Error adding list"
-msgstr "%s yüklənərkən xəta oldu"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:59
-#, fuzzy
-msgid "Error adding card"
-msgstr "%s yüklənərkən xəta oldu"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:68
-#, fuzzy
-msgid "Error modifying list"
-msgstr "%s yüklənərkən xəta oldu"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:78
-#, fuzzy
-msgid "Error removing list"
-msgstr "%s yüklənərkən xəta oldu"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:78
-#: addressbook/gui/widgets/e-addressbook-view.c:1297
-#, fuzzy
-msgid "Error removing card"
-msgstr ""
-" Data oxunarkən xəta oldu:\n"
-"%s"
-
-#. Translators: put here a list of labels you want to see on buttons in
-#. addressbook. You may use any character to separate labels but it must
-#. also be placed at the begining ot the string
-#: addressbook/gui/widgets/e-addressbook-view.c:399
-msgid ",123,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"
-msgstr ""
-
-#. Translators: put here a list of characters that correspond to buttons
-#. in addressbook. You may use any character to separate labels but it
-#. must also be placed at the begining ot the string.
-#. Use lower case letters if possible.
-#: addressbook/gui/widgets/e-addressbook-view.c:404
-msgid ",0,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"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:867
-msgid "* Click here to add a contact *"
-msgstr "* Əlaqə əlavə etmək üçün buraya tıqlayın *"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:871
-msgid "Primary Phone"
-msgstr "Əsas Telefon"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:872
-msgid "Assistant Phone"
-msgstr "Köməkçi Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:873
-msgid "Business Phone"
-msgstr "İş Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:874
-msgid "Callback Phone"
-msgstr "Geri axtarma Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:875
-msgid "Company Phone"
-msgstr "Şirkət Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:876
-msgid "Home Phone"
-msgstr "Ev Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:878
-msgid "Business Address"
-msgstr "İş Ünvanı"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:879
-msgid "Home Address"
-msgstr "Ev Ünvanı"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:880
-msgid "Mobile Phone"
-msgstr "Əl Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:881
-msgid "Car Phone"
-msgstr "Maşın Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:884
-msgid "Business Phone 2"
-msgstr "2.nci İş Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:885
-msgid "Home Phone 2"
-msgstr "2.nci Ev Telefonu"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:887
-msgid "Other Phone"
-msgstr "Digər Telefonlar"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:893
-msgid "Other Address"
-msgstr "BaşqaÜnvanlar"
-
-#: addressbook/gui/widgets/e-minicard-control.c:283
-msgid "Save in addressbook"
-msgstr "Ünvan dəftərinə qeyd et"
-
-#: addressbook/gui/widgets/e-minicard-view.c:151
-msgid ""
-"\n"
-"\n"
-"There are no items to show in this view\n"
-"\n"
-"Double-click here to create a new Contact."
-msgstr ""
-"\n"
-"\n"
-"Bu görünüşdə göstəriləcək üzvlər yoxdur\n"
-"\n"
-"Buraya cüt-tıqlayaraq bir əlaqə üzvünü yarat."
-
-#: addressbook/gui/widgets/gal-view-factory-minicard.c:26
-msgid "Card View"
-msgstr "Kart Nümayişi "
-
-#: addressbook/printing/e-contact-print.glade.h:1
-msgid "10 pt. Tahoma"
-msgstr "10 pt. Tahoma"
-
-#: addressbook/printing/e-contact-print.glade.h:2
-msgid "8 pt. Tahoma"
-msgstr "8 pt. Tahoma"
-
-#: addressbook/printing/e-contact-print.glade.h:3
-msgid "Blank forms at end:"
-msgstr "Sonunda boş formlar olsun :"
-
-#: addressbook/printing/e-contact-print.glade.h:4
-msgid "Body"
-msgstr "İçindəkilər"
-
-#: addressbook/printing/e-contact-print.glade.h:5
-msgid "Bottom:"
-msgstr "Alt :"
-
-#: addressbook/printing/e-contact-print.glade.h:6
-msgid "Dimensions:"
-msgstr "Ölçülər :"
-
-#: addressbook/printing/e-contact-print.glade.h:7
-#, fuzzy
-msgid "F_ont..."
-msgstr "Yazı növü ..."
-
-#: addressbook/printing/e-contact-print.glade.h:8
-msgid "Fonts"
-msgstr "Yazı növləri"
-
-#: addressbook/printing/e-contact-print.glade.h:9
-msgid "Footer:"
-msgstr "Axırıncı :"
-
-#: addressbook/printing/e-contact-print.glade.h:10
-msgid "Format"
-msgstr "Şəkil"
-
-#: addressbook/printing/e-contact-print.glade.h:11
-msgid "Header"
-msgstr "Başlıq"
-
-#: addressbook/printing/e-contact-print.glade.h:12
-msgid "Header/Footer"
-msgstr "Başlıq/axırıncı"
-
-#: addressbook/printing/e-contact-print.glade.h:13
-msgid "Headings"
-msgstr "Başlıqlar"
-
-#: addressbook/printing/e-contact-print.glade.h:14
-msgid "Headings for each letter"
-msgstr "Hər bir məktub üçün üst yazı"
-
-#: addressbook/printing/e-contact-print.glade.h:15
-msgid "Height:"
-msgstr "Hündürlük :"
-
-#: addressbook/printing/e-contact-print.glade.h:16
-msgid "Immediately follow each other"
-msgstr "Arxa arxaya"
-
-#: addressbook/printing/e-contact-print.glade.h:17
-msgid "Include:"
-msgstr "Daxil et :"
-
-#: addressbook/printing/e-contact-print.glade.h:18
-msgid "Landscape"
-msgstr "Mənzərə"
-
-#: addressbook/printing/e-contact-print.glade.h:19
-msgid "Left:"
-msgstr "Sol :"
-
-#: addressbook/printing/e-contact-print.glade.h:20
-msgid "Letter tabs on side"
-msgstr "Məktub tab'lərini bir tərəfə yığ"
-
-#: addressbook/printing/e-contact-print.glade.h:21
-msgid "Margins"
-msgstr "Kənarlar"
-
-#: addressbook/printing/e-contact-print.glade.h:22
-msgid "Number of columns:"
-msgstr "Sütunların miqdarı :"
-
-#: addressbook/printing/e-contact-print.glade.h:23
-msgid "Options"
-msgstr "Seçənəklər"
-
-#: addressbook/printing/e-contact-print.glade.h:24
-msgid "Orientation"
-msgstr "İstiqamət"
-
-#: addressbook/printing/e-contact-print.glade.h:25
-msgid "Page"
-msgstr "Səhifə"
-
-#: addressbook/printing/e-contact-print.glade.h:26
-msgid "Page Setup:"
-msgstr "Səhifə Quruluşu:"
-
-#: addressbook/printing/e-contact-print.glade.h:27
-msgid "Paper"
-msgstr "Kağız"
-
-#: addressbook/printing/e-contact-print.glade.h:28
-msgid "Paper source:"
-msgstr "Kağız qaynağı :"
-
-#: addressbook/printing/e-contact-print.glade.h:29
-msgid "Portrait"
-msgstr "Portret"
-
-#: addressbook/printing/e-contact-print.glade.h:30
-msgid "Preview:"
-msgstr "Nümayiş :"
-
-#: addressbook/printing/e-contact-print.glade.h:31
-msgid "Print using gray shading"
-msgstr "Boz kölgələməyi işlədərk yazdır"
-
-#: addressbook/printing/e-contact-print.glade.h:32
-msgid "Reverse on even pages"
-msgstr "Ikili səhifələri tərs çevir"
-
-#: addressbook/printing/e-contact-print.glade.h:33
-msgid "Right:"
-msgstr "Sağ :"
-
-#: addressbook/printing/e-contact-print.glade.h:34
-msgid "Sections:"
-msgstr "Bölmələr :"
-
-#: addressbook/printing/e-contact-print.glade.h:35
-msgid "Shading"
-msgstr "Kölgələmə"
-
-#: addressbook/printing/e-contact-print.glade.h:36
-msgid "Size:"
-msgstr "Böyüklük :"
-
-#: addressbook/printing/e-contact-print.glade.h:37
-msgid "Start on a new page"
-msgstr "Yeni bir səhifə ilə başla"
-
-#: addressbook/printing/e-contact-print.glade.h:38
-msgid "Style name:"
-msgstr "Tərz adı :"
-
-#: addressbook/printing/e-contact-print.glade.h:39
-msgid "Top:"
-msgstr "Üst :"
-
-#: addressbook/printing/e-contact-print.glade.h:40
-msgid "Type:"
-msgstr "Növ:"
-
-#: addressbook/printing/e-contact-print.glade.h:41
-msgid "Width:"
-msgstr "En :"
-
-#: addressbook/printing/e-contact-print.glade.h:42
-#, fuzzy
-msgid "_Font..."
-msgstr "Yazı növü ..."
-
-#: addressbook/printing/e-contact-print.c:1092
-#, fuzzy
-msgid "Print cards"
-msgstr "Təqvimi çap et"
-
-#: addressbook/printing/e-contact-print.c:1152
-#: addressbook/printing/e-contact-print.c:1174
-#, fuzzy
-msgid "Print card"
-msgstr "Təqvimi çap et"
-
-#: addressbook/printing/e-contact-print-envelope.c:216
-#: addressbook/printing/e-contact-print-envelope.c:237
-#, fuzzy
-msgid "Print envelope"
-msgstr "Zərfi Çap Et"
-
-#: calendar/cal-util/cal-util.c:418 calendar/cal-util/cal-util.c:440
-#: calendar/gui/dialogs/task-details-page.glade.h:6
-#: calendar/gui/e-calendar-table.c:385 mail/message-list.c:652
-msgid "High"
-msgstr "Yüksək"
-
-#: calendar/cal-util/cal-util.c:420 calendar/cal-util/cal-util.c:442
-#: calendar/gui/calendar-model.c:1673
-#: calendar/gui/dialogs/task-details-page.glade.h:9
-#: calendar/gui/e-calendar-table.c:386 mail/message-list.c:651
-msgid "Normal"
-msgstr "Normal"
-
-#: calendar/cal-util/cal-util.c:422 calendar/cal-util/cal-util.c:444
-#: calendar/gui/dialogs/task-details-page.glade.h:8
-#: calendar/gui/e-calendar-table.c:387 mail/message-list.c:650
-msgid "Low"
-msgstr "Alçaq"
-
-#. An empty string is the same as 'None'.
-#: calendar/cal-util/cal-util.c:438
-#: calendar/gui/dialogs/task-details-page.glade.h:13
-#: calendar/gui/e-calendar-table.c:388
-msgid "Undefined"
-msgstr "Təsvirsiz"
-
-#: calendar/conduits/calendar/calendar-conduit.c:793
-#: calendar/conduits/todo/todo-conduit.c:564
-msgid "Error while communicating with calendar server"
-msgstr "Təqvim vericisi ilə bağlantı qurulurkən xəta oldu"
-
-#: calendar/conduits/calendar/calendar-conduit.c:896
-#: calendar/conduits/calendar/calendar-conduit.c:899
-msgid "Could not read pilot's Calendar application block"
-msgstr "Pilot Təqvim əlavələri bloku oxuna bilmədi"
-
-#: calendar/conduits/todo/todo-conduit.c:668
-#: calendar/conduits/todo/todo-conduit.c:671
-msgid "Could not read pilot's ToDo application block"
-msgstr "Pilot Ediləcəklər əlavələri bloku oxuna bilmədi"
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:1
-msgid "A sample Bonobo control which displays an calendar."
-msgstr "Təqvim göstərən Bonobo idarə nümunəsi."
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:2
-msgid "Evolution calendar executive summary component."
-msgstr "Evolutionun İcracı mündəricat parçası."
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:3
-msgid "Evolution calendar iTip/iMip viewer"
-msgstr "Evolution Təqvim iTip/iMip Nümayişçisi"
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:4
-msgid "Evolution component for handling the calendar."
-msgstr "'Evolution'un Təqvim əlavəsi."
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:5
-msgid "Factory for the Calendar Summary component."
-msgstr "Təqvim Mündəricatı parçası e'malatxanası."
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:6
-msgid "Factory for the calendar iTip view control"
-msgstr "Təqvim iTip nümayiş idarəsi e'malatxanası."
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:7
-msgid "Factory for the sample Calendar control"
-msgstr "Nümunəvi Təqvim idarəsi e'malaxanası"
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:8
-#, fuzzy
-msgid "Factory to centralize calendar component editor dialogs"
-msgstr "Evolutionun təqvim parçasının mərkəzi."
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:9
-#, fuzzy
-msgid "Factory to create a component editor factory"
-msgstr "Evolutionun təqvim parçasının mərkəzi."
-
-#: calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in.h:1
-msgid "Alarm notification service"
-msgstr "Alarm vermə xidməti"
-
-#: calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in.h:2
-msgid "Factory for the alarm notification service"
-msgstr "Alarm vermə xidməti e'malatxanası"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:152
-#, fuzzy, c-format
-msgid "Notification about your appointment starting on %s and ending on %s"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:156
-#, fuzzy, c-format
-msgid "Notification about your appointment starting on %s"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:161
-#, fuzzy, c-format
-msgid "Notification about your appointment ending on %s"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:165
-#, fuzzy
-msgid "Notification about your appointment"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:172
-#, fuzzy, c-format
-msgid "Notification about your task starting on %s and ending on %s"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:176
-#, fuzzy, c-format
-msgid "Notification about your task starting on %s"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:181
-#, fuzzy, c-format
-msgid "Notification about your task ending on %s"
-msgstr "%A %b %d %Y %H:%M'dəki iclas üçün bildiriş"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:185
-#, fuzzy
-msgid "Notification about your task"
-msgstr "\"Evolution\" haqqında mə'lumat göstər"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:267
-msgid "Alarm on %A %b %d %Y %H:%M"
-msgstr "%A %b %d %Y %H:%M'də bildir"
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:1
-#: ui/evolution-comp-editor.xml.h:1
-#, fuzzy
-msgid "C_lose"
-msgstr "Qapat"
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:2
-#, fuzzy
-msgid "Snoo_ze"
-msgstr "Mürgülə"
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:3
-msgid "Snooze time (minutes)"
-msgstr "Xəbərdarlıq vaxtı ( dəqiqə )"
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:4
-#, fuzzy
-msgid "_Edit appointment"
-msgstr "İclası düzəlt"
-
-#: calendar/gui/alarm-notify/alarm-queue.c:629
-#, fuzzy
-msgid "No description available."
-msgstr "Mündəricat yoxdur."
-
-#: calendar/gui/alarm-notify/alarm-queue.c:689
-msgid ""
-"Evolution does not support calendar reminders with\n"
-"email notifications yet, but this reminder was\n"
-"configured to send an email. Evolution will display\n"
-"a normal reminder dialog box instead."
-msgstr ""
-
-#: calendar/gui/alarm-notify/alarm-queue.c:740
-#, c-format
-msgid ""
-"An Evolution Calendar reminder is about to trigger.\n"
-"This reminder is configured to run the following program:\n"
-"\n"
-" %s\n"
-"\n"
-"Are you sure you want to run this program?"
-msgstr ""
-
-#: calendar/gui/alarm-notify/notify-main.c:73 calendar/gui/main.c:58
-msgid "Could not initialize GNOME"
-msgstr "GNOME başladıla bilmədi"
-
-#: calendar/gui/alarm-notify/notify-main.c:81 calendar/gui/main.c:106
-#, fuzzy
-msgid "Could not initialize gnome-vfs"
-msgstr "Bonoboyu başlada bilmədim"
-
-#: calendar/gui/alarm-notify/notify-main.c:90
-msgid "Could not create the alarm notify service factory"
-msgstr "Alarm vermə xidməti e'malatxanası yaradıla bilmir"
-
-#: calendar/gui/calendar-commands.c:439
-#, fuzzy
-msgid "%A %d %B %Y"
-msgstr "%A, %e %B %Y"
-
-#. strftime format %a = abbreviated weekday name, %d = day of month,
-#. %b = abbreviated month name. Don't use any other specifiers.
-#: calendar/gui/calendar-commands.c:442 calendar/gui/e-day-view-top-item.c:289
-#: calendar/gui/e-day-view.c:1388 calendar/gui/e-week-view-main-item.c:334
-msgid "%a %d %b"
-msgstr "%a %b %d"
-
-#: calendar/gui/calendar-commands.c:444 calendar/gui/calendar-commands.c:449
-#: calendar/gui/calendar-commands.c:451
-#, fuzzy
-msgid "%a %d %b %Y"
-msgstr "%a %b %d"
-
-#: calendar/gui/calendar-commands.c:462 calendar/gui/calendar-commands.c:469
-#: calendar/gui/calendar-commands.c:475 calendar/gui/calendar-commands.c:477
-#, fuzzy
-msgid "%d %B %Y"
-msgstr "%A, %e %B %Y"
-
-#. strftime format %d = day of month, %B = full
-#. month name. You can change the order but don't
-#. change the specifiers or add anything.
-#: calendar/gui/calendar-commands.c:467
-#: calendar/gui/e-week-view-main-item.c:342 calendar/gui/print.c:1446
-msgid "%d %B"
-msgstr "%d %B"
-
-#: calendar/gui/calendar-commands.c:677
-msgid ""
-"Could not create the calendar view. Please check your ORBit and OAF setup."
-msgstr ""
-"Təqvimin görünüşü quraşdırıla bilmir. Lütfən ORBIT və OAF qurğularınızı "
-"yoxlayın."
-
-#: calendar/gui/calendar-model.c:399 calendar/gui/calendar-model.c:994
-#: calendar/gui/e-calendar-table.c:364
-msgid "Private"
-msgstr "Şəxsi"
-
-#: calendar/gui/calendar-model.c:402 calendar/gui/calendar-model.c:996
-#: calendar/gui/e-calendar-table.c:365
-msgid "Confidential"
-msgstr "Gizli"
-
-#: calendar/gui/calendar-model.c:405 calendar/gui/e-calendar-table.c:363
-msgid "Public"
-msgstr "Ümumi"
-
-#: calendar/gui/calendar-model.c:498
-msgid "N"
-msgstr "N"
-
-#: calendar/gui/calendar-model.c:498
-msgid "S"
-msgstr "Baz."
-
-#: calendar/gui/calendar-model.c:500
-msgid "E"
-msgstr "E"
-
-#: calendar/gui/calendar-model.c:500
-msgid "W"
-msgstr "Çərş."
-
-#: calendar/gui/calendar-model.c:566 calendar/gui/calendar-model.c:1193
-#: calendar/gui/e-calendar-table.c:437
-#, fuzzy
-msgid "Free"
-msgstr "həftə"
-
-#: calendar/gui/calendar-model.c:568 calendar/gui/e-calendar-table.c:438
-#: calendar/gui/e-meeting-time-sel.c:393
-msgid "Busy"
-msgstr "Məşğul"
-
-#: calendar/gui/calendar-model.c:717 calendar/gui/calendar-model.c:1241
-#: calendar/gui/dialogs/task-details-page.glade.h:10
-#: calendar/gui/e-calendar-table.c:458
-msgid "Not Started"
-msgstr "Başlamayıb"
-
-#: calendar/gui/calendar-model.c:720 calendar/gui/calendar-model.c:1243
-#: calendar/gui/dialogs/task-details-page.glade.h:7
-#: calendar/gui/e-calendar-table.c:459
-msgid "In Progress"
-msgstr "İşləyir"
-
-#: calendar/gui/calendar-model.c:723 calendar/gui/calendar-model.c:1245
-#: calendar/gui/dialogs/task-details-page.glade.h:4
-#: calendar/gui/e-calendar-table.c:460 calendar/gui/e-meeting-model.c:298
-#: calendar/gui/e-meeting-model.c:321
-msgid "Completed"
-msgstr "Bitirmə Tarixi"
-
-#. strftime format of a weekday, a date and a time, 24-hour.
-#: calendar/gui/calendar-model.c:908 e-util/e-time-utils.c:163
-#: e-util/e-time-utils.c:354
-msgid "%a %m/%d/%Y %H:%M:%S"
-msgstr "%a %m/%d/%Y %H:%M:%S"
-
-#. strftime format of a weekday, a date and a time, 12-hour.
-#: calendar/gui/calendar-model.c:911 e-util/e-time-utils.c:158
-#: e-util/e-time-utils.c:363
-msgid "%a %m/%d/%Y %I:%M:%S %p"
-msgstr "%a %m/%d/%Y %I:%M:%S %p"
-
-#: calendar/gui/calendar-model.c:916
-#, c-format
-msgid ""
-"The date must be entered in the format: \n"
-"\n"
-"%s"
-msgstr ""
-"Tarix öz şəklində verilməlidir: \n"
-"\n"
-"%s"
-
-#: calendar/gui/calendar-model.c:1080
-msgid ""
-"The geographical position must be entered in the format: \n"
-"\n"
-"45.436845,125.862501"
-msgstr ""
-"Coğrafi yer bu şəkildə bildirilməlidir: \n"
-"\n"
-"45.436845,125.862501"
-
-#: calendar/gui/calendar-model.c:1120
-msgid "The percent value must be between 0 and 100, inclusive"
-msgstr "Faiz qiyməti ikisi də daxil olam üzərə 0 ilə 100 arasında olmalıdır"
-
-#. An empty string is the same as 'None'.
-#: calendar/gui/calendar-model.c:1239 calendar/gui/dialogs/meeting-page.c:332
-#: calendar/gui/dialogs/meeting-page.glade.h:1 mail/mail-account-gui.c:1446
-#: mail/mail-accounts.c:143 mail/mail-accounts.c:390
-#: mail/mail-config.glade.h:50
-#: widgets/e-timezone-dialog/e-timezone-dialog.c:203
-#: widgets/misc/e-cell-date-edit.c:240 widgets/misc/e-dateedit.c:453
-#: widgets/misc/e-dateedit.c:1453 widgets/misc/e-dateedit.c:1568
-msgid "None"
-msgstr "Yoxdur"
-
-#: calendar/gui/calendar-model.c:1675
-msgid "Recurring"
-msgstr "Təkrarlayan"
-
-#: calendar/gui/calendar-model.c:1677
-msgid "Assigned"
-msgstr "Vəzifələndirilmiş"
-
-#: calendar/gui/calendar-model.c:1683 calendar/gui/e-meeting-model.c:270
-#: calendar/gui/e-meeting-model.c:280 calendar/gui/e-meeting-model.c:506
-#: calendar/gui/e-meeting-model.c:702
-msgid "Yes"
-msgstr "Bəli"
-
-#: calendar/gui/calendar-model.c:1683 calendar/gui/e-meeting-model.c:282
-#: calendar/gui/e-meeting-model.c:703
-msgid "No"
-msgstr "Xeyr"
-
-#: calendar/gui/calendar-view-factory.c:149 views/calendar/galview.xml.h:1
-#, fuzzy
-msgid "Day View"
-msgstr "Kart Nümayişi "
-
-#: calendar/gui/calendar-view-factory.c:152 views/calendar/galview.xml.h:4
-#, fuzzy
-msgid "Work Week View"
-msgstr "İ_ş həftəsi"
-
-#: calendar/gui/calendar-view-factory.c:155 views/calendar/galview.xml.h:3
-#, fuzzy
-msgid "Week View"
-msgstr "Görünüşləri Müəyyənləşdir"
-
-#: calendar/gui/calendar-view-factory.c:158 views/calendar/galview.xml.h:2
-#, fuzzy
-msgid "Month View"
-msgstr "Ay"
-
-#: calendar/gui/cal-search-bar.c:56
-msgid "Summary contains"
-msgstr "Xülasə daxil edən"
-
-#: calendar/gui/cal-search-bar.c:57
-#, fuzzy
-msgid "Description contains"
-msgstr "İzah :"
-
-#: calendar/gui/cal-search-bar.c:58
-msgid "Comment contains"
-msgstr "Şərh daxil edən"
-
-#: calendar/gui/cal-search-bar.c:416 mail/mail-ops.c:1054
-msgid "Unmatched"
-msgstr ""
-
-#: calendar/gui/component-factory.c:63 my-evolution/my-evolution.glade.h:6
-#: shell/e-local-storage.c:172 shell/e-shortcuts.c:1056
-msgid "Calendar"
-msgstr "Təqvim"
-
-#: calendar/gui/component-factory.c:64
-msgid "Folder containing appointments and events"
-msgstr ""
-
-#: calendar/gui/component-factory.c:68 calendar/gui/print.c:1723
-#: my-evolution/e-summary-tasks.c:237 my-evolution/e-summary-tasks.c:253
-#: shell/e-local-storage.c:178 shell/e-shortcuts.c:1059
-#: views/tasks/galview.xml.h:1
-msgid "Tasks"
-msgstr "Vəzifə"
-
-#: calendar/gui/component-factory.c:69
-#, fuzzy
-msgid "Folder containing to-do items"
-msgstr "Məktublaşma Qrupundakı VFolder"
-
-#: calendar/gui/component-factory.c:581 ui/evolution-calendar.xml.h:7
-msgid "Create a new appointment"
-msgstr "Yeni bir iclas yarat"
-
-#: calendar/gui/component-factory.c:582 calendar/gui/e-day-view.c:3422
-#, fuzzy
-msgid "New _Appointment"
-msgstr "Yeni İclas"
-
-#: calendar/gui/component-factory.c:587 ui/evolution-calendar.xml.h:8
-#: ui/evolution-tasks.xml.h:5
-msgid "Create a new task"
-msgstr "Yeni bir vəzifə yarat"
-
-#: calendar/gui/component-factory.c:588
-#, fuzzy
-msgid "New _Task"
-msgstr "Yeni Vəzifə"
-
-#: calendar/gui/control-factory.c:128
-msgid "The URI that the calendar will display"
-msgstr "Təqvimin göstərəcəyi URI"
-
-#: calendar/gui/dialogs/alarm-options.c:359
-#, fuzzy
-msgid "Audio Alarm Options"
-msgstr "Səsli Alarmlar"
-
-#: calendar/gui/dialogs/alarm-options.c:368
-#, fuzzy
-msgid "Message Alarm Options"
-msgstr "Alıcılar Siyahısı :"
-
-#: calendar/gui/dialogs/alarm-options.c:377
-#, fuzzy
-msgid "Mail Alarm Options"
-msgstr "Göstərmə Seçənəkləri :"
-
-#: calendar/gui/dialogs/alarm-options.c:386
-msgid "Program Alarm Options"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.c:395
-msgid "Unknown Alarm Options"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:1
-msgid "Alarm Repeat"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:2
-#, fuzzy
-msgid "Message to Display"
-msgstr "İsmarıc saxlanması"
-
-#: calendar/gui/dialogs/alarm-options.glade.h:3
-#, fuzzy
-msgid "Play sound:"
-msgstr "Səs çal"
-
-#: calendar/gui/dialogs/alarm-options.glade.h:4
-msgid "Repeat the alarm"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:5
-#, fuzzy
-msgid "Run program:"
-msgstr "Proqramı işə sal"
-
-#: calendar/gui/dialogs/alarm-options.glade.h:6
-msgid ""
-"This is an email reminder, but Evolution does not yet support this kind of "
-"reminders. You will not be able to edit the options for this reminder."
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:7
-msgid "With these arguments:"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:8 filter/filter-datespec.c:83
-msgid "days"
-msgstr "gün"
-
-#: calendar/gui/dialogs/alarm-options.glade.h:9
-#, fuzzy
-msgid "extra times every"
-msgstr "Güncəlləməlri hər "
-
-#: calendar/gui/dialogs/alarm-options.glade.h:10 filter/filter-datespec.c:84
-msgid "hours"
-msgstr "saat"
-
-#: calendar/gui/dialogs/alarm-options.glade.h:11 filter/filter-datespec.c:85
-msgid "minutes"
-msgstr "dəqiqə"
-
-#: calendar/gui/dialogs/alarm-page.c:307
-#, fuzzy, c-format
-msgid "%d days"
-msgstr "%d gün"
-
-#: calendar/gui/dialogs/alarm-page.c:310
-#, fuzzy
-msgid "1 day"
-msgstr "1 gün"
-
-#: calendar/gui/dialogs/alarm-page.c:315
-#, fuzzy, c-format
-msgid "%d weeks"
-msgstr "%d həftə"
-
-#: calendar/gui/dialogs/alarm-page.c:318
-#, fuzzy
-msgid "1 week"
-msgstr "2 həftə"
-
-#: calendar/gui/dialogs/alarm-page.c:323
-#, fuzzy, c-format
-msgid "%d hours"
-msgstr "%d saat"
-
-#: calendar/gui/dialogs/alarm-page.c:326
-#, fuzzy
-msgid "1 hour"
-msgstr "1 saat"
-
-#: calendar/gui/dialogs/alarm-page.c:331
-#, fuzzy, c-format
-msgid "%d minutes"
-msgstr "%d dəqiqə"
-
-#: calendar/gui/dialogs/alarm-page.c:334
-#, fuzzy
-msgid "1 minute"
-msgstr "1 dəqiqə"
-
-#: calendar/gui/dialogs/alarm-page.c:339
-#, fuzzy, c-format
-msgid "%d seconds"
-msgstr "%d saniyə"
-
-#: calendar/gui/dialogs/alarm-page.c:342
-#, fuzzy
-msgid "1 second"
-msgstr "1 saniyə"
-
-#: calendar/gui/dialogs/alarm-page.c:373
-#: calendar/gui/dialogs/alarm-page.glade.h:4
-msgid "Play a sound"
-msgstr "Səs çal"
-
-#: calendar/gui/dialogs/alarm-page.c:377
-#: calendar/gui/dialogs/alarm-page.glade.h:3
-#, fuzzy
-msgid "Display a message"
-msgstr "Bütün ismarıc başlıqlarını göstər"
-
-#: calendar/gui/dialogs/alarm-page.c:381
-msgid "Send an email"
-msgstr "ePoçt göndər"
-
-#: calendar/gui/dialogs/alarm-page.c:385
-#: calendar/gui/dialogs/alarm-page.glade.h:6
-msgid "Run a program"
-msgstr "Proqramı işə sal"
-
-#: calendar/gui/dialogs/alarm-page.c:391
-#, fuzzy
-msgid "Unknown action to be performed"
-msgstr "Namə'lum xəta"
-
-#: calendar/gui/dialogs/alarm-page.c:403
-#, fuzzy, c-format
-msgid "%s %s before the start of the appointment"
-msgstr "iclasın başlanğıcından əvvəl"
-
-#: calendar/gui/dialogs/alarm-page.c:406
-#, fuzzy, c-format
-msgid "%s %s after the start of the appointment"
-msgstr "iclasın başlanğıcından əvvəl"
-
-#: calendar/gui/dialogs/alarm-page.c:411
-#, fuzzy, c-format
-msgid "%s at the start of the appointment"
-msgstr "iclasın başlanğıcından əvvəl"
-
-#: calendar/gui/dialogs/alarm-page.c:420
-#, fuzzy, c-format
-msgid "%s %s before the end of the appointment"
-msgstr "iclasın başlanğıcından əvvəl"
-
-#: calendar/gui/dialogs/alarm-page.c:423
-#, fuzzy, c-format
-msgid "%s %s after the end of the appointment"
-msgstr "iclas qurtarandan sonra"
-
-#: calendar/gui/dialogs/alarm-page.c:428
-#, fuzzy, c-format
-msgid "%s at the end of the appointment"
-msgstr "iclas qurtarandan sonra"
-
-#: calendar/gui/dialogs/alarm-page.c:439
-#, fuzzy, c-format
-msgid "%s at an unknown time"
-msgstr "Namə'lum xəta"
-
-#: calendar/gui/dialogs/alarm-page.c:445
-#, fuzzy, c-format
-msgid "%s at %s"
-msgstr "%s verici %s"
-
-#: calendar/gui/dialogs/alarm-page.c:452
-#, c-format
-msgid "%s for an unknown trigger type"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:1
-#: calendar/gui/dialogs/recurrence-page.glade.h:2
-#, fuzzy
-msgid "Basics"
-msgstr "Əsas"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:2
-#: calendar/gui/dialogs/recurrence-page.glade.h:3
-#, fuzzy
-msgid "Date/Time:"
-msgstr "Tarix və Vaxt"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:5
-msgid "Reminders"
-msgstr "Xatırladıcılar"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:7
-#: calendar/gui/dialogs/recurrence-page.glade.h:8
-#: calendar/gui/e-itip-control.glade.h:11
-msgid "Summary:"
-msgstr "Mündəricat:"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:10
-#, fuzzy
-msgid "_Options..."
-msgstr "_Seçənəklər"
-
-#. Automatically generated. Do not edit.
-#: calendar/gui/dialogs/alarm-page.glade.h:11 filter/libfilter-i18n.h:2
-msgid "after"
-msgstr "sonra"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:12 filter/libfilter-i18n.h:6
-msgid "before"
-msgstr "əvvəl"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:13
-#: calendar/gui/dialogs/recurrence-page.glade.h:14
-msgid "day(s)"
-msgstr "gün(lər)"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:14
-msgid "end of appointment"
-msgstr "görüşün sonu"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:15
-msgid "hour(s)"
-msgstr "saat"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:16 mail/mail-config.glade.h:116
-msgid "minute(s)"
-msgstr "dəqiqə"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:17
-msgid "start of appointment"
-msgstr "iclasın başlanğıcı"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:1
-msgid "05 minutes"
-msgstr "05 dəqiqə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:2
-msgid "10 minutes"
-msgstr "10 dəqiqə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:3
-msgid "15 minutes"
-msgstr "15 dəqiqə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:4
-msgid "30 minutes"
-msgstr "30 dəqiqə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:5
-msgid "60 minutes"
-msgstr "60 dəqiqə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:6
-#, fuzzy
-msgid "Calendar and Tasks Settings"
-msgstr "_Məktub Qurğuları..."
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:7
-msgid "Color for overdue tasks"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:8
-msgid "Color for tasks due today"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:9
-#, fuzzy
-msgid "Create new appointments with a default _reminder"
-msgstr "Yeni bir iclas yarat"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:10
-#, fuzzy
-msgid "Days"
-msgstr "Gün"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:11
-#, fuzzy
-msgid "First day of wee_k:"
-msgstr "Həftənin ilk günü:"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:12
-#: calendar/gui/dialogs/recurrence-page.c:955
-msgid "Friday"
-msgstr "Cümə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:13
-#, fuzzy
-msgid "Hours"
-msgstr "saat"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:14
-#, fuzzy
-msgid "Minutes"
-msgstr "dəqiqə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:15
-#: calendar/gui/dialogs/recurrence-page.c:951
-msgid "Monday"
-msgstr "Bazar ertəsi"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:16
-#, fuzzy
-msgid "O_verdue tasks:"
-msgstr "Vaxtı Keçmiş İşlər"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:17
-#: calendar/gui/dialogs/recurrence-page.c:956
-msgid "Saturday"
-msgstr "Şənbə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:18
-#, fuzzy
-msgid "Show appointment _end times in week and month views"
-msgstr "Görüşlərin sonlanma tarixini göstər"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:19
-#, fuzzy
-msgid "Show week _numbers in date navigator"
-msgstr "Həftə Sayısını göstər"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:20
-#, fuzzy
-msgid "Sta_rt of day:"
-msgstr "Gübüb başlanğıcı:"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:21
-#, fuzzy
-msgid "Su_n"
-msgstr "Baz"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:22
-#: calendar/gui/dialogs/recurrence-page.c:957
-msgid "Sunday"
-msgstr "Bazar"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:23
-#, fuzzy
-msgid "T_hu"
-msgstr "C.a"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:24
-#, fuzzy
-msgid "T_ue"
-msgstr "Ç.a"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:25
-#, fuzzy
-msgid "Tas_ks due today:"
-msgstr "Bügunki İşlər"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:26
-#: calendar/gui/dialogs/recurrence-page.c:954
-msgid "Thursday"
-msgstr "Cümə Axşamı"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:27
-#, fuzzy
-msgid "Time"
-msgstr "Başlıq"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:28
-#, fuzzy
-msgid "Time _zone:"
-msgstr ""
-"\n"
-"Zaman zolağı: "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:29
-#, fuzzy
-msgid "Time di_visions:"
-msgstr "Vaxt Dilimləri:"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:30
-msgid "Time format:"
-msgstr "Vaxt Şəkli:"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:31
-#: calendar/gui/dialogs/recurrence-page.c:952
-msgid "Tuesday"
-msgstr "Çərşənbə axşamı"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:32
-#: calendar/gui/dialogs/recurrence-page.c:953
-msgid "Wednesday"
-msgstr "Çərşənbə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:33
-#: ui/evolution-calendar.xml.h:33
-#, fuzzy
-msgid "Work Week"
-msgstr "İ_ş həftəsi"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:34
-#, fuzzy
-msgid "_12 hour (AM/PM)"
-msgstr "12 saat (am/pm)"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:35
-#, fuzzy
-msgid "_24 hour"
-msgstr "24 saat"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:36
-msgid "_Ask for confirmation when deleting items"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:37
-#, fuzzy
-msgid "_Compress weekends in month view"
-msgstr "Həftə sonlarını sıxışdır"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:38
-#, fuzzy
-msgid "_Display"
-msgstr "Ekran"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:39
-#, fuzzy
-msgid "_End of day:"
-msgstr "Gün sonu:"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:40
-#, fuzzy
-msgid "_Fri"
-msgstr "Cüm"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:41
-#, fuzzy
-msgid "_General"
-msgstr "Ümumi"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:42
-#, fuzzy
-msgid "_Hide completed tasks after"
-msgstr "Silinən İsmarıcları Gizlət"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:43
-#, fuzzy
-msgid "_Mon"
-msgstr "B.e"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:44
-#, fuzzy
-msgid "_Other"
-msgstr "Başqa"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:45
-#, fuzzy
-msgid "_Sat"
-msgstr "Şn"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:46
-#, fuzzy
-msgid "_Task List"
-msgstr "Vəzifə"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:47
-#, fuzzy
-msgid "_Wed"
-msgstr "Çər"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:48
-#, fuzzy
-msgid "before the start of the appointment"
-msgstr "iclasın başlanğıcından əvvəl"
-
-#: calendar/gui/dialogs/cancel-comp.c:52
-msgid "The meeting status has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/cancel-comp.c:58
-#, fuzzy
-msgid "Are you sure you want to cancel and delete this meeting?"
-msgstr "Bu hesabı həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/cancel-comp.c:63
-#, fuzzy
-msgid "Are you sure you want to cancel and delete this task?"
-msgstr "Bu `%s' vəzifəsini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/cancel-comp.c:68
-#, fuzzy
-msgid "Are you sure you want to cancel and delete this journal entry?"
-msgstr "Bu `%s' jurnal girişini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/changed-comp.c:60
-msgid "This event has been deleted."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:64
-msgid "This task has been deleted."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:68
-msgid "This journal entry has been deleted."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:77
-#, c-format
-msgid "%s You have made changes. Forget those changes and close the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:79
-#, c-format
-msgid "%s You have made no changes, close the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:84
-msgid "This event has been changed."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:88
-msgid "This task has been changed."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:92
-msgid "This journal entry has been changed."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:101
-#, c-format
-msgid "%s You have made changes. Forget those changes and update the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:103
-#, c-format
-msgid "%s You have made no changes, update the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:167 calendar/gui/print.c:2132
-msgid " to "
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:171 calendar/gui/print.c:2136
-#, fuzzy
-msgid " (Completed "
-msgstr "Bitirmə Tarixi"
-
-#: calendar/gui/dialogs/comp-editor-util.c:173 calendar/gui/print.c:2138
-#, fuzzy
-msgid "Completed "
-msgstr "Bitirmə Tarixi"
-
-#: calendar/gui/dialogs/comp-editor-util.c:178 calendar/gui/print.c:2143
-msgid " (Due "
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:180 calendar/gui/print.c:2145
-#, fuzzy
-msgid "Due "
-msgstr "Uyğun Tarix"
-
-#: calendar/gui/dialogs/comp-editor.c:521
-msgid "Edit Appointment"
-msgstr "İclası düzəlt"
-
-#: calendar/gui/dialogs/comp-editor.c:526
-#, c-format
-msgid "Appointment - %s"
-msgstr "İclas - %s"
-
-#: calendar/gui/dialogs/comp-editor.c:529
-#, c-format
-msgid "Task - %s"
-msgstr "Vəzifə - %s"
-
-#: calendar/gui/dialogs/comp-editor.c:532
-#, c-format
-msgid "Journal entry - %s"
-msgstr "Jurnal üzvü - %s"
-
-#: calendar/gui/dialogs/comp-editor.c:546
-msgid "No summary"
-msgstr "Mündəricat yoxdur"
-
-#: calendar/gui/dialogs/comp-editor.c:952 mail/mail-callbacks.c:1671
-#: mail/mail-display.c:100
-msgid "Overwrite file?"
-msgstr "Faylının üsütünə yazım mı?"
-
-#: calendar/gui/dialogs/comp-editor.c:956 mail/mail-callbacks.c:1677
-#: mail/mail-display.c:104
-msgid ""
-"A file by that name already exists.\n"
-"Overwrite it?"
-msgstr ""
-"Eyni adlı bir fayl onsuz da vardır.\n"
-"Üstünə yazım mı?"
-
-#: calendar/gui/dialogs/comp-editor.c:1019 ui/evolution-comp-editor.xml.h:13
-#: widgets/misc/e-filter-bar.h:101
-msgid "Save As..."
-msgstr "Fərqli Qeyd Et ..."
-
-#: calendar/gui/dialogs/comp-editor.c:1172
-msgid "Unable to obtain current version!"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:91
-#, c-format
-msgid "Are you sure you want to delete the appointment `%s'?"
-msgstr "Bu `%s' görüşünü həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:94
-msgid "Are you sure you want to delete this untitled appointment?"
-msgstr "Bu adsız görüşü həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:100
-#, c-format
-msgid "Are you sure you want to delete the task `%s'?"
-msgstr "Bu `%s' vəzifəsini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:103
-msgid "Are you sure you want to delete this untitled task?"
-msgstr "Bu adsız vəzifəsini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:109
-#, c-format
-msgid "Are you sure you want to delete the journal entry `%s'?"
-msgstr "Bu `%s' jurnal girişini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:112
-msgid "Are you sure want to delete this untitled journal entry?"
-msgstr "Bu adsız jurnal girişini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:127
-#, fuzzy, c-format
-msgid "Are you sure you want to delete %d appointments?"
-msgstr "Bu `%s' görüşünü həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:132
-#, fuzzy, c-format
-msgid "Are you sure you want to delete %d tasks?"
-msgstr "Bu `%s' vəzifəsini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/delete-comp.c:137
-#, fuzzy, c-format
-msgid "Are you sure you want to delete %d journal entries?"
-msgstr "Bu `%s' jurnal girişini həqiqətən də silmək istəyirsiniz?"
-
-#: calendar/gui/dialogs/e-delegate-dialog.glade.h:1
-#, fuzzy
-msgid "Addressbook..."
-msgstr "Ünvan dəftəri əlavə et"
-
-#: calendar/gui/dialogs/e-delegate-dialog.glade.h:2
-#, fuzzy
-msgid "Delegate To:"
-msgstr "Silinən"
-
-#: calendar/gui/dialogs/e-delegate-dialog.glade.h:3
-#, fuzzy
-msgid "Enter Delegate"
-msgstr "Silinən"
-
-#: calendar/gui/dialogs/event-editor.c:181
-msgid "Appointment"
-msgstr "İclas"
-
-#: calendar/gui/dialogs/event-editor.c:186
-msgid "Reminder"
-msgstr "Xatırladıcı"
-
-#: calendar/gui/dialogs/event-editor.c:191
-msgid "Recurrence"
-msgstr "Təkrarlama"
-
-#: calendar/gui/dialogs/event-editor.c:198
-#: calendar/gui/dialogs/event-editor.c:345
-#, fuzzy
-msgid "Scheduling"
-msgstr "_Görüşləri Planlaşdır"
-
-#: calendar/gui/dialogs/event-editor.c:203
-#: calendar/gui/dialogs/event-editor.c:348
-#, fuzzy
-msgid "Meeting"
-msgstr "Görüşü Ləğv Et"
-
-#: calendar/gui/dialogs/event-page.glade.h:1
-msgid "A_ll day event"
-msgstr "Günün bü_tün hadisələri"
-
-#: calendar/gui/dialogs/event-page.glade.h:2
-#, fuzzy
-msgid "B_usy"
-msgstr "Məşğul"
-
-#: calendar/gui/dialogs/event-page.glade.h:4
-#: calendar/gui/dialogs/task-page.glade.h:2
-#: calendar/gui/e-calendar-table.etspec.h:5
-msgid "Classification"
-msgstr "Sinifləndirmələr"
-
-#: calendar/gui/dialogs/event-page.glade.h:5
-#, fuzzy
-msgid "Con_fidential"
-msgstr "Gizli"
-
-#: calendar/gui/dialogs/event-page.glade.h:6
-#: calendar/gui/dialogs/task-page.glade.h:3
-msgid "Date & Time"
-msgstr "Tarix və Vaxt"
-
-#: calendar/gui/dialogs/event-page.glade.h:7
-#, fuzzy
-msgid "F_ree"
-msgstr "həftə"
-
-#: calendar/gui/dialogs/event-page.glade.h:8
-#: calendar/gui/dialogs/task-page.glade.h:5
-msgid "Pri_vate"
-msgstr "Xü_susi"
-
-#: calendar/gui/dialogs/event-page.glade.h:9
-#: calendar/gui/dialogs/task-page.glade.h:6
-msgid "Pu_blic"
-msgstr "Üm_umi"
-
-#: calendar/gui/dialogs/event-page.glade.h:10
-#: calendar/gui/e-calendar-table.etspec.h:13
-#, fuzzy
-msgid "Show Time As"
-msgstr "Göstər"
-
-#: calendar/gui/dialogs/event-page.glade.h:11
-#: calendar/gui/dialogs/task-page.glade.h:8
-msgid "Su_mmary:"
-msgstr "Mü_ndəricat:"
-
-#: calendar/gui/dialogs/event-page.glade.h:13
-msgid "_End time:"
-msgstr "_Sonlanma vaxtı:"
-
-#: calendar/gui/dialogs/event-page.glade.h:14
-msgid "_Start time:"
-msgstr "_Başlama vaxt:"
-
-#: calendar/gui/dialogs/meeting-page.c:504
-msgid "That person is already attending the meeting!"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:548
-#: calendar/gui/dialogs/meeting-page.c:583
-#, fuzzy
-msgid "Chair Persons"
-msgstr "Maşın Telefonu"
-
-#: calendar/gui/dialogs/meeting-page.c:550
-#: calendar/gui/dialogs/meeting-page.c:583
-#: calendar/gui/dialogs/meeting-page.c:703
-#, fuzzy
-msgid "Required Participants"
-msgstr "Lazımi İştirakçılar"
-
-#: calendar/gui/dialogs/meeting-page.c:552
-#: calendar/gui/dialogs/meeting-page.c:583
-#, fuzzy
-msgid "Optional Participants"
-msgstr "Ehtiyatdakı İştirakçılar"
-
-#: calendar/gui/dialogs/meeting-page.c:554
-#: calendar/gui/dialogs/meeting-page.c:583
-#, fuzzy
-msgid "Non-Participants"
-msgstr "Qeyri İştirakçılar"
-
-#: calendar/gui/dialogs/meeting-page.c:661
-#, fuzzy
-msgid "Sent By:"
-msgstr "Göndərildi"
-
-#: calendar/gui/dialogs/meeting-page.c:829
-#, fuzzy
-msgid "_Delegate To..."
-msgstr "Sil..."
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:1
-#: calendar/gui/e-meeting-time-sel.etspec.h:1
-msgid "Attendee"
-msgstr "Ziyarətçilər"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:2
-#: calendar/gui/e-meeting-time-sel.etspec.h:2
-#, fuzzy
-msgid "Click here to add an attendee"
-msgstr "* Əlaqə əlavə etmək üçün buraya tıqlayın *"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:3
-#: calendar/gui/e-meeting-time-sel.etspec.h:3
-#, fuzzy
-msgid "Common Name"
-msgstr "Qurtarma Vaxtı"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:4
-#: calendar/gui/e-meeting-time-sel.etspec.h:4
-#, fuzzy
-msgid "Delegated From"
-msgstr "Silinən"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:5
-#: calendar/gui/e-meeting-time-sel.etspec.h:5
-#, fuzzy
-msgid "Delegated To"
-msgstr "Silinən"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:6
-#: calendar/gui/e-meeting-time-sel.etspec.h:6
-#, fuzzy
-msgid "Language"
-msgstr "İdarəci"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:7
-#: calendar/gui/e-meeting-time-sel.etspec.h:7
-#, fuzzy
-msgid "Member"
-msgstr "Dekabr"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:8
-#: calendar/gui/e-meeting-time-sel.etspec.h:8
-msgid "RSVP"
-msgstr "RSVP"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:9
-#: calendar/gui/e-meeting-time-sel.etspec.h:9
-msgid "Role"
-msgstr "Rolu"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:10
-#: calendar/gui/e-calendar-table.etspec.h:15
-#: calendar/gui/e-meeting-time-sel.etspec.h:10 filter/libfilter-i18n.h:49
-#: mail/message-list.etspec.h:8
-msgid "Status"
-msgstr "Hal"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:11
-#: calendar/gui/e-calendar-table.etspec.h:18
-#: calendar/gui/e-meeting-time-sel.etspec.h:11 mail/mail-config.glade.h:86
-#: shell/glade/e-active-connection-dialog.glade.h:5
-msgid "Type"
-msgstr "Növ"
-
-#: calendar/gui/dialogs/meeting-page.glade.h:2
-#: calendar/gui/e-itip-control.glade.h:9
-msgid "Organizer:"
-msgstr "Təşkilatçı:"
-
-#: calendar/gui/dialogs/meeting-page.glade.h:3
-#, fuzzy
-msgid "_Change Organizer"
-msgstr "Təşkilatçı:"
-
-#: calendar/gui/dialogs/meeting-page.glade.h:4
-#, fuzzy
-msgid "_Invite Others"
-msgstr "Başqalarını _Dəvət Et ..."
-
-#: calendar/gui/dialogs/meeting-page.glade.h:5
-#, fuzzy
-msgid "_Other Organizer"
-msgstr "Təşkilatçı:"
-
-#: calendar/gui/dialogs/recurrence-page.c:422 calendar/gui/print.c:1855
-#: calendar/gui/print.c:1857 calendar/gui/print.c:1858
-msgid "%a %b %d %Y"
-msgstr "%a %b %d %Y"
-
-#: calendar/gui/dialogs/recurrence-page.c:570
-msgid "This appointment contains recurrences that Evolution cannot edit."
-msgstr "Bu görüşdə \"Evolution\"un düzəldə bilməyəcəyi hallar var."
-
-#: calendar/gui/dialogs/recurrence-page.c:924
-msgid "on"
-msgstr "..da"
-
-#: calendar/gui/dialogs/recurrence-page.c:950 filter/filter-datespec.c:83
-msgid "day"
-msgstr "gün"
-
-#: calendar/gui/dialogs/recurrence-page.c:1080
-msgid "on the"
-msgstr "...da (də)"
-
-#: calendar/gui/dialogs/recurrence-page.c:1088
-msgid "th"
-msgstr "."
-
-#: calendar/gui/dialogs/recurrence-page.c:1261
-msgid "occurrences"
-msgstr "hadisələr"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:1
-#, fuzzy
-msgid "A_dd"
-msgstr "Əlavə Et"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:4
-msgid "Every"
-msgstr "Hər"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:5
-msgid "Exceptions"
-msgstr "Xaric Tutulan"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:6
-msgid "Preview"
-msgstr "Nümayiş"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:7
-msgid "Recurrence Rule"
-msgstr "Təkralama Qaydası"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:9
-#, fuzzy
-msgid "_Custom recurrence"
-msgstr "Xüsusi təkrarlama"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:10
-#, fuzzy
-msgid "_Modify"
-msgstr "Düzəlts"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:11
-#, fuzzy
-msgid "_No recurrence"
-msgstr "Təkrarlama yoxudr"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:13
-#, fuzzy
-msgid "_Simple recurrence"
-msgstr "Bəsit Təkrarlama"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:15
-msgid "for"
-msgstr "üçün"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:16
-msgid "forever"
-msgstr "həmişə"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:17
-msgid "month(s)"
-msgstr "ay"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:18
-msgid "until"
-msgstr "qədər"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:19
-msgid "week(s)"
-msgstr "həftə"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:20
-msgid "year(s)"
-msgstr "il"
-
-#: calendar/gui/dialogs/save-comp.c:51
-msgid "Do you want to save changes?"
-msgstr "Dəyişiklikləri qeyd etmək istəyirsinizimi?"
-
-#: calendar/gui/dialogs/send-comp.c:56
-msgid "The meeting information has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/send-comp.c:61
-msgid "The task information has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/send-comp.c:66
-msgid "The journal entry has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/task-details-page.glade.h:2
-#: calendar/gui/e-calendar-table.etspec.h:2
-#, fuzzy, no-c-format
-msgid "% Complete"
-msgstr "% _Qurtardı:"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:5
-msgid "Date Completed:"
-msgstr "Bitirmə Tarixi:"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:11
-msgid "Progress"
-msgstr "Gedişat"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:12
-#: my-evolution/e-summary-preferences.c:949
-msgid "URL:"
-msgstr "URL:"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:14
-msgid "_Priority:"
-msgstr "_Üstünlük:"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:15
-msgid "_Status:"
-msgstr "_Hal:"
-
-#: calendar/gui/dialogs/task-editor.c:184
-#: calendar/gui/dialogs/task-editor.c:285
-#, fuzzy
-msgid "Assignment"
-msgstr "Vəzifələndirilmiş"
-
-#: calendar/gui/dialogs/task-page.glade.h:4
-#: calendar/gui/e-itip-control.glade.h:6
-#: composer/e-msg-composer-attachment.glade.h:2 mail/mail-config.glade.h:28
-msgid "Description:"
-msgstr "İzah :"
-
-#: calendar/gui/dialogs/task-page.glade.h:7
-msgid "Sta_rt Date:"
-msgstr "Başla_ma Tarixi:"
-
-#: calendar/gui/dialogs/task-page.glade.h:9
-msgid "_Confidential"
-msgstr "_Gizli"
-
-#: calendar/gui/dialogs/task-page.glade.h:11
-msgid "_Due Date:"
-msgstr "_Bu tarixə qədər :"
-
-#: calendar/gui/e-calendar-table.c:407
-#, c-format
-msgid "0%"
-msgstr "0%"
-
-#: calendar/gui/e-calendar-table.c:408
-#, c-format
-msgid "10%"
-msgstr "10%"
-
-#: calendar/gui/e-calendar-table.c:409
-#, c-format
-msgid "20%"
-msgstr "20%"
-
-#: calendar/gui/e-calendar-table.c:410
-#, c-format
-msgid "30%"
-msgstr "30%"
-
-#: calendar/gui/e-calendar-table.c:411
-#, c-format
-msgid "40%"
-msgstr "40%"
-
-#: calendar/gui/e-calendar-table.c:412
-#, c-format
-msgid "50%"
-msgstr "50%"
-
-#: calendar/gui/e-calendar-table.c:413
-#, c-format
-msgid "60%"
-msgstr "60%"
-
-#: calendar/gui/e-calendar-table.c:414
-#, c-format
-msgid "70%"
-msgstr "70%"
-
-#: calendar/gui/e-calendar-table.c:415
-#, c-format
-msgid "80%"
-msgstr "80%"
-
-#: calendar/gui/e-calendar-table.c:416
-#, c-format
-msgid "90%"
-msgstr "90%"
-
-#: calendar/gui/e-calendar-table.c:417
-#, c-format
-msgid "100%"
-msgstr "100%"
-
-#: calendar/gui/e-calendar-table.c:914 calendar/gui/e-day-view.c:3443
-#: calendar/gui/e-week-view.c:3296 mail/folder-browser.c:1371
-#: shell/e-shortcuts-view.c:385
-msgid "_Open"
-msgstr "_Aç"
-
-#: calendar/gui/e-calendar-table.c:918 calendar/gui/e-day-view.c:3452
-#: calendar/gui/e-week-view.c:3305 ui/evolution-addressbook.xml.h:1
-#: ui/evolution-calendar.xml.h:1 ui/evolution-tasks.xml.h:1
-msgid "C_ut"
-msgstr "Kə_s"
-
-#: calendar/gui/e-calendar-table.c:920 calendar/gui/e-day-view.c:3454
-#: calendar/gui/e-week-view.c:3307 ui/evolution-addressbook.xml.h:33
-#: ui/evolution-calendar.xml.h:37 ui/evolution-mail-list.xml.h:24
-#: ui/evolution-tasks.xml.h:14
-msgid "_Copy"
-msgstr "_Köçürt"
-
-#: calendar/gui/e-calendar-table.c:922 calendar/gui/e-day-view.c:3429
-#: calendar/gui/e-day-view.c:3456 calendar/gui/e-week-view.c:3283
-#: calendar/gui/e-week-view.c:3309 ui/evolution-addressbook.xml.h:36
-#: ui/evolution-calendar.xml.h:40 ui/evolution-mail-list.xml.h:29
-#: ui/evolution-tasks.xml.h:17
-msgid "_Paste"
-msgstr "_Yapışdır"
-
-#: calendar/gui/e-calendar-table.c:927
-#, fuzzy
-msgid "_Mark as Complete"
-msgstr "İşarətləmə qurtadı"
-
-#: calendar/gui/e-calendar-table.c:929
-#, fuzzy
-msgid "_Delete this Task"
-msgstr "Vəzifəni sil"
-
-#: calendar/gui/e-calendar-table.c:932
-#, fuzzy
-msgid "_Mark Tasks as Complete"
-msgstr "İşarətləmə qurtadı"
-
-#: calendar/gui/e-calendar-table.c:934
-#, fuzzy
-msgid "_Delete Selected Tasks"
-msgstr "Bu vəzifəni sil"
-
-#: calendar/gui/e-calendar-table.c:1194
-#: calendar/gui/e-calendar-table.etspec.h:6
-#, fuzzy
-msgid "Click to add a task"
-msgstr "Vəzifə əlavə etmək üçün buraya tıqla"
-
-#: calendar/gui/e-calendar-table.etspec.h:3
-msgid "Alarms"
-msgstr "Alarm"
-
-#: calendar/gui/e-calendar-table.etspec.h:7 camel/camel-filter-driver.c:718
-#: camel/camel-filter-driver.c:834
-msgid "Complete"
-msgstr "Qurtar"
-
-#: calendar/gui/e-calendar-table.etspec.h:8
-msgid "Completion Date"
-msgstr "Qurtarma Vaxtı"
-
-#: calendar/gui/e-calendar-table.etspec.h:9
-msgid "Due Date"
-msgstr "Uyğun Tarix"
-
-#: calendar/gui/e-calendar-table.etspec.h:10
-msgid "End Date"
-msgstr "Son Tarix"
-
-#: calendar/gui/e-calendar-table.etspec.h:11
-msgid "Geographical Position"
-msgstr "Çoğrafi Yerləşmə"
-
-#: calendar/gui/e-calendar-table.etspec.h:12
-msgid "Priority"
-msgstr "Üstünlük"
-
-#: calendar/gui/e-calendar-table.etspec.h:14
-msgid "Start Date"
-msgstr "Başlama Tarixi"
-
-#. FIXME: Inbox shortcut should point to something else for
-#. people who won't care about using /Local Folders/Inbox
-#: calendar/gui/e-calendar-table.etspec.h:16
-#: my-evolution/component-factory.c:45 shell/e-shortcuts.c:1050
-#: shell/e-storage-set-view.c:1420 shell/e-summary-storage.c:80
-msgid "Summary"
-msgstr "Mündəricat"
-
-#: calendar/gui/e-calendar-table.etspec.h:17
-#, fuzzy
-msgid "Task sort"
-msgstr "Vəzifə"
-
-#: calendar/gui/e-calendar-table.etspec.h:19
-msgid "URL"
-msgstr "URL"
-
-#: calendar/gui/e-day-view-time-item.c:519
-#, c-format
-msgid "%02i minute divisions"
-msgstr "%02i dəqiqə bölmələri"
-
-#. strftime format %A = full weekday name, %d = day of month,
-#. %B = full month name. Don't use any other specifiers.
-#: calendar/gui/e-day-view-top-item.c:285 calendar/gui/e-day-view.c:1374
-#: calendar/gui/e-week-view-main-item.c:325 calendar/gui/print.c:1462
-msgid "%A %d %B"
-msgstr "%A %d %B"
-
-#. strftime format %d = day of month, %b = abbreviated month name.
-#. Don't use any other specifiers.
-#: calendar/gui/e-day-view-top-item.c:293 calendar/gui/e-day-view.c:1401
-#: calendar/gui/e-week-view-main-item.c:348
-msgid "%d %b"
-msgstr "%d %b"
-
-#. String to use in 12-hour time format for times in the morning.
-#: calendar/gui/e-day-view.c:608 calendar/gui/e-week-view.c:345
-#: calendar/gui/print.c:769
-msgid "am"
-msgstr "am"
-
-#. String to use in 12-hour time format for times in the afternoon.
-#: calendar/gui/e-day-view.c:611 calendar/gui/e-week-view.c:348
-#: calendar/gui/print.c:771
-msgid "pm"
-msgstr "pm"
-
-#: calendar/gui/e-day-view.c:3424 calendar/gui/e-week-view.c:3278
-#, fuzzy
-msgid "New All Day _Event"
-msgstr "Yeni Bütün Gün Hadisələri"
-
-#: calendar/gui/e-day-view.c:3434 calendar/gui/e-week-view.c:3288
-#: ui/evolution-calendar.xml.h:17
-msgid "Go to _Today"
-msgstr "_Bugünə Get"
-
-#: calendar/gui/e-day-view.c:3436 calendar/gui/e-week-view.c:3290
-#, fuzzy
-msgid "_Go to Date..."
-msgstr "Tarixə Get..."
-
-#: calendar/gui/e-day-view.c:3445 calendar/gui/e-week-view.c:3298
-#, fuzzy
-msgid "_Delete this Appointment"
-msgstr "Bu İclası sil"
-
-#: calendar/gui/e-day-view.c:3464 calendar/gui/e-week-view.c:3323
-#, fuzzy
-msgid "Make this Occurrence _Movable"
-msgstr "Bu hadisənin daşına bilməsinə imkan ver"
-
-#: calendar/gui/e-day-view.c:3466 calendar/gui/e-week-view.c:3325
-#, fuzzy
-msgid "Delete this _Occurrence"
-msgstr "Bu Hadisəni sil"
-
-#: calendar/gui/e-day-view.c:3468 calendar/gui/e-week-view.c:3327
-#, fuzzy
-msgid "Delete _All Occurrences"
-msgstr "Bütün Hadisələri Sil"
-
-#: calendar/gui/e-itip-control.c:469
-msgid "Meeting begins: <b>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:474
-msgid "Task begins: <b>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:479
-#, fuzzy
-msgid "Free/Busy info begins: <b>"
-msgstr "İstənən Mə'lumatlar"
-
-#: calendar/gui/e-itip-control.c:483
-msgid "Begins: <b>"
-msgstr ""
-
-#. Describe what the user can do
-#: calendar/gui/e-itip-control.c:677
-msgid ""
-"<br> Please review the following information, and then select an action from "
-"the menu below."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:692
-#, c-format
-msgid "<b>Summary:</b> %s<br><br>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:692
-msgid "<i>None</i>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:702
-#, fuzzy, c-format
-msgid "<b>Description:</b> %s"
-msgstr "İzah :"
-
-#: calendar/gui/e-itip-control.c:737
-#, c-format
-msgid "<b>%s</b> has published meeting information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:738
-#, fuzzy
-msgid "Meeting Information"
-msgstr "Arzuya Bağlı Mə'lumatlar"
-
-#: calendar/gui/e-itip-control.c:742
-#, c-format
-msgid "<b>%s</b> requests your presence at a meeting."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:743
-#, fuzzy
-msgid "Meeting Proposal"
-msgstr "Görüşü Ləğv Et"
-
-#: calendar/gui/e-itip-control.c:747
-#, c-format
-msgid "<b>%s</b> wishes to add to an existing meeting."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:748
-#, fuzzy
-msgid "Meeting Update"
-msgstr "İclas sonlanma saatı :"
-
-#: calendar/gui/e-itip-control.c:752
-#, c-format
-msgid "<b>%s</b> wishes to receive the latest meeting information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:753
-#, fuzzy
-msgid "Meeting Update Request"
-msgstr "Görü İs_təyi (FIXME)"
-
-#: calendar/gui/e-itip-control.c:757
-#, fuzzy, c-format
-msgid "<b>%s</b> has replied to a meeting request."
-msgstr "_Bu ePoçt ünvanıdır"
-
-#: calendar/gui/e-itip-control.c:758
-#, fuzzy
-msgid "Meeting Reply"
-msgstr "Görüşü Ləğv Et"
-
-#: calendar/gui/e-itip-control.c:762
-#, c-format
-msgid "<b>%s</b> has cancelled a meeting."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:763
-#, fuzzy
-msgid "Meeting Cancellation"
-msgstr "Fayl seç"
-
-#: calendar/gui/e-itip-control.c:767 calendar/gui/e-itip-control.c:815
-#: calendar/gui/e-itip-control.c:848
-#, c-format
-msgid "<b>%s</b> has sent an unintelligible message."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:768
-#, fuzzy
-msgid "Bad Meeting Message"
-msgstr "İsmarıcı Düzəlt"
-
-#: calendar/gui/e-itip-control.c:785
-#, c-format
-msgid "<b>%s</b> has published task information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:786
-#, fuzzy
-msgid "Task Information"
-msgstr "Mə'lumat"
-
-#: calendar/gui/e-itip-control.c:790
-#, c-format
-msgid "<b>%s</b> requests you perform a task."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:791
-#, fuzzy
-msgid "Task Proposal"
-msgstr "Vəzifə Taxtası"
-
-#: calendar/gui/e-itip-control.c:795
-#, c-format
-msgid "<b>%s</b> wishes to add to an existing task."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:796
-#, fuzzy
-msgid "Task Update"
-msgstr "sonra idi"
-
-#: calendar/gui/e-itip-control.c:800
-#, c-format
-msgid "<b>%s</b> wishes to receive the latest task information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:801
-#, fuzzy
-msgid "Task Update Request"
-msgstr "Vəzifə So_rğusu (FIXME)"
-
-#: calendar/gui/e-itip-control.c:805
-#, fuzzy, c-format
-msgid "<b>%s</b> has replied to a task assignment."
-msgstr "_Bu ePoçt ünvanıdır"
-
-#: calendar/gui/e-itip-control.c:806
-#, fuzzy
-msgid "Task Reply"
-msgstr "Cavab ver"
-
-#: calendar/gui/e-itip-control.c:810
-#, c-format
-msgid "<b>%s</b> has cancelled a task."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:811
-#, fuzzy
-msgid "Task Cancellation"
-msgstr "Görüşü Ləğv Et"
-
-#: calendar/gui/e-itip-control.c:816
-#, fuzzy
-msgid "Bad Task Message"
-msgstr "Təqvim İsmarıcı"
-
-#: calendar/gui/e-itip-control.c:833
-#, fuzzy, c-format
-msgid "<b>%s</b> has published free/busy information."
-msgstr "İstənən Mə'lumatlar"
-
-#: calendar/gui/e-itip-control.c:834
-#, fuzzy
-msgid "Free/Busy Information"
-msgstr "İstənən Mə'lumatlar"
-
-#: calendar/gui/e-itip-control.c:838
-#, c-format
-msgid "<b>%s</b> requests your free/busy information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:839
-#, fuzzy
-msgid "Free/Busy Request"
-msgstr "Sərbəst/məşğul URL"
-
-#: calendar/gui/e-itip-control.c:843
-#, fuzzy, c-format
-msgid "<b>%s</b> has replied to a free/busy request."
-msgstr "_Bu ePoçt ünvanıdır"
-
-#: calendar/gui/e-itip-control.c:844
-#, fuzzy
-msgid "Free/Busy Reply"
-msgstr "Sərbəst/məşğul URL"
-
-#: calendar/gui/e-itip-control.c:849
-#, fuzzy
-msgid "Bad Free/Busy Message"
-msgstr "Əvvəlki İsmarıc"
-
-#: calendar/gui/e-itip-control.c:916
-#, fuzzy
-msgid "The message does not appear to be properly formed"
-msgstr "Qovluq geri dönülməz şəkildə xəsarət alıb."
-
-#: calendar/gui/e-itip-control.c:935
-msgid "The message contains only unsupported requests."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:963 calendar/gui/e-itip-control.c:969
-msgid "The attachment does not contain a valid calendar message"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1088
-#, fuzzy
-msgid "Calendar file could not be updated!\n"
-msgstr "Ox yüklənə bilmədi\n"
-
-#: calendar/gui/e-itip-control.c:1090
-#, fuzzy
-msgid "Update complete\n"
-msgstr "Bitirmə Tarixi:"
-
-#: calendar/gui/e-itip-control.c:1134
-msgid "Attendee status could not be updated because of an invalid status!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1142
-msgid "Attendee status ould not be updated!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1144
-#, fuzzy
-msgid "Attendee status updated\n"
-msgstr "Ziyarətçilərin ünvanları"
-
-#: calendar/gui/e-itip-control.c:1146
-msgid "Attendee status can not be updated because the item no longer exists"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1174
-#, fuzzy
-msgid "I couldn't remove the item from your calendar file!\n"
-msgstr "Təqvim faylını aça bilmirəm!\n"
-
-#: calendar/gui/e-itip-control.c:1176
-#, fuzzy
-msgid "Removal Complete"
-msgstr "% _Qurtardı:"
-
-#: calendar/gui/e-itip-control.c:1208 calendar/gui/e-itip-control.c:1242
-#, fuzzy
-msgid "Item sent!\n"
-msgstr "Göndərilmə tarixi"
-
-#: calendar/gui/e-itip-control.c:1210 calendar/gui/e-itip-control.c:1246
-msgid "The item could not be sent!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1406
-msgid "Unable to find any of your identities in the attendees list!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.glade.h:2
-#, no-c-format
-msgid "%P %%"
-msgstr "%P %%"
-
-#: calendar/gui/e-itip-control.glade.h:3
-msgid "--to--"
-msgstr "-- --"
-
-#: calendar/gui/e-itip-control.glade.h:4
-msgid "Calendar Message"
-msgstr "Təqvim İsmarıcı"
-
-#: calendar/gui/e-itip-control.glade.h:5
-msgid "Date:"
-msgstr "Tarix:"
-
-#: calendar/gui/e-itip-control.glade.h:7
-msgid "Loading Calendar"
-msgstr "Təqvim yüklənir"
-
-#: calendar/gui/e-itip-control.glade.h:8
-msgid "Loading calendar..."
-msgstr "Təqvim yüklənir..."
-
-#: calendar/gui/e-itip-control.glade.h:10
-msgid "Server Message:"
-msgstr "Verici İsmarıcı:"
-
-#: calendar/gui/e-itip-control.glade.h:12
-msgid "date-end"
-msgstr "bitiş tarixi"
-
-#: calendar/gui/e-itip-control.glade.h:13
-msgid "date-start"
-msgstr "başlama tarixi"
-
-#: calendar/gui/e-meeting-model.c:201 calendar/gui/e-meeting-model.c:218
-#: calendar/gui/e-meeting-model.c:502 calendar/gui/e-meeting-model.c:670
-msgid "Individual"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:203 calendar/gui/e-meeting-model.c:220
-#: calendar/gui/e-meeting-model.c:671
-#, fuzzy
-msgid "Group"
-msgstr "Qrup adı :"
-
-#: calendar/gui/e-meeting-model.c:205 calendar/gui/e-meeting-model.c:222
-#: calendar/gui/e-meeting-model.c:672
-#, fuzzy
-msgid "Resource"
-msgstr "Kağız qaynağı :"
-
-#: calendar/gui/e-meeting-model.c:207 calendar/gui/e-meeting-model.c:224
-#: calendar/gui/e-meeting-model.c:673
-msgid "Room"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:226 calendar/gui/e-meeting-model.c:261
-#: calendar/gui/e-meeting-model.c:326 calendar/gui/e-meeting-model.c:674
-#: calendar/gui/e-meeting-model.c:690
-#: camel/providers/smtp/camel-smtp-transport.c:224
-#: widgets/misc/e-charset-picker.c:58 widgets/misc/e-charset-picker.c:438
-msgid "Unknown"
-msgstr "Namə'lum"
-
-#: calendar/gui/e-meeting-model.c:236 calendar/gui/e-meeting-model.c:253
-#: calendar/gui/e-meeting-model.c:686
-msgid "Chair"
-msgstr "Stul"
-
-#: calendar/gui/e-meeting-model.c:238 calendar/gui/e-meeting-model.c:255
-#: calendar/gui/e-meeting-model.c:504 calendar/gui/e-meeting-model.c:687
-msgid "Required Participant"
-msgstr "Lazımi İştirakçılar"
-
-#: calendar/gui/e-meeting-model.c:240 calendar/gui/e-meeting-model.c:257
-#: calendar/gui/e-meeting-model.c:688
-msgid "Optional Participant"
-msgstr "Ehtiyatdakı İştirakçılar"
-
-#: calendar/gui/e-meeting-model.c:242 calendar/gui/e-meeting-model.c:259
-#: calendar/gui/e-meeting-model.c:689
-msgid "Non-Participant"
-msgstr "Qeyri İştirakçılar"
-
-#: calendar/gui/e-meeting-model.c:288 calendar/gui/e-meeting-model.c:311
-#: calendar/gui/e-meeting-model.c:512 calendar/gui/e-meeting-model.c:715
-#, fuzzy
-msgid "Needs Action"
-msgstr "Gediş əlavə et"
-
-#: calendar/gui/e-meeting-model.c:290 calendar/gui/e-meeting-model.c:313
-#: calendar/gui/e-meeting-model.c:716
-#, fuzzy
-msgid "Accepted"
-msgstr " Qəbul Et"
-
-#: calendar/gui/e-meeting-model.c:292 calendar/gui/e-meeting-model.c:315
-#: calendar/gui/e-meeting-model.c:717
-#, fuzzy
-msgid "Declined"
-msgstr " Rədd Et"
-
-#: calendar/gui/e-meeting-model.c:294 calendar/gui/e-meeting-model.c:317
-#: calendar/gui/e-meeting-model.c:718 calendar/gui/e-meeting-time-sel.c:392
-msgid "Tentative"
-msgstr "Girişimli"
-
-#: calendar/gui/e-meeting-model.c:296 calendar/gui/e-meeting-model.c:319
-#: calendar/gui/e-meeting-model.c:719
-#, fuzzy
-msgid "Delegated"
-msgstr "Silinən"
-
-#: calendar/gui/e-meeting-model.c:300 calendar/gui/e-meeting-model.c:323
-#, fuzzy
-msgid "In Process"
-msgstr "İşləyir"
-
-#. This is a strftime() format string %A = full weekday name,
-#. %B = full month name, %d = month day, %Y = full year.
-#: calendar/gui/e-meeting-time-sel-item.c:472
-#: calendar/gui/e-meeting-time-sel.c:1937
-msgid "%A, %B %d, %Y"
-msgstr "%a %B %d %Y"
-
-#. This is a strftime() format string %a = abbreviated weekday
-#. name, %m = month number, %d = month day, %Y = full year.
-#: calendar/gui/e-meeting-time-sel-item.c:476
-#: calendar/gui/e-meeting-time-sel.c:1965 e-util/e-time-utils.c:186
-#: e-util/e-time-utils.c:345
-msgid "%a %m/%d/%Y"
-msgstr "%a %m/%d/%Y"
-
-#. This is a strftime() format string %m = month number,
-#. %d = month day, %Y = full year.
-#: calendar/gui/e-meeting-time-sel-item.c:480 e-util/e-time-utils.c:221
-#: e-util/e-time-utils.c:276 widgets/misc/e-dateedit.c:1577
-msgid "%m/%d/%Y"
-msgstr "%m/%d/%Y"
-
-#: calendar/gui/e-meeting-time-sel.c:394
-msgid "Out of Office"
-msgstr "İş Yerində Deyil"
-
-#: calendar/gui/e-meeting-time-sel.c:395
-msgid "No Information"
-msgstr "Mə'lumat Yoxdur"
-
-#: calendar/gui/e-meeting-time-sel.c:411
-msgid "_Invite Others..."
-msgstr "Başqalarını _Dəvət Et ..."
-
-#: calendar/gui/e-meeting-time-sel.c:431
-msgid "_Options"
-msgstr "_Seçənəklər"
-
-#: calendar/gui/e-meeting-time-sel.c:448
-msgid "Show _Only Working Hours"
-msgstr "Sadəcə olaraq -İş Saatlarını Göstər"
-
-#: calendar/gui/e-meeting-time-sel.c:461
-msgid "Show _Zoomed Out"
-msgstr "_Uzaqlaşdıraraq Göstər"
-
-#: calendar/gui/e-meeting-time-sel.c:479
-msgid "_Update Free/Busy"
-msgstr "Boş/Məşğulları _Təzələ"
-
-#: calendar/gui/e-meeting-time-sel.c:497
-msgid "_<<"
-msgstr "_<<"
-
-#: calendar/gui/e-meeting-time-sel.c:514
-msgid "_Autopick"
-msgstr "_Avtomarik Olaraq Seç"
-
-#: calendar/gui/e-meeting-time-sel.c:528
-msgid ">_>"
-msgstr ">_>"
-
-#: calendar/gui/e-meeting-time-sel.c:545
-msgid "_All People and Resources"
-msgstr "_Bütün Adamlar və Qaynaqlar"
-
-#: calendar/gui/e-meeting-time-sel.c:558
-msgid "All _People and One Resource"
-msgstr "Bütün _adamlar və Bir Qaynaq"
-
-#: calendar/gui/e-meeting-time-sel.c:571
-msgid "_Required People"
-msgstr "_Lazımi Adamlar"
-
-#: calendar/gui/e-meeting-time-sel.c:584
-msgid "Required People and _One Resource"
-msgstr "Lazımi Adamlar və _Bir Qaynaq"
-
-#: calendar/gui/e-meeting-time-sel.c:607
-msgid "Meeting _start time:"
-msgstr "İclas başlama saatı :"
-
-#: calendar/gui/e-meeting-time-sel.c:626
-msgid "Meeting _end time:"
-msgstr "İclas sonlanma saatı :"
-
-#: calendar/gui/e-tasks.c:349
-#, c-format
-msgid "Could not load the tasks in `%s'"
-msgstr "`%s' dakı (dəki) vəzifələr yüklənə bilmədi"
-
-#: calendar/gui/e-tasks.c:361
-#, c-format
-msgid "The method required to load `%s' is not supported"
-msgstr "`%s' i(ı) yükləməyə yarayan yol dəstəklənmir"
-
-#: calendar/gui/e-week-view.c:3276 calendar/gui/e-week-view.c:3314
-#, fuzzy
-msgid "New _Appointment..."
-msgstr "Yeni İclas ..."
-
-#: calendar/gui/gnome-cal.c:1319
-#, c-format
-msgid "Could not open the folder in `%s'"
-msgstr "`%s'da(də) qovluq yarada bilmədim"
-
-#: calendar/gui/gnome-cal.c:1330
-#, c-format
-msgid "The method required to open `%s' is not supported"
-msgstr "`%s' i(ı) açmağa yarayan yol dəstəklənmir"
-
-#: calendar/gui/goto-dialog.glade.h:1
-msgid "April"
-msgstr "Aprel"
-
-#: calendar/gui/goto-dialog.glade.h:2
-msgid "August"
-msgstr "Avqust"
-
-#: calendar/gui/goto-dialog.glade.h:3
-msgid "December"
-msgstr "Dekabr"
-
-#: calendar/gui/goto-dialog.glade.h:4
-msgid "February"
-msgstr "Fevral"
-
-#: calendar/gui/goto-dialog.glade.h:5
-msgid "Go To Date"
-msgstr "Tarixə Get"
-
-#: calendar/gui/goto-dialog.glade.h:6
-#, fuzzy
-msgid "Go To Today"
-msgstr "Günə Get"
-
-#: calendar/gui/goto-dialog.glade.h:7
-msgid "January"
-msgstr "Yanvars"
-
-#: calendar/gui/goto-dialog.glade.h:8
-msgid "July"
-msgstr "İyul"
-
-#: calendar/gui/goto-dialog.glade.h:9
-msgid "June"
-msgstr "İyun"
-
-#: calendar/gui/goto-dialog.glade.h:10
-msgid "March"
-msgstr "Mart"
-
-#: calendar/gui/goto-dialog.glade.h:11
-msgid "May"
-msgstr "May"
-
-#: calendar/gui/goto-dialog.glade.h:12
-msgid "November"
-msgstr "Noyabr"
-
-#: calendar/gui/goto-dialog.glade.h:13
-msgid "October"
-msgstr "Oktyabr"
-
-#: calendar/gui/goto-dialog.glade.h:14
-msgid "September"
-msgstr "Sentyabr"
-
-#: calendar/gui/itip-utils.c:274
-msgid "An organizer must be set."
-msgstr ""
-
-#: calendar/gui/main.c:92
-#, fuzzy
-msgid "Could not create the component editor factory"
-msgstr "Alarm vermə xidməti e'malatxanası yaradıla bilmir"
-
-#: calendar/gui/print.c:426
-msgid "1st"
-msgstr "1.nci"
-
-#: calendar/gui/print.c:426
-msgid "2nd"
-msgstr "2.nci"
-
-#: calendar/gui/print.c:426
-msgid "3rd"
-msgstr "3.ncü"
-
-#: calendar/gui/print.c:426
-msgid "4th"
-msgstr "4.ncü"
-
-#: calendar/gui/print.c:426
-msgid "5th"
-msgstr "5.nci"
-
-#: calendar/gui/print.c:427
-msgid "6th"
-msgstr "6.ncı"
-
-#: calendar/gui/print.c:427
-msgid "7th"
-msgstr "7.nci"
-
-#: calendar/gui/print.c:427
-msgid "8th"
-msgstr "8.nci"
-
-#: calendar/gui/print.c:427
-msgid "9th"
-msgstr "9.ncu"
-
-#: calendar/gui/print.c:427
-msgid "10th"
-msgstr "10.ncu"
-
-#: calendar/gui/print.c:428
-msgid "11th"
-msgstr "11.nci"
-
-#: calendar/gui/print.c:428
-msgid "12th"
-msgstr "12.nci"
-
-#: calendar/gui/print.c:428
-msgid "13th"
-msgstr "13.ncü"
-
-#: calendar/gui/print.c:428
-msgid "14th"
-msgstr "14.ncü"
-
-#: calendar/gui/print.c:428
-msgid "15th"
-msgstr "15.nci"
-
-#: calendar/gui/print.c:429
-msgid "16th"
-msgstr "16.ncı"
-
-#: calendar/gui/print.c:429
-msgid "17th"
-msgstr "17.nci"
-
-#: calendar/gui/print.c:429
-msgid "18th"
-msgstr "18.nci"
-
-#: calendar/gui/print.c:429
-msgid "19th"
-msgstr "19.ncu"
-
-#: calendar/gui/print.c:429
-msgid "20th"
-msgstr "20.nci"
-
-#: calendar/gui/print.c:430
-msgid "21st"
-msgstr "21.nci"
-
-#: calendar/gui/print.c:430
-msgid "22nd"
-msgstr "22.nci"
-
-#: calendar/gui/print.c:430
-msgid "23rd"
-msgstr "23.ncü"
-
-#: calendar/gui/print.c:430
-msgid "24th"
-msgstr "24.ncü"
-
-#: calendar/gui/print.c:430
-msgid "25th"
-msgstr "25.nci"
-
-#: calendar/gui/print.c:431
-msgid "26th"
-msgstr "26.ncı"
-
-#: calendar/gui/print.c:431
-msgid "27th"
-msgstr "27.nci"
-
-#: calendar/gui/print.c:431
-msgid "28th"
-msgstr "28.nci"
-
-#: calendar/gui/print.c:431
-msgid "29th"
-msgstr "29.ncu"
-
-#: calendar/gui/print.c:431
-msgid "30th"
-msgstr "39.ncu"
-
-#: calendar/gui/print.c:432
-msgid "31st"
-msgstr "31.nci"
-
-#: calendar/gui/print.c:499
-msgid "Su"
-msgstr "Baz."
-
-#: calendar/gui/print.c:499
-msgid "Mo"
-msgstr "B.ei"
-
-#: calendar/gui/print.c:499
-msgid "Tu"
-msgstr "Ç.a"
-
-#: calendar/gui/print.c:499
-msgid "We"
-msgstr "Çə"
-
-#: calendar/gui/print.c:500
-msgid "Th"
-msgstr "C.a"
-
-#: calendar/gui/print.c:500
-msgid "Fr"
-msgstr "Cümə"
-
-#: calendar/gui/print.c:500
-msgid "Sa"
-msgstr "Şn"
-
-#. Day
-#: calendar/gui/print.c:1831
-#, fuzzy
-msgid "Selected day (%a %b %d %Y)"
-msgstr "Hazırkı gün ( %a %b %d %Y )"
-
-#: calendar/gui/print.c:1850 calendar/gui/print.c:1854
-msgid "%a %b %d"
-msgstr "%a %b %d"
-
-#: calendar/gui/print.c:1851
-msgid "%a %d %Y"
-msgstr "%a %b %d"
-
-#: calendar/gui/print.c:1862
-#, fuzzy, c-format
-msgid "Selected week (%s - %s)"
-msgstr "Hazırkı həftə ( %s - %s)"
-
-#. Month
-#: calendar/gui/print.c:1870
-#, fuzzy
-msgid "Selected month (%b %Y)"
-msgstr "Hazırkı ay ( %b %Y )"
-
-#. Year
-#: calendar/gui/print.c:1877
-#, fuzzy
-msgid "Selected year (%Y)"
-msgstr "Hazırkı il ( %Y )"
-
-#: calendar/gui/print.c:2221
-msgid "Print Calendar"
-msgstr "Təqvimi çap et"
-
-#: calendar/gui/print.c:2312 calendar/gui/print.c:2404
-#: mail/mail-callbacks.c:2080 my-evolution/e-summary.c:607
-#: ui/evolution-addressbook.xml.h:17 ui/evolution-mail-message.xml.h:64
-msgid "Print Preview"
-msgstr "Çap Etmə nümayişi"
-
-#: calendar/gui/print.c:2341
-#, fuzzy
-msgid "Print Item"
-msgstr "Bu üzvü çap et"
-
-#: calendar/gui/print.c:2422
-msgid "Print Setup"
-msgstr "Çap Qurğuları"
-
-#: calendar/gui/tasks-control.c:127
-msgid "The URI of the tasks folder to display"
-msgstr "Göstəriləcək vəzifələr qovluğunun URIsi"
-
-#: calendar/gui/tasks-migrate.c:106
-msgid ""
-"Evolution has taken the tasks that were in your calendar folder and "
-"automatically migrated them to the new tasks folder."
-msgstr ""
-"\"Evolution\" təqvim qovluğunda olan vəzifələri yeni qovluqlara daşıdı."
-
-#: calendar/gui/tasks-migrate.c:109
-msgid ""
-"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."
-msgstr ""
-"\"Evolution\" təqvim qovluğunda olan vəzifələri yeni qovluqlara daşımağa "
-"cəhd etdi.\n"
-"Bəzi vəzifələr daşına bilmədi. Ona görə də bu əməliyyat gələcəkdə də "
-"aparılmalıdır."
-
-#: calendar/gui/tasks-migrate.c:121
-#, c-format
-msgid ""
-"Could not open `%s'; no items from the calendar folder will be migrated to "
-"the tasks folder."
-msgstr ""
-"`%s' tapıla bilmədi; təqvim qovluğuna heç bir vəzifə vəzifələr qovluğuna "
-"daşına bilməyəcək."
-
-#: calendar/gui/tasks-migrate.c:134
-#, c-format
-msgid ""
-"The method required to load `%s' is not supported; no items from the "
-"calendar folder will be migrated to the tasks folder."
-msgstr ""
-"`%s' yükləmək üçün işlədiləcən metod dəstəkləmir; təqvim qovluğuna heç bir "
-"vəzifə vəzifələr qovluğuna daşına bilməyəcək."
-
-#: calendar/gui/weekday-picker.c:315 calendar/gui/weekday-picker.c:410
-msgid "SMTWTFS"
-msgstr "BBeÇaÇCaCŞ"
-
-#: calendar/pcs/query.c:230
-msgid "time-now expects 0 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:254
-msgid "make-time expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:259
-msgid "make-time expects argument 1 to be a string"
-msgstr ""
-
-#: calendar/pcs/query.c:267
-msgid "make-time argument 1 must be an ISO 8601 date/time string"
-msgstr ""
-
-#: calendar/pcs/query.c:296
-msgid "time-add-day expects 2 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:301
-msgid "time-add-day expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:308
-msgid "time-add-day expects argument 2 to be an integer"
-msgstr ""
-
-#: calendar/pcs/query.c:335
-msgid "time-day-begin expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:340
-msgid "time-day-begin expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:367
-msgid "time-day-end expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:372
-msgid "time-day-end expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:408
-msgid "get-vtype expects 0 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:504
-msgid "occur-in-time-range? expects 2 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:509
-msgid "occur-in-time-range? expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:516
-msgid "occur-in-time-range? expects argument 2 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:646
-#, fuzzy
-msgid "contains? expects 2 arguments"
-msgstr "Parametr və ya arqumentlərdə sintaksis xətası"
-
-#: calendar/pcs/query.c:651
-msgid "contains? expects argument 1 to be a string"
-msgstr ""
-
-#: calendar/pcs/query.c:658
-msgid "contains? expects argument 2 to be a string"
-msgstr ""
-
-#: calendar/pcs/query.c:675
-msgid ""
-"contains? expects argument 1 to be one of \"any\", \"summary\", \"description"
-"\""
-msgstr ""
-
-#: calendar/pcs/query.c:717
-msgid "has-categories? expects at least 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:729
-msgid ""
-"has-categories? expects all arguments to be strings or one and only one "
-"argument to be a boolean false (#f)"
-msgstr ""
-
-#: calendar/pcs/query.c:817
-msgid "is-completed? expects 0 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:862
-#, fuzzy
-msgid "completed-before? expects 1 argument"
-msgstr "Parametr və ya arqumentlərdə sintaksis xətası"
-
-#: calendar/pcs/query.c:867
-msgid "completed-before? expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:1155
-msgid "Evaluation of the search expression did not yield a boolean value"
-msgstr ""
-
-#: camel/camel-cipher-context.c:171
-msgid "Signing is not supported by this cipher"
-msgstr "Bu şifrləmə ilə imza dəstəklənmir"
-
-#: camel/camel-cipher-context.c:211
-msgid "Clearsigning is not supported by this cipher"
-msgstr "Bu qeydlərdə müəyyənləşdirilən imzalama növü dəstəklənmir"
-
-#: camel/camel-cipher-context.c:251
-msgid "Verifying is not supported by this cipher"
-msgstr "Bu qeydlərdə təsdiqləmə dəstəklənmir"
-
-#: camel/camel-cipher-context.c:294
-msgid "Encryption is not supported by this cipher"
-msgstr "Bu qeydlərdə şifrləmə dəstəklənmir"
-
-#: camel/camel-cipher-context.c:336
-msgid "Decryption is not supported by this cipher"
-msgstr "Bu qeydlərdə şifr açma dəstəklənmir"
-
-#: camel/camel-disco-diary.c:181
-#, c-format
-msgid ""
-"Could not write log entry: %s\n"
-"Further operations on this server will not be replayed when you\n"
-"reconnect to the network."
-msgstr ""
-
-#: camel/camel-disco-diary.c:244
-#, c-format
-msgid ""
-"Could not open `%s':\n"
-"%s\n"
-"Changes made to this folder will not be resynchronized."
-msgstr ""
-
-#: camel/camel-disco-diary.c:278
-msgid "Resynchronizing with server"
-msgstr ""
-
-#: camel/camel-disco-store.c:336
-msgid "You must be working online to complete this operation"
-msgstr ""
-
-#: camel/camel-filter-driver.c:549 camel/camel-filter-driver.c:558
-msgid "Syncing folders"
-msgstr "Qovluqlar sinxronlaşdırılır"
-
-#: camel/camel-filter-driver.c:659
-msgid "Unable to open spool folder"
-msgstr "Növbə faylını aça bilmədim"
-
-#: camel/camel-filter-driver.c:668
-msgid "Unable to process spool folder"
-msgstr "Növbə faylını işlədə bilmirəm"
-
-#: camel/camel-filter-driver.c:683
-#, c-format
-msgid "Getting message %d (%d%%)"
-msgstr "%d (%d%%) İsmarıcı alınır"
-
-#: camel/camel-filter-driver.c:687 camel/camel-filter-driver.c:700
-#, fuzzy, c-format
-msgid "Failed on message %d"
-msgstr "Bacarılmayan İsmarıc %d"
-
-#: camel/camel-filter-driver.c:688
-msgid "Cannot open message"
-msgstr "İsmarıc açıla bilmir"
-
-#: camel/camel-filter-driver.c:714 camel/camel-filter-driver.c:829
-msgid "Syncing folder"
-msgstr "Qovluqlar sinxronlaşdırılır"
-
-#: camel/camel-filter-driver.c:786
-#, c-format
-msgid "Getting message %d of %d"
-msgstr "%d İsmarıcın %d qədərə alınır"
-
-#: camel/camel-filter-driver.c:791 camel/camel-filter-driver.c:809
-#, c-format
-msgid "Failed at message %d of %d"
-msgstr "%d nin(nın) %d ismarıcında iflas etdim"
-
-#: camel/camel-filter-driver.c:918
-#, c-format
-msgid "Error parsing filter: %s: %s"
-msgstr "Alıcı süzgəc xətası: %s: %s"
-
-#: camel/camel-filter-driver.c:924
-#, c-format
-msgid "Error executing filter: %s: %s"
-msgstr "İşə salıcı süzgəc xətası: %s: %s"
-
-#: camel/camel-filter-search.c:494 camel/camel-filter-search.c:501
-#, c-format
-msgid "Error executing filter search: %s: %s"
-msgstr "İşə salıcı süzgəc axtarışı xətası: %s: %s"
-
-#: camel/camel-folder.c:472
-#, c-format
-msgid "Unsupported operation: append message: for %s"
-msgstr ""
-
-#: camel/camel-folder.c:1039
-#, fuzzy, c-format
-msgid "Unsupported operation: search by expression: for %s"
-msgstr ""
-"İşə salıcı axtarış ifadəsi darama xətası:%s:\n"
-"%s"
-
-#: camel/camel-folder.c:1219
-#, fuzzy
-msgid "Moving messages"
-msgstr "İsmarıclar köçürülür"
-
-#: camel/camel-folder-search.c:333
-#, c-format
-msgid ""
-"Cannot parse search expression: %s:\n"
-"%s"
-msgstr ""
-"Axtarış ifadəsi darana bilmir:%s:\n"
-"%s"
-
-#: camel/camel-folder-search.c:343
-#, c-format
-msgid ""
-"Error executing search expression: %s:\n"
-"%s"
-msgstr ""
-"İşə salıcı axtarış ifadəsi darama xətası:%s:\n"
-"%s"
-
-#: camel/camel-folder-search.c:560 camel/camel-folder-search.c:588
-msgid "(match-all) requires a single bool result"
-msgstr "(hamısını yoxla) tək düzgün nəticə istəyir"
-
-#: camel/camel-folder-search.c:638
-#, c-format
-msgid "Performing query on unknown header: %s"
-msgstr "Namə'lum başlıqda sorǧu aparılır: %s"
-
-#: camel/camel-folder-search.c:748 camel/camel-folder-search.c:792
-msgid "Invalid type in body-contains, expecting string"
-msgstr "Cismdə hökmsüz yazı, kəlimə xaric"
-
-#: camel/camel-lock-client.c:110
-#, fuzzy, c-format
-msgid "Cannot build locking helper pipe: %s"
-msgstr "Boru yaradıla bilmədi: %s"
-
-#: camel/camel-lock-client.c:123
-#, fuzzy, c-format
-msgid "Cannot fork locking helper: %s"
-msgstr "%s üstündə qovluq qıfılı yaradıla bilmədi: %s"
-
-#: camel/camel-lock-client.c:199 camel/camel-lock-client.c:222
-#, c-format
-msgid "Could not lock '%s': protocol error with lock-helper"
-msgstr ""
-
-#: camel/camel-lock-client.c:212
-#, fuzzy, c-format
-msgid "Could not lock '%s'"
-msgstr "Çəngəllənə bilmədi: %s"
-
-#. well, this is really only a programatic error
-#: camel/camel-lock.c:92 camel/camel-lock.c:111
-#, c-format
-msgid "Could not create lock file for %s: %s"
-msgstr "%s üçün qıfıl faylını yarada bilmədim: %s"
-
-#: camel/camel-lock.c:151
-#, c-format
-msgid "Timed out trying to get lock file on %s. Try again later."
-msgstr "%s dakı(dəki) qıfıl fayllının alınması müddəti doldu. Yenidən sına."
-
-#: camel/camel-lock.c:205
-#, c-format
-msgid "Failed to get lock using fcntl(2): %s"
-msgstr "fcntl(2) istifadə edilərək qıfıl faylı alınması ifşlas etdi: %s"
-
-#: camel/camel-lock.c:267
-#, c-format
-msgid "Failed to get lock using flock(2): %s"
-msgstr "fclock(2) istifadə edilərək qıfıl faylı alınması iflas etdi: %s"
-
-#: camel/camel-movemail.c:108
-#, c-format
-msgid "Could not check mail file %s: %s"
-msgstr "%s məktub faylı yoxlana bilmir: %s"
-
-#: camel/camel-movemail.c:122
-#, c-format
-msgid "Could not open mail file %s: %s"
-msgstr "%s məktub faylı açıla bilmir: %s"
-
-#: camel/camel-movemail.c:130
-#, c-format
-msgid "Could not open temporary mail file %s: %s"
-msgstr "Müvəqqəti məktub faylı %s açıla bilmir: %s"
-
-#: camel/camel-movemail.c:159
-#, c-format
-msgid "Failed to store mail in temp file %s: %s"
-msgstr "Məktubların müvəqqəti %s fayllında saxlanma xətası: %s"
-
-#: camel/camel-movemail.c:189
-#, c-format
-msgid "Could not create pipe: %s"
-msgstr "Boru yaradıla bilmədi: %s"
-
-#: camel/camel-movemail.c:201
-#, c-format
-msgid "Could not fork: %s"
-msgstr "Çəngəllənə bilmədi: %s"
-
-#: camel/camel-movemail.c:239
-#, c-format
-msgid "Movemail program failed: %s"
-msgstr "Məktub daşıma proqramı iflas etdi: %s"
-
-#: camel/camel-movemail.c:240
-msgid "(Unknown error)"
-msgstr "(Namə'lum xəta)"
-
-#: camel/camel-movemail.c:263
-#, c-format
-msgid "Error reading mail file: %s"
-msgstr "Məktub faylı oxunma xətası: %s"
-
-#: camel/camel-movemail.c:274
-#, c-format
-msgid "Error writing mail temp file: %s"
-msgstr "Müvəqqəti məktub faylı yazılması xətası: %s"
-
-#: camel/camel-movemail.c:467 camel/camel-movemail.c:534
-#, c-format
-msgid "Error copying mail temp file: %s"
-msgstr "Müvəqqəti məktub faylı köçürülmə xətası: %s"
-
-#: camel/camel-pgp-context.c:191
-#, c-format
-msgid "Please enter your %s passphrase for %s"
-msgstr "%s üçün %s parol kalimanizi lürfən girin"
-
-#: camel/camel-pgp-context.c:194
-#, c-format
-msgid "Please enter your %s passphrase"
-msgstr "Lütfən %s parol kəlimənizi girin"
-
-#: camel/camel-pgp-context.c:525
-#, fuzzy
-msgid "Cannot sign this message: no plaintext to sign"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/camel-pgp-context.c:532 camel/camel-pgp-context.c:706
-#, fuzzy
-msgid "Cannot sign this message: no password provided"
-msgstr "İsmarıc göndrərilə bilmədi: göndərənin ünvanı hökmsüzdür."
-
-#: camel/camel-pgp-context.c:538 camel/camel-pgp-context.c:712
-#, fuzzy, c-format
-msgid "Cannot sign this message: couldn't create pipe to GPG/PGP: %s"
-msgstr "GPG/PGP proqramına boru yaradıla bilmir. %s"
-
-#: camel/camel-pgp-context.c:699
-#, fuzzy
-msgid "Cannot sign this message: no plaintext to clearsign"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/camel-pgp-context.c:891
-#, fuzzy
-msgid "Cannot verify this message: no plaintext to verify"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/camel-pgp-context.c:897
-#, fuzzy, c-format
-msgid "Cannot verify this message: couldn't create pipe to GPG/PGP: %s"
-msgstr "GPG/PGP proqramına boru yaradıla bilmir. %s"
-
-#: camel/camel-pgp-context.c:908
-#, fuzzy, c-format
-msgid "Cannot verify this message: couldn't create temp file: %s"
-msgstr "Müvəqqəti fayl yaradıla bilmir: %s"
-
-#: camel/camel-pgp-context.c:1076
-#, fuzzy
-msgid "Cannot encrypt this message: no plaintext to encrypt"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/camel-pgp-context.c:1086
-#, fuzzy
-msgid "Cannot encrypt this message: no password provided"
-msgstr "İsmarıc göndrərilə bilmədi: göndərənin ünvanı hökmsüzdür."
-
-#: camel/camel-pgp-context.c:1093
-#, fuzzy, c-format
-msgid "Cannot encrypt this message: couldn't create pipe to GPG/PGP: %s"
-msgstr "GPG/PGP proqramına boru yaradıla bilmir. %s"
-
-#: camel/camel-pgp-context.c:1102
-#, fuzzy
-msgid "Cannot encrypt this message: no recipients specified"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/camel-pgp-context.c:1264
-#, fuzzy
-msgid "Cannot decrypt this message: no ciphertext to decrypt"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/camel-pgp-context.c:1272
-msgid "Cannot decrypt this message: no password provided"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1279
-#, fuzzy, c-format
-msgid "Cannot decrypt this message: couldn't create pipe to GPG/PGP: %s"
-msgstr "GPG/PGP proqramına boru yaradıla bilmir. %s"
-
-#: camel/camel-provider.c:131
-#, c-format
-msgid "Could not load %s: Module loading not supported on this system."
-msgstr "%s yüklənə bilmir: Modul yükləmə bu sistemdə dəstəklənmir."
-
-#: camel/camel-provider.c:140
-#, c-format
-msgid "Could not load %s: %s"
-msgstr "%s yüklənə bilmədi: %s"
-
-#: camel/camel-provider.c:148
-#, c-format
-msgid "Could not load %s: No initialization code in module."
-msgstr "%s yüklənə bilmir: Modulda başlatma kodu yoxdur."
-
-#: camel/camel-remote-store.c:203
-#, c-format
-msgid "%s server %s"
-msgstr "%s verici %s"
-
-#: camel/camel-remote-store.c:207
-#, c-format
-msgid "%s service for %s on %s"
-msgstr "%s üstündə %s üçün %s xidmətləri"
-
-#: camel/camel-remote-store.c:264
-msgid "Connection cancelled"
-msgstr "Bağlantı Ləğv edildi"
-
-#: camel/camel-remote-store.c:267
-#: camel/providers/smtp/camel-smtp-transport.c:272
-#, c-format
-msgid "Could not connect to %s (port %d): %s"
-msgstr "%s a(ə) bağlana bilmirəm (qapı %d): %s"
-
-#: camel/camel-remote-store.c:268
-msgid "(unknown host)"
-msgstr "(namə'lum ev sahibi)"
-
-#: camel/camel-remote-store.c:358 camel/camel-remote-store.c:420
-#: camel/camel-remote-store.c:483
-#: camel/providers/imap/camel-imap-command.c:386
-msgid "Operation cancelled"
-msgstr "Əməliyyat ləğv edildi"
-
-#: camel/camel-remote-store.c:486
-#, fuzzy, c-format
-msgid "Server unexpectedly disconnected: %s"
-msgstr "Verici gözlanilməz şakildə bağlantını kəsdi"
-
-#: camel/camel-sasl-anonymous.c:33
-msgid "Anonymous"
-msgstr "Adsız"
-
-#: camel/camel-sasl-anonymous.c:35
-msgid "This option will connect to the server using an anonymous login."
-msgstr "Bu seçənəklə siz vericisiyə adsız olaraq bağlana biləcəksiniz."
-
-#: camel/camel-sasl-anonymous.c:110 camel/camel-sasl-plain.c:87
-msgid "Authentication failed."
-msgstr "Tanıtma bacarılmadı."
-
-#: camel/camel-sasl-anonymous.c:119
-#, c-format
-msgid ""
-"Invalid email address trace information:\n"
-"%s"
-msgstr ""
-"Hökmsüz ePoçt ünvanı iz mə'lumatı:\n"
-"%s"
-
-#: camel/camel-sasl-anonymous.c:131
-#, c-format
-msgid ""
-"Invalid opaque trace information:\n"
-"%s"
-msgstr ""
-"Hökmsüz mə'nasız iz mə'lumatı:\n"
-"%s"
-
-#: camel/camel-sasl-anonymous.c:143
-#, c-format
-msgid ""
-"Invalid trace information:\n"
-"%s"
-msgstr ""
-"Hökmsüz iz mə'lumatı:\n"
-"%s"
-
-#: camel/camel-sasl-cram-md5.c:35
-msgid "CRAM-MD5"
-msgstr "CRAM-MD5"
-
-#: camel/camel-sasl-cram-md5.c:37
-msgid ""
-"This option will connect to the server using a secure CRAM-MD5 password, if "
-"the server supports it."
-msgstr ""
-"Bu seçənək ,əgər dəstəkləyirsə, verici ilə CRAM-MD5 parolu ilə ünsiyyət "
-"quracaqdır."
-
-#: camel/camel-sasl-digest-md5.c:43
-msgid "DIGEST-MD5"
-msgstr "DIGEST-MD5"
-
-#: camel/camel-sasl-digest-md5.c:45
-msgid ""
-"This option will connect to the server using a secure DIGEST-MD5 password, "
-"if the server supports it."
-msgstr ""
-"Bu seçənək ,əgər dəstəkləyirsə, verici ilə DIGEST-MD5 parolu ilə ünsiyyət "
-"quracaqdır."
-
-#: camel/camel-sasl-digest-md5.c:810
-msgid "Server challenge too long (>2048 octets)\n"
-msgstr "Verici çox uzun dəvət verir (>2048 oktet)\n"
-
-#: camel/camel-sasl-digest-md5.c:819
-msgid "Server challenge invalid\n"
-msgstr "Verici dəvəti hökmsüzdür\n"
-
-#: camel/camel-sasl-digest-md5.c:825
-msgid "Server challenge contained invalid \"Quality of Protection\" token\n"
-msgstr "Verici dəvətində hömksüz \"Qoruma Keyfiyyəti\" bileti vardır\n"
-
-#: camel/camel-sasl-digest-md5.c:847
-msgid "Server response did not contain authorization data\n"
-msgstr "Verici cavabındakı tanıtma mə'lumatı düzgün deyildir\n"
-
-#: camel/camel-sasl-digest-md5.c:865
-msgid "Server response contained incomplete authorization data\n"
-msgstr "Verici cavabındakı tanıtma mə'lumatı natamamdır\n"
-
-#: camel/camel-sasl-digest-md5.c:875
-msgid "Server response does not match\n"
-msgstr "Verci cavabı uyğun gəlmir\n"
-
-#: camel/camel-sasl-kerberos4.c:40
-msgid "Kerberos 4"
-msgstr "Kerberos 4"
-
-#: camel/camel-sasl-kerberos4.c:42
-msgid "This option will connect to the server using Kerberos 4 authentication."
-msgstr ""
-"Bu seçənəklə siz vericisiyə Kerberos 4 tanıdılması yolu ilə bağlana "
-"biləcəksiniz."
-
-#: camel/camel-sasl-kerberos4.c:161
-#, c-format
-msgid ""
-"Could not get Kerberos ticket:\n"
-"%s"
-msgstr ""
-"Kerberos bileti alına bilmir:\n"
-"%s"
-
-#: camel/camel-sasl-kerberos4.c:218
-#: camel/providers/imap/camel-imap-store.c:494
-msgid "Bad authentication response from server."
-msgstr "Vericidən xətalı tanıtma istəyi alındı."
-
-#: camel/camel-sasl-login.c:32
-msgid "NT Login"
-msgstr "NT Giriş"
-
-#: camel/camel-sasl-login.c:34 camel/camel-sasl-plain.c:34
-msgid "This option will connect to the server using a simple password."
-msgstr "Bu seçənəklə siz vericisiyə sadə parol ilə bağlana biləcəksiniz."
-
-#: camel/camel-sasl-login.c:127
-msgid "Unknown authentication state."
-msgstr "Namə'lum tanıtma vəziyyəti."
-
-#: camel/camel-sasl-plain.c:32 camel/providers/imap/camel-imap-provider.c:80
-#: camel/providers/nntp/camel-nntp-store.c:302
-#: camel/providers/pop3/camel-pop3-provider.c:68 mail/mail-config.glade.h:55
-msgid "Password"
-msgstr "Parol"
-
-#: camel/camel-sasl-popb4smtp.c:34
-msgid "POP before SMTP"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:36
-msgid "This option will authorise a POP connection before attempting SMTP"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:107
-#, fuzzy
-msgid "POP Source URI"
-msgstr "Qaynaqlar"
-
-#: camel/camel-sasl-popb4smtp.c:111
-msgid "POP Before SMTP auth using an unknown transport"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:116
-msgid "POP Before SMTP auth using a non-pop source"
-msgstr ""
-
-#: camel/camel-search-private.c:111
-#, c-format
-msgid "Regular expression compilation failed: %s: %s"
-msgstr "Qaydalı ifadə dərlanməsi bacarılmadı: %s: %s"
-
-#: camel/camel-service.c:157
-#, c-format
-msgid "URL '%s' needs a username component"
-msgstr "'%s' URLsi istifadəçi adına ehtiyac hiss edir"
-
-#: camel/camel-service.c:165
-#, c-format
-msgid "URL '%s' needs a host component"
-msgstr "'%s' URLsi ev sahibinə ehtiyac hiss edir"
-
-#: camel/camel-service.c:173
-#, c-format
-msgid "URL '%s' needs a path component"
-msgstr "'%s' URLsi yola ehtiyac hiss edir"
-
-#: camel/camel-service.c:602
-#, c-format
-msgid "Resolving: %s"
-msgstr "\"%s\" Həll edilir"
-
-#: camel/camel-service.c:629
-#, c-format
-msgid "Failure in name lookup: %s"
-msgstr "Ad axtarışında iflas etdim: %s"
-
-#: camel/camel-service.c:654
-#, c-format
-msgid "Host lookup failed: %s: host not found"
-msgstr "Qovşaq Ad axtarışı iflas etdi: %s: qovşaq tapılmadı"
-
-#: camel/camel-service.c:656
-#, c-format
-msgid "Host lookup failed: %s: unknown reason"
-msgstr "Qovşaq Ad axtarışı iflas etdi: %s: namə'lum səbəb"
-
-#: camel/camel-session.c:76
-msgid "Virtual folder email provider"
-msgstr "_Virtual Qovluq Sehirbazı ..."
-
-#: camel/camel-session.c:78
-msgid "For reading mail as a query of another set of folders"
-msgstr "Başqa qovluq dəstələrinin istəyi olan məktubların oxunması üçün"
-
-#: camel/camel-session.c:324 camel/camel-session.c:393
-#, c-format
-msgid "No provider available for protocol `%s'"
-msgstr "`%s' protokolu üçün xidmətçi yoxdur"
-
-#: camel/camel-session.c:510
-#, c-format
-msgid ""
-"Could not create directory %s:\n"
-"%s"
-msgstr ""
-"%s qovluğunu yarada bilmədim:\n"
-"%s"
-
-#: camel/camel-smime-context.c:173
-#, fuzzy, c-format
-msgid "Please enter your password for %s"
-msgstr "%s üçün %s parol kalimanizi lürfən girin"
-
-#: camel/camel-smime-context.c:203
-msgid "Please indicate the nickname of a certificate to sign with."
-msgstr ""
-
-#: camel/camel-smime-context.c:209
-#, fuzzy, c-format
-msgid "The signature certificate for \"%s\" does not exist."
-msgstr "Belə bir fayl yoxdur ."
-
-#: camel/camel-smime-context.c:249
-#, fuzzy, c-format
-msgid "The encryption certificate for \"%s\" does not exist."
-msgstr "Belə bir fayl yoxdur ."
-
-#: camel/camel-smime-context.c:419 camel/camel-smime-context.c:430
-#: camel/camel-smime-context.c:536 camel/camel-smime-context.c:546
-#, fuzzy, c-format
-msgid "Failed to find certificate for \"%s\"."
-msgstr "Vericiyə istifadəçi adı göndərilə bilmədi"
-
-#: camel/camel-smime-context.c:556
-msgid "Failed to find a common bulk algorithm."
-msgstr ""
-
-#: camel/camel-smime-context.c:810
-#, fuzzy
-msgid "Failed to decode message."
-msgstr "Bacarılmayan İsmarıc %d"
-
-#: camel/camel-smime-context.c:855
-msgid "Failed to verify certificates."
-msgstr ""
-
-#: camel/camel-store.c:273
-#, fuzzy
-msgid "Cannot create folder: Invalid operation on this store"
-msgstr "%s üstündə qovluq qıfılı yaradıla bilmədi: %s"
-
-#: camel/camel-tcp-stream-openssl.c:491
-#, c-format
-msgid ""
-"Issuer: %s\n"
-"Subject: %s"
-msgstr ""
-
-#. construct our user prompt
-#: camel/camel-tcp-stream-openssl.c:496 camel/camel-tcp-stream-ssl.c:369
-#, c-format
-msgid ""
-"Bad certificate from %s:\n"
-"\n"
-"%s\n"
-"\n"
-"Do you wish to accept anyway?"
-msgstr ""
-"%sdan(dən) xəsərli vəsizqə:\n"
-"\n"
-"%s\n"
-"\n"
-"Yenə də qəbul etmək istəyirsiniz?"
-
-#: camel/camel-tcp-stream-ssl.c:353
-#, c-format
-msgid ""
-"EMail: %s\n"
-"Common Name: %s\n"
-"Organization Unit: %s\n"
-"Organization: %s\n"
-"Locality: %s\n"
-"State: %s\n"
-"Country: %s"
-msgstr ""
-"ePoçt: %s\n"
-"Ümumə Ad: %s\n"
-"Quruluş Vahidi: %s\n"
-"Quruluş: %s\n"
-"Yer: %s\n"
-"Əyalət: %s\n"
-"Ölkə: %s"
-
-#: camel/camel-url.c:289
-#, c-format
-msgid "Could not parse URL `%s'"
-msgstr "URL `%s' alına bilmir"
-
-#: camel/camel-vee-folder.c:554
-#, c-format
-msgid "No such message %s in %s"
-msgstr "\"%s\"da(də) %s deye bir ismarıc yoxdur"
-
-#: camel/camel-vee-folder.c:649
-#, c-format
-msgid "No such message: %s"
-msgstr "Bele bir ismarıc yoxdur: %s"
-
-#: camel/camel-vee-store.c:250
-#, fuzzy, c-format
-msgid "Cannot delete folder: %s: Invalid operation"
-msgstr "%s üstündə qovluq qıfılı yaradıla bilmədi: %s"
-
-#: camel/camel-vee-store.c:286
-#, fuzzy, c-format
-msgid "Cannot delete folder: %s: No such folder"
-msgstr "Qovluq alına bilmədi: %s: %s"
-
-#: camel/camel-vee-store.c:298
-#, fuzzy, c-format
-msgid "Cannot rename folder: %s: Invalid operation"
-msgstr "%s üstündə qovluq qıfılı yaradıla bilmədi: %s"
-
-#: camel/camel-vee-store.c:326
-#, fuzzy, c-format
-msgid "Cannot rename folder: %s: No such folder"
-msgstr "Qovluq alına bilmədi: %s: %s"
-
-#: camel/camel-vtrash-folder.c:109
-msgid "You cannot copy messages from this trash folder."
-msgstr "Buradakı ismarıcları zibilə göndərə bilməzsiniz."
-
-#: camel/providers/imap/camel-imap-command.c:329
-#, c-format
-msgid "Unexpected response from IMAP server: %s"
-msgstr "IMAP vericisindən gözlənilməz cavab alındı: %s"
-
-#: camel/providers/imap/camel-imap-command.c:339
-#, c-format
-msgid "IMAP command failed: %s"
-msgstr "IMAP əmri iflas etdi: %s"
-
-#: camel/providers/imap/camel-imap-command.c:394
-msgid "Server response ended too soon."
-msgstr "Verci cavabı çox tez sonlandı."
-
-#: camel/providers/imap/camel-imap-command.c:586
-#, c-format
-msgid "IMAP server response did not contain %s information"
-msgstr "IMAP vericisi cavabı %s mə'lumatını daxil etmir"
-
-#: camel/providers/imap/camel-imap-command.c:622
-#, c-format
-msgid "Unexpected OK response from IMAP server: %s"
-msgstr "IMAP vericisindən gözlənilməz qəbul cavabı alındı: %s"
-
-#: camel/providers/imap/camel-imap-folder.c:189
-#, c-format
-msgid "Could not create directory %s: %s"
-msgstr "%s qovluğunu yarada bilmədim: %s"
-
-#: camel/providers/imap/camel-imap-folder.c:208
-#, c-format
-msgid "Could not load summary for %s"
-msgstr "%s üçün mündəricat yüklənə bilmədi"
-
-#: camel/providers/imap/camel-imap-folder.c:272
-msgid "Folder was destroyed and recreated on server."
-msgstr ""
-
-#. Check UIDs and flags of all messages we already know of.
-#: camel/providers/imap/camel-imap-folder.c:434
-#, fuzzy
-msgid "Scanning for changed messages"
-msgstr "İsmarıclar qeyd edilir"
-
-#: camel/providers/imap/camel-imap-folder.c:1491
-#: camel/providers/imap/camel-imap-folder.c:1899
-msgid "This message is not currently available"
-msgstr "Bu ismarıc hazırda mövcuddur"
-
-#: camel/providers/imap/camel-imap-folder.c:1633
-#: camel/providers/imap/camel-imap-folder.c:1714
-msgid "Fetching summary information for new messages"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-folder.c:1639
-#, fuzzy
-msgid "Scanning for new messages"
-msgstr "İsmarıclar qeyd edilir"
-
-#: camel/providers/imap/camel-imap-folder.c:1936
-msgid "Could not find message body in FETCH response."
-msgstr "FETCH cavabında ismarıc gövdəsi tapıla bilmədi"
-
-#: camel/providers/imap/camel-imap-message-cache.c:155
-#, c-format
-msgid "Could not open cache directory: %s"
-msgstr "Ön yaddaş qovluğunu aça bilmədim: %s"
-
-#: camel/providers/imap/camel-imap-message-cache.c:243
-#: camel/providers/imap/camel-imap-message-cache.c:299
-#: camel/providers/imap/camel-imap-message-cache.c:330
-#: camel/providers/imap/camel-imap-message-cache.c:362
-#, fuzzy, c-format
-msgid "Failed to cache message %s: %s"
-msgstr "Bacarılmayan İsmarıc %d"
-
-#: camel/providers/imap/camel-imap-provider.c:43 mail/mail-config.glade.h:15
-msgid "Checking for new mail"
-msgstr "Yeni ePoçt üçün baxılır"
-
-#: camel/providers/imap/camel-imap-provider.c:45
-msgid "Check for new messages in all folders"
-msgstr "Bütün qovluqlarda yeni ePoçt üçün bax"
-
-#: camel/providers/imap/camel-imap-provider.c:48 shell/e-shell-view.c:767
-msgid "Folders"
-msgstr "Qovluqlar"
-
-#: camel/providers/imap/camel-imap-provider.c:50
-msgid "Show only subscribed folders"
-msgstr "Təkcə qeydiyyatdan keçilmiş qovluqları göstər"
-
-#: camel/providers/imap/camel-imap-provider.c:52
-msgid "Override server-supplied folder namespace"
-msgstr "Verici əlavəlı qovluq adı boşluqlarını nəzərə alma"
-
-#: camel/providers/imap/camel-imap-provider.c:54
-msgid "Namespace"
-msgstr "Ad boşluğu"
-
-#: camel/providers/imap/camel-imap-provider.c:57
-msgid "Apply filters to new messages in INBOX on this server"
-msgstr "Bu vericinin GƏLƏNLƏR qutusundaki ismarıclara süzgəv əlavə et"
-
-#: camel/providers/imap/camel-imap-provider.c:63
-#, fuzzy
-msgid "IMAP"
-msgstr "IMAPv4"
-
-#: camel/providers/imap/camel-imap-provider.c:65
-msgid "For reading and storing mail on IMAP servers."
-msgstr "IMAP vericisində məktubların saxlanması və oxuna bilməsi üçün."
-
-#: camel/providers/imap/camel-imap-provider.c:82
-msgid "This option will connect to the IMAP server using a plaintext password."
-msgstr ""
-"Bu seçənəklə siz IMAP vericisinə düz mətn parol ilə bağlana biləcəksiniz."
-
-#: camel/providers/imap/camel-imap-store.c:517
-#, c-format
-msgid "IMAP server %s does not support requested authentication type %s"
-msgstr "%s IMAP vericisi %s tanıtma növünü dəstəkləmir"
-
-#: camel/providers/imap/camel-imap-store.c:527
-#: camel/providers/smtp/camel-smtp-transport.c:388
-#, c-format
-msgid "No support for authentication type %s"
-msgstr "%s Tanıtma növü dəßtəklənmir"
-
-#: camel/providers/imap/camel-imap-store.c:551
-#, c-format
-msgid "%sPlease enter the IMAP password for %s@%s"
-msgstr "%sLütfən %s@%s üçün IMAP parolunu girin"
-
-#: camel/providers/imap/camel-imap-store.c:566
-#: camel/providers/smtp/camel-smtp-transport.c:432
-msgid "You didn't enter a password."
-msgstr "Parolu girmədiniz."
-
-#: camel/providers/imap/camel-imap-store.c:592
-#, c-format
-msgid ""
-"Unable to authenticate to IMAP server.\n"
-"%s\n"
-"\n"
-msgstr ""
-"IMAP vericisinə tanıdılma xətası.\n"
-"%s\n"
-"\n"
-
-#: camel/providers/imap/camel-imap-store.c:891
-#, c-format
-msgid "No such folder %s"
-msgstr "%s deyə bir qovluq yoxdur"
-
-#: camel/providers/imap/camel-imap-store.c:1131
-msgid "The parent folder is not allowed to contain subfolders"
-msgstr ""
-
-#: camel/providers/local/camel-local-provider.c:40
-msgid "MH-format mail directories"
-msgstr "MH-şəklində məktub qovluqları"
-
-#: camel/providers/local/camel-local-provider.c:41
-#, fuzzy
-msgid "For storing local mail in MH-like mail directories."
-msgstr "Yerli məktubların MH oxşarı məktub qovluqlarında saxlamaq üçün"
-
-#: camel/providers/local/camel-local-provider.c:50
-#, fuzzy
-msgid "Local delivery"
-msgstr "Xüsusi Cərgələr"
-
-#: camel/providers/local/camel-local-provider.c:51
-#, fuzzy
-msgid "For retrieving local mail from standard mbox formated spools."
-msgstr "Standart mbox şəklindəki məktubların saxlanması üçün"
-
-#: camel/providers/local/camel-local-provider.c:60
-#, fuzzy
-msgid "Apply filters to new messages in INBOX"
-msgstr "Bu vericinin GƏLƏNLƏR qutusundaki ismarıclara süzgəv əlavə et"
-
-#: camel/providers/local/camel-local-provider.c:66
-msgid "Qmail maildir-format mail files"
-msgstr "Qmail məktun qovluğu şəklindəki məktub faylı"
-
-#: camel/providers/local/camel-local-provider.c:67
-#, fuzzy
-msgid "For storing local mail in qmail maildir directories."
-msgstr "Yerli məktubları qmail məktub qovluqlarında saxlaya bilmək üçün"
-
-#: camel/providers/local/camel-local-provider.c:78
-#, fuzzy
-msgid "Standard Unix mbox spools"
-msgstr "Standart UNIX poçt qutusu faylı"
-
-#: camel/providers/local/camel-local-provider.c:79
-#, fuzzy
-msgid "For reading and storing local mail in standard mbox spool files."
-msgstr "Yerli məktubları qmail məktub qovluqlarında saxlaya bilmək üçün"
-
-#: camel/providers/local/camel-local-store.c:132
-#: camel/providers/local/camel-spool-store.c:110
-#, c-format
-msgid "Store root %s is not an absolute path"
-msgstr "%s kök saxlama dəqiq bir yol deyildir"
-
-#: camel/providers/local/camel-local-store.c:139
-#, c-format
-msgid "Store root %s is not a regular directory"
-msgstr "%s kök saxlama düzgün bir qovluq deyildir."
-
-#: camel/providers/local/camel-local-store.c:147
-#: camel/providers/local/camel-local-store.c:163
-#, c-format
-msgid "Cannot get folder: %s: %s"
-msgstr "Qovluq alına bilmədi: %s: %s"
-
-#: camel/providers/local/camel-local-store.c:178
-msgid "Local stores do not have an inbox"
-msgstr "Yerli saxlamaların gələnlər qutusu qovluğu yoxdur"
-
-#: camel/providers/local/camel-local-store.c:190
-#, c-format
-msgid "Local mail file %s"
-msgstr "%s Yeli məktub faylı"
-
-#: camel/providers/local/camel-local-store.c:247
-#, c-format
-msgid "Could not rename folder %s to %s: %s"
-msgstr "%s faylı %s adi ilə yenidən adlandırıla bilmir: %s"
-
-#: camel/providers/local/camel-local-store.c:289
-#, c-format
-msgid "Could not delete folder summary file `%s': %s"
-msgstr "`%s' Qovluq mündəricat faylı silinə bilmir: %s"
-
-#: camel/providers/local/camel-local-store.c:299
-#, c-format
-msgid "Could not delete folder index file `%s': %s"
-msgstr "`%s' Qovluq indeks faylı silinə bilmir: %s"
-
-#: camel/providers/local/camel-local-summary.c:418
-#: camel/providers/local/camel-spool-summary.c:1158
-msgid "Unable to add message to summary: unknown reason"
-msgstr "Xülasəyə ismarıc əlavə edə bilmədim: namə'lum səbəb"
-
-#: camel/providers/local/camel-maildir-folder.c:181
-#, c-format
-msgid "Cannot append message to maildir folder: %s: %s"
-msgstr "İsmarıc məktub qovluğu fayllına əlavə edilə bilmir: %s: %s "
-
-#: camel/providers/local/camel-maildir-folder.c:206
-#: camel/providers/local/camel-maildir-folder.c:218
-#: camel/providers/local/camel-maildir-folder.c:226
-#: camel/providers/local/camel-mbox-folder.c:328
-#: camel/providers/local/camel-mh-folder.c:195
-#: camel/providers/local/camel-mh-folder.c:204
-#: camel/providers/local/camel-mh-folder.c:212
-#: camel/providers/local/camel-spool-folder.c:537
-#, c-format
-msgid ""
-"Cannot get message: %s\n"
-" %s"
-msgstr ""
-"İSmarıc alına bilmir: %s\n"
-" %s"
-
-#: camel/providers/local/camel-maildir-folder.c:206
-#: camel/providers/local/camel-mbox-folder.c:328
-#: camel/providers/local/camel-mh-folder.c:195
-#: camel/providers/local/camel-spool-folder.c:537
-msgid "No such message"
-msgstr "Belə bir ismarıc yoxdur"
-
-#: camel/providers/local/camel-maildir-folder.c:227
-#: camel/providers/local/camel-mh-folder.c:213
-msgid "Invalid message contents"
-msgstr "Hökmsüz ismarıc mövtəviyyatı"
-
-#: camel/providers/local/camel-maildir-store.c:106
-#: camel/providers/local/camel-mh-store.c:90
-#, c-format
-msgid ""
-"Could not open folder `%s':\n"
-"%s"
-msgstr ""
-"`%s' qovluğu açıla bilmir: \n"
-"%s"
-
-#: camel/providers/local/camel-maildir-store.c:110
-#: camel/providers/local/camel-mbox-store.c:101
-#: camel/providers/local/camel-mh-store.c:97
-#, c-format
-msgid "Folder `%s' does not exist."
-msgstr "`%s' faylı yoxdur ."
-
-#: camel/providers/local/camel-maildir-store.c:117
-#: camel/providers/local/camel-mh-store.c:103
-#, c-format
-msgid ""
-"Could not create folder `%s':\n"
-"%s"
-msgstr ""
-"`%s' qovluğu yaradıla bilmədi:\n"
-"%s"
-
-#: camel/providers/local/camel-maildir-store.c:132
-#, c-format
-msgid "`%s' is not a maildir directory."
-msgstr "`%s' məktub qovluğu faylı deyildir."
-
-#: camel/providers/local/camel-maildir-store.c:167
-#: camel/providers/local/camel-maildir-store.c:204
-#: camel/providers/local/camel-mh-store.c:127
-#, c-format
-msgid "Could not delete folder `%s': %s"
-msgstr "`%s' qovluğu silinə bilmir: %s"
-
-#: camel/providers/local/camel-maildir-store.c:168
-msgid "not a maildir directory"
-msgstr "məktub qovluğu faylı deyildir"
-
-#: camel/providers/local/camel-maildir-store.c:331
-#, fuzzy, c-format
-msgid "Could not scan folder `%s': %s"
-msgstr ""
-"`%s' qovluğu yaradıla bilmədi:\n"
-"%s"
-
-#: camel/providers/local/camel-maildir-summary.c:405
-#: camel/providers/local/camel-maildir-summary.c:526
-#, c-format
-msgid "Cannot open maildir directory path: %s: %s"
-msgstr "Məktub cərgəsi qovluğu cığırı açıla bilmir: %s: %s"
-
-#: camel/providers/local/camel-mbox-folder.c:152
-#: camel/providers/local/camel-spool-folder.c:273
-#, c-format
-msgid "Cannot create folder lock on %s: %s"
-msgstr "%s üstündə qovluq qıfılı yaradıla bilmədi: %s"
-
-#: camel/providers/local/camel-mbox-folder.c:209
-#: camel/providers/local/camel-spool-folder.c:414
-#, c-format
-msgid "Cannot open mailbox: %s: %s\n"
-msgstr "Məktub qutusu açıla bilmir: %s: %s\n"
-
-#: camel/providers/local/camel-mbox-folder.c:265
-#, c-format
-msgid "Cannot append message to mbox file: %s: %s"
-msgstr "İsmarıc mbox fayllına əlava edilə bimir: %s: %s"
-
-#: camel/providers/local/camel-mbox-folder.c:344
-#: camel/providers/local/camel-mbox-folder.c:376
-#: camel/providers/local/camel-mbox-folder.c:389
-#: camel/providers/local/camel-spool-folder.c:553
-#: camel/providers/local/camel-spool-folder.c:585
-#: camel/providers/local/camel-spool-folder.c:598
-#, c-format
-msgid ""
-"Cannot get message: %s from folder %s\n"
-" %s"
-msgstr ""
-"İsmarıc alına bilmir: %s qovluğundan %s\n"
-" %s"
-
-#: camel/providers/local/camel-mbox-folder.c:377
-#: camel/providers/local/camel-spool-folder.c:586
-msgid "The folder appears to be irrecoverably corrupted."
-msgstr "Qovluq geri dönülməz şəkildə xəsarət alıb."
-
-#: camel/providers/local/camel-mbox-folder.c:390
-#: camel/providers/local/camel-spool-folder.c:599
-msgid "Message construction failed: Corrupt mailbox?"
-msgstr "İSmarıc quruluşu bacarılmadı: Məktub qutusu yoxsa xəsərlidir?"
-
-#: camel/providers/local/camel-mbox-store.c:94
-#, c-format
-msgid ""
-"Could not open file `%s':\n"
-"%s"
-msgstr ""
-"`%s' Faylı açıla bilmir:\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-store.c:110
-#, c-format
-msgid ""
-"Could not create file `%s':\n"
-"%s"
-msgstr ""
-"`%s' faylı yaradıla bilmədi: \n"
-"%s"
-
-#: camel/providers/local/camel-mbox-store.c:119
-#: camel/providers/local/camel-mbox-store.c:146
-#, c-format
-msgid "`%s' is not a regular file."
-msgstr "`%s' normal bir fayl deyildir ."
-
-#: camel/providers/local/camel-mbox-store.c:138
-#: camel/providers/local/camel-mbox-store.c:161
-#, c-format
-msgid ""
-"Could not delete folder `%s':\n"
-"%s"
-msgstr ""
-"`%s' qovluğu silinə bilmir:\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-store.c:153
-#, c-format
-msgid "Folder `%s' is not empty. Not deleted."
-msgstr "`%s' qovluğu boş deyildir. Silinmədi."
-
-#. 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/providers/local/camel-mbox-summary.c:249
-#: camel/providers/local/camel-mbox-summary.c:502
-#: camel/providers/local/camel-mbox-summary.c:703
-#: camel/providers/local/camel-spool-summary.c:644
-#: camel/providers/local/camel-spool-summary.c:936
-#, fuzzy
-msgid "Storing folder"
-msgstr "Qovluqlar sinxronlaşdırılır"
-
-#: camel/providers/local/camel-mbox-summary.c:254
-#, fuzzy, c-format
-msgid "Could not open folder: %s: %s"
-msgstr ""
-"`%s' qovluğu açıla bilmir: \n"
-"%s"
-
-#: camel/providers/local/camel-mbox-summary.c:296
-#: camel/providers/local/camel-spool-summary.c:426
-#, c-format
-msgid "Fatal mail parser error near position %ld in folder %s"
-msgstr "%ld yeri yaxınlığında %s qovluğunda ciddi məktub darama xətası"
-
-#: camel/providers/local/camel-mbox-summary.c:371
-#, fuzzy, c-format
-msgid "Cannot check folder: %s: %s"
-msgstr "Qovluq alına bilmədi: %s: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:507
-#: camel/providers/local/camel-mbox-summary.c:708
-#: camel/providers/local/camel-spool-summary.c:649
-#, fuzzy, c-format
-msgid "Could not open file: %s: %s"
-msgstr ""
-"`%s' Faylı açıla bilmir:\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-summary.c:524
-#: camel/providers/local/camel-spool-summary.c:673
-#, c-format
-msgid "Cannot open temporary mailbox: %s"
-msgstr "Müvəqqəti məktub qutusu açıla bilmir: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:549
-#: camel/providers/local/camel-mbox-summary.c:557
-#: camel/providers/local/camel-mbox-summary.c:746
-#: camel/providers/local/camel-mbox-summary.c:754
-#: camel/providers/local/camel-spool-summary.c:698
-#: camel/providers/local/camel-spool-summary.c:706
-#: camel/providers/local/camel-spool-summary.c:979
-#: camel/providers/local/camel-spool-summary.c:987
-msgid "Summary and folder mismatch, even after a sync"
-msgstr ""
-"Toplama və qovluq bir birinə uyğun gəlmir, sinxronizasiyadan sonra da əlbətdə"
-
-#: camel/providers/local/camel-mbox-summary.c:600
-#: camel/providers/local/camel-spool-summary.c:750
-#, c-format
-msgid "Error writing to temp mailbox: %s"
-msgstr "Müvəqqəti məktub qutusuna yazıla bilmir: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:617
-#: camel/providers/local/camel-spool-summary.c:772
-#, c-format
-msgid "Writing to tmp mailbox failed: %s: %s"
-msgstr "Müvəqqəti məktub qutusuna yazılma bacarılmadı: %s: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:635
-#: camel/providers/local/camel-mbox-summary.c:804
-#: camel/providers/local/camel-spool-summary.c:1037
-#, c-format
-msgid "Could not close source folder %s: %s"
-msgstr "Qaynaq qovluğu bağlana bilmədi: %s: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:644
-#, c-format
-msgid "Could not close temp folder: %s"
-msgstr "Müvəqqəti qovluq bağlana bilmədi: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:655
-#, c-format
-msgid "Could not rename folder: %s"
-msgstr "Qovluq yenidən adlandırıla bilmir: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:878
-#: camel/providers/local/camel-spool-summary.c:545
-#: camel/providers/local/camel-spool-summary.c:1111
-#, c-format
-msgid "Unknown error: %s"
-msgstr "Namə'lum xəta: %s"
-
-#: camel/providers/local/camel-mh-folder.c:172
-#, c-format
-msgid "Cannot append message to mh folder: %s: %s"
-msgstr "mh qovluğuna ismarıc əlavə edilə bilmir: %s: %s"
-
-#: camel/providers/local/camel-mh-store.c:110
-#, c-format
-msgid "`%s' is not a directory."
-msgstr "`%s' qovluq deyildir."
-
-#: camel/providers/local/camel-mh-summary.c:218
-#, c-format
-msgid "Cannot open MH directory path: %s: %s"
-msgstr "MH cərgə cığırı açıla bilmir: %s: %s"
-
-#: camel/providers/local/camel-spool-folder.c:470
-#, fuzzy, c-format
-msgid "Cannot append message to spool file: %s: %s"
-msgstr "İsmarıc mbox fayllına əlava edilə bimir: %s: %s"
-
-#: camel/providers/local/camel-spool-store.c:116
-#, fuzzy, c-format
-msgid "Spool `%s' does not exist or is not a regular file"
-msgstr "`%s' normal bir fayl deyildir ."
-
-#: camel/providers/local/camel-spool-store.c:142
-#, fuzzy, c-format
-msgid "Folder `%s/%s' does not exist."
-msgstr "`%s' faylı yoxdur ."
-
-#: camel/providers/local/camel-spool-store.c:164
-#, fuzzy, c-format
-msgid "Spool mail file %s"
-msgstr "%s Yeli məktub faylı"
-
-#: camel/providers/local/camel-spool-store.c:210
-msgid "Spool folders cannot be renamed"
-msgstr ""
-
-#: camel/providers/local/camel-spool-store.c:218
-msgid "Spool folders cannot be deleted"
-msgstr ""
-
-#. 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/providers/local/camel-spool-summary.c:379
-#, fuzzy
-msgid "Summarising folder"
-msgstr "Qovluq Cəmləşdirilir"
-
-#: camel/providers/local/camel-spool-summary.c:384
-#, fuzzy, c-format
-msgid "Could not open folder: %s: summarising from position %ld: %s"
-msgstr "Qovluq açıla bilmir: %s:%ld yerindən yığcamlaşdırılır: %s"
-
-#: camel/providers/local/camel-spool-summary.c:498
-#, c-format
-msgid "Cannot summarise folder: %s: %s"
-msgstr "Qovluq yığcamlaşdırıla bilmir: %s: %s"
-
-#: camel/providers/local/camel-spool-summary.c:789
-#: camel/providers/local/camel-spool-summary.c:798
-#: camel/providers/local/camel-spool-summary.c:807
-#, fuzzy, c-format
-msgid "Could not sync temporary folder %s: %s"
-msgstr "Müvəqqəti məktub faylı %s açıla bilmir: %s"
-
-#: camel/providers/local/camel-spool-summary.c:822
-#, fuzzy, c-format
-msgid "Could not sync spool folder %s: %s"
-msgstr "Qaynaq qovluğu bağlana bilmədi: %s: %s"
-
-#: camel/providers/local/camel-spool-summary.c:852
-#: camel/providers/local/camel-spool-summary.c:870
-#: camel/providers/local/camel-spool-summary.c:882
-#, c-format
-msgid ""
-"Could not sync spool folder %s: %s\n"
-"Folder may be corrupt, copy saved in `%s'"
-msgstr ""
-
-#: camel/providers/local/camel-spool-summary.c:941
-#, fuzzy, c-format
-msgid "Could not file: %s: %s"
-msgstr "%s yüklənə bilmədi: %s"
-
-#: camel/providers/nntp/camel-nntp-auth.c:45
-#, c-format
-msgid "Please enter the NNTP password for %s@%s"
-msgstr "%s@%s üçün parolu lütfən girin"
-
-#: camel/providers/nntp/camel-nntp-auth.c:65
-msgid "Server rejected username"
-msgstr "Verici istifadəçi adını qəbul etmədi"
-
-#: camel/providers/nntp/camel-nntp-auth.c:71
-msgid "Failed to send username to server"
-msgstr "Vericiyə istifadəçi adı göndərilə bilmədi"
-
-#: camel/providers/nntp/camel-nntp-auth.c:80
-msgid "Server rejected username/password"
-msgstr "Verici istifadəçi adını/parolunu qəbul etmədi"
-
-#: camel/providers/nntp/camel-nntp-folder.c:116
-#, c-format
-msgid "Message %s not found."
-msgstr "%s ismarıcı tapıla bilmədi"
-
-#: camel/providers/nntp/camel-nntp-grouplist.c:46
-msgid "Could not get group list from server."
-msgstr "Vericidən qrup adı öyrənilə bilmədi."
-
-#: camel/providers/nntp/camel-nntp-grouplist.c:99
-#: camel/providers/nntp/camel-nntp-grouplist.c:108
-#, c-format
-msgid "Unable to load grouplist file for %s: %s"
-msgstr "%s üçün qrup siyahısı yüklənə bilmir: %s"
-
-#: camel/providers/nntp/camel-nntp-grouplist.c:159
-#, c-format
-msgid "Unable to save grouplist file for %s: %s"
-msgstr "%s üçün qrup faylı qeyd edilə bilmir: %s"
-
-#: camel/providers/nntp/camel-nntp-provider.c:42
-msgid "USENET news"
-msgstr "USENET xəbərləri"
-
-#: camel/providers/nntp/camel-nntp-provider.c:44
-msgid "This is a provider for reading from and posting toUSENET newsgroups."
-msgstr ""
-"USENET xəbər qruplarına göndərilmiş hər hansı bir xəbəri oxumaq üçün bir "
-"vasitədir."
-
-#: camel/providers/nntp/camel-nntp-store.c:231
-#, c-format
-msgid "Could not open directory for news server: %s"
-msgstr "Xəbər vericisi üçün qovluq açıla bilmir: %s"
-
-#: camel/providers/nntp/camel-nntp-store.c:297
-#, c-format
-msgid "USENET News via %s"
-msgstr "%s dan(dən) USENET Xəbərləri"
-
-#: camel/providers/nntp/camel-nntp-store.c:304
-msgid ""
-"This option will authenticate with the NNTP server using a plaintext "
-"password."
-msgstr ""
-"Bu seçənək NNTP verisici ilə düz mətn şəklindəki parol ilə ünsiyyət "
-"quracaqdır."
-
-#: camel/providers/nntp/camel-nntp-store.c:334
-#: camel/providers/nntp/camel-nntp-store.c:496
-#, c-format
-msgid "Unable to open or create .newsrc file for %s: %s"
-msgstr "%s üçün .newsrc faylı açıla bilmir ya da yaradıla bilmir: %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:189
-msgid "Retrieving POP summary"
-msgstr "POP yığcamlaşdırılması alınır"
-
-#: camel/providers/pop3/camel-pop3-folder.c:195
-#, c-format
-msgid "Could not check POP server for new messages: %s"
-msgstr "POP vericisindəki yeni ismarıclar yoxlana bilmir: %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:242
-msgid "Could not open folder: message listing was incomplete."
-msgstr "Qovluq açıla bilmir: ismarıc siyahısı bütün deyil."
-
-#: camel/providers/pop3/camel-pop3-folder.c:266
-#, fuzzy
-msgid "Expunging deleted messages"
-msgstr "Seçili ismarıcları sil"
-
-#: camel/providers/pop3/camel-pop3-folder.c:342
-#, c-format
-msgid "Could not fetch message: %s"
-msgstr "İsmarıc alına bilmir: %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:358
-#, c-format
-msgid "Could not retrieve message from POP server %s: %s"
-msgstr "%s POP vericisindən ismarıclar alına bilmədi: %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:381
-#, c-format
-msgid "No message with uid %s"
-msgstr "%s uid'li ismarıc yoxdur"
-
-#: camel/providers/pop3/camel-pop3-folder.c:385
-#, c-format
-msgid "Retrieving POP message %d"
-msgstr "%d POP ismarıcı alınır"
-
-#: camel/providers/pop3/camel-pop3-provider.c:37
-msgid "Message storage"
-msgstr "İsmarıc saxlanması"
-
-#: camel/providers/pop3/camel-pop3-provider.c:39
-msgid "Leave messages on server"
-msgstr "İsmarıcları Vericidə burax"
-
-#: camel/providers/pop3/camel-pop3-provider.c:42
-#, c-format
-msgid "Delete after %s day(s)"
-msgstr "%s gün sonra sil"
-
-#: camel/providers/pop3/camel-pop3-provider.c:51 mail/mail-config.glade.h:54
-msgid "POP"
-msgstr "POP"
-
-#: camel/providers/pop3/camel-pop3-provider.c:53
-#, fuzzy
-msgid "For connecting to and downloading mail from POP servers."
-msgstr "IMAP vericisində məktubların saxlanması və oxuna bilməsi üçün."
-
-#: camel/providers/pop3/camel-pop3-provider.c:70
-msgid ""
-"This option will connect to the POP server using a plaintext password. This "
-"is the only option supported by many POP servers."
-msgstr ""
-"Bu seçənək POP verisici ilə düz mətn şəklindəki parol ilə ünsiyyət "
-"quracaqdır.Bu bir çox məktub vericisi tərəfindən dəstəklənən yeganə "
-"seçənəkdir."
-
-#: camel/providers/pop3/camel-pop3-provider.c:80
-msgid ""
-"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."
-msgstr ""
-"Bu seçənək POP verisici ilə APOP protokolu ilə kodlanmış parol ilə ünsiyyət "
-"quracaqdır. Bu seçənək bütün vericilər tərəfindən bütün istifadəçilər üçün "
-"dəstəklənməz."
-
-#: camel/providers/pop3/camel-pop3-provider.c:92
-msgid ""
-"This will connect to the POP server and use Kerberos 4 to authenticate to it."
-msgstr ""
-"Bu seçənək POP verisici ilə Kerberos 4 istifadə edərək ünsiyyət quracaqdır."
-
-#: camel/providers/pop3/camel-pop3-store.c:199
-#, c-format
-msgid "Could not authenticate to KPOP server: %s"
-msgstr "KPOP vericisi ilə ünsüyyət qurula bilmir: %s"
-
-#: camel/providers/pop3/camel-pop3-store.c:215
-#, c-format
-msgid "Could not connect to server: %s"
-msgstr "Vericiyə bağlana bilmirəm: %s"
-
-#: camel/providers/pop3/camel-pop3-store.c:322
-#, c-format
-msgid "Could not connect to POP server on %s."
-msgstr "%s üstündəki POP vericisi ilə ünsiyyət qurula bilmir."
-
-#: camel/providers/pop3/camel-pop3-store.c:361
-#, c-format
-msgid "%sPlease enter the POP3 password for %s@%s"
-msgstr "%sLütfən %s@%s üçün POP3 parolunuzu girin"
-
-#: camel/providers/pop3/camel-pop3-store.c:379
-#, c-format
-msgid ""
-"Unable to connect to POP server.\n"
-"Error sending username: %s"
-msgstr ""
-"POP vericisinə bağlana bilmədim.\n"
-"İstifadəçi adı göndərilmə xətası oldu: %s"
-
-#: camel/providers/pop3/camel-pop3-store.c:382
-#: camel/providers/pop3/camel-pop3-store.c:419
-msgid "(Unknown)"
-msgstr "(Namə'lum)"
-
-#: camel/providers/pop3/camel-pop3-store.c:409
-msgid ""
-"Unable to connect to POP server.\n"
-"No support for requested authentication mechanism."
-msgstr ""
-"POP vericisinə bağlana bilmədim.\n"
-"İstənən tanıtma protokoluna dəstək verilmir."
-
-#: camel/providers/pop3/camel-pop3-store.c:417
-#, c-format
-msgid ""
-"Unable to connect to POP server.\n"
-"Error sending password: %s"
-msgstr ""
-"POP vericisinə bağlana bilmədim.\n"
-"Parol göndərmə xətası oldu: %s"
-
-#: camel/providers/pop3/camel-pop3-store.c:484
-#, c-format
-msgid "No such folder `%s'."
-msgstr "`%s' deyə bir qovluq yoxdur."
-
-#: camel/providers/pop3/camel-pop3-store.c:567
-#, fuzzy, c-format
-msgid "Unexpected response from POP server: %s"
-msgstr "IMAP vericisindən gözlənilməz cavab alındı: %s"
-
-#: camel/providers/sendmail/camel-sendmail-provider.c:37
-#: mail/mail-config.glade.h:73
-msgid "Sendmail"
-msgstr "Sendmail"
-
-#: camel/providers/sendmail/camel-sendmail-provider.c:39
-msgid ""
-"For delivering mail by passing it to the \"sendmail\" program on the local "
-"system."
-msgstr ""
-"Yerli sistemdəki \"sendmail\" proqramı istifadə edilərək məktub göndərmək "
-"üçün."
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:107
-#, c-format
-msgid "Could not create pipe to sendmail: %s: mail not sent"
-msgstr "Sendmailə boru(pipe) çəkilə bilmədi bilmədi. %s: məktub göndərilmədi"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:124
-#, c-format
-msgid "Could not fork sendmail: %s: mail not sent"
-msgstr "Sendmail çəngəllənə bilmədi: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:150
-#, c-format
-msgid "Could not send message: %s"
-msgstr "İsmarıc göndərilə bilmədi: %s"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:163
-#, c-format
-msgid "sendmail exited with signal %s: mail not sent."
-msgstr "sendmail %s siqnalı verərək bağlandı: məktub göndərilə bilmədi."
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:170
-#, c-format
-msgid "Could not execute %s: mail not sent."
-msgstr "%s işə salına bilmir: məktub göndərilə bilmədi."
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:175
-#, c-format
-msgid "sendmail exited with status %d: mail not sent."
-msgstr "sendmail %d halı ilə bağlandı: məktub göndərilə bilmədi."
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:194
-msgid "Could not find 'From' address in message"
-msgstr "İsmarıcda 'Göndərən' ünvanı tapıla bilmədi"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:247
-msgid "sendmail"
-msgstr "sendmail"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:249
-msgid "Mail delivery via the sendmail program"
-msgstr "Sendmail proqramı ilə məktub göndərilməsi"
-
-#: camel/providers/smtp/camel-smtp-provider.c:38 mail/mail-config.glade.h:66
-msgid "SMTP"
-msgstr "SMTP"
-
-#: camel/providers/smtp/camel-smtp-provider.c:40
-msgid "For delivering mail by connecting to a remote mailhub using SMTP.\n"
-msgstr ""
-"SMTP istifadə edilərək uzaq məktub yayıcısına bağlanaraq məktub göndərmək "
-"üçün.\n"
-
-#: camel/providers/smtp/camel-smtp-transport.c:171
-msgid "Syntax error, command unrecognized"
-msgstr "Sintaksis xətası, əmr tanınmır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:173
-msgid "Syntax error in parameters or arguments"
-msgstr "Parametr və ya arqumentlərdə sintaksis xətası"
-
-#: camel/providers/smtp/camel-smtp-transport.c:175
-msgid "Command not implemented"
-msgstr "Əmr qəbul edilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:177
-msgid "Command parameter not implemented"
-msgstr "Əmr parametri qəbul edilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:179
-msgid "System status, or system help reply"
-msgstr "Sistem vəziyyəti və ya kömək cavabı"
-
-#: camel/providers/smtp/camel-smtp-transport.c:181
-msgid "Help message"
-msgstr "Kömək İsmarıcı"
-
-#: camel/providers/smtp/camel-smtp-transport.c:183
-msgid "Service ready"
-msgstr "Xidmət hazırdır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:185
-msgid "Service closing transmission channel"
-msgstr "Xidmət nəqliyyat kanallarını bağlayır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:187
-msgid "Service not available, closing transmission channel"
-msgstr "Xidmət uyğun deyildir, nəqliyyat kanalları bağlanır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:189
-msgid "Requested mail action okay, completed"
-msgstr "Sorğulanan məktub gedişi müvəffəqiyyətlidir, qurtardı"
-
-#: camel/providers/smtp/camel-smtp-transport.c:191
-msgid "User not local; will forward to <forward-path>"
-msgstr "İstifadəçi yerli deyil; <çatdırma cığırı>na çatdırıram"
-
-#: camel/providers/smtp/camel-smtp-transport.c:193
-msgid "Requested mail action not taken: mailbox unavailable"
-msgstr "Sorğulanan məktub gedişi alınmadı; məktub qutusu əl çatmazdır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:195
-msgid "Requested action not taken: mailbox unavailable"
-msgstr "Sorğulanan gediş alınmadı; məktub qutusu əl çatmazdır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:197
-msgid "Requested action aborted: error in processing"
-msgstr "Sorğulanan gediş ləğv edildi; xəta oldu"
-
-#: camel/providers/smtp/camel-smtp-transport.c:199
-msgid "User not local; please try <forward-path>"
-msgstr "İstifadəçi yerli deyil; lütfən <çatdırma cığırı>nı sınayın"
-
-#: camel/providers/smtp/camel-smtp-transport.c:201
-msgid "Requested action not taken: insufficient system storage"
-msgstr "Sorğulanan gediş alınmadı; uyğunsuz sistem daxılı"
-
-#: camel/providers/smtp/camel-smtp-transport.c:203
-msgid "Requested mail action aborted: exceeded storage allocation"
-msgstr "Sorğulanan məktub gediş ləğv edildi; daxıl dolmuşdur"
-
-#: camel/providers/smtp/camel-smtp-transport.c:205
-msgid "Requested action not taken: mailbox name not allowed"
-msgstr "Sorğulanan gediş alınmadı; məktub qutusu adı qəbul edilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:207
-msgid "Start mail input; end with <CRLF>.<CRLF>"
-msgstr "Məktub alımı başladı; <CRLF>.<CRLF> ilə sonlandırın"
-
-#: camel/providers/smtp/camel-smtp-transport.c:209
-msgid "Transaction failed"
-msgstr "Nəqliyyat bacarılmadı"
-
-#: camel/providers/smtp/camel-smtp-transport.c:213
-msgid "A password transition is needed"
-msgstr "Parol nəqli lazımdır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:215
-msgid "Authentication mechanism is too weak"
-msgstr "Tanıtma mexanizması çox zəifdir"
-
-#: camel/providers/smtp/camel-smtp-transport.c:217
-msgid "Encryption required for requested authentication mechanism"
-msgstr "Sorğulanan tanıtma mexanizması üçün kriptləmək lazımdır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:219
-msgid "Temporary authentication failure"
-msgstr "Müvəqqəti tanıtma iflası"
-
-#: camel/providers/smtp/camel-smtp-transport.c:221
-msgid "Authentication required"
-msgstr "Tanıtma lazımdır"
-
-#: camel/providers/smtp/camel-smtp-transport.c:316
-#, c-format
-msgid "Welcome response error: %s: possibly non-fatal"
-msgstr "Xoş gəldin ismarıcı cavab xətası: %s: ağır deyil dəyəsən"
-
-#: camel/providers/smtp/camel-smtp-transport.c:378
-#, c-format
-msgid "SMTP server %s does not support requested authentication type %s"
-msgstr "%s SMTP vericisi %s tanıtma növünü dəstəkləmir"
-
-#: camel/providers/smtp/camel-smtp-transport.c:417
-#, c-format
-msgid "%sPlease enter the SMTP password for %s@%s"
-msgstr "%sLütfən %s@%s üçün SMTP parolunu girin"
-
-#: camel/providers/smtp/camel-smtp-transport.c:440
-#, c-format
-msgid ""
-"Unable to authenticate to SMTP server.\n"
-"%s\n"
-"\n"
-msgstr ""
-"SMTP vericisinə tanıdılma xətası.\n"
-"%s\n"
-"\n"
-
-#: camel/providers/smtp/camel-smtp-transport.c:556
-#, c-format
-msgid "SMTP server %s"
-msgstr "%s SMTP vericisi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:558
-#, c-format
-msgid "SMTP mail delivery via %s"
-msgstr "%s dan(dən) SMTP məktub göndərilməsi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:583
-msgid "Cannot send message: sender address not defined."
-msgstr "İsmarıc göndrərilə bilmədi: göndərənin ünvanı bildirilməyib."
-
-#: camel/providers/smtp/camel-smtp-transport.c:590
-msgid "Cannot send message: sender address not valid."
-msgstr "İsmarıc göndrərilə bilmədi: göndərənin ünvanı hökmsüzdür."
-
-#: camel/providers/smtp/camel-smtp-transport.c:595 mail/mail-ops.c:553
-msgid "Sending message"
-msgstr "İsmarıc göndərilir"
-
-#: camel/providers/smtp/camel-smtp-transport.c:606
-msgid "Cannot send message: no recipients defined."
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: camel/providers/smtp/camel-smtp-transport.c:686
-msgid "SMTP Greeting"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:708
-#, c-format
-msgid "HELO request timed out: %s: non-fatal"
-msgstr "HELO istək vaxtı doldu: %s: ağır deyil"
-
-#: camel/providers/smtp/camel-smtp-transport.c:728
-#, c-format
-msgid "HELO response error: %s: non-fatal"
-msgstr "HELO cavablama xətası: %s. ağır deyil"
-
-#: camel/providers/smtp/camel-smtp-transport.c:760
-#, fuzzy
-msgid "SMTP Authentication"
-msgstr "Tanıtma"
-
-#: camel/providers/smtp/camel-smtp-transport.c:766
-msgid "Error creating SASL authentication object."
-msgstr "SASL tanıtma cismi yaratma xətası."
-
-#: camel/providers/smtp/camel-smtp-transport.c:781
-#: camel/providers/smtp/camel-smtp-transport.c:793
-#, c-format
-msgid "AUTH request timed out: %s"
-msgstr "AUTH istək vaxt dolması. %s"
-
-#: camel/providers/smtp/camel-smtp-transport.c:802
-#, fuzzy
-msgid "AUTH request failed."
-msgstr "AUTH istək vaxt dolması. %s"
-
-#: camel/providers/smtp/camel-smtp-transport.c:850
-msgid "Bad authentication response from server.\n"
-msgstr "Vericidən xətalı tanıtma istəyi alındı.\n"
-
-#: camel/providers/smtp/camel-smtp-transport.c:876
-#, c-format
-msgid "MAIL FROM request timed out: %s: mail not sent"
-msgstr "MAİL FROM istək vaxt dolması: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:895
-#, c-format
-msgid "MAIL FROM response error: %s: mail not sent"
-msgstr "MAİL FROM cavablama xətası: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:920
-#, c-format
-msgid "RCPT TO request timed out: %s: mail not sent"
-msgstr "RCTP TO istək vaxt dolması: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:939
-#, c-format
-msgid "RCPT TO response error: %s: mail not sent"
-msgstr "RCTP TO cavablama xətası: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:970
-#, c-format
-msgid "DATA request timed out: %s: mail not sent"
-msgstr "DATA istək vaxt dolamsı. %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:989
-#, c-format
-msgid "DATA response error: %s: mail not sent"
-msgstr "DATA cavablama xətası: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:1008
-#: camel/providers/smtp/camel-smtp-transport.c:1026
-#, c-format
-msgid "DATA send timed out: message termination: %s: mail not sent"
-msgstr ""
-"DATA göndərmə vaxt dolması: ismarıc qurtarılır: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:1045
-#, c-format
-msgid "DATA response error: message termination: %s: mail not sent"
-msgstr ""
-"DATA cavablama xətası: ismarıc qurtarılması: %s: məktub göndərilə bilmədi"
-
-#: camel/providers/smtp/camel-smtp-transport.c:1069
-#, c-format
-msgid "RSET request timed out: %s"
-msgstr "RSET istək vaxt dolması. %s"
-
-#: camel/providers/smtp/camel-smtp-transport.c:1088
-#, c-format
-msgid "RSET response error: %s"
-msgstr "RSET cavablama xətası: %s"
-
-#: camel/providers/smtp/camel-smtp-transport.c:1111
-#, c-format
-msgid "QUIT request timed out: %s: non-fatal"
-msgstr "QUİT istək vaxt dolması: %s: ağır xəta"
-
-#: camel/providers/smtp/camel-smtp-transport.c:1130
-#, c-format
-msgid "QUIT response error: %s: non-fatal"
-msgstr "QUİT cavablama xətası: %s: ağır deyil"
-
-#: composer/e-msg-composer-attachment-bar.c:97
-msgid "1 byte"
-msgstr "1 bayt"
-
-#: composer/e-msg-composer-attachment-bar.c:99
-#, c-format
-msgid "%u bytes"
-msgstr "%u bayt"
-
-#: composer/e-msg-composer-attachment-bar.c:106
-#, c-format
-msgid "%.1fK"
-msgstr "%.1fK"
-
-#: composer/e-msg-composer-attachment-bar.c:110
-#, c-format
-msgid "%.1fM"
-msgstr "%.1fM"
-
-#: composer/e-msg-composer-attachment-bar.c:114
-#, c-format
-msgid "%.1fG"
-msgstr "%.1fG"
-
-#. This is a filename. Translators take note.
-#: composer/e-msg-composer-attachment-bar.c:337 mail/mail-display.c:134
-msgid "attachment"
-msgstr "yapışdırılmış fayl"
-
-#: composer/e-msg-composer-attachment-bar.c:478
-msgid "Remove selected items from the attachment list"
-msgstr "Seçili üzvləri yapışdırılmış fayllar siyahısından sil"
-
-#: composer/e-msg-composer-attachment-bar.c:509
-msgid "Add attachment..."
-msgstr "Yapışdırılmış fayl əlavə et ..."
-
-#: composer/e-msg-composer-attachment-bar.c:510
-msgid "Attach a file to the message"
-msgstr "İsmarıca bir fayl əlavə et"
-
-#: composer/e-msg-composer-attachment.glade.h:1
-msgid "Attachment properties"
-msgstr "Yapışdırılmış fayl xüsusiyyətləri"
-
-#: composer/e-msg-composer-attachment.glade.h:3
-msgid "File name:"
-msgstr "Fayl adı :"
-
-#: composer/e-msg-composer-attachment.glade.h:4
-msgid "MIME type:"
-msgstr "MIME növü:"
-
-#: composer/e-msg-composer-attachment.glade.h:5
-#: composer/e-msg-composer-select-file.c:135
-msgid "Suggest automatic display of attachment"
-msgstr ""
-
-#: composer/e-msg-composer-hdrs.c:326
-msgid "Click here for the address book"
-msgstr "Ünvan dəftəri üçün buraya tıqla"
-
-#.
-#. * From:
-#.
-#: composer/e-msg-composer-hdrs.c:357
-msgid "From:"
-msgstr "Göndərən:"
-
-#.
-#. * Reply-To:
-#.
-#: composer/e-msg-composer-hdrs.c:363
-msgid "Reply-To:"
-msgstr "Cavab ver"
-
-#.
-#. * Subject:
-#.
-#: composer/e-msg-composer-hdrs.c:374
-msgid "Subject:"
-msgstr "Mövzu :"
-
-#: composer/e-msg-composer-hdrs.c:388
-msgid "To:"
-msgstr "Gn:"
-
-#: composer/e-msg-composer-hdrs.c:389
-msgid "Enter the recipients of the message"
-msgstr "İsmarıcın göndərildiği adamlar"
-
-#: composer/e-msg-composer-hdrs.c:392
-msgid "Cc:"
-msgstr "Cc:"
-
-#: composer/e-msg-composer-hdrs.c:393
-msgid "Enter the addresses that will receive a carbon copy of the message"
-msgstr "İsmarıcın nüsxəsinin göndəriləcəyi ünvanlar"
-
-#: composer/e-msg-composer-hdrs.c:396
-msgid "Bcc:"
-msgstr "Bcc:"
-
-#: composer/e-msg-composer-hdrs.c:397
-msgid ""
-"Enter the addresses that will receive a carbon copy of the message without "
-"appearing in the recipient list of the message."
-msgstr ""
-"İsmarıcın nüsxələrinin göndəriləcəyi ünvanları bildir; bunlar özlərini "
-"ismarıcın göndərildiği adamlar arasında görməyəcəkdir ."
-
-#: composer/e-msg-composer-select-file.c:228
-#: ui/evolution-message-composer.xml.h:2
-msgid "Attach a file"
-msgstr "Bir fayl yapışdır"
-
-#: composer/e-msg-composer.c:676
-#, fuzzy, c-format
-msgid ""
-"Error while reading file %s:\n"
-"%s"
-msgstr "Fayl yüklərkən xəta oldu: %s"
-
-#: composer/e-msg-composer.c:858
-msgid "Save as..."
-msgstr "Fərqli qeyd et ..."
-
-#: composer/e-msg-composer.c:867
-#, fuzzy
-msgid "Warning!"
-msgstr "Xəbərdarlıq"
-
-#: composer/e-msg-composer.c:871
-msgid "File exists, overwrite?"
-msgstr ""
-
-#: composer/e-msg-composer.c:893
-#, c-format
-msgid "Error saving file: %s"
-msgstr "Fayl qeyd edərkən xəta oldu: %s"
-
-#: composer/e-msg-composer.c:912
-#, c-format
-msgid "Error loading file: %s"
-msgstr "Fayl yüklərkən xəta oldu: %s"
-
-#: composer/e-msg-composer.c:983
-msgid ""
-"Unable to open the drafts folder for this account.\n"
-"Would you like to use the default drafts folder?"
-msgstr ""
-"Bu hesab üçün lahiyə cərgəsə açıla bilmədi.\n"
-"Əsas lahiyə cərgəsini işlətmək istəyirsiniz?"
-
-#: composer/e-msg-composer.c:1036
-#, fuzzy, c-format
-msgid "Error accessing file: %s"
-msgstr "Fayl qeyd edərkən xəta oldu: %s"
-
-#: composer/e-msg-composer.c:1044
-#, fuzzy
-msgid "Unable to retrieve message from editor"
-msgstr "%s POP vericisindən ismarıclar alına bilmədi: %s"
-
-#: composer/e-msg-composer.c:1050
-#, fuzzy, c-format
-msgid ""
-"Unable to seek on file: %s\n"
-"%s"
-msgstr ""
-"Nəticə faylı yaradıla bilmir: %s\n"
-" %s"
-
-#: composer/e-msg-composer.c:1056
-#, fuzzy, c-format
-msgid ""
-"Unable to truncate file: %s\n"
-"%s"
-msgstr ""
-"Nəticə faylı yaradıla bilmir: %s\n"
-" %s"
-
-#: composer/e-msg-composer.c:1065
-#, fuzzy, c-format
-msgid ""
-"Error autosaving message: %s\n"
-" %s"
-msgstr ""
-"İsmarıcların buraya qeyd edilmə xatası: %s:\n"
-" %s"
-
-#: composer/e-msg-composer.c:1165
-#, fuzzy
-msgid ""
-"Ximian Evolution has found unsaved files from a previous session.\n"
-"Would you like to try to recover them?"
-msgstr ""
-"Evolution Pine məktub faylları tapdı.\n"
-"Onları proqramımıza idxal edək?"
-
-#: composer/e-msg-composer.c:1313
-msgid ""
-"This message has not been sent.\n"
-"\n"
-"Do you wish to save your changes?"
-msgstr ""
-"Bu ismarıc göndərilə bilmədi.\n"
-"\n"
-"Dəyişiklikləri qeyd etmak istəyirsiniz?"
-
-#: composer/e-msg-composer.c:1320
-#, fuzzy
-msgid "Warning: Modified Message"
-msgstr "Çatdırılmış ismarıc"
-
-#: composer/e-msg-composer.c:1343
-msgid "Open file"
-msgstr "Faylı aç"
-
-#: composer/e-msg-composer.c:1492
-#, fuzzy
-msgid "Insert File"
-msgstr "_Mətn faylını daxil et ... "
-
-#: composer/e-msg-composer.c:1868 composer/e-msg-composer.c:2314
-msgid "Compose a message"
-msgstr "Bir ismarıc yaz"
-
-#: composer/e-msg-composer.c:2404
-msgid "Could not create composer window."
-msgstr "Dialoq qutusunu yarada bilmədim ."
-
-#: composer/evolution-composer.c:349
-msgid ""
-"Could not create composer window, because you have not yet\n"
-"configured any identities in the mail component."
-msgstr ""
-"Yazıçı pəncərəsini yarada bilmirəm, çünkü siz məktub parçasındakı\n"
-"heç bir qurǧulari, aparmamısınız."
-
-#: composer/evolution-composer.c:364
-msgid "Cannot initialize Evolution's composer."
-msgstr "Evolutionun ePoçt yazma parçasını başlada bilmədim ."
-
-#: data/evolution.desktop.in.h:1 shell/main.c:76
-msgid "Evolution"
-msgstr "Evolution"
-
-#: data/evolution.desktop.in.h:2
-msgid "The Evolution groupware suite"
-msgstr "Evolution qruplaşdırılmış proqram tə'minatı otağı"
-
-#: data/evolution.keys.in.h:1
-msgid "address card"
-msgstr "ünvan kartı"
-
-#: data/evolution.keys.in.h:2
-msgid "calendar information"
-msgstr "təqvim haqqında"
-
-#: default_user/searches.xml.h:1
-#, fuzzy
-msgid "Body contains"
-msgstr "daxil edir"
-
-#: default_user/searches.xml.h:2
-#, fuzzy
-msgid "Body does not contain"
-msgstr "daxil etmir"
-
-#: default_user/searches.xml.h:3
-#, fuzzy
-msgid "Body or subject contains"
-msgstr "Şərh daxil edən"
-
-#: default_user/searches.xml.h:4
-#, fuzzy
-msgid "Message contains"
-msgstr "Ad daxil edən"
-
-#: default_user/searches.xml.h:5
-#, fuzzy
-msgid "Recipients contain"
-msgstr "Alıcılar"
-
-#: default_user/searches.xml.h:6
-#, fuzzy
-msgid "Sender contains"
-msgstr "Ad daxil edən"
-
-#: default_user/searches.xml.h:7
-#, fuzzy
-msgid "Subject contains"
-msgstr "Ad daxil edən"
-
-#: default_user/searches.xml.h:8
-#, fuzzy
-msgid "Subject does not contain"
-msgstr "daxil etmir"
-
-#. strptime format of a weekday, a date and a time,
-#. in 12-hour format, without seconds.
-#: e-util/e-time-utils.c:168 e-util/e-time-utils.c:359
-msgid "%a %m/%d/%Y %I:%M %p"
-msgstr "%a %m/%d/%Y %I:%M %p"
-
-#. strptime format of a weekday, a date and a time,
-#. in 24-hour format, without seconds.
-#: e-util/e-time-utils.c:173 e-util/e-time-utils.c:350
-msgid "%a %m/%d/%Y %H:%M"
-msgstr "%a %m/%d/%Y %H:%M"
-
-#. strptime format of a weekday, a date and a time,
-#. in 12-hour format, without minutes or seconds.
-#: e-util/e-time-utils.c:178
-#, fuzzy
-msgid "%a %m/%d/%Y %I %p"
-msgstr "%a %m/%d/%Y %I:%M %p"
-
-#. strptime format of a weekday, a date and a time,
-#. in 24-hour format, without minutes or seconds.
-#: e-util/e-time-utils.c:183
-#, fuzzy
-msgid "%a %m/%d/%Y %H"
-msgstr "%a %m/%d/%Y %H:%M"
-
-#. strptime format of a date and a time, in 12-hour format.
-#: e-util/e-time-utils.c:194
-#, fuzzy
-msgid "%m/%d/%Y %I:%M:%S %p"
-msgstr "%a %m/%d/%Y %I:%M:%S %p"
-
-#. strptime format of a date and a time, in 24-hour format.
-#: e-util/e-time-utils.c:198
-#, fuzzy
-msgid "%m/%d/%Y %H:%M:%S"
-msgstr "%a %m/%d/%Y %H:%M:%S"
-
-#. strptime format of a date and a time, in 12-hour format,
-#. without seconds.
-#: e-util/e-time-utils.c:203
-#, fuzzy
-msgid "%m/%d/%Y %I:%M %p"
-msgstr "%a %m/%d/%Y %I:%M %p"
-
-#. strptime format of a date and a time, in 24-hour format,
-#. without seconds.
-#: e-util/e-time-utils.c:208
-#, fuzzy
-msgid "%m/%d/%Y %H:%M"
-msgstr "%a %m/%d/%Y %H:%M"
-
-#. strptime format of a date and a time, in 12-hour format,
-#. without minutes or seconds.
-#: e-util/e-time-utils.c:213
-#, fuzzy
-msgid "%m/%d/%Y %I %p"
-msgstr "%a %m/%d/%Y %I:%M %p"
-
-#. strptime format of a date and a time, in 24-hour format,
-#. without minutes or seconds.
-#: e-util/e-time-utils.c:218
-#, fuzzy
-msgid "%m/%d/%Y %H"
-msgstr "%m/%d/%Y"
-
-#. strptime format for a time of day, in 12-hour format.
-#: e-util/e-time-utils.c:300 e-util/e-time-utils.c:399
-msgid "%I:%M:%S %p"
-msgstr "%I:%M:%S %p"
-
-#. strptime format for a time of day, in 24-hour format.
-#: e-util/e-time-utils.c:304 e-util/e-time-utils.c:391
-msgid "%H:%M:%S"
-msgstr "%H:%M:%S"
-
-#. strptime format for time of day, without seconds,
-#. in 12-hour format.
-#: e-util/e-time-utils.c:309 e-util/e-time-utils.c:396
-#: widgets/misc/e-dateedit.c:1385 widgets/misc/e-dateedit.c:1612
-msgid "%I:%M %p"
-msgstr "%I:%M %p"
-
-#. strptime format for time of day, without seconds 24-hour format.
-#: e-util/e-time-utils.c:313 e-util/e-time-utils.c:388
-#: widgets/misc/e-dateedit.c:1382 widgets/misc/e-dateedit.c:1609
-msgid "%H:%M"
-msgstr "%H:%M"
-
-#. strptime format for hour and AM/PM, 12-hour format.
-#: e-util/e-time-utils.c:317
-#, fuzzy
-msgid "%I %p"
-msgstr "%I:%M %p"
-
-#: filter/filter-datespec.c:80
-msgid "year"
-msgstr "il"
-
-#: filter/filter-datespec.c:80
-msgid "years"
-msgstr "il"
-
-#: filter/filter-datespec.c:81
-msgid "month"
-msgstr "ay"
-
-#: filter/filter-datespec.c:81
-msgid "months"
-msgstr "ay"
-
-#: filter/filter-datespec.c:82
-msgid "week"
-msgstr "həftə"
-
-#: filter/filter-datespec.c:82
-msgid "weeks"
-msgstr "həftə"
-
-#: filter/filter-datespec.c:84
-msgid "hour"
-msgstr "saat"
-
-#: filter/filter-datespec.c:85
-msgid "minute"
-msgstr "dəqiqə"
-
-#: filter/filter-datespec.c:86
-msgid "second"
-msgstr "saniyə"
-
-#: filter/filter-datespec.c:86
-msgid "seconds"
-msgstr "saniyə"
-
-#: filter/filter-datespec.c:194
-msgid "Oops. You have forgotten to choose a date."
-msgstr "Vaxsey. Tarix atmağı unutmusan."
-
-#: filter/filter-datespec.c:196
-msgid "Oops. You have chosen an invalid date."
-msgstr "Vaxsey. Hökmsüz tarixi seçmisən."
-
-#: filter/filter-datespec.c:271
-msgid ""
-"The message's date will be compared against\n"
-"whatever the time is when the filter is run\n"
-"or vfolder is opened."
-msgstr ""
-"Bu ismarıc tarixi süzgəcin işlədiyi və ya\n"
-"vfolderin açıq qaldığı müddət ilə müqayisə\n"
-"ediləcəkdir."
-
-#: filter/filter-datespec.c:294
-msgid ""
-"The message's date will be compared against\n"
-"the time that you specify here."
-msgstr ""
-"Bu ismarıc tarixi burada göstərdiyiniz ilə\n"
-"müqayisə ediləcəkdir."
-
-#: filter/filter-datespec.c:334
-msgid ""
-"The message's date will be compared against\n"
-"a time relative to when the filter is run;\n"
-"\"a week ago\", for example."
-msgstr ""
-"Bu ismarıc tarixi süzgəcin işlədiyi müddət\n"
-"ilə müqayisə edilaəkdir;\n"
-"\"bir haftə əvval\" məsələn."
-
-#. keep in sync with FilterDatespec_type!
-#: filter/filter-datespec.c:369
-msgid "the current time"
-msgstr "indiki vaxt"
-
-#: filter/filter-datespec.c:369
-msgid "a time you specify"
-msgstr "bildirdiyin vaxt"
-
-#: filter/filter-datespec.c:370
-msgid "a time relative to the current time"
-msgstr "indiki vaxta görə müddət"
-
-#. The dialog
-#: filter/filter-datespec.c:394
-#, fuzzy
-msgid "Select a time to compare against"
-msgstr "Fayl seç"
-
-#. The label
-#: filter/filter-datespec.c:428
-msgid "Compare against"
-msgstr "Müqayisə et"
-
-#: filter/filter-datespec.c:546 filter/filter-datespec.c:725
-msgid "now"
-msgstr "indi"
-
-#: filter/filter-datespec.c:575
-msgid " ago"
-msgstr ""
-
-#: filter/filter-datespec.c:621
-msgid "ago"
-msgstr ""
-
-#: filter/filter-datespec.c:711 mail/message-list.c:940
-msgid "%b %d %l:%M %p"
-msgstr "%b %d %l:%M %p"
-
-#: filter/filter-datespec.c:722
-msgid "<click here to select a date>"
-msgstr "<vaxtı görə bilmək üçün buraya tıqlayın>"
-
-#: filter/filter-editor.c:132 filter/filter.glade.h:3
-msgid "Filter Rules"
-msgstr "Süzgəc Qaydaları"
-
-#. and now for the action area
-#: filter/filter-filter.c:487
-msgid "Then"
-msgstr "Onda"
-
-#: filter/filter-filter.c:501
-msgid "Add action"
-msgstr "Gediş əlavə et"
-
-#: filter/filter-folder.c:147
-msgid ""
-"Oops, you forgot to choose a folder.\n"
-"Please go back and specify a valid folder to deliver mail to."
-msgstr ""
-"VAxsey, qovluq seçməyi unutdunuz.\n"
-"Lütfən arxaya gedin və məktubların toplanacağı hökmlü bir qovluq seçin."
-
-#: filter/filter-folder.c:232 filter/vfolder-rule.c:356
-#: mail/mail-account-gui.c:822
-msgid "Select Folder"
-msgstr "Qovluq Seçin"
-
-#: filter/filter-folder.c:257
-msgid "Enter folder URI"
-msgstr "Qovluq URIsini Bildirin"
-
-#: filter/filter-folder.c:303
-msgid "<click here to select a folder>"
-msgstr "<qovluq seçmək üçün buraya tıqlayın>"
-
-#: filter/filter-input.c:198
-#, c-format
-msgid ""
-"Error in regular expression '%s':\n"
-"%s"
-msgstr ""
-"'%s' qaydalı ifadələrdə xəta oldu:\n"
-"%s"
-
-#: filter/filter-part.c:488
-msgid "Test"
-msgstr "Sınaq"
-
-#: filter/filter-rule.c:696
-msgid "Rule name: "
-msgstr "Qayda adı :"
-
-#: filter/filter-rule.c:700
-msgid "Untitled"
-msgstr "Adsız"
-
-#: filter/filter-rule.c:717
-msgid "If"
-msgstr "Əgər"
-
-#: filter/filter-rule.c:735
-msgid "Execute actions"
-msgstr "Gedişi işə sal"
-
-#: filter/filter-rule.c:739
-msgid "if all criteria are met"
-msgstr "bütün kriteriyalar uyğun gəlirsə"
-
-#: filter/filter-rule.c:744
-msgid "if any criteria are met"
-msgstr "əgər hər hansı bir kriteriya uyğun gəlirsə"
-
-#: filter/filter-rule.c:755
-msgid "Add criterion"
-msgstr "Kriteriya əlavə et"
-
-#: filter/filter-rule.c:840
-msgid "incoming"
-msgstr "gələn"
-
-#: filter/filter-rule.c:840
-msgid "outgoing"
-msgstr "gedən"
-
-#: filter/filter.glade.h:1
-msgid "Edit Filters"
-msgstr "Süzgəcləri Düzəlt"
-
-#: filter/filter.glade.h:2
-msgid "Edit VFolders"
-msgstr "VFolderləri Düzəlt"
-
-#: filter/filter.glade.h:4
-msgid "Incoming"
-msgstr "Gələn"
-
-#: filter/filter.glade.h:5
-msgid "Outgoing"
-msgstr "Gedən"
-
-#: filter/filter.glade.h:6 filter/vfolder-editor.c:130
-msgid "Virtual Folders"
-msgstr "Virtual Qovluqlar"
-
-#: filter/filter.glade.h:11
-msgid "specific folders only"
-msgstr "təkcə xüsusi qovluqlar"
-
-#: filter/filter.glade.h:12
-msgid "vFolder Sources"
-msgstr "vFolder Qaynaqları"
-
-#: filter/filter.glade.h:13
-msgid "with all active remote folders"
-msgstr "bütün fəal uzaq qovluqlarla"
-
-#: filter/filter.glade.h:14
-msgid "with all local and active remote folders"
-msgstr "bütün yerli və fəal uzaq qovluqlarla"
-
-#: filter/filter.glade.h:15
-msgid "with all local folders"
-msgstr "bütün yerli qovluqlarla"
-
-#: filter/libfilter-i18n.h:3
-#, fuzzy
-msgid "Assign Color"
-msgstr "Rəngi Seç"
-
-#: filter/libfilter-i18n.h:4
-msgid "Assign Score"
-msgstr "Qaynağı Seç"
-
-#: filter/libfilter-i18n.h:5
-msgid "Attachments"
-msgstr "Yapışdırılmış Fayllar"
-
-#: filter/libfilter-i18n.h:7
-msgid "contains"
-msgstr "daxil edir"
-
-#: filter/libfilter-i18n.h:8
-msgid "Copy to Folder"
-msgstr "Qovluğa Köçürt"
-
-#: filter/libfilter-i18n.h:9
-msgid "Date received"
-msgstr "Alınma tarixi"
-
-#: filter/libfilter-i18n.h:10
-msgid "Date sent"
-msgstr "Göndərilmə tarixi"
-
-#: filter/libfilter-i18n.h:12
-msgid "Deleted"
-msgstr "Silinən"
-
-#: filter/libfilter-i18n.h:13
-msgid "does not contain"
-msgstr "daxil etmir"
-
-#: filter/libfilter-i18n.h:14
-msgid "does not end with"
-msgstr "ilə sonlanmır"
-
-#: filter/libfilter-i18n.h:15
-msgid "does not exist"
-msgstr "yoxdur"
-
-#: filter/libfilter-i18n.h:16
-msgid "does not sound like"
-msgstr "oxçamır"
-
-#: filter/libfilter-i18n.h:17
-msgid "does not start with"
-msgstr "başlamır"
-
-#: filter/libfilter-i18n.h:18
-msgid "Do Not Exist"
-msgstr "Mövcud Deyildir"
-
-#: filter/libfilter-i18n.h:19
-msgid "Draft"
-msgstr "Lahiyə"
-
-#: filter/libfilter-i18n.h:20
-msgid "ends with"
-msgstr "sonlanır"
-
-#: filter/libfilter-i18n.h:21
-msgid "Exist"
-msgstr "Mövcuddur"
-
-#: filter/libfilter-i18n.h:22
-msgid "exists"
-msgstr "mövcuddur"
-
-#: filter/libfilter-i18n.h:23
-msgid "Expression"
-msgstr "İfadə"
-
-#: filter/libfilter-i18n.h:24
-msgid "Important"
-msgstr "Vacib"
-
-#: filter/libfilter-i18n.h:25
-msgid "is"
-msgstr "dir(dır)"
-
-#: filter/libfilter-i18n.h:26
-msgid "is greater than"
-msgstr "böyükdür"
-
-#: filter/libfilter-i18n.h:27
-msgid "is less than"
-msgstr "azdır"
-
-#: filter/libfilter-i18n.h:28
-msgid "is not"
-msgstr "deyil"
-
-#: filter/libfilter-i18n.h:29
-msgid "Mailing list"
-msgstr "Məktublaşma qrupu"
-
-#: filter/libfilter-i18n.h:30
-msgid "Message Body"
-msgstr "İsmarıc Gövdəsi"
-
-#: filter/libfilter-i18n.h:31
-msgid "Message Header"
-msgstr "İsmarıc Başlığı"
-
-#: filter/libfilter-i18n.h:32
-msgid "Message was received"
-msgstr "İsmarıc alındı"
-
-#: filter/libfilter-i18n.h:33
-msgid "Message was sent"
-msgstr "İsmarıc göndərildi"
-
-#: filter/libfilter-i18n.h:34
-msgid "Move to Folder"
-msgstr "Qovluğa Köçür"
-
-#: filter/libfilter-i18n.h:35
-msgid "on or after"
-msgstr "da(də) ya da sonra"
-
-#: filter/libfilter-i18n.h:36
-msgid "on or before"
-msgstr "da(də) ya da əvvəl"
-
-#: filter/libfilter-i18n.h:37
-msgid "Read"
-msgstr "Oxu"
-
-#: filter/libfilter-i18n.h:38
-msgid "Recipients"
-msgstr "Alıcılar"
-
-#: filter/libfilter-i18n.h:39
-msgid "Regex Match"
-msgstr "Regex Uyğunluqları"
-
-#: filter/libfilter-i18n.h:40
-msgid "Replied to"
-msgstr "Cavab verilən"
-
-#: filter/libfilter-i18n.h:41 filter/score-rule.c:204 filter/score-rule.c:206
-#: mail/message-list.etspec.h:5
-msgid "Score"
-msgstr "Xal"
-
-#: filter/libfilter-i18n.h:42 mail/mail-callbacks.c:1251
-msgid "Sender"
-msgstr "Göndərən"
-
-#: filter/libfilter-i18n.h:43
-msgid "Set Status"
-msgstr "Hal Seç"
-
-#: filter/libfilter-i18n.h:44
-#, fuzzy
-msgid "Size (kB)"
-msgstr "Böyüklük"
-
-#: filter/libfilter-i18n.h:45
-msgid "sounds like"
-msgstr "oxşayır"
-
-#: filter/libfilter-i18n.h:46
-msgid "Source Account"
-msgstr "Mənbə Hesabı"
-
-#: filter/libfilter-i18n.h:47
-msgid "Specific header"
-msgstr "Xas başlıq"
-
-#: filter/libfilter-i18n.h:48
-msgid "starts with"
-msgstr "başlayır"
-
-#: filter/libfilter-i18n.h:50
-msgid "Stop Processing"
-msgstr "İşi Dayandır"
-
-#: filter/libfilter-i18n.h:51 mail/mail-format.c:917
-#: mail/message-list.etspec.h:9
-msgid "Subject"
-msgstr "Mövzu"
-
-#: filter/libfilter-i18n.h:52
-msgid "was after"
-msgstr "sonra idi"
-
-#: filter/libfilter-i18n.h:53
-msgid "was before"
-msgstr "əvvəl idi"
-
-#: filter/rule-editor.c:147
-msgid "Rules"
-msgstr "Qaydalar"
-
-#: filter/rule-editor.c:240
-msgid "Add Rule"
-msgstr "Qayda Əlavə Et"
-
-#: filter/rule-editor.c:301
-msgid "Edit Rule"
-msgstr "Qaydanı Düzəlt"
-
-#: filter/score-editor.c:130
-msgid "Score Rules"
-msgstr "Qiymətləndirmə Qaydaları"
-
-#: filter/vfolder-rule.c:206
-msgid "Oops. You need to to specify at least one folder as a source."
-msgstr ""
-
-#: importers/elm-importer.c:96
-#, fuzzy
-msgid "Evolution is importing your old Elm mail"
-msgstr "Məktub taşkilatcısı 'Evolution' parçası."
-
-#: importers/elm-importer.c:97 importers/netscape-importer.c:108
-#: importers/pine-importer.c:102
-#, fuzzy
-msgid "Importing..."
-msgstr "Alınır"
-
-#: importers/elm-importer.c:99 importers/netscape-importer.c:110
-#: importers/pine-importer.c:104
-#, fuzzy
-msgid "Please wait"
-msgstr "sonlanır"
-
-#: importers/elm-importer.c:171 importers/netscape-importer.c:708
-#: importers/pine-importer.c:369
-#, fuzzy, c-format
-msgid "Importing %s as %s"
-msgstr ""
-"%s Alınır.\n"
-"%s Başladılır"
-
-#: importers/elm-importer.c:377 importers/netscape-importer.c:801
-#: importers/pine-importer.c:506
-#, fuzzy, c-format
-msgid "Scanning %s"
-msgstr "\"%s\" Göndərilir"
-
-#: importers/elm-importer.c:528 importers/netscape-importer.c:974
-#: importers/pine-importer.c:669 mail/component-factory.c:96
-#, fuzzy
-msgid "Mail"
-msgstr "ePoçt"
-
-#: importers/elm-importer.c:548
-#, fuzzy
-msgid ""
-"Evolution has found Elm mail files\n"
-"Would you like to import them into Evolution?"
-msgstr ""
-"Evolution Elm məktub faylları tapdı.\n"
-"Onları proqramımıza idxal edək?"
-
-#: importers/elm-importer.c:577
-msgid "Elm"
-msgstr ""
-
-#: importers/evolution-gnomecard-importer.c:230
-#, fuzzy
-msgid "GnomeCard:"
-msgstr "Kart: "
-
-#: importers/evolution-gnomecard-importer.c:231 importers/pine-importer.c:674
-#, fuzzy
-msgid "Addressbook"
-msgstr "Ünvan dəftəri əlavə et"
-
-#: importers/evolution-gnomecard-importer.c:250
-#, fuzzy
-msgid ""
-"Evolution has found GnomeCard files.\n"
-"Would you like them to be imported into Evolution?"
-msgstr ""
-"Evolution Netscape məktub faylları tapdı.\n"
-"Onları proqramımıza idxal edək?"
-
-#: importers/netscape-importer.c:107
-msgid "Evolution is importing your old Netscape data"
-msgstr ""
-
-#: importers/netscape-importer.c:904 importers/pine-importer.c:602
-#, fuzzy
-msgid "Scanning directory"
-msgstr "IMAP qovluğu daranır"
-
-#: importers/netscape-importer.c:913
-#, fuzzy
-msgid "Starting import"
-msgstr "_Başlama Tarixi"
-
-#: importers/netscape-importer.c:979
-#, fuzzy
-msgid "Settings"
-msgstr "Qurğular..."
-
-#: importers/netscape-importer.c:1000
-msgid ""
-"Evolution has found Netscape mail files.\n"
-"Would you like them to be imported into Evolution?"
-msgstr ""
-"Evolution Netscape məktub faylları tapdı.\n"
-"Onları proqramımıza idxal edək?"
-
-#: importers/pine-importer.c:101
-msgid "Evolution is importing your old Pine data"
-msgstr ""
-
-#: importers/pine-importer.c:695
-msgid ""
-"Evolution has found Pine mail files.\n"
-"Would you like to import them into Evolution?"
-msgstr ""
-"Evolution Pine məktub faylları tapdı.\n"
-"Onları proqramımıza idxal edək?"
-
-#: importers/pine-importer.c:723
-#, fuzzy
-msgid "Pine"
-msgstr "Çap Et"
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:1
-msgid "Evolution component for handling mail."
-msgstr "Məktub taşkilatcısı 'Evolution' parçası."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:2
-msgid "Evolution mail composer."
-msgstr "'Evolution'un ePoçt yazıçısı."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:3
-msgid "Evolution mail executive summary component."
-msgstr "'Evolution'un icracı mündəricat parçası."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:4
-msgid "Evolution mail folder display component."
-msgstr "'Evolution'un məktub qovluğu nümayişcisi."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:5
-msgid "Evolution mail folder factory component."
-msgstr "'Evolution'un məktub qovluğu nümayişcisi e'malatxanası."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:6
-msgid "Factory for the Evolution composer."
-msgstr "'Evolution'un məktub yazıçısı e'malatxanası."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:7
-msgid "Factory for the Mail Summary component."
-msgstr "Məktub Mündəricatı parçası e'malatxanası."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:8
-#, fuzzy
-msgid "Mail configuration interface"
-msgstr "ePoçt Quraşdırılması"
-
-#: mail/component-factory.c:96
-#, fuzzy
-msgid "Folder containing mail"
-msgstr "Məktublaşma Qrupundakı VFolder"
-
-#: mail/component-factory.c:97
-msgid "Mail storage folder (internal)"
-msgstr ""
-
-#: mail/component-factory.c:98
-#, fuzzy
-msgid "Virtual Trash"
-msgstr "Virtual Qovluqlar"
-
-#: mail/component-factory.c:98
-#, fuzzy
-msgid "Virtual Trash folder"
-msgstr "Virtual Qovluqlar"
-
-#: mail/component-factory.c:114
-msgid "This folder cannot contain messages."
-msgstr ""
-
-#: mail/component-factory.c:356
-#, fuzzy
-msgid "Properties..."
-msgstr "_Seçənəklər..."
-
-#: mail/component-factory.c:356
-#, fuzzy
-msgid "Change this folder's properties"
-msgstr "Faylların seçənəklərini təkmilləşdir"
-
-#: mail/component-factory.c:698
-msgid ""
-"Some of your mail settings seem corrupt, please check that everything is in "
-"order."
-msgstr ""
-
-#: mail/component-factory.c:812
-#, fuzzy
-msgid "New Mail Message"
-msgstr "_Məktub İsmarıcı"
-
-#: mail/component-factory.c:812
-#, fuzzy
-msgid "New _Mail Message"
-msgstr "_Məktub İsmarıcı"
-
-#: mail/component-factory.c:843
-msgid "Cannot initialize Evolution's mail component."
-msgstr "Evolutionun ePoçt parçasını başlada bilmədim ."
-
-#: mail/component-factory.c:1032
-msgid "Cannot register storage with shell"
-msgstr "Nüsxəni qabıq ilə qeyd edə bilmədim"
-
-#: mail/folder-browser-ui.c:261
-#, c-format
-msgid "Properties for \"%s\""
-msgstr "\"%s\"in Seçənəkləri"
-
-#: mail/folder-browser-ui.c:263
-msgid "Properties"
-msgstr "Seçənəklər"
-
-#: mail/folder-browser.c:262 mail/mail-display.c:275
-#, c-format
-msgid "Could not create temporary directory: %s"
-msgstr "Müvəqqəti qovluq yaradıla bilmədi: %s"
-
-#: mail/folder-browser.c:734
-#, c-format
-msgid "%d new"
-msgstr ""
-
-#: mail/folder-browser.c:737 mail/folder-browser.c:742
-#: mail/folder-browser.c:746
-msgid ", "
-msgstr ""
-
-#: mail/folder-browser.c:738
-#, c-format
-msgid "%d hidden"
-msgstr ""
-
-#: mail/folder-browser.c:743
-#, fuzzy, c-format
-msgid "%d selected"
-msgstr "Silinən"
-
-#: mail/folder-browser.c:748
-#, fuzzy, c-format
-msgid "%d unsent"
-msgstr "%d saniyə"
-
-#: mail/folder-browser.c:750
-#, c-format
-msgid "%d total"
-msgstr ""
-
-#: mail/folder-browser.c:993
-#, fuzzy
-msgid "Create vFolder from Search"
-msgstr "İsmarıcdan Qayda _Yarat"
-
-#: mail/folder-browser.c:1338
-msgid "VFolder on _Subject"
-msgstr "_Mövzudakı vFolder"
-
-#: mail/folder-browser.c:1341
-msgid "VFolder on Se_nder"
-msgstr "Gön_dərəndəki vFolder"
-
-#: mail/folder-browser.c:1344
-msgid "VFolder on _Recipients"
-msgstr "_Alıcıdakı vFolder"
-
-#: mail/folder-browser.c:1347
-msgid "VFolder on Mailing _List"
-msgstr "Məktublaşma Q_rupundakı VFolder"
-
-#: mail/folder-browser.c:1353
-msgid "Filter on Sub_ject"
-msgstr "Mö_vzudakı Süzgəc"
-
-#: mail/folder-browser.c:1356
-msgid "Filter on Sen_der"
-msgstr "Gön_dərəndəki Süzgəc"
-
-#: mail/folder-browser.c:1359
-msgid "Filter on Re_cipients"
-msgstr "_Alıcıdakı Süzgəc"
-
-#: mail/folder-browser.c:1362
-msgid "Filter on _Mailing List"
-msgstr "_Məktublaşma Qrupundakı Süzgəc"
-
-#: mail/folder-browser.c:1373 ui/evolution-mail-message.xml.h:89
-#, fuzzy
-msgid "_Edit as New Message..."
-msgstr "İsmarıcları _Fərqli Qeyd Et ..."
-
-#: mail/folder-browser.c:1375 ui/evolution-mail-message.xml.h:97
-msgid "_Save As..."
-msgstr "Fərqli _Qeyd Et ..."
-
-#: mail/folder-browser.c:1377
-msgid "_Print"
-msgstr "_Çap Et"
-
-#: mail/folder-browser.c:1382 ui/evolution-mail-message.xml.h:96
-msgid "_Reply to Sender"
-msgstr "Göndərənə _Cavab Ver"
-
-#: mail/folder-browser.c:1384 ui/evolution-mail-message.xml.h:69
-#, fuzzy
-msgid "Reply to _List"
-msgstr "_Hamısına Cavab Ver"
-
-#: mail/folder-browser.c:1386 ui/evolution-mail-message.xml.h:68
-msgid "Reply to _All"
-msgstr "_Hamısına Cavab Ver"
-
-#: mail/folder-browser.c:1388
-msgid "_Forward"
-msgstr "_Çatdır"
-
-#: mail/folder-browser.c:1391 ui/evolution-mail-message.xml.h:40
-msgid "Mar_k as Read"
-msgstr "Oxun_muş olaraq İşarətlə"
-
-#: mail/folder-browser.c:1393 ui/evolution-mail-message.xml.h:42
-msgid "Mark as U_nread"
-msgstr "Ox_unmamış olaraq İşarətlə"
-
-#: mail/folder-browser.c:1395
-#, fuzzy
-msgid "Mark as _Important"
-msgstr "Vacib"
-
-#: mail/folder-browser.c:1397
-#, fuzzy
-msgid "Mark as Unim_portant"
-msgstr "Ox_unmamış olaraq İşarətlə"
-
-#: mail/folder-browser.c:1402
-msgid "_Move to Folder..."
-msgstr "Qovluğa _Daşı ..."
-
-#: mail/folder-browser.c:1404
-msgid "_Copy to Folder..."
-msgstr "Qovluğa _Köçürt..."
-
-#: mail/folder-browser.c:1408 ui/evolution-mail-message.xml.h:99
-msgid "_Undelete"
-msgstr "_Geri Gətir"
-
-#: mail/folder-browser.c:1413
-#, fuzzy
-msgid "Add Sender to Address Book"
-msgstr "Ünvan dəftəri əlavə et"
-
-#: mail/folder-browser.c:1418
-msgid "Apply Filters"
-msgstr "Süzgəclər Əlavə Et"
-
-#: mail/folder-browser.c:1422
-msgid "Create Ru_le From Message"
-msgstr "İsmarıcdan Qa_yda Yarat"
-
-#: mail/folder-browser.c:1573
-msgid "Filter on Mailing List"
-msgstr "Məktublaşma Qrupundakı Süzgəc"
-
-#: mail/folder-browser.c:1574
-msgid "VFolder on Mailing List"
-msgstr "Məktublaşma Qrupundakı VFolder"
-
-#: mail/folder-browser.c:1576
-#, c-format
-msgid "Filter on Mailing List (%s)"
-msgstr "Məktublaşma Qrupunda Süz (%s)"
-
-#: mail/folder-browser.c:1577
-#, c-format
-msgid "VFolder on Mailing List (%s)"
-msgstr "(%s) Məktublaşma Qrupundakı VFolder"
-
-#: mail/folder-info.c:64
-#, fuzzy
-msgid "Getting Folder Information"
-msgstr "Arzuya Bağlı Mə'lumatlar"
-
-#: mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in.h:1
-msgid "Factory to import mbox into Evolution"
-msgstr "'Mbox'u 'Evolution' içinə gətirən e'malatxana"
-
-#: mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in.h:2
-msgid "Imports mbox files into Evolution"
-msgstr "'Mbox' fayllarını 'Evolution' içinə gətirir"
-
-#: mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in.h:1
-msgid "Factory to import Outlook Express 4 mails into Evolution"
-msgstr ""
-"'Outlook Express 4' məktublarını 'Evolution' içinə gətirən e'malatxana."
-
-#: mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in.h:2
-msgid "Imports Outlook Express 4 files into Evolution"
-msgstr "'Outlook Express 4' fayllarını 'Evolution' içinə gətirir."
-
-#: mail/local-config.glade.h:1
-msgid "Current store format:"
-msgstr "Hazırkı Saxlama Şəkli:"
-
-#: mail/local-config.glade.h:2
-msgid "Mailbox Format"
-msgstr "Məktub Qutusu Şəkli"
-
-#: mail/local-config.glade.h:3
-msgid "New store format:"
-msgstr "Yeni saxlama şəkli"
-
-#: mail/local-config.glade.h:4
-msgid ""
-"Note: When converting between mailbox formats, a failure\n"
-"(such as lack of disk space) may not be automatically\n"
-"recoverable. Please use this feature with care."
-msgstr ""
-"Qeyd: məktub qutuları şəkli arasında keçişlərdə\n"
-" (disk sahəsi çatışmamazlığındakı kimi) avtomatik olaraq \n"
-"bərpası mümkün olmaya bilər. Bu xüsusiyyəti ehtiyatlı işlədin."
-
-#: mail/local-config.glade.h:7
-msgid "maildir"
-msgstr "məktub qovluğu"
-
-#: mail/local-config.glade.h:8
-msgid "mbox"
-msgstr "mbox"
-
-#: mail/local-config.glade.h:9
-msgid "mh"
-msgstr "mh"
-
-#: mail/mail-account-editor-news.c:105 mail/mail-account-editor.c:107
-msgid "You have not filled in all of the required information."
-msgstr "Lazımi bütün mə'lumatlar verilməlidir."
-
-#. give our dialog an OK button and title
-#: mail/mail-account-editor-news.c:160
-#, fuzzy
-msgid "Evolution News Editor"
-msgstr "Evolution Hesab Düzəldicisi"
-
-#. give our dialog an OK button and title
-#: mail/mail-account-editor.c:163
-msgid "Evolution Account Editor"
-msgstr "Evolution Hesab Düzəldicisi"
-
-#: mail/mail-account-gui.c:947
-#, fuzzy
-msgid "Could not save signature file."
-msgstr ""
-"%s imza faylı açıla bilmədi:\n"
-"%s"
-
-#: mail/mail-account-gui.c:1024
-#, fuzzy
-msgid "Save signature"
-msgstr "Imza faylı : "
-
-#: mail/mail-account-gui.c:1030
-#, fuzzy
-msgid ""
-"This signature has been changed, but hasn't been saved.\n"
-"\n"
-"Do you wish to save your changes?"
-msgstr ""
-"Bu ismarıc göndərilə bilmədi.\n"
-"\n"
-"Dəyişiklikləri qeyd etmak istəyirsiniz?"
-
-#: mail/mail-account-gui.c:1615
-msgid "You may not create two accounts with the same name."
-msgstr ""
-
-#: mail/mail-accounts.c:144
-msgid " (default)"
-msgstr " (varsayılan) "
-
-#: mail/mail-accounts.c:189
-msgid "Disable"
-msgstr "Bağla"
-
-#: mail/mail-accounts.c:191
-msgid "Enable"
-msgstr "Fəallaşdır"
-
-#: mail/mail-accounts.c:278
-msgid "Are you sure you want to delete this account?"
-msgstr "Bu hesabı həqiqətən də silmək istəyirsiniz?"
-
-#: mail/mail-accounts.c:282
-#, fuzzy
-msgid "Don't delete"
-msgstr "Geri Qaytar"
-
-#: mail/mail-accounts.c:285
-#, fuzzy
-msgid "Really delete account?"
-msgstr "Bunu əsas hesab olaraq göstər"
-
-#: mail/mail-accounts.c:511 mail/mail-accounts.c:515
-msgid "Are you sure you want to delete this news account?"
-msgstr "Bu xəbər hesabını həqiqətən də silmək istəyirsiniz?"
-
-#. give our dialog an Close button and title
-#: mail/mail-accounts.c:760 mail/mail-config.glade.h:45
-#, fuzzy
-msgid "Mail Settings"
-msgstr "_Məktub Qurğuları..."
-
-#: mail/mail-autofilter.c:70
-#, c-format
-msgid "Mail to %s"
-msgstr "%s a(ə) məktub göndər"
-
-#: mail/mail-autofilter.c:213
-#, c-format
-msgid "Subject is %s"
-msgstr "Mövzu %s dir(dır)"
-
-#: mail/mail-autofilter.c:229
-#, c-format
-msgid "Mail from %s"
-msgstr "Məktub %s dandır(dəndir)"
-
-#: mail/mail-autofilter.c:285
-#, c-format
-msgid "%s mailing list"
-msgstr "%s məktublaşma qrupu"
-
-#: mail/mail-autofilter.c:335 mail/mail-autofilter.c:356
-msgid "Add Filter Rule"
-msgstr "Süzgəc Qaydası Əlavə Et"
-
-#: mail/mail-callbacks.c:96
-msgid ""
-"You have not configured the mail client.\n"
-"You need to do this before you can send,\n"
-"receive or compose mail.\n"
-"Would you like to configure it now?"
-msgstr ""
-"Məktub alıcısını hələ quraşdırmamısınız.\n"
-"Məktub yazmaq, almaq, göndərmədən əvvəl \n"
-"bunu quraşdırmalısınız.\n"
-"Bunu indi quraşdırmaq istəyirsiniz?"
-
-#: mail/mail-callbacks.c:149
-msgid ""
-"You need to configure an identity\n"
-"before you can compose mail."
-msgstr ""
-"ePoçt göndərməkdən əvvəl bir \n"
-"şəxs tanıtmalısan."
-
-#: mail/mail-callbacks.c:161
-msgid ""
-"You need to configure a mail transport\n"
-"before you can compose mail."
-msgstr ""
-"ePoçt göndərməkdən əvvəl bir ePoçt\n"
-"nəqliyyatını qurmalısan."
-
-#: mail/mail-callbacks.c:185
-msgid "You have not set a mail transport method"
-msgstr "Məktub nəql yolunu bildirməmisən"
-
-#. FIXME: this wording sucks
-#: mail/mail-callbacks.c:216
-msgid ""
-"You are sending an HTML-formatted message, but the following recipients do "
-"not want HTML-formatted mail:\n"
-msgstr ""
-
-#: mail/mail-callbacks.c:231
-#, fuzzy
-msgid "Send anyway?"
-msgstr "ePoçt göndər"
-
-#: mail/mail-callbacks.c:273
-msgid ""
-"This message has no subject.\n"
-"Really send?"
-msgstr ""
-"Bu ismarıcın mövzusu yoxdur .\n"
-"Həqiqətən də göndərim?"
-
-#: mail/mail-callbacks.c:317
-msgid ""
-"Since the contact list you are sending to is configured to hide the list's "
-"addresses, this message will contain only Bcc recipients."
-msgstr ""
-
-#: mail/mail-callbacks.c:321
-#, fuzzy
-msgid "This message contains only Bcc recipients."
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: mail/mail-callbacks.c:325
-msgid ""
-"It is possible that the mail server may reveal the recipients by adding an "
-"Apparently-To header.\n"
-"Send anyway?"
-msgstr ""
-
-#: mail/mail-callbacks.c:419
-msgid "This message contains invalid recipients:"
-msgstr ""
-
-#: mail/mail-callbacks.c:454
-msgid "You must specify recipients in order to send this message."
-msgstr "Məktubu göndərə bilmək üçün alıcını da bildirməlisən."
-
-#: mail/mail-callbacks.c:550
-msgid "You must configure an account before you can send this email."
-msgstr ""
-"Bu ePoçtu göndərməkdən əvvəl bir ePoçt\n"
-"hesabını quraşdırmalısan."
-
-#: mail/mail-callbacks.c:783
-#, fuzzy
-msgid "an unknown sender"
-msgstr "Namə'lum xəta"
-
-#: mail/mail-callbacks.c:788
-msgid "On %a, %Y-%m-%d at %H:%M, %%s wrote:"
-msgstr ""
-
-#: mail/mail-callbacks.c:1171
-msgid "Move message(s) to"
-msgstr "İsmarıc(ları) buraya daşı "
-
-#: mail/mail-callbacks.c:1173
-msgid "Copy message(s) to"
-msgstr "İsmarıc(ları) buraya köçürt"
-
-#: mail/mail-callbacks.c:1547
-#, c-format
-msgid "Are you sure you want to edit all %d messages?"
-msgstr "Bütün `%d' ismarıclarını düzəltmək istəyirsiniz?"
-
-#: mail/mail-callbacks.c:1569
-msgid ""
-"You may only edit messages saved\n"
-"in the Drafts folder."
-msgstr ""
-"Siz sadəcə olaraq Vəzifələr qovluğundakı\n"
-"ismarıcları düzəldə bilərsiniz."
-
-#: mail/mail-callbacks.c:1603
-msgid ""
-"You may only resend messages\n"
-"in the Sent folder."
-msgstr ""
-"Sadəcə olaraq Göndərilən cərgəsinə qeyd edilən\n"
-"ismarıcları yeniden gönderebilirsiniz."
-
-#: mail/mail-callbacks.c:1615
-#, fuzzy, c-format
-msgid "Are you sure you want to resend all %d messages?"
-msgstr "Bütün `%d' ismarıclarını düzəltmək istəyirsiniz?"
-
-#: mail/mail-callbacks.c:1636
-msgid "No Message Selected"
-msgstr "Heç İsmarıc Seçilmədi"
-
-#: mail/mail-callbacks.c:1721
-msgid "Save Message As..."
-msgstr "İsmarıcı Fərqli Qeyd Et..."
-
-#: mail/mail-callbacks.c:1723
-msgid "Save Messages As..."
-msgstr "İsmarıcları Fərqli Qeyd Et..."
-
-#: mail/mail-callbacks.c:1868 widgets/misc/e-messagebox.c:159
-msgid "Warning"
-msgstr "Xəbərdarlıq"
-
-#: mail/mail-callbacks.c:1873
-msgid ""
-"This operation will permanently erase all messages marked as deleted. If you "
-"continue, you will not be able to recover these messages.\n"
-"\n"
-"Really erase these messages?"
-msgstr ""
-
-#: mail/mail-callbacks.c:1880
-#, fuzzy
-msgid "Do not ask me again."
-msgstr "Mənə bir də soruşma"
-
-#: mail/mail-callbacks.c:1985
-#, c-format
-msgid ""
-"Error loading filter information:\n"
-"%s"
-msgstr ""
-"Süzgəc mə'lumatını yükləmə xətası:\n"
-"%s"
-
-#: mail/mail-callbacks.c:1995
-#, fuzzy
-msgid "Filters"
-msgstr "_Süzgəclər ..."
-
-#: mail/mail-callbacks.c:2041
-msgid "Print Message"
-msgstr "İsmarıcı Çap Et"
-
-#: mail/mail-callbacks.c:2087
-msgid "Printing of message failed"
-msgstr "İsmarıların çap edilməsi bacarılmadı"
-
-#: mail/mail-callbacks.c:2171
-#, c-format
-msgid "Are you sure you want to open all %d messages in separate windows?"
-msgstr "Bütün %d ismarıclarını başqa pəncərədə açmaq istəyirsiniz?"
-
-#: mail/mail-config-druid.c:135
-#, fuzzy
-msgid ""
-"Please enter your name and email address below. The \"optional\" fields "
-"below do not need to be filled in,\n"
-"unless you wish to include this information in email you send."
-msgstr ""
-"Lütfən, adınızı v ePoçt ünvanınızı aşağıdakı boşluğa yazın. E-poçt "
-"ünvanınızda görünməsini istəmirsinizsə, arzuya bağlı sahələri doldurmağınız "
-"lazım deyil. "
-
-#: mail/mail-config-druid.c:137
-#, fuzzy
-msgid ""
-"Please enter information about your incoming mail server below. If you are "
-"not sure, ask your system\n"
-"administrator or Internet Service Provider."
-msgstr ""
-"Lütfən, gələn ePoçt vericisi üçün bilgi verin. Əgər hansı tür bir sunucu "
-"işlətdiyinizi bilmirsinizsə, sistem idarəçinizə, ya da İnternet xidmət "
-"vericinizə müraciət edin."
-
-#: mail/mail-config-druid.c:139
-msgid "Please select among the following options"
-msgstr ""
-
-#: mail/mail-config-druid.c:141
-#, fuzzy
-msgid ""
-"Please enter information about the way you will send mail. If you are not "
-"sure, ask your system\n"
-"administrator or Internet Service Provider."
-msgstr ""
-"Lütfən, gedən ePoçt vericisi üçün protokol mə'lumatını aşağıda bildirin. "
-"Əgər hansı protokolu işlətdiyinizi bilmirsinizsə, sistem idarəçinizə, ya da "
-"İnternet servis sağlayıcınıza müraciət edinu."
-
-#: mail/mail-config-druid.c:143
-#, fuzzy
-msgid ""
-"You are almost done with the mail configuration process. The identity, "
-"incoming mail server and\n"
-"outgoing mail transport method which you provided will be grouped together "
-"to\n"
-"make an Evolution mail account. Please enter a name for this account in the "
-"space below.\n"
-"This name will be used for display purposes only."
-msgstr ""
-"E-poçt quraşdırma əməliyyatı hardasa qurtardı. Kimlik qurğularınız, gələn ve "
-"gedən ePoçt sunucunuz Evolution hesabınızı tanımlamak üçün yeterli "
-"olacaktır. Lütfən, aşağıdakı boşluğa bu hesab üçün bir ad veriniz. "
-
-#. set window title
-#: mail/mail-config-druid.c:570
-#, fuzzy
-msgid "Evolution Account Assistant"
-msgstr "Evolution Hesab Sehirbazı"
-
-#: mail/mail-config.c:315
-#, fuzzy, c-format
-msgid "Account %d"
-msgstr "Hesab"
-
-#: mail/mail-config.c:1618
-#, c-format
-msgid ""
-"Could not get inbox for new mail store:\n"
-"%s\n"
-"No shortcut will be created."
-msgstr ""
-
-#. Create the shortcut. FIXME: This only works if the
-#. * full name matches the path.
-#.
-#: mail/mail-config.c:1629
-#, fuzzy, c-format
-msgid "%s: Inbox"
-msgstr "mbox"
-
-#: mail/mail-config.c:1873
-msgid "Checking Service"
-msgstr ""
-
-#: mail/mail-config.c:1944 mail/mail-config.c:1947
-msgid "Connecting to server..."
-msgstr "Vericiyə bağlantı qurulur..."
-
-#: mail/mail-config.glade.h:1
-#, fuzzy
-msgid " _Check for supported types "
-msgstr " Dəstəklənən növləri yoxla "
-
-#: mail/mail-config.glade.h:2
-msgid " color"
-msgstr " rəng"
-
-#: mail/mail-config.glade.h:3
-#, fuzzy
-msgid "(SSL is not supported in this build of evolution)"
-msgstr "Bu şifrləmə ilə imza dəstəklənmir"
-
-#: mail/mail-config.glade.h:4
-msgid "Account"
-msgstr "Hesab"
-
-#: mail/mail-config.glade.h:5
-msgid "Account Information"
-msgstr "Hesab Haqqında"
-
-#: mail/mail-config.glade.h:6 shell/glade/evolution-startup-wizard.glade.h:1
-msgid "Account Management"
-msgstr "Hesab İdarəsi"
-
-#: mail/mail-config.glade.h:7
-msgid "Accounts"
-msgstr "Hesablar"
-
-#: mail/mail-config.glade.h:8
-msgid "Always encrypt to myself when sending encrypted mail"
-msgstr ""
-
-#: mail/mail-config.glade.h:9
-msgid "Always encrypt to myself when sending encrypyed mail"
-msgstr ""
-
-#: mail/mail-config.glade.h:10
-msgid "Always sign outgoing messages when using this account"
-msgstr ""
-
-#: mail/mail-config.glade.h:11 mail/message-list.etspec.h:1
-msgid "Attachment"
-msgstr "Yapışdırılmış fayl"
-
-#: mail/mail-config.glade.h:12
-msgid "Authentication"
-msgstr "Tanıtma"
-
-#: mail/mail-config.glade.h:13
-msgid "Authentication Type: "
-msgstr "Kimlik Yoxlama Növü: "
-
-#: mail/mail-config.glade.h:14
-msgid "Certificate ID:"
-msgstr ""
-
-#: mail/mail-config.glade.h:16
-#, fuzzy
-msgid "Composer"
-msgstr "Yaz"
-
-#: mail/mail-config.glade.h:17
-#, fuzzy
-msgid "Configuration"
-msgstr "ePoçt Quraşdırılması"
-
-#: mail/mail-config.glade.h:18
-#, fuzzy
-msgid "Confirm when Expunging a folder"
-msgstr "Qovluq açılır"
-
-#: mail/mail-config.glade.h:19
-msgid ""
-"Congratulations, your mail configuration is complete.\n"
-"\n"
-"You are now ready to send and receive email \n"
-"using Evolution. \n"
-"\n"
-"Click \"Finish\" to save your settings."
-msgstr ""
-"Təbrüklər, məktub qurğularınız qurtardı.\n"
-"\n"
-"\"Evolution\" ilə indi məktub alıb göndərə \n"
-"bilərsiniz. \n"
-"\n"
-"Qurğularınızı qeyd etmək üçün \"Qurtar\"a basın."
-
-#: mail/mail-config.glade.h:25
-msgid "De_fault"
-msgstr "Ə_sas"
-
-#: mail/mail-config.glade.h:26
-msgid "Default Forward style is: "
-msgstr ""
-
-#: mail/mail-config.glade.h:27
-msgid "Default character encoding: "
-msgstr ""
-
-#: mail/mail-config.glade.h:29
-msgid "Digital IDs..."
-msgstr ""
-
-#: mail/mail-config.glade.h:30
-msgid "Display"
-msgstr "Ekran"
-
-#: mail/mail-config.glade.h:31 shell/glade/evolution-startup-wizard.glade.h:2
-msgid "Done"
-msgstr "Qurtardı"
-
-#: mail/mail-config.glade.h:32 shell/e-local-storage.c:174
-msgid "Drafts"
-msgstr "Lahiyələr"
-
-#: mail/mail-config.glade.h:33
-msgid "Drafts folder:"
-msgstr "Lahiyələr cərgəsi:"
-
-#: mail/mail-config.glade.h:34
-#, fuzzy
-msgid "E_nable"
-msgstr "Fəallaşdır"
-
-#: mail/mail-config.glade.h:35 widgets/misc/e-filter-bar.h:96
-#: widgets/misc/e-filter-bar.h:103
-msgid "Edit..."
-msgstr "Düzəlt..."
-
-#: mail/mail-config.glade.h:36
-#, fuzzy
-msgid "Enabled"
-msgstr "Fəallaşdır"
-
-#: mail/mail-config.glade.h:37
-msgid "Get Digital ID..."
-msgstr ""
-
-#: mail/mail-config.glade.h:38
-#, fuzzy
-msgid "HTML signature file:"
-msgstr "Imza faylı : "
-
-#: mail/mail-config.glade.h:39
-msgid "IMAPv4 "
-msgstr "IMAPv4 "
-
-#: mail/mail-config.glade.h:40 shell/glade/evolution-startup-wizard.glade.h:4
-msgid "Identity"
-msgstr "Kimlik"
-
-#: mail/mail-config.glade.h:41
-msgid "In HTML mail"
-msgstr ""
-
-#: mail/mail-config.glade.h:42
-#, fuzzy
-msgid "Inline"
-msgstr "_Xətdə"
-
-#: mail/mail-config.glade.h:43
-msgid "Kerberos "
-msgstr "Kerberos "
-
-#: mail/mail-config.glade.h:44
-msgid "Mail Configuration"
-msgstr "ePoçt Quraşdırılması"
-
-#: mail/mail-config.glade.h:46
-#, fuzzy
-msgid "Mailbox location"
-msgstr "Məktub Qutusu Şəkli"
-
-#: mail/mail-config.glade.h:47
-#, fuzzy
-msgid "Make this my _default account"
-msgstr "Bunu əsas hesab olaraq göstər"
-
-#: mail/mail-config.glade.h:48
-#, fuzzy
-msgid "NNTP Server:"
-msgstr "LDAP Vericisi"
-
-#: mail/mail-config.glade.h:49
-msgid "News"
-msgstr "Xəbərlər"
-
-#: mail/mail-config.glade.h:51
-msgid "Optional Information"
-msgstr "Arzuya Bağlı Mə'lumatlar"
-
-#: mail/mail-config.glade.h:53
-msgid "PGP Key ID:"
-msgstr ""
-
-#: mail/mail-config.glade.h:56
-msgid "Pick a color"
-msgstr "Rəng al"
-
-#: mail/mail-config.glade.h:57
-msgid "Pretty Good Privacy"
-msgstr ""
-
-#: mail/mail-config.glade.h:58
-#, fuzzy
-msgid "Prompt when sending messages with an _empty subject"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: mail/mail-config.glade.h:59
-#, fuzzy
-msgid "Prompt when sending messages with only _Bcc recipients defined"
-msgstr "İsmarıc göndrərilə bilmədi: alıcı bildirilməyib."
-
-#: mail/mail-config.glade.h:60
-msgid "Qmail maildir "
-msgstr "Qmail cərgəsi "
-
-#: mail/mail-config.glade.h:61
-#, fuzzy
-msgid "Quoted"
-msgstr "_Kotalanmış"
-
-#: mail/mail-config.glade.h:62 shell/glade/evolution-startup-wizard.glade.h:6
-msgid "Receiving Email"
-msgstr "ePoçt Alınır"
-
-#: mail/mail-config.glade.h:63
-msgid "Receiving Mail"
-msgstr "E-poçt Alınır"
-
-#: mail/mail-config.glade.h:64
-msgid "Receiving Options"
-msgstr "Alma Seçənəkləri"
-
-#: mail/mail-config.glade.h:65
-msgid "Required Information"
-msgstr "İstənən Mə'lumatlar"
-
-#: mail/mail-config.glade.h:67
-msgid "Secure MIME"
-msgstr ""
-
-#: mail/mail-config.glade.h:68
-#, fuzzy
-msgid "Security"
-msgstr "_Təhlükəsizlik"
-
-#: mail/mail-config.glade.h:69
-#, fuzzy
-msgid "Select Filter Log file..."
-msgstr "Fayl seç"
-
-#: mail/mail-config.glade.h:70
-msgid "Select PGP binary"
-msgstr "PGP binarını seç"
-
-#: mail/mail-config.glade.h:71 shell/glade/evolution-startup-wizard.glade.h:7
-msgid "Sending Email"
-msgstr "ePoçt Göndərilir"
-
-#: mail/mail-config.glade.h:72
-msgid "Sending Mail"
-msgstr "E-poçt Göndərilir"
-
-#: mail/mail-config.glade.h:74 mail/message-list.etspec.h:6
-#: shell/e-local-storage.c:177
-msgid "Sent"
-msgstr "Göndərildi"
-
-#: mail/mail-config.glade.h:75
-msgid "Sent and Draft Messages"
-msgstr "Göndərilən və Lahiyə İsmarıcları"
-
-#: mail/mail-config.glade.h:76
-msgid "Sent messages folder:"
-msgstr "Göndərilən ismarıclar cərgəsi:"
-
-#: mail/mail-config.glade.h:77
-msgid "Server Configuration"
-msgstr "Verici Quraşdırılması"
-
-#: mail/mail-config.glade.h:78
-msgid "Server Type: "
-msgstr "Verici Növü: "
-
-#: mail/mail-config.glade.h:79
-#, fuzzy
-msgid "Server requires _authentication"
-msgstr "Verici tanıtmaya ehtiyac hiss edər"
-
-#: mail/mail-config.glade.h:80
-msgid "Signature file:"
-msgstr "Imza faylı : "
-
-#: mail/mail-config.glade.h:81
-#, fuzzy
-msgid "Source"
-msgstr "Qaynaqlar"
-
-#: mail/mail-config.glade.h:82
-#, fuzzy
-msgid "Source Information"
-msgstr "Mə'lumat Yoxdur"
-
-#: mail/mail-config.glade.h:83
-msgid "Sources"
-msgstr "Qaynaqlar"
-
-#: mail/mail-config.glade.h:84
-msgid "Special Folders"
-msgstr "Xüsusi Cərgələr"
-
-#: mail/mail-config.glade.h:85
-msgid "Standard Unix mbox"
-msgstr "Standart UNIX poçt qutusu faylı"
-
-#: mail/mail-config.glade.h:87
-#, fuzzy
-msgid "Use secure connection (_SSL)"
-msgstr "E'tibarlı bağlantı (SSL) işlət"
-
-#: mail/mail-config.glade.h:88
-#, fuzzy
-msgid ""
-"Welcome to the Evolution Mail Configuration Assistant.\n"
-"\n"
-"Click \"Next\" to begin. "
-msgstr ""
-"\"Evolution\" Məktub Quraşdırılması Vasitəsi.\n"
-"\n"
-"Başlamaq üçün \"Sonrakı\" düyməsinə basın. "
-
-#: mail/mail-config.glade.h:92
-msgid "_Always load images off the net"
-msgstr ""
-
-#: mail/mail-config.glade.h:93
-#, fuzzy
-msgid "_Automatically check for new mail every"
-msgstr "ePoçtları avtomatik yoxla:"
-
-#: mail/mail-config.glade.h:94
-#, fuzzy
-msgid "_Check for supported types"
-msgstr " Dəstəklənən növləri yoxla "
-
-#: mail/mail-config.glade.h:97
-#, fuzzy
-msgid "_Email Address:"
-msgstr "ePoçt Ünvanı: "
-
-#: mail/mail-config.glade.h:98
-msgid "_Empty trash folders on exit"
-msgstr ""
-
-#: mail/mail-config.glade.h:99
-#, fuzzy
-msgid "_Full Name:"
-msgstr "Tam Ad:"
-
-#: mail/mail-config.glade.h:100
-#, fuzzy
-msgid "_HTML Signature:"
-msgstr "Imza faylı : "
-
-#: mail/mail-config.glade.h:101
-#, fuzzy
-msgid "_Highlight citations with"
-msgstr "Sitatları Rəngləndir: "
-
-#: mail/mail-config.glade.h:102
-#, fuzzy
-msgid "_Host:"
-msgstr "Ev Sahibi:"
-
-#: mail/mail-config.glade.h:103
-msgid "_Load images if sender is in addressbook"
-msgstr ""
-
-#: mail/mail-config.glade.h:104
-msgid "_Log filter actions to:"
-msgstr ""
-
-#: mail/mail-config.glade.h:105
-#, fuzzy
-msgid "_Mark messages as Read after"
-msgstr "İsmarıcları bundan sonra \"Oxundu\" olaraq işarətlə: "
-
-#: mail/mail-config.glade.h:106
-#, fuzzy
-msgid "_Name:"
-msgstr "Ad :"
-
-#: mail/mail-config.glade.h:107
-msgid "_Never load images off the net"
-msgstr ""
-
-#: mail/mail-config.glade.h:108
-#, fuzzy
-msgid "_Organization:"
-msgstr "Orqanizasiya"
-
-#: mail/mail-config.glade.h:109
-#, fuzzy
-msgid "_PGP binary path:"
-msgstr "PGP binarı cığırı:"
-
-#: mail/mail-config.glade.h:110
-#, fuzzy
-msgid "_Path:"
-msgstr "Yol:"
-
-#: mail/mail-config.glade.h:111
-#, fuzzy
-msgid "_Remember this password"
-msgstr "Bu parolu yadda saxla"
-
-#: mail/mail-config.glade.h:112
-#, fuzzy
-msgid "_Send mail in HTML format by default."
-msgstr "Əsas olaraq ePoçtu HTML Şəklində göndər"
-
-#: mail/mail-config.glade.h:113
-#, fuzzy
-msgid "_Signature file:"
-msgstr "Imza faylı : "
-
-#: mail/mail-config.glade.h:114
-#, fuzzy
-msgid "_Username:"
-msgstr "İstifadəçi adı :"
-
-#: mail/mail-config.glade.h:115
-#, fuzzy
-msgid "description"
-msgstr "İzah :"
-
-#: mail/mail-config.glade.h:117
-msgid "newswindow1"
-msgstr ""
-
-#: mail/mail-config.glade.h:118
-msgid "placeholder"
-msgstr ""
-
-#: mail/mail-config.glade.h:119
-msgid "seconds."
-msgstr "saniyə."
-
-#: mail/mail-crypto.c:59
-#, fuzzy
-msgid "Could not create a PGP signature context."
-msgstr "%s üstündəki POP vericisi ilə ünsiyyət qurula bilmir."
-
-#: mail/mail-crypto.c:84
-#, fuzzy
-msgid "Could not create a PGP verification context."
-msgstr "%s üstündəki POP vericisi ilə ünsiyyət qurula bilmir."
-
-#: mail/mail-crypto.c:113
-#, fuzzy
-msgid "Could not create a PGP encryption context."
-msgstr "Dialoq qutusunu yarada bilmədim ."
-
-#: mail/mail-crypto.c:138
-#, fuzzy
-msgid "Could not create a PGP decryption context."
-msgstr ""
-"%s qovluğunu yarada bilmədim:\n"
-"%s"
-
-#: mail/mail-crypto.c:173
-msgid "Could not create a S/MIME signature context."
-msgstr ""
-
-#: mail/mail-crypto.c:205
-msgid "Could not create a S/MIME certsonly context."
-msgstr ""
-
-#: mail/mail-crypto.c:236
-msgid "Could not create a S/MIME encryption context."
-msgstr ""
-
-#: mail/mail-crypto.c:267
-#, fuzzy
-msgid "Could not create a S/MIME envelope context."
-msgstr "Dialoq qutusunu yarada bilmədim ."
-
-#: mail/mail-crypto.c:297
-#, fuzzy
-msgid "Could not create a S/MIME decode context."
-msgstr "Dialoq qutusunu yarada bilmədim ."
-
-#: mail/mail-display.c:223
-msgid "Save Attachment"
-msgstr "Yapışdırılmış Faylı Qeyd Et"
-
-#: mail/mail-display.c:327
-msgid "Save to Disk..."
-msgstr "Diskə Qeyd Et ..."
-
-#: mail/mail-display.c:329
-msgid "View Inline"
-msgstr "İçərisini Göstər"
-
-#: mail/mail-display.c:331
-#, c-format
-msgid "Open in %s..."
-msgstr "%s da(də) Aç ..."
-
-#: mail/mail-display.c:392
-#, c-format
-msgid "View Inline (via %s)"
-msgstr "İçərisini Göstər (%s ilə)"
-
-#: mail/mail-display.c:396
-msgid "Hide"
-msgstr "Gizlət"
-
-#: mail/mail-display.c:417
-msgid "External Viewer"
-msgstr "Xarici Göstərici"
-
-#: mail/mail-display.c:1053
-msgid "Loading message content"
-msgstr "İsmarıc içindəkilər yüklənir"
-
-#: mail/mail-display.c:1515
-#, fuzzy
-msgid "Open Link in Browser"
-msgstr "Körpünü səyyahda aç"
-
-#: mail/mail-display.c:1517
-#, fuzzy
-msgid "Copy Link Location"
-msgstr "Ünvanı köçür"
-
-#: mail/mail-display.c:1520
-#, fuzzy
-msgid "Save Link as (FIXME)"
-msgstr "Fərqli qeyd et"
-
-#: mail/mail-display.c:1523
-#, fuzzy
-msgid "Save Image as..."
-msgstr "Fərqli qeyd et ..."
-
-#: mail/mail-format.c:627
-#, c-format
-msgid "%s attachment"
-msgstr "%s yapışdırılmış fayl"
-
-#: mail/mail-format.c:680
-msgid "Could not parse MIME message. Displaying as source."
-msgstr "MIME ismarıcı açıla bilmədi: Mənbə kodu gösteriliyor."
-
-#: mail/mail-format.c:764
-msgid "Date"
-msgstr "Tarix"
-
-#: mail/mail-format.c:862
-#, fuzzy
-msgid "Bad Address"
-msgstr "ePoçt Ünvanı: "
-
-#: mail/mail-format.c:903 mail/message-list.etspec.h:3
-msgid "From"
-msgstr "Göndərən"
-
-#: mail/mail-format.c:906
-#, fuzzy
-msgid "Reply-To"
-msgstr "Cavab ver"
-
-#: mail/mail-format.c:910 mail/message-list.etspec.h:10
-msgid "To"
-msgstr "Gn:"
-
-#: mail/mail-format.c:914
-#, fuzzy
-msgid "Cc"
-msgstr "Cc:"
-
-#: mail/mail-format.c:1357
-msgid "No GPG/PGP program configured."
-msgstr "Heç GPG/PGP proqramı qurulmayıb."
-
-#: mail/mail-format.c:1373
-msgid "Encrypted message not displayed"
-msgstr "Kodlanmış ismarıc göstərilmədi"
-
-#: mail/mail-format.c:1384
-msgid "Encrypted message"
-msgstr "Kodlanmış İsmarıc"
-
-#: mail/mail-format.c:1385
-msgid "Click icon to decrypt."
-msgstr "Kodu açmaq üçün timsala basın."
-
-#: mail/mail-format.c:1440
-msgid "This message is digitally signed and has been found to be authentic."
-msgstr "Bu ismarıc digital olaraq imzalanmışdır və original olduğu düşünülür."
-
-#: mail/mail-format.c:1451
-msgid "This message is digitally signed but can not be proven to be authentic."
-msgstr ""
-"Bu ismarıc digital olaraq imzalanmışdır amma original olduğu düşünülmür."
-
-#: mail/mail-format.c:2128
-#, c-format
-msgid "Pointer to FTP site (%s)"
-msgstr "FTP saytını göstərən ox (%s)"
-
-#: mail/mail-format.c:2142
-#, c-format
-msgid "Pointer to local file (%s) valid at site \"%s\""
-msgstr "Yerli faylyi göstərən (%s) oxu \"%s\" saytında hökmlüdür"
-
-#: mail/mail-format.c:2147
-#, c-format
-msgid "Pointer to local file (%s)"
-msgstr "Yerli faylyi göstərən ox (%s)"
-
-#: mail/mail-format.c:2176
-#, fuzzy, c-format
-msgid "Pointer to remote data (%s)"
-msgstr "FTP saytını göstərən ox (%s)"
-
-#: mail/mail-format.c:2184
-#, c-format
-msgid "Pointer to unknown external data (\"%s\" type)"
-msgstr "Namə'lum xarici mə'lumatı göstərən ox (\"%s\" növündə "
-
-#: mail/mail-format.c:2189
-msgid "Malformed external-body part."
-msgstr "Xəsərli xarici proqram parçası."
-
-#: mail/mail-local.c:563
-#, fuzzy
-msgid "Reconfiguring folder"
-msgstr "Qovluq yenidən qurulur"
-
-#: mail/mail-local.c:636
-#, fuzzy, c-format
-msgid ""
-"Cannot save folder metainfo; you'll probably find you can't\n"
-"open this folder anymore: %s: %s"
-msgstr ""
-"Qovluğun meta mə'lumatını qeyd eda bilmədim; Bu qovluğu bir də aça\n"
-"bilməyə biləsən: %s"
-
-#: mail/mail-local.c:689
-#, fuzzy, c-format
-msgid "Cannot save folder metainfo to %s: %s"
-msgstr "%s üstündə qovluq qıfılı yaradıla bilmədi: %s"
-
-#: mail/mail-local.c:735
-#, fuzzy, c-format
-msgid "Cannot delete folder metadata %s: %s"
-msgstr ""
-"`%s' qovluğu silinə bilmir:\n"
-"%s"
-
-#: mail/mail-local.c:1075
-#, c-format
-msgid "Changing folder \"%s\" to \"%s\" format"
-msgstr "\"%s\" qovluğu \"%s\" şəklinə çevrilir"
-
-#: mail/mail-local.c:1090
-#, c-format
-msgid "%s may not be reconfigured because it is not a local folder"
-msgstr ""
-
-#: mail/mail-local.c:1112
-msgid ""
-"If you can no longer open this mailbox, then\n"
-"you may need to repair it manually."
-msgstr ""
-"Bu qovluğu bir də aça bilməsən, onu əllə\n"
-"bərpa etməlisən."
-
-#: mail/mail-local.c:1200
-#, fuzzy
-msgid "You cannot change the format of a non-local folder."
-msgstr "Buradakı ismarıcları zibilə göndərə bilməzsiniz."
-
-#: mail/mail-local.c:1209
-#, fuzzy, c-format
-msgid "Reconfigure /%s"
-msgstr "%s i(ı) Quraşdır"
-
-#: mail/mail-mt.c:199
-#, c-format
-msgid ""
-"Error while '%s':\n"
-"%s"
-msgstr ""
-"'%s' sırasında xəta:\n"
-"%s"
-
-#: mail/mail-mt.c:202
-#, c-format
-msgid ""
-"Error while performing operation:\n"
-"%s"
-msgstr ""
-"Əməliyyat aparılırkən xəta oldu:\n"
-"%s"
-
-#. Remember the password?
-#: mail/mail-mt.c:509
-msgid "Remember this password"
-msgstr "Bu parolu yadda saxla"
-
-#: mail/mail-mt.c:510
-msgid "Remember this password for the remainder of this session"
-msgstr ""
-
-#: mail/mail-mt.c:567
-#, fuzzy, c-format
-msgid "Enter Password for %s"
-msgstr "%s üçün parol girin"
-
-#: mail/mail-mt.c:570
-#, fuzzy
-msgid "Enter Password"
-msgstr "%s üçün parol girin"
-
-#: mail/mail-mt.c:886
-msgid "Working"
-msgstr "İşləyir"
-
-#: mail/mail-ops.c:86
-#, fuzzy
-msgid "Filtering Folder"
-msgstr "Qovluq yenidən qurulur"
-
-#: mail/mail-ops.c:229
-#, fuzzy
-msgid "Fetching Mail"
-msgstr "E-poçt Alınır"
-
-#: mail/mail-ops.c:482 mail/mail-ops.c:512
-msgid "However, the message was successfully sent."
-msgstr ""
-
-#: mail/mail-ops.c:549
-#, c-format
-msgid "Sending \"%s\""
-msgstr "\"%s\" Göndərilir"
-
-#: mail/mail-ops.c:668
-#, c-format
-msgid "Sending message %d of %d"
-msgstr "%d / %d ismarıc göndərilir"
-
-#: mail/mail-ops.c:687
-#, c-format
-msgid "Failed on message %d of %d"
-msgstr "%d/%d ismarıcda xəta"
-
-#: mail/mail-ops.c:689 mail/mail-send-recv.c:522
-msgid "Complete."
-msgstr "Qurtadı."
-
-#: mail/mail-ops.c:782
-msgid "Saving message to folder"
-msgstr "İsmarıclar qovluğa qeyd edilir"
-
-#: mail/mail-ops.c:861
-#, c-format
-msgid "Moving messages to %s"
-msgstr "İsmarıclar \"%s\"a(ə) daşınır"
-
-#: mail/mail-ops.c:861
-#, c-format
-msgid "Copying messages to %s"
-msgstr "İsmarıclar \"%s\"a(ə) köçürülür"
-
-#: mail/mail-ops.c:878
-msgid "Moving"
-msgstr "Daşınır"
-
-#: mail/mail-ops.c:881
-msgid "Copying"
-msgstr "Köçürdülür"
-
-#: mail/mail-ops.c:993
-#, c-format
-msgid "Scanning folders in \"%s\""
-msgstr "\"%s\" dakı qovluqlar daranır"
-
-#. Fill in the new fields
-#: mail/mail-ops.c:1040 shell/e-local-storage.c:179
-msgid "Trash"
-msgstr "Zibil Qutusu"
-
-#: mail/mail-ops.c:1173
-msgid "Forwarded messages"
-msgstr "Çatdırılmış ismarıc"
-
-#: mail/mail-ops.c:1215
-#, c-format
-msgid "Opening folder %s"
-msgstr "%s qovluğu açılır"
-
-#: mail/mail-ops.c:1284
-#, c-format
-msgid "Opening store %s"
-msgstr "%s qaynağı açılır"
-
-#: mail/mail-ops.c:1353
-#, fuzzy, c-format
-msgid "Removing folder %s"
-msgstr "%s qovluğu açılır"
-
-#: mail/mail-ops.c:1445
-#, fuzzy, c-format
-msgid "Storing folder '%s'"
-msgstr "%s qovluğu açılır"
-
-#: mail/mail-ops.c:1496
-#, fuzzy
-msgid "Refreshing folder"
-msgstr "Qovluq yenidən qurulur"
-
-#: mail/mail-ops.c:1532
-msgid "Expunging folder"
-msgstr "Qovluq açılır"
-
-#: mail/mail-ops.c:1581
-#, c-format
-msgid "Retrieving message %s"
-msgstr "%s ismarıcı alınır"
-
-#: mail/mail-ops.c:1648
-#, fuzzy, c-format
-msgid "Retrieving %d message(s)"
-msgstr "İsmarıclar alınır"
-
-#: mail/mail-ops.c:1734
-#, fuzzy, c-format
-msgid "Saving %d messsage(s)"
-msgstr "İsmarıclar qeyd edilir"
-
-#: mail/mail-ops.c:1846
-#, c-format
-msgid ""
-"Unable to create output file: %s\n"
-" %s"
-msgstr ""
-"Nəticə faylı yaradıla bilmir: %s\n"
-" %s"
-
-#: mail/mail-ops.c:1874
-#, c-format
-msgid ""
-"Error saving messages to: %s:\n"
-" %s"
-msgstr ""
-"İsmarıcların buraya qeyd edilmə xatası: %s:\n"
-" %s"
-
-#: mail/mail-ops.c:1948
-msgid "Saving attachment"
-msgstr "Yapışdırılmış Fayl Qeyd Edilir"
-
-#: mail/mail-ops.c:1964
-#, c-format
-msgid ""
-"Cannot create output file: %s:\n"
-" %s"
-msgstr ""
-"Yekun faylı yaradıla bilmir: %s:\n"
-" %s"
-
-#: mail/mail-ops.c:1995
-#, c-format
-msgid "Could not write data: %s"
-msgstr "Data yazıla bilmədi: %s"
-
-#: mail/mail-ops.c:2064
-#, c-format
-msgid "Disconnecting from %s"
-msgstr ""
-
-#: mail/mail-ops.c:2065
-#, fuzzy, c-format
-msgid "Reconnecting to %s"
-msgstr "Vericiyə bağlantı qurulur..."
-
-#: mail/mail-search-dialogue.c:113
-msgid "_Search"
-msgstr "A_xtar"
-
-#: mail/mail-search.c:138
-#, fuzzy
-msgid "(Untitled Message)"
-msgstr "( Adsız )"
-
-#: mail/mail-search.c:241
-#, fuzzy
-msgid "Untitled Message"
-msgstr "Çoxlu İsmarıc"
-
-#: mail/mail-search.c:245
-#, fuzzy
-msgid "Empty Message"
-msgstr "İsmarıcı Düzəlt"
-
-#: mail/mail-search.c:292
-#, fuzzy
-msgid "Find in Message"
-msgstr "İsmarıcı Düzəlt"
-
-#: mail/mail-search.c:322
-msgid "Case Sensitive"
-msgstr ""
-
-#: mail/mail-search.c:324
-#, fuzzy
-msgid "Search Forward"
-msgstr "Çatdır"
-
-#: mail/mail-search.c:344
-#, fuzzy
-msgid "Find:"
-msgstr "Axtar"
-
-#: mail/mail-search.c:347
-#, fuzzy
-msgid "Matches:"
-msgstr "Yol:"
-
-#: mail/mail-send-recv.c:139
-#, fuzzy
-msgid "Cancelling..."
-msgstr "Ləğv Edilir ..."
-
-#: mail/mail-send-recv.c:243
-#, fuzzy, c-format
-msgid "Server: %s, Type: %s"
-msgstr "Verici Növü: "
-
-#: mail/mail-send-recv.c:245
-#, c-format
-msgid "Path: %s, Type: %s"
-msgstr ""
-
-#: mail/mail-send-recv.c:247
-#, fuzzy, c-format
-msgid "Type: %s"
-msgstr "Növ:"
-
-#: mail/mail-send-recv.c:283
-#, fuzzy
-msgid "Send & Receive Mail"
-msgstr "ePoçt Göndər və Al"
-
-#: mail/mail-send-recv.c:284
-#, fuzzy
-msgid "Cancel All"
-msgstr "Ləğv Edildi"
-
-#: mail/mail-send-recv.c:333
-#, fuzzy
-msgid "Updating..."
-msgstr "Güncəllənir ..."
-
-#: mail/mail-send-recv.c:334 mail/mail-send-recv.c:387
-#, fuzzy
-msgid "Waiting..."
-msgstr "Gözlənilir ..."
-
-#: mail/mail-send-recv.c:518
-msgid "Cancelled."
-msgstr "Ləğv Edildi."
-
-#: mail/mail-session.c:183
-msgid "User canceled operation."
-msgstr "İstifadəçi əməliyyatı ləğv etdi."
-
-#: mail/mail-tools.c:133
-#, c-format
-msgid "Couldn't create temporary mbox `%s': %s"
-msgstr "Müvəqqəti '%s' mboxu yaradıla bilmir: %s"
-
-#: mail/mail-tools.c:259
-#, c-format
-msgid "Forwarded message - %s"
-msgstr "Çatdırılmış ismarıc - %s"
-
-#: mail/mail-tools.c:263
-#, fuzzy
-msgid "Forwarded message"
-msgstr "Çatdırılmış ismarıc"
-
-#: mail/mail-tools.c:396
-#, fuzzy
-msgid "Forwarded Message"
-msgstr "Çatdırılmış ismarıc"
-
-#: mail/mail-vfolder.c:84
-#, fuzzy, c-format
-msgid "Setting up vfolder: %s"
-msgstr "%s qovluğu açılır"
-
-#: mail/mail-vfolder.c:201
-#, fuzzy, c-format
-msgid "Updating vfolders for uri: %s"
-msgstr "\"%s\" dakı qovluqlar daranır"
-
-#: mail/mail-vfolder.c:414
-#, c-format
-msgid ""
-"The following vFolder(s):\n"
-"%sUsed the removed folder:\n"
-" '%s'\n"
-"And have been updated."
-msgstr ""
-
-#: mail/mail-vfolder.c:636
-msgid "VFolders"
-msgstr "VFolderlər"
-
-#: mail/mail-vfolder.c:742
-msgid "New VFolder"
-msgstr "Yeni VFolder"
-
-#: mail/message-browser.c:121
-#, fuzzy
-msgid "(No subject)"
-msgstr "Dvm: (mövzusuz)"
-
-#: mail/message-browser.c:123
-#, fuzzy, c-format
-msgid "%s - Message"
-msgstr "İsmarıc"
-
-#: mail/message-list.c:640
-msgid "Unseen"
-msgstr "Görülməmiş"
-
-#: mail/message-list.c:641
-msgid "Seen"
-msgstr "Görülmüş"
-
-#: mail/message-list.c:642
-msgid "Answered"
-msgstr "Cavab cerilmiş"
-
-#: mail/message-list.c:643
-msgid "Multiple Unseen Messages"
-msgstr "Çoxlu Görülməmiş İsmarıc"
-
-#: mail/message-list.c:644
-msgid "Multiple Messages"
-msgstr "Çoxlu İsmarıc"
-
-#: mail/message-list.c:648
-msgid "Lowest"
-msgstr "Ən Alçaq"
-
-#: mail/message-list.c:649
-msgid "Lower"
-msgstr "Alçalt"
-
-#: mail/message-list.c:653
-msgid "Higher"
-msgstr "Yüksək"
-
-#: mail/message-list.c:654
-msgid "Highest"
-msgstr "Ən Yüksək"
-
-#: mail/message-list.c:904
-msgid "?"
-msgstr "?"
-
-#: mail/message-list.c:911
-msgid "Today %l:%M %p"
-msgstr "Bugün %l:%M %p"
-
-#: mail/message-list.c:920
-msgid "Yesterday %l:%M %p"
-msgstr "Sabah: %l:%M %p"
-
-#: mail/message-list.c:932
-msgid "%a %l:%M %p"
-msgstr "%a %l %M %p"
-
-#: mail/message-list.c:942
-msgid "%b %d %Y"
-msgstr "%b %d %Y"
-
-#: mail/message-list.c:2334
-#, fuzzy
-msgid "Generating message list"
-msgstr "İsmarıclar qeyd edilir"
-
-#: mail/message-list.etspec.h:2
-msgid "Flagged"
-msgstr "Bayraqlı"
-
-#: mail/message-list.etspec.h:4
-msgid "Received"
-msgstr "Alındı"
-
-#: mail/message-list.etspec.h:7
-msgid "Size"
-msgstr "Böyüklük"
-
-#: mail/subscribe-dialog.c:219
-#, fuzzy, c-format
-msgid "Scanning folders under %s on \"%s\""
-msgstr "\"%s\" dakı qovluqlar daranır"
-
-#: mail/subscribe-dialog.c:221
-#, fuzzy, c-format
-msgid "Scanning root-level folders on \"%s\""
-msgstr "\"%s\" dakı qovluqlar daranır"
-
-#: mail/subscribe-dialog.c:320
-#, c-format
-msgid "Subscribing to folder \"%s\""
-msgstr "\"%s\" qovluğuna qeydiyyat aparılır"
-
-#: mail/subscribe-dialog.c:322
-#, c-format
-msgid "Unsubscribing to folder \"%s\""
-msgstr "\"%s\" qovluğuna qeydiyyat silinir"
-
-#: mail/subscribe-dialog.c:1280 mail/subscribe-dialog.etspec.h:1
-#: shell/e-storage-set-view.etspec.h:1
-msgid "Folder"
-msgstr "Qovluq"
-
-#: mail/subscribe-dialog.c:1521
-#, fuzzy
-msgid "No server has been selected"
-msgstr "Heç İsmarıc Seçilmədi"
-
-#: mail/subscribe-dialog.c:1582
-#, fuzzy
-msgid "Please select a server."
-msgstr "Xidmæt seç"
-
-#: mail/subscribe-dialog.glade.h:1
-#, fuzzy
-msgid " _Refresh List "
-msgstr "Siyahını Yenilə"
-
-#: mail/subscribe-dialog.glade.h:2
-#, fuzzy
-msgid "All folders"
-msgstr "Qovluqlar"
-
-#: mail/subscribe-dialog.glade.h:3
-#, fuzzy
-msgid "Display options"
-msgstr "Göstərmə Seçənəkləri :"
-
-#: mail/subscribe-dialog.glade.h:4
-msgid "Folders whose names begin with:"
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:5
-msgid "Manage Subscriptions"
-msgstr "Üzvlükləri Düzəlt"
-
-#: mail/subscribe-dialog.glade.h:6
-msgid "Show _folders from server: "
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:7
-#, fuzzy
-msgid "_Subscribe"
-msgstr "Qeydiyyatdan Keç"
-
-#: mail/subscribe-dialog.glade.h:8
-#, fuzzy
-msgid "_Unsubscribe"
-msgstr "Qeydiyyatdan Çıx"
-
-#: my-evolution/GNOME_Evolution_Summary.oaf.in.h:1
-msgid "Evolution component for the executive summary."
-msgstr "İcracı mündəricat üçün 'Evolution' parçası."
-
-#: my-evolution/component-factory.c:45
-msgid "Folder containing the Evolution Summary"
-msgstr ""
-
-#: my-evolution/component-factory.c:154
-msgid "Cannot initialize Evolution's Executive Summary component."
-msgstr "Evolutionun İcracı Mündəricat parçasını başlada bilmədim ."
-
-#: my-evolution/e-summary-calendar.c:263 my-evolution/e-summary-calendar.c:281
-msgid "Appointments"
-msgstr "Görüşlər"
-
-#: my-evolution/e-summary-calendar.c:264
-#, fuzzy
-msgid "No appointments"
-msgstr "Görüşləri göstər"
-
-#: my-evolution/e-summary-calendar.c:301
-#, fuzzy
-msgid "%k%M %d %B"
-msgstr "%A %d %B"
-
-#: my-evolution/e-summary-calendar.c:303
-#, fuzzy
-msgid "%l:%M %d %B"
-msgstr "%A %d %B"
-
-#: my-evolution/e-summary-mail.c:130
-#, fuzzy
-msgid "Mail summary"
-msgstr "Poçt Mündəricatı"
-
-#. translators: Put here a list of codes for locations you want to
-#. see in My Evolution by default. You can find the list of all
-#. stations and their codes in Evolution sources
-#. (evolution/my-evolution/Locations)
-#: my-evolution/e-summary-preferences.c:80
-#: my-evolution/e-summary-weather.c:630
-msgid "KBOS:ZSAM:EGAA"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:441
-msgid "Dictionary.com Word of the Day"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:463
-msgid "Quotes of the Day"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:929
-msgid "Add a news feed"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:937
-msgid "Enter the URL of the news feed you wish to add"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:941
-msgid "Name:"
-msgstr "Ad :"
-
-#: my-evolution/e-summary-preferences.c:1486
-#, fuzzy
-msgid "Summary Settings"
-msgstr "Xülasə daxil edən"
-
-#: my-evolution/e-summary-rdf.c:297 my-evolution/e-summary-rdf.c:382
-#: my-evolution/e-summary-rdf.c:415
-#, fuzzy
-msgid "Error downloading RDF"
-msgstr "<b>Təqvim yükləmə xətası</b>"
-
-#: my-evolution/e-summary-rdf.c:507
-#, fuzzy
-msgid "News Feed"
-msgstr "_Yeni Qovluq"
-
-#: my-evolution/e-summary-tasks.c:238
-#, fuzzy
-msgid "No tasks"
-msgstr "Vəzifələri göstər"
-
-#: my-evolution/e-summary-tasks.c:277
-#, fuzzy
-msgid "(No Description)"
-msgstr "İzah :"
-
-#: my-evolution/e-summary-weather.c:72
-msgid "My Weather"
-msgstr ""
-
-#: my-evolution/e-summary-weather.c:349
-msgid "<dd><b>The weather server could not be contacted</b></dd>"
-msgstr ""
-
-#: my-evolution/e-summary-weather.c:539
-#, fuzzy
-msgid "Weather"
-msgstr "Başqa"
-
-#: my-evolution/e-summary-weather.c:691
-#, fuzzy
-msgid "Regions"
-msgstr "Bölmələr :"
-
-#: my-evolution/e-summary.c:187
-#, fuzzy
-msgid "%A, %B %e %Y"
-msgstr "%a %B %d %Y"
-
-#: my-evolution/e-summary.c:568 ui/my-evolution.xml.h:3
-#, fuzzy
-msgid "Print Summary"
-msgstr "Mündəricat"
-
-#: my-evolution/e-summary.c:614
-#, fuzzy
-msgid "Printing of Summary failed"
-msgstr "İsmarıların çap edilməsi bacarılmadı"
-
-#: my-evolution/main.c:67
-#, fuzzy
-msgid "Executive summary component could not initialize Bonobo.\n"
-msgstr "init_bonobo(): Bonobonu başlada bilmədim"
-
-#: my-evolution/metar.c:29
-msgid "F"
-msgstr ""
-
-#: my-evolution/metar.c:29
-msgid "C"
-msgstr ""
-
-#: my-evolution/metar.c:33
-#, fuzzy
-msgid "knots"
-msgstr "Yazı növləri"
-
-#: my-evolution/metar.c:33
-msgid "kph"
-msgstr ""
-
-#: my-evolution/metar.c:38
-#, fuzzy
-msgid "inHg"
-msgstr "Daşınır"
-
-#: my-evolution/metar.c:38
-msgid "mmHg"
-msgstr ""
-
-#: my-evolution/metar.c:41
-#, fuzzy
-msgid "miles"
-msgstr "_Süzgəclər ..."
-
-#: my-evolution/metar.c:41
-#, fuzzy
-msgid "kilometers"
-msgstr "_Süzgəclər ..."
-
-#: my-evolution/metar.c:44
-#, fuzzy
-msgid "Clear sky"
-msgstr "Təmizlə"
-
-#: my-evolution/metar.c:45
-msgid "Broken clouds"
-msgstr ""
-
-#: my-evolution/metar.c:46
-msgid "Scattered clouds"
-msgstr ""
-
-#: my-evolution/metar.c:47
-msgid "Few clouds"
-msgstr ""
-
-#: my-evolution/metar.c:48
-msgid "Overcast"
-msgstr ""
-
-#: my-evolution/metar.c:56 my-evolution/metar.c:74 my-evolution/metar.c:137
-msgid "Invalid"
-msgstr ""
-
-#: my-evolution/metar.c:63
-#, fuzzy
-msgid "Variable"
-msgstr "Bağla"
-
-#: my-evolution/metar.c:64
-#, fuzzy
-msgid "North"
-msgstr "Qeyd"
-
-#: my-evolution/metar.c:64
-msgid "North - NorthEast"
-msgstr ""
-
-#: my-evolution/metar.c:64
-#, fuzzy
-msgid "Northeast"
-msgstr "_Qeydlər:"
-
-#: my-evolution/metar.c:64
-msgid "East - NorthEast"
-msgstr ""
-
-#: my-evolution/metar.c:65
-#, fuzzy
-msgid "East"
-msgstr "Mövcuddur"
-
-#: my-evolution/metar.c:65
-msgid "East - Southeast"
-msgstr ""
-
-#: my-evolution/metar.c:65
-#, fuzzy
-msgid "Southeast"
-msgstr "Qaynaqlar"
-
-#: my-evolution/metar.c:65
-msgid "South - Southeast"
-msgstr ""
-
-#: my-evolution/metar.c:66
-#, fuzzy
-msgid "South"
-msgstr "ay"
-
-#: my-evolution/metar.c:66
-msgid "South - Southwest"
-msgstr ""
-
-#: my-evolution/metar.c:66
-#, fuzzy
-msgid "Southwest"
-msgstr "Ən Alçaq"
-
-#: my-evolution/metar.c:66
-msgid "West - Southwest"
-msgstr ""
-
-#: my-evolution/metar.c:67
-#, fuzzy
-msgid "West"
-msgstr "Sınaq"
-
-#: my-evolution/metar.c:67
-msgid "West - Northwest"
-msgstr ""
-
-#: my-evolution/metar.c:67
-#, fuzzy
-msgid "Northwest"
-msgstr "Ən Alçaq"
-
-#: my-evolution/metar.c:67
-msgid "North - Northwest"
-msgstr ""
-
-#. NONE VICINITY LIGHT MODERATE HEAVY SHALLOW PATCHES PARTIAL THUNDERSTORM BLOWING SHOWERS DRIFTING FREEZING
-#. ******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
-#. NONE
-#. DRIZZLE
-#: my-evolution/metar.c:100
-msgid "Drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Drizzle in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Light drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Moderate drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Heavy drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Shallow drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Patches of drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Partial drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100 my-evolution/metar.c:101
-msgid "Thunderstorm"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Windy drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-#, fuzzy
-msgid "Showers"
-msgstr "Göstər"
-
-#: my-evolution/metar.c:100
-msgid "Drifting drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Freezing drizzle"
-msgstr ""
-
-#. RAIN
-#: my-evolution/metar.c:101
-#, fuzzy
-msgid "Rain"
-msgstr "Radio"
-
-#: my-evolution/metar.c:101
-msgid "Rain in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Light rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Moderate rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Heavy rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Shallow rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Patches of rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Partial rainfall"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Blowing rainfall"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Rain showers"
-msgstr ""
-
-#: my-evolution/metar.c:101
-#, fuzzy
-msgid "Drifting rain"
-msgstr "İzah daxil edən"
-
-#: my-evolution/metar.c:101
-#, fuzzy
-msgid "Freezing rain"
-msgstr "Yenidən Axtar"
-
-#. SNOW
-#: my-evolution/metar.c:102
-#, fuzzy
-msgid "Snow"
-msgstr "indi"
-
-#: my-evolution/metar.c:102
-msgid "Snow in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Light snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-#, fuzzy
-msgid "Moderate snow"
-msgstr "İndi güncəllə"
-
-#: my-evolution/metar.c:102
-msgid "Heavy snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Shallow snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Patches of snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Partial snowfall"
-msgstr ""
-
-#: my-evolution/metar.c:102 my-evolution/metar.c:103
-msgid "Snowstorm"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Blowing snowfall"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Snow showers"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Drifting snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Freezing snow"
-msgstr ""
-
-#. SNOW_GRAINS
-#: my-evolution/metar.c:103
-msgid "Snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Snow grains in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Light snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Moderate snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Heavy snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Shallow snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Patches of snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Partial snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Blowing snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Snow grain showers"
-msgstr ""
-
-#: my-evolution/metar.c:103
-#, fuzzy
-msgid "Drifting snow grains"
-msgstr "İzah daxil edən"
-
-#: my-evolution/metar.c:103
-msgid "Freezing snow grains"
-msgstr ""
-
-#. ICE_CRYSTALS
-#: my-evolution/metar.c:104
-msgid "Ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Ice crystals in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Few ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Moderate ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Heavy ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Patches of ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Partial ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Ice crystal storm"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Blowing ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Showers of ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Drifting ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Freezing ice crystals"
-msgstr ""
-
-#. ICE_PELLETS
-#: my-evolution/metar.c:105
-msgid "Ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Ice pellets in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Few ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Moderate ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Heavy ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Shallow ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Patches of ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Partial ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Ice pellet storm"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Blowing ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Showers of ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Drifting ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Freezing ice pellets"
-msgstr ""
-
-#. HAIL
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Hail"
-msgstr "ePoçt"
-
-#: my-evolution/metar.c:106
-msgid "Hail in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:106 my-evolution/metar.c:107
-msgid "Light hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Moderate hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Heavy hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Shallow hail"
-msgstr "Hamısını Göstər"
-
-#: my-evolution/metar.c:106
-msgid "Patches of hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Partial hail"
-msgstr "İlk ePoçt ünvanı"
-
-#: my-evolution/metar.c:106
-msgid "Hailstorm"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Blowing hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Hail showers"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Drifting hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Freezing hail"
-msgstr "E-poçt Alınır"
-
-#. SMALL_HAIL
-#: my-evolution/metar.c:107
-msgid "Small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Small hail in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Moderate small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Heavy small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-#, fuzzy
-msgid "Shallow small hail"
-msgstr "Hamısını Göstər"
-
-#: my-evolution/metar.c:107
-msgid "Patches of small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Partial small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Small hailstorm"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Blowing small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-#, fuzzy
-msgid "Showers of small hail"
-msgstr "Hamısını Göstər"
-
-#: my-evolution/metar.c:107
-msgid "Drifting small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Freezing small hail"
-msgstr ""
-
-#. PRECIPITATION
-#: my-evolution/metar.c:108
-#, fuzzy
-msgid "Unknown precipitation"
-msgstr "Namə'lum tanıtma vəziyyəti."
-
-#: my-evolution/metar.c:108
-msgid "Precipitation in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Light precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Moderate precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Heavy precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Shallow precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Patches of precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Partial precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-#, fuzzy
-msgid "Unknown thunderstorm"
-msgstr "Namə'lum xəta"
-
-#: my-evolution/metar.c:108
-msgid "Blowing precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Showers, type unknown"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Drifting precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-#, fuzzy
-msgid "Freezing precipitation"
-msgstr "Görüş Dəvətləri"
-
-#. MIST
-#: my-evolution/metar.c:109
-#, fuzzy
-msgid "Mist"
-msgstr "Miss"
-
-#: my-evolution/metar.c:109
-msgid "Mist in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Light mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Moderate mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Thick mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Shallow mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Patches of mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-#, fuzzy
-msgid "Partial mist"
-msgstr "Portret"
-
-#: my-evolution/metar.c:109
-msgid "Mist with wind"
-msgstr ""
-
-#: my-evolution/metar.c:109
-#, fuzzy
-msgid "Drifting mist"
-msgstr "Məktublaşma qrupu"
-
-#: my-evolution/metar.c:109
-msgid "Freezing mist"
-msgstr ""
-
-#. FOG
-#: my-evolution/metar.c:110
-msgid "Fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Fog in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Light fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Moderate fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Thick fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-#, fuzzy
-msgid "Shallow fog"
-msgstr "Hamısını Göstər"
-
-#: my-evolution/metar.c:110
-msgid "Patches of fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Partial fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-#, fuzzy
-msgid "Fog with wind"
-msgstr "Bu pəncərəni qapat"
-
-#: my-evolution/metar.c:110
-msgid "Drifting fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Freezing fog"
-msgstr ""
-
-#. SMOKE
-#: my-evolution/metar.c:111
-#, fuzzy
-msgid "Smoke"
-msgstr "Xal"
-
-#: my-evolution/metar.c:111
-msgid "Smoke in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Thin smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Moderate smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Thick smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-#, fuzzy
-msgid "Shallow smoke"
-msgstr "Vəzifələri göstər"
-
-#: my-evolution/metar.c:111
-msgid "Patches of smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Partial smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Smoke w/ thunders"
-msgstr ""
-
-#: my-evolution/metar.c:111
-#, fuzzy
-msgid "Smoke with wind"
-msgstr "Bu pəncərəni qapat"
-
-#: my-evolution/metar.c:111
-msgid "Drifting smoke"
-msgstr ""
-
-#. VOLCANIC_ASH
-#: my-evolution/metar.c:112
-msgid "Volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Volcanic ash in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Moderate volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Thick volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Shallow volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Patches of volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Partial volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Volcanic ash w/ thunders"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Blowing volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Showers of volcanic ash "
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Drifting volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Freezing volcanic ash"
-msgstr ""
-
-#. SAND
-#: my-evolution/metar.c:113
-#, fuzzy
-msgid "Sand"
-msgstr "Göndər"
-
-#: my-evolution/metar.c:113
-msgid "Sand in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Light sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Moderate sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Heavy sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Patches of sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Partial sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Blowing sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Drifting sand"
-msgstr ""
-
-#. HAZE
-#: my-evolution/metar.c:114
-#, fuzzy
-msgid "Haze"
-msgstr "Başlıq"
-
-#: my-evolution/metar.c:114
-msgid "Haze in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Light haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Moderate haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Thick haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Shallow haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Patches of haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Partial haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Haze with wind"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Drifting haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Freezing haze"
-msgstr ""
-
-#. SPRAY
-#: my-evolution/metar.c:115
-#, fuzzy
-msgid "Sprays"
-msgstr "gün"
-
-#: my-evolution/metar.c:115
-msgid "Sprays in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Light sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Moderate sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Heavy sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Shallow sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Patches of sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Partial sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Blowing sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Drifting sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Freezing sprays"
-msgstr ""
-
-#. DUST
-#: my-evolution/metar.c:116
-#, fuzzy
-msgid "Dust"
-msgstr "Avqust"
-
-#: my-evolution/metar.c:116
-msgid "Dust in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Light dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Moderate dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Heavy dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Patches of dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Partial dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Blowing dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Drifting dust"
-msgstr ""
-
-#. SQUALL
-#: my-evolution/metar.c:117
-msgid "Squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Squall in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Light squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Moderate squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Heavy squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Partial squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Thunderous squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Blowing squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Drifting squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Freezing squall"
-msgstr ""
-
-#. SANDSTORM
-#: my-evolution/metar.c:118
-msgid "Sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Sandstorm in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Light standstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Moderate sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Heavy sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Shallow sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Partial sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Thunderous sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Blowing sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Drifting sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Freezing sandstorm"
-msgstr ""
-
-#. DUSTSTORM
-#: my-evolution/metar.c:119
-msgid "Duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Duststorm in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Light duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Moderate duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Heavy duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Shallow duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Partial duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Thunderous duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Blowing duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Drifting duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Freezing duststorm"
-msgstr ""
-
-#. FUNNEL_CLOUD
-#: my-evolution/metar.c:120
-msgid "Funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Funnel cloud in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Light funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Moderate funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Thick funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Shallow funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Patches of funnel clouds"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Partial funnel clouds"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Funnel cloud w/ wind"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Drifting funnel cloud"
-msgstr ""
-
-#. TORNADO
-#: my-evolution/metar.c:121
-msgid "Tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Tornado in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Moderate tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-#, fuzzy
-msgid "Raging tornado"
-msgstr "Ediləcəklər"
-
-#: my-evolution/metar.c:121
-msgid "Partial tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-#, fuzzy
-msgid "Thunderous tornado"
-msgstr "Ediləcəklər"
-
-#: my-evolution/metar.c:121
-msgid "Drifting tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Freezing tornado"
-msgstr ""
-
-#. DUST_WHIRLS
-#: my-evolution/metar.c:122
-msgid "Dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Dust whirls in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Light dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Moderate dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Heavy dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Shallow dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Patches of dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Partial dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Blowing dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Drifting dust whirls"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:1
-#, fuzzy
-msgid " _Remove"
-msgstr "Sil"
-
-#: my-evolution/my-evolution.glade.h:2
-#, fuzzy
-msgid "Add n_ew feed"
-msgstr "Cavab cerilmiş"
-
-#: my-evolution/my-evolution.glade.h:3
-#, fuzzy
-msgid "Al_l stations:"
-msgstr "Bütün Ziyarətçilər"
-
-#: my-evolution/my-evolution.glade.h:4
-#, fuzzy
-msgid "All _folders:"
-msgstr "Qovluqlar"
-
-#: my-evolution/my-evolution.glade.h:5
-#, fuzzy
-msgid "All news _feeds:"
-msgstr "Cavab cerilmiş"
-
-#: my-evolution/my-evolution.glade.h:7
-msgid "How many days should the calendar display at once?"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:8
-msgid "Ma_x number of items shown:"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:9
-msgid "News Feed Settings"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:10
-#, fuzzy
-msgid "One mont_h"
-msgstr "ay"
-
-#: my-evolution/my-evolution.glade.h:11
-#, fuzzy
-msgid "One w_eek"
-msgstr "2 həftə"
-
-#: my-evolution/my-evolution.glade.h:12
-msgid "R_efresh time (seconds):"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:13
-msgid "Refresh _time (seconds):"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:14
-#, fuzzy
-msgid "S_how full path for folders"
-msgstr "bütün fəal uzaq qovluqlarla"
-
-#: my-evolution/my-evolution.glade.h:15
-#, fuzzy
-msgid "Show _all tasks"
-msgstr "Vəzifələri göstər"
-
-#: my-evolution/my-evolution.glade.h:16
-#, fuzzy
-msgid "Show _today's tasks"
-msgstr "Vəzifələri göstər"
-
-#: my-evolution/my-evolution.glade.h:17
-#, fuzzy
-msgid "Tasks "
-msgstr "Vəzifə"
-
-#: my-evolution/my-evolution.glade.h:18
-#, fuzzy
-msgid "Units: "
-msgstr ""
-"\n"
-" Bölmə:\t"
-
-#: my-evolution/my-evolution.glade.h:19
-#, fuzzy
-msgid "Weather settings"
-msgstr "Seçkiləri təmizlə"
-
-#: my-evolution/my-evolution.glade.h:21
-#, fuzzy
-msgid "_Display folders:"
-msgstr "Bunula başlayan qovluqları göstər:"
-
-#: my-evolution/my-evolution.glade.h:22
-#, fuzzy
-msgid "_Display stations:"
-msgstr "Göstərmə Seçənəkləri :"
-
-#: my-evolution/my-evolution.glade.h:23
-#, fuzzy
-msgid "_Displayed feeds:"
-msgstr "Ekran"
-
-#: my-evolution/my-evolution.glade.h:24
-#, fuzzy
-msgid "_Five days"
-msgstr "Cümə"
-
-#: my-evolution/my-evolution.glade.h:25
-#, fuzzy
-msgid "_Mail"
-msgstr "ePoçt"
-
-#: my-evolution/my-evolution.glade.h:26
-#, fuzzy
-msgid "_News Feeds"
-msgstr "_Yeni Qovluq"
-
-#: my-evolution/my-evolution.glade.h:27
-#, fuzzy
-msgid "_One day"
-msgstr "Çərşənbə"
-
-#: my-evolution/my-evolution.glade.h:28
-#, fuzzy
-msgid "_Schedule"
-msgstr ""
-"Vaxt\n"
-"Planlaşdır"
-
-#: my-evolution/my-evolution.glade.h:29
-#, fuzzy
-msgid "_Weather"
-msgstr "Başqa"
-
-#: my-evolution/my-evolution.glade.h:30
-#, fuzzy
-msgid "_imperial"
-msgstr "Aprel"
-
-#: my-evolution/my-evolution.glade.h:31
-msgid "m_etric"
-msgstr ""
-
-#: shell/GNOME_Evolution_Shell.oaf.in.h:1
-msgid "The Evolution shell."
-msgstr "'Evolution' qabığı."
-
-#: shell/e-activity-handler.c:200
-#, fuzzy
-msgid "Show Details"
-msgstr "Ətraflı"
-
-#: shell/e-activity-handler.c:202
-#, fuzzy
-msgid "Cancel Operation"
-msgstr "Görüşü Ləğv Et"
-
-#: shell/e-local-storage.c:175 shell/e-shortcuts.c:1053
-#, fuzzy
-msgid "Inbox"
-msgstr "mbox"
-
-#: shell/e-local-storage.c:176
-#, fuzzy
-msgid "Outbox"
-msgstr "mbox"
-
-#: shell/e-local-storage.c:624
-#, fuzzy
-msgid "Local Folders"
-msgstr "Xüsusi Cərgələr"
-
-#: shell/e-setup.c:125
-msgid "Evolution installation"
-msgstr "Evolution qurulması"
-
-#: shell/e-setup.c:129
-msgid ""
-"This new version of Evolution needs to install additional files\n"
-"into your personal Evolution directory"
-msgstr ""
-"Evolutionun bu yeni qurulmasının şəxsi Evolution qovluğuna\n"
-"bə'zi əlavə fayllar köçürməlidir"
-
-#: shell/e-setup.c:130
-msgid "Please click \"OK\" to install the files, or \"Cancel\" to exit."
-msgstr ""
-"Lütfən \"Oldu\"'ya tıqlayıb, faylları qurun, ya da \"Ləğv Et\"ə basaraq "
-"çıxın."
-
-#: shell/e-setup.c:170
-msgid "Could not update files correctly"
-msgstr "Fayllar düzgün güncəllənə bilmədi"
-
-#: shell/e-setup.c:193
-#, c-format
-msgid ""
-"Cannot create the directory\n"
-"%s\n"
-"Error: %s"
-msgstr ""
-"%s qovluğunu yarada bilmədim\n"
-"\n"
-"Xəta : %s"
-
-#: shell/e-setup.c:208
-#, fuzzy, c-format
-msgid ""
-"An error occurred in copying files into\n"
-"`%s'."
-msgstr "Faylı oxurkən bir xəta oldu ."
-
-#: shell/e-setup.c:282
-#, c-format
-msgid ""
-"The file `%s' is not a directory.\n"
-"Please move it in order to allow installation\n"
-"of the Evolution user files."
-msgstr ""
-"`%s' bir qovluq deyildir.\n"
-"\"Evolution\" istifadəçi fayllarınin qurulması\n"
-"üçün onu sil."
-
-#: shell/e-setup.c:296
-msgid ""
-"Evolution has detected an old\n"
-"Executive-Summary directory.\n"
-"This needs to be removed before\n"
-"Evolution will run.\n"
-"Do you want me to remove this directory?"
-msgstr ""
-
-#: shell/e-setup.c:321
-#, c-format
-msgid ""
-"The directory `%s' exists but is not the\n"
-"Evolution directory. Please move it in order\n"
-"to allow installation of the Evolution user files."
-msgstr ""
-"`%s' qovluğu mövcuddur, amma\n"
-"\"Evolution\" qovluğunda yerləşmir. \"Evolution\" \n"
-"istifadəçi fayllarınin qurulması üçün onu sil."
-
-#: shell/e-shell-folder-commands.c:176
-#, fuzzy
-msgid "Cannot move a folder over itself."
-msgstr "Qovluq alına bilmədi: %s: %s"
-
-#: shell/e-shell-folder-commands.c:178
-#, fuzzy
-msgid "Cannot copy a folder over itself."
-msgstr ""
-"Faylları `%s''yə\n"
-"köçürdə bilmədim ."
-
-#: shell/e-shell-folder-commands.c:192
-msgid "Cannot move a folder into one of its descendants."
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:312
-#, c-format
-msgid "Specify a folder to copy folder \"%s\" into:"
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:317
-#, fuzzy
-msgid "Copy folder"
-msgstr "Qovluğa Köçürt"
-
-#: shell/e-shell-folder-commands.c:359
-#, c-format
-msgid "Specify a folder to move folder \"%s\" into:"
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:364
-#, fuzzy
-msgid "Move folder"
-msgstr "Qovluğa Köçür"
-
-#: shell/e-shell-folder-commands.c:390
-#, fuzzy, c-format
-msgid ""
-"Cannot delete folder:\n"
-"%s"
-msgstr ""
-"`%s' qovluğu silinə bilmir:\n"
-"%s"
-
-#: shell/e-shell-folder-commands.c:406
-#, fuzzy, c-format
-msgid "Delete \"%s\""
-msgstr "Sil"
-
-#. "Are you sure..." label
-#: shell/e-shell-folder-commands.c:416
-#, fuzzy, c-format
-msgid "Are you sure you want to remove the \"%s\" folder?"
-msgstr "Bu `%s' vəzifəsini həqiqətən də silmək istəyirsiniz?"
-
-#: shell/e-shell-folder-commands.c:470
-#, fuzzy, c-format
-msgid ""
-"Cannot rename folder:\n"
-"%s"
-msgstr ""
-"`%s' qovluğu silinə bilmir:\n"
-"%s"
-
-#: shell/e-shell-folder-commands.c:503
-#, fuzzy, c-format
-msgid "Rename the \"%s\" folder to:"
-msgstr "%s qovluğu açılır"
-
-#: shell/e-shell-folder-commands.c:506
-#, fuzzy
-msgid "Rename folder"
-msgstr "%s qovluğu açılır"
-
-#: shell/e-shell-folder-creation-dialog.c:111
-#, c-format
-msgid ""
-"Cannot create the specified folder:\n"
-"%s"
-msgstr ""
-"Bildirilən qovluq yaradıla bilmədi:\n"
-"%s"
-
-#: shell/e-shell-folder-creation-dialog.c:126
-#, fuzzy
-msgid "No folder name specified."
-msgstr "Alıcı bildirilməyib"
-
-#: shell/e-shell-folder-creation-dialog.c:132
-msgid "Folder name cannot contain the Return character."
-msgstr ""
-
-#: shell/e-shell-folder-creation-dialog.c:137
-#, fuzzy
-msgid "Folder cannot contain the directory separator."
-msgstr "Ön yaddaş qovluğunu aça bilmədim: %s"
-
-#: shell/e-shell-folder-creation-dialog.c:142
-msgid "'.' and '..' are reserved folder names."
-msgstr ""
-
-#: shell/e-shell-folder-creation-dialog.c:180
-#, fuzzy, c-format
-msgid "The specified folder name is not valid: %s"
-msgstr "Bildirilən qovluq adı hökmlü deyildir ."
-
-#: shell/e-shell-folder-creation-dialog.c:300
-msgid "Evolution - Create new folder"
-msgstr "\"Evolution\" - Yeni qovluq yarat"
-
-#: shell/e-shell-folder-selection-dialog.c:99
-msgid ""
-"The type of the selected folder is not valid for\n"
-"the requested operation."
-msgstr ""
-"Bildirilən gediş üçün bu seçili qovluq növü \n"
-"hökmlü deyildir ."
-
-#: shell/e-shell-folder-selection-dialog.c:360
-msgid "New..."
-msgstr "Yeni ..."
-
-#: shell/e-shell-folder-title-bar.c:585 shell/e-shell-folder-title-bar.c:586
-msgid "(Untitled)"
-msgstr "( Adsız )"
-
-#: shell/e-shell-importer.c:141
-msgid "Choose the type of importer to run"
-msgstr ""
-
-#: shell/e-shell-importer.c:144
-msgid ""
-"Choose the file that you want to import into Evolution, and select what type "
-"of file it is from the list.\n"
-"\n"
-"You can select \"Automatic\" if you do not know, and Evolution will attempt "
-"to work it out."
-msgstr ""
-"\"Evolution\" içinə almaq istədiyiniz faylı seçin. Aşağıdakı siyahıdan "
-"alacağınız faylın növünü də seçin.\n"
-"\n"
-"Əgər təsəvvürünüz yoxdursa \"Avtomatik\" seçənəyini seçin, \"Evolution\" özü "
-"bildiyi kimi edər."
-
-#: shell/e-shell-importer.c:150
-msgid "Please select the information that you would like to import"
-msgstr ""
-
-#. Importer isn't ready yet.
-#. Wait 5 seconds and try again.
-#: shell/e-shell-importer.c:242
-#, c-format
-msgid ""
-"Importing %s\n"
-"Importer not ready.\n"
-"Waiting 5 seconds to retry."
-msgstr ""
-"%s Alınır\n"
-"Alıcı hazır deyil.\n"
-"Yenidən sınamaq üçün 5 saniyə gözlənir."
-
-#: shell/e-shell-importer.c:262 shell/e-shell-importer.c:293
-#, c-format
-msgid ""
-"Importing %s\n"
-"Importing item %d."
-msgstr ""
-"%s Alınır\n"
-"%d üzvü alınır."
-
-#: shell/e-shell-importer.c:396
-#, fuzzy, c-format
-msgid "File %s does not exist"
-msgstr "`%s' faylı yoxdur ."
-
-#: shell/e-shell-importer.c:408
-msgid "You may only import to local folders"
-msgstr ""
-
-#: shell/e-shell-importer.c:423
-#, c-format
-msgid ""
-"There is no importer that is able to handle\n"
-"%s"
-msgstr ""
-"İş görəcək alıcı mövcud deyildir\n"
-"%s"
-
-#: shell/e-shell-importer.c:433
-msgid "Importing"
-msgstr "Alınır"
-
-#: shell/e-shell-importer.c:441
-#, c-format
-msgid ""
-"Importing %s.\n"
-"Starting %s"
-msgstr ""
-"%s Alınır.\n"
-"%s Başladılır"
-
-#: shell/e-shell-importer.c:454
-#, c-format
-msgid "Error starting %s"
-msgstr "%s başladırkən xəta oldu"
-
-#: shell/e-shell-importer.c:473
-#, c-format
-msgid "Error loading %s"
-msgstr "%s yüklənərkən xəta oldu"
-
-#: shell/e-shell-importer.c:490
-#, c-format
-msgid ""
-"Importing %s\n"
-"Importing item 1."
-msgstr ""
-"%s Alınır\n"
-"Alınan üzv 1."
-
-#: shell/e-shell-importer.c:560
-msgid "Automatic"
-msgstr "Avtomatik"
-
-#: shell/e-shell-importer.c:611
-msgid "Filename:"
-msgstr "Fayl adı:"
-
-#: shell/e-shell-importer.c:616
-msgid "Select a file"
-msgstr "Fayl seç"
-
-#: shell/e-shell-importer.c:626
-msgid "File type:"
-msgstr "Fayl növü:"
-
-#: shell/e-shell-importer.c:651
-msgid "Import data and settings from older programs"
-msgstr ""
-
-#: shell/e-shell-importer.c:655
-#, fuzzy
-msgid "Import a single file"
-msgstr "Xarici fayl şəklini idxal et"
-
-#: shell/e-shell-importer.c:720 shell/e-shell-startup-wizard.c:582
-msgid ""
-"Please wait...\n"
-"Scanning for existing setups"
-msgstr ""
-
-#: shell/e-shell-importer.c:721 shell/e-shell-startup-wizard.c:585
-msgid "Starting Intelligent Importers"
-msgstr ""
-
-#: shell/e-shell-importer.c:840 shell/e-shell-startup-wizard.c:703
-#, fuzzy, c-format
-msgid "From %s:"
-msgstr "Göndərən:"
-
-#: shell/e-shell-importer.c:1003
-#, fuzzy
-msgid "Select folder"
-msgstr "Qovluq Seçin"
-
-#: shell/e-shell-importer.c:1004
-msgid "Select a destination folder for importing this data"
-msgstr ""
-
-#: shell/e-shell-importer.c:1116 shell/importer/intelligent.c:194
-msgid "Import"
-msgstr "Al"
-
-#: shell/e-shell-offline-handler.c:562
-msgid "Closing connections..."
-msgstr ""
-
-#: shell/e-shell-startup-wizard.c:159
-#, c-format
-msgid ""
-"Could not start the Evolution Mailer Wizard interface\n"
-"%s"
-msgstr ""
-
-#: shell/e-shell-startup-wizard.c:168
-#, fuzzy
-msgid "Cannot initialize the Evolution Mailer Wizard interface"
-msgstr "Evolutionun ePoçt parçasını başlada bilmədim ."
-
-#: shell/e-shell-startup-wizard.c:745
-msgid ""
-"Please select the information\n"
-"that you would like to import"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:201
-msgid "Bug buddy was not found in your $PATH."
-msgstr "Bug-buddy $PATH yolunda tapıla bilmədi."
-
-#: shell/e-shell-view-menu.c:209
-msgid "Bug buddy could not be run."
-msgstr "\"Bug-buddy\" işə salına bilmədi."
-
-#: shell/e-shell-view-menu.c:235
-#, fuzzy
-msgid "Ximian Evolution"
-msgstr "Evolution"
-
-#: shell/e-shell-view-menu.c:237
-msgid "Copyright 1999, 2000, 2001 Ximian, Inc."
-msgstr "Təlif haqqı 1999, 2000, 2001 Helix Code, Inc."
-
-#: shell/e-shell-view-menu.c:239
-#, fuzzy
-msgid ""
-"Ximian Evolution is a suite of groupware applications\n"
-"for mail, calendaring, and contact management\n"
-"within the GNOME desktop environment."
-msgstr ""
-"\"Evolution\" GNOME masa üstü üçün gözəl bir ePoçt, \n"
-"təqvim və əlaqələr idarə proqramıdır."
-
-#: shell/e-shell-view-menu.c:442
-msgid "Go to folder..."
-msgstr "Qovluğa get ..."
-
-#: shell/e-shell-view-menu.c:443
-msgid "Select the folder that you want to open"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:563
-#, fuzzy
-msgid "Create a new shortcut"
-msgstr "Yeni bir qısa yol qrupu yarat"
-
-#: shell/e-shell-view-menu.c:564
-msgid "Select the folder you want the shortcut to point to:"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:595
-msgid "The GNOME Pilot tools do not appear to be installed on this system."
-msgstr ""
-
-#: shell/e-shell-view-menu.c:603
-#, fuzzy, c-format
-msgid "Error executing %s."
-msgstr "İşə salıcı süzgəc xətası: %s: %s"
-
-#: shell/e-shell-view-menu.c:705
-#, fuzzy
-msgid "Work Online"
-msgstr "Xətdə İşlə"
-
-#: shell/e-shell-view-menu.c:718 shell/e-shell-view-menu.c:731
-#: ui/evolution.xml.h:30
-msgid "Work Offline"
-msgstr "Xətdən Qopuq İşlə"
-
-#: shell/e-shell-view.c:214
-msgid "(No folder displayed)"
-msgstr "( Heç bir qovluq göstərilmir )"
-
-#: shell/e-shell-view.c:1512
-#, c-format
-msgid "%s (%d)"
-msgstr ""
-
-#: shell/e-shell-view.c:1514
-#, fuzzy
-msgid "(None)"
-msgstr "( Adsızdır )"
-
-#: shell/e-shell-view.c:1519
-#, fuzzy, c-format
-msgid "%s - Ximian Evolution %s"
-msgstr "%s - Evolution %s"
-
-#: shell/e-shell-view.c:1521
-#, fuzzy, c-format
-msgid "%s - Ximian Evolution %s [%s]"
-msgstr "%s - Evolution %s [%s]"
-
-#: shell/e-shell-view.c:1561
-msgid ""
-"Ximian Evolution is currently online. Click on this button to work offline."
-msgstr ""
-
-#: shell/e-shell-view.c:1568
-msgid "Ximian Evolution is in the process of going offline."
-msgstr ""
-
-#: shell/e-shell-view.c:1574
-msgid ""
-"Ximian Evolution is currently offline. Click on this button to work online."
-msgstr ""
-
-#: shell/e-shell.c:562
-#, c-format
-msgid "Cannot set up local storage -- %s"
-msgstr "Yerli qeydi quraşdıra bilmədim -- %s"
-
-#: shell/e-shell.c:1488
-#, fuzzy, c-format
-msgid ""
-"Ooops! The views for `%s' have died unexpectedly. :-(\n"
-"This probably means that the %s component has crashed."
-msgstr ""
-"Vaxsey! `%s' nümayişi gözlənilməz şəkildə sonlandı. :-(\n"
-"Bu, %s qisminin çökdüyünə işarət edir."
-
-#: shell/e-shell.c:1692 widgets/misc/e-cell-date-edit.c:248
-msgid "OK"
-msgstr "Oldu"
-
-#: shell/e-shell.c:1694
-#, fuzzy
-msgid "Invalid arguments"
-msgstr "Hökmsüz ismarıc mövtəviyyatı"
-
-#: shell/e-shell.c:1696
-#, fuzzy
-msgid "Cannot register on OAF"
-msgstr "Nüsxəni qabıq ilə qeyd edə bilmədim"
-
-#: shell/e-shell.c:1698
-msgid "Configuration Database not found"
-msgstr ""
-
-#: shell/e-shell.c:1700 shell/e-storage.c:496
-msgid "Generic error"
-msgstr "Ümumi xəta"
-
-#: shell/e-shortcuts-view.c:75
-msgid "Create new shortcut group"
-msgstr "Yeni bir qısa yol qrupu yarat"
-
-#: shell/e-shortcuts-view.c:76
-msgid "Group name:"
-msgstr "Qrup adı :"
-
-#: shell/e-shortcuts-view.c:176
-#, c-format
-msgid ""
-"Do you really want to remove group\n"
-"`%s' from the shortcut bar?"
-msgstr ""
-"`%s' Qrupunu qısa yol çubuğundan həqiqətən \n"
-"də silmək istəyisiniz?"
-
-#: shell/e-shortcuts-view.c:181
-msgid "Don't remove"
-msgstr "Silmə"
-
-#: shell/e-shortcuts-view.c:210
-#, fuzzy
-msgid "Rename Shortcut Group"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:211
-#, fuzzy
-msgid "Rename selected shortcut group to:"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:225
-msgid "_Small Icons"
-msgstr "_Kiçik Timsallar"
-
-#: shell/e-shortcuts-view.c:226
-msgid "Show the shortcuts as small icons"
-msgstr "Qısa yolları kiçik timsallar olaraq göstər"
-
-#: shell/e-shortcuts-view.c:228
-msgid "_Large Icons"
-msgstr "_Böyük Timsallar"
-
-#: shell/e-shortcuts-view.c:229
-msgid "Show the shortcuts as large icons"
-msgstr "Qısa yolları böyük timsallar olaraq göstər"
-
-#: shell/e-shortcuts-view.c:240
-msgid "_New Group..."
-msgstr "_Yeni Qrup..."
-
-#: shell/e-shortcuts-view.c:241
-msgid "Create a new shortcut group"
-msgstr "Yeni bir qısa yol qrupu yarat"
-
-#: shell/e-shortcuts-view.c:243
-#, fuzzy
-msgid "_Remove this Group..."
-msgstr "Bu Qrupu _Sil..."
-
-#: shell/e-shortcuts-view.c:244
-msgid "Remove this shortcut group"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:246
-#, fuzzy
-msgid "Re_name this Group..."
-msgstr "Bu Qrupu _Sil..."
-
-#: shell/e-shortcuts-view.c:247
-#, fuzzy
-msgid "Rename this shortcut group"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:252
-msgid "_Hide the Shortcut Bar"
-msgstr "Qısa yol Çubuğunu _Gizlət"
-
-#: shell/e-shortcuts-view.c:253
-msgid "Hide the shortcut bar"
-msgstr "Qısa yol Çubuğunu Gizlət"
-
-#: shell/e-shortcuts-view.c:372
-#, fuzzy
-msgid "Rename shortcut"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:373
-#, fuzzy
-msgid "Rename selected shortcut to:"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:385
-msgid "Open the folder linked to this shortcut"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:387 ui/evolution.xml.h:19
-#, fuzzy
-msgid "Open in New _Window"
-msgstr "Yeni Pəncərədə Aç"
-
-#: shell/e-shortcuts-view.c:387
-#, fuzzy
-msgid "Open the folder linked to this shortcut in a new window"
-msgstr "Güncəl ismarıcları yeni pəncərədə aç"
-
-#: shell/e-shortcuts-view.c:390
-#, fuzzy
-msgid "_Rename"
-msgstr "Qayda adı :"
-
-#: shell/e-shortcuts-view.c:390
-#, fuzzy
-msgid "Rename this shortcut"
-msgstr "Bu qısa yol qrupunusil"
-
-#: shell/e-shortcuts-view.c:392
-#, fuzzy
-msgid "Re_move"
-msgstr "Sil"
-
-#: shell/e-shortcuts-view.c:392
-msgid "Remove this shortcut from the shortcut bar"
-msgstr "Bu qısa yolu qısa yol çubuğundan sil"
-
-#: shell/e-shortcuts.c:641
-msgid "Error saving shortcuts."
-msgstr "Qısa yolları qeyd edərkən xəta oldu."
-
-#: shell/e-shortcuts.c:1044
-#, fuzzy
-msgid "Shortcuts"
-msgstr "_Qısa Yol Çubuğu"
-
-#: shell/e-storage-set-view.c:645
-#, fuzzy, c-format
-msgid ""
-"Cannot transfer folder:\n"
-"%s"
-msgstr ""
-"`%s' qovluğu silinə bilmir:\n"
-"%s"
-
-#: shell/e-storage.c:182 shell/e-storage.c:188
-msgid "(No name)"
-msgstr "( Adsızdır )"
-
-#: shell/e-storage.c:494
-msgid "No error"
-msgstr "Xəta yoxdur"
-
-#: shell/e-storage.c:498
-msgid "A folder with the same name already exists"
-msgstr "Eyni adlı bir qovluq onsuz da var"
-
-#: shell/e-storage.c:500
-msgid "The specified folder type is not valid"
-msgstr "Bildirilən qovluq növü hökmlü deyildir"
-
-#: shell/e-storage.c:502
-msgid "I/O error"
-msgstr "G/Ç xətası"
-
-#: shell/e-storage.c:504
-msgid "Not enough space to create the folder"
-msgstr "Qovluğu yaratmaq üçün lazımi disk sahəsi yoxdur"
-
-#: shell/e-storage.c:506
-msgid "The specified folder was not found"
-msgstr "Bildirilən qovluq tapıla bilmədi"
-
-#: shell/e-storage.c:508
-msgid "Function not implemented in this storage"
-msgstr "Funksiya yazılmamışdır"
-
-#: shell/e-storage.c:512
-msgid "Operation not supported"
-msgstr "Əməliyyat dəstəklənmir"
-
-#: shell/e-storage.c:514
-msgid "The specified type is not supported in this storage"
-msgstr "Bu qeydlərdə müəyyənləşdirilən növ dəstəklənmir"
-
-#: shell/e-storage.c:516
-#, fuzzy
-msgid "The specified folder cannot be modified or removed"
-msgstr "Bildirilən qovluq tapıla bilmədi"
-
-#: shell/e-storage.c:518
-msgid "Cannot make a folder a child of one of its descendants"
-msgstr ""
-
-#: shell/e-task-widget.c:192
-#, c-format
-msgid "%s (...)"
-msgstr ""
-
-#: shell/e-task-widget.c:197
-#, fuzzy, c-format
-msgid "%s (%d%% complete)"
-msgstr "% _Qurtardı:"
-
-#: shell/glade/e-active-connection-dialog.glade.h:1
-#, fuzzy
-msgid "Active connections"
-msgstr "Daxil edən hər hansı üzv"
-
-#: shell/glade/e-active-connection-dialog.glade.h:2
-msgid "Click OK to close these connections and go offline"
-msgstr ""
-
-#: shell/glade/e-active-connection-dialog.glade.h:3
-#, fuzzy
-msgid "Host"
-msgstr "Ev Sahibi:"
-
-#: shell/glade/e-active-connection-dialog.glade.h:4
-msgid "The following connections are currently active:"
-msgstr ""
-
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:1
-msgid "Folder name:"
-msgstr "Qovluq adı:"
-
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:2
-msgid "Folder type:"
-msgstr "Qovluq növü:"
-
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:3
-msgid "Specify where to create the folder:"
-msgstr "Qovluğun yaradılacağı yeri göstərin:"
-
-#: shell/glade/evolution-startup-wizard.glade.h:3
-msgid "First Run Setup Assistant"
-msgstr ""
-
-#: shell/glade/evolution-startup-wizard.glade.h:5
-#, fuzzy
-msgid "Importing Data"
-msgstr "Alınır"
-
-#: shell/glade/evolution-startup-wizard.glade.h:8
-#, fuzzy
-msgid "Setup Assistant"
-msgstr "Köməkçi"
-
-#: shell/glade/evolution-startup-wizard.glade.h:9
-#, fuzzy
-msgid "Timezone "
-msgstr ""
-"\n"
-"Zaman zolağı: "
-
-#: shell/glade/evolution-startup-wizard.glade.h:10
-msgid ""
-"Welcome to the Evolution first run setup assistant\n"
-"\n"
-"This assistant will help you get started"
-msgstr ""
-
-#: shell/glade/evolution-startup-wizard.glade.h:13
-#, fuzzy
-msgid "Your configuration is complete."
-msgstr "ePoçt Quraşdırılması"
-
-#: shell/importer/import.glade.h:1
-msgid "Click \"Import\" to begin importing the file into Evolution. "
-msgstr "Faylın \"Evolution\" içina alınması üçün \"Al\" düyməsini tıqlayın. "
-
-#: shell/importer/import.glade.h:2
-#, fuzzy
-msgid "Evolution Import Assistant"
-msgstr "\"Evolution\" Alma Vasitəsi"
-
-#: shell/importer/import.glade.h:3
-#, fuzzy
-msgid "Evolution Importer Assistant"
-msgstr "\"Evolution\" Alıcı Vasitəsi"
-
-#: shell/importer/import.glade.h:4
-#, fuzzy
-msgid "Import File (step 3 of 3)"
-msgstr "Fayl seç"
-
-#: shell/importer/import.glade.h:5
-msgid "Importer Type (step 1 of 3)"
-msgstr ""
-
-#: shell/importer/import.glade.h:6
-#, fuzzy
-msgid "Select Importers (step 2 of 3)"
-msgstr "Fayl seç"
-
-#: shell/importer/import.glade.h:7
-#, fuzzy
-msgid "Select a File (step 2 of 3)"
-msgstr "Fayl seç"
-
-#: shell/importer/import.glade.h:8
-#, fuzzy
-msgid ""
-"Welcome to the Evolution Import Assistant.\n"
-"With this assistant you will be guided through the process of\n"
-"importing external files into Evolution."
-msgstr ""
-"\"Evolution\" Alma Vasitəsinə Xoş Gəldiniz.\n"
-"Bu vasitə ila xarici faylları \"Evolution\" içinə\n"
-"alacaqsınız."
-
-#: shell/importer/intelligent.c:191
-#, fuzzy
-msgid "Importers"
-msgstr "Al"
-
-#: shell/importer/intelligent.c:197
-#, fuzzy
-msgid "Don't import"
-msgstr "Silmə"
-
-#: shell/importer/intelligent.c:199
-msgid "Don't ask me again"
-msgstr "Mənə bir də soruşma"
-
-#: shell/importer/intelligent.c:209
-#, fuzzy
-msgid "Evolution can import data from the following files:"
-msgstr "Məktub taşkilatcısı 'Evolution' parçası."
-
-#: shell/main.c:82
-#, fuzzy
-msgid "Evolution is now exiting ..."
-msgstr "_Məktub Qurğuları..."
-
-#: shell/main.c:153
-#, fuzzy, no-c-format
-msgid ""
-"Hi. Thanks for taking the time to download this preview release\n"
-"of the Ximian Evolution groupware suite.\n"
-"\n"
-"Ximian Evolution is not yet complete. It's getting close, but there are\n"
-"places where features are either missing or only half working. \n"
-"\n"
-"If you find bugs, please report them to us at bugzilla.ximian.com.\n"
-"This product comes with no warranty and is not intended for\n"
-"individuals prone to violent fits of anger.\n"
-"\n"
-"We hope that you enjoy the results of our hard work, and we\n"
-"eagerly await your contributions!\n"
-msgstr ""
-"Salam. \"Evolution\" NÜMAYİŞ buraxılışını sınamağa \n"
-"vaxt tapdığınız üçün minnətdarıq.\n"
-"\n"
-"\"Evolution\" hələ tamamilə azyılmayıb. Düzdür artıq sona çatırıq.\n"
-"Amma hələ də ediləcək bə'zi işlər var.\n"
-"\n"
-"Ağır bir işin nəticəsini bəyəndiyinizi ümid edib, sizin fikirlərinizi\n"
-"gözləyirik!\n"
-
-#: shell/main.c:174
-#, fuzzy
-msgid ""
-"Thanks\n"
-"The Ximian Evolution Team\n"
-msgstr ""
-"Minnətdarıq\n"
-"\"Evolution\" Dəstəsi\n"
-
-#: shell/main.c:231
-#, fuzzy
-msgid "Cannot access the Ximian Evolution shell."
-msgstr "\"Evolution\" qabığını başlada bilmədim ."
-
-#: shell/main.c:242
-#, fuzzy, c-format
-msgid "Cannot initialize the Ximian Evolution shell: %s"
-msgstr "\"Evolution\" qabığını başlada bilmədim ."
-
-#: shell/main.c:286
-msgid "Disable splash screen"
-msgstr "Açılış ekranını gösdərmə"
-
-#: shell/main.c:287
-msgid "Send the debugging output of all components to a file."
-msgstr "Bütün xəta ayıqlama verilənlərini bir fayla yazdır."
-
-#: shell/main.c:329
-msgid "Cannot initialize the Bonobo component system."
-msgstr "Bonobo parçalar sistemini başlada bilmədim."
-
-#: ui/evolution-addressbook.xml.h:2 ui/evolution-mail-message.xml.h:5
-#: ui/evolution-tasks.xml.h:3
-msgid "Copy"
-msgstr "Köçürt"
-
-#: ui/evolution-addressbook.xml.h:3 ui/evolution-calendar.xml.h:3
-msgid "Copy the selection"
-msgstr "Seçiləni köçürt"
-
-#: ui/evolution-addressbook.xml.h:4
-msgid "Create new contact"
-msgstr "Yeni bir hesab yarat"
-
-#: ui/evolution-addressbook.xml.h:5
-#, fuzzy
-msgid "Create new contact list"
-msgstr "Yeni bir hesab yarat"
-
-#: ui/evolution-addressbook.xml.h:6 ui/evolution-tasks.xml.h:6
-msgid "Cut"
-msgstr "Kəs"
-
-#: ui/evolution-addressbook.xml.h:7 ui/evolution-calendar.xml.h:10
-msgid "Cut the selection"
-msgstr "Seçiləni kəs"
-
-#: ui/evolution-addressbook.xml.h:9
-#, fuzzy
-msgid "Delete selected contacts"
-msgstr "Əlaqəni sil"
-
-#: ui/evolution-addressbook.xml.h:12
-#, fuzzy
-msgid "New List"
-msgstr "Xəbərlər"
-
-#: ui/evolution-addressbook.xml.h:13 ui/evolution-tasks.xml.h:11
-msgid "Paste"
-msgstr "Yapışdır"
-
-#: ui/evolution-addressbook.xml.h:14 ui/evolution-calendar.xml.h:23
-msgid "Paste the clipboard"
-msgstr "Ara yaddaşı yapışdır"
-
-#: ui/evolution-addressbook.xml.h:15
-#, fuzzy
-msgid "Previews the contacts to be printed"
-msgstr "Çap ediləcək təqvimi nümayiş etdirər"
-
-#: ui/evolution-addressbook.xml.h:18
-#, fuzzy
-msgid "Print selected contacts"
-msgstr "Əlaqələri çap et"
-
-#: ui/evolution-addressbook.xml.h:20
-#, fuzzy
-msgid "Save selected contacts as a VCard."
-msgstr "Əlaqəni sil"
-
-#: ui/evolution-addressbook.xml.h:21
-msgid "Select All"
-msgstr "Hamısını Seç"
-
-#: ui/evolution-addressbook.xml.h:22
-#, fuzzy
-msgid "Select all contacts"
-msgstr "Əlaqəni sil"
-
-#: ui/evolution-addressbook.xml.h:23 ui/evolution-contact-editor.xml.h:10
-#, fuzzy
-msgid "Send _Message to Contact..."
-msgstr "Əlaqəyə yeni bir _ismarıc göndər..."
-
-#: ui/evolution-addressbook.xml.h:24
-#, fuzzy
-msgid "Send a mess to the selected contacts."
-msgstr "Əlaqəni sil"
-
-#: ui/evolution-addressbook.xml.h:25
-msgid "Send message to contact"
-msgstr "Əlaqəyə yeni bir ismarıc göndər"
-
-#: ui/evolution-addressbook.xml.h:26
-#, fuzzy
-msgid "Send selected contacts to another person."
-msgstr "Əlaqəni başqasına göndər"
-
-#: ui/evolution-addressbook.xml.h:27
-msgid "Stop"
-msgstr "Dayan"
-
-#: ui/evolution-addressbook.xml.h:28
-msgid "Stop Loading"
-msgstr "Yükləməni Dayandır"
-
-#: ui/evolution-addressbook.xml.h:29 ui/evolution-calendar.xml.h:34
-#: ui/evolution-comp-editor.xml.h:17 ui/evolution-contact-editor.xml.h:11
-#: ui/evolution-contact-list-editor.xml.h:10 ui/evolution-event-editor.xml.h:9
-#: ui/evolution-mail-global.xml.h:18 ui/evolution-mail-list.xml.h:23
-#: ui/evolution-mail-message.xml.h:84 ui/evolution-mail-messagedisplay.xml.h:4
-#: ui/evolution-task-editor.xml.h:9
-msgid "_Actions"
-msgstr "_Gedişlər"
-
-#: ui/evolution-addressbook.xml.h:30
-msgid "_Addressbook Sources..."
-msgstr "_Ünvan Dəftəri Qaynağı..."
-
-#: ui/evolution-addressbook.xml.h:31
-msgid "_Contact"
-msgstr "_Əlaqə"
-
-#: ui/evolution-addressbook.xml.h:32
-#, fuzzy
-msgid "_Contact List"
-msgstr "_Əlaqə"
-
-#: ui/evolution-addressbook.xml.h:35 ui/evolution-contact-editor.xml.h:13
-#, fuzzy
-msgid "_Forward Contact..."
-msgstr "_Əlaqələr ..."
-
-#: ui/evolution-addressbook.xml.h:37 ui/evolution-calendar.xml.h:41
-#: ui/evolution-contact-editor.xml.h:14 ui/evolution-mail-message.xml.h:95
-#: ui/my-evolution.xml.h:7
-msgid "_Print..."
-msgstr "_Çap Et ..."
-
-#: ui/evolution-addressbook.xml.h:38
-#, fuzzy
-msgid "_Save as VCard"
-msgstr "VCard olaraq qeyd et"
-
-#: ui/evolution-addressbook.xml.h:39
-#, fuzzy
-msgid "_Search for Contacts"
-msgstr "Əlaqələri a_xtar"
-
-#: ui/evolution-addressbook.xml.h:40
-msgid "_Select All"
-msgstr "Hamısını Se_ç"
-
-#: ui/evolution-calendar.xml.h:2
-msgid "Configure the calendar's settings"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:4
-#, fuzzy
-msgid "Create a New All Day _Event"
-msgstr "Yeni bir bütün gün hadisəsi yarat"
-
-#: ui/evolution-calendar.xml.h:5
-#, fuzzy
-msgid "Create a New _Task"
-msgstr "Yeni bir vəzifə yarat"
-
-#: ui/evolution-calendar.xml.h:6
-#, fuzzy
-msgid "Create a _New Appointment"
-msgstr "Yeni bir iclas yarat"
-
-#: ui/evolution-calendar.xml.h:9
-msgid "Create an event for the whole day"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:11
-msgid "Day"
-msgstr "Gün"
-
-#: ui/evolution-calendar.xml.h:12
-#, fuzzy
-msgid "Delete the appointment"
-msgstr "Bu iclası sil"
-
-#: ui/evolution-calendar.xml.h:13 ui/evolution-mail-message.xml.h:38
-msgid "Go To"
-msgstr "Get"
-
-#: ui/evolution-calendar.xml.h:14
-#, fuzzy
-msgid "Go back"
-msgstr "Vaxtda geri get"
-
-#: ui/evolution-calendar.xml.h:15
-#, fuzzy
-msgid "Go forward"
-msgstr "Vaxtda irəli get"
-
-#: ui/evolution-calendar.xml.h:16
-msgid "Go to _Date"
-msgstr "_Tarixə Get"
-
-#: ui/evolution-calendar.xml.h:18
-msgid "Go to a specific date"
-msgstr "Xüsusi bir tarixə get"
-
-#: ui/evolution-calendar.xml.h:19
-#, fuzzy
-msgid "Go to today"
-msgstr "Günə Get"
-
-#: ui/evolution-calendar.xml.h:20
-#, fuzzy
-msgid "Month"
-msgstr "_Ay"
-
-#: ui/evolution-calendar.xml.h:21
-msgid "New Appointment"
-msgstr "Yeni İclas"
-
-#: ui/evolution-calendar.xml.h:22 ui/evolution-tasks.xml.h:10
-msgid "New Task"
-msgstr "Yeni Vəzifə"
-
-#: ui/evolution-calendar.xml.h:24
-msgid "Previews the calendar to be printed"
-msgstr "Çap ediləcək təqvimi nümayiş etdirər"
-
-#: ui/evolution-calendar.xml.h:25 ui/evolution-comp-editor.xml.h:9
-msgid "Print Pre_view"
-msgstr "Çap Etmə Nüma_yişi"
-
-#: ui/evolution-calendar.xml.h:26
-#, fuzzy
-msgid "Print this calendar"
-msgstr "Bu Təqvim çap et"
-
-#: ui/evolution-calendar.xml.h:27
-msgid "Publish Free/Busy information for this calendar"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:28
-#, fuzzy
-msgid "Show one day"
-msgstr "1 günü göstər"
-
-#: ui/evolution-calendar.xml.h:29
-#, fuzzy
-msgid "Show one month"
-msgstr "1 ayı göstər"
-
-#: ui/evolution-calendar.xml.h:30
-#, fuzzy
-msgid "Show one week"
-msgstr "2 həftəni öster"
-
-#: ui/evolution-calendar.xml.h:31
-msgid "Show the working week"
-msgstr "İş həftəsini göstər"
-
-#: ui/evolution-calendar.xml.h:32
-msgid "Week"
-msgstr "Həftə"
-
-#: ui/evolution-calendar.xml.h:35
-#, fuzzy
-msgid "_Appointment..."
-msgstr "İ_clas"
-
-#: ui/evolution-calendar.xml.h:36
-#, fuzzy
-msgid "_Calendar Settings..."
-msgstr "_Məktub Qurğuları..."
-
-#: ui/evolution-calendar.xml.h:42
-#, fuzzy
-msgid "_Publish Free/Busy Information"
-msgstr "İstənən Mə'lumatlar"
-
-#: ui/evolution-calendar.xml.h:43
-#, fuzzy
-msgid "_Task..."
-msgstr "_Vəzifə"
-
-#: ui/evolution-comp-editor.xml.h:2 ui/evolution-contact-editor.xml.h:1
-#: ui/evolution-contact-list-editor.xml.h:1
-#: ui/evolution-mail-messagedisplay.xml.h:1
-#: ui/evolution-message-composer.xml.h:3 ui/evolution-signature-editor.xml.h:1
-#: ui/evolution.xml.h:4
-msgid "Close"
-msgstr "Qapat"
-
-#: ui/evolution-comp-editor.xml.h:3
-#, fuzzy
-msgid "Close this item"
-msgstr "Bu üzvü sil"
-
-#: ui/evolution-comp-editor.xml.h:5 ui/evolution-contact-editor.xml.h:3
-msgid "Delete this item"
-msgstr "Bu üzvü sil"
-
-#: ui/evolution-comp-editor.xml.h:6 ui/evolution-mail-messagedisplay.xml.h:3
-#: ui/evolution.xml.h:16
-msgid "Main toolbar"
-msgstr "Ana vasitə çubuğu"
-
-#: ui/evolution-comp-editor.xml.h:7
-#, fuzzy
-msgid "Preview the printed item"
-msgstr "Çap ediləcək ismarıcı nümayiş etdirər"
-
-#: ui/evolution-comp-editor.xml.h:10 ui/evolution-contact-editor.xml.h:6
-msgid "Print this item"
-msgstr "Bu üzvü çap et"
-
-#: ui/evolution-comp-editor.xml.h:11
-msgid "Print..."
-msgstr "Çap Et ..."
-
-#: ui/evolution-comp-editor.xml.h:12 ui/evolution-contact-list-editor.xml.h:5
-#: ui/evolution-message-composer.xml.h:19
-#: ui/evolution-signature-editor.xml.h:3 widgets/misc/e-filter-bar.c:245
-msgid "Save"
-msgstr "Qeyd Et"
-
-#: ui/evolution-comp-editor.xml.h:14 ui/evolution-contact-editor.xml.h:8
-msgid "Save and Close"
-msgstr "Qeyd Et və Qapat"
-
-#: ui/evolution-comp-editor.xml.h:15
-#, fuzzy
-msgid "Save the item and close the dialog box"
-msgstr "Vəzifəni qeyd et və dialoqu qapat"
-
-#: ui/evolution-comp-editor.xml.h:16
-#, fuzzy
-msgid "Save this item to disk"
-msgstr "Görünüşü %s a(ə)dəyişdir"
-
-#: ui/evolution-comp-editor.xml.h:18 ui/evolution-contact-editor.xml.h:12
-#: ui/evolution-contact-list-editor.xml.h:11
-#: ui/evolution-mail-messagedisplay.xml.h:7
-#: ui/evolution-message-composer.xml.h:48
-#: ui/evolution-signature-editor.xml.h:7 ui/evolution-subscribe.xml.h:11
-#: ui/evolution.xml.h:36
-msgid "_File"
-msgstr "_Fayl"
-
-#: ui/evolution-contact-editor.xml.h:5
-msgid "Print En_velope..."
-msgstr "_Zərfi Çap Et..."
-
-#: ui/evolution-contact-editor.xml.h:7
-#: ui/evolution-contact-list-editor.xml.h:6
-#: ui/evolution-message-composer.xml.h:21
-msgid "Save _As..."
-msgstr "_Fərqli Qeyd Et ..."
-
-#: ui/evolution-contact-editor.xml.h:9
-msgid "Save the contact and close the dialog box"
-msgstr "Əlaqəni qeyd et və dialoqu qapat"
-
-#: ui/evolution-contact-editor.xml.h:15
-#: ui/evolution-contact-list-editor.xml.h:12
-#: ui/evolution-message-composer.xml.h:53
-#: ui/evolution-signature-editor.xml.h:10
-msgid "_Save"
-msgstr "_Qeyd Et ..."
-
-#: ui/evolution-contact-list-editor.xml.h:3
-#, fuzzy
-msgid "Delete this list"
-msgstr "Bu üzvü sil"
-
-#: ui/evolution-contact-list-editor.xml.h:4
-msgid "Delete..."
-msgstr "Sil..."
-
-#: ui/evolution-contact-list-editor.xml.h:7
-#, fuzzy
-msgid "Save the list and close the dialog box"
-msgstr "Vəzifəni qeyd et və dialoqu qapat"
-
-#: ui/evolution-contact-list-editor.xml.h:8
-#, fuzzy
-msgid "Se_nd list to other..."
-msgstr "Əlaqəni fərqli yerə gö_ndər..."
-
-#: ui/evolution-contact-list-editor.xml.h:9
-#, fuzzy
-msgid "Send _message to list..."
-msgstr "Əlaqəyə yeni bir _ismarıc göndər..."
-
-#: ui/evolution-event-editor.xml.h:1
-#, fuzzy
-msgid "Cancel Mee_ting"
-msgstr "Görüşü Ləğv Et"
-
-#: ui/evolution-event-editor.xml.h:2
-#, fuzzy
-msgid "Cancel the meeting for this item"
-msgstr "Bu cərgənin xüsusiyyətlərini dəyişdir"
-
-#: ui/evolution-event-editor.xml.h:3 ui/evolution-task-editor.xml.h:5
-#, fuzzy
-msgid "Forward as i_Calendar"
-msgstr "v_Calendar Şəklində Çatdır (FIXME)"
-
-#: ui/evolution-event-editor.xml.h:4 ui/evolution-task-editor.xml.h:6
-#, fuzzy
-msgid "Forward this item via email"
-msgstr "Bu ismarıcı çatdır"
-
-#: ui/evolution-event-editor.xml.h:5
-msgid "Obtain the latest meeting information"
-msgstr ""
-
-#: ui/evolution-event-editor.xml.h:6
-#, fuzzy
-msgid "Re_fresh Meeting"
-msgstr ""
-"Görüş\n"
-"İstə"
-
-#: ui/evolution-event-editor.xml.h:7
-msgid "Schedule _Meeting"
-msgstr "_Görüşləri Planlaşdır"
-
-#: ui/evolution-event-editor.xml.h:8
-#, fuzzy
-msgid "Schedule a meeting for this item"
-msgstr "Görüş Cədvəli"
-
-#: ui/evolution-executive-summary.xml.h:1
-#, fuzzy
-msgid "Customise My Evolution"
-msgstr "%s - Evolution %s"
-
-#: ui/evolution-mail-global.xml.h:1
-#, fuzzy
-msgid "Cancel"
-msgstr "Ləğv Edildi"
-
-#: ui/evolution-mail-global.xml.h:2
-#, fuzzy
-msgid "Cancel the current mail operation"
-msgstr "Hazırkı faylı qeyd et"
-
-#: ui/evolution-mail-global.xml.h:3
-#, fuzzy
-msgid "Compose _New Message"
-msgstr "Yeni bir ePoçt ismarıcı yaz"
-
-#: ui/evolution-mail-global.xml.h:4
-msgid "Create or edit mail accounts and other preferences"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:5
-msgid "Create or edit rules for filtering new mail"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:6
-msgid "Create or edit virtual folder definitions"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:7
-msgid "Empty _Trash"
-msgstr "Zibil qutusunu _boşalt"
-
-#: ui/evolution-mail-global.xml.h:8
-msgid "Forget _Passwords"
-msgstr "_Parolları Unut"
-
-#: ui/evolution-mail-global.xml.h:9
-msgid "Forget remembered passwords so you will be prompted for them again"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:10
-#, fuzzy
-msgid "New Message"
-msgstr "Sonrakı İsmarıc"
-
-#: ui/evolution-mail-global.xml.h:11
-msgid "Open a window for composing a mail message"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:12
-#, fuzzy
-msgid "Permanently remove all deleted messages from all folders"
-msgstr "Seçili ismarıcları başqa bir cərgəyə daşı"
-
-#: ui/evolution-mail-global.xml.h:13
-msgid "Send / Receive"
-msgstr "Al / Göndər"
-
-#: ui/evolution-mail-global.xml.h:14
-msgid "Send queued mail and retrieve new mail"
-msgstr "Sorğulanmış məktubu göndər və yeni məktubları al"
-
-#: ui/evolution-mail-global.xml.h:15
-msgid "Show message preview window"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:16
-msgid "Subscribe or unsubscribe to folders on remote servers"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:17
-msgid "Virtual Folder _Editor..."
-msgstr "Virtual Qovluq _Düzəldicisi..."
-
-#: ui/evolution-mail-global.xml.h:19
-msgid "_Filters..."
-msgstr "_Süzgəclər ..."
-
-#: ui/evolution-mail-global.xml.h:20
-msgid "_Mail Message"
-msgstr "_Məktub İsmarıcı"
-
-#: ui/evolution-mail-global.xml.h:21
-msgid "_Mail Settings..."
-msgstr "_Məktub Qurğuları..."
-
-#: ui/evolution-mail-global.xml.h:22
-#, fuzzy
-msgid "_Preview Pane"
-msgstr "Nümayiş"
-
-#: ui/evolution-mail-global.xml.h:23
-msgid "_Send / Receive"
-msgstr "_Göndər / Al"
-
-#: ui/evolution-mail-global.xml.h:24
-#, fuzzy
-msgid "_Subscribe to Folders..."
-msgstr "\"%s\" qovluğuna qeydiyyat aparılır"
-
-#: ui/evolution-mail-list.xml.h:1
-msgid "Change the properties of this folder"
-msgstr "Bu cərgənin xüsusiyyətlərini dəyişdir"
-
-#: ui/evolution-mail-list.xml.h:2
-#, fuzzy
-msgid "Copy selected messages"
-msgstr "Seçili ismarıcları sil"
-
-#: ui/evolution-mail-list.xml.h:3
-#, fuzzy
-msgid "Cu_t"
-msgstr "Kəs"
-
-#: ui/evolution-mail-list.xml.h:4
-#, fuzzy
-msgid "Cut selected messages"
-msgstr "Seçili ismarıcları sil"
-
-#: ui/evolution-mail-list.xml.h:5
-msgid "Hide S_elected Messages"
-msgstr "S_eçili İsmarıcları Gizlət"
-
-#: ui/evolution-mail-list.xml.h:6
-msgid "Hide _Deleted Messages"
-msgstr "_Silinmiş İsmarıcları Gizlət"
-
-#: ui/evolution-mail-list.xml.h:7
-#, fuzzy
-msgid "Hide _Read Messages"
-msgstr "_Oxunmuş İsmarıcları Gizlət"
-
-#: ui/evolution-mail-list.xml.h:8
-msgid ""
-"Hide deleted messages rather than displaying them with a line through them"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:9
-msgid "Mark All as R_ead"
-msgstr "Hamısını O_xunmış olaraq İşarətlə"
-
-#: ui/evolution-mail-list.xml.h:10
-#, fuzzy
-msgid "Mark all visible messages as read"
-msgstr "İşarətlə"
-
-#: ui/evolution-mail-list.xml.h:11
-#, fuzzy
-msgid "Paste message in the clipboard"
-msgstr "Ara yaddaşı yapışdır"
-
-#: ui/evolution-mail-list.xml.h:12
-#, fuzzy
-msgid "Permanently remove all deleted messages from this folder"
-msgstr "Seçili ismarıcları başqa bir cərgəyə daşı"
-
-#: ui/evolution-mail-list.xml.h:13 ui/evolution-subscribe.xml.h:6
-msgid "Select _All"
-msgstr "_Hamısını Seç"
-
-#: ui/evolution-mail-list.xml.h:14
-msgid "Select _Thread"
-msgstr "İl_gəyi Seç"
-
-#: ui/evolution-mail-list.xml.h:15
-msgid "Select all and only the messages that are not currently selected"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:16
-msgid "Select all messages in the same thread as the selected message"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:17
-#, fuzzy
-msgid "Select all visible messages"
-msgstr "Seçili ismarıcları sil"
-
-#: ui/evolution-mail-list.xml.h:18
-#, fuzzy
-msgid "Sh_ow Hidden Messages"
-msgstr "_Oxunmuş İsmarıcları Gizlət"
-
-#: ui/evolution-mail-list.xml.h:19
-msgid "Show messages that have been temporarily hidden"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:20
-#, fuzzy
-msgid "Temporarily hide all messages that have already been read"
-msgstr "İşarətlə"
-
-#: ui/evolution-mail-list.xml.h:21
-#, fuzzy
-msgid "Temporarily hide the selected messages"
-msgstr "Seçili ismarıcları sil"
-
-#: ui/evolution-mail-list.xml.h:22
-msgid "Threaded Message list"
-msgstr "İlgək_lənmiş İsmarıclar Siyahısı"
-
-#: ui/evolution-mail-list.xml.h:26
-msgid "_Expunge"
-msgstr "_Təmizlə"
-
-#: ui/evolution-mail-list.xml.h:27 ui/evolution.xml.h:37
-msgid "_Folder"
-msgstr "_Qovluq"
-
-#: ui/evolution-mail-list.xml.h:28 ui/evolution-subscribe.xml.h:12
-msgid "_Invert Selection"
-msgstr "Seçkiyi _Tərs Çevir"
-
-#: ui/evolution-mail-list.xml.h:30
-msgid "_Properties..."
-msgstr "_Seçənəklər..."
-
-#: ui/evolution-mail-list.xml.h:31
-#, fuzzy
-msgid "_Threaded Message List"
-msgstr "İlgək_lənmiş İsmarıclar Siyahısı"
-
-#: ui/evolution-mail-message.xml.h:1
-#, fuzzy
-msgid "Apply filter rules to the selected messages"
-msgstr "Seçili ismarıcları sil"
-
-#: ui/evolution-mail-message.xml.h:2
-#, fuzzy
-msgid "Compose a reply to all of the recipients of the selected message"
-msgstr "İsmarıcın bütün alıcılarına cavab ver"
-
-#: ui/evolution-mail-message.xml.h:3
-msgid "Compose a reply to the mailing list of the selected message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:4
-#, fuzzy
-msgid "Compose a reply to the sender of the selected message"
-msgstr "İsmarıcı göndərene cavab ver"
-
-#: ui/evolution-mail-message.xml.h:6
-msgid "Copy selected messages to another folder"
-msgstr "Seçili ismarıcları başqa cərgəyə köçür"
-
-#: ui/evolution-mail-message.xml.h:7
-msgid "Create _Virtual Folder From Message"
-msgstr "İsmarıcdan _Virtual Qovluq Yarat"
-
-#: ui/evolution-mail-message.xml.h:8
-msgid "Create a rule to filter messages from this sender"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:9
-msgid "Create a rule to filter messages to these recipients"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:10
-msgid "Create a rule to filter messages to this mailing list"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:11
-msgid "Create a rule to filter messages with this subject"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:12
-#, fuzzy
-msgid "Create a virtual folder for these recipients"
-msgstr "İsmarıcdan _Virtual Qovluq Yarat"
-
-#: ui/evolution-mail-message.xml.h:13
-#, fuzzy
-msgid "Create a virtual folder for this mailing list"
-msgstr "İsmarıcdan _Virtual Qovluq Yarat"
-
-#: ui/evolution-mail-message.xml.h:14
-#, fuzzy
-msgid "Create a virtual folder for this sender"
-msgstr "İsmarıcdan _Virtual Qovluq Yarat"
-
-#: ui/evolution-mail-message.xml.h:15
-#, fuzzy
-msgid "Create a virtual folder for this subject"
-msgstr "İsmarıcdan _Virtual Qovluq Yarat"
-
-#: ui/evolution-mail-message.xml.h:17
-#, fuzzy
-msgid "Display the next important message"
-msgstr "İsmarıcı göndərene cavab ver"
-
-#: ui/evolution-mail-message.xml.h:18
-#, fuzzy
-msgid "Display the next message"
-msgstr "Sonrakı ismarıca get"
-
-#: ui/evolution-mail-message.xml.h:19
-#, fuzzy
-msgid "Display the next unread message"
-msgstr "Seçili ismarıcları sil"
-
-#: ui/evolution-mail-message.xml.h:20
-msgid "Display the next unread thread"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:21
-#, fuzzy
-msgid "Display the previous important message"
-msgstr "Əvvəlki ismarıca get"
-
-#: ui/evolution-mail-message.xml.h:22
-#, fuzzy
-msgid "Display the previous message"
-msgstr "Əvvəlki ismarıca get"
-
-#: ui/evolution-mail-message.xml.h:23
-#, fuzzy
-msgid "Display the previous unread message"
-msgstr "Əvvəlki ismarıca get"
-
-#: ui/evolution-mail-message.xml.h:24
-#, fuzzy
-msgid "Filter on Mailing _List..."
-msgstr "Məktublaşma Q_rupundakı Süzgəc"
-
-#: ui/evolution-mail-message.xml.h:25
-#, fuzzy
-msgid "Filter on Se_nder..."
-msgstr "Gö_ndərənə görə Süz"
-
-#: ui/evolution-mail-message.xml.h:26
-#, fuzzy
-msgid "Filter on _Recipients..."
-msgstr "Alı_cıya görə Süz"
-
-#: ui/evolution-mail-message.xml.h:27
-#, fuzzy
-msgid "Filter on _Subject..."
-msgstr "Möv_zuya görə Süz"
-
-#: ui/evolution-mail-message.xml.h:28
-msgid "Force images in HTML mail to be loaded"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:29
-msgid "Forward"
-msgstr "Çatdır"
-
-#: ui/evolution-mail-message.xml.h:30
-msgid "Forward As"
-msgstr "Fərqli Çatdır"
-
-#: ui/evolution-mail-message.xml.h:31
-#, fuzzy
-msgid "Forward _Attached"
-msgstr "Fərqli Çatdır"
-
-#: ui/evolution-mail-message.xml.h:32
-#, fuzzy
-msgid "Forward _Inline"
-msgstr "_Həmən çatdır"
-
-#: ui/evolution-mail-message.xml.h:33
-#, fuzzy
-msgid "Forward _Quoted"
-msgstr "_Həmən çatdır"
-
-#: ui/evolution-mail-message.xml.h:34
-#, fuzzy
-msgid "Forward the selected message in the body of a new message"
-msgstr "Seçili ePoçtu birinə çatdır"
-
-#: ui/evolution-mail-message.xml.h:35
-#, fuzzy
-msgid "Forward the selected message quoted like a reply"
-msgstr "Seçili ePoçtu birinə çatdır"
-
-#: ui/evolution-mail-message.xml.h:36
-#, fuzzy
-msgid "Forward the selected message to someone"
-msgstr "Seçili ePoçtu birinə çatdır"
-
-#: ui/evolution-mail-message.xml.h:37
-#, fuzzy
-msgid "Forward the selected message to someone as an attachment"
-msgstr "Seçili ePoçtu birinə çatdır"
-
-#: ui/evolution-mail-message.xml.h:39
-#, fuzzy
-msgid "Load _Images"
-msgstr "Çatdırılmış ismarıc"
-
-#: ui/evolution-mail-message.xml.h:41
-#, fuzzy
-msgid "Mark as I_mportant"
-msgstr "Vacib"
-
-#: ui/evolution-mail-message.xml.h:43
-#, fuzzy
-msgid "Mark as Unimp_ortant"
-msgstr "Ox_unmamış olaraq İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:44
-msgid "Mark the selected messages as having been read"
-msgstr "İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:45
-#, fuzzy
-msgid "Mark the selected messages as important"
-msgstr "İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:46
-msgid "Mark the selected messages as not having been read"
-msgstr "İsmarıcı əvvəl oxunmamış olaraq İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:47
-#, fuzzy
-msgid "Mark the selected messages as unimportant"
-msgstr "İsmarıcı əvvəl oxunmamış olaraq İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:48
-#, fuzzy
-msgid "Mark the selected messages for deletion"
-msgstr "İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:49
-msgid "Move"
-msgstr "Daşı"
-
-#: ui/evolution-mail-message.xml.h:50
-msgid "Move selected messages to another folder"
-msgstr "Seçili ismarıcları başqa bir cərgəyə daşı"
-
-#: ui/evolution-mail-message.xml.h:51
-msgid "Next"
-msgstr "İrəli"
-
-#: ui/evolution-mail-message.xml.h:52
-#, fuzzy
-msgid "Next Important Message"
-msgstr "Sonrakı İsmarıc"
-
-#: ui/evolution-mail-message.xml.h:53
-#, fuzzy
-msgid "Next Message"
-msgstr "Sonrakı İsmarıc"
-
-#: ui/evolution-mail-message.xml.h:54
-#, fuzzy
-msgid "Next Thread"
-msgstr "İl_gəyi Seç"
-
-#: ui/evolution-mail-message.xml.h:55
-#, fuzzy
-msgid "Next Unread Message"
-msgstr "Sonrakı İsmarıc"
-
-#: ui/evolution-mail-message.xml.h:56
-#, fuzzy
-msgid "Open the selected message in a new window"
-msgstr "Güncəl ismarıcları yeni pəncərədə aç"
-
-#: ui/evolution-mail-message.xml.h:57
-#, fuzzy
-msgid "Open the selected message in the composer to re-send it"
-msgstr "İşarətlə"
-
-#: ui/evolution-mail-message.xml.h:58
-#, fuzzy
-msgid "Preview the message to be printed"
-msgstr "Çap ediləcək ismarıcı nümayiş etdirər"
-
-#: ui/evolution-mail-message.xml.h:59
-msgid "Previous"
-msgstr "Əvvəlki"
-
-#: ui/evolution-mail-message.xml.h:60
-#, fuzzy
-msgid "Previous Important Message"
-msgstr "Əvvəlki İsmarıc"
-
-#: ui/evolution-mail-message.xml.h:61
-#, fuzzy
-msgid "Previous Message"
-msgstr "Əvvəlki İsmarıc"
-
-#: ui/evolution-mail-message.xml.h:62
-#, fuzzy
-msgid "Previous Unread Message"
-msgstr "Əvvəlki İsmarıc"
-
-#: ui/evolution-mail-message.xml.h:65
-#, fuzzy
-msgid "Print this message"
-msgstr "İsmarıcı Çap Et"
-
-#: ui/evolution-mail-message.xml.h:66
-msgid "Reply"
-msgstr "Cavab ver"
-
-#: ui/evolution-mail-message.xml.h:67
-msgid "Reply to All"
-msgstr "Hamısına cavab ver"
-
-#: ui/evolution-mail-message.xml.h:70
-#, fuzzy
-msgid "S_earch Message..."
-msgstr "İsmarıcı A_xtar"
-
-#: ui/evolution-mail-message.xml.h:71
-#, fuzzy
-msgid "Save the message as a text file"
-msgstr "İsmarıcı yeni bir fayla qeyd et"
-
-#: ui/evolution-mail-message.xml.h:72
-msgid "Search for text in the body of the displayed message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:73
-msgid "Setup the page settings for your current printer"
-msgstr "Səhifə qurğularını hazırkı çap edicinizə göra uyğunlaşdırın"
-
-#: ui/evolution-mail-message.xml.h:74
-msgid "Show Email _Source"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:75
-#, fuzzy
-msgid "Show Full _Headers"
-msgstr "_Tam Başlıqlar"
-
-#: ui/evolution-mail-message.xml.h:76
-#, fuzzy
-msgid "Show message in the normal style"
-msgstr "Gün %s şəklində girilməlidir."
-
-#: ui/evolution-mail-message.xml.h:77
-#, fuzzy
-msgid "Show message with all email headers"
-msgstr "Bütün qovluqlarda yeni ePoçt üçün bax"
-
-#: ui/evolution-mail-message.xml.h:78
-#, fuzzy
-msgid "Show the raw email source of the message"
-msgstr "İsmarıca bir fayl əlavə et"
-
-#: ui/evolution-mail-message.xml.h:79
-msgid "Un-delete the selected messages"
-msgstr "Seçili ismarıcı silmə"
-
-#: ui/evolution-mail-message.xml.h:80
-#, fuzzy
-msgid "VFolder on Mailing _List..."
-msgstr "Məktublaşma Q_rupundakı VFolder"
-
-#: ui/evolution-mail-message.xml.h:81
-#, fuzzy
-msgid "VFolder on Se_nder..."
-msgstr "Gön_dərəndəki vFolder"
-
-#: ui/evolution-mail-message.xml.h:82
-#, fuzzy
-msgid "VFolder on _Recipients..."
-msgstr "_Alıcıdakı vFolder"
-
-#: ui/evolution-mail-message.xml.h:83
-#, fuzzy
-msgid "VFolder on _Subject..."
-msgstr "_Mövzudakı vFolder"
-
-#: ui/evolution-mail-message.xml.h:85
-msgid "_Apply Filters"
-msgstr "Süzgəcləri Ə_lavə Et"
-
-#: ui/evolution-mail-message.xml.h:86
-#, fuzzy
-msgid "_Copy to Folder"
-msgstr "Qovluğa Köçürt"
-
-#: ui/evolution-mail-message.xml.h:87
-msgid "_Create Filter From Message"
-msgstr "İsmarıcdan Qayda _Yarat"
-
-#: ui/evolution-mail-message.xml.h:90
-#, fuzzy
-msgid "_Forward Message"
-msgstr "Çatdırılmış ismarıc"
-
-#: ui/evolution-mail-message.xml.h:91
-#, fuzzy
-msgid "_Message Display"
-msgstr "İsmarıclar"
-
-#: ui/evolution-mail-message.xml.h:92
-#, fuzzy
-msgid "_Move to Folder"
-msgstr "Qovluğa Köçür"
-
-#: ui/evolution-mail-message.xml.h:93
-#, fuzzy
-msgid "_Normal Display"
-msgstr "Ekran"
-
-#: ui/evolution-mail-message.xml.h:94
-#, fuzzy
-msgid "_Open Message"
-msgstr "İ_smarıcları Yenidən Göndər"
-
-#: ui/evolution-mail-message.xml.h:98 ui/evolution.xml.h:49
-#: ui/my-evolution.xml.h:9
-msgid "_Tools"
-msgstr "_Vasitələr"
-
-#: ui/evolution-mail-messagedisplay.xml.h:2 ui/evolution.xml.h:5
-msgid "Close this window"
-msgstr "Bu pəncərəni qapat"
-
-#: ui/evolution-mail-messagedisplay.xml.h:5
-#: ui/evolution-message-composer.xml.h:45
-#: ui/evolution-signature-editor.xml.h:5 ui/evolution-subscribe.xml.h:9
-#: ui/evolution.xml.h:33
-msgid "_Close"
-msgstr "_Qapat"
-
-#: ui/evolution-mail-messagedisplay.xml.h:8
-#: ui/evolution-message-composer.xml.h:55 ui/evolution.xml.h:50
-msgid "_View"
-msgstr "_Göstər"
-
-#: ui/evolution-message-composer.xml.h:1
-msgid "Attach"
-msgstr "Yapışdır"
-
-#: ui/evolution-message-composer.xml.h:4 ui/evolution-signature-editor.xml.h:2
-msgid "Close the current file"
-msgstr "Hazırkı faylı qapat"
-
-#: ui/evolution-message-composer.xml.h:5
-#, fuzzy
-msgid "Delete all but signature"
-msgstr "Bütün Hadisələri sil"
-
-#: ui/evolution-message-composer.xml.h:6
-msgid "Encrypt this message with PGP"
-msgstr "İsmarıcı PGP ilə kodla"
-
-#: ui/evolution-message-composer.xml.h:7
-msgid "Encrypt this message with your S/MIME Encryption Cetificate"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:8
-msgid "F_ormat"
-msgstr "Şəki_l"
-
-#: ui/evolution-message-composer.xml.h:9
-msgid "HTML"
-msgstr "HTML"
-
-#: ui/evolution-message-composer.xml.h:10
-#, fuzzy
-msgid "Inline Text _File..."
-msgstr "_Mətn faylını daxil et ... "
-
-#: ui/evolution-message-composer.xml.h:11
-msgid "Insert a file as text into the message"
-msgstr "Bir faylı mətn olaraq ismarıca əlavə et"
-
-#: ui/evolution-message-composer.xml.h:12
-msgid "Insert text file..."
-msgstr "_Mətn faylını daxil et ... "
-
-#: ui/evolution-message-composer.xml.h:14
-msgid "Open a file"
-msgstr "Fayl aç"
-
-#: ui/evolution-message-composer.xml.h:15
-msgid "PGP Encrypt"
-msgstr "PGP kodla"
-
-#: ui/evolution-message-composer.xml.h:16
-msgid "PGP Sign"
-msgstr "PGP İmzası"
-
-#: ui/evolution-message-composer.xml.h:17
-#, fuzzy
-msgid "S/MIME Encrypt"
-msgstr "PGP kodla"
-
-#: ui/evolution-message-composer.xml.h:18
-msgid "S/MIME Sign"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:20
-msgid "Save As"
-msgstr "Fərqli Qeyd Et"
-
-#: ui/evolution-message-composer.xml.h:22
-msgid "Save _Draft"
-msgstr "_Lahiyəni Qeyd Et"
-
-#: ui/evolution-message-composer.xml.h:23
-msgid "Save in folder..."
-msgstr "_Qovluqda qeyd et ..."
-
-#: ui/evolution-message-composer.xml.h:24
-#: ui/evolution-signature-editor.xml.h:4
-msgid "Save the current file"
-msgstr "Hazırkı faylı qeyd et"
-
-#: ui/evolution-message-composer.xml.h:25
-msgid "Save the current file with a different name"
-msgstr "Hazırkı faylı fərqli bir ad altında qeyd et"
-
-#: ui/evolution-message-composer.xml.h:26
-msgid "Save the message in a specified folder"
-msgstr "İsmarıcı bildirilən qovluqda qeyd et"
-
-#: ui/evolution-message-composer.xml.h:27
-msgid "Send"
-msgstr "Göndər"
-
-#: ui/evolution-message-composer.xml.h:28
-msgid "Send _Later"
-msgstr "_Sonra Göndər"
-
-#: ui/evolution-message-composer.xml.h:29
-msgid "Send _later"
-msgstr "_Sonra göndər"
-
-#: ui/evolution-message-composer.xml.h:30
-msgid "Send the mail in HTML format"
-msgstr "ePoçtu HTML Şəklində göndər"
-
-#: ui/evolution-message-composer.xml.h:31
-msgid "Send the message later"
-msgstr "İsmarıcı sonra göndər"
-
-#: ui/evolution-message-composer.xml.h:32
-msgid "Send this message now"
-msgstr "Bu ismarıcı indi göndər"
-
-#: ui/evolution-message-composer.xml.h:33
-msgid "Show / hide attachments"
-msgstr "Yapşdırılmış faylları göstər/gizlət"
-
-#: ui/evolution-message-composer.xml.h:34
-msgid "Show _attachments"
-msgstr "_Yapışdırılmış Faylları göstər"
-
-#: ui/evolution-message-composer.xml.h:35
-msgid "Show attachments"
-msgstr "Yapışdırılmış faylları göstər"
-
-#: ui/evolution-message-composer.xml.h:36
-msgid "Sign this message with your PGP key"
-msgstr "İsmarıcı fərqli bir ad altında qeyd et"
-
-#: ui/evolution-message-composer.xml.h:37
-#, fuzzy
-msgid "Sign this message with your S/MIME Signature Certificate"
-msgstr "İsmarıcı fərqli bir ad altında qeyd et"
-
-#: ui/evolution-message-composer.xml.h:38
-msgid "Toggles whether the BCC field is displayed"
-msgstr "BCC girişinin harda olacağını bildirər"
-
-#: ui/evolution-message-composer.xml.h:39
-msgid "Toggles whether the CC field is displayed"
-msgstr "CC girişinin harda olacağını bildirər"
-
-#: ui/evolution-message-composer.xml.h:40
-msgid "Toggles whether the From chooser is displayed"
-msgstr "GÖNDƏRƏN girişinin harda olacağını bildirər"
-
-#: ui/evolution-message-composer.xml.h:41
-msgid "Toggles whether the Reply-To field is displayed"
-msgstr "GÖNDƏRİLƏCƏK girişinin harda olacağını bildirər"
-
-#: ui/evolution-message-composer.xml.h:42
-#, fuzzy
-msgid "_Attachment..."
-msgstr "_Yapışdırılmış Fayl"
-
-#: ui/evolution-message-composer.xml.h:43
-msgid "_Bcc Field"
-msgstr "_Bcc Girişi"
-
-#: ui/evolution-message-composer.xml.h:44
-msgid "_Cc Field"
-msgstr "_Cc Girişi"
-
-#: ui/evolution-message-composer.xml.h:46
-#, fuzzy
-msgid "_Delete all"
-msgstr "_Sil"
-
-#: ui/evolution-message-composer.xml.h:49
-msgid "_From Field"
-msgstr "_Göndərən Girişi"
-
-#: ui/evolution-message-composer.xml.h:50
-#: ui/evolution-signature-editor.xml.h:9
-msgid "_Insert"
-msgstr "_Daxil Et"
-
-#: ui/evolution-message-composer.xml.h:51
-msgid "_Open..."
-msgstr "_Aç ..."
-
-#: ui/evolution-message-composer.xml.h:52
-msgid "_Reply-To Field"
-msgstr "_Cavab_Verləcək Girişi"
-
-#: ui/evolution-message-composer.xml.h:54
-msgid "_Security"
-msgstr "_Təhlükəsizlik"
-
-#: ui/evolution-signature-editor.xml.h:8 ui/evolution.xml.h:40
-msgid "_Help"
-msgstr "_Kömək"
-
-#: ui/evolution-subscribe.xml.h:1
-msgid "Add folder to your list of subscribed folders"
-msgstr "Qovluğu qeydiyyatlı qovluqlar siyahısına al"
-
-#: ui/evolution-subscribe.xml.h:2
-msgid "F_older"
-msgstr "_Qovluq"
-
-#: ui/evolution-subscribe.xml.h:3
-msgid "Refresh List"
-msgstr "Siyahını Yenilə"
-
-#: ui/evolution-subscribe.xml.h:4
-msgid "Refresh List of Folders"
-msgstr "Qovluqlar Siyahısını Yenilə"
-
-#: ui/evolution-subscribe.xml.h:5
-msgid "Remove folder from your list of subscribed folders"
-msgstr "Qovluğu qeydiyyatlı qovluqlar siyahısından çıxart"
-
-#: ui/evolution-subscribe.xml.h:7
-msgid "Subscribe"
-msgstr "Qeydiyyatdan Keç"
-
-#: ui/evolution-subscribe.xml.h:8
-msgid "Unsubscribe"
-msgstr "Qeydiyyatdan Çıx"
-
-#: ui/evolution-task-editor.xml.h:1
-#, fuzzy
-msgid "Assign Task"
-msgstr "Ayrıl_mış Vəzifə (FIXME)"
-
-#: ui/evolution-task-editor.xml.h:2
-msgid "Assign this task to others"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:3
-#, fuzzy
-msgid "Cancel Task"
-msgstr "Yeni Vəzifə"
-
-#: ui/evolution-task-editor.xml.h:4
-#, fuzzy
-msgid "Cancel this task"
-msgstr "Yeni Vəzifə"
-
-#: ui/evolution-task-editor.xml.h:7
-msgid "Obtain the latest task information"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:8
-#, fuzzy
-msgid "Re_fresh Task"
-msgstr "Siyahını Yenilə"
-
-#: ui/evolution-tasks.xml.h:2
-msgid "Configure the task view's settings"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:4
-#, fuzzy
-msgid "Copy selected task"
-msgstr "Seçili Üzvləri _Aç"
-
-#: ui/evolution-tasks.xml.h:7
-#, fuzzy
-msgid "Cut selected task"
-msgstr "Bu vəzifəni sil"
-
-#: ui/evolution-tasks.xml.h:9
-#, fuzzy
-msgid "Delete selected tasks"
-msgstr "Bu vəzifəni sil"
-
-#: ui/evolution-tasks.xml.h:12
-#, fuzzy
-msgid "Paste task from the clipboard"
-msgstr "Ara yaddaşı yapışdır"
-
-#: ui/evolution-tasks.xml.h:13
-#, fuzzy
-msgid "Tasks Settings..."
-msgstr "_Məktub Qurğuları..."
-
-#: ui/evolution-tasks.xml.h:18
-msgid "_Task"
-msgstr "_Vəzifə"
-
-#: ui/evolution.xml.h:1
-#, fuzzy
-msgid "About Ximian Evolution..."
-msgstr "\"Evolution\" Haqqında..."
-
-#: ui/evolution.xml.h:2
-#, fuzzy
-msgid "Add to _Shortcut Bar"
-msgstr "_Qısa Yol Çubuğu"
-
-#: ui/evolution.xml.h:3
-#, fuzzy
-msgid "Change the name of this folder"
-msgstr "Bu cərgənin xüsusiyyətlərini dəyişdir"
-
-#: ui/evolution.xml.h:6
-#, fuzzy
-msgid "Copy this folder"
-msgstr "Qovluğa Köçürt"
-
-#: ui/evolution.xml.h:7
-#, fuzzy
-msgid "Create _New Folder..."
-msgstr "Yeni bir qovluq yarat"
-
-#: ui/evolution.xml.h:8
-#, fuzzy
-msgid "Create a link to this folder in the shortcut bar"
-msgstr "Bu qısa yolu qısa yol çubuğundan sil"
-
-#: ui/evolution.xml.h:9
-#, fuzzy
-msgid "Create a new folder"
-msgstr "Yeni bir qovluq yarat"
-
-#: ui/evolution.xml.h:10
-#, fuzzy
-msgid "Delete this folder"
-msgstr "Bu üzvü sil"
-
-#: ui/evolution.xml.h:11
-msgid "Display a different folder"
-msgstr "Başqa bir qovluğu göstər"
-
-#: ui/evolution.xml.h:12
-msgid "E_xit"
-msgstr "Çı_x"
-
-#: ui/evolution.xml.h:13
-msgid "Evolution _Window"
-msgstr "Evolution _Pəncərəsi"
-
-#: ui/evolution.xml.h:14
-msgid "Exit the program"
-msgstr "Proqramdan çıx"
-
-#: ui/evolution.xml.h:15
-msgid "Import data from other programs"
-msgstr ""
-
-#: ui/evolution.xml.h:17
-#, fuzzy
-msgid "Move this folder to another place"
-msgstr "Seçili ismarıcları başqa bir cərgəyə daşı"
-
-#: ui/evolution.xml.h:18
-msgid "Open in New Window"
-msgstr "Yeni Pəncərədə Aç"
-
-#: ui/evolution.xml.h:20
-#, fuzzy
-msgid "Open this folder in an other window"
-msgstr "Güncəl ismarıcları yeni pəncərədə aç"
-
-#: ui/evolution.xml.h:21
-#, fuzzy
-msgid "Show information about Ximian Evolution"
-msgstr "\"Evolution\" haqqında mə'lumat göstər"
-
-#: ui/evolution.xml.h:22
-msgid "Submit Bug Report"
-msgstr "Xəta Raportunu Göndər"
-
-#: ui/evolution.xml.h:23
-msgid "Submit _Bug Report"
-msgstr "_Xəta Raportunu Göndər"
-
-#: ui/evolution.xml.h:24
-#, fuzzy
-msgid "Submit a bug report using Bug Buddy"
-msgstr "\"Bug-buddy\" dəstəyi ilə bir xəta raportunu göndər"
-
-#: ui/evolution.xml.h:25
-#, fuzzy
-msgid "Toggle"
-msgstr "Rolu"
-
-#: ui/evolution.xml.h:26
-msgid "Toggle whether to show the folder bar"
-msgstr "Qovluqlar çubuğunun nümayiş etdiriləcəyi yeri bildir"
-
-#: ui/evolution.xml.h:27
-msgid "Toggle whether to show the shortcut bar"
-msgstr "Qısa yol çubuğunun nümayiş etdiriləcəyi yeri bildir"
-
-#: ui/evolution.xml.h:28
-#, fuzzy
-msgid "Toggle whether we are working offline."
-msgstr "GÖNDƏRƏN girişinin harda olacağını bildirər"
-
-#: ui/evolution.xml.h:29
-msgid "View the selected folder"
-msgstr "Seçili qovluğu göstər"
-
-#: ui/evolution.xml.h:31
-#, fuzzy
-msgid "Ximian Evolution _FAQ"
-msgstr "Evolution"
-
-#: ui/evolution.xml.h:32
-#, fuzzy
-msgid "_About Ximian Evolution..."
-msgstr "_Evolution Haqqında..."
-
-#: ui/evolution.xml.h:34
-#, fuzzy
-msgid "_Copy..."
-msgstr "_Köçürt"
-
-#: ui/evolution.xml.h:38
-msgid "_Folder Bar"
-msgstr "_Qovluq Çubuğu"
-
-#: ui/evolution.xml.h:39
-msgid "_Go to Folder..."
-msgstr "Qovluğa _Get ..."
-
-#: ui/evolution.xml.h:41
-#, fuzzy
-msgid "_Import..."
-msgstr "Alınır"
-
-#: ui/evolution.xml.h:42
-#, fuzzy
-msgid "_Move..."
-msgstr "Daşı"
-
-#: ui/evolution.xml.h:43
-msgid "_New"
-msgstr "_Yeni"
-
-#: ui/evolution.xml.h:44
-msgid "_New Folder"
-msgstr "_Yeni Qovluq"
-
-#: ui/evolution.xml.h:45
-#, fuzzy
-msgid "_Pilot Settings..."
-msgstr "_Məktub Qurğuları..."
-
-#: ui/evolution.xml.h:46
-#, fuzzy
-msgid "_Rename..."
-msgstr "_Aç ..."
-
-#: ui/evolution.xml.h:47
-#, fuzzy
-msgid "_Shortcut"
-msgstr "_Qısa Yol Çubuğu"
-
-#: ui/evolution.xml.h:48
-msgid "_Shortcut Bar"
-msgstr "_Qısa Yol Çubuğu"
-
-#: ui/evolution.xml.h:51
-#, fuzzy
-msgid "_Work Offline"
-msgstr "Xətdən Qopuq İşlə"
-
-#: ui/my-evolution.xml.h:1
-#, fuzzy
-msgid "Change the settings for the summary"
-msgstr "Bu cərgənin xüsusiyyətlərini dəyişdir"
-
-#: ui/my-evolution.xml.h:4
-#, fuzzy
-msgid "Print summary"
-msgstr "Poçt Mündəricatı"
-
-#: ui/my-evolution.xml.h:5
-#, fuzzy
-msgid "Reload"
-msgstr "Oxu"
-
-#: ui/my-evolution.xml.h:6
-msgid "Reload the view"
-msgstr ""
-
-#: ui/my-evolution.xml.h:8
-#, fuzzy
-msgid "_Summary Settings..."
-msgstr "İcracı Mündəricat Qurğuları..."
-
-#: views/addressbook/galview.xml.h:1
-#, fuzzy
-msgid "Address Cards"
-msgstr "Ünvan Kartları"
-
-#: views/addressbook/galview.xml.h:2
-msgid "By Company"
-msgstr "Şirkət"
-
-#: views/addressbook/galview.xml.h:3
-msgid "Phone List"
-msgstr "Telefon Siyahısı"
-
-#: views/mail/galview.xml.h:1
-msgid "By Sender"
-msgstr "Göndərən"
-
-#: views/mail/galview.xml.h:2
-msgid "By Status"
-msgstr "Vəziyyət"
-
-#: views/mail/galview.xml.h:3
-msgid "By Subject"
-msgstr "Mövzu"
-
-#: views/mail/galview.xml.h:4
-msgid "Messages"
-msgstr "İsmarıclar"
-
-#: views/tasks/galview.xml.h:2
-msgid "With Category"
-msgstr "Kateqoriya ilə"
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:1
-#, fuzzy
-msgid "Select a Time Zone"
-msgstr "Fayl seç"
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:2
-#, fuzzy
-msgid "Selection:"
-msgstr "Bölmələr :"
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:3
-#, fuzzy
-msgid "Time Zones"
-msgstr ""
-"\n"
-"Zaman zolağı: "
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:4
-msgid ""
-"Use the left mouse button to zoom in on an area of the map and select a time "
-"zone.\n"
-" Use the right mouse button to zoom out."
-msgstr ""
-
-#: widgets/menus/gal-view-menus.c:218
-msgid "_Current View"
-msgstr "_Hazırkı Görünüş"
-
-#: widgets/menus/gal-view-menus.c:260
-msgid "Define Views"
-msgstr "Görünüşləri Müəyyənləşdir"
-
-#. Translators: These are the first characters of each day of the
-#. week, 'M' for 'Monday', 'T' for Tuesday etc.
-#: widgets/misc/e-calendar-item.c:428
-msgid "MTWTFSS"
-msgstr "MTWTFSS"
-
-#. This is a strftime() format. %B = Month name, %Y = Year.
-#: widgets/misc/e-calendar-item.c:1071
-msgid "%B %Y"
-msgstr "%B %Y"
-
-#: widgets/misc/e-cell-date-edit.c:224 widgets/misc/e-dateedit.c:439
-msgid "Now"
-msgstr "İndi"
-
-#: widgets/misc/e-cell-date-edit.c:232 widgets/misc/e-dateedit.c:445
-msgid "Today"
-msgstr "Bugün"
-
-#: widgets/misc/e-cell-date-edit.c:732
-#, c-format
-msgid "The time must be in the format: %s"
-msgstr "Gün %s şəklində girilməlidir."
-
-#: widgets/misc/e-charset-picker.c:59
-msgid "Baltic"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:60
-msgid "Central European"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:61
-msgid "Chinese"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:62
-msgid "Cyrillic"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:63
-#, fuzzy
-msgid "Greek"
-msgstr "həftə"
-
-#: widgets/misc/e-charset-picker.c:64
-msgid "Japanese"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:65
-msgid "Korean"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:66
-#, fuzzy
-msgid "Turkish"
-msgstr "Zibil Qutusu"
-
-#: widgets/misc/e-charset-picker.c:67
-msgid "Unicode"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:68
-msgid "Western European"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:85
-#, fuzzy
-msgid "Traditional"
-msgstr "Nəqliyyat bacarılmadı"
-
-#: widgets/misc/e-charset-picker.c:86 widgets/misc/e-charset-picker.c:87
-msgid "Simplified"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:91
-msgid "Ukrainian"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:102
-#, fuzzy
-msgid "New"
-msgstr "Xəbərlər"
-
-#: widgets/misc/e-charset-picker.c:160
-#, fuzzy, c-format
-msgid "Unknown character set: %s"
-msgstr "Namə'lum xəta: %s"
-
-#: widgets/misc/e-charset-picker.c:202
-msgid "Enter the character set to use"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:277
-#, fuzzy
-msgid "Other..."
-msgstr "Başqa"
-
-#: widgets/misc/e-charset-picker.c:394
-msgid "Character Encoding"
-msgstr ""
-
-#: widgets/misc/e-clipped-label.c:112
-msgid "..."
-msgstr "..."
-
-#: widgets/misc/e-filter-bar.c:158
-#, fuzzy
-msgid "Search Editor"
-msgstr "Əlaqə düzəldicisi"
-
-#: widgets/misc/e-filter-bar.c:174
-msgid "Save Search"
-msgstr "Axtarışı Qeyd Et"
-
-#: widgets/misc/e-filter-bar.h:94
-#, fuzzy
-msgid "Add to Saved Searches"
-msgstr "Axtarışı Qeyd Et"
-
-#: widgets/misc/e-filter-bar.h:95
-#, fuzzy
-msgid "Clear"
-msgstr "Tə_mizlə"
-
-#: widgets/misc/e-filter-bar.h:102
-msgid "Show All"
-msgstr "Hamısını Göstər"
-
-#: widgets/misc/e-messagebox.c:152
-msgid "Information"
-msgstr "Mə'lumat"
-
-#: widgets/misc/e-messagebox.c:166
-msgid "Error"
-msgstr "Xəta"
-
-#: widgets/misc/e-messagebox.c:173
-msgid "Question"
-msgstr "Sual"
-
-#: widgets/misc/e-messagebox.c:180
-msgid "Message"
-msgstr "İsmarıc"
-
-#. Add the "Don't show this message again." checkbox
-#: widgets/misc/e-messagebox.c:224
-msgid "Don't show this message again."
-msgstr "Bu ismarıcı bir də göstərmə."
-
-#: widgets/misc/e-search-bar.c:334
-msgid "Sear_ch"
-msgstr "Ax_tar"
-
-#: widgets/misc/e-search-bar.c:460
-#, fuzzy
-msgid "Find Now"
-msgstr "Cild DN:"
-
-#: wombat/GNOME_Evolution_Wombat.oaf.in.h:1
-msgid "The Personal Addressbook Server"
-msgstr "Şəxsi Ünvan Dəftəri Vericisi"
-
-#: wombat/GNOME_Evolution_Wombat.oaf.in.h:2
-msgid "The Personal Calendar Server; calendar factory"
-msgstr "Şəxsi Ünvan Dəftəri Vericisi; təqvim e'malatxanası"
-
-#: wombat/wombat.c:176
-msgid "setup_vfs(): could not initialize GNOME-VFS"
-msgstr "setup_vfs(): GNOME_VFS başladıla bilmədi"
-
-#: wombat/wombat.c:188
-msgid "init_corba(): could not initialize GNOME"
-msgstr "init_corba(): GNOME başladıla bilmədi"
-
-#: wombat/wombat.c:201
-msgid "init_bonobo(): could not initialize Bonobo"
-msgstr "init_bonobo(): Bonobonu başlada bilmədim"
-
-#, fuzzy
-#~ msgid "_Calendar Information:"
-#~ msgstr "təqvim haqqında"
-
-#~ msgid "The priority must be 'High', 'Normal', 'Low' or 'Undefined'."
-#~ msgstr "Üstünlük 'Yüksək', 'Normal', 'Alçaq' və ya 'Təsvirsiz' ola bilər."
-
-#, fuzzy
-#~ msgid "before start of appointment"
-#~ msgstr "iclasın başlanğıcından əvvəl"
-
-#, fuzzy
-#~ msgid "after start of appointment"
-#~ msgstr "iclasın başlanğıcından sonra"
-
-#, fuzzy
-#~ msgid "before end of appointment"
-#~ msgstr "iclas qurtarandan əvvəl"
-
-#, fuzzy
-#~ msgid "Evolution Shortcuts"
-#~ msgstr "\"Evolution\" çubuğu _qısa yolu"
-
-#, fuzzy
-#~ msgid "Each account must have a different name."
-#~ msgstr "Hazırkı faylı fərqli bir ad altında qeyd et"
-
-#, fuzzy
-#~ msgid "Delete folder '%s'"
-#~ msgstr "%s gün sonra sil"
-
-#, fuzzy
-#~ msgid "Rename"
-#~ msgstr "Qayda adı :"
-
-#~ msgid "_Debug"
-#~ msgstr "_Ayıqla"
-
-#, fuzzy
-#~ msgid "_Import File..."
-#~ msgstr "Faylı _İdaxl Et ... "
-
-#~ msgid "Factory for the Evolution addressbook component."
-#~ msgstr "'Evolution'un Ünvan Dəftəri e'malatxanası."
-
-#~ msgid "123"
-#~ msgstr "123"
-
-#~ msgid "a"
-#~ msgstr "a"
-
-#~ msgid "b"
-#~ msgstr "b"
-
-#~ msgid "c"
-#~ msgstr "c"
-
-#~ msgid "d"
-#~ msgstr "d"
-
-#~ msgid "e"
-#~ msgstr "e"
-
-#~ msgid "f"
-#~ msgstr "f"
-
-#~ msgid "g"
-#~ msgstr "g"
-
-#~ msgid "h"
-#~ msgstr "h"
-
-#~ msgid "i"
-#~ msgstr "i"
-
-#~ msgid "j"
-#~ msgstr "j"
-
-#~ msgid "k"
-#~ msgstr "k"
-
-#~ msgid "l"
-#~ msgstr "l"
-
-#~ msgid "m"
-#~ msgstr "m"
-
-#~ msgid "n"
-#~ msgstr "n"
-
-#~ msgid "o"
-#~ msgstr "o"
-
-#~ msgid "p"
-#~ msgstr "p"
-
-#~ msgid "q"
-#~ msgstr "q"
-
-#~ msgid "r"
-#~ msgstr "r"
-
-#~ msgid "s"
-#~ msgstr "s"
-
-#~ msgid "t"
-#~ msgstr "t"
-
-#~ msgid "u"
-#~ msgstr "u"
-
-#~ msgid "v"
-#~ msgstr "v"
-
-#~ msgid "w"
-#~ msgstr "w"
-
-#~ msgid "x"
-#~ msgstr "x"
-
-#~ msgid "y"
-#~ msgstr "y"
-
-#~ msgid "z"
-#~ msgstr "z"
-
-#, fuzzy
-#~ msgid "Done."
-#~ msgstr "Qurtardı"
-
-#~ msgid "Factory for the Evolution calendar component."
-#~ msgstr "Evolutionun təqvim parçasının mərkəzi."
-
-#~ msgid "Reminder of your appointment at "
-#~ msgstr "İclas bildiricisi "
-
-#~ msgid "Snooze"
-#~ msgstr "Mürgülə"
-
-#~ msgid "Ok"
-#~ msgstr "Oldu"
-
-#~ msgid ""
-#~ "It is %s. The Unix time is %ld right now. We just thought you may like "
-#~ "to know."
-#~ msgstr ""
-#~ "Bu, %s dir(dır). İndiki Unix vaxtı da %ld dir(dır). Bəlkə bilmək "
-#~ "istəyərsinizdeyə fikirləşdik."
-
-#, fuzzy
-#~ msgid "%d"
-#~ msgstr "d"
-
-#~ msgid "I couldn't update your calendar file!\n"
-#~ msgstr "Təqvim faylını güncəlləyə bilmirəm!\n"
-
-#~ msgid "No plaintext to sign."
-#~ msgstr "İmzalanacaq düz mətn yoxdur."
-
-#~ msgid "No password provided."
-#~ msgstr "Parol verilməyib."
-
-#~ msgid "No plaintext to clearsign."
-#~ msgstr "Təmiz imza mətni yoxdur."
-
-#~ msgid "No plaintext to verify."
-#~ msgstr "Təsdiqlənəcək düz mətn yoxdur."
-
-#~ msgid "No plaintext to encrypt."
-#~ msgstr "Şifrlənəcək mətn yoxdur."
-
-#~ msgid "No ciphertext to decrypt."
-#~ msgstr "Şifri açılacaq mətn yoxdur."
-
-#~ msgid "Standard Unix mailbox file"
-#~ msgstr "Standart UNIX məktub qutusu faylı"
-
-#, fuzzy
-#~ msgid "Unix mbox spool-format mail files"
-#~ msgstr "Qmail məktun qovluğu şəklindəki məktub faylı"
-
-#, fuzzy
-#~ msgid "Cannot summarize folder: %s: %s"
-#~ msgstr "Qovluq yığcamlaşdırıla bilmir: %s: %s"
-
-#, fuzzy
-#~ msgid "Synchronizing folder"
-#~ msgstr "Qovluq sinxronlaşdırılır"
-
-#, fuzzy
-#~ msgid "Could not open folder to summarize: %s: %s"
-#~ msgstr "Qovluq toplanmaq üçün açıla bilmir: %s: %s"
-
-#, fuzzy
-#~ msgid "Spool stores do not have an inbox"
-#~ msgstr "Yerli saxlamaların gələnlər qutusu qovluğu yoxdur"
-
-#~ msgid "Could not open folder to summarise: %s: %s"
-#~ msgstr "Qovluq toplanmaq üçün açıla bilmir: %s: %s"
-
-#~ msgid ""
-#~ "For connecting to POP servers. The POP protocol can also be used to "
-#~ "retrieve mail from certain web mail providers and proprietary email "
-#~ "systems."
-#~ msgstr ""
-#~ "POP vericilərinə bağlanmaq üçündür. POP protokolu eyni zamanda bə'zi veb "
-#~ "məktub sistemlərindən məktub almaq üçün də işlədilə bilir."
-
-#, fuzzy
-#~ msgid "%d/%m/%Y"
-#~ msgstr "%m/%d/%Y"
-
-#, fuzzy
-#~ msgid "%Y/%m/%d"
-#~ msgstr "%a %m/%d/%Y"
-
-#, fuzzy
-#~ msgid "%x"
-#~ msgstr "x"
-
-#~ msgid "Elm mail"
-#~ msgstr "Elm Poçtu"
-
-#~ msgid "Pine mail"
-#~ msgstr "Pine Poçtu"
-
-#~ msgid "Factory for the Evolution mail component."
-#~ msgstr "'Evolution'un məktub parçası e'malatxanası."
-
-#~ msgid "Forwarded message:\n"
-#~ msgstr "Bu ismarıcı çatdır:\n"
-
-#, fuzzy
-#~ msgid "No such folder /%s"
-#~ msgstr "%s deyə bir qovluq yoxdur"
-
-#, fuzzy
-#~ msgid "Registering '%s'"
-#~ msgstr "'%s' Açılır"
-
-#, fuzzy
-#~ msgid "Synchronizing '%s'"
-#~ msgstr "Qovluq sinxronlaşdırılır"
-
-#~ msgid "Factory for the Evolution executive summary component."
-#~ msgstr "'Evolution'un icracı mündəricat parçası e'malatxanası."
-
-#, fuzzy
-#~ msgid "%l:%M%p"
-#~ msgstr "%I:%M%p"
-
-#, fuzzy
-#~ msgid "%a %l:%M%p"
-#~ msgstr "%a %l %M %p"
-
-#, fuzzy
-#~ msgid "There was an error downloading news feed"
-#~ msgstr "Təqvim faylı yüklənərkən xəta oldu."
-
-#~ msgid "This seems to be the first time you are running Evolution."
-#~ msgstr "Dəyəsən \"Evolution\"ı ilk dəfə işə salırsan."
-
-#~ msgid "Please click \"OK\" to install the Evolution user files under"
-#~ msgstr ""
-#~ "\"Oldu\"'ya tıqlayıb, \"Evolution\" istifadəçi fayllarını buraya qur"
-
-#~ msgid "All Attendees"
-#~ msgstr "Bütün Ziyarətçilər"
-
-#~ msgid "RDF Summary"
-#~ msgstr "RDF Mündəricatı"
-
-#~ msgid "Unknown addressbook type"
-#~ msgstr "Namə'lum ünvan dəftəri"
-
-#~ msgid "None (anonymous mode)"
-#~ msgstr "Heç biri (adsız halı)"
-
-#~ msgid "Unknown auth type"
-#~ msgstr "Namə'lum tanıtma növü"
-
-#~ msgid "Subtree"
-#~ msgstr "Alt Ağac"
-
-#~ msgid "Unknown scope type"
-#~ msgstr "Namə'lum hərəkət növü"
-
-#~ msgid "FIXME Bind DN Help text here"
-#~ msgstr "FIZME DN Kömək Mətnini bura cala"
-
-#~ msgid "FIXME Host help text here."
-#~ msgstr "FIXME Yuva kömək mwtni burada."
-
-#~ msgid "Root DN:"
-#~ msgstr "Kök DN :"
-
-#~ msgid "FIXME Root DN help text here."
-#~ msgstr "FIXME Kök Dn kömək mətni burda."
-
-#~ msgid "FIXME Port help text here."
-#~ msgstr "FIXME Qapı kömək mətni burda."
-
-#~ msgid "Authentication:"
-#~ msgstr "Tanıtma :"
-
-#~ msgid "FIXME Path Help text here"
-#~ msgstr "FIXME Cığır Kömək mətni burda."
-
-#~ msgid "Create path if it doesn't exist."
-#~ msgstr "Belə bir yol yoxdursa yarat."
-
-#~ msgid ""
-#~ "Select the kind of addressbook you have, and enter the relevant "
-#~ "information about it."
-#~ msgstr ""
-#~ "Sahib olduğunuz ünvan dəftəri nçvünü seçin, bunu haqqında lazımi "
-#~ "mə'lumatları bildirin."
-
-#~ msgid "FIXME Name help text here"
-#~ msgstr "FIXME Ad kömək mətbi burda."
-
-#~ msgid "FIXME Description help text here"
-#~ msgstr "FIXME İzah kömək mətbi burda."
-
-#~ msgid "URI"
-#~ msgstr "URI"
-
-#, fuzzy
-#~ msgid "Category contains"
-#~ msgstr "Ad daxil edən"
-
-#, fuzzy
-#~ msgid "Select name from _folder:"
-#~ msgstr "Adı buradan seç:"
-
-#~ msgid "USA"
-#~ msgstr "ABŞ"
-
-#, fuzzy
-#~ msgid "Canceled"
-#~ msgstr "Ləğv Edildi"
-
-#~ msgid "Transparent"
-#~ msgstr "Şəffaf"
-
-#~ msgid "Opaque"
-#~ msgstr "Mat"
-
-#~ msgid ""
-#~ "The classification must be 'Public', 'Private', 'Confidential' or 'None'"
-#~ msgstr "Siniflədirmə 'Ümumi', 'Xüsusi', 'Gizli' ya da 'Heç Biri' olmalıdır"
-
-#~ msgid "The transparency must be 'Transparent', 'Opaque', or 'None'."
-#~ msgstr "Şəffaflıq 'Şəffaf', 'İşıq Keçirməz' və ya 'Heç Biri' olmalıdır."
-
-#~ msgid "Beep when alarm windows appear."
-#~ msgstr "Alarm pəncərəsi çıxanda biiplə."
-
-#~ msgid "Calendar Preferences"
-#~ msgstr "Təqvim Seçənəkləri"
-
-#, fuzzy
-#~ msgid "Date Navigator"
-#~ msgstr "Tarix səyyahı xüsusiyyətləri"
-
-#~ msgid "Defaults"
-#~ msgstr "Əsaslar"
-
-#~ msgid "Remind me of all appointments"
-#~ msgstr "Bütün Görüşlərimi Bildir"
-
-#~ msgid "minutes before they occur."
-#~ msgstr "dəqiqə əvvəlində onlar meydana çıxırlar."
-
-#, fuzzy
-#~ msgid "Delegated From:"
-#~ msgstr "Silinən"
-
-#, fuzzy
-#~ msgid "No one"
-#~ msgstr "Yoxdur"
-
-#~ msgid "Task"
-#~ msgstr "Vəzifə"
-
-#~ msgid "% Comp_lete:"
-#~ msgstr "% _Qurtardı:"
-
-#~ msgid "Transparency"
-#~ msgstr "Şəffaf"
-
-#, fuzzy
-#~ msgid "The message is not understandable."
-#~ msgstr "Bu ismarıc hazırda mövcuddur"
-
-#~ msgid "All"
-#~ msgstr "Hamısı"
-
-#~ msgid "Edit"
-#~ msgstr "Düzəlt"
-
-#~ msgid "Store search as vFolder"
-#~ msgstr "Axtarışı vFolder olaraq saxla"
-
-#~ msgid "Resend"
-#~ msgstr "Yenidən Göndər"
-
-#~ msgid "Evolution Account Manager"
-#~ msgstr "Evolution Hesab İdarəcisi"
-
-#~ msgid "On %s, %s wrote:"
-#~ msgstr "%s da(də) %s yazmışdır:"
-
-#~ msgid "Receiving"
-#~ msgstr "Alınır"
-
-#~ msgid "Store"
-#~ msgstr "Saxla"
-
-#~ msgid "Display folders starting with:"
-#~ msgstr "Bunula başlayan qovluqları göstər:"
-
-#~ msgid "Getting store for \"%s\""
-#~ msgstr "\"%s\" üçün saxlama aməliyyatı aparılır"
-
-#, fuzzy
-#~ msgid "My Evolution Settings"
-#~ msgstr "Evolution qurulması"
-
-#, fuzzy
-#~ msgid "%A, %d %B %Y"
-#~ msgstr "%A, %e %B %Y"
-
-#, fuzzy
-#~ msgid "Print My Evolution"
-#~ msgstr "Evolution"
-
-#, fuzzy
-#~ msgid "Printing of My Evolution failed"
-#~ msgstr "İsmarıların çap edilməsi bacarılmadı"
-
-#, fuzzy
-#~ msgid "My Evolution"
-#~ msgstr "Evolution"
-
-#~ msgid "New contact"
-#~ msgstr "Yeni əlaqə"
-
-#, fuzzy
-#~ msgid "_Contact Group"
-#~ msgstr "_Əlaqə"
-
-#~ msgid "Go to present time"
-#~ msgstr "İndiki vaxta get"
-
-#~ msgid "W_ork Week"
-#~ msgstr "İ_ş həftəsi"
-
-#~ msgid "_Day"
-#~ msgstr "_Gün"
-
-#~ msgid "_Week"
-#~ msgstr "_Həftə"
-
-#~ msgid "Close this appointment"
-#~ msgstr "Bu iclası qapat"
-
-#, fuzzy
-#~ msgid "Print S_etup"
-#~ msgstr "Çap Qurğuları"
-
-#~ msgid "Save the appointment and close the dialog box"
-#~ msgstr "İclası qeyd et və dialoqu qapat"
-
-#, fuzzy
-#~ msgid "_Action"
-#~ msgstr "_Gedişlər"
-
-#~ msgid "Help"
-#~ msgstr "Kömək"
-
-#~ msgid "Se_nd contact to other..."
-#~ msgstr "Əlaqəni fərqli yerə gö_ndər..."
-
-#~ msgid "See online help"
-#~ msgstr "Xətdəki Köməyə bax"
-
-#~ msgid "Compose"
-#~ msgstr "Yaz"
-
-#~ msgid "Manage _Subscriptions..."
-#~ msgstr "Al_t Qeydləri İdarə Et..."
-
-#~ msgid "Show _All"
-#~ msgstr "_Hamısını Göstər"
-
-#, fuzzy
-#~ msgid "Print Message..."
-#~ msgstr "İsmarıcı çap et ..."
-
-#, fuzzy
-#~ msgid "Print Preview..."
-#~ msgstr "Çap Etmə nümayişi"
-
-#, fuzzy
-#~ msgid "_Re-send Message"
-#~ msgstr "İ_smarıcları Yenidən Göndər"
-
-#~ msgid "Customi_ze Toolbars..."
-#~ msgstr "Vasitələr Çubuğunu _Xüsusiləşdir..."
-
-#~ msgid "Customize"
-#~ msgstr "_Xüsusiləşdir"
-
-#~ msgid "Customize toolbars"
-#~ msgstr "Vasitələr çubuğunu xüsusiləşdir"
-
-#, fuzzy
-#~ msgid "Delegate Task"
-#~ msgstr "Bu vəzifəni sil"
-
-#~ msgid "Save task as something else"
-#~ msgstr "Vəzifəni və başqa şeyləri də qeyd et"
-
-#~ msgid "Getting _Started"
-#~ msgstr "Ne_cə Başlayaram"
-
-#~ msgid "Using the C_ontact Manager"
-#~ msgstr "Ə_laqələr İdarəcisini Necə işlədim"
-
-#~ msgid "Using the _Calendar"
-#~ msgstr "_Təqvimi Necə İşlədim"
-
-#~ msgid "Using the _Mailer"
-#~ msgstr "_ePoçt bölməsini necə İşlədim"
-
-#~ msgid "_Appointment (FIXME)"
-#~ msgstr "_Görüş (ABY)"
-
-#~ msgid "_Contact (FIXME)"
-#~ msgstr "_Əlaqələr"
-
-#~ msgid "_Index"
-#~ msgstr "_İndeks"
-
-#~ msgid "_Mail message"
-#~ msgstr "_Məktub İsmarıcı"
-
-#~ msgid "_Task (FIXME)"
-#~ msgstr "_Vəzifə"
-
-#, fuzzy
-#~ msgid "Set task view preferences"
-#~ msgstr "Seçənəkləri dəyişdir"
-
-#, fuzzy
-#~ msgid "TasksPreferences"
-#~ msgstr "Vəzifə Seçənəkləri..."
-
-#~ msgid "???"
-#~ msgstr "???"
-
-#~ msgid "C_ontacts..."
-#~ msgstr "_Əlaqələr ..."
-
-#~ msgid "_Company:"
-#~ msgstr "Ş_irkət :"
-
-#~ msgid "As _Minicards"
-#~ msgstr "_Balaca kartlar olaraq"
-
-#~ msgid "As _Table"
-#~ msgstr "_Cədvəl olaraq"
-
-#~ msgid ""
-#~ "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"
-#~ msgstr ""
-#~ "Bu ünvan dəftərini aça bilmədik. Bu ya səhv bir\n"
-#~ "URI'nin bildirilməsindən ötrü ya da LDAP dəstəyi \n"
-#~ "olmayan bir vericiyə çatmaq istəməsindən ötrüdür.\n"
-#~ "Bir URI bildirdin isə, URI'nin düz olduğunu yoxla və\n"
-#~ "yenə sına. Bir URI bildirimədin isə, bir LDAP vericisinə\n"
-#~ "çatmaq istədin. LDAp'ı istifadə etmək istəyirsənsə , OpenLDAPi(ı)\n"
-#~ "qurub, Evolution'u yenidən yoxlayıb yenidən qurmaq məcburiyyətindəsən.\n"
-
-#~ msgid "SASL"
-#~ msgstr "SASL"
-
-#~ msgid "Find..."
-#~ msgstr "Tap..."
-
-#~ msgid "Open calendar"
-#~ msgstr "Təqvimi aç"
-
-#~ msgid "Save calendar"
-#~ msgstr "Təqvimi qeyd et"
-
-#~ msgid "<b>Error loading calendar:<br>Method not supported"
-#~ msgstr "<b>Təqvim yükləmə xətası:<br>Bu yol dəstəklanmir"
-
-#~ msgid "Alarms timeout after"
-#~ msgstr "Zınqırovun səs kəsilməsi müddəti"
-
-#~ msgid "Enable snoozing for"
-#~ msgstr "Xəbardarlığı Fəallaşdır"
-
-#~ msgid "Highlight"
-#~ msgstr "İşarətlə"
-
-#~ msgid "Items Due Today:"
-#~ msgstr "Bügunkü İşlər:"
-
-#~ msgid "Items Not Yet Due"
-#~ msgstr "Hələ Bitirilməmiş İşlər"
-
-#~ msgid "Items Not Yet Due:"
-#~ msgstr "Hələ Bitirilməmiş İşlər:"
-
-#~ msgid "Overdue Items:"
-#~ msgstr "Vaxtı Keçmiş İşlər:"
-
-#~ msgid "Time Until Due"
-#~ msgstr "Keçməsinə qədər qalan vaxt"
-
-#~ msgid "Visual Alarms"
-#~ msgstr "Göstərişli Xəbərdarlıqlar"
-
-#~ msgid "Work week"
-#~ msgstr "İş Həftəsi"
-
-#~ msgid "Edit Task"
-#~ msgstr "Vəzifəni Düzəlt"
-
-#~ msgid "Percent complete"
-#~ msgstr "Faiz Qurtardı"
-
-#~ msgid "Mark the task complete"
-#~ msgstr "Vəzifə qurtarmasını işarətlə"
-
-#~ msgid "Edit this task..."
-#~ msgstr "Bu vəzifəni düzəlt ..."
-
-#~ msgid "Edit the task"
-#~ msgstr "Vəzifəni Düzəlt"
-
-#~ msgid "Component successfully updated."
-#~ msgstr "Komponenet müvəffəqiyyətlə güncəlləndi."
-
-#~ msgid "I couldn't load your calendar file!\n"
-#~ msgstr "Təqvim faylını yükləyə bilmirəm!\n"
-
-#~ msgid "I couldn't read your calendar file!\n"
-#~ msgstr "Təqvim faylını oxuya bilmirəm!\n"
-
-#~ msgid "This is a reply from someone who was uninvited!"
-#~ msgstr "Bu, dəvət edilməmiş biri tərəfindən verilən cavabdır!"
-
-#~ msgid "I couldn't update your calendar store."
-#~ msgstr "Təqvim mə'lumatlarını güncəlləyə bilmirəm."
-
-#~ msgid "I couldn't delete the calendar component!\n"
-#~ msgstr "Təqvim komponenetini silə bilmirəm!\n"
-
-#~ msgid "Component successfully deleted."
-#~ msgstr "Komponenet müvəffəqiyyətlə silindi."
-
-#~ msgid "I don't recognize this type of calendar component."
-#~ msgstr "Bu cür təqvim parçasından başım çıxmır."
-
-#~ msgid "Add to Calendar"
-#~ msgstr "Təqvimə Əlavə Et"
-
-#~ msgid " Tentative "
-#~ msgstr " Girişimli"
-
-#~ msgid "Update Calendar"
-#~ msgstr "Təqvimi Güncəllə"
-
-#~ msgid "Attendees: "
-#~ msgstr "Ziyarətçilər:"
-
-#~ msgid ""
-#~ "Cancel\n"
-#~ "Meeting"
-#~ msgstr ""
-#~ "Görüşü\n"
-#~ "Ləğv Et"
-
-#~ msgid "Organizer: "
-#~ msgstr "Təşkilatçı:"
-
-#~ msgid ""
-#~ "Publish\n"
-#~ "Event"
-#~ msgstr ""
-#~ "Hadisəni\n"
-#~ "Dərc Et"
-
-#~ msgid "Show a dialog"
-#~ msgstr "Dialoqu göstər"
-
-#~ msgid "Appointment Basics"
-#~ msgstr "Görüş Əsasları"
-
-#~ msgid "Has category"
-#~ msgstr "Kateqoriyaya sahib olan"
-
-#~ msgid "Could not test lock file for %s: %s"
-#~ msgstr "%s üçün qıfıl faylı sınana bilmədi: %s"
-
-#~ msgid "Inline attachment"
-#~ msgstr "Daxili yapışdırma"
-
-#~ msgid "Send as:"
-#~ msgstr "Fərqli göndər:"
-
-#~ msgid "That is not a regular file."
-#~ msgstr "Bu normal bir fayl deyildir ."
-
-#~ msgid "That file exists but is not readable."
-#~ msgstr "Bu fayl vardır amma oxuna bilən deyildir ."
-
-#~ msgid "That file appeared accesible but open(2) failed."
-#~ msgstr ""
-#~ "Bu fayl əl çatıla biləndi dəyəsən amma open(2)-çağırışı iflas etdi ."
-
-#~ msgid ""
-#~ "The file is very large (more than 100K).\n"
-#~ "Are you sure you wish to insert it?"
-#~ msgstr ""
-#~ "Bu fayl çox böyükdür ( 100 KB'dən böyük ! ) .\n"
-#~ "Bu faylı daxil etmək istəyirsanmi?"
-
-#~ msgid "%I:%M:%S %p%n"
-#~ msgstr "%I:%M:%S %p%n"
-
-#~ msgid "%H:%M:%S%n"
-#~ msgstr "%H:%M:%S%n"
-
-#~ msgid "%I:%M %p%n"
-#~ msgstr "%I:%M %p%n"
-
-#~ msgid "%H:%M%n"
-#~ msgstr "%H:%M%n"
-
-#~ msgid ""
-#~ "Cannot open the HTML file:\n"
-#~ "%s"
-#~ msgstr ""
-#~ "Html Faylını aça bilmədim:\n"
-#~ "%s"
-
-#~ msgid "File does not have a place for the services.\n"
-#~ msgstr "Faylının xidmətlər üçün ayrılmış sahəsi yoxdur.\n"
-
-#~ msgid ""
-#~ "You can select a different HTML page for the background of the Executive "
-#~ "Summary.\n"
-#~ "\n"
-#~ "Just leave it blank for the default"
-#~ msgstr ""
-#~ "İcracı Mündəricatının arxaplanı üçün başqa HTML səhifəsi seçə bilərsiniz\n"
-#~ "\n"
-#~ "Ana seçənək üçün boş buraxın"
-
-#~ msgid "Open %s with the default GNOME application"
-#~ msgstr "%s i əsas GNOME proqramı ilə aç"
-
-#~ msgid "Open %s with the default GNOME web browser"
-#~ msgstr "%s i əsas GNOME səyyahı ilə aç"
-
-#~ msgid "Send an email to %s"
-#~ msgstr "%s a(ə) məktub göndər"
-
-#~ msgid "Run %s"
-#~ msgstr "%s i(ı) İşə sal"
-
-#~ msgid "Close %s"
-#~ msgstr "%s i(ı) Qapat"
-
-#~ msgid "Move %s to the left"
-#~ msgstr "%s i(ı) sola köçür"
-
-#~ msgid "Move %s to the right"
-#~ msgstr "%s i(ı) sağa köçür"
-
-#~ msgid "Move %s into the previous row"
-#~ msgstr "%s i(ı) əvvəlki sətirə köçür"
-
-#~ msgid "Move %s into the next row"
-#~ msgstr "%s i(ı) sonrakı sətirə köçür"
-
-#~ msgid "Appearance"
-#~ msgstr "GÖrünüş"
-
-#~ msgid "Background:"
-#~ msgstr "Arxaplan:"
-
-#~ msgid ""
-#~ "Executive summary component could not initialize Bonobo.\n"
-#~ "If there was a warning message about the RootPOA, it probably means\n"
-#~ "you compiled Bonobo against GOAD instead of OAF."
-#~ msgstr ""
-#~ "İcracı mündəricatı üzvü Bonoboyu başlada bilmədi.\n"
-#~ "Əgər RootPOA haqqında xəbərdarlıq aldınız isə, deməli Bonoboyu OAG "
-#~ "yerinə\n"
-#~ "GOAD ila dayıqladınız."
-
-#~ msgid "Factory for the RDF summary."
-#~ msgstr "RDF mündəricatı e'malatxanası."
-
-#~ msgid "Factory for the test bonobo component."
-#~ msgstr "Sınaq bonobo parçası e'malatxanası."
-
-#~ msgid "Factory for the test component."
-#~ msgstr "Sınaq parçası e'malatxanası."
-
-#~ msgid "Test bonobo service"
-#~ msgstr "Bonobo xidməti"
-
-#~ msgid "Test service"
-#~ msgstr "Sınaq xidməti"
-
-#~ msgid "Update automatically"
-#~ msgstr "Avtomatik güncəllə"
-
-#~ msgid "Forward to Address"
-#~ msgstr "İsmarıcı ünvana irəlilət"
-
-#~ msgid "Change folder \"%s\" to \"%s\" format"
-#~ msgstr "\"%s\" qovluğunu \"%s\" şəklinə çevir"
-
-#~ msgid "Closing current folder"
-#~ msgstr "Hazırkı qovluq qapadılır"
-
-#~ msgid "Renaming old folder and opening"
-#~ msgstr "Köhnə qovluğun adı dəyişdirilir və açılır"
-
-#~ msgid "Evolution progress"
-#~ msgstr "\"Evolution\"un gedişi"
-
-#~ msgid "Retrieving message number %d of %d (uid \"%s\")"
-#~ msgstr "%d nin %d ismarıcı alınır (uid \"%s\")"
-
-#~ msgid "Saving message %d of %d (uid \"%s\")"
-#~ msgstr "%d nin %d ismarıcı qeyd edilir (uid \"%s\")"
-
-#~ msgid "Incomplete message written on pipe!"
-#~ msgstr "Borulamadan xəsərli bir ismarıc gəldi !"
-
-#~ msgid "[%s] (forwarded message)"
-#~ msgstr "[%s] (çatdırilmiş ismarıc)"
-
-#~ msgid "Forwarded message (no subject)"
-#~ msgstr "Çatdırılmış ismarıc (mövzusuz)"
-
-#~ msgid ""
-#~ "-----Forwarded Message-----<br><b>From:</b> %s<br><b>To:</b> %"
-#~ "s<br><b>Subject:</b> %s<br>"
-#~ msgstr ""
-#~ "-----Çatdırılmış İsmarıc-----<br><b>Göndərən:</b> %s<br><b>Göndərilən:</"
-#~ "b> %s<br><b>Mövzu:</b> %s<br>"
-
-#~ msgid "Print the selected message"
-#~ msgstr "Seçili ismarıcı çap et"
-
-#~ msgid "Delete this message"
-#~ msgstr "Bu ismarıcı sil"
-
-#~ msgid "Evolution files successfully installed."
-#~ msgstr "\"Evolution\" faylları müvəffəqiyyətlə quruldu."
-
-#~ msgid "Activate"
-#~ msgstr "Fəallaşdır"
-
-#~ msgid "Activate this shortcut"
-#~ msgstr "Bu qısa yolu fəallaşdırs"
-
-#~ msgid "Find a contact"
-#~ msgstr "Bir əlaqəni axtar"
-
-#~ msgid "View All"
-#~ msgstr "Hamısını Göstər"
-
-#~ msgid "View all contacts"
-#~ msgstr "Bütün əlaqələri göstər"
-
-#~ msgid "5 Days"
-#~ msgstr "5 gün"
-
-#~ msgid "Create a new calendar"
-#~ msgstr "Yeni bir təqvim yarat"
-
-#~ msgid "New _Event"
-#~ msgstr "Yeni _Hadisə"
-
-#~ msgid "Open Calendar"
-#~ msgstr "Təqvimi Aç"
-
-#~ msgid "Prev"
-#~ msgstr "Geri"
-
-#~ msgid "Save calendar as something else"
-#~ msgstr "Təqvimi başqa şey olaraq qeyd et"
-
-#~ msgid "_Open Calendar"
-#~ msgstr "_Təqvimi aç"
-
-#~ msgid "About this application"
-#~ msgstr "Bu proqram tə'minatı haqqında"
-
-#~ msgid "About..."
-#~ msgstr "Haqqında..."
-
-#~ msgid "Actio_ns"
-#~ msgstr "Gediş_lər"
-
-#~ msgid "Address _Book... (FIXME)"
-#~ msgstr "Ünvan _Dəftəri ... (FIXME)"
-
-#~ msgid "Chec_k Names (FIXME)"
-#~ msgstr "Adları Y_oxla (FIXME)"
-
-#~ msgid "Cop_y to Folder... (FIXME)"
-#~ msgstr "Qovluğa Kö_çür... (FIXME)"
-
-#~ msgid "Dump XML"
-#~ msgstr "XML yekunu"
-
-#~ msgid "Dump the UI Xml description"
-#~ msgstr "UI Xml yekununu çıxart"
-
-#~ msgid "Fi_rst Item in Folder (FIXME)"
-#~ msgstr "Qovluqdakı _İlk Üzv (FIXME)"
-
-#~ msgid "For_ward (FIXME)"
-#~ msgstr "Çat_dır (FIXME)"
-
-#~ msgid "Go to the next item"
-#~ msgstr "İrəlidəki Üzvə Get"
-
-#~ msgid "Go to the previous item"
-#~ msgstr "Əvvəlki Üzvə Get"
-
-#~ msgid "In_complete Task (FIXME)"
-#~ msgstr "Nata_mam Vəzifə (FIXME)"
-
-#~ msgid "N_ext"
-#~ msgstr "_Sonrakı"
-
-#~ msgid "Pre_vious"
-#~ msgstr "_Geri"
-
-#~ msgid "Print S_etup..."
-#~ msgstr "Çap _Qurğuları..."
-
-#~ msgid "Schedule some sort of a meeting"
-#~ msgstr "Bəzi növ görüşləri planlaşdır"
-
-#~ msgid "Select everything"
-#~ msgstr "Hər şeyi seçin"
-
-#~ msgid "_About..."
-#~ msgstr "_Haqqında..."
-
-#~ msgid "_Item (FIXME)"
-#~ msgstr "_Üzv (FIXME)"
-
-#~ msgid "_Journal Entry (FIXME)"
-#~ msgstr "_Jurnal Girişi (FIXME)"
-
-#~ msgid "_Last Item in Folder (FIXME)"
-#~ msgstr "Qovluqdakı _Axırıncı Üzv (FIXME)"
-
-#~ msgid "_Mail Message (FIXME)"
-#~ msgstr "e_Poçt İsmarıcı (FIXME)"
-
-#~ msgid "_Move to Folder... (FIXME)"
-#~ msgstr "Qovluğa _Daşı ... (FIXME)"
-
-#~ msgid "_Note (FIXME)"
-#~ msgstr "_Qeyd (FIXME)"
-
-#~ msgid "_Unread Item (FIXME)"
-#~ msgstr "_Oxunmamuş Üzv (FIXME)"
-
-#~ msgid "Add Service"
-#~ msgstr "Xidmət Əlavə Et"
-
-#~ msgid "Add a new service to the Executive Summary"
-#~ msgstr "İcracı Mündəricata yeni xidmət əlavə et"
-
-#~ msgid "Create a new email"
-#~ msgstr "Yeni bir məktub yarat"
-
-#~ msgid "Apply any new filters to the mail in this box"
-#~ msgstr "Əlavə Et hədəfin"
-
-#~ msgid "Configure Folder..."
-#~ msgstr "Cərgə Qur..."
-
-#~ msgid "Copy message to a new folder"
-#~ msgstr "İsmarıcları yeni bir qovluğa daşı"
-
-#~ msgid "Edit the current message"
-#~ msgstr "Güncəl ismarıcı düzəlt"
-
-#~ msgid "Expunge"
-#~ msgstr "Sil"
-
-#~ msgid "Finaly remove all mails tagged for deletion"
-#~ msgstr "Axırda silmək üçün işarətli bütün məktubları sil"
-
-#~ msgid "Forward inline"
-#~ msgstr "Həmən çatdır"
-
-#~ msgid "Forward this message in-line with your mail, so you can edit it"
-#~ msgstr "Bu ismarıcı düzəltdikdün sonra çatdır"
-
-#~ msgid "Invert Selection"
-#~ msgstr "Seçimi Tərsinə Çevir"
-
-#~ msgid "Mark As Read"
-#~ msgstr "Oxunmuş Olaraq İşarətlə"
-
-#~ msgid "Mark As U_nread"
-#~ msgstr "Oxun_mamış Olaraq İşarətlə"
-
-#~ msgid "Move message to a new folder"
-#~ msgstr "İsmarıcı yeni bir qovluğa daşı"
-
-#~ msgid "Print Preview of message..."
-#~ msgstr "İsmarıcın çap etmə Nümayişi..."
-
-#~ msgid "Print message to the printer"
-#~ msgstr "İsmarıcı çap et"
-
-#~ msgid "Redirect (FIXME: implement me)"
-#~ msgstr "İstiqamətləndir (FIXME: məni qəbul et)"
-
-#~ msgid "Reply to all"
-#~ msgstr "Hamısına cavab ver"
-
-#~ msgid "Reply to sender"
-#~ msgstr "Göndərənə cavab ver"
-
-#~ msgid "S_ource"
-#~ msgstr "Qa_ynaq"
-
-#~ msgid "Send a reply to the person who sent you this mail"
-#~ msgstr "Bu ismarıcı sizə göndərən nəfərə bir cavab yazın"
-
-#~ msgid "Send a single mail in reply to all the selected mail"
-#~ msgstr "Bütün seçili məktublara tək məktub yolla"
-
-#~ msgid ""
-#~ "Send queued mail\n"
-#~ " and retrieve new mail"
-#~ msgstr ""
-#~ "Növbədəki ismarıcları göndər\n"
-#~ " və yeni ismarıcları al"
-
-#~ msgid "View Raw Message Source"
-#~ msgstr "Çiy İsmarıc Qaynağını Göstər"
-
-#~ msgid "_Reply"
-#~ msgstr "_Cavabla"
-
-#~ msgid "_Threaded"
-#~ msgstr "_İlgəklənmiş"
-
-#~ msgid "Save in _folder... (FIXME)"
-#~ msgstr "_Qovluqda Qeyd Et ... (ABY)"
-
-#~ msgid "Send the message now"
-#~ msgstr "İsmarıcı indi göndər"
-
-#~ msgid "_Insert text file... (FIXME)"
-#~ msgstr "_Mətn faylını daxil et ... ( ABY )"
-
-#~ msgid "Redo"
-#~ msgstr "Yenidən Et"
-
-#~ msgid "Redo the undone action"
-#~ msgstr "Geriyə alına gedişi yenidən et"
-
-#~ msgid "Replace"
-#~ msgstr "Dəyişdir"
-
-#~ msgid "Replace a string"
-#~ msgstr "Kəliməni dəyişdir"
-
-#~ msgid "Reply to A_ll (FIXME)"
-#~ msgstr "_Hamısına Cavab Ver (FIXME)"
-
-#~ msgid "S_end Status Report (FIXME)"
-#~ msgstr "Vəziyyət Raportunu _GÖndər (FIXME)"
-
-#~ msgid "S_kip Occurrence (FIXME)"
-#~ msgstr "Təkrarlamanı _Keç (FIXME)"
-
-#~ msgid "Search again for the same string"
-#~ msgstr "Eyni kəliməni yenə axtar"
-
-#~ msgid "Search for a string"
-#~ msgstr "Kəliməni axtar"
-
-#~ msgid "Undo"
-#~ msgstr "Geriyə Al"
-
-#~ msgid "Undo the last action"
-#~ msgstr "Axırıncı gedişi geriyə al"
-
-#~ msgid "_Mark Complete (FIXME)"
-#~ msgstr "_İşarətləmə Qurtardı (FIXME)"
-
-#~ msgid "_Reply (FIXME)"
-#~ msgstr "_Cavab Ver (FIXME)"
-
-#~ msgid "Advanced ..."
-#~ msgstr "Ətraflı ..."
diff --git a/po/bg.po b/po/bg.po
deleted file mode 100644
index 1bca771239..0000000000
--- a/po/bg.po
+++ /dev/null
@@ -1,14560 +0,0 @@
-# Evolution 0.9 Bulgarian translation.
-# Copyright (C) 1999,2000 Free Software Foundation, Inc.
-# GNOME Bulgaria Translators <gnome-bg-translators@lists.sourceforge.net>, 2001
-# For more information see http://gnome-bg.sourceforge.net
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: 0.9\n"
-"POT-Creation-Date: 2001-10-01 19:06-0400\n"
-"PO-Revision-Date: 2001-09-08 18:35+0200\n"
-"Last-Translator: Nikolay Hristov <geroy@stemo.bg>\n"
-"Language-Team: Bulgarian <bg@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CP1251\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in.h:1
-msgid "Factory to import VCard files into Evolution."
-msgstr ""
-
-#: addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in.h:2
-msgid "Imports VCard files into Evolution."
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:58
-#: addressbook/gui/widgets/e-addressbook-view.c:868
-#, fuzzy
-msgid "File As"
-msgstr " :"
-
-#: addressbook/backend/ebook/e-card-simple.c:59
-msgid "Name"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:60
-#: addressbook/gui/widgets/e-addressbook-view.c:870
-msgid "Email"
-msgstr "Email"
-
-#: addressbook/backend/ebook/e-card-simple.c:61
-#: addressbook/gui/contact-editor/e-contact-editor.c:1609
-msgid "Primary"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:61
-#, fuzzy
-msgid "Prim"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:62
-#: addressbook/backend/ebook/e-card-simple.c:92
-#: addressbook/gui/contact-editor/e-contact-editor.c:1594
-#: addressbook/gui/widgets/e-addressbook-view.c:902
-msgid "Assistant"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:63
-#: addressbook/backend/ebook/e-card-simple.c:68
-#: addressbook/gui/contact-editor/e-contact-editor.c:1595
-#: addressbook/gui/contact-editor/e-contact-editor.c:1662
-msgid "Business"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:63
-#: addressbook/backend/ebook/e-card-simple.c:68
-msgid "Bus"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:64
-#: addressbook/gui/contact-editor/e-contact-editor.c:1598
-msgid "Callback"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:65
-#: addressbook/gui/contact-editor/e-contact-editor.c:1600
-msgid "Company"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:65
-#, fuzzy
-msgid "Comp"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:66
-#: addressbook/backend/ebook/e-card-simple.c:69
-#: addressbook/gui/contact-editor/e-contact-editor.c:1601
-#: addressbook/gui/contact-editor/e-contact-editor.c:1663
-msgid "Home"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:67
-#: addressbook/gui/widgets/e-addressbook-view.c:877
-msgid "Organization"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:67
-msgid "Org"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:70
-#: addressbook/gui/contact-editor/e-contact-editor.c:1605
-msgid "Mobile"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:71
-#: addressbook/gui/contact-editor/e-contact-editor.c:1599
-msgid "Car"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:72
-#: addressbook/gui/contact-editor/e-contact-editor.c:1597
-#: addressbook/gui/widgets/e-addressbook-view.c:882
-msgid "Business Fax"
-msgstr ". "
-
-#: addressbook/backend/ebook/e-card-simple.c:72
-#, fuzzy
-msgid "Bus Fax"
-msgstr ". "
-
-#: addressbook/backend/ebook/e-card-simple.c:73
-#: addressbook/gui/contact-editor/e-contact-editor.c:1603
-#: addressbook/gui/widgets/e-addressbook-view.c:883
-msgid "Home Fax"
-msgstr " "
-
-#: addressbook/backend/ebook/e-card-simple.c:74
-#: addressbook/gui/contact-editor/e-contact-editor.c:1596
-msgid "Business 2"
-msgstr " 2"
-
-#: addressbook/backend/ebook/e-card-simple.c:74
-#, fuzzy
-msgid "Bus 2"
-msgstr " 2"
-
-#: addressbook/backend/ebook/e-card-simple.c:75
-#: addressbook/gui/contact-editor/e-contact-editor.c:1602
-msgid "Home 2"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:76
-#: addressbook/gui/contact-editor/e-contact-editor.c:1604
-#: addressbook/gui/widgets/e-addressbook-view.c:886
-msgid "ISDN"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:77
-#: addressbook/backend/ebook/e-card-simple.c:83
-#: addressbook/gui/contact-editor/e-contact-editor.c:1606
-#: addressbook/gui/contact-editor/e-contact-editor.c:1664
-#: mail/mail-config.glade.h:52
-msgid "Other"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:78
-#: addressbook/gui/contact-editor/e-contact-editor.c:1607
-#: addressbook/gui/widgets/e-addressbook-view.c:888
-msgid "Other Fax"
-msgstr " "
-
-#: addressbook/backend/ebook/e-card-simple.c:79
-#: addressbook/gui/contact-editor/e-contact-editor.c:1608
-#: addressbook/gui/widgets/e-addressbook-view.c:889
-msgid "Pager"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:80
-#: addressbook/gui/contact-editor/e-contact-editor.c:1610
-#: addressbook/gui/widgets/e-addressbook-view.c:890
-msgid "Radio"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:81
-#: addressbook/gui/contact-editor/e-contact-editor.c:1611
-#: addressbook/gui/widgets/e-addressbook-view.c:891
-msgid "Telex"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:82
-#: addressbook/gui/widgets/e-addressbook-view.c:892
-msgid "TTY"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:84
-#: addressbook/gui/component/e-address-popup.c:476
-#: addressbook/gui/contact-editor/e-contact-editor.c:1637
-#: addressbook/gui/widgets/e-addressbook-view.c:894
-msgid "Email 2"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:85
-#: addressbook/gui/component/e-address-popup.c:486
-#: addressbook/gui/contact-editor/e-contact-editor.c:1638
-#: addressbook/gui/widgets/e-addressbook-view.c:895
-msgid "Email 3"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:86
-#: addressbook/gui/widgets/e-addressbook-view.c:896
-msgid "Web Site"
-msgstr "Web "
-
-#: addressbook/backend/ebook/e-card-simple.c:86
-msgid "Url"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:87
-#: addressbook/gui/widgets/e-addressbook-view.c:897
-msgid "Department"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:87
-msgid "Dep"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:88
-#: addressbook/gui/widgets/e-addressbook-view.c:898
-msgid "Office"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:88
-#, fuzzy
-msgid "Off"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:89
-#: addressbook/gui/widgets/e-addressbook-view.c:899
-msgid "Title"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:90
-#: addressbook/gui/widgets/e-addressbook-view.c:900
-msgid "Profession"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:90
-msgid "Prof"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:91
-#: addressbook/gui/widgets/e-addressbook-view.c:901
-msgid "Manager"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:91
-#, fuzzy
-msgid "Man"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:92
-msgid "Ass"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:93
-#: addressbook/gui/widgets/e-addressbook-view.c:903
-msgid "Nickname"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:93
-#, fuzzy
-msgid "Nick"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:94
-#: addressbook/gui/widgets/e-addressbook-view.c:904
-msgid "Spouse"
-msgstr "()"
-
-#: addressbook/backend/ebook/e-card-simple.c:95
-#: addressbook/gui/widgets/e-addressbook-view.c:905
-msgid "Note"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:96
-#, fuzzy
-msgid "Calendar URI"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:96
-msgid "CALUri"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:97
-#: addressbook/gui/widgets/e-addressbook-view.c:906
-msgid "Free-busy URL"
-msgstr "Free-busy "
-
-#: addressbook/backend/ebook/e-card-simple.c:97
-msgid "FBUrl"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:98
-#, fuzzy
-msgid "Anniversary"
-msgstr ":"
-
-#: addressbook/backend/ebook/e-card-simple.c:98
-msgid "Anniv"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:99
-#, fuzzy
-msgid "Birth Date"
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card-simple.c:102
-#: calendar/gui/e-calendar-table.etspec.h:4
-msgid "Categories"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:103
-#, fuzzy
-msgid "Family Name"
-msgstr " :"
-
-#: addressbook/backend/ebook/e-card.c:3564
-msgid "Card: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3566
-msgid ""
-"\n"
-"Name: "
-msgstr ""
-"\n"
-": "
-
-#: addressbook/backend/ebook/e-card.c:3567
-msgid ""
-"\n"
-" Prefix: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3568
-msgid ""
-"\n"
-" Given: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3569
-msgid ""
-"\n"
-" Additional: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3570
-msgid ""
-"\n"
-" Family: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3571
-msgid ""
-"\n"
-" Suffix: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3585
-msgid ""
-"\n"
-"Birth Date: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3596
-msgid ""
-"\n"
-"Address:"
-msgstr ""
-"\n"
-":"
-
-#: addressbook/backend/ebook/e-card.c:3598
-msgid ""
-"\n"
-" Postal Box: "
-msgstr ""
-"\n"
-" :"
-
-#: addressbook/backend/ebook/e-card.c:3599
-msgid ""
-"\n"
-" Ext: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3600
-msgid ""
-"\n"
-" Street: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3601
-msgid ""
-"\n"
-" City: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3602
-msgid ""
-"\n"
-" Region: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3603
-msgid ""
-"\n"
-" Postal Code: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3604
-msgid ""
-"\n"
-" Country: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3617
-msgid ""
-"\n"
-"Delivery Label: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3629
-msgid ""
-"\n"
-"Telephones:\n"
-msgstr ""
-"\n"
-" :\n"
-
-#: addressbook/backend/ebook/e-card.c:3632
-msgid ""
-"\n"
-"Telephone:"
-msgstr ""
-"\n"
-" :"
-
-#: addressbook/backend/ebook/e-card.c:3656
-msgid ""
-"\n"
-"E-mail:\n"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3659
-msgid ""
-"\n"
-"E-mail:"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3678
-msgid ""
-"\n"
-"Mailer: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3684
-msgid ""
-"\n"
-"Time Zone: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3692
-msgid ""
-"\n"
-"Geo Location: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3696
-msgid ""
-"\n"
-"Business Role: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3708
-msgid ""
-"\n"
-"Org: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3709
-msgid ""
-"\n"
-" Name: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3710
-msgid ""
-"\n"
-" Unit: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3711
-msgid ""
-"\n"
-" Unit2: "
-msgstr ""
-"\n"
-" 2: "
-
-#: addressbook/backend/ebook/e-card.c:3712
-msgid ""
-"\n"
-" Unit3: "
-msgstr ""
-"\n"
-" 3: "
-
-#: addressbook/backend/ebook/e-card.c:3713
-msgid ""
-"\n"
-" Unit4: "
-msgstr ""
-"\n"
-" 4: "
-
-#: addressbook/backend/ebook/e-card.c:3717
-msgid ""
-"\n"
-"Categories: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3718
-msgid ""
-"\n"
-"Comment: "
-msgstr ""
-"\n"
-":"
-
-#. 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);
-#. }
-#: addressbook/backend/ebook/e-card.c:3731
-msgid ""
-"\n"
-"Unique String: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:3734
-msgid ""
-"\n"
-"Public Key: "
-msgstr ""
-"\n"
-" : "
-
-#: addressbook/backend/ebook/e-card.c:4087
-msgid "Multiple VCards"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:4095
-#, fuzzy, c-format
-msgid "VCard for %s"
-msgstr " %s"
-
-#: addressbook/backend/ebook/load-gnomecard-addressbook.c:21
-#: addressbook/backend/ebook/load-pine-addressbook.c:22
-#: addressbook/backend/ebook/test-client-list.c:23
-#: addressbook/backend/ebook/test-client.c:33
-#: addressbook/conduit/address-conduit.c:1167
-#: addressbook/gui/component/addressbook-factory.c:48
-#: calendar/conduits/calendar/calendar-conduit.c:1262
-#: calendar/conduits/todo/todo-conduit.c:1034
-#: calendar/gui/alarm-notify/notify-main.c:78 calendar/gui/main.c:63
-msgid "Could not initialize Bonobo"
-msgstr " Bonobo"
-
-#: addressbook/backend/pas/pas-backend-file.c:257
-#: addressbook/backend/pas/pas-backend-ldap.c:2047
-#, fuzzy
-msgid "Searching..."
-msgstr "..."
-
-#: addressbook/backend/pas/pas-backend-file.c:259
-#, fuzzy
-msgid "Loading..."
-msgstr " ..."
-
-#. need a different error message here.
-#: addressbook/backend/pas/pas-backend-file.c:268
-msgid "Error in search expression."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:467
-#, fuzzy
-msgid "Connecting to LDAP server..."
-msgstr " "
-
-#: addressbook/backend/pas/pas-backend-ldap.c:477
-#, fuzzy
-msgid "Unable to connect to LDAP server."
-msgstr " "
-
-#: addressbook/backend/pas/pas-backend-ldap.c:493
-#, fuzzy
-msgid "Waiting for connection to LDAP server..."
-msgstr " "
-
-#: addressbook/backend/pas/pas-backend-ldap.c:862
-msgid "Adding card to LDAP server..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:959
-msgid "Removing card from LDAP server..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1064
-msgid "Modifying card from LDAP server..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1992
-msgid "Receiving LDAP search results..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1997
-msgid "Restarting search."
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:204
-msgid "Cursor could not be loaded\n"
-msgstr "Cursor \n"
-
-#: addressbook/conduit/address-conduit.c:217
-msgid "EBook not loaded\n"
-msgstr "EBook \n"
-
-#: addressbook/conduit/address-conduit.c:731
-#: calendar/conduits/calendar/calendar-conduit.c:837
-#: calendar/conduits/todo/todo-conduit.c:609
-msgid "Could not start wombat server"
-msgstr " wombat "
-
-#: addressbook/conduit/address-conduit.c:732
-#: calendar/conduits/calendar/calendar-conduit.c:838
-#: calendar/conduits/todo/todo-conduit.c:610
-msgid "Could not start wombat"
-msgstr " wombat"
-
-#: addressbook/conduit/address-conduit.c:762
-#: addressbook/conduit/address-conduit.c:765
-msgid "Could not read pilot's Address application block"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:1
-msgid "A Bonobo control for an address popup."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:2
-msgid "A Bonobo control for displaying an address."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:3
-msgid "A sample Bonobo control which displays an addressbook."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:4
-msgid "Control that displays an Evolution addressbook minicard."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:5
-msgid "Evolution Addressbook minicard viewer"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:6
-msgid "Evolution component for handling contacts."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:7
-msgid "Factory for the Addressbook Minicard control"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:8
-msgid "Factory for the Addressbook's address displayer"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:9
-msgid "Factory for the Addressbook's address popup"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:10
-msgid "Factory for the sample Addressbook control"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-component.c:66
-#: calendar/gui/dialogs/comp-editor-util.c:289
-#: calendar/gui/dialogs/comp-editor-util.c:345 shell/e-local-storage.c:173
-#: shell/e-shortcuts.c:1062
-#, fuzzy
-msgid "Contacts"
-msgstr "_"
-
-#: addressbook/gui/component/addressbook-component.c:66
-#, fuzzy
-msgid "Folder containing contact information"
-msgstr ""
-" :\n"
-"%s"
-
-#: addressbook/gui/component/addressbook-component.c:68
-msgid "LDAP Server"
-msgstr "LDAP "
-
-#: addressbook/gui/component/addressbook-component.c:68
-msgid "LDAP server containing contact information"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-component.c:411
-#: ui/evolution-addressbook.xml.h:11
-#, fuzzy
-msgid "New Contact"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-component.c:411
-#, fuzzy
-msgid "New _Contact"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-component.c:412
-#, fuzzy
-msgid "New Contact List"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-component.c:412
-#, fuzzy
-msgid "New Contact _List"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-config.c:188
-msgid "Edit Addressbook"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-config.glade.h:1
-msgid "389"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:2
-#, fuzzy
-msgid "Account Name"
-msgstr "Account "
-
-#: addressbook/gui/component/addressbook-config.glade.h:3
-msgid "Add Addressbook"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-config.glade.h:4
-msgid "Addressbook Sources"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-config.glade.h:5
-msgid "Advanced"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:6
-msgid "Base"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:7
-#: calendar/gui/dialogs/task-editor.c:172
-#, fuzzy
-msgid "Basic"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:8
-#, fuzzy
-msgid "De_lete"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:9
-msgid "One"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:10
-#, fuzzy
-msgid "Search _base:"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:11
-msgid "Search s_cope: "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:12
-#, fuzzy
-msgid "Server Name"
-msgstr " "
-
-#: addressbook/gui/component/addressbook-config.glade.h:13
-#, fuzzy
-msgid "Sub"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:14
-msgid "The information below is required in order to add an addressbook. "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:15
-msgid "This information is not required for most ldap servers. "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:16
-msgid ""
-"This information is used by your ldap server to specify which nodes are used "
-"in a search. Contact your server administrator for more information."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:17
-msgid ""
-"This is the base node for all your searches on the ldap server. Contact your "
-"server administrator for more information."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:18
-msgid "This is the name of the server where your addressbook is located."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:19
-msgid "This is the port that your ldap server uses."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:20
-msgid ""
-"This name will be used to identify your account. It is for display purposes "
-"only."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:21
-#, fuzzy
-msgid "_Account name:"
-msgstr " :"
-
-#: addressbook/gui/component/addressbook-config.glade.h:22
-#: addressbook/gui/contact-editor/contact-editor.glade.h:19
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:4
-#: calendar/gui/dialogs/alarm-page.glade.h:8 filter/filter.glade.h:7
-#: mail/mail-config.glade.h:91 my-evolution/my-evolution.glade.h:20
-msgid "_Add"
-msgstr "_"
-
-#: addressbook/gui/component/addressbook-config.glade.h:23
-#: filter/filter.glade.h:9 mail/mail-config.glade.h:96
-#: ui/evolution-addressbook.xml.h:34 ui/evolution-calendar.xml.h:39
-#: ui/evolution-mail-list.xml.h:25 ui/evolution-mail-messagedisplay.xml.h:6
-#: ui/evolution-message-composer.xml.h:47
-#: ui/evolution-signature-editor.xml.h:6 ui/evolution-subscribe.xml.h:10
-#: ui/evolution-tasks.xml.h:16
-msgid "_Edit"
-msgstr "_"
-
-#: addressbook/gui/component/addressbook-config.glade.h:24
-#, fuzzy
-msgid "_My server requires authentication"
-msgstr " authentication"
-
-#: addressbook/gui/component/addressbook-config.glade.h:25
-#, fuzzy
-msgid "_Port:"
-msgstr ":"
-
-#: addressbook/gui/component/addressbook-config.glade.h:26
-#, fuzzy
-msgid "_Server name:"
-msgstr " :"
-
-#: addressbook/gui/component/addressbook-storage.c:163
-msgid "Other Contacts"
-msgstr " "
-
-#: addressbook/gui/component/addressbook.c:407
-#, fuzzy, c-format
-msgid "Please enter your email address and password for access to %s"
-msgstr " NNTP %s@%s"
-
-#: addressbook/gui/component/addressbook.c:415
-#, fuzzy
-msgid "LDAP Authentication"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:426
-msgid "Email Address:"
-msgstr "Email :"
-
-#: addressbook/gui/component/addressbook.c:439
-msgid "Password:"
-msgstr ":"
-
-#: addressbook/gui/component/addressbook.c:502
-msgid "Unable to open addressbook"
-msgstr " "
-
-#: addressbook/gui/component/addressbook.c:509
-msgid ""
-"We were unable to open this addressbook. This either\n"
-"means you have entered an incorrect URI, or the LDAP server\n"
-"is down"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:514
-msgid ""
-"This version of Evolution does not have LDAP support\n"
-"compiled in to it. If you want to use LDAP in Evolution\n"
-"you must compile the program from the CVS sources after\n"
-"retrieving OpenLDAP from the link below.\n"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:522
-msgid ""
-"We were unable to open this addressbook. Please check that the\n"
-"path exists and that you have permission to access it."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:663
-#: calendar/gui/cal-search-bar.c:55
-msgid "Any field contains"
-msgstr " "
-
-#: addressbook/gui/component/addressbook.c:664
-msgid "Name contains"
-msgstr " "
-
-#: addressbook/gui/component/addressbook.c:665
-msgid "Email contains"
-msgstr "Email "
-
-#: addressbook/gui/component/addressbook.c:666
-#: calendar/gui/cal-search-bar.c:59
-#, fuzzy
-msgid "Category is"
-msgstr ""
-
-#. We attach subitems below
-#: addressbook/gui/component/addressbook.c:667 widgets/misc/e-filter-bar.h:97
-#: widgets/misc/e-filter-bar.h:104
-msgid "Advanced..."
-msgstr ""
-
-#. All, unmatched, separator
-#: addressbook/gui/component/addressbook.c:897
-#: calendar/gui/cal-search-bar.c:412
-#, fuzzy
-msgid "Any Category"
-msgstr ":"
-
-#: addressbook/gui/component/addressbook.c:939
-msgid "The URI that the Folder Browser will display"
-msgstr ""
-
-#.
-#. * This is the code for the UI thingie that lets you manipulate the e-mail
-#. * addresses (and *only* the e-mail addresses) associated with an existing
-#. * card.
-#.
-#: addressbook/gui/component/e-address-popup.c:178
-#, fuzzy
-msgid "(none)"
-msgstr "( )"
-
-#: addressbook/gui/component/e-address-popup.c:466
-#: addressbook/gui/contact-editor/contact-editor.glade.h:17
-#: addressbook/gui/contact-editor/e-contact-editor.c:1636
-msgid "Primary Email"
-msgstr " Email"
-
-#: addressbook/gui/component/e-address-popup.c:579
-#, fuzzy
-msgid "Select an Action"
-msgstr " "
-
-#: addressbook/gui/component/e-address-popup.c:585
-#, fuzzy, c-format
-msgid "Create a new contact \"%s\""
-msgstr " "
-
-#: addressbook/gui/component/e-address-popup.c:597
-#, c-format
-msgid "Add address to existing contact \"%s\""
-msgstr ""
-
-#: addressbook/gui/component/e-address-popup.c:859
-#, fuzzy
-msgid "Querying Addressbook..."
-msgstr " "
-
-#: addressbook/gui/component/e-address-popup.c:934
-#: addressbook/gui/component/e-address-widget.c:388
-#: addressbook/gui/component/select-names/e-select-names-popup.c:307
-msgid "Edit Contact Info"
-msgstr ""
-
-#: addressbook/gui/component/e-address-popup.c:963
-#: addressbook/gui/component/e-address-widget.c:424
-#: addressbook/gui/component/select-names/e-select-names-popup.c:486
-#, fuzzy
-msgid "Add to Contacts"
-msgstr " "
-
-#: addressbook/gui/component/e-address-popup.c:1006
-#, fuzzy
-msgid "Merge E-Mail Address"
-msgstr "E-Mail :"
-
-#: addressbook/gui/component/e-address-widget.c:365
-#, fuzzy
-msgid "Disable Queries"
-msgstr "."
-
-#: addressbook/gui/component/e-address-widget.c:365
-msgid "Enable Queries (Dangerous!)"
-msgstr ""
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in.h:1
-msgid "Evolution's addressbook name selection interface."
-msgstr ""
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in.h:2
-msgid "Factory for the Addressbook's name selection interface"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:164
-#: addressbook/gui/component/select-names/e-select-names.c:764
-#: composer/e-msg-composer-attachment-bar.c:477 filter/filter-filter.c:436
-#: filter/filter-rule.c:613 shell/e-shortcuts-view.c:181
-msgid "Remove"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:179
-#, fuzzy
-msgid "Remove All"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:203
-#, fuzzy
-msgid "Send HTML Mail?"
-msgstr " email"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:406
-#, fuzzy
-msgid "Edit Contact List"
-msgstr " "
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:424
-#, fuzzy
-msgid "Unnamed Contact List"
-msgstr " "
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:441
-#, c-format
-msgid "(%d not shown)"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:507
-#, fuzzy
-msgid "Unnamed Contact"
-msgstr " "
-
-#: addressbook/gui/component/select-names/e-select-names.c:521
-msgid ""
-"Evolution is unable to get the addressbook local storage. This may have been "
-"caused by the evolution-addressbook component crashing. To help us better "
-"understand and ultimately resolve this problem, please send an e-mail to Jon "
-"Trowbridge <trow@ximian.com> with a detailed description of the "
-"circumstances under which this error occurred. Thank you."
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names.c:598
-msgid "Select Contacts from Addressbook"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:1
-#, fuzzy
-msgid "C_ontaining:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:2
-#, fuzzy
-msgid "Co_ntacts:"
-msgstr "_"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:3
-#, fuzzy
-msgid "F_ind"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:4
-msgid "Select Names"
-msgstr " "
-
-#: addressbook/gui/component/select-names/select-names.glade.h:5
-msgid "Show contacts matching the following criteria:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:6
-#, fuzzy
-msgid "_Category:"
-msgstr ":"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:7
-#, fuzzy
-msgid "_Folder:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:8
-#, fuzzy
-msgid "_Message Recipients:"
-msgstr " "
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:1
-msgid "Anni_versary:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:2
-msgid "B_usiness"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:3
-msgid "Business _Fax"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:4
-#: calendar/gui/dialogs/event-page.glade.h:3
-#: calendar/gui/dialogs/task-page.glade.h:1
-msgid "Ca_tegories..."
-msgstr "_..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:5
-msgid "Collaboration"
-msgstr ""
-
-#. Construct the app
-#: addressbook/gui/contact-editor/contact-editor.glade.h:6
-#: addressbook/gui/contact-editor/e-contact-editor.c:1241
-msgid "Contact Editor"
-msgstr " "
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:7
-#: calendar/gui/dialogs/task-editor.c:177
-msgid "Details"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:8
-#, fuzzy
-msgid "F_ree/Busy URL:"
-msgstr "Free-busy "
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:9
-#, fuzzy
-msgid "File A_s:"
-msgstr " :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:10
-msgid "General"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:11
-msgid ""
-"If this person publishes free/busy or other calendar information on the "
-"Internet, enter the address\n"
-"of that information here."
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:13
-msgid "New phone type"
-msgstr " "
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:14
-msgid "No_tes:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:15
-#, fuzzy
-msgid "Organi_zation:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:16
-msgid "Phone Types"
-msgstr " "
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:18
-msgid "Wants to receive _HTML mail"
-msgstr " _HTML mail"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:20
-msgid "_Address..."
-msgstr "_..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:21
-msgid "_Assistant's name:"
-msgstr " :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:22
-msgid "_Birthday:"
-msgstr " :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:23
-msgid "_Business"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:24
-#: calendar/gui/dialogs/event-page.glade.h:12
-#: calendar/gui/dialogs/task-page.glade.h:10
-msgid "_Contacts..."
-msgstr "..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:25
-#: calendar/gui/dialogs/alarm-page.glade.h:9
-#: calendar/gui/dialogs/meeting-page.c:834 filter/filter.glade.h:8
-#: mail/folder-browser.c:1406 mail/mail-config.glade.h:95
-#: ui/evolution-calendar.xml.h:38 ui/evolution-mail-message.xml.h:88
-#: ui/evolution-tasks.xml.h:15 ui/evolution.xml.h:35
-msgid "_Delete"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:26
-msgid "_Department:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:27
-msgid "_Full Name..."
-msgstr " ..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:28
-msgid "_Home"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:29
-msgid "_Job title:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:30
-msgid "_Manager's Name:"
-msgstr " :"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:31
-msgid "_Mobile"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:32
-msgid "_Nickname:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:33
-msgid "_Office:"
-msgstr "_:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:34
-msgid "_Profession:"
-msgstr "_:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:35
-#, fuzzy
-msgid "_Public Calendar URL:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:36
-msgid "_Spouse:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:37
-msgid "_This is the mailing address"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:38
-#, fuzzy
-msgid "_Web page address:"
-msgstr "Web :"
-
-#: addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade.h:1
-msgid ""
-"Are you sure you want\n"
-"to delete this contact?"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade.h:3
-msgid "Delete Contact?"
-msgstr " ?"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:759
-msgid "This contact belongs to these categories:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1612
-msgid "TTY/TDD"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:2234
-#, fuzzy, c-format
-msgid "Could not find widget for a field: `%s'"
-msgstr " `%s'"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:283
-msgid "Contact Quick-Add"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:285
-#, fuzzy
-msgid "Edit Full"
-msgstr " "
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:311
-#: addressbook/gui/widgets/e-addressbook-view.c:869
-#, fuzzy
-msgid "Full Name"
-msgstr " :"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:317
-#, fuzzy
-msgid "E-mail"
-msgstr "Email"
-
-#: addressbook/gui/contact-editor/e-contact-save-as.c:137
-#, c-format
-msgid ""
-"%s already exists\n"
-"Do you want to overwrite it?"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:1
-msgid "Address _2:"
-msgstr " _2:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:2
-#, fuzzy
-msgid "Afghanistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:3
-msgid "Albania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:4
-msgid "Algeria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:5
-msgid "American Samoa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:6
-msgid "Andorra"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:7
-msgid "Angola"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:8
-msgid "Anguilla"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:9
-#, fuzzy
-msgid "Antarctica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:10
-msgid "Antigua And Barbuda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:11
-#, fuzzy
-msgid "Argentina"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:12
-msgid "Armenia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:13
-msgid "Aruba"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:14
-msgid "Australia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:15
-#, fuzzy
-msgid "Austria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:16
-msgid "Azerbaijan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:17
-msgid "Bahamas"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:18
-msgid "Bahrain"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:19
-msgid "Bangladesh"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:20
-msgid "Barbados"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:21
-#, fuzzy
-msgid "Belarus"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:22
-msgid "Belgium"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:23
-#, fuzzy
-msgid "Belize"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:24
-#, fuzzy
-msgid "Benin"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:25
-msgid "Bermuda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:26
-msgid "Bhutan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:27
-msgid "Bolivia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:28
-msgid "Bosnia And Herzegowina"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:29
-msgid "Botswana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:30
-msgid "Bouvet Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:31
-msgid "Brazil"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:32
-msgid "British Indian Ocean Territory"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:33
-msgid "British Virgin Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:34
-msgid "Brunei Darussalam"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:35
-msgid "Bulgaria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:36
-msgid "Burkina Faso"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:37
-msgid "Burundi"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:38
-msgid "Cambodia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:39
-msgid "Cameroon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:40
-msgid "Canada"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:41
-msgid "Cape Verde"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:42
-msgid "Cayman Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:43
-msgid "Central African Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:44
-#, fuzzy
-msgid "Chad"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:45
-msgid "Check Address"
-msgstr " "
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:46
-#, fuzzy
-msgid "Chile"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:47
-msgid "China"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:48
-msgid "Christmas Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:49
-msgid "Cocos (Keeling) Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:50
-msgid "Colombia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:51
-#, fuzzy
-msgid "Comoros"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:52
-#, fuzzy
-msgid "Congo"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:53
-msgid "Cook Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:54
-msgid "Costa Rica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:55
-msgid "Cote d'Ivoire"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:56
-msgid "Countr_y:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:57
-msgid "Croatia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:58
-msgid "Cuba"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:59
-msgid "Cyprus"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:60
-msgid "Czech Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:61
-msgid "Denmark"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:62
-msgid "Djibouti"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:63
-msgid "Dominica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:64
-msgid "Dominican Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:65
-msgid "East Timor"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:66
-msgid "Ecuador"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:67
-msgid "Egypt"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:68
-msgid "El Salvador"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:69
-msgid "Equatorial Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:70
-msgid "Eritrea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:71
-msgid "Estonia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:72
-msgid "Ethiopia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:73
-msgid "Falkland Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:74
-msgid "Faroe Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:75
-msgid "Fiji"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:76
-msgid "Finland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:77
-msgid "France"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:78
-msgid "French Guiana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:79
-msgid "French Polynesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:80
-msgid "French Southern Territories"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:81
-msgid "Gabon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:82
-msgid "Gambia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:83
-msgid "Georgia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:84
-msgid "Germany"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:85
-msgid "Ghana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:86
-msgid "Gibraltar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:87
-msgid "Greece"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:88
-#, fuzzy
-msgid "Greenland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:89
-#, fuzzy
-msgid "Grenada"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:90
-msgid "Guadeloupe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:91
-msgid "Guam"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:92
-msgid "Guatemala"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:93
-#, fuzzy
-msgid "Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:94
-msgid "Guinea-bissau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:95
-msgid "Guyana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:96
-msgid "Haiti"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:97
-msgid "Heard And McDonald Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:98
-msgid "Holy See"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:99
-#, fuzzy
-msgid "Honduras"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:100
-msgid "Hong Kong"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:101
-#, fuzzy
-msgid "Hungary"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:102
-msgid "Iceland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:103
-msgid "India"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:104
-msgid "Indonesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:105
-msgid "Ireland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:106
-msgid "Israel"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:107
-msgid "Italy"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:108
-msgid "Jamaica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:109
-msgid "Japan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:110
-msgid "Jordan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:111
-msgid "Kazakhstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:112
-msgid "Kenya"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:113
-msgid "Kiribati"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:114
-msgid "Kuwait"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:115
-msgid "Kyrgyzstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:116
-#, fuzzy
-msgid "Laos"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:117
-msgid "Latvia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:118
-msgid "Lebanon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:119
-msgid "Lesotho"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:120
-msgid "Liberia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:121
-msgid "Liechtenstein"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:122
-msgid "Lithuania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:123
-msgid "Luxembourg"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:124
-#, fuzzy
-msgid "Macau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:125
-msgid "Macedonia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:126
-msgid "Madagascar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:127
-msgid "Malawi"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:128
-msgid "Malaysia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:129
-msgid "Maldives"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:130
-msgid "Mali"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:131
-msgid "Malta"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:132
-msgid "Marshall Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:133
-msgid "Martinique"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:134
-msgid "Mauritania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:135
-#, fuzzy
-msgid "Mauritius"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:136
-#, fuzzy
-msgid "Mayotte"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:137
-msgid "Mexico"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:138
-msgid "Micronesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:139
-#, fuzzy
-msgid "Monaco"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:140
-msgid "Mongolia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:141
-msgid "Montserrat"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:142
-msgid "Morocco"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:143
-msgid "Mozambique"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:144
-#, fuzzy
-msgid "Myanmar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:145
-msgid "Namibia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:146
-msgid "Nauru"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:147
-#, fuzzy
-msgid "Nepal"
-msgstr " Mail"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:148
-msgid "Netherlands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:149
-msgid "Netherlands Antilles"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:150
-#, fuzzy
-msgid "New Caledonia"
-msgstr " "
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:151
-#, fuzzy
-msgid "New Zealand"
-msgstr " Mail"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:152
-msgid "Nicaragua"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:153
-#, fuzzy
-msgid "Niger"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:154
-msgid "Nigeria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:155
-#, fuzzy
-msgid "Niue"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:156
-msgid "Norfolk Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:157
-msgid "Northern Mariana Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:158
-#, fuzzy
-msgid "Norway"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:159
-msgid "Oman"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:160
-msgid "Pakistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:161
-msgid "Palau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:162
-#, fuzzy
-msgid "Panama"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:163
-msgid "Papua New Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:164
-msgid "Paraguay"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:165
-#, fuzzy
-msgid "Peru"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:166
-msgid "Philippines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:167
-msgid "Pitcairn"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:168
-#, fuzzy
-msgid "Poland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:169
-#, fuzzy
-msgid "Portugal"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:170
-msgid "Puerto Rico"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:171
-#, fuzzy
-msgid "Qatar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:172
-msgid "Republic Of Korea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:173
-msgid "Republic Of Moldova"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:174
-msgid "Reunion"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:175
-msgid "Romania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:176
-msgid "Russian Federation"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:177
-#, fuzzy
-msgid "Rwanda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:178
-msgid "Saint Kitts And Nevis"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:179
-msgid "Saint Lucia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:180
-msgid "Saint Vincent And The Grena-dines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:181
-msgid "Samoa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:182
-msgid "San Marino"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:183
-msgid "Sao Tome And Principe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:184
-msgid "Saudi Arabia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:185
-#, fuzzy
-msgid "Senegal"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:186
-msgid "Seychelles"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:187
-msgid "Sierra Leone"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:188
-#, fuzzy
-msgid "Singapore"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:189
-msgid "Slovakia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:190
-msgid "Slovenia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:191
-msgid "Solomon Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:192
-msgid "Somalia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:193
-msgid "South Africa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:194
-msgid "South Georgia And The South Sandwich Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:195
-#, fuzzy
-msgid "Spain"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:196
-msgid "Sri Lanka"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:197
-msgid "St. Helena"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:198
-msgid "St. Pierre And Miquelon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:199
-#, fuzzy
-msgid "Sudan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:200
-#, fuzzy
-msgid "Suriname"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:201
-msgid "Svalbard And Jan Mayen Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:202
-#, fuzzy
-msgid "Swaziland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:203
-#, fuzzy
-msgid "Sweden"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:204
-msgid "Switzerland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:205
-msgid "Taiwan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:206
-msgid "Tajikistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:207
-#, fuzzy
-msgid "Thailand"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:208
-#, fuzzy
-msgid "Togo"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:209
-msgid "Tokelau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:210
-#, fuzzy
-msgid "Tonga"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:211
-msgid "Trinidad And Tobago"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:212
-msgid "Tunisia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:213
-#, fuzzy
-msgid "Turkey"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:214
-msgid "Turkmenistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:215
-msgid "Turks And Caicos Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:216
-msgid "Tuvalu"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:217
-msgid "U.S. Virgin Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:218
-#, fuzzy
-msgid "Uganda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:219
-msgid "Ukraine"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:220
-msgid "United Arab Emirates"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:221
-msgid "United Kingdom"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:222
-msgid "United Republic Of Tanzania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:223
-msgid "United States"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:224
-msgid "United States Minor Outlying Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:225
-msgid "Uruguay"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:226
-msgid "Uzbekistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:227
-msgid "Vanuatu"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:228
-msgid "Venezuela"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:229
-#, fuzzy
-msgid "Viet Nam"
-msgstr " "
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:230
-msgid "Wallis And Futuna Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:231
-msgid "Western Sahara"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:232
-msgid "Yemen"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:233
-msgid "Yugoslavia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:234
-msgid "Zambia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:235
-msgid "Zimbabwe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:236
-msgid "_Address:"
-msgstr "_:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:237
-msgid "_City:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:238
-msgid "_PO Box:"
-msgstr " :"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:239
-msgid "_State/Province:"
-msgstr "/:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:240
-msgid "_ZIP Code:"
-msgstr "_ZIP :"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:1
-msgid "Check Full Name"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:2
-msgid "Dr."
-msgstr "-"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:3
-msgid "Esq."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:4
-msgid "I"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:5
-msgid "II"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:6
-msgid "III"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:7
-msgid "Jr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:8
-msgid "Miss"
-msgstr "-"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:9
-msgid "Mr."
-msgstr "-"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:10
-msgid "Mrs."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:11
-msgid "Ms."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:12
-msgid "Sr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:13
-msgid "_First:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:14
-msgid "_Last:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:15
-msgid "_Middle:"
-msgstr ":"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:16
-msgid "_Suffix:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:17
-msgid "_Title:"
-msgstr ":"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:1
-#, fuzzy
-msgid "List _name:"
-msgstr " :"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:2
-#, fuzzy
-msgid "Members"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:3
-msgid "Type an email address or drag a contact into the list below:"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:5
-msgid "_Hide addresses when sending mail to this list"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:6
-#: calendar/gui/dialogs/recurrence-page.glade.h:12 filter/filter.glade.h:10
-#, fuzzy
-msgid "_Remove"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:7
-#, fuzzy
-msgid "contact-list-editor"
-msgstr " "
-
-#. Construct the app
-#: addressbook/gui/contact-list-editor/e-contact-list-editor.c:229
-#, fuzzy
-msgid "Contact List Editor"
-msgstr " "
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:1
-msgid "Add Anyway"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:2
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:4
-msgid "Duplicate Contact Detected"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:3
-#, fuzzy
-msgid "New Contact:"
-msgstr " "
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:4
-#, fuzzy
-msgid "Original Contact:"
-msgstr " "
-
-#: addressbook/gui/merging/e-card-duplicate-detected.glade.h:5
-msgid ""
-"The name or email address of this contact already exists\n"
-"in this folder. Would you like to add it anyway?"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:1
-msgid "Change Anyway"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:2
-#, fuzzy
-msgid "Changed Contact:"
-msgstr " "
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:3
-msgid "Conflicting Contact:"
-msgstr ""
-
-#: addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade.h:5
-msgid ""
-"The changed email or name of this contact already\n"
-"exists in this folder. Would you like to add it anyway?"
-msgstr ""
-
-#: addressbook/gui/search/e-addressbook-search-dialog.c:146
-#: widgets/misc/e-filter-bar.c:243
-#, fuzzy
-msgid "Advanced Search"
-msgstr " "
-
-#: addressbook/gui/search/e-addressbook-search-dialog.c:152
-#: mail/mail-search.c:264
-msgid "Search"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-model.c:121
-#, fuzzy
-msgid "No cards"
-msgstr " "
-
-#: addressbook/gui/widgets/e-addressbook-model.c:124
-msgid "1 card"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-model.c:127
-#, fuzzy, c-format
-msgid "%d cards"
-msgstr " %d "
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:138
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:267
-#: addressbook/gui/widgets/e-addressbook-view.c:691
-#: addressbook/gui/widgets/e-addressbook-view.c:753
-#: addressbook/gui/widgets/e-addressbook-view.c:1422
-#: ui/evolution-addressbook.xml.h:19
-msgid "Save as VCard"
-msgstr " VCard"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:266
-#: ui/evolution-message-composer.xml.h:13
-msgid "Open"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:268
-#: addressbook/gui/widgets/e-addressbook-view.c:754
-#: ui/evolution-addressbook.xml.h:10
-#, fuzzy
-msgid "Forward Contact"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:269
-#: addressbook/gui/widgets/e-addressbook-view.c:755
-#, fuzzy
-msgid "Send Message to Contact"
-msgstr " -"
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:270
-#: addressbook/gui/widgets/e-addressbook-view.c:756
-#: ui/evolution-addressbook.xml.h:16 ui/evolution-comp-editor.xml.h:8
-#: ui/evolution-contact-editor.xml.h:4 ui/evolution-mail-message.xml.h:63
-#: ui/my-evolution.xml.h:2
-msgid "Print"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:272
-#: addressbook/gui/widgets/e-addressbook-view.c:758
-#, fuzzy
-msgid "Print Envelope"
-msgstr " ..."
-
-#: addressbook/gui/widgets/e-addressbook-reflow-adapter.c:274
-#: addressbook/gui/widgets/e-addressbook-view.c:760 filter/libfilter-i18n.h:11
-#: mail/mail-accounts.c:281 ui/evolution-addressbook.xml.h:8
-#: ui/evolution-comp-editor.xml.h:4 ui/evolution-contact-editor.xml.h:2
-#: ui/evolution-contact-list-editor.xml.h:2 ui/evolution-mail-message.xml.h:16
-#: ui/evolution-tasks.xml.h:8
-msgid "Delete"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-table-adapter.c:128
-#: addressbook/gui/widgets/e-addressbook-util.c:68
-#: addressbook/gui/widgets/e-minicard.c:452
-#, fuzzy
-msgid "Error modifying card"
-msgstr " %s"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:34
-msgid "Success"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-util.c:35
-#: camel/providers/imap/camel-imap-command.c:340 shell/e-shell.c:1702
-#: shell/e-storage.c:520
-msgid "Unknown error"
-msgstr " "
-
-#: addressbook/gui/widgets/e-addressbook-util.c:36
-msgid "Repository offline"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-util.c:37 shell/e-storage.c:510
-msgid "Permission denied"
-msgstr " "
-
-#: addressbook/gui/widgets/e-addressbook-util.c:38
-#, fuzzy
-msgid "Card not found"
-msgstr " "
-
-#: addressbook/gui/widgets/e-addressbook-util.c:39
-msgid "Card ID already exists"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-util.c:40
-msgid "Protocol not supported"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-util.c:41
-#: calendar/gui/calendar-model.c:726 calendar/gui/calendar-model.c:1247
-#: calendar/gui/dialogs/task-details-page.glade.h:3
-#: calendar/gui/e-calendar-table.c:461 camel/camel-service.c:598
-#: camel/camel-service.c:634
-msgid "Cancelled"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-util.c:42
-#, fuzzy
-msgid "Other error"
-msgstr "/ "
-
-#: addressbook/gui/widgets/e-addressbook-util.c:59
-#, fuzzy
-msgid "Error adding list"
-msgstr " %s"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:59
-#, fuzzy
-msgid "Error adding card"
-msgstr " %s"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:68
-#, fuzzy
-msgid "Error modifying list"
-msgstr " %s"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:78
-#, fuzzy
-msgid "Error removing list"
-msgstr " %s"
-
-#: addressbook/gui/widgets/e-addressbook-util.c:78
-#: addressbook/gui/widgets/e-addressbook-view.c:1297
-#, fuzzy
-msgid "Error removing card"
-msgstr ""
-" :\n"
-"%s"
-
-#. Translators: put here a list of labels you want to see on buttons in
-#. addressbook. You may use any character to separate labels but it must
-#. also be placed at the begining ot the string
-#: addressbook/gui/widgets/e-addressbook-view.c:399
-msgid ",123,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"
-msgstr ""
-
-#. Translators: put here a list of characters that correspond to buttons
-#. in addressbook. You may use any character to separate labels but it
-#. must also be placed at the begining ot the string.
-#. Use lower case letters if possible.
-#: addressbook/gui/widgets/e-addressbook-view.c:404
-msgid ",0,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"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:867
-#, fuzzy
-msgid "* Click here to add a contact *"
-msgstr "< >"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:871
-#, fuzzy
-msgid "Primary Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:872
-#, fuzzy
-msgid "Assistant Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:873
-#, fuzzy
-msgid "Business Phone"
-msgstr " 2"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:874
-msgid "Callback Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:875
-#, fuzzy
-msgid "Company Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:876
-msgid "Home Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:878
-#, fuzzy
-msgid "Business Address"
-msgstr " 2"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:879
-#, fuzzy
-msgid "Home Address"
-msgstr " "
-
-#: addressbook/gui/widgets/e-addressbook-view.c:880
-msgid "Mobile Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:881
-msgid "Car Phone"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:884
-#, fuzzy
-msgid "Business Phone 2"
-msgstr " 2"
-
-#: addressbook/gui/widgets/e-addressbook-view.c:885
-msgid "Home Phone 2"
-msgstr ""
-
-#: addressbook/gui/widgets/e-addressbook-view.c:887
-#, fuzzy
-msgid "Other Phone"
-msgstr " "
-
-#: addressbook/gui/widgets/e-addressbook-view.c:893
-#, fuzzy
-msgid "Other Address"
-msgstr " "
-
-#: addressbook/gui/widgets/e-minicard-control.c:283
-msgid "Save in addressbook"
-msgstr " "
-
-#: addressbook/gui/widgets/e-minicard-view.c:151
-msgid ""
-"\n"
-"\n"
-"There are no items to show in this view\n"
-"\n"
-"Double-click here to create a new Contact."
-msgstr ""
-"\n"
-"\n"
-" \n"
-"\n"
-" , ."
-
-#: addressbook/gui/widgets/gal-view-factory-minicard.c:26
-msgid "Card View"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:1
-msgid "10 pt. Tahoma"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:2
-msgid "8 pt. Tahoma"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:3
-msgid "Blank forms at end:"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:4
-msgid "Body"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:5
-msgid "Bottom:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:6
-msgid "Dimensions:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:7
-#, fuzzy
-msgid "F_ont..."
-msgstr "..."
-
-#: addressbook/printing/e-contact-print.glade.h:8
-msgid "Fonts"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:9
-msgid "Footer:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:10
-msgid "Format"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:11
-msgid "Header"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:12
-msgid "Header/Footer"
-msgstr "/"
-
-#: addressbook/printing/e-contact-print.glade.h:13
-msgid "Headings"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:14
-msgid "Headings for each letter"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.glade.h:15
-msgid "Height:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:16
-msgid "Immediately follow each other"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.glade.h:17
-msgid "Include:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:18
-msgid "Landscape"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:19
-msgid "Left:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:20
-msgid "Letter tabs on side"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.glade.h:21
-msgid "Margins"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:22
-msgid "Number of columns:"
-msgstr " :"
-
-#: addressbook/printing/e-contact-print.glade.h:23
-msgid "Options"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:24
-msgid "Orientation"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:25
-msgid "Page"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:26
-msgid "Page Setup:"
-msgstr " :"
-
-#: addressbook/printing/e-contact-print.glade.h:27
-msgid "Paper"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:28
-msgid "Paper source:"
-msgstr " :"
-
-#: addressbook/printing/e-contact-print.glade.h:29
-msgid "Portrait"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:30
-msgid "Preview:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:31
-msgid "Print using gray shading"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.glade.h:32
-msgid "Reverse on even pages"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.glade.h:33
-msgid "Right:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:34
-msgid "Sections:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:35
-msgid "Shading"
-msgstr ""
-
-#: addressbook/printing/e-contact-print.glade.h:36
-msgid "Size:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:37
-msgid "Start on a new page"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.glade.h:38
-msgid "Style name:"
-msgstr " :"
-
-#: addressbook/printing/e-contact-print.glade.h:39
-msgid "Top:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:40
-msgid "Type:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:41
-msgid "Width:"
-msgstr ":"
-
-#: addressbook/printing/e-contact-print.glade.h:42
-#, fuzzy
-msgid "_Font..."
-msgstr "..."
-
-#: addressbook/printing/e-contact-print.c:1092
-#, fuzzy
-msgid "Print cards"
-msgstr " "
-
-#: addressbook/printing/e-contact-print.c:1152
-#: addressbook/printing/e-contact-print.c:1174
-#, fuzzy
-msgid "Print card"
-msgstr " "
-
-#: addressbook/printing/e-contact-print-envelope.c:216
-#: addressbook/printing/e-contact-print-envelope.c:237
-#, fuzzy
-msgid "Print envelope"
-msgstr " "
-
-#: calendar/cal-util/cal-util.c:418 calendar/cal-util/cal-util.c:440
-#: calendar/gui/dialogs/task-details-page.glade.h:6
-#: calendar/gui/e-calendar-table.c:385 mail/message-list.c:652
-msgid "High"
-msgstr ""
-
-#: calendar/cal-util/cal-util.c:420 calendar/cal-util/cal-util.c:442
-#: calendar/gui/calendar-model.c:1673
-#: calendar/gui/dialogs/task-details-page.glade.h:9
-#: calendar/gui/e-calendar-table.c:386 mail/message-list.c:651
-msgid "Normal"
-msgstr ""
-
-#: calendar/cal-util/cal-util.c:422 calendar/cal-util/cal-util.c:444
-#: calendar/gui/dialogs/task-details-page.glade.h:8
-#: calendar/gui/e-calendar-table.c:387 mail/message-list.c:650
-msgid "Low"
-msgstr ""
-
-#. An empty string is the same as 'None'.
-#: calendar/cal-util/cal-util.c:438
-#: calendar/gui/dialogs/task-details-page.glade.h:13
-#: calendar/gui/e-calendar-table.c:388
-msgid "Undefined"
-msgstr ""
-
-#: calendar/conduits/calendar/calendar-conduit.c:793
-#: calendar/conduits/todo/todo-conduit.c:564
-msgid "Error while communicating with calendar server"
-msgstr " "
-
-#: calendar/conduits/calendar/calendar-conduit.c:896
-#: calendar/conduits/calendar/calendar-conduit.c:899
-msgid "Could not read pilot's Calendar application block"
-msgstr " pilot"
-
-#: calendar/conduits/todo/todo-conduit.c:668
-#: calendar/conduits/todo/todo-conduit.c:671
-msgid "Could not read pilot's ToDo application block"
-msgstr " pilot"
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:1
-msgid "A sample Bonobo control which displays an calendar."
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:2
-msgid "Evolution calendar executive summary component."
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:3
-msgid "Evolution calendar iTip/iMip viewer"
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:4
-msgid "Evolution component for handling the calendar."
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:5
-msgid "Factory for the Calendar Summary component."
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:6
-msgid "Factory for the calendar iTip view control"
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:7
-msgid "Factory for the sample Calendar control"
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:8
-msgid "Factory to centralize calendar component editor dialogs"
-msgstr ""
-
-#: calendar/gui/GNOME_Evolution_Calendar.oaf.in.h:9
-msgid "Factory to create a component editor factory"
-msgstr ""
-
-#: calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in.h:1
-msgid "Alarm notification service"
-msgstr ""
-
-#: calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in.h:2
-msgid "Factory for the alarm notification service"
-msgstr ""
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:152
-#, fuzzy, c-format
-msgid "Notification about your appointment starting on %s and ending on %s"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:156
-#, fuzzy, c-format
-msgid "Notification about your appointment starting on %s"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:161
-#, fuzzy, c-format
-msgid "Notification about your appointment ending on %s"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:165
-#, fuzzy
-msgid "Notification about your appointment"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:172
-#, fuzzy, c-format
-msgid "Notification about your task starting on %s and ending on %s"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:176
-#, fuzzy, c-format
-msgid "Notification about your task starting on %s"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:181
-#, fuzzy, c-format
-msgid "Notification about your task ending on %s"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:185
-#, fuzzy
-msgid "Notification about your task"
-msgstr " Evolution"
-
-#: calendar/gui/alarm-notify/alarm-notify-dialog.c:267
-msgid "Alarm on %A %b %d %Y %H:%M"
-msgstr " %A %b %d %Y %H:%M"
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:1
-#: ui/evolution-comp-editor.xml.h:1
-#, fuzzy
-msgid "C_lose"
-msgstr ""
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:2
-#, fuzzy
-msgid "Snoo_ze"
-msgstr ""
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:3
-msgid "Snooze time (minutes)"
-msgstr " ()"
-
-#: calendar/gui/alarm-notify/alarm-notify.glade.h:4
-#, fuzzy
-msgid "_Edit appointment"
-msgstr " "
-
-#: calendar/gui/alarm-notify/alarm-queue.c:629
-#, fuzzy
-msgid "No description available."
-msgstr " ."
-
-#: calendar/gui/alarm-notify/alarm-queue.c:689
-msgid ""
-"Evolution does not support calendar reminders with\n"
-"email notifications yet, but this reminder was\n"
-"configured to send an email. Evolution will display\n"
-"a normal reminder dialog box instead."
-msgstr ""
-
-#: calendar/gui/alarm-notify/alarm-queue.c:740
-#, c-format
-msgid ""
-"An Evolution Calendar reminder is about to trigger.\n"
-"This reminder is configured to run the following program:\n"
-"\n"
-" %s\n"
-"\n"
-"Are you sure you want to run this program?"
-msgstr ""
-
-#: calendar/gui/alarm-notify/notify-main.c:73 calendar/gui/main.c:58
-msgid "Could not initialize GNOME"
-msgstr " GNOME"
-
-#: calendar/gui/alarm-notify/notify-main.c:81 calendar/gui/main.c:106
-#, fuzzy
-msgid "Could not initialize gnome-vfs"
-msgstr " Bonobo"
-
-#: calendar/gui/alarm-notify/notify-main.c:90
-#, fuzzy
-msgid "Could not create the alarm notify service factory"
-msgstr " : %s"
-
-#: calendar/gui/calendar-commands.c:439
-msgid "%A %d %B %Y"
-msgstr ""
-
-#. strftime format %a = abbreviated weekday name, %d = day of month,
-#. %b = abbreviated month name. Don't use any other specifiers.
-#: calendar/gui/calendar-commands.c:442 calendar/gui/e-day-view-top-item.c:289
-#: calendar/gui/e-day-view.c:1388 calendar/gui/e-week-view-main-item.c:334
-msgid "%a %d %b"
-msgstr ""
-
-#: calendar/gui/calendar-commands.c:444 calendar/gui/calendar-commands.c:449
-#: calendar/gui/calendar-commands.c:451
-msgid "%a %d %b %Y"
-msgstr ""
-
-#: calendar/gui/calendar-commands.c:462 calendar/gui/calendar-commands.c:469
-#: calendar/gui/calendar-commands.c:475 calendar/gui/calendar-commands.c:477
-msgid "%d %B %Y"
-msgstr ""
-
-#. strftime format %d = day of month, %B = full
-#. month name. You can change the order but don't
-#. change the specifiers or add anything.
-#: calendar/gui/calendar-commands.c:467
-#: calendar/gui/e-week-view-main-item.c:342 calendar/gui/print.c:1446
-msgid "%d %B"
-msgstr ""
-
-#: calendar/gui/calendar-commands.c:677
-msgid ""
-"Could not create the calendar view. Please check your ORBit and OAF setup."
-msgstr ""
-" . ORBit "
-"OAF"
-
-#: calendar/gui/calendar-model.c:399 calendar/gui/calendar-model.c:994
-#: calendar/gui/e-calendar-table.c:364
-msgid "Private"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:402 calendar/gui/calendar-model.c:996
-#: calendar/gui/e-calendar-table.c:365
-msgid "Confidential"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:405 calendar/gui/e-calendar-table.c:363
-msgid "Public"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:498
-msgid "N"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:498
-msgid "S"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:500
-msgid "E"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:500
-msgid "W"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:566 calendar/gui/calendar-model.c:1193
-#: calendar/gui/e-calendar-table.c:437
-#, fuzzy
-msgid "Free"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:568 calendar/gui/e-calendar-table.c:438
-#: calendar/gui/e-meeting-time-sel.c:393
-msgid "Busy"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:717 calendar/gui/calendar-model.c:1241
-#: calendar/gui/dialogs/task-details-page.glade.h:10
-#: calendar/gui/e-calendar-table.c:458
-msgid "Not Started"
-msgstr " "
-
-#: calendar/gui/calendar-model.c:720 calendar/gui/calendar-model.c:1243
-#: calendar/gui/dialogs/task-details-page.glade.h:7
-#: calendar/gui/e-calendar-table.c:459
-msgid "In Progress"
-msgstr " "
-
-#: calendar/gui/calendar-model.c:723 calendar/gui/calendar-model.c:1245
-#: calendar/gui/dialogs/task-details-page.glade.h:4
-#: calendar/gui/e-calendar-table.c:460 calendar/gui/e-meeting-model.c:298
-#: calendar/gui/e-meeting-model.c:321
-msgid "Completed"
-msgstr ""
-
-#. strftime format of a weekday, a date and a time, 24-hour.
-#: calendar/gui/calendar-model.c:908 e-util/e-time-utils.c:163
-#: e-util/e-time-utils.c:354
-msgid "%a %m/%d/%Y %H:%M:%S"
-msgstr ""
-
-#. strftime format of a weekday, a date and a time, 12-hour.
-#: calendar/gui/calendar-model.c:911 e-util/e-time-utils.c:158
-#: e-util/e-time-utils.c:363
-msgid "%a %m/%d/%Y %I:%M:%S %p"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:916
-#, c-format
-msgid ""
-"The date must be entered in the format: \n"
-"\n"
-"%s"
-msgstr ""
-" : \n"
-"\n"
-"%s"
-
-#: calendar/gui/calendar-model.c:1080
-msgid ""
-"The geographical position must be entered in the format: \n"
-"\n"
-"45.436845,125.862501"
-msgstr ""
-" : \n"
-"\n"
-"45.436845,125.862501"
-
-#: calendar/gui/calendar-model.c:1120
-msgid "The percent value must be between 0 and 100, inclusive"
-msgstr " 0 100, "
-
-#. An empty string is the same as 'None'.
-#: calendar/gui/calendar-model.c:1239 calendar/gui/dialogs/meeting-page.c:332
-#: calendar/gui/dialogs/meeting-page.glade.h:1 mail/mail-account-gui.c:1446
-#: mail/mail-accounts.c:143 mail/mail-accounts.c:390
-#: mail/mail-config.glade.h:50
-#: widgets/e-timezone-dialog/e-timezone-dialog.c:203
-#: widgets/misc/e-cell-date-edit.c:240 widgets/misc/e-dateedit.c:453
-#: widgets/misc/e-dateedit.c:1453 widgets/misc/e-dateedit.c:1568
-msgid "None"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:1675
-#, fuzzy
-msgid "Recurring"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:1677
-msgid "Assigned"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:1683 calendar/gui/e-meeting-model.c:270
-#: calendar/gui/e-meeting-model.c:280 calendar/gui/e-meeting-model.c:506
-#: calendar/gui/e-meeting-model.c:702
-msgid "Yes"
-msgstr ""
-
-#: calendar/gui/calendar-model.c:1683 calendar/gui/e-meeting-model.c:282
-#: calendar/gui/e-meeting-model.c:703
-#, fuzzy
-msgid "No"
-msgstr ""
-
-#: calendar/gui/calendar-view-factory.c:149 views/calendar/galview.xml.h:1
-#, fuzzy
-msgid "Day View"
-msgstr "_"
-
-#: calendar/gui/calendar-view-factory.c:152 views/calendar/galview.xml.h:4
-#, fuzzy
-msgid "Work Week View"
-msgstr " "
-
-#: calendar/gui/calendar-view-factory.c:155 views/calendar/galview.xml.h:3
-#, fuzzy
-msgid "Week View"
-msgstr ""
-
-#: calendar/gui/calendar-view-factory.c:158 views/calendar/galview.xml.h:2
-#, fuzzy
-msgid "Month View"
-msgstr ""
-
-#: calendar/gui/cal-search-bar.c:56
-#, fuzzy
-msgid "Summary contains"
-msgstr "Email "
-
-#: calendar/gui/cal-search-bar.c:57
-#, fuzzy
-msgid "Description contains"
-msgstr ":"
-
-#: calendar/gui/cal-search-bar.c:58
-#, fuzzy
-msgid "Comment contains"
-msgstr " "
-
-#: calendar/gui/cal-search-bar.c:416 mail/mail-ops.c:1054
-msgid "Unmatched"
-msgstr ""
-
-#: calendar/gui/component-factory.c:63 my-evolution/my-evolution.glade.h:6
-#: shell/e-local-storage.c:172 shell/e-shortcuts.c:1056
-msgid "Calendar"
-msgstr ""
-
-#: calendar/gui/component-factory.c:64
-msgid "Folder containing appointments and events"
-msgstr ""
-
-#: calendar/gui/component-factory.c:68 calendar/gui/print.c:1723
-#: my-evolution/e-summary-tasks.c:237 my-evolution/e-summary-tasks.c:253
-#: shell/e-local-storage.c:178 shell/e-shortcuts.c:1059
-#: views/tasks/galview.xml.h:1
-msgid "Tasks"
-msgstr ""
-
-#: calendar/gui/component-factory.c:69
-msgid "Folder containing to-do items"
-msgstr ""
-
-#: calendar/gui/component-factory.c:581 ui/evolution-calendar.xml.h:7
-msgid "Create a new appointment"
-msgstr ""
-
-#: calendar/gui/component-factory.c:582 calendar/gui/e-day-view.c:3422
-#, fuzzy
-msgid "New _Appointment"
-msgstr " "
-
-#: calendar/gui/component-factory.c:587 ui/evolution-calendar.xml.h:8
-#: ui/evolution-tasks.xml.h:5
-msgid "Create a new task"
-msgstr ""
-
-#: calendar/gui/component-factory.c:588
-#, fuzzy
-msgid "New _Task"
-msgstr ""
-
-#: calendar/gui/control-factory.c:128
-msgid "The URI that the calendar will display"
-msgstr "URI, "
-
-#: calendar/gui/dialogs/alarm-options.c:359
-#, fuzzy
-msgid "Audio Alarm Options"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-options.c:368
-#, fuzzy
-msgid "Message Alarm Options"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-options.c:377
-#, fuzzy
-msgid "Mail Alarm Options"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-options.c:386
-msgid "Program Alarm Options"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.c:395
-msgid "Unknown Alarm Options"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:1
-msgid "Alarm Repeat"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:2
-#, fuzzy
-msgid "Message to Display"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-options.glade.h:3
-#, fuzzy
-msgid "Play sound:"
-msgstr ":"
-
-#: calendar/gui/dialogs/alarm-options.glade.h:4
-msgid "Repeat the alarm"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:5
-#, fuzzy
-msgid "Run program:"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-options.glade.h:6
-msgid ""
-"This is an email reminder, but Evolution does not yet support this kind of "
-"reminders. You will not be able to edit the options for this reminder."
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:7
-msgid "With these arguments:"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:8 filter/filter-datespec.c:83
-msgid "days"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:9
-msgid "extra times every"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:10 filter/filter-datespec.c:84
-msgid "hours"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-options.glade.h:11 filter/filter-datespec.c:85
-msgid "minutes"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.c:307
-#, fuzzy, c-format
-msgid "%d days"
-msgstr " %d "
-
-#: calendar/gui/dialogs/alarm-page.c:310
-#, fuzzy
-msgid "1 day"
-msgstr " 1 "
-
-#: calendar/gui/dialogs/alarm-page.c:315
-#, fuzzy, c-format
-msgid "%d weeks"
-msgstr " %d "
-
-#: calendar/gui/dialogs/alarm-page.c:318
-#, fuzzy
-msgid "1 week"
-msgstr " 1 "
-
-#: calendar/gui/dialogs/alarm-page.c:323
-#, fuzzy, c-format
-msgid "%d hours"
-msgstr " %d "
-
-#: calendar/gui/dialogs/alarm-page.c:326
-#, fuzzy
-msgid "1 hour"
-msgstr " 1 "
-
-#: calendar/gui/dialogs/alarm-page.c:331
-#, fuzzy, c-format
-msgid "%d minutes"
-msgstr " %d "
-
-#: calendar/gui/dialogs/alarm-page.c:334
-#, fuzzy
-msgid "1 minute"
-msgstr " 1 "
-
-#: calendar/gui/dialogs/alarm-page.c:339
-#, fuzzy, c-format
-msgid "%d seconds"
-msgstr " %d "
-
-#: calendar/gui/dialogs/alarm-page.c:342
-#, fuzzy
-msgid "1 second"
-msgstr " 1 "
-
-#: calendar/gui/dialogs/alarm-page.c:373
-#: calendar/gui/dialogs/alarm-page.glade.h:4
-msgid "Play a sound"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.c:377
-#: calendar/gui/dialogs/alarm-page.glade.h:3
-#, fuzzy
-msgid "Display a message"
-msgstr "_Mail "
-
-#: calendar/gui/dialogs/alarm-page.c:381
-msgid "Send an email"
-msgstr " email"
-
-#: calendar/gui/dialogs/alarm-page.c:385
-#: calendar/gui/dialogs/alarm-page.glade.h:6
-msgid "Run a program"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:391
-#, fuzzy
-msgid "Unknown action to be performed"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:403
-#, fuzzy, c-format
-msgid "%s %s before the start of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:406
-#, fuzzy, c-format
-msgid "%s %s after the start of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:411
-#, fuzzy, c-format
-msgid "%s at the start of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:420
-#, fuzzy, c-format
-msgid "%s %s before the end of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:423
-#, fuzzy, c-format
-msgid "%s %s after the end of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:428
-#, fuzzy, c-format
-msgid "%s at the end of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:439
-#, fuzzy, c-format
-msgid "%s at an unknown time"
-msgstr " "
-
-#: calendar/gui/dialogs/alarm-page.c:445
-#, fuzzy, c-format
-msgid "%s at %s"
-msgstr "%s %s"
-
-#: calendar/gui/dialogs/alarm-page.c:452
-#, c-format
-msgid "%s for an unknown trigger type"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:1
-#: calendar/gui/dialogs/recurrence-page.glade.h:2
-#, fuzzy
-msgid "Basics"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:2
-#: calendar/gui/dialogs/recurrence-page.glade.h:3
-#, fuzzy
-msgid "Date/Time:"
-msgstr ":"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:5
-msgid "Reminders"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:7
-#: calendar/gui/dialogs/recurrence-page.glade.h:8
-#: calendar/gui/e-itip-control.glade.h:11
-msgid "Summary:"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:10
-#, fuzzy
-msgid "_Options..."
-msgstr "_"
-
-#. Automatically generated. Do not edit.
-#: calendar/gui/dialogs/alarm-page.glade.h:11 filter/libfilter-i18n.h:2
-msgid "after"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:12 filter/libfilter-i18n.h:6
-msgid "before"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:13
-#: calendar/gui/dialogs/recurrence-page.glade.h:14
-msgid "day(s)"
-msgstr "()"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:14
-msgid "end of appointment"
-msgstr ""
-
-#: calendar/gui/dialogs/alarm-page.glade.h:15
-msgid "hour(s)"
-msgstr "()"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:16 mail/mail-config.glade.h:116
-msgid "minute(s)"
-msgstr "(/)"
-
-#: calendar/gui/dialogs/alarm-page.glade.h:17
-msgid "start of appointment"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:1
-msgid "05 minutes"
-msgstr "05 "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:2
-msgid "10 minutes"
-msgstr "10 "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:3
-msgid "15 minutes"
-msgstr "15 "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:4
-msgid "30 minutes"
-msgstr "30 "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:5
-msgid "60 minutes"
-msgstr "60 "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:6
-msgid "Calendar and Tasks Settings"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:7
-msgid "Color for overdue tasks"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:8
-msgid "Color for tasks due today"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:9
-msgid "Create new appointments with a default _reminder"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:10
-#, fuzzy
-msgid "Days"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:11
-#, fuzzy
-msgid "First day of wee_k:"
-msgstr " :"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:12
-#: calendar/gui/dialogs/recurrence-page.c:955
-msgid "Friday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:13
-#, fuzzy
-msgid "Hours"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:14
-#, fuzzy
-msgid "Minutes"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:15
-#: calendar/gui/dialogs/recurrence-page.c:951
-msgid "Monday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:16
-#, fuzzy
-msgid "O_verdue tasks:"
-msgstr " :"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:17
-#: calendar/gui/dialogs/recurrence-page.c:956
-msgid "Saturday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:18
-#, fuzzy
-msgid "Show appointment _end times in week and month views"
-msgstr " "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:19
-#, fuzzy
-msgid "Show week _numbers in date navigator"
-msgstr " "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:20
-#, fuzzy
-msgid "Sta_rt of day:"
-msgstr " :"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:21
-#, fuzzy
-msgid "Su_n"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:22
-#: calendar/gui/dialogs/recurrence-page.c:957
-msgid "Sunday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:23
-#, fuzzy
-msgid "T_hu"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:24
-#, fuzzy
-msgid "T_ue"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:25
-#, fuzzy
-msgid "Tas_ks due today:"
-msgstr ", :"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:26
-#: calendar/gui/dialogs/recurrence-page.c:954
-msgid "Thursday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:27
-msgid "Time"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:28
-#, fuzzy
-msgid "Time _zone:"
-msgstr ""
-"\n"
-" : "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:29
-#, fuzzy
-msgid "Time di_visions:"
-msgstr ":"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:30
-msgid "Time format:"
-msgstr " :"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:31
-#: calendar/gui/dialogs/recurrence-page.c:952
-msgid "Tuesday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:32
-#: calendar/gui/dialogs/recurrence-page.c:953
-msgid "Wednesday"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:33
-#: ui/evolution-calendar.xml.h:33
-#, fuzzy
-msgid "Work Week"
-msgstr " "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:34
-#, fuzzy
-msgid "_12 hour (AM/PM)"
-msgstr "12 (am/pm)"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:35
-#, fuzzy
-msgid "_24 hour"
-msgstr "24 "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:36
-msgid "_Ask for confirmation when deleting items"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:37
-#, fuzzy
-msgid "_Compress weekends in month view"
-msgstr " "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:38
-#, fuzzy
-msgid "_Display"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:39
-#, fuzzy
-msgid "_End of day:"
-msgstr " :"
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:40
-#, fuzzy
-msgid "_Fri"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:41
-#, fuzzy
-msgid "_General"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:42
-#, fuzzy
-msgid "_Hide completed tasks after"
-msgstr " "
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:43
-#, fuzzy
-msgid "_Mon"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:44
-#, fuzzy
-msgid "_Other"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:45
-#, fuzzy
-msgid "_Sat"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:46
-msgid "_Task List"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:47
-#, fuzzy
-msgid "_Wed"
-msgstr ""
-
-#: calendar/gui/dialogs/cal-prefs-dialog.glade.h:48
-#, fuzzy
-msgid "before the start of the appointment"
-msgstr " "
-
-#: calendar/gui/dialogs/cancel-comp.c:52
-msgid "The meeting status has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/cancel-comp.c:58
-msgid "Are you sure you want to cancel and delete this meeting?"
-msgstr ""
-
-#: calendar/gui/dialogs/cancel-comp.c:63
-msgid "Are you sure you want to cancel and delete this task?"
-msgstr ""
-
-#: calendar/gui/dialogs/cancel-comp.c:68
-msgid "Are you sure you want to cancel and delete this journal entry?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:60
-msgid "This event has been deleted."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:64
-msgid "This task has been deleted."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:68
-msgid "This journal entry has been deleted."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:77
-#, c-format
-msgid "%s You have made changes. Forget those changes and close the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:79
-#, c-format
-msgid "%s You have made no changes, close the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:84
-msgid "This event has been changed."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:88
-msgid "This task has been changed."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:92
-msgid "This journal entry has been changed."
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:101
-#, c-format
-msgid "%s You have made changes. Forget those changes and update the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/changed-comp.c:103
-#, c-format
-msgid "%s You have made no changes, update the editor?"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:167 calendar/gui/print.c:2132
-#, fuzzy
-msgid " to "
-msgstr " "
-
-#: calendar/gui/dialogs/comp-editor-util.c:171 calendar/gui/print.c:2136
-#, fuzzy
-msgid " (Completed "
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:173 calendar/gui/print.c:2138
-#, fuzzy
-msgid "Completed "
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:178 calendar/gui/print.c:2143
-msgid " (Due "
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor-util.c:180 calendar/gui/print.c:2145
-#, fuzzy
-msgid "Due "
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor.c:521
-msgid "Edit Appointment"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor.c:526
-#, c-format
-msgid "Appointment - %s"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor.c:529
-#, c-format
-msgid "Task - %s"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor.c:532
-#, c-format
-msgid "Journal entry - %s"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor.c:546
-msgid "No summary"
-msgstr ""
-
-#: calendar/gui/dialogs/comp-editor.c:952 mail/mail-callbacks.c:1671
-#: mail/mail-display.c:100
-msgid "Overwrite file?"
-msgstr " ?"
-
-#: calendar/gui/dialogs/comp-editor.c:956 mail/mail-callbacks.c:1677
-#: mail/mail-display.c:104
-msgid ""
-"A file by that name already exists.\n"
-"Overwrite it?"
-msgstr ""
-" .\n"
-" ?"
-
-#: calendar/gui/dialogs/comp-editor.c:1019 ui/evolution-comp-editor.xml.h:13
-#: widgets/misc/e-filter-bar.h:101
-msgid "Save As..."
-msgstr " ..."
-
-#: calendar/gui/dialogs/comp-editor.c:1172
-msgid "Unable to obtain current version!"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:91
-#, c-format
-msgid "Are you sure you want to delete the appointment `%s'?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:94
-msgid "Are you sure you want to delete this untitled appointment?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:100
-#, c-format
-msgid "Are you sure you want to delete the task `%s'?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:103
-msgid "Are you sure you want to delete this untitled task?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:109
-#, c-format
-msgid "Are you sure you want to delete the journal entry `%s'?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:112
-msgid "Are you sure want to delete this untitled journal entry?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:127
-#, c-format
-msgid "Are you sure you want to delete %d appointments?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:132
-#, c-format
-msgid "Are you sure you want to delete %d tasks?"
-msgstr ""
-
-#: calendar/gui/dialogs/delete-comp.c:137
-#, c-format
-msgid "Are you sure you want to delete %d journal entries?"
-msgstr ""
-
-#: calendar/gui/dialogs/e-delegate-dialog.glade.h:1
-#, fuzzy
-msgid "Addressbook..."
-msgstr "_..."
-
-#: calendar/gui/dialogs/e-delegate-dialog.glade.h:2
-#, fuzzy
-msgid "Delegate To:"
-msgstr ""
-
-#: calendar/gui/dialogs/e-delegate-dialog.glade.h:3
-#, fuzzy
-msgid "Enter Delegate"
-msgstr ""
-
-#: calendar/gui/dialogs/event-editor.c:181
-msgid "Appointment"
-msgstr ""
-
-#: calendar/gui/dialogs/event-editor.c:186
-msgid "Reminder"
-msgstr ""
-
-#: calendar/gui/dialogs/event-editor.c:191
-msgid "Recurrence"
-msgstr ""
-
-#: calendar/gui/dialogs/event-editor.c:198
-#: calendar/gui/dialogs/event-editor.c:345
-#, fuzzy
-msgid "Scheduling"
-msgstr ""
-
-#: calendar/gui/dialogs/event-editor.c:203
-#: calendar/gui/dialogs/event-editor.c:348
-#, fuzzy
-msgid "Meeting"
-msgstr " "
-
-#: calendar/gui/dialogs/event-page.glade.h:1
-msgid "A_ll day event"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:2
-msgid "B_usy"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:4
-#: calendar/gui/dialogs/task-page.glade.h:2
-#: calendar/gui/e-calendar-table.etspec.h:5
-msgid "Classification"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:5
-#, fuzzy
-msgid "Con_fidential"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:6
-#: calendar/gui/dialogs/task-page.glade.h:3
-#, fuzzy
-msgid "Date & Time"
-msgstr " "
-
-#: calendar/gui/dialogs/event-page.glade.h:7
-msgid "F_ree"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:8
-#: calendar/gui/dialogs/task-page.glade.h:5
-msgid "Pri_vate"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:9
-#: calendar/gui/dialogs/task-page.glade.h:6
-msgid "Pu_blic"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:10
-#: calendar/gui/e-calendar-table.etspec.h:13
-#, fuzzy
-msgid "Show Time As"
-msgstr " "
-
-#: calendar/gui/dialogs/event-page.glade.h:11
-#: calendar/gui/dialogs/task-page.glade.h:8
-msgid "Su_mmary:"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:13
-msgid "_End time:"
-msgstr ""
-
-#: calendar/gui/dialogs/event-page.glade.h:14
-msgid "_Start time:"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:504
-msgid "That person is already attending the meeting!"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:548
-#: calendar/gui/dialogs/meeting-page.c:583
-msgid "Chair Persons"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:550
-#: calendar/gui/dialogs/meeting-page.c:583
-#: calendar/gui/dialogs/meeting-page.c:703
-msgid "Required Participants"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:552
-#: calendar/gui/dialogs/meeting-page.c:583
-msgid "Optional Participants"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:554
-#: calendar/gui/dialogs/meeting-page.c:583
-msgid "Non-Participants"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.c:661
-#, fuzzy
-msgid "Sent By:"
-msgstr " :"
-
-#: calendar/gui/dialogs/meeting-page.c:829
-#, fuzzy
-msgid "_Delegate To..."
-msgstr "..."
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:1
-#: calendar/gui/e-meeting-time-sel.etspec.h:1
-msgid "Attendee"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:2
-#: calendar/gui/e-meeting-time-sel.etspec.h:2
-#, fuzzy
-msgid "Click here to add an attendee"
-msgstr "< >"
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:3
-#: calendar/gui/e-meeting-time-sel.etspec.h:3
-msgid "Common Name"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:4
-#: calendar/gui/e-meeting-time-sel.etspec.h:4
-#, fuzzy
-msgid "Delegated From"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:5
-#: calendar/gui/e-meeting-time-sel.etspec.h:5
-#, fuzzy
-msgid "Delegated To"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:6
-#: calendar/gui/e-meeting-time-sel.etspec.h:6
-#, fuzzy
-msgid "Language"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:7
-#: calendar/gui/e-meeting-time-sel.etspec.h:7
-#, fuzzy
-msgid "Member"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:8
-#: calendar/gui/e-meeting-time-sel.etspec.h:8
-msgid "RSVP"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:9
-#: calendar/gui/e-meeting-time-sel.etspec.h:9
-msgid "Role"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:10
-#: calendar/gui/e-calendar-table.etspec.h:15
-#: calendar/gui/e-meeting-time-sel.etspec.h:10 filter/libfilter-i18n.h:49
-#: mail/message-list.etspec.h:8
-msgid "Status"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.etspec.h:11
-#: calendar/gui/e-calendar-table.etspec.h:18
-#: calendar/gui/e-meeting-time-sel.etspec.h:11 mail/mail-config.glade.h:86
-#: shell/glade/e-active-connection-dialog.glade.h:5
-msgid "Type"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.glade.h:2
-#: calendar/gui/e-itip-control.glade.h:9
-msgid "Organizer:"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.glade.h:3
-msgid "_Change Organizer"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.glade.h:4
-msgid "_Invite Others"
-msgstr ""
-
-#: calendar/gui/dialogs/meeting-page.glade.h:5
-msgid "_Other Organizer"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:422 calendar/gui/print.c:1855
-#: calendar/gui/print.c:1857 calendar/gui/print.c:1858
-msgid "%a %b %d %Y"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:570
-msgid "This appointment contains recurrences that Evolution cannot edit."
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:924
-msgid "on"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:950 filter/filter-datespec.c:83
-msgid "day"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:1080
-msgid "on the"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:1088
-msgid "th"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.c:1261
-msgid "occurrences"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:1
-#, fuzzy
-msgid "A_dd"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:4
-msgid "Every"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:5
-msgid "Exceptions"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:6
-msgid "Preview"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:7
-msgid "Recurrence Rule"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:9
-msgid "_Custom recurrence"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:10
-#, fuzzy
-msgid "_Modify"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:11
-msgid "_No recurrence"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:13
-msgid "_Simple recurrence"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:15
-msgid "for"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:16
-msgid "forever"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:17
-msgid "month(s)"
-msgstr "()"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:18
-msgid "until"
-msgstr ""
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:19
-msgid "week(s)"
-msgstr "(/)"
-
-#: calendar/gui/dialogs/recurrence-page.glade.h:20
-msgid "year(s)"
-msgstr "(/)"
-
-#: calendar/gui/dialogs/save-comp.c:51
-msgid "Do you want to save changes?"
-msgstr " ?"
-
-#: calendar/gui/dialogs/send-comp.c:56
-msgid "The meeting information has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/send-comp.c:61
-msgid "The task information has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/send-comp.c:66
-msgid "The journal entry has changed. Send an updated version?"
-msgstr ""
-
-#: calendar/gui/dialogs/task-details-page.glade.h:2
-#: calendar/gui/e-calendar-table.etspec.h:2
-#, fuzzy, no-c-format
-msgid "% Complete"
-msgstr "% :"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:5
-msgid "Date Completed:"
-msgstr ""
-
-#: calendar/gui/dialogs/task-details-page.glade.h:11
-#, fuzzy
-msgid "Progress"
-msgstr " "
-
-#: calendar/gui/dialogs/task-details-page.glade.h:12
-#: my-evolution/e-summary-preferences.c:949
-msgid "URL:"
-msgstr ""
-
-#: calendar/gui/dialogs/task-details-page.glade.h:14
-msgid "_Priority:"
-msgstr "_:"
-
-#: calendar/gui/dialogs/task-details-page.glade.h:15
-msgid "_Status:"
-msgstr "_:"
-
-#: calendar/gui/dialogs/task-editor.c:184
-#: calendar/gui/dialogs/task-editor.c:285
-#, fuzzy
-msgid "Assignment"
-msgstr ""
-
-#: calendar/gui/dialogs/task-page.glade.h:4
-#: calendar/gui/e-itip-control.glade.h:6
-#: composer/e-msg-composer-attachment.glade.h:2 mail/mail-config.glade.h:28
-msgid "Description:"
-msgstr ":"
-
-#: calendar/gui/dialogs/task-page.glade.h:7
-msgid "Sta_rt Date:"
-msgstr ""
-
-#: calendar/gui/dialogs/task-page.glade.h:9
-msgid "_Confidential"
-msgstr ""
-
-#: calendar/gui/dialogs/task-page.glade.h:11
-msgid "_Due Date:"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:407
-#, c-format
-msgid "0%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:408
-#, c-format
-msgid "10%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:409
-#, c-format
-msgid "20%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:410
-#, c-format
-msgid "30%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:411
-#, c-format
-msgid "40%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:412
-#, c-format
-msgid "50%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:413
-#, c-format
-msgid "60%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:414
-#, c-format
-msgid "70%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:415
-#, c-format
-msgid "80%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:416
-#, c-format
-msgid "90%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:417
-#, c-format
-msgid "100%"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:914 calendar/gui/e-day-view.c:3443
-#: calendar/gui/e-week-view.c:3296 mail/folder-browser.c:1371
-#: shell/e-shortcuts-view.c:385
-#, fuzzy
-msgid "_Open"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:918 calendar/gui/e-day-view.c:3452
-#: calendar/gui/e-week-view.c:3305 ui/evolution-addressbook.xml.h:1
-#: ui/evolution-calendar.xml.h:1 ui/evolution-tasks.xml.h:1
-msgid "C_ut"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:920 calendar/gui/e-day-view.c:3454
-#: calendar/gui/e-week-view.c:3307 ui/evolution-addressbook.xml.h:33
-#: ui/evolution-calendar.xml.h:37 ui/evolution-mail-list.xml.h:24
-#: ui/evolution-tasks.xml.h:14
-msgid "_Copy"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:922 calendar/gui/e-day-view.c:3429
-#: calendar/gui/e-day-view.c:3456 calendar/gui/e-week-view.c:3283
-#: calendar/gui/e-week-view.c:3309 ui/evolution-addressbook.xml.h:36
-#: ui/evolution-calendar.xml.h:40 ui/evolution-mail-list.xml.h:29
-#: ui/evolution-tasks.xml.h:17
-msgid "_Paste"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:927
-#, fuzzy
-msgid "_Mark as Complete"
-msgstr "% :"
-
-#: calendar/gui/e-calendar-table.c:929
-#, fuzzy
-msgid "_Delete this Task"
-msgstr " "
-
-#: calendar/gui/e-calendar-table.c:932
-msgid "_Mark Tasks as Complete"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:934
-msgid "_Delete Selected Tasks"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.c:1194
-#: calendar/gui/e-calendar-table.etspec.h:6
-msgid "Click to add a task"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:3
-msgid "Alarms"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:7 camel/camel-filter-driver.c:718
-#: camel/camel-filter-driver.c:834
-#, fuzzy
-msgid "Complete"
-msgstr "."
-
-#: calendar/gui/e-calendar-table.etspec.h:8
-msgid "Completion Date"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:9
-msgid "Due Date"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:10
-msgid "End Date"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:11
-msgid "Geographical Position"
-msgstr " "
-
-#: calendar/gui/e-calendar-table.etspec.h:12
-msgid "Priority"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:14
-msgid "Start Date"
-msgstr ""
-
-#. FIXME: Inbox shortcut should point to something else for
-#. people who won't care about using /Local Folders/Inbox
-#: calendar/gui/e-calendar-table.etspec.h:16
-#: my-evolution/component-factory.c:45 shell/e-shortcuts.c:1050
-#: shell/e-storage-set-view.c:1420 shell/e-summary-storage.c:80
-msgid "Summary"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:17
-#, fuzzy
-msgid "Task sort"
-msgstr ""
-
-#: calendar/gui/e-calendar-table.etspec.h:19
-msgid "URL"
-msgstr ""
-
-#: calendar/gui/e-day-view-time-item.c:519
-#, c-format
-msgid "%02i minute divisions"
-msgstr ""
-
-#. strftime format %A = full weekday name, %d = day of month,
-#. %B = full month name. Don't use any other specifiers.
-#: calendar/gui/e-day-view-top-item.c:285 calendar/gui/e-day-view.c:1374
-#: calendar/gui/e-week-view-main-item.c:325 calendar/gui/print.c:1462
-msgid "%A %d %B"
-msgstr ""
-
-#. strftime format %d = day of month, %b = abbreviated month name.
-#. Don't use any other specifiers.
-#: calendar/gui/e-day-view-top-item.c:293 calendar/gui/e-day-view.c:1401
-#: calendar/gui/e-week-view-main-item.c:348
-msgid "%d %b"
-msgstr ""
-
-#. String to use in 12-hour time format for times in the morning.
-#: calendar/gui/e-day-view.c:608 calendar/gui/e-week-view.c:345
-#: calendar/gui/print.c:769
-msgid "am"
-msgstr ""
-
-#. String to use in 12-hour time format for times in the afternoon.
-#: calendar/gui/e-day-view.c:611 calendar/gui/e-week-view.c:348
-#: calendar/gui/print.c:771
-msgid "pm"
-msgstr ""
-
-#: calendar/gui/e-day-view.c:3424 calendar/gui/e-week-view.c:3278
-msgid "New All Day _Event"
-msgstr ""
-
-#: calendar/gui/e-day-view.c:3434 calendar/gui/e-week-view.c:3288
-#: ui/evolution-calendar.xml.h:17
-msgid "Go to _Today"
-msgstr ""
-
-#: calendar/gui/e-day-view.c:3436 calendar/gui/e-week-view.c:3290
-#, fuzzy
-msgid "_Go to Date..."
-msgstr " ..."
-
-#: calendar/gui/e-day-view.c:3445 calendar/gui/e-week-view.c:3298
-#, fuzzy
-msgid "_Delete this Appointment"
-msgstr " "
-
-#: calendar/gui/e-day-view.c:3464 calendar/gui/e-week-view.c:3323
-#, fuzzy
-msgid "Make this Occurrence _Movable"
-msgstr " "
-
-#: calendar/gui/e-day-view.c:3466 calendar/gui/e-week-view.c:3325
-#, fuzzy
-msgid "Delete this _Occurrence"
-msgstr " "
-
-#: calendar/gui/e-day-view.c:3468 calendar/gui/e-week-view.c:3327
-msgid "Delete _All Occurrences"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:469
-msgid "Meeting begins: <b>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:474
-msgid "Task begins: <b>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:479
-#, fuzzy
-msgid "Free/Busy info begins: <b>"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:483
-msgid "Begins: <b>"
-msgstr ""
-
-#. Describe what the user can do
-#: calendar/gui/e-itip-control.c:677
-msgid ""
-"<br> Please review the following information, and then select an action from "
-"the menu below."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:692
-#, c-format
-msgid "<b>Summary:</b> %s<br><br>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:692
-msgid "<i>None</i>"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:702
-#, fuzzy, c-format
-msgid "<b>Description:</b> %s"
-msgstr ":"
-
-#: calendar/gui/e-itip-control.c:737
-#, c-format
-msgid "<b>%s</b> has published meeting information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:738
-#, fuzzy
-msgid "Meeting Information"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:742
-#, c-format
-msgid "<b>%s</b> requests your presence at a meeting."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:743
-msgid "Meeting Proposal"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:747
-#, c-format
-msgid "<b>%s</b> wishes to add to an existing meeting."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:748
-#, fuzzy
-msgid "Meeting Update"
-msgstr " :"
-
-#: calendar/gui/e-itip-control.c:752
-#, c-format
-msgid "<b>%s</b> wishes to receive the latest meeting information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:753
-msgid "Meeting Update Request"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:757
-#, c-format
-msgid "<b>%s</b> has replied to a meeting request."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:758
-msgid "Meeting Reply"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:762
-#, c-format
-msgid "<b>%s</b> has cancelled a meeting."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:763
-msgid "Meeting Cancellation"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:767 calendar/gui/e-itip-control.c:815
-#: calendar/gui/e-itip-control.c:848
-#, c-format
-msgid "<b>%s</b> has sent an unintelligible message."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:768
-#, fuzzy
-msgid "Bad Meeting Message"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:785
-#, c-format
-msgid "<b>%s</b> has published task information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:786
-#, fuzzy
-msgid "Task Information"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:790
-#, c-format
-msgid "<b>%s</b> requests you perform a task."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:791
-#, fuzzy
-msgid "Task Proposal"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:795
-#, c-format
-msgid "<b>%s</b> wishes to add to an existing task."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:796
-#, fuzzy
-msgid "Task Update"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:800
-#, c-format
-msgid "<b>%s</b> wishes to receive the latest task information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:801
-msgid "Task Update Request"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:805
-#, c-format
-msgid "<b>%s</b> has replied to a task assignment."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:806
-#, fuzzy
-msgid "Task Reply"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:810
-#, c-format
-msgid "<b>%s</b> has cancelled a task."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:811
-msgid "Task Cancellation"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:816
-#, fuzzy
-msgid "Bad Task Message"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:833
-#, c-format
-msgid "<b>%s</b> has published free/busy information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:834
-#, fuzzy
-msgid "Free/Busy Information"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:838
-#, c-format
-msgid "<b>%s</b> requests your free/busy information."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:839
-#, fuzzy
-msgid "Free/Busy Request"
-msgstr "Free-busy "
-
-#: calendar/gui/e-itip-control.c:843
-#, c-format
-msgid "<b>%s</b> has replied to a free/busy request."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:844
-#, fuzzy
-msgid "Free/Busy Reply"
-msgstr "Free-busy "
-
-#: calendar/gui/e-itip-control.c:849
-msgid "Bad Free/Busy Message"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:916
-#, fuzzy
-msgid "The message does not appear to be properly formed"
-msgstr " ."
-
-#: calendar/gui/e-itip-control.c:935
-msgid "The message contains only unsupported requests."
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:963 calendar/gui/e-itip-control.c:969
-msgid "The attachment does not contain a valid calendar message"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1088
-#, fuzzy
-msgid "Calendar file could not be updated!\n"
-msgstr "Cursor \n"
-
-#: calendar/gui/e-itip-control.c:1090
-#, fuzzy
-msgid "Update complete\n"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:1134
-msgid "Attendee status could not be updated because of an invalid status!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1142
-msgid "Attendee status ould not be updated!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1144
-msgid "Attendee status updated\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1146
-msgid "Attendee status can not be updated because the item no longer exists"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1174
-#, fuzzy
-msgid "I couldn't remove the item from your calendar file!\n"
-msgstr " !\n"
-
-#: calendar/gui/e-itip-control.c:1176
-#, fuzzy
-msgid "Removal Complete"
-msgstr "% :"
-
-#: calendar/gui/e-itip-control.c:1208 calendar/gui/e-itip-control.c:1242
-#, fuzzy
-msgid "Item sent!\n"
-msgstr " "
-
-#: calendar/gui/e-itip-control.c:1210 calendar/gui/e-itip-control.c:1246
-msgid "The item could not be sent!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.c:1406
-msgid "Unable to find any of your identities in the attendees list!\n"
-msgstr ""
-
-#: calendar/gui/e-itip-control.glade.h:2
-#, no-c-format
-msgid "%P %%"
-msgstr ""
-
-#: calendar/gui/e-itip-control.glade.h:3
-msgid "--to--"
-msgstr "----"
-
-#: calendar/gui/e-itip-control.glade.h:4
-msgid "Calendar Message"
-msgstr ""
-
-#: calendar/gui/e-itip-control.glade.h:5
-msgid "Date:"
-msgstr ":"
-
-#: calendar/gui/e-itip-control.glade.h:7
-msgid "Loading Calendar"
-msgstr " "
-
-#: calendar/gui/e-itip-control.glade.h:8
-msgid "Loading calendar..."
-msgstr " ..."
-
-#: calendar/gui/e-itip-control.glade.h:10
-#, fuzzy
-msgid "Server Message:"
-msgstr " ..."
-
-#: calendar/gui/e-itip-control.glade.h:12
-msgid "date-end"
-msgstr ""
-
-#: calendar/gui/e-itip-control.glade.h:13
-msgid "date-start"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:201 calendar/gui/e-meeting-model.c:218
-#: calendar/gui/e-meeting-model.c:502 calendar/gui/e-meeting-model.c:670
-msgid "Individual"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:203 calendar/gui/e-meeting-model.c:220
-#: calendar/gui/e-meeting-model.c:671
-#, fuzzy
-msgid "Group"
-msgstr " :"
-
-#: calendar/gui/e-meeting-model.c:205 calendar/gui/e-meeting-model.c:222
-#: calendar/gui/e-meeting-model.c:672
-#, fuzzy
-msgid "Resource"
-msgstr " :"
-
-#: calendar/gui/e-meeting-model.c:207 calendar/gui/e-meeting-model.c:224
-#: calendar/gui/e-meeting-model.c:673
-msgid "Room"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:226 calendar/gui/e-meeting-model.c:261
-#: calendar/gui/e-meeting-model.c:326 calendar/gui/e-meeting-model.c:674
-#: calendar/gui/e-meeting-model.c:690
-#: camel/providers/smtp/camel-smtp-transport.c:224
-#: widgets/misc/e-charset-picker.c:58 widgets/misc/e-charset-picker.c:438
-msgid "Unknown"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:236 calendar/gui/e-meeting-model.c:253
-#: calendar/gui/e-meeting-model.c:686
-msgid "Chair"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:238 calendar/gui/e-meeting-model.c:255
-#: calendar/gui/e-meeting-model.c:504 calendar/gui/e-meeting-model.c:687
-msgid "Required Participant"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:240 calendar/gui/e-meeting-model.c:257
-#: calendar/gui/e-meeting-model.c:688
-msgid "Optional Participant"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:242 calendar/gui/e-meeting-model.c:259
-#: calendar/gui/e-meeting-model.c:689
-msgid "Non-Participant"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:288 calendar/gui/e-meeting-model.c:311
-#: calendar/gui/e-meeting-model.c:512 calendar/gui/e-meeting-model.c:715
-#, fuzzy
-msgid "Needs Action"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:290 calendar/gui/e-meeting-model.c:313
-#: calendar/gui/e-meeting-model.c:716
-#, fuzzy
-msgid "Accepted"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:292 calendar/gui/e-meeting-model.c:315
-#: calendar/gui/e-meeting-model.c:717
-#, fuzzy
-msgid "Declined"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:294 calendar/gui/e-meeting-model.c:317
-#: calendar/gui/e-meeting-model.c:718 calendar/gui/e-meeting-time-sel.c:392
-msgid "Tentative"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:296 calendar/gui/e-meeting-model.c:319
-#: calendar/gui/e-meeting-model.c:719
-#, fuzzy
-msgid "Delegated"
-msgstr ""
-
-#: calendar/gui/e-meeting-model.c:300 calendar/gui/e-meeting-model.c:323
-#, fuzzy
-msgid "In Process"
-msgstr " "
-
-#. This is a strftime() format string %A = full weekday name,
-#. %B = full month name, %d = month day, %Y = full year.
-#: calendar/gui/e-meeting-time-sel-item.c:472
-#: calendar/gui/e-meeting-time-sel.c:1937
-msgid "%A, %B %d, %Y"
-msgstr ""
-
-#. This is a strftime() format string %a = abbreviated weekday
-#. name, %m = month number, %d = month day, %Y = full year.
-#: calendar/gui/e-meeting-time-sel-item.c:476
-#: calendar/gui/e-meeting-time-sel.c:1965 e-util/e-time-utils.c:186
-#: e-util/e-time-utils.c:345
-msgid "%a %m/%d/%Y"
-msgstr ""
-
-#. This is a strftime() format string %m = month number,
-#. %d = month day, %Y = full year.
-#: calendar/gui/e-meeting-time-sel-item.c:480 e-util/e-time-utils.c:221
-#: e-util/e-time-utils.c:276 widgets/misc/e-dateedit.c:1577
-msgid "%m/%d/%Y"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:394
-msgid "Out of Office"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:395
-msgid "No Information"
-msgstr " "
-
-#: calendar/gui/e-meeting-time-sel.c:411
-msgid "_Invite Others..."
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:431
-msgid "_Options"
-msgstr "_"
-
-#: calendar/gui/e-meeting-time-sel.c:448
-msgid "Show _Only Working Hours"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:461
-msgid "Show _Zoomed Out"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:479
-msgid "_Update Free/Busy"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:497
-msgid "_<<"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:514
-msgid "_Autopick"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:528
-msgid ">_>"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:545
-msgid "_All People and Resources"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:558
-msgid "All _People and One Resource"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:571
-msgid "_Required People"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:584
-msgid "Required People and _One Resource"
-msgstr ""
-
-#: calendar/gui/e-meeting-time-sel.c:607
-msgid "Meeting _start time:"
-msgstr " :"
-
-#: calendar/gui/e-meeting-time-sel.c:626
-msgid "Meeting _end time:"
-msgstr " :"
-
-#: calendar/gui/e-tasks.c:349
-#, c-format
-msgid "Could not load the tasks in `%s'"
-msgstr ""
-
-#: calendar/gui/e-tasks.c:361
-#, c-format
-msgid "The method required to load `%s' is not supported"
-msgstr ""
-
-#: calendar/gui/e-week-view.c:3276 calendar/gui/e-week-view.c:3314
-#, fuzzy
-msgid "New _Appointment..."
-msgstr " "
-
-#: calendar/gui/gnome-cal.c:1319
-#, c-format
-msgid "Could not open the folder in `%s'"
-msgstr " `%s'"
-
-#: calendar/gui/gnome-cal.c:1330
-#, c-format
-msgid "The method required to open `%s' is not supported"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:1
-msgid "April"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:2
-msgid "August"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:3
-msgid "December"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:4
-msgid "February"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:5
-msgid "Go To Date"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:6
-msgid "Go To Today"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:7
-msgid "January"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:8
-msgid "July"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:9
-msgid "June"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:10
-msgid "March"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:11
-msgid "May"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:12
-msgid "November"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:13
-msgid "October"
-msgstr ""
-
-#: calendar/gui/goto-dialog.glade.h:14
-msgid "September"
-msgstr ""
-
-#: calendar/gui/itip-utils.c:274
-msgid "An organizer must be set."
-msgstr ""
-
-#: calendar/gui/main.c:92
-#, fuzzy
-msgid "Could not create the component editor factory"
-msgstr " : %s"
-
-#: calendar/gui/print.c:426
-msgid "1st"
-msgstr "1"
-
-#: calendar/gui/print.c:426
-msgid "2nd"
-msgstr "2"
-
-#: calendar/gui/print.c:426
-msgid "3rd"
-msgstr "3"
-
-#: calendar/gui/print.c:426
-msgid "4th"
-msgstr "4"
-
-#: calendar/gui/print.c:426
-msgid "5th"
-msgstr "5"
-
-#: calendar/gui/print.c:427
-msgid "6th"
-msgstr "6"
-
-#: calendar/gui/print.c:427
-msgid "7th"
-msgstr "7"
-
-#: calendar/gui/print.c:427
-msgid "8th"
-msgstr "8"
-
-#: calendar/gui/print.c:427
-msgid "9th"
-msgstr "9"
-
-#: calendar/gui/print.c:427
-msgid "10th"
-msgstr "10"
-
-#: calendar/gui/print.c:428
-msgid "11th"
-msgstr "11"
-
-#: calendar/gui/print.c:428
-msgid "12th"
-msgstr "12"
-
-#: calendar/gui/print.c:428
-msgid "13th"
-msgstr "13"
-
-#: calendar/gui/print.c:428
-msgid "14th"
-msgstr "14"
-
-#: calendar/gui/print.c:428
-msgid "15th"
-msgstr "15"
-
-#: calendar/gui/print.c:429
-msgid "16th"
-msgstr "16"
-
-#: calendar/gui/print.c:429
-msgid "17th"
-msgstr "17"
-
-#: calendar/gui/print.c:429
-msgid "18th"
-msgstr "18"
-
-#: calendar/gui/print.c:429
-msgid "19th"
-msgstr "19"
-
-#: calendar/gui/print.c:429
-msgid "20th"
-msgstr "20"
-
-#: calendar/gui/print.c:430
-msgid "21st"
-msgstr "21"
-
-#: calendar/gui/print.c:430
-msgid "22nd"
-msgstr "22"
-
-#: calendar/gui/print.c:430
-msgid "23rd"
-msgstr "23"
-
-#: calendar/gui/print.c:430
-msgid "24th"
-msgstr "24"
-
-#: calendar/gui/print.c:430
-msgid "25th"
-msgstr "25"
-
-#: calendar/gui/print.c:431
-msgid "26th"
-msgstr "26"
-
-#: calendar/gui/print.c:431
-msgid "27th"
-msgstr "27"
-
-#: calendar/gui/print.c:431
-msgid "28th"
-msgstr "28"
-
-#: calendar/gui/print.c:431
-msgid "29th"
-msgstr "29"
-
-#: calendar/gui/print.c:431
-msgid "30th"
-msgstr "30"
-
-#: calendar/gui/print.c:432
-msgid "31st"
-msgstr "31"
-
-#: calendar/gui/print.c:499
-msgid "Su"
-msgstr ""
-
-#: calendar/gui/print.c:499
-msgid "Mo"
-msgstr ""
-
-#: calendar/gui/print.c:499
-msgid "Tu"
-msgstr ""
-
-#: calendar/gui/print.c:499
-msgid "We"
-msgstr ""
-
-#: calendar/gui/print.c:500
-msgid "Th"
-msgstr ""
-
-#: calendar/gui/print.c:500
-msgid "Fr"
-msgstr ""
-
-#: calendar/gui/print.c:500
-msgid "Sa"
-msgstr ""
-
-#. Day
-#: calendar/gui/print.c:1831
-#, fuzzy
-msgid "Selected day (%a %b %d %Y)"
-msgstr " (%a %b %d %Y)"
-
-#: calendar/gui/print.c:1850 calendar/gui/print.c:1854
-msgid "%a %b %d"
-msgstr ""
-
-#: calendar/gui/print.c:1851
-msgid "%a %d %Y"
-msgstr ""
-
-#: calendar/gui/print.c:1862
-#, fuzzy, c-format
-msgid "Selected week (%s - %s)"
-msgstr " (%s - %s)"
-
-#. Month
-#: calendar/gui/print.c:1870
-#, fuzzy
-msgid "Selected month (%b %Y)"
-msgstr " (%b %Y)"
-
-#. Year
-#: calendar/gui/print.c:1877
-#, fuzzy
-msgid "Selected year (%Y)"
-msgstr " (%Y)"
-
-#: calendar/gui/print.c:2221
-msgid "Print Calendar"
-msgstr " "
-
-#: calendar/gui/print.c:2312 calendar/gui/print.c:2404
-#: mail/mail-callbacks.c:2080 my-evolution/e-summary.c:607
-#: ui/evolution-addressbook.xml.h:17 ui/evolution-mail-message.xml.h:64
-msgid "Print Preview"
-msgstr " "
-
-#: calendar/gui/print.c:2341
-#, fuzzy
-msgid "Print Item"
-msgstr " ..."
-
-#: calendar/gui/print.c:2422
-msgid "Print Setup"
-msgstr " ..."
-
-#: calendar/gui/tasks-control.c:127
-msgid "The URI of the tasks folder to display"
-msgstr ""
-
-#: calendar/gui/tasks-migrate.c:106
-msgid ""
-"Evolution has taken the tasks that were in your calendar folder and "
-"automatically migrated them to the new tasks folder."
-msgstr ""
-
-#: calendar/gui/tasks-migrate.c:109
-msgid ""
-"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."
-msgstr ""
-
-#: calendar/gui/tasks-migrate.c:121
-#, c-format
-msgid ""
-"Could not open `%s'; no items from the calendar folder will be migrated to "
-"the tasks folder."
-msgstr ""
-
-#: calendar/gui/tasks-migrate.c:134
-#, c-format
-msgid ""
-"The method required to load `%s' is not supported; no items from the "
-"calendar folder will be migrated to the tasks folder."
-msgstr ""
-
-#: calendar/gui/weekday-picker.c:315 calendar/gui/weekday-picker.c:410
-msgid "SMTWTFS"
-msgstr ""
-
-#: calendar/pcs/query.c:230
-msgid "time-now expects 0 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:254
-msgid "make-time expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:259
-msgid "make-time expects argument 1 to be a string"
-msgstr ""
-
-#: calendar/pcs/query.c:267
-msgid "make-time argument 1 must be an ISO 8601 date/time string"
-msgstr ""
-
-#: calendar/pcs/query.c:296
-msgid "time-add-day expects 2 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:301
-msgid "time-add-day expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:308
-msgid "time-add-day expects argument 2 to be an integer"
-msgstr ""
-
-#: calendar/pcs/query.c:335
-msgid "time-day-begin expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:340
-msgid "time-day-begin expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:367
-msgid "time-day-end expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:372
-msgid "time-day-end expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:408
-msgid "get-vtype expects 0 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:504
-msgid "occur-in-time-range? expects 2 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:509
-msgid "occur-in-time-range? expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:516
-msgid "occur-in-time-range? expects argument 2 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:646
-#, fuzzy
-msgid "contains? expects 2 arguments"
-msgstr " "
-
-#: calendar/pcs/query.c:651
-msgid "contains? expects argument 1 to be a string"
-msgstr ""
-
-#: calendar/pcs/query.c:658
-msgid "contains? expects argument 2 to be a string"
-msgstr ""
-
-#: calendar/pcs/query.c:675
-msgid ""
-"contains? expects argument 1 to be one of \"any\", \"summary\", \"description"
-"\""
-msgstr ""
-
-#: calendar/pcs/query.c:717
-msgid "has-categories? expects at least 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:729
-msgid ""
-"has-categories? expects all arguments to be strings or one and only one "
-"argument to be a boolean false (#f)"
-msgstr ""
-
-#: calendar/pcs/query.c:817
-msgid "is-completed? expects 0 arguments"
-msgstr ""
-
-#: calendar/pcs/query.c:862
-msgid "completed-before? expects 1 argument"
-msgstr ""
-
-#: calendar/pcs/query.c:867
-msgid "completed-before? expects argument 1 to be a time_t"
-msgstr ""
-
-#: calendar/pcs/query.c:1155
-msgid "Evaluation of the search expression did not yield a boolean value"
-msgstr ""
-
-#: camel/camel-cipher-context.c:171
-msgid "Signing is not supported by this cipher"
-msgstr ""
-
-#: camel/camel-cipher-context.c:211
-msgid "Clearsigning is not supported by this cipher"
-msgstr ""
-
-#: camel/camel-cipher-context.c:251
-msgid "Verifying is not supported by this cipher"
-msgstr ""
-
-#: camel/camel-cipher-context.c:294
-msgid "Encryption is not supported by this cipher"
-msgstr ""
-
-#: camel/camel-cipher-context.c:336
-msgid "Decryption is not supported by this cipher"
-msgstr ""
-
-#: camel/camel-disco-diary.c:181
-#, c-format
-msgid ""
-"Could not write log entry: %s\n"
-"Further operations on this server will not be replayed when you\n"
-"reconnect to the network."
-msgstr ""
-
-#: camel/camel-disco-diary.c:244
-#, c-format
-msgid ""
-"Could not open `%s':\n"
-"%s\n"
-"Changes made to this folder will not be resynchronized."
-msgstr ""
-
-#: camel/camel-disco-diary.c:278
-msgid "Resynchronizing with server"
-msgstr ""
-
-#: camel/camel-disco-store.c:336
-msgid "You must be working online to complete this operation"
-msgstr ""
-
-#: camel/camel-filter-driver.c:549 camel/camel-filter-driver.c:558
-#, fuzzy
-msgid "Syncing folders"
-msgstr " "
-
-#: camel/camel-filter-driver.c:659
-#, fuzzy
-msgid "Unable to open spool folder"
-msgstr " "
-
-#: camel/camel-filter-driver.c:668
-#, fuzzy
-msgid "Unable to process spool folder"
-msgstr ""
-" '%s':\n"
-"%s"
-
-#: camel/camel-filter-driver.c:683
-#, fuzzy, c-format
-msgid "Getting message %d (%d%%)"
-msgstr " %d %d (uid \"%s\")"
-
-#: camel/camel-filter-driver.c:687 camel/camel-filter-driver.c:700
-#, fuzzy, c-format
-msgid "Failed on message %d"
-msgstr "_Mail "
-
-#: camel/camel-filter-driver.c:688
-#, fuzzy
-msgid "Cannot open message"
-msgstr " "
-
-#: camel/camel-filter-driver.c:714 camel/camel-filter-driver.c:829
-#, fuzzy
-msgid "Syncing folder"
-msgstr " "
-
-#: camel/camel-filter-driver.c:786
-#, fuzzy, c-format
-msgid "Getting message %d of %d"
-msgstr " %d %d (uid \"%s\")"
-
-#: camel/camel-filter-driver.c:791 camel/camel-filter-driver.c:809
-#, fuzzy, c-format
-msgid "Failed at message %d of %d"
-msgstr " - %s"
-
-#: camel/camel-filter-driver.c:918
-#, c-format
-msgid "Error parsing filter: %s: %s"
-msgstr ""
-
-#: camel/camel-filter-driver.c:924
-#, c-format
-msgid "Error executing filter: %s: %s"
-msgstr ""
-
-#: camel/camel-filter-search.c:494 camel/camel-filter-search.c:501
-#, c-format
-msgid "Error executing filter search: %s: %s"
-msgstr ""
-
-#: camel/camel-folder.c:472
-#, c-format
-msgid "Unsupported operation: append message: for %s"
-msgstr ""
-
-#: camel/camel-folder.c:1039
-#, c-format
-msgid "Unsupported operation: search by expression: for %s"
-msgstr ""
-
-#: camel/camel-folder.c:1219
-#, fuzzy
-msgid "Moving messages"
-msgstr " (/) "
-
-#: camel/camel-folder-search.c:333
-#, c-format
-msgid ""
-"Cannot parse search expression: %s:\n"
-"%s"
-msgstr ""
-
-#: camel/camel-folder-search.c:343
-#, c-format
-msgid ""
-"Error executing search expression: %s:\n"
-"%s"
-msgstr ""
-
-#: camel/camel-folder-search.c:560 camel/camel-folder-search.c:588
-msgid "(match-all) requires a single bool result"
-msgstr ""
-
-#: camel/camel-folder-search.c:638
-#, c-format
-msgid "Performing query on unknown header: %s"
-msgstr ""
-
-#: camel/camel-folder-search.c:748 camel/camel-folder-search.c:792
-msgid "Invalid type in body-contains, expecting string"
-msgstr ""
-
-#: camel/camel-lock-client.c:110
-#, c-format
-msgid "Cannot build locking helper pipe: %s"
-msgstr ""
-
-#: camel/camel-lock-client.c:123
-#, c-format
-msgid "Cannot fork locking helper: %s"
-msgstr ""
-
-#: camel/camel-lock-client.c:199 camel/camel-lock-client.c:222
-#, c-format
-msgid "Could not lock '%s': protocol error with lock-helper"
-msgstr ""
-
-#: camel/camel-lock-client.c:212
-#, fuzzy, c-format
-msgid "Could not lock '%s'"
-msgstr " %s: %s"
-
-#. well, this is really only a programatic error
-#: camel/camel-lock.c:92 camel/camel-lock.c:111
-#, c-format
-msgid "Could not create lock file for %s: %s"
-msgstr ""
-
-#: camel/camel-lock.c:151
-#, c-format
-msgid "Timed out trying to get lock file on %s. Try again later."
-msgstr ""
-
-#: camel/camel-lock.c:205
-#, c-format
-msgid "Failed to get lock using fcntl(2): %s"
-msgstr ""
-
-#: camel/camel-lock.c:267
-#, c-format
-msgid "Failed to get lock using flock(2): %s"
-msgstr ""
-
-#: camel/camel-movemail.c:108
-#, c-format
-msgid "Could not check mail file %s: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:122
-#, c-format
-msgid "Could not open mail file %s: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:130
-#, c-format
-msgid "Could not open temporary mail file %s: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:159
-#, c-format
-msgid "Failed to store mail in temp file %s: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:189
-#, c-format
-msgid "Could not create pipe: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:201
-#, c-format
-msgid "Could not fork: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:239
-#, c-format
-msgid "Movemail program failed: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:240
-msgid "(Unknown error)"
-msgstr "( )"
-
-#: camel/camel-movemail.c:263
-#, c-format
-msgid "Error reading mail file: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:274
-#, c-format
-msgid "Error writing mail temp file: %s"
-msgstr ""
-
-#: camel/camel-movemail.c:467 camel/camel-movemail.c:534
-#, fuzzy, c-format
-msgid "Error copying mail temp file: %s"
-msgstr " : %s"
-
-#: camel/camel-pgp-context.c:191
-#, c-format
-msgid "Please enter your %s passphrase for %s"
-msgstr ""
-
-#: camel/camel-pgp-context.c:194
-#, c-format
-msgid "Please enter your %s passphrase"
-msgstr ""
-
-#: camel/camel-pgp-context.c:525
-msgid "Cannot sign this message: no plaintext to sign"
-msgstr ""
-
-#: camel/camel-pgp-context.c:532 camel/camel-pgp-context.c:706
-msgid "Cannot sign this message: no password provided"
-msgstr ""
-
-#: camel/camel-pgp-context.c:538 camel/camel-pgp-context.c:712
-#, c-format
-msgid "Cannot sign this message: couldn't create pipe to GPG/PGP: %s"
-msgstr ""
-
-#: camel/camel-pgp-context.c:699
-msgid "Cannot sign this message: no plaintext to clearsign"
-msgstr ""
-
-#: camel/camel-pgp-context.c:891
-msgid "Cannot verify this message: no plaintext to verify"
-msgstr ""
-
-#: camel/camel-pgp-context.c:897
-#, c-format
-msgid "Cannot verify this message: couldn't create pipe to GPG/PGP: %s"
-msgstr ""
-
-#: camel/camel-pgp-context.c:908
-#, fuzzy, c-format
-msgid "Cannot verify this message: couldn't create temp file: %s"
-msgstr " : %s"
-
-#: camel/camel-pgp-context.c:1076
-msgid "Cannot encrypt this message: no plaintext to encrypt"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1086
-msgid "Cannot encrypt this message: no password provided"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1093
-#, c-format
-msgid "Cannot encrypt this message: couldn't create pipe to GPG/PGP: %s"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1102
-msgid "Cannot encrypt this message: no recipients specified"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1264
-msgid "Cannot decrypt this message: no ciphertext to decrypt"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1272
-msgid "Cannot decrypt this message: no password provided"
-msgstr ""
-
-#: camel/camel-pgp-context.c:1279
-#, c-format
-msgid "Cannot decrypt this message: couldn't create pipe to GPG/PGP: %s"
-msgstr ""
-
-#: camel/camel-provider.c:131
-#, c-format
-msgid "Could not load %s: Module loading not supported on this system."
-msgstr ""
-
-#: camel/camel-provider.c:140
-#, c-format
-msgid "Could not load %s: %s"
-msgstr " %s: %s"
-
-#: camel/camel-provider.c:148
-#, c-format
-msgid "Could not load %s: No initialization code in module."
-msgstr " %s: ."
-
-#: camel/camel-remote-store.c:203
-#, c-format
-msgid "%s server %s"
-msgstr "%s %s"
-
-#: camel/camel-remote-store.c:207
-#, c-format
-msgid "%s service for %s on %s"
-msgstr "%s %s %s"
-
-#: camel/camel-remote-store.c:264
-msgid "Connection cancelled"
-msgstr " "
-
-#: camel/camel-remote-store.c:267
-#: camel/providers/smtp/camel-smtp-transport.c:272
-#, c-format
-msgid "Could not connect to %s (port %d): %s"
-msgstr " %s ( %d): %s"
-
-#: camel/camel-remote-store.c:268
-msgid "(unknown host)"
-msgstr "( )"
-
-#: camel/camel-remote-store.c:358 camel/camel-remote-store.c:420
-#: camel/camel-remote-store.c:483
-#: camel/providers/imap/camel-imap-command.c:386
-msgid "Operation cancelled"
-msgstr " "
-
-#: camel/camel-remote-store.c:486
-#, c-format
-msgid "Server unexpectedly disconnected: %s"
-msgstr ""
-
-#: camel/camel-sasl-anonymous.c:33
-msgid "Anonymous"
-msgstr ""
-
-#: camel/camel-sasl-anonymous.c:35
-msgid "This option will connect to the server using an anonymous login."
-msgstr ""
-
-#: camel/camel-sasl-anonymous.c:110 camel/camel-sasl-plain.c:87
-#, fuzzy
-msgid "Authentication failed."
-msgstr ""
-
-#: camel/camel-sasl-anonymous.c:119
-#, c-format
-msgid ""
-"Invalid email address trace information:\n"
-"%s"
-msgstr ""
-
-#: camel/camel-sasl-anonymous.c:131
-#, fuzzy, c-format
-msgid ""
-"Invalid opaque trace information:\n"
-"%s"
-msgstr ""
-" :\n"
-"%s"
-
-#: camel/camel-sasl-anonymous.c:143
-#, fuzzy, c-format
-msgid ""
-"Invalid trace information:\n"
-"%s"
-msgstr " "
-
-#: camel/camel-sasl-cram-md5.c:35
-msgid "CRAM-MD5"
-msgstr ""
-
-#: camel/camel-sasl-cram-md5.c:37
-msgid ""
-"This option will connect to the server using a secure CRAM-MD5 password, if "
-"the server supports it."
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:43
-msgid "DIGEST-MD5"
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:45
-msgid ""
-"This option will connect to the server using a secure DIGEST-MD5 password, "
-"if the server supports it."
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:810
-msgid "Server challenge too long (>2048 octets)\n"
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:819
-msgid "Server challenge invalid\n"
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:825
-msgid "Server challenge contained invalid \"Quality of Protection\" token\n"
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:847
-msgid "Server response did not contain authorization data\n"
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:865
-msgid "Server response contained incomplete authorization data\n"
-msgstr ""
-
-#: camel/camel-sasl-digest-md5.c:875
-msgid "Server response does not match\n"
-msgstr ""
-
-#: camel/camel-sasl-kerberos4.c:40
-msgid "Kerberos 4"
-msgstr ""
-
-#: camel/camel-sasl-kerberos4.c:42
-msgid "This option will connect to the server using Kerberos 4 authentication."
-msgstr ""
-
-#: camel/camel-sasl-kerberos4.c:161
-#, c-format
-msgid ""
-"Could not get Kerberos ticket:\n"
-"%s"
-msgstr ""
-
-#: camel/camel-sasl-kerberos4.c:218
-#: camel/providers/imap/camel-imap-store.c:494
-msgid "Bad authentication response from server."
-msgstr ""
-
-#: camel/camel-sasl-login.c:32
-msgid "NT Login"
-msgstr ""
-
-#: camel/camel-sasl-login.c:34 camel/camel-sasl-plain.c:34
-msgid "This option will connect to the server using a simple password."
-msgstr ""
-
-#: camel/camel-sasl-login.c:127
-#, fuzzy
-msgid "Unknown authentication state."
-msgstr " "
-
-#: camel/camel-sasl-plain.c:32 camel/providers/imap/camel-imap-provider.c:80
-#: camel/providers/nntp/camel-nntp-store.c:302
-#: camel/providers/pop3/camel-pop3-provider.c:68 mail/mail-config.glade.h:55
-msgid "Password"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:34
-msgid "POP before SMTP"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:36
-msgid "This option will authorise a POP connection before attempting SMTP"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:107
-msgid "POP Source URI"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:111
-msgid "POP Before SMTP auth using an unknown transport"
-msgstr ""
-
-#: camel/camel-sasl-popb4smtp.c:116
-msgid "POP Before SMTP auth using a non-pop source"
-msgstr ""
-
-#: camel/camel-search-private.c:111
-#, c-format
-msgid "Regular expression compilation failed: %s: %s"
-msgstr ""
-
-#: camel/camel-service.c:157
-#, c-format
-msgid "URL '%s' needs a username component"
-msgstr ""
-
-#: camel/camel-service.c:165
-#, c-format
-msgid "URL '%s' needs a host component"
-msgstr ""
-
-#: camel/camel-service.c:173
-#, c-format
-msgid "URL '%s' needs a path component"
-msgstr ""
-
-#: camel/camel-service.c:602
-#, c-format
-msgid "Resolving: %s"
-msgstr ""
-
-#: camel/camel-service.c:629
-#, c-format
-msgid "Failure in name lookup: %s"
-msgstr ""
-
-#: camel/camel-service.c:654
-#, c-format
-msgid "Host lookup failed: %s: host not found"
-msgstr ""
-
-#: camel/camel-service.c:656
-#, c-format
-msgid "Host lookup failed: %s: unknown reason"
-msgstr ""
-
-#: camel/camel-session.c:76
-msgid "Virtual folder email provider"
-msgstr ""
-
-#: camel/camel-session.c:78
-msgid "For reading mail as a query of another set of folders"
-msgstr ""
-
-#: camel/camel-session.c:324 camel/camel-session.c:393
-#, c-format
-msgid "No provider available for protocol `%s'"
-msgstr ""
-
-#: camel/camel-session.c:510
-#, c-format
-msgid ""
-"Could not create directory %s:\n"
-"%s"
-msgstr ""
-" %s:\n"
-"%s"
-
-#: camel/camel-smime-context.c:173
-#, fuzzy, c-format
-msgid "Please enter your password for %s"
-msgstr " NNTP %s@%s"
-
-#: camel/camel-smime-context.c:203
-msgid "Please indicate the nickname of a certificate to sign with."
-msgstr ""
-
-#: camel/camel-smime-context.c:209
-#, fuzzy, c-format
-msgid "The signature certificate for \"%s\" does not exist."
-msgstr " ."
-
-#: camel/camel-smime-context.c:249
-#, fuzzy, c-format
-msgid "The encryption certificate for \"%s\" does not exist."
-msgstr " ."
-
-#: camel/camel-smime-context.c:419 camel/camel-smime-context.c:430
-#: camel/camel-smime-context.c:536 camel/camel-smime-context.c:546
-#, fuzzy, c-format
-msgid "Failed to find certificate for \"%s\"."
-msgstr " "
-
-#: camel/camel-smime-context.c:556
-msgid "Failed to find a common bulk algorithm."
-msgstr ""
-
-#: camel/camel-smime-context.c:810
-#, fuzzy
-msgid "Failed to decode message."
-msgstr " "
-
-#: camel/camel-smime-context.c:855
-msgid "Failed to verify certificates."
-msgstr ""
-
-#: camel/camel-store.c:273
-#, fuzzy
-msgid "Cannot create folder: Invalid operation on this store"
-msgstr " %s %s: %s"
-
-#: camel/camel-tcp-stream-openssl.c:491
-#, c-format
-msgid ""
-"Issuer: %s\n"
-"Subject: %s"
-msgstr ""
-
-#. construct our user prompt
-#: camel/camel-tcp-stream-openssl.c:496 camel/camel-tcp-stream-ssl.c:369
-#, c-format
-msgid ""
-"Bad certificate from %s:\n"
-"\n"
-"%s\n"
-"\n"
-"Do you wish to accept anyway?"
-msgstr ""
-
-#: camel/camel-tcp-stream-ssl.c:353
-#, c-format
-msgid ""
-"EMail: %s\n"
-"Common Name: %s\n"
-"Organization Unit: %s\n"
-"Organization: %s\n"
-"Locality: %s\n"
-"State: %s\n"
-"Country: %s"
-msgstr ""
-
-#: camel/camel-url.c:289
-#, fuzzy, c-format
-msgid "Could not parse URL `%s'"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/camel-vee-folder.c:554
-#, fuzzy, c-format
-msgid "No such message %s in %s"
-msgstr " : %s"
-
-#: camel/camel-vee-folder.c:649
-#, c-format
-msgid "No such message: %s"
-msgstr " : %s"
-
-#: camel/camel-vee-store.c:250
-#, fuzzy, c-format
-msgid "Cannot delete folder: %s: Invalid operation"
-msgstr " %s %s: %s"
-
-#: camel/camel-vee-store.c:286
-#, fuzzy, c-format
-msgid "Cannot delete folder: %s: No such folder"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/camel-vee-store.c:298
-#, fuzzy, c-format
-msgid "Cannot rename folder: %s: Invalid operation"
-msgstr " %s %s: %s"
-
-#: camel/camel-vee-store.c:326
-#, fuzzy, c-format
-msgid "Cannot rename folder: %s: No such folder"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/camel-vtrash-folder.c:109
-#, fuzzy
-msgid "You cannot copy messages from this trash folder."
-msgstr ""
-" \n"
-" Drafts."
-
-#: camel/providers/imap/camel-imap-command.c:329
-#, c-format
-msgid "Unexpected response from IMAP server: %s"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-command.c:339
-#, c-format
-msgid "IMAP command failed: %s"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-command.c:394
-msgid "Server response ended too soon."
-msgstr ""
-
-#: camel/providers/imap/camel-imap-command.c:586
-#, c-format
-msgid "IMAP server response did not contain %s information"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-command.c:622
-#, c-format
-msgid "Unexpected OK response from IMAP server: %s"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-folder.c:189
-#, c-format
-msgid "Could not create directory %s: %s"
-msgstr " %s: %s"
-
-#: camel/providers/imap/camel-imap-folder.c:208
-#, c-format
-msgid "Could not load summary for %s"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-folder.c:272
-msgid "Folder was destroyed and recreated on server."
-msgstr ""
-
-#. Check UIDs and flags of all messages we already know of.
-#: camel/providers/imap/camel-imap-folder.c:434
-#, fuzzy
-msgid "Scanning for changed messages"
-msgstr " "
-
-#: camel/providers/imap/camel-imap-folder.c:1491
-#: camel/providers/imap/camel-imap-folder.c:1899
-#, fuzzy
-msgid "This message is not currently available"
-msgstr ""
-" .\n"
-" ?"
-
-#: camel/providers/imap/camel-imap-folder.c:1633
-#: camel/providers/imap/camel-imap-folder.c:1714
-msgid "Fetching summary information for new messages"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-folder.c:1639
-#, fuzzy
-msgid "Scanning for new messages"
-msgstr " "
-
-#: camel/providers/imap/camel-imap-folder.c:1936
-msgid "Could not find message body in FETCH response."
-msgstr ""
-
-#: camel/providers/imap/camel-imap-message-cache.c:155
-#, fuzzy, c-format
-msgid "Could not open cache directory: %s"
-msgstr " %s: %s"
-
-#: camel/providers/imap/camel-imap-message-cache.c:243
-#: camel/providers/imap/camel-imap-message-cache.c:299
-#: camel/providers/imap/camel-imap-message-cache.c:330
-#: camel/providers/imap/camel-imap-message-cache.c:362
-#, fuzzy, c-format
-msgid "Failed to cache message %s: %s"
-msgstr " : %s"
-
-#: camel/providers/imap/camel-imap-provider.c:43 mail/mail-config.glade.h:15
-#, fuzzy
-msgid "Checking for new mail"
-msgstr " email"
-
-#: camel/providers/imap/camel-imap-provider.c:45
-#, fuzzy
-msgid "Check for new messages in all folders"
-msgstr " "
-
-#: camel/providers/imap/camel-imap-provider.c:48 shell/e-shell-view.c:767
-msgid "Folders"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:50
-msgid "Show only subscribed folders"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:52
-msgid "Override server-supplied folder namespace"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:54
-#, fuzzy
-msgid "Namespace"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:57
-msgid "Apply filters to new messages in INBOX on this server"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:63
-msgid "IMAP"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:65
-msgid "For reading and storing mail on IMAP servers."
-msgstr ""
-
-#: camel/providers/imap/camel-imap-provider.c:82
-msgid "This option will connect to the IMAP server using a plaintext password."
-msgstr ""
-
-#: camel/providers/imap/camel-imap-store.c:517
-#, c-format
-msgid "IMAP server %s does not support requested authentication type %s"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-store.c:527
-#: camel/providers/smtp/camel-smtp-transport.c:388
-#, c-format
-msgid "No support for authentication type %s"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-store.c:551
-#, c-format
-msgid "%sPlease enter the IMAP password for %s@%s"
-msgstr "%s IMAP %s@%s"
-
-#: camel/providers/imap/camel-imap-store.c:566
-#: camel/providers/smtp/camel-smtp-transport.c:432
-msgid "You didn't enter a password."
-msgstr ""
-
-#: camel/providers/imap/camel-imap-store.c:592
-#, c-format
-msgid ""
-"Unable to authenticate to IMAP server.\n"
-"%s\n"
-"\n"
-msgstr ""
-
-#: camel/providers/imap/camel-imap-store.c:891
-#, fuzzy, c-format
-msgid "No such folder %s"
-msgstr " `%s'."
-
-#: camel/providers/imap/camel-imap-store.c:1131
-msgid "The parent folder is not allowed to contain subfolders"
-msgstr ""
-
-#: camel/providers/local/camel-local-provider.c:40
-msgid "MH-format mail directories"
-msgstr "MH- mail "
-
-#: camel/providers/local/camel-local-provider.c:41
-#, fuzzy
-msgid "For storing local mail in MH-like mail directories."
-msgstr " qmail maildir "
-
-#: camel/providers/local/camel-local-provider.c:50
-msgid "Local delivery"
-msgstr ""
-
-#: camel/providers/local/camel-local-provider.c:51
-#, fuzzy
-msgid "For retrieving local mail from standard mbox formated spools."
-msgstr " mbox "
-
-#: camel/providers/local/camel-local-provider.c:60
-msgid "Apply filters to new messages in INBOX"
-msgstr ""
-
-#: camel/providers/local/camel-local-provider.c:66
-msgid "Qmail maildir-format mail files"
-msgstr "Qmail maildir- mail "
-
-#: camel/providers/local/camel-local-provider.c:67
-#, fuzzy
-msgid "For storing local mail in qmail maildir directories."
-msgstr " qmail maildir "
-
-#: camel/providers/local/camel-local-provider.c:78
-#, fuzzy
-msgid "Standard Unix mbox spools"
-msgstr " Unix mailbox "
-
-#: camel/providers/local/camel-local-provider.c:79
-#, fuzzy
-msgid "For reading and storing local mail in standard mbox spool files."
-msgstr " mbox "
-
-#: camel/providers/local/camel-local-store.c:132
-#: camel/providers/local/camel-spool-store.c:110
-#, c-format
-msgid "Store root %s is not an absolute path"
-msgstr ""
-
-#: camel/providers/local/camel-local-store.c:139
-#, c-format
-msgid "Store root %s is not a regular directory"
-msgstr ""
-
-#: camel/providers/local/camel-local-store.c:147
-#: camel/providers/local/camel-local-store.c:163
-#, c-format
-msgid "Cannot get folder: %s: %s"
-msgstr ""
-
-#: camel/providers/local/camel-local-store.c:178
-msgid "Local stores do not have an inbox"
-msgstr ""
-
-#: camel/providers/local/camel-local-store.c:190
-#, c-format
-msgid "Local mail file %s"
-msgstr " mail %s"
-
-#: camel/providers/local/camel-local-store.c:247
-#, c-format
-msgid "Could not rename folder %s to %s: %s"
-msgstr " %s %s: %s"
-
-#: camel/providers/local/camel-local-store.c:289
-#, c-format
-msgid "Could not delete folder summary file `%s': %s"
-msgstr ""
-
-#: camel/providers/local/camel-local-store.c:299
-#, c-format
-msgid "Could not delete folder index file `%s': %s"
-msgstr ""
-
-#: camel/providers/local/camel-local-summary.c:418
-#: camel/providers/local/camel-spool-summary.c:1158
-msgid "Unable to add message to summary: unknown reason"
-msgstr ""
-
-#: camel/providers/local/camel-maildir-folder.c:181
-#, c-format
-msgid "Cannot append message to maildir folder: %s: %s"
-msgstr " maildir : %s: %s"
-
-#: camel/providers/local/camel-maildir-folder.c:206
-#: camel/providers/local/camel-maildir-folder.c:218
-#: camel/providers/local/camel-maildir-folder.c:226
-#: camel/providers/local/camel-mbox-folder.c:328
-#: camel/providers/local/camel-mh-folder.c:195
-#: camel/providers/local/camel-mh-folder.c:204
-#: camel/providers/local/camel-mh-folder.c:212
-#: camel/providers/local/camel-spool-folder.c:537
-#, c-format
-msgid ""
-"Cannot get message: %s\n"
-" %s"
-msgstr ""
-
-#: camel/providers/local/camel-maildir-folder.c:206
-#: camel/providers/local/camel-mbox-folder.c:328
-#: camel/providers/local/camel-mh-folder.c:195
-#: camel/providers/local/camel-spool-folder.c:537
-msgid "No such message"
-msgstr " "
-
-#: camel/providers/local/camel-maildir-folder.c:227
-#: camel/providers/local/camel-mh-folder.c:213
-msgid "Invalid message contents"
-msgstr ""
-
-#: camel/providers/local/camel-maildir-store.c:106
-#: camel/providers/local/camel-mh-store.c:90
-#, c-format
-msgid ""
-"Could not open folder `%s':\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-maildir-store.c:110
-#: camel/providers/local/camel-mbox-store.c:101
-#: camel/providers/local/camel-mh-store.c:97
-#, c-format
-msgid "Folder `%s' does not exist."
-msgstr " `%s' ."
-
-#: camel/providers/local/camel-maildir-store.c:117
-#: camel/providers/local/camel-mh-store.c:103
-#, c-format
-msgid ""
-"Could not create folder `%s':\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-maildir-store.c:132
-#, c-format
-msgid "`%s' is not a maildir directory."
-msgstr "`%s' maildir ."
-
-#: camel/providers/local/camel-maildir-store.c:167
-#: camel/providers/local/camel-maildir-store.c:204
-#: camel/providers/local/camel-mh-store.c:127
-#, c-format
-msgid "Could not delete folder `%s': %s"
-msgstr " `%s': %s"
-
-#: camel/providers/local/camel-maildir-store.c:168
-msgid "not a maildir directory"
-msgstr " maildir "
-
-#: camel/providers/local/camel-maildir-store.c:331
-#, fuzzy, c-format
-msgid "Could not scan folder `%s': %s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-maildir-summary.c:405
-#: camel/providers/local/camel-maildir-summary.c:526
-#, fuzzy, c-format
-msgid "Cannot open maildir directory path: %s: %s"
-msgstr " mailbox: %s: %s\n"
-
-#: camel/providers/local/camel-mbox-folder.c:152
-#: camel/providers/local/camel-spool-folder.c:273
-#, fuzzy, c-format
-msgid "Cannot create folder lock on %s: %s"
-msgstr " %s %s: %s"
-
-#: camel/providers/local/camel-mbox-folder.c:209
-#: camel/providers/local/camel-spool-folder.c:414
-#, c-format
-msgid "Cannot open mailbox: %s: %s\n"
-msgstr " mailbox: %s: %s\n"
-
-#: camel/providers/local/camel-mbox-folder.c:265
-#, c-format
-msgid "Cannot append message to mbox file: %s: %s"
-msgstr " mbox : %s: %s"
-
-#: camel/providers/local/camel-mbox-folder.c:344
-#: camel/providers/local/camel-mbox-folder.c:376
-#: camel/providers/local/camel-mbox-folder.c:389
-#: camel/providers/local/camel-spool-folder.c:553
-#: camel/providers/local/camel-spool-folder.c:585
-#: camel/providers/local/camel-spool-folder.c:598
-#, c-format
-msgid ""
-"Cannot get message: %s from folder %s\n"
-" %s"
-msgstr ""
-
-#: camel/providers/local/camel-mbox-folder.c:377
-#: camel/providers/local/camel-spool-folder.c:586
-msgid "The folder appears to be irrecoverably corrupted."
-msgstr " ."
-
-#: camel/providers/local/camel-mbox-folder.c:390
-#: camel/providers/local/camel-spool-folder.c:599
-msgid "Message construction failed: Corrupt mailbox?"
-msgstr ""
-
-#: camel/providers/local/camel-mbox-store.c:94
-#, c-format
-msgid ""
-"Could not open file `%s':\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-store.c:110
-#, c-format
-msgid ""
-"Could not create file `%s':\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-store.c:119
-#: camel/providers/local/camel-mbox-store.c:146
-#, c-format
-msgid "`%s' is not a regular file."
-msgstr "`%s' ."
-
-#: camel/providers/local/camel-mbox-store.c:138
-#: camel/providers/local/camel-mbox-store.c:161
-#, c-format
-msgid ""
-"Could not delete folder `%s':\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-store.c:153
-#, c-format
-msgid "Folder `%s' is not empty. Not deleted."
-msgstr " `%s' . ."
-
-#. 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/providers/local/camel-mbox-summary.c:249
-#: camel/providers/local/camel-mbox-summary.c:502
-#: camel/providers/local/camel-mbox-summary.c:703
-#: camel/providers/local/camel-spool-summary.c:644
-#: camel/providers/local/camel-spool-summary.c:936
-#, fuzzy
-msgid "Storing folder"
-msgstr " "
-
-#: camel/providers/local/camel-mbox-summary.c:254
-#, fuzzy, c-format
-msgid "Could not open folder: %s: %s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-summary.c:296
-#: camel/providers/local/camel-spool-summary.c:426
-#, c-format
-msgid "Fatal mail parser error near position %ld in folder %s"
-msgstr ""
-
-#: camel/providers/local/camel-mbox-summary.c:371
-#, fuzzy, c-format
-msgid "Cannot check folder: %s: %s"
-msgstr " `%s': %s"
-
-#: camel/providers/local/camel-mbox-summary.c:507
-#: camel/providers/local/camel-mbox-summary.c:708
-#: camel/providers/local/camel-spool-summary.c:649
-#, fuzzy, c-format
-msgid "Could not open file: %s: %s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: camel/providers/local/camel-mbox-summary.c:524
-#: camel/providers/local/camel-spool-summary.c:673
-#, c-format
-msgid "Cannot open temporary mailbox: %s"
-msgstr " mailbox: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:549
-#: camel/providers/local/camel-mbox-summary.c:557
-#: camel/providers/local/camel-mbox-summary.c:746
-#: camel/providers/local/camel-mbox-summary.c:754
-#: camel/providers/local/camel-spool-summary.c:698
-#: camel/providers/local/camel-spool-summary.c:706
-#: camel/providers/local/camel-spool-summary.c:979
-#: camel/providers/local/camel-spool-summary.c:987
-msgid "Summary and folder mismatch, even after a sync"
-msgstr ""
-
-#: camel/providers/local/camel-mbox-summary.c:600
-#: camel/providers/local/camel-spool-summary.c:750
-#, c-format
-msgid "Error writing to temp mailbox: %s"
-msgstr " mailbox: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:617
-#: camel/providers/local/camel-spool-summary.c:772
-#, c-format
-msgid "Writing to tmp mailbox failed: %s: %s"
-msgstr " mailbox : %s: %s"
-
-#: camel/providers/local/camel-mbox-summary.c:635
-#: camel/providers/local/camel-mbox-summary.c:804
-#: camel/providers/local/camel-spool-summary.c:1037
-#, c-format
-msgid "Could not close source folder %s: %s"
-msgstr ""
-
-#: camel/providers/local/camel-mbox-summary.c:644
-#, c-format
-msgid "Could not close temp folder: %s"
-msgstr " : %s"
-
-#: camel/providers/local/camel-mbox-summary.c:655
-#, c-format
-msgid "Could not rename folder: %s"
-msgstr " : %s"
-
-#: camel/providers/local/camel-mbox-summary.c:878
-#: camel/providers/local/camel-spool-summary.c:545
-#: camel/providers/local/camel-spool-summary.c:1111
-#, c-format
-msgid "Unknown error: %s"
-msgstr " : %s"
-
-#: camel/providers/local/camel-mh-folder.c:172
-#, c-format
-msgid "Cannot append message to mh folder: %s: %s"
-msgstr " mh : %s: %s"
-
-#: camel/providers/local/camel-mh-store.c:110
-#, c-format
-msgid "`%s' is not a directory."
-msgstr "`%s' ."
-
-#: camel/providers/local/camel-mh-summary.c:218
-#, fuzzy, c-format
-msgid "Cannot open MH directory path: %s: %s"
-msgstr " mailbox: %s: %s\n"
-
-#: camel/providers/local/camel-spool-folder.c:470
-#, fuzzy, c-format
-msgid "Cannot append message to spool file: %s: %s"
-msgstr " mbox : %s: %s"
-
-#: camel/providers/local/camel-spool-store.c:116
-#, fuzzy, c-format
-msgid "Spool `%s' does not exist or is not a regular file"
-msgstr "`%s' ."
-
-#: camel/providers/local/camel-spool-store.c:142
-#, fuzzy, c-format
-msgid "Folder `%s/%s' does not exist."
-msgstr " `%s' ."
-
-#: camel/providers/local/camel-spool-store.c:164
-#, fuzzy, c-format
-msgid "Spool mail file %s"
-msgstr " mail %s"
-
-#: camel/providers/local/camel-spool-store.c:210
-msgid "Spool folders cannot be renamed"
-msgstr ""
-
-#: camel/providers/local/camel-spool-store.c:218
-msgid "Spool folders cannot be deleted"
-msgstr ""
-
-#. 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/providers/local/camel-spool-summary.c:379
-#, fuzzy
-msgid "Summarising folder"
-msgstr " "
-
-#: camel/providers/local/camel-spool-summary.c:384
-#, c-format
-msgid "Could not open folder: %s: summarising from position %ld: %s"
-msgstr ""
-
-#: camel/providers/local/camel-spool-summary.c:498
-#, c-format
-msgid "Cannot summarise folder: %s: %s"
-msgstr ""
-
-#: camel/providers/local/camel-spool-summary.c:789
-#: camel/providers/local/camel-spool-summary.c:798
-#: camel/providers/local/camel-spool-summary.c:807
-#, fuzzy, c-format
-msgid "Could not sync temporary folder %s: %s"
-msgstr " : %s"
-
-#: camel/providers/local/camel-spool-summary.c:822
-#, fuzzy, c-format
-msgid "Could not sync spool folder %s: %s"
-msgstr " `%s': %s"
-
-#: camel/providers/local/camel-spool-summary.c:852
-#: camel/providers/local/camel-spool-summary.c:870
-#: camel/providers/local/camel-spool-summary.c:882
-#, c-format
-msgid ""
-"Could not sync spool folder %s: %s\n"
-"Folder may be corrupt, copy saved in `%s'"
-msgstr ""
-
-#: camel/providers/local/camel-spool-summary.c:941
-#, fuzzy, c-format
-msgid "Could not file: %s: %s"
-msgstr " %s: %s"
-
-#: camel/providers/nntp/camel-nntp-auth.c:45
-#, c-format
-msgid "Please enter the NNTP password for %s@%s"
-msgstr " NNTP %s@%s"
-
-#: camel/providers/nntp/camel-nntp-auth.c:65
-msgid "Server rejected username"
-msgstr " "
-
-#: camel/providers/nntp/camel-nntp-auth.c:71
-msgid "Failed to send username to server"
-msgstr " "
-
-#: camel/providers/nntp/camel-nntp-auth.c:80
-msgid "Server rejected username/password"
-msgstr " /"
-
-#: camel/providers/nntp/camel-nntp-folder.c:116
-#, c-format
-msgid "Message %s not found."
-msgstr " %s ."
-
-#: camel/providers/nntp/camel-nntp-grouplist.c:46
-msgid "Could not get group list from server."
-msgstr ""
-
-#: camel/providers/nntp/camel-nntp-grouplist.c:99
-#: camel/providers/nntp/camel-nntp-grouplist.c:108
-#, c-format
-msgid "Unable to load grouplist file for %s: %s"
-msgstr ""
-
-#: camel/providers/nntp/camel-nntp-grouplist.c:159
-#, c-format
-msgid "Unable to save grouplist file for %s: %s"
-msgstr ""
-
-#: camel/providers/nntp/camel-nntp-provider.c:42
-msgid "USENET news"
-msgstr "USENET "
-
-#: camel/providers/nntp/camel-nntp-provider.c:44
-msgid "This is a provider for reading from and posting toUSENET newsgroups."
-msgstr ""
-
-#: camel/providers/nntp/camel-nntp-store.c:231
-#, c-format
-msgid "Could not open directory for news server: %s"
-msgstr ""
-
-#: camel/providers/nntp/camel-nntp-store.c:297
-#, c-format
-msgid "USENET News via %s"
-msgstr "USENET %s"
-
-#: camel/providers/nntp/camel-nntp-store.c:304
-msgid ""
-"This option will authenticate with the NNTP server using a plaintext "
-"password."
-msgstr ""
-
-#: camel/providers/nntp/camel-nntp-store.c:334
-#: camel/providers/nntp/camel-nntp-store.c:496
-#, c-format
-msgid "Unable to open or create .newsrc file for %s: %s"
-msgstr " .newsrc %s: %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:189
-msgid "Retrieving POP summary"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-folder.c:195
-#, fuzzy, c-format
-msgid "Could not check POP server for new messages: %s"
-msgstr " : %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:242
-msgid "Could not open folder: message listing was incomplete."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-folder.c:266
-#, fuzzy
-msgid "Expunging deleted messages"
-msgstr " "
-
-#: camel/providers/pop3/camel-pop3-folder.c:342
-#, fuzzy, c-format
-msgid "Could not fetch message: %s"
-msgstr " : %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:358
-#, c-format
-msgid "Could not retrieve message from POP server %s: %s"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-folder.c:381
-#, c-format
-msgid "No message with uid %s"
-msgstr " uid %s"
-
-#: camel/providers/pop3/camel-pop3-folder.c:385
-#, fuzzy, c-format
-msgid "Retrieving POP message %d"
-msgstr " "
-
-#: camel/providers/pop3/camel-pop3-provider.c:37
-#, fuzzy
-msgid "Message storage"
-msgstr " "
-
-#: camel/providers/pop3/camel-pop3-provider.c:39
-#, fuzzy
-msgid "Leave messages on server"
-msgstr " "
-
-#: camel/providers/pop3/camel-pop3-provider.c:42
-#, c-format
-msgid "Delete after %s day(s)"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-provider.c:51 mail/mail-config.glade.h:54
-msgid "POP"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-provider.c:53
-msgid "For connecting to and downloading mail from POP servers."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-provider.c:70
-msgid ""
-"This option will connect to the POP server using a plaintext password. This "
-"is the only option supported by many POP servers."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-provider.c:80
-msgid ""
-"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."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-provider.c:92
-msgid ""
-"This will connect to the POP server and use Kerberos 4 to authenticate to it."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:199
-#, c-format
-msgid "Could not authenticate to KPOP server: %s"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:215
-#, fuzzy, c-format
-msgid "Could not connect to server: %s"
-msgstr " %s ( %d): %s"
-
-#: camel/providers/pop3/camel-pop3-store.c:322
-#, c-format
-msgid "Could not connect to POP server on %s."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:361
-#, c-format
-msgid "%sPlease enter the POP3 password for %s@%s"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:379
-#, c-format
-msgid ""
-"Unable to connect to POP server.\n"
-"Error sending username: %s"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:382
-#: camel/providers/pop3/camel-pop3-store.c:419
-msgid "(Unknown)"
-msgstr "()"
-
-#: camel/providers/pop3/camel-pop3-store.c:409
-msgid ""
-"Unable to connect to POP server.\n"
-"No support for requested authentication mechanism."
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:417
-#, c-format
-msgid ""
-"Unable to connect to POP server.\n"
-"Error sending password: %s"
-msgstr ""
-
-#: camel/providers/pop3/camel-pop3-store.c:484
-#, c-format
-msgid "No such folder `%s'."
-msgstr " `%s'."
-
-#: camel/providers/pop3/camel-pop3-store.c:567
-#, c-format
-msgid "Unexpected response from POP server: %s"
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-provider.c:37
-#: mail/mail-config.glade.h:73
-msgid "Sendmail"
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-provider.c:39
-msgid ""
-"For delivering mail by passing it to the \"sendmail\" program on the local "
-"system."
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:107
-#, c-format
-msgid "Could not create pipe to sendmail: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:124
-#, c-format
-msgid "Could not fork sendmail: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:150
-#, c-format
-msgid "Could not send message: %s"
-msgstr " : %s"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:163
-#, c-format
-msgid "sendmail exited with signal %s: mail not sent."
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:170
-#, c-format
-msgid "Could not execute %s: mail not sent."
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:175
-#, c-format
-msgid "sendmail exited with status %d: mail not sent."
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:194
-#, fuzzy
-msgid "Could not find 'From' address in message"
-msgstr " : %s"
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:247
-msgid "sendmail"
-msgstr ""
-
-#: camel/providers/sendmail/camel-sendmail-transport.c:249
-msgid "Mail delivery via the sendmail program"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-provider.c:38 mail/mail-config.glade.h:66
-msgid "SMTP"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-provider.c:40
-msgid "For delivering mail by connecting to a remote mailhub using SMTP.\n"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:171
-msgid "Syntax error, command unrecognized"
-msgstr " , "
-
-#: camel/providers/smtp/camel-smtp-transport.c:173
-msgid "Syntax error in parameters or arguments"
-msgstr " "
-
-#: camel/providers/smtp/camel-smtp-transport.c:175
-msgid "Command not implemented"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:177
-msgid "Command parameter not implemented"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:179
-msgid "System status, or system help reply"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:181
-msgid "Help message"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:183
-msgid "Service ready"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:185
-msgid "Service closing transmission channel"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:187
-msgid "Service not available, closing transmission channel"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:189
-msgid "Requested mail action okay, completed"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:191
-msgid "User not local; will forward to <forward-path>"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:193
-msgid "Requested mail action not taken: mailbox unavailable"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:195
-msgid "Requested action not taken: mailbox unavailable"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:197
-msgid "Requested action aborted: error in processing"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:199
-msgid "User not local; please try <forward-path>"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:201
-msgid "Requested action not taken: insufficient system storage"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:203
-msgid "Requested mail action aborted: exceeded storage allocation"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:205
-msgid "Requested action not taken: mailbox name not allowed"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:207
-msgid "Start mail input; end with <CRLF>.<CRLF>"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:209
-msgid "Transaction failed"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:213
-#, fuzzy
-msgid "A password transition is needed"
-msgstr " ."
-
-#: camel/providers/smtp/camel-smtp-transport.c:215
-msgid "Authentication mechanism is too weak"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:217
-msgid "Encryption required for requested authentication mechanism"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:219
-msgid "Temporary authentication failure"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:221
-#, fuzzy
-msgid "Authentication required"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:316
-#, c-format
-msgid "Welcome response error: %s: possibly non-fatal"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:378
-#, c-format
-msgid "SMTP server %s does not support requested authentication type %s"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:417
-#, fuzzy, c-format
-msgid "%sPlease enter the SMTP password for %s@%s"
-msgstr "%s IMAP %s@%s"
-
-#: camel/providers/smtp/camel-smtp-transport.c:440
-#, c-format
-msgid ""
-"Unable to authenticate to SMTP server.\n"
-"%s\n"
-"\n"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:556
-#, c-format
-msgid "SMTP server %s"
-msgstr "SMTP %s"
-
-#: camel/providers/smtp/camel-smtp-transport.c:558
-#, c-format
-msgid "SMTP mail delivery via %s"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:583
-msgid "Cannot send message: sender address not defined."
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:590
-msgid "Cannot send message: sender address not valid."
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:595 mail/mail-ops.c:553
-msgid "Sending message"
-msgstr " "
-
-#: camel/providers/smtp/camel-smtp-transport.c:606
-msgid "Cannot send message: no recipients defined."
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:686
-msgid "SMTP Greeting"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:708
-#, c-format
-msgid "HELO request timed out: %s: non-fatal"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:728
-#, c-format
-msgid "HELO response error: %s: non-fatal"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:760
-#, fuzzy
-msgid "SMTP Authentication"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:766
-msgid "Error creating SASL authentication object."
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:781
-#: camel/providers/smtp/camel-smtp-transport.c:793
-#, c-format
-msgid "AUTH request timed out: %s"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:802
-msgid "AUTH request failed."
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:850
-msgid "Bad authentication response from server.\n"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:876
-#, c-format
-msgid "MAIL FROM request timed out: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:895
-#, c-format
-msgid "MAIL FROM response error: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:920
-#, c-format
-msgid "RCPT TO request timed out: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:939
-#, c-format
-msgid "RCPT TO response error: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:970
-#, c-format
-msgid "DATA request timed out: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:989
-#, c-format
-msgid "DATA response error: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:1008
-#: camel/providers/smtp/camel-smtp-transport.c:1026
-#, c-format
-msgid "DATA send timed out: message termination: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:1045
-#, c-format
-msgid "DATA response error: message termination: %s: mail not sent"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:1069
-#, c-format
-msgid "RSET request timed out: %s"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:1088
-#, c-format
-msgid "RSET response error: %s"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:1111
-#, c-format
-msgid "QUIT request timed out: %s: non-fatal"
-msgstr ""
-
-#: camel/providers/smtp/camel-smtp-transport.c:1130
-#, c-format
-msgid "QUIT response error: %s: non-fatal"
-msgstr ""
-
-#: composer/e-msg-composer-attachment-bar.c:97
-msgid "1 byte"
-msgstr "1 "
-
-#: composer/e-msg-composer-attachment-bar.c:99
-#, c-format
-msgid "%u bytes"
-msgstr "%u "
-
-#: composer/e-msg-composer-attachment-bar.c:106
-#, c-format
-msgid "%.1fK"
-msgstr ""
-
-#: composer/e-msg-composer-attachment-bar.c:110
-#, c-format
-msgid "%.1fM"
-msgstr ""
-
-#: composer/e-msg-composer-attachment-bar.c:114
-#, c-format
-msgid "%.1fG"
-msgstr ""
-
-#. This is a filename. Translators take note.
-#: composer/e-msg-composer-attachment-bar.c:337 mail/mail-display.c:134
-msgid "attachment"
-msgstr ""
-
-#: composer/e-msg-composer-attachment-bar.c:478
-msgid "Remove selected items from the attachment list"
-msgstr ""
-
-#: composer/e-msg-composer-attachment-bar.c:509
-msgid "Add attachment..."
-msgstr ""
-
-#: composer/e-msg-composer-attachment-bar.c:510
-msgid "Attach a file to the message"
-msgstr " "
-
-#: composer/e-msg-composer-attachment.glade.h:1
-msgid "Attachment properties"
-msgstr ""
-
-#: composer/e-msg-composer-attachment.glade.h:3
-msgid "File name:"
-msgstr " :"
-
-#: composer/e-msg-composer-attachment.glade.h:4
-msgid "MIME type:"
-msgstr "MIME :"
-
-#: composer/e-msg-composer-attachment.glade.h:5
-#: composer/e-msg-composer-select-file.c:135
-msgid "Suggest automatic display of attachment"
-msgstr ""
-
-#: composer/e-msg-composer-hdrs.c:326
-msgid "Click here for the address book"
-msgstr ""
-
-#.
-#. * From:
-#.
-#: composer/e-msg-composer-hdrs.c:357
-msgid "From:"
-msgstr ":"
-
-#.
-#. * Reply-To:
-#.
-#: composer/e-msg-composer-hdrs.c:363
-msgid "Reply-To:"
-msgstr "-:"
-
-#.
-#. * Subject:
-#.
-#: composer/e-msg-composer-hdrs.c:374
-msgid "Subject:"
-msgstr ":"
-
-#: composer/e-msg-composer-hdrs.c:388
-msgid "To:"
-msgstr ":"
-
-#: composer/e-msg-composer-hdrs.c:389
-msgid "Enter the recipients of the message"
-msgstr ""
-
-#: composer/e-msg-composer-hdrs.c:392
-msgid "Cc:"
-msgstr ""
-
-#: composer/e-msg-composer-hdrs.c:393
-msgid "Enter the addresses that will receive a carbon copy of the message"
-msgstr ""
-
-#: composer/e-msg-composer-hdrs.c:396
-msgid "Bcc:"
-msgstr ""
-
-#: composer/e-msg-composer-hdrs.c:397
-msgid ""
-"Enter the addresses that will receive a carbon copy of the message without "
-"appearing in the recipient list of the message."
-msgstr ""
-
-#: composer/e-msg-composer-select-file.c:228
-#: ui/evolution-message-composer.xml.h:2
-msgid "Attach a file"
-msgstr " "
-
-#: composer/e-msg-composer.c:676
-#, fuzzy, c-format
-msgid ""
-"Error while reading file %s:\n"
-"%s"
-msgstr " : %s"
-
-#: composer/e-msg-composer.c:858
-msgid "Save as..."
-msgstr " ..."
-
-#: composer/e-msg-composer.c:867
-#, fuzzy
-msgid "Warning!"
-msgstr ""
-
-#: composer/e-msg-composer.c:871
-msgid "File exists, overwrite?"
-msgstr ""
-
-#: composer/e-msg-composer.c:893
-#, c-format
-msgid "Error saving file: %s"
-msgstr " : %s"
-
-#: composer/e-msg-composer.c:912
-#, c-format
-msgid "Error loading file: %s"
-msgstr " : %s"
-
-#: composer/e-msg-composer.c:983
-msgid ""
-"Unable to open the drafts folder for this account.\n"
-"Would you like to use the default drafts folder?"
-msgstr ""
-
-#: composer/e-msg-composer.c:1036
-#, fuzzy, c-format
-msgid "Error accessing file: %s"
-msgstr " : %s"
-
-#: composer/e-msg-composer.c:1044
-msgid "Unable to retrieve message from editor"
-msgstr ""
-
-#: composer/e-msg-composer.c:1050
-#, fuzzy, c-format
-msgid ""
-"Unable to seek on file: %s\n"
-"%s"
-msgstr ""
-" '%s':\n"
-"%s"
-
-#: composer/e-msg-composer.c:1056
-#, fuzzy, c-format
-msgid ""
-"Unable to truncate file: %s\n"
-"%s"
-msgstr ""
-" '%s':\n"
-"%s"
-
-#: composer/e-msg-composer.c:1065
-#, fuzzy, c-format
-msgid ""
-"Error autosaving message: %s\n"
-" %s"
-msgstr " : %s"
-
-#: composer/e-msg-composer.c:1165
-msgid ""
-"Ximian Evolution has found unsaved files from a previous session.\n"
-"Would you like to try to recover them?"
-msgstr ""
-
-#: composer/e-msg-composer.c:1313
-msgid ""
-"This message has not been sent.\n"
-"\n"
-"Do you wish to save your changes?"
-msgstr ""
-
-#: composer/e-msg-composer.c:1320
-msgid "Warning: Modified Message"
-msgstr ""
-
-#: composer/e-msg-composer.c:1343
-msgid "Open file"
-msgstr " "
-
-#: composer/e-msg-composer.c:1492
-#, fuzzy
-msgid "Insert File"
-msgstr " ..."
-
-#: composer/e-msg-composer.c:1868 composer/e-msg-composer.c:2314
-msgid "Compose a message"
-msgstr " "
-
-#: composer/e-msg-composer.c:2404
-msgid "Could not create composer window."
-msgstr ""
-
-#: composer/evolution-composer.c:349
-msgid ""
-"Could not create composer window, because you have not yet\n"
-"configured any identities in the mail component."
-msgstr ""
-
-#: composer/evolution-composer.c:364
-msgid "Cannot initialize Evolution's composer."
-msgstr ""
-
-#: data/evolution.desktop.in.h:1 shell/main.c:76
-msgid "Evolution"
-msgstr ""
-
-#: data/evolution.desktop.in.h:2
-msgid "The Evolution groupware suite"
-msgstr ""
-
-#: data/evolution.keys.in.h:1
-msgid "address card"
-msgstr " "
-
-#: data/evolution.keys.in.h:2
-msgid "calendar information"
-msgstr " "
-
-#: default_user/searches.xml.h:1
-msgid "Body contains"
-msgstr " "
-
-#: default_user/searches.xml.h:2
-msgid "Body does not contain"
-msgstr " "
-
-#: default_user/searches.xml.h:3
-msgid "Body or subject contains"
-msgstr " "
-
-#: default_user/searches.xml.h:4
-#, fuzzy
-msgid "Message contains"
-msgstr " "
-
-#: default_user/searches.xml.h:5
-#, fuzzy
-msgid "Recipients contain"
-msgstr ""
-
-#: default_user/searches.xml.h:6
-msgid "Sender contains"
-msgstr " "
-
-#: default_user/searches.xml.h:7
-msgid "Subject contains"
-msgstr " "
-
-#: default_user/searches.xml.h:8
-msgid "Subject does not contain"
-msgstr " "
-
-#. strptime format of a weekday, a date and a time,
-#. in 12-hour format, without seconds.
-#: e-util/e-time-utils.c:168 e-util/e-time-utils.c:359
-msgid "%a %m/%d/%Y %I:%M %p"
-msgstr ""
-
-#. strptime format of a weekday, a date and a time,
-#. in 24-hour format, without seconds.
-#: e-util/e-time-utils.c:173 e-util/e-time-utils.c:350
-#, fuzzy
-msgid "%a %m/%d/%Y %H:%M"
-msgstr " %A %b %d %Y %H:%M"
-
-#. strptime format of a weekday, a date and a time,
-#. in 12-hour format, without minutes or seconds.
-#: e-util/e-time-utils.c:178
-msgid "%a %m/%d/%Y %I %p"
-msgstr ""
-
-#. strptime format of a weekday, a date and a time,
-#. in 24-hour format, without minutes or seconds.
-#: e-util/e-time-utils.c:183
-msgid "%a %m/%d/%Y %H"
-msgstr ""
-
-#. strptime format of a date and a time, in 12-hour format.
-#: e-util/e-time-utils.c:194
-msgid "%m/%d/%Y %I:%M:%S %p"
-msgstr ""
-
-#. strptime format of a date and a time, in 24-hour format.
-#: e-util/e-time-utils.c:198
-msgid "%m/%d/%Y %H:%M:%S"
-msgstr ""
-
-#. strptime format of a date and a time, in 12-hour format,
-#. without seconds.
-#: e-util/e-time-utils.c:203
-msgid "%m/%d/%Y %I:%M %p"
-msgstr ""
-
-#. strptime format of a date and a time, in 24-hour format,
-#. without seconds.
-#: e-util/e-time-utils.c:208
-msgid "%m/%d/%Y %H:%M"
-msgstr ""
-
-#. strptime format of a date and a time, in 12-hour format,
-#. without minutes or seconds.
-#: e-util/e-time-utils.c:213
-msgid "%m/%d/%Y %I %p"
-msgstr ""
-
-#. strptime format of a date and a time, in 24-hour format,
-#. without minutes or seconds.
-#: e-util/e-time-utils.c:218
-msgid "%m/%d/%Y %H"
-msgstr ""
-
-#. strptime format for a time of day, in 12-hour format.
-#: e-util/e-time-utils.c:300 e-util/e-time-utils.c:399
-msgid "%I:%M:%S %p"
-msgstr ""
-
-#. strptime format for a time of day, in 24-hour format.
-#: e-util/e-time-utils.c:304 e-util/e-time-utils.c:391
-msgid "%H:%M:%S"
-msgstr ""
-
-#. strptime format for time of day, without seconds,
-#. in 12-hour format.
-#: e-util/e-time-utils.c:309 e-util/e-time-utils.c:396
-#: widgets/misc/e-dateedit.c:1385 widgets/misc/e-dateedit.c:1612
-msgid "%I:%M %p"
-msgstr ""
-
-#. strptime format for time of day, without seconds 24-hour format.
-#: e-util/e-time-utils.c:313 e-util/e-time-utils.c:388
-#: widgets/misc/e-dateedit.c:1382 widgets/misc/e-dateedit.c:1609
-msgid "%H:%M"
-msgstr ""
-
-#. strptime format for hour and AM/PM, 12-hour format.
-#: e-util/e-time-utils.c:317
-msgid "%I %p"
-msgstr ""
-
-#: filter/filter-datespec.c:80
-msgid "year"
-msgstr ""
-
-#: filter/filter-datespec.c:80
-msgid "years"
-msgstr ""
-
-#: filter/filter-datespec.c:81
-msgid "month"
-msgstr ""
-
-#: filter/filter-datespec.c:81
-msgid "months"
-msgstr ""
-
-#: filter/filter-datespec.c:82
-msgid "week"
-msgstr ""
-
-#: filter/filter-datespec.c:82
-msgid "weeks"
-msgstr ""
-
-#: filter/filter-datespec.c:84
-msgid "hour"
-msgstr ""
-
-#: filter/filter-datespec.c:85
-msgid "minute"
-msgstr ""
-
-#: filter/filter-datespec.c:86
-msgid "second"
-msgstr ""
-
-#: filter/filter-datespec.c:86
-msgid "seconds"
-msgstr ""
-
-#: filter/filter-datespec.c:194
-msgid "Oops. You have forgotten to choose a date."
-msgstr ". ."
-
-#: filter/filter-datespec.c:196
-msgid "Oops. You have chosen an invalid date."
-msgstr ". ."
-
-#: filter/filter-datespec.c:271
-msgid ""
-"The message's date will be compared against\n"
-"whatever the time is when the filter is run\n"
-"or vfolder is opened."
-msgstr ""
-
-#: filter/filter-datespec.c:294
-msgid ""
-"The message's date will be compared against\n"
-"the time that you specify here."
-msgstr ""
-
-#: filter/filter-datespec.c:334
-msgid ""
-"The message's date will be compared against\n"
-"a time relative to when the filter is run;\n"
-"\"a week ago\", for example."
-msgstr ""
-
-#. keep in sync with FilterDatespec_type!
-#: filter/filter-datespec.c:369
-msgid "the current time"
-msgstr " "
-
-#: filter/filter-datespec.c:369
-msgid "a time you specify"
-msgstr " "
-
-#: filter/filter-datespec.c:370
-msgid "a time relative to the current time"
-msgstr ""
-
-#. The dialog
-#: filter/filter-datespec.c:394
-msgid "Select a time to compare against"
-msgstr ""
-
-#. The label
-#: filter/filter-datespec.c:428
-msgid "Compare against"
-msgstr " "
-
-#: filter/filter-datespec.c:546 filter/filter-datespec.c:725
-msgid "now"
-msgstr ""
-
-#: filter/filter-datespec.c:575
-msgid " ago"
-msgstr ""
-
-#: filter/filter-datespec.c:621
-msgid "ago"
-msgstr ""
-
-#: filter/filter-datespec.c:711 mail/message-list.c:940
-msgid "%b %d %l:%M %p"
-msgstr ""
-
-#: filter/filter-datespec.c:722
-msgid "<click here to select a date>"
-msgstr "< >"
-
-#: filter/filter-editor.c:132 filter/filter.glade.h:3
-msgid "Filter Rules"
-msgstr ""
-
-#. and now for the action area
-#: filter/filter-filter.c:487
-msgid "Then"
-msgstr ""
-
-#: filter/filter-filter.c:501
-msgid "Add action"
-msgstr ""
-
-#: filter/filter-folder.c:147
-msgid ""
-"Oops, you forgot to choose a folder.\n"
-"Please go back and specify a valid folder to deliver mail to."
-msgstr ""
-
-#: filter/filter-folder.c:232 filter/vfolder-rule.c:356
-#: mail/mail-account-gui.c:822
-msgid "Select Folder"
-msgstr " "
-
-#: filter/filter-folder.c:257
-msgid "Enter folder URI"
-msgstr ""
-
-#: filter/filter-folder.c:303
-msgid "<click here to select a folder>"
-msgstr "< >"
-
-#: filter/filter-input.c:198
-#, c-format
-msgid ""
-"Error in regular expression '%s':\n"
-"%s"
-msgstr ""
-
-#: filter/filter-part.c:488
-msgid "Test"
-msgstr ""
-
-#: filter/filter-rule.c:696
-msgid "Rule name: "
-msgstr ""
-
-#: filter/filter-rule.c:700
-msgid "Untitled"
-msgstr ""
-
-#: filter/filter-rule.c:717
-msgid "If"
-msgstr ""
-
-#: filter/filter-rule.c:735
-msgid "Execute actions"
-msgstr ""
-
-#: filter/filter-rule.c:739
-msgid "if all criteria are met"
-msgstr " "
-
-#: filter/filter-rule.c:744
-msgid "if any criteria are met"
-msgstr " "
-
-#: filter/filter-rule.c:755
-msgid "Add criterion"
-msgstr " "
-
-#: filter/filter-rule.c:840
-msgid "incoming"
-msgstr ""
-
-#: filter/filter-rule.c:840
-msgid "outgoing"
-msgstr ""
-
-#: filter/filter.glade.h:1
-msgid "Edit Filters"
-msgstr " "
-
-#: filter/filter.glade.h:2
-msgid "Edit VFolders"
-msgstr " VFolders"
-
-#: filter/filter.glade.h:4
-msgid "Incoming"
-msgstr ""
-
-#: filter/filter.glade.h:5
-msgid "Outgoing"
-msgstr ""
-
-#: filter/filter.glade.h:6 filter/vfolder-editor.c:130
-msgid "Virtual Folders"
-msgstr " "
-
-#: filter/filter.glade.h:11
-#, fuzzy
-msgid "specific folders only"
-msgstr " "
-
-#: filter/filter.glade.h:12
-msgid "vFolder Sources"
-msgstr ""
-
-#: filter/filter.glade.h:13
-msgid "with all active remote folders"
-msgstr ""
-
-#: filter/filter.glade.h:14
-msgid "with all local and active remote folders"
-msgstr ""
-
-#: filter/filter.glade.h:15
-#, fuzzy
-msgid "with all local folders"
-msgstr " "
-
-#: filter/libfilter-i18n.h:3
-#, fuzzy
-msgid "Assign Color"
-msgstr " "
-
-#: filter/libfilter-i18n.h:4
-msgid "Assign Score"
-msgstr ""
-
-#: filter/libfilter-i18n.h:5
-#, fuzzy
-msgid "Attachments"
-msgstr ""
-
-#: filter/libfilter-i18n.h:7
-msgid "contains"
-msgstr ""
-
-#: filter/libfilter-i18n.h:8
-msgid "Copy to Folder"
-msgstr " "
-
-#: filter/libfilter-i18n.h:9
-msgid "Date received"
-msgstr " "
-
-#: filter/libfilter-i18n.h:10
-msgid "Date sent"
-msgstr " "
-
-#: filter/libfilter-i18n.h:12
-#, fuzzy
-msgid "Deleted"
-msgstr ""
-
-#: filter/libfilter-i18n.h:13
-msgid "does not contain"
-msgstr " "
-
-#: filter/libfilter-i18n.h:14
-msgid "does not end with"
-msgstr " "
-
-#: filter/libfilter-i18n.h:15
-msgid "does not exist"
-msgstr " "
-
-#: filter/libfilter-i18n.h:16
-msgid "does not sound like"
-msgstr " "
-
-#: filter/libfilter-i18n.h:17
-msgid "does not start with"
-msgstr " "
-
-#: filter/libfilter-i18n.h:18
-#, fuzzy
-msgid "Do Not Exist"
-msgstr " "
-
-#: filter/libfilter-i18n.h:19
-#, fuzzy
-msgid "Draft"
-msgstr ""
-
-#: filter/libfilter-i18n.h:20
-msgid "ends with"
-msgstr " "
-
-#: filter/libfilter-i18n.h:21
-#, fuzzy
-msgid "Exist"
-msgstr ""
-
-#: filter/libfilter-i18n.h:22
-msgid "exists"
-msgstr ""
-
-#: filter/libfilter-i18n.h:23
-msgid "Expression"
-msgstr ""
-
-#: filter/libfilter-i18n.h:24
-msgid "Important"
-msgstr ""
-
-#: filter/libfilter-i18n.h:25
-msgid "is"
-msgstr ""
-
-#: filter/libfilter-i18n.h:26
-msgid "is greater than"
-msgstr " - "
-
-#: filter/libfilter-i18n.h:27
-msgid "is less than"
-msgstr " "
-
-#: filter/libfilter-i18n.h:28
-msgid "is not"
-msgstr " "
-
-#: filter/libfilter-i18n.h:29
-#, fuzzy
-msgid "Mailing list"
-msgstr " Mailing List"
-
-#: filter/libfilter-i18n.h:30
-msgid "Message Body"
-msgstr ""
-
-#: filter/libfilter-i18n.h:31
-msgid "Message Header"
-msgstr ""
-
-#: filter/libfilter-i18n.h:32
-msgid "Message was received"
-msgstr " "
-
-#: filter/libfilter-i18n.h:33
-msgid "Message was sent"
-msgstr " "
-
-#: filter/libfilter-i18n.h:34
-msgid "Move to Folder"
-msgstr " "
-
-#: filter/libfilter-i18n.h:35
-msgid "on or after"
-msgstr " "
-
-#: filter/libfilter-i18n.h:36
-msgid "on or before"
-msgstr " "
-
-#: filter/libfilter-i18n.h:37
-msgid "Read"
-msgstr ""
-
-#: filter/libfilter-i18n.h:38
-msgid "Recipients"
-msgstr ""
-
-#: filter/libfilter-i18n.h:39
-msgid "Regex Match"
-msgstr ""
-
-#: filter/libfilter-i18n.h:40
-msgid "Replied to"
-msgstr ""
-
-#: filter/libfilter-i18n.h:41 filter/score-rule.c:204 filter/score-rule.c:206
-#: mail/message-list.etspec.h:5
-msgid "Score"
-msgstr ""
-
-#: filter/libfilter-i18n.h:42 mail/mail-callbacks.c:1251
-msgid "Sender"
-msgstr ":"
-
-#: filter/libfilter-i18n.h:43
-msgid "Set Status"
-msgstr ""
-
-#: filter/libfilter-i18n.h:44
-#, fuzzy
-msgid "Size (kB)"
-msgstr ""
-
-#: filter/libfilter-i18n.h:45
-msgid "sounds like"
-msgstr " "
-
-#: filter/libfilter-i18n.h:46
-msgid "Source Account"
-msgstr ""
-
-#: filter/libfilter-i18n.h:47
-msgid "Specific header"
-msgstr ""
-
-#: filter/libfilter-i18n.h:48
-msgid "starts with"
-msgstr " "
-
-#: filter/libfilter-i18n.h:50
-msgid "Stop Processing"
-msgstr " "
-
-#: filter/libfilter-i18n.h:51 mail/mail-format.c:917
-#: mail/message-list.etspec.h:9
-msgid "Subject"
-msgstr ""
-
-#: filter/libfilter-i18n.h:52
-msgid "was after"
-msgstr " "
-
-#: filter/libfilter-i18n.h:53
-msgid "was before"
-msgstr " "
-
-#: filter/rule-editor.c:147
-#, fuzzy
-msgid "Rules"
-msgstr ""
-
-#: filter/rule-editor.c:240
-msgid "Add Rule"
-msgstr " "
-
-#: filter/rule-editor.c:301
-#, fuzzy
-msgid "Edit Rule"
-msgstr " "
-
-#: filter/score-editor.c:130
-msgid "Score Rules"
-msgstr ""
-
-#: filter/vfolder-rule.c:206
-msgid "Oops. You need to to specify at least one folder as a source."
-msgstr ""
-
-#: importers/elm-importer.c:96
-msgid "Evolution is importing your old Elm mail"
-msgstr ""
-
-#: importers/elm-importer.c:97 importers/netscape-importer.c:108
-#: importers/pine-importer.c:102
-#, fuzzy
-msgid "Importing..."
-msgstr " ..."
-
-#: importers/elm-importer.c:99 importers/netscape-importer.c:110
-#: importers/pine-importer.c:104
-#, fuzzy
-msgid "Please wait"
-msgstr " "
-
-#: importers/elm-importer.c:171 importers/netscape-importer.c:708
-#: importers/pine-importer.c:369
-#, c-format
-msgid "Importing %s as %s"
-msgstr ""
-
-#: importers/elm-importer.c:377 importers/netscape-importer.c:801
-#: importers/pine-importer.c:506
-#, fuzzy, c-format
-msgid "Scanning %s"
-msgstr " \"%s\""
-
-#: importers/elm-importer.c:528 importers/netscape-importer.c:974
-#: importers/pine-importer.c:669 mail/component-factory.c:96
-msgid "Mail"
-msgstr ""
-
-#: importers/elm-importer.c:548
-msgid ""
-"Evolution has found Elm mail files\n"
-"Would you like to import them into Evolution?"
-msgstr ""
-
-#: importers/elm-importer.c:577
-msgid "Elm"
-msgstr ""
-
-#: importers/evolution-gnomecard-importer.c:230
-msgid "GnomeCard:"
-msgstr ""
-
-#: importers/evolution-gnomecard-importer.c:231 importers/pine-importer.c:674
-#, fuzzy
-msgid "Addressbook"
-msgstr " "
-
-#: importers/evolution-gnomecard-importer.c:250
-msgid ""
-"Evolution has found GnomeCard files.\n"
-"Would you like them to be imported into Evolution?"
-msgstr ""
-
-#: importers/netscape-importer.c:107
-msgid "Evolution is importing your old Netscape data"
-msgstr ""
-
-#: importers/netscape-importer.c:904 importers/pine-importer.c:602
-msgid "Scanning directory"
-msgstr ""
-
-#: importers/netscape-importer.c:913
-msgid "Starting import"
-msgstr ""
-
-#: importers/netscape-importer.c:979
-#, fuzzy
-msgid "Settings"
-msgstr ""
-
-#: importers/netscape-importer.c:1000
-msgid ""
-"Evolution has found Netscape mail files.\n"
-"Would you like them to be imported into Evolution?"
-msgstr ""
-
-#: importers/pine-importer.c:101
-msgid "Evolution is importing your old Pine data"
-msgstr ""
-
-#: importers/pine-importer.c:695
-msgid ""
-"Evolution has found Pine mail files.\n"
-"Would you like to import them into Evolution?"
-msgstr ""
-
-#: importers/pine-importer.c:723
-#, fuzzy
-msgid "Pine"
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:1
-msgid "Evolution component for handling mail."
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:2
-#, fuzzy
-msgid "Evolution mail composer."
-msgstr " mail Evolution."
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:3
-msgid "Evolution mail executive summary component."
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:4
-msgid "Evolution mail folder display component."
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:5
-msgid "Evolution mail folder factory component."
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:6
-msgid "Factory for the Evolution composer."
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:7
-msgid "Factory for the Mail Summary component."
-msgstr ""
-
-#: mail/GNOME_Evolution_Mail.oaf.in.h:8
-#, fuzzy
-msgid "Mail configuration interface"
-msgstr "Mail "
-
-#: mail/component-factory.c:96
-#, fuzzy
-msgid "Folder containing mail"
-msgstr " Mailing List"
-
-#: mail/component-factory.c:97
-msgid "Mail storage folder (internal)"
-msgstr ""
-
-#: mail/component-factory.c:98
-#, fuzzy
-msgid "Virtual Trash"
-msgstr " "
-
-#: mail/component-factory.c:98
-#, fuzzy
-msgid "Virtual Trash folder"
-msgstr " "
-
-#: mail/component-factory.c:114
-msgid "This folder cannot contain messages."
-msgstr ""
-
-#: mail/component-factory.c:356
-#, fuzzy
-msgid "Properties..."
-msgstr "..."
-
-#: mail/component-factory.c:356
-msgid "Change this folder's properties"
-msgstr ""
-
-#: mail/component-factory.c:698
-msgid ""
-"Some of your mail settings seem corrupt, please check that everything is in "
-"order."
-msgstr ""
-
-#: mail/component-factory.c:812
-#, fuzzy
-msgid "New Mail Message"
-msgstr "_Mail "
-
-#: mail/component-factory.c:812
-#, fuzzy
-msgid "New _Mail Message"
-msgstr "_Mail "
-
-#: mail/component-factory.c:843
-msgid "Cannot initialize Evolution's mail component."
-msgstr " mail Evolution."
-
-#: mail/component-factory.c:1032
-msgid "Cannot register storage with shell"
-msgstr ""
-
-#: mail/folder-browser-ui.c:261
-#, fuzzy, c-format
-msgid "Properties for \"%s\""
-msgstr ""
-
-#: mail/folder-browser-ui.c:263
-msgid "Properties"
-msgstr ""
-
-#: mail/folder-browser.c:262 mail/mail-display.c:275
-#, c-format
-msgid "Could not create temporary directory: %s"
-msgstr " : %s"
-
-#: mail/folder-browser.c:734
-#, c-format
-msgid "%d new"
-msgstr ""
-
-#: mail/folder-browser.c:737 mail/folder-browser.c:742
-#: mail/folder-browser.c:746
-msgid ", "
-msgstr ""
-
-#: mail/folder-browser.c:738
-#, c-format
-msgid "%d hidden"
-msgstr ""
-
-#: mail/folder-browser.c:743
-#, fuzzy, c-format
-msgid "%d selected"
-msgstr " %d "
-
-#: mail/folder-browser.c:748
-#, fuzzy, c-format
-msgid "%d unsent"
-msgstr " %d "
-
-#: mail/folder-browser.c:750
-#, c-format
-msgid "%d total"
-msgstr ""
-
-#: mail/folder-browser.c:993
-#, fuzzy
-msgid "Create vFolder from Search"
-msgstr " "
-
-#: mail/folder-browser.c:1338
-#, fuzzy
-msgid "VFolder on _Subject"
-msgstr "VFolder "
-
-#: mail/folder-browser.c:1341
-msgid "VFolder on Se_nder"
-msgstr ""
-
-#: mail/folder-browser.c:1344
-msgid "VFolder on _Recipients"
-msgstr ""
-
-#: mail/folder-browser.c:1347
-#, fuzzy
-msgid "VFolder on Mailing _List"
-msgstr " Mailing List"
-
-#: mail/folder-browser.c:1353
-#, fuzzy
-msgid "Filter on Sub_ject"
-msgstr " "
-
-#: mail/folder-browser.c:1356
-#, fuzzy
-msgid "Filter on Sen_der"
-msgstr " "
-
-#: mail/folder-browser.c:1359
-#, fuzzy
-msgid "Filter on Re_cipients"
-msgstr " "
-
-#: mail/folder-browser.c:1362
-#, fuzzy
-msgid "Filter on _Mailing List"
-msgstr " Mailing List"
-
-#: mail/folder-browser.c:1373 ui/evolution-mail-message.xml.h:89
-#, fuzzy
-msgid "_Edit as New Message..."
-msgstr " "
-
-#: mail/folder-browser.c:1375 ui/evolution-mail-message.xml.h:97
-msgid "_Save As..."
-msgstr "_ ..."
-
-#: mail/folder-browser.c:1377
-msgid "_Print"
-msgstr ""
-
-#: mail/folder-browser.c:1382 ui/evolution-mail-message.xml.h:96
-#, fuzzy
-msgid "_Reply to Sender"
-msgstr " "
-
-#: mail/folder-browser.c:1384 ui/evolution-mail-message.xml.h:69
-#, fuzzy
-msgid "Reply to _List"
-msgstr " "
-
-#: mail/folder-browser.c:1386 ui/evolution-mail-message.xml.h:68
-msgid "Reply to _All"
-msgstr " "
-
-#: mail/folder-browser.c:1388
-msgid "_Forward"
-msgstr ""
-
-#: mail/folder-browser.c:1391 ui/evolution-mail-message.xml.h:40
-#, fuzzy
-msgid "Mar_k as Read"
-msgstr " "
-
-#: mail/folder-browser.c:1393 ui/evolution-mail-message.xml.h:42
-#, fuzzy
-msgid "Mark as U_nread"
-msgstr " "
-
-#: mail/folder-browser.c:1395
-#, fuzzy
-msgid "Mark as _Important"
-msgstr ""
-
-#: mail/folder-browser.c:1397
-#, fuzzy
-msgid "Mark as Unim_portant"
-msgstr " "
-
-#: mail/folder-browser.c:1402
-msgid "_Move to Folder..."
-msgstr " ..."
-
-#: mail/folder-browser.c:1404
-msgid "_Copy to Folder..."
-msgstr " ..."
-
-#: mail/folder-browser.c:1408 ui/evolution-mail-message.xml.h:99
-msgid "_Undelete"
-msgstr " "
-
-#: mail/folder-browser.c:1413
-#, fuzzy
-msgid "Add Sender to Address Book"
-msgstr " "
-
-#: mail/folder-browser.c:1418
-msgid "Apply Filters"
-msgstr " "
-
-#: mail/folder-browser.c:1422
-#, fuzzy
-msgid "Create Ru_le From Message"
-msgstr " "
-
-#: mail/folder-browser.c:1573
-msgid "Filter on Mailing List"
-msgstr " Mailing List"
-
-#: mail/folder-browser.c:1574
-#, fuzzy
-msgid "VFolder on Mailing List"
-msgstr " Mailing List"
-
-#: mail/folder-browser.c:1576
-#, c-format
-msgid "Filter on Mailing List (%s)"
-msgstr " Mailing (%s)"
-
-#: mail/folder-browser.c:1577
-#, fuzzy, c-format
-msgid "VFolder on Mailing List (%s)"
-msgstr " Mailing (%s)"
-
-#: mail/folder-info.c:64
-#, fuzzy
-msgid "Getting Folder Information"
-msgstr " "
-
-#: mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in.h:1
-msgid "Factory to import mbox into Evolution"
-msgstr ""
-
-#: mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in.h:2
-msgid "Imports mbox files into Evolution"
-msgstr ""
-
-#: mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in.h:1
-msgid "Factory to import Outlook Express 4 mails into Evolution"
-msgstr ""
-
-#: mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in.h:2
-msgid "Imports Outlook Express 4 files into Evolution"
-msgstr ""
-
-#: mail/local-config.glade.h:1
-msgid "Current store format:"
-msgstr " :"
-
-#: mail/local-config.glade.h:2
-msgid "Mailbox Format"
-msgstr " "
-
-#: mail/local-config.glade.h:3
-msgid "New store format:"
-msgstr " :"
-
-#: mail/local-config.glade.h:4
-msgid ""
-"Note: When converting between mailbox formats, a failure\n"
-"(such as lack of disk space) may not be automatically\n"
-"recoverable. Please use this feature with care."
-msgstr ""
-
-#: mail/local-config.glade.h:7
-msgid "maildir"
-msgstr ""
-
-#: mail/local-config.glade.h:8
-msgid "mbox"
-msgstr ""
-
-#: mail/local-config.glade.h:9
-msgid "mh"
-msgstr ""
-
-#: mail/mail-account-editor-news.c:105 mail/mail-account-editor.c:107
-msgid "You have not filled in all of the required information."
-msgstr ""
-
-#. give our dialog an OK button and title
-#: mail/mail-account-editor-news.c:160
-#, fuzzy
-msgid "Evolution News Editor"
-msgstr "Evolution - "
-
-#. give our dialog an OK button and title
-#: mail/mail-account-editor.c:163
-msgid "Evolution Account Editor"
-msgstr ""
-
-#: mail/mail-account-gui.c:947
-#, fuzzy
-msgid "Could not save signature file."
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: mail/mail-account-gui.c:1024
-#, fuzzy
-msgid "Save signature"
-msgstr ":"
-
-#: mail/mail-account-gui.c:1030
-msgid ""
-"This signature has been changed, but hasn't been saved.\n"
-"\n"
-"Do you wish to save your changes?"
-msgstr ""
-
-#: mail/mail-account-gui.c:1615
-msgid "You may not create two accounts with the same name."
-msgstr ""
-
-#: mail/mail-accounts.c:144
-msgid " (default)"
-msgstr " ( )"
-
-#: mail/mail-accounts.c:189
-#, fuzzy
-msgid "Disable"
-msgstr "."
-
-#: mail/mail-accounts.c:191
-msgid "Enable"
-msgstr ""
-
-#: mail/mail-accounts.c:278
-msgid "Are you sure you want to delete this account?"
-msgstr ""
-
-#: mail/mail-accounts.c:282
-#, fuzzy
-msgid "Don't delete"
-msgstr " "
-
-#: mail/mail-accounts.c:285
-msgid "Really delete account?"
-msgstr ""
-
-#: mail/mail-accounts.c:511 mail/mail-accounts.c:515
-msgid "Are you sure you want to delete this news account?"
-msgstr ""
-
-#. give our dialog an Close button and title
-#: mail/mail-accounts.c:760 mail/mail-config.glade.h:45
-#, fuzzy
-msgid "Mail Settings"
-msgstr ""
-
-#: mail/mail-autofilter.c:70
-#, c-format
-msgid "Mail to %s"
-msgstr "Mail %s"
-
-#: mail/mail-autofilter.c:213
-#, c-format
-msgid "Subject is %s"
-msgstr " %s"
-
-#: mail/mail-autofilter.c:229
-#, c-format
-msgid "Mail from %s"
-msgstr "Mail %s"
-
-#: mail/mail-autofilter.c:285
-#, c-format
-msgid "%s mailing list"
-msgstr ""
-
-#: mail/mail-autofilter.c:335 mail/mail-autofilter.c:356
-msgid "Add Filter Rule"
-msgstr ""
-
-#: mail/mail-callbacks.c:96
-msgid ""
-"You have not configured the mail client.\n"
-"You need to do this before you can send,\n"
-"receive or compose mail.\n"
-"Would you like to configure it now?"
-msgstr ""
-" mail .\n"
-" ,\n"
-" .\n"
-" ?"
-
-#: mail/mail-callbacks.c:149
-msgid ""
-"You need to configure an identity\n"
-"before you can compose mail."
-msgstr ""
-
-#: mail/mail-callbacks.c:161
-msgid ""
-"You need to configure a mail transport\n"
-"before you can compose mail."
-msgstr ""
-
-#: mail/mail-callbacks.c:185
-msgid "You have not set a mail transport method"
-msgstr " "
-
-#. FIXME: this wording sucks
-#: mail/mail-callbacks.c:216
-msgid ""
-"You are sending an HTML-formatted message, but the following recipients do "
-"not want HTML-formatted mail:\n"
-msgstr ""
-
-#: mail/mail-callbacks.c:231
-#, fuzzy
-msgid "Send anyway?"
-msgstr " email"
-
-#: mail/mail-callbacks.c:273
-msgid ""
-"This message has no subject.\n"
-"Really send?"
-msgstr ""
-" .\n"
-" ?"
-
-#: mail/mail-callbacks.c:317
-msgid ""
-"Since the contact list you are sending to is configured to hide the list's "
-"addresses, this message will contain only Bcc recipients."
-msgstr ""
-
-#: mail/mail-callbacks.c:321
-msgid "This message contains only Bcc recipients."
-msgstr ""
-
-#: mail/mail-callbacks.c:325
-msgid ""
-"It is possible that the mail server may reveal the recipients by adding an "
-"Apparently-To header.\n"
-"Send anyway?"
-msgstr ""
-
-#: mail/mail-callbacks.c:419
-msgid "This message contains invalid recipients:"
-msgstr ""
-
-#: mail/mail-callbacks.c:454
-msgid "You must specify recipients in order to send this message."
-msgstr " () ."
-
-#: mail/mail-callbacks.c:550
-msgid "You must configure an account before you can send this email."
-msgstr " account ."
-
-#: mail/mail-callbacks.c:783
-#, fuzzy
-msgid "an unknown sender"
-msgstr " "
-
-#: mail/mail-callbacks.c:788
-msgid "On %a, %Y-%m-%d at %H:%M, %%s wrote:"
-msgstr ""
-
-#: mail/mail-callbacks.c:1171
-msgid "Move message(s) to"
-msgstr " (/) "
-
-#: mail/mail-callbacks.c:1173
-msgid "Copy message(s) to"
-msgstr " (/) "
-
-#: mail/mail-callbacks.c:1547
-#, c-format
-msgid "Are you sure you want to edit all %d messages?"
-msgstr ""
-
-#: mail/mail-callbacks.c:1569
-msgid ""
-"You may only edit messages saved\n"
-"in the Drafts folder."
-msgstr ""
-" \n"
-" Drafts."
-
-#: mail/mail-callbacks.c:1603
-#, fuzzy
-msgid ""
-"You may only resend messages\n"
-"in the Sent folder."
-msgstr ""
-" \n"
-" Drafts."
-
-#: mail/mail-callbacks.c:1615
-#, c-format
-msgid "Are you sure you want to resend all %d messages?"
-msgstr ""
-
-#: mail/mail-callbacks.c:1636
-#, fuzzy
-msgid "No Message Selected"
-msgstr " "
-
-#: mail/mail-callbacks.c:1721
-msgid "Save Message As..."
-msgstr " ..."
-
-#: mail/mail-callbacks.c:1723
-msgid "Save Messages As..."
-msgstr " ..."
-
-#: mail/mail-callbacks.c:1868 widgets/misc/e-messagebox.c:159
-msgid "Warning"
-msgstr ""
-
-#: mail/mail-callbacks.c:1873
-msgid ""
-"This operation will permanently erase all messages marked as deleted. If you "
-"continue, you will not be able to recover these messages.\n"
-"\n"
-"Really erase these messages?"
-msgstr ""
-
-#: mail/mail-callbacks.c:1880
-#, fuzzy
-msgid "Do not ask me again."
-msgstr " ."
-
-#: mail/mail-callbacks.c:1985
-#, c-format
-msgid ""
-"Error loading filter information:\n"
-"%s"
-msgstr ""
-" :\n"
-"%s"
-
-#: mail/mail-callbacks.c:1995
-#, fuzzy
-msgid "Filters"
-msgstr " "
-
-#: mail/mail-callbacks.c:2041
-msgid "Print Message"
-msgstr " "
-
-#: mail/mail-callbacks.c:2087
-msgid "Printing of message failed"
-msgstr " "
-
-#: mail/mail-callbacks.c:2171
-#, c-format
-msgid "Are you sure you want to open all %d messages in separate windows?"
-msgstr ""
-
-#: mail/mail-config-druid.c:135
-msgid ""
-"Please enter your name and email address below. The \"optional\" fields "
-"below do not need to be filled in,\n"
-"unless you wish to include this information in email you send."
-msgstr ""
-
-#: mail/mail-config-druid.c:137
-msgid ""
-"Please enter information about your incoming mail server below. If you are "
-"not sure, ask your system\n"
-"administrator or Internet Service Provider."
-msgstr ""
-
-#: mail/mail-config-druid.c:139
-msgid "Please select among the following options"
-msgstr ""
-
-#: mail/mail-config-druid.c:141
-msgid ""
-"Please enter information about the way you will send mail. If you are not "
-"sure, ask your system\n"
-"administrator or Internet Service Provider."
-msgstr ""
-
-#: mail/mail-config-druid.c:143
-msgid ""
-"You are almost done with the mail configuration process. The identity, "
-"incoming mail server and\n"
-"outgoing mail transport method which you provided will be grouped together "
-"to\n"
-"make an Evolution mail account. Please enter a name for this account in the "
-"space below.\n"
-"This name will be used for display purposes only."
-msgstr ""
-
-#. set window title
-#: mail/mail-config-druid.c:570
-msgid "Evolution Account Assistant"
-msgstr ""
-
-#: mail/mail-config.c:315
-#, fuzzy, c-format
-msgid "Account %d"
-msgstr ""
-
-#: mail/mail-config.c:1618
-#, c-format
-msgid ""
-"Could not get inbox for new mail store:\n"
-"%s\n"
-"No shortcut will be created."
-msgstr ""
-
-#. Create the shortcut. FIXME: This only works if the
-#. * full name matches the path.
-#.
-#: mail/mail-config.c:1629
-#, c-format
-msgid "%s: Inbox"
-msgstr ""
-
-#: mail/mail-config.c:1873
-#, fuzzy
-msgid "Checking Service"
-msgstr " "
-
-#: mail/mail-config.c:1944 mail/mail-config.c:1947
-#, fuzzy
-msgid "Connecting to server..."
-msgstr " "
-
-#: mail/mail-config.glade.h:1
-msgid " _Check for supported types "
-msgstr ""
-
-#: mail/mail-config.glade.h:2
-#, fuzzy
-msgid " color"
-msgstr " "
-
-#: mail/mail-config.glade.h:3
-msgid "(SSL is not supported in this build of evolution)"
-msgstr ""
-
-#: mail/mail-config.glade.h:4
-msgid "Account"
-msgstr ""
-
-#: mail/mail-config.glade.h:5
-msgid "Account Information"
-msgstr "Account "
-
-#: mail/mail-config.glade.h:6 shell/glade/evolution-startup-wizard.glade.h:1
-msgid "Account Management"
-msgstr ""
-
-#: mail/mail-config.glade.h:7
-#, fuzzy
-msgid "Accounts"
-msgstr ""
-
-#: mail/mail-config.glade.h:8
-msgid "Always encrypt to myself when sending encrypted mail"
-msgstr ""
-
-#: mail/mail-config.glade.h:9
-msgid "Always encrypt to myself when sending encrypyed mail"
-msgstr ""
-
-#: mail/mail-config.glade.h:10
-msgid "Always sign outgoing messages when using this account"
-msgstr ""
-
-#: mail/mail-config.glade.h:11 mail/message-list.etspec.h:1
-msgid "Attachment"
-msgstr ""
-
-#: mail/mail-config.glade.h:12
-msgid "Authentication"
-msgstr ""
-
-#: mail/mail-config.glade.h:13
-#, fuzzy
-msgid "Authentication Type: "
-msgstr ":"
-
-#: mail/mail-config.glade.h:14
-msgid "Certificate ID:"
-msgstr ""
-
-#: mail/mail-config.glade.h:16
-#, fuzzy
-msgid "Composer"
-msgstr ""
-
-#: mail/mail-config.glade.h:17
-#, fuzzy
-msgid "Configuration"
-msgstr "Mail "
-
-#: mail/mail-config.glade.h:18
-#, fuzzy
-msgid "Confirm when Expunging a folder"
-msgstr " "
-
-#: mail/mail-config.glade.h:19
-msgid ""
-"Congratulations, your mail configuration is complete.\n"
-"\n"
-"You are now ready to send and receive email \n"
-"using Evolution. \n"
-"\n"
-"Click \"Finish\" to save your settings."
-msgstr ""
-
-#: mail/mail-config.glade.h:25
-#, fuzzy
-msgid "De_fault"
-msgstr " "
-
-#: mail/mail-config.glade.h:26
-msgid "Default Forward style is: "
-msgstr ""
-
-#: mail/mail-config.glade.h:27
-msgid "Default character encoding: "
-msgstr ""
-
-#: mail/mail-config.glade.h:29
-msgid "Digital IDs..."
-msgstr ""
-
-#: mail/mail-config.glade.h:30
-msgid "Display"
-msgstr ""
-
-#: mail/mail-config.glade.h:31 shell/glade/evolution-startup-wizard.glade.h:2
-msgid "Done"
-msgstr ""
-
-#: mail/mail-config.glade.h:32 shell/e-local-storage.c:174
-#, fuzzy
-msgid "Drafts"
-msgstr ""
-
-#: mail/mail-config.glade.h:33
-#, fuzzy
-msgid "Drafts folder:"
-msgstr " "
-
-#: mail/mail-config.glade.h:34
-#, fuzzy
-msgid "E_nable"
-msgstr " "
-
-#: mail/mail-config.glade.h:35 widgets/misc/e-filter-bar.h:96
-#: widgets/misc/e-filter-bar.h:103
-#, fuzzy
-msgid "Edit..."
-msgstr ""
-
-#: mail/mail-config.glade.h:36
-msgid "Enabled"
-msgstr ""
-
-#: mail/mail-config.glade.h:37
-msgid "Get Digital ID..."
-msgstr ""
-
-#: mail/mail-config.glade.h:38
-#, fuzzy
-msgid "HTML signature file:"
-msgstr " :"
-
-#: mail/mail-config.glade.h:39
-msgid "IMAPv4 "
-msgstr ""
-
-#: mail/mail-config.glade.h:40 shell/glade/evolution-startup-wizard.glade.h:4
-msgid "Identity"
-msgstr ""
-
-#: mail/mail-config.glade.h:41
-msgid "In HTML mail"
-msgstr ""
-
-#: mail/mail-config.glade.h:42
-#, fuzzy
-msgid "Inline"
-msgstr ""
-
-#: mail/mail-config.glade.h:43
-#, fuzzy
-msgid "Kerberos "
-msgstr ""
-
-#: mail/mail-config.glade.h:44
-msgid "Mail Configuration"
-msgstr "Mail "
-
-#: mail/mail-config.glade.h:46
-#, fuzzy
-msgid "Mailbox location"
-msgstr " "
-
-#: mail/mail-config.glade.h:47
-msgid "Make this my _default account"
-msgstr ""
-
-#: mail/mail-config.glade.h:48
-#, fuzzy
-msgid "NNTP Server:"
-msgstr "LDAP "
-
-#: mail/mail-config.glade.h:49
-msgid "News"
-msgstr ""
-
-#: mail/mail-config.glade.h:51
-#, fuzzy
-msgid "Optional Information"
-msgstr " "
-
-#: mail/mail-config.glade.h:53
-msgid "PGP Key ID:"
-msgstr ""
-
-#: mail/mail-config.glade.h:56
-msgid "Pick a color"
-msgstr " "
-
-#: mail/mail-config.glade.h:57
-msgid "Pretty Good Privacy"
-msgstr ""
-
-#: mail/mail-config.glade.h:58
-msgid "Prompt when sending messages with an _empty subject"
-msgstr ""
-
-#: mail/mail-config.glade.h:59
-msgid "Prompt when sending messages with only _Bcc recipients defined"
-msgstr ""
-
-#: mail/mail-config.glade.h:60
-#, fuzzy
-msgid "Qmail maildir "
-msgstr "Qmail maildir- mail "
-
-#: mail/mail-config.glade.h:61
-#, fuzzy
-msgid "Quoted"
-msgstr ""
-
-#: mail/mail-config.glade.h:62 shell/glade/evolution-startup-wizard.glade.h:6
-msgid "Receiving Email"
-msgstr " "
-
-#: mail/mail-config.glade.h:63
-#, fuzzy
-msgid "Receiving Mail"
-msgstr " "
-
-#: mail/mail-config.glade.h:64
-#, fuzzy
-msgid "Receiving Options"
-msgstr ""
-
-#: mail/mail-config.glade.h:65
-#, fuzzy
-msgid "Required Information"
-msgstr " "
-
-#: mail/mail-config.glade.h:67
-msgid "Secure MIME"
-msgstr ""
-
-#: mail/mail-config.glade.h:68
-#, fuzzy
-msgid "Security"
-msgstr "_"
-
-#: mail/mail-config.glade.h:69
-#, fuzzy
-msgid "Select Filter Log file..."
-msgstr " "
-
-#: mail/mail-config.glade.h:70
-msgid "Select PGP binary"
-msgstr " PGP "
-
-#: mail/mail-config.glade.h:71 shell/glade/evolution-startup-wizard.glade.h:7
-msgid "Sending Email"
-msgstr " Email"
-
-#: mail/mail-config.glade.h:72
-#, fuzzy
-msgid "Sending Mail"
-msgstr " Email"
-
-#: mail/mail-config.glade.h:74 mail/message-list.etspec.h:6
-#: shell/e-local-storage.c:177
-#, fuzzy
-msgid "Sent"
-msgstr ""
-
-#: mail/mail-config.glade.h:75
-#, fuzzy
-msgid "Sent and Draft Messages"
-msgstr " "
-
-#: mail/mail-config.glade.h:76
-#, fuzzy
-msgid "Sent messages folder:"
-msgstr " -"
-
-#: mail/mail-config.glade.h:77
-msgid "Server Configuration"
-msgstr " "
-
-#: mail/mail-config.glade.h:78
-msgid "Server Type: "
-msgstr " :"
-
-#: mail/mail-config.glade.h:79
-#, fuzzy
-msgid "Server requires _authentication"
-msgstr " authentication"
-
-#: mail/mail-config.glade.h:80
-msgid "Signature file:"
-msgstr " :"
-
-#: mail/mail-config.glade.h:81
-msgid "Source"
-msgstr ""
-
-#: mail/mail-config.glade.h:82
-#, fuzzy
-msgid "Source Information"
-msgstr " "
-
-#: mail/mail-config.glade.h:83
-msgid "Sources"
-msgstr ""
-
-#: mail/mail-config.glade.h:84
-#, fuzzy
-msgid "Special Folders"
-msgstr " "
-
-#: mail/mail-config.glade.h:85
-#, fuzzy
-msgid "Standard Unix mbox"
-msgstr " Unix mailbox "
-
-#: mail/mail-config.glade.h:87
-#, fuzzy
-msgid "Use secure connection (_SSL)"
-msgstr " (SSL)"
-
-#: mail/mail-config.glade.h:88
-msgid ""
-"Welcome to the Evolution Mail Configuration Assistant.\n"
-"\n"
-"Click \"Next\" to begin. "
-msgstr ""
-
-#: mail/mail-config.glade.h:92
-msgid "_Always load images off the net"
-msgstr ""
-
-#: mail/mail-config.glade.h:93
-msgid "_Automatically check for new mail every"
-msgstr ""
-
-#: mail/mail-config.glade.h:94
-msgid "_Check for supported types"
-msgstr ""
-
-#: mail/mail-config.glade.h:97
-#, fuzzy
-msgid "_Email Address:"
-msgstr "Email :"
-
-#: mail/mail-config.glade.h:98
-msgid "_Empty trash folders on exit"
-msgstr ""
-
-#: mail/mail-config.glade.h:99
-#, fuzzy
-msgid "_Full Name:"
-msgstr " :"
-
-#: mail/mail-config.glade.h:100
-#, fuzzy
-msgid "_HTML Signature:"
-msgstr ":"
-
-#: mail/mail-config.glade.h:101
-msgid "_Highlight citations with"
-msgstr ""
-
-#: mail/mail-config.glade.h:102
-#, fuzzy
-msgid "_Host:"
-msgstr ":"
-
-#: mail/mail-config.glade.h:103
-msgid "_Load images if sender is in addressbook"
-msgstr ""
-
-#: mail/mail-config.glade.h:104
-msgid "_Log filter actions to:"
-msgstr ""
-
-#: mail/mail-config.glade.h:105
-#, fuzzy
-msgid "_Mark messages as Read after"
-msgstr " \"\" :"
-
-#: mail/mail-config.glade.h:106
-#, fuzzy
-msgid "_Name:"
-msgstr ":"
-
-#: mail/mail-config.glade.h:107
-msgid "_Never load images off the net"
-msgstr ""
-
-#: mail/mail-config.glade.h:108
-#, fuzzy
-msgid "_Organization:"
-msgstr ":"
-
-#: mail/mail-config.glade.h:109
-#, fuzzy
-msgid "_PGP binary path:"
-msgstr "PGP "
-
-#: mail/mail-config.glade.h:110
-#, fuzzy
-msgid "_Path:"
-msgstr ":"
-
-#: mail/mail-config.glade.h:111
-#, fuzzy
-msgid "_Remember this password"
-msgstr " "
-
-#: mail/mail-config.glade.h:112
-#, fuzzy
-msgid "_Send mail in HTML format by default."
-msgstr " mail HTML ."
-
-#: mail/mail-config.glade.h:113
-#, fuzzy
-msgid "_Signature file:"
-msgstr " :"
-
-#: mail/mail-config.glade.h:114
-#, fuzzy
-msgid "_Username:"
-msgstr " :"
-
-#: mail/mail-config.glade.h:115
-#, fuzzy
-msgid "description"
-msgstr ":"
-
-#: mail/mail-config.glade.h:117
-msgid "newswindow1"
-msgstr ""
-
-#: mail/mail-config.glade.h:118
-msgid "placeholder"
-msgstr ""
-
-#: mail/mail-config.glade.h:119
-msgid "seconds."
-msgstr "."
-
-#: mail/mail-crypto.c:59
-msgid "Could not create a PGP signature context."
-msgstr ""
-
-#: mail/mail-crypto.c:84
-msgid "Could not create a PGP verification context."
-msgstr ""
-
-#: mail/mail-crypto.c:113
-msgid "Could not create a PGP encryption context."
-msgstr ""
-
-#: mail/mail-crypto.c:138
-#, fuzzy
-msgid "Could not create a PGP decryption context."
-msgstr " %s: %s"
-
-#: mail/mail-crypto.c:173
-msgid "Could not create a S/MIME signature context."
-msgstr ""
-
-#: mail/mail-crypto.c:205
-msgid "Could not create a S/MIME certsonly context."
-msgstr ""
-
-#: mail/mail-crypto.c:236
-msgid "Could not create a S/MIME encryption context."
-msgstr ""
-
-#: mail/mail-crypto.c:267
-msgid "Could not create a S/MIME envelope context."
-msgstr ""
-
-#: mail/mail-crypto.c:297
-msgid "Could not create a S/MIME decode context."
-msgstr ""
-
-#: mail/mail-display.c:223
-msgid "Save Attachment"
-msgstr ""
-
-#: mail/mail-display.c:327
-msgid "Save to Disk..."
-msgstr " ..."
-
-#: mail/mail-display.c:329
-msgid "View Inline"
-msgstr ""
-
-#: mail/mail-display.c:331
-#, c-format
-msgid "Open in %s..."
-msgstr " %s..."
-
-#: mail/mail-display.c:392
-#, c-format
-msgid "View Inline (via %s)"
-msgstr ""
-
-#: mail/mail-display.c:396
-msgid "Hide"
-msgstr ""
-
-#: mail/mail-display.c:417
-msgid "External Viewer"
-msgstr " Viewer"
-
-#: mail/mail-display.c:1053
-msgid "Loading message content"
-msgstr ""
-
-#: mail/mail-display.c:1515
-#, fuzzy
-msgid "Open Link in Browser"
-msgstr "_ "
-
-#: mail/mail-display.c:1517
-#, fuzzy
-msgid "Copy Link Location"
-msgstr ""
-"\n"
-" : "
-
-#: mail/mail-display.c:1520
-msgid "Save Link as (FIXME)"
-msgstr ""
-
-#: mail/mail-display.c:1523
-#, fuzzy
-msgid "Save Image as..."
-msgstr " ..."
-
-#: mail/mail-format.c:627
-#, c-format
-msgid "%s attachment"
-msgstr ""
-
-#: mail/mail-format.c:680
-msgid "Could not parse MIME message. Displaying as source."
-msgstr ""
-
-#: mail/mail-format.c:764
-msgid "Date"
-msgstr ""
-
-#: mail/mail-format.c:862
-#, fuzzy
-msgid "Bad Address"
-msgstr "Email :"
-
-#: mail/mail-format.c:903 mail/message-list.etspec.h:3
-msgid "From"
-msgstr ""
-
-#: mail/mail-format.c:906
-#, fuzzy
-msgid "Reply-To"
-msgstr "-:"
-
-#: mail/mail-format.c:910 mail/message-list.etspec.h:10
-msgid "To"
-msgstr ""
-
-#: mail/mail-format.c:914
-msgid "Cc"
-msgstr ""
-
-#: mail/mail-format.c:1357
-#, fuzzy
-msgid "No GPG/PGP program configured."
-msgstr " GPG/PGP ."
-
-#: mail/mail-format.c:1373
-msgid "Encrypted message not displayed"
-msgstr " "
-
-#: mail/mail-format.c:1384
-msgid "Encrypted message"
-msgstr " "
-
-#: mail/mail-format.c:1385
-msgid "Click icon to decrypt."
-msgstr " ."
-
-#: mail/mail-format.c:1440
-msgid "This message is digitally signed and has been found to be authentic."
-msgstr ""
-
-#: mail/mail-format.c:1451
-msgid "This message is digitally signed but can not be proven to be authentic."
-msgstr ""
-
-#: mail/mail-format.c:2128
-#, c-format
-msgid "Pointer to FTP site (%s)"
-msgstr " FTP (%s)"
-
-#: mail/mail-format.c:2142
-#, c-format
-msgid "Pointer to local file (%s) valid at site \"%s\""
-msgstr " (%s) \"%s\""
-
-#: mail/mail-format.c:2147
-#, c-format
-msgid "Pointer to local file (%s)"
-msgstr " (%s)"
-
-#: mail/mail-format.c:2176
-#, fuzzy, c-format
-msgid "Pointer to remote data (%s)"
-msgstr " FTP (%s)"
-
-#: mail/mail-format.c:2184
-#, c-format
-msgid "Pointer to unknown external data (\"%s\" type)"
-msgstr ""
-
-#: mail/mail-format.c:2189
-msgid "Malformed external-body part."
-msgstr ""
-
-#: mail/mail-local.c:563
-msgid "Reconfiguring folder"
-msgstr ""
-
-#: mail/mail-local.c:636
-#, c-format
-msgid ""
-"Cannot save folder metainfo; you'll probably find you can't\n"
-"open this folder anymore: %s: %s"
-msgstr ""
-
-#: mail/mail-local.c:689
-#, fuzzy, c-format
-msgid "Cannot save folder metainfo to %s: %s"
-msgstr " %s %s: %s"
-
-#: mail/mail-local.c:735
-#, fuzzy, c-format
-msgid "Cannot delete folder metadata %s: %s"
-msgstr " `%s': %s"
-
-#: mail/mail-local.c:1075
-#, c-format
-msgid "Changing folder \"%s\" to \"%s\" format"
-msgstr ""
-
-#: mail/mail-local.c:1090
-#, c-format
-msgid "%s may not be reconfigured because it is not a local folder"
-msgstr ""
-
-#: mail/mail-local.c:1112
-msgid ""
-"If you can no longer open this mailbox, then\n"
-"you may need to repair it manually."
-msgstr ""
-
-#: mail/mail-local.c:1200
-msgid "You cannot change the format of a non-local folder."
-msgstr ""
-
-#: mail/mail-local.c:1209
-#, c-format
-msgid "Reconfigure /%s"
-msgstr ""
-
-#: mail/mail-mt.c:199
-#, c-format
-msgid ""
-"Error while '%s':\n"
-"%s"
-msgstr ""
-" '%s':\n"
-"%s"
-
-#: mail/mail-mt.c:202
-#, c-format
-msgid ""
-"Error while performing operation:\n"
-"%s"
-msgstr ""
-
-#. Remember the password?
-#: mail/mail-mt.c:509
-msgid "Remember this password"
-msgstr " "
-
-#: mail/mail-mt.c:510
-msgid "Remember this password for the remainder of this session"
-msgstr ""
-
-#: mail/mail-mt.c:567
-#, fuzzy, c-format
-msgid "Enter Password for %s"
-msgstr " %s"
-
-#: mail/mail-mt.c:570
-#, fuzzy
-msgid "Enter Password"
-msgstr " %s"
-
-#: mail/mail-mt.c:886
-msgid "Working"
-msgstr ""
-
-#: mail/mail-ops.c:86
-#, fuzzy
-msgid "Filtering Folder"
-msgstr " "
-
-#: mail/mail-ops.c:229
-#, fuzzy
-msgid "Fetching Mail"
-msgstr " "
-
-#: mail/mail-ops.c:482 mail/mail-ops.c:512
-msgid "However, the message was successfully sent."
-msgstr ""
-
-#: mail/mail-ops.c:549
-#, c-format
-msgid "Sending \"%s\""
-msgstr " \"%s\""
-
-#: mail/mail-ops.c:668
-#, fuzzy, c-format
-msgid "Sending message %d of %d"
-msgstr " "
-
-#: mail/mail-ops.c:687
-#, fuzzy, c-format
-msgid "Failed on message %d of %d"
-msgstr " - %s"
-
-#: mail/mail-ops.c:689 mail/mail-send-recv.c:522
-msgid "Complete."
-msgstr "."
-
-#: mail/mail-ops.c:782
-#, fuzzy
-msgid "Saving message to folder"
-msgstr " "
-
-#: mail/mail-ops.c:861
-#, fuzzy, c-format
-msgid "Moving messages to %s"
-msgstr " (/) "
-
-#: mail/mail-ops.c:861
-#, fuzzy, c-format
-msgid "Copying messages to %s"
-msgstr " "
-
-#: mail/mail-ops.c:878
-msgid "Moving"
-msgstr ""
-
-#: mail/mail-ops.c:881
-msgid "Copying"
-msgstr ""
-
-#: mail/mail-ops.c:993
-#, c-format
-msgid "Scanning folders in \"%s\""
-msgstr " \"%s\""
-
-#. Fill in the new fields
-#: mail/mail-ops.c:1040 shell/e-local-storage.c:179
-msgid "Trash"
-msgstr ""
-
-#: mail/mail-ops.c:1173
-msgid "Forwarded messages"
-msgstr " "
-
-#: mail/mail-ops.c:1215
-#, c-format
-msgid "Opening folder %s"
-msgstr " %s"
-
-#: mail/mail-ops.c:1284
-#, c-format
-msgid "Opening store %s"
-msgstr ""
-
-#: mail/mail-ops.c:1353
-#, fuzzy, c-format
-msgid "Removing folder %s"
-msgstr " %s"
-
-#: mail/mail-ops.c:1445
-#, fuzzy, c-format
-msgid "Storing folder '%s'"
-msgstr " %s"
-
-#: mail/mail-ops.c:1496
-#, fuzzy
-msgid "Refreshing folder"
-msgstr " "
-
-#: mail/mail-ops.c:1532
-msgid "Expunging folder"
-msgstr " "
-
-#: mail/mail-ops.c:1581
-#, c-format
-msgid "Retrieving message %s"
-msgstr ""
-
-#: mail/mail-ops.c:1648
-#, fuzzy, c-format
-msgid "Retrieving %d message(s)"
-msgstr " "
-
-#: mail/mail-ops.c:1734
-#, fuzzy, c-format
-msgid "Saving %d messsage(s)"
-msgstr " "
-
-#: mail/mail-ops.c:1846
-#, c-format
-msgid ""
-"Unable to create output file: %s\n"
-" %s"
-msgstr ""
-
-#: mail/mail-ops.c:1874
-#, c-format
-msgid ""
-"Error saving messages to: %s:\n"
-" %s"
-msgstr ""
-
-#: mail/mail-ops.c:1948
-msgid "Saving attachment"
-msgstr ""
-
-#: mail/mail-ops.c:1964
-#, c-format
-msgid ""
-"Cannot create output file: %s:\n"
-" %s"
-msgstr ""
-
-#: mail/mail-ops.c:1995
-#, c-format
-msgid "Could not write data: %s"
-msgstr " : %s"
-
-#: mail/mail-ops.c:2064
-#, fuzzy, c-format
-msgid "Disconnecting from %s"
-msgstr " "
-
-#: mail/mail-ops.c:2065
-#, fuzzy, c-format
-msgid "Reconnecting to %s"
-msgstr " "
-
-#: mail/mail-search-dialogue.c:113
-msgid "_Search"
-msgstr ""
-
-#: mail/mail-search.c:138
-#, fuzzy
-msgid "(Untitled Message)"
-msgstr "()"
-
-#: mail/mail-search.c:241
-#, fuzzy
-msgid "Untitled Message"
-msgstr " "
-
-#: mail/mail-search.c:245
-#, fuzzy
-msgid "Empty Message"
-msgstr " "
-
-#: mail/mail-search.c:292
-#, fuzzy
-msgid "Find in Message"
-msgstr " "
-
-#: mail/mail-search.c:322
-msgid "Case Sensitive"
-msgstr ""
-
-#: mail/mail-search.c:324
-#, fuzzy
-msgid "Search Forward"
-msgstr ""
-
-#: mail/mail-search.c:344
-#, fuzzy
-msgid "Find:"
-msgstr ""
-
-#: mail/mail-search.c:347
-#, fuzzy
-msgid "Matches:"
-msgstr ":"
-
-#: mail/mail-send-recv.c:139
-#, fuzzy
-msgid "Cancelling..."
-msgstr "..."
-
-#: mail/mail-send-recv.c:243
-#, fuzzy, c-format
-msgid "Server: %s, Type: %s"
-msgstr " :"
-
-#: mail/mail-send-recv.c:245
-#, c-format
-msgid "Path: %s, Type: %s"
-msgstr ""
-
-#: mail/mail-send-recv.c:247
-#, fuzzy, c-format
-msgid "Type: %s"
-msgstr ":"
-
-#: mail/mail-send-recv.c:283
-#, fuzzy
-msgid "Send & Receive Mail"
-msgstr " "
-
-#: mail/mail-send-recv.c:284
-#, fuzzy
-msgid "Cancel All"
-msgstr ""
-
-#: mail/mail-send-recv.c:333
-#, fuzzy
-msgid "Updating..."
-msgstr " ..."
-
-#: mail/mail-send-recv.c:334 mail/mail-send-recv.c:387
-#, fuzzy
-msgid "Waiting..."
-msgstr " ..."
-
-#: mail/mail-send-recv.c:518
-msgid "Cancelled."
-msgstr "."
-
-#: mail/mail-session.c:183
-#, fuzzy
-msgid "User canceled operation."
-msgstr " "
-
-#: mail/mail-tools.c:133
-#, c-format
-msgid "Couldn't create temporary mbox `%s': %s"
-msgstr " mbox `%s': %s"
-
-#: mail/mail-tools.c:259
-#, c-format
-msgid "Forwarded message - %s"
-msgstr " - %s"
-
-#: mail/mail-tools.c:263
-#, fuzzy
-msgid "Forwarded message"
-msgstr " "
-
-#: mail/mail-tools.c:396
-#, fuzzy
-msgid "Forwarded Message"
-msgstr " "
-
-#: mail/mail-vfolder.c:84
-#, fuzzy, c-format
-msgid "Setting up vfolder: %s"
-msgstr " %s"
-
-#: mail/mail-vfolder.c:201
-#, fuzzy, c-format
-msgid "Updating vfolders for uri: %s"
-msgstr " %s %s"
-
-#: mail/mail-vfolder.c:414
-#, c-format
-msgid ""
-"The following vFolder(s):\n"
-"%sUsed the removed folder:\n"
-" '%s'\n"
-"And have been updated."
-msgstr ""
-
-#: mail/mail-vfolder.c:636
-msgid "VFolders"
-msgstr "VFolders"
-
-#: mail/mail-vfolder.c:742
-msgid "New VFolder"
-msgstr " VFolder"
-
-#: mail/message-browser.c:121
-#, fuzzy
-msgid "(No subject)"
-msgstr ""
-
-#: mail/message-browser.c:123
-#, fuzzy, c-format
-msgid "%s - Message"
-msgstr ""
-
-#: mail/message-list.c:640
-msgid "Unseen"
-msgstr ""
-
-#: mail/message-list.c:641
-msgid "Seen"
-msgstr ""
-
-#: mail/message-list.c:642
-msgid "Answered"
-msgstr ""
-
-#: mail/message-list.c:643
-msgid "Multiple Unseen Messages"
-msgstr ""
-
-#: mail/message-list.c:644
-msgid "Multiple Messages"
-msgstr ""
-
-#: mail/message-list.c:648
-#, fuzzy
-msgid "Lowest"
-msgstr ""
-
-#: mail/message-list.c:649
-msgid "Lower"
-msgstr ""
-
-#: mail/message-list.c:653
-#, fuzzy
-msgid "Higher"
-msgstr ":"
-
-#: mail/message-list.c:654
-#, fuzzy
-msgid "Highest"
-msgstr ":"
-
-#: mail/message-list.c:904
-msgid "?"
-msgstr ""
-
-#: mail/message-list.c:911
-msgid "Today %l:%M %p"
-msgstr " %l:%M %p"
-
-#: mail/message-list.c:920
-msgid "Yesterday %l:%M %p"
-msgstr " %l:%M %p"
-
-#: mail/message-list.c:932
-msgid "%a %l:%M %p"
-msgstr ""
-
-#: mail/message-list.c:942
-msgid "%b %d %Y"
-msgstr ""
-
-#: mail/message-list.c:2334
-#, fuzzy
-msgid "Generating message list"
-msgstr " "
-
-#: mail/message-list.etspec.h:2
-msgid "Flagged"
-msgstr ""
-
-#: mail/message-list.etspec.h:4
-msgid "Received"
-msgstr ""
-
-#: mail/message-list.etspec.h:7
-msgid "Size"
-msgstr ""
-
-#: mail/subscribe-dialog.c:219
-#, fuzzy, c-format
-msgid "Scanning folders under %s on \"%s\""
-msgstr " \"%s\""
-
-#: mail/subscribe-dialog.c:221
-#, fuzzy, c-format
-msgid "Scanning root-level folders on \"%s\""
-msgstr " \"%s\""
-
-#: mail/subscribe-dialog.c:320
-#, c-format
-msgid "Subscribing to folder \"%s\""
-msgstr ""
-
-#: mail/subscribe-dialog.c:322
-#, fuzzy, c-format
-msgid "Unsubscribing to folder \"%s\""
-msgstr " %s"
-
-#: mail/subscribe-dialog.c:1280 mail/subscribe-dialog.etspec.h:1
-#: shell/e-storage-set-view.etspec.h:1
-msgid "Folder"
-msgstr ""
-
-#: mail/subscribe-dialog.c:1521
-msgid "No server has been selected"
-msgstr ""
-
-#: mail/subscribe-dialog.c:1582
-msgid "Please select a server."
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:1
-msgid " _Refresh List "
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:2
-#, fuzzy
-msgid "All folders"
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:3
-msgid "Display options"
-msgstr " "
-
-#: mail/subscribe-dialog.glade.h:4
-msgid "Folders whose names begin with:"
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:5
-#, fuzzy
-msgid "Manage Subscriptions"
-msgstr ":"
-
-#: mail/subscribe-dialog.glade.h:6
-msgid "Show _folders from server: "
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:7
-msgid "_Subscribe"
-msgstr ""
-
-#: mail/subscribe-dialog.glade.h:8
-msgid "_Unsubscribe"
-msgstr ""
-
-#: my-evolution/GNOME_Evolution_Summary.oaf.in.h:1
-msgid "Evolution component for the executive summary."
-msgstr ""
-
-#: my-evolution/component-factory.c:45
-msgid "Folder containing the Evolution Summary"
-msgstr ""
-
-#: my-evolution/component-factory.c:154
-msgid "Cannot initialize Evolution's Executive Summary component."
-msgstr ""
-
-#: my-evolution/e-summary-calendar.c:263 my-evolution/e-summary-calendar.c:281
-#, fuzzy
-msgid "Appointments"
-msgstr " "
-
-#: my-evolution/e-summary-calendar.c:264
-#, fuzzy
-msgid "No appointments"
-msgstr " "
-
-#: my-evolution/e-summary-calendar.c:301
-msgid "%k%M %d %B"
-msgstr ""
-
-#: my-evolution/e-summary-calendar.c:303
-msgid "%l:%M %d %B"
-msgstr ""
-
-#: my-evolution/e-summary-mail.c:130
-msgid "Mail summary"
-msgstr ""
-
-#. translators: Put here a list of codes for locations you want to
-#. see in My Evolution by default. You can find the list of all
-#. stations and their codes in Evolution sources
-#. (evolution/my-evolution/Locations)
-#: my-evolution/e-summary-preferences.c:80
-#: my-evolution/e-summary-weather.c:630
-msgid "KBOS:ZSAM:EGAA"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:441
-msgid "Dictionary.com Word of the Day"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:463
-msgid "Quotes of the Day"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:929
-msgid "Add a news feed"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:937
-msgid "Enter the URL of the news feed you wish to add"
-msgstr ""
-
-#: my-evolution/e-summary-preferences.c:941
-msgid "Name:"
-msgstr ":"
-
-#: my-evolution/e-summary-preferences.c:1486
-#, fuzzy
-msgid "Summary Settings"
-msgstr ""
-
-#: my-evolution/e-summary-rdf.c:297 my-evolution/e-summary-rdf.c:382
-#: my-evolution/e-summary-rdf.c:415
-#, fuzzy
-msgid "Error downloading RDF"
-msgstr " %s"
-
-#: my-evolution/e-summary-rdf.c:507
-#, fuzzy
-msgid "News Feed"
-msgstr ""
-
-#: my-evolution/e-summary-tasks.c:238
-#, fuzzy
-msgid "No tasks"
-msgstr " "
-
-#: my-evolution/e-summary-tasks.c:277
-#, fuzzy
-msgid "(No Description)"
-msgstr "( )"
-
-#: my-evolution/e-summary-weather.c:72
-msgid "My Weather"
-msgstr ""
-
-#: my-evolution/e-summary-weather.c:349
-msgid "<dd><b>The weather server could not be contacted</b></dd>"
-msgstr ""
-
-#: my-evolution/e-summary-weather.c:539
-#, fuzzy
-msgid "Weather"
-msgstr ""
-
-#: my-evolution/e-summary-weather.c:691
-#, fuzzy
-msgid "Regions"
-msgstr ":"
-
-#: my-evolution/e-summary.c:187
-msgid "%A, %B %e %Y"
-msgstr ""
-
-#: my-evolution/e-summary.c:568 ui/my-evolution.xml.h:3
-#, fuzzy
-msgid "Print Summary"
-msgstr ""
-
-#: my-evolution/e-summary.c:614
-#, fuzzy
-msgid "Printing of Summary failed"
-msgstr " "
-
-#: my-evolution/main.c:67
-#, fuzzy
-msgid "Executive summary component could not initialize Bonobo.\n"
-msgstr "init_bonobo(): Bonobo"
-
-#: my-evolution/metar.c:29
-msgid "F"
-msgstr ""
-
-#: my-evolution/metar.c:29
-msgid "C"
-msgstr ""
-
-#: my-evolution/metar.c:33
-#, fuzzy
-msgid "knots"
-msgstr ""
-
-#: my-evolution/metar.c:33
-msgid "kph"
-msgstr ""
-
-#: my-evolution/metar.c:38
-#, fuzzy
-msgid "inHg"
-msgstr ""
-
-#: my-evolution/metar.c:38
-msgid "mmHg"
-msgstr ""
-
-#: my-evolution/metar.c:41
-#, fuzzy
-msgid "miles"
-msgstr ""
-
-#: my-evolution/metar.c:41
-msgid "kilometers"
-msgstr ""
-
-#: my-evolution/metar.c:44
-#, fuzzy
-msgid "Clear sky"
-msgstr ""
-
-#: my-evolution/metar.c:45
-msgid "Broken clouds"
-msgstr ""
-
-#: my-evolution/metar.c:46
-msgid "Scattered clouds"
-msgstr ""
-
-#: my-evolution/metar.c:47
-msgid "Few clouds"
-msgstr ""
-
-#: my-evolution/metar.c:48
-msgid "Overcast"
-msgstr ""
-
-#: my-evolution/metar.c:56 my-evolution/metar.c:74 my-evolution/metar.c:137
-msgid "Invalid"
-msgstr ""
-
-#: my-evolution/metar.c:63
-#, fuzzy
-msgid "Variable"
-msgstr "."
-
-#: my-evolution/metar.c:64
-#, fuzzy
-msgid "North"
-msgstr ""
-
-#: my-evolution/metar.c:64
-msgid "North - NorthEast"
-msgstr ""
-
-#: my-evolution/metar.c:64
-#, fuzzy
-msgid "Northeast"
-msgstr ""
-
-#: my-evolution/metar.c:64
-msgid "East - NorthEast"
-msgstr ""
-
-#: my-evolution/metar.c:65
-#, fuzzy
-msgid "East"
-msgstr ":"
-
-#: my-evolution/metar.c:65
-msgid "East - Southeast"
-msgstr ""
-
-#: my-evolution/metar.c:65
-msgid "Southeast"
-msgstr ""
-
-#: my-evolution/metar.c:65
-msgid "South - Southeast"
-msgstr ""
-
-#: my-evolution/metar.c:66
-#, fuzzy
-msgid "South"
-msgstr ""
-
-#: my-evolution/metar.c:66
-msgid "South - Southwest"
-msgstr ""
-
-#: my-evolution/metar.c:66
-msgid "Southwest"
-msgstr ""
-
-#: my-evolution/metar.c:66
-msgid "West - Southwest"
-msgstr ""
-
-#: my-evolution/metar.c:67
-#, fuzzy
-msgid "West"
-msgstr ""
-
-#: my-evolution/metar.c:67
-msgid "West - Northwest"
-msgstr ""
-
-#: my-evolution/metar.c:67
-#, fuzzy
-msgid "Northwest"
-msgstr ""
-
-#: my-evolution/metar.c:67
-msgid "North - Northwest"
-msgstr ""
-
-#. NONE VICINITY LIGHT MODERATE HEAVY SHALLOW PATCHES PARTIAL THUNDERSTORM BLOWING SHOWERS DRIFTING FREEZING
-#. ******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
-#. NONE
-#. DRIZZLE
-#: my-evolution/metar.c:100
-msgid "Drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Drizzle in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Light drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Moderate drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Heavy drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Shallow drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Patches of drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Partial drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100 my-evolution/metar.c:101
-msgid "Thunderstorm"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Windy drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-#, fuzzy
-msgid "Showers"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Drifting drizzle"
-msgstr ""
-
-#: my-evolution/metar.c:100
-msgid "Freezing drizzle"
-msgstr ""
-
-#. RAIN
-#: my-evolution/metar.c:101
-#, fuzzy
-msgid "Rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Rain in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Light rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Moderate rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Heavy rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Shallow rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Patches of rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Partial rainfall"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Blowing rainfall"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Rain showers"
-msgstr ""
-
-#: my-evolution/metar.c:101
-msgid "Drifting rain"
-msgstr ""
-
-#: my-evolution/metar.c:101
-#, fuzzy
-msgid "Freezing rain"
-msgstr " "
-
-#. SNOW
-#: my-evolution/metar.c:102
-#, fuzzy
-msgid "Snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Snow in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Light snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Moderate snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Heavy snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Shallow snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Patches of snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Partial snowfall"
-msgstr ""
-
-#: my-evolution/metar.c:102 my-evolution/metar.c:103
-msgid "Snowstorm"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Blowing snowfall"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Snow showers"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Drifting snow"
-msgstr ""
-
-#: my-evolution/metar.c:102
-msgid "Freezing snow"
-msgstr ""
-
-#. SNOW_GRAINS
-#: my-evolution/metar.c:103
-msgid "Snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Snow grains in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Light snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Moderate snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Heavy snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Shallow snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Patches of snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Partial snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Blowing snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Snow grain showers"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Drifting snow grains"
-msgstr ""
-
-#: my-evolution/metar.c:103
-msgid "Freezing snow grains"
-msgstr ""
-
-#. ICE_CRYSTALS
-#: my-evolution/metar.c:104
-msgid "Ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Ice crystals in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Few ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Moderate ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Heavy ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Patches of ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Partial ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Ice crystal storm"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Blowing ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Showers of ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Drifting ice crystals"
-msgstr ""
-
-#: my-evolution/metar.c:104
-msgid "Freezing ice crystals"
-msgstr ""
-
-#. ICE_PELLETS
-#: my-evolution/metar.c:105
-msgid "Ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Ice pellets in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Few ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Moderate ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Heavy ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Shallow ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Patches of ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Partial ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Ice pellet storm"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Blowing ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Showers of ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Drifting ice pellets"
-msgstr ""
-
-#: my-evolution/metar.c:105
-msgid "Freezing ice pellets"
-msgstr ""
-
-#. HAIL
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Hail"
-msgstr "Email"
-
-#: my-evolution/metar.c:106
-msgid "Hail in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:106 my-evolution/metar.c:107
-msgid "Light hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Moderate hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Heavy hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Shallow hail"
-msgstr " "
-
-#: my-evolution/metar.c:106
-msgid "Patches of hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Partial hail"
-msgstr " Email"
-
-#: my-evolution/metar.c:106
-msgid "Hailstorm"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Blowing hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Hail showers"
-msgstr ""
-
-#: my-evolution/metar.c:106
-msgid "Drifting hail"
-msgstr ""
-
-#: my-evolution/metar.c:106
-#, fuzzy
-msgid "Freezing hail"
-msgstr " "
-
-#. SMALL_HAIL
-#: my-evolution/metar.c:107
-msgid "Small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Small hail in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Moderate small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Heavy small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Shallow small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Patches of small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Partial small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Small hailstorm"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Blowing small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Showers of small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Drifting small hail"
-msgstr ""
-
-#: my-evolution/metar.c:107
-msgid "Freezing small hail"
-msgstr ""
-
-#. PRECIPITATION
-#: my-evolution/metar.c:108
-msgid "Unknown precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Precipitation in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Light precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Moderate precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Heavy precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Shallow precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Patches of precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Partial precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-#, fuzzy
-msgid "Unknown thunderstorm"
-msgstr " "
-
-#: my-evolution/metar.c:108
-msgid "Blowing precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Showers, type unknown"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Drifting precipitation"
-msgstr ""
-
-#: my-evolution/metar.c:108
-msgid "Freezing precipitation"
-msgstr ""
-
-#. MIST
-#: my-evolution/metar.c:109
-#, fuzzy
-msgid "Mist"
-msgstr "-"
-
-#: my-evolution/metar.c:109
-msgid "Mist in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Light mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Moderate mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Thick mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Shallow mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Patches of mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-#, fuzzy
-msgid "Partial mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Mist with wind"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Drifting mist"
-msgstr ""
-
-#: my-evolution/metar.c:109
-msgid "Freezing mist"
-msgstr ""
-
-#. FOG
-#: my-evolution/metar.c:110
-msgid "Fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Fog in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Light fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Moderate fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Thick fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Shallow fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Patches of fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Partial fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-#, fuzzy
-msgid "Fog with wind"
-msgstr " "
-
-#: my-evolution/metar.c:110
-msgid "Drifting fog"
-msgstr ""
-
-#: my-evolution/metar.c:110
-msgid "Freezing fog"
-msgstr ""
-
-#. SMOKE
-#: my-evolution/metar.c:111
-msgid "Smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Smoke in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Thin smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Moderate smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Thick smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-#, fuzzy
-msgid "Shallow smoke"
-msgstr " "
-
-#: my-evolution/metar.c:111
-msgid "Patches of smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Partial smoke"
-msgstr ""
-
-#: my-evolution/metar.c:111
-msgid "Smoke w/ thunders"
-msgstr ""
-
-#: my-evolution/metar.c:111
-#, fuzzy
-msgid "Smoke with wind"
-msgstr " "
-
-#: my-evolution/metar.c:111
-msgid "Drifting smoke"
-msgstr ""
-
-#. VOLCANIC_ASH
-#: my-evolution/metar.c:112
-msgid "Volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Volcanic ash in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Moderate volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Thick volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Shallow volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Patches of volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Partial volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Volcanic ash w/ thunders"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Blowing volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Showers of volcanic ash "
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Drifting volcanic ash"
-msgstr ""
-
-#: my-evolution/metar.c:112
-msgid "Freezing volcanic ash"
-msgstr ""
-
-#. SAND
-#: my-evolution/metar.c:113
-#, fuzzy
-msgid "Sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Sand in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Light sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Moderate sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Heavy sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Patches of sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Partial sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Blowing sand"
-msgstr ""
-
-#: my-evolution/metar.c:113
-msgid "Drifting sand"
-msgstr ""
-
-#. HAZE
-#: my-evolution/metar.c:114
-#, fuzzy
-msgid "Haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Haze in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Light haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Moderate haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Thick haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Shallow haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Patches of haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Partial haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Haze with wind"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Drifting haze"
-msgstr ""
-
-#: my-evolution/metar.c:114
-msgid "Freezing haze"
-msgstr ""
-
-#. SPRAY
-#: my-evolution/metar.c:115
-#, fuzzy
-msgid "Sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Sprays in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Light sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Moderate sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Heavy sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Shallow sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Patches of sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Partial sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Blowing sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Drifting sprays"
-msgstr ""
-
-#: my-evolution/metar.c:115
-msgid "Freezing sprays"
-msgstr ""
-
-#. DUST
-#: my-evolution/metar.c:116
-#, fuzzy
-msgid "Dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Dust in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Light dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Moderate dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Heavy dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Patches of dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Partial dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Blowing dust"
-msgstr ""
-
-#: my-evolution/metar.c:116
-msgid "Drifting dust"
-msgstr ""
-
-#. SQUALL
-#: my-evolution/metar.c:117
-msgid "Squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Squall in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Light squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Moderate squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Heavy squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Partial squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Thunderous squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Blowing squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Drifting squall"
-msgstr ""
-
-#: my-evolution/metar.c:117
-msgid "Freezing squall"
-msgstr ""
-
-#. SANDSTORM
-#: my-evolution/metar.c:118
-msgid "Sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Sandstorm in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Light standstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Moderate sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Heavy sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Shallow sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Partial sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Thunderous sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Blowing sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Drifting sandstorm"
-msgstr ""
-
-#: my-evolution/metar.c:118
-msgid "Freezing sandstorm"
-msgstr ""
-
-#. DUSTSTORM
-#: my-evolution/metar.c:119
-msgid "Duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Duststorm in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Light duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Moderate duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Heavy duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Shallow duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Partial duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Thunderous duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Blowing duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Drifting duststorm"
-msgstr ""
-
-#: my-evolution/metar.c:119
-msgid "Freezing duststorm"
-msgstr ""
-
-#. FUNNEL_CLOUD
-#: my-evolution/metar.c:120
-msgid "Funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Funnel cloud in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Light funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Moderate funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Thick funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Shallow funnel cloud"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Patches of funnel clouds"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Partial funnel clouds"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Funnel cloud w/ wind"
-msgstr ""
-
-#: my-evolution/metar.c:120
-msgid "Drifting funnel cloud"
-msgstr ""
-
-#. TORNADO
-#: my-evolution/metar.c:121
-msgid "Tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Tornado in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Moderate tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Raging tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Partial tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Thunderous tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Drifting tornado"
-msgstr ""
-
-#: my-evolution/metar.c:121
-msgid "Freezing tornado"
-msgstr ""
-
-#. DUST_WHIRLS
-#: my-evolution/metar.c:122
-msgid "Dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Dust whirls in the vicinity"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Light dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Moderate dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Heavy dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Shallow dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Patches of dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Partial dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Blowing dust whirls"
-msgstr ""
-
-#: my-evolution/metar.c:122
-msgid "Drifting dust whirls"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:1
-#, fuzzy
-msgid " _Remove"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:2
-msgid "Add n_ew feed"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:3
-#, fuzzy
-msgid "Al_l stations:"
-msgstr ":"
-
-#: my-evolution/my-evolution.glade.h:4
-#, fuzzy
-msgid "All _folders:"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:5
-msgid "All news _feeds:"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:7
-msgid "How many days should the calendar display at once?"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:8
-msgid "Ma_x number of items shown:"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:9
-msgid "News Feed Settings"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:10
-#, fuzzy
-msgid "One mont_h"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:11
-#, fuzzy
-msgid "One w_eek"
-msgstr " 1 "
-
-#: my-evolution/my-evolution.glade.h:12
-msgid "R_efresh time (seconds):"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:13
-msgid "Refresh _time (seconds):"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:14
-msgid "S_how full path for folders"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:15
-#, fuzzy
-msgid "Show _all tasks"
-msgstr " "
-
-#: my-evolution/my-evolution.glade.h:16
-#, fuzzy
-msgid "Show _today's tasks"
-msgstr " "
-
-#: my-evolution/my-evolution.glade.h:17
-#, fuzzy
-msgid "Tasks "
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:18
-#, fuzzy
-msgid "Units: "
-msgstr ""
-"\n"
-" : "
-
-#: my-evolution/my-evolution.glade.h:19
-#, fuzzy
-msgid "Weather settings"
-msgstr " "
-
-#: my-evolution/my-evolution.glade.h:21
-#, fuzzy
-msgid "_Display folders:"
-msgstr " :"
-
-#: my-evolution/my-evolution.glade.h:22
-#, fuzzy
-msgid "_Display stations:"
-msgstr " "
-
-#: my-evolution/my-evolution.glade.h:23
-msgid "_Displayed feeds:"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:24
-#, fuzzy
-msgid "_Five days"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:25
-#, fuzzy
-msgid "_Mail"
-msgstr ":"
-
-#: my-evolution/my-evolution.glade.h:26
-msgid "_News Feeds"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:27
-msgid "_One day"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:28
-msgid "_Schedule"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:29
-#, fuzzy
-msgid "_Weather"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:30
-msgid "_imperial"
-msgstr ""
-
-#: my-evolution/my-evolution.glade.h:31
-msgid "m_etric"
-msgstr ""
-
-#: shell/GNOME_Evolution_Shell.oaf.in.h:1
-msgid "The Evolution shell."
-msgstr ""
-
-#: shell/e-activity-handler.c:200
-#, fuzzy
-msgid "Show Details"
-msgstr ""
-
-#: shell/e-activity-handler.c:202
-#, fuzzy
-msgid "Cancel Operation"
-msgstr " "
-
-#: shell/e-local-storage.c:175 shell/e-shortcuts.c:1053
-msgid "Inbox"
-msgstr ""
-
-#: shell/e-local-storage.c:176
-msgid "Outbox"
-msgstr ""
-
-#: shell/e-local-storage.c:624
-#, fuzzy
-msgid "Local Folders"
-msgstr " "
-
-#: shell/e-setup.c:125
-msgid "Evolution installation"
-msgstr ""
-
-#: shell/e-setup.c:129
-msgid ""
-"This new version of Evolution needs to install additional files\n"
-"into your personal Evolution directory"
-msgstr ""
-
-#: shell/e-setup.c:130
-msgid "Please click \"OK\" to install the files, or \"Cancel\" to exit."
-msgstr ""
-
-#: shell/e-setup.c:170
-msgid "Could not update files correctly"
-msgstr " "
-
-#: shell/e-setup.c:193
-#, c-format
-msgid ""
-"Cannot create the directory\n"
-"%s\n"
-"Error: %s"
-msgstr ""
-" \n"
-"%s\n"
-": %s"
-
-#: shell/e-setup.c:208
-#, fuzzy, c-format
-msgid ""
-"An error occurred in copying files into\n"
-"`%s'."
-msgstr ""
-" \n"
-"`%s'."
-
-#: shell/e-setup.c:282
-#, c-format
-msgid ""
-"The file `%s' is not a directory.\n"
-"Please move it in order to allow installation\n"
-"of the Evolution user files."
-msgstr ""
-
-#: shell/e-setup.c:296
-msgid ""
-"Evolution has detected an old\n"
-"Executive-Summary directory.\n"
-"This needs to be removed before\n"
-"Evolution will run.\n"
-"Do you want me to remove this directory?"
-msgstr ""
-
-#: shell/e-setup.c:321
-#, c-format
-msgid ""
-"The directory `%s' exists but is not the\n"
-"Evolution directory. Please move it in order\n"
-"to allow installation of the Evolution user files."
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:176
-msgid "Cannot move a folder over itself."
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:178
-#, fuzzy
-msgid "Cannot copy a folder over itself."
-msgstr ""
-" \n"
-"`%s'."
-
-#: shell/e-shell-folder-commands.c:192
-msgid "Cannot move a folder into one of its descendants."
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:312
-#, c-format
-msgid "Specify a folder to copy folder \"%s\" into:"
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:317
-#, fuzzy
-msgid "Copy folder"
-msgstr " "
-
-#: shell/e-shell-folder-commands.c:359
-#, c-format
-msgid "Specify a folder to move folder \"%s\" into:"
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:364
-#, fuzzy
-msgid "Move folder"
-msgstr " "
-
-#: shell/e-shell-folder-commands.c:390
-#, fuzzy, c-format
-msgid ""
-"Cannot delete folder:\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: shell/e-shell-folder-commands.c:406
-#, fuzzy, c-format
-msgid "Delete \"%s\""
-msgstr ""
-
-#. "Are you sure..." label
-#: shell/e-shell-folder-commands.c:416
-#, c-format
-msgid "Are you sure you want to remove the \"%s\" folder?"
-msgstr ""
-
-#: shell/e-shell-folder-commands.c:470
-#, fuzzy, c-format
-msgid ""
-"Cannot rename folder:\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: shell/e-shell-folder-commands.c:503
-#, fuzzy, c-format
-msgid "Rename the \"%s\" folder to:"
-msgstr " %s"
-
-#: shell/e-shell-folder-commands.c:506
-#, fuzzy
-msgid "Rename folder"
-msgstr " %s"
-
-#: shell/e-shell-folder-creation-dialog.c:111
-#, c-format
-msgid ""
-"Cannot create the specified folder:\n"
-"%s"
-msgstr ""
-" :\n"
-"%s"
-
-#: shell/e-shell-folder-creation-dialog.c:126
-#, fuzzy
-msgid "No folder name specified."
-msgstr " "
-
-#: shell/e-shell-folder-creation-dialog.c:132
-msgid "Folder name cannot contain the Return character."
-msgstr ""
-
-#: shell/e-shell-folder-creation-dialog.c:137
-#, fuzzy
-msgid "Folder cannot contain the directory separator."
-msgstr ""
-" %s:\n"
-"%s"
-
-#: shell/e-shell-folder-creation-dialog.c:142
-msgid "'.' and '..' are reserved folder names."
-msgstr ""
-
-#: shell/e-shell-folder-creation-dialog.c:180
-#, fuzzy, c-format
-msgid "The specified folder name is not valid: %s"
-msgstr " ."
-
-#: shell/e-shell-folder-creation-dialog.c:300
-msgid "Evolution - Create new folder"
-msgstr "Evolution - "
-
-#: shell/e-shell-folder-selection-dialog.c:99
-msgid ""
-"The type of the selected folder is not valid for\n"
-"the requested operation."
-msgstr ""
-
-#: shell/e-shell-folder-selection-dialog.c:360
-msgid "New..."
-msgstr "..."
-
-#: shell/e-shell-folder-title-bar.c:585 shell/e-shell-folder-title-bar.c:586
-msgid "(Untitled)"
-msgstr "()"
-
-#: shell/e-shell-importer.c:141
-msgid "Choose the type of importer to run"
-msgstr ""
-
-#: shell/e-shell-importer.c:144
-msgid ""
-"Choose the file that you want to import into Evolution, and select what type "
-"of file it is from the list.\n"
-"\n"
-"You can select \"Automatic\" if you do not know, and Evolution will attempt "
-"to work it out."
-msgstr ""
-
-#: shell/e-shell-importer.c:150
-msgid "Please select the information that you would like to import"
-msgstr ""
-
-#. Importer isn't ready yet.
-#. Wait 5 seconds and try again.
-#: shell/e-shell-importer.c:242
-#, c-format
-msgid ""
-"Importing %s\n"
-"Importer not ready.\n"
-"Waiting 5 seconds to retry."
-msgstr ""
-
-#: shell/e-shell-importer.c:262 shell/e-shell-importer.c:293
-#, c-format
-msgid ""
-"Importing %s\n"
-"Importing item %d."
-msgstr ""
-
-#: shell/e-shell-importer.c:396
-#, fuzzy, c-format
-msgid "File %s does not exist"
-msgstr " `%s' ."
-
-#: shell/e-shell-importer.c:408
-msgid "You may only import to local folders"
-msgstr ""
-
-#: shell/e-shell-importer.c:423
-#, c-format
-msgid ""
-"There is no importer that is able to handle\n"
-"%s"
-msgstr ""
-
-#: shell/e-shell-importer.c:433
-msgid "Importing"
-msgstr ""
-
-#: shell/e-shell-importer.c:441
-#, c-format
-msgid ""
-"Importing %s.\n"
-"Starting %s"
-msgstr ""
-
-#: shell/e-shell-importer.c:454
-#, fuzzy, c-format
-msgid "Error starting %s"
-msgstr " %s"
-
-#: shell/e-shell-importer.c:473
-#, c-format
-msgid "Error loading %s"
-msgstr " %s"
-
-#: shell/e-shell-importer.c:490
-#, c-format
-msgid ""
-"Importing %s\n"
-"Importing item 1."
-msgstr ""
-
-#: shell/e-shell-importer.c:560
-msgid "Automatic"
-msgstr ""
-
-#: shell/e-shell-importer.c:611
-msgid "Filename:"
-msgstr " :"
-
-#: shell/e-shell-importer.c:616
-msgid "Select a file"
-msgstr " "
-
-#: shell/e-shell-importer.c:626
-msgid "File type:"
-msgstr " :"
-
-#: shell/e-shell-importer.c:651
-msgid "Import data and settings from older programs"
-msgstr ""
-
-#: shell/e-shell-importer.c:655
-msgid "Import a single file"
-msgstr ""
-
-#: shell/e-shell-importer.c:720 shell/e-shell-startup-wizard.c:582
-msgid ""
-"Please wait...\n"
-"Scanning for existing setups"
-msgstr ""
-
-#: shell/e-shell-importer.c:721 shell/e-shell-startup-wizard.c:585
-msgid "Starting Intelligent Importers"
-msgstr ""
-
-#: shell/e-shell-importer.c:840 shell/e-shell-startup-wizard.c:703
-#, fuzzy, c-format
-msgid "From %s:"
-msgstr ":"
-
-#: shell/e-shell-importer.c:1003
-#, fuzzy
-msgid "Select folder"
-msgstr " "
-
-#: shell/e-shell-importer.c:1004
-msgid "Select a destination folder for importing this data"
-msgstr ""
-
-#: shell/e-shell-importer.c:1116 shell/importer/intelligent.c:194
-msgid "Import"
-msgstr ""
-
-#: shell/e-shell-offline-handler.c:562
-msgid "Closing connections..."
-msgstr ""
-
-#: shell/e-shell-startup-wizard.c:159
-#, c-format
-msgid ""
-"Could not start the Evolution Mailer Wizard interface\n"
-"%s"
-msgstr ""
-
-#: shell/e-shell-startup-wizard.c:168
-#, fuzzy
-msgid "Cannot initialize the Evolution Mailer Wizard interface"
-msgstr " mail Evolution."
-
-#: shell/e-shell-startup-wizard.c:745
-msgid ""
-"Please select the information\n"
-"that you would like to import"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:201
-msgid "Bug buddy was not found in your $PATH."
-msgstr "Bug buddy $PATH."
-
-#: shell/e-shell-view-menu.c:209
-msgid "Bug buddy could not be run."
-msgstr "Bug buddy ."
-
-#: shell/e-shell-view-menu.c:235
-msgid "Ximian Evolution"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:237
-msgid "Copyright 1999, 2000, 2001 Ximian, Inc."
-msgstr ""
-
-#: shell/e-shell-view-menu.c:239
-msgid ""
-"Ximian Evolution is a suite of groupware applications\n"
-"for mail, calendaring, and contact management\n"
-"within the GNOME desktop environment."
-msgstr ""
-
-#: shell/e-shell-view-menu.c:442
-msgid "Go to folder..."
-msgstr " ..."
-
-#: shell/e-shell-view-menu.c:443
-msgid "Select the folder that you want to open"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:563
-#, fuzzy
-msgid "Create a new shortcut"
-msgstr " "
-
-#: shell/e-shell-view-menu.c:564
-msgid "Select the folder you want the shortcut to point to:"
-msgstr ""
-
-#: shell/e-shell-view-menu.c:595
-msgid "The GNOME Pilot tools do not appear to be installed on this system."
-msgstr ""
-
-#: shell/e-shell-view-menu.c:603
-#, fuzzy, c-format
-msgid "Error executing %s."
-msgstr " %s"
-
-#: shell/e-shell-view-menu.c:705
-#, fuzzy
-msgid "Work Online"
-msgstr " "
-
-#: shell/e-shell-view-menu.c:718 shell/e-shell-view-menu.c:731
-#: ui/evolution.xml.h:30
-msgid "Work Offline"
-msgstr ""
-
-#: shell/e-shell-view.c:214
-msgid "(No folder displayed)"
-msgstr ""
-
-#: shell/e-shell-view.c:1512
-#, c-format
-msgid "%s (%d)"
-msgstr ""
-
-#: shell/e-shell-view.c:1514
-#, fuzzy
-msgid "(None)"
-msgstr "( )"
-
-#: shell/e-shell-view.c:1519
-#, c-format
-msgid "%s - Ximian Evolution %s"
-msgstr ""
-
-#: shell/e-shell-view.c:1521
-#, c-format
-msgid "%s - Ximian Evolution %s [%s]"
-msgstr ""
-
-#: shell/e-shell-view.c:1561
-msgid ""
-"Ximian Evolution is currently online. Click on this button to work offline."
-msgstr ""
-
-#: shell/e-shell-view.c:1568
-msgid "Ximian Evolution is in the process of going offline."
-msgstr ""
-
-#: shell/e-shell-view.c:1574
-msgid ""
-"Ximian Evolution is currently offline. Click on this button to work online."
-msgstr ""
-
-#: shell/e-shell.c:562
-#, c-format
-msgid "Cannot set up local storage -- %s"
-msgstr ""
-
-#: shell/e-shell.c:1488
-#, c-format
-msgid ""
-"Ooops! The views for `%s' have died unexpectedly. :-(\n"
-"This probably means that the %s component has crashed."
-msgstr ""
-
-#: shell/e-shell.c:1692 widgets/misc/e-cell-date-edit.c:248
-msgid "OK"
-msgstr ""
-
-#: shell/e-shell.c:1694
-msgid "Invalid arguments"
-msgstr ""
-
-#: shell/e-shell.c:1696
-msgid "Cannot register on OAF"
-msgstr ""
-
-#: shell/e-shell.c:1698
-msgid "Configuration Database not found"
-msgstr ""
-
-#: shell/e-shell.c:1700 shell/e-storage.c:496
-msgid "Generic error"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:75
-msgid "Create new shortcut group"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:76
-msgid "Group name:"
-msgstr " :"
-
-#: shell/e-shortcuts-view.c:176
-#, c-format
-msgid ""
-"Do you really want to remove group\n"
-"`%s' from the shortcut bar?"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:181
-msgid "Don't remove"
-msgstr " "
-
-#: shell/e-shortcuts-view.c:210
-msgid "Rename Shortcut Group"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:211
-msgid "Rename selected shortcut group to:"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:225
-msgid "_Small Icons"
-msgstr " "
-
-#: shell/e-shortcuts-view.c:226
-msgid "Show the shortcuts as small icons"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:228
-msgid "_Large Icons"
-msgstr "_ "
-
-#: shell/e-shortcuts-view.c:229
-msgid "Show the shortcuts as large icons"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:240
-msgid "_New Group..."
-msgstr "_ ..."
-
-#: shell/e-shortcuts-view.c:241
-msgid "Create a new shortcut group"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:243
-#, fuzzy
-msgid "_Remove this Group..."
-msgstr "_ ..."
-
-#: shell/e-shortcuts-view.c:244
-msgid "Remove this shortcut group"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:246
-#, fuzzy
-msgid "Re_name this Group..."
-msgstr "_ ..."
-
-#: shell/e-shortcuts-view.c:247
-msgid "Rename this shortcut group"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:252
-msgid "_Hide the Shortcut Bar"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:253
-msgid "Hide the shortcut bar"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:372
-msgid "Rename shortcut"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:373
-msgid "Rename selected shortcut to:"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:385
-msgid "Open the folder linked to this shortcut"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:387 ui/evolution.xml.h:19
-#, fuzzy
-msgid "Open in New _Window"
-msgstr "_ "
-
-#: shell/e-shortcuts-view.c:387
-msgid "Open the folder linked to this shortcut in a new window"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:390
-#, fuzzy
-msgid "_Rename"
-msgstr " :"
-
-#: shell/e-shortcuts-view.c:390
-#, fuzzy
-msgid "Rename this shortcut"
-msgstr " "
-
-#: shell/e-shortcuts-view.c:392
-#, fuzzy
-msgid "Re_move"
-msgstr ""
-
-#: shell/e-shortcuts-view.c:392
-msgid "Remove this shortcut from the shortcut bar"
-msgstr ""
-
-#: shell/e-shortcuts.c:641
-msgid "Error saving shortcuts."
-msgstr ""
-
-#: shell/e-shortcuts.c:1044
-msgid "Shortcuts"
-msgstr ""
-
-#: shell/e-storage-set-view.c:645
-#, fuzzy, c-format
-msgid ""
-"Cannot transfer folder:\n"
-"%s"
-msgstr ""
-" `%s':\n"
-"%s"
-
-#: shell/e-storage.c:182 shell/e-storage.c:188
-msgid "(No name)"
-msgstr "( )"
-
-#: shell/e-storage.c:494
-msgid "No error"
-msgstr " "
-
-#: shell/e-storage.c:498
-msgid "A folder with the same name already exists"
-msgstr " "
-
-#: shell/e-storage.c:500
-msgid "The specified folder type is not valid"
-msgstr ""
-
-#: shell/e-storage.c:502
-msgid "I/O error"
-msgstr "/ "
-
-#: shell/e-storage.c:504
-msgid "Not enough space to create the folder"
-msgstr " "
-
-#: shell/e-storage.c:506
-msgid "The specified folder was not found"
-msgstr " "
-
-#: shell/e-storage.c:508
-msgid "Function not implemented in this storage"
-msgstr ""
-
-#: shell/e-storage.c:512
-msgid "Operation not supported"
-msgstr ""
-
-#: shell/e-storage.c:514
-msgid "The specified type is not supported in this storage"
-msgstr ""
-
-#: shell/e-storage.c:516
-#, fuzzy
-msgid "The specified folder cannot be modified or removed"
-msgstr " "
-
-#: shell/e-storage.c:518
-msgid "Cannot make a folder a child of one of its descendants"
-msgstr ""
-
-#: shell/e-task-widget.c:192
-#, c-format
-msgid "%s (...)"
-msgstr ""
-
-#: shell/e-task-widget.c:197
-#, fuzzy, c-format
-msgid "%s (%d%% complete)"
-msgstr "% :"
-
-#: shell/glade/e-active-connection-dialog.glade.h:1
-#, fuzzy
-msgid "Active connections"
-msgstr " "
-
-#: shell/glade/e-active-connection-dialog.glade.h:2
-msgid "Click OK to close these connections and go offline"
-msgstr ""
-
-#: shell/glade/e-active-connection-dialog.glade.h:3
-#, fuzzy
-msgid "Host"
-msgstr ":"
-
-#: shell/glade/e-active-connection-dialog.glade.h:4
-msgid "The following connections are currently active:"
-msgstr ""
-
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:1
-msgid "Folder name:"
-msgstr " :"
-
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:2
-msgid "Folder type:"
-msgstr " :"
-
-#: shell/glade/e-shell-folder-creation-dialog.glade.h:3
-msgid "Specify where to create the folder:"
-msgstr " :"
-
-#: shell/glade/evolution-startup-wizard.glade.h:3
-msgid "First Run Setup Assistant"
-msgstr ""
-
-#: shell/glade/evolution-startup-wizard.glade.h:5
-#, fuzzy
-msgid "Importing Data"
-msgstr ""
-
-#: shell/glade/evolution-startup-wizard.glade.h:8
-#, fuzzy
-msgid "Setup Assistant"
-msgstr ""
-
-#: shell/glade/evolution-startup-wizard.glade.h:9
-#, fuzzy
-msgid "Timezone "
-msgstr ""
-"\n"
-" : "
-
-#: shell/glade/evolution-startup-wizard.glade.h:10
-msgid ""
-"Welcome to the Evolution first run setup assistant\n"
-"\n"
-"This assistant will help you get started"
-msgstr ""
-
-#: shell/glade/evolution-startup-wizard.glade.h:13
-msgid "Your configuration is complete."
-msgstr ""
-
-#: shell/importer/import.glade.h:1
-msgid "Click \"Import\" to begin importing the file into Evolution. "
-msgstr ""
-
-#: shell/importer/import.glade.h:2
-msgid "Evolution Import Assistant"
-msgstr ""
-
-#: shell/importer/import.glade.h:3
-msgid "Evolution Importer Assistant"
-msgstr ""
-
-#: shell/importer/import.glade.h:4
-#, fuzzy
-msgid "Import File (step 3 of 3)"
-msgstr " "
-
-#: shell/importer/import.glade.h:5
-msgid "Importer Type (step 1 of 3)"
-msgstr ""
-
-#: shell/importer/import.glade.h:6
-#, fuzzy
-msgid "Select Importers (step 2 of 3)"
-msgstr " "
-
-#: shell/importer/import.glade.h:7
-#, fuzzy
-msgid "Select a File (step 2 of 3)"
-msgstr " "
-
-#: shell/importer/import.glade.h:8
-msgid ""
-"Welcome to the Evolution Import Assistant.\n"
-"With this assistant you will be guided through the process of\n"
-"importing external files into Evolution."
-msgstr ""
-
-#: shell/importer/intelligent.c:191
-#, fuzzy
-msgid "Importers"
-msgstr ""
-
-#: shell/importer/intelligent.c:197
-#, fuzzy
-msgid "Don't import"
-msgstr " "
-
-#: shell/importer/intelligent.c:199
-#, fuzzy
-msgid "Don't ask me again"
-msgstr " ."
-
-#: shell/importer/intelligent.c:209
-msgid "Evolution can import data from the following files:"
-msgstr ""
-
-#: shell/main.c:82
-#, fuzzy
-msgid "Evolution is now exiting ..."
-msgstr "Evolution Mail "
-
-#: shell/main.c:153
-#, no-c-format
-msgid ""
-"Hi. Thanks for taking the time to download this preview release\n"
-"of the Ximian Evolution groupware suite.\n"
-"\n"
-"Ximian Evolution is not yet complete. It's getting close, but there are\n"
-"places where features are either missing or only half working. \n"
-"\n"
-"If you find bugs, please report them to us at bugzilla.ximian.com.\n"
-"This product comes with no warranty and is not intended for\n"
-"individuals prone to violent fits of anger.\n"
-"\n"
-"We hope that you enjoy the results of our hard work, and we\n"
-"eagerly await your contributions!\n"
-msgstr ""
-
-#: shell/main.c:174
-msgid ""
-"Thanks\n"
-"The Ximian Evolution Team\n"
-msgstr ""
-
-#: shell/main.c:231
-msgid "Cannot access the Ximian Evolution shell."
-msgstr ""
-
-#: shell/main.c:242
-#, fuzzy, c-format
-msgid "Cannot initialize the Ximian Evolution shell: %s"
-msgstr " mail Evolution."
-
-#: shell/main.c:286
-msgid "Disable splash screen"
-msgstr ""
-
-#: shell/main.c:287
-msgid "Send the debugging output of all components to a file."
-msgstr ""
-
-#: shell/main.c:329
-msgid "Cannot initialize the Bonobo component system."
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:2 ui/evolution-mail-message.xml.h:5
-#: ui/evolution-tasks.xml.h:3
-msgid "Copy"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:3 ui/evolution-calendar.xml.h:3
-msgid "Copy the selection"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:4
-msgid "Create new contact"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:5
-#, fuzzy
-msgid "Create new contact list"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:6 ui/evolution-tasks.xml.h:6
-msgid "Cut"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:7 ui/evolution-calendar.xml.h:10
-msgid "Cut the selection"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:9
-#, fuzzy
-msgid "Delete selected contacts"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:12
-#, fuzzy
-msgid "New List"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:13 ui/evolution-tasks.xml.h:11
-msgid "Paste"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:14 ui/evolution-calendar.xml.h:23
-msgid "Paste the clipboard"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:15
-#, fuzzy
-msgid "Previews the contacts to be printed"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:18
-#, fuzzy
-msgid "Print selected contacts"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:20
-msgid "Save selected contacts as a VCard."
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:21
-msgid "Select All"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:22
-#, fuzzy
-msgid "Select all contacts"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:23 ui/evolution-contact-editor.xml.h:10
-#, fuzzy
-msgid "Send _Message to Contact..."
-msgstr " ..."
-
-#: ui/evolution-addressbook.xml.h:24
-msgid "Send a mess to the selected contacts."
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:25
-#, fuzzy
-msgid "Send message to contact"
-msgstr " -"
-
-#: ui/evolution-addressbook.xml.h:26
-#, fuzzy
-msgid "Send selected contacts to another person."
-msgstr " ..."
-
-#: ui/evolution-addressbook.xml.h:27
-msgid "Stop"
-msgstr ""
-
-#: ui/evolution-addressbook.xml.h:28
-msgid "Stop Loading"
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:29 ui/evolution-calendar.xml.h:34
-#: ui/evolution-comp-editor.xml.h:17 ui/evolution-contact-editor.xml.h:11
-#: ui/evolution-contact-list-editor.xml.h:10 ui/evolution-event-editor.xml.h:9
-#: ui/evolution-mail-global.xml.h:18 ui/evolution-mail-list.xml.h:23
-#: ui/evolution-mail-message.xml.h:84 ui/evolution-mail-messagedisplay.xml.h:4
-#: ui/evolution-task-editor.xml.h:9
-#, fuzzy
-msgid "_Actions"
-msgstr "_"
-
-#: ui/evolution-addressbook.xml.h:30
-#, fuzzy
-msgid "_Addressbook Sources..."
-msgstr " "
-
-#: ui/evolution-addressbook.xml.h:31
-#, fuzzy
-msgid "_Contact"
-msgstr "_"
-
-#: ui/evolution-addressbook.xml.h:32
-#, fuzzy
-msgid "_Contact List"
-msgstr "_"
-
-#: ui/evolution-addressbook.xml.h:35 ui/evolution-contact-editor.xml.h:13
-#, fuzzy
-msgid "_Forward Contact..."
-msgstr "..."
-
-#: ui/evolution-addressbook.xml.h:37 ui/evolution-calendar.xml.h:41
-#: ui/evolution-contact-editor.xml.h:14 ui/evolution-mail-message.xml.h:95
-#: ui/my-evolution.xml.h:7
-msgid "_Print..."
-msgstr "_..."
-
-#: ui/evolution-addressbook.xml.h:38
-#, fuzzy
-msgid "_Save as VCard"
-msgstr " VCard"
-
-#: ui/evolution-addressbook.xml.h:39
-#, fuzzy
-msgid "_Search for Contacts"
-msgstr "_ "
-
-#: ui/evolution-addressbook.xml.h:40
-msgid "_Select All"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:2
-msgid "Configure the calendar's settings"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:4
-#, fuzzy
-msgid "Create a New All Day _Event"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:5
-#, fuzzy
-msgid "Create a New _Task"
-msgstr " email"
-
-#: ui/evolution-calendar.xml.h:6
-#, fuzzy
-msgid "Create a _New Appointment"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:9
-msgid "Create an event for the whole day"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:11
-msgid "Day"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:12
-#, fuzzy
-msgid "Delete the appointment"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:13 ui/evolution-mail-message.xml.h:38
-#, fuzzy
-msgid "Go To"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:14
-msgid "Go back"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:15
-#, fuzzy
-msgid "Go forward"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:16
-#, fuzzy
-msgid "Go to _Date"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:18
-msgid "Go to a specific date"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:19
-#, fuzzy
-msgid "Go to today"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:20
-msgid "Month"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:21
-#, fuzzy
-msgid "New Appointment"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:22 ui/evolution-tasks.xml.h:10
-#, fuzzy
-msgid "New Task"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:24
-#, fuzzy
-msgid "Previews the calendar to be printed"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:25 ui/evolution-comp-editor.xml.h:9
-msgid "Print Pre_view"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:26
-#, fuzzy
-msgid "Print this calendar"
-msgstr "_ "
-
-#: ui/evolution-calendar.xml.h:27
-msgid "Publish Free/Busy information for this calendar"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:28
-#, fuzzy
-msgid "Show one day"
-msgstr " 1 "
-
-#: ui/evolution-calendar.xml.h:29
-#, fuzzy
-msgid "Show one month"
-msgstr " 1 "
-
-#: ui/evolution-calendar.xml.h:30
-#, fuzzy
-msgid "Show one week"
-msgstr " 1 "
-
-#: ui/evolution-calendar.xml.h:31
-msgid "Show the working week"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:32
-msgid "Week"
-msgstr ""
-
-#: ui/evolution-calendar.xml.h:35
-#, fuzzy
-msgid "_Appointment..."
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:36
-#, fuzzy
-msgid "_Calendar Settings..."
-msgstr "..."
-
-#: ui/evolution-calendar.xml.h:42
-#, fuzzy
-msgid "_Publish Free/Busy Information"
-msgstr " "
-
-#: ui/evolution-calendar.xml.h:43
-#, fuzzy
-msgid "_Task..."
-msgstr "_ ..."
-
-#: ui/evolution-comp-editor.xml.h:2 ui/evolution-contact-editor.xml.h:1
-#: ui/evolution-contact-list-editor.xml.h:1
-#: ui/evolution-mail-messagedisplay.xml.h:1
-#: ui/evolution-message-composer.xml.h:3 ui/evolution-signature-editor.xml.h:1
-#: ui/evolution.xml.h:4
-msgid "Close"
-msgstr ""
-
-#: ui/evolution-comp-editor.xml.h:3
-#, fuzzy
-msgid "Close this item"
-msgstr " "
-
-#: ui/evolution-comp-editor.xml.h:5 ui/evolution-contact-editor.xml.h:3
-msgid "Delete this item"
-msgstr ""
-
-#: ui/evolution-comp-editor.xml.h:6 ui/evolution-mail-messagedisplay.xml.h:3
-#: ui/evolution.xml.h:16
-msgid "Main toolbar"
-msgstr ""
-
-#: ui/evolution-comp-editor.xml.h:7
-#, fuzzy
-msgid "Preview the printed item"
-msgstr " "
-
-#: ui/evolution-comp-editor.xml.h:10 ui/evolution-contact-editor.xml.h:6
-msgid "Print this item"
-msgstr ""
-
-#: ui/evolution-comp-editor.xml.h:11
-msgid "Print..."
-msgstr "..."
-
-#: ui/evolution-comp-editor.xml.h:12 ui/evolution-contact-list-editor.xml.h:5
-#: ui/evolution-message-composer.xml.h:19
-#: ui/evolution-signature-editor.xml.h:3 widgets/misc/e-filter-bar.c:245
-msgid "Save"
-msgstr ""
-
-#: ui/evolution-comp-editor.xml.h:14 ui/evolution-contact-editor.xml.h:8
-msgid "Save and Close"
-msgstr " "
-
-#: ui/evolution-comp-editor.xml.h:15
-msgid "Save the item and close the dialog box"
-msgstr ""
-
-#: ui/evolution-comp-editor.xml.h:16
-#, fuzzy
-msgid "Save this item to disk"
-msgstr " %s"
-
-#: ui/evolution-comp-editor.xml.h:18 ui/evolution-contact-editor.xml.h:12
-#: ui/evolution-contact-list-editor.xml.h:11
-#: ui/evolution-mail-messagedisplay.xml.h:7
-#: ui/evolution-message-composer.xml.h:48
-#: ui/evolution-signature-editor.xml.h:7 ui/evolution-subscribe.xml.h:11
-#: ui/evolution.xml.h:36
-msgid "_File"
-msgstr "_"
-
-#: ui/evolution-contact-editor.xml.h:5
-msgid "Print En_velope..."
-msgstr ""
-
-#: ui/evolution-contact-editor.xml.h:7
-#: ui/evolution-contact-list-editor.xml.h:6
-#: ui/evolution-message-composer.xml.h:21
-msgid "Save _As..."
-msgstr " _..."
-
-#: ui/evolution-contact-editor.xml.h:9
-msgid "Save the contact and close the dialog box"
-msgstr ""
-
-#: ui/evolution-contact-editor.xml.h:15
-#: ui/evolution-contact-list-editor.xml.h:12
-#: ui/evolution-message-composer.xml.h:53
-#: ui/evolution-signature-editor.xml.h:10
-msgid "_Save"
-msgstr "_"
-
-#: ui/evolution-contact-list-editor.xml.h:3
-#, fuzzy
-msgid "Delete this list"
-msgstr " "
-
-#: ui/evolution-contact-list-editor.xml.h:4
-msgid "Delete..."
-msgstr "..."
-
-#: ui/evolution-contact-list-editor.xml.h:7
-msgid "Save the list and close the dialog box"
-msgstr ""
-
-#: ui/evolution-contact-list-editor.xml.h:8
-#, fuzzy
-msgid "Se_nd list to other..."
-msgstr " ..."
-
-#: ui/evolution-contact-list-editor.xml.h:9
-#, fuzzy
-msgid "Send _message to list..."
-msgstr " ..."
-
-#: ui/evolution-event-editor.xml.h:1
-#, fuzzy
-msgid "Cancel Mee_ting"
-msgstr " "
-
-#: ui/evolution-event-editor.xml.h:2
-msgid "Cancel the meeting for this item"
-msgstr ""
-
-#: ui/evolution-event-editor.xml.h:3 ui/evolution-task-editor.xml.h:5
-#, fuzzy
-msgid "Forward as i_Calendar"
-msgstr " "
-
-#: ui/evolution-event-editor.xml.h:4 ui/evolution-task-editor.xml.h:6
-#, fuzzy
-msgid "Forward this item via email"
-msgstr " "
-
-#: ui/evolution-event-editor.xml.h:5
-msgid "Obtain the latest meeting information"
-msgstr ""
-
-#: ui/evolution-event-editor.xml.h:6
-#, fuzzy
-msgid "Re_fresh Meeting"
-msgstr " "
-
-#: ui/evolution-event-editor.xml.h:7
-msgid "Schedule _Meeting"
-msgstr ""
-
-#: ui/evolution-event-editor.xml.h:8
-msgid "Schedule a meeting for this item"
-msgstr ""
-
-#: ui/evolution-executive-summary.xml.h:1
-#, fuzzy
-msgid "Customise My Evolution"
-msgstr " Evolution..."
-
-#: ui/evolution-mail-global.xml.h:1
-#, fuzzy
-msgid "Cancel"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:2
-#, fuzzy
-msgid "Cancel the current mail operation"
-msgstr " "
-
-#: ui/evolution-mail-global.xml.h:3
-#, fuzzy
-msgid "Compose _New Message"
-msgstr " "
-
-#: ui/evolution-mail-global.xml.h:4
-msgid "Create or edit mail accounts and other preferences"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:5
-msgid "Create or edit rules for filtering new mail"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:6
-msgid "Create or edit virtual folder definitions"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:7
-msgid "Empty _Trash"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:8
-msgid "Forget _Passwords"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:9
-msgid "Forget remembered passwords so you will be prompted for them again"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:10
-#, fuzzy
-msgid "New Message"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:11
-msgid "Open a window for composing a mail message"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:12
-msgid "Permanently remove all deleted messages from all folders"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:13
-#, fuzzy
-msgid "Send / Receive"
-msgstr " "
-
-#: ui/evolution-mail-global.xml.h:14
-msgid "Send queued mail and retrieve new mail"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:15
-msgid "Show message preview window"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:16
-msgid "Subscribe or unsubscribe to folders on remote servers"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:17
-#, fuzzy
-msgid "Virtual Folder _Editor..."
-msgstr " "
-
-#: ui/evolution-mail-global.xml.h:19
-#, fuzzy
-msgid "_Filters..."
-msgstr "Mail _..."
-
-#: ui/evolution-mail-global.xml.h:20
-#, fuzzy
-msgid "_Mail Message"
-msgstr "_Mail "
-
-#: ui/evolution-mail-global.xml.h:21
-#, fuzzy
-msgid "_Mail Settings..."
-msgstr "..."
-
-#: ui/evolution-mail-global.xml.h:22
-#, fuzzy
-msgid "_Preview Pane"
-msgstr ""
-
-#: ui/evolution-mail-global.xml.h:23
-#, fuzzy
-msgid "_Send / Receive"
-msgstr " "
-
-#: ui/evolution-mail-global.xml.h:24
-#, fuzzy
-msgid "_Subscribe to Folders..."
-msgstr " ..."
-
-#: ui/evolution-mail-list.xml.h:1
-msgid "Change the properties of this folder"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:2
-#, fuzzy
-msgid "Copy selected messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:3
-#, fuzzy
-msgid "Cu_t"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:4
-#, fuzzy
-msgid "Cut selected messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:5
-msgid "Hide S_elected Messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:6
-msgid "Hide _Deleted Messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:7
-#, fuzzy
-msgid "Hide _Read Messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:8
-msgid ""
-"Hide deleted messages rather than displaying them with a line through them"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:9
-#, fuzzy
-msgid "Mark All as R_ead"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:10
-#, fuzzy
-msgid "Mark all visible messages as read"
-msgstr " \"\" :"
-
-#: ui/evolution-mail-list.xml.h:11
-#, fuzzy
-msgid "Paste message in the clipboard"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:12
-msgid "Permanently remove all deleted messages from this folder"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:13 ui/evolution-subscribe.xml.h:6
-msgid "Select _All"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:14
-#, fuzzy
-msgid "Select _Thread"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:15
-msgid "Select all and only the messages that are not currently selected"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:16
-msgid "Select all messages in the same thread as the selected message"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:17
-#, fuzzy
-msgid "Select all visible messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:18
-#, fuzzy
-msgid "Sh_ow Hidden Messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:19
-msgid "Show messages that have been temporarily hidden"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:20
-msgid "Temporarily hide all messages that have already been read"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:21
-#, fuzzy
-msgid "Temporarily hide the selected messages"
-msgstr " "
-
-#: ui/evolution-mail-list.xml.h:22
-msgid "Threaded Message list"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:26
-msgid "_Expunge"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:27 ui/evolution.xml.h:37
-msgid "_Folder"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:28 ui/evolution-subscribe.xml.h:12
-msgid "_Invert Selection"
-msgstr ""
-
-#: ui/evolution-mail-list.xml.h:30
-msgid "_Properties..."
-msgstr "..."
-
-#: ui/evolution-mail-list.xml.h:31
-#, fuzzy
-msgid "_Threaded Message List"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:1
-#, fuzzy
-msgid "Apply filter rules to the selected messages"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:2
-#, fuzzy
-msgid "Compose a reply to all of the recipients of the selected message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:3
-msgid "Compose a reply to the mailing list of the selected message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:4
-#, fuzzy
-msgid "Compose a reply to the sender of the selected message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:6
-#, fuzzy
-msgid "Copy selected messages to another folder"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:7
-#, fuzzy
-msgid "Create _Virtual Folder From Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:8
-msgid "Create a rule to filter messages from this sender"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:9
-msgid "Create a rule to filter messages to these recipients"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:10
-msgid "Create a rule to filter messages to this mailing list"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:11
-msgid "Create a rule to filter messages with this subject"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:12
-msgid "Create a virtual folder for these recipients"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:13
-msgid "Create a virtual folder for this mailing list"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:14
-msgid "Create a virtual folder for this sender"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:15
-msgid "Create a virtual folder for this subject"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:17
-#, fuzzy
-msgid "Display the next important message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:18
-#, fuzzy
-msgid "Display the next message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:19
-#, fuzzy
-msgid "Display the next unread message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:20
-msgid "Display the next unread thread"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:21
-msgid "Display the previous important message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:22
-#, fuzzy
-msgid "Display the previous message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:23
-msgid "Display the previous unread message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:24
-#, fuzzy
-msgid "Filter on Mailing _List..."
-msgstr " Mailing List"
-
-#: ui/evolution-mail-message.xml.h:25
-#, fuzzy
-msgid "Filter on Se_nder..."
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:26
-#, fuzzy
-msgid "Filter on _Recipients..."
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:27
-#, fuzzy
-msgid "Filter on _Subject..."
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:28
-msgid "Force images in HTML mail to be loaded"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:29
-msgid "Forward"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:30
-#, fuzzy
-msgid "Forward As"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:31
-msgid "Forward _Attached"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:32
-#, fuzzy
-msgid "Forward _Inline"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:33
-#, fuzzy
-msgid "Forward _Quoted"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:34
-msgid "Forward the selected message in the body of a new message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:35
-msgid "Forward the selected message quoted like a reply"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:36
-#, fuzzy
-msgid "Forward the selected message to someone"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:37
-msgid "Forward the selected message to someone as an attachment"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:39
-#, fuzzy
-msgid "Load _Images"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:41
-#, fuzzy
-msgid "Mark as I_mportant"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:43
-#, fuzzy
-msgid "Mark as Unimp_ortant"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:44
-#, fuzzy
-msgid "Mark the selected messages as having been read"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:45
-#, fuzzy
-msgid "Mark the selected messages as important"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:46
-msgid "Mark the selected messages as not having been read"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:47
-#, fuzzy
-msgid "Mark the selected messages as unimportant"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:48
-#, fuzzy
-msgid "Mark the selected messages for deletion"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:49
-msgid "Move"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:50
-#, fuzzy
-msgid "Move selected messages to another folder"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:51
-msgid "Next"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:52
-#, fuzzy
-msgid "Next Important Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:53
-#, fuzzy
-msgid "Next Message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:54
-msgid "Next Thread"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:55
-#, fuzzy
-msgid "Next Unread Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:56
-#, fuzzy
-msgid "Open the selected message in a new window"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:57
-msgid "Open the selected message in the composer to re-send it"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:58
-#, fuzzy
-msgid "Preview the message to be printed"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:59
-msgid "Previous"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:60
-#, fuzzy
-msgid "Previous Important Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:61
-#, fuzzy
-msgid "Previous Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:62
-#, fuzzy
-msgid "Previous Unread Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:65
-#, fuzzy
-msgid "Print this message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:66
-msgid "Reply"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:67
-msgid "Reply to All"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:70
-#, fuzzy
-msgid "S_earch Message..."
-msgstr " ..."
-
-#: ui/evolution-mail-message.xml.h:71
-#, fuzzy
-msgid "Save the message as a text file"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:72
-msgid "Search for text in the body of the displayed message"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:73
-msgid "Setup the page settings for your current printer"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:74
-msgid "Show Email _Source"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:75
-#, fuzzy
-msgid "Show Full _Headers"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:76
-msgid "Show message in the normal style"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:77
-#, fuzzy
-msgid "Show message with all email headers"
-msgstr " uid %s"
-
-#: ui/evolution-mail-message.xml.h:78
-#, fuzzy
-msgid "Show the raw email source of the message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:79
-#, fuzzy
-msgid "Un-delete the selected messages"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:80
-#, fuzzy
-msgid "VFolder on Mailing _List..."
-msgstr " Mailing List"
-
-#: ui/evolution-mail-message.xml.h:81
-#, fuzzy
-msgid "VFolder on Se_nder..."
-msgstr "VFolder "
-
-#: ui/evolution-mail-message.xml.h:82
-#, fuzzy
-msgid "VFolder on _Recipients..."
-msgstr "VFolder "
-
-#: ui/evolution-mail-message.xml.h:83
-#, fuzzy
-msgid "VFolder on _Subject..."
-msgstr "VFolder "
-
-#: ui/evolution-mail-message.xml.h:85
-msgid "_Apply Filters"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:86
-#, fuzzy
-msgid "_Copy to Folder"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:87
-#, fuzzy
-msgid "_Create Filter From Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:90
-#, fuzzy
-msgid "_Forward Message"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:91
-#, fuzzy
-msgid "_Message Display"
-msgstr "_"
-
-#: ui/evolution-mail-message.xml.h:92
-#, fuzzy
-msgid "_Move to Folder"
-msgstr " "
-
-#: ui/evolution-mail-message.xml.h:93
-#, fuzzy
-msgid "_Normal Display"
-msgstr ""
-
-#: ui/evolution-mail-message.xml.h:94
-#, fuzzy
-msgid "_Open Message"
-msgstr "_"
-
-#: ui/evolution-mail-message.xml.h:98 ui/evolution.xml.h:49
-#: ui/my-evolution.xml.h:9
-msgid "_Tools"
-msgstr "_"
-
-#: ui/evolution-mail-messagedisplay.xml.h:2 ui/evolution.xml.h:5
-msgid "Close this window"
-msgstr " "
-
-#: ui/evolution-mail-messagedisplay.xml.h:5
-#: ui/evolution-message-composer.xml.h:45
-#: ui/evolution-signature-editor.xml.h:5 ui/evolution-subscribe.xml.h:9
-#: ui/evolution.xml.h:33
-msgid "_Close"
-msgstr ""
-
-#: ui/evolution-mail-messagedisplay.xml.h:8
-#: ui/evolution-message-composer.xml.h:55 ui/evolution.xml.h:50
-msgid "_View"
-msgstr "_"
-
-#: ui/evolution-message-composer.xml.h:1
-msgid "Attach"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:4 ui/evolution-signature-editor.xml.h:2
-msgid "Close the current file"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:5
-#, fuzzy
-msgid "Delete all but signature"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:6
-msgid "Encrypt this message with PGP"
-msgstr " PGP"
-
-#: ui/evolution-message-composer.xml.h:7
-msgid "Encrypt this message with your S/MIME Encryption Cetificate"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:8
-msgid "F_ormat"
-msgstr "_"
-
-#: ui/evolution-message-composer.xml.h:9
-msgid "HTML"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:10
-#, fuzzy
-msgid "Inline Text _File..."
-msgstr " ..."
-
-#: ui/evolution-message-composer.xml.h:11
-msgid "Insert a file as text into the message"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:12
-msgid "Insert text file..."
-msgstr " ..."
-
-#: ui/evolution-message-composer.xml.h:14
-msgid "Open a file"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:15
-msgid "PGP Encrypt"
-msgstr "PGP "
-
-#: ui/evolution-message-composer.xml.h:16
-msgid "PGP Sign"
-msgstr "PGP "
-
-#: ui/evolution-message-composer.xml.h:17
-#, fuzzy
-msgid "S/MIME Encrypt"
-msgstr "PGP "
-
-#: ui/evolution-message-composer.xml.h:18
-msgid "S/MIME Sign"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:20
-msgid "Save As"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:22
-msgid "Save _Draft"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:23
-msgid "Save in folder..."
-msgstr " ..."
-
-#: ui/evolution-message-composer.xml.h:24
-#: ui/evolution-signature-editor.xml.h:4
-msgid "Save the current file"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:25
-msgid "Save the current file with a different name"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:26
-msgid "Save the message in a specified folder"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:27
-msgid "Send"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:28
-msgid "Send _Later"
-msgstr " -"
-
-#: ui/evolution-message-composer.xml.h:29
-msgid "Send _later"
-msgstr " -"
-
-#: ui/evolution-message-composer.xml.h:30
-msgid "Send the mail in HTML format"
-msgstr " mail- HTML "
-
-#: ui/evolution-message-composer.xml.h:31
-msgid "Send the message later"
-msgstr " -"
-
-#: ui/evolution-message-composer.xml.h:32
-msgid "Send this message now"
-msgstr " "
-
-#: ui/evolution-message-composer.xml.h:33
-msgid "Show / hide attachments"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:34
-msgid "Show _attachments"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:35
-msgid "Show attachments"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:36
-msgid "Sign this message with your PGP key"
-msgstr " PGP "
-
-#: ui/evolution-message-composer.xml.h:37
-#, fuzzy
-msgid "Sign this message with your S/MIME Signature Certificate"
-msgstr " PGP "
-
-#: ui/evolution-message-composer.xml.h:38
-msgid "Toggles whether the BCC field is displayed"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:39
-msgid "Toggles whether the CC field is displayed"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:40
-msgid "Toggles whether the From chooser is displayed"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:41
-msgid "Toggles whether the Reply-To field is displayed"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:42
-#, fuzzy
-msgid "_Attachment..."
-msgstr "_..."
-
-#: ui/evolution-message-composer.xml.h:43
-msgid "_Bcc Field"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:44
-msgid "_Cc Field"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:46
-#, fuzzy
-msgid "_Delete all"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:49
-msgid "_From Field"
-msgstr ""
-
-#: ui/evolution-message-composer.xml.h:50
-#: ui/evolution-signature-editor.xml.h:9
-#, fuzzy
-msgid "_Insert"
-msgstr "_"
-
-#: ui/evolution-message-composer.xml.h:51
-msgid "_Open..."
-msgstr "_..."
-
-#: ui/evolution-message-composer.xml.h:52
-#, fuzzy
-msgid "_Reply-To Field"
-msgstr "-:"
-
-#: ui/evolution-message-composer.xml.h:54
-msgid "_Security"
-msgstr "_"
-
-#: ui/evolution-signature-editor.xml.h:8 ui/evolution.xml.h:40
-msgid "_Help"
-msgstr "_"
-
-#: ui/evolution-subscribe.xml.h:1
-msgid "Add folder to your list of subscribed folders"
-msgstr ""
-
-#: ui/evolution-subscribe.xml.h:2
-msgid "F_older"
-msgstr ""
-
-#: ui/evolution-subscribe.xml.h:3
-msgid "Refresh List"
-msgstr ""
-
-#: ui/evolution-subscribe.xml.h:4
-msgid "Refresh List of Folders"
-msgstr ""
-
-#: ui/evolution-subscribe.xml.h:5
-msgid "Remove folder from your list of subscribed folders"
-msgstr ""
-
-#: ui/evolution-subscribe.xml.h:7
-msgid "Subscribe"
-msgstr ""
-
-#: ui/evolution-subscribe.xml.h:8
-msgid "Unsubscribe"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:1
-msgid "Assign Task"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:2
-msgid "Assign this task to others"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:3
-#, fuzzy
-msgid "Cancel Task"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:4
-#, fuzzy
-msgid "Cancel this task"
-msgstr " "
-
-#: ui/evolution-task-editor.xml.h:7
-msgid "Obtain the latest task information"
-msgstr ""
-
-#: ui/evolution-task-editor.xml.h:8
-msgid "Re_fresh Task"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:2
-msgid "Configure the task view's settings"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:4
-msgid "Copy selected task"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:7
-msgid "Cut selected task"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:9
-msgid "Delete selected tasks"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:12
-msgid "Paste task from the clipboard"
-msgstr ""
-
-#: ui/evolution-tasks.xml.h:13
-#, fuzzy
-msgid "Tasks Settings..."
-msgstr "..."
-
-#: ui/evolution-tasks.xml.h:18
-#, fuzzy
-msgid "_Task"
-msgstr ""
-
-#: ui/evolution.xml.h:1
-#, fuzzy
-msgid "About Ximian Evolution..."
-msgstr " Evolution..."
-
-#: ui/evolution.xml.h:2
-msgid "Add to _Shortcut Bar"
-msgstr ""
-
-#: ui/evolution.xml.h:3
-#, fuzzy
-msgid "Change the name of this folder"
-msgstr " %s"
-
-#: ui/evolution.xml.h:6
-#, fuzzy
-msgid "Copy this folder"
-msgstr " "
-
-#: ui/evolution.xml.h:7
-#, fuzzy
-msgid "Create _New Folder..."
-msgstr " "
-
-#: ui/evolution.xml.h:8
-msgid "Create a link to this folder in the shortcut bar"
-msgstr ""
-
-#: ui/evolution.xml.h:9
-#, fuzzy
-msgid "Create a new folder"
-msgstr " "
-
-#: ui/evolution.xml.h:10
-#, fuzzy
-msgid "Delete this folder"
-msgstr " "
-
-#: ui/evolution.xml.h:11
-msgid "Display a different folder"
-msgstr ""
-
-#: ui/evolution.xml.h:12
-msgid "E_xit"
-msgstr ""
-
-#: ui/evolution.xml.h:13
-msgid "Evolution _Window"
-msgstr ""
-
-#: ui/evolution.xml.h:14
-msgid "Exit the program"
-msgstr " "
-
-#: ui/evolution.xml.h:15
-msgid "Import data from other programs"
-msgstr ""
-
-#: ui/evolution.xml.h:17
-#, fuzzy
-msgid "Move this folder to another place"
-msgstr " %s "
-
-#: ui/evolution.xml.h:18
-#, fuzzy
-msgid "Open in New Window"
-msgstr "_ "
-
-#: ui/evolution.xml.h:20
-msgid "Open this folder in an other window"
-msgstr ""
-
-#: ui/evolution.xml.h:21
-#, fuzzy
-msgid "Show information about Ximian Evolution"
-msgstr " Evolution"
-
-#: ui/evolution.xml.h:22
-msgid "Submit Bug Report"
-msgstr " "
-
-#: ui/evolution.xml.h:23
-msgid "Submit _Bug Report"
-msgstr " _ "
-
-#: ui/evolution.xml.h:24
-#, fuzzy
-msgid "Submit a bug report using Bug Buddy"
-msgstr " Bug Buddy."
-
-#: ui/evolution.xml.h:25
-#, fuzzy
-msgid "Toggle"
-msgstr ""
-
-#: ui/evolution.xml.h:26
-msgid "Toggle whether to show the folder bar"
-msgstr ""
-
-#: ui/evolution.xml.h:27
-msgid "Toggle whether to show the shortcut bar"
-msgstr ""
-
-#: ui/evolution.xml.h:28
-msgid "Toggle whether we are working offline."
-msgstr ""
-
-#: ui/evolution.xml.h:29
-msgid "View the selected folder"
-msgstr " "
-
-#: ui/evolution.xml.h:31
-msgid "Ximian Evolution _FAQ"
-msgstr ""
-
-#: ui/evolution.xml.h:32
-#, fuzzy
-msgid "_About Ximian Evolution..."
-msgstr " Evolution..."
-
-#: ui/evolution.xml.h:34
-#, fuzzy
-msgid "_Copy..."
-msgstr ""
-
-#: ui/evolution.xml.h:38
-#, fuzzy
-msgid "_Folder Bar"
-msgstr ""
-
-#: ui/evolution.xml.h:39
-msgid "_Go to Folder..."
-msgstr " ..."
-
-#: ui/evolution.xml.h:41
-#, fuzzy
-msgid "_Import..."
-msgstr " ..."
-
-#: ui/evolution.xml.h:42
-#, fuzzy
-msgid "_Move..."
-msgstr ""
-
-#: ui/evolution.xml.h:43
-msgid "_New"
-msgstr "_"
-
-#: ui/evolution.xml.h:44
-#, fuzzy
-msgid "_New Folder"
-msgstr " VFolder"
-
-#: ui/evolution.xml.h:45
-#, fuzzy
-msgid "_Pilot Settings..."
-msgstr "..."
-
-#: ui/evolution.xml.h:46
-#, fuzzy
-msgid "_Rename..."
-msgstr "_..."
-
-#: ui/evolution.xml.h:47
-msgid "_Shortcut"
-msgstr ""
-
-#: ui/evolution.xml.h:48
-msgid "_Shortcut Bar"
-msgstr ""
-
-#: ui/evolution.xml.h:51
-msgid "_Work Offline"
-msgstr ""
-
-#: ui/my-evolution.xml.h:1
-msgid "Change the settings for the summary"
-msgstr ""
-
-#: ui/my-evolution.xml.h:4
-#, fuzzy
-msgid "Print summary"
-msgstr ""
-
-#: ui/my-evolution.xml.h:5
-#, fuzzy
-msgid "Reload"
-msgstr ""
-
-#: ui/my-evolution.xml.h:6
-msgid "Reload the view"
-msgstr ""
-
-#: ui/my-evolution.xml.h:8
-#, fuzzy
-msgid "_Summary Settings..."
-msgstr "..."
-
-#: views/addressbook/galview.xml.h:1
-#, fuzzy
-msgid "Address Cards"
-msgstr " "
-
-#: views/addressbook/galview.xml.h:2
-#, fuzzy
-msgid "By Company"
-msgstr ""
-
-#: views/addressbook/galview.xml.h:3
-#, fuzzy
-msgid "Phone List"
-msgstr " "
-
-#: views/mail/galview.xml.h:1
-#, fuzzy
-msgid "By Sender"
-msgstr ":"
-
-#: views/mail/galview.xml.h:2
-#, fuzzy
-msgid "By Status"
-msgstr ""
-
-#: views/mail/galview.xml.h:3
-#, fuzzy
-msgid "By Subject"
-msgstr ""
-
-#: views/mail/galview.xml.h:4
-#, fuzzy
-msgid "Messages"
-msgstr ""
-
-#: views/tasks/galview.xml.h:2
-#, fuzzy
-msgid "With Category"
-msgstr ":"
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:1
-#, fuzzy
-msgid "Select a Time Zone"
-msgstr " "
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:2
-#, fuzzy
-msgid "Selection:"
-msgstr ":"
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:3
-#, fuzzy
-msgid "Time Zones"
-msgstr ""
-"\n"
-" : "
-
-#: widgets/e-timezone-dialog/e-timezone-dialog.glade.h:4
-msgid ""
-"Use the left mouse button to zoom in on an area of the map and select a time "
-"zone.\n"
-" Use the right mouse button to zoom out."
-msgstr ""
-
-#: widgets/menus/gal-view-menus.c:218
-#, fuzzy
-msgid "_Current View"
-msgstr " "
-
-#: widgets/menus/gal-view-menus.c:260
-msgid "Define Views"
-msgstr ""
-
-#. Translators: These are the first characters of each day of the
-#. week, 'M' for 'Monday', 'T' for Tuesday etc.
-#: widgets/misc/e-calendar-item.c:428
-msgid "MTWTFSS"
-msgstr ""
-
-#. This is a strftime() format. %B = Month name, %Y = Year.
-#: widgets/misc/e-calendar-item.c:1071
-msgid "%B %Y"
-msgstr ""
-
-#: widgets/misc/e-cell-date-edit.c:224 widgets/misc/e-dateedit.c:439
-msgid "Now"
-msgstr ""
-
-#: widgets/misc/e-cell-date-edit.c:232 widgets/misc/e-dateedit.c:445
-msgid "Today"
-msgstr ""
-
-#: widgets/misc/e-cell-date-edit.c:732
-#, fuzzy, c-format
-msgid "The time must be in the format: %s"
-msgstr ""
-" : \n"
-"\n"
-"%s"
-
-#: widgets/misc/e-charset-picker.c:59
-msgid "Baltic"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:60
-msgid "Central European"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:61
-msgid "Chinese"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:62
-msgid "Cyrillic"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:63
-#, fuzzy
-msgid "Greek"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:64
-msgid "Japanese"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:65
-msgid "Korean"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:66
-msgid "Turkish"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:67
-msgid "Unicode"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:68
-msgid "Western European"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:85
-#, fuzzy
-msgid "Traditional"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:86 widgets/misc/e-charset-picker.c:87
-msgid "Simplified"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:91
-msgid "Ukrainian"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:102
-msgid "New"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:160
-#, fuzzy, c-format
-msgid "Unknown character set: %s"
-msgstr " : %s"
-
-#: widgets/misc/e-charset-picker.c:202
-msgid "Enter the character set to use"
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:277
-#, fuzzy
-msgid "Other..."
-msgstr ""
-
-#: widgets/misc/e-charset-picker.c:394
-msgid "Character Encoding"
-msgstr ""
-
-#: widgets/misc/e-clipped-label.c:112
-msgid "..."
-msgstr ""
-
-#: widgets/misc/e-filter-bar.c:158
-#, fuzzy
-msgid "Search Editor"
-msgstr " "
-
-#: widgets/misc/e-filter-bar.c:174
-#, fuzzy
-msgid "Save Search"
-msgstr ""
-
-#: widgets/misc/e-filter-bar.h:94
-#, fuzzy
-msgid "Add to Saved Searches"
-msgstr " "
-
-#: widgets/misc/e-filter-bar.h:95
-msgid "Clear"
-msgstr ""
-
-#: widgets/misc/e-filter-bar.h:102
-msgid "Show All"
-msgstr " "
-
-#: widgets/misc/e-messagebox.c:152
-msgid "Information"
-msgstr ""
-
-#: widgets/misc/e-messagebox.c:166
-msgid "Error"
-msgstr ""
-
-#: widgets/misc/e-messagebox.c:173
-msgid "Question"
-msgstr ""
-
-#: widgets/misc/e-messagebox.c:180
-msgid "Message"
-msgstr ""
-
-#. Add the "Don't show this message again." checkbox
-#: widgets/misc/e-messagebox.c:224
-msgid "Don't show this message again."
-msgstr " ."
-
-#: widgets/misc/e-search-bar.c:334
-msgid "Sear_ch"
-msgstr ""
-
-#: widgets/misc/e-search-bar.c:460
-#, fuzzy
-msgid "Find Now"
-msgstr ""
-
-#: wombat/GNOME_Evolution_Wombat.oaf.in.h:1
-#, fuzzy
-msgid "The Personal Addressbook Server"
-msgstr " "
-
-#: wombat/GNOME_Evolution_Wombat.oaf.in.h:2
-msgid "The Personal Calendar Server; calendar factory"
-msgstr ""
-
-#: wombat/wombat.c:176
-msgid "setup_vfs(): could not initialize GNOME-VFS"
-msgstr "setup_vfs(): GNOME-VFS"
-
-#: wombat/wombat.c:188
-msgid "init_corba(): could not initialize GNOME"
-msgstr "init_corba(): GNOME"
-
-#: wombat/wombat.c:201
-msgid "init_bonobo(): could not initialize Bonobo"
-msgstr "init_bonobo(): Bonobo"
-
-#, fuzzy
-#~ msgid "_Calendar Information:"
-#~ msgstr " "
-
-#, fuzzy
-#~ msgid "before start of appointment"
-#~ msgstr " "
-
-#, fuzzy
-#~ msgid "after start of appointment"
-#~ msgstr " "
-
-#, fuzzy
-#~ msgid "before end of appointment"
-#~ msgstr " "
-
-#, fuzzy
-#~ msgid "Each account must have a different name."
-#~ msgstr " "
-
-#, fuzzy
-#~ msgid "Delete folder '%s'"
-#~ msgstr " "
-
-#, fuzzy
-#~ msgid "Rename"
-#~ msgstr " :"
-
-#, fuzzy
-#~ msgid "_Import File..."
-#~ msgstr " ..."
-
-#~ msgid "_Company:"
-#~ msgstr ":"
-
-#~ msgid "USA"
-#~ msgstr ""
-
-#~ msgid "Unknown addressbook type"
-#~ msgstr " "
-
-#~ msgid "None (anonymous mode)"
-#~ msgstr " ( )"
-
-#~ msgid "SASL"
-#~ msgstr "SASL"
-
-#~ msgid "Subtree"
-#~ msgstr "-"
-
-#~ msgid "Unknown scope type"
-#~ msgstr " "
-
-#~ msgid "Root DN:"
-#~ msgstr " DN:"
-
-#~ msgid "Create path if it doesn't exist."
-#~ msgstr " ."
-
-#~ msgid ""
-#~ "Select the kind of addressbook you have, and enter the relevant "
-#~ "information about it."
-#~ msgstr ""
-#~ " , , "
-#~ " ."
-
-#~ msgid "URI"
-#~ msgstr "URI"
-
-#~ msgid "Find..."
-#~ msgstr "..."
-
-#~ msgid "Select name from:"
-#~ msgstr " :"
-
-#~ msgid "123"
-#~ msgstr "123"
-
-#~ msgid "Open calendar"
-#~ msgstr " "
-
-#~ msgid "Save calendar"
-#~ msgstr " "
-
-#~ msgid "Transparent"
-#~ msgstr ""
-
-#~ msgid "Opaque"
-#~ msgstr ""
-
-#~ msgid "The priority must be between 1 and 9, inclusive"
-#~ msgstr " 1 9, "
-
-#~ msgid "<b>Error loading calendar</b>"
-#~ msgstr "<b> </b>"
-
-#~ msgid "<b>Error loading calendar:<br>Method not supported"
-#~ msgstr "<b> :<br> "
-
-#~ msgid "Alarms timeout after"
-#~ msgstr " "
-
-#~ msgid "Beep when alarm windows appear."
-#~ msgstr " "
-
-#~ msgid "Calendar Preferences"
-#~ msgstr " "
-
-#~ msgid "Date navigator options"
-#~ msgstr " "
-
-#~ msgid "Defaults"
-#~ msgstr " "
-
-#~ msgid "Enable snoozing for"
-#~ msgstr " "
-
-#~ msgid "Highlight"
-#~ msgstr ""
-
-#~ msgid "Items Due Today"
-#~ msgstr ", "
-
-#~ msgid "Items Not Yet Due"
-#~ msgstr " "
-
-#~ msgid "Items Not Yet Due:"
-#~ msgstr " :"
-
-#~ msgid "Overdue Items"
-#~ msgstr " "
-
-#~ msgid "Remind me of all appointments"
-#~ msgstr " "
-
-#~ msgid "Time Until Due"
-#~ msgstr " "
-
-#~ msgid "Visual Alarms"
-#~ msgstr " "
-
-#~ msgid "minutes before they occur."
-#~ msgstr " ."
-
-#~ msgid "Transparency"
-#~ msgstr ""
-
-#~ msgid "There was an error loading the calendar file."
-#~ msgstr " ."
-
-#~ msgid "I couldn't open your calendar file!\n"
-#~ msgstr " !\n"
-
-#~ msgid "I couldn't load your calendar file!\n"
-#~ msgstr " !\n"
-
-#~ msgid "Component successfully deleted."
-#~ msgstr " "
-
-#~ msgid "All"
-#~ msgstr ""
-
-#~ msgid "No such host %s."
-#~ msgstr " %s."
-
-#~ msgid "That is not a regular file."
-#~ msgstr " ."
-
-#~ msgid "That file exists but is not readable."
-#~ msgstr " ."
-
-#~ msgid "Send an email to %s"
-#~ msgstr " email %s"
-
-#~ msgid "Close %s"
-#~ msgstr " %s"
-
-#~ msgid "Move %s to the right"
-#~ msgstr " %s "
-
-#~ msgid "Move %s into the previous row"
-#~ msgstr " %s "
-
-#~ msgid "Move %s into the next row"
-#~ msgstr " %s "
-
-#~ msgid ""
-#~ "Cannot open the HTML file:\n"
-#~ "%s"
-#~ msgstr ""
-#~ " HTML :\n"
-#~ "%s"
-
-#~ msgid "Remove criterion"
-#~ msgstr " "
-
-#~ msgid "Forward to Address"
-#~ msgstr " "
-
-#~ msgid "Add VFolder Rule"
-#~ msgstr " VFolder "
-
-#~ msgid "Edit VFolder Rule"
-#~ msgstr " VFolder "
-
-#~ msgid "Store search as vFolder"
-#~ msgstr " vFolder"
-
-#~ msgid "Move to Folder..."
-#~ msgstr " ..."
-
-#~ msgid "Copy to Folder..."
-#~ msgstr " ..."
-
-#~ msgid "Forwarded message:\n"
-#~ msgstr " :\n"
-
-#~ msgid "Incoming Mail Server"
-#~ msgstr " Mail "
-
-#~ msgid "Miscellaneous"
-#~ msgstr ""
-
-#~ msgid "Outgoing Mail Server"
-#~ msgstr " Mail "
-
-#~ msgid "Remember my password"
-#~ msgstr " "
-
-#~ msgid "Required"
-#~ msgstr ""
-
-#~ msgid "Save password"
-#~ msgstr " "
-
-#~ msgid "minutes."
-#~ msgstr "."
-
-#~ msgid "On %s, %s wrote:\n"
-#~ msgstr " %s, %s :\n"
-
-#~ msgid "Closing current folder"
-#~ msgstr " "
-
-#~ msgid "Appending \"%s\""
-#~ msgstr " \"%s\""
-
-#~ msgid "Moving messages from \"%s\" into \"%s\""
-#~ msgstr " \"%s\" \"%s\""
-
-#~ msgid "Copying messages from \"%s\" into \"%s\""
-#~ msgstr " \"%s\" \"%s\""
-
-#~ msgid "Move messages from \"%s\" into \"%s\""
-#~ msgstr " \"%s\" \"%s\""
-
-#~ msgid "Copy messages from \"%s\" into \"%s\""
-#~ msgstr " \"%s\" \"%s\""
-
-#~ msgid "%s message %d of %d (uid \"%s\")"
-#~ msgstr "%s %d %d (uid \"%s\")"
-
-#~ msgid "Load %s Folder for %s"
-#~ msgstr " %s %s"
-
-#~ msgid ""
-#~ "Error while `%s':\n"
-#~ "%s"
-#~ msgstr ""
-#~ " `%s':\n"
-#~ "%s"
-
-#~ msgid "[%s] (forwarded message)"
-#~ msgstr "[%s] ( )"
-
-#~ msgid "Forwarded message (no subject)"
-#~ msgstr " ( subject)"
-
-#~ msgid "<unknown>"
-#~ msgstr "<>"
-
-#~ msgid "Activate"
-#~ msgstr ""
-
-#~ msgid "Find a contact"
-#~ msgstr " "
-
-#~ msgid "View All"
-#~ msgstr " "
-
-#~ msgid "_Addressbook Configuration..."
-#~ msgstr " _ ..."
-
-#~ msgid "_Print Contacts..."
-#~ msgstr "_ ..."
-
-#~ msgid "5 Days"
-#~ msgstr "5 "
-
-#~ msgid "Ca_lendar"
-#~ msgstr "_"
-
-#~ msgid "Prev"
-#~ msgstr "."
-
-#~ msgid "Print this Calendar"
-#~ msgstr " "
-
-#~ msgid "Save calendar as something else"
-#~ msgstr " "
-
-#~ msgid "_Open Calendar"
-#~ msgstr "_ "
-
-#~ msgid "Help"
-#~ msgstr ""
-
-#~ msgid "About this application"
-#~ msgstr " "
-
-#~ msgid "About..."
-#~ msgstr "..."
-
-#~ msgid "C_lear"
-#~ msgstr ""
-
-#~ msgid "Dump XML"
-#~ msgstr " XML"
-
-#~ msgid "N_ext"
-#~ msgstr ""
-
-#~ msgid "Pre_vious"
-#~ msgstr ""
-
-#~ msgid "Print S_etup..."
-#~ msgstr " ..."
-
-#~ msgid "Select everything"
-#~ msgstr " "
-
-#~ msgid "_About..."
-#~ msgstr "..."
-
-#~ msgid "Mar_k As Read"
-#~ msgstr " "
-
-#~ msgid "Mark As U_nread"
-#~ msgstr " "
-
-#~ msgid "Print Preview of message..."
-#~ msgstr " ..."
-
-#~ msgid "Print message..."
-#~ msgstr " ..."
-
-#~ msgid "Reply to _Sender"
-#~ msgstr " "
-
-#~ msgid "_Configure Folder..."
-#~ msgstr " ..."
-
-#~ msgid "_Filter on Subject"
-#~ msgstr "_ "
-
-#~ msgid "_Mail Configuration..."
-#~ msgstr "_Mail ..."
-
-#~ msgid "_Print Message"
-#~ msgstr "_ "
-
-#~ msgid "_Save Message As..."
-#~ msgstr "_ ..."
-
-#~ msgid "_VFolder on Subject"
-#~ msgstr "_VFolder "
diff --git a/po/ca.po b/po/ca.po
deleted file mode 100644
index e965ee1b52..0000000000
--- a/po/ca.po
+++ /dev/null
@@ -1,17068 +0,0 @@
-# evolution translation to Catalan.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Softcatal <info@softcatala.org>, 2000.
-#
-# Traducci per Softcatal <linux@softcatala.org>
-# Traductor original: Vctor Nieto <vnie2025@alu-etsetb.upc.es>
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution 0.0.6\n"
-"POT-Creation-Date: 2001-10-01 19:06-0400\n"
-"PO-Revision-Date: 2000-11-01 00:40+0100\n"
-"Last-Translator: Quico Llach <tradgnome@softcatala.org>\n"
-"Language-Team: Catalan <linux@softcatala.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in.h:1
-msgid "Factory to import VCard files into Evolution."
-msgstr ""
-
-#: addressbook/backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.oaf.in.h:2
-msgid "Imports VCard files into Evolution."
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:58
-#: addressbook/gui/widgets/e-addressbook-view.c:868
-#, fuzzy
-msgid "File As"
-msgstr "Arxiva com:"
-
-#: addressbook/backend/ebook/e-card-simple.c:59
-msgid "Name"
-msgstr "Nom"
-
-#: addressbook/backend/ebook/e-card-simple.c:60
-#: addressbook/gui/widgets/e-addressbook-view.c:870
-#, fuzzy
-msgid "Email"
-msgstr "Adrea electrnica 2"
-
-#: addressbook/backend/ebook/e-card-simple.c:61
-#: addressbook/gui/contact-editor/e-contact-editor.c:1609
-msgid "Primary"
-msgstr "Primari"
-
-#: addressbook/backend/ebook/e-card-simple.c:61
-#, fuzzy
-msgid "Prim"
-msgstr "Primari"
-
-#: addressbook/backend/ebook/e-card-simple.c:62
-#: addressbook/backend/ebook/e-card-simple.c:92
-#: addressbook/gui/contact-editor/e-contact-editor.c:1594
-#: addressbook/gui/widgets/e-addressbook-view.c:902
-msgid "Assistant"
-msgstr "Assistent"
-
-#: addressbook/backend/ebook/e-card-simple.c:63
-#: addressbook/backend/ebook/e-card-simple.c:68
-#: addressbook/gui/contact-editor/e-contact-editor.c:1595
-#: addressbook/gui/contact-editor/e-contact-editor.c:1662
-msgid "Business"
-msgstr "Feina"
-
-#: addressbook/backend/ebook/e-card-simple.c:63
-#: addressbook/backend/ebook/e-card-simple.c:68
-#, fuzzy
-msgid "Bus"
-msgstr "Ocupat"
-
-#: addressbook/backend/ebook/e-card-simple.c:64
-#: addressbook/gui/contact-editor/e-contact-editor.c:1598
-msgid "Callback"
-msgstr "Crida de retorn"
-
-#: addressbook/backend/ebook/e-card-simple.c:65
-#: addressbook/gui/contact-editor/e-contact-editor.c:1600
-msgid "Company"
-msgstr "Empresa"
-
-#: addressbook/backend/ebook/e-card-simple.c:65
-#, fuzzy
-msgid "Comp"
-msgstr "Copia"
-
-#: addressbook/backend/ebook/e-card-simple.c:66
-#: addressbook/backend/ebook/e-card-simple.c:69
-#: addressbook/gui/contact-editor/e-contact-editor.c:1601
-#: addressbook/gui/contact-editor/e-contact-editor.c:1663
-msgid "Home"
-msgstr "Particular"
-
-#: addressbook/backend/ebook/e-card-simple.c:67
-#: addressbook/gui/widgets/e-addressbook-view.c:877
-msgid "Organization"
-msgstr "Organitzaci"
-
-#: addressbook/backend/ebook/e-card-simple.c:67
-msgid "Org"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:70
-#: addressbook/gui/contact-editor/e-contact-editor.c:1605
-msgid "Mobile"
-msgstr "Mbil"
-
-#: addressbook/backend/ebook/e-card-simple.c:71
-#: addressbook/gui/contact-editor/e-contact-editor.c:1599
-msgid "Car"
-msgstr "Cotxe"
-
-#: addressbook/backend/ebook/e-card-simple.c:72
-#: addressbook/gui/contact-editor/e-contact-editor.c:1597
-#: addressbook/gui/widgets/e-addressbook-view.c:882
-msgid "Business Fax"
-msgstr "Fax de la feina"
-
-#: addressbook/backend/ebook/e-card-simple.c:72
-#, fuzzy
-msgid "Bus Fax"
-msgstr "Fax de la feina"
-
-#: addressbook/backend/ebook/e-card-simple.c:73
-#: addressbook/gui/contact-editor/e-contact-editor.c:1603
-#: addressbook/gui/widgets/e-addressbook-view.c:883
-msgid "Home Fax"
-msgstr "Fax particular"
-
-#: addressbook/backend/ebook/e-card-simple.c:74
-#: addressbook/gui/contact-editor/e-contact-editor.c:1596
-msgid "Business 2"
-msgstr "Feina 2"
-
-#: addressbook/backend/ebook/e-card-simple.c:74
-#, fuzzy
-msgid "Bus 2"
-msgstr "Ocupat"
-
-#: addressbook/backend/ebook/e-card-simple.c:75
-#: addressbook/gui/contact-editor/e-contact-editor.c:1602
-msgid "Home 2"
-msgstr "Particular 2"
-
-#: addressbook/backend/ebook/e-card-simple.c:76
-#: addressbook/gui/contact-editor/e-contact-editor.c:1604
-#: addressbook/gui/widgets/e-addressbook-view.c:886
-msgid "ISDN"
-msgstr "XDSI"
-
-#: addressbook/backend/ebook/e-card-simple.c:77
-#: addressbook/backend/ebook/e-card-simple.c:83
-#: addressbook/gui/contact-editor/e-contact-editor.c:1606
-#: addressbook/gui/contact-editor/e-contact-editor.c:1664
-#: mail/mail-config.glade.h:52
-msgid "Other"
-msgstr "Altres"
-
-#: addressbook/backend/ebook/e-card-simple.c:78
-#: addressbook/gui/contact-editor/e-contact-editor.c:1607
-#: addressbook/gui/widgets/e-addressbook-view.c:888
-msgid "Other Fax"
-msgstr "Un altre fax"
-
-#: addressbook/backend/ebook/e-card-simple.c:79
-#: addressbook/gui/contact-editor/e-contact-editor.c:1608
-#: addressbook/gui/widgets/e-addressbook-view.c:889
-msgid "Pager"
-msgstr "Busca"
-
-#: addressbook/backend/ebook/e-card-simple.c:80
-#: addressbook/gui/contact-editor/e-contact-editor.c:1610
-#: addressbook/gui/widgets/e-addressbook-view.c:890
-msgid "Radio"
-msgstr "Rdio"
-
-#: addressbook/backend/ebook/e-card-simple.c:81
-#: addressbook/gui/contact-editor/e-contact-editor.c:1611
-#: addressbook/gui/widgets/e-addressbook-view.c:891
-msgid "Telex"
-msgstr "Tlex"
-
-#: addressbook/backend/ebook/e-card-simple.c:82
-#: addressbook/gui/widgets/e-addressbook-view.c:892
-#, fuzzy
-msgid "TTY"
-msgstr "TTY/TDD"
-
-#: addressbook/backend/ebook/e-card-simple.c:84
-#: addressbook/gui/component/e-address-popup.c:476
-#: addressbook/gui/contact-editor/e-contact-editor.c:1637
-#: addressbook/gui/widgets/e-addressbook-view.c:894
-msgid "Email 2"
-msgstr "Adrea electrnica 2"
-
-#: addressbook/backend/ebook/e-card-simple.c:85
-#: addressbook/gui/component/e-address-popup.c:486
-#: addressbook/gui/contact-editor/e-contact-editor.c:1638
-#: addressbook/gui/widgets/e-addressbook-view.c:895
-msgid "Email 3"
-msgstr "Adrea electrnica 3"
-
-#: addressbook/backend/ebook/e-card-simple.c:86
-#: addressbook/gui/widgets/e-addressbook-view.c:896
-msgid "Web Site"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:86
-msgid "Url"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:87
-#: addressbook/gui/widgets/e-addressbook-view.c:897
-#, fuzzy
-msgid "Department"
-msgstr "_Departament:"
-
-#: addressbook/backend/ebook/e-card-simple.c:87
-msgid "Dep"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:88
-#: addressbook/gui/widgets/e-addressbook-view.c:898
-#, fuzzy
-msgid "Office"
-msgstr "_Oficina"
-
-#: addressbook/backend/ebook/e-card-simple.c:88
-#, fuzzy
-msgid "Off"
-msgstr "_Oficina"
-
-#: addressbook/backend/ebook/e-card-simple.c:89
-#: addressbook/gui/widgets/e-addressbook-view.c:899
-#, fuzzy
-msgid "Title"
-msgstr "_Ttol:"
-
-#: addressbook/backend/ebook/e-card-simple.c:90
-#: addressbook/gui/widgets/e-addressbook-view.c:900
-#, fuzzy
-msgid "Profession"
-msgstr "_Professi:"
-
-#: addressbook/backend/ebook/e-card-simple.c:90
-msgid "Prof"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:91
-#: addressbook/gui/widgets/e-addressbook-view.c:901
-#, fuzzy
-msgid "Manager"
-msgstr "Busca"
-
-#: addressbook/backend/ebook/e-card-simple.c:91
-#, fuzzy
-msgid "Man"
-msgstr "Dilluns"
-
-#: addressbook/backend/ebook/e-card-simple.c:92
-msgid "Ass"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:93
-#: addressbook/gui/widgets/e-addressbook-view.c:903
-#, fuzzy
-msgid "Nickname"
-msgstr "_Sobrenom:"
-
-#: addressbook/backend/ebook/e-card-simple.c:93
-#, fuzzy
-msgid "Nick"
-msgstr "_Sobrenom:"
-
-#: addressbook/backend/ebook/e-card-simple.c:94
-#: addressbook/gui/widgets/e-addressbook-view.c:904
-#, fuzzy
-msgid "Spouse"
-msgstr "_Cnjuge:"
-
-#: addressbook/backend/ebook/e-card-simple.c:95
-#: addressbook/gui/widgets/e-addressbook-view.c:905
-#, fuzzy
-msgid "Note"
-msgstr "Cap"
-
-#: addressbook/backend/ebook/e-card-simple.c:96
-#, fuzzy
-msgid "Calendar URI"
-msgstr "Agenda"
-
-#: addressbook/backend/ebook/e-card-simple.c:96
-msgid "CALUri"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:97
-#: addressbook/gui/widgets/e-addressbook-view.c:906
-msgid "Free-busy URL"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:97
-msgid "FBUrl"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:98
-#, fuzzy
-msgid "Anniversary"
-msgstr "Ani_versari:"
-
-#: addressbook/backend/ebook/e-card-simple.c:98
-msgid "Anniv"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card-simple.c:99
-#, fuzzy
-msgid "Birth Date"
-msgstr "Data d'ini_ci:"
-
-#: addressbook/backend/ebook/e-card-simple.c:102
-#: calendar/gui/e-calendar-table.etspec.h:4
-#, fuzzy
-msgid "Categories"
-msgstr "categories"
-
-#: addressbook/backend/ebook/e-card-simple.c:103
-#, fuzzy
-msgid "Family Name"
-msgstr "Nom complet:"
-
-#: addressbook/backend/ebook/e-card.c:3564
-#, fuzzy
-msgid "Card: "
-msgstr "Cotxe"
-
-#: addressbook/backend/ebook/e-card.c:3566
-#, fuzzy
-msgid ""
-"\n"
-"Name: "
-msgstr "Nom:"
-
-#: addressbook/backend/ebook/e-card.c:3567
-msgid ""
-"\n"
-" Prefix: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3568
-msgid ""
-"\n"
-" Given: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3569
-msgid ""
-"\n"
-" Additional: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3570
-msgid ""
-"\n"
-" Family: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3571
-#, fuzzy
-msgid ""
-"\n"
-" Suffix: "
-msgstr "_Sufix:"
-
-#: addressbook/backend/ebook/e-card.c:3585
-#, fuzzy
-msgid ""
-"\n"
-"Birth Date: "
-msgstr "Data d'ini_ci:"
-
-#: addressbook/backend/ebook/e-card.c:3596
-#, fuzzy
-msgid ""
-"\n"
-"Address:"
-msgstr "_Adrea:"
-
-#: addressbook/backend/ebook/e-card.c:3598
-msgid ""
-"\n"
-" Postal Box: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3599
-msgid ""
-"\n"
-" Ext: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3600
-msgid ""
-"\n"
-" Street: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3601
-msgid ""
-"\n"
-" City: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3602
-msgid ""
-"\n"
-" Region: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3603
-msgid ""
-"\n"
-" Postal Code: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3604
-#, fuzzy
-msgid ""
-"\n"
-" Country: "
-msgstr "Pa_s:"
-
-#: addressbook/backend/ebook/e-card.c:3617
-msgid ""
-"\n"
-"Delivery Label: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3629
-msgid ""
-"\n"
-"Telephones:\n"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3632
-msgid ""
-"\n"
-"Telephone:"
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3656
-#, fuzzy
-msgid ""
-"\n"
-"E-mail:\n"
-msgstr "Adrea electrnica 2"
-
-#: addressbook/backend/ebook/e-card.c:3659
-#, fuzzy
-msgid ""
-"\n"
-"E-mail:"
-msgstr "Adrea electrnica 2"
-
-#: addressbook/backend/ebook/e-card.c:3678
-msgid ""
-"\n"
-"Mailer: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3684
-msgid ""
-"\n"
-"Time Zone: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3692
-msgid ""
-"\n"
-"Geo Location: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3696
-#, fuzzy
-msgid ""
-"\n"
-"Business Role: "
-msgstr "Feina 2"
-
-#: addressbook/backend/ebook/e-card.c:3708
-msgid ""
-"\n"
-"Org: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3709
-#, fuzzy
-msgid ""
-"\n"
-" Name: "
-msgstr "Nom:"
-
-#: addressbook/backend/ebook/e-card.c:3710
-msgid ""
-"\n"
-" Unit: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3711
-msgid ""
-"\n"
-" Unit2: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3712
-msgid ""
-"\n"
-" Unit3: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3713
-msgid ""
-"\n"
-" Unit4: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3717
-#, fuzzy
-msgid ""
-"\n"
-"Categories: "
-msgstr "categories"
-
-#: addressbook/backend/ebook/e-card.c:3718
-#, fuzzy
-msgid ""
-"\n"
-"Comment: "
-msgstr "Comentaris sobre l'element:"
-
-#. 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);
-#. }
-#: addressbook/backend/ebook/e-card.c:3731
-msgid ""
-"\n"
-"Unique String: "
-msgstr ""
-
-#: addressbook/backend/ebook/e-card.c:3734
-#, fuzzy
-msgid ""
-"\n"
-"Public Key: "
-msgstr "Pblic"
-
-#: addressbook/backend/ebook/e-card.c:4087
-#, fuzzy
-msgid "Multiple VCards"
-msgstr "Mou el missatge"
-
-#: addressbook/backend/ebook/e-card.c:4095
-#, fuzzy, c-format
-msgid "VCard for %s"
-msgstr "Si us plau, introduu la contrasenya NNTP per a %s@%s"
-
-#: addressbook/backend/ebook/load-gnomecard-addressbook.c:21
-#: addressbook/backend/ebook/load-pine-addressbook.c:22
-#: addressbook/backend/ebook/test-client-list.c:23
-#: addressbook/backend/ebook/test-client.c:33
-#: addressbook/conduit/address-conduit.c:1167
-#: addressbook/gui/component/addressbook-factory.c:48
-#: calendar/conduits/calendar/calendar-conduit.c:1262
-#: calendar/conduits/todo/todo-conduit.c:1034
-#: calendar/gui/alarm-notify/notify-main.c:78 calendar/gui/main.c:63
-msgid "Could not initialize Bonobo"
-msgstr "No s'ha pogut inicialitzar el Bonobo"
-
-#: addressbook/backend/pas/pas-backend-file.c:257
-#: addressbook/backend/pas/pas-backend-ldap.c:2047
-#, fuzzy
-msgid "Searching..."
-msgstr "Cerca"
-
-#: addressbook/backend/pas/pas-backend-file.c:259
-#, fuzzy
-msgid "Loading..."
-msgstr "_Parmetres"
-
-#. need a different error message here.
-#: addressbook/backend/pas/pas-backend-file.c:268
-#, fuzzy
-msgid "Error in search expression."
-msgstr ""
-"Error en preparar-se per a %s:\n"
-"%s"
-
-#: addressbook/backend/pas/pas-backend-ldap.c:467
-#, fuzzy
-msgid "Connecting to LDAP server..."
-msgstr "Connexi de prova a \"%s\""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:477
-#, fuzzy
-msgid "Unable to connect to LDAP server."
-msgstr ""
-"No es pot autenticar davant del servidor IMAP.\n"
-"%s\n"
-"\n"
-
-#: addressbook/backend/pas/pas-backend-ldap.c:493
-#, fuzzy
-msgid "Waiting for connection to LDAP server..."
-msgstr "Connexi de prova a \"%s\""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:862
-#, fuzzy
-msgid "Adding card to LDAP server..."
-msgstr "Connexi de prova a \"%s\""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:959
-#, fuzzy
-msgid "Removing card from LDAP server..."
-msgstr "Imprimeix l'agenda"
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1064
-msgid "Modifying card from LDAP server..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1992
-msgid "Receiving LDAP search results..."
-msgstr ""
-
-#: addressbook/backend/pas/pas-backend-ldap.c:1997
-msgid "Restarting search."
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:204
-msgid "Cursor could not be loaded\n"
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:217
-msgid "EBook not loaded\n"
-msgstr ""
-
-#: addressbook/conduit/address-conduit.c:731
-#: calendar/conduits/calendar/calendar-conduit.c:837
-#: calendar/conduits/todo/todo-conduit.c:609
-msgid "Could not start wombat server"
-msgstr "No s'ha pogut iniciar el servidor wombat"
-
-#: addressbook/conduit/address-conduit.c:732
-#: calendar/conduits/calendar/calendar-conduit.c:838
-#: calendar/conduits/todo/todo-conduit.c:610
-msgid "Could not start wombat"
-msgstr "No s'ha pogut iniciar el wombat"
-
-#: addressbook/conduit/address-conduit.c:762
-#: addressbook/conduit/address-conduit.c:765
-msgid "Could not read pilot's Address application block"
-msgstr "No s'ha pogut llegir el bloc d'aplicaci d'adrea del Pilot"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:1
-msgid "A Bonobo control for an address popup."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:2
-msgid "A Bonobo control for displaying an address."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:3
-msgid "A sample Bonobo control which displays an addressbook."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:4
-#, fuzzy
-msgid "Control that displays an Evolution addressbook minicard."
-msgstr ""
-"Utilitat de configuraci per al conducte de la llibreta d'adreces de "
-"l'Evolution\n"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:5
-#, fuzzy
-msgid "Evolution Addressbook minicard viewer"
-msgstr "Conducte de la llibreta d'adreces de l'Evolution"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:6
-msgid "Evolution component for handling contacts."
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:7
-#, fuzzy
-msgid "Factory for the Addressbook Minicard control"
-msgstr "Utilitat de configuraci per al conducte de l'agenda de l'Evolution.\n"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:8
-msgid "Factory for the Addressbook's address displayer"
-msgstr ""
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:9
-#, fuzzy
-msgid "Factory for the Addressbook's address popup"
-msgstr "Utilitat de configuraci per al conducte de l'agenda de l'Evolution.\n"
-
-#: addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in.h:10
-#, fuzzy
-msgid "Factory for the sample Addressbook control"
-msgstr "Feu clic aqu per a la llibreta d'adreces"
-
-#: addressbook/gui/component/addressbook-component.c:66
-#: calendar/gui/dialogs/comp-editor-util.c:289
-#: calendar/gui/dialogs/comp-editor-util.c:345 shell/e-local-storage.c:173
-#: shell/e-shortcuts.c:1062
-#, fuzzy
-msgid "Contacts"
-msgstr "_Contactes..."
-
-#: addressbook/gui/component/addressbook-component.c:66
-#, fuzzy
-msgid "Folder containing contact information"
-msgstr ""
-"Error en carregar la informaci del filtre:\n"
-"%s"
-
-#: addressbook/gui/component/addressbook-component.c:68
-#, fuzzy
-msgid "LDAP Server"
-msgstr "Servidor LDAP:"
-
-#: addressbook/gui/component/addressbook-component.c:68
-#, fuzzy
-msgid "LDAP server containing contact information"
-msgstr ""
-"Error en carregar la informaci del filtre:\n"
-"%s"
-
-#: addressbook/gui/component/addressbook-component.c:411
-#: ui/evolution-addressbook.xml.h:11
-#, fuzzy
-msgid "New Contact"
-msgstr "Visualitza tots els contactes"
-
-#: addressbook/gui/component/addressbook-component.c:411
-#, fuzzy
-msgid "New _Contact"
-msgstr "Visualitza tots els contactes"
-
-#: addressbook/gui/component/addressbook-component.c:412
-#, fuzzy
-msgid "New Contact List"
-msgstr "Visualitza tots els contactes"
-
-#: addressbook/gui/component/addressbook-component.c:412
-#, fuzzy
-msgid "New Contact _List"
-msgstr "Visualitza tots els contactes"
-
-#: addressbook/gui/component/addressbook-config.c:188
-#, fuzzy
-msgid "Edit Addressbook"
-msgstr "Desa a la llibreta d'adreces"
-
-#: addressbook/gui/component/addressbook-config.glade.h:1
-msgid "389"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:2
-#, fuzzy
-msgid "Account Name"
-msgstr "cont"
-
-#: addressbook/gui/component/addressbook-config.glade.h:3
-#, fuzzy
-msgid "Add Addressbook"
-msgstr "Desa a la llibreta d'adreces"
-
-#: addressbook/gui/component/addressbook-config.glade.h:4
-#, fuzzy
-msgid "Addressbook Sources"
-msgstr "Afegeix una font"
-
-#: addressbook/gui/component/addressbook-config.glade.h:5
-#, fuzzy
-msgid "Advanced"
-msgstr "Afegeix..."
-
-#: addressbook/gui/component/addressbook-config.glade.h:6
-#, fuzzy
-msgid "Base"
-msgstr "Enganxa"
-
-#: addressbook/gui/component/addressbook-config.glade.h:7
-#: calendar/gui/dialogs/task-editor.c:172
-#, fuzzy
-msgid "Basic"
-msgstr "Enganxa"
-
-#: addressbook/gui/component/addressbook-config.glade.h:8
-#, fuzzy
-msgid "De_lete"
-msgstr "Suprimeix"
-
-#: addressbook/gui/component/addressbook-config.glade.h:9
-msgid "One"
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:10
-#, fuzzy
-msgid "Search _base:"
-msgstr "Cerca"
-
-#: addressbook/gui/component/addressbook-config.glade.h:11
-#, fuzzy
-msgid "Search s_cope: "
-msgstr "Cerca"
-
-#: addressbook/gui/component/addressbook-config.glade.h:12
-#, fuzzy
-msgid "Server Name"
-msgstr "Servidor:"
-
-#: addressbook/gui/component/addressbook-config.glade.h:13
-#, fuzzy
-msgid "Sub"
-msgstr "Dg"
-
-#: addressbook/gui/component/addressbook-config.glade.h:14
-msgid "The information below is required in order to add an addressbook. "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:15
-msgid "This information is not required for most ldap servers. "
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:16
-msgid ""
-"This information is used by your ldap server to specify which nodes are used "
-"in a search. Contact your server administrator for more information."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:17
-msgid ""
-"This is the base node for all your searches on the ldap server. Contact your "
-"server administrator for more information."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:18
-msgid "This is the name of the server where your addressbook is located."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:19
-msgid "This is the port that your ldap server uses."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:20
-msgid ""
-"This name will be used to identify your account. It is for display purposes "
-"only."
-msgstr ""
-
-#: addressbook/gui/component/addressbook-config.glade.h:21
-#, fuzzy
-msgid "_Account name:"
-msgstr "cont"
-
-#: addressbook/gui/component/addressbook-config.glade.h:22
-#: addressbook/gui/contact-editor/contact-editor.glade.h:19
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:4
-#: calendar/gui/dialogs/alarm-page.glade.h:8 filter/filter.glade.h:7
-#: mail/mail-config.glade.h:91 my-evolution/my-evolution.glade.h:20
-msgid "_Add"
-msgstr "_Afegeix"
-
-#: addressbook/gui/component/addressbook-config.glade.h:23
-#: filter/filter.glade.h:9 mail/mail-config.glade.h:96
-#: ui/evolution-addressbook.xml.h:34 ui/evolution-calendar.xml.h:39
-#: ui/evolution-mail-list.xml.h:25 ui/evolution-mail-messagedisplay.xml.h:6
-#: ui/evolution-message-composer.xml.h:47
-#: ui/evolution-signature-editor.xml.h:6 ui/evolution-subscribe.xml.h:10
-#: ui/evolution-tasks.xml.h:16
-msgid "_Edit"
-msgstr "_Edita"
-
-#: addressbook/gui/component/addressbook-config.glade.h:24
-#, fuzzy
-msgid "_My server requires authentication"
-msgstr ""
-"No es pot connectar al servidor POP.\n"
-"No hi ha suport per al mecanisme d'autenticaci sollicitat."
-
-#: addressbook/gui/component/addressbook-config.glade.h:25
-#, fuzzy
-msgid "_Port:"
-msgstr "Prioritat:"
-
-#: addressbook/gui/component/addressbook-config.glade.h:26
-#, fuzzy
-msgid "_Server name:"
-msgstr "Servidor:"
-
-#: addressbook/gui/component/addressbook-storage.c:163
-#, fuzzy
-msgid "Other Contacts"
-msgstr "Contacte _nou"
-
-#: addressbook/gui/component/addressbook.c:407
-#, fuzzy, c-format
-msgid "Please enter your email address and password for access to %s"
-msgstr "Si us plau, introduu la vostra contrasenya PGP/GPG."
-
-#: addressbook/gui/component/addressbook.c:415
-#, fuzzy
-msgid "LDAP Authentication"
-msgstr "Autenticaci:"
-
-#: addressbook/gui/component/addressbook.c:426
-#, fuzzy
-msgid "Email Address:"
-msgstr "Adrea electrnica:"
-
-#: addressbook/gui/component/addressbook.c:439
-#, fuzzy
-msgid "Password:"
-msgstr "Contrasenya"
-
-#: addressbook/gui/component/addressbook.c:502
-msgid "Unable to open addressbook"
-msgstr "No es pot obrir la llibreta d'adreces"
-
-#: addressbook/gui/component/addressbook.c:509
-msgid ""
-"We were unable to open this addressbook. This either\n"
-"means you have entered an incorrect URI, or the LDAP server\n"
-"is down"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:514
-msgid ""
-"This version of Evolution does not have LDAP support\n"
-"compiled in to it. If you want to use LDAP in Evolution\n"
-"you must compile the program from the CVS sources after\n"
-"retrieving OpenLDAP from the link below.\n"
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:522
-msgid ""
-"We were unable to open this addressbook. Please check that the\n"
-"path exists and that you have permission to access it."
-msgstr ""
-
-#: addressbook/gui/component/addressbook.c:663
-#: calendar/gui/cal-search-bar.c:55
-#, fuzzy
-msgid "Any field contains"
-msgstr "El cos cont"
-
-#: addressbook/gui/component/addressbook.c:664
-#, fuzzy
-msgid "Name contains"
-msgstr "cont"
-
-#: addressbook/gui/component/addressbook.c:665
-#, fuzzy
-msgid "Email contains"
-msgstr "cont"
-
-#: addressbook/gui/component/addressbook.c:666
-#: calendar/gui/cal-search-bar.c:59
-#, fuzzy
-msgid "Category is"
-msgstr "categories"
-
-#. We attach subitems below
-#: addressbook/gui/component/addressbook.c:667 widgets/misc/e-filter-bar.h:97
-#: widgets/misc/e-filter-bar.h:104
-#, fuzzy
-msgid "Advanced..."
-msgstr "Afegeix..."
-
-#. All, unmatched, separator
-#: addressbook/gui/component/addressbook.c:897
-#: calendar/gui/cal-search-bar.c:412
-#, fuzzy
-msgid "Any Category"
-msgstr "categories"
-
-#: addressbook/gui/component/addressbook.c:939
-msgid "The URI that the Folder Browser will display"
-msgstr "L'URI que mostrar el navegador de carpetes"
-
-#.
-#. * This is the code for the UI thingie that lets you manipulate the e-mail
-#. * addresses (and *only* the e-mail addresses) associated with an existing
-#. * card.
-#.
-#: addressbook/gui/component/e-address-popup.c:178
-#, fuzzy
-msgid "(none)"
-msgstr "(Sense nom)"
-
-#: addressbook/gui/component/e-address-popup.c:466
-#: addressbook/gui/contact-editor/contact-editor.glade.h:17
-#: addressbook/gui/contact-editor/e-contact-editor.c:1636
-msgid "Primary Email"
-msgstr "Adrea electrnica principal"
-
-#: addressbook/gui/component/e-address-popup.c:579
-#, fuzzy
-msgid "Select an Action"
-msgstr "Fitxer de signatura:"
-
-#: addressbook/gui/component/e-address-popup.c:585
-#, fuzzy, c-format
-msgid "Create a new contact \"%s\""
-msgstr "Crea un nou contacte"
-
-#: addressbook/gui/component/e-address-popup.c:597
-#, c-format
-msgid "Add address to existing contact \"%s\""
-msgstr ""
-
-#: addressbook/gui/component/e-address-popup.c:859
-#, fuzzy
-msgid "Querying Addressbook..."
-msgstr "Desa a la llibreta d'adreces"
-
-#: addressbook/gui/component/e-address-popup.c:934
-#: addressbook/gui/component/e-address-widget.c:388
-#: addressbook/gui/component/select-names/e-select-names-popup.c:307
-msgid "Edit Contact Info"
-msgstr ""
-
-#: addressbook/gui/component/e-address-popup.c:963
-#: addressbook/gui/component/e-address-widget.c:424
-#: addressbook/gui/component/select-names/e-select-names-popup.c:486
-#, fuzzy
-msgid "Add to Contacts"
-msgstr "Contacte _nou"
-
-#: addressbook/gui/component/e-address-popup.c:1006
-#, fuzzy
-msgid "Merge E-Mail Address"
-msgstr "Adrea electrnica:"
-
-#: addressbook/gui/component/e-address-widget.c:365
-#, fuzzy
-msgid "Disable Queries"
-msgstr "Categories disponibles:"
-
-#: addressbook/gui/component/e-address-widget.c:365
-msgid "Enable Queries (Dangerous!)"
-msgstr ""
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in.h:1
-#, fuzzy
-msgid "Evolution's addressbook name selection interface."
-msgstr "Conducte de la llibreta d'adreces de l'Evolution"
-
-#: addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in.h:2
-msgid "Factory for the Addressbook's name selection interface"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:164
-#: addressbook/gui/component/select-names/e-select-names.c:764
-#: composer/e-msg-composer-attachment-bar.c:477 filter/filter-filter.c:436
-#: filter/filter-rule.c:613 shell/e-shortcuts-view.c:181
-msgid "Remove"
-msgstr "Elimina"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:179
-#, fuzzy
-msgid "Remove All"
-msgstr "Elimina"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:203
-#, fuzzy
-msgid "Send HTML Mail?"
-msgstr "Sendmail"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:406
-#, fuzzy
-msgid "Edit Contact List"
-msgstr "_Contactes..."
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:424
-#, fuzzy
-msgid "Unnamed Contact List"
-msgstr "Contacte _nou"
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:441
-#, c-format
-msgid "(%d not shown)"
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names-popup.c:507
-#, fuzzy
-msgid "Unnamed Contact"
-msgstr "Contacte _nou"
-
-#: addressbook/gui/component/select-names/e-select-names.c:521
-msgid ""
-"Evolution is unable to get the addressbook local storage. This may have been "
-"caused by the evolution-addressbook component crashing. To help us better "
-"understand and ultimately resolve this problem, please send an e-mail to Jon "
-"Trowbridge <trow@ximian.com> with a detailed description of the "
-"circumstances under which this error occurred. Thank you."
-msgstr ""
-
-#: addressbook/gui/component/select-names/e-select-names.c:598
-msgid "Select Contacts from Addressbook"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:1
-#, fuzzy
-msgid "C_ontaining:"
-msgstr "cont"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:2
-#, fuzzy
-msgid "Co_ntacts:"
-msgstr "_Contactes..."
-
-#: addressbook/gui/component/select-names/select-names.glade.h:3
-#, fuzzy
-msgid "F_ind"
-msgstr "Cerca"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:4
-msgid "Select Names"
-msgstr "Seleccioneu els noms"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:5
-msgid "Show contacts matching the following criteria:"
-msgstr ""
-
-#: addressbook/gui/component/select-names/select-names.glade.h:6
-#, fuzzy
-msgid "_Category:"
-msgstr "categories"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:7
-#, fuzzy
-msgid "_Folder:"
-msgstr "_Carpeta"
-
-#: addressbook/gui/component/select-names/select-names.glade.h:8
-#, fuzzy
-msgid "_Message Recipients:"
-msgstr "Destinataris del missatge"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:1
-msgid "Anni_versary:"
-msgstr "Ani_versari:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:2
-msgid "B_usiness"
-msgstr "F_eina"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:3
-msgid "Business _Fax"
-msgstr "Fax de la feina"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:4
-#: calendar/gui/dialogs/event-page.glade.h:3
-#: calendar/gui/dialogs/task-page.glade.h:1
-msgid "Ca_tegories..."
-msgstr "Ca_tegories..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:5
-msgid "Collaboration"
-msgstr ""
-
-#. Construct the app
-#: addressbook/gui/contact-editor/contact-editor.glade.h:6
-#: addressbook/gui/contact-editor/e-contact-editor.c:1241
-msgid "Contact Editor"
-msgstr "Contacta l'editor"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:7
-#: calendar/gui/dialogs/task-editor.c:177
-msgid "Details"
-msgstr "Detalls"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:8
-msgid "F_ree/Busy URL:"
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:9
-#, fuzzy
-msgid "File A_s:"
-msgstr "Arxiva com:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:10
-msgid "General"
-msgstr "General"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:11
-msgid ""
-"If this person publishes free/busy or other calendar information on the "
-"Internet, enter the address\n"
-"of that information here."
-msgstr ""
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:13
-msgid "New phone type"
-msgstr "Nou tipus de telfon"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:14
-msgid "No_tes:"
-msgstr "No_tes:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:15
-#, fuzzy
-msgid "Organi_zation:"
-msgstr "Organitzaci:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:16
-msgid "Phone Types"
-msgstr "Tipus de telfon"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:18
-msgid "Wants to receive _HTML mail"
-msgstr "Vol rebre correu _HTML"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:20
-msgid "_Address..."
-msgstr "_Adrea..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:21
-msgid "_Assistant's name:"
-msgstr "_Nom de l'assistent:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:22
-msgid "_Birthday:"
-msgstr "_Data de naixement:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:23
-msgid "_Business"
-msgstr "_Feina"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:24
-#: calendar/gui/dialogs/event-page.glade.h:12
-#: calendar/gui/dialogs/task-page.glade.h:10
-msgid "_Contacts..."
-msgstr "_Contactes..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:25
-#: calendar/gui/dialogs/alarm-page.glade.h:9
-#: calendar/gui/dialogs/meeting-page.c:834 filter/filter.glade.h:8
-#: mail/folder-browser.c:1406 mail/mail-config.glade.h:95
-#: ui/evolution-calendar.xml.h:38 ui/evolution-mail-message.xml.h:88
-#: ui/evolution-tasks.xml.h:15 ui/evolution.xml.h:35
-msgid "_Delete"
-msgstr "_Suprimeix"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:26
-msgid "_Department:"
-msgstr "_Departament:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:27
-msgid "_Full Name..."
-msgstr "Nom _complet..."
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:28
-msgid "_Home"
-msgstr "_Particular"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:29
-msgid "_Job title:"
-msgstr "_Crrec:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:30
-msgid "_Manager's Name:"
-msgstr "_Nom del gestor:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:31
-msgid "_Mobile"
-msgstr "_Mbil"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:32
-msgid "_Nickname:"
-msgstr "_Sobrenom:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:33
-msgid "_Office:"
-msgstr "_Oficina"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:34
-msgid "_Profession:"
-msgstr "_Professi:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:35
-#, fuzzy
-msgid "_Public Calendar URL:"
-msgstr "Agenda"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:36
-msgid "_Spouse:"
-msgstr "_Cnjuge:"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:37
-msgid "_This is the mailing address"
-msgstr "_Aquesta s l'adrea de correu"
-
-#: addressbook/gui/contact-editor/contact-editor.glade.h:38
-#, fuzzy
-msgid "_Web page address:"
-msgstr "Adrea de pgina web:"
-
-#: addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade.h:1
-#, fuzzy
-msgid ""
-"Are you sure you want\n"
-"to delete this contact?"
-msgstr ""
-"Esteu segur que voleu\n"
-"suprimir aquest contacte?"
-
-#: addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade.h:3
-msgid "Delete Contact?"
-msgstr "Voleu suprimir el contacte?"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:759
-#, fuzzy
-msgid "This contact belongs to these categories:"
-msgstr "El(s) element(s) pertanyen a aquestes categories:"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:1612
-msgid "TTY/TDD"
-msgstr "TTY/TDD"
-
-#: addressbook/gui/contact-editor/e-contact-editor.c:2234
-#, fuzzy, c-format
-msgid "Could not find widget for a field: `%s'"
-msgstr "No s'ha pogut suprimir la carpeta `%s': %s"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:283
-msgid "Contact Quick-Add"
-msgstr ""
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:285
-#, fuzzy
-msgid "Edit Full"
-msgstr "Filtres d'edici"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:311
-#: addressbook/gui/widgets/e-addressbook-view.c:869
-#, fuzzy
-msgid "Full Name"
-msgstr "Nom complet:"
-
-#: addressbook/gui/contact-editor/e-contact-quick-add.c:317
-#, fuzzy
-msgid "E-mail"
-msgstr "Adrea electrnica 2"
-
-#: addressbook/gui/contact-editor/e-contact-save-as.c:137
-#, c-format
-msgid ""
-"%s already exists\n"
-"Do you want to overwrite it?"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:1
-msgid "Address _2:"
-msgstr "Adrea _2:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:2
-#, fuzzy
-msgid "Afghanistan"
-msgstr "Assistent"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:3
-msgid "Albania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:4
-msgid "Algeria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:5
-msgid "American Samoa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:6
-msgid "Andorra"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:7
-msgid "Angola"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:8
-msgid "Anguilla"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:9
-#, fuzzy
-msgid "Antarctica"
-msgstr "Tria automtica"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:10
-msgid "Antigua And Barbuda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:11
-#, fuzzy
-msgid "Argentina"
-msgstr "Orientaci"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:12
-msgid "Armenia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:13
-msgid "Aruba"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:14
-msgid "Australia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:15
-#, fuzzy
-msgid "Austria"
-msgstr "agost"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:16
-msgid "Azerbaijan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:17
-msgid "Bahamas"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:18
-msgid "Bahrain"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:19
-msgid "Bangladesh"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:20
-msgid "Barbados"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:21
-#, fuzzy
-msgid "Belarus"
-msgstr "anys"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:22
-msgid "Belgium"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:23
-#, fuzzy
-msgid "Belize"
-msgstr "Mida"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:24
-#, fuzzy
-msgid "Benin"
-msgstr "S'est enviant \"%s\""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:25
-msgid "Bermuda"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:26
-msgid "Bhutan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:27
-msgid "Bolivia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:28
-msgid "Bosnia And Herzegowina"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:29
-msgid "Botswana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:30
-msgid "Bouvet Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:31
-#, fuzzy
-msgid "Brazil"
-msgstr "_Correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:32
-msgid "British Indian Ocean Territory"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:33
-msgid "British Virgin Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:34
-msgid "Brunei Darussalam"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:35
-msgid "Bulgaria"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:36
-msgid "Burkina Faso"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:37
-msgid "Burundi"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:38
-msgid "Cambodia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:39
-msgid "Cameroon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:40
-msgid "Canada"
-msgstr "Canad"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:41
-msgid "Cape Verde"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:42
-msgid "Cayman Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:43
-msgid "Central African Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:44
-#, fuzzy
-msgid "Chad"
-msgstr "Cotxe"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:45
-msgid "Check Address"
-msgstr "Comprova l'adrea"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:46
-#, fuzzy
-msgid "Chile"
-msgstr "_Fitxer"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:47
-#, fuzzy
-msgid "China"
-msgstr "Cotxe"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:48
-msgid "Christmas Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:49
-msgid "Cocos (Keeling) Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:50
-msgid "Colombia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:51
-#, fuzzy
-msgid "Comoros"
-msgstr "Colors"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:52
-#, fuzzy
-msgid "Congo"
-msgstr "S'est copiant"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:53
-msgid "Cook Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:54
-msgid "Costa Rica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:55
-msgid "Cote d'Ivoire"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:56
-msgid "Countr_y:"
-msgstr "Pa_s:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:57
-msgid "Croatia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:58
-msgid "Cuba"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:59
-msgid "Cyprus"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:60
-msgid "Czech Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:61
-msgid "Denmark"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:62
-msgid "Djibouti"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:63
-msgid "Dominica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:64
-msgid "Dominican Republic"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:65
-msgid "East Timor"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:66
-msgid "Ecuador"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:67
-msgid "Egypt"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:68
-msgid "El Salvador"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:69
-msgid "Equatorial Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:70
-msgid "Eritrea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:71
-msgid "Estonia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:72
-msgid "Ethiopia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:73
-msgid "Falkland Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:74
-msgid "Faroe Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:75
-msgid "Fiji"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:76
-msgid "Finland"
-msgstr "Finlndia"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:77
-#, fuzzy
-msgid "France"
-msgstr "Cancellat"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:78
-msgid "French Guiana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:79
-msgid "French Polynesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:80
-msgid "French Southern Territories"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:81
-msgid "Gabon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:82
-msgid "Gambia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:83
-msgid "Georgia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:84
-#, fuzzy
-msgid "Germany"
-msgstr "maig"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:85
-msgid "Ghana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:86
-msgid "Gibraltar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:87
-#, fuzzy
-msgid "Greece"
-msgstr "setmana"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:88
-#, fuzzy
-msgid "Greenland"
-msgstr "Finlndia"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:89
-#, fuzzy
-msgid "Grenada"
-msgstr "Canad"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:90
-msgid "Guadeloupe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:91
-#, fuzzy
-msgid "Guam"
-msgstr "am"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:92
-msgid "Guatemala"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:93
-#, fuzzy
-msgid "Guinea"
-msgstr "General"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:94
-msgid "Guinea-bissau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:95
-msgid "Guyana"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:96
-#, fuzzy
-msgid "Haiti"
-msgstr "_Correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:97
-msgid "Heard And McDonald Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:98
-msgid "Holy See"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:99
-#, fuzzy
-msgid "Honduras"
-msgstr "Hores"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:100
-msgid "Hong Kong"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:101
-#, fuzzy
-msgid "Hungary"
-msgstr "Diumenge"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:102
-msgid "Iceland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:103
-msgid "India"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:104
-msgid "Indonesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:105
-msgid "Ireland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:106
-msgid "Israel"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:107
-#, fuzzy
-msgid "Italy"
-msgstr "avui"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:108
-msgid "Jamaica"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:109
-msgid "Japan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:110
-msgid "Jordan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:111
-msgid "Kazakhstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:112
-msgid "Kenya"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:113
-msgid "Kiribati"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:114
-msgid "Kuwait"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:115
-msgid "Kyrgyzstan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:116
-#, fuzzy
-msgid "Laos"
-msgstr "Baixa"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:117
-msgid "Latvia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:118
-msgid "Lebanon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:119
-#, fuzzy
-msgid "Lesotho"
-msgstr "Baixa"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:120
-#, fuzzy
-msgid "Liberia"
-msgstr "abril"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:121
-msgid "Liechtenstein"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:122
-#, fuzzy
-msgid "Lithuania"
-msgstr "vuit"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:123
-msgid "Luxembourg"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:124
-#, fuzzy
-msgid "Macau"
-msgstr "mar"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:125
-msgid "Macedonia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:126
-msgid "Madagascar"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:127
-#, fuzzy
-msgid "Malawi"
-msgstr "_Correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:128
-msgid "Malaysia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:129
-msgid "Maldives"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:130
-#, fuzzy
-msgid "Mali"
-msgstr "_Correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:131
-#, fuzzy
-msgid "Malta"
-msgstr "_Correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:132
-msgid "Marshall Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:133
-#, fuzzy
-msgid "Martinique"
-msgstr "Minut"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:134
-msgid "Mauritania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:135
-#, fuzzy
-msgid "Mauritius"
-msgstr "Marges"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:136
-#, fuzzy
-msgid "Mayotte"
-msgstr "Dilluns"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:137
-msgid "Mexico"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:138
-msgid "Micronesia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:139
-#, fuzzy
-msgid "Monaco"
-msgstr "Dilluns"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:140
-msgid "Mongolia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:141
-msgid "Montserrat"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:142
-msgid "Morocco"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:143
-#, fuzzy
-msgid "Mozambique"
-msgstr "Mbil"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:144
-#, fuzzy
-msgid "Myanmar"
-msgstr "Busca"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:145
-msgid "Namibia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:146
-msgid "Nauru"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:147
-#, fuzzy
-msgid "Nepal"
-msgstr "Recupera el correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:148
-#, fuzzy
-msgid "Netherlands"
-msgstr "Selecciona'ls _tots"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:149
-msgid "Netherlands Antilles"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:150
-#, fuzzy
-msgid "New Caledonia"
-msgstr "Visualitza tots els contactes"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:151
-#, fuzzy
-msgid "New Zealand"
-msgstr "Recupera el correu"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:152
-msgid "Nicaragua"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:153
-#, fuzzy
-msgid "Niger"
-msgstr "Alta"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:154
-#, fuzzy
-msgid "Nigeria"
-msgstr "abril"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:155
-#, fuzzy
-msgid "Niue"
-msgstr "Minut"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:156
-msgid "Norfolk Island"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:157
-msgid "Northern Mariana Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:158
-#, fuzzy
-msgid "Norway"
-msgstr "Ara"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:159
-msgid "Oman"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:160
-#, fuzzy
-msgid "Pakistan"
-msgstr "Enganxa"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:161
-msgid "Palau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:162
-#, fuzzy
-msgid "Panama"
-msgstr "Canad"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:163
-msgid "Papua New Guinea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:164
-msgid "Paraguay"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:165
-#, fuzzy
-msgid "Peru"
-msgstr "Paper"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:166
-msgid "Philippines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:167
-msgid "Pitcairn"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:168
-#, fuzzy
-msgid "Poland"
-msgstr "Finlndia"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:169
-#, fuzzy
-msgid "Portugal"
-msgstr "Vertical"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:170
-msgid "Puerto Rico"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:171
-#, fuzzy
-msgid "Qatar"
-msgstr "desprs de"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:172
-msgid "Republic Of Korea"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:173
-msgid "Republic Of Moldova"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:174
-#, fuzzy
-msgid "Reunion"
-msgstr "Seccions:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:175
-msgid "Romania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:176
-msgid "Russian Federation"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:177
-#, fuzzy
-msgid "Rwanda"
-msgstr "Canad"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:178
-msgid "Saint Kitts And Nevis"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:179
-msgid "Saint Lucia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:180
-msgid "Saint Vincent And The Grena-dines"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:181
-#, fuzzy
-msgid "Samoa"
-msgstr "Puntuaci"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:182
-msgid "San Marino"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:183
-msgid "Sao Tome And Principe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:184
-msgid "Saudi Arabia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:185
-#, fuzzy
-msgid "Senegal"
-msgstr "General"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:186
-#, fuzzy
-msgid "Seychelles"
-msgstr "Seleccioneu una carpeta"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:187
-msgid "Sierra Leone"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:188
-msgid "Singapore"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:189
-msgid "Slovakia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:190
-msgid "Slovenia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:191
-msgid "Solomon Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:192
-#, fuzzy
-msgid "Somalia"
-msgstr "Normal"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:193
-msgid "South Africa"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:194
-msgid "South Georgia And The South Sandwich Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:195
-#, fuzzy
-msgid "Spain"
-msgstr "_Envia"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:196
-msgid "Sri Lanka"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:197
-msgid "St. Helena"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:198
-msgid "St. Pierre And Miquelon"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:199
-#, fuzzy
-msgid "Sudan"
-msgstr "dg."
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:200
-#, fuzzy
-msgid "Suriname"
-msgstr "_Sobrenom:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:201
-msgid "Svalbard And Jan Mayen Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:202
-#, fuzzy
-msgid "Swaziland"
-msgstr "Finlndia"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:203
-#, fuzzy
-msgid "Sweden"
-msgstr "Vist"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:204
-msgid "Switzerland"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:205
-#, fuzzy
-msgid "Taiwan"
-msgstr "Rdio"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:206
-#, fuzzy
-msgid "Tajikistan"
-msgstr "Tasques"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:207
-#, fuzzy
-msgid "Thailand"
-msgstr "Finlndia"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:208
-#, fuzzy
-msgid "Togo"
-msgstr "Per a"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:209
-msgid "Tokelau"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:210
-#, fuzzy
-msgid "Tonga"
-msgstr "Avui"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:211
-msgid "Trinidad And Tobago"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:212
-msgid "Tunisia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:213
-#, fuzzy
-msgid "Turkey"
-msgstr "dm."
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:214
-#, fuzzy
-msgid "Turkmenistan"
-msgstr "Tasca"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:215
-msgid "Turks And Caicos Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:216
-msgid "Tuvalu"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:217
-msgid "U.S. Virgin Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:218
-#, fuzzy
-msgid "Uganda"
-msgstr "Canad"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:219
-msgid "Ukraine"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:220
-msgid "United Arab Emirates"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:221
-msgid "United Kingdom"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:222
-msgid "United Republic Of Tanzania"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:223
-#, fuzzy
-msgid "United States"
-msgstr "Mou el missatge"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:224
-msgid "United States Minor Outlying Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:225
-msgid "Uruguay"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:226
-msgid "Uzbekistan"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:227
-msgid "Vanuatu"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:228
-msgid "Venezuela"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:229
-#, fuzzy
-msgid "Viet Nam"
-msgstr "Seleccioneu els noms"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:230
-msgid "Wallis And Futuna Islands"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:231
-msgid "Western Sahara"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:232
-#, fuzzy
-msgid "Yemen"
-msgstr "Vist"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:233
-msgid "Yugoslavia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:234
-msgid "Zambia"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:235
-msgid "Zimbabwe"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:236
-msgid "_Address:"
-msgstr "_Adrea:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:237
-msgid "_City:"
-msgstr "_Poblaci:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:238
-msgid "_PO Box:"
-msgstr "_Apartat de correus:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:239
-msgid "_State/Province:"
-msgstr "_Comarca:"
-
-#: addressbook/gui/contact-editor/fulladdr.glade.h:240
-msgid "_ZIP Code:"
-msgstr "_Codi postal:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:1
-msgid "Check Full Name"
-msgstr "Comprova el nom complet"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:2
-msgid "Dr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:3
-msgid "Esq."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:4
-#, fuzzy
-msgid "I"
-msgstr "Si"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:5
-msgid "II"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:6
-msgid "III"
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:7
-msgid "Jr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:8
-#, fuzzy
-msgid "Miss"
-msgstr "s"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:9
-msgid "Mr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:10
-msgid "Mrs."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:11
-msgid "Ms."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:12
-msgid "Sr."
-msgstr ""
-
-#: addressbook/gui/contact-editor/fullname.glade.h:13
-msgid "_First:"
-msgstr "_Primer:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:14
-msgid "_Last:"
-msgstr "_ltim:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:15
-msgid "_Middle:"
-msgstr "_Mig:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:16
-msgid "_Suffix:"
-msgstr "_Sufix:"
-
-#: addressbook/gui/contact-editor/fullname.glade.h:17
-msgid "_Title:"
-msgstr "_Ttol:"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:1
-#, fuzzy
-msgid "List _name:"
-msgstr "Nom d'usuari:"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:2
-#, fuzzy
-msgid "Members"
-msgstr "desembre"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:3
-msgid "Type an email address or drag a contact into the list below:"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:5
-msgid "_Hide addresses when sending mail to this list"
-msgstr ""
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:6
-#: calendar/gui/dialogs/recurrence-page.glade.h:12 filter/filter.glade.h:10
-#, fuzzy
-msgid "_Remove"
-msgstr "Elimina"
-
-#: addressbook/gui/contact-list-editor/contact-list-editor.glade.h:7
-#, fuzzy
-msgid "contact-list-editor"
-msgstr "Contacta l'editor"
-
-#. Construct the app
-#: address